@atscript/vue-table 0.1.106 → 0.1.107

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.
Files changed (45) hide show
  1. package/dist/{as-filter-dialog-DAvF5KI7.cjs → as-filter-dialog-BBMHtQRx.cjs} +2 -2
  2. package/dist/{as-filter-dialog-QjVypqE9.mjs → as-filter-dialog-BFy5tg8o.mjs} +2 -2
  3. package/dist/as-filter-dialog.cjs +1 -1
  4. package/dist/as-filter-dialog.mjs +1 -1
  5. package/dist/{as-filter-field-c0T27ONN.cjs → as-filter-field-BRSNhFa5.cjs} +1 -1
  6. package/dist/{as-filter-field-BR32vGGD.mjs → as-filter-field-DiSwUOJG.mjs} +1 -1
  7. package/dist/as-filter-field.cjs +1 -1
  8. package/dist/as-filter-field.mjs +1 -1
  9. package/dist/{as-filters-DhJy2qGo.cjs → as-filters-B82jw5f5.cjs} +1 -1
  10. package/dist/{as-filters-5Qyru0V1.mjs → as-filters-N95wOVF4.mjs} +1 -1
  11. package/dist/as-filters.cjs +1 -1
  12. package/dist/as-filters.mjs +1 -1
  13. package/dist/{as-table-B7RnEB9N.mjs → as-table-Bo2dAWTD.mjs} +8 -1
  14. package/dist/{as-table-BqIeLNSt.cjs → as-table-MKVsJZxT.cjs} +8 -1
  15. package/dist/as-table-actions.d.cts +1 -1
  16. package/dist/as-table-actions.d.mts +1 -1
  17. package/dist/{as-table-actions.vue-33oeDXOg.d.cts → as-table-actions.vue-CCCICVBr.d.cts} +1 -1
  18. package/dist/{as-table-actions.vue-DMf6-R5o.d.mts → as-table-actions.vue-l3DnLVxA.d.mts} +1 -1
  19. package/dist/{as-table-base-ZW7lQ-Id.mjs → as-table-base-BxruWtW2.mjs} +22 -5
  20. package/dist/{as-table-base-Bx9cxbk4.cjs → as-table-base-D6VP4rrr.cjs} +22 -5
  21. package/dist/as-table-root.d.cts +1 -1
  22. package/dist/as-table-root.d.mts +1 -1
  23. package/dist/{as-table-root.vue-B52eHZRL.d.mts → as-table-root.vue-BjeThuub.d.mts} +4 -4
  24. package/dist/{as-table-root.vue-Cmk2Altf.d.cts → as-table-root.vue-BukHIoYu.d.cts} +4 -4
  25. package/dist/{as-table-status-Cs4G2sK3.mjs → as-table-status-4OaguC5n.mjs} +77 -4
  26. package/dist/{as-table-status-Bunm0FTz.cjs → as-table-status-Diyy3DFB.cjs} +82 -3
  27. package/dist/as-table.cjs +1 -1
  28. package/dist/as-table.d.cts +1 -1
  29. package/dist/as-table.d.mts +1 -1
  30. package/dist/as-table.mjs +1 -1
  31. package/dist/{as-table.vue-CBrxpL4X.d.cts → as-table.vue-CDPbZQRG.d.cts} +12 -4
  32. package/dist/{as-table.vue-WF12BUAO.d.mts → as-table.vue-DaVtNFIe.d.mts} +12 -4
  33. package/dist/{as-window-table-CqPCI_jD.mjs → as-window-table-BUrMxrbr.mjs} +137 -111
  34. package/dist/{as-window-table-C8eJc_FV.cjs → as-window-table-DtnaCKyR.cjs} +137 -111
  35. package/dist/as-window-table.cjs +1 -1
  36. package/dist/as-window-table.d.cts +1 -1
  37. package/dist/as-window-table.d.mts +1 -1
  38. package/dist/as-window-table.mjs +1 -1
  39. package/dist/{as-window-table.vue-Cs5RHe_j.d.cts → as-window-table.vue-DvzoPu-B.d.cts} +12 -4
  40. package/dist/{as-window-table.vue-BJExjL2G.d.mts → as-window-table.vue-Gs52IsYw.d.mts} +12 -4
  41. package/dist/index.cjs +5 -5
  42. package/dist/index.d.cts +4 -4
  43. package/dist/index.d.mts +4 -4
  44. package/dist/index.mjs +5 -5
  45. package/package.json +4 -4
