@dolusoft/query-table 3.7.1 → 3.8.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.
@@ -724,8 +724,10 @@ var useCellView = (options) => {
724
724
  };
725
725
  //#endregion
726
726
  //#region src/parts/table-body.vue?vue&type=script&setup=true&lang.ts
727
- var _hoisted_1$9 = ["colspan"];
728
- var _hoisted_2$5 = [
727
+ var _hoisted_1$9 = ["role"];
728
+ var _hoisted_2$5 = ["role"];
729
+ var _hoisted_3$5 = [
730
+ "role",
729
731
  "data-row-index",
730
732
  "aria-rowindex",
731
733
  "data-pinned-row",
@@ -736,13 +738,13 @@ var _hoisted_2$5 = [
736
738
  "onVnodeBeforeMount",
737
739
  "onVnodeUpdated"
738
740
  ];
739
- var _hoisted_3$5 = ["aria-label", "onClick"];
740
- var _hoisted_4$4 = [
741
+ var _hoisted_4$5 = ["aria-label", "onClick"];
742
+ var _hoisted_5$2 = [
741
743
  "aria-expanded",
742
744
  "aria-label",
743
745
  "onClick"
744
746
  ];
745
- var _hoisted_5$1 = {
747
+ var _hoisted_6$2 = {
746
748
  width: "14",
747
749
  height: "14",
748
750
  viewBox: "0 0 24 24",
@@ -753,38 +755,29 @@ var _hoisted_5$1 = {
753
755
  "stroke-linejoin": "round",
754
756
  "aria-hidden": "true"
755
757
  };
756
- var _hoisted_6$1 = {
758
+ var _hoisted_7$2 = {
757
759
  key: 0,
758
760
  points: "6 9 12 15 18 9"
759
761
  };
760
- var _hoisted_7$1 = {
762
+ var _hoisted_8$2 = {
761
763
  key: 1,
762
764
  points: "9 6 15 12 9 18"
763
765
  };
764
- var _hoisted_8$1 = [
766
+ var _hoisted_9$1 = [
765
767
  "aria-label",
766
768
  "checked",
767
769
  "onChange"
768
770
  ];
769
- var _hoisted_9$1 = ["data-flash"];
770
- var _hoisted_10 = ["data-flash"];
771
- var _hoisted_11 = ["aria-rowindex", "data-pinned-row"];
772
- var _hoisted_12 = ["colspan"];
773
- var _hoisted_13 = {
774
- key: 0,
775
- class: "qt-loading-row"
776
- };
777
- var _hoisted_14 = ["colspan"];
778
- var _hoisted_15 = {
779
- key: 1,
780
- class: "qt-empty-row"
781
- };
782
- var _hoisted_16 = ["colspan"];
783
- var _hoisted_17 = {
784
- key: 2,
785
- class: "qt-load-more-row"
786
- };
787
- var _hoisted_18 = ["colspan"];
771
+ var _hoisted_10 = ["role", "data-flash"];
772
+ var _hoisted_11 = ["role", "data-flash"];
773
+ var _hoisted_12 = [
774
+ "role",
775
+ "aria-rowindex",
776
+ "data-pinned-row"
777
+ ];
778
+ var _hoisted_13 = ["role"];
779
+ var _hoisted_14 = ["role"];
780
+ var _hoisted_15 = ["role"];
788
781
  //#endregion
789
782
  //#region src/parts/table-body.vue
790
783
  var table_body_default = /* @__PURE__ */ defineComponent({
@@ -811,7 +804,8 @@ var table_body_default = /* @__PURE__ */ defineComponent({
811
804
  labels: {},
812
805
  hasContextMenuListener: { type: Function },
813
806
  loadMore: {},
814
- flash: {}
807
+ flash: {},
808
+ roles: { type: Boolean }
815
809
  },
816
810
  emits: ["rowRightPanelClick", "cellContextMenu"],
817
811
  setup(__props, { emit: __emit }) {
@@ -827,7 +821,19 @@ var table_body_default = /* @__PURE__ */ defineComponent({
827
821
  onContextMenu: (payload) => emit("cellContextMenu", payload),
828
822
  pinRow: (row, index, position) => props.pinRow(row, index, position)
829
823
  });
830
- const utilityAttrs = (utility) => pinAttrs(props.hasPinned ? "left" : false, props.offsets[utilityKey(utility)]);
824
+ /** `role` of a row and of a cell with `scrollBody` (C-102). */
825
+ const rowRole = () => props.roles ? "row" : void 0;
826
+ const cellRole = () => props.roles ? "cell" : void 0;
827
+ /** A cell over every column; with `scrollBody` also its `aria-colspan`. */
828
+ const spanAttrs = () => ({
829
+ colspan: props.columnCount,
830
+ role: cellRole(),
831
+ "aria-colspan": props.roles ? props.columnCount : void 0
832
+ });
833
+ const utilityAttrs = (utility) => ({
834
+ role: cellRole(),
835
+ ...pinAttrs(props.hasPinned ? "left" : false, props.offsets[utilityKey(utility)])
836
+ });
831
837
  const rightPanelAttrs = () => utilityAttrs("right-panel");
832
838
  const expandAttrs = () => utilityAttrs("subtable");
833
839
  const selectAttrs = () => utilityAttrs("select");
@@ -852,15 +858,20 @@ var table_body_default = /* @__PURE__ */ defineComponent({
852
858
  return expandedSnapshot.get(String(props.keyOf(item.row, item.index))) === true;
853
859
  };
854
860
  return (_ctx, _cache) => {
855
- return openBlock(), createElementBlock("tbody", { onContextmenu: _cache[0] || (_cache[0] = (...args) => unref(onContextMenu) && unref(onContextMenu)(...args)) }, [
861
+ return openBlock(), createElementBlock("tbody", {
862
+ role: __props.roles ? "rowgroup" : void 0,
863
+ onContextmenu: _cache[0] || (_cache[0] = (...args) => unref(onContextMenu) && unref(onContextMenu)(...args))
864
+ }, [
856
865
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.bodyRows, (item) => {
857
866
  return openBlock(), createElementBlock(Fragment, { key: isSpacer(item) ? item.key : __props.keyOf(item.row, item.index) }, [isSpacer(item) ? (openBlock(), createElementBlock("tr", {
858
867
  key: 0,
859
868
  class: "qt-virtual-spacer",
860
869
  "aria-hidden": "true",
870
+ role: rowRole(),
861
871
  style: normalizeStyle({ height: `${item.spacer}px` })
862
- }, [createElementVNode("td", { colspan: __props.columnCount }, null, 8, _hoisted_1$9)], 4)) : (openBlock(), createElementBlock("tr", {
872
+ }, [createElementVNode("td", mergeProps({ ref_for: true }, spanAttrs()), null, 16)], 12, _hoisted_2$5)) : (openBlock(), createElementBlock("tr", {
863
873
  key: 1,
874
+ role: rowRole(),
864
875
  "data-row-index": item.index,
865
876
  "aria-rowindex": item.aria,
866
877
  "data-pinned-row": item.pinned || void 0,
@@ -898,7 +909,7 @@ var table_body_default = /* @__PURE__ */ defineComponent({
898
909
  y1: "12",
899
910
  x2: "19",
900
911
  y2: "12"
901
- })], -1)])], 8, _hoisted_3$5)], 16)) : createCommentVNode("", true),
912
+ })], -1)])], 8, _hoisted_4$5)], 16)) : createCommentVNode("", true),
902
913
  __props.hasSubtable ? (openBlock(), createElementBlock("td", mergeProps({
903
914
  key: 1,
904
915
  ref_for: true
@@ -909,7 +920,7 @@ var table_body_default = /* @__PURE__ */ defineComponent({
909
920
  "aria-expanded": isRowExpanded(item),
910
921
  "aria-label": __props.labels.expandRow,
911
922
  onClick: ($event) => __props.toggle(item.row, item.index)
912
- }, [(openBlock(), createElementBlock("svg", _hoisted_5$1, [isRowExpanded(item) ? (openBlock(), createElementBlock("polyline", _hoisted_6$1)) : (openBlock(), createElementBlock("polyline", _hoisted_7$1))]))], 8, _hoisted_4$4)) : createCommentVNode("", true)], 16)) : createCommentVNode("", true),
923
+ }, [(openBlock(), createElementBlock("svg", _hoisted_6$2, [isRowExpanded(item) ? (openBlock(), createElementBlock("polyline", _hoisted_7$2)) : (openBlock(), createElementBlock("polyline", _hoisted_8$2))]))], 8, _hoisted_5$2)) : createCommentVNode("", true)], 16)) : createCommentVNode("", true),
913
924
  __props.hasSelection ? (openBlock(), createElementBlock("td", mergeProps({
914
925
  key: 2,
915
926
  ref_for: true
@@ -919,38 +930,59 @@ var table_body_default = /* @__PURE__ */ defineComponent({
919
930
  "aria-label": __props.labels.selectRow,
920
931
  checked: __props.isSelected(item.row, item.index),
921
932
  onChange: ($event) => __props.toggleSelected(item.row, item.index)
922
- }, null, 40, _hoisted_8$1)], 16)) : createCommentVNode("", true),
933
+ }, null, 40, _hoisted_9$1)], 16)) : createCommentVNode("", true),
923
934
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.entries, (entry) => {
924
935
  return openBlock(), createElementBlock(Fragment, { key: entry.column.field }, [unref(hasCellSlot)(entry.column) ? (openBlock(), createElementBlock("td", mergeProps({
925
936
  key: 0,
926
- ref_for: true
927
- }, unref(cellAttrs)(entry), { "data-flash": __props.flash ? __props.flash.cell(item.row, item.index, entry.column.field) : void 0 }), [renderSlot(_ctx.$slots, `cell-${entry.column.field}`, mergeProps({ ref_for: true }, unref(slotProps)(item.row, entry.column, item.index, item.pinned)))], 16, _hoisted_9$1)) : (openBlock(), createElementBlock("td", mergeProps({
937
+ role: cellRole()
938
+ }, { ref_for: true }, unref(cellAttrs)(entry), { "data-flash": __props.flash ? __props.flash.cell(item.row, item.index, entry.column.field) : void 0 }), [renderSlot(_ctx.$slots, `cell-${entry.column.field}`, mergeProps({ ref_for: true }, unref(slotProps)(item.row, entry.column, item.index, item.pinned)))], 16, _hoisted_10)) : (openBlock(), createElementBlock("td", mergeProps({
928
939
  key: 1,
929
- ref_for: true
930
- }, unref(cellAttrs)(entry), { "data-flash": __props.flash ? __props.flash.cell(item.row, item.index, entry.column.field) : void 0 }), toDisplayString(unref(cellText)(item.row, entry.column)), 17, _hoisted_10))], 64);
940
+ role: cellRole()
941
+ }, { ref_for: true }, unref(cellAttrs)(entry), { "data-flash": __props.flash ? __props.flash.cell(item.row, item.index, entry.column.field) : void 0 }), toDisplayString(unref(cellText)(item.row, entry.column)), 17, _hoisted_11))], 64);
931
942
  }), 128))
