From c0c614dec527685511ea8e0bcd9f014628b77244 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 07:50:04 +0200 Subject: [PATCH 01/41] Update devDependency marked to v1 (#5197) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 52ccc19f3dd..283ee454e5e 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "lint-staged": "^10.1.6", "loader-utils": "^2.0.0", "lodash": "^4.17.15", - "marked": "^0.8.2", + "marked": "^1.0.0", "node-sass": "^4.13.1", "nuxt": "^2.12.2", "postcss-cli": "^7.1.0", diff --git a/yarn.lock b/yarn.lock index e0b61d67ed9..6d3612a32a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8345,10 +8345,10 @@ markdown-escapes@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== -marked@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.2.tgz#4faad28d26ede351a7a1aaa5fec67915c869e355" - integrity sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw== +marked@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-1.0.0.tgz#d35784245a04871e5988a491e28867362e941693" + integrity sha512-Wo+L1pWTVibfrSr+TTtMuiMfNzmZWiOPeO7rZsQUY5bgsxpHesBEcIWJloWVTFnrMXnf/TL30eTFSGJddmQAng== md5.js@^1.3.4: version "1.3.5" From ae3983d2b1b0114d23bf9e44786777f64cf303d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Tue, 21 Apr 2020 08:48:35 +0200 Subject: [PATCH 02/41] chore: add support for CodeSandbox CI (#5201) --- .codesandbox/ci.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .codesandbox/ci.json diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json new file mode 100644 index 00000000000..a2185b8a558 --- /dev/null +++ b/.codesandbox/ci.json @@ -0,0 +1,3 @@ +{ + "sandboxes": ["0d335"] +} From 6df560b48deeb65aa4426ef6e89420bf92f89cbd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 08:52:32 +0200 Subject: [PATCH 03/41] Update devDependency codemirror to ^5.53.0 (#5202) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Renovate Bot Co-authored-by: Jacob Müller --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 283ee454e5e..4747887d7b1 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "bootstrap-icons": "^1.0.0-alpha3", "bundlewatch": "^0.2.6", "clean-css-cli": "^4.3.0", - "codemirror": "^5.52.2", + "codemirror": "^5.53.0", "codesandbox": "^2.1.14", "core-js": ">=2.6.5 <3.0.0", "cross-env": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index 6d3612a32a5..08d8147f5b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3420,10 +3420,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemirror@^5.52.2: - version "5.52.2" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.52.2.tgz#c29e1f7179f85eb0dd17c0586fa810e4838ff584" - integrity sha512-WCGCixNUck2HGvY8/ZNI1jYfxPG5cRHv0VjmWuNzbtCLz8qYA5d+je4QhSSCtCaagyeOwMi/HmmPTjBgiTm2lQ== +codemirror@^5.53.0: + version "5.53.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.53.0.tgz#7d5c373388e26bb902082da749a0e8cedbfe2b95" + integrity sha512-gpnlCCcfp/k9U38X5edaTNRAuNW3vNyAFiG4ZeytlHBl0PsCRYFTomLnAsTfJf/B1eQ7kyzB4k3XXolebpYhtA== codesandbox-import-util-types@^2.1.9: version "2.1.9" From e9d54e6c6a736b2a4f9dbf232dd2b20afa0e990c Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 21 Apr 2020 04:42:11 -0300 Subject: [PATCH 04/41] feat(b-form-rating): add `show-value-max` prop to show possible max rating when `show-value` is `true` (#5200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(b-form-rating): add `show-max-value` prop to show possible max rating when `show-value` is `true` * Update form-rating.js * Update form-rating.js * Update package.json * lint * Update form-rating.js * Update form-rating.spec.js * Update form-rating.js * Update README.md * Update README.md * Update README.md Co-authored-by: Jacob Müller --- src/components/form-rating/README.md | 35 +++++++++++++++++- src/components/form-rating/form-rating.js | 27 ++++++++++---- .../form-rating/form-rating.spec.js | 37 +++++++++++++++++++ src/components/form-rating/package.json | 5 +++ 4 files changed, 95 insertions(+), 9 deletions(-) diff --git a/src/components/form-rating/README.md b/src/components/form-rating/README.md index d219f38896e..8b331ee0263 100644 --- a/src/components/form-rating/README.md +++ b/src/components/form-rating/README.md @@ -12,7 +12,7 @@ inside [input groups](/docs/components/input-group). There are two main modes for ``: interactive and readonly. Interactive mode allows the user to chose a rating from `1` to the number of stars (default `5`) in -whole number increments. +_whole number_ increments. **Interactive rating (input mode):** @@ -209,6 +209,39 @@ decimal) simply set the `precision` prop to the number of digits after the decim ``` +#### Show maximum value + +2.13.0+ + +Optionally show the maximum rating possible by also setting the prop `show-value-max` to `true`: + +```html + + + + + +``` + ### Control sizing Fancy a small or large rating control? Simply set the prop `size` to either `'sm'` or `'lg'` diff --git a/src/components/form-rating/form-rating.js b/src/components/form-rating/form-rating.js index 6cff0db2d76..61d7c71b2ea 100644 --- a/src/components/form-rating/form-rating.js +++ b/src/components/form-rating/form-rating.js @@ -127,6 +127,10 @@ export const BFormRating = /*#__PURE__*/ Vue.extend({ type: Boolean, default: false }, + showValueMax: { + type: Boolean, + default: false + }, disabled: { type: Boolean, default: false @@ -216,15 +220,22 @@ export const BFormRating = /*#__PURE__*/ Vue.extend({ return isLocaleRTL(this.computedLocale) }, formattedRating() { - const value = this.localValue const precision = toInteger(this.precision) - return isNull(value) - ? '' - : value.toLocaleString(this.computedLocale, { - notation: 'standard', - minimumFractionDigits: isNaN(precision) ? 0 : precision, - maximumFractionDigits: isNaN(precision) ? 3 : precision - }) + const showValueMax = this.showValueMax + const locale = this.computedLocale + const formatOptions = { + notation: 'standard', + minimumFractionDigits: isNaN(precision) ? 0 : precision, + maximumFractionDigits: isNaN(precision) ? 3 : precision + } + const stars = this.computedStars.toLocaleString(locale) + let value = this.localValue + value = isNull(value) + ? showValueMax + ? '-' + : '' + : value.toLocaleString(locale, formatOptions) + return showValueMax ? `${value}/${stars}` : value } }, watch: { diff --git a/src/components/form-rating/form-rating.spec.js b/src/components/form-rating/form-rating.spec.js index c5ba39be158..775969308c9 100644 --- a/src/components/form-rating/form-rating.spec.js +++ b/src/components/form-rating/form-rating.spec.js @@ -252,6 +252,43 @@ describe('form-rating', () => { wrapper.destroy() }) + it('has expected structure when prop `show-value` and `show-value-max` are set', async () => { + const wrapper = mount(BFormRating, { + propsData: { + showValue: true, + showValueMax: true, + value: '3.5', + precision: 2 + } + }) + + expect(wrapper.isVueInstance()).toBe(true) + await waitNT(wrapper.vm) + + const $stars = wrapper.findAll('.b-rating-star') + expect($stars.length).toBe(5) + + const $value = wrapper.find('.b-rating-value') + expect($value.exists()).toBe(true) + expect($value.text()).toEqual('3.50/5') + + wrapper.setProps({ + value: null + }) + await waitNT(wrapper.vm) + + expect($value.text()).toEqual('-/5') + + wrapper.setProps({ + value: '1.236' + }) + await waitNT(wrapper.vm) + + expect($value.text()).toEqual('1.24/5') + + wrapper.destroy() + }) + it('focus and blur methods work', async () => { const wrapper = mount(BFormRating, { attachToDocument: true, diff --git a/src/components/form-rating/package.json b/src/components/form-rating/package.json index 0d924c1db07..beebf338f40 100644 --- a/src/components/form-rating/package.json +++ b/src/components/form-rating/package.json @@ -36,6 +36,11 @@ "prop": "showValue", "description": "When `true` shows the current rating value in the control" }, + { + "prop": "showValueMax", + "version": "2.13.0", + "description": "When set to `true` and prop `show-value` is `true`, includes the maximum star rating possible in the formatted value" + }, { "prop": "noBorder", "description": "When `true` disables the default border" From 7a3291fa53745cb34c274aab17c6ff6276661a9f Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 21 Apr 2020 05:04:36 -0300 Subject: [PATCH 05/41] chore(docs): add canonical url to head section (#5198) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(docs): add canonical url to head section * Update default.js * Update default.js * Update themes.vue * Move common variables to `constants.js` Co-authored-by: Jacob Müller --- docs/components/header.vue | 7 ++++--- docs/constants.js | 7 +++++++ docs/layouts/default.js | 19 +++++++++++++++++-- docs/layouts/docs.js | 14 ++++++++++++++ docs/nuxt.config.js | 9 +++++---- docs/pages/themes.vue | 2 +- 6 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 docs/constants.js diff --git a/docs/components/header.vue b/docs/components/header.vue index 626cb12fe6f..9a9b43dfb7e 100644 --- a/docs/components/header.vue +++ b/docs/components/header.vue @@ -175,6 +175,7 @@ + + +``` + ## Internationalization Internationalization of the date picker's calendar is provided via diff --git a/src/components/form-datepicker/form-datepicker.js b/src/components/form-datepicker/form-datepicker.js index af73200e181..8d1b02307b5 100644 --- a/src/components/form-datepicker/form-datepicker.js +++ b/src/components/form-datepicker/form-datepicker.js @@ -530,7 +530,7 @@ export const BFormDatepicker = /*#__PURE__*/ Vue.extend({ { key: 'calendar', ref: 'calendar', - staticClass: 'b-form-date-calendar', + staticClass: 'b-form-date-calendar w-100', props: this.calendarProps, on: { selected: this.onSelected, From 7be5bf39dac54bf9e7590b5b0f63c14599052f1d Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Wed, 22 Apr 2020 03:46:39 -0300 Subject: [PATCH 12/41] chore(docs): minor tweaks to the b-form-rating docs (#5217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(docs): minor tweaks to the b-form-rating docs * Update package.json Co-authored-by: Jacob Müller --- src/components/form-rating/README.md | 4 ++-- src/components/form-rating/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/form-rating/README.md b/src/components/form-rating/README.md index 8b331ee0263..2449971d0cd 100644 --- a/src/components/form-rating/README.md +++ b/src/components/form-rating/README.md @@ -1,7 +1,7 @@ # Form Rating -> BootstrapVue's custom range component, ``, is for entering or displaying a rating -> value. The component is fully WAI-ARIA accessible and supports keyboard control. +> BootstrapVue's custom star rating component, ``, is for entering or displaying a +> rating value. The component is fully WAI-ARIA accessible and supports keyboard control. ## Overview diff --git a/src/components/form-rating/package.json b/src/components/form-rating/package.json index beebf338f40..1285ef2bacb 100644 --- a/src/components/form-rating/package.json +++ b/src/components/form-rating/package.json @@ -5,7 +5,7 @@ "title": "Form Rating", "version": "2.12.0", "new": true, - "description": "BootstrapVue custom ratings form control or ratings display", + "description": "BootstrapVue custom star rating form control for ratings entry or aggregated display", "components": [ { "component": "BFormRating", From c4981fd098253840a37e731331de65b0e732fc79 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Wed, 22 Apr 2020 03:53:34 -0300 Subject: [PATCH 13/41] fix(b-avatar): set `align-items: center` for default slot content (fixes: #5205) (#5207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(b-avatar): set `align-items: center` for default slot content (fixes: #5205) * Update README.md Co-authored-by: Jacob Müller --- src/components/avatar/README.md | 13 +++++++++++++ src/components/avatar/_avatar.scss | 6 +----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/avatar/README.md b/src/components/avatar/README.md index 87f545b7414..9bf37d04496 100644 --- a/src/components/avatar/README.md +++ b/src/components/avatar/README.md @@ -142,6 +142,19 @@ appearance, or if using custom icons or SVGs e.g.: ``` +**Multi-line text example:** + +```html + + + +``` + **Notes:** - The default slot takes precedence over the `text`, `src` and `icon` props. diff --git a/src/components/avatar/_avatar.scss b/src/components/avatar/_avatar.scss index cadc5b7a1a9..981a5544f6c 100644 --- a/src/components/avatar/_avatar.scss +++ b/src/components/avatar/_avatar.scss @@ -46,16 +46,12 @@ overflow: hidden; display: flex; justify-content: center; + align-items: center; } .b-avatar-text { text-transform: uppercase; white-space: nowrap; - align-items: center; - } - - .b-avatar-custom { - vertical-align: middle; } > .b-icon { From 05a4a9c1a741b42015d2a2d863d6b1816f0cce03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Wed, 22 Apr 2020 16:01:37 +0200 Subject: [PATCH 14/41] chore: remove redundant `docs` workflow (#5219) --- .github/workflows/test.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca8e8197411..48d75068860 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -208,31 +208,3 @@ jobs: env: BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}" CI_BRANCH_BASE: "${{ github.base_ref }}" - - docs: - needs: setup - runs-on: ${{ matrix.os }} - if: github.event_name == 'push' && github.ref == 'master' - - strategy: - matrix: - os: [ubuntu-latest] - node: [12] - - steps: - - name: Clone repository - uses: actions/checkout@v2 - - - name: Set Node.js version - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - - name: Restore workspace cache - uses: actions/cache@v1 - with: - path: ${{ github.workspace }} - key: ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }} - - - name: Publish docs - run: yarn run docs-publish From f74f23b5383bc5a28329b00b53dda9c87c466563 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2020 16:15:00 -0300 Subject: [PATCH 15/41] chore(deps): update devdependency rollup to ^2.7.2 (#5223) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 788e5232adb..51c7bda920c 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "postcss-cli": "^7.1.0", "prettier": "1.14.3", "require-context": "^1.1.0", - "rollup": "^2.7.1", + "rollup": "^2.7.2", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-resolve": "^5.2.0", diff --git a/yarn.lock b/yarn.lock index acc64983c13..9e53b1d5dea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11199,10 +11199,10 @@ rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.7.1.tgz#d571e49a35b1c923fe9cf6f7290dba2482864fdc" - integrity sha512-c1FCjY8HK1nAq0bTZHaR72ZknpP7p0EjxbcVc6BcmtOosurK//P5jtwxX+f/4fgtbrjczqf0uvR+EdtxpriE8g== +rollup@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.7.2.tgz#0f8ee6216d33e83c0750116312c2c92b94cc7f72" + integrity sha512-SdtTZVMMVSPe7SNv4exUyPXARe5v/p3TeeG3LRA5WabLPJt4Usi3wVrvVlyAUTG40JJmqS6zbIHt2vWTss2prw== optionalDependencies: fsevents "~2.1.2" From 8e80fe7a1597ac1d1619ba87aaea4c42c345984f Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Wed, 22 Apr 2020 18:53:06 -0300 Subject: [PATCH 16/41] chore(docs): add head meta and link tags to master branch (#5224) --- docs/constants.js | 15 +++++++++++++++ docs/layouts/default.js | 35 +++++++++++++++++++++++++++++++++-- docs/layouts/docs.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 docs/constants.js diff --git a/docs/constants.js b/docs/constants.js new file mode 100644 index 00000000000..f4a5ecbaac4 --- /dev/null +++ b/docs/constants.js @@ -0,0 +1,15 @@ +export const BASE_URL = 'https://bootstrap-vue.org' +export const BASE_URL_DEV = 'https://dev.bootstrap-vue.org' +export const NETLIFY_URL = 'https://bootstrap-vue.netlify.app' + +export const GA_TRACKING_ID = 'UA-89526435-1' + +export const TWITTER_HANDLE = '@BootstrapVue' + +// --- Google Webmaster tools google-site-verification codes --- +// bootstrap-vue.js.org +// +export const GWT_JS_ORG = 'H9Mn7ie5Z5KJSjRfsn9nilLn5kFgn7BMEqL_sUhVpzg' +// *.bootstrap-vue.org +// +export const GWT_BV_ORG = '5E0vyG9CXTfY7McIt2aQppkNA6FQ3b0JJRZzhQ16HW4' diff --git a/docs/layouts/default.js b/docs/layouts/default.js index 605fa88a94f..b219ad4167e 100644 --- a/docs/layouts/default.js +++ b/docs/layouts/default.js @@ -1,8 +1,39 @@ +import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants' import Footer from '~/components/footer' import Header from '~/components/header' export default { name: 'BVDefaultLayout', - functional: true, - render: h => [h(Header), h('nuxt'), h(Footer)] + render(h) { + return h('div', [h(Header), h('nuxt'), h(Footer)]) + }, + head() { + // Add canonical URL so all site variations are + // indexed to the same primary URL + return { + link: [ + // Add canonical URL so all site variations are + // indexed to the same primary URL + { + hid: 'canonical', + rel: 'canonical', + href: `${BASE_URL}${this.$route.path}` + } + ], + meta: [ + // Add GWT site verification for *.bootstrap-vue.org + { + hid: 'google-site-verification-bv-org', + name: 'google-site-verification', + content: GWT_BV_ORG + }, + // Add GWT site verification for bootstrap-vue.js.org + { + hid: 'google-site-verification-js-org', + name: 'google-site-verification', + content: GWT_JS_ORG + } + ] + } + } } diff --git a/docs/layouts/docs.js b/docs/layouts/docs.js index d016b9dd70d..8c93b9df57f 100644 --- a/docs/layouts/docs.js +++ b/docs/layouts/docs.js @@ -1,3 +1,4 @@ +import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants' import BVBreadcrumbs from '~/components/breadcrumbs' import BVFeedback from '~/components/feedback' import BVFooter from '~/components/footer' @@ -73,5 +74,32 @@ export default { const $footer = h(BVFooter, { props: { isDocs: true } }) return h('div', [$header, $container, $footer]) + }, + head() { + return { + link: [ + // Add canonical URL so all site variations are + // indexed to the same primary URL + { + hid: 'canonical', + rel: 'canonical', + href: `${BASE_URL}${this.$route.path}` + } + ], + meta: [ + // Add GWT site verification for *.bootstrap-vue.org + { + hid: 'google-site-verification-bv-org', + name: 'google-site-verification', + content: GWT_BV_ORG + }, + // Add GWT site verification for bootstrap-vue.js.org + { + hid: 'google-site-verification-js-org', + name: 'google-site-verification', + content: GWT_JS_ORG + } + ] + } } } From 89466b2899c60ec4898cc7065984591622a3df47 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Wed, 22 Apr 2020 19:27:08 -0300 Subject: [PATCH 17/41] chore(docs): update head meta/link config (#5226) --- docs/constants.js | 8 ++++++++ docs/layouts/default.js | 20 +++++++++++++++++--- docs/layouts/docs.js | 20 +++++++++++++++++--- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/docs/constants.js b/docs/constants.js index 86f38496312..f4a5ecbaac4 100644 --- a/docs/constants.js +++ b/docs/constants.js @@ -5,3 +5,11 @@ export const NETLIFY_URL = 'https://bootstrap-vue.netlify.app' export const GA_TRACKING_ID = 'UA-89526435-1' export const TWITTER_HANDLE = '@BootstrapVue' + +// --- Google Webmaster tools google-site-verification codes --- +// bootstrap-vue.js.org +// +export const GWT_JS_ORG = 'H9Mn7ie5Z5KJSjRfsn9nilLn5kFgn7BMEqL_sUhVpzg' +// *.bootstrap-vue.org +// +export const GWT_BV_ORG = '5E0vyG9CXTfY7McIt2aQppkNA6FQ3b0JJRZzhQ16HW4' diff --git a/docs/layouts/default.js b/docs/layouts/default.js index d2c4ba45128..5daa35b205f 100644 --- a/docs/layouts/default.js +++ b/docs/layouts/default.js @@ -1,4 +1,4 @@ -import { BASE_URL } from '~/constants' +import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants' import Footer from '~/components/footer' import Header from '~/components/header' @@ -8,15 +8,29 @@ export default { return h('div', [h(Header), h('nuxt'), h(Footer)]) }, head() { - // Add canonical URL so all site variations are - // indexed to the same primary URL return { link: [ + // Add canonical URL so all site variations are + // indexed to the same primary URL { hid: 'canonical', rel: 'canonical', href: `${BASE_URL}${this.$route.path}` } + ], + meta: [ + // Add GWT site verification for *.bootstrap-vue.org + { + hid: 'google-site-verification-bv-org', + name: 'google-site-verification', + content: GWT_BV_ORG + }, + // Add GWT site verification for bootstrap-vue.js.org + { + hid: 'google-site-verification-js-org', + name: 'google-site-verification', + content: GWT_JS_ORG + } ] } } diff --git a/docs/layouts/docs.js b/docs/layouts/docs.js index 93e8aa4e0c7..8c93b9df57f 100644 --- a/docs/layouts/docs.js +++ b/docs/layouts/docs.js @@ -1,4 +1,4 @@ -import { BASE_URL } from '~/constants' +import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants' import BVBreadcrumbs from '~/components/breadcrumbs' import BVFeedback from '~/components/feedback' import BVFooter from '~/components/footer' @@ -76,15 +76,29 @@ export default { return h('div', [$header, $container, $footer]) }, head() { - // Add canonical URL so all site variations are - // indexed to the same primary URL return { link: [ + // Add canonical URL so all site variations are + // indexed to the same primary URL { hid: 'canonical', rel: 'canonical', href: `${BASE_URL}${this.$route.path}` } + ], + meta: [ + // Add GWT site verification for *.bootstrap-vue.org + { + hid: 'google-site-verification-bv-org', + name: 'google-site-verification', + content: GWT_BV_ORG + }, + // Add GWT site verification for bootstrap-vue.js.org + { + hid: 'google-site-verification-js-org', + name: 'google-site-verification', + content: GWT_JS_ORG + } ] } } From 64b3ec6e4f0401b45453f4daa3888ec7cf4ac2b3 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Wed, 22 Apr 2020 22:13:20 -0300 Subject: [PATCH 18/41] chore: additional GWT site verification (#5227) --- docs/constants.js | 3 +++ docs/layouts/default.js | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/constants.js b/docs/constants.js index f4a5ecbaac4..64af5b16bf6 100644 --- a/docs/constants.js +++ b/docs/constants.js @@ -13,3 +13,6 @@ export const GWT_JS_ORG = 'H9Mn7ie5Z5KJSjRfsn9nilLn5kFgn7BMEqL_sUhVpzg' // *.bootstrap-vue.org // export const GWT_BV_ORG = '5E0vyG9CXTfY7McIt2aQppkNA6FQ3b0JJRZzhQ16HW4' +// bootstrap-vue.netlify.app (legacy dev site) +// +export const GWT_BV_NETLIFY = 'Ba1MOy9bRa-r-8eLhSTEkayGbGrT3HhbNuqNiY60uzo' diff --git a/docs/layouts/default.js b/docs/layouts/default.js index 5daa35b205f..9a68c59ff7d 100644 --- a/docs/layouts/default.js +++ b/docs/layouts/default.js @@ -1,4 +1,4 @@ -import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG } from '~/constants' +import { BASE_URL, GWT_BV_ORG, GWT_JS_ORG, GWT_BV_NETLIFY } from '~/constants' import Footer from '~/components/footer' import Header from '~/components/header' @@ -25,11 +25,17 @@ export default { name: 'google-site-verification', content: GWT_BV_ORG }, - // Add GWT site verification for bootstrap-vue.js.org + // Add GWT site verification for bootstrap-vue.js.org (legacy) { hid: 'google-site-verification-js-org', name: 'google-site-verification', content: GWT_JS_ORG + }, + // Add GWT site verification for bootstrap-vue.netlify.app (legacy) + { + hid: 'google-site-verification-netlify', + name: 'google-site-verification', + content: GWT_BV_NETLIFY } ] } From bc5159e876aba2c223beb94f478efcd0c40fbe0d Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Thu, 23 Apr 2020 04:30:12 -0300 Subject: [PATCH 19/41] chore(docs): minor adjustments to the form docs (#5228) * chore(docs): minor adjustments to the form docs * Update README.md * Update README.md --- src/components/form/README.md | 9 +++++---- src/components/input-group/README.md | 13 +++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/form/README.md b/src/components/form/README.md index 6b2fd4db8e2..524ad73dd5a 100644 --- a/src/components/form/README.md +++ b/src/components/form/README.md @@ -187,11 +187,12 @@ See also: - [``](/docs/components/form-select) Select input - [``](/docs/components/form-radio) Radio Inputs - [``](/docs/components/form-checkbox) Checkbox Inputs -- [`b-form-datepicker`](/docs/components/form-datepicker) Date picker input -- [`b-form-spinbutton`](/docs/components/form-spinbutton) Numerical range spinbutton input -- [`b-form-tags`](/docs/components/form-tags) Customizable tag input -- [``](/docs/components/form-timepicker) Time picker custom form input - [``](/docs/components/form-file) File Input +- [``](/docs/components/form-datepicker) Date picker input +- [``](/docs/components/form-spinbutton) Numerical range spinbutton input +- [``](/docs/components/form-tags) Customizable tag input +- [``](/docs/components/form-timepicker) Time picker custom form input +- [``](/docs/components/form-rating) Star rating custom form input and display - [``](/docs/components/button) Buttons - [``](/docs/components/form-group) Form input wrapper to generate form-groups that support labels, help text and feedback diff --git a/src/components/input-group/README.md b/src/components/input-group/README.md index e4583a475f5..55b56da879b 100644 --- a/src/components/input-group/README.md +++ b/src/components/input-group/README.md @@ -113,10 +113,13 @@ subcomponent inside of the `` or `` The following are the form controls supported as the input-group's _main_ input element: -- `` -- `` -- `` -- `` +- [``](/docs/components/form-input) +- [``](/docs/components/form-textarea) +- [``](/docs/components/form-select) +- [``](/docs/components/form-file) +- [``](/docs/components/form-rating) +- [``](/docs/components/form-tags) +- [``](/docs/components/form-splinbutton) **Notes:** @@ -124,6 +127,8 @@ The following are the form controls supported as the input-group's _main_ input in a `` which has a [`size`](#control-sizing) specified. - BootstrapVue uses custom SCSS/CSS when `` is placed in a ``. +- BootstrapVue's custom components (i.e. ``, ``, ``, + etc.) require BootstrapVue's custom SCSS/CSS. ## Checkbox and radio addons From e68e42912c7b8f7953b728306ec9af7ba560822b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2020 18:02:13 +0200 Subject: [PATCH 20/41] chore(deps): update devdependency node-sass to ^4.14.0 (#5233) Co-authored-by: Renovate Bot --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 51c7bda920c..49394facce6 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "loader-utils": "^2.0.0", "lodash": "^4.17.15", "marked": "^1.0.0", - "node-sass": "^4.13.1", + "node-sass": "^4.14.0", "nuxt": "^2.12.2", "postcss-cli": "^7.1.0", "prettier": "1.14.3", diff --git a/yarn.lock b/yarn.lock index 9e53b1d5dea..77bc6fcc7f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8883,10 +8883,10 @@ node-res@^5.0.1: on-finished "^2.3.0" vary "^1.1.2" -node-sass@^4.13.1: - version "4.13.1" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.1.tgz#9db5689696bb2eec2c32b98bfea4c7a2e992d0a3" - integrity sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw== +node-sass@^4.14.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.0.tgz#a8e9d7720f8e15b4a1072719dcf04006f5648eeb" + integrity sha512-AxqU+DFpk0lEz95sI6jO0hU0Rwyw7BXVEv6o9OItoXLyeygPeaSpiV4rwQb10JiTghHaa0gZeD21sz+OsQluaw== dependencies: async-foreach "^0.1.3" chalk "^1.1.1" From 6354e6eb90b93e668c2794b3b4c2117a7cfc0ab0 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Thu, 23 Apr 2020 13:45:51 -0300 Subject: [PATCH 21/41] fix(b-form-datepicker, b-form-timepicker): prevent duplicate validation icons (fixes #5237) (#5238) --- src/_custom-controls.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/_custom-controls.scss b/src/_custom-controls.scss index 48d85e792ea..f6f7ef809d7 100644 --- a/src/_custom-controls.scss +++ b/src/_custom-controls.scss @@ -32,8 +32,9 @@ // Shared BVFormBtnLabelControl styling // Currently used by BFormTimepicker and BFormDatepicker // Does not apply to button-only styling -.b-form-btn-label-control { - // Remove background validation images from main wrapper +.b-form-btn-label-control.form-control { + // Remove background validation images and padding from + // main wrapper as they will be present in the inner label element background-image: none; padding: 0; From 7b1adc460f11c2ee54466fe0d204579f3f6f1bd2 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Thu, 23 Apr 2020 15:53:27 -0300 Subject: [PATCH 22/41] fix(b-form-datepicker, b-form-timepicker): adjust scss to support input-groups (#5231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jacob Müller --- src/_custom-controls.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/_custom-controls.scss b/src/_custom-controls.scss index f6f7ef809d7..782e5338629 100644 --- a/src/_custom-controls.scss +++ b/src/_custom-controls.scss @@ -38,6 +38,13 @@ background-image: none; padding: 0; + @at-root { + // Handle input-group padding overrides + .input-group & { + padding: 0; + } + } + @at-root { // Prevent the button/label from reversing order on in horizontal RTL mode [dir="rtl"] &, @@ -78,6 +85,7 @@ padding-left: 0.25rem; margin: 0; border: 0; + font-size: inherit; @if $enable-pointer-cursor-for-buttons { cursor: pointer; } @@ -93,6 +101,21 @@ &.form-control-lg { min-height: calc(#{$input-height-lg} - #{$input-height-border}); } + + @at-root { + // Handle input group sizing + .input-group.input-group-sm & { + min-height: calc(#{$input-height-sm} - #{$input-height-border}); + padding-top: $input-padding-y-sm; + padding-bottom: $input-padding-y-sm + } + + .input-group.input-group-lg & { + min-height: calc(#{$input-height-lg} - #{$input-height-border}); + padding-top: $input-padding-y-lg; + padding-bottom: $input-padding-y-lg + } + } } // Disabled and read-only styling From 4b2b7d917a747f41e3a5294e2535436a8d401dcd Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Thu, 23 Apr 2020 16:57:40 -0300 Subject: [PATCH 23/41] chore(docs): minor update to input-group docs (#5240) --- src/components/input-group/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/input-group/README.md b/src/components/input-group/README.md index 55b56da879b..83f3744bdec 100644 --- a/src/components/input-group/README.md +++ b/src/components/input-group/README.md @@ -120,6 +120,8 @@ The following are the form controls supported as the input-group's _main_ input - [``](/docs/components/form-rating) - [``](/docs/components/form-tags) - [``](/docs/components/form-splinbutton) +- [``](/docs/components/form-datepicker) +- [``](/docs/components/form-timepicker) **Notes:** From f362802b2794f0e5d294bbb004d91ccd623a1e25 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 24 Apr 2020 05:18:33 -0300 Subject: [PATCH 24/41] feat(b-calendar, b-form-datepicker): relax `YYYY-MM-DD` string parsing (closes #5232) (#5242) * feat(b-calendar, b-form-datepicker): relax date `YYYY-MM-DD` string matching (closes #5232) * Update date.spec.js --- src/utils/date.js | 9 +++++++-- src/utils/date.spec.js | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/utils/date.js b/src/utils/date.js index 18ebcb73767..99f6be648f3 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -6,7 +6,12 @@ import { toInteger } from './number' // --- Constants --- -const RX_DATE = /^\d+-\d+-\d+$/ +// Loose YYYY-MM-DD matching, ignores any appended time inforation +// Matches '1999-12-20', '1999-1-1', '1999-01-20T22:51:49.118Z', '1999-01-02 13:00:00' +const RX_DATE = /^\d+-\d\d?-\d\d?(?:\s|T|$)/ + +// Used to split off the date parts of the YYYY-MM-DD string +const RX_DATE_SPLIT = /-|\s|T/ // --- Date utility methods --- @@ -16,7 +21,7 @@ export const createDate = (...args) => new Date(...args) // Parse a date sting, or Date object, into a Date object (with no time information) export const parseYMD = date => { if (isString(date) && RX_DATE.test(date.trim())) { - const [year, month, day] = date.split('-').map(toInteger) + const [year, month, day] = date.split(RX_DATE_SPLIT).map(v => toInteger(v, 1)) return createDate(year, month - 1, day) } else if (isDate(date)) { return createDate(date.getFullYear(), date.getMonth(), date.getDate()) diff --git a/src/utils/date.spec.js b/src/utils/date.spec.js index 0fb1f0d6658..6573e7613ac 100644 --- a/src/utils/date.spec.js +++ b/src/utils/date.spec.js @@ -17,9 +17,14 @@ describe('utils/date', () => { it('parseYMD works', async () => { const date1 = parseYMD('2020-01-15') const date2 = new Date(2020, 0, 15) + const date3 = parseYMD('2020-01-15T23:16:56.131Z') + const date4 = parseYMD('2020-01-15 23:16:56') expect(date1.toISOString()).toEqual(date2.toISOString()) + expect(date1.toISOString()).toEqual(date3.toISOString()) + expect(date1.toISOString()).toEqual(date4.toISOString()) expect(parseYMD('yyyy-mm-dd')).toEqual(null) + expect(parseYMD('2020-01-15XYZ')).toEqual(null) }) it('formatYMD works', async () => { @@ -28,6 +33,9 @@ describe('utils/date', () => { expect(formatYMD('2020-01-32')).toEqual('2020-02-01') expect(formatYMD('adsadsad')).toEqual(null) expect(formatYMD('x2020-01-15')).toEqual(null) + expect(formatYMD('2020-01-15x')).toEqual(null) + expect(formatYMD('2020-01-15T23:16:56.131Z')).toEqual('2020-01-15') + expect(formatYMD('2020-01-15 23:16:56')).toEqual('2020-01-15') }) it('datesEqual works', async () => { From bea039386518c0b0a77bed46b13330c6840b7daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 24 Apr 2020 10:55:28 +0200 Subject: [PATCH 25/41] fix: nested form options normalization --- .../form-select/helpers/mixin-options.js | 8 +++--- src/mixins/form-options.js | 28 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/components/form-select/helpers/mixin-options.js b/src/components/form-select/helpers/mixin-options.js index b188edeb944..95b1fa4d44a 100644 --- a/src/components/form-select/helpers/mixin-options.js +++ b/src/components/form-select/helpers/mixin-options.js @@ -1,5 +1,5 @@ import get from '../../../utils/get' -import { isArray, isPlainObject, isUndefined } from '../../../utils/inspect' +import { isNull, isPlainObject, isUndefined } from '../../../utils/inspect' import formOptionsMixin from '../../../mixins/form-options' // @vue/component @@ -21,12 +21,12 @@ export default { if (isPlainObject(option)) { const value = get(option, this.valueField) const text = get(option, this.textField) - const options = get(option, this.optionsField) + const options = get(option, this.optionsField, null) // When it has options, create an `` object - if (isArray(options)) { + if (!isNull(options)) { return { label: String(get(option, this.labelField) || text), - options + options: this.normalizeOptions(options) } } // Otherwise create an `