@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,103 +1,98 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import "
|
|
7
|
-
import { useNumber as
|
|
8
|
-
import { DgControl as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: n, title: t, ignore:
|
|
12
|
-
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var _ = (e, n, t) => n in e ? Y(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var h = (e, n, t) => _(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { ref as B, computed as T, watch as F, onMounted as L, nextTick as N, createVNode as w, reactive as K, withDirectives as ee, resolveDirective as te, defineComponent as W, Fragment as D, inject as U } from "vue";
|
|
5
|
+
import { isPlainObject as j, cloneDeep as q } from "lodash-es";
|
|
6
|
+
import { useTextBox as ne, useClear as R, useTextBoxDesign as oe, withInstall as ie } from "../common/index.esm.js";
|
|
7
|
+
import { useNumber as se, useFormat as le, useSpinner as re, useTextBox as ae } from "../number-spinner/index.esm.js";
|
|
8
|
+
import { DgControl as $, useDesignerComponent as ue } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const ce = {}, de = {};
|
|
10
|
+
function H(e) {
|
|
11
|
+
const { properties: n, title: t, ignore: s } = e, i = s && Array.isArray(s), a = Object.keys(n).reduce((r, f) => ((!i || !s.find((p) => p === f)) && (r[f] = n[f].type === "object" && n[f].properties ? H(n[f]) : q(n[f].default)), r), {});
|
|
12
|
+
if (t && (!i || !s.find((r) => r === "id"))) {
|
|
13
|
+
const r = t.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
15
|
+
}
|
|
16
|
+
return a;
|
|
13
17
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
let a = j(o);
|
|
18
|
-
const s = Y[e];
|
|
19
|
-
return a = s ? s({ getSchemaByType: _ }, a, n, t) : a, a;
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
function ye(e, n) {
|
|
24
|
-
const t = j(n);
|
|
25
|
-
return Object.keys(e).reduce((o, a) => (o[a] && z(o[a]) && z(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), t), t;
|
|
18
|
+
function pe(e, n) {
|
|
19
|
+
const t = H(n);
|
|
20
|
+
return Object.keys(t).reduce((s, i) => (s[i] && j(s[i]) && j(e[i] || !e[i]) ? Object.assign(s[i], e[i] || {}) : s[i] = e[i], s), t), t;
|
|
26
21
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(e).filter((
|
|
29
|
-
if (n.has(
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
22
|
+
function me(e, n) {
|
|
23
|
+
return Object.keys(e).filter((s) => e[s] != null).reduce((s, i) => {
|
|
24
|
+
if (n.has(i)) {
|
|
25
|
+
const a = n.get(i);
|
|
26
|
+
if (typeof a == "string")
|
|
27
|
+
s[a] = e[i];
|
|
33
28
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
29
|
+
const r = a(i, e[i], e);
|
|
30
|
+
Object.assign(s, r);
|
|
36
31
|
}
|
|
37
32
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
33
|
+
s[i] = e[i];
|
|
34
|
+
return s;
|
|
40
35
|
}, {});
|
|
41
36
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
return
|
|
37
|
+
function fe(e, n, t = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const s = pe(e, n);
|
|
39
|
+
return me(s, t);
|
|
45
40
|
}
|
|
46
|
-
function
|
|
47
|
-
function n(
|
|
48
|
-
if (typeof
|
|
49
|
-
return d[
|
|
50
|
-
if (typeof
|
|
51
|
-
const m = Object.keys(
|
|
41
|
+
function ye(e = {}) {
|
|
42
|
+
function n(l, c, o, d) {
|
|
43
|
+
if (typeof o == "number")
|
|
44
|
+
return d[l].length === o;
|
|
45
|
+
if (typeof o == "object") {
|
|
46
|
+
const m = Object.keys(o)[0], u = o[m];
|
|
52
47
|
if (m === "not")
|
|
53
|
-
return Number(d[
|
|
48
|
+
return Number(d[l].length) !== Number(u);
|
|
54
49
|
if (m === "moreThan")
|
|
55
|
-
return Number(d[
|
|
50
|
+
return Number(d[l].length) >= Number(u);
|
|
56
51
|
if (m === "lessThan")
|
|
57
|
-
return Number(d[
|
|
52
|
+
return Number(d[l].length) <= Number(u);
|
|
58
53
|
}
|
|
59
54
|
return !1;
|
|
60
55
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return d[
|
|
56
|
+
function t(l, c, o, d) {
|
|
57
|
+
return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(o);
|
|
63
58
|
}
|
|
64
|
-
const
|
|
59
|
+
const s = /* @__PURE__ */ new Map([
|
|
65
60
|
["length", n],
|
|
66
61
|
["getProperty", t]
|
|
67
62
|
]);
|
|
68
|
-
Object.keys(e).reduce((
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
return typeof c == "number" ? [{ target:
|
|
63
|
+
Object.keys(e).reduce((l, c) => (l.set(c, e[c]), l), s);
|
|
64
|
+
function i(l, c) {
|
|
65
|
+
const o = l;
|
|
66
|
+
return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: l, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
|
|
72
67
|
if (d === "length")
|
|
73
|
-
return { target:
|
|
74
|
-
const m = d,
|
|
75
|
-
return { target:
|
|
68
|
+
return { target: o, operator: "length", param: null, value: c[d] };
|
|
69
|
+
const m = d, u = c[d];
|
|
70
|
+
return { target: o, operator: "getProperty", param: m, value: u };
|
|
76
71
|
}) : [];
|
|
77
72
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const m =
|
|
81
|
-
return
|
|
73
|
+
function a(l) {
|
|
74
|
+
return Object.keys(l).reduce((o, d) => {
|
|
75
|
+
const m = i(d, l[d]);
|
|
76
|
+
return o.push(...m), o;
|
|
82
77
|
}, []);
|
|
83
78
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
79
|
+
function r(l, c) {
|
|
80
|
+
if (s.has(l.operator)) {
|
|
81
|
+
const o = s.get(l.operator);
|
|
82
|
+
return o && o(l.target, l.param, l.value, c) || !1;
|
|
88
83
|
}
|
|
89
84
|
return !1;
|
|
90
85
|
}
|
|
91
|
-
function f(
|
|
92
|
-
return
|
|
86
|
+
function f(l, c) {
|
|
87
|
+
return a(l).reduce((m, u) => m && r(u, c), !0);
|
|
93
88
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
return d ? !
|
|
89
|
+
function p(l, c) {
|
|
90
|
+
const o = Object.keys(l), d = o.includes("allOf"), m = o.includes("anyOf"), u = d || m, b = (u ? l[u ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((k) => f(k, c));
|
|
91
|
+
return d ? !b.includes(!1) : b.includes(!0);
|
|
97
92
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: p };
|
|
99
94
|
}
|
|
100
|
-
const
|
|
95
|
+
const y = {
|
|
101
96
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
102
97
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
103
98
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -135,25 +130,26 @@ const h = {
|
|
|
135
130
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
136
131
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
132
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
133
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
134
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
135
|
+
}, ge = {}, he = {};
|
|
136
|
+
ye();
|
|
137
|
+
function be(e, n, t = /* @__PURE__ */ new Map(), s = (r, f, p, l) => f, i = {}, a = (r) => r) {
|
|
138
|
+
return ce[n.title] = n, de[n.title] = s, ge[n.title] = i, he[n.title] = a, (r = {}) => {
|
|
139
|
+
const f = fe(r, n, t), p = Object.keys(e).reduce((l, c) => (l[c] = e[c].default, l), {});
|
|
140
|
+
return Object.assign(p, f);
|
|
145
141
|
};
|
|
146
142
|
}
|
|
147
|
-
function
|
|
143
|
+
function ve(e, n) {
|
|
148
144
|
return { customClass: n.class, customStyle: n.style };
|
|
149
145
|
}
|
|
150
|
-
const
|
|
151
|
-
["appearance",
|
|
146
|
+
const Ce = /* @__PURE__ */ new Map([
|
|
147
|
+
["appearance", ve]
|
|
152
148
|
]);
|
|
153
|
-
function
|
|
149
|
+
function we(e, n, t) {
|
|
154
150
|
return n;
|
|
155
151
|
}
|
|
156
|
-
const
|
|
152
|
+
const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-design.gitee.io/input-group.schema.json", Te = "input-group", Me = "A Farris Input Component", ke = "object", xe = {
|
|
157
153
|
id: {
|
|
158
154
|
description: "The unique identifier for a Input Group",
|
|
159
155
|
type: "string"
|
|
@@ -215,11 +211,6 @@ const ke = "https://json-schema.org/draft/2020-12/schema", Se = "https://farris-
|
|
|
215
211
|
type: "boolean",
|
|
216
212
|
default: !1
|
|
217
213
|
},
|
|
218
|
-
required: {
|
|
219
|
-
description: "",
|
|
220
|
-
type: "boolean",
|
|
221
|
-
default: !1
|
|
222
|
-
},
|
|
223
214
|
tabIndex: {
|
|
224
215
|
description: "",
|
|
225
216
|
type: "number",
|
|
@@ -355,18 +346,24 @@ const ke = "https://json-schema.org/draft/2020-12/schema", Se = "https://farris-
|
|
|
355
346
|
type: "string",
|
|
356
347
|
default: ""
|
|
357
348
|
}
|
|
358
|
-
},
|
|
349
|
+
}, Se = [
|
|
359
350
|
"id",
|
|
360
351
|
"type"
|
|
361
|
-
],
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
352
|
+
], Ee = [
|
|
353
|
+
"id",
|
|
354
|
+
"appearance",
|
|
355
|
+
"binding",
|
|
356
|
+
"visible"
|
|
357
|
+
], Fe = {
|
|
358
|
+
$schema: Ie,
|
|
359
|
+
$id: Be,
|
|
360
|
+
title: Te,
|
|
361
|
+
description: Me,
|
|
362
|
+
type: ke,
|
|
363
|
+
properties: xe,
|
|
364
|
+
required: Se,
|
|
365
|
+
ignore: Ee
|
|
366
|
+
}, G = {
|
|
370
367
|
id: { Type: String, default: "" },
|
|
371
368
|
/** 是否自动完成 */
|
|
372
369
|
autocomplete: { Type: String, default: "off" },
|
|
@@ -433,520 +430,311 @@ const ke = "https://json-schema.org/draft/2020-12/schema", Se = "https://farris-
|
|
|
433
430
|
* - input: 输入时更新
|
|
434
431
|
*/
|
|
435
432
|
updateOn: { type: String, default: "blur" }
|
|
436
|
-
},
|
|
437
|
-
function
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
"f-utils-fill": !0,
|
|
441
|
-
"text-left": i.value === "left",
|
|
442
|
-
"text-center": i.value === "center",
|
|
443
|
-
"text-right": i.value === "right"
|
|
444
|
-
})), T = g(() => {
|
|
445
|
-
const v = {
|
|
446
|
-
"f-cmp-inputgroup": !0,
|
|
447
|
-
"input-group": !0,
|
|
448
|
-
"f-state-disable": a.value,
|
|
449
|
-
"f-state-editable": l.value,
|
|
450
|
-
"f-state-readonly": y.value,
|
|
451
|
-
"f-state-focus": d.value
|
|
452
|
-
};
|
|
453
|
-
return (e.customClass || "").split(" ").reduce((W, le) => (W[le] = !0, W), v), v;
|
|
454
|
-
}), F = g(() => f.value ? "" : "border-width : 0 ");
|
|
455
|
-
function S(v, P = !0) {
|
|
456
|
-
t.value = v, o.value !== v && (o.value = v), P && n.emit("change", v), n.emit("update:modelValue", v), n.emit("update:value", v);
|
|
457
|
-
}
|
|
458
|
-
x(
|
|
459
|
-
() => e.modelValue,
|
|
460
|
-
(v, P) => {
|
|
461
|
-
v !== P && (t.value = v, o.value = v);
|
|
462
|
-
}
|
|
463
|
-
), x(() => e.disabled, (v, P) => {
|
|
464
|
-
v !== P && (a.value = v);
|
|
465
|
-
});
|
|
466
|
-
function C(v) {
|
|
467
|
-
return s.value = !1, n.emit("blur", v), v.stopPropagation(), !1;
|
|
468
|
-
}
|
|
469
|
-
function I(v) {
|
|
470
|
-
n.emit("click", v);
|
|
471
|
-
}
|
|
472
|
-
function k(v) {
|
|
473
|
-
e.disabled || (f.value && (s.value = !0), c.value && n.emit("focus", v));
|
|
474
|
-
}
|
|
475
|
-
function A(v) {
|
|
476
|
-
n.emit("input", v.target.value);
|
|
477
|
-
const P = v.target.value;
|
|
478
|
-
o.value = P, r.value === "change" && (n.emit("update:modelValue", P), n.emit("update:value", P));
|
|
479
|
-
}
|
|
480
|
-
function D(v) {
|
|
481
|
-
n.emit("keydown", v);
|
|
482
|
-
}
|
|
483
|
-
function G(v) {
|
|
484
|
-
n.emit("keyup", v);
|
|
485
|
-
}
|
|
486
|
-
function oe(v) {
|
|
487
|
-
v.target.tagName !== "INPUT" && v.preventDefault(), v.stopPropagation();
|
|
488
|
-
}
|
|
489
|
-
function ae(v) {
|
|
490
|
-
if (r.value === "blur") {
|
|
491
|
-
const P = v.target.value;
|
|
492
|
-
v.stopPropagation(), S(P);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
return {
|
|
496
|
-
changeTextBoxValue: S,
|
|
497
|
-
disabled: a,
|
|
498
|
-
displayText: o,
|
|
499
|
-
editable: l,
|
|
500
|
-
hasFocused: d,
|
|
501
|
-
inputGroupClass: T,
|
|
502
|
-
inputType: u,
|
|
503
|
-
isEmpty: m,
|
|
504
|
-
modelValue: t,
|
|
505
|
-
readonly: y,
|
|
506
|
-
onBlur: C,
|
|
507
|
-
onClick: I,
|
|
508
|
-
onFocus: k,
|
|
509
|
-
onInput: A,
|
|
510
|
-
onKeydown: D,
|
|
511
|
-
onKeyup: G,
|
|
512
|
-
onMousedown: oe,
|
|
513
|
-
onTextBoxValueChange: ae,
|
|
514
|
-
placeholder: p,
|
|
515
|
-
textBoxClass: w,
|
|
516
|
-
textBoxTitle: B,
|
|
517
|
-
inputGroupStyle: F
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
function Le(e, n, t, o) {
|
|
521
|
-
const a = b(e.disabled), s = b(!1), u = b("text"), f = b(e.showBorder), i = b(e.textAlign);
|
|
522
|
-
g(() => e.editable || !e.readonly);
|
|
523
|
-
const r = g(() => e.editable && !e.disabled && !e.readonly), c = g(() => !e.disabled && s.value), l = g(() => t.value === "" || t.value === null || t.value === void 0), d = g(() => e.placeholder), m = g(() => e.readonly || !e.editable), p = g(() => e.enableTitle ? t.value : ""), y = g(() => ({
|
|
524
|
-
"form-control": !0,
|
|
525
|
-
// 'f-utils-fill': true,
|
|
526
|
-
"text-left": i.value === "left",
|
|
527
|
-
"text-center": i.value === "center",
|
|
528
|
-
"text-right": i.value === "right"
|
|
529
|
-
})), B = g(() => ({
|
|
530
|
-
"f-cmp-inputgroup": !0,
|
|
531
|
-
"input-group": !0,
|
|
532
|
-
"f-state-disable": !0,
|
|
533
|
-
"f-state-editable": !1,
|
|
534
|
-
"f-state-readonly": !0
|
|
535
|
-
// 'f-state-focus': hasFocused.value
|
|
536
|
-
})), w = g(() => f.value ? "" : "border-width : 0 ");
|
|
537
|
-
return {
|
|
538
|
-
// changeTextBoxValue,
|
|
539
|
-
disabled: a,
|
|
540
|
-
displayText: o,
|
|
541
|
-
editable: r,
|
|
542
|
-
hasFocused: c,
|
|
543
|
-
inputGroupClass: B,
|
|
544
|
-
inputType: u,
|
|
545
|
-
isEmpty: l,
|
|
546
|
-
modelValue: t,
|
|
547
|
-
readonly: m,
|
|
548
|
-
// onBlur,
|
|
549
|
-
// onClick,
|
|
550
|
-
// onFocus,
|
|
551
|
-
// onInput,
|
|
552
|
-
// onKeydown,
|
|
553
|
-
// onKeyup,
|
|
554
|
-
// onMousedown,
|
|
555
|
-
// onTextBoxValueChange,
|
|
556
|
-
placeholder: d,
|
|
557
|
-
textBoxClass: y,
|
|
558
|
-
textBoxTitle: p,
|
|
559
|
-
inputGroupStyle: w
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
function R(e, n, t) {
|
|
563
|
-
const o = b(!1), a = g(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: s, displayText: u, hasFocused: f, isEmpty: i } = t;
|
|
564
|
-
function r(y) {
|
|
565
|
-
o.value = y;
|
|
566
|
-
}
|
|
567
|
-
x(u, () => {
|
|
568
|
-
f != null && f.value ? r(!!(u != null && u.value)) : r(!1);
|
|
569
|
-
});
|
|
570
|
-
const c = g(() => ({
|
|
571
|
-
"input-group-text": !0,
|
|
572
|
-
"input-group-clear": !0
|
|
573
|
-
})), l = g(() => ({
|
|
574
|
-
width: "24px",
|
|
575
|
-
display: o.value ? "flex" : "none"
|
|
576
|
-
}));
|
|
577
|
-
function d(y) {
|
|
578
|
-
y.stopPropagation(), a.value && (s("", !0), r(!o.value), n.emit("clear"));
|
|
579
|
-
}
|
|
580
|
-
function m(y) {
|
|
581
|
-
a.value && !i.value && r(!0);
|
|
582
|
-
}
|
|
583
|
-
function p(y) {
|
|
584
|
-
a.value && r(!1);
|
|
585
|
-
}
|
|
586
|
-
return { clearButtonClass: c, clearButtonStyle: l, hasShownClearButton: o, onClearValue: d, onMouseEnter: m, onMouseLeave: p, shouldShowClearButton: a };
|
|
587
|
-
}
|
|
588
|
-
const Ne = ["moz", "ms", "webkit"];
|
|
589
|
-
function Ve() {
|
|
590
|
-
let e = 0;
|
|
591
|
-
return (n) => {
|
|
592
|
-
const t = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (t - e)), a = setTimeout(() => {
|
|
593
|
-
n(t + o);
|
|
594
|
-
}, o);
|
|
595
|
-
return e = t + o, a;
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
function Oe() {
|
|
599
|
-
if (typeof window > "u")
|
|
600
|
-
return () => 0;
|
|
601
|
-
if (window.requestAnimationFrame)
|
|
602
|
-
return window.requestAnimationFrame.bind(window);
|
|
603
|
-
const e = Ne.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
604
|
-
return e ? window[`${e}RequestAnimationFrame`] : Ve();
|
|
605
|
-
}
|
|
606
|
-
Oe();
|
|
607
|
-
const Ge = (e) => {
|
|
608
|
-
const n = e;
|
|
609
|
-
return n.install = function(t) {
|
|
610
|
-
t.component(n.name, e);
|
|
611
|
-
}, e;
|
|
612
|
-
};
|
|
613
|
-
function ee(e, n) {
|
|
614
|
-
const t = b(e.groupText), o = g(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = g(() => e.enableClear || !!e.groupText);
|
|
615
|
-
return { appendedButtonClass: g(() => ({
|
|
433
|
+
}, z = be(G, Fe, Ce, we);
|
|
434
|
+
function X(e, n) {
|
|
435
|
+
const t = B(e.groupText), s = T(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), i = T(() => e.enableClear || !!e.groupText);
|
|
436
|
+
return { appendedButtonClass: T(() => ({
|
|
616
437
|
"input-group-append": !0,
|
|
617
|
-
"append-force-show":
|
|
618
|
-
})), appendedContent: t, shouldShowAppendedButton:
|
|
438
|
+
"append-force-show": s.value
|
|
439
|
+
})), appendedContent: t, shouldShowAppendedButton: i };
|
|
619
440
|
}
|
|
620
|
-
function
|
|
621
|
-
const { appendedContent:
|
|
622
|
-
|
|
623
|
-
|
|
441
|
+
function Q(e, n, t, s) {
|
|
442
|
+
const { appendedContent: i } = s, a = B(e.enableViewPassword), r = T(() => e.type === "password"), f = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', p = '<span class="f-icon f-icon-eye"></span>', l = B(!1);
|
|
443
|
+
F(() => [e.readonly, e.disabled], ([d, m]) => {
|
|
444
|
+
r.value && (t.value = d || m ? "password" : t.value, i.value = d || m ? p : i.value);
|
|
624
445
|
});
|
|
625
446
|
function c() {
|
|
626
|
-
return
|
|
447
|
+
return l.value = !l.value, t.value = l.value ? "text" : "password", i.value = l.value ? f : p, !1;
|
|
627
448
|
}
|
|
628
|
-
function
|
|
629
|
-
t.value =
|
|
449
|
+
function o() {
|
|
450
|
+
t.value = r.value ? "password" : "text", i.value = r.value ? a.value ? p : "" : i.value;
|
|
630
451
|
}
|
|
631
|
-
return
|
|
452
|
+
return o(), { isPassword: r, onClickAppendedButton: c };
|
|
632
453
|
}
|
|
633
|
-
function
|
|
634
|
-
const
|
|
635
|
-
onBlurTextBox:
|
|
636
|
-
onFocusTextBox:
|
|
637
|
-
onInput:
|
|
454
|
+
function Le(e, n, t) {
|
|
455
|
+
const s = B(), {
|
|
456
|
+
onBlurTextBox: i,
|
|
457
|
+
onFocusTextBox: a,
|
|
458
|
+
onInput: r,
|
|
638
459
|
onKeyDown: f,
|
|
639
|
-
textBoxValue:
|
|
640
|
-
} = t,
|
|
460
|
+
textBoxValue: p
|
|
461
|
+
} = t, l = T(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), c = T(() => ({
|
|
641
462
|
"form-control": !0,
|
|
642
463
|
"f-utils-fill": !0
|
|
643
|
-
})),
|
|
464
|
+
})), o = T(() => ({
|
|
644
465
|
"text-align": e.textAlign
|
|
645
466
|
}));
|
|
646
|
-
function d(
|
|
647
|
-
|
|
467
|
+
function d(g) {
|
|
468
|
+
g.stopPropagation();
|
|
648
469
|
}
|
|
649
470
|
function m() {
|
|
650
471
|
e.selectOnCreated, e.focusOnCreated;
|
|
651
472
|
}
|
|
652
|
-
async function
|
|
653
|
-
|
|
473
|
+
async function u(g) {
|
|
474
|
+
a(g), await N, m();
|
|
654
475
|
}
|
|
655
|
-
return
|
|
656
|
-
await
|
|
657
|
-
}), () =>
|
|
658
|
-
ref:
|
|
476
|
+
return L(async () => {
|
|
477
|
+
await N, m();
|
|
478
|
+
}), () => w("input", {
|
|
479
|
+
ref: s,
|
|
659
480
|
class: c.value,
|
|
660
|
-
style:
|
|
481
|
+
style: o.value,
|
|
661
482
|
type: "text",
|
|
662
|
-
value:
|
|
483
|
+
value: p.value,
|
|
663
484
|
disabled: e.disabled,
|
|
664
485
|
readonly: e.readonly || !e.editable,
|
|
665
|
-
placeholder:
|
|
666
|
-
onBlur:
|
|
486
|
+
placeholder: l.value,
|
|
487
|
+
onBlur: i,
|
|
667
488
|
onChange: d,
|
|
668
|
-
onFocus:
|
|
669
|
-
onInput:
|
|
489
|
+
onFocus: u,
|
|
490
|
+
onInput: r,
|
|
670
491
|
onKeydown: f
|
|
671
492
|
}, null);
|
|
672
493
|
}
|
|
673
|
-
function
|
|
494
|
+
function Pe(e, n, t) {
|
|
674
495
|
const {
|
|
675
|
-
canDownward:
|
|
676
|
-
canUpward:
|
|
677
|
-
onClickDownButton:
|
|
678
|
-
onClickUpButton:
|
|
679
|
-
} = t, f =
|
|
496
|
+
canDownward: s,
|
|
497
|
+
canUpward: i,
|
|
498
|
+
onClickDownButton: a,
|
|
499
|
+
onClickUpButton: r
|
|
500
|
+
} = t, f = T(() => ({
|
|
680
501
|
"input-group-append": !0,
|
|
681
502
|
"btn-group": !0,
|
|
682
503
|
"btn-group-number": !0
|
|
683
|
-
})),
|
|
504
|
+
})), p = T(() => ({
|
|
684
505
|
btn: !0,
|
|
685
506
|
"btn-secondary": !0,
|
|
686
507
|
"btn-number-flag": !0
|
|
687
|
-
})),
|
|
688
|
-
cursor:
|
|
508
|
+
})), l = T(() => ({
|
|
509
|
+
cursor: i() ? "pointer" : "not-allowed",
|
|
689
510
|
"margin-left": 0
|
|
690
|
-
})), c =
|
|
691
|
-
cursor:
|
|
511
|
+
})), c = T(() => ({
|
|
512
|
+
cursor: s() ? "pointer" : "not-allowed",
|
|
692
513
|
"margin-left": 0
|
|
693
514
|
}));
|
|
694
|
-
return () =>
|
|
515
|
+
return () => w("div", {
|
|
695
516
|
class: f.value
|
|
696
|
-
}, [
|
|
517
|
+
}, [w("button", {
|
|
697
518
|
title: "upButton",
|
|
698
|
-
class:
|
|
699
|
-
style:
|
|
700
|
-
onClick:
|
|
701
|
-
disabled: !
|
|
702
|
-
}, [
|
|
519
|
+
class: p.value,
|
|
520
|
+
style: l.value,
|
|
521
|
+
onClick: r,
|
|
522
|
+
disabled: !i()
|
|
523
|
+
}, [w("span", {
|
|
703
524
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
704
|
-
}, null)]),
|
|
525
|
+
}, null)]), w("button", {
|
|
705
526
|
title: "downButton",
|
|
706
|
-
class:
|
|
527
|
+
class: p.value,
|
|
707
528
|
style: c.value,
|
|
708
|
-
onClick:
|
|
709
|
-
disabled: !
|
|
710
|
-
}, [
|
|
529
|
+
onClick: a,
|
|
530
|
+
disabled: !s()
|
|
531
|
+
}, [w("span", {
|
|
711
532
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
712
533
|
}, null)])]);
|
|
713
534
|
}
|
|
714
|
-
function
|
|
715
|
-
const t =
|
|
535
|
+
function Ae(e, n) {
|
|
536
|
+
const t = se(e, n), s = le(e, n, t), i = re(e, n, s, t), a = ae(e, n, s, t, i), r = Pe(e, n, i), {
|
|
716
537
|
displayValue: f,
|
|
717
|
-
modelValue:
|
|
718
|
-
getRealValue:
|
|
719
|
-
} = t, c =
|
|
720
|
-
format:
|
|
721
|
-
} =
|
|
538
|
+
modelValue: p,
|
|
539
|
+
getRealValue: l
|
|
540
|
+
} = t, c = Le(e, n, a), {
|
|
541
|
+
format: o
|
|
542
|
+
} = s, {
|
|
722
543
|
isFocus: d
|
|
723
|
-
} =
|
|
724
|
-
return
|
|
725
|
-
const
|
|
726
|
-
f.value =
|
|
727
|
-
}),
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
}),
|
|
731
|
-
|
|
732
|
-
}),
|
|
733
|
-
f.value =
|
|
734
|
-
}), () =>
|
|
544
|
+
} = a, m = T(() => !e.disabled && !e.readonly);
|
|
545
|
+
return L(() => {
|
|
546
|
+
const u = l(e.modelValue);
|
|
547
|
+
f.value = o(u);
|
|
548
|
+
}), F(() => [e.value], ([u]) => {
|
|
549
|
+
const g = l(u);
|
|
550
|
+
p.value = g, f.value = o(g);
|
|
551
|
+
}), F(() => [e.modelValue], ([u]) => {
|
|
552
|
+
u !== p.value && (p.value = u, !d.value && (f.value = o(l(u))));
|
|
553
|
+
}), F(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
554
|
+
f.value = o(p.value);
|
|
555
|
+
}), () => w("div", {
|
|
735
556
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
736
|
-
}, [c(), m.value &&
|
|
557
|
+
}, [c(), m.value && r()]);
|
|
737
558
|
}
|
|
738
|
-
function
|
|
739
|
-
const
|
|
559
|
+
function Ve(e, n, t, s) {
|
|
560
|
+
const i = B(), a = B(e.autocomplete), r = B(e.enableTitle), {
|
|
740
561
|
isPassword: f
|
|
741
|
-
} = t,
|
|
742
|
-
disabled:
|
|
562
|
+
} = t, p = B(e.minLength), l = B(e.maxLength), c = B(e.tabIndex), {
|
|
563
|
+
disabled: o,
|
|
743
564
|
displayText: d,
|
|
744
565
|
inputType: m,
|
|
745
|
-
onBlur:
|
|
746
|
-
onFocus:
|
|
747
|
-
onInput:
|
|
748
|
-
onClick:
|
|
749
|
-
onKeydown:
|
|
750
|
-
onKeyup:
|
|
751
|
-
onMousedown:
|
|
752
|
-
onTextBoxValueChange:
|
|
753
|
-
readonly:
|
|
754
|
-
placeholder:
|
|
755
|
-
textBoxClass:
|
|
756
|
-
textBoxTitle:
|
|
757
|
-
} =
|
|
758
|
-
return
|
|
566
|
+
onBlur: u,
|
|
567
|
+
onFocus: g,
|
|
568
|
+
onInput: v,
|
|
569
|
+
onClick: b,
|
|
570
|
+
onKeydown: C,
|
|
571
|
+
onKeyup: k,
|
|
572
|
+
onMousedown: M,
|
|
573
|
+
onTextBoxValueChange: x,
|
|
574
|
+
readonly: S,
|
|
575
|
+
placeholder: I,
|
|
576
|
+
textBoxClass: V,
|
|
577
|
+
textBoxTitle: O
|
|
578
|
+
} = s;
|
|
579
|
+
return L(() => {
|
|
759
580
|
e.selectOnCreated, e.focusOnCreated;
|
|
760
|
-
}), () =>
|
|
761
|
-
ref:
|
|
581
|
+
}), () => w("input", {
|
|
582
|
+
ref: i,
|
|
762
583
|
name: "input-group-value",
|
|
763
|
-
autocomplete:
|
|
764
|
-
class:
|
|
765
|
-
disabled:
|
|
766
|
-
maxlength:
|
|
767
|
-
minlength:
|
|
768
|
-
placeholder:
|
|
769
|
-
readonly:
|
|
584
|
+
autocomplete: a.value,
|
|
585
|
+
class: V.value,
|
|
586
|
+
disabled: o == null ? void 0 : o.value,
|
|
587
|
+
maxlength: l.value,
|
|
588
|
+
minlength: p.value,
|
|
589
|
+
placeholder: I.value,
|
|
590
|
+
readonly: S == null ? void 0 : S.value,
|
|
770
591
|
tabindex: c.value,
|
|
771
|
-
title:
|
|
592
|
+
title: r.value && !f.value ? O.value : "",
|
|
772
593
|
type: m.value,
|
|
773
594
|
value: d == null ? void 0 : d.value,
|
|
774
|
-
onBlur:
|
|
775
|
-
onClick:
|
|
776
|
-
onChange:
|
|
777
|
-
onFocus:
|
|
778
|
-
onInput:
|
|
779
|
-
onKeydown:
|
|
780
|
-
onKeyup:
|
|
781
|
-
onMousedown:
|
|
595
|
+
onBlur: u,
|
|
596
|
+
onClick: b,
|
|
597
|
+
onChange: x,
|
|
598
|
+
onFocus: g,
|
|
599
|
+
onInput: v,
|
|
600
|
+
onKeydown: C,
|
|
601
|
+
onKeyup: k,
|
|
602
|
+
onMousedown: M
|
|
782
603
|
}, null);
|
|
783
604
|
}
|
|
784
|
-
function
|
|
785
|
-
const t =
|
|
605
|
+
function Oe(e, n) {
|
|
606
|
+
const t = T(() => e.useExtendInfo && !!e.extendInfo), s = K({
|
|
786
607
|
content: e.extendInfo
|
|
787
608
|
});
|
|
788
|
-
function
|
|
609
|
+
function i() {
|
|
789
610
|
n.emit("updateExtendInfo");
|
|
790
611
|
}
|
|
791
|
-
return () => t.value &&
|
|
612
|
+
return () => t.value && ee(w("span", {
|
|
792
613
|
class: "input-group-before-tips",
|
|
793
|
-
onMouseenter:
|
|
794
|
-
}, [
|
|
614
|
+
onMouseenter: i
|
|
615
|
+
}, [w("i", {
|
|
795
616
|
class: "f-icon f-icon-info-circle"
|
|
796
|
-
}, null),
|
|
617
|
+
}, null), w("b", {
|
|
797
618
|
class: "tips-arrow"
|
|
798
|
-
}, null)]), [[
|
|
619
|
+
}, null)]), [[te("tooltip"), s]]);
|
|
799
620
|
}
|
|
800
|
-
function
|
|
621
|
+
function Z(e, n, t, s, i) {
|
|
801
622
|
const {
|
|
802
|
-
appendedButtonClass:
|
|
803
|
-
appendedContent:
|
|
804
|
-
} = t, f =
|
|
623
|
+
appendedButtonClass: a,
|
|
624
|
+
appendedContent: r
|
|
625
|
+
} = t, f = T(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), p = T(() => r.value && !n.slots.groupTextTemplate), l = T(() => !!n.slots.groupTextTemplate), {
|
|
805
626
|
clearButtonClass: c,
|
|
806
|
-
clearButtonStyle:
|
|
627
|
+
clearButtonStyle: o,
|
|
807
628
|
onClearValue: d,
|
|
808
629
|
shouldShowClearButton: m
|
|
809
|
-
} =
|
|
810
|
-
function
|
|
811
|
-
return
|
|
630
|
+
} = s;
|
|
631
|
+
function u() {
|
|
632
|
+
return w("span", {
|
|
812
633
|
id: "clearIcon",
|
|
813
634
|
class: c.value,
|
|
814
|
-
style:
|
|
815
|
-
onClick: (
|
|
816
|
-
}, [
|
|
635
|
+
style: o.value,
|
|
636
|
+
onClick: (I) => d(I)
|
|
637
|
+
}, [w("i", {
|
|
817
638
|
class: "f-icon modal_close"
|
|
818
639
|
}, null)]);
|
|
819
640
|
}
|
|
820
|
-
function
|
|
821
|
-
n.emit("iconMouseEnter",
|
|
641
|
+
function g(I) {
|
|
642
|
+
n.emit("iconMouseEnter", I);
|
|
822
643
|
}
|
|
823
|
-
function
|
|
824
|
-
n.emit("iconMouseLeave",
|
|
644
|
+
function v(I) {
|
|
645
|
+
n.emit("iconMouseLeave", I);
|
|
825
646
|
}
|
|
826
|
-
function
|
|
647
|
+
function b(I) {
|
|
827
648
|
f.value && n.emit("clickHandle", {
|
|
828
|
-
originalEvent:
|
|
829
|
-
}),
|
|
649
|
+
originalEvent: I
|
|
650
|
+
}), I.stopPropagation();
|
|
830
651
|
}
|
|
831
|
-
const
|
|
832
|
-
function
|
|
833
|
-
return
|
|
652
|
+
const C = e.type === "password" ? i.onClickAppendedButton : b;
|
|
653
|
+
function k() {
|
|
654
|
+
return w("span", {
|
|
834
655
|
class: "input-group-text",
|
|
835
|
-
onMouseenter: (
|
|
836
|
-
onMouseleave: (
|
|
837
|
-
innerHTML:
|
|
838
|
-
onClick: (
|
|
656
|
+
onMouseenter: (I) => g(I),
|
|
657
|
+
onMouseleave: (I) => v(I),
|
|
658
|
+
innerHTML: r.value,
|
|
659
|
+
onClick: (I) => C(I)
|
|
839
660
|
}, null);
|
|
840
661
|
}
|
|
841
|
-
function
|
|
662
|
+
function M() {
|
|
842
663
|
return n.slots.groupTextTemplate && n.slots.groupTextTemplate();
|
|
843
664
|
}
|
|
844
|
-
function
|
|
845
|
-
return
|
|
665
|
+
function x() {
|
|
666
|
+
return p.value ? k : l.value ? M : "";
|
|
846
667
|
}
|
|
847
|
-
const
|
|
848
|
-
return () =>
|
|
849
|
-
class:
|
|
850
|
-
}, [m.value &&
|
|
668
|
+
const S = x();
|
|
669
|
+
return () => w("div", {
|
|
670
|
+
class: a.value
|
|
671
|
+
}, [m.value && u(), S && S()]);
|
|
851
672
|
}
|
|
852
|
-
const
|
|
673
|
+
const P = /* @__PURE__ */ W({
|
|
853
674
|
name: "FInputGroup",
|
|
854
|
-
props:
|
|
675
|
+
props: G,
|
|
855
676
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
856
677
|
setup(e, n) {
|
|
857
|
-
const t =
|
|
858
|
-
inputGroupClass:
|
|
859
|
-
inputType:
|
|
678
|
+
const t = B(e.modelValue), s = B(e.modelValue), i = ne(e, n, t, s), {
|
|
679
|
+
inputGroupClass: a,
|
|
680
|
+
inputType: r,
|
|
860
681
|
inputGroupStyle: f
|
|
861
|
-
} =
|
|
862
|
-
shouldShowAppendedButton:
|
|
863
|
-
} =
|
|
864
|
-
onMouseEnter:
|
|
682
|
+
} = i, p = X(e), {
|
|
683
|
+
shouldShowAppendedButton: l
|
|
684
|
+
} = p, c = R(e, n, i), {
|
|
685
|
+
onMouseEnter: o,
|
|
865
686
|
onMouseLeave: d
|
|
866
|
-
} = c, m =
|
|
867
|
-
|
|
868
|
-
t.value =
|
|
869
|
-
}),
|
|
870
|
-
t.value =
|
|
871
|
-
}),
|
|
872
|
-
e.value && (t.value = e.value,
|
|
687
|
+
} = c, m = Q(e, n, r, p), u = Ae(e, n), g = Ve(e, n, m, i), v = Z(e, n, p, c, m), b = Oe(e, n), C = T(() => e.type === "number");
|
|
688
|
+
F(() => [e.value], ([M]) => {
|
|
689
|
+
t.value = M, s.value = M;
|
|
690
|
+
}), F(() => [e.modelValue], ([M]) => {
|
|
691
|
+
t.value = M, s.value = M;
|
|
692
|
+
}), L(() => {
|
|
693
|
+
e.value && (t.value = e.value, s.value = e.value);
|
|
873
694
|
});
|
|
874
|
-
const
|
|
695
|
+
const k = () => w(D, null, [w("div", {
|
|
875
696
|
id: e.id,
|
|
876
|
-
class:
|
|
697
|
+
class: a.value,
|
|
877
698
|
style: f.value,
|
|
878
|
-
onMouseenter:
|
|
699
|
+
onMouseenter: o,
|
|
879
700
|
onMouseleave: d
|
|
880
|
-
}, [
|
|
881
|
-
return () =>
|
|
701
|
+
}, [C.value ? u() : w(D, null, [b(), g(), l.value && v()])])]);
|
|
702
|
+
return () => k();
|
|
882
703
|
}
|
|
883
704
|
});
|
|
884
|
-
|
|
885
|
-
e.schema;
|
|
886
|
-
const t = b(!0), o = b(!0);
|
|
887
|
-
function a(l) {
|
|
888
|
-
return !1;
|
|
889
|
-
}
|
|
890
|
-
function s() {
|
|
891
|
-
return !1;
|
|
892
|
-
}
|
|
893
|
-
function u() {
|
|
894
|
-
return !1;
|
|
895
|
-
}
|
|
896
|
-
function f() {
|
|
897
|
-
return !0;
|
|
898
|
-
}
|
|
899
|
-
function i(l) {
|
|
900
|
-
}
|
|
901
|
-
function r() {
|
|
902
|
-
}
|
|
903
|
-
function c(l) {
|
|
904
|
-
return null;
|
|
905
|
-
}
|
|
906
|
-
return {
|
|
907
|
-
canAccepts: a,
|
|
908
|
-
checkCanDeleteComponent: s,
|
|
909
|
-
checkCanMoveComponent: u,
|
|
910
|
-
hideNestedPaddingInDesginerView: f,
|
|
911
|
-
onAcceptMovedChildElement: i,
|
|
912
|
-
resolveComponentContext: r,
|
|
913
|
-
triggerBelongedComponentToMoveWhenMoved: t,
|
|
914
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
915
|
-
getPropsConfig: c
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
class ze {
|
|
705
|
+
class Ge {
|
|
919
706
|
constructor(n, t) {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
707
|
+
h(this, "componentId");
|
|
708
|
+
h(this, "viewModelId");
|
|
709
|
+
h(this, "eventsEditorUtils");
|
|
710
|
+
h(this, "formSchemaUtils");
|
|
711
|
+
h(this, "formMetadataConverter");
|
|
712
|
+
h(this, "designViewModelUtils");
|
|
713
|
+
h(this, "designViewModelField");
|
|
714
|
+
h(this, "controlCreatorUtils");
|
|
715
|
+
h(this, "designerHostService");
|
|
716
|
+
h(this, "schemaService", null);
|
|
717
|
+
h(this, "metadataService", null);
|
|
718
|
+
h(this, "propertyConfig", {
|
|
932
719
|
type: "object",
|
|
933
720
|
categories: {}
|
|
934
721
|
});
|
|
935
|
-
var
|
|
936
|
-
this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
722
|
+
var s;
|
|
723
|
+
this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((s = this.formSchemaUtils) == null ? void 0 : s.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
937
724
|
}
|
|
938
725
|
getTableInfo() {
|
|
939
726
|
var n;
|
|
940
727
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
941
728
|
}
|
|
942
729
|
setDesignViewModelField(n) {
|
|
730
|
+
var s;
|
|
943
731
|
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
944
732
|
if (t) {
|
|
945
733
|
if (!this.designViewModelField) {
|
|
946
|
-
const
|
|
947
|
-
this.designViewModelField =
|
|
734
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
735
|
+
this.designViewModelField = i.fields.find((a) => a.id === t);
|
|
948
736
|
}
|
|
949
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
737
|
+
n.updateOn = (s = this.designViewModelField) == null ? void 0 : s.updateOn;
|
|
950
738
|
}
|
|
951
739
|
}
|
|
952
740
|
changeFieldEditorType(n, t) {
|
|
@@ -970,7 +758,7 @@ class ze {
|
|
|
970
758
|
type: "combo-list",
|
|
971
759
|
textField: "name",
|
|
972
760
|
valueField: "value",
|
|
973
|
-
data: [{ value: n.type, name:
|
|
761
|
+
data: [{ value: n.type, name: y[n.type].name }]
|
|
974
762
|
}
|
|
975
763
|
}
|
|
976
764
|
}
|
|
@@ -1003,19 +791,19 @@ class ze {
|
|
|
1003
791
|
* @returns
|
|
1004
792
|
*/
|
|
1005
793
|
updateElementByParentContainer(n, t) {
|
|
1006
|
-
const
|
|
1007
|
-
if (!
|
|
794
|
+
const s = t && t.parent && t.parent.schema;
|
|
795
|
+
if (!s)
|
|
1008
796
|
return;
|
|
1009
|
-
const
|
|
1010
|
-
|
|
797
|
+
const i = s.contents.findIndex((r) => r.id === n), a = q(s.contents[i]);
|
|
798
|
+
s.contents.splice(i, 1), s.contents.splice(i, 0, a);
|
|
1011
799
|
}
|
|
1012
800
|
}
|
|
1013
|
-
const
|
|
801
|
+
const E = class E {
|
|
1014
802
|
/**
|
|
1015
803
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1016
804
|
*/
|
|
1017
805
|
static getEditorTypesByMDataType(n) {
|
|
1018
|
-
const t =
|
|
806
|
+
const t = E.fieldControlTypeMapping[n];
|
|
1019
807
|
return t || [{ key: "", value: "" }];
|
|
1020
808
|
}
|
|
1021
809
|
/**
|
|
@@ -1023,9 +811,9 @@ const L = class L {
|
|
|
1023
811
|
*/
|
|
1024
812
|
static getAllInputTypes() {
|
|
1025
813
|
const n = [];
|
|
1026
|
-
for (
|
|
1027
|
-
|
|
1028
|
-
n.find((
|
|
814
|
+
for (const t in E.fieldControlTypeMapping)
|
|
815
|
+
E.fieldControlTypeMapping[t].forEach((s) => {
|
|
816
|
+
n.find((i) => i.key === s.key && i.value === s.value) || n.push({ key: s.key, value: s.value });
|
|
1029
817
|
});
|
|
1030
818
|
return n;
|
|
1031
819
|
}
|
|
@@ -1033,176 +821,174 @@ const L = class L {
|
|
|
1033
821
|
/**
|
|
1034
822
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1035
823
|
*/
|
|
1036
|
-
|
|
824
|
+
h(E, "fieldControlTypeMapping", {
|
|
1037
825
|
String: [
|
|
1038
|
-
{ key:
|
|
1039
|
-
{ key:
|
|
1040
|
-
{ key:
|
|
1041
|
-
{ key:
|
|
1042
|
-
{ key:
|
|
1043
|
-
{ key:
|
|
1044
|
-
{ key:
|
|
1045
|
-
{ key:
|
|
826
|
+
{ key: y["input-group"].type, value: y["input-group"].name },
|
|
827
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
828
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name },
|
|
829
|
+
{ key: y["check-box"].type, value: y["check-box"].name },
|
|
830
|
+
{ key: y["check-group"].type, value: y["check-group"].name },
|
|
831
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name },
|
|
832
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
833
|
+
{ key: y.textarea.type, value: y.textarea.name }
|
|
1046
834
|
],
|
|
1047
835
|
Text: [
|
|
1048
|
-
{ key:
|
|
1049
|
-
{ key:
|
|
836
|
+
{ key: y.textarea.type, value: y.textarea.name },
|
|
837
|
+
{ key: y.lookup.type, value: y.lookup.name }
|
|
1050
838
|
],
|
|
1051
839
|
Decimal: [
|
|
1052
|
-
{ key:
|
|
840
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
1053
841
|
],
|
|
1054
842
|
Integer: [
|
|
1055
|
-
{ key:
|
|
843
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
1056
844
|
],
|
|
1057
845
|
Number: [
|
|
1058
|
-
{ key:
|
|
846
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
1059
847
|
],
|
|
1060
848
|
BigNumber: [
|
|
1061
|
-
{ key:
|
|
849
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
1062
850
|
],
|
|
1063
851
|
Date: [
|
|
1064
|
-
{ key:
|
|
852
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
1065
853
|
],
|
|
1066
854
|
DateTime: [
|
|
1067
|
-
{ key:
|
|
855
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
1068
856
|
],
|
|
1069
857
|
Boolean: [
|
|
1070
|
-
{ key:
|
|
1071
|
-
{ key:
|
|
858
|
+
{ key: y.switch.type, value: y.switch.name },
|
|
859
|
+
{ key: y["check-box"].type, value: y["check-box"].name }
|
|
1072
860
|
],
|
|
1073
861
|
Enum: [
|
|
1074
|
-
{ key:
|
|
1075
|
-
{ key:
|
|
862
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
863
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
1076
864
|
],
|
|
1077
865
|
Object: [
|
|
1078
|
-
{ key:
|
|
1079
|
-
{ key:
|
|
1080
|
-
{ key:
|
|
866
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
867
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
868
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
1081
869
|
]
|
|
1082
870
|
});
|
|
1083
|
-
let
|
|
1084
|
-
const
|
|
1085
|
-
class
|
|
871
|
+
let A = E;
|
|
872
|
+
const Ne = B(0);
|
|
873
|
+
class De {
|
|
1086
874
|
constructor() {
|
|
1087
875
|
/** 控件标题 */
|
|
1088
|
-
|
|
876
|
+
h(this, "label", "");
|
|
1089
877
|
/** 控件id */
|
|
1090
|
-
|
|
878
|
+
h(this, "id", "");
|
|
1091
879
|
/** 每个控件占用的栅格数 */
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
880
|
+
h(this, "columnInSM", 12);
|
|
881
|
+
h(this, "columnInMD", 6);
|
|
882
|
+
h(this, "columnInLG", 3);
|
|
883
|
+
h(this, "columnInEL", 2);
|
|
1096
884
|
/** 每个控件占用的列数 */
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
885
|
+
h(this, "displayWidthInSM", 1);
|
|
886
|
+
h(this, "displayWidthInMD", 1);
|
|
887
|
+
h(this, "displayWidthInLG", 1);
|
|
888
|
+
h(this, "displayWidthInEL", 1);
|
|
1101
889
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1102
|
-
|
|
890
|
+
h(this, "displayColumnCountAtBreakPoint", "md");
|
|
1103
891
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1104
|
-
|
|
892
|
+
h(this, "tagRow", 0);
|
|
1105
893
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1106
|
-
|
|
894
|
+
h(this, "showTopBorder", 0);
|
|
1107
895
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1108
|
-
|
|
896
|
+
h(this, "group", 1);
|
|
1109
897
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1110
|
-
|
|
898
|
+
h(this, "isSupportedClass", !0);
|
|
1111
899
|
/** 控件所在分组id(设计器用的) */
|
|
1112
|
-
|
|
900
|
+
h(this, "fieldSetId", "");
|
|
1113
901
|
}
|
|
1114
902
|
}
|
|
1115
|
-
function
|
|
903
|
+
function Ue(e) {
|
|
1116
904
|
let n, t;
|
|
1117
|
-
const
|
|
1118
|
-
let
|
|
1119
|
-
function
|
|
1120
|
-
const m = c.split(" ").filter((
|
|
905
|
+
const s = /* @__PURE__ */ new Map();
|
|
906
|
+
let i = [];
|
|
907
|
+
function a(c, o) {
|
|
908
|
+
const m = c.split(" ").filter((C) => C.startsWith("col-"));
|
|
1121
909
|
if (m.length === 0) {
|
|
1122
|
-
|
|
910
|
+
o.isSupportedClass = !1;
|
|
1123
911
|
return;
|
|
1124
912
|
}
|
|
1125
|
-
let
|
|
1126
|
-
|
|
1127
|
-
}
|
|
1128
|
-
function
|
|
1129
|
-
let
|
|
1130
|
-
c.contents.forEach((
|
|
1131
|
-
if (
|
|
1132
|
-
d += 1,
|
|
913
|
+
let u = m.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), g = m.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), v = m.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), b = m.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
914
|
+
u = u || "col-12", o.columnInSM = parseInt(u.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), g = g || "col-md-" + o.columnInSM, o.columnInMD = parseInt(g.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), v = v || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(v.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
915
|
+
}
|
|
916
|
+
function r(c, o, d, m = !1) {
|
|
917
|
+
let u = !1;
|
|
918
|
+
c.contents.forEach((g) => {
|
|
919
|
+
if (g.type === "fieldset") {
|
|
920
|
+
d += 1, r(g, o, d, !0), u = !0;
|
|
1133
921
|
return;
|
|
1134
922
|
}
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
|
|
923
|
+
u && (d += 1, u = !1);
|
|
924
|
+
const v = g.appearance && g.appearance.class, b = new De();
|
|
925
|
+
v ? a(v, b) : b.isSupportedClass = !1, b.label = g.label || g.id, b.id = g.id, b.group = d, m && (b.fieldSetId = c.id), t === g.id && (n = d), s.set(g.id, g), o.push(b);
|
|
1138
926
|
});
|
|
1139
927
|
}
|
|
1140
928
|
function f(c) {
|
|
1141
|
-
const
|
|
1142
|
-
if (!
|
|
929
|
+
const o = e.getComponentById(c);
|
|
930
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1143
931
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1144
|
-
const d = e.selectNode(
|
|
932
|
+
const d = e.selectNode(o, (m) => m.type === $["response-form"].type);
|
|
1145
933
|
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
1146
934
|
}
|
|
1147
|
-
function
|
|
1148
|
-
|
|
1149
|
-
const { result: d, message: m, formNode:
|
|
935
|
+
function p(c, o) {
|
|
936
|
+
o = o || c.id;
|
|
937
|
+
const { result: d, message: m, formNode: u } = f(o);
|
|
1150
938
|
if (!d)
|
|
1151
939
|
return { result: d, message: m };
|
|
1152
|
-
t = c.id,
|
|
1153
|
-
const
|
|
1154
|
-
u
|
|
1155
|
-
const
|
|
940
|
+
t = c.id, i = [], s.clear();
|
|
941
|
+
const g = u.contents[0].type === $.fieldset.type ? 0 : 1;
|
|
942
|
+
r(u, i, g);
|
|
943
|
+
const v = i.find((C) => !C.isSupportedClass);
|
|
1156
944
|
return {
|
|
1157
945
|
defaultState: {
|
|
1158
946
|
defaultGroupNumber: n || 1,
|
|
1159
|
-
model:
|
|
947
|
+
model: v ? "customize" : "standard"
|
|
1160
948
|
},
|
|
1161
|
-
importData:
|
|
949
|
+
importData: i
|
|
1162
950
|
};
|
|
1163
951
|
}
|
|
1164
|
-
function
|
|
1165
|
-
|
|
1166
|
-
const { result: d, formNode: m } = f(
|
|
952
|
+
function l(c, o) {
|
|
953
|
+
o = o;
|
|
954
|
+
const { result: d, formNode: m } = f(o);
|
|
1167
955
|
if (!d)
|
|
1168
956
|
return "";
|
|
1169
|
-
const
|
|
1170
|
-
return c.forEach((
|
|
1171
|
-
var
|
|
1172
|
-
const
|
|
1173
|
-
if (
|
|
1174
|
-
const
|
|
1175
|
-
|
|
957
|
+
const u = [];
|
|
958
|
+
return c.forEach((g) => {
|
|
959
|
+
var C;
|
|
960
|
+
const v = s.get(g.id), b = v.appearance && v.appearance.class;
|
|
961
|
+
if (b) {
|
|
962
|
+
const M = b.split(" ").filter((J) => !J.startsWith("col-")), x = "col-" + g.columnInSM, S = "col-md-" + g.columnInMD, I = "col-xl-" + g.columnInLG, V = "col-el-" + g.columnInEL, O = [x, S, I, V].concat(M);
|
|
963
|
+
v.appearance.class = O.join(" ");
|
|
1176
964
|
}
|
|
1177
|
-
if (
|
|
1178
|
-
const
|
|
1179
|
-
|
|
965
|
+
if (g.fieldSetId) {
|
|
966
|
+
const k = m.contents.find((x) => x.id === g.fieldSetId), M = u.find((x) => x.id === g.fieldSetId);
|
|
967
|
+
M ? (C = M.contents) == null || C.push(v) : (u.push(k), k.contents = [v]);
|
|
1180
968
|
} else
|
|
1181
|
-
|
|
1182
|
-
}), m.contents =
|
|
969
|
+
u.push(v);
|
|
970
|
+
}), m.contents = u, m.id;
|
|
1183
971
|
}
|
|
1184
972
|
return {
|
|
1185
973
|
checkCanFindFormNode: f,
|
|
1186
|
-
checkCanOpenLayoutEditor:
|
|
1187
|
-
changeFormControlsByResponseLayoutConfig:
|
|
1188
|
-
getResonseFormLayoutConfig:
|
|
974
|
+
checkCanOpenLayoutEditor: p,
|
|
975
|
+
changeFormControlsByResponseLayoutConfig: l,
|
|
976
|
+
getResonseFormLayoutConfig: r
|
|
1189
977
|
};
|
|
1190
978
|
}
|
|
1191
|
-
class
|
|
1192
|
-
constructor(t,
|
|
1193
|
-
super(t,
|
|
1194
|
-
|
|
1195
|
-
this.responseLayoutEditorFunction =
|
|
1196
|
-
}
|
|
1197
|
-
getPropertyConfig(t,
|
|
1198
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(t,
|
|
1199
|
-
}
|
|
1200
|
-
getBasicProperties(t,
|
|
1201
|
-
var
|
|
1202
|
-
|
|
1203
|
-
this.setDesignViewModelField(t)
|
|
1204
|
-
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1205
|
-
return {
|
|
979
|
+
class je extends Ge {
|
|
980
|
+
constructor(t, s) {
|
|
981
|
+
super(t, s);
|
|
982
|
+
h(this, "responseLayoutEditorFunction");
|
|
983
|
+
this.responseLayoutEditorFunction = Ue(this.formSchemaUtils);
|
|
984
|
+
}
|
|
985
|
+
getPropertyConfig(t, s) {
|
|
986
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, s), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, s), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
987
|
+
}
|
|
988
|
+
getBasicProperties(t, s) {
|
|
989
|
+
var a;
|
|
990
|
+
const i = this;
|
|
991
|
+
return this.setDesignViewModelField(t), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
1206
992
|
description: "Basic Information",
|
|
1207
993
|
title: "基本信息",
|
|
1208
994
|
properties: {
|
|
@@ -1223,7 +1009,7 @@ class Qe extends ze {
|
|
|
1223
1009
|
textField: "value",
|
|
1224
1010
|
valueField: "key",
|
|
1225
1011
|
editable: !1,
|
|
1226
|
-
data:
|
|
1012
|
+
data: i.designViewModelField ? A.getEditorTypesByMDataType((a = i.designViewModelField.type) == null ? void 0 : a.name) : A.getAllInputTypes()
|
|
1227
1013
|
}
|
|
1228
1014
|
},
|
|
1229
1015
|
label: {
|
|
@@ -1234,41 +1020,37 @@ class Qe extends ze {
|
|
|
1234
1020
|
binding: {
|
|
1235
1021
|
description: "绑定的表单字段",
|
|
1236
1022
|
title: "绑定",
|
|
1237
|
-
$converter: "/converter/field-selector.converter",
|
|
1238
1023
|
editor: {
|
|
1239
|
-
type: "
|
|
1024
|
+
type: "binding-selector",
|
|
1240
1025
|
bindingType: { enable: !1 },
|
|
1241
1026
|
editorParams: {
|
|
1242
|
-
|
|
1243
|
-
|
|
1027
|
+
componentSchema: t,
|
|
1028
|
+
needSyncToViewModel: !0,
|
|
1029
|
+
viewModelId: this.viewModelId,
|
|
1030
|
+
designerHostService: this.designerHostService,
|
|
1031
|
+
disableOccupiedFields: !0
|
|
1244
1032
|
},
|
|
1245
|
-
|
|
1246
|
-
{ field: "name", title: "字段名称" },
|
|
1247
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1248
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1249
|
-
],
|
|
1250
|
-
textField: "bindingField",
|
|
1251
|
-
data: u
|
|
1033
|
+
textField: "bindingField"
|
|
1252
1034
|
}
|
|
1253
1035
|
}
|
|
1254
1036
|
},
|
|
1255
|
-
setPropertyRelates(
|
|
1256
|
-
if (
|
|
1257
|
-
switch (
|
|
1037
|
+
setPropertyRelates(r, f) {
|
|
1038
|
+
if (r)
|
|
1039
|
+
switch (r && r.propertyID) {
|
|
1258
1040
|
case "type": {
|
|
1259
|
-
|
|
1041
|
+
i.changeControlType(t, r, s);
|
|
1260
1042
|
break;
|
|
1261
1043
|
}
|
|
1262
1044
|
case "label": {
|
|
1263
|
-
|
|
1045
|
+
r.needRefreshControlTree = !0;
|
|
1264
1046
|
break;
|
|
1265
1047
|
}
|
|
1266
1048
|
}
|
|
1267
1049
|
}
|
|
1268
1050
|
};
|
|
1269
1051
|
}
|
|
1270
|
-
getAppearanceProperties(t,
|
|
1271
|
-
|
|
1052
|
+
getAppearanceProperties(t, s) {
|
|
1053
|
+
const i = this;
|
|
1272
1054
|
return {
|
|
1273
1055
|
title: "样式",
|
|
1274
1056
|
description: "Appearance",
|
|
@@ -1294,18 +1076,18 @@ class Qe extends ze {
|
|
|
1294
1076
|
refreshPanelAfterChanged: !0,
|
|
1295
1077
|
editor: {
|
|
1296
1078
|
type: "response-layout-editor-setting",
|
|
1297
|
-
initialState:
|
|
1079
|
+
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, i.componentId)
|
|
1298
1080
|
}
|
|
1299
1081
|
}
|
|
1300
1082
|
},
|
|
1301
|
-
setPropertyRelates(
|
|
1302
|
-
if (
|
|
1303
|
-
switch (
|
|
1083
|
+
setPropertyRelates(a, r) {
|
|
1084
|
+
if (a)
|
|
1085
|
+
switch (a && a.propertyID) {
|
|
1304
1086
|
case "responseLayout":
|
|
1305
|
-
|
|
1087
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, i.componentId || t.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(t.id, s), delete t.responseLayout;
|
|
1306
1088
|
break;
|
|
1307
1089
|
case "class":
|
|
1308
|
-
|
|
1090
|
+
i.updateUnifiedLayoutAfterControlChanged(a.propertyValue, t.id, this.componentId), i.updateElementByParentContainer(t.id, s);
|
|
1309
1091
|
break;
|
|
1310
1092
|
}
|
|
1311
1093
|
}
|
|
@@ -1319,44 +1101,44 @@ class Qe extends ze {
|
|
|
1319
1101
|
* @param propertyData 控件DOM属性
|
|
1320
1102
|
* @param newControlType 新控件类型
|
|
1321
1103
|
*/
|
|
1322
|
-
changeControlType(t,
|
|
1323
|
-
var c,
|
|
1324
|
-
const
|
|
1325
|
-
if (!
|
|
1104
|
+
changeControlType(t, s, i) {
|
|
1105
|
+
var c, o, d, m;
|
|
1106
|
+
const a = s.propertyValue, r = i && i.parent && i.parent.schema;
|
|
1107
|
+
if (!r)
|
|
1326
1108
|
return;
|
|
1327
|
-
const f =
|
|
1328
|
-
let
|
|
1109
|
+
const f = r.contents.findIndex((u) => u.id === t.id), p = r.contents[f];
|
|
1110
|
+
let l;
|
|
1329
1111
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1330
1112
|
editor: {
|
|
1331
|
-
$type:
|
|
1113
|
+
$type: a
|
|
1332
1114
|
},
|
|
1333
1115
|
name: this.designViewModelField.name,
|
|
1334
1116
|
require: this.designViewModelField.require,
|
|
1335
1117
|
readonly: this.designViewModelField.readonly
|
|
1336
|
-
}, !1),
|
|
1337
|
-
id:
|
|
1338
|
-
appearance:
|
|
1339
|
-
size:
|
|
1340
|
-
label:
|
|
1341
|
-
binding:
|
|
1342
|
-
visible:
|
|
1343
|
-
}), Object.assign(
|
|
1344
|
-
isTextArea:
|
|
1345
|
-
placeholder: (c =
|
|
1346
|
-
holdPlace: (
|
|
1347
|
-
readonly: (d =
|
|
1348
|
-
require: (m =
|
|
1349
|
-
}),
|
|
1350
|
-
(
|
|
1351
|
-
),
|
|
1352
|
-
}
|
|
1353
|
-
getComponentConfig(t,
|
|
1354
|
-
const
|
|
1118
|
+
}, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), l || (l = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(l, {
|
|
1119
|
+
id: p.id,
|
|
1120
|
+
appearance: p.appearance,
|
|
1121
|
+
size: p.size,
|
|
1122
|
+
label: p.label,
|
|
1123
|
+
binding: p.binding,
|
|
1124
|
+
visible: p.visible
|
|
1125
|
+
}), Object.assign(l.editor, {
|
|
1126
|
+
isTextArea: l.isTextArea && p.isTextArea,
|
|
1127
|
+
placeholder: (c = p.editor) == null ? void 0 : c.placeholder,
|
|
1128
|
+
holdPlace: (o = p.editor) == null ? void 0 : o.holdPlace,
|
|
1129
|
+
readonly: (d = p.editor) == null ? void 0 : d.readonly,
|
|
1130
|
+
require: (m = p.editor) == null ? void 0 : m.require
|
|
1131
|
+
}), r.contents.splice(f, 1), r.contents.splice(f, 0, l), i.schema = Object.assign(p, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1132
|
+
(u) => u.classList.remove("dgComponentSelected")
|
|
1133
|
+
), Ne.value++;
|
|
1134
|
+
}
|
|
1135
|
+
getComponentConfig(t, s = {}, i = {}) {
|
|
1136
|
+
const a = Object.assign({
|
|
1355
1137
|
description: "编辑器",
|
|
1356
1138
|
title: "编辑器",
|
|
1357
1139
|
type: "input-group",
|
|
1358
1140
|
$converter: "/converter/property-editor.converter"
|
|
1359
|
-
},
|
|
1141
|
+
}, s), r = Object.assign({
|
|
1360
1142
|
readonly: {
|
|
1361
1143
|
description: "",
|
|
1362
1144
|
title: "只读",
|
|
@@ -1377,8 +1159,8 @@ class Qe extends ze {
|
|
|
1377
1159
|
title: "提示文本",
|
|
1378
1160
|
type: "string"
|
|
1379
1161
|
}
|
|
1380
|
-
},
|
|
1381
|
-
return { ...
|
|
1162
|
+
}, i);
|
|
1163
|
+
return { ...a, properties: { ...r } };
|
|
1382
1164
|
}
|
|
1383
1165
|
/**
|
|
1384
1166
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1386,37 +1168,37 @@ class Qe extends ze {
|
|
|
1386
1168
|
* @param controlId 控件Id
|
|
1387
1169
|
* @param componentId 控件所在组件id
|
|
1388
1170
|
*/
|
|
1389
|
-
updateUnifiedLayoutAfterControlChanged(t,
|
|
1390
|
-
const
|
|
1391
|
-
let
|
|
1392
|
-
|
|
1171
|
+
updateUnifiedLayoutAfterControlChanged(t, s, i) {
|
|
1172
|
+
const a = t.split(" ");
|
|
1173
|
+
let r = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), p = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), l = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1174
|
+
r = r || "col-12", f = f || "col-md-" + r.replace("col-", ""), p = p || "col-xl-" + f.replace("col-md-", ""), l = l || "col-el-" + p.replace("col-xl-", "");
|
|
1393
1175
|
const c = {
|
|
1394
|
-
id:
|
|
1395
|
-
columnInSM: parseInt(
|
|
1176
|
+
id: s,
|
|
1177
|
+
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
1396
1178
|
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
1397
|
-
columnInLG: parseInt(
|
|
1398
|
-
columnInEL: parseInt(
|
|
1179
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
1180
|
+
columnInEL: parseInt(l.replace("col-el-", ""), 10)
|
|
1399
1181
|
};
|
|
1400
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1182
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, c);
|
|
1401
1183
|
}
|
|
1402
1184
|
/**
|
|
1403
1185
|
* 修改控件布局配置后更新Form统一布局配置
|
|
1404
1186
|
* @param componentId 组件Id
|
|
1405
1187
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1406
1188
|
*/
|
|
1407
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(t,
|
|
1408
|
-
const { formNode:
|
|
1409
|
-
if (!
|
|
1189
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(t, s) {
|
|
1190
|
+
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1191
|
+
if (!i || !i.unifiedLayout)
|
|
1410
1192
|
return;
|
|
1411
|
-
const
|
|
1412
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
1413
|
-
const
|
|
1414
|
-
Object.assign(
|
|
1193
|
+
const a = [];
|
|
1194
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, a, 1), s) {
|
|
1195
|
+
const u = a.find((g) => g.id === s.id);
|
|
1196
|
+
Object.assign(u || {}, s);
|
|
1415
1197
|
}
|
|
1416
|
-
const
|
|
1417
|
-
Object.assign(
|
|
1198
|
+
const r = a.map((u) => u.columnInSM), f = a.map((u) => u.columnInMD), p = a.map((u) => u.columnInLG), l = a.map((u) => u.columnInEL), c = this.checkIsUniqueColumn(r) ? r[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, d = this.checkIsUniqueColumn(p) ? p[0] : null, m = this.checkIsUniqueColumn(l) ? l[0] : null;
|
|
1199
|
+
Object.assign(i.unifiedLayout, {
|
|
1418
1200
|
uniqueColClassInSM: c,
|
|
1419
|
-
uniqueColClassInMD:
|
|
1201
|
+
uniqueColClassInMD: o,
|
|
1420
1202
|
uniqueColClassInLG: d,
|
|
1421
1203
|
uniqueColClassInEL: m
|
|
1422
1204
|
});
|
|
@@ -1425,165 +1207,66 @@ class Qe extends ze {
|
|
|
1425
1207
|
* 校验宽度样式值是否一致
|
|
1426
1208
|
*/
|
|
1427
1209
|
checkIsUniqueColumn(t) {
|
|
1428
|
-
const
|
|
1429
|
-
return Array.from(
|
|
1210
|
+
const s = new Set(t);
|
|
1211
|
+
return Array.from(s).length === 1;
|
|
1430
1212
|
}
|
|
1431
1213
|
}
|
|
1432
|
-
class
|
|
1214
|
+
class $e extends je {
|
|
1433
1215
|
constructor(n, t) {
|
|
1434
1216
|
super(n, t);
|
|
1435
1217
|
}
|
|
1436
1218
|
}
|
|
1437
|
-
function
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
checkCanMoveComponent: a,
|
|
1442
|
-
hideNestedPaddingInDesginerView: s,
|
|
1443
|
-
onAcceptMovedChildElement: u,
|
|
1444
|
-
resolveComponentContext: f,
|
|
1445
|
-
triggerBelongedComponentToMoveWhenMoved: i,
|
|
1446
|
-
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1447
|
-
} = He(e), c = e.schema;
|
|
1448
|
-
function l(d, m) {
|
|
1449
|
-
return new Ye(d, n).getPropertyConfig(c, m);
|
|
1450
|
-
}
|
|
1451
|
-
return {
|
|
1452
|
-
canAccepts: t,
|
|
1453
|
-
checkCanDeleteComponent: o,
|
|
1454
|
-
checkCanMoveComponent: a,
|
|
1455
|
-
hideNestedPaddingInDesginerView: s,
|
|
1456
|
-
onAcceptMovedChildElement: u,
|
|
1457
|
-
resolveComponentContext: f,
|
|
1458
|
-
triggerBelongedComponentToMoveWhenMoved: i,
|
|
1459
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1460
|
-
getPropsConfig: l
|
|
1461
|
-
};
|
|
1462
|
-
}
|
|
1463
|
-
function Ke(e, n, t) {
|
|
1464
|
-
var S;
|
|
1465
|
-
function o() {
|
|
1466
|
-
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
1467
|
-
}
|
|
1468
|
-
o();
|
|
1469
|
-
const a = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", u = b();
|
|
1470
|
-
function f() {
|
|
1471
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
1472
|
-
}
|
|
1473
|
-
function i() {
|
|
1474
|
-
return !1;
|
|
1475
|
-
}
|
|
1476
|
-
function r() {
|
|
1477
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
1478
|
-
}
|
|
1479
|
-
function c() {
|
|
1480
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
1481
|
-
}
|
|
1482
|
-
function l(C) {
|
|
1483
|
-
if (!C || !C.value)
|
|
1484
|
-
return null;
|
|
1485
|
-
if (C.value.schema && C.value.schema.type === "component")
|
|
1486
|
-
return C.value;
|
|
1487
|
-
const I = b(C == null ? void 0 : C.value.parent), k = l(I);
|
|
1488
|
-
return k || null;
|
|
1489
|
-
}
|
|
1490
|
-
function d(C = n) {
|
|
1491
|
-
const { componentInstance: I, designerItemElementRef: k } = C;
|
|
1492
|
-
return !I || !I.value ? null : I.value.canMove ? k : d(C.parent);
|
|
1493
|
-
}
|
|
1494
|
-
function m(C) {
|
|
1495
|
-
return !!t && t.canAccepts(C);
|
|
1496
|
-
}
|
|
1497
|
-
function p() {
|
|
1498
|
-
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
1499
|
-
}
|
|
1500
|
-
function y() {
|
|
1501
|
-
}
|
|
1502
|
-
function B(C, I) {
|
|
1503
|
-
I && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(I);
|
|
1504
|
-
}
|
|
1505
|
-
function w(C, I) {
|
|
1506
|
-
const { componentType: k } = C;
|
|
1507
|
-
let A = _(k, C, I);
|
|
1508
|
-
t && t.onResolveNewComponentSchema && (A = t.onResolveNewComponentSchema(C, A));
|
|
1509
|
-
const D = k.toLowerCase().replace("-", "_");
|
|
1510
|
-
return A && !A.id && A.type === k && (A.id = `${D}_${Math.random().toString().slice(2, 6)}`), A;
|
|
1511
|
-
}
|
|
1512
|
-
function T(C) {
|
|
1513
|
-
}
|
|
1514
|
-
function F(...C) {
|
|
1515
|
-
if (t && t.getPropsConfig)
|
|
1516
|
-
return t.getPropsConfig(...C);
|
|
1219
|
+
function We(e, n) {
|
|
1220
|
+
const t = e.schema;
|
|
1221
|
+
function s(i, a) {
|
|
1222
|
+
return new $e(i, n).getPropertyConfig(t, a);
|
|
1517
1223
|
}
|
|
1518
|
-
return
|
|
1519
|
-
canMove: f(),
|
|
1520
|
-
canSelectParent: i(),
|
|
1521
|
-
canDelete: r(),
|
|
1522
|
-
canNested: !c(),
|
|
1523
|
-
contents: n == null ? void 0 : n.schema.contents,
|
|
1524
|
-
elementRef: e,
|
|
1525
|
-
parent: (S = n == null ? void 0 : n.parent) == null ? void 0 : S.componentInstance,
|
|
1526
|
-
schema: n == null ? void 0 : n.schema,
|
|
1527
|
-
styles: a,
|
|
1528
|
-
designerClass: s,
|
|
1529
|
-
canAccepts: m,
|
|
1530
|
-
getBelongedComponentInstance: l,
|
|
1531
|
-
getDraggableDesignItemElement: d,
|
|
1532
|
-
getDraggingDisplayText: p,
|
|
1533
|
-
getPropConfig: F,
|
|
1534
|
-
getDragScopeElement: y,
|
|
1535
|
-
onAcceptMovedChildElement: B,
|
|
1536
|
-
onChildElementMovedOut: T,
|
|
1537
|
-
addNewChildComponentSchema: w,
|
|
1538
|
-
updateDragAndDropRules: o,
|
|
1539
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || b(!1),
|
|
1540
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || b(!1)
|
|
1541
|
-
}, u;
|
|
1224
|
+
return { getPropsConfig: s };
|
|
1542
1225
|
}
|
|
1543
|
-
const
|
|
1226
|
+
const qe = /* @__PURE__ */ W({
|
|
1544
1227
|
name: "FInputGroupDesign",
|
|
1545
|
-
props:
|
|
1228
|
+
props: G,
|
|
1546
1229
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1547
1230
|
setup(e, n) {
|
|
1548
|
-
const t =
|
|
1549
|
-
inputGroupClass:
|
|
1550
|
-
inputType:
|
|
1231
|
+
const t = B(e.modelValue), s = B(e.modelValue), i = oe(e, n, t, s), {
|
|
1232
|
+
inputGroupClass: a,
|
|
1233
|
+
inputType: r,
|
|
1551
1234
|
inputGroupStyle: f
|
|
1552
|
-
} =
|
|
1553
|
-
shouldShowAppendedButton:
|
|
1554
|
-
} =
|
|
1555
|
-
onMouseEnter:
|
|
1235
|
+
} = i, p = X(e), {
|
|
1236
|
+
shouldShowAppendedButton: l
|
|
1237
|
+
} = p, c = R(e, n, i), {
|
|
1238
|
+
onMouseEnter: o,
|
|
1556
1239
|
onMouseLeave: d
|
|
1557
|
-
} = c, m =
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
}), n.expose(
|
|
1561
|
-
const
|
|
1562
|
-
return () =>
|
|
1240
|
+
} = c, m = Q(e, n, r, p), u = B(), g = U("designer-host-service"), v = U("design-item-context"), b = We(v, g), C = ue(u, v, b);
|
|
1241
|
+
L(() => {
|
|
1242
|
+
u.value.componentInstance = C;
|
|
1243
|
+
}), n.expose(C.value);
|
|
1244
|
+
const k = Z(e, n, p, c, m), M = B();
|
|
1245
|
+
return () => w("div", {
|
|
1563
1246
|
id: "inputGroup",
|
|
1564
|
-
ref:
|
|
1565
|
-
class:
|
|
1247
|
+
ref: u,
|
|
1248
|
+
class: a.value,
|
|
1566
1249
|
style: f.value,
|
|
1567
|
-
onMouseenter:
|
|
1250
|
+
onMouseenter: o,
|
|
1568
1251
|
onMouseleave: d
|
|
1569
|
-
}, [
|
|
1570
|
-
ref:
|
|
1252
|
+
}, [w("input", {
|
|
1253
|
+
ref: M,
|
|
1571
1254
|
class: "form-control",
|
|
1572
1255
|
readonly: !0,
|
|
1573
1256
|
placeholder: e.placeholder
|
|
1574
|
-
}, null),
|
|
1257
|
+
}, null), l.value && k()]);
|
|
1575
1258
|
}
|
|
1576
1259
|
});
|
|
1577
|
-
|
|
1578
|
-
e["input-group"] =
|
|
1260
|
+
P.register = (e, n, t, s) => {
|
|
1261
|
+
e["input-group"] = P, n["input-group"] = z;
|
|
1579
1262
|
};
|
|
1580
|
-
|
|
1581
|
-
e["input-group"] =
|
|
1263
|
+
P.registerDesigner = (e, n, t) => {
|
|
1264
|
+
e["input-group"] = qe, n["input-group"] = z;
|
|
1582
1265
|
};
|
|
1583
|
-
const
|
|
1266
|
+
const Je = ie(P);
|
|
1584
1267
|
export {
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1268
|
+
P as FInputGroup,
|
|
1269
|
+
Je as default,
|
|
1270
|
+
G as inputGroupProps,
|
|
1271
|
+
z as propsResolver
|
|
1589
1272
|
};
|