932
- ], 8, _hoisted_2$5)), !isSpacer(item) && isRowExpanded(item) ? (openBlock(), createElementBlock("tr", {
943
+ ], 8, _hoisted_3$5)), !isSpacer(item) && isRowExpanded(item) ? (openBlock(), createElementBlock("tr", {
933
944
  key: 2,
934
945
  class: "qt-subtable-row",
946
+ role: rowRole(),
935
947
  "aria-rowindex": nextIndex(item.aria),
936
948
  "data-pinned-row": item.pinned || void 0
937
- }, [createElementVNode("td", { colspan: __props.columnCount }, [renderSlot(_ctx.$slots, "subtable", {
949
+ }, [createElementVNode("td", mergeProps({ ref_for: true }, spanAttrs()), [renderSlot(_ctx.$slots, "subtable", {
938
950
  row: item.row,
939
951
  rowIndex: item.index
940
- })], 8, _hoisted_12)], 8, _hoisted_11)) : createCommentVNode("", true)], 64);
952
+ })], 16)], 8, _hoisted_12)) : createCommentVNode("", true)], 64);
941
953
  }), 128)),
942
- __props.loading && slots.loading ? (openBlock(), createElementBlock("tr", _hoisted_13, [createElementVNode("td", { colspan: __props.columnCount }, [renderSlot(_ctx.$slots, "loading")], 8, _hoisted_14)])) : !__props.loading && __props.rows.length === 0 && slots.empty ? (openBlock(), createElementBlock("tr", _hoisted_15, [createElementVNode("td", { colspan: __props.columnCount }, [renderSlot(_ctx.$slots, "empty")], 8, _hoisted_16)])) : createCommentVNode("", true),
943
- !__props.loading && __props.rows.length > 0 && __props.loadMore && slots["load-more"] ? (openBlock(), createElementBlock("tr", _hoisted_17, [createElementVNode("td", { colspan: __props.columnCount }, [renderSlot(_ctx.$slots, "load-more", normalizeProps(guardReactiveProps(__props.loadMore)))], 8, _hoisted_18)])) : createCommentVNode("", true)
944
- ], 32);
954
+ __props.loading && slots.loading ? (openBlock(), createElementBlock("tr", {
955
+ key: 0,
956
+ class: "qt-loading-row",
957
+ role: rowRole()
958
+ }, [createElementVNode("td", normalizeProps(guardReactiveProps(spanAttrs())), [renderSlot(_ctx.$slots, "loading")], 16)], 8, _hoisted_13)) : !__props.loading && __props.rows.length === 0 && slots.empty ? (openBlock(), createElementBlock("tr", {
959
+ key: 1,
960
+ class: "qt-empty-row",
961
+ role: rowRole()
962
+ }, [createElementVNode("td", normalizeProps(guardReactiveProps(spanAttrs())), [renderSlot(_ctx.$slots, "empty")], 16)], 8, _hoisted_14)) : createCommentVNode("", true),
963
+ !__props.loading && __props.rows.length > 0 && __props.loadMore && slots["load-more"] ? (openBlock(), createElementBlock("tr", {
964
+ key: 2,
965
+ class: "qt-load-more-row",
966
+ role: rowRole()
967
+ }, [createElementVNode("td", normalizeProps(guardReactiveProps(spanAttrs())), [renderSlot(_ctx.$slots, "load-more", normalizeProps(guardReactiveProps(__props.loadMore)))], 16)], 8, _hoisted_15)) : createCommentVNode("", true)
968
+ ], 40, _hoisted_1$9);
945
969
  };