@@ -5,8 +5,8 @@ const require_use_table_component = require("./use-table-component-Bs1T8Mk3.cjs"
5
5
  const require_as_config_dialog = require("./as-config-dialog-6QNcUtFs.cjs");
6
6
  const require_use_seed_on_open = require("./use-seed-on-open-Dg9I89fU.cjs");
7
7
  const require_as_filter_input = require("./as-filter-input-DJu2k9gO.cjs");
8
- const require_as_window_table = require("./as-window-table-C8eJc_FV.cjs");
9
- const require_as_filters = require("./as-filters-DhJy2qGo.cjs");
8
+ const require_as_window_table = require("./as-window-table-DtnaCKyR.cjs");
9
+ const require_as_filters = require("./as-filters-B82jw5f5.cjs");
10
10
  let _atscript_ui = require("@atscript/ui");
11
11
  let vue = require("vue");
12
12
  let _atscript_ui_table = require("@atscript/ui-table");
@@ -5,8 +5,8 @@ import { t as useTableComponent } from "./use-table-component-D1Ea4qv_.mjs";
5
5
  import { n as useDialogTabKeyboard, t as as_config_dialog_default } from "./as-config-dialog-mz5oML3g.mjs";
6
6
  import { t as useSeedOnOpen } from "./use-seed-on-open-DO3A1kIb.mjs";
7
7
  import { t as as_filter_input_default } from "./as-filter-input-BM23TNeh.mjs";
8
- import { t as as_window_table_default } from "./as-window-table-CqPCI_jD.mjs";
9
- import { t as as_filters_default } from "./as-filters-5Qyru0V1.mjs";
8
+ import { t as as_window_table_default } from "./as-window-table-BUrMxrbr.mjs";
9
+ import { t as as_filters_default } from "./as-filters-N95wOVF4.mjs";
10
10
  import { resolveValueHelp, valueHelpDictPaths } from "@atscript/ui";
11
11
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, resolveDynamicComponent, shallowRef, toDisplayString, unref, useModel, watch, withCtx } from "vue";
12
12
  import { columnFilterType, conditionLabel, conditionsForType, dateShortcuts, defaultCondition, filledFilterCount, formatFilterCondition, isFilled, isSimpleEq, sameColumnSet } from "@atscript/ui-table";
@@ -1,2 +1,2 @@
1
- const require_as_filter_dialog = require("./as-filter-dialog-DAvF5KI7.cjs");
1
+ const require_as_filter_dialog = require("./as-filter-dialog-BBMHtQRx.cjs");
2
2
  module.exports = require_as_filter_dialog.as_filter_dialog_default;
@@ -1,2 +1,2 @@
1
- import { t as as_filter_dialog_default } from "./as-filter-dialog-QjVypqE9.mjs";
1
+ import { t as as_filter_dialog_default } from "./as-filter-dialog-BFy5tg8o.mjs";
2
2
  export { as_filter_dialog_default as default };
@@ -1,6 +1,6 @@
1
1
  const require_use_table_state = require("./use-table-state-CmTX31G4.cjs");
2
2
  const require_use_table = require("./use-table-w7Bpuk95.cjs");
3
- const require_as_table_base = require("./as-table-base-Bx9cxbk4.cjs");
3
+ const require_as_table_base = require("./as-table-base-D6VP4rrr.cjs");
4
4
  let _atscript_ui = require("@atscript/ui");
5
5
  let vue = require("vue");
6
6
  let _atscript_ui_table = require("@atscript/ui-table");
@@ -1,6 +1,6 @@
1
1
  import { a as useTableContext } from "./use-table-state-C0m71e4n.mjs";
2
2
  import { n as useTable } from "./use-table-BDkSpj7h.mjs";
3
- import { t as as_table_base_default } from "./as-table-base-ZW7lQ-Id.mjs";
3
+ import { t as as_table_base_default } from "./as-table-base-BxruWtW2.mjs";
4
4
  import { ValueHelpClient, getMetaEntry, resolveValueHelp, valueHelpDictPaths } from "@atscript/ui";
5
5
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, onBeforeUnmount, openBlock, ref, renderList, shallowRef, toDisplayString, unref, useId, watch, withCtx, withKeys, withModifiers } from "vue";
6
6
  import { arraysEqual, columnFilterType, debounce, formatFilterCondition, isFilled, isSimpleEq, parseFilterInput } from "@atscript/ui-table";
@@ -1,2 +1,2 @@
1
- const require_as_filter_field = require("./as-filter-field-c0T27ONN.cjs");
1
+ const require_as_filter_field = require("./as-filter-field-BRSNhFa5.cjs");
2
2
  module.exports = require_as_filter_field.as_filter_field_default;
@@ -1,2 +1,2 @@
1
- import { t as as_filter_field_default } from "./as-filter-field-BR32vGGD.mjs";
1
+ import { t as as_filter_field_default } from "./as-filter-field-DiSwUOJG.mjs";
2
2
  export { as_filter_field_default as default };
@@ -1,6 +1,6 @@
1
1
  const require_use_table_state = require("./use-table-state-CmTX31G4.cjs");
2
2
  const require_use_table_component = require("./use-table-component-Bs1T8Mk3.cjs");
