@knime/kds-table 0.4.1 → 0.5.1

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
@@ -15261,7 +15261,7 @@ const _hoisted_4$2$1 = {
15261
15261
  key: 1,
15262
15262
  class: "kds-loading-skeleton-input-with-label"
15263
15263
  };
15264
- const _hoisted_5$1$1 = { class: "kds-loading-skeleton-list-item-text" };
15264
+ const _hoisted_5$1 = { class: "kds-loading-skeleton-list-item-text" };
15265
15265
  const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
15266
15266
  __name: "KdsLoadingSkeleton",
15267
15267
  props: {
@@ -15310,7 +15310,7 @@ const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
15310
15310
  createVNode(LoadingSkeletonItem, {
15311
15311
  shape: __props.variant.startsWith("list-item-large") ? "icon-large" : "icon-small"
15312
15312
  }, null, 8, ["shape"]),
15313
- createElementVNode("div", _hoisted_5$1$1, [
15313
+ createElementVNode("div", _hoisted_5$1, [
15314
15314
  createVNode(LoadingSkeletonItem, { shape: "text" }),
15315
15315
  __props.variant.endsWith("subtext") ? (openBlock(), createBlock(LoadingSkeletonItem, {
15316
15316
  key: 0,
@@ -16295,44 +16295,34 @@ const createEditingCellKeydownHandler = ({
16295
16295
  };
16296
16296
  };
16297
16297
 
16298
- const _hoisted_1$c = {
16299
- key: 0,
16300
- class: "page-navigation"
16301
- };
16298
+ const _hoisted_1$c = { class: "page-navigation" };
16302
16299
  const _hoisted_2$8 = { class: "navigation-buttons" };
16303
16300
  const _hoisted_3$5 = { class: "page-count" };
16304
- const _hoisted_4$3 = { class: "navigation-buttons" };
16301
+ const _hoisted_4$2 = { class: "navigation-buttons" };
16305
16302
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
16306
16303
  __name: "PageNavigation",
16307
16304
  props: {
16308
- currentItems: { default: 0 },
16309
- pageSize: { default: 0 },
16310
- currentPage: { default: 1 }
16305
+ currentPage: { default: 1 },
16306
+ totalPages: { default: 0 },
16307
+ hasNextPage: { type: Boolean, default: false },
16308
+ hasPreviousPage: { type: Boolean, default: false }
16311
16309
  },
16312
16310
  emits: ["pageChange"],
16313
16311
  setup(__props, { emit: __emit }) {
16314
16312
  const emit = __emit;
16315
- const totalPages = computed(() => {
16316
- if (!__props.pageSize || __props.currentItems <= 0) {
16317
- return 0;
16318
- }
16319
- return Math.ceil(__props.currentItems / __props.pageSize);
16320
- });
16321
- const hasNextPage = computed(() => __props.currentPage < totalPages.value);
16322
- const hasPreviousPage = computed(() => __props.currentPage > 1);
16323
16313
  const onPageChange = (newPageNumber) => {
16324
16314
  consola.debug("Page change", newPageNumber);
16325
16315
  emit("pageChange", newPageNumber);
16326
16316
  };
16327
16317
  return (_ctx, _cache) => {
16328
- return hasNextPage.value || hasPreviousPage.value ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
16318
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
16329
16319
  createElementVNode("div", _hoisted_2$8, [
16330
16320
  createVNode(unref(_sfc_main$1v), {
16331
16321
  variant: "transparent",
16332
16322
  size: "small",
16333
16323
  "leading-icon": "chevron-left-double",
16334
16324
  ariaLabel: "First page",
16335
- disabled: !hasPreviousPage.value,
16325
+ disabled: !__props.hasPreviousPage,
16336
16326
  onClick: _cache[0] || (_cache[0] = ($event) => onPageChange(1))
16337
16327
  }, null, 8, ["disabled"]),
16338
16328
  createVNode(unref(_sfc_main$1v), {
@@ -16340,18 +16330,18 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16340
16330
  size: "small",
16341
16331
  "leading-icon": "chevron-left",
16342
16332
  ariaLabel: "Previous page",
16343
- disabled: !hasPreviousPage.value,
16333
+ disabled: !__props.hasPreviousPage,
16344
16334
  onClick: _cache[1] || (_cache[1] = ($event) => onPageChange(__props.currentPage - 1))
16345
16335
  }, null, 8, ["disabled"])
16346
16336
  ]),
16347
- createElementVNode("span", _hoisted_3$5, toDisplayString(__props.currentPage) + " of " + toDisplayString(totalPages.value), 1),
16348
- createElementVNode("div", _hoisted_4$3, [
16337
+ createElementVNode("span", _hoisted_3$5, toDisplayString(__props.currentPage) + " of " + toDisplayString(__props.totalPages), 1),
16338
+ createElementVNode("div", _hoisted_4$2, [
16349
16339
  createVNode(unref(_sfc_main$1v), {
16350
16340
  variant: "transparent",
16351
16341
  size: "small",
16352
16342
  "leading-icon": "chevron-right",
16353
16343
  ariaLabel: "Next page",
16354
- disabled: !hasNextPage.value,
16344
+ disabled: !__props.hasNextPage,
16355
16345
  onClick: _cache[2] || (_cache[2] = ($event) => onPageChange(__props.currentPage + 1))
16356
16346
  }, null, 8, ["disabled"]),
16357
16347
  createVNode(unref(_sfc_main$1v), {
@@ -16359,16 +16349,16 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16359
16349
  size: "small",
16360
16350
  "leading-icon": "chevron-right-double",
16361
16351
  ariaLabel: "Last page",
16362
- disabled: !hasNextPage.value,
16363
- onClick: _cache[3] || (_cache[3] = ($event) => onPageChange(totalPages.value))
16352
+ disabled: !__props.hasNextPage,
16353
+ onClick: _cache[3] || (_cache[3] = ($event) => onPageChange(__props.totalPages))
16364
16354
  }, null, 8, ["disabled"])
16365
16355
  ])
16366
- ])) : createCommentVNode("", true);
16356
+ ]);
16367
16357
  };
16368
16358
  }
16369
16359
  });
16370
16360
 
16371
- const PageNavigation = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-f8714af0"]]);
16361
+ const PageNavigation = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-95577571"]]);
16372
16362
 
16373
16363
  const _hoisted_1$b = {
16374
16364
  key: 0,
@@ -16379,11 +16369,11 @@ const _hoisted_2$7 = {
16379
16369
  class: "row-range-container"
16380
16370
  };
16381
16371
  const _hoisted_3$4 = { class: "subtle" };
16382
- const _hoisted_4$2 = {
16372
+ const _hoisted_4$1 = {
16383
16373
  key: 0,
16384
16374
  class: "muted"
16385
16375
  };
16386
- const _hoisted_5$1 = { class: "subtle" };
16376
+ const _hoisted_5 = { class: "subtle" };
16387
16377
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
16388
16378
  __name: "PageRowRange",
16389
16379
  props: {
@@ -16408,8 +16398,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
16408
16398
  return (_ctx, _cache) => {
16409
16399
  return __props.showTableSize && __props.currentItems === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$b, "No data")) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
16410
16400
  createElementVNode("span", _hoisted_3$4, toDisplayString(__props.rowLabel) + ":", 1),
16411
- hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$2, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
16412
- createElementVNode("span", _hoisted_5$1, toDisplayString(rowCountText.value), 1)
16401
+ hasMultiplePages.value && __props.currentItems ? (openBlock(), createElementBlock("span", _hoisted_4$1, toDisplayString(pageRangeStart.value) + "–" + toDisplayString(pageRangeEnd.value), 1)) : createCommentVNode("", true),
16402
+ createElementVNode("span", _hoisted_5, toDisplayString(rowCountText.value), 1)
16413
16403
  ]));
16414
16404
  };
16415
16405
  }
