@farris/ui-vue 1.3.1 → 1.3.3
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/accordion/index.esm.js +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,100 +1,105 @@
|
|
|
1
1
|
var z = Object.defineProperty;
|
|
2
|
-
var J = (
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
var J = (n, e, t) => e in n ? z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var V = (n, e, t) => J(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as O, onBeforeMount as X, onMounted as j, createVNode as S, ref as D, inject as A, computed as Y } from "vue";
|
|
5
|
+
import { isPlainObject as $, cloneDeep as N } from "lodash-es";
|
|
6
|
+
import { getCustomClass as Z } from "../common/index.esm.js";
|
|
7
|
+
const R = {}, q = {};
|
|
8
|
+
function U(n) {
|
|
9
|
+
const { properties: e, title: t, ignore: o } = n, a = o && Array.isArray(o), c = Object.keys(e).reduce((r, f) => ((!a || !o.find((m) => m === f)) && (r[f] = e[f].type === "object" && e[f].properties ? U(e[f]) : N(e[f].default)), r), {});
|
|
10
|
+
if (t && (!a || !o.find((r) => r === "id"))) {
|
|
11
|
+
const r = t.toLowerCase().replace(/-/g, "_");
|
|
12
|
+
c.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
13
|
+
}
|
|
14
|
+
return c;
|
|
10
15
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
16
|
+
function G(n, e = {}, t) {
|
|
17
|
+
const o = R[n];
|
|
18
|
+
if (o) {
|
|
19
|
+
let a = U(o);
|
|
20
|
+
const c = q[n];
|
|
21
|
+
return a = c ? c({ getSchemaByType: G }, a, e, t) : a, a;
|
|
17
22
|
}
|
|
18
23
|
return null;
|
|
19
24
|
}
|
|
20
|
-
function
|
|
21
|
-
const t =
|
|
22
|
-
return Object.keys(
|
|
25
|
+
function I(n, e) {
|
|
26
|
+
const t = U(e);
|
|
27
|
+
return Object.keys(t).reduce((o, a) => (o[a] && $(o[a]) && $(n[a] || !n[a]) ? Object.assign(o[a], n[a] || {}) : o[a] = n[a], o), t), t;
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
|
|
29
|
+
function K(n, e) {
|
|
30
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, a) => {
|
|
31
|
+
if (e.has(a)) {
|
|
32
|
+
const c = e.get(a);
|
|
33
|
+
if (typeof c == "string")
|
|
34
|
+
o[c] = n[a];
|
|
30
35
|
else {
|
|
31
|
-
const r =
|
|
32
|
-
Object.assign(
|
|
36
|
+
const r = c(a, n[a], n);
|
|
37
|
+
Object.assign(o, r);
|
|
33
38
|
}
|
|
34
39
|
} else
|
|
35
|
-
|
|
36
|
-
return
|
|
40
|
+
o[a] = n[a];
|
|
41
|
+
return o;
|
|
37
42
|
}, {});
|
|
38
43
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
return
|
|
44
|
+
function H(n, e, t = /* @__PURE__ */ new Map()) {
|
|
45
|
+
const o = I(n, e);
|
|
46
|
+
return K(o, t);
|
|
42
47
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(s,
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const d = Object.keys(
|
|
48
|
+
function x(n = {}) {
|
|
49
|
+
function e(i, s, l, p) {
|
|
50
|
+
if (typeof l == "number")
|
|
51
|
+
return p[i].length === l;
|
|
52
|
+
if (typeof l == "object") {
|
|
53
|
+
const d = Object.keys(l)[0], v = l[d];
|
|
49
54
|
if (d === "not")
|
|
50
|
-
return Number(
|
|
55
|
+
return Number(p[i].length) !== Number(v);
|
|
51
56
|
if (d === "moreThan")
|
|
52
|
-
return Number(
|
|
57
|
+
return Number(p[i].length) >= Number(v);
|
|
53
58
|
if (d === "lessThan")
|
|
54
|
-
return Number(
|
|
59
|
+
return Number(p[i].length) <= Number(v);
|
|
55
60
|
}
|
|
56
61
|
return !1;
|
|
57
62
|
}
|
|
58
|
-
function t(s,
|
|
59
|
-
return
|
|
63
|
+
function t(i, s, l, p) {
|
|
64
|
+
return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(l);
|
|
60
65
|
}
|
|
61
|
-
const
|
|
66
|
+
const o = /* @__PURE__ */ new Map([
|
|
62
67
|
["length", e],
|
|
63
68
|
["getProperty", t]
|
|
64
69
|
]);
|
|
65
|
-
Object.keys(
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const d =
|
|
72
|
-
return { target:
|
|
70
|
+
Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), o);
|
|
71
|
+
function a(i, s) {
|
|
72
|
+
const l = i;
|
|
73
|
+
return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
74
|
+
if (p === "length")
|
|
75
|
+
return { target: l, operator: "length", param: null, value: s[p] };
|
|
76
|
+
const d = p, v = s[p];
|
|
77
|
+
return { target: l, operator: "getProperty", param: d, value: v };
|
|
73
78
|
}) : [];
|
|
74
79
|
}
|
|
75
|
-
function i
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const d =
|
|
78
|
-
return
|
|
80
|
+
function c(i) {
|
|
81
|
+
return Object.keys(i).reduce((l, p) => {
|
|
82
|
+
const d = a(p, i[p]);
|
|
83
|
+
return l.push(...d), l;
|
|
79
84
|
}, []);
|
|
80
85
|
}
|
|
81
|
-
function r(
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
86
|
+
function r(i, s) {
|
|
87
|
+
if (o.has(i.operator)) {
|
|
88
|
+
const l = o.get(i.operator);
|
|
89
|
+
return l && l(i.target, i.param, i.value, s) || !1;
|
|
85
90
|
}
|
|
86
91
|
return !1;
|
|
87
92
|
}
|
|
88
|
-
function
|
|
89
|
-
return i
|
|
93
|
+
function f(i, s) {
|
|
94
|
+
return c(i).reduce((d, v) => d && r(v, s), !0);
|
|
90
95
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
96
|
+
function m(i, s) {
|
|
97
|
+
const l = Object.keys(i), p = l.includes("allOf"), d = l.includes("anyOf"), v = p || d, M = (v ? i[v ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((P) => f(P, s));
|
|
98
|
+
return p ? !M.includes(!1) : M.includes(!0);
|
|
94
99
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: m };
|
|
96
101
|
}
|
|
97
|
-
const
|
|
102
|
+
const ee = {
|
|
98
103
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
104
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
105
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -132,21 +137,22 @@ const K = {
|
|
|
132
137
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
138
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
139
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
141
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
142
|
+
}, te = {}, ne = {};
|
|
143
|
+
x();
|
|
144
|
+
function W(n, e, t = /* @__PURE__ */ new Map(), o = (r, f, m, i) => f, a = {}, c = (r) => r) {
|
|
145
|
+
return R[e.title] = e, q[e.title] = o, te[e.title] = a, ne[e.title] = c, (r = {}) => {
|
|
146
|
+
const f = H(r, e, t), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
|
|
147
|
+
return Object.assign(m, f);
|
|
142
148
|
};
|
|
143
149
|
}
|
|
144
|
-
function
|
|
150
|
+
function oe(n, e) {
|
|
145
151
|
return { customClass: e.class, customStyle: e.style };
|
|
146
152
|
}
|
|
147
|
-
const
|
|
148
|
-
["appearance",
|
|
149
|
-
]),
|
|
153
|
+
const _ = /* @__PURE__ */ new Map([
|
|
154
|
+
["appearance", oe]
|
|
155
|
+
]), ae = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/component.schema.json", ce = "component", ie = "A Farris Visual Component", se = "object", le = {
|
|
150
156
|
id: {
|
|
151
157
|
description: "The unique identifier for a component",
|
|
152
158
|
type: "string"
|
|
@@ -197,245 +203,252 @@ const W = /* @__PURE__ */ new Map([
|
|
|
197
203
|
type: "string",
|
|
198
204
|
default: ""
|
|
199
205
|
}
|
|
200
|
-
},
|
|
206
|
+
}, pe = [
|
|
201
207
|
"id",
|
|
202
208
|
"type",
|
|
203
209
|
"contents"
|
|
204
|
-
],
|
|
205
|
-
$schema:
|
|
206
|
-
$id:
|
|
207
|
-
title:
|
|
208
|
-
description:
|
|
209
|
-
type:
|
|
210
|
-
properties:
|
|
211
|
-
required:
|
|
210
|
+
], ue = {
|
|
211
|
+
$schema: ae,
|
|
212
|
+
$id: re,
|
|
213
|
+
title: ce,
|
|
214
|
+
description: ie,
|
|
215
|
+
type: se,
|
|
216
|
+
properties: le,
|
|
217
|
+
required: pe
|
|
212
218
|
};
|
|
213
|
-
function
|
|
219
|
+
function Q(n, e, t) {
|
|
214
220
|
return e;
|
|
215
221
|
}
|
|
216
|
-
const
|
|
222
|
+
const L = {
|
|
217
223
|
id: { type: String },
|
|
218
224
|
customClass: { type: String, default: "" },
|
|
225
|
+
customStyle: { type: String, default: "" },
|
|
219
226
|
componentType: { type: String, default: "" },
|
|
220
227
|
formColumns: { type: Number, default: 4 }
|
|
221
|
-
},
|
|
228
|
+
}, F = W(L, ue, _, Q), $e = Object.assign({}, L, { componentId: { type: String, default: "" } }), B = /* @__PURE__ */ O({
|
|
222
229
|
name: "FComponent",
|
|
223
|
-
props:
|
|
230
|
+
props: L,
|
|
224
231
|
emits: ["init", "afterViewInit"],
|
|
225
|
-
setup(
|
|
226
|
-
return
|
|
227
|
-
e.emit("init",
|
|
228
|
-
}),
|
|
229
|
-
e.emit("afterViewInit",
|
|
230
|
-
}), () =>
|
|
231
|
-
class:
|
|
232
|
+
setup(n, e) {
|
|
233
|
+
return X(() => {
|
|
234
|
+
e.emit("init", n.id);
|
|
235
|
+
}), j(() => {
|
|
236
|
+
e.emit("afterViewInit", n.id);
|
|
237
|
+
}), () => S("div", {
|
|
238
|
+
class: n.customClass
|
|
232
239
|
}, [e.slots.default && e.slots.default()]);
|
|
233
240
|
}
|
|
234
241
|
});
|
|
235
|
-
function
|
|
236
|
-
var
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
n();
|
|
241
|
-
const o = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = D();
|
|
242
|
-
function u() {
|
|
242
|
+
function fe(n, e, t) {
|
|
243
|
+
var T;
|
|
244
|
+
const o = t && t.getStyles && t.getStyles() || "", a = t && t.getDesignerClass && t.getDesignerClass() || "", c = D();
|
|
245
|
+
function r() {
|
|
243
246
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
244
247
|
}
|
|
245
248
|
function f() {
|
|
246
249
|
return !1;
|
|
247
250
|
}
|
|
248
|
-
function
|
|
251
|
+
function m() {
|
|
249
252
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
250
253
|
}
|
|
251
|
-
function
|
|
254
|
+
function i() {
|
|
252
255
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
253
256
|
}
|
|
254
|
-
function
|
|
255
|
-
if (!
|
|
257
|
+
function s(u) {
|
|
258
|
+
if (!u || !u.value)
|
|
256
259
|
return null;
|
|
257
|
-
if (
|
|
258
|
-
return
|
|
259
|
-
const
|
|
260
|
-
return
|
|
260
|
+
if (u.value.schema && u.value.schema.type === "component")
|
|
261
|
+
return u.value;
|
|
262
|
+
const w = D(u == null ? void 0 : u.value.parent), b = s(w);
|
|
263
|
+
return b || null;
|
|
261
264
|
}
|
|
262
|
-
function l(
|
|
263
|
-
const { componentInstance:
|
|
264
|
-
return !
|
|
265
|
+
function l(u = e) {
|
|
266
|
+
const { componentInstance: w, designerItemElementRef: b } = u;
|
|
267
|
+
return !w || !w.value ? null : w.value.canMove ? b : l(u.parent);
|
|
265
268
|
}
|
|
266
|
-
function
|
|
267
|
-
return !!t && t.canAccepts(
|
|
269
|
+
function p(u) {
|
|
270
|
+
return !!t && t.canAccepts(u);
|
|
268
271
|
}
|
|
269
|
-
function
|
|
272
|
+
function d() {
|
|
270
273
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
271
274
|
}
|
|
272
|
-
function
|
|
275
|
+
function v() {
|
|
273
276
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
277
|
+
function y(u, w) {
|
|
278
|
+
w && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w);
|
|
276
279
|
}
|
|
277
|
-
function
|
|
278
|
-
const { componentType:
|
|
279
|
-
let
|
|
280
|
-
t && t.onResolveNewComponentSchema && (
|
|
281
|
-
const
|
|
282
|
-
return
|
|
280
|
+
function h(u, w) {
|
|
281
|
+
const { componentType: b } = u;
|
|
282
|
+
let C = G(b, u, w);
|
|
283
|
+
t && t.onResolveNewComponentSchema && (C = t.onResolveNewComponentSchema(u, C));
|
|
284
|
+
const E = b.toLowerCase().replace(/-/g, "_");
|
|
285
|
+
return C && !C.id && C.type === b && (C.id = `${E}_${Math.random().toString().slice(2, 6)}`), C;
|
|
283
286
|
}
|
|
284
|
-
function
|
|
287
|
+
function M(u) {
|
|
285
288
|
}
|
|
286
|
-
function
|
|
289
|
+
function g(...u) {
|
|
287
290
|
if (t && t.getPropsConfig)
|
|
288
|
-
return t.getPropsConfig(...
|
|
291
|
+
return t.getPropsConfig(...u);
|
|
292
|
+
}
|
|
293
|
+
function P() {
|
|
294
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((u) => {
|
|
295
|
+
var C;
|
|
296
|
+
let w = u.id;
|
|
297
|
+
u.type === "component-ref" && (w = u.component);
|
|
298
|
+
const b = n.value.querySelector(`#${w}-design-item`);
|
|
299
|
+
(C = b == null ? void 0 : b.componentInstance) != null && C.value.onRemoveComponent && b.componentInstance.value.onRemoveComponent();
|
|
300
|
+
});
|
|
289
301
|
}
|
|
290
|
-
return
|
|
291
|
-
canMove:
|
|
302
|
+
return c.value = {
|
|
303
|
+
canMove: r(),
|
|
292
304
|
canSelectParent: f(),
|
|
293
|
-
canDelete:
|
|
294
|
-
canNested: !
|
|
305
|
+
canDelete: m(),
|
|
306
|
+
canNested: !i(),
|
|
295
307
|
contents: e == null ? void 0 : e.schema.contents,
|
|
296
|
-
elementRef:
|
|
297
|
-
parent: (
|
|
308
|
+
elementRef: n,
|
|
309
|
+
parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
|
|
298
310
|
schema: e == null ? void 0 : e.schema,
|
|
299
311
|
styles: o,
|
|
300
|
-
designerClass:
|
|
301
|
-
canAccepts:
|
|
302
|
-
getBelongedComponentInstance:
|
|
312
|
+
designerClass: a,
|
|
313
|
+
canAccepts: p,
|
|
314
|
+
getBelongedComponentInstance: s,
|
|
303
315
|
getDraggableDesignItemElement: l,
|
|
304
|
-
getDraggingDisplayText:
|
|
305
|
-
getPropConfig:
|
|
306
|
-
getDragScopeElement:
|
|
307
|
-
onAcceptMovedChildElement:
|
|
308
|
-
onChildElementMovedOut:
|
|
309
|
-
addNewChildComponentSchema:
|
|
310
|
-
updateDragAndDropRules: n,
|
|
316
|
+
getDraggingDisplayText: d,
|
|
317
|
+
getPropConfig: g,
|
|
318
|
+
getDragScopeElement: v,
|
|
319
|
+
onAcceptMovedChildElement: y,
|
|
320
|
+
onChildElementMovedOut: M,
|
|
321
|
+
addNewChildComponentSchema: h,
|
|
311
322
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
|
|
312
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1)
|
|
313
|
-
|
|
323
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1),
|
|
324
|
+
onRemoveComponent: P
|
|
325
|
+
}, c;
|
|
314
326
|
}
|
|
315
|
-
class
|
|
327
|
+
class me {
|
|
316
328
|
getTemplateRule(e, t) {
|
|
317
|
-
const
|
|
318
|
-
if (!
|
|
319
|
-
return
|
|
320
|
-
const r = this.getComponentContext(e);
|
|
321
|
-
return
|
|
322
|
-
if (!
|
|
329
|
+
const o = t == null ? void 0 : t.formSchemaUtils, a = o == null ? void 0 : o.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
330
|
+
if (!a)
|
|
331
|
+
return c;
|
|
332
|
+
const r = this.getComponentContext(e), { componentClassList: f } = r;
|
|
333
|
+
return f.forEach((m) => {
|
|
334
|
+
if (!m || !a[m])
|
|
323
335
|
return;
|
|
324
|
-
const { canMove:
|
|
325
|
-
|
|
326
|
-
}),
|
|
336
|
+
const { canMove: i, canDelete: s, canAccept: l } = a[m];
|
|
337
|
+
c.canMove = c.canMove && this.resolveRuleValue(i, r), c.canDelete = c.canDelete && this.resolveRuleValue(s, r), c.canAccept = c.canAccept && this.resolveRuleValue(l, r);
|
|
338
|
+
}), c;
|
|
327
339
|
}
|
|
328
340
|
resolveRuleValue(e, t) {
|
|
329
341
|
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
330
342
|
}
|
|
331
343
|
parseRuleValueSchema(e, t) {
|
|
332
|
-
const
|
|
333
|
-
let
|
|
334
|
-
for (const
|
|
335
|
-
if (
|
|
336
|
-
if (
|
|
337
|
-
const r = t
|
|
338
|
-
if (r && !r.includes(
|
|
339
|
-
|
|
344
|
+
const o = e.invalidContext || [];
|
|
345
|
+
let a = !0;
|
|
346
|
+
for (const c of o) {
|
|
347
|
+
if (c.firstLevelChild) {
|
|
348
|
+
if (c.firstLevelChild.class) {
|
|
349
|
+
const { firstLevelChildClassList: r } = t;
|
|
350
|
+
if (r && !r.includes(c.firstLevelChild.class)) {
|
|
351
|
+
a = !1;
|
|
340
352
|
continue;
|
|
341
353
|
}
|
|
342
354
|
}
|
|
343
|
-
if (
|
|
344
|
-
const r = t
|
|
345
|
-
if (r
|
|
346
|
-
|
|
355
|
+
if (c.firstLevelChild.type) {
|
|
356
|
+
const { firstLevelChildSchema: r } = t;
|
|
357
|
+
if (!r || r.type !== c.firstLevelChild.type) {
|
|
358
|
+
a = !1;
|
|
347
359
|
continue;
|
|
348
360
|
}
|
|
349
361
|
}
|
|
350
362
|
}
|
|
351
|
-
if (
|
|
352
|
-
if (
|
|
353
|
-
const r = t
|
|
354
|
-
if (r && !r.includes(
|
|
355
|
-
|
|
363
|
+
if (c.secondLevelChild) {
|
|
364
|
+
if (c.secondLevelChild.class) {
|
|
365
|
+
const { secondLevelChildClassList: r } = t;
|
|
366
|
+
if (r && !r.includes(c.secondLevelChild.class)) {
|
|
367
|
+
a = !1;
|
|
356
368
|
continue;
|
|
357
369
|
}
|
|
358
370
|
}
|
|
359
|
-
if (
|
|
360
|
-
const r = t
|
|
361
|
-
if (r
|
|
362
|
-
|
|
371
|
+
if (c.secondLevelChild.type) {
|
|
372
|
+
const { secondLevelChildSchema: r } = t;
|
|
373
|
+
if (!r || r.type !== c.secondLevelChild.type) {
|
|
374
|
+
a = !1;
|
|
363
375
|
continue;
|
|
364
376
|
}
|
|
365
377
|
}
|
|
366
378
|
}
|
|
367
|
-
if (
|
|
368
|
-
if (
|
|
369
|
-
const r = t
|
|
370
|
-
if (r && !r.includes(
|
|
371
|
-
|
|
379
|
+
if (c.parent) {
|
|
380
|
+
if (c.parent.class) {
|
|
381
|
+
const { parentClassList: r } = t;
|
|
382
|
+
if (r && !r.includes(c.parent.class)) {
|
|
383
|
+
a = !1;
|
|
372
384
|
continue;
|
|
373
385
|
}
|
|
374
386
|
}
|
|
375
|
-
if (
|
|
376
|
-
const r = t
|
|
377
|
-
if (r && r.type !==
|
|
378
|
-
|
|
387
|
+
if (c.parent.type) {
|
|
388
|
+
const { parentSchema: r } = t;
|
|
389
|
+
if (r && r.type !== c.parent.type) {
|
|
390
|
+
a = !1;
|
|
379
391
|
continue;
|
|
380
392
|
}
|
|
381
393
|
}
|
|
382
394
|
}
|
|
383
|
-
|
|
395
|
+
a = !0;
|
|
384
396
|
break;
|
|
385
397
|
}
|
|
386
|
-
return !
|
|
398
|
+
return !a;
|
|
387
399
|
}
|
|
388
400
|
getComponentContext(e) {
|
|
389
|
-
var
|
|
390
|
-
const t = e.schema,
|
|
401
|
+
var y, h, M, g;
|
|
402
|
+
const t = e.schema, o = t.appearance && t.appearance.class || "", a = o.split(" ") || [], c = t.contents || [], r = c.length ? c[0] : null, f = r && r.appearance ? r.appearance.class : "", m = f ? f.split(" ") : [], i = (y = r == null ? void 0 : r.contents) != null && y.length ? r == null ? void 0 : r.contents[0] : null, s = i && i.appearance ? i.appearance.class : "", l = s ? s.split(" ") : [], p = t.type === "component" ? (M = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : M.schema : (g = e.parent) == null ? void 0 : g.schema, d = p && p.appearance && p.appearance.class || "", v = d ? d.split(" ") : [];
|
|
391
403
|
return {
|
|
392
|
-
componentClass:
|
|
393
|
-
componentClassList:
|
|
394
|
-
childContents:
|
|
404
|
+
componentClass: o,
|
|
405
|
+
componentClassList: a,
|
|
406
|
+
childContents: c,
|
|
395
407
|
firstLevelChildSchema: r,
|
|
396
|
-
firstLevelChildClass:
|
|
397
|
-
firstLevelChildClassList:
|
|
398
|
-
secondLevelChildSchema:
|
|
399
|
-
secondLevelChildClass:
|
|
400
|
-
secondLevelChildClassList:
|
|
401
|
-
parentSchema:
|
|
408
|
+
firstLevelChildClass: f,
|
|
409
|
+
firstLevelChildClassList: m,
|
|
410
|
+
secondLevelChildSchema: i,
|
|
411
|
+
secondLevelChildClass: s,
|
|
412
|
+
secondLevelChildClassList: l,
|
|
413
|
+
parentSchema: p,
|
|
402
414
|
parentClass: d,
|
|
403
|
-
parentClassList:
|
|
415
|
+
parentClassList: v
|
|
404
416
|
};
|
|
405
417
|
}
|
|
406
418
|
}
|
|
407
|
-
class
|
|
419
|
+
class de {
|
|
408
420
|
constructor(e, t) {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
+
V(this, "componentId");
|
|
422
|
+
V(this, "viewModelId");
|
|
423
|
+
V(this, "eventsEditorUtils");
|
|
424
|
+
V(this, "formSchemaUtils");
|
|
425
|
+
V(this, "formMetadataConverter");
|
|
426
|
+
V(this, "designViewModelUtils");
|
|
427
|
+
V(this, "designViewModelField");
|
|
428
|
+
V(this, "controlCreatorUtils");
|
|
429
|
+
V(this, "designerHostService");
|
|
430
|
+
V(this, "schemaService", null);
|
|
431
|
+
V(this, "metadataService", null);
|
|
432
|
+
V(this, "propertyConfig", {
|
|
421
433
|
type: "object",
|
|
422
434
|
categories: {}
|
|
423
435
|
});
|
|
424
|
-
var
|
|
425
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
436
|
+
var o;
|
|
437
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
426
438
|
}
|
|
427
439
|
getTableInfo() {
|
|
428
440
|
var e;
|
|
429
441
|
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
430
442
|
}
|
|
431
443
|
setDesignViewModelField(e) {
|
|
444
|
+
var o;
|
|
432
445
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
433
446
|
if (t) {
|
|
434
447
|
if (!this.designViewModelField) {
|
|
435
|
-
const
|
|
436
|
-
this.designViewModelField =
|
|
448
|
+
const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
449
|
+
this.designViewModelField = a.fields.find((c) => c.id === t);
|
|
437
450
|
}
|
|
438
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
451
|
+
e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
439
452
|
}
|
|
440
453
|
}
|
|
441
454
|
changeFieldEditorType(e, t) {
|
|
@@ -459,7 +472,7 @@ class ue {
|
|
|
459
472
|
type: "combo-list",
|
|
460
473
|
textField: "name",
|
|
461
474
|
valueField: "value",
|
|
462
|
-
data: [{ value: e.type, name:
|
|
475
|
+
data: [{ value: e.type, name: ee[e.type].name }]
|
|
463
476
|
}
|
|
464
477
|
}
|
|
465
478
|
}
|
|
@@ -492,14 +505,14 @@ class ue {
|
|
|
492
505
|
* @returns
|
|
493
506
|
*/
|
|
494
507
|
updateElementByParentContainer(e, t) {
|
|
495
|
-
const
|
|
496
|
-
if (!
|
|
508
|
+
const o = t && t.parent && t.parent.schema;
|
|
509
|
+
if (!o)
|
|
497
510
|
return;
|
|
498
|
-
const
|
|
499
|
-
|
|
511
|
+
const a = o.contents.findIndex((r) => r.id === e), c = N(o.contents[a]);
|
|
512
|
+
o.contents.splice(a, 1), o.contents.splice(a, 0, c);
|
|
500
513
|
}
|
|
501
514
|
}
|
|
502
|
-
class
|
|
515
|
+
class he extends de {
|
|
503
516
|
constructor(e, t) {
|
|
504
517
|
super(e, t);
|
|
505
518
|
}
|
|
@@ -516,67 +529,105 @@ class fe extends ue {
|
|
|
516
529
|
label: "onAfterViewInit",
|
|
517
530
|
name: "视图初始化后事件"
|
|
518
531
|
}
|
|
519
|
-
];
|
|
520
|
-
|
|
521
|
-
const o = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
|
|
522
|
-
i[n.viewModelId] = {
|
|
532
|
+
], o = this, a = o.eventsEditorUtils.formProperties(e, o.viewModelId, t), c = {};
|
|
533
|
+
c[o.viewModelId] = {
|
|
523
534
|
type: "events-editor",
|
|
524
535
|
editor: {
|
|
525
|
-
initialData:
|
|
536
|
+
initialData: a
|
|
526
537
|
}
|
|
527
538
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
528
539
|
title: "事件",
|
|
529
540
|
hideTitle: !0,
|
|
530
|
-
properties:
|
|
541
|
+
properties: c,
|
|
531
542
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
532
543
|
refreshPanelAfterChanged: !0,
|
|
533
544
|
tabId: "commands",
|
|
534
545
|
tabName: "交互",
|
|
535
|
-
setPropertyRelates(r,
|
|
536
|
-
const
|
|
537
|
-
delete e[
|
|
546
|
+
setPropertyRelates(r, f) {
|
|
547
|
+
const m = r.propertyValue;
|
|
548
|
+
delete e[o.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(e, o.viewModelId, m.events, m));
|
|
538
549
|
}
|
|
539
550
|
};
|
|
540
551
|
}
|
|
541
552
|
}
|
|
542
|
-
function
|
|
543
|
-
const t = new
|
|
544
|
-
function
|
|
553
|
+
function ye(n, e) {
|
|
554
|
+
const t = new me(), { canMove: o, canDelete: a } = t.getTemplateRule(n, e);
|
|
555
|
+
function c() {
|
|
545
556
|
return !1;
|
|
546
557
|
}
|
|
547
558
|
function r() {
|
|
548
|
-
return
|
|
549
|
-
}
|
|
550
|
-
function u() {
|
|
551
|
-
return n;
|
|
559
|
+
return a;
|
|
552
560
|
}
|
|
553
561
|
function f() {
|
|
562
|
+
return o;
|
|
563
|
+
}
|
|
564
|
+
function m() {
|
|
554
565
|
return !1;
|
|
555
566
|
}
|
|
556
|
-
function
|
|
567
|
+
function i() {
|
|
557
568
|
return " display: inherit;flex-direction: inherit;margin-bottom:10px";
|
|
558
569
|
}
|
|
559
|
-
function
|
|
560
|
-
const
|
|
561
|
-
return
|
|
570
|
+
function s(y) {
|
|
571
|
+
const h = new he(y, e), { schema: M } = n;
|
|
572
|
+
return h.getPropertyConfig(M);
|
|
573
|
+
}
|
|
574
|
+
function l() {
|
|
575
|
+
var P, T, u, w;
|
|
576
|
+
const y = n == null ? void 0 : n.schema, M = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(y.id);
|
|
577
|
+
if (y.componentType !== "data-grid" && y.componentType !== "form" || !((P = n.componentInstance) != null && P.value.parent))
|
|
578
|
+
return;
|
|
579
|
+
const g = (T = n.componentInstance) == null ? void 0 : T.value.parent.schema;
|
|
580
|
+
if ((u = g == null ? void 0 : g.toolbar) != null && u.buttons && g.toolbar.buttons.length) {
|
|
581
|
+
g.toolbar.buttons.forEach((C) => {
|
|
582
|
+
const E = C.onClick, k = E && E.split(".");
|
|
583
|
+
if (!k || k.length < 3)
|
|
584
|
+
return;
|
|
585
|
+
k[k.length - 2] === M && (C.needRemove = !0);
|
|
586
|
+
}), g.toolbar.buttons = g.toolbar.buttons.filter((C) => !C.needRemove);
|
|
587
|
+
const b = (w = n.componentInstance) == null ? void 0 : w.value.parent;
|
|
588
|
+
b.parent && b.parent.updateToolbarItems && b.parent.updateToolbarItems();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function p() {
|
|
592
|
+
const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema;
|
|
593
|
+
if (y && h) {
|
|
594
|
+
const g = h.getViewModelIdByComponentId(M.id);
|
|
595
|
+
y.deleteViewModelById(g), h.deleteComponent(M.id);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
function d() {
|
|
599
|
+
const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema, g = h.getViewModelIdByComponentId(M.id);
|
|
600
|
+
y.getDgViewModel(g).fields.forEach((P) => {
|
|
601
|
+
if (h.getExpressions() && h.getExpressions().length) {
|
|
602
|
+
const T = h.getExpressions().findIndex((u) => u.fieldId === P.id);
|
|
603
|
+
T > -1 && h.getExpressions().splice(T, 1);
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
function v() {
|
|
608
|
+
l(), d(), p();
|
|
562
609
|
}
|
|
563
|
-
return { canAccepts:
|
|
610
|
+
return { canAccepts: c, checkCanDeleteComponent: r, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: m, getStyles: i, getPropsConfig: s, onRemoveComponent: v };
|
|
564
611
|
}
|
|
565
|
-
const
|
|
612
|
+
const ge = /* @__PURE__ */ O({
|
|
566
613
|
name: "FComponetDesign",
|
|
567
|
-
props:
|
|
614
|
+
props: L,
|
|
568
615
|
emits: [],
|
|
569
|
-
setup(
|
|
570
|
-
const t = D(),
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
616
|
+
setup(n, e) {
|
|
617
|
+
const t = D(), o = A("designer-host-service"), a = A("design-item-context"), c = ye(a, o), r = fe(t, a, c), f = Y(() => Z({
|
|
618
|
+
"drag-container": !0
|
|
619
|
+
}, n == null ? void 0 : n.customClass));
|
|
620
|
+
return j(() => {
|
|
621
|
+
var m, i, s, l;
|
|
622
|
+
t.value.componentInstance = r, ((i = (m = a.parent) == null ? void 0 : m.schema) == null ? void 0 : i.type) === "component-ref" && (r.value.parent = (l = (s = a.parent) == null ? void 0 : s.parent) == null ? void 0 : l.componentInstance);
|
|
623
|
+
}), e.expose(r.value), () => S("div", {
|
|
574
624
|
ref: t,
|
|
575
|
-
class:
|
|
576
|
-
|
|
625
|
+
class: f.value,
|
|
626
|
+
style: n.customStyle,
|
|
627
|
+
"data-dragref": `${a.schema.id}-container`
|
|
577
628
|
}, [e.slots.default && e.slots.default()]);
|
|
578
629
|
}
|
|
579
|
-
}),
|
|
630
|
+
}), be = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/component.schema.json", Me = "component-ref", we = "A Farris Visual Component", Ce = "object", Ve = {
|
|
580
631
|
id: {
|
|
581
632
|
description: "The unique identifier for a Section",
|
|
582
633
|
type: "string"
|
|
@@ -591,37 +642,37 @@ const de = /* @__PURE__ */ $({
|
|
|
591
642
|
type: "string",
|
|
592
643
|
default: ""
|
|
593
644
|
}
|
|
594
|
-
},
|
|
645
|
+
}, Pe = [
|
|
595
646
|
"id",
|
|
596
647
|
"type",
|
|
597
648
|
"component"
|
|
598
|
-
],
|
|
599
|
-
$schema:
|
|
600
|
-
$id:
|
|
601
|
-
title:
|
|
602
|
-
description:
|
|
649
|
+
], Te = {
|
|
650
|
+
$schema: be,
|
|
651
|
+
$id: ve,
|
|
652
|
+
title: Me,
|
|
653
|
+
description: we,
|
|
603
654
|
type: Ce,
|
|
604
|
-
properties:
|
|
605
|
-
required:
|
|
606
|
-
},
|
|
655
|
+
properties: Ve,
|
|
656
|
+
required: Pe
|
|
657
|
+
}, De = {
|
|
607
658
|
id: { type: String },
|
|
608
659
|
component: { type: String, default: "" }
|
|
609
|
-
},
|
|
610
|
-
install(
|
|
611
|
-
|
|
660
|
+
}, Ee = W(De, Te, _, Q), Fe = {
|
|
661
|
+
install(n) {
|
|
662
|
+
n.component(B.name, B);
|
|
612
663
|
},
|
|
613
|
-
register(
|
|
614
|
-
|
|
664
|
+
register(n, e, t, o) {
|
|
665
|
+
n.component = B, e.component = F;
|
|
615
666
|
},
|
|
616
|
-
registerDesigner(
|
|
617
|
-
|
|
667
|
+
registerDesigner(n, e) {
|
|
668
|
+
n.component = ge, e.component = F, e["component-ref"] = Ee;
|
|
618
669
|
}
|
|
619
670
|
};
|
|
620
671
|
export {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
672
|
+
B as Component,
|
|
673
|
+
ge as ComponentDesign,
|
|
674
|
+
$e as componentDesignProps,
|
|
675
|
+
L as componentProps,
|
|
676
|
+
Fe as default,
|
|
677
|
+
F as propsResolver
|
|
627
678
|
};
|