946
970
  }
947
971
  });
948
972
  //#endregion
949
973
  //#region src/parts/table-footer.vue?vue&type=script&setup=true&lang.ts
950
- var _hoisted_1$8 = { class: "qt-footer" };
951
- var _hoisted_2$4 = ["aria-rowindex"];
952
- var _hoisted_3$4 = ["colspan"];
953
- var _hoisted_4$3 = ["data-field", "data-type"];
974
+ var _hoisted_1$8 = ["role"];
975
+ var _hoisted_2$4 = ["role", "aria-rowindex"];
976
+ var _hoisted_3$4 = [
977
+ "colspan",
978
+ "role",
979
+ "aria-colspan"
980
+ ];
981
+ var _hoisted_4$4 = [
982
+ "data-field",
983
+ "data-type",
984
+ "role"
985
+ ];
954
986
  //#endregion
955
987
  //#region src/parts/table-footer.vue
956
988
  var table_footer_default = /* @__PURE__ */ defineComponent({
@@ -961,26 +993,34 @@ var table_footer_default = /* @__PURE__ */ defineComponent({
961
993
  utilityCount: {},
962
994
  hasPinned: { type: Boolean },
963
995
  offsets: {},
964
- firstRowIndex: {}
996
+ firstRowIndex: {},
997
+ roles: { type: Boolean }
965
998
  },
966
999
  setup(__props) {
967
1000
  const footerText = (row, column) => row.cells.find((cell) => cell.field === column.field)?.text;
968
1001
  return (_ctx, _cache) => {
969
- return openBlock(), createElementBlock("tfoot", _hoisted_1$8, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.footerRows, (footerRow, i) => {
1002
+ return openBlock(), createElementBlock("tfoot", {
1003
+ class: "qt-footer",
1004
+ role: __props.roles ? "rowgroup" : void 0
1005
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.footerRows, (footerRow, i) => {
970
1006
  return openBlock(), createElementBlock("tr", {
971
1007
  key: i,
1008
+ role: __props.roles ? "row" : void 0,
972
1009
  "aria-rowindex": __props.firstRowIndex === void 0 ? void 0 : __props.firstRowIndex + i
973
1010
  }, [__props.utilityCount > 0 ? (openBlock(), createElementBlock("td", mergeProps({
974
1011
  key: 0,
975
- colspan: __props.utilityCount
1012
+ colspan: __props.utilityCount,
1013
+ role: __props.roles ? "cell" : void 0,
1014
+ "aria-colspan": __props.roles ? __props.utilityCount : void 0
976
1015
  }, { ref_for: true }, unref(pinAttrs)(__props.hasPinned ? "left" : false, 0)), null, 16, _hoisted_3$4)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.entries, (entry) => {
977
1016
  return openBlock(), createElementBlock("td", mergeProps({
978
1017
  key: entry.column.field,
979
1018
  "data-field": entry.column.field,
980
- "data-type": unref(columnTypeOf$1)(entry.column)
981
- }, { ref_for: true }, unref(pinAttrs)(unref(sideOf)(entry.column), __props.offsets[entry.column.field])), toDisplayString(footerText(footerRow, entry.column)), 17, _hoisted_4$3);
1019
+ "data-type": unref(columnTypeOf$1)(entry.column),
1020
+ role: __props.roles ? "cell" : void 0
1021
+ }, { ref_for: true }, unref(pinAttrs)(unref(sideOf)(entry.column), __props.offsets[entry.column.field])), toDisplayString(footerText(footerRow, entry.column)), 17, _hoisted_4$4);
982
1022
  }), 128))], 8, _hoisted_2$4);
983
- }), 128))]);
1023
+ }), 128))], 8, _hoisted_1$8);
984
1024
  };
985
1025
  }
986
1026
  });
@@ -1041,15 +1081,15 @@ var _hoisted_3$3 = [
1041
1081
  "value",
1042
1082
  "readonly"
1043
1083
  ];
1044
- var _hoisted_4$2 = [
1084
+ var _hoisted_4$3 = [
1045
1085
  "aria-label",
1046
1086
  "value",
1047
1087
  "disabled"
1048
1088
  ];
1049
- var _hoisted_5 = { value: "" };
1050
- var _hoisted_6 = { value: "true" };
1051
- var _hoisted_7 = { value: "false" };
1052
- var _hoisted_8 = [
1089
+ var _hoisted_5$1 = { value: "" };
1090
+ var _hoisted_6$1 = { value: "true" };
1091
+ var _hoisted_7$1 = { value: "false" };
1092
+ var _hoisted_8$1 = [
1053
1093
  "type",
1054
1094
  "aria-label",
1055
1095
  "value",
@@ -1145,10 +1185,10 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
1145
1185
  disabled: unref(filters).multiOf(__props.column.field) > 0,
1146
1186
  onChange: _cache[4] || (_cache[4] = ($event) => pick($event))
1147
1187
  }, [
1148
- createElementVNode("option", _hoisted_5, toDisplayString(unref(labels)().boolAll), 1),
1149
- createElementVNode("option", _hoisted_6, toDisplayString(unref(labels)().boolTrue), 1),
1150
- createElementVNode("option", _hoisted_7, toDisplayString(unref(labels)().boolFalse), 1)
1151
- ], 40, _hoisted_4$2)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [_ctx.$slots["filter-datetime"] ? renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(datetimeProps())), void 0, void 0, 0) : (openBlock(), createElementBlock("input", {
1188
+ createElementVNode("option", _hoisted_5$1, toDisplayString(unref(labels)().boolAll), 1),
1189
+ createElementVNode("option", _hoisted_6$1, toDisplayString(unref(labels)().boolTrue), 1),
1190
+ createElementVNode("option", _hoisted_7$1, toDisplayString(unref(labels)().boolFalse), 1)
1191
+ ], 40, _hoisted_4$3)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [_ctx.$slots["filter-datetime"] ? renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(datetimeProps())), void 0, void 0, 0) : (openBlock(), createElementBlock("input", {
1152
1192
  key: 1,
1153
1193
  type: unref(filters).multiOf(__props.column.field) ? "text" : "date",
1154
1194
  class: "qt-filter-input",
@@ -1157,7 +1197,7 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
1157
1197
  readonly: unref(filters).multiOf(__props.column.field) > 0,
1158
1198
  onInput: _cache[5] || (_cache[5] = ($event) => unref(filters).setInput(__props.column.field, inputValue($event))),
1159
1199
  onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => unref(filters).apply(__props.column.field), ["enter"]))
1160
- }, null, 40, _hoisted_8))], 64)),
1200
+ }, null, 40, _hoisted_8$1))], 64)),
1161
1201
  __props.type !== "bool" ? renderSlot(_ctx.$slots, "filter-menu", normalizeProps(guardReactiveProps(menuProps())), void 0, void 0, 4) : createCommentVNode("", true),
