@knime/kds-table 6.10.0 → 6.12.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
@@ -1374,6 +1374,161 @@ var getMissingValueMessage = (cellData) => {
1374
1374
  };
1375
1375
  var getPropertiesFromColumns = (columnConfigs, key) => columnConfigs.map((colConfig) => colConfig[key]);
1376
1376
  //#endregion
1377
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
1378
+ /**
1379
+ * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
1380
+ *
1381
+ * @param fn
1382
+ */
1383
+ function tryOnScopeDispose(fn, failSilently) {
1384
+ if (getCurrentScope()) {
1385
+ onScopeDispose(fn, failSilently);
1386
+ return true;
1387
+ }
1388
+ return false;
1389
+ }
1390
+ var isClient = typeof window !== "undefined" && typeof document !== "undefined";
1391
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
1392
+ //#endregion
1393
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
1394
+ var defaultWindow = isClient ? window : void 0;
1395
+ isClient && window.document;
1396
+ isClient && window.navigator;
1397
+ isClient && window.location;
1398
+ /**
1399
+ * Get the dom element of a ref of element or Vue component instance
1400
+ *
1401
+ * @param elRef
1402
+ */
1403
+ function unrefElement(elRef) {
1404
+ var _$el;
1405
+ const plain = toValue(elRef);
1406
+ return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
1407
+ }
1408
+ /**
1409
+ * Mounted state in ref.
1410
+ *
1411
+ * @see https://vueuse.org/useMounted
1412
+ *
1413
+ * @__NO_SIDE_EFFECTS__
1414
+ */
1415
+ function useMounted() {
1416
+ const isMounted = shallowRef(false);
1417
+ const instance = getCurrentInstance();
1418
+ if (instance) onMounted(() => {
1419
+ isMounted.value = true;
1420
+ }, instance);
1421
+ return isMounted;
1422
+ }
1423
+ /* @__NO_SIDE_EFFECTS__ */
1424
+ function useSupported(callback) {
1425
+ const isMounted = useMounted();
1426
+ return computed(() => {
1427
+ isMounted.value;
1428
+ return Boolean(callback());
1429
+ });
1430
+ }
1431
+ /**
1432
+ * Call function on every `requestAnimationFrame`. With controls of pausing and resuming.
1433
+ *
1434
+ * @see https://vueuse.org/useRafFn
1435
+ * @param fn
1436
+ * @param options
1437
+ */
1438
+ function useRafFn(fn, options = {}) {
1439
+ const { immediate = true, fpsLimit = null, window = defaultWindow, once = false } = options;
1440
+ const isActive = shallowRef(false);
1441
+ const intervalLimit = computed(() => {
1442
+ const limit = toValue(fpsLimit);
1443
+ return limit ? 1e3 / limit : null;
1444
+ });
1445
+ let previousFrameTimestamp = 0;
1446
+ let rafId = null;
1447
+ function loop(timestamp) {
1448
+ if (!isActive.value || !window) return;
1449
+ if (!previousFrameTimestamp) previousFrameTimestamp = timestamp;
1450
+ const delta = timestamp - previousFrameTimestamp;
1451
+ if (intervalLimit.value && delta < intervalLimit.value) {
1452
+ rafId = window.requestAnimationFrame(loop);
1453
+ return;
1454
+ }
1455
+ previousFrameTimestamp = timestamp;
1456
+ fn({
1457
+ delta,
1458
+ timestamp
1459
+ });
1460
+ if (once) {
1461
+ isActive.value = false;
1462
+ rafId = null;
1463
+ return;
1464
+ }
1465
+ rafId = window.requestAnimationFrame(loop);
1466
+ }
1467
+ function resume() {
1468
+ if (!isActive.value && window) {
1469
+ isActive.value = true;
1470
+ previousFrameTimestamp = 0;
1471
+ rafId = window.requestAnimationFrame(loop);
1472
+ }
1473
+ }
1474
+ function pause() {
1475
+ isActive.value = false;
1476
+ if (rafId != null && window) {
1477
+ window.cancelAnimationFrame(rafId);
1478
+ rafId = null;
1479
+ }
1480
+ }
1481
+ if (immediate) resume();
1482
+ tryOnScopeDispose(pause);
1483
+ return {
1484
+ isActive: shallowReadonly(isActive),
1485
+ pause,
1486
+ resume
1487
+ };
1488
+ }
1489
+ /**
1490
+ * Reports changes to the dimensions of an Element's content or the border-box
1491
+ *
1492
+ * @see https://vueuse.org/useResizeObserver
1493
+ * @param target
1494
+ * @param callback
1495
+ * @param options
1496
+ */
1497
+ function useResizeObserver(target, callback, options = {}) {
1498
+ const { window = defaultWindow, ...observerOptions } = options;
1499
+ let observer;
1500
+ const isSupported = /* @__PURE__ */ useSupported(() => window && "ResizeObserver" in window);
1501
+ const cleanup = () => {
1502
+ if (observer) {
1503
+ observer.disconnect();
1504
+ observer = void 0;
1505
+ }
1506
+ };
1507
+ const stopWatch = watch(computed(() => {
1508
+ const _targets = toValue(target);
1509
+ return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
1510
+ }), (els) => {
1511
+ cleanup();
1512
+ if (isSupported.value && window) {
1513
+ observer = new ResizeObserver(callback);
1514
+ for (const _el of els) if (_el) observer.observe(_el, observerOptions);
1515
+ }
1516
+ }, {
1517
+ immediate: true,
1518
+ flush: "post"
1519
+ });
1520
+ const stop = () => {
1521
+ cleanup();
1522
+ stopWatch();
1523
+ };
1524
+ tryOnScopeDispose(stop);
1525
+ return {
1526
+ isSupported,
1527
+ stop
1528
+ };
1529
+ }
1530
+ Number.POSITIVE_INFINITY;
1531
+ //#endregion
1377
1532
  //#region ../../node_modules/.pnpm/@knime+vue-headless-virtual-scroller@0.2.0_vue@3.5.40_typescript@6.0.3_/node_modules/@knime/vue-headless-virtual-scroller/dist/vue-headless-virtual-scrolling.js
1378
1533
  var $ = Object.defineProperty;