@@ -16448,6 +16438,24 @@ const _sfc_main$f = {
16448
16438
  id: pageSize.toString(),
16449
16439
  text: this.createText(pageSize)
16450
16440
  }));
16441
+ },
16442
+ currentItems() {
16443
+ return this.tableState.tableSizes?.currentNumRows ?? 0;
16444
+ },
16445
+ totalPages() {
16446
+ if (!this.pageConfig.pageSize || this.currentItems <= 0) {
16447
+ return 0;
16448
+ }
16449
+ return Math.ceil(this.currentItems / this.pageConfig.pageSize);
16450
+ },
16451
+ hasNextPage() {
16452
+ return this.pageState.currentPage < this.totalPages;
16453
+ },
16454
+ hasPreviousPage() {
16455
+ return this.pageState.currentPage > 1;
16456
+ },
16457
+ showPageNavigation() {
16458
+ return this.hasNextPage || this.hasPreviousPage;
16451
16459
  }
16452
16460
  },
16453
16461
  methods: {
@@ -16461,27 +16469,32 @@ const _sfc_main$f = {
16461
16469
  }
16462
16470
  };
16463
16471
 
16464
- const _hoisted_1$a = { class: "page-controls" };
16472
+ const _hoisted_1$a = {
16473
+ key: 0,
16474
+ class: "page-controls"
16475
+ };
16465
16476
  const _hoisted_2$6 = { class: "page-size-menu" };
