@vtable-guild/vtable-guild 2.9.0-alpha.8 → 3.0.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.
Files changed (137) hide show
  1. package/css/index.css +296 -9
  2. package/css/presets/antdv.css +3 -0
  3. package/css/presets/element-plus.css +3 -0
  4. package/css/style.css +544 -43
  5. package/css/tailwind3-utilities.css +189 -32
  6. package/css/tailwind3.css +355 -11
  7. package/css/tailwind4.css +355 -11
  8. package/css/transitions.css +53 -2
  9. package/dist/core/src/utils/types.d.ts +3 -0
  10. package/dist/core/src/utils/types.d.ts.map +1 -1
  11. package/dist/css/index.css +296 -9
  12. package/dist/css/presets/antdv.css +3 -0
  13. package/dist/css/presets/element-plus.css +3 -0
  14. package/dist/css/style.css +544 -43
  15. package/dist/css/tailwind3-utilities.css +189 -32
  16. package/dist/css/tailwind3.css +355 -11
  17. package/dist/css/tailwind4.css +355 -11
  18. package/dist/css/transitions.css +53 -2
  19. package/dist/icons/src/EditOutlinedIcon.d.ts +3 -0
  20. package/dist/icons/src/EditOutlinedIcon.d.ts.map +1 -0
  21. package/dist/icons/src/EditOutlinedIcon.mjs +9 -0
  22. package/dist/icons/src/ElFilterIcon.mjs +9 -0
  23. package/dist/icons/src/index.d.ts +1 -0
  24. package/dist/icons/src/index.d.ts.map +1 -1
  25. package/dist/index.full.mjs +9349 -7117
  26. package/dist/index.mjs +112 -106
  27. package/dist/table/src/components/Table.d.ts +1 -1
  28. package/dist/table/src/components/TableCell.d.ts.map +1 -1
  29. package/dist/table/src/components/TableCell.mjs +118 -147
  30. package/dist/table/src/components/TableEditFrame.d.ts +58 -0
  31. package/dist/table/src/components/TableEditFrame.d.ts.map +1 -0
  32. package/dist/table/src/components/TableEditFrame.mjs +127 -0
  33. package/dist/table/src/components/TableEditLayout.test.d.ts +2 -0
  34. package/dist/table/src/components/TableEditLayout.test.d.ts.map +1 -0
  35. package/dist/table/src/components/TableEditableCell.d.ts +46 -9
  36. package/dist/table/src/components/TableEditableCell.d.ts.map +1 -1
  37. package/dist/table/src/components/TableEditableCell.mjs +99 -22
  38. package/dist/table/src/components/TableLightFilter.d.ts +76 -0
  39. package/dist/table/src/components/TableLightFilter.d.ts.map +1 -0
  40. package/dist/table/src/components/TableLightFilter.mjs +320 -0
  41. package/dist/table/src/components/TableLightFilter.test.d.ts +2 -0
  42. package/dist/table/src/components/TableLightFilter.test.d.ts.map +1 -0
  43. package/dist/table/src/components/TableQuery.d.ts +107 -46
  44. package/dist/table/src/components/TableQuery.d.ts.map +1 -1
  45. package/dist/table/src/components/TableQuery.mjs +481 -184
  46. package/dist/table/src/components/TableQueryNative.test.d.ts +2 -0
  47. package/dist/table/src/components/TableQueryNative.test.d.ts.map +1 -0
  48. package/dist/table/src/components/TableSelectionAlert.d.ts +1 -1
  49. package/dist/table/src/components/TableSelectionAlert.d.ts.map +1 -1
  50. package/dist/table/src/components/TableSelectionAlert.mjs +109 -55
  51. package/dist/table/src/components/VTableEditCell.test.d.ts +2 -0
  52. package/dist/table/src/components/VTableEditCell.test.d.ts.map +1 -0
  53. package/dist/table/src/components/VTableEditCell.vue.d.ts +18 -3
  54. package/dist/table/src/components/VTableEditCell.vue.d.ts.map +1 -1
  55. package/dist/table/src/components/VTableEditCell.vue.mjs +172 -10
  56. package/dist/table/src/components/VTableEditShell.vue.d.ts +38 -0
  57. package/dist/table/src/components/VTableEditShell.vue.d.ts.map +1 -0
  58. package/dist/table/src/components/VTableEditShell.vue.mjs +37 -0
  59. package/dist/table/src/components/VTableEditShell.vue2.mjs +4 -0
  60. package/dist/table/src/components/VTableQuery.vue.d.ts +4 -3
  61. package/dist/table/src/components/VTableQuery.vue.d.ts.map +1 -1
  62. package/dist/table/src/components/VTableQuery.vue.mjs +53 -31
  63. package/dist/table/src/components/VirtualTableBody.mjs +24 -23
  64. package/dist/table/src/components/renderCellDisplay.d.ts +6 -0
  65. package/dist/table/src/components/renderCellDisplay.d.ts.map +1 -0
  66. package/dist/table/src/components/renderCellDisplay.mjs +37 -0
  67. package/dist/table/src/composables/useQueryCollapseMotion.d.ts +4 -0
  68. package/dist/table/src/composables/useQueryCollapseMotion.d.ts.map +1 -0
  69. package/dist/table/src/composables/useQueryCollapseMotion.mjs +48 -0
  70. package/dist/table/src/composables/useQueryCollapseMotion.test.d.ts +2 -0
  71. package/dist/table/src/composables/useQueryCollapseMotion.test.d.ts.map +1 -0
  72. package/dist/table/src/composables/useSelection.d.ts.map +1 -1
  73. package/dist/table/src/composables/useSelection.mjs +157 -148
  74. package/dist/table/src/composables/useTableEdit.d.ts +17 -0
  75. package/dist/table/src/composables/useTableEdit.d.ts.map +1 -1
  76. package/dist/table/src/composables/useTableEdit.mjs +326 -266
  77. package/dist/table/src/composables/useTableEditable.d.ts.map +1 -1
  78. package/dist/table/src/composables/useTableEditable.mjs +321 -89
  79. package/dist/table/src/controls.d.ts.map +1 -1
  80. package/dist/table/src/controls.mjs +198 -79
  81. package/dist/table/src/index.d.ts +2 -0
  82. package/dist/table/src/index.d.ts.map +1 -1
  83. package/dist/table/src/types/controls.d.ts +61 -3
  84. package/dist/table/src/types/controls.d.ts.map +1 -1
  85. package/dist/table/src/types/controls.mjs +4 -0
  86. package/dist/table/src/types/editable.d.ts +78 -4
  87. package/dist/table/src/types/editable.d.ts.map +1 -1
  88. package/dist/table/src/types/editable.typecheck.d.ts.map +1 -1
  89. package/dist/table/src/types/editing.d.ts +5 -2
  90. package/dist/table/src/types/editing.d.ts.map +1 -1
  91. package/dist/table/src/types/query-form.d.ts +76 -15
  92. package/dist/table/src/types/query-form.d.ts.map +1 -1
  93. package/dist/table/src/types/query-form.typecheck.d.ts +4 -0
  94. package/dist/table/src/types/query-form.typecheck.d.ts.map +1 -1
  95. package/dist/table/src/types/table.d.ts +1 -0
  96. package/dist/table/src/types/table.d.ts.map +1 -1
  97. package/dist/table/src/utils/cell.d.ts +18 -12
  98. package/dist/table/src/utils/cell.d.ts.map +1 -1
  99. package/dist/table/src/utils/cell.mjs +95 -94
  100. package/dist/table/src/utils/draftEqual.d.ts +2 -0
  101. package/dist/table/src/utils/draftEqual.d.ts.map +1 -0
  102. package/dist/table/src/utils/draftEqual.mjs +22 -0
  103. package/dist/table/src/utils/queryFields.mjs +11 -11
  104. package/dist/table/src/utils/queryFilterLayout.d.ts +29 -0
  105. package/dist/table/src/utils/queryFilterLayout.d.ts.map +1 -0
  106. package/dist/table/src/utils/queryFilterLayout.mjs +74 -0
  107. package/dist/table/src/utils/queryFilterLayout.test.d.ts +2 -0
  108. package/dist/table/src/utils/queryFilterLayout.test.d.ts.map +1 -0
  109. package/dist/table/src/utils/queryInlineLayout.d.ts +22 -0
  110. package/dist/table/src/utils/queryInlineLayout.d.ts.map +1 -0
  111. package/dist/table/src/utils/queryInlineLayout.mjs +92 -0
  112. package/dist/table/src/utils/queryInlineLayout.test.d.ts +2 -0
  113. package/dist/table/src/utils/queryInlineLayout.test.d.ts.map +1 -0
  114. package/dist/table/src/utils/snapshot.d.ts +2 -0
  115. package/dist/table/src/utils/snapshot.d.ts.map +1 -1
  116. package/dist/table/src/utils/snapshot.mjs +18 -13
  117. package/dist/theme/src/presets/antdv/table-locale.d.ts +6 -0
  118. package/dist/theme/src/presets/antdv/table-locale.d.ts.map +1 -1
  119. package/dist/theme/src/presets/antdv/table-locale.mjs +16 -2
  120. package/dist/theme/src/presets/antdv/table.d.ts +18 -8
  121. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  122. package/dist/theme/src/presets/antdv/table.mjs +56 -12
  123. package/dist/theme/src/presets/element-plus/table-locale.d.ts +6 -0
  124. package/dist/theme/src/presets/element-plus/table-locale.d.ts.map +1 -1
  125. package/dist/theme/src/presets/element-plus/table-locale.mjs +16 -2
  126. package/dist/theme/src/presets/element-plus/table.d.ts +18 -8
  127. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  128. package/dist/theme/src/presets/element-plus/table.mjs +57 -10
  129. package/dist/theme/src/query.d.ts +34 -57
  130. package/dist/theme/src/query.d.ts.map +1 -1
  131. package/dist/theme/src/query.mjs +23 -24
  132. package/dist/theme/src/selection-alert.d.ts +8 -0
  133. package/dist/theme/src/selection-alert.d.ts.map +1 -1
  134. package/dist/theme/src/selection-alert.mjs +2 -0
  135. package/dist/vtable-guild/src/index.d.ts +1 -1
  136. package/dist/vtable-guild/src/index.d.ts.map +1 -1
  137. package/package.json +2 -1