1379
1534
  var P = (t, e, r) => e in t ? $(t, e, {
@@ -4567,6 +4722,22 @@ var TableCoreVirtual_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
4567
4722
  */
4568
4723
  return Math.min(scrollContainer.offsetHeight, Math.floor(getBody().offsetHeight + headerHeight));
4569
4724
  };
4725
+ const headerHeight = ref(0);
4726
+ const updateHeaderHeight = () => {
4727
+ headerHeight.value = getHeaderHeight();
4728
+ };
4729
+ onMounted(updateHeaderHeight);
4730
+ useResizeObserver(headerContainer, updateHeaderHeight);
4731
+ const emptyStateStyle = computed(() => ({ height: `calc(100% - ${headerHeight.value}px)` }));
4732
+ const isEmpty = computed(() => numRows.value === 0);
4733
+ /**
4734
+ * With all rows rendered there is nothing to scroll, so the container only takes
4735
+ * the space it needs. Without any rows it keeps the full height nonetheless: the
4736
+ * empty state fills the space the rows would have occupied, and the container's
4737
+ * horizontal scrollbar belongs at the bottom of the table rather than directly
4738
+ * below the header.
4739
+ */
4740
+ const fitContent = computed(() => props.tableConfig.forceRenderAll && !isEmpty.value);
4570
4741
  const { closeExpandedSubMenu, containerRef: injectedContainerRef, overflowStyles } = useCommonScrollContainerProps();
4571
4742
  const { showResizeScrollSpacer, collapseResizeScrollSpacer, additionalSpacerWidth, onResizeScrollSpacerTransitionEnd } = useResizeScrollSpacer({
4572
4743
  columnResizeActive: toRef(props, "columnResizeActive"),
@@ -4593,7 +4764,7 @@ var TableCoreVirtual_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
4593
4764
  unref(containerProps).ref.value = injectedContainerRef.value = element;
4594
4765
  },
4595
4766
  style: normalizeStyle(unref(overflowStyles)),
4596
- class: normalizeClass(["container", { "fit-content": __props.tableConfig.forceRenderAll }]),
4767
+ class: normalizeClass(["container", { "fit-content": fitContent.value }]),
4597
4768
  onScroll: _cache[7] || (_cache[7] = () => [unref(containerProps).onScroll(), unref(closeExpandedSubMenu)()])
4598
4769
  }, [
4599
4770
  createElementVNode("div", {
@@ -4634,8 +4805,13 @@ var TableCoreVirtual_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
4634
4805
  belowBody: withCtx(() => [renderSlot(_ctx.$slots, "belowBody", {}, void 0, true)]),
4635
4806
  _: 3
4636
4807
  }),
4637
- unref(showResizeScrollSpacer) ? (openBlock(), createElementBlock("div", {
4808
+ isEmpty.value && _ctx.$slots["empty-state"] ? (openBlock(), createElementBlock("div", {
4638
4809
  key: 0,
4810
+ class: "empty-state-container",
4811
+ style: normalizeStyle(emptyStateStyle.value)
4812
+ }, [renderSlot(_ctx.$slots, "empty-state", {}, void 0, true)], 4)) : createCommentVNode("", true),
4813
+ unref(showResizeScrollSpacer) ? (openBlock(), createElementBlock("div", {
4814
+ key: 1,
4639
4815
  class: normalizeClass(["resize-scroll-spacer", { collapsing: unref(collapseResizeScrollSpacer) }]),
4640
4816
  "aria-hidden": "true",
4641
4817
  style: normalizeStyle({ width: `calc(var(${unref(BODY_WIDTH_CSS_VAR)}) + ${unref(additionalSpacerWidth)})` }),
@@ -4644,7 +4820,7 @@ var TableCoreVirtual_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
4644
4820
  ], 38)) : createCommentVNode("", true);
4645
4821
  };
4646
4822
  }
4647
- }), [["__scopeId", "data-v-45a530bb"]]);
4823
+ }), [["__scopeId", "data-v-188dbeca"]]);
4648
4824
  //#endregion
4649
4825
  //#region src/components/composables/useAvailableWidth.ts
