@dazhicheng/ui 1.6.7 → 1.6.8

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 (93) hide show
  1. package/dist/components/tt-form/src/form-render/expandable.js +31 -32
  2. package/dist/components/tt-form/src/useFormContext.js +1 -1
  3. package/dist/components/tt-table/index.d.ts +3 -15
  4. package/dist/components/tt-table/index.js +5 -4
  5. package/dist/components/tt-table/src/Table.vue.d.ts +1 -1
  6. package/dist/components/tt-table/src/Table.vue.js +3 -3
  7. package/dist/components/tt-table/src/TableForm.vue.js +168 -159
  8. package/dist/components/tt-table/src/components/TableAction.vue.d.ts +2 -12
  9. package/dist/components/tt-table/src/components/TableAction.vue.js +78 -175
  10. package/dist/components/tt-table/src/hooks/useGridProps.js +64 -60
  11. package/dist/components/tt-table/src/hooks/useTableData.js +77 -74
  12. package/dist/components/tt-table/src/types/table.d.ts +2 -1
  13. package/dist/components/tt-table/src/utils/table-api.d.ts +2 -1
  14. package/dist/components/tt-table/src/utils/table-api.js +3 -2
  15. package/dist/components/tt-vtable/index.js +54 -0
  16. package/dist/components/tt-vtable/src/components/TtVTable.vue.d.ts +188 -0
  17. package/dist/components/tt-vtable/src/components/TtVTable.vue.js +227 -0
  18. package/dist/components/tt-vtable/src/components/TtVTable.vue2.js +4 -0
  19. package/dist/components/tt-vtable/src/components/TtVTableForm.vue.d.ts +32 -0
  20. package/dist/components/tt-vtable/src/components/TtVTableForm.vue.js +121 -0
  21. package/dist/components/tt-vtable/src/components/TtVTableForm.vue2.js +4 -0
  22. package/dist/components/tt-vtable/src/components/VTableEmpty.vue.d.ts +64 -0
  23. package/dist/components/tt-vtable/src/components/VTableEmpty.vue.js +97 -0
  24. package/dist/components/tt-vtable/src/components/VTableEmpty.vue2.js +4 -0
  25. package/dist/components/tt-vtable/src/components/VTablePagination.vue.d.ts +53 -0
  26. package/dist/components/tt-vtable/src/components/VTablePagination.vue.js +52 -0
  27. package/dist/components/tt-vtable/src/components/VTablePagination.vue2.js +4 -0
  28. package/dist/components/tt-vtable/src/components/VTableSelectionAlert.vue.d.ts +35 -0
  29. package/dist/components/tt-vtable/src/components/VTableSelectionAlert.vue.js +50 -0
  30. package/dist/components/tt-vtable/src/components/VTableSelectionAlert.vue2.js +4 -0
  31. package/dist/components/tt-vtable/src/components/VTableToolbar.vue.d.ts +63 -0
  32. package/dist/components/tt-vtable/src/components/VTableToolbar.vue.js +126 -0
  33. package/dist/components/tt-vtable/src/components/VTableToolbar.vue2.js +4 -0
  34. package/dist/components/tt-vtable/src/components/VTableViewport.vue.js +133 -0
  35. package/dist/components/tt-vtable/src/components/VTableViewport.vue2.js +4 -0
  36. package/dist/components/tt-vtable/src/composables/useVTable.d.ts +41 -0
  37. package/dist/components/tt-vtable/src/composables/useVTable.js +25 -0
  38. package/dist/components/tt-vtable/src/composables/useVTableFormRender.d.ts +13 -0
  39. package/dist/components/tt-vtable/src/composables/useVTableFormRender.js +92 -0
  40. package/dist/components/tt-vtable/src/composables/useVTableRender.d.ts +13 -0
  41. package/dist/components/tt-vtable/src/composables/useVTableRender.js +13 -0
  42. package/dist/components/tt-vtable/src/engine/visactor/createListTable.d.ts +10 -0
  43. package/dist/components/tt-vtable/src/engine/visactor/createListTable.js +63 -0
  44. package/dist/components/tt-vtable/src/engine/visactor/createVueCellLayout.d.ts +37 -0
  45. package/dist/components/tt-vtable/src/engine/visactor/createVueCellLayout.js +133 -0
  46. package/dist/components/tt-vtable/src/engine/visactor/index.d.ts +8 -0
  47. package/dist/components/tt-vtable/src/engine/visactor/native-boundaries.d.ts +23 -0
  48. package/dist/components/tt-vtable/src/engine/visactor/native-boundaries.js +70 -0
  49. package/dist/components/tt-vtable/src/engine/visactor/record-adapter.d.ts +38 -0
  50. package/dist/components/tt-vtable/src/engine/visactor/record-adapter.js +41 -0
  51. package/dist/components/tt-vtable/src/engine/visactor/toColumnDefinitions.d.ts +45 -0
  52. package/dist/components/tt-vtable/src/engine/visactor/toColumnDefinitions.js +73 -0
  53. package/dist/components/tt-vtable/src/engine/visactor/toListTableOptions.d.ts +25 -0
  54. package/dist/components/tt-vtable/src/engine/visactor/toListTableOptions.js +25 -0
  55. package/dist/components/tt-vtable/src/engine/visactor/types.d.ts +29 -0
  56. package/dist/components/tt-vtable/src/features/column-preferences/column-preference-storage.d.ts +36 -0
  57. package/dist/components/tt-vtable/src/features/column-preferences/column-preference-storage.js +52 -0
  58. package/dist/components/tt-vtable/src/features/column-preferences/useColumnPreferences.d.ts +74 -0
  59. package/dist/components/tt-vtable/src/features/column-preferences/useColumnPreferences.js +232 -0
  60. package/dist/components/tt-vtable/src/features/editing/useCellEditing.d.ts +48 -0
  61. package/dist/components/tt-vtable/src/features/editing/useCellEditing.js +102 -0
  62. package/dist/components/tt-vtable/src/features/form-integration/useVTableForm.d.ts +51 -0
  63. package/dist/components/tt-vtable/src/features/pagination/useTablePagination.d.ts +40 -0
  64. package/dist/components/tt-vtable/src/features/pagination/useTablePagination.js +51 -0
  65. package/dist/components/tt-vtable/src/features/querying/useRecordQuery.d.ts +38 -0
  66. package/dist/components/tt-vtable/src/features/querying/useRecordQuery.js +57 -0
  67. package/dist/components/tt-vtable/src/features/records/index.d.ts +3 -0
  68. package/dist/components/tt-vtable/src/features/records/record-index.d.ts +122 -0
  69. package/dist/components/tt-vtable/src/features/records/record-index.js +209 -0
  70. package/dist/components/tt-vtable/src/features/records/useRecordSource.d.ts +41 -0
  71. package/dist/components/tt-vtable/src/features/records/useRecordSource.js +249 -0
  72. package/dist/components/tt-vtable/src/features/selection/useRowSelection.d.ts +65 -0
  73. package/dist/components/tt-vtable/src/features/selection/useRowSelection.js +129 -0
  74. package/dist/components/tt-vtable/src/features/tree/useTreeRecords.d.ts +60 -0
  75. package/dist/components/tt-vtable/src/features/tree/useTreeRecords.js +125 -0
  76. package/dist/components/tt-vtable/src/public/index.d.ts +7 -0
  77. package/dist/components/tt-vtable/src/public/table-api.d.ts +215 -0
  78. package/dist/components/tt-vtable/src/public/table-column.d.ts +123 -0
  79. package/dist/components/tt-vtable/src/public/table-errors.d.ts +26 -0
  80. package/dist/components/tt-vtable/src/public/table-errors.js +26 -0
  81. package/dist/components/tt-vtable/src/public/table-events.d.ts +69 -0
  82. package/dist/components/tt-vtable/src/public/table-props.d.ts +216 -0
  83. package/dist/components/tt-vtable/src/public/table-slots.d.ts +37 -0
  84. package/dist/components/tt-vtable/src/runtime/createVTableController.d.ts +12 -0
  85. package/dist/components/tt-vtable/src/runtime/createVTableController.js +238 -0
  86. package/dist/components/tt-vtable/src/runtime/createVTableRuntime.d.ts +79 -0
  87. package/dist/components/tt-vtable/src/runtime/createVTableRuntime.js +380 -0
  88. package/dist/index.d.ts +1 -0
  89. package/dist/index.js +129 -115
  90. package/dist/packages/utils/src/is.js +46 -37
  91. package/dist/style.css +1 -1
  92. package/package.json +3 -1
  93. package/dist/assets/svg/action_more.svg.js +0 -4
