@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.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 +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveAppearance as te, createPropsResolver as J } from "../../components/dynamic-resolver/index.esm.js";
|
|
2
|
-
import { getCustomStyle as ke, getMaxZIndex as
|
|
3
|
-
import { ref as
|
|
4
|
-
import
|
|
2
|
+
import { getCustomStyle as ke, getMaxZIndex as Fe, withInstall as xe } from "../../components/common/index.esm.js";
|
|
3
|
+
import { ref as O, computed as D, defineComponent as re, watch as _, watchEffect as Pe, createVNode as p, Teleport as $e, Transition as Z, withModifiers as W, withDirectives as Re, vShow as De, Fragment as oe, nextTick as Oe, inject as G, onMounted as Me } from "vue";
|
|
4
|
+
import Ee, { responseToolbarProps as je } from "../../components/response-toolbar/index.esm.js";
|
|
5
5
|
import { isPlainObject as Y, cloneDeep as K } from "lodash-es";
|
|
6
6
|
import { LocaleService as ee } from "../../components/locale/index.esm.js";
|
|
7
7
|
import { UseTemplateDragAndDropRules as Ie, DgControl as Be, useDragulaCommonRule as He, setPositionOfButtonGroup as Ne, useDesignerComponent as ze, FDesignerInnerItem as Le } from "../../components/designer-canvas/index.esm.js";
|
|
@@ -226,39 +226,39 @@ function le(e, t, r) {
|
|
|
226
226
|
function ce(e, t) {
|
|
227
227
|
let r;
|
|
228
228
|
function o(s) {
|
|
229
|
-
const { properties: c, title:
|
|
230
|
-
if (
|
|
231
|
-
const u =
|
|
229
|
+
const { properties: c, title: b, ignore: i } = s, n = i && Array.isArray(i), l = Object.keys(c).reduce((u, h) => ((!n || !i.find((k) => k === h)) && (u[h] = c[h].type === "object" && c[h].properties ? o(c[h]) : K(c[h].default)), u), {});
|
|
230
|
+
if (b && (!n || !i.find((u) => u === "id"))) {
|
|
231
|
+
const u = b.toLowerCase().replace(/-/g, "_");
|
|
232
232
|
l.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
233
233
|
}
|
|
234
234
|
return l;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
const { properties: c, title:
|
|
236
|
+
function g(s) {
|
|
237
|
+
const { properties: c, title: b, required: i } = s;
|
|
238
238
|
if (i && Array.isArray(i)) {
|
|
239
239
|
const n = i.reduce((l, u) => (l[u] = c[u].type === "object" && c[u].properties ? o(c[u]) : K(c[u].default), l), {});
|
|
240
|
-
if (
|
|
241
|
-
const l =
|
|
240
|
+
if (b && i.find((l) => l === "id")) {
|
|
241
|
+
const l = b.toLowerCase().replace(/-/g, "_");
|
|
242
242
|
n.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
243
243
|
}
|
|
244
244
|
return n;
|
|
245
245
|
}
|
|
246
246
|
return {
|
|
247
|
-
type:
|
|
247
|
+
type: b
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
function S(s, c = {},
|
|
250
|
+
function S(s, c = {}, b) {
|
|
251
251
|
const i = e[s];
|
|
252
252
|
if (i) {
|
|
253
|
-
let n =
|
|
253
|
+
let n = g(i);
|
|
254
254
|
const l = t[s];
|
|
255
|
-
return n = l ? l({ getSchemaByType: S }, n, c,
|
|
255
|
+
return n = l ? l({ getSchemaByType: S }, n, c, b) : n, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(n), n;
|
|
256
256
|
}
|
|
257
257
|
return null;
|
|
258
258
|
}
|
|
259
259
|
function T(s, c) {
|
|
260
|
-
const
|
|
261
|
-
return Object.keys(
|
|
260
|
+
const b = o(c);
|
|
261
|
+
return Object.keys(b).reduce((i, n) => (Object.prototype.hasOwnProperty.call(s, n) && (i[n] && Y(i[n]) && Y(s[n] || !s[n]) ? Object.assign(i[n], s[n] || {}) : i[n] = s[n]), i), b), b;
|
|
262
262
|
}
|
|
263
263
|
function m(s, c) {
|
|
264
264
|
return Object.keys(s).filter((i) => s[i] != null).reduce((i, n) => {
|
|
@@ -275,18 +275,18 @@ function ce(e, t) {
|
|
|
275
275
|
return i;
|
|
276
276
|
}, {});
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function F(s, c, b = /* @__PURE__ */ new Map()) {
|
|
279
279
|
const i = T(s, c);
|
|
280
|
-
return m(i,
|
|
280
|
+
return m(i, b);
|
|
281
281
|
}
|
|
282
282
|
function f(s) {
|
|
283
|
-
var
|
|
283
|
+
var b;
|
|
284
284
|
const c = s.type;
|
|
285
285
|
if (c) {
|
|
286
286
|
const i = e[c];
|
|
287
287
|
if (!i)
|
|
288
288
|
return s;
|
|
289
|
-
const n = T(s, i), l = ((
|
|
289
|
+
const n = T(s, i), l = ((b = s.editor) == null ? void 0 : b.type) || "";
|
|
290
290
|
if (l) {
|
|
291
291
|
const u = e[l], h = T(s.editor, u);
|
|
292
292
|
n.editor = h;
|
|
@@ -298,7 +298,7 @@ function ce(e, t) {
|
|
|
298
298
|
function v(s) {
|
|
299
299
|
r = s;
|
|
300
300
|
}
|
|
301
|
-
return { getSchemaByType: S, resolveSchemaWithDefaultValue: f, resolveSchemaToProps:
|
|
301
|
+
return { getSchemaByType: S, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: F, mappingSchemaToProps: m, setDesignerContext: v };
|
|
302
302
|
}
|
|
303
303
|
const ue = {}, de = {}, { resolveSchemaWithDefaultValue: et, resolveSchemaToProps: tt, mappingSchemaToProps: rt } = ce(ue, de);
|
|
304
304
|
function ot(e = {}) {
|
|
@@ -306,12 +306,12 @@ function ot(e = {}) {
|
|
|
306
306
|
if (typeof s == "number")
|
|
307
307
|
return c[f].length === s;
|
|
308
308
|
if (typeof s == "object") {
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
309
|
+
const b = Object.keys(s)[0], i = s[b];
|
|
310
|
+
if (b === "not")
|
|
311
311
|
return Number(c[f].length) !== Number(i);
|
|
312
|
-
if (
|
|
312
|
+
if (b === "moreThan")
|
|
313
313
|
return Number(c[f].length) >= Number(i);
|
|
314
|
-
if (
|
|
314
|
+
if (b === "lessThan")
|
|
315
315
|
return Number(c[f].length) <= Number(i);
|
|
316
316
|
}
|
|
317
317
|
return !1;
|
|
@@ -324,19 +324,19 @@ function ot(e = {}) {
|
|
|
324
324
|
["getProperty", r]
|
|
325
325
|
]);
|
|
326
326
|
Object.keys(e).reduce((f, v) => (f.set(v, e[v]), f), o);
|
|
327
|
-
function
|
|
327
|
+
function g(f, v) {
|
|
328
328
|
const s = f;
|
|
329
329
|
return typeof v == "number" ? [{ target: s, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: s, operator: "getProperty", param: f, value: !!v }] : typeof v == "object" ? Object.keys(v).map((c) => {
|
|
330
330
|
if (c === "length")
|
|
331
331
|
return { target: s, operator: "length", param: null, value: v[c] };
|
|
332
|
-
const
|
|
333
|
-
return { target: s, operator: "getProperty", param:
|
|
332
|
+
const b = c, i = v[c];
|
|
333
|
+
return { target: s, operator: "getProperty", param: b, value: i };
|
|
334
334
|
}) : [];
|
|
335
335
|
}
|
|
336
336
|
function S(f) {
|
|
337
337
|
return Object.keys(f).reduce((s, c) => {
|
|
338
|
-
const
|
|
339
|
-
return s.push(...
|
|
338
|
+
const b = g(c, f[c]);
|
|
339
|
+
return s.push(...b), s;
|
|
340
340
|
}, []);
|
|
341
341
|
}
|
|
342
342
|
function T(f, v) {
|
|
@@ -347,13 +347,13 @@ function ot(e = {}) {
|
|
|
347
347
|
return !1;
|
|
348
348
|
}
|
|
349
349
|
function m(f, v) {
|
|
350
|
-
return S(f).reduce((
|
|
350
|
+
return S(f).reduce((b, i) => b && T(i, v), !0);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
const s = Object.keys(f), c = s.includes("allOf"),
|
|
352
|
+
function F(f, v) {
|
|
353
|
+
const s = Object.keys(f), c = s.includes("allOf"), b = s.includes("anyOf"), i = c || b, u = (i ? f[i ? c ? "allOf" : "anyOf" : "allOf"] : [f]).map((k) => m(k, v));
|
|
354
354
|
return c ? !u.includes(!1) : u.includes(!0);
|
|
355
355
|
}
|
|
356
|
-
return { parseValueSchema:
|
|
356
|
+
return { parseValueSchema: F };
|
|
357
357
|
}
|
|
358
358
|
const nt = {
|
|
359
359
|
convertTo: (e, t, r, o) => {
|
|
@@ -413,10 +413,12 @@ const nt = {
|
|
|
413
413
|
drawer: { type: "drawer", name: "抽屉" },
|
|
414
414
|
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
415
415
|
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
416
|
+
nav: { type: "nav", name: "标签类导航" },
|
|
416
417
|
"list-view": { type: "list-view", name: "列表" },
|
|
417
418
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
418
419
|
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
419
420
|
image: { type: "image", name: "图像" },
|
|
421
|
+
avatar: { type: "avatar", name: "头像" },
|
|
420
422
|
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
421
423
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
422
424
|
comment: { type: "comment", name: "评论区" },
|
|
@@ -424,12 +426,13 @@ const nt = {
|
|
|
424
426
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" },
|
|
425
427
|
wizard: { type: "wizard", name: "向导", icon: "wizard" },
|
|
426
428
|
"wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
|
|
427
|
-
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" }
|
|
429
|
+
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
|
|
430
|
+
step: { type: "step", name: "步骤条", icon: "step" }
|
|
428
431
|
}, lt = {
|
|
429
432
|
convertFrom: (e, t, r) => {
|
|
430
|
-
var
|
|
433
|
+
var g;
|
|
431
434
|
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
432
|
-
return ((
|
|
435
|
+
return ((g = st[o]) == null ? void 0 : g.name) || o;
|
|
433
436
|
}
|
|
434
437
|
}, ct = {
|
|
435
438
|
convertTo: (e, t, r, o) => {
|
|
@@ -515,10 +518,10 @@ const nt = {
|
|
|
515
518
|
]), t === "enableType" && r === "unable" && (e.command.enable = !1);
|
|
516
519
|
},
|
|
517
520
|
convertFrom: (e, t, r) => {
|
|
518
|
-
var o,
|
|
521
|
+
var o, g;
|
|
519
522
|
if (e.command) {
|
|
520
523
|
if (t === "enableType") {
|
|
521
|
-
const S = (
|
|
524
|
+
const S = (g = (o = e.command) == null ? void 0 : o.commands) == null ? void 0 : g.find((T) => T.command === "edit" && T.type === "primary");
|
|
522
525
|
return e.command.enable ? S ? "default" : "custom" : "unable";
|
|
523
526
|
}
|
|
524
527
|
if (t === "commands")
|
|
@@ -599,8 +602,8 @@ const nt = {
|
|
|
599
602
|
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
600
603
|
},
|
|
601
604
|
convertFrom: (e, t, r) => {
|
|
602
|
-
var o,
|
|
603
|
-
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (
|
|
605
|
+
var o, g;
|
|
606
|
+
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (g = e.selection) == null ? void 0 : g.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
604
607
|
}
|
|
605
608
|
}, ht = {
|
|
606
609
|
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -616,19 +619,19 @@ const nt = {
|
|
|
616
619
|
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
617
620
|
}, Tt = {
|
|
618
621
|
convertFrom: (e, t, r) => {
|
|
619
|
-
var o,
|
|
620
|
-
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
622
|
+
var o, g;
|
|
623
|
+
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (g = e.formatter) == null ? void 0 : g.data : e.formatterEnumData;
|
|
621
624
|
}
|
|
622
625
|
}, St = {
|
|
623
626
|
convertTo: (e, t, r, o) => {
|
|
624
627
|
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
625
628
|
},
|
|
626
629
|
convertFrom: (e, t, r) => {
|
|
627
|
-
var o,
|
|
630
|
+
var o, g;
|
|
628
631
|
if (t === "mode")
|
|
629
632
|
return ((o = e.sort) == null ? void 0 : o.mode) || "client";
|
|
630
633
|
if (t === "multiSort")
|
|
631
|
-
return !!((
|
|
634
|
+
return !!((g = e.sort) != null && g.multiSort);
|
|
632
635
|
}
|
|
633
636
|
}, kt = {
|
|
634
637
|
convertTo: (e, t, r, o) => {
|
|
@@ -639,7 +642,7 @@ const nt = {
|
|
|
639
642
|
if (t === "mode")
|
|
640
643
|
return ((o = e.filter) == null ? void 0 : o.mode) || "client";
|
|
641
644
|
}
|
|
642
|
-
},
|
|
645
|
+
}, Ft = {
|
|
643
646
|
convertTo: (e, t, r, o) => {
|
|
644
647
|
e.rowOption ? e.rowOption[t] = r : e.rowOption = {
|
|
645
648
|
[t]: r
|
|
@@ -656,7 +659,7 @@ const nt = {
|
|
|
656
659
|
}
|
|
657
660
|
return "";
|
|
658
661
|
}
|
|
659
|
-
},
|
|
662
|
+
}, xt = {
|
|
660
663
|
convertTo: (e, t, r, o) => {
|
|
661
664
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = r, t === "columnTemplateType" && r === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
662
665
|
<span class="f-pretend-link f-cursor-pointer"
|
|
@@ -668,6 +671,16 @@ const nt = {
|
|
|
668
671
|
</span>`), t === "columnTemplateType" && r === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && r === "custom" && (e.columnTemplate = ""));
|
|
669
672
|
},
|
|
670
673
|
convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
674
|
+
}, Pt = {
|
|
675
|
+
convertTo: (e, t, r, o) => {
|
|
676
|
+
e.hierarchy || (e.hierarchy = {
|
|
677
|
+
cascadeOption: {}
|
|
678
|
+
}), e.hierarchy.cascadeOption || (e.hierarchy.cascadeOption = {}), e.hierarchy.cascadeOption[t] = r;
|
|
679
|
+
},
|
|
680
|
+
convertFrom: (e, t, r) => {
|
|
681
|
+
var o, g;
|
|
682
|
+
return !!((g = (o = e.hierarchy) == null ? void 0 : o.cascadeOption) != null && g[t]);
|
|
683
|
+
}
|
|
671
684
|
};
|
|
672
685
|
function fe(e, t, r) {
|
|
673
686
|
const o = /* @__PURE__ */ new Map([
|
|
@@ -691,9 +704,10 @@ function fe(e, t, r) {
|
|
|
691
704
|
["/converter/change-formatter-enum.converter", Tt],
|
|
692
705
|
["/converter/grid-sort.converter", St],
|
|
693
706
|
["/converter/grid-filter.converter", kt],
|
|
694
|
-
["/converter/row-option.converter",
|
|
695
|
-
["/converter/change-formatter-type.converter",
|
|
696
|
-
|
|
707
|
+
["/converter/row-option.converter", Ft],
|
|
708
|
+
["/converter/change-formatter-type.converter", xt],
|
|
709
|
+
["/converter/tree-auto-check.converter", Pt]
|
|
710
|
+
]), g = /* @__PURE__ */ new Map([
|
|
697
711
|
["string", { type: "input-group", enableClear: !1 }],
|
|
698
712
|
["boolean", {
|
|
699
713
|
type: "combo-list",
|
|
@@ -724,7 +738,7 @@ function fe(e, t, r) {
|
|
|
724
738
|
function m(i, n, l) {
|
|
725
739
|
return i.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : T(n.visible, l) : () => !0;
|
|
726
740
|
}
|
|
727
|
-
function
|
|
741
|
+
function F(i, n, l) {
|
|
728
742
|
return i.includes("readonly") && n.readonly !== void 0 ? typeof n.readonly == "boolean" ? () => !!n.readonly : T(n.readonly, l) : () => !1;
|
|
729
743
|
}
|
|
730
744
|
function f(i, n) {
|
|
@@ -733,8 +747,8 @@ function fe(e, t, r) {
|
|
|
733
747
|
}
|
|
734
748
|
function v(i, n, l, u, h, k = "", $ = "") {
|
|
735
749
|
return Object.keys(i).map((a) => {
|
|
736
|
-
const y =
|
|
737
|
-
|
|
750
|
+
const y = O(1), R = a, w = i[a], d = Object.keys(w), B = w.title, M = w.type, N = g.get(M) || { type: "input-group", enableClear: !1 }, j = w.editor ? Object.assign({}, N, w.editor) : Object.assign({}, N), L = m(d, w, n), z = F(d, w, n);
|
|
751
|
+
j.readonly = j.readonly === void 0 ? z() : j.readonly;
|
|
738
752
|
const A = w.type === "cascade" ? v(w.properties, n, l, u, h, k, $) : [], q = !0;
|
|
739
753
|
let C = f(w, $);
|
|
740
754
|
const P = D({
|
|
@@ -750,31 +764,31 @@ function fe(e, t, r) {
|
|
|
750
764
|
set(H) {
|
|
751
765
|
y.value += 1, C && C.convertTo ? (C.convertTo(u, a, H, h, k), C.convertTo(l, a, H, h, k)) : (u[a] = H, l[a] = H);
|
|
752
766
|
}
|
|
753
|
-
}), { refreshPanelAfterChanged: I, description:
|
|
767
|
+
}), { refreshPanelAfterChanged: I, description: E, isExpand: Ce, parentPropertyID: Te } = w, X = { propertyID: R, propertyName: B, propertyType: M, propertyValue: P, editor: j, visible: L, readonly: z, cascadeConfig: A, hideCascadeTitle: q, refreshPanelAfterChanged: I, description: E, isExpand: Ce, parentPropertyID: Te };
|
|
754
768
|
return n[R] = X, X;
|
|
755
769
|
});
|
|
756
770
|
}
|
|
757
771
|
function s(i, n, l = {}) {
|
|
758
772
|
const u = {}, h = e[i];
|
|
759
773
|
return h && h.categories ? Object.keys(h.categories).map(($) => {
|
|
760
|
-
const
|
|
774
|
+
const x = h.categories[$], a = x == null ? void 0 : x.title, y = v(x.properties || {}, u, {}, l, n);
|
|
761
775
|
return { categoryId: $, categoryName: a, properties: y };
|
|
762
776
|
}) : [];
|
|
763
777
|
}
|
|
764
778
|
function c(i, n, l, u, h = "") {
|
|
765
|
-
const k = n.$ref.schema, $ = n.$ref.converter,
|
|
779
|
+
const k = n.$ref.schema, $ = n.$ref.converter, x = l[k], a = x.type, y = r(x), R = {}, w = e[a];
|
|
766
780
|
if (w && w.categories) {
|
|
767
781
|
const d = w.categories[i], B = d == null ? void 0 : d.title;
|
|
768
|
-
$ && Object.keys(d.properties).forEach((
|
|
769
|
-
d.properties[
|
|
782
|
+
$ && Object.keys(d.properties).forEach((j) => {
|
|
783
|
+
d.properties[j].$converter = $;
|
|
770
784
|
});
|
|
771
|
-
const
|
|
785
|
+
const M = (d == null ? void 0 : d.properties) || {}, N = v(M, R, y, x, u, h);
|
|
772
786
|
return { categoryId: i, categoryName: B, properties: N };
|
|
773
787
|
}
|
|
774
788
|
return { categoryId: i, categoryName: "", properties: [] };
|
|
775
789
|
}
|
|
776
|
-
function
|
|
777
|
-
const k = i.type, $ = r(i),
|
|
790
|
+
function b(i, n, l, u, h) {
|
|
791
|
+
const k = i.type, $ = r(i), x = {};
|
|
778
792
|
let a = h || e[k];
|
|
779
793
|
if (!(a && Object.keys(a).length > 0) && l && l.getPropConfig && (a = l.getPropConfig(u)), a && a.categories) {
|
|
780
794
|
const R = [];
|
|
@@ -784,51 +798,51 @@ function fe(e, t, r) {
|
|
|
784
798
|
R.push(c(w, d, i, n, u));
|
|
785
799
|
return;
|
|
786
800
|
}
|
|
787
|
-
const B = d == null ? void 0 : d.title,
|
|
788
|
-
R.push({ categoryId: w, categoryName: B, tabId:
|
|
801
|
+
const B = d == null ? void 0 : d.title, M = d == null ? void 0 : d.tabId, N = d == null ? void 0 : d.tabName, j = d == null ? void 0 : d.hide, L = d == null ? void 0 : d.hideTitle, z = v(d.properties || {}, x, $, i, n, u, d.$converter), { setPropertyRelates: A } = d, q = d == null ? void 0 : d.parentPropertyID;
|
|
802
|
+
R.push({ categoryId: w, categoryName: B, tabId: M, tabName: N, hide: j, properties: z, hideTitle: L, setPropertyRelates: A, parentPropertyID: q });
|
|
789
803
|
}), R;
|
|
790
804
|
}
|
|
791
805
|
return [];
|
|
792
806
|
}
|
|
793
807
|
return {
|
|
794
|
-
getPropertyConfigBySchema:
|
|
808
|
+
getPropertyConfigBySchema: b,
|
|
795
809
|
getPropertyConfigByType: s,
|
|
796
810
|
propertyConverterMap: o
|
|
797
811
|
};
|
|
798
812
|
}
|
|
799
813
|
const pe = {}, me = {};
|
|
800
814
|
fe(pe, me, et);
|
|
801
|
-
const ge = {}, be = {}, { resolveSchemaWithDefaultValue:
|
|
802
|
-
fe(ve, ye,
|
|
803
|
-
function
|
|
804
|
-
return ue[t.title] = t, de[t.title] = o, pe[t.title] =
|
|
815
|
+
const ge = {}, be = {}, { resolveSchemaWithDefaultValue: $t } = ce(ge, be), ve = {}, ye = {};
|
|
816
|
+
fe(ve, ye, $t);
|
|
817
|
+
function Rt(e, t, r = /* @__PURE__ */ new Map(), o = (T, m, F, f) => m, g = {}, S = (T) => T) {
|
|
818
|
+
return ue[t.title] = t, de[t.title] = o, pe[t.title] = g, me[t.title] = S, ge[t.title] = t, be[t.title] = o, ve[t.title] = g, ye[t.title] = S, (T = {}, m = !0) => {
|
|
805
819
|
if (!m)
|
|
806
820
|
return rt(T, r);
|
|
807
|
-
const
|
|
808
|
-
return Object.assign(f,
|
|
821
|
+
const F = tt(T, t, r), f = Object.keys(e).reduce((v, s) => (v[s] = e[s].default, v), {});
|
|
822
|
+
return Object.assign(f, F);
|
|
809
823
|
};
|
|
810
824
|
}
|
|
811
|
-
function
|
|
825
|
+
function Dt(e, t) {
|
|
812
826
|
if (!e || e.length < 1)
|
|
813
827
|
return null;
|
|
814
828
|
for (const r of e) {
|
|
815
829
|
if (r.id === t)
|
|
816
830
|
return r;
|
|
817
831
|
if (r.children) {
|
|
818
|
-
const o = r.children.find((
|
|
832
|
+
const o = r.children.find((g) => g.id === t);
|
|
819
833
|
if (o)
|
|
820
834
|
return o;
|
|
821
835
|
}
|
|
822
836
|
}
|
|
823
837
|
return null;
|
|
824
838
|
}
|
|
825
|
-
function
|
|
839
|
+
function Ot() {
|
|
826
840
|
function e(t, r) {
|
|
827
|
-
const { footerToolbar: o, headerToolbar:
|
|
841
|
+
const { footerToolbar: o, headerToolbar: g } = t, S = ((o == null ? void 0 : o.buttons) || []).concat((g == null ? void 0 : g.buttons) || []);
|
|
828
842
|
if (!S || S.length < 1)
|
|
829
843
|
return null;
|
|
830
|
-
const [T, m] = r.payloads,
|
|
831
|
-
return
|
|
844
|
+
const [T, m] = r.payloads, F = Dt(S, m);
|
|
845
|
+
return F ? F.onClick || F.click : null;
|
|
832
846
|
}
|
|
833
847
|
return {
|
|
834
848
|
resolve: e
|
|
@@ -888,8 +902,8 @@ const Q = {
|
|
|
888
902
|
customClass: { type: String, default: "" },
|
|
889
903
|
customStyle: { type: String, default: "" }
|
|
890
904
|
};
|
|
891
|
-
|
|
892
|
-
const Mt =
|
|
905
|
+
Rt(Q, ae, ie, se);
|
|
906
|
+
const Mt = Ot();
|
|
893
907
|
function Et() {
|
|
894
908
|
return { drawerLocale: {
|
|
895
909
|
cancel: ee.getLocaleValue("drawer.cancel") || "取消",
|
|
@@ -902,7 +916,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
902
916
|
emits: ["afterClose", "update:modelValue", "click"],
|
|
903
917
|
setup(e, t) {
|
|
904
918
|
Et();
|
|
905
|
-
const r =
|
|
919
|
+
const r = O(e.modelValue), o = O(e.buttons), g = D(() => ({
|
|
906
920
|
"f-utils-absolute-all f-drawer": !0,
|
|
907
921
|
// 在某个DOM内部打开抽屉
|
|
908
922
|
"f-drawer-inline": typeof e.host == "string" ? e.host !== "body" : document.querySelector(e.host) !== document.body
|
|
@@ -925,7 +939,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
925
939
|
[`f-drawer-wrapper-${e.position}`]: !0,
|
|
926
940
|
...a
|
|
927
941
|
};
|
|
928
|
-
}),
|
|
942
|
+
}), F = D(() => {
|
|
929
943
|
const a = e.width;
|
|
930
944
|
return typeof a == "string" ? a : typeof a == "number" ? `${a}px` : "20%";
|
|
931
945
|
}), f = D(() => {
|
|
@@ -948,7 +962,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
948
962
|
break;
|
|
949
963
|
}
|
|
950
964
|
const y = {
|
|
951
|
-
width:
|
|
965
|
+
width: F.value,
|
|
952
966
|
height: f.value,
|
|
953
967
|
backgroundColor: e.backgroundColor,
|
|
954
968
|
maxWidth: "100%"
|
|
@@ -965,7 +979,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
965
979
|
_(() => e.modelValue, (a, y) => {
|
|
966
980
|
a !== y && (r.value = a);
|
|
967
981
|
});
|
|
968
|
-
const
|
|
982
|
+
const b = (a, y) => {
|
|
969
983
|
t.emit("click", a, y);
|
|
970
984
|
}, i = {
|
|
971
985
|
close: () => {
|
|
@@ -975,11 +989,11 @@ const jt = /* @__PURE__ */ re({
|
|
|
975
989
|
async function n(a, y) {
|
|
976
990
|
a.handle && await a.handle(y, i) && t.emit("closed", y);
|
|
977
991
|
}
|
|
978
|
-
const l = (a, y) => p(
|
|
992
|
+
const l = (a, y) => p(Ee, {
|
|
979
993
|
class: y,
|
|
980
994
|
alignment: "right",
|
|
981
995
|
items: a,
|
|
982
|
-
onClick:
|
|
996
|
+
onClick: b
|
|
983
997
|
}, null);
|
|
984
998
|
function u() {
|
|
985
999
|
var a, y, R, w;
|
|
@@ -990,14 +1004,14 @@ const jt = /* @__PURE__ */ re({
|
|
|
990
1004
|
return (w = (R = e.footerToolbar) == null ? void 0 : R.appearance) != null && w.class && (d[e.footerToolbar.appearance.class] = !0), l(e.footerToolbar.buttons, d);
|
|
991
1005
|
}
|
|
992
1006
|
return o.value && !!o.value.length && o.value.map((d) => {
|
|
993
|
-
const B =
|
|
1007
|
+
const B = O(d.disabled);
|
|
994
1008
|
return p("button", {
|
|
995
1009
|
id: d.id,
|
|
996
1010
|
type: "button",
|
|
997
1011
|
disabled: B.value,
|
|
998
1012
|
class: d.class + (d.iconClass ? " btn-icontext" : ""),
|
|
999
|
-
onClick: (
|
|
1000
|
-
n(d,
|
|
1013
|
+
onClick: (M) => {
|
|
1014
|
+
n(d, M);
|
|
1001
1015
|
}
|
|
1002
1016
|
}, [!!d.iconClass && p("i", {
|
|
1003
1017
|
class: d.iconClass
|
|
@@ -1026,15 +1040,15 @@ const jt = /* @__PURE__ */ re({
|
|
|
1026
1040
|
}, ["stop"])
|
|
1027
1041
|
}, null)])]);
|
|
1028
1042
|
}
|
|
1029
|
-
const $ =
|
|
1030
|
-
function
|
|
1031
|
-
const a =
|
|
1043
|
+
const $ = O({});
|
|
1044
|
+
function x() {
|
|
1045
|
+
const a = Fe();
|
|
1032
1046
|
$.value = {
|
|
1033
1047
|
zIndex: a < 1e3 ? 1e3 : a
|
|
1034
1048
|
};
|
|
1035
1049
|
}
|
|
1036
1050
|
return Pe(() => {
|
|
1037
|
-
r.value &&
|
|
1051
|
+
r.value && x();
|
|
1038
1052
|
}), t.expose({
|
|
1039
1053
|
open: () => {
|
|
1040
1054
|
r.value = !0;
|
|
@@ -1046,7 +1060,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
1046
1060
|
to: e.host
|
|
1047
1061
|
}, {
|
|
1048
1062
|
default: () => [p("div", {
|
|
1049
|
-
class:
|
|
1063
|
+
class: g.value,
|
|
1050
1064
|
id: e.id,
|
|
1051
1065
|
style: $.value
|
|
1052
1066
|
}, [p(Z, {
|
|
@@ -1086,7 +1100,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
1086
1100
|
});
|
|
1087
1101
|
}
|
|
1088
1102
|
});
|
|
1089
|
-
class
|
|
1103
|
+
class It extends Ve {
|
|
1090
1104
|
constructor(t, r) {
|
|
1091
1105
|
super(t, r);
|
|
1092
1106
|
}
|
|
@@ -1275,27 +1289,27 @@ class Ot extends Ve {
|
|
|
1275
1289
|
label: "beforeClose",
|
|
1276
1290
|
name: "关闭前事件"
|
|
1277
1291
|
}
|
|
1278
|
-
],
|
|
1292
|
+
], g = r.eventsEditorUtils.formProperties(t, r.viewModelId, o);
|
|
1279
1293
|
return {
|
|
1280
1294
|
title: "事件",
|
|
1281
1295
|
hideTitle: !0,
|
|
1282
|
-
properties: r.createBaseEventProperty(
|
|
1296
|
+
properties: r.createBaseEventProperty(g),
|
|
1283
1297
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1284
1298
|
refreshPanelAfterChanged: !0,
|
|
1285
1299
|
tabId: "commands",
|
|
1286
1300
|
tabName: "交互",
|
|
1287
1301
|
setPropertyRelates(T, m) {
|
|
1288
|
-
const
|
|
1289
|
-
delete m[r.viewModelId],
|
|
1302
|
+
const F = T.propertyValue;
|
|
1303
|
+
delete m[r.viewModelId], F && r.eventsEditorUtils.saveRelatedParameters(m, r.viewModelId, F.events, F);
|
|
1290
1304
|
const f = r.designViewModelUtils.getDgViewModel(r.viewModelId);
|
|
1291
1305
|
f && r.designViewModelField && f.changeField(r.designViewModelField.id, { valueChanging: m.fieldValueChanging, valueChanged: m.fieldValueChanged });
|
|
1292
1306
|
}
|
|
1293
1307
|
};
|
|
1294
1308
|
}
|
|
1295
1309
|
}
|
|
1296
|
-
function
|
|
1310
|
+
function Bt(e, t, r) {
|
|
1297
1311
|
const o = new Ie();
|
|
1298
|
-
function
|
|
1312
|
+
function g(n) {
|
|
1299
1313
|
if (!He().basalDragulaRuleForContainer(n, r))
|
|
1300
1314
|
return !1;
|
|
1301
1315
|
const { canAccept: u } = o.getTemplateRule(e, r);
|
|
@@ -1310,18 +1324,18 @@ function It(e, t, r) {
|
|
|
1310
1324
|
function m() {
|
|
1311
1325
|
return !0;
|
|
1312
1326
|
}
|
|
1313
|
-
function
|
|
1327
|
+
function F() {
|
|
1314
1328
|
return "position: initial !important;border: none !important;left: 0;right: 0;padding: 0;";
|
|
1315
1329
|
}
|
|
1316
1330
|
function f(n) {
|
|
1317
|
-
const l = new
|
|
1331
|
+
const l = new It(n, r), { schema: u } = e;
|
|
1318
1332
|
return l.getPropertyConfig(u);
|
|
1319
1333
|
}
|
|
1320
1334
|
function v(n) {
|
|
1321
1335
|
return t;
|
|
1322
1336
|
}
|
|
1323
1337
|
function s() {
|
|
1324
|
-
e.designerItemElementRef.value &&
|
|
1338
|
+
e.designerItemElementRef.value && Oe(() => {
|
|
1325
1339
|
Ne(t.value);
|
|
1326
1340
|
});
|
|
1327
1341
|
}
|
|
@@ -1331,17 +1345,17 @@ function It(e, t, r) {
|
|
|
1331
1345
|
const { changeObject: l } = n;
|
|
1332
1346
|
l && ["width", "position"].includes(l.propertyID) && s();
|
|
1333
1347
|
}
|
|
1334
|
-
function
|
|
1348
|
+
function b(n, l, u) {
|
|
1335
1349
|
var h;
|
|
1336
1350
|
(h = n == null ? void 0 : n.buttons) != null && h.length && n.buttons.map((k) => {
|
|
1337
1351
|
var $;
|
|
1338
1352
|
u.set(k.id, {
|
|
1339
1353
|
componentTitle: k.text,
|
|
1340
1354
|
parentPathName: `${l} > ${k.text}`
|
|
1341
|
-
}), ($ = k.children) != null && $.length && k.children.map((
|
|
1342
|
-
u.set(
|
|
1343
|
-
componentTitle:
|
|
1344
|
-
parentPathName: `${l} > ${
|
|
1355
|
+
}), ($ = k.children) != null && $.length && k.children.map((x) => {
|
|
1356
|
+
u.set(x.id, {
|
|
1357
|
+
componentTitle: x.text,
|
|
1358
|
+
parentPathName: `${l} > ${x.text}`
|
|
1345
1359
|
});
|
|
1346
1360
|
});
|
|
1347
1361
|
});
|
|
@@ -1352,15 +1366,15 @@ function It(e, t, r) {
|
|
|
1352
1366
|
l.set(u.id, {
|
|
1353
1367
|
componentTitle: h,
|
|
1354
1368
|
parentPathName: h
|
|
1355
|
-
}),
|
|
1369
|
+
}), b(u.headerToolbar, h, l), b(u.footerToolbar, h, l);
|
|
1356
1370
|
}
|
|
1357
1371
|
}
|
|
1358
1372
|
return {
|
|
1359
|
-
canAccepts:
|
|
1373
|
+
canAccepts: g,
|
|
1360
1374
|
checkCanDeleteComponent: S,
|
|
1361
1375
|
checkCanMoveComponent: T,
|
|
1362
1376
|
hideNestedPaddingInDesginerView: m,
|
|
1363
|
-
getStyles:
|
|
1377
|
+
getStyles: F,
|
|
1364
1378
|
getPropsConfig: f,
|
|
1365
1379
|
getDraggableDesignItemElement: v,
|
|
1366
1380
|
onPropertyChanged: c,
|
|
@@ -1372,7 +1386,7 @@ const he = Object.assign({}, Q, {
|
|
|
1372
1386
|
footerContentType: { type: String, default: "toolbar" },
|
|
1373
1387
|
customHeader: { type: Boolean, default: !1 },
|
|
1374
1388
|
showWrapperInCanvas: { type: Boolean, default: !1 }
|
|
1375
|
-
}),
|
|
1389
|
+
}), Ht = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-design.gitee.io/section-toolbar-item.schema.json", zt = "drawer-toolbar-item", Lt = "A Farris Toolbar Item Component", At = "object", qt = {
|
|
1376
1390
|
id: {
|
|
1377
1391
|
description: "The unique identifier for a Response Toolbar",
|
|
1378
1392
|
type: "string"
|
|
@@ -1440,22 +1454,22 @@ const he = Object.assign({}, Q, {
|
|
|
1440
1454
|
type: "boolean",
|
|
1441
1455
|
default: !1
|
|
1442
1456
|
}
|
|
1443
|
-
},
|
|
1457
|
+
}, Vt = [
|
|
1444
1458
|
"id",
|
|
1445
1459
|
"type",
|
|
1446
1460
|
"text"
|
|
1447
|
-
],
|
|
1461
|
+
], _t = {
|
|
1448
1462
|
onClick: "点击事件"
|
|
1449
|
-
},
|
|
1450
|
-
$schema:
|
|
1451
|
-
$id:
|
|
1452
|
-
title:
|
|
1453
|
-
description:
|
|
1454
|
-
type:
|
|
1455
|
-
properties:
|
|
1456
|
-
required:
|
|
1457
|
-
events:
|
|
1458
|
-
},
|
|
1463
|
+
}, Wt = {
|
|
1464
|
+
$schema: Ht,
|
|
1465
|
+
$id: Nt,
|
|
1466
|
+
title: zt,
|
|
1467
|
+
description: Lt,
|
|
1468
|
+
type: At,
|
|
1469
|
+
properties: qt,
|
|
1470
|
+
required: Vt,
|
|
1471
|
+
events: _t
|
|
1472
|
+
}, Ut = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/section-toolbar.schema.json", Zt = "drawer-toolbar", Jt = "A Farris Toolbar Component", Qt = "object", Xt = {
|
|
1459
1473
|
id: {
|
|
1460
1474
|
description: "The unique identifier for a Section Toolbar",
|
|
1461
1475
|
type: "string"
|
|
@@ -1494,61 +1508,61 @@ const he = Object.assign({}, Q, {
|
|
|
1494
1508
|
type: "boolean",
|
|
1495
1509
|
default: !0
|
|
1496
1510
|
}
|
|
1497
|
-
},
|
|
1511
|
+
}, Yt = [
|
|
1498
1512
|
"id",
|
|
1499
1513
|
"type",
|
|
1500
1514
|
"buttons"
|
|
1501
|
-
],
|
|
1515
|
+
], Kt = {
|
|
1502
1516
|
onClick: "点击事件"
|
|
1503
|
-
},
|
|
1504
|
-
$schema:
|
|
1505
|
-
$id:
|
|
1506
|
-
title:
|
|
1507
|
-
description:
|
|
1508
|
-
type:
|
|
1509
|
-
properties:
|
|
1510
|
-
required:
|
|
1511
|
-
events:
|
|
1512
|
-
},
|
|
1517
|
+
}, er = {
|
|
1518
|
+
$schema: Ut,
|
|
1519
|
+
$id: Gt,
|
|
1520
|
+
title: Zt,
|
|
1521
|
+
description: Jt,
|
|
1522
|
+
type: Qt,
|
|
1523
|
+
properties: Xt,
|
|
1524
|
+
required: Yt,
|
|
1525
|
+
events: Kt
|
|
1526
|
+
}, tr = Object.assign({}, Ae), rr = J(tr, Wt, void 0, le), or = Object.assign({}, je, {
|
|
1513
1527
|
componentId: { type: String, default: "" }
|
|
1514
1528
|
}), V = J(
|
|
1515
|
-
|
|
1516
|
-
|
|
1529
|
+
or,
|
|
1530
|
+
er,
|
|
1517
1531
|
We,
|
|
1518
1532
|
le
|
|
1519
1533
|
), U = /* @__PURE__ */ re({
|
|
1520
1534
|
name: "FDrawerDesign",
|
|
1521
1535
|
props: he,
|
|
1522
1536
|
setup(e, t) {
|
|
1523
|
-
const r =
|
|
1537
|
+
const r = O(), o = O(), g = e.id + "_footer-toolbar", S = e.id + "_header-toolbar", T = G("designer-host-service"), m = G("design-item-context"), F = Bt(m, o, T), f = ze(r, m, F);
|
|
1524
1538
|
m.schema.footerToolbar = m.schema.footerToolbar || {
|
|
1525
|
-
id:
|
|
1539
|
+
id: g,
|
|
1526
1540
|
type: "drawer-toolbar",
|
|
1527
1541
|
buttons: []
|
|
1528
1542
|
};
|
|
1529
|
-
const v =
|
|
1543
|
+
const v = O(m.schema.footerToolbar), s = O(V(v.value));
|
|
1530
1544
|
_(() => m.schema.footerToolbar, () => {
|
|
1531
1545
|
v.value = m.schema.footerToolbar, s.value = V(v.value);
|
|
1532
1546
|
}, {
|
|
1533
1547
|
deep: !0
|
|
1534
1548
|
});
|
|
1535
|
-
const c = G("design-item-context"),
|
|
1549
|
+
const c = G("design-item-context"), b = D(() => [...s.value.items]);
|
|
1536
1550
|
m.schema.headerToolbar = m.schema.headerToolbar || {
|
|
1537
1551
|
id: S,
|
|
1538
1552
|
type: "drawer-toolbar",
|
|
1539
1553
|
buttons: []
|
|
1540
1554
|
};
|
|
1541
|
-
const i =
|
|
1555
|
+
const i = O(m.schema.headerToolbar), n = O(V(i.value));
|
|
1542
1556
|
_(() => m.schema.headerToolbar, () => {
|
|
1543
1557
|
i.value = m.schema.headerToolbar, n.value = V(i.value);
|
|
1544
1558
|
}, {
|
|
1545
1559
|
deep: !0
|
|
1546
1560
|
});
|
|
1547
1561
|
const l = D(() => [...n.value.items]);
|
|
1548
|
-
|
|
1562
|
+
Me(() => {
|
|
1549
1563
|
r.value.componentInstance = f;
|
|
1550
1564
|
}), t.expose(f.value);
|
|
1551
|
-
const u =
|
|
1565
|
+
const u = O(e.modelValue || m.schema.showWrapperInCanvas);
|
|
1552
1566
|
_(() => e.modelValue, () => {
|
|
1553
1567
|
u.value = e.modelValue;
|
|
1554
1568
|
});
|
|
@@ -1556,14 +1570,14 @@ const he = Object.assign({}, Q, {
|
|
|
1556
1570
|
const C = ["f-drawer-wrapper", `f-drawer-wrapper-${e.position}`, e.wrapperClass];
|
|
1557
1571
|
return u.value || C.push("d-none"), C;
|
|
1558
1572
|
}), k = D(() => {
|
|
1559
|
-
const C = e.width, P = e.height, I = typeof C == "string" ? C : typeof C == "number" ? `${C}px` : "20%",
|
|
1573
|
+
const C = e.width, P = e.height, I = typeof C == "string" ? C : typeof C == "number" ? `${C}px` : "20%", E = typeof P == "string" ? P : typeof P == "number" ? `${P}px` : "20%";
|
|
1560
1574
|
return {
|
|
1561
1575
|
width: I,
|
|
1562
|
-
height:
|
|
1576
|
+
height: E,
|
|
1563
1577
|
backgroundColor: e.backgroundColor,
|
|
1564
1578
|
maxWidth: "100%"
|
|
1565
1579
|
};
|
|
1566
|
-
}), $ = D(() => ["f-drawer-entry", `f-drawer-entry-${e.position}`, e.entryClass]),
|
|
1580
|
+
}), $ = D(() => ["f-drawer-entry", `f-drawer-entry-${e.position}`, e.entryClass]), x = D(() => `f-icon-arrow-chevron-${{
|
|
1567
1581
|
left: "right",
|
|
1568
1582
|
right: "left",
|
|
1569
1583
|
top: "down",
|
|
@@ -1578,7 +1592,7 @@ const he = Object.assign({}, Q, {
|
|
|
1578
1592
|
}, [t.slots.button ? t.slots.button() : p("div", {
|
|
1579
1593
|
class: "f-drawer-entry-icon"
|
|
1580
1594
|
}, [p("span", {
|
|
1581
|
-
class: `f-icon ${
|
|
1595
|
+
class: `f-icon ${x.value}`
|
|
1582
1596
|
}, null)])]), w = D(() => ({
|
|
1583
1597
|
opacity: e.transparent ? 0 : 1
|
|
1584
1598
|
})), d = () => p(Z, {
|
|
@@ -1591,12 +1605,12 @@ const he = Object.assign({}, Q, {
|
|
|
1591
1605
|
onClick: W(a, ["stop"])
|
|
1592
1606
|
}, null)]
|
|
1593
1607
|
});
|
|
1594
|
-
function B(C, P, I,
|
|
1595
|
-
m && m.setupContext && m.setupContext.emit("selectionChange", C, P, I,
|
|
1608
|
+
function B(C, P, I, E) {
|
|
1609
|
+
m && m.setupContext && m.setupContext.emit("selectionChange", C, P, I, E);
|
|
1596
1610
|
}
|
|
1597
|
-
const
|
|
1611
|
+
const M = (C, P, I) => p(Le, {
|
|
1598
1612
|
modelValue: I,
|
|
1599
|
-
"onUpdate:modelValue": (
|
|
1613
|
+
"onUpdate:modelValue": (E) => I = E,
|
|
1600
1614
|
canAdd: !1,
|
|
1601
1615
|
class: "w-100 position-relative",
|
|
1602
1616
|
childType: "drawer-toolbar-item",
|
|
@@ -1616,7 +1630,7 @@ const he = Object.assign({}, Q, {
|
|
|
1616
1630
|
}, [p("span", {
|
|
1617
1631
|
class: "f-icon f-icon-close",
|
|
1618
1632
|
onClick: W(a, ["stop"])
|
|
1619
|
-
}, null)]),
|
|
1633
|
+
}, null)]), j = () => e.showHeader ? p("div", {
|
|
1620
1634
|
class: "f-drawer-header align-items-center"
|
|
1621
1635
|
}, [e.customHeader ? p("div", {
|
|
1622
1636
|
class: "w-100 h-100",
|
|
@@ -1625,15 +1639,15 @@ const he = Object.assign({}, Q, {
|
|
|
1625
1639
|
class: "f-drawer-title"
|
|
1626
1640
|
}, [t.slots.title ? t.slots.title() : e.title]), p("div", {
|
|
1627
1641
|
class: "mx-2 col-7"
|
|
1628
|
-
}, [
|
|
1642
|
+
}, [M(S, l.value, i.value)]), p("div", {
|
|
1629
1643
|
class: "f-drawer-header-right"
|
|
1630
1644
|
}, [e.showClose && N()])])]) : null;
|
|
1631
1645
|
function L(C) {
|
|
1632
1646
|
C && (C.preventDefault(), C.stopPropagation()), f.value.onRemoveComponent(T);
|
|
1633
|
-
const P = c == null ? void 0 : c.parent, I = (
|
|
1647
|
+
const P = c == null ? void 0 : c.parent, I = (E) => E.id === m.schema.id;
|
|
1634
1648
|
if (P && P.schema.contents) {
|
|
1635
|
-
const
|
|
1636
|
-
P.schema.contents.splice(
|
|
1649
|
+
const E = P.schema.contents.findIndex(I);
|
|
1650
|
+
P.schema.contents.splice(E, 1), _e.value++, t.emit("selectionChange");
|
|
1637
1651
|
}
|
|
1638
1652
|
}
|
|
1639
1653
|
const z = () => p("div", {
|
|
@@ -1658,7 +1672,7 @@ const he = Object.assign({}, Q, {
|
|
|
1658
1672
|
}, [p("div", {
|
|
1659
1673
|
class: "f-drawer-container position-relative",
|
|
1660
1674
|
ref: o
|
|
1661
|
-
}, [z(),
|
|
1675
|
+
}, [z(), j(), p("div", {
|
|
1662
1676
|
class: "f-drawer-body drag-container d-block",
|
|
1663
1677
|
"data-dragref": `${m.schema.id}-container`,
|
|
1664
1678
|
ref: r,
|
|
@@ -1669,7 +1683,7 @@ const he = Object.assign({}, Q, {
|
|
|
1669
1683
|
style: {
|
|
1670
1684
|
height: e.footerHeight + "px"
|
|
1671
1685
|
}
|
|
1672
|
-
}, [e.footerContentType === "toolbar" &&
|
|
1686
|
+
}, [e.footerContentType === "toolbar" && M(g, b.value, v.value), e.footerContentType === "html" && p("div", {
|
|
1673
1687
|
class: "w-100 h-100",
|
|
1674
1688
|
innerHTML: e.footerTemplate
|
|
1675
1689
|
}, null)])])]);
|
|
@@ -1679,26 +1693,26 @@ const he = Object.assign({}, Q, {
|
|
|
1679
1693
|
return () => p("div", null, [q(), R()]);
|
|
1680
1694
|
}
|
|
1681
1695
|
});
|
|
1682
|
-
function
|
|
1696
|
+
function nr() {
|
|
1683
1697
|
function e(t, r) {
|
|
1684
1698
|
const o = {};
|
|
1685
|
-
return o.beforeClose = (
|
|
1699
|
+
return o.beforeClose = (g) => r.call("beforeClose", t, [t]), o;
|
|
1686
1700
|
}
|
|
1687
1701
|
return {
|
|
1688
1702
|
resolve: e
|
|
1689
1703
|
};
|
|
1690
1704
|
}
|
|
1691
|
-
const we = J(he, ae, ie, se),
|
|
1705
|
+
const we = J(he, ae, ie, se), ir = nr();
|
|
1692
1706
|
U.register = (e, t, r, o) => {
|
|
1693
|
-
e.drawer = jt, t.drawer = we, o.drawer = { eventHandlerResolver: Mt, callbackResolver:
|
|
1707
|
+
e.drawer = jt, t.drawer = we, o.drawer = { eventHandlerResolver: Mt, callbackResolver: ir };
|
|
1694
1708
|
};
|
|
1695
1709
|
U.registerDesigner = (e, t, r) => {
|
|
1696
|
-
e.drawer = U, t.drawer = we, e["drawer-toolbar-item"] = qe, t["drawer-toolbar-item"] =
|
|
1710
|
+
e.drawer = U, t.drawer = we, e["drawer-toolbar-item"] = qe, t["drawer-toolbar-item"] = rr, e["drawer-toolbar"] = ne, t["drawer-toolbar"] = V;
|
|
1697
1711
|
};
|
|
1698
|
-
const
|
|
1712
|
+
const br = xe(U);
|
|
1699
1713
|
export {
|
|
1700
|
-
|
|
1701
|
-
|
|
1714
|
+
ir as callbackResolver,
|
|
1715
|
+
br as default,
|
|
1702
1716
|
Q as drawerProps,
|
|
1703
1717
|
Mt as eventHandlerResolver,
|
|
1704
1718
|
we as propsResolver
|