@sparqjs/schema-designer 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { Fragment as e, cloneVNode as t, computed as n, defineComponent as r, h as i, inject as a, isVNode as o, nextTick as s, onBeforeUnmount as c, onMounted as l, onScopeDispose as u, reactive as d, ref as f, toRaw as p, watch as m } from "vue";
2
2
  import { SPARQ_RICH_TEXT_REGISTRY_KEY as h, SPARQ_SCHEMA_RENDERER_KEY as g, SPARQ_SCHEMA_RUNTIME_KEY as _, SPARQ_SCHEMA_UI_ADAPTER_KEY as v, SPARQ_UI_KIT_KEY as y, SectionBlock as b, SparqView as x, createDefaultRichTextRegistry as S, createSchemaComponentRegistry as ee, createSchemaUiProxy as C, createSparqViewController as te, mergeSchemaComponentRegistry as ne, resolveFormChildLayout as re } from "@sparqjs/schema-vue";
3
- import { SCHEMA_COMPONENT_SECTION as w, SCHEMA_UI_TEXT as T, compareValidationRuleValue as ie, createDefaultInitialValues as ae, createSchemaRuntime as oe, evaluateCondition as se, evaluateFieldValueExpression as ce, matchesValidationFormat as E, normalizeValidationDateTimeValue as le, normalizeValidationTimeValue as ue, resolveRangeValidationParams as de } from "@sparqjs/schema-core";
4
- import { isConditionOperator as fe } from "@sparqjs/schema-protocol";
5
- import pe from "sortablejs";
6
- import { createElementPlusUiAdapter as me, createElementPlusUiKit as he, renderFieldLabelContent as ge } from "@sparqjs/schema-ui-element-plus";
3
+ import { SCHEMA_COMPONENT_SECTION as w, SCHEMA_UI_TEXT as ie, compareValidationRuleValue as ae, createDefaultInitialValues as oe, createSchemaRuntime as se, evaluateCondition as ce, evaluateFieldValueExpression as le, matchesValidationFormat as T, normalizeValidationDateTimeValue as ue, normalizeValidationTimeValue as de, resolveRangeValidationParams as fe } from "@sparqjs/schema-core";
4
+ import { isConditionOperator as pe } from "@sparqjs/schema-protocol";
5
+ import me from "sortablejs";
6
+ import { createElementPlusUiAdapter as he, createElementPlusUiKit as ge, renderFieldLabelContent as _e } from "@sparqjs/schema-ui-element-plus";
7
7
  //#region src/services/registry.ts