16466
16477
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
16467
16478
  const _component_PageRowRange = resolveComponent("PageRowRange");
16468
16479
  const _component_PageNavigation = resolveComponent("PageNavigation");
16469
16480
  const _component_KdsMenuButton = resolveComponent("KdsMenuButton");
16470
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
16481
+ return $options.showPageNavigation || $options.pageSizeItems.length ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
16471
16482
  createVNode(_component_PageRowRange, {
16472
16483
  class: "page-row-range",
16473
- "current-items": $props.tableState.currentSize,
16484
+ "current-items": $props.tableState.tableSizes?.currentNumRows,
16474
16485
  "page-size": $props.pageConfig.pageSize,
16475
16486
  "current-page": $props.pageState.currentPage,
16476
16487
  "show-table-size": $props.tableConfig.showTableSize,
16477
16488
  "row-label": $props.tableConfig.rowLabel
16478
16489
  }, null, 8, ["current-items", "page-size", "current-page", "show-table-size", "row-label"]),
16479
- createVNode(_component_PageNavigation, {
16480
- "current-items": $props.tableState.currentSize,
16481
- "page-size": $props.pageConfig.pageSize,
16490
+ $options.showPageNavigation ? (openBlock(), createBlock(_component_PageNavigation, {
16491
+ key: 0,
16482
16492
  "current-page": $props.pageState.currentPage,
16493
+ "total-pages": $options.totalPages,
16494
+ "has-next-page": $options.hasNextPage,
16495
+ "has-previous-page": $options.hasPreviousPage,
16483
16496
  onPageChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("pageChange", $event))
16484
- }, null, 8, ["current-items", "page-size", "current-page"]),
16497
+ }, null, 8, ["current-page", "total-pages", "has-next-page", "has-previous-page"])) : createCommentVNode("", true),
16485
16498
  createElementVNode("div", _hoisted_2$6, [
16486
16499
  $options.pageSizeItems.length ? (openBlock(), createBlock(_component_KdsMenuButton, {
16487
16500
  key: 0,
@@ -16493,9 +16506,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
16493
16506
  onItemClick: $options.onPageSizeSelect
16494
16507
  }, null, 8, ["items", "label", "onItemClick"])) : createCommentVNode("", true)
16495
16508
  ])
16496
- ]);
16509
+ ])) : createCommentVNode("", true);
16497
16510
  }
16498
- const PageControls = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$4], ["__scopeId", "data-v-d15a282a"]]);
16511
+ const PageControls = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$4], ["__scopeId", "data-v-bf51fe76"]]);
16499
16512
 