3
- const require_as_filter_field = require("./as-filter-field-c0T27ONN.cjs");
3
+ const require_as_filter_field = require("./as-filter-field-BRSNhFa5.cjs");
4
4
  let vue = require("vue");
5
5
  //#endregion
6
6
  //#region src/components/as-filters.vue
@@ -1,6 +1,6 @@
1
1
  import { a as useTableContext } from "./use-table-state-C0m71e4n.mjs";
2
2
  import { t as useTableComponent } from "./use-table-component-D1Ea4qv_.mjs";
3
- import { t as as_filter_field_default } from "./as-filter-field-BR32vGGD.mjs";
3
+ import { t as as_filter_field_default } from "./as-filter-field-DiSwUOJG.mjs";
4
4
  import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref } from "vue";
5
5
  //#endregion
6
6
  //#region src/components/as-filters.vue
@@ -1,2 +1,2 @@
1
- const require_as_filters = require("./as-filters-DhJy2qGo.cjs");
1
+ const require_as_filters = require("./as-filters-B82jw5f5.cjs");
2
2
  module.exports = require_as_filters.as_filters_default;
@@ -1,2 +1,2 @@
1
- import { t as as_filters_default } from "./as-filters-5Qyru0V1.mjs";
1
+ import { t as as_filters_default } from "./as-filters-N95wOVF4.mjs";
2
2
  export { as_filters_default as default };
@@ -2,7 +2,7 @@ import { _ as ROW_ACTIONS_TYPE, a as useTableContext, g as ROW_ACTIONS_PATH, i a
2
2
  import { t as useSelectModeReset } from "./use-table-selection-C84z4OZy.mjs";
3
3
  import { t as useHasEmitListener } from "./use-has-emit-listener-BTMDIv2e.mjs";
4
4
  import { t as useTableColumnHandlers } from "./use-table-column-handlers-CpiiIniD.mjs";
5
- import { t as as_table_base_default } from "./as-table-base-ZW7lQ-Id.mjs";
5
+ import { t as as_table_base_default } from "./as-table-base-BxruWtW2.mjs";
6
6
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, renderSlot, unref, watch, withCtx } from "vue";
7
7
  import { rowsToPks } from "@atscript/ui-table";
8
8
  //#region src/components/as-table.vue?vue&type=script&setup=true&lang.ts
@@ -71,6 +71,11 @@ var as_table_default = /* @__PURE__ */ defineComponent({
71
71
  type: [String, Boolean],
72
72
  required: false,
73
73
  default: false
74
+ },
75
+ headless: {
76
+ type: Boolean,
77
+ required: false,
78
+ default: false
74
79
  }
75
80
  },