@@ -1,6 +1,6 @@
1
- import { defineComponent as p, ref as c, createBlock as y, openBlock as b, unref as v, mergeProps as P, createSlots as T, withCtx as l, renderSlot as n, normalizeProps as i, guardReactiveProps as a } from "vue";
2
- import k from "./TableQuery.mjs";
3
- const g = /* @__PURE__ */ p({
1
+ import { defineComponent as m, ref as y, createBlock as c, openBlock as b, unref as v, mergeProps as B, createSlots as P, withCtx as r, renderSlot as s, normalizeProps as n, guardReactiveProps as i } from "vue";
2
+ import T from "./TableQuery.mjs";
3
+ const R = /* @__PURE__ */ m({
4
4
  name: "VTableQuery",
5
5
  inheritAttrs: !1,
6
6
  __name: "VTableQuery",
@@ -8,13 +8,34 @@ const g = /* @__PURE__ */ p({
8
8
  query: {},
9
9
  rootTag: {},
10
10
  fields: {},
11
+ columns: {},
11
12
  controls: {},
13
+ layoutType: {},
14
+ formMode: {},
15
+ queryLayout: {},
16
+ formProps: {},
12
17
  layout: {},
13
- autoSubmit: { type: Boolean },
14
- debounceTime: {},
15
- hiddenPolicy: {},
16
- collapsedCount: {},
17
- collapsible: { type: Boolean, default: !0 },
18
+ span: {},
19
+ defaultColsNumber: {},
20
+ defaultFormItemsNumber: {},
21
+ defaultCollapsed: { type: Boolean, default: void 0 },
22
+ collapsed: { type: Boolean, default: void 0 },
23
+ onCollapse: {},
24
+ collapseRender: { type: [Boolean, Function], default: void 0 },
25
+ optionRender: { type: [Boolean, Function], default: void 0 },
26
+ searchText: {},
27
+ resetText: {},
28
+ labelWidth: {},
29
+ searchGutter: {},
30
+ split: { type: Boolean },
31
+ preserve: { type: Boolean, default: !0 },
32
+ showHiddenNum: { type: Boolean },
33
+ submitter: { type: [Boolean, Object], default: void 0 },
34
+ submitterColSpanProps: {},
35
+ collapse: { type: Boolean },
36
+ collapseLabel: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
37
+ footerRender: { type: [Boolean, Function], default: void 0 },
38
+ getPopupContainer: {},
18
39
  disabled: { type: Boolean },
19
40
  validate: {},
20
41
  errors: {},
@@ -22,37 +43,38 @@ const g = /* @__PURE__ */ p({
22
43
  ui: {},
23
44
  class: {}
24
45
  },
25
- emits: ["submitted", "reset"],
26
- setup(u, { expose: m, emit: d }) {
27
- const f = u, r = d, t = c();
28
- m({
29
- submit: () => t.value?.submit() ?? Promise.resolve(!1),
30
- reset: () => t.value?.reset() ?? Promise.resolve(!1),
31
- cancel: () => t.value?.cancel()
46
+ emits: ["submitted", "reset", "update:collapsed"],
47
+ setup(u, { expose: d, emit: p }) {
48
+ const f = u, a = p, l = y();
49
+ d({
50
+ submit: () => l.value?.submit() ?? Promise.resolve(!1),
51
+ reset: () => l.value?.reset() ?? Promise.resolve(!1),
52
+ cancel: () => l.value?.cancel()
32
53
  });
33
- function B(e) {
34
- return e;
54
+ function C(o) {
55
+ return o;
35
56
  }
36
- return (e, s) => (b(), y(v(k), P({
57
+ return (o, t) => (b(), c(v(T), B({
37
58
  ref_key: "inner",
38
- ref: t
39
- }, { ...e.$attrs, ...f }, {
40
- onSubmitted: s[0] || (s[0] = (o) => r("submitted", o)),
41
- onReset: s[1] || (s[1] = (o) => r("reset", o))
42
- }), T({ _: 2 }, [
43
- e.$slots.field ? {
59
+ ref: l
60
+ }, { ...o.$attrs, ...f }, {
61
+ onSubmitted: t[0] || (t[0] = (e) => a("submitted", e)),
62
+ onReset: t[1] || (t[1] = (e) => a("reset", e)),
63
+ "onUpdate:collapsed": t[2] || (t[2] = (e) => a("update:collapsed", e))
64
+ }), P({ _: 2 }, [
65
+ o.$slots.field ? {
44
66
  name: "field",
45
- fn: l((o) => [
46
- n(e.$slots, "field", i(a(
47
- o
67
+ fn: r((e) => [
68
+ s(o.$slots, "field", n(i(
69
+ e
48
70
  )))
49
71
  ]),
50
72
  key: "0"
51
73
  } : void 0,
52
- e.$slots.actions ? {
74
+ o.$slots.actions ? {
53
75
  name: "actions",
54
- fn: l((o) => [
55
- n(e.$slots, "actions", i(a(o)))
76
+ fn: r((e) => [
77
+ s(o.$slots, "actions", n(i(e)))
56
78
  ]),
57
79
  key: "1"
58
80
  } : void 0
@@ -60,5 +82,5 @@ const g = /* @__PURE__ */ p({
60
82
  }
61
83
  });
62
84
  export {
63
- g as default
85
+ R as default
64
86
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as U, inject as Y, ref as x, nextTick as J, computed as w, onBeforeUnmount as Q, watch as Z, createVNode as r, isVNode as ee } from "vue";
1
+ import { defineComponent as U, inject as Y, ref as x, nextTick as J, computed as w, onBeforeUnmount as Q, watch as Z, createVNode as n, isVNode as ee } from "vue";
2
2
  import "../../../core/src/utils/tv.mjs";
3
3
  import te from "./TableRow.mjs";
4
4
  import le from "./TableCell.mjs";
5
5
  import oe from "./TableEmpty.mjs";
6
6
  import ae from "./ExpandedRowTr.mjs";
7
- import ne from "./ColGroup.mjs";
8
- import re from "./ColumnWidthRow.mjs";
7
+ import re from "./ColGroup.mjs";
8
+ import ne from "./ColumnWidthRow.mjs";
9
9
  import { TABLE_CONTEXT_KEY as ie } from "../context.mjs";
10
10
  import { resolveFixedColumnRanges as se, useColumnWindow as de } from "../composables/useColumnWindow.mjs";
11
11
  import { resolveRowDragClass as ue } from "../composables/useRowDragSort.mjs";
@@ -99,7 +99,7 @@ const Oe = /* @__PURE__ */ U({
99
99
  setup(t, {
100
100
  expose: k
101
101
  }) {
102
- const n = Y(ie, {}), c = x();
102
+ const r = Y(ie, {}), c = x();
103
103
  k({
104
104
  scrollToTop: () => c.value?.scrollTo({
105
105
  top: 0
@@ -133,7 +133,7 @@ const Oe = /* @__PURE__ */ U({
133
133
  const q = w(() => {
134
134
  const e = t.columnMetrics?.total;
135
135
  if (e && e > 0) return e;
136
- const l = fe(t.columns, n.columnWidths), u = me(t.tableStyle?.width);
136
+ const l = fe(t.columns, r.columnWidths), u = me(t.tableStyle?.width);
137
137
  return Math.max(l, u);
138
138
  }), y = w(() => se(t.columns)), O = w(() => {
139
139
  if (!t.virtualColumn || f.value <= 0) return null;
@@ -197,21 +197,21 @@ const Oe = /* @__PURE__ */ U({
197
197
  v(l), e.nativeElement, p(e.nativeElement);
198
198
  } else
199
199
  p(null);
200
- }), () => t.dataSource.length === 0 ? r("table", {
200
+ }), () => t.dataSource.length === 0 ? n("table", {
201
201
  "data-vtg-table": "",
202
- class: W(t.tableClass, n.compatClass?.("body")),
202
+ class: W(t.tableClass, r.compatClass?.("body")),
203
203
  style: t.tableStyle
204
- }, [r(ne, {
204
+ }, [n(re, {
205
205
  columns: t.columns
206
- }, null), r(re, null, null), r("tbody", {
206
+ }, null), n(ne, null, null), n("tbody", {
207
207
  class: t.tbodyClass
208
- }, [r(oe, {
208
+ }, [n(oe, {
209
209
  colSpan: t.columns.length || 1,
210
210
  emptyClass: t.emptyClass,
211
211
  tdClass: t.tdClass
212
- }, null)])]) : r(we, {
212
+ }, null)])]) : n(we, {
213
213
  ref: c,
214
- holderClass: n.compatClass?.("body"),
214
+ holderClass: r.compatClass?.("body"),
215
215
  data: t.dataSource,
216
216
  height: t.height,
217
217
  itemHeight: t.itemHeight,
@@ -230,41 +230,42 @@ const Oe = /* @__PURE__ */ U({
230
230
  index: l
231
231
  }) => {
232
232
  let u;
233
- const o = l, a = F(e, o), i = n.expandable?.(), D = n.isExpanded?.(a) ?? !1, P = i?.expandRowByClick ?? !1, j = n.isRowExpandable?.(e) ?? !1, T = n.getRowClassName?.(e, o), E = n.getRowProps?.(e, o), M = n.rowDrag?.enabled.value ? n.rowDrag.getBindings(e, o, E) : void 0, A = {
233
+ const o = l, a = F(e, o), i = r.expandable?.(), D = r.isExpanded?.(a) ?? !1, P = i?.expandRowByClick ?? !1, j = r.isRowExpandable?.(e) ?? !1, T = r.getRowClassName?.(e, o), E = r.getRowProps?.(e, o), M = r.rowDrag?.enabled.value ? r.rowDrag.getBindings(e, o, E) : void 0, A = {
234
234
  ...E,
235
235
  ...M
236
- }, L = ue(n.rowDrag, a, n.subThemeSlots), g = (n.isTreeData?.value ? n.getFlattenRow?.(e) : void 0)?.level ?? 0, X = typeof i?.expandedRowClassName == "function" ? i.expandedRowClassName(e, o, g) : i?.expandedRowClassName, z = P ? () => {
237
- j && n.toggleExpand?.(e, o);
236
+ }, L = ue(r.rowDrag, a, r.subThemeSlots), g = (r.isTreeData?.value ? r.getFlattenRow?.(e) : void 0)?.level ?? 0, X = typeof i?.expandedRowClassName == "function" ? i.expandedRowClassName(e, o, g) : i?.expandedRowClassName, z = P ? () => {
237
+ j && r.toggleExpand?.(e, o);
238
238
  } : void 0, B = K.value, $ = t.columnMetrics?.widths;
239
- return r("table", {
239
+ return n("table", {
240
240
  "data-vtg-table": "",
241
241
  class: t.tableClass,
242
242
  style: {
243
243
  ...t.tableStyle,
244
244
  tableLayout: "fixed"
245
245
  }
246
- }, [r("tbody", {
246
+ }, [n("tbody", {
247
247
  class: t.tbodyClass,
248
248
  "data-vtg-preserve-last-border": l < t.dataSource.length - 1 ? "" : void 0
249
- }, [r(te, {
249
+ }, [n(te, {
250
250
  "data-vtg-virtual-row": "",
251
251
  "data-vtg-row-index": o,
252
252
  key: a,
253
- rowClass: W(t.rowClass, T, L, ce(n, e, o, g)) ?? "",
253
+ rowClass: W(t.rowClass, T, L, ce(r, e, o, g)) ?? "",
254
254
  rowProps: A,
255
255
  onClick: z
256
256
  }, ve(u = B.map((h, G) => {
257
257
  if (h.spacer !== void 0)
258
- return r("td", {
258
+ return n("td", {
259
259
  key: `__vtg_spacer_${G}`,
260
260
  style: {
261
261
  width: `${h.spacer}px`,
262
- padding: "0"
262
+ padding: "0",
263
+ border: "0"
263
264
  },
264
265
  "aria-hidden": "true"
265
266
  }, null);
266
267
  const m = h.index, C = t.columns[m];
267
- return r(le, {
268
+ return n(le, {
268
269
  key: C.key ?? String(C.dataIndex ?? m),
269
270
  record: e,
270
271
  rowIndex: o,
@@ -276,7 +277,7 @@ const Oe = /* @__PURE__ */ U({
276
277
  }, null);
277
278
  })) ? u : {
278
279
  default: () => [u]
279
- }), D && i?.expandedRowRender ? r(ae, {
280
+ }), D && i?.expandedRowRender ? n(ae, {
280
281
  key: `${a}-expanded`,
281
282
  record: e,
282
283
  rowIndex: o,
@@ -0,0 +1,6 @@
1
+ import { SubThemeSlots } from '../context';
2
+ import { CellDisplay } from '../utils/cell';
3
+ type DisplaySlots = Pick<SubThemeSlots, 'cellProgress' | 'cellProgressTrack' | 'cellProgressBar' | 'cellProgressText' | 'cellTag' | 'cellStatus'>;
4
+ export declare function renderCellDisplay(cell: CellDisplay, slots?: DisplaySlots): import('vue').VNodeChild;
5
+ export {};
6
+ //# sourceMappingURL=renderCellDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCellDisplay.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/renderCellDisplay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,KAAK,YAAY,GAAG,IAAI,CACtB,aAAa,EACX,cAAc,GACd,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,GAClB,SAAS,GACT,YAAY,CACf,CAAA;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,YAAY,4BAyCxE"}
@@ -0,0 +1,37 @@
1
+ import { createVNode as a } from "vue";
2
+ import r from "../../../icons/src/CheckCircleFilledIcon.mjs";
3
+ import e from "../../../icons/src/CloseCircleFilledIcon.mjs";
4
+ function p(s, t) {
5
+ return s.presentation === "progress" && s.progress ? a("span", {
6
+ class: t?.cellProgress(),
7
+ "data-vtg-field": "progress",
8
+ role: "progressbar",
9
+ "aria-label": s.tooltipText,
10
+ "aria-valuemin": 0,
11
+ "aria-valuemax": 100,
12
+ "aria-valuenow": s.progress.percent
13
+ }, [a("span", {
14
+ class: t?.cellProgressTrack()
15
+ }, [a("span", {
16
+ class: t?.cellProgressBar(),
17
+ "data-status": s.status ?? "processing",
18
+ style: {
19
+ width: `${s.progress.percent}%`
20
+ }
21
+ }, null)]), s.progress.showValue ? a("span", {
22
+ class: t?.cellProgressText(),
23
+ "data-status": s.status
24
+ }, [s.status === "success" ? a(r, null, null) : s.status === "error" ? a(e, {
25
+ "fill-rule": "evenodd"
26
+ }, null) : s.content]) : null]) : s.presentation === "tag" ? a("span", {
27
+ class: t?.cellTag(),
28
+ "data-status": s.status ?? "default",
29
+ "data-vtg-field": "tag"
30
+ }, [s.content]) : s.status ? a("span", {
31
+ class: t?.cellStatus(),
32
+ "data-status": s.status
33
+ }, [s.content]) : s.content;
34
+ }
35
+ export {
36
+ p as renderCellDisplay
37
+ };
@@ -0,0 +1,4 @@
1
+ import { Ref } from 'vue';
2
+ /** Animate the root so grid rows and native inline controls keep their natural sizing. */
3
+ export declare function useQueryCollapseMotion(root: Ref<HTMLElement | null>, collapsed: Readonly<Ref<boolean | undefined>>): void;
4
+ //# sourceMappingURL=useQueryCollapseMotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueryCollapseMotion.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useQueryCollapseMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAW/D,0FAA0F;AAC1F,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAC7B,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,QAkE9C"}
@@ -0,0 +1,48 @@
1
+ import { watch as d, nextTick as b, onScopeDispose as w } from "vue";
2
+ const a = [
3
+ "--vtg-query-motion-start-height",
4
+ "--vtg-query-motion-end-height"
5
+ ];
6
+ function p(e) {
7
+ return (Number.parseFloat(e) || 0) * (e.trim().endsWith("ms") ? 1 : 1e3);
8
+ }
9
+ function C(e, y) {
10
+ let i = 0, o;
11
+ function n() {
12
+ o?.(), o = void 0;
13
+ }
14
+ d(
15
+ y,
16
+ async (g, h) => {
17
+ const t = e.value, s = t?.getBoundingClientRect().height ?? 0, f = ++i;
18
+ if (n(), !t || !s || g === void 0 || h === void 0 || (await b(), f !== i || e.value !== t)) return;
19
+ const u = t.getBoundingClientRect().height;
20
+ if (Math.abs(u - s) < 0.5) return;
21
+ t.style.setProperty(a[0], `${s}px`), t.style.setProperty(a[1], `${u}px`), t.setAttribute("data-query-motion", ""), o = () => {
22
+ t.removeAttribute("data-query-motion");
23
+ for (const r of a) t.style.removeProperty(r);
24
+ };
25
+ const c = t.ownerDocument.defaultView?.getComputedStyle(t), m = p(c?.animationDuration ?? "");
26
+ if (!m) {
27
+ n();
28
+ return;
29
+ }
30
+ const l = (r) => {
31
+ r.target === t && r.animationName === "vtg-query-collapse" && n();
32
+ };
33
+ t.addEventListener("animationend", l);
34
+ const v = setTimeout(n, m + p(c?.animationDelay ?? "") + 50), q = o;
35
+ o = () => {
36
+ clearTimeout(v), t.removeEventListener("animationend", l), q();
37
+ };
38
+ },
39
+ { flush: "pre" }
40
+ ), d(e, () => {
41
+ i++, n();
42
+ }), w(() => {
43
+ i++, n();
44
+ });
45
+ }
46
+ export {
47
+ C as useQueryCollapseMotion
48
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useQueryCollapseMotion.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQueryCollapseMotion.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useQueryCollapseMotion.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"useSelection.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useSelection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAWjD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E,YAAY,EAAE,MAAM,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;IACrD,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;IAClD,IAAI,EAAE,MAAM,OAAO,EAAE,CAAA;IACrB,WAAW,EAAE,MAAM,OAAO,EAAE,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC7C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC/B;AA8DD,wBAAgB,YAAY,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;;sBA6LZ,GAAG,KAAG,OAAO;yBA9FV,OAAO,KAAG,OAAO;gCAgIV,OAAO,SAAS,MAAM,KAAG,cAAc;wBA8J/C,OAAO,SAAS,MAAM,gBAAgB,UAAU,KAAG,IAAI;0BAarD,OAAO,wBAAoB,IAAI;;2BAyChC,IAAI;0BAmBL,IAAI;gCAQE,GAAG,EAAE;EAgBvC"}
1
+ {"version":3,"file":"useSelection.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useSelection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAWjD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E,YAAY,EAAE,MAAM,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;IACrD,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,GAAG,CAAA;IAClD,IAAI,EAAE,MAAM,OAAO,EAAE,CAAA;IACrB,WAAW,EAAE,MAAM,OAAO,EAAE,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC7C,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC/B;AA8DD,wBAAgB,YAAY,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;;sBA6LZ,GAAG,KAAG,OAAO;yBA9FV,OAAO,KAAG,OAAO;gCAkIV,OAAO,SAAS,MAAM,KAAG,cAAc;wBAiK/C,OAAO,SAAS,MAAM,gBAAgB,UAAU,KAAG,IAAI;0BAarD,OAAO,wBAAoB,IAAI;;2BAyChC,IAAI;0BAmBL,IAAI;gCAQE,GAAG,EAAE;EAgBvC"}