1162
1202
  labelOf() ? (openBlock(), createElementBlock("small", _hoisted_9, toDisplayString(labelOf()), 1)) : createCommentVNode("", true)
1163
1203
  ]);
@@ -1232,8 +1272,11 @@ var styleSwap = () => {
1232
1272
  * between, and slot content that draws a block or a flex box counts with the
1233
1273
  * width its content needs, not the width its cell gives it. Only `fields`
1234
1274
  * when given; a column with no box (the table not displayed) is left out.
1275
+ * With `scrollBody` the data rows are in a table of their own, `body`
1276
+ * (C-101): it is laid out the same way, its `col` widths left out, and a
1277
+ * column takes the wider of its header cell and its body cells.
1235
1278
  */
1236
- var measureColumnWidths = (table, fields) => {
1279
+ var measureColumnWidths = (table, fields, body) => {
1237
1280
  const widths = {};
1238
1281
  if (!table?.tHead) return widths;
1239
1282
  const wanted = fields ? new Set(fields) : null;
@@ -1245,10 +1288,20 @@ var measureColumnWidths = (table, fields) => {
1245
1288
  swap.set(table, "min-width", "0");
1246
1289
  for (const th of headers) swap.set(th, "width", "auto");
1247
1290
  for (const part of Array.from(table.querySelectorAll(notCounted))) swap.set(part, "display", "none");
1291
+ const split = body && body !== table ? body : null;
1292
+ if (split) {
1293
+ swap.set(split, "table-layout", "auto");
1294
+ swap.set(split, "width", "max-content");
1295
+ swap.set(split, "min-width", "0");
1296
+ for (const col of Array.from(split.querySelectorAll(":scope > colgroup > col"))) swap.set(col, "width", "auto");
1297
+ for (const part of Array.from(split.querySelectorAll(":scope > tbody > tr:not([data-row-index])"))) swap.set(part, "display", "none");
1298
+ }
1299
+ const firstRow = split?.querySelector(":scope > tbody > tr[data-row-index]");
1248
1300
  for (const th of headers) {
1249
1301
  const field = th.dataset.field;
1250
1302
  if (field === void 0 || wanted && !wanted.has(field)) continue;
1251
- const width = th.getBoundingClientRect().width;
1303
+ const cell = firstRow?.querySelector(`:scope > td[data-field="${CSS.escape(field)}"]`);
1304
+ const width = Math.max(th.getBoundingClientRect().width, cell?.getBoundingClientRect().width ?? 0);
1252
1305
  if (width > 0) widths[field] = Math.ceil(width);
1253
1306
  }
1254
1307
  } finally {
@@ -1444,7 +1497,7 @@ var useColumnResize = (options) => {
1444
1497
  const scale = scaleOf(th, column);
1445
1498
  const from = scale.declared(drawn);
1446
1499
  const step = scale.declared(Math.round(drawn) + sign * (event.shiftKey ? 50 : 10));
1447
- const to = sign ? from + sign * Math.max(1, Math.abs(step - from)) : measureColumnWidths(th.closest("table"), [column.field])[column.field];
1500
+ const to = sign ? from + sign * Math.max(1, Math.abs(step - from)) : measureColumnWidths(th.closest("table"), [column.field], options.body())[column.field];
1448
1501
  if (to !== void 0) commit(column, from, to);
1449
1502
  }
1450
1503
  };
@@ -1538,7 +1591,7 @@ var _hoisted_3$2 = {
1538
1591
  viewBox: "0 0 16 16",
1539
1592
  "aria-hidden": "true"
1540
1593
  };
1541
- var _hoisted_4$1 = {
1594
+ var _hoisted_4$2 = {
1542
1595
  key: 2,
1543
1596
  class: "qt-sort-icon",
1544
1597
  width: "14",
@@ -1568,7 +1621,7 @@ var sort_button_default = /* @__PURE__ */ defineComponent({
1568
1621
  }, null, -1)])])) : __props.direction === "desc" ? (openBlock(), createElementBlock("svg", _hoisted_3$2, [..._cache[2] || (_cache[2] = [createElementVNode("path", {
1569
1622
  d: "M8 12.5L3.5 6.5H12.5L8 12.5Z",
1570
1623
  fill: "currentColor"
1571
- }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_4$1, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
1624
+ }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_4$2, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
1572
1625
  d: "M8 3L11.5 7H4.5L8 3Z",
1573
1626
  fill: "currentColor"
1574
1627
  }, null, -1), createElementVNode("path", {
@@ -1584,17 +1637,22 @@ var sort_button_default = /* @__PURE__ */ defineComponent({
1584
1637
  var ariaSort = (direction) => direction === "asc" ? "ascending" : direction === "desc" ? "descending" : void 0;
1585
1638
  //#endregion
1586
1639
  //#region src/parts/table-header.vue?vue&type=script&setup=true&lang.ts
1587
- var _hoisted_1$2 = [
1640
+ var _hoisted_1$2 = ["role"];
1641
+ var _hoisted_2$1 = ["role"];
1642
+ var _hoisted_3$1 = [
1588
1643
  "aria-label",
1589
1644
  "checked",
1590
1645
  "indeterminate"
1591
1646
  ];
1592
- var _hoisted_2$1 = [
1647
+ var _hoisted_4$1 = ["role"];
1648
+ var _hoisted_5 = ["role"];
1649
+ var _hoisted_6 = [
1593
1650
  "title",
1594
1651
  "aria-label",
1595
1652
  "disabled"
1596
1653
  ];
1597
- var _hoisted_3$1 = [
1654
+ var _hoisted_7 = [
1655
+ "role",
1598
1656
  "data-field",
1599
1657
  "data-type",
1600
1658
  "data-sort",
@@ -1602,7 +1660,7 @@ var _hoisted_3$1 = [
1602
1660
  "data-filtered",
1603
1661
  "aria-sort"
1604
1662
  ];
1605
- var _hoisted_4 = {
1663
+ var _hoisted_8 = {
1606
1664
  key: 3,
1607
1665
  class: "qt-title"
1608
1666
  };
@@ -1618,7 +1676,8 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1618
1676
  hasPinned: { type: Boolean },
1619
1677
  offsets: {},
1620
1678
  autoWidths: {},
1621
- slotNames: {}
1679
+ slotNames: {},
1680
+ roles: { type: Boolean }
1622
1681
  },
1623
1682
  setup(__props) {
1624
1683
  const props = __props;
@@ -1665,10 +1724,11 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1665
1724
  control: layout.controlOf(column.field)
1666
1725
  });
1667
1726
  return (_ctx, _cache) => {
1668
- return openBlock(), createElementBlock("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.utilities, (utility) => {
1727
+ return openBlock(), createElementBlock("tr", { role: __props.roles ? "row" : void 0 }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.utilities, (utility) => {
1669
1728
  return openBlock(), createElementBlock(Fragment, { key: utility }, [utility === "select" ? (openBlock(), createElementBlock("th", mergeProps({
1670
1729
  key: 0,
1671
- scope: "col"
1730
+ scope: "col",
1731
+ role: __props.roles ? "columnheader" : void 0
1672
1732
  }, { ref_for: true }, utilityAttrs(utility)), [createElementVNode("input", {
1673
1733
  type: "checkbox",
1674
1734
  class: "qt-select-all",
@@ -1676,12 +1736,13 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1676
1736
  checked: unref(selection).allSelected.value,
1677
1737
  indeterminate: unref(selection).someSelected.value,
1678
1738
  onChange: _cache[0] || (_cache[0] = ($event) => unref(selection).toggleAll($event.target.checked))
1679
- }, null, 40, _hoisted_1$2)], 16)) : !hostsClearAll(utility) ? (openBlock(), createElementBlock("td", mergeProps({
1739
+ }, null, 40, _hoisted_3$1)], 16, _hoisted_2$1)) : !hostsClearAll(utility) ? (openBlock(), createElementBlock("td", mergeProps({
1680
1740
  key: 1,
1681
- ref_for: true
1682
- }, utilityAttrs(utility)), null, 16)) : (openBlock(), createElementBlock("th", mergeProps({
1741
+ role: __props.roles ? "cell" : void 0
1742
+ }, { ref_for: true }, utilityAttrs(utility)), null, 16, _hoisted_4$1)) : (openBlock(), createElementBlock("th", mergeProps({
1683
1743
  key: 2,
1684
- scope: "col"
1744
+ scope: "col",
1745
+ role: __props.roles ? "columnheader" : void 0
1685
1746
  }, { ref_for: true }, utilityAttrs(utility)), [createElementVNode("button", {
1686
1747
  type: "button",
1687
1748
  class: "qt-clear-all-button",
@@ -1709,11 +1770,12 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1709
1770
  y1: "6",
1710
1771
  x2: "18",
1711
1772
  y2: "18"
1712
- })], -1)])], 8, _hoisted_2$1)], 16))], 64);
1773
+ })], -1)])], 8, _hoisted_6)], 16, _hoisted_5))], 64);
1713
1774
  }), 128)), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
