@farris/ui-vue 1.3.1 → 1.3.4
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 +1175 -1280
- 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 +4658 -4555
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2891 -2994
- 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 +9912 -1191
- 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 +1595 -1725
- 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 +355 -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 +622 -633
- 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 +2079 -2178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3062 -3322
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10581 -3225
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +10182 -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 +1909 -2007
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6292 -6244
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5165 -5062
- 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.css +1 -1
- 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 +12607 -5080
- 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 +5002 -5272
- 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 +2128 -427
- 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 +2223 -2203
- 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 +399 -421
- 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 +2992 -3101
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2350 -2448
- 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 +46910 -42804
- 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 +2 -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 +18 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +28 -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/composition/use-general-editor.d.ts +26 -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/events-editor/src/composition/types.d.ts +1 -1
- 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 +90 -4
- package/types/query-solution/src/composition/use-condition.d.ts +19 -0
- 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 +18 -16
- package/types/query-solution/src/designer/query-solution-config/converter/query-solution-config-property.converter.d.ts +4 -0
- 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/index.d.ts +15 -0
- package/types/section/src/designer/section-header.design.component.d.ts +4 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +19 -0
- package/types/section/src/designer/section-toolbar.design.component.d.ts +3 -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,93 +1,98 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var v = (e, t, n) =>
|
|
4
|
-
import { defineComponent as
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var Y = (e, t, n) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => Y(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as T, ref as C, computed as k, watch as E, createVNode as I, Teleport as Z, createApp as K, onUnmounted as ee, inject as O, nextTick as D, onMounted as U, mergeProps as te } from "vue";
|
|
5
5
|
import { isPlainObject as N, cloneDeep as R } from "lodash-es";
|
|
6
6
|
import ne from "../list-view/index.esm.js";
|
|
7
7
|
import oe from "../button-edit/index.esm.js";
|
|
8
8
|
import { resolveAppearance as ie } from "../dynamic-resolver/index.esm.js";
|
|
9
|
-
import { useDesignerComponent as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
import { useDesignerComponent as q, DgControl as G } from "../designer-canvas/index.esm.js";
|
|
10
|
+
import { withInstall as le } from "../common/index.esm.js";
|
|
11
|
+
const ae = {}, re = {};
|
|
12
|
+
function W(e) {
|
|
13
|
+
const { properties: t, title: n, ignore: i } = e, l = i && Array.isArray(i), a = Object.keys(t).reduce((s, m) => ((!l || !i.find((y) => y === m)) && (s[m] = t[m].type === "object" && t[m].properties ? W(t[m]) : R(t[m].default)), s), {});
|
|
14
|
+
if (n && (!l || !i.find((s) => s === "id"))) {
|
|
15
|
+
const s = n.toLowerCase().replace(/-/g, "_");
|
|
16
|
+
a.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
18
19
|
}
|
|
19
20
|
function se(e, t) {
|
|
21
|
+
const n = W(t);
|
|
22
|
+
return Object.keys(n).reduce((i, l) => (i[l] && N(i[l]) && N(e[l] || !e[l]) ? Object.assign(i[l], e[l] || {}) : i[l] = e[l], i), n), n;
|
|
23
|
+
}
|
|
24
|
+
function ue(e, t) {
|
|
20
25
|
return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
|
|
21
26
|
if (t.has(l)) {
|
|
22
|
-
const
|
|
23
|
-
if (typeof
|
|
24
|
-
i[
|
|
27
|
+
const a = t.get(l);
|
|
28
|
+
if (typeof a == "string")
|
|
29
|
+
i[a] = e[l];
|
|
25
30
|
else {
|
|
26
|
-
const
|
|
27
|
-
Object.assign(i,
|
|
31
|
+
const s = a(l, e[l], e);
|
|
32
|
+
Object.assign(i, s);
|
|
28
33
|
}
|
|
29
34
|
} else
|
|
30
35
|
i[l] = e[l];
|
|
31
36
|
return i;
|
|
32
37
|
}, {});
|
|
33
38
|
}
|
|
34
|
-
function
|
|
35
|
-
const i =
|
|
36
|
-
return
|
|
39
|
+
function ce(e, t, n = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const i = se(e, t);
|
|
41
|
+
return ue(i, n);
|
|
37
42
|
}
|
|
38
|
-
function
|
|
39
|
-
function t(
|
|
43
|
+
function de(e = {}) {
|
|
44
|
+
function t(u, c, o, r) {
|
|
40
45
|
if (typeof o == "number")
|
|
41
|
-
return
|
|
46
|
+
return r[u].length === o;
|
|
42
47
|
if (typeof o == "object") {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
return Number(
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
48
|
+
const d = Object.keys(o)[0], p = o[d];
|
|
49
|
+
if (d === "not")
|
|
50
|
+
return Number(r[u].length) !== Number(p);
|
|
51
|
+
if (d === "moreThan")
|
|
52
|
+
return Number(r[u].length) >= Number(p);
|
|
53
|
+
if (d === "lessThan")
|
|
54
|
+
return Number(r[u].length) <= Number(p);
|
|
50
55
|
}
|
|
51
56
|
return !1;
|
|
52
57
|
}
|
|
53
|
-
function n(
|
|
54
|
-
return
|
|
58
|
+
function n(u, c, o, r) {
|
|
59
|
+
return r[u] && r[u].propertyValue && String(r[u].propertyValue.value) === String(o);
|
|
55
60
|
}
|
|
56
61
|
const i = /* @__PURE__ */ new Map([
|
|
57
62
|
["length", t],
|
|
58
63
|
["getProperty", n]
|
|
59
64
|
]);
|
|
60
|
-
Object.keys(e).reduce((
|
|
61
|
-
function l(
|
|
62
|
-
const o =
|
|
63
|
-
return typeof
|
|
64
|
-
if (
|
|
65
|
-
return { target: o, operator: "length", param: null, value:
|
|
66
|
-
const
|
|
67
|
-
return { target: o, operator: "getProperty", param:
|
|
65
|
+
Object.keys(e).reduce((u, c) => (u.set(c, e[c]), u), i);
|
|
66
|
+
function l(u, c) {
|
|
67
|
+
const o = u;
|
|
68
|
+
return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: u, value: !!c }] : typeof c == "object" ? Object.keys(c).map((r) => {
|
|
69
|
+
if (r === "length")
|
|
70
|
+
return { target: o, operator: "length", param: null, value: c[r] };
|
|
71
|
+
const d = r, p = c[r];
|
|
72
|
+
return { target: o, operator: "getProperty", param: d, value: p };
|
|
68
73
|
}) : [];
|
|
69
74
|
}
|
|
70
|
-
function
|
|
71
|
-
return Object.keys(
|
|
72
|
-
const
|
|
73
|
-
return o.push(...
|
|
75
|
+
function a(u) {
|
|
76
|
+
return Object.keys(u).reduce((o, r) => {
|
|
77
|
+
const d = l(r, u[r]);
|
|
78
|
+
return o.push(...d), o;
|
|
74
79
|
}, []);
|
|
75
80
|
}
|
|
76
|
-
function
|
|
77
|
-
if (i.has(
|
|
78
|
-
const o = i.get(
|
|
79
|
-
return o && o(
|
|
81
|
+
function s(u, c) {
|
|
82
|
+
if (i.has(u.operator)) {
|
|
83
|
+
const o = i.get(u.operator);
|
|
84
|
+
return o && o(u.target, u.param, u.value, c) || !1;
|
|
80
85
|
}
|
|
81
86
|
return !1;
|
|
82
87
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
88
|
+
function m(u, c) {
|
|
89
|
+
return a(u).reduce((d, p) => d && s(p, c), !0);
|
|
85
90
|
}
|
|
86
|
-
function
|
|
87
|
-
const o = Object.keys(
|
|
88
|
-
return
|
|
91
|
+
function y(u, c) {
|
|
92
|
+
const o = Object.keys(u), r = o.includes("allOf"), d = o.includes("anyOf"), p = r || d, b = (p ? u[p ? r ? "allOf" : "anyOf" : "allOf"] : [u]).map((w) => m(w, c));
|
|
93
|
+
return r ? !b.includes(!1) : b.includes(!0);
|
|
89
94
|
}
|
|
90
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: y };
|
|
91
96
|
}
|
|
92
97
|
const g = {
|
|
93
98
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -127,21 +132,22 @@ const g = {
|
|
|
127
132
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
128
133
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
129
134
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
130
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
136
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
137
|
+
}, pe = {}, fe = {};
|
|
138
|
+
de();
|
|
139
|
+
function H(e, t, n = /* @__PURE__ */ new Map(), i = (s, m, y, u) => m, l = {}, a = (s) => s) {
|
|
140
|
+
return ae[t.title] = t, re[t.title] = i, pe[t.title] = l, fe[t.title] = a, (s = {}) => {
|
|
141
|
+
const m = ce(s, t, n), y = Object.keys(e).reduce((u, c) => (u[c] = e[c].default, u), {});
|
|
142
|
+
return Object.assign(y, m);
|
|
137
143
|
};
|
|
138
144
|
}
|
|
139
|
-
function
|
|
145
|
+
function me(e, t) {
|
|
140
146
|
return { customClass: t.class, customStyle: t.style };
|
|
141
147
|
}
|
|
142
|
-
const
|
|
143
|
-
["appearance",
|
|
144
|
-
]),
|
|
148
|
+
const ye = /* @__PURE__ */ new Map([
|
|
149
|
+
["appearance", me]
|
|
150
|
+
]), ge = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/combo-list.schema.json", be = "combo-list", ve = "A Farris Input Component", Ce = "object", Se = {
|
|
145
151
|
id: {
|
|
146
152
|
description: "The unique identifier for a combo list",
|
|
147
153
|
type: "string"
|
|
@@ -174,6 +180,11 @@ const me = /* @__PURE__ */ new Map([
|
|
|
174
180
|
type: "boolean",
|
|
175
181
|
default: !1
|
|
176
182
|
},
|
|
183
|
+
enableClear: {
|
|
184
|
+
description: "",
|
|
185
|
+
type: "boolean",
|
|
186
|
+
default: !0
|
|
187
|
+
},
|
|
177
188
|
editable: {
|
|
178
189
|
description: "",
|
|
179
190
|
type: "boolean",
|
|
@@ -198,6 +209,11 @@ const me = /* @__PURE__ */ new Map([
|
|
|
198
209
|
type: "string",
|
|
199
210
|
default: ""
|
|
200
211
|
},
|
|
212
|
+
idField: {
|
|
213
|
+
description: "",
|
|
214
|
+
type: "string",
|
|
215
|
+
default: "id"
|
|
216
|
+
},
|
|
201
217
|
valueField: {
|
|
202
218
|
description: "",
|
|
203
219
|
type: "string",
|
|
@@ -257,28 +273,29 @@ const me = /* @__PURE__ */ new Map([
|
|
|
257
273
|
type: "sting",
|
|
258
274
|
default: ""
|
|
259
275
|
}
|
|
260
|
-
},
|
|
276
|
+
}, Fe = [
|
|
261
277
|
"id",
|
|
262
278
|
"type"
|
|
263
279
|
], Ie = [
|
|
264
280
|
"id",
|
|
265
281
|
"appearance",
|
|
266
|
-
"binding"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
$
|
|
270
|
-
|
|
271
|
-
|
|
282
|
+
"binding",
|
|
283
|
+
"visible"
|
|
284
|
+
], ke = {
|
|
285
|
+
$schema: ge,
|
|
286
|
+
$id: he,
|
|
287
|
+
title: be,
|
|
288
|
+
description: ve,
|
|
272
289
|
type: Ce,
|
|
273
|
-
properties:
|
|
274
|
-
required:
|
|
290
|
+
properties: Se,
|
|
291
|
+
required: Fe,
|
|
275
292
|
ignore: Ie
|
|
276
293
|
};
|
|
277
|
-
function
|
|
294
|
+
function we(e, t, n) {
|
|
278
295
|
return t;
|
|
279
296
|
}
|
|
280
|
-
var Be = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(Be || {}),
|
|
281
|
-
const
|
|
297
|
+
var Be = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(Be || {}), Me = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(Me || {});
|
|
298
|
+
const $ = {
|
|
282
299
|
/**
|
|
283
300
|
* 组件标识
|
|
284
301
|
*/
|
|
@@ -439,12 +456,12 @@ const j = {
|
|
|
439
456
|
*/
|
|
440
457
|
beforeOpen: { type: Function, default: null },
|
|
441
458
|
searchOption: {
|
|
442
|
-
type:
|
|
459
|
+
type: [Boolean, Function],
|
|
443
460
|
default: !1
|
|
444
461
|
},
|
|
445
462
|
// 搜索启用高亮
|
|
446
463
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
447
|
-
}, z = H(
|
|
464
|
+
}, z = H($, ke, ye, we), xe = {
|
|
448
465
|
dataSource: { type: Array, default: [] },
|
|
449
466
|
enableSearch: { type: Boolean, default: !1 },
|
|
450
467
|
idField: { type: String, default: "id" },
|
|
@@ -460,46 +477,49 @@ const j = {
|
|
|
460
477
|
onSelectionChange: { type: Function, default: () => {
|
|
461
478
|
} },
|
|
462
479
|
searchOption: {
|
|
463
|
-
type:
|
|
480
|
+
type: [Boolean, Function],
|
|
464
481
|
default: !1
|
|
465
482
|
},
|
|
466
483
|
// 搜索启用高亮
|
|
467
484
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
468
|
-
},
|
|
485
|
+
}, Ee = /* @__PURE__ */ T({
|
|
469
486
|
name: "FComboListContainer",
|
|
470
|
-
props:
|
|
487
|
+
props: xe,
|
|
471
488
|
emits: ["selectionChange"],
|
|
472
489
|
setup(e, t) {
|
|
473
|
-
const n = C(), i = C(e.dataSource), l = C([]),
|
|
490
|
+
const n = C(), i = C(e.dataSource), l = C([]), a = C(e.separator), s = C(e.width), m = C(e.maxHeight), y = C(String(e.selectedValues).split(a.value)), u = k(() => e.multiSelect), c = k(() => ({
|
|
474
491
|
enableSelectRow: !0,
|
|
475
492
|
multiSelect: e.multiSelect,
|
|
476
493
|
multiSelectMode: "OnCheckAndClick",
|
|
477
|
-
showCheckbox:
|
|
494
|
+
showCheckbox: u.value,
|
|
478
495
|
showSelectAll: !1,
|
|
479
496
|
showSelection: !0
|
|
480
497
|
}));
|
|
481
|
-
|
|
498
|
+
E(e.dataSource, () => {
|
|
482
499
|
i.value = e.dataSource;
|
|
483
500
|
});
|
|
484
|
-
const o = k(() => e.enableSearch ? "SearchBar" : "ContentHeader"),
|
|
485
|
-
const
|
|
486
|
-
return
|
|
501
|
+
const o = k(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = k(() => {
|
|
502
|
+
const f = {};
|
|
503
|
+
return s.value !== void 0 && (f.width = `${s.value}px`), m.value !== void 0 && m.value > 0 && (f.maxHeight = `${m.value}px`), f;
|
|
487
504
|
});
|
|
488
|
-
function f
|
|
489
|
-
l.value =
|
|
505
|
+
function d(f) {
|
|
506
|
+
l.value = f.map((h) => Object.assign({}, h)), y.value = f.map((h) => h[e.idField]), t.emit("selectionChange", l.value);
|
|
490
507
|
}
|
|
491
|
-
function
|
|
508
|
+
function p(f) {
|
|
492
509
|
if (e.enableHighlightSearch)
|
|
493
510
|
return;
|
|
494
|
-
let
|
|
495
|
-
|
|
511
|
+
let h = [];
|
|
512
|
+
const {
|
|
513
|
+
searchOption: b
|
|
514
|
+
} = e;
|
|
515
|
+
typeof b == "function" ? h = i.value.filter((S) => b(f, S)) : h = i.value.filter((S) => S[e.valueField].indexOf(f) > -1 || S[e.textField].indexOf(f) > -1), n.value.updateDataSource(h);
|
|
496
516
|
}
|
|
497
|
-
return
|
|
498
|
-
|
|
499
|
-
}), () =>
|
|
517
|
+
return E([() => e.selectedValues], ([f]) => {
|
|
518
|
+
y.value = f.split(a.value);
|
|
519
|
+
}), () => I("div", {
|
|
500
520
|
class: "f-combo-list-container pl-1",
|
|
501
|
-
style:
|
|
502
|
-
}, [
|
|
521
|
+
style: r.value
|
|
522
|
+
}, [I(ne, {
|
|
503
523
|
ref: n,
|
|
504
524
|
size: "small",
|
|
505
525
|
itemClass: "f-combo-list-item",
|
|
@@ -510,110 +530,110 @@ const j = {
|
|
|
510
530
|
textField: e.textField,
|
|
511
531
|
titleField: e.titleField,
|
|
512
532
|
multiSelect: e.multiSelect,
|
|
513
|
-
selection:
|
|
533
|
+
selection: c.value,
|
|
514
534
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
515
|
-
selectionValues:
|
|
516
|
-
onSelectionChange:
|
|
517
|
-
onAfterSearch:
|
|
535
|
+
selectionValues: y.value,
|
|
536
|
+
onSelectionChange: d,
|
|
537
|
+
onAfterSearch: p
|
|
518
538
|
}, null)]);
|
|
519
539
|
}
|
|
520
540
|
});
|
|
521
|
-
function
|
|
541
|
+
function Te(e) {
|
|
522
542
|
const t = C(""), n = C(e.modelValue), i = C(e.data || []), l = C(e.editable);
|
|
523
|
-
function
|
|
524
|
-
const
|
|
525
|
-
return i.value.filter((
|
|
526
|
-
const S =
|
|
527
|
-
return S -
|
|
543
|
+
function a(o) {
|
|
544
|
+
const r = String(o).split(e.separator), d = r.map((h) => [h, !0]), p = new Map(d);
|
|
545
|
+
return i.value.filter((h) => p.has(String(h[e.valueField]))).sort((h, b) => {
|
|
546
|
+
const S = r.indexOf(h[e.valueField]), w = r.indexOf(b[e.valueField]);
|
|
547
|
+
return S - w;
|
|
528
548
|
});
|
|
529
549
|
}
|
|
530
|
-
function
|
|
531
|
-
const
|
|
532
|
-
t.value = l.value ?
|
|
550
|
+
function s(o) {
|
|
551
|
+
const r = a(o).map((d) => d[e.textField]).join(e.separator);
|
|
552
|
+
t.value = l.value ? r || o : r;
|
|
533
553
|
}
|
|
534
|
-
function
|
|
535
|
-
const
|
|
536
|
-
return i.value.filter((
|
|
554
|
+
function m(o) {
|
|
555
|
+
const r = o.split(e.separator).map((p) => [p, !0]), d = new Map(r);
|
|
556
|
+
return i.value.filter((p) => d.has(p[e.textField]));
|
|
537
557
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
return
|
|
558
|
+
function y(o) {
|
|
559
|
+
const r = {};
|
|
560
|
+
return r[e.idField] = o, r[e.textField] = o, [r];
|
|
541
561
|
}
|
|
542
|
-
function
|
|
543
|
-
let
|
|
544
|
-
const
|
|
545
|
-
return l.value && !
|
|
562
|
+
function u(o) {
|
|
563
|
+
let r = m(o);
|
|
564
|
+
const d = r && r.length > 0;
|
|
565
|
+
return l.value && !d && (r = y(o)), r;
|
|
546
566
|
}
|
|
547
|
-
function
|
|
548
|
-
const { url: o, method:
|
|
549
|
-
let
|
|
550
|
-
fetch(o,
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
553
|
-
return
|
|
554
|
-
throw new Error(
|
|
555
|
-
}).then((
|
|
556
|
-
i.value =
|
|
557
|
-
}).catch((
|
|
558
|
-
console.error(
|
|
567
|
+
function c() {
|
|
568
|
+
const { url: o, method: r = "GET", headers: d = {}, body: p = null } = e.remote, f = r.toLowerCase() === "get" ? { method: r, headers: d } : { method: r, headers: d, body: p };
|
|
569
|
+
let h = !1;
|
|
570
|
+
fetch(o, f).then((b) => {
|
|
571
|
+
var w, B;
|
|
572
|
+
if (b.status === 200)
|
|
573
|
+
return h = !!((B = (w = b.headers) == null ? void 0 : w.get("content-type")) != null && B.includes("application/json")), h ? b.text() : b.json();
|
|
574
|
+
throw new Error(b.statusText);
|
|
575
|
+
}).then((b) => {
|
|
576
|
+
i.value = h ? JSON.parse(b) : b;
|
|
577
|
+
}).catch((b) => {
|
|
578
|
+
console.error(b);
|
|
559
579
|
});
|
|
560
580
|
}
|
|
561
|
-
return e.remote &&
|
|
581
|
+
return e.remote && c(), E(() => e.data, () => {
|
|
562
582
|
i.value = e.data;
|
|
563
|
-
}),
|
|
583
|
+
}), E([i], ([o]) => {
|
|
564
584
|
if (e.modelValue != null) {
|
|
565
|
-
const
|
|
566
|
-
|
|
585
|
+
const r = o.find((d) => d[e.valueField] === e.modelValue);
|
|
586
|
+
r && (t.value = r[e.textField]);
|
|
567
587
|
}
|
|
568
|
-
}),
|
|
569
|
-
n.value = o,
|
|
570
|
-
}),
|
|
588
|
+
}), E(() => e.modelValue, (o) => {
|
|
589
|
+
n.value = o, s(o);
|
|
590
|
+
}), s(e.modelValue), { dataSource: i, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: m, getItemsByValue: a, getSelectedItemsByDisplayText: u };
|
|
571
591
|
}
|
|
572
|
-
const P = /* @__PURE__ */
|
|
592
|
+
const P = /* @__PURE__ */ T({
|
|
573
593
|
name: "FComboList",
|
|
574
|
-
props:
|
|
594
|
+
props: $,
|
|
575
595
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
576
596
|
setup(e, t) {
|
|
577
|
-
const n = C(), i = C(e.disabled), l = C(e.enableClear),
|
|
578
|
-
dataSource:
|
|
579
|
-
displayText:
|
|
580
|
-
editable:
|
|
581
|
-
modelValue:
|
|
597
|
+
const n = C(), i = C(e.disabled), l = C(e.enableClear), a = C(e.enableSearch), s = C(e.readonly), {
|
|
598
|
+
dataSource: m,
|
|
599
|
+
displayText: y,
|
|
600
|
+
editable: u,
|
|
601
|
+
modelValue: c,
|
|
582
602
|
getSelectedItemsByDisplayText: o
|
|
583
|
-
} =
|
|
584
|
-
function
|
|
585
|
-
!
|
|
603
|
+
} = Te(e), r = k(() => e.multiSelect), d = k(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
604
|
+
function p() {
|
|
605
|
+
!r.value && n.value && n.value.hidePopup();
|
|
586
606
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
607
|
+
function f(F) {
|
|
608
|
+
y.value = F.map((M) => M[e.textField]).join(e.separator), F.length === 1 ? c.value = F[0][e.valueField] : c.value = F.map((M) => M[e.valueField]).join(e.separator), t.emit("update:modelValue", c.value), t.emit("change", F, c.value), p();
|
|
589
609
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
610
|
+
function h() {
|
|
611
|
+
s.value || n.value.togglePopup();
|
|
592
612
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
613
|
+
function b(F) {
|
|
614
|
+
c.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
595
615
|
}
|
|
596
|
-
function S(
|
|
597
|
-
const M = o(
|
|
598
|
-
|
|
616
|
+
function S(F) {
|
|
617
|
+
const M = o(F);
|
|
618
|
+
f(M);
|
|
599
619
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
620
|
+
function w() {
|
|
621
|
+
return y.value;
|
|
602
622
|
}
|
|
603
|
-
function
|
|
604
|
-
t.emit("input",
|
|
623
|
+
function B(F) {
|
|
624
|
+
t.emit("input", F);
|
|
605
625
|
}
|
|
606
626
|
return t.expose({
|
|
607
|
-
getDisplayText:
|
|
608
|
-
}),
|
|
609
|
-
i.value =
|
|
610
|
-
}), () =>
|
|
627
|
+
getDisplayText: w
|
|
628
|
+
}), E([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([F, M, V, A, j]) => {
|
|
629
|
+
i.value = F, u.value = M, l.value = V, a.value = A, s.value = j;
|
|
630
|
+
}), () => I(oe, {
|
|
611
631
|
ref: n,
|
|
612
632
|
id: e.id,
|
|
613
633
|
disable: i.value,
|
|
614
|
-
readonly:
|
|
634
|
+
readonly: s.value,
|
|
615
635
|
forcePlaceholder: e.forcePlaceholder,
|
|
616
|
-
editable:
|
|
636
|
+
editable: u.value,
|
|
617
637
|
buttonContent: e.dropDownIcon,
|
|
618
638
|
placeholder: e.placeholder,
|
|
619
639
|
enableClear: l.value,
|
|
@@ -622,39 +642,39 @@ const P = /* @__PURE__ */ E({
|
|
|
622
642
|
enableTitle: e.enableTitle,
|
|
623
643
|
multiSelect: e.multiSelect,
|
|
624
644
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
625
|
-
modelValue:
|
|
626
|
-
"onUpdate:modelValue": (
|
|
645
|
+
modelValue: y.value,
|
|
646
|
+
"onUpdate:modelValue": (F) => y.value = F,
|
|
627
647
|
focusOnCreated: e.focusOnCreated,
|
|
628
648
|
selectOnCreated: e.selectOnCreated,
|
|
629
|
-
onClear:
|
|
630
|
-
onClick:
|
|
649
|
+
onClear: b,
|
|
650
|
+
onClick: h,
|
|
631
651
|
onChange: S,
|
|
632
|
-
onInput:
|
|
652
|
+
onInput: B,
|
|
633
653
|
beforeOpen: e.beforeOpen
|
|
634
654
|
}, {
|
|
635
|
-
default: () => [
|
|
655
|
+
default: () => [I(Ee, {
|
|
636
656
|
idField: e.idField,
|
|
637
657
|
valueField: e.valueField,
|
|
638
658
|
textField: e.textField,
|
|
639
659
|
titleField: e.titleField,
|
|
640
|
-
dataSource:
|
|
641
|
-
selectedValues:
|
|
660
|
+
dataSource: m.value,
|
|
661
|
+
selectedValues: c.value,
|
|
642
662
|
multiSelect: e.multiSelect,
|
|
643
|
-
enableSearch:
|
|
663
|
+
enableSearch: a.value,
|
|
644
664
|
maxHeight: e.maxHeight,
|
|
645
665
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
646
|
-
width: e.fitEditor ?
|
|
647
|
-
onSelectionChange:
|
|
666
|
+
width: e.fitEditor ? d.value : void 0,
|
|
667
|
+
onSelectionChange: f
|
|
648
668
|
}, null)]
|
|
649
669
|
});
|
|
650
670
|
}
|
|
651
|
-
}),
|
|
671
|
+
}), Oe = /* @__PURE__ */ new Map([
|
|
652
672
|
["appearance", ie]
|
|
653
673
|
]);
|
|
654
|
-
function
|
|
674
|
+
function Pe(e, t, n) {
|
|
655
675
|
return t;
|
|
656
676
|
}
|
|
657
|
-
const
|
|
677
|
+
const Le = "https://json-schema.org/draft/2020-12/schema", Ve = "https://farris-design.gitee.io/button-edit.schema.json", Ae = "button-edit", je = "A Farris Input Component", $e = "object", De = {
|
|
658
678
|
id: {
|
|
659
679
|
description: "The unique identifier for a Input Group",
|
|
660
680
|
type: "string"
|
|
@@ -838,18 +858,18 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
838
858
|
type: "string",
|
|
839
859
|
default: ""
|
|
840
860
|
}
|
|
841
|
-
},
|
|
861
|
+
}, Ne = [
|
|
842
862
|
"id",
|
|
843
863
|
"type"
|
|
844
|
-
],
|
|
845
|
-
$schema:
|
|
846
|
-
$id:
|
|
847
|
-
title:
|
|
848
|
-
description:
|
|
849
|
-
type:
|
|
850
|
-
properties:
|
|
851
|
-
required:
|
|
852
|
-
}, Ue = "buttonEdit",
|
|
864
|
+
], Ge = {
|
|
865
|
+
$schema: Le,
|
|
866
|
+
$id: Ve,
|
|
867
|
+
title: Ae,
|
|
868
|
+
description: je,
|
|
869
|
+
type: $e,
|
|
870
|
+
properties: De,
|
|
871
|
+
required: Ne
|
|
872
|
+
}, Ue = "buttonEdit", Re = "A Farris Component", qe = "object", We = {
|
|
853
873
|
basic: {
|
|
854
874
|
description: "Basic Infomation",
|
|
855
875
|
title: "基本信息",
|
|
@@ -920,7 +940,7 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
920
940
|
},
|
|
921
941
|
{
|
|
922
942
|
value: "center",
|
|
923
|
-
name: "
|
|
943
|
+
name: "居中"
|
|
924
944
|
},
|
|
925
945
|
{
|
|
926
946
|
value: "right",
|
|
@@ -931,10 +951,10 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
931
951
|
}
|
|
932
952
|
}
|
|
933
953
|
}
|
|
934
|
-
},
|
|
954
|
+
}, He = {
|
|
935
955
|
title: Ue,
|
|
936
|
-
description:
|
|
937
|
-
type:
|
|
956
|
+
description: Re,
|
|
957
|
+
type: qe,
|
|
938
958
|
categories: We
|
|
939
959
|
}, X = {
|
|
940
960
|
/**
|
|
@@ -1045,66 +1065,66 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
1045
1065
|
/** 更新方式 blur | change */
|
|
1046
1066
|
updateOn: { type: String, default: "change" }
|
|
1047
1067
|
};
|
|
1048
|
-
H(X,
|
|
1049
|
-
const
|
|
1068
|
+
H(X, Ge, Oe, Pe, He);
|
|
1069
|
+
const ze = {
|
|
1050
1070
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1051
1071
|
host: { type: Object },
|
|
1052
1072
|
backgroundColor: { type: String, default: "" }
|
|
1053
|
-
},
|
|
1073
|
+
}, Xe = /* @__PURE__ */ T({
|
|
1054
1074
|
name: "FOverlay",
|
|
1055
|
-
props:
|
|
1075
|
+
props: ze,
|
|
1056
1076
|
emits: ["click"],
|
|
1057
1077
|
setup(e, t) {
|
|
1058
1078
|
const n = C(e.popupContentPosition), i = C(e.host), l = k(() => ({
|
|
1059
1079
|
backgroundColor: e.backgroundColor || "",
|
|
1060
1080
|
pointerEvents: "auto"
|
|
1061
1081
|
}));
|
|
1062
|
-
function
|
|
1063
|
-
t.emit("click"),
|
|
1082
|
+
function a(m) {
|
|
1083
|
+
t.emit("click"), m.preventDefault(), m.stopPropagation();
|
|
1064
1084
|
}
|
|
1065
1085
|
k(() => {
|
|
1066
|
-
const
|
|
1067
|
-
if (
|
|
1068
|
-
const
|
|
1069
|
-
left:
|
|
1070
|
-
top:
|
|
1086
|
+
const m = i.value;
|
|
1087
|
+
if (m) {
|
|
1088
|
+
const y = m.getBoundingClientRect(), {
|
|
1089
|
+
left: u,
|
|
1090
|
+
top: c,
|
|
1071
1091
|
height: o
|
|
1072
|
-
} =
|
|
1092
|
+
} = y;
|
|
1073
1093
|
return {
|
|
1074
|
-
left:
|
|
1075
|
-
top:
|
|
1094
|
+
left: u,
|
|
1095
|
+
top: c + o
|
|
1076
1096
|
};
|
|
1077
1097
|
}
|
|
1078
1098
|
return n.value;
|
|
1079
1099
|
});
|
|
1080
|
-
const
|
|
1100
|
+
const s = k(() => ({
|
|
1081
1101
|
// position: 'relative',
|
|
1082
1102
|
// left: `${position.value.left}px`,
|
|
1083
1103
|
// top: `${position.value.top}px`
|
|
1084
1104
|
}));
|
|
1085
|
-
return () =>
|
|
1105
|
+
return () => I(Z, {
|
|
1086
1106
|
to: "body"
|
|
1087
1107
|
}, {
|
|
1088
1108
|
default: () => {
|
|
1089
|
-
var
|
|
1090
|
-
return [
|
|
1109
|
+
var m, y;
|
|
1110
|
+
return [I("div", {
|
|
1091
1111
|
class: "overlay-container",
|
|
1092
|
-
onClick: (
|
|
1112
|
+
onClick: (u) => a(u),
|
|
1093
1113
|
style: l.value
|
|
1094
|
-
}, [
|
|
1095
|
-
style:
|
|
1096
|
-
}, [(
|
|
1114
|
+
}, [I("div", {
|
|
1115
|
+
style: s.value
|
|
1116
|
+
}, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)])])];
|
|
1097
1117
|
}
|
|
1098
1118
|
});
|
|
1099
1119
|
}
|
|
1100
1120
|
});
|
|
1101
|
-
function
|
|
1121
|
+
function Je(e) {
|
|
1102
1122
|
if (e.content && e.content.render)
|
|
1103
1123
|
return e.content.render;
|
|
1104
1124
|
if (e.render && typeof e.render == "function")
|
|
1105
1125
|
return e.render;
|
|
1106
1126
|
}
|
|
1107
|
-
function
|
|
1127
|
+
function Qe(e) {
|
|
1108
1128
|
const t = document.createElement("div");
|
|
1109
1129
|
t.style.display = "contents";
|
|
1110
1130
|
let n;
|
|
@@ -1117,21 +1137,21 @@ function Je(e) {
|
|
|
1117
1137
|
ee(() => {
|
|
1118
1138
|
document.body.removeChild(t);
|
|
1119
1139
|
});
|
|
1120
|
-
const
|
|
1121
|
-
return () =>
|
|
1140
|
+
const a = Je(e);
|
|
1141
|
+
return () => I(Xe, {
|
|
1122
1142
|
"popup-content-position": e.popupPosition,
|
|
1123
1143
|
host: e.host,
|
|
1124
1144
|
onClick: l,
|
|
1125
1145
|
backgroundColor: e.backgroundColor
|
|
1126
1146
|
}, {
|
|
1127
|
-
default: () => [
|
|
1147
|
+
default: () => [a && a()]
|
|
1128
1148
|
});
|
|
1129
1149
|
}
|
|
1130
1150
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
1131
1151
|
}
|
|
1132
|
-
class
|
|
1152
|
+
class _e {
|
|
1133
1153
|
static show(t) {
|
|
1134
|
-
return
|
|
1154
|
+
return Qe(t);
|
|
1135
1155
|
}
|
|
1136
1156
|
}
|
|
1137
1157
|
const Ye = Symbol("FModalService");
|
|
@@ -1140,88 +1160,88 @@ function J(e, t) {
|
|
|
1140
1160
|
const i = e.beforeOpen || e.beforeClickButton || null;
|
|
1141
1161
|
let l = Promise.resolve(!0);
|
|
1142
1162
|
if (i) {
|
|
1143
|
-
const
|
|
1144
|
-
if (typeof
|
|
1163
|
+
const a = i(t.value);
|
|
1164
|
+
if (typeof a > "u")
|
|
1145
1165
|
return l;
|
|
1146
|
-
typeof
|
|
1166
|
+
typeof a == "boolean" ? l = Promise.resolve(a) : l = a;
|
|
1147
1167
|
}
|
|
1148
1168
|
return l;
|
|
1149
1169
|
}
|
|
1150
1170
|
return { judgeCanOpen: n };
|
|
1151
1171
|
}
|
|
1152
1172
|
function Ze(e, t, n, i, l) {
|
|
1153
|
-
const
|
|
1173
|
+
const a = C(e.buttonBehavior), s = C(e.popupOnInput), m = k(() => ({
|
|
1154
1174
|
"input-group-append": !0,
|
|
1155
1175
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1156
|
-
})), { judgeCanOpen:
|
|
1157
|
-
async function
|
|
1158
|
-
if (await
|
|
1159
|
-
const
|
|
1160
|
-
if (
|
|
1161
|
-
const
|
|
1162
|
-
...
|
|
1176
|
+
})), { judgeCanOpen: y } = J(e, l), u = k(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), c = O(Ye, null), o = C();
|
|
1177
|
+
async function r(f) {
|
|
1178
|
+
if (await y() && u.value) {
|
|
1179
|
+
const h = !!t.slots.default;
|
|
1180
|
+
if (a.value === "Modal") {
|
|
1181
|
+
const b = e.modalOptions, S = c == null ? void 0 : c.open({
|
|
1182
|
+
...b,
|
|
1163
1183
|
render: () => t.slots.default && t.slots.default()
|
|
1164
1184
|
});
|
|
1165
1185
|
o.value = S == null ? void 0 : S.modalRef;
|
|
1166
1186
|
}
|
|
1167
|
-
|
|
1187
|
+
a.value === "Overlay" && _e.show({
|
|
1168
1188
|
// host: buttonEditRef.value,
|
|
1169
1189
|
host: document.body,
|
|
1170
1190
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
1171
1191
|
render: () => t.slots.default && t.slots.default()
|
|
1172
|
-
}),
|
|
1192
|
+
}), h && a.value === "Popup" && i.togglePopup(!0), h && s.value && i.hidePopup(), t.emit("clickButton", { origin: f, value: e.modelValue });
|
|
1173
1193
|
}
|
|
1174
1194
|
}
|
|
1175
|
-
function f
|
|
1176
|
-
t.emit("mouseEnterIcon",
|
|
1195
|
+
function d(f) {
|
|
1196
|
+
t.emit("mouseEnterIcon", f);
|
|
1177
1197
|
}
|
|
1178
|
-
function
|
|
1179
|
-
t.emit("mouseLeaveIcon",
|
|
1198
|
+
function p(f) {
|
|
1199
|
+
t.emit("mouseLeaveIcon", f);
|
|
1180
1200
|
}
|
|
1181
1201
|
return {
|
|
1182
|
-
buttonGroupClass:
|
|
1183
|
-
onClickButton:
|
|
1184
|
-
onMouseEnterButton:
|
|
1185
|
-
onMouseLeaveButton:
|
|
1202
|
+
buttonGroupClass: m,
|
|
1203
|
+
onClickButton: r,
|
|
1204
|
+
onMouseEnterButton: d,
|
|
1205
|
+
onMouseLeaveButton: p,
|
|
1186
1206
|
modalRef: o
|
|
1187
1207
|
};
|
|
1188
1208
|
}
|
|
1189
|
-
function
|
|
1190
|
-
const l = C(),
|
|
1191
|
-
function
|
|
1209
|
+
function Ke(e, t, n, i) {
|
|
1210
|
+
const l = C(), a = C(!1), { judgeCanOpen: s } = J(e, i);
|
|
1211
|
+
function m() {
|
|
1192
1212
|
const o = l.value;
|
|
1193
1213
|
o && o.show(n.value);
|
|
1194
1214
|
}
|
|
1195
|
-
async function
|
|
1215
|
+
async function y(o = !1) {
|
|
1196
1216
|
if (!!t.slots.default) {
|
|
1197
|
-
if (!o && !
|
|
1217
|
+
if (!o && !a.value && !await s())
|
|
1198
1218
|
return;
|
|
1199
|
-
|
|
1219
|
+
a.value = !a.value, await D(), m();
|
|
1200
1220
|
}
|
|
1201
1221
|
}
|
|
1202
|
-
async function
|
|
1222
|
+
async function u(o = !1) {
|
|
1203
1223
|
if (!!t.slots.default) {
|
|
1204
|
-
if (!o && !await
|
|
1224
|
+
if (!o && !await s())
|
|
1205
1225
|
return;
|
|
1206
|
-
|
|
1226
|
+
a.value = !0, await D(), m();
|
|
1207
1227
|
}
|
|
1208
1228
|
}
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1229
|
+
function c() {
|
|
1230
|
+
a.value = !1;
|
|
1211
1231
|
}
|
|
1212
|
-
return { hidePopup:
|
|
1232
|
+
return { hidePopup: c, popup: u, shouldPopupContent: a, togglePopup: y, popoverRef: l };
|
|
1213
1233
|
}
|
|
1214
|
-
function
|
|
1234
|
+
function et(e, t, n) {
|
|
1215
1235
|
const {
|
|
1216
1236
|
buttonGroupClass: i
|
|
1217
1237
|
} = n, l = C();
|
|
1218
1238
|
return {
|
|
1219
|
-
renderButtonGroup: () =>
|
|
1239
|
+
renderButtonGroup: () => I("div", {
|
|
1220
1240
|
id: `${e.id}-button-group`,
|
|
1221
1241
|
class: i.value
|
|
1222
|
-
}, [t.slots.buttonContent ?
|
|
1242
|
+
}, [t.slots.buttonContent ? I("span", {
|
|
1223
1243
|
class: "input-group-text input-group-append-button"
|
|
1224
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
1244
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? I("span", {
|
|
1225
1245
|
class: "input-group-text input-group-append-button",
|
|
1226
1246
|
innerHTML: e.buttonContent,
|
|
1227
1247
|
ref: l
|
|
@@ -1229,79 +1249,45 @@ function Ke(e, t, n) {
|
|
|
1229
1249
|
buttonHandleElement: l
|
|
1230
1250
|
};
|
|
1231
1251
|
}
|
|
1232
|
-
const
|
|
1252
|
+
const tt = /* @__PURE__ */ T({
|
|
1233
1253
|
name: "FButtonEdit",
|
|
1234
1254
|
props: X,
|
|
1235
1255
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1236
1256
|
setup(e, t) {
|
|
1237
|
-
const n = C(), i =
|
|
1257
|
+
const n = C(), i = O("design-item-context"), l = q(n, i), a = C(e.customClass), s = C(e.modelValue), m = Ke(e, t, n, s), y = Ze(e, t, n, m, s), u = C(), c = k(() => ({
|
|
1238
1258
|
"f-cmp-inputgroup": !0,
|
|
1239
1259
|
"input-group": !0,
|
|
1240
1260
|
"f-state-disable": !0,
|
|
1241
1261
|
"f-state-editable": !1,
|
|
1242
1262
|
"f-state-readonly": !0
|
|
1243
1263
|
}));
|
|
1244
|
-
|
|
1264
|
+
U(() => {
|
|
1245
1265
|
n.value.componentInstance = l;
|
|
1246
1266
|
}), t.expose(l.value);
|
|
1247
1267
|
const o = k(() => {
|
|
1248
|
-
const
|
|
1268
|
+
const d = {
|
|
1249
1269
|
"f-button-edit": !0,
|
|
1250
1270
|
"f-cmp-inputgroup": !0,
|
|
1251
1271
|
"f-button-edit-nowrap": !e.wrapText
|
|
1252
1272
|
};
|
|
1253
|
-
return
|
|
1273
|
+
return a.value && a.value.split(" ").reduce((p, f) => (p[f] = !0, p), d), d;
|
|
1254
1274
|
}), {
|
|
1255
|
-
renderButtonGroup:
|
|
1256
|
-
} =
|
|
1257
|
-
return () =>
|
|
1275
|
+
renderButtonGroup: r
|
|
1276
|
+
} = et(e, t, y);
|
|
1277
|
+
return () => I("div", te(t.attrs, {
|
|
1258
1278
|
ref: n,
|
|
1259
1279
|
class: o.value,
|
|
1260
1280
|
id: e.id
|
|
1261
|
-
}), [
|
|
1262
|
-
class:
|
|
1263
|
-
}, [
|
|
1264
|
-
ref:
|
|
1281
|
+
}), [I("div", {
|
|
1282
|
+
class: c.value
|
|
1283
|
+
}, [I("input", {
|
|
1284
|
+
ref: u,
|
|
1265
1285
|
class: "form-control",
|
|
1266
1286
|
readonly: !0,
|
|
1267
1287
|
placeholder: e.placeholder
|
|
1268
|
-
}, null),
|
|
1288
|
+
}, null), r()])]);
|
|
1269
1289
|
}
|
|
1270
1290
|
});
|
|
1271
|
-
function tt(e, t) {
|
|
1272
|
-
e.schema;
|
|
1273
|
-
const n = C(!0), i = C(!0);
|
|
1274
|
-
function l(o) {
|
|
1275
|
-
return !1;
|
|
1276
|
-
}
|
|
1277
|
-
function r() {
|
|
1278
|
-
return !1;
|
|
1279
|
-
}
|
|
1280
|
-
function c() {
|
|
1281
|
-
return !1;
|
|
1282
|
-
}
|
|
1283
|
-
function d() {
|
|
1284
|
-
return !0;
|
|
1285
|
-
}
|
|
1286
|
-
function p(o) {
|
|
1287
|
-
}
|
|
1288
|
-
function s() {
|
|
1289
|
-
}
|
|
1290
|
-
function u(o) {
|
|
1291
|
-
return null;
|
|
1292
|
-
}
|
|
1293
|
-
return {
|
|
1294
|
-
canAccepts: l,
|
|
1295
|
-
checkCanDeleteComponent: r,
|
|
1296
|
-
checkCanMoveComponent: c,
|
|
1297
|
-
hideNestedPaddingInDesginerView: d,
|
|
1298
|
-
onAcceptMovedChildElement: p,
|
|
1299
|
-
resolveComponentContext: s,
|
|
1300
|
-
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1301
|
-
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
1302
|
-
getPropsConfig: u
|
|
1303
|
-
};
|
|
1304
|
-
}
|
|
1305
1291
|
class nt {
|
|
1306
1292
|
constructor(t, n) {
|
|
1307
1293
|
v(this, "componentId");
|
|
@@ -1327,13 +1313,14 @@ class nt {
|
|
|
1327
1313
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1328
1314
|
}
|
|
1329
1315
|
setDesignViewModelField(t) {
|
|
1316
|
+
var i;
|
|
1330
1317
|
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1331
1318
|
if (n) {
|
|
1332
1319
|
if (!this.designViewModelField) {
|
|
1333
|
-
const
|
|
1334
|
-
this.designViewModelField =
|
|
1320
|
+
const l = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1321
|
+
this.designViewModelField = l.fields.find((a) => a.id === n);
|
|
1335
1322
|
}
|
|
1336
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
1323
|
+
t.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
1337
1324
|
}
|
|
1338
1325
|
}
|
|
1339
1326
|
changeFieldEditorType(t, n) {
|
|
@@ -1393,8 +1380,8 @@ class nt {
|
|
|
1393
1380
|
const i = n && n.parent && n.parent.schema;
|
|
1394
1381
|
if (!i)
|
|
1395
1382
|
return;
|
|
1396
|
-
const l = i.contents.findIndex((
|
|
1397
|
-
i.contents.splice(l, 1), i.contents.splice(l, 0,
|
|
1383
|
+
const l = i.contents.findIndex((s) => s.id === t), a = R(i.contents[l]);
|
|
1384
|
+
i.contents.splice(l, 1), i.contents.splice(l, 0, a);
|
|
1398
1385
|
}
|
|
1399
1386
|
}
|
|
1400
1387
|
const x = class x {
|
|
@@ -1410,7 +1397,7 @@ const x = class x {
|
|
|
1410
1397
|
*/
|
|
1411
1398
|
static getAllInputTypes() {
|
|
1412
1399
|
const t = [];
|
|
1413
|
-
for (
|
|
1400
|
+
for (const n in x.fieldControlTypeMapping)
|
|
1414
1401
|
x.fieldControlTypeMapping[n].forEach((i) => {
|
|
1415
1402
|
t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
1416
1403
|
});
|
|
@@ -1503,76 +1490,76 @@ function lt(e) {
|
|
|
1503
1490
|
let t, n;
|
|
1504
1491
|
const i = /* @__PURE__ */ new Map();
|
|
1505
1492
|
let l = [];
|
|
1506
|
-
function
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1493
|
+
function a(c, o) {
|
|
1494
|
+
const d = c.split(" ").filter((S) => S.startsWith("col-"));
|
|
1495
|
+
if (d.length === 0) {
|
|
1509
1496
|
o.isSupportedClass = !1;
|
|
1510
1497
|
return;
|
|
1511
1498
|
}
|
|
1512
|
-
let
|
|
1513
|
-
|
|
1514
|
-
}
|
|
1515
|
-
function c
|
|
1516
|
-
let
|
|
1517
|
-
|
|
1518
|
-
if (
|
|
1519
|
-
|
|
1499
|
+
let p = d.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), f = d.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), h = d.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), b = d.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
|
|
1500
|
+
p = p || "col-12", o.columnInSM = parseInt(p.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), f = f || "col-md-" + o.columnInSM, o.columnInMD = parseInt(f.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), h = h || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(h.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);
|
|
1501
|
+
}
|
|
1502
|
+
function s(c, o, r, d = !1) {
|
|
1503
|
+
let p = !1;
|
|
1504
|
+
c.contents.forEach((f) => {
|
|
1505
|
+
if (f.type === "fieldset") {
|
|
1506
|
+
r += 1, s(f, o, r, !0), p = !0;
|
|
1520
1507
|
return;
|
|
1521
1508
|
}
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1509
|
+
p && (r += 1, p = !1);
|
|
1510
|
+
const h = f.appearance && f.appearance.class, b = new it();
|
|
1511
|
+
h ? a(h, b) : b.isSupportedClass = !1, b.label = f.label || f.id, b.id = f.id, b.group = r, d && (b.fieldSetId = c.id), n === f.id && (t = r), i.set(f.id, f), o.push(b);
|
|
1525
1512
|
});
|
|
1526
1513
|
}
|
|
1527
|
-
function
|
|
1528
|
-
const o = e.getComponentById(
|
|
1514
|
+
function m(c) {
|
|
1515
|
+
const o = e.getComponentById(c);
|
|
1529
1516
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1530
1517
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1531
|
-
const
|
|
1532
|
-
return !
|
|
1533
|
-
}
|
|
1534
|
-
function
|
|
1535
|
-
o = o ||
|
|
1536
|
-
const { result:
|
|
1537
|
-
if (!
|
|
1538
|
-
return { result:
|
|
1539
|
-
n =
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1518
|
+
const r = e.selectNode(o, (d) => d.type === G["response-form"].type);
|
|
1519
|
+
return !r || !r.contents || r.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: r };
|
|
1520
|
+
}
|
|
1521
|
+
function y(c, o) {
|
|
1522
|
+
o = o || c.id;
|
|
1523
|
+
const { result: r, message: d, formNode: p } = m(o);
|
|
1524
|
+
if (!r)
|
|
1525
|
+
return { result: r, message: d };
|
|
1526
|
+
n = c.id, l = [], i.clear();
|
|
1527
|
+
const f = p.contents[0].type === G.fieldset.type ? 0 : 1;
|
|
1528
|
+
s(p, l, f);
|
|
1529
|
+
const h = l.find((S) => !S.isSupportedClass);
|
|
1543
1530
|
return {
|
|
1544
1531
|
defaultState: {
|
|
1545
1532
|
defaultGroupNumber: t || 1,
|
|
1546
|
-
model:
|
|
1533
|
+
model: h ? "customize" : "standard"
|
|
1547
1534
|
},
|
|
1548
1535
|
importData: l
|
|
1549
1536
|
};
|
|
1550
1537
|
}
|
|
1551
|
-
function
|
|
1538
|
+
function u(c, o) {
|
|
1552
1539
|
o = o;
|
|
1553
|
-
const { result:
|
|
1554
|
-
if (!
|
|
1540
|
+
const { result: r, formNode: d } = m(o);
|
|
1541
|
+
if (!r)
|
|
1555
1542
|
return "";
|
|
1556
|
-
const
|
|
1557
|
-
return
|
|
1543
|
+
const p = [];
|
|
1544
|
+
return c.forEach((f) => {
|
|
1558
1545
|
var S;
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1546
|
+
const h = i.get(f.id), b = h.appearance && h.appearance.class;
|
|
1547
|
+
if (b) {
|
|
1548
|
+
const B = b.split(" ").filter((Q) => !Q.startsWith("col-")), F = "col-" + f.columnInSM, M = "col-md-" + f.columnInMD, V = "col-xl-" + f.columnInLG, A = "col-el-" + f.columnInEL, j = [F, M, V, A].concat(B);
|
|
1549
|
+
h.appearance.class = j.join(" ");
|
|
1563
1550
|
}
|
|
1564
|
-
if (
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1551
|
+
if (f.fieldSetId) {
|
|
1552
|
+
const w = d.contents.find((F) => F.id === f.fieldSetId), B = p.find((F) => F.id === f.fieldSetId);
|
|
1553
|
+
B ? (S = B.contents) == null || S.push(h) : (p.push(w), w.contents = [h]);
|
|
1567
1554
|
} else
|
|
1568
|
-
|
|
1569
|
-
}),
|
|
1555
|
+
p.push(h);
|
|
1556
|
+
}), d.contents = p, d.id;
|
|
1570
1557
|
}
|
|
1571
1558
|
return {
|
|
1572
|
-
checkCanFindFormNode:
|
|
1573
|
-
checkCanOpenLayoutEditor:
|
|
1574
|
-
changeFormControlsByResponseLayoutConfig:
|
|
1575
|
-
getResonseFormLayoutConfig:
|
|
1559
|
+
checkCanFindFormNode: m,
|
|
1560
|
+
checkCanOpenLayoutEditor: y,
|
|
1561
|
+
changeFormControlsByResponseLayoutConfig: u,
|
|
1562
|
+
getResonseFormLayoutConfig: s
|
|
1576
1563
|
};
|
|
1577
1564
|
}
|
|
1578
1565
|
class at extends nt {
|
|
@@ -1585,11 +1572,9 @@ class at extends nt {
|
|
|
1585
1572
|
return this.propertyConfig.categories.basic = this.getBasicProperties(n, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, i), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
1586
1573
|
}
|
|
1587
1574
|
getBasicProperties(n, i) {
|
|
1588
|
-
var
|
|
1589
|
-
|
|
1590
|
-
this.setDesignViewModelField(n)
|
|
1591
|
-
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1592
|
-
return {
|
|
1575
|
+
var a;
|
|
1576
|
+
const l = this;
|
|
1577
|
+
return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
1593
1578
|
description: "Basic Information",
|
|
1594
1579
|
title: "基本信息",
|
|
1595
1580
|
properties: {
|
|
@@ -1610,7 +1595,7 @@ class at extends nt {
|
|
|
1610
1595
|
textField: "value",
|
|
1611
1596
|
valueField: "key",
|
|
1612
1597
|
editable: !1,
|
|
1613
|
-
data: l.designViewModelField ? L.getEditorTypesByMDataType((
|
|
1598
|
+
data: l.designViewModelField ? L.getEditorTypesByMDataType((a = l.designViewModelField.type) == null ? void 0 : a.name) : L.getAllInputTypes()
|
|
1614
1599
|
}
|
|
1615
1600
|
},
|
|
1616
1601
|
label: {
|
|
@@ -1621,33 +1606,29 @@ class at extends nt {
|
|
|
1621
1606
|
binding: {
|
|
1622
1607
|
description: "绑定的表单字段",
|
|
1623
1608
|
title: "绑定",
|
|
1624
|
-
$converter: "/converter/field-selector.converter",
|
|
1625
1609
|
editor: {
|
|
1626
|
-
type: "
|
|
1610
|
+
type: "binding-selector",
|
|
1627
1611
|
bindingType: { enable: !1 },
|
|
1628
1612
|
editorParams: {
|
|
1629
|
-
|
|
1630
|
-
|
|
1613
|
+
componentSchema: n,
|
|
1614
|
+
needSyncToViewModel: !0,
|
|
1615
|
+
viewModelId: this.viewModelId,
|
|
1616
|
+
designerHostService: this.designerHostService,
|
|
1617
|
+
disableOccupiedFields: !0
|
|
1631
1618
|
},
|
|
1632
|
-
|
|
1633
|
-
{ field: "name", title: "字段名称" },
|
|
1634
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1635
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1636
|
-
],
|
|
1637
|
-
textField: "bindingField",
|
|
1638
|
-
data: c
|
|
1619
|
+
textField: "bindingField"
|
|
1639
1620
|
}
|
|
1640
1621
|
}
|
|
1641
1622
|
},
|
|
1642
|
-
setPropertyRelates(
|
|
1643
|
-
if (
|
|
1644
|
-
switch (
|
|
1623
|
+
setPropertyRelates(s, m) {
|
|
1624
|
+
if (s)
|
|
1625
|
+
switch (s && s.propertyID) {
|
|
1645
1626
|
case "type": {
|
|
1646
|
-
l.changeControlType(n,
|
|
1627
|
+
l.changeControlType(n, s, i);
|
|
1647
1628
|
break;
|
|
1648
1629
|
}
|
|
1649
1630
|
case "label": {
|
|
1650
|
-
|
|
1631
|
+
s.needRefreshControlTree = !0;
|
|
1651
1632
|
break;
|
|
1652
1633
|
}
|
|
1653
1634
|
}
|
|
@@ -1655,7 +1636,7 @@ class at extends nt {
|
|
|
1655
1636
|
};
|
|
1656
1637
|
}
|
|
1657
1638
|
getAppearanceProperties(n, i) {
|
|
1658
|
-
|
|
1639
|
+
const l = this;
|
|
1659
1640
|
return {
|
|
1660
1641
|
title: "样式",
|
|
1661
1642
|
description: "Appearance",
|
|
@@ -1685,14 +1666,14 @@ class at extends nt {
|
|
|
1685
1666
|
}
|
|
1686
1667
|
}
|
|
1687
1668
|
},
|
|
1688
|
-
setPropertyRelates(
|
|
1689
|
-
if (
|
|
1690
|
-
switch (
|
|
1669
|
+
setPropertyRelates(a, s) {
|
|
1670
|
+
if (a)
|
|
1671
|
+
switch (a && a.propertyID) {
|
|
1691
1672
|
case "responseLayout":
|
|
1692
|
-
l.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(
|
|
1673
|
+
l.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, l.componentId || n.id), l.updateUnifiedLayoutAfterResponseLayoutChanged(l.componentId), l.updateElementByParentContainer(n.id, i), delete n.responseLayout;
|
|
1693
1674
|
break;
|
|
1694
1675
|
case "class":
|
|
1695
|
-
l.updateUnifiedLayoutAfterControlChanged(
|
|
1676
|
+
l.updateUnifiedLayoutAfterControlChanged(a.propertyValue, n.id, this.componentId), l.updateElementByParentContainer(n.id, i);
|
|
1696
1677
|
break;
|
|
1697
1678
|
}
|
|
1698
1679
|
}
|
|
@@ -1707,43 +1688,43 @@ class at extends nt {
|
|
|
1707
1688
|
* @param newControlType 新控件类型
|
|
1708
1689
|
*/
|
|
1709
1690
|
changeControlType(n, i, l) {
|
|
1710
|
-
var
|
|
1711
|
-
const
|
|
1712
|
-
if (!
|
|
1691
|
+
var c, o, r, d;
|
|
1692
|
+
const a = i.propertyValue, s = l && l.parent && l.parent.schema;
|
|
1693
|
+
if (!s)
|
|
1713
1694
|
return;
|
|
1714
|
-
const
|
|
1715
|
-
let
|
|
1695
|
+
const m = s.contents.findIndex((p) => p.id === n.id), y = s.contents[m];
|
|
1696
|
+
let u;
|
|
1716
1697
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1717
1698
|
editor: {
|
|
1718
|
-
$type:
|
|
1699
|
+
$type: a
|
|
1719
1700
|
},
|
|
1720
1701
|
name: this.designViewModelField.name,
|
|
1721
1702
|
require: this.designViewModelField.require,
|
|
1722
1703
|
readonly: this.designViewModelField.readonly
|
|
1723
|
-
}, !1),
|
|
1724
|
-
id:
|
|
1725
|
-
appearance:
|
|
1726
|
-
size:
|
|
1727
|
-
label:
|
|
1728
|
-
binding:
|
|
1729
|
-
visible:
|
|
1730
|
-
}), Object.assign(
|
|
1731
|
-
isTextArea:
|
|
1732
|
-
placeholder: (
|
|
1733
|
-
holdPlace: (o =
|
|
1734
|
-
readonly: (
|
|
1735
|
-
require: (
|
|
1736
|
-
}),
|
|
1737
|
-
(
|
|
1704
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), u || (u = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(u, {
|
|
1705
|
+
id: y.id,
|
|
1706
|
+
appearance: y.appearance,
|
|
1707
|
+
size: y.size,
|
|
1708
|
+
label: y.label,
|
|
1709
|
+
binding: y.binding,
|
|
1710
|
+
visible: y.visible
|
|
1711
|
+
}), Object.assign(u.editor, {
|
|
1712
|
+
isTextArea: u.isTextArea && y.isTextArea,
|
|
1713
|
+
placeholder: (c = y.editor) == null ? void 0 : c.placeholder,
|
|
1714
|
+
holdPlace: (o = y.editor) == null ? void 0 : o.holdPlace,
|
|
1715
|
+
readonly: (r = y.editor) == null ? void 0 : r.readonly,
|
|
1716
|
+
require: (d = y.editor) == null ? void 0 : d.require
|
|
1717
|
+
}), s.contents.splice(m, 1), s.contents.splice(m, 0, u), l.schema = Object.assign(y, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1718
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1738
1719
|
), ot.value++;
|
|
1739
1720
|
}
|
|
1740
1721
|
getComponentConfig(n, i = {}, l = {}) {
|
|
1741
|
-
const
|
|
1722
|
+
const a = Object.assign({
|
|
1742
1723
|
description: "编辑器",
|
|
1743
1724
|
title: "编辑器",
|
|
1744
1725
|
type: "input-group",
|
|
1745
1726
|
$converter: "/converter/property-editor.converter"
|
|
1746
|
-
}, i),
|
|
1727
|
+
}, i), s = Object.assign({
|
|
1747
1728
|
readonly: {
|
|
1748
1729
|
description: "",
|
|
1749
1730
|
title: "只读",
|
|
@@ -1765,7 +1746,7 @@ class at extends nt {
|
|
|
1765
1746
|
type: "string"
|
|
1766
1747
|
}
|
|
1767
1748
|
}, l);
|
|
1768
|
-
return { ...
|
|
1749
|
+
return { ...a, properties: { ...s } };
|
|
1769
1750
|
}
|
|
1770
1751
|
/**
|
|
1771
1752
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1774,17 +1755,17 @@ class at extends nt {
|
|
|
1774
1755
|
* @param componentId 控件所在组件id
|
|
1775
1756
|
*/
|
|
1776
1757
|
updateUnifiedLayoutAfterControlChanged(n, i, l) {
|
|
1777
|
-
const
|
|
1778
|
-
let
|
|
1779
|
-
|
|
1780
|
-
const
|
|
1758
|
+
const a = n.split(" ");
|
|
1759
|
+
let s = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), m = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), y = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), u = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1760
|
+
s = s || "col-12", m = m || "col-md-" + s.replace("col-", ""), y = y || "col-xl-" + m.replace("col-md-", ""), u = u || "col-el-" + y.replace("col-xl-", "");
|
|
1761
|
+
const c = {
|
|
1781
1762
|
id: i,
|
|
1782
|
-
columnInSM: parseInt(
|
|
1783
|
-
columnInMD: parseInt(
|
|
1784
|
-
columnInLG: parseInt(
|
|
1785
|
-
columnInEL: parseInt(
|
|
1763
|
+
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
1764
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
1765
|
+
columnInLG: parseInt(y.replace("col-xl-", ""), 10),
|
|
1766
|
+
columnInEL: parseInt(u.replace("col-el-", ""), 10)
|
|
1786
1767
|
};
|
|
1787
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(l,
|
|
1768
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(l, c);
|
|
1788
1769
|
}
|
|
1789
1770
|
/**
|
|
1790
1771
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1795,17 +1776,17 @@ class at extends nt {
|
|
|
1795
1776
|
const { formNode: l } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
1796
1777
|
if (!l || !l.unifiedLayout)
|
|
1797
1778
|
return;
|
|
1798
|
-
const
|
|
1799
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(l,
|
|
1800
|
-
const
|
|
1801
|
-
Object.assign(
|
|
1779
|
+
const a = [];
|
|
1780
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(l, a, 1), i) {
|
|
1781
|
+
const p = a.find((f) => f.id === i.id);
|
|
1782
|
+
Object.assign(p || {}, i);
|
|
1802
1783
|
}
|
|
1803
|
-
const
|
|
1784
|
+
const s = a.map((p) => p.columnInSM), m = a.map((p) => p.columnInMD), y = a.map((p) => p.columnInLG), u = a.map((p) => p.columnInEL), c = this.checkIsUniqueColumn(s) ? s[0] : null, o = this.checkIsUniqueColumn(m) ? m[0] : null, r = this.checkIsUniqueColumn(y) ? y[0] : null, d = this.checkIsUniqueColumn(u) ? u[0] : null;
|
|
1804
1785
|
Object.assign(l.unifiedLayout, {
|
|
1805
|
-
uniqueColClassInSM:
|
|
1786
|
+
uniqueColClassInSM: c,
|
|
1806
1787
|
uniqueColClassInMD: o,
|
|
1807
|
-
uniqueColClassInLG:
|
|
1808
|
-
uniqueColClassInEL:
|
|
1788
|
+
uniqueColClassInLG: r,
|
|
1789
|
+
uniqueColClassInEL: d
|
|
1809
1790
|
});
|
|
1810
1791
|
}
|
|
1811
1792
|
/**
|
|
@@ -1821,60 +1802,84 @@ class rt extends at {
|
|
|
1821
1802
|
super(t, n);
|
|
1822
1803
|
}
|
|
1823
1804
|
getEditorProperties(t) {
|
|
1824
|
-
|
|
1805
|
+
const n = this.getComponentConfig(t, { type: "combo-list" }, {
|
|
1825
1806
|
editable: {
|
|
1826
1807
|
description: "",
|
|
1827
1808
|
title: "允许编辑",
|
|
1828
1809
|
type: "boolean"
|
|
1829
1810
|
},
|
|
1811
|
+
enableClear: {
|
|
1812
|
+
description: "",
|
|
1813
|
+
title: "启用清空",
|
|
1814
|
+
type: "boolean"
|
|
1815
|
+
},
|
|
1830
1816
|
textField: {
|
|
1817
|
+
visible: !1,
|
|
1831
1818
|
description: "",
|
|
1832
1819
|
title: "数据源显示字段",
|
|
1833
1820
|
type: "string"
|
|
1834
1821
|
},
|
|
1835
|
-
|
|
1822
|
+
valueField: {
|
|
1823
|
+
visible: !1,
|
|
1836
1824
|
description: "",
|
|
1837
1825
|
title: "数据源值字段",
|
|
1838
1826
|
type: "string"
|
|
1827
|
+
},
|
|
1828
|
+
idField: {
|
|
1829
|
+
visible: !1,
|
|
1830
|
+
description: "",
|
|
1831
|
+
title: "数据源标识字段",
|
|
1832
|
+
type: "string"
|
|
1833
|
+
},
|
|
1834
|
+
data: {
|
|
1835
|
+
description: "",
|
|
1836
|
+
title: "数据",
|
|
1837
|
+
type: "array",
|
|
1838
|
+
editor: {
|
|
1839
|
+
columns: [
|
|
1840
|
+
{ field: t.editor.valueField, title: "值", dataType: "string" },
|
|
1841
|
+
{ field: t.editor.textField, title: "名称", dataType: "string" },
|
|
1842
|
+
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
1843
|
+
],
|
|
1844
|
+
type: "item-collection-editor",
|
|
1845
|
+
valueField: t.editor.valueField,
|
|
1846
|
+
nameField: t.editor.textField,
|
|
1847
|
+
requiredFields: [t.editor.valueField, t.editor.textField],
|
|
1848
|
+
uniqueFields: [t.editor.valueField, t.editor.textField]
|
|
1849
|
+
},
|
|
1850
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1851
|
+
refreshPanelAfterChanged: !0
|
|
1839
1852
|
}
|
|
1840
1853
|
});
|
|
1854
|
+
return n.setPropertyRelates = function(i) {
|
|
1855
|
+
if (i)
|
|
1856
|
+
switch (i.propertyID) {
|
|
1857
|
+
case "data": {
|
|
1858
|
+
i.propertyValue.parameters && (t.editor.valueField = i.propertyValue.parameters.valueField, t.editor.textField = i.propertyValue.parameters.nameField), t.editor.data = i.propertyValue.value;
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}, n;
|
|
1841
1863
|
}
|
|
1842
1864
|
}
|
|
1843
1865
|
function st(e, t) {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
checkCanMoveComponent: l,
|
|
1848
|
-
hideNestedPaddingInDesginerView: r,
|
|
1849
|
-
onAcceptMovedChildElement: c,
|
|
1850
|
-
resolveComponentContext: d,
|
|
1851
|
-
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1852
|
-
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
1853
|
-
} = tt(e), u = e.schema;
|
|
1854
|
-
function o(a, f) {
|
|
1855
|
-
return new rt(a, t).getPropertyConfig(u, f);
|
|
1866
|
+
const n = e.schema;
|
|
1867
|
+
function i(l, a) {
|
|
1868
|
+
return new rt(l, t).getPropertyConfig(n, a);
|
|
1856
1869
|
}
|
|
1857
1870
|
return {
|
|
1858
|
-
|
|
1859
|
-
checkCanDeleteComponent: i,
|
|
1860
|
-
checkCanMoveComponent: l,
|
|
1861
|
-
hideNestedPaddingInDesginerView: r,
|
|
1862
|
-
onAcceptMovedChildElement: c,
|
|
1863
|
-
resolveComponentContext: d,
|
|
1864
|
-
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1865
|
-
triggerBelongedComponentToDeleteWhenDeleted: s,
|
|
1866
|
-
getPropsConfig: o
|
|
1871
|
+
getPropsConfig: i
|
|
1867
1872
|
};
|
|
1868
1873
|
}
|
|
1869
|
-
const ut = /* @__PURE__ */
|
|
1874
|
+
const ut = /* @__PURE__ */ T({
|
|
1870
1875
|
name: "FComboListDesign",
|
|
1871
|
-
props:
|
|
1876
|
+
props: $,
|
|
1872
1877
|
emits: ["clear", "update:modelValue", "change"],
|
|
1873
1878
|
setup(e, t) {
|
|
1874
|
-
const n = C(), i =
|
|
1875
|
-
return
|
|
1876
|
-
n.value.componentInstance =
|
|
1877
|
-
}), t.expose(
|
|
1879
|
+
const n = C(), i = O("designer-host-service"), l = O("design-item-context"), a = st(l, i), s = q(n, l, a);
|
|
1880
|
+
return U(() => {
|
|
1881
|
+
n.value.componentInstance = s;
|
|
1882
|
+
}), t.expose(s.value), () => I(tt, {
|
|
1878
1883
|
ref: n,
|
|
1879
1884
|
buttonContent: e.dropDownIcon,
|
|
1880
1885
|
readonly: !0,
|
|
@@ -1884,24 +1889,19 @@ const ut = /* @__PURE__ */ E({
|
|
|
1884
1889
|
enableClear: !0
|
|
1885
1890
|
}, null);
|
|
1886
1891
|
}
|
|
1887
|
-
})
|
|
1888
|
-
const t = e;
|
|
1889
|
-
return t.install = function(n) {
|
|
1890
|
-
n.component(t.name, e);
|
|
1891
|
-
}, e;
|
|
1892
|
-
};
|
|
1892
|
+
});
|
|
1893
1893
|
P.register = (e, t, n, i) => {
|
|
1894
1894
|
e["combo-list"] = P, t["combo-list"] = z;
|
|
1895
1895
|
};
|
|
1896
1896
|
P.registerDesigner = (e, t, n) => {
|
|
1897
1897
|
e["combo-list"] = ut, t["combo-list"] = z;
|
|
1898
1898
|
};
|
|
1899
|
-
const bt =
|
|
1899
|
+
const bt = le(P);
|
|
1900
1900
|
export {
|
|
1901
1901
|
P as FComboList,
|
|
1902
|
-
|
|
1902
|
+
Me as Placement,
|
|
1903
1903
|
Be as ViewType,
|
|
1904
|
-
|
|
1904
|
+
$ as comboListProps,
|
|
1905
1905
|
bt as default,
|
|
1906
1906
|
z as propsResolver
|
|
1907
1907
|
};
|