@farris/ui-vue 1.2.7 → 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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- 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/checkbox/index.d.ts +1 -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/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- 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 +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -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-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- 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/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,108 +1,107 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as b, computed as
|
|
5
|
-
import { cloneDeep as
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var re = (e, t, n) => t in e ? ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var A = (e, t, n) => re(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as b, computed as y, watch as V, onMounted as G, nextTick as z, createVNode as B, reactive as ie, withDirectives as le, resolveDirective as ue, defineComponent as Q, Fragment as J, inject as Z } from "vue";
|
|
5
|
+
import { cloneDeep as se } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
|
-
import { useNumber as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { useNumber as ce, useFormat as de, useSpinner as pe, useTextBox as fe } from "../number-spinner/index.esm.js";
|
|
8
|
+
import { getSchemaByType as _ } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
const X = {}, Y = {};
|
|
10
|
+
function q(e) {
|
|
11
|
+
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), d = Object.keys(t).reduce((s, i) => ((!a || !o.find((u) => u == i)) && (s[i] = t[i].type === "object" && t[i].properties ? q(t[i]) : se(t[i].default)), s), {});
|
|
12
|
+
return (!a || !o.find((s) => s == "id")) && (d.id = `${n}-${Date.now()}`), d;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
return
|
|
14
|
+
function I(e, t = {}, n) {
|
|
15
|
+
const o = X[e];
|
|
16
|
+
if (o) {
|
|
17
|
+
let a = q(o);
|
|
18
|
+
const d = Y[e];
|
|
19
|
+
return a = d ? d({ getSchemaByType: I }, a, t, n) : a, a;
|
|
19
20
|
}
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
|
-
function de(e, t) {
|
|
23
|
-
const n = U(t);
|
|
24
|
-
return Object.keys(e).reduce((o, a) => (o[a] = e[a], o), n), n;
|
|
25
|
-
}
|
|
26
23
|
function me(e, t) {
|
|
24
|
+
const n = q(t);
|
|
25
|
+
return Object.keys(e).reduce((o, a) => (o[a] && typeof o[a] == "object" ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
|
|
26
|
+
}
|
|
27
|
+
function ye(e, t) {
|
|
27
28
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
28
29
|
if (t.has(a)) {
|
|
29
|
-
const
|
|
30
|
-
if (typeof
|
|
31
|
-
o[
|
|
30
|
+
const d = t.get(a);
|
|
31
|
+
if (typeof d == "string")
|
|
32
|
+
o[d] = e[a];
|
|
32
33
|
else {
|
|
33
|
-
const
|
|
34
|
-
Object.assign(o,
|
|
34
|
+
const s = d(a, e[a], e);
|
|
35
|
+
Object.assign(o, s);
|
|
35
36
|
}
|
|
36
37
|
} else
|
|
37
38
|
o[a] = e[a];
|
|
38
39
|
return o;
|
|
39
40
|
}, {});
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
43
|
-
return
|
|
42
|
+
function ve(e, t, n = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const o = me(e, t);
|
|
44
|
+
return ye(o, n);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
function t(
|
|
47
|
-
if (typeof
|
|
48
|
-
return
|
|
49
|
-
if (typeof
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
55
|
-
if (
|
|
56
|
-
return Number(
|
|
46
|
+
function ge(e = {}) {
|
|
47
|
+
function t(r, c, l, p) {
|
|
48
|
+
if (typeof l == "number")
|
|
49
|
+
return p[r].length === l;
|
|
50
|
+
if (typeof l == "object") {
|
|
51
|
+
const m = Object.keys(l)[0], v = l[m];
|
|
52
|
+
if (m === "not")
|
|
53
|
+
return Number(p[r].length) !== Number(v);
|
|
54
|
+
if (m === "moreThan")
|
|
55
|
+
return Number(p[r].length) >= Number(v);
|
|
56
|
+
if (m === "lessThan")
|
|
57
|
+
return Number(p[r].length) <= Number(v);
|
|
57
58
|
}
|
|
58
59
|
return !1;
|
|
59
60
|
}
|
|
60
|
-
function n(
|
|
61
|
-
return
|
|
61
|
+
function n(r, c, l, p) {
|
|
62
|
+
return p[r] && p[r].propertyValue && String(p[r].propertyValue.value) === String(l);
|
|
62
63
|
}
|
|
63
64
|
const o = /* @__PURE__ */ new Map([
|
|
64
65
|
["length", t],
|
|
65
66
|
["getProperty", n]
|
|
66
67
|
]);
|
|
67
|
-
Object.keys(e).reduce((
|
|
68
|
-
function a(
|
|
69
|
-
const
|
|
70
|
-
return typeof
|
|
71
|
-
if (
|
|
72
|
-
return { target:
|
|
73
|
-
const
|
|
74
|
-
return { target:
|
|
68
|
+
Object.keys(e).reduce((r, c) => (r.set(c, e[c]), r), o);
|
|
69
|
+
function a(r, c) {
|
|
70
|
+
const l = r;
|
|
71
|
+
return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: r, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
|
|
72
|
+
if (p === "length")
|
|
73
|
+
return { target: l, operator: "length", param: null, value: c[p] };
|
|
74
|
+
const m = p, v = c[p];
|
|
75
|
+
return { target: l, operator: "getProperty", param: m, value: v };
|
|
75
76
|
}) : [];
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
-
return Object.keys(
|
|
79
|
-
const
|
|
80
|
-
return
|
|
78
|
+
function d(r) {
|
|
79
|
+
return Object.keys(r).reduce((l, p) => {
|
|
80
|
+
const m = a(p, r[p]);
|
|
81
|
+
return l.push(...m), l;
|
|
81
82
|
}, []);
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
-
if (o.has(
|
|
85
|
-
const
|
|
86
|
-
return
|
|
84
|
+
function s(r, c) {
|
|
85
|
+
if (o.has(r.operator)) {
|
|
86
|
+
const l = o.get(r.operator);
|
|
87
|
+
return l && l(r.target, r.param, r.value, c) || !1;
|
|
87
88
|
}
|
|
88
89
|
return !1;
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
91
|
+
function i(r, c) {
|
|
92
|
+
return d(r).reduce((m, v) => m && s(v, c), !0);
|
|
92
93
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
return
|
|
94
|
+
function u(r, c) {
|
|
95
|
+
const l = Object.keys(r), p = l.includes("allOf"), m = l.includes("anyOf"), v = p || m, T = (v ? r[v ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((E) => i(E, c));
|
|
96
|
+
return p ? !T.includes(!1) : T.includes(!0);
|
|
96
97
|
}
|
|
97
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: u };
|
|
98
99
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
100
|
+
const f = {
|
|
101
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
102
102
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
103
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
103
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
104
104
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
105
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
106
105
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
107
106
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
108
107
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -113,118 +112,47 @@ const p = {
|
|
|
113
112
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
114
113
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
115
114
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
120
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
121
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
116
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
117
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
122
118
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
123
|
-
|
|
124
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
125
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
126
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
119
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
127
120
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
128
121
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
129
|
-
|
|
130
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
122
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
131
123
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
132
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
133
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
134
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
135
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
136
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
137
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
138
124
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
139
125
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
140
126
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
141
|
-
|
|
142
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
143
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
144
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
145
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
146
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
147
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
127
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
148
128
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
156
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
157
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
158
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
159
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
160
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
161
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
162
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
163
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
164
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
165
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
166
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
167
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
168
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
169
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
170
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
171
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
172
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
173
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
174
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
175
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
176
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
177
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
129
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
130
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
131
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
132
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
133
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
134
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
178
135
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
188
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
189
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
190
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
191
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
192
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
193
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
194
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
195
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
196
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
197
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
198
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
199
|
-
/** 查询类 start */
|
|
200
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
201
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
202
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
203
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
204
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
205
|
-
/** 查询类 end */
|
|
206
|
-
/** 审批类 start */
|
|
207
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
208
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
209
|
-
/** 审批类 end */
|
|
210
|
-
}, ge = {}, ve = {};
|
|
211
|
-
fe();
|
|
212
|
-
function he(e, t, n = /* @__PURE__ */ new Map(), o = (d, m, s) => m, a = {}, l = (d) => d) {
|
|
213
|
-
return R[t.title] = t, _[t.title] = o, ge[t.title] = a, ve[t.title] = l, (d = {}) => {
|
|
214
|
-
const m = ye(d, t, n), s = Object.keys(e).reduce((i, u) => (i[u] = e[u].default, i), {});
|
|
215
|
-
return Object.assign(s, m);
|
|
136
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
138
|
+
}, be = {}, he = {};
|
|
139
|
+
ge();
|
|
140
|
+
function Ce(e, t, n = /* @__PURE__ */ new Map(), o = (s, i, u) => i, a = {}, d = (s) => s) {
|
|
141
|
+
return X[t.title] = t, Y[t.title] = o, be[t.title] = a, he[t.title] = d, (s = {}) => {
|
|
142
|
+
const i = ve(s, t, n), u = Object.keys(e).reduce((r, c) => (r[c] = e[c].default, r), {});
|
|
143
|
+
return Object.assign(u, i);
|
|
216
144
|
};
|
|
217
145
|
}
|
|
218
|
-
function
|
|
146
|
+
function we(e, t) {
|
|
219
147
|
return { customClass: t.class, customStyle: t.style };
|
|
220
148
|
}
|
|
221
|
-
const
|
|
222
|
-
["appearance",
|
|
149
|
+
const Be = /* @__PURE__ */ new Map([
|
|
150
|
+
["appearance", we]
|
|
223
151
|
]);
|
|
224
152
|
function Te(e, t, n) {
|
|
225
153
|
return t;
|
|
226
154
|
}
|
|
227
|
-
const
|
|
155
|
+
const ke = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/input-group.schema.json", xe = "input-group", Se = "A Farris Input Component", Pe = "object", Ae = {
|
|
228
156
|
id: {
|
|
229
157
|
description: "The unique identifier for a Input Group",
|
|
230
158
|
type: "string"
|
|
@@ -426,18 +354,18 @@ const we = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
426
354
|
type: "string",
|
|
427
355
|
default: ""
|
|
428
356
|
}
|
|
429
|
-
},
|
|
357
|
+
}, Ee = [
|
|
430
358
|
"id",
|
|
431
359
|
"type"
|
|
432
|
-
],
|
|
433
|
-
$schema:
|
|
434
|
-
$id:
|
|
435
|
-
title:
|
|
436
|
-
description:
|
|
437
|
-
type:
|
|
438
|
-
properties:
|
|
439
|
-
required:
|
|
440
|
-
},
|
|
360
|
+
], Fe = {
|
|
361
|
+
$schema: ke,
|
|
362
|
+
$id: Me,
|
|
363
|
+
title: xe,
|
|
364
|
+
description: Se,
|
|
365
|
+
type: Pe,
|
|
366
|
+
properties: Ae,
|
|
367
|
+
required: Ee
|
|
368
|
+
}, W = {
|
|
441
369
|
/** 是否自动完成 */
|
|
442
370
|
autocomplete: { Type: String, default: "off" },
|
|
443
371
|
/** 自定义CLASS */
|
|
@@ -503,118 +431,118 @@ const we = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
503
431
|
* - input: 输入时更新
|
|
504
432
|
*/
|
|
505
433
|
updateOn: { type: String, default: "blur" }
|
|
506
|
-
},
|
|
507
|
-
function
|
|
508
|
-
const a = b(e.disabled),
|
|
434
|
+
}, R = Ce(W, Fe, Be, Te);
|
|
435
|
+
function De(e, t, n, o) {
|
|
436
|
+
const a = b(e.disabled), d = b(!1), s = b("text"), i = b(e.showBorder), u = b(e.textAlign), r = b(e.updateOn), c = y(() => e.editable || !e.readonly), l = y(() => e.editable && !e.disabled && !e.readonly), p = y(() => !e.disabled && d.value), m = y(() => n.value === "" || n.value === null || n.value === void 0), v = y(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), C = y(() => e.readonly || !e.editable), x = y(() => e.enableTitle ? n.value : ""), T = y(() => ({
|
|
509
437
|
"form-control": !0,
|
|
510
438
|
"f-utils-fill": !0,
|
|
511
|
-
"text-left":
|
|
512
|
-
"text-center":
|
|
513
|
-
"text-right":
|
|
514
|
-
})),
|
|
515
|
-
const
|
|
439
|
+
"text-left": u.value === "left",
|
|
440
|
+
"text-center": u.value === "center",
|
|
441
|
+
"text-right": u.value === "right"
|
|
442
|
+
})), S = y(() => {
|
|
443
|
+
const g = {
|
|
516
444
|
"f-cmp-inputgroup": !0,
|
|
517
445
|
"input-group": !0,
|
|
518
446
|
"f-state-disable": a.value,
|
|
519
|
-
"f-state-editable":
|
|
520
|
-
"f-state-readonly":
|
|
521
|
-
"f-state-focus":
|
|
447
|
+
"f-state-editable": l.value,
|
|
448
|
+
"f-state-readonly": C.value,
|
|
449
|
+
"f-state-focus": p.value
|
|
522
450
|
};
|
|
523
|
-
return (e.customClass || "").split(" ").reduce((
|
|
524
|
-
}),
|
|
525
|
-
function
|
|
526
|
-
n.value =
|
|
451
|
+
return (e.customClass || "").split(" ").reduce((H, oe) => (H[oe] = !0, H), g), g;
|
|
452
|
+
}), E = y(() => i.value ? "" : "border-width : 0 ");
|
|
453
|
+
function k(g, F = !0) {
|
|
454
|
+
n.value = g, o.value !== g && (o.value = g), F && t.emit("change", g), t.emit("update:modelValue", g), t.emit("update:value", g);
|
|
527
455
|
}
|
|
528
|
-
|
|
456
|
+
V(
|
|
529
457
|
() => e.modelValue,
|
|
530
|
-
(
|
|
531
|
-
|
|
458
|
+
(g, F) => {
|
|
459
|
+
g !== F && (n.value = g, o.value = g);
|
|
532
460
|
}
|
|
533
|
-
),
|
|
534
|
-
|
|
461
|
+
), V(() => e.disabled, (g, F) => {
|
|
462
|
+
g !== F && (a.value = g);
|
|
535
463
|
});
|
|
536
|
-
function O(
|
|
537
|
-
return
|
|
464
|
+
function O(g) {
|
|
465
|
+
return d.value = !1, t.emit("blur", g), g.stopPropagation(), !1;
|
|
538
466
|
}
|
|
539
|
-
function h(
|
|
540
|
-
t.emit("click",
|
|
467
|
+
function h(g) {
|
|
468
|
+
t.emit("click", g);
|
|
541
469
|
}
|
|
542
|
-
function
|
|
543
|
-
e.disabled || (
|
|
470
|
+
function w(g) {
|
|
471
|
+
e.disabled || (i.value && (d.value = !0), c.value && t.emit("focus", g));
|
|
544
472
|
}
|
|
545
|
-
function
|
|
546
|
-
t.emit("input",
|
|
547
|
-
const
|
|
548
|
-
o.value =
|
|
473
|
+
function M(g) {
|
|
474
|
+
t.emit("input", g.target.value);
|
|
475
|
+
const F = g.target.value;
|
|
476
|
+
o.value = F, r.value === "input" && (t.emit("update:modelValue", F), t.emit("update:value", F));
|
|
549
477
|
}
|
|
550
|
-
function
|
|
551
|
-
t.emit("keydown",
|
|
478
|
+
function P(g) {
|
|
479
|
+
t.emit("keydown", g);
|
|
552
480
|
}
|
|
553
|
-
function N(
|
|
554
|
-
t.emit("keyup",
|
|
481
|
+
function N(g) {
|
|
482
|
+
t.emit("keyup", g);
|
|
555
483
|
}
|
|
556
|
-
function D(
|
|
557
|
-
|
|
484
|
+
function D(g) {
|
|
485
|
+
g.target.tagName !== "INPUT" && g.preventDefault(), g.stopPropagation();
|
|
558
486
|
}
|
|
559
|
-
function
|
|
560
|
-
if (
|
|
561
|
-
const
|
|
562
|
-
|
|
487
|
+
function U(g) {
|
|
488
|
+
if (r.value === "blur") {
|
|
489
|
+
const F = g.target.value;
|
|
490
|
+
g.stopPropagation(), k(F);
|
|
563
491
|
}
|
|
564
492
|
}
|
|
565
493
|
return {
|
|
566
|
-
changeTextBoxValue:
|
|
494
|
+
changeTextBoxValue: k,
|
|
567
495
|
disabled: a,
|
|
568
496
|
displayText: o,
|
|
569
|
-
editable:
|
|
570
|
-
hasFocused:
|
|
571
|
-
inputGroupClass:
|
|
572
|
-
inputType:
|
|
573
|
-
isEmpty:
|
|
497
|
+
editable: l,
|
|
498
|
+
hasFocused: p,
|
|
499
|
+
inputGroupClass: S,
|
|
500
|
+
inputType: s,
|
|
501
|
+
isEmpty: m,
|
|
574
502
|
modelValue: n,
|
|
575
|
-
readonly:
|
|
503
|
+
readonly: C,
|
|
576
504
|
onBlur: O,
|
|
577
505
|
onClick: h,
|
|
578
|
-
onFocus:
|
|
579
|
-
onInput:
|
|
580
|
-
onKeydown:
|
|
506
|
+
onFocus: w,
|
|
507
|
+
onInput: M,
|
|
508
|
+
onKeydown: P,
|
|
581
509
|
onKeyup: N,
|
|
582
510
|
onMousedown: D,
|
|
583
|
-
onTextBoxValueChange:
|
|
584
|
-
placeholder:
|
|
585
|
-
textBoxClass:
|
|
586
|
-
textBoxTitle:
|
|
587
|
-
inputGroupStyle:
|
|
511
|
+
onTextBoxValueChange: U,
|
|
512
|
+
placeholder: v,
|
|
513
|
+
textBoxClass: T,
|
|
514
|
+
textBoxTitle: x,
|
|
515
|
+
inputGroupStyle: E
|
|
588
516
|
};
|
|
589
517
|
}
|
|
590
|
-
function
|
|
591
|
-
const a = b(e.disabled),
|
|
592
|
-
|
|
593
|
-
const
|
|
518
|
+
function Ve(e, t, n, o) {
|
|
519
|
+
const a = b(e.disabled), d = b(!1), s = b("text"), i = b(e.showBorder), u = b(e.textAlign);
|
|
520
|
+
y(() => e.editable || !e.readonly);
|
|
521
|
+
const r = y(() => e.editable && !e.disabled && !e.readonly), c = y(() => !e.disabled && d.value), l = y(() => n.value === "" || n.value === null || n.value === void 0), p = y(() => e.placeholder), m = y(() => e.readonly || !e.editable), v = y(() => e.enableTitle ? n.value : ""), C = y(() => ({
|
|
594
522
|
"form-control": !0,
|
|
595
523
|
// 'f-utils-fill': true,
|
|
596
|
-
"text-left":
|
|
597
|
-
"text-center":
|
|
598
|
-
"text-right":
|
|
599
|
-
})),
|
|
524
|
+
"text-left": u.value === "left",
|
|
525
|
+
"text-center": u.value === "center",
|
|
526
|
+
"text-right": u.value === "right"
|
|
527
|
+
})), x = y(() => ({
|
|
600
528
|
"f-cmp-inputgroup": !0,
|
|
601
529
|
"input-group": !0,
|
|
602
530
|
"f-state-disable": !0,
|
|
603
531
|
"f-state-editable": !1,
|
|
604
532
|
"f-state-readonly": !0
|
|
605
533
|
// 'f-state-focus': hasFocused.value
|
|
606
|
-
})),
|
|
534
|
+
})), T = y(() => i.value ? "" : "border-width : 0 ");
|
|
607
535
|
return {
|
|
608
536
|
// changeTextBoxValue,
|
|
609
537
|
disabled: a,
|
|
610
538
|
displayText: o,
|
|
611
|
-
editable:
|
|
612
|
-
hasFocused:
|
|
613
|
-
inputGroupClass:
|
|
614
|
-
inputType:
|
|
615
|
-
isEmpty:
|
|
539
|
+
editable: r,
|
|
540
|
+
hasFocused: c,
|
|
541
|
+
inputGroupClass: x,
|
|
542
|
+
inputType: s,
|
|
543
|
+
isEmpty: l,
|
|
616
544
|
modelValue: n,
|
|
617
|
-
readonly:
|
|
545
|
+
readonly: m,
|
|
618
546
|
// onBlur,
|
|
619
547
|
// onClick,
|
|
620
548
|
// onFocus,
|
|
@@ -623,40 +551,40 @@ function De(e, t, n, o) {
|
|
|
623
551
|
// onKeyup,
|
|
624
552
|
// onMousedown,
|
|
625
553
|
// onTextBoxValueChange,
|
|
626
|
-
placeholder:
|
|
627
|
-
textBoxClass:
|
|
628
|
-
textBoxTitle:
|
|
629
|
-
inputGroupStyle:
|
|
554
|
+
placeholder: p,
|
|
555
|
+
textBoxClass: C,
|
|
556
|
+
textBoxTitle: v,
|
|
557
|
+
inputGroupStyle: T
|
|
630
558
|
};
|
|
631
559
|
}
|
|
632
|
-
function
|
|
633
|
-
const o = b(!1), a =
|
|
634
|
-
function
|
|
635
|
-
o.value =
|
|
560
|
+
function K(e, t, n) {
|
|
561
|
+
const o = b(!1), a = y(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: d, displayText: s, hasFocused: i, isEmpty: u } = n;
|
|
562
|
+
function r(C) {
|
|
563
|
+
o.value = C;
|
|
636
564
|
}
|
|
637
|
-
|
|
638
|
-
|
|
565
|
+
V(s, () => {
|
|
566
|
+
i != null && i.value ? r(!!(s != null && s.value)) : r(!1);
|
|
639
567
|
});
|
|
640
|
-
const
|
|
568
|
+
const c = y(() => ({
|
|
641
569
|
"input-group-text": !0,
|
|
642
570
|
"input-group-clear": !0
|
|
643
|
-
})),
|
|
571
|
+
})), l = y(() => ({
|
|
644
572
|
width: "24px",
|
|
645
573
|
display: o.value ? "flex" : "none"
|
|
646
574
|
}));
|
|
647
|
-
function
|
|
648
|
-
|
|
575
|
+
function p(C) {
|
|
576
|
+
C.stopPropagation(), a.value && (d("", !0), r(!o.value), t.emit("clear"));
|
|
649
577
|
}
|
|
650
|
-
function
|
|
651
|
-
a.value && !
|
|
578
|
+
function m(C) {
|
|
579
|
+
a.value && !u.value && r(!0);
|
|
652
580
|
}
|
|
653
|
-
function
|
|
654
|
-
a.value &&
|
|
581
|
+
function v(C) {
|
|
582
|
+
a.value && r(!1);
|
|
655
583
|
}
|
|
656
|
-
return { clearButtonClass:
|
|
584
|
+
return { clearButtonClass: c, clearButtonStyle: l, hasShownClearButton: o, onClearValue: p, onMouseEnter: m, onMouseLeave: v, shouldShowClearButton: a };
|
|
657
585
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
586
|
+
const Oe = ["moz", "ms", "webkit"];
|
|
587
|
+
function Ne() {
|
|
660
588
|
let e = 0;
|
|
661
589
|
return (t) => {
|
|
662
590
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
|
|
@@ -665,430 +593,492 @@ function Oe() {
|
|
|
665
593
|
return e = n + o, a;
|
|
666
594
|
};
|
|
667
595
|
}
|
|
668
|
-
function
|
|
596
|
+
function je() {
|
|
669
597
|
if (typeof window > "u")
|
|
670
598
|
return () => 0;
|
|
671
599
|
if (window.requestAnimationFrame)
|
|
672
600
|
return window.requestAnimationFrame.bind(window);
|
|
673
|
-
const e =
|
|
674
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
601
|
+
const e = Oe.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
602
|
+
return e ? window[`${e}RequestAnimationFrame`] : Ne();
|
|
675
603
|
}
|
|
676
|
-
|
|
677
|
-
const
|
|
604
|
+
je();
|
|
605
|
+
const Ge = (e) => {
|
|
678
606
|
const t = e;
|
|
679
607
|
return t.install = function(n) {
|
|
680
608
|
n.component(t.name, e);
|
|
681
609
|
}, e;
|
|
682
610
|
};
|
|
683
|
-
function
|
|
684
|
-
const n = b(e.groupText), o =
|
|
685
|
-
return { appendedButtonClass:
|
|
611
|
+
function ee(e, t) {
|
|
612
|
+
const n = b(e.groupText), o = y(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = y(() => e.enableClear || !!e.groupText);
|
|
613
|
+
return { appendedButtonClass: y(() => ({
|
|
686
614
|
"input-group-append": !0,
|
|
687
615
|
"append-force-show": o.value
|
|
688
616
|
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
689
617
|
}
|
|
690
|
-
function
|
|
691
|
-
const { appendedContent: a } = o,
|
|
692
|
-
|
|
693
|
-
|
|
618
|
+
function te(e, t, n, o) {
|
|
619
|
+
const { appendedContent: a } = o, d = b(e.enableViewPassword), s = y(() => e.type === "password"), i = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', u = '<span class="f-icon f-icon-eye"></span>', r = b(!1);
|
|
620
|
+
V(() => [e.readonly, e.disabled], ([p, m]) => {
|
|
621
|
+
s.value && (n.value = p || m ? "password" : n.value, a.value = p || m ? u : a.value);
|
|
694
622
|
});
|
|
695
|
-
function
|
|
696
|
-
return
|
|
623
|
+
function c() {
|
|
624
|
+
return r.value = !r.value, n.value = r.value ? "text" : "password", a.value = r.value ? i : u, !1;
|
|
697
625
|
}
|
|
698
|
-
function
|
|
699
|
-
n.value =
|
|
626
|
+
function l() {
|
|
627
|
+
n.value = s.value ? "password" : "text", a.value = s.value ? d.value ? u : "" : a.value;
|
|
700
628
|
}
|
|
701
|
-
return
|
|
629
|
+
return l(), { isPassword: s, onClickAppendedButton: c };
|
|
702
630
|
}
|
|
703
|
-
function
|
|
631
|
+
function Le(e, t, n) {
|
|
704
632
|
const o = b(), {
|
|
705
633
|
onBlurTextBox: a,
|
|
706
|
-
onFocusTextBox:
|
|
707
|
-
onInput:
|
|
708
|
-
onKeyDown:
|
|
709
|
-
textBoxValue:
|
|
710
|
-
} = n,
|
|
634
|
+
onFocusTextBox: d,
|
|
635
|
+
onInput: s,
|
|
636
|
+
onKeyDown: i,
|
|
637
|
+
textBoxValue: u
|
|
638
|
+
} = n, r = y(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), c = y(() => ({
|
|
711
639
|
"form-control": !0,
|
|
712
640
|
"f-utils-fill": !0
|
|
713
|
-
})),
|
|
641
|
+
})), l = y(() => ({
|
|
714
642
|
"text-align": e.textAlign
|
|
715
643
|
}));
|
|
716
|
-
function
|
|
717
|
-
|
|
644
|
+
function p(C) {
|
|
645
|
+
C.stopPropagation();
|
|
718
646
|
}
|
|
719
|
-
function
|
|
647
|
+
function m() {
|
|
720
648
|
e.selectOnCreated, e.focusOnCreated;
|
|
721
649
|
}
|
|
722
|
-
async function
|
|
723
|
-
|
|
650
|
+
async function v(C) {
|
|
651
|
+
d(C), await z, m();
|
|
724
652
|
}
|
|
725
|
-
return
|
|
726
|
-
await z,
|
|
653
|
+
return G(async () => {
|
|
654
|
+
await z, m();
|
|
727
655
|
}), () => B("input", {
|
|
728
656
|
ref: o,
|
|
729
|
-
class:
|
|
730
|
-
style:
|
|
657
|
+
class: c.value,
|
|
658
|
+
style: l.value,
|
|
731
659
|
type: "text",
|
|
732
|
-
value:
|
|
660
|
+
value: u.value,
|
|
733
661
|
disabled: e.disabled,
|
|
734
662
|
readonly: e.readonly || !e.editable,
|
|
735
|
-
placeholder:
|
|
663
|
+
placeholder: r.value,
|
|
736
664
|
onBlur: a,
|
|
737
|
-
onChange:
|
|
738
|
-
onFocus:
|
|
739
|
-
onInput:
|
|
740
|
-
onKeydown:
|
|
665
|
+
onChange: p,
|
|
666
|
+
onFocus: v,
|
|
667
|
+
onInput: s,
|
|
668
|
+
onKeydown: i
|
|
741
669
|
}, null);
|
|
742
670
|
}
|
|
743
|
-
function
|
|
671
|
+
function $e(e, t, n) {
|
|
744
672
|
const {
|
|
745
673
|
canDownward: o,
|
|
746
674
|
canUpward: a,
|
|
747
|
-
onClickDownButton:
|
|
748
|
-
onClickUpButton:
|
|
749
|
-
} = n,
|
|
675
|
+
onClickDownButton: d,
|
|
676
|
+
onClickUpButton: s
|
|
677
|
+
} = n, i = y(() => ({
|
|
750
678
|
"input-group-append": !0,
|
|
751
679
|
"btn-group": !0,
|
|
752
680
|
"btn-group-number": !0
|
|
753
|
-
})),
|
|
681
|
+
})), u = y(() => ({
|
|
754
682
|
btn: !0,
|
|
755
683
|
"btn-secondary": !0,
|
|
756
684
|
"btn-number-flag": !0
|
|
757
|
-
})),
|
|
685
|
+
})), r = y(() => ({
|
|
758
686
|
cursor: a() ? "pointer" : "not-allowed",
|
|
759
687
|
"margin-left": 0
|
|
760
|
-
})),
|
|
688
|
+
})), c = y(() => ({
|
|
761
689
|
cursor: o() ? "pointer" : "not-allowed",
|
|
762
690
|
"margin-left": 0
|
|
763
691
|
}));
|
|
764
692
|
return () => B("div", {
|
|
765
|
-
class:
|
|
693
|
+
class: i.value
|
|
766
694
|
}, [B("button", {
|
|
767
695
|
title: "upButton",
|
|
768
|
-
class:
|
|
769
|
-
style:
|
|
770
|
-
onClick:
|
|
696
|
+
class: u.value,
|
|
697
|
+
style: r.value,
|
|
698
|
+
onClick: s,
|
|
771
699
|
disabled: !a()
|
|
772
700
|
}, [B("span", {
|
|
773
701
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
774
702
|
}, null)]), B("button", {
|
|
775
703
|
title: "downButton",
|
|
776
|
-
class:
|
|
777
|
-
style:
|
|
778
|
-
onClick:
|
|
704
|
+
class: u.value,
|
|
705
|
+
style: c.value,
|
|
706
|
+
onClick: d,
|
|
779
707
|
disabled: !o()
|
|
780
708
|
}, [B("span", {
|
|
781
709
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
782
710
|
}, null)])]);
|
|
783
711
|
}
|
|
784
|
-
function
|
|
785
|
-
const n =
|
|
786
|
-
displayValue:
|
|
787
|
-
modelValue:
|
|
788
|
-
getRealValue:
|
|
789
|
-
} = n,
|
|
790
|
-
format:
|
|
712
|
+
function Ue(e, t) {
|
|
713
|
+
const n = ce(e, t), o = de(e, t, n), a = pe(e, t, o, n), d = fe(e, t, o, n, a), s = $e(e, t, a), {
|
|
714
|
+
displayValue: i,
|
|
715
|
+
modelValue: u,
|
|
716
|
+
getRealValue: r
|
|
717
|
+
} = n, c = Le(e, t, d), {
|
|
718
|
+
format: l
|
|
791
719
|
} = o, {
|
|
792
|
-
isFocus:
|
|
793
|
-
} =
|
|
794
|
-
return
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
}),
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
}),
|
|
801
|
-
|
|
802
|
-
}),
|
|
803
|
-
|
|
720
|
+
isFocus: p
|
|
721
|
+
} = d, m = y(() => !e.disabled && !e.readonly);
|
|
722
|
+
return G(() => {
|
|
723
|
+
const v = r(e.modelValue);
|
|
724
|
+
i.value = l(v);
|
|
725
|
+
}), V(() => [e.value], ([v]) => {
|
|
726
|
+
const C = r(v);
|
|
727
|
+
u.value = C, i.value = l(C);
|
|
728
|
+
}), V(() => [e.modelValue], ([v]) => {
|
|
729
|
+
v !== u.value && (u.value = v, !p.value && (i.value = l(r(v))));
|
|
730
|
+
}), V(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
731
|
+
i.value = l(u.value);
|
|
804
732
|
}), () => B("div", {
|
|
805
733
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
806
|
-
}, [
|
|
734
|
+
}, [c(), m.value && s()]);
|
|
807
735
|
}
|
|
808
|
-
function
|
|
809
|
-
const a = b(),
|
|
810
|
-
isPassword:
|
|
811
|
-
} = n,
|
|
812
|
-
disabled:
|
|
813
|
-
displayText:
|
|
814
|
-
inputType:
|
|
815
|
-
onBlur:
|
|
816
|
-
onFocus:
|
|
817
|
-
onInput:
|
|
818
|
-
onClick:
|
|
819
|
-
onKeydown:
|
|
820
|
-
onKeyup:
|
|
821
|
-
onMousedown:
|
|
736
|
+
function Ie(e, t, n, o) {
|
|
737
|
+
const a = b(), d = b(e.autocomplete), s = b(e.enableTitle), {
|
|
738
|
+
isPassword: i
|
|
739
|
+
} = n, u = b(e.minLength), r = b(e.maxLength), c = b(e.tabIndex), {
|
|
740
|
+
disabled: l,
|
|
741
|
+
displayText: p,
|
|
742
|
+
inputType: m,
|
|
743
|
+
onBlur: v,
|
|
744
|
+
onFocus: C,
|
|
745
|
+
onInput: x,
|
|
746
|
+
onClick: T,
|
|
747
|
+
onKeydown: S,
|
|
748
|
+
onKeyup: E,
|
|
749
|
+
onMousedown: k,
|
|
822
750
|
onTextBoxValueChange: O,
|
|
823
751
|
readonly: h,
|
|
824
|
-
placeholder:
|
|
825
|
-
textBoxClass:
|
|
826
|
-
textBoxTitle:
|
|
752
|
+
placeholder: w,
|
|
753
|
+
textBoxClass: M,
|
|
754
|
+
textBoxTitle: P
|
|
827
755
|
} = o;
|
|
828
|
-
return
|
|
756
|
+
return G(() => {
|
|
829
757
|
e.selectOnCreated, e.focusOnCreated;
|
|
830
758
|
}), () => B("input", {
|
|
831
759
|
ref: a,
|
|
832
760
|
name: "input-group-value",
|
|
833
|
-
autocomplete:
|
|
834
|
-
class:
|
|
835
|
-
disabled:
|
|
836
|
-
maxlength:
|
|
837
|
-
minlength:
|
|
838
|
-
placeholder:
|
|
761
|
+
autocomplete: d.value,
|
|
762
|
+
class: M.value,
|
|
763
|
+
disabled: l == null ? void 0 : l.value,
|
|
764
|
+
maxlength: r.value,
|
|
765
|
+
minlength: u.value,
|
|
766
|
+
placeholder: w.value,
|
|
839
767
|
readonly: h == null ? void 0 : h.value,
|
|
840
|
-
tabindex:
|
|
841
|
-
title:
|
|
842
|
-
type:
|
|
843
|
-
value:
|
|
844
|
-
onBlur:
|
|
845
|
-
onClick:
|
|
768
|
+
tabindex: c.value,
|
|
769
|
+
title: s.value && !i.value ? P.value : "",
|
|
770
|
+
type: m.value,
|
|
771
|
+
value: p == null ? void 0 : p.value,
|
|
772
|
+
onBlur: v,
|
|
773
|
+
onClick: T,
|
|
846
774
|
onChange: O,
|
|
847
|
-
onFocus:
|
|
848
|
-
onInput:
|
|
849
|
-
onKeydown:
|
|
850
|
-
onKeyup:
|
|
851
|
-
onMousedown:
|
|
775
|
+
onFocus: C,
|
|
776
|
+
onInput: x,
|
|
777
|
+
onKeydown: S,
|
|
778
|
+
onKeyup: E,
|
|
779
|
+
onMousedown: k
|
|
852
780
|
}, null);
|
|
853
781
|
}
|
|
854
|
-
function
|
|
855
|
-
const n =
|
|
782
|
+
function qe(e, t) {
|
|
783
|
+
const n = y(() => e.useExtendInfo && !!e.extendInfo), o = ie({
|
|
856
784
|
content: e.extendInfo
|
|
857
785
|
});
|
|
858
786
|
function a() {
|
|
859
787
|
t.emit("updateExtendInfo");
|
|
860
788
|
}
|
|
861
|
-
return () => n.value &&
|
|
789
|
+
return () => n.value && le(B("span", {
|
|
862
790
|
class: "input-group-before-tips",
|
|
863
791
|
onMouseenter: a
|
|
864
792
|
}, [B("i", {
|
|
865
793
|
class: "f-icon f-icon-info-circle"
|
|
866
794
|
}, null), B("b", {
|
|
867
795
|
class: "tips-arrow"
|
|
868
|
-
}, null)]), [[
|
|
796
|
+
}, null)]), [[ue("tooltip"), o]]);
|
|
869
797
|
}
|
|
870
|
-
function
|
|
798
|
+
function ne(e, t, n, o, a) {
|
|
871
799
|
const {
|
|
872
|
-
appendedButtonClass:
|
|
873
|
-
appendedContent:
|
|
874
|
-
} = n,
|
|
875
|
-
clearButtonClass:
|
|
876
|
-
clearButtonStyle:
|
|
877
|
-
onClearValue:
|
|
878
|
-
shouldShowClearButton:
|
|
800
|
+
appendedButtonClass: d,
|
|
801
|
+
appendedContent: s
|
|
802
|
+
} = n, i = y(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), u = y(() => s.value && !t.slots.groupTextTemplate), r = y(() => !!t.slots.groupTextTemplate), {
|
|
803
|
+
clearButtonClass: c,
|
|
804
|
+
clearButtonStyle: l,
|
|
805
|
+
onClearValue: p,
|
|
806
|
+
shouldShowClearButton: m
|
|
879
807
|
} = o;
|
|
880
|
-
function
|
|
808
|
+
function v() {
|
|
881
809
|
return B("span", {
|
|
882
810
|
id: "clearIcon",
|
|
883
|
-
class:
|
|
884
|
-
style:
|
|
885
|
-
onClick: (
|
|
811
|
+
class: c.value,
|
|
812
|
+
style: l.value,
|
|
813
|
+
onClick: (w) => p(w)
|
|
886
814
|
}, [B("i", {
|
|
887
815
|
class: "f-icon modal_close"
|
|
888
816
|
}, null)]);
|
|
889
817
|
}
|
|
890
|
-
function
|
|
891
|
-
t.emit("iconMouseEnter",
|
|
818
|
+
function C(w) {
|
|
819
|
+
t.emit("iconMouseEnter", w);
|
|
892
820
|
}
|
|
893
|
-
function
|
|
894
|
-
t.emit("iconMouseLeave",
|
|
821
|
+
function x(w) {
|
|
822
|
+
t.emit("iconMouseLeave", w);
|
|
895
823
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
originalEvent:
|
|
899
|
-
}),
|
|
824
|
+
function T(w) {
|
|
825
|
+
i.value && t.emit("clickHandle", {
|
|
826
|
+
originalEvent: w
|
|
827
|
+
}), w.stopPropagation();
|
|
900
828
|
}
|
|
901
|
-
const
|
|
902
|
-
function
|
|
829
|
+
const S = e.type === "password" ? a.onClickAppendedButton : T;
|
|
830
|
+
function E() {
|
|
903
831
|
return B("span", {
|
|
904
832
|
class: "input-group-text",
|
|
905
|
-
onMouseenter: (
|
|
906
|
-
onMouseleave: (
|
|
907
|
-
innerHTML:
|
|
908
|
-
onClick: (
|
|
833
|
+
onMouseenter: (w) => C(w),
|
|
834
|
+
onMouseleave: (w) => x(w),
|
|
835
|
+
innerHTML: s.value,
|
|
836
|
+
onClick: (w) => S(w)
|
|
909
837
|
}, null);
|
|
910
838
|
}
|
|
911
|
-
function
|
|
839
|
+
function k() {
|
|
912
840
|
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
913
841
|
}
|
|
914
842
|
function O() {
|
|
915
|
-
return
|
|
843
|
+
return u.value ? E : r.value ? k : "";
|
|
916
844
|
}
|
|
917
845
|
const h = O();
|
|
918
846
|
return () => B("div", {
|
|
919
|
-
class:
|
|
920
|
-
}, [
|
|
847
|
+
class: d.value
|
|
848
|
+
}, [m.value && v(), h && h()]);
|
|
921
849
|
}
|
|
922
|
-
const
|
|
850
|
+
const L = /* @__PURE__ */ Q({
|
|
923
851
|
name: "FInputGroup",
|
|
924
|
-
props:
|
|
852
|
+
props: W,
|
|
925
853
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
926
854
|
setup(e, t) {
|
|
927
|
-
const n = b(e.modelValue), o = b(e.modelValue), a =
|
|
928
|
-
inputGroupClass:
|
|
929
|
-
inputType:
|
|
930
|
-
inputGroupStyle:
|
|
931
|
-
} = a,
|
|
932
|
-
shouldShowAppendedButton:
|
|
933
|
-
} =
|
|
934
|
-
onMouseEnter:
|
|
935
|
-
onMouseLeave:
|
|
936
|
-
} =
|
|
937
|
-
|
|
938
|
-
n.value =
|
|
939
|
-
}),
|
|
940
|
-
n.value =
|
|
941
|
-
}),
|
|
855
|
+
const n = b(e.modelValue), o = b(e.modelValue), a = De(e, t, n, o), {
|
|
856
|
+
inputGroupClass: d,
|
|
857
|
+
inputType: s,
|
|
858
|
+
inputGroupStyle: i
|
|
859
|
+
} = a, u = ee(e), {
|
|
860
|
+
shouldShowAppendedButton: r
|
|
861
|
+
} = u, c = K(e, t, a), {
|
|
862
|
+
onMouseEnter: l,
|
|
863
|
+
onMouseLeave: p
|
|
864
|
+
} = c, m = te(e, t, s, u), v = Ue(e, t), C = Ie(e, t, m, a), x = ne(e, t, u, c, m), T = qe(e, t), S = y(() => e.type === "number");
|
|
865
|
+
V(() => [e.value], ([k]) => {
|
|
866
|
+
n.value = k, o.value = k;
|
|
867
|
+
}), V(() => [e.modelValue], ([k]) => {
|
|
868
|
+
n.value = k, o.value = k;
|
|
869
|
+
}), G(() => {
|
|
942
870
|
e.value && (n.value = e.value, o.value = e.value);
|
|
943
871
|
});
|
|
944
|
-
const
|
|
872
|
+
const E = () => B(J, null, [B("div", {
|
|
945
873
|
id: "inputGroup",
|
|
946
|
-
class:
|
|
947
|
-
style:
|
|
948
|
-
onMouseenter:
|
|
949
|
-
onMouseleave:
|
|
950
|
-
}, [
|
|
951
|
-
return () =>
|
|
874
|
+
class: d.value,
|
|
875
|
+
style: i.value,
|
|
876
|
+
onMouseenter: l,
|
|
877
|
+
onMouseleave: p
|
|
878
|
+
}, [S.value ? v() : B(J, null, [T(), C(), r.value && x()])])]);
|
|
879
|
+
return () => E();
|
|
952
880
|
}
|
|
953
881
|
});
|
|
954
|
-
function
|
|
882
|
+
function We(e, t) {
|
|
955
883
|
e.schema;
|
|
956
884
|
const n = b(!0), o = b(!0);
|
|
957
|
-
function a(
|
|
885
|
+
function a(l) {
|
|
958
886
|
return !1;
|
|
959
887
|
}
|
|
960
|
-
function
|
|
888
|
+
function d() {
|
|
961
889
|
return !1;
|
|
962
890
|
}
|
|
963
|
-
function
|
|
891
|
+
function s() {
|
|
964
892
|
return !1;
|
|
965
893
|
}
|
|
966
|
-
function
|
|
894
|
+
function i() {
|
|
967
895
|
return !0;
|
|
968
896
|
}
|
|
969
|
-
function
|
|
897
|
+
function u(l) {
|
|
970
898
|
}
|
|
971
|
-
function
|
|
899
|
+
function r() {
|
|
972
900
|
}
|
|
973
|
-
function
|
|
901
|
+
function c(l) {
|
|
974
902
|
return null;
|
|
975
903
|
}
|
|
976
904
|
return {
|
|
977
905
|
canAccepts: a,
|
|
978
|
-
checkCanDeleteComponent:
|
|
979
|
-
checkCanMoveComponent:
|
|
980
|
-
hideNestedPaddingInDesginerView:
|
|
981
|
-
onAcceptMovedChildElement:
|
|
982
|
-
resolveComponentContext:
|
|
906
|
+
checkCanDeleteComponent: d,
|
|
907
|
+
checkCanMoveComponent: s,
|
|
908
|
+
hideNestedPaddingInDesginerView: i,
|
|
909
|
+
onAcceptMovedChildElement: u,
|
|
910
|
+
resolveComponentContext: r,
|
|
983
911
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
984
912
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
985
|
-
getPropsConfig:
|
|
913
|
+
getPropsConfig: c
|
|
986
914
|
};
|
|
987
915
|
}
|
|
988
|
-
class
|
|
916
|
+
class He {
|
|
917
|
+
constructor(t, n) {
|
|
918
|
+
A(this, "componentId");
|
|
919
|
+
A(this, "viewModelId");
|
|
920
|
+
A(this, "eventsEditorUtils");
|
|
921
|
+
A(this, "formSchemaUtils");
|
|
922
|
+
A(this, "formMetadataConverter");
|
|
923
|
+
A(this, "designViewModelUtils");
|
|
924
|
+
A(this, "designViewModelField");
|
|
925
|
+
A(this, "controlCreatorUtils");
|
|
926
|
+
A(this, "designerHostService");
|
|
927
|
+
A(this, "schemaService", null);
|
|
928
|
+
A(this, "metadataService", null);
|
|
929
|
+
A(this, "propertyConfig", {
|
|
930
|
+
type: "object",
|
|
931
|
+
categories: {}
|
|
932
|
+
});
|
|
933
|
+
var o;
|
|
934
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
935
|
+
}
|
|
936
|
+
getTableInfo() {
|
|
937
|
+
var t;
|
|
938
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
939
|
+
}
|
|
940
|
+
setDesignViewModelField(t) {
|
|
941
|
+
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
942
|
+
if (n) {
|
|
943
|
+
if (!this.designViewModelField) {
|
|
944
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
945
|
+
this.designViewModelField = o.fields.find((a) => a.id === n);
|
|
946
|
+
}
|
|
947
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
changeFieldEditorType(t, n) {
|
|
951
|
+
}
|
|
952
|
+
getBasicPropConfig(t) {
|
|
953
|
+
return {
|
|
954
|
+
description: "Basic Information",
|
|
955
|
+
title: "基本信息",
|
|
956
|
+
properties: {
|
|
957
|
+
id: {
|
|
958
|
+
description: "组件标识",
|
|
959
|
+
title: "标识",
|
|
960
|
+
type: "string",
|
|
961
|
+
readonly: !0
|
|
962
|
+
},
|
|
963
|
+
type: {
|
|
964
|
+
description: "组件类型",
|
|
965
|
+
title: "控件类型",
|
|
966
|
+
type: "select",
|
|
967
|
+
editor: {
|
|
968
|
+
type: "combo-list",
|
|
969
|
+
textField: "name",
|
|
970
|
+
valueField: "value",
|
|
971
|
+
data: [{ value: t.type, name: f[t.type].name }]
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
getAppearanceConfig(t = null) {
|
|
978
|
+
return {
|
|
979
|
+
title: "样式",
|
|
980
|
+
description: "Appearance",
|
|
981
|
+
properties: {
|
|
982
|
+
class: {
|
|
983
|
+
title: "class样式",
|
|
984
|
+
type: "string",
|
|
985
|
+
description: "组件的CSS样式",
|
|
986
|
+
$converter: "/converter/appearance.converter"
|
|
987
|
+
},
|
|
988
|
+
style: {
|
|
989
|
+
title: "style样式",
|
|
990
|
+
type: "string",
|
|
991
|
+
description: "组件的样式",
|
|
992
|
+
$converter: "/converter/appearance.converter"
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
const j = class j {
|
|
999
|
+
/**
|
|
1000
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
1001
|
+
*/
|
|
989
1002
|
static getEditorTypesByMDataType(t) {
|
|
990
|
-
const n =
|
|
1003
|
+
const n = j.fieldControlTypeMapping[t];
|
|
991
1004
|
return n || [{ key: "", value: "" }];
|
|
992
1005
|
}
|
|
993
|
-
|
|
1006
|
+
/**
|
|
1007
|
+
* 获取所有输入类控件
|
|
1008
|
+
*/
|
|
1009
|
+
static getAllInputTypes() {
|
|
1010
|
+
const t = [];
|
|
1011
|
+
for (let n in j.fieldControlTypeMapping)
|
|
1012
|
+
j.fieldControlTypeMapping[n].forEach((o) => {
|
|
1013
|
+
t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
1014
|
+
});
|
|
1015
|
+
return t;
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
994
1018
|
/**
|
|
995
1019
|
* <字段类型,可配置的控件类型列表>的映射
|
|
996
1020
|
*/
|
|
997
|
-
|
|
1021
|
+
A(j, "fieldControlTypeMapping", {
|
|
998
1022
|
String: [
|
|
999
|
-
{ key:
|
|
1000
|
-
{ key:
|
|
1001
|
-
{ key:
|
|
1002
|
-
{ key:
|
|
1003
|
-
{ key:
|
|
1004
|
-
{ key:
|
|
1005
|
-
{ key:
|
|
1006
|
-
{ key: p.textarea.type, value: p.textarea.name }
|
|
1007
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
1023
|
+
{ key: f["input-group"].type, value: f["input-group"].name },
|
|
1024
|
+
{ key: f.lookup.type, value: f.lookup.name },
|
|
1025
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name },
|
|
1026
|
+
{ key: f["check-box"].type, value: f["check-box"].name },
|
|
1027
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name },
|
|
1028
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
1029
|
+
{ key: f.textarea.type, value: f.textarea.name }
|
|
1008
1030
|
],
|
|
1009
1031
|
Text: [
|
|
1010
|
-
{ key:
|
|
1011
|
-
{ key:
|
|
1012
|
-
{ key: p.lookup.type, value: p.lookup.name }
|
|
1032
|
+
{ key: f.textarea.type, value: f.textarea.name },
|
|
1033
|
+
{ key: f.lookup.type, value: f.lookup.name }
|
|
1013
1034
|
],
|
|
1014
1035
|
Decimal: [
|
|
1015
|
-
{ key:
|
|
1036
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
1016
1037
|
],
|
|
1017
1038
|
Integer: [
|
|
1018
|
-
{ key:
|
|
1039
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
1019
1040
|
],
|
|
1020
1041
|
Number: [
|
|
1021
|
-
{ key:
|
|
1042
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
1022
1043
|
],
|
|
1023
1044
|
BigNumber: [
|
|
1024
|
-
{ key:
|
|
1045
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
1025
1046
|
],
|
|
1026
1047
|
Date: [
|
|
1027
|
-
{ key:
|
|
1048
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name }
|
|
1028
1049
|
],
|
|
1029
1050
|
DateTime: [
|
|
1030
|
-
{ key:
|
|
1051
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name }
|
|
1031
1052
|
],
|
|
1032
1053
|
Boolean: [
|
|
1033
|
-
{ key:
|
|
1034
|
-
{ key:
|
|
1054
|
+
{ key: f.switch.type, value: f.switch.name },
|
|
1055
|
+
{ key: f["check-box"].type, value: f["check-box"].name }
|
|
1035
1056
|
],
|
|
1036
1057
|
Enum: [
|
|
1037
|
-
{ key:
|
|
1038
|
-
{ key:
|
|
1058
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
1059
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name }
|
|
1039
1060
|
],
|
|
1040
1061
|
Object: [
|
|
1041
|
-
{ key:
|
|
1042
|
-
{ key:
|
|
1043
|
-
{ key:
|
|
1044
|
-
],
|
|
1045
|
-
EmployeeSelector: [
|
|
1046
|
-
{ key: p.EmployeeSelector.type, value: p.EmployeeSelector.name }
|
|
1047
|
-
],
|
|
1048
|
-
AdminOrganizationSelector: [
|
|
1049
|
-
{ key: p.AdminOrganizationSelector.type, value: p.AdminOrganizationSelector.name }
|
|
1062
|
+
{ key: f.lookup.type, value: f.lookup.name },
|
|
1063
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
1064
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name }
|
|
1050
1065
|
]
|
|
1051
1066
|
});
|
|
1052
|
-
|
|
1067
|
+
let $ = j;
|
|
1068
|
+
const ze = b(0);
|
|
1069
|
+
class Je extends He {
|
|
1053
1070
|
constructor(t, n) {
|
|
1054
|
-
|
|
1055
|
-
x(this, "viewModelId");
|
|
1056
|
-
x(this, "eventsEditorUtils");
|
|
1057
|
-
x(this, "formSchemaUtils");
|
|
1058
|
-
x(this, "formMetadataConverter");
|
|
1059
|
-
x(this, "designViewModelUtils");
|
|
1060
|
-
x(this, "designViewModelField");
|
|
1061
|
-
x(this, "controlCreatorUtils");
|
|
1062
|
-
x(this, "designerHostService");
|
|
1063
|
-
x(this, "schemaService", null);
|
|
1064
|
-
x(this, "metadataService", null);
|
|
1065
|
-
x(this, "propertyConfig", {
|
|
1066
|
-
type: "object",
|
|
1067
|
-
categories: {}
|
|
1068
|
-
});
|
|
1069
|
-
var o;
|
|
1070
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1071
|
-
}
|
|
1072
|
-
getTableInfo() {
|
|
1073
|
-
var t;
|
|
1074
|
-
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1075
|
-
}
|
|
1076
|
-
setDesignViewModelField(t) {
|
|
1077
|
-
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1078
|
-
if (n) {
|
|
1079
|
-
if (!this.designViewModelField) {
|
|
1080
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1081
|
-
this.designViewModelField = o.fields.find((a) => a.id === n);
|
|
1082
|
-
}
|
|
1083
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
1084
|
-
}
|
|
1071
|
+
super(t, n);
|
|
1085
1072
|
}
|
|
1086
|
-
|
|
1073
|
+
getPropertyConfig(t, n) {
|
|
1074
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
1087
1075
|
}
|
|
1088
|
-
|
|
1089
|
-
var
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1076
|
+
getBasicProperties(t, n) {
|
|
1077
|
+
var s;
|
|
1078
|
+
var o = this;
|
|
1079
|
+
this.setDesignViewModelField(t);
|
|
1080
|
+
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1081
|
+
return {
|
|
1092
1082
|
description: "Basic Information",
|
|
1093
1083
|
title: "基本信息",
|
|
1094
1084
|
properties: {
|
|
@@ -1099,8 +1089,8 @@ class $e {
|
|
|
1099
1089
|
readonly: !0
|
|
1100
1090
|
},
|
|
1101
1091
|
type: {
|
|
1102
|
-
description: "
|
|
1103
|
-
title: "
|
|
1092
|
+
description: "编辑器类型",
|
|
1093
|
+
title: "编辑器类型",
|
|
1104
1094
|
type: "string",
|
|
1105
1095
|
refreshPanelAfterChanged: !0,
|
|
1106
1096
|
$converter: "/converter/change-editor.converter",
|
|
@@ -1108,63 +1098,52 @@ class $e {
|
|
|
1108
1098
|
type: "combo-list",
|
|
1109
1099
|
textField: "value",
|
|
1110
1100
|
valueField: "key",
|
|
1111
|
-
|
|
1112
|
-
|
|
1101
|
+
editable: !1,
|
|
1102
|
+
data: o.designViewModelField ? $.getEditorTypesByMDataType((s = o.designViewModelField.type) == null ? void 0 : s.name) : $.getAllInputTypes()
|
|
1113
1103
|
}
|
|
1114
1104
|
},
|
|
1115
1105
|
label: {
|
|
1116
1106
|
title: "标签",
|
|
1117
1107
|
type: "string",
|
|
1118
1108
|
$converter: "/converter/form-group-label.converter"
|
|
1109
|
+
},
|
|
1110
|
+
binding: {
|
|
1111
|
+
description: "绑定的表单字段",
|
|
1112
|
+
title: "绑定",
|
|
1113
|
+
$converter: "/converter/field-selector.converter",
|
|
1114
|
+
editor: {
|
|
1115
|
+
type: "field-selector",
|
|
1116
|
+
bindingType: { enable: !1 },
|
|
1117
|
+
editorParams: {
|
|
1118
|
+
propertyData: t,
|
|
1119
|
+
formBasicInfo: a
|
|
1120
|
+
},
|
|
1121
|
+
columns: [
|
|
1122
|
+
{ field: "name", title: "字段名称" },
|
|
1123
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
1124
|
+
{ field: "fieldType", title: "字段类型" }
|
|
1125
|
+
],
|
|
1126
|
+
textField: "bindingField",
|
|
1127
|
+
data: d
|
|
1128
|
+
}
|
|
1119
1129
|
}
|
|
1120
1130
|
},
|
|
1121
|
-
setPropertyRelates(
|
|
1122
|
-
if (
|
|
1123
|
-
switch (
|
|
1131
|
+
setPropertyRelates(i, u) {
|
|
1132
|
+
if (i)
|
|
1133
|
+
switch (i && i.propertyID) {
|
|
1124
1134
|
case "type": {
|
|
1125
|
-
|
|
1135
|
+
o.changeControlType(t, i, n);
|
|
1136
|
+
break;
|
|
1137
|
+
}
|
|
1138
|
+
case "label": {
|
|
1139
|
+
i.needRefreshControlTree = !0;
|
|
1126
1140
|
break;
|
|
1127
1141
|
}
|
|
1128
1142
|
}
|
|
1129
1143
|
}
|
|
1130
1144
|
};
|
|
1131
1145
|
}
|
|
1132
|
-
|
|
1133
|
-
* 卡片控件:切换控件类型后事件
|
|
1134
|
-
* @param propertyData 控件DOM属性
|
|
1135
|
-
* @param newControlType 新控件类型
|
|
1136
|
-
*/
|
|
1137
|
-
changeControlType(t, n) {
|
|
1138
|
-
var i, u, r, c, y;
|
|
1139
|
-
const o = n.propertyValue, a = this.formSchemaUtils.getComponentById(this.componentId);
|
|
1140
|
-
let l = this.getControlParentContainer(t.id, a);
|
|
1141
|
-
if (!l)
|
|
1142
|
-
return;
|
|
1143
|
-
const d = l.contents.findIndex((f) => f.id === t.id), m = l.contents[d];
|
|
1144
|
-
let s;
|
|
1145
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1146
|
-
editor: {
|
|
1147
|
-
$type: o
|
|
1148
|
-
},
|
|
1149
|
-
name: this.designViewModelField.name,
|
|
1150
|
-
require: this.designViewModelField.require,
|
|
1151
|
-
readonly: this.designViewModelField.readonly
|
|
1152
|
-
}, !1), s = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(s, {
|
|
1153
|
-
id: m.id,
|
|
1154
|
-
appearance: m.appearance,
|
|
1155
|
-
size: m.size,
|
|
1156
|
-
label: m.label
|
|
1157
|
-
}), Object.assign(s.editor, {
|
|
1158
|
-
isTextArea: s.isTextArea && m.isTextArea,
|
|
1159
|
-
type: o || "",
|
|
1160
|
-
placeHolder: (i = m.editor) == null ? void 0 : i.placeHolder,
|
|
1161
|
-
holdPlace: (u = m.editor) == null ? void 0 : u.holdPlace,
|
|
1162
|
-
readonly: (r = m.editor) == null ? void 0 : r.readonly,
|
|
1163
|
-
require: (c = m.editor) == null ? void 0 : c.require,
|
|
1164
|
-
visible: (y = m.editor) == null ? void 0 : y.visible
|
|
1165
|
-
}), l.contents.splice(d, 1, s);
|
|
1166
|
-
}
|
|
1167
|
-
getAppearanceConfig(t = null) {
|
|
1146
|
+
getAppearanceProperties(t) {
|
|
1168
1147
|
return {
|
|
1169
1148
|
title: "样式",
|
|
1170
1149
|
description: "Appearance",
|
|
@@ -1194,73 +1173,52 @@ class $e {
|
|
|
1194
1173
|
}
|
|
1195
1174
|
};
|
|
1196
1175
|
}
|
|
1197
|
-
/**
|
|
1198
|
-
* 获取控件:以contents为节点进行定位
|
|
1199
|
-
* @param controlId 控件ID
|
|
1200
|
-
* @param domJson 容器
|
|
1201
|
-
*/
|
|
1202
|
-
getControlParentContainer(t, n) {
|
|
1203
|
-
let o;
|
|
1204
|
-
if (!n || !n.contents || n.contents.length === 0)
|
|
1205
|
-
return null;
|
|
1206
|
-
for (const a of n.contents) {
|
|
1207
|
-
if (a.id === t)
|
|
1208
|
-
return o = n, n;
|
|
1209
|
-
if (o = this.getControlParentContainer(t, a), o)
|
|
1210
|
-
return o;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
class ze extends $e {
|
|
1215
|
-
constructor(t, n) {
|
|
1216
|
-
super(t, n);
|
|
1217
|
-
}
|
|
1218
|
-
getBasicProperties(t) {
|
|
1219
|
-
let n = this.getBasicPropConfig(t);
|
|
1220
|
-
return n.properties.binding = this.getFieldSelectorOptions(t), n;
|
|
1221
|
-
}
|
|
1222
|
-
getAppearanceProperties(t) {
|
|
1223
|
-
return this.getAppearanceConfig(t);
|
|
1224
|
-
}
|
|
1225
1176
|
getEditorProperties(t) {
|
|
1226
1177
|
return this.getComponentConfig(t);
|
|
1227
1178
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1179
|
+
/**
|
|
1180
|
+
* 卡片控件:切换控件类型后事件
|
|
1181
|
+
* @param propertyData 控件DOM属性
|
|
1182
|
+
* @param newControlType 新控件类型
|
|
1183
|
+
*/
|
|
1184
|
+
changeControlType(t, n, o) {
|
|
1185
|
+
var r, c, l, p;
|
|
1186
|
+
const a = n.propertyValue, d = o && o.parent && o.parent.schema;
|
|
1187
|
+
if (!d)
|
|
1188
|
+
return;
|
|
1189
|
+
const s = d.contents.findIndex((m) => m.id === t.id), i = d.contents[s];
|
|
1190
|
+
let u;
|
|
1191
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1237
1192
|
editor: {
|
|
1238
|
-
type:
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1193
|
+
$type: a
|
|
1194
|
+
},
|
|
1195
|
+
name: this.designViewModelField.name,
|
|
1196
|
+
require: this.designViewModelField.require,
|
|
1197
|
+
readonly: this.designViewModelField.readonly
|
|
1198
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), u || (u = _("form-group") || {}, u.editor = _(a) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
|
|
1199
|
+
id: i.id,
|
|
1200
|
+
appearance: i.appearance,
|
|
1201
|
+
size: i.size,
|
|
1202
|
+
label: i.label,
|
|
1203
|
+
binding: i.binding,
|
|
1204
|
+
visible: i.visible
|
|
1205
|
+
}), Object.assign(u.editor, {
|
|
1206
|
+
isTextArea: u.isTextArea && i.isTextArea,
|
|
1207
|
+
placeholder: (r = i.editor) == null ? void 0 : r.placeholder,
|
|
1208
|
+
holdPlace: (c = i.editor) == null ? void 0 : c.holdPlace,
|
|
1209
|
+
readonly: (l = i.editor) == null ? void 0 : l.readonly,
|
|
1210
|
+
require: (p = i.editor) == null ? void 0 : p.require
|
|
1211
|
+
}), d.contents.splice(s, 1), d.contents.splice(s, 0, u), o.schema = Object.assign(i, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1212
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
1213
|
+
), ze.value++;
|
|
1256
1214
|
}
|
|
1257
1215
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1258
1216
|
const a = Object.assign({
|
|
1259
|
-
description: "
|
|
1260
|
-
title: "
|
|
1217
|
+
description: "编辑器",
|
|
1218
|
+
title: "编辑器",
|
|
1261
1219
|
type: "input-group",
|
|
1262
1220
|
$converter: "/converter/property-editor.converter"
|
|
1263
|
-
}, n),
|
|
1221
|
+
}, n), d = Object.assign({
|
|
1264
1222
|
readonly: {
|
|
1265
1223
|
description: "",
|
|
1266
1224
|
title: "只读",
|
|
@@ -1282,38 +1240,38 @@ class ze extends $e {
|
|
|
1282
1240
|
type: "string"
|
|
1283
1241
|
}
|
|
1284
1242
|
}, o);
|
|
1285
|
-
return { ...a, properties: { ...
|
|
1243
|
+
return { ...a, properties: { ...d } };
|
|
1286
1244
|
}
|
|
1287
1245
|
}
|
|
1288
|
-
class
|
|
1246
|
+
class Ze extends Je {
|
|
1289
1247
|
constructor(t, n) {
|
|
1290
1248
|
super(t, n);
|
|
1291
1249
|
}
|
|
1292
1250
|
}
|
|
1293
|
-
function
|
|
1251
|
+
function _e(e, t) {
|
|
1294
1252
|
const {
|
|
1295
1253
|
canAccepts: n,
|
|
1296
1254
|
checkCanDeleteComponent: o,
|
|
1297
1255
|
checkCanMoveComponent: a,
|
|
1298
|
-
hideNestedPaddingInDesginerView:
|
|
1299
|
-
onAcceptMovedChildElement:
|
|
1300
|
-
resolveComponentContext:
|
|
1301
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1302
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1303
|
-
} =
|
|
1304
|
-
function
|
|
1305
|
-
return new
|
|
1256
|
+
hideNestedPaddingInDesginerView: d,
|
|
1257
|
+
onAcceptMovedChildElement: s,
|
|
1258
|
+
resolveComponentContext: i,
|
|
1259
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
1260
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1261
|
+
} = We(e), c = e.schema;
|
|
1262
|
+
function l(p, m) {
|
|
1263
|
+
return new Ze(p, t).getPropertyConfig(c, m);
|
|
1306
1264
|
}
|
|
1307
1265
|
return {
|
|
1308
1266
|
canAccepts: n,
|
|
1309
1267
|
checkCanDeleteComponent: o,
|
|
1310
1268
|
checkCanMoveComponent: a,
|
|
1311
|
-
hideNestedPaddingInDesginerView:
|
|
1312
|
-
onAcceptMovedChildElement:
|
|
1313
|
-
resolveComponentContext:
|
|
1314
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1315
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1316
|
-
getPropsConfig:
|
|
1269
|
+
hideNestedPaddingInDesginerView: d,
|
|
1270
|
+
onAcceptMovedChildElement: s,
|
|
1271
|
+
resolveComponentContext: i,
|
|
1272
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
1273
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1274
|
+
getPropsConfig: l
|
|
1317
1275
|
};
|
|
1318
1276
|
}
|
|
1319
1277
|
function Qe(e, t, n) {
|
|
@@ -1322,133 +1280,133 @@ function Qe(e, t, n) {
|
|
|
1322
1280
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
1323
1281
|
}
|
|
1324
1282
|
o();
|
|
1325
|
-
const a = n && n.getStyles && n.getStyles() || "",
|
|
1326
|
-
function
|
|
1283
|
+
const a = n && n.getStyles && n.getStyles() || "", d = n && n.getDesignerClass && n.getDesignerClass() || "", s = b();
|
|
1284
|
+
function i() {
|
|
1327
1285
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
1328
1286
|
}
|
|
1329
|
-
function
|
|
1287
|
+
function u() {
|
|
1330
1288
|
return !1;
|
|
1331
1289
|
}
|
|
1332
|
-
function
|
|
1290
|
+
function r() {
|
|
1333
1291
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
1334
1292
|
}
|
|
1335
|
-
function
|
|
1293
|
+
function c() {
|
|
1336
1294
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
1337
1295
|
}
|
|
1338
|
-
function
|
|
1296
|
+
function l(h) {
|
|
1339
1297
|
if (!h || !h.value)
|
|
1340
1298
|
return null;
|
|
1341
1299
|
if (h.value.schema && h.value.schema.type === "component")
|
|
1342
1300
|
return h.value;
|
|
1343
|
-
const
|
|
1344
|
-
return
|
|
1301
|
+
const w = b(h == null ? void 0 : h.value.parent), M = l(w);
|
|
1302
|
+
return M || null;
|
|
1345
1303
|
}
|
|
1346
|
-
function
|
|
1347
|
-
const { componentInstance:
|
|
1348
|
-
return !
|
|
1304
|
+
function p(h = t) {
|
|
1305
|
+
const { componentInstance: w, designerItemElementRef: M } = h;
|
|
1306
|
+
return !w || !w.value ? null : w.value.canMove ? M : p(h.parent);
|
|
1349
1307
|
}
|
|
1350
|
-
function
|
|
1308
|
+
function m(h) {
|
|
1351
1309
|
return !!n && n.canAccepts(h);
|
|
1352
1310
|
}
|
|
1353
|
-
function
|
|
1311
|
+
function v() {
|
|
1354
1312
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
1355
1313
|
}
|
|
1356
|
-
function
|
|
1314
|
+
function C() {
|
|
1357
1315
|
}
|
|
1358
|
-
function
|
|
1359
|
-
|
|
1316
|
+
function x(h, w) {
|
|
1317
|
+
w && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(w);
|
|
1360
1318
|
}
|
|
1361
|
-
function
|
|
1362
|
-
const { componentType:
|
|
1363
|
-
let
|
|
1364
|
-
n && n.onResolveNewComponentSchema && (
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1319
|
+
function T(h, w) {
|
|
1320
|
+
const { componentType: M } = h;
|
|
1321
|
+
let P = I(M, h, w);
|
|
1322
|
+
n && n.onResolveNewComponentSchema && (P = n.onResolveNewComponentSchema(h, P));
|
|
1323
|
+
const N = M.toLowerCase().replace("-", "_");
|
|
1324
|
+
return P && !P.id && P.type === M && (P.id = `${N}_${Math.random().toString().slice(2, 6)}`), P;
|
|
1367
1325
|
}
|
|
1368
|
-
function
|
|
1369
|
-
const
|
|
1370
|
-
N.parentComponentInstance =
|
|
1371
|
-
let D =
|
|
1372
|
-
n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(h,
|
|
1373
|
-
const
|
|
1374
|
-
return D && !D.id && D.type ===
|
|
1326
|
+
function S(h, w) {
|
|
1327
|
+
const M = String(h.getAttribute("data-controltype")), P = h.getAttribute("data-feature"), N = P ? JSON.parse(P) : {};
|
|
1328
|
+
N.parentComponentInstance = s.value;
|
|
1329
|
+
let D = I(M, N);
|
|
1330
|
+
n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(h, w, D));
|
|
1331
|
+
const U = M.toLowerCase().replace("-", "_");
|
|
1332
|
+
return D && !D.id && D.type === M && (D.id = `${U}_${Math.random().toString().slice(2, 6)}`), D;
|
|
1375
1333
|
}
|
|
1376
|
-
function
|
|
1334
|
+
function E(h) {
|
|
1377
1335
|
}
|
|
1378
|
-
function
|
|
1336
|
+
function k(...h) {
|
|
1379
1337
|
if (n && n.getPropsConfig)
|
|
1380
1338
|
return n.getPropsConfig(...h);
|
|
1381
1339
|
}
|
|
1382
|
-
return
|
|
1383
|
-
canMove:
|
|
1384
|
-
canSelectParent:
|
|
1385
|
-
canDelete:
|
|
1386
|
-
canNested: !
|
|
1340
|
+
return s.value = {
|
|
1341
|
+
canMove: i(),
|
|
1342
|
+
canSelectParent: u(),
|
|
1343
|
+
canDelete: r(),
|
|
1344
|
+
canNested: !c(),
|
|
1387
1345
|
contents: t == null ? void 0 : t.schema.contents,
|
|
1388
1346
|
elementRef: e,
|
|
1389
1347
|
parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
|
|
1390
1348
|
schema: t == null ? void 0 : t.schema,
|
|
1391
1349
|
styles: a,
|
|
1392
|
-
designerClass:
|
|
1393
|
-
canAccepts:
|
|
1394
|
-
getBelongedComponentInstance:
|
|
1395
|
-
getDraggableDesignItemElement:
|
|
1396
|
-
getDraggingDisplayText:
|
|
1397
|
-
getPropConfig:
|
|
1398
|
-
getDragScopeElement:
|
|
1399
|
-
onAcceptMovedChildElement:
|
|
1400
|
-
onAcceptNewChildElement:
|
|
1401
|
-
onChildElementMovedOut:
|
|
1402
|
-
addNewChildComponentSchema:
|
|
1350
|
+
designerClass: d,
|
|
1351
|
+
canAccepts: m,
|
|
1352
|
+
getBelongedComponentInstance: l,
|
|
1353
|
+
getDraggableDesignItemElement: p,
|
|
1354
|
+
getDraggingDisplayText: v,
|
|
1355
|
+
getPropConfig: k,
|
|
1356
|
+
getDragScopeElement: C,
|
|
1357
|
+
onAcceptMovedChildElement: x,
|
|
1358
|
+
onAcceptNewChildElement: S,
|
|
1359
|
+
onChildElementMovedOut: E,
|
|
1360
|
+
addNewChildComponentSchema: T,
|
|
1403
1361
|
updateDragAndDropRules: o,
|
|
1404
1362
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || b(!1),
|
|
1405
1363
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || b(!1)
|
|
1406
|
-
},
|
|
1364
|
+
}, s;
|
|
1407
1365
|
}
|
|
1408
|
-
const
|
|
1366
|
+
const Xe = /* @__PURE__ */ Q({
|
|
1409
1367
|
name: "FInputGroupDesign",
|
|
1410
|
-
props:
|
|
1368
|
+
props: W,
|
|
1411
1369
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1412
1370
|
setup(e, t) {
|
|
1413
|
-
const n = b(e.modelValue), o = b(e.modelValue), a =
|
|
1414
|
-
inputGroupClass:
|
|
1415
|
-
inputType:
|
|
1416
|
-
inputGroupStyle:
|
|
1417
|
-
} = a,
|
|
1418
|
-
shouldShowAppendedButton:
|
|
1419
|
-
} =
|
|
1420
|
-
onMouseEnter:
|
|
1421
|
-
onMouseLeave:
|
|
1422
|
-
} =
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}), t.expose(
|
|
1426
|
-
const
|
|
1371
|
+
const n = b(e.modelValue), o = b(e.modelValue), a = Ve(e, t, n, o), {
|
|
1372
|
+
inputGroupClass: d,
|
|
1373
|
+
inputType: s,
|
|
1374
|
+
inputGroupStyle: i
|
|
1375
|
+
} = a, u = ee(e), {
|
|
1376
|
+
shouldShowAppendedButton: r
|
|
1377
|
+
} = u, c = K(e, t, a), {
|
|
1378
|
+
onMouseEnter: l,
|
|
1379
|
+
onMouseLeave: p
|
|
1380
|
+
} = c, m = te(e, t, s, u), v = b(), C = Z("designer-host-service"), x = Z("design-item-context"), T = _e(x, C), S = Qe(v, x, T);
|
|
1381
|
+
G(() => {
|
|
1382
|
+
v.value.componentInstance = S;
|
|
1383
|
+
}), t.expose(S.value);
|
|
1384
|
+
const E = ne(e, t, u, c, m), k = b();
|
|
1427
1385
|
return () => B("div", {
|
|
1428
1386
|
id: "inputGroup",
|
|
1429
|
-
ref:
|
|
1430
|
-
class:
|
|
1431
|
-
style:
|
|
1432
|
-
onMouseenter:
|
|
1433
|
-
onMouseleave:
|
|
1387
|
+
ref: v,
|
|
1388
|
+
class: d.value,
|
|
1389
|
+
style: i.value,
|
|
1390
|
+
onMouseenter: l,
|
|
1391
|
+
onMouseleave: p
|
|
1434
1392
|
}, [B("input", {
|
|
1435
|
-
ref:
|
|
1393
|
+
ref: k,
|
|
1436
1394
|
class: "form-control",
|
|
1437
1395
|
readonly: !0,
|
|
1438
1396
|
placeholder: e.placeholder
|
|
1439
|
-
}, null),
|
|
1397
|
+
}, null), r.value && E()]);
|
|
1440
1398
|
}
|
|
1441
1399
|
});
|
|
1442
|
-
|
|
1443
|
-
e["input-group"] =
|
|
1400
|
+
L.register = (e, t, n, o) => {
|
|
1401
|
+
e["input-group"] = L, t["input-group"] = R;
|
|
1444
1402
|
};
|
|
1445
|
-
|
|
1446
|
-
e["input-group"] =
|
|
1403
|
+
L.registerDesigner = (e, t, n) => {
|
|
1404
|
+
e["input-group"] = Xe, t["input-group"] = R;
|
|
1447
1405
|
};
|
|
1448
|
-
const
|
|
1406
|
+
const ot = Ge(L);
|
|
1449
1407
|
export {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1408
|
+
L as FInputGroup,
|
|
1409
|
+
ot as default,
|
|
1410
|
+
W as inputGroupProps,
|
|
1411
|
+
R as propsResolver
|
|
1454
1412
|
};
|