1714
1775
  return openBlock(), createElementBlock("th", mergeProps({
1715
1776
  key: column.field,
1716
1777
  scope: "col",
1778
+ role: __props.roles ? "columnheader" : void 0,
1717
1779
  "data-field": column.field,
1718
1780
  "data-type": unref(columnTypeOf$1)(column),
1719
1781
  "data-sort": unref(sort).sortOf(column) ?? void 0,
@@ -1737,7 +1799,7 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1737
1799
  "column",
1738
1800
  "direction",
1739
1801
  "onClick"
1740
- ])) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(column.title), 1)),
1802
+ ])) : (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(column.title), 1)),
1741
1803
  hasFilter(column) ? (openBlock(), createBlock(filter_cell_default, {
1742
1804
  key: 4,
1743
1805
  column,
@@ -1760,8 +1822,8 @@ var table_header_default = /* @__PURE__ */ defineComponent({
1760
1822
  key: 5,
1761
1823
  column
1762
1824
  }, null, 8, ["column"])) : createCommentVNode("", true)
1763
- ], 16, _hoisted_3$1);
1764
- }), 128))]);
1825
+ ], 16, _hoisted_7);
1826
+ }), 128))], 8, _hoisted_1$2);
1765
1827
  };
1766
1828
  }
1767
1829
  });
