@knime/kds-table 6.3.0 → 6.4.0

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useCssVars, useSlots, useTemplateRef, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
2
- import { KdsButton, KdsCheckbox, KdsDropdown, KdsIcon, KdsLoadingSkeleton, KdsMenuButton, KdsMissingValueIcon, KdsPopover, KdsSearchInput, KdsToggleButton, vKdsTooltip } from "@knime/kds-components";
2
+ import { KdsButton, KdsCheckbox, KdsDropdown, KdsEmptyState, KdsIcon, KdsLoadingSkeleton, KdsMenuButton, KdsMissingValueIcon, KdsPopover, KdsSearchInput, KdsToggleButton, vKdsTooltip } from "@knime/kds-components";
3
3
  import './index.css';//#region \0rolldown/runtime.js
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -5000,9 +5000,9 @@ var createEditingCellKeydownHandler = ({ moveSelection }) => {
5000
5000
  //#endregion
5001
5001
  //#region src/components/control/PageNavigation.vue?vue&type=script&setup=true&lang.ts
5002
5002
  var _hoisted_1$11 = { class: "page-navigation" };
5003
- var _hoisted_2$7 = { class: "navigation-buttons" };
5003
+ var _hoisted_2$8 = { class: "navigation-buttons" };
5004
5004
  var _hoisted_3$4 = { class: "page-count" };
5005
- var _hoisted_4$2 = { class: "navigation-buttons" };
5005
+ var _hoisted_4$3 = { class: "navigation-buttons" };
5006
5006
  //#endregion
5007
5007
  //#region src/components/control/PageNavigation.vue
5008
5008
  var PageNavigation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -5028,7 +5028,7 @@ var PageNavigation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5028
5028
  };
