@carbon/vue 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carbon-vue.common.js +10 -3
- package/dist/carbon-vue.common.js.map +1 -1
- package/dist/carbon-vue.umd.js +10 -3
- package/dist/carbon-vue.umd.js.map +1 -1
- package/dist/carbon-vue.umd.min.js +1 -1
- package/dist/carbon-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
- package/src/components/cv-data-table/cv-data-table.vue +8 -1
|
@@ -16400,12 +16400,12 @@ var cv_code_snippet_component = Object(componentNormalizer["a" /* default */])(
|
|
|
16400
16400
|
"use strict";
|
|
16401
16401
|
__webpack_require__.r(__webpack_exports__);
|
|
16402
16402
|
|
|
16403
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"15fff37f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=
|
|
16404
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{style:(_vm.tableStyle)},[_c('div',{staticClass:"bx--data-table-v2-container"},[(_vm.title)?_c('h4',{staticClass:"bx--data-table-v2-header"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('section',{staticClass:"bx--table-toolbar"},[(_vm.batchActive)?_c('div',{staticStyle:{"min-height":"32px","max-width":"0"}}):_vm._e(),(_vm.hasBatchActions)?_c('div',{staticClass:"bx--batch-actions",class:{ 'bx--batch-actions--active': _vm.batchActive },attrs:{"aria-label":"Table Action Bar"}},[_c('div',{staticClass:"bx--action-list"},[_vm._t("batch-actions")],2),_c('div',{staticClass:"bx--batch-summary"},[_c('p',{staticClass:"bx--batch-summary__para"},[_c('span',{attrs:{"data-items-selected":""}},[_vm._v(_vm._s(_vm.dataRowsSelected.length))]),_vm._v("\n items selected\n ")]),_c('button',{staticClass:"bx--batch-summary__cancel",on:{"click":_vm.deselect}},[_vm._v("Cancel")])])]):_vm._e(),(_vm.$listeners.search)?_c('div',{staticClass:"bx--toolbar-search-container"},[_c('cv-search',{attrs:{"disabled":_vm.batchActive,"theme":"light","small":"","form-item":false,"placeholder":_vm.searchPlaceholder},on:{"input":function($event){return _vm.$emit('search', $event)}}})],1):_vm._e(),(_vm.$slots.actions && !_vm.batchActive)?_c('div',{staticClass:"bx--toolbar-content"},[_vm._t("actions")],2):_vm._e()]),_c('table',{staticClass:"bx--data-table-v2",class:_vm.modifierClasses},[_c('thead',[_c('tr',[(_vm.hasBatchActions)?_c('th',[_c('cv-checkbox',{attrs:{"form-item":false,"value":"headingCheck"},on:{"change":_vm.onHeadingCheckChange},model:{value:(_vm.headingChecked),callback:function ($$v) {_vm.headingChecked=$$v},expression:"headingChecked"}})],1):_vm._e(),_vm._l((_vm.dataColumns),function(column,index){return _c('cv-data-table-headnig',{key:(index + ":" + column),style:(_vm.headingStyle(index)),attrs:{"heading":column.label ? column.label : column,"sortable":_vm.sortable,"order":column.order},on:{"sort":function (val) { return _vm.onSort(index, val); }}})}),(_vm.hasOverflowMenu)?_c('th'):_vm._e()],2)]),_c('tbody',[_vm._t("data",_vm._l((_vm.data),function(row,rowIndex){return _c('cv-data-table-row',{key:("row:" + rowIndex),ref:"dataRows",refInFor:true,attrs:{"value":("" + rowIndex),"overflow-menu":_vm.overflowMenu}},_vm._l((row),function(cell,colIndex){return _c('cv-data-table-cell',{key:("cell:" + colIndex + ":" + rowIndex),style:(_vm.dataStyle(colIndex))},[_vm._v(_vm._s(cell))])}),1)}))],2)])]),(_vm.pagination)?_c('cv-pagination',{attrs:{"backward-text":_vm.pagination.backwardText,"forward-text":_vm.pagination.forwardText,"number-of-items":
|
|
16403
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"15fff37f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=732017fe&
|
|
16404
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{style:(_vm.tableStyle)},[_c('div',{staticClass:"bx--data-table-v2-container"},[(_vm.title)?_c('h4',{staticClass:"bx--data-table-v2-header"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('section',{staticClass:"bx--table-toolbar"},[(_vm.batchActive)?_c('div',{staticStyle:{"min-height":"32px","max-width":"0"}}):_vm._e(),(_vm.hasBatchActions)?_c('div',{staticClass:"bx--batch-actions",class:{ 'bx--batch-actions--active': _vm.batchActive },attrs:{"aria-label":"Table Action Bar"}},[_c('div',{staticClass:"bx--action-list"},[_vm._t("batch-actions")],2),_c('div',{staticClass:"bx--batch-summary"},[_c('p',{staticClass:"bx--batch-summary__para"},[_c('span',{attrs:{"data-items-selected":""}},[_vm._v(_vm._s(_vm.dataRowsSelected.length))]),_vm._v("\n items selected\n ")]),_c('button',{staticClass:"bx--batch-summary__cancel",on:{"click":_vm.deselect}},[_vm._v("Cancel")])])]):_vm._e(),(_vm.$listeners.search)?_c('div',{staticClass:"bx--toolbar-search-container"},[_c('cv-search',{attrs:{"disabled":_vm.batchActive,"theme":"light","small":"","form-item":false,"placeholder":_vm.searchPlaceholder},on:{"input":function($event){return _vm.$emit('search', $event)}}})],1):_vm._e(),(_vm.$slots.actions && !_vm.batchActive)?_c('div',{staticClass:"bx--toolbar-content"},[_vm._t("actions")],2):_vm._e()]),_c('table',{staticClass:"bx--data-table-v2",class:_vm.modifierClasses},[_c('thead',[_c('tr',[(_vm.hasBatchActions)?_c('th',[_c('cv-checkbox',{attrs:{"form-item":false,"value":"headingCheck"},on:{"change":_vm.onHeadingCheckChange},model:{value:(_vm.headingChecked),callback:function ($$v) {_vm.headingChecked=$$v},expression:"headingChecked"}})],1):_vm._e(),_vm._l((_vm.dataColumns),function(column,index){return _c('cv-data-table-headnig',{key:(index + ":" + column),style:(_vm.headingStyle(index)),attrs:{"heading":column.label ? column.label : column,"sortable":_vm.sortable,"order":column.order},on:{"sort":function (val) { return _vm.onSort(index, val); }}})}),(_vm.hasOverflowMenu)?_c('th'):_vm._e()],2)]),_c('tbody',[_vm._t("data",_vm._l((_vm.data),function(row,rowIndex){return _c('cv-data-table-row',{key:("row:" + rowIndex),ref:"dataRows",refInFor:true,attrs:{"value":("" + rowIndex),"overflow-menu":_vm.overflowMenu}},_vm._l((row),function(cell,colIndex){return _c('cv-data-table-cell',{key:("cell:" + colIndex + ":" + rowIndex),style:(_vm.dataStyle(colIndex))},[_vm._v(_vm._s(cell))])}),1)}))],2)])]),(_vm.pagination)?_c('cv-pagination',{attrs:{"backward-text":_vm.pagination.backwardText,"forward-text":_vm.pagination.forwardText,"number-of-items":_vm.internalNumberOfItems,"page":_vm.pagination.page,"page-number-label":_vm.pagination.pageNumberLabel,"page-sizes-label":_vm.pagination.pageSizesLabel,"page-sizes":_vm.pagination.pageSizes},on:{"change":function($event){return _vm.$emit('pagination', $event)}}}):_vm._e()],1)}
|
|
16405
16405
|
var staticRenderFns = []
|
|
16406
16406
|
|
|
16407
16407
|
|
|
16408
|
-
// CONCATENATED MODULE: ./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=
|
|
16408
|
+
// CONCATENATED MODULE: ./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=732017fe&
|
|
16409
16409
|
|
|
16410
16410
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"15fff37f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/cv-data-table/_cv-data-table-heading.vue?vue&type=template&id=4dc76e11&
|
|
16411
16411
|
var _cv_data_table_headingvue_type_template_id_4dc76e11_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('th',{attrs:{"aria-sort":_vm.sortOrder}},[(_vm.sortable)?_c('button',{staticClass:"bx--table-sort-v2",class:{
|
|
@@ -16729,6 +16729,13 @@ const rows = children => children.filter(child => child.isCvDataTableRow);
|
|
|
16729
16729
|
}
|
|
16730
16730
|
return false;
|
|
16731
16731
|
},
|
|
16732
|
+
internalNumberOfItems() {
|
|
16733
|
+
if (this.internalPagination && typeof this.internalPagination.numberOfItems === 'number') {
|
|
16734
|
+
return this.internalPagination.numberOfItems;
|
|
16735
|
+
} else {
|
|
16736
|
+
return this.registeredRows.length;
|
|
16737
|
+
}
|
|
16738
|
+
},
|
|
16732
16739
|
modifierClasses() {
|
|
16733
16740
|
const prefix = 'bx--data-table-v2--';
|
|
16734
16741
|
const sizeClass = this.rowSize.length === 0 || this.rowSize === 'standard' ? '' : `${prefix}${this.rowSize} `;
|