@@ -1,7 +1,7 @@
1
1
  import "axios";
2
2
  import "element-plus";
3
3
  import { isString as L, isFunction as N, isObject as Re } from "../../../../packages/utils/src/is.js";
4
- import { getCurrentInstance as he, shallowRef as J, watch as Q, unref as d, onBeforeUpdate as ve, getCurrentScope as Ce, onScopeDispose as Me, toValue as S, nextTick as P, isRef as be } from "vue";
4
+ import { getCurrentInstance as he, shallowRef as J, watch as Q, toValue as y, unref as d, onBeforeUpdate as ve, getCurrentScope as Ce, onScopeDispose as Me, nextTick as S, isRef as be } from "vue";
5
5
  import "dayjs";
6
6
  import "numeral";
7
7
  import "xe-utils";
@@ -53,7 +53,7 @@ const De = /* @__PURE__ */ new Set([
53
53
  "clearRadioReserve"
54
54
  ]), ye = /* @__PURE__ */ new Set(["loadData", "reloadData"]);
55
55
  function X(l) {
56
- const f = S(l);
56
+ const f = y(l);
57
57
  if (f)
58
58
  return be(f) ? f.value ?? [] : f;
59
59
  }
@@ -66,7 +66,7 @@ async function ke(l, f, C, g = () => !0) {
66
66
  }