4650
4826
  var import_rafThrottle = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -4849,7 +5025,7 @@ var TableCore_default = /* @__PURE__ */ defineComponent({
4849
5025
  onClearSelection: _cache[2] || (_cache[2] = ($event) => emit("clearSelection")),
4850
5026
  onBodyFocusin: _cache[3] || (_cache[3] = ($event) => emit("bodyFocusin")),
4851
5027
  onBodyFocusout: _cache[4] || (_cache[4] = ($event) => emit("bodyFocusout"))
4852
- }, {
5028
+ }, createSlots({
4853
5029
  header: withCtx(({ getDragHandleHeight }) => [renderSlot(_ctx.$slots, "header", { getDragHandleHeight })]),
4854
5030
  row: withCtx(({ row, rowInd }) => [renderSlot(_ctx.$slots, "row", {
4855
5031
  row,
@@ -4858,8 +5034,12 @@ var TableCore_default = /* @__PURE__ */ defineComponent({
4858
5034
  })]),
4859
5035
  "cell-selection-overlay": withCtx(() => [renderSlot(_ctx.$slots, "cell-selection-overlay")]),
4860
5036
  belowBody: withCtx(() => [renderSlot(_ctx.$slots, "belowBody")]),
4861
- _: 3
4862
- }, 8, [
5037
+ _: 2
5038
+ }, [_ctx.$slots["empty-state"] ? {
5039
+ name: "empty-state",
5040
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "empty-state")]),
5041
+ key: "0"
5042
+ } : void 0]), 1032, [
4863
5043
  "scroll-data",
4864
5044
  "scroll-config",
4865
5045
  "special-column-sizes",
@@ -5068,7 +5248,7 @@ var createEditingCellKeydownHandler = ({ moveSelection }) => {
5068
5248
  //#endregion
5069
5249
  //#region src/components/control/PageNavigation.vue?vue&type=script&setup=true&lang.ts
5070
5250
  var _hoisted_1$11 = { class: "page-navigation" };
5071
- var _hoisted_2$8 = { class: "navigation-buttons" };
5251
+ var _hoisted_2$7 = { class: "navigation-buttons" };
5072
5252
  var _hoisted_3$4 = { class: "page-count" };
5073
5253
  var _hoisted_4$3 = { class: "navigation-buttons" };
5074
5254
  //#endregion
@@ -5096,7 +5276,7 @@ var PageNavigation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5096
5276
  };
5097
5277
  return (_ctx, _cache) => {
5098
5278
  return openBlock(), createElementBlock("div", _hoisted_1$11, [
5099
- createElementVNode("div", _hoisted_2$8, [createVNode(unref(KdsButton), {
5279
+ createElementVNode("div", _hoisted_2$7, [createVNode(unref(KdsButton), {
5100
5280
  variant: "transparent",
5101
5281
  size: "small",
5102
5282
  "leading-icon": "chevron-left-double",
@@ -5137,7 +5317,7 @@ var _hoisted_1$10 = {
5137
5317
  key: 0,
5138
5318
  class: "subtle"
5139
5319
  };
5140
- var _hoisted_2$7 = {
5320
+ var _hoisted_2$6 = {
5141
5321
  key: 1,
5142
5322
  class: "row-range-container"
5143
5323
  };
@@ -5178,7 +5358,7 @@ var PageControls_vue_vue_type_script_lang_default = {
5178
5358
  const pageRangeEnd = computed(() => Math.min(__props.currentPage * __props.pageSize, __props.currentItems));
5179
5359
  const rowCountText = computed(() => hasMultiplePages.value && __props.currentItems ? `of ${__props.currentItems}` : __props.currentItems);
5180
5360
  return (_ctx, _cache) => {
5181
- return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
5361
+ return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$10, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$6, [
5182
5362
  createElementVNode("span", _hoisted_3$3, toDisplayString(__props.rowLabel) + ":", 1),
5183
5363
  hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
5184
5364
  createElementVNode("span", _hoisted_5$1, toDisplayString(rowCountText.value), 1)
@@ -5247,7 +5427,7 @@ var _hoisted_1$9 = {
5247
5427
  key: 0,
5248
5428
  class: "page-controls"
5249
5429
  };
5250
- var _hoisted_2$6 = { class: "page-size-menu" };
5430
+ var _hoisted_2$5 = { class: "page-size-menu" };
5251
5431
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5252
5432
  const _component_PageRowRange = resolveComponent("PageRowRange");
5253
5433
  const _component_PageNavigation = resolveComponent("PageNavigation");
@@ -5280,7 +5460,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5280
5460
  "has-next-page",
5281
5461
  "has-previous-page"
5282
5462
  ])) : createCommentVNode("", true),
5283
- createElementVNode("div", _hoisted_2$6, [$options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
5463
+ createElementVNode("div", _hoisted_2$5, [$options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
5284
5464
  key: 0,
5285
5465
  items: $options.pageSizeItems,
5286
5466
  label: $options.createText($props.pageConfig.pageSize),
@@ -5300,10 +5480,10 @@ var PageControls_default = /*#__PURE__*/ _plugin_vue_export_helper_default(PageC
5300
5480
  //#region src/components/control/actionbar/PopoverContainer.vue
5301
5481
  var _sfc_main = {};
5302
5482
  var _hoisted_1$8 = { class: "popover" };
5303
- var _hoisted_2$5 = { class: "header" };
5483
+ var _hoisted_2$4 = { class: "header" };
5304
5484
  var _hoisted_3$2 = { class: "body" };
5305
5485
  function _sfc_render$3(_ctx, _cache) {
5306
- 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)])]);
5486
+ 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)])]);
5307
5487
  }
5308
5488
  var PopoverContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render$3], ["__scopeId", "data-v-349cd3ba"]]);
5309
5489
  //#endregion
@@ -5442,7 +5622,7 @@ var SortControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
5442
5622
  //#endregion
5443
5623
  //#region src/components/control/TableActionBar.vue?vue&type=script&setup=true&lang.ts
5444
5624
  var _hoisted_1$6 = { class: "left" };
5445
- var _hoisted_2$4 = { class: "center" };
5625
+ var _hoisted_2$3 = { class: "center" };
5446
5626
  var _hoisted_3$1 = {
5447
5627
  key: 0,
5448
5628
  class: "preview"
@@ -5508,7 +5688,7 @@ var TableActionBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
5508
5688
  "sort-control-options": __props.sortControlOptions,
5509
5689
  onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
5510
5690
  }, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "action-bar-left", {}, void 0, true)]),
5511
- createElementVNode("div", _hoisted_2$4, [isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "preview-label" }, "Preview", -1)), __props.actionState?.previewDescription ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
5691
+ createElementVNode("div", _hoisted_2$3, [isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "preview-label" }, "Preview", -1)), __props.actionState?.previewDescription ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
5512
5692
  key: 0,
5513
5693
  content: __props.actionState.previewDescription
5514
5694
  }, null, 8, ["content"])) : createCommentVNode("", true)])) : createCommentVNode("", true), __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true)]),
@@ -5556,87 +5736,6 @@ var columnHeaderActionButtons = ({ column, actionConfig, additionalMenuItems })
5556
5736
  });
5557
5737
  /** The minimum width the given column needs for its header action buttons. */
5558
5738
  var minSizeOfColumn = (params) => minColumnSize(columnHeaderActionButtons(params));