76
81
  emits: [
@@ -139,6 +144,7 @@ var as_table_default = /* @__PURE__ */ defineComponent({
139
144
  "query-error": unref(state).queryError.value,
140
145
  "on-retry": unref(state).query,
141
146
  "sticky-header": __props.stickyHeader,
147
+ headless: __props.headless,
142
148
  "virtual-row-height": __props.virtualRowHeight,
143
149
  "virtual-overscan": __props.virtualOverscan,
144
150
  filters: unref(state).filters.value,
@@ -176,6 +182,7 @@ var as_table_default = /* @__PURE__ */ defineComponent({
176
182
  "query-error",
177
183
  "on-retry",
178
184
  "sticky-header",
185
+ "headless",
179
186
  "virtual-row-height",
180
187
  "virtual-overscan",
181
188
  "filters",
@@ -2,7 +2,7 @@ const require_use_table_state = require("./use-table-state-CmTX31G4.cjs");
2
2
  const require_use_table_selection = require("./use-table-selection-Cmiu1h4S.cjs");
3
3
  const require_use_has_emit_listener = require("./use-has-emit-listener-hhOH8CBI.cjs");
4
4
  const require_use_table_column_handlers = require("./use-table-column-handlers-ehreEzcx.cjs");
5
- const require_as_table_base = require("./as-table-base-Bx9cxbk4.cjs");
5
+ const require_as_table_base = require("./as-table-base-D6VP4rrr.cjs");
6
6
  let vue = require("vue");
7
7
  let _atscript_ui_table = require("@atscript/ui-table");
8
8
  //#region src/components/as-table.vue?vue&type=script&setup=true&lang.ts
@@ -71,6 +71,11 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
71
71
  type: [String, Boolean],
72
72
  required: false,
73
73
  default: false
74
+ },
75
+ headless: {
76
+ type: Boolean,
77
+ required: false,
78
+ default: false
74
79
  }
75
80
  },
76
81
  emits: [
@@ -139,6 +144,7 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
139
144
  "query-error": (0, vue.unref)(state).queryError.value,
140
145
  "on-retry": (0, vue.unref)(state).query,
141
146
  "sticky-header": __props.stickyHeader,
147
+ headless: __props.headless,
142
148
  "virtual-row-height": __props.virtualRowHeight,
143
149
  "virtual-overscan": __props.virtualOverscan,
144
150
  filters: (0, vue.unref)(state).filters.value,
@@ -176,6 +182,7 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
176
182
  "query-error",
177
183
  "on-retry",
178
184
  "sticky-header",
185
+ "headless",
179
186
  "virtual-row-height",
180
187
  "virtual-overscan",
181
188
  "filters",
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-actions.vue-33oeDXOg.cjs";
1
+ import { t as _default } from "./as-table-actions.vue-CCCICVBr.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-actions.vue-DMf6-R5o.mjs";
1
+ import { t as _default } from "./as-table-actions.vue-l3DnLVxA.mjs";
2
2
  export { _default as default };
@@ -18,7 +18,7 @@ declare var __VLS_1: {
18
18
  defaultAction: TVueTableActionInfo | undefined;
19
19
  otherActions: TVueTableActionInfo[];
20
20
  trailingRowActions: TVueTableActionInfo[];
21
- level: "table" | "rows" | "row";
21
+ level: "row" | "rows" | "table";
22
22
  ids: Record<string, unknown>[];
23
23
  invoke: typeof invokeWith;
24
24
  }, __VLS_3: {
@@ -18,7 +18,7 @@ declare var __VLS_1: {
18
18
  defaultAction: TVueTableActionInfo | undefined;
19
19
  otherActions: TVueTableActionInfo[];
20
20
  trailingRowActions: TVueTableActionInfo[];
21
- level: "table" | "rows" | "row";
21
+ level: "row" | "rows" | "table";
22
22
  ids: Record<string, unknown>[];
23
23
  invoke: typeof invokeWith;
24
24
  }, __VLS_3: {
@@ -1,6 +1,6 @@
1
1
  import { o as useTableContextOptional } from "./use-table-state-C0m71e4n.mjs";
2
2
  import { t as getCellValue } from "./get-cell-value-C8LLc_Rr.mjs";
3
- import { a as useCellResolver, i as useCellComponents, n as as_table_header_default, t as as_table_status_default } from "./as-table-status-Cs4G2sK3.mjs";
3
+ import { a as useCellComponents, n as as_table_header_default, o as useCellResolver, r as as_table_colgroup_default, t as as_table_status_default } from "./as-table-status-4OaguC5n.mjs";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, watch, withCtx } from "vue";
5
5
  import { DEFAULT_ROW_HEIGHT_PX, filledFilterCount } from "@atscript/ui-table";
6
6
  import { useParentElement, useResizeObserver } from "@vueuse/core";
@@ -284,6 +284,11 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
284
284
  type: Object,
285
285
  required: false,
286
286
  default: () => ({})
287
+ },
288
+ headless: {
289
+ type: Boolean,
290
+ required: false,
291
+ default: false
287
292
  }
288
293
  },
289
294
  emits: [
@@ -445,7 +450,19 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
445
450
  "aria-rowcount": ariaRowCount.value,
446
451
  "aria-multiselectable": isStandalone.value && __props.select === "multi" ? "true" : void 0
447
452
  }, [
448
- createVNode(as_table_header_default, {
453
+ createVNode(as_table_colgroup_default, {
454
+ columns: __props.columns,
455
+ "column-widths": __props.columnWidths,
456
+ "has-select": hasValue.value,
457
+ "with-filler": __props.stretch
458
+ }, null, 8, [
459
+ "columns",
460
+ "column-widths",
461
+ "has-select",
462
+ "with-filler"
463
+ ]),
464
+ !__props.headless ? (openBlock(), createBlock(as_table_header_default, {
465
+ key: 0,
449
466
  columns: __props.columns,
450
467
  sorters: __props.sorters,
451
468
  filters: __props.filters,
@@ -485,10 +502,10 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
485
502
  "select-all-state",
486
503
  "with-filler",
487
504
  "aria-rowindex"
488
- ]),
505
+ ])) : createCommentVNode("v-if", true),
489
506
  createCommentVNode(" Combobox / listbox branches: rows render as Reka items. "),
490
507
  isRekaWrapped.value && !__props.queryError ? (openBlock(), createBlock(as_table_virtualizer_default, {
491
- key: 0,
508
+ key: 1,
492
509
  options: __props.rows,
493
510
  "estimate-size": __props.virtualRowHeight,
494
511
  overscan: __props.virtualOverscan,
@@ -551,7 +568,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
551
568
  "estimate-size",
552
569
  "overscan",
553
570
  "bypass"
554
- ])) : isStandalone.value && !__props.queryError ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Standalone branch — plain rows + custom keyboard nav, ARIA grid. "), createVNode(as_table_virtualizer_default, {
571
+ ])) : isStandalone.value && !__props.queryError ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Standalone branch — plain rows + custom keyboard nav, ARIA grid. "), createVNode(as_table_virtualizer_default, {
555
572
  options: __props.rows,
556
573
  "estimate-size": __props.virtualRowHeight,
557
574
  overscan: __props.virtualOverscan,
@@ -1,6 +1,6 @@
1
1
  const require_use_table_state = require("./use-table-state-CmTX31G4.cjs");
2
2
  const require_get_cell_value = require("./get-cell-value-4rHKP-TG.cjs");
3
- const require_as_table_status = require("./as-table-status-Bunm0FTz.cjs");
3
+ const require_as_table_status = require("./as-table-status-Diyy3DFB.cjs");
4
4
  let vue = require("vue");
5
5
  let _atscript_ui_table = require("@atscript/ui-table");
6
6
  let _vueuse_core = require("@vueuse/core");
@@ -284,6 +284,11 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
284
284
  type: Object,
285
285
  required: false,
286
286
  default: () => ({})
287
+ },
288
+ headless: {
289
+ type: Boolean,
290
+ required: false,
291
+ default: false
287
292
  }
