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