From 4bd5d1c681aae9f1984cbc0d3b962784755a1339 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 21:21:53 -0300 Subject: [PATCH 01/54] perf(table): improve provide/inject performance --- src/components/table/tbody.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index f4054a20226..cdeae5f8890 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -19,16 +19,22 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableTbody: this + bvTableTbody: this, + bvTableRowGroup: this } }, inject: { bvTable: { + // Sniffed by / / default: null } }, props, computed: { + isTbody() { + // Sniffed by / / + return true + }, isTransitionGroup() { return this.tbodyTransitionProps || this.tbodyTransitionHandlers }, From 82d69467563964a8f262c21a9a1ee7411a546b0b Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 21:29:03 -0300 Subject: [PATCH 02/54] Update thead.js --- src/components/table/thead.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 263c2e8984e..37aea76cccc 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -15,16 +15,22 @@ export const BThead = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableThead: this + bvTableThead: this, + bvTableRowGroup: this } }, inject: { bvTable: { + // Sniffed by / / default: null } }, props, computed: { + isTfoot() { + // Sniffed by / / + return true + }, theadClasses() { return [this.headVariant ? `thead-${this.headVariant}` : null] }, From edecfedf18dac73184ebed6cb9e7e80faf8958cc Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 21:30:42 -0300 Subject: [PATCH 03/54] Update tfoot.js --- src/components/table/tfoot.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index dfe13f785ab..c7eacce20de 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -15,16 +15,22 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableTfoot: this + bvTableTfoot: this, + bvTableRowGroup: this } }, inject: { bvTable: { + // Sniffed by / / default: null } }, props, computed: { + isTfoot() { + // Sniffed by / / + return true + }, tfootClasses() { return [this.footVariant ? `thead-${this.footVariant}` : null] }, From da8b269f509b887de3aa4b3c59f3bc0e554cfddc Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 21:35:16 -0300 Subject: [PATCH 04/54] Update tr.js --- src/components/table/tr.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index b1298f7ee49..611ce8a0e34 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -19,14 +19,14 @@ export const BTr = /*#__PURE__*/ Vue.extend({ } }, inject: { - bvTable: { - default: null + bvTableRowGroup: { + defaut: null } }, props, computed: { isDark() { - return this.bvTable && this.bvTable.dark + return this.bvTableRowGroup && this.bvTableRowGroup.bvTable && this.bvTableRowGroup.bvTable.dark }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] From 467c18f2bc205aa19159e6e874339b52d502f4e6 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:06:58 -0300 Subject: [PATCH 05/54] Update td.js --- src/components/table/td.js | 79 +++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index d889ebcf768..74c4c9be887 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -45,19 +45,6 @@ export const BTd = /*#__PURE__*/ Vue.extend({ mixins: [normalizeSlotMixin], inheritAttrs: false, inject: { - // Injections for feature / attribute detection - bvTable: { - default: null - }, - bvTableTbody: { - default: null - }, - bvTableThead: { - default: null - }, - bvTableTfoot: { - default: null - }, bvTableTr: { default: null } @@ -68,18 +55,46 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // Overridden by return 'td' }, + inTable() { + return ( + this.bvTableTr && + this.bvTableTr.bvTableRowGroup && + this.bvTableTr.bvTableRowGroup.bvTable + ) + }, + inTbody() { + return ( + this.bvTableTr && + this.bvTableTr.bvTableRowGroup && + this.bvTableTr.bvTableRowGroup.isTbody + ) + }, + inThead() { + return ( + this.bvTableTr && + this.bvTableTr.bvTableRowGroup && + this.bvTableTr.bvTableRowGroup.isThead + ) + }, + inTfoot() { + return ( + this.bvTableTr && + this.bvTableTr.bvTableRowGroup && + this.bvTableTr.bvTableRowGroup.isTfoot + ) + }, isDark() { - return this.bvTable && this.bvTable.dark + return this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.dark }, isStacked() { - return this.bvTable && this.bvTable.isStacked + return this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.isStacked }, isStackedCell() { // We only support stacked-heading in tbody in stacked mode - return this.bvTableTbody && this.isStacked + return this.inTbody && this.isStacked }, isResponsive() { - return this.bvTable && this.bvTable.isResponsive && !this.isStacked + return !this.isStacked && this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.isResponsive }, isStickyHeader() { // Needed to handle header background classes, due to lack of @@ -87,10 +102,9 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // Sticky headers only apply to cells in table `thead` return ( !this.isStacked && - this.bvTable && - this.bvTableThead && - this.bvTableTr && - this.bvTable.stickyHeader + this.inTbody && + this.inTable && + this.bvTableTr.bvTableRowGroup.bvTable.stickyHeader ) }, isStickyColumn() { @@ -99,25 +113,28 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // Sticky column cells are only available in responsive // mode (horizontal scrolling) or when sticky header mode // Applies to cells in `thead`, `tbody` and `tfoot` - return ( - (this.isResponsive || this.isStickyHeader) && - this.stickyColumn && - !this.isStacked && - this.bvTable && - this.bvTableTr - ) + return !this.isStacked && (this.isResponsive || this.isStickyHeader) && this.stickyColumn + }, + rowVariant() { + return this.bvTableTr ? this.bvTableTr.variant : null + }, + headVariant() { + return this.isThead ? this.bvTableTr.bvTableRowGroup.headVariant : null + }, + tableVariant() { + return this.inTable ? this.bvTableTr.bvTableRowGroup.bvTable.tableVariant : null }, cellClasses() { // We use computed props here for improved performance by caching // the results of the string interpolation let variant = this.variant if ( - (!variant && this.isStickyHeader && !this.bvTableThead.headVariant) || + (!variant && this.isStickyHeader && !this.headVariant) || (!variant && this.isStickyColumn) ) { // Needed for sticky-header mode as Bootstrap v4 table cells do // not inherit parent's background-color. Boo! - variant = this.bvTableTr.variant || this.bvTable.tableVariant || 'b-table-default' + variant = this.rowVariant || this.tableVariant || 'b-table-default' } return [ variant ? `${this.isDark ? 'bg' : 'table'}-${variant}` : null, @@ -133,7 +150,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ cellAttrs() { // We use computed props here for improved performance by caching // the results of the object spread (Object.assign) - const headOrFoot = this.bvTableThead || this.bvTableTfoot + const headOrFoot = this.inThead || this.inTfoot // Make sure col/rowspan's are > 0 or null const colspan = this.computedColspan const rowspan = this.computedRowspan From a0977d578f2d9783f49d5e64fc7ea34d03093177 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:09:48 -0300 Subject: [PATCH 06/54] Update td.js --- src/components/table/td.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 74c4c9be887..45115ac2ece 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -84,7 +84,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ ) }, isDark() { - return this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.dark + return this.bvTableTr && this.bvTableTr.isDark }, isStacked() { return this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.isStacked From ff1364af429bfad3283e06bd339e962bfa807716 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:12:18 -0300 Subject: [PATCH 07/54] Update tr.js --- src/components/table/tr.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 611ce8a0e34..cd9f9857b7a 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -26,8 +26,13 @@ export const BTr = /*#__PURE__*/ Vue.extend({ props, computed: { isDark() { + // Sniffed by / return this.bvTableRowGroup && this.bvTableRowGroup.bvTable && this.bvTableRowGroup.bvTable.dark }, + isStacked() { + // Sniffed by / + return this.bvTableRowGroup && this.bvTableRowGroup.bvTable && this.bvTableRowGroup.bvTable.isStacked + }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] }, From 6117f67cf7e4cb46d09d021f680115010da7c96c Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:14:23 -0300 Subject: [PATCH 08/54] Update tbody.js --- src/components/table/tbody.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index cdeae5f8890..373c023fe0e 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -19,7 +19,6 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableTbody: this, bvTableRowGroup: this } }, @@ -35,6 +34,14 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return true }, + isDark() { + // Sniffed by / / + return this.bvTable && this.bvTable.dark + }, + isStacked() { + // Sniffed by / / + return this.bvTable && this.bvTable.isStacked + }, isTransitionGroup() { return this.tbodyTransitionProps || this.tbodyTransitionHandlers }, From c1c633d462f1c4342d50ab456c7145d1728810dc Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:15:11 -0300 Subject: [PATCH 09/54] Update thead.js --- src/components/table/thead.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 37aea76cccc..8f9042500d5 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -15,7 +15,6 @@ export const BThead = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableThead: this, bvTableRowGroup: this } }, @@ -31,6 +30,14 @@ export const BThead = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return true }, + isDark() { + // Sniffed by / / + return this.bvTable && this.bvTable.dark + }, + isStacked() { + // Sniffed by / / + return this.bvTable && this.bvTable.isStacked + }, theadClasses() { return [this.headVariant ? `thead-${this.headVariant}` : null] }, From b5733e26a7b9d399c965346f8cd77dc8a099f4a7 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:15:51 -0300 Subject: [PATCH 10/54] Update tfoot.js --- src/components/table/tfoot.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index c7eacce20de..df3c1649824 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -31,6 +31,14 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return true }, + isDark() { + // Sniffed by / / + return this.bvTable && this.bvTable.dark + }, + isStacked() { + // Sniffed by / / + return this.bvTable && this.bvTable.isStacked + }, tfootClasses() { return [this.footVariant ? `thead-${this.footVariant}` : null] }, From 62c86950ecd6d06143428db6119d6a86e7e93799 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:16:12 -0300 Subject: [PATCH 11/54] Update tfoot.js --- src/components/table/tfoot.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index df3c1649824..9ab62f9bb6b 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -15,7 +15,6 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, provide() { return { - bvTableTfoot: this, bvTableRowGroup: this } }, From d29eea52f18f9d55f526eb2ab92d171983b94fa3 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:17:21 -0300 Subject: [PATCH 12/54] Update tr.js --- src/components/table/tr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index cd9f9857b7a..6ffe94bc219 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -27,11 +27,11 @@ export const BTr = /*#__PURE__*/ Vue.extend({ computed: { isDark() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.bvTable && this.bvTableRowGroup.bvTable.dark + return this.bvTableRowGroup && this.bvTableRowGroup.isDark }, isStacked() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.bvTable && this.bvTableRowGroup.bvTable.isStacked + return this.bvTableRowGroup && this.bvTableRowGroup.isStacked }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] From 7be1cd5e57bca1b21d234086c34e587ffdc4466f Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:24:16 -0300 Subject: [PATCH 13/54] Update td.js --- src/components/table/td.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 45115ac2ece..f2de57956d1 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -87,7 +87,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ return this.bvTableTr && this.bvTableTr.isDark }, isStacked() { - return this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.isStacked + return this.bvTableTr && this.bvTableTr.isStacked }, isStackedCell() { // We only support stacked-heading in tbody in stacked mode From 5706b57ae245ca3b268fbabeb1199ecd933e4e82 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:27:37 -0300 Subject: [PATCH 14/54] Update tr.js --- src/components/table/tr.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 6ffe94bc219..e4d929199f7 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -25,6 +25,19 @@ export const BTr = /*#__PURE__*/ Vue.extend({ }, props, computed: { + inTbody() { + // Sniffed by / + return this.bvTableRowGroup && this.bvTableRowGroup.isTbody + }, + inThead() { + // Sniffed by / + return this.bvTableRowGroup && this.bvTableRowGroup.isThead + }, + inTfoot() { + // Sniffed by / + return this.bvTableRowGroup && this.bvTableRowGroup.isTfoot + ) + }, isDark() { // Sniffed by / return this.bvTableRowGroup && this.bvTableRowGroup.isDark From 2b06c4c043542795f1dd43e51dfd802b84294c16 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:33:31 -0300 Subject: [PATCH 15/54] Update td.js --- src/components/table/td.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index f2de57956d1..c9957beb815 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -63,25 +63,14 @@ export const BTd = /*#__PURE__*/ Vue.extend({ ) }, inTbody() { - return ( - this.bvTableTr && - this.bvTableTr.bvTableRowGroup && - this.bvTableTr.bvTableRowGroup.isTbody - ) + return this.bvTableTr && this.bvTableTr.inTbody }, inThead() { - return ( - this.bvTableTr && - this.bvTableTr.bvTableRowGroup && - this.bvTableTr.bvTableRowGroup.isThead + return this.bvTableTr && this.bvTableTr.inThead ) }, inTfoot() { - return ( - this.bvTableTr && - this.bvTableTr.bvTableRowGroup && - this.bvTableTr.bvTableRowGroup.isTfoot - ) + return this.bvTableTr && this.bvTableTr.inTfoot }, isDark() { return this.bvTableTr && this.bvTableTr.isDark @@ -103,7 +92,6 @@ export const BTd = /*#__PURE__*/ Vue.extend({ return ( !this.isStacked && this.inTbody && - this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.stickyHeader ) }, From 3eda218848bb8c3da6fdd6e161bad63716fd2bba Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:36:12 -0300 Subject: [PATCH 16/54] Update td.js --- src/components/table/td.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index c9957beb815..284d8a5556e 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -91,7 +91,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // Sticky headers only apply to cells in table `thead` return ( !this.isStacked && - this.inTbody && + this.inThead && this.bvTableTr.bvTableRowGroup.bvTable.stickyHeader ) }, From ea5bf89c5a3033fff01fd858e7163be79d3dea78 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:40:48 -0300 Subject: [PATCH 17/54] Update thead.js --- src/components/table/thead.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 8f9042500d5..85d75f0a457 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -38,6 +38,17 @@ export const BThead = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return this.bvTable && this.bvTable.isStacked }, + isResponsive() { + // Sniffed by / / + return !this.isStacked && this.bvTable && this.bvTable.isResponsive + }, + isStickyHeader() { + // Needed to handle header background classes, due to lack of + // background color inheritance with Bootstrap v4 table CSS + // Sticky headers only apply to cells in table `thead` + // Sniffed by / / + return !this.isStacked && this.bvTable && this.bvTable.stickyHeader + }, theadClasses() { return [this.headVariant ? `thead-${this.headVariant}` : null] }, From 6b71e019756c738c15951d772ae85d764c03f511 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:42:09 -0300 Subject: [PATCH 18/54] Update tbody.js --- src/components/table/tbody.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 373c023fe0e..d3defa953fe 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -42,6 +42,15 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return this.bvTable && this.bvTable.isStacked }, + isResponsive() { + // Sniffed by / / + return !this.isStacked && this.bvTable && this.bvTable.isResponsive + }, + isStickyHeader() { + // Sniffed by / / + // Sticky headers are only supported in thead + return false + }, isTransitionGroup() { return this.tbodyTransitionProps || this.tbodyTransitionHandlers }, From f3e0a69c9c209652291fede9873573b79284d83a Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:42:47 -0300 Subject: [PATCH 19/54] Update tfoot.js --- src/components/table/tfoot.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 9ab62f9bb6b..06b1caa5a3f 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -38,6 +38,15 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return this.bvTable && this.bvTable.isStacked }, + isResponsive() { + // Sniffed by / / + return !this.isStacked && this.bvTable && this.bvTable.isResponsive + }, + isStickyHeader() { + // Sniffed by / / + // Sticky headers are only supported in thead + return false + }, tfootClasses() { return [this.footVariant ? `thead-${this.footVariant}` : null] }, From 0d9b095bb9c0af2a93af114821fd3af006ff9eec Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:45:24 -0300 Subject: [PATCH 20/54] Update tr.js --- src/components/table/tr.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index e4d929199f7..094969be5fc 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -46,6 +46,15 @@ export const BTr = /*#__PURE__*/ Vue.extend({ // Sniffed by / return this.bvTableRowGroup && this.bvTableRowGroup.isStacked }, + isResponsive() { + // Sniffed by / + return !this.isStacked && this.bvTableRowGroup && this.bvTableRowGroup.isResponsive + }, + isStickyHeader() { + // Sniffed by / + // Sticky headers are only supported in thead + return this.bvTableRowGroup && this.bvTableRowGroup.isStacked + }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] }, From 7a1b572edd500c1c282c68acf9094f521417b242 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 22:57:52 -0300 Subject: [PATCH 21/54] Update tr.js --- src/components/table/tr.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 094969be5fc..e2dd001f930 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -20,40 +20,40 @@ export const BTr = /*#__PURE__*/ Vue.extend({ }, inject: { bvTableRowGroup: { - defaut: null + defaut: () => ({}) } }, props, computed: { inTbody() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.isTbody + return this.bvTableRowGroup.isTbody }, inThead() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.isThead + return this.bvTableRowGroup.isThead }, inTfoot() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.isTfoot + return this.bvTableRowGroup.isTfoot ) }, isDark() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.isDark + return this.bvTableRowGroup.isDark }, isStacked() { // Sniffed by / - return this.bvTableRowGroup && this.bvTableRowGroup.isStacked + return this.bvTableRowGroup.isStacked }, isResponsive() { // Sniffed by / - return !this.isStacked && this.bvTableRowGroup && this.bvTableRowGroup.isResponsive + return this.bvTableRowGroup.isResponsive }, isStickyHeader() { // Sniffed by / // Sticky headers are only supported in thead - return this.bvTableRowGroup && this.bvTableRowGroup.isStacked + return this.bvTableRowGroup.isStickyHeader }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] From f096f8c2fe58bdf1f34e8d370bcf0342ff9dc8d8 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:06:18 -0300 Subject: [PATCH 22/54] Update tbody.js --- src/components/table/tbody.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index d3defa953fe..93ee707979c 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -25,7 +25,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: null + default: () => ({}) } }, props, @@ -36,21 +36,25 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ }, isDark() { // Sniffed by / / - return this.bvTable && this.bvTable.dark + return this.bvTable.dark }, isStacked() { // Sniffed by / / - return this.bvTable && this.bvTable.isStacked + return this.bvTable.isStacked }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable && this.bvTable.isResponsive + return !this.isStacked && this.bvTable.isResponsive }, isStickyHeader() { // Sniffed by / / // Sticky headers are only supported in thead return false }, + tableVariant() { + // Sniffed by / / + return this.bvTable.tableVariant + }, isTransitionGroup() { return this.tbodyTransitionProps || this.tbodyTransitionHandlers }, From 19b9c67c03acdb58a7c2d22427ee33e04c4db50b Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:07:31 -0300 Subject: [PATCH 23/54] Update tfoot.js --- src/components/table/tfoot.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 06b1caa5a3f..1f71de25e92 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -21,7 +21,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: null + default: () => ({}) } }, props, @@ -32,21 +32,25 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ }, isDark() { // Sniffed by / / - return this.bvTable && this.bvTable.dark + return this.bvTable.dark }, isStacked() { // Sniffed by / / - return this.bvTable && this.bvTable.isStacked + return this.bvTable.isStacked }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable && this.bvTable.isResponsive + return !this.isStacked && this.bvTable.isResponsive }, isStickyHeader() { // Sniffed by / / // Sticky headers are only supported in thead return false }, + tableVariant() { + // Sniffed by / / + return this.bvTable.tableVariant + }, tfootClasses() { return [this.footVariant ? `thead-${this.footVariant}` : null] }, From 7b5e3fbdddb18b1ffca2b5eaef8d8c552991885a Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:09:01 -0300 Subject: [PATCH 24/54] Update thead.js --- src/components/table/thead.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 85d75f0a457..d88ef180321 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -21,7 +21,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: null + default: () => ({}) } }, props, @@ -32,22 +32,26 @@ export const BThead = /*#__PURE__*/ Vue.extend({ }, isDark() { // Sniffed by / / - return this.bvTable && this.bvTable.dark + return this.bvTable.dark }, isStacked() { // Sniffed by / / - return this.bvTable && this.bvTable.isStacked + return this.bvTable.isStacked }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable && this.bvTable.isResponsive + return !this.isStacked && this.bvTable.isResponsive }, isStickyHeader() { + // Sniffed by / / // Needed to handle header background classes, due to lack of // background color inheritance with Bootstrap v4 table CSS // Sticky headers only apply to cells in table `thead` + return !this.isStacked && this.bvTable.stickyHeader + }, + tableVariant() { // Sniffed by / / - return !this.isStacked && this.bvTable && this.bvTable.stickyHeader + return this.bvTable.tableVariant }, theadClasses() { return [this.headVariant ? `thead-${this.headVariant}` : null] From 590f543c97e2d7441c705f1c5582e5bf7857d79e Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:15:45 -0300 Subject: [PATCH 25/54] Update tr.js --- src/components/table/tr.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index e2dd001f930..7886a5f8b31 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -55,6 +55,14 @@ export const BTr = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return this.bvTableRowGroup.isStickyHeader }, + tableVariant() { + // Sniffed by / + return this.bvTableRowGroup.tableVariant + }, + headVariant() { + // Sniffed by / + return this.bvTableRowGroup.headVariant + }, trClasses() { return [this.variant ? `${this.isDark ? 'bg' : 'table'}-${this.variant}` : null] }, From f996e61653536a743d1ceb67e32bd66a58457dc3 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:17:39 -0300 Subject: [PATCH 26/54] Update thead.js --- src/components/table/thead.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index d88ef180321..ba3de71f976 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -3,6 +3,7 @@ import normalizeSlotMixin from '../../mixins/normalize-slot' export const props = { headVariant: { + // Also sniffed by / / type: String, // supported values: 'lite', 'dark', or null default: null } From 185423e09539cf67dcd93046b54aab8f7681f461 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:20:34 -0300 Subject: [PATCH 27/54] Update td.js --- src/components/table/td.js | 44 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 284d8a5556e..20e999eda82 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -46,7 +46,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, inject: { bvTableTr: { - default: null + default: () => ({}) } }, props, @@ -55,44 +55,34 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // Overridden by return 'td' }, - inTable() { - return ( - this.bvTableTr && - this.bvTableTr.bvTableRowGroup && - this.bvTableTr.bvTableRowGroup.bvTable - ) - }, inTbody() { - return this.bvTableTr && this.bvTableTr.inTbody + return this.bvTableTr.inTbody }, inThead() { - return this.bvTableTr && this.bvTableTr.inThead + return this.bvTableTr.inThead ) }, inTfoot() { - return this.bvTableTr && this.bvTableTr.inTfoot + return this.bvTableTr.inTfoot }, isDark() { - return this.bvTableTr && this.bvTableTr.isDark + return this.bvTableTr.isDark }, isStacked() { - return this.bvTableTr && this.bvTableTr.isStacked + return this.bvTableTr.isStacked }, isStackedCell() { // We only support stacked-heading in tbody in stacked mode return this.inTbody && this.isStacked }, isResponsive() { - return !this.isStacked && this.inTable && this.bvTableTr.bvTableRowGroup.bvTable.isResponsive + return this.bvTableTr.isResponsive }, isStickyHeader() { // Needed to handle header background classes, due to lack of // background color inheritance with Bootstrap v4 table CSS // Sticky headers only apply to cells in table `thead` - return ( - !this.isStacked && - this.inThead && - this.bvTableTr.bvTableRowGroup.bvTable.stickyHeader + return this.bvTableTr.isStickyHeader ) }, isStickyColumn() { @@ -104,13 +94,19 @@ export const BTd = /*#__PURE__*/ Vue.extend({ return !this.isStacked && (this.isResponsive || this.isStickyHeader) && this.stickyColumn }, rowVariant() { - return this.bvTableTr ? this.bvTableTr.variant : null + return this.bvTableTr.variant }, headVariant() { - return this.isThead ? this.bvTableTr.bvTableRowGroup.headVariant : null + return this.bvTableTr.headVariant }, tableVariant() { - return this.inTable ? this.bvTableTr.bvTableRowGroup.bvTable.tableVariant : null + return this.bvTableTr.tableVariant + }, + computedColspan() { + return parseSpan(this.colspan) + }, + computedRowspan() { + return parseSpan(this.rowspan) }, cellClasses() { // We use computed props here for improved performance by caching @@ -129,12 +125,6 @@ export const BTd = /*#__PURE__*/ Vue.extend({ this.isStickyColumn ? 'b-table-sticky-column' : null ] }, - computedColspan() { - return parseSpan(this.colspan) - }, - computedRowspan() { - return parseSpan(this.rowspan) - }, cellAttrs() { // We use computed props here for improved performance by caching // the results of the object spread (Object.assign) From c94fbfefd17760bc96416027e153c8d911064928 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:21:43 -0300 Subject: [PATCH 28/54] Update td.js --- src/components/table/td.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 20e999eda82..e27650a8b03 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -60,7 +60,6 @@ export const BTd = /*#__PURE__*/ Vue.extend({ }, inThead() { return this.bvTableTr.inThead - ) }, inTfoot() { return this.bvTableTr.inTfoot From 532903b0a010722149cf603b1a355d3ac0334335 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:22:14 -0300 Subject: [PATCH 29/54] Update tr.js --- src/components/table/tr.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 7886a5f8b31..c5e6e55970a 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -36,7 +36,6 @@ export const BTr = /*#__PURE__*/ Vue.extend({ inTfoot() { // Sniffed by / return this.bvTableRowGroup.isTfoot - ) }, isDark() { // Sniffed by / From 4ce291f39fa46acf83721bd4c6f85447164f6bc1 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:24:30 -0300 Subject: [PATCH 30/54] Update td.js --- src/components/table/td.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index e27650a8b03..bcb8e00afa6 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -82,7 +82,6 @@ export const BTd = /*#__PURE__*/ Vue.extend({ // background color inheritance with Bootstrap v4 table CSS // Sticky headers only apply to cells in table `thead` return this.bvTableTr.isStickyHeader - ) }, isStickyColumn() { // Needed to handle header background classes, due to lack of From e826b17d62e964a51cfbe7b3fbe79fc11f2305ec Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Fri, 27 Sep 2019 23:24:51 -0300 Subject: [PATCH 31/54] Update tr.js --- src/components/table/tr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index c5e6e55970a..076e720d676 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -55,11 +55,11 @@ export const BTr = /*#__PURE__*/ Vue.extend({ return this.bvTableRowGroup.isStickyHeader }, tableVariant() { - // Sniffed by / + // Sniffed by / return this.bvTableRowGroup.tableVariant }, headVariant() { - // Sniffed by / + // Sniffed by / return this.bvTableRowGroup.headVariant }, trClasses() { From 18d8e30055491bc68160148e9d1f0f7476adac4e Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:13:22 -0300 Subject: [PATCH 32/54] Update td.js --- src/components/table/td.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index bcb8e00afa6..712e5285a39 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -46,7 +46,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, inject: { bvTableTr: { - default: () => ({}) + default: () => /* istanbul ignore next */ ({}) } }, props, From dce051eb3169ad319a6cada314f9dea60dcbcf45 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:13:39 -0300 Subject: [PATCH 33/54] Update tr.js --- src/components/table/tr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 076e720d676..21077573352 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -20,7 +20,7 @@ export const BTr = /*#__PURE__*/ Vue.extend({ }, inject: { bvTableRowGroup: { - defaut: () => ({}) + defaut: () => /* istanbul ignore next */ ({}) } }, props, From fc542c6ba273e215a69dce8ac153b6925d1826b1 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:13:53 -0300 Subject: [PATCH 34/54] Update thead.js --- src/components/table/thead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index ba3de71f976..72eb8c9cc6a 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -22,7 +22,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => ({}) + default: () => /* istanbul ignore next */ ({}) } }, props, From 63434fd6b18651fdf96f5c92f8381fd19d826202 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:14:17 -0300 Subject: [PATCH 35/54] Update tbody.js --- src/components/table/tbody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 93ee707979c..87e658752fc 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -25,7 +25,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => ({}) + default: () => /* istanbul ignore next */ ({}) } }, props, From 08ca596f8eec12dd95ebf97abdea0d933e5298be Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:14:50 -0300 Subject: [PATCH 36/54] Update tfoot.js --- src/components/table/tfoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 1f71de25e92..0fa03ac94e8 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -21,7 +21,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => ({}) + default: () => /* istanbul ignore next */ ({}) } }, props, From 1a135625fa87061157f6aa73e12d518b65ebd6e4 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:18:52 -0300 Subject: [PATCH 37/54] Update td.js --- src/components/table/td.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 712e5285a39..7483748b992 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -46,7 +46,9 @@ export const BTd = /*#__PURE__*/ Vue.extend({ inheritAttrs: false, inject: { bvTableTr: { - default: () => /* istanbul ignore next */ ({}) + default() /* istanbul ignore next */ { + return {} + } } }, props, From 1ee5cb6cf7e5edc17fd6192552c64a90871969df Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:19:26 -0300 Subject: [PATCH 38/54] Update tr.js --- src/components/table/tr.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/table/tr.js b/src/components/table/tr.js index 21077573352..4fe6ede0fb0 100644 --- a/src/components/table/tr.js +++ b/src/components/table/tr.js @@ -20,7 +20,9 @@ export const BTr = /*#__PURE__*/ Vue.extend({ }, inject: { bvTableRowGroup: { - defaut: () => /* istanbul ignore next */ ({}) + defaut() /* istanbul ignore next */ { + return {} + } } }, props, From 44e916bbdc39d080a2366e121d67957a0bf3fde1 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:20:03 -0300 Subject: [PATCH 39/54] Update tbody.js --- src/components/table/tbody.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 87e658752fc..89d9a039798 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -25,7 +25,9 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => /* istanbul ignore next */ ({}) + default() /* istanbul ignore next */ { + return {} + } } }, props, From df677e2c42764059e6a1c2fe3cb90f546889c4ad Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:20:31 -0300 Subject: [PATCH 40/54] Update tfoot.js --- src/components/table/tfoot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 0fa03ac94e8..c4b5db24115 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -21,7 +21,9 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => /* istanbul ignore next */ ({}) + default() /* istanbul ignore next */ { + return {} + } } }, props, From bf62ad8f69c7219d2a2b143b625491c4d87ef233 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:21:10 -0300 Subject: [PATCH 41/54] Update thead.js --- src/components/table/thead.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 72eb8c9cc6a..c77f612bfb3 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -22,7 +22,9 @@ export const BThead = /*#__PURE__*/ Vue.extend({ inject: { bvTable: { // Sniffed by / / - default: () => /* istanbul ignore next */ ({}) + default() /* istanbul ignore next */ { + return {} + } } }, props, From f4bafcc762e699de15195e9c3a7bc11777942a05 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:35:45 -0300 Subject: [PATCH 42/54] Update thead.js --- src/components/table/thead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index c77f612bfb3..9b444f98d33 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -52,7 +52,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ // Sticky headers only apply to cells in table `thead` return !this.isStacked && this.bvTable.stickyHeader }, - tableVariant() { + tableVariant() /* istanbul ignore next: Not currently sniffed */ { // Sniffed by / / return this.bvTable.tableVariant }, From 6f4b9fb6509fa62524882682ee06005bd0a9e36a Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:36:40 -0300 Subject: [PATCH 43/54] Update tfoot.js --- src/components/table/tfoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index c4b5db24115..0dfef779d05 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -49,7 +49,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return false }, - tableVariant() { + tableVariant() /* istanbul ignore next: Not currently sniffed */ { // Sniffed by / / return this.bvTable.tableVariant }, From b9f8786551b824be55fe03910d302dadc00ac6b3 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:37:10 -0300 Subject: [PATCH 44/54] Update tbody.js --- src/components/table/tbody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 89d9a039798..e31ae11dd4a 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -53,7 +53,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return false }, - tableVariant() { + tableVariant() /* istanbul ignore next: Not currently sniffed in tests */{ // Sniffed by / / return this.bvTable.tableVariant }, From 8da20446ee84fdc0edf6d5fb2dd2765486f860f3 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:37:52 -0300 Subject: [PATCH 45/54] Update thead.js --- src/components/table/thead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index 9b444f98d33..c77f612bfb3 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -52,7 +52,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ // Sticky headers only apply to cells in table `thead` return !this.isStacked && this.bvTable.stickyHeader }, - tableVariant() /* istanbul ignore next: Not currently sniffed */ { + tableVariant() { // Sniffed by / / return this.bvTable.tableVariant }, From 95a6ba6db73aa841f93cd5cd2acb1b4ee9e89d70 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:38:36 -0300 Subject: [PATCH 46/54] Update tfoot.js --- src/components/table/tfoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 0dfef779d05..713d34e7319 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -49,7 +49,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return false }, - tableVariant() /* istanbul ignore next: Not currently sniffed */ { + tableVariant() /* istanbul ignore next: Not currently sniffed in tests */ { // Sniffed by / / return this.bvTable.tableVariant }, From 5d0538b525b2f518ff5126c7a62f1ba0c1b23748 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:41:31 -0300 Subject: [PATCH 47/54] Update tbody.js --- src/components/table/tbody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index e31ae11dd4a..97c79b5830f 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -53,7 +53,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return false }, - tableVariant() /* istanbul ignore next: Not currently sniffed in tests */{ + tableVariant() /* istanbul ignore next: Not currently sniffed in tests */{ // Sniffed by / / return this.bvTable.tableVariant }, From fe62da1a4a8011f31c3f94ae64177c7136de42a4 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:45:12 -0300 Subject: [PATCH 48/54] Update tbody.js --- src/components/table/tbody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 97c79b5830f..0a074bc4b5f 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -53,7 +53,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ // Sticky headers are only supported in thead return false }, - tableVariant() /* istanbul ignore next: Not currently sniffed in tests */{ + tableVariant() /* istanbul ignore next: Not currently sniffed in tests */ { // Sniffed by / / return this.bvTable.tableVariant }, From 3ef45ef9d237a1a5a764dd101f320eecb422f175 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:46:37 -0300 Subject: [PATCH 49/54] Update tfoot.js --- src/components/table/tfoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index 713d34e7319..afa9781b0c0 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -32,7 +32,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ // Sniffed by / / return true }, - isDark() { + isDark() /* istanbul ignore next: Not currently sniffed in tests */ { // Sniffed by / / return this.bvTable.dark }, From 4b5e0645db5806750ec3c6c3b953b631b41dedd8 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:50:06 -0300 Subject: [PATCH 50/54] Update td.js --- src/components/table/td.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/table/td.js b/src/components/table/td.js index 7483748b992..573460bbe24 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -99,6 +99,9 @@ export const BTd = /*#__PURE__*/ Vue.extend({ headVariant() { return this.bvTableTr.headVariant }, + footVariant() /* istnabul ignore next: need to add in tests for footer variant */ { + return this.bvTableTr.footVariant + }, tableVariant() { return this.bvTableTr.tableVariant }, @@ -111,6 +114,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ cellClasses() { // We use computed props here for improved performance by caching // the results of the string interpolation + // TODO: need to add handling for footVariant let variant = this.variant if ( (!variant && this.isStickyHeader && !this.headVariant) || From bcc6c2ba31fc4782307a5ed47989a5462297c823 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 00:54:28 -0300 Subject: [PATCH 51/54] Update td.js --- src/components/table/td.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/td.js b/src/components/table/td.js index 573460bbe24..0cc7d362ef0 100644 --- a/src/components/table/td.js +++ b/src/components/table/td.js @@ -99,7 +99,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({ headVariant() { return this.bvTableTr.headVariant }, - footVariant() /* istnabul ignore next: need to add in tests for footer variant */ { + footVariant() /* istanbul ignore next: need to add in tests for footer variant */ { return this.bvTableTr.footVariant }, tableVariant() { From ea60ae21ab9df35cd75c3bde9027a535fdabf95e Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 02:05:36 -0300 Subject: [PATCH 52/54] Update tfoot.js --- src/components/table/tfoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tfoot.js b/src/components/table/tfoot.js index afa9781b0c0..34fe53019ee 100644 --- a/src/components/table/tfoot.js +++ b/src/components/table/tfoot.js @@ -42,7 +42,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({ }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable.isResponsive + return this.bvTable.isResponsive }, isStickyHeader() { // Sniffed by / / From c1b53f1e027cbf573eb74d1964d7c26fc2063dad Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 02:06:40 -0300 Subject: [PATCH 53/54] Update thead.js --- src/components/table/thead.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/table/thead.js b/src/components/table/thead.js index c77f612bfb3..db3a5fe683d 100644 --- a/src/components/table/thead.js +++ b/src/components/table/thead.js @@ -29,7 +29,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ }, props, computed: { - isTfoot() { + isThead() { // Sniffed by / / return true }, @@ -43,7 +43,7 @@ export const BThead = /*#__PURE__*/ Vue.extend({ }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable.isResponsive + return this.bvTable.isResponsive }, isStickyHeader() { // Sniffed by / / From 467fd3fc36f205d7bac631adda5259b8af954625 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Sat, 28 Sep 2019 02:07:40 -0300 Subject: [PATCH 54/54] Update tbody.js --- src/components/table/tbody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/tbody.js b/src/components/table/tbody.js index 0a074bc4b5f..32cba20d817 100644 --- a/src/components/table/tbody.js +++ b/src/components/table/tbody.js @@ -46,7 +46,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({ }, isResponsive() { // Sniffed by / / - return !this.isStacked && this.bvTable.isResponsive + return this.bvTable.isResponsive }, isStickyHeader() { // Sniffed by / /