@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.
@@ -16409,12 +16409,12 @@ var cv_code_snippet_component = Object(componentNormalizer["a" /* default */])(
16409
16409
  "use strict";
16410
16410
  __webpack_require__.r(__webpack_exports__);
16411
16411
 
16412
- // 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=cbefa9ea&
16413
- 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":this.registeredRows.length,"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)}
16412
+ // 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&
16413
+ 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)}
16414
16414
  var staticRenderFns = []
16415
16415
 
16416
16416
 
16417
- // CONCATENATED MODULE: ./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=cbefa9ea&
16417
+ // CONCATENATED MODULE: ./src/components/cv-data-table/cv-data-table.vue?vue&type=template&id=732017fe&
16418
16418
 
16419
16419
  // 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&
16420
16420
  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:{
@@ -16738,6 +16738,13 @@ const rows = children => children.filter(child => child.isCvDataTableRow);
16738
16738
  }
16739
16739
  return false;
16740
16740
  },
16741
+ internalNumberOfItems() {
16742
+ if (this.internalPagination && typeof this.internalPagination.numberOfItems === 'number') {
16743
+ return this.internalPagination.numberOfItems;
16744
+ } else {
16745
+ return this.registeredRows.length;
16746
+ }
16747
+ },
16741
16748
  modifierClasses() {
16742
16749
  const prefix = 'bx--data-table-v2--';
16743
16750
  const sizeClass = this.rowSize.length === 0 || this.rowSize === 'standard' ? '' : `${prefix}${this.rowSize} `;