@farris/ui-vue 1.2.9 → 1.3.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/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- 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/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,110 +1,152 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var J = (a, e, t) => e in a ? z(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var y = (a, e, t) => J(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as $, onBeforeMount as Q, onMounted as F, createVNode as j, ref as D, inject as E } from "vue";
|
|
5
|
+
import { isPlainObject as B, cloneDeep as N } from "lodash-es";
|
|
6
|
+
const O = {}, U = {};
|
|
7
|
+
function S(a) {
|
|
8
|
+
const { properties: e, title: t, ignore: n } = a, o = n && Array.isArray(n), i = Object.keys(e).reduce((r, u) => ((!o || !n.find((f) => f == u)) && (r[u] = e[u].type === "object" && e[u].properties ? S(e[u]) : N(e[u].default)), r), {});
|
|
9
|
+
return t && (!o || !n.find((r) => r == "id")) && (i.id = `${t}-${Date.now()}`), i;
|
|
7
10
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
11
|
+
function q(a, e = {}, t) {
|
|
12
|
+
const n = O[a];
|
|
13
|
+
if (n) {
|
|
14
|
+
let o = S(n);
|
|
15
|
+
const i = U[a];
|
|
16
|
+
return o = i ? i({ getSchemaByType: q }, o, e, t) : o, o;
|
|
14
17
|
}
|
|
15
18
|
return null;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
const t =
|
|
19
|
-
return Object.keys(
|
|
20
|
+
function X(a, e) {
|
|
21
|
+
const t = S(e);
|
|
22
|
+
return Object.keys(a).reduce((n, o) => (n[o] && B(n[o]) && B(a[o]) ? Object.assign(n[o], a[o]) : n[o] = a[o], n), t), t;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
22
|
-
return Object.keys(
|
|
23
|
-
if (e.has(
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
|
|
24
|
+
function Y(a, e) {
|
|
25
|
+
return Object.keys(a).filter((n) => a[n] != null).reduce((n, o) => {
|
|
26
|
+
if (e.has(o)) {
|
|
27
|
+
const i = e.get(o);
|
|
28
|
+
if (typeof i == "string")
|
|
29
|
+
n[i] = a[o];
|
|
27
30
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
31
|
+
const r = i(o, a[o], a);
|
|
32
|
+
Object.assign(n, r);
|
|
30
33
|
}
|
|
31
34
|
} else
|
|
32
|
-
|
|
33
|
-
return
|
|
35
|
+
n[o] = a[o];
|
|
36
|
+
return n;
|
|
34
37
|
}, {});
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
+
function Z(a, e, t = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const n = X(a, e);
|
|
41
|
+
return Y(n, t);
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
function e(
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
43
|
+
function H(a = {}) {
|
|
44
|
+
function e(s, c, p, l) {
|
|
45
|
+
if (typeof p == "number")
|
|
46
|
+
return l[s].length === p;
|
|
47
|
+
if (typeof p == "object") {
|
|
48
|
+
const d = Object.keys(p)[0], h = p[d];
|
|
49
|
+
if (d === "not")
|
|
50
|
+
return Number(l[s].length) !== Number(h);
|
|
51
|
+
if (d === "moreThan")
|
|
52
|
+
return Number(l[s].length) >= Number(h);
|
|
53
|
+
if (d === "lessThan")
|
|
54
|
+
return Number(l[s].length) <= Number(h);
|
|
52
55
|
}
|
|
53
56
|
return !1;
|
|
54
57
|
}
|
|
55
|
-
function t(
|
|
56
|
-
return
|
|
58
|
+
function t(s, c, p, l) {
|
|
59
|
+
return l[s] && l[s].propertyValue && String(l[s].propertyValue.value) === String(p);
|
|
57
60
|
}
|
|
58
|
-
const
|
|
61
|
+
const n = /* @__PURE__ */ new Map([
|
|
59
62
|
["length", e],
|
|
60
63
|
["getProperty", t]
|
|
61
64
|
]);
|
|
62
|
-
Object.keys(
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const
|
|
69
|
-
return { target:
|
|
65
|
+
Object.keys(a).reduce((s, c) => (s.set(c, a[c]), s), n);
|
|
66
|
+
function o(s, c) {
|
|
67
|
+
const p = s;
|
|
68
|
+
return typeof c == "number" ? [{ target: p, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: p, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((l) => {
|
|
69
|
+
if (l === "length")
|
|
70
|
+
return { target: p, operator: "length", param: null, value: c[l] };
|
|
71
|
+
const d = l, h = c[l];
|
|
72
|
+
return { target: p, operator: "getProperty", param: d, value: h };
|
|
70
73
|
}) : [];
|
|
71
74
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(
|
|
74
|
-
const
|
|
75
|
-
return
|
|
75
|
+
function i(s) {
|
|
76
|
+
return Object.keys(s).reduce((p, l) => {
|
|
77
|
+
const d = o(l, s[l]);
|
|
78
|
+
return p.push(...d), p;
|
|
76
79
|
}, []);
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
81
|
+
function r(s, c) {
|
|
82
|
+
if (n.has(s.operator)) {
|
|
83
|
+
const p = n.get(s.operator);
|
|
84
|
+
return p && p(s.target, s.param, s.value, c) || !1;
|
|
82
85
|
}
|
|
83
86
|
return !1;
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
88
|
+
function u(s, c) {
|
|
89
|
+
return i(s).reduce((d, h) => d && r(h, c), !0);
|
|
87
90
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
+
function f(s, c) {
|
|
92
|
+
const p = Object.keys(s), l = p.includes("allOf"), d = p.includes("anyOf"), h = l || d, C = (h ? s[h ? l ? "allOf" : "anyOf" : "allOf"] : [s]).map((L) => u(L, c));
|
|
93
|
+
return l ? !C.includes(!1) : C.includes(!0);
|
|
91
94
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: f };
|
|
93
96
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const K = {
|
|
98
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
101
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
102
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
103
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
104
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
105
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
106
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
107
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
108
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
109
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
110
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
111
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
112
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
113
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
114
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
116
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
117
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
118
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
119
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
120
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
121
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
122
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
123
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
124
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
125
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
126
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
127
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
128
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
129
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
130
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
131
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
132
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
136
|
+
}, I = {}, x = {};
|
|
137
|
+
H();
|
|
138
|
+
function G(a, e, t = /* @__PURE__ */ new Map(), n = (r, u, f) => u, o = {}, i = (r) => r) {
|
|
139
|
+
return O[e.title] = e, U[e.title] = n, I[e.title] = o, x[e.title] = i, (r = {}) => {
|
|
140
|
+
const u = Z(r, e, t), f = Object.keys(a).reduce((s, c) => (s[c] = a[c].default, s), {});
|
|
141
|
+
return Object.assign(f, u);
|
|
100
142
|
};
|
|
101
143
|
}
|
|
102
|
-
function
|
|
144
|
+
function ee(a, e) {
|
|
103
145
|
return { customClass: e.class, customStyle: e.style };
|
|
104
146
|
}
|
|
105
|
-
const
|
|
106
|
-
["appearance",
|
|
107
|
-
]),
|
|
147
|
+
const W = /* @__PURE__ */ new Map([
|
|
148
|
+
["appearance", ee]
|
|
149
|
+
]), te = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/component.schema.json", oe = "component", re = "A Farris Visual Component", ie = "object", ae = {
|
|
108
150
|
id: {
|
|
109
151
|
description: "The unique identifier for a component",
|
|
110
152
|
type: "string"
|
|
@@ -144,975 +186,397 @@ const H = /* @__PURE__ */ new Map([
|
|
|
144
186
|
description: "",
|
|
145
187
|
type: "boolean",
|
|
146
188
|
default: !0
|
|
189
|
+
},
|
|
190
|
+
onInit: {
|
|
191
|
+
description: "初始化事件",
|
|
192
|
+
type: "string",
|
|
193
|
+
default: ""
|
|
194
|
+
},
|
|
195
|
+
onAfterViewInit: {
|
|
196
|
+
description: "视图初始化后事件",
|
|
197
|
+
type: "string",
|
|
198
|
+
default: ""
|
|
147
199
|
}
|
|
148
|
-
},
|
|
200
|
+
}, se = [
|
|
149
201
|
"id",
|
|
150
202
|
"type",
|
|
151
203
|
"contents"
|
|
152
|
-
],
|
|
153
|
-
$schema:
|
|
154
|
-
$id:
|
|
155
|
-
title:
|
|
156
|
-
description:
|
|
157
|
-
type:
|
|
204
|
+
], ce = {
|
|
205
|
+
$schema: te,
|
|
206
|
+
$id: ne,
|
|
207
|
+
title: oe,
|
|
208
|
+
description: re,
|
|
209
|
+
type: ie,
|
|
158
210
|
properties: ae,
|
|
159
|
-
required:
|
|
211
|
+
required: se
|
|
160
212
|
};
|
|
161
|
-
function
|
|
213
|
+
function _(a, e, t) {
|
|
162
214
|
return e;
|
|
163
215
|
}
|
|
164
|
-
const
|
|
165
|
-
basic: {
|
|
166
|
-
description: "Basic Infomation",
|
|
167
|
-
title: "基本信息",
|
|
168
|
-
properties: {
|
|
169
|
-
id: {
|
|
170
|
-
description: "组件标识",
|
|
171
|
-
title: "标识",
|
|
172
|
-
type: "string",
|
|
173
|
-
readonly: !0
|
|
174
|
-
},
|
|
175
|
-
type: {
|
|
176
|
-
description: "组件类型",
|
|
177
|
-
title: "控件类型",
|
|
178
|
-
type: "select",
|
|
179
|
-
editor: {
|
|
180
|
-
type: "combo-list",
|
|
181
|
-
textField: "value",
|
|
182
|
-
valueField: "key",
|
|
183
|
-
data: [
|
|
184
|
-
{
|
|
185
|
-
key: "component",
|
|
186
|
-
value: "组件"
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
appearance: {
|
|
194
|
-
description: "",
|
|
195
|
-
title: "外观",
|
|
196
|
-
properties: {
|
|
197
|
-
class: {
|
|
198
|
-
description: "组件的CSS样式",
|
|
199
|
-
title: "class样式"
|
|
200
|
-
},
|
|
201
|
-
style: {
|
|
202
|
-
description: "组件的内容样式",
|
|
203
|
-
title: "style样式"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, be = {
|
|
208
|
-
title: ue,
|
|
209
|
-
description: fe,
|
|
210
|
-
type: de,
|
|
211
|
-
categories: ye
|
|
212
|
-
}, F = {
|
|
216
|
+
const T = {
|
|
213
217
|
id: { type: String },
|
|
214
218
|
customClass: { type: String, default: "" },
|
|
215
|
-
componentType: { type: String, default: "" }
|
|
216
|
-
|
|
219
|
+
componentType: { type: String, default: "" },
|
|
220
|
+
formColumns: { type: Number, default: 4 }
|
|
221
|
+
}, A = G(T, ce, W, _), Se = Object.assign({}, T, { componentId: { type: String, default: "" } }), V = /* @__PURE__ */ $({
|
|
217
222
|
name: "FComponent",
|
|
218
|
-
props:
|
|
223
|
+
props: T,
|
|
219
224
|
emits: ["init", "afterViewInit"],
|
|
220
|
-
setup(
|
|
221
|
-
return
|
|
222
|
-
e.emit("init",
|
|
223
|
-
}),
|
|
224
|
-
e.emit("afterViewInit",
|
|
225
|
-
}), () =>
|
|
226
|
-
class:
|
|
225
|
+
setup(a, e) {
|
|
226
|
+
return Q(() => {
|
|
227
|
+
e.emit("init", a.id);
|
|
228
|
+
}), F(() => {
|
|
229
|
+
e.emit("afterViewInit", a.id);
|
|
230
|
+
}), () => j("div", {
|
|
231
|
+
class: a.customClass
|
|
227
232
|
}, [e.slots.default && e.slots.default()]);
|
|
228
233
|
}
|
|
229
234
|
});
|
|
230
|
-
function
|
|
231
|
-
var
|
|
232
|
-
function
|
|
235
|
+
function pe(a, e, t) {
|
|
236
|
+
var k;
|
|
237
|
+
function n() {
|
|
233
238
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
234
239
|
}
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
function
|
|
240
|
+
n();
|
|
241
|
+
const o = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = D();
|
|
242
|
+
function u() {
|
|
238
243
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
239
244
|
}
|
|
240
|
-
function
|
|
245
|
+
function f() {
|
|
241
246
|
return !1;
|
|
242
247
|
}
|
|
243
|
-
function
|
|
248
|
+
function s() {
|
|
244
249
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
245
250
|
}
|
|
246
|
-
function
|
|
251
|
+
function c() {
|
|
247
252
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
248
253
|
}
|
|
249
|
-
function
|
|
250
|
-
if (!
|
|
254
|
+
function p(m) {
|
|
255
|
+
if (!m || !m.value)
|
|
251
256
|
return null;
|
|
252
|
-
if (
|
|
253
|
-
return
|
|
254
|
-
const
|
|
255
|
-
return
|
|
257
|
+
if (m.value.schema && m.value.schema.type === "component")
|
|
258
|
+
return m.value;
|
|
259
|
+
const g = D(m == null ? void 0 : m.value.parent), v = p(g);
|
|
260
|
+
return v || null;
|
|
256
261
|
}
|
|
257
|
-
function
|
|
258
|
-
const { componentInstance:
|
|
259
|
-
return !
|
|
262
|
+
function l(m = e) {
|
|
263
|
+
const { componentInstance: g, designerItemElementRef: v } = m;
|
|
264
|
+
return !g || !g.value ? null : g.value.canMove ? v : l(m.parent);
|
|
260
265
|
}
|
|
261
|
-
function m
|
|
262
|
-
return !!t && t.canAccepts(
|
|
266
|
+
function d(m) {
|
|
267
|
+
return !!t && t.canAccepts(m);
|
|
263
268
|
}
|
|
264
|
-
function
|
|
269
|
+
function h() {
|
|
265
270
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
266
271
|
}
|
|
267
|
-
function
|
|
268
|
-
}
|
|
269
|
-
function o(u, v) {
|
|
270
|
-
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
272
|
+
function M() {
|
|
271
273
|
}
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
-
let T = V(C, u, v);
|
|
275
|
-
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(u, T));
|
|
276
|
-
const O = C.toLowerCase().replace("-", "_");
|
|
277
|
-
return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
|
|
274
|
+
function w(m, g) {
|
|
275
|
+
g && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(g);
|
|
278
276
|
}
|
|
279
|
-
function
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return $ && !$.id && $.type === C && ($.id = `${M}_${Math.random().toString().slice(2, 6)}`), $;
|
|
277
|
+
function C(m, g) {
|
|
278
|
+
const { componentType: v } = m;
|
|
279
|
+
let b = q(v, m, g);
|
|
280
|
+
t && t.onResolveNewComponentSchema && (b = t.onResolveNewComponentSchema(m, b));
|
|
281
|
+
const R = v.toLowerCase().replace("-", "_");
|
|
282
|
+
return b && !b.id && b.type === v && (b.id = `${R}_${Math.random().toString().slice(2, 6)}`), b;
|
|
286
283
|
}
|
|
287
|
-
function
|
|
284
|
+
function P(m) {
|
|
288
285
|
}
|
|
289
|
-
function
|
|
286
|
+
function L(...m) {
|
|
290
287
|
if (t && t.getPropsConfig)
|
|
291
|
-
return t.getPropsConfig(...
|
|
288
|
+
return t.getPropsConfig(...m);
|
|
292
289
|
}
|
|
293
|
-
return
|
|
294
|
-
canMove:
|
|
295
|
-
canSelectParent:
|
|
296
|
-
canDelete:
|
|
297
|
-
canNested: !
|
|
290
|
+
return r.value = {
|
|
291
|
+
canMove: u(),
|
|
292
|
+
canSelectParent: f(),
|
|
293
|
+
canDelete: s(),
|
|
294
|
+
canNested: !c(),
|
|
298
295
|
contents: e == null ? void 0 : e.schema.contents,
|
|
299
|
-
elementRef:
|
|
300
|
-
parent: (
|
|
296
|
+
elementRef: a,
|
|
297
|
+
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
301
298
|
schema: e == null ? void 0 : e.schema,
|
|
302
|
-
styles:
|
|
303
|
-
designerClass:
|
|
304
|
-
canAccepts:
|
|
305
|
-
getBelongedComponentInstance:
|
|
306
|
-
getDraggableDesignItemElement:
|
|
307
|
-
getDraggingDisplayText:
|
|
308
|
-
getPropConfig:
|
|
309
|
-
getDragScopeElement:
|
|
310
|
-
onAcceptMovedChildElement:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}, h;
|
|
299
|
+
styles: o,
|
|
300
|
+
designerClass: i,
|
|
301
|
+
canAccepts: d,
|
|
302
|
+
getBelongedComponentInstance: p,
|
|
303
|
+
getDraggableDesignItemElement: l,
|
|
304
|
+
getDraggingDisplayText: h,
|
|
305
|
+
getPropConfig: L,
|
|
306
|
+
getDragScopeElement: M,
|
|
307
|
+
onAcceptMovedChildElement: w,
|
|
308
|
+
onChildElementMovedOut: P,
|
|
309
|
+
addNewChildComponentSchema: C,
|
|
310
|
+
updateDragAndDropRules: n,
|
|
311
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
|
|
312
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1)
|
|
313
|
+
}, r;
|
|
318
314
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"f-struct-form": {
|
|
346
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
347
|
-
type: "object",
|
|
348
|
-
properties: {
|
|
349
|
-
contents: {
|
|
350
|
-
type: "object",
|
|
351
|
-
properties: {
|
|
352
|
-
"f-section-form": {
|
|
353
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
354
|
-
type: "object",
|
|
355
|
-
properties: {
|
|
356
|
-
contents: {
|
|
357
|
-
type: "object",
|
|
358
|
-
properties: {
|
|
359
|
-
"f-form-layout": {
|
|
360
|
-
description: "The class of reponse form",
|
|
361
|
-
type: "object",
|
|
362
|
-
properties: {
|
|
363
|
-
rules: {
|
|
364
|
-
type: "object",
|
|
365
|
-
properties: {
|
|
366
|
-
canAccept: {
|
|
367
|
-
type: "boolean",
|
|
368
|
-
const: !0
|
|
369
|
-
},
|
|
370
|
-
fixed: {
|
|
371
|
-
type: "boolean",
|
|
372
|
-
const: !0
|
|
373
|
-
},
|
|
374
|
-
hidePadding: {
|
|
375
|
-
type: "boolean",
|
|
376
|
-
const: !1
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
rules: {
|
|
385
|
-
type: "object",
|
|
386
|
-
properties: {
|
|
387
|
-
canAccept: {
|
|
388
|
-
type: "boolean",
|
|
389
|
-
const: !1
|
|
390
|
-
},
|
|
391
|
-
fixed: {
|
|
392
|
-
type: "boolean",
|
|
393
|
-
const: !0
|
|
394
|
-
},
|
|
395
|
-
hidePadding: {
|
|
396
|
-
type: "boolean",
|
|
397
|
-
const: !0
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
rules: {
|
|
406
|
-
type: "object",
|
|
407
|
-
properties: {
|
|
408
|
-
canAccept: {
|
|
409
|
-
type: "boolean",
|
|
410
|
-
const: !1
|
|
411
|
-
},
|
|
412
|
-
fixed: {
|
|
413
|
-
type: "boolean",
|
|
414
|
-
const: !1
|
|
415
|
-
},
|
|
416
|
-
hidePadding: {
|
|
417
|
-
type: "boolean",
|
|
418
|
-
const: !0
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
"f-struct-wrapper": {
|
|
425
|
-
description: "",
|
|
426
|
-
type: "object",
|
|
427
|
-
properties: {
|
|
428
|
-
contents: {
|
|
429
|
-
type: "object",
|
|
430
|
-
properties: {
|
|
431
|
-
"f-section-tabs": {
|
|
432
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
433
|
-
type: "object",
|
|
434
|
-
properties: {
|
|
435
|
-
contents: {
|
|
436
|
-
type: "object",
|
|
437
|
-
properties: {
|
|
438
|
-
"f-tabs-in-card": {
|
|
439
|
-
description: "The class of tabs which contains sub-grid.",
|
|
440
|
-
type: "object",
|
|
441
|
-
properties: {
|
|
442
|
-
contents: {
|
|
443
|
-
type: "object",
|
|
444
|
-
properties: {
|
|
445
|
-
"f-struct-data-grid-in-card": {
|
|
446
|
-
description: "The class of sub-grid component",
|
|
447
|
-
type: "object",
|
|
448
|
-
properties: {
|
|
449
|
-
contents: {
|
|
450
|
-
type: "object",
|
|
451
|
-
properties: {
|
|
452
|
-
"f-grid-is-sub": {
|
|
453
|
-
description: "The class of sub-grid",
|
|
454
|
-
type: "object",
|
|
455
|
-
properties: {
|
|
456
|
-
rules: {
|
|
457
|
-
type: "object",
|
|
458
|
-
properties: {
|
|
459
|
-
canAccept: {
|
|
460
|
-
type: "boolean",
|
|
461
|
-
const: !0
|
|
462
|
-
},
|
|
463
|
-
fixed: {
|
|
464
|
-
type: "boolean",
|
|
465
|
-
const: !0
|
|
466
|
-
},
|
|
467
|
-
hidePadding: {
|
|
468
|
-
type: "boolean",
|
|
469
|
-
const: !1
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
rules: {
|
|
478
|
-
type: "object",
|
|
479
|
-
properties: {
|
|
480
|
-
canAccept: {
|
|
481
|
-
type: "boolean",
|
|
482
|
-
const: !1
|
|
483
|
-
},
|
|
484
|
-
fixed: {
|
|
485
|
-
type: "boolean",
|
|
486
|
-
const: !1
|
|
487
|
-
},
|
|
488
|
-
hidePadding: {
|
|
489
|
-
type: "boolean",
|
|
490
|
-
const: !0
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
|
-
rules: {
|
|
499
|
-
type: "object",
|
|
500
|
-
properties: {
|
|
501
|
-
canAccept: {
|
|
502
|
-
type: "boolean",
|
|
503
|
-
const: !1
|
|
504
|
-
},
|
|
505
|
-
fixed: {
|
|
506
|
-
type: "boolean",
|
|
507
|
-
const: !0
|
|
508
|
-
},
|
|
509
|
-
hidePadding: {
|
|
510
|
-
type: "boolean",
|
|
511
|
-
const: !0
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
rules: {
|
|
520
|
-
type: "object",
|
|
521
|
-
properties: {
|
|
522
|
-
canAccept: {
|
|
523
|
-
type: "boolean",
|
|
524
|
-
const: !1
|
|
525
|
-
},
|
|
526
|
-
fixed: {
|
|
527
|
-
type: "boolean",
|
|
528
|
-
const: !0
|
|
529
|
-
},
|
|
530
|
-
hidePadding: {
|
|
531
|
-
type: "boolean",
|
|
532
|
-
const: !0
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
|
-
"f-section-in-main": {
|
|
539
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
540
|
-
type: "object",
|
|
541
|
-
properties: {
|
|
542
|
-
rules: {
|
|
543
|
-
type: "object",
|
|
544
|
-
properties: {
|
|
545
|
-
canAccept: {
|
|
546
|
-
type: "boolean",
|
|
547
|
-
const: !0
|
|
548
|
-
},
|
|
549
|
-
fixed: {
|
|
550
|
-
type: "boolean",
|
|
551
|
-
const: !0
|
|
552
|
-
},
|
|
553
|
-
hidePadding: {
|
|
554
|
-
type: "boolean",
|
|
555
|
-
const: !1
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
rules: {
|
|
564
|
-
type: "object",
|
|
565
|
-
properties: {
|
|
566
|
-
canAccept: {
|
|
567
|
-
type: "boolean",
|
|
568
|
-
const: !1
|
|
569
|
-
},
|
|
570
|
-
fixed: {
|
|
571
|
-
type: "boolean",
|
|
572
|
-
const: !1
|
|
573
|
-
},
|
|
574
|
-
hidePadding: {
|
|
575
|
-
type: "boolean",
|
|
576
|
-
const: !0
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
|
-
rules: {
|
|
585
|
-
type: "object",
|
|
586
|
-
properties: {
|
|
587
|
-
canAccept: {
|
|
588
|
-
type: "boolean",
|
|
589
|
-
const: !0
|
|
590
|
-
},
|
|
591
|
-
fixed: {
|
|
592
|
-
type: "boolean",
|
|
593
|
-
const: !0
|
|
594
|
-
},
|
|
595
|
-
hidePadding: {
|
|
596
|
-
type: "object",
|
|
597
|
-
const: {
|
|
598
|
-
allOf: [
|
|
599
|
-
{
|
|
600
|
-
sibling: 0,
|
|
601
|
-
parent: {
|
|
602
|
-
"f-page-main": !0
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
]
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
},
|
|
612
|
-
"f-struct-data-grid": {
|
|
613
|
-
description: "",
|
|
614
|
-
type: "object",
|
|
615
|
-
properties: {
|
|
616
|
-
rules: {
|
|
617
|
-
type: "object",
|
|
618
|
-
properties: {
|
|
619
|
-
canAccept: {
|
|
620
|
-
type: "object",
|
|
621
|
-
const: !0
|
|
622
|
-
},
|
|
623
|
-
fixed: {
|
|
624
|
-
type: "boolean",
|
|
625
|
-
const: !0
|
|
626
|
-
},
|
|
627
|
-
hidePadding: {
|
|
628
|
-
type: "boolean",
|
|
629
|
-
const: !0
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
"f-page-main-content": {
|
|
636
|
-
description: "",
|
|
637
|
-
type: "object",
|
|
638
|
-
properties: {
|
|
639
|
-
contents: {
|
|
640
|
-
type: "object",
|
|
641
|
-
properties: {
|
|
642
|
-
"f-page-content-nav": {
|
|
643
|
-
description: "",
|
|
644
|
-
type: "object",
|
|
645
|
-
properties: {
|
|
646
|
-
contents: {
|
|
647
|
-
type: "object",
|
|
648
|
-
properties: {
|
|
649
|
-
"f-struct-data-grid-in-nav": {
|
|
650
|
-
description: "",
|
|
651
|
-
type: "object",
|
|
652
|
-
properties: {
|
|
653
|
-
contents: {
|
|
654
|
-
type: "object",
|
|
655
|
-
properties: {
|
|
656
|
-
"f-page-content-nav-extend": {
|
|
657
|
-
description: "",
|
|
658
|
-
type: "object"
|
|
659
|
-
},
|
|
660
|
-
"f-section-in-nav": {
|
|
661
|
-
description: "",
|
|
662
|
-
type: "object",
|
|
663
|
-
properties: {
|
|
664
|
-
rules: {
|
|
665
|
-
type: "object",
|
|
666
|
-
properties: {
|
|
667
|
-
canAccept: {
|
|
668
|
-
type: "boolean",
|
|
669
|
-
const: !1
|
|
670
|
-
},
|
|
671
|
-
fixed: {
|
|
672
|
-
type: "boolean",
|
|
673
|
-
const: !0
|
|
674
|
-
},
|
|
675
|
-
hidePadding: {
|
|
676
|
-
type: "boolean",
|
|
677
|
-
const: !1
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
rules: {
|
|
686
|
-
type: "object",
|
|
687
|
-
properties: {
|
|
688
|
-
canAccept: {
|
|
689
|
-
type: "boolean",
|
|
690
|
-
const: !0
|
|
691
|
-
},
|
|
692
|
-
fixed: {
|
|
693
|
-
type: "boolean",
|
|
694
|
-
const: !1
|
|
695
|
-
},
|
|
696
|
-
hidePadding: {
|
|
697
|
-
type: "boolean",
|
|
698
|
-
const: !0
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
},
|
|
708
|
-
"f-page-content-main": {
|
|
709
|
-
description: "",
|
|
710
|
-
type: "object",
|
|
711
|
-
properties: {}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
"f-page-content": {
|
|
718
|
-
description: "",
|
|
719
|
-
type: "object",
|
|
720
|
-
properties: {
|
|
721
|
-
contents: {
|
|
722
|
-
type: "object",
|
|
723
|
-
properties: {
|
|
724
|
-
"f-page-content-nav": {
|
|
725
|
-
description: "",
|
|
726
|
-
type: "object",
|
|
727
|
-
properties: {
|
|
728
|
-
contents: {
|
|
729
|
-
type: "object",
|
|
730
|
-
properties: {
|
|
731
|
-
"f-list-nav": {
|
|
732
|
-
description: "",
|
|
733
|
-
type: "object"
|
|
734
|
-
},
|
|
735
|
-
"f-list-nav-left": {
|
|
736
|
-
description: "",
|
|
737
|
-
type: "object"
|
|
738
|
-
},
|
|
739
|
-
"f-struct-data-grid-in-nav": {
|
|
740
|
-
description: "",
|
|
741
|
-
type: "object",
|
|
742
|
-
properties: {
|
|
743
|
-
contents: {
|
|
744
|
-
type: "object",
|
|
745
|
-
properties: {
|
|
746
|
-
"f-section-form": {
|
|
747
|
-
description: "",
|
|
748
|
-
type: "object",
|
|
749
|
-
properties: {
|
|
750
|
-
rules: {
|
|
751
|
-
type: "object",
|
|
752
|
-
properties: {
|
|
753
|
-
canAccept: {
|
|
754
|
-
type: "boolean",
|
|
755
|
-
const: !1
|
|
756
|
-
},
|
|
757
|
-
fixed: {
|
|
758
|
-
type: "boolean",
|
|
759
|
-
const: !0
|
|
760
|
-
},
|
|
761
|
-
hidePadding: {
|
|
762
|
-
type: "boolean",
|
|
763
|
-
const: !0
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
},
|
|
769
|
-
"f-section-grid": {
|
|
770
|
-
description: "",
|
|
771
|
-
type: "object",
|
|
772
|
-
properties: {
|
|
773
|
-
rules: {
|
|
774
|
-
type: "object",
|
|
775
|
-
properties: {
|
|
776
|
-
canAccept: {
|
|
777
|
-
type: "boolean",
|
|
778
|
-
const: !1
|
|
779
|
-
},
|
|
780
|
-
fixed: {
|
|
781
|
-
type: "boolean",
|
|
782
|
-
const: !0
|
|
783
|
-
},
|
|
784
|
-
hidePadding: {
|
|
785
|
-
type: "boolean",
|
|
786
|
-
const: !0
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
},
|
|
794
|
-
rules: {
|
|
795
|
-
type: "object",
|
|
796
|
-
properties: {
|
|
797
|
-
canAccept: {
|
|
798
|
-
type: "boolean",
|
|
799
|
-
const: !1
|
|
800
|
-
},
|
|
801
|
-
fixed: {
|
|
802
|
-
type: "boolean",
|
|
803
|
-
const: !0
|
|
804
|
-
},
|
|
805
|
-
hidePadding: {
|
|
806
|
-
type: "boolean",
|
|
807
|
-
const: !0
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
},
|
|
816
|
-
rules: {
|
|
817
|
-
type: "object",
|
|
818
|
-
properties: {
|
|
819
|
-
canAccept: {
|
|
820
|
-
type: "boolean",
|
|
821
|
-
const: !1
|
|
822
|
-
},
|
|
823
|
-
fixed: {
|
|
824
|
-
type: "boolean",
|
|
825
|
-
const: !0
|
|
826
|
-
},
|
|
827
|
-
hidePadding: {
|
|
828
|
-
type: "boolean",
|
|
829
|
-
const: !0
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
},
|
|
834
|
-
"f-page-content-main": {
|
|
835
|
-
description: "",
|
|
836
|
-
type: "object",
|
|
837
|
-
properties: {
|
|
838
|
-
rules: {
|
|
839
|
-
type: "object",
|
|
840
|
-
properties: {
|
|
841
|
-
canAccept: {
|
|
842
|
-
type: "boolean",
|
|
843
|
-
const: !1
|
|
844
|
-
},
|
|
845
|
-
fixed: {
|
|
846
|
-
type: "boolean",
|
|
847
|
-
const: !1
|
|
848
|
-
},
|
|
849
|
-
hidePadding: {
|
|
850
|
-
type: "boolean",
|
|
851
|
-
const: !0
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
},
|
|
859
|
-
rules: {
|
|
860
|
-
type: "object",
|
|
861
|
-
properties: {
|
|
862
|
-
canAccept: {
|
|
863
|
-
type: "boolean",
|
|
864
|
-
const: !1
|
|
865
|
-
},
|
|
866
|
-
fixed: {
|
|
867
|
-
type: "boolean",
|
|
868
|
-
const: !0
|
|
869
|
-
},
|
|
870
|
-
hidePadding: {
|
|
871
|
-
type: "boolean",
|
|
872
|
-
const: !0
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
},
|
|
880
|
-
rules: {
|
|
881
|
-
type: "object",
|
|
882
|
-
properties: {
|
|
883
|
-
canAccept: {
|
|
884
|
-
type: "object",
|
|
885
|
-
const: {
|
|
886
|
-
anyOf: [
|
|
887
|
-
{
|
|
888
|
-
children: 0
|
|
889
|
-
},
|
|
890
|
-
{
|
|
891
|
-
children: {
|
|
892
|
-
length: {
|
|
893
|
-
not: 1
|
|
894
|
-
},
|
|
895
|
-
"f-struct-like-card": !0
|
|
896
|
-
}
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
children: {
|
|
900
|
-
"scroll-spy": !1,
|
|
901
|
-
"f-page-content": !1,
|
|
902
|
-
"f-struct-like-card": !1
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
]
|
|
906
|
-
}
|
|
907
|
-
},
|
|
908
|
-
fixed: {
|
|
909
|
-
type: "boolean",
|
|
910
|
-
const: !0
|
|
911
|
-
},
|
|
912
|
-
hidePadding: {
|
|
913
|
-
type: "boolean",
|
|
914
|
-
const: !0
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
},
|
|
920
|
-
"f-page-footer": {
|
|
921
|
-
description: "The class of page footer designed by farris.",
|
|
922
|
-
type: "string"
|
|
315
|
+
class le {
|
|
316
|
+
getTemplateRule(e, t) {
|
|
317
|
+
const n = t == null ? void 0 : t.formSchemaUtils, o = n == null ? void 0 : n.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
318
|
+
if (!o)
|
|
319
|
+
return i;
|
|
320
|
+
const r = this.getComponentContext(e);
|
|
321
|
+
return r.componentClassList.forEach((f) => {
|
|
322
|
+
if (!f || !o[f])
|
|
323
|
+
return;
|
|
324
|
+
const { canMove: s, canDelete: c, canAccept: p } = o[f];
|
|
325
|
+
i.canMove = i.canMove && this.resolveRuleValue(s, r), i.canDelete = i.canDelete && this.resolveRuleValue(c, r), i.canAccept = i.canAccept && this.resolveRuleValue(p, r);
|
|
326
|
+
}), i;
|
|
327
|
+
}
|
|
328
|
+
resolveRuleValue(e, t) {
|
|
329
|
+
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
330
|
+
}
|
|
331
|
+
parseRuleValueSchema(e, t) {
|
|
332
|
+
const n = e.invalidContext || [];
|
|
333
|
+
let o = !0;
|
|
334
|
+
for (const i of n) {
|
|
335
|
+
if (i.firstLevelChild) {
|
|
336
|
+
if (i.firstLevelChild.class) {
|
|
337
|
+
const r = t.firstLevelChildClassList;
|
|
338
|
+
if (r && !r.includes(i.firstLevelChild.class)) {
|
|
339
|
+
o = !1;
|
|
340
|
+
continue;
|
|
923
341
|
}
|
|
924
342
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
type: "boolean",
|
|
931
|
-
const: !1
|
|
932
|
-
},
|
|
933
|
-
fixed: {
|
|
934
|
-
type: "boolean",
|
|
935
|
-
const: !0
|
|
936
|
-
},
|
|
937
|
-
hidePadding: {
|
|
938
|
-
type: "boolean",
|
|
939
|
-
const: !0
|
|
343
|
+
if (i.firstLevelChild.type) {
|
|
344
|
+
const r = t.firstLevelChildSchema;
|
|
345
|
+
if (r && r.type !== i.firstLevelChild.type) {
|
|
346
|
+
o = !1;
|
|
347
|
+
continue;
|
|
940
348
|
}
|
|
941
349
|
}
|
|
942
350
|
}
|
|
351
|
+
if (i.secondLevelChild) {
|
|
352
|
+
if (i.secondLevelChild.class) {
|
|
353
|
+
const r = t.secondLevelChildClassList;
|
|
354
|
+
if (r && !r.includes(i.secondLevelChild.class)) {
|
|
355
|
+
o = !1;
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (i.secondLevelChild.type) {
|
|
360
|
+
const r = t.secondLevelChildSchema;
|
|
361
|
+
if (r && r.type !== i.secondLevelChild.type) {
|
|
362
|
+
o = !1;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (i.parent) {
|
|
368
|
+
if (i.parent.class) {
|
|
369
|
+
const r = t.parentClassList;
|
|
370
|
+
if (r && !r.includes(i.parent.class)) {
|
|
371
|
+
o = !1;
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (i.parent.type) {
|
|
376
|
+
const r = t.parentSchema;
|
|
377
|
+
if (r && r.type !== i.parent.type) {
|
|
378
|
+
o = !1;
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
o = !0;
|
|
384
|
+
break;
|
|
943
385
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
properties: ve
|
|
964
|
-
}, E = /* @__PURE__ */ new Map();
|
|
965
|
-
function Te() {
|
|
966
|
-
function r(n, s, o, i) {
|
|
967
|
-
var g;
|
|
968
|
-
if (typeof o == "number")
|
|
969
|
-
return ((g = i[n]) == null ? void 0 : g.length) === o;
|
|
970
|
-
if (typeof o == "object") {
|
|
971
|
-
const y = Object.keys(o)[0], P = o[y];
|
|
972
|
-
if (y === "not")
|
|
973
|
-
return Number(i[n].length) !== Number(P);
|
|
974
|
-
if (y === "moreThan")
|
|
975
|
-
return Number(i[n].length) >= Number(P);
|
|
976
|
-
if (y === "lessThan")
|
|
977
|
-
return Number(i[n].length) <= Number(P);
|
|
978
|
-
}
|
|
979
|
-
return !1;
|
|
980
|
-
}
|
|
981
|
-
function e(n, s, o, i) {
|
|
982
|
-
return typeof o == "boolean" ? i.childrenClassList.includes(s) === !!o : !1;
|
|
983
|
-
}
|
|
984
|
-
function t(n, s, o, i) {
|
|
985
|
-
return typeof o == "boolean" ? i.parentClassList.includes(s) === !!o : !1;
|
|
986
|
-
}
|
|
987
|
-
function c(n, s, o, i) {
|
|
988
|
-
return typeof o == "boolean" ? i.parentClassList.includes(s) === !!o : !1;
|
|
989
|
-
}
|
|
990
|
-
const p = /* @__PURE__ */ new Map([
|
|
991
|
-
["length", r],
|
|
992
|
-
["hasChildren", e],
|
|
993
|
-
["hasSibling", c],
|
|
994
|
-
["hasParent", t]
|
|
995
|
-
]);
|
|
996
|
-
function b(n, s) {
|
|
997
|
-
const o = n;
|
|
998
|
-
return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "object" ? Object.keys(s).map((i) => {
|
|
999
|
-
if (i === "length")
|
|
1000
|
-
return { target: o, operator: "length", param: null, value: s[i] };
|
|
1001
|
-
const g = i, y = s[i];
|
|
1002
|
-
return { target: o, operator: n === "children" ? "hasChildren" : n === "parent" ? "hasParent" : "hasSibling", param: g, value: y };
|
|
1003
|
-
}) : [];
|
|
386
|
+
return !o;
|
|
387
|
+
}
|
|
388
|
+
getComponentContext(e) {
|
|
389
|
+
var M, w, C, P;
|
|
390
|
+
const t = e.schema, n = t.appearance && t.appearance.class || "", o = n.split(" ") || [], i = t.contents || [], r = i.length ? i[0] : null, u = r && r.appearance ? r.appearance.class : "", f = u ? u.split(" ") : [], s = (M = r == null ? void 0 : r.contents) != null && M.length ? r == null ? void 0 : r.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", p = c ? c.split(" ") : [], l = t.type === "component" ? (C = (w = e.parent) == null ? void 0 : w.parent) == null ? void 0 : C.schema : (P = e.parent) == null ? void 0 : P.schema, d = l && l.appearance && l.appearance.class || "", h = d ? d.split(" ") : [];
|
|
391
|
+
return {
|
|
392
|
+
componentClass: n,
|
|
393
|
+
componentClassList: o,
|
|
394
|
+
childContents: i,
|
|
395
|
+
firstLevelChildSchema: r,
|
|
396
|
+
firstLevelChildClass: u,
|
|
397
|
+
firstLevelChildClassList: f,
|
|
398
|
+
secondLevelChildSchema: s,
|
|
399
|
+
secondLevelChildClass: c,
|
|
400
|
+
secondLevelChildClassList: p,
|
|
401
|
+
parentSchema: l,
|
|
402
|
+
parentClass: d,
|
|
403
|
+
parentClassList: h
|
|
404
|
+
};
|
|
1004
405
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
406
|
+
}
|
|
407
|
+
class ue {
|
|
408
|
+
constructor(e, t) {
|
|
409
|
+
y(this, "componentId");
|
|
410
|
+
y(this, "viewModelId");
|
|
411
|
+
y(this, "eventsEditorUtils");
|
|
412
|
+
y(this, "formSchemaUtils");
|
|
413
|
+
y(this, "formMetadataConverter");
|
|
414
|
+
y(this, "designViewModelUtils");
|
|
415
|
+
y(this, "designViewModelField");
|
|
416
|
+
y(this, "controlCreatorUtils");
|
|
417
|
+
y(this, "designerHostService");
|
|
418
|
+
y(this, "schemaService", null);
|
|
419
|
+
y(this, "metadataService", null);
|
|
420
|
+
y(this, "propertyConfig", {
|
|
421
|
+
type: "object",
|
|
422
|
+
categories: {}
|
|
423
|
+
});
|
|
424
|
+
var n;
|
|
425
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
426
|
+
}
|
|
427
|
+
getTableInfo() {
|
|
428
|
+
var e;
|
|
429
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
430
|
+
}
|
|
431
|
+
setDesignViewModelField(e) {
|
|
432
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
433
|
+
if (t) {
|
|
434
|
+
if (!this.designViewModelField) {
|
|
435
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
436
|
+
this.designViewModelField = n.fields.find((o) => o.id === t);
|
|
437
|
+
}
|
|
438
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
1009
439
|
}
|
|
1010
|
-
return !1;
|
|
1011
440
|
}
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
441
|
+
changeFieldEditorType(e, t) {
|
|
442
|
+
}
|
|
443
|
+
getBasicPropConfig(e) {
|
|
444
|
+
return {
|
|
445
|
+
description: "Basic Information",
|
|
446
|
+
title: "基本信息",
|
|
447
|
+
properties: {
|
|
448
|
+
id: {
|
|
449
|
+
description: "组件标识",
|
|
450
|
+
title: "标识",
|
|
451
|
+
type: "string",
|
|
452
|
+
readonly: !0
|
|
453
|
+
},
|
|
454
|
+
type: {
|
|
455
|
+
description: "组件类型",
|
|
456
|
+
title: "控件类型",
|
|
457
|
+
type: "select",
|
|
458
|
+
editor: {
|
|
459
|
+
type: "combo-list",
|
|
460
|
+
textField: "name",
|
|
461
|
+
valueField: "value",
|
|
462
|
+
data: [{ value: e.type, name: K[e.type].name }]
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
1033
466
|
};
|
|
1034
467
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
468
|
+
getAppearanceConfig(e = null) {
|
|
469
|
+
return {
|
|
470
|
+
title: "样式",
|
|
471
|
+
description: "Appearance",
|
|
472
|
+
properties: {
|
|
473
|
+
class: {
|
|
474
|
+
title: "class样式",
|
|
475
|
+
type: "string",
|
|
476
|
+
description: "组件的CSS样式",
|
|
477
|
+
$converter: "/converter/appearance.converter"
|
|
478
|
+
},
|
|
479
|
+
style: {
|
|
480
|
+
title: "style样式",
|
|
481
|
+
type: "string",
|
|
482
|
+
description: "组件的样式",
|
|
483
|
+
$converter: "/converter/appearance.converter"
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
};
|
|
1042
487
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
488
|
+
/**
|
|
489
|
+
*
|
|
490
|
+
* @param propertyId
|
|
491
|
+
* @param componentInstance
|
|
492
|
+
* @returns
|
|
493
|
+
*/
|
|
494
|
+
updateElementByParentContainer(e, t) {
|
|
495
|
+
const n = t && t.parent && t.parent.schema;
|
|
496
|
+
if (!n)
|
|
497
|
+
return;
|
|
498
|
+
const o = n.contents.findIndex((r) => r.id === e), i = N(n.contents[o]);
|
|
499
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, i);
|
|
1048
500
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
501
|
+
}
|
|
502
|
+
class fe extends ue {
|
|
503
|
+
constructor(e, t) {
|
|
504
|
+
super(e, t);
|
|
505
|
+
}
|
|
506
|
+
getPropertyConfig(e) {
|
|
507
|
+
return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
508
|
+
}
|
|
509
|
+
getEventPropConfig(e) {
|
|
510
|
+
const t = [
|
|
511
|
+
{
|
|
512
|
+
label: "onInit",
|
|
513
|
+
name: "初始化事件"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
label: "onAfterViewInit",
|
|
517
|
+
name: "视图初始化后事件"
|
|
518
|
+
}
|
|
519
|
+
];
|
|
520
|
+
var n = this;
|
|
521
|
+
const o = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
|
|
522
|
+
i[n.viewModelId] = {
|
|
523
|
+
type: "events-editor",
|
|
524
|
+
editor: {
|
|
525
|
+
initialData: o
|
|
526
|
+
}
|
|
527
|
+
}, this.propertyConfig.categories.eventsEditor = {
|
|
528
|
+
title: "事件",
|
|
529
|
+
hideTitle: !0,
|
|
530
|
+
properties: i,
|
|
531
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
532
|
+
refreshPanelAfterChanged: !0,
|
|
533
|
+
tabId: "commands",
|
|
534
|
+
tabName: "交互",
|
|
535
|
+
setPropertyRelates(r, u) {
|
|
536
|
+
const f = r.propertyValue;
|
|
537
|
+
delete e[n.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, f.events, f));
|
|
538
|
+
}
|
|
539
|
+
};
|
|
1052
540
|
}
|
|
1053
|
-
return d(), { getRuleValue: m };
|
|
1054
541
|
}
|
|
1055
|
-
function
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
const b = !1;
|
|
1059
|
-
function h() {
|
|
542
|
+
function me(a, e) {
|
|
543
|
+
const t = new le(), { canMove: n, canDelete: o } = t.getTemplateRule(a, e);
|
|
544
|
+
function i() {
|
|
1060
545
|
return !1;
|
|
1061
546
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1064
|
-
}
|
|
1065
|
-
function A() {
|
|
1066
|
-
return !p;
|
|
547
|
+
function r() {
|
|
548
|
+
return o;
|
|
1067
549
|
}
|
|
1068
|
-
function
|
|
1069
|
-
|
|
1070
|
-
p = !1;
|
|
1071
|
-
const l = r.schema, d = l.appearance && l.appearance.class || "", m = d.split(" "), n = l.contents || [], s = n.length ? n[0] : null, o = s && s.appearance ? s.appearance.class : "", i = o ? o.split(" ") : [], g = n.length ? n.reduce((M, N) => {
|
|
1072
|
-
const B = N && N.appearance ? N.appearance.class : "", U = B ? B.split(" ") : [];
|
|
1073
|
-
return M.push(...U), M;
|
|
1074
|
-
}, []) : [];
|
|
1075
|
-
if ((($ = (O = r.parent) == null ? void 0 : O.schema) == null ? void 0 : $.type) !== "component-ref") {
|
|
1076
|
-
t = !0, p = !0;
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
const y = r.parent.parent, P = y && y.schema, D = P && P.appearance ? P.appearance.class : "", u = D ? D.split(" ") : [];
|
|
1080
|
-
c = {
|
|
1081
|
-
componentClass: d,
|
|
1082
|
-
componentClassList: m,
|
|
1083
|
-
childContents: n,
|
|
1084
|
-
firstChildContent: s,
|
|
1085
|
-
firstChildClass: o,
|
|
1086
|
-
firstChildClassList: i,
|
|
1087
|
-
parent: P,
|
|
1088
|
-
parentClass: D,
|
|
1089
|
-
parentClassList: u,
|
|
1090
|
-
children: n,
|
|
1091
|
-
childrenClassList: g
|
|
1092
|
-
};
|
|
1093
|
-
const { canAccept: v, fixed: C, hidePadding: T } = e.getRuleValue(m[0], c);
|
|
1094
|
-
t = T, p = C;
|
|
550
|
+
function u() {
|
|
551
|
+
return n;
|
|
1095
552
|
}
|
|
1096
553
|
function f() {
|
|
1097
|
-
return
|
|
554
|
+
return !1;
|
|
555
|
+
}
|
|
556
|
+
function s() {
|
|
557
|
+
return " display: inherit;flex-direction: inherit;margin-bottom:10px";
|
|
1098
558
|
}
|
|
1099
|
-
|
|
559
|
+
function c(p) {
|
|
560
|
+
const l = new fe(p, e), d = a.schema;
|
|
561
|
+
return l.getPropertyConfig(d);
|
|
562
|
+
}
|
|
563
|
+
return { canAccepts: i, checkCanDeleteComponent: r, checkCanMoveComponent: u, hideNestedPaddingInDesginerView: f, getStyles: s, getPropsConfig: c };
|
|
1100
564
|
}
|
|
1101
|
-
const
|
|
565
|
+
const de = /* @__PURE__ */ $({
|
|
1102
566
|
name: "FComponetDesign",
|
|
1103
|
-
props:
|
|
567
|
+
props: T,
|
|
1104
568
|
emits: [],
|
|
1105
|
-
setup(
|
|
1106
|
-
const t =
|
|
1107
|
-
return
|
|
1108
|
-
t.value.componentInstance =
|
|
1109
|
-
}), e.expose(
|
|
569
|
+
setup(a, e) {
|
|
570
|
+
const t = D(), n = E("designer-host-service"), o = E("design-item-context"), i = me(o, n), r = pe(t, o, i);
|
|
571
|
+
return F(() => {
|
|
572
|
+
t.value.componentInstance = r;
|
|
573
|
+
}), e.expose(r.value), () => j("div", {
|
|
1110
574
|
ref: t,
|
|
1111
575
|
class: "drag-container",
|
|
1112
|
-
"data-dragref": `${
|
|
576
|
+
"data-dragref": `${o.schema.id}-container`
|
|
1113
577
|
}, [e.slots.default && e.slots.default()]);
|
|
1114
578
|
}
|
|
1115
|
-
}),
|
|
579
|
+
}), he = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/component.schema.json", ge = "component-ref", ve = "A Farris Visual Component", Ce = "object", be = {
|
|
1116
580
|
id: {
|
|
1117
581
|
description: "The unique identifier for a Section",
|
|
1118
582
|
type: "string"
|
|
@@ -1127,36 +591,37 @@ const De = /* @__PURE__ */ q({
|
|
|
1127
591
|
type: "string",
|
|
1128
592
|
default: ""
|
|
1129
593
|
}
|
|
1130
|
-
},
|
|
594
|
+
}, Me = [
|
|
1131
595
|
"id",
|
|
1132
596
|
"type",
|
|
1133
597
|
"component"
|
|
1134
|
-
],
|
|
1135
|
-
$schema:
|
|
1136
|
-
$id:
|
|
1137
|
-
title:
|
|
1138
|
-
description:
|
|
1139
|
-
type:
|
|
1140
|
-
properties:
|
|
1141
|
-
required:
|
|
1142
|
-
},
|
|
598
|
+
], we = {
|
|
599
|
+
$schema: he,
|
|
600
|
+
$id: ye,
|
|
601
|
+
title: ge,
|
|
602
|
+
description: ve,
|
|
603
|
+
type: Ce,
|
|
604
|
+
properties: be,
|
|
605
|
+
required: Me
|
|
606
|
+
}, Pe = {
|
|
1143
607
|
id: { type: String },
|
|
1144
608
|
component: { type: String, default: "" }
|
|
1145
|
-
},
|
|
1146
|
-
install(
|
|
1147
|
-
|
|
609
|
+
}, De = G(Pe, we, W, _), ke = {
|
|
610
|
+
install(a) {
|
|
611
|
+
a.component(V.name, V);
|
|
1148
612
|
},
|
|
1149
|
-
register(
|
|
1150
|
-
|
|
613
|
+
register(a, e, t, n) {
|
|
614
|
+
a.component = V, e.component = A;
|
|
1151
615
|
},
|
|
1152
|
-
registerDesigner(
|
|
1153
|
-
|
|
616
|
+
registerDesigner(a, e) {
|
|
617
|
+
a.component = de, e.component = A, e["component-ref"] = De;
|
|
1154
618
|
}
|
|
1155
619
|
};
|
|
1156
620
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
621
|
+
V as Component,
|
|
622
|
+
de as ComponentDesign,
|
|
623
|
+
Se as componentDesignProps,
|
|
624
|
+
T as componentProps,
|
|
625
|
+
ke as default,
|
|
626
|
+
A as propsResolver
|
|
1162
627
|
};
|