5029
5029
  return (_ctx, _cache) => {
5030
5030
  return openBlock(), createElementBlock("div", _hoisted_1$11, [
5031
- createElementVNode("div", _hoisted_2$7, [createVNode(unref(KdsButton), {
5031
+ createElementVNode("div", _hoisted_2$8, [createVNode(unref(KdsButton), {
5032
5032
  variant: "transparent",
5033
5033
  size: "small",
5034
5034
  "leading-icon": "chevron-left-double",
@@ -5044,7 +5044,7 @@ var PageNavigation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5044
5044
  onClick: _cache[1] || (_cache[1] = ($event) => onPageChange(__props.currentPage - 1))
5045
5045
  }, null, 8, ["disabled"])]),
5046
5046
  createElementVNode("span", _hoisted_3$4, toDisplayString(__props.currentPage) + " of " + toDisplayString(__props.totalPages), 1),
5047
- createElementVNode("div", _hoisted_4$2, [createVNode(unref(KdsButton), {
5047
+ createElementVNode("div", _hoisted_4$3, [createVNode(unref(KdsButton), {
5048
5048
  variant: "transparent",
5049
5049
  size: "small",
5050
5050
  "leading-icon": "chevron-right",
@@ -5069,12 +5069,12 @@ var _hoisted_1$10 = {
5069
5069
  key: 0,
5070
5070
  class: "subtle"
5071
5071
  };
5072
- var _hoisted_2$6 = {
5072
+ var _hoisted_2$7 = {
5073
5073
  key: 1,
5074
5074
  class: "row-range-container"
5075
5075
  };
5076
5076
  var _hoisted_3$3 = { class: "subtle" };
5077
- var _hoisted_4$1 = {
5077
+ var _hoisted_4$2 = {
5078
5078
  key: 0,
5079
5079
  class: "muted"
5080
5080
  };
@@ -5110,9 +5110,9 @@ var PageControls_vue_vue_type_script_lang_default = {
5110
5110
  const pageRangeEnd = computed(() => Math.min(__props.currentPage * __props.pageSize, __props.currentItems));
5111
5111
  const rowCountText = computed(() => hasMultiplePages.value && __props.currentItems ? `of ${__props.currentItems}` : __props.currentItems);
5112
5112
  return (_ctx, _cache) => {
5113
- return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$6, [
5113
+ return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
5114
5114
  createElementVNode("span", _hoisted_3$3, toDisplayString(__props.rowLabel) + ":", 1),
5115
- hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
5115
+ hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
5116
5116
  createElementVNode("span", _hoisted_5, toDisplayString(rowCountText.value), 1)
5117
5117
  ]));
5118
5118
  };
@@ -5179,7 +5179,7 @@ var _hoisted_1$9 = {
5179
5179
  key: 0,
5180
5180
  class: "page-controls"
5181
5181
  };
5182
- var _hoisted_2$5 = { class: "page-size-menu" };
5182
+ var _hoisted_2$6 = { class: "page-size-menu" };
5183
5183
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5184
5184
  const _component_PageRowRange = resolveComponent("PageRowRange");
5185
5185
  const _component_PageNavigation = resolveComponent("PageNavigation");
@@ -5212,7 +5212,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5212
5212
  "has-next-page",
5213
5213
  "has-previous-page"
5214
5214
  ])) : createCommentVNode("", true),
5215
- createElementVNode("div", _hoisted_2$5, [$options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
5215
+ createElementVNode("div", _hoisted_2$6, [$options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
5216
5216
  key: 0,
5217
5217
  items: $options.pageSizeItems,
5218
5218
  label: $options.createText($props.pageConfig.pageSize),
@@ -5232,10 +5232,10 @@ var PageControls_default = /*#__PURE__*/ _plugin_vue_export_helper_default(PageC
5232
5232
  //#region src/components/control/actionbar/PopoverContainer.vue
5233
5233
  var _sfc_main = {};
5234
5234
  var _hoisted_1$8 = { class: "popover" };
5235
- var _hoisted_2$4 = { class: "header" };
5235
+ var _hoisted_2$5 = { class: "header" };
5236
5236
  var _hoisted_3$2 = { class: "body" };
5237
5237
  function _sfc_render$3(_ctx, _cache) {
5238
- return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("span", _hoisted_2$4, [renderSlot(_ctx.$slots, "header", {}, void 0, true)]), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "body", {}, void 0, true)])]);
5238
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [createElementVNode("span", _hoisted_2$5, [renderSlot(_ctx.$slots, "header", {}, void 0, true)]), createElementVNode("div", _hoisted_3$2, [renderSlot(_ctx.$slots, "body", {}, void 0, true)])]);
5239
5239
  }
5240
5240
  var PopoverContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render$3], ["__scopeId", "data-v-349cd3ba"]]);
5241
5241
  //#endregion
@@ -5374,11 +5374,12 @@ var SortControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
5374
5374
  //#endregion
5375
5375
  //#region src/components/control/TableActionBar.vue?vue&type=script&setup=true&lang.ts
5376
5376
  var _hoisted_1$6 = { class: "left" };
5377
- var _hoisted_2$3 = {
5377
+ var _hoisted_2$4 = { class: "center" };
5378
+ var _hoisted_3$1 = {
5378
5379
  key: 0,
5379
5380
  class: "dimension"
5380
5381
  };
5381
- var _hoisted_3$1 = { class: "right" };
5382
+ var _hoisted_4$1 = { class: "right" };
5382
5383
  //#endregion
5383
5384
  //#region src/components/control/TableActionBar.vue
5384
5385
  var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -5427,43 +5428,43 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5427
5428
  return hasContent.value ? (openBlock(), createElementBlock("div", {
5428
5429
  key: 0,
5429
5430
  class: normalizeClass(["kds-table-action-bar", { "temporary-view": isTemporaryView.value }])
5430
- }, [createElementVNode("div", _hoisted_1$6, [
5431
- __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true),
5432
- __props.actionConfig.enableSorting ? (openBlock(), createBlock(SortControl_default, {
5433
- key: 1,
5431
+ }, [
5432
+ createElementVNode("div", _hoisted_1$6, [__props.actionConfig.enableSorting && !__props.actionConfig.hideSortingButton ? (openBlock(), createBlock(SortControl_default, {
5433
+ key: 0,
5434
5434
  "col-sort-values": __props.colSortValues,
5435
5435
  "sort-control-options": __props.sortControlOptions,
5436
5436
  onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
5437
- }, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true),
5438
- renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)
5439
- ]), createElementVNode("div", _hoisted_3$1, [
5440
- __props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
5441
- key: 0,
5442
- ariaLabel: "Search table",
5443
- size: "small",
5444
- "model-value": __props.actionState?.searchTerm ?? "",
5445
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:searchTerm", $event))
5446
- }, null, 8, ["model-value"])) : createCommentVNode("", true),
5447
- __props.actionConfig.settingsItems?.length ? (openBlock(), createBlock(unref(KdsMenuButton), {
5448
- key: 1,
5449
- ariaLabel: "Table settings",
5450
- size: "small",
5451
- variant: "transparent",
5452
- "leading-icon": "parameter",
5453
- items: __props.actionConfig.settingsItems
5454
- }, null, 8, ["items"])) : createCommentVNode("", true),
5455
- showResetButton.value ? (openBlock(), createBlock(unref(KdsButton), {
5456
- key: 2,
5457
- ariaLabel: "Reset to Nodeoutput",
5458
- size: "small",
5459
- variant: "transparent",
5460
- "leading-icon": "x-close",
5461
- onClick: _cache[2] || (_cache[2] = ($event) => emit("resetTemporaryView"))
5462
- })) : createCommentVNode("", true)
5463
- ])], 2)) : createCommentVNode("", true);
5437
+ }, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)]),
5438
+ createElementVNode("div", _hoisted_2$4, [__props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true)]),
5439
+ createElementVNode("div", _hoisted_4$1, [
5440
+ __props.actionConfig.enableSearch ? (openBlock(), createBlock(unref(KdsSearchInput), {
5441
+ key: 0,
5442
+ ariaLabel: "Search table",
5443
+ size: "small",
5444
+ "model-value": __props.actionState?.searchTerm ?? "",
5445
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:searchTerm", $event))
5446
+ }, null, 8, ["model-value"])) : createCommentVNode("", true),
5447
+ __props.actionConfig.settingsItems?.length ? (openBlock(), createBlock(unref(KdsMenuButton), {
5448
+ key: 1,
5449
+ ariaLabel: "Table settings",
5450
+ size: "small",
5451
+ variant: "transparent",
5452
+ "leading-icon": "parameter",
5453
+ items: __props.actionConfig.settingsItems
5454
+ }, null, 8, ["items"])) : createCommentVNode("", true),
5455
+ showResetButton.value ? (openBlock(), createBlock(unref(KdsButton), {
5456
+ key: 2,
5457
+ ariaLabel: "Reset table",
5458
+ size: "small",
5459
+ variant: "transparent",
5460
+ "leading-icon": "x-close",
5461
+ onClick: _cache[2] || (_cache[2] = ($event) => emit("resetTemporaryView"))
5462
+ })) : createCommentVNode("", true)
5463
+ ])
5464
+ ], 2)) : createCommentVNode("", true);
5464
5465
  };
5465
5466
  }
5466
- }), [["__scopeId", "data-v-6538127c"]]);
5467
+ }), [["__scopeId", "data-v-aba83d11"]]);
5467
5468
  //#endregion
