@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,106 +1,111 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { useIdentify as
|
|
7
|
-
import { FCheckBox as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { resolveAppearance as
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var be = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var T = (e, t, n) => be(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as b, computed as B, createVNode as h, Fragment as X, watch as H, withModifiers as Ce, withDirectives as Se, vModelText as we, defineComponent as x, Teleport as Fe, createApp as ke, onUnmounted as Ie, inject as N, nextTick as te, onMounted as J, mergeProps as Me } from "vue";
|
|
5
|
+
import { isPlainObject as ne, cloneDeep as re } from "lodash-es";
|
|
6
|
+
import { useIdentify as Be, useHierarchy as Ve, useGroupData as Oe, usePagination as Te, useDataView as Pe, useSelection as Le, useEdit as Ee, useVisualDataBound as $e, useVisualDataCell as De, useVisualDataRow as Ae, useVisualGroupRow as je, useVisualSummaryRow as Re, useVisualData as xe } from "../data-view/index.esm.js";
|
|
7
|
+
import { FCheckBox as Q } from "../checkbox/index.esm.js";
|
|
8
|
+
import He from "../list-view/index.esm.js";
|
|
9
|
+
import Ge from "../button-edit/index.esm.js";
|
|
10
|
+
import { resolveAppearance as Ne } from "../dynamic-resolver/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as se, DgControl as oe } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { withInstall as Ue } from "../common/index.esm.js";
|
|
13
|
+
const ce = {}, ue = {};
|
|
14
|
+
function Y(e) {
|
|
15
|
+
const { properties: t, title: n, ignore: l } = e, i = l && Array.isArray(l), a = Object.keys(t).reduce((r, c) => ((!i || !l.find((m) => m === c)) && (r[c] = t[c].type === "object" && t[c].properties ? Y(t[c]) : re(t[c].default)), r), {});
|
|
16
|
+
if (n && (!i || !l.find((r) => r === "id"))) {
|
|
17
|
+
const r = n.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
16
21
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
let i =
|
|
21
|
-
const
|
|
22
|
-
return i =
|
|
22
|
+
function de(e, t = {}, n) {
|
|
23
|
+
const l = ce[e];
|
|
24
|
+
if (l) {
|
|
25
|
+
let i = Y(l);
|
|
26
|
+
const a = ue[e];
|
|
27
|
+
return i = a ? a({ getSchemaByType: de }, i, t, n) : i, i;
|
|
23
28
|
}
|
|
24
29
|
return null;
|
|
25
30
|
}
|
|
26
|
-
function
|
|
27
|
-
const n =
|
|
28
|
-
return Object.keys(
|
|
31
|
+
function qe(e, t) {
|
|
32
|
+
const n = Y(t);
|
|
33
|
+
return Object.keys(n).reduce((l, i) => (l[i] && ne(l[i]) && ne(e[i] || !e[i]) ? Object.assign(l[i], e[i] || {}) : l[i] = e[i], l), n), n;
|
|
29
34
|
}
|
|
30
|
-
function
|
|
31
|
-
return Object.keys(e).filter((
|
|
35
|
+
function We(e, t) {
|
|
36
|
+
return Object.keys(e).filter((l) => e[l] != null).reduce((l, i) => {
|
|
32
37
|
if (t.has(i)) {
|
|
33
|
-
const
|
|
34
|
-
if (typeof
|
|
35
|
-
a
|
|
38
|
+
const a = t.get(i);
|
|
39
|
+
if (typeof a == "string")
|
|
40
|
+
l[a] = e[i];
|
|
36
41
|
else {
|
|
37
|
-
const r =
|
|
38
|
-
Object.assign(
|
|
42
|
+
const r = a(i, e[i], e);
|
|
43
|
+
Object.assign(l, r);
|
|
39
44
|
}
|
|
40
45
|
} else
|
|
41
|
-
|
|
42
|
-
return
|
|
46
|
+
l[i] = e[i];
|
|
47
|
+
return l;
|
|
43
48
|
}, {});
|
|
44
49
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return
|
|
50
|
+
function _e(e, t, n = /* @__PURE__ */ new Map()) {
|
|
51
|
+
const l = qe(e, t);
|
|
52
|
+
return We(l, n);
|
|
48
53
|
}
|
|
49
|
-
function
|
|
50
|
-
function t(
|
|
54
|
+
function ze(e = {}) {
|
|
55
|
+
function t(p, u, o, s) {
|
|
51
56
|
if (typeof o == "number")
|
|
52
|
-
return s[
|
|
57
|
+
return s[p].length === o;
|
|
53
58
|
if (typeof o == "object") {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return Number(s[
|
|
57
|
-
if (
|
|
58
|
-
return Number(s[
|
|
59
|
-
if (
|
|
60
|
-
return Number(s[
|
|
59
|
+
const g = Object.keys(o)[0], y = o[g];
|
|
60
|
+
if (g === "not")
|
|
61
|
+
return Number(s[p].length) !== Number(y);
|
|
62
|
+
if (g === "moreThan")
|
|
63
|
+
return Number(s[p].length) >= Number(y);
|
|
64
|
+
if (g === "lessThan")
|
|
65
|
+
return Number(s[p].length) <= Number(y);
|
|
61
66
|
}
|
|
62
67
|
return !1;
|
|
63
68
|
}
|
|
64
|
-
function n(
|
|
65
|
-
return s[
|
|
69
|
+
function n(p, u, o, s) {
|
|
70
|
+
return s[p] && s[p].propertyValue && String(s[p].propertyValue.value) === String(o);
|
|
66
71
|
}
|
|
67
|
-
const
|
|
72
|
+
const l = /* @__PURE__ */ new Map([
|
|
68
73
|
["length", t],
|
|
69
74
|
["getProperty", n]
|
|
70
75
|
]);
|
|
71
|
-
Object.keys(e).reduce((
|
|
72
|
-
function i(
|
|
73
|
-
const o =
|
|
74
|
-
return typeof
|
|
76
|
+
Object.keys(e).reduce((p, u) => (p.set(u, e[u]), p), l);
|
|
77
|
+
function i(p, u) {
|
|
78
|
+
const o = p;
|
|
79
|
+
return typeof u == "number" ? [{ target: o, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!u }] : typeof u == "object" ? Object.keys(u).map((s) => {
|
|
75
80
|
if (s === "length")
|
|
76
|
-
return { target: o, operator: "length", param: null, value:
|
|
77
|
-
const
|
|
78
|
-
return { target: o, operator: "getProperty", param:
|
|
81
|
+
return { target: o, operator: "length", param: null, value: u[s] };
|
|
82
|
+
const g = s, y = u[s];
|
|
83
|
+
return { target: o, operator: "getProperty", param: g, value: y };
|
|
79
84
|
}) : [];
|
|
80
85
|
}
|
|
81
|
-
function
|
|
82
|
-
return Object.keys(
|
|
83
|
-
const
|
|
84
|
-
return o.push(...
|
|
86
|
+
function a(p) {
|
|
87
|
+
return Object.keys(p).reduce((o, s) => {
|
|
88
|
+
const g = i(s, p[s]);
|
|
89
|
+
return o.push(...g), o;
|
|
85
90
|
}, []);
|
|
86
91
|
}
|
|
87
|
-
function r(
|
|
88
|
-
if (
|
|
89
|
-
const o =
|
|
90
|
-
return o && o(
|
|
92
|
+
function r(p, u) {
|
|
93
|
+
if (l.has(p.operator)) {
|
|
94
|
+
const o = l.get(p.operator);
|
|
95
|
+
return o && o(p.target, p.param, p.value, u) || !1;
|
|
91
96
|
}
|
|
92
97
|
return !1;
|
|
93
98
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
99
|
+
function c(p, u) {
|
|
100
|
+
return a(p).reduce((g, y) => g && r(y, u), !0);
|
|
96
101
|
}
|
|
97
|
-
function
|
|
98
|
-
const o = Object.keys(
|
|
102
|
+
function m(p, u) {
|
|
103
|
+
const o = Object.keys(p), s = o.includes("allOf"), g = o.includes("anyOf"), y = s || g, v = (y ? p[y ? s ? "allOf" : "anyOf" : "allOf"] : [p]).map((w) => c(w, u));
|
|
99
104
|
return s ? !v.includes(!1) : v.includes(!0);
|
|
100
105
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
106
|
+
return { parseValueSchema: m };
|
|
102
107
|
}
|
|
103
|
-
const
|
|
108
|
+
const I = {
|
|
104
109
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
110
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
111
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -138,21 +143,22 @@ const F = {
|
|
|
138
143
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
139
144
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
145
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
141
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
142
|
-
|
|
143
|
-
Xe
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
147
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
148
|
+
}, Xe = {}, Je = {};
|
|
149
|
+
ze();
|
|
150
|
+
function _(e, t, n = /* @__PURE__ */ new Map(), l = (r, c, m, p) => c, i = {}, a = (r) => r) {
|
|
151
|
+
return ce[t.title] = t, ue[t.title] = l, Xe[t.title] = i, Je[t.title] = a, (r = {}) => {
|
|
152
|
+
const c = _e(r, t, n), m = Object.keys(e).reduce((p, u) => (p[u] = e[u].default, p), {});
|
|
153
|
+
return Object.assign(m, c);
|
|
148
154
|
};
|
|
149
155
|
}
|
|
150
|
-
function
|
|
156
|
+
function Z(e, t) {
|
|
151
157
|
return { customClass: t.class, customStyle: t.style };
|
|
152
158
|
}
|
|
153
|
-
const
|
|
154
|
-
["appearance",
|
|
155
|
-
]),
|
|
159
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
160
|
+
["appearance", Z]
|
|
161
|
+
]), Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/order.schema.json", Ke = "order", et = "A Farris Component", tt = "object", nt = {
|
|
156
162
|
id: {
|
|
157
163
|
description: "The unique identifier for a order",
|
|
158
164
|
type: "string"
|
|
@@ -244,22 +250,22 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
244
250
|
type: "sting",
|
|
245
251
|
default: ""
|
|
246
252
|
}
|
|
247
|
-
},
|
|
253
|
+
}, ot = [
|
|
248
254
|
"id",
|
|
249
255
|
"type"
|
|
250
|
-
],
|
|
251
|
-
$schema:
|
|
252
|
-
$id:
|
|
253
|
-
title:
|
|
254
|
-
description:
|
|
255
|
-
type:
|
|
256
|
-
properties:
|
|
257
|
-
required:
|
|
256
|
+
], lt = {
|
|
257
|
+
$schema: Ye,
|
|
258
|
+
$id: Ze,
|
|
259
|
+
title: Ke,
|
|
260
|
+
description: et,
|
|
261
|
+
type: tt,
|
|
262
|
+
properties: nt,
|
|
263
|
+
required: ot
|
|
258
264
|
};
|
|
259
265
|
function it(e, t, n) {
|
|
260
266
|
return t;
|
|
261
267
|
}
|
|
262
|
-
const
|
|
268
|
+
const at = "order", rt = "A Farris Component", st = "object", ct = {
|
|
263
269
|
basic: {
|
|
264
270
|
description: "Basic Infomation",
|
|
265
271
|
title: "基本信息",
|
|
@@ -330,7 +336,7 @@ const rt = "order", st = "A Farris Component", ct = "object", ut = {
|
|
|
330
336
|
},
|
|
331
337
|
{
|
|
332
338
|
value: "center",
|
|
333
|
-
name: "
|
|
339
|
+
name: "居中"
|
|
334
340
|
},
|
|
335
341
|
{
|
|
336
342
|
value: "right",
|
|
@@ -341,12 +347,12 @@ const rt = "order", st = "A Farris Component", ct = "object", ut = {
|
|
|
341
347
|
}
|
|
342
348
|
}
|
|
343
349
|
}
|
|
344
|
-
},
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
type:
|
|
348
|
-
categories:
|
|
349
|
-
},
|
|
350
|
+
}, ut = {
|
|
351
|
+
title: at,
|
|
352
|
+
description: rt,
|
|
353
|
+
type: st,
|
|
354
|
+
categories: ct
|
|
355
|
+
}, K = {
|
|
350
356
|
dataSource: {
|
|
351
357
|
type: Array,
|
|
352
358
|
default: [
|
|
@@ -365,13 +371,13 @@ const rt = "order", st = "A Farris Component", ct = "object", ut = {
|
|
|
365
371
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
366
372
|
]
|
|
367
373
|
}
|
|
368
|
-
},
|
|
369
|
-
["appearance",
|
|
374
|
+
}, le = _(K, lt, Qe, it, ut), dt = /* @__PURE__ */ new Map([
|
|
375
|
+
["appearance", Z]
|
|
370
376
|
]);
|
|
371
|
-
function
|
|
377
|
+
function pt(e, t, n) {
|
|
372
378
|
return t;
|
|
373
379
|
}
|
|
374
|
-
const
|
|
380
|
+
const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/list-view.schema.json", yt = "list-view", gt = "A Farris Component", ht = "object", vt = {
|
|
375
381
|
id: {
|
|
376
382
|
description: "The unique identifier for list-view",
|
|
377
383
|
type: "string"
|
|
@@ -436,15 +442,15 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
|
|
|
436
442
|
}, bt = [
|
|
437
443
|
"id",
|
|
438
444
|
"type"
|
|
439
|
-
],
|
|
440
|
-
$schema:
|
|
441
|
-
$id:
|
|
442
|
-
title:
|
|
445
|
+
], Ct = {
|
|
446
|
+
$schema: ft,
|
|
447
|
+
$id: mt,
|
|
448
|
+
title: yt,
|
|
443
449
|
description: gt,
|
|
444
|
-
type:
|
|
445
|
-
properties:
|
|
450
|
+
type: ht,
|
|
451
|
+
properties: vt,
|
|
446
452
|
required: bt
|
|
447
|
-
},
|
|
453
|
+
}, St = "list-view", wt = "A Farris Component", Ft = "object", kt = {
|
|
448
454
|
basic: {
|
|
449
455
|
description: "Basic Infomation",
|
|
450
456
|
title: "基本信息",
|
|
@@ -466,11 +472,11 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
|
|
|
466
472
|
}
|
|
467
473
|
}
|
|
468
474
|
}
|
|
469
|
-
},
|
|
470
|
-
title:
|
|
471
|
-
description:
|
|
472
|
-
type:
|
|
473
|
-
categories:
|
|
475
|
+
}, It = {
|
|
476
|
+
title: St,
|
|
477
|
+
description: wt,
|
|
478
|
+
type: Ft,
|
|
479
|
+
categories: kt
|
|
474
480
|
}, pe = {
|
|
475
481
|
/** 列集合 */
|
|
476
482
|
columns: {
|
|
@@ -513,436 +519,436 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
|
|
|
513
519
|
// 搜索启用高亮
|
|
514
520
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
515
521
|
};
|
|
516
|
-
_(pe,
|
|
517
|
-
function
|
|
518
|
-
function n(
|
|
522
|
+
_(pe, Ct, dt, pt, It);
|
|
523
|
+
function Mt(e, t) {
|
|
524
|
+
function n(a) {
|
|
519
525
|
const r = [];
|
|
520
|
-
let
|
|
521
|
-
for (;
|
|
522
|
-
r.push(
|
|
526
|
+
let c = a.nextNode();
|
|
527
|
+
for (; c; )
|
|
528
|
+
r.push(c), c = a.nextNode();
|
|
523
529
|
return r;
|
|
524
530
|
}
|
|
525
|
-
function a
|
|
526
|
-
const
|
|
527
|
-
return n(
|
|
528
|
-
const
|
|
531
|
+
function l(a, r) {
|
|
532
|
+
const c = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
533
|
+
return n(c).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text: s }) => {
|
|
534
|
+
const g = [];
|
|
529
535
|
let y = 0;
|
|
530
536
|
for (; y < s.length; ) {
|
|
531
|
-
const
|
|
532
|
-
if (
|
|
537
|
+
const d = s.indexOf(r, y);
|
|
538
|
+
if (d === -1)
|
|
533
539
|
break;
|
|
534
|
-
|
|
540
|
+
g.push(d), y = d + r.length;
|
|
535
541
|
}
|
|
536
|
-
return
|
|
537
|
-
const
|
|
538
|
-
return
|
|
542
|
+
return g.map((d) => {
|
|
543
|
+
const f = new Range();
|
|
544
|
+
return f.setStart(o, d), f.setEnd(o, d + r.length), f;
|
|
539
545
|
});
|
|
540
546
|
}).flat();
|
|
541
547
|
}
|
|
542
|
-
function i(
|
|
543
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
548
|
+
function i(a) {
|
|
549
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !a || !t))
|
|
544
550
|
return;
|
|
545
|
-
const r =
|
|
546
|
-
CSS.highlights.set("search-result",
|
|
551
|
+
const r = l(t.value, a.toLocaleLowerCase()), c = new Highlight(...r);
|
|
552
|
+
CSS.highlights.set("search-result", c);
|
|
547
553
|
}
|
|
548
554
|
return { search: i };
|
|
549
555
|
}
|
|
550
|
-
function ie(e, t, n,
|
|
551
|
-
const
|
|
552
|
-
var
|
|
553
|
-
return ((
|
|
556
|
+
function ie(e, t, n, l, i, a, r, c, m, p) {
|
|
557
|
+
const u = b(e.size), o = b(e.textField), s = b(e.titleField), g = b(e.disableField), y = B(() => {
|
|
558
|
+
var F, L;
|
|
559
|
+
return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((L = e.selection) == null ? void 0 : L.showCheckbox);
|
|
554
560
|
}), {
|
|
555
|
-
onMouseenterItem:
|
|
556
|
-
onMouseoverItem:
|
|
561
|
+
onMouseenterItem: d,
|
|
562
|
+
onMouseoverItem: f,
|
|
557
563
|
onMouseoutItem: v
|
|
558
|
-
} =
|
|
559
|
-
getKey:
|
|
564
|
+
} = a, {
|
|
565
|
+
getKey: S,
|
|
560
566
|
listViewItemClass: w,
|
|
561
567
|
onCheckItem: M,
|
|
562
|
-
onClickItem:
|
|
568
|
+
onClickItem: C
|
|
563
569
|
} = r, k = B(() => ({
|
|
564
|
-
margin:
|
|
570
|
+
margin: u.value === "small" ? "0.25rem 0" : "10px 0"
|
|
565
571
|
}));
|
|
566
|
-
function
|
|
567
|
-
return
|
|
568
|
-
class: w(
|
|
569
|
-
id:
|
|
570
|
-
key:
|
|
571
|
-
onClick: (
|
|
572
|
-
onMouseenter: (
|
|
573
|
-
onMouseover: (
|
|
574
|
-
onMouseout: (
|
|
575
|
-
}, [y.value &&
|
|
572
|
+
function O(F, L, D) {
|
|
573
|
+
return F.checked = c.findIndexInSelectedItems(F) > -1, h("li", {
|
|
574
|
+
class: w(F, L),
|
|
575
|
+
id: S(F, L),
|
|
576
|
+
key: S(F, L),
|
|
577
|
+
onClick: (V) => C(V, F, L),
|
|
578
|
+
onMouseenter: (V) => d(V, F, L),
|
|
579
|
+
onMouseover: (V) => f(V, F, L),
|
|
580
|
+
onMouseout: (V) => v(V, F, L)
|
|
581
|
+
}, [y.value && h("div", {
|
|
576
582
|
class: "f-list-select",
|
|
577
|
-
onClick: (
|
|
578
|
-
}, [
|
|
579
|
-
id: "list-" +
|
|
583
|
+
onClick: (V) => V.stopPropagation()
|
|
584
|
+
}, [h(Q, {
|
|
585
|
+
id: "list-" + S(F, L),
|
|
580
586
|
customClass: "listview-checkbox",
|
|
581
|
-
disabled:
|
|
582
|
-
checked:
|
|
583
|
-
"onUpdate:checked": (
|
|
584
|
-
onChange: (
|
|
585
|
-
M(
|
|
587
|
+
disabled: F[g.value],
|
|
588
|
+
checked: F.checked,
|
|
589
|
+
"onUpdate:checked": (V) => F.checked = V,
|
|
590
|
+
onChange: (V) => {
|
|
591
|
+
M(F, L, !V.checked);
|
|
586
592
|
}
|
|
587
|
-
}, null)]),
|
|
593
|
+
}, null)]), h("div", {
|
|
588
594
|
class: "f-list-content"
|
|
589
|
-
}, [
|
|
595
|
+
}, [h("div", {
|
|
590
596
|
style: k.value,
|
|
591
|
-
title:
|
|
592
|
-
}, [
|
|
597
|
+
title: F.raw[s.value] || F.raw[o.value]
|
|
598
|
+
}, [F.raw[o.value]])])]);
|
|
593
599
|
}
|
|
594
600
|
return {
|
|
595
|
-
renderItem:
|
|
601
|
+
renderItem: O
|
|
596
602
|
};
|
|
597
603
|
}
|
|
598
|
-
function
|
|
599
|
-
const
|
|
604
|
+
function Bt(e, t, n, l, i, a, r, c, m, p) {
|
|
605
|
+
const u = b(e.multiSelect), o = b(e.disableField), {
|
|
600
606
|
onMouseenterItem: s,
|
|
601
|
-
onMouseoverItem:
|
|
607
|
+
onMouseoverItem: g,
|
|
602
608
|
onMouseoutItem: y
|
|
603
|
-
} =
|
|
604
|
-
getKey:
|
|
605
|
-
listViewItemClass:
|
|
609
|
+
} = a, {
|
|
610
|
+
getKey: d,
|
|
611
|
+
listViewItemClass: f,
|
|
606
612
|
onCheckItem: v,
|
|
607
|
-
onClickItem:
|
|
613
|
+
onClickItem: S
|
|
608
614
|
} = r;
|
|
609
|
-
function w(
|
|
610
|
-
return t.slots.content ?
|
|
611
|
-
item:
|
|
615
|
+
function w(C, k, O) {
|
|
616
|
+
return t.slots.content ? h(X, null, [t.slots.content && t.slots.content({
|
|
617
|
+
item: C.raw,
|
|
612
618
|
index: k,
|
|
613
|
-
selectedItem:
|
|
614
|
-
})]) :
|
|
619
|
+
selectedItem: O
|
|
620
|
+
})]) : h("div", {
|
|
615
621
|
style: "margin: 10px 0;"
|
|
616
|
-
}, [
|
|
617
|
-
}
|
|
618
|
-
function M(
|
|
619
|
-
return
|
|
620
|
-
class:
|
|
621
|
-
id:
|
|
622
|
-
key:
|
|
623
|
-
onClick: (
|
|
624
|
-
onMouseenter: (
|
|
625
|
-
onMouseover: (
|
|
626
|
-
onMouseout: (
|
|
627
|
-
}, [
|
|
622
|
+
}, [C.raw.name]);
|
|
623
|
+
}
|
|
624
|
+
function M(C, k, O) {
|
|
625
|
+
return h("li", {
|
|
626
|
+
class: f(C, k),
|
|
627
|
+
id: d(C, k),
|
|
628
|
+
key: d(C, k),
|
|
629
|
+
onClick: (F) => S(F, C, k),
|
|
630
|
+
onMouseenter: (F) => s(F, C, k),
|
|
631
|
+
onMouseover: (F) => g(F, C, k),
|
|
632
|
+
onMouseout: (F) => y(F, C, k)
|
|
633
|
+
}, [u.value && h("div", {
|
|
628
634
|
class: "f-list-select",
|
|
629
|
-
onClick: (
|
|
630
|
-
}, [
|
|
631
|
-
id: "list-" +
|
|
635
|
+
onClick: (F) => F.stopPropagation()
|
|
636
|
+
}, [h(Q, {
|
|
637
|
+
id: "list-" + d(C, k),
|
|
632
638
|
customClass: "listview-checkbox",
|
|
633
|
-
disabled:
|
|
634
|
-
checked:
|
|
635
|
-
"onUpdate:checked": (
|
|
636
|
-
onChange: (
|
|
637
|
-
}, null)]),
|
|
639
|
+
disabled: C[o.value] || !C.checked,
|
|
640
|
+
checked: C.checked,
|
|
641
|
+
"onUpdate:checked": (F) => C.checked = F,
|
|
642
|
+
onChange: (F) => v(C, k, !F.checked)
|
|
643
|
+
}, null)]), h("div", {
|
|
638
644
|
class: "f-list-content"
|
|
639
|
-
}, [w(
|
|
645
|
+
}, [w(C, k, O)])]);
|
|
640
646
|
}
|
|
641
647
|
return {
|
|
642
648
|
renderItem: M
|
|
643
649
|
};
|
|
644
650
|
}
|
|
645
|
-
function
|
|
646
|
-
const
|
|
651
|
+
function Vt(e, t, n, l, i, a, r, c, m, p) {
|
|
652
|
+
const u = b(e.multiSelect), o = b(e.disableField), {
|
|
647
653
|
onMouseenterItem: s,
|
|
648
|
-
onMouseoverItem:
|
|
654
|
+
onMouseoverItem: g,
|
|
649
655
|
onMouseoutItem: y
|
|
650
|
-
} =
|
|
651
|
-
getKey:
|
|
652
|
-
listViewItemClass:
|
|
656
|
+
} = a, {
|
|
657
|
+
getKey: d,
|
|
658
|
+
listViewItemClass: f,
|
|
653
659
|
onCheckItem: v,
|
|
654
|
-
onClickItem:
|
|
660
|
+
onClickItem: S
|
|
655
661
|
} = r, {
|
|
656
662
|
dragstart: w,
|
|
657
663
|
dragenter: M,
|
|
658
|
-
dragover:
|
|
664
|
+
dragover: C,
|
|
659
665
|
dragend: k
|
|
660
|
-
} =
|
|
661
|
-
removeItem:
|
|
662
|
-
} =
|
|
663
|
-
margin:
|
|
666
|
+
} = l, {
|
|
667
|
+
removeItem: O
|
|
668
|
+
} = m, F = B(() => ({
|
|
669
|
+
margin: u.value ? "10px 0" : "10px 0px 10px 14px"
|
|
664
670
|
}));
|
|
665
|
-
function
|
|
666
|
-
return
|
|
667
|
-
style:
|
|
668
|
-
}, [
|
|
669
|
-
}
|
|
670
|
-
function
|
|
671
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
672
|
-
}
|
|
673
|
-
const
|
|
674
|
-
function
|
|
675
|
-
return
|
|
676
|
-
class:
|
|
677
|
-
id:
|
|
678
|
-
key:
|
|
679
|
-
onClick: (
|
|
680
|
-
onMouseenter: (
|
|
681
|
-
onMouseover: (
|
|
682
|
-
onMouseout: (
|
|
671
|
+
function L(P) {
|
|
672
|
+
return h("div", {
|
|
673
|
+
style: F.value
|
|
674
|
+
}, [P.raw.name]);
|
|
675
|
+
}
|
|
676
|
+
function D() {
|
|
677
|
+
return t.slots.itemContent ? t.slots.itemContent : L;
|
|
678
|
+
}
|
|
679
|
+
const V = D();
|
|
680
|
+
function A(P, $, R) {
|
|
681
|
+
return h("li", {
|
|
682
|
+
class: f(P, $),
|
|
683
|
+
id: d(P, $),
|
|
684
|
+
key: d(P, $),
|
|
685
|
+
onClick: (E) => S(E, P, $),
|
|
686
|
+
onMouseenter: (E) => s(E, P, $),
|
|
687
|
+
onMouseover: (E) => g(E, P, $),
|
|
688
|
+
onMouseout: (E) => y(E, P, $),
|
|
683
689
|
draggable: "true",
|
|
684
|
-
onDragstart: (
|
|
685
|
-
onDragenter: (
|
|
686
|
-
onDragend: (
|
|
687
|
-
onDragover: (
|
|
688
|
-
}, [
|
|
690
|
+
onDragstart: (E) => w(E, P, $),
|
|
691
|
+
onDragenter: (E) => M(E, $),
|
|
692
|
+
onDragend: (E) => k(E, P),
|
|
693
|
+
onDragover: (E) => C(E, $)
|
|
694
|
+
}, [u.value && h("div", {
|
|
689
695
|
class: "f-list-select",
|
|
690
|
-
onClick: (
|
|
691
|
-
}, [
|
|
692
|
-
id: "list-" +
|
|
696
|
+
onClick: (E) => E.stopPropagation()
|
|
697
|
+
}, [h(Q, {
|
|
698
|
+
id: "list-" + d(P, $),
|
|
693
699
|
customClass: "listview-checkbox",
|
|
694
|
-
disabled:
|
|
695
|
-
checked:
|
|
696
|
-
"onUpdate:checked": (
|
|
697
|
-
onChange: (
|
|
698
|
-
}, null)]),
|
|
700
|
+
disabled: P[o.value] || !P.checked,
|
|
701
|
+
checked: P.checked,
|
|
702
|
+
"onUpdate:checked": (E) => P.checked = E,
|
|
703
|
+
onChange: (E) => v(P, $, !E.checked)
|
|
704
|
+
}, null)]), h("div", {
|
|
699
705
|
class: "f-list-content"
|
|
700
|
-
}, [
|
|
706
|
+
}, [V(P)]), h("div", {
|
|
701
707
|
class: "f-list-remove",
|
|
702
|
-
onClick: (
|
|
703
|
-
}, [
|
|
708
|
+
onClick: (E) => O($)
|
|
709
|
+
}, [h("div", {
|
|
704
710
|
class: "f-list-remove-icon"
|
|
705
|
-
}, [
|
|
711
|
+
}, [h("i", {
|
|
706
712
|
class: "f-icon f-icon-remove_face"
|
|
707
|
-
}, null)])]),
|
|
713
|
+
}, null)])]), h("div", {
|
|
708
714
|
class: "f-list-handle"
|
|
709
|
-
}, [
|
|
715
|
+
}, [h("div", null, [h("i", {
|
|
710
716
|
class: "f-icon f-icon-drag-vertical"
|
|
711
717
|
}, null)])])]);
|
|
712
718
|
}
|
|
713
719
|
return {
|
|
714
|
-
renderItem:
|
|
720
|
+
renderItem: A
|
|
715
721
|
};
|
|
716
722
|
}
|
|
717
|
-
function
|
|
718
|
-
var
|
|
719
|
-
const
|
|
723
|
+
function Ot(e, t, n, l, i, a, r, c, m, p) {
|
|
724
|
+
var d;
|
|
725
|
+
const u = b(((d = e.group) == null ? void 0 : d.groupFields) || []), {
|
|
720
726
|
collpaseGroupIconClass: o
|
|
721
727
|
} = i, {
|
|
722
728
|
toggleGroupRow: s
|
|
723
|
-
} =
|
|
724
|
-
function
|
|
729
|
+
} = p;
|
|
730
|
+
function g(f, v) {
|
|
725
731
|
v.collapse = !v.collapse, n.value = s(v.collapse ? "collapse" : "expand", v, n.value);
|
|
726
732
|
}
|
|
727
|
-
function y(
|
|
728
|
-
return
|
|
733
|
+
function y(f, v, S) {
|
|
734
|
+
return f.layer > -1 && h("div", {
|
|
729
735
|
class: "f-navlookup-recentHeader",
|
|
730
|
-
onClick: (w) =>
|
|
731
|
-
}, [
|
|
736
|
+
onClick: (w) => g(w, f)
|
|
737
|
+
}, [h("div", {
|
|
732
738
|
class: "fv-grid-group-row-icon"
|
|
733
|
-
}, [
|
|
734
|
-
class: o(
|
|
735
|
-
}, null)]),
|
|
739
|
+
}, [h("span", {
|
|
740
|
+
class: o(f)
|
|
741
|
+
}, null)]), h("div", {
|
|
736
742
|
class: "f-navlookup-recommandLabel"
|
|
737
|
-
}, [
|
|
743
|
+
}, [f.raw[u.value[f.layer]]])]);
|
|
738
744
|
}
|
|
739
745
|
return {
|
|
740
746
|
renderItem: y
|
|
741
747
|
};
|
|
742
748
|
}
|
|
743
|
-
function
|
|
744
|
-
const e =
|
|
745
|
-
function i(
|
|
749
|
+
function Tt() {
|
|
750
|
+
const e = b(-1), t = b(""), n = b(-1), l = b(!1);
|
|
751
|
+
function i(p, u, o) {
|
|
746
752
|
n.value = o;
|
|
747
753
|
}
|
|
748
|
-
function
|
|
749
|
-
|
|
754
|
+
function a(p, u, o) {
|
|
755
|
+
l.value || (n.value = o);
|
|
750
756
|
}
|
|
751
|
-
function r(
|
|
757
|
+
function r(p, u, o) {
|
|
752
758
|
n.value = -1;
|
|
753
759
|
}
|
|
754
|
-
function
|
|
755
|
-
|
|
760
|
+
function c() {
|
|
761
|
+
l.value = !0;
|
|
756
762
|
}
|
|
757
|
-
function
|
|
758
|
-
|
|
763
|
+
function m() {
|
|
764
|
+
l.value = !1;
|
|
759
765
|
}
|
|
760
766
|
return {
|
|
761
767
|
activeIndex: e,
|
|
762
768
|
focusedItemId: t,
|
|
763
769
|
hoverIndex: n,
|
|
764
770
|
onMouseenterItem: i,
|
|
765
|
-
onMouseoverItem:
|
|
771
|
+
onMouseoverItem: a,
|
|
766
772
|
onMouseoutItem: r,
|
|
767
|
-
resumeHover:
|
|
768
|
-
suspendHover:
|
|
773
|
+
resumeHover: m,
|
|
774
|
+
suspendHover: c
|
|
769
775
|
};
|
|
770
776
|
}
|
|
771
|
-
function
|
|
772
|
-
const i =
|
|
773
|
-
function
|
|
774
|
-
v.stopPropagation(), s(),
|
|
775
|
-
r.value = w,
|
|
777
|
+
function Pt(e, t, n, l) {
|
|
778
|
+
const i = b(e.idField), { dataView: a } = n, r = b(-1), c = b(!1), { activeIndex: m, focusedItemId: p, hoverIndex: u, resumeHover: o, suspendHover: s } = l;
|
|
779
|
+
function g(v, S, w) {
|
|
780
|
+
v.stopPropagation(), s(), S && setTimeout(() => {
|
|
781
|
+
r.value = w, c.value = !0, S.moving = !0;
|
|
776
782
|
});
|
|
777
783
|
}
|
|
778
|
-
function y(v,
|
|
779
|
-
if (v.preventDefault(), r.value !==
|
|
780
|
-
const w =
|
|
781
|
-
M.splice(r.value, 1), M.splice(
|
|
784
|
+
function y(v, S) {
|
|
785
|
+
if (v.preventDefault(), r.value !== S) {
|
|
786
|
+
const w = a.value[r.value], M = a.value;
|
|
787
|
+
M.splice(r.value, 1), M.splice(S, 0, w), r.value = S;
|
|
782
788
|
}
|
|
783
789
|
}
|
|
784
|
-
function
|
|
790
|
+
function d(v, S) {
|
|
785
791
|
v.preventDefault(), v.dataTransfer && (v.dataTransfer.dropEffect = "move");
|
|
786
792
|
}
|
|
787
|
-
function
|
|
788
|
-
|
|
793
|
+
function f(v, S) {
|
|
794
|
+
S && (S.moving = !1), a.value.forEach((w, M) => {
|
|
789
795
|
w.__fv_index__ = M;
|
|
790
|
-
}),
|
|
796
|
+
}), c.value = !1, o(), u.value = S.raw.__fv_index__, m.value = S.raw.__fv_index__, p.value = S.raw[i.value], t.emit("change", a.value), t.emit("activeChange", S);
|
|
791
797
|
}
|
|
792
798
|
return {
|
|
793
|
-
dragstart:
|
|
799
|
+
dragstart: g,
|
|
794
800
|
dragenter: y,
|
|
795
|
-
dragover:
|
|
796
|
-
dragend:
|
|
797
|
-
isDragging:
|
|
801
|
+
dragover: d,
|
|
802
|
+
dragend: f,
|
|
803
|
+
isDragging: c
|
|
798
804
|
};
|
|
799
805
|
}
|
|
800
|
-
function
|
|
801
|
-
const { dataView:
|
|
802
|
-
function i(
|
|
803
|
-
if (
|
|
804
|
-
const r =
|
|
806
|
+
function Lt(e, t, n) {
|
|
807
|
+
const { dataView: l } = n;
|
|
808
|
+
function i(a) {
|
|
809
|
+
if (a > -1 && a < l.value.length) {
|
|
810
|
+
const r = l.value.splice(a, 1);
|
|
805
811
|
t.emit("removeItem", r[0]);
|
|
806
812
|
}
|
|
807
813
|
}
|
|
808
814
|
return { removeItem: i };
|
|
809
815
|
}
|
|
810
|
-
function Et(e, t, n,
|
|
811
|
-
const r =
|
|
812
|
-
function M(
|
|
813
|
-
const
|
|
816
|
+
function Et(e, t, n, l, i, a) {
|
|
817
|
+
const r = b(e.idField), c = b(e.disableField), m = b(e.draggable), p = b(e.itemClass), u = b(e.selection.multiSelect ?? !1), o = b(e.selection.multiSelectMode), { isDragging: s } = l, { activeIndex: g, focusedItemId: y, hoverIndex: d } = i, { clearSelection: f, getSelectedItems: v, toggleSelectItem: S } = a, w = b(v());
|
|
818
|
+
function M(V, A) {
|
|
819
|
+
const P = {
|
|
814
820
|
"f-listview-item": !0,
|
|
815
821
|
"f-list-view-group-item": !0,
|
|
816
|
-
"f-list-view-draggable-item":
|
|
817
|
-
"f-un-click": !
|
|
818
|
-
"f-un-select": !!
|
|
822
|
+
"f-list-view-draggable-item": m.value,
|
|
823
|
+
"f-un-click": !V.checked,
|
|
824
|
+
"f-un-select": !!V.raw[c.value],
|
|
819
825
|
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
820
826
|
// 多选
|
|
821
827
|
"f-listview-active": w.value.findIndex(
|
|
822
|
-
(
|
|
828
|
+
(R) => R[r.value] === V.raw[r.value]
|
|
823
829
|
) > -1,
|
|
824
830
|
"f-listview-item-active": w.value.findIndex(
|
|
825
|
-
(
|
|
831
|
+
(R) => R[r.value] === V.raw[r.value]
|
|
826
832
|
) > -1,
|
|
827
|
-
"f-listview-hover": !s.value &&
|
|
828
|
-
"f-listview-item-hover": !s.value &&
|
|
829
|
-
moving: !!
|
|
833
|
+
"f-listview-hover": !s.value && A === d.value,
|
|
834
|
+
"f-listview-item-hover": !s.value && A === d.value,
|
|
835
|
+
moving: !!V.moving
|
|
830
836
|
};
|
|
831
|
-
return
|
|
837
|
+
return p.value.split(" ").reduce((R, E) => (R[E] = !0, R), P), P;
|
|
832
838
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
839
|
+
function C(V, A) {
|
|
840
|
+
return V.raw[r.value] || "";
|
|
835
841
|
}
|
|
836
|
-
const k = B(() => !
|
|
837
|
-
function
|
|
838
|
-
|
|
842
|
+
const k = B(() => !u.value);
|
|
843
|
+
function O(V, A, P) {
|
|
844
|
+
V.checked = P, !V.raw[c.value] && (k.value && (y.value = V.raw[r.value]), S(V));
|
|
839
845
|
}
|
|
840
|
-
const
|
|
841
|
-
function
|
|
842
|
-
if (
|
|
843
|
-
|
|
846
|
+
const F = B(() => u.value && o.value === "OnCheckClearByClick"), L = B(() => !u.value || u.value && (o.value === "OnCheckAndClick" || o.value === "OnClick"));
|
|
847
|
+
function D(V, A, P) {
|
|
848
|
+
if (A.raw[c.value]) {
|
|
849
|
+
V.preventDefault(), V.stopPropagation();
|
|
844
850
|
return;
|
|
845
851
|
}
|
|
846
|
-
y.value =
|
|
852
|
+
y.value = A.raw[r.value], g.value = P, F.value && f(), L.value && (S(A), w.value = v()), t.emit("clickItem", { data: w.value, index: P }), t.emit("activeChange", w.value);
|
|
847
853
|
}
|
|
848
854
|
return {
|
|
849
|
-
getKey:
|
|
855
|
+
getKey: C,
|
|
850
856
|
listViewItemClass: M,
|
|
851
|
-
onCheckItem:
|
|
852
|
-
onClickItem:
|
|
857
|
+
onCheckItem: O,
|
|
858
|
+
onClickItem: D
|
|
853
859
|
};
|
|
854
860
|
}
|
|
855
|
-
function
|
|
856
|
-
const
|
|
861
|
+
function $t(e, t, n, l, i, a, r) {
|
|
862
|
+
const c = b(e.view), m = b(e.view === "CardView"), p = b({}), u = b("暂无数据"), o = Tt(), s = Pt(e, t, l, o), g = Lt(e, t, l), y = Et(e, t, n, s, o, a), d = B(() => ({
|
|
857
863
|
"f-list-view-group": !0,
|
|
858
|
-
"d-flex":
|
|
859
|
-
"flex-wrap":
|
|
860
|
-
})),
|
|
864
|
+
"d-flex": m.value,
|
|
865
|
+
"flex-wrap": m.value
|
|
866
|
+
})), f = B(() => !!n.value && n.value.length > 0), v = B(() => n.value.length === 0);
|
|
861
867
|
B(() => v.value && !t.slots.empty);
|
|
862
|
-
function
|
|
863
|
-
return
|
|
868
|
+
function S() {
|
|
869
|
+
return c.value === "SingleView" ? ie : c.value === "DraggableView" ? Vt : (c.value === "ContentView" || c.value === "CardView") && t.slots.content ? Bt : ie;
|
|
864
870
|
}
|
|
865
|
-
const w =
|
|
871
|
+
const w = S(), {
|
|
866
872
|
renderItem: M
|
|
867
|
-
} = w(e, t, n, s, i, o, y,
|
|
868
|
-
renderItem:
|
|
869
|
-
} =
|
|
870
|
-
function
|
|
871
|
-
return n.value.filter((
|
|
872
|
-
}
|
|
873
|
-
function
|
|
874
|
-
return
|
|
873
|
+
} = w(e, t, n, s, i, o, y, a, g, r), {
|
|
874
|
+
renderItem: C
|
|
875
|
+
} = Ot(e, t, n, s, i, o, y, a, g, r), k = [M, C];
|
|
876
|
+
function O() {
|
|
877
|
+
return n.value.filter((D) => D.visible !== !1).map((D, V) => k[D.type](D, V, p));
|
|
878
|
+
}
|
|
879
|
+
function F() {
|
|
880
|
+
return h("div", {
|
|
875
881
|
class: "f-list-view-emptydata"
|
|
876
|
-
}, [
|
|
882
|
+
}, [h("p", {
|
|
877
883
|
class: "f-empty-title"
|
|
878
|
-
}, [t.slots.empty ? t.slots.empty() :
|
|
884
|
+
}, [t.slots.empty ? t.slots.empty() : u.value])]);
|
|
879
885
|
}
|
|
880
|
-
function
|
|
881
|
-
return
|
|
882
|
-
class:
|
|
886
|
+
function L() {
|
|
887
|
+
return h("ul", {
|
|
888
|
+
class: d.value,
|
|
883
889
|
style: "list-style: none;"
|
|
884
|
-
}, [
|
|
890
|
+
}, [f.value && O(), v.value && F()]);
|
|
885
891
|
}
|
|
886
892
|
return {
|
|
887
|
-
renderListArea:
|
|
893
|
+
renderListArea: L
|
|
888
894
|
};
|
|
889
895
|
}
|
|
890
|
-
function
|
|
891
|
-
function
|
|
892
|
-
return t.slots.header &&
|
|
896
|
+
function Dt(e, t, n) {
|
|
897
|
+
function l() {
|
|
898
|
+
return t.slots.header && h("div", {
|
|
893
899
|
class: "f-list-view-header"
|
|
894
900
|
}, [t.slots.header()]);
|
|
895
901
|
}
|
|
896
902
|
return {
|
|
897
|
-
renderHeader:
|
|
903
|
+
renderHeader: l
|
|
898
904
|
};
|
|
899
905
|
}
|
|
900
|
-
function
|
|
901
|
-
const
|
|
902
|
-
function
|
|
903
|
-
|
|
906
|
+
function ae(e, t, n) {
|
|
907
|
+
const l = b(e.headerClass), i = b(e.placeholder), a = b(""), r = B(() => !a.value), c = B(() => !!a.value);
|
|
908
|
+
function m(s) {
|
|
909
|
+
a.value = "";
|
|
904
910
|
}
|
|
905
|
-
|
|
911
|
+
H(a, (s) => {
|
|
906
912
|
e.enableHighlightSearch && n.search(s), t.emit("afterSearch", s);
|
|
907
913
|
});
|
|
908
|
-
const
|
|
914
|
+
const p = B(() => {
|
|
909
915
|
const s = {
|
|
910
916
|
"form-group": !0,
|
|
911
917
|
"farris-form-group": !0
|
|
912
918
|
};
|
|
913
|
-
return
|
|
919
|
+
return l.value && l.value.split(" ").reduce((y, d) => (y[d] = !0, y), s), s;
|
|
914
920
|
});
|
|
915
|
-
function
|
|
921
|
+
function u(s) {
|
|
916
922
|
}
|
|
917
923
|
function o() {
|
|
918
|
-
return
|
|
924
|
+
return h("div", {
|
|
919
925
|
class: "f-list-view-header",
|
|
920
|
-
onClick:
|
|
921
|
-
}, [
|
|
922
|
-
class:
|
|
923
|
-
}, [
|
|
926
|
+
onClick: Ce(() => u, ["prevent", "stop"])
|
|
927
|
+
}, [h("div", {
|
|
928
|
+
class: p.value
|
|
929
|
+
}, [h("div", {
|
|
924
930
|
class: "farris-input-wrap"
|
|
925
|
-
}, [
|
|
931
|
+
}, [h("div", {
|
|
926
932
|
class: "f-cmp-inputgroup"
|
|
927
|
-
}, [
|
|
933
|
+
}, [h("div", {
|
|
928
934
|
class: "input-group f-state-editable"
|
|
929
|
-
}, [
|
|
935
|
+
}, [Se(h("input", {
|
|
930
936
|
class: "form-control f-utils-fill text-left",
|
|
931
|
-
"onUpdate:modelValue": (s) =>
|
|
937
|
+
"onUpdate:modelValue": (s) => a.value = s,
|
|
932
938
|
name: "input-group-value",
|
|
933
939
|
type: "text",
|
|
934
940
|
placeholder: i.value,
|
|
935
941
|
autocomplete: "off"
|
|
936
|
-
}, null), [[
|
|
942
|
+
}, null), [[we, a.value]]), h("div", {
|
|
937
943
|
class: "input-group-append"
|
|
938
|
-
}, [
|
|
944
|
+
}, [c.value && h("span", {
|
|
939
945
|
class: "input-group-text input-group-clear",
|
|
940
|
-
onClick: (s) =>
|
|
941
|
-
}, [
|
|
946
|
+
onClick: (s) => m()
|
|
947
|
+
}, [h("i", {
|
|
942
948
|
class: "f-icon f-icon-close-circle"
|
|
943
|
-
}, null)]), r.value &&
|
|
949
|
+
}, null)]), r.value && h("span", {
|
|
944
950
|
class: "input-group-text"
|
|
945
|
-
}, [
|
|
951
|
+
}, [h("span", {
|
|
946
952
|
class: "f-icon f-icon-search"
|
|
947
953
|
}, null)])])])])])])]);
|
|
948
954
|
}
|
|
@@ -950,47 +956,47 @@ function re(e, t, n) {
|
|
|
950
956
|
renderHeader: o
|
|
951
957
|
};
|
|
952
958
|
}
|
|
953
|
-
const fe = /* @__PURE__ */
|
|
959
|
+
const fe = /* @__PURE__ */ x({
|
|
954
960
|
name: "FListView",
|
|
955
961
|
props: pe,
|
|
956
962
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
957
963
|
setup(e, t) {
|
|
958
|
-
const n =
|
|
959
|
-
getVisualData:
|
|
964
|
+
const n = b(), l = b(!0), i = b(!1), a = b([]), r = 0, c = b(e.columns), m = Be(e), p = Ve(e), u = Oe(e, m), o = Te(e), s = Pe(e, /* @__PURE__ */ new Map(), p, m, o), g = Le(e, s, m, a, t), y = Mt(e, n), d = B(() => s.dataView.value.length), f = Ee(e, t, m), v = $e(), S = De(e, {}, v), w = Ae(e, f, p, m, v, S), M = je(e, m, S, w), C = Re(e, m, S, w), k = xe(e, c, s, d, r, w, M, C), {
|
|
965
|
+
getVisualData: O
|
|
960
966
|
} = k;
|
|
961
|
-
|
|
962
|
-
const
|
|
967
|
+
a.value = O(0, d.value + r - 1);
|
|
968
|
+
const F = B(() => {
|
|
963
969
|
const j = {
|
|
964
970
|
"f-list-view": !0,
|
|
965
971
|
"f-list-view-multiple": e.multiSelect
|
|
966
972
|
};
|
|
967
973
|
return e.size !== "default" && (j[`${e.size}-item`] = !0), j;
|
|
968
|
-
}),
|
|
969
|
-
function
|
|
970
|
-
return e.header === "SearchBar" ?
|
|
974
|
+
}), L = B(() => !!t.slots.footer || l.value);
|
|
975
|
+
function D() {
|
|
976
|
+
return e.header === "SearchBar" ? ae : e.header === "ContentHeader" ? Dt : ae;
|
|
971
977
|
}
|
|
972
|
-
const
|
|
973
|
-
renderHeader:
|
|
974
|
-
} =
|
|
975
|
-
renderListArea:
|
|
976
|
-
} =
|
|
977
|
-
function
|
|
978
|
+
const V = D(), {
|
|
979
|
+
renderHeader: A
|
|
980
|
+
} = V(e, t, y), {
|
|
981
|
+
renderListArea: P
|
|
982
|
+
} = $t(e, t, a, s, u, g, k);
|
|
983
|
+
function $(j) {
|
|
978
984
|
y.search(j);
|
|
979
985
|
}
|
|
980
|
-
function
|
|
981
|
-
j && (s.load(j),
|
|
986
|
+
function R(j) {
|
|
987
|
+
j && (s.load(j), a.value = O(0, d.value + r - 1));
|
|
982
988
|
}
|
|
983
989
|
t.expose({
|
|
984
|
-
search:
|
|
985
|
-
updateDataSource:
|
|
990
|
+
search: $,
|
|
991
|
+
updateDataSource: R
|
|
986
992
|
});
|
|
987
|
-
function
|
|
993
|
+
function E(j) {
|
|
988
994
|
e.multiSelect && (j.preventDefault(), j.stopPropagation());
|
|
989
995
|
}
|
|
990
|
-
return () =>
|
|
991
|
-
class:
|
|
992
|
-
onClick:
|
|
993
|
-
}, [
|
|
996
|
+
return () => h("div", {
|
|
997
|
+
class: F.value,
|
|
998
|
+
onClick: E
|
|
999
|
+
}, [A(), h("div", {
|
|
994
1000
|
ref: n,
|
|
995
1001
|
class: "f-list-view-content",
|
|
996
1002
|
onMouseover: () => {
|
|
@@ -999,11 +1005,11 @@ const fe = /* @__PURE__ */ R({
|
|
|
999
1005
|
onMouseleave: () => {
|
|
1000
1006
|
i.value = !1;
|
|
1001
1007
|
}
|
|
1002
|
-
}, [
|
|
1008
|
+
}, [P()]), L.value && h("div", {
|
|
1003
1009
|
class: "f-list-view-footer"
|
|
1004
1010
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1005
1011
|
}
|
|
1006
|
-
}),
|
|
1012
|
+
}), At = {
|
|
1007
1013
|
/**
|
|
1008
1014
|
* 组件标识
|
|
1009
1015
|
*/
|
|
@@ -1029,9 +1035,9 @@ const fe = /* @__PURE__ */ R({
|
|
|
1029
1035
|
*/
|
|
1030
1036
|
customClass: { type: Object, default: {} }
|
|
1031
1037
|
};
|
|
1032
|
-
function
|
|
1033
|
-
function n(
|
|
1034
|
-
|
|
1038
|
+
function jt(e, t) {
|
|
1039
|
+
function n(l) {
|
|
1040
|
+
l.stopPropagation(), e.disabled || t.emit("click", l);
|
|
1035
1041
|
}
|
|
1036
1042
|
return {
|
|
1037
1043
|
onClickButton: n
|
|
@@ -1039,28 +1045,28 @@ function Nt(e, t) {
|
|
|
1039
1045
|
}
|
|
1040
1046
|
function Rt(e) {
|
|
1041
1047
|
const t = B(() => {
|
|
1042
|
-
const
|
|
1048
|
+
const l = {
|
|
1043
1049
|
"f-icon": !0
|
|
1044
1050
|
};
|
|
1045
1051
|
if (e.icon) {
|
|
1046
1052
|
const i = e.icon.trim().split(" ");
|
|
1047
|
-
i && i.length && i.reduce((
|
|
1053
|
+
i && i.length && i.reduce((a, r) => (a[r] = !0, a), l);
|
|
1048
1054
|
}
|
|
1049
|
-
return
|
|
1055
|
+
return l;
|
|
1050
1056
|
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1051
1057
|
return { iconClass: t, shouldShowIcon: n };
|
|
1052
1058
|
}
|
|
1053
|
-
const me = /* @__PURE__ */
|
|
1059
|
+
const me = /* @__PURE__ */ x({
|
|
1054
1060
|
name: "FButton",
|
|
1055
|
-
props:
|
|
1061
|
+
props: At,
|
|
1056
1062
|
emits: ["click"],
|
|
1057
1063
|
setup(e, t) {
|
|
1058
1064
|
const {
|
|
1059
1065
|
onClickButton: n
|
|
1060
|
-
} =
|
|
1061
|
-
iconClass:
|
|
1066
|
+
} = jt(e, t), {
|
|
1067
|
+
iconClass: l,
|
|
1062
1068
|
shouldShowIcon: i
|
|
1063
|
-
} = Rt(e),
|
|
1069
|
+
} = Rt(e), a = B(() => {
|
|
1064
1070
|
const r = {
|
|
1065
1071
|
btn: !0,
|
|
1066
1072
|
"btn-lg": e.size === "large",
|
|
@@ -1068,19 +1074,19 @@ const me = /* @__PURE__ */ R({
|
|
|
1068
1074
|
"btn-sm": e.size === "small",
|
|
1069
1075
|
"btn-icontext": i.value
|
|
1070
1076
|
};
|
|
1071
|
-
return r[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((
|
|
1077
|
+
return r[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((c, m) => (c[m] = e.customClass[m], c), r), r;
|
|
1072
1078
|
});
|
|
1073
|
-
return () =>
|
|
1074
|
-
class:
|
|
1079
|
+
return () => h("button", {
|
|
1080
|
+
class: a.value,
|
|
1075
1081
|
disabled: e.disabled,
|
|
1076
1082
|
onClick: (r) => n(r)
|
|
1077
|
-
}, [i.value &&
|
|
1078
|
-
class:
|
|
1083
|
+
}, [i.value && h("i", {
|
|
1084
|
+
class: l.value
|
|
1079
1085
|
}, null), t.slots.default && t.slots.default()]);
|
|
1080
1086
|
}
|
|
1081
|
-
}),
|
|
1082
|
-
["appearance",
|
|
1083
|
-
]),
|
|
1087
|
+
}), xt = /* @__PURE__ */ new Map([
|
|
1088
|
+
["appearance", Z]
|
|
1089
|
+
]), Ht = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", Ut = "A Farris Input Component", qt = "object", Wt = {
|
|
1084
1090
|
id: {
|
|
1085
1091
|
description: "The unique identifier for a combo list",
|
|
1086
1092
|
type: "string"
|
|
@@ -1113,6 +1119,11 @@ const me = /* @__PURE__ */ R({
|
|
|
1113
1119
|
type: "boolean",
|
|
1114
1120
|
default: !1
|
|
1115
1121
|
},
|
|
1122
|
+
enableClear: {
|
|
1123
|
+
description: "",
|
|
1124
|
+
type: "boolean",
|
|
1125
|
+
default: !0
|
|
1126
|
+
},
|
|
1116
1127
|
editable: {
|
|
1117
1128
|
description: "",
|
|
1118
1129
|
type: "boolean",
|
|
@@ -1137,6 +1148,11 @@ const me = /* @__PURE__ */ R({
|
|
|
1137
1148
|
type: "string",
|
|
1138
1149
|
default: ""
|
|
1139
1150
|
},
|
|
1151
|
+
idField: {
|
|
1152
|
+
description: "",
|
|
1153
|
+
type: "string",
|
|
1154
|
+
default: "id"
|
|
1155
|
+
},
|
|
1140
1156
|
valueField: {
|
|
1141
1157
|
description: "",
|
|
1142
1158
|
type: "string",
|
|
@@ -1196,27 +1212,28 @@ const me = /* @__PURE__ */ R({
|
|
|
1196
1212
|
type: "sting",
|
|
1197
1213
|
default: ""
|
|
1198
1214
|
}
|
|
1199
|
-
},
|
|
1215
|
+
}, _t = [
|
|
1200
1216
|
"id",
|
|
1201
1217
|
"type"
|
|
1202
|
-
],
|
|
1218
|
+
], zt = [
|
|
1203
1219
|
"id",
|
|
1204
1220
|
"appearance",
|
|
1205
|
-
"binding"
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
$
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1221
|
+
"binding",
|
|
1222
|
+
"visible"
|
|
1223
|
+
], Xt = {
|
|
1224
|
+
$schema: Ht,
|
|
1225
|
+
$id: Gt,
|
|
1226
|
+
title: Nt,
|
|
1227
|
+
description: Ut,
|
|
1228
|
+
type: qt,
|
|
1229
|
+
properties: Wt,
|
|
1230
|
+
required: _t,
|
|
1231
|
+
ignore: zt
|
|
1215
1232
|
};
|
|
1216
|
-
function
|
|
1233
|
+
function Jt(e, t, n) {
|
|
1217
1234
|
return t;
|
|
1218
1235
|
}
|
|
1219
|
-
const
|
|
1236
|
+
const ee = {
|
|
1220
1237
|
/**
|
|
1221
1238
|
* 组件标识
|
|
1222
1239
|
*/
|
|
@@ -1377,12 +1394,12 @@ const oe = {
|
|
|
1377
1394
|
*/
|
|
1378
1395
|
beforeOpen: { type: Function, default: null },
|
|
1379
1396
|
searchOption: {
|
|
1380
|
-
type:
|
|
1397
|
+
type: [Boolean, Function],
|
|
1381
1398
|
default: !1
|
|
1382
1399
|
},
|
|
1383
1400
|
// 搜索启用高亮
|
|
1384
1401
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1385
|
-
}, ye = _(
|
|
1402
|
+
}, ye = _(ee, Xt, xt, Jt), Qt = {
|
|
1386
1403
|
dataSource: { type: Array, default: [] },
|
|
1387
1404
|
enableSearch: { type: Boolean, default: !1 },
|
|
1388
1405
|
idField: { type: String, default: "id" },
|
|
@@ -1398,160 +1415,163 @@ const oe = {
|
|
|
1398
1415
|
onSelectionChange: { type: Function, default: () => {
|
|
1399
1416
|
} },
|
|
1400
1417
|
searchOption: {
|
|
1401
|
-
type:
|
|
1418
|
+
type: [Boolean, Function],
|
|
1402
1419
|
default: !1
|
|
1403
1420
|
},
|
|
1404
1421
|
// 搜索启用高亮
|
|
1405
1422
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1406
|
-
},
|
|
1423
|
+
}, Yt = /* @__PURE__ */ x({
|
|
1407
1424
|
name: "FComboListContainer",
|
|
1408
|
-
props:
|
|
1425
|
+
props: Qt,
|
|
1409
1426
|
emits: ["selectionChange"],
|
|
1410
1427
|
setup(e, t) {
|
|
1411
|
-
const n =
|
|
1428
|
+
const n = b(), l = b(e.dataSource), i = b([]), a = b(e.separator), r = b(e.width), c = b(e.maxHeight), m = b(String(e.selectedValues).split(a.value)), p = B(() => e.multiSelect), u = B(() => ({
|
|
1412
1429
|
enableSelectRow: !0,
|
|
1413
1430
|
multiSelect: e.multiSelect,
|
|
1414
1431
|
multiSelectMode: "OnCheckAndClick",
|
|
1415
|
-
showCheckbox:
|
|
1432
|
+
showCheckbox: p.value,
|
|
1416
1433
|
showSelectAll: !1,
|
|
1417
1434
|
showSelection: !0
|
|
1418
1435
|
}));
|
|
1419
|
-
|
|
1420
|
-
|
|
1436
|
+
H(e.dataSource, () => {
|
|
1437
|
+
l.value = e.dataSource;
|
|
1421
1438
|
});
|
|
1422
1439
|
const o = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), s = B(() => {
|
|
1423
|
-
const
|
|
1424
|
-
return r.value !== void 0 && (
|
|
1440
|
+
const d = {};
|
|
1441
|
+
return r.value !== void 0 && (d.width = `${r.value}px`), c.value !== void 0 && c.value > 0 && (d.maxHeight = `${c.value}px`), d;
|
|
1425
1442
|
});
|
|
1426
|
-
function
|
|
1427
|
-
i.value =
|
|
1443
|
+
function g(d) {
|
|
1444
|
+
i.value = d.map((f) => Object.assign({}, f)), m.value = d.map((f) => f[e.idField]), t.emit("selectionChange", i.value);
|
|
1428
1445
|
}
|
|
1429
|
-
function y(
|
|
1446
|
+
function y(d) {
|
|
1430
1447
|
if (e.enableHighlightSearch)
|
|
1431
1448
|
return;
|
|
1432
|
-
let
|
|
1433
|
-
|
|
1449
|
+
let f = [];
|
|
1450
|
+
const {
|
|
1451
|
+
searchOption: v
|
|
1452
|
+
} = e;
|
|
1453
|
+
typeof v == "function" ? f = l.value.filter((S) => v(d, S)) : f = l.value.filter((S) => S[e.valueField].indexOf(d) > -1 || S[e.textField].indexOf(d) > -1), n.value.updateDataSource(f);
|
|
1434
1454
|
}
|
|
1435
|
-
return
|
|
1436
|
-
|
|
1437
|
-
}), () =>
|
|
1455
|
+
return H([() => e.selectedValues], ([d]) => {
|
|
1456
|
+
m.value = d.split(a.value);
|
|
1457
|
+
}), () => h("div", {
|
|
1438
1458
|
class: "f-combo-list-container pl-1",
|
|
1439
1459
|
style: s.value
|
|
1440
|
-
}, [
|
|
1460
|
+
}, [h(He, {
|
|
1441
1461
|
ref: n,
|
|
1442
1462
|
size: "small",
|
|
1443
1463
|
itemClass: "f-combo-list-item",
|
|
1444
1464
|
header: o.value,
|
|
1445
1465
|
headerClass: "f-combo-list-search-box",
|
|
1446
|
-
data:
|
|
1466
|
+
data: l.value,
|
|
1447
1467
|
idField: e.idField,
|
|
1448
1468
|
textField: e.textField,
|
|
1449
1469
|
titleField: e.titleField,
|
|
1450
1470
|
multiSelect: e.multiSelect,
|
|
1451
|
-
selection:
|
|
1471
|
+
selection: u.value,
|
|
1452
1472
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1453
|
-
selectionValues:
|
|
1454
|
-
onSelectionChange:
|
|
1473
|
+
selectionValues: m.value,
|
|
1474
|
+
onSelectionChange: g,
|
|
1455
1475
|
onAfterSearch: y
|
|
1456
1476
|
}, null)]);
|
|
1457
1477
|
}
|
|
1458
1478
|
});
|
|
1459
|
-
function
|
|
1460
|
-
const t =
|
|
1461
|
-
function
|
|
1462
|
-
const s = String(o).split(e.separator),
|
|
1463
|
-
return
|
|
1464
|
-
const
|
|
1465
|
-
return
|
|
1479
|
+
function Zt(e) {
|
|
1480
|
+
const t = b(""), n = b(e.modelValue), l = b(e.data || []), i = b(e.editable);
|
|
1481
|
+
function a(o) {
|
|
1482
|
+
const s = String(o).split(e.separator), g = s.map((f) => [f, !0]), y = new Map(g);
|
|
1483
|
+
return l.value.filter((f) => y.has(String(f[e.valueField]))).sort((f, v) => {
|
|
1484
|
+
const S = s.indexOf(f[e.valueField]), w = s.indexOf(v[e.valueField]);
|
|
1485
|
+
return S - w;
|
|
1466
1486
|
});
|
|
1467
1487
|
}
|
|
1468
1488
|
function r(o) {
|
|
1469
|
-
const s =
|
|
1489
|
+
const s = a(o).map((g) => g[e.textField]).join(e.separator);
|
|
1470
1490
|
t.value = i.value ? s || o : s;
|
|
1471
1491
|
}
|
|
1472
|
-
function
|
|
1473
|
-
const s = o.split(e.separator).map((y) => [y, !0]),
|
|
1474
|
-
return
|
|
1492
|
+
function c(o) {
|
|
1493
|
+
const s = o.split(e.separator).map((y) => [y, !0]), g = new Map(s);
|
|
1494
|
+
return l.value.filter((y) => g.has(y[e.textField]));
|
|
1475
1495
|
}
|
|
1476
|
-
function
|
|
1496
|
+
function m(o) {
|
|
1477
1497
|
const s = {};
|
|
1478
1498
|
return s[e.idField] = o, s[e.textField] = o, [s];
|
|
1479
1499
|
}
|
|
1480
|
-
function
|
|
1481
|
-
let s =
|
|
1482
|
-
const
|
|
1483
|
-
return i.value && !
|
|
1500
|
+
function p(o) {
|
|
1501
|
+
let s = c(o);
|
|
1502
|
+
const g = s && s.length > 0;
|
|
1503
|
+
return i.value && !g && (s = m(o)), s;
|
|
1484
1504
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const { url: o, method: s = "GET", headers:
|
|
1487
|
-
let
|
|
1488
|
-
fetch(o,
|
|
1505
|
+
function u() {
|
|
1506
|
+
const { url: o, method: s = "GET", headers: g = {}, body: y = null } = e.remote, d = s.toLowerCase() === "get" ? { method: s, headers: g } : { method: s, headers: g, body: y };
|
|
1507
|
+
let f = !1;
|
|
1508
|
+
fetch(o, d).then((v) => {
|
|
1489
1509
|
var w, M;
|
|
1490
1510
|
if (v.status === 200)
|
|
1491
|
-
return
|
|
1511
|
+
return f = !!((M = (w = v.headers) == null ? void 0 : w.get("content-type")) != null && M.includes("application/json")), f ? v.text() : v.json();
|
|
1492
1512
|
throw new Error(v.statusText);
|
|
1493
1513
|
}).then((v) => {
|
|
1494
|
-
|
|
1514
|
+
l.value = f ? JSON.parse(v) : v;
|
|
1495
1515
|
}).catch((v) => {
|
|
1496
1516
|
console.error(v);
|
|
1497
1517
|
});
|
|
1498
1518
|
}
|
|
1499
|
-
return e.remote &&
|
|
1500
|
-
|
|
1501
|
-
}),
|
|
1519
|
+
return e.remote && u(), H(() => e.data, () => {
|
|
1520
|
+
l.value = e.data;
|
|
1521
|
+
}), H([l], ([o]) => {
|
|
1502
1522
|
if (e.modelValue != null) {
|
|
1503
|
-
const s = o.find((
|
|
1523
|
+
const s = o.find((g) => g[e.valueField] === e.modelValue);
|
|
1504
1524
|
s && (t.value = s[e.textField]);
|
|
1505
1525
|
}
|
|
1506
|
-
}),
|
|
1526
|
+
}), H(() => e.modelValue, (o) => {
|
|
1507
1527
|
n.value = o, r(o);
|
|
1508
|
-
}), r(e.modelValue), { dataSource:
|
|
1528
|
+
}), r(e.modelValue), { dataSource: l, displayText: t, editable: i, modelValue: n, getItemsByDisplayText: c, getItemsByValue: a, getSelectedItemsByDisplayText: p };
|
|
1509
1529
|
}
|
|
1510
|
-
const
|
|
1530
|
+
const U = /* @__PURE__ */ x({
|
|
1511
1531
|
name: "FComboList",
|
|
1512
|
-
props:
|
|
1532
|
+
props: ee,
|
|
1513
1533
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1514
1534
|
setup(e, t) {
|
|
1515
|
-
const n =
|
|
1516
|
-
dataSource:
|
|
1517
|
-
displayText:
|
|
1518
|
-
editable:
|
|
1519
|
-
modelValue:
|
|
1535
|
+
const n = b(), l = b(e.disabled), i = b(e.enableClear), a = b(e.enableSearch), r = b(e.readonly), {
|
|
1536
|
+
dataSource: c,
|
|
1537
|
+
displayText: m,
|
|
1538
|
+
editable: p,
|
|
1539
|
+
modelValue: u,
|
|
1520
1540
|
getSelectedItemsByDisplayText: o
|
|
1521
|
-
} =
|
|
1541
|
+
} = Zt(e), s = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1522
1542
|
function y() {
|
|
1523
1543
|
!s.value && n.value && n.value.hidePopup();
|
|
1524
1544
|
}
|
|
1525
|
-
function
|
|
1526
|
-
|
|
1545
|
+
function d(C) {
|
|
1546
|
+
m.value = C.map((k) => k[e.textField]).join(e.separator), C.length === 1 ? u.value = C[0][e.valueField] : u.value = C.map((k) => k[e.valueField]).join(e.separator), t.emit("update:modelValue", u.value), t.emit("change", C, u.value), y();
|
|
1527
1547
|
}
|
|
1528
|
-
function
|
|
1548
|
+
function f() {
|
|
1529
1549
|
r.value || n.value.togglePopup();
|
|
1530
1550
|
}
|
|
1531
|
-
function v(
|
|
1532
|
-
|
|
1551
|
+
function v(C) {
|
|
1552
|
+
u.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1533
1553
|
}
|
|
1534
|
-
function C
|
|
1535
|
-
const k = o(
|
|
1536
|
-
|
|
1554
|
+
function S(C) {
|
|
1555
|
+
const k = o(C);
|
|
1556
|
+
d(k);
|
|
1537
1557
|
}
|
|
1538
1558
|
function w() {
|
|
1539
|
-
return
|
|
1559
|
+
return m.value;
|
|
1540
1560
|
}
|
|
1541
|
-
function M(
|
|
1542
|
-
t.emit("input",
|
|
1561
|
+
function M(C) {
|
|
1562
|
+
t.emit("input", C);
|
|
1543
1563
|
}
|
|
1544
1564
|
return t.expose({
|
|
1545
1565
|
getDisplayText: w
|
|
1546
|
-
}),
|
|
1547
|
-
|
|
1548
|
-
}), () =>
|
|
1566
|
+
}), H([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, k, O, F, L]) => {
|
|
1567
|
+
l.value = C, p.value = k, i.value = O, a.value = F, r.value = L;
|
|
1568
|
+
}), () => h(Ge, {
|
|
1549
1569
|
ref: n,
|
|
1550
1570
|
id: e.id,
|
|
1551
|
-
disable:
|
|
1571
|
+
disable: l.value,
|
|
1552
1572
|
readonly: r.value,
|
|
1553
1573
|
forcePlaceholder: e.forcePlaceholder,
|
|
1554
|
-
editable:
|
|
1574
|
+
editable: p.value,
|
|
1555
1575
|
buttonContent: e.dropDownIcon,
|
|
1556
1576
|
placeholder: e.placeholder,
|
|
1557
1577
|
enableClear: i.value,
|
|
@@ -1560,39 +1580,39 @@ const q = /* @__PURE__ */ R({
|
|
|
1560
1580
|
enableTitle: e.enableTitle,
|
|
1561
1581
|
multiSelect: e.multiSelect,
|
|
1562
1582
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1563
|
-
modelValue:
|
|
1564
|
-
"onUpdate:modelValue": (
|
|
1583
|
+
modelValue: m.value,
|
|
1584
|
+
"onUpdate:modelValue": (C) => m.value = C,
|
|
1565
1585
|
focusOnCreated: e.focusOnCreated,
|
|
1566
1586
|
selectOnCreated: e.selectOnCreated,
|
|
1567
1587
|
onClear: v,
|
|
1568
|
-
onClick:
|
|
1569
|
-
onChange:
|
|
1588
|
+
onClick: f,
|
|
1589
|
+
onChange: S,
|
|
1570
1590
|
onInput: M,
|
|
1571
1591
|
beforeOpen: e.beforeOpen
|
|
1572
1592
|
}, {
|
|
1573
|
-
default: () => [
|
|
1593
|
+
default: () => [h(Yt, {
|
|
1574
1594
|
idField: e.idField,
|
|
1575
1595
|
valueField: e.valueField,
|
|
1576
1596
|
textField: e.textField,
|
|
1577
1597
|
titleField: e.titleField,
|
|
1578
|
-
dataSource:
|
|
1579
|
-
selectedValues:
|
|
1598
|
+
dataSource: c.value,
|
|
1599
|
+
selectedValues: u.value,
|
|
1580
1600
|
multiSelect: e.multiSelect,
|
|
1581
|
-
enableSearch:
|
|
1601
|
+
enableSearch: a.value,
|
|
1582
1602
|
maxHeight: e.maxHeight,
|
|
1583
1603
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1584
|
-
width: e.fitEditor ?
|
|
1585
|
-
onSelectionChange:
|
|
1604
|
+
width: e.fitEditor ? g.value : void 0,
|
|
1605
|
+
onSelectionChange: d
|
|
1586
1606
|
}, null)]
|
|
1587
1607
|
});
|
|
1588
1608
|
}
|
|
1589
|
-
}),
|
|
1590
|
-
["appearance",
|
|
1609
|
+
}), Kt = /* @__PURE__ */ new Map([
|
|
1610
|
+
["appearance", Ne]
|
|
1591
1611
|
]);
|
|
1592
|
-
function
|
|
1612
|
+
function en(e, t, n) {
|
|
1593
1613
|
return t;
|
|
1594
1614
|
}
|
|
1595
|
-
const
|
|
1615
|
+
const tn = "https://json-schema.org/draft/2020-12/schema", nn = "https://farris-design.gitee.io/button-edit.schema.json", on = "button-edit", ln = "A Farris Input Component", an = "object", rn = {
|
|
1596
1616
|
id: {
|
|
1597
1617
|
description: "The unique identifier for a Input Group",
|
|
1598
1618
|
type: "string"
|
|
@@ -1776,18 +1796,18 @@ const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-
|
|
|
1776
1796
|
type: "string",
|
|
1777
1797
|
default: ""
|
|
1778
1798
|
}
|
|
1779
|
-
},
|
|
1799
|
+
}, sn = [
|
|
1780
1800
|
"id",
|
|
1781
1801
|
"type"
|
|
1782
|
-
],
|
|
1783
|
-
$schema:
|
|
1784
|
-
$id:
|
|
1785
|
-
title:
|
|
1786
|
-
description:
|
|
1787
|
-
type:
|
|
1788
|
-
properties:
|
|
1789
|
-
required:
|
|
1790
|
-
},
|
|
1802
|
+
], cn = {
|
|
1803
|
+
$schema: tn,
|
|
1804
|
+
$id: nn,
|
|
1805
|
+
title: on,
|
|
1806
|
+
description: ln,
|
|
1807
|
+
type: an,
|
|
1808
|
+
properties: rn,
|
|
1809
|
+
required: sn
|
|
1810
|
+
}, un = "buttonEdit", dn = "A Farris Component", pn = "object", fn = {
|
|
1791
1811
|
basic: {
|
|
1792
1812
|
description: "Basic Infomation",
|
|
1793
1813
|
title: "基本信息",
|
|
@@ -1858,7 +1878,7 @@ const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-
|
|
|
1858
1878
|
},
|
|
1859
1879
|
{
|
|
1860
1880
|
value: "center",
|
|
1861
|
-
name: "
|
|
1881
|
+
name: "居中"
|
|
1862
1882
|
},
|
|
1863
1883
|
{
|
|
1864
1884
|
value: "right",
|
|
@@ -1869,12 +1889,12 @@ const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-
|
|
|
1869
1889
|
}
|
|
1870
1890
|
}
|
|
1871
1891
|
}
|
|
1872
|
-
},
|
|
1873
|
-
title:
|
|
1874
|
-
description:
|
|
1875
|
-
type:
|
|
1876
|
-
categories:
|
|
1877
|
-
},
|
|
1892
|
+
}, mn = {
|
|
1893
|
+
title: un,
|
|
1894
|
+
description: dn,
|
|
1895
|
+
type: pn,
|
|
1896
|
+
categories: fn
|
|
1897
|
+
}, ge = {
|
|
1878
1898
|
/**
|
|
1879
1899
|
* 组件标识
|
|
1880
1900
|
*/
|
|
@@ -1983,34 +2003,34 @@ const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-
|
|
|
1983
2003
|
/** 更新方式 blur | change */
|
|
1984
2004
|
updateOn: { type: String, default: "change" }
|
|
1985
2005
|
};
|
|
1986
|
-
_(
|
|
1987
|
-
const
|
|
2006
|
+
_(ge, cn, Kt, en, mn);
|
|
2007
|
+
const yn = {
|
|
1988
2008
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1989
2009
|
host: { type: Object },
|
|
1990
2010
|
backgroundColor: { type: String, default: "" }
|
|
1991
|
-
}, gn = /* @__PURE__ */
|
|
2011
|
+
}, gn = /* @__PURE__ */ x({
|
|
1992
2012
|
name: "FOverlay",
|
|
1993
|
-
props:
|
|
2013
|
+
props: yn,
|
|
1994
2014
|
emits: ["click"],
|
|
1995
2015
|
setup(e, t) {
|
|
1996
|
-
const n =
|
|
2016
|
+
const n = b(e.popupContentPosition), l = b(e.host), i = B(() => ({
|
|
1997
2017
|
backgroundColor: e.backgroundColor || "",
|
|
1998
2018
|
pointerEvents: "auto"
|
|
1999
2019
|
}));
|
|
2000
|
-
function
|
|
2001
|
-
t.emit("click"),
|
|
2020
|
+
function a(c) {
|
|
2021
|
+
t.emit("click"), c.preventDefault(), c.stopPropagation();
|
|
2002
2022
|
}
|
|
2003
2023
|
B(() => {
|
|
2004
|
-
const
|
|
2005
|
-
if (
|
|
2006
|
-
const
|
|
2007
|
-
left:
|
|
2008
|
-
top:
|
|
2024
|
+
const c = l.value;
|
|
2025
|
+
if (c) {
|
|
2026
|
+
const m = c.getBoundingClientRect(), {
|
|
2027
|
+
left: p,
|
|
2028
|
+
top: u,
|
|
2009
2029
|
height: o
|
|
2010
|
-
} =
|
|
2030
|
+
} = m;
|
|
2011
2031
|
return {
|
|
2012
|
-
left:
|
|
2013
|
-
top:
|
|
2032
|
+
left: p,
|
|
2033
|
+
top: u + o
|
|
2014
2034
|
};
|
|
2015
2035
|
}
|
|
2016
2036
|
return n.value;
|
|
@@ -2020,146 +2040,146 @@ const hn = {
|
|
|
2020
2040
|
// left: `${position.value.left}px`,
|
|
2021
2041
|
// top: `${position.value.top}px`
|
|
2022
2042
|
}));
|
|
2023
|
-
return () =>
|
|
2043
|
+
return () => h(Fe, {
|
|
2024
2044
|
to: "body"
|
|
2025
2045
|
}, {
|
|
2026
2046
|
default: () => {
|
|
2027
|
-
var
|
|
2028
|
-
return [
|
|
2047
|
+
var c, m;
|
|
2048
|
+
return [h("div", {
|
|
2029
2049
|
class: "overlay-container",
|
|
2030
|
-
onClick: (
|
|
2050
|
+
onClick: (p) => a(p),
|
|
2031
2051
|
style: i.value
|
|
2032
|
-
}, [
|
|
2052
|
+
}, [h("div", {
|
|
2033
2053
|
style: r.value
|
|
2034
|
-
}, [(
|
|
2054
|
+
}, [(m = (c = t.slots).default) == null ? void 0 : m.call(c)])])];
|
|
2035
2055
|
}
|
|
2036
2056
|
});
|
|
2037
2057
|
}
|
|
2038
2058
|
});
|
|
2039
|
-
function
|
|
2059
|
+
function hn(e) {
|
|
2040
2060
|
if (e.content && e.content.render)
|
|
2041
2061
|
return e.content.render;
|
|
2042
2062
|
if (e.render && typeof e.render == "function")
|
|
2043
2063
|
return e.render;
|
|
2044
2064
|
}
|
|
2045
|
-
function
|
|
2065
|
+
function vn(e) {
|
|
2046
2066
|
const t = document.createElement("div");
|
|
2047
2067
|
t.style.display = "contents";
|
|
2048
2068
|
let n;
|
|
2049
|
-
const
|
|
2069
|
+
const l = e.onClickCallback || (() => {
|
|
2050
2070
|
}), i = () => {
|
|
2051
|
-
|
|
2071
|
+
l(), n && n.unmount();
|
|
2052
2072
|
};
|
|
2053
|
-
return n =
|
|
2073
|
+
return n = ke({
|
|
2054
2074
|
setup() {
|
|
2055
|
-
|
|
2075
|
+
Ie(() => {
|
|
2056
2076
|
document.body.removeChild(t);
|
|
2057
2077
|
});
|
|
2058
|
-
const
|
|
2059
|
-
return () =>
|
|
2078
|
+
const a = hn(e);
|
|
2079
|
+
return () => h(gn, {
|
|
2060
2080
|
"popup-content-position": e.popupPosition,
|
|
2061
2081
|
host: e.host,
|
|
2062
2082
|
onClick: i,
|
|
2063
2083
|
backgroundColor: e.backgroundColor
|
|
2064
2084
|
}, {
|
|
2065
|
-
default: () => [
|
|
2085
|
+
default: () => [a && a()]
|
|
2066
2086
|
});
|
|
2067
2087
|
}
|
|
2068
2088
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
2069
2089
|
}
|
|
2070
2090
|
class bn {
|
|
2071
2091
|
static show(t) {
|
|
2072
|
-
return
|
|
2092
|
+
return vn(t);
|
|
2073
2093
|
}
|
|
2074
2094
|
}
|
|
2075
|
-
const
|
|
2076
|
-
function
|
|
2095
|
+
const Cn = Symbol("FModalService");
|
|
2096
|
+
function he(e, t) {
|
|
2077
2097
|
function n() {
|
|
2078
|
-
const
|
|
2098
|
+
const l = e.beforeOpen || e.beforeClickButton || null;
|
|
2079
2099
|
let i = Promise.resolve(!0);
|
|
2080
|
-
if (
|
|
2081
|
-
const
|
|
2082
|
-
if (typeof
|
|
2100
|
+
if (l) {
|
|
2101
|
+
const a = l(t.value);
|
|
2102
|
+
if (typeof a > "u")
|
|
2083
2103
|
return i;
|
|
2084
|
-
typeof
|
|
2104
|
+
typeof a == "boolean" ? i = Promise.resolve(a) : i = a;
|
|
2085
2105
|
}
|
|
2086
2106
|
return i;
|
|
2087
2107
|
}
|
|
2088
2108
|
return { judgeCanOpen: n };
|
|
2089
2109
|
}
|
|
2090
|
-
function
|
|
2091
|
-
const
|
|
2110
|
+
function Sn(e, t, n, l, i) {
|
|
2111
|
+
const a = b(e.buttonBehavior), r = b(e.popupOnInput), c = B(() => ({
|
|
2092
2112
|
"input-group-append": !0,
|
|
2093
2113
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
2094
|
-
})), { judgeCanOpen:
|
|
2095
|
-
async function s(
|
|
2096
|
-
if (await
|
|
2097
|
-
const
|
|
2098
|
-
if (
|
|
2099
|
-
const v = e.modalOptions,
|
|
2114
|
+
})), { judgeCanOpen: m } = he(e, i), p = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), u = N(Cn, null), o = b();
|
|
2115
|
+
async function s(d) {
|
|
2116
|
+
if (await m() && p.value) {
|
|
2117
|
+
const f = !!t.slots.default;
|
|
2118
|
+
if (a.value === "Modal") {
|
|
2119
|
+
const v = e.modalOptions, S = u == null ? void 0 : u.open({
|
|
2100
2120
|
...v,
|
|
2101
2121
|
render: () => t.slots.default && t.slots.default()
|
|
2102
2122
|
});
|
|
2103
|
-
o.value =
|
|
2123
|
+
o.value = S == null ? void 0 : S.modalRef;
|
|
2104
2124
|
}
|
|
2105
|
-
|
|
2125
|
+
a.value === "Overlay" && bn.show({
|
|
2106
2126
|
// host: buttonEditRef.value,
|
|
2107
2127
|
host: document.body,
|
|
2108
2128
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
2109
2129
|
render: () => t.slots.default && t.slots.default()
|
|
2110
|
-
}),
|
|
2130
|
+
}), f && a.value === "Popup" && l.togglePopup(!0), f && r.value && l.hidePopup(), t.emit("clickButton", { origin: d, value: e.modelValue });
|
|
2111
2131
|
}
|
|
2112
2132
|
}
|
|
2113
|
-
function
|
|
2114
|
-
t.emit("mouseEnterIcon",
|
|
2133
|
+
function g(d) {
|
|
2134
|
+
t.emit("mouseEnterIcon", d);
|
|
2115
2135
|
}
|
|
2116
|
-
function y(
|
|
2117
|
-
t.emit("mouseLeaveIcon",
|
|
2136
|
+
function y(d) {
|
|
2137
|
+
t.emit("mouseLeaveIcon", d);
|
|
2118
2138
|
}
|
|
2119
2139
|
return {
|
|
2120
|
-
buttonGroupClass:
|
|
2140
|
+
buttonGroupClass: c,
|
|
2121
2141
|
onClickButton: s,
|
|
2122
|
-
onMouseEnterButton:
|
|
2142
|
+
onMouseEnterButton: g,
|
|
2123
2143
|
onMouseLeaveButton: y,
|
|
2124
2144
|
modalRef: o
|
|
2125
2145
|
};
|
|
2126
2146
|
}
|
|
2127
|
-
function
|
|
2128
|
-
const i =
|
|
2129
|
-
function
|
|
2147
|
+
function wn(e, t, n, l) {
|
|
2148
|
+
const i = b(), a = b(!1), { judgeCanOpen: r } = he(e, l);
|
|
2149
|
+
function c() {
|
|
2130
2150
|
const o = i.value;
|
|
2131
2151
|
o && o.show(n.value);
|
|
2132
2152
|
}
|
|
2133
|
-
async function
|
|
2153
|
+
async function m(o = !1) {
|
|
2134
2154
|
if (!!t.slots.default) {
|
|
2135
|
-
if (!o && !
|
|
2155
|
+
if (!o && !a.value && !await r())
|
|
2136
2156
|
return;
|
|
2137
|
-
|
|
2157
|
+
a.value = !a.value, await te(), c();
|
|
2138
2158
|
}
|
|
2139
2159
|
}
|
|
2140
|
-
async function
|
|
2160
|
+
async function p(o = !1) {
|
|
2141
2161
|
if (!!t.slots.default) {
|
|
2142
2162
|
if (!o && !await r())
|
|
2143
2163
|
return;
|
|
2144
|
-
|
|
2164
|
+
a.value = !0, await te(), c();
|
|
2145
2165
|
}
|
|
2146
2166
|
}
|
|
2147
|
-
function
|
|
2148
|
-
|
|
2167
|
+
function u() {
|
|
2168
|
+
a.value = !1;
|
|
2149
2169
|
}
|
|
2150
|
-
return { hidePopup:
|
|
2170
|
+
return { hidePopup: u, popup: p, shouldPopupContent: a, togglePopup: m, popoverRef: i };
|
|
2151
2171
|
}
|
|
2152
|
-
function
|
|
2172
|
+
function Fn(e, t, n) {
|
|
2153
2173
|
const {
|
|
2154
|
-
buttonGroupClass:
|
|
2155
|
-
} = n, i =
|
|
2174
|
+
buttonGroupClass: l
|
|
2175
|
+
} = n, i = b();
|
|
2156
2176
|
return {
|
|
2157
|
-
renderButtonGroup: () =>
|
|
2177
|
+
renderButtonGroup: () => h("div", {
|
|
2158
2178
|
id: `${e.id}-button-group`,
|
|
2159
|
-
class:
|
|
2160
|
-
}, [t.slots.buttonContent ?
|
|
2179
|
+
class: l.value
|
|
2180
|
+
}, [t.slots.buttonContent ? h("span", {
|
|
2161
2181
|
class: "input-group-text input-group-append-button"
|
|
2162
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
2182
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
|
|
2163
2183
|
class: "input-group-text input-group-append-button",
|
|
2164
2184
|
innerHTML: e.buttonContent,
|
|
2165
2185
|
ref: i
|
|
@@ -2167,111 +2187,78 @@ function In(e, t, n) {
|
|
|
2167
2187
|
buttonHandleElement: i
|
|
2168
2188
|
};
|
|
2169
2189
|
}
|
|
2170
|
-
const
|
|
2190
|
+
const kn = /* @__PURE__ */ x({
|
|
2171
2191
|
name: "FButtonEdit",
|
|
2172
|
-
props:
|
|
2192
|
+
props: ge,
|
|
2173
2193
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
2174
2194
|
setup(e, t) {
|
|
2175
|
-
const n =
|
|
2195
|
+
const n = b(), l = N("design-item-context"), i = se(n, l), a = b(e.customClass), r = b(e.modelValue), c = wn(e, t, n, r), m = Sn(e, t, n, c, r), p = b(), u = B(() => ({
|
|
2176
2196
|
"f-cmp-inputgroup": !0,
|
|
2177
2197
|
"input-group": !0,
|
|
2178
2198
|
"f-state-disable": !0,
|
|
2179
2199
|
"f-state-editable": !1,
|
|
2180
2200
|
"f-state-readonly": !0
|
|
2181
2201
|
}));
|
|
2182
|
-
|
|
2202
|
+
J(() => {
|
|
2183
2203
|
n.value.componentInstance = i;
|
|
2184
2204
|
}), t.expose(i.value);
|
|
2185
2205
|
const o = B(() => {
|
|
2186
|
-
const
|
|
2206
|
+
const g = {
|
|
2187
2207
|
"f-button-edit": !0,
|
|
2188
2208
|
"f-cmp-inputgroup": !0,
|
|
2189
2209
|
"f-button-edit-nowrap": !e.wrapText
|
|
2190
2210
|
};
|
|
2191
|
-
return
|
|
2211
|
+
return a.value && a.value.split(" ").reduce((y, d) => (y[d] = !0, y), g), g;
|
|
2192
2212
|
}), {
|
|
2193
2213
|
renderButtonGroup: s
|
|
2194
|
-
} =
|
|
2195
|
-
return () =>
|
|
2214
|
+
} = Fn(e, t, m);
|
|
2215
|
+
return () => h("div", Me(t.attrs, {
|
|
2196
2216
|
ref: n,
|
|
2197
2217
|
class: o.value,
|
|
2198
2218
|
id: e.id
|
|
2199
|
-
}), [
|
|
2200
|
-
class:
|
|
2201
|
-
}, [
|
|
2202
|
-
ref:
|
|
2219
|
+
}), [h("div", {
|
|
2220
|
+
class: u.value
|
|
2221
|
+
}, [h("input", {
|
|
2222
|
+
ref: p,
|
|
2203
2223
|
class: "form-control",
|
|
2204
2224
|
readonly: !0,
|
|
2205
2225
|
placeholder: e.placeholder
|
|
2206
2226
|
}, null), s()])]);
|
|
2207
2227
|
}
|
|
2208
2228
|
});
|
|
2209
|
-
|
|
2210
|
-
e.schema;
|
|
2211
|
-
const n = S(!0), a = S(!0);
|
|
2212
|
-
function i(o) {
|
|
2213
|
-
return !1;
|
|
2214
|
-
}
|
|
2215
|
-
function l() {
|
|
2216
|
-
return !1;
|
|
2217
|
-
}
|
|
2218
|
-
function r() {
|
|
2219
|
-
return !1;
|
|
2220
|
-
}
|
|
2221
|
-
function d() {
|
|
2222
|
-
return !0;
|
|
2223
|
-
}
|
|
2224
|
-
function u(o) {
|
|
2225
|
-
}
|
|
2226
|
-
function c() {
|
|
2227
|
-
}
|
|
2228
|
-
function p(o) {
|
|
2229
|
-
return null;
|
|
2230
|
-
}
|
|
2231
|
-
return {
|
|
2232
|
-
canAccepts: i,
|
|
2233
|
-
checkCanDeleteComponent: l,
|
|
2234
|
-
checkCanMoveComponent: r,
|
|
2235
|
-
hideNestedPaddingInDesginerView: d,
|
|
2236
|
-
onAcceptMovedChildElement: u,
|
|
2237
|
-
resolveComponentContext: c,
|
|
2238
|
-
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2239
|
-
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
2240
|
-
getPropsConfig: p
|
|
2241
|
-
};
|
|
2242
|
-
}
|
|
2243
|
-
class ve {
|
|
2229
|
+
class In {
|
|
2244
2230
|
constructor(t, n) {
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2231
|
+
T(this, "componentId");
|
|
2232
|
+
T(this, "viewModelId");
|
|
2233
|
+
T(this, "eventsEditorUtils");
|
|
2234
|
+
T(this, "formSchemaUtils");
|
|
2235
|
+
T(this, "formMetadataConverter");
|
|
2236
|
+
T(this, "designViewModelUtils");
|
|
2237
|
+
T(this, "designViewModelField");
|
|
2238
|
+
T(this, "controlCreatorUtils");
|
|
2239
|
+
T(this, "designerHostService");
|
|
2240
|
+
T(this, "schemaService", null);
|
|
2241
|
+
T(this, "metadataService", null);
|
|
2242
|
+
T(this, "propertyConfig", {
|
|
2257
2243
|
type: "object",
|
|
2258
2244
|
categories: {}
|
|
2259
2245
|
});
|
|
2260
|
-
var
|
|
2261
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((
|
|
2246
|
+
var l;
|
|
2247
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((l = this.formSchemaUtils) == null ? void 0 : l.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
2262
2248
|
}
|
|
2263
2249
|
getTableInfo() {
|
|
2264
2250
|
var t;
|
|
2265
2251
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
2266
2252
|
}
|
|
2267
2253
|
setDesignViewModelField(t) {
|
|
2254
|
+
var l;
|
|
2268
2255
|
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
2269
2256
|
if (n) {
|
|
2270
2257
|
if (!this.designViewModelField) {
|
|
2271
|
-
const
|
|
2272
|
-
this.designViewModelField =
|
|
2258
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
2259
|
+
this.designViewModelField = i.fields.find((a) => a.id === n);
|
|
2273
2260
|
}
|
|
2274
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
2261
|
+
t.updateOn = (l = this.designViewModelField) == null ? void 0 : l.updateOn;
|
|
2275
2262
|
}
|
|
2276
2263
|
}
|
|
2277
2264
|
changeFieldEditorType(t, n) {
|
|
@@ -2295,7 +2282,7 @@ class ve {
|
|
|
2295
2282
|
type: "combo-list",
|
|
2296
2283
|
textField: "name",
|
|
2297
2284
|
valueField: "value",
|
|
2298
|
-
data: [{ value: t.type, name:
|
|
2285
|
+
data: [{ value: t.type, name: I[t.type].name }]
|
|
2299
2286
|
}
|
|
2300
2287
|
}
|
|
2301
2288
|
}
|
|
@@ -2328,19 +2315,19 @@ class ve {
|
|
|
2328
2315
|
* @returns
|
|
2329
2316
|
*/
|
|
2330
2317
|
updateElementByParentContainer(t, n) {
|
|
2331
|
-
const
|
|
2332
|
-
if (!
|
|
2318
|
+
const l = n && n.parent && n.parent.schema;
|
|
2319
|
+
if (!l)
|
|
2333
2320
|
return;
|
|
2334
|
-
const i =
|
|
2335
|
-
|
|
2321
|
+
const i = l.contents.findIndex((r) => r.id === t), a = re(l.contents[i]);
|
|
2322
|
+
l.contents.splice(i, 1), l.contents.splice(i, 0, a);
|
|
2336
2323
|
}
|
|
2337
2324
|
}
|
|
2338
|
-
const
|
|
2325
|
+
const G = class G {
|
|
2339
2326
|
/**
|
|
2340
2327
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2341
2328
|
*/
|
|
2342
2329
|
static getEditorTypesByMDataType(t) {
|
|
2343
|
-
const n =
|
|
2330
|
+
const n = G.fieldControlTypeMapping[t];
|
|
2344
2331
|
return n || [{ key: "", value: "" }];
|
|
2345
2332
|
}
|
|
2346
2333
|
/**
|
|
@@ -2348,9 +2335,9 @@ const U = class U {
|
|
|
2348
2335
|
*/
|
|
2349
2336
|
static getAllInputTypes() {
|
|
2350
2337
|
const t = [];
|
|
2351
|
-
for (
|
|
2352
|
-
|
|
2353
|
-
t.find((i) => i.key ===
|
|
2338
|
+
for (const n in G.fieldControlTypeMapping)
|
|
2339
|
+
G.fieldControlTypeMapping[n].forEach((l) => {
|
|
2340
|
+
t.find((i) => i.key === l.key && i.value === l.value) || t.push({ key: l.key, value: l.value });
|
|
2354
2341
|
});
|
|
2355
2342
|
return t;
|
|
2356
2343
|
}
|
|
@@ -2358,176 +2345,174 @@ const U = class U {
|
|
|
2358
2345
|
/**
|
|
2359
2346
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2360
2347
|
*/
|
|
2361
|
-
|
|
2348
|
+
T(G, "fieldControlTypeMapping", {
|
|
2362
2349
|
String: [
|
|
2363
|
-
{ key:
|
|
2364
|
-
{ key:
|
|
2365
|
-
{ key:
|
|
2366
|
-
{ key:
|
|
2367
|
-
{ key:
|
|
2368
|
-
{ key:
|
|
2369
|
-
{ key:
|
|
2370
|
-
{ key:
|
|
2350
|
+
{ key: I["input-group"].type, value: I["input-group"].name },
|
|
2351
|
+
{ key: I.lookup.type, value: I.lookup.name },
|
|
2352
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name },
|
|
2353
|
+
{ key: I["check-box"].type, value: I["check-box"].name },
|
|
2354
|
+
{ key: I["check-group"].type, value: I["check-group"].name },
|
|
2355
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name },
|
|
2356
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2357
|
+
{ key: I.textarea.type, value: I.textarea.name }
|
|
2371
2358
|
],
|
|
2372
2359
|
Text: [
|
|
2373
|
-
{ key:
|
|
2374
|
-
{ key:
|
|
2360
|
+
{ key: I.textarea.type, value: I.textarea.name },
|
|
2361
|
+
{ key: I.lookup.type, value: I.lookup.name }
|
|
2375
2362
|
],
|
|
2376
2363
|
Decimal: [
|
|
2377
|
-
{ key:
|
|
2364
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2378
2365
|
],
|
|
2379
2366
|
Integer: [
|
|
2380
|
-
{ key:
|
|
2367
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2381
2368
|
],
|
|
2382
2369
|
Number: [
|
|
2383
|
-
{ key:
|
|
2370
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2384
2371
|
],
|
|
2385
2372
|
BigNumber: [
|
|
2386
|
-
{ key:
|
|
2373
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2387
2374
|
],
|
|
2388
2375
|
Date: [
|
|
2389
|
-
{ key:
|
|
2376
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
2390
2377
|
],
|
|
2391
2378
|
DateTime: [
|
|
2392
|
-
{ key:
|
|
2379
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
2393
2380
|
],
|
|
2394
2381
|
Boolean: [
|
|
2395
|
-
{ key:
|
|
2396
|
-
{ key:
|
|
2382
|
+
{ key: I.switch.type, value: I.switch.name },
|
|
2383
|
+
{ key: I["check-box"].type, value: I["check-box"].name }
|
|
2397
2384
|
],
|
|
2398
2385
|
Enum: [
|
|
2399
|
-
{ key:
|
|
2400
|
-
{ key:
|
|
2386
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2387
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
2401
2388
|
],
|
|
2402
2389
|
Object: [
|
|
2403
|
-
{ key:
|
|
2404
|
-
{ key:
|
|
2405
|
-
{ key:
|
|
2390
|
+
{ key: I.lookup.type, value: I.lookup.name },
|
|
2391
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2392
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
2406
2393
|
]
|
|
2407
2394
|
});
|
|
2408
|
-
let
|
|
2409
|
-
const
|
|
2410
|
-
class
|
|
2395
|
+
let q = G;
|
|
2396
|
+
const Mn = b(0);
|
|
2397
|
+
class Bn {
|
|
2411
2398
|
constructor() {
|
|
2412
2399
|
/** 控件标题 */
|
|
2413
|
-
|
|
2400
|
+
T(this, "label", "");
|
|
2414
2401
|
/** 控件id */
|
|
2415
|
-
|
|
2402
|
+
T(this, "id", "");
|
|
2416
2403
|
/** 每个控件占用的栅格数 */
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2404
|
+
T(this, "columnInSM", 12);
|
|
2405
|
+
T(this, "columnInMD", 6);
|
|
2406
|
+
T(this, "columnInLG", 3);
|
|
2407
|
+
T(this, "columnInEL", 2);
|
|
2421
2408
|
/** 每个控件占用的列数 */
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2409
|
+
T(this, "displayWidthInSM", 1);
|
|
2410
|
+
T(this, "displayWidthInMD", 1);
|
|
2411
|
+
T(this, "displayWidthInLG", 1);
|
|
2412
|
+
T(this, "displayWidthInEL", 1);
|
|
2426
2413
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
2427
|
-
|
|
2414
|
+
T(this, "displayColumnCountAtBreakPoint", "md");
|
|
2428
2415
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
2429
|
-
|
|
2416
|
+
T(this, "tagRow", 0);
|
|
2430
2417
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
2431
|
-
|
|
2418
|
+
T(this, "showTopBorder", 0);
|
|
2432
2419
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
2433
|
-
|
|
2420
|
+
T(this, "group", 1);
|
|
2434
2421
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
2435
|
-
|
|
2422
|
+
T(this, "isSupportedClass", !0);
|
|
2436
2423
|
/** 控件所在分组id(设计器用的) */
|
|
2437
|
-
|
|
2424
|
+
T(this, "fieldSetId", "");
|
|
2438
2425
|
}
|
|
2439
2426
|
}
|
|
2440
|
-
function
|
|
2427
|
+
function Vn(e) {
|
|
2441
2428
|
let t, n;
|
|
2442
|
-
const
|
|
2429
|
+
const l = /* @__PURE__ */ new Map();
|
|
2443
2430
|
let i = [];
|
|
2444
|
-
function
|
|
2445
|
-
const
|
|
2446
|
-
if (
|
|
2431
|
+
function a(u, o) {
|
|
2432
|
+
const g = u.split(" ").filter((S) => S.startsWith("col-"));
|
|
2433
|
+
if (g.length === 0) {
|
|
2447
2434
|
o.isSupportedClass = !1;
|
|
2448
2435
|
return;
|
|
2449
2436
|
}
|
|
2450
|
-
let y =
|
|
2451
|
-
y = y || "col-12", o.columnInSM = parseInt(y.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1),
|
|
2437
|
+
let y = g.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), d = g.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), f = g.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), v = g.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
|
|
2438
|
+
y = y || "col-12", o.columnInSM = parseInt(y.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), d = d || "col-md-" + o.columnInSM, o.columnInMD = parseInt(d.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), f = f || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(f.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
2452
2439
|
}
|
|
2453
|
-
function r(
|
|
2440
|
+
function r(u, o, s, g = !1) {
|
|
2454
2441
|
let y = !1;
|
|
2455
|
-
|
|
2456
|
-
if (
|
|
2457
|
-
s += 1, r(
|
|
2442
|
+
u.contents.forEach((d) => {
|
|
2443
|
+
if (d.type === "fieldset") {
|
|
2444
|
+
s += 1, r(d, o, s, !0), y = !0;
|
|
2458
2445
|
return;
|
|
2459
2446
|
}
|
|
2460
2447
|
y && (s += 1, y = !1);
|
|
2461
|
-
const
|
|
2462
|
-
|
|
2448
|
+
const f = d.appearance && d.appearance.class, v = new Bn();
|
|
2449
|
+
f ? a(f, v) : v.isSupportedClass = !1, v.label = d.label || d.id, v.id = d.id, v.group = s, g && (v.fieldSetId = u.id), n === d.id && (t = s), l.set(d.id, d), o.push(v);
|
|
2463
2450
|
});
|
|
2464
2451
|
}
|
|
2465
|
-
function
|
|
2466
|
-
const o = e.getComponentById(
|
|
2452
|
+
function c(u) {
|
|
2453
|
+
const o = e.getComponentById(u);
|
|
2467
2454
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
2468
2455
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
2469
|
-
const s = e.selectNode(o, (
|
|
2456
|
+
const s = e.selectNode(o, (g) => g.type === oe["response-form"].type);
|
|
2470
2457
|
return !s || !s.contents || s.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: s };
|
|
2471
2458
|
}
|
|
2472
|
-
function u
|
|
2473
|
-
o = o ||
|
|
2474
|
-
const { result: s, message:
|
|
2459
|
+
function m(u, o) {
|
|
2460
|
+
o = o || u.id;
|
|
2461
|
+
const { result: s, message: g, formNode: y } = c(o);
|
|
2475
2462
|
if (!s)
|
|
2476
|
-
return { result: s, message:
|
|
2477
|
-
n =
|
|
2478
|
-
const
|
|
2479
|
-
r(y, i,
|
|
2480
|
-
const
|
|
2463
|
+
return { result: s, message: g };
|
|
2464
|
+
n = u.id, i = [], l.clear();
|
|
2465
|
+
const d = y.contents[0].type === oe.fieldset.type ? 0 : 1;
|
|
2466
|
+
r(y, i, d);
|
|
2467
|
+
const f = i.find((S) => !S.isSupportedClass);
|
|
2481
2468
|
return {
|
|
2482
2469
|
defaultState: {
|
|
2483
2470
|
defaultGroupNumber: t || 1,
|
|
2484
|
-
model:
|
|
2471
|
+
model: f ? "customize" : "standard"
|
|
2485
2472
|
},
|
|
2486
2473
|
importData: i
|
|
2487
2474
|
};
|
|
2488
2475
|
}
|
|
2489
|
-
function
|
|
2476
|
+
function p(u, o) {
|
|
2490
2477
|
o = o;
|
|
2491
|
-
const { result: s, formNode:
|
|
2478
|
+
const { result: s, formNode: g } = c(o);
|
|
2492
2479
|
if (!s)
|
|
2493
2480
|
return "";
|
|
2494
2481
|
const y = [];
|
|
2495
|
-
return
|
|
2496
|
-
var
|
|
2497
|
-
const
|
|
2482
|
+
return u.forEach((d) => {
|
|
2483
|
+
var S;
|
|
2484
|
+
const f = l.get(d.id), v = f.appearance && f.appearance.class;
|
|
2498
2485
|
if (v) {
|
|
2499
|
-
const M = v.split(" ").filter((
|
|
2500
|
-
|
|
2486
|
+
const M = v.split(" ").filter((D) => !D.startsWith("col-")), C = "col-" + d.columnInSM, k = "col-md-" + d.columnInMD, O = "col-xl-" + d.columnInLG, F = "col-el-" + d.columnInEL, L = [C, k, O, F].concat(M);
|
|
2487
|
+
f.appearance.class = L.join(" ");
|
|
2501
2488
|
}
|
|
2502
|
-
if (
|
|
2503
|
-
const w =
|
|
2504
|
-
M ? (
|
|
2489
|
+
if (d.fieldSetId) {
|
|
2490
|
+
const w = g.contents.find((C) => C.id === d.fieldSetId), M = y.find((C) => C.id === d.fieldSetId);
|
|
2491
|
+
M ? (S = M.contents) == null || S.push(f) : (y.push(w), w.contents = [f]);
|
|
2505
2492
|
} else
|
|
2506
|
-
y.push(
|
|
2507
|
-
}),
|
|
2493
|
+
y.push(f);
|
|
2494
|
+
}), g.contents = y, g.id;
|
|
2508
2495
|
}
|
|
2509
2496
|
return {
|
|
2510
|
-
checkCanFindFormNode:
|
|
2511
|
-
checkCanOpenLayoutEditor:
|
|
2512
|
-
changeFormControlsByResponseLayoutConfig:
|
|
2497
|
+
checkCanFindFormNode: c,
|
|
2498
|
+
checkCanOpenLayoutEditor: m,
|
|
2499
|
+
changeFormControlsByResponseLayoutConfig: p,
|
|
2513
2500
|
getResonseFormLayoutConfig: r
|
|
2514
2501
|
};
|
|
2515
2502
|
}
|
|
2516
|
-
class
|
|
2517
|
-
constructor(n,
|
|
2518
|
-
super(n,
|
|
2519
|
-
|
|
2520
|
-
this.responseLayoutEditorFunction =
|
|
2521
|
-
}
|
|
2522
|
-
getPropertyConfig(n,
|
|
2523
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(n,
|
|
2524
|
-
}
|
|
2525
|
-
getBasicProperties(n,
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2528
|
-
this.setDesignViewModelField(n)
|
|
2529
|
-
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), r = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
2530
|
-
return {
|
|
2503
|
+
class On extends In {
|
|
2504
|
+
constructor(n, l) {
|
|
2505
|
+
super(n, l);
|
|
2506
|
+
T(this, "responseLayoutEditorFunction");
|
|
2507
|
+
this.responseLayoutEditorFunction = Vn(this.formSchemaUtils);
|
|
2508
|
+
}
|
|
2509
|
+
getPropertyConfig(n, l) {
|
|
2510
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, l), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, l), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
2511
|
+
}
|
|
2512
|
+
getBasicProperties(n, l) {
|
|
2513
|
+
var a;
|
|
2514
|
+
const i = this;
|
|
2515
|
+
return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
2531
2516
|
description: "Basic Information",
|
|
2532
2517
|
title: "基本信息",
|
|
2533
2518
|
properties: {
|
|
@@ -2548,7 +2533,7 @@ class Tn extends ve {
|
|
|
2548
2533
|
textField: "value",
|
|
2549
2534
|
valueField: "key",
|
|
2550
2535
|
editable: !1,
|
|
2551
|
-
data: i.designViewModelField ?
|
|
2536
|
+
data: i.designViewModelField ? q.getEditorTypesByMDataType((a = i.designViewModelField.type) == null ? void 0 : a.name) : q.getAllInputTypes()
|
|
2552
2537
|
}
|
|
2553
2538
|
},
|
|
2554
2539
|
label: {
|
|
@@ -2559,41 +2544,37 @@ class Tn extends ve {
|
|
|
2559
2544
|
binding: {
|
|
2560
2545
|
description: "绑定的表单字段",
|
|
2561
2546
|
title: "绑定",
|
|
2562
|
-
$converter: "/converter/field-selector.converter",
|
|
2563
2547
|
editor: {
|
|
2564
|
-
type: "
|
|
2548
|
+
type: "binding-selector",
|
|
2565
2549
|
bindingType: { enable: !1 },
|
|
2566
2550
|
editorParams: {
|
|
2567
|
-
|
|
2568
|
-
|
|
2551
|
+
componentSchema: n,
|
|
2552
|
+
needSyncToViewModel: !0,
|
|
2553
|
+
viewModelId: this.viewModelId,
|
|
2554
|
+
designerHostService: this.designerHostService,
|
|
2555
|
+
disableOccupiedFields: !0
|
|
2569
2556
|
},
|
|
2570
|
-
|
|
2571
|
-
{ field: "name", title: "字段名称" },
|
|
2572
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
2573
|
-
{ field: "fieldType", title: "字段类型" }
|
|
2574
|
-
],
|
|
2575
|
-
textField: "bindingField",
|
|
2576
|
-
data: r
|
|
2557
|
+
textField: "bindingField"
|
|
2577
2558
|
}
|
|
2578
2559
|
}
|
|
2579
2560
|
},
|
|
2580
|
-
setPropertyRelates(
|
|
2581
|
-
if (
|
|
2582
|
-
switch (
|
|
2561
|
+
setPropertyRelates(r, c) {
|
|
2562
|
+
if (r)
|
|
2563
|
+
switch (r && r.propertyID) {
|
|
2583
2564
|
case "type": {
|
|
2584
|
-
i.changeControlType(n,
|
|
2565
|
+
i.changeControlType(n, r, l);
|
|
2585
2566
|
break;
|
|
2586
2567
|
}
|
|
2587
2568
|
case "label": {
|
|
2588
|
-
|
|
2569
|
+
r.needRefreshControlTree = !0;
|
|
2589
2570
|
break;
|
|
2590
2571
|
}
|
|
2591
2572
|
}
|
|
2592
2573
|
}
|
|
2593
2574
|
};
|
|
2594
2575
|
}
|
|
2595
|
-
getAppearanceProperties(n,
|
|
2596
|
-
|
|
2576
|
+
getAppearanceProperties(n, l) {
|
|
2577
|
+
const i = this;
|
|
2597
2578
|
return {
|
|
2598
2579
|
title: "样式",
|
|
2599
2580
|
description: "Appearance",
|
|
@@ -2623,14 +2604,14 @@ class Tn extends ve {
|
|
|
2623
2604
|
}
|
|
2624
2605
|
}
|
|
2625
2606
|
},
|
|
2626
|
-
setPropertyRelates(
|
|
2627
|
-
if (
|
|
2628
|
-
switch (
|
|
2607
|
+
setPropertyRelates(a, r) {
|
|
2608
|
+
if (a)
|
|
2609
|
+
switch (a && a.propertyID) {
|
|
2629
2610
|
case "responseLayout":
|
|
2630
|
-
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(
|
|
2611
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, i.componentId || n.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(n.id, l), delete n.responseLayout;
|
|
2631
2612
|
break;
|
|
2632
2613
|
case "class":
|
|
2633
|
-
i.updateUnifiedLayoutAfterControlChanged(
|
|
2614
|
+
i.updateUnifiedLayoutAfterControlChanged(a.propertyValue, n.id, this.componentId), i.updateElementByParentContainer(n.id, l);
|
|
2634
2615
|
break;
|
|
2635
2616
|
}
|
|
2636
2617
|
}
|
|
@@ -2644,44 +2625,44 @@ class Tn extends ve {
|
|
|
2644
2625
|
* @param propertyData 控件DOM属性
|
|
2645
2626
|
* @param newControlType 新控件类型
|
|
2646
2627
|
*/
|
|
2647
|
-
changeControlType(n,
|
|
2648
|
-
var
|
|
2649
|
-
const
|
|
2628
|
+
changeControlType(n, l, i) {
|
|
2629
|
+
var u, o, s, g;
|
|
2630
|
+
const a = l.propertyValue, r = i && i.parent && i.parent.schema;
|
|
2650
2631
|
if (!r)
|
|
2651
2632
|
return;
|
|
2652
|
-
const
|
|
2653
|
-
let
|
|
2633
|
+
const c = r.contents.findIndex((y) => y.id === n.id), m = r.contents[c];
|
|
2634
|
+
let p;
|
|
2654
2635
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2655
2636
|
editor: {
|
|
2656
|
-
$type:
|
|
2637
|
+
$type: a
|
|
2657
2638
|
},
|
|
2658
2639
|
name: this.designViewModelField.name,
|
|
2659
2640
|
require: this.designViewModelField.require,
|
|
2660
2641
|
readonly: this.designViewModelField.readonly
|
|
2661
|
-
}, !1),
|
|
2662
|
-
id:
|
|
2663
|
-
appearance:
|
|
2664
|
-
size:
|
|
2665
|
-
label:
|
|
2666
|
-
binding:
|
|
2667
|
-
visible:
|
|
2668
|
-
}), Object.assign(
|
|
2669
|
-
isTextArea:
|
|
2670
|
-
placeholder: (
|
|
2671
|
-
holdPlace: (o =
|
|
2672
|
-
readonly: (s =
|
|
2673
|
-
require: (
|
|
2674
|
-
}), r.contents.splice(
|
|
2642
|
+
}, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), p || (p = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(p, {
|
|
2643
|
+
id: m.id,
|
|
2644
|
+
appearance: m.appearance,
|
|
2645
|
+
size: m.size,
|
|
2646
|
+
label: m.label,
|
|
2647
|
+
binding: m.binding,
|
|
2648
|
+
visible: m.visible
|
|
2649
|
+
}), Object.assign(p.editor, {
|
|
2650
|
+
isTextArea: p.isTextArea && m.isTextArea,
|
|
2651
|
+
placeholder: (u = m.editor) == null ? void 0 : u.placeholder,
|
|
2652
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
2653
|
+
readonly: (s = m.editor) == null ? void 0 : s.readonly,
|
|
2654
|
+
require: (g = m.editor) == null ? void 0 : g.require
|
|
2655
|
+
}), r.contents.splice(c, 1), r.contents.splice(c, 0, p), i.schema = Object.assign(m, p), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2675
2656
|
(y) => y.classList.remove("dgComponentSelected")
|
|
2676
|
-
),
|
|
2657
|
+
), Mn.value++;
|
|
2677
2658
|
}
|
|
2678
|
-
getComponentConfig(n,
|
|
2679
|
-
const
|
|
2659
|
+
getComponentConfig(n, l = {}, i = {}) {
|
|
2660
|
+
const a = Object.assign({
|
|
2680
2661
|
description: "编辑器",
|
|
2681
2662
|
title: "编辑器",
|
|
2682
2663
|
type: "input-group",
|
|
2683
2664
|
$converter: "/converter/property-editor.converter"
|
|
2684
|
-
},
|
|
2665
|
+
}, l), r = Object.assign({
|
|
2685
2666
|
readonly: {
|
|
2686
2667
|
description: "",
|
|
2687
2668
|
title: "只读",
|
|
@@ -2703,7 +2684,7 @@ class Tn extends ve {
|
|
|
2703
2684
|
type: "string"
|
|
2704
2685
|
}
|
|
2705
2686
|
}, i);
|
|
2706
|
-
return { ...
|
|
2687
|
+
return { ...a, properties: { ...r } };
|
|
2707
2688
|
}
|
|
2708
2689
|
/**
|
|
2709
2690
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -2711,108 +2692,132 @@ class Tn extends ve {
|
|
|
2711
2692
|
* @param controlId 控件Id
|
|
2712
2693
|
* @param componentId 控件所在组件id
|
|
2713
2694
|
*/
|
|
2714
|
-
updateUnifiedLayoutAfterControlChanged(n,
|
|
2715
|
-
const
|
|
2716
|
-
let r =
|
|
2717
|
-
r = r || "col-12",
|
|
2718
|
-
const
|
|
2719
|
-
id:
|
|
2695
|
+
updateUnifiedLayoutAfterControlChanged(n, l, i) {
|
|
2696
|
+
const a = n.split(" ");
|
|
2697
|
+
let r = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), c = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), p = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
2698
|
+
r = r || "col-12", c = c || "col-md-" + r.replace("col-", ""), m = m || "col-xl-" + c.replace("col-md-", ""), p = p || "col-el-" + m.replace("col-xl-", "");
|
|
2699
|
+
const u = {
|
|
2700
|
+
id: l,
|
|
2720
2701
|
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
2721
|
-
columnInMD: parseInt(
|
|
2722
|
-
columnInLG: parseInt(
|
|
2723
|
-
columnInEL: parseInt(
|
|
2702
|
+
columnInMD: parseInt(c.replace("col-md-", ""), 10),
|
|
2703
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
2704
|
+
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
2724
2705
|
};
|
|
2725
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(i,
|
|
2706
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, u);
|
|
2726
2707
|
}
|
|
2727
2708
|
/**
|
|
2728
2709
|
* 修改控件布局配置后更新Form统一布局配置
|
|
2729
2710
|
* @param componentId 组件Id
|
|
2730
2711
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
2731
2712
|
*/
|
|
2732
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(n,
|
|
2713
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, l) {
|
|
2733
2714
|
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
2734
2715
|
if (!i || !i.unifiedLayout)
|
|
2735
2716
|
return;
|
|
2736
|
-
const
|
|
2737
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i,
|
|
2738
|
-
const y =
|
|
2739
|
-
Object.assign(y || {},
|
|
2717
|
+
const a = [];
|
|
2718
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, a, 1), l) {
|
|
2719
|
+
const y = a.find((d) => d.id === l.id);
|
|
2720
|
+
Object.assign(y || {}, l);
|
|
2740
2721
|
}
|
|
2741
|
-
const r =
|
|
2722
|
+
const r = a.map((y) => y.columnInSM), c = a.map((y) => y.columnInMD), m = a.map((y) => y.columnInLG), p = a.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(r) ? r[0] : null, o = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(m) ? m[0] : null, g = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
2742
2723
|
Object.assign(i.unifiedLayout, {
|
|
2743
|
-
uniqueColClassInSM:
|
|
2724
|
+
uniqueColClassInSM: u,
|
|
2744
2725
|
uniqueColClassInMD: o,
|
|
2745
2726
|
uniqueColClassInLG: s,
|
|
2746
|
-
uniqueColClassInEL:
|
|
2727
|
+
uniqueColClassInEL: g
|
|
2747
2728
|
});
|
|
2748
2729
|
}
|
|
2749
2730
|
/**
|
|
2750
2731
|
* 校验宽度样式值是否一致
|
|
2751
2732
|
*/
|
|
2752
2733
|
checkIsUniqueColumn(n) {
|
|
2753
|
-
const
|
|
2754
|
-
return Array.from(
|
|
2734
|
+
const l = new Set(n);
|
|
2735
|
+
return Array.from(l).length === 1;
|
|
2755
2736
|
}
|
|
2756
2737
|
}
|
|
2757
|
-
class
|
|
2738
|
+
class Tn extends On {
|
|
2758
2739
|
constructor(t, n) {
|
|
2759
2740
|
super(t, n);
|
|
2760
2741
|
}
|
|
2761
2742
|
getEditorProperties(t) {
|
|
2762
|
-
|
|
2743
|
+
const n = this.getComponentConfig(t, { type: "combo-list" }, {
|
|
2763
2744
|
editable: {
|
|
2764
2745
|
description: "",
|
|
2765
2746
|
title: "允许编辑",
|
|
2766
2747
|
type: "boolean"
|
|
2767
2748
|
},
|
|
2749
|
+
enableClear: {
|
|
2750
|
+
description: "",
|
|
2751
|
+
title: "启用清空",
|
|
2752
|
+
type: "boolean"
|
|
2753
|
+
},
|
|
2768
2754
|
textField: {
|
|
2755
|
+
visible: !1,
|
|
2769
2756
|
description: "",
|
|
2770
2757
|
title: "数据源显示字段",
|
|
2771
2758
|
type: "string"
|
|
2772
2759
|
},
|
|
2773
|
-
|
|
2760
|
+
valueField: {
|
|
2761
|
+
visible: !1,
|
|
2774
2762
|
description: "",
|
|
2775
2763
|
title: "数据源值字段",
|
|
2776
2764
|
type: "string"
|
|
2765
|
+
},
|
|
2766
|
+
idField: {
|
|
2767
|
+
visible: !1,
|
|
2768
|
+
description: "",
|
|
2769
|
+
title: "数据源标识字段",
|
|
2770
|
+
type: "string"
|
|
2771
|
+
},
|
|
2772
|
+
data: {
|
|
2773
|
+
description: "",
|
|
2774
|
+
title: "数据",
|
|
2775
|
+
type: "array",
|
|
2776
|
+
editor: {
|
|
2777
|
+
columns: [
|
|
2778
|
+
{ field: t.editor.valueField, title: "值", dataType: "string" },
|
|
2779
|
+
{ field: t.editor.textField, title: "名称", dataType: "string" },
|
|
2780
|
+
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
2781
|
+
],
|
|
2782
|
+
type: "item-collection-editor",
|
|
2783
|
+
valueField: t.editor.valueField,
|
|
2784
|
+
nameField: t.editor.textField,
|
|
2785
|
+
requiredFields: [t.editor.valueField, t.editor.textField],
|
|
2786
|
+
uniqueFields: [t.editor.valueField, t.editor.textField]
|
|
2787
|
+
},
|
|
2788
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2789
|
+
refreshPanelAfterChanged: !0
|
|
2777
2790
|
}
|
|
2778
2791
|
});
|
|
2792
|
+
return n.setPropertyRelates = function(l) {
|
|
2793
|
+
if (l)
|
|
2794
|
+
switch (l.propertyID) {
|
|
2795
|
+
case "data": {
|
|
2796
|
+
l.propertyValue.parameters && (t.editor.valueField = l.propertyValue.parameters.valueField, t.editor.textField = l.propertyValue.parameters.nameField), t.editor.data = l.propertyValue.value;
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
}, n;
|
|
2779
2801
|
}
|
|
2780
2802
|
}
|
|
2781
|
-
function
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
checkCanMoveComponent: i,
|
|
2786
|
-
hideNestedPaddingInDesginerView: l,
|
|
2787
|
-
onAcceptMovedChildElement: r,
|
|
2788
|
-
resolveComponentContext: d,
|
|
2789
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2790
|
-
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
2791
|
-
} = Mn(e), p = e.schema;
|
|
2792
|
-
function o(s, m) {
|
|
2793
|
-
return new Vn(s, t).getPropertyConfig(p, m);
|
|
2803
|
+
function Pn(e, t) {
|
|
2804
|
+
const n = e.schema;
|
|
2805
|
+
function l(i, a) {
|
|
2806
|
+
return new Tn(i, t).getPropertyConfig(n, a);
|
|
2794
2807
|
}
|
|
2795
2808
|
return {
|
|
2796
|
-
|
|
2797
|
-
checkCanDeleteComponent: a,
|
|
2798
|
-
checkCanMoveComponent: i,
|
|
2799
|
-
hideNestedPaddingInDesginerView: l,
|
|
2800
|
-
onAcceptMovedChildElement: r,
|
|
2801
|
-
resolveComponentContext: d,
|
|
2802
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2803
|
-
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
2804
|
-
getPropsConfig: o
|
|
2809
|
+
getPropsConfig: l
|
|
2805
2810
|
};
|
|
2806
2811
|
}
|
|
2807
|
-
const
|
|
2812
|
+
const Ln = /* @__PURE__ */ x({
|
|
2808
2813
|
name: "FComboListDesign",
|
|
2809
|
-
props:
|
|
2814
|
+
props: ee,
|
|
2810
2815
|
emits: ["clear", "update:modelValue", "change"],
|
|
2811
2816
|
setup(e, t) {
|
|
2812
|
-
const n =
|
|
2813
|
-
return
|
|
2817
|
+
const n = b(), l = N("designer-host-service"), i = N("design-item-context"), a = Pn(i, l), r = se(n, i, a);
|
|
2818
|
+
return J(() => {
|
|
2814
2819
|
n.value.componentInstance = r;
|
|
2815
|
-
}), t.expose(r.value), () =>
|
|
2820
|
+
}), t.expose(r.value), () => h(kn, {
|
|
2816
2821
|
ref: n,
|
|
2817
2822
|
buttonContent: e.dropDownIcon,
|
|
2818
2823
|
readonly: !0,
|
|
@@ -2822,63 +2827,58 @@ const On = /* @__PURE__ */ R({
|
|
|
2822
2827
|
enableClear: !0
|
|
2823
2828
|
}, null);
|
|
2824
2829
|
}
|
|
2825
|
-
})
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
n.component(t.name, e);
|
|
2829
|
-
}, e;
|
|
2830
|
-
};
|
|
2831
|
-
q.register = (e, t, n, a) => {
|
|
2832
|
-
e["combo-list"] = q, t["combo-list"] = ye;
|
|
2830
|
+
});
|
|
2831
|
+
U.register = (e, t, n, l) => {
|
|
2832
|
+
e["combo-list"] = U, t["combo-list"] = ye;
|
|
2833
2833
|
};
|
|
2834
|
-
|
|
2835
|
-
e["combo-list"] =
|
|
2834
|
+
U.registerDesigner = (e, t, n) => {
|
|
2835
|
+
e["combo-list"] = Ln, t["combo-list"] = ye;
|
|
2836
2836
|
};
|
|
2837
|
-
const
|
|
2837
|
+
const W = Ue(U), z = /* @__PURE__ */ x({
|
|
2838
2838
|
name: "FOrder",
|
|
2839
|
-
props:
|
|
2839
|
+
props: K,
|
|
2840
2840
|
emits: ["change"],
|
|
2841
2841
|
setup(e, t) {
|
|
2842
|
-
const n =
|
|
2842
|
+
const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
|
|
2843
2843
|
id: "asc",
|
|
2844
2844
|
name: "升序"
|
|
2845
2845
|
}, {
|
|
2846
2846
|
id: "desc",
|
|
2847
2847
|
name: "降序"
|
|
2848
|
-
}],
|
|
2849
|
-
function
|
|
2850
|
-
const
|
|
2851
|
-
|
|
2848
|
+
}], c = b(/* @__PURE__ */ new Map());
|
|
2849
|
+
function m() {
|
|
2850
|
+
const f = n.value.map((v) => [v.id, !0]);
|
|
2851
|
+
c.value = new Map(f);
|
|
2852
2852
|
}
|
|
2853
|
-
|
|
2854
|
-
const
|
|
2853
|
+
m();
|
|
2854
|
+
const p = B(() => e.dataSource.map((f) => (f.disabled = c.value.has(f.id), f))), u = B(() => ({
|
|
2855
2855
|
"f-order": !0
|
|
2856
2856
|
}));
|
|
2857
|
-
function o(
|
|
2858
|
-
n.value = n.value.filter((v) => v.id !==
|
|
2857
|
+
function o(f) {
|
|
2858
|
+
n.value = n.value.filter((v) => v.id !== f.id), m(), t.emit("change", n.value);
|
|
2859
2859
|
}
|
|
2860
2860
|
function s() {
|
|
2861
2861
|
n.value = [...n.value, {
|
|
2862
2862
|
id: Date.now().toString(),
|
|
2863
2863
|
name: "",
|
|
2864
2864
|
order: "asc"
|
|
2865
|
-
}],
|
|
2865
|
+
}], m(), t.emit("change", n.value);
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2868
|
-
if (
|
|
2869
|
-
const v =
|
|
2870
|
-
|
|
2867
|
+
function g(f) {
|
|
2868
|
+
if (f && f.length === 1) {
|
|
2869
|
+
const v = f[0], S = n.value.find((w) => w.id === v.id);
|
|
2870
|
+
S && (S.name = v.name);
|
|
2871
2871
|
}
|
|
2872
|
-
|
|
2872
|
+
m(), t.emit("change", n.value);
|
|
2873
2873
|
}
|
|
2874
|
-
function y(
|
|
2875
|
-
if (
|
|
2874
|
+
function y(f) {
|
|
2875
|
+
if (f && f.length) {
|
|
2876
2876
|
const v = /* @__PURE__ */ new Map();
|
|
2877
|
-
|
|
2877
|
+
f.reduce((S, w) => (S.set(w.id, w), S), v), n.value = f.map((S) => v.get(S.id)), t.emit("change", n.value);
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2881
|
-
return
|
|
2880
|
+
function d() {
|
|
2881
|
+
return h(fe, {
|
|
2882
2882
|
style: "flex:1",
|
|
2883
2883
|
data: n.value,
|
|
2884
2884
|
draggable: !0,
|
|
@@ -2888,510 +2888,252 @@ const H = Pn(q), z = /* @__PURE__ */ R({
|
|
|
2888
2888
|
onRemoveItem: o,
|
|
2889
2889
|
onChange: y
|
|
2890
2890
|
}, {
|
|
2891
|
-
header: () =>
|
|
2891
|
+
header: () => h("div", {
|
|
2892
2892
|
class: "f-order-header"
|
|
2893
|
-
}, [
|
|
2893
|
+
}, [h("span", {
|
|
2894
2894
|
class: "f-order-header-order-field"
|
|
2895
|
-
}, [
|
|
2895
|
+
}, [l.value]), h("span", {
|
|
2896
2896
|
class: "f-order-header-order-type"
|
|
2897
2897
|
}, [i.value])]),
|
|
2898
|
-
itemContent: (
|
|
2898
|
+
itemContent: (f) => h("div", {
|
|
2899
2899
|
class: "f-order-item-content"
|
|
2900
|
-
}, [
|
|
2900
|
+
}, [h(W, {
|
|
2901
2901
|
class: "f-order-item-content-order-field",
|
|
2902
|
-
data:
|
|
2902
|
+
data: p.value,
|
|
2903
2903
|
valueField: "id",
|
|
2904
2904
|
textField: "name",
|
|
2905
2905
|
idField: "id",
|
|
2906
|
-
modelValue:
|
|
2907
|
-
"onUpdate:modelValue": (v) =>
|
|
2908
|
-
onChange:
|
|
2909
|
-
onClear:
|
|
2910
|
-
}, null),
|
|
2906
|
+
modelValue: f.id,
|
|
2907
|
+
"onUpdate:modelValue": (v) => f.id = v,
|
|
2908
|
+
onChange: g,
|
|
2909
|
+
onClear: g
|
|
2910
|
+
}, null), h(W, {
|
|
2911
2911
|
class: "f-order-item-content-order-type",
|
|
2912
2912
|
data: r,
|
|
2913
2913
|
valueField: "id",
|
|
2914
2914
|
textField: "name",
|
|
2915
2915
|
idField: "id",
|
|
2916
|
-
modelValue:
|
|
2917
|
-
"onUpdate:modelValue": (v) =>
|
|
2918
|
-
onChange:
|
|
2916
|
+
modelValue: f.order,
|
|
2917
|
+
"onUpdate:modelValue": (v) => f.order = v,
|
|
2918
|
+
onChange: g
|
|
2919
2919
|
}, null)]),
|
|
2920
|
-
footer: () =>
|
|
2920
|
+
footer: () => h("div", {
|
|
2921
2921
|
class: "f-order-footer"
|
|
2922
|
-
}, [
|
|
2922
|
+
}, [h(me, {
|
|
2923
2923
|
type: "link",
|
|
2924
2924
|
class: "f-order-add-button",
|
|
2925
2925
|
onClick: s
|
|
2926
2926
|
}, {
|
|
2927
|
-
default: () =>
|
|
2927
|
+
default: () => h(X, null, [h("span", {
|
|
2928
2928
|
class: "f-order-add-icon"
|
|
2929
|
-
}, [
|
|
2929
|
+
}, [h("i", {
|
|
2930
2930
|
class: "f-icon f-icon-add"
|
|
2931
|
-
}, null)]),
|
|
2931
|
+
}, null)]), a.value])
|
|
2932
2932
|
})])
|
|
2933
2933
|
});
|
|
2934
2934
|
}
|
|
2935
|
-
return () =>
|
|
2936
|
-
class:
|
|
2937
|
-
}, [
|
|
2935
|
+
return () => h("div", {
|
|
2936
|
+
class: u.value
|
|
2937
|
+
}, [d()]);
|
|
2938
2938
|
}
|
|
2939
2939
|
});
|
|
2940
2940
|
function En(e, t, n) {
|
|
2941
2941
|
var M;
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
a();
|
|
2946
|
-
const i = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", r = S();
|
|
2947
|
-
function d() {
|
|
2948
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2942
|
+
const l = "", i = "", a = b();
|
|
2943
|
+
function r() {
|
|
2944
|
+
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2949
2945
|
}
|
|
2950
|
-
function
|
|
2946
|
+
function c() {
|
|
2951
2947
|
return !1;
|
|
2952
2948
|
}
|
|
2953
|
-
function
|
|
2954
|
-
return (t == null ? void 0 : t.schema.componentType)
|
|
2949
|
+
function m() {
|
|
2950
|
+
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2955
2951
|
}
|
|
2956
2952
|
function p() {
|
|
2957
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame"
|
|
2953
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
2958
2954
|
}
|
|
2959
|
-
function
|
|
2960
|
-
if (!
|
|
2955
|
+
function u(C) {
|
|
2956
|
+
if (!C || !C.value)
|
|
2961
2957
|
return null;
|
|
2962
|
-
if (
|
|
2963
|
-
return
|
|
2964
|
-
const k =
|
|
2965
|
-
return
|
|
2958
|
+
if (C.value.schema && C.value.schema.type === "component")
|
|
2959
|
+
return C.value;
|
|
2960
|
+
const k = b(C == null ? void 0 : C.value.parent), O = u(k);
|
|
2961
|
+
return O || null;
|
|
2966
2962
|
}
|
|
2967
|
-
function
|
|
2968
|
-
const { componentInstance: k, designerItemElementRef:
|
|
2969
|
-
return !k || !k.value ? null : k.value.canMove ?
|
|
2963
|
+
function o(C = t) {
|
|
2964
|
+
const { componentInstance: k, designerItemElementRef: O } = C;
|
|
2965
|
+
return !k || !k.value ? null : k.value.canMove ? O : o(C.parent);
|
|
2970
2966
|
}
|
|
2971
|
-
function
|
|
2972
|
-
return !!n
|
|
2967
|
+
function s(C) {
|
|
2968
|
+
return !!n;
|
|
2973
2969
|
}
|
|
2974
|
-
function
|
|
2970
|
+
function g() {
|
|
2975
2971
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2976
2972
|
}
|
|
2977
|
-
function
|
|
2973
|
+
function y() {
|
|
2974
|
+
}
|
|
2975
|
+
function d(C, k) {
|
|
2978
2976
|
}
|
|
2979
|
-
function
|
|
2980
|
-
|
|
2977
|
+
function f(C, k) {
|
|
2978
|
+
const { componentType: O } = C;
|
|
2979
|
+
let F = de(O, C, k);
|
|
2980
|
+
const L = O.toLowerCase().replace(/-/g, "_");
|
|
2981
|
+
return F && !F.id && F.type === O && (F.id = `${L}_${Math.random().toString().slice(2, 6)}`), F;
|
|
2981
2982
|
}
|
|
2982
|
-
function v(
|
|
2983
|
-
const { componentType: T } = h;
|
|
2984
|
-
let I = ee(T, h, k);
|
|
2985
|
-
n && n.onResolveNewComponentSchema && (I = n.onResolveNewComponentSchema(h, I));
|
|
2986
|
-
const O = T.toLowerCase().replace("-", "_");
|
|
2987
|
-
return I && !I.id && I.type === T && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
|
|
2983
|
+
function v(C) {
|
|
2988
2984
|
}
|
|
2989
|
-
function C
|
|
2985
|
+
function S(...C) {
|
|
2990
2986
|
}
|
|
2991
|
-
function w(
|
|
2992
|
-
|
|
2993
|
-
|
|
2987
|
+
function w() {
|
|
2988
|
+
t != null && t.schema.contents && t.schema.contents.map((C) => {
|
|
2989
|
+
var F;
|
|
2990
|
+
let k = C.id;
|
|
2991
|
+
C.type === "component-ref" && (k = C.component);
|
|
2992
|
+
const O = e.value.querySelector(`#${k}-design-item`);
|
|
2993
|
+
(F = O == null ? void 0 : O.componentInstance) != null && F.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent();
|
|
2994
|
+
});
|
|
2994
2995
|
}
|
|
2995
|
-
return
|
|
2996
|
-
canMove:
|
|
2997
|
-
canSelectParent:
|
|
2998
|
-
canDelete:
|
|
2996
|
+
return a.value = {
|
|
2997
|
+
canMove: r(),
|
|
2998
|
+
canSelectParent: c(),
|
|
2999
|
+
canDelete: m(),
|
|
2999
3000
|
canNested: !p(),
|
|
3000
3001
|
contents: t == null ? void 0 : t.schema.contents,
|
|
3001
3002
|
elementRef: e,
|
|
3002
3003
|
parent: (M = t == null ? void 0 : t.parent) == null ? void 0 : M.componentInstance,
|
|
3003
3004
|
schema: t == null ? void 0 : t.schema,
|
|
3004
|
-
styles:
|
|
3005
|
-
designerClass:
|
|
3006
|
-
canAccepts:
|
|
3007
|
-
getBelongedComponentInstance:
|
|
3008
|
-
getDraggableDesignItemElement:
|
|
3009
|
-
getDraggingDisplayText:
|
|
3010
|
-
getPropConfig:
|
|
3011
|
-
getDragScopeElement:
|
|
3012
|
-
onAcceptMovedChildElement:
|
|
3013
|
-
onChildElementMovedOut:
|
|
3014
|
-
addNewChildComponentSchema:
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
},
|
|
3019
|
-
}
|
|
3020
|
-
function An() {
|
|
3021
|
-
function e(t, n) {
|
|
3022
|
-
var r;
|
|
3023
|
-
if (!t)
|
|
3024
|
-
return !1;
|
|
3025
|
-
const a = ((r = t.targetContainer) == null ? void 0 : r.componentInstance) && t.targetContainer.componentInstance.value;
|
|
3026
|
-
if (!a)
|
|
3027
|
-
return !1;
|
|
3028
|
-
const i = a.schema.type, l = n == null ? void 0 : n.formSchemaUtils.getComponentById(a.belongedComponentId);
|
|
3029
|
-
return !((t.controlCategory === "input" || t.controlType === "form-group") && ![F["response-layout-item"].type, F["response-form"].type].includes(i) || (t.controlType === F.tabs.type || t.controlType === F.section.type) && ((l == null ? void 0 : l.componentType) !== "frame" || ![F["content-container"].type, F["splitter-pane"].type, F["response-layout-item"].type].includes(i)));
|
|
3030
|
-
}
|
|
3031
|
-
return {
|
|
3032
|
-
basalDragulaRuleForContainer: e
|
|
3033
|
-
};
|
|
3005
|
+
styles: l,
|
|
3006
|
+
designerClass: i,
|
|
3007
|
+
canAccepts: s,
|
|
3008
|
+
getBelongedComponentInstance: u,
|
|
3009
|
+
getDraggableDesignItemElement: o,
|
|
3010
|
+
getDraggingDisplayText: g,
|
|
3011
|
+
getPropConfig: S,
|
|
3012
|
+
getDragScopeElement: y,
|
|
3013
|
+
onAcceptMovedChildElement: d,
|
|
3014
|
+
onChildElementMovedOut: v,
|
|
3015
|
+
addNewChildComponentSchema: f,
|
|
3016
|
+
triggerBelongedComponentToMoveWhenMoved: b(!1),
|
|
3017
|
+
triggerBelongedComponentToDeleteWhenDeleted: b(!1),
|
|
3018
|
+
onRemoveComponent: w
|
|
3019
|
+
}, a;
|
|
3034
3020
|
}
|
|
3035
|
-
|
|
3036
|
-
getTemplateRule(t, n) {
|
|
3037
|
-
const a = n == null ? void 0 : n.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), l = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
3038
|
-
if (!i)
|
|
3039
|
-
return l;
|
|
3040
|
-
const r = this.getComponentContext(t);
|
|
3041
|
-
return r.componentClassList.forEach((u) => {
|
|
3042
|
-
if (!u || !i[u])
|
|
3043
|
-
return;
|
|
3044
|
-
const { canMove: c, canDelete: p, canAccept: o } = i[u];
|
|
3045
|
-
l.canMove = l.canMove && this.resolveRuleValue(c, r), l.canDelete = l.canDelete && this.resolveRuleValue(p, r), l.canAccept = l.canAccept && this.resolveRuleValue(o, r);
|
|
3046
|
-
}), l;
|
|
3047
|
-
}
|
|
3048
|
-
resolveRuleValue(t, n) {
|
|
3049
|
-
return typeof t == "boolean" ? t : this.parseRuleValueSchema(t, n);
|
|
3050
|
-
}
|
|
3051
|
-
parseRuleValueSchema(t, n) {
|
|
3052
|
-
const a = t.invalidContext || [];
|
|
3053
|
-
let i = !0;
|
|
3054
|
-
for (const l of a) {
|
|
3055
|
-
if (l.firstLevelChild) {
|
|
3056
|
-
if (l.firstLevelChild.class) {
|
|
3057
|
-
const r = n.firstLevelChildClassList;
|
|
3058
|
-
if (r && !r.includes(l.firstLevelChild.class)) {
|
|
3059
|
-
i = !1;
|
|
3060
|
-
continue;
|
|
3061
|
-
}
|
|
3062
|
-
}
|
|
3063
|
-
if (l.firstLevelChild.type) {
|
|
3064
|
-
const r = n.firstLevelChildSchema;
|
|
3065
|
-
if (r && r.type !== l.firstLevelChild.type) {
|
|
3066
|
-
i = !1;
|
|
3067
|
-
continue;
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
if (l.secondLevelChild) {
|
|
3072
|
-
if (l.secondLevelChild.class) {
|
|
3073
|
-
const r = n.secondLevelChildClassList;
|
|
3074
|
-
if (r && !r.includes(l.secondLevelChild.class)) {
|
|
3075
|
-
i = !1;
|
|
3076
|
-
continue;
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
if (l.secondLevelChild.type) {
|
|
3080
|
-
const r = n.secondLevelChildSchema;
|
|
3081
|
-
if (r && r.type !== l.secondLevelChild.type) {
|
|
3082
|
-
i = !1;
|
|
3083
|
-
continue;
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
if (l.parent) {
|
|
3088
|
-
if (l.parent.class) {
|
|
3089
|
-
const r = n.parentClassList;
|
|
3090
|
-
if (r && !r.includes(l.parent.class)) {
|
|
3091
|
-
i = !1;
|
|
3092
|
-
continue;
|
|
3093
|
-
}
|
|
3094
|
-
}
|
|
3095
|
-
if (l.parent.type) {
|
|
3096
|
-
const r = n.parentSchema;
|
|
3097
|
-
if (r && r.type !== l.parent.type) {
|
|
3098
|
-
i = !1;
|
|
3099
|
-
continue;
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
i = !0;
|
|
3104
|
-
break;
|
|
3105
|
-
}
|
|
3106
|
-
return !i;
|
|
3107
|
-
}
|
|
3108
|
-
getComponentContext(t) {
|
|
3109
|
-
var f, g, v, C;
|
|
3110
|
-
const n = t.schema, a = n.appearance && n.appearance.class || "", i = a.split(" ") || [], l = n.contents || [], r = l.length ? l[0] : null, d = r && r.appearance ? r.appearance.class : "", u = d ? d.split(" ") : [], c = (f = r == null ? void 0 : r.contents) != null && f.length ? r == null ? void 0 : r.contents[0] : null, p = c && c.appearance ? c.appearance.class : "", o = p ? p.split(" ") : [], s = n.type === "component" ? (v = (g = t.parent) == null ? void 0 : g.parent) == null ? void 0 : v.schema : (C = t.parent) == null ? void 0 : C.schema, m = s && s.appearance && s.appearance.class || "", y = m ? m.split(" ") : [];
|
|
3111
|
-
return {
|
|
3112
|
-
componentClass: a,
|
|
3113
|
-
componentClassList: i,
|
|
3114
|
-
childContents: l,
|
|
3115
|
-
firstLevelChildSchema: r,
|
|
3116
|
-
firstLevelChildClass: d,
|
|
3117
|
-
firstLevelChildClassList: u,
|
|
3118
|
-
secondLevelChildSchema: c,
|
|
3119
|
-
secondLevelChildClass: p,
|
|
3120
|
-
secondLevelChildClassList: o,
|
|
3121
|
-
parentSchema: s,
|
|
3122
|
-
parentClass: m,
|
|
3123
|
-
parentClassList: y
|
|
3124
|
-
};
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
function jn(e, t) {
|
|
3128
|
-
function n(u, c = null) {
|
|
3129
|
-
if (c) return c;
|
|
3130
|
-
const p = e.getComponentById(t);
|
|
3131
|
-
return e.selectNode(p, (o) => o.id === u);
|
|
3132
|
-
}
|
|
3133
|
-
function a(u) {
|
|
3134
|
-
const c = e.getComponentById(u);
|
|
3135
|
-
return !(!c || !c.componentType || !c.componentType.startsWith("form"));
|
|
3136
|
-
}
|
|
3137
|
-
function i(u) {
|
|
3138
|
-
const c = n(u.id), p = Ce(e), o = [];
|
|
3139
|
-
p.getResonseFormLayoutConfig(c, o, 1);
|
|
3140
|
-
const s = o.map((M) => M.columnInSM), m = o.map((M) => M.columnInMD), y = o.map((M) => M.columnInLG), f = o.map((M) => M.columnInEL), g = l(s) ? s[0] : 0, v = l(m) ? m[0] : 0, C = l(y) ? y[0] : 0, w = l(f) ? f[0] : 0;
|
|
3141
|
-
return {
|
|
3142
|
-
uniqueColClassInSM: g,
|
|
3143
|
-
uniqueColClassInMD: v,
|
|
3144
|
-
uniqueColClassInLG: C,
|
|
3145
|
-
uniqueColClassInEL: w
|
|
3146
|
-
};
|
|
3147
|
-
}
|
|
3148
|
-
function l(u) {
|
|
3149
|
-
const c = new Set(u);
|
|
3150
|
-
return Array.from(c).length === 1;
|
|
3151
|
-
}
|
|
3152
|
-
function r(u, c, p) {
|
|
3153
|
-
u = n(p, u), u.contents.forEach((o) => {
|
|
3154
|
-
if (o.type === J.fieldset.type) {
|
|
3155
|
-
r(o, c, o.id);
|
|
3156
|
-
return;
|
|
3157
|
-
}
|
|
3158
|
-
o.appearance || (o.appearance = {});
|
|
3159
|
-
const s = o.appearance.class;
|
|
3160
|
-
o.appearance.class = d(s, c);
|
|
3161
|
-
});
|
|
3162
|
-
}
|
|
3163
|
-
function d(u, c) {
|
|
3164
|
-
let p, o, s, m, y = [];
|
|
3165
|
-
if (u) {
|
|
3166
|
-
const M = u.split(" "), h = M.filter((k) => k.startsWith("col-"));
|
|
3167
|
-
p = h.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), o = h.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), s = h.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), m = h.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k)), y = M.filter((k) => !k.startsWith("col-"));
|
|
3168
|
-
}
|
|
3169
|
-
const f = c.uniqueColClassInSM ? "col-" + c.uniqueColClassInSM : p, g = c.uniqueColClassInMD ? "col-md-" + c.uniqueColClassInMD : o, v = c.uniqueColClassInLG ? "col-xl-" + c.uniqueColClassInLG : s, C = c.uniqueColClassInEL ? "col-el-" + c.uniqueColClassInEL : m;
|
|
3170
|
-
return [f, g, v, C].concat(y).join(" ");
|
|
3171
|
-
}
|
|
3172
|
-
return { checkIsInFormComponent: a, assembleUnifiedLayoutContext: i, changeFormControlsByUnifiedLayoutConfig: r };
|
|
3173
|
-
}
|
|
3174
|
-
class Nn extends ve {
|
|
3175
|
-
constructor(t, n) {
|
|
3176
|
-
super(t, n);
|
|
3177
|
-
}
|
|
3178
|
-
getPropertyConfig(t, n) {
|
|
3179
|
-
var a = this;
|
|
3180
|
-
this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
|
|
3181
|
-
const { checkIsInFormComponent: i, assembleUnifiedLayoutContext: l, changeFormControlsByUnifiedLayoutConfig: r } = jn(this.formSchemaUtils, this.componentId), d = this.getAppearanceConfig(t);
|
|
3182
|
-
return d.properties.unifiedLayout = {
|
|
3183
|
-
title: "统一布局配置",
|
|
3184
|
-
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
3185
|
-
visible: i(this.componentId),
|
|
3186
|
-
refreshPanelAfterChanged: !0,
|
|
3187
|
-
editor: {
|
|
3188
|
-
type: "response-form-layout-setting",
|
|
3189
|
-
initialState: l(t)
|
|
3190
|
-
}
|
|
3191
|
-
}, d.setPropertyRelates = function(u, c) {
|
|
3192
|
-
if (u)
|
|
3193
|
-
switch (u && u.propertyID) {
|
|
3194
|
-
case "unifiedLayout": {
|
|
3195
|
-
r(null, u.propertyValue, t.id), a.updateElementByParentContainer(t.id, n);
|
|
3196
|
-
break;
|
|
3197
|
-
}
|
|
3198
|
-
}
|
|
3199
|
-
}, this.propertyConfig.categories.appearance = d, this.propertyConfig;
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
function Rn(e, t) {
|
|
3203
|
-
const n = e.schema, a = new $n(), { canMove: i, canAccept: l, canDelete: r } = a.getTemplateRule(e, t);
|
|
3204
|
-
function d(C) {
|
|
3205
|
-
const w = a.getComponentContext(e);
|
|
3206
|
-
return w && w.componentClassList && w.componentClassList.includes("f-form-layout") && w.componentClassList.includes("farris-form") ? C.sourceType === "control" && C.controlCategory === "input" || C.sourceType === "move" && C.controlType === "form-group" : !0;
|
|
3207
|
-
}
|
|
3208
|
-
function u(C) {
|
|
3209
|
-
return !(!An().basalDragulaRuleForContainer(C, t) || !l || !d(C));
|
|
3210
|
-
}
|
|
3211
|
-
function c(C) {
|
|
3212
|
-
X();
|
|
3213
|
-
}
|
|
3214
|
-
function p() {
|
|
3215
|
-
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
3216
|
-
}
|
|
3217
|
-
function o(C, w) {
|
|
3218
|
-
const M = n;
|
|
3219
|
-
if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3220
|
-
const { label: T } = C, I = ee("form-group");
|
|
3221
|
-
return I.editor = w, I.label = T, s(I), delete I.editor.id, delete I.editor.binding, delete I.editor.appearance, delete I.editor.visible, I;
|
|
3222
|
-
}
|
|
3223
|
-
return w;
|
|
3224
|
-
}
|
|
3225
|
-
function s(C) {
|
|
3226
|
-
const w = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
3227
|
-
if (w && w.schema && w.schema.componentType) {
|
|
3228
|
-
const M = w.schema.formColumns;
|
|
3229
|
-
let h = m(M);
|
|
3230
|
-
h = t == null ? void 0 : t.formSchemaUtils.getControlClassByFormUnifiedLayout(h, "", e.schema), C.appearance || (C.appearance = {}), C.appearance.class = h;
|
|
3231
|
-
}
|
|
3232
|
-
}
|
|
3233
|
-
function m(C) {
|
|
3234
|
-
let w = "";
|
|
3235
|
-
switch (C) {
|
|
3236
|
-
case 1: {
|
|
3237
|
-
w = "col-12";
|
|
3238
|
-
break;
|
|
3239
|
-
}
|
|
3240
|
-
case 2: {
|
|
3241
|
-
w = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
3242
|
-
break;
|
|
3243
|
-
}
|
|
3244
|
-
case 3: {
|
|
3245
|
-
w = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
3246
|
-
break;
|
|
3247
|
-
}
|
|
3248
|
-
case 4: {
|
|
3249
|
-
w = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
3250
|
-
break;
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
return w;
|
|
3254
|
-
}
|
|
3255
|
-
function y() {
|
|
3256
|
-
return i;
|
|
3257
|
-
}
|
|
3258
|
-
function f() {
|
|
3259
|
-
return r;
|
|
3260
|
-
}
|
|
3261
|
-
function g() {
|
|
3262
|
-
return !1;
|
|
3263
|
-
}
|
|
3264
|
-
function v(C) {
|
|
3265
|
-
return new Nn(C, t).getPropertyConfig(n, e.componentInstance.value);
|
|
3266
|
-
}
|
|
3267
|
-
return {
|
|
3268
|
-
canAccepts: u,
|
|
3269
|
-
checkCanDeleteComponent: f,
|
|
3270
|
-
checkCanMoveComponent: y,
|
|
3271
|
-
getStyles: p,
|
|
3272
|
-
getPropsConfig: v,
|
|
3273
|
-
hideNestedPaddingInDesginerView: g,
|
|
3274
|
-
onAcceptMovedChildElement: c,
|
|
3275
|
-
onResolveNewComponentSchema: o
|
|
3276
|
-
};
|
|
3277
|
-
}
|
|
3278
|
-
const Gn = /* @__PURE__ */ R({
|
|
3021
|
+
const $n = /* @__PURE__ */ x({
|
|
3279
3022
|
name: "FOrderDesign",
|
|
3280
|
-
props:
|
|
3023
|
+
props: K,
|
|
3281
3024
|
emits: ["change"],
|
|
3282
3025
|
setup(e, t) {
|
|
3283
|
-
|
|
3284
|
-
const n = S(e.items), a = S("排序列"), i = S("排序方式"), l = S("添加排序列"), r = [{
|
|
3026
|
+
const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
|
|
3285
3027
|
id: "asc",
|
|
3286
3028
|
name: "升序"
|
|
3287
3029
|
}, {
|
|
3288
3030
|
id: "desc",
|
|
3289
3031
|
name: "降序"
|
|
3290
|
-
}],
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
}), t.expose(
|
|
3294
|
-
function
|
|
3295
|
-
const
|
|
3296
|
-
|
|
3032
|
+
}], c = b(/* @__PURE__ */ new Map()), m = b(), p = N("design-item-context"), u = En(m, p);
|
|
3033
|
+
J(() => {
|
|
3034
|
+
m.value.componentInstance = u;
|
|
3035
|
+
}), t.expose(u.value);
|
|
3036
|
+
function o() {
|
|
3037
|
+
const w = n.value.map((M) => [M.id, !0]);
|
|
3038
|
+
c.value = new Map(w);
|
|
3297
3039
|
}
|
|
3298
|
-
|
|
3299
|
-
const
|
|
3040
|
+
o();
|
|
3041
|
+
const s = B(() => e.dataSource.map((w) => (w.disabled = c.value.has(w.id), w))), g = B(() => ({
|
|
3300
3042
|
"f-order": !0
|
|
3301
3043
|
}));
|
|
3302
|
-
function
|
|
3303
|
-
n.value = n.value.filter((
|
|
3044
|
+
function y(w) {
|
|
3045
|
+
n.value = n.value.filter((M) => M.id !== w.id), o(), t.emit("change", n.value);
|
|
3304
3046
|
}
|
|
3305
|
-
function
|
|
3047
|
+
function d() {
|
|
3306
3048
|
n.value = [...n.value, {
|
|
3307
3049
|
id: Date.now().toString(),
|
|
3308
3050
|
name: "",
|
|
3309
3051
|
order: "asc"
|
|
3310
|
-
}],
|
|
3052
|
+
}], o(), t.emit("change", n.value);
|
|
3311
3053
|
}
|
|
3312
|
-
function
|
|
3313
|
-
|
|
3054
|
+
function f(w) {
|
|
3055
|
+
o(), t.emit("change", n.value);
|
|
3314
3056
|
}
|
|
3315
|
-
function
|
|
3316
|
-
if (
|
|
3317
|
-
const
|
|
3318
|
-
|
|
3057
|
+
function v(w) {
|
|
3058
|
+
if (w && w.length) {
|
|
3059
|
+
const M = /* @__PURE__ */ new Map();
|
|
3060
|
+
w.reduce((C, k) => (C.set(k.id, k), C), M), n.value = w.map((C) => M.get(C.id)), t.emit("change", n.value);
|
|
3319
3061
|
}
|
|
3320
3062
|
}
|
|
3321
|
-
function
|
|
3322
|
-
return
|
|
3063
|
+
function S() {
|
|
3064
|
+
return h(fe, {
|
|
3323
3065
|
style: "flex:1",
|
|
3324
3066
|
data: n.value,
|
|
3325
3067
|
draggable: !0,
|
|
3326
3068
|
view: "DraggableView",
|
|
3327
3069
|
"keep-order": !0,
|
|
3328
3070
|
itemClass: "f-order-item",
|
|
3329
|
-
onRemoveItem:
|
|
3330
|
-
onChange:
|
|
3071
|
+
onRemoveItem: y,
|
|
3072
|
+
onChange: v
|
|
3331
3073
|
}, {
|
|
3332
|
-
header: () =>
|
|
3074
|
+
header: () => h("div", {
|
|
3333
3075
|
class: "f-order-header"
|
|
3334
|
-
}, [
|
|
3076
|
+
}, [h("span", {
|
|
3335
3077
|
class: "f-order-header-order-field"
|
|
3336
|
-
}, [
|
|
3078
|
+
}, [l.value]), h("span", {
|
|
3337
3079
|
class: "f-order-header-order-type"
|
|
3338
3080
|
}, [i.value])]),
|
|
3339
|
-
itemContent: (
|
|
3081
|
+
itemContent: (w) => h("div", {
|
|
3340
3082
|
class: "f-order-item-content"
|
|
3341
|
-
}, [
|
|
3083
|
+
}, [h(W, {
|
|
3342
3084
|
class: "f-order-item-content-order-field",
|
|
3343
|
-
data:
|
|
3085
|
+
data: s.value,
|
|
3344
3086
|
valueField: "id",
|
|
3345
3087
|
textField: "name",
|
|
3346
3088
|
idField: "id",
|
|
3347
|
-
modelValue:
|
|
3348
|
-
"onUpdate:modelValue": (
|
|
3349
|
-
onChange:
|
|
3350
|
-
onClear:
|
|
3351
|
-
}, null),
|
|
3089
|
+
modelValue: w.id,
|
|
3090
|
+
"onUpdate:modelValue": (M) => w.id = M,
|
|
3091
|
+
onChange: f,
|
|
3092
|
+
onClear: f
|
|
3093
|
+
}, null), h(W, {
|
|
3352
3094
|
class: "f-order-item-content-order-type",
|
|
3353
3095
|
data: r,
|
|
3354
3096
|
valueField: "id",
|
|
3355
3097
|
textField: "name",
|
|
3356
3098
|
idField: "id",
|
|
3357
|
-
modelValue:
|
|
3358
|
-
"onUpdate:modelValue": (
|
|
3359
|
-
onChange:
|
|
3099
|
+
modelValue: w.order,
|
|
3100
|
+
"onUpdate:modelValue": (M) => w.order = M,
|
|
3101
|
+
onChange: f
|
|
3360
3102
|
}, null)]),
|
|
3361
|
-
footer: () =>
|
|
3103
|
+
footer: () => h("div", {
|
|
3362
3104
|
class: "f-order-footer"
|
|
3363
|
-
}, [
|
|
3105
|
+
}, [h(me, {
|
|
3364
3106
|
type: "link",
|
|
3365
3107
|
class: "f-order-add-button",
|
|
3366
|
-
onClick:
|
|
3108
|
+
onClick: d
|
|
3367
3109
|
}, {
|
|
3368
|
-
default: () =>
|
|
3110
|
+
default: () => h(X, null, [h("span", {
|
|
3369
3111
|
class: "f-order-add-icon"
|
|
3370
|
-
}, [
|
|
3112
|
+
}, [h("i", {
|
|
3371
3113
|
class: "f-icon f-icon-add"
|
|
3372
|
-
}, null)]),
|
|
3114
|
+
}, null)]), a.value])
|
|
3373
3115
|
})])
|
|
3374
3116
|
});
|
|
3375
3117
|
}
|
|
3376
|
-
return () =>
|
|
3377
|
-
ref:
|
|
3378
|
-
class:
|
|
3379
|
-
}, [
|
|
3118
|
+
return () => h("div", {
|
|
3119
|
+
ref: m,
|
|
3120
|
+
class: g.value
|
|
3121
|
+
}, [S()]);
|
|
3380
3122
|
}
|
|
3381
|
-
}),
|
|
3123
|
+
}), Wn = {
|
|
3382
3124
|
install(e) {
|
|
3383
3125
|
e.component(z.name, z);
|
|
3384
3126
|
},
|
|
3385
|
-
register(e, t, n,
|
|
3386
|
-
e.order = z, t.order =
|
|
3127
|
+
register(e, t, n, l) {
|
|
3128
|
+
e.order = z, t.order = le;
|
|
3387
3129
|
},
|
|
3388
3130
|
registerDesigner(e, t, n) {
|
|
3389
|
-
e.order =
|
|
3131
|
+
e.order = $n, t.order = le;
|
|
3390
3132
|
}
|
|
3391
3133
|
};
|
|
3392
3134
|
export {
|
|
3393
3135
|
z as FOrder,
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3136
|
+
Wn as default,
|
|
3137
|
+
K as orderProps,
|
|
3138
|
+
le as propsResolver
|
|
3397
3139
|
};
|