From c00737155ec51110dede651c1352abbb9250fdbe Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 01:58:35 -0300
Subject: [PATCH 001/348] chore(web-types): generate web-types.json for
WebStorm etc
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 107d3d821da..3a7c8232fd4 100644
--- a/package.json
+++ b/package.json
@@ -123,6 +123,7 @@
"nuxt": "^2.9.2",
"postcss-cli": "^6.1.3",
"prettier": "1.14.3",
+ "require-context": "^1.0.4",
"rollup": "^1.21.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
From 97c11f37d4e70cae38627e56c1d40ab4d06f30be Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 02:10:54 -0300
Subject: [PATCH 002/348] Create create-web-types.js
---
scripts/create-web-types.js | 244 ++++++++++++++++++++++++++++++++++++
1 file changed, 244 insertions(+)
create mode 100644 scripts/create-web-types.js
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
new file mode 100644
index 00000000000..0d796b79935
--- /dev/null
+++ b/scripts/create-web-types.js
@@ -0,0 +1,244 @@
+const path = require('path')
+const fs = require('fs')
+const pkg = require('../package.json')
+const requireContext = require('require-context')
+
+const baseDir = path.resolve(__dirname, '..')
+const baseDocs = pkg.homepage.replace(/\/$/, '')
+const libraryName = pkg.name
+const libraryVersion = pkg.version
+
+// Base web-types object
+const webTypes = {
+ $schema: '',
+ framework: 'vue',
+ name: libraryName,
+ version: libraryVersion,
+ contributions: {
+ html: {
+ 'types-syntax': 'typescript',
+ // Components get placed here
+ tags: [],
+ // Directives get placed in here
+ attributes: []
+ }
+ }
+}
+
+// Import metatdata from a directory glob package.json files
+export const importAll = r => {
+ const obj = {}
+ r.keys()
+ .map(r)
+ .map(m => m.meta || m)
+ .map(m => ({
+ slug: m.slug || (m.title || '').replace(' ', '-').toLowerCase(),
+ ...m
+ }))
+ .sort((a, b) => {
+ if (a.slug < b.slug) return -1
+ else if (a.slug > b.slug) return 1
+ return 0
+ })
+ .forEach(m => {
+ if (m.components) {
+ // Normalize `meta.components` to array of objects form
+ m.components = m.components.map(c => (typeof c === 'string' ? { component: c } : c))
+ }
+ obj[m.slug] = m
+ })
+
+ return obj
+}
+
+const kebabRE = /\B([A-Z])/g
+const kebabCase = str => {
+ return str.replace(kebabRE, '-$1').toLowerCase()
+}
+
+const computePropType = ({ type }) => {
+ if (!type) {
+ return 'any'
+ }
+ type = type || Object
+ if (Array.isArray(type)) {
+ // Array of types
+ return type.map(type => computePropType({ type: type })).join('|')
+ }
+ if (typeof type === 'string') {
+ // Mainly for events and slots
+ if (type === 'Array') {
+ type = Array
+ } else {
+ // Handle cases for BvEvent, BvModalEvent and other native
+ // event types (i.e. HTMLElement, MouseEvent, etc)
+ return /^[A-Z].*[A-Z].+/.test(type) ? type : type.toLowerCase()
+ }
+ }
+ if (type.name === 'Array') {
+ // For simplicity return arrays of any type entries
+ return 'any[]'
+ }
+ return type.name.toLowerCase()
+}
+
+const computePropDefault = ({ default: def, type }) => {
+ // Default could be a function that retruns a non-primative type
+ def = typeof def === 'function' ? def.call({}) : def
+ if (type === Boolean || (Array.isArray(type) && type[0] === Boolean)) {
+ def = Boolean(def)
+ } else if (def === undefined) {
+ def = null
+ }
+ return JSON.stringify(def)
+}
+
+// Create tag entries for each component in a group group
+const processComponentGroup = groupSlug => {
+ // Array of components in the group
+ const groupMeta = componentGroups[groupSlug] || {}
+ const componentsMeta = groupMeta.components || []
+ const docUrl = `${baseDocs}/docs/components/${groupSlug}/`
+
+ const groupRef = require(path.resolve(baseDir, 'esm/components/' + groupSlug))
+
+ // Process each component
+ componentsMeta.forEach(meta => {
+ const componentName = meta.component
+ const componentRef = groupRef[componentName] || {}
+ // Pull information from the component definition/class
+ const $options = componentRef.options || componentRef
+ const $props = $options.props || {}
+ const $model = $options.model || null
+ // Pull additional info from meta
+ const $events = meta.events || []
+ const $slots = meta.slots || []
+ const $aliases = meta.aliases || []
+
+ const tagName = kebabCase(componentName)
+
+ // Build the tag reference
+ const tag = {
+ name: componentName,
+ source: {
+ module: libraryName,
+ symbol: componentName
+ },
+ 'docs-url': docUrl,
+ description: `'${componentName}' - BootstrapVue component <${tagName}>`,
+ attributes: []
+ }
+
+ // Add v-model information
+ if ($model && $model.prop && $model.event) {
+ tag['vue-model'] = {
+ prop: $model.prop,
+ event: $model.event
+ }
+ }
+
+ // Add props
+ if (Object.keys($props).length) {
+ tag.attributes = Object.keys($props).map(propName => {
+ const $prop = $props[propName]
+ const prop = {
+ name: propName,
+ value: {
+ type: computePropType($prop),
+ default: computePropDefault($prop)
+ },
+ // description: '',
+ 'doc-url': docUrl
+ }
+ // Add required prop is required
+ if ($prop.required) {
+ prop.value.required = true
+ }
+ return prop
+ })
+ }
+
+ // Add events
+ if ($events.length) {
+ tag.events = $events.map(eventObj => {
+ return {
+ name: eventObj.event,
+ description: eventObj.description,
+ 'doc-url': docUrl,
+ arguments: (eventObj.args || []).map(arg => {
+ arg = typeof arg === 'object' ? arg : { arg: arg }
+ const event = {
+ name: arg.arg,
+ type: 'any',
+ description: arg.description || '',
+ 'doc-url': docUrl
+ }
+ if (arg.type) {
+ event.type = computePropType(arg)
+ }
+ return event
+ })
+ }
+ })
+ }
+
+ // Add slots
+ if ($slots.length) {
+ tag['vue-scoped-slots'] = $slots.map(slotObj => {
+ const properties = []
+ const slot = {
+ name: slotObj.name,
+ description: slotObj.description || '',
+ 'doc-url': docUrl
+ }
+ if (slotObj.scope) {
+ // Slot props not documented in meta yet
+ slot.properties = slotObj.scope.forEach(propDef => {
+ const property = {
+ name: propDef.name,
+ type: 'any',
+ description: propDef.description,
+ 'doc-url': docUrl
+ }
+ if (propDef.type) {
+ property.type = computePropType(propDef)
+ }
+ return property
+ })
+ }
+ return slot
+ })
+ }
+
+ // Add the component tag
+ webTypes.contributions.html.tags.push(tag)
+
+ // Add in any component alias tags
+ if ($aliases.length) {
+ // Add the aliases
+ $aliases.forEach(alias => {
+ const aliasTag = { ...tag, name: alias, source: { ...tag.source, symbol: alias } }
+ aliasTag.description = `'${alias}' <${kebabCase(alias)}> (Alias for ${tag.description})`
+ webTypes.contributions.html.tags.push(aliasTag)
+ })
+ }
+ })
+}
+
+// Grab the component meta data
+const componentsContext = requireContext(path.resolve(baseDir, 'src/components'), true, /package.json/)
+const componentGroups = importAll(componentsContext)
+
+// Grab teh directive meta data
+// const directivesContext = requireContext(path.resolve(baseDir, 'src/directives'), true, /package.json/)
+// const directiveGroups = importAll(directivesContext)
+
+
+// Process all components
+Object.keys(componentGroups).forEach(processComponentGroup)
+
+// Convert to JSON string
+const json = JSON.stringify(webTypes, null, 2)
+
+// To be replaced with a write to a file
+console.log('JSON:', json)
From 4676007967885e48410eef5d4a45e3236e001dc0 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 02:19:01 -0300
Subject: [PATCH 003/348] Update yarn.lock
---
yarn.lock | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/yarn.lock b/yarn.lock
index 0a28ee601ef..a72e2270a25 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8264,6 +8264,13 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1"
+node-dir@^0.1.17:
+ version "0.1.17"
+ resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
+ integrity sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=
+ dependencies:
+ minimatch "^3.0.2"
+
node-fetch@^2.2.0, node-fetch@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
@@ -10470,6 +10477,13 @@ request@^2.87.0, request@^2.88.0:
tunnel-agent "^0.6.0"
uuid "^3.3.2"
+require-context@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/require-context/-/require-context-1.1.0.tgz#f77e60dddb0a296946e6915bf580c73dbe75ab4d"
+ integrity sha512-nfYSy3Q9W3W1fCo0nief19bDq216IGY9+wOUsmCWAJ5jssyak0r110rvqIj4KJYoUYDxLDaeA66ONOYy4PJEUw==
+ dependencies:
+ node-dir "^0.1.17"
+
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
From 7caf85356ba6fe5a6ee7a7adf80b7af065f58ff9 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 02:30:53 -0300
Subject: [PATCH 004/348] Update build.sh
---
scripts/build.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/build.sh b/scripts/build.sh
index 7154494e268..d8dc021cf5d 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -84,4 +84,9 @@ cd ..
echo 'Done.'
echo ''
+echo 'Building web-types...'
+node -r esm scripts/create-web-types.js || exit 1
+echo 'Done.'
+echo ''
+
echo 'Done building assets.'
From d325f9e17e5b2947fa95460386b47bc5bddc7f3c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:07:23 -0300
Subject: [PATCH 005/348] Update package.json
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3a7c8232fd4..d36c7462712 100644
--- a/package.json
+++ b/package.json
@@ -123,7 +123,7 @@
"nuxt": "^2.9.2",
"postcss-cli": "^6.1.3",
"prettier": "1.14.3",
- "require-context": "^1.0.4",
+ "require-context": "^1.1.0",
"rollup": "^1.21.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
From 617e937cd9c99f59da0192ff223e5d1dc9aa2c20 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:13:11 -0300
Subject: [PATCH 006/348] Update create-web-types.js
---
scripts/create-web-types.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 0d796b79935..1ecfbac0eb0 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -1,5 +1,5 @@
const path = require('path')
-const fs = require('fs')
+// const fs = require('fs')
const pkg = require('../package.json')
const requireContext = require('require-context')
@@ -185,7 +185,6 @@ const processComponentGroup = groupSlug => {
// Add slots
if ($slots.length) {
tag['vue-scoped-slots'] = $slots.map(slotObj => {
- const properties = []
const slot = {
name: slotObj.name,
description: slotObj.description || '',
@@ -226,14 +225,17 @@ const processComponentGroup = groupSlug => {
}
// Grab the component meta data
-const componentsContext = requireContext(path.resolve(baseDir, 'src/components'), true, /package.json/)
+const componentsContext = requireContext(
+ path.resolve(baseDir, 'src/components'),
+ true,
+ /package.json/
+)
const componentGroups = importAll(componentsContext)
-// Grab teh directive meta data
+// Grab the directive meta data
// const directivesContext = requireContext(path.resolve(baseDir, 'src/directives'), true, /package.json/)
// const directiveGroups = importAll(directivesContext)
-
// Process all components
Object.keys(componentGroups).forEach(processComponentGroup)
From d3b769a07830cd0f68e5fec32ed6783798e4a13e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:32:19 -0300
Subject: [PATCH 007/348] Update safe-types.js
---
src/utils/safe-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/safe-types.js b/src/utils/safe-types.js
index 185b2feb1c6..9179d00c66b 100644
--- a/src/utils/safe-types.js
+++ b/src/utils/safe-types.js
@@ -6,4 +6,4 @@ import { hasWindowSupport } from './env'
const w = hasWindowSupport ? window : {}
-export const HTMLElement = w.HTMLElement || Object
+export const HTMLElement = w.HTMLElement || class HTMLElement extends (Object) {}
From 2a790e3ec5b0b6c29df24ed28c5719aff16cb0c5 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:33:25 -0300
Subject: [PATCH 008/348] Update safe-types.js
---
src/utils/safe-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/safe-types.js b/src/utils/safe-types.js
index 9179d00c66b..11943fddfc8 100644
--- a/src/utils/safe-types.js
+++ b/src/utils/safe-types.js
@@ -6,4 +6,4 @@ import { hasWindowSupport } from './env'
const w = hasWindowSupport ? window : {}
-export const HTMLElement = w.HTMLElement || class HTMLElement extends (Object) {}
+export const HTMLElement = hasWindowSupport ? w.HTMLElement : class HTMLElement extends (Object) {}
From a7174faa81317a9b968c74c53b28ee3e0615da0e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:41:30 -0300
Subject: [PATCH 009/348] Update package.json
---
src/components/modal/package.json | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index f19600d1898..d8c410984b1 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -20,6 +20,7 @@
"args": [
{
"arg": "isVisible",
+ "type": "Boolean",
"description": "true if modal is visible, false otherwise"
}
]
@@ -30,6 +31,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel show"
}
]
@@ -40,6 +42,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object"
}
]
@@ -50,6 +53,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -60,6 +64,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object"
}
]
@@ -70,6 +75,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -80,6 +86,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -90,6 +97,7 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -100,10 +108,12 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvEvt.preventDefault() to cancel show"
},
{
"arg": "modalId",
+ "type": "String",
"description": "modal ID"
}
]
@@ -114,10 +124,12 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object"
},
{
"arg": "modalId",
+ "type": "String",
"description": "modal ID"
}
]
@@ -128,10 +140,12 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object. Call bvEvt.preventDefault() to cancel hide"
},
{
"arg": "modalId",
+ "Type": "String",
"description": "modal ID"
}
]
@@ -142,10 +156,12 @@
"args": [
{
"arg": "bvModalEvt",
+ "Type": "BvModalEvent",
"description": "BvModalEvent object"
},
{
"arg": "modalId",
+ "Type": "String",
"description": "modal ID"
}
]
@@ -158,10 +174,12 @@
"args": [
{
"arg": "modalId",
+ "Type": "String",
"description": "modal ID to show"
},
{
"arg": "elIDtoFocusOnClose",
+ "Type": ["String", "HTMLElement"]
"description": "(optional), specify the element reference, or CSS selector, to return focus to once the modal is closed"
}
]
@@ -172,6 +190,7 @@
"args": [
{
"arg": "modalId",
+ "Type": "String",
"description": "ID of modal to hide"
}
]
@@ -182,10 +201,12 @@
"args": [
{
"arg": "modalId",
+ "Type": "String",
"description": "ID of modal to toggle visibility"
},
{
"arg": "elIDtoFocusOnClose",
+ "Type": ["String", "HTMLElement"],
"description": "(optional), specify the element reference, or CSS selector, to return focus to once the modal is closed"
}
]
From f4287fe44c0a59821ca7fc927cf173c90632f2dd Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:43:58 -0300
Subject: [PATCH 010/348] Update safe-types.js
---
src/utils/safe-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/safe-types.js b/src/utils/safe-types.js
index 11943fddfc8..3c1e42cccca 100644
--- a/src/utils/safe-types.js
+++ b/src/utils/safe-types.js
@@ -6,4 +6,4 @@ import { hasWindowSupport } from './env'
const w = hasWindowSupport ? window : {}
-export const HTMLElement = hasWindowSupport ? w.HTMLElement : class HTMLElement extends (Object) {}
+export const HTMLElement = hasWindowSupport ? w.HTMLElement : class HTMLElement extends Object {}
From f79d573f8699998bfc72005db388f0a5dee35100 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:49:08 -0300
Subject: [PATCH 011/348] Update package.json
---
src/components/modal/package.json | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index d8c410984b1..1a30f63133a 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -31,7 +31,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel show"
}
]
@@ -42,7 +42,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object"
}
]
@@ -53,7 +53,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -64,7 +64,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object"
}
]
@@ -75,7 +75,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -86,7 +86,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -97,7 +97,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvModalEvt.preventDefault() to cancel hide"
}
]
@@ -108,7 +108,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvEvt.preventDefault() to cancel show"
},
{
@@ -124,7 +124,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object"
},
{
@@ -140,7 +140,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object. Call bvEvt.preventDefault() to cancel hide"
},
{
@@ -156,7 +156,7 @@
"args": [
{
"arg": "bvModalEvt",
- "Type": "BvModalEvent",
+ "type": "BvModalEvent",
"description": "BvModalEvent object"
},
{
@@ -174,7 +174,7 @@
"args": [
{
"arg": "modalId",
- "Type": "String",
+ "type": "String",
"description": "modal ID to show"
},
{
@@ -190,7 +190,7 @@
"args": [
{
"arg": "modalId",
- "Type": "String",
+ "type": "String",
"description": "ID of modal to hide"
}
]
@@ -201,12 +201,12 @@
"args": [
{
"arg": "modalId",
- "Type": "String",
+ "type": "String",
"description": "ID of modal to toggle visibility"
},
{
"arg": "elIDtoFocusOnClose",
- "Type": ["String", "HTMLElement"],
+ "type": ["String", "HTMLElement"],
"description": "(optional), specify the element reference, or CSS selector, to return focus to once the modal is closed"
}
]
From af00bf2b7ff6e32d627c6ec6cfd9cb0efa1acdfc Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:53:17 -0300
Subject: [PATCH 012/348] Update create-web-types.js
---
scripts/create-web-types.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 1ecfbac0eb0..7d7e621edbb 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -1,10 +1,11 @@
const path = require('path')
// const fs = require('fs')
-const pkg = require('../package.json')
const requireContext = require('require-context')
const baseDir = path.resolve(__dirname, '..')
const baseDocs = pkg.homepage.replace(/\/$/, '')
+
+const pkg = require(path.resolve(__dirname, 'package.json'))
const libraryName = pkg.name
const libraryVersion = pkg.version
From 800489bfb2416b2f17036495667975c26f3013e1 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 03:59:03 -0300
Subject: [PATCH 013/348] Update package.json
---
src/components/modal/package.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index 1a30f63133a..a854e16e4eb 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -145,7 +145,7 @@
},
{
"arg": "modalId",
- "Type": "String",
+ "type": "String",
"description": "modal ID"
}
]
@@ -161,7 +161,7 @@
},
{
"arg": "modalId",
- "Type": "String",
+ "type": "String",
"description": "modal ID"
}
]
@@ -179,7 +179,7 @@
},
{
"arg": "elIDtoFocusOnClose",
- "Type": ["String", "HTMLElement"]
+ "type": ["String", "HTMLElement"],
"description": "(optional), specify the element reference, or CSS selector, to return focus to once the modal is closed"
}
]
From 3a848f417333bf6e4ec3b329c9c58abb0bda06b8 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 04:03:08 -0300
Subject: [PATCH 014/348] Update create-web-types.js
---
scripts/create-web-types.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 7d7e621edbb..052e5f28663 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -2,13 +2,13 @@ const path = require('path')
// const fs = require('fs')
const requireContext = require('require-context')
-const baseDir = path.resolve(__dirname, '..')
-const baseDocs = pkg.homepage.replace(/\/$/, '')
-
const pkg = require(path.resolve(__dirname, 'package.json'))
const libraryName = pkg.name
const libraryVersion = pkg.version
+const baseDir = path.resolve(__dirname, '..')
+const baseDocs = pkg.homepage.replace(/\/$/, '')
+
// Base web-types object
const webTypes = {
$schema: '',
From 30d2f14a611d379975a68b1a8d579bad732d6c93 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 04:07:56 -0300
Subject: [PATCH 015/348] Update create-web-types.js
---
scripts/create-web-types.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 052e5f28663..bc4abbbbba0 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -2,11 +2,11 @@ const path = require('path')
// const fs = require('fs')
const requireContext = require('require-context')
-const pkg = require(path.resolve(__dirname, 'package.json'))
+const baseDir = path.resolve(__dirname, '..')
+const pkg = require(path.resolve(baseDir, 'package.json'))
+
const libraryName = pkg.name
const libraryVersion = pkg.version
-
-const baseDir = path.resolve(__dirname, '..')
const baseDocs = pkg.homepage.replace(/\/$/, '')
// Base web-types object
From ed2343bca66386be9ce1affcb43772bb14262cae Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 19:00:45 -0300
Subject: [PATCH 016/348] Update create-web-types.js
---
scripts/create-web-types.js | 71 ++++++++++++++++++++++++++++++++++---
1 file changed, 66 insertions(+), 5 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index bc4abbbbba0..4a57aa53264 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -27,7 +27,7 @@ const webTypes = {
}
// Import metatdata from a directory glob package.json files
-export const importAll = r => {
+const importAll = r => {
const obj = {}
r.keys()
.map(r)
@@ -52,11 +52,13 @@ export const importAll = r => {
return obj
}
+// Util to kebab-case a PascalCase or camelCase string
const kebabRE = /\B([A-Z])/g
const kebabCase = str => {
return str.replace(kebabRE, '-$1').toLowerCase()
}
+// Compute hte web-type "type" from the a prop type
const computePropType = ({ type }) => {
if (!type) {
return 'any'
@@ -83,6 +85,7 @@ const computePropType = ({ type }) => {
return type.name.toLowerCase()
}
+// Compute the default value (in web-type form) for a given prop definition
const computePropDefault = ({ default: def, type }) => {
// Default could be a function that retruns a non-primative type
def = typeof def === 'function' ? def.call({}) : def
@@ -94,13 +97,14 @@ const computePropDefault = ({ default: def, type }) => {
return JSON.stringify(def)
}
-// Create tag entries for each component in a group group
+// Create tag entries for each component in a component group
const processComponentGroup = groupSlug => {
// Array of components in the group
const groupMeta = componentGroups[groupSlug] || {}
const componentsMeta = groupMeta.components || []
const docUrl = `${baseDocs}/docs/components/${groupSlug}/`
+ // We import the component from the transpiled `esm/` dir
const groupRef = require(path.resolve(baseDir, 'esm/components/' + groupSlug))
// Process each component
@@ -225,7 +229,57 @@ const processComponentGroup = groupSlug => {
})
}
-// Grab the component meta data
+// Create attribute entries for each directive
+const processDirectiveGroup = groupSlug => {
+ // Directives only have a single entry in their Meta for `directive`
+ const directiveMeta = directiveGroups[groupSlug] || {}
+ const docUrl = `${baseDocs}/docs/directives/${groupSlug}/`
+
+ // Process the directive meta
+ const name = directiveMeta.directive
+ const arg = directiveMeta.arg
+ const modifiers = directiveMeta.modifiers
+ const expression = directiveMeta.expression
+
+ // Base attribute definition
+ const attribute = {
+ name: kebabCase(name),
+ source: {
+ module: libraryName,
+ symbol: name
+ },
+ required: false,
+ description: `${name} - BootstrapVue directive '${kebabCase(name)}'`,
+ 'doc-url': docUrl
+ }
+ // Add in argument details
+ if (arg) {
+ // TODO as this is missing from the schema def
+ // https://github.com/JetBrains/web-types/issues/7
+ }
+ // Add in any modifier details
+ if (modifiers) {
+ attribute['vue-modifiers'] = modifiers.map(mod => {
+ const modifier = {
+ name: mod.modifer,
+ description: mod.description || '',
+ 'doc-url': docUrl
+ }
+ return modifer
+ })
+ }
+ // Add in value (expression) type
+ if (expression) {
+ attribute.value = {
+ kind: 'expression',
+ type: computePropType(expression)
+ }
+ }
+ // Add the directive to the html attributes array
+ webTypes.contributions.html.attributes.push(attribute)
+}
+
+// Grab the component meta data (from the source dir component's package.json)
const componentsContext = requireContext(
path.resolve(baseDir, 'src/components'),
true,
@@ -234,12 +288,19 @@ const componentsContext = requireContext(
const componentGroups = importAll(componentsContext)
// Grab the directive meta data
-// const directivesContext = requireContext(path.resolve(baseDir, 'src/directives'), true, /package.json/)
-// const directiveGroups = importAll(directivesContext)
+const directivesContext = requireContext(
+ path.resolve(baseDir, 'src/directives'),
+ true,
+ /package.json/
+)
+const directiveGroups = importAll(directivesContext)
// Process all components
Object.keys(componentGroups).forEach(processComponentGroup)
+// Process all directives
+Object.keys(directiveGroups).forEach(processDirectiveGroup)
+
// Convert to JSON string
const json = JSON.stringify(webTypes, null, 2)
From 2e98eaf296ae156c85e3f17ba900612dade2722b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 19:04:09 -0300
Subject: [PATCH 017/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 4a57aa53264..42236e3a0c2 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -265,7 +265,7 @@ const processDirectiveGroup = groupSlug => {
description: mod.description || '',
'doc-url': docUrl
}
- return modifer
+ return modifier
})
}
// Add in value (expression) type
From 49bbc676d1671f4a06f61e5373a4729af98c15b2 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 19:53:54 -0300
Subject: [PATCH 018/348] Update create-web-types.js
---
scripts/create-web-types.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 42236e3a0c2..0ed6d2f41b2 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -199,11 +199,12 @@ const processComponentGroup = groupSlug => {
// Slot props not documented in meta yet
slot.properties = slotObj.scope.forEach(propDef => {
const property = {
- name: propDef.name,
- type: 'any',
- description: propDef.description,
+ name: propDef.prop,
'doc-url': docUrl
}
+ if (propDef.description) {
+ property.description = propDef.description
+ }
if (propDef.type) {
property.type = computePropType(propDef)
}
From 7df95f20bf7a91a8204f3291fdd76e82ab2a4c89 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 19:54:52 -0300
Subject: [PATCH 019/348] Update package.json
---
src/components/modal/package.json | 116 ++++++++++++++++++++++++++++--
1 file changed, 112 insertions(+), 4 deletions(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index a854e16e4eb..cd0210d26ce 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -215,15 +215,96 @@
"slots": [
{
"name": "modal-header",
- "description": "Entire modal header container contents. Also removes the top right X close button. Optionally scoped."
+ "description": "Entire modal header container contents. Also removes the top right X close button. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "visible",
+ "type": "Boolean",
+ "description": "The visibility state of the modal. true if the modal is visible and false if not visible"
+ },
+ {
+ "prop": "ok",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'ok' and 'hide' events, with bvModalEvent.trigger = 'ok'"
+ },
+ {
+ "prop": "cancel",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'cancel' and 'hide' events, with bvModalEvent.trigger = 'cancel'"
+ },
+ {
+ "prop": "close",
+ "type": "Function",
+ "description": "Closes the modal and fires the close and hide events, with bvModalEvent.trigger = 'headerclose'"
+ },
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Accepts one argument 'trigger'. Closes the modal and fires the 'hide' event, with the bvModalEvent.trigger = trigger (trigger is optional)"
+ }
+ ]
},
{
"name": "modal-title",
- "description": "Modal title. If modal-header slot is used, this slot will not be shown. Optionally scoped."
+ "description": "Modal title. If modal-header slot is used, this slot will not be shown. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "visible",
+ "type": "Boolean",
+ "description": "The visibility state of the modal. true if the modal is visible and false if not visible"
+ },
+ {
+ "prop": "ok",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'ok' and 'hide' events, with bvModalEvent.trigger = 'ok'"
+ },
+ {
+ "prop": "cancel",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'cancel' and 'hide' events, with bvModalEvent.trigger = 'cancel'"
+ },
+ {
+ "prop": "close",
+ "type": "Function",
+ "description": "Closes the modal and fires the close and hide events, with bvModalEvent.trigger = 'headerclose'"
+ },
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Accepts one argument 'trigger'. Closes the modal and fires the 'hide' event, with the bvModalEvent.trigger = trigger (trigger is optional)"
+ }
+ ]
},
{
"name": "modal-footer",
- "description": "Modal footer content. Also removes default OK and CANCEL buttons. Optionally scoped."
+ "description": "Modal footer content. Also removes default OK and CANCEL buttons. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "visible",
+ "type": "Boolean",
+ "description": "The visibility state of the modal. true if the modal is visible and false if not visible"
+ },
+ {
+ "prop": "ok",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'ok' and 'hide' events, with bvModalEvent.trigger = 'ok'"
+ },
+ {
+ "prop": "cancel",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'cancel' and 'hide' events, with bvModalEvent.trigger = 'cancel'"
+ },
+ {
+ "prop": "close",
+ "type": "Function",
+ "description": "Closes the modal and fires the close and hide events, with bvModalEvent.trigger = 'headerclose'"
+ },
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Accepts one argument 'trigger'. Closes the modal and fires the 'hide' event, with the bvModalEvent.trigger = trigger (trigger is optional)"
+ }
+ ]
},
{
"name": "modal-header-close",
@@ -243,7 +324,34 @@
},
{
"name": "default",
- "description": "Content of modal body. Optionally scoped."
+ "description": "Content of modal body. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "visible",
+ "type": "Boolean",
+ "description": "The visibility state of the modal. true if the modal is visible and false if not visible"
+ },
+ {
+ "prop": "ok",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'ok' and 'hide' events, with bvModalEvent.trigger = 'ok'"
+ },
+ {
+ "prop": "cancel",
+ "type": "Function",
+ "description": "Closes the modal and fires the 'cancel' and 'hide' events, with bvModalEvent.trigger = 'cancel'"
+ },
+ {
+ "prop": "close",
+ "type": "Function",
+ "description": "Closes the modal and fires the close and hide events, with bvModalEvent.trigger = 'headerclose'"
+ },
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Accepts one argument 'trigger'. Closes the modal and fires the 'hide' event, with the bvModalEvent.trigger = trigger (trigger is optional)"
+ }
+ ]
}
]
}
From 78e78bae5a27a6627bf1a3883baff326a67bb918 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 20:02:55 -0300
Subject: [PATCH 020/348] Update create-web-types.js
---
scripts/create-web-types.js | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 0ed6d2f41b2..b6fc3e16aab 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -166,24 +166,30 @@ const processComponentGroup = groupSlug => {
// Add events
if ($events.length) {
tag.events = $events.map(eventObj => {
- return {
+ const event = {
name: eventObj.event,
- description: eventObj.description,
- 'doc-url': docUrl,
- arguments: (eventObj.args || []).map(arg => {
+ 'doc-url': docUrl
+ }
+ if (eventObj.description) {
+ event.description = eventObj.description
+ }
+ if (eventObj.args) {
+ event.arguments = eventObj.args.map(arg => {
arg = typeof arg === 'object' ? arg : { arg: arg }
- const event = {
+ const argument = {
name: arg.arg,
- type: 'any',
- description: arg.description || '',
'doc-url': docUrl
}
+ if (arg.description) {
+ argument.description = arg.description
+ }
if (arg.type) {
- event.type = computePropType(arg)
+ argument.type = computePropType(arg)
}
- return event
+ return argument
})
}
+ return event
})
}
@@ -192,9 +198,11 @@ const processComponentGroup = groupSlug => {
tag['vue-scoped-slots'] = $slots.map(slotObj => {
const slot = {
name: slotObj.name,
- description: slotObj.description || '',
'doc-url': docUrl
}
+ if (slotObj.description) {
+ slot.description = slotObj.description
+ }
if (slotObj.scope) {
// Slot props not documented in meta yet
slot.properties = slotObj.scope.forEach(propDef => {
From ad0f144d92b51bf6aff058c0b00168d8baaf1fab Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 20:14:57 -0300
Subject: [PATCH 021/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index b6fc3e16aab..67fa306fe71 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -58,7 +58,7 @@ const kebabCase = str => {
return str.replace(kebabRE, '-$1').toLowerCase()
}
-// Compute hte web-type "type" from the a prop type
+// Compute the web-type "type" from the a prop type
const computePropType = ({ type }) => {
if (!type) {
return 'any'
From ba3ac5610786e3430fc1acc25737df78e37d4cdc Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 20:24:08 -0300
Subject: [PATCH 022/348] Update create-web-types.js
---
scripts/create-web-types.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 67fa306fe71..fe55e565f3e 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -173,7 +173,7 @@ const processComponentGroup = groupSlug => {
if (eventObj.description) {
event.description = eventObj.description
}
- if (eventObj.args) {
+ if (Array.isArray(eventObj.args)) {
event.arguments = eventObj.args.map(arg => {
arg = typeof arg === 'object' ? arg : { arg: arg }
const argument = {
@@ -203,9 +203,9 @@ const processComponentGroup = groupSlug => {
if (slotObj.description) {
slot.description = slotObj.description
}
- if (slotObj.scope) {
+ if (Array.isArray(slotObj.scope)) {
// Slot props not documented in meta yet
- slot.properties = slotObj.scope.forEach(propDef => {
+ slot.properties = slotObj.scope.map(propDef => {
const property = {
name: propDef.prop,
'doc-url': docUrl
From d96248445b58fd8ab37faa4a79eb964023843171 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 20:28:26 -0300
Subject: [PATCH 023/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index fe55e565f3e..49ae599b6a8 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -75,7 +75,7 @@ const computePropType = ({ type }) => {
} else {
// Handle cases for BvEvent, BvModalEvent and other native
// event types (i.e. HTMLElement, MouseEvent, etc)
- return /^[A-Z].*[A-Z].+/.test(type) ? type : type.toLowerCase()
+ return /^[A-Z].*[A-Z].+/.test(type) || type === 'Event' ? type : type.toLowerCase()
}
}
if (type.name === 'Array') {
From 04a9b8213a32be1088c884d5f8ace41f770957d0 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 21:24:14 -0300
Subject: [PATCH 024/348] Update modal.js
---
src/components/modal/modal.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js
index af8e94060a0..58474b66e96 100644
--- a/src/components/modal/modal.js
+++ b/src/components/modal/modal.js
@@ -16,6 +16,7 @@ import {
import { isBrowser } from '../../utils/env'
import { stripTags } from '../../utils/html'
import { isString, isUndefinedOrNull } from '../../utils/inspect'
+import { HTMLElement } from '../../utils/safe-types'
import { BTransporterSingle } from '../../utils/transporter'
import idMixin from '../../mixins/id'
import listenOnRootMixin from '../../mixins/listen-on-root'
@@ -224,7 +225,8 @@ export const props = {
default: false
},
returnFocus: {
- // type: Object,
+ // HTML Element or CSS selector string
+ type: [HTMLElement, String],
default: null
},
headerCloseLabel: {
From 3b9c92ec0b0b172fb47c753002a989cd263fe35b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 21:27:01 -0300
Subject: [PATCH 025/348] Update package.json
---
src/components/tooltip/package.json | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json
index b911f1c9a67..1cb32c6baac 100644
--- a/src/components/tooltip/package.json
+++ b/src/components/tooltip/package.json
@@ -17,6 +17,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -27,6 +28,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -37,6 +39,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -47,6 +50,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -65,6 +69,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -75,6 +80,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -85,6 +91,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -95,6 +102,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -105,6 +113,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -115,6 +124,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object."
}
]
@@ -127,6 +137,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), tooltip id to hide"
}
]
@@ -137,6 +148,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), tooltip id to show"
}
]
@@ -147,6 +159,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), tooltip id to disable"
}
]
@@ -157,6 +170,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), tooltip id to enable"
}
]
@@ -165,7 +179,7 @@
"slots": [
{
"name": "default",
- "description": "Slot for tooltip content (HTML supported)"
+ "description": "Slot for tooltip content (HTML/Components supported)"
}
]
}
From 5cc3ffc54baadd21daf9219207344e97e05f3fbe Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 21:31:00 -0300
Subject: [PATCH 026/348] Update package.json
---
src/components/tooltip/package.json | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json
index 1cb32c6baac..9b818fae49c 100644
--- a/src/components/tooltip/package.json
+++ b/src/components/tooltip/package.json
@@ -18,7 +18,7 @@
{
"arg": "bvEvent",
"type": "BvEvent",
- "description": "bvEvent object"
+ "description": "bvEvent object. Cancelable."
}
]
},
@@ -40,7 +40,7 @@
{
"arg": "bvEvent",
"type": "BvEvent",
- "description": "bvEvent object"
+ "description": "bvEvent object. Cancelable."
}
]
},
@@ -57,11 +57,25 @@
},
{
"event": "enabled",
- "description": "Emitted when tooltip becomes enabled"
+ "description": "Emitted when tooltip becomes enabled",
+ "args": [
+ {
+ "arg": "bvEvent",
+ "type": "BvEvent",
+ "description": "bvEvent object"
+ }
+ ]
},
{
"event": "disabled",
- "description": "Emitted when tooltip becomes disabled"
+ "description": "Emitted when tooltip becomes disabled",
+ "args": [
+ {
+ "arg": "bvEvent",
+ "type": "BvEvent",
+ "description": "bvEvent object"
+ }
+ ]
},
{
"event": "bv::tooltip::show",
@@ -70,7 +84,7 @@
{
"arg": "bvEvent",
"type": "BvEvent",
- "description": "bvEvent object"
+ "description": "bvEvent object. Cancelable."
}
]
},
@@ -92,7 +106,7 @@
{
"arg": "bvEvent",
"type": "BvEvent",
- "description": "bvEvent object"
+ "description": "bvEvent object. Cancelable."
}
]
},
From 1dfff5e562c569430e75c1779d12e755ac0aff5f Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 21:56:22 -0300
Subject: [PATCH 027/348] Update create-web-types.js
---
scripts/create-web-types.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 49ae599b6a8..23ec111cd2b 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -66,30 +66,32 @@ const computePropType = ({ type }) => {
type = type || Object
if (Array.isArray(type)) {
// Array of types
- return type.map(type => computePropType({ type: type })).join('|')
+ return type.map(t => computePropType({ type: t })).join('|')
}
if (typeof type === 'string') {
// Mainly for events and slots
if (type === 'Array') {
- type = Array
+ return 'any[]'
} else {
// Handle cases for BvEvent, BvModalEvent and other native
- // event types (i.e. HTMLElement, MouseEvent, etc)
- return /^[A-Z].*[A-Z].+/.test(type) || type === 'Event' ? type : type.toLowerCase()
+ // event types (i.e. HTMLElement, MouseEvent, Event, etc) as strings
+ // We use strings (or array of strings) in the component group package.json meta
+ return /^[A-Z].+[A-Z].+[a-z]$/.test(type) || type === 'Event' ? type : type.toLowerCase()
}
}
if (type.name === 'Array') {
// For simplicity return arrays of any type entries
return 'any[]'
}
+ // Prop types are typically class references (String, Function, etc)
return type.name.toLowerCase()
}
-// Compute the default value (in web-type form) for a given prop definition
+// Compute the default value (in web-type form) for a given prop definition (component props only)
const computePropDefault = ({ default: def, type }) => {
// Default could be a function that retruns a non-primative type
def = typeof def === 'function' ? def.call({}) : def
- if (type === Boolean || (Array.isArray(type) && type[0] === Boolean)) {
+ if (type === Boolean || (Array.isArray(type) && type[0] === Boolean && !def)) {
def = Boolean(def)
} else if (def === undefined) {
def = null
From e3386243e33994dbede1b22437ee7a898c5c6bb8 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 22:07:23 -0300
Subject: [PATCH 028/348] Update create-web-types.js
---
scripts/create-web-types.js | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 23ec111cd2b..65e644747ab 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -68,23 +68,20 @@ const computePropType = ({ type }) => {
// Array of types
return type.map(t => computePropType({ type: t })).join('|')
}
- if (typeof type === 'string') {
- // Mainly for events and slots
- if (type === 'Array') {
- return 'any[]'
- } else {
- // Handle cases for BvEvent, BvModalEvent and other native
- // event types (i.e. HTMLElement, MouseEvent, Event, etc) as strings
- // We use strings (or array of strings) in the component group package.json meta
- return /^[A-Z].+[A-Z].+[a-z]$/.test(type) || type === 'Event' ? type : type.toLowerCase()
- }
+ if (typeof type === 'undefined') {
+ return 'any'
+ }
+ if (typeof type !== 'string') {
+ type = type.name
}
- if (type.name === 'Array') {
+ if (type === 'Array') {
// For simplicity return arrays of any type entries
return 'any[]'
}
- // Prop types are typically class references (String, Function, etc)
- return type.name.toLowerCase()
+ // For browser types, we leave them capitalized, otherwise we return a lowercase typescipt name
+ return ['Boolean', 'String', 'Number', 'Function', 'Object'].indexOf(type) > -1
+ ? type.toLowerCase()
+ : type
}
// Compute the default value (in web-type form) for a given prop definition (component props only)
From 9f95f7d684a8fb4e26f1c5b7cd0d9aaf7f168155 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 22:09:59 -0300
Subject: [PATCH 029/348] Update package.json
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index d36c7462712..ac8609e8544 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"style": "dist/bootstrap-vue.css",
"license": "MIT",
"types": "src/index.d.ts",
+ "web-types": "dist/web-types.json",
"repository": "bootstrap-vue/bootstrap-vue",
"homepage": "https://bootstrap-vue.js.org",
"contributors": [
From 13c2040278bd1b9bd50207ecd04f38b7c5b1a4c4 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 22:36:13 -0300
Subject: [PATCH 030/348] Update package.json
---
src/components/toast/package.json | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/components/toast/package.json b/src/components/toast/package.json
index 294f7e17825..030672a3296 100644
--- a/src/components/toast/package.json
+++ b/src/components/toast/package.json
@@ -18,6 +18,7 @@
"args": [
{
"arg": "visible",
+ "type": "Boolean",
"description": "true if toast is visible, false otherwise."
}
]
@@ -28,6 +29,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object."
}
]
@@ -38,6 +40,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object."
}
]
@@ -48,6 +51,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object."
}
]
@@ -58,6 +62,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object."
}
]
@@ -66,11 +71,25 @@
"slots": [
{
"name": "toast-title",
- "description": "Toast title. Optionally scoped."
+ "description": "Toast title. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Hides the toast when called. Useful if you are providing your own close button."
+ }
+ ]
},
{
"name": "default",
- "description": "Toast body content. Optionally scoped."
+ "description": "Toast body content. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Hides the toast when called. Useful if you are providing your own close button."
+ }
+ ]
}
]
},
From 5487b64cc5d3924cee2f3711b17c3bd3be012228 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 22:38:46 -0300
Subject: [PATCH 031/348] Update package.json
---
src/components/tabs/package.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/tabs/package.json b/src/components/tabs/package.json
index 2c34a1edde8..e61d96a9859 100644
--- a/src/components/tabs/package.json
+++ b/src/components/tabs/package.json
@@ -14,6 +14,7 @@
"args": [
{
"arg": "tabIndex",
+ "type": "Number",
"description": "Current selected tab index (0-based index)"
}
]
@@ -24,10 +25,12 @@
"args": [
{
"arg": "currentTabs",
+ "type": "Array",
"description": "Array of the current b-tab instances, in document order."
},
{
"arg": "previousTabs",
+ "type": "Array",
"description": "Array of the previous b-tab instances, in document order."
}
]
@@ -57,6 +60,7 @@
"args": [
{
"arg": "evt",
+ "type": "MouseEvent",
"description": "Original event object"
}
]
From 3736d8d8deb0c97010037498da496fdb5b8667bd Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Tue, 17 Sep 2019 23:50:38 -0300
Subject: [PATCH 032/348] Update package.json
---
src/components/table/package.json | 659 ++++++++++++++++++++++++++++--
1 file changed, 634 insertions(+), 25 deletions(-)
diff --git a/src/components/table/package.json b/src/components/table/package.json
index a0bd54d9725..dd6cf9fc08e 100644
--- a/src/components/table/package.json
+++ b/src/components/table/package.json
@@ -18,14 +18,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -36,14 +39,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being double clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being double clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -54,14 +60,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being middle clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being middle clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -72,14 +81,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being right clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being right clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -90,14 +102,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being hovered."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being hovered."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -108,24 +123,28 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being unhovered."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being unhovered."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
},
{
"event": "row-selected",
- "description": "Emitted when a row or rows have been selected.",
+ "description": "Emitted when a row or rows have been selected or unselected.",
"args": [
{
"arg": "rows",
+ "type": "Array",
"description": "Array of the row items that are selected."
}
]
@@ -136,18 +155,22 @@
"args": [
{
"arg": "key",
+ "type": "String",
"description": "Column key clicked (field name)."
},
{
"arg": "field",
+ "type": "Object",
"description": "Field definition object."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
},
{
"arg": "isFooter",
+ "type": "Boolean",
"description": "'True' if this event originated from clicking on the footer cell"
}
]
@@ -158,6 +181,7 @@
"args": [
{
"arg": "ctx",
+ "type": "Object",
"description": "Table state context object. See docs."
}
]
@@ -168,6 +192,7 @@
"args": [
{
"arg": "ctx",
+ "type": "Object",
"description": "Table state context object. See docs."
}
]
@@ -178,6 +203,7 @@
"args": [
{
"arg": "filteredItems",
+ "type": "Array",
"description": "Array of items after filtering (before local pagination occurs)."
}
]
@@ -194,6 +220,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "table id to refresh data"
}
]
@@ -202,27 +229,215 @@
"slots": [
{
"name": "cell(key)",
- "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name. See docs for scoped data"
+ "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name. See docs for scoped data",
+ "scope": [
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The row's index (zero-based) with respect to the displayed rows"
+ },
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The row's item data object"
+ },
+ {
+ "prop": "value",
+ "description": "The value for this key in the record (null or undefined if a virtual column), or the output of the field's formatter function"
+ },
+ {
+ "prop": "unformatted",
+ "description": "The raw value for this key in the item record (null or undefined if a virtual column), before being passed to the field's formatter function"
+ },
+ {
+ "prop": "detailsShowing",
+ "type": "Boolean",
+ "description": "Will be true if the row's row-details scoped slot is visible"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Can be called to toggle the visibility of the rows row-details scoped slot"
+ },
+ {
+ "prop": "rowSelected",
+ "type": "Boolean",
+ "description": "Will be true if the row has been selected."
+ }
+ ]
},
{
"name": "cell()",
- "description": "Default scoped slot for custom data rendering of field data. See docs for scoped data"
+ "description": "Default scoped slot for custom data rendering of field data. See docs for scoped data",
+ "scope": [
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The row's index (zero-based) with respect to the displayed rows"
+ },
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The row's item data object"
+ },
+ {
+ "prop": "value",
+ "description": "The value for this key in the record (null or undefined if a virtual column), or the output of the field's formatter function"
+ },
+ {
+ "prop": "unformatted",
+ "description": "The raw value for this key in the item record (null or undefined if a virtual column), before being passed to the field's formatter function"
+ },
+ {
+ "prop": "detailsShowing",
+ "type": "Boolean",
+ "description": "Will be true if the row's row-details scoped slot is visible"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Can be called to toggle the visibility of the rows row-details scoped slot"
+ },
+ {
+ "prop": "rowSelected",
+ "type": "Boolean",
+ "description": "Will be true if the row has been selected."
+ }
+ ]
},
{
"name": "head(key)",
- "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name. See docs for scoped header"
+ "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name. See docs for scoped header",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "isFoot",
+ "type": "Boolean",
+ "description": "Will be true if the slot is being rendered in the table footer"
+ }
+ ]
},
{
"name": "head()",
- "description": "Default scoped slot for custom rendering of field header. See docs for scoped header"
+ "description": "Default scoped slot for custom rendering of field header. See docs for scoped header",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "isFoot",
+ "type": "Boolean",
+ "description": "Will be true if the slot is being rendered in the table footer"
+ }
+ ]
},
{
"name": "foot(key)",
- "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name. See docs for scoped footer"
+ "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name. See docs for scoped footer",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ }
+ ]
},
{
"name": "foot()",
- "description": "Default scoped slot for custom rendering of field footer. See docs for scoped footer"
+ "description": "Default scoped slot for custom rendering of field footer. See docs for scoped footer",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ }
+ ]
},
{
"name": "table-caption",
@@ -230,7 +445,19 @@
},
{
"name": "table-colgroup",
- "description": "Slot to place custom colgroup and col elements (optionally scoped: columns - number of columns, fields - array of field definition objects)"
+ "description": "Slot to place custom colgroup and col elements. Optionally scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "Array of field definition objects"
+ }
+ ]
},
{
"name": "table-busy",
@@ -238,31 +465,180 @@
},
{
"name": "row-details",
- "description": "Scoped slot for optional rendering additional record details. See docs for Row details support"
+ "description": "Scoped slot for optional rendering additional record details. See docs for Row details support",
+ "scope": [
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The entire row's record data object"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The item's row index number (with respect to the displayed item rows)"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Function to toggle visibility of the row's details slot"
+ }
+ ]
},
{
"name": "empty",
- "description": "Content to display when no items are present in the `items` array (optionally scoped: see docs for details)"
+ "description": "Content to display when no items are present in the `items` array. Optionally scoped",
+ "scope": [
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "items",
+ "type": "Array",
+ "description": "The items array. Exposed here to check null vs []"
+ },
+ {
+ "prop": "emptyText",
+ "type": "String",
+ "description": "The value of the empty-text prop"
+ },
+ {
+ "prop": "emptyHtml",
+ "type": "String",
+ "description": "The value of the empty-html prop"
+ },
+ {
+ "prop": "emptyFilteredText",
+ "type": "String",
+ "description": "The value of the empty-filtered-text prop"
+ },
+ {
+ "prop": "emptyFilteredHtml",
+ "type": "String",
+ "description": "The value of the empty-filtered-html prop"
+ }
+ ]
},
{
"name": "emptyfiltered",
- "description": "Content to display when no items are present in the filtered `items` array (optionally scoped: see docs for details)"
+ "description": "Content to display when no items are present in the filtered `items` array. Optionally scoped",
+ "scope": [
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "items",
+ "type": "Array",
+ "description": "The items array. Exposed here to check null vs []"
+ },
+ {
+ "prop": "emptyText",
+ "type": "String",
+ "description": "The value of the empty-text prop"
+ },
+ {
+ "prop": "emptyHtml",
+ "type": "String",
+ "description": "The value of the empty-html prop"
+ },
+ {
+ "prop": "emptyFilteredText",
+ "type": "String",
+ "description": "The value of the empty-filtered-text prop"
+ },
+ {
+ "prop": "emptyFilteredHtml",
+ "type": "String",
+ "description": "The value of the empty-filtered-html prop"
+ }
+ ]
},
{
"name": "thead-top",
- "description": "Slot above the column headers in the `thead` element for user-supplied B-TR's with B-TH/B-TD (optionally scoped: columns - number of TDs to provide, fields - array of field definition objects)"
+ "description": "Slot above the column headers in the `thead` element for user-supplied B-TR's with B-TH/B-TD. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ }
+ ]
},
{
"name": "top-row",
- "description": "Fixed top row slot for user supplied B-TD cells (Optionally scoped: columns - number of B-TDs to provide, fields - array of field definition objects)"
+ "description": "Fixed top row slot for user supplied B-TD cells. Optionally scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ }
+ ]
},
{
"name": "bottom-row",
- "description": "Fixed bottom row slot for user supplied B-TD cells (Optionally Scoped: columns - number of B-TDs to provide, fields - array of field definition objects)"
+ "description": "Fixed bottom row slot for user supplied B-TD cells. Optionally Scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ }
+ ]
},
{
"name": "custom-foot",
- "description": "Custom footer content slot for user supplied B-TR, B-TH, B-TD (Optionally Scoped: columns - number columns, fields - array of field definition objects, items - array of currently displayed row items)"
+ "description": "Custom footer content slot for user supplied B-TR, B-TH, B-TD. Optionally Scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "items",
+ "type": "Array",
+ "description": "Array of items that are currently being displayed"
+ }
+ ]
}
]
},
@@ -275,14 +651,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -293,14 +672,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being double clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being double clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -311,14 +693,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being middle clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being middle clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -329,14 +714,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being right clicked."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being right clicked."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -347,14 +735,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being hovered."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being hovered."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -365,14 +756,17 @@
"args": [
{
"arg": "item",
+ "type": "Object",
"description": "Item data of the row being unhovered."
},
{
"arg": "index",
+ "type": "Number",
"description": "Index of the row being unhovered."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
}
]
@@ -383,18 +777,22 @@
"args": [
{
"arg": "key",
+ "type": "String",
"description": "Column key clicked (field name)."
},
{
"arg": "field",
+ "type": "Object",
"description": "Field definition object."
},
{
"arg": "event",
+ "type": "MouseEvent",
"description": "Native event object."
},
{
"arg": "isFooter",
+ "type": "Boolean",
"description": "'True' if this event originated from clicking on the footer cell"
}
]
@@ -403,27 +801,165 @@
"slots": [
{
"name": "cell(key)",
- "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name. See docs for scoped data"
+ "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name.",
+ "scope": [
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The row's index (zero-based) with respect to the displayed rows"
+ },
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The row's item data object"
+ },
+ {
+ "prop": "value",
+ "description": "The value for this key in the record (null or undefined if a virtual column), or the output of the field's formatter function"
+ },
+ {
+ "prop": "unformatted",
+ "description": "The raw value for this key in the item record (null or undefined if a virtual column), before being passed to the field's formatter function"
+ },
+ {
+ "prop": "detailsShowing",
+ "type": "Boolean",
+ "description": "Will be true if the row's row-details scoped slot is visible"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Can be called to toggle the visibility of the rows row-details scoped slot"
+ }
+ ]
},
{
"name": "cell()",
- "description": "Default scoped slot for custom data rendering of field data. See docs for scoped data"
+ "description": "Default scoped slot for custom data rendering of field data.",
+ "scope": [
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The row's index (zero-based) with respect to the displayed rows"
+ },
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The row's item data object"
+ },
+ {
+ "prop": "value",
+ "description": "The value for this key in the record (null or undefined if a virtual column), or the output of the field's formatter function"
+ },
+ {
+ "prop": "unformatted",
+ "description": "The raw value for this key in the item record (null or undefined if a virtual column), before being passed to the field's formatter function"
+ },
+ {
+ "prop": "detailsShowing",
+ "type": "Boolean",
+ "description": "Will be true if the row's row-details scoped slot is visible"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Can be called to toggle the visibility of the rows row-details scoped slot"
+ }
+ ]
},
{
"name": "head(key)",
- "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name. See docs for scoped header"
+ "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "isFoot",
+ "type": "Boolean",
+ "description": "Will be true if the slot is being rendered in the table footer"
+ }
+ ]
},
{
"name": "head()",
- "description": "Default scoped slot for custom rendering of field header. See docs for scoped header"
+ "description": "Default scoped slot for custom rendering of field header.",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ },
+ {
+ "prop": "isFoot",
+ "type": "Boolean",
+ "description": "Will be true if the slot is being rendered in the table footer"
+ }
+ ]
},
{
"name": "foot(key)",
- "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name. See docs for scoped footer"
+ "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name.",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ }
+ ]
},
{
"name": "foot()",
- "description": "Default scoped slot for custom rendering of field footer. See docs for scoped footer"
+ "description": "Default scoped slot for custom rendering of field footer",
+ "scope": [
+ {
+ "prop": "column",
+ "type": "String",
+ "description": "The fields's key value"
+ },
+ {
+ "prop": "field",
+ "type": "Object",
+ "description": "the field's definition object (from the fields prop)"
+ },
+ {
+ "prop": "label",
+ "type": "String",
+ "description": "The fields label value"
+ }
+ ]
},
{
"name": "table-caption",
@@ -431,19 +967,92 @@
},
{
"name": "table-colgroup",
- "description": "Slot to place custom colgroup and col elements (optionally scoped: columns - number of columns, fields - array of field definition objects)"
+ "description": "Slot to place custom colgroup and col elements. Optionally scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "Array of field definition objects"
+ }
+ ]
},
{
"name": "row-details",
- "description": "Scoped slot for optional rendering additional record details. See docs for Row details support"
+ "description": "Scoped slot for optional rendering additional record details. See docs for Row details support",
+ "scope": [
+ {
+ "prop": "item",
+ "type": "Object",
+ "description": "The entire row's record data object"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "The item's row index number (with respect to the displayed item rows)"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "toggleDetails",
+ "type": "Function",
+ "description": "Function to toggle visibility of the row's details slot"
+ }
+ ]
},
{
"name": "thead-top",
- "description": "Slot above the column headers in the `thead` element for user-supplied B-TR with B-TH/B-TD (optionally scoped: columns - number of TDs to provide, fields - array of field definition objects)"
+ "description": "Slot above the column headers in the `thead` element for user-supplied B-TR with B-TH/B-TD. Optionally scoped.",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "selectAllRows",
+ "type": "Function",
+ "description": "Select all rows (applicable if the table is in selectable mode)"
+ },
+ {
+ "prop": "clearSelected",
+ "type": "Function",
+ "description": "Unselect all rows (applicable if the table is in selectable mode)"
+ }
+ ]
},
{
"name": "custom-foot",
- "description": "Custom footer content slot for user supplied B-TR's with B-TH/B-TD (Optionally Scoped: columns - number columns, fields - array of field definition objects, items - array of currently displayed row items)"
+ "description": "Custom footer content slot for user supplied B-TR's with B-TH/B-TD. Optionally Scoped",
+ "scope": [
+ {
+ "prop": "columns",
+ "type": "Number",
+ "description": "the number of columns in the table"
+ },
+ {
+ "prop": "fields",
+ "type": "Array",
+ "description": "The normalized fields definition array (in the array of objects format)"
+ },
+ {
+ "prop": "items",
+ "type": "Array",
+ "description": "Array of items that are currently being displayed"
+ }
+ ]
}
]
},
From d1e53982346c18c8b42e1de2a2a45445fd48d8bd Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 00:04:59 -0300
Subject: [PATCH 033/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 2d335f57c0a..8a488883518 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -108,6 +108,20 @@
{{ value }}
+
+ Scope
+
+
+
+
+ {{ value }}
+
+
+ {{ value }}
+ Any
+
+
+
@@ -262,7 +276,16 @@ export default {
]
},
slotsFields() {
- return [{ key: 'name', label: 'Slot' }, { key: 'description', label: 'Description' }]
+ const fields = [
+ { key: 'name', label: 'Slot Name' },
+ { key: 'description', label: 'Description' }
+ ]
+ if (this.slots.length > 0 && this.slots.some(s => s.scope)) {
+ fields.push({
+ key: 'scoped', label: 'Scoped'
+ })
+ }
+ return fields
},
propsItems() {
const props = this.componentProps
From 777833f4e934b0582260d568bddf3cae742dd967 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 00:12:44 -0300
Subject: [PATCH 034/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 8a488883518..ed1074fea6b 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -108,7 +108,7 @@
{{ value }}
-
+
Scope
@@ -121,7 +121,7 @@
Any
-
+
@@ -281,9 +281,7 @@ export default {
{ key: 'description', label: 'Description' }
]
if (this.slots.length > 0 && this.slots.some(s => s.scope)) {
- fields.push({
- key: 'scoped', label: 'Scoped'
- })
+ fields.push({ key: 'scope', label: 'Scoped' })
}
return fields
},
From c1b3b8437e22161cabddbd2aa6ba2cf7d6ee94d0 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 00:24:41 -0300
Subject: [PATCH 035/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index ed1074fea6b..1e8bdf812c5 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -109,18 +109,23 @@
{{ value }}
- Scope
+ Scope
-
+
{{ value }}
- {{ value }}
+ {{ value }}
Any
-
+
From 52831b212dcb00c65b3ff46025f5a92e85d56f92 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 00:34:27 -0300
Subject: [PATCH 036/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 1e8bdf812c5..d61a3514735 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -97,7 +97,7 @@
Slots
From 2f3d566243199d1a4b6b6d48a648959f50d54e29 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 00:55:58 -0300
Subject: [PATCH 037/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index d61a3514735..436ffbdbc3d 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -46,8 +46,6 @@
:fields="propsFields"
class="bv-docs-table"
responsive="sm"
- head-variant="default"
- bordered
striped
>
@@ -78,8 +76,6 @@
:fields="[{ key: 'prop', label: 'Property' }, 'event']"
class="bv-docs-table"
responsive="sm"
- head-variant="default"
- bordered
striped
>
@@ -101,8 +97,6 @@
:fields="slotsFields"
class="bv-docs-table"
responsive="sm"
- head-variant="default"
- bordered
striped
>
@@ -116,11 +110,13 @@
v-if="item.scope"
:items="item.scope"
:fields="['prop', 'type', 'description']"
+ class="mb-0"
striped
+ dark
small
>
- {{ value }}
+ {{ value }}
{{ value }}
@@ -140,8 +136,6 @@
:fields="eventsFields"
class="bv-docs-table"
responsive="sm"
- head-variant="default"
- bordered
striped
>
@@ -175,8 +169,6 @@
:fields="rootEventListenersFields"
class="bv-docs-table"
responsive="sm"
- head-variant="default"
- bordered
striped
>
From 11ce688574164a68a7c802bea32b7b2e9bfcce71 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:03:53 -0300
Subject: [PATCH 038/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 436ffbdbc3d..9eea9b514b5 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -103,7 +103,7 @@
{{ value }}
- Scope
+ Scope
Date: Wed, 18 Sep 2019 01:15:09 -0300
Subject: [PATCH 039/348] Update styles.scss
---
docs/assets/scss/styles.scss | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/assets/scss/styles.scss b/docs/assets/scss/styles.scss
index d0c84fc4ad7..f282b948a59 100644
--- a/docs/assets/scss/styles.scss
+++ b/docs/assets/scss/styles.scss
@@ -201,15 +201,21 @@ pre.editable {
}
// Additional styling for (responsive) markdown tables
-.bv-docs-table {
+t.bv-docs-table {
font-size: 90%;
- th,
- td {
- padding: 0.5rem;
+ > thead,
+ > tbody,
+ > tfoot {
+ > tr {
+ th,
+ td {
+ padding: 0.5rem;
+ }
+ }
}
- thead > tr > th {
+ > thead > tr > th {
min-width: 80px;
}
From 36ca4554833ee18d0bd0be8082b7668de9b5a184 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:23:26 -0300
Subject: [PATCH 040/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 9eea9b514b5..bc2251d62a1 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -44,7 +44,7 @@
@@ -74,7 +74,7 @@
@@ -95,7 +95,7 @@
@@ -134,7 +134,7 @@
@@ -167,7 +167,7 @@
From da104bfd8eff6a06159b278c2a5ec3a88515ddd5 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:26:12 -0300
Subject: [PATCH 041/348] Update styles.scss
---
docs/assets/scss/styles.scss | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/assets/scss/styles.scss b/docs/assets/scss/styles.scss
index f282b948a59..b55563c30bd 100644
--- a/docs/assets/scss/styles.scss
+++ b/docs/assets/scss/styles.scss
@@ -201,15 +201,15 @@ pre.editable {
}
// Additional styling for (responsive) markdown tables
-t.bv-docs-table {
+.bv-docs-table {
font-size: 90%;
> thead,
> tbody,
> tfoot {
> tr {
- th,
- td {
+ > th,
+ > td {
padding: 0.5rem;
}
}
From 0bed4dd93dc67aba4f7c832a0918607bc5335501 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:30:08 -0300
Subject: [PATCH 042/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 36 +++++++++++++++++---------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index bc2251d62a1..fdb1970c49e 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -106,23 +106,25 @@
Scope
-
-
- {{ value }}
-
-
- {{ value }}
- Any
-
-
+
+
+
+ {{ value }}
+
+
+ {{ value }}
+ Any
+
+
+
From 808f324c44fb7089be6d03ccf532edf32a92e14a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:31:39 -0300
Subject: [PATCH 043/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index fdb1970c49e..a112ec9c32f 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -110,7 +110,7 @@
Date: Wed, 18 Sep 2019 01:35:58 -0300
Subject: [PATCH 044/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index a112ec9c32f..4465eb1c177 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -103,7 +103,15 @@
{{ value }}
- Scope
+
+ Scope
+
From 0c854ae420dc105171ec777287530513687bc87e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:50:38 -0300
Subject: [PATCH 045/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 4465eb1c177..9a4f4212350 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -100,7 +100,7 @@
striped
>
- {{ value }}
+ {{ value }}
- {{ value }}
+ {{ value }}
- {{ value }}
+ {{ value }}
Any
From d70aeb03a79c963b09fb8cfd7f9a5de9d318b498 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 01:51:12 -0300
Subject: [PATCH 046/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 9a4f4212350..2be1a21c814 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -125,7 +125,7 @@
small
>
- {{ value }}
+ {{ value }}
{{ value }}
From 96d11c417fbe73d9dd64ac1fa06c0d12c529310e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 13:15:16 -0300
Subject: [PATCH 047/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 2be1a21c814..e9272afdbfc 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -123,7 +123,13 @@
head-variant="dark"
striped
small
+ caption-top
>
+
+ Slot
+ {{ item.name }}
+ scoped properties
+
{{ value }}
From aa52fa3d2eca943b39343fa71aac8434874935ba Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 13:32:04 -0300
Subject: [PATCH 048/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index e9272afdbfc..96bea340704 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -125,10 +125,16 @@
small
caption-top
>
-
- Slot
- {{ item.name }}
- scoped properties
+
+
+
+ Slot
+
+ {{ item.name }}
+
+ scoped properties
+
+
{{ value }}
From 3e3c9fb0936e72b48ac3b33df6a959a50a2c7193 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 13:34:32 -0300
Subject: [PATCH 049/348] Update package.json
---
src/components/progress/package.json | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/components/progress/package.json b/src/components/progress/package.json
index bdd6217ac3d..773702b791d 100644
--- a/src/components/progress/package.json
+++ b/src/components/progress/package.json
@@ -5,8 +5,12 @@
"title": "Progress",
"description": "A custom progress component for displaying simple or complex progress bars, featuring support for horizontally stacked bars, animated backgrounds, and text labels.",
"components": [
- "BProgress",
- "BProgressBar"
+ {
+ "component": "BProgress"
+ },
+ {
+ "component": "BProgressBar"
+ }
]
}
}
From fe6ed2bada507e6146e7ebc978472b46f0e4773a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 13:38:20 -0300
Subject: [PATCH 050/348] Update package.json
---
src/components/popover/package.json | 48 +++++++++++++++++++++++------
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/src/components/popover/package.json b/src/components/popover/package.json
index 0c8db929d60..575f92e6890 100644
--- a/src/components/popover/package.json
+++ b/src/components/popover/package.json
@@ -17,6 +17,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -27,7 +28,8 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
},
@@ -37,6 +39,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -47,17 +50,32 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
},
{
"event": "enabled",
- "description": "Emitted when popover becomes enabled"
+ "description": "Emitted when popover becomes enabled",
+ "args": [
+ {
+ "arg": "bvEvent",
+ "type": "BvEvent",
+ "description": "bvEvent object"
+ }
+ ]
},
{
"event": "disabled",
- "description": "Emitted when popover becomes disabled"
+ "description": "Emitted when popover becomes disabled",
+ "args": [
+ {
+ "arg": "bvEvent",
+ "type": "BvEvent",
+ "description": "bvEvent object"
+ }
+ ]
},
{
"event": "bv::popover::show",
@@ -65,6 +83,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -75,7 +94,8 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
},
@@ -85,6 +105,7 @@
"args": [
{
"arg": "bvEvent",
+ "type": "BvEvent",
"description": "bvEvent object"
}
]
@@ -95,7 +116,8 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
},
@@ -105,7 +127,8 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
},
@@ -115,7 +138,8 @@
"args": [
{
"arg": "bvEvent",
- "description": "bvEvent object."
+ "type": "BvEvent",
+ "description": "bvEvent object"
}
]
}
@@ -127,6 +151,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), popover id to hide"
}
]
@@ -137,6 +162,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), popover id to show"
}
]
@@ -147,6 +173,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), popover id to disable"
}
]
@@ -157,6 +184,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "(optional), popover id to enable"
}
]
@@ -165,11 +193,11 @@
"slots": [
{
"name": "title",
- "description": "Optional slot for title (HTML supported)"
+ "description": "Optional slot for title (HTML/components supported)"
},
{
"name": "default",
- "description": "Slot for content (HTML supported)"
+ "description": "Slot for content (HTML/components supported)"
}
]
}
From 96ecd0520f0e7cc6138d998ae72105968a6166e0 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:04:23 -0300
Subject: [PATCH 051/348] Update package.json
---
src/components/pagination/package.json | 107 +++++++++++++++++++++++--
1 file changed, 102 insertions(+), 5 deletions(-)
diff --git a/src/components/pagination/package.json b/src/components/pagination/package.json
index e9efd29de50..379e1279b72 100644
--- a/src/components/pagination/package.json
+++ b/src/components/pagination/package.json
@@ -14,6 +14,7 @@
"args": [
{
"arg": "page",
+ "type": "Number",
"description": "Selected page number (starting with 1)"
}
]
@@ -24,6 +25,7 @@
"args": [
{
"arg": "page",
+ "type": "Number",
"description": "Selected page number (starting with 1)"
}
]
@@ -32,19 +34,87 @@
"slots": [
{
"name": "first-text",
- "description": "The \"go to first page\" button content. Optionally scoped"
+ "description": "The \"go to first page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "prev-text",
- "description": "The \"go to previous page\" button content. Optionally scoped"
+ "description": "The \"go to previous page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "next-text",
- "description": "The \"go to next page\" button content. Optionally scoped"
+ "description": "The \"go to next page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "last-text",
- "description": "The \"go to last page\" button content. Optionally scoped"
+ "description": "The \"go to last page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "ellipsis-text",
@@ -52,7 +122,34 @@
},
{
"name": "page",
- "description": "Page number button content. Always scoped"
+ "description": "Page number button content. Always scoped",
+ "scope": [
+ {
+ "prop": "active",
+ "type": "Boolean",
+ "description": "If the page is the active page"
+ },
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ },
+ {
+ "prop": "content",
+ "type": "String",
+ "description": "Default button content"
+ }
+ ]
}
]
}
From c9d18e4a8577bc9cae1712b3e68d9abb09997c4c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:05:16 -0300
Subject: [PATCH 052/348] Update package.json
---
src/components/pagination-nav/package.json | 107 +++++++++++++++++++--
1 file changed, 101 insertions(+), 6 deletions(-)
diff --git a/src/components/pagination-nav/package.json b/src/components/pagination-nav/package.json
index a7fbb868549..5129a00d9a4 100644
--- a/src/components/pagination-nav/package.json
+++ b/src/components/pagination-nav/package.json
@@ -32,27 +32,122 @@
"slots": [
{
"name": "first-text",
- "description": "The \"go to first page\" button text. Optionally scoped"
+ "description": "The \"go to first page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "prev-text",
- "description": "The \"go to previous page\" button text. Optionally scoped"
+ "description": "The \"go to previous page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "next-text",
- "description": "The \"go to next page\" button text. Optionally scoped"
+ "description": "The \"go to next page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "last-text",
- "description": "The \"go to last page\" button text. Optionally scoped"
+ "description": "The \"go to last page\" button content. Optionally scoped",
+ "scope": [
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ }
+ ]
},
{
"name": "ellipsis-text",
- "description": "The '...' indicator text. Not scoped"
+ "description": "The '...' indicator content. Not scoped"
},
{
"name": "page",
- "description": "The page number button button content. Always scoped"
+ "description": "Page number button content. Always scoped",
+ "scope": [
+ {
+ "prop": "active",
+ "type": "Boolean",
+ "description": "If the page is the active page"
+ },
+ {
+ "prop": "disabled",
+ "type": "Boolean",
+ "description": "Will be true if this button is disabled (non-clickable)"
+ },
+ {
+ "prop": "page",
+ "type": "Number",
+ "description": "Page number (from 1 to numberOfPages)"
+ },
+ {
+ "prop": "index",
+ "type": "Number",
+ "description": "Page number (indexed from 0 to numberOfPages -1)"
+ },
+ {
+ "prop": "content",
+ "type": "String",
+ "description": "Default button content, or the result of the page-gen function"
+ }
+ ]
}
]
}
From 230ac1c980b89347740ed9f876a9b7e476853f1d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:05:41 -0300
Subject: [PATCH 053/348] Update README.md
---
src/components/pagination-nav/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/pagination-nav/README.md b/src/components/pagination-nav/README.md
index 726e1c5ff42..809068b95dc 100644
--- a/src/components/pagination-nav/README.md
+++ b/src/components/pagination-nav/README.md
@@ -311,7 +311,7 @@ The slot `page` is always scoped, while the slots `first-text`, `prev-text`, `ne
| `index` | Number | Page number (indexed from `0` to `numberOfPages -1`) |
| `active` | Boolean | If the page is the active page |
| `disabled` | Boolean | If the page button is disabled |
-| `content` | String | default content, or the result of the `link-gen` function |
+| `content` | String | default content, or the result of the `page-gen` function |
**Scoped variables properties available to the `first-text`, `prev-text`, `next-text` and
`last-text` slots:**
From 45d23fa10ab1c6fd5c40efbf033783f8a22dc68a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:13:20 -0300
Subject: [PATCH 054/348] Update package.json
---
src/components/navbar/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/navbar/package.json b/src/components/navbar/package.json
index 7020c5b2c8a..16352c79e19 100644
--- a/src/components/navbar/package.json
+++ b/src/components/navbar/package.json
@@ -25,6 +25,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
From f6c24da02be07d6d43d55c5ce39836fa82d7ed4e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:18:03 -0300
Subject: [PATCH 055/348] Update package.json
---
src/components/nav/package.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/components/nav/package.json b/src/components/nav/package.json
index 8ae50a016aa..e08d594fd3d 100644
--- a/src/components/nav/package.json
+++ b/src/components/nav/package.json
@@ -23,6 +23,17 @@
{
"name": "button-content",
"description": "Can be used to implement custom text with icons and more styling."
+ },
+ {
+ "name": "default",
+ "description": "Optionally scoped default slot for dropdown menu content.",
+ "scope": [
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Can be used to close the dropdown menu. Accepts an optional boolean argument, which if true returns focus to the toggle button."
+ }
+ ]
}
],
"events": [
@@ -32,6 +43,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel show."
}
]
@@ -46,6 +58,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel hide."
}
]
From 72d63c61e816559116d03dc7aea4e886a784ff80 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:21:48 -0300
Subject: [PATCH 056/348] Update package.json
---
src/components/link/package.json | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/components/link/package.json b/src/components/link/package.json
index be840293a20..a5134e7c87f 100644
--- a/src/components/link/package.json
+++ b/src/components/link/package.json
@@ -10,7 +10,14 @@
"events": [
{
"event": "click",
- "description": "when link clicked"
+ "description": "when link clicked",
+ "args": [
+ {
+ "name": "event",
+ "type": "MouseEvent",
+ "description": "Native click event"
+ }
+ ]
}
]
}
From 82cd52b7c586abbad1b7f3323d395b4b37e1f72a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:27:10 -0300
Subject: [PATCH 057/348] Update package.json
---
src/components/form/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/form/package.json b/src/components/form/package.json
index 5d80eaa0479..af721083384 100644
--- a/src/components/form/package.json
+++ b/src/components/form/package.json
@@ -15,6 +15,7 @@
"args": [
{
"arg": "event",
+ "type": "Event",
"description": "Native submit event."
}
]
From 7b3f6df0fa59c8e29d8b15cb155b18bec583453b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:29:34 -0300
Subject: [PATCH 058/348] Update package.json
---
src/components/form-textarea/package.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/components/form-textarea/package.json b/src/components/form-textarea/package.json
index 3d12305ec9f..a070bc442d7 100644
--- a/src/components/form-textarea/package.json
+++ b/src/components/form-textarea/package.json
@@ -17,6 +17,7 @@
"args": [
{
"arg": "value",
+ "type": "String",
"description": "Current value of textarea"
}
]
@@ -27,6 +28,7 @@
"args": [
{
"arg": "value",
+ "type": "String",
"description": "Current value of the textarea"
}
]
@@ -37,6 +39,7 @@
"args": [
{
"arg": "value",
+ "type": "String",
"description": "Value of textarea, after any formatting. Not emitted if the value does nto change"
}
]
@@ -47,7 +50,8 @@
"args": [
{
"arg": "event",
- "description": "Native blur event (before any formatting)"
+ "type": "FocusEvent",
+ "description": "Native blur event (before any optional formatting occurs)"
}
]
}
From 6322a443bed5a4b211cdbcf4148e982d7b696011 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:35:35 -0300
Subject: [PATCH 059/348] Update package.json
---
src/components/form-select/package.json | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/components/form-select/package.json b/src/components/form-select/package.json
index 4fbbe10cc3e..878b5b4bf45 100644
--- a/src/components/form-select/package.json
+++ b/src/components/form-select/package.json
@@ -23,7 +23,13 @@
"args": [
{
"arg": "value",
- "description": "current selected value of the select."
+ "type": [
+ "String",
+ "Number",
+ "Object",
+ "Array"
+ ],
+ "description": "current selected value(s) of the select."
}
]
},
@@ -33,7 +39,13 @@
"args": [
{
"arg": "value",
- "description": "current selected value of the select."
+ "type": [
+ "String",
+ "Number",
+ "Object",
+ "Array"
+ ],
+ "description": "current selected value(s) of the select."
}
]
}
From abf30ea143bdcfa0db3805f0786f44abf3397920 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:37:34 -0300
Subject: [PATCH 060/348] Update package.json
---
src/components/form-radio/package.json | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/components/form-radio/package.json b/src/components/form-radio/package.json
index d38e2bcb4bc..ba8b2855fff 100644
--- a/src/components/form-radio/package.json
+++ b/src/components/form-radio/package.json
@@ -23,6 +23,11 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "String",
+ "Number",
+ "Object"
+ ],
"description": "current selected Value of radio group."
}
]
@@ -33,6 +38,11 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "String",
+ "Number",
+ "Object"
+ ],
"description": "current selected Value of radio group."
}
]
@@ -51,6 +61,11 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "String",
+ "Number",
+ "Object"
+ ],
"description": "current selected Value of radio group."
}
]
@@ -61,6 +76,11 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "String",
+ "Number",
+ "Object"
+ ],
"description": "current selected Value of radio group."
}
]
From 9c1f981a202be7c1e9e1c8459729bee539dc6970 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:39:53 -0300
Subject: [PATCH 061/348] Update package.json
---
src/components/form-input/package.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/components/form-input/package.json b/src/components/form-input/package.json
index 7b428efe5de..de9b5442ca3 100644
--- a/src/components/form-input/package.json
+++ b/src/components/form-input/package.json
@@ -17,6 +17,10 @@
"args": [
{
"arg": "value",
+ "type": [
+ "String",
+ "Number"
+ ],
"description": "Current value of input"
}
]
@@ -27,6 +31,10 @@
"args": [
{
"arg": "value",
+ "type": [
+ "String",
+ "Number"
+ ],
"description": "Current value of input"
}
]
@@ -37,6 +45,10 @@
"args": [
{
"arg": "value",
+ "type": [
+ "String",
+ "Number"
+ ],
"description": "Value of input, after any formatting. Not emitted if the value does not change"
}
]
@@ -47,6 +59,7 @@
"args": [
{
"arg": "event",
+ "type": "FocusEvent",
"description": "Native blur event (before any formatting)"
}
]
From 92b1a3cb572ccf0b2dd19f7460079977ea89f758 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:47:55 -0300
Subject: [PATCH 062/348] Update package.json
---
src/components/form-file/package.json | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/components/form-file/package.json b/src/components/form-file/package.json
index 760895bd0d3..1401bbeeb72 100644
--- a/src/components/form-file/package.json
+++ b/src/components/form-file/package.json
@@ -13,7 +13,18 @@
"slots": [
{
"name": "file-name",
- "description": "Scoped slot for formatting the file names. Scoped props: files - array of File objects, names: array of file names"
+ "description": "Scoped slot for formatting the file names",
+ "scope": [
+ {
+ "prop": "files",
+ "type": "Array",
+ "descripton": "Array if File objects"
+ },
+ {
+ "prop": "names",
+ "type": "Array",
+ "decription": "Array of file names (strings)"
+ ]
}
],
"events": [
@@ -23,12 +34,24 @@
"args": [
{
"arg": "event"
+ "type": "Event",
+ "description": "Native change event object"
}
]
},
{
"event": "input",
- "description": "[see above docs]"
+ "description": "Updates the v-model value (see docs for more details)",
+ "args": [
+ {
+ "arg": "file",
+ "type": [
+ "File",
+ "Array"
+ ],
+ "description": "Will be a single File object in single mode or an array of File objects in multiple mode"
+ }
+ ]
}
]
}
From 4991f1827f624d8c222b4057591bd0aeb9f0e531 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:48:43 -0300
Subject: [PATCH 063/348] Update package.json
---
src/components/form-file/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/form-file/package.json b/src/components/form-file/package.json
index 1401bbeeb72..22f4d176519 100644
--- a/src/components/form-file/package.json
+++ b/src/components/form-file/package.json
@@ -24,6 +24,7 @@
"prop": "names",
"type": "Array",
"decription": "Array of file names (strings)"
+ }
]
}
],
From d7d3b30d31a3fb64a903bafbd135b5f725cd7b50 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:51:05 -0300
Subject: [PATCH 064/348] Update package.json
---
src/components/form-checkbox/package.json | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/components/form-checkbox/package.json b/src/components/form-checkbox/package.json
index 78fee753a87..7cbf647e909 100644
--- a/src/components/form-checkbox/package.json
+++ b/src/components/form-checkbox/package.json
@@ -24,6 +24,7 @@
"args": [
{
"arg": "checked",
+ "type": "Array",
"description": "Value of checkboxes. Value will be an array."
}
]
@@ -34,6 +35,7 @@
"args": [
{
"arg": "checked",
+ "type": "Array",
"description": "Value of checkboxes. Value will be an array."
}
]
@@ -53,6 +55,13 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "Boolean",
+ "String",
+ "Number",
+ "Object",
+ "Array"
+ ],
"description": "Value of checkbox(es). When bound to multiple checkboxes, value will be an array."
}
]
@@ -63,6 +72,13 @@
"args": [
{
"arg": "checked",
+ "type": [
+ "Boolean",
+ "String",
+ "Number",
+ "Object",
+ "Array"
+ ],
"description": "Value of checkbox(es). When bound to multiple checkboxes, value will be an array."
}
]
From 37ee0fa4d69d6c372eec5629fb771b6055588312 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:51:44 -0300
Subject: [PATCH 065/348] Update package.json
---
src/components/form-radio/package.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/form-radio/package.json b/src/components/form-radio/package.json
index ba8b2855fff..1a7de5ac171 100644
--- a/src/components/form-radio/package.json
+++ b/src/components/form-radio/package.json
@@ -24,6 +24,7 @@
{
"arg": "checked",
"type": [
+ "Boolean",
"String",
"Number",
"Object"
@@ -39,6 +40,7 @@
{
"arg": "checked",
"type": [
+ "Boolean",
"String",
"Number",
"Object"
@@ -62,6 +64,7 @@
{
"arg": "checked",
"type": [
+ "Boolean",
"String",
"Number",
"Object"
@@ -77,6 +80,7 @@
{
"arg": "checked",
"type": [
+ "Boolean",
"String",
"Number",
"Object"
From dc8938413bfd924be3e43bca6ab32b5c04c8bec5 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 15:59:18 -0300
Subject: [PATCH 066/348] Update package.json
---
src/components/dropdown/package.json | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/components/dropdown/package.json b/src/components/dropdown/package.json
index 3eb7e9f9db0..7f6846fc4d9 100644
--- a/src/components/dropdown/package.json
+++ b/src/components/dropdown/package.json
@@ -17,6 +17,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel show."
}
]
@@ -31,6 +32,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel hide."
}
]
@@ -45,7 +47,14 @@
},
{
"event": "click",
- "description": "Emitted when split button is clicked in split mode."
+ "description": "Emitted when split button is clicked in split mode.",
+ "args": [
+ {
+ "arg": "event",
+ "type": "MouseEvent",
+ "description": "Native click event object"
+ }
+ ]
},
{
"event": "bv::dropdown::show",
@@ -53,6 +62,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel show."
}
]
@@ -63,6 +73,7 @@
"args": [
{
"arg": "bvEvt",
+ "type": "BvEvent",
"description": "BvEvent object. Call bvEvt.preventDefault() to cancel hide."
}
]
@@ -72,6 +83,17 @@
{
"name": "button-content",
"description": "Can be used to implement custom text with icons and more styling."
+ },
+ {
+ "name": "default",
+ "description": "Optionally scoped default slot for dropdown menu content",
+ "scope": [
+ {
+ "prop": "hide",
+ "type": "Function",
+ "description": "Can be used to close the dropdown menu. Accepts an optional boolean argument, which if true returns focus to the toggle button."
+ }
+ ]
}
]
},
@@ -87,6 +109,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
@@ -107,6 +130,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
From c51acc197da050fbc6a0e7874766c9b7b06dfc62 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:00:01 -0300
Subject: [PATCH 067/348] Update package.json
---
src/components/form-file/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/form-file/package.json b/src/components/form-file/package.json
index 22f4d176519..fa5a6060c55 100644
--- a/src/components/form-file/package.json
+++ b/src/components/form-file/package.json
@@ -34,7 +34,7 @@
"description": "original native change event on input",
"args": [
{
- "arg": "event"
+ "arg": "event",
"type": "Event",
"description": "Native change event object"
}
From 9bf8b328b19e37151a56b8f6570d1305440eb85c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:05:54 -0300
Subject: [PATCH 068/348] Update package.json
---
src/components/collapse/package.json | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json
index 76c66af0f79..b345700b8ef 100644
--- a/src/components/collapse/package.json
+++ b/src/components/collapse/package.json
@@ -11,6 +11,17 @@
{
"component": "BCollapse",
"events": [
+ {
+ "event": "input",
+ "description": "Used to update the v-model",
+ "args": [
+ {
+ "arg": "visible",
+ "type": "Boolean",
+ "description": "Will be true if the collapse is visible"
+ }
+ ]
+ },
{
"event": "show",
"description": "Emitted when collapse has started to open"
@@ -33,11 +44,13 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "changed state collapse id"
},
{
"arg": "state",
- "description": "true/false, i.e. opened/closed"
+ "type": "Boolean",
+ "description": "true or false, i.e. opened or closed"
}
]
}
@@ -49,6 +62,7 @@
"args": [
{
"arg": "id",
+ "type": "String",
"description": "collapse id to toggle"
}
]
From a0e5dac314fee83f6627a375c33b76605943c458 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:08:41 -0300
Subject: [PATCH 069/348] Update package.json
---
src/components/carousel/package.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/carousel/package.json b/src/components/carousel/package.json
index 60ed915ee3f..86b82f4b80b 100644
--- a/src/components/carousel/package.json
+++ b/src/components/carousel/package.json
@@ -7,6 +7,7 @@
"components": [
{
"component": "BCarousel",
+ "description": "The component is a slideshow for cycling through a series of content",
"events": [
{
"event": "sliding-start",
@@ -14,6 +15,7 @@
"args": [
{
"arg": "slide",
+ "type": "Number",
"description": "Slide number that is being slid to."
}
]
@@ -24,6 +26,7 @@
"args": [
{
"arg": "slide",
+ "type": "Number",
"description": "Slide number that was slid to."
}
]
@@ -32,6 +35,7 @@
},
{
"component": "BCarouselSlide",
+ "description": "The component is a slide to be placed in the ",
"slots": [
{
"name": "img",
From cb1b8ed4eb547022d7f548c99b004cb27abed1fd Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:09:24 -0300
Subject: [PATCH 070/348] Update package.json
---
src/components/carousel/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/carousel/package.json b/src/components/carousel/package.json
index 86b82f4b80b..f137b9707e5 100644
--- a/src/components/carousel/package.json
+++ b/src/components/carousel/package.json
@@ -7,7 +7,7 @@
"components": [
{
"component": "BCarousel",
- "description": "The component is a slideshow for cycling through a series of content",
+ "description": "The component is a slideshow for cycling through a series of slide content",
"events": [
{
"event": "sliding-start",
From 258855a9b63ab2621aa2e3497b3f608ea9245a49 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:11:27 -0300
Subject: [PATCH 071/348] Update package.json
---
src/components/button/package.json | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/components/button/package.json b/src/components/button/package.json
index e2322d6b806..a6fb8114c93 100644
--- a/src/components/button/package.json
+++ b/src/components/button/package.json
@@ -17,6 +17,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
@@ -35,6 +36,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
From 1441aee74e1b02de3441fcf8ecdd580a4cc04b63 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:12:23 -0300
Subject: [PATCH 072/348] Update package.json
---
src/components/button-toolbar/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/button-toolbar/package.json b/src/components/button-toolbar/package.json
index f0c3578d716..d63b0f85f41 100644
--- a/src/components/button-toolbar/package.json
+++ b/src/components/button-toolbar/package.json
@@ -7,6 +7,7 @@
"components": [
{
"component": "BButtonToolbar",
+ "description": "Group a series of and/or together on a single line, with optional keyboard navigation.",
"aliases": [
"BBtnToolbar"
]
From a30eaa7a3d2333f33db0dac60168062a308a57b2 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:12:59 -0300
Subject: [PATCH 073/348] Update package.json
---
src/components/button-group/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/button-group/package.json b/src/components/button-group/package.json
index 7ffa9d20704..b82fef7175d 100644
--- a/src/components/button-group/package.json
+++ b/src/components/button-group/package.json
@@ -7,6 +7,7 @@
"components": [
{
"component": "BButtonGroup",
+ "description": "Group a series of buttons together on a single line",
"aliases": [
"BBtnGroup"
]
From acc71cf5e018c3e3818c25ed697033bff3a3f7cd Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:13:51 -0300
Subject: [PATCH 074/348] Update package.json
---
src/components/breadcrumb/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/breadcrumb/package.json b/src/components/breadcrumb/package.json
index efa5aab131d..d82ed5b5381 100644
--- a/src/components/breadcrumb/package.json
+++ b/src/components/breadcrumb/package.json
@@ -15,6 +15,7 @@
"args": [
{
"name": "event",
+ "type": "MouseEvent",
"description": "Native click event object"
}
]
From a6c71b33d5fd741ee49390cfa12b4d46c44cc195 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:19:00 -0300
Subject: [PATCH 075/348] Update package.json
---
src/components/alert/package.json | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/components/alert/package.json b/src/components/alert/package.json
index 910ad2dcfed..6202144f4e6 100644
--- a/src/components/alert/package.json
+++ b/src/components/alert/package.json
@@ -18,9 +18,24 @@
"args": [
{
"arg": "dismissCountDown",
+ "type": "Number",
"description": "Time remaining to dismissed"
}
]
+ },
+ {
+ "event": "input",
+ "description": "Used to update the v-model show value",
+ "args": [
+ {
+ "arg": "show",
+ "type": [
+ "Boolean",
+ "Number"
+ ],
+ "description": "Boolean state of alert, or Number for current countdown value"
+ }
+ ]
}
],
"slots": [
From 4c0242364cfc33b8588d99bbaff47ddef3df107f Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:46:00 -0300
Subject: [PATCH 076/348] Update build.sh
---
scripts/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build.sh b/scripts/build.sh
index d8dc021cf5d..1e8ec69e29d 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -84,7 +84,7 @@ cd ..
echo 'Done.'
echo ''
-echo 'Building web-types...'
+echo 'Building web-types.json...'
node -r esm scripts/create-web-types.js || exit 1
echo 'Done.'
echo ''
From c4a6bac061072a0ec8793033710ba6845a5df276 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 16:55:06 -0300
Subject: [PATCH 077/348] Update create-web-types.js
---
scripts/create-web-types.js | 66 ++++++++++++++++++++++++-------------
1 file changed, 43 insertions(+), 23 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 65e644747ab..389b2fb45e2 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -1,8 +1,12 @@
+// Creates a web-types.json file and places it in /dist
const path = require('path')
-// const fs = require('fs')
+const fs = require('fs')
const requireContext = require('require-context')
const baseDir = path.resolve(__dirname, '..')
+const distDir = path.resolve(baseDir, 'dist')
+
+// Import project package.json
const pkg = require(path.resolve(baseDir, 'package.json'))
const libraryName = pkg.name
@@ -244,9 +248,13 @@ const processDirectiveGroup = groupSlug => {
const docUrl = `${baseDocs}/docs/directives/${groupSlug}/`
// Process the directive meta
+ // String (PascalCase)
const name = directiveMeta.directive
+ // Object
const arg = directiveMeta.arg
+ // Array
const modifiers = directiveMeta.modifiers
+ // Object
const expression = directiveMeta.expression
// Base attribute definition
@@ -260,6 +268,9 @@ const processDirectiveGroup = groupSlug => {
description: `${name} - BootstrapVue directive '${kebabCase(name)}'`,
'doc-url': docUrl
}
+ // The following are not in the directive package.json meta section yet.
+ // There are currently a few issues with what the schema supports,
+ // so we may need to adjust the following once it is completed.
// Add in argument details
if (arg) {
// TODO as this is missing from the schema def
@@ -287,30 +298,39 @@ const processDirectiveGroup = groupSlug => {
webTypes.contributions.html.attributes.push(attribute)
}
-// Grab the component meta data (from the source dir component's package.json)
-const componentsContext = requireContext(
- path.resolve(baseDir, 'src/components'),
- true,
- /package.json/
-)
-const componentGroups = importAll(componentsContext)
+try {
+ // Grab the component meta data (from the source dir component's package.json)
+ const componentsContext = requireContext(
+ path.resolve(baseDir, 'src/components'),
+ true,
+ /package.json/
+ )
+ const componentGroups = importAll(componentsContext)
-// Grab the directive meta data
-const directivesContext = requireContext(
- path.resolve(baseDir, 'src/directives'),
- true,
- /package.json/
-)
-const directiveGroups = importAll(directivesContext)
+ // Grab the directive meta data
+ const directivesContext = requireContext(
+ path.resolve(baseDir, 'src/directives'),
+ true,
+ /package.json/
+ )
+ const directiveGroups = importAll(directivesContext)
-// Process all components
-Object.keys(componentGroups).forEach(processComponentGroup)
+ // Process all components
+ Object.keys(componentGroups).forEach(processComponentGroup)
-// Process all directives
-Object.keys(directiveGroups).forEach(processDirectiveGroup)
+ // Process all directives
+ Object.keys(directiveGroups).forEach(processDirectiveGroup)
-// Convert to JSON string
-const json = JSON.stringify(webTypes, null, 2)
+ // Convert to JSON string (prettifed with indent of 2 spaces)
+ const json = JSON.stringify(webTypes, null, 2)
-// To be replaced with a write to a file
-console.log('JSON:', json)
+ // Write JSON to file
+ fs.writeFileSync(path.resolve(distDir, 'web-types.json'), json)
+} catch (err) {
+ // Add some basic error handling here
+ logError(`create-web-types.js: an error occurred...`)
+ console.log()
+ console.error(err)
+ console.log()
+ process.exit(1)
+}
From 92f0c519e20b629bcd4a6a9192d5def90cb52b90 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Wed, 18 Sep 2019 17:02:52 -0300
Subject: [PATCH 078/348] Update create-web-types.js
---
scripts/create-web-types.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 389b2fb45e2..7fbc5a6005d 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -13,6 +13,10 @@ const libraryName = pkg.name
const libraryVersion = pkg.version
const baseDocs = pkg.homepage.replace(/\/$/, '')
+// Placeholder arrays
+let componentGroups = {}
+let directiveGroups = {}
+
// Base web-types object
const webTypes = {
$schema: '',
@@ -305,7 +309,7 @@ try {
true,
/package.json/
)
- const componentGroups = importAll(componentsContext)
+ componentGroups = importAll(componentsContext)
// Grab the directive meta data
const directivesContext = requireContext(
@@ -313,7 +317,7 @@ try {
true,
/package.json/
)
- const directiveGroups = importAll(directivesContext)
+ directiveGroups = importAll(directivesContext)
// Process all components
Object.keys(componentGroups).forEach(processComponentGroup)
@@ -328,7 +332,7 @@ try {
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), json)
} catch (err) {
// Add some basic error handling here
- logError(`create-web-types.js: an error occurred...`)
+ console.log(`create-web-types.js: an error occurred...`)
console.log()
console.error(err)
console.log()
From 58c0bafc62e01aaa9a9e88fe1dd8e83e5a6fdfa7 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 01:41:07 -0300
Subject: [PATCH 079/348] Update create-web-types.js
---
scripts/create-web-types.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 7fbc5a6005d..a2414863353 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -326,10 +326,19 @@ try {
Object.keys(directiveGroups).forEach(processDirectiveGroup)
// Convert to JSON string (prettifed with indent of 2 spaces)
- const json = JSON.stringify(webTypes, null, 2)
+ const webTypesJson = JSON.stringify(webTypes, null, 2)
// Write JSON to file
- fs.writeFileSync(path.resolve(distDir, 'web-types.json'), json)
+ console.log(' Writing dist/web-types.json...')
+ fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson)
+
+ // Create Vetur tags and attributes files
+ // console.log(' Writing dist/tags.json...')
+ // TODO: dist/tags.json
+ // Massage webTypes.contributions.html.tags into tags
+ // console.log(' Writing dist/attributes.json...')
+ // TODO: dist/attributes.json
+ // Massage webTypes.contributions.html.tags into attributes
} catch (err) {
// Add some basic error handling here
console.log(`create-web-types.js: an error occurred...`)
From 45735b26b83369b86affeade05441704ae865276 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 11:17:30 -0300
Subject: [PATCH 080/348] Update create-web-types.js
---
scripts/create-web-types.js | 49 ++++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index a2414863353..6bf993fca31 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -1,4 +1,4 @@
-// Creates a web-types.json file and places it in /dist
+// Creates a web-types.json, tags.json and attributes.json files and places them in /dist
const path = require('path')
const fs = require('fs')
const requireContext = require('require-context')
@@ -319,26 +319,47 @@ try {
)
directiveGroups = importAll(directivesContext)
- // Process all components
+ // Process all components into webTypes
Object.keys(componentGroups).forEach(processComponentGroup)
- // Process all directives
+ // Process all directives into webTypes
Object.keys(directiveGroups).forEach(processDirectiveGroup)
- // Convert to JSON string (prettifed with indent of 2 spaces)
- const webTypesJson = JSON.stringify(webTypes, null, 2)
+ // Create Vetur tags and attributes files
+ const veturTags = {}
+ const veturAttributes = {}
+ Object.keys(webTypes.contributions.html.tags).forEach(component => {
+ const def = webTypes.contributions.html.tags[component]
+ const tag = kebabCase(def.name)
+ veturTags[tag] = {
+ subtags: [],
+ description: def.description,
+ attributes: def.attributes.map(attrObj => attrObj.name)
+ }
+ def.attributes.forEach(attrObj => {
+ veturAttributes[`${tag}/${attrObj.name}`] = {
+ description: attrObj.description,
+ type: attrObj.type
+ }
+ })
+ })
- // Write JSON to file
+ // Write web-types.json to file
console.log(' Writing dist/web-types.json...')
+ const webTypesJson = JSON.stringify(webTypes, null, 2)
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson)
-
- // Create Vetur tags and attributes files
- // console.log(' Writing dist/tags.json...')
- // TODO: dist/tags.json
- // Massage webTypes.contributions.html.tags into tags
- // console.log(' Writing dist/attributes.json...')
- // TODO: dist/attributes.json
- // Massage webTypes.contributions.html.tags into attributes
+
+ // Write tags.json to file
+ console.log(' Writing dist/tags.json...')
+ const veturTagsJson = JSON.stringify(veturTags, null, 2)
+ fs.writeFileSync(path.resolve(distDir, 'tags.json'), veturTagsJson)
+
+ // Write attributes.json to file
+ console.log(' Writing dist/attributes.json...')
+ const veturAttributesJson = JSON.stringify(veturAttributes, null, 2)
+ fs.writeFileSync(path.resolve(distDir, 'attributes.json'), veturAttributesJson)
+
+ // Done
} catch (err) {
// Add some basic error handling here
console.log(`create-web-types.js: an error occurred...`)
From 1f00e937b5dc287d34f3f49a0e9b09e597a01934 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 11:24:49 -0300
Subject: [PATCH 081/348] Update package.json
---
package.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package.json b/package.json
index 3fe347c7590..62f62f4c3c8 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,10 @@
"style": "dist/bootstrap-vue.css",
"license": "MIT",
"types": "src/index.d.ts",
+ "vetur": {
+ "tags": "dist/tags.json",
+ "attributes": "dist/attributes.json"
+ },
"web-types": "dist/web-types.json",
"repository": "bootstrap-vue/bootstrap-vue",
"homepage": "https://bootstrap-vue.js.org",
From 7eba50cd31e5c62c5de7eac3ada194410b918527 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 11:28:11 -0300
Subject: [PATCH 082/348] Update build.sh
---
scripts/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build.sh b/scripts/build.sh
index 1e8ec69e29d..1bd25706fa7 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -84,7 +84,7 @@ cd ..
echo 'Done.'
echo ''
-echo 'Building web-types.json...'
+echo 'Building IDE auto-complete files...'
node -r esm scripts/create-web-types.js || exit 1
echo 'Done.'
echo ''
From 91ee8c4e98f32dede053aa6441b6d64064b1ff38 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 11:28:46 -0300
Subject: [PATCH 083/348] Update build.sh
---
scripts/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build.sh b/scripts/build.sh
index 1bd25706fa7..90f1748e268 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -84,7 +84,7 @@ cd ..
echo 'Done.'
echo ''
-echo 'Building IDE auto-complete files...'
+echo 'Building IDE auto-complete helper files...'
node -r esm scripts/create-web-types.js || exit 1
echo 'Done.'
echo ''
From 2d29b177eed23fb91f79079f93c81f75ee7ad507 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 12:20:19 -0300
Subject: [PATCH 084/348] Update create-web-types.js
---
scripts/create-web-types.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 6bf993fca31..61246b3a7f4 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -334,12 +334,13 @@ try {
veturTags[tag] = {
subtags: [],
description: def.description,
- attributes: def.attributes.map(attrObj => attrObj.name)
+ attributes: def.attributes.map(attrObj => kebabCase(attrObj.name))
}
def.attributes.forEach(attrObj => {
- veturAttributes[`${tag}/${attrObj.name}`] = {
- description: attrObj.description,
- type: attrObj.type
+ const type = (attrObj.value || { type: 'any'}).type
+ veturAttributes[`${tag}/${kebabCase(attrObj.name)}`] = {
+ description: attrObj.description || `One of: ${type.split('|').join(' or ')}`,
+ type: type
}
})
})
From ca4811a62ff2104fe94b19f3080587a562248528 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 12:28:02 -0300
Subject: [PATCH 085/348] Update create-web-types.js
---
scripts/create-web-types.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 61246b3a7f4..07b527fb914 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -126,6 +126,9 @@ const processComponentGroup = groupSlug => {
const $events = meta.events || []
const $slots = meta.slots || []
const $aliases = meta.aliases || []
+ // This doesn't exist yet (for prop descriptions, info)
+ // For description (and possibly more) for props docs
+ const $propsExtra = meta.props || {}
const tagName = kebabCase(componentName)
@@ -153,19 +156,24 @@ const processComponentGroup = groupSlug => {
if (Object.keys($props).length) {
tag.attributes = Object.keys($props).map(propName => {
const $prop = $props[propName]
+ const $propExtra = $propsExtra[propName] || {}
const prop = {
name: propName,
value: {
type: computePropType($prop),
default: computePropDefault($prop)
},
- // description: '',
'doc-url': docUrl
}
// Add required prop is required
if ($prop.required) {
prop.value.required = true
}
+ // If we have a description, add it
+ // TODO: this doesn't exist in the component meta yet
+ if ($propExtra.description) {
+ prop.description = $propExtra.description
+ }
return prop
})
}
From 4fc98e8681e4683825afa54cb768a3612e8470ac Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 14:41:37 -0300
Subject: [PATCH 086/348] lint
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 07b527fb914..7d45eed3bbb 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -345,7 +345,7 @@ try {
attributes: def.attributes.map(attrObj => kebabCase(attrObj.name))
}
def.attributes.forEach(attrObj => {
- const type = (attrObj.value || { type: 'any'}).type
+ const type = (attrObj.value || { type: 'any' }).type
veturAttributes[`${tag}/${kebabCase(attrObj.name)}`] = {
description: attrObj.description || `One of: ${type.split('|').join(' or ')}`,
type: type
From 644b3f07d03bbe6570e403d7057b91c786d123e6 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 16:33:18 -0300
Subject: [PATCH 087/348] Update create-web-types.js
---
scripts/create-web-types.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 7d45eed3bbb..8ad0b26bd52 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -157,10 +157,11 @@ const processComponentGroup = groupSlug => {
tag.attributes = Object.keys($props).map(propName => {
const $prop = $props[propName]
const $propExtra = $propsExtra[propName] || {}
+ const type = computePropType($prop)
const prop = {
name: propName,
value: {
- type: computePropType($prop),
+ type: type,
default: computePropDefault($prop)
},
'doc-url': docUrl
@@ -169,11 +170,22 @@ const processComponentGroup = groupSlug => {
if ($prop.required) {
prop.value.required = true
}
- // If we have a description, add it
+ if (type === 'boolean') {
+ // Deprecated. Use 'value' property instead. Specify only if type is
+ // 'boolean' for backwards compatibility with WebStorm 2019.2
+ prop.type = 'boolean'
+ }
+ // If we have a description, add it to the prop
// TODO: this doesn't exist in the component meta yet
if ($propExtra.description) {
prop.description = $propExtra.description
}
+ // TODO: this doesn't exist in the component meta yet
+ if ($propExtra.href) {
+ // If the prop has a document ID link, add it on here
+ // The `href` property is an ID in the docs page
+ prop['doc-url'] = `${docUrl}#${$propExtra.href.replace(/^#/, '')}`
+ }
return prop
})
}
From b5c6eb0943bf046549cf4f1b79d4076115e0472d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 17:43:14 -0300
Subject: [PATCH 088/348] Update create-web-types.js
---
scripts/create-web-types.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 8ad0b26bd52..5cab7770fc6 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -230,6 +230,13 @@ const processComponentGroup = groupSlug => {
if (slotObj.description) {
slot.description = slotObj.description
}
+ if (slotObj.pattern) {
+ // Allow RegExpr for synamic slot names
+ // Passed as a string with `\` escaped
+ slot.pattern = slotObj.pattern
+ // The name of the slot should have the variable part surrounded by { }
+ // for auto positioning the cursor to fill in the name
+ }
if (Array.isArray(slotObj.scope)) {
// Slot props not documented in meta yet
slot.properties = slotObj.scope.map(propDef => {
From 6be993d88fda8fcfcf1626ca8b689b91ab03a670 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 17:50:22 -0300
Subject: [PATCH 089/348] Update package.json
---
src/components/table/package.json | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/components/table/package.json b/src/components/table/package.json
index dd6cf9fc08e..a335bcac74c 100644
--- a/src/components/table/package.json
+++ b/src/components/table/package.json
@@ -228,8 +228,9 @@
],
"slots": [
{
- "name": "cell(key)",
- "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name. See docs for scoped data",
+ "name": "cell({key})",
+ "pattern": "cell\\([a-zA-Z0-9$_.\\-]+\\)",
+ "description": "Scoped slot for custom data rendering of field data. '{key}' is the fields key name. See docs for scoped data",
"scope": [
{
"prop": "index",
@@ -307,6 +308,7 @@
},
{
"name": "head(key)",
+ "pattern": "head\\([a-zA-Z0-9$_.\\-]+\\)",
"description": "Scoped slot for custom rendering of field header. 'key' is the fields key name. See docs for scoped header",
"scope": [
{
@@ -379,6 +381,7 @@
},
{
"name": "foot(key)",
+ "pattern": "foot\\([a-zA-Z0-9$_.\\-]+\\)",
"description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name. See docs for scoped footer",
"scope": [
{
@@ -800,8 +803,9 @@
],
"slots": [
{
- "name": "cell(key)",
- "description": "Scoped slot for custom data rendering of field data. 'key' is the fields key name.",
+ "name": "cell({key})",
+ "pattern": "cell\\([a-zA-Z0-9$_.\\-]+\\)",
+ "description": "Scoped slot for custom data rendering of field data. '{key}' is the fields key name.",
"scope": [
{
"prop": "index",
@@ -869,6 +873,7 @@
},
{
"name": "head(key)",
+ "pattern": "head\\([a-zA-Z0-9$_.\\-]+\\)",
"description": "Scoped slot for custom rendering of field header. 'key' is the fields key name",
"scope": [
{
@@ -921,6 +926,7 @@
},
{
"name": "foot(key)",
+ "pattern": "foot\\([a-zA-Z0-9$_.\\-]+\\)",
"description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name.",
"scope": [
{
From 5e9f5f1f011d6c4f76b62e36fee94dd72f9d6578 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 17:58:45 -0300
Subject: [PATCH 090/348] Update README.md
---
docs/markdown/intro/README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/markdown/intro/README.md b/docs/markdown/intro/README.md
index ba651277adc..e60cc9f5d6a 100644
--- a/docs/markdown/intro/README.md
+++ b/docs/markdown/intro/README.md
@@ -704,4 +704,11 @@ above for an example.
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
intellisense autocompletion for component attributes available when using the
-[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur).
+[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur). The helper
+json files are `dist/tags.json` and `dist/attributes.json`
+
+### JetBrains WebStorm web-types
+
+BootstrapVue provides `dist/web-types.json` for autocompletion of component tags, attributes, slot
+names (and scoped properties), and directives. This file is for use with WebStorm and other
+IDEs that support the `web-types` schema specification.
From 98c6a71fcb512c8f0c1e56d275dad3ec3b52b431 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 18:19:34 -0300
Subject: [PATCH 091/348] Update package.json
---
src/components/table/package.json | 52 +++++++++++++++----------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/components/table/package.json b/src/components/table/package.json
index a335bcac74c..d29aaf54994 100644
--- a/src/components/table/package.json
+++ b/src/components/table/package.json
@@ -230,7 +230,7 @@
{
"name": "cell({key})",
"pattern": "cell\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom data rendering of field data. '{key}' is the fields key name. See docs for scoped data",
+ "description": "Scoped slot for custom data rendering of field data. '{key}' is the field's key name. See docs for scoped data",
"scope": [
{
"prop": "index",
@@ -307,14 +307,14 @@
]
},
{
- "name": "head(key)",
+ "name": "head({key})",
"pattern": "head\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name. See docs for scoped header",
+ "description": "Scoped slot for custom rendering of field header. '{key}' is the field's key name. See docs for scoped header",
"scope": [
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -324,7 +324,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "selectAllRows",
@@ -350,7 +350,7 @@
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -360,7 +360,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "selectAllRows",
@@ -380,14 +380,14 @@
]
},
{
- "name": "foot(key)",
+ "name": "foot({key})",
"pattern": "foot\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name. See docs for scoped footer",
+ "description": "Scoped slot for custom rendering of field footer. '{key}' is the field's key name. See docs for scoped footer",
"scope": [
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -397,7 +397,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "selectAllRows",
@@ -418,7 +418,7 @@
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -428,7 +428,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "selectAllRows",
@@ -805,7 +805,7 @@
{
"name": "cell({key})",
"pattern": "cell\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom data rendering of field data. '{key}' is the fields key name.",
+ "description": "Scoped slot for custom data rendering of field data. '{key}' is the field's key name.",
"scope": [
{
"prop": "index",
@@ -872,14 +872,14 @@
]
},
{
- "name": "head(key)",
+ "name": "head({key})",
"pattern": "head\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom rendering of field header. 'key' is the fields key name",
+ "description": "Scoped slot for custom rendering of field header. '{key}' is the field's key name",
"scope": [
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -889,7 +889,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "isFoot",
@@ -905,7 +905,7 @@
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -915,7 +915,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
},
{
"prop": "isFoot",
@@ -925,14 +925,14 @@
]
},
{
- "name": "foot(key)",
+ "name": "foot({key})",
"pattern": "foot\\([a-zA-Z0-9$_.\\-]+\\)",
- "description": "Scoped slot for custom rendering of field footer. 'key' is the fields key name.",
+ "description": "Scoped slot for custom rendering of field footer. '{key}' is the field's key name.",
"scope": [
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -942,7 +942,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
}
]
},
@@ -953,7 +953,7 @@
{
"prop": "column",
"type": "String",
- "description": "The fields's key value"
+ "description": "The field's key value"
},
{
"prop": "field",
@@ -963,7 +963,7 @@
{
"prop": "label",
"type": "String",
- "description": "The fields label value"
+ "description": "The field's label value"
}
]
},
From 502eb183ced55e330d5f6ddbecf54bdd440962bf Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 18:36:35 -0300
Subject: [PATCH 092/348] Update create-web-types.js
---
scripts/create-web-types.js | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 5cab7770fc6..00eecbe7267 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -283,7 +283,7 @@ const processDirectiveGroup = groupSlug => {
const name = directiveMeta.directive
// Object
const arg = directiveMeta.arg
- // Array
+ // Array of objects
const modifiers = directiveMeta.modifiers
// Object
const expression = directiveMeta.expression
@@ -306,23 +306,34 @@ const processDirectiveGroup = groupSlug => {
if (arg) {
// TODO as this is missing from the schema def
// https://github.com/JetBrains/web-types/issues/7
+ attribute['vue-argument'] = {
+ // RegExpr string pattern for argument
+ pattern: arg.pattern,
+ description: arg.description
+ }
}
// Add in any modifier details
if (modifiers) {
attribute['vue-modifiers'] = modifiers.map(mod => {
const modifier = {
name: mod.modifer,
- description: mod.description || '',
'doc-url': docUrl
}
+ if (mod.pattern) {
+ modifier.pattern = mod.pattern
+ }
+ if (mod.description) {
+ modifier.description = mod.description
+ }
return modifier
})
}
// Add in value (expression) type
+ // Array of types or a single type
if (expression) {
attribute.value = {
kind: 'expression',
- type: computePropType(expression)
+ type: computePropType({ type: expression })
}
}
// Add the directive to the html attributes array
From 1371130a3e41570f037d4ed9e7958d3730f6f7ab Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 18:56:10 -0300
Subject: [PATCH 093/348] Update package.json
---
src/directives/scrollspy/package.json | 29 ++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/directives/scrollspy/package.json b/src/directives/scrollspy/package.json
index 606488bdf4a..dede5c04f7b 100644
--- a/src/directives/scrollspy/package.json
+++ b/src/directives/scrollspy/package.json
@@ -4,6 +4,33 @@
"meta": {
"title": "Scrollspy",
"description": "Automatically activate BootstrapVue navigation or list group components based on scroll position to indicate which link is currently active in the viewport.",
- "directive": "VBScrollspy"
+ "directive": "VBScrollspy",
+ "arg": {
+ "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]+",
+ "description": "ID of element to monitor scrolling on (if not provided defaults to the body element)"
+ },
+ "expression": [
+ "String",
+ "Number",
+ "Object"
+ ],
+ "modifiers": [
+ {
+ "name": "###",
+ "pattern": "[\\d]+",
+ "description": "Offset (in pixels) from top of scrolling viewport before triggering active state"
+ },
+ {
+ "name": "offset",
+ "description": "Position calculation method using `offset` procedure (default process for body)"
+ },
+ {
+ "name": "position",
+ "description": "Position calculation method using the `position` procedure".
+ {
+ "name": "auto",
+ "description": "Position calculation method: `auto` will choose `offset` if scroll element is body, else the method is `position`. This is the default.".
+ }
+ ]
}
}
From a4608997a28b1c8d5d6fef159ec6b5523bf650d5 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:09:55 -0300
Subject: [PATCH 094/348] Update package.json
---
src/directives/scrollspy/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/directives/scrollspy/package.json b/src/directives/scrollspy/package.json
index dede5c04f7b..18b0067a88f 100644
--- a/src/directives/scrollspy/package.json
+++ b/src/directives/scrollspy/package.json
@@ -6,7 +6,7 @@
"description": "Automatically activate BootstrapVue navigation or list group components based on scroll position to indicate which link is currently active in the viewport.",
"directive": "VBScrollspy",
"arg": {
- "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]+",
+ "pattern": "[a-zA-Z][a-ZA-Z0-9_\\-]*",
"description": "ID of element to monitor scrolling on (if not provided defaults to the body element)"
},
"expression": [
From 39705a31e152a5cf8df3bee591dad7c5fc6de396 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:25:52 -0300
Subject: [PATCH 095/348] Update package.json
---
src/directives/tooltip/package.json | 102 +++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 1 deletion(-)
diff --git a/src/directives/tooltip/package.json b/src/directives/tooltip/package.json
index d40f9ac0bca..1477161d9f1 100644
--- a/src/directives/tooltip/package.json
+++ b/src/directives/tooltip/package.json
@@ -4,6 +4,106 @@
"meta": {
"title": "Tooltip",
"description": "Add custom BootstrapVue tooltips to any element. Tooltips can be triggered by hovering, focusing, or clicking an element.",
- "directive": "VBTooltip"
+ "directive": "VBTooltip",
+ "arg": {
+ "pattern": "[a-zA-Z][a-ZA-Z0-9_\\-]*",
+ "description": "ID of element to append the tooltip markup when visible. Optional, defaults to the body"
+ },
+ "expression": [
+ "String",
+ "Function",
+ "Object"
+ ],
+ "modifiers": [
+ {
+ "name": "top",
+ "description": "Potitions the tooltip on the top of the trigger element (default)"
+ },
+ {
+ "name": "right",
+ "description": "Potitions the tooltip on the right of the trigger element"
+ },
+ {
+ "name": "bottom",
+ "description": "Potitions the tooltip on the bottom of the trigger element"
+ },
+ {
+ "name": "auto",
+ "description": "Potitions the tooltip in the best fit place around the trigger element"
+ },
+ {
+ "name": "topright",
+ "description": "Potitions the tooltip on the top-right of the trigger element"
+ },
+ {
+ "name": "topleft",
+ "description": "Potitions the tooltip on the top-left of the trigger element"
+ },
+ {
+ "name": "bottomright",
+ "description": "Potitions the tooltip on the bottom-right of the trigger element"
+ },
+ {
+ "name": "bottomleft",
+ "description": "Potitions the tooltip on the bottom-left of the trigger element"
+ },
+ {
+ "name": "lefttop",
+ "description": "Potitions the tooltip on the left-top of the trigger element"
+ },
+ {
+ "name": "leftbottom",
+ "description": "Potitions the tooltip on the left-bottom of the trigger element"
+ },
+ {
+ "name": "righttop",
+ "description": "Potitions the tooltip on the right-top of the trigger element"
+ },
+ {
+ "name": "rightbottom",
+ "description": "Potitions the tooltip on the right-bottom of the trigger element"
+ },
+ {
+ "name": "nofade",
+ "description": "Disabled teh fade animation of the tooltip"
+ },
+ {
+ "name": "html",
+ "description": "Enables basic HTML in the title (use with caution)"
+ },
+ {
+ "name": "viewport",
+ "description": "Sets teh boundary constraint to the viewport"
+ },
+ {
+ "name": "window",
+ "description": "sets teh boundary constrain to the window"
+ },
+ {
+ "name": "v-{variant}",
+ "pattern": "v-[a-z]+",
+ "description": "Sets the tooltip contextual color variant to `{variant}`"
+ },
+ {
+ "name": "d{###}",
+ "pattern": "d[0-9]+",
+ "description": "The show and hide delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "ds{###}",
+ "pattern": "ds[0-9]+",
+ "description": "The show delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "dh{###}",
+ "pattern": "dh[0-9]+",
+ "description": "The hide delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "o{###}",
+ "pattern": "o-?[0-9]+",
+ "description": "An offset value in pixels (where `{###}` is the number of pixels, defaults to 0. Negative values allowed)"
+ }
+ ]
}
}
From c5f71c7ab417a4cd69feb769bc4a660a452aaf1c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:27:38 -0300
Subject: [PATCH 096/348] Update package.json
---
src/directives/popover/package.json | 102 +++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 1 deletion(-)
diff --git a/src/directives/popover/package.json b/src/directives/popover/package.json
index d5ed0cc004f..6fdb2af3106 100644
--- a/src/directives/popover/package.json
+++ b/src/directives/popover/package.json
@@ -4,6 +4,106 @@
"meta": {
"title": "Popover",
"description": "Add BootstrapVue popovers to any element on your site, using Bootstrap v4 CSS for styling and animations. Popovers are tooltips on steroids.",
- "directive": "VBPopover"
+ "directive": "VBPopover",
+ "arg": {
+ "pattern": "[a-zA-Z][a-ZA-Z0-9_\\-]*",
+ "description": "ID of element to append the popover markup when visible. Optional, defaults to the body"
+ },
+ "expression": [
+ "String",
+ "Function",
+ "Object"
+ ],
+ "modifiers": [
+ {
+ "name": "top",
+ "description": "Potitions the popover on the top of the trigger element (default)"
+ },
+ {
+ "name": "right",
+ "description": "Potitions the popover on the right of the trigger element"
+ },
+ {
+ "name": "bottom",
+ "description": "Potitions the popover on the bottom of the trigger element"
+ },
+ {
+ "name": "auto",
+ "description": "Potitions the popover in the best fit place around the trigger element"
+ },
+ {
+ "name": "topright",
+ "description": "Potitions the popover on the top-right of the trigger element"
+ },
+ {
+ "name": "topleft",
+ "description": "Potitions the popover on the top-left of the trigger element"
+ },
+ {
+ "name": "bottomright",
+ "description": "Potitions the popover on the bottom-right of the trigger element"
+ },
+ {
+ "name": "bottomleft",
+ "description": "Potitions the popover on the bottom-left of the trigger element"
+ },
+ {
+ "name": "lefttop",
+ "description": "Potitions the popover on the left-top of the trigger element"
+ },
+ {
+ "name": "leftbottom",
+ "description": "Potitions the popover on the left-bottom of the trigger element"
+ },
+ {
+ "name": "righttop",
+ "description": "Potitions the popover on the right-top of the trigger element"
+ },
+ {
+ "name": "rightbottom",
+ "description": "Potitions the popover on the right-bottom of the trigger element"
+ },
+ {
+ "name": "nofade",
+ "description": "Disabled teh fade animation of the popover"
+ },
+ {
+ "name": "html",
+ "description": "Enables basic HTML in the title/content (use with caution)"
+ },
+ {
+ "name": "viewport",
+ "description": "Sets the boundary constraint to the viewport"
+ },
+ {
+ "name": "window",
+ "description": "sets the boundary constrain to the window"
+ },
+ {
+ "name": "v-{variant}",
+ "pattern": "v-[a-z]+",
+ "description": "Sets the popover contextual color variant to `{variant}`"
+ },
+ {
+ "name": "d{###}",
+ "pattern": "d[0-9]+",
+ "description": "The show and hide delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "ds{###}",
+ "pattern": "ds[0-9]+",
+ "description": "The show delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "dh{###}",
+ "pattern": "dh[0-9]+",
+ "description": "The hide delay in milliseconds (where `{###}` is the value in milliseconds)"
+ },
+ {
+ "name": "o{###}",
+ "pattern": "o-?[0-9]+",
+ "description": "An offset value in pixels (where `{###}` is the number of pixels, defaults to 0. Negative values allowed)"
+ }
+ ]
}
}
From 3df617007b3c000df5998b7e32afc4e15df8a607 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:28:41 -0300
Subject: [PATCH 097/348] Update package.json
---
src/directives/tooltip/package.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/directives/tooltip/package.json b/src/directives/tooltip/package.json
index 1477161d9f1..7caafb2bdfc 100644
--- a/src/directives/tooltip/package.json
+++ b/src/directives/tooltip/package.json
@@ -65,7 +65,7 @@
},
{
"name": "nofade",
- "description": "Disabled teh fade animation of the tooltip"
+ "description": "Disabled the fade animation of the tooltip"
},
{
"name": "html",
@@ -73,11 +73,11 @@
},
{
"name": "viewport",
- "description": "Sets teh boundary constraint to the viewport"
+ "description": "Sets the boundary constraint to the viewport"
},
{
"name": "window",
- "description": "sets teh boundary constrain to the window"
+ "description": "sets the boundary constrain to the window"
},
{
"name": "v-{variant}",
From 07d30cb50c173ac89f07d47e0c94e71855862449 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:29:38 -0300
Subject: [PATCH 098/348] Update package.json
---
src/directives/popover/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/directives/popover/package.json b/src/directives/popover/package.json
index 6fdb2af3106..931268c50e9 100644
--- a/src/directives/popover/package.json
+++ b/src/directives/popover/package.json
@@ -65,7 +65,7 @@
},
{
"name": "nofade",
- "description": "Disabled teh fade animation of the popover"
+ "description": "Disabled the fade animation of the popover"
},
{
"name": "html",
From 48fa0a9f4bc61c407d0106d6289776889b229747 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 19:57:25 -0300
Subject: [PATCH 099/348] Update create-web-types.js
---
scripts/create-web-types.js | 368 +++++++++++++++++++-----------------
1 file changed, 197 insertions(+), 171 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 00eecbe7267..f7cc1466453 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -104,180 +104,167 @@ const computePropDefault = ({ default: def, type }) => {
return JSON.stringify(def)
}
-// Create tag entries for each component in a component group
-const processComponentGroup = groupSlug => {
- // Array of components in the group
- const groupMeta = componentGroups[groupSlug] || {}
- const componentsMeta = groupMeta.components || []
- const docUrl = `${baseDocs}/docs/components/${groupSlug}/`
-
- // We import the component from the transpiled `esm/` dir
- const groupRef = require(path.resolve(baseDir, 'esm/components/' + groupSlug))
+// Process a single component's meta and efinition/class objects
+const processComponentMeta((meta, componentRef, docUrl) => {
+ const componentName = meta.component
+
+ // Pull information from the component definition/class
+ const componentRef = groupRef[componentName] || {}
+ const $options = componentRef.options || componentRef
+ const $props = $options.props || {}
+ const $model = $options.model || null
+
+ // Pull additional info from meta
+ const $events = meta.events || []
+ const $slots = meta.slots || []
+ const $aliases = meta.aliases || []
+ // This doesn't exist yet (for prop descriptions, info)
+ // For description (and possibly more) for props docs
+ const $propsExtra = meta.props || {}
+
+ const tagName = kebabCase(componentName)
+
+ // Build the tag reference
+ const tag = {
+ name: componentName,
+ source: {
+ module: libraryName,
+ symbol: componentName
+ },
+ 'docs-url': docUrl,
+ description: `'${componentName}' - BootstrapVue component '${tagName}'`,
+ attributes: []
+ }
- // Process each component
- componentsMeta.forEach(meta => {
- const componentName = meta.component
- const componentRef = groupRef[componentName] || {}
- // Pull information from the component definition/class
- const $options = componentRef.options || componentRef
- const $props = $options.props || {}
- const $model = $options.model || null
- // Pull additional info from meta
- const $events = meta.events || []
- const $slots = meta.slots || []
- const $aliases = meta.aliases || []
- // This doesn't exist yet (for prop descriptions, info)
- // For description (and possibly more) for props docs
- const $propsExtra = meta.props || {}
-
- const tagName = kebabCase(componentName)
-
- // Build the tag reference
- const tag = {
- name: componentName,
- source: {
- module: libraryName,
- symbol: componentName
- },
- 'docs-url': docUrl,
- description: `'${componentName}' - BootstrapVue component <${tagName}>`,
- attributes: []
+ // Add v-model information
+ if ($model && $model.prop && $model.event) {
+ tag['vue-model'] = {
+ prop: $model.prop,
+ event: $model.event
}
+ }
- // Add v-model information
- if ($model && $model.prop && $model.event) {
- tag['vue-model'] = {
- prop: $model.prop,
- event: $model.event
+ // Add props
+ if (Object.keys($props).length) {
+ tag.attributes = Object.keys($props).map(propName => {
+ const $prop = $props[propName]
+ const $propExtra = $propsExtra[propName] || {}
+ const type = computePropType($prop)
+ const prop = {
+ name: propName,
+ value: {
+ type: type,
+ default: computePropDefault($prop)
+ },
+ 'doc-url': docUrl
}
- }
-
- // Add props
- if (Object.keys($props).length) {
- tag.attributes = Object.keys($props).map(propName => {
- const $prop = $props[propName]
- const $propExtra = $propsExtra[propName] || {}
- const type = computePropType($prop)
- const prop = {
- name: propName,
- value: {
- type: type,
- default: computePropDefault($prop)
- },
- 'doc-url': docUrl
- }
- // Add required prop is required
- if ($prop.required) {
- prop.value.required = true
- }
- if (type === 'boolean') {
- // Deprecated. Use 'value' property instead. Specify only if type is
- // 'boolean' for backwards compatibility with WebStorm 2019.2
- prop.type = 'boolean'
- }
- // If we have a description, add it to the prop
- // TODO: this doesn't exist in the component meta yet
- if ($propExtra.description) {
- prop.description = $propExtra.description
- }
- // TODO: this doesn't exist in the component meta yet
- if ($propExtra.href) {
- // If the prop has a document ID link, add it on here
- // The `href` property is an ID in the docs page
- prop['doc-url'] = `${docUrl}#${$propExtra.href.replace(/^#/, '')}`
- }
- return prop
- })
- }
+ // Add required prop is required
+ if ($prop.required) {
+ prop.value.required = true
+ }
+ if (type === 'boolean') {
+ // Deprecated. Use 'value' property instead. Specify only if type is
+ // 'boolean' for backwards compatibility with WebStorm 2019.2
+ prop.type = 'boolean'
+ }
+ // If we have a description, add it to the prop
+ // TODO: this doesn't exist in the component meta yet
+ if ($propExtra.description) {
+ prop.description = $propExtra.description
+ }
+ // TODO: this doesn't exist in the component meta yet
+ if ($propExtra.href) {
+ // If the prop has a document ID link, add it on here
+ // The `href` property is an ID in the docs page
+ prop['doc-url'] = `${docUrl}#${$propExtra.href.replace(/^#/, '')}`
+ }
+ return prop
+ })
+ }
- // Add events
- if ($events.length) {
- tag.events = $events.map(eventObj => {
- const event = {
- name: eventObj.event,
- 'doc-url': docUrl
- }
- if (eventObj.description) {
- event.description = eventObj.description
- }
- if (Array.isArray(eventObj.args)) {
- event.arguments = eventObj.args.map(arg => {
- arg = typeof arg === 'object' ? arg : { arg: arg }
- const argument = {
- name: arg.arg,
- 'doc-url': docUrl
- }
- if (arg.description) {
- argument.description = arg.description
- }
- if (arg.type) {
- argument.type = computePropType(arg)
- }
- return argument
- })
- }
- return event
- })
- }
+ // Add events
+ if ($events.length) {
+ tag.events = $events.map(eventObj => {
+ const event = {
+ name: eventObj.event,
+ 'doc-url': docUrl
+ }
+ if (eventObj.description) {
+ event.description = eventObj.description
+ }
+ if (Array.isArray(eventObj.args)) {
+ event.arguments = eventObj.args.map(arg => {
+ arg = typeof arg === 'object' ? arg : { arg: arg }
+ const argument = {
+ name: arg.arg,
+ 'doc-url': docUrl
+ }
+ if (arg.description) {
+ argument.description = arg.description
+ }
+ if (arg.type) {
+ argument.type = computePropType(arg)
+ }
+ return argument
+ })
+ }
+ return event
+ })
+ }
- // Add slots
- if ($slots.length) {
- tag['vue-scoped-slots'] = $slots.map(slotObj => {
- const slot = {
- name: slotObj.name,
- 'doc-url': docUrl
- }
- if (slotObj.description) {
- slot.description = slotObj.description
- }
- if (slotObj.pattern) {
- // Allow RegExpr for synamic slot names
- // Passed as a string with `\` escaped
- slot.pattern = slotObj.pattern
- // The name of the slot should have the variable part surrounded by { }
- // for auto positioning the cursor to fill in the name
- }
- if (Array.isArray(slotObj.scope)) {
- // Slot props not documented in meta yet
- slot.properties = slotObj.scope.map(propDef => {
- const property = {
- name: propDef.prop,
- 'doc-url': docUrl
- }
- if (propDef.description) {
- property.description = propDef.description
- }
- if (propDef.type) {
- property.type = computePropType(propDef)
- }
- return property
- })
- }
- return slot
- })
- }
+ // Add slots
+ if ($slots.length) {
+ tag['vue-scoped-slots'] = $slots.map(slotObj => {
+ const slot = {
+ name: slotObj.name,
+ 'doc-url': docUrl
+ }
+ if (slotObj.description) {
+ slot.description = slotObj.description
+ }
+ if (slotObj.pattern) {
+ // Allow RegExpr for synamic slot names
+ // Passed as a string with `\` escaped
+ slot.pattern = slotObj.pattern
+ // The name of the slot should have the variable part surrounded by { }
+ // for auto positioning the cursor to fill in the name
+ }
+ if (Array.isArray(slotObj.scope)) {
+ // Slot props not documented in meta yet
+ slot.properties = slotObj.scope.map(propDef => {
+ const property = {
+ name: propDef.prop,
+ 'doc-url': docUrl
+ }
+ if (propDef.description) {
+ property.description = propDef.description
+ }
+ if (propDef.type) {
+ property.type = computePropType(propDef)
+ }
+ return property
+ })
+ }
+ return slot
+ })
+ }
- // Add the component tag
- webTypes.contributions.html.tags.push(tag)
-
- // Add in any component alias tags
- if ($aliases.length) {
- // Add the aliases
- $aliases.forEach(alias => {
- const aliasTag = { ...tag, name: alias, source: { ...tag.source, symbol: alias } }
- aliasTag.description = `'${alias}' <${kebabCase(alias)}> (Alias for ${tag.description})`
- webTypes.contributions.html.tags.push(aliasTag)
- })
- }
- })
-}
+ // Add the component tag
+ webTypes.contributions.html.tags.push(tag)
-// Create attribute entries for each directive
-const processDirectiveGroup = groupSlug => {
- // Directives only have a single entry in their Meta for `directive`
- const directiveMeta = directiveGroups[groupSlug] || {}
- const docUrl = `${baseDocs}/docs/directives/${groupSlug}/`
+ // Add in any component alias tags
+ if ($aliases.length) {
+ // Add the aliases
+ $aliases.forEach(alias => {
+ const aliasTag = { ...tag, name: alias, source: { ...tag.source, symbol: alias } }
+ aliasTag.description = `'${alias}' '${kebabCase(alias)}' (Alias for ${tag.description})`
+ webTypes.contributions.html.tags.push(aliasTag)
+ })
+ }
+})
+// Process a single directive meta object
+const processDirectiveMeta((directiveMeta, docUrl) => {
// Process the directive meta
// String (PascalCase)
const name = directiveMeta.directive
@@ -288,7 +275,7 @@ const processDirectiveGroup = groupSlug => {
// Object
const expression = directiveMeta.expression
- // Base attribute definition
+ // Build the attribute (directive) def
const attribute = {
name: kebabCase(name),
source: {
@@ -299,9 +286,7 @@ const processDirectiveGroup = groupSlug => {
description: `${name} - BootstrapVue directive '${kebabCase(name)}'`,
'doc-url': docUrl
}
- // The following are not in the directive package.json meta section yet.
- // There are currently a few issues with what the schema supports,
- // so we may need to adjust the following once it is completed.
+
// Add in argument details
if (arg) {
// TODO as this is missing from the schema def
@@ -312,6 +297,7 @@ const processDirectiveGroup = groupSlug => {
description: arg.description
}
}
+
// Add in any modifier details
if (modifiers) {
attribute['vue-modifiers'] = modifiers.map(mod => {
@@ -328,16 +314,56 @@ const processDirectiveGroup = groupSlug => {
return modifier
})
}
- // Add in value (expression) type
- // Array of types or a single type
+
+ // Add in value (expression) type (Array of types or a single type)
if (expression) {
attribute.value = {
kind: 'expression',
type: computePropType({ type: expression })
}
}
+
// Add the directive to the html attributes array
webTypes.contributions.html.attributes.push(attribute)
+})
+
+// Create tag entries for each component in a component group
+const processComponentGroup = groupSlug => {
+ // Array of components in the group
+ const groupMeta = componentGroups[groupSlug] || {}
+ const componentsMeta = groupMeta.components || []
+ const directivesMeta = (groupMeta.directives || []).map(d => {
+ // The component group's directive meta could be a string
+ // So we map it to the object format
+ return typeof d === 'string' ? { directive: d } : d
+ })
+
+ // The URL to the components docs
+ const docUrl = `${baseDocs}/docs/components/${groupSlug}/`
+
+ // We import the component from the transpiled `esm/` dir
+ const groupRef = require(path.resolve(baseDir, 'esm/components/' + groupSlug))
+
+ // Process each component
+ componentsMeta.forEach(meta => {
+ processComponentMeta(meta, groupRef, docUrl)
+ })
+
+ // Process any directives provided in the meta
+ // These directives do not have their own package.json files
+ directivesMeta.forEach(directiveMeta => {
+ processDirectiveMeta(directiveMeta, docUrl)
+ })
+}
+
+// Create attribute entries for each directive
+const processDirectiveGroup = groupSlug => {
+ // Directives only have a single entry in their Meta for `directive`
+ const directiveMeta = directiveGroups[groupSlug] || {}
+ const docUrl = `${baseDocs}/docs/directives/${groupSlug}/`
+
+ // Process the directive meta
+ processDirectiveMeta(directiveMeta, docUrl)
}
try {
From 7524b2d0822da8c9e92e8946a19df54a9d9d3ca8 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:01:48 -0300
Subject: [PATCH 100/348] Update package.json
---
src/directives/scrollspy/package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/directives/scrollspy/package.json b/src/directives/scrollspy/package.json
index 18b0067a88f..6fe772a6191 100644
--- a/src/directives/scrollspy/package.json
+++ b/src/directives/scrollspy/package.json
@@ -26,7 +26,8 @@
},
{
"name": "position",
- "description": "Position calculation method using the `position` procedure".
+ "description": "Position calculation method using the `position` procedure"
+ },
{
"name": "auto",
"description": "Position calculation method: `auto` will choose `offset` if scroll element is body, else the method is `position`. This is the default.".
From 6b3748d625f30fe75159173dd9721a33ee1b3d6e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:04:56 -0300
Subject: [PATCH 101/348] Update package.json
---
src/directives/scrollspy/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/directives/scrollspy/package.json b/src/directives/scrollspy/package.json
index 6fe772a6191..d3593963018 100644
--- a/src/directives/scrollspy/package.json
+++ b/src/directives/scrollspy/package.json
@@ -30,7 +30,7 @@
},
{
"name": "auto",
- "description": "Position calculation method: `auto` will choose `offset` if scroll element is body, else the method is `position`. This is the default.".
+ "description": "Position calculation method: `auto` will choose `offset` if scroll element is body, else the method is `position`. This is the default."
}
]
}
From 5652e793068abe8de800e1ee36ec553306080d6c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:09:07 -0300
Subject: [PATCH 102/348] Update create-web-types.js
---
scripts/create-web-types.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index f7cc1466453..714c2027456 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -105,7 +105,7 @@ const computePropDefault = ({ default: def, type }) => {
}
// Process a single component's meta and efinition/class objects
-const processComponentMeta((meta, componentRef, docUrl) => {
+const processComponentMeta = (meta, componentRef, docUrl) => {
const componentName = meta.component
// Pull information from the component definition/class
@@ -261,10 +261,10 @@ const processComponentMeta((meta, componentRef, docUrl) => {
webTypes.contributions.html.tags.push(aliasTag)
})
}
-})
+}
// Process a single directive meta object
-const processDirectiveMeta((directiveMeta, docUrl) => {
+const processDirectiveMeta = (directiveMeta, docUrl) => {
// Process the directive meta
// String (PascalCase)
const name = directiveMeta.directive
@@ -325,7 +325,7 @@ const processDirectiveMeta((directiveMeta, docUrl) => {
// Add the directive to the html attributes array
webTypes.contributions.html.attributes.push(attribute)
-})
+}
// Create tag entries for each component in a component group
const processComponentGroup = groupSlug => {
From f1a4127beca1b714964ae48d01aaed0f15025451 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:13:54 -0300
Subject: [PATCH 103/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 714c2027456..4a0624b879d 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -105,7 +105,7 @@ const computePropDefault = ({ default: def, type }) => {
}
// Process a single component's meta and efinition/class objects
-const processComponentMeta = (meta, componentRef, docUrl) => {
+const processComponentMeta = (meta, groupRef, docUrl) => {
const componentName = meta.component
// Pull information from the component definition/class
From 55f166d4e4d80e79b757c603df68d64c4c07157b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:17:38 -0300
Subject: [PATCH 104/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 4a0624b879d..3a07476d57d 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -348,7 +348,7 @@ const processComponentGroup = groupSlug => {
componentsMeta.forEach(meta => {
processComponentMeta(meta, groupRef, docUrl)
})
-
+
// Process any directives provided in the meta
// These directives do not have their own package.json files
directivesMeta.forEach(directiveMeta => {
From 07da0ac3dbc0c142d77bc5648bd055826fb3e1c2 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:24:33 -0300
Subject: [PATCH 105/348] Update create-web-types.js
---
scripts/create-web-types.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 3a07476d57d..2a6c43828a8 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -54,6 +54,11 @@ const importAll = r => {
// Normalize `meta.components` to array of objects form
m.components = m.components.map(c => (typeof c === 'string' ? { component: c } : c))
}
+ if (m.directives) {
+ // Normalize `meta.directives` to array of objects form
+ // Applicable to component group package.json
+ m.directives = m.directive.map(d => (typeof d === 'string' ? { directive: d } : d))
+ }
obj[m.slug] = m
})
@@ -332,11 +337,7 @@ const processComponentGroup = groupSlug => {
// Array of components in the group
const groupMeta = componentGroups[groupSlug] || {}
const componentsMeta = groupMeta.components || []
- const directivesMeta = (groupMeta.directives || []).map(d => {
- // The component group's directive meta could be a string
- // So we map it to the object format
- return typeof d === 'string' ? { directive: d } : d
- })
+ const directivesMeta = groupMeta.directives || []
// The URL to the components docs
const docUrl = `${baseDocs}/docs/components/${groupSlug}/`
From b608126c7813deb0ffcd0005f718b3eb0fc2646c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:29:34 -0300
Subject: [PATCH 106/348] Update importdoc.vue
---
docs/components/importdoc.vue | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue
index 8d160a9c3e2..25213809aa1 100644
--- a/docs/components/importdoc.vue
+++ b/docs/components/importdoc.vue
@@ -184,7 +184,10 @@ export default {
return [].concat(this.meta.component, subcomponents).filter(c => c)
},
directives() {
- return [].concat(this.meta.directive, this.meta.directives).filter(d => d)
+ return [].concat(this.meta.directive, this.meta.directives)
+ .filter(d => d)
+ // We just need the directive name
+ .map(d => typeof d === 'string' ? d : d.directive)
},
componentImportCode() {
const firstComponent = this.components[0]
From 865e3323cd552b05229db7b8d29e92e3bde0ba9f Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:37:16 -0300
Subject: [PATCH 107/348] Update importdoc.vue
---
docs/components/importdoc.vue | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue
index 25213809aa1..5b677b5fe25 100644
--- a/docs/components/importdoc.vue
+++ b/docs/components/importdoc.vue
@@ -184,10 +184,13 @@ export default {
return [].concat(this.meta.component, subcomponents).filter(c => c)
},
directives() {
- return [].concat(this.meta.directive, this.meta.directives)
- .filter(d => d)
- // We just need the directive name
- .map(d => typeof d === 'string' ? d : d.directive)
+ // We just need the directive name
+ return (
+ []
+ .concat(this.meta.directive, this.meta.directives)
+ .filter(d => d)
+ .map(d => (typeof d === 'string' ? d : d.directive))
+ )
},
componentImportCode() {
const firstComponent = this.components[0]
From 2ade89e1b12e01d6b3d7330194309c89ad17b0de Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:38:14 -0300
Subject: [PATCH 108/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 2a6c43828a8..e7f3d689f1a 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -57,7 +57,7 @@ const importAll = r => {
if (m.directives) {
// Normalize `meta.directives` to array of objects form
// Applicable to component group package.json
- m.directives = m.directive.map(d => (typeof d === 'string' ? { directive: d } : d))
+ m.directives = m.directives.map(d => (typeof d === 'string' ? { directive: d } : d))
}
obj[m.slug] = m
})
From a45c77d3116f32c99c1576ed8b4bfbbc30d2a07a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:42:39 -0300
Subject: [PATCH 109/348] Update package.json
---
src/components/modal/package.json | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index cd0210d26ce..f15199df178 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -8,7 +8,22 @@
"BVModalPlugin"
],
"directives": [
- "VBModal"
+ {
+ "directive": "VBModal",
+ "description": "Directive for opening a modal by ID",
+ "arg": [
+ "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
+ "description": "Modal ID to open"
+ ],
+ "expression": "String",
+ "modifiers": [
+ {
+ "name": "{modalid}",
+ "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
+ "description": "Modal ID to open. Replace `{modalid}` with the modal's ID"
+ }
+ ]
+ }
],
"components": [
{
From 57f566171068f467810fd7fd343882da247b2c5b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:43:48 -0300
Subject: [PATCH 110/348] Update package.json
---
src/components/modal/package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index f15199df178..e5b5196c7cb 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -11,10 +11,10 @@
{
"directive": "VBModal",
"description": "Directive for opening a modal by ID",
- "arg": [
+ "arg": {
"pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
"description": "Modal ID to open"
- ],
+ },
"expression": "String",
"modifiers": [
{
From fa7ae4436646236d941e20db2bbb8b231374c386 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:45:54 -0300
Subject: [PATCH 111/348] Update importdoc.vue
---
docs/components/importdoc.vue | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue
index 5b677b5fe25..62cd2a21d3e 100644
--- a/docs/components/importdoc.vue
+++ b/docs/components/importdoc.vue
@@ -185,12 +185,10 @@ export default {
},
directives() {
// We just need the directive name
- return (
- []
- .concat(this.meta.directive, this.meta.directives)
- .filter(d => d)
- .map(d => (typeof d === 'string' ? d : d.directive))
- )
+ return []
+ .concat(this.meta.directive, this.meta.directives)
+ .filter(d => d)
+ .map(d => (typeof d === 'string' ? d : d.directive))
},
componentImportCode() {
const firstComponent = this.components[0]
From 00d31d1dc70b261e685fa49708811992f47500b4 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 20:56:50 -0300
Subject: [PATCH 112/348] Update create-web-types.js
---
scripts/create-web-types.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index e7f3d689f1a..a2864ea0259 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -307,7 +307,7 @@ const processDirectiveMeta = (directiveMeta, docUrl) => {
if (modifiers) {
attribute['vue-modifiers'] = modifiers.map(mod => {
const modifier = {
- name: mod.modifer,
+ name: mod.name,
'doc-url': docUrl
}
if (mod.pattern) {
From 0ea9fec85026579672464406b7426baf79307ed7 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:03:11 -0300
Subject: [PATCH 113/348] Update index.js
---
src/components/popover/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/popover/index.js b/src/components/popover/index.js
index 521fa6134bb..0b69d196a06 100644
--- a/src/components/popover/index.js
+++ b/src/components/popover/index.js
@@ -1,10 +1,10 @@
import { BPopover } from './popover'
-import { VBPopover } from '../../directives/popover/popover'
+import { VBPopoverPlugin } from '../../directives/popover'
import { pluginFactory } from '../../utils/plugins'
const PopoverPlugin = /*#__PURE__*/ pluginFactory({
components: { BPopover },
- directives: { VBPopover }
+ plugins: { VBPopoverPlugin }
})
export { PopoverPlugin, BPopover }
From cc23abc01b847f9be7ff57c18856258d699d4552 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:04:07 -0300
Subject: [PATCH 114/348] Update index.js
---
src/components/tooltip/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/tooltip/index.js b/src/components/tooltip/index.js
index 9c7380e0d66..8cdd837370c 100644
--- a/src/components/tooltip/index.js
+++ b/src/components/tooltip/index.js
@@ -1,10 +1,10 @@
import { BTooltip } from './tooltip'
-import { VBTooltip } from '../../directives/tooltip/tooltip'
+import { VBTooltipPlugin } from '../../directives/tooltip'
import { pluginFactory } from '../../utils/plugins'
const TooltipPlugin = /*#__PURE__*/ pluginFactory({
components: { BTooltip },
- directives: { VBTooltip }
+ plugins: { VBTooltipPlugin }
})
export { TooltipPlugin, BTooltip }
From 39451050fbc85c039fab051e927a481b20a3902d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:04:50 -0300
Subject: [PATCH 115/348] Update package.json
---
src/components/tooltip/package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json
index 9b818fae49c..e3159d28725 100644
--- a/src/components/tooltip/package.json
+++ b/src/components/tooltip/package.json
@@ -4,8 +4,8 @@
"meta": {
"title": "Tooltip",
"description": "Easily add tooltips to elements or components via the component or v-b-tooltip directive.",
- "directives": [
- "VBTooltip"
+ "plugins": [
+ "VBTooltipPlugin"
],
"components": [
{
From 61fd5ca7237a4e3f9e7257c09f10c9ad6ddef013 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:05:24 -0300
Subject: [PATCH 116/348] Update package.json
---
src/components/popover/package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/popover/package.json b/src/components/popover/package.json
index 575f92e6890..6b9d95f907d 100644
--- a/src/components/popover/package.json
+++ b/src/components/popover/package.json
@@ -4,8 +4,8 @@
"meta": {
"title": "Popover",
"description": "The Popover feature provides a tooltip-like behavior, can be easily applied to any interactive element via the component or v-b-popover directive",
- "directives": [
- "VBPopover"
+ "plugins": [
+ "VBPopoverPlugin"
],
"components": [
{
From f3328d8609e9357680a5fdf6c23f6be4e7b6da6c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:09:37 -0300
Subject: [PATCH 117/348] Update package.json
---
src/components/modal/package.json | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/components/modal/package.json b/src/components/modal/package.json
index e5b5196c7cb..2bffc0fb4d3 100644
--- a/src/components/modal/package.json
+++ b/src/components/modal/package.json
@@ -11,10 +11,6 @@
{
"directive": "VBModal",
"description": "Directive for opening a modal by ID",
- "arg": {
- "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
- "description": "Modal ID to open"
- },
"expression": "String",
"modifiers": [
{
From 1aba83d8cd892790aedd84c5c0f220f87efc461c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:10:38 -0300
Subject: [PATCH 118/348] Update package.json
---
src/components/collapse/package.json | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json
index b345700b8ef..5d7e2a2fa72 100644
--- a/src/components/collapse/package.json
+++ b/src/components/collapse/package.json
@@ -5,7 +5,18 @@
"title": "Collapse",
"description": "Easily toggle content visibility on your pages. Includes support for making accordions.",
"directives": [
- "VBToggle"
+ {
+ "directive": "VBToggle"
+ "description": "Directive for toggling a collapse by ID",
+ "expression": "String",
+ "modifiers": [
+ {
+ "name": "{collapseid}",
+ "pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
+ "description": "Collapse ID to open. Replace `{collapse}` with the collapse's ID"
+ }
+ ]
+ }
],
"components": [
{
From 57d5916254ae2f508d1e6bbe77367e0e11c3eead Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:10:50 -0300
Subject: [PATCH 119/348] Update package.json
---
src/components/collapse/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json
index 5d7e2a2fa72..8e39237002a 100644
--- a/src/components/collapse/package.json
+++ b/src/components/collapse/package.json
@@ -6,7 +6,7 @@
"description": "Easily toggle content visibility on your pages. Includes support for making accordions.",
"directives": [
{
- "directive": "VBToggle"
+ "directive": "VBToggle",
"description": "Directive for toggling a collapse by ID",
"expression": "String",
"modifiers": [
From ae2029b98e5562c7b53db59249ed5e25dc85022d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:11:10 -0300
Subject: [PATCH 120/348] Update package.json
---
src/components/collapse/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json
index 8e39237002a..4e70c098871 100644
--- a/src/components/collapse/package.json
+++ b/src/components/collapse/package.json
@@ -13,7 +13,7 @@
{
"name": "{collapseid}",
"pattern": "[a-zA-Z][a-zA-Z0-9_\\-]*",
- "description": "Collapse ID to open. Replace `{collapse}` with the collapse's ID"
+ "description": "Collapse ID to open. Replace `{collapseid}` with the collapse's ID"
}
]
}
From 82371980edbaa632f7d70232e6b82f8ac64e0878 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:31:32 -0300
Subject: [PATCH 121/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 96bea340704..571afa95f55 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -223,6 +223,11 @@ export default {
components: { AnchoredHeading },
props: {
component: {},
+ propsMeta: {
+ // For getting pro descriptions
+ type: Array,
+ default: () => []
+ },
slots: {
type: Array,
default: () => []
@@ -274,11 +279,21 @@ export default {
componentProps() {
return this.componentOptions.props || {}
},
+ componentPropsMetaObj() {
+ // Returns the propsMeta array in object format for easy lookups
+ return this.propsMeta.reduce((obj, propMeta) => {
+ if (propMeta.prop) {
+ obj[propMeta.prop]: propMeta
+ }
+ return obj
+ }, {})
+ },
propsFields() {
return [
{ key: 'prop', label: 'Property' },
{ key: 'type', label: 'Type' },
- { key: 'defaultValue', label: 'Default Value' }
+ { key: 'defaultValue', label: 'Default Value' },
+ { key: 'description', label: 'Description' }
]
},
eventsFields() {
@@ -307,9 +322,11 @@ export default {
},
propsItems() {
const props = this.componentProps
+ const propsMetaObj = this.componentPropsMetaObj
return Object.keys(props).map(prop => {
const p = props[prop]
+ const meta = propsMetaObj[prop] || {}
// Describe type
let type = p.type || Object
@@ -341,6 +358,7 @@ export default {
typeClass,
defaultValue: defaultVal,
required: p.required || false,
+ description: meta.description || '',
deprecated: p.deprecated || false,
deprecation: p.deprecation || false,
_showDetails: typeof p.deprecated === 'string' || typeof p.deprecation === 'string'
From 10a0f59ed10838ea2c43e1608c33cbfa19e9963a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:35:21 -0300
Subject: [PATCH 122/348] Update _slug.js
---
docs/pages/docs/components/_slug.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/pages/docs/components/_slug.js b/docs/pages/docs/components/_slug.js
index 48ec37c4e40..c755e8b3f67 100644
--- a/docs/pages/docs/components/_slug.js
+++ b/docs/pages/docs/components/_slug.js
@@ -32,9 +32,9 @@ export default {
// Heading
h(AnchoredHeading, { props: { id: 'component-reference' } }, 'Component reference'),
// Component reference information
- ...this.meta.components.map(({ component, events, rootEventListeners, slots, aliases }) =>
+ ...this.meta.components.map(({ component, events, rootEventListeners, slots, aliases, props }) =>
h(Componentdoc, {
- props: { component, events, rootEventListeners, slots, aliases }
+ props: { component, events, rootEventListeners, slots, aliases, propsMeta: props }
})
),
// Component importing information
From c78abb7956fbef29bdbf62d9453b5a1bac90f992 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:38:29 -0300
Subject: [PATCH 123/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 571afa95f55..bfd918e5aae 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -283,7 +283,7 @@ export default {
// Returns the propsMeta array in object format for easy lookups
return this.propsMeta.reduce((obj, propMeta) => {
if (propMeta.prop) {
- obj[propMeta.prop]: propMeta
+ obj[propMeta.prop] = propMeta
}
return obj
}, {})
From 834d5e666695fcf308b04c22da35137bcf963935 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Thu, 19 Sep 2019 21:44:03 -0300
Subject: [PATCH 124/348] Update _slug.js
---
docs/pages/docs/components/_slug.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/pages/docs/components/_slug.js b/docs/pages/docs/components/_slug.js
index c755e8b3f67..3dd9b6cc125 100644
--- a/docs/pages/docs/components/_slug.js
+++ b/docs/pages/docs/components/_slug.js
@@ -32,10 +32,11 @@ export default {
// Heading
h(AnchoredHeading, { props: { id: 'component-reference' } }, 'Component reference'),
// Component reference information
- ...this.meta.components.map(({ component, events, rootEventListeners, slots, aliases, props }) =>
- h(Componentdoc, {
- props: { component, events, rootEventListeners, slots, aliases, propsMeta: props }
- })
+ ...this.meta.components.map(
+ ({ component, events, rootEventListeners, slots, aliases, props: propsMeta }) =>
+ h(Componentdoc, {
+ props: { component, events, rootEventListeners, slots, aliases, propsMeta }
+ })
),
// Component importing information
h(Importdoc, { props: { meta: this.meta } })
From afa2345da3c167d3e9c2369a957a92362bbea133 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Fri, 20 Sep 2019 17:01:22 -0300
Subject: [PATCH 125/348] Update create-web-types.js
---
scripts/create-web-types.js | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index a2864ea0259..90757828f4a 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -393,14 +393,17 @@ try {
// Create Vetur tags and attributes files
const veturTags = {}
const veturAttributes = {}
+ // Add component specific info
Object.keys(webTypes.contributions.html.tags).forEach(component => {
const def = webTypes.contributions.html.tags[component]
const tag = kebabCase(def.name)
+ // Component tag
veturTags[tag] = {
subtags: [],
description: def.description,
attributes: def.attributes.map(attrObj => kebabCase(attrObj.name))
}
+ // Component props
def.attributes.forEach(attrObj => {
const type = (attrObj.value || { type: 'any' }).type
veturAttributes[`${tag}/${kebabCase(attrObj.name)}`] = {
@@ -409,6 +412,15 @@ try {
}
})
})
+ // Add global directive "attributes"
+ Object.keys(webTypes.contributions.html.attributes).forEach(directive => {
+ const def = webTypes.contributions.html.attributes[directive]
+ const attr = kebabCase(def.name)
+ veturAttributes[attr] = {
+ global: true,
+ description: def.description
+ }
+ })
// Write web-types.json to file
console.log(' Writing dist/web-types.json...')
@@ -416,14 +428,14 @@ try {
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson)
// Write tags.json to file
- console.log(' Writing dist/tags.json...')
+ console.log(' Writing dist/vetur-tags.json...')
const veturTagsJson = JSON.stringify(veturTags, null, 2)
- fs.writeFileSync(path.resolve(distDir, 'tags.json'), veturTagsJson)
+ fs.writeFileSync(path.resolve(distDir, 'vetur-tags.json'), veturTagsJson)
// Write attributes.json to file
- console.log(' Writing dist/attributes.json...')
+ console.log(' Writing dist/vetur-attributes.json...')
const veturAttributesJson = JSON.stringify(veturAttributes, null, 2)
- fs.writeFileSync(path.resolve(distDir, 'attributes.json'), veturAttributesJson)
+ fs.writeFileSync(path.resolve(distDir, 'vetur-attributes.json'), veturAttributesJson)
// Done
} catch (err) {
From 83e208bef51f1c76aebd4c5a1b0cb1ebdc59b788 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Fri, 20 Sep 2019 17:01:51 -0300
Subject: [PATCH 126/348] Update package.json
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index ab03127a1d8..661361dc91d 100644
--- a/package.json
+++ b/package.json
@@ -11,8 +11,8 @@
"license": "MIT",
"types": "src/index.d.ts",
"vetur": {
- "tags": "dist/tags.json",
- "attributes": "dist/attributes.json"
+ "tags": "dist/vetur-tags.json",
+ "attributes": "dist/vetur-attributes.json"
},
"web-types": "dist/web-types.json",
"repository": "bootstrap-vue/bootstrap-vue",
From ff9239dc744c4b1e3bd3f266c74c32b7aeb394bb Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Fri, 20 Sep 2019 17:05:49 -0300
Subject: [PATCH 127/348] Update README.md
---
docs/markdown/intro/README.md | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/markdown/intro/README.md b/docs/markdown/intro/README.md
index e60cc9f5d6a..07221ffb086 100644
--- a/docs/markdown/intro/README.md
+++ b/docs/markdown/intro/README.md
@@ -700,15 +700,18 @@ above for an example.
## Tooling support
+Starting with version 2.1.0 of BootstrapVue, the following IDE autocompletion support files are
+included with the BootstrapVue distribution.
+
### VS Code + Vetur
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
-intellisense autocompletion for component attributes available when using the
+intellisense autocompletion for component tags, attributes, and directives available when using the
[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur). The helper
-json files are `dist/tags.json` and `dist/attributes.json`
+json files are `dist/vetur-tags.json` and `dist/vetur-attributes.json`
### JetBrains WebStorm web-types
BootstrapVue provides `dist/web-types.json` for autocompletion of component tags, attributes, slot
-names (and scoped properties), and directives. This file is for use with WebStorm and other
-IDEs that support the `web-types` schema specification.
+names (and scoped properties), and directives. This file is for use with WebStorm and other IDEs
+that support the `web-types` schema specification.
From 787ad12c3b91c678d6e7ad2da54a54168da7fd50 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Fri, 20 Sep 2019 17:08:03 -0300
Subject: [PATCH 128/348] Update README.md
---
docs/markdown/intro/README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/markdown/intro/README.md b/docs/markdown/intro/README.md
index 07221ffb086..083cfec6402 100644
--- a/docs/markdown/intro/README.md
+++ b/docs/markdown/intro/README.md
@@ -708,10 +708,12 @@ included with the BootstrapVue distribution.
If you are using [VS Code](https://code.visualstudio.com/) as your text editor, BootstrapVue has
intellisense autocompletion for component tags, attributes, and directives available when using the
[Vetur extension](https://marketplace.visualstudio.com/items?itemName=octref.vetur). The helper
-json files are `dist/vetur-tags.json` and `dist/vetur-attributes.json`
+json files are `dist/vetur-tags.json` and `dist/vetur-attributes.json`, and are indicated via the
+`"vetur"` entry in our `package.json` file.
### JetBrains WebStorm web-types
BootstrapVue provides `dist/web-types.json` for autocompletion of component tags, attributes, slot
names (and scoped properties), and directives. This file is for use with WebStorm and other IDEs
-that support the `web-types` schema specification.
+that support the `web-types` schema specification. The web-types file is indicated via the
+`"web-types"` entry in our `package.json` file.
From 491378af22e8f44f4a83ce88a2f1cce19efbc45b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 13:18:22 -0300
Subject: [PATCH 129/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index bfd918e5aae..54ff1531651 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -289,12 +289,17 @@ export default {
}, {})
},
propsFields() {
- return [
+ const fields = [
{ key: 'prop', label: 'Property' },
{ key: 'type', label: 'Type' },
- { key: 'defaultValue', label: 'Default Value' },
- { key: 'description', label: 'Description' }
+ { key: 'defaultValue', label: 'Default Value' }
]
+ if (this.propsItems.some(p => p.description)) {
+ // If any of the props have a description, then
+ // add the description column
+ fields.push({ key: 'description', label: 'Description' })
+ }
+ return fields
},
eventsFields() {
return [
From 878d3bc487a1a3722c449434bcd83397692ebe40 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 13:25:23 -0300
Subject: [PATCH 130/348] Update create-web-types.js
---
scripts/create-web-types.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 90757828f4a..36c3347d7d8 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -367,6 +367,7 @@ const processDirectiveGroup = groupSlug => {
processDirectiveMeta(directiveMeta, docUrl)
}
+// Wrapped in a try/catch to handle any errors
try {
// Grab the component meta data (from the source dir component's package.json)
const componentsContext = requireContext(
@@ -422,6 +423,10 @@ try {
}
})
+ // Write out json files.
+ // Note that `JSON.stringigy` will remove any object
+ // properties that have an `undefined` value
+
// Write web-types.json to file
console.log(' Writing dist/web-types.json...')
const webTypesJson = JSON.stringify(webTypes, null, 2)
From 3bd85cec65f679f48bc49712778638ed1001328c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:16:42 -0300
Subject: [PATCH 131/348] Create common-props.json
A json file with descriptions for common props uses by multiple components.
Mainly for router-link related props, so that they do not need to be repeated in every component's package.json meta
---
docs/common-props.json | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 docs/common-props.json
diff --git a/docs/common-props.json b/docs/common-props.json
new file mode 100644
index 00000000000..55f3913020f
--- /dev/null
+++ b/docs/common-props.json
@@ -0,0 +1,26 @@
+{
+ "href": {
+ "description": "Denotes the target URL of the link for standard a links"
+ },
+ "to": {
+ "description": "router-link prop: Denotes the target route of the link. When clicked, the value of the to prop will be passed to router.push() internally, so the value can be either a string or a Location descriptor object"
+ },
+ "replace": {
+ "description": "router-link prop: Setting replace prop will call router.replace() instead of router.push() when clicked, so the navigation will not leave a history record"
+ },
+ "append": {
+ "description": "router-link prop: Setting append prop always appends the relative path to the current path"
+ },
+ "exact": {
+ "description": "router-link prop: The default active class matching behavior is inclusive match. Setting this prop forces the mode to exactly match the route"
+ },
+ "activeClass": {
+ "description": "router-link prop: Configure the active CSS class applied when the link is active. typically you will want to set this to class name 'active'"
+ },
+ "exactActiveClass": {
+ "description": "router-link prop: Configure the active CSS class applied when the link is active with exact match. typically you will want to set this to class name 'active'"
+ },
+ "noPrefetch": {
+ "description": "nuxt-link prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport, Nuxt.js will automatically prefetch the code splitted page. Setting no-prefetch will disabled this feature for the specific link"
+ }
+}
From 5e949a116f1af933340634d9037e169dc9c0f78d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:21:40 -0300
Subject: [PATCH 132/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 54ff1531651..75dcd172f2f 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -217,6 +217,8 @@
import Vue from 'vue'
import kebabCase from 'lodash/kebabCase'
import AnchoredHeading from './anchored-heading'
+// Fallback descriptions for common props (mainly router-link props)
+import commonProps from '../../common-props.json'
export default {
name: 'BDVComponentdoc',
@@ -357,13 +359,19 @@ export default {
}
defaultVal = (defaultVal || '').replace(/"/g, "'")
+ const fallbackMeta = commonProps[prop] || {}
+
+ const description = typeof meta.description === 'undefined'
+ ? fallbackMeta.description
+ : meta.description
+
return {
prop: kebabCase(prop),
type,
typeClass,
defaultValue: defaultVal,
required: p.required || false,
- description: meta.description || '',
+ description: description || '',
deprecated: p.deprecated || false,
deprecation: p.deprecation || false,
_showDetails: typeof p.deprecated === 'string' || typeof p.deprecation === 'string'
From a3d277f25360ba7cc95982b146eb3e4e47c08677 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:26:33 -0300
Subject: [PATCH 133/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 75dcd172f2f..d8497edaec7 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -360,10 +360,8 @@ export default {
defaultVal = (defaultVal || '').replace(/"/g, "'")
const fallbackMeta = commonProps[prop] || {}
-
- const description = typeof meta.description === 'undefined'
- ? fallbackMeta.description
- : meta.description
+ const description =
+ typeof meta.description === 'undefined' ? fallbackMeta.description : meta.description
return {
prop: kebabCase(prop),
From 461725bc26f278c342456241d24a07220f6e24c7 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:36:22 -0300
Subject: [PATCH 134/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index d8497edaec7..af90efb3c54 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -218,7 +218,7 @@ import Vue from 'vue'
import kebabCase from 'lodash/kebabCase'
import AnchoredHeading from './anchored-heading'
// Fallback descriptions for common props (mainly router-link props)
-import commonProps from '../../common-props.json'
+import commonProps from '../common-props.json'
export default {
name: 'BDVComponentdoc',
From b0e54f9c3c5c03f8e3e0a27f6b88ce84d390b2bc Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:44:30 -0300
Subject: [PATCH 135/348] Update create-web-types.js
---
scripts/create-web-types.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 36c3347d7d8..83a149688d0 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -5,6 +5,7 @@ const requireContext = require('require-context')
const baseDir = path.resolve(__dirname, '..')
const distDir = path.resolve(baseDir, 'dist')
+const docsDir = path.resolve(baseDir, 'docs')
// Import project package.json
const pkg = require(path.resolve(baseDir, 'package.json'))
@@ -13,6 +14,10 @@ const libraryName = pkg.name
const libraryVersion = pkg.version
const baseDocs = pkg.homepage.replace(/\/$/, '')
+// Import common props fallback meta description file
+// Note file is a lookup hash
+const commonPropsMeta = require(path.resolve(docsDir, 'common-props.json'))
+
// Placeholder arrays
let componentGroups = {}
let directiveGroups = {}
@@ -154,6 +159,7 @@ const processComponentMeta = (meta, groupRef, docUrl) => {
tag.attributes = Object.keys($props).map(propName => {
const $prop = $props[propName]
const $propExtra = $propsExtra[propName] || {}
+ const $propFallbackExtra = commonPropsMeta[propName] || {}
const type = computePropType($prop)
const prop = {
name: propName,
@@ -174,8 +180,12 @@ const processComponentMeta = (meta, groupRef, docUrl) => {
}
// If we have a description, add it to the prop
// TODO: this doesn't exist in the component meta yet
- if ($propExtra.description) {
- prop.description = $propExtra.description
+ prop.description = typeof $propExtra.description === 'undefined'
+ ? $propFallbackExtra.description
+ : $propExtra.description
+ if (!prop.description) {
+ // JSON stringification will remove properties with an undefined value
+ prop.description = undefined
}
// TODO: this doesn't exist in the component meta yet
if ($propExtra.href) {
From 78d428e69a987e163dc64e8598f3aa825ecd92e3 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:49:23 -0300
Subject: [PATCH 136/348] Update create-web-types.js
---
scripts/create-web-types.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index 83a149688d0..e0fd5b09e32 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -180,9 +180,10 @@ const processComponentMeta = (meta, groupRef, docUrl) => {
}
// If we have a description, add it to the prop
// TODO: this doesn't exist in the component meta yet
- prop.description = typeof $propExtra.description === 'undefined'
- ? $propFallbackExtra.description
- : $propExtra.description
+ prop.description =
+ typeof $propExtra.description === 'undefined'
+ ? $propFallbackExtra.description
+ : $propExtra.description
if (!prop.description) {
// JSON stringification will remove properties with an undefined value
prop.description = undefined
From 7be17f7c66649c953df860ec489dd397559f69b7 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 14:58:20 -0300
Subject: [PATCH 137/348] Update common-props.json
---
docs/common-props.json | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 55f3913020f..3388f7bce5e 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -1,4 +1,13 @@
{
+ "disabled": {
+ "description": "When set to 'true', disables the component's functionality and places it in a disabled state"
+ },
+ "active": {
+ "description": "When set to 'true', places the component in the active state with active styling"
+ },
+ "rel": {
+ "description": "Sets the 'rel' attribute on the rendered link"
+ },
"href": {
"description": "Denotes the target URL of the link for standard a links"
},
@@ -15,10 +24,13 @@
"description": "router-link prop: The default active class matching behavior is inclusive match. Setting this prop forces the mode to exactly match the route"
},
"activeClass": {
- "description": "router-link prop: Configure the active CSS class applied when the link is active. typically you will want to set this to class name 'active'"
+ "description": "router-link prop: Configure the active CSS class applied when the link is active. Typically you will want to set this to class name 'active'"
},
"exactActiveClass": {
- "description": "router-link prop: Configure the active CSS class applied when the link is active with exact match. typically you will want to set this to class name 'active'"
+ "description": "router-link prop: Configure the active CSS class applied when the link is active with exact match. Typically you will want to set this to class name 'active'"
+ },
+ "routerTag": {
+ "description": "router-link prop: Specify which tag to render, and it will still listen to click events for navigation. 'router-tag' translates to the tag prop on the final rendered router-link. Typically you should use the default value"
},
"noPrefetch": {
"description": "nuxt-link prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport, Nuxt.js will automatically prefetch the code splitted page. Setting no-prefetch will disabled this feature for the specific link"
From 02534a9622d799788a15606b8624d8542c6e93ae Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:03:38 -0300
Subject: [PATCH 138/348] Update package.json
---
src/components/link/package.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/components/link/package.json b/src/components/link/package.json
index a5134e7c87f..ea97448af12 100644
--- a/src/components/link/package.json
+++ b/src/components/link/package.json
@@ -7,6 +7,14 @@
"components": [
{
"component": "BLink",
+ "props": {
+ "target": {
+ "description": "Sets the 'target' attribute on the rendered link"
+ },
+ "event": {
+ "description": "router-link prop: The event to use to trigger the link. You should leave this at the default value"
+ }
+ },
"events": [
{
"event": "click",
From 244c6d346b6e21a9b4ffe0a69e6d92233a4c67a8 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:06:31 -0300
Subject: [PATCH 139/348] Update common-props.json
---
docs/common-props.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 3388f7bce5e..7cf0334cdea 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -15,7 +15,7 @@
"description": "router-link prop: Denotes the target route of the link. When clicked, the value of the to prop will be passed to router.push() internally, so the value can be either a string or a Location descriptor object"
},
"replace": {
- "description": "router-link prop: Setting replace prop will call router.replace() instead of router.push() when clicked, so the navigation will not leave a history record"
+ "description": "router-link prop: Setting the replace prop will call 'router.replace()' instead of 'router.push()' when clicked, so the navigation will not leave a history record"
},
"append": {
"description": "router-link prop: Setting append prop always appends the relative path to the current path"
@@ -33,6 +33,6 @@
"description": "router-link prop: Specify which tag to render, and it will still listen to click events for navigation. 'router-tag' translates to the tag prop on the final rendered router-link. Typically you should use the default value"
},
"noPrefetch": {
- "description": "nuxt-link prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport, Nuxt.js will automatically prefetch the code splitted page. Setting no-prefetch will disabled this feature for the specific link"
+ "description": "nuxt-link prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport, Nuxt.js will automatically prefetch the code splitted page. Setting 'no-prefetch' will disabled this feature for the specific link"
}
}
From 3eaadb2a782b8f3e28ae6a1de006687d42e4f2fc Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:15:21 -0300
Subject: [PATCH 140/348] Update package.json
---
src/components/link/package.json | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/components/link/package.json b/src/components/link/package.json
index ea97448af12..4ba5c2c7b8c 100644
--- a/src/components/link/package.json
+++ b/src/components/link/package.json
@@ -7,14 +7,16 @@
"components": [
{
"component": "BLink",
- "props": {
- "target": {
+ "props": [
+ {
+ "prop": "target",
"description": "Sets the 'target' attribute on the rendered link"
},
- "event": {
+ {
+ "prop": "event",
"description": "router-link prop: The event to use to trigger the link. You should leave this at the default value"
}
- },
+ ],
"events": [
{
"event": "click",
From 17759f182486b7460dfd0965a966c0b1f44f38f7 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:24:59 -0300
Subject: [PATCH 141/348] Update create-web-types.js
---
scripts/create-web-types.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/create-web-types.js b/scripts/create-web-types.js
index e0fd5b09e32..3fcf71f49ed 100644
--- a/scripts/create-web-types.js
+++ b/scripts/create-web-types.js
@@ -130,7 +130,11 @@ const processComponentMeta = (meta, groupRef, docUrl) => {
const $aliases = meta.aliases || []
// This doesn't exist yet (for prop descriptions, info)
// For description (and possibly more) for props docs
- const $propsExtra = meta.props || {}
+ // source isarray format, so we convert to a hash object
+ const $propsExtra = (meta.props || []).reduce((obj, p) => {
+ obj[p.prop] = p
+ return obj
+ }, {})
const tagName = kebabCase(componentName)
From 7172d1074b653abe1edcf6abe0d86283ca70856a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:50:05 -0300
Subject: [PATCH 142/348] Update package.json
---
src/components/popover/package.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/components/popover/package.json b/src/components/popover/package.json
index 6b9d95f907d..e83cb3eacfb 100644
--- a/src/components/popover/package.json
+++ b/src/components/popover/package.json
@@ -10,6 +10,12 @@
"components": [
{
"component": "BPopover",
+ "props": [
+ {
+ "prop": "target",
+ "description": "Element string ID, or a reference to an element or component, that you want to trigger the popover."
+ }
+ ],
"events": [
{
"event": "show",
From 2380dd350507195f473942ddb0fdba9cb2b812d8 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:50:36 -0300
Subject: [PATCH 143/348] Update package.json
---
src/components/tooltip/package.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/components/tooltip/package.json b/src/components/tooltip/package.json
index 28c92d60cb8..fce5cffb89a 100644
--- a/src/components/tooltip/package.json
+++ b/src/components/tooltip/package.json
@@ -10,6 +10,12 @@
"components": [
{
"component": "BTooltip",
+ "props": [
+ {
+ "prop": "target",
+ "description": "Element string ID, or a reference to an element or component, that you want to trigger the tooltip."
+ }
+ ],
"events": [
{
"event": "show",
From be73577f39788b6013ffb62187a2876281bbe5c1 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:51:43 -0300
Subject: [PATCH 144/348] Update common-props.json
---
docs/common-props.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index 7cf0334cdea..72cdd530c19 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -8,6 +8,9 @@
"rel": {
"description": "Sets the 'rel' attribute on the rendered link"
},
+ "target": {
+ "description": "Sets the 'target' attribute on the rendered link"
+ },
"href": {
"description": "Denotes the target URL of the link for standard a links"
},
From 374ba441821fbfd4d8b13f534d82792716f515c3 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:54:02 -0300
Subject: [PATCH 145/348] Update common-props.json
---
docs/common-props.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index 72cdd530c19..9ede352f9bd 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -1,4 +1,7 @@
{
+ "id": {
+ "description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
+ },
"disabled": {
"description": "When set to 'true', disables the component's functionality and places it in a disabled state"
},
From dc425e0571bd68ecc12a3865c82f2fe8fd689159 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:56:32 -0300
Subject: [PATCH 146/348] Update common-props.json
---
docs/common-props.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index 9ede352f9bd..c9718f766e3 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -1,4 +1,10 @@
{
+ "size": {
+ "description": "Set the size of the component's appearence. 'sm', 'md' (default), or 'lg'"
+ },
+ "noFade": {
+ "description": "When set to 'true', disables the fade animation/transition on the component"
+ }
"id": {
"description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
},
From 97340809a05c51169d8f7c29e9413822c162b414 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 15:58:33 -0300
Subject: [PATCH 147/348] Update common-props.json
---
docs/common-props.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index c9718f766e3..7de8beb1803 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -4,7 +4,7 @@
},
"noFade": {
"description": "When set to 'true', disables the fade animation/transition on the component"
- }
+ },
"id": {
"description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
},
From 791a2527508b3f3775d85930cde3266be56b755d Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 16:03:19 -0300
Subject: [PATCH 148/348] Update common-props.json
---
docs/common-props.json | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 7de8beb1803..ecb66a5c676 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -1,13 +1,22 @@
{
+ "id": {
+ "description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
+ },
+ "tag": {
+ "description": "Specify the HTML tag to render instead of hte default tag"
+ },
"size": {
"description": "Set the size of the component's appearence. 'sm', 'md' (default), or 'lg'"
},
+ "state": {
+ "description": "Controls the validation state appearence of hte component. 'true' for valid, 'false' for invalid', or 'null' for no validation state"
+ },
+ "role": {
+ "description": "Sets the ARIA attribute 'role' to a specific value"
+ },
"noFade": {
"description": "When set to 'true', disables the fade animation/transition on the component"
},
- "id": {
- "description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
- },
"disabled": {
"description": "When set to 'true', disables the component's functionality and places it in a disabled state"
},
From 9a27da5bca6176f4f5dffae8406c9a8d1c9f1657 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 16:05:36 -0300
Subject: [PATCH 149/348] Update common-props.json
---
docs/common-props.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index ecb66a5c676..31742447973 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -1,6 +1,6 @@
{
"id": {
- "description": "Used to set the 'id' attribute on the rendered content, and used as teh base to generate any additional element IDs as needed"
+ "description": "Used to set the 'id' attribute on the rendered content, and used as the base to generate any additional element IDs as needed"
},
"tag": {
"description": "Specify the HTML tag to render instead of hte default tag"
From f13c8e6e35f34852fa7a2708e125b4f6f2d3800e Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 17:39:00 -0300
Subject: [PATCH 150/348] Update common-props.json
---
docs/common-props.json | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index 31742447973..49f34671a0e 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -2,6 +2,9 @@
"id": {
"description": "Used to set the 'id' attribute on the rendered content, and used as the base to generate any additional element IDs as needed"
},
+ "variant": {
+ "description": "Applies on of the Bootstra theme colar variants to the component"
+ },
"tag": {
"description": "Specify the HTML tag to render instead of hte default tag"
},
@@ -14,6 +17,9 @@
"role": {
"description": "Sets the ARIA attribute 'role' to a specific value"
},
+ "fade": {
+ "description": "When set to 'true', enables the fade animation/transition on the component"
+ },
"noFade": {
"description": "When set to 'true', disables the fade animation/transition on the component"
},
@@ -53,6 +59,9 @@
"routerTag": {
"description": "router-link prop: Specify which tag to render, and it will still listen to click events for navigation. 'router-tag' translates to the tag prop on the final rendered router-link. Typically you should use the default value"
},
+ "event": {
+ "description": "router-link prop: Specify the event that triggers the link. In most cases you should leave this as the default"
+ },
"noPrefetch": {
"description": "nuxt-link prop: To improve the responsiveness of your Nuxt.js applications, when the link will be displayed within the viewport, Nuxt.js will automatically prefetch the code splitted page. Setting 'no-prefetch' will disabled this feature for the specific link"
}
From 9ccf98de2deeeb9c97c8cb4f028b5b6b90fdcfff Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 17:40:07 -0300
Subject: [PATCH 151/348] Update package.json
---
src/components/link/package.json | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/components/link/package.json b/src/components/link/package.json
index 4ba5c2c7b8c..b5eeac7d923 100644
--- a/src/components/link/package.json
+++ b/src/components/link/package.json
@@ -7,16 +7,7 @@
"components": [
{
"component": "BLink",
- "props": [
- {
- "prop": "target",
- "description": "Sets the 'target' attribute on the rendered link"
- },
- {
- "prop": "event",
- "description": "router-link prop: The event to use to trigger the link. You should leave this at the default value"
- }
- ],
+ "props": [],
"events": [
{
"event": "click",
From 9e4a6f5330d7d8033d189158fece2914821db053 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 17:45:10 -0300
Subject: [PATCH 152/348] Update common-props.json
---
docs/common-props.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 49f34671a0e..d313a3cce0c 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -3,10 +3,10 @@
"description": "Used to set the 'id' attribute on the rendered content, and used as the base to generate any additional element IDs as needed"
},
"variant": {
- "description": "Applies on of the Bootstra theme colar variants to the component"
+ "description": "Applies one of the Bootstrap theme color variants to the component"
},
"tag": {
- "description": "Specify the HTML tag to render instead of hte default tag"
+ "description": "Specify the HTML tag to render instead of the default tag"
},
"size": {
"description": "Set the size of the component's appearence. 'sm', 'md' (default), or 'lg'"
From ca3f743a7e9e3541302ff9a48d5e5322f6e01a69 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 17:50:22 -0300
Subject: [PATCH 153/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index af90efb3c54..9c5248dd0c6 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -51,7 +51,8 @@
{{ value }}
Required
- Deprecated
+ v-model
+ Deprecated
Deprecation
@@ -275,8 +276,8 @@ export default {
return this.componentOptions.functional
},
componentVModel() {
- const model = this.componentOptions.model
- return model && model.prop && model.event ? model : false
+ const model = this.componentOptions.model || {}
+ return model.prop && model.event ? model : false
},
componentProps() {
return this.componentOptions.props || {}
@@ -370,6 +371,7 @@ export default {
defaultValue: defaultVal,
required: p.required || false,
description: description || '',
+ isVModel: this.componentVModel && componentVModel.prop === prop,
deprecated: p.deprecated || false,
deprecation: p.deprecation || false,
_showDetails: typeof p.deprecated === 'string' || typeof p.deprecation === 'string'
From 6d3eb52888db240c272207bfc06025925bb3b00c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:00:15 -0300
Subject: [PATCH 154/348] Update common-props.json
---
docs/common-props.json | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index d313a3cce0c..c8cd19ad11c 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -11,9 +11,36 @@
"size": {
"description": "Set the size of the component's appearence. 'sm', 'md' (default), or 'lg'"
},
+ "required": {
+ "description": "Adds the 'required' attribute to the form control"
+ },
+ "form": {
+ "description": "ID of the form that the form control belongs to. Sets the 'form' attribute on the control."
+ },
+ "autofocus": {
+ "description": "When set to 'true', auto-focuses the control once it is mounted. Does not set the 'autofocus' attribute on the control"
+ },
"state": {
"description": "Controls the validation state appearence of hte component. 'true' for valid, 'false' for invalid', or 'null' for no validation state"
},
+ "options": {
+ "description": "Array of items to render in the component"
+ },
+ "value-field": {
+ "description": "Field name in the 'options' array that should be used for the value"
+ },
+ "text-field": {
+ "description": "Field name in the 'options' array that should be used for the text label"
+ },
+ "html-field": {
+ "description": "Field name in the 'options' array that should be used for the html label instead of text field. Use with caution."
+ },
+ "disabled-field": {
+ "description": "Field name in the 'options' array that should be used for the disabled state"
+ },
+ "plain": {
+ "description": "Render the form control in plain mode, rahter than custom styled mode"
+ },
"role": {
"description": "Sets the ARIA attribute 'role' to a specific value"
},
From d3e9a33c638dc8d0fac16eaa9d99e68b6982dbf1 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:00:50 -0300
Subject: [PATCH 155/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 9c5248dd0c6..a9e643c6d92 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -371,7 +371,7 @@ export default {
defaultValue: defaultVal,
required: p.required || false,
description: description || '',
- isVModel: this.componentVModel && componentVModel.prop === prop,
+ isVModel: this.componentVModel && this.componentVModel.prop === prop,
deprecated: p.deprecated || false,
deprecation: p.deprecation || false,
_showDetails: typeof p.deprecated === 'string' || typeof p.deprecation === 'string'
From 1a29a5a63fb879dbd2a9a9aa32d5cc54cd8d6be2 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:13:03 -0300
Subject: [PATCH 156/348] Update common-props.json
---
docs/common-props.json | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index c8cd19ad11c..01309fded4f 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -26,24 +26,30 @@
"options": {
"description": "Array of items to render in the component"
},
- "value-field": {
+ "valueField": {
"description": "Field name in the 'options' array that should be used for the value"
},
- "text-field": {
+ "textField": {
"description": "Field name in the 'options' array that should be used for the text label"
},
- "html-field": {
+ "htmlField": {
"description": "Field name in the 'options' array that should be used for the html label instead of text field. Use with caution."
},
- "disabled-field": {
+ "disabledField": {
"description": "Field name in the 'options' array that should be used for the disabled state"
},
"plain": {
"description": "Render the form control in plain mode, rahter than custom styled mode"
},
+ "static": {
+ "description": "Renders the content of the component in-place in the DOM, rather than portalling it to be appended to the body element"
+ },
"role": {
"description": "Sets the ARIA attribute 'role' to a specific value"
},
+ "ariaLive": {
+ "description": "When the rendered element is an aria-live region (for screen reader users), set to either 'polite' or 'assertive'"
+ },
"fade": {
"description": "When set to 'true', enables the fade animation/transition on the component"
},
From 850c3d839de2e00a7afb0c7e995969b35f020cba Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:31:26 -0300
Subject: [PATCH 157/348] Update common-props.json
---
docs/common-props.json | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 01309fded4f..d600b7bde7a 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -15,7 +15,22 @@
"description": "Adds the 'required' attribute to the form control"
},
"form": {
- "description": "ID of the form that the form control belongs to. Sets the 'form' attribute on the control."
+ "description": "ID of the form that the form control belongs to. Sets the 'form' attribute on the control"
+ },
+ "name": {
+ "description": "Sets the value of hte 'name' attribute on the form control"
+ },
+ "placeholder": {
+ "description": "Sets the 'placeholder' attribute value on the form control"
+ },
+ "readonly": {
+ "description": "Sets the 'readonly' attribute on hte form control"
+ },
+ "plaintext": {
+ "description" "Set the form control as readonly and renders the control to look like plain text (no borders)"
+ },
+ "autocomplete": {
+ "description": "Sets the 'autocomplete' attribute value on hte form control"
},
"autofocus": {
"description": "When set to 'true', auto-focuses the control once it is mounted. Does not set the 'autofocus' attribute on the control"
From 65831399f8be33774d24fac39e59200028f99228 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:36:39 -0300
Subject: [PATCH 158/348] Update package.json
---
src/components/input-group/package.json | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/components/input-group/package.json b/src/components/input-group/package.json
index 429f193d6dd..53774adabb0 100644
--- a/src/components/input-group/package.json
+++ b/src/components/input-group/package.json
@@ -7,6 +7,24 @@
"components": [
{
"component": "BInputGroup",
+ "props": [
+ {
+ "prop": "append",
+ "description": "Text to append to the input group"
+ },
+ {
+ "prop": "appendHtml",
+ "description": "HTML string to append to the input group. Has precedence over 'append' prop. Use with caution"
+ },
+ {
+ "prop": "prepend",
+ "description": "Text to prepend to the input group"
+ },
+ {
+ "prop": "prependHtml",
+ "description": "HTML string to prepend to the input group. Has precedence over 'prepend' prop. Use with caution"
+ }
+ ],
"slots": [
{
"name": "prepend",
From a4d9e15da2f78a184890be70a35b91d04f2abe69 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:45:57 -0300
Subject: [PATCH 159/348] Update common-props.json
---
docs/common-props.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index d600b7bde7a..161dc672062 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -18,7 +18,7 @@
"description": "ID of the form that the form control belongs to. Sets the 'form' attribute on the control"
},
"name": {
- "description": "Sets the value of hte 'name' attribute on the form control"
+ "description": "Sets the value of the 'name' attribute on the form control"
},
"placeholder": {
"description": "Sets the 'placeholder' attribute value on the form control"
@@ -27,16 +27,16 @@
"description": "Sets the 'readonly' attribute on hte form control"
},
"plaintext": {
- "description" "Set the form control as readonly and renders the control to look like plain text (no borders)"
+ "description": "Set the form control as readonly and renders the control to look like plain text (no borders)"
},
"autocomplete": {
- "description": "Sets the 'autocomplete' attribute value on hte form control"
+ "description": "Sets the 'autocomplete' attribute value on the form control"
},
"autofocus": {
"description": "When set to 'true', auto-focuses the control once it is mounted. Does not set the 'autofocus' attribute on the control"
},
"state": {
- "description": "Controls the validation state appearence of hte component. 'true' for valid, 'false' for invalid', or 'null' for no validation state"
+ "description": "Controls the validation state appearence of the component. 'true' for valid, 'false' for invalid', or 'null' for no validation state"
},
"options": {
"description": "Array of items to render in the component"
From 5b962b8d91008c50e9d19e461d920a207ca83c57 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:46:26 -0300
Subject: [PATCH 160/348] Update package.json
---
src/components/input-group/package.json | 39 ++++++++++++++++++++++---
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/src/components/input-group/package.json b/src/components/input-group/package.json
index 53774adabb0..d92a03f7391 100644
--- a/src/components/input-group/package.json
+++ b/src/components/input-group/package.json
@@ -36,10 +36,41 @@
}
]
},
- "BInputGroupPrepend",
- "BInputGroupAppend",
- "BInputGroupText",
- "BInputGroupAddon"
+ {
+ "component": "BInputGroupPrepend",
+ "props": [
+ {
+ "prop": "isText",
+ "description": "When 'true', wraps the content in a b-input-group-text component"
+ }
+ ]
+ },
+ {
+ "component": "BInputGroupAppend",
+ "props": [
+ {
+ "prop": "isText",
+ "description": "When 'true', wraps the content in a b-input-group-text component"
+ }
+ ]
+ },
+ {
+ "component": "BInputGroupText",
+ "props": []
+ },
+ {
+ "component": "BInputGroupAddon",
+ "props": [
+ {
+ "prop": "append",
+ "description": "When set to 'true' sets the addon as being appended. defaults to 'false' which is prepended"
+ },
+ {
+ "prop": "isText",
+ "description": "When 'true', wraps the content in a b-input-group-text component"
+ }
+ ]
+ }
]
}
}
From 160efaeaa47ef7d7aa01595147bfef5274819e78 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:54:21 -0300
Subject: [PATCH 161/348] Update package.json
---
src/components/alert/package.json | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/components/alert/package.json b/src/components/alert/package.json
index 6202144f4e6..a102b6b6054 100644
--- a/src/components/alert/package.json
+++ b/src/components/alert/package.json
@@ -7,6 +7,20 @@
"components": [
{
"component": "BAlert",
+ "props": [
+ {
+ "prop": "dismissible",
+ "description": "When set to 'true', enables the dimiss close button"
+ },
+ {
+ "prop": "dismissLabel",
+ "description": "Value for the 'aria-label' attribute on the dismiss button"
+ },
+ {
+ "prop": "show",
+ "description": "When set to 'true', shows the alert. Set to a number (seconds) to show and automatically dismiss the alert after the number of seconds has elapsed"
+ }
+ ],
"events": [
{
"event": "dismissed",
From 349aae9146ae6e3d4d5db9372ee08a977f736d52 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:56:06 -0300
Subject: [PATCH 162/348] Update package.json
---
src/components/badge/package.json | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/components/badge/package.json b/src/components/badge/package.json
index 2f3f34c3909..529bd691854 100644
--- a/src/components/badge/package.json
+++ b/src/components/badge/package.json
@@ -5,7 +5,15 @@
"title": "Badge",
"description": "Small and adaptive tag for adding context to just about any content.",
"components": [
- "BBadge"
+ {
+ "component": "BBadge",
+ "props": [
+ {
+ "prop": "pill",
+ "description": "When set to 'true', denders the badge in pill style"
+ }
+ ]
+ }
]
}
}
From 0ea948286aa7afd4c56d6b484cfa2d3cac22c28c Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 18:59:20 -0300
Subject: [PATCH 163/348] Update package.json
---
src/components/breadcrumb/package.json | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/components/breadcrumb/package.json b/src/components/breadcrumb/package.json
index d82ed5b5381..3f61f2ff3ed 100644
--- a/src/components/breadcrumb/package.json
+++ b/src/components/breadcrumb/package.json
@@ -5,9 +5,27 @@
"title": "Breadcrumb",
"description": "Indicate the current page's location within a navigational hierarchy. Separators are automatically added in CSS through ::before and content.",
"components": [
- "BBreadcrumb",
+ {
+ "component": "BBreadcrumb",
+ "props": [
+ {
+ "prop": "items",
+ "description": "Array of breadcrumb items to render"
+ }
+ ]
+ },
{
"component": "BBreadcrumbItem",
+ "props": [
+ {
+ "prop": "text",
+ "description": "Text to render in the breadcrumb item"
+ },
+ {
+ "prop": "html",
+ "description": "HTML string to render in the breadcrumb item. Use with caution"
+ },
+ ],
"events": [
{
"event": "click",
From 6109a65dd10a3fb764341a6f00745e3997518373 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:01:11 -0300
Subject: [PATCH 164/348] Update package.json
---
src/components/breadcrumb/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/breadcrumb/package.json b/src/components/breadcrumb/package.json
index 3f61f2ff3ed..35bba657322 100644
--- a/src/components/breadcrumb/package.json
+++ b/src/components/breadcrumb/package.json
@@ -24,7 +24,7 @@
{
"prop": "html",
"description": "HTML string to render in the breadcrumb item. Use with caution"
- },
+ }
],
"events": [
{
From 55768d02fdec1c308568195fece28620e4f630c1 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:02:19 -0300
Subject: [PATCH 165/348] Update package.json
---
src/components/breadcrumb/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/breadcrumb/package.json b/src/components/breadcrumb/package.json
index 35bba657322..643e7920b8f 100644
--- a/src/components/breadcrumb/package.json
+++ b/src/components/breadcrumb/package.json
@@ -32,7 +32,7 @@
"description": "Emitted when clicked",
"args": [
{
- "name": "event",
+ "arg": "event",
"type": "MouseEvent",
"description": "Native click event object"
}
From 755c03aef6a741ac24d8b7fa5cab127d6ae7d103 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:27:26 -0300
Subject: [PATCH 166/348] Update common-props.json
---
docs/common-props.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/common-props.json b/docs/common-props.json
index 161dc672062..c9661adfec0 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -33,7 +33,7 @@
"description": "Sets the 'autocomplete' attribute value on the form control"
},
"autofocus": {
- "description": "When set to 'true', auto-focuses the control once it is mounted. Does not set the 'autofocus' attribute on the control"
+ "description": "When set to 'true', attempts to auto-focus the control when it is mounted, or re-actived when in a keep-alive. Does not set the 'autofocus' attribute on the control"
},
"state": {
"description": "Controls the validation state appearence of the component. 'true' for valid, 'false' for invalid', or 'null' for no validation state"
From d40fa78f9f58e8a334965a7d29d084b280a3346a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:28:49 -0300
Subject: [PATCH 167/348] Update importdoc.vue
---
docs/components/importdoc.vue | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue
index 62cd2a21d3e..c246369c47b 100644
--- a/docs/components/importdoc.vue
+++ b/docs/components/importdoc.vue
@@ -16,10 +16,9 @@
@@ -51,10 +50,9 @@
@@ -90,11 +88,10 @@
From aafe6750ae27a283e3aea4430ac7b47214d47782 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:36:00 -0300
Subject: [PATCH 168/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 48 +++++++++++++++++++-------------
1 file changed, 29 insertions(+), 19 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index a9e643c6d92..51794d4aa9b 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -67,26 +67,33 @@
+
+ This component supports generating
+ <router-link> and
+ <nuxt-link> components. For more
+ details on the router link specific props, see the
+ [Router support](/docs/reference/router-links) reference section.
+
+
-
-
- v-model
-
-
-
- {{ kebabCase(value) }}
-
-
- {{ value }}
-
-
-
+
+
+ v-model
+
+
+
+ {{ kebabCase(value) }}
+
+
+ {{ value }}
+
+
@@ -282,6 +289,9 @@ export default {
componentProps() {
return this.componentOptions.props || {}
},
+ hasRouterProps() {
+ return this.propsItems.some(p => p.prop === 'to')
+ },
componentPropsMetaObj() {
// Returns the propsMeta array in object format for easy lookups
return this.propsMeta.reduce((obj, propMeta) => {
From 6ff0aa1cdf506bf3452bbfbe59c4e32dc19c115a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:45:45 -0300
Subject: [PATCH 169/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 51794d4aa9b..fe0515b73fc 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -72,7 +72,7 @@
<router-link> and
<nuxt-link> components. For more
details on the router link specific props, see the
- [Router support](/docs/reference/router-links) reference section.
+ Router support reference section.
From 67b45e7cb4debc359d70b9c0a56c6f0133ae27e6 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:48:09 -0300
Subject: [PATCH 170/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index fe0515b73fc..a32951b8399 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -67,12 +67,13 @@
-
+
This component supports generating
<router-link> and
<nuxt-link> components. For more
details on the router link specific props, see the
- Router support reference section.
+ Router support
+ reference section.
From 5ee7cc630c7a5e3ebde89ceaee6eabf86218539b Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 19:50:25 -0300
Subject: [PATCH 171/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index a32951b8399..0289328722d 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -67,8 +67,8 @@
-
- This component supports generating
+
+ {{ tag }} supports generating
<router-link> and
<nuxt-link> components. For more
details on the router link specific props, see the
From 7240c82e0d3a640ec463d7cf9ff4cef62abfaf7f Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:00:11 -0300
Subject: [PATCH 172/348] Update common-props.json
---
docs/common-props.json | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index c9661adfec0..f9f9f2735ec 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -5,6 +5,9 @@
"variant": {
"description": "Applies one of the Bootstrap theme color variants to the component"
},
+ "textVariant": {
+ "description": "Applies one of the Bootstrap theme color variants to the text"
+ },
"tag": {
"description": "Specify the HTML tag to render instead of the default tag"
},
@@ -62,6 +65,12 @@
"role": {
"description": "Sets the ARIA attribute 'role' to a specific value"
},
+ "ariaRole": {
+ "description": "Sets the ARIA attribute 'role' to a specific value"
+ },
+ "ariaLabel": {
+ "description": "Sets the value of 'aria-label' attribute on the rendered element"
+ },
"ariaLive": {
"description": "When the rendered element is an aria-live region (for screen reader users), set to either 'polite' or 'assertive'"
},
From a920c6358644135e78017a40c1d283544b3273c2 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:07:24 -0300
Subject: [PATCH 173/348] Update common-props.json
---
docs/common-props.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/common-props.json b/docs/common-props.json
index f9f9f2735ec..8130fd2531e 100644
--- a/docs/common-props.json
+++ b/docs/common-props.json
@@ -8,6 +8,12 @@
"textVariant": {
"description": "Applies one of the Bootstrap theme color variants to the text"
},
+ "bgVariant": {
+ "description": "Applies one of the Bootstrap theme color variants to the background"
+ },
+ "borderVariant": {
+ "description": "Applies one of the Bootstrap theme color variants to the border"
+ },
"tag": {
"description": "Specify the HTML tag to render instead of the default tag"
},
From b4a399b2ea382250957bc0eab82ae22d3de8aeae Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:09:38 -0300
Subject: [PATCH 174/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 0289328722d..558574ca6da 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -69,9 +69,9 @@
{{ tag }} supports generating
- <router-link> and
- <nuxt-link> components. For more
- details on the router link specific props, see the
+ <router-link> or
+ <nuxt-link> component (if using Nuxt.js).
+ For more details on the router link (or nuxt link) specific props, see the
Router support
reference section.
From a93492140b3c9cfa21b8150a264a3f38975ffbde Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:16:09 -0300
Subject: [PATCH 175/348] Update package.json
---
src/components/breadcrumb/package.json | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/breadcrumb/package.json b/src/components/breadcrumb/package.json
index 643e7920b8f..1207101cc6f 100644
--- a/src/components/breadcrumb/package.json
+++ b/src/components/breadcrumb/package.json
@@ -24,6 +24,10 @@
{
"prop": "html",
"description": "HTML string to render in the breadcrumb item. Use with caution"
+ },
+ {
+ "prop": "ariaCurrent",
+ "description": "Sets the value of the 'aria-current' attribute (when the item is the active item). Supported string values are 'location', 'page', or 'true'"
}
],
"events": [
From 1e28ca064720a5c8184927e05c925ab4631cb8e9 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:23:15 -0300
Subject: [PATCH 176/348] Update package.json
---
src/components/button/package.json | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/components/button/package.json b/src/components/button/package.json
index a6fb8114c93..cb86fa1bba3 100644
--- a/src/components/button/package.json
+++ b/src/components/button/package.json
@@ -10,6 +10,28 @@
"aliases": [
"BBtn"
],
+ "props": [
+ {
+ "prop": "block",
+ "description": "Renders a 100% width button (expands to the width of it's parent container)"
+ },
+ {
+ "prop": "type",
+ "description": "The value to set teh buttons's 'type' attribute to. Can be one of 'button', 'submit', or 'reset'"
+ },
+ {
+ "prop": "pill",
+ "description": "Renders the button with the pill style appearance when set to 'true'"
+ },
+ {
+ "prop": "squared",
+ "description": "Renders the button with non-rounded corners when set to 'true'"
+ },
+ {
+ "prop": "pressed",
+ "description": "When set to 'true', gives the button the appearance of being pressed. Syncable with the .sync modifier"
+ }
+ ],
"events": [
{
"event": "click",
From 99270efb8ba6a2601dddbe43ed370f5a75bb2d9a Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:27:43 -0300
Subject: [PATCH 177/348] Update package.json
---
src/components/button-group/package.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/components/button-group/package.json b/src/components/button-group/package.json
index b82fef7175d..4c5d0e92c3e 100644
--- a/src/components/button-group/package.json
+++ b/src/components/button-group/package.json
@@ -8,6 +8,12 @@
{
"component": "BButtonGroup",
"description": "Group a series of buttons together on a single line",
+ "props": [
+ {
+ "prop": "vertical",
+ "description": "When set, renderd the button group in vertical mode"
+ }
+ ],
"aliases": [
"BBtnGroup"
]
From 01da386fbe02ee99a2bb7fa32cb25c418c163126 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:30:01 -0300
Subject: [PATCH 178/348] Update package.json
---
src/components/button-toolbar/package.json | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/components/button-toolbar/package.json b/src/components/button-toolbar/package.json
index d63b0f85f41..c02430dddee 100644
--- a/src/components/button-toolbar/package.json
+++ b/src/components/button-toolbar/package.json
@@ -8,6 +8,16 @@
{
"component": "BButtonToolbar",
"description": "Group a series of and/or together on a single line, with optional keyboard navigation.",
+ "props": [
+ {
+ "prop": "justify",
+ "description": "Make the toolbar span the maximum available width, by increasing spacing between the button groups, input groups and dropdowns"
+ },
+ {
+ "prop": "keyNav",
+ "description": "When set, enabled keyboard navigation mode for the toolbar. Do not set this prop when the toolbar has inputs"
+ }
+ ],
"aliases": [
"BBtnToolbar"
]
From 2f38ffb611e8299444a404298172f0401c83b0d0 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:39:34 -0300
Subject: [PATCH 179/348] Update package.json
---
src/components/collapse/package.json | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/components/collapse/package.json b/src/components/collapse/package.json
index 4e70c098871..b92cc0acb32 100644
--- a/src/components/collapse/package.json
+++ b/src/components/collapse/package.json
@@ -21,6 +21,20 @@
"components": [
{
"component": "BCollapse",
+ "props": [
+ {
+ "prop": "isNav",
+ "description": "When set, signifies that hte collapse is bart of a navbar, enabling certain features for navbar support"
+ },
+ {
+ "prop": "accordion",
+ "description": "The name of the accordion group that this collapse belongs to"
+ },
+ {
+ "prop": "visible",
+ "description": "When 'true', expands the collapse"
+ }
+ ],
"events": [
{
"event": "input",
From e11a987df313a06d9ae9c0a89a66b4a5f523fa63 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 20:43:13 -0300
Subject: [PATCH 180/348] Update package.json
---
src/components/embed/package.json | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/components/embed/package.json b/src/components/embed/package.json
index 3f4efeacf9e..9c21c7ed38f 100644
--- a/src/components/embed/package.json
+++ b/src/components/embed/package.json
@@ -5,7 +5,19 @@
"title": "Embed",
"description": "Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.",
"components": [
- "BEmbed"
+ {
+ "component": "BEmbed",
+ "props": [
+ {
+ "prop": "type",
+ "description": "Type of embed. Possible values are 'iframe', 'video', 'embed' and 'object'"
+ },
+ {
+ "prop": "aspect",
+ "description": "Aspect ratio of the embed. Supported values are '16by9', '21by9', '4by3', and '1by1'"
+ }
+ ]
+ }
]
}
}
From debb755d2fc10075258be48ac8543153bbba89e3 Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 21:00:47 -0300
Subject: [PATCH 181/348] Update package.json
---
src/components/form/package.json | 66 ++++++++++++++++++++++++++++++--
1 file changed, 63 insertions(+), 3 deletions(-)
diff --git a/src/components/form/package.json b/src/components/form/package.json
index af721083384..50bdaf8be48 100644
--- a/src/components/form/package.json
+++ b/src/components/form/package.json
@@ -8,6 +8,20 @@
"components": [
{
"component": "BForm",
+ "props": [
+ {
+ "prop": "inline",
+ "description": "When set, the form will be in inline mode which display labels, form controls, and buttons on a single horizontal row"
+ },
+ {
+ "prop": "novalidate",
+ "description": "When set, disables browser native HTML5 validation on controls in the form"
+ },
+ {
+ "prop": "validated",
+ "description": "When set, adds the Bootstrap class 'was-validated' on the form, triggering the native browser validation states"
+ }
+ ],
"events": [
{
"event": "submit",
@@ -22,13 +36,59 @@
}
]
},
- "BFormText",
- "BFormInvalidFeedback",
- "BFormValidFeedback",
+ {
+ "component": "BFormText",
+ "props": [
+ {
+ "prop": "inline",
+ "description": "When set, renders the help text as an inline lement, rather than a block element"
+ }
+ ]
+ },
+ {
+ "component": "BFormInvalidFeedback",
+ "props": [
+ {
+ "prop": "tooltip",
+ "description": "Renders the feedback text in a rudimentary tooltip style"
+ },
+ {
+ "prop": "forceShow",
+ "description": "Shows the feedback text, regardless of the value of the 'state' prop"
+ },
+ {
+ "prop": "state",
+ "description": "When explicitly 'false', forces the feedback to show"
+ }
+ ]
+ },
+ {
+ "component": "BFormValidFeedback",
+ "props": [
+ {
+ "prop": "tooltip",
+ "description": "Renders the feedback text in a rudimentary tooltip style"
+ },
+ {
+ "prop": "forceShow",
+ "description": "Shows the feedback text, regardless of the value of the 'state' prop"
+ },
+ {
+ "prop": "state",
+ "description": "When explicitly 'true', forces the feedback to show"
+ }
+ ]
+ },
{
"component": "BFormDatalist",
"aliases": [
"BDatalist"
+ ],
+ "props": [
+ {
+ "prop": "",
+ "description": ""
+ }
]
}
]
From fbe2239ec607ca133bb24639f37ad63492862cad Mon Sep 17 00:00:00 2001
From: Troy Morehouse
Date: Sun, 22 Sep 2019 21:03:45 -0300
Subject: [PATCH 182/348] Update componentdoc.vue
---
docs/components/componentdoc.vue | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue
index 558574ca6da..b087c7e9842 100644
--- a/docs/components/componentdoc.vue
+++ b/docs/components/componentdoc.vue
@@ -222,6 +222,15 @@
+
+