From c3e1f5c59c3c2116b4c40fa4abda5d4eee6015c7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2019 20:45:41 -0300 Subject: [PATCH 01/95] chore(deps): update devdependency eslint-plugin-jest to ^22.15.1 (#3861) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ce6fc543cce..097bc2ada90 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "eslint-config-standard": "^13.0.1", "eslint-config-vue": "^2.0.2", "eslint-plugin-import": "^2.18.2", - "eslint-plugin-jest": "^22.15.0", + "eslint-plugin-jest": "^22.15.1", "eslint-plugin-markdown": "^1.0.0", "eslint-plugin-node": "^9.1.0", "eslint-plugin-prettier": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 7815aa2bfc0..22798d5acca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4967,10 +4967,10 @@ eslint-plugin-import@^2.18.2: read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@^22.15.0: - version "22.15.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.15.0.tgz#fe70bfff7eeb47ca0ab229588a867f82bb8592c5" - integrity sha512-hgnPbSqAIcLLS9ePb12hNHTRkXnkVaCfOwCt2pzQ8KpOKPWGA4HhLMaFN38NBa/0uvLfrZpcIRjT+6tMAfr58Q== +eslint-plugin-jest@^22.15.1: + version "22.15.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.15.1.tgz#54c4a752a44c4bc5a564ecc22b32e1cd16a2961a" + integrity sha512-CWq/RR/3tLaKFB+FZcCJwU9hH5q/bKeO3rFP8G07+q7hcDCFNqpvdphVbEbGE6o6qo1UbciEev4ejUWv7brUhw== dependencies: "@typescript-eslint/experimental-utils" "^1.13.0" From 1737072aac29e0f8c99708c8f717afe1d26209a4 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 13 Aug 2019 03:44:47 -0300 Subject: [PATCH 02/95] chore(docs): minor updates to the table docs (#3860) --- CHANGELOG.md | 15 ++++++++------- src/components/table/README.md | 16 ++++++++-------- src/components/table/_table.scss | 6 ++++-- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 681296c6559..a85e06cd2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,8 +74,9 @@ stable.** - **tables:** add support for sticky columns ([#3847](https://github.com/bootstrap-vue/bootstrap-vue/issues/3847)) ([5b5f2b8](https://github.com/bootstrap-vue/bootstrap-vue/commit/5b5f2b8)) -- **b-toast:** add SCSS variable for default toast background opacity + standardize a few BootstrapVue - SCSS variable names ([#3775](https://github.com/bootstrap-vue/bootstrap-vue/issues/3775)) +- **b-toast:** add SCSS variable for default toast background opacity + standardize a few + BootstrapVue SCSS variable names + ([#3775](https://github.com/bootstrap-vue/bootstrap-vue/issues/3775)) ([5799075](https://github.com/bootstrap-vue/bootstrap-vue/commit/5799075)) - **config:** defaults for all `size` properties (closes [#3805](https://github.com/bootstrap-vue/bootstrap-vue/issues/3805)) @@ -97,12 +98,12 @@ stable.** formatting) has been changed in this version to use a new square bracketed syntax. While the previous naming syntax still works, it has been deprecated in favour of the newer naming convention (which prevents potential slot-name conflicts with fields named `default` and other - table slots). **Users are encouraged to switch to the new table field slot name syntax, as the - old slot name syntax will be removed in 2.0.0 stable release!** + table slots). **Users are encouraged to switch to the new table field slot name syntax, as the old + slot name syntax will be removed in 2.0.0 stable release!** -- Users should switch to the simplified import syntax (introduced in v2.0.0-rc.22) when - importing individual plugins, components, and/or directives. **Importing from the `es/` build - directory has been deprecated and will be removed in 2.0.0 stable release!** +- Users should switch to the simplified import syntax (introduced in v2.0.0-rc.22) when importing + individual plugins, components, and/or directives. **Importing from the `es/` build directory has + been deprecated and will be removed in 2.0.0 stable release!** diff --git a/src/components/table/README.md b/src/components/table/README.md index 9761fafb98c..aa5b82ecc0c 100644 --- a/src/components/table/README.md +++ b/src/components/table/README.md @@ -2381,7 +2381,7 @@ The `` component gives the user complete control over the render content, while providing basic Bootstrap v4 table styling. `` is a wrapper component around the `` element. Inside the component, via the `default` slot, you can use any or all of the BootstrapVue [table helper components](#table-helper-components): ``, ``, -``, ``, ``, ``, and the HTML5 elements `` and +``, ``, ``, ``, and the HTML5 elements `` and ``. Contrary to the component's name, one can create simple or complex table layouts with ``. @@ -2394,7 +2394,7 @@ sticky. See below for more information on using [sticky columns](#simple-tables- Since `b-table-simple` is just a wrapper component, of which you will need to render content inside, it does not provide any of the advanced features of `` (i.e. row events, head events, -sorting, pagination, filtering, foot-clone, etc). +sorting, pagination, filtering, foot-clone, items, fields, etc). ```html
@@ -2650,24 +2650,24 @@ BootstrapVue provides additional helper child components when using `` only) +- `b-thead` (`` only) +- `b-tfoot` (`` only) - `b-tr` - `b-td` - `b-th` These components are optimized to handle converting variants to the appropriate classes (such as handling table `dark` mode), and automatically applying certain accessibility attributes (i.e. -`role`s and `scope`s) and can handle the stacked table and sticky-header requirements. Components +`role`s and `scope`s). It can generate the stacked table and sticky-header requirements. Components `` and `` use these helper components internally. In the [Simple tables](#simple-tables) example, we are using the helper components ``, ``, ``, ``, `` and ``. While you can use regular table child elements (i.e. `
`, ``, ``+``, -so you may these two HTML5 elements directly in ``. +helper components. Note that there are no helper components for `` or +``, so you may these three HTML5 elements directly in ``. - Table helper components ``, `` and `` all accept a `variant` prop, which will apply one of the Bootstrap theme colors (custom theme colors are supported via diff --git a/src/components/table/_table.scss b/src/components/table/_table.scss index 8a580bb65c4..67dbf7612c3 100644 --- a/src/components/table/_table.scss +++ b/src/components/table/_table.scss @@ -104,8 +104,10 @@ // Needed because Bootstrap v4 does not have table child elements set up // to inherit their background color from parent element by default // - // An issue or PR should be made at twbs/bootstrap repo for table - // background color inheritance + // An issue made at twbs/bootstrap repo for table + // background color inheritance: + // https://github.com/twbs/bootstrap/issues/29244 + // If implemented, would negate the need for all the below SCSS .table.b-table { > thead, > tbody, From 3828f59e4c640571ad86b4d4851d6ac31eaa9466 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 13 Aug 2019 03:52:04 -0300 Subject: [PATCH 03/95] feat(build): remove deprecated `es/` build (#3604) --- docs/components/importdoc.vue | 12 +- scripts/build.sh | 31 +- src/bv-config.d.ts | 1 - src/bv-config.js | 4 +- src/components/alert/index.d.ts | 1 - src/components/alert/index.js | 2 - src/components/badge/index.d.ts | 1 - src/components/badge/index.js | 2 - src/components/breadcrumb/index.d.ts | 1 - src/components/breadcrumb/index.js | 2 - src/components/button-group/index.d.ts | 1 - src/components/button-group/index.js | 2 - src/components/button-toolbar/index.d.ts | 1 - src/components/button-toolbar/index.js | 2 - src/components/button/index.d.ts | 1 - src/components/button/index.js | 2 - src/components/card/index.d.ts | 1 - src/components/card/index.js | 2 - src/components/carousel/index.d.ts | 1 - src/components/carousel/index.js | 2 - src/components/collapse/index.d.ts | 1 - src/components/collapse/index.js | 2 - src/components/dropdown/index.d.ts | 1 - src/components/dropdown/index.js | 2 - src/components/embed/index.d.ts | 1 - src/components/embed/index.js | 2 - src/components/form-checkbox/index.d.ts | 1 - src/components/form-checkbox/index.js | 2 - src/components/form-file/index.d.ts | 1 - src/components/form-file/index.js | 2 - src/components/form-group/index.d.ts | 1 - src/components/form-group/index.js | 2 - src/components/form-input/index.d.ts | 1 - src/components/form-input/index.js | 2 - src/components/form-radio/index.d.ts | 1 - src/components/form-radio/index.js | 2 - src/components/form-select/index.d.ts | 1 - src/components/form-select/index.js | 2 - src/components/form-textarea/index.d.ts | 1 - src/components/form-textarea/index.js | 2 - src/components/form/index.d.ts | 1 - src/components/form/index.js | 2 - src/components/image/index.d.ts | 1 - src/components/image/index.js | 2 - src/components/index.d.ts | 5 +- src/components/index.esm.js | 311 ------------------ src/components/index.js | 140 ++++---- src/components/input-group/index.d.ts | 1 - src/components/input-group/index.js | 2 - src/components/jumbotron/index.d.ts | 1 - src/components/jumbotron/index.js | 2 - src/components/layout/index.d.ts | 1 - src/components/layout/index.js | 2 - src/components/link/index.d.ts | 1 - src/components/link/index.js | 2 - src/components/list-group/index.d.ts | 1 - src/components/list-group/index.js | 2 - src/components/media/index.d.ts | 1 - src/components/media/index.js | 2 - src/components/modal/helpers/bv-modal.js | 2 - src/components/modal/helpers/bv-modal.spec.js | 4 +- src/components/modal/index.d.ts | 1 - src/components/modal/index.js | 2 - src/components/nav/index.d.ts | 1 - src/components/nav/index.js | 2 - src/components/navbar/index.d.ts | 2 - src/components/navbar/index.js | 2 - src/components/pagination-nav/index.d.ts | 1 - src/components/pagination-nav/index.js | 2 - src/components/pagination/index.d.ts | 1 - src/components/pagination/index.js | 2 - src/components/popover/index.d.ts | 1 - src/components/popover/index.js | 2 - src/components/progress/index.d.ts | 1 - src/components/progress/index.js | 2 - src/components/spinner/index.d.ts | 1 - src/components/spinner/index.js | 2 - src/components/table/index.d.ts | 1 - src/components/table/index.js | 2 - src/components/table/table.js | 1 + src/components/tabs/index.d.ts | 1 - src/components/tabs/index.js | 2 - src/components/toast/helpers/bv-toast.js | 3 - src/components/toast/helpers/bv-toast.spec.js | 4 +- src/components/toast/index.d.ts | 1 - src/components/toast/index.js | 2 - src/components/tooltip/index.d.ts | 1 - src/components/tooltip/index.js | 2 - src/directives/index.d.ts | 5 +- src/directives/index.esm.js | 43 --- src/directives/index.js | 35 +- src/directives/modal/index.d.ts | 1 - src/directives/modal/index.js | 2 - src/directives/popover/index.d.ts | 1 - src/directives/popover/index.js | 2 - src/directives/scrollspy/index.d.ts | 1 - src/directives/scrollspy/index.js | 2 - src/directives/toggle/index.d.ts | 1 - src/directives/toggle/index.js | 2 - src/directives/tooltip/index.d.ts | 1 - src/directives/tooltip/index.js | 2 - src/index.js | 283 +++++++++++++++- src/legacy-es.js | 16 - src/utils/config.spec.js | 4 +- 104 files changed, 395 insertions(+), 639 deletions(-) delete mode 100644 src/components/index.esm.js delete mode 100644 src/directives/index.esm.js delete mode 100644 src/legacy-es.js diff --git a/docs/components/importdoc.vue b/docs/components/importdoc.vue index 5da68756c8e..a5829cf0454 100644 --- a/docs/components/importdoc.vue +++ b/docs/components/importdoc.vue @@ -125,14 +125,13 @@ @@ -144,6 +143,8 @@ import kebabCase from 'lodash/kebabCase' import startCase from 'lodash/startCase' import AnchoredHeading from './anchored-heading' +const importPath = 'bootstrap-vue' + export default { name: 'BDVImportdoc', components: { AnchoredHeading }, @@ -212,9 +213,8 @@ export default { }, directiveImportCode() { const firstDirective = this.directives[0] - const firstDirectiveImport = this.directiveImports[0] return [ - `import { ${firstDirective} } from '${firstDirectiveImport.importPath}'`, + `import { ${firstDirective} } from '${importPath}'`, "// Note: Vue automatically prefixes the directive name with 'v-'", `Vue.directive('${this.directiveName(firstDirective)}', ${firstDirective})` ].join('\n') diff --git a/scripts/build.sh b/scripts/build.sh index 24be71fafb6..7154494e268 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,28 +13,20 @@ echo 'Done.' echo '' # Cleanup -rm -rf dist es esm +rm -rf dist esm echo 'Compile JS...' rollup -c scripts/rollup.config.js echo 'Done.' echo '' -echo 'Build ESM modules...' +echo 'Compiling ESM modular build...' NODE_ENV=esm babel src --out-dir esm --ignore 'src/**/*.spec.js' -rm -f esm/legacy-es.js esm/browser.js +rm -f esm/browser.js echo "${BV_BANNER}" | cat - esm/index.js > esm/tmp.js && mv -f esm/tmp.js esm/index.js echo 'Done.' echo '' -echo 'Build ES modules (deprecated)...' -NODE_ENV=es babel src --out-dir es --ignore 'src/**/*.spec.js' -rm -f es/index.js es/browser.js -echo "${BV_BANNER}" | cat - es/legacy-es.js > es/index.js -rm -f es/legacy-es.js -echo 'Done.' -echo '' - echo 'Minify JS...' terser dist/bootstrap-vue.js \ --compress typeofs=false \ @@ -78,29 +70,16 @@ echo 'Done.' echo '' echo 'Copying types from src/ to esm/ ...' -# There must be a better way to do this +# This may no longer be needed, as all exports are at top level now. # -# The following does not preserve the paths -# shopt -s globstar -# cp src/**/*.d.ts es -# -# So we resort to a find with exec -cd src -find . -type f -name '*.d.ts' -exec cp {} ../esm/{} ';' -cd .. -echo 'Done.' -echo '' - -echo 'Copying types from src/ to es/ ...' # There must be a better way to do this -# # The following does not preserve the paths # shopt -s globstar # cp src/**/*.d.ts es # # So we resort to a find with exec cd src -find . -type f -name '*.d.ts' -exec cp {} ../es/{} ';' +find . -type f -name '*.d.ts' -exec cp {} ../esm/{} ';' cd .. echo 'Done.' echo '' diff --git a/src/bv-config.d.ts b/src/bv-config.d.ts index 2a64453caff..e9bed57f4b8 100644 --- a/src/bv-config.d.ts +++ b/src/bv-config.d.ts @@ -2,4 +2,3 @@ import Vue, { PluginFunction, PluginObject } from 'vue' import { BvPlugin } from './' export declare const BVConfigPlugin: BvPlugin -export default BVConfigPlugin diff --git a/src/bv-config.js b/src/bv-config.js index ac06e540577..79d27dfb870 100644 --- a/src/bv-config.js +++ b/src/bv-config.js @@ -3,6 +3,4 @@ // import { pluginFactory } from './utils/plugins' -const BVConfigPlugin = /*#__PURE__*/ pluginFactory() - -export default BVConfigPlugin +export const BVConfigPlugin = /*#__PURE__*/ pluginFactory() diff --git a/src/components/alert/index.d.ts b/src/components/alert/index.d.ts index b630135ad0f..9c0c0e0ac69 100644 --- a/src/components/alert/index.d.ts +++ b/src/components/alert/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const AlertPlugin: BvPlugin -export default AlertPlugin // Component: b-alert export declare class BAlert extends BvComponent { diff --git a/src/components/alert/index.js b/src/components/alert/index.js index bbabb3ea3e6..4d1298a253c 100644 --- a/src/components/alert/index.js +++ b/src/components/alert/index.js @@ -6,5 +6,3 @@ const AlertPlugin = /*#__PURE__*/ pluginFactory({ }) export { AlertPlugin, BAlert } - -export default AlertPlugin diff --git a/src/components/badge/index.d.ts b/src/components/badge/index.d.ts index d15a97bdcf2..a27dd02a656 100644 --- a/src/components/badge/index.d.ts +++ b/src/components/badge/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const BadgePlugin: BvPlugin -export default BadgePlugin // Component: b-badge export declare class BBadge extends BvComponent {} diff --git a/src/components/badge/index.js b/src/components/badge/index.js index a3f40f07b1a..439ebe161b3 100644 --- a/src/components/badge/index.js +++ b/src/components/badge/index.js @@ -6,5 +6,3 @@ const BadgePlugin = /*#__PURE__*/ pluginFactory({ }) export { BadgePlugin, BBadge } - -export default BadgePlugin diff --git a/src/components/breadcrumb/index.d.ts b/src/components/breadcrumb/index.d.ts index 92b47948529..7030b86026c 100644 --- a/src/components/breadcrumb/index.d.ts +++ b/src/components/breadcrumb/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const BreadcrumbPlugin: BvPlugin -export default BreadcrumbPlugin // Component: b-breadcrumb export declare class BBreadcrumb extends BvComponent {} diff --git a/src/components/breadcrumb/index.js b/src/components/breadcrumb/index.js index 183e9cadffd..8fe2b8ad04c 100644 --- a/src/components/breadcrumb/index.js +++ b/src/components/breadcrumb/index.js @@ -8,5 +8,3 @@ const BreadcrumbPlugin = /*#__PURE__*/ pluginFactory({ }) export { BreadcrumbPlugin, BBreadcrumb, BBreadcrumbItem, BBreadcrumbLink } - -export default BreadcrumbPlugin diff --git a/src/components/button-group/index.d.ts b/src/components/button-group/index.d.ts index 91bc502cb42..ccc8de191f3 100644 --- a/src/components/button-group/index.d.ts +++ b/src/components/button-group/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ButtonGroupPlugin: BvPlugin -export default ButtonGroupPlugin // Component: b-button-group export declare class BButtonGroup extends BvComponent {} diff --git a/src/components/button-group/index.js b/src/components/button-group/index.js index f562ca35ea2..594345af08d 100644 --- a/src/components/button-group/index.js +++ b/src/components/button-group/index.js @@ -9,5 +9,3 @@ const ButtonGroupPlugin = /*#__PURE__*/ pluginFactory({ }) export { ButtonGroupPlugin, BButtonGroup } - -export default ButtonGroupPlugin diff --git a/src/components/button-toolbar/index.d.ts b/src/components/button-toolbar/index.d.ts index a0ae840c5f2..c04eeb7edc4 100644 --- a/src/components/button-toolbar/index.d.ts +++ b/src/components/button-toolbar/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ButtonToolbarPlugin: BvPlugin -export default ButtonToolbarPlugin // Component: b-button-toolbar export declare class BButtonToolbar extends BvComponent {} diff --git a/src/components/button-toolbar/index.js b/src/components/button-toolbar/index.js index aa2ae4693d0..741fd1d064f 100644 --- a/src/components/button-toolbar/index.js +++ b/src/components/button-toolbar/index.js @@ -9,5 +9,3 @@ const ButtonToolbarPlugin = /*#__PURE__*/ pluginFactory({ }) export { ButtonToolbarPlugin, BButtonToolbar } - -export default ButtonToolbarPlugin diff --git a/src/components/button/index.d.ts b/src/components/button/index.d.ts index 034f88bff17..d201f88089f 100644 --- a/src/components/button/index.d.ts +++ b/src/components/button/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ButtonPlugin: BvPlugin -export default ButtonPlugin // Component: b-button export declare class BButton extends BvComponent {} diff --git a/src/components/button/index.js b/src/components/button/index.js index d0948574ac9..5c064a421af 100644 --- a/src/components/button/index.js +++ b/src/components/button/index.js @@ -12,5 +12,3 @@ const ButtonPlugin = /*#__PURE__*/ pluginFactory({ }) export { ButtonPlugin, BButton, BButtonClose } - -export default ButtonPlugin diff --git a/src/components/card/index.d.ts b/src/components/card/index.d.ts index d6eb85b1856..ba4bd6a0882 100644 --- a/src/components/card/index.d.ts +++ b/src/components/card/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const CardPlugin: BvPlugin -export default CardPlugin // Component: b-card export declare class BCard extends BvComponent {} diff --git a/src/components/card/index.js b/src/components/card/index.js index 039585922a3..fabbed4bdd0 100644 --- a/src/components/card/index.js +++ b/src/components/card/index.js @@ -38,5 +38,3 @@ export { BCardText, BCardGroup } - -export default CardPlugin diff --git a/src/components/carousel/index.d.ts b/src/components/carousel/index.d.ts index f10098b2d54..8a4f257771c 100644 --- a/src/components/carousel/index.d.ts +++ b/src/components/carousel/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const CarouselPlugin: BvPlugin -export default CarouselPlugin // Component: b-carousel export declare class BCarousel extends BvComponent { diff --git a/src/components/carousel/index.js b/src/components/carousel/index.js index a1047d3c219..edfb0157e5e 100644 --- a/src/components/carousel/index.js +++ b/src/components/carousel/index.js @@ -10,5 +10,3 @@ const CarouselPlugin = /*#__PURE*/ pluginFactory({ }) export { CarouselPlugin, BCarousel, BCarouselSlide } - -export default CarouselPlugin diff --git a/src/components/collapse/index.d.ts b/src/components/collapse/index.d.ts index 947bd7de473..c66e5c4d5af 100644 --- a/src/components/collapse/index.d.ts +++ b/src/components/collapse/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const CollapsePlugin: BvPlugin -export default CollapsePlugin // Component: b-collapse export declare class BCollapse extends BvComponent { diff --git a/src/components/collapse/index.js b/src/components/collapse/index.js index 4e8ea9ec23a..026531ac4cf 100644 --- a/src/components/collapse/index.js +++ b/src/components/collapse/index.js @@ -8,5 +8,3 @@ const CollapsePlugin = /*#__PURE__*/ pluginFactory({ }) export { CollapsePlugin, BCollapse } - -export default CollapsePlugin diff --git a/src/components/dropdown/index.d.ts b/src/components/dropdown/index.d.ts index 65fecc692ee..ec4d3f81ee9 100644 --- a/src/components/dropdown/index.d.ts +++ b/src/components/dropdown/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const DropdownPlugin: BvPlugin -export default DropdownPlugin // Component: b-dropdown export declare class BDropdown extends BvComponent { diff --git a/src/components/dropdown/index.js b/src/components/dropdown/index.js index b0cadbf0ade..9bc0ea20933 100644 --- a/src/components/dropdown/index.js +++ b/src/components/dropdown/index.js @@ -42,5 +42,3 @@ export { BDropdownText, BDropdownGroup } - -export default DropdownPlugin diff --git a/src/components/embed/index.d.ts b/src/components/embed/index.d.ts index 9191b5e264b..ab692e431f4 100644 --- a/src/components/embed/index.d.ts +++ b/src/components/embed/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const EmbedPlugin: BvPlugin -export default EmbedPlugin // Component: b-embed export declare class BEmbed extends BvComponent {} diff --git a/src/components/embed/index.js b/src/components/embed/index.js index 8ed552813a8..accbeab811e 100644 --- a/src/components/embed/index.js +++ b/src/components/embed/index.js @@ -6,5 +6,3 @@ const EmbedPlugin = /*#__PURE__*/ pluginFactory({ }) export { EmbedPlugin, BEmbed } - -export default EmbedPlugin diff --git a/src/components/form-checkbox/index.d.ts b/src/components/form-checkbox/index.d.ts index 43e6c7d094d..5ae3da7f934 100644 --- a/src/components/form-checkbox/index.d.ts +++ b/src/components/form-checkbox/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormCheckboxPlugin: BvPlugin -export default FormCheckboxPlugin // Component: b-form-checkbox export declare class BFormCheckbox extends BvComponent {} diff --git a/src/components/form-checkbox/index.js b/src/components/form-checkbox/index.js index 334887c344e..fecc9d78c58 100644 --- a/src/components/form-checkbox/index.js +++ b/src/components/form-checkbox/index.js @@ -14,5 +14,3 @@ const FormCheckboxPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormCheckboxPlugin, BFormCheckbox, BFormCheckboxGroup } - -export default FormCheckboxPlugin diff --git a/src/components/form-file/index.d.ts b/src/components/form-file/index.d.ts index 3e9dd1a8a99..3a10c989ab7 100644 --- a/src/components/form-file/index.d.ts +++ b/src/components/form-file/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormFilePlugin: BvPlugin -export default FormFilePlugin // Component: b-form-file export declare class BFormFile extends BvComponent { diff --git a/src/components/form-file/index.js b/src/components/form-file/index.js index 33c48afb81f..3a00d89b7d7 100644 --- a/src/components/form-file/index.js +++ b/src/components/form-file/index.js @@ -9,5 +9,3 @@ const FormFilePlugin = /*#__PURE__*/ pluginFactory({ }) export { FormFilePlugin, BFormFile } - -export default FormFilePlugin diff --git a/src/components/form-group/index.d.ts b/src/components/form-group/index.d.ts index 8208ebb86c9..9744338d1e0 100644 --- a/src/components/form-group/index.d.ts +++ b/src/components/form-group/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormGroupPlugin: BvPlugin -export default FormGroupPlugin // Component: b-form-group export declare class BFormGroup extends BvComponent {} diff --git a/src/components/form-group/index.js b/src/components/form-group/index.js index 6c312ead34f..a40d3c91df7 100644 --- a/src/components/form-group/index.js +++ b/src/components/form-group/index.js @@ -9,5 +9,3 @@ const FormGroupPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormGroupPlugin, BFormGroup } - -export default FormGroupPlugin diff --git a/src/components/form-input/index.d.ts b/src/components/form-input/index.d.ts index 14f70d678af..738afbccf15 100644 --- a/src/components/form-input/index.d.ts +++ b/src/components/form-input/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormInputPlugin: BvPlugin -export default FormInputPlugin // Component: b-form-input export declare class BFormInput extends BvComponent { diff --git a/src/components/form-input/index.js b/src/components/form-input/index.js index 86a8ee0f539..5e0e337a71f 100644 --- a/src/components/form-input/index.js +++ b/src/components/form-input/index.js @@ -9,5 +9,3 @@ const FormInputPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormInputPlugin, BFormInput } - -export default FormInputPlugin diff --git a/src/components/form-radio/index.d.ts b/src/components/form-radio/index.d.ts index 61139380425..e5f95e31660 100644 --- a/src/components/form-radio/index.d.ts +++ b/src/components/form-radio/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormRadioPlugin: BvPlugin -export default FormRadioPlugin // Component: b-form-radio export declare class BFormRadio extends BvComponent {} diff --git a/src/components/form-radio/index.js b/src/components/form-radio/index.js index 3fe88c3e815..816f2c577e4 100644 --- a/src/components/form-radio/index.js +++ b/src/components/form-radio/index.js @@ -12,5 +12,3 @@ const FormRadioPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormRadioPlugin, BFormRadio, BFormRadioGroup } - -export default FormRadioPlugin diff --git a/src/components/form-select/index.d.ts b/src/components/form-select/index.d.ts index 4f8e9e9e33a..9ac3911fd52 100644 --- a/src/components/form-select/index.d.ts +++ b/src/components/form-select/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormSelectPlugin: BvPlugin -export default FormSelectPlugin // Component: b-form-select export declare class BFormSelect extends BvComponent {} diff --git a/src/components/form-select/index.js b/src/components/form-select/index.js index 5a0a92ebc82..8ed949d59bd 100644 --- a/src/components/form-select/index.js +++ b/src/components/form-select/index.js @@ -9,5 +9,3 @@ const FormSelectPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormSelectPlugin, BFormSelect } - -export default FormSelectPlugin diff --git a/src/components/form-textarea/index.d.ts b/src/components/form-textarea/index.d.ts index 18e65f86d8e..bbe51233769 100644 --- a/src/components/form-textarea/index.d.ts +++ b/src/components/form-textarea/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormTextareaPlugin: BvPlugin -export default FormTextareaPlugin // Component: b-form-textarea export declare class BFormTextarea extends BvComponent { diff --git a/src/components/form-textarea/index.js b/src/components/form-textarea/index.js index 175e92994b0..3ec886ded02 100644 --- a/src/components/form-textarea/index.js +++ b/src/components/form-textarea/index.js @@ -9,5 +9,3 @@ const FormTextareaPlugin = /*#__PURE__*/ pluginFactory({ }) export { FormTextareaPlugin, BFormTextarea } - -export default FormTextareaPlugin diff --git a/src/components/form/index.d.ts b/src/components/form/index.d.ts index f6c8318f46d..a7ee3ffe216 100644 --- a/src/components/form/index.d.ts +++ b/src/components/form/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const FormPlugin: BvPlugin -export default FormPlugin // Component: b-form export declare class BForm extends BvComponent {} diff --git a/src/components/form/index.js b/src/components/form/index.js index f47e424ceee..592cf0bcd6b 100644 --- a/src/components/form/index.js +++ b/src/components/form/index.js @@ -22,5 +22,3 @@ const FormPlugin = /*#__PURE__*/ pluginFactory({ // BFormRow is not exported here as a named export, as it is exported by Layout export { FormPlugin, BForm, BFormDatalist, BFormText, BFormInvalidFeedback, BFormValidFeedback } - -export default FormPlugin diff --git a/src/components/image/index.d.ts b/src/components/image/index.d.ts index 4ecb2b2c2ff..60c481bb0ba 100644 --- a/src/components/image/index.d.ts +++ b/src/components/image/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ImagePlugin: BvPlugin -export default ImagePlugin // Component: b-img export declare class BImg extends BvComponent {} diff --git a/src/components/image/index.js b/src/components/image/index.js index db3a3984eb2..3fefe3980e1 100644 --- a/src/components/image/index.js +++ b/src/components/image/index.js @@ -10,5 +10,3 @@ const ImagePlugin = /*#__PURE__*/ pluginFactory({ }) export { ImagePlugin, BImg, BImgLazy } - -export default ImagePlugin diff --git a/src/components/index.d.ts b/src/components/index.d.ts index cfcd4d4771c..eae58c71bfd 100644 --- a/src/components/index.d.ts +++ b/src/components/index.d.ts @@ -1,8 +1,7 @@ import { BvPlugin } from '../' -// Default export is a plugin that installs all plugins -declare const BVComponentsPlugin: BvPlugin -export default BVComponentsPlugin +// Plugin that installs all plugins +export declare const componentsPlugin: BvPlugin // Export all components as named exports export * from './alert' diff --git a/src/components/index.esm.js b/src/components/index.esm.js deleted file mode 100644 index 65db27d6cb9..00000000000 --- a/src/components/index.esm.js +++ /dev/null @@ -1,311 +0,0 @@ -// Index file used for the main builds, which does not include legacy plugin names -// Once es/ buld is removed, then this file will be renamed to index.js -import { pluginFactory } from '../utils/plugins' - -// Component group plugins -import { AlertPlugin } from './alert' -import { BadgePlugin } from './badge' -import { BreadcrumbPlugin } from './breadcrumb' -import { ButtonPlugin } from './button' -import { ButtonGroupPlugin } from './button-group' -import { ButtonToolbarPlugin } from './button-toolbar' -import { CardPlugin } from './card' -import { CarouselPlugin } from './carousel' -import { CollapsePlugin } from './collapse' -import { DropdownPlugin } from './dropdown' -import { EmbedPlugin } from './embed' -import { FormPlugin } from './form' -import { FormGroupPlugin } from './form-group' -import { FormCheckboxPlugin } from './form-checkbox' -import { FormRadioPlugin } from './form-radio' -import { FormInputPlugin } from './form-input' -import { FormTextareaPlugin } from './form-textarea' -import { FormFilePlugin } from './form-file' -import { FormSelectPlugin } from './form-select' -import { ImagePlugin } from './image' -import { InputGroupPlugin } from './input-group' -import { JumbotronPlugin } from './jumbotron' -import { LayoutPlugin } from './layout' -import { LinkPlugin } from './link' -import { ListGroupPlugin } from './list-group' -import { MediaPlugin } from './media' -import { ModalPlugin } from './modal' -import { NavPlugin } from './nav' -import { NavbarPlugin } from './navbar' -import { PaginationPlugin } from './pagination' -import { PaginationNavPlugin } from './pagination-nav' -import { PopoverPlugin } from './popover' -import { ProgressPlugin } from './progress' -import { SpinnerPlugin } from './spinner' -import { TablePlugin } from './table' -import { TabsPlugin } from './tabs' -import { ToastPlugin } from './toast' -import { TooltipPlugin } from './tooltip' - -// Main plugin to install all component group plugins -export const componentsPlugin = /*#__PURE__*/ pluginFactory({ - plugins: { - AlertPlugin, - BadgePlugin, - BreadcrumbPlugin, - ButtonPlugin, - ButtonGroupPlugin, - ButtonToolbarPlugin, - CardPlugin, - CarouselPlugin, - CollapsePlugin, - DropdownPlugin, - EmbedPlugin, - FormPlugin, - FormGroupPlugin, - FormCheckboxPlugin, - FormRadioPlugin, - FormInputPlugin, - FormTextareaPlugin, - FormFilePlugin, - FormSelectPlugin, - ImagePlugin, - InputGroupPlugin, - JumbotronPlugin, - LayoutPlugin, - LinkPlugin, - ListGroupPlugin, - MediaPlugin, - ModalPlugin, - NavPlugin, - NavbarPlugin, - PaginationPlugin, - PaginationNavPlugin, - PopoverPlugin, - ProgressPlugin, - SpinnerPlugin, - TablePlugin, - TabsPlugin, - ToastPlugin, - TooltipPlugin - } -}) - -// Export named injection plugins -// These two plugins are not directly included in the above installer, as they are -// installed via the ModalPlugin and ToastPlugin respectively. -export { BVModalPlugin } from './modal/helpers/bv-modal' -export { BVToastPlugin } from './toast/helpers/bv-toast' - -// Export all individual components and component group plugins as named exports. -// This is mainly for users who import individual components, directives or plugins. -// -// Webpack 4 has optimization difficulties with re-eport of re-exports, so -// we import the components individulaly here for better tree shaking, -// -// Webpack v5 fixes the optimizations with re-export of re-exports so this -// can be reverted back to `export * from './table'` when Webpack v5 is released. -// https://github.com/webpack/webpack/pull/9203 (available in Webpack v5.0.0-alpha.15) - -// export * from './alert' -export { AlertPlugin } from './alert' -export { BAlert } from './alert/alert' - -// export * from './badge' -export { BadgePlugin } from './badge' -export { BBadge } from './badge/badge' - -// export * from './breadcrumb' -export { BreadcrumbPlugin } from './breadcrumb' -export { BBreadcrumb } from './breadcrumb/breadcrumb' -export { BBreadcrumbItem } from './breadcrumb/breadcrumb-item' - -// export * from './button' -export { ButtonPlugin } from './button' -export { BButton } from './button/button' -export { BButtonClose } from './button/button-close' - -// export * from './button-group' -export { ButtonGroupPlugin } from './button-group' -export { BButtonGroup } from './button-group/button-group' - -// export * from './button-toolbar' -export { ButtonToolbarPlugin } from './button-toolbar' -export { BButtonToolbar } from './button-toolbar/button-toolbar' - -// export * from './card' -export { CardPlugin } from './card' -export { BCard } from './card/card' -export { BCardBody } from './card/card-body' -export { BCardFooter } from './card/card-footer' -export { BCardGroup } from './card/card-group' -export { BCardHeader } from './card/card-header' -export { BCardImg } from './card/card-img' -export { BCardImgLazy } from './card/card-img-lazy' -export { BCardSubTitle } from './card/card-sub-title' -export { BCardText } from './card/card-text' -export { BCardTitle } from './card/card-title' - -// export * from './carousel' -export { CarouselPlugin } from './carousel' -export { BCarousel } from './carousel/carousel' -export { BCarouselSlide } from './carousel/carousel-slide' - -// export * from './collapse' -export { CollapsePlugin } from './collapse' -export { BCollapse } from './collapse/collapse' - -// export * from './dropdown' -export { DropdownPlugin } from './dropdown' -export { BDropdown } from './dropdown/dropdown' -export { BDropdownItem } from './dropdown/dropdown-item' -export { BDropdownItemButton } from './dropdown/dropdown-item-button' -export { BDropdownDivider } from './dropdown/dropdown-divider' -export { BDropdownForm } from './dropdown/dropdown-form' -export { BDropdownGroup } from './dropdown/dropdown-group' -export { BDropdownHeader } from './dropdown/dropdown-header' -export { BDropdownText } from './dropdown/dropdown-text' - -// export * from './embed' -export { EmbedPlugin } from './embed' -export { BEmbed } from './embed/embed' - -// export * from './form' -export { FormPlugin } from './form' -export { BForm } from './form/form' -export { BFormDatalist } from './form/form-datalist' -export { BFormText } from './form/form-text' -export { BFormInvalidFeedback } from './form/form-invalid-feedback' -export { BFormValidFeedback } from './form/form-valid-feedback' - -// export * from './form-checkbox' -export { FormCheckboxPlugin } from './form-checkbox' -export { BFormCheckbox } from './form-checkbox/form-checkbox' -export { BFormCheckboxGroup } from './form-checkbox/form-checkbox-group' - -// export * from './form-file' -export { FormFilePlugin } from './form-file' -export { BFormFile } from './form-file/form-file' - -// export * from './form-group' -export { FormGroupPlugin } from './form-group' -export { BFormGroup } from './form-group/form-group' - -// export * from './form-input' -export { FormInputPlugin } from './form-input' -export { BFormInput } from './form-input/form-input' - -// export * from './form-radio' -export { FormRadioPlugin } from './form-radio' -export { BFormRadio } from './form-radio/form-radio' -export { BFormRadioGroup } from './form-radio/form-radio-group' - -// export * from './form-select' -export { FormSelectPlugin } from './form-select' -export { BFormSelect } from './form-select/form-select' - -// export * from './form-textarea' -export { FormTextareaPlugin } from './form-textarea' -export { BFormTextarea } from './form-textarea/form-textarea' - -// export * from './image' -export { ImagePlugin } from './image' -export { BImg } from './image/img' -export { BImgLazy } from './image/img-lazy' - -// export * from './input-group' -export { InputGroupPlugin } from './input-group' -export { BInputGroup } from './input-group/input-group' -export { BInputGroupAddon } from './input-group/input-group-addon' -export { BInputGroupAppend } from './input-group/input-group-append' -export { BInputGroupPrepend } from './input-group/input-group-prepend' -export { BInputGroupText } from './input-group/input-group-text' - -// export * from './jumbotron' -export { JumbotronPlugin } from './jumbotron' -export { BJumbotron } from './jumbotron/jumbotron' - -// export * from './layout' -export { LayoutPlugin } from './layout' -export { BContainer } from './layout/container' -export { BRow } from './layout/row' -export { BCol } from './layout/col' -export { BFormRow } from './layout/form-row' - -// export * from './link' -export { LinkPlugin } from './link' -export { BLink } from './link/link' - -// export * from './list-group' -export { ListGroupPlugin } from './list-group' -export { BListGroup } from './list-group/list-group' -export { BListGroupItem } from './list-group/list-group-item' - -// export * from './media' -export { MediaPlugin } from './media' -export { BMedia } from './media/media' -export { BMediaAside } from './media/media-aside' -export { BMediaBody } from './media/media-body' - -// export * from './modal' -export { ModalPlugin } from './modal' -export { BModal } from './modal/modal' - -// export * from './nav' -export { NavPlugin } from './nav' -export { BNav } from './nav/nav' -export { BNavForm } from './nav/nav-form' -export { BNavItem } from './nav/nav-item' -export { BNavItemDropdown } from './nav/nav-item-dropdown' -export { BNavText } from './nav/nav-text' - -// export * from './navbar' -export { NavbarPlugin } from './navbar' -export { BNavbar } from './navbar/navbar' -export { BNavbarBrand } from './navbar/navbar-brand' -export { BNavbarNav } from './navbar/navbar-nav' -export { BNavbarToggle } from './navbar/navbar-toggle' - -// export * from './pagination' -export { PaginationPlugin } from './pagination' -export { BPagination } from './pagination/pagination' - -// export * from './pagination-nav' -export { PaginationNavPlugin } from './pagination-nav' -export { BPaginationNav } from './pagination-nav/pagination-nav' - -// export * from './popover' -export { PopoverPlugin } from './popover' -export { BPopover } from './popover/popover' - -// export * from './progress' -export { ProgressPlugin } from './progress' -export { BProgress } from './progress/progress' -export { BProgressBar } from './progress/progress-bar' - -// export * from './spinner' -export { SpinnerPlugin } from './spinner' -export { BSpinner } from './spinner/spinner' - -// export * from './table' -export { TablePlugin } from './table' -export { TableLitePlugin } from './table' -export { TableSimplePlugin } from './table' -export { BTable } from './table/table' -export { BTableLite } from './table/table-lite' -export { BTableSimple } from './table/table-simple' -export { BTbody } from './table/tbody' -export { BThead } from './table/thead' -export { BTfoot } from './table/tfoot' -export { BTr } from './table/tr' -export { BTh } from './table/th' -export { BTd } from './table/td' - -// export * from './tabs' -export { TabsPlugin } from './tabs' -export { BTabs } from './tabs/tabs' -export { BTab } from './tabs/tab' - -// export * from './toast' -export { ToastPlugin } from './toast' -export { BToast } from './toast/toast' -export { BToaster } from './toast/toaster' - -// export * from './tooltip' -export { TooltipPlugin } from './tooltip' -export { BTooltip } from './tooltip/tooltip' diff --git a/src/components/index.js b/src/components/index.js index d8e60c4061a..1891f16b40d 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,58 +1,86 @@ -// Legacy index file supporting legacy plugin names and default export. -// This file is only here from transpilation purposes for `es/` build. -// src/index imports /src/components/index.esm so that we don't -// have top-level duplicate plugin names. -// -// TODO: -// Once `es/` build is removed, we will rename index.esm.js to index.js -// and update /src/index.js to import the new index.js +import { pluginFactory } from '../utils/plugins' -// Import the main components plugin -import { componentsPlugin } from './index.esm' +// Component group plugins +import { AlertPlugin } from './alert' +import { BadgePlugin } from './badge' +import { BreadcrumbPlugin } from './breadcrumb' +import { ButtonPlugin } from './button' +import { ButtonGroupPlugin } from './button-group' +import { ButtonToolbarPlugin } from './button-toolbar' +import { CardPlugin } from './card' +import { CarouselPlugin } from './carousel' +import { CollapsePlugin } from './collapse' +import { DropdownPlugin } from './dropdown' +import { EmbedPlugin } from './embed' +import { FormPlugin } from './form' +import { FormGroupPlugin } from './form-group' +import { FormCheckboxPlugin } from './form-checkbox' +import { FormRadioPlugin } from './form-radio' +import { FormInputPlugin } from './form-input' +import { FormTextareaPlugin } from './form-textarea' +import { FormFilePlugin } from './form-file' +import { FormSelectPlugin } from './form-select' +import { ImagePlugin } from './image' +import { InputGroupPlugin } from './input-group' +import { JumbotronPlugin } from './jumbotron' +import { LayoutPlugin } from './layout' +import { LinkPlugin } from './link' +import { ListGroupPlugin } from './list-group' +import { MediaPlugin } from './media' +import { ModalPlugin } from './modal' +import { NavPlugin } from './nav' +import { NavbarPlugin } from './navbar' +import { PaginationPlugin } from './pagination' +import { PaginationNavPlugin } from './pagination-nav' +import { PopoverPlugin } from './popover' +import { ProgressPlugin } from './progress' +import { SpinnerPlugin } from './spinner' +// Table plugin includes TableLitePlugin and TableSimplePlugin +import { TablePlugin } from './table' +import { TabsPlugin } from './tabs' +import { ToastPlugin } from './toast' +import { TooltipPlugin } from './tooltip' -// Export all component group plugins and components as named exports -export * from './index.esm' - -// Export all legacy named component group plugins as named exports -// To be removed in stable release -export { AlertPlugin as Alert } from './alert' -export { BadgePlugin as Badge } from './badge' -export { BreadcrumbPlugin as Breadcrumb } from './breadcrumb' -export { ButtonPlugin as Button } from './button' -export { ButtonGroupPlugin as ButtonGroup } from './button-group' -export { ButtonToolbarPlugin as ButtonToolbar } from './button-toolbar' -export { CardPlugin as Card } from './card' -export { CarouselPlugin as Carousel } from './carousel' -export { CollapsePlugin as Collapse } from './collapse' -export { DropdownPlugin as Dropdown } from './dropdown' -export { EmbedPlugin as Embed } from './embed' -export { FormPlugin as Form } from './form' -export { FormGroupPlugin as FormGroup } from './form-group' -export { FormCheckboxPlugin as FormCheckbox } from './form-checkbox' -export { FormRadioPlugin as FormRadio } from './form-radio' -export { FormInputPlugin as FormInput } from './form-input' -export { FormTextareaPlugin as FormTextarea } from './form-textarea' -export { FormFilePlugin as FormFile } from './form-file' -export { FormSelectPlugin as FormSelect } from './form-select' -export { ImagePlugin as Image } from './image' -export { InputGroupPlugin as InputGroup } from './input-group' -export { JumbotronPlugin as Jumbotron } from './jumbotron' -export { LayoutPlugin as Layout } from './layout' -export { LinkPlugin as Link } from './link' -export { ListGroupPlugin as ListGroup } from './list-group' -export { MediaPlugin as Media } from './media' -export { ModalPlugin as Modal } from './modal' -export { NavPlugin as Nav } from './nav' -export { NavbarPlugin as Navbar } from './navbar' -export { PaginationPlugin as Pagination } from './pagination' -export { PaginationNavPlugin as PaginationNav } from './pagination-nav' -export { PopoverPlugin as Popover } from './popover' -export { ProgressPlugin as Progress } from './progress' -export { SpinnerPlugin as Spinner } from './spinner' -export { TablePlugin as Table } from './table' -export { TabsPlugin as Tabs } from './tabs' -export { ToastPlugin as Toast } from './toast' -export { TooltipPlugin as Tooltip } from './tooltip' - -// Export default as a plugin that installs all the component group plugins -export default componentsPlugin +// Main plugin to install all component group plugins +export const componentsPlugin = /*#__PURE__*/ pluginFactory({ + plugins: { + AlertPlugin, + BadgePlugin, + BreadcrumbPlugin, + ButtonPlugin, + ButtonGroupPlugin, + ButtonToolbarPlugin, + CardPlugin, + CarouselPlugin, + CollapsePlugin, + DropdownPlugin, + EmbedPlugin, + FormPlugin, + FormGroupPlugin, + FormCheckboxPlugin, + FormRadioPlugin, + FormInputPlugin, + FormTextareaPlugin, + FormFilePlugin, + FormSelectPlugin, + ImagePlugin, + InputGroupPlugin, + JumbotronPlugin, + LayoutPlugin, + LinkPlugin, + ListGroupPlugin, + MediaPlugin, + ModalPlugin, + NavPlugin, + NavbarPlugin, + PaginationPlugin, + PaginationNavPlugin, + PopoverPlugin, + ProgressPlugin, + SpinnerPlugin, + TablePlugin, + TabsPlugin, + ToastPlugin, + TooltipPlugin + } +}) diff --git a/src/components/input-group/index.d.ts b/src/components/input-group/index.d.ts index 38882074c6b..102fde525ce 100644 --- a/src/components/input-group/index.d.ts +++ b/src/components/input-group/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const InputGroupPlugin: BvPlugin -export default InputGroupPlugin // Component: b-input-group export declare class BInputGroup extends BvComponent {} diff --git a/src/components/input-group/index.js b/src/components/input-group/index.js index 0ac78c86161..59d487897c4 100644 --- a/src/components/input-group/index.js +++ b/src/components/input-group/index.js @@ -23,5 +23,3 @@ export { BInputGroupAppend, BInputGroupText } - -export default InputGroupPlugin diff --git a/src/components/jumbotron/index.d.ts b/src/components/jumbotron/index.d.ts index 576fa81c2e0..dba81fe6555 100644 --- a/src/components/jumbotron/index.d.ts +++ b/src/components/jumbotron/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const JumbotronPlugin: BvPlugin -export default JumbotronPlugin // Component: b-jumbotron export declare class BJumbotron extends BvComponent {} diff --git a/src/components/jumbotron/index.js b/src/components/jumbotron/index.js index 7b409656753..e4484e8f4e8 100644 --- a/src/components/jumbotron/index.js +++ b/src/components/jumbotron/index.js @@ -6,5 +6,3 @@ const JumbotronPlugin = /*#__PURE__*/ pluginFactory({ }) export { JumbotronPlugin, BJumbotron } - -export default JumbotronPlugin diff --git a/src/components/layout/index.d.ts b/src/components/layout/index.d.ts index dc0722229b8..4bb7aa1e7ce 100644 --- a/src/components/layout/index.d.ts +++ b/src/components/layout/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const LayoutPlugin: BvPlugin -export default LayoutPlugin // Component: b-container export declare class BContainer extends BvComponent {} diff --git a/src/components/layout/index.js b/src/components/layout/index.js index e158b9730fb..444138f7f3e 100644 --- a/src/components/layout/index.js +++ b/src/components/layout/index.js @@ -14,5 +14,3 @@ const LayoutPlugin = /*#__PURE__*/ pluginFactory({ }) export { LayoutPlugin, BContainer, BRow, BCol, BFormRow } - -export default LayoutPlugin diff --git a/src/components/link/index.d.ts b/src/components/link/index.d.ts index ecfedbe38f7..fcd52317a78 100644 --- a/src/components/link/index.d.ts +++ b/src/components/link/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const LinkPlugin: BvPlugin -export default LinkPlugin // Component: b-link export declare class BLink extends BvComponent { diff --git a/src/components/link/index.js b/src/components/link/index.js index b4243ad9ad5..62a7ec4042f 100644 --- a/src/components/link/index.js +++ b/src/components/link/index.js @@ -6,5 +6,3 @@ const LinkPlugin = /*#__PURE__*/ pluginFactory({ }) export { LinkPlugin, BLink } - -export default LinkPlugin diff --git a/src/components/list-group/index.d.ts b/src/components/list-group/index.d.ts index 05f4eeddf9d..ee31d94e56a 100644 --- a/src/components/list-group/index.d.ts +++ b/src/components/list-group/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ListGroupPlugin: BvPlugin -export default ListGroupPlugin // Component: b-list-group export declare class BListGroup extends BvComponent {} diff --git a/src/components/list-group/index.js b/src/components/list-group/index.js index 68c97ecc3a7..e73535bcb3f 100644 --- a/src/components/list-group/index.js +++ b/src/components/list-group/index.js @@ -10,5 +10,3 @@ const ListGroupPlugin = /*#__PURE__*/ pluginFactory({ }) export { ListGroupPlugin, BListGroup, BListGroupItem } - -export default ListGroupPlugin diff --git a/src/components/media/index.d.ts b/src/components/media/index.d.ts index 9c314b6f499..ee244d32d06 100644 --- a/src/components/media/index.d.ts +++ b/src/components/media/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const MediaPlugin: BvPlugin -export default MediaPlugin // Component: b-media export declare class BMedia extends BvComponent {} diff --git a/src/components/media/index.js b/src/components/media/index.js index a04f048597d..2fdca60ccfd 100644 --- a/src/components/media/index.js +++ b/src/components/media/index.js @@ -12,5 +12,3 @@ const MediaPlugin = /*#__PURE__*/ pluginFactory({ }) export { MediaPlugin, BMedia, BMediaAside, BMediaBody } - -export default MediaPlugin diff --git a/src/components/modal/helpers/bv-modal.js b/src/components/modal/helpers/bv-modal.js index 0a543c3fd4d..b63e1cb8ee3 100644 --- a/src/components/modal/helpers/bv-modal.js +++ b/src/components/modal/helpers/bv-modal.js @@ -266,5 +266,3 @@ const plugin = Vue => { export const BVModalPlugin = /*#__PURE__*/ pluginFactory({ plugins: { plugin } }) - -export default BVModalPlugin diff --git a/src/components/modal/helpers/bv-modal.spec.js b/src/components/modal/helpers/bv-modal.spec.js index db5fa97041d..44079eb931f 100644 --- a/src/components/modal/helpers/bv-modal.spec.js +++ b/src/components/modal/helpers/bv-modal.spec.js @@ -1,12 +1,12 @@ import { mount, createWrapper, createLocalVue as CreateLocalVue } from '@vue/test-utils' import { waitNT, waitRAF } from '../../../../tests/utils' -import modalPlugin from '../index' +import { ModalPlugin } from '../index' describe('$bvModal', () => { const localVue = new CreateLocalVue() beforeAll(() => { - localVue.use(modalPlugin) + localVue.use(ModalPlugin) }) it('$bvModal.show() and $bvModal.hide() works', async () => { diff --git a/src/components/modal/index.d.ts b/src/components/modal/index.d.ts index 3959750c6f9..ad457ff3eee 100644 --- a/src/components/modal/index.d.ts +++ b/src/components/modal/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent, BvEvent } from '../../' // Modal Plugin export declare const ModalPlugin: BvPlugin -export default ModalPlugin // Component: b-modal export declare class BModal extends BvComponent { diff --git a/src/components/modal/index.js b/src/components/modal/index.js index 5607b06e42a..4737a7d38b3 100644 --- a/src/components/modal/index.js +++ b/src/components/modal/index.js @@ -11,5 +11,3 @@ const ModalPlugin = /*#__PURE__*/ pluginFactory({ }) export { ModalPlugin, BModal } - -export default ModalPlugin diff --git a/src/components/nav/index.d.ts b/src/components/nav/index.d.ts index 6c806d684b8..adf11310664 100644 --- a/src/components/nav/index.d.ts +++ b/src/components/nav/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const NavPlugin: BvPlugin -export default NavPlugin // Component: b-nav export declare class BNav extends BvComponent {} diff --git a/src/components/nav/index.js b/src/components/nav/index.js index f2503e8aaf3..01cb707c2d3 100644 --- a/src/components/nav/index.js +++ b/src/components/nav/index.js @@ -23,5 +23,3 @@ const NavPlugin = /*#__PURE__*/ pluginFactory({ }) export { NavPlugin, BNav, BNavItem, BNavText, BNavForm, BNavItemDropdown } - -export default NavPlugin diff --git a/src/components/navbar/index.d.ts b/src/components/navbar/index.d.ts index 32093ab2073..545cbb19bcc 100644 --- a/src/components/navbar/index.d.ts +++ b/src/components/navbar/index.d.ts @@ -6,8 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const NavbarPlugin: BvPlugin -export default NavbarPlugin - // Component: b-navbar export declare class BNavbar extends BvComponent {} diff --git a/src/components/navbar/index.js b/src/components/navbar/index.js index 9575519ece1..44ac7bb23e6 100644 --- a/src/components/navbar/index.js +++ b/src/components/navbar/index.js @@ -23,5 +23,3 @@ const NavbarPlugin = /*#__PURE__*/ pluginFactory({ }) export { NavbarPlugin, BNavbar, BNavbarNav, BNavbarBrand, BNavbarToggle } - -export default NavbarPlugin diff --git a/src/components/pagination-nav/index.d.ts b/src/components/pagination-nav/index.d.ts index f680fc4ecad..0005902c7ad 100644 --- a/src/components/pagination-nav/index.d.ts +++ b/src/components/pagination-nav/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const PaginationNavPlugin: BvPlugin -export default PaginationNavPlugin // Component: b-pagination-nav export declare class BPaginationNav extends BvComponent {} diff --git a/src/components/pagination-nav/index.js b/src/components/pagination-nav/index.js index e19909730dd..a37a4bf107d 100644 --- a/src/components/pagination-nav/index.js +++ b/src/components/pagination-nav/index.js @@ -6,5 +6,3 @@ const PaginationNavPlugin = /*#__PURE__*/ pluginFactory({ }) export { PaginationNavPlugin, BPaginationNav } - -export default PaginationNavPlugin diff --git a/src/components/pagination/index.d.ts b/src/components/pagination/index.d.ts index 804637739d6..03fde46b12a 100644 --- a/src/components/pagination/index.d.ts +++ b/src/components/pagination/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const PaginationPlugin: BvPlugin -export default PaginationPlugin // Component: b-pagination export declare class BPagination extends BvComponent {} diff --git a/src/components/pagination/index.js b/src/components/pagination/index.js index bbdf31820ad..401db6b702b 100644 --- a/src/components/pagination/index.js +++ b/src/components/pagination/index.js @@ -6,5 +6,3 @@ const PaginationPlugin = /*#__PURE__*/ pluginFactory({ }) export { PaginationPlugin, BPagination } - -export default PaginationPlugin diff --git a/src/components/popover/index.d.ts b/src/components/popover/index.d.ts index 261abc6d96a..538d9684a9c 100644 --- a/src/components/popover/index.d.ts +++ b/src/components/popover/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const PopoverPlugin: BvPlugin -export default PopoverPlugin // Component: b-popover export declare class BPopover extends BvComponent {} diff --git a/src/components/popover/index.js b/src/components/popover/index.js index e491e777cc6..521fa6134bb 100644 --- a/src/components/popover/index.js +++ b/src/components/popover/index.js @@ -8,5 +8,3 @@ const PopoverPlugin = /*#__PURE__*/ pluginFactory({ }) export { PopoverPlugin, BPopover } - -export default PopoverPlugin diff --git a/src/components/progress/index.d.ts b/src/components/progress/index.d.ts index 69ac4b45b99..e9ec1558a87 100644 --- a/src/components/progress/index.d.ts +++ b/src/components/progress/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const ProgressPlugin: BvPlugin -export default ProgressPlugin // Component: b-progress export declare class BProgress extends BvComponent {} diff --git a/src/components/progress/index.js b/src/components/progress/index.js index 25418242ad7..6c302a71639 100644 --- a/src/components/progress/index.js +++ b/src/components/progress/index.js @@ -10,5 +10,3 @@ const ProgressPlugin = /*#__PURE__*/ pluginFactory({ }) export { ProgressPlugin, BProgress, BProgressBar } - -export default ProgressPlugin diff --git a/src/components/spinner/index.d.ts b/src/components/spinner/index.d.ts index 15d7997c529..dd2db336772 100644 --- a/src/components/spinner/index.d.ts +++ b/src/components/spinner/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const SpinnerPlugin: BvPlugin -export default SpinnerPlugin // Component: b-alert export declare class BSpinner extends BvComponent {} diff --git a/src/components/spinner/index.js b/src/components/spinner/index.js index a65cdfe2729..b16fe71c184 100644 --- a/src/components/spinner/index.js +++ b/src/components/spinner/index.js @@ -6,5 +6,3 @@ const SpinnerPlugin = /*#__PURE__*/ pluginFactory({ }) export { SpinnerPlugin, BSpinner } - -export default SpinnerPlugin diff --git a/src/components/table/index.d.ts b/src/components/table/index.d.ts index 353d7412608..5483ce42cdd 100644 --- a/src/components/table/index.d.ts +++ b/src/components/table/index.d.ts @@ -8,7 +8,6 @@ import { BvPlugin, BvComponent } from '../../' export declare const TablePlugin: BvPlugin export declare const TableLitePlugin: BvPlugin export declare const TableSimplePlugin: BvPlugin -export default TablePlugin // Component: b-table export declare class BTable extends BvComponent { diff --git a/src/components/table/index.js b/src/components/table/index.js index 231d609a0a8..415cc9399cc 100644 --- a/src/components/table/index.js +++ b/src/components/table/index.js @@ -54,5 +54,3 @@ export { BTd, BTh } - -export default TablePlugin diff --git a/src/components/table/table.js b/src/components/table/table.js index eeead709de5..d058adbf760 100644 --- a/src/components/table/table.js +++ b/src/components/table/table.js @@ -42,6 +42,7 @@ export const BTable = /*#__PURE__*/ Vue.extend({ tfootMixin, tbodyMixin, // Features Mixins + stackedMixin, filteringMixin, sortingMixin, paginationMixin, diff --git a/src/components/tabs/index.d.ts b/src/components/tabs/index.d.ts index 7ac9d13cf53..3ed2b5222e4 100644 --- a/src/components/tabs/index.d.ts +++ b/src/components/tabs/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const TabsPlugin: BvPlugin -export default TabsPlugin // Component: b-tabs export declare class BTabs extends BvComponent {} diff --git a/src/components/tabs/index.js b/src/components/tabs/index.js index 6be35ce99db..3a0e9564b5f 100644 --- a/src/components/tabs/index.js +++ b/src/components/tabs/index.js @@ -10,5 +10,3 @@ const TabsPlugin = /*#__PURE__*/ pluginFactory({ }) export { TabsPlugin, BTabs, BTab } - -export default TabsPlugin diff --git a/src/components/toast/helpers/bv-toast.js b/src/components/toast/helpers/bv-toast.js index e583f914c85..29284cca9bf 100644 --- a/src/components/toast/helpers/bv-toast.js +++ b/src/components/toast/helpers/bv-toast.js @@ -194,6 +194,3 @@ const plugin = Vue => { export const BVToastPlugin = /*#__PURE__*/ pluginFactory({ plugins: { plugin } }) - -// Default export is the Plugin -export default BVToastPlugin diff --git a/src/components/toast/helpers/bv-toast.spec.js b/src/components/toast/helpers/bv-toast.spec.js index 9d8bb1d56c0..f1e721b51a1 100644 --- a/src/components/toast/helpers/bv-toast.spec.js +++ b/src/components/toast/helpers/bv-toast.spec.js @@ -1,12 +1,12 @@ import { mount, createWrapper, createLocalVue as CreateLocalVue } from '@vue/test-utils' import { waitNT, waitRAF } from '../../../../tests/utils' -import toastPlugin from '../index' +import { ToastPlugin } from '../index' describe('$bvToast', () => { const localVue = new CreateLocalVue() beforeAll(() => { - localVue.use(toastPlugin) + localVue.use(ToastPlugin) }) it('$bvToast.show() and $bvToast.hide() works', async () => { diff --git a/src/components/toast/index.d.ts b/src/components/toast/index.d.ts index 1196fe10ca1..e7324029588 100644 --- a/src/components/toast/index.d.ts +++ b/src/components/toast/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Toast Plugin export declare const ToastPlugin: BvPlugin -export default ToastPlugin // Component: b-toast export declare class BToast extends BvComponent { diff --git a/src/components/toast/index.js b/src/components/toast/index.js index 95187f1b784..6f6dd260325 100644 --- a/src/components/toast/index.js +++ b/src/components/toast/index.js @@ -10,5 +10,3 @@ const ToastPlugin = /*#__PURE__*/ pluginFactory({ }) export { ToastPlugin, BToast, BToaster } - -export default ToastPlugin diff --git a/src/components/tooltip/index.d.ts b/src/components/tooltip/index.d.ts index 4ee217d9b3c..bf580656b7a 100644 --- a/src/components/tooltip/index.d.ts +++ b/src/components/tooltip/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin, BvComponent } from '../../' // Plugin export declare const TooltipPlugin: BvPlugin -export default TooltipPlugin // Component: b-tooltip export declare class BTooltip extends BvComponent {} diff --git a/src/components/tooltip/index.js b/src/components/tooltip/index.js index bbc01c20491..9c7380e0d66 100644 --- a/src/components/tooltip/index.js +++ b/src/components/tooltip/index.js @@ -8,5 +8,3 @@ const TooltipPlugin = /*#__PURE__*/ pluginFactory({ }) export { TooltipPlugin, BTooltip } - -export default TooltipPlugin diff --git a/src/directives/index.d.ts b/src/directives/index.d.ts index 418a35054a7..7ff01bd1c33 100644 --- a/src/directives/index.d.ts +++ b/src/directives/index.d.ts @@ -1,8 +1,7 @@ import { BvPlugin } from '../' -// Default export is a plugin that installs all plugins -declare const BVDirectivesPlugin: BvPlugin -export default BVDirectivesPlugin +// Plugin that installs all plugins +export declare const directivesPlugin: BvPlugin // Named exports of all directives export * from './toggle' diff --git a/src/directives/index.esm.js b/src/directives/index.esm.js deleted file mode 100644 index a3546ccd9d0..00000000000 --- a/src/directives/index.esm.js +++ /dev/null @@ -1,43 +0,0 @@ -// Index file used for the main builds, which does not include legacy plugin names -// Once es/ buld is removed, then this file will be renamed to index.js -import { pluginFactory } from '../utils/plugins' - -import { VBModalPlugin } from './modal' -import { VBPopoverPlugin } from './popover' -import { VBScrollspyPlugin } from './scrollspy' -import { VBTogglePlugin } from './toggle' -import { VBTooltipPlugin } from './tooltip' - -// Main plugin for installing all directive plugins -export const directivesPlugin = /*#__PURE__*/ pluginFactory({ - plugins: { - VBModalPlugin, - VBPopoverPlugin, - VBScrollspyPlugin, - VBTogglePlugin, - VBTooltipPlugin - } -}) - -// Named exports of all directives (VB) and Plugins (VBPlugin) -// See src/compinents/index.esm.js for notes/comment - -// export * from './modal' -export { VBModalPlugin } from './modal' -export { VBModal } from './modal/modal' - -// export * from './popover' -export { VBPopoverPlugin } from './popover' -export { VBPopover } from './popover/popover' - -// export * from './scrollspy' -export { VBScrollspyPlugin } from './scrollspy' -export { VBScrollspy } from './scrollspy/scrollspy' - -// export * from './toggle' -export { VBTogglePlugin } from './toggle' -export { VBToggle } from './toggle/toggle' - -// export * from './tooltip' -export { VBTooltipPlugin } from './tooltip' -export { VBTooltip } from './tooltip/tooltip' diff --git a/src/directives/index.js b/src/directives/index.js index 9316b610a9b..50cdbaad94f 100644 --- a/src/directives/index.js +++ b/src/directives/index.js @@ -1,21 +1,18 @@ -// Legacy index file supporting legacy plugin names. -// This file is only here from transpilation purposes for `es/` build. -// src/index imports /src/directives/index.esm so that we don't -// have top-level duplicate plugin names. +import { pluginFactory } from '../utils/plugins' -// Import the main directives plugin -import { directivesPlugin } from './index.esm' +import { VBModalPlugin } from './modal' +import { VBPopoverPlugin } from './popover' +import { VBScrollspyPlugin } from './scrollspy' +import { VBTogglePlugin } from './toggle' +import { VBTooltipPlugin } from './tooltip' -// Export all directive group plugins and directives as named exports -export * from './index.esm' - -// Export all legacy named directive group plugins as named exports -// To be removed in stable release -export { VBModalPlugin as Modal } from './modal' -export { VBPopoverPlugin as Popover } from './popover' -export { VBScrollspyPlugin as Scrollspy } from './scrollspy' -export { VBTogglePlugin as Toggle } from './toggle' -export { VBTooltipPlugin as Tooltip } from './tooltip' - -// Default export is a plugin that installs all plugins -export default directivesPlugin +// Main plugin for installing all directive plugins +export const directivesPlugin = /*#__PURE__*/ pluginFactory({ + plugins: { + VBModalPlugin, + VBPopoverPlugin, + VBScrollspyPlugin, + VBTogglePlugin, + VBTooltipPlugin + } +}) diff --git a/src/directives/modal/index.d.ts b/src/directives/modal/index.d.ts index a30cd155f42..cc9484be63f 100644 --- a/src/directives/modal/index.d.ts +++ b/src/directives/modal/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin } from '../../' // Plugin export declare const VBModalPlugin: BvPlugin -export default VBModalPlugin // directive: v-b-modal export declare const VBModal: DirectiveOptions diff --git a/src/directives/modal/index.js b/src/directives/modal/index.js index b45810d8237..6d701dbc6dc 100644 --- a/src/directives/modal/index.js +++ b/src/directives/modal/index.js @@ -6,5 +6,3 @@ const VBModalPlugin = /*#__PURE__*/ pluginFactory({ }) export { VBModalPlugin, VBModal } - -export default VBModalPlugin diff --git a/src/directives/popover/index.d.ts b/src/directives/popover/index.d.ts index 0452caa83e3..1bb469baa69 100644 --- a/src/directives/popover/index.d.ts +++ b/src/directives/popover/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin } from '../../' // Plugin export declare const VBPopoverPlugin: BvPlugin -export default VBPopoverPlugin // directive: v-b-popover export declare const VBPopover: DirectiveOptions diff --git a/src/directives/popover/index.js b/src/directives/popover/index.js index 5e89909be61..21a28cbfcae 100644 --- a/src/directives/popover/index.js +++ b/src/directives/popover/index.js @@ -6,5 +6,3 @@ const VBPopoverPlugin = /*#__PURE__*/ pluginFactory({ }) export { VBPopoverPlugin, VBPopover } - -export default VBPopoverPlugin diff --git a/src/directives/scrollspy/index.d.ts b/src/directives/scrollspy/index.d.ts index 0ea0906ec54..c128d79df9f 100644 --- a/src/directives/scrollspy/index.d.ts +++ b/src/directives/scrollspy/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin } from '../../' // Plugin export declare const VBScrollspyPlugin: BvPlugin -export default VBScrollspyPlugin // directive: v-b-scrollspy export declare const VBScrollspy: DirectiveOptions diff --git a/src/directives/scrollspy/index.js b/src/directives/scrollspy/index.js index 9519dc272c0..3e411e7b0e7 100644 --- a/src/directives/scrollspy/index.js +++ b/src/directives/scrollspy/index.js @@ -6,5 +6,3 @@ const VBScrollspyPlugin = /*#__PURE__*/ pluginFactory({ }) export { VBScrollspyPlugin, VBScrollspy } - -export default VBScrollspyPlugin diff --git a/src/directives/toggle/index.d.ts b/src/directives/toggle/index.d.ts index c1409ef7b33..931132c0448 100644 --- a/src/directives/toggle/index.d.ts +++ b/src/directives/toggle/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin } from '../../' // Plugin export declare const VBTogglePlugin: BvPlugin -export default VBTogglePlugin // directive: v-b-toggle export declare const VBToggle: DirectiveOptions diff --git a/src/directives/toggle/index.js b/src/directives/toggle/index.js index 638388404de..e762aaf766b 100644 --- a/src/directives/toggle/index.js +++ b/src/directives/toggle/index.js @@ -6,5 +6,3 @@ const VBTogglePlugin = /*#__PURE__*/ pluginFactory({ }) export { VBTogglePlugin, VBToggle } - -export default VBTogglePlugin diff --git a/src/directives/tooltip/index.d.ts b/src/directives/tooltip/index.d.ts index 51af79ffc7d..a188590ca7e 100644 --- a/src/directives/tooltip/index.d.ts +++ b/src/directives/tooltip/index.d.ts @@ -6,7 +6,6 @@ import { BvPlugin } from '../../' // Plugin export declare const VBTooltipPlugin: BvPlugin -export default VBTooltipPlugin // directive: v-b-tooltip export declare const VBTooltip: DirectiveOptions diff --git a/src/directives/tooltip/index.js b/src/directives/tooltip/index.js index ea32ed99eb0..7c5efbf3a28 100644 --- a/src/directives/tooltip/index.js +++ b/src/directives/tooltip/index.js @@ -6,5 +6,3 @@ const VBTooltipPlugin = /*#__PURE__*/ pluginFactory({ }) export { VBTooltipPlugin, VBTooltip } - -export default VBTooltipPlugin diff --git a/src/index.js b/src/index.js index a0e82367800..55476dfdc14 100644 --- a/src/index.js +++ b/src/index.js @@ -1,26 +1,31 @@ import { installFactory } from './utils/plugins' -import { componentsPlugin } from './components/index.esm' -import { directivesPlugin } from './directives/index.esm' -import BVConfigPlugin from './bv-config' +import { componentsPlugin } from './components' +import { directivesPlugin } from './directives' +import { BVConfigPlugin } from './bv-config' const NAME = 'BootstrapVue' -// Named exports of all components and component group plugins -export * from './components/index.esm' - -// Named exports of all directives and directive group plugins -export * from './directives/index.esm' - +// // BootstrapVue installer -const install = /*#__PURE__*/ installFactory({ plugins: { componentsPlugin, directivesPlugin } }) +// +const install = /*#__PURE__*/ installFactory({ + plugins: { + componentsPlugin, + directivesPlugin + } +}) +// // BootstrapVue plugin +// const BootstrapVue = /*#__PURE__*/ { install, NAME } -// Named exports for BvConfigPlugin and BootstrapVue +// +// Named exports for BvConfigPlugin +// export { // Installer exported in case the consumer does not import `default` // as the plugin in CommonJS build (or does not have interop enabled @@ -39,5 +44,261 @@ export { BootstrapVue } +// +// Export named injection plugins +// +// TODO: we should probably move injections into their +// own parent directory (i.e. /src/injections) +export { BVModalPlugin } from './components/modal/helpers/bv-modal' +export { BVToastPlugin } from './components/toast/helpers/bv-toast' + +// +// Export all individual components and component group plugins as named exports. +// + +// Webpack 4 has optimization difficulties with re-eport of re-exports, so +// we import the components individulaly here for better tree shaking, +// +// Webpack v5 fixes the optimizations with re-export of re-exports so this +// can be reverted back to `export * from './table'` when Webpack v5 is released. +// https://github.com/webpack/webpack/pull/9203 (available in Webpack v5.0.0-alpha.15) + +// export * from './components/alert' +export { AlertPlugin } from './components/alert' +export { BAlert } from './components/alert/alert' + +// export * from './components/badge' +export { BadgePlugin } from './components/badge' +export { BBadge } from './components/badge/badge' + +// export * from './components/breadcrumb' +export { BreadcrumbPlugin } from './components/breadcrumb' +export { BBreadcrumb } from './components/breadcrumb/breadcrumb' +export { BBreadcrumbItem } from './components/breadcrumb/breadcrumb-item' + +// export * from './components/button' +export { ButtonPlugin } from './components/button' +export { BButton } from './components/button/button' +export { BButtonClose } from './components/button/button-close' + +// export * from './components/button-group' +export { ButtonGroupPlugin } from './components/button-group' +export { BButtonGroup } from './components/button-group/button-group' + +// export * from './components/button-toolbar' +export { ButtonToolbarPlugin } from './components/button-toolbar' +export { BButtonToolbar } from './components/button-toolbar/button-toolbar' + +// export * from './components/card' +export { CardPlugin } from './components/card' +export { BCard } from './components/card/card' +export { BCardBody } from './components/card/card-body' +export { BCardFooter } from './components/card/card-footer' +export { BCardGroup } from './components/card/card-group' +export { BCardHeader } from './components/card/card-header' +export { BCardImg } from './components/card/card-img' +export { BCardImgLazy } from './components/card/card-img-lazy' +export { BCardSubTitle } from './components/card/card-sub-title' +export { BCardText } from './components/card/card-text' +export { BCardTitle } from './components/card/card-title' + +// export * from './components/carousel' +export { CarouselPlugin } from './components/carousel' +export { BCarousel } from './components/carousel/carousel' +export { BCarouselSlide } from './components/carousel/carousel-slide' + +// export * from './components/collapse' +export { CollapsePlugin } from './components/collapse' +export { BCollapse } from './components/collapse/collapse' + +// export * from './components/dropdown' +export { DropdownPlugin } from './components/dropdown' +export { BDropdown } from './components/dropdown/dropdown' +export { BDropdownItem } from './components/dropdown/dropdown-item' +export { BDropdownItemButton } from './components/dropdown/dropdown-item-button' +export { BDropdownDivider } from './components/dropdown/dropdown-divider' +export { BDropdownForm } from './components/dropdown/dropdown-form' +export { BDropdownGroup } from './components/dropdown/dropdown-group' +export { BDropdownHeader } from './components/dropdown/dropdown-header' +export { BDropdownText } from './components/dropdown/dropdown-text' + +// export * from './components/embed' +export { EmbedPlugin } from './components/embed' +export { BEmbed } from './components/embed/embed' + +// export * from './components/form' +export { FormPlugin } from './components/form' +export { BForm } from './components/form/form' +export { BFormDatalist } from './components/form/form-datalist' +export { BFormText } from './components/form/form-text' +export { BFormInvalidFeedback } from './components/form/form-invalid-feedback' +export { BFormValidFeedback } from './components/form/form-valid-feedback' + +// export * from './components/form-checkbox' +export { FormCheckboxPlugin } from './components/form-checkbox' +export { BFormCheckbox } from './components/form-checkbox/form-checkbox' +export { BFormCheckboxGroup } from './components/form-checkbox/form-checkbox-group' + +// export * from './components/form-file' +export { FormFilePlugin } from './components/form-file' +export { BFormFile } from './components/form-file/form-file' + +// export * from './components/form-group' +export { FormGroupPlugin } from './components/form-group' +export { BFormGroup } from './components/form-group/form-group' + +// export * from './components/form-input' +export { FormInputPlugin } from './components/form-input' +export { BFormInput } from './components/form-input/form-input' + +// export * from './components/form-radio' +export { FormRadioPlugin } from './components/form-radio' +export { BFormRadio } from './components/form-radio/form-radio' +export { BFormRadioGroup } from './components/form-radio/form-radio-group' + +// export * from './components/form-select' +export { FormSelectPlugin } from './components/form-select' +export { BFormSelect } from './components/form-select/form-select' + +// export * from './components/form-textarea' +export { FormTextareaPlugin } from './components/form-textarea' +export { BFormTextarea } from './components/form-textarea/form-textarea' + +// export * from './components/image' +export { ImagePlugin } from './components/image' +export { BImg } from './components/image/img' +export { BImgLazy } from './components/image/img-lazy' + +// export * from './components/input-group' +export { InputGroupPlugin } from './components/input-group' +export { BInputGroup } from './components/input-group/input-group' +export { BInputGroupAddon } from './components/input-group/input-group-addon' +export { BInputGroupAppend } from './components/input-group/input-group-append' +export { BInputGroupPrepend } from './components/input-group/input-group-prepend' +export { BInputGroupText } from './components/input-group/input-group-text' + +// export * from './components/jumbotron' +export { JumbotronPlugin } from './components/jumbotron' +export { BJumbotron } from './components/jumbotron/jumbotron' + +// export * from './components/layout' +export { LayoutPlugin } from './components/layout' +export { BContainer } from './components/layout/container' +export { BRow } from './components/layout/row' +export { BCol } from './components/layout/col' +export { BFormRow } from './components/layout/form-row' + +// export * from './components/link' +export { LinkPlugin } from './components/link' +export { BLink } from './components/link/link' + +// export * from './components/list-group' +export { ListGroupPlugin } from './components/list-group' +export { BListGroup } from './components/list-group/list-group' +export { BListGroupItem } from './components/list-group/list-group-item' + +// export * from './components/media' +export { MediaPlugin } from './components/media' +export { BMedia } from './components/media/media' +export { BMediaAside } from './components/media/media-aside' +export { BMediaBody } from './components/media/media-body' + +// export * from './components/modal' +export { ModalPlugin } from './components/modal' +export { BModal } from './components/modal/modal' + +// export * from './components/nav' +export { NavPlugin } from './components/nav' +export { BNav } from './components/nav/nav' +export { BNavForm } from './components/nav/nav-form' +export { BNavItem } from './components/nav/nav-item' +export { BNavItemDropdown } from './components/nav/nav-item-dropdown' +export { BNavText } from './components/nav/nav-text' + +// export * from './components/navbar' +export { NavbarPlugin } from './components/navbar' +export { BNavbar } from './components/navbar/navbar' +export { BNavbarBrand } from './components/navbar/navbar-brand' +export { BNavbarNav } from './components/navbar/navbar-nav' +export { BNavbarToggle } from './components/navbar/navbar-toggle' + +// export * from './components/pagination' +export { PaginationPlugin } from './components/pagination' +export { BPagination } from './components/pagination/pagination' + +// export * from './components/pagination-nav' +export { PaginationNavPlugin } from './components/pagination-nav' +export { BPaginationNav } from './components/pagination-nav/pagination-nav' + +// export * from './components/popover' +export { PopoverPlugin } from './components/popover' +export { BPopover } from './components/popover/popover' + +// export * from './components/progress' +export { ProgressPlugin } from './components/progress' +export { BProgress } from './components/progress/progress' +export { BProgressBar } from './components/progress/progress-bar' + +// export * from './components/spinner' +export { SpinnerPlugin } from './components/spinner' +export { BSpinner } from './components/spinner/spinner' + +// export * from './components/table' +export { TablePlugin, TableLitePlugin, TableSimplePlugin } from './components/table' +export { BTable } from './components/table/table' +export { BTableLite } from './components/table/table-lite' +export { BTableSimple } from './components/table/table-simple' +export { BTbody } from './components/table/tbody' +export { BThead } from './components/table/thead' +export { BTfoot } from './components/table/tfoot' +export { BTr } from './components/table/tr' +export { BTh } from './components/table/th' +export { BTd } from './components/table/td' + +// export * from './components/tabs' +export { TabsPlugin } from './components/tabs' +export { BTabs } from './components/tabs/tabs' +export { BTab } from './components/tabs/tab' + +// export * from './components/toast' +export { ToastPlugin } from './components/toast' +export { BToast } from './components/toast/toast' +export { BToaster } from './components/toast/toaster' + +// export * from './components/tooltip' +export { TooltipPlugin } from './components/tooltip' +export { BTooltip } from './components/tooltip/tooltip' + +// +// Named exports of all directives (VB) and Plugins (VBPlugin) +// + +// Webpack 4 has optimization difficulties with re-eport of re-exports, so +// we import the directives individulaly here for better tree shaking, +// +// Webpack v5 fixes the optimizations with re-export of re-exports so this +// can be reverted back to `export * from './scrollspy'` when Webpack v5 is released. +// https://github.com/webpack/webpack/pull/9203 (available in Webpack v5.0.0-alpha.15) + +// export * from './directives/modal' +export { VBModalPlugin } from './directives/modal' +export { VBModal } from './directives/modal/modal' + +// export * from './directives/popover' +export { VBPopoverPlugin } from './directives/popover' +export { VBPopover } from './directives/popover/popover' + +// export * from './directives/scrollspy' +export { VBScrollspyPlugin } from './directives/scrollspy' +export { VBScrollspy } from './directives/scrollspy/scrollspy' + +// export * from './directives/toggle' +export { VBTogglePlugin } from './directives/toggle' +export { VBToggle } from './directives/toggle/toggle' + +// export * from './directives/tooltip' +export { VBTooltipPlugin } from './directives/tooltip' +export { VBTooltip } from './directives/tooltip/tooltip' + // Default export is the BootstrapVue plugin export default BootstrapVue diff --git a/src/legacy-es.js b/src/legacy-es.js deleted file mode 100644 index 54e95cc08dd..00000000000 --- a/src/legacy-es.js +++ /dev/null @@ -1,16 +0,0 @@ -// This index file is used to create the legacy es/index.js -// and will be removed once the `es/` build has been removed. -// It has no top-level named exports - -import { installFactory } from './utils/plugins' -import { setConfig } from './utils/config' -import { componentsPlugin } from './components' -import { directivesPlugin } from './directives' - -const BootstrapVue = { - install: installFactory({ plugins: { componentsPlugin, directivesPlugin } }), - setConfig: setConfig -} - -// Default export is the BootstrapVue plugin -export default BootstrapVue diff --git a/src/utils/config.spec.js b/src/utils/config.spec.js index 30d427331ef..30031b77d6a 100644 --- a/src/utils/config.spec.js +++ b/src/utils/config.spec.js @@ -10,8 +10,8 @@ import { setConfig, resetConfig } from './config-set' import DEFAULTS from './config-defaults' import { createLocalVue } from '@vue/test-utils' import BootstrapVue from '../../src' -import AlertPlugin from '../../src/components/alert' -import BVConfigPlugin from '../../src/bv-config' +import { AlertPlugin } from '../../src/components/alert' +import { BVConfigPlugin } from '../../src/bv-config' describe('utils/config', () => { afterEach(() => { From bea49d41a5b3d48856f2170a944a5b1fd9f0ed8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 13 Aug 2019 19:44:53 +0200 Subject: [PATCH 04/95] feat(tooltip/popover): remove SCSS deprecations (#3869) --- src/_variables.scss | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/_variables.scss b/src/_variables.scss index df8fee49a28..7a7803cd408 100644 --- a/src/_variables.scss +++ b/src/_variables.scss @@ -109,12 +109,6 @@ $bv-enable-tooltip-variants: true !default; // Tooltip background variant level wrt theme color value $b-tooltip-bg-level: 0 !default; -// Deprecated -$bv-tooltip-bg-level: null !default; -@if $bv-tooltip-bg-level { - @warn ("Variable '\$bv-tooltip-bg-level' has been deprecated. Use '\$b-tooltip-bg-level' instead."); - $b-tooltip-bg-level: $bv-tooltip-bg-level; -} // --- Popovers --- @@ -125,19 +119,3 @@ $bv-enable-popover-variants: true !default; $b-popover-bg-level: $alert-bg-level !default; $b-popover-border-level: $alert-border-level !default; $b-popover-color-level: $alert-color-level !default; -// Deprecated -$bv-popover-bg-level: null !default; -@if $bv-popover-bg-level { - @warn ("Variable '\$bv-popover-bg-level' has been deprecated. Use '\$b-popover-bg-level' instead."); - $b-popover-bg-level: $bv-popover-bg-level; -} -$bv-popover-border-level: null !default; -@if $bv-popover-border-level { - @warn ("Variable '\$bv-popover-border-level' has been deprecated. Use '\$b-popover-border-level' instead."); - $b-popover-border-level: $bv-popover-border-level; -} -$bv-popover-color-level: null !default; -@if $bv-popover-color-level { - @warn ("Variable '\$bv-popover-color-level' has been deprecated. Use '\$b-popover-color-level' instead."); - $b-popover-color-level: $bv-popover-color-level; -} From 90c299cd169c709ee3b0e7525039ddc974a8f6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 13 Aug 2019 19:51:52 +0200 Subject: [PATCH 05/95] feat(modal): remove BvModalEvent deprecations (#3864) --- .../modal/helpers/bv-modal-event.class.js | 13 ----- .../helpers/bv-modal-event.class.spec.js | 53 ------------------- src/components/modal/index.d.ts | 23 +++----- 3 files changed, 6 insertions(+), 83 deletions(-) diff --git a/src/components/modal/helpers/bv-modal-event.class.js b/src/components/modal/helpers/bv-modal-event.class.js index 10543efd5ef..ff1dda4d7aa 100644 --- a/src/components/modal/helpers/bv-modal-event.class.js +++ b/src/components/modal/helpers/bv-modal-event.class.js @@ -1,5 +1,4 @@ import BvEvent from '../../../utils/bv-event.class' -import warn from '../../../utils/warn' import { defineProperties, readonlyDescriptor } from '../../../utils/object' class BvModalEvent extends BvEvent { @@ -11,18 +10,6 @@ class BvModalEvent extends BvEvent { }) } - get modalId() /* istanbul ignore next */ { - // Backwards compatability <= 2.0.0-rc.19 - warn('b-modal: evt.modalId is deprecated. Please use evt.componentId.') - return this.componentId - } - - cancel() /* istanbul ignore next */ { - // Backwards compatibility for BootstrapVue 1.x - warn('b-modal: evt.cancel() is deprecated. Please use evt.preventDefault().') - this.preventDefault() - } - static get Defaults() { return { ...super.Defaults, diff --git a/src/components/modal/helpers/bv-modal-event.class.spec.js b/src/components/modal/helpers/bv-modal-event.class.spec.js index 1fd2e4bac1e..7c4e27d42af 100644 --- a/src/components/modal/helpers/bv-modal-event.class.spec.js +++ b/src/components/modal/helpers/bv-modal-event.class.spec.js @@ -68,15 +68,6 @@ describe('modal > BvModalEvent', () => { } expect(failed).toBe(true) expect(evt.trigger).toBe('ok') - - failed = false - try { - evt.modalId = 'fail' - } catch (e) { - failed = true - } - expect(failed).toBe(true) - expect(evt.componentId).toBe('foo') }) it('supports custom properties', async () => { @@ -88,48 +79,4 @@ describe('modal > BvModalEvent', () => { expect(evt.cancelable).toBe(true) expect(evt.custom).toBe(123) }) - - describe('Deprecated features', () => { - it('supports cancelable events via deprecated evt.cancel()', async () => { - // Mock `console.warn()` to prevent a console warning and - // check wether a warning about the `evt.cancel()` call - // was made - const warn = console.warn - console.warn = jest.fn() - - const evt = new BvModalEvent('foobar', { - cancelable: true - }) - - expect(evt).toBeInstanceOf(BvModalEvent) - expect(evt.type).toBe('foobar') - expect(evt.cancelable).toBe(true) - expect(evt.defaultPrevented).toBe(false) - evt.cancel() - expect(evt.defaultPrevented).toBe(true) - - expect(console.warn).toHaveBeenCalled() - console.warn = warn - }) - - it('supports deprecated evt.modalId', async () => { - // Mock `console.warn()` to prevent a console warning and - // check wether a warning about the `evt.cancel()` call - // was made - const warn = console.warn - console.warn = jest.fn() - - const evt = new BvModalEvent('foobar', { - componentId: 'foo' - }) - - expect(evt).toBeInstanceOf(BvModalEvent) - expect(evt.type).toBe('foobar') - expect(evt.componentId).toBe('foo') - expect(evt.modalId).toBe('foo') - - expect(console.warn).toHaveBeenCalled() - console.warn = warn - }) - }) }) diff --git a/src/components/modal/index.d.ts b/src/components/modal/index.d.ts index ad457ff3eee..e91625d66ef 100644 --- a/src/components/modal/index.d.ts +++ b/src/components/modal/index.d.ts @@ -1,34 +1,25 @@ -// -// Modals -// +// --- Modals --- import Vue, { VNode } from 'vue' import { BvPlugin, BvComponent, BvEvent } from '../../' -// Modal Plugin +// Modal plugin export declare const ModalPlugin: BvPlugin -// Component: b-modal +// Component: export declare class BModal extends BvComponent { // Public methods show: () => void hide: (trigger?: string) => void } -// -// Types -// +// --- Types --- export type BvMsgBoxData = boolean | null | BvModalEvent | any -// -// Interfaces -// +// --- Interfaces --- export interface BvModalEvent extends BvEvent { readonly trigger: string | null // Future // details: any | null - // Deprecated - readonly modalId: string | null - cancel: () => void } export interface BvMsgBoxOptions { @@ -95,9 +86,7 @@ export interface BvModal { hide: (id: string) => void } -// -// Vue Prototype Injections -// +// --- Vue prototype injections --- declare module 'vue/types/vue' { interface Vue { // Modal injection From 21fab353f2bbaa4a5698bc646bfb99213117a916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 13 Aug 2019 20:05:23 +0200 Subject: [PATCH 06/95] feat(b-nav, b-nav-item-dropdown): remove deprecated slot and props (#3867) --- src/components/nav/README.md | 4 -- src/components/nav/nav-item-dropdown.js | 28 +------------ src/components/nav/nav.js | 19 ++------- src/components/nav/nav.spec.js | 55 ------------------------- src/components/navbar/README.md | 3 -- 5 files changed, 6 insertions(+), 103 deletions(-) diff --git a/src/components/nav/README.md b/src/components/nav/README.md index 991ffd5915b..12e6c26cb38 100644 --- a/src/components/nav/README.md +++ b/src/components/nav/README.md @@ -223,10 +223,6 @@ shown. When there are a large number of dropdowns rendered on the same page, per impacted due to larger overall memory utilization. You can instruct `` to render the menu contents only when it is shown by setting the `lazy` prop to true. -## Using in navbar - -Prop `is-nav-bar` has been deprecated and will be removed in a future release. - ## Tabbed local content support See the [``](/docs/components/tabs) component for creating tabbable panes of local content diff --git a/src/components/nav/nav-item-dropdown.js b/src/components/nav/nav-item-dropdown.js index a77c681081d..d3d4b0a789e 100644 --- a/src/components/nav/nav-item-dropdown.js +++ b/src/components/nav/nav-item-dropdown.js @@ -9,24 +9,7 @@ import { BLink } from '../link/link' // -- Constants -- -export const props = { - ...pluckProps(['menuClass', 'toggleClass', 'noCaret', 'role'], BDropdownProps), - extraMenuClasses: { - type: String, - default: '', - // `deprecated` -> Don't use this prop - // `deprecation` -> Refers to a change in prop usage - deprecated: 'Setting prop "extra-menu-classes" is deprecated. Use "menu-class" prop instead.' - }, - extraToggleClasses: { - type: String, - default: '', - // `deprecated` -> Don't use this prop - // `deprecation` -> Refers to a change in prop usage - deprecated: - 'Setting prop "extra-toggle-classes" is deprecated. Use "toggle-class" prop instead.' - } -} +export const props = pluckProps(['menuClass', 'toggleClass', 'noCaret', 'role'], BDropdownProps) // @vue/component export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({ @@ -43,7 +26,6 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({ }, menuClasses() { return [ - this.extraMenuClasses, // Deprecated this.menuClass, { 'dropdown-menu-right': this.right, @@ -52,13 +34,7 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({ ] }, toggleClasses() { - return [ - this.extraToggleClasses, // Deprecated - this.toggleClass, - { - 'dropdown-toggle-no-caret': this.noCaret - } - ] + return [this.toggleClass, { 'dropdown-toggle-no-caret': this.noCaret }] } }, render(h) { diff --git a/src/components/nav/nav.js b/src/components/nav/nav.js index d3cee1af965..28a1cc339ca 100644 --- a/src/components/nav/nav.js +++ b/src/components/nav/nav.js @@ -3,9 +3,6 @@ import { mergeData } from 'vue-functional-data-merge' // -- Constants -- -const DEPRECATED_MSG = - 'Setting prop "is-nav-bar" is deprecated. Use the component instead.' - export const props = { tag: { type: String, @@ -38,13 +35,6 @@ export const props = { small: { type: Boolean, default: false - }, - isNavBar: { - type: Boolean, - default: false, - // `deprecated` -> Don't use this prop - // `deprecation` -> Refers to a change in prop usage - deprecated: DEPRECATED_MSG } } @@ -65,12 +55,11 @@ export const BNav = /*#__PURE__*/ Vue.extend({ return h( props.tag, mergeData(data, { + staticClass: 'nav', class: { - nav: !props.isNavBar, - 'navbar-nav': props.isNavBar, - 'nav-tabs': props.tabs && !props.isNavBar, - 'nav-pills': props.pills && !props.isNavBar, - 'flex-column': props.vertical && !props.isNavBar, + 'nav-tabs': props.tabs, + 'nav-pills': props.pills, + 'flex-column': props.vertical, 'nav-fill': !props.vertical && props.fill, 'nav-justified': !props.vertical && props.justified, [computeJustifyContent(props.align)]: !props.vertical && props.align, diff --git a/src/components/nav/nav.spec.js b/src/components/nav/nav.spec.js index 9837918e745..00adb817b9f 100644 --- a/src/components/nav/nav.spec.js +++ b/src/components/nav/nav.spec.js @@ -37,19 +37,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('foobar') }) - it('supports "is-navbar-nav" mode', async () => { - const wrapper = mount(BNav, { - propsData: { - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies pill style', async () => { const wrapper = mount(BNav, { propsData: { @@ -64,20 +51,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply pill style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - pills: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies tab style', async () => { const wrapper = mount(BNav, { propsData: { @@ -92,20 +65,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply tab style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - tabs: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies vertical style', async () => { const wrapper = mount(BNav, { propsData: { @@ -120,20 +79,6 @@ describe('nav', () => { expect(wrapper.text()).toBe('') }) - it("doesn't apply vertical style when in 'is-navbar-nav' mode", async () => { - const wrapper = mount(BNav, { - propsData: { - vertical: true, - isNavBar: true - } - }) - - expect(wrapper.is('ul')).toBe(true) - expect(wrapper.classes()).toContain('navbar-nav') - expect(wrapper.classes().length).toBe(1) - expect(wrapper.text()).toBe('') - }) - it('applies justify style when justified', async () => { const wrapper = mount(BNav, { propsData: { diff --git a/src/components/navbar/README.md b/src/components/navbar/README.md index eafe3aabf1d..ac35839c25c 100644 --- a/src/components/navbar/README.md +++ b/src/components/navbar/README.md @@ -158,9 +158,6 @@ securely aligned. - `` for navbar dropdown menus - `` for adding simple forms to the navbar. -**Note:** _The use of `` inside a `` has been deprecated. Use component -`` instead._ - ### `` `` is the primary link (and ``) component. Providing a `to` prop value will From 29eb8b1879462ce2dee8192c2ef203fb348baeac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 13 Aug 2019 20:15:47 +0200 Subject: [PATCH 07/95] feat(b-dropdown): remove deprecated slot `text` (#3868) --- src/components/dropdown/dropdown.js | 6 +----- src/components/dropdown/package.json | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/dropdown/dropdown.js b/src/components/dropdown/dropdown.js index 9cf93e030ad..b02716f799f 100644 --- a/src/components/dropdown/dropdown.js +++ b/src/components/dropdown/dropdown.js @@ -112,11 +112,7 @@ export const BDropdown = /*#__PURE__*/ Vue.extend({ }, render(h) { let split = h() - const buttonContent = - this.normalizeSlot('button-content') || - this.normalizeSlot('text') || - this.html || - stripTags(this.text) + const buttonContent = this.normalizeSlot('button-content') || this.html || stripTags(this.text) if (this.split) { const btnProps = { disabled: this.disabled, diff --git a/src/components/dropdown/package.json b/src/components/dropdown/package.json index ddba45b7eac..b0d127cec4f 100644 --- a/src/components/dropdown/package.json +++ b/src/components/dropdown/package.json @@ -52,10 +52,6 @@ { "name": "button-content", "description": "Can be used to implement custom text with icons and more styling." - }, - { - "name": "text", - "description": "Deprecated. please use 'button-content' slot instead." } ] }, From 249efd9a61abe129ed429fa5f50a9524589e4ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Wed, 14 Aug 2019 00:11:49 +0200 Subject: [PATCH 08/95] feat(table): remove deprecated slot names, introduce new slot names (#3866) --- docs/components/componentdoc.vue | 18 +- docs/components/importdoc.vue | 16 +- src/components/table/README.md | 244 ++++++------------ .../table/helpers/mixin-filtering.js | 39 +-- src/components/table/helpers/mixin-items.js | 3 +- .../table/helpers/mixin-tbody-row.js | 10 +- src/components/table/helpers/mixin-thead.js | 35 +-- .../table/helpers/normalize-fields.js | 8 - .../table/helpers/normalize-fields.spec.js | 48 +--- src/components/table/package.json | 48 +--- .../table/table-row-details.spec.js | 2 +- .../table/table-tbody-row-events.spec.js | 13 +- .../table/table-tfoot-events.spec.js | 8 +- .../table/table-thead-events.spec.js | 6 +- 14 files changed, 161 insertions(+), 337 deletions(-) diff --git a/docs/components/componentdoc.vue b/docs/components/componentdoc.vue index b1cb25ef1fc..59c7647e7e4 100644 --- a/docs/components/componentdoc.vue +++ b/docs/components/componentdoc.vue @@ -50,13 +50,13 @@ bordered striped > -
` and ``, `
`, etc) within ``, and the named slots `top-row`, `bottom-row`, and `thead-top`, it is recommended to use these BootstrapVue table `` -helper components. Note that there are no helper components for `
` or ``, `