@@ -1804,6 +1866,11 @@ var useHeaderGeometry = (options) => {
1804
1866
  * right-pinned one, by key, in pixels.
1805
1867
  */
1806
1868
  const offsets = shallowRef({});
1869
+ /**
1870
+ * The exact width of every header cell, in drawing order: the `col` widths
1871
+ * of the body and footer tables with `scrollBody` (C-101).
1872
+ */
1873
+ const columns = shallowRef([]);
1807
1874
  let observer = null;
1808
1875
  const headerCells = (table) => table.querySelectorAll(":scope > thead > tr > *");
1809
1876
  const measure = (table) => {
@@ -1812,11 +1879,13 @@ var useHeaderGeometry = (options) => {
1812
1879
  const next = {};
1813
1880
  const nextOffsets = {};
1814
1881
  const rights = [];
1882
+ const nextColumns = [];
1815
1883
  let left = 0;
1816
1884
  headerCells(table).forEach((cell, index) => {
1817
1885
  const drawn = cells[index];
1818
1886
  if (drawn) {
1819
1887
  const exact = cell.getBoundingClientRect().width;
1888
+ nextColumns.push(exact);
1820
1889
  next[drawn.key] = Math.round(exact);
1821
1890
  if (drawn.side === "left") {
1822
1891
  nextOffsets[drawn.key] = left;
@@ -1832,6 +1901,7 @@ var useHeaderGeometry = (options) => {
1832
1901
  }
1833
1902
  if (signature(next) !== signature(widths.value)) widths.value = next;
1834
1903
  if (signature(nextOffsets) !== signature(offsets.value)) offsets.value = nextOffsets;
1904
+ if (signature(nextColumns) !== signature(columns.value)) columns.value = nextColumns;
1835
1905
  };
1836
1906
  const observe = () => {
1837
1907
  observer?.disconnect();
@@ -1839,6 +1909,7 @@ var useHeaderGeometry = (options) => {
1839
1909
  const table = options.table.value;
1840
1910
  if (!table || !options.active() || typeof ResizeObserver === "undefined") {
1841
1911
  if (Object.keys(offsets.value).length > 0) offsets.value = {};
1912
+ if (columns.value.length > 0) columns.value = [];
1842
1913
  return;
1843
1914
  }
1844
1915
  const current = new ResizeObserver(() => {
@@ -1868,7 +1939,8 @@ var useHeaderGeometry = (options) => {
1868
1939
  return {
1869
1940
  widths,
1870
1941
  tableWidth,
1871
- offsets
1942
+ offsets,
1943
+ columns
1872
1944
  };
1873
1945
  };
1874
1946
  //#endregion
@@ -2067,7 +2139,7 @@ var useAutoWidth = (options) => {
2067
2139
  result = cloneQuery(query);
2068
2140
  }
2069
2141
  if (options.rows().length === 0) return;
2070
- const measured = measureColumnWidths(table, columns.map((column) => column.field));
2142
+ const measured = measureColumnWidths(table, columns.map((column) => column.field), options.body());
2071
2143
  if (Object.keys(measured).length === 0) {
2072
2144
  waiting = true;
2073
2145
  return;
@@ -2121,6 +2193,71 @@ var useAutoWidth = (options) => {
2121
2193
  return { widths };
2122
2194
  };
2123
2195
  //#endregion
2196
+ //#region src/scroll/use-scroll-body.ts
2197
+ var isDevelopment$1 = () => {
2198
+ try {
2199
+ return process.env.NODE_ENV !== "production";
2200
+ } catch {
2201
+ return true;
2202
+ }
2203
+ };
2204
+ /**
2205
+ * Header, body and footer of `scrollBody` scroll sideways together (C-101):
2206
+ * one passive `scroll` listener on each wrapper sets the `scrollLeft` of the
2207
+ * others to its own. A position written here is remembered, so the `scroll`
2208
+ * event it fires is not taken for one of the user's. The table writes no
2209
+ * style and no attribute to the wrappers. Off, nothing is listened to.
2210
+ */
2211
+ var useScrollBody = (options) => {
2212
+ let attached = [];
2213
+ /** The `scrollLeft` this table wrote to a wrapper, until its event. */
2214
+ const written = /* @__PURE__ */ new WeakMap();
2215
+ let warned = false;
2216
+ let clamped = false;
2217
+ /** Every wrapper but `source` to `left`, remembering what was written. */
2218
+ const follow = (source, left) => {
2219
+ for (const element of attached) if (element !== source && element.scrollLeft !== left) {
2220
+ element.scrollLeft = left;
2221
+ written.set(element, element.scrollLeft);
2222
+ if (!clamped && source === options.wrappers().body && left - element.scrollLeft >= 1 && isDevelopment$1()) {
2223
+ clamped = true;
2224
+ console.warn("[QueryTable] `scrollBody`: `.qt-table-head` or `.qt-table-foot` cannot scroll sideways as far as `.qt-table-body`, so its columns end shifted. Give it a vertical scrollbar as wide as that of the body (`overflow-y: scroll`; a transparent `scrollbar-color` hides it) (C-101).");
2225
+ }
2226
+ }
2227
+ };
2228
+ const onScroll = (event) => {
2229
+ const source = event.currentTarget;
2230
+ const left = source.scrollLeft;
2231
+ const echo = written.get(source);
2232
+ written.delete(source);
2233
+ if (echo !== left) follow(source, left);
2234
+ };
2235
+ const detach = () => {
2236
+ for (const element of attached) element.removeEventListener("scroll", onScroll);
2237
+ attached = [];
2238
+ };
2239
+ watch(() => options.enabled() ? options.wrappers() : null, (wrappers) => {
2240
+ detach();
2241
+ if (!wrappers) return;
2242
+ attached = [
2243
+ wrappers.head,
2244
+ wrappers.body,
2245
+ wrappers.foot
2246
+ ].filter((element) => element !== null);
2247
+ for (const element of attached) element.addEventListener("scroll", onScroll, { passive: true });
2248
+ if (wrappers.body) follow(wrappers.body, wrappers.body.scrollLeft);
2249
+ const table = options.bodyTable();
2250
+ if (table && !warned && isDevelopment$1() && getComputedStyle(table).tableLayout !== "fixed") {
2251
+ warned = true;
2252
+ console.warn("[QueryTable] `scrollBody` with `table-layout: auto` on the body table: its columns follow its rows, not the header. Set `table-layout: fixed` (C-101).");
2253
+ }
2254
+ }, {
2255
+ flush: "post",
2256
+ immediate: true
2257
+ });
2258
+ onBeforeUnmount(detach);
2259
+ };
2260
+ //#endregion
2124
2261
  //#region src/use-query-table.ts
2125
2262
  /** The TanStack features of a Query Table, the two plugins included. */
2126
2263
  var features = tableFeatures({
@@ -3267,8 +3404,12 @@ var _hoisted_1 = [
3267
3404
  "data-loading",
3268
3405
  "aria-busy"
3269
3406
  ];
3270
- var _hoisted_2 = { class: "qt-table-responsive" };
3271
- var _hoisted_3 = ["aria-rowcount"];
3407
+ var _hoisted_2 = ["role", "aria-rowcount"];
3408
+ var _hoisted_3 = {
3409
+ class: "qt-table",
3410
+ role: "presentation"
3411
+ };
3412
+ var _hoisted_4 = ["aria-rowcount"];
3272
3413
  //#endregion
3273
3414
  //#region src/query-table.vue
3274
3415
  var query_table_default = /* @__PURE__ */ defineComponent({
@@ -3336,6 +3477,10 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3336
3477
  type: [Boolean, Object],
3337
3478
  default: false
3338
3479
  },
3480
+ scrollBody: {
3481
+ type: Boolean,
3482
+ default: false
3483
+ },
3339
3484
  infinite: {
3340
3485
  type: [Boolean, Object],
3341
3486
  default: false
@@ -3413,8 +3558,17 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3413
3558
  const columnCount = computed(() => entries.value.length + utilityCount.value);
3414
3559
  /** Utilities are pinned only with a left-pinned column (C-46, C-71). */
3415
3560
  const utilitySide = () => hasPinned.value ? "left" : false;
3561
+ /** The table of the header: with `scrollBody` the first of three (C-101). */
3416
3562
  const tableEl = shallowRef(null);
3417
- const { widths, tableWidth, offsets } = useHeaderGeometry({
3563
+ const bodyTableEl = shallowRef(null);
3564
+ const headWrap = shallowRef(null);
3565
+ const bodyWrap = shallowRef(null);
3566
+ const footWrap = shallowRef(null);
3567
+ /** The table of the body rows. */
3568
+ const bodyTable = computed(() => bodyTableEl.value ?? tableEl.value);
3569
+ /** With `scrollBody`, the body table to measure apart from the header. */
3570
+ const splitBody = () => props.scrollBody ? bodyTableEl.value : null;
3571
+ const { widths, tableWidth, offsets, columns: cellWidths } = useHeaderGeometry({
3418
3572
  table: tableEl,
3419
3573
  cells: () => [...utilities.value.map((utility) => ({
3420
3574
  key: utilityKey(utility),
@@ -3423,12 +3577,24 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3423
3577
  key: column.field,
3424
3578
  side: sideOf(column)
3425
3579
  }))],
3426
- active: () => entries.value.some((entry) => sideOf(entry.column) !== false) || props.resizable && entries.value.some((entry) => entry.column.resizable !== false)
3580
+ active: () => props.scrollBody || entries.value.some((entry) => sideOf(entry.column) !== false) || props.resizable && entries.value.some((entry) => entry.column.resizable !== false)
3581
+ });
3582
+ /** The `col` widths of the body and footer tables (C-101), in pixels. */
3583
+ const colWidths = computed(() => Array.from({ length: columnCount.value }, (_, i) => cellWidths.value[i]));
3584
+ useScrollBody({
3585
+ enabled: () => props.scrollBody,
3586
+ wrappers: () => ({
3587
+ head: headWrap.value,
3588
+ body: bodyWrap.value,
3589
+ foot: footWrap.value
3590
+ }),
3591
+ bodyTable: () => bodyTableEl.value
3427
3592
  });
3428
3593
  const resize = useColumnResize({
3429
3594
  resizable: () => props.resizable,
3430
3595
  measuredWidth: (field) => widths.value[field],
3431
3596
  tableWidth: () => tableWidth.value,
3597
+ body: splitBody,
3432
3598
  emit: (payload) => {
3433
3599
  emit("columnResize", payload);
3434
3600
  const next = applyWidth(props.columns, payload.field, `${payload.width}px`);
@@ -3439,6 +3605,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3439
3605
  enabled: () => props.autoWidth,
3440
3606
  max: () => props.autoWidthMax,
3441
3607
  table: tableEl,
3608
+ body: splitBody,
3442
3609
  columns: () => visibleColumns.value,
3443
3610
  rows: () => props.rows,
3444
3611
  query: () => props.query,
@@ -3446,7 +3613,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3446
3613
  });
3447
3614
  const rowWindow = useRowWindow({
3448
3615
  virtual: () => props.virtual,
3449
- table: tableEl,
3616
+ table: bodyTable,
3450
3617
  bodyRows: () => state.rowPinning.rows.value,
3451
3618
  keyOf: expansion.keyOf,
3452
3619
  isExpanded: expansion.isExpanded
@@ -3460,7 +3627,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3460
3627
  cursors: () => props.cursors,
3461
3628
  loading: () => props.loading,
3462
3629
  nextPage: () => paginationProps.value.nextPage(),
3463
- table: tableEl,
3630
+ table: bodyTable,
3464
3631
  virtual: rowWindow.enabled,
3465
3632
  window: () => rowWindow.ready.value ? {
3466
3633
  end: rowWindow.range.value.end,
@@ -3491,7 +3658,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3491
3658
  loading: () => props.loading,
3492
3659
  fields: () => entries.value.map((entry) => entry.column.field),
3493
3660
  rowKey: () => props.rowKey,
3494
- table: tableEl
3661
+ table: bodyTable
3495
3662
  });
3496
3663
  const reorder = useColumnReorder({
3497
3664
  reorderable: () => props.reorderable,
@@ -3532,7 +3699,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3532
3699
  },
3533
3700
  scrollToIndex: rowWindow.scrollToIndex,
3534
3701
  loadMore: infinite.loadMore,
3535
- measureColumnWidths: (fields) => measureColumnWidths(tableEl.value, fields)
3702
+ measureColumnWidths: (fields) => measureColumnWidths(tableEl.value, fields, splitBody())
3536
3703
  });
3537
3704
  return (_ctx, _cache) => {
3538
3705
  return openBlock(), createElementBlock("div", {
@@ -3542,13 +3709,156 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3542
3709
  "aria-busy": __props.loading ? "true" : void 0
3543
3710
  }, [
3544
3711
  renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbarProps()))),
3545
- createElementVNode("div", _hoisted_2, [createElementVNode("table", {
3712
+ createElementVNode("div", {
3713
+ class: "qt-table-responsive",
3714
+ role: __props.scrollBody ? "table" : void 0,
3715
+ "aria-rowcount": __props.scrollBody ? ariaRowCount.value : void 0
3716
+ }, [__props.scrollBody ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3717
+ createElementVNode("div", {
3718
+ ref_key: "headWrap",
3719
+ ref: headWrap,
3720
+ class: "qt-table-head"
3721
+ }, [createElementVNode("table", {
3722
+ ref_key: "tableEl",
3723
+ ref: tableEl,
3724
+ class: "qt-table",
3725
+ role: "presentation"
3726
+ }, [createElementVNode("thead", {
3727
+ role: "rowgroup",
3728
+ onContextmenu: _cache[0] || (_cache[0] = (...args) => unref(onHeaderContextMenu) && unref(onHeaderContextMenu)(...args))
3729
+ }, [createVNode(table_header_default, {
3730
+ columns: visibleColumns.value,
3731
+ query: __props.query,
3732
+ filterable: __props.filterable,
3733
+ utilities: utilities.value,
3734
+ "has-pinned": unref(hasPinned),
3735
+ offsets: unref(offsets),
3736
+ "auto-widths": unref(autoWidth).widths.value,
3737
+ "slot-names": headerSlotNames(),
3738
+ "aria-rowindex": unref(rowWindow).enabled() ? 1 : void 0,
3739
+ roles: ""
3740
+ }, {
3741
+ header: withCtx((p) => [renderSlot(_ctx.$slots, `header-${p.column.field}`, normalizeProps(guardReactiveProps(p)))]),
3742
+ "filter-datetime": withCtx((p) => [renderSlot(_ctx.$slots, "filter-datetime", normalizeProps(guardReactiveProps(p)))]),
3743
+ "filter-menu": withCtx((p) => [renderSlot(_ctx.$slots, "filter-menu", normalizeProps(guardReactiveProps(p)))]),
3744
+ _: 3
3745
+ }, 8, [
3746
+ "columns",
3747
+ "query",
3748
+ "filterable",
3749
+ "utilities",
3750
+ "has-pinned",
3751
+ "offsets",
3752
+ "auto-widths",
3753
+ "slot-names",
3754
+ "aria-rowindex"
3755
+ ])], 32)], 512)], 512),
3756
+ createElementVNode("div", {
3757
+ ref_key: "bodyWrap",
3758
+ ref: bodyWrap,
3759
+ class: "qt-table-body"
3760
+ }, [createElementVNode("table", {
3761
+ ref_key: "bodyTableEl",
3762
+ ref: bodyTableEl,
3763
+ class: "qt-table",
3764
+ role: "presentation"
3765
+ }, [createElementVNode("colgroup", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(colWidths.value, (width, i) => {
3766
+ return openBlock(), createElementBlock("col", {
3767
+ key: i,
3768
+ style: normalizeStyle(width === void 0 ? void 0 : { width: `${width}px` })
3769
+ }, null, 4);
3770
+ }), 128))]), createVNode(table_body_default, {
3771
+ rows: __props.rows,
3772
+ "body-rows": unref(rowWindow).drawn.value,
3773
+ "pin-row": unref(state).rowPinning.pin,
3774
+ loading: __props.loading,
3775
+ entries: unref(entries),
3776
+ "column-count": columnCount.value,
3777
+ "has-subtable": __props.hasSubtable,
3778
+ "has-right-panel": __props.hasRightPanel,
3779
+ "has-selection": unref(rowSelection).enabled.value,
3780
+ "is-selected": unref(rowSelection).isSelected,
3781
+ "toggle-selected": unref(rowSelection).toggle,
3782
+ "has-pinned": unref(hasPinned),
3783
+ offsets: unref(offsets),
3784
+ "key-of": unref(expansion).keyOf,
3785
+ "can-expand": unref(expansion).canExpand,
3786
+ "is-expanded": unref(expansion).isExpanded,
3787
+ toggle: unref(expansion).toggle,
3788
+ "row-kind": __props.rowKind,
3789
+ labels: labels.value,
3790
+ "has-context-menu-listener": hasContextMenuListener,
3791
+ "load-more": loadMoreProps.value,
3792
+ flash: unref(flashView),
3793
+ roles: "",
3794
+ onRowRightPanelClick: _cache[1] || (_cache[1] = (row) => emit("rowRightPanelClick", row)),
3795
+ onCellContextMenu: _cache[2] || (_cache[2] = (payload) => emit("cellContextMenu", payload)),
3796
+ onFocusin: unref(rowWindow).onFocusIn,
3797
+ onFocusout: unref(rowWindow).onFocusOut
3798
+ }, createSlots({ _: 2 }, [renderList(bodySlotNames(), (name) => {
3799
+ return {
3800
+ name,
3801
+ fn: withCtx((p) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(p)))])
3802
+ };
3803
+ })]), 1032, [
3804
+ "rows",
3805
+ "body-rows",
3806
+ "pin-row",
3807
+ "loading",
3808
+ "entries",
3809
+ "column-count",
3810
+ "has-subtable",
3811
+ "has-right-panel",
3812
+ "has-selection",
3813
+ "is-selected",
3814
+ "toggle-selected",
3815
+ "has-pinned",
3816
+ "offsets",
3817
+ "key-of",
3818
+ "can-expand",
3819
+ "is-expanded",
3820
+ "toggle",
3821
+ "row-kind",
3822
+ "labels",
3823
+ "load-more",
3824
+ "flash",
3825
+ "onFocusin",
3826
+ "onFocusout"
3827
+ ])], 512)], 512),
3828
+ __props.footerRows.length > 0 ? (openBlock(), createElementBlock("div", {
3829
+ key: 0,
3830
+ ref_key: "footWrap",
3831
+ ref: footWrap,
3832
+ class: "qt-table-foot"
3833
+ }, [createElementVNode("table", _hoisted_3, [createElementVNode("colgroup", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(colWidths.value, (width, i) => {
3834
+ return openBlock(), createElementBlock("col", {
3835
+ key: i,
3836
+ style: normalizeStyle(width === void 0 ? void 0 : { width: `${width}px` })
3837
+ }, null, 4);
3838
+ }), 128))]), createVNode(table_footer_default, {
3839
+ "footer-rows": __props.footerRows,
3840
+ entries: unref(entries),
3841
+ "utility-count": utilityCount.value,
3842
+ "has-pinned": unref(hasPinned),
3843
+ offsets: unref(offsets),
3844
+ "first-row-index": footerRowIndex.value,
3845
+ roles: ""
3846
+ }, null, 8, [
3847
+ "footer-rows",
3848
+ "entries",
3849
+ "utility-count",
3850
+ "has-pinned",
3851
+ "offsets",
3852
+ "first-row-index"
3853
+ ])])], 512)) : createCommentVNode("", true)
3854
+ ], 64)) : (openBlock(), createElementBlock("table", {
3855
+ key: 1,
3546
3856
  ref_key: "tableEl",
3547
3857
  ref: tableEl,
3548
3858
  class: "qt-table",
3549
3859
  "aria-rowcount": ariaRowCount.value
3550
3860
  }, [
3551
- createElementVNode("thead", { onContextmenu: _cache[0] || (_cache[0] = (...args) => unref(onHeaderContextMenu) && unref(onHeaderContextMenu)(...args)) }, [createVNode(table_header_default, {
3861
+ createElementVNode("thead", { onContextmenu: _cache[3] || (_cache[3] = (...args) => unref(onHeaderContextMenu) && unref(onHeaderContextMenu)(...args)) }, [createVNode(table_header_default, {
3552
3862
  columns: visibleColumns.value,
3553
3863
  query: __props.query,
3554
3864
  filterable: __props.filterable,
@@ -3597,8 +3907,8 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3597
3907
  "has-context-menu-listener": hasContextMenuListener,
3598
3908
  "load-more": loadMoreProps.value,
3599
3909
  flash: unref(flashView),
3600
- onRowRightPanelClick: _cache[1] || (_cache[1] = (row) => emit("rowRightPanelClick", row)),
3601
- onCellContextMenu: _cache[2] || (_cache[2] = (payload) => emit("cellContextMenu", payload)),
3910
+ onRowRightPanelClick: _cache[4] || (_cache[4] = (row) => emit("rowRightPanelClick", row)),
3911
+ onCellContextMenu: _cache[5] || (_cache[5] = (payload) => emit("cellContextMenu", payload)),
3602
3912
  onFocusin: unref(rowWindow).onFocusIn,
3603
3913
  onFocusout: unref(rowWindow).onFocusOut
3604
3914
  }, createSlots({ _: 2 }, [renderList(bodySlotNames(), (name) => {
@@ -3647,7 +3957,7 @@ var query_table_default = /* @__PURE__ */ defineComponent({
3647
3957
  "offsets",
3648
3958
  "first-row-index"
3649
3959
  ])) : createCommentVNode("", true)
3650
- ], 8, _hoisted_3)]),
3960
+ ], 8, _hoisted_4))], 8, _hoisted_2),
3651
3961
  showPagination.value ? (openBlock(), createBlock(table_pagination_default, {
3652
3962
  key: 0,
3653
3963
  "pagination-props": unref(paginationProps)