@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,94 +1,95 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as v, computed as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { useDesignerComponent as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var D = Object.defineProperty;
|
|
2
|
+
var H = (r, n, e) => n in r ? D(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
|
|
3
|
+
var y = (r, n, e) => H(r, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as v, computed as C, defineComponent as M, createVNode as f, inject as x, onMounted as U } from "vue";
|
|
5
|
+
import { isPlainObject as E, cloneDeep as P } from "lodash-es";
|
|
6
|
+
import { resolveAppearance as q, getSchemaByType as F } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { useDesignerComponent as N } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { useResponseLayoutEditorSetting as Q } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
9
|
+
import { withInstall as j } from "../common/index.esm.js";
|
|
10
|
+
const O = {}, W = {};
|
|
11
|
+
function V(r) {
|
|
12
|
+
const { properties: n, title: e, ignore: t } = r, o = t && Array.isArray(t), a = Object.keys(n).reduce((l, u) => ((!o || !t.find((p) => p == u)) && (l[u] = n[u].type === "object" && n[u].properties ? V(n[u]) : P(n[u].default)), l), {});
|
|
13
|
+
return (!o || !t.find((l) => l == "id")) && (a.id = `${e}-${Date.now()}`), a;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
return Object.keys(
|
|
15
|
+
function G(r, n) {
|
|
16
|
+
const e = V(n);
|
|
17
|
+
return Object.keys(r).reduce((t, o) => (t[o] && E(t[o]) && E(r[o]) ? Object.assign(t[o], r[o]) : t[o] = r[o], t), e), e;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
return Object.keys(
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
|
|
19
|
+
function Z(r, n) {
|
|
20
|
+
return Object.keys(r).filter((t) => r[t] != null).reduce((t, o) => {
|
|
21
|
+
if (n.has(o)) {
|
|
22
|
+
const a = n.get(o);
|
|
23
|
+
if (typeof a == "string")
|
|
24
|
+
t[a] = r[o];
|
|
24
25
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
26
|
+
const l = a(o, r[o], r);
|
|
27
|
+
Object.assign(t, l);
|
|
27
28
|
}
|
|
28
29
|
} else
|
|
29
|
-
|
|
30
|
-
return
|
|
30
|
+
t[o] = r[o];
|
|
31
|
+
return t;
|
|
31
32
|
}, {});
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
function z(r, n, e = /* @__PURE__ */ new Map()) {
|
|
35
|
+
const t = G(r, n);
|
|
36
|
+
return Z(t, e);
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
if (typeof
|
|
40
|
-
return
|
|
41
|
-
if (typeof
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
38
|
+
function K(r = {}) {
|
|
39
|
+
function n(i, d, s, g) {
|
|
40
|
+
if (typeof s == "number")
|
|
41
|
+
return g[i].length === s;
|
|
42
|
+
if (typeof s == "object") {
|
|
43
|
+
const A = Object.keys(s)[0], m = s[A];
|
|
44
|
+
if (A === "not")
|
|
45
|
+
return Number(g[i].length) !== Number(m);
|
|
46
|
+
if (A === "moreThan")
|
|
47
|
+
return Number(g[i].length) >= Number(m);
|
|
48
|
+
if (A === "lessThan")
|
|
49
|
+
return Number(g[i].length) <= Number(m);
|
|
49
50
|
}
|
|
50
51
|
return !1;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
53
|
+
function e(i, d, s, g) {
|
|
54
|
+
return g[i] && g[i].propertyValue && String(g[i].propertyValue.value) === String(s);
|
|
54
55
|
}
|
|
55
|
-
const
|
|
56
|
-
["length",
|
|
57
|
-
["getProperty",
|
|
56
|
+
const t = /* @__PURE__ */ new Map([
|
|
57
|
+
["length", n],
|
|
58
|
+
["getProperty", e]
|
|
58
59
|
]);
|
|
59
|
-
Object.keys(
|
|
60
|
-
function o(i,
|
|
61
|
-
const
|
|
62
|
-
return typeof
|
|
63
|
-
if (
|
|
64
|
-
return { target:
|
|
65
|
-
const
|
|
66
|
-
return { target:
|
|
60
|
+
Object.keys(r).reduce((i, d) => (i.set(d, r[d]), i), t);
|
|
61
|
+
function o(i, d) {
|
|
62
|
+
const s = i;
|
|
63
|
+
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!d }] : typeof d == "object" ? Object.keys(d).map((g) => {
|
|
64
|
+
if (g === "length")
|
|
65
|
+
return { target: s, operator: "length", param: null, value: d[g] };
|
|
66
|
+
const A = g, m = d[g];
|
|
67
|
+
return { target: s, operator: "getProperty", param: A, value: m };
|
|
67
68
|
}) : [];
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
return Object.keys(i).reduce((
|
|
71
|
-
const
|
|
72
|
-
return
|
|
70
|
+
function a(i) {
|
|
71
|
+
return Object.keys(i).reduce((s, g) => {
|
|
72
|
+
const A = o(g, i[g]);
|
|
73
|
+
return s.push(...A), s;
|
|
73
74
|
}, []);
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
76
|
+
function l(i, d) {
|
|
77
|
+
if (t.has(i.operator)) {
|
|
78
|
+
const s = t.get(i.operator);
|
|
79
|
+
return s && s(i.target, i.param, i.value, d) || !1;
|
|
79
80
|
}
|
|
80
81
|
return !1;
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
83
|
+
function u(i, d) {
|
|
84
|
+
return a(i).reduce((A, m) => A && l(m, d), !0);
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
-
const
|
|
87
|
-
return
|
|
86
|
+
function p(i, d) {
|
|
87
|
+
const s = Object.keys(i), g = s.includes("allOf"), A = s.includes("anyOf"), m = g || A, w = (m ? i[m ? g ? "allOf" : "anyOf" : "allOf"] : [i]).map((L) => u(L, d));
|
|
88
|
+
return g ? !w.includes(!1) : w.includes(!0);
|
|
88
89
|
}
|
|
89
|
-
return { parseValueSchema:
|
|
90
|
+
return { parseValueSchema: p };
|
|
90
91
|
}
|
|
91
|
-
const
|
|
92
|
+
const c = {
|
|
92
93
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
93
94
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
94
95
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -125,21 +126,22 @@ const a = {
|
|
|
125
126
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
126
127
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
127
128
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
128
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
130
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
131
|
+
}, J = {}, Y = {};
|
|
132
|
+
K();
|
|
133
|
+
function X(r, n, e = /* @__PURE__ */ new Map(), t = (l, u, p) => u, o = {}, a = (l) => l) {
|
|
134
|
+
return O[n.title] = n, W[n.title] = t, J[n.title] = o, Y[n.title] = a, (l = {}) => {
|
|
135
|
+
const u = z(l, n, e), p = Object.keys(r).reduce((i, d) => (i[d] = r[d].default, i), {});
|
|
136
|
+
return Object.assign(p, u);
|
|
135
137
|
};
|
|
136
138
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
139
|
+
function $(r, n, e) {
|
|
140
|
+
return n;
|
|
139
141
|
}
|
|
140
|
-
const
|
|
141
|
-
["appearance",
|
|
142
|
-
]),
|
|
142
|
+
const _ = /* @__PURE__ */ new Map([
|
|
143
|
+
["appearance", q]
|
|
144
|
+
]), ee = "https://json-schema.org/draft/2020-12/schema", te = "https://farris-design.gitee.io/avatar.schema.json", ne = "avatar", oe = "A Farris Component", re = "object", ie = {
|
|
143
145
|
id: {
|
|
144
146
|
description: "The unique identifier for avatar",
|
|
145
147
|
type: "string"
|
|
@@ -201,18 +203,23 @@ const X = /* @__PURE__ */ new Map([
|
|
|
201
203
|
type: "boolean",
|
|
202
204
|
default: !0
|
|
203
205
|
}
|
|
204
|
-
},
|
|
206
|
+
}, ae = [
|
|
205
207
|
"id",
|
|
206
208
|
"type"
|
|
207
|
-
],
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
], se = [
|
|
210
|
+
"id",
|
|
211
|
+
"appearance",
|
|
212
|
+
"binding"
|
|
213
|
+
], le = {
|
|
214
|
+
$schema: ee,
|
|
215
|
+
$id: te,
|
|
216
|
+
title: ne,
|
|
217
|
+
description: oe,
|
|
218
|
+
type: re,
|
|
219
|
+
properties: ie,
|
|
220
|
+
required: ae,
|
|
221
|
+
ignore: se
|
|
222
|
+
}, I = {
|
|
216
223
|
/**
|
|
217
224
|
* 头像宽度
|
|
218
225
|
*/
|
|
@@ -249,67 +256,67 @@ const X = /* @__PURE__ */ new Map([
|
|
|
249
256
|
* 支持的头像类型
|
|
250
257
|
*/
|
|
251
258
|
imageType: { type: Array, default: ["jpeg"] }
|
|
252
|
-
},
|
|
253
|
-
function
|
|
254
|
-
const o = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwIC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vG/rxyxvbN8eUB9DDa7PP9OeNvZrpfdu8OD5mkvGNY55Y/pzyx8ruIPePJj0nazj8OU8ZpfZ1w6Ts8rJlrhfHfPmg7FKgAF4AgVARPW/NanoAsZaBVlZUFVF4g57fbfhY7pLld0l/e+EeO23K5ZW5ZXjb97o1tcvj22WXHS/DPKMqAAAAAAAAAAAAAAAAAAAAAAOux212d0ttwvGdnjHr3ceMfPevo2XxbLTu3T0B1TmHJAZVOYF4p98xPviBFScQGlRZxBdS3TG3slvsibS/8WX+t/YHhx/TPGaqk4TyVQAAAAAAAAAAAAAAAAAAAAAAd+iX82c7ZL9/Nwdui/5b/rfoD00vARAQqAhfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z",
|
|
255
|
-
function
|
|
256
|
-
return
|
|
259
|
+
}, S = X(I, le, _, $);
|
|
260
|
+
function R(r,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Z", a = v(r.readonly);
|
|
262
|
+
function l(A) {
|
|
263
|
+
return A.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
257
264
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
265
|
+
function u(A) {
|
|
266
|
+
return A.indexOf("data:image/") > -1;
|
|
260
267
|
}
|
|
261
|
-
function A
|
|
262
|
-
return
|
|
268
|
+
function p(A) {
|
|
269
|
+
return A ? "data:image/jpeg;base64," + A : "";
|
|
263
270
|
}
|
|
264
|
-
const i =
|
|
265
|
-
var
|
|
266
|
-
if (!
|
|
271
|
+
const i = C(() => {
|
|
272
|
+
var m;
|
|
273
|
+
if (!r.imageType || !r.imageType.length)
|
|
267
274
|
return "";
|
|
268
|
-
const
|
|
269
|
-
return !
|
|
270
|
-
}),
|
|
271
|
-
const
|
|
272
|
-
return
|
|
273
|
-
}),
|
|
274
|
-
function
|
|
275
|
-
|
|
275
|
+
const A = (m = r.imageType) == null ? void 0 : m.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
|
|
276
|
+
return !A || !A.length ? "image/*" : A.join(",");
|
|
277
|
+
}), d = C(() => {
|
|
278
|
+
const A = t.value || r.cover || o;
|
|
279
|
+
return l(A) || u(A) ? A : p(A);
|
|
280
|
+
}), s = C(() => a.value ? "" : r.title);
|
|
281
|
+
function g() {
|
|
282
|
+
a.value || e && e.value && e.value.click();
|
|
276
283
|
}
|
|
277
|
-
return { acceptTypes: i, imageSource:
|
|
284
|
+
return { acceptTypes: i, imageSource: d, imageTitle: s, onClickImage: g };
|
|
278
285
|
}
|
|
279
|
-
const B = /* @__PURE__ */
|
|
286
|
+
const B = /* @__PURE__ */ M({
|
|
280
287
|
name: "FAvatar",
|
|
281
|
-
props:
|
|
288
|
+
props: I,
|
|
282
289
|
emits: ["change", "update:modelValue"],
|
|
283
|
-
setup(
|
|
284
|
-
const
|
|
290
|
+
setup(r, n) {
|
|
291
|
+
const e = C(() => ({
|
|
285
292
|
"f-avatar": !0,
|
|
286
|
-
"f-avatar-readonly":
|
|
287
|
-
"f-avatar-circle":
|
|
288
|
-
"f-avatar-square":
|
|
289
|
-
})),
|
|
290
|
-
width:
|
|
291
|
-
height:
|
|
292
|
-
})),
|
|
293
|
-
function
|
|
293
|
+
"f-avatar-readonly": r.readonly,
|
|
294
|
+
"f-avatar-circle": r.shape === "circle",
|
|
295
|
+
"f-avatar-square": r.shape === "square"
|
|
296
|
+
})), t = v(r.modelValue), o = C(() => ({
|
|
297
|
+
width: r.avatarWidth + "px",
|
|
298
|
+
height: r.avatarHeight + "px"
|
|
299
|
+
})), a = !1;
|
|
300
|
+
function l() {
|
|
294
301
|
return "";
|
|
295
302
|
}
|
|
296
|
-
function
|
|
303
|
+
function u() {
|
|
297
304
|
}
|
|
298
|
-
const
|
|
305
|
+
const p = v(null), {
|
|
299
306
|
acceptTypes: i,
|
|
300
|
-
imageSource:
|
|
301
|
-
onClickImage:
|
|
302
|
-
} =
|
|
307
|
+
imageSource: d,
|
|
308
|
+
onClickImage: s
|
|
309
|
+
} = R(r, n, p, t);
|
|
303
310
|
return () => f("div", {
|
|
304
|
-
class:
|
|
311
|
+
class: e.value,
|
|
305
312
|
style: o.value,
|
|
306
|
-
onClick:
|
|
307
|
-
}, [
|
|
308
|
-
title:
|
|
313
|
+
onClick: s
|
|
314
|
+
}, [a, f("img", {
|
|
315
|
+
title: r.title,
|
|
309
316
|
class: "f-avatar-image",
|
|
310
|
-
src:
|
|
311
|
-
onError:
|
|
312
|
-
}, null), !
|
|
317
|
+
src: d.value,
|
|
318
|
+
onError: l
|
|
319
|
+
}, null), !r.readonly && f("div", {
|
|
313
320
|
class: "f-avatar-icon"
|
|
314
321
|
}, [f("span", {
|
|
315
322
|
class: "f-icon f-icon-camera"
|
|
@@ -319,82 +326,82 @@ const B = /* @__PURE__ */ F({
|
|
|
319
326
|
type: "file",
|
|
320
327
|
class: "f-avatar-upload",
|
|
321
328
|
accept: i.value,
|
|
322
|
-
onChange:
|
|
329
|
+
onChange: u,
|
|
323
330
|
style: "display: none;"
|
|
324
331
|
}, null)]);
|
|
325
332
|
}
|
|
326
333
|
});
|
|
327
|
-
function
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
function o(
|
|
334
|
+
function ce(r, n) {
|
|
335
|
+
r.schema;
|
|
336
|
+
const e = v(!0), t = v(!0);
|
|
337
|
+
function o(s) {
|
|
331
338
|
return !1;
|
|
332
339
|
}
|
|
333
|
-
function
|
|
340
|
+
function a() {
|
|
334
341
|
return !1;
|
|
335
342
|
}
|
|
336
|
-
function
|
|
343
|
+
function l() {
|
|
337
344
|
return !1;
|
|
338
345
|
}
|
|
339
|
-
function
|
|
346
|
+
function u() {
|
|
340
347
|
return !0;
|
|
341
348
|
}
|
|
342
|
-
function
|
|
349
|
+
function p(s) {
|
|
343
350
|
}
|
|
344
351
|
function i() {
|
|
345
352
|
}
|
|
346
|
-
function
|
|
353
|
+
function d(s) {
|
|
347
354
|
return null;
|
|
348
355
|
}
|
|
349
356
|
return {
|
|
350
357
|
canAccepts: o,
|
|
351
|
-
checkCanDeleteComponent:
|
|
352
|
-
checkCanMoveComponent:
|
|
353
|
-
hideNestedPaddingInDesginerView:
|
|
354
|
-
onAcceptMovedChildElement:
|
|
358
|
+
checkCanDeleteComponent: a,
|
|
359
|
+
checkCanMoveComponent: l,
|
|
360
|
+
hideNestedPaddingInDesginerView: u,
|
|
361
|
+
onAcceptMovedChildElement: p,
|
|
355
362
|
resolveComponentContext: i,
|
|
356
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
357
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
358
|
-
getPropsConfig:
|
|
363
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
364
|
+
triggerBelongedComponentToDeleteWhenDeleted: t,
|
|
365
|
+
getPropsConfig: d
|
|
359
366
|
};
|
|
360
367
|
}
|
|
361
|
-
class
|
|
362
|
-
constructor(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
368
|
+
class pe {
|
|
369
|
+
constructor(n, e) {
|
|
370
|
+
y(this, "componentId");
|
|
371
|
+
y(this, "viewModelId");
|
|
372
|
+
y(this, "eventsEditorUtils");
|
|
373
|
+
y(this, "formSchemaUtils");
|
|
374
|
+
y(this, "formMetadataConverter");
|
|
375
|
+
y(this, "designViewModelUtils");
|
|
376
|
+
y(this, "designViewModelField");
|
|
377
|
+
y(this, "controlCreatorUtils");
|
|
378
|
+
y(this, "designerHostService");
|
|
379
|
+
y(this, "schemaService", null);
|
|
380
|
+
y(this, "metadataService", null);
|
|
381
|
+
y(this, "propertyConfig", {
|
|
375
382
|
type: "object",
|
|
376
383
|
categories: {}
|
|
377
384
|
});
|
|
378
|
-
var
|
|
379
|
-
this.componentId =
|
|
385
|
+
var t;
|
|
386
|
+
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((t = this.formSchemaUtils) == null ? void 0 : t.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
380
387
|
}
|
|
381
388
|
getTableInfo() {
|
|
382
|
-
var
|
|
383
|
-
return (
|
|
389
|
+
var n;
|
|
390
|
+
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
384
391
|
}
|
|
385
|
-
setDesignViewModelField(
|
|
386
|
-
const
|
|
387
|
-
if (
|
|
392
|
+
setDesignViewModelField(n) {
|
|
393
|
+
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
394
|
+
if (e) {
|
|
388
395
|
if (!this.designViewModelField) {
|
|
389
|
-
const
|
|
390
|
-
this.designViewModelField =
|
|
396
|
+
const t = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
397
|
+
this.designViewModelField = t.fields.find((o) => o.id === e);
|
|
391
398
|
}
|
|
392
|
-
|
|
399
|
+
n.updateOn = this.designViewModelField.updateOn;
|
|
393
400
|
}
|
|
394
401
|
}
|
|
395
|
-
changeFieldEditorType(
|
|
402
|
+
changeFieldEditorType(n, e) {
|
|
396
403
|
}
|
|
397
|
-
getBasicPropConfig(
|
|
404
|
+
getBasicPropConfig(n) {
|
|
398
405
|
return {
|
|
399
406
|
description: "Basic Information",
|
|
400
407
|
title: "基本信息",
|
|
@@ -413,13 +420,13 @@ class se {
|
|
|
413
420
|
type: "combo-list",
|
|
414
421
|
textField: "name",
|
|
415
422
|
valueField: "value",
|
|
416
|
-
data: [{ value:
|
|
423
|
+
data: [{ value: n.type, name: c[n.type].name }]
|
|
417
424
|
}
|
|
418
425
|
}
|
|
419
426
|
}
|
|
420
427
|
};
|
|
421
428
|
}
|
|
422
|
-
getAppearanceConfig(
|
|
429
|
+
getAppearanceConfig(n = null) {
|
|
423
430
|
return {
|
|
424
431
|
title: "样式",
|
|
425
432
|
description: "Appearance",
|
|
@@ -439,90 +446,105 @@ class se {
|
|
|
439
446
|
}
|
|
440
447
|
};
|
|
441
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
*
|
|
451
|
+
* @param propertyId
|
|
452
|
+
* @param componentInstance
|
|
453
|
+
* @returns
|
|
454
|
+
*/
|
|
455
|
+
updateElementByParentContainer(n, e) {
|
|
456
|
+
const t = e && e.parent && e.parent.schema;
|
|
457
|
+
if (!t)
|
|
458
|
+
return;
|
|
459
|
+
const o = t.contents.findIndex((l) => l.id === n), a = P(t.contents[o]);
|
|
460
|
+
t.contents.splice(o, 1), t.contents.splice(o, 0, a);
|
|
461
|
+
}
|
|
442
462
|
}
|
|
443
|
-
const
|
|
463
|
+
const b = class b {
|
|
444
464
|
/**
|
|
445
465
|
* 根据绑定字段类型获取可用的输入类控件
|
|
446
466
|
*/
|
|
447
|
-
static getEditorTypesByMDataType(
|
|
448
|
-
const
|
|
449
|
-
return
|
|
467
|
+
static getEditorTypesByMDataType(n) {
|
|
468
|
+
const e = b.fieldControlTypeMapping[n];
|
|
469
|
+
return e || [{ key: "", value: "" }];
|
|
450
470
|
}
|
|
451
471
|
/**
|
|
452
472
|
* 获取所有输入类控件
|
|
453
473
|
*/
|
|
454
474
|
static getAllInputTypes() {
|
|
455
|
-
const
|
|
456
|
-
for (let
|
|
457
|
-
|
|
458
|
-
|
|
475
|
+
const n = [];
|
|
476
|
+
for (let e in b.fieldControlTypeMapping)
|
|
477
|
+
b.fieldControlTypeMapping[e].forEach((t) => {
|
|
478
|
+
n.find((o) => o.key === t.key && o.value === t.value) || n.push({ key: t.key, value: t.value });
|
|
459
479
|
});
|
|
460
|
-
return
|
|
480
|
+
return n;
|
|
461
481
|
}
|
|
462
482
|
};
|
|
463
483
|
/**
|
|
464
484
|
* <字段类型,可配置的控件类型列表>的映射
|
|
465
485
|
*/
|
|
466
|
-
|
|
486
|
+
y(b, "fieldControlTypeMapping", {
|
|
467
487
|
String: [
|
|
468
|
-
{ key:
|
|
469
|
-
{ key:
|
|
470
|
-
{ key:
|
|
471
|
-
{ key:
|
|
472
|
-
{ key:
|
|
473
|
-
{ key:
|
|
474
|
-
{ key:
|
|
488
|
+
{ key: c["input-group"].type, value: c["input-group"].name },
|
|
489
|
+
{ key: c.lookup.type, value: c.lookup.name },
|
|
490
|
+
{ key: c["date-picker"].type, value: c["date-picker"].name },
|
|
491
|
+
{ key: c["check-box"].type, value: c["check-box"].name },
|
|
492
|
+
{ key: c["radio-group"].type, value: c["radio-group"].name },
|
|
493
|
+
{ key: c["combo-list"].type, value: c["combo-list"].name },
|
|
494
|
+
{ key: c.textarea.type, value: c.textarea.name }
|
|
475
495
|
],
|
|
476
496
|
Text: [
|
|
477
|
-
{ key:
|
|
478
|
-
{ key:
|
|
497
|
+
{ key: c.textarea.type, value: c.textarea.name },
|
|
498
|
+
{ key: c.lookup.type, value: c.lookup.name }
|
|
479
499
|
],
|
|
480
500
|
Decimal: [
|
|
481
|
-
{ key:
|
|
501
|
+
{ key: c["number-spinner"].type, value: c["number-spinner"].name }
|
|
482
502
|
],
|
|
483
503
|
Integer: [
|
|
484
|
-
{ key:
|
|
504
|
+
{ key: c["number-spinner"].type, value: c["number-spinner"].name }
|
|
485
505
|
],
|
|
486
506
|
Number: [
|
|
487
|
-
{ key:
|
|
507
|
+
{ key: c["number-spinner"].type, value: c["number-spinner"].name }
|
|
488
508
|
],
|
|
489
509
|
BigNumber: [
|
|
490
|
-
{ key:
|
|
510
|
+
{ key: c["number-spinner"].type, value: c["number-spinner"].name }
|
|
491
511
|
],
|
|
492
512
|
Date: [
|
|
493
|
-
{ key:
|
|
513
|
+
{ key: c["date-picker"].type, value: c["date-picker"].name }
|
|
494
514
|
],
|
|
495
515
|
DateTime: [
|
|
496
|
-
{ key:
|
|
516
|
+
{ key: c["date-picker"].type, value: c["date-picker"].name }
|
|
497
517
|
],
|
|
498
518
|
Boolean: [
|
|
499
|
-
{ key:
|
|
500
|
-
{ key:
|
|
519
|
+
{ key: c.switch.type, value: c.switch.name },
|
|
520
|
+
{ key: c["check-box"].type, value: c["check-box"].name }
|
|
501
521
|
],
|
|
502
522
|
Enum: [
|
|
503
|
-
{ key:
|
|
504
|
-
{ key:
|
|
523
|
+
{ key: c["combo-list"].type, value: c["combo-list"].name },
|
|
524
|
+
{ key: c["radio-group"].type, value: c["radio-group"].name }
|
|
505
525
|
],
|
|
506
526
|
Object: [
|
|
507
|
-
{ key:
|
|
508
|
-
{ key:
|
|
509
|
-
{ key:
|
|
527
|
+
{ key: c.lookup.type, value: c.lookup.name },
|
|
528
|
+
{ key: c["combo-list"].type, value: c["combo-list"].name },
|
|
529
|
+
{ key: c["radio-group"].type, value: c["radio-group"].name }
|
|
510
530
|
]
|
|
511
531
|
});
|
|
512
|
-
let
|
|
513
|
-
const
|
|
514
|
-
class
|
|
515
|
-
constructor(e,
|
|
516
|
-
super(e,
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
532
|
+
let k = b;
|
|
533
|
+
const de = v(0);
|
|
534
|
+
class ue extends pe {
|
|
535
|
+
constructor(e, t) {
|
|
536
|
+
super(e, t);
|
|
537
|
+
y(this, "responseLayoutEditorFunction");
|
|
538
|
+
this.responseLayoutEditorFunction = Q(this.formSchemaUtils);
|
|
539
|
+
}
|
|
540
|
+
getPropertyConfig(e, t) {
|
|
541
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, t), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
542
|
+
}
|
|
543
|
+
getBasicProperties(e, t) {
|
|
544
|
+
var u;
|
|
545
|
+
var o = this;
|
|
524
546
|
this.setDesignViewModelField(e);
|
|
525
|
-
const
|
|
547
|
+
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
526
548
|
return {
|
|
527
549
|
description: "Basic Information",
|
|
528
550
|
title: "基本信息",
|
|
@@ -534,8 +556,8 @@ class ce extends se {
|
|
|
534
556
|
readonly: !0
|
|
535
557
|
},
|
|
536
558
|
type: {
|
|
537
|
-
description: "
|
|
538
|
-
title: "
|
|
559
|
+
description: "编辑器类型",
|
|
560
|
+
title: "编辑器类型",
|
|
539
561
|
type: "string",
|
|
540
562
|
refreshPanelAfterChanged: !0,
|
|
541
563
|
$converter: "/converter/change-editor.converter",
|
|
@@ -544,7 +566,7 @@ class ce extends se {
|
|
|
544
566
|
textField: "value",
|
|
545
567
|
valueField: "key",
|
|
546
568
|
editable: !1,
|
|
547
|
-
data:
|
|
569
|
+
data: o.designViewModelField ? k.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : k.getAllInputTypes()
|
|
548
570
|
}
|
|
549
571
|
},
|
|
550
572
|
label: {
|
|
@@ -561,7 +583,7 @@ class ce extends se {
|
|
|
561
583
|
bindingType: { enable: !1 },
|
|
562
584
|
editorParams: {
|
|
563
585
|
propertyData: e,
|
|
564
|
-
formBasicInfo:
|
|
586
|
+
formBasicInfo: a
|
|
565
587
|
},
|
|
566
588
|
columns: [
|
|
567
589
|
{ field: "name", title: "字段名称" },
|
|
@@ -569,22 +591,27 @@ class ce extends se {
|
|
|
569
591
|
{ field: "fieldType", title: "字段类型" }
|
|
570
592
|
],
|
|
571
593
|
textField: "bindingField",
|
|
572
|
-
data:
|
|
594
|
+
data: l
|
|
573
595
|
}
|
|
574
596
|
}
|
|
575
597
|
},
|
|
576
|
-
setPropertyRelates(
|
|
577
|
-
if (
|
|
578
|
-
switch (
|
|
598
|
+
setPropertyRelates(p, i) {
|
|
599
|
+
if (p)
|
|
600
|
+
switch (p && p.propertyID) {
|
|
579
601
|
case "type": {
|
|
580
|
-
|
|
602
|
+
o.changeControlType(e, p, t);
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
605
|
+
case "label": {
|
|
606
|
+
p.needRefreshControlTree = !0;
|
|
581
607
|
break;
|
|
582
608
|
}
|
|
583
609
|
}
|
|
584
610
|
}
|
|
585
611
|
};
|
|
586
612
|
}
|
|
587
|
-
getAppearanceProperties(e) {
|
|
613
|
+
getAppearanceProperties(e, t) {
|
|
614
|
+
var o = this;
|
|
588
615
|
return {
|
|
589
616
|
title: "样式",
|
|
590
617
|
description: "Appearance",
|
|
@@ -605,12 +632,25 @@ class ce extends se {
|
|
|
605
632
|
description: "响应式列宽",
|
|
606
633
|
title: "响应式列宽",
|
|
607
634
|
type: "boolean",
|
|
608
|
-
visible: !
|
|
635
|
+
visible: !0,
|
|
636
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
637
|
+
refreshPanelAfterChanged: !0,
|
|
609
638
|
editor: {
|
|
610
|
-
type: "response-layout-editor-setting"
|
|
611
|
-
|
|
612
|
-
|
|
639
|
+
type: "response-layout-editor-setting",
|
|
640
|
+
initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
|
|
641
|
+
}
|
|
613
642
|
}
|
|
643
|
+
},
|
|
644
|
+
setPropertyRelates(a, l) {
|
|
645
|
+
if (a)
|
|
646
|
+
switch (a && a.propertyID) {
|
|
647
|
+
case "responseLayout":
|
|
648
|
+
o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, t), delete e.responseLayout;
|
|
649
|
+
break;
|
|
650
|
+
case "class":
|
|
651
|
+
o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, t);
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
614
654
|
}
|
|
615
655
|
};
|
|
616
656
|
}
|
|
@@ -622,44 +662,44 @@ class ce extends se {
|
|
|
622
662
|
* @param propertyData 控件DOM属性
|
|
623
663
|
* @param newControlType 新控件类型
|
|
624
664
|
*/
|
|
625
|
-
changeControlType(e,
|
|
626
|
-
var
|
|
627
|
-
const
|
|
628
|
-
if (!
|
|
665
|
+
changeControlType(e, t, o) {
|
|
666
|
+
var d, s, g, A;
|
|
667
|
+
const a = t.propertyValue, l = o && o.parent && o.parent.schema;
|
|
668
|
+
if (!l)
|
|
629
669
|
return;
|
|
630
|
-
const
|
|
631
|
-
let
|
|
670
|
+
const u = l.contents.findIndex((m) => m.id === e.id), p = l.contents[u];
|
|
671
|
+
let i;
|
|
632
672
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
633
673
|
editor: {
|
|
634
|
-
$type:
|
|
674
|
+
$type: a
|
|
635
675
|
},
|
|
636
676
|
name: this.designViewModelField.name,
|
|
637
677
|
require: this.designViewModelField.require,
|
|
638
678
|
readonly: this.designViewModelField.readonly
|
|
639
|
-
}, !1),
|
|
640
|
-
id:
|
|
641
|
-
appearance:
|
|
642
|
-
size:
|
|
643
|
-
label:
|
|
644
|
-
binding:
|
|
645
|
-
visible:
|
|
646
|
-
}), Object.assign(
|
|
647
|
-
isTextArea:
|
|
648
|
-
placeholder: (
|
|
649
|
-
holdPlace: (
|
|
650
|
-
readonly: (
|
|
651
|
-
require: (
|
|
652
|
-
}),
|
|
653
|
-
(
|
|
654
|
-
),
|
|
655
|
-
}
|
|
656
|
-
getComponentConfig(e,
|
|
657
|
-
const
|
|
658
|
-
description: "
|
|
659
|
-
title: "
|
|
679
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = F("form-group") || {}, i.editor = F(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
|
|
680
|
+
id: p.id,
|
|
681
|
+
appearance: p.appearance,
|
|
682
|
+
size: p.size,
|
|
683
|
+
label: p.label,
|
|
684
|
+
binding: p.binding,
|
|
685
|
+
visible: p.visible
|
|
686
|
+
}), Object.assign(i.editor, {
|
|
687
|
+
isTextArea: i.isTextArea && p.isTextArea,
|
|
688
|
+
placeholder: (d = p.editor) == null ? void 0 : d.placeholder,
|
|
689
|
+
holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
|
|
690
|
+
readonly: (g = p.editor) == null ? void 0 : g.readonly,
|
|
691
|
+
require: (A = p.editor) == null ? void 0 : A.require
|
|
692
|
+
}), l.contents.splice(u, 1), l.contents.splice(u, 0, i), o.schema = Object.assign(p, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
693
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
694
|
+
), de.value++;
|
|
695
|
+
}
|
|
696
|
+
getComponentConfig(e, t = {}, o = {}) {
|
|
697
|
+
const a = Object.assign({
|
|
698
|
+
description: "编辑器",
|
|
699
|
+
title: "编辑器",
|
|
660
700
|
type: "input-group",
|
|
661
701
|
$converter: "/converter/property-editor.converter"
|
|
662
|
-
},
|
|
702
|
+
}, t), l = Object.assign({
|
|
663
703
|
readonly: {
|
|
664
704
|
description: "",
|
|
665
705
|
title: "只读",
|
|
@@ -680,18 +720,66 @@ class ce extends se {
|
|
|
680
720
|
title: "提示文本",
|
|
681
721
|
type: "string"
|
|
682
722
|
}
|
|
683
|
-
},
|
|
684
|
-
return { ...
|
|
723
|
+
}, o);
|
|
724
|
+
return { ...a, properties: { ...l } };
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
728
|
+
* @param controlClass 控件样式
|
|
729
|
+
* @param controlId 控件Id
|
|
730
|
+
* @param componentId 控件所在组件id
|
|
731
|
+
*/
|
|
732
|
+
updateUnifiedLayoutAfterControlChanged(e, t, o) {
|
|
733
|
+
const a = e.split(" ");
|
|
734
|
+
let l = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), u = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), i = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
735
|
+
l = l || "col-12", u = u || "col-md-" + l.replace("col-", ""), p = p || "col-xl-" + u.replace("col-md-", ""), i = i || "col-el-" + p.replace("col-xl-", "");
|
|
736
|
+
const d = {
|
|
737
|
+
id: t,
|
|
738
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
739
|
+
columnInMD: parseInt(u.replace("col-md-", ""), 10),
|
|
740
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
741
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
742
|
+
};
|
|
743
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
747
|
+
* @param componentId 组件Id
|
|
748
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
749
|
+
*/
|
|
750
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, t) {
|
|
751
|
+
const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
752
|
+
if (!o || !o.unifiedLayout)
|
|
753
|
+
return;
|
|
754
|
+
const a = [];
|
|
755
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), t) {
|
|
756
|
+
const m = a.find((h) => h.id === t.id);
|
|
757
|
+
Object.assign(m || {}, t);
|
|
758
|
+
}
|
|
759
|
+
const l = a.map((m) => m.columnInSM), u = a.map((m) => m.columnInMD), p = a.map((m) => m.columnInLG), i = a.map((m) => m.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(u) ? u[0] : null, g = this.checkIsUniqueColumn(p) ? p[0] : null, A = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
760
|
+
Object.assign(o.unifiedLayout, {
|
|
761
|
+
uniqueColClassInSM: d,
|
|
762
|
+
uniqueColClassInMD: s,
|
|
763
|
+
uniqueColClassInLG: g,
|
|
764
|
+
uniqueColClassInEL: A
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* 校验宽度样式值是否一致
|
|
769
|
+
*/
|
|
770
|
+
checkIsUniqueColumn(e) {
|
|
771
|
+
const t = new Set(e);
|
|
772
|
+
return Array.from(t).length === 1;
|
|
685
773
|
}
|
|
686
774
|
}
|
|
687
|
-
class
|
|
688
|
-
constructor(
|
|
689
|
-
super(
|
|
775
|
+
class Ae extends ue {
|
|
776
|
+
constructor(n, e) {
|
|
777
|
+
super(n, e);
|
|
690
778
|
}
|
|
691
|
-
getEditorProperties(
|
|
779
|
+
getEditorProperties(n) {
|
|
692
780
|
return {
|
|
693
|
-
description: "
|
|
694
|
-
title: "
|
|
781
|
+
description: "编辑器",
|
|
782
|
+
title: "编辑器",
|
|
695
783
|
type: "avatar",
|
|
696
784
|
$converter: "/converter/property-editor.converter",
|
|
697
785
|
properties: {
|
|
@@ -719,71 +807,71 @@ class pe extends ce {
|
|
|
719
807
|
};
|
|
720
808
|
}
|
|
721
809
|
}
|
|
722
|
-
function
|
|
810
|
+
function ge(r, n) {
|
|
723
811
|
const {
|
|
724
|
-
canAccepts:
|
|
725
|
-
checkCanDeleteComponent:
|
|
812
|
+
canAccepts: e,
|
|
813
|
+
checkCanDeleteComponent: t,
|
|
726
814
|
checkCanMoveComponent: o,
|
|
727
|
-
hideNestedPaddingInDesginerView:
|
|
728
|
-
onAcceptMovedChildElement:
|
|
729
|
-
resolveComponentContext:
|
|
730
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
815
|
+
hideNestedPaddingInDesginerView: a,
|
|
816
|
+
onAcceptMovedChildElement: l,
|
|
817
|
+
resolveComponentContext: u,
|
|
818
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
731
819
|
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
732
|
-
} =
|
|
733
|
-
function
|
|
734
|
-
return new
|
|
820
|
+
} = ce(r), d = r.schema;
|
|
821
|
+
function s(g, A) {
|
|
822
|
+
return new Ae(g, n).getPropertyConfig(d, A);
|
|
735
823
|
}
|
|
736
824
|
return {
|
|
737
|
-
canAccepts:
|
|
738
|
-
checkCanDeleteComponent:
|
|
825
|
+
canAccepts: e,
|
|
826
|
+
checkCanDeleteComponent: t,
|
|
739
827
|
checkCanMoveComponent: o,
|
|
740
|
-
hideNestedPaddingInDesginerView:
|
|
741
|
-
onAcceptMovedChildElement:
|
|
742
|
-
resolveComponentContext:
|
|
743
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
828
|
+
hideNestedPaddingInDesginerView: a,
|
|
829
|
+
onAcceptMovedChildElement: l,
|
|
830
|
+
resolveComponentContext: u,
|
|
831
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
744
832
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
745
|
-
getPropsConfig:
|
|
833
|
+
getPropsConfig: s
|
|
746
834
|
};
|
|
747
835
|
}
|
|
748
|
-
const
|
|
836
|
+
const me = /* @__PURE__ */ M({
|
|
749
837
|
name: "FAvatarDesign",
|
|
750
|
-
props:
|
|
838
|
+
props: I,
|
|
751
839
|
emits: ["change", "update:modelValue"],
|
|
752
|
-
setup(
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}),
|
|
757
|
-
const
|
|
840
|
+
setup(r, n) {
|
|
841
|
+
const e = v(), t = x("designer-host-service"), o = x("design-item-context"), a = ge(o, t), l = N(e, o, a);
|
|
842
|
+
U(() => {
|
|
843
|
+
e.value.componentInstance = l;
|
|
844
|
+
}), n.expose(l.value);
|
|
845
|
+
const u = C(() => ({
|
|
758
846
|
"f-avatar": !0,
|
|
759
|
-
"f-avatar-readonly":
|
|
760
|
-
"f-avatar-circle":
|
|
761
|
-
"f-avatar-square":
|
|
762
|
-
})),
|
|
763
|
-
width:
|
|
764
|
-
height:
|
|
765
|
-
})),
|
|
766
|
-
function
|
|
847
|
+
"f-avatar-readonly": r.readonly,
|
|
848
|
+
"f-avatar-circle": r.shape === "circle",
|
|
849
|
+
"f-avatar-square": r.shape === "square"
|
|
850
|
+
})), p = v(r.modelValue), i = C(() => ({
|
|
851
|
+
width: r.avatarWidth + "px",
|
|
852
|
+
height: r.avatarHeight + "px"
|
|
853
|
+
})), d = !1;
|
|
854
|
+
function s() {
|
|
767
855
|
return "";
|
|
768
856
|
}
|
|
769
|
-
function
|
|
857
|
+
function g() {
|
|
770
858
|
}
|
|
771
|
-
const
|
|
772
|
-
acceptTypes:
|
|
859
|
+
const A = v(null), {
|
|
860
|
+
acceptTypes: m,
|
|
773
861
|
imageSource: h,
|
|
774
|
-
onClickImage:
|
|
775
|
-
} =
|
|
862
|
+
onClickImage: T
|
|
863
|
+
} = R(r, n, A, p);
|
|
776
864
|
return () => f("div", {
|
|
777
|
-
ref:
|
|
778
|
-
class:
|
|
865
|
+
ref: e,
|
|
866
|
+
class: u.value,
|
|
779
867
|
style: i.value,
|
|
780
|
-
onClick:
|
|
781
|
-
}, [
|
|
782
|
-
title:
|
|
868
|
+
onClick: T
|
|
869
|
+
}, [d, f("img", {
|
|
870
|
+
title: r.title,
|
|
783
871
|
class: "f-avatar-image",
|
|
784
872
|
src: h.value,
|
|
785
|
-
onError:
|
|
786
|
-
}, null), !
|
|
873
|
+
onError: s
|
|
874
|
+
}, null), !r.readonly && f("div", {
|
|
787
875
|
class: "f-avatar-icon"
|
|
788
876
|
}, [f("span", {
|
|
789
877
|
class: "f-icon f-icon-camera"
|
|
@@ -792,22 +880,22 @@ const ue = /* @__PURE__ */ F({
|
|
|
792
880
|
name: "file-input",
|
|
793
881
|
type: "file",
|
|
794
882
|
class: "f-avatar-upload",
|
|
795
|
-
accept:
|
|
796
|
-
onChange:
|
|
883
|
+
accept: m.value,
|
|
884
|
+
onChange: g,
|
|
797
885
|
style: "display: none;"
|
|
798
886
|
}, null)]);
|
|
799
887
|
}
|
|
800
888
|
});
|
|
801
|
-
B.register = (
|
|
802
|
-
|
|
889
|
+
B.register = (r, n, e, t) => {
|
|
890
|
+
r.avatar = B, n.avatar = S;
|
|
803
891
|
};
|
|
804
|
-
B.registerDesigner = (
|
|
805
|
-
|
|
892
|
+
B.registerDesigner = (r, n, e) => {
|
|
893
|
+
r.avatar = me, n.avatar = S;
|
|
806
894
|
};
|
|
807
|
-
const
|
|
895
|
+
const Ie = j(B);
|
|
808
896
|
export {
|
|
809
897
|
B as FAvatar,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
898
|
+
I as avatarProps,
|
|
899
|
+
Ie as default,
|
|
900
|
+
S as propsResolver
|
|
813
901
|
};
|