5559
- //#endregion
5560
- //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
5561
- /**
5562
- * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
5563
- *
5564
- * @param fn
5565
- */
5566
- function tryOnScopeDispose(fn, failSilently) {
5567
- if (getCurrentScope()) {
5568
- onScopeDispose(fn, failSilently);
5569
- return true;
5570
- }
5571
- return false;
5572
- }
5573
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
5574
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
5575
- //#endregion
5576
- //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
5577
- var defaultWindow = isClient ? window : void 0;
5578
- isClient && window.document;
5579
- isClient && window.navigator;
5580
- isClient && window.location;
5581
- /**
5582
- * Call function on every `requestAnimationFrame`. With controls of pausing and resuming.
5583
- *
5584
- * @see https://vueuse.org/useRafFn
5585
- * @param fn
5586
- * @param options
5587
- */
5588
- function useRafFn(fn, options = {}) {
5589
- const { immediate = true, fpsLimit = null, window = defaultWindow, once = false } = options;
5590
- const isActive = shallowRef(false);
5591
- const intervalLimit = computed(() => {
5592
- const limit = toValue(fpsLimit);
5593
- return limit ? 1e3 / limit : null;
5594
- });
5595
- let previousFrameTimestamp = 0;
5596
- let rafId = null;
5597
- function loop(timestamp) {
5598
- if (!isActive.value || !window) return;
5599
- if (!previousFrameTimestamp) previousFrameTimestamp = timestamp;
5600
- const delta = timestamp - previousFrameTimestamp;
5601
- if (intervalLimit.value && delta < intervalLimit.value) {
5602
- rafId = window.requestAnimationFrame(loop);
5603
- return;
5604
- }
5605
- previousFrameTimestamp = timestamp;
5606
- fn({
5607
- delta,
5608
- timestamp
5609
- });
5610
- if (once) {
5611
- isActive.value = false;
5612
- rafId = null;
5613
- return;
5614
- }
5615
- rafId = window.requestAnimationFrame(loop);
5616
- }
5617
- function resume() {
5618
- if (!isActive.value && window) {
5619
- isActive.value = true;
5620
- previousFrameTimestamp = 0;
5621
- rafId = window.requestAnimationFrame(loop);
5622
- }
5623
- }
5624
- function pause() {
5625
- isActive.value = false;
5626
- if (rafId != null && window) {
5627
- window.cancelAnimationFrame(rafId);
5628
- rafId = null;
5629
- }
5630
- }
5631
- if (immediate) resume();
5632
- tryOnScopeDispose(pause);
5633
- return {
5634
- isActive: shallowReadonly(isActive),
5635
- pause,
5636
- resume
5637
- };
5638
- }
5639
- Number.POSITIVE_INFINITY;
5640
5739
  /**
5641
5740
  * While a column is being resized, this composable grows the dragged column and scrolls
5642
5741
  * the container to the right in lockstep whenever the pointer is near (or past) the
@@ -5691,7 +5790,7 @@ var useAutoScrollOnRightEdge = ({ scrollContainer, autoScrollOffset, onAutoScrol
5691
5790
  //#endregion
5692
5791
  //#region src/components/layout/HeaderCell.vue?vue&type=script&setup=true&lang.ts
5693
5792
  var _hoisted_1$5 = ["tabindex"];
5694
- var _hoisted_2$3 = { class: "header-text-container" };
5793
+ var _hoisted_2$2 = { class: "header-text-container" };
5695
5794
  var _hoisted_3 = {
5696
5795
  key: 0,
5697
5796
  class: "sub-header-text-container"
@@ -5921,7 +6020,7 @@ var Header_vue_vue_type_script_lang_default = {
5921
6020
  ref_key: "mainHeader",
5922
6021
  ref: mainHeader,
5923
6022
  class: "main-header"
5924
- }, [withDirectives((openBlock(), createElementBlock("div", _hoisted_2$3, [createElementVNode("span", {
6023
+ }, [withDirectives((openBlock(), createElementBlock("div", _hoisted_2$2, [createElementVNode("span", {
5925
6024
  ref_key: "headerText",
5926
6025
  ref: headerText
5927
6026
  }, toDisplayString(__props.column.header), 513)])), [[
@@ -6366,7 +6465,7 @@ var _hoisted_1$2 = {
6366
6465
  ref: "cell-content",
6367
6466
  class: "cell-content"
6368
6467
  };
6369
- var _hoisted_2$2 = {
6468
+ var _hoisted_2$1 = {
6370
6469
  key: 3,
6371
6470
  class: "cell-text"
6372
6471
  };
@@ -6512,7 +6611,7 @@ var CellRenderer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
6512
6611
  }, [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), {
6513
6612
  key: 1,
6514
6613
  size: "small"
6515
- })) : __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, {
6614
+ })) : __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, {
6516
6615
  key: 4,
6517
6616
  class: normalizeClass({ overlaid: __props.overlayExpandButton }),
6518
6617
  toggled: isExpanded.value,
@@ -6623,7 +6722,7 @@ var _hoisted_1$1 = {
6623
6722
  key: 0,
6624
6723
  class: "deletion-cell"
6625
6724
  };
6626
- var _hoisted_2$1 = {
6725
+ var _hoisted_2 = {
6627
6726
  key: 2,
6628
6727
  class: "action"
6629
6728
  };
@@ -6942,7 +7041,7 @@ var TableUI_vue_vue_type_script_lang_default = {
6942
7041
  "onDataValueView"
6943
7042
  ]);
6944
7043
  }), 128)),
6945
- filteredSubMenuItems.value?.length ? (openBlock(), createElementBlock("td", _hoisted_2$1, [createVNode(unref(KdsMenuButton), {
7044
+ filteredSubMenuItems.value?.length ? (openBlock(), createElementBlock("td", _hoisted_2, [createVNode(unref(KdsMenuButton), {
6946
7045
  modelValue: isMenuOpen.value,
6947
7046
  "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isMenuOpen.value = $event),
6948
7047
  ariaLabel: "More actions",
@@ -7210,7 +7309,7 @@ var TableUI_vue_vue_type_script_lang_default = {
7210
7309
  },
7211
7310
  emptyState: {
7212
7311
  type: Object,
7213
- default: () => ({ headline: "No data" })
7312
+ default: void 0
7214
7313
  }
7215
7314
  },
7216
7315
  emits: {
@@ -7924,18 +8023,14 @@ var TableUI_vue_vue_type_script_lang_default = {
7924
8023
  //#endregion
7925
8024
  //#region src/components/TableUI.vue
7926
8025
  var _hoisted_1 = { class: "wrapper" };
7927
- var _hoisted_2 = {
7928
- key: 0,
7929
- class: "empty-state-overlay"
7930
- };
7931
8026
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7932
8027
  const _component_TableActionBar = resolveComponent("TableActionBar");
7933
8028
  const _component_Row = resolveComponent("Row");
7934
8029
  const _component_Header = resolveComponent("Header");
7935
8030
  const _component_CellSelectionOverlay = resolveComponent("CellSelectionOverlay");
7936
8031
  const _component_NewRowButton = resolveComponent("NewRowButton");
7937
- const _component_TableCore = resolveComponent("TableCore");
7938
8032
  const _component_KdsEmptyState = resolveComponent("KdsEmptyState");
8033
+ const _component_TableCore = resolveComponent("TableCore");
7939
8034
  const _component_PageControls = resolveComponent("PageControls");
7940
8035
  return openBlock(), createElementBlock("div", _hoisted_1, [$options.showActionBar ? (openBlock(), createBlock(_component_TableActionBar, {
7941
8036
  key: 0,
@@ -7982,225 +8077,225 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7982
8077
  _cache[16] || (_cache[16] = withKeys(withModifiers((...args) => $setup.handleDeleteSelection && $setup.handleDeleteSelection(...args), ["exact"]), ["delete"])),
7983
8078
  _cache[17] || (_cache[17] = withKeys(withModifiers((...args) => $setup.clearCellSelectionAndStopPropagation && $setup.clearCellSelectionAndStopPropagation(...args), ["exact"]), ["escape"]))
7984
8079
  ]
7985
- }, [
7986
- createVNode(_component_TableCore, {
7987
- ref: "tableCore",
7988
- "scroll-data": $options.scrollData,
7989
- "total-width": $setup.totalWidth,
7990
- "column-resize": { active: $setup.columnResizeActive },
8080
+ }, [createVNode(_component_TableCore, {
8081
+ ref: "tableCore",
8082
+ "scroll-data": $options.scrollData,
8083
+ "total-width": $setup.totalWidth,
8084
+ "column-resize": { active: $setup.columnResizeActive },
8085
+ "table-config": $props.tableConfig,
8086
+ "sub-menu-config": $props.subMenuConfig,
8087
+ "scroll-config": {
8088
+ itemSize: $options.scrollerItemSize,
8089
+ numRowsAbove: $props.numRowsAbove,
8090
+ numRowsBelow: $props.numRowsBelow,
8091
+ compact: Boolean($props.rowConfig.compactMode)
8092
+ },
8093
+ "current-row-height": $options.currentRowHeight,
8094
+ "new-column-button-width": $setup.newColumnButtonWidth,
8095
+ onScrollerUpdate: $options.onScroll,
8096
+ "onUpdate:availableWidth": _cache[8] || (_cache[8] = ($event) => _ctx.$emit("update:available-width", $event)),
8097
+ onMoveSelection: $options.onKeyboardMoveSelection,
8098
+ onClearSelection: $setup.clearCellSelection,
8099
+ onExpandSelectedCell: $options.expandSelectedCell,
8100
+ onStartEditing: $options.onStartEditingCell,
8101
+ onBodyFocusin: _cache[9] || (_cache[9] = ($event) => $setup.changeFocus(true)),
8102
+ onBodyFocusout: _cache[10] || (_cache[10] = ($event) => $options.onTableBodyFocusOut())
8103
+ }, createSlots({
8104
+ row: withCtx(({ row, groupInd, rowInd }) => [createVNode(_component_Row, {
8105
+ ref: $options.getRowRefName(groupInd, rowInd),
8106
+ "row-data": row,
8107
+ row: $options.getRowData(row),
7991
8108
  "table-config": $props.tableConfig,
7992
8109
  "sub-menu-config": $props.subMenuConfig,
7993
- "scroll-config": {
7994
- itemSize: $options.scrollerItemSize,
7995
- numRowsAbove: $props.numRowsAbove,
7996
- numRowsBelow: $props.numRowsBelow,
7997
- compact: Boolean($props.rowConfig.compactMode)
7998
- },
7999
- "current-row-height": $options.currentRowHeight,
8110
+ "show-drag-handle": $props.tableConfig.enableRowResizing,
8111
+ columns: $props.columns,
8112
+ "row-config": $props.rowConfig,
8113
+ "row-height": $options.currentRowHeight,
8114
+ "min-row-height": $options.minRowHeight,
8115
+ "is-selected": $options.currentSelectionMap(rowInd, groupInd || 0),
8116
+ "select-cells-on-move": $setup.selectCellsOnMove.state,
8117
+ "disable-row-height-transition": $props.disableRowHeightTransition,
8118
+ "selected-cell-index": $options.getCellIndex($setup.selectedCell, rowInd),
8119
+ "cell-selection-range": $options.getCellSelectionRange(rowInd),
8120
+ "to-be-expanded-cell-index": $options.getCellIndex($setup.toBeShownCell, rowInd),
8121
+ "to-be-edited-cell-index": $options.getCellIndex($setup.editingCell, rowInd),
8000
8122
  "new-column-button-width": $setup.newColumnButtonWidth,
8001
- onScrollerUpdate: $options.onScroll,
8002
- "onUpdate:availableWidth": _cache[8] || (_cache[8] = ($event) => _ctx.$emit("update:available-width", $event)),
8003
- onMoveSelection: $options.onKeyboardMoveSelection,
8004
- onClearSelection: $setup.clearCellSelection,
8005
- onExpandSelectedCell: $options.expandSelectedCell,
8006
- onStartEditing: $options.onStartEditingCell,
8007
- onBodyFocusin: _cache[9] || (_cache[9] = ($event) => $setup.changeFocus(true)),
8008
- onBodyFocusout: _cache[10] || (_cache[10] = ($event) => $options.onTableBodyFocusOut())
8009
- }, {
8010
- row: withCtx(({ row, groupInd, rowInd }) => [createVNode(_component_Row, {
8011
- ref: $options.getRowRefName(groupInd, rowInd),
8012
- "row-data": row,
8013
- row: $options.getRowData(row),
8014
- "table-config": $props.tableConfig,
8015
- "sub-menu-config": $props.subMenuConfig,
8016
- "show-drag-handle": $props.tableConfig.enableRowResizing,
8017
- columns: $props.columns,
8018
- "row-config": $props.rowConfig,
8019
- "row-height": $options.currentRowHeight,
8020
- "min-row-height": $options.minRowHeight,
8021
- "is-selected": $options.currentSelectionMap(rowInd, groupInd || 0),
8022
- "select-cells-on-move": $setup.selectCellsOnMove.state,
8023
- "disable-row-height-transition": $props.disableRowHeightTransition,
8024
- "selected-cell-index": $options.getCellIndex($setup.selectedCell, rowInd),
8025
- "cell-selection-range": $options.getCellSelectionRange(rowInd),
8026
- "to-be-expanded-cell-index": $options.getCellIndex($setup.toBeShownCell, rowInd),
8027
- "to-be-edited-cell-index": $options.getCellIndex($setup.editingCell, rowInd),
8028
- "new-column-button-width": $setup.newColumnButtonWidth,
8029
- onDeleteRow: () => $options.onDeleteRow(rowInd),
8030
- onRowSelect: ($event) => $options.onRowSelect($event, rowInd, groupInd || 0),
8031
- onCellSelect: (cellInd, ignoreIfSelected) => $options.onCellSelectRowEvent(cellInd, rowInd, groupInd, ignoreIfSelected),
8032
- onDataValueView: (cellInd, anchor) => $options.onDataValueView(cellInd, rowInd, anchor),
8033
- onExpandCellSelect: (cellInd) => $options.onExpandCellSelect(cellInd, rowInd, groupInd),
8034
- onRowInput: (event) => $options.onRowInput(event, rowInd, groupInd ?? 0, row),
8035
- onRowSubMenuClick: ($event) => $options.onRowSubMenuClick($event, row),
8036
- onResizeAllRows: (currentSize, row) => $options.onResizeAllRows(currentSize, row, rowInd),
8037
- onResizeRow: (rowSizeDelta) => $options.onResizeRow(rowSizeDelta, rowInd),
8038
- onVirtualColumnNav: (type, direction) => $options.onVirtualColumnNav(type, direction, rowInd, groupInd)
8039
- }, createSlots({
8040
- "editable-cell": withCtx(({ ind, cellElement }) => [renderSlot(_ctx.$slots, "editable-cell", {
8123
+ onDeleteRow: () => $options.onDeleteRow(rowInd),
8124
+ onRowSelect: ($event) => $options.onRowSelect($event, rowInd, groupInd || 0),
8125
+ onCellSelect: (cellInd, ignoreIfSelected) => $options.onCellSelectRowEvent(cellInd, rowInd, groupInd, ignoreIfSelected),
8126
+ onDataValueView: (cellInd, anchor) => $options.onDataValueView(cellInd, rowInd, anchor),
8127
+ onExpandCellSelect: (cellInd) => $options.onExpandCellSelect(cellInd, rowInd, groupInd),
8128
+ onRowInput: (event) => $options.onRowInput(event, rowInd, groupInd ?? 0, row),
8129
+ onRowSubMenuClick: ($event) => $options.onRowSubMenuClick($event, row),
8130
+ onResizeAllRows: (currentSize, row) => $options.onResizeAllRows(currentSize, row, rowInd),
8131
+ onResizeRow: (rowSizeDelta) => $options.onResizeRow(rowSizeDelta, rowInd),
8132
+ onVirtualColumnNav: (type, direction) => $options.onVirtualColumnNav(type, direction, rowInd, groupInd)
8133
+ }, createSlots({
8134
+ "editable-cell": withCtx(({ ind, cellElement }) => [renderSlot(_ctx.$slots, "editable-cell", {
8135
+ rowInd,
8136
+ colInd: ind,
8137
+ initialValue: $setup.editingCellInitialValue,
8138
+ cellElement,
8139
+ onKeydown: _cache[2] || (_cache[2] = (event) => $setup.createEditingCellKeydownHandler({ moveSelection: $options.onKeyboardMoveSelectionFromEditingCell })(event)),
8140
+ onClickAway: _cache[3] || (_cache[3] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
8141
+ }, void 0, true)]),
8142
+ _: 2
8143
+ }, [renderList($options.slottedColumns, (colInd) => {
8144
+ return {
8145
+ name: $options.getCellContentSlotName($props.columns, colInd),
8146
+ fn: withCtx((cellData) => [renderSlot(_ctx.$slots, `cellContent-${$props.columns[colInd].key}`, { data: {
8147
+ ...cellData,
8148
+ key: $props.columns[colInd].key,
8041
8149
  rowInd,
8042
- colInd: ind,
8043
- initialValue: $setup.editingCellInitialValue,
8044
- cellElement,
8045
- onKeydown: _cache[2] || (_cache[2] = (event) => $setup.createEditingCellKeydownHandler({ moveSelection: $options.onKeyboardMoveSelectionFromEditingCell })(event)),
8046
- onClickAway: _cache[3] || (_cache[3] = (...args) => $setup.stopEditingCell && $setup.stopEditingCell(...args))
8047
- }, void 0, true)]),
8048
- _: 2
8049
- }, [renderList($options.slottedColumns, (colInd) => {
8050
- return {
8051
- name: $options.getCellContentSlotName($props.columns, colInd),
8052
- fn: withCtx((cellData) => [renderSlot(_ctx.$slots, `cellContent-${$props.columns[colInd].key}`, { data: {
8053
- ...cellData,
8054
- key: $props.columns[colInd].key,
8055
- rowInd,
8056
- colInd
8057
- } }, void 0, true)])
8058
- };
8059
- })]), 1032, [
8060
- "row-data",
8061
- "row",
8062
- "table-config",
8063
- "sub-menu-config",
8064
- "show-drag-handle",
8065
- "columns",
8066
- "row-config",
8067
- "row-height",
8068
- "min-row-height",
8069
- "is-selected",
8070
- "select-cells-on-move",
8071
- "disable-row-height-transition",
8072
- "selected-cell-index",
8073
- "cell-selection-range",
8074
- "to-be-expanded-cell-index",
8075
- "to-be-edited-cell-index",
8076
- "new-column-button-width",
8077
- "onDeleteRow",
8078
- "onRowSelect",
8079
- "onCellSelect",
8080
- "onDataValueView",
8081
- "onExpandCellSelect",
8082
- "onRowInput",
8083
- "onRowSubMenuClick",
8084
- "onResizeAllRows",
8085
- "onResizeRow",
8086
- "onVirtualColumnNav"
8087
- ])]),
8088
- header: withCtx(({ getDragHandleHeight }) => [createVNode(_component_Header, {
8089
- ref: "header",
8090
- style: normalizeStyle({ width: `var(${$setup.BODY_WIDTH_CSS_VAR})` }),
8091
- "table-config": $props.tableConfig,
8092
- "action-config": $props.actionConfig,
8093
- columns: $props.columns,
8094
- "additional-header-menu-items": $props.additionalHeaderMenuItems,
8095
- "col-sort-values": $props.colSortValues,
8096
- "is-selected": Boolean($props.tableState.totalSelected),
8097
- "get-drag-handle-height": getDragHandleHeight,
8098
- class: normalizeClass(["table-header", { "sub-menu-active": $props.subMenuConfig.subMenuItems?.length }]),
8099
- "show-new-column-button": $setup.showNewColumnAndRowButton,
8100
- "selected-header-index": $options.selectedHeaderIndex,
8101
- onHeaderSelect: $options.onSelectAll,
8102
- onColumnSort: $options.onColumnSort,
8103
- onDeleteColumn: $options.onDeleteColumn,
8104
- onColumnResize: $options.onColumnResize,
8105
- onAllColumnsResize: $options.onAllColumnsResize,
8106
- onColumnResizeStart: $options.onColumnResizeStart,
8107
- onColumnResizeEnd: $options.onColumnResizeEnd,
8108
- onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
8109
- onHeaderCellSelect: $options.onHeaderCellSelect,
8110
- onHeaderCellDeselect: $options.onHeaderCellDeselect,
8111
- onHeaderCellStartEditing: _cache[4] || (_cache[4] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
8112
- "onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
8113
- onNewColumnButtonClick: $options.onNewColumnButtonClick,
8114
- onSelectionKeydownDown: _cache[5] || (_cache[5] = ($event) => $options.onHeaderSelectionKeydownDown()),
8115
- onNewColumnButtonKeydownLeft: _cache[6] || (_cache[6] = ($event) => $options.onMoveIntoBodyFromRight())
8116
- }, {
8117
- subHeader: withCtx((slotProps) => [renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
8118
- _: 3
8119
- }, 8, [
8120
- "style",
8121
- "table-config",
8122
- "action-config",
8123
- "columns",
8124
- "additional-header-menu-items",
8125
- "col-sort-values",
8126
- "is-selected",
8127
- "get-drag-handle-height",
8128
- "class",
8129
- "show-new-column-button",
8130
- "selected-header-index",
8131
- "onHeaderSelect",
8132
- "onColumnSort",
8133
- "onDeleteColumn",
8134
- "onColumnResize",
8135
- "onAllColumnsResize",
8136
- "onColumnResizeStart",
8137
- "onColumnResizeEnd",
8138
- "onMoveDownFromHeaderCell",
8139
- "onHeaderCellSelect",
8140
- "onHeaderCellDeselect",
8141
- "onUpdate:newColumnButtonWidth",
8142
- "onNewColumnButtonClick"
8143
- ])]),
8144
- "cell-selection-overlay": withCtx(() => [$setup.rectMinMax && !$setup.isEditingCell && $options.selectedHeaderIndex === null ? (openBlock(), createBlock(_component_CellSelectionOverlay, {
8145
- key: 0,
8146
- ref: "selectionOverlay",
8147
- rect: $setup.rectMinMax,
8148
- "row-height": $options.scrollerItemSize,
8149
- "table-config": $props.tableConfig,
8150
- "row-resize-index": $data.currentResizedScrollIndex,
8151
- "row-resize-delta": $data.currentRowSizeDelta,
8152
- "cell-selection-rect-focus-corner": $setup.focusWithin ? $setup.selectedCell : void 0
8153
- }, null, 8, [
8154
- "rect",
8155
- "row-height",
8156
- "table-config",
8157
- "row-resize-index",
8158
- "row-resize-delta",
8159
- "cell-selection-rect-focus-corner"
8160
- ])) : createCommentVNode("", true)]),
8161
- belowBody: withCtx(() => [$setup.showNewColumnAndRowButton ? (openBlock(), createBlock(_component_NewRowButton, {
8162
- key: 0,
8163
- ref: "new-row-button",
8164
- onClick: $options.onNewRowButtonClick,
8165
- onPointerdown: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
8166
- onKeydownUp: $options.onMoveIntoBodyFromBottom
8167
- }, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)]),
8168
- _: 3
8169
- }, 8, [
8170
- "scroll-data",
8171
- "total-width",
8172
- "column-resize",
8150
+ colInd
8151
+ } }, void 0, true)])
8152
+ };
8153
+ })]), 1032, [
8154
+ "row-data",
8155
+ "row",
8173
8156
  "table-config",
8174
8157
  "sub-menu-config",
8175
- "scroll-config",
8176
- "current-row-height",
8158
+ "show-drag-handle",
8159
+ "columns",
8160
+ "row-config",
8161
+ "row-height",
8162
+ "min-row-height",
8163
+ "is-selected",
8164
+ "select-cells-on-move",
8165
+ "disable-row-height-transition",
8166
+ "selected-cell-index",
8167
+ "cell-selection-range",
8168
+ "to-be-expanded-cell-index",
8169
+ "to-be-edited-cell-index",
8177
8170
  "new-column-button-width",
8178
- "onScrollerUpdate",
8179
- "onMoveSelection",
8180
- "onClearSelection",
8181
- "onExpandSelectedCell",
8182
- "onStartEditing"
8183
- ]),
8184
- $options.totalTableLength === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_KdsEmptyState, mergeProps({ class: "empty-state" }, $props.emptyState), null, 16)])) : createCommentVNode("", true),
8185
- $props.pageConfig && $props.pageState ? (openBlock(), createBlock(_component_PageControls, {
8186
- key: 1,
8187
- "page-config": $props.pageConfig,
8171
+ "onDeleteRow",
8172
+ "onRowSelect",
8173
+ "onCellSelect",
8174
+ "onDataValueView",
8175
+ "onExpandCellSelect",
8176
+ "onRowInput",
8177
+ "onRowSubMenuClick",
8178
+ "onResizeAllRows",
8179
+ "onResizeRow",
8180
+ "onVirtualColumnNav"
8181
+ ])]),
8182
+ header: withCtx(({ getDragHandleHeight }) => [createVNode(_component_Header, {
8183
+ ref: "header",
8184
+ style: normalizeStyle({ width: `var(${$setup.BODY_WIDTH_CSS_VAR})` }),
8185
+ "table-config": $props.tableConfig,
8186
+ "action-config": $props.actionConfig,
8187
+ columns: $props.columns,
8188
+ "additional-header-menu-items": $props.additionalHeaderMenuItems,
8189
+ "col-sort-values": $props.colSortValues,
8190
+ "is-selected": Boolean($props.tableState.totalSelected),
8191
+ "get-drag-handle-height": getDragHandleHeight,
8192
+ class: normalizeClass(["table-header", { "sub-menu-active": $props.subMenuConfig.subMenuItems?.length }]),
8193
+ "show-new-column-button": $setup.showNewColumnAndRowButton,
8194
+ "selected-header-index": $options.selectedHeaderIndex,
8195
+ onHeaderSelect: $options.onSelectAll,
8196
+ onColumnSort: $options.onColumnSort,
8197
+ onDeleteColumn: $options.onDeleteColumn,
8198
+ onColumnResize: $options.onColumnResize,
8199
+ onAllColumnsResize: $options.onAllColumnsResize,
8200
+ onColumnResizeStart: $options.onColumnResizeStart,
8201
+ onColumnResizeEnd: $options.onColumnResizeEnd,
8202
+ onMoveDownFromHeaderCell: $options.onMoveDownFromHeaderCell,
8203
+ onHeaderCellSelect: $options.onHeaderCellSelect,
8204
+ onHeaderCellDeselect: $options.onHeaderCellDeselect,
8205
+ onHeaderCellStartEditing: _cache[4] || (_cache[4] = (columnIndex, initialValue) => _ctx.$emit("headerCellStartEditing", columnIndex, initialValue)),
8206
+ "onUpdate:newColumnButtonWidth": $options.onUpdateNewColumnButtonWidth,
8207
+ onNewColumnButtonClick: $options.onNewColumnButtonClick,
8208
+ onSelectionKeydownDown: _cache[5] || (_cache[5] = ($event) => $options.onHeaderSelectionKeydownDown()),
8209
+ onNewColumnButtonKeydownLeft: _cache[6] || (_cache[6] = ($event) => $options.onMoveIntoBodyFromRight())
8210
+ }, {
8211
+ subHeader: withCtx((slotProps) => [renderSlot(_ctx.$slots, "subHeader", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
8212
+ _: 3
8213
+ }, 8, [
8214
+ "style",
8215
+ "table-config",
8216
+ "action-config",
8217
+ "columns",
8218
+ "additional-header-menu-items",
8219
+ "col-sort-values",
8220
+ "is-selected",
8221
+ "get-drag-handle-height",
8222
+ "class",
8223
+ "show-new-column-button",
8224
+ "selected-header-index",
8225
+ "onHeaderSelect",
8226
+ "onColumnSort",
8227
+ "onDeleteColumn",
8228
+ "onColumnResize",
8229
+ "onAllColumnsResize",
8230
+ "onColumnResizeStart",
8231
+ "onColumnResizeEnd",
8232
+ "onMoveDownFromHeaderCell",
8233
+ "onHeaderCellSelect",
8234
+ "onHeaderCellDeselect",
8235
+ "onUpdate:newColumnButtonWidth",
8236
+ "onNewColumnButtonClick"
8237
+ ])]),
8238
+ "cell-selection-overlay": withCtx(() => [$setup.rectMinMax && !$setup.isEditingCell && $options.selectedHeaderIndex === null ? (openBlock(), createBlock(_component_CellSelectionOverlay, {
8239
+ key: 0,
8240
+ ref: "selectionOverlay",
8241
+ rect: $setup.rectMinMax,
8242
+ "row-height": $options.scrollerItemSize,
8188
8243
  "table-config": $props.tableConfig,
8189
- "page-state": $props.pageState,
8190
- "table-state": $props.tableState,
8191
- onPageChange: $options.onPageChange,
8192
- onPageSizeUpdate: $options.onPageSizeUpdate
8244
+ "row-resize-index": $data.currentResizedScrollIndex,
8245
+ "row-resize-delta": $data.currentRowSizeDelta,
8246
+ "cell-selection-rect-focus-corner": $setup.focusWithin ? $setup.selectedCell : void 0
8193
8247
  }, null, 8, [
8194
- "page-config",
8248
+ "rect",
8249
+ "row-height",
8195
8250
  "table-config",
8196
- "page-state",
8197
- "table-state",
8198
- "onPageChange",
8199
- "onPageSizeUpdate"
8200
- ])) : createCommentVNode("", true)
8201
- ], 544)]);
8251
+ "row-resize-index",
8252
+ "row-resize-delta",
8253
+ "cell-selection-rect-focus-corner"
8254
+ ])) : createCommentVNode("", true)]),
8255
+ belowBody: withCtx(() => [$setup.showNewColumnAndRowButton ? (openBlock(), createBlock(_component_NewRowButton, {
8256
+ key: 0,
8257
+ ref: "new-row-button",
8258
+ onClick: $options.onNewRowButtonClick,
8259
+ onPointerdown: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
8260
+ onKeydownUp: $options.onMoveIntoBodyFromBottom
8261
+ }, null, 8, ["onClick", "onKeydownUp"])) : createCommentVNode("", true)]),
8262
+ _: 2
8263
+ }, [$props.emptyState ? {
8264
+ name: "empty-state",
8265
+ fn: withCtx(() => [createVNode(_component_KdsEmptyState, mergeProps({ class: "empty-state" }, $props.emptyState), null, 16)]),
8266
+ key: "0"
8267
+ } : void 0]), 1032, [
8268
+ "scroll-data",
8269
+ "total-width",
8270
+ "column-resize",
8271
+ "table-config",
8272
+ "sub-menu-config",
8273
+ "scroll-config",
8274
+ "current-row-height",
8275
+ "new-column-button-width",
8276
+ "onScrollerUpdate",
8277
+ "onMoveSelection",
8278
+ "onClearSelection",
8279
+ "onExpandSelectedCell",
8280
+ "onStartEditing"
8281
+ ]), $props.pageConfig && $props.pageState ? (openBlock(), createBlock(_component_PageControls, {
8282
+ key: 0,
8283
+ "page-config": $props.pageConfig,
8284
+ "table-config": $props.tableConfig,
8285
+ "page-state": $props.pageState,
8286
+ "table-state": $props.tableState,
8287
+ onPageChange: $options.onPageChange,
8288
+ onPageSizeUpdate: $options.onPageSizeUpdate
8289
+ }, null, 8, [
8290
+ "page-config",
8291
+ "table-config",
8292
+ "page-state",
8293
+ "table-state",
8294
+ "onPageChange",
8295
+ "onPageSizeUpdate"
8296
+ ])) : createCommentVNode("", true)], 544)]);
8202
8297
  }
8203
- var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-1941898e"]]);
8298
+ var TableUI_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TableUI_vue_vue_type_script_lang_default, [["render", _sfc_render$1], ["__scopeId", "data-v-83bc03a3"]]);
8204
8299
  //#endregion
8205
8300
  //#region src/components/composables/useTableReady.ts
8206
8301
  var useTableReady = ({ onReady }) => {