288
293
  },
289
294
  emits: [
@@ -445,7 +450,19 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
445
450
  "aria-rowcount": ariaRowCount.value,
446
451
  "aria-multiselectable": isStandalone.value && __props.select === "multi" ? "true" : void 0
447
452
  }, [
448
- (0, vue.createVNode)(require_as_table_status.as_table_header_default, {
453
+ (0, vue.createVNode)(require_as_table_status.as_table_colgroup_default, {
454
+ columns: __props.columns,
455
+ "column-widths": __props.columnWidths,
456
+ "has-select": hasValue.value,
457
+ "with-filler": __props.stretch
458
+ }, null, 8, [
459
+ "columns",
460
+ "column-widths",
461
+ "has-select",
462
+ "with-filler"
463
+ ]),
464
+ !__props.headless ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_table_status.as_table_header_default, {
465
+ key: 0,
449
466
  columns: __props.columns,
450
467
  sorters: __props.sorters,
451
468
  filters: __props.filters,
@@ -485,10 +502,10 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
485
502
  "select-all-state",
486
503
  "with-filler",
487
504
  "aria-rowindex"
488
- ]),
505
+ ])) : (0, vue.createCommentVNode)("v-if", true),
489
506
  (0, vue.createCommentVNode)(" Combobox / listbox branches: rows render as Reka items. "),
490
507
  isRekaWrapped.value && !__props.queryError ? ((0, vue.openBlock)(), (0, vue.createBlock)(as_table_virtualizer_default, {
491
- key: 0,
508
+ key: 1,
492
509
  options: __props.rows,
493
510
  "estimate-size": __props.virtualRowHeight,
494
511
  overscan: __props.virtualOverscan,
@@ -551,7 +568,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
551
568
  "estimate-size",
552
569
  "overscan",
553
570
  "bypass"
554
- ])) : isStandalone.value && !__props.queryError ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createCommentVNode)(" Standalone branch — plain rows + custom keyboard nav, ARIA grid. "), (0, vue.createVNode)(as_table_virtualizer_default, {
571
+ ])) : isStandalone.value && !__props.queryError ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createCommentVNode)(" Standalone branch — plain rows + custom keyboard nav, ARIA grid. "), (0, vue.createVNode)(as_table_virtualizer_default, {
555
572
  options: __props.rows,
556
573
  "estimate-size": __props.virtualRowHeight,
557
574
  overscan: __props.virtualOverscan,
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-root.vue-Cmk2Altf.cjs";
1
+ import { t as _default } from "./as-table-root.vue-BukHIoYu.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table-root.vue-B52eHZRL.mjs";
1
+ import { t as _default } from "./as-table-root.vue-BjeThuub.mjs";
2
2
  export { _default as default };
@@ -2255,11 +2255,11 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2255
2255
  "update:selectedRows": (value: unknown[]) => any;
2256
2256
  "update:urlQuery": (value: string | undefined) => any;
2257
2257
  } & {
2258
- action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: KeyboardEvent | MouseEvent | undefined) => any;
2259
- "main-action": (row: Record<string, unknown>, absIndex: number, event: KeyboardEvent | MouseEvent) => any;
2258
+ "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2259
+ action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any;
2260
2260
  }, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
2261
- onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: KeyboardEvent | MouseEvent | undefined) => any) | undefined;
2262
- "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: KeyboardEvent | MouseEvent) => any) | undefined;
2261
+ "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
2262
+ onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2263
2263
  "onUpdate:filterFields"?: ((value: string[]) => any) | undefined;
2264
2264
  "onUpdate:columnNames"?: ((value: string[]) => any) | undefined;