5468
5469
  //#region src/components/composables/useHeaderMenuItems.ts
5469
5470
  var useHeaderMenuItems = ({ enableSorting, sortDirection, sortTexts, additionalMenuItems, onColumnSort }) => {
@@ -5640,7 +5641,7 @@ var useAutoScrollOnRightEdge = ({ scrollContainer, autoScrollOffset, onAutoScrol
5640
5641
  //#endregion
5641
5642
  //#region src/components/layout/HeaderCell.vue?vue&type=script&setup=true&lang.ts
5642
5643
  var _hoisted_1$5 = ["tabindex"];
5643
- var _hoisted_2$2 = { class: "header-text-container" };
5644
+ var _hoisted_2$3 = { class: "header-text-container" };
5644
5645
  var _hoisted_3 = {
5645
5646
  key: 0,
5646
5647
  class: "sub-header-text-container"
@@ -5853,7 +5854,7 @@ var Header_vue_vue_type_script_lang_default = {
5853
5854
  ref_key: "mainHeader",
5854
5855
  ref: mainHeader,
5855
5856
  class: "main-header"
5856
- }, [withDirectives((openBlock(), createElementBlock("div", _hoisted_2$2, [createElementVNode("span", {
5857
+ }, [withDirectives((openBlock(), createElementBlock("div", _hoisted_2$3, [createElementVNode("span", {
5857
5858
  ref_key: "headerText",
5858
5859
  ref: headerText
5859
5860
  }, toDisplayString(__props.column.header), 513)])), [[
@@ -6206,7 +6207,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6206
6207
  style: normalizeStyle($options.headerSelectionOverlayStyle)
6207
6208
  }, null, 6)) : createCommentVNode("", true)]);
6208
6209
  }
6209
- var Header_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Header_vue_vue_type_script_lang_default, [["render", _sfc_render$2], ["__scopeId", "data-v-5ec89e0d"]]);
6210
+ var Header_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Header_vue_vue_type_script_lang_default, [["render", _sfc_render$2], ["__scopeId", "data-v-fc0a0ecb"]]);
6210
6211
  //#endregion
6211
6212
  //#region src/components/layout/NewRowButton.vue?vue&type=script&setup=true&lang.ts
6212
6213
  var _hoisted_1$3 = { class: "sticky-container" };
@@ -6262,7 +6263,7 @@ var _hoisted_1$2 = {
6262
6263
  ref: "cell-content",
6263
6264
  class: "cell-content"
6264
6265
  };
6265
- var _hoisted_2$1 = {
6266
+ var _hoisted_2$2 = {
6266
6267
  key: 3,
6267
6268
  class: "cell-text"
6268
6269
  };
@@ -6408,7 +6409,7 @@ var CellRenderer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
6408
6409
  }, [createElementVNode("div", _hoisted_1$2, [__props.isEditing ? renderSlot(_ctx.$slots, "editable-cell", { cellElement: _ctx.$el }, void 0, true, 0) : __props.isMissing ? (openBlock(), createBlock(unref(KdsMissingValueIcon), {
6409
6410
  key: 1,
6410
6411
  size: "small"
6411
- })) : __props.isSlotted ? renderSlot(_ctx.$slots, "default", { width: __props.size - props.defaultLeftRightPadding * 2 - (showCellExpandButton.value && !__props.overlayExpandButton ? unref(EXPAND_BUTTON_WIDTH) : 0) }, void 0, true, 2) : (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(__props.text), 1)), showCellExpandButton.value ? (openBlock(), createBlock(CellExpandButton_default, {
6412
+ })) : __props.isSlotted ? renderSlot(_ctx.$slots, "default", { width: __props.size - props.defaultLeftRightPadding * 2 - (showCellExpandButton.value && !__props.overlayExpandButton ? unref(EXPAND_BUTTON_WIDTH) : 0) }, void 0, true, 2) : (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.text), 1)), showCellExpandButton.value ? (openBlock(), createBlock(CellExpandButton_default, {
6412
6413
  key: 4,
6413
6414
  class: normalizeClass({ overlaid: __props.overlayExpandButton }),
6414
6415
  toggled: isExpanded.value,
@@ -6519,7 +6520,7 @@ var _hoisted_1$1 = {
6519
6520
  key: 0,
6520
6521
  class: "deletion-cell"
6521
6522
  };
6522
- var _hoisted_2 = {
6523
+ var _hoisted_2$1 = {
6523
6524
  key: 2,
6524
6525
  class: "action"
6525
6526
  };
@@ -6838,7 +6839,7 @@ var TableUI_vue_vue_type_script_lang_default = {
6838
6839
  "onDataValueView"
6839
6840
  ]);
6840
6841
  }), 128)),
6841
- filteredSubMenuItems.value?.length ? (openBlock(), createElementBlock("td", _hoisted_2, [createVNode(unref(KdsMenuButton), {
6842
+ filteredSubMenuItems.value?.length ? (openBlock(), createElementBlock("td", _hoisted_2$1, [createVNode(unref(KdsMenuButton), {
6842
6843
  modelValue: isMenuOpen.value,
6843
6844
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isMenuOpen.value = $event),
6844
6845
  ariaLabel: "More actions",
@@ -7000,7 +7001,8 @@ var TableUI_vue_vue_type_script_lang_default = {
7000
7001
  }), [["__scopeId", "data-v-e925d8f8"]]),
7001
7002
  TableCore: TableCore_default,
7002
7003
  NewRowButton: NewRowButton_default,
7003
- TableActionBar: TableActionBar_default
7004
+ TableActionBar: TableActionBar_default,
7005
+ KdsEmptyState
7004
7006
  },
7005
7007
  props: {
7006
7008
  /**
@@ -7102,6 +7104,10 @@ var TableUI_vue_vue_type_script_lang_default = {
7102
7104
  disableRowHeightTransition: {
7103
7105
  type: Boolean,
7104
7106
  default: false
7107
+ },
7108
+ emptyState: {
7109
+ type: Object,
7110
+ default: () => ({ headline: "No data" })
7105
7111
  }
7106
7112
  },
7107
7113
  emits: {
@@ -7811,6 +7817,10 @@ var TableUI_vue_vue_type_script_lang_default = {
7811
7817
  //#endregion
7812
7818
  //#region src/components/TableUI.vue
7813
7819
  var _hoisted_1 = { class: "wrapper" };
7820
+ var _hoisted_2 = {
7821
+ key: 0,
7822
+ class: "empty-state-overlay"
7823
+ };
7814
7824
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7815
7825
  const _component_TableActionBar = resolveComponent("TableActionBar");
7816
7826
  const _component_Row = resolveComponent("Row");
@@ -7818,6 +7828,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7818
7828
  const _component_CellSelectionOverlay = resolveComponent("CellSelectionOverlay");
7819
7829
  const _component_NewRowButton = resolveComponent("NewRowButton");
7820
7830
  const _component_TableCore = resolveComponent("TableCore");
7831
+ const _component_KdsEmptyState = resolveComponent("KdsEmptyState");
7821
7832
  const _component_PageControls = resolveComponent("PageControls");
7822
7833
  return openBlock(), createElementBlock("div", _hoisted_1, [$props.actionConfig ? (openBlock(), createBlock(_component_TableActionBar, {
7823
7834
  key: 0,
@@ -7864,221 +7875,225 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7864
7875
  _cache[16] || (_cache[16] = withKeys(withModifiers((...args) => $setup.handleDeleteSelection && $setup.handleDeleteSelection(...args), ["exact"]), ["delete"])),
7865
7876
  _cache[17] || (_cache[17] = withKeys(withModifiers((...args) => $setup.clearCellSelectionAndStopPropagation && $setup.clearCellSelectionAndStopPropagation(...args), ["exact"]), ["escape"]))
7866
7877
  ]
7867
- }, [createVNode(_component_TableCore, {
7868
- ref: "tableCore",
7869
- "scroll-data": $options.scrollData,
7870
- "total-width": $setup.totalWidth,
7871
- "column-resize": { active: $setup.columnResizeActive },
7872
- "table-config": $props.tableConfig,
7873
- "sub-menu-config": $props.subMenuConfig,
7874
- "scroll-config": {
7875
- itemSize: $options.scrollerItemSize,
7876
- numRowsAbove: $props.numRowsAbove,
7877
- numRowsBelow: $props.numRowsBelow,
7878
- compact: Boolean($props.rowConfig.compactMode)
7879
- },
7880
- "current-row-height": $options.currentRowHeight,
7881
- "new-column-button-width": $setup.newColumnButtonWidth,
7882
- onScrollerUpdate: $options.onScroll,
7883
- "onUpdate:availableWidth": _cache[8] || (_cache[8] = ($event) => _ctx.$emit("update:available-width", $event)),
7884
- onMoveSelection: $options.onKeyboardMoveSelection,
7885
- onClearSelection: $setup.clearCellSelection,
7886
- onExpandSelectedCell: $options.expandSelectedCell,
7887
- onStartEditing: $options.onStartEditingCell,
7888
- onBodyFocusin: _cache[9] || (_cache[9] = ($event) => $setup.changeFocus(true)),
7889
- onBodyFocusout: _cache[10] || (_cache[10] = ($event) => $options.onTableBodyFocusOut())
7890
- }, {
7891
- row: withCtx(({ row, groupInd, rowInd }) => [createVNode(_component_Row, {
7892
- ref: $options.getRowRefName(groupInd, rowInd),
7893
- "row-data": row,
7894
- row: $options.getRowData(row),
7878
+ }, [
7879
+ createVNode(_component_TableCore, {
7880
+ ref: "tableCore",
7881
+ "scroll-data": $options.scrollData,
7882
+ "total-width": $setup.totalWidth,
7883
+ "column-resize": { active: $setup.columnResizeActive },
7895
7884
  "table-config": $props.tableConfig,
7896
7885
  "sub-menu-config": $props.subMenuConfig,
7897
- "show-drag-handle": $props.tableConfig.enableRowResizing,
7898
- columns: $props.columns,
7899
- "row-config": $props.rowConfig,
7900
- "row-height": $options.currentRowHeight,
7901
- "min-row-height": $options.minRowHeight,
7902
- "is-selected": $options.currentSelectionMap(rowInd, groupInd || 0),
7903
- "select-cells-on-move": $setup.selectCellsOnMove.state,
7904
- "disable-row-height-transition": $props.disableRowHeightTransition,
7905
- "selected-cell-index": $options.getCellIndex($setup.selectedCell, rowInd),
7906
- "cell-selection-range": $options.getCellSelectionRange(rowInd),
7907
- "to-be-expanded-cell-index": $options.getCellIndex($setup.toBeShownCell, rowInd),
7908
- "to-be-edited-cell-index": $options.getCellIndex($setup.editingCell, rowInd),
7886
+ "scroll-config": {
7887
+ itemSize: $options.scrollerItemSize,
7888
+ numRowsAbove: $props.numRowsAbove,
7889
+ numRowsBelow: $props.numRowsBelow,
7890
+ compact: Boolean($props.rowConfig.compactMode)
7891
+ },
7892
+ "current-row-height": $options.currentRowHeight,
7909
7893
  "new-column-button-width": $setup.newColumnButtonWidth,
7910
- onDeleteRow: () => $options.onDeleteRow(rowInd),
7911
- onRowSelect: ($event) => $options.onRowSelect($event, rowInd, groupInd || 0),
7912
- onCellSelect: (cellInd, ignoreIfSelected) => $options.onCellSelectRowEvent(cellInd, rowInd, groupInd, ignoreIfSelected),
7913
- onDataValueView: (cellInd, anchor) => $options.onDataValueView(cellInd, rowInd, anchor),
7914
- onExpandCellSelect: (cellInd) => $options.onExpandCellSelect(cellInd, rowInd, groupInd),
7915
- onRowInput: (event) => $options.onRowInput(event, rowInd, groupInd ?? 0, row),
7916
- onRowSubMenuClick: ($event) => $options.onRowSubMenuClick($event, row),
7917
- onResizeAllRows: (currentSize, row) => $options.onResizeAllRows(currentSize, row, rowInd),
7918
- onResizeRow: (rowSizeDelta) => $options.onResizeRow(rowSizeDelta, rowInd),
7919
- onVirtualColumnNav: (type, direction) => $options.onVirtualColumnNav(type, direction, rowInd, groupInd)
7920
- }, createSlots({
7921
- "editable-cell": withCtx(({ ind, cellElement }) => [renderSlot(_ctx.$slots, "editable-cell", {
7922
- rowInd,
7923
- colInd: ind,
7924
- initialValue: $setup.editingCellInitialValue,
7925
- cellElement,
7926
- onKeydown: _cache[2] || (_cache[2] = (event) => $setup.createEditingCellKeydownHandler({ moveSelection: $options.onKeyboardMoveSelectionFromEditingCell })(event)),
7927
- onClickAway: _cache[3] || (_cache[3] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
7928
- }, void 0, true)]),
7929
- _: 2
7930
- }, [renderList($options.slottedColumns, (colInd) => {
7931
- return {
7932
- name: $options.getCellContentSlotName($props.columns, colInd),
7933
- fn: withCtx((cellData) => [renderSlot(_ctx.$slots, `cellContent-${$props.columns[colInd].key}`, { data: {
7934
- ...cellData,
7935
- key: $props.columns[colInd].key,
7936
- rowInd,
7937
- colInd
7938
- } }, void 0, true)])
7939
- };
7940
- })]), 1032, [
7941
- "row-data",
7942
- "row",
7943
- "table-config",
7944
- "sub-menu-config",
7945
- "show-drag-handle",
7946
- "columns",
7947
- "row-config",
7948
- "row-height",
7949
- "min-row-height",
7950
- "is-selected",
7951
- "select-cells-on-move",
7952
- "disable-row-height-transition",
7953
- "selected-cell-index",
7954
- "cell-selection-range",
7955
- "to-be-expanded-cell-index",
7956
- "to-be-edited-cell-index",
7957
- "new-column-button-width",
7958
- "onDeleteRow",
7959
- "onRowSelect",
7960
- "onCellSelect",
7961
- "onDataValueView",
7962
- "onExpandCellSelect",
7963
- "onRowInput",
7964
- "onRowSubMenuClick",
7965
- "onResizeAllRows",
7966
- "onResizeRow",
7967
- "onVirtualColumnNav"
7968
- ])]),
7969
- header: withCtx(({ getDragHandleHeight }) => [createVNode(_component_Header, {
7970
- ref: "header",
7971
- style: normalizeStyle({ width: `var(${$setup.BODY_WIDTH_CSS_VAR})` }),
7972
- "table-config": $props.tableConfig,
7973
- "action-config": $props.actionConfig,
7974
- columns: $props.columns,
7975
- "additional-header-menu-items": $props.additionalHeaderMenuItems,
7976
- "col-sort-values": $props.colSortValues,
7977
- "is-selected": Boolean($props.tableState.totalSelected),
7978
- "get-drag-handle-height": getDragHandleHeight,
7979
- class: normalizeClass(["table-header", { "sub-menu-active": $props.subMenuConfig.subMenuItems?.length }]),
7980
- "show-new-column-button": $setup.showNewColumnAndRowButton,
7981
- "selected-header-index": $options.selectedHeaderIndex,
7982
- onHeaderSelect: $options.onSelectAll,
7983
- onColumnSort: $options.onColumnSort,
7984
- onDeleteColumn: $options.onDeleteColumn,
7985
- onColumnResize: $options.onColumnResize,
7986
- onAllColumnsResize: $options.onAllColumnsResize,
7987
- onColumnResizeStart: $options.onColumnResizeStart,
7988
- onColumnResizeEnd: $options.onColumnResizeEnd,
7989
- onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
7990
- onHeaderCellSelect: $options.onHeaderCellSelect,
7991
- onHeaderCellDeselect: $options.onHeaderCellDeselect,
7992
- onHeaderCellStartEditing: _cache[4] || (_cache[4] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
7993
- "onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
7994
- onNewColumnButtonClick: $options.onNewColumnButtonClick,
7995
- onSelectionKeydownDown: _cache[5] || (_cache[5] = ($event) => $options.onHeaderSelectionKeydownDown()),
7996
- onNewColumnButtonKeydownLeft: _cache[6] || (_cache[6] = ($event) => $options.onMoveIntoBodyFromRight())
7894
+ onScrollerUpdate: $options.onScroll,
7895
+ "onUpdate:availableWidth": _cache[8] || (_cache[8] = ($event) => _ctx.$emit("update:available-width", $event)),
7896
+ onMoveSelection: $options.onKeyboardMoveSelection,
7897
+ onClearSelection: $setup.clearCellSelection,
7898
+ onExpandSelectedCell: $options.expandSelectedCell,
7899
+ onStartEditing: $options.onStartEditingCell,
7900
+ onBodyFocusin: _cache[9] || (_cache[9] = ($event) => $setup.changeFocus(true)),
7901
+ onBodyFocusout: _cache[10] || (_cache[10] = ($event) => $options.onTableBodyFocusOut())
7997
7902
  }, {
7998
- subHeader: withCtx((slotProps) => [renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
7903
+ row: withCtx(({ row, groupInd, rowInd }) => [createVNode(_component_Row, {
7904
+ ref: $options.getRowRefName(groupInd, rowInd),
7905
+ "row-data": row,
7906
+ row: $options.getRowData(row),
7907
+ "table-config": $props.tableConfig,
7908
+ "sub-menu-config": $props.subMenuConfig,
7909
+ "show-drag-handle": $props.tableConfig.enableRowResizing,
7910
+ columns: $props.columns,
7911
+ "row-config": $props.rowConfig,
7912
+ "row-height": $options.currentRowHeight,
7913
+ "min-row-height": $options.minRowHeight,
7914
+ "is-selected": $options.currentSelectionMap(rowInd, groupInd || 0),
7915
+ "select-cells-on-move": $setup.selectCellsOnMove.state,
7916
+ "disable-row-height-transition": $props.disableRowHeightTransition,
7917
+ "selected-cell-index": $options.getCellIndex($setup.selectedCell, rowInd),
7918
+ "cell-selection-range": $options.getCellSelectionRange(rowInd),
7919
+ "to-be-expanded-cell-index": $options.getCellIndex($setup.toBeShownCell, rowInd),
7920
+ "to-be-edited-cell-index": $options.getCellIndex($setup.editingCell, rowInd),
7921
+ "new-column-button-width": $setup.newColumnButtonWidth,
7922
+ onDeleteRow: () => $options.onDeleteRow(rowInd),
7923
+ onRowSelect: ($event) => $options.onRowSelect($event, rowInd, groupInd || 0),
7924
+ onCellSelect: (cellInd, ignoreIfSelected) => $options.onCellSelectRowEvent(cellInd, rowInd, groupInd, ignoreIfSelected),
7925
+ onDataValueView: (cellInd, anchor) => $options.onDataValueView(cellInd, rowInd, anchor),
7926
+ onExpandCellSelect: (cellInd) => $options.onExpandCellSelect(cellInd, rowInd, groupInd),
7927
+ onRowInput: (event) => $options.onRowInput(event, rowInd, groupInd ?? 0, row),
7928
+ onRowSubMenuClick: ($event) => $options.onRowSubMenuClick($event, row),
7929
+ onResizeAllRows: (currentSize, row) => $options.onResizeAllRows(currentSize, row, rowInd),
7930
+ onResizeRow: (rowSizeDelta) => $options.onResizeRow(rowSizeDelta, rowInd),
7931
+ onVirtualColumnNav: (type, direction) => $options.onVirtualColumnNav(type, direction, rowInd, groupInd)
7932
+ }, createSlots({
7933
+ "editable-cell": withCtx(({ ind, cellElement }) => [renderSlot(_ctx.$slots, "editable-cell", {
7934
+ rowInd,
7935
+ colInd: ind,
7936
+ initialValue: $setup.editingCellInitialValue,
7937
+ cellElement,
7938
+ onKeydown: _cache[2] || (_cache[2] = (event) => $setup.createEditingCellKeydownHandler({ moveSelection: $options.onKeyboardMoveSelectionFromEditingCell })(event)),
7939
+ onClickAway: _cache[3] || (_cache[3] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
7940
+ }, void 0, true)]),
7941
+ _: 2
7942
+ }, [renderList($options.slottedColumns, (colInd) => {
7943
+ return {
7944
+ name: $options.getCellContentSlotName($props.columns, colInd),
7945
+ fn: withCtx((cellData) => [renderSlot(_ctx.$slots, `cellContent-${$props.columns[colInd].key}`, { data: {
7946
+ ...cellData,
7947
+ key: $props.columns[colInd].key,
7948
+ rowInd,
7949
+ colInd
7950
+ } }, void 0, true)])
7951
+ };
7952
+ })]), 1032, [
7953
+ "row-data",
7954
+ "row",
7955
+ "table-config",
7956
+ "sub-menu-config",
7957
+ "show-drag-handle",
7958
+ "columns",
7959
+ "row-config",
7960
+ "row-height",
7961
+ "min-row-height",
7962
+ "is-selected",
7963
+ "select-cells-on-move",
7964
+ "disable-row-height-transition",
7965
+ "selected-cell-index",
7966
+ "cell-selection-range",
7967
+ "to-be-expanded-cell-index",
7968
+ "to-be-edited-cell-index",
7969
+ "new-column-button-width",
7970
+ "onDeleteRow",
7971
+ "onRowSelect",
7972
+ "onCellSelect",
7973
+ "onDataValueView",
7974
+ "onExpandCellSelect",
7975
+ "onRowInput",
7976
+ "onRowSubMenuClick",
7977
+ "onResizeAllRows",
7978
+ "onResizeRow",
7979
+ "onVirtualColumnNav"
7980
+ ])]),
7981
+ header: withCtx(({ getDragHandleHeight }) => [createVNode(_component_Header, {
7982
+ ref: "header",
7983
+ style: normalizeStyle({ width: `var(${$setup.BODY_WIDTH_CSS_VAR})` }),
7984
+ "table-config": $props.tableConfig,
7985
+ "action-config": $props.actionConfig,
7986
+ columns: $props.columns,
7987
+ "additional-header-menu-items": $props.additionalHeaderMenuItems,
7988
+ "col-sort-values": $props.colSortValues,
7989
+ "is-selected": Boolean($props.tableState.totalSelected),
7990
+ "get-drag-handle-height": getDragHandleHeight,
7991
+ class: normalizeClass(["table-header", { "sub-menu-active": $props.subMenuConfig.subMenuItems?.length }]),
7992
+ "show-new-column-button": $setup.showNewColumnAndRowButton,
7993
+ "selected-header-index": $options.selectedHeaderIndex,
7994
+ onHeaderSelect: $options.onSelectAll,
7995
+ onColumnSort: $options.onColumnSort,
7996
+ onDeleteColumn: $options.onDeleteColumn,
7997
+ onColumnResize: $options.onColumnResize,
7998
+ onAllColumnsResize: $options.onAllColumnsResize,
7999
+ onColumnResizeStart: $options.onColumnResizeStart,
8000
+ onColumnResizeEnd: $options.onColumnResizeEnd,
8001
+ onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
8002
+ onHeaderCellSelect: $options.onHeaderCellSelect,
8003
+ onHeaderCellDeselect: $options.onHeaderCellDeselect,
8004
+ onHeaderCellStartEditing: _cache[4] || (_cache[4] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
8005
+ "onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
8006
+ onNewColumnButtonClick: $options.onNewColumnButtonClick,
8007
+ onSelectionKeydownDown: _cache[5] || (_cache[5] = ($event) => $options.onHeaderSelectionKeydownDown()),
8008
+ onNewColumnButtonKeydownLeft: _cache[6] || (_cache[6] = ($event) => $options.onMoveIntoBodyFromRight())
8009
+ }, {
8010
+ subHeader: withCtx((slotProps) => [renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
8011
+ _: 3
8012
+ }, 8, [
8013
+ "style",
8014
+ "table-config",
8015
+ "action-config",
8016
+ "columns",
8017
+ "additional-header-menu-items",
8018
+ "col-sort-values",
8019
+ "is-selected",
8020
+ "get-drag-handle-height",
8021
+ "class",
8022
+ "show-new-column-button",
8023
+ "selected-header-index",
8024
+ "onHeaderSelect",
8025
+ "onColumnSort",
8026
+ "onDeleteColumn",
8027
+ "onColumnResize",
8028
+ "onAllColumnsResize",
8029
+ "onColumnResizeStart",
8030
+ "onColumnResizeEnd",
8031
+ "onMoveDownFromHeaderCell",
8032
+ "onHeaderCellSelect",
8033
+ "onHeaderCellDeselect",
8034
+ "onUpdate:newColumnButtonWidth",
8035
+ "onNewColumnButtonClick"
8036
+ ])]),
8037
+ "cell-selection-overlay": withCtx(() => [$setup.rectMinMax && !$setup.isEditingCell && $options.selectedHeaderIndex === null ? (openBlock(), createBlock(_component_CellSelectionOverlay, {
8038
+ key: 0,
8039
+ ref: "selectionOverlay",
8040
+ rect: $setup.rectMinMax,
8041
+ "row-height": $options.scrollerItemSize,
8042
+ "table-config": $props.tableConfig,
8043
+ "row-resize-index": $data.currentResizedScrollIndex,
8044
+ "row-resize-delta": $data.currentRowSizeDelta,
8045
+ "cell-selection-rect-focus-corner": $setup.focusWithin ? $setup.selectedCell : void 0
8046
+ }, null, 8, [
8047
+ "rect",
8048
+ "row-height",
8049
+ "table-config",
8050
+ "row-resize-index",
8051
+ "row-resize-delta",
8052
+ "cell-selection-rect-focus-corner"
8053
+ ])) : createCommentVNode("", true)]),
8054
+ belowBody: withCtx(() => [$setup.showNewColumnAndRowButton ? (openBlock(), createBlock(_component_NewRowButton, {
8055
+ key: 0,
8056
+ ref: "new-row-button",
8057
+ onClick: $options.onNewRowButtonClick,
8058
+ onPointerdown: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
8059
+ onKeydownUp: $options.onMoveIntoBodyFromBottom
8060
+ }, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)]),
7999
8061
  _: 3
8000
8062
  }, 8, [
8001
- "style",
8063
+ "scroll-data",
8064
+ "total-width",
8065
+ "column-resize",
8002
8066
  "table-config",
8003
- "action-config",
8004
- "columns",
8005
- "additional-header-menu-items",
8006
- "col-sort-values",
8007
- "is-selected",
8008
- "get-drag-handle-height",
8009
- "class",
8010
- "show-new-column-button",
8011
- "selected-header-index",
8012
- "onHeaderSelect",
8013
- "onColumnSort",
8014
- "onDeleteColumn",
8015
- "onColumnResize",
8016
- "onAllColumnsResize",
8017
- "onColumnResizeStart",
8018
- "onColumnResizeEnd",
8019
- "onMoveDownFromHeaderCell",
8020
- "onHeaderCellSelect",
8021
- "onHeaderCellDeselect",
8022
- "onUpdate:newColumnButtonWidth",
8023
- "onNewColumnButtonClick"
8024
- ])]),
8025
- "cell-selection-overlay": withCtx(() => [$setup.rectMinMax && !$setup.isEditingCell && $options.selectedHeaderIndex === null ? (openBlock(), createBlock(_component_CellSelectionOverlay, {
8026
- key: 0,
8027
- ref: "selectionOverlay",
8028
- rect: $setup.rectMinMax,
8029
- "row-height": $options.scrollerItemSize,
8067
+ "sub-menu-config",
8068
+ "scroll-config",
8069
+ "current-row-height",
8070
+ "new-column-button-width",
8071
+ "onScrollerUpdate",
8072
+ "onMoveSelection",
8073
+ "onClearSelection",
8074
+ "onExpandSelectedCell",
8075
+ "onStartEditing"
8076
+ ]),
8077
+ $options.totalTableLength === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_KdsEmptyState, mergeProps({ class: "empty-state" }, $props.emptyState), null, 16)])) : createCommentVNode("", true),
8078
+ $props.pageConfig && $props.pageState ? (openBlock(), createBlock(_component_PageControls, {
8079
+ key: 1,
8080
+ "page-config": $props.pageConfig,
8030
8081
  "table-config": $props.tableConfig,
8031
- "row-resize-index": $data.currentResizedScrollIndex,
8032
- "row-resize-delta": $data.currentRowSizeDelta,
8033
- "cell-selection-rect-focus-corner": $setup.focusWithin ? $setup.selectedCell : void 0
8082
+ "page-state": $props.pageState,
8083
+ "table-state": $props.tableState,
8084
+ onPageChange: $options.onPageChange,
8085
+ onPageSizeUpdate: $options.onPageSizeUpdate
8034
8086
  }, null, 8, [
8035
- "rect",
8036
- "row-height",
8087
+ "page-config",
8037
8088
  "table-config",
8038
- "row-resize-index",
8039
- "row-resize-delta",
8040
- "cell-selection-rect-focus-corner"
8041
- ])) : createCommentVNode("", true)]),
8042
- belowBody: withCtx(() => [$setup.showNewColumnAndRowButton ? (openBlock(), createBlock(_component_NewRowButton, {
8043
- key: 0,
8044
- ref: "new-row-button",
8045
- onClick: $options.onNewRowButtonClick,
8046
- onPointerdown: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
8047
- onKeydownUp: $options.onMoveIntoBodyFromBottom
8048
- }, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)]),
8049
- _: 3
8050
- }, 8, [
8051
- "scroll-data",
8052
- "total-width",
8053
- "column-resize",
8054
- "table-config",
8055
- "sub-menu-config",
8056
- "scroll-config",
8057
- "current-row-height",
8058
- "new-column-button-width",
8059
- "onScrollerUpdate",
8060
- "onMoveSelection",
8061
- "onClearSelection",
8062
- "onExpandSelectedCell",
8063
- "onStartEditing"
8064
- ]), $props.pageConfig && $props.pageState ? (openBlock(), createBlock(_component_PageControls, {
8065
- key: 0,
8066
- "page-config": $props.pageConfig,
8067
- "table-config": $props.tableConfig,
8068
- "page-state": $props.pageState,
8069
- "table-state": $props.tableState,
8070
- onPageChange: $options.onPageChange,
8071
- onPageSizeUpdate: $options.onPageSizeUpdate
8072
- }, null, 8, [
8073
- "page-config",
8074
- "table-config",
8075
- "page-state",
8076
- "table-state",
8077
- "onPageChange",
8078
- "onPageSizeUpdate"
8079
- ])) : createCommentVNode("", true)], 544)]);
8089
+ "page-state",
8090
+ "table-state",
8091
+ "onPageChange",
8092
+ "onPageSizeUpdate"
8093
+ ])) : createCommentVNode("", true)
8094
+ ], 544)]);
8080
8095
  }
8081
- var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-d531fa0a"]]);
8096
+ var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-e1645875"]]);
8082
8097
  //#endregion
8083
8098
  //#region src/components/composables/useTableReady.ts
8084
8099
  var useTableReady = ({ onReady }) => {