@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- 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.esm.js +343 -325
- 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 +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- 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 +27 -27
- 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 +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- 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 +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- 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 +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- 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 +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- 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 +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- 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/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -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/data-grid/index.d.ts +5 -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 +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- 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 +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- 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/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- 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/tags/index.d.ts +36 -5
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (e, t,
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
1
|
+
var Ne = Object.defineProperty;
|
|
2
|
+
var Oe = (e, t, o) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var L = (e, t, o) => Oe(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { defineComponent as G, ref as f, computed as B, createVNode as A, nextTick as ne, inject as _, onMounted as q, watch as I, createTextVNode as $e, reactive as Le, withDirectives as Ie, resolveDirective as Re, Fragment as pe, mergeProps as Z } from "vue";
|
|
5
|
+
import { cloneDeep as ge } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
|
-
import Ge, { useNumber as
|
|
8
|
-
import
|
|
7
|
+
import Ge, { useNumber as Ue, useFormat as qe, useSpinner as We, useTextBox as He } from "../number-spinner/index.esm.js";
|
|
8
|
+
import _e from "../accordion/index.esm.js";
|
|
9
9
|
import ze from "../avatar/index.esm.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
10
|
+
import Je from "../button-edit/index.esm.js";
|
|
11
|
+
import Qe from "../button-group/index.esm.js";
|
|
12
|
+
import Ze from "../calendar/index.esm.js";
|
|
13
|
+
import Xe from "../capsule/index.esm.js";
|
|
14
|
+
import Ye from "../checkbox/index.esm.js";
|
|
15
|
+
import Ke from "../combo-list/index.esm.js";
|
|
16
|
+
import et from "../combo-tree/index.esm.js";
|
|
17
|
+
import tt from "../component/index.esm.js";
|
|
18
|
+
import ot from "../color-picker/index.esm.js";
|
|
19
19
|
import nt from "../content-container/index.esm.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
20
|
+
import rt from "../date-picker/index.esm.js";
|
|
21
|
+
import at from "../data-grid/index.esm.js";
|
|
22
|
+
import st from "../dropdown/index.esm.js";
|
|
23
23
|
import it from "../dynamic-form/index.esm.js";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
24
|
+
import lt from "../events-editor/index.esm.js";
|
|
25
|
+
import ct from "../filter-bar/index.esm.js";
|
|
26
|
+
import ut from "../field-selector/index.esm.js";
|
|
27
|
+
import pt from "../image-cropper/index.esm.js";
|
|
28
|
+
import dt from "../input-group/index.esm.js";
|
|
29
|
+
import mt from "../layout/index.esm.js";
|
|
30
30
|
import ft from "../list-nav/index.esm.js";
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
31
|
+
import yt from "../list-view/index.esm.js";
|
|
32
|
+
import gt from "../lookup/index.esm.js";
|
|
33
|
+
import bt from "../mapping-editor/index.esm.js";
|
|
34
|
+
import ht from "../nav/index.esm.js";
|
|
35
|
+
import vt from "../number-range/index.esm.js";
|
|
36
|
+
import Ct from "../order/index.esm.js";
|
|
37
|
+
import wt from "../page-header/index.esm.js";
|
|
38
|
+
import Tt from "../page-footer/index.esm.js";
|
|
39
|
+
import Ft from "../pagination/index.esm.js";
|
|
40
|
+
import Bt from "../progress/index.esm.js";
|
|
41
|
+
import jt from "../query-solution/index.esm.js";
|
|
42
42
|
import kt from "../radio-group/index.esm.js";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
43
|
+
import Pt from "../rate/index.esm.js";
|
|
44
|
+
import xt from "../response-toolbar/index.esm.js";
|
|
45
|
+
import St from "../response-layout/index.esm.js";
|
|
46
|
+
import Mt from "../response-layout-editor/index.esm.js";
|
|
47
|
+
import At from "../search-box/index.esm.js";
|
|
48
|
+
import Dt from "../section/index.esm.js";
|
|
49
|
+
import Vt from "../smoke-detector/index.esm.js";
|
|
50
50
|
import Et from "../splitter/index.esm.js";
|
|
51
|
-
import
|
|
51
|
+
import Nt from "../step/index.esm.js";
|
|
52
52
|
import Ot from "../switch/index.esm.js";
|
|
53
53
|
import $t from "../tabs/index.esm.js";
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
54
|
+
import Lt from "../tags/index.esm.js";
|
|
55
|
+
import It from "../text/index.esm.js";
|
|
56
|
+
import Rt from "../time-picker/index.esm.js";
|
|
57
57
|
import Gt from "../transfer/index.esm.js";
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
58
|
+
import Ut from "../tree-view/index.esm.js";
|
|
59
|
+
import qt from "../uploader/index.esm.js";
|
|
60
|
+
import Wt from "../verify-detail/index.esm.js";
|
|
61
|
+
import Ht from "../weather/index.esm.js";
|
|
62
|
+
import _t from "../video/index.esm.js";
|
|
63
63
|
import zt from "../textarea/index.esm.js";
|
|
64
|
-
import
|
|
65
|
-
import
|
|
64
|
+
import Jt from "../schema-selector/index.esm.js";
|
|
65
|
+
import Qt from "../tree-grid/index.esm.js";
|
|
66
66
|
import "../external-container/index.esm.js";
|
|
67
|
-
import { getSchemaByType as
|
|
68
|
-
const
|
|
69
|
-
function
|
|
70
|
-
const { properties: t, title:
|
|
71
|
-
return r.id = `${
|
|
67
|
+
import { getSchemaByType as de } from "../dynamic-resolver/index.esm.js";
|
|
68
|
+
const be = {}, he = {};
|
|
69
|
+
function ae(e) {
|
|
70
|
+
const { properties: t, title: o, ignore: r } = e, n = r && Array.isArray(r), s = Object.keys(t).reduce((a, l) => ((!n || !r.find((u) => u == l)) && (a[l] = t[l].type === "object" && t[l].properties ? ae(t[l]) : ge(t[l].default)), a), {});
|
|
71
|
+
return (!n || !r.find((a) => a == "id")) && (s.id = `${o}-${Date.now()}`), s;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
return
|
|
73
|
+
function z(e, t = {}, o) {
|
|
74
|
+
const r = be[e];
|
|
75
|
+
if (r) {
|
|
76
|
+
let n = ae(r);
|
|
77
|
+
const s = he[e];
|
|
78
|
+
return n = s ? s({ getSchemaByType: z }, n, t, o) : n, n;
|
|
79
79
|
}
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
function Qt(e, t) {
|
|
83
|
-
const n = re(t);
|
|
84
|
-
return Object.keys(e).reduce((r, o) => (r[o] && typeof r[o] == "object" ? Object.assign(r[o], e[o]) : r[o] = e[o], r), n), n;
|
|
85
|
-
}
|
|
86
82
|
function Zt(e, t) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
const o = ae(t);
|
|
84
|
+
return Object.keys(e).reduce((r, n) => (r[n] && typeof r[n] == "object" ? Object.assign(r[n], e[n]) : r[n] = e[n], r), o), o;
|
|
85
|
+
}
|
|
86
|
+
function Xt(e, t) {
|
|
87
|
+
return Object.keys(e).filter((r) => e[r] != null).reduce((r, n) => {
|
|
88
|
+
if (t.has(n)) {
|
|
89
|
+
const s = t.get(n);
|
|
90
90
|
if (typeof s == "string")
|
|
91
|
-
r[s] = e[
|
|
91
|
+
r[s] = e[n];
|
|
92
92
|
else {
|
|
93
|
-
const
|
|
94
|
-
Object.assign(r,
|
|
93
|
+
const a = s(n, e[n], e);
|
|
94
|
+
Object.assign(r, a);
|
|
95
95
|
}
|
|
96
96
|
} else
|
|
97
|
-
r[
|
|
97
|
+
r[n] = e[n];
|
|
98
98
|
return r;
|
|
99
99
|
}, {});
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const r =
|
|
103
|
-
return
|
|
101
|
+
function Yt(e, t, o = /* @__PURE__ */ new Map()) {
|
|
102
|
+
const r = Zt(e, t);
|
|
103
|
+
return Xt(r, o);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
function t(
|
|
107
|
-
if (typeof
|
|
108
|
-
return y[
|
|
109
|
-
if (typeof
|
|
110
|
-
const w = Object.keys(
|
|
105
|
+
function Kt(e = {}) {
|
|
106
|
+
function t(i, d, p, y) {
|
|
107
|
+
if (typeof p == "number")
|
|
108
|
+
return y[i].length === p;
|
|
109
|
+
if (typeof p == "object") {
|
|
110
|
+
const w = Object.keys(p)[0], c = p[w];
|
|
111
111
|
if (w === "not")
|
|
112
|
-
return Number(y[
|
|
112
|
+
return Number(y[i].length) !== Number(c);
|
|
113
113
|
if (w === "moreThan")
|
|
114
|
-
return Number(y[
|
|
114
|
+
return Number(y[i].length) >= Number(c);
|
|
115
115
|
if (w === "lessThan")
|
|
116
|
-
return Number(y[
|
|
116
|
+
return Number(y[i].length) <= Number(c);
|
|
117
117
|
}
|
|
118
118
|
return !1;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return y[
|
|
120
|
+
function o(i, d, p, y) {
|
|
121
|
+
return y[i] && y[i].propertyValue && String(y[i].propertyValue.value) === String(p);
|
|
122
122
|
}
|
|
123
123
|
const r = /* @__PURE__ */ new Map([
|
|
124
124
|
["length", t],
|
|
125
|
-
["getProperty",
|
|
125
|
+
["getProperty", o]
|
|
126
126
|
]);
|
|
127
|
-
Object.keys(e).reduce((
|
|
128
|
-
function
|
|
129
|
-
const
|
|
130
|
-
return typeof d == "number" ? [{ target:
|
|
127
|
+
Object.keys(e).reduce((i, d) => (i.set(d, e[d]), i), r);
|
|
128
|
+
function n(i, d) {
|
|
129
|
+
const p = i;
|
|
130
|
+
return typeof d == "number" ? [{ target: p, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: p, operator: "getProperty", param: i, value: !!d }] : typeof d == "object" ? Object.keys(d).map((y) => {
|
|
131
131
|
if (y === "length")
|
|
132
|
-
return { target:
|
|
133
|
-
const w = y,
|
|
134
|
-
return { target:
|
|
132
|
+
return { target: p, operator: "length", param: null, value: d[y] };
|
|
133
|
+
const w = y, c = d[y];
|
|
134
|
+
return { target: p, operator: "getProperty", param: w, value: c };
|
|
135
135
|
}) : [];
|
|
136
136
|
}
|
|
137
|
-
function s(
|
|
138
|
-
return Object.keys(
|
|
139
|
-
const w =
|
|
140
|
-
return
|
|
137
|
+
function s(i) {
|
|
138
|
+
return Object.keys(i).reduce((p, y) => {
|
|
139
|
+
const w = n(y, i[y]);
|
|
140
|
+
return p.push(...w), p;
|
|
141
141
|
}, []);
|
|
142
142
|
}
|
|
143
|
-
function i
|
|
144
|
-
if (r.has(
|
|
145
|
-
const
|
|
146
|
-
return
|
|
143
|
+
function a(i, d) {
|
|
144
|
+
if (r.has(i.operator)) {
|
|
145
|
+
const p = r.get(i.operator);
|
|
146
|
+
return p && p(i.target, i.param, i.value, d) || !1;
|
|
147
147
|
}
|
|
148
148
|
return !1;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return s(
|
|
150
|
+
function l(i, d) {
|
|
151
|
+
return s(i).reduce((w, c) => w && a(c, d), !0);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
const
|
|
153
|
+
function u(i, d) {
|
|
154
|
+
const p = Object.keys(i), y = p.includes("allOf"), w = p.includes("anyOf"), c = y || w, T = (c ? i[c ? y ? "allOf" : "anyOf" : "allOf"] : [i]).map((S) => l(S, d));
|
|
155
155
|
return y ? !T.includes(!1) : T.includes(!0);
|
|
156
156
|
}
|
|
157
|
-
return { parseValueSchema:
|
|
157
|
+
return { parseValueSchema: u };
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const k = {
|
|
160
160
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
161
161
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
162
162
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -194,18 +194,18 @@ const j = {
|
|
|
194
194
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
195
195
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
196
196
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
function X(e, t,
|
|
200
|
-
return
|
|
201
|
-
const
|
|
202
|
-
return Object.assign(
|
|
197
|
+
}, ve = {}, eo = {};
|
|
198
|
+
Kt();
|
|
199
|
+
function X(e, t, o = /* @__PURE__ */ new Map(), r = (a, l, u) => l, n = {}, s = (a) => a) {
|
|
200
|
+
return be[t.title] = t, he[t.title] = r, ve[t.title] = n, eo[t.title] = s, (a = {}) => {
|
|
201
|
+
const l = Yt(a, t, o), u = Object.keys(e).reduce((i, d) => (i[d] = e[d].default, i), {});
|
|
202
|
+
return Object.assign(u, l);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ce(e, t) {
|
|
206
206
|
return { customClass: t.class, customStyle: t.style };
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function to() {
|
|
209
209
|
function e(t) {
|
|
210
210
|
return t.editor;
|
|
211
211
|
}
|
|
@@ -213,25 +213,148 @@ function en() {
|
|
|
213
213
|
resolve: e
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
["appearance",
|
|
216
|
+
const se = /* @__PURE__ */ new Map([
|
|
217
|
+
["appearance", Ce]
|
|
218
218
|
]);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
219
|
+
var re = /* @__PURE__ */ ((e) => (e.String = "String", e.DateTime = "DateTime", e.Date = "Date", e.Enum = "Enum", e.Boolean = "Boolean", e.Number = "Number", e.Text = "Text", e.BigNumber = "BigNumber", e))(re || {});
|
|
220
|
+
const oo = "root-viewmodel";
|
|
221
|
+
class no {
|
|
222
|
+
constructor(t, o) {
|
|
223
|
+
L(this, "formSchemaUtils");
|
|
224
|
+
L(this, "controlCreatorUtils");
|
|
225
|
+
L(this, "designViewModelUtils");
|
|
226
|
+
this.resolver = t, this.designerHostService = o, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
227
|
+
}
|
|
228
|
+
createComponent(t) {
|
|
229
|
+
const o = this.createComponentRefNode(t), r = this.createComponentNode(t), n = this.createViewModeNode(t), s = this.formSchemaUtils.getFormSchema();
|
|
230
|
+
return s.module.viewmodels.push(n), s.module.components.push(r), this.designViewModelUtils.assembleDesignViewModel(), o;
|
|
231
|
+
}
|
|
232
|
+
createComponentRefNode(t) {
|
|
233
|
+
const o = this.resolver.getSchemaByType("component-ref");
|
|
234
|
+
return Object.assign(o, {
|
|
235
|
+
id: `${t.componentId}-component-ref`,
|
|
236
|
+
component: `${t.componentId}-component`
|
|
237
|
+
}), o;
|
|
238
|
+
}
|
|
239
|
+
createComponentNode(t) {
|
|
240
|
+
const o = this.resolver.getSchemaByType("component"), r = this.createFormComponentContents(t);
|
|
241
|
+
return Object.assign(o, {
|
|
242
|
+
id: `${t.componentId}-component`,
|
|
243
|
+
viewModel: `${t.componentId}-component-viewmodel`,
|
|
244
|
+
componentType: t.componentType,
|
|
245
|
+
appearance: {
|
|
246
|
+
class: this.getFormComponentClass()
|
|
247
|
+
},
|
|
248
|
+
formColumns: t.formColumns,
|
|
249
|
+
contents: r
|
|
250
|
+
}), o;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* 获取卡片组件层级的class样式
|
|
254
|
+
*/
|
|
255
|
+
getFormComponentClass() {
|
|
256
|
+
return this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
257
|
+
}
|
|
258
|
+
createFormComponentContents(t) {
|
|
259
|
+
const o = this.resolver.getSchemaByType("section");
|
|
260
|
+
Object.assign(o, {
|
|
261
|
+
id: t.componentId + "-form-section",
|
|
262
|
+
appearance: {
|
|
263
|
+
class: "f-section-form f-section-in-mainsubcard"
|
|
264
|
+
},
|
|
265
|
+
mainTitle: t.componentName
|
|
266
|
+
});
|
|
267
|
+
const r = this.resolver.getSchemaByType("response-form"), n = [];
|
|
268
|
+
Object.assign(r, {
|
|
269
|
+
id: t.componentId + "-form",
|
|
270
|
+
appearance: {
|
|
271
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
272
|
+
},
|
|
273
|
+
contents: n
|
|
274
|
+
}), o.contents = [r];
|
|
275
|
+
const { selectedFields: s } = t;
|
|
276
|
+
return s == null || s.forEach((l) => {
|
|
277
|
+
const u = ge(l), i = this.resolveControlClassByFormColumns(t), d = this.controlCreatorUtils.setFormFieldProperty(u, "", i);
|
|
278
|
+
d && n.push(d);
|
|
279
|
+
}), this.formSchemaUtils.getFormSchema().module.templateId === "double-list-in-tab-template" && (o.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", o.fill = !0), [o];
|
|
280
|
+
}
|
|
281
|
+
resolveControlClassByFormColumns(t) {
|
|
282
|
+
let o = "";
|
|
283
|
+
switch (t.formColumns) {
|
|
284
|
+
case 1: {
|
|
285
|
+
o = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
case 2: {
|
|
289
|
+
o = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
case 3: {
|
|
293
|
+
o = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
case 4: {
|
|
297
|
+
o = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return o;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* 添加viewModel节点
|
|
305
|
+
*/
|
|
306
|
+
createViewModeNode(t) {
|
|
307
|
+
return {
|
|
308
|
+
id: `${t.componentId}-component-viewmodel`,
|
|
309
|
+
code: `${t.componentId}-component-viewmodel`,
|
|
310
|
+
name: t.componentName,
|
|
311
|
+
bindTo: t.bindTo,
|
|
312
|
+
parent: oo,
|
|
313
|
+
fields: this.assembleViewModelFields(t),
|
|
314
|
+
commands: [],
|
|
315
|
+
states: [],
|
|
316
|
+
enableValidation: !0,
|
|
317
|
+
pagination: {
|
|
318
|
+
enable: !1
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* 组装viewModel fields 节点
|
|
324
|
+
*/
|
|
325
|
+
assembleViewModelFields(t) {
|
|
326
|
+
const o = [], { selectedFields: r } = t;
|
|
327
|
+
return r == null || r.forEach((n) => {
|
|
328
|
+
let s = "blur";
|
|
329
|
+
const a = n.type.name;
|
|
330
|
+
(a === re.Enum || a === re.Boolean) && (s = "change"), o.push({
|
|
331
|
+
type: "Form",
|
|
332
|
+
id: n.id,
|
|
333
|
+
fieldName: n.bindingField,
|
|
334
|
+
groupId: null,
|
|
335
|
+
groupName: null,
|
|
336
|
+
updateOn: s,
|
|
337
|
+
fieldSchema: {}
|
|
338
|
+
});
|
|
339
|
+
}), o;
|
|
340
|
+
}
|
|
228
341
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
342
|
+
function ro(e, t, o, r) {
|
|
343
|
+
const n = o.parentComponentInstance;
|
|
344
|
+
if (n) {
|
|
345
|
+
const a = {
|
|
346
|
+
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
347
|
+
componentName: "标题",
|
|
348
|
+
componentType: "form",
|
|
349
|
+
formColumns: 4,
|
|
350
|
+
parentContainerId: n.schema.id,
|
|
351
|
+
bindTo: "/"
|
|
352
|
+
};
|
|
353
|
+
return new no(e, r).createComponent(a);
|
|
354
|
+
} else
|
|
355
|
+
return t;
|
|
233
356
|
}
|
|
234
|
-
const
|
|
357
|
+
const ao = "https://json-schema.org/draft/2020-12/schema", so = "https://farris-design.gitee.io/response-form.schema.json", io = "response-form", lo = "A Farris Data Collection Component", co = "object", uo = {
|
|
235
358
|
id: {
|
|
236
359
|
description: "The unique identifier for a form group",
|
|
237
360
|
type: "string"
|
|
@@ -259,18 +382,18 @@ const rn = "https://json-schema.org/draft/2020-12/schema", an = "https://farris-
|
|
|
259
382
|
type: "array",
|
|
260
383
|
default: []
|
|
261
384
|
}
|
|
262
|
-
},
|
|
385
|
+
}, po = [
|
|
263
386
|
"id",
|
|
264
387
|
"type"
|
|
265
|
-
],
|
|
266
|
-
$schema:
|
|
267
|
-
$id:
|
|
268
|
-
title:
|
|
269
|
-
description:
|
|
270
|
-
type:
|
|
271
|
-
properties:
|
|
272
|
-
required:
|
|
273
|
-
},
|
|
388
|
+
], mo = {
|
|
389
|
+
$schema: ao,
|
|
390
|
+
$id: so,
|
|
391
|
+
title: io,
|
|
392
|
+
description: lo,
|
|
393
|
+
type: co,
|
|
394
|
+
properties: uo,
|
|
395
|
+
required: po
|
|
396
|
+
}, fo = "response-form", yo = "A Farris Component", go = "object", bo = {
|
|
274
397
|
basic: {
|
|
275
398
|
description: "Basic Infomation",
|
|
276
399
|
title: "基本信息",
|
|
@@ -292,30 +415,30 @@ const rn = "https://json-schema.org/draft/2020-12/schema", an = "https://farris-
|
|
|
292
415
|
}
|
|
293
416
|
}
|
|
294
417
|
}
|
|
295
|
-
},
|
|
296
|
-
title:
|
|
297
|
-
description:
|
|
298
|
-
type:
|
|
299
|
-
categories:
|
|
300
|
-
},
|
|
418
|
+
}, ho = {
|
|
419
|
+
title: fo,
|
|
420
|
+
description: yo,
|
|
421
|
+
type: go,
|
|
422
|
+
categories: bo
|
|
423
|
+
}, we = {
|
|
301
424
|
customClass: { type: String, default: "" }
|
|
302
|
-
},
|
|
425
|
+
}, me = X(we, mo, se, ro, ho), ee = /* @__PURE__ */ G({
|
|
303
426
|
name: "FResponseForm",
|
|
304
|
-
props:
|
|
427
|
+
props: we,
|
|
305
428
|
emits: [],
|
|
306
429
|
setup(e, t) {
|
|
307
|
-
const
|
|
308
|
-
const
|
|
430
|
+
const o = f(), r = B(() => {
|
|
431
|
+
const n = e.customClass.split(" "), s = {
|
|
309
432
|
"drag-container": !0
|
|
310
433
|
};
|
|
311
|
-
return
|
|
434
|
+
return n.reduce((a, l) => (a[l] = !0, a), s), s;
|
|
312
435
|
});
|
|
313
436
|
return () => A("div", {
|
|
314
|
-
ref:
|
|
437
|
+
ref: o,
|
|
315
438
|
class: r.value
|
|
316
439
|
}, [t.slots.default && t.slots.default()]);
|
|
317
440
|
}
|
|
318
|
-
}),
|
|
441
|
+
}), vo = "https://json-schema.org/draft/2020-12/schema", Co = "https://farris-design.gitee.io/form-group.schema.json", wo = "form-group", To = "A Farris Input Component", Fo = "object", Bo = {
|
|
319
442
|
id: {
|
|
320
443
|
description: "The unique identifier for a form group",
|
|
321
444
|
type: "string"
|
|
@@ -356,17 +479,17 @@ const rn = "https://json-schema.org/draft/2020-12/schema", an = "https://farris-
|
|
|
356
479
|
description: "",
|
|
357
480
|
type: "number"
|
|
358
481
|
}
|
|
359
|
-
},
|
|
482
|
+
}, jo = [
|
|
360
483
|
"id",
|
|
361
484
|
"type"
|
|
362
|
-
],
|
|
363
|
-
$schema:
|
|
364
|
-
$id:
|
|
365
|
-
title:
|
|
366
|
-
description:
|
|
367
|
-
type:
|
|
368
|
-
properties:
|
|
369
|
-
required:
|
|
485
|
+
], Te = {
|
|
486
|
+
$schema: vo,
|
|
487
|
+
$id: Co,
|
|
488
|
+
title: wo,
|
|
489
|
+
description: To,
|
|
490
|
+
type: Fo,
|
|
491
|
+
properties: Bo,
|
|
492
|
+
required: jo
|
|
370
493
|
}, J = {
|
|
371
494
|
id: { type: String, default: "" },
|
|
372
495
|
customClass: { type: String, default: "" },
|
|
@@ -382,111 +505,111 @@ const rn = "https://json-schema.org/draft/2020-12/schema", an = "https://farris-
|
|
|
382
505
|
type: { type: String, default: "input-group" }
|
|
383
506
|
}, fe = X(
|
|
384
507
|
J,
|
|
385
|
-
|
|
386
|
-
|
|
508
|
+
Te,
|
|
509
|
+
se,
|
|
387
510
|
void 0
|
|
388
|
-
),
|
|
389
|
-
function ie(e, t,
|
|
390
|
-
var
|
|
511
|
+
), ko = to();
|
|
512
|
+
function ie(e, t, o) {
|
|
513
|
+
var O;
|
|
391
514
|
function r() {
|
|
392
|
-
|
|
515
|
+
o != null && o.resolveComponentContext && o.resolveComponentContext();
|
|
393
516
|
}
|
|
394
517
|
r();
|
|
395
|
-
const
|
|
396
|
-
function
|
|
397
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 :
|
|
518
|
+
const n = o && o.getStyles && o.getStyles() || "", s = o && o.getDesignerClass && o.getDesignerClass() || "", a = f();
|
|
519
|
+
function l() {
|
|
520
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : o && o.checkCanMoveComponent ? o.checkCanMoveComponent() : !0;
|
|
398
521
|
}
|
|
399
|
-
function
|
|
522
|
+
function u() {
|
|
400
523
|
return !1;
|
|
401
524
|
}
|
|
402
|
-
function
|
|
403
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 :
|
|
525
|
+
function i() {
|
|
526
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : o && o.checkCanDeleteComponent ? o.checkCanDeleteComponent() : !0;
|
|
404
527
|
}
|
|
405
528
|
function d() {
|
|
406
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 :
|
|
529
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : o && o.hideNestedPaddingInDesginerView ? o.hideNestedPaddingInDesginerView() : !1;
|
|
407
530
|
}
|
|
408
|
-
function
|
|
409
|
-
if (!
|
|
531
|
+
function p(F) {
|
|
532
|
+
if (!F || !F.value)
|
|
410
533
|
return null;
|
|
411
|
-
if (
|
|
412
|
-
return
|
|
413
|
-
const
|
|
414
|
-
return
|
|
534
|
+
if (F.value.schema && F.value.schema.type === "component")
|
|
535
|
+
return F.value;
|
|
536
|
+
const M = f(F == null ? void 0 : F.value.parent), j = p(M);
|
|
537
|
+
return j || null;
|
|
415
538
|
}
|
|
416
|
-
function y(
|
|
417
|
-
const { componentInstance:
|
|
418
|
-
return !
|
|
539
|
+
function y(F = t) {
|
|
540
|
+
const { componentInstance: M, designerItemElementRef: j } = F;
|
|
541
|
+
return !M || !M.value ? null : M.value.canMove ? j : y(F.parent);
|
|
419
542
|
}
|
|
420
|
-
function w(
|
|
421
|
-
return !!
|
|
543
|
+
function w(F) {
|
|
544
|
+
return !!o && o.canAccepts(F);
|
|
422
545
|
}
|
|
423
|
-
function
|
|
546
|
+
function c() {
|
|
424
547
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
425
548
|
}
|
|
426
|
-
function
|
|
549
|
+
function m() {
|
|
427
550
|
}
|
|
428
|
-
function g(
|
|
429
|
-
|
|
551
|
+
function g(F, M) {
|
|
552
|
+
M && o != null && o.onAcceptMovedChildElement && o.onAcceptMovedChildElement(M);
|
|
430
553
|
}
|
|
431
|
-
function T(
|
|
432
|
-
const { componentType:
|
|
433
|
-
let
|
|
434
|
-
|
|
435
|
-
const
|
|
436
|
-
return
|
|
554
|
+
function T(F, M) {
|
|
555
|
+
const { componentType: j } = F;
|
|
556
|
+
let V = z(j, F, M);
|
|
557
|
+
o && o.onResolveNewComponentSchema && (V = o.onResolveNewComponentSchema(F, V));
|
|
558
|
+
const $ = j.toLowerCase().replace("-", "_");
|
|
559
|
+
return V && !V.id && V.type === j && (V.id = `${$}_${Math.random().toString().slice(2, 6)}`), V;
|
|
437
560
|
}
|
|
438
|
-
function D(
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
let
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
return
|
|
561
|
+
function D(F, M) {
|
|
562
|
+
const j = String(F.getAttribute("data-controltype")), V = F.getAttribute("data-feature"), $ = V ? JSON.parse(V) : {};
|
|
563
|
+
$.parentComponentInstance = a.value;
|
|
564
|
+
let N = z(j, $);
|
|
565
|
+
o && o.onAcceptNewChildElement && (N = o.onAcceptNewChildElement(F, M, N));
|
|
566
|
+
const R = j.toLowerCase().replace("-", "_");
|
|
567
|
+
return N && !N.id && N.type === j && (N.id = `${R}_${Math.random().toString().slice(2, 6)}`), N;
|
|
445
568
|
}
|
|
446
|
-
function
|
|
569
|
+
function S(F) {
|
|
447
570
|
}
|
|
448
|
-
function
|
|
449
|
-
if (
|
|
450
|
-
return
|
|
571
|
+
function x(...F) {
|
|
572
|
+
if (o && o.getPropsConfig)
|
|
573
|
+
return o.getPropsConfig(...F);
|
|
451
574
|
}
|
|
452
|
-
return
|
|
453
|
-
canMove:
|
|
454
|
-
canSelectParent:
|
|
455
|
-
canDelete:
|
|
575
|
+
return a.value = {
|
|
576
|
+
canMove: l(),
|
|
577
|
+
canSelectParent: u(),
|
|
578
|
+
canDelete: i(),
|
|
456
579
|
canNested: !d(),
|
|
457
580
|
contents: t == null ? void 0 : t.schema.contents,
|
|
458
581
|
elementRef: e,
|
|
459
|
-
parent: (
|
|
582
|
+
parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
|
|
460
583
|
schema: t == null ? void 0 : t.schema,
|
|
461
|
-
styles:
|
|
584
|
+
styles: n,
|
|
462
585
|
designerClass: s,
|
|
463
586
|
canAccepts: w,
|
|
464
|
-
getBelongedComponentInstance:
|
|
587
|
+
getBelongedComponentInstance: p,
|
|
465
588
|
getDraggableDesignItemElement: y,
|
|
466
|
-
getDraggingDisplayText:
|
|
467
|
-
getPropConfig:
|
|
468
|
-
getDragScopeElement:
|
|
589
|
+
getDraggingDisplayText: c,
|
|
590
|
+
getPropConfig: x,
|
|
591
|
+
getDragScopeElement: m,
|
|
469
592
|
onAcceptMovedChildElement: g,
|
|
470
593
|
onAcceptNewChildElement: D,
|
|
471
|
-
onChildElementMovedOut:
|
|
594
|
+
onChildElementMovedOut: S,
|
|
472
595
|
addNewChildComponentSchema: T,
|
|
473
596
|
updateDragAndDropRules: r,
|
|
474
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
475
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
476
|
-
},
|
|
597
|
+
triggerBelongedComponentToMoveWhenMoved: !!o && o.triggerBelongedComponentToMoveWhenMoved || f(!1),
|
|
598
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!o && o.triggerBelongedComponentToDeleteWhenDeleted || f(!1)
|
|
599
|
+
}, a;
|
|
477
600
|
}
|
|
478
|
-
function
|
|
601
|
+
function Po() {
|
|
479
602
|
function e(t) {
|
|
480
|
-
var
|
|
603
|
+
var n, s;
|
|
481
604
|
if (!t)
|
|
482
605
|
return !1;
|
|
483
|
-
const
|
|
484
|
-
if (!
|
|
606
|
+
const o = ((n = t.targetContainer) == null ? void 0 : n.componentInstance) && t.targetContainer.componentInstance.value;
|
|
607
|
+
if (!o)
|
|
485
608
|
return !1;
|
|
486
|
-
const r = (s =
|
|
609
|
+
const r = (s = o.schema.appearance) == null ? void 0 : s.class;
|
|
487
610
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
611
|
+
const a = o.schema.type, l = (a === "response-form" || a === "content-container") && r && r.includes("farris-form");
|
|
612
|
+
if (o.schema.type !== "response-layout-item" && !l)
|
|
490
613
|
return !1;
|
|
491
614
|
}
|
|
492
615
|
return t.controlType !== "field-set";
|
|
@@ -495,7 +618,7 @@ function jn() {
|
|
|
495
618
|
basalDragulaRuleForContainer: e
|
|
496
619
|
};
|
|
497
620
|
}
|
|
498
|
-
const
|
|
621
|
+
const xo = "https://json-schema.org/draft/2020-12/schema", So = "https://farris-design.gitee.io/dragging-rules.schema.json", Mo = "Dragging Rules", Ao = "The rules of designer canvas", Do = "object", Vo = {
|
|
499
622
|
"f-page": {
|
|
500
623
|
description: "The root class of page designed by farris.",
|
|
501
624
|
type: "object",
|
|
@@ -914,6 +1037,80 @@ const Pn = "https://json-schema.org/draft/2020-12/schema", xn = "https://farris-
|
|
|
914
1037
|
"f-list-nav-left": {
|
|
915
1038
|
description: "",
|
|
916
1039
|
type: "object"
|
|
1040
|
+
},
|
|
1041
|
+
"f-struct-data-grid-in-nav": {
|
|
1042
|
+
description: "",
|
|
1043
|
+
type: "object",
|
|
1044
|
+
properties: {
|
|
1045
|
+
contents: {
|
|
1046
|
+
type: "object",
|
|
1047
|
+
properties: {
|
|
1048
|
+
"f-section-form": {
|
|
1049
|
+
description: "",
|
|
1050
|
+
type: "object",
|
|
1051
|
+
properties: {
|
|
1052
|
+
rules: {
|
|
1053
|
+
type: "object",
|
|
1054
|
+
properties: {
|
|
1055
|
+
canAccept: {
|
|
1056
|
+
type: "boolean",
|
|
1057
|
+
const: !1
|
|
1058
|
+
},
|
|
1059
|
+
fixed: {
|
|
1060
|
+
type: "boolean",
|
|
1061
|
+
const: !0
|
|
1062
|
+
},
|
|
1063
|
+
hidePadding: {
|
|
1064
|
+
type: "boolean",
|
|
1065
|
+
const: !0
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"f-section-grid": {
|
|
1072
|
+
description: "",
|
|
1073
|
+
type: "object",
|
|
1074
|
+
properties: {
|
|
1075
|
+
rules: {
|
|
1076
|
+
type: "object",
|
|
1077
|
+
properties: {
|
|
1078
|
+
canAccept: {
|
|
1079
|
+
type: "boolean",
|
|
1080
|
+
const: !1
|
|
1081
|
+
},
|
|
1082
|
+
fixed: {
|
|
1083
|
+
type: "boolean",
|
|
1084
|
+
const: !0
|
|
1085
|
+
},
|
|
1086
|
+
hidePadding: {
|
|
1087
|
+
type: "boolean",
|
|
1088
|
+
const: !0
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
rules: {
|
|
1097
|
+
type: "object",
|
|
1098
|
+
properties: {
|
|
1099
|
+
canAccept: {
|
|
1100
|
+
type: "boolean",
|
|
1101
|
+
const: !1
|
|
1102
|
+
},
|
|
1103
|
+
fixed: {
|
|
1104
|
+
type: "boolean",
|
|
1105
|
+
const: !0
|
|
1106
|
+
},
|
|
1107
|
+
hidePadding: {
|
|
1108
|
+
type: "boolean",
|
|
1109
|
+
const: !0
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
917
1114
|
}
|
|
918
1115
|
}
|
|
919
1116
|
}
|
|
@@ -1059,278 +1256,265 @@ const Pn = "https://json-schema.org/draft/2020-12/schema", xn = "https://farris-
|
|
|
1059
1256
|
description: "",
|
|
1060
1257
|
type: "object"
|
|
1061
1258
|
}
|
|
1062
|
-
},
|
|
1063
|
-
$schema:
|
|
1064
|
-
$id:
|
|
1065
|
-
title:
|
|
1066
|
-
description:
|
|
1067
|
-
type:
|
|
1068
|
-
properties:
|
|
1069
|
-
required: En
|
|
1259
|
+
}, Eo = {
|
|
1260
|
+
$schema: xo,
|
|
1261
|
+
$id: So,
|
|
1262
|
+
title: Mo,
|
|
1263
|
+
description: Ao,
|
|
1264
|
+
type: Do,
|
|
1265
|
+
properties: Vo
|
|
1070
1266
|
}, te = /* @__PURE__ */ new Map();
|
|
1071
|
-
function
|
|
1072
|
-
function e(
|
|
1267
|
+
function No() {
|
|
1268
|
+
function e(c, m, g, T) {
|
|
1073
1269
|
var D;
|
|
1074
1270
|
if (typeof g == "number")
|
|
1075
|
-
return ((D = T[
|
|
1271
|
+
return ((D = T[c]) == null ? void 0 : D.length) === g;
|
|
1076
1272
|
if (typeof g == "object") {
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
return Number(T[
|
|
1080
|
-
if (
|
|
1081
|
-
return Number(T[
|
|
1082
|
-
if (
|
|
1083
|
-
return Number(T[
|
|
1273
|
+
const S = Object.keys(g)[0], x = g[S];
|
|
1274
|
+
if (S === "not")
|
|
1275
|
+
return Number(T[c].length) !== Number(x);
|
|
1276
|
+
if (S === "moreThan")
|
|
1277
|
+
return Number(T[c].length) >= Number(x);
|
|
1278
|
+
if (S === "lessThan")
|
|
1279
|
+
return Number(T[c].length) <= Number(x);
|
|
1084
1280
|
}
|
|
1085
1281
|
return !1;
|
|
1086
1282
|
}
|
|
1087
|
-
function t(
|
|
1088
|
-
return typeof g == "boolean" ? T.childrenClassList.includes(
|
|
1283
|
+
function t(c, m, g, T) {
|
|
1284
|
+
return typeof g == "boolean" ? T.childrenClassList.includes(m) === !!g : !1;
|
|
1089
1285
|
}
|
|
1090
|
-
function
|
|
1091
|
-
return typeof g == "boolean" ? T.parentClassList.includes(
|
|
1286
|
+
function o(c, m, g, T) {
|
|
1287
|
+
return typeof g == "boolean" ? T.parentClassList.includes(m) === !!g : !1;
|
|
1092
1288
|
}
|
|
1093
|
-
function r(
|
|
1094
|
-
return typeof g == "boolean" ? T.parentClassList.includes(
|
|
1289
|
+
function r(c, m, g, T) {
|
|
1290
|
+
return typeof g == "boolean" ? T.parentClassList.includes(m) === !!g : !1;
|
|
1095
1291
|
}
|
|
1096
|
-
const
|
|
1292
|
+
const n = /* @__PURE__ */ new Map([
|
|
1097
1293
|
["length", e],
|
|
1098
1294
|
["hasChildren", t],
|
|
1099
1295
|
["hasSibling", r],
|
|
1100
|
-
["hasParent",
|
|
1296
|
+
["hasParent", o]
|
|
1101
1297
|
]);
|
|
1102
|
-
function s(
|
|
1103
|
-
const g =
|
|
1104
|
-
return typeof
|
|
1298
|
+
function s(c, m) {
|
|
1299
|
+
const g = c;
|
|
1300
|
+
return typeof m == "number" ? [{ target: g, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((T) => {
|
|
1105
1301
|
if (T === "length")
|
|
1106
|
-
return { target: g, operator: "length", param: null, value:
|
|
1107
|
-
const D = T,
|
|
1108
|
-
return { target: g, operator:
|
|
1302
|
+
return { target: g, operator: "length", param: null, value: m[T] };
|
|
1303
|
+
const D = T, S = m[T];
|
|
1304
|
+
return { target: g, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: D, value: S };
|
|
1109
1305
|
}) : [];
|
|
1110
1306
|
}
|
|
1111
|
-
function
|
|
1112
|
-
if (
|
|
1113
|
-
const g =
|
|
1114
|
-
return g && g(
|
|
1307
|
+
function a(c, m) {
|
|
1308
|
+
if (n.has(c.operator)) {
|
|
1309
|
+
const g = n.get(c.operator);
|
|
1310
|
+
return g && g(c.target, c.param, c.value, m) || !1;
|
|
1115
1311
|
}
|
|
1116
1312
|
return !1;
|
|
1117
1313
|
}
|
|
1118
|
-
function
|
|
1119
|
-
return Object.keys(
|
|
1120
|
-
const
|
|
1121
|
-
return
|
|
1122
|
-
}, []).reduce((
|
|
1314
|
+
function l(c, m) {
|
|
1315
|
+
return Object.keys(c).reduce((S, x) => {
|
|
1316
|
+
const O = s(x, c[x]);
|
|
1317
|
+
return S.push(...O), S;
|
|
1318
|
+
}, []).reduce((S, x) => S && a(x, m), !0);
|
|
1123
1319
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const g = Object.keys(
|
|
1126
|
-
return T ? !
|
|
1320
|
+
function u(c, m) {
|
|
1321
|
+
const g = Object.keys(c), T = g.includes("allOf"), D = g.includes("anyOf"), S = T || D, F = (S ? c[S ? T ? "allOf" : "anyOf" : "allOf"] : [c]).map((j) => l(j, m));
|
|
1322
|
+
return T ? !F.includes(!1) : F.includes(!0);
|
|
1127
1323
|
}
|
|
1128
|
-
function
|
|
1129
|
-
const g =
|
|
1130
|
-
return g ? typeof g == "boolean" ? g : typeof g == "object" ?
|
|
1324
|
+
function i(c, m) {
|
|
1325
|
+
const g = c.const;
|
|
1326
|
+
return g ? typeof g == "boolean" ? g : typeof g == "object" ? u(g, m) : !1 : !1;
|
|
1131
1327
|
}
|
|
1132
|
-
function d(
|
|
1133
|
-
return (
|
|
1328
|
+
function d(c) {
|
|
1329
|
+
return (m) => {
|
|
1134
1330
|
const g = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1135
|
-
return
|
|
1136
|
-
const
|
|
1137
|
-
return T[D] =
|
|
1331
|
+
return c && c.properties && Object.keys(c.properties).reduce((T, D) => {
|
|
1332
|
+
const S = c.properties[D];
|
|
1333
|
+
return T[D] = i(S, m), T;
|
|
1138
1334
|
}, g), g;
|
|
1139
1335
|
};
|
|
1140
1336
|
}
|
|
1141
|
-
function c
|
|
1142
|
-
if (
|
|
1143
|
-
const { rules: T, contents: D } =
|
|
1144
|
-
g.set(
|
|
1145
|
-
(
|
|
1337
|
+
function p(c, m, g) {
|
|
1338
|
+
if (m.type === "object" && m.properties) {
|
|
1339
|
+
const { rules: T, contents: D } = m.properties;
|
|
1340
|
+
g.set(c, d(T)), D && Object.keys(D.properties).forEach(
|
|
1341
|
+
(S) => p(S, D.properties[S], g)
|
|
1146
1342
|
);
|
|
1147
1343
|
}
|
|
1148
1344
|
}
|
|
1149
1345
|
function y() {
|
|
1150
|
-
const { properties:
|
|
1151
|
-
Object.keys(
|
|
1152
|
-
|
|
1346
|
+
const { properties: c } = Eo;
|
|
1347
|
+
Object.keys(c).forEach((m) => {
|
|
1348
|
+
p(m, c[m], te);
|
|
1153
1349
|
});
|
|
1154
1350
|
}
|
|
1155
|
-
function w(
|
|
1351
|
+
function w(c, m) {
|
|
1156
1352
|
const g = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1157
|
-
return te.has(
|
|
1353
|
+
return te.has(c) ? te.get(c)(m) : g;
|
|
1158
1354
|
}
|
|
1159
1355
|
return y(), { getRuleValue: w };
|
|
1160
1356
|
}
|
|
1161
|
-
function
|
|
1162
|
-
var
|
|
1163
|
-
const
|
|
1164
|
-
let
|
|
1165
|
-
function
|
|
1166
|
-
return
|
|
1357
|
+
function Oo(e, t) {
|
|
1358
|
+
var M;
|
|
1359
|
+
const o = e.schema, r = (M = e.parent) == null ? void 0 : M.schema, n = No(), s = f(!1), a = f(!1);
|
|
1360
|
+
let l = !0, u = !1, i, d = !1;
|
|
1361
|
+
function p(j) {
|
|
1362
|
+
return i && i.componentClassList && i.componentClassList.includes("f-form-layout") && i.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
|
|
1167
1363
|
}
|
|
1168
|
-
function y(
|
|
1169
|
-
return !(!
|
|
1364
|
+
function y(j) {
|
|
1365
|
+
return !(!Po().basalDragulaRuleForContainer(j) || !l || !p(j));
|
|
1170
1366
|
}
|
|
1171
1367
|
function w() {
|
|
1172
|
-
s.value = !1,
|
|
1173
|
-
const
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1176
|
-
}, []) : [], W = r, Y = W && W.appearance && W.appearance.class || "",
|
|
1177
|
-
|
|
1178
|
-
componentClass:
|
|
1179
|
-
componentClassList:
|
|
1180
|
-
childContents:
|
|
1181
|
-
firstChildContent:
|
|
1368
|
+
s.value = !1, a.value = !1;
|
|
1369
|
+
const j = o, V = j.appearance && j.appearance.class || "", $ = V.split(" "), N = j.contents || [], R = N.length ? N[0] : null, P = R && R.appearance ? R.appearance.class : "", E = P ? P.split(" ") : [], U = N.length ? N.reduce((ce, K) => {
|
|
1370
|
+
const ue = K && K.appearance ? K.appearance.class : "", Ee = ue ? ue.split(" ") : [];
|
|
1371
|
+
return ce.push(...Ee), ce;
|
|
1372
|
+
}, []) : [], W = r, Y = W && W.appearance && W.appearance.class || "", Me = Y ? Y.split(" ") : [];
|
|
1373
|
+
i = {
|
|
1374
|
+
componentClass: V,
|
|
1375
|
+
componentClassList: $,
|
|
1376
|
+
childContents: N,
|
|
1377
|
+
firstChildContent: R,
|
|
1182
1378
|
firstChildClass: P,
|
|
1183
|
-
firstChildClassList:
|
|
1379
|
+
firstChildClassList: E,
|
|
1184
1380
|
parent: W,
|
|
1185
1381
|
parentClass: Y,
|
|
1186
|
-
parentClassList:
|
|
1187
|
-
children:
|
|
1188
|
-
childrenClassList:
|
|
1382
|
+
parentClassList: Me,
|
|
1383
|
+
children: N,
|
|
1384
|
+
childrenClassList: U
|
|
1189
1385
|
};
|
|
1190
|
-
const { canAccept:
|
|
1191
|
-
return
|
|
1386
|
+
const { canAccept: Ae, fixed: De, hidePadding: Ve } = n.getRuleValue($[0], i);
|
|
1387
|
+
return l = Ae, u = Ve, d = De, !0;
|
|
1192
1388
|
}
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1389
|
+
function c(j) {
|
|
1390
|
+
ne();
|
|
1195
1391
|
}
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1392
|
+
function m() {
|
|
1393
|
+
return o.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1198
1394
|
}
|
|
1199
|
-
function g(
|
|
1200
|
-
const
|
|
1201
|
-
if ((
|
|
1202
|
-
const { label: P } =
|
|
1203
|
-
return
|
|
1395
|
+
function g(j, V) {
|
|
1396
|
+
const $ = o;
|
|
1397
|
+
if (($.appearance && $.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1398
|
+
const { label: P } = j, E = z("form-group");
|
|
1399
|
+
return E.editor = V, E.label = P, T(E), delete E.editor.id, delete E.editor.binding, delete E.editor.appearance, delete E.editor.visible, E;
|
|
1204
1400
|
}
|
|
1205
|
-
return
|
|
1401
|
+
return V;
|
|
1206
1402
|
}
|
|
1207
|
-
function T(
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1403
|
+
function T(j) {
|
|
1404
|
+
const V = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
1405
|
+
if (V && V.schema && V.schema.componentType) {
|
|
1406
|
+
const $ = V.schema.formColumns, N = D($);
|
|
1407
|
+
j.appearance || (j.appearance = {}), j.appearance.class = N;
|
|
1212
1408
|
}
|
|
1213
1409
|
}
|
|
1214
|
-
function D(
|
|
1215
|
-
let
|
|
1216
|
-
switch (
|
|
1217
|
-
case
|
|
1218
|
-
|
|
1219
|
-
break;
|
|
1220
|
-
}
|
|
1221
|
-
case "form-col-12": {
|
|
1222
|
-
E = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1223
|
-
break;
|
|
1224
|
-
}
|
|
1225
|
-
case "form-col-2": {
|
|
1226
|
-
E = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1227
|
-
break;
|
|
1228
|
-
}
|
|
1229
|
-
case "form-col-3": {
|
|
1230
|
-
E = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1410
|
+
function D(j) {
|
|
1411
|
+
let V = "";
|
|
1412
|
+
switch (j) {
|
|
1413
|
+
case 1: {
|
|
1414
|
+
V = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1231
1415
|
break;
|
|
1232
1416
|
}
|
|
1233
|
-
case
|
|
1234
|
-
|
|
1417
|
+
case 2: {
|
|
1418
|
+
V = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1235
1419
|
break;
|
|
1236
1420
|
}
|
|
1237
|
-
case
|
|
1238
|
-
|
|
1421
|
+
case 3: {
|
|
1422
|
+
V = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1239
1423
|
break;
|
|
1240
1424
|
}
|
|
1241
|
-
case
|
|
1242
|
-
|
|
1425
|
+
case 4: {
|
|
1426
|
+
V = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1243
1427
|
break;
|
|
1244
1428
|
}
|
|
1245
1429
|
}
|
|
1246
|
-
return
|
|
1430
|
+
return V;
|
|
1247
1431
|
}
|
|
1248
|
-
function
|
|
1249
|
-
const
|
|
1250
|
-
if ((
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1432
|
+
function S(j, V, $) {
|
|
1433
|
+
const N = o;
|
|
1434
|
+
if ((N.appearance && N.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1435
|
+
const E = String(j.innerText), U = z("form-group");
|
|
1436
|
+
return U.editor = $, U.label = E, U;
|
|
1253
1437
|
}
|
|
1254
|
-
return
|
|
1438
|
+
return $;
|
|
1255
1439
|
}
|
|
1256
|
-
function
|
|
1440
|
+
function x() {
|
|
1257
1441
|
return !d;
|
|
1258
1442
|
}
|
|
1259
|
-
function
|
|
1443
|
+
function O() {
|
|
1260
1444
|
return !d;
|
|
1261
1445
|
}
|
|
1262
|
-
function
|
|
1263
|
-
return
|
|
1446
|
+
function F() {
|
|
1447
|
+
return u;
|
|
1264
1448
|
}
|
|
1265
1449
|
return {
|
|
1266
1450
|
canAccepts: y,
|
|
1267
|
-
checkCanDeleteComponent:
|
|
1268
|
-
checkCanMoveComponent:
|
|
1269
|
-
getStyles:
|
|
1270
|
-
hideNestedPaddingInDesginerView:
|
|
1271
|
-
onAcceptNewChildElement:
|
|
1272
|
-
onAcceptMovedChildElement:
|
|
1451
|
+
checkCanDeleteComponent: O,
|
|
1452
|
+
checkCanMoveComponent: x,
|
|
1453
|
+
getStyles: m,
|
|
1454
|
+
hideNestedPaddingInDesginerView: F,
|
|
1455
|
+
onAcceptNewChildElement: S,
|
|
1456
|
+
onAcceptMovedChildElement: c,
|
|
1273
1457
|
resolveComponentContext: w,
|
|
1274
1458
|
onResolveNewComponentSchema: g,
|
|
1275
1459
|
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1276
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1460
|
+
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1277
1461
|
};
|
|
1278
1462
|
}
|
|
1279
|
-
const
|
|
1463
|
+
const $o = /* @__PURE__ */ G({
|
|
1280
1464
|
name: "FResponseFormDesign",
|
|
1281
1465
|
props: J,
|
|
1282
1466
|
emits: [],
|
|
1283
1467
|
setup(e, t) {
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
|
|
1468
|
+
const o = f(), r = _("design-item-context");
|
|
1469
|
+
_("designer-host-service");
|
|
1470
|
+
const n = Oo(r), s = ie(o, r, n);
|
|
1471
|
+
q(() => {
|
|
1472
|
+
o.value.componentInstance = s;
|
|
1289
1473
|
}), t.expose(s.value);
|
|
1290
|
-
const
|
|
1291
|
-
const
|
|
1474
|
+
const a = B(() => {
|
|
1475
|
+
const l = e.customClass.split(" "), u = {
|
|
1292
1476
|
"drag-container": !0
|
|
1293
1477
|
};
|
|
1294
|
-
return
|
|
1478
|
+
return l.reduce((i, d) => (i[d] = !0, i), u), u;
|
|
1295
1479
|
});
|
|
1296
1480
|
return () => A("div", {
|
|
1297
|
-
ref:
|
|
1298
|
-
class:
|
|
1481
|
+
ref: o,
|
|
1482
|
+
class: a.value,
|
|
1299
1483
|
"data-dragref": `${r.schema.id}-container`,
|
|
1300
1484
|
"data-associate": `${r.schema.id}-component`
|
|
1301
1485
|
}, [t.slots.default && t.slots.default()]);
|
|
1302
1486
|
}
|
|
1303
|
-
}),
|
|
1487
|
+
}), Lo = {
|
|
1304
1488
|
id: { type: String },
|
|
1305
1489
|
required: { type: Boolean, default: !1 },
|
|
1306
1490
|
text: { type: String, default: "" },
|
|
1307
1491
|
title: { type: String }
|
|
1308
|
-
},
|
|
1492
|
+
}, Fe = /* @__PURE__ */ G({
|
|
1309
1493
|
name: "FDynamicFormLabel",
|
|
1310
|
-
props:
|
|
1494
|
+
props: Lo,
|
|
1311
1495
|
emits: [],
|
|
1312
1496
|
setup(e, t) {
|
|
1313
|
-
const
|
|
1497
|
+
const o = f(e.title || e.text), r = f(e.required), n = f(e.text);
|
|
1314
1498
|
return I(() => e.text, () => {
|
|
1315
|
-
|
|
1316
|
-
}), I(() => e.required, (s,
|
|
1317
|
-
s !==
|
|
1499
|
+
n.value = e.text;
|
|
1500
|
+
}), I(() => e.required, (s, a) => {
|
|
1501
|
+
s !== a && (r.value = s);
|
|
1318
1502
|
}), () => A("label", {
|
|
1319
1503
|
class: "col-form-label",
|
|
1320
|
-
title:
|
|
1504
|
+
title: o.value
|
|
1321
1505
|
}, [r.value && A("span", {
|
|
1322
1506
|
class: "farris-label-info text-danger"
|
|
1323
|
-
}, [
|
|
1507
|
+
}, [$e("*")]), A("span", {
|
|
1324
1508
|
class: "farris-label-text"
|
|
1325
|
-
}, [
|
|
1509
|
+
}, [n.value])]);
|
|
1326
1510
|
}
|
|
1327
|
-
}),
|
|
1328
|
-
["appearance",
|
|
1511
|
+
}), Io = /* @__PURE__ */ new Map([
|
|
1512
|
+
["appearance", Ce]
|
|
1329
1513
|
]);
|
|
1330
|
-
function
|
|
1514
|
+
function Ro(e, t, o) {
|
|
1331
1515
|
return t;
|
|
1332
1516
|
}
|
|
1333
|
-
const
|
|
1517
|
+
const Go = "https://json-schema.org/draft/2020-12/schema", Uo = "https://farris-design.gitee.io/input-group.schema.json", qo = "input-group", Wo = "A Farris Input Component", Ho = "object", _o = {
|
|
1334
1518
|
id: {
|
|
1335
1519
|
description: "The unique identifier for a Input Group",
|
|
1336
1520
|
type: "string"
|
|
@@ -1532,18 +1716,18 @@ const qn = "https://json-schema.org/draft/2020-12/schema", Rn = "https://farris-
|
|
|
1532
1716
|
type: "string",
|
|
1533
1717
|
default: ""
|
|
1534
1718
|
}
|
|
1535
|
-
},
|
|
1719
|
+
}, zo = [
|
|
1536
1720
|
"id",
|
|
1537
1721
|
"type"
|
|
1538
|
-
],
|
|
1539
|
-
$schema:
|
|
1540
|
-
$id:
|
|
1541
|
-
title:
|
|
1542
|
-
description:
|
|
1543
|
-
type:
|
|
1544
|
-
properties:
|
|
1545
|
-
required:
|
|
1546
|
-
},
|
|
1722
|
+
], Jo = {
|
|
1723
|
+
$schema: Go,
|
|
1724
|
+
$id: Uo,
|
|
1725
|
+
title: qo,
|
|
1726
|
+
description: Wo,
|
|
1727
|
+
type: Ho,
|
|
1728
|
+
properties: _o,
|
|
1729
|
+
required: zo
|
|
1730
|
+
}, le = {
|
|
1547
1731
|
/** 是否自动完成 */
|
|
1548
1732
|
autocomplete: { Type: String, default: "off" },
|
|
1549
1733
|
/** 自定义CLASS */
|
|
@@ -1610,117 +1794,117 @@ const qn = "https://json-schema.org/draft/2020-12/schema", Rn = "https://farris-
|
|
|
1610
1794
|
*/
|
|
1611
1795
|
updateOn: { type: String, default: "blur" }
|
|
1612
1796
|
};
|
|
1613
|
-
X(
|
|
1614
|
-
function
|
|
1615
|
-
const
|
|
1797
|
+
X(le, Jo, Io, Ro);
|
|
1798
|
+
function Qo(e, t, o, r) {
|
|
1799
|
+
const n = f(e.disabled), s = f(!1), a = f("text"), l = f(e.showBorder), u = f(e.textAlign), i = f(e.updateOn), d = B(() => e.editable || !e.readonly), p = B(() => e.editable && !e.disabled && !e.readonly), y = B(() => !e.disabled && s.value), w = B(() => o.value === "" || o.value === null || o.value === void 0), c = B(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), m = B(() => e.readonly || !e.editable), g = B(() => e.enableTitle ? o.value : ""), T = B(() => ({
|
|
1616
1800
|
"form-control": !0,
|
|
1617
1801
|
"f-utils-fill": !0,
|
|
1618
|
-
"text-left":
|
|
1619
|
-
"text-center":
|
|
1620
|
-
"text-right":
|
|
1621
|
-
})), D =
|
|
1802
|
+
"text-left": u.value === "left",
|
|
1803
|
+
"text-center": u.value === "center",
|
|
1804
|
+
"text-right": u.value === "right"
|
|
1805
|
+
})), D = B(() => {
|
|
1622
1806
|
const P = {
|
|
1623
1807
|
"f-cmp-inputgroup": !0,
|
|
1624
1808
|
"input-group": !0,
|
|
1625
|
-
"f-state-disable":
|
|
1626
|
-
"f-state-editable":
|
|
1627
|
-
"f-state-readonly":
|
|
1809
|
+
"f-state-disable": n.value,
|
|
1810
|
+
"f-state-editable": p.value,
|
|
1811
|
+
"f-state-readonly": m.value,
|
|
1628
1812
|
"f-state-focus": y.value
|
|
1629
1813
|
};
|
|
1630
|
-
return (e.customClass || "").split(" ").reduce((
|
|
1631
|
-
}),
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1814
|
+
return (e.customClass || "").split(" ").reduce((U, W) => (U[W] = !0, U), P), P;
|
|
1815
|
+
}), S = B(() => l.value ? "" : "border-width : 0 ");
|
|
1816
|
+
function x(P, E = !0) {
|
|
1817
|
+
o.value = P, r.value !== P && (r.value = P), E && t.emit("change", P), t.emit("update:modelValue", P), t.emit("update:value", P);
|
|
1634
1818
|
}
|
|
1635
1819
|
I(
|
|
1636
1820
|
() => e.modelValue,
|
|
1637
|
-
(P,
|
|
1638
|
-
P !==
|
|
1821
|
+
(P, E) => {
|
|
1822
|
+
P !== E && (o.value = P, r.value = P);
|
|
1639
1823
|
}
|
|
1640
|
-
), I(() => e.disabled, (P,
|
|
1641
|
-
P !==
|
|
1824
|
+
), I(() => e.disabled, (P, E) => {
|
|
1825
|
+
P !== E && (n.value = P);
|
|
1642
1826
|
});
|
|
1643
|
-
function
|
|
1827
|
+
function O(P) {
|
|
1644
1828
|
return s.value = !1, t.emit("blur", P), P.stopPropagation(), !1;
|
|
1645
1829
|
}
|
|
1646
|
-
function
|
|
1830
|
+
function F(P) {
|
|
1647
1831
|
t.emit("click", P);
|
|
1648
1832
|
}
|
|
1649
|
-
function
|
|
1650
|
-
e.disabled || (
|
|
1833
|
+
function M(P) {
|
|
1834
|
+
e.disabled || (l.value && (s.value = !0), d.value && t.emit("focus", P));
|
|
1651
1835
|
}
|
|
1652
|
-
function
|
|
1836
|
+
function j(P) {
|
|
1653
1837
|
t.emit("input", P.target.value);
|
|
1654
|
-
const
|
|
1655
|
-
r.value =
|
|
1838
|
+
const E = P.target.value;
|
|
1839
|
+
r.value = E, i.value === "input" && (t.emit("update:modelValue", E), t.emit("update:value", E));
|
|
1656
1840
|
}
|
|
1657
|
-
function
|
|
1841
|
+
function V(P) {
|
|
1658
1842
|
t.emit("keydown", P);
|
|
1659
1843
|
}
|
|
1660
|
-
function
|
|
1844
|
+
function $(P) {
|
|
1661
1845
|
t.emit("keyup", P);
|
|
1662
1846
|
}
|
|
1663
|
-
function
|
|
1847
|
+
function N(P) {
|
|
1664
1848
|
P.target.tagName !== "INPUT" && P.preventDefault(), P.stopPropagation();
|
|
1665
1849
|
}
|
|
1666
|
-
function
|
|
1667
|
-
if (
|
|
1668
|
-
const
|
|
1669
|
-
P.stopPropagation(),
|
|
1850
|
+
function R(P) {
|
|
1851
|
+
if (i.value === "blur") {
|
|
1852
|
+
const E = P.target.value;
|
|
1853
|
+
P.stopPropagation(), x(E);
|
|
1670
1854
|
}
|
|
1671
1855
|
}
|
|
1672
1856
|
return {
|
|
1673
|
-
changeTextBoxValue:
|
|
1674
|
-
disabled:
|
|
1857
|
+
changeTextBoxValue: x,
|
|
1858
|
+
disabled: n,
|
|
1675
1859
|
displayText: r,
|
|
1676
|
-
editable:
|
|
1860
|
+
editable: p,
|
|
1677
1861
|
hasFocused: y,
|
|
1678
1862
|
inputGroupClass: D,
|
|
1679
|
-
inputType:
|
|
1863
|
+
inputType: a,
|
|
1680
1864
|
isEmpty: w,
|
|
1681
|
-
modelValue:
|
|
1682
|
-
readonly:
|
|
1683
|
-
onBlur:
|
|
1684
|
-
onClick:
|
|
1685
|
-
onFocus:
|
|
1686
|
-
onInput:
|
|
1687
|
-
onKeydown:
|
|
1688
|
-
onKeyup:
|
|
1689
|
-
onMousedown:
|
|
1690
|
-
onTextBoxValueChange:
|
|
1691
|
-
placeholder:
|
|
1865
|
+
modelValue: o,
|
|
1866
|
+
readonly: m,
|
|
1867
|
+
onBlur: O,
|
|
1868
|
+
onClick: F,
|
|
1869
|
+
onFocus: M,
|
|
1870
|
+
onInput: j,
|
|
1871
|
+
onKeydown: V,
|
|
1872
|
+
onKeyup: $,
|
|
1873
|
+
onMousedown: N,
|
|
1874
|
+
onTextBoxValueChange: R,
|
|
1875
|
+
placeholder: c,
|
|
1692
1876
|
textBoxClass: T,
|
|
1693
1877
|
textBoxTitle: g,
|
|
1694
|
-
inputGroupStyle:
|
|
1878
|
+
inputGroupStyle: S
|
|
1695
1879
|
};
|
|
1696
1880
|
}
|
|
1697
|
-
function
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1881
|
+
function Zo(e, t, o, r) {
|
|
1882
|
+
const n = f(e.disabled), s = f(!1), a = f("text"), l = f(e.showBorder), u = f(e.textAlign);
|
|
1883
|
+
B(() => e.editable || !e.readonly);
|
|
1884
|
+
const i = B(() => e.editable && !e.disabled && !e.readonly), d = B(() => !e.disabled && s.value), p = B(() => o.value === "" || o.value === null || o.value === void 0), y = B(() => e.placeholder), w = B(() => e.readonly || !e.editable), c = B(() => e.enableTitle ? o.value : ""), m = B(() => ({
|
|
1701
1885
|
"form-control": !0,
|
|
1702
1886
|
// 'f-utils-fill': true,
|
|
1703
|
-
"text-left":
|
|
1704
|
-
"text-center":
|
|
1705
|
-
"text-right":
|
|
1706
|
-
})), g =
|
|
1887
|
+
"text-left": u.value === "left",
|
|
1888
|
+
"text-center": u.value === "center",
|
|
1889
|
+
"text-right": u.value === "right"
|
|
1890
|
+
})), g = B(() => ({
|
|
1707
1891
|
"f-cmp-inputgroup": !0,
|
|
1708
1892
|
"input-group": !0,
|
|
1709
1893
|
"f-state-disable": !0,
|
|
1710
1894
|
"f-state-editable": !1,
|
|
1711
1895
|
"f-state-readonly": !0
|
|
1712
1896
|
// 'f-state-focus': hasFocused.value
|
|
1713
|
-
})), T =
|
|
1897
|
+
})), T = B(() => l.value ? "" : "border-width : 0 ");
|
|
1714
1898
|
return {
|
|
1715
1899
|
// changeTextBoxValue,
|
|
1716
|
-
disabled:
|
|
1900
|
+
disabled: n,
|
|
1717
1901
|
displayText: r,
|
|
1718
|
-
editable:
|
|
1902
|
+
editable: i,
|
|
1719
1903
|
hasFocused: d,
|
|
1720
1904
|
inputGroupClass: g,
|
|
1721
|
-
inputType:
|
|
1722
|
-
isEmpty:
|
|
1723
|
-
modelValue:
|
|
1905
|
+
inputType: a,
|
|
1906
|
+
isEmpty: p,
|
|
1907
|
+
modelValue: o,
|
|
1724
1908
|
readonly: w,
|
|
1725
1909
|
// onBlur,
|
|
1726
1910
|
// onClick,
|
|
@@ -1731,150 +1915,150 @@ function Zn(e, t, n, r) {
|
|
|
1731
1915
|
// onMousedown,
|
|
1732
1916
|
// onTextBoxValueChange,
|
|
1733
1917
|
placeholder: y,
|
|
1734
|
-
textBoxClass:
|
|
1735
|
-
textBoxTitle:
|
|
1918
|
+
textBoxClass: m,
|
|
1919
|
+
textBoxTitle: c,
|
|
1736
1920
|
inputGroupStyle: T
|
|
1737
1921
|
};
|
|
1738
1922
|
}
|
|
1739
|
-
function
|
|
1740
|
-
const r =
|
|
1741
|
-
function
|
|
1742
|
-
r.value =
|
|
1923
|
+
function Be(e, t, o) {
|
|
1924
|
+
const r = f(!1), n = B(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: s, displayText: a, hasFocused: l, isEmpty: u } = o;
|
|
1925
|
+
function i(m) {
|
|
1926
|
+
r.value = m;
|
|
1743
1927
|
}
|
|
1744
|
-
I(
|
|
1745
|
-
|
|
1928
|
+
I(a, () => {
|
|
1929
|
+
l != null && l.value ? i(!!(a != null && a.value)) : i(!1);
|
|
1746
1930
|
});
|
|
1747
|
-
const d =
|
|
1931
|
+
const d = B(() => ({
|
|
1748
1932
|
"input-group-text": !0,
|
|
1749
1933
|
"input-group-clear": !0
|
|
1750
|
-
})),
|
|
1934
|
+
})), p = B(() => ({
|
|
1751
1935
|
width: "24px",
|
|
1752
1936
|
display: r.value ? "flex" : "none"
|
|
1753
1937
|
}));
|
|
1754
|
-
function y(
|
|
1755
|
-
|
|
1938
|
+
function y(m) {
|
|
1939
|
+
m.stopPropagation(), n.value && (s("", !0), i(!r.value), t.emit("clear"));
|
|
1756
1940
|
}
|
|
1757
|
-
function w(
|
|
1758
|
-
|
|
1941
|
+
function w(m) {
|
|
1942
|
+
n.value && !u.value && i(!0);
|
|
1759
1943
|
}
|
|
1760
|
-
function
|
|
1761
|
-
|
|
1944
|
+
function c(m) {
|
|
1945
|
+
n.value && i(!1);
|
|
1762
1946
|
}
|
|
1763
|
-
return { clearButtonClass: d, clearButtonStyle:
|
|
1947
|
+
return { clearButtonClass: d, clearButtonStyle: p, hasShownClearButton: r, onClearValue: y, onMouseEnter: w, onMouseLeave: c, shouldShowClearButton: n };
|
|
1764
1948
|
}
|
|
1765
|
-
const
|
|
1766
|
-
function
|
|
1949
|
+
const Xo = ["moz", "ms", "webkit"];
|
|
1950
|
+
function Yo() {
|
|
1767
1951
|
let e = 0;
|
|
1768
1952
|
return (t) => {
|
|
1769
|
-
const
|
|
1770
|
-
t(
|
|
1953
|
+
const o = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (o - e)), n = setTimeout(() => {
|
|
1954
|
+
t(o + r);
|
|
1771
1955
|
}, r);
|
|
1772
|
-
return e =
|
|
1956
|
+
return e = o + r, n;
|
|
1773
1957
|
};
|
|
1774
1958
|
}
|
|
1775
|
-
function
|
|
1959
|
+
function Ko() {
|
|
1776
1960
|
if (typeof window > "u")
|
|
1777
1961
|
return () => 0;
|
|
1778
1962
|
if (window.requestAnimationFrame)
|
|
1779
1963
|
return window.requestAnimationFrame.bind(window);
|
|
1780
|
-
const e =
|
|
1781
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
1964
|
+
const e = Xo.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
1965
|
+
return e ? window[`${e}RequestAnimationFrame`] : Yo();
|
|
1782
1966
|
}
|
|
1783
|
-
|
|
1784
|
-
function
|
|
1785
|
-
const
|
|
1786
|
-
return { appendedButtonClass:
|
|
1967
|
+
Ko();
|
|
1968
|
+
function je(e, t) {
|
|
1969
|
+
const o = f(e.groupText), r = B(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), n = B(() => e.enableClear || !!e.groupText);
|
|
1970
|
+
return { appendedButtonClass: B(() => ({
|
|
1787
1971
|
"input-group-append": !0,
|
|
1788
1972
|
"append-force-show": r.value
|
|
1789
|
-
})), appendedContent:
|
|
1973
|
+
})), appendedContent: o, shouldShowAppendedButton: n };
|
|
1790
1974
|
}
|
|
1791
|
-
function
|
|
1792
|
-
const { appendedContent:
|
|
1975
|
+
function ke(e, t, o, r) {
|
|
1976
|
+
const { appendedContent: n } = r, s = f(e.enableViewPassword), a = B(() => e.type === "password"), l = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', u = '<span class="f-icon f-icon-eye"></span>', i = f(!1);
|
|
1793
1977
|
I(() => [e.readonly, e.disabled], ([y, w]) => {
|
|
1794
|
-
|
|
1978
|
+
a.value && (o.value = y || w ? "password" : o.value, n.value = y || w ? u : n.value);
|
|
1795
1979
|
});
|
|
1796
1980
|
function d() {
|
|
1797
|
-
return
|
|
1981
|
+
return i.value = !i.value, o.value = i.value ? "text" : "password", n.value = i.value ? l : u, !1;
|
|
1798
1982
|
}
|
|
1799
|
-
function
|
|
1800
|
-
|
|
1983
|
+
function p() {
|
|
1984
|
+
o.value = a.value ? "password" : "text", n.value = a.value ? s.value ? u : "" : n.value;
|
|
1801
1985
|
}
|
|
1802
|
-
return
|
|
1986
|
+
return p(), { isPassword: a, onClickAppendedButton: d };
|
|
1803
1987
|
}
|
|
1804
|
-
function
|
|
1805
|
-
const r =
|
|
1806
|
-
onBlurTextBox:
|
|
1988
|
+
function en(e, t, o) {
|
|
1989
|
+
const r = f(), {
|
|
1990
|
+
onBlurTextBox: n,
|
|
1807
1991
|
onFocusTextBox: s,
|
|
1808
|
-
onInput:
|
|
1809
|
-
onKeyDown:
|
|
1810
|
-
textBoxValue:
|
|
1811
|
-
} =
|
|
1992
|
+
onInput: a,
|
|
1993
|
+
onKeyDown: l,
|
|
1994
|
+
textBoxValue: u
|
|
1995
|
+
} = o, i = B(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), d = B(() => ({
|
|
1812
1996
|
"form-control": !0,
|
|
1813
1997
|
"f-utils-fill": !0
|
|
1814
|
-
})),
|
|
1998
|
+
})), p = B(() => ({
|
|
1815
1999
|
"text-align": e.textAlign
|
|
1816
2000
|
}));
|
|
1817
|
-
function y(
|
|
1818
|
-
|
|
2001
|
+
function y(m) {
|
|
2002
|
+
m.stopPropagation();
|
|
1819
2003
|
}
|
|
1820
2004
|
function w() {
|
|
1821
2005
|
e.selectOnCreated, e.focusOnCreated;
|
|
1822
2006
|
}
|
|
1823
|
-
async function
|
|
1824
|
-
s(
|
|
2007
|
+
async function c(m) {
|
|
2008
|
+
s(m), await ne, w();
|
|
1825
2009
|
}
|
|
1826
|
-
return
|
|
1827
|
-
await
|
|
2010
|
+
return q(async () => {
|
|
2011
|
+
await ne, w();
|
|
1828
2012
|
}), () => A("input", {
|
|
1829
2013
|
ref: r,
|
|
1830
2014
|
class: d.value,
|
|
1831
|
-
style:
|
|
2015
|
+
style: p.value,
|
|
1832
2016
|
type: "text",
|
|
1833
|
-
value:
|
|
2017
|
+
value: u.value,
|
|
1834
2018
|
disabled: e.disabled,
|
|
1835
2019
|
readonly: e.readonly || !e.editable,
|
|
1836
|
-
placeholder:
|
|
1837
|
-
onBlur:
|
|
2020
|
+
placeholder: i.value,
|
|
2021
|
+
onBlur: n,
|
|
1838
2022
|
onChange: y,
|
|
1839
|
-
onFocus:
|
|
1840
|
-
onInput:
|
|
1841
|
-
onKeydown:
|
|
2023
|
+
onFocus: c,
|
|
2024
|
+
onInput: a,
|
|
2025
|
+
onKeydown: l
|
|
1842
2026
|
}, null);
|
|
1843
2027
|
}
|
|
1844
|
-
function
|
|
2028
|
+
function tn(e, t, o) {
|
|
1845
2029
|
const {
|
|
1846
2030
|
canDownward: r,
|
|
1847
|
-
canUpward:
|
|
2031
|
+
canUpward: n,
|
|
1848
2032
|
onClickDownButton: s,
|
|
1849
|
-
onClickUpButton:
|
|
1850
|
-
} =
|
|
2033
|
+
onClickUpButton: a
|
|
2034
|
+
} = o, l = B(() => ({
|
|
1851
2035
|
"input-group-append": !0,
|
|
1852
2036
|
"btn-group": !0,
|
|
1853
2037
|
"btn-group-number": !0
|
|
1854
|
-
})),
|
|
2038
|
+
})), u = B(() => ({
|
|
1855
2039
|
btn: !0,
|
|
1856
2040
|
"btn-secondary": !0,
|
|
1857
2041
|
"btn-number-flag": !0
|
|
1858
|
-
})),
|
|
1859
|
-
cursor:
|
|
2042
|
+
})), i = B(() => ({
|
|
2043
|
+
cursor: n() ? "pointer" : "not-allowed",
|
|
1860
2044
|
"margin-left": 0
|
|
1861
|
-
})), d =
|
|
2045
|
+
})), d = B(() => ({
|
|
1862
2046
|
cursor: r() ? "pointer" : "not-allowed",
|
|
1863
2047
|
"margin-left": 0
|
|
1864
2048
|
}));
|
|
1865
2049
|
return () => A("div", {
|
|
1866
|
-
class:
|
|
2050
|
+
class: l.value
|
|
1867
2051
|
}, [A("button", {
|
|
1868
2052
|
title: "upButton",
|
|
1869
|
-
class:
|
|
1870
|
-
style:
|
|
1871
|
-
onClick:
|
|
1872
|
-
disabled: !
|
|
2053
|
+
class: u.value,
|
|
2054
|
+
style: i.value,
|
|
2055
|
+
onClick: a,
|
|
2056
|
+
disabled: !n()
|
|
1873
2057
|
}, [A("span", {
|
|
1874
2058
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1875
2059
|
}, null)]), A("button", {
|
|
1876
2060
|
title: "downButton",
|
|
1877
|
-
class:
|
|
2061
|
+
class: u.value,
|
|
1878
2062
|
style: d.value,
|
|
1879
2063
|
onClick: s,
|
|
1880
2064
|
disabled: !r()
|
|
@@ -1882,191 +2066,191 @@ function to(e, t, n) {
|
|
|
1882
2066
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1883
2067
|
}, null)])]);
|
|
1884
2068
|
}
|
|
1885
|
-
function
|
|
1886
|
-
const
|
|
1887
|
-
displayValue:
|
|
1888
|
-
modelValue:
|
|
1889
|
-
getRealValue:
|
|
1890
|
-
} =
|
|
1891
|
-
format:
|
|
2069
|
+
function on(e, t) {
|
|
2070
|
+
const o = Ue(e, t), r = qe(e, t, o), n = We(e, t, r, o), s = He(e, t, r, o, n), a = tn(e, t, n), {
|
|
2071
|
+
displayValue: l,
|
|
2072
|
+
modelValue: u,
|
|
2073
|
+
getRealValue: i
|
|
2074
|
+
} = o, d = en(e, t, s), {
|
|
2075
|
+
format: p
|
|
1892
2076
|
} = r, {
|
|
1893
2077
|
isFocus: y
|
|
1894
|
-
} = s, w =
|
|
1895
|
-
return
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1898
|
-
}), I(() => [e.value], ([
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1901
|
-
}), I(() => [e.modelValue], ([
|
|
1902
|
-
|
|
2078
|
+
} = s, w = B(() => !e.disabled && !e.readonly);
|
|
2079
|
+
return q(() => {
|
|
2080
|
+
const c = i(e.modelValue);
|
|
2081
|
+
l.value = p(c);
|
|
2082
|
+
}), I(() => [e.value], ([c]) => {
|
|
2083
|
+
const m = i(c);
|
|
2084
|
+
u.value = m, l.value = p(m);
|
|
2085
|
+
}), I(() => [e.modelValue], ([c]) => {
|
|
2086
|
+
c !== u.value && (u.value = c, !y.value && (l.value = p(i(c))));
|
|
1903
2087
|
}), I(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1904
|
-
|
|
2088
|
+
l.value = p(u.value);
|
|
1905
2089
|
}), () => A("div", {
|
|
1906
2090
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1907
|
-
}, [d(), w.value &&
|
|
2091
|
+
}, [d(), w.value && a()]);
|
|
1908
2092
|
}
|
|
1909
|
-
function
|
|
1910
|
-
const
|
|
1911
|
-
isPassword:
|
|
1912
|
-
} =
|
|
1913
|
-
disabled:
|
|
2093
|
+
function nn(e, t, o, r) {
|
|
2094
|
+
const n = f(), s = f(e.autocomplete), a = f(e.enableTitle), {
|
|
2095
|
+
isPassword: l
|
|
2096
|
+
} = o, u = f(e.minLength), i = f(e.maxLength), d = f(e.tabIndex), {
|
|
2097
|
+
disabled: p,
|
|
1914
2098
|
displayText: y,
|
|
1915
2099
|
inputType: w,
|
|
1916
|
-
onBlur:
|
|
1917
|
-
onFocus:
|
|
2100
|
+
onBlur: c,
|
|
2101
|
+
onFocus: m,
|
|
1918
2102
|
onInput: g,
|
|
1919
2103
|
onClick: T,
|
|
1920
2104
|
onKeydown: D,
|
|
1921
|
-
onKeyup:
|
|
1922
|
-
onMousedown:
|
|
1923
|
-
onTextBoxValueChange:
|
|
1924
|
-
readonly:
|
|
1925
|
-
placeholder:
|
|
1926
|
-
textBoxClass:
|
|
1927
|
-
textBoxTitle:
|
|
2105
|
+
onKeyup: S,
|
|
2106
|
+
onMousedown: x,
|
|
2107
|
+
onTextBoxValueChange: O,
|
|
2108
|
+
readonly: F,
|
|
2109
|
+
placeholder: M,
|
|
2110
|
+
textBoxClass: j,
|
|
2111
|
+
textBoxTitle: V
|
|
1928
2112
|
} = r;
|
|
1929
|
-
return
|
|
2113
|
+
return q(() => {
|
|
1930
2114
|
e.selectOnCreated, e.focusOnCreated;
|
|
1931
2115
|
}), () => A("input", {
|
|
1932
|
-
ref:
|
|
2116
|
+
ref: n,
|
|
1933
2117
|
name: "input-group-value",
|
|
1934
2118
|
autocomplete: s.value,
|
|
1935
|
-
class:
|
|
1936
|
-
disabled:
|
|
1937
|
-
maxlength:
|
|
1938
|
-
minlength:
|
|
1939
|
-
placeholder:
|
|
1940
|
-
readonly:
|
|
2119
|
+
class: j.value,
|
|
2120
|
+
disabled: p == null ? void 0 : p.value,
|
|
2121
|
+
maxlength: i.value,
|
|
2122
|
+
minlength: u.value,
|
|
2123
|
+
placeholder: M.value,
|
|
2124
|
+
readonly: F == null ? void 0 : F.value,
|
|
1941
2125
|
tabindex: d.value,
|
|
1942
|
-
title:
|
|
2126
|
+
title: a.value && !l.value ? V.value : "",
|
|
1943
2127
|
type: w.value,
|
|
1944
2128
|
value: y == null ? void 0 : y.value,
|
|
1945
|
-
onBlur:
|
|
2129
|
+
onBlur: c,
|
|
1946
2130
|
onClick: T,
|
|
1947
|
-
onChange:
|
|
1948
|
-
onFocus:
|
|
2131
|
+
onChange: O,
|
|
2132
|
+
onFocus: m,
|
|
1949
2133
|
onInput: g,
|
|
1950
2134
|
onKeydown: D,
|
|
1951
|
-
onKeyup:
|
|
1952
|
-
onMousedown:
|
|
2135
|
+
onKeyup: S,
|
|
2136
|
+
onMousedown: x
|
|
1953
2137
|
}, null);
|
|
1954
2138
|
}
|
|
1955
|
-
function
|
|
1956
|
-
const
|
|
2139
|
+
function rn(e, t) {
|
|
2140
|
+
const o = B(() => e.useExtendInfo && !!e.extendInfo), r = Le({
|
|
1957
2141
|
content: e.extendInfo
|
|
1958
2142
|
});
|
|
1959
|
-
function
|
|
2143
|
+
function n() {
|
|
1960
2144
|
t.emit("updateExtendInfo");
|
|
1961
2145
|
}
|
|
1962
|
-
return () =>
|
|
2146
|
+
return () => o.value && Ie(A("span", {
|
|
1963
2147
|
class: "input-group-before-tips",
|
|
1964
|
-
onMouseenter:
|
|
2148
|
+
onMouseenter: n
|
|
1965
2149
|
}, [A("i", {
|
|
1966
2150
|
class: "f-icon f-icon-info-circle"
|
|
1967
2151
|
}, null), A("b", {
|
|
1968
2152
|
class: "tips-arrow"
|
|
1969
|
-
}, null)]), [[
|
|
2153
|
+
}, null)]), [[Re("tooltip"), r]]);
|
|
1970
2154
|
}
|
|
1971
|
-
function
|
|
2155
|
+
function Pe(e, t, o, r, n) {
|
|
1972
2156
|
const {
|
|
1973
2157
|
appendedButtonClass: s,
|
|
1974
|
-
appendedContent:
|
|
1975
|
-
} =
|
|
2158
|
+
appendedContent: a
|
|
2159
|
+
} = o, l = B(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), u = B(() => a.value && !t.slots.groupTextTemplate), i = B(() => !!t.slots.groupTextTemplate), {
|
|
1976
2160
|
clearButtonClass: d,
|
|
1977
|
-
clearButtonStyle:
|
|
2161
|
+
clearButtonStyle: p,
|
|
1978
2162
|
onClearValue: y,
|
|
1979
2163
|
shouldShowClearButton: w
|
|
1980
2164
|
} = r;
|
|
1981
|
-
function
|
|
2165
|
+
function c() {
|
|
1982
2166
|
return A("span", {
|
|
1983
2167
|
id: "clearIcon",
|
|
1984
2168
|
class: d.value,
|
|
1985
|
-
style:
|
|
1986
|
-
onClick: (
|
|
2169
|
+
style: p.value,
|
|
2170
|
+
onClick: (M) => y(M)
|
|
1987
2171
|
}, [A("i", {
|
|
1988
2172
|
class: "f-icon modal_close"
|
|
1989
2173
|
}, null)]);
|
|
1990
2174
|
}
|
|
1991
|
-
function
|
|
1992
|
-
t.emit("iconMouseEnter",
|
|
2175
|
+
function m(M) {
|
|
2176
|
+
t.emit("iconMouseEnter", M);
|
|
1993
2177
|
}
|
|
1994
|
-
function g(
|
|
1995
|
-
t.emit("iconMouseLeave",
|
|
2178
|
+
function g(M) {
|
|
2179
|
+
t.emit("iconMouseLeave", M);
|
|
1996
2180
|
}
|
|
1997
|
-
function T(
|
|
1998
|
-
|
|
1999
|
-
originalEvent:
|
|
2000
|
-
}),
|
|
2181
|
+
function T(M) {
|
|
2182
|
+
l.value && t.emit("clickHandle", {
|
|
2183
|
+
originalEvent: M
|
|
2184
|
+
}), M.stopPropagation();
|
|
2001
2185
|
}
|
|
2002
|
-
const D = e.type === "password" ?
|
|
2003
|
-
function
|
|
2186
|
+
const D = e.type === "password" ? n.onClickAppendedButton : T;
|
|
2187
|
+
function S() {
|
|
2004
2188
|
return A("span", {
|
|
2005
2189
|
class: "input-group-text",
|
|
2006
|
-
onMouseenter: (
|
|
2007
|
-
onMouseleave: (
|
|
2008
|
-
innerHTML:
|
|
2009
|
-
onClick: (
|
|
2190
|
+
onMouseenter: (M) => m(M),
|
|
2191
|
+
onMouseleave: (M) => g(M),
|
|
2192
|
+
innerHTML: a.value,
|
|
2193
|
+
onClick: (M) => D(M)
|
|
2010
2194
|
}, null);
|
|
2011
2195
|
}
|
|
2012
|
-
function
|
|
2196
|
+
function x() {
|
|
2013
2197
|
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
2014
2198
|
}
|
|
2015
|
-
function
|
|
2016
|
-
return
|
|
2199
|
+
function O() {
|
|
2200
|
+
return u.value ? S : i.value ? x : "";
|
|
2017
2201
|
}
|
|
2018
|
-
const
|
|
2202
|
+
const F = O();
|
|
2019
2203
|
return () => A("div", {
|
|
2020
2204
|
class: s.value
|
|
2021
|
-
}, [w.value &&
|
|
2205
|
+
}, [w.value && c(), F && F()]);
|
|
2022
2206
|
}
|
|
2023
|
-
const
|
|
2207
|
+
const an = /* @__PURE__ */ G({
|
|
2024
2208
|
name: "FInputGroup",
|
|
2025
|
-
props:
|
|
2209
|
+
props: le,
|
|
2026
2210
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
2027
2211
|
setup(e, t) {
|
|
2028
|
-
const
|
|
2212
|
+
const o = f(e.modelValue), r = f(e.modelValue), n = Qo(e, t, o, r), {
|
|
2029
2213
|
inputGroupClass: s,
|
|
2030
|
-
inputType:
|
|
2031
|
-
inputGroupStyle:
|
|
2032
|
-
} =
|
|
2033
|
-
shouldShowAppendedButton:
|
|
2034
|
-
} =
|
|
2035
|
-
onMouseEnter:
|
|
2214
|
+
inputType: a,
|
|
2215
|
+
inputGroupStyle: l
|
|
2216
|
+
} = n, u = je(e), {
|
|
2217
|
+
shouldShowAppendedButton: i
|
|
2218
|
+
} = u, d = Be(e, t, n), {
|
|
2219
|
+
onMouseEnter: p,
|
|
2036
2220
|
onMouseLeave: y
|
|
2037
|
-
} = d, w =
|
|
2038
|
-
I(() => [e.value], ([
|
|
2039
|
-
|
|
2040
|
-
}), I(() => [e.modelValue], ([
|
|
2041
|
-
|
|
2042
|
-
}),
|
|
2043
|
-
e.value && (
|
|
2221
|
+
} = d, w = ke(e, t, a, u), c = on(e, t), m = nn(e, t, w, n), g = Pe(e, t, u, d, w), T = rn(e, t), D = B(() => e.type === "number");
|
|
2222
|
+
I(() => [e.value], ([x]) => {
|
|
2223
|
+
o.value = x, r.value = x;
|
|
2224
|
+
}), I(() => [e.modelValue], ([x]) => {
|
|
2225
|
+
o.value = x, r.value = x;
|
|
2226
|
+
}), q(() => {
|
|
2227
|
+
e.value && (o.value = e.value, r.value = e.value);
|
|
2044
2228
|
});
|
|
2045
|
-
const
|
|
2229
|
+
const S = () => A(pe, null, [A("div", {
|
|
2046
2230
|
id: "inputGroup",
|
|
2047
2231
|
class: s.value,
|
|
2048
|
-
style:
|
|
2049
|
-
onMouseenter:
|
|
2232
|
+
style: l.value,
|
|
2233
|
+
onMouseenter: p,
|
|
2050
2234
|
onMouseleave: y
|
|
2051
|
-
}, [D.value ?
|
|
2052
|
-
return () =>
|
|
2235
|
+
}, [D.value ? c() : A(pe, null, [T(), m(), i.value && g()])])]);
|
|
2236
|
+
return () => S();
|
|
2053
2237
|
}
|
|
2054
2238
|
}), b = {}, h = {}, v = {}, C = {};
|
|
2055
|
-
let
|
|
2056
|
-
function
|
|
2057
|
-
|
|
2239
|
+
let ye = !1;
|
|
2240
|
+
function sn() {
|
|
2241
|
+
ye || (ye = !0, ze.register(b, h, v, C), _e.register(b, h, v, C), Je.register(b, h, v, C), Qe.register(b, h, v, C), Ze.register(b, h, v, C), Xe.register(b, h, v, C), Ye.register(b, h, v, C), Ke.register(b, h, v, C), et.register(b, h, v, C), tt.register(b, h, v, C), nt.register(b, h, v, C), ot.register(b, h, v, C), rt.register(b, h, v, C), at.register(b, h, v, C), st.register(b, h, v, C), it.register(b, h, v, C), lt.register(b, h, v, C), ct.register(b, h, v, C), ut.register(b, h, v, C), pt.register(b, h, v, C), dt.register(b, h, v, C), mt.register(b, h, v, C), yt.register(b, h, v, C), ft.register(b, h, v, C), gt.register(b, h, v, C), bt.register(b, h, v, C), ht.register(b, h, v, C), vt.register(b, h, v, C), Ge.register(b, h, v, C), Ct.register(b, h, v, C), wt.register(b, h, v, C), Tt.register(b, h, v, C), Ft.register(b, h, v, C), Bt.register(b, h, v, C), jt.register(b, h, v, C), kt.register(b, h, v, C), Pt.register(b, h, v, C), St.register(b, h, v, C), Mt.register(b, h, v, C), xt.register(b, h, v, C), Jt.register(b, h, v), At.register(b, h, v, C), Dt.register(b, h, v, C), Vt.register(b, h, v, C), Et.register(b, h, v, C), Nt.register(b, h, v, C), Ot.register(b, h, v, C), $t.register(b, h, v, C), Lt.register(b, h, v, C), It.register(b, h, v, C), Rt.register(b, h, v, C), Gt.register(b, h, v, C), Ut.register(b, h, v, C), Wt.register(b, h, v, C), qt.register(b, h, v, C), Ht.register(b, h, v, C), _t.register(b, h, v, C), zt.register(b, h, v, C), Qt.register(b, h, v, C));
|
|
2058
2242
|
}
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2061
|
-
function e(
|
|
2062
|
-
const
|
|
2063
|
-
return
|
|
2243
|
+
function xe() {
|
|
2244
|
+
sn();
|
|
2245
|
+
function e(n, s) {
|
|
2246
|
+
const a = h[n];
|
|
2247
|
+
return a ? a(s) : {};
|
|
2064
2248
|
}
|
|
2065
|
-
function t(
|
|
2066
|
-
return b[
|
|
2249
|
+
function t(n) {
|
|
2250
|
+
return b[n] || an;
|
|
2067
2251
|
}
|
|
2068
|
-
function n
|
|
2069
|
-
switch (
|
|
2252
|
+
function o(n) {
|
|
2253
|
+
switch (n) {
|
|
2070
2254
|
case "check-box":
|
|
2071
2255
|
return "onChangeValue";
|
|
2072
2256
|
case "switch":
|
|
@@ -2122,106 +2306,106 @@ function je() {
|
|
|
2122
2306
|
return "onValueChange";
|
|
2123
2307
|
}
|
|
2124
2308
|
}
|
|
2125
|
-
function r(
|
|
2126
|
-
switch (
|
|
2309
|
+
function r(n) {
|
|
2310
|
+
switch (n) {
|
|
2127
2311
|
case "combo-list":
|
|
2128
2312
|
case "input-group":
|
|
2129
2313
|
case "textarea":
|
|
2130
2314
|
return "onClear";
|
|
2131
2315
|
}
|
|
2132
2316
|
}
|
|
2133
|
-
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName:
|
|
2317
|
+
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: o, getClearFunctionName: r };
|
|
2134
2318
|
}
|
|
2135
|
-
const
|
|
2319
|
+
const oe = /* @__PURE__ */ G({
|
|
2136
2320
|
name: "FDynamicFormGroup",
|
|
2137
2321
|
props: J,
|
|
2138
2322
|
emits: ["change", "update:modelValue"],
|
|
2139
2323
|
setup(e, t) {
|
|
2140
|
-
const
|
|
2141
|
-
|
|
2142
|
-
const
|
|
2324
|
+
const o = f(e.id), r = f(e.customClass), n = f(e.editor), s = f(e.label), a = f(e.modelValue), l = f(e.readonly), u = f(e.required), i = f(e.showLabel), d = f(e.visible);
|
|
2325
|
+
f(e.type);
|
|
2326
|
+
const p = f(), {
|
|
2143
2327
|
resolveEditorProps: y,
|
|
2144
2328
|
resolveEditorType: w,
|
|
2145
|
-
getChangeFunctionName:
|
|
2146
|
-
getClearFunctionName:
|
|
2147
|
-
} =
|
|
2329
|
+
getChangeFunctionName: c,
|
|
2330
|
+
getClearFunctionName: m
|
|
2331
|
+
} = xe(), g = B(() => ({
|
|
2148
2332
|
"form-group": !0,
|
|
2149
2333
|
"farris-form-group": !0,
|
|
2150
2334
|
"common-group": !0,
|
|
2151
|
-
"q-state-readonly":
|
|
2335
|
+
"q-state-readonly": l.value
|
|
2152
2336
|
}));
|
|
2153
|
-
function T(
|
|
2154
|
-
|
|
2337
|
+
function T(x, O) {
|
|
2338
|
+
a.value = O !== void 0 ? O : x, t.emit("update:modelValue", a.value), t.emit("change", a.value);
|
|
2155
2339
|
}
|
|
2156
2340
|
function D() {
|
|
2157
2341
|
t.emit("update:modelValue", "");
|
|
2158
2342
|
}
|
|
2159
|
-
const
|
|
2160
|
-
const
|
|
2161
|
-
return
|
|
2162
|
-
ref:
|
|
2163
|
-
},
|
|
2164
|
-
modelValue:
|
|
2165
|
-
"onUpdate:modelValue": (
|
|
2343
|
+
const S = B(() => {
|
|
2344
|
+
const x = n.value.type || "input-group", O = w(x), F = y(x, n.value), M = c(x), j = m(n.value.type);
|
|
2345
|
+
return F[M] = T, F[j] = D, () => A(O, Z({
|
|
2346
|
+
ref: p
|
|
2347
|
+
}, F, {
|
|
2348
|
+
modelValue: a.value,
|
|
2349
|
+
"onUpdate:modelValue": (V) => a.value = V
|
|
2166
2350
|
}), null);
|
|
2167
2351
|
});
|
|
2168
|
-
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([
|
|
2169
|
-
|
|
2352
|
+
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([x, O, F, M, j, V, $, N, R]) => {
|
|
2353
|
+
o.value = x, r.value = O, n.value = F, s.value = M, a.value = j, l.value = V, u.value = $, i.value = N, d.value = R;
|
|
2170
2354
|
}), t.expose({
|
|
2171
|
-
editorRef:
|
|
2355
|
+
editorRef: p
|
|
2172
2356
|
}), () => d.value && A("div", {
|
|
2173
|
-
id: `${
|
|
2357
|
+
id: `${o.value}-input-group`,
|
|
2174
2358
|
class: r.value
|
|
2175
2359
|
}, [A("div", {
|
|
2176
2360
|
class: "farris-group-wrap"
|
|
2177
2361
|
}, [A("div", {
|
|
2178
2362
|
class: g.value
|
|
2179
|
-
}, [
|
|
2180
|
-
id: `${
|
|
2181
|
-
required:
|
|
2363
|
+
}, [i.value && A(Fe, {
|
|
2364
|
+
id: `${o.value}-lable`,
|
|
2365
|
+
required: u.value,
|
|
2182
2366
|
text: s.value,
|
|
2183
2367
|
title: s.value
|
|
2184
2368
|
}, null), A("div", {
|
|
2185
2369
|
class: "farris-input-wrap"
|
|
2186
|
-
}, [
|
|
2370
|
+
}, [S.value()])])])]);
|
|
2187
2371
|
}
|
|
2188
|
-
}),
|
|
2189
|
-
function
|
|
2372
|
+
}), ln = {}, cn = {};
|
|
2373
|
+
function un(e, t) {
|
|
2190
2374
|
e.schema;
|
|
2191
|
-
const
|
|
2192
|
-
function
|
|
2375
|
+
const o = f(!0), r = f(!0);
|
|
2376
|
+
function n(p) {
|
|
2193
2377
|
return !1;
|
|
2194
2378
|
}
|
|
2195
2379
|
function s() {
|
|
2196
2380
|
return !1;
|
|
2197
2381
|
}
|
|
2198
|
-
function
|
|
2382
|
+
function a() {
|
|
2199
2383
|
return !1;
|
|
2200
2384
|
}
|
|
2201
|
-
function
|
|
2385
|
+
function l() {
|
|
2202
2386
|
return !0;
|
|
2203
2387
|
}
|
|
2204
|
-
function p
|
|
2388
|
+
function u(p) {
|
|
2205
2389
|
}
|
|
2206
|
-
function
|
|
2390
|
+
function i() {
|
|
2207
2391
|
}
|
|
2208
|
-
function d(
|
|
2392
|
+
function d(p) {
|
|
2209
2393
|
return null;
|
|
2210
2394
|
}
|
|
2211
2395
|
return {
|
|
2212
|
-
canAccepts:
|
|
2396
|
+
canAccepts: n,
|
|
2213
2397
|
checkCanDeleteComponent: s,
|
|
2214
|
-
checkCanMoveComponent:
|
|
2215
|
-
hideNestedPaddingInDesginerView:
|
|
2216
|
-
onAcceptMovedChildElement:
|
|
2217
|
-
resolveComponentContext:
|
|
2218
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2398
|
+
checkCanMoveComponent: a,
|
|
2399
|
+
hideNestedPaddingInDesginerView: l,
|
|
2400
|
+
onAcceptMovedChildElement: u,
|
|
2401
|
+
resolveComponentContext: i,
|
|
2402
|
+
triggerBelongedComponentToMoveWhenMoved: o,
|
|
2219
2403
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
2220
2404
|
getPropsConfig: d
|
|
2221
2405
|
};
|
|
2222
2406
|
}
|
|
2223
|
-
class
|
|
2224
|
-
constructor(t,
|
|
2407
|
+
class pn {
|
|
2408
|
+
constructor(t, o) {
|
|
2225
2409
|
L(this, "componentId");
|
|
2226
2410
|
L(this, "viewModelId");
|
|
2227
2411
|
L(this, "eventsEditorUtils");
|
|
@@ -2238,23 +2422,23 @@ class uo {
|
|
|
2238
2422
|
categories: {}
|
|
2239
2423
|
});
|
|
2240
2424
|
var r;
|
|
2241
|
-
this.componentId = t, this.designerHostService =
|
|
2425
|
+
this.componentId = t, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
|
|
2242
2426
|
}
|
|
2243
2427
|
getTableInfo() {
|
|
2244
2428
|
var t;
|
|
2245
2429
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
2246
2430
|
}
|
|
2247
2431
|
setDesignViewModelField(t) {
|
|
2248
|
-
const
|
|
2249
|
-
if (
|
|
2432
|
+
const o = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
2433
|
+
if (o) {
|
|
2250
2434
|
if (!this.designViewModelField) {
|
|
2251
2435
|
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
2252
|
-
this.designViewModelField = r.fields.find((
|
|
2436
|
+
this.designViewModelField = r.fields.find((n) => n.id === o);
|
|
2253
2437
|
}
|
|
2254
2438
|
t.updateOn = this.designViewModelField.updateOn;
|
|
2255
2439
|
}
|
|
2256
2440
|
}
|
|
2257
|
-
changeFieldEditorType(t,
|
|
2441
|
+
changeFieldEditorType(t, o) {
|
|
2258
2442
|
}
|
|
2259
2443
|
getBasicPropConfig(t) {
|
|
2260
2444
|
return {
|
|
@@ -2275,7 +2459,7 @@ class uo {
|
|
|
2275
2459
|
type: "combo-list",
|
|
2276
2460
|
textField: "name",
|
|
2277
2461
|
valueField: "value",
|
|
2278
|
-
data: [{ value: t.type, name:
|
|
2462
|
+
data: [{ value: t.type, name: k[t.type].name }]
|
|
2279
2463
|
}
|
|
2280
2464
|
}
|
|
2281
2465
|
}
|
|
@@ -2307,17 +2491,17 @@ const H = class H {
|
|
|
2307
2491
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2308
2492
|
*/
|
|
2309
2493
|
static getEditorTypesByMDataType(t) {
|
|
2310
|
-
const
|
|
2311
|
-
return
|
|
2494
|
+
const o = H.fieldControlTypeMapping[t];
|
|
2495
|
+
return o || [{ key: "", value: "" }];
|
|
2312
2496
|
}
|
|
2313
2497
|
/**
|
|
2314
2498
|
* 获取所有输入类控件
|
|
2315
2499
|
*/
|
|
2316
2500
|
static getAllInputTypes() {
|
|
2317
2501
|
const t = [];
|
|
2318
|
-
for (let
|
|
2319
|
-
H.fieldControlTypeMapping[
|
|
2320
|
-
t.find((
|
|
2502
|
+
for (let o in H.fieldControlTypeMapping)
|
|
2503
|
+
H.fieldControlTypeMapping[o].forEach((r) => {
|
|
2504
|
+
t.find((n) => n.key === r.key && n.value === r.value) || t.push({ key: r.key, value: r.value });
|
|
2321
2505
|
});
|
|
2322
2506
|
return t;
|
|
2323
2507
|
}
|
|
@@ -2327,64 +2511,64 @@ const H = class H {
|
|
|
2327
2511
|
*/
|
|
2328
2512
|
L(H, "fieldControlTypeMapping", {
|
|
2329
2513
|
String: [
|
|
2330
|
-
{ key:
|
|
2331
|
-
{ key:
|
|
2332
|
-
{ key:
|
|
2333
|
-
{ key:
|
|
2334
|
-
{ key:
|
|
2335
|
-
{ key:
|
|
2336
|
-
{ key:
|
|
2514
|
+
{ key: k["input-group"].type, value: k["input-group"].name },
|
|
2515
|
+
{ key: k.lookup.type, value: k.lookup.name },
|
|
2516
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name },
|
|
2517
|
+
{ key: k["check-box"].type, value: k["check-box"].name },
|
|
2518
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name },
|
|
2519
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
2520
|
+
{ key: k.textarea.type, value: k.textarea.name }
|
|
2337
2521
|
],
|
|
2338
2522
|
Text: [
|
|
2339
|
-
{ key:
|
|
2340
|
-
{ key:
|
|
2523
|
+
{ key: k.textarea.type, value: k.textarea.name },
|
|
2524
|
+
{ key: k.lookup.type, value: k.lookup.name }
|
|
2341
2525
|
],
|
|
2342
2526
|
Decimal: [
|
|
2343
|
-
{ key:
|
|
2527
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
2344
2528
|
],
|
|
2345
2529
|
Integer: [
|
|
2346
|
-
{ key:
|
|
2530
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
2347
2531
|
],
|
|
2348
2532
|
Number: [
|
|
2349
|
-
{ key:
|
|
2533
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
2350
2534
|
],
|
|
2351
2535
|
BigNumber: [
|
|
2352
|
-
{ key:
|
|
2536
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
2353
2537
|
],
|
|
2354
2538
|
Date: [
|
|
2355
|
-
{ key:
|
|
2539
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name }
|
|
2356
2540
|
],
|
|
2357
2541
|
DateTime: [
|
|
2358
|
-
{ key:
|
|
2542
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name }
|
|
2359
2543
|
],
|
|
2360
2544
|
Boolean: [
|
|
2361
|
-
{ key:
|
|
2362
|
-
{ key:
|
|
2545
|
+
{ key: k.switch.type, value: k.switch.name },
|
|
2546
|
+
{ key: k["check-box"].type, value: k["check-box"].name }
|
|
2363
2547
|
],
|
|
2364
2548
|
Enum: [
|
|
2365
|
-
{ key:
|
|
2366
|
-
{ key:
|
|
2549
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
2550
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name }
|
|
2367
2551
|
],
|
|
2368
2552
|
Object: [
|
|
2369
|
-
{ key:
|
|
2370
|
-
{ key:
|
|
2371
|
-
{ key:
|
|
2553
|
+
{ key: k.lookup.type, value: k.lookup.name },
|
|
2554
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
2555
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name }
|
|
2372
2556
|
]
|
|
2373
2557
|
});
|
|
2374
2558
|
let Q = H;
|
|
2375
|
-
const
|
|
2376
|
-
class
|
|
2377
|
-
constructor(t,
|
|
2378
|
-
super(t,
|
|
2559
|
+
const dn = f(0);
|
|
2560
|
+
class mn extends pn {
|
|
2561
|
+
constructor(t, o) {
|
|
2562
|
+
super(t, o);
|
|
2379
2563
|
}
|
|
2380
|
-
getPropertyConfig(t,
|
|
2381
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(t,
|
|
2564
|
+
getPropertyConfig(t, o) {
|
|
2565
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
2382
2566
|
}
|
|
2383
|
-
getBasicProperties(t,
|
|
2384
|
-
var
|
|
2567
|
+
getBasicProperties(t, o) {
|
|
2568
|
+
var a;
|
|
2385
2569
|
var r = this;
|
|
2386
2570
|
this.setDesignViewModelField(t);
|
|
2387
|
-
const
|
|
2571
|
+
const n = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
2388
2572
|
return {
|
|
2389
2573
|
description: "Basic Information",
|
|
2390
2574
|
title: "基本信息",
|
|
@@ -2396,8 +2580,8 @@ class fo extends uo {
|
|
|
2396
2580
|
readonly: !0
|
|
2397
2581
|
},
|
|
2398
2582
|
type: {
|
|
2399
|
-
description: "
|
|
2400
|
-
title: "
|
|
2583
|
+
description: "编辑器类型",
|
|
2584
|
+
title: "编辑器类型",
|
|
2401
2585
|
type: "string",
|
|
2402
2586
|
refreshPanelAfterChanged: !0,
|
|
2403
2587
|
$converter: "/converter/change-editor.converter",
|
|
@@ -2406,7 +2590,7 @@ class fo extends uo {
|
|
|
2406
2590
|
textField: "value",
|
|
2407
2591
|
valueField: "key",
|
|
2408
2592
|
editable: !1,
|
|
2409
|
-
data: r.designViewModelField ? Q.getEditorTypesByMDataType((
|
|
2593
|
+
data: r.designViewModelField ? Q.getEditorTypesByMDataType((a = r.designViewModelField.type) == null ? void 0 : a.name) : Q.getAllInputTypes()
|
|
2410
2594
|
}
|
|
2411
2595
|
},
|
|
2412
2596
|
label: {
|
|
@@ -2423,7 +2607,7 @@ class fo extends uo {
|
|
|
2423
2607
|
bindingType: { enable: !1 },
|
|
2424
2608
|
editorParams: {
|
|
2425
2609
|
propertyData: t,
|
|
2426
|
-
formBasicInfo:
|
|
2610
|
+
formBasicInfo: n
|
|
2427
2611
|
},
|
|
2428
2612
|
columns: [
|
|
2429
2613
|
{ field: "name", title: "字段名称" },
|
|
@@ -2435,11 +2619,15 @@ class fo extends uo {
|
|
|
2435
2619
|
}
|
|
2436
2620
|
}
|
|
2437
2621
|
},
|
|
2438
|
-
setPropertyRelates(
|
|
2439
|
-
if (
|
|
2440
|
-
switch (
|
|
2622
|
+
setPropertyRelates(l, u) {
|
|
2623
|
+
if (l)
|
|
2624
|
+
switch (l && l.propertyID) {
|
|
2441
2625
|
case "type": {
|
|
2442
|
-
r.changeControlType(t,
|
|
2626
|
+
r.changeControlType(t, l, o);
|
|
2627
|
+
break;
|
|
2628
|
+
}
|
|
2629
|
+
case "label": {
|
|
2630
|
+
l.needRefreshControlTree = !0;
|
|
2443
2631
|
break;
|
|
2444
2632
|
}
|
|
2445
2633
|
}
|
|
@@ -2484,44 +2672,44 @@ class fo extends uo {
|
|
|
2484
2672
|
* @param propertyData 控件DOM属性
|
|
2485
2673
|
* @param newControlType 新控件类型
|
|
2486
2674
|
*/
|
|
2487
|
-
changeControlType(t,
|
|
2488
|
-
var
|
|
2489
|
-
const
|
|
2675
|
+
changeControlType(t, o, r) {
|
|
2676
|
+
var i, d, p, y;
|
|
2677
|
+
const n = o.propertyValue, s = r && r.parent && r.parent.schema;
|
|
2490
2678
|
if (!s)
|
|
2491
2679
|
return;
|
|
2492
|
-
const
|
|
2493
|
-
let
|
|
2680
|
+
const a = s.contents.findIndex((w) => w.id === t.id), l = s.contents[a];
|
|
2681
|
+
let u;
|
|
2494
2682
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2495
2683
|
editor: {
|
|
2496
|
-
$type:
|
|
2684
|
+
$type: n
|
|
2497
2685
|
},
|
|
2498
2686
|
name: this.designViewModelField.name,
|
|
2499
2687
|
require: this.designViewModelField.require,
|
|
2500
2688
|
readonly: this.designViewModelField.readonly
|
|
2501
|
-
}, !1),
|
|
2502
|
-
id:
|
|
2503
|
-
appearance:
|
|
2504
|
-
size:
|
|
2505
|
-
label:
|
|
2506
|
-
binding:
|
|
2507
|
-
visible:
|
|
2508
|
-
}), Object.assign(
|
|
2509
|
-
isTextArea:
|
|
2510
|
-
placeholder: (
|
|
2511
|
-
holdPlace: (d =
|
|
2512
|
-
readonly: (
|
|
2513
|
-
require: (y =
|
|
2514
|
-
}), s.contents.splice(
|
|
2689
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, n)), u || (u = de("form-group") || {}, u.editor = de(n) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
|
|
2690
|
+
id: l.id,
|
|
2691
|
+
appearance: l.appearance,
|
|
2692
|
+
size: l.size,
|
|
2693
|
+
label: l.label,
|
|
2694
|
+
binding: l.binding,
|
|
2695
|
+
visible: l.visible
|
|
2696
|
+
}), Object.assign(u.editor, {
|
|
2697
|
+
isTextArea: u.isTextArea && l.isTextArea,
|
|
2698
|
+
placeholder: (i = l.editor) == null ? void 0 : i.placeholder,
|
|
2699
|
+
holdPlace: (d = l.editor) == null ? void 0 : d.holdPlace,
|
|
2700
|
+
readonly: (p = l.editor) == null ? void 0 : p.readonly,
|
|
2701
|
+
require: (y = l.editor) == null ? void 0 : y.require
|
|
2702
|
+
}), s.contents.splice(a, 1), s.contents.splice(a, 0, u), r.schema = Object.assign(l, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2515
2703
|
(w) => w.classList.remove("dgComponentSelected")
|
|
2516
|
-
),
|
|
2704
|
+
), dn.value++;
|
|
2517
2705
|
}
|
|
2518
|
-
getComponentConfig(t,
|
|
2519
|
-
const
|
|
2520
|
-
description: "
|
|
2521
|
-
title: "
|
|
2706
|
+
getComponentConfig(t, o = {}, r = {}) {
|
|
2707
|
+
const n = Object.assign({
|
|
2708
|
+
description: "编辑器",
|
|
2709
|
+
title: "编辑器",
|
|
2522
2710
|
type: "input-group",
|
|
2523
2711
|
$converter: "/converter/property-editor.converter"
|
|
2524
|
-
},
|
|
2712
|
+
}, o), s = Object.assign({
|
|
2525
2713
|
readonly: {
|
|
2526
2714
|
description: "",
|
|
2527
2715
|
title: "只读",
|
|
@@ -2543,147 +2731,147 @@ class fo extends uo {
|
|
|
2543
2731
|
type: "string"
|
|
2544
2732
|
}
|
|
2545
2733
|
}, r);
|
|
2546
|
-
return { ...
|
|
2734
|
+
return { ...n, properties: { ...s } };
|
|
2547
2735
|
}
|
|
2548
2736
|
}
|
|
2549
|
-
class
|
|
2550
|
-
constructor(t,
|
|
2551
|
-
super(t,
|
|
2737
|
+
class fn extends mn {
|
|
2738
|
+
constructor(t, o) {
|
|
2739
|
+
super(t, o);
|
|
2552
2740
|
}
|
|
2553
2741
|
}
|
|
2554
|
-
function
|
|
2742
|
+
function yn(e, t) {
|
|
2555
2743
|
const {
|
|
2556
|
-
canAccepts:
|
|
2744
|
+
canAccepts: o,
|
|
2557
2745
|
checkCanDeleteComponent: r,
|
|
2558
|
-
checkCanMoveComponent:
|
|
2746
|
+
checkCanMoveComponent: n,
|
|
2559
2747
|
hideNestedPaddingInDesginerView: s,
|
|
2560
|
-
onAcceptMovedChildElement:
|
|
2561
|
-
resolveComponentContext:
|
|
2562
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2563
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2564
|
-
} =
|
|
2565
|
-
function
|
|
2566
|
-
return new
|
|
2748
|
+
onAcceptMovedChildElement: a,
|
|
2749
|
+
resolveComponentContext: l,
|
|
2750
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2751
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
2752
|
+
} = un(e), d = e.schema;
|
|
2753
|
+
function p(y, w) {
|
|
2754
|
+
return new fn(y, t).getPropertyConfig(d, w);
|
|
2567
2755
|
}
|
|
2568
2756
|
return {
|
|
2569
|
-
canAccepts:
|
|
2757
|
+
canAccepts: o,
|
|
2570
2758
|
checkCanDeleteComponent: r,
|
|
2571
|
-
checkCanMoveComponent:
|
|
2759
|
+
checkCanMoveComponent: n,
|
|
2572
2760
|
hideNestedPaddingInDesginerView: s,
|
|
2573
|
-
onAcceptMovedChildElement:
|
|
2574
|
-
resolveComponentContext:
|
|
2575
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2576
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2577
|
-
getPropsConfig:
|
|
2761
|
+
onAcceptMovedChildElement: a,
|
|
2762
|
+
resolveComponentContext: l,
|
|
2763
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2764
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
2765
|
+
getPropsConfig: p
|
|
2578
2766
|
};
|
|
2579
2767
|
}
|
|
2580
|
-
const
|
|
2768
|
+
const gn = /* @__PURE__ */ G({
|
|
2581
2769
|
name: "FInputGroupDesign",
|
|
2582
|
-
props:
|
|
2770
|
+
props: le,
|
|
2583
2771
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
2584
2772
|
setup(e, t) {
|
|
2585
|
-
const
|
|
2773
|
+
const o = f(e.modelValue), r = f(e.modelValue), n = Zo(e, t, o, r), {
|
|
2586
2774
|
inputGroupClass: s,
|
|
2587
|
-
inputType:
|
|
2588
|
-
inputGroupStyle:
|
|
2589
|
-
} =
|
|
2590
|
-
shouldShowAppendedButton:
|
|
2591
|
-
} =
|
|
2592
|
-
onMouseEnter:
|
|
2775
|
+
inputType: a,
|
|
2776
|
+
inputGroupStyle: l
|
|
2777
|
+
} = n, u = je(e), {
|
|
2778
|
+
shouldShowAppendedButton: i
|
|
2779
|
+
} = u, d = Be(e, t, n), {
|
|
2780
|
+
onMouseEnter: p,
|
|
2593
2781
|
onMouseLeave: y
|
|
2594
|
-
} = d, w =
|
|
2595
|
-
|
|
2596
|
-
|
|
2782
|
+
} = d, w = ke(e, t, a, u), c = f(), m = _("designer-host-service"), g = _("design-item-context"), T = yn(g, m), D = ie(c, g, T);
|
|
2783
|
+
q(() => {
|
|
2784
|
+
c.value.componentInstance = D;
|
|
2597
2785
|
}), t.expose(D.value);
|
|
2598
|
-
const
|
|
2786
|
+
const S = Pe(e, t, u, d, w), x = f();
|
|
2599
2787
|
return () => A("div", {
|
|
2600
2788
|
id: "inputGroup",
|
|
2601
|
-
ref:
|
|
2789
|
+
ref: c,
|
|
2602
2790
|
class: s.value,
|
|
2603
|
-
style:
|
|
2604
|
-
onMouseenter:
|
|
2791
|
+
style: l.value,
|
|
2792
|
+
onMouseenter: p,
|
|
2605
2793
|
onMouseleave: y
|
|
2606
2794
|
}, [A("input", {
|
|
2607
|
-
ref:
|
|
2795
|
+
ref: x,
|
|
2608
2796
|
class: "form-control",
|
|
2609
2797
|
readonly: !0,
|
|
2610
2798
|
placeholder: e.placeholder
|
|
2611
|
-
}, null),
|
|
2799
|
+
}, null), i.value && S()]);
|
|
2612
2800
|
}
|
|
2613
2801
|
});
|
|
2614
|
-
function
|
|
2615
|
-
function e(
|
|
2616
|
-
const
|
|
2617
|
-
return
|
|
2802
|
+
function bn() {
|
|
2803
|
+
function e(o, r) {
|
|
2804
|
+
const n = cn[o];
|
|
2805
|
+
return n ? n(r) : {};
|
|
2618
2806
|
}
|
|
2619
|
-
function t(
|
|
2620
|
-
return
|
|
2807
|
+
function t(o) {
|
|
2808
|
+
return ln[o] || gn;
|
|
2621
2809
|
}
|
|
2622
2810
|
return { resolveEditorProps: e, resolveEditorType: t };
|
|
2623
2811
|
}
|
|
2624
|
-
const
|
|
2812
|
+
const hn = /* @__PURE__ */ G({
|
|
2625
2813
|
name: "FDynamicFormGroupDesign",
|
|
2626
2814
|
props: J,
|
|
2627
2815
|
emits: ["change", "update:modelValue"],
|
|
2628
2816
|
setup(e, t) {
|
|
2629
|
-
const
|
|
2630
|
-
|
|
2631
|
-
const d =
|
|
2632
|
-
resolveEditorProps:
|
|
2817
|
+
const o = f(e.id), r = f(e.customClass), n = f(e.editor), s = f(e.label), a = f(e.modelValue), l = f(!0), u = f(e.required), i = f(e.showLabel);
|
|
2818
|
+
f(e.type);
|
|
2819
|
+
const d = f(), {
|
|
2820
|
+
resolveEditorProps: p,
|
|
2633
2821
|
resolveEditorType: y
|
|
2634
|
-
} =
|
|
2822
|
+
} = bn(), w = B(() => ({
|
|
2635
2823
|
"form-group": !0,
|
|
2636
2824
|
"farris-form-group": !0,
|
|
2637
2825
|
"common-group": !0,
|
|
2638
|
-
"q-state-readonly":
|
|
2826
|
+
"q-state-readonly": l.value,
|
|
2639
2827
|
"form-group-in-canvas": !0
|
|
2640
|
-
})),
|
|
2641
|
-
const
|
|
2828
|
+
})), c = B(() => {
|
|
2829
|
+
const m = n.value.type || "input-group", g = y(m), T = p(m, n.value);
|
|
2642
2830
|
return () => A(g, Z({
|
|
2643
2831
|
ref: d
|
|
2644
2832
|
}, T, {
|
|
2645
|
-
modelValue:
|
|
2646
|
-
"onUpdate:modelValue": (D) =>
|
|
2833
|
+
modelValue: a.value,
|
|
2834
|
+
"onUpdate:modelValue": (D) => a.value = D
|
|
2647
2835
|
}), null);
|
|
2648
2836
|
});
|
|
2649
|
-
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel], ([
|
|
2650
|
-
|
|
2837
|
+
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel], ([m, g, T, D, S, x, O, F]) => {
|
|
2838
|
+
o.value = m, r.value = g, n.value = T, s.value = D, a.value = S, l.value = x, u.value = O, i.value = F;
|
|
2651
2839
|
}), t.expose({
|
|
2652
2840
|
editorRef: d
|
|
2653
2841
|
}), () => A("div", {
|
|
2654
|
-
id: `${
|
|
2842
|
+
id: `${o.value}-input-group`,
|
|
2655
2843
|
class: r.value,
|
|
2656
2844
|
design_test: !0
|
|
2657
2845
|
}, [A("div", {
|
|
2658
2846
|
class: "farris-group-wrap"
|
|
2659
2847
|
}, [A("div", {
|
|
2660
2848
|
class: w.value
|
|
2661
|
-
}, [
|
|
2662
|
-
id: `${
|
|
2663
|
-
required:
|
|
2849
|
+
}, [i.value && A(Fe, {
|
|
2850
|
+
id: `${o.value}-lable`,
|
|
2851
|
+
required: u.value,
|
|
2664
2852
|
text: s.value,
|
|
2665
2853
|
title: s.value
|
|
2666
2854
|
}, null), A("div", {
|
|
2667
2855
|
class: "farris-input-wrap"
|
|
2668
|
-
}, [
|
|
2856
|
+
}, [c.value()])])])]);
|
|
2669
2857
|
}
|
|
2670
|
-
}),
|
|
2858
|
+
}), vn = /* @__PURE__ */ G({
|
|
2671
2859
|
name: "FFormGroupDesign",
|
|
2672
2860
|
props: J,
|
|
2673
2861
|
emits: [],
|
|
2674
2862
|
setup(e, t) {
|
|
2675
|
-
const
|
|
2676
|
-
return
|
|
2677
|
-
|
|
2678
|
-
var
|
|
2679
|
-
let
|
|
2680
|
-
return
|
|
2863
|
+
const o = f(), r = _("design-item-context"), n = ie(o, r);
|
|
2864
|
+
return n.value.canNested = !1, n.value.canMove = !0, n.value.canDelete = !0, q(() => {
|
|
2865
|
+
o.value.componentInstance = n, n.value.getPropConfig = (...s) => {
|
|
2866
|
+
var l, u, i;
|
|
2867
|
+
let a = ve[e.editor.type];
|
|
2868
|
+
return a && Object.keys(a).length === 0 && ((l = o.value) != null && l.editorRef) && ((i = (u = o.value) == null ? void 0 : u.editorRef) != null && i.getPropConfig) && (a = o.value.editorRef.getPropConfig(...s, n.value)), a;
|
|
2681
2869
|
};
|
|
2682
|
-
}), t.expose(
|
|
2683
|
-
ref:
|
|
2870
|
+
}), t.expose(n.value), () => A(hn, Z(e, {
|
|
2871
|
+
ref: o
|
|
2684
2872
|
}), null);
|
|
2685
2873
|
}
|
|
2686
|
-
}),
|
|
2874
|
+
}), Se = {
|
|
2687
2875
|
id: { type: String, default: "" },
|
|
2688
2876
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
2689
2877
|
editor: { type: Object, default: {} },
|
|
@@ -2697,56 +2885,57 @@ const ho = /* @__PURE__ */ q({
|
|
|
2697
2885
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
2698
2886
|
*/
|
|
2699
2887
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
2700
|
-
},
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2888
|
+
}, Cn = X(
|
|
2889
|
+
Se,
|
|
2890
|
+
Te,
|
|
2891
|
+
se,
|
|
2704
2892
|
void 0
|
|
2705
|
-
),
|
|
2893
|
+
), wn = /* @__PURE__ */ G({
|
|
2706
2894
|
name: "FDynamicFormInput",
|
|
2707
|
-
props:
|
|
2895
|
+
props: Se,
|
|
2708
2896
|
emits: ["change", "update:modelValue"],
|
|
2709
2897
|
setup(e, t) {
|
|
2710
|
-
const
|
|
2898
|
+
const o = f(e.id), r = f(e.editor), n = f(e.modelValue), {
|
|
2711
2899
|
resolveEditorProps: s,
|
|
2712
|
-
resolveEditorType:
|
|
2713
|
-
getChangeFunctionName:
|
|
2714
|
-
} =
|
|
2715
|
-
function
|
|
2716
|
-
|
|
2900
|
+
resolveEditorType: a,
|
|
2901
|
+
getChangeFunctionName: l
|
|
2902
|
+
} = xe();
|
|
2903
|
+
function u(d, p) {
|
|
2904
|
+
n.value = p !== void 0 ? p : d, t.emit("update:modelValue", n.value), t.emit("change", n.value);
|
|
2717
2905
|
}
|
|
2718
|
-
const
|
|
2719
|
-
const d =
|
|
2720
|
-
|
|
2721
|
-
const y =
|
|
2722
|
-
return
|
|
2723
|
-
modelValue:
|
|
2724
|
-
"onUpdate:modelValue": (w) =>
|
|
2906
|
+
const i = B(() => {
|
|
2907
|
+
const d = a(r.value.type), p = s(r.value.type, r.value);
|
|
2908
|
+
p.focusOnCreated = e.focusOnCreated, p.selectOnCreated = e.selectOnCreated;
|
|
2909
|
+
const y = l(r.value.type);
|
|
2910
|
+
return p[y] = u, () => A(d, Z(p, {
|
|
2911
|
+
modelValue: n.value,
|
|
2912
|
+
"onUpdate:modelValue": (w) => n.value = w
|
|
2725
2913
|
}), null);
|
|
2726
2914
|
});
|
|
2727
|
-
return I([() => e.id, () => e.editor, () => e.modelValue], ([d,
|
|
2728
|
-
|
|
2729
|
-
}), () =>
|
|
2915
|
+
return I([() => e.id, () => e.editor, () => e.modelValue], ([d, p, y]) => {
|
|
2916
|
+
o.value = d, r.value = p, n.value = y;
|
|
2917
|
+
}), () => i.value();
|
|
2730
2918
|
}
|
|
2731
|
-
}),
|
|
2919
|
+
}), Vr = {
|
|
2732
2920
|
install(e) {
|
|
2733
|
-
e.component(ee.name, ee).component(
|
|
2921
|
+
e.component(ee.name, ee).component(oe.name, oe);
|
|
2734
2922
|
},
|
|
2735
|
-
register(e, t,
|
|
2736
|
-
e["form-group"] =
|
|
2923
|
+
register(e, t, o, r) {
|
|
2924
|
+
e["form-group"] = oe, t["form-group"] = fe, e["response-form"] = ee, t["response-form"] = me, e["form-input"] = wn, t["form-input"] = Cn, r["form-group"] = { editorResolver: ko };
|
|
2737
2925
|
},
|
|
2738
|
-
registerDesigner(e, t,
|
|
2739
|
-
e["form-group"] =
|
|
2926
|
+
registerDesigner(e, t, o) {
|
|
2927
|
+
e["form-group"] = vn, t["form-group"] = fe, e["response-form"] = $o, t["response-form"] = me;
|
|
2740
2928
|
}
|
|
2741
2929
|
};
|
|
2742
2930
|
export {
|
|
2743
|
-
|
|
2931
|
+
oe as FDynamicFormGroup,
|
|
2932
|
+
wn as FDynamicFormInput,
|
|
2744
2933
|
ee as FResponseForm,
|
|
2745
|
-
|
|
2934
|
+
Vr as default,
|
|
2746
2935
|
J as dynamicFormGroupProps,
|
|
2747
|
-
|
|
2936
|
+
ko as editorResolver,
|
|
2748
2937
|
fe as formGroupPropsResolver,
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2938
|
+
me as formPropsResolver,
|
|
2939
|
+
we as responseFormProps,
|
|
2940
|
+
Oo as useDesignerRules
|
|
2752
2941
|
};
|