2265
2265
  "onUpdate:columnWidths"?: ((value: ColumnWidthsMap) => any) | undefined;
@@ -2255,11 +2255,11 @@ declare const __VLS_base: vue.DefineComponent<__VLS_PublicProps, {
2255
2255
  "update:selectedRows": (value: unknown[]) => any;
2256
2256
  "update:urlQuery": (value: string | undefined) => any;
2257
2257
  } & {
2258
- action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: KeyboardEvent | MouseEvent | undefined) => any;
2259
- "main-action": (row: Record<string, unknown>, absIndex: number, event: KeyboardEvent | MouseEvent) => any;
2258
+ "main-action": (row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any;
2259
+ action: (action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any;
2260
2260
  }, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
2261
- onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: KeyboardEvent | MouseEvent | undefined) => any) | undefined;
2262
- "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: KeyboardEvent | MouseEvent) => any) | undefined;
2261
+ "onMain-action"?: ((row: Record<string, unknown>, absIndex: number, event: MouseEvent | KeyboardEvent) => any) | undefined;
2262
+ onAction?: ((action: TVueTableActionInfo, ids: unknown[], result: ActionResult, event?: MouseEvent | KeyboardEvent | undefined) => any) | undefined;
2263
2263
  "onUpdate:filterFields"?: ((value: string[]) => any) | undefined;
2264
2264
  "onUpdate:columnNames"?: ((value: string[]) => any) | undefined;
2265
2265
  "onUpdate:columnWidths"?: ((value: ColumnWidthsMap) => any) | undefined;
@@ -194,6 +194,19 @@ function useRafBatch(onFlush) {
194
194
  }
195
195
  //#endregion
196
196
  //#region src/composables/use-column-header-drag-resize.ts
197
+ /**
198
+ * Pure width lookup shared by the header `<th>` and the `<colgroup>` `<col>`.
199
+ * Resolves the applied width for a column from the widths map, falling back to
200
+ * `col.width` for columns the table-state-side reconcile doesn't see — chiefly
201
+ * the synthesized `__actions` pseudo-column, which lives in `<AsTable>`'s
202
+ * `effectiveColumns` but never enters `state.columnWidths` (reconcile runs on
203
+ * `def.columns` only). Without this fallback the synthesized column collapses
204
+ * to 0 and its cells become invisible. Both the `<col>` and `<th>` MUST resolve
205
+ * width through this single function so they never disagree.
206
+ */
207
+ function resolveColumnWidth(columnWidths, col) {
208
+ return columnWidths[col.path]?.w ?? col.width;
209
+ }
197
210
  function pathOf(event) {
198
211
  return event.currentTarget?.dataset.columnPath ?? null;
199
212
  }
@@ -282,9 +295,8 @@ function useColumnHeaderDragResize(opts) {
282
295
  opts.onAutoFit(found.th, found.path);
283
296
  }
284
297
  function widthStyle(col) {
285
- const entry = opts.columnWidths()[col.path];
286
- if (entry) return { width: entry.w };
287
- if (col.width) return { width: col.width };
298
+ const w = resolveColumnWidth(opts.columnWidths(), col);
299
+ return w ? { width: w } : void 0;
288
300
  }
289
301
  function thClasses(path) {
290
302
  const reorder = opts.reorderable();
@@ -312,6 +324,62 @@ function useColumnHeaderDragResize(opts) {
312
324
  };
313
325
  }
314
326
  //#endregion
327
+ //#region src/components/internal/as-table-colgroup.vue?vue&type=script&setup=true&lang.ts
328
+ const _hoisted_1$2 = {
329
+ key: 0,
330
+ class: "as-col-select"
331
+ };
332
+ const _hoisted_2$2 = ["data-column-path"];
333
+ const _hoisted_3$2 = {
334
+ key: 1,
335
+ class: "as-col-filler"
336
+ };
337
+ //#endregion
338
+ //#region src/components/internal/as-table-colgroup.vue
339
+ var as_table_colgroup_default = /* @__PURE__ */ defineComponent({
340
+ __name: "as-table-colgroup",
341
+ props: {
342
+ columns: {
343
+ type: Array,
344
+ required: true
345
+ },
346
+ columnWidths: {
347
+ type: Object,
348
+ required: true
349
+ },
350
+ hasSelect: {
351
+ type: Boolean,
352
+ required: true
353
+ },
354
+ withFiller: {
355
+ type: Boolean,
356
+ required: true
357
+ }
358
+ },
359
+ setup(__props) {
360
+ const props = __props;
361
+ function colStyle(col) {
362
+ const w = resolveColumnWidth(props.columnWidths, col);
363
+ return w ? { width: w } : void 0;
364
+ }
365
+ return (_ctx, _cache) => {
366
+ return openBlock(), createElementBlock(Fragment, null, [createCommentVNode("\n `<colgroup>` carries column widths independently of the header so widths\n survive when `<thead>` is omitted (`headless`). Col order MUST match the\n body `<td>` order exactly: select col (when `hasSelect`), data columns,\n then the filler col (when `withFiller`).\n "), createElementVNode("colgroup", null, [
367
+ createCommentVNode(" Placeholder for the leading select column. No width — `as-td-select`\n self-sizes (`w-[4em]`); the col exists only for positional alignment. "),
368
+ __props.hasSelect ? (openBlock(), createElementBlock("col", _hoisted_1$2)) : createCommentVNode("v-if", true),
369
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
370
+ return openBlock(), createElementBlock("col", {
371
+ key: col.path,
372
+ "data-column-path": col.path,
373
+ style: normalizeStyle(colStyle(col))
374
+ }, null, 12, _hoisted_2$2);
375
+ }), 128)),
376
+ createCommentVNode(" Trailing filler col; absorbs leftover space, no width. "),
377
+ __props.withFiller ? (openBlock(), createElementBlock("col", _hoisted_3$2)) : createCommentVNode("v-if", true)
378
+ ])], 2112);
379
+ };
380
+ }
381
+ });
382
+ //#endregion
315
383
  //#region src/components/internal/as-table-header.vue?vue&type=script&setup=true&lang.ts