16500
16513
  const defaultValueFor = (is) => {
16501
16514
  if (is === "ControlMultiselect") {
@@ -17014,22 +17027,15 @@ const SortControl = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__scopeId", "d
17014
17027
  const _hoisted_1$6 = { class: "left" };
17015
17028
  const _hoisted_2$3 = {
17016
17029
  key: 0,
17017
- class: "title"
17018
- };
17019
- const _hoisted_3$2 = {
17020
- key: 1,
17021
17030
  class: "dimension"
17022
17031
  };
17023
- const _hoisted_4$1 = { class: "right" };
17032
+ const _hoisted_3$2 = { class: "right" };
17024
17033
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
17025
17034
  __name: "TableActionBar",
17026
17035
  props: {
17027
- allRowsCount: { default: 0 },
17028
- filteredRowsCount: { default: 0 },
17029
- allColumnsCount: { default: 0 },
17030
- filteredColumnsCount: { default: 0 },
17036
+ tableSizes: {},
17031
17037
  rowLabel: { default: "Rows" },
17032
- title: { default: "" },
17038
+ viewType: { default: "DEFAULT" },
17033
17039
  showTableSize: { type: Boolean, default: true },
17034
17040
  actionConfig: {},
17035
17041
  colSortValues: { default: () => [] },
@@ -17039,36 +17045,35 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
17039
17045
  },
17040
17046
  emits: ["resetTemporaryView", "columnFilter", "onColumnSort"],
17041
17047
  setup(__props, { expose: __expose, emit: __emit }) {
17042
- const isTemporaryView = computed(() => __props.title === "Temporary view");
17043
- const hasContent = computed(
17044
- () => Boolean(__props.title) || __props.showTableSize || __props.actionConfig.enableSorting || __props.actionConfig.enableFilters
17048
+ const isTemporaryView = computed(
17049
+ () => __props.viewType === "TEMP_VIEW" || __props.viewType === "PREVIEW"
17045
17050
  );
17046
- const hasRows = computed(() => __props.allRowsCount > 0);
17047
- const shouldAppendOfRows = computed(() => __props.filteredRowsCount < __props.allRowsCount);
17048
- const hasColumns = computed(() => __props.allColumnsCount > 0);
17049
- const hasLessThanTwoColumns = computed(() => __props.allColumnsCount < 2);
17050
- const shouldAppendOfColumns = computed(
17051
- () => __props.filteredColumnsCount < __props.allColumnsCount
17051
+ const showResetButton = computed(() => __props.viewType === "TEMP_VIEW");
17052
+ const hasContent = computed(
17053
+ () => isTemporaryView.value || __props.showTableSize || __props.actionConfig.enableSorting || __props.actionConfig.enableFilters || __props.actionConfig.forceShow
17052
17054
  );
17053
- const formatCount = (label, filteredCount, totalCount, appendTotal) => `${label}: ${filteredCount}${appendTotal ? ` of ${totalCount}` : ""}`;
17055
+ const formatCount = (label, total, current) => {
17056
+ const appendTotal = current !== void 0 && current < total;
17057
+ return `${label}: ${appendTotal ? `${current} of ${total}` : total}`;
17058
+ };
17054
17059
  const dimensionText = computed(() => {
17055
- if (!hasRows.value && !hasColumns.value) {
17060
+ const totalNumRows = __props.tableSizes?.totalNumRows ?? 0;
17061
+ const totalNumColumns = __props.tableSizes?.totalNumColumns ?? 0;
17062
+ if (totalNumRows === 0 && totalNumColumns === 0) {
17056
17063
  return "No data";
17057
17064
  }
17058
17065
  const rowText = formatCount(
17059
17066
  __props.rowLabel,
17060
- __props.filteredRowsCount,
17061
- __props.allRowsCount,
17062
- shouldAppendOfRows.value
17067
+ totalNumRows,
17068
+ __props.tableSizes?.currentNumRows
17063
17069
  );
17064
- if (hasLessThanTwoColumns.value) {
17070
+ if (totalNumColumns < 2) {
17065
17071
  return rowText;
17066
17072
  }
17067
17073
  const columnText = formatCount(
17068
17074
  "Columns",
17069
- __props.filteredColumnsCount,
17070
- __props.allColumnsCount,
17071
- shouldAppendOfColumns.value
17075
+ totalNumColumns,
17076
+ __props.tableSizes?.currentNumColumns
17072
17077
  );
17073
17078
  return `${rowText} | ${columnText}`;
17074
17079
  });
@@ -17086,16 +17091,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
17086
17091
  class: normalizeClass(["kds-table-action-bar", { "temporary-view": isTemporaryView.value }])
17087
17092
  }, [
17088
17093
  createElementVNode("div", _hoisted_1$6, [
17089
- __props.title ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
17090
- __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true),
17094
+ __props.showTableSize ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(dimensionText.value), 1)) : createCommentVNode("", true),
17091
17095
  __props.actionConfig.enableSorting ? (openBlock(), createBlock(SortControl, {
17092
- key: 2,
17096
+ key: 1,
17093
17097
  "col-sort-values": __props.colSortValues,
17094
17098
  "sort-control-options": __props.sortControlOptions,
17095
17099
  onColumnSort: _cache[0] || (_cache[0] = (columnId, colDir) => emit("onColumnSort", columnId, colDir))
17096
17100
  }, null, 8, ["col-sort-values", "sort-control-options"])) : createCommentVNode("", true),
17097
17101
  __props.actionConfig.enableFilters ? (openBlock(), createBlock(FilterControl, {
17098
- key: 3,
17102
+ key: 2,
17099
17103
  ref_key: "filterControlRef",
17100
17104
  ref: filterControlRef,
17101
17105
  columns: __props.columns,
@@ -17103,7 +17107,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
17103
17107
  onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => emit("columnFilter", colInd, value))
17104
17108
  }, null, 8, ["columns", "col-filter-values"])) : createCommentVNode("", true)
17105
17109
  ]),
17106
- createElementVNode("div", _hoisted_4$1, [
17110
+ createElementVNode("div", _hoisted_3$2, [
17107
17111
  __props.actionConfig.settingsItems?.length ? (openBlock(), createBlock(unref(_sfc_main$1k), {
17108
17112
  key: 0,
17109
17113
  ariaLabel: "Table settings",
@@ -17112,7 +17116,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
17112
17116
  "leading-icon": "parameter",
17113
17117
  items: __props.actionConfig.settingsItems
17114
17118
  }, null, 8, ["items"])) : createCommentVNode("", true),
17115
- isTemporaryView.value ? (openBlock(), createBlock(unref(_sfc_main$1v), {
17119
+ showResetButton.value ? (openBlock(), createBlock(unref(_sfc_main$1v), {
17116
17120
  key: 1,
17117
17121
  ariaLabel: "Reset to Nodeoutput",
17118
17122
  size: "small",
@@ -17126,7 +17130,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
17126
17130
  }
17127
17131
  });
17128
17132
 
17129
- const TableActionBar = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__scopeId", "data-v-4a59722f"]]);
17133
+ const TableActionBar = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__scopeId", "data-v-4bc7ffb1"]]);
17130
17134
 
17131
17135
  const useHeaderMenuItems = ({
17132
17136
  enableSorting,
@@ -17277,7 +17281,6 @@ const _hoisted_4 = {
17277
17281
  key: 0,
17278
17282
  class: "delete-column-button"
17279
17283
  };
17280
- const _hoisted_5 = { key: 1 };
17281
17284
  const columnMenuButtonRef = "columnMenuButton";
17282
17285
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17283
17286
  __name: "HeaderCell",
@@ -17317,12 +17320,19 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17317
17320
  clearFilter: () => emit("clearColumnFilter")
17318
17321
  })
17319
17322
  );
17320
- const hovered = ref(false);
17321
- const onPointerOver = () => {
17322
- hovered.value = true;
17323
+ const resizeHandleHovered = ref(false);
17324
+ const headerHovered = ref(false);
17325
+ const menuOpen = ref(false);
17326
+ const nativeFocusInsideHeader = ref(false);
17327
+ const onThFocusOut = (event) => {
17328
+ if (!columnHeader.value?.contains(event.relatedTarget)) {
17329
+ nativeFocusInsideHeader.value = false;
17330
+ }
17323
17331
  };
17324
- const onPointerLeave = () => {
17325
- hovered.value = false;
17332
+ const onThFocusIn = (event) => {
17333
+ if (event.target.matches(":focus-visible")) {
17334
+ nativeFocusInsideHeader.value = true;
17335
+ }
17326
17336
  };
17327
17337
  const dragging = ref(false);
17328
17338
  let columnSizeOnDragStart = 0;
@@ -17352,6 +17362,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17352
17362
  );
17353
17363
  const dragHandleHeight = (isDragging) => isDragging ? currentDragHandlerHeight : HEADER_HEIGHT;
17354
17364
  const onPointerDown = (event) => {
17365
+ menuOpen.value = false;
17355
17366
  consola.debug("Resize via drag triggered: ", event);
17356
17367
  event.stopPropagation();
17357
17368
  event.target.setPointerCapture(event.pointerId);
@@ -17386,7 +17397,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17386
17397
  consola.debug("Resize via drag finished: ", event);
17387
17398
  stopAutoScroll();
17388
17399
  dragging.value = false;
17389
- hovered.value = false;
17400
+ resizeHandleHovered.value = false;
17390
17401
  });
17391
17402
  const getHeaderCellWidth = () => {
17392
17403
  const widthCompleteHeader = Math.ceil(
@@ -17402,6 +17413,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17402
17413
  if (props.tableConfig.enableHeaderCellSelection || props.column.editable) {
17403
17414
  content.value?.focus();
17404
17415
  } else if (subMenuItems.value?.length) {
17416
+ nativeFocusInsideHeader.value = true;
17405
17417
  columnMenuButton.value?.menuButtonEl?.$el?.focus();
17406
17418
  } else if (props.column.deletable) {
17407
17419
  columnDeleteButton.value?.$el?.focus();
@@ -17410,6 +17422,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17410
17422
  const isFocusable = () => Boolean(
17411
17423
  props.tableConfig.enableHeaderCellSelection || props.column.editable || subMenuItems.value?.length || props.column.deletable
17412
17424
  );
17425
+ const showMenuButton = computed(() => {
17426
+ return subMenuItems.value?.length && (headerHovered.value || menuOpen.value || nativeFocusInsideHeader.value) && !dragging.value;
17427
+ });
17413
17428
  __expose({ getHeaderCellWidth, focus, isFocusable });
17414
17429
  return (_ctx, _cache) => {
17415
17430
  return openBlock(), createElementBlock("th", {
@@ -17426,14 +17441,18 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17426
17441
  "colored-header": __props.column.headerColor,
17427
17442
  "header-focused": __props.focused || __props.selected
17428
17443
  }
17429
- ])
17444
+ ]),
17445
+ onPointerenter: _cache[19] || (_cache[19] = ($event) => headerHovered.value = true),
17446
+ onPointerleave: _cache[20] || (_cache[20] = ($event) => headerHovered.value = false),
17447
+ onFocusin: onThFocusIn,
17448
+ onFocusout: onThFocusOut
17430
17449
  }, [
17431
17450
  createElementVNode("div", {
17432
17451
  ref_key: "content",
17433
17452
  ref: content,
17434
17453
  class: normalizeClass(["column-header-content", [
17435
17454
  {
17436
- "with-button-in-header": subMenuItems.value?.length || __props.column.deletable
17455
+ "with-button-in-header": showMenuButton.value || __props.column.deletable
17437
17456
  }
17438
17457
  ]]),
17439
17458
  tabindex: __props.tableConfig.enableHeaderCellSelection || __props.column.editable ? 0 : -1,
@@ -17484,43 +17503,48 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
17484
17503
  onKeydown: _cache[10] || (_cache[10] = withKeys(withModifiers(($event) => emit("onKeydownDown"), ["prevent", "stop"]), ["down"]))
17485
17504
  }, null, 512)
17486
17505
  ])) : createCommentVNode("", true),
17487
- subMenuItems.value?.length ? (openBlock(), createElementBlock("div", _hoisted_5, [
17506
+ subMenuItems.value?.length ? (openBlock(), createElementBlock("div", {
17507
+ key: 1,
17508
+ class: normalizeClass({ "menu-button-hidden": !showMenuButton.value })
17509
+ }, [
17488
17510
  createVNode(unref(_sfc_main$1k), {
17489
17511
  ref: columnMenuButtonRef,
17512
+ modelValue: menuOpen.value,
17513
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => menuOpen.value = $event),
17490
17514
  ariaLabel: "Table column options",
17491
17515
  items: subMenuItems.value,
17492
17516
  size: "small",
17493
17517
  variant: "transparent",
17494
17518
  "leading-icon": "more-actions",
17495
- onKeydown: _cache[11] || (_cache[11] = withKeys(withModifiers(($event) => emit("onKeydownDown"), ["prevent", "stop"]), ["down"]))
17496
- }, null, 8, ["items"])
17497
- ])) : createCommentVNode("", true),
17519
+ onKeydown: _cache[12] || (_cache[12] = withKeys(withModifiers(($event) => emit("onKeydownDown"), ["prevent", "stop"]), ["down"]))
17520
+ }, null, 8, ["modelValue", "items"])
17521
+ ], 2)) : createCommentVNode("", true),
17498
17522
  __props.tableConfig.enableColumnResizing ? (openBlock(), createElementBlock("div", {
17499
17523
  key: 2,
17500
17524
  class: normalizeClass([
17501
17525
  "resize-handle-area",
17502
- { hover: hovered.value && !__props.otherColumnResizing, drag: dragging.value }
17526
+ { hover: resizeHandleHovered.value && !__props.otherColumnResizing, drag: dragging.value }
17503
17527
  ]),
17504
17528
  style: normalizeStyle({
17505
17529
  height: `${dragHandleHeight(dragging.value)}px`
17506
17530
  }),
17507
- onPointerover: onPointerOver,
17508
- onPointerleave: onPointerLeave,
17509
- onPointerdownPassive: _cache[12] || (_cache[12] = ($event) => onPointerDown($event)),
17510
- onPointerupPassive: _cache[13] || (_cache[13] = ($event) => onPointerUp($event)),
17511
- onPointermove: _cache[14] || (_cache[14] = //@ts-ignore
17531
+ onPointerover: _cache[13] || (_cache[13] = ($event) => resizeHandleHovered.value = true),
17532
+ onPointerleave: _cache[14] || (_cache[14] = ($event) => resizeHandleHovered.value = false),
17533
+ onPointerdownPassive: _cache[15] || (_cache[15] = ($event) => onPointerDown($event)),
17534
+ onPointerupPassive: _cache[16] || (_cache[16] = ($event) => onPointerUp($event)),
17535
+ onPointermove: _cache[17] || (_cache[17] = //@ts-ignore
17512
17536
  (...args) => unref(onPointerMove) && unref(onPointerMove)(...args)),
17513
- onLostpointercapture: _cache[15] || (_cache[15] = //@ts-ignore
17537
+ onLostpointercapture: _cache[18] || (_cache[18] = //@ts-ignore
17514
17538
  (...args) => unref(onLostPointerCapture) && unref(onLostPointerCapture)(...args))
17515
- }, [..._cache[16] || (_cache[16] = [
17539
+ }, [..._cache[21] || (_cache[21] = [
17516
17540
  createElementVNode("span", { class: "resize-handle" }, null, -1)
17517
17541
  ])], 38)) : createCommentVNode("", true)
17518
- ], 6);
17542
+ ], 38);
17519
17543
  };
17520
17544
  }
17521
17545
  });
