@farris/ui-vue 1.2.8 → 1.3.0
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 +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- 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 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -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/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- 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/use-designer-rules.d.ts +2 -2
- 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 +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -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/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/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/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- 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,121 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var te = (r, e, t) => e in r ? ee(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var M = (r, e, t) => te(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as z, onBeforeMount as ne, onMounted as Q, createVNode as X, ref as E, inject as W } from "vue";
|
|
5
|
+
import { isPlainObject as _, cloneDeep as Y } from "lodash-es";
|
|
6
|
+
const Z = {}, x = {};
|
|
7
|
+
function F(r) {
|
|
8
|
+
const { properties: e, title: t, ignore: n } = r, s = n && Array.isArray(n), u = Object.keys(e).reduce((y, g) => ((!s || !n.find((P) => P == g)) && (y[g] = e[g].type === "object" && e[g].properties ? F(e[g]) : Y(e[g].default)), y), {});
|
|
9
|
+
return (!s || !n.find((y) => y == "id")) && (u.id = `${t}-${Date.now()}`), u;
|
|
7
10
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
let s =
|
|
12
|
-
const
|
|
13
|
-
return s =
|
|
11
|
+
function B(r, e = {}, t) {
|
|
12
|
+
const n = Z[r];
|
|
13
|
+
if (n) {
|
|
14
|
+
let s = F(n);
|
|
15
|
+
const u = x[r];
|
|
16
|
+
return s = u ? u({ getSchemaByType: B }, s, e, t) : s, s;
|
|
14
17
|
}
|
|
15
18
|
return null;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
const t =
|
|
19
|
-
return Object.keys(
|
|
20
|
+
function oe(r, e) {
|
|
21
|
+
const t = F(e);
|
|
22
|
+
return Object.keys(r).reduce((n, s) => (n[s] && _(n[s]) && _(r[s]) ? Object.assign(n[s], r[s]) : n[s] = r[s], n), t), t;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
22
|
-
return Object.keys(
|
|
23
|
-
if (e.has(
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
|
|
24
|
+
function re(r, e) {
|
|
25
|
+
return Object.keys(r).filter((n) => r[n] != null).reduce((n, s) => {
|
|
26
|
+
if (e.has(s)) {
|
|
27
|
+
const u = e.get(s);
|
|
28
|
+
if (typeof u == "string")
|
|
29
|
+
n[u] = r[s];
|
|
27
30
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
31
|
+
const y = u(s, r[s], r);
|
|
32
|
+
Object.assign(n, y);
|
|
30
33
|
}
|
|
31
34
|
} else
|
|
32
|
-
s
|
|
33
|
-
return
|
|
35
|
+
n[s] = r[s];
|
|
36
|
+
return n;
|
|
34
37
|
}, {});
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
+
function se(r, e, t = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const n = oe(r, e);
|
|
41
|
+
return re(n, t);
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
function e(a, d,
|
|
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 ce(r = {}) {
|
|
44
|
+
function e(a, d, f, m) {
|
|
45
|
+
if (typeof f == "number")
|
|
46
|
+
return m[a].length === f;
|
|
47
|
+
if (typeof f == "object") {
|
|
48
|
+
const j = Object.keys(f)[0], o = f[j];
|
|
49
|
+
if (j === "not")
|
|
50
|
+
return Number(m[a].length) !== Number(o);
|
|
51
|
+
if (j === "moreThan")
|
|
52
|
+
return Number(m[a].length) >= Number(o);
|
|
53
|
+
if (j === "lessThan")
|
|
54
|
+
return Number(m[a].length) <= Number(o);
|
|
52
55
|
}
|
|
53
56
|
return !1;
|
|
54
57
|
}
|
|
55
|
-
function t(a, d,
|
|
56
|
-
return
|
|
58
|
+
function t(a, d, f, m) {
|
|
59
|
+
return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
|
|
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 d == "number" ? [{ target:
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const
|
|
69
|
-
return { target:
|
|
65
|
+
Object.keys(r).reduce((a, d) => (a.set(d, r[d]), a), n);
|
|
66
|
+
function s(a, d) {
|
|
67
|
+
const f = a;
|
|
68
|
+
return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
69
|
+
if (m === "length")
|
|
70
|
+
return { target: f, operator: "length", param: null, value: d[m] };
|
|
71
|
+
const j = m, o = d[m];
|
|
72
|
+
return { target: f, operator: "getProperty", param: j, value: o };
|
|
70
73
|
}) : [];
|
|
71
74
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(a).reduce((
|
|
74
|
-
const
|
|
75
|
-
return
|
|
75
|
+
function u(a) {
|
|
76
|
+
return Object.keys(a).reduce((f, m) => {
|
|
77
|
+
const j = s(m, a[m]);
|
|
78
|
+
return f.push(...j), f;
|
|
76
79
|
}, []);
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
81
|
+
function y(a, d) {
|
|
82
|
+
if (n.has(a.operator)) {
|
|
83
|
+
const f = n.get(a.operator);
|
|
84
|
+
return f && f(a.target, a.param, a.value, d) || !1;
|
|
82
85
|
}
|
|
83
86
|
return !1;
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
88
|
+
function g(a, d) {
|
|
89
|
+
return u(a).reduce((j, o) => j && y(o, d), !0);
|
|
87
90
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
+
function P(a, d) {
|
|
92
|
+
const f = Object.keys(a), m = f.includes("allOf"), j = f.includes("anyOf"), o = m || j, p = (o ? a[o ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => g(h, d));
|
|
93
|
+
return m ? !p.includes(!1) : p.includes(!0);
|
|
91
94
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: P };
|
|
93
96
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const ie = {
|
|
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
|
+
}, ae = {}, pe = {};
|
|
137
|
+
ce();
|
|
138
|
+
function H(r, e, t = /* @__PURE__ */ new Map(), n = (y, g, P) => g, s = {}, u = (y) => y) {
|
|
139
|
+
return Z[e.title] = e, x[e.title] = n, ae[e.title] = s, pe[e.title] = u, (y = {}) => {
|
|
140
|
+
const g = se(y, e, t), P = Object.keys(r).reduce((a, d) => (a[d] = r[d].default, a), {});
|
|
141
|
+
return Object.assign(P, g);
|
|
100
142
|
};
|
|
101
143
|
}
|
|
102
|
-
function
|
|
144
|
+
function le(r, e) {
|
|
103
145
|
return { customClass: e.class, customStyle: e.style };
|
|
104
146
|
}
|
|
105
|
-
const
|
|
106
|
-
["appearance",
|
|
107
|
-
]),
|
|
147
|
+
const R = /* @__PURE__ */ new Map([
|
|
148
|
+
["appearance", le]
|
|
149
|
+
]), ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/component.schema.json", de = "component", ye = "A Farris Visual Component", me = "object", he = {
|
|
108
150
|
id: {
|
|
109
|
-
description: "The unique identifier for a
|
|
151
|
+
description: "The unique identifier for a component",
|
|
110
152
|
type: "string"
|
|
111
153
|
},
|
|
112
154
|
type: {
|
|
113
|
-
description: "The type string of
|
|
155
|
+
description: "The type string of component",
|
|
114
156
|
type: "string",
|
|
115
157
|
default: "component"
|
|
116
158
|
},
|
|
117
159
|
componentType: {
|
|
118
|
-
description: "The type string of
|
|
160
|
+
description: "The type string of component",
|
|
161
|
+
type: "string"
|
|
162
|
+
},
|
|
163
|
+
viewModel: {
|
|
164
|
+
description: "The viewModel string of component",
|
|
119
165
|
type: "string"
|
|
120
166
|
},
|
|
121
167
|
appearance: {
|
|
@@ -140,100 +186,62 @@ const I = /* @__PURE__ */ new Map([
|
|
|
140
186
|
description: "",
|
|
141
187
|
type: "boolean",
|
|
142
188
|
default: !0
|
|
189
|
+
},
|
|
190
|
+
onInit: {
|
|
191
|
+
description: "初始化事件",
|
|
192
|
+
type: "string",
|
|
193
|
+
default: ""
|
|
194
|
+
},
|
|
195
|
+
onAfterViewInit: {
|
|
196
|
+
description: "视图初始化后事件",
|
|
197
|
+
type: "string",
|
|
198
|
+
default: ""
|
|
143
199
|
}
|
|
144
|
-
},
|
|
200
|
+
}, be = [
|
|
145
201
|
"id",
|
|
146
202
|
"type",
|
|
147
203
|
"contents"
|
|
148
|
-
],
|
|
149
|
-
$schema:
|
|
150
|
-
$id:
|
|
151
|
-
title:
|
|
152
|
-
description:
|
|
153
|
-
type:
|
|
154
|
-
properties:
|
|
155
|
-
required:
|
|
204
|
+
], ge = {
|
|
205
|
+
$schema: ue,
|
|
206
|
+
$id: fe,
|
|
207
|
+
title: de,
|
|
208
|
+
description: ye,
|
|
209
|
+
type: me,
|
|
210
|
+
properties: he,
|
|
211
|
+
required: be
|
|
156
212
|
};
|
|
157
|
-
function
|
|
213
|
+
function I(r, e, t) {
|
|
158
214
|
return e;
|
|
159
215
|
}
|
|
160
|
-
const
|
|
161
|
-
basic: {
|
|
162
|
-
description: "Basic Infomation",
|
|
163
|
-
title: "基本信息",
|
|
164
|
-
properties: {
|
|
165
|
-
id: {
|
|
166
|
-
description: "组件标识",
|
|
167
|
-
title: "标识",
|
|
168
|
-
type: "string",
|
|
169
|
-
readonly: !0
|
|
170
|
-
},
|
|
171
|
-
type: {
|
|
172
|
-
description: "组件类型",
|
|
173
|
-
title: "控件类型",
|
|
174
|
-
type: "select",
|
|
175
|
-
editor: {
|
|
176
|
-
type: "combo-list",
|
|
177
|
-
textField: "value",
|
|
178
|
-
valueField: "key",
|
|
179
|
-
data: [
|
|
180
|
-
{
|
|
181
|
-
key: "component",
|
|
182
|
-
value: "组件"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
appearance: {
|
|
190
|
-
description: "",
|
|
191
|
-
title: "外观",
|
|
192
|
-
properties: {
|
|
193
|
-
class: {
|
|
194
|
-
description: "组件的CSS样式",
|
|
195
|
-
title: "class样式"
|
|
196
|
-
},
|
|
197
|
-
style: {
|
|
198
|
-
description: "组件的内容样式",
|
|
199
|
-
title: "style样式"
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}, de = {
|
|
204
|
-
title: ie,
|
|
205
|
-
description: le,
|
|
206
|
-
type: ue,
|
|
207
|
-
categories: fe
|
|
208
|
-
}, k = {
|
|
216
|
+
const D = {
|
|
209
217
|
id: { type: String },
|
|
210
218
|
customClass: { type: String, default: "" },
|
|
211
219
|
componentType: { type: String, default: "" }
|
|
212
|
-
},
|
|
220
|
+
}, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
|
|
213
221
|
name: "FComponent",
|
|
214
|
-
props:
|
|
222
|
+
props: D,
|
|
215
223
|
emits: ["init", "afterViewInit"],
|
|
216
|
-
setup(
|
|
217
|
-
return
|
|
218
|
-
e.emit("init",
|
|
219
|
-
}),
|
|
220
|
-
e.emit("afterViewInit",
|
|
221
|
-
}), () =>
|
|
222
|
-
class:
|
|
224
|
+
setup(r, e) {
|
|
225
|
+
return ne(() => {
|
|
226
|
+
e.emit("init", r.id);
|
|
227
|
+
}), Q(() => {
|
|
228
|
+
e.emit("afterViewInit", r.id);
|
|
229
|
+
}), () => X("div", {
|
|
230
|
+
class: r.customClass
|
|
223
231
|
}, [e.slots.default && e.slots.default()]);
|
|
224
232
|
}
|
|
225
233
|
});
|
|
226
|
-
function
|
|
227
|
-
var
|
|
228
|
-
function
|
|
234
|
+
function je(r, e, t) {
|
|
235
|
+
var S;
|
|
236
|
+
function n() {
|
|
229
237
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
230
238
|
}
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
function
|
|
239
|
+
n();
|
|
240
|
+
const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
|
|
241
|
+
function g() {
|
|
234
242
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
235
243
|
}
|
|
236
|
-
function
|
|
244
|
+
function P() {
|
|
237
245
|
return !1;
|
|
238
246
|
}
|
|
239
247
|
function a() {
|
|
@@ -242,77 +250,77 @@ function ye(c, e, t) {
|
|
|
242
250
|
function d() {
|
|
243
251
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
244
252
|
}
|
|
245
|
-
function l
|
|
246
|
-
if (!
|
|
253
|
+
function f(l) {
|
|
254
|
+
if (!l || !l.value)
|
|
247
255
|
return null;
|
|
248
|
-
if (
|
|
249
|
-
return
|
|
250
|
-
const v =
|
|
251
|
-
return
|
|
256
|
+
if (l.value.schema && l.value.schema.type === "component")
|
|
257
|
+
return l.value;
|
|
258
|
+
const v = E(l == null ? void 0 : l.value.parent), C = f(v);
|
|
259
|
+
return C || null;
|
|
252
260
|
}
|
|
253
|
-
function
|
|
254
|
-
const { componentInstance: v, designerItemElementRef:
|
|
255
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
261
|
+
function m(l = e) {
|
|
262
|
+
const { componentInstance: v, designerItemElementRef: C } = l;
|
|
263
|
+
return !v || !v.value ? null : v.value.canMove ? C : m(l.parent);
|
|
256
264
|
}
|
|
257
|
-
function
|
|
258
|
-
return !!t && t.canAccepts(
|
|
265
|
+
function j(l) {
|
|
266
|
+
return !!t && t.canAccepts(l);
|
|
259
267
|
}
|
|
260
|
-
function
|
|
268
|
+
function o() {
|
|
261
269
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
262
270
|
}
|
|
263
|
-
function
|
|
271
|
+
function i() {
|
|
264
272
|
}
|
|
265
|
-
function
|
|
273
|
+
function c(l, v) {
|
|
266
274
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
267
275
|
}
|
|
268
|
-
function
|
|
269
|
-
const { componentType:
|
|
270
|
-
let
|
|
271
|
-
t && t.onResolveNewComponentSchema && (
|
|
272
|
-
const
|
|
273
|
-
return
|
|
276
|
+
function p(l, v) {
|
|
277
|
+
const { componentType: C } = l;
|
|
278
|
+
let T = B(C, l, v);
|
|
279
|
+
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
|
|
280
|
+
const O = C.toLowerCase().replace("-", "_");
|
|
281
|
+
return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
|
|
274
282
|
}
|
|
275
|
-
function
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
let A =
|
|
279
|
-
t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(
|
|
280
|
-
const
|
|
281
|
-
return A && !A.id && A.type ===
|
|
283
|
+
function b(l, v) {
|
|
284
|
+
const C = String(l.getAttribute("data-controltype")), T = l.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
|
|
285
|
+
O.parentComponentInstance = y.value;
|
|
286
|
+
let A = B(C, O);
|
|
287
|
+
t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(l, v, A));
|
|
288
|
+
const V = C.toLowerCase().replace("-", "_");
|
|
289
|
+
return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
|
|
282
290
|
}
|
|
283
|
-
function
|
|
291
|
+
function h(l) {
|
|
284
292
|
}
|
|
285
|
-
function
|
|
293
|
+
function w(...l) {
|
|
286
294
|
if (t && t.getPropsConfig)
|
|
287
|
-
return t.getPropsConfig(...
|
|
295
|
+
return t.getPropsConfig(...l);
|
|
288
296
|
}
|
|
289
|
-
return
|
|
290
|
-
canMove:
|
|
291
|
-
canSelectParent:
|
|
297
|
+
return y.value = {
|
|
298
|
+
canMove: g(),
|
|
299
|
+
canSelectParent: P(),
|
|
292
300
|
canDelete: a(),
|
|
293
301
|
canNested: !d(),
|
|
294
302
|
contents: e == null ? void 0 : e.schema.contents,
|
|
295
|
-
elementRef:
|
|
296
|
-
parent: (
|
|
303
|
+
elementRef: r,
|
|
304
|
+
parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
|
|
297
305
|
schema: e == null ? void 0 : e.schema,
|
|
298
|
-
styles:
|
|
299
|
-
designerClass:
|
|
300
|
-
canAccepts:
|
|
301
|
-
getBelongedComponentInstance:
|
|
302
|
-
getDraggableDesignItemElement:
|
|
303
|
-
getDraggingDisplayText:
|
|
304
|
-
getPropConfig:
|
|
305
|
-
getDragScopeElement:
|
|
306
|
-
onAcceptMovedChildElement:
|
|
307
|
-
onAcceptNewChildElement:
|
|
308
|
-
onChildElementMovedOut:
|
|
309
|
-
addNewChildComponentSchema:
|
|
310
|
-
updateDragAndDropRules:
|
|
311
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
312
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
313
|
-
},
|
|
306
|
+
styles: s,
|
|
307
|
+
designerClass: u,
|
|
308
|
+
canAccepts: j,
|
|
309
|
+
getBelongedComponentInstance: f,
|
|
310
|
+
getDraggableDesignItemElement: m,
|
|
311
|
+
getDraggingDisplayText: o,
|
|
312
|
+
getPropConfig: w,
|
|
313
|
+
getDragScopeElement: i,
|
|
314
|
+
onAcceptMovedChildElement: c,
|
|
315
|
+
onAcceptNewChildElement: b,
|
|
316
|
+
onChildElementMovedOut: h,
|
|
317
|
+
addNewChildComponentSchema: p,
|
|
318
|
+
updateDragAndDropRules: n,
|
|
319
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
|
|
320
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
|
|
321
|
+
}, y;
|
|
314
322
|
}
|
|
315
|
-
const
|
|
323
|
+
const ve = "https://json-schema.org/draft/2020-12/schema", Ce = "https://farris-design.gitee.io/dragging-rules.schema.json", Pe = "Dragging Rules", we = "The rules of designer canvas", Me = "object", Te = {
|
|
316
324
|
"f-page": {
|
|
317
325
|
description: "The root class of page designed by farris.",
|
|
318
326
|
type: "object",
|
|
@@ -731,6 +739,80 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
731
739
|
"f-list-nav-left": {
|
|
732
740
|
description: "",
|
|
733
741
|
type: "object"
|
|
742
|
+
},
|
|
743
|
+
"f-struct-data-grid-in-nav": {
|
|
744
|
+
description: "",
|
|
745
|
+
type: "object",
|
|
746
|
+
properties: {
|
|
747
|
+
contents: {
|
|
748
|
+
type: "object",
|
|
749
|
+
properties: {
|
|
750
|
+
"f-section-form": {
|
|
751
|
+
description: "",
|
|
752
|
+
type: "object",
|
|
753
|
+
properties: {
|
|
754
|
+
rules: {
|
|
755
|
+
type: "object",
|
|
756
|
+
properties: {
|
|
757
|
+
canAccept: {
|
|
758
|
+
type: "boolean",
|
|
759
|
+
const: !1
|
|
760
|
+
},
|
|
761
|
+
fixed: {
|
|
762
|
+
type: "boolean",
|
|
763
|
+
const: !0
|
|
764
|
+
},
|
|
765
|
+
hidePadding: {
|
|
766
|
+
type: "boolean",
|
|
767
|
+
const: !0
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"f-section-grid": {
|
|
774
|
+
description: "",
|
|
775
|
+
type: "object",
|
|
776
|
+
properties: {
|
|
777
|
+
rules: {
|
|
778
|
+
type: "object",
|
|
779
|
+
properties: {
|
|
780
|
+
canAccept: {
|
|
781
|
+
type: "boolean",
|
|
782
|
+
const: !1
|
|
783
|
+
},
|
|
784
|
+
fixed: {
|
|
785
|
+
type: "boolean",
|
|
786
|
+
const: !0
|
|
787
|
+
},
|
|
788
|
+
hidePadding: {
|
|
789
|
+
type: "boolean",
|
|
790
|
+
const: !0
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
rules: {
|
|
799
|
+
type: "object",
|
|
800
|
+
properties: {
|
|
801
|
+
canAccept: {
|
|
802
|
+
type: "boolean",
|
|
803
|
+
const: !1
|
|
804
|
+
},
|
|
805
|
+
fixed: {
|
|
806
|
+
type: "boolean",
|
|
807
|
+
const: !0
|
|
808
|
+
},
|
|
809
|
+
hidePadding: {
|
|
810
|
+
type: "boolean",
|
|
811
|
+
const: !0
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
734
816
|
}
|
|
735
817
|
}
|
|
736
818
|
}
|
|
@@ -876,175 +958,348 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
876
958
|
description: "",
|
|
877
959
|
type: "object"
|
|
878
960
|
}
|
|
879
|
-
},
|
|
880
|
-
$schema:
|
|
881
|
-
$id:
|
|
882
|
-
title:
|
|
883
|
-
description:
|
|
884
|
-
type:
|
|
885
|
-
properties:
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
function
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
return Number(i[n].length) <= Number(C);
|
|
961
|
+
}, Ae = {
|
|
962
|
+
$schema: ve,
|
|
963
|
+
$id: Ce,
|
|
964
|
+
title: Pe,
|
|
965
|
+
description: we,
|
|
966
|
+
type: Me,
|
|
967
|
+
properties: Te
|
|
968
|
+
}, N = /* @__PURE__ */ new Map();
|
|
969
|
+
function Se() {
|
|
970
|
+
function r(o, i, c, p) {
|
|
971
|
+
var b;
|
|
972
|
+
if (typeof c == "number")
|
|
973
|
+
return ((b = p[o]) == null ? void 0 : b.length) === c;
|
|
974
|
+
if (typeof c == "object") {
|
|
975
|
+
const h = Object.keys(c)[0], w = c[h];
|
|
976
|
+
if (h === "not")
|
|
977
|
+
return Number(p[o].length) !== Number(w);
|
|
978
|
+
if (h === "moreThan")
|
|
979
|
+
return Number(p[o].length) >= Number(w);
|
|
980
|
+
if (h === "lessThan")
|
|
981
|
+
return Number(p[o].length) <= Number(w);
|
|
901
982
|
}
|
|
902
983
|
return !1;
|
|
903
984
|
}
|
|
904
|
-
function e(
|
|
905
|
-
return typeof
|
|
985
|
+
function e(o, i, c, p) {
|
|
986
|
+
return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
|
|
906
987
|
}
|
|
907
|
-
function t(
|
|
908
|
-
return typeof
|
|
988
|
+
function t(o, i, c, p) {
|
|
989
|
+
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
909
990
|
}
|
|
910
|
-
function
|
|
911
|
-
return typeof
|
|
991
|
+
function n(o, i, c, p) {
|
|
992
|
+
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
912
993
|
}
|
|
913
|
-
const
|
|
914
|
-
["length",
|
|
994
|
+
const s = /* @__PURE__ */ new Map([
|
|
995
|
+
["length", r],
|
|
915
996
|
["hasChildren", e],
|
|
916
|
-
["hasSibling",
|
|
997
|
+
["hasSibling", n],
|
|
917
998
|
["hasParent", t]
|
|
918
999
|
]);
|
|
919
|
-
function
|
|
920
|
-
const
|
|
921
|
-
return typeof
|
|
922
|
-
if (
|
|
923
|
-
return { target:
|
|
924
|
-
const
|
|
925
|
-
return { target:
|
|
1000
|
+
function u(o, i) {
|
|
1001
|
+
const c = o;
|
|
1002
|
+
return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
|
|
1003
|
+
if (p === "length")
|
|
1004
|
+
return { target: c, operator: "length", param: null, value: i[p] };
|
|
1005
|
+
const b = p, h = i[p];
|
|
1006
|
+
return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
|
|
926
1007
|
}) : [];
|
|
927
1008
|
}
|
|
928
|
-
function
|
|
929
|
-
if (
|
|
930
|
-
const
|
|
931
|
-
return
|
|
1009
|
+
function y(o, i) {
|
|
1010
|
+
if (s.has(o.operator)) {
|
|
1011
|
+
const c = s.get(o.operator);
|
|
1012
|
+
return c && c(o.target, o.param, o.value, i) || !1;
|
|
932
1013
|
}
|
|
933
1014
|
return !1;
|
|
934
1015
|
}
|
|
935
|
-
function
|
|
936
|
-
return Object.keys(
|
|
937
|
-
const
|
|
938
|
-
return
|
|
939
|
-
}, []).reduce((
|
|
1016
|
+
function g(o, i) {
|
|
1017
|
+
return Object.keys(o).reduce((h, w) => {
|
|
1018
|
+
const S = u(w, o[w]);
|
|
1019
|
+
return h.push(...S), h;
|
|
1020
|
+
}, []).reduce((h, w) => h && y(w, i), !0);
|
|
940
1021
|
}
|
|
941
|
-
function
|
|
942
|
-
const
|
|
943
|
-
return
|
|
1022
|
+
function P(o, i) {
|
|
1023
|
+
const c = Object.keys(o), p = c.includes("allOf"), b = c.includes("anyOf"), h = p || b, l = (h ? o[h ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((C) => g(C, i));
|
|
1024
|
+
return p ? !l.includes(!1) : l.includes(!0);
|
|
944
1025
|
}
|
|
945
|
-
function a(
|
|
946
|
-
const
|
|
947
|
-
return
|
|
1026
|
+
function a(o, i) {
|
|
1027
|
+
const c = o.const;
|
|
1028
|
+
return c ? typeof c == "boolean" ? c : typeof c == "object" ? P(c, i) : !1 : !1;
|
|
948
1029
|
}
|
|
949
|
-
function d(
|
|
950
|
-
return (
|
|
951
|
-
const
|
|
952
|
-
return
|
|
953
|
-
const
|
|
954
|
-
return
|
|
955
|
-
},
|
|
1030
|
+
function d(o) {
|
|
1031
|
+
return (i) => {
|
|
1032
|
+
const c = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1033
|
+
return o && o.properties && Object.keys(o.properties).reduce((p, b) => {
|
|
1034
|
+
const h = o.properties[b];
|
|
1035
|
+
return p[b] = a(h, i), p;
|
|
1036
|
+
}, c), c;
|
|
956
1037
|
};
|
|
957
1038
|
}
|
|
958
|
-
function
|
|
959
|
-
if (
|
|
960
|
-
const { rules:
|
|
961
|
-
|
|
962
|
-
(
|
|
1039
|
+
function f(o, i, c) {
|
|
1040
|
+
if (i.type === "object" && i.properties) {
|
|
1041
|
+
const { rules: p, contents: b } = i.properties;
|
|
1042
|
+
c.set(o, d(p)), b && Object.keys(b.properties).forEach(
|
|
1043
|
+
(h) => f(h, b.properties[h], c)
|
|
963
1044
|
);
|
|
964
1045
|
}
|
|
965
1046
|
}
|
|
966
|
-
function
|
|
967
|
-
const { properties:
|
|
968
|
-
Object.keys(
|
|
969
|
-
|
|
1047
|
+
function m() {
|
|
1048
|
+
const { properties: o } = Ae;
|
|
1049
|
+
Object.keys(o).forEach((i) => {
|
|
1050
|
+
f(i, o[i], N);
|
|
970
1051
|
});
|
|
971
1052
|
}
|
|
972
|
-
function
|
|
973
|
-
const
|
|
974
|
-
return
|
|
1053
|
+
function j(o, i) {
|
|
1054
|
+
const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1055
|
+
return N.has(o) ? N.get(o)(i) : c;
|
|
975
1056
|
}
|
|
976
|
-
return
|
|
1057
|
+
return m(), { getRuleValue: j };
|
|
977
1058
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1059
|
+
class Oe {
|
|
1060
|
+
constructor(e, t) {
|
|
1061
|
+
M(this, "componentId");
|
|
1062
|
+
M(this, "viewModelId");
|
|
1063
|
+
M(this, "eventsEditorUtils");
|
|
1064
|
+
M(this, "formSchemaUtils");
|
|
1065
|
+
M(this, "formMetadataConverter");
|
|
1066
|
+
M(this, "designViewModelUtils");
|
|
1067
|
+
M(this, "designViewModelField");
|
|
1068
|
+
M(this, "controlCreatorUtils");
|
|
1069
|
+
M(this, "designerHostService");
|
|
1070
|
+
M(this, "schemaService", null);
|
|
1071
|
+
M(this, "metadataService", null);
|
|
1072
|
+
M(this, "propertyConfig", {
|
|
1073
|
+
type: "object",
|
|
1074
|
+
categories: {}
|
|
1075
|
+
});
|
|
1076
|
+
var n;
|
|
1077
|
+
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;
|
|
1078
|
+
}
|
|
1079
|
+
getTableInfo() {
|
|
1080
|
+
var e;
|
|
1081
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1082
|
+
}
|
|
1083
|
+
setDesignViewModelField(e) {
|
|
1084
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1085
|
+
if (t) {
|
|
1086
|
+
if (!this.designViewModelField) {
|
|
1087
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1088
|
+
this.designViewModelField = n.fields.find((s) => s.id === t);
|
|
1089
|
+
}
|
|
1090
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
changeFieldEditorType(e, t) {
|
|
1094
|
+
}
|
|
1095
|
+
getBasicPropConfig(e) {
|
|
1096
|
+
return {
|
|
1097
|
+
description: "Basic Information",
|
|
1098
|
+
title: "基本信息",
|
|
1099
|
+
properties: {
|
|
1100
|
+
id: {
|
|
1101
|
+
description: "组件标识",
|
|
1102
|
+
title: "标识",
|
|
1103
|
+
type: "string",
|
|
1104
|
+
readonly: !0
|
|
1105
|
+
},
|
|
1106
|
+
type: {
|
|
1107
|
+
description: "组件类型",
|
|
1108
|
+
title: "控件类型",
|
|
1109
|
+
type: "select",
|
|
1110
|
+
editor: {
|
|
1111
|
+
type: "combo-list",
|
|
1112
|
+
textField: "name",
|
|
1113
|
+
valueField: "value",
|
|
1114
|
+
data: [{ value: e.type, name: ie[e.type].name }]
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
getAppearanceConfig(e = null) {
|
|
1121
|
+
return {
|
|
1122
|
+
title: "样式",
|
|
1123
|
+
description: "Appearance",
|
|
1124
|
+
properties: {
|
|
1125
|
+
class: {
|
|
1126
|
+
title: "class样式",
|
|
1127
|
+
type: "string",
|
|
1128
|
+
description: "组件的CSS样式",
|
|
1129
|
+
$converter: "/converter/appearance.converter"
|
|
1130
|
+
},
|
|
1131
|
+
style: {
|
|
1132
|
+
title: "style样式",
|
|
1133
|
+
type: "string",
|
|
1134
|
+
description: "组件的样式",
|
|
1135
|
+
$converter: "/converter/appearance.converter"
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
*
|
|
1142
|
+
* @param propertyId
|
|
1143
|
+
* @param componentInstance
|
|
1144
|
+
* @returns
|
|
1145
|
+
*/
|
|
1146
|
+
updateElementByParentContainer(e, t) {
|
|
1147
|
+
const n = t && t.parent && t.parent.schema;
|
|
1148
|
+
if (!n)
|
|
1149
|
+
return;
|
|
1150
|
+
const s = n.contents.findIndex((y) => y.id === e), u = Y(n.contents[s]);
|
|
1151
|
+
n.contents.splice(s, 1), n.contents.splice(s, 0, u);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
class Ee extends Oe {
|
|
1155
|
+
constructor(e, t) {
|
|
1156
|
+
super(e, t);
|
|
1157
|
+
}
|
|
1158
|
+
getPropertyConfig(e) {
|
|
1159
|
+
return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
1160
|
+
}
|
|
1161
|
+
getEventPropConfig(e) {
|
|
1162
|
+
const t = [
|
|
1163
|
+
{
|
|
1164
|
+
label: "onInit",
|
|
1165
|
+
name: "初始化事件"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
label: "onAfterViewInit",
|
|
1169
|
+
name: "视图初始化后事件"
|
|
1170
|
+
}
|
|
1171
|
+
];
|
|
1172
|
+
var n = this;
|
|
1173
|
+
const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
|
|
1174
|
+
u[n.viewModelId] = {
|
|
1175
|
+
type: "events-editor",
|
|
1176
|
+
editor: {
|
|
1177
|
+
initialData: s
|
|
1178
|
+
}
|
|
1179
|
+
}, this.propertyConfig.categories.eventsEditor = {
|
|
1180
|
+
title: "事件",
|
|
1181
|
+
hideTitle: !0,
|
|
1182
|
+
properties: u,
|
|
1183
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1184
|
+
refreshPanelAfterChanged: !0,
|
|
1185
|
+
tabId: "commands",
|
|
1186
|
+
tabName: "交互",
|
|
1187
|
+
setPropertyRelates(y, g) {
|
|
1188
|
+
const P = y.propertyValue;
|
|
1189
|
+
delete e[n.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, P.events, P));
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
function De(r, e) {
|
|
1195
|
+
const t = Se();
|
|
1196
|
+
let n = !1, s, u = !1;
|
|
1197
|
+
const y = !1, g = r.schema;
|
|
982
1198
|
function P() {
|
|
983
1199
|
return !1;
|
|
984
1200
|
}
|
|
985
|
-
function D() {
|
|
986
|
-
return m || !y;
|
|
987
|
-
}
|
|
988
1201
|
function a() {
|
|
989
|
-
return !
|
|
1202
|
+
return y || !u;
|
|
990
1203
|
}
|
|
991
1204
|
function d() {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
p = {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1205
|
+
return !u;
|
|
1206
|
+
}
|
|
1207
|
+
function f() {
|
|
1208
|
+
var U, L;
|
|
1209
|
+
u = !1;
|
|
1210
|
+
const o = r.schema, i = o.appearance && o.appearance.class || "", c = i.split(" "), p = o.contents || [], b = p.length ? p[0] : null, h = b && b.appearance ? b.appearance.class : "", w = h ? h.split(" ") : [], S = p.length ? p.reduce((q, $) => {
|
|
1211
|
+
const G = $ && $.appearance ? $.appearance.class : "", K = G ? G.split(" ") : [];
|
|
1212
|
+
return q.push(...K), q;
|
|
1213
|
+
}, []) : [];
|
|
1214
|
+
if (((L = (U = r.parent) == null ? void 0 : U.schema) == null ? void 0 : L.type) !== "component-ref") {
|
|
1215
|
+
n = !0, u = !0;
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
|
|
1219
|
+
s = {
|
|
1220
|
+
componentClass: i,
|
|
1221
|
+
componentClassList: c,
|
|
1222
|
+
childContents: p,
|
|
1223
|
+
firstChildContent: b,
|
|
1224
|
+
firstChildClass: h,
|
|
1225
|
+
firstChildClassList: w,
|
|
1226
|
+
parent: v,
|
|
1227
|
+
parentClass: C,
|
|
1228
|
+
parentClassList: T,
|
|
1229
|
+
children: p,
|
|
1230
|
+
childrenClassList: S
|
|
1009
1231
|
};
|
|
1010
|
-
const { canAccept:
|
|
1011
|
-
|
|
1232
|
+
const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
|
|
1233
|
+
n = V, u = A;
|
|
1012
1234
|
}
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
1235
|
+
function m() {
|
|
1236
|
+
return n;
|
|
1015
1237
|
}
|
|
1016
|
-
|
|
1238
|
+
function j(o) {
|
|
1239
|
+
return new Ee(o, e).getPropertyConfig(g);
|
|
1240
|
+
}
|
|
1241
|
+
return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
|
|
1017
1242
|
}
|
|
1018
|
-
const
|
|
1243
|
+
const Ve = /* @__PURE__ */ z({
|
|
1019
1244
|
name: "FComponetDesign",
|
|
1020
|
-
props:
|
|
1245
|
+
props: D,
|
|
1021
1246
|
emits: [],
|
|
1022
|
-
setup(
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
return L(() => {
|
|
1247
|
+
setup(r, e) {
|
|
1248
|
+
const t = E(), n = W("designer-host-service"), s = W("design-item-context"), u = De(s, n), y = je(t, s, u);
|
|
1249
|
+
return Q(() => {
|
|
1026
1250
|
t.value.componentInstance = y;
|
|
1027
|
-
}), e.expose(y.value), () =>
|
|
1251
|
+
}), e.expose(y.value), () => X("div", {
|
|
1028
1252
|
ref: t,
|
|
1029
1253
|
class: "drag-container",
|
|
1030
1254
|
"data-dragref": `${s.schema.id}-container`
|
|
1031
1255
|
}, [e.slots.default && e.slots.default()]);
|
|
1032
1256
|
}
|
|
1033
|
-
}),
|
|
1034
|
-
|
|
1035
|
-
|
|
1257
|
+
}), $e = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/component.schema.json", Ne = "component-ref", Be = "A Farris Visual Component", Fe = "object", Ue = {
|
|
1258
|
+
id: {
|
|
1259
|
+
description: "The unique identifier for a Section",
|
|
1260
|
+
type: "string"
|
|
1261
|
+
},
|
|
1262
|
+
type: {
|
|
1263
|
+
description: "The type string of Section component",
|
|
1264
|
+
type: "string",
|
|
1265
|
+
default: "component-ref"
|
|
1266
|
+
},
|
|
1267
|
+
component: {
|
|
1268
|
+
description: "",
|
|
1269
|
+
type: "string",
|
|
1270
|
+
default: ""
|
|
1271
|
+
}
|
|
1272
|
+
}, Le = [
|
|
1273
|
+
"id",
|
|
1274
|
+
"type",
|
|
1275
|
+
"component"
|
|
1276
|
+
], qe = {
|
|
1277
|
+
$schema: $e,
|
|
1278
|
+
$id: ke,
|
|
1279
|
+
title: Ne,
|
|
1280
|
+
description: Be,
|
|
1281
|
+
type: Fe,
|
|
1282
|
+
properties: Ue,
|
|
1283
|
+
required: Le
|
|
1284
|
+
}, Ge = {
|
|
1285
|
+
id: { type: String },
|
|
1286
|
+
component: { type: String, default: "" }
|
|
1287
|
+
}, We = H(Ge, qe, R, I), Xe = {
|
|
1288
|
+
install(r) {
|
|
1289
|
+
r.component(k.name, k);
|
|
1036
1290
|
},
|
|
1037
|
-
register(
|
|
1038
|
-
|
|
1291
|
+
register(r, e, t, n) {
|
|
1292
|
+
r.component = k, e.component = J;
|
|
1039
1293
|
},
|
|
1040
|
-
registerDesigner(
|
|
1041
|
-
|
|
1294
|
+
registerDesigner(r, e) {
|
|
1295
|
+
r.component = Ve, e.component = J, e["component-ref"] = We;
|
|
1042
1296
|
}
|
|
1043
1297
|
};
|
|
1044
1298
|
export {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1299
|
+
k as Component,
|
|
1300
|
+
Ve as ComponentDesign,
|
|
1301
|
+
Qe as componentDesignProps,
|
|
1302
|
+
D as componentProps,
|
|
1303
|
+
Xe as default,
|
|
1304
|
+
J as propsResolver
|
|
1050
1305
|
};
|