316
384
  const _hoisted_1$1 = {
317
385
  key: 0,
@@ -448,11 +516,16 @@ var as_table_header_default = /* @__PURE__ */ defineComponent({
448
516
  const origTableWidth = table.style.width;
449
517
  const origTableMinWidth = table.style.minWidth;
450
518
  const origThWidth = th.style.width;
519
+ const path = th.dataset.columnPath;
520
+ const col = path ? table.querySelector(`colgroup col[data-column-path="${path}"]`) : null;
521
+ const origColWidth = col?.style.width;
451
522
  table.style.tableLayout = "auto";
452
523
  table.style.minWidth = "0";
453
524
  table.style.width = "max-content";
454
525
  th.style.width = "max-content";
526
+ if (col) col.style.width = "";
455
527
  const measured = th.offsetWidth;
528
+ if (col) col.style.width = origColWidth ?? "";
456
529
  th.style.width = origThWidth;
457
530
  table.style.width = origTableWidth;
458
531
  table.style.minWidth = origTableMinWidth;
@@ -635,4 +708,4 @@ var as_table_status_default = /* @__PURE__ */ defineComponent({
635
708
  }
636
709
  });
637
710
  //#endregion
638
- export { useCellResolver as a, useCellComponents as i, as_table_header_default as n, useRafBatch as r, as_table_status_default as t };
711
+ export { useCellComponents as a, useRafBatch as i, as_table_header_default as n, useCellResolver as o, as_table_colgroup_default as r, as_table_status_default as t };
@@ -194,6 +194,19 @@ function useRafBatch(onFlush) {
194
194
  }
195
195
  //#endregion
196
196
  //#region src/composables/use-column-header-drag-resize.ts
197
+ /**
198
+ * Pure width lookup shared by the header `<th>` and the `<colgroup>` `<col>`.
199
+ * Resolves the applied width for a column from the widths map, falling back to
200
+ * `col.width` for columns the table-state-side reconcile doesn't see — chiefly
201
+ * the synthesized `__actions` pseudo-column, which lives in `<AsTable>`'s
202
+ * `effectiveColumns` but never enters `state.columnWidths` (reconcile runs on
203
+ * `def.columns` only). Without this fallback the synthesized column collapses
204
+ * to 0 and its cells become invisible. Both the `<col>` and `<th>` MUST resolve
205
+ * width through this single function so they never disagree.
206
+ */
207
+ function resolveColumnWidth(columnWidths, col) {
208
+ return columnWidths[col.path]?.w ?? col.width;
209
+ }
197
210
  function pathOf(event) {
198
211
  return event.currentTarget?.dataset.columnPath ?? null;
199
212
  }
@@ -282,9 +295,8 @@ function useColumnHeaderDragResize(opts) {
282
295
  opts.onAutoFit(found.th, found.path);
283
296
  }
284
297
  function widthStyle(col) {
285
- const entry = opts.columnWidths()[col.path];
286
- if (entry) return { width: entry.w };
287
- if (col.width) return { width: col.width };
298
+ const w = resolveColumnWidth(opts.columnWidths(), col);
299
+ return w ? { width: w } : void 0;
288
300
  }
289
301
  function thClasses(path) {
290
302
  const reorder = opts.reorderable();
@@ -312,6 +324,62 @@ function useColumnHeaderDragResize(opts) {
312
324
  };
313
325
  }
314
326
  //#endregion
327
+ //#region src/components/internal/as-table-colgroup.vue?vue&type=script&setup=true&lang.ts
328
+ const _hoisted_1$2 = {
329
+ key: 0,
330
+ class: "as-col-select"
331
+ };
332
+ const _hoisted_2$2 = ["data-column-path"];
333
+ const _hoisted_3$2 = {
334
+ key: 1,
335
+ class: "as-col-filler"
336
+ };
337
+ //#endregion
338
+ //#region src/components/internal/as-table-colgroup.vue
339
+ var as_table_colgroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
340
+ __name: "as-table-colgroup",
341
+ props: {
342
+ columns: {
343
+ type: Array,
344
+ required: true
345
+ },
346
+ columnWidths: {
347
+ type: Object,
348
+ required: true
349
+ },
350
+ hasSelect: {
351
+ type: Boolean,
352
+ required: true
353
+ },
354
+ withFiller: {
355
+ type: Boolean,
356
+ required: true
357
+ }
358
+ },
359
+ setup(__props) {
360
+ const props = __props;
361
+ function colStyle(col) {
362
+ const w = resolveColumnWidth(props.columnWidths, col);
363
+ return w ? { width: w } : void 0;
364
+ }
365
+ return (_ctx, _cache) => {
366
+ return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [(0, vue.createCommentVNode)("\n `<colgroup>` carries column widths independently of the header so widths\n survive when `<thead>` is omitted (`headless`). Col order MUST match the\n body `<td>` order exactly: select col (when `hasSelect`), data columns,\n then the filler col (when `withFiller`).\n "), (0, vue.createElementVNode)("colgroup", null, [
367
+ (0, vue.createCommentVNode)(" Placeholder for the leading select column. No width — `as-td-select`\n self-sizes (`w-[4em]`); the col exists only for positional alignment. "),
368
+ __props.hasSelect ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("col", _hoisted_1$2)) : (0, vue.createCommentVNode)("v-if", true),
369
+ ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.columns, (col) => {
370
+ return (0, vue.openBlock)(), (0, vue.createElementBlock)("col", {
371
+ key: col.path,
372
+ "data-column-path": col.path,
373
+ style: (0, vue.normalizeStyle)(colStyle(col))
374
+ }, null, 12, _hoisted_2$2);
375
+ }), 128)),
376
+ (0, vue.createCommentVNode)(" Trailing filler col; absorbs leftover space, no width. "),
377
+ __props.withFiller ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("col", _hoisted_3$2)) : (0, vue.createCommentVNode)("v-if", true)
378
+ ])], 2112);
379
+ };
380
+ }
381
+ });
382
+ //#endregion
315
383
  //#region src/components/internal/as-table-header.vue?vue&type=script&setup=true&lang.ts