67
67
  function je(l, f, C, g, i) {
68
68
  const R = he(), b = J([]), D = J();
69
- let A = !1, s = !1, M = 0, h;
69
+ let A = !1, u = !1, M = 0, h;
70
70
  const q = Symbol("tt-table-emitted-rows-event");
71
71
  let Y = 0, m, v = !1, T = 0, U = Promise.resolve();
72
72
  function p() {
@@ -85,7 +85,7 @@ function je(l, f, C, g, i) {
85
85
  const t = X(i.data);
86
86
  return t != null && t.length ? "data" : p() ? "model" : "data";
87
87
  }
88
- function y(e) {
88
+ function E(e) {
89
89
  const t = U.then(e);
90
90
  return U = t.then(
91
91
  () => {
@@ -96,39 +96,39 @@ function je(l, f, C, g, i) {
96
96
  }
97
97
  function ee(e, t) {
98
98
  return new Proxy(e, {
99
- get(o, a, r) {
100
- return a === q ? t : Reflect.get(o, a, r);
99
+ get(r, a, o) {
100
+ return a === q ? t : Reflect.get(r, a, o);
101
101
  },
102
- set(o, a, r) {
103
- const u = Reflect.set(o, a, r);
104
- return u && t === m && (v = !0), u;
102
+ set(r, a, o) {
103
+ const s = Reflect.set(r, a, o);
104
+ return s && t === m && (v = !0), s;
105
105
  },
106
- deleteProperty(o, a) {
107
- const r = Reflect.deleteProperty(o, a);
108
- return r && t === m && (v = !0), r;
106
+ deleteProperty(r, a) {
107
+ const o = Reflect.deleteProperty(r, a);
108
+ return o && t === m && (v = !0), o;
109
109
  },
110
- defineProperty(o, a, r) {
111
- const u = Reflect.defineProperty(o, a, r);
112
- return u && t === m && (v = !0), u;
110
+ defineProperty(r, a, o) {
111
+ const s = Reflect.defineProperty(r, a, o);
112
+ return s && t === m && (v = !0), s;
113
113
  }
114
114
  });
115
115
  }
116
116
  function te(e) {
117
117
  const t = e == null ? void 0 : e[q], n = m;
118
118
  if (n === void 0 || t !== n) return !1;
119
- const o = v;
120
- return m = void 0, v = !1, !o;
119
+ const r = v;
120
+ return m = void 0, v = !1, !r;
121
121
  }
122
122
  function ne(e) {
123
- P(() => {
123
+ S(() => {
124
124
  m === e && (m = void 0, v = !1);
125
125
  });
126
126
  }
127
127
  function V(e) {
128
- const t = S(i.api), n = p(), o = Z(), a = o && !t;
129
- o && (D.value = "model");
130
- const r = a ? ++Y : void 0, u = r ? ee(e, r) : e;
131
- m = r, v = !1, b.value = u, (o || !n) && (C.value = u, r && ne(r));
128
+ const t = y(i.api), n = p(), r = Z(), a = r && !t;
129
+ r && (D.value = "model");
130
+ const o = a ? ++Y : void 0, s = o ? ee(e, o) : e;
131
+ m = o, v = !1, b.value = s, (r || !n && !t) && (C.value = s, o && ne(o));
132
132
  }
133
133
  function k(e) {
134
134
  var n;
@@ -136,33 +136,33 @@ function je(l, f, C, g, i) {
136
136
  return (e === "visible" ? t == null ? void 0 : t.visibleData : t == null ? void 0 : t.fullData) || [];
137
137
  }
138
138
  function O(e = "full") {
139
- return s || !d(f) ? !1 : (h = void 0, V(k(e)), !0);
139
+ return u || !d(f) ? !1 : (h = void 0, V(k(e)), !0);
140
140
  }
141
141
  function j(e = "full") {
142
- if (s || M || !d(b).length && !k(e).length) return;
142
+ if (u || M || !d(b).length && !k(e).length) return;
143
143
  if (h) {
144
144
  e === "visible" && (h.source = e);
145
145
  return;
146
146
  }
147
147
  const t = { inputVersion: T, source: e };
148
- h = t, P().then(() => {
149
- h === t && (h = void 0, !(s || M || t.inputVersion !== T) && O(t.source));
148
+ h = t, S().then(() => {
149
+ h === t && (h = void 0, !(u || M || t.inputVersion !== T) && O(t.source));
150
150
  });
151
151
  }
152
152
  function z() {
153
153
  h = void 0;
154
154
  }
155
- function oe() {
155
+ function re() {
156
156
  j();
157
157
  }
158
158
  async function F(e, t = "full") {
159
159
  const n = T;
160
- return y(async () => {
161
- if (!s) {
160
+ return E(async () => {
161
+ if (!u) {
162
162
  M += 1;
163
163
  try {
164
- const o = await e();
165
- return await P(), !s && n === T && O(t), o;
164
+ const r = await e();
165
+ return await S(), !u && n === T && O(t), r;
166
166
  } finally {
167
167
  M -= 1;
168
168
  }
@@ -170,11 +170,11 @@ function je(l, f, C, g, i) {
170
170
  });
171
171
  }
172
172
  const K = /* @__PURE__ */ new WeakMap();
173
- function re(e) {
173
+ function oe(e) {
174
174
  const t = Reflect.get(e, "getRefMaps");
175
175
  if (!N(t)) return;
176
176
  const n = Reflect.apply(t, e, []);
177
- return S(n.refTable);
177
+ return y(n.refTable);
178
178
  }
179
179
  function ie(e) {
180
180
  if (L(e)) return e;
@@ -184,72 +184,72 @@ function je(l, f, C, g, i) {
184
184
  return e.updateData();
185
185
  }
186
186
  function le(e, t) {
187
- var n, o;
188
- ye.has(e) && t[0] && ((n = i.prepareRows) == null || n.call(i, t[0])), e === "loadTreeChildren" && t[1] && ((o = i.prepareRows) == null || o.call(i, t[1]));
187
+ var n, r;
188
+ ye.has(e) && t[0] && ((n = i.prepareRows) == null || n.call(i, t[0])), e === "loadTreeChildren" && t[1] && ((r = i.prepareRows) == null || r.call(i, t[1]));
189
189
  }
190
- function se(e) {
190
+ function ue(e) {
191
191
  if (!e) return;
192
192
  const t = K.get(e);
193
193
  if (t) return t;
194
- const n = /* @__PURE__ */ new Map(), o = new Proxy(e, {
195
- get(a, r, u) {
196
- let c = Reflect.get(a, r, u);
197
- if (!L(r)) return c;
198
- const W = xe.has(r);
199
- if (!W && !De.has(r)) return c;
200
- let E = a;
194
+ const n = /* @__PURE__ */ new Map(), r = new Proxy(e, {
195
+ get(a, o, s) {
196
+ let c = Reflect.get(a, o, s);
197
+ if (!L(o)) return c;
198
+ const W = xe.has(o);
199
+ if (!W && !De.has(o)) return c;
200
+ let P = a;
201
201
  if (!N(c)) {
202
- const w = re(a);
203
- w && (E = w, c = Reflect.get(w, r));
202
+ const w = oe(a);
203
+ w && (P = w, c = Reflect.get(w, o));
204
204
  }
205
205
  if (!N(c)) return c;
206
- const $ = n.get(r);
206
+ const $ = n.get(o);
207
207
  if ($) return $;
208
- const me = r === "undo" || r === "redo" ? "visible" : "full", G = (...w) => {
208
+ const me = o === "undo" || o === "redo" ? "visible" : "full", G = (...w) => {
209
209
  if (W) {
210
- const B = Reflect.apply(c, E, w);
210
+ const B = Reflect.apply(c, P, w);
211
211
  return Promise.resolve(B).then((we) => {
212
212
  var H;
213
213
  return (H = i.onSelectionMutated) == null || H.call(i), we;
214
214
  });
215
215
  }
216
- if (le(r, w), r === "syncData") return F(() => ae(a));
217
- if (r === "commitProxy") {
216
+ if (le(o, w), o === "syncData") return F(() => ae(a));
217
+ if (o === "commitProxy") {
218
218
  const B = ie(w[0]);
219
219
  if (!Te.has(B || ""))
220
- return Reflect.apply(c, E, w);
220
+ return Reflect.apply(c, P, w);
221
221
  }
222
- return F(() => Reflect.apply(c, E, w), me);
222
+ return F(() => Reflect.apply(c, P, w), me);
223
223
  };
224
- return n.set(r, G), G;
224
+ return n.set(o, G), G;
225
225
  }
226
226
  });
227
- return K.set(e, o), o;
227
+ return K.set(e, r), r;
228
228
  }
229
229
  async function I(e, t) {
230
230
  var c;
231
- if (s || !x(t)) return !1;
231
+ if (u || !x(t)) return !1;
232
232
  const n = d(f);
233
233
  if (!n) return !1;
234
- const { treeConfig: o, clearTreeExpand: a, mergeCells: r } = d(l), u = n.getTreeExpandRecords();
234
+ const { treeConfig: r, clearTreeExpand: a, mergeCells: o } = d(l), s = n.getTreeExpandRecords();
235
235
  M += 1;
236
236
  try {
237
- return (c = i.prepareRows) == null || c.call(i, e), await n.loadData(e), s || !x(t) || r && (await n.setMergeCells(r), s || !x(t)) || (a ? await n.clearTreeExpand() : u.length && (o != null && o.reserve) && await n.setTreeExpand(u, !0), s || !x(t)) ? !1 : (b.value = e, g("load-data"), !0);
237
+ return (c = i.prepareRows) == null || c.call(i, e), await n.loadData(e), u || !x(t) || o && (await n.setMergeCells(o), u || !x(t)) || (a ? await n.clearTreeExpand() : s.length && (r != null && r.reserve) && await n.setTreeExpand(s, !0), u || !x(t)) ? !1 : (b.value = e, g("load-data"), !0);
238
238
  } finally {
239
239
  M -= 1;
240
240
  }
241
241
  }
242
- function ue(e, t) {
243
- return y(() => I(e, t));
242
+ function se(e, t) {
243
+ return E(() => I(e, t));
244
244
  }
245
245
  function fe(e, t) {
246
- return y(async () => !await I(e, t) || s || !x(t) ? !1 : (V(e), !0));
246
+ return E(async () => !await I(e, t) || u || !x(t) ? !1 : (V(e), !0));
247
247
  }
248
248
  function ce(e, t) {
249
- return y(async () => {
250
- var o;
251
- if (await P(), s || !t()) return !1;
252
- const n = ((o = d(f)) == null ? void 0 : o.getTableData().fullData) || [];
249
+ return E(async () => {
250
+ var r;
251
+ if (await S(), u || !t()) return !1;
252
+ const n = ((r = d(f)) == null ? void 0 : r.getTableData().fullData) || [];
253
253
  return !e.length && !d(b).length && !n.length ? !1 : I(e, t);
254
254
  });
255
255
  }
@@ -259,13 +259,16 @@ function je(l, f, C, g, i) {
259
259
  }
260
260
  function pe() {
261
261
  const { api: e, data: t } = i;
262
- if (S(e)) return;
262
+ if (y(e)) return;
263
263
  if (D.value === "model" && p()) return d(C) || [];
264
264
  const n = X(t);
265
265
  return n !== void 0 ? n : p() ? d(C) || [] : void 0;
266
266
  }
267
267
  return D.value = _(), A = p(), Q(
268
- () => p() ? d(C) : void 0,
268
+ () => {
269
+ if (!y(i.api))
270
+ return p() ? d(C) : void 0;
271
+ },
269
272
  () => {
270
273
  p() && (D.value = "model");
271
274
  },
@@ -273,10 +276,10 @@ function je(l, f, C, g, i) {
273
276
  ), Q(
274
277
  pe,
275
278
  (e, t, n) => {
276
- let o = !0;
279
+ let r = !0;
277
280
  n(() => {
278
- o = !1;
279
- }), !te(e) && (T += 1, z(), e && ce(e, () => o).catch((a) => {
281
+ r = !1;
282
+ }), !te(e) && (T += 1, z(), e && ce(e, () => r).catch((a) => {
280
283
  }));
281
284
  },
282
285
  { immediate: !0, deep: 1, flush: "post" }
@@ -284,21 +287,21 @@ function je(l, f, C, g, i) {
284
287
  const e = p();
285
288
  e !== A && (A = e, D.value = _());
286
289
  }), Ce() && Me(() => {
287
- s = !0, h = void 0, m = void 0, v = !1;
290
+ u = !0, h = void 0, m = void 0, v = !1;
288
291
  }), {
289
292
  rows: b,
290
- loadRows: ue,
293
+ loadRows: se,
291
294
  applyRows: fe,
292
295
  emitRows: V,
293
296
  getDataSource: de,
294
297
  runDataOperation: F,
295
298
  scheduleRowsCommit: j,
296
299
  cancelRowsCommit: z,
297
- onDataChange: oe,
300
+ onDataChange: re,
298
301
  commitRows: O,
299
- createTableInstanceFacade: se,
302
+ createTableInstanceFacade: ue,
300
303
  /** 判断表格作用域是否仍然有效。 */
301
- isActive: () => !s
304
+ isActive: () => !u
302
305
  };
303
306
  }
304
307
  export {
@@ -492,9 +492,10 @@ export type TtTableMethods<DT = VxeTablePropTypes.Row> = {
492
492
  reload: (data?: FetchParams) => Promise<void>;
493
493
  /**
494
494
  * @description: 重新计算高度
495
+ * @param full 是否连列宽一起重算,默认重算
495
496
  * @return {*}
496
497
  */
497
- redoHeight: () => void;
498
+ redoHeight: (full?: boolean) => void;
498
499
  /**
499
500
  * @description: 设置表格props
500
501
  * @param {Partial<TtTableProps>} props 表格props
@@ -75,9 +75,10 @@ declare class TableApi<Row = any> {
75
75
  setProps(props: Partial<TtTableProps<Row>>): void;
76
76
  /**
77
77
  * @description: 重新计算高度
78
+ * @param full 是否连列宽一起重算,默认重算
78
79
  * @return {*}
79
80
  */
80
- redoHeight(): void;
81
+ redoHeight(full?: boolean): void;
81
82
  /**
82
83
  * @description: 设置表格columns
83
84
  * @param {VxeGridPropTypes.Columns<DT>} columns columns
@@ -135,10 +135,11 @@ class F {
135
135
  }
136
136
  /**
137
137
  * @description: 重新计算高度
138
+ * @param full 是否连列宽一起重算,默认重算
138
139
  * @return {*}
139
140
  */
140
- redoHeight() {
141
- this.methods.redoHeight();
141
+ redoHeight(t) {
142
+ this.methods.redoHeight(t);
142
143
  }
143
144
  /**
144
145
  * @description: 设置表格columns
@@ -0,0 +1,54 @@
1
+ import "axios";
2
+ import "element-plus";
3
+ import "dayjs";
4
+ import "vue";
5
+ import { withInstall as t } from "../../packages/utils/src/install.js";
6
+ import "numeral";
7
+ import "xe-utils";
8
+ import "dayjs/plugin/utc";
9
+ import "dayjs/plugin/timezone";
10
+ import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
+ import "lodash-es";
16
+ import o from "./src/components/TtVTable.vue.js";
17
+ import m from "./src/components/TtVTableForm.vue.js";
18
+ import "../tt-select/index.js";
19
+ import "../tt-checkbox/index.js";
20
+ import "../tt-radio-group/index.js";
21
+ import "../tt-panel-select/index.js";
22
+ import "../tt-upload/index.js";
23
+ import "../tt-api-component/index.js";
24
+ import "vee-validate";
25
+ import "../../utils/uppercaseInput.js";
26
+ import "@tanstack/vue-store";
27
+ import "es-toolkit/compat";
28
+ import "zod";
29
+ import "../tt-form/src/shared/zod-defaults.js";
30
+ import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
31
+ import "vue-router";
32
+ import "@vueuse/core";
33
+ import "../tt-button/index.js";
34
+ import "../tt-icon/index.js";
35
+ /* empty css */
36
+ /* empty css */
37
+ import "../tt-form/src/components/Slot.js";
38
+ import "../tt-form-item-error-tooltip/index.js";
39
+ /* empty css */
40
+ import "../tt-form/src/form/RenderContent.vue.js";
41
+ import "@vee-validate/zod";
42
+ import "../tt-text/index.js";
43
+ import "../tt-form/src/form-render/FormFieldContact.js";
44
+ /* empty css */
45
+ /* empty css */
46
+ import "../tt-nav-anchor/index.js";
47
+ /* empty css */
48
+ /* empty css */
49
+ const X = t(o), Y = t(m);
50
+ export {
51
+ X as TtVTable,
52
+ Y as TtVTableForm,
53
+ X as default
54
+ };
@@ -0,0 +1,188 @@
1
+ import { TtVTableApi, TtVTableColumn, TtVTableEditCommit, TtVTableFeatureOptions, TtVTableFetchRecords, TtVTableFetchRequest, TtVTableFetchResponse, TtVTableMutationMode, TtVTableNativeEvents, TtVTableNativeOptions, TtVTablePageChange, TtVTableRecordChange, TtVTableRenderingOptions, TtVTableRowKey, TtVTableRowKeySource, TtVTableSortDescriptor, TtVTableTreeLoadError, TtVTableTreeLoadSuccess } from '../public';
2
+ import { TtVTableController } from '../runtime/createVTableController';
3
+ /** 组件内部统一使用的记录类型。 */
4
+ type VTableRow = Record<string, unknown>;
5
+ /** 组件内部统一使用的查询参数。 */
6
+ type VTableQueryParams = Record<string, unknown>;
7
+ /** TtVTable 运行时属性。 */
8
+ interface VTableComponentProps {
9
+ /** 本地记录根快照。 */
10
+ records?: readonly VTableRow[];
11
+ /** 远程记录请求。 */
12
+ fetchRecords?: TtVTableFetchRecords<VTableRow, VTableQueryParams>;
13
+ /** 语义列。 */
14
+ columns: readonly TtVTableColumn<VTableRow, TtVTableRowKey>[];
15
+ /** 稳定业务主键来源。 */
16
+ rowKey: TtVTableRowKeySource<VTableRow, TtVTableRowKey>;
17
+ /** 远程查询参数根。 */
18
+ queryParams?: VTableQueryParams;
19
+ /** 可组合 feature。 */
20
+ features?: TtVTableFeatureOptions<VTableRow, TtVTableRowKey>;
21
+ /** 记录所有权策略。 */
22
+ mutationMode?: TtVTableMutationMode;
23
+ /** Vue DOM 渲染配置。 */
24
+ rendering?: TtVTableRenderingOptions;
25
+ /** 安全原生 options。 */
26
+ nativeOptions?: TtVTableNativeOptions;
27
+ /** 安全原生事件。 */
28
+ nativeEvents?: TtVTableNativeEvents;
29
+ /** 表格整体宽度。 */
30
+ width?: number | string;
31
+ /** 表格整体高度。 */
32
+ height?: number | string;
33
+ /** useVTable 使用的内部稳定控制器。 */
34
+ controller?: TtVTableController<VTableRow, TtVTableRowKey>;
35
+ }
36
+ /** TtVTable 属性。 */
37
+ type __VLS_Props = VTableComponentProps;
38
+ type __VLS_PublicProps = {
39
+ "selectedRowKeys"?: TtVTableRowKey[];
40
+ } & __VLS_Props;
41
+ declare function __VLS_template(): {
42
+ attrs: Partial<{}>;
43
+ slots: {
44
+ toolbar?(_: {
45
+ tableApi: TtVTableApi<VTableRow, TtVTableRowKey>;
46
+ }): any;
47
+ empty?(_: {
48
+ tableApi: TtVTableApi<VTableRow, TtVTableRowKey>;
49
+ }): any;
50
+ error?(_: {
51
+ error: Error;
52
+ tableApi: TtVTableApi<VTableRow, TtVTableRowKey>;
53
+ retry: () => Promise<boolean>;
54
+ }): any;
55
+ };
56
+ refs: {};
57
+ rootEl: any;
58
+ };
59
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
60
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
61
+ tableApi: TtVTableApi<VTableRow, TtVTableRowKey>;
62
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
63
+ "fetch-success": (response: TtVTableFetchResponse<VTableRow>, request: TtVTableFetchRequest<VTableQueryParams>) => any;
64
+ "fetch-error": (error: Error, request: TtVTableFetchRequest<VTableQueryParams>) => any;
65
+ ready: (tableApi: TtVTableApi<VTableRow, TtVTableRowKey>) => any;
66
+ "sort-change": (sort: readonly TtVTableSortDescriptor[]) => any;
67
+ "filter-change": (filters: Readonly<Record<string, unknown>>) => any;
68
+ "page-change": (change: TtVTablePageChange) => any;
69
+ "record-change": (change: TtVTableRecordChange<VTableRow, TtVTableRowKey>) => any;
70
+ "edit-commit": (change: TtVTableEditCommit<TtVTableRowKey>) => any;
71
+ "edit-error": (error: Error) => any;
72
+ "tree-load-success": (change: TtVTableTreeLoadSuccess<VTableRow, TtVTableRowKey>) => any;
73
+ "tree-load-error": (failure: TtVTableTreeLoadError<TtVTableRowKey>) => any;
74
+ "column-preferences-change": (preferences: unknown) => any;
75
+ "update:selectedRowKeys": (value: TtVTableRowKey[]) => any;
76
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
77
+ "onFetch-success"?: ((response: TtVTableFetchResponse<VTableRow>, request: TtVTableFetchRequest<VTableQueryParams>) => any) | undefined;
78
+ "onFetch-error"?: ((error: Error, request: TtVTableFetchRequest<VTableQueryParams>) => any) | undefined;
79
+ onReady?: ((tableApi: TtVTableApi<VTableRow, TtVTableRowKey>) => any) | undefined;
80
+ "onSort-change"?: ((sort: readonly TtVTableSortDescriptor[]) => any) | undefined;
81
+ "onFilter-change"?: ((filters: Readonly<Record<string, unknown>>) => any) | undefined;
82
+ "onPage-change"?: ((change: TtVTablePageChange) => any) | undefined;
83
+ "onRecord-change"?: ((change: TtVTableRecordChange<VTableRow, TtVTableRowKey>) => any) | undefined;
84
+ "onEdit-commit"?: ((change: TtVTableEditCommit<TtVTableRowKey>) => any) | undefined;
85
+ "onEdit-error"?: ((error: Error) => any) | undefined;
86
+ "onTree-load-success"?: ((change: TtVTableTreeLoadSuccess<VTableRow, TtVTableRowKey>) => any) | undefined;
87
+ "onTree-load-error"?: ((failure: TtVTableTreeLoadError<TtVTableRowKey>) => any) | undefined;
88
+ "onColumn-preferences-change"?: ((preferences: unknown) => any) | undefined;
89
+ "onUpdate:selectedRowKeys"?: ((value: TtVTableRowKey[]) => any) | undefined;
90
+ }>, {
91
+ width: number | string;
92
+ height: number | string;
93
+ records: readonly VTableRow[];
94
+ queryParams: VTableQueryParams;
95
+ nativeOptions: TtVTableNativeOptions;
96
+ rendering: TtVTableRenderingOptions;
97
+ fetchRecords: TtVTableFetchRecords<VTableRow, VTableQueryParams>;
98
+ features: TtVTableFeatureOptions<VTableRow, TtVTableRowKey>;
99
+ mutationMode: TtVTableMutationMode;
100
+ nativeEvents: Partial<{
101
+ keydown: import('../public').TtVTableNativeEventListener<"keydown">;
102
+ scroll: import('../public').TtVTableNativeEventListener<"scroll">;
103
+ updated: import('../public').TtVTableNativeEventListener<"updated">;
104
+ selected_cell: import('../public').TtVTableNativeEventListener<"selected_cell">;
105
+ selected_clear: import('../public').TtVTableNativeEventListener<"selected_clear">;
106
+ click_cell: import('../public').TtVTableNativeEventListener<"click_cell">;
107
+ dblclick_cell: import('../public').TtVTableNativeEventListener<"dblclick_cell">;
108
+ mouseenter_table: import('../public').TtVTableNativeEventListener<"mouseenter_table">;
109
+ mouseleave_table: import('../public').TtVTableNativeEventListener<"mouseleave_table">;
110
+ mousedown_table: import('../public').TtVTableNativeEventListener<"mousedown_table">;
111
+ mousemove_table: import('../public').TtVTableNativeEventListener<"mousemove_table">;
112
+ mouseenter_cell: import('../public').TtVTableNativeEventListener<"mouseenter_cell">;
113
+ mouseleave_cell: import('../public').TtVTableNativeEventListener<"mouseleave_cell">;
114
+ mousemove_cell: import('../public').TtVTableNativeEventListener<"mousemove_cell">;
115
+ mousedown_cell: import('../public').TtVTableNativeEventListener<"mousedown_cell">;
116
+ mouseup_cell: import('../public').TtVTableNativeEventListener<"mouseup_cell">;
117
+ contextmenu_cell: import('../public').TtVTableNativeEventListener<"contextmenu_cell">;
118
+ contextmenu_canvas: import('../public').TtVTableNativeEventListener<"contextmenu_canvas">;
119
+ before_keydown: import('../public').TtVTableNativeEventListener<"before_keydown">;
120
+ can_scroll: import('../public').TtVTableNativeEventListener<"can_scroll">;
121
+ scroll_vertical_end: import('../public').TtVTableNativeEventListener<"scroll_vertical_end">;
122
+ scroll_horizontal_end: import('../public').TtVTableNativeEventListener<"scroll_horizontal_end">;
123
+ resize_column: import('../public').TtVTableNativeEventListener<"resize_column">;
124
+ resize_column_end: import('../public').TtVTableNativeEventListener<"resize_column_end">;
125
+ resize_row: import('../public').TtVTableNativeEventListener<"resize_row">;
126
+ resize_row_end: import('../public').TtVTableNativeEventListener<"resize_row_end">;
127
+ change_header_position: import('../public').TtVTableNativeEventListener<"change_header_position">;
128
+ change_header_position_start: import('../public').TtVTableNativeEventListener<"change_header_position_start">;
129
+ changing_header_position: import('../public').TtVTableNativeEventListener<"changing_header_position">;
130
+ change_header_position_fail: import('../public').TtVTableNativeEventListener<"change_header_position_fail">;
131
+ sort_click: import('../public').TtVTableNativeEventListener<"sort_click">;
132
+ after_sort: import('../public').TtVTableNativeEventListener<"after_sort">;
133
+ freeze_click: import('../public').TtVTableNativeEventListener<"freeze_click">;
134
+ dropdown_menu_click: import('../public').TtVTableNativeEventListener<"dropdown_menu_click">;
135
+ mouseover_chart_symbol: import('../public').TtVTableNativeEventListener<"mouseover_chart_symbol">;
136
+ drag_select_end: import('../public').TtVTableNativeEventListener<"drag_select_end">;
137
+ selected_changed: import('../public').TtVTableNativeEventListener<"selected_changed">;
138
+ copy_data: import('../public').TtVTableNativeEventListener<"copy_data">;
139
+ drillmenu_click: import('../public').TtVTableNativeEventListener<"drillmenu_click">;
140
+ dropdown_icon_click: import('../public').TtVTableNativeEventListener<"dropdown_icon_click">;
141
+ dropdown_menu_clear: import('../public').TtVTableNativeEventListener<"dropdown_menu_clear">;
142
+ show_menu: import('../public').TtVTableNativeEventListener<"show_menu">;
143
+ hide_menu: import('../public').TtVTableNativeEventListener<"hide_menu">;
144
+ icon_click: import('../public').TtVTableNativeEventListener<"icon_click">;
145
+ pivot_sort_click: import('../public').TtVTableNativeEventListener<"pivot_sort_click">;
146
+ vchart_event_type: import('../public').TtVTableNativeEventListener<"vchart_event_type">;
147
+ change_order: import('../public').TtVTableNativeEventListener<"change_order">;
148
+ source_length_update: import('../public').TtVTableNativeEventListener<"source_length_update">;
149
+ legend_item_click: import('../public').TtVTableNativeEventListener<"legend_item_click">;
150
+ legend_item_hover: import('../public').TtVTableNativeEventListener<"legend_item_hover">;
151
+ legend_item_unHover: import('../public').TtVTableNativeEventListener<"legend_item_unHover">;
152
+ legend_change: import('../public').TtVTableNativeEventListener<"legend_change">;
153
+ mouseenter_axis: import('../public').TtVTableNativeEventListener<"mouseenter_axis">;
154
+ mouseleave_axis: import('../public').TtVTableNativeEventListener<"mouseleave_axis">;
155
+ switch_state_change: import('../public').TtVTableNativeEventListener<"switch_state_change">;
156
+ before_init: import('../public').TtVTableNativeEventListener<"before_init">;
157
+ before_update_option: import('../public').TtVTableNativeEventListener<"before_update_option">;
158
+ before_set_size: import('../public').TtVTableNativeEventListener<"before_set_size">;
159
+ after_render: import('../public').TtVTableNativeEventListener<"after_render">;
160
+ initialized: import('../public').TtVTableNativeEventListener<"initialized">;
161
+ after_update_cell_content_width: import('../public').TtVTableNativeEventListener<"after_update_cell_content_width">;
162
+ after_update_select_border_height: import('../public').TtVTableNativeEventListener<"after_update_select_border_height">;
163
+ mousedown_fill_handle: import('../public').TtVTableNativeEventListener<"mousedown_fill_handle">;
164
+ drag_fill_handle_end: import('../public').TtVTableNativeEventListener<"drag_fill_handle_end">;
165
+ dblclick_fill_handle: import('../public').TtVTableNativeEventListener<"dblclick_fill_handle">;
166
+ empty_tip_click: import('../public').TtVTableNativeEventListener<"empty_tip_click">;
167
+ empty_tip_dblclick: import('../public').TtVTableNativeEventListener<"empty_tip_dblclick">;
168
+ button_click: import('../public').TtVTableNativeEventListener<"button_click">;
169
+ before_cache_chart_image: import('../public').TtVTableNativeEventListener<"before_cache_chart_image">;
170
+ pasted_data: import('../public').TtVTableNativeEventListener<"pasted_data">;
171
+ plugin_event: import('../public').TtVTableNativeEventListener<"plugin_event">;
172
+ add_record: import('../public').TtVTableNativeEventListener<"add_record">;
173
+ delete_record: import('../public').TtVTableNativeEventListener<"delete_record">;
174
+ update_record: import('../public').TtVTableNativeEventListener<"update_record">;
175
+ add_column: import('../public').TtVTableNativeEventListener<"add_column">;
176
+ delete_column: import('../public').TtVTableNativeEventListener<"delete_column">;
177
+ merge_cells: import('../public').TtVTableNativeEventListener<"merge_cells">;
178
+ unmerge_cells: import('../public').TtVTableNativeEventListener<"unmerge_cells">;
179
+ }>;
180
+ controller: TtVTableController<VTableRow, TtVTableRowKey>;
181
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
182
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
183
+ export default _default;
184
+ type __VLS_WithTemplateSlots<T, S> = T & {
185
+ new (): {
186
+ $slots: S;
187
+ };
188
+ };