@farris/ui-vue 1.4.0 → 1.4.1
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/components/avatar/index.esm.js +2 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +2 -1
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +2 -1
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -1
- package/components/condition/index.esm.js +715 -704
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.css +1 -1
- package/components/content-container/index.esm.js +1180 -1169
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +2949 -2901
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -1
- package/components/data-view/index.esm.js +609 -598
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +3 -2
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +2081 -2062
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/drawer/index.esm.js +23 -21
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dynamic-form/index.css +1 -1
- package/components/dynamic-form/index.esm.js +2745 -2691
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +1322 -1311
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +85 -74
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +4618 -4320
- package/components/filter-bar/index.umd.cjs +3 -3
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1982 -1963
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +2 -1
- package/components/input-group/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +822 -811
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +3268 -3219
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +1985 -1937
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +136 -135
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +2 -1
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +2 -1
- package/components/order/index.umd.cjs +1 -1
- package/components/property-editor/index.esm.js +2 -1
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +295 -283
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +5430 -5374
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/radio-group/index.esm.js +2 -1
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +1259 -1248
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/section/index.css +1 -1
- package/components/section/index.esm.js +1272 -1261
- package/components/section/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +2 -1
- package/components/switch/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +14 -13
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +2 -1
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +715 -704
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -1
- package/components/tree-view/index.esm.js +107 -96
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +14687 -14334
- package/farris.all.umd.cjs +11 -11
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +8 -0
- package/types/dynamic-form/src/composition/form-binding-resolver-design.d.ts +6 -0
- package/types/filter-bar/src/components/drawer.component.d.ts +4 -0
- package/types/filter-bar/src/components/filter-item/filter-item.component.d.ts +10 -0
- package/types/filter-bar/src/components/filter-item/filter-item.props.d.ts +3 -0
- package/types/filter-bar/src/components/filter-item-condition/filter-item-condition.component.d.ts +11 -0
- package/types/filter-bar/src/components/filter-item-condition/filter-item-condition.props.d.ts +3 -0
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/composition/use-condition.d.ts +19 -0
- package/types/filter-bar/src/filter-bar.component.d.ts +2 -1
- package/types/filter-bar/src/types.d.ts +4 -6
- package/types/filter-bar/src/components/filter-item.component.d.ts +0 -5
- /package/types/filter-bar/src/components/{toolbar-component.d.ts → toolbar.component.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Me = Object.defineProperty;
|
|
2
2
|
var je = (e, t, r) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var B = (e, t, r) => je(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { ref as k, computed as
|
|
4
|
+
import { ref as k, computed as G, defineComponent as H, watch as q, createVNode as a, createTextVNode as de, mergeProps as $e, reactive as Re, withDirectives as Ue, resolveDirective as qe, Fragment as pe, inject as Ae, onMounted as ae, onBeforeMount as Ge } from "vue";
|
|
5
5
|
import { isPlainObject as le, cloneDeep as me } from "lodash-es";
|
|
6
6
|
import We from "../accordion/index.esm.js";
|
|
7
7
|
import Qe from "../avatar/index.esm.js";
|
|
@@ -38,8 +38,8 @@ import Ct from "../page-header/index.esm.js";
|
|
|
38
38
|
import Pt from "../page-footer/index.esm.js";
|
|
39
39
|
import kt from "../pagination/index.esm.js";
|
|
40
40
|
import St from "../progress/index.esm.js";
|
|
41
|
-
import
|
|
42
|
-
import
|
|
41
|
+
import Tt from "../query-solution/index.esm.js";
|
|
42
|
+
import xt from "../radio-group/index.esm.js";
|
|
43
43
|
import wt from "../rate/index.esm.js";
|
|
44
44
|
import Et from "../response-toolbar/index.esm.js";
|
|
45
45
|
import Vt from "../response-layout/index.esm.js";
|
|
@@ -93,67 +93,67 @@ const Xt = {
|
|
|
93
93
|
propertyChanged: { type: Function }
|
|
94
94
|
};
|
|
95
95
|
function Yt(e = {}) {
|
|
96
|
-
function t(
|
|
96
|
+
function t(l, v, i, F) {
|
|
97
97
|
if (typeof i == "number")
|
|
98
|
-
return
|
|
98
|
+
return F[l].length === i;
|
|
99
99
|
if (typeof i == "object") {
|
|
100
100
|
const m = Object.keys(i)[0], P = i[m];
|
|
101
101
|
if (m === "not")
|
|
102
|
-
return Number(
|
|
102
|
+
return Number(F[l].length) !== Number(P);
|
|
103
103
|
if (m === "moreThan")
|
|
104
|
-
return Number(
|
|
104
|
+
return Number(F[l].length) >= Number(P);
|
|
105
105
|
if (m === "lessThan")
|
|
106
|
-
return Number(
|
|
106
|
+
return Number(F[l].length) <= Number(P);
|
|
107
107
|
}
|
|
108
108
|
return !1;
|
|
109
109
|
}
|
|
110
|
-
function r(
|
|
111
|
-
return
|
|
110
|
+
function r(l, v, i, F) {
|
|
111
|
+
return F[l] && F[l].propertyValue && String(F[l].propertyValue.value) === String(i);
|
|
112
112
|
}
|
|
113
113
|
const n = /* @__PURE__ */ new Map([
|
|
114
114
|
["length", t],
|
|
115
115
|
["getProperty", r]
|
|
116
116
|
]);
|
|
117
|
-
Object.keys(e).reduce((
|
|
118
|
-
function o(
|
|
119
|
-
const i =
|
|
120
|
-
return typeof
|
|
121
|
-
if (
|
|
122
|
-
return { target: i, operator: "length", param: null, value: F
|
|
123
|
-
const m =
|
|
117
|
+
Object.keys(e).reduce((l, v) => (l.set(v, e[v]), l), n);
|
|
118
|
+
function o(l, v) {
|
|
119
|
+
const i = l;
|
|
120
|
+
return typeof v == "number" ? [{ target: i, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: i, operator: "getProperty", param: l, value: !!v }] : typeof v == "object" ? Object.keys(v).map((F) => {
|
|
121
|
+
if (F === "length")
|
|
122
|
+
return { target: i, operator: "length", param: null, value: v[F] };
|
|
123
|
+
const m = F, P = v[F];
|
|
124
124
|
return { target: i, operator: "getProperty", param: m, value: P };
|
|
125
125
|
}) : [];
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
return Object.keys(
|
|
129
|
-
const m = o(
|
|
127
|
+
function f(l) {
|
|
128
|
+
return Object.keys(l).reduce((i, F) => {
|
|
129
|
+
const m = o(F, l[F]);
|
|
130
130
|
return i.push(...m), i;
|
|
131
131
|
}, []);
|
|
132
132
|
}
|
|
133
|
-
function h(
|
|
134
|
-
if (n.has(
|
|
135
|
-
const i = n.get(
|
|
136
|
-
return i && i(
|
|
133
|
+
function h(l, v) {
|
|
134
|
+
if (n.has(l.operator)) {
|
|
135
|
+
const i = n.get(l.operator);
|
|
136
|
+
return i && i(l.target, l.param, l.value, v) || !1;
|
|
137
137
|
}
|
|
138
138
|
return !1;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
140
|
+
function S(l, v) {
|
|
141
|
+
return f(l).reduce((m, P) => m && h(P, v), !0);
|
|
142
142
|
}
|
|
143
|
-
function C(
|
|
144
|
-
const i = Object.keys(
|
|
145
|
-
return
|
|
143
|
+
function C(l, v) {
|
|
144
|
+
const i = Object.keys(l), F = i.includes("allOf"), m = i.includes("anyOf"), P = F || m, L = (P ? l[P ? F ? "allOf" : "anyOf" : "allOf"] : [l]).map(($) => S($, v));
|
|
145
|
+
return F ? !L.includes(!1) : L.includes(!0);
|
|
146
146
|
}
|
|
147
147
|
return { parseValueSchema: C };
|
|
148
148
|
}
|
|
149
149
|
const ee = {}, Zt = {};
|
|
150
150
|
function fe(e) {
|
|
151
|
-
const { properties: t, title: r, ignore: n } = e, o = n && Array.isArray(n),
|
|
151
|
+
const { properties: t, title: r, ignore: n } = e, o = n && Array.isArray(n), f = Object.keys(t).reduce((h, S) => ((!o || !n.find((C) => C === S)) && (h[S] = t[S].type === "object" && t[S].properties ? fe(t[S]) : me(t[S].default)), h), {});
|
|
152
152
|
if (r && (!o || !n.find((h) => h === "id"))) {
|
|
153
153
|
const h = r.toLowerCase().replace(/-/g, "_");
|
|
154
|
-
|
|
154
|
+
f.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
155
155
|
}
|
|
156
|
-
return
|
|
156
|
+
return f;
|
|
157
157
|
}
|
|
158
158
|
function te(e, t) {
|
|
159
159
|
const r = fe(t);
|
|
@@ -162,11 +162,11 @@ function te(e, t) {
|
|
|
162
162
|
function Kt(e, t) {
|
|
163
163
|
return Object.keys(e).filter((n) => e[n] != null).reduce((n, o) => {
|
|
164
164
|
if (t.has(o)) {
|
|
165
|
-
const
|
|
166
|
-
if (typeof
|
|
167
|
-
n[
|
|
165
|
+
const f = t.get(o);
|
|
166
|
+
if (typeof f == "string")
|
|
167
|
+
n[f] = e[o];
|
|
168
168
|
else {
|
|
169
|
-
const h =
|
|
169
|
+
const h = f(o, e[o], e);
|
|
170
170
|
Object.assign(n, h);
|
|
171
171
|
}
|
|
172
172
|
} else
|
|
@@ -185,10 +185,10 @@ function ge(e) {
|
|
|
185
185
|
const n = ee[t];
|
|
186
186
|
if (!n)
|
|
187
187
|
return e;
|
|
188
|
-
const o = te(e, n),
|
|
189
|
-
if (
|
|
190
|
-
const h = ee[
|
|
191
|
-
o.editor =
|
|
188
|
+
const o = te(e, n), f = ((r = e.editor) == null ? void 0 : r.type) || "";
|
|
189
|
+
if (f) {
|
|
190
|
+
const h = ee[f], S = te(e.editor, h);
|
|
191
|
+
o.editor = S;
|
|
192
192
|
}
|
|
193
193
|
return o;
|
|
194
194
|
}
|
|
@@ -206,7 +206,7 @@ const tr = {
|
|
|
206
206
|
e.editor && (e.editor[t] = r);
|
|
207
207
|
},
|
|
208
208
|
convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
209
|
-
},
|
|
209
|
+
}, p = {
|
|
210
210
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
211
211
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
212
212
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -250,7 +250,7 @@ const tr = {
|
|
|
250
250
|
convertFrom: (e, t, r) => {
|
|
251
251
|
var o;
|
|
252
252
|
const n = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
253
|
-
return ((o =
|
|
253
|
+
return ((o = p[n]) == null ? void 0 : o.name) || n;
|
|
254
254
|
}
|
|
255
255
|
}, ir = {
|
|
256
256
|
convertTo: (e, t, r, n) => {
|
|
@@ -344,55 +344,55 @@ function hr(e, t) {
|
|
|
344
344
|
const r = e.$converter || t;
|
|
345
345
|
return typeof r == "string" && r && re.has(r) ? re.get(r) || null : r || null;
|
|
346
346
|
}
|
|
347
|
-
function oe(e, t, r, n, o,
|
|
347
|
+
function oe(e, t, r, n, o, f = "", h = "") {
|
|
348
348
|
return Object.keys(e).map((C) => {
|
|
349
|
-
const
|
|
349
|
+
const l = k(1), v = C, i = e[C], F = Object.keys(i), m = i.title, P = i.type, V = fr.get(P) || { type: "input-group", enableClear: !1 }, E = i.editor ? Object.assign({}, V, i.editor) : Object.assign({}, V), L = vr(F, i, t), j = yr(F, i, t);
|
|
350
350
|
E.readonly = E.readonly === void 0 ? j() : E.readonly;
|
|
351
|
-
const $ = i.type === "cascade" ? oe(i.properties, t, r, n, o,
|
|
351
|
+
const $ = i.type === "cascade" ? oe(i.properties, t, r, n, o, f, h) : [], D = !0;
|
|
352
352
|
let w = hr(i, h);
|
|
353
|
-
const I =
|
|
353
|
+
const I = G({
|
|
354
354
|
get() {
|
|
355
|
-
if (
|
|
356
|
-
if (["class", "style"].find((
|
|
357
|
-
return w.convertFrom(r, C, o,
|
|
355
|
+
if (l.value) {
|
|
356
|
+
if (["class", "style"].find((W) => W === v) && !w && (w = re.get("/converter/appearance.converter") || null), w && w.convertFrom)
|
|
357
|
+
return w.convertFrom(r, C, o, f);
|
|
358
358
|
const O = r[C];
|
|
359
359
|
return typeof O == "string" && O === "" ? i.defaultValue || "" : O;
|
|
360
360
|
}
|
|
361
361
|
return null;
|
|
362
362
|
},
|
|
363
363
|
set(O) {
|
|
364
|
-
|
|
364
|
+
l.value += 1, w && w.convertTo ? (w.convertTo(n, C, O, o, f), w.convertTo(r, C, O, o, f)) : (n[C] = O, r[C] = O);
|
|
365
365
|
}
|
|
366
|
-
}), { refreshPanelAfterChanged:
|
|
367
|
-
return t[
|
|
366
|
+
}), { refreshPanelAfterChanged: x, description: M, isExpand: U } = i, R = { propertyID: v, propertyName: m, propertyType: P, propertyValue: I, editor: E, visible: L, readonly: j, cascadeConfig: $, hideCascadeTitle: D, refreshPanelAfterChanged: x, description: M, isExpand: U };
|
|
367
|
+
return t[v] = R, R;
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
function br(e, t, r, n, o = "") {
|
|
371
|
-
const
|
|
371
|
+
const f = t.$ref.schema, h = t.$ref.converter, S = r[f], C = S.type, l = ge(S), v = {}, i = ne[C];
|
|
372
372
|
if (i && i.categories) {
|
|
373
|
-
const
|
|
374
|
-
h && Object.keys(
|
|
375
|
-
|
|
373
|
+
const F = i.categories[e], m = F == null ? void 0 : F.title;
|
|
374
|
+
h && Object.keys(F.properties).forEach((E) => {
|
|
375
|
+
F.properties[E].$converter = h;
|
|
376
376
|
});
|
|
377
|
-
const P = (
|
|
377
|
+
const P = (F == null ? void 0 : F.properties) || {}, V = oe(P, v, l, S, n, o);
|
|
378
378
|
return { categoryId: e, categoryName: m, properties: V };
|
|
379
379
|
}
|
|
380
380
|
return { categoryId: e, categoryName: "", properties: [] };
|
|
381
381
|
}
|
|
382
382
|
function K(e, t, r, n, o) {
|
|
383
|
-
const
|
|
384
|
-
let C = o || ne[
|
|
383
|
+
const f = e.type, h = ge(e), S = {};
|
|
384
|
+
let C = o || ne[f];
|
|
385
385
|
if (C && Object.keys(C).length === 0 && r && r.getPropConfig && (C = r.getPropConfig(n)), C && C.categories) {
|
|
386
|
-
const
|
|
387
|
-
return Object.keys(C.categories).map((
|
|
388
|
-
const i = C.categories[
|
|
386
|
+
const l = [];
|
|
387
|
+
return Object.keys(C.categories).map((v) => {
|
|
388
|
+
const i = C.categories[v];
|
|
389
389
|
if (i.$ref) {
|
|
390
|
-
|
|
390
|
+
l.push(br(v, i, e, t, n));
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
}),
|
|
393
|
+
const F = i == null ? void 0 : i.title, m = i == null ? void 0 : i.tabId, P = i == null ? void 0 : i.tabName, V = i == null ? void 0 : i.hide, E = i == null ? void 0 : i.hideTitle, L = oe(i.properties || {}, S, h, e, t, n, i.$converter), { setPropertyRelates: j } = i;
|
|
394
|
+
l.push({ categoryId: v, categoryName: F, tabId: m, tabName: P, hide: V, properties: L, hideTitle: E, setPropertyRelates: j });
|
|
395
|
+
}), l;
|
|
396
396
|
}
|
|
397
397
|
return [];
|
|
398
398
|
}
|
|
@@ -409,10 +409,10 @@ const Fr = {
|
|
|
409
409
|
elementConfig: { type: Object, default: {} },
|
|
410
410
|
category: { type: Object, default: {} }
|
|
411
411
|
};
|
|
412
|
-
function Pr(e, t, r = /* @__PURE__ */ new Map(), n = (h,
|
|
413
|
-
return ee[t.title] = t, Zt[t.title] = n, ne[t.title] = o, mr[t.title] =
|
|
414
|
-
const
|
|
415
|
-
return Object.assign(C,
|
|
412
|
+
function Pr(e, t, r = /* @__PURE__ */ new Map(), n = (h, S, C, l) => S, o = {}, f = (h) => h) {
|
|
413
|
+
return ee[t.title] = t, Zt[t.title] = n, ne[t.title] = o, mr[t.title] = f, (h = {}) => {
|
|
414
|
+
const S = er(h, t, r), C = Object.keys(e).reduce((l, v) => (l[v] = e[v].default, l), {});
|
|
415
|
+
return Object.assign(C, S);
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
function kr(e, t) {
|
|
@@ -420,7 +420,7 @@ function kr(e, t) {
|
|
|
420
420
|
}
|
|
421
421
|
const Sr = /* @__PURE__ */ new Map([
|
|
422
422
|
["appearance", kr]
|
|
423
|
-
]),
|
|
423
|
+
]), Tr = "https://json-schema.org/draft/2020-12/schema", xr = "https://farris-design.gitee.io/form-group.schema.json", wr = "form-group", Er = "A Farris Input Component", Vr = "object", Br = {
|
|
424
424
|
id: {
|
|
425
425
|
description: "The unique identifier for a form group",
|
|
426
426
|
type: "string"
|
|
@@ -472,8 +472,8 @@ const Sr = /* @__PURE__ */ new Map([
|
|
|
472
472
|
"type",
|
|
473
473
|
"editor"
|
|
474
474
|
], Nr = {
|
|
475
|
-
$schema:
|
|
476
|
-
$id:
|
|
475
|
+
$schema: Tr,
|
|
476
|
+
$id: xr,
|
|
477
477
|
title: wr,
|
|
478
478
|
description: Er,
|
|
479
479
|
type: Vr,
|
|
@@ -492,7 +492,8 @@ const Sr = /* @__PURE__ */ new Map([
|
|
|
492
492
|
visible: { type: Boolean, default: !0 },
|
|
493
493
|
required: { type: Boolean, default: !1 },
|
|
494
494
|
showLabel: { type: Boolean, default: !0 },
|
|
495
|
-
type: { type: String, default: "input-group" }
|
|
495
|
+
type: { type: String, default: "input-group" },
|
|
496
|
+
componentId: { type: String, default: "" }
|
|
496
497
|
};
|
|
497
498
|
Pr(
|
|
498
499
|
ye,
|
|
@@ -504,42 +505,53 @@ const Or = {
|
|
|
504
505
|
id: { type: String },
|
|
505
506
|
required: { type: Boolean, default: !1 },
|
|
506
507
|
text: { type: String, default: "" },
|
|
507
|
-
title: { type: String }
|
|
508
|
-
|
|
508
|
+
title: { type: String },
|
|
509
|
+
valid: { type: Boolean, default: !0 },
|
|
510
|
+
inValidTip: { type: String, default: "" }
|
|
511
|
+
}, Lr = /* @__PURE__ */ H({
|
|
509
512
|
name: "FDynamicFormLabel",
|
|
510
513
|
props: Or,
|
|
511
514
|
emits: [],
|
|
512
515
|
setup(e, t) {
|
|
513
|
-
const r = k(e.title || e.text), n = k(e.required), o = k(e.text);
|
|
514
|
-
|
|
516
|
+
const r = k(e.title || e.text), n = k(e.required), o = k(e.text), f = k(e.valid), h = k(e.inValidTip);
|
|
517
|
+
q(() => e.text, () => {
|
|
515
518
|
o.value = e.text;
|
|
516
|
-
}), q(() => e.required, (
|
|
517
|
-
|
|
518
|
-
}), () =>
|
|
519
|
+
}), q(() => e.required, (l, v) => {
|
|
520
|
+
l !== v && (n.value = l);
|
|
521
|
+
}), q([() => e.valid, () => e.inValidTip], ([l, v]) => {
|
|
522
|
+
f.value = l, h.value = v;
|
|
523
|
+
});
|
|
524
|
+
const S = G(() => f.value ? r.value : h.value), C = G(() => f.value ? "" : "color:red");
|
|
525
|
+
return () => o.value && a("label", {
|
|
519
526
|
class: "col-form-label",
|
|
520
|
-
title:
|
|
521
|
-
|
|
527
|
+
title: S.value,
|
|
528
|
+
style: C.value
|
|
529
|
+
}, [!f.value && a("span", {
|
|
530
|
+
class: "f-icon f-icon-warning mr-1",
|
|
531
|
+
style: "color: red; min-width: 16px;",
|
|
532
|
+
title: h.value
|
|
533
|
+
}, null), n.value && a("span", {
|
|
522
534
|
class: "farris-label-info text-danger"
|
|
523
535
|
}, [de("*")]), a("span", {
|
|
524
536
|
class: "farris-label-text"
|
|
525
537
|
}, [o.value])]);
|
|
526
538
|
}
|
|
527
|
-
}),
|
|
539
|
+
}), s = {}, c = {}, u = {}, d = {};
|
|
528
540
|
let se = !1;
|
|
529
541
|
function Dr() {
|
|
530
|
-
se || (se = !0, Qe.register(
|
|
542
|
+
se || (se = !0, Qe.register(s, c, u, d), We.register(s, c, u, d), ze.register(s, c, u, d), _e.register(s, c, u, d), He.register(s, c, u, d), Je.register(s, c, u, d), Xe.register(s, c, u, d), Ye.register(s, c, u, d), Ze.register(s, c, u, d), Ke.register(s, c, u, d), tt.register(s, c, u, d), et.register(s, c, u, d), rt.register(s, c, u, d), nt.register(s, c, u, d), ot.register(s, c, u, d), it.register(s, c, u, d), at.register(s, c, u, d), lt.register(s, c, u, d), st.register(s, c, u, d), ut.register(s, c, u, d), dt.register(s, c, u, d), pt.register(s, c, u, d), ft.register(s, c, u, d), mt.register(s, c, u, d), gt.register(s, c, u, d), vt.register(s, c, u, d), yt.register(s, c, u, d), ht.register(s, c, u, d), bt.register(s, c, u, d), Ft.register(s, c, u, d), Ct.register(s, c, u, d), Pt.register(s, c, u, d), kt.register(s, c, u, d), St.register(s, c, u, d), Tt.register(s, c, u, d), xt.register(s, c, u, d), wt.register(s, c, u, d), Vt.register(s, c, u, d), Bt.register(s, c, u, d), Et.register(s, c, u, d), _t.register(s, c, u), It.register(s, c, u, d), Nt.register(s, c, u, d), Ot.register(s, c, u, d), Lt.register(s, c, u, d), Dt.register(s, c, u, d), Mt.register(s, c, u, d), jt.register(s, c, u, d), $t.register(s, c, u, d), Rt.register(s, c, u, d), Ut.register(s, c, u, d), qt.register(s, c, u, d), At.register(s, c, u, d), Wt.register(s, c, u, d), Gt.register(s, c, u, d), Qt.register(s, c, u, d), zt.register(s, c, u, d), Ht.register(s, c, u, d), ct.register(s, c, u, d), Jt.register(s, c, u, d));
|
|
531
543
|
}
|
|
532
544
|
function Mr() {
|
|
533
545
|
Dr();
|
|
534
546
|
function e(o) {
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
547
|
+
const f = s[o];
|
|
548
|
+
if (!f)
|
|
537
549
|
throw new Error(`Could not find the editor of type '${o}'`);
|
|
538
|
-
return
|
|
550
|
+
return f;
|
|
539
551
|
}
|
|
540
|
-
function t(o,
|
|
541
|
-
const h =
|
|
542
|
-
return h ? h(
|
|
552
|
+
function t(o, f) {
|
|
553
|
+
const h = c[o];
|
|
554
|
+
return h ? h(f) : {};
|
|
543
555
|
}
|
|
544
556
|
function r(o) {
|
|
545
557
|
switch (o) {
|
|
@@ -616,24 +628,24 @@ function Mr() {
|
|
|
616
628
|
}
|
|
617
629
|
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: r, getClearFunctionName: n };
|
|
618
630
|
}
|
|
619
|
-
const jr = /* @__PURE__ */
|
|
631
|
+
const jr = /* @__PURE__ */ H({
|
|
620
632
|
name: "FDynamicFormGroup",
|
|
621
633
|
props: ye,
|
|
622
634
|
emits: ["change", "update:modelValue"],
|
|
623
635
|
setup(e, t) {
|
|
624
636
|
var D;
|
|
625
|
-
const r = k(e.id), n = k(e.customClass), o = k(e.editor),
|
|
637
|
+
const r = k(e.id), n = k(e.customClass), o = k(e.editor), f = k(e.label), h = k(e.modelValue), S = k(e.readonly), C = k(((D = e.editor) == null ? void 0 : D.required) || e.required), l = k(e.showLabel), v = k(e.visible);
|
|
626
638
|
k(e.type);
|
|
627
639
|
const i = k(), {
|
|
628
|
-
resolveEditorProps:
|
|
640
|
+
resolveEditorProps: F,
|
|
629
641
|
resolveEditorType: m,
|
|
630
642
|
getChangeFunctionName: P,
|
|
631
643
|
getClearFunctionName: V
|
|
632
|
-
} = Mr(), E =
|
|
644
|
+
} = Mr(), E = G(() => ({
|
|
633
645
|
"form-group": !0,
|
|
634
646
|
"farris-form-group": !0,
|
|
635
647
|
"common-group": !0,
|
|
636
|
-
"q-state-readonly":
|
|
648
|
+
"q-state-readonly": S.value
|
|
637
649
|
}));
|
|
638
650
|
function L(w, I) {
|
|
639
651
|
h.value = I !== void 0 ? I : w, t.emit("update:modelValue", h.value), t.emit("change", h.value);
|
|
@@ -641,21 +653,21 @@ const jr = /* @__PURE__ */ _({
|
|
|
641
653
|
function j() {
|
|
642
654
|
t.emit("update:modelValue", "");
|
|
643
655
|
}
|
|
644
|
-
const $ =
|
|
645
|
-
const w = o.value.type || "input-group", I = m(w),
|
|
646
|
-
return U && (
|
|
656
|
+
const $ = G(() => {
|
|
657
|
+
const w = o.value.type || "input-group", I = m(w), x = F(w, o.value), M = P(w), U = V(o.value.type);
|
|
658
|
+
return U && (x[U] = j), x[M] = L, (x.id == null || x.id === "") && (x.id = r.value), w === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (x.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (x.onEndValueChange = o.value.onEndValueChange)) : w === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" && (x["onUpdate:idValue"] = o.value["onUpdate:idValue"]), () => a(I, $e({
|
|
647
659
|
ref: i
|
|
648
|
-
},
|
|
660
|
+
}, x, {
|
|
649
661
|
modelValue: h.value,
|
|
650
662
|
"onUpdate:modelValue": (R) => h.value = R
|
|
651
663
|
}), t.slots);
|
|
652
664
|
});
|
|
653
|
-
return q([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([w, I,
|
|
654
|
-
var
|
|
655
|
-
r.value = w, n.value = I, o.value =
|
|
665
|
+
return q([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([w, I, x, M, U, R, O, W, X]) => {
|
|
666
|
+
var Q;
|
|
667
|
+
r.value = w, n.value = I, o.value = x, f.value = M, h.value = U, S.value = R, C.value = ((Q = o.value) == null ? void 0 : Q.required) || O, l.value = W, v.value = X;
|
|
656
668
|
}), t.expose({
|
|
657
669
|
editorRef: i
|
|
658
|
-
}), () =>
|
|
670
|
+
}), () => v.value && a("div", {
|
|
659
671
|
id: `${r.value}-input-group`,
|
|
660
672
|
class: n.value,
|
|
661
673
|
style: e.customStyle
|
|
@@ -663,24 +675,24 @@ const jr = /* @__PURE__ */ _({
|
|
|
663
675
|
class: "farris-group-wrap"
|
|
664
676
|
}, [a("div", {
|
|
665
677
|
class: E.value
|
|
666
|
-
}, [
|
|
678
|
+
}, [l.value && a(Lr, {
|
|
667
679
|
id: `${r.value}-lable`,
|
|
668
680
|
required: C.value,
|
|
669
|
-
text:
|
|
670
|
-
title:
|
|
681
|
+
text: f.value,
|
|
682
|
+
title: f.value
|
|
671
683
|
}, null), a("div", {
|
|
672
684
|
class: "farris-input-wrap"
|
|
673
685
|
}, [$.value()])])])]);
|
|
674
686
|
}
|
|
675
|
-
}), $r = /* @__PURE__ */
|
|
687
|
+
}), $r = /* @__PURE__ */ H({
|
|
676
688
|
name: "FPropertyPanelItem",
|
|
677
689
|
props: Cr,
|
|
678
690
|
emits: ["propertyChange", "triggerRefreshPanel"],
|
|
679
691
|
setup(e, t) {
|
|
680
|
-
var
|
|
681
|
-
const r = k((
|
|
692
|
+
var v;
|
|
693
|
+
const r = k((v = e.category) == null ? void 0 : v.categoryId), n = k(e.elementConfig.propertyID), o = k(e.elementConfig.propertyName);
|
|
682
694
|
k(e.elementConfig.editor);
|
|
683
|
-
const
|
|
695
|
+
const f = k(e.elementConfig.propertyValue), h = G(() => {
|
|
684
696
|
const i = e.elementConfig.visible;
|
|
685
697
|
return {
|
|
686
698
|
"farris-group-wrap": !0,
|
|
@@ -692,22 +704,22 @@ const jr = /* @__PURE__ */ _({
|
|
|
692
704
|
var i;
|
|
693
705
|
return (i = e.elementConfig) == null ? void 0 : i.propertyValue;
|
|
694
706
|
}, (i) => {
|
|
695
|
-
|
|
707
|
+
f.value = i;
|
|
696
708
|
}), q(() => {
|
|
697
709
|
var i;
|
|
698
710
|
return (i = e.elementConfig) == null ? void 0 : i.propertyName;
|
|
699
711
|
}, (i) => {
|
|
700
712
|
o.value = i;
|
|
701
713
|
});
|
|
702
|
-
function
|
|
714
|
+
function S(i) {
|
|
703
715
|
e.elementConfig.propertyValue = i;
|
|
704
|
-
const
|
|
716
|
+
const F = {
|
|
705
717
|
propertyID: e.elementConfig.propertyID,
|
|
706
718
|
propertyValue: i
|
|
707
719
|
};
|
|
708
|
-
t.emit("propertyChange",
|
|
720
|
+
t.emit("propertyChange", F), e.elementConfig.refreshPanelAfterChanged && t.emit("triggerRefreshPanel");
|
|
709
721
|
}
|
|
710
|
-
const C = e.elementConfig.description ? `<div style="color: gray; "> 描述 :${e.elementConfig.description}</div>` : "",
|
|
722
|
+
const C = e.elementConfig.description ? `<div style="color: gray; "> 描述 :${e.elementConfig.description}</div>` : "", l = Re({
|
|
711
723
|
content: `
|
|
712
724
|
<div>
|
|
713
725
|
<div style="color: black; ">${e.elementConfig.propertyName}</div>
|
|
@@ -722,16 +734,16 @@ const jr = /* @__PURE__ */ _({
|
|
|
722
734
|
class: `col-form-label ${r.value}-${n.value}`
|
|
723
735
|
}, [a("span", {
|
|
724
736
|
class: "farris-label-text"
|
|
725
|
-
}, [o.value])]), [[qe("tooltip"),
|
|
737
|
+
}, [o.value])]), [[qe("tooltip"), l]]), a(jr, {
|
|
726
738
|
id: n.value,
|
|
727
739
|
showLabel: !1,
|
|
728
740
|
editor: e.elementConfig.editor,
|
|
729
|
-
modelValue:
|
|
730
|
-
onChange:
|
|
741
|
+
modelValue: f.value,
|
|
742
|
+
onChange: S,
|
|
731
743
|
editorParams: e.elementConfig.editorParams
|
|
732
744
|
}, null)]);
|
|
733
745
|
}
|
|
734
|
-
}), Rr = /* @__PURE__ */
|
|
746
|
+
}), Rr = /* @__PURE__ */ H({
|
|
735
747
|
name: "FPropertyPanelItemList",
|
|
736
748
|
props: Fr,
|
|
737
749
|
emits: ["valueChanged", "submitModal", "triggerRefreshPanel"],
|
|
@@ -752,7 +764,7 @@ const jr = /* @__PURE__ */ _({
|
|
|
752
764
|
function o(m, P) {
|
|
753
765
|
P.isExpand = !P.isExpand;
|
|
754
766
|
}
|
|
755
|
-
function
|
|
767
|
+
function f(m) {
|
|
756
768
|
return a("div", {
|
|
757
769
|
class: "landscape"
|
|
758
770
|
}, [a("button", {
|
|
@@ -780,7 +792,7 @@ const jr = /* @__PURE__ */ _({
|
|
|
780
792
|
class: "farris-label-text"
|
|
781
793
|
}, [m.propertyName])])])]);
|
|
782
794
|
}
|
|
783
|
-
function
|
|
795
|
+
function S(m) {
|
|
784
796
|
return `${e.categoryKey}_${m.propertyID}`;
|
|
785
797
|
}
|
|
786
798
|
function C(m) {
|
|
@@ -788,18 +800,18 @@ const jr = /* @__PURE__ */ _({
|
|
|
788
800
|
changeObject: m
|
|
789
801
|
});
|
|
790
802
|
}
|
|
791
|
-
function
|
|
803
|
+
function l() {
|
|
792
804
|
t.emit("triggerRefreshPanel");
|
|
793
805
|
}
|
|
794
|
-
function
|
|
806
|
+
function v(m) {
|
|
795
807
|
return a("div", {
|
|
796
808
|
class: "px-2 mb-2"
|
|
797
809
|
}, [a($r, {
|
|
798
|
-
key:
|
|
810
|
+
key: S(m),
|
|
799
811
|
elementConfig: m,
|
|
800
812
|
category: r.value,
|
|
801
813
|
onPropertyChange: C,
|
|
802
|
-
onTriggerRefreshPanel:
|
|
814
|
+
onTriggerRefreshPanel: l
|
|
803
815
|
}, null)]);
|
|
804
816
|
}
|
|
805
817
|
function i(m) {
|
|
@@ -817,164 +829,164 @@ const jr = /* @__PURE__ */ _({
|
|
|
817
829
|
class: "panel-item-title"
|
|
818
830
|
}, [a("div", {
|
|
819
831
|
class: "form-group farris-form-group line-item"
|
|
820
|
-
}, [h(m), n(m),
|
|
832
|
+
}, [h(m), n(m), f(m)])])]), a("div", {
|
|
821
833
|
class: ["card-body", {
|
|
822
834
|
hidden: !m.isExpand
|
|
823
835
|
}]
|
|
824
|
-
}, [(P = m.cascadeConfig) == null ? void 0 : P.map((V) =>
|
|
836
|
+
}, [(P = m.cascadeConfig) == null ? void 0 : P.map((V) => v(V))])])]);
|
|
825
837
|
}
|
|
826
838
|
q(() => e.category, () => {
|
|
827
839
|
r.value = e.category;
|
|
828
840
|
});
|
|
829
|
-
function
|
|
830
|
-
return m.propertyType === "cascade" ? i :
|
|
841
|
+
function F(m) {
|
|
842
|
+
return m.propertyType === "cascade" ? i : v;
|
|
831
843
|
}
|
|
832
|
-
return () => a(pe, null, [r.value.properties.map((m) =>
|
|
844
|
+
return () => a(pe, null, [r.value.properties.map((m) => F(m)(m))]);
|
|
833
845
|
}
|
|
834
|
-
}), ce = /* @__PURE__ */
|
|
846
|
+
}), ce = /* @__PURE__ */ H({
|
|
835
847
|
name: "FPropertyPanel",
|
|
836
848
|
props: Xt,
|
|
837
849
|
emits: ["propertyChanged"],
|
|
838
850
|
setup(e, t) {
|
|
839
|
-
const r = k(e.width), n = k(e.isWidePanel), o = k(e.enableSearch),
|
|
851
|
+
const r = k(e.width), n = k(e.isWidePanel), o = k(e.enableSearch), f = k(e.mode), h = k(e.isPersitOpenState), S = k(e.isShowPanel), C = k(), l = k(), v = k(e.showCloseBtn), i = k(e.selectedTabId), F = k(!0), m = k(e.isWhiteTheme);
|
|
840
852
|
let P = [], V = [];
|
|
841
853
|
const E = k(""), L = k(), j = k(), $ = Ae("SchemaService");
|
|
842
854
|
let D = [], w = null, I = "";
|
|
843
|
-
const
|
|
855
|
+
const x = k(), M = k(0);
|
|
844
856
|
function U() {
|
|
845
|
-
V = [],
|
|
846
|
-
if (
|
|
847
|
-
const
|
|
848
|
-
N.category =
|
|
849
|
-
}),
|
|
850
|
-
V = V.concat(
|
|
857
|
+
V = [], x.value && x.value.categoryList && Array.isArray(x.value.categoryList) && x.value.categoryList.length > 0 && x.value.categoryList.forEach((b) => {
|
|
858
|
+
if (b.properties && Array.isArray(b.properties) && b.properties.length > 0) {
|
|
859
|
+
const g = b.properties.map((T) => (T.category = b, T.propertyType === "cascade" && T.cascadeConfig && T.cascadeConfig.map((N) => {
|
|
860
|
+
N.category = b, N.cascadeParent = T, V = V.concat(N);
|
|
861
|
+
}), T));
|
|
862
|
+
V = V.concat(g);
|
|
851
863
|
}
|
|
852
864
|
});
|
|
853
865
|
}
|
|
854
|
-
function R(
|
|
855
|
-
let
|
|
856
|
-
for (;
|
|
857
|
-
|
|
858
|
-
return
|
|
866
|
+
function R(y) {
|
|
867
|
+
let b = y.offsetTop, g = y.offsetParent;
|
|
868
|
+
for (; g !== null; )
|
|
869
|
+
b += g.offsetTop, g = g.offsetParent;
|
|
870
|
+
return b;
|
|
859
871
|
}
|
|
860
|
-
function O(
|
|
861
|
-
|
|
872
|
+
function O(y, b) {
|
|
873
|
+
y && b && Object.keys(b).length > 0 && Object.keys(b).forEach((g) => {
|
|
862
874
|
var N;
|
|
863
|
-
const
|
|
864
|
-
(N =
|
|
875
|
+
const T = b[g];
|
|
876
|
+
(N = y.style) == null || N.setProperty(g, T);
|
|
865
877
|
});
|
|
866
878
|
}
|
|
867
|
-
function
|
|
868
|
-
return V.filter((
|
|
869
|
-
const
|
|
870
|
-
return
|
|
879
|
+
function W() {
|
|
880
|
+
return V.filter((b) => {
|
|
881
|
+
const g = b.propertyID.toLowerCase(), T = b.propertyName.toLowerCase();
|
|
882
|
+
return b.visible ? !!(g && g.includes(E.value) || T && T.includes(E.value)) : !1;
|
|
871
883
|
});
|
|
872
884
|
}
|
|
873
|
-
function X(
|
|
874
|
-
if (
|
|
875
|
-
const
|
|
876
|
-
|
|
885
|
+
function X(y, b, g) {
|
|
886
|
+
if (y === 0) {
|
|
887
|
+
const T = R(b), Z = R(g) - T - 5;
|
|
888
|
+
b == null || b.scroll({
|
|
877
889
|
top: Z,
|
|
878
890
|
behavior: "smooth"
|
|
879
891
|
});
|
|
880
892
|
}
|
|
881
893
|
}
|
|
882
|
-
function
|
|
883
|
-
D && D.length > 0 && (D.forEach((
|
|
884
|
-
|
|
885
|
-
}), D = []), E.value = (
|
|
886
|
-
const
|
|
894
|
+
function Q(y) {
|
|
895
|
+
D && D.length > 0 && (D.forEach((g) => {
|
|
896
|
+
g.style.cssText = "";
|
|
897
|
+
}), D = []), E.value = (y || "").toLowerCase();
|
|
898
|
+
const b = document.querySelector(".panel-body");
|
|
887
899
|
if (!E.value)
|
|
888
|
-
L.value &&
|
|
900
|
+
L.value && b && (b.scrollTop = 0);
|
|
889
901
|
else if (U(), V && V.length > 0) {
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const Z =
|
|
895
|
-
|
|
902
|
+
const g = W();
|
|
903
|
+
g && g.length > 0 && setTimeout(() => {
|
|
904
|
+
g.forEach((T, N) => {
|
|
905
|
+
T.category.status = "open", T.cascadeParent && (T.cascadeParent.isExpand = !0);
|
|
906
|
+
const Z = T.propertyType === "cascade" ? `.${T.category.categoryId}-${T.propertyID} .farris-label-text` : `.property-item .${T.category.categoryId}-${T.propertyID}.col-form-label`, J = document.querySelector(Z);
|
|
907
|
+
J && (X(N, b, J), O(J, {
|
|
896
908
|
color: "#5B89FE"
|
|
897
|
-
}), D.push(
|
|
909
|
+
}), D.push(J));
|
|
898
910
|
});
|
|
899
911
|
}, 50);
|
|
900
912
|
}
|
|
901
913
|
}
|
|
902
|
-
function
|
|
903
|
-
|
|
914
|
+
function z(y) {
|
|
915
|
+
Q(y);
|
|
904
916
|
}
|
|
905
|
-
function he(
|
|
917
|
+
function he(y) {
|
|
906
918
|
const {
|
|
907
|
-
value:
|
|
908
|
-
} =
|
|
909
|
-
|
|
919
|
+
value: b
|
|
920
|
+
} = y.target;
|
|
921
|
+
y.key === "Enter" && z(b);
|
|
910
922
|
}
|
|
911
|
-
function be(
|
|
923
|
+
function be(y) {
|
|
912
924
|
const {
|
|
913
|
-
value:
|
|
914
|
-
} =
|
|
915
|
-
|
|
925
|
+
value: b
|
|
926
|
+
} = y.target;
|
|
927
|
+
z(b);
|
|
916
928
|
}
|
|
917
929
|
function Fe() {
|
|
918
|
-
h.value || (
|
|
930
|
+
h.value || (F.value = !1), t.emit("closePropertyPanel");
|
|
919
931
|
}
|
|
920
|
-
function Y(
|
|
921
|
-
E.value = "",
|
|
932
|
+
function Y(y) {
|
|
933
|
+
E.value = "", Q();
|
|
922
934
|
}
|
|
923
|
-
function Ce(
|
|
924
|
-
!
|
|
935
|
+
function Ce(y) {
|
|
936
|
+
!y.status || y.status === "open" ? y.status = "closed" : y.status = "open";
|
|
925
937
|
}
|
|
926
|
-
function
|
|
927
|
-
var
|
|
938
|
+
function _() {
|
|
939
|
+
var y, b;
|
|
928
940
|
if (P = [], !C.value || C.value.length === 0) {
|
|
929
941
|
P = [{
|
|
930
942
|
tabId: "default",
|
|
931
943
|
tabName: "属性",
|
|
932
944
|
categoryList: []
|
|
933
|
-
}],
|
|
945
|
+
}], x.value = null;
|
|
934
946
|
return;
|
|
935
947
|
}
|
|
936
|
-
if ((
|
|
937
|
-
if (
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
tabId:
|
|
941
|
-
tabName:
|
|
942
|
-
categoryList: [
|
|
943
|
-
hide:
|
|
948
|
+
if ((y = C == null ? void 0 : C.value) == null || y.forEach((g) => {
|
|
949
|
+
if (g.tabId) {
|
|
950
|
+
const T = P.find((N) => N.tabId === g.tabId);
|
|
951
|
+
T ? (T.categoryList.push(g), T.hide && (T.hide = g.hide || g.properties.length === 0)) : P.push({
|
|
952
|
+
tabId: g.tabId,
|
|
953
|
+
tabName: g.tabName,
|
|
954
|
+
categoryList: [g],
|
|
955
|
+
hide: g.hide || g.properties.length === 0
|
|
944
956
|
});
|
|
945
957
|
} else {
|
|
946
|
-
const
|
|
947
|
-
|
|
958
|
+
const T = P.find((N) => N.tabId === "default");
|
|
959
|
+
T ? T.categoryList.push(g) : P.push({
|
|
948
960
|
tabId: "default",
|
|
949
961
|
tabName: "属性",
|
|
950
|
-
categoryList: [
|
|
962
|
+
categoryList: [g]
|
|
951
963
|
});
|
|
952
964
|
}
|
|
953
965
|
}), i.value) {
|
|
954
|
-
const
|
|
955
|
-
|
|
966
|
+
const g = P == null ? void 0 : P.find((T) => T.tabId === i.value && !T.hide);
|
|
967
|
+
x.value = g || P[0];
|
|
956
968
|
} else
|
|
957
|
-
|
|
958
|
-
i.value = (
|
|
969
|
+
x.value = P[0];
|
|
970
|
+
i.value = (b = x.value) == null ? void 0 : b.tabId;
|
|
959
971
|
}
|
|
960
972
|
q(() => [e.schema, e.isShowPanel], () => {
|
|
961
|
-
|
|
973
|
+
l.value = e.schema, !e.schema || !e.schema.type ? C.value = [] : C.value = K(l.value, $, w, I), _(), Y(E.value), M.value++;
|
|
962
974
|
}), ae(() => {
|
|
963
|
-
|
|
975
|
+
_();
|
|
964
976
|
});
|
|
965
|
-
function Pe(
|
|
966
|
-
(!
|
|
977
|
+
function Pe(y, b) {
|
|
978
|
+
(!l.value || b) && (l.value = b || e.schema), C.value = K(l.value, $, w, I, y), _(), Y(E.value), M.value++;
|
|
967
979
|
}
|
|
968
|
-
function ke(
|
|
969
|
-
w =
|
|
980
|
+
function ke(y, b) {
|
|
981
|
+
w = y, I = b;
|
|
970
982
|
}
|
|
971
983
|
function ie() {
|
|
972
|
-
|
|
973
|
-
|
|
984
|
+
f.value = f.value === "panel" ? "sidebar" : "panel", f.value === "panel" ? (setTimeout(() => {
|
|
985
|
+
z();
|
|
974
986
|
}, 100), r.value = "300px") : r.value = "41px";
|
|
975
987
|
}
|
|
976
988
|
function Se() {
|
|
977
|
-
if (
|
|
989
|
+
if (v.value)
|
|
978
990
|
return a("div", {
|
|
979
991
|
class: "title-actions"
|
|
980
992
|
}, [a("div", {
|
|
@@ -991,12 +1003,12 @@ const jr = /* @__PURE__ */ _({
|
|
|
991
1003
|
class: "f-icon f-icon-close"
|
|
992
1004
|
}, null)])])])])]);
|
|
993
1005
|
}
|
|
994
|
-
function xe() {
|
|
995
|
-
C.value = K(p.value, $, w, I), z();
|
|
996
|
-
}
|
|
997
1006
|
function Te() {
|
|
998
|
-
|
|
999
|
-
|
|
1007
|
+
C.value = K(l.value, $, w, I), _();
|
|
1008
|
+
}
|
|
1009
|
+
function xe() {
|
|
1010
|
+
var y;
|
|
1011
|
+
if (o.value && ((y = x.value) == null ? void 0 : y.tabId) !== "commands")
|
|
1000
1012
|
return a("div", {
|
|
1001
1013
|
class: "search"
|
|
1002
1014
|
}, [a("div", {
|
|
@@ -1006,7 +1018,7 @@ const jr = /* @__PURE__ */ _({
|
|
|
1006
1018
|
type: "text",
|
|
1007
1019
|
placeholder: "输入属性名称或编号快速定位",
|
|
1008
1020
|
autocomplete: "off",
|
|
1009
|
-
onKeyup: (
|
|
1021
|
+
onKeyup: (b) => he(b),
|
|
1010
1022
|
value: E.value
|
|
1011
1023
|
}, null), a("div", {
|
|
1012
1024
|
class: "input-group-append",
|
|
@@ -1016,28 +1028,28 @@ const jr = /* @__PURE__ */ _({
|
|
|
1016
1028
|
style: [{
|
|
1017
1029
|
display: E.value && E.value.length > 0 ? "" : "none"
|
|
1018
1030
|
}],
|
|
1019
|
-
onClick: (
|
|
1031
|
+
onClick: (b) => Y()
|
|
1020
1032
|
}, [a("i", {
|
|
1021
1033
|
class: "f-icon modal_close"
|
|
1022
1034
|
}, null)]), a("span", {
|
|
1023
1035
|
class: "input-group-text input-group-clear",
|
|
1024
|
-
onClick: (
|
|
1036
|
+
onClick: (b) => be(b)
|
|
1025
1037
|
}, [a("i", {
|
|
1026
1038
|
class: "f-icon f-icon-search"
|
|
1027
1039
|
}, null)])])])]);
|
|
1028
1040
|
}
|
|
1029
|
-
function we(
|
|
1030
|
-
return `${e.propertyName}_${
|
|
1041
|
+
function we(y) {
|
|
1042
|
+
return `${e.propertyName}_${y.categoryId}`;
|
|
1031
1043
|
}
|
|
1032
|
-
function Ee(
|
|
1044
|
+
function Ee(y) {
|
|
1033
1045
|
t.emit("propertyChanged", {
|
|
1034
|
-
...
|
|
1046
|
+
...y,
|
|
1035
1047
|
designerItem: w
|
|
1036
1048
|
});
|
|
1037
1049
|
}
|
|
1038
1050
|
function Ve() {
|
|
1039
|
-
var
|
|
1040
|
-
if (
|
|
1051
|
+
var y, b;
|
|
1052
|
+
if (x.value)
|
|
1041
1053
|
return a("div", {
|
|
1042
1054
|
class: "panel-body",
|
|
1043
1055
|
ref: j
|
|
@@ -1045,30 +1057,30 @@ const jr = /* @__PURE__ */ _({
|
|
|
1045
1057
|
class: ["property-grid", {
|
|
1046
1058
|
"wide-panel": n.value
|
|
1047
1059
|
}]
|
|
1048
|
-
}, [(
|
|
1049
|
-
key: we(
|
|
1050
|
-
"data-category-id":
|
|
1051
|
-
}, [!
|
|
1060
|
+
}, [(b = (y = x.value) == null ? void 0 : y.categoryList) == null ? void 0 : b.map((g) => a("li", {
|
|
1061
|
+
key: we(g),
|
|
1062
|
+
"data-category-id": g == null ? void 0 : g.categoryId
|
|
1063
|
+
}, [!g.hide && !g.hideTitle && a("span", {
|
|
1052
1064
|
class: "group-label",
|
|
1053
|
-
onClick: () => Ce(
|
|
1065
|
+
onClick: () => Ce(g)
|
|
1054
1066
|
}, [a("span", {
|
|
1055
1067
|
class: ["f-icon mr-2", {
|
|
1056
|
-
"f-legend-show":
|
|
1068
|
+
"f-legend-show": g.status === "closed"
|
|
1057
1069
|
}, {
|
|
1058
|
-
"f-legend-collapse":
|
|
1070
|
+
"f-legend-collapse": g.status === "open" || g.status === void 0
|
|
1059
1071
|
}]
|
|
1060
|
-
}, null),
|
|
1061
|
-
hidden:
|
|
1072
|
+
}, null), g.categoryName]), a("div", {
|
|
1073
|
+
hidden: g.status === "closed"
|
|
1062
1074
|
}, [a(Rr, {
|
|
1063
|
-
key: `${
|
|
1064
|
-
category:
|
|
1065
|
-
propertyData:
|
|
1066
|
-
onTriggerRefreshPanel:
|
|
1075
|
+
key: `${g == null ? void 0 : g.categoryId}-${M.value}`,
|
|
1076
|
+
category: g,
|
|
1077
|
+
propertyData: l.value,
|
|
1078
|
+
onTriggerRefreshPanel: Te,
|
|
1067
1079
|
onValueChanged: Ee
|
|
1068
1080
|
}, null)])]))])]);
|
|
1069
1081
|
}
|
|
1070
1082
|
function Be() {
|
|
1071
|
-
if (
|
|
1083
|
+
if (f.value === "sidebar")
|
|
1072
1084
|
return a("div", {
|
|
1073
1085
|
class: "side-panel h-100",
|
|
1074
1086
|
onClick: ie
|
|
@@ -1078,7 +1090,7 @@ const jr = /* @__PURE__ */ _({
|
|
|
1078
1090
|
}
|
|
1079
1091
|
function Ie() {
|
|
1080
1092
|
return {
|
|
1081
|
-
display:
|
|
1093
|
+
display: F.value ? "block" : "none",
|
|
1082
1094
|
width: r.value
|
|
1083
1095
|
};
|
|
1084
1096
|
}
|
|
@@ -1088,28 +1100,28 @@ const jr = /* @__PURE__ */ _({
|
|
|
1088
1100
|
}, [a("i", {
|
|
1089
1101
|
class: "f-icon f-icon-exhale-discount",
|
|
1090
1102
|
style: [{
|
|
1091
|
-
transform:
|
|
1103
|
+
transform: f.value === "sidebar" ? "none" : "rotate(180deg)"
|
|
1092
1104
|
}],
|
|
1093
1105
|
onClick: ie
|
|
1094
1106
|
}, null)]);
|
|
1095
1107
|
}
|
|
1096
|
-
function Oe(
|
|
1097
|
-
|
|
1108
|
+
function Oe(y) {
|
|
1109
|
+
x.value = y, i.value = x.value.tabId, E.value = "";
|
|
1098
1110
|
}
|
|
1099
1111
|
function Le() {
|
|
1100
|
-
return P.map((
|
|
1112
|
+
return P.map((y) => a("div", {
|
|
1101
1113
|
class: ["title-label", {
|
|
1102
|
-
active:
|
|
1114
|
+
active: x.value && x.value.tabId === y.tabId
|
|
1103
1115
|
}, {
|
|
1104
|
-
hidden:
|
|
1116
|
+
hidden: y.hide
|
|
1105
1117
|
}],
|
|
1106
|
-
onClick: () => Oe(
|
|
1107
|
-
}, [a("span", null, [
|
|
1118
|
+
onClick: () => Oe(y)
|
|
1119
|
+
}, [a("span", null, [y.tabName])]));
|
|
1108
1120
|
}
|
|
1109
1121
|
ae(() => {
|
|
1110
|
-
|
|
1122
|
+
z(E.value);
|
|
1111
1123
|
}), Ge(() => {
|
|
1112
|
-
h.value && (
|
|
1124
|
+
h.value && (F.value = S.value), _(), z(E.value);
|
|
1113
1125
|
});
|
|
1114
1126
|
function De() {
|
|
1115
1127
|
M.value++;
|
|
@@ -1126,14 +1138,14 @@ const jr = /* @__PURE__ */ _({
|
|
|
1126
1138
|
style: Ie()
|
|
1127
1139
|
}, [a("div", {
|
|
1128
1140
|
class: "propertyPanel panel flex-column",
|
|
1129
|
-
hidden:
|
|
1141
|
+
hidden: f.value !== "panel"
|
|
1130
1142
|
}, [a("div", {
|
|
1131
1143
|
class: ["title d-flex", {
|
|
1132
|
-
"p-right":
|
|
1144
|
+
"p-right": v.value
|
|
1133
1145
|
}, {
|
|
1134
1146
|
only: P.length === 1
|
|
1135
1147
|
}]
|
|
1136
|
-
}, [Le(), Se()]),
|
|
1148
|
+
}, [Le(), Se()]), xe(), Ve()]), Ne(), Be()])]);
|
|
1137
1149
|
}
|
|
1138
1150
|
});
|
|
1139
1151
|
class Zn {
|
|
@@ -1166,7 +1178,7 @@ class Zn {
|
|
|
1166
1178
|
if (r) {
|
|
1167
1179
|
if (!this.designViewModelField) {
|
|
1168
1180
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1169
|
-
this.designViewModelField = o.fields.find((
|
|
1181
|
+
this.designViewModelField = o.fields.find((f) => f.id === r);
|
|
1170
1182
|
}
|
|
1171
1183
|
t.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
1172
1184
|
}
|
|
@@ -1191,7 +1203,7 @@ class Zn {
|
|
|
1191
1203
|
textField: "name",
|
|
1192
1204
|
valueField: "value",
|
|
1193
1205
|
editable: !1,
|
|
1194
|
-
data: [{ value: t.type, name:
|
|
1206
|
+
data: [{ value: t.type, name: p[t.type].name }]
|
|
1195
1207
|
}
|
|
1196
1208
|
}
|
|
1197
1209
|
}
|
|
@@ -1227,8 +1239,8 @@ class Zn {
|
|
|
1227
1239
|
const n = r && r.parent && r.parent.schema;
|
|
1228
1240
|
if (!n)
|
|
1229
1241
|
return;
|
|
1230
|
-
const o = n.contents.findIndex((h) => h.id === t),
|
|
1231
|
-
n.contents.splice(o, 1), n.contents.splice(o, 0,
|
|
1242
|
+
const o = n.contents.findIndex((h) => h.id === t), f = me(n.contents[o]);
|
|
1243
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, f);
|
|
1232
1244
|
}
|
|
1233
1245
|
}
|
|
1234
1246
|
const A = class A {
|
|
@@ -1261,15 +1273,15 @@ const A = class A {
|
|
|
1261
1273
|
return [];
|
|
1262
1274
|
const n = [];
|
|
1263
1275
|
switch (n.push({ domField: "editor.required", schemaField: "require" }), n.push({ domField: "editor.readonly", schemaField: "readonly" }), r) {
|
|
1264
|
-
case
|
|
1265
|
-
case
|
|
1276
|
+
case p["data-grid-column"].type:
|
|
1277
|
+
case p["tree-grid-column"].type: {
|
|
1266
1278
|
n.push({ domField: "title", schemaField: "name" });
|
|
1267
1279
|
break;
|
|
1268
1280
|
}
|
|
1269
1281
|
default:
|
|
1270
1282
|
n.push({ domField: "label", schemaField: "name" });
|
|
1271
1283
|
}
|
|
1272
|
-
return (r ===
|
|
1284
|
+
return (r === p["input-group"].type || r === p.textarea.type || r === p["number-spinner"].type) && n.push({ domField: "editor.maxLength", schemaField: "type.length" }), r === p["number-spinner"].type && n.push({ domField: "editor.precision", schemaField: "type.precision" }), (r === p["combo-list"].type || r === p["radio-group"].type) && n.push({ domField: "editor.data", schemaField: "type.enumValues" }), r === p["date-picker"].type && (n.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), n.push({ domField: "editor.fieldType", schemaField: "type.name" })), r === p["number-spinner"].type && (n.push({ domField: "editor.max", schemaField: "editor.maxValue" }), n.push({ domField: "editor.min", schemaField: "editor.minValue" })), r === p.lookup.type && (n.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), n.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), n.push({ domField: "editor.textField", schemaField: "editor.textField" }), n.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), n.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), n.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), n.push({ domField: "path", schemaField: "bindingPath" }), n.push({ domField: "binding.path", schemaField: "bindingField" }), n.push({ domField: "binding.fullPath", schemaField: "path" }), (r === p["data-grid-column"].type || r === p["tree-grid-column"].type) && n.push({ domField: "field", schemaField: "bindingPath" }), n;
|
|
1273
1285
|
}
|
|
1274
1286
|
};
|
|
1275
1287
|
/**
|
|
@@ -1277,48 +1289,48 @@ const A = class A {
|
|
|
1277
1289
|
*/
|
|
1278
1290
|
B(A, "fieldControlTypeMapping", {
|
|
1279
1291
|
String: [
|
|
1280
|
-
{ key:
|
|
1281
|
-
{ key:
|
|
1282
|
-
{ key:
|
|
1283
|
-
{ key:
|
|
1284
|
-
{ key:
|
|
1285
|
-
{ key:
|
|
1286
|
-
{ key:
|
|
1292
|
+
{ key: p["input-group"].type, value: p["input-group"].name },
|
|
1293
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
1294
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name },
|
|
1295
|
+
{ key: p["check-group"].type, value: p["check-group"].name },
|
|
1296
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name },
|
|
1297
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
1298
|
+
{ key: p.textarea.type, value: p.textarea.name }
|
|
1287
1299
|
],
|
|
1288
1300
|
Text: [
|
|
1289
|
-
{ key:
|
|
1290
|
-
{ key:
|
|
1301
|
+
{ key: p.textarea.type, value: p.textarea.name },
|
|
1302
|
+
{ key: p.lookup.type, value: p.lookup.name }
|
|
1291
1303
|
],
|
|
1292
1304
|
Decimal: [
|
|
1293
|
-
{ key:
|
|
1305
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
1294
1306
|
],
|
|
1295
1307
|
Integer: [
|
|
1296
|
-
{ key:
|
|
1308
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
1297
1309
|
],
|
|
1298
1310
|
Number: [
|
|
1299
|
-
{ key:
|
|
1311
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
1300
1312
|
],
|
|
1301
1313
|
BigNumber: [
|
|
1302
|
-
{ key:
|
|
1314
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
1303
1315
|
],
|
|
1304
1316
|
Date: [
|
|
1305
|
-
{ key:
|
|
1317
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
1306
1318
|
],
|
|
1307
1319
|
DateTime: [
|
|
1308
|
-
{ key:
|
|
1320
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
1309
1321
|
],
|
|
1310
1322
|
Boolean: [
|
|
1311
|
-
{ key:
|
|
1312
|
-
{ key:
|
|
1323
|
+
{ key: p.switch.type, value: p.switch.name },
|
|
1324
|
+
{ key: p["check-box"].type, value: p["check-box"].name }
|
|
1313
1325
|
],
|
|
1314
1326
|
Enum: [
|
|
1315
|
-
{ key:
|
|
1316
|
-
{ key:
|
|
1327
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
1328
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
1317
1329
|
],
|
|
1318
1330
|
Object: [
|
|
1319
|
-
{ key:
|
|
1320
|
-
{ key:
|
|
1321
|
-
{ key:
|
|
1331
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
1332
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
1333
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
1322
1334
|
]
|
|
1323
1335
|
});
|
|
1324
1336
|
let ue = A;
|