316
384
  const _hoisted_1$1 = {
317
385
  key: 0,
@@ -448,11 +516,16 @@ var as_table_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
448
516
  const origTableWidth = table.style.width;
449
517
  const origTableMinWidth = table.style.minWidth;
450
518
  const origThWidth = th.style.width;
519
+ const path = th.dataset.columnPath;
520
+ const col = path ? table.querySelector(`colgroup col[data-column-path="${path}"]`) : null;
521
+ const origColWidth = col?.style.width;
451
522
  table.style.tableLayout = "auto";
452
523
  table.style.minWidth = "0";
453
524
  table.style.width = "max-content";
454
525
  th.style.width = "max-content";
526
+ if (col) col.style.width = "";
455
527
  const measured = th.offsetWidth;
528
+ if (col) col.style.width = origColWidth ?? "";
456
529
  th.style.width = origThWidth;
457
530
  table.style.width = origTableWidth;
458
531
  table.style.minWidth = origTableMinWidth;
@@ -635,6 +708,12 @@ var as_table_status_default = /* @__PURE__ */ (0, vue.defineComponent)({
635
708
  }
636
709
  });
637
710
  //#endregion
711
+ Object.defineProperty(exports, "as_table_colgroup_default", {
712
+ enumerable: true,
713
+ get: function() {
714
+ return as_table_colgroup_default;
715
+ }
716
+ });
638
717
  Object.defineProperty(exports, "as_table_header_default", {
639
718
  enumerable: true,
640
719
  get: function() {
package/dist/as-table.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_table = require("./as-table-BqIeLNSt.cjs");
1
+ const require_as_table = require("./as-table-MKVsJZxT.cjs");
2
2
  module.exports = require_as_table.as_table_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table.vue-CBrxpL4X.cjs";
1
+ import { t as _default } from "./as-table.vue-CDPbZQRG.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-table.vue-WF12BUAO.mjs";
1
+ import { t as _default } from "./as-table.vue-DaVtNFIe.mjs";
2
2
  export { _default as default };
package/dist/as-table.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_table_default } from "./as-table-B7RnEB9N.mjs";
1
+ import { t as as_table_default } from "./as-table-Bo2dAWTD.mjs";
2
2
  export { as_table_default as default };