17522
17546
 
17523
- const HeaderCell = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-b99ef494"]]);
17547
+ const HeaderCell = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-34396642"]]);
17524
17548
 
17525
17549
  const _sfc_main$8 = {
17526
17550
  components: {
@@ -17857,7 +17881,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
17857
17881
  }, null, 6)) : createCommentVNode("", true)
17858
17882
  ]);
17859
17883
  }
17860
- const Header = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-8ffda8bd"]]);
17884
+ const Header = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$2], ["__scopeId", "data-v-faef4e27"]]);
17861
17885
 
17862
17886
  const _hoisted_1$3 = { class: "sticky-container" };
17863
17887
  const buttonRef = "button";
@@ -19643,11 +19667,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19643
19667
  $props.actionConfig ? (openBlock(), createBlock(_component_TableActionBar, {
19644
19668
  key: 0,
19645
19669
  ref: "actionBar",
19646
- "all-rows-count": $props.tableState.tableSize,
19647
- "filtered-rows-count": $props.tableState.currentSize,
19648
- "all-columns-count": $props.tableState.columnCount,
19649
- "filtered-columns-count": $props.columns.length,
19650
- title: $props.actionState?.actionBarTitle,
19670
+ "table-sizes": $props.tableState.tableSizes,
19671
+ "view-type": $props.actionState?.viewType,
19651
19672
  "row-label": $props.tableConfig.rowLabel,
19652
19673
  "show-table-size": $props.tableConfig.showTableSize,
19653
19674
  "action-config": $props.actionConfig,
@@ -19658,7 +19679,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19658
19679
  onResetTemporaryView: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("resetTemporaryView")),
19659
19680
  onColumnFilter: _cache[1] || (_cache[1] = (colInd, value) => _ctx.$emit("columnFilter", colInd, value)),
19660
19681
  onOnColumnSort: $options.onActionBarColumnSort
19661
- }, null, 8, ["all-rows-count", "filtered-rows-count", "all-columns-count", "filtered-columns-count", "title", "row-label", "show-table-size", "action-config", "col-sort-values", "col-filter-values", "sort-control-options", "columns", "onOnColumnSort"])) : createCommentVNode("", true),
19682
+ }, null, 8, ["table-sizes", "view-type", "row-label", "show-table-size", "action-config", "col-sort-values", "col-filter-values", "sort-control-options", "columns", "onOnColumnSort"])) : createCommentVNode("", true),
19662
19683
  createElementVNode("table", {
19663
19684
  ref: "wrapper",
19664
19685
  tabindex: -1,
@@ -19846,7 +19867,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19846
19867
  ], 544)
19847
19868
  ]);
19848
19869
  }
19849
- const TableUI = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-aed49fa2"]]);
19870
+ const TableUI = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4db02524"]]);
19850
19871
 
19851
19872
  const useTableReady = ({ onReady }) => {
19852
19873
  const autoSizesInitialized = ref(false);