8
- var _e = [{
8
+ var ve = [{
9
9
  key: "schema.fields",
10
10
  async load(e) {
11
11
  return (e.fields ?? e.schema?.schema.fields ?? []).map((e) => ({
@@ -15,32 +15,32 @@ var _e = [{
15
15
  }));
16
16
  }
17
17
  }];
18
- function ve(e = []) {
18
+ function ye(e = []) {
19
19
  let t = /* @__PURE__ */ new Map();
20
20
  for (let n of e) t.set(n.key, n);
21
21
  return t;
22
22
  }
23
- function ye(e, t) {
24
- return t?.get(e) ?? _e.find((t) => t.key === e);
23
+ function be(e, t) {
24
+ return t?.get(e) ?? ve.find((t) => t.key === e);
25
25
  }
26
- async function be(e, t, n, r, i) {
27
- let a = ye(e, i);
26
+ async function xe(e, t, n, r, i) {
27
+ let a = be(e, i);
28
28
  if (!a?.load) throw Error(`Designer service "${e}" does not support load.`);
29
29
  return a.load(t, n, r);
30
30
  }
31
31
  //#endregion
32
32
  //#region src/shared/clone.ts
33
- function D(e) {
33
+ function E(e) {
34
34
  return JSON.parse(JSON.stringify(e));
35
35
  }
36
36
  //#endregion
37
37
  //#region src/state/form-view.ts
38
- function O(e, t) {
39
- let n = xe(e, t), r = n.children ?? [];
38
+ function D(e, t) {
39
+ let n = Se(e, t), r = n.children ?? [];
40
40
  return n.children = r, r;
41
41
  }
42
- function xe(e, t) {
43
- let n = Se(e);
42
+ function Se(e, t) {
43
+ let n = Ce(e);
44
44
  return n[t] || (n[t] = {
45
45
  title: e.schema.title,
46
46
  children: []
@@ -49,7 +49,7 @@ function xe(e, t) {
49
49
  children: []
50
50
  }, n[t]);
51
51
  }
52
- function Se(e) {
52
+ function Ce(e) {
53
53
  if (e.schema.views ??= {}, !e.schema.views.forms) {
54
54
  let t = e.schema.views.form;
55
55
  e.schema.views.forms = t ? { default: t } : {}, delete e.schema.views.form;
@@ -58,15 +58,15 @@ function Se(e) {
58
58
  }
59
59
  //#endregion
60
60
  //#region src/state/tree.ts
61
- var Ce = 1;
62
- function k(e, t) {
61
+ var we = 1;
62
+ function O(e, t) {
63
63
  for (let n of e) {
64
64
  if (n.id === t) return n;
65
- let e = k(n.children ?? [], t);
65
+ let e = O(n.children ?? [], t);
66
66
  if (e) return e;
67
67
  }
68
68
  }
69
- function A(e, t, n) {
69
+ function k(e, t, n) {
70
70
  for (let r = 0; r < e.length; r += 1) {
71
71
  let i = e[r];
72
72
  if (!i) continue;
@@ -76,55 +76,55 @@ function A(e, t, n) {
76
76
  index: r,
77
77
  node: i
78
78
  };
79
- let a = A(i.children ?? [], t, i.id);
79
+ let a = k(i.children ?? [], t, i.id);
80
80
  if (a) return a;
81
81
  }
82
82
  }
83
- function we(e, t, n) {
84
- if (!n) return O(e, t);
85
- let r = k(O(e, t), n);
83
+ function Te(e, t, n) {
84
+ if (!n) return D(e, t);
85
+ let r = O(D(e, t), n);
86
86
  if (r) return r.children ??= [], r.children;
87
87
  }
88
- function Te(e, t) {
89
- return (e.children ?? []).some((e) => e.id === t || Te(e, t));
88
+ function Ee(e, t) {
89
+ return (e.children ?? []).some((e) => e.id === t || Ee(e, t));
90
90
  }
91
- function Ee(e) {
92
- return ke(D(e));
91
+ function De(e) {
92
+ return Ae(E(e));
93
93
  }
94
- function De(e, t) {
94
+ function Oe(e, t) {
95
95
  return Math.max(0, Math.min(e, t));
96
96
  }
97
- function Oe(e, t) {
98
- O(e, t).forEach((e) => Ae(e));
97
+ function ke(e, t) {
98
+ D(e, t).forEach((e) => je(e));
99
99
  }
100
- function ke(e) {
101
- return Ae(e, !0), e;
100
+ function Ae(e) {
101
+ return je(e, !0), e;
102
102
  }
103
- function Ae(e, t = !1) {
104
- (t || !e.id) && (e.id = je()), e.children?.forEach((e) => Ae(e, t));
103
+ function je(e, t = !1) {
104
+ (t || !e.id) && (e.id = Me()), e.children?.forEach((e) => je(e, t));
105
105
  }
106
- function je() {
107
- return `node_${Date.now().toString(36)}_${Ce++}`;
106
+ function Me() {
107
+ return `node_${Date.now().toString(36)}_${we++}`;
108
108
  }
109
109
  //#endregion
110
110
  //#region src/state/schema.ts
111
- function Me(e) {
112
- return D(p(e));
111
+ function Ne(e) {
112
+ return E(p(e));
113
113
  }
114
- function Ne(e, t) {
115
- let n = Me(e);
116
- return Oe(n, t), n;
114
+ function Pe(e, t) {
115
+ let n = Ne(e);
116
+ return ke(n, t), n;
117
117
  }
118
- function Pe(e) {
118
+ function Fe(e) {
119
119
  return JSON.stringify(e, null, 2);
120
120
  }
121
- function Fe(e) {
121
+ function Ie(e) {
122
122
  return JSON.parse(e);
123
123
  }
124
124
  //#endregion
125
125
  //#region src/state/create-state.ts
126
- function Ie(e, t = "default", n, r) {
127
- let i = Ne(e, t);
126
+ function Le(e, t = "default", n, r) {
127
+ let i = Pe(e, t);
128
128
  return {
129
129
  schema: i,
130
130
  schemaVersion: 0,
@@ -137,21 +137,21 @@ function Ie(e, t = "default", n, r) {
137
137
  previewLoading: !1,
138
138
  saving: !1,
139
139
  resourceTreeOpen: !1,
140
- savedSchema: Me(i),
140
+ savedSchema: Ne(i),
141
141
  history: [],
142
142
  future: [],
143
- serviceRegistry: Le(n),
143
+ serviceRegistry: Re(n),
144
144
  extensionContext: r
145
145
  };
146
146
  }
147
- function Le(e) {
148
- if (e) return e instanceof Map ? e : ve(e);
147
+ function Re(e) {
148
+ if (e) return e instanceof Map ? e : ye(e);
149
149
  }
150
150
  //#endregion
151
151
  //#region src/state/output.ts
152
- function Re(e, t) {
153
- if (t === "resource") return Me(e);
154
- let n = Me(e), r = n.schema.views?.form, i = n.schema.views?.forms;
152
+ function ze(e, t) {
153
+ if (t === "resource") return Ne(e);
154
+ let n = Ne(e), r = n.schema.views?.form, i = n.schema.views?.forms;
155
155
  return r === void 0 && i === void 0 ? delete n.schema.views : n.schema.views = {
156
156
  ...r === void 0 ? {} : { form: r },
157
157
  ...i === void 0 ? {} : { forms: i }
@@ -159,22 +159,22 @@ function Re(e, t) {
159
159
  }
160
160
  //#endregion
161
161
  //#region src/shared/object-path.ts
162
- function ze(e) {
162
+ function Be(e) {
163
163
  return Array.isArray(e) ? e : e.split(".");
164
164
  }
165
- function Be(e) {
165
+ function Ve(e) {
166
166
  return typeof e == "object" && !!e && !Array.isArray(e);
167
167
  }
168
- function j(e, t) {
169
- return ze(t).reduce((e, t) => {
170
- if (Be(e)) return e[t];
168
+ function A(e, t) {
169
+ return Be(t).reduce((e, t) => {
170
+ if (Ve(e)) return e[t];
171
171
  }, e);
172
172
  }
173
- function M(e, t, n) {
174
- let r = ze(t), i = [], a = e;
173
+ function j(e, t, n) {
174
+ let r = Be(t), i = [], a = e;
175
175
  for (let e = 0; e < r.length - 1; e += 1) {
176
176
  let t = r[e], o = a[t];
177
- if (!Be(o)) {
177
+ if (!Ve(o)) {
178
178
  if (n === void 0) return;
179
179
  a[t] = {};
180
180
  }
@@ -184,18 +184,18 @@ function M(e, t, n) {
184
184
  }), a = a[t];
185
185
  }
186
186
  let o = r[r.length - 1];
187
- n === void 0 ? delete a[o] : a[o] = n, Ve(i);
187
+ n === void 0 ? delete a[o] : a[o] = n, He(i);
188
188
  }
189
- function Ve(e) {
189
+ function He(e) {
190
190
  for (let t = e.length - 1; t >= 0; --t) {
191
191
  let n = e[t], r = n.parent[n.key];
192
- if (!Be(r) || Object.keys(r).length > 0) break;
192
+ if (!Ve(r) || Object.keys(r).length > 0) break;
193
193
  delete n.parent[n.key];
194
194
  }
195
195
  }
196
196
  //#endregion
197
197
  //#region src/extensions/instance.ts
198
- var He = Object.freeze({
198
+ var Ue = Object.freeze({
199
199
  resourceTree: !0,
200
200
  templates: !0,
201
201
  formProperties: !0,
@@ -205,20 +205,20 @@ var He = Object.freeze({
205
205
  preview: !0,
206
206
  jsonView: !0
207
207
  });
208
- function Ue(e) {
208
+ function We(e) {
209
209
  return {
210
- ...He,
210
+ ...Ue,
211
211
  ...e
212
212
  };
213
213
  }
214
- var We = Object.freeze({
214
+ var Ge = Object.freeze({
215
215
  selectable: !0,
216
216
  editable: !0,
217
217
  movable: !0,
218
218
  copyable: !0,
219
219
  deletable: !0
220
220
  });
221
- function Ge(e) {
221
+ function Ke(e) {
222
222
  return { resolve(t) {
223
223
  let n = e?.(t);
224
224
  return n ? {
@@ -228,12 +228,12 @@ function Ge(e) {
228
228
  copyable: n.copyable ?? !0,
229
229
  deletable: n.deletable ?? !0,
230
230
  allowedParentIds: n.allowedParentIds ? [...n.allowedParentIds] : void 0
231
- } : We;
231
+ } : Ge;
232
232
  } };
233
233
  }
234
234
  //#endregion
235
235
  //#region src/shared/view-node.ts
236
- var Ke = new Set([
236
+ var qe = new Set([
237
237
  "group",
238
238
  "section",
239
239
  "card",
@@ -246,15 +246,15 @@ var Ke = new Set([
246
246
  "collapse-item",
247
247
  "custom"
248
248
  ]);
249
- function qe(e) {
250
- return Ke.has(e ?? "");
249
+ function Je(e) {
250
+ return qe.has(e ?? "");
251
251
  }
252
- function Je(e, t) {
253
- return e ? qe(e.type) ? e.type === "tabs" ? t.type === "tab" : e.type === "collapse" ? t.type === "collapse-item" : t.type !== "tab" && t.type !== "collapse-item" : !1 : t.type !== "tab" && t.type !== "collapse-item";
252
+ function Ye(e, t) {
253
+ return e ? Je(e.type) ? e.type === "tabs" ? t.type === "tab" : e.type === "collapse" ? t.type === "collapse-item" : t.type !== "tab" && t.type !== "collapse-item" : !1 : t.type !== "tab" && t.type !== "collapse-item";
254
254
  }
255
255
  //#endregion
256
256
  //#region src/state/component-config.ts
257
- var Ye = [
257
+ var Xe = [
258
258
  {
259
259
  label: "字符串",
260
260
  value: "string"
@@ -287,16 +287,16 @@ var Ye = [
287
287
  label: "JSON",
288
288
  value: "json"
289
289
  }
290
- ], Xe = {
291
- text: it("text"),
292
- password: it("password"),
293
- textarea: it("textarea"),
294
- select: at("select"),
295
- "multi-select": at("multi-select", "multiple"),
296
- radio: at("radio"),
297
- checkbox: at("checkbox", "multiple"),
298
- color: it("color"),
299
- "icon-input": it("icon-input"),
290
+ ], Ze = {
291
+ text: at("text"),
292
+ password: at("password"),
293
+ textarea: at("textarea"),
294
+ select: ot("select"),
295
+ "multi-select": ot("multi-select", "multiple"),
296
+ radio: ot("radio"),
297
+ checkbox: ot("checkbox", "multiple"),
298
+ color: at("color"),
299
+ "icon-input": at("icon-input"),
300
300
  "rich-text": {
301
301
  component: "rich-text",
302
302
  defaultType: "text",
@@ -369,8 +369,8 @@ var Ye = [
369
369
  allowedTypes: ["json"],
370
370
  multiple: "single"
371
371
  },
372
- "select-tree": at("select-tree", "field-configurable"),
373
- cascader: at("cascader", "field-configurable"),
372
+ "select-tree": ot("select-tree", "field-configurable"),
373
+ cascader: ot("cascader", "field-configurable"),
374
374
  "image-upload": {
375
375
  component: "image-upload",
376
376
  defaultType: "number",
@@ -392,18 +392,18 @@ var Ye = [
392
392
  multiple: "component-configurable"
393
393
  }
394
394
  };
395
- function Ze(e, t) {
395
+ function Qe(e, t) {
396
396
  return e ? t ? {
397
397
  component: e,
398
398
  defaultType: t.defaultType,
399
399
  allowedTypes: [...t.allowedTypes],
400
- multiple: Xe[e]?.multiple ?? "single"
401
- } : Xe[e] ?? it(e) : it("text");
400
+ multiple: Ze[e]?.multiple ?? "single"
401
+ } : Ze[e] ?? at(e) : at("text");
402
402
  }
403
- function N(e, t) {
404
- return Ze(e, t).defaultType;
403
+ function M(e, t) {
404
+ return Qe(e, t).defaultType;
405
405
  }
406
- function Qe(e) {
406
+ function $e(e) {
407
407
  switch (e) {
408
408
  case "text":
409
409
  case "textarea": return { showWordLimit: !0 };
@@ -424,26 +424,26 @@ function Qe(e) {
424
424
  default: return;
425
425
  }
426
426
  }
427
- function $e(e, t, n) {
428
- let r = new Set(Ze(e, n).allowedTypes), i = t?.type;
429
- return ot(i) && r.add(i), Ye.filter((e) => r.has(e.value));
430
- }
431
427
  function et(e, t, n) {
432
- return $e(e, t, n).length > 1;
428
+ let r = new Set(Qe(e, n).allowedTypes), i = t?.type;
429
+ return st(i) && r.add(i), Xe.filter((e) => r.has(e.value));
433
430
  }
434
- function tt(e) {
435
- return !!(e?.id || e?.resource_id || e?.version_id);
431
+ function tt(e, t, n) {
432
+ return et(e, t, n).length > 1;
436
433
  }
437
- function nt(e, t, n) {
438
- return t ? Ze(e, n).allowedTypes.some((e) => e === t.type) : !0;
434
+ function nt(e) {
435
+ return !!(e?.id || e?.resource_id || e?.version_id);
439
436
  }
440
437
  function rt(e, t, n) {
438
+ return t ? Qe(e, n).allowedTypes.some((e) => e === t.type) : !0;
439
+ }
440
+ function it(e, t, n) {
441
441
  let r = t?.type;
442
- if (tt(t) && ot(r)) return r;
443
- let i = Ze(e.component, n).allowedTypes;
444
- return r && i.includes(r) ? r : N(e.component, n);
442
+ if (nt(t) && st(r)) return r;
443
+ let i = Qe(e.component, n).allowedTypes;
444
+ return r && i.includes(r) ? r : M(e.component, n);
445
445
  }
446
- function it(e) {
446
+ function at(e) {
447
447
  return {
448
448
  component: e,
449
449
  defaultType: "string",
@@ -451,7 +451,7 @@ function it(e) {
451
451
  multiple: "single"
452
452
  };
453
453
  }
454
- function at(e, t = "single") {
454
+ function ot(e, t = "single") {
455
455
  return {
456
456
  component: e,
457
457
  defaultType: "string",
@@ -459,21 +459,21 @@ function at(e, t = "single") {
459
459
  multiple: t
460
460
  };
461
461
  }
462
- function ot(e) {
463
- return Ye.some((t) => t.value === e);
462
+ function st(e) {
463
+ return Xe.some((t) => t.value === e);
464
464
  }
465
465
  //#endregion
466
466
  //#region src/state/field.ts
467
- function P(e) {
467
+ function N(e) {
468
468
  return e.schema.fields ?? [];
469
469
  }
470
- function st(e, t) {
471
- let n = Ee(t);
472
- return ut(e, n, /* @__PURE__ */ new Map()), n;
473
- }
474
470
  function ct(e, t) {
471
+ let n = De(t);
472
+ return dt(e, n, /* @__PURE__ */ new Map()), n;
473
+ }
474
+ function lt(e, t) {
475
475
  let n = { persisted: !0 };
476
- switch (Ze(t ?? e).multiple === "multiple" && (n.multiple = !0), t ?? e) {
476
+ switch (Qe(t ?? e).multiple === "multiple" && (n.multiple = !0), t ?? e) {
477
477
  case "text":
478
478
  n.validation = [{
479
479
  type: "max_length",
@@ -494,15 +494,15 @@ function ct(e, t) {
494
494
  break;
495
495
  case "checkbox":
496
496
  case "multi-select":
497
- n.options = mt();
497
+ n.options = ht();
498
498
  break;
499
499
  case "radio":
500
500
  case "select":
501
- n.options = mt();
501
+ n.options = ht();
502
502
  break;
503
503
  case "select-tree":
504
504
  case "cascader":
505
- n.options = ht();
505
+ n.options = gt();
506
506
  break;
507
507
  case "date-range-picker":
508
508
  n.validation = [{
@@ -525,36 +525,36 @@ function ct(e, t) {
525
525
  }
526
526
  return n;
527
527
  }
528
- function lt(e, t) {
529
- let n = pt(t), r = new Set(P(e).map((e) => e.name)), i = 1, a = `${n}_${i}`;
528
+ function ut(e, t) {
529
+ let n = mt(t), r = new Set(N(e).map((e) => e.name)), i = 1, a = `${n}_${i}`;
530
530
  for (; r.has(a);) i += 1, a = `${n}_${i}`;
531
531
  return a;
532
532
  }
533
- function ut(e, t, n) {
534
- t.field &&= dt(e, t.field, n), t.children?.forEach((t) => ut(e, t, n));
535
- }
536
533
  function dt(e, t, n) {
534
+ t.field &&= ft(e, t.field, n), t.children?.forEach((t) => dt(e, t, n));
535
+ }
536
+ function ft(e, t, n) {
537
537
  let r = n.get(t);
538
538
  if (r) return r;
539
- let i = P(e).find((e) => e.name === t), a = lt(e, i?.name ?? t);
539
+ let i = N(e).find((e) => e.name === t), a = ut(e, i?.name ?? t);
540
540
  if (i) {
541
541
  e.schema.fields ??= [];
542
542
  let t = {
543
543
  ...i,
544
544
  name: a,
545
- label: ft(i.label)
545
+ label: pt(i.label)
546
546
  };
547
547
  delete t.id, delete t.resource_id, delete t.version_id, delete t.created_at, delete t.updated_at, e.schema.fields.push(t);
548
548
  }
549
549
  return n.set(t, a), a;
550
550
  }
551
- function ft(e) {
551
+ function pt(e) {
552
552
  return e.endsWith("副本") ? e : `${e}副本`;
553
553
  }
554
- function pt(e) {
554
+ function mt(e) {
555
555
  return e.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase() || "field";
556
556
  }
557
- function mt() {
557
+ function ht() {
558
558
  return {
559
559
  mode: "static",
560
560
  value_policy: "closed",
@@ -567,7 +567,7 @@ function mt() {
567
567
  }]
568
568
  };
569
569
  }
570
- function ht() {
570
+ function gt() {
571
571
  return {
572
572
  mode: "static",
573
573
  value_policy: "closed",
@@ -596,73 +596,73 @@ function ht() {
596
596
  }
597
597
  //#endregion
598
598
  //#region src/state/node-permissions.ts
599
- function F(e, t) {
600
- let n = A(O(e.schema, e.viewName), t);
601
- return n ? gt(e, n.node, n.parentId) : We;
599
+ function P(e, t) {
600
+ let n = k(D(e.schema, e.viewName), t);
601
+ return n ? _t(e, n.node, n.parentId) : Ge;
602
602
  }
603
- function gt(e, t, n, r = e.schema, i) {
603
+ function _t(e, t, n, r = e.schema, i) {
604
604
  let a = e.extensionContext?.nodePermissions;
605
- if (!a) return We;
606
- let o = O(r, e.viewName);
605
+ if (!a) return Ge;
606
+ let o = D(r, e.viewName);
607
607
  return a.resolve({
608
608
  node: t,
609
- parent: n ? k(o, n) : void 0,
610
- field: i ?? (t.field ? P(r).find((e) => e.name === t.field) : void 0),
609
+ parent: n ? O(o, n) : void 0,
610
+ field: i ?? (t.field ? N(r).find((e) => e.name === t.field) : void 0),
611
611
  schema: r,
612
612
  viewName: e.viewName
613
613
  });
614
614
  }
615
- function _t(e, t, n, r = e.schema, i) {
616
- let a = O(r, e.viewName), o = n ? k(a, n) : void 0;
617
- if (n && !o || !Je(o, t)) return !1;
618
- let s = gt(e, t, n, r, i).allowedParentIds;
615
+ function vt(e, t, n, r = e.schema, i) {
616
+ let a = D(r, e.viewName), o = n ? O(a, n) : void 0;
617
+ if (n && !o || !Ye(o, t)) return !1;
618
+ let s = _t(e, t, n, r, i).allowedParentIds;
619
619
  return s === void 0 || s.includes(n ?? null);
620
620
  }
621
- function vt(e, t) {
622
- let n = O(e.schema, e.viewName), r = O(t, e.viewName);
623
- for (let i of yt(n)) {
624
- let n = gt(e, i.node, i.parentId), a = i.node.id ? A(r, i.node.id) : void 0;
621
+ function yt(e, t) {
622
+ let n = D(e.schema, e.viewName), r = D(t, e.viewName);
623
+ for (let i of bt(n)) {
624
+ let n = _t(e, i.node, i.parentId), a = i.node.id ? k(r, i.node.id) : void 0;
625
625
  if (!a) {
626
626
  if (!n.deletable) return !1;
627
627
  continue;
628
628
  }
629
- if (!n.movable && (i.parentId !== a.parentId || i.index !== a.index) || !n.editable && !bt(e.schema, i.node, t, a.node)) return !1;
629
+ if (!n.movable && (i.parentId !== a.parentId || i.index !== a.index) || !n.editable && !xt(e.schema, i.node, t, a.node)) return !1;
630
630
  }
631
- return yt(r).every(({ node: r, parentId: i }) => (r.id ? A(n, r.id) : void 0)?.parentId === i || _t(e, r, i, t));
631
+ return bt(r).every(({ node: r, parentId: i }) => (r.id ? k(n, r.id) : void 0)?.parentId === i || vt(e, r, i, t));
632
632
  }
633
- function yt(e, t) {
633
+ function bt(e, t) {
634
634
  return e.flatMap((e, n) => [{
635
635
  node: e,
636
636
  parentId: t,
637
637
  index: n
638
- }, ...yt(e.children ?? [], e.id)]);
638
+ }, ...bt(e.children ?? [], e.id)]);
639
639
  }
640
- function bt(e, t, n, r) {
640
+ function xt(e, t, n, r) {
641
641
  let { children: i, ...a } = t, { children: o, ...s } = r;
642
642
  if (JSON.stringify(a) !== JSON.stringify(s)) return !1;
643
643
  if (!t.field) return !0;
644
- let c = P(e).find((e) => e.name === t.field), l = P(n).find((e) => e.name === t.field);
644
+ let c = N(e).find((e) => e.name === t.field), l = N(n).find((e) => e.name === t.field);
645
645
  return JSON.stringify(c) === JSON.stringify(l);
646
646
  }
647
647
  //#endregion
648
648
  //#region src/state/history.ts
649
- function xt(e, t) {
650
- let n = e.schema, r = Ne(e.schema, e.viewName);
651
- t(r), vt(e, r) && (e.history.push(n), e.future = [], e.schema = r, e.schemaVersion += 1);
649
+ function St(e, t) {
650
+ let n = e.schema, r = Pe(e.schema, e.viewName);
651
+ t(r), yt(e, r) && (e.history.push(n), e.future = [], e.schema = r, e.schemaVersion += 1);
652
652
  }
653
- function St(e) {
653
+ function Ct(e) {
654
654
  for (; e.history.length;) {
655
655
  let t = e.history.pop();
656
- if (!(!t || !vt(e, t))) {
656
+ if (!(!t || !yt(e, t))) {
657
657
  e.future.push(e.schema), e.schema = t, e.schemaVersion += 1;
658
658
  return;
659
659
  }
660
660
  }
661
661
  }
662
- function Ct(e) {
662
+ function wt(e) {
663
663
  for (; e.future.length;) {
664
664
  let t = e.future.pop();
665
- if (!(!t || !vt(e, t))) {
665
+ if (!(!t || !yt(e, t))) {
666
666
  e.history.push(e.schema), e.schema = t, e.schemaVersion += 1;
667
667
  return;
668
668
  }
@@ -670,23 +670,23 @@ function Ct(e) {
670
670
  }
671
671
  //#endregion
672
672
  //#region src/state/form-actions.ts
673
- function wt(e, t) {
674
- xt(e, (n) => {
673
+ function Tt(e, t) {
674
+ St(e, (n) => {
675
675
  n.schema.views ??= {}, n.schema.views.forms || (n.schema.views.forms = {}), n.schema.views.forms[e.viewName] = t;
676
676
  });
677
677
  }
678
- function Tt(e) {
678
+ function Et(e) {
679
679
  return e.footer === !1 ? [] : e.footer?.actions?.length ? e.footer.actions.map((e) => ({ ...e })) : [{ action: "submit" }, { action: "reset" }];
680
680
  }
681
681
  //#endregion
682
682
  //#region src/state/visibility.ts
683
- function Et(e, t, n = {}) {
684
- let r = A(O(e.schema, e.viewName), t);
683
+ function Dt(e, t, n = {}) {
684
+ let r = k(D(e.schema, e.viewName), t);
685
685
  if (!r) return {
686
686
  canMoveUp: !1,
687
687
  canMoveDown: !1
688
688
  };
689
- let i = Dt(r.siblings, n), a = i.findIndex((e) => e.id === t);
689
+ let i = Ot(r.siblings, n), a = i.findIndex((e) => e.id === t);
690
690
  return a < 0 ? {
691
691
  canMoveUp: !1,
692
692
  canMoveDown: !1
@@ -695,12 +695,12 @@ function Et(e, t, n = {}) {
695
695
  canMoveDown: a < i.length - 1
696
696
  };
697
697
  }
698
- function Dt(e, t) {
698
+ function Ot(e, t) {
699
699
  if (t.respectVisibility === !1) return e;
700
- let n = Ot(t);
701
- return e.filter((e) => se(e.show_when, n));
700
+ let n = kt(t);
701
+ return e.filter((e) => ce(e.show_when, n));
702
702
  }
703
- function Ot(e) {
703
+ function kt(e) {
704
704
  return {
705
705
  form: e.form,
706
706
  query: e.query,
@@ -709,42 +709,42 @@ function Ot(e) {
709
709
  }
710
710
  //#endregion
711
711
  //#region src/state/node-actions.ts
712
- function kt(e, t) {
713
- return F(e, t).selectable ? (e.selection = {
712
+ function At(e, t) {
713
+ return P(e, t).selectable ? (e.selection = {
714
714
  type: "form-node",
715
715
  path: t
716
716
  }, !0) : !1;
717
717
  }
718
- function At(e) {
719
- if (e.selection?.type === "form-node") return k(O(e.schema, e.viewName), e.selection.path);
718
+ function jt(e) {
719
+ if (e.selection?.type === "form-node") return O(D(e.schema, e.viewName), e.selection.path);
720
720
  }
721
- function jt(e, t, n, r) {
721
+ function Mt(e, t, n, r) {
722
722
  if (e.extensionContext && !e.extensionContext.getMaterial(n.key)) throw Error(`设计器物料 ${n.key} 不在当前实例的可见范围内`);
723
- Ft(e, t, n.key);
724
- let i = new Set(P(e.schema).map((e) => e.name)), a, o;
723
+ It(e, t, n.key);
724
+ let i = new Set(N(e.schema).map((e) => e.name)), a, o;
725
725
  if (n.kind === "field") {
726
- let t = lt(e.schema, n.fieldNameBase), r = n.create({ fieldName: t });
726
+ let t = ut(e.schema, n.fieldNameBase), r = n.create({ fieldName: t });
727
727
  if (!r?.field || !r.node) throw Error(`设计器物料 ${n.key} 必须同时返回字段和节点`);
728
- a = D(r.field), o = D(r.node), It(n.key, a, o, t, i);
728
+ a = E(r.field), o = E(r.node), Lt(n.key, a, o, t, i);
729
729
  } else {
730
730
  let e = n.create({});
731
731
  if (!e || typeof e != "object") throw Error(`设计器物料 ${n.key} 没有返回有效结果`);
732
732
  if (e.field !== void 0) throw Error(`设计器物料 ${n.key} 不能通过节点物料创建字段`);
733
733
  if (!e.node) throw Error(`设计器物料 ${n.key} 没有返回节点`);
734
- o = D(e.node);
735
- }
736
- Lt(n.key, o, i, a?.name);
737
- let s = ke(o);
738
- if (!_t(e, s, t, e.schema, a)) throw Error(`设计器物料 ${n.key} 不能插入目标容器`);
739
- xt(e, (n) => {
740
- let i = we(n, e.viewName, t);
741
- i && (a && (n.schema.fields ??= [], n.schema.fields.push(a)), i.splice(De(r, i.length), 0, s));
734
+ o = E(e.node);
735
+ }
736
+ Rt(n.key, o, i, a?.name);
737
+ let s = Ae(o);
738
+ if (!vt(e, s, t, e.schema, a)) throw Error(`设计器物料 ${n.key} 不能插入目标容器`);
739
+ St(e, (n) => {
740
+ let i = Te(n, e.viewName, t);
741
+ i && (a && (n.schema.fields ??= [], n.schema.fields.push(a)), i.splice(Oe(r, i.length), 0, s));
742
742
  }), e.selection = {
743
743
  type: "form-node",
744
744
  path: s.id
745
745
  };
746
746
  }
747
- var Mt = new Set([
747
+ var Nt = new Set([
748
748
  "field",
749
749
  "group",
750
750
  "section",
@@ -759,7 +759,7 @@ var Mt = new Set([
759
759
  "divider",
760
760
  "custom",
761
761
  "view"
762
- ]), Nt = new Set([
762
+ ]), Pt = new Set([
763
763
  "field",
764
764
  "group",
765
765
  "section",
@@ -772,7 +772,7 @@ var Mt = new Set([
772
772
  "divider",
773
773
  "custom",
774
774
  "view"
775
- ]), Pt = new Set([
775
+ ]), Ft = new Set([
776
776
  "group",
777
777
  "section",
778
778
  "card",
@@ -785,103 +785,103 @@ var Mt = new Set([
785
785
  "tab",
786
786
  "custom"
787
787
  ]);
788
- function Ft(e, t, n) {
788
+ function It(e, t, n) {
789
789
  if (!t) return;
790
- let r = k(O(e.schema, e.viewName), t);
790
+ let r = O(D(e.schema, e.viewName), t);
791
791
  if (!r) throw Error(`设计器物料 ${n} 的目标容器 ${t} 不存在`);
792
- if (!Pt.has(r.type)) throw Error(`设计器物料 ${n} 不能插入 ${r.type} 节点`);
792
+ if (!Ft.has(r.type)) throw Error(`设计器物料 ${n} 不能插入 ${r.type} 节点`);
793
793
  }
794
- function It(e, t, n, r, i) {
794
+ function Lt(e, t, n, r, i) {
795
795
  if (!t || typeof t != "object") throw Error(`设计器物料 ${e} 没有返回有效字段`);
796
796
  if (typeof t.name != "string" || !t.name.trim()) throw Error(`设计器物料 ${e} 返回的字段名不能为空`);
797
797
  if (t.name !== r || n?.field !== r) throw Error(`设计器物料 ${e} 返回的字段名与节点引用必须等于 ${r}`);
798
798
  if (i.has(t.name)) throw Error(`设计器物料 ${e} 返回了重复字段名 ${t.name}`);
799
799
  if (typeof t.type != "string" || !t.type.trim() || typeof t.label != "string" || !t.label.trim()) throw Error(`设计器物料 ${e} 返回的字段必须包含 type 和 label`);
800
800
  }
801
- function Lt(e, t, n, r) {
802
- if (!t || typeof t != "object" || !Nt.has(t.type)) throw Error(`设计器物料 ${e} 返回了无效的根节点类型`);
803
- Rt(e, t, n, r);
804
- }
805
801
  function Rt(e, t, n, r) {
806
- if (!Mt.has(t.type)) throw Error(`设计器物料 ${e} 返回了无效节点类型 ${String(t.type)}`);
802
+ if (!t || typeof t != "object" || !Pt.has(t.type)) throw Error(`设计器物料 ${e} 返回了无效的根节点类型`);
803
+ zt(e, t, n, r);
804
+ }
805
+ function zt(e, t, n, r) {
806
+ if (!Nt.has(t.type)) throw Error(`设计器物料 ${e} 返回了无效节点类型 ${String(t.type)}`);
807
807
  if (t.component !== void 0 && (typeof t.component != "string" || !t.component.trim())) throw Error(`设计器物料 ${e} 返回了空组件 key`);
808
808
  if (t.field !== void 0) {
809
809
  if (typeof t.field != "string" || !t.field.trim()) throw Error(`设计器物料 ${e} 返回了空字段引用`);
810
810
  if (t.field !== r && !n.has(t.field)) throw Error(`设计器物料 ${e} 引用了不存在的字段 ${t.field}`);
811
811
  }
812
812
  if (t.children !== void 0 && !Array.isArray(t.children)) throw Error(`设计器物料 ${e} 返回的 children 必须是节点数组`);
813
- t.children?.forEach((t) => Rt(e, t, n, r));
813
+ t.children?.forEach((t) => zt(e, t, n, r));
814
814
  }
815
- function zt(e, t, n, r, i = {}) {
816
- let a = A(O(e.schema, e.viewName), t);
817
- !a || !F(e, t).movable || !_t(e, a.node, n) || (xt(e, (a) => {
818
- let o = A(O(a, e.viewName), t);
819
- if (!o || n && Te(o.node, n)) return;
815
+ function Bt(e, t, n, r, i = {}) {
816
+ let a = k(D(e.schema, e.viewName), t);
817
+ !a || !P(e, t).movable || !vt(e, a.node, n) || (St(e, (a) => {
818
+ let o = k(D(a, e.viewName), t);
819
+ if (!o || n && Ee(o.node, n)) return;
820
820
  let [s] = o.siblings.splice(o.index, 1);
821
821
  if (!s) return;
822
- let c = we(a, e.viewName, n);
822
+ let c = Te(a, e.viewName, n);
823
823
  if (!c) {
824
824
  o.siblings.splice(o.index, 0, s);
825
825
  return;
826
826
  }
827
827
  let l = i.adjustSameParentIndex !== !1 && o.siblings === c && o.index < r ? r - 1 : r;
828
- c.splice(De(l, c.length), 0, s);
828
+ c.splice(Oe(l, c.length), 0, s);
829
829
  }), e.selection = {
830
830
  type: "form-node",
831
831
  path: t
832
832
  });
833
833
  }
834
- function Bt(e, t, n) {
835
- let r = k(O(e.schema, e.viewName), n);
836
- r && zt(e, t, n, r.children?.length ?? 0);
834
+ function Vt(e, t, n) {
835
+ let r = O(D(e.schema, e.viewName), n);
836
+ r && Bt(e, t, n, r.children?.length ?? 0);
837
837
  }
838
- function Vt(e, t) {
839
- let n = A(O(e.schema, e.viewName), t);
838
+ function Ht(e, t) {
839
+ let n = k(D(e.schema, e.viewName), t);
840
840
  if (!n?.parentId) return;
841
- let r = A(O(e.schema, e.viewName), n.parentId);
842
- r && zt(e, t, r.parentId, r.index + 1);
841
+ let r = k(D(e.schema, e.viewName), n.parentId);
842
+ r && Bt(e, t, r.parentId, r.index + 1);
843
843
  }
844
- function Ht(e) {
844
+ function Ut(e) {
845
845
  if (e.selection?.type !== "form-node") return;
846
846
  let t = e.selection.path;
847
- !A(O(e.schema, e.viewName), t) || !F(e, t).deletable || (xt(e, (t) => {
848
- let n = A(O(t, e.viewName), e.selection?.type === "form-node" ? e.selection.path : "");
847
+ !k(D(e.schema, e.viewName), t) || !P(e, t).deletable || (St(e, (t) => {
848
+ let n = k(D(t, e.viewName), e.selection?.type === "form-node" ? e.selection.path : "");
849
849
  n?.siblings.splice(n.index, 1);
850
850
  }), e.selection = void 0);
851
851
  }
852
- function Ut(e) {
852
+ function Wt(e) {
853
853
  if (e.selection?.type !== "form-node") return;
854
- let t = e.selection.path, n = A(O(e.schema, e.viewName), t);
855
- if (!n || !F(e, t).copyable || !_t(e, n.node, n.parentId)) return;
856
- let r = De(n.index + 1, n.siblings.length), i;
857
- xt(e, (t) => {
858
- let n = A(O(t, e.viewName), e.selection?.type === "form-node" ? e.selection.path : "");
854
+ let t = e.selection.path, n = k(D(e.schema, e.viewName), t);
855
+ if (!n || !P(e, t).copyable || !vt(e, n.node, n.parentId)) return;
856
+ let r = Oe(n.index + 1, n.siblings.length), i;
857
+ St(e, (t) => {
858
+ let n = k(D(t, e.viewName), e.selection?.type === "form-node" ? e.selection.path : "");
859
859
  if (!n) return;
860
- let a = st(t, n.node);
860
+ let a = ct(t, n.node);
861
861
  n.siblings.splice(r, 0, a), i = a.id;
862
862
  }), i && (e.selection = {
863
863
  type: "form-node",
864
864
  path: i
865
865
  });
866
866
  }
867
- function Wt(e, t, n = {}) {
867
+ function Gt(e, t, n = {}) {
868
868
  if (e.selection?.type !== "form-node") return;
869
- let r = e.selection.path, i = A(O(e.schema, e.viewName), r);
869
+ let r = e.selection.path, i = k(D(e.schema, e.viewName), r);
870
870
  if (!i) return;
871
- let a = Dt(i.siblings, n), o = a.findIndex((e) => e.id === r), s = a[o + t];
871
+ let a = Ot(i.siblings, n), o = a.findIndex((e) => e.id === r), s = a[o + t];
872
872
  if (o < 0 || !s?.id) return;
873
- let c = A(O(e.schema, e.viewName), s.id);
873
+ let c = k(D(e.schema, e.viewName), s.id);
874
874
  if (!c || c.siblings !== i.siblings) return;
875
875
  let l = t > 0 ? c.index + 1 : c.index;
876
- zt(e, r, i.parentId, l);
876
+ Bt(e, r, i.parentId, l);
877
877
  }
878
- function Gt(e, t, n) {
878
+ function Kt(e, t, n) {
879
879
  if (e.selection?.type !== "form-node") return;
880
880
  let r = e.selection.path;
881
- if (!F(e, r).editable) return;
882
- let i = At(e)?.field;
883
- xt(e, (a) => {
884
- let o = k(O(a, e.viewName), r);
881
+ if (!P(e, r).editable) return;
882
+ let i = jt(e)?.field;
883
+ St(e, (a) => {
884
+ let o = O(D(a, e.viewName), r);
885
885
  if (o) {
886
886
  let e = o.id;
887
887
  Object.keys(o).forEach((e) => {
@@ -889,40 +889,40 @@ function Gt(e, t, n) {
889
889
  }), Object.assign(o, t, { id: e });
890
890
  }
891
891
  if (i && n) {
892
- let e = P(a).find((e) => e.name === i);
892
+ let e = N(a).find((e) => e.name === i);
893
893
  e && (Object.keys(e).forEach((t) => {
894
894
  delete e[t];
895
895
  }), Object.assign(e, n));
896
896
  }
897
897
  });
898
898
  }
899
- function Kt(e) {
900
- let t = At(e);
901
- if (t?.field) return P(e.schema).find((e) => e.name === t.field);
899
+ function qt(e) {
900
+ let t = jt(e);
901
+ if (t?.field) return N(e.schema).find((e) => e.name === t.field);
902
902
  }
903
903
  //#endregion
904
- //#region ../../../internal/frontend-core/src/kernel.ts
905
- var qt = {
904
+ //#region ../../frontend-core/dist/kernel.js
905
+ var Jt = {
906
906
  builtin: 0,
907
907
  plugin: 100,
908
908
  host: 200,
909
909
  local: 300
910
910
  };
911
- function Jt(e) {
912
- return $t(e, "贡献点 key"), Object.freeze({ key: e });
911
+ function Yt(e) {
912
+ return en(e, "贡献点 key"), Object.freeze({ key: e });
913
913
  }
914
- function I(e, t, n = "plugin") {
914
+ function F(e, t, n = "plugin") {
915
915
  return {
916
916
  point: e,
917
917
  entries: t,
918
918
  layer: n
919
919
  };
920
920
  }
921
- function Yt(e = {}) {
921
+ function Xt(e = {}) {
922
922
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0;
923
923
  function a(e) {
924
- $t(e.owner, "贡献 owner");
925
- let n = e.contributions.flatMap((t) => ($t(t.point.key, "贡献点 key"), t.entries.map((n) => ($t(n.key, `贡献点 ${t.point.key} 的条目 key`), {
924
+ en(e.owner, "贡献 owner");
925
+ let n = e.contributions.flatMap((t) => (en(t.point.key, "贡献点 key"), t.entries.map((n) => (en(n.key, `贡献点 ${t.point.key} 的条目 key`), {
926
926
  id: Symbol(`${e.owner}:${t.point.key}:${n.key}`),
927
927
  sequence: i++,
928
928
  point: t.point.key,
@@ -967,19 +967,19 @@ function Yt(e = {}) {
967
967
  },
968
968
  entries() {
969
969
  let n = t.get(e.key);
970
- return n ? [...n.entries()].map(([, e]) => Xt(e)).filter((e) => e !== void 0).map((e) => Qt(e)) : [];
970
+ return n ? [...n.entries()].map(([, e]) => Zt(e)).filter((e) => e !== void 0).map((e) => $t(e)) : [];
971
971
  },
972
972
  find(n) {
973
973
  let r = t.get(e.key);
974
974
  if (!r) return;
975
- let i = [...r.values()].map((e) => Xt(e)).filter((e) => e !== void 0).sort(Zt).find((e) => n(Qt(e)));
976
- return i ? Qt(i) : void 0;
975
+ let i = [...r.values()].map((e) => Zt(e)).filter((e) => e !== void 0).sort(Qt).find((e) => n($t(e)));
976
+ return i ? $t(i) : void 0;
977
977
  },
978
978
  diagnostics() {
979
979
  let n = t.get(e.key);
980
980
  return n ? [...n.entries()].flatMap(([t, n]) => {
981
981
  if (n.length < 2) return [];
982
- let r = Xt(n);
982
+ let r = Zt(n);
983
983
  if (!r) return [];
984
984
  let i = [...new Set(n.map((e) => e.owner))];
985
985
  return [{
@@ -1002,7 +1002,7 @@ function Yt(e = {}) {
1002
1002
  return r.set(e.key, a), a;
1003
1003
  }
1004
1004
  function s(e, n) {
1005
- return Xt(t.get(e)?.get(n) ?? []);
1005
+ return Zt(t.get(e)?.get(n) ?? []);
1006
1006
  }
1007
1007
  function c(e) {
1008
1008
  for (let t of e) for (let e of n.get(t) ?? []) try {
@@ -1021,20 +1021,20 @@ function Yt(e = {}) {
1021
1021
  registry: o
1022
1022
  };
1023
1023
  }
1024
- function Xt(e) {
1024
+ function Zt(e) {
1025
1025
  return e.reduce((e, t) => {
1026
1026
  if (!e) return t;
1027
- let n = qt[e.layer], r = qt[t.layer];
1027
+ let n = Jt[e.layer], r = Jt[t.layer];
1028
1028
  return r === n ? t.priority === e.priority ? t.sequence > e.sequence ? t : e : t.priority > e.priority ? t : e : r > n ? t : e;
1029
1029
  }, void 0);
1030
1030
  }
1031
- function Zt(e, t) {
1032
- let n = qt[t.layer] - qt[e.layer];
1031
+ function Qt(e, t) {
1032
+ let n = Jt[t.layer] - Jt[e.layer];
1033
1033
  if (n !== 0) return n;
1034
1034
  let r = t.priority - e.priority;
1035
1035
  return r === 0 ? t.sequence - e.sequence : r;
1036
1036
  }
1037
- function Qt(e) {
1037
+ function $t(e) {
1038
1038
  return {
1039
1039
  point: e.point,
1040
1040
  key: e.key,
@@ -1044,12 +1044,12 @@ function Qt(e) {
1044
1044
  value: e.value
1045
1045
  };
1046
1046
  }
1047
- function $t(e, t) {
1047
+ function en(e, t) {
1048
1048
  if (!e) throw Error(`${t} 不能为空`);
1049
1049
  }
1050
1050
  //#endregion
1051
1051
  //#region src/inspector/capabilities/keys.ts
1052
- var L = {
1052
+ var I = {
1053
1053
  valueStrategy: "value-strategy",
1054
1054
  validationRules: "validation-rules",
1055
1055
  optionSource: "option-source",
@@ -1059,7 +1059,7 @@ var L = {
1059
1059
  inputSlots: "input-slots",
1060
1060
  colorPalette: "color-palette",
1061
1061
  advancedConfig: "advanced-config"
1062
- }, en = [
1062
+ }, tn = [
1063
1063
  {
1064
1064
  name: "show_when",
1065
1065
  title: "显示条件",
@@ -1075,7 +1075,7 @@ var L = {
1075
1075
  title: "只读条件",
1076
1076
  description: "条件成立时控件进入只读状态。"
1077
1077
  }
1078
- ], tn = [
1078
+ ], nn = [
1079
1079
  {
1080
1080
  label: "等于",
1081
1081
  value: "eq"
@@ -1121,40 +1121,40 @@ var L = {
1121
1121
  value: "not_empty"
1122
1122
  }
1123
1123
  ];
1124
- function nn(e) {
1125
- return en.filter((t) => t.name === "disabled_when" || t.name === "readonly_when" ? e.type === "field" : !0);
1126
- }
1127
1124
  function rn(e) {
1128
- return e ? pn(e) || (fn(e) ? {
1125
+ return tn.filter((t) => t.name === "disabled_when" || t.name === "readonly_when" ? e.type === "field" : !0);
1126
+ }
1127
+ function an(e) {
1128
+ return e ? mn(e) || (pn(e) ? {
1129
1129
  mode: "json",
1130
1130
  json: JSON.stringify(e, void 0, 2),
1131
- root: sn()
1131
+ root: cn()
1132
1132
  } : {
1133
1133
  mode: "visual",
1134
1134
  json: "",
1135
1135
  root: {
1136
1136
  kind: "group",
1137
1137
  logic: "all",
1138
- items: [gn(e) ?? on()]
1138
+ items: [_n(e) ?? sn()]
1139
1139
  }
1140
1140
  }) : {
1141
1141
  mode: "visual",
1142
1142
  json: "",
1143
- root: sn()
1143
+ root: cn()
1144
1144
  };
1145
1145
  }
1146
- function an(e) {
1147
- if (e.mode === "json") return bn(e.json) ?? {
1146
+ function on(e) {
1147
+ if (e.mode === "json") return xn(e.json) ?? {
1148
1148
  field: "",
1149
1149
  op: "eq"
1150
1150
  };
1151
- let t = e.root.items.length ? e.root.items : [on()];
1152
- return t.length === 1 && t[0]?.kind === "rule" ? un(t[0]) : vn({
1151
+ let t = e.root.items.length ? e.root.items : [sn()];
1152
+ return t.length === 1 && t[0]?.kind === "rule" ? dn(t[0]) : yn({
1153
1153
  ...e.root,
1154
1154
  items: t
1155
1155
  });
1156
1156
  }
1157
- function on() {
1157
+ function sn() {
1158
1158
  return {
1159
1159
  kind: "rule",
1160
1160
  field: "",
@@ -1162,94 +1162,94 @@ function on() {
1162
1162
  value: ""
1163
1163
  };
1164
1164
  }
1165
- function sn() {
1165
+ function cn() {
1166
1166
  return {
1167
1167
  kind: "group",
1168
1168
  logic: "all",
1169
- items: [on()]
1169
+ items: [sn()]
1170
1170
  };
1171
1171
  }
1172
- function cn(e, t) {
1172
+ function ln(e, t) {
1173
1173
  let n = e.filter((e) => e.formable !== !1).map((e) => ({
1174
1174
  label: e.label && e.label !== e.name ? `${e.label}(${e.name})` : e.name,
1175
- value: ln(e.name)
1175
+ value: un(e.name)
1176
1176
  }));
1177
1177
  return t && !n.some((e) => e.value === t) && n.unshift({
1178
1178
  label: t,
1179
1179
  value: t
1180
1180
  }), n;
1181
1181
  }
1182
- function ln(e) {
1182
+ function un(e) {
1183
1183
  return `form.${e}`;
1184
1184
  }
1185
- function un(e) {
1185
+ function dn(e) {
1186
1186
  let t = {
1187
1187
  field: e.field.trim(),
1188
- op: Sn(e.op)
1188
+ op: Cn(e.op)
1189
1189
  };
1190
1190
  if (t.op !== "empty" && t.op !== "not_empty") {
1191
- let n = xn(e.value);
1191
+ let n = Sn(e.value);
1192
1192
  n !== void 0 && (t.value = n);
1193
1193
  }
1194
1194
  return t;
1195
1195
  }
1196
- function dn(e) {
1196
+ function fn(e) {
1197
1197
  if (!e) return "未设置";
1198
- if (fn(e) || e.all || e.any) return e.all?.length ? `AND 全部满足 ${e.all.length} 条` : e.any?.length ? `OR 任一满足 ${e.any.length} 条` : e.not ? "取反条件" : e.expr ? "表达式条件" : e.selection_empty === void 0 ? "高级条件" : e.selection_empty ? "选择为空" : "选择不为空";
1198
+ if (pn(e) || e.all || e.any) return e.all?.length ? `AND 全部满足 ${e.all.length} 条` : e.any?.length ? `OR 任一满足 ${e.any.length} 条` : e.not ? "取反条件" : e.expr ? "表达式条件" : e.selection_empty === void 0 ? "高级条件" : e.selection_empty ? "选择为空" : "选择不为空";
1199
1199
  let t = e.op ?? "eq", n = e.field || "字段";
1200
- return t === "empty" || t === "not_empty" ? `${n} ${Cn(t)}` : `${n} ${Cn(t)} ${wn(e.value)}`;
1200
+ return t === "empty" || t === "not_empty" ? `${n} ${wn(t)}` : `${n} ${wn(t)} ${Tn(e.value)}`;
1201
1201
  }
1202
- function fn(e) {
1202
+ function pn(e) {
1203
1203
  return e ? !!(e.not || e.expr || e.selection_empty !== void 0) : !1;
1204
1204
  }
1205
- function pn(e) {
1206
- if (fn(e)) return;
1207
- let t = mn(e);
1205
+ function mn(e) {
1206
+ if (pn(e)) return;
1207
+ let t = hn(e);
1208
1208
  if (t) return {
1209
1209
  mode: "visual",
1210
1210
  json: "",
1211
1211
  root: t
1212
1212
  };
1213
1213
  }
1214
- function mn(e) {
1214
+ function hn(e) {
1215
1215
  let t = e.all ? "all" : e.any ? "any" : void 0, n = t === "all" ? e.all : t === "any" ? e.any : void 0;
1216
1216
  if (t && n?.length) {
1217
- let e = n.map(hn);
1217
+ let e = n.map(gn);
1218
1218
  return e.some((e) => !e) ? void 0 : {
1219
1219
  kind: "group",
1220
1220
  logic: t,
1221
1221
  items: e
1222
1222
  };
1223
1223
  }
1224
- let r = gn(e);
1224
+ let r = _n(e);
1225
1225
  if (r) return {
1226
1226
  kind: "group",
1227
1227
  logic: "all",
1228
1228
  items: [r]
1229
1229
  };
1230
1230
  }
1231
- function hn(e) {
1232
- if (!fn(e)) return e.all || e.any ? mn(e) : gn(e);
1233
- }
1234
1231
  function gn(e) {
1235
- if (yn(e)) return {
1232
+ if (!pn(e)) return e.all || e.any ? hn(e) : _n(e);
1233
+ }
1234
+ function _n(e) {
1235
+ if (bn(e)) return {
1236
1236
  kind: "rule",
1237
1237
  field: e.field ?? "",
1238
- op: Sn(e.op),
1238
+ op: Cn(e.op),
1239
1239
  value: e.value === void 0 ? "" : JSON.stringify(e.value, void 0, 2)
1240
1240
  };
1241
1241
  }
1242
- function _n(e) {
1243
- return e.kind === "group" ? vn(e) : un(e);
1244
- }
1245
1242
  function vn(e) {
1246
- let t = (e.items.length ? e.items : [on()]).map(_n);
1247
- return e.logic === "all" ? { all: t } : { any: t };
1243
+ return e.kind === "group" ? yn(e) : dn(e);
1248
1244
  }
1249
1245
  function yn(e) {
1250
- return !!e.field && !e.all && !e.any && !e.not && !e.expr && e.selection_empty === void 0;
1246
+ let t = (e.items.length ? e.items : [sn()]).map(vn);
1247
+ return e.logic === "all" ? { all: t } : { any: t };
1251
1248
  }
1252
1249
  function bn(e) {
1250
+ return !!e.field && !e.all && !e.any && !e.not && !e.expr && e.selection_empty === void 0;
1251
+ }
1252
+ function xn(e) {
1253
1253
  if (e) {
1254
1254
  if (typeof e == "object") return e;
1255
1255
  if (!(typeof e != "string" || e.trim() === "")) try {
@@ -1260,7 +1260,7 @@ function bn(e) {
1260
1260
  }
1261
1261
  }
1262
1262
  }
1263
- function xn(e) {
1263
+ function Sn(e) {
1264
1264
  if (typeof e != "string") return e;
1265
1265
  if (e.trim() !== "") try {
1266
1266
  return JSON.parse(e);
@@ -1268,139 +1268,139 @@ function xn(e) {
1268
1268
  return e;
1269
1269
  }
1270
1270
  }
1271
- function Sn(e) {
1272
- return fe(e) ? e : "eq";
1273
- }
1274
1271
  function Cn(e) {
1275
- return tn.find((t) => t.value === e)?.label ?? e;
1272
+ return pe(e) ? e : "eq";
1276
1273
  }
1277
1274
  function wn(e) {
1275
+ return nn.find((t) => t.value === e)?.label ?? e;
1276
+ }
1277
+ function Tn(e) {
1278
1278
  return e === void 0 ? "" : typeof e == "string" ? e : JSON.stringify(e);
1279
1279
  }
1280
1280
  //#endregion
1281
1281
  //#region src/inspector/required-validation.ts
1282
- function Tn(e) {
1282
+ function En(e) {
1283
1283
  return e?.validation?.find((e) => e.type === "required");
1284
1284
  }
1285
- function En(e) {
1286
- let t = D(e?.validation ?? []);
1285
+ function Dn(e) {
1286
+ let t = E(e?.validation ?? []);
1287
1287
  return e?.required && !t.some((e) => e.type === "required") && t.unshift({ type: "required" }), t;
1288
1288
  }
1289
- function Dn(e, t) {
1289
+ function On(e, t) {
1290
1290
  let n = [], r = !1;
1291
1291
  for (let i of t) {
1292
1292
  if (i.type !== "required") {
1293
- n.push(D(i));
1293
+ n.push(E(i));
1294
1294
  continue;
1295
1295
  }
1296
- r || (r = !0, On(i) ? e.required = !0 : (delete e.required, n.push(D(i))));
1296
+ r || (r = !0, kn(i) ? e.required = !0 : (delete e.required, n.push(E(i))));
1297
1297
  }
1298
1298
  r || delete e.required, n.length > 0 ? e.validation = n : delete e.validation;
1299
1299
  }
1300
- function On(e) {
1300
+ function kn(e) {
1301
1301
  return e.type === "required" && e.when === void 0 && e.value === void 0 && e.value_expr === void 0 && e.params === void 0 && (e.message === void 0 || e.message === "");
1302
1302
  }
1303
1303
  //#endregion
1304
1304
  //#region src/inspector/capabilities/adapters.ts
1305
- function kn({ field: e }) {
1305
+ function An({ field: e }) {
1306
1306
  let t = e?.persisted === !0;
1307
1307
  return e?.computed_expr ? {
1308
1308
  mode: "computed",
1309
- computed_expr: D(e.computed_expr),
1309
+ computed_expr: E(e.computed_expr),
1310
1310
  computed_triggers: qn(e.computed_triggers ?? []),
1311
1311
  persisted: t
1312
1312
  } : e?.default_expr ? {
1313
1313
  mode: "dynamic",
1314
- default_expr: D(e.default_expr),
1314
+ default_expr: E(e.default_expr),
1315
1315
  persisted: t
1316
1316
  } : { persisted: t };
1317
1317
  }
1318
- function An({ field: e }, t) {
1318
+ function jn({ field: e }, t) {
1319
1319
  if (e) {
1320
- if (!Kn(t) || t.mode !== "dynamic" && t.mode !== "computed") {
1321
- Ln(e);
1320
+ if (!L(t) || t.mode !== "dynamic" && t.mode !== "computed") {
1321
+ Rn(e);
1322
1322
  return;
1323
1323
  }
1324
- if (Rn(e, t.persisted), delete e.default_expr, delete e.computed_expr, delete e.computed_triggers, t.mode === "dynamic" && zn(t.default_expr)) e.default_expr = D(t.default_expr);
1325
- else if (t.mode === "computed" && Bn(t.computed_expr)) {
1326
- e.computed_expr = D(t.computed_expr);
1327
- let n = Vn(t.computed_triggers);
1324
+ if (zn(e, t.persisted), delete e.default_expr, delete e.computed_expr, delete e.computed_triggers, t.mode === "dynamic" && Bn(t.default_expr)) e.default_expr = E(t.default_expr);
1325
+ else if (t.mode === "computed" && Vn(t.computed_expr)) {
1326
+ e.computed_expr = E(t.computed_expr);
1327
+ let n = Hn(t.computed_triggers);
1328
1328
  n.length > 0 && (e.computed_triggers = n);
1329
1329
  }
1330
1330
  }
1331
1331
  }
1332
- function jn({ field: e }) {
1332
+ function Mn({ field: e }) {
1333
1333
  return {
1334
1334
  options: qn(e?.options),
1335
1335
  reference: qn(e?.reference)
1336
1336
  };
1337
1337
  }
1338
- function Mn({ field: e }, t) {
1338
+ function Nn({ field: e }, t) {
1339
1339
  if (e) {
1340
- if (!Kn(t) || !Hn(t.options)) {
1340
+ if (!L(t) || !Un(t.options)) {
1341
1341
  delete e.options, delete e.reference;
1342
1342
  return;
1343
1343
  }
1344
- e.options = D(t.options), Un(t.reference) ? e.reference = D(t.reference) : delete e.reference;
1344
+ e.options = E(t.options), Wn(t.reference) ? e.reference = E(t.reference) : delete e.reference;
1345
1345
  }
1346
1346
  }
1347
- function Nn({ field: e }) {
1348
- return En(e);
1347
+ function Pn({ field: e }) {
1348
+ return Dn(e);
1349
1349
  }
1350
- function Pn({ field: e }, t) {
1351
- e && Dn(e, Array.isArray(t) ? t.filter((e) => Wn(e)).map((e) => D(e)) : []);
1350
+ function Fn({ field: e }, t) {
1351
+ e && On(e, Array.isArray(t) ? t.filter((e) => Gn(e)).map((e) => E(e)) : []);
1352
1352
  }
1353
- function Fn({ node: e }) {
1353
+ function In({ node: e }) {
1354
1354
  return {
1355
1355
  show_when: qn(e.show_when),
1356
1356
  disabled_when: qn(e.disabled_when),
1357
1357
  readonly_when: qn(e.readonly_when)
1358
1358
  };
1359
1359
  }
1360
- function In({ node: e }, t) {
1361
- if (!Kn(t)) {
1360
+ function Ln({ node: e }, t) {
1361
+ if (!L(t)) {
1362
1362
  delete e.show_when, delete e.disabled_when, delete e.readonly_when;
1363
1363
  return;
1364
1364
  }
1365
- Gn(e, "show_when", t.show_when), Gn(e, "disabled_when", t.disabled_when), Gn(e, "readonly_when", t.readonly_when);
1365
+ Kn(e, "show_when", t.show_when), Kn(e, "disabled_when", t.disabled_when), Kn(e, "readonly_when", t.readonly_when);
1366
1366
  }
1367
- function Ln(e) {
1367
+ function Rn(e) {
1368
1368
  delete e.default_expr, delete e.computed_expr, delete e.computed_triggers;
1369
1369
  }
1370
- function Rn(e, t) {
1370
+ function zn(e, t) {
1371
1371
  e.persisted = t !== !1;
1372
1372
  }
1373
- function zn(e) {
1374
- return Kn(e) && typeof e.type == "string";
1375
- }
1376
1373
  function Bn(e) {
1377
- return Kn(e) && typeof e.type == "string";
1374
+ return L(e) && typeof e.type == "string";
1378
1375
  }
1379
1376
  function Vn(e) {
1380
- return Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : [];
1377
+ return L(e) && typeof e.type == "string";
1381
1378
  }
1382
1379
  function Hn(e) {
1383
- return Kn(e) && typeof e.mode == "string";
1380
+ return Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : [];
1384
1381
  }
1385
1382
  function Un(e) {
1386
- return Kn(e) && typeof e.resource == "string" && typeof e.value_field == "string" && typeof e.label_field == "string";
1383
+ return L(e) && typeof e.mode == "string";
1387
1384
  }
1388
1385
  function Wn(e) {
1389
- return Kn(e) && typeof e.type == "string";
1386
+ return L(e) && typeof e.resource == "string" && typeof e.value_field == "string" && typeof e.label_field == "string";
1390
1387
  }
1391
- function Gn(e, t, n) {
1392
- Kn(n) ? e[t] = D(n) : delete e[t];
1388
+ function Gn(e) {
1389
+ return L(e) && typeof e.type == "string";
1393
1390
  }
1394
- function Kn(e) {
1391
+ function Kn(e, t, n) {
1392
+ L(n) ? e[t] = E(n) : delete e[t];
1393
+ }
1394
+ function L(e) {
1395
1395
  return typeof e == "object" && !!e && !Array.isArray(e);
1396
1396
  }
1397
1397
  function qn(e) {
1398
- return e === void 0 ? e : D(e);
1398
+ return e === void 0 ? e : E(e);
1399
1399
  }
1400
1400
  //#endregion
1401
1401
  //#region src/inspector/capabilities/cards/interaction-rules.ts
1402
1402
  var Jn = {
1403
- key: L.interactionRules,
1403
+ key: I.interactionRules,
1404
1404
  title: "交互条件",
1405
1405
  group: "interaction",
1406
1406
  order: 40,
@@ -1429,13 +1429,13 @@ var Jn = {
1429
1429
  path: "readonly_when"
1430
1430
  }
1431
1431
  ],
1432
- read: Fn,
1433
- write: In,
1432
+ read: In,
1433
+ write: Ln,
1434
1434
  visible({ node: e }) {
1435
- return nn(e).length > 0;
1435
+ return rn(e).length > 0;
1436
1436
  },
1437
1437
  summary({ node: e }) {
1438
- let t = nn(e).filter((t) => !!e[t.name]).length;
1438
+ let t = rn(e).filter((t) => !!e[t.name]).length;
1439
1439
  return t > 0 ? {
1440
1440
  status: "configured",
1441
1441
  text: `${t} 条条件`
@@ -1456,7 +1456,7 @@ function Xn(e) {
1456
1456
  //#endregion
1457
1457
  //#region src/inspector/capabilities/cards/option-source.ts
1458
1458
  var Zn = {
1459
- key: L.optionSource,
1459
+ key: I.optionSource,
1460
1460
  title: "数据选项",
1461
1461
  group: "data",
1462
1462
  order: 30,
@@ -1479,8 +1479,8 @@ var Zn = {
1479
1479
  target: "field",
1480
1480
  path: "reference"
1481
1481
  }],
1482
- read: jn,
1483
- write: Mn,
1482
+ read: Mn,
1483
+ write: Nn,
1484
1484
  summary({ field: e }) {
1485
1485
  let t = e?.options;
1486
1486
  return t ? {
@@ -1492,7 +1492,7 @@ var Zn = {
1492
1492
  };
1493
1493
  }
1494
1494
  }, Qn = {
1495
- key: L.validationRules,
1495
+ key: I.validationRules,
1496
1496
  title: "校验规则",
1497
1497
  group: "validation",
1498
1498
  order: 20,
@@ -1514,8 +1514,8 @@ var Zn = {
1514
1514
  target: "field",
1515
1515
  path: "validation"
1516
1516
  }],
1517
- read: Nn,
1518
- write: Pn,
1517
+ read: Pn,
1518
+ write: Fn,
1519
1519
  summary({ field: e }) {
1520
1520
  let t = e?.validation?.length ?? 0;
1521
1521
  return e?.required && t > 0 ? {
@@ -1533,7 +1533,7 @@ var Zn = {
1533
1533
  };
1534
1534
  }
1535
1535
  }, $n = {
1536
- key: L.valueStrategy,
1536
+ key: I.valueStrategy,
1537
1537
  title: "动态与计算",
1538
1538
  group: "value",
1539
1539
  order: 10,
@@ -1570,8 +1570,8 @@ var Zn = {
1570
1570
  path: "persisted"
1571
1571
  }
1572
1572
  ],
1573
- read: kn,
1574
- write: An,
1573
+ read: An,
1574
+ write: jn,
1575
1575
  summary({ field: e }) {
1576
1576
  return e ? e.computed_expr ? {
1577
1577
  status: "configured",
@@ -1593,7 +1593,7 @@ var Zn = {
1593
1593
  "prepend",
1594
1594
  "append"
1595
1595
  ], tr = {
1596
- key: L.inputSlots,
1596
+ key: I.inputSlots,
1597
1597
  title: "输入插槽",
1598
1598
  group: "advanced",
1599
1599
  order: 45,
@@ -1602,7 +1602,7 @@ var Zn = {
1602
1602
  editLevel: "capability",
1603
1603
  commitMode: "confirm",
1604
1604
  migrationOwner: "schema",
1605
- capability: L.inputSlots,
1605
+ capability: I.inputSlots,
1606
1606
  key: "node.input_slots_editor",
1607
1607
  kind: "json",
1608
1608
  label: "输入插槽",
@@ -1613,7 +1613,7 @@ var Zn = {
1613
1613
  path: `slots.${e}`
1614
1614
  })),
1615
1615
  read({ node: e }) {
1616
- return D(e.slots ?? {});
1616
+ return E(e.slots ?? {});
1617
1617
  },
1618
1618
  write({ node: e }, t) {
1619
1619
  let n = nr(t);
@@ -1629,10 +1629,10 @@ var Zn = {
1629
1629
  }
1630
1630
  };
1631
1631
  function nr(e) {
1632
- return Be(e) ? Object.fromEntries(er.map((t) => [t, rr(e[t])]).filter((e) => !!e[1])) : {};
1632
+ return Ve(e) ? Object.fromEntries(er.map((t) => [t, rr(e[t])]).filter((e) => !!e[1])) : {};
1633
1633
  }
1634
1634
  function rr(e) {
1635
- if (Be(e)) {
1635
+ if (Ve(e)) {
1636
1636
  if (e.type === "text" && typeof e.text == "string" && e.text !== "") return {
1637
1637
  type: "text",
1638
1638
  text: e.text
@@ -1654,7 +1654,7 @@ function ir(e) {
1654
1654
  //#endregion
1655
1655
  //#region src/inspector/capabilities/cards/color-palette.ts
1656
1656
  var ar = {
1657
- key: L.colorPalette,
1657
+ key: I.colorPalette,
1658
1658
  title: "预设色板",
1659
1659
  group: "advanced",
1660
1660
  order: 50,
@@ -1663,7 +1663,7 @@ var ar = {
1663
1663
  editLevel: "capability",
1664
1664
  commitMode: "confirm",
1665
1665
  migrationOwner: "component",
1666
- capability: L.colorPalette,
1666
+ capability: I.colorPalette,
1667
1667
  key: "node.color_palette_editor",
1668
1668
  kind: "json",
1669
1669
  label: "预设色板",
@@ -1682,7 +1682,7 @@ var ar = {
1682
1682
  delete e.props?.predefine, e.props && Object.keys(e.props).length === 0 && delete e.props;
1683
1683
  return;
1684
1684
  }
1685
- e.props ??= {}, e.props.predefine = D(n);
1685
+ e.props ??= {}, e.props.predefine = E(n);
1686
1686
  },
1687
1687
  summary({ node: e }) {
1688
1688
  let t = or(e.props?.predefine);
@@ -1693,7 +1693,7 @@ var ar = {
1693
1693
  }
1694
1694
  };
1695
1695
  function or(e) {
1696
- return Array.isArray(e) ? e.filter((e) => typeof e == "string" && E("color", e)) : [];
1696
+ return Array.isArray(e) ? e.filter((e) => typeof e == "string" && T("color", e)) : [];
1697
1697
  }
1698
1698
  //#endregion
1699
1699
  //#region src/inspector/capabilities/cards/component-settings.ts
@@ -1714,7 +1714,7 @@ var sr = [
1714
1714
  "toolbar.sticky",
1715
1715
  "toolbar.stickyOffset"
1716
1716
  ], lr = {
1717
- key: L.uploadSettings,
1717
+ key: I.uploadSettings,
1718
1718
  title: "上传配置",
1719
1719
  group: "advanced",
1720
1720
  order: 50,
@@ -1723,7 +1723,7 @@ var sr = [
1723
1723
  editLevel: "capability",
1724
1724
  commitMode: "confirm",
1725
1725
  migrationOwner: "component",
1726
- capability: L.uploadSettings,
1726
+ capability: I.uploadSettings,
1727
1727
  key: "node.upload_settings_editor",
1728
1728
  kind: "json",
1729
1729
  label: "上传配置",
@@ -1744,12 +1744,12 @@ var sr = [
1744
1744
  summary({ node: e }) {
1745
1745
  let t = e.props ?? {}, n = [], r = t.valueMode;
1746
1746
  return r === "id" ? n.push("资源 ID") : r === "asset" ? n.push("资源对象") : n.push("URL"), typeof t.limit == "number" && t.limit > 0 && n.push(`最多 ${t.limit} 个`), t.multiple === !0 && n.push("允许多选"), {
1747
- status: sr.some((e) => j(t, e) !== void 0) ? "configured" : "empty",
1747
+ status: sr.some((e) => A(t, e) !== void 0) ? "configured" : "empty",
1748
1748
  text: n.join(" / ")
1749
1749
  };
1750
1750
  }
1751
1751
  }, ur = {
1752
- key: L.richTextSettings,
1752
+ key: I.richTextSettings,
1753
1753
  title: "富文本配置",
1754
1754
  group: "advanced",
1755
1755
  order: 50,
@@ -1758,7 +1758,7 @@ var sr = [
1758
1758
  editLevel: "capability",
1759
1759
  commitMode: "confirm",
1760
1760
  migrationOwner: "component",
1761
- capability: L.richTextSettings,
1761
+ capability: I.richTextSettings,
1762
1762
  key: "node.rich_text_settings_editor",
1763
1763
  kind: "json",
1764
1764
  label: "富文本配置",
@@ -1785,12 +1785,12 @@ var sr = [
1785
1785
  fallback: "Fallback"
1786
1786
  }[t.editor] ?? t.editor : "默认编辑器";
1787
1787
  return {
1788
- status: cr.some((e) => j(t, e) !== void 0) ? "configured" : "empty",
1788
+ status: cr.some((e) => A(t, e) !== void 0) ? "configured" : "empty",
1789
1789
  text: n
1790
1790
  };
1791
1791
  }
1792
1792
  }, dr = {
1793
- key: L.advancedConfig,
1793
+ key: I.advancedConfig,
1794
1794
  title: "高级配置",
1795
1795
  group: "advanced",
1796
1796
  order: 90,
@@ -1799,7 +1799,7 @@ var sr = [
1799
1799
  editLevel: "readonly",
1800
1800
  commitMode: "confirm",
1801
1801
  migrationOwner: "extension",
1802
- capability: L.advancedConfig,
1802
+ capability: I.advancedConfig,
1803
1803
  key: "node.advanced_config_status",
1804
1804
  kind: "text",
1805
1805
  label: "高级配置",
@@ -1841,19 +1841,19 @@ var sr = [
1841
1841
  }
1842
1842
  };
1843
1843
  function fr({ node: e }) {
1844
- return D(e.props ?? {});
1844
+ return E(e.props ?? {});
1845
1845
  }
1846
1846
  function pr(e) {
1847
1847
  return ({ node: t }, n) => {
1848
- if (Be(n)) {
1848
+ if (Ve(n)) {
1849
1849
  t.props ??= {};
1850
- for (let r of e) M(t.props, r, mr(j(n, r)));
1850
+ for (let r of e) j(t.props, r, mr(A(n, r)));
1851
1851
  Object.keys(t.props).length === 0 && delete t.props;
1852
1852
  }
1853
1853
  };
1854
1854
  }
1855
1855
  function mr(e) {
1856
- return e === void 0 ? void 0 : D(e);
1856
+ return e === void 0 ? void 0 : E(e);
1857
1857
  }
1858
1858
  function hr(e) {
1859
1859
  let t = fr(e);
@@ -1892,15 +1892,15 @@ function xr(e) {
1892
1892
  }
1893
1893
  //#endregion
1894
1894
  //#region src/inspector/field-schema/keys.ts
1895
- var Sr = {
1895
+ var R = {
1896
1896
  multiple: "multiple",
1897
1897
  listable: "listable",
1898
1898
  searchable: "searchable"
1899
1899
  };
1900
1900
  //#endregion
1901
1901
  //#region src/inspector/field-schema/fields.ts
1902
- function Cr(e, t, n) {
1903
- let { path: r, editLevel: i = "inline", commitMode: a = wr(n.kind, i), migrationOwner: o = t, ...s } = n;
1902
+ function Sr(e, t, n) {
1903
+ let { path: r, editLevel: i = "inline", commitMode: a = Cr(n.kind, i), migrationOwner: o = t, ...s } = n;
1904
1904
  return {
1905
1905
  ...s,
1906
1906
  storage: {
@@ -1912,37 +1912,37 @@ function Cr(e, t, n) {
1912
1912
  migrationOwner: o
1913
1913
  };
1914
1914
  }
1915
- function R(e) {
1916
- return Cr("node", "schema", e);
1917
- }
1918
1915
  function z(e) {
1919
- return Cr("field", "schema", e);
1916
+ return Sr("node", "schema", e);
1920
1917
  }
1921
1918
  function B(e) {
1922
- return Cr("node", "component", {
1919
+ return Sr("field", "schema", e);
1920
+ }
1921
+ function V(e) {
1922
+ return Sr("node", "component", {
1923
1923
  ...e,
1924
1924
  path: `props.${e.path}`
1925
1925
  });
1926
1926
  }
1927
- function wr(e, t) {
1927
+ function Cr(e, t) {
1928
1928
  return t === "capability" || t === "extension" ? "confirm" : e === "text" || e === "textarea" || e === "number" || e === "json" ? "blur" : "immediate";
1929
1929
  }
1930
- var Tr = [
1931
- R({
1930
+ var wr = [
1931
+ z({
1932
1932
  key: "node.name",
1933
1933
  kind: "text",
1934
1934
  label: "节点名称",
1935
1935
  path: "name",
1936
1936
  placeholder: "需要稳定 name 的节点可显式填写"
1937
1937
  }),
1938
- R({
1938
+ z({
1939
1939
  key: "node.title",
1940
1940
  kind: "text",
1941
1941
  label: "节点标题",
1942
1942
  path: "title",
1943
1943
  placeholder: "默认使用字段标签"
1944
1944
  }),
1945
- R({
1945
+ z({
1946
1946
  key: "node.tip",
1947
1947
  kind: "textarea",
1948
1948
  label: "标题提示",
@@ -1950,7 +1950,7 @@ var Tr = [
1950
1950
  path: "tip",
1951
1951
  rows: 3
1952
1952
  }),
1953
- R({
1953
+ z({
1954
1954
  key: "node.help",
1955
1955
  kind: "textarea",
1956
1956
  label: "辅助说明",
@@ -1958,7 +1958,7 @@ var Tr = [
1958
1958
  path: "help",
1959
1959
  rows: 3
1960
1960
  }),
1961
- R({
1961
+ z({
1962
1962
  key: "node.component",
1963
1963
  kind: "select",
1964
1964
  label: "展示组件",
@@ -1967,7 +1967,7 @@ var Tr = [
1967
1967
  commitMode: "command",
1968
1968
  options: []
1969
1969
  }),
1970
- R({
1970
+ z({
1971
1971
  key: "node.span",
1972
1972
  kind: "select",
1973
1973
  label: "列宽",
@@ -1999,7 +1999,7 @@ var Tr = [
1999
1999
  }
2000
2000
  ]
2001
2001
  }),
2002
- R({
2002
+ z({
2003
2003
  key: "node.gap",
2004
2004
  kind: "number",
2005
2005
  label: "子项间距",
@@ -2007,9 +2007,9 @@ var Tr = [
2007
2007
  min: 0,
2008
2008
  max: 48,
2009
2009
  step: 1,
2010
- visible: ({ node: e }) => qe(e.type)
2010
+ visible: ({ node: e }) => Je(e.type)
2011
2011
  }),
2012
- R({
2012
+ z({
2013
2013
  key: "node.shadow",
2014
2014
  kind: "select",
2015
2015
  label: "阴影",
@@ -2030,7 +2030,7 @@ var Tr = [
2030
2030
  ],
2031
2031
  visible: ({ node: e }) => e.type === "card"
2032
2032
  }),
2033
- R({
2033
+ z({
2034
2034
  key: "node.items",
2035
2035
  kind: "json",
2036
2036
  label: "项目",
@@ -2041,14 +2041,14 @@ var Tr = [
2041
2041
  rawValue: !0,
2042
2042
  visible: ({ node: e }) => e.type === "tabs" || e.type === "collapse"
2043
2043
  }),
2044
- R({
2044
+ z({
2045
2045
  key: "node.className",
2046
2046
  editLevel: "extension",
2047
2047
  kind: "text",
2048
2048
  label: "节点类名",
2049
2049
  path: "className"
2050
2050
  }),
2051
- R({
2051
+ z({
2052
2052
  key: "node.style",
2053
2053
  editLevel: "extension",
2054
2054
  kind: "json",
@@ -2057,7 +2057,7 @@ var Tr = [
2057
2057
  rows: 4,
2058
2058
  placeholder: "{\"maxWidth\":\"720px\"}"
2059
2059
  })
2060
- ], Er = ["node.name", "node.component"], Dr = [
2060
+ ], Tr = ["node.name", "node.component"], Er = [
2061
2061
  "node.title",
2062
2062
  "node.tip",
2063
2063
  "node.help",
@@ -2066,7 +2066,7 @@ var Tr = [
2066
2066
  "node.shadow",
2067
2067
  "node.className",
2068
2068
  "node.style"
2069
- ], Or = ["node.items"], kr = [
2069
+ ], Dr = ["node.items"], Or = [
2070
2070
  {
2071
2071
  label: "刷新当前页",
2072
2072
  value: "reload-current"
@@ -2079,8 +2079,8 @@ var Tr = [
2079
2079
  label: "不自动刷新",
2080
2080
  value: "none"
2081
2081
  }
2082
- ], Ar = [
2083
- R({
2082
+ ], kr = [
2083
+ z({
2084
2084
  key: "node.resource",
2085
2085
  kind: "select",
2086
2086
  label: "目标资源",
@@ -2090,7 +2090,7 @@ var Tr = [
2090
2090
  options: [],
2091
2091
  dataSource: { provider: "resources.list" }
2092
2092
  }),
2093
- R({
2093
+ z({
2094
2094
  key: "node.view",
2095
2095
  kind: "select",
2096
2096
  label: "列表视图",
@@ -2103,14 +2103,14 @@ var Tr = [
2103
2103
  paramsFromValues: { resource: "node.resource" }
2104
2104
  }
2105
2105
  }),
2106
- R({
2106
+ z({
2107
2107
  key: "binding.relation",
2108
2108
  kind: "text",
2109
2109
  label: "关系名",
2110
2110
  path: "binding.relation",
2111
2111
  placeholder: "items"
2112
2112
  }),
2113
- R({
2113
+ z({
2114
2114
  key: "binding.relationType",
2115
2115
  kind: "select",
2116
2116
  label: "关系类型",
@@ -2121,14 +2121,14 @@ var Tr = [
2121
2121
  value: "has-many"
2122
2122
  }]
2123
2123
  }),
2124
- R({
2124
+ z({
2125
2125
  key: "binding.parentKey",
2126
2126
  kind: "text",
2127
2127
  label: "父资源主键",
2128
2128
  path: "binding.parentKey",
2129
2129
  placeholder: "id"
2130
2130
  }),
2131
- R({
2131
+ z({
2132
2132
  key: "binding.foreignKey",
2133
2133
  kind: "select",
2134
2134
  label: "子资源外键",
@@ -2140,13 +2140,13 @@ var Tr = [
2140
2140
  paramsFromValues: { resource: "node.resource" }
2141
2141
  }
2142
2142
  }),
2143
- R({
2143
+ z({
2144
2144
  key: "binding.requireParent",
2145
2145
  kind: "checkbox",
2146
2146
  label: "要求父记录已保存",
2147
2147
  path: "binding.requireParent"
2148
2148
  }),
2149
- R({
2149
+ z({
2150
2150
  key: "binding.whenParentMissing",
2151
2151
  kind: "select",
2152
2152
  label: "父记录缺失时",
@@ -2166,18 +2166,18 @@ var Tr = [
2166
2166
  }
2167
2167
  ]
2168
2168
  }),
2169
- ...jr("create", "新增资源"),
2170
- ...jr("attach", "选择已有"),
2171
- ...jr("update", "编辑资源"),
2172
- ...jr("detach", "解除关联"),
2173
- ...jr("delete", "删除资源"),
2174
- R({
2169
+ ...Ar("create", "新增资源"),
2170
+ ...Ar("attach", "选择已有"),
2171
+ ...Ar("update", "编辑资源"),
2172
+ ...Ar("detach", "解除关联"),
2173
+ ...Ar("delete", "删除资源"),
2174
+ z({
2175
2175
  key: "binding.pagination.enabled",
2176
2176
  kind: "checkbox",
2177
2177
  label: "显示分页",
2178
2178
  path: "binding.pagination.enabled"
2179
2179
  }),
2180
- R({
2180
+ z({
2181
2181
  key: "binding.pagination.pageSize",
2182
2182
  kind: "number",
2183
2183
  label: "每页条数",
@@ -2186,45 +2186,45 @@ var Tr = [
2186
2186
  max: 200,
2187
2187
  step: 1
2188
2188
  }),
2189
- R({
2189
+ z({
2190
2190
  key: "binding.refresh.afterCreate",
2191
2191
  kind: "select",
2192
2192
  label: "新增或关联后",
2193
2193
  path: "binding.refresh.afterCreate",
2194
- options: kr
2194
+ options: Or
2195
2195
  }),
2196
- R({
2196
+ z({
2197
2197
  key: "binding.refresh.afterUpdate",
2198
2198
  kind: "select",
2199
2199
  label: "编辑后",
2200
2200
  path: "binding.refresh.afterUpdate",
2201
- options: kr
2201
+ options: Or
2202
2202
  }),
2203
- R({
2203
+ z({
2204
2204
  key: "binding.refresh.afterDelete",
2205
2205
  kind: "select",
2206
2206
  label: "解除或删除后",
2207
2207
  path: "binding.refresh.afterDelete",
2208
- options: kr
2208
+ options: Or
2209
2209
  })
2210
2210
  ];
2211
- function jr(e, t) {
2211
+ function Ar(e, t) {
2212
2212
  let n = `binding.operations.${e}`;
2213
2213
  return [
2214
- R({
2214
+ z({
2215
2215
  key: `${n}.enabled`,
2216
2216
  kind: "checkbox",
2217
2217
  label: t,
2218
2218
  path: `${n}.enabled`
2219
2219
  }),
2220
- R({
2220
+ z({
2221
2221
  key: `${n}.title`,
2222
2222
  kind: "text",
2223
2223
  label: "按钮文案",
2224
2224
  path: `${n}.title`,
2225
- visible: Mr(e)
2225
+ visible: jr(e)
2226
2226
  }),
2227
- R({
2227
+ z({
2228
2228
  key: `${n}.placement`,
2229
2229
  kind: "select",
2230
2230
  label: "按钮位置",
@@ -2236,9 +2236,9 @@ function jr(e, t) {
2236
2236
  label: "行操作",
2237
2237
  value: "row"
2238
2238
  }],
2239
- visible: Mr(e)
2239
+ visible: jr(e)
2240
2240
  }),
2241
- R({
2241
+ z({
2242
2242
  key: `${n}.interaction.type`,
2243
2243
  kind: "select",
2244
2244
  label: "交互方式",
@@ -2261,9 +2261,9 @@ function jr(e, t) {
2261
2261
  value: "handler"
2262
2262
  }
2263
2263
  ],
2264
- visible: Mr(e)
2264
+ visible: jr(e)
2265
2265
  }),
2266
- R({
2266
+ z({
2267
2267
  key: `${n}.interaction.form`,
2268
2268
  kind: "select",
2269
2269
  label: "表单视图",
@@ -2275,9 +2275,9 @@ function jr(e, t) {
2275
2275
  params: { kind: "form" },
2276
2276
  paramsFromValues: { resource: "node.resource" }
2277
2277
  },
2278
- visible: Nr(e, "form")
2278
+ visible: Mr(e, "form")
2279
2279
  }),
2280
- R({
2280
+ z({
2281
2281
  key: `${n}.interaction.mode`,
2282
2282
  kind: "select",
2283
2283
  label: "表单状态",
@@ -2289,9 +2289,9 @@ function jr(e, t) {
2289
2289
  label: "编辑当前行",
2290
2290
  value: "edit"
2291
2291
  }],
2292
- visible: Nr(e, "form")
2292
+ visible: Mr(e, "form")
2293
2293
  }),
2294
- R({
2294
+ z({
2295
2295
  key: `${n}.interaction.table`,
2296
2296
  kind: "select",
2297
2297
  label: "选择列表视图",
@@ -2303,16 +2303,16 @@ function jr(e, t) {
2303
2303
  params: { kind: "table" },
2304
2304
  paramsFromValues: { resource: "node.resource" }
2305
2305
  },
2306
- visible: Nr(e, "selection")
2306
+ visible: Mr(e, "selection")
2307
2307
  }),
2308
- R({
2308
+ z({
2309
2309
  key: `${n}.interaction.multiple`,
2310
2310
  kind: "checkbox",
2311
2311
  label: "允许批量选择",
2312
2312
  path: `${n}.interaction.multiple`,
2313
- visible: Nr(e, "selection")
2313
+ visible: Mr(e, "selection")
2314
2314
  }),
2315
- R({
2315
+ z({
2316
2316
  key: `${n}.interaction.source`,
2317
2317
  kind: "select",
2318
2318
  label: "候选范围",
@@ -2331,18 +2331,18 @@ function jr(e, t) {
2331
2331
  value: "all"
2332
2332
  }
2333
2333
  ],
2334
- visible: Nr(e, "selection")
2334
+ visible: Mr(e, "selection")
2335
2335
  }),
2336
- R({
2336
+ z({
2337
2337
  key: `${n}.interaction.handler`,
2338
2338
  kind: "text",
2339
2339
  label: "交互处理器",
2340
2340
  tip: "由宿主 onAction 或 session action handler 完整处理前端交互。",
2341
2341
  path: `${n}.interaction.handler`,
2342
2342
  placeholder: "order_item.openCustomFlow",
2343
- visible: Nr(e, "handler")
2343
+ visible: Mr(e, "handler")
2344
2344
  }),
2345
- R({
2345
+ z({
2346
2346
  key: `${n}.execution.type`,
2347
2347
  kind: "select",
2348
2348
  label: "执行方式",
@@ -2354,58 +2354,58 @@ function jr(e, t) {
2354
2354
  label: "业务 Action",
2355
2355
  value: "action"
2356
2356
  }],
2357
- visible: Mr(e)
2357
+ visible: jr(e)
2358
2358
  }),
2359
- R({
2359
+ z({
2360
2360
  key: `${n}.execution.action`,
2361
2361
  kind: "text",
2362
2362
  label: "业务 Action",
2363
2363
  tip: "直接传给 DataAdapter.executeAction,不要求在目标资源 schema.actions 中声明。",
2364
2364
  path: `${n}.execution.action`,
2365
2365
  placeholder: "order_item.customAction",
2366
- visible: Pr(e, "action")
2366
+ visible: Nr(e, "action")
2367
2367
  })
2368
2368
  ];
2369
2369
  }
2370
- function Mr(e) {
2370
+ function jr(e) {
2371
2371
  return ({ node: t }) => {
2372
2372
  if (t.binding?.type !== "relation-list") return !1;
2373
2373
  let n = t.binding.operations?.[e];
2374
2374
  return !!(n && n.enabled !== !1);
2375
2375
  };
2376
2376
  }
2377
- function Nr(e, t) {
2377
+ function Mr(e, t) {
2378
2378
  return ({ node: n }) => {
2379
2379
  if (n.binding?.type !== "relation-list") return !1;
2380
2380
  let r = n.binding.operations?.[e];
2381
- return !!(r && r.enabled !== !1 && (r.interaction?.type ?? Fr(e)) === t);
2381
+ return !!(r && r.enabled !== !1 && (r.interaction?.type ?? Pr(e)) === t);
2382
2382
  };
2383
2383
  }
2384
- function Pr(e, t) {
2384
+ function Nr(e, t) {
2385
2385
  return ({ node: n }) => {
2386
2386
  if (n.binding?.type !== "relation-list") return !1;
2387
2387
  let r = n.binding.operations?.[e];
2388
2388
  return !!(r && r.enabled !== !1 && (r.execution?.type ?? "resource") === t);
2389
2389
  };
2390
2390
  }
2391
- function Fr(e) {
2391
+ function Pr(e) {
2392
2392
  return e === "create" || e === "update" ? "form" : e === "attach" ? "selection" : "direct";
2393
2393
  }
2394
- var Ir = [
2395
- z({
2394
+ var Fr = [
2395
+ B({
2396
2396
  key: "field.name",
2397
2397
  kind: "text",
2398
2398
  label: "字段名",
2399
2399
  tip: "接口数据和表单值使用这个名称。已有字段改名时,需要同步调整后端和已有数据。",
2400
2400
  path: "name"
2401
2401
  }),
2402
- z({
2402
+ B({
2403
2403
  key: "field.label",
2404
2404
  kind: "text",
2405
2405
  label: "字段标签",
2406
2406
  path: "label"
2407
2407
  }),
2408
- z({
2408
+ B({
2409
2409
  key: "field.type",
2410
2410
  kind: "select",
2411
2411
  label: "数据类型",
@@ -2413,66 +2413,66 @@ var Ir = [
2413
2413
  path: "type",
2414
2414
  options: []
2415
2415
  }),
2416
- z({
2416
+ B({
2417
2417
  key: "field.required",
2418
2418
  kind: "checkbox",
2419
2419
  label: "必填",
2420
2420
  tip: "表示字段始终必填。有条件的必填规则请在校验规则中设置。",
2421
2421
  path: "required"
2422
2422
  }),
2423
- z({
2423
+ B({
2424
2424
  key: "field.readonly",
2425
2425
  kind: "checkbox",
2426
2426
  label: "只读",
2427
2427
  tip: "字段可以查看,但不能在表单中修改。",
2428
2428
  path: "readonly"
2429
2429
  }),
2430
- z({
2430
+ B({
2431
2431
  key: "field.disabled",
2432
2432
  kind: "checkbox",
2433
2433
  label: "禁用",
2434
2434
  tip: "控件不可操作,只影响当前界面,不代表后端禁止写入。",
2435
2435
  path: "disabled"
2436
2436
  }),
2437
- z({
2437
+ B({
2438
2438
  key: "field.multiple",
2439
2439
  kind: "checkbox",
2440
2440
  label: "多值",
2441
2441
  tip: "开启后保存多个同类型值。JSON 数组本身是一个 JSON 值,不使用此开关。",
2442
2442
  path: "multiple"
2443
2443
  }),
2444
- z({
2444
+ B({
2445
2445
  key: "field.formable",
2446
2446
  kind: "checkbox",
2447
2447
  label: "表单可用",
2448
2448
  tip: "决定自动生成表单时是否包含这个字段。显式配置的表单不受影响。",
2449
2449
  path: "formable"
2450
2450
  }),
2451
- z({
2451
+ B({
2452
2452
  key: "field.listable",
2453
2453
  kind: "checkbox",
2454
2454
  label: "列表可见",
2455
2455
  tip: "决定自动生成列表时是否包含这个字段。显式配置的列表列不受影响。",
2456
2456
  path: "listable"
2457
2457
  }),
2458
- z({
2458
+ B({
2459
2459
  key: "field.searchable",
2460
2460
  kind: "checkbox",
2461
2461
  label: "可搜索",
2462
2462
  tip: "决定自动生成搜索区域时是否包含这个字段。显式配置的搜索项不受影响。",
2463
2463
  path: "searchable"
2464
2464
  })
2465
- ], Lr = [
2465
+ ], Ir = [
2466
2466
  "field.name",
2467
2467
  "field.label",
2468
2468
  "field.type"
2469
- ], Rr = [
2469
+ ], Lr = [
2470
2470
  "field.required",
2471
2471
  "field.readonly",
2472
2472
  "field.disabled"
2473
2473
  ];
2474
- function V() {
2475
- return B({
2474
+ function Rr() {
2475
+ return V({
2476
2476
  key: "props.placeholder",
2477
2477
  kind: "text",
2478
2478
  label: "占位提示",
@@ -2480,7 +2480,7 @@ function V() {
2480
2480
  });
2481
2481
  }
2482
2482
  function H() {
2483
- return B({
2483
+ return V({
2484
2484
  key: "props.clearable",
2485
2485
  kind: "switch",
2486
2486
  label: "允许清空",
@@ -2490,13 +2490,13 @@ function H() {
2490
2490
  function zr() {
2491
2491
  return [
2492
2492
  H(),
2493
- B({
2493
+ V({
2494
2494
  key: "props.showAlpha",
2495
2495
  kind: "switch",
2496
2496
  label: "允许透明度",
2497
2497
  path: "showAlpha"
2498
2498
  }),
2499
- B({
2499
+ V({
2500
2500
  key: "props.colorFormat",
2501
2501
  kind: "select",
2502
2502
  label: "颜色格式",
@@ -2513,9 +2513,9 @@ function zr() {
2513
2513
  }
2514
2514
  function Br() {
2515
2515
  return [
2516
- V(),
2516
+ Rr(),
2517
2517
  H(),
2518
- B({
2518
+ V({
2519
2519
  key: "props.namespace",
2520
2520
  kind: "select",
2521
2521
  label: "图标命名空间",
@@ -2524,7 +2524,7 @@ function Br() {
2524
2524
  options: [],
2525
2525
  visible: ({ node: e, extensionContext: t }) => typeof e.props?.namespace == "string" || Vr(t?.icons)
2526
2526
  }),
2527
- B({
2527
+ V({
2528
2528
  key: "props.allowCustom",
2529
2529
  kind: "switch",
2530
2530
  label: "允许自定义值",
@@ -2569,7 +2569,7 @@ var Hr = [
2569
2569
  value: "HH:mm"
2570
2570
  }];
2571
2571
  function Gr(e, t, n, r, i = !1) {
2572
- return B({
2572
+ return V({
2573
2573
  key: e,
2574
2574
  kind: "text",
2575
2575
  label: t,
@@ -2582,19 +2582,19 @@ function Gr(e, t, n, r, i = !1) {
2582
2582
  }
2583
2583
  function Kr() {
2584
2584
  return [
2585
- B({
2585
+ V({
2586
2586
  key: "props.startPlaceholder",
2587
2587
  kind: "text",
2588
2588
  label: "开始提示",
2589
2589
  path: "startPlaceholder"
2590
2590
  }),
2591
- B({
2591
+ V({
2592
2592
  key: "props.endPlaceholder",
2593
2593
  kind: "text",
2594
2594
  label: "结束提示",
2595
2595
  path: "endPlaceholder"
2596
2596
  }),
2597
- B({
2597
+ V({
2598
2598
  key: "props.rangeSeparator",
2599
2599
  kind: "text",
2600
2600
  label: "范围分隔符",
@@ -2603,7 +2603,7 @@ function Kr() {
2603
2603
  ];
2604
2604
  }
2605
2605
  function qr() {
2606
- return B({
2606
+ return V({
2607
2607
  key: "props.showWordLimit",
2608
2608
  kind: "switch",
2609
2609
  label: "显示字数",
@@ -2611,14 +2611,14 @@ function qr() {
2611
2611
  });
2612
2612
  }
2613
2613
  var Jr = [
2614
- V(),
2614
+ Rr(),
2615
2615
  H(),
2616
2616
  qr()
2617
- ], Yr = [V(), H()], Xr = [
2618
- V(),
2617
+ ], Yr = [Rr(), H()], Xr = [
2618
+ Rr(),
2619
2619
  H(),
2620
2620
  qr(),
2621
- B({
2621
+ V({
2622
2622
  key: "props.rows",
2623
2623
  kind: "number",
2624
2624
  label: "行数",
@@ -2626,34 +2626,34 @@ var Jr = [
2626
2626
  min: 1,
2627
2627
  step: 1
2628
2628
  }),
2629
- B({
2629
+ V({
2630
2630
  key: "props.autosize",
2631
2631
  kind: "switch",
2632
2632
  label: "自适应",
2633
2633
  path: "autosize"
2634
2634
  })
2635
2635
  ], Zr = [
2636
- V(),
2636
+ Rr(),
2637
2637
  H(),
2638
- B({
2638
+ V({
2639
2639
  key: "props.min",
2640
2640
  kind: "number",
2641
2641
  label: "最小值",
2642
2642
  path: "min"
2643
2643
  }),
2644
- B({
2644
+ V({
2645
2645
  key: "props.max",
2646
2646
  kind: "number",
2647
2647
  label: "最大值",
2648
2648
  path: "max"
2649
2649
  }),
2650
- B({
2650
+ V({
2651
2651
  key: "props.step",
2652
2652
  kind: "number",
2653
2653
  label: "步长",
2654
2654
  path: "step"
2655
2655
  }),
2656
- B({
2656
+ V({
2657
2657
  key: "props.precision",
2658
2658
  kind: "number",
2659
2659
  label: "精度",
@@ -2662,61 +2662,61 @@ var Jr = [
2662
2662
  step: 1
2663
2663
  })
2664
2664
  ], Qr = [
2665
- B({
2665
+ V({
2666
2666
  key: "props.min",
2667
2667
  kind: "number",
2668
2668
  label: "最小值",
2669
2669
  path: "min"
2670
2670
  }),
2671
- B({
2671
+ V({
2672
2672
  key: "props.max",
2673
2673
  kind: "number",
2674
2674
  label: "最大值",
2675
2675
  path: "max"
2676
2676
  }),
2677
- B({
2677
+ V({
2678
2678
  key: "props.step",
2679
2679
  kind: "number",
2680
2680
  label: "步长",
2681
2681
  path: "step"
2682
2682
  })
2683
- ], $r = [B({
2683
+ ], $r = [V({
2684
2684
  key: "props.max",
2685
2685
  kind: "number",
2686
2686
  label: "最大分值",
2687
2687
  path: "max",
2688
2688
  min: 1
2689
- })], ei = [B({
2689
+ })], ei = [V({
2690
2690
  key: "props.activeText",
2691
2691
  kind: "text",
2692
2692
  label: "启用文案",
2693
2693
  path: "activeText"
2694
- }), B({
2694
+ }), V({
2695
2695
  key: "props.inactiveText",
2696
2696
  kind: "text",
2697
2697
  label: "停用文案",
2698
2698
  path: "inactiveText"
2699
2699
  })], ti = [
2700
- V(),
2700
+ Rr(),
2701
2701
  H(),
2702
- B({
2702
+ V({
2703
2703
  key: "props.filterable",
2704
2704
  kind: "switch",
2705
2705
  label: "可搜索",
2706
2706
  path: "filterable"
2707
2707
  })
2708
2708
  ], ni = [
2709
- V(),
2709
+ Rr(),
2710
2710
  H(),
2711
2711
  Gr("props.format", "展示格式", "format", Hr),
2712
2712
  Gr("props.valueFormat", "提交格式", "valueFormat", Hr, !0)
2713
2713
  ], ri = [
2714
- V(),
2714
+ Rr(),
2715
2715
  H(),
2716
2716
  Gr("props.format", "展示格式", "format", Ur),
2717
2717
  Gr("props.valueFormat", "提交格式", "valueFormat", Ur, !0)
2718
2718
  ], ii = [
2719
- V(),
2719
+ Rr(),
2720
2720
  H(),
2721
2721
  Gr("props.format", "展示格式", "format", Wr),
2722
2722
  Gr("props.valueFormat", "提交格式", "valueFormat", Wr, !0)
@@ -2729,7 +2729,7 @@ var Jr = [
2729
2729
  H(),
2730
2730
  Gr("props.format", "展示格式", "format", Wr)
2731
2731
  ], si = [
2732
- B({
2732
+ V({
2733
2733
  key: "props.editor",
2734
2734
  editLevel: "capability",
2735
2735
  kind: "select",
@@ -2758,7 +2758,7 @@ var Jr = [
2758
2758
  }
2759
2759
  ]
2760
2760
  }),
2761
- B({
2761
+ V({
2762
2762
  key: "props.format",
2763
2763
  editLevel: "capability",
2764
2764
  kind: "select",
@@ -2779,7 +2779,7 @@ var Jr = [
2779
2779
  }
2780
2780
  ]
2781
2781
  }),
2782
- B({
2782
+ V({
2783
2783
  key: "props.height",
2784
2784
  editLevel: "capability",
2785
2785
  kind: "number",
@@ -2788,7 +2788,7 @@ var Jr = [
2788
2788
  min: 120,
2789
2789
  step: 10
2790
2790
  }),
2791
- B({
2791
+ V({
2792
2792
  key: "props.toolbar.mode",
2793
2793
  editLevel: "capability",
2794
2794
  kind: "select",
@@ -2813,14 +2813,14 @@ var Jr = [
2813
2813
  }
2814
2814
  ]
2815
2815
  }),
2816
- B({
2816
+ V({
2817
2817
  key: "props.toolbar.sticky",
2818
2818
  editLevel: "capability",
2819
2819
  kind: "switch",
2820
2820
  label: "工具吸顶",
2821
2821
  path: "toolbar.sticky"
2822
2822
  }),
2823
- B({
2823
+ V({
2824
2824
  key: "props.toolbar.stickyOffset",
2825
2825
  editLevel: "capability",
2826
2826
  kind: "number",
@@ -2829,7 +2829,7 @@ var Jr = [
2829
2829
  min: 0,
2830
2830
  step: 1
2831
2831
  }),
2832
- B({
2832
+ V({
2833
2833
  key: "props.editorProps",
2834
2834
  editLevel: "extension",
2835
2835
  migrationOwner: "extension",
@@ -2840,7 +2840,7 @@ var Jr = [
2840
2840
  placeholder: "{\"init\":{\"statusbar\":true}}"
2841
2841
  })
2842
2842
  ], ci = [
2843
- B({
2843
+ V({
2844
2844
  key: "props.valueMode",
2845
2845
  editLevel: "capability",
2846
2846
  kind: "select",
@@ -2862,7 +2862,7 @@ var Jr = [
2862
2862
  }
2863
2863
  ]
2864
2864
  }),
2865
- B({
2865
+ V({
2866
2866
  key: "props.limit",
2867
2867
  editLevel: "capability",
2868
2868
  kind: "number",
@@ -2873,7 +2873,7 @@ var Jr = [
2873
2873
  placeholder: "0 表示不限制",
2874
2874
  visible: ({ node: e }) => e.props?.multiple === !0
2875
2875
  }),
2876
- B({
2876
+ V({
2877
2877
  key: "props.accept",
2878
2878
  editLevel: "capability",
2879
2879
  kind: "text",
@@ -2881,7 +2881,7 @@ var Jr = [
2881
2881
  path: "accept",
2882
2882
  placeholder: "例如 image/*,.pdf"
2883
2883
  }),
2884
- B({
2884
+ V({
2885
2885
  key: "props.maxSize",
2886
2886
  editLevel: "capability",
2887
2887
  kind: "number",
@@ -2891,7 +2891,7 @@ var Jr = [
2891
2891
  step: 1,
2892
2892
  placeholder: "0 表示不限制"
2893
2893
  }),
2894
- B({
2894
+ V({
2895
2895
  key: "props.multiple",
2896
2896
  editLevel: "capability",
2897
2897
  kind: "switch",
@@ -2899,28 +2899,28 @@ var Jr = [
2899
2899
  tip: "允许一次选择多个资源。最终保存的值结构还取决于值模式。",
2900
2900
  path: "multiple"
2901
2901
  }),
2902
- B({
2902
+ V({
2903
2903
  key: "props.editableTitle",
2904
2904
  editLevel: "capability",
2905
2905
  kind: "switch",
2906
2906
  label: "编辑标题",
2907
2907
  path: "editableTitle"
2908
2908
  }),
2909
- B({
2909
+ V({
2910
2910
  key: "props.uploadText",
2911
2911
  editLevel: "capability",
2912
2912
  kind: "text",
2913
2913
  label: "上传文案",
2914
2914
  path: "uploadText"
2915
2915
  }),
2916
- B({
2916
+ V({
2917
2917
  key: "props.pickText",
2918
2918
  editLevel: "capability",
2919
2919
  kind: "text",
2920
2920
  label: "选择文案",
2921
2921
  path: "pickText"
2922
2922
  }),
2923
- B({
2923
+ V({
2924
2924
  key: "props.writeBack",
2925
2925
  editLevel: "extension",
2926
2926
  migrationOwner: "extension",
@@ -2931,7 +2931,7 @@ var Jr = [
2931
2931
  placeholder: "[{\"from\":\"asset.metadata.coverUrl\",\"to\":\"cover_url\",\"strategy\":\"empty\",\"events\":[\"upload\"]}]"
2932
2932
  })
2933
2933
  ], li = [
2934
- B({
2934
+ V({
2935
2935
  key: "props.rows",
2936
2936
  kind: "number",
2937
2937
  label: "编辑行数",
@@ -2939,7 +2939,7 @@ var Jr = [
2939
2939
  min: 2,
2940
2940
  step: 1
2941
2941
  }),
2942
- B({
2942
+ V({
2943
2943
  key: "props.indent",
2944
2944
  kind: "number",
2945
2945
  label: "缩进",
@@ -2947,13 +2947,13 @@ var Jr = [
2947
2947
  min: 0,
2948
2948
  step: 1
2949
2949
  }),
2950
- B({
2950
+ V({
2951
2951
  key: "props.formatOnBlur",
2952
2952
  kind: "switch",
2953
2953
  label: "失焦格式",
2954
2954
  path: "formatOnBlur"
2955
2955
  }),
2956
- B({
2956
+ V({
2957
2957
  key: "props.emptyValue",
2958
2958
  editLevel: "extension",
2959
2959
  migrationOwner: "extension",
@@ -2965,15 +2965,15 @@ var Jr = [
2965
2965
  })
2966
2966
  ];
2967
2967
  function ui() {
2968
- let e = [L.interactionRules], t = [L.validationRules, L.interactionRules], n = [
2969
- L.validationRules,
2970
- L.optionSource,
2971
- L.interactionRules
2972
- ], r = [L.valueStrategy, ...t], i = [L.valueStrategy, ...t], a = [Sr.listable, Sr.searchable], o = [
2973
- Sr.multiple,
2974
- Sr.listable,
2975
- Sr.searchable
2976
- ], s = [Sr.listable], c = [], l = ["computed"], u = ["dynamic"], d = [], f = [
2968
+ let e = [I.interactionRules], t = [I.validationRules, I.interactionRules], n = [
2969
+ I.validationRules,
2970
+ I.optionSource,
2971
+ I.interactionRules
2972
+ ], r = [I.valueStrategy, ...t], i = [I.valueStrategy, ...t], a = [R.listable, R.searchable], o = [
2973
+ R.multiple,
2974
+ R.listable,
2975
+ R.searchable
2976
+ ], s = [R.listable], c = [], l = ["computed"], u = ["dynamic"], d = [], f = [
2977
2977
  "static",
2978
2978
  "dictionary",
2979
2979
  "reference"
@@ -2992,7 +2992,7 @@ function ui() {
2992
2992
  "max_length",
2993
2993
  "pattern"
2994
2994
  ],
2995
- capabilities: [...r, L.inputSlots]
2995
+ capabilities: [...r, I.inputSlots]
2996
2996
  }),
2997
2997
  U("password", "密码框", Yr, {
2998
2998
  group: "text-input",
@@ -3001,7 +3001,7 @@ function ui() {
3001
3001
  valueStrategies: c,
3002
3002
  optionSources: d,
3003
3003
  validation: ["required", "complexity"],
3004
- capabilities: [...t, L.inputSlots]
3004
+ capabilities: [...t, I.inputSlots]
3005
3005
  }),
3006
3006
  U("textarea", "多行文本", Xr, {
3007
3007
  group: "text-input",
@@ -3175,14 +3175,14 @@ function ui() {
3175
3175
  valueStrategies: c,
3176
3176
  optionSources: d,
3177
3177
  validation: ["required", "format"],
3178
- capabilities: [...t, L.colorPalette]
3178
+ capabilities: [...t, I.colorPalette]
3179
3179
  }),
3180
3180
  U("rich-text", "富文本", si, {
3181
3181
  fieldCapabilities: a,
3182
3182
  defaultValue: "dialog",
3183
3183
  valueStrategies: c,
3184
3184
  optionSources: d,
3185
- capabilities: [...e, L.richTextSettings]
3185
+ capabilities: [...e, I.richTextSettings]
3186
3186
  }),
3187
3187
  U("json-editor", "JSON", li, {
3188
3188
  fieldCapabilities: a,
@@ -3214,8 +3214,8 @@ function ui() {
3214
3214
  validation: ["required"],
3215
3215
  capabilities: [
3216
3216
  ...e,
3217
- L.validationRules,
3218
- L.uploadSettings
3217
+ I.validationRules,
3218
+ I.uploadSettings
3219
3219
  ]
3220
3220
  }),
3221
3221
  U("file-upload", "文件上传", ci, {
@@ -3226,14 +3226,14 @@ function ui() {
3226
3226
  validation: ["required"],
3227
3227
  capabilities: [
3228
3228
  ...e,
3229
- L.validationRules,
3230
- L.uploadSettings
3229
+ I.validationRules,
3230
+ I.uploadSettings
3231
3231
  ]
3232
3232
  })
3233
3233
  ];
3234
3234
  }
3235
3235
  function U(e, t, n, r) {
3236
- let i = Ze(e);
3236
+ let i = Qe(e);
3237
3237
  return {
3238
3238
  component: e,
3239
3239
  option: {
@@ -3276,10 +3276,10 @@ function mi(e) {
3276
3276
  //#endregion
3277
3277
  //#region src/inspector/field-schema/component-options.ts
3278
3278
  function hi(e, t, n) {
3279
- let r = gi(e), i = n?.getComponentPropertyConfig(r) ?? fi(r), a = i?.option?.group, o = a ? n?.listComponentOptions(a) ?? mi(a) : i?.option ? [i.option] : [], s = tt(t) ? o.filter((e) => {
3279
+ let r = gi(e), i = n?.getComponentPropertyConfig(r) ?? fi(r), a = i?.option?.group, o = a ? n?.listComponentOptions(a) ?? mi(a) : i?.option ? [i.option] : [], s = nt(t) ? o.filter((e) => {
3280
3280
  if (e.value === r) return !0;
3281
3281
  let i = n?.getComponentPropertyConfig(e.value) ?? fi(e.value);
3282
- return nt(e.value, t, i?.profile?.fieldTypes);
3282
+ return rt(e.value, t, i?.profile?.fieldTypes);
3283
3283
  }) : o;
3284
3284
  return s.length ? s.map(({ label: e, value: t }) => ({
3285
3285
  label: e,
@@ -3308,7 +3308,7 @@ function vi(e) {
3308
3308
  key: "basic",
3309
3309
  title: "基础信息",
3310
3310
  fields: [
3311
- ...Ri(e, Ai(Ir, Lr)),
3311
+ ...Ri(e, Ai(Fr, Ir)),
3312
3312
  ...Fi(e, t),
3313
3313
  ...zi(e)
3314
3314
  ]
@@ -3390,10 +3390,10 @@ function yi(e) {
3390
3390
  }), t;
3391
3391
  }
3392
3392
  function bi(e) {
3393
- return e.map((e) => Ar.find((t) => t.key === e)).filter((e) => !!e);
3393
+ return e.map((e) => kr.find((t) => t.key === e)).filter((e) => !!e);
3394
3394
  }
3395
3395
  function xi(e) {
3396
- return Ar.filter((t) => e.some((e) => t.key.startsWith(e)));
3396
+ return kr.filter((t) => e.some((e) => t.key.startsWith(e)));
3397
3397
  }
3398
3398
  function Si(e, t) {
3399
3399
  return (Wi(e, t)?.props ?? []).filter((t) => t.editLevel === "inline" && !wi(e, t)).map((t) => Ci(e, t));
@@ -3420,16 +3420,16 @@ function W(e, t, n) {
3420
3420
  });
3421
3421
  }
3422
3422
  function Ti(e) {
3423
- return Ai(Tr, Dr.filter((t) => t === "node.span" || t === "node.gap" || t === "node.shadow" || e.field && (t === "node.tip" || t === "node.help"))).filter((e) => e.editLevel === "inline");
3423
+ return Ai(wr, Er.filter((t) => t === "node.span" || t === "node.gap" || t === "node.shadow" || e.field && (t === "node.tip" || t === "node.help"))).filter((e) => e.editLevel === "inline");
3424
3424
  }
3425
3425
  function Ei(e) {
3426
- return [...Li(e).filter((e) => e.key !== "node.component"), ...Ai(Tr, ["node.title", "node.help"]).filter((e) => e.editLevel === "inline")];
3426
+ return [...Li(e).filter((e) => e.key !== "node.component"), ...Ai(wr, ["node.title", "node.help"]).filter((e) => e.editLevel === "inline")];
3427
3427
  }
3428
3428
  function Di(e) {
3429
3429
  return Li(e).filter((e) => e.key === "node.component");
3430
3430
  }
3431
3431
  function Oi(e) {
3432
- return e.node.type !== "tabs" && e.node.type !== "collapse" ? [] : Ai(Tr, Or).map((t) => ({
3432
+ return e.node.type !== "tabs" && e.node.type !== "collapse" ? [] : Ai(wr, Dr).map((t) => ({
3433
3433
  ...t,
3434
3434
  props: {
3435
3435
  ...t.props ?? {},
@@ -3447,7 +3447,7 @@ function ji(e) {
3447
3447
  return e.props?.capability?.group;
3448
3448
  }
3449
3449
  function Mi(e) {
3450
- return e.capability === L.uploadSettings || e.capability === L.richTextSettings || e.capability === L.colorPalette;
3450
+ return e.capability === I.uploadSettings || e.capability === I.richTextSettings || e.capability === I.colorPalette;
3451
3451
  }
3452
3452
  function Ni(e, t) {
3453
3453
  let n = Wi(e, t), r = Pi(n);
@@ -3481,7 +3481,7 @@ function Ni(e, t) {
3481
3481
  });
3482
3482
  }
3483
3483
  function Pi(e) {
3484
- return (e?.profile?.capabilities ?? []).filter((e) => e !== L.advancedConfig);
3484
+ return (e?.profile?.capabilities ?? []).filter((e) => e !== I.advancedConfig);
3485
3485
  }
3486
3486
  function Fi(e, t) {
3487
3487
  let n = e.field;
@@ -3576,7 +3576,7 @@ function Ii(e, t, n) {
3576
3576
  };
3577
3577
  }
3578
3578
  function Li(e) {
3579
- return Ai(Tr, Er).flatMap((t) => {
3579
+ return Ai(wr, Tr).flatMap((t) => {
3580
3580
  if (t.key === "node.name" && !_i(e.node)) return [];
3581
3581
  if (t.key !== "node.component" || t.kind !== "select") return [t];
3582
3582
  let n = hi(e.node, e.field, e.extensionContext);
@@ -3588,15 +3588,15 @@ function Li(e) {
3588
3588
  }
3589
3589
  function Ri(e, t) {
3590
3590
  let n = Wi(e, gi(e.node))?.profile?.fieldTypes;
3591
- return t.flatMap((t) => t.key === "field.multiple" && Gi(e.node) ? [] : t.key !== "field.type" || t.kind !== "select" ? [t] : et(e.node.component, e.field, n) ? [{
3591
+ return t.flatMap((t) => t.key === "field.multiple" && Gi(e.node) ? [] : t.key !== "field.type" || t.kind !== "select" ? [t] : tt(e.node.component, e.field, n) ? [{
3592
3592
  ...t,
3593
- editLevel: tt(e.field) ? "readonly" : t.editLevel,
3594
- options: $e(e.node.component, e.field, n)
3593
+ editLevel: nt(e.field) ? "readonly" : t.editLevel,
3594
+ options: et(e.node.component, e.field, n)
3595
3595
  }] : []);
3596
3596
  }
3597
3597
  function zi(e) {
3598
- let t = Tn(e.field);
3599
- return Ri(e, Ai(Ir, Rr)).map((e) => {
3598
+ let t = En(e.field);
3599
+ return Ri(e, Ai(Fr, Lr)).map((e) => {
3600
3600
  let n = e.key === "field.required" && t !== void 0;
3601
3601
  return {
3602
3602
  ...e,
@@ -3615,7 +3615,7 @@ function Bi(e) {
3615
3615
  return e.when ? "条件必填" : e.message ? "必填(自定义提示)" : "必填(校验规则)";
3616
3616
  }
3617
3617
  function Vi(e) {
3618
- return Ri(e, Ai(Ir, Hi(Wi(e, gi(e.node))))).map((e) => ({
3618
+ return Ri(e, Ai(Fr, Hi(Wi(e, gi(e.node))))).map((e) => ({
3619
3619
  ...e,
3620
3620
  span: e.key === "field.multiple" ? 24 : 12,
3621
3621
  props: {
@@ -3645,32 +3645,32 @@ var Ki = [
3645
3645
  key: "form",
3646
3646
  title: "表单组件",
3647
3647
  items: [
3648
- G("text", "文本输入", "text", N("text"), "text"),
3649
- G("number", "数字", "number", N("number"), "number"),
3650
- G("select", "下拉选择", "select", N("select"), "select"),
3651
- G("multi-select", "下拉多选", "multi-select", N("multi-select"), "multi-select"),
3652
- G("select-tree", "树选择", "select-tree", N("select-tree"), "select-tree"),
3653
- G("cascader", "级联选择", "cascader", N("cascader"), "cascader"),
3654
- G("radio", "单选", "radio", N("radio"), "radio"),
3655
- G("checkbox", "多选", "checkbox", N("checkbox"), "checkbox"),
3656
- G("date-time", "日期时间", "datetime", N("date-picker"), "date-picker"),
3657
- G("date-time-range", "日期时间范围", "date-range", N("date-range-picker"), "date-range-picker"),
3658
- G("switch", "开关", "switch", N("switch"), "switch"),
3659
- G("slider", "滑块", "slider", N("slider"), "slider"),
3660
- G("rate", "评分", "rate", N("rate"), "rate"),
3661
- G("color", "颜色", "color", N("color"), "color"),
3662
- G("icon-input", "图标", "icon-input", N("icon-input"), "icon-input")
3648
+ G("text", "文本输入", "text", M("text"), "text"),
3649
+ G("number", "数字", "number", M("number"), "number"),
3650
+ G("select", "下拉选择", "select", M("select"), "select"),
3651
+ G("multi-select", "下拉多选", "multi-select", M("multi-select"), "multi-select"),
3652
+ G("select-tree", "树选择", "select-tree", M("select-tree"), "select-tree"),
3653
+ G("cascader", "级联选择", "cascader", M("cascader"), "cascader"),
3654
+ G("radio", "单选", "radio", M("radio"), "radio"),
3655
+ G("checkbox", "多选", "checkbox", M("checkbox"), "checkbox"),
3656
+ G("date-time", "日期时间", "datetime", M("date-picker"), "date-picker"),
3657
+ G("date-time-range", "日期时间范围", "date-range", M("date-range-picker"), "date-range-picker"),
3658
+ G("switch", "开关", "switch", M("switch"), "switch"),
3659
+ G("slider", "滑块", "slider", M("slider"), "slider"),
3660
+ G("rate", "评分", "rate", M("rate"), "rate"),
3661
+ G("color", "颜色", "color", M("color"), "color"),
3662
+ G("icon-input", "图标", "icon-input", M("icon-input"), "icon-input")
3663
3663
  ]
3664
3664
  },
3665
3665
  {
3666
3666
  key: "function",
3667
3667
  title: "功能组件",
3668
3668
  items: [
3669
- G("rich-text", "富文本", "rich-text", N("rich-text"), "rich-text"),
3670
- G("json-editor", "JSON", "json-editor", N("json-editor"), "json-editor"),
3671
- G("key-value", "键值对", "key-value", N("key-value"), "key-value"),
3672
- G("image-upload", "图片上传", "image-upload", N("image-upload"), "image-upload"),
3673
- G("file-upload", "文件上传", "file-upload", N("file-upload"), "file-upload"),
3669
+ G("rich-text", "富文本", "rich-text", M("rich-text"), "rich-text"),
3670
+ G("json-editor", "JSON", "json-editor", M("json-editor"), "json-editor"),
3671
+ G("key-value", "键值对", "key-value", M("key-value"), "key-value"),
3672
+ G("image-upload", "图片上传", "image-upload", M("image-upload"), "image-upload"),
3673
+ G("file-upload", "文件上传", "file-upload", M("file-upload"), "file-upload"),
3674
3674
  {
3675
3675
  key: "nested-table",
3676
3676
  title: "嵌套表格",
@@ -3881,7 +3881,7 @@ function G(e, t, n, r, i) {
3881
3881
  type: "field",
3882
3882
  field: e?.name,
3883
3883
  component: i,
3884
- props: Qe(i)
3884
+ props: $e(i)
3885
3885
  };
3886
3886
  }
3887
3887
  };
@@ -3896,7 +3896,7 @@ function Zi(e, t) {
3896
3896
  kind: "node",
3897
3897
  create: () => ({ node: t.createNode() })
3898
3898
  };
3899
- let n = t.component ?? t.key, r = t.fieldType ?? N(n);
3899
+ let n = t.component ?? t.key, r = t.fieldType ?? M(n);
3900
3900
  return {
3901
3901
  key: t.key,
3902
3902
  title: t.title,
@@ -3912,7 +3912,7 @@ function Zi(e, t) {
3912
3912
  type: r,
3913
3913
  formable: !0,
3914
3914
  listable: !1,
3915
- ...ct(r, n)
3915
+ ...lt(r, n)
3916
3916
  };
3917
3917
  return {
3918
3918
  field: i,
@@ -3923,9 +3923,9 @@ function Zi(e, t) {
3923
3923
  }
3924
3924
  //#endregion
3925
3925
  //#region src/extensions/context.ts
3926
- var Qi = Jt("designer.runtime-components"), $i = Jt("designer.materials"), ea = Jt("designer.component-properties"), ta = Jt("designer.capability-cards"), na = Jt("designer.services"), ra = "@sparqjs/schema-designer", ia = "@sparqjs/schema-designer:host";
3926
+ var Qi = Yt("designer.runtime-components"), $i = Yt("designer.materials"), ea = Yt("designer.component-properties"), ta = Yt("designer.capability-cards"), na = Yt("designer.services"), ra = "@sparqjs/schema-designer", ia = "@sparqjs/schema-designer:host";
3927
3927
  function aa(e = [], t, n, r, i) {
3928
- let a = Yt(), o = [], s = /* @__PURE__ */ new Set(), c = t ?? ee(), l = i?.materialKeys ? new Set(i.materialKeys) : void 0, u = Ge(i?.nodePermissions);
3928
+ let a = Xt(), o = [], s = /* @__PURE__ */ new Set(), c = t ?? ee(), l = i?.materialKeys ? new Set(i.materialKeys) : void 0, u = Ke(i?.nodePermissions);
3929
3929
  a.install(oa(c, t ? "host" : "builtin"));
3930
3930
  for (let t of e) s.has(t.key) && o.push(ma("duplicate-extension-key", t.key, t.key, `设计器扩展 ${t.key} 重复注册,后声明内容将继续参与覆盖。`)), s.add(t.key), la(t), a.install(ca(t));
3931
3931
  n && a.install(sa(n));
@@ -3982,23 +3982,23 @@ function oa(e, t) {
3982
3982
  return {
3983
3983
  owner: ra,
3984
3984
  contributions: [
3985
- I(Qi, [...e.entries()].map(([e, t]) => ({
3985
+ F(Qi, [...e.entries()].map(([e, t]) => ({
3986
3986
  key: e,
3987
3987
  value: t
3988
3988
  })), t),
3989
- I($i, Ji.map((e) => ({
3989
+ F($i, Ji.map((e) => ({
3990
3990
  key: e.key,
3991
3991
  value: e
3992
3992
  })), "builtin"),
3993
- I(ea, pi().map((e) => ({
3993
+ F(ea, pi().map((e) => ({
3994
3994
  key: e.component,
3995
3995
  value: e
3996
3996
  })), "builtin"),
3997
- I(ta, br().map((e) => ({
3997
+ F(ta, br().map((e) => ({
3998
3998
  key: e.key,
3999
3999
  value: e
4000
4000
  })), "builtin"),
4001
- I(na, _e.map((e) => ({
4001
+ F(na, ve.map((e) => ({
4002
4002
  key: e.key,
4003
4003
  value: e
4004
4004
  })), "builtin")
@@ -4008,7 +4008,7 @@ function oa(e, t) {
4008
4008
  function sa(e) {
4009
4009
  return {
4010
4010
  owner: ia,
4011
- contributions: [I(na, (e instanceof Map ? [...e.values()] : e).map((e) => ({
4011
+ contributions: [F(na, (e instanceof Map ? [...e.values()] : e).map((e) => ({
4012
4012
  key: e.key,
4013
4013
  value: e
4014
4014
  })), "host")]
@@ -4018,23 +4018,23 @@ function ca(e) {
4018
4018
  return {
4019
4019
  owner: e.key,
4020
4020
  contributions: [
4021
- I(Qi, Object.entries(e.components ?? {}).map(([e, t]) => ({
4021
+ F(Qi, Object.entries(e.components ?? {}).map(([e, t]) => ({
4022
4022
  key: e,
4023
4023
  value: t
4024
4024
  }))),
4025
- I($i, (e.materials ?? []).map((e) => ({
4025
+ F($i, (e.materials ?? []).map((e) => ({
4026
4026
  key: e.key,
4027
4027
  value: _a(e)
4028
4028
  }))),
4029
- I(ea, (e.componentProperties ?? []).map((e) => ({
4029
+ F(ea, (e.componentProperties ?? []).map((e) => ({
4030
4030
  key: e.component,
4031
4031
  value: ha(e)
4032
4032
  }))),
4033
- I(ta, (e.capabilityCards ?? []).map((e) => ({
4033
+ F(ta, (e.capabilityCards ?? []).map((e) => ({
4034
4034
  key: e.key,
4035
4035
  value: ga(e)
4036
4036
  }))),
4037
- I(na, (e.services ?? []).map((e) => ({
4037
+ F(na, (e.services ?? []).map((e) => ({
4038
4038
  key: e.key,
4039
4039
  value: e
4040
4040
  })))
@@ -4479,7 +4479,7 @@ var wa = r({
4479
4479
  },
4480
4480
  features: {
4481
4481
  type: Object,
4482
- default: () => He
4482
+ default: () => Ue
4483
4483
  }
4484
4484
  },
4485
4485
  emits: {
@@ -4492,7 +4492,7 @@ var wa = r({
4492
4492
  e.state.device = t;
4493
4493
  };
4494
4494
  return () => {
4495
- let r = e.features ?? He;
4495
+ let r = e.features ?? Ue;
4496
4496
  return /* @__PURE__ */ i("header", { class: "sparq-designer-toolbar" }, /* @__PURE__ */ i("div", { class: "sparq-designer-toolbar__group sparq-designer-button-group" }, r.resourceTree ? /* @__PURE__ */ i("button", {
4497
4497
  type: "button",
4498
4498
  class: ["sparq-designer-icon-button", e.state.resourceTreeOpen ? "is-active" : void 0],
@@ -4505,14 +4505,14 @@ var wa = r({
4505
4505
  title: "上一步",
4506
4506
  "aria-label": "上一步",
4507
4507
  disabled: e.state.history.length === 0,
4508
- onClick: () => St(e.state)
4508
+ onClick: () => Ct(e.state)
4509
4509
  }, Sa("undo")), /* @__PURE__ */ i("button", {
4510
4510
  type: "button",
4511
4511
  class: "sparq-designer-icon-button",
4512
4512
  title: "下一步",
4513
4513
  "aria-label": "下一步",
4514
4514
  disabled: e.state.future.length === 0,
4515
- onClick: () => Ct(e.state)
4515
+ onClick: () => wt(e.state)
4516
4516
  }, Sa("redo"))), r.deviceModes ? /* @__PURE__ */ i("div", {
4517
4517
  class: "sparq-designer-toolbar__group sparq-designer-button-group is-center",
4518
4518
  role: "tablist",
@@ -4588,7 +4588,7 @@ var wa = r({
4588
4588
  },
4589
4589
  setup(e, { attrs: t, emit: n, slots: r }) {
4590
4590
  let a = f(), o, s = () => {
4591
- a.value && (o?.destroy(), o = pe.create(a.value, {
4591
+ a.value && (o?.destroy(), o = me.create(a.value, {
4592
4592
  animation: 140,
4593
4593
  ...e.options,
4594
4594
  onSort(t) {
@@ -4794,13 +4794,13 @@ var Aa = r({
4794
4794
  //#endregion
4795
4795
  //#region src/shared/ui-adapter.ts
4796
4796
  function q() {
4797
- return he();
4797
+ return ge();
4798
4798
  }
4799
4799
  function J() {
4800
4800
  return C(q());
4801
4801
  }
4802
4802
  function ja(e = {}) {
4803
- let t = me();
4803
+ let t = he();
4804
4804
  return {
4805
4805
  ...t,
4806
4806
  renderField(n) {
@@ -4872,7 +4872,7 @@ function Fa(e) {
4872
4872
  let t = /* @__PURE__ */ new Set(), n = (e) => {
4873
4873
  for (let r of e) r.id && t.add(r.id), n(r.children ?? []);
4874
4874
  };
4875
- return n(O(e.schema, e.viewName)), t;
4875
+ return n(D(e.schema, e.viewName)), t;
4876
4876
  }
4877
4877
  function Ia(e, t, n, r) {
4878
4878
  let i = t.raw.id ?? t.id;
@@ -4926,7 +4926,7 @@ function Ba(e, t, n = {}) {
4926
4926
  if ((r?.schema !== e.schema || r.nodeId !== n) && (r = Va(e, n), za.set(e, r)), !r.node || !r.movable) return !1;
4927
4927
  let i = t.to.dataset.designerParentId || void 0, a = r.placement.get(i);
4928
4928
  if (a !== void 0) return a;
4929
- let o = _t(e, r.node, i);
4929
+ let o = vt(e, r.node, i);
4930
4930
  return r.placement.set(i, o), o;
4931
4931
  },
4932
4932
  onAdd(r) {
@@ -4934,17 +4934,17 @@ function Ba(e, t, n = {}) {
4934
4934
  if (i.materialKey) {
4935
4935
  r.item.remove();
4936
4936
  let n = e.extensionContext ? e.extensionContext.getMaterial(i.materialKey) : Ma.get(i.materialKey);
4937
- n && jt(e, t, n, a);
4937
+ n && Mt(e, t, n, a);
4938
4938
  return;
4939
4939
  }
4940
- i.nodePath && zt(e, i.nodePath, t, a, { adjustSameParentIndex: !1 });
4940
+ i.nodePath && Bt(e, i.nodePath, t, a, { adjustSameParentIndex: !1 });
4941
4941
  },
4942
4942
  onEnd(r) {
4943
4943
  try {
4944
4944
  if (r.from !== r.to || r.oldIndex === void 0 || r.newIndex === void 0 || r.item.dataset.materialKey) return;
4945
4945
  let i = r.item.dataset.nodePath;
4946
4946
  if (!i) return;
4947
- zt(e, i, t, Ha(e, t, r.newIndex, n, i));
4947
+ Bt(e, i, t, Ha(e, t, r.newIndex, n, i));
4948
4948
  } finally {
4949
4949
  za.delete(e);
4950
4950
  }
@@ -4952,25 +4952,25 @@ function Ba(e, t, n = {}) {
4952
4952
  };
4953
4953
  }
4954
4954
  function Va(e, t) {
4955
- let n = O(e.schema, e.viewName), r = t ? Ga(n, t) : void 0;
4955
+ let n = D(e.schema, e.viewName), r = t ? Ga(n, t) : void 0;
4956
4956
  return {
4957
4957
  schema: e.schema,
4958
4958
  node: r,
4959
4959
  nodeId: t,
4960
- movable: !!(t && r && F(e, t).movable),
4960
+ movable: !!(t && r && P(e, t).movable),
4961
4961
  placement: /* @__PURE__ */ new Map()
4962
4962
  };
4963
4963
  }
4964
4964
  function Ha(e, t, n, r = {}, i) {
4965
4965
  let a = Ua(e, t);
4966
4966
  if (!a.length) return 0;
4967
- let o = Dt(a, r).filter((e) => e.id !== i);
4967
+ let o = Ot(a, r).filter((e) => e.id !== i);
4968
4968
  if (!o.length || n === void 0) return a.length;
4969
4969
  let s = Math.max(0, Math.min(n, o.length));
4970
4970
  return s <= 0 ? Ka(a, o[0]?.id) : s >= o.length ? a.length : Ka(a, o[s]?.id);
4971
4971
  }
4972
4972
  function Ua(e, t) {
4973
- let n = O(e.schema, e.viewName);
4973
+ let n = D(e.schema, e.viewName);
4974
4974
  return t ? Wa(n, t) ?? [] : n;
4975
4975
  }
4976
4976
  function Wa(e, t) {
@@ -5004,8 +5004,8 @@ function qa(e, t, n, r, a = {}, o = {}) {
5004
5004
  function Ja(e, t) {
5005
5005
  let n = e.state, r = t.raw.id ?? t.id, i = { form: e.form?.values }, a = e.resolveNodeMetadata?.(r);
5006
5006
  return {
5007
- move: a ?? Et(n, r, i),
5008
- permissions: a ? gt(n, a.node, a.parentId, n.schema, a.field) : F(n, r)
5007
+ move: a ?? Dt(n, r, i),
5008
+ permissions: a ? _t(n, a.node, a.parentId, n.schema, a.field) : P(n, r)
5009
5009
  };
5010
5010
  }
5011
5011
  function Ya(e, t, n, r = Ja(e, t)) {
@@ -5025,31 +5025,31 @@ function Ya(e, t, n, r = Ja(e, t)) {
5025
5025
  selectedNodeIds: e.selectedNodeIds,
5026
5026
  content: n,
5027
5027
  onSelect(e) {
5028
- kt(a, e);
5028
+ At(a, e);
5029
5029
  },
5030
5030
  onCopy() {
5031
5031
  a.selection = {
5032
5032
  type: "form-node",
5033
5033
  path: o
5034
- }, Ut(a);
5034
+ }, Wt(a);
5035
5035
  },
5036
5036
  onUp() {
5037
5037
  a.selection = {
5038
5038
  type: "form-node",
5039
5039
  path: o
5040
- }, Wt(a, -1, l);
5040
+ }, Gt(a, -1, l);
5041
5041
  },
5042
5042
  onDown() {
5043
5043
  a.selection = {
5044
5044
  type: "form-node",
5045
5045
  path: o
5046
- }, Wt(a, 1, l);
5046
+ }, Gt(a, 1, l);
5047
5047
  },
5048
5048
  onRemove() {
5049
5049
  a.selection = {
5050
5050
  type: "form-node",
5051
5051
  path: o
5052
- }, Ht(a);
5052
+ }, Ut(a);
5053
5053
  }
5054
5054
  });
5055
5055
  }
@@ -5058,8 +5058,8 @@ function Xa(e) {
5058
5058
  return (a) => ((t !== e.state.schema || n !== e.state.extensionContext || r !== e.form?.values) && (t = e.state.schema, n = e.state.extensionContext, r = e.form?.values, i = Za(e.state, { form: r })), i.get(a));
5059
5059
  }
5060
5060
  function Za(e, t) {
5061
- let n = /* @__PURE__ */ new Map(), r = new Map(P(e.schema).map((e) => [e.name, e])), i = (e, a) => {
5062
- let o = Dt(e, t), s = new Map(o.map((e, t) => [e.id, t]));
5061
+ let n = /* @__PURE__ */ new Map(), r = new Map(N(e.schema).map((e) => [e.name, e])), i = (e, a) => {
5062
+ let o = Ot(e, t), s = new Map(o.map((e, t) => [e.id, t]));
5063
5063
  for (let t of e) {
5064
5064
  if (t.id) {
5065
5065
  let e = s.get(t.id);
@@ -5074,12 +5074,12 @@ function Za(e, t) {
5074
5074
  i(t.children ?? [], t.id);
5075
5075
  }
5076
5076
  };
5077
- return i(O(e.schema, e.viewName)), n;
5077
+ return i(D(e.schema, e.viewName)), n;
5078
5078
  }
5079
5079
  function Qa(e, t, n, r = {}) {
5080
5080
  let i = t.node;
5081
5081
  if (!$a(i.type)) return n.renderLayoutNode?.(t);
5082
- let a = i.raw.id ?? i.id, o = re(xe(e.schema, e.viewName), i), s = qa(e, a, t.items?.map((e) => Ra(e.content, e.span ?? o?.span)), "拖入字段或视图节点", r, { gap: o?.gap });
5082
+ let a = i.raw.id ?? i.id, o = re(Se(e.schema, e.viewName), i), s = qa(e, a, t.items?.map((e) => Ra(e.content, e.span ?? o?.span)), "拖入字段或视图节点", r, { gap: o?.gap });
5083
5083
  return n.renderLayoutNode?.({
5084
5084
  ...t,
5085
5085
  items: [{
@@ -5118,12 +5118,12 @@ var eo = r({
5118
5118
  richTextEditors: Object
5119
5119
  },
5120
5120
  setup(e) {
5121
- let t = oe(), r = te({
5121
+ let t = se(), r = te({
5122
5122
  applyDefaults: !0,
5123
5123
  schema: e.state.schema.schema
5124
5124
  });
5125
5125
  m(() => e.state.schema, (e) => {
5126
- r.setValues(ae({ schema: e.schema }));
5126
+ r.setValues(oe({ schema: e.schema }));
5127
5127
  }, { deep: !0 });
5128
5128
  let a = d(/* @__PURE__ */ new Set());
5129
5129
  m(() => e.state.selection?.type === "form-node" ? e.state.selection.path : void 0, (e, t) => {
@@ -5219,7 +5219,7 @@ async function ao(e, t, n, r, i = vi(e)) {
5219
5219
  if (!a) return;
5220
5220
  let o = so(a, t);
5221
5221
  if (oo(a, t)) return [i.key, []];
5222
- let s = await be(a.provider, e, o, n, r);
5222
+ let s = await xe(a.provider, e, o, n, r);
5223
5223
  return [i.key, s];
5224
5224
  }), o = await Promise.all(a), s = {};
5225
5225
  for (let e of o) e && (s[e[0]] = e[1]);
@@ -5246,10 +5246,10 @@ function co(e, t = vi(e)) {
5246
5246
  }
5247
5247
  function lo(e, t) {
5248
5248
  let n = uo(e, t);
5249
- return t.some((e) => e.property.key === "field.name") && fo(e, n.node, n.field), t.some((e) => zo(e.property)) && n.node.props && Object.keys(n.node.props).length === 0 && delete n.node.props, n.field && (t.some((e) => bo(e.property)) && tt(e.field) ? xo(e.node, n.node) : ho(n.node, e.node, n.field, go(e, n.node.component), po(n.node, e.node) || t.some((e) => bo(e.property)))), n;
5249
+ return t.some((e) => e.property.key === "field.name") && fo(e, n.node, n.field), t.some((e) => zo(e.property)) && n.node.props && Object.keys(n.node.props).length === 0 && delete n.node.props, n.field && (t.some((e) => bo(e.property)) && nt(e.field) ? xo(e.node, n.node) : ho(n.node, e.node, n.field, go(e, n.node.component), po(n.node, e.node) || t.some((e) => bo(e.property)))), n;
5250
5250
  }
5251
5251
  function uo(e, t) {
5252
- let n = D(e.node), r = e.field ? D(e.field) : void 0;
5252
+ let n = E(e.node), r = e.field ? E(e.field) : void 0;
5253
5253
  for (let i of t) No(e, n, r, i.property, Lo(i.property, i.value));
5254
5254
  return {
5255
5255
  node: n,
@@ -5268,7 +5268,7 @@ function mo(e) {
5268
5268
  return e.type === "field" ? e.component ?? "text" : e.component;
5269
5269
  }
5270
5270
  function ho(e, t, n, r, i = !0) {
5271
- tt(n) || (r === "multiple" ? n.multiple = !0 : r === "single" && delete n.multiple), i && vo(e, n), Co(e, t, n);
5271
+ nt(n) || (r === "multiple" ? n.multiple = !0 : r === "single" && delete n.multiple), i && vo(e, n), Co(e, t, n);
5272
5272
  }
5273
5273
  function go(e, t) {
5274
5274
  return _o(e, t)?.multiple;
@@ -5289,7 +5289,7 @@ function yo(e) {
5289
5289
  return e.key === "props.valueMode" || e.key === "props.multiple";
5290
5290
  }
5291
5291
  function bo(e) {
5292
- return yo(e) || e.capability === L.uploadSettings;
5292
+ return yo(e) || e.capability === I.uploadSettings;
5293
5293
  }
5294
5294
  function xo(e, t) {
5295
5295
  t.props ??= {}, So(e, t, "valueMode"), So(e, t, "multiple");
@@ -5368,13 +5368,13 @@ function Eo(e, t, n) {
5368
5368
  formable: !0,
5369
5369
  readonly: n || e.editLevel === "readonly",
5370
5370
  multiple: t.multiple,
5371
- reference: t.reference ? D(t.reference) : void 0,
5371
+ reference: t.reference ? E(t.reference) : void 0,
5372
5372
  options: r ? {
5373
5373
  mode: "static",
5374
5374
  value_policy: "closed",
5375
5375
  items: r.map((e) => ({ ...e }))
5376
- } : t.options ? D(t.options) : void 0,
5377
- validation: t.validation?.filter((e) => e.type !== "required").map((e) => D(e))
5376
+ } : t.options ? E(t.options) : void 0,
5377
+ validation: t.validation?.filter((e) => e.type !== "required").map((e) => E(e))
5378
5378
  };
5379
5379
  }
5380
5380
  function Do(e, t) {
@@ -5411,17 +5411,17 @@ function ko(e) {
5411
5411
  function Ao(e, t) {
5412
5412
  let n = t.capability ? e.extensionContext ? e.extensionContext.getCapabilityCard(t.capability) : yr(t.capability) : void 0;
5413
5413
  if (n?.read) return n.read(e);
5414
- if (t.key === "field.required" && Tn(e.field)) return !0;
5414
+ if (t.key === "field.required" && En(e.field)) return !0;
5415
5415
  if (t.storage.target === "node") {
5416
5416
  let n = jo(e, t);
5417
5417
  if (n !== void 0) return n;
5418
- if (t.key === "node.span") return String(j(e.node, t.storage.path) ?? 24);
5419
- if (t.key === "node.shadow") return j(e.node, t.storage.path) ?? "always";
5418
+ if (t.key === "node.span") return String(A(e.node, t.storage.path) ?? 24);
5419
+ if (t.key === "node.shadow") return A(e.node, t.storage.path) ?? "always";
5420
5420
  if (t.storage.path === "component") return e.node.component ?? (e.node.type === "field" ? "text" : void 0);
5421
- let r = j(e.node, t.storage.path);
5422
- return r !== void 0 || !t.storage.path.startsWith("props.") ? r : j(Qe(e.node.component) ?? {}, t.storage.path.slice(6));
5421
+ let r = A(e.node, t.storage.path);
5422
+ return r !== void 0 || !t.storage.path.startsWith("props.") ? r : A($e(e.node.component) ?? {}, t.storage.path.slice(6));
5423
5423
  }
5424
- return t.storage.target === "field" && e.field ? j(e.field, t.storage.path) : void 0;
5424
+ return t.storage.target === "field" && e.field ? A(e.field, t.storage.path) : void 0;
5425
5425
  }
5426
5426
  function jo(e, t) {
5427
5427
  if (e.node.binding?.type !== "relation-list" || t.storage.target !== "node") return;
@@ -5442,8 +5442,8 @@ function jo(e, t) {
5442
5442
  if (r === "execution.type") return i?.execution?.type ?? "resource";
5443
5443
  }
5444
5444
  if (t.key.startsWith("binding.operations.") && t.key.endsWith(".enabled")) {
5445
- let n = t.storage.path.slice(0, -8), r = j(e.node, n);
5446
- if (Be(r)) return r.enabled !== !1;
5445
+ let n = t.storage.path.slice(0, -8), r = A(e.node, n);
5446
+ if (Ve(r)) return r.enabled !== !1;
5447
5447
  }
5448
5448
  }
5449
5449
  function Mo(e) {
@@ -5462,15 +5462,15 @@ function No(e, t, n, r, i) {
5462
5462
  }
5463
5463
  if (r.storage.target === "node") {
5464
5464
  if (r.key.endsWith(".interaction.type") && typeof i == "string") {
5465
- M(t, r.storage.path.slice(0, -5), { type: i });
5465
+ j(t, r.storage.path.slice(0, -5), { type: i });
5466
5466
  return;
5467
5467
  }
5468
5468
  if (r.key.endsWith(".execution.type") && typeof i == "string") {
5469
- M(t, r.storage.path.slice(0, -5), { type: i });
5469
+ j(t, r.storage.path.slice(0, -5), { type: i });
5470
5470
  return;
5471
5471
  }
5472
- M(t, r.storage.path, i);
5473
- } else r.storage.target === "field" && n && M(n, r.storage.path, i);
5472
+ j(t, r.storage.path, i);
5473
+ } else r.storage.target === "field" && n && j(n, r.storage.path, i);
5474
5474
  }
5475
5475
  function Po(e) {
5476
5476
  if (Ro(e)) return "json";
@@ -5497,7 +5497,7 @@ function Io(e, t) {
5497
5497
  return Ro(e) || e.kind !== "json" ? t : t === void 0 ? void 0 : JSON.stringify(t, void 0, 2);
5498
5498
  }
5499
5499
  function Lo(e, t) {
5500
- if (e.key === "field.default") return t == null || t === "" || Array.isArray(t) && t.length === 0 ? void 0 : D(t);
5500
+ if (e.key === "field.default") return t == null || t === "" || Array.isArray(t) && t.length === 0 ? void 0 : E(t);
5501
5501
  if (Ro(e)) return t;
5502
5502
  if (e.key === "node.span") {
5503
5503
  let e = typeof t == "number" ? t : Number(t);
@@ -5525,7 +5525,7 @@ function zo(e) {
5525
5525
  //#endregion
5526
5526
  //#region src/inspector/commands/component-migration.ts
5527
5527
  function Bo(e, t) {
5528
- let n = os(e.node), r = cs(e, n), i = cs(e, t), a = is(e, n, t), o = D(e.node), s = e.field ? D(e.field) : void 0, c = D(o), l = s ? D(s) : void 0, u = [];
5528
+ let n = os(e.node), r = cs(e, n), i = cs(e, t), a = is(e, n, t), o = E(e.node), s = e.field ? E(e.field) : void 0, c = E(o), l = s ? E(s) : void 0, u = [];
5529
5529
  if (a === "unchanged") return {
5530
5530
  sourceComponent: n,
5531
5531
  sourceLabel: ss(e, n),
@@ -5537,7 +5537,7 @@ function Bo(e, t) {
5537
5537
  node: c,
5538
5538
  field: l
5539
5539
  };
5540
- if (tt(e.field) && i?.profile && !nt(t, e.field, i.profile.fieldTypes)) throw Error(`已有后端字段类型 ${e.field?.type} 与目标组件 ${ss(e, t)} 不兼容`);
5540
+ if (nt(e.field) && i?.profile && !rt(t, e.field, i.profile.fieldTypes)) throw Error(`已有后端字段类型 ${e.field?.type} 与目标组件 ${ss(e, t)} 不兼容`);
5541
5541
  c.component = t, u.push({
5542
5542
  action: "change",
5543
5543
  target: "node",
@@ -5551,15 +5551,15 @@ function Bo(e, t) {
5551
5551
  let r = i.migration({
5552
5552
  sourceComponent: n,
5553
5553
  targetComponent: t,
5554
- sourceNode: D(o),
5555
- sourceField: s ? D(s) : void 0,
5556
- node: D(c),
5557
- field: l ? D(l) : void 0,
5558
- fields: D(e.fields ?? []),
5559
- changes: D(u)
5554
+ sourceNode: E(o),
5555
+ sourceField: s ? E(s) : void 0,
5556
+ node: E(c),
5557
+ field: l ? E(l) : void 0,
5558
+ fields: E(e.fields ?? []),
5559
+ changes: E(u)
5560
5560
  });
5561
5561
  if (os(r.node) !== t) throw Error(`组件迁移器必须返回目标组件 ${t}`);
5562
- c = D(r.node), l = r.field ? D(r.field) : void 0, u.push(...D(r.changes ?? [])), d = r.requiresConfirmation === !0;
5562
+ c = E(r.node), l = r.field ? E(r.field) : void 0, u.push(...E(r.changes ?? [])), d = r.requiresConfirmation === !0;
5563
5563
  }
5564
5564
  c.props && Object.keys(c.props).length === 0 && delete c.props;
5565
5565
  let f = !d && a === "same-group" && !as(u) ? "none" : "confirmation";
@@ -5579,8 +5579,8 @@ function Vo(e, t, n, r) {
5579
5579
  let i = new Set((n ?? []).map(Ho));
5580
5580
  for (let n of t ?? []) {
5581
5581
  if (n.migrationOwner !== "component" || i.has(Ho(n)) || n.storage.target !== "node") continue;
5582
- let t = j(e, n.storage.path);
5583
- t !== void 0 && (M(e, n.storage.path, void 0), r.push({
5582
+ let t = A(e, n.storage.path);
5583
+ t !== void 0 && (j(e, n.storage.path, void 0), r.push({
5584
5584
  action: "remove",
5585
5585
  target: "node",
5586
5586
  path: n.storage.path,
@@ -5598,8 +5598,8 @@ function Uo(e, t, n, r, i, a) {
5598
5598
  if (r.target === "schema") continue;
5599
5599
  let i = r.target === "node" ? t : r.target === "field" ? n : void 0;
5600
5600
  if (!i) continue;
5601
- let o = i, s = j(o, r.path);
5602
- s !== void 0 && (M(o, r.path, void 0), a.push({
5601
+ let o = i, s = A(o, r.path);
5602
+ s !== void 0 && (j(o, r.path, void 0), a.push({
5603
5603
  action: "remove",
5604
5604
  target: r.target,
5605
5605
  path: r.path,
@@ -5609,10 +5609,10 @@ function Uo(e, t, n, r, i, a) {
5609
5609
  }
5610
5610
  }
5611
5611
  function Wo(e, t, n) {
5612
- let r = Qe(t);
5612
+ let r = $e(t);
5613
5613
  if (r) {
5614
5614
  e.props ??= {};
5615
- for (let [t, i] of Object.entries(r)) e.props[t] === void 0 && (e.props[t] = D(i), n.push({
5615
+ for (let [t, i] of Object.entries(r)) e.props[t] === void 0 && (e.props[t] = E(i), n.push({
5616
5616
  action: "add",
5617
5617
  target: "node",
5618
5618
  path: `props.${t}`,
@@ -5624,8 +5624,8 @@ function Wo(e, t, n) {
5624
5624
  function Go(e, t, n) {
5625
5625
  if (!e) return;
5626
5626
  let r = new Set(t), i = e;
5627
- for (let t of Object.values(Sr)) {
5628
- if (t === Sr.multiple && tt(e) || r.has(t)) continue;
5627
+ for (let t of Object.values(R)) {
5628
+ if (t === R.multiple && nt(e) || r.has(t)) continue;
5629
5629
  let a = i[t];
5630
5630
  a !== void 0 && (delete i[t], n.push({
5631
5631
  action: "remove",
@@ -5637,7 +5637,7 @@ function Go(e, t, n) {
5637
5637
  }
5638
5638
  }
5639
5639
  function Ko(e, t, n) {
5640
- if (!(!e || !t || tt(e))) {
5640
+ if (!(!e || !t || nt(e))) {
5641
5641
  if (t === "multiple" && e.multiple !== !0) e.multiple = !0, n.push({
5642
5642
  action: "add",
5643
5643
  target: "field",
@@ -5688,7 +5688,7 @@ function Jo(e, t, n, r) {
5688
5688
  target: "field",
5689
5689
  path: "validation.range",
5690
5690
  label: "补充范围结构与起止顺序校验",
5691
- after: D(a)
5691
+ after: E(a)
5692
5692
  });
5693
5693
  return;
5694
5694
  }
@@ -5776,7 +5776,7 @@ function Xo(e, t, n, r) {
5776
5776
  }
5777
5777
  }
5778
5778
  function Zo(e, t, n, r) {
5779
- if (!e?.options || !t.includes(L.optionSource) || n.includes(L.optionSource)) return;
5779
+ if (!e?.options || !t.includes(I.optionSource) || n.includes(I.optionSource)) return;
5780
5780
  let i = e.options;
5781
5781
  delete e.options, r.push({
5782
5782
  action: "remove",
@@ -5830,7 +5830,7 @@ function ns(e) {
5830
5830
  }
5831
5831
  function rs(e, t, n, r) {
5832
5832
  if (!n) return;
5833
- let i = n.type, a = rt(t, n, cs(e, t.component ?? "")?.profile?.fieldTypes);
5833
+ let i = n.type, a = it(t, n, cs(e, t.component ?? "")?.profile?.fieldTypes);
5834
5834
  i !== a && (n.type = a, r.push({
5835
5835
  action: "change",
5836
5836
  target: "field",
@@ -5890,19 +5890,19 @@ function us(e, t, n = vi(e)) {
5890
5890
  }] : [], ...o];
5891
5891
  }
5892
5892
  function ds(e, t) {
5893
- let n = At(e);
5893
+ let n = jt(e);
5894
5894
  if (!n) return {
5895
5895
  status: "rejected",
5896
5896
  message: "字段属性命令缺少当前选中节点"
5897
5897
  };
5898
- if (n.id && !F(e, n.id).editable) return {
5898
+ if (n.id && !P(e, n.id).editable) return {
5899
5899
  status: "rejected",
5900
5900
  message: "当前节点为只读,不能修改字段或节点属性"
5901
5901
  };
5902
5902
  let r = {
5903
5903
  node: n,
5904
- field: Kt(e),
5905
- fields: P(e.schema),
5904
+ field: qt(e),
5905
+ fields: N(e.schema),
5906
5906
  extensionContext: e.extensionContext
5907
5907
  }, i = t.filter((e) => e.type === "change-component");
5908
5908
  if (i.length) return t.length === 1 ? _s(e, r, i[0]) : {
@@ -5926,7 +5926,7 @@ function ds(e, t) {
5926
5926
  };
5927
5927
  if (!o.length) return { status: "unchanged" };
5928
5928
  let c = lo(r, o);
5929
- return xs(c.node, r.node) && xs(c.field, r.field) ? { status: "unchanged" } : (Gt(e, c.node, c.field), { status: "applied" });
5929
+ return xs(c.node, r.node) && xs(c.field, r.field) ? { status: "unchanged" } : (Kt(e, c.node, c.field), { status: "applied" });
5930
5930
  }
5931
5931
  function fs(e, t) {
5932
5932
  let n = ps(e, t);
@@ -5997,7 +5997,7 @@ function _s(e, t, n) {
5997
5997
  return r.compatibility === "unchanged" ? { status: "unchanged" } : r.risk === "confirmation" && n.confirmed !== !0 ? {
5998
5998
  status: "confirmation-required",
5999
5999
  plan: r
6000
- } : (Gt(e, r.node, r.field), { status: "applied" });
6000
+ } : (Kt(e, r.node, r.field), { status: "applied" });
6001
6001
  }
6002
6002
  function vs(e, t, n) {
6003
6003
  if (e.type === "change-component") return { message: "change-component 命令必须独立执行" };
@@ -6281,13 +6281,13 @@ function Ts(e, t) {
6281
6281
  if (t.key === "footer.visible") return e.footer !== !1;
6282
6282
  if (!(t.key === "wrapper.type" && e.wrapper?.type === "default") && !(t.key === "props.size" && e.props?.size === "default")) {
6283
6283
  if (t.key === "footer.secondary") return Es(e)?.action ?? "reset";
6284
- if (t.key === "footer.submitTitle") return Tt(e).find((e) => e.action === "submit")?.title ?? "";
6284
+ if (t.key === "footer.submitTitle") return Et(e).find((e) => e.action === "submit")?.title ?? "";
6285
6285
  if (t.key === "footer.secondaryTitle") return Es(e)?.title ?? "";
6286
- if (t.path) return j(e, t.path);
6286
+ if (t.path) return A(e, t.path);
6287
6287
  }
6288
6288
  }
6289
6289
  function Es(e) {
6290
- return Tt(e).find((e) => e.action === "reset" || e.action === "cancel");
6290
+ return Et(e).find((e) => e.action === "reset" || e.action === "cancel");
6291
6291
  }
6292
6292
  //#endregion
6293
6293
  //#region src/inspector/form-property-view.ts
@@ -6331,7 +6331,7 @@ function ks(e) {
6331
6331
  return t;
6332
6332
  }
6333
6333
  function As(e, t) {
6334
- let n = D(e);
6334
+ let n = E(e);
6335
6335
  for (let [r, i] of Object.entries(t)) {
6336
6336
  let t = Cs(e).flatMap((e) => e.fields).find((e) => e.kind !== "divider" && e.key === r);
6337
6337
  t && t.kind !== "divider" && Ns(n, t, Vs(t, i));
@@ -6373,7 +6373,7 @@ function Ms(e) {
6373
6373
  }
6374
6374
  function Ns(e, t, n) {
6375
6375
  if (t.key === "props.showRequiredAsterisk") {
6376
- M(e, "props.hideRequiredAsterisk", n === !0 ? void 0 : !0);
6376
+ j(e, "props.hideRequiredAsterisk", n === !0 ? void 0 : !0);
6377
6377
  return;
6378
6378
  }
6379
6379
  if (t.key === "footer.visible") {
@@ -6393,7 +6393,7 @@ function Ns(e, t, n) {
6393
6393
  t?.action && Fs(e, t.action, Hs(n));
6394
6394
  return;
6395
6395
  }
6396
- t.path && M(e, t.path, n);
6396
+ t.path && j(e, t.path, n);
6397
6397
  }
6398
6398
  function Ps(e, t) {
6399
6399
  let n = Rs(e), r = Is(e), i = r.find((e) => e.action === "submit"), a = r.find((e) => e.action === "reset" || e.action === "cancel"), o = t === "none" ? void 0 : {
@@ -6446,7 +6446,7 @@ function Hs(e) {
6446
6446
  //#endregion
6447
6447
  //#region src/inspector/commands/form-property.ts
6448
6448
  function Us(e, t) {
6449
- let n = xe(e.schema, e.viewName), r = new Set(ws(n).map((e) => e.key)), i = Object.keys(t.values).filter((e) => !r.has(e)).map((e) => ({
6449
+ let n = Se(e.schema, e.viewName), r = new Set(ws(n).map((e) => e.key)), i = Object.keys(t.values).filter((e) => !r.has(e)).map((e) => ({
6450
6450
  key: e,
6451
6451
  code: "unknown-property",
6452
6452
  message: `表单属性 ${e} 当前不可编辑`
@@ -6458,7 +6458,7 @@ function Us(e, t) {
6458
6458
  };
6459
6459
  if (Object.keys(t.values).length === 0) return { status: "unchanged" };
6460
6460
  let a = As(n, t.values);
6461
- return Ws(n, a) ? { status: "unchanged" } : (wt(e, a), { status: "applied" });
6461
+ return Ws(n, a) ? { status: "unchanged" } : (Tt(e, a), { status: "applied" });
6462
6462
  }
6463
6463
  function Ws(e, t) {
6464
6464
  return JSON.stringify(e) === JSON.stringify(t);
@@ -6663,7 +6663,7 @@ function rc(e, t) {
6663
6663
  function ic(e, t) {
6664
6664
  let n = oc(e, t);
6665
6665
  if (!n) return;
6666
- let r = n.params ?? {}, a = t === "date-range-picker" ? "day" : "minute", o = a === "day" ? "YYYY-MM-DD" : "HH:mm:ss", s = new Map(de(r).issues.map((e) => [e.key, e.message]));
6666
+ let r = n.params ?? {}, a = t === "date-range-picker" ? "day" : "minute", o = a === "day" ? "YYYY-MM-DD" : "HH:mm:ss", s = new Map(fe(r).issues.map((e) => [e.key, e.message]));
6667
6667
  return /* @__PURE__ */ i("section", { class: "sparq-validation-rule" }, /* @__PURE__ */ i("header", null, /* @__PURE__ */ i("strong", null, "范围限制"), /* @__PURE__ */ i("small", null, "起止顺序固定校验")), /* @__PURE__ */ i("div", { class: "sparq-validation-grid" }, /* @__PURE__ */ i("label", null, /* @__PURE__ */ i("span", null, "最小边界"), Y.text({
6668
6668
  value: typeof r.min == "string" ? r.min : "",
6669
6669
  class: "sparq-validation-rule__control",
@@ -7023,7 +7023,7 @@ function Ic(e, t, n) {
7023
7023
  function Lc(e, t, n) {
7024
7024
  if (t === "date-range-picker" || t === "time-range-picker") {
7025
7025
  let t = Z(e, "range");
7026
- return t ? de(t.params).issues[0]?.message : void 0;
7026
+ return t ? fe(t.params).issues[0]?.message : void 0;
7027
7027
  }
7028
7028
  if (![
7029
7029
  "date-picker",
@@ -7032,16 +7032,16 @@ function Lc(e, t, n) {
7032
7032
  ].includes(t)) return;
7033
7033
  let r = /* @__PURE__ */ new Date(), i = Rc(Z(e, "min"), n, r), a = Rc(Z(e, "max"), n, r), o = zc(i, t, n, "最早值") ?? zc(a, t, n, "最晚值");
7034
7034
  if (o) return o;
7035
- if (i !== void 0 && a !== void 0 && (ie(i, a) ?? 0) > 0) return "最早值不能晚于最晚值,请调整边界后再确认。";
7035
+ if (i !== void 0 && a !== void 0 && (ae(i, a) ?? 0) > 0) return "最早值不能晚于最晚值,请调整边界后再确认。";
7036
7036
  }
7037
7037
  function Rc(e, t, n) {
7038
- if (e) return e.value_expr ? ce(e.value_expr, {
7038
+ if (e) return e.value_expr ? le(e.value_expr, {
7039
7039
  field: t,
7040
7040
  now: n
7041
7041
  }) : e.value;
7042
7042
  }
7043
7043
  function zc(e, t, n, r) {
7044
- if (!(e === void 0 || n?.type === "string")) return t === "time-picker" ? ue(e) === void 0 ? `${r}应使用 HH:mm 或 HH:mm:ss。` : void 0 : le(e) === void 0 ? `${r}应使用 YYYY-MM-DD${t === "datetime-picker" ? " HH:mm:ss" : ""}。` : void 0;
7044
+ if (!(e === void 0 || n?.type === "string")) return t === "time-picker" ? de(e) === void 0 ? `${r}应使用 HH:mm 或 HH:mm:ss。` : void 0 : ue(e) === void 0 ? `${r}应使用 YYYY-MM-DD${t === "datetime-picker" ? " HH:mm:ss" : ""}。` : void 0;
7045
7045
  }
7046
7046
  function Bc(e, t) {
7047
7047
  if (t) return new Set(t);
@@ -7204,29 +7204,29 @@ var Qc = [
7204
7204
  props: Object
7205
7205
  },
7206
7206
  setup(e) {
7207
- let t = f(!1), r = f({}), a = f([]), o = f([]), s = f([]), c = f(), l = f(), u = f(), d = f(!1), p = f(!1), h = f(!1), g = f(""), _ = f(""), v = f(""), y = oe(), b = ja(), S = q(), C = ee({ "designer.static-options-list": { component: el } }), te = n(() => ({
7207
+ let t = f(!1), r = f({}), a = f([]), o = f([]), s = f([]), c = f(), l = f(), u = f(), d = f(!1), p = f(!1), h = f(!1), g = f(""), _ = f(""), v = f(""), y = se(), b = ja(), S = q(), C = ee({ "designer.static-options-list": { component: el } }), te = n(() => ({
7208
7208
  node: e.props?.node,
7209
7209
  field: e.props?.field,
7210
7210
  fields: e.props?.fields ?? []
7211
- })), ne = n(() => Xn(e.value?.options)), re = n(() => e.props?.optionSources ?? []), w = n(() => re.value.includes("reference")), T = n(() => re.value.includes("dictionary")), ie = n(() => ["select", "multi-select"].includes(e.props?.node?.component ?? "")), ae = n(() => ol(re.value, Q(r.value))), se = n(() => tl(Q(r.value), ae.value, w.value, ie.value, r.value["options.value_policy_open"] === !0, bl(a.value, $(r.value, "reference.resource")), cl(r.value, o.value), bl(s.value, $(r.value, "options.dictionary.code"))));
7211
+ })), ne = n(() => Xn(e.value?.options)), re = n(() => e.props?.optionSources ?? []), w = n(() => re.value.includes("reference")), ie = n(() => re.value.includes("dictionary")), ae = n(() => ["select", "multi-select"].includes(e.props?.node?.component ?? "")), oe = n(() => ol(re.value, Q(r.value))), ce = n(() => tl(Q(r.value), oe.value, w.value, ae.value, r.value["options.value_policy_open"] === !0, bl(a.value, $(r.value, "reference.resource")), cl(r.value, o.value), bl(s.value, $(r.value, "options.dictionary.code"))));
7212
7212
  m(() => e.value, (e) => {
7213
7213
  t.value || (r.value = rl(e));
7214
7214
  }, {
7215
7215
  immediate: !0,
7216
7216
  deep: !0
7217
7217
  }), m(() => t.value ? $(r.value, "reference.resource") : "", (e) => {
7218
- t.value && w.value && Q(r.value) === "reference" && fe(e);
7218
+ t.value && w.value && Q(r.value) === "reference" && pe(e);
7219
7219
  });
7220
- function ce() {
7221
- r.value = rl(e.value), t.value = !0, w.value && de(), T.value && pe(), w.value && Q(r.value) === "reference" && fe($(r.value, "reference.resource"));
7220
+ function le() {
7221
+ r.value = rl(e.value), t.value = !0, w.value && fe(), ie.value && me(), w.value && Q(r.value) === "reference" && pe($(r.value, "reference.resource"));
7222
7222
  }
7223
- function E() {
7224
- me(), t.value = !1;
7223
+ function T() {
7224
+ he(), t.value = !1;
7225
7225
  }
7226
- function le() {
7227
- e.onChange?.(il(r.value, e.props?.field?.type)), E();
7226
+ function ue() {
7227
+ e.onChange?.(il(r.value, e.props?.field?.type)), T();
7228
7228
  }
7229
- function ue(e) {
7229
+ function de(e) {
7230
7230
  let t = Q(r.value), n = Q(e), i = {
7231
7231
  ...r.value,
7232
7232
  ...e
@@ -7236,17 +7236,17 @@ var Qc = [
7236
7236
  return () => /* @__PURE__ */ i("div", { class: "sparq-capability-editor sparq-option-source-editor" }, /* @__PURE__ */ i("div", { class: "sparq-capability-editor__summary" }, /* @__PURE__ */ i("span", null, ne.value), /* @__PURE__ */ i("div", { class: "sparq-capability-editor__actions" }, /* @__PURE__ */ i("button", {
7237
7237
  type: "button",
7238
7238
  class: "sparq-capability-editor__button",
7239
- onClick: ce
7239
+ onClick: le
7240
7240
  }, "配置"))), t.value ? /* @__PURE__ */ i("div", {
7241
7241
  class: "sparq-option-source-dialog",
7242
7242
  role: "dialog",
7243
7243
  "aria-modal": "true"
7244
7244
  }, /* @__PURE__ */ i("div", {
7245
7245
  class: "sparq-option-source-dialog__mask",
7246
- onClick: E
7246
+ onClick: T
7247
7247
  }), /* @__PURE__ */ i("section", { class: "sparq-option-source-dialog__panel" }, /* @__PURE__ */ i("header", { class: "sparq-option-source-dialog__header" }, /* @__PURE__ */ i("div", null, /* @__PURE__ */ i("h3", null, "数据选项"), /* @__PURE__ */ i("p", null, "配置字段候选项来源")), /* @__PURE__ */ i("button", {
7248
7248
  type: "button",
7249
- onClick: E
7249
+ onClick: T
7250
7250
  }, "关闭")), /* @__PURE__ */ i("div", { class: "sparq-option-source-dialog__body" }, Q(r.value) === "reference" && d.value ? /* @__PURE__ */ i("p", {
7251
7251
  class: "sparq-capability-editor__service-state",
7252
7252
  role: "status"
@@ -7255,7 +7255,7 @@ var Qc = [
7255
7255
  role: "alert"
7256
7256
  }, g.value, /* @__PURE__ */ i("button", {
7257
7257
  type: "button",
7258
- onClick: de
7258
+ onClick: fe
7259
7259
  }, "重试")) : void 0, Q(r.value) === "reference" && p.value ? /* @__PURE__ */ i("p", {
7260
7260
  class: "sparq-capability-editor__service-state",
7261
7261
  role: "status"
@@ -7264,7 +7264,7 @@ var Qc = [
7264
7264
  role: "alert"
7265
7265
  }, _.value, /* @__PURE__ */ i("button", {
7266
7266
  type: "button",
7267
- onClick: () => fe($(r.value, "reference.resource"))
7267
+ onClick: () => pe($(r.value, "reference.resource"))
7268
7268
  }, "重试")) : void 0, Q(r.value) === "dictionary" && h.value ? /* @__PURE__ */ i("p", {
7269
7269
  class: "sparq-capability-editor__service-state",
7270
7270
  role: "status"
@@ -7273,9 +7273,9 @@ var Qc = [
7273
7273
  role: "alert"
7274
7274
  }, v.value, /* @__PURE__ */ i("button", {
7275
7275
  type: "button",
7276
- onClick: pe
7276
+ onClick: me
7277
7277
  }, "重试")) : void 0, /* @__PURE__ */ i(x, {
7278
- schema: se.value,
7278
+ schema: ce.value,
7279
7279
  mode: "form",
7280
7280
  view: "default",
7281
7281
  modelValue: r.value,
@@ -7283,19 +7283,19 @@ var Qc = [
7283
7283
  uiAdapter: b,
7284
7284
  uiKit: S,
7285
7285
  components: C,
7286
- "onUpdate:modelValue": ue
7286
+ "onUpdate:modelValue": de
7287
7287
  })), /* @__PURE__ */ i("footer", { class: "sparq-option-source-dialog__footer" }, /* @__PURE__ */ i("button", {
7288
7288
  type: "button",
7289
- onClick: E
7289
+ onClick: T
7290
7290
  }, "取消"), /* @__PURE__ */ i("button", {
7291
7291
  type: "button",
7292
7292
  class: "is-primary",
7293
- onClick: le
7293
+ onClick: ue
7294
7294
  }, "确认")))) : void 0);
7295
- function de() {
7295
+ function fe() {
7296
7296
  c.value?.abort();
7297
7297
  let t = new AbortController();
7298
- c.value = t, d.value = !0, g.value = "", be("resources.list", te.value, void 0, t.signal, e.props?.serviceRegistry).then((e) => {
7298
+ c.value = t, d.value = !0, g.value = "", xe("resources.list", te.value, void 0, t.signal, e.props?.serviceRegistry).then((e) => {
7299
7299
  t.signal.aborted || (a.value = e);
7300
7300
  }).catch(() => {
7301
7301
  t.signal.aborted || (a.value = [], g.value = "资源列表加载失败,请重试。");
@@ -7303,10 +7303,10 @@ var Qc = [
7303
7303
  t.signal.aborted || (d.value = !1);
7304
7304
  });
7305
7305
  }
7306
- function fe(t) {
7306
+ function pe(t) {
7307
7307
  l.value?.abort();
7308
7308
  let n = new AbortController();
7309
- l.value = n, p.value = !0, _.value = "", be("resources.fields", te.value, { resource: t }, n.signal, e.props?.serviceRegistry).then((e) => {
7309
+ l.value = n, p.value = !0, _.value = "", xe("resources.fields", te.value, { resource: t }, n.signal, e.props?.serviceRegistry).then((e) => {
7310
7310
  n.signal.aborted || (o.value = e);
7311
7311
  }).catch(() => {
7312
7312
  n.signal.aborted || (o.value = [], _.value = "资源字段加载失败,请重试。");
@@ -7314,10 +7314,10 @@ var Qc = [
7314
7314
  n.signal.aborted || (p.value = !1);
7315
7315
  });
7316
7316
  }
7317
- function pe() {
7317
+ function me() {
7318
7318
  u.value?.abort();
7319
7319
  let t = new AbortController();
7320
- u.value = t, h.value = !0, v.value = "", be("dicts.list", te.value, void 0, t.signal, e.props?.serviceRegistry).then((e) => {
7320
+ u.value = t, h.value = !0, v.value = "", xe("dicts.list", te.value, void 0, t.signal, e.props?.serviceRegistry).then((e) => {
7321
7321
  t.signal.aborted || (s.value = e);
7322
7322
  }).catch(() => {
7323
7323
  t.signal.aborted || (s.value = [], v.value = "数据字典加载失败,请重试。");
@@ -7325,7 +7325,7 @@ var Qc = [
7325
7325
  t.signal.aborted || (h.value = !1);
7326
7326
  });
7327
7327
  }
7328
- function me() {
7328
+ function he() {
7329
7329
  c.value?.abort(), l.value?.abort(), u.value?.abort();
7330
7330
  }
7331
7331
  }
@@ -7354,7 +7354,7 @@ var Qc = [
7354
7354
  }, /* @__PURE__ */ i("div", {
7355
7355
  class: "sparq-static-options-row__field",
7356
7356
  role: "cell"
7357
- }, /* @__PURE__ */ i("span", { class: "sparq-static-options-row__label" }, "显示文本"), r.render(T, {
7357
+ }, /* @__PURE__ */ i("span", { class: "sparq-static-options-row__label" }, "显示文本"), r.render(ie, {
7358
7358
  modelValue: e.label,
7359
7359
  placeholder: "显示文本",
7360
7360
  "aria-label": `第 ${n + 1} 项显示文本`,
@@ -7364,7 +7364,7 @@ var Qc = [
7364
7364
  })), /* @__PURE__ */ i("div", {
7365
7365
  class: "sparq-static-options-row__field",
7366
7366
  role: "cell"
7367
- }, /* @__PURE__ */ i("span", { class: "sparq-static-options-row__label" }, "选项值"), r.render(T, {
7367
+ }, /* @__PURE__ */ i("span", { class: "sparq-static-options-row__label" }, "选项值"), r.render(ie, {
7368
7368
  modelValue: e.value,
7369
7369
  placeholder: "选项值",
7370
7370
  "aria-label": `第 ${n + 1} 项选项值`,
@@ -7953,7 +7953,7 @@ var Ml = [{
7953
7953
  props: Object
7954
7954
  },
7955
7955
  setup(e) {
7956
- let t = f(!1), r = f({}), a = oe(), o = ja(), s = q(), c = n(() => e.props?.valueStrategies ?? Ml.map((e) => e.value)), l = n(() => zl(e.value)), u = n(() => Zl(l.value) !== void 0), d = n(() => Ql(l.value)), p = n(() => {
7956
+ let t = f(!1), r = f({}), a = se(), o = ja(), s = q(), c = n(() => e.props?.valueStrategies ?? Ml.map((e) => e.value)), l = n(() => zl(e.value)), u = n(() => Zl(l.value) !== void 0), d = n(() => Ql(l.value)), p = n(() => {
7957
7957
  let e = Xl(r.value) ?? c.value[0];
7958
7958
  return Il(e, Rl(c.value, e), e !== void 0 && c.value.includes(e));
7959
7959
  });
@@ -8301,15 +8301,15 @@ var nu = 1, ru = r({
8301
8301
  }, o = (t, n) => {
8302
8302
  r(fu(e.values.root, t, n));
8303
8303
  }, s = (t) => {
8304
- r(pu(e.values.root, t, on()));
8305
- }, c = (t) => {
8306
8304
  r(pu(e.values.root, t, sn()));
8305
+ }, c = (t) => {
8306
+ r(pu(e.values.root, t, cn()));
8307
8307
  }, l = (t) => {
8308
8308
  r(mu(e.values.root, t));
8309
8309
  };
8310
8310
  return () => /* @__PURE__ */ i("div", { class: "sparq-designer-condition-editor" }, e.values.mode === "json" ? iu(t, e.values, n) : /* @__PURE__ */ i("div", { class: "sparq-designer-condition-visual" }, /* @__PURE__ */ i("div", { class: "sparq-designer-condition-visual__toolbar" }, uu(t, "高级 JSON", () => n({
8311
8311
  mode: "json",
8312
- json: JSON.stringify(an(e.values), void 0, 2)
8312
+ json: JSON.stringify(on(e.values), void 0, 2)
8313
8313
  }), { size: "small" })), au(t, e.values.root, e.fields, [], 0, a, o, s, c, l)));
8314
8314
  }
8315
8315
  });
@@ -8325,7 +8325,7 @@ function iu(e, t, n) {
8325
8325
  rows: 12,
8326
8326
  placeholder: "{\"all\":[{\"field\":\"form.status\",\"op\":\"eq\",\"value\":\"published\"}]}",
8327
8327
  onChange: (e) => n({ json: e })
8328
- })), cu(e, "", uu(e, "转为可视化", () => n(rn(an(t))), { size: "small" }))] });
8328
+ })), cu(e, "", uu(e, "转为可视化", () => n(an(on(t))), { size: "small" }))] });
8329
8329
  }
8330
8330
  function au(e, t, n, r, a, o, s, c, l, u) {
8331
8331
  let d = r.length === 0;
@@ -8347,7 +8347,7 @@ function au(e, t, n, r, a, o, s, c, l, u) {
8347
8347
  }), a < nu ? uu(e, "添加分组", () => l(r), { size: "small" }) : void 0));
8348
8348
  }
8349
8349
  function ou(e, t, n, r, a, o) {
8350
- let s = cn(n, t.field);
8350
+ let s = ln(n, t.field);
8351
8351
  return /* @__PURE__ */ i("div", {
8352
8352
  class: "sparq-designer-condition-rule",
8353
8353
  key: r.join("-")
@@ -8355,7 +8355,7 @@ function ou(e, t, n, r, a, o) {
8355
8355
  placeholder: "选择字段",
8356
8356
  filterable: !0,
8357
8357
  size: "small"
8358
- }), lu(e, t.op, tn, (e) => a(r, { op: e }), {
8358
+ }), lu(e, t.op, nn, (e) => a(r, { op: e }), {
8359
8359
  placeholder: "操作符",
8360
8360
  size: "small"
8361
8361
  }), t.op !== "empty" && t.op !== "not_empty" ? e.text({
@@ -8418,7 +8418,7 @@ function mu(e, t) {
8418
8418
  let t = e.items.filter((e, t) => t !== n);
8419
8419
  return {
8420
8420
  ...e,
8421
- items: t.length ? t : [on()]
8421
+ items: t.length ? t : [sn()]
8422
8422
  };
8423
8423
  }
8424
8424
  return {
@@ -8442,15 +8442,15 @@ var _u = r({
8442
8442
  props: Object
8443
8443
  },
8444
8444
  setup(e) {
8445
- let t = f(), r = f(rn(void 0)), a = n(() => e.value ?? {}), o = n(() => e.props?.node ? nn(e.props.node) : []);
8445
+ let t = f(), r = f(an(void 0)), a = n(() => e.value ?? {}), o = n(() => e.props?.node ? rn(e.props.node) : []);
8446
8446
  m(() => e.value, () => {
8447
- t.value || (r.value = rn(void 0));
8447
+ t.value || (r.value = an(void 0));
8448
8448
  }, { deep: !0 });
8449
8449
  function s(e) {
8450
- t.value = e, r.value = rn(a.value[e]);
8450
+ t.value = e, r.value = an(a.value[e]);
8451
8451
  }
8452
8452
  function c() {
8453
- t.value = void 0, r.value = rn(void 0);
8453
+ t.value = void 0, r.value = an(void 0);
8454
8454
  }
8455
8455
  function l(e) {
8456
8456
  r.value = e;
@@ -8459,7 +8459,7 @@ var _u = r({
8459
8459
  let n = t.value;
8460
8460
  n && (e.onChange?.({
8461
8461
  ...a.value,
8462
- [n]: hu(r.value) ? an(r.value) : void 0
8462
+ [n]: hu(r.value) ? on(r.value) : void 0
8463
8463
  }), c());
8464
8464
  }
8465
8465
  function d(n) {
@@ -8475,7 +8475,7 @@ var _u = r({
8475
8475
  return /* @__PURE__ */ i("div", {
8476
8476
  class: ["sparq-interaction-rule-row", n ? "is-configured" : void 0],
8477
8477
  key: e.name
8478
- }, /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__main" }, /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__title" }, /* @__PURE__ */ i("span", null, e.title), /* @__PURE__ */ i("strong", null, n ? "已设置" : "未设置")), /* @__PURE__ */ i("p", null, dn(t))), /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__actions" }, /* @__PURE__ */ i("button", {
8478
+ }, /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__main" }, /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__title" }, /* @__PURE__ */ i("span", null, e.title), /* @__PURE__ */ i("strong", null, n ? "已设置" : "未设置")), /* @__PURE__ */ i("p", null, fn(t))), /* @__PURE__ */ i("div", { class: "sparq-interaction-rule-row__actions" }, /* @__PURE__ */ i("button", {
8479
8479
  type: "button",
8480
8480
  class: "sparq-capability-editor__button",
8481
8481
  onClick: () => s(e.name)
@@ -8519,7 +8519,7 @@ var _u = r({
8519
8519
  props: Object
8520
8520
  },
8521
8521
  setup(e) {
8522
- let t = f(!1), r = f({}), a = oe(), o = ja(), s = q(), c = n(() => e.props?.settings ?? []), l = n(() => bu(c.value)), u = n(() => Tu(e.value, e.props));
8522
+ let t = f(!1), r = f({}), a = se(), o = ja(), s = q(), c = n(() => e.props?.settings ?? []), l = n(() => bu(c.value)), u = n(() => Tu(e.value, e.props));
8523
8523
  m(() => e.value, (e) => {
8524
8524
  t.value || (r.value = Eu(e));
8525
8525
  }, {
@@ -8535,12 +8535,12 @@ var _u = r({
8535
8535
  function h(e) {
8536
8536
  let t = {
8537
8537
  ...r.value,
8538
- ...D(e)
8538
+ ...E(e)
8539
8539
  };
8540
8540
  Du(r.value, t) || (r.value = t);
8541
8541
  }
8542
8542
  function g() {
8543
- e.onChange?.(D(r.value)), p();
8543
+ e.onChange?.(E(r.value)), p();
8544
8544
  }
8545
8545
  return () => /* @__PURE__ */ i("div", { class: "sparq-capability-editor sparq-component-settings-editor" }, /* @__PURE__ */ i("div", { class: "sparq-capability-editor__summary" }, /* @__PURE__ */ i("span", null, u.value), /* @__PURE__ */ i("div", { class: "sparq-capability-editor__actions" }, /* @__PURE__ */ i("button", {
8546
8546
  type: "button",
@@ -8656,7 +8656,7 @@ function Tu(e, t) {
8656
8656
  }[e.editor] ?? e.editor : "默认编辑器" : t?.capability?.summary?.text ?? "默认配置";
8657
8657
  }
8658
8658
  function Eu(e) {
8659
- return e ? D(e) : {};
8659
+ return e ? E(e) : {};
8660
8660
  }
8661
8661
  function Du(e, t) {
8662
8662
  return JSON.stringify(e) === JSON.stringify(t);
@@ -8682,7 +8682,7 @@ var Ou = r({
8682
8682
  modelValue: e.value === !0,
8683
8683
  disabled: e.disabled || e.readonly,
8684
8684
  "onUpdate:modelValue": n
8685
- }, { default: () => ge(e.props?.inlineBooleanLabel, e.props?.inlineBooleanTip, e.props?.inlineBooleanTipId) });
8685
+ }, { default: () => _e(e.props?.inlineBooleanLabel, e.props?.inlineBooleanTip, e.props?.inlineBooleanTipId) });
8686
8686
  }
8687
8687
  }), ku = [
8688
8688
  {
@@ -8708,7 +8708,7 @@ var Ou = r({
8708
8708
  onChange: Function
8709
8709
  },
8710
8710
  setup(e) {
8711
- let t = f(!1), r = f({}), a = oe(), o = ja(), s = q(), c = ju(), l = n(() => {
8711
+ let t = f(!1), r = f({}), a = se(), o = ja(), s = q(), c = ju(), l = n(() => {
8712
8712
  let t = ku.filter(({ name: t }) => e.value?.[t]).length;
8713
8713
  return t ? `${t} 个插槽` : "未配置";
8714
8714
  });
@@ -9010,12 +9010,12 @@ function Ru(e) {
9010
9010
  return e.length === 0 ? /* @__PURE__ */ i("span", null, "未配置") : e.slice(0, 6).map((e, t) => /* @__PURE__ */ i("span", {
9011
9011
  key: `${e}-${t}`,
9012
9012
  class: "sparq-color-palette-editor__swatch",
9013
- style: { backgroundColor: E("color", e) ? e : "transparent" },
9013
+ style: { backgroundColor: T("color", e) ? e : "transparent" },
9014
9014
  title: e
9015
9015
  }));
9016
9016
  }
9017
9017
  function zu(e) {
9018
- let t = e.findIndex((e) => !E("color", e));
9018
+ let t = e.findIndex((e) => !T("color", e));
9019
9019
  if (t >= 0) return `第 ${t + 1} 个颜色格式无效,请使用标准颜色格式。`;
9020
9020
  if (new Set(e.map((e) => e.toLowerCase())).size !== e.length) return "预设色板中存在重复颜色,请删除重复项后再确认。";
9021
9021
  }
@@ -9037,7 +9037,7 @@ var Vu = r({
9037
9037
  richTextEditors: Object
9038
9038
  },
9039
9039
  setup(e) {
9040
- let t = f(!1), r = f({}), a = oe(), o = ja(), s = q(), c = n(() => e.props?.defaultValueEditor), l = n(() => c.value?.upload === !0 && !e.assetService), u = n(() => c.value?.mode === "dialog" && !l.value), d = n(() => c.value?.configured === !0 && c.value.mode === "dialog" && !l.value), p = n(() => Hu(c.value)), m = n(() => l.value ? c.value?.configured === !0 ? "未配置资源服务,已有默认值只读保留" : "未配置资源服务,无法设置默认值" : c.value?.configured === !0 ? Wu(e.value, c.value.component) : "未设置");
9040
+ let t = f(!1), r = f({}), a = se(), o = ja(), s = q(), c = n(() => e.props?.defaultValueEditor), l = n(() => c.value?.upload === !0 && !e.assetService), u = n(() => c.value?.mode === "dialog" && !l.value), d = n(() => c.value?.configured === !0 && c.value.mode === "dialog" && !l.value), p = n(() => Hu(c.value)), m = n(() => l.value ? c.value?.configured === !0 ? "未配置资源服务,已有默认值只读保留" : "未配置资源服务,无法设置默认值" : c.value?.configured === !0 ? Wu(e.value, c.value.component) : "未设置");
9041
9041
  function h() {
9042
9042
  u.value && (r.value = c.value?.configured === !0 ? { value: Gu(e.value) } : {}, t.value = !0);
9043
9043
  }
@@ -9045,7 +9045,7 @@ var Vu = r({
9045
9045
  t.value = !1;
9046
9046
  }
9047
9047
  function _(e) {
9048
- r.value = D(e);
9048
+ r.value = E(e);
9049
9049
  }
9050
9050
  function v() {
9051
9051
  e.onChange?.(Object.prototype.hasOwnProperty.call(r.value, "value") ? r.value.value : void 0), g();
@@ -9125,7 +9125,7 @@ function Hu(e) {
9125
9125
  } };
9126
9126
  }
9127
9127
  function Uu(e) {
9128
- let t = D(e);
9128
+ let t = E(e);
9129
9129
  return t.name = "value", t.label = "默认值", t.formable = !0, t.readonly = !1, t.disabled = !1, t.required = !1, t.validation = t.validation?.filter((e) => e.type !== "required"), delete t.default, delete t.default_expr, delete t.computed_expr, delete t.computed_triggers, t;
9130
9130
  }
9131
9131
  function Wu(e, t) {
@@ -9145,7 +9145,7 @@ function Wu(e, t) {
9145
9145
  return Array.isArray(e) ? `已设置 ${e.length} 项` : e && typeof e == "object" ? "已设置结构值" : typeof e == "boolean" ? e ? "开启" : "关闭" : e === void 0 ? "未设置" : `已设置:${String(e)}`;
9146
9146
  }
9147
9147
  function Gu(e) {
9148
- return e === void 0 ? e : D(e);
9148
+ return e === void 0 ? e : E(e);
9149
9149
  }
9150
9150
  //#endregion
9151
9151
  //#region src/inspector/container-items-editor.tsx
@@ -9178,22 +9178,22 @@ var Ku = {
9178
9178
  setup(e) {
9179
9179
  let t = J(), n = f([]), r = f(), a = /* @__PURE__ */ new Map(), o = () => e.disabled || e.readonly;
9180
9180
  m(() => e.value, (e) => {
9181
- n.value = D(e ?? []), n.value.some((e, t) => Xu(e, t) === r.value) || (r.value = void 0);
9181
+ n.value = E(e ?? []), n.value.some((e, t) => Xu(e, t) === r.value) || (r.value = void 0);
9182
9182
  }, {
9183
9183
  immediate: !0,
9184
9184
  deep: !0
9185
9185
  });
9186
9186
  function c(t) {
9187
- n.value = D(t), r.value = void 0, e.onChange?.(D(t));
9187
+ n.value = E(t), r.value = void 0, e.onChange?.(E(t));
9188
9188
  }
9189
9189
  function l() {
9190
9190
  let t = Yu(e.props?.containerItems?.containerType);
9191
9191
  if (!t || o()) return;
9192
- let r = D(n.value), i = Ju(r, t);
9192
+ let r = E(n.value), i = Ju(r, t);
9193
9193
  r.push(i), c(r), s(() => a.get(i.id)?.focus());
9194
9194
  }
9195
9195
  function u(e, t) {
9196
- let r = D(n.value), i = r[e];
9196
+ let r = E(n.value), i = r[e];
9197
9197
  i && (i.title = t, n.value = r);
9198
9198
  }
9199
9199
  function d(t) {
@@ -9201,14 +9201,14 @@ var Ku = {
9201
9201
  if (!r || !i || o()) return;
9202
9202
  let a = i.title?.trim() || `${Ku[r].title} ${t + 1}`;
9203
9203
  if (a === e.value?.[t]?.title) return;
9204
- let s = D(n.value), l = s[t];
9204
+ let s = E(n.value), l = s[t];
9205
9205
  l && (l.title = a), c(s);
9206
9206
  }
9207
9207
  function p(e, t) {
9208
9208
  if (o()) return;
9209
9209
  let r = e + t;
9210
9210
  if (r < 0 || r >= n.value.length) return;
9211
- let i = D(n.value), [a] = i.splice(e, 1);
9211
+ let i = E(n.value), [a] = i.splice(e, 1);
9212
9212
  a && (i.splice(r, 0, a), c(i));
9213
9213
  }
9214
9214
  function h(e, t) {
@@ -9222,7 +9222,7 @@ var Ku = {
9222
9222
  }
9223
9223
  function g(e) {
9224
9224
  if (o() || n.value.length <= 1) return;
9225
- let t = D(n.value);
9225
+ let t = E(n.value);
9226
9226
  t.splice(e, 1), c(t);
9227
9227
  }
9228
9228
  return () => {
@@ -9294,7 +9294,7 @@ var Ku = {
9294
9294
  function Ju(e, t) {
9295
9295
  let n = Ku[t], r = new Set(e.flatMap((e) => e.name ? [e.name] : [])), i = e.length + 1;
9296
9296
  for (; r.has(`${n.namePrefix}_${i}`);) i += 1;
9297
- return ke({
9297
+ return Ae({
9298
9298
  type: n.itemType,
9299
9299
  name: `${n.namePrefix}_${i}`,
9300
9300
  title: `${n.title} ${i}`,
@@ -9349,21 +9349,21 @@ var ed = r({
9349
9349
  }
9350
9350
  },
9351
9351
  setup(e) {
9352
- let t = oe(), r = f({}), a = f({}), o = f(), s = f(""), l = f(!0), u = f(0), d = f(""), p = f(), h = f(/* @__PURE__ */ new Set()), g = f({}), _ = f({}), v = f(), y = f(""), b = f(/* @__PURE__ */ new Set()), x = f({}), S = f(!1), C = f(), te = 0, re = !1;
9353
- xe(e.state.schema, e.state.viewName);
9354
- let w = n(() => xe(e.state.schema, e.state.viewName)), T = n(() => At(e.state)), ie = n(() => P(e.state.schema)), ae = n(() => ie.value.find((e) => e.name === T.value?.field)), se = n(() => !!(T.value?.id && !F(e.state, T.value.id).editable)), ce = n(() => {
9355
- if (e.state.schemaVersion, T.value) return {
9356
- node: T.value,
9357
- field: ae.value,
9358
- fields: ie.value,
9352
+ let t = se(), r = f({}), a = f({}), o = f(), s = f(""), l = f(!0), u = f(0), d = f(""), p = f(), h = f(/* @__PURE__ */ new Set()), g = f({}), _ = f({}), v = f(), y = f(""), b = f(/* @__PURE__ */ new Set()), x = f({}), S = f(!1), C = f(), te = 0, re = !1;
9353
+ Se(e.state.schema, e.state.viewName);
9354
+ let w = n(() => Se(e.state.schema, e.state.viewName)), ie = n(() => jt(e.state)), ae = n(() => N(e.state.schema)), oe = n(() => ae.value.find((e) => e.name === ie.value?.field)), ce = n(() => !!(ie.value?.id && !P(e.state, ie.value.id).editable)), le = n(() => {
9355
+ if (e.state.schemaVersion, ie.value) return {
9356
+ node: ie.value,
9357
+ field: oe.value,
9358
+ fields: ae.value,
9359
9359
  extensionContext: e.state.extensionContext,
9360
- readonly: se.value
9360
+ readonly: ce.value
9361
9361
  };
9362
- }), E = n(() => ce.value ? vi(ce.value) : []), le = n(() => E.value.flatMap((e) => e.fields)), ue = n(() => new Map(le.value.map((e) => [e.key, e]))), de = n(() => Qu(g.value)), fe = n(() => Qu(x.value));
9363
- function pe() {
9364
- return ce.value;
9362
+ }), T = n(() => le.value ? vi(le.value) : []), ue = n(() => T.value.flatMap((e) => e.fields)), de = n(() => new Map(ue.value.map((e) => [e.key, e]))), fe = n(() => Qu(g.value)), pe = n(() => Qu(x.value));
9363
+ function me() {
9364
+ return le.value;
9365
9365
  }
9366
- function me(t) {
9366
+ function he(t) {
9367
9367
  let n = t.filter((e) => b.value.has(e));
9368
9368
  if (n.length === 0) return;
9369
9369
  let r = Us(e.state, {
@@ -9376,10 +9376,10 @@ var ed = r({
9376
9376
  }
9377
9377
  b.value = ud(b.value, n), x.value = dd(x.value, n);
9378
9378
  }
9379
- function he(t) {
9380
- let n = pe(), i = t.filter((e) => h.value.has(e));
9379
+ function ge(t) {
9380
+ let n = me(), i = t.filter((e) => h.value.has(e));
9381
9381
  if (!n || i.length === 0) return;
9382
- let a = us(n, cd(r.value, i), E.value), o = ds(e.state, a);
9382
+ let a = us(n, cd(r.value, i), T.value), o = ds(e.state, a);
9383
9383
  if (o.status === "confirmation-required") {
9384
9384
  C.value = o.plan;
9385
9385
  return;
@@ -9388,27 +9388,27 @@ var ed = r({
9388
9388
  g.value = fd(g.value, i, o.message, o.issues);
9389
9389
  return;
9390
9390
  }
9391
- h.value = ud(h.value, i), g.value = dd(g.value, i), o.status === "applied" && (C.value = void 0, Se(r.value));
9391
+ h.value = ud(h.value, i), g.value = dd(g.value, i), o.status === "applied" && (C.value = void 0, Ce(r.value));
9392
9392
  }
9393
- let ge = (e) => {
9393
+ let _e = (e) => {
9394
9394
  if (S.value) return;
9395
9395
  let t = Gs(_.value, e);
9396
9396
  if (t.length === 0) return;
9397
9397
  _.value = e, b.value = ld(b.value, t, e, ks(w.value)), x.value = dd(x.value, t);
9398
9398
  let n = new Map(ws(w.value).map((e) => [e.key, e]));
9399
- me(t.filter((e) => {
9399
+ he(t.filter((e) => {
9400
9400
  let t = n.get(e);
9401
9401
  return t ? Ks(t) : !1;
9402
9402
  }));
9403
- }, _e = (e) => {
9404
- let t = pe();
9403
+ }, ve = (e) => {
9404
+ let t = me();
9405
9405
  if (S.value || !t) return;
9406
9406
  let n = Gs(r.value, e);
9407
- n.length !== 0 && (r.value = e, h.value = ld(h.value, n, e, co(t, E.value)), g.value = dd(g.value, n), Se(e), he(n.filter((e) => {
9408
- let t = ue.value.get(e);
9407
+ n.length !== 0 && (r.value = e, h.value = ld(h.value, n, e, co(t, T.value)), g.value = dd(g.value, n), Ce(e), ge(n.filter((e) => {
9408
+ let t = de.value.get(e);
9409
9409
  return t ? Ks(t) : !1;
9410
9410
  })));
9411
- }, ve = q(), ye = ee({
9411
+ }, ye = q(), be = ee({
9412
9412
  "designer.validation-rule-editor": { component: ec },
9413
9413
  "designer.option-source-editor": { component: $c },
9414
9414
  "designer.value-strategy-editor": { component: Fl },
@@ -9427,21 +9427,21 @@ var ed = r({
9427
9427
  "designer.advanced-config-status": { component: yu },
9428
9428
  "designer.date-time-format-editor": { component: Iu },
9429
9429
  "designer.color-palette-editor": { component: Lu }
9430
- }), be = n(() => ne(ye, e.components)), D = () => {
9431
- let e = pe();
9430
+ }), xe = n(() => ne(be, e.components)), E = () => {
9431
+ let e = me();
9432
9432
  if (!e) {
9433
9433
  r.value = {}, h.value = /* @__PURE__ */ new Set(), g.value = {};
9434
9434
  return;
9435
9435
  }
9436
- let t = Ys(co(e, E.value), r.value, h.value);
9436
+ let t = Ys(co(e, T.value), r.value, h.value);
9437
9437
  pd(r.value, t) || (S.value = !0, r.value = t, S.value = !1);
9438
- }, O = () => {
9439
- let t = pe();
9438
+ }, D = () => {
9439
+ let t = me();
9440
9440
  if (!t) {
9441
9441
  te += 1, o.value = void 0, s.value = "", l.value = !0;
9442
9442
  return;
9443
9443
  }
9444
- let n = E.value, r = `${io(t, n)}|${gd(a.value)}`;
9444
+ let n = T.value, r = `${io(t, n)}|${gd(a.value)}`;
9445
9445
  if (o.value && s.value === r) {
9446
9446
  l.value ||= (te += 1, o.value = ro(t, a.value, e.state.serviceRegistry, n), !0);
9447
9447
  return;
@@ -9466,28 +9466,28 @@ var ed = r({
9466
9466
  });
9467
9467
  };
9468
9468
  requestAnimationFrame(f);
9469
- }, Se = (t = r.value) => {
9470
- let n = pe();
9469
+ }, Ce = (t = r.value) => {
9470
+ let n = me();
9471
9471
  if (!n) {
9472
9472
  p.value?.abort(), a.value = {}, d.value = "";
9473
9473
  return;
9474
9474
  }
9475
- let i = E.value, o = `${io(n, i)}|${hd(md(t))}`;
9475
+ let i = T.value, o = `${io(n, i)}|${hd(md(t))}`;
9476
9476
  if (d.value === o) return;
9477
9477
  d.value = o, p.value?.abort();
9478
9478
  let s = new AbortController();
9479
9479
  p.value = s, ao(n, t, s.signal, e.state.serviceRegistry, i).then((e) => {
9480
- s.signal.aborted || gd(a.value) !== gd(e) && (a.value = e, O());
9480
+ s.signal.aborted || gd(a.value) !== gd(e) && (a.value = e, D());
9481
9481
  }).catch((e) => {
9482
- s.signal.aborted || (console.warn("[sparq-designer] load field property options failed", e), Object.keys(a.value).length !== 0 && (a.value = {}, O()));
9482
+ s.signal.aborted || (console.warn("[sparq-designer] load field property options failed", e), Object.keys(a.value).length !== 0 && (a.value = {}, D()));
9483
9483
  });
9484
- }, Ce = () => {
9484
+ }, we = () => {
9485
9485
  let e = Ys(ks(w.value), _.value, b.value);
9486
9486
  pd(_.value, e) || (S.value = !0, _.value = e, S.value = !1);
9487
- }, k = () => {
9487
+ }, O = () => {
9488
9488
  let e = Os(w.value);
9489
9489
  v.value && y.value === e || (y.value = e, v.value = Ds(w.value));
9490
- }, A = () => {
9490
+ }, k = () => {
9491
9491
  let t = C.value;
9492
9492
  if (!t) return;
9493
9493
  let n = ds(e.state, [{
@@ -9499,38 +9499,38 @@ var ed = r({
9499
9499
  g.value = fd(g.value, ["node.component"], n.message, n.issues);
9500
9500
  return;
9501
9501
  }
9502
- h.value = ud(h.value, ["node.component"]), g.value = dd(g.value, ["node.component"]), D(), O(), Se();
9503
- }, we = () => {
9504
- C.value = void 0, h.value = ud(h.value, ["node.component"]), g.value = dd(g.value, ["node.component"]), D(), u.value += 1;
9502
+ h.value = ud(h.value, ["node.component"]), g.value = dd(g.value, ["node.component"]), E(), D(), Ce();
9503
+ }, Te = () => {
9504
+ C.value = void 0, h.value = ud(h.value, ["node.component"]), g.value = dd(g.value, ["node.component"]), E(), u.value += 1;
9505
9505
  };
9506
9506
  m(() => e.state.schemaVersion, () => {
9507
- O(), k(), Se();
9507
+ D(), O(), Ce();
9508
9508
  }, { immediate: !0 }), c(() => {
9509
9509
  te += 1, p.value?.abort();
9510
9510
  }), m(() => e.state.schemaVersion, () => {
9511
- D(), Ce();
9511
+ E(), we();
9512
9512
  }, { immediate: !0 }), m(() => e.state.serviceRegistry, () => {
9513
- d.value = "", s.value = "", Se(), O();
9513
+ d.value = "", s.value = "", Ce(), D();
9514
9514
  }), m(() => e.state.selection?.type === "form-node" ? e.state.selection.path : "", () => {
9515
- C.value = void 0, h.value = /* @__PURE__ */ new Set(), g.value = {}, O(), D(), Se();
9515
+ C.value = void 0, h.value = /* @__PURE__ */ new Set(), g.value = {}, D(), E(), Ce();
9516
9516
  }, { immediate: !0 });
9517
- let Te = () => ws(w.value), Ee = (e) => {
9518
- ad(e, le.value, he);
9519
- }, De = (e) => {
9520
- ad(e, Te(), me);
9517
+ let Ee = () => ws(w.value), De = (e) => {
9518
+ ad(e, ue.value, ge);
9521
9519
  }, Oe = (e) => {
9522
- od(e, le.value, he);
9520
+ ad(e, Ee(), he);
9523
9521
  }, ke = (e) => {
9524
- od(e, Te(), me);
9522
+ od(e, ue.value, ge);
9523
+ }, Ae = (e) => {
9524
+ od(e, Ee(), he);
9525
9525
  };
9526
9526
  return () => /* @__PURE__ */ i("aside", {
9527
9527
  class: "sparq-designer-inspector",
9528
9528
  "data-field-property-ready": l.value ? "" : void 0
9529
9529
  }, /* @__PURE__ */ i("div", { class: "sparq-designer-inspector-tabs" }, id("字段属性", e.state.inspectorTab === "field", () => {
9530
- O(), D(), e.state.inspectorTab = "field";
9530
+ D(), E(), e.state.inspectorTab = "field";
9531
9531
  }), e.showFormProperties ? id("表单属性", e.state.inspectorTab === "form", () => {
9532
- Ce(), e.state.inspectorTab = "form";
9533
- }) : void 0), e.state.inspectorTab === "form" && v.value ? nd(v.value, y.value, _.value, t, fe.value, ve, ge, De, ke) : T.value && o.value ? td(o.value, s.value + ":" + u.value, r.value, t, de.value, ve, be.value, e.state.extensionContext?.icons, e.richTextEditors, _e, Ee, Oe) : /* @__PURE__ */ i("div", { class: "sparq-designer-empty" }, "从舞台中选择一个节点后编辑字段属性。"), C.value ? rd(C.value, A, we) : void 0);
9532
+ we(), e.state.inspectorTab = "form";
9533
+ }) : void 0), e.state.inspectorTab === "form" && v.value ? nd(v.value, y.value, _.value, t, pe.value, ye, _e, Oe, Ae) : ie.value && o.value ? td(o.value, s.value + ":" + u.value, r.value, t, fe.value, ye, xe.value, e.state.extensionContext?.icons, e.richTextEditors, ve, De, ke) : /* @__PURE__ */ i("div", { class: "sparq-designer-empty" }, "从舞台中选择一个节点后编辑字段属性。"), C.value ? rd(C.value, k, Te) : void 0);
9534
9534
  }
9535
9535
  });
9536
9536
  function td(e, t, n, r, a, o, s, c, l, u, d, f) {
@@ -9688,10 +9688,10 @@ function _d(e) {
9688
9688
  };
9689
9689
  }
9690
9690
  function vd(e, t) {
9691
- return Je(e, t);
9691
+ return Ye(e, t);
9692
9692
  }
9693
9693
  function yd(e) {
9694
- return e.type === "field" ? "field" : e.type === "view" ? "view" : qe(e.type) ? "container" : "layout";
9694
+ return e.type === "field" ? "field" : e.type === "view" ? "view" : Je(e.type) ? "container" : "layout";
9695
9695
  }
9696
9696
  function bd(e) {
9697
9697
  switch (e) {
@@ -9731,7 +9731,7 @@ var Td = r({
9731
9731
  "onUpdate:modelValue"(t) {
9732
9732
  e.state.jsonOpen = t;
9733
9733
  }
9734
- }, { default: () => /* @__PURE__ */ i("pre", { class: "sparq-designer-json-viewer" }, Pe(e.state.schema)) }) : void 0;
9734
+ }, { default: () => /* @__PURE__ */ i("pre", { class: "sparq-designer-json-viewer" }, Fe(e.state.schema)) }) : void 0;
9735
9735
  }
9736
9736
  }), Ed = r({
9737
9737
  name: "SparqDesignerPreviewDialog",
@@ -9810,7 +9810,7 @@ var Td = r({
9810
9810
  });
9811
9811
  function Dd(e) {
9812
9812
  return {
9813
- runtime: e.runtime ?? e.renderer?.runtime ?? oe(),
9813
+ runtime: e.runtime ?? e.renderer?.runtime ?? se(),
9814
9814
  uiAdapter: e.uiAdapter ?? e.renderer?.uiAdapter ?? ja(),
9815
9815
  uiKit: e.uiKit ?? e.renderer?.uiKit ?? q()
9816
9816
  };
@@ -9828,7 +9828,7 @@ var Od = r({
9828
9828
  !e.state.resourceTreeOpen || !t || s(() => Zd(t));
9829
9829
  }, { flush: "post" }), () => {
9830
9830
  if (!e.state.resourceTreeOpen) return;
9831
- let n = O(e.state.schema, e.state.viewName), r = xe(e.state.schema, e.state.viewName).title || e.state.schema.schema.title || "当前表单", a = `${r}资源`, o = At(e.state), s = `form:${e.state.viewName}`, c = kd(e.state, n);
9831
+ let n = D(e.state.schema, e.state.viewName), r = Se(e.state.schema, e.state.viewName).title || e.state.schema.schema.title || "当前表单", a = `${r}资源`, o = jt(e.state), s = `form:${e.state.viewName}`, c = kd(e.state, n);
9832
9832
  return t.drawer({
9833
9833
  modelValue: !0,
9834
9834
  title: a,
@@ -9861,7 +9861,7 @@ var Od = r({
9861
9861
  disabled: "disabled"
9862
9862
  },
9863
9863
  onNodeClick(t) {
9864
- t.nodeId && kt(e.state, t.nodeId);
9864
+ t.nodeId && At(e.state, t.nodeId);
9865
9865
  },
9866
9866
  allowDrag(e) {
9867
9867
  let t = zd(e);
@@ -9879,12 +9879,12 @@ var Od = r({
9879
9879
  }
9880
9880
  });
9881
9881
  function kd(e, t, n, r = []) {
9882
- let i = P(e.schema);
9882
+ let i = N(e.schema);
9883
9883
  return t.map((a, o) => {
9884
- let s = a.id, c = a.field ? i.find((e) => e.name === a.field) : void 0, l = s ? Et(e, s, { respectVisibility: !1 }) : {
9884
+ let s = a.id, c = a.field ? i.find((e) => e.name === a.field) : void 0, l = s ? Dt(e, s, { respectVisibility: !1 }) : {
9885
9885
  canMoveUp: !1,
9886
9886
  canMoveDown: !1
9887
- }, u = s ? F(e, s) : void 0;
9887
+ }, u = s ? P(e, s) : void 0;
9888
9888
  return _d({
9889
9889
  node: a,
9890
9890
  index: o,
@@ -9948,78 +9948,78 @@ function jd(e, t) {
9948
9948
  }, K("remove")) : void 0);
9949
9949
  }
9950
9950
  function Md(e, t, n, r) {
9951
- e.preventDefault(), e.stopPropagation(), !(!n.nodeId || r < 0 && !n.canMoveUp || r > 0 && !n.canMoveDown) && kt(t, n.nodeId) && Wt(t, r, { respectVisibility: !1 });
9951
+ e.preventDefault(), e.stopPropagation(), !(!n.nodeId || r < 0 && !n.canMoveUp || r > 0 && !n.canMoveDown) && At(t, n.nodeId) && Gt(t, r, { respectVisibility: !1 });
9952
9952
  }
9953
9953
  function Nd(e, t, n) {
9954
9954
  e.preventDefault(), e.stopPropagation();
9955
9955
  let r = Gd(t, n);
9956
- !n.nodeId || !r?.id || kt(t, n.nodeId) && Bt(t, n.nodeId, r.id);
9956
+ !n.nodeId || !r?.id || At(t, n.nodeId) && Vt(t, n.nodeId, r.id);
9957
9957
  }
9958
9958
  function Pd(e, t, n) {
9959
- e.preventDefault(), e.stopPropagation(), !(!n.nodeId || !Kd(t, n.nodeId)) && kt(t, n.nodeId) && Vt(t, n.nodeId);
9959
+ e.preventDefault(), e.stopPropagation(), !(!n.nodeId || !Kd(t, n.nodeId)) && At(t, n.nodeId) && Ht(t, n.nodeId);
9960
9960
  }
9961
9961
  function Fd(e, t, n) {
9962
- e.preventDefault(), e.stopPropagation(), n.nodeId && kt(t, n.nodeId) && Ut(t);
9962
+ e.preventDefault(), e.stopPropagation(), n.nodeId && At(t, n.nodeId) && Wt(t);
9963
9963
  }
9964
9964
  function Id(e, t, n) {
9965
- e.preventDefault(), e.stopPropagation(), n.nodeId && kt(t, n.nodeId) && Ht(t);
9965
+ e.preventDefault(), e.stopPropagation(), n.nodeId && At(t, n.nodeId) && Ut(t);
9966
9966
  }
9967
9967
  function Ld(e, t, n, r) {
9968
9968
  let i = zd(t), a = zd(n);
9969
9969
  if (!i?.nodeId || !a?.nodeId || i.nodeId === a.nodeId) return !1;
9970
9970
  let o = Bd(e, a, r);
9971
9971
  if (o?.id && Vd(e, i.nodeId, o.id)) return !1;
9972
- let s = k(O(e.schema, e.viewName), i.nodeId);
9973
- return !!(i.movable && s && vd(o, i) && _t(e, s, o?.id));
9972
+ let s = O(D(e.schema, e.viewName), i.nodeId);
9973
+ return !!(i.movable && s && vd(o, i) && vt(e, s, o?.id));
9974
9974
  }
9975
9975
  function Rd(e, t, n, r) {
9976
9976
  if (!Ld(e, t, n, r)) return;
9977
9977
  let i = zd(t), a = zd(n);
9978
9978
  if (!(!i?.nodeId || !a?.nodeId)) {
9979
9979
  if (r === "inner") {
9980
- let t = k(O(e.schema, e.viewName), a.nodeId);
9981
- zt(e, i.nodeId, a.nodeId, t?.children?.length ?? 0);
9980
+ let t = O(D(e.schema, e.viewName), a.nodeId);
9981
+ Bt(e, i.nodeId, a.nodeId, t?.children?.length ?? 0);
9982
9982
  return;
9983
9983
  }
9984
- a.index !== void 0 && zt(e, i.nodeId, a.parentId, r === "after" ? a.index + 1 : a.index);
9984
+ a.index !== void 0 && Bt(e, i.nodeId, a.parentId, r === "after" ? a.index + 1 : a.index);
9985
9985
  }
9986
9986
  }
9987
9987
  function zd(e) {
9988
9988
  if (e) return "data" in e ? e.data : e;
9989
9989
  }
9990
9990
  function Bd(e, t, n) {
9991
- let r = O(e.schema, e.viewName);
9992
- return n === "inner" ? t.nodeId ? k(r, t.nodeId) : void 0 : t.parentId ? k(r, t.parentId) : void 0;
9991
+ let r = D(e.schema, e.viewName);
9992
+ return n === "inner" ? t.nodeId ? O(r, t.nodeId) : void 0 : t.parentId ? O(r, t.parentId) : void 0;
9993
9993
  }
9994
9994
  function Vd(e, t, n) {
9995
- let r = k(O(e.schema, e.viewName), t);
9996
- return r ? !!k(r.children ?? [], n) : !1;
9995
+ let r = O(D(e.schema, e.viewName), t);
9996
+ return r ? !!O(r.children ?? [], n) : !1;
9997
9997
  }
9998
9998
  function Hd(e, t) {
9999
- return t.title ? t.title : t.field ? P(e.schema).find((e) => e.name === t.field)?.label || t.field : t.component || t.type || "未命名节点";
9999
+ return t.title ? t.title : t.field ? N(e.schema).find((e) => e.name === t.field)?.label || t.field : t.component || t.type || "未命名节点";
10000
10000
  }
10001
10001
  function Ud(e, t, n) {
10002
10002
  let r = t[n], i = t[n - 1];
10003
- return !r?.id || !i?.id ? !1 : vd(i, r) && _t(e, r, i.id);
10003
+ return !r?.id || !i?.id ? !1 : vd(i, r) && vt(e, r, i.id);
10004
10004
  }
10005
10005
  function Wd(e, t, n) {
10006
10006
  let r = n.at(-1);
10007
10007
  if (!t.id || !r?.id) return !1;
10008
10008
  let i = n.at(-2);
10009
- return vd(i, t) && _t(e, t, i?.id);
10009
+ return vd(i, t) && vt(e, t, i?.id);
10010
10010
  }
10011
10011
  function Gd(e, t) {
10012
10012
  if (!t.nodeId) return;
10013
- let n = qd(O(e.schema, e.viewName), t.nodeId), r = n ? n.siblings[n.index - 1] : void 0;
10013
+ let n = qd(D(e.schema, e.viewName), t.nodeId), r = n ? n.siblings[n.index - 1] : void 0;
10014
10014
  if (!(!r?.id || !vd(r, n?.node ?? t))) return r;
10015
10015
  }
10016
10016
  function Kd(e, t) {
10017
- let n = O(e.schema, e.viewName), r = qd(n, t);
10017
+ let n = D(e.schema, e.viewName), r = qd(n, t);
10018
10018
  if (!r?.parentId) return !1;
10019
- let i = k(n, r.parentId);
10019
+ let i = O(n, r.parentId);
10020
10020
  if (!i?.id) return !1;
10021
10021
  let a = qd(n, i.id);
10022
- return vd(a?.parentId ? k(n, a.parentId) : void 0, r.node);
10022
+ return vd(a?.parentId ? O(n, a.parentId) : void 0, r.node);
10023
10023
  }
10024
10024
  function qd(e, t, n) {
10025
10025
  for (let r = 0; r < e.length; r += 1) {
@@ -10062,7 +10062,7 @@ function Qd(e) {
10062
10062
  //#region src/shared/component-registry.ts
10063
10063
  function $d(e, t, n, r) {
10064
10064
  let i = [...n?.entries() ?? []];
10065
- for (let a of ef(O(e, t), n, r)) i.push([a, tf(a)]);
10065
+ for (let a of ef(D(e, t), n, r)) i.push([a, tf(a)]);
10066
10066
  return ee(i);
10067
10067
  }
10068
10068
  function ef(e, t, n, r = /* @__PURE__ */ new Set()) {
@@ -10114,7 +10114,7 @@ var nf = r({
10114
10114
  let r = a(g, void 0), o = a(h, void 0), s = S(), c = n(() => e.richTextEditors ?? o ?? r?.richTextEditors ?? s), l = n(() => aa(e.extensions, e.components, e.services, e.icons, {
10115
10115
  materialKeys: e.materialKeys,
10116
10116
  nodePermissions: e.nodePermissions
10117
- })), f = d(Ie(e.schema, e.view, l.value.services, l.value)), p = n(() => $d(f.schema, f.viewName, l.value.components, l.value)), _ = n(() => Ue(e.features));
10117
+ })), f = d(Le(e.schema, e.view, l.value.services, l.value)), p = n(() => $d(f.schema, f.viewName, l.value.components, l.value)), _ = n(() => We(e.features));
10118
10118
  of(l.value);
10119
10119
  let v, y = !1, b = () => {
10120
10120
  e.onChange?.(rf(f.schema, e.outputScope));
@@ -10122,10 +10122,10 @@ var nf = r({
10122
10122
  u(() => {
10123
10123
  v !== void 0 && (cancelAnimationFrame(v), v = void 0), y = !1;
10124
10124
  }), m(() => e.schema, (e) => {
10125
- let t = Ne(e, f.viewName);
10126
- f.schema = t, f.schemaVersion += 1, f.savedSchema = Me(t), f.history = [], f.future = [];
10125
+ let t = Pe(e, f.viewName);
10126
+ f.schema = t, f.schemaVersion += 1, f.savedSchema = Ne(t), f.history = [], f.future = [];
10127
10127
  }), m(l, (e) => {
10128
- f.extensionContext = e, f.serviceRegistry = Le(e.services), f.schemaVersion += 1, of(e);
10128
+ f.extensionContext = e, f.serviceRegistry = Re(e.services), f.schemaVersion += 1, of(e);
10129
10129
  }), m([() => f.schema, () => e.outputScope], () => {
10130
10130
  if (!(v !== void 0 || y)) {
10131
10131
  if (typeof requestAnimationFrame == "function") {
@@ -10142,10 +10142,10 @@ var nf = r({
10142
10142
  let x = async () => {
10143
10143
  if (f.saving) return;
10144
10144
  f.saving = !0;
10145
- let t = Me(f.schema);
10145
+ let t = Ne(f.schema);
10146
10146
  try {
10147
10147
  let n = rf(t, e.outputScope);
10148
- await e.onSave?.(Me(n)), f.savedSchema = t, f.future = [], f.schemaVersion += 1;
10148
+ await e.onSave?.(Ne(n)), f.savedSchema = t, f.future = [], f.schemaVersion += 1;
10149
10149
  } catch (t) {
10150
10150
  e.onSaveError ? await e.onSaveError(t) : console.error("[sparq-designer] 保存失败", t);
10151
10151
  } finally {
@@ -10154,7 +10154,7 @@ var nf = r({
10154
10154
  };
10155
10155
  t?.expose?.({ getOutputSchema: () => rf(f.schema, e.outputScope) });
10156
10156
  let ee = () => {
10157
- let t = rf(f.schema, e.outputScope), n = new Blob([Pe(t)], { type: "application/json" }), r = URL.createObjectURL(n), i = document.createElement("a");
10157
+ let t = rf(f.schema, e.outputScope), n = new Blob([Fe(t)], { type: "application/json" }), r = URL.createObjectURL(n), i = document.createElement("a");
10158
10158
  i.href = r, i.download = `${f.schema.schema.name || "schema"}.json`, i.click(), URL.revokeObjectURL(r);
10159
10159
  }, C = () => {
10160
10160
  let t = document.createElement("input");
@@ -10163,12 +10163,12 @@ var nf = r({
10163
10163
  if (!n) return;
10164
10164
  let r = new FileReader();
10165
10165
  r.onload = () => {
10166
- let t = Ne(Re(Ne(Fe(String(r.result ?? "{}")), f.viewName), e.outputScope), f.viewName);
10167
- if (!vt(f, t)) {
10166
+ let t = Pe(ze(Pe(Ie(String(r.result ?? "{}")), f.viewName), e.outputScope), f.viewName);
10167
+ if (!yt(f, t)) {
10168
10168
  console.warn("[sparq-designer] 导入内容会修改当前只读节点,已拒绝应用");
10169
10169
  return;
10170
10170
  }
10171
- f.history.push(Me(f.schema)), f.future = [], f.schema = t, f.schemaVersion += 1;
10171
+ f.history.push(Ne(f.schema)), f.future = [], f.schema = t, f.schemaVersion += 1;
10172
10172
  }, r.readAsText(n);
10173
10173
  }, t.click();
10174
10174
  };
@@ -10198,7 +10198,7 @@ var nf = r({
10198
10198
  }
10199
10199
  });
10200
10200
  function rf(e, t) {
10201
- return Re(e, t);
10201
+ return ze(e, t);
10202
10202
  }
10203
10203
  function af(e, t) {
10204
10204
  return t !== void 0 && JSON.stringify(e) === JSON.stringify(t);
@@ -10207,6 +10207,6 @@ function of(e) {
10207
10207
  for (let t of e.diagnostics) console.warn(`[sparq-designer] ${t.message}`);
10208
10208
  }
10209
10209
  //#endregion
10210
- export { Ta as SortableList, nf as SparqDesigner, Na as createCanvasAdapter, aa as createDesignerExtensionContext, Ge as createDesignerNodePermissionPolicy, Re as createDesignerOutputSchema, He as defaultDesignerFeatures, We as defaultDesignerNodePermissions, L as designerCapabilityCardKeys, Sr as designerFieldCapabilityKeys, Ue as resolveDesignerFeatures };
10210
+ export { Ta as SortableList, nf as SparqDesigner, Ji as builtInDesignerMaterials, ui as createBuiltInDesignerComponentProperties, Na as createCanvasAdapter, aa as createDesignerExtensionContext, Ke as createDesignerNodePermissionPolicy, ze as createDesignerOutputSchema, Le as createState, Ue as defaultDesignerFeatures, Ge as defaultDesignerNodePermissions, I as designerCapabilityCardKeys, R as designerFieldCapabilityKeys, D as getFormChildren, Mt as insertDesignerMaterialInto, We as resolveDesignerFeatures };
10211
10211
 
10212
10212
  //# sourceMappingURL=index.js.map