@farris/ui-vue 1.2.8 → 1.3.0
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 +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- 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 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- 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/use-designer-rules.d.ts +2 -2
- 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 +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -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/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/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/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- 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,106 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { useIdentify as
|
|
7
|
-
import { FCheckBox as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { getSchemaByType as
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var Oe = (e, t, n) => t in e ? Te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var x = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as v, computed as V, createVNode as h, Fragment as K, watch as N, withModifiers as Pe, withDirectives as Ve, vModelText as Ae, defineComponent as R, Teleport as De, createApp as Le, onUnmounted as Ee, inject as q, nextTick as Z, onMounted as ee, mergeProps as $e } from "vue";
|
|
5
|
+
import { isPlainObject as se, cloneDeep as fe } from "lodash-es";
|
|
6
|
+
import { useIdentify as xe, useHierarchy as Re, useGroupData as Ne, usePagination as Ue, useDataView as qe, useSelection as He, useEdit as Ge, useVisualDataBound as We, useVisualDataCell as _e, useVisualDataRow as ze, useVisualGroupRow as Xe, useVisualSummaryRow as Je, useVisualData as Qe } from "../data-view/index.esm.js";
|
|
7
|
+
import { FCheckBox as te } from "../checkbox/index.esm.js";
|
|
8
|
+
import Ye from "../list-view/index.esm.js";
|
|
9
|
+
import Ze from "../button-edit/index.esm.js";
|
|
10
|
+
import { resolveAppearance as Ke, getSchemaByType as ce } from "../dynamic-resolver/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as me } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { useResponseLayoutEditorSetting as ye } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
|
|
13
|
+
import { BaseControlProperty as et } from "../property-panel/index.esm.js/src/composition/entity/base-property";
|
|
14
|
+
import { DgControl as tt } from "../designer-canvas/index.esm.js/src/composition/dg-control";
|
|
15
|
+
const ge = {}, he = {};
|
|
16
|
+
function ne(e) {
|
|
17
|
+
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), r = Object.keys(t).reduce((s, f) => ((!a || !o.find((c) => c == f)) && (s[f] = t[f].type === "object" && t[f].properties ? ne(t[f]) : fe(t[f].default)), s), {});
|
|
18
|
+
return (!a || !o.find((s) => s == "id")) && (r.id = `${n}-${Date.now()}`), r;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
let
|
|
21
|
-
const
|
|
22
|
-
return
|
|
20
|
+
function H(e, t = {}, n) {
|
|
21
|
+
const o = ge[e];
|
|
22
|
+
if (o) {
|
|
23
|
+
let a = ne(o);
|
|
24
|
+
const r = he[e];
|
|
25
|
+
return a = r ? r({ getSchemaByType: H }, a, t, n) : a, a;
|
|
23
26
|
}
|
|
24
27
|
return null;
|
|
25
28
|
}
|
|
26
|
-
function
|
|
27
|
-
const n =
|
|
28
|
-
return Object.keys(e).reduce((o,
|
|
29
|
+
function nt(e, t) {
|
|
30
|
+
const n = ne(t);
|
|
31
|
+
return Object.keys(e).reduce((o, a) => (o[a] && se(o[a]) && se(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
return Object.keys(e).filter((o) => e[o] != null).reduce((o,
|
|
32
|
-
if (t.has(
|
|
33
|
-
const
|
|
34
|
-
if (typeof
|
|
35
|
-
o[
|
|
33
|
+
function ot(e, t) {
|
|
34
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
35
|
+
if (t.has(a)) {
|
|
36
|
+
const r = t.get(a);
|
|
37
|
+
if (typeof r == "string")
|
|
38
|
+
o[r] = e[a];
|
|
36
39
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(o,
|
|
40
|
+
const s = r(a, e[a], e);
|
|
41
|
+
Object.assign(o, s);
|
|
39
42
|
}
|
|
40
43
|
} else
|
|
41
|
-
o[
|
|
44
|
+
o[a] = e[a];
|
|
42
45
|
return o;
|
|
43
46
|
}, {});
|
|
44
47
|
}
|
|
45
|
-
function
|
|
46
|
-
const o =
|
|
47
|
-
return
|
|
48
|
+
function at(e, t, n = /* @__PURE__ */ new Map()) {
|
|
49
|
+
const o = nt(e, t);
|
|
50
|
+
return ot(o, n);
|
|
48
51
|
}
|
|
49
|
-
function
|
|
50
|
-
function t(
|
|
52
|
+
function rt(e = {}) {
|
|
53
|
+
function t(l, g, i, d) {
|
|
51
54
|
if (typeof i == "number")
|
|
52
|
-
return
|
|
55
|
+
return d[l].length === i;
|
|
53
56
|
if (typeof i == "object") {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return Number(
|
|
57
|
-
if (
|
|
58
|
-
return Number(
|
|
59
|
-
if (
|
|
60
|
-
return Number(
|
|
57
|
+
const C = Object.keys(i)[0], u = i[C];
|
|
58
|
+
if (C === "not")
|
|
59
|
+
return Number(d[l].length) !== Number(u);
|
|
60
|
+
if (C === "moreThan")
|
|
61
|
+
return Number(d[l].length) >= Number(u);
|
|
62
|
+
if (C === "lessThan")
|
|
63
|
+
return Number(d[l].length) <= Number(u);
|
|
61
64
|
}
|
|
62
65
|
return !1;
|
|
63
66
|
}
|
|
64
|
-
function n(
|
|
65
|
-
return
|
|
67
|
+
function n(l, g, i, d) {
|
|
68
|
+
return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(i);
|
|
66
69
|
}
|
|
67
70
|
const o = /* @__PURE__ */ new Map([
|
|
68
71
|
["length", t],
|
|
69
72
|
["getProperty", n]
|
|
70
73
|
]);
|
|
71
|
-
Object.keys(e).reduce((
|
|
72
|
-
function
|
|
73
|
-
const i =
|
|
74
|
-
return typeof
|
|
75
|
-
if (
|
|
76
|
-
return { target: i, operator: "length", param: null, value:
|
|
77
|
-
const
|
|
78
|
-
return { target: i, operator: "getProperty", param:
|
|
74
|
+
Object.keys(e).reduce((l, g) => (l.set(g, e[g]), l), o);
|
|
75
|
+
function a(l, g) {
|
|
76
|
+
const i = l;
|
|
77
|
+
return typeof g == "number" ? [{ target: i, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: i, operator: "getProperty", param: l, value: !!g }] : typeof g == "object" ? Object.keys(g).map((d) => {
|
|
78
|
+
if (d === "length")
|
|
79
|
+
return { target: i, operator: "length", param: null, value: g[d] };
|
|
80
|
+
const C = d, u = g[d];
|
|
81
|
+
return { target: i, operator: "getProperty", param: C, value: u };
|
|
79
82
|
}) : [];
|
|
80
83
|
}
|
|
81
|
-
function l
|
|
82
|
-
return Object.keys(
|
|
83
|
-
const
|
|
84
|
-
return i.push(...
|
|
84
|
+
function r(l) {
|
|
85
|
+
return Object.keys(l).reduce((i, d) => {
|
|
86
|
+
const C = a(d, l[d]);
|
|
87
|
+
return i.push(...C), i;
|
|
85
88
|
}, []);
|
|
86
89
|
}
|
|
87
|
-
function
|
|
88
|
-
if (o.has(
|
|
89
|
-
const i = o.get(
|
|
90
|
-
return i && i(
|
|
90
|
+
function s(l, g) {
|
|
91
|
+
if (o.has(l.operator)) {
|
|
92
|
+
const i = o.get(l.operator);
|
|
93
|
+
return i && i(l.target, l.param, l.value, g) || !1;
|
|
91
94
|
}
|
|
92
95
|
return !1;
|
|
93
96
|
}
|
|
94
|
-
function f(
|
|
95
|
-
return l
|
|
97
|
+
function f(l, g) {
|
|
98
|
+
return r(l).reduce((C, u) => C && s(u, g), !0);
|
|
96
99
|
}
|
|
97
|
-
function
|
|
98
|
-
const i = Object.keys(
|
|
99
|
-
return
|
|
100
|
+
function c(l, g) {
|
|
101
|
+
const i = Object.keys(l), d = i.includes("allOf"), C = i.includes("anyOf"), u = d || C, y = (u ? l[u ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((k) => f(k, g));
|
|
102
|
+
return d ? !y.includes(!1) : y.includes(!0);
|
|
100
103
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
104
|
+
return { parseValueSchema: c };
|
|
102
105
|
}
|
|
103
|
-
const
|
|
106
|
+
const B = {
|
|
104
107
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
108
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
109
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -137,21 +140,22 @@ const j = {
|
|
|
137
140
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
138
141
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
139
142
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
144
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
145
|
+
}, it = {}, lt = {};
|
|
146
|
+
rt();
|
|
147
|
+
function z(e, t, n = /* @__PURE__ */ new Map(), o = (s, f, c) => f, a = {}, r = (s) => s) {
|
|
148
|
+
return ge[t.title] = t, he[t.title] = o, it[t.title] = a, lt[t.title] = r, (s = {}) => {
|
|
149
|
+
const f = at(s, t, n), c = Object.keys(e).reduce((l, g) => (l[g] = e[g].default, l), {});
|
|
150
|
+
return Object.assign(c, f);
|
|
147
151
|
};
|
|
148
152
|
}
|
|
149
|
-
function
|
|
153
|
+
function oe(e, t) {
|
|
150
154
|
return { customClass: t.class, customStyle: t.style };
|
|
151
155
|
}
|
|
152
|
-
const
|
|
153
|
-
["appearance",
|
|
154
|
-
]),
|
|
156
|
+
const st = /* @__PURE__ */ new Map([
|
|
157
|
+
["appearance", oe]
|
|
158
|
+
]), ct = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-design.gitee.io/order.schema.json", dt = "order", pt = "A Farris Component", ft = "object", mt = {
|
|
155
159
|
id: {
|
|
156
160
|
description: "The unique identifier for a order",
|
|
157
161
|
type: "string"
|
|
@@ -243,22 +247,22 @@ const Qe = /* @__PURE__ */ new Map([
|
|
|
243
247
|
type: "sting",
|
|
244
248
|
default: ""
|
|
245
249
|
}
|
|
246
|
-
},
|
|
250
|
+
}, yt = [
|
|
247
251
|
"id",
|
|
248
252
|
"type"
|
|
249
|
-
],
|
|
250
|
-
$schema:
|
|
251
|
-
$id:
|
|
252
|
-
title:
|
|
253
|
-
description:
|
|
254
|
-
type:
|
|
255
|
-
properties:
|
|
256
|
-
required:
|
|
253
|
+
], gt = {
|
|
254
|
+
$schema: ct,
|
|
255
|
+
$id: ut,
|
|
256
|
+
title: dt,
|
|
257
|
+
description: pt,
|
|
258
|
+
type: ft,
|
|
259
|
+
properties: mt,
|
|
260
|
+
required: yt
|
|
257
261
|
};
|
|
258
|
-
function
|
|
262
|
+
function ht(e, t, n) {
|
|
259
263
|
return t;
|
|
260
264
|
}
|
|
261
|
-
const
|
|
265
|
+
const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
|
|
262
266
|
basic: {
|
|
263
267
|
description: "Basic Infomation",
|
|
264
268
|
title: "基本信息",
|
|
@@ -340,12 +344,12 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
|
|
|
340
344
|
}
|
|
341
345
|
}
|
|
342
346
|
}
|
|
343
|
-
},
|
|
344
|
-
title:
|
|
345
|
-
description:
|
|
346
|
-
type:
|
|
347
|
-
categories:
|
|
348
|
-
},
|
|
347
|
+
}, St = {
|
|
348
|
+
title: bt,
|
|
349
|
+
description: vt,
|
|
350
|
+
type: Ct,
|
|
351
|
+
categories: wt
|
|
352
|
+
}, ae = {
|
|
349
353
|
dataSource: {
|
|
350
354
|
type: Array,
|
|
351
355
|
default: [
|
|
@@ -364,13 +368,13 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
|
|
|
364
368
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
365
369
|
]
|
|
366
370
|
}
|
|
367
|
-
},
|
|
368
|
-
["appearance",
|
|
371
|
+
}, ue = z(ae, gt, st, ht, St), kt = /* @__PURE__ */ new Map([
|
|
372
|
+
["appearance", oe]
|
|
369
373
|
]);
|
|
370
|
-
function
|
|
374
|
+
function Ft(e, t, n) {
|
|
371
375
|
return t;
|
|
372
376
|
}
|
|
373
|
-
const
|
|
377
|
+
const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-design.gitee.io/list-view.schema.json", jt = "list-view", Bt = "A Farris Component", Tt = "object", Ot = {
|
|
374
378
|
id: {
|
|
375
379
|
description: "The unique identifier for list-view",
|
|
376
380
|
type: "string"
|
|
@@ -432,18 +436,18 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
432
436
|
type: "boolean",
|
|
433
437
|
default: !0
|
|
434
438
|
}
|
|
435
|
-
},
|
|
439
|
+
}, Pt = [
|
|
436
440
|
"id",
|
|
437
441
|
"type"
|
|
438
|
-
],
|
|
439
|
-
$schema:
|
|
440
|
-
$id:
|
|
441
|
-
title:
|
|
442
|
-
description:
|
|
443
|
-
type:
|
|
444
|
-
properties:
|
|
445
|
-
required:
|
|
446
|
-
},
|
|
442
|
+
], Vt = {
|
|
443
|
+
$schema: It,
|
|
444
|
+
$id: Mt,
|
|
445
|
+
title: jt,
|
|
446
|
+
description: Bt,
|
|
447
|
+
type: Tt,
|
|
448
|
+
properties: Ot,
|
|
449
|
+
required: Pt
|
|
450
|
+
}, At = "list-view", Dt = "A Farris Component", Lt = "object", Et = {
|
|
447
451
|
basic: {
|
|
448
452
|
description: "Basic Infomation",
|
|
449
453
|
title: "基本信息",
|
|
@@ -465,12 +469,12 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
465
469
|
}
|
|
466
470
|
}
|
|
467
471
|
}
|
|
468
|
-
},
|
|
469
|
-
title:
|
|
470
|
-
description:
|
|
471
|
-
type:
|
|
472
|
-
categories:
|
|
473
|
-
},
|
|
472
|
+
}, $t = {
|
|
473
|
+
title: At,
|
|
474
|
+
description: Dt,
|
|
475
|
+
type: Lt,
|
|
476
|
+
categories: Et
|
|
477
|
+
}, be = {
|
|
474
478
|
/** 列集合 */
|
|
475
479
|
columns: {
|
|
476
480
|
type: Array,
|
|
@@ -512,372 +516,383 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
|
|
|
512
516
|
// 搜索启用高亮
|
|
513
517
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
514
518
|
};
|
|
515
|
-
|
|
516
|
-
function
|
|
517
|
-
function n(
|
|
518
|
-
const
|
|
519
|
-
let f =
|
|
519
|
+
z(be, Vt, kt, Ft, $t);
|
|
520
|
+
function xt(e, t) {
|
|
521
|
+
function n(r) {
|
|
522
|
+
const s = [];
|
|
523
|
+
let f = r.nextNode();
|
|
520
524
|
for (; f; )
|
|
521
|
-
|
|
522
|
-
return
|
|
523
|
-
}
|
|
524
|
-
function o(
|
|
525
|
-
const f = document.createTreeWalker(
|
|
526
|
-
return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text:
|
|
527
|
-
const
|
|
528
|
-
let
|
|
529
|
-
for (;
|
|
530
|
-
const m =
|
|
525
|
+
s.push(f), f = r.nextNode();
|
|
526
|
+
return s;
|
|
527
|
+
}
|
|
528
|
+
function o(r, s) {
|
|
529
|
+
const f = document.createTreeWalker(r, NodeFilter.SHOW_TEXT);
|
|
530
|
+
return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: d }) => {
|
|
531
|
+
const C = [];
|
|
532
|
+
let u = 0;
|
|
533
|
+
for (; u < d.length; ) {
|
|
534
|
+
const m = d.indexOf(s, u);
|
|
531
535
|
if (m === -1)
|
|
532
536
|
break;
|
|
533
|
-
|
|
537
|
+
C.push(m), u = m + s.length;
|
|
534
538
|
}
|
|
535
|
-
return
|
|
536
|
-
const
|
|
537
|
-
return
|
|
539
|
+
return C.map((m) => {
|
|
540
|
+
const p = new Range();
|
|
541
|
+
return p.setStart(i, m), p.setEnd(i, m + s.length), p;
|
|
538
542
|
});
|
|
539
543
|
}).flat();
|
|
540
544
|
}
|
|
541
|
-
function
|
|
542
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
545
|
+
function a(r) {
|
|
546
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !r || !t))
|
|
543
547
|
return;
|
|
544
|
-
const
|
|
548
|
+
const s = o(t.value, r.toLocaleLowerCase()), f = new Highlight(...s);
|
|
545
549
|
CSS.highlights.set("search-result", f);
|
|
546
550
|
}
|
|
547
|
-
return { search:
|
|
551
|
+
return { search: a };
|
|
548
552
|
}
|
|
549
|
-
function
|
|
550
|
-
const
|
|
553
|
+
function de(e, t, n, o, a, r, s, f, c, l) {
|
|
554
|
+
const g = v(e.size), i = v(e.textField), d = v(e.titleField), C = v(e.disableField), u = V(() => {
|
|
555
|
+
var F, I;
|
|
556
|
+
return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((I = e.selection) == null ? void 0 : I.showCheckbox);
|
|
557
|
+
}), {
|
|
551
558
|
onMouseenterItem: m,
|
|
552
|
-
onMouseoverItem:
|
|
553
|
-
onMouseoutItem:
|
|
554
|
-
} =
|
|
555
|
-
getKey:
|
|
556
|
-
listViewItemClass:
|
|
557
|
-
onCheckItem:
|
|
558
|
-
onClickItem:
|
|
559
|
-
} =
|
|
560
|
-
margin:
|
|
559
|
+
onMouseoverItem: p,
|
|
560
|
+
onMouseoutItem: y
|
|
561
|
+
} = r, {
|
|
562
|
+
getKey: S,
|
|
563
|
+
listViewItemClass: k,
|
|
564
|
+
onCheckItem: j,
|
|
565
|
+
onClickItem: w
|
|
566
|
+
} = s, b = V(() => ({
|
|
567
|
+
margin: g.value === "small" ? "0.25rem 0" : "10px 0"
|
|
561
568
|
}));
|
|
562
|
-
function
|
|
563
|
-
return
|
|
564
|
-
class: F
|
|
565
|
-
id:
|
|
566
|
-
key:
|
|
567
|
-
onClick: (
|
|
568
|
-
onMouseenter: (
|
|
569
|
-
onMouseover: (
|
|
570
|
-
onMouseout: (
|
|
571
|
-
}, [
|
|
569
|
+
function T(F, I, O) {
|
|
570
|
+
return F.checked = f.findIndexInSelectedItems(F) > -1, h("li", {
|
|
571
|
+
class: k(F, I),
|
|
572
|
+
id: S(F, I),
|
|
573
|
+
key: S(F, I),
|
|
574
|
+
onClick: (M) => w(M, F, I),
|
|
575
|
+
onMouseenter: (M) => m(M, F, I),
|
|
576
|
+
onMouseover: (M) => p(M, F, I),
|
|
577
|
+
onMouseout: (M) => y(M, F, I)
|
|
578
|
+
}, [u.value && h("div", {
|
|
572
579
|
class: "f-list-select",
|
|
573
|
-
onClick: (
|
|
574
|
-
}, [
|
|
575
|
-
id: "list-" +
|
|
580
|
+
onClick: (M) => M.stopPropagation()
|
|
581
|
+
}, [h(te, {
|
|
582
|
+
id: "list-" + S(F, I),
|
|
576
583
|
customClass: "listview-checkbox",
|
|
577
|
-
disabled:
|
|
578
|
-
checked:
|
|
579
|
-
"onUpdate:checked": (
|
|
580
|
-
onChange: (
|
|
581
|
-
|
|
584
|
+
disabled: F[C.value],
|
|
585
|
+
checked: F.checked,
|
|
586
|
+
"onUpdate:checked": (M) => F.checked = M,
|
|
587
|
+
onChange: (M) => {
|
|
588
|
+
j(F, I, !M.checked);
|
|
582
589
|
}
|
|
583
|
-
}, null)]),
|
|
590
|
+
}, null)]), h("div", {
|
|
584
591
|
class: "f-list-content"
|
|
585
|
-
}, [
|
|
586
|
-
style:
|
|
587
|
-
title:
|
|
588
|
-
}, [
|
|
592
|
+
}, [h("div", {
|
|
593
|
+
style: b.value,
|
|
594
|
+
title: F.raw[d.value] || F.raw[i.value]
|
|
595
|
+
}, [F.raw[i.value]])])]);
|
|
589
596
|
}
|
|
590
597
|
return {
|
|
591
|
-
renderItem:
|
|
598
|
+
renderItem: T
|
|
592
599
|
};
|
|
593
600
|
}
|
|
594
|
-
function
|
|
595
|
-
const
|
|
596
|
-
onMouseenterItem:
|
|
597
|
-
onMouseoverItem:
|
|
598
|
-
onMouseoutItem:
|
|
599
|
-
} =
|
|
601
|
+
function Rt(e, t, n, o, a, r, s, f, c, l) {
|
|
602
|
+
const g = v(e.multiSelect), i = v(e.disableField), {
|
|
603
|
+
onMouseenterItem: d,
|
|
604
|
+
onMouseoverItem: C,
|
|
605
|
+
onMouseoutItem: u
|
|
606
|
+
} = r, {
|
|
600
607
|
getKey: m,
|
|
601
|
-
listViewItemClass:
|
|
602
|
-
onCheckItem:
|
|
603
|
-
onClickItem:
|
|
604
|
-
} =
|
|
605
|
-
function
|
|
606
|
-
return t.slots.content ?
|
|
607
|
-
item:
|
|
608
|
-
index:
|
|
609
|
-
selectedItem:
|
|
610
|
-
})]) :
|
|
608
|
+
listViewItemClass: p,
|
|
609
|
+
onCheckItem: y,
|
|
610
|
+
onClickItem: S
|
|
611
|
+
} = s;
|
|
612
|
+
function k(w, b, T) {
|
|
613
|
+
return t.slots.content ? h(K, null, [t.slots.content && t.slots.content({
|
|
614
|
+
item: w.raw,
|
|
615
|
+
index: b,
|
|
616
|
+
selectedItem: T
|
|
617
|
+
})]) : h("div", {
|
|
611
618
|
style: "margin: 10px 0;"
|
|
612
|
-
}, [
|
|
613
|
-
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
616
|
-
class:
|
|
617
|
-
id: m(
|
|
618
|
-
key: m(
|
|
619
|
-
onClick: (
|
|
620
|
-
onMouseenter: (
|
|
621
|
-
onMouseover: (
|
|
622
|
-
onMouseout: (
|
|
623
|
-
}, [
|
|
619
|
+
}, [w.raw.name]);
|
|
620
|
+
}
|
|
621
|
+
function j(w, b, T) {
|
|
622
|
+
return h("li", {
|
|
623
|
+
class: p(w, b),
|
|
624
|
+
id: m(w, b),
|
|
625
|
+
key: m(w, b),
|
|
626
|
+
onClick: (F) => S(F, w, b),
|
|
627
|
+
onMouseenter: (F) => d(F, w, b),
|
|
628
|
+
onMouseover: (F) => C(F, w, b),
|
|
629
|
+
onMouseout: (F) => u(F, w, b)
|
|
630
|
+
}, [g.value && h("div", {
|
|
624
631
|
class: "f-list-select",
|
|
625
|
-
onClick: (
|
|
626
|
-
}, [
|
|
627
|
-
id: "list-" + m(
|
|
632
|
+
onClick: (F) => F.stopPropagation()
|
|
633
|
+
}, [h(te, {
|
|
634
|
+
id: "list-" + m(w, b),
|
|
628
635
|
customClass: "listview-checkbox",
|
|
629
|
-
disabled:
|
|
630
|
-
checked:
|
|
631
|
-
"onUpdate:checked": (
|
|
632
|
-
onChange: (
|
|
633
|
-
}, null)]),
|
|
636
|
+
disabled: w[i.value] || !w.checked,
|
|
637
|
+
checked: w.checked,
|
|
638
|
+
"onUpdate:checked": (F) => w.checked = F,
|
|
639
|
+
onChange: (F) => y(w, b, !F.checked)
|
|
640
|
+
}, null)]), h("div", {
|
|
634
641
|
class: "f-list-content"
|
|
635
|
-
}, [
|
|
642
|
+
}, [k(w, b, T)])]);
|
|
636
643
|
}
|
|
637
644
|
return {
|
|
638
|
-
renderItem:
|
|
645
|
+
renderItem: j
|
|
639
646
|
};
|
|
640
647
|
}
|
|
641
|
-
function
|
|
642
|
-
const
|
|
643
|
-
onMouseenterItem:
|
|
644
|
-
onMouseoverItem:
|
|
645
|
-
onMouseoutItem:
|
|
646
|
-
} =
|
|
648
|
+
function Nt(e, t, n, o, a, r, s, f, c, l) {
|
|
649
|
+
const g = v(e.multiSelect), i = v(e.disableField), {
|
|
650
|
+
onMouseenterItem: d,
|
|
651
|
+
onMouseoverItem: C,
|
|
652
|
+
onMouseoutItem: u
|
|
653
|
+
} = r, {
|
|
647
654
|
getKey: m,
|
|
648
|
-
listViewItemClass:
|
|
649
|
-
onCheckItem:
|
|
650
|
-
onClickItem:
|
|
651
|
-
} =
|
|
652
|
-
dragstart:
|
|
653
|
-
dragenter:
|
|
654
|
-
dragover:
|
|
655
|
-
dragend:
|
|
655
|
+
listViewItemClass: p,
|
|
656
|
+
onCheckItem: y,
|
|
657
|
+
onClickItem: S
|
|
658
|
+
} = s, {
|
|
659
|
+
dragstart: k,
|
|
660
|
+
dragenter: j,
|
|
661
|
+
dragover: w,
|
|
662
|
+
dragend: b
|
|
656
663
|
} = o, {
|
|
657
|
-
removeItem:
|
|
658
|
-
} =
|
|
659
|
-
margin:
|
|
664
|
+
removeItem: T
|
|
665
|
+
} = c, F = V(() => ({
|
|
666
|
+
margin: g.value ? "10px 0" : "10px 0px 10px 14px"
|
|
660
667
|
}));
|
|
661
|
-
function
|
|
662
|
-
return
|
|
663
|
-
style:
|
|
664
|
-
}, [
|
|
665
|
-
}
|
|
666
|
-
function
|
|
667
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
668
|
-
}
|
|
669
|
-
const
|
|
670
|
-
function
|
|
671
|
-
return
|
|
672
|
-
class:
|
|
673
|
-
id: m(
|
|
674
|
-
key: m(
|
|
675
|
-
onClick: (
|
|
676
|
-
onMouseenter: (
|
|
677
|
-
onMouseover: (
|
|
678
|
-
onMouseout: (
|
|
668
|
+
function I(P) {
|
|
669
|
+
return h("div", {
|
|
670
|
+
style: F.value
|
|
671
|
+
}, [P.raw.name]);
|
|
672
|
+
}
|
|
673
|
+
function O() {
|
|
674
|
+
return t.slots.itemContent ? t.slots.itemContent : I;
|
|
675
|
+
}
|
|
676
|
+
const M = O();
|
|
677
|
+
function D(P, L, E) {
|
|
678
|
+
return h("li", {
|
|
679
|
+
class: p(P, L),
|
|
680
|
+
id: m(P, L),
|
|
681
|
+
key: m(P, L),
|
|
682
|
+
onClick: (A) => S(A, P, L),
|
|
683
|
+
onMouseenter: (A) => d(A, P, L),
|
|
684
|
+
onMouseover: (A) => C(A, P, L),
|
|
685
|
+
onMouseout: (A) => u(A, P, L),
|
|
679
686
|
draggable: "true",
|
|
680
|
-
onDragstart: (
|
|
681
|
-
onDragenter: (
|
|
682
|
-
onDragend: (
|
|
683
|
-
onDragover: (
|
|
684
|
-
}, [
|
|
687
|
+
onDragstart: (A) => k(A, P, L),
|
|
688
|
+
onDragenter: (A) => j(A, L),
|
|
689
|
+
onDragend: (A) => b(A, P),
|
|
690
|
+
onDragover: (A) => w(A, L)
|
|
691
|
+
}, [g.value && h("div", {
|
|
685
692
|
class: "f-list-select",
|
|
686
|
-
onClick: (
|
|
687
|
-
}, [
|
|
688
|
-
id: "list-" + m(
|
|
693
|
+
onClick: (A) => A.stopPropagation()
|
|
694
|
+
}, [h(te, {
|
|
695
|
+
id: "list-" + m(P, L),
|
|
689
696
|
customClass: "listview-checkbox",
|
|
690
|
-
disabled:
|
|
691
|
-
checked:
|
|
692
|
-
"onUpdate:checked": (
|
|
693
|
-
onChange: (
|
|
694
|
-
}, null)]),
|
|
697
|
+
disabled: P[i.value] || !P.checked,
|
|
698
|
+
checked: P.checked,
|
|
699
|
+
"onUpdate:checked": (A) => P.checked = A,
|
|
700
|
+
onChange: (A) => y(P, L, !A.checked)
|
|
701
|
+
}, null)]), h("div", {
|
|
695
702
|
class: "f-list-content"
|
|
696
|
-
}, [
|
|
703
|
+
}, [M(P)]), h("div", {
|
|
697
704
|
class: "f-list-remove",
|
|
698
|
-
onClick: (
|
|
699
|
-
}, [
|
|
705
|
+
onClick: (A) => T(L)
|
|
706
|
+
}, [h("div", {
|
|
700
707
|
class: "f-list-remove-icon"
|
|
701
|
-
}, [
|
|
708
|
+
}, [h("i", {
|
|
702
709
|
class: "f-icon f-icon-remove_face"
|
|
703
|
-
}, null)])]),
|
|
710
|
+
}, null)])]), h("div", {
|
|
704
711
|
class: "f-list-handle"
|
|
705
|
-
}, [
|
|
712
|
+
}, [h("div", null, [h("i", {
|
|
706
713
|
class: "f-icon f-icon-drag-vertical"
|
|
707
714
|
}, null)])])]);
|
|
708
715
|
}
|
|
709
716
|
return {
|
|
710
|
-
renderItem:
|
|
717
|
+
renderItem: D
|
|
711
718
|
};
|
|
712
719
|
}
|
|
713
|
-
function
|
|
720
|
+
function Ut(e, t, n, o, a, r, s, f, c, l) {
|
|
714
721
|
var m;
|
|
715
|
-
const
|
|
722
|
+
const g = v(((m = e.group) == null ? void 0 : m.groupFields) || []), {
|
|
716
723
|
collpaseGroupIconClass: i
|
|
717
|
-
} =
|
|
718
|
-
toggleGroupRow:
|
|
719
|
-
} =
|
|
720
|
-
function
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
724
|
+
} = a, {
|
|
725
|
+
toggleGroupRow: d
|
|
726
|
+
} = l;
|
|
727
|
+
function C(p, y) {
|
|
728
|
+
y.collapse = !y.collapse, n.value = d(y.collapse ? "collapse" : "expand", y, n.value);
|
|
729
|
+
}
|
|
730
|
+
function u(p, y, S) {
|
|
731
|
+
return p.layer > -1 && h("div", {
|
|
725
732
|
class: "f-navlookup-recentHeader",
|
|
726
|
-
onClick: (
|
|
727
|
-
}, [
|
|
733
|
+
onClick: (k) => C(k, p)
|
|
734
|
+
}, [h("div", {
|
|
728
735
|
class: "fv-grid-group-row-icon"
|
|
729
|
-
}, [
|
|
730
|
-
class: i(
|
|
731
|
-
}, null)]),
|
|
736
|
+
}, [h("span", {
|
|
737
|
+
class: i(p)
|
|
738
|
+
}, null)]), h("div", {
|
|
732
739
|
class: "f-navlookup-recommandLabel"
|
|
733
|
-
}, [
|
|
740
|
+
}, [p.raw[g.value[p.layer]]])]);
|
|
734
741
|
}
|
|
735
742
|
return {
|
|
736
|
-
renderItem:
|
|
743
|
+
renderItem: u
|
|
737
744
|
};
|
|
738
745
|
}
|
|
739
|
-
function
|
|
740
|
-
const e =
|
|
741
|
-
function
|
|
746
|
+
function qt() {
|
|
747
|
+
const e = v(-1), t = v(""), n = v(-1), o = v(!1);
|
|
748
|
+
function a(l, g, i) {
|
|
742
749
|
n.value = i;
|
|
743
750
|
}
|
|
744
|
-
function l
|
|
751
|
+
function r(l, g, i) {
|
|
745
752
|
o.value || (n.value = i);
|
|
746
753
|
}
|
|
747
|
-
function
|
|
754
|
+
function s(l, g, i) {
|
|
748
755
|
n.value = -1;
|
|
749
756
|
}
|
|
750
757
|
function f() {
|
|
751
758
|
o.value = !0;
|
|
752
759
|
}
|
|
753
|
-
function
|
|
760
|
+
function c() {
|
|
754
761
|
o.value = !1;
|
|
755
762
|
}
|
|
756
763
|
return {
|
|
757
764
|
activeIndex: e,
|
|
758
765
|
focusedItemId: t,
|
|
759
766
|
hoverIndex: n,
|
|
760
|
-
onMouseenterItem:
|
|
761
|
-
onMouseoverItem:
|
|
762
|
-
onMouseoutItem:
|
|
763
|
-
resumeHover:
|
|
767
|
+
onMouseenterItem: a,
|
|
768
|
+
onMouseoverItem: r,
|
|
769
|
+
onMouseoutItem: s,
|
|
770
|
+
resumeHover: c,
|
|
764
771
|
suspendHover: f
|
|
765
772
|
};
|
|
766
773
|
}
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
|
|
774
|
+
function Ht(e, t, n, o) {
|
|
775
|
+
const a = v(e.idField), { dataView: r } = n, s = v(-1), f = v(!1), { activeIndex: c, focusedItemId: l, hoverIndex: g, resumeHover: i, suspendHover: d } = o;
|
|
776
|
+
function C(y, S, k) {
|
|
777
|
+
y.stopPropagation(), d(), S && setTimeout(() => {
|
|
778
|
+
s.value = k, f.value = !0, S.moving = !0;
|
|
772
779
|
});
|
|
773
780
|
}
|
|
774
|
-
function
|
|
775
|
-
if (
|
|
776
|
-
const
|
|
777
|
-
|
|
781
|
+
function u(y, S) {
|
|
782
|
+
if (y.preventDefault(), s.value !== S) {
|
|
783
|
+
const k = r.value[s.value], j = r.value;
|
|
784
|
+
j.splice(s.value, 1), j.splice(S, 0, k), s.value = S;
|
|
778
785
|
}
|
|
779
786
|
}
|
|
780
|
-
function m(
|
|
781
|
-
|
|
787
|
+
function m(y, S) {
|
|
788
|
+
y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move");
|
|
782
789
|
}
|
|
783
|
-
function
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}), f.value = !1, i(),
|
|
790
|
+
function p(y, S) {
|
|
791
|
+
S && (S.moving = !1), r.value.forEach((k, j) => {
|
|
792
|
+
k.__fv_index__ = j;
|
|
793
|
+
}), f.value = !1, i(), g.value = S.raw.__fv_index__, c.value = S.raw.__fv_index__, l.value = S.raw[a.value], t.emit("change", r.value), t.emit("activeChange", S);
|
|
787
794
|
}
|
|
788
795
|
return {
|
|
789
|
-
dragstart:
|
|
790
|
-
dragenter:
|
|
796
|
+
dragstart: C,
|
|
797
|
+
dragenter: u,
|
|
791
798
|
dragover: m,
|
|
792
|
-
dragend:
|
|
799
|
+
dragend: p,
|
|
793
800
|
isDragging: f
|
|
794
801
|
};
|
|
795
802
|
}
|
|
796
|
-
function
|
|
803
|
+
function Gt(e, t, n) {
|
|
797
804
|
const { dataView: o } = n;
|
|
798
|
-
function
|
|
799
|
-
if (
|
|
800
|
-
const
|
|
801
|
-
t.emit("removeItem",
|
|
805
|
+
function a(r) {
|
|
806
|
+
if (r > -1 && r < o.value.length) {
|
|
807
|
+
const s = o.value.splice(r, 1);
|
|
808
|
+
t.emit("removeItem", s[0]);
|
|
802
809
|
}
|
|
803
810
|
}
|
|
804
|
-
return { removeItem:
|
|
811
|
+
return { removeItem: a };
|
|
805
812
|
}
|
|
806
|
-
function
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
const O = {
|
|
813
|
+
function Wt(e, t, n, o, a, r) {
|
|
814
|
+
const s = v(e.idField), f = v(e.disableField), c = v(e.draggable), l = v(e.itemClass), g = v(e.selection.multiSelect ?? !1), i = v(e.selection.multiSelectMode), { isDragging: d } = o, { activeIndex: C, focusedItemId: u, hoverIndex: m } = a, { clearSelection: p, getSelectedItems: y, toggleSelectItem: S } = r, k = v(y());
|
|
815
|
+
function j(M, D) {
|
|
816
|
+
const P = {
|
|
817
|
+
"f-listview-item": !0,
|
|
812
818
|
"f-list-view-group-item": !0,
|
|
813
|
-
"f-list-view-draggable-item":
|
|
814
|
-
"f-un-click": !
|
|
815
|
-
"f-un-select": !!
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
+
"f-list-view-draggable-item": c.value,
|
|
820
|
+
"f-un-click": !M.checked,
|
|
821
|
+
"f-un-select": !!M.raw[f.value],
|
|
822
|
+
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
823
|
+
// 多选
|
|
824
|
+
"f-listview-active": k.value.findIndex(
|
|
825
|
+
(E) => E[s.value] === M.raw[s.value]
|
|
826
|
+
) > -1,
|
|
827
|
+
"f-listview-item-active": k.value.findIndex(
|
|
828
|
+
(E) => E[s.value] === M.raw[s.value]
|
|
829
|
+
) > -1,
|
|
830
|
+
"f-listview-hover": !d.value && D === m.value,
|
|
831
|
+
"f-listview-item-hover": !d.value && D === m.value,
|
|
832
|
+
moving: !!M.moving
|
|
819
833
|
};
|
|
820
|
-
return
|
|
834
|
+
return l.value.split(" ").reduce((E, A) => (E[A] = !0, E), P), P;
|
|
821
835
|
}
|
|
822
|
-
function
|
|
823
|
-
return
|
|
836
|
+
function w(M, D) {
|
|
837
|
+
return M.raw[s.value] || "";
|
|
824
838
|
}
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
|
|
839
|
+
const b = V(() => !g.value);
|
|
840
|
+
function T(M, D, P) {
|
|
841
|
+
M.checked = P, !M.raw[f.value] && (b.value && (u.value = M.raw[s.value]), S(M));
|
|
828
842
|
}
|
|
829
|
-
const
|
|
830
|
-
function
|
|
831
|
-
if (
|
|
832
|
-
|
|
843
|
+
const F = V(() => g.value && i.value === "OnCheckClearByClick"), I = V(() => !g.value || g.value && (i.value === "OnCheckAndClick" || i.value === "OnClick"));
|
|
844
|
+
function O(M, D, P) {
|
|
845
|
+
if (D.raw[f.value]) {
|
|
846
|
+
M.preventDefault(), M.stopPropagation();
|
|
833
847
|
return;
|
|
834
848
|
}
|
|
835
|
-
|
|
849
|
+
u.value = D.raw[s.value], C.value = P, F.value && p(n.value), I.value && (S(D), k.value = y()), t.emit("clickItem", { data: k.value, index: P }), t.emit("activeChange", k.value);
|
|
836
850
|
}
|
|
837
851
|
return {
|
|
838
|
-
getKey:
|
|
839
|
-
listViewItemClass:
|
|
840
|
-
onCheckItem:
|
|
841
|
-
onClickItem:
|
|
852
|
+
getKey: w,
|
|
853
|
+
listViewItemClass: j,
|
|
854
|
+
onCheckItem: T,
|
|
855
|
+
onClickItem: O
|
|
842
856
|
};
|
|
843
857
|
}
|
|
844
|
-
function
|
|
845
|
-
const f =
|
|
858
|
+
function _t(e, t, n, o, a, r, s) {
|
|
859
|
+
const f = v(e.view), c = v(e.view === "CardView"), l = v({}), g = v("暂无数据"), i = qt(), d = Ht(e, t, o, i), C = Gt(e, t, o), u = Wt(e, t, n, d, i, r), m = V(() => ({
|
|
846
860
|
"f-list-view-group": !0,
|
|
847
|
-
"d-flex":
|
|
848
|
-
"flex-wrap":
|
|
849
|
-
})),
|
|
850
|
-
|
|
851
|
-
|
|
861
|
+
"d-flex": c.value,
|
|
862
|
+
"flex-wrap": c.value
|
|
863
|
+
})), p = V(() => !!n.value && n.value.length > 0), y = V(() => n.value.length === 0);
|
|
864
|
+
V(() => y.value && !t.slots.empty);
|
|
865
|
+
function S() {
|
|
866
|
+
return f.value === "SingleView" ? de : f.value === "DraggableView" ? Nt : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? Rt : de;
|
|
852
867
|
}
|
|
853
|
-
const
|
|
854
|
-
renderItem:
|
|
855
|
-
} =
|
|
868
|
+
const k = S(), {
|
|
869
|
+
renderItem: j
|
|
870
|
+
} = k(e, t, n, d, a, i, u, r, C, s), {
|
|
856
871
|
renderItem: w
|
|
857
|
-
} =
|
|
858
|
-
function
|
|
859
|
-
return n.value.filter((
|
|
872
|
+
} = Ut(e, t, n, d, a, i, u, r, C, s), b = [j, w];
|
|
873
|
+
function T() {
|
|
874
|
+
return n.value.filter((O) => O.visible !== !1).map((O, M) => b[O.type](O, M, l));
|
|
860
875
|
}
|
|
861
|
-
function
|
|
862
|
-
return
|
|
876
|
+
function F() {
|
|
877
|
+
return h("div", {
|
|
863
878
|
class: "f-list-view-emptydata"
|
|
864
|
-
}, [
|
|
879
|
+
}, [h("p", {
|
|
865
880
|
class: "f-empty-title"
|
|
866
|
-
}, [
|
|
881
|
+
}, [t.slots.empty ? t.slots.empty() : g.value])]);
|
|
867
882
|
}
|
|
868
|
-
function
|
|
869
|
-
return
|
|
883
|
+
function I() {
|
|
884
|
+
return h("ul", {
|
|
870
885
|
class: m.value,
|
|
871
886
|
style: "list-style: none;"
|
|
872
|
-
}, [
|
|
887
|
+
}, [p.value && T(), y.value && F()]);
|
|
873
888
|
}
|
|
874
889
|
return {
|
|
875
|
-
renderListArea:
|
|
890
|
+
renderListArea: I
|
|
876
891
|
};
|
|
877
892
|
}
|
|
878
|
-
function
|
|
893
|
+
function zt(e, t, n) {
|
|
879
894
|
function o() {
|
|
880
|
-
return t.slots.header &&
|
|
895
|
+
return t.slots.header && h("div", {
|
|
881
896
|
class: "f-list-view-header"
|
|
882
897
|
}, [t.slots.header()]);
|
|
883
898
|
}
|
|
@@ -885,52 +900,52 @@ function $t(e, t, n) {
|
|
|
885
900
|
renderHeader: o
|
|
886
901
|
};
|
|
887
902
|
}
|
|
888
|
-
function
|
|
889
|
-
const o =
|
|
890
|
-
function
|
|
891
|
-
|
|
903
|
+
function pe(e, t, n) {
|
|
904
|
+
const o = v(e.headerClass), a = v(e.placeholder), r = v(""), s = V(() => !r.value), f = V(() => !!r.value);
|
|
905
|
+
function c(d) {
|
|
906
|
+
r.value = "";
|
|
892
907
|
}
|
|
893
|
-
N(
|
|
894
|
-
e.enableHighlightSearch && n.search(
|
|
908
|
+
N(r, (d) => {
|
|
909
|
+
e.enableHighlightSearch && n.search(d), t.emit("afterSearch", d);
|
|
895
910
|
});
|
|
896
|
-
const
|
|
897
|
-
const
|
|
911
|
+
const l = V(() => {
|
|
912
|
+
const d = {
|
|
898
913
|
"form-group": !0,
|
|
899
914
|
"farris-form-group": !0
|
|
900
915
|
};
|
|
901
|
-
return o.value && o.value.split(" ").reduce((
|
|
916
|
+
return o.value && o.value.split(" ").reduce((u, m) => (u[m] = !0, u), d), d;
|
|
902
917
|
});
|
|
903
|
-
function
|
|
918
|
+
function g(d) {
|
|
904
919
|
}
|
|
905
920
|
function i() {
|
|
906
|
-
return
|
|
921
|
+
return h("div", {
|
|
907
922
|
class: "f-list-view-header",
|
|
908
|
-
onClick:
|
|
909
|
-
}, [
|
|
910
|
-
class:
|
|
911
|
-
}, [
|
|
923
|
+
onClick: Pe(() => g, ["prevent", "stop"])
|
|
924
|
+
}, [h("div", {
|
|
925
|
+
class: l.value
|
|
926
|
+
}, [h("div", {
|
|
912
927
|
class: "farris-input-wrap"
|
|
913
|
-
}, [
|
|
928
|
+
}, [h("div", {
|
|
914
929
|
class: "f-cmp-inputgroup"
|
|
915
|
-
}, [
|
|
930
|
+
}, [h("div", {
|
|
916
931
|
class: "input-group f-state-editable"
|
|
917
|
-
}, [
|
|
932
|
+
}, [Ve(h("input", {
|
|
918
933
|
class: "form-control f-utils-fill text-left",
|
|
919
|
-
"onUpdate:modelValue": (
|
|
934
|
+
"onUpdate:modelValue": (d) => r.value = d,
|
|
920
935
|
name: "input-group-value",
|
|
921
936
|
type: "text",
|
|
922
|
-
placeholder:
|
|
937
|
+
placeholder: a.value,
|
|
923
938
|
autocomplete: "off"
|
|
924
|
-
}, null), [[
|
|
939
|
+
}, null), [[Ae, r.value]]), h("div", {
|
|
925
940
|
class: "input-group-append"
|
|
926
|
-
}, [f.value &&
|
|
941
|
+
}, [f.value && h("span", {
|
|
927
942
|
class: "input-group-text input-group-clear",
|
|
928
|
-
onClick: (
|
|
929
|
-
}, [
|
|
943
|
+
onClick: (d) => c()
|
|
944
|
+
}, [h("i", {
|
|
930
945
|
class: "f-icon f-icon-close-circle"
|
|
931
|
-
}, null)]),
|
|
946
|
+
}, null)]), s.value && h("span", {
|
|
932
947
|
class: "input-group-text"
|
|
933
|
-
}, [
|
|
948
|
+
}, [h("span", {
|
|
934
949
|
class: "f-icon f-icon-search"
|
|
935
950
|
}, null)])])])])])])]);
|
|
936
951
|
}
|
|
@@ -938,60 +953,60 @@ function se(e, t, n) {
|
|
|
938
953
|
renderHeader: i
|
|
939
954
|
};
|
|
940
955
|
}
|
|
941
|
-
const
|
|
956
|
+
const ve = /* @__PURE__ */ R({
|
|
942
957
|
name: "FListView",
|
|
943
|
-
props:
|
|
958
|
+
props: be,
|
|
944
959
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
945
960
|
setup(e, t) {
|
|
946
|
-
const n =
|
|
947
|
-
getVisualData:
|
|
948
|
-
} =
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
const
|
|
961
|
+
const n = v(), o = v(!0), a = v(!1), r = v([]), s = 0, f = v(e.columns), c = xe(e), l = Re(e), g = Ne(e, c), i = Ue(e), d = qe(e, /* @__PURE__ */ new Map(), l, c, i), C = He(e, d, c, r, t), u = xt(e, n), m = V(() => d.dataView.value.length), p = Ge(e, t, c), y = We(), S = _e(e, {}, y), k = ze(e, p, l, c, y, S), j = Xe(e, c, S, k), w = Je(e, c, S, k), b = Qe(e, f, d, m, s, k, j, w), {
|
|
962
|
+
getVisualData: T
|
|
963
|
+
} = b;
|
|
964
|
+
r.value = T(0, m.value + s - 1);
|
|
965
|
+
const F = V(() => {
|
|
966
|
+
const $ = {
|
|
952
967
|
"f-list-view": !0,
|
|
953
968
|
"f-list-view-multiple": e.multiSelect
|
|
954
969
|
};
|
|
955
|
-
return e.size !== "default" && (
|
|
956
|
-
}),
|
|
957
|
-
function
|
|
958
|
-
return e.header === "SearchBar" ?
|
|
970
|
+
return e.size !== "default" && ($[`${e.size}-item`] = !0), $;
|
|
971
|
+
}), I = V(() => !!t.slots.footer || o.value);
|
|
972
|
+
function O() {
|
|
973
|
+
return e.header === "SearchBar" ? pe : e.header === "ContentHeader" ? zt : pe;
|
|
959
974
|
}
|
|
960
|
-
const
|
|
961
|
-
renderHeader:
|
|
962
|
-
} =
|
|
963
|
-
renderListArea:
|
|
964
|
-
} =
|
|
965
|
-
function
|
|
966
|
-
|
|
975
|
+
const M = O(), {
|
|
976
|
+
renderHeader: D
|
|
977
|
+
} = M(e, t, u), {
|
|
978
|
+
renderListArea: P
|
|
979
|
+
} = _t(e, t, r, d, g, C, b);
|
|
980
|
+
function L($) {
|
|
981
|
+
u.search($);
|
|
967
982
|
}
|
|
968
|
-
function E(
|
|
969
|
-
|
|
983
|
+
function E($) {
|
|
984
|
+
$ && (d.load($), r.value = T(0, m.value + s - 1));
|
|
970
985
|
}
|
|
971
986
|
t.expose({
|
|
972
|
-
search:
|
|
987
|
+
search: L,
|
|
973
988
|
updateDataSource: E
|
|
974
989
|
});
|
|
975
|
-
function
|
|
976
|
-
e.multiSelect && (
|
|
990
|
+
function A($) {
|
|
991
|
+
e.multiSelect && ($.preventDefault(), $.stopPropagation());
|
|
977
992
|
}
|
|
978
|
-
return () =>
|
|
979
|
-
class:
|
|
980
|
-
onClick:
|
|
981
|
-
}, [
|
|
993
|
+
return () => h("div", {
|
|
994
|
+
class: F.value,
|
|
995
|
+
onClick: A
|
|
996
|
+
}, [D(), h("div", {
|
|
982
997
|
ref: n,
|
|
983
998
|
class: "f-list-view-content",
|
|
984
999
|
onMouseover: () => {
|
|
985
|
-
|
|
1000
|
+
a.value = !0;
|
|
986
1001
|
},
|
|
987
1002
|
onMouseleave: () => {
|
|
988
|
-
|
|
1003
|
+
a.value = !1;
|
|
989
1004
|
}
|
|
990
|
-
}, [
|
|
1005
|
+
}, [P()]), I.value && h("div", {
|
|
991
1006
|
class: "f-list-view-footer"
|
|
992
1007
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
993
1008
|
}
|
|
994
|
-
}),
|
|
1009
|
+
}), Xt = {
|
|
995
1010
|
/**
|
|
996
1011
|
* 组件标识
|
|
997
1012
|
*/
|
|
@@ -1017,7 +1032,7 @@ const me = /* @__PURE__ */ H({
|
|
|
1017
1032
|
*/
|
|
1018
1033
|
customClass: { type: Object, default: {} }
|
|
1019
1034
|
};
|
|
1020
|
-
function
|
|
1035
|
+
function Jt(e, t) {
|
|
1021
1036
|
function n(o) {
|
|
1022
1037
|
o.stopPropagation(), e.disabled || t.emit("click", o);
|
|
1023
1038
|
}
|
|
@@ -1025,50 +1040,50 @@ function Lt(e, t) {
|
|
|
1025
1040
|
onClickButton: n
|
|
1026
1041
|
};
|
|
1027
1042
|
}
|
|
1028
|
-
function
|
|
1029
|
-
const t =
|
|
1043
|
+
function Qt(e) {
|
|
1044
|
+
const t = V(() => {
|
|
1030
1045
|
const o = {
|
|
1031
1046
|
"f-icon": !0
|
|
1032
1047
|
};
|
|
1033
1048
|
if (e.icon) {
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1049
|
+
const a = e.icon.trim().split(" ");
|
|
1050
|
+
a && a.length && a.reduce((r, s) => (r[s] = !0, r), o);
|
|
1036
1051
|
}
|
|
1037
1052
|
return o;
|
|
1038
|
-
}), n =
|
|
1053
|
+
}), n = V(() => !!(e.icon && e.icon.trim()));
|
|
1039
1054
|
return { iconClass: t, shouldShowIcon: n };
|
|
1040
1055
|
}
|
|
1041
|
-
const
|
|
1056
|
+
const Ce = /* @__PURE__ */ R({
|
|
1042
1057
|
name: "FButton",
|
|
1043
|
-
props:
|
|
1058
|
+
props: Xt,
|
|
1044
1059
|
emits: ["click"],
|
|
1045
1060
|
setup(e, t) {
|
|
1046
1061
|
const {
|
|
1047
1062
|
onClickButton: n
|
|
1048
|
-
} =
|
|
1063
|
+
} = Jt(e, t), {
|
|
1049
1064
|
iconClass: o,
|
|
1050
|
-
shouldShowIcon:
|
|
1051
|
-
} =
|
|
1052
|
-
const
|
|
1065
|
+
shouldShowIcon: a
|
|
1066
|
+
} = Qt(e), r = V(() => {
|
|
1067
|
+
const s = {
|
|
1053
1068
|
btn: !0,
|
|
1054
1069
|
"btn-lg": e.size === "large",
|
|
1055
1070
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
1056
1071
|
"btn-sm": e.size === "small",
|
|
1057
|
-
"btn-icontext":
|
|
1072
|
+
"btn-icontext": a.value
|
|
1058
1073
|
};
|
|
1059
|
-
return
|
|
1074
|
+
return s[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, c) => (f[c] = e.customClass[c], f), s), s;
|
|
1060
1075
|
});
|
|
1061
|
-
return () =>
|
|
1062
|
-
class:
|
|
1076
|
+
return () => h("button", {
|
|
1077
|
+
class: r.value,
|
|
1063
1078
|
disabled: e.disabled,
|
|
1064
|
-
onClick: (
|
|
1065
|
-
}, [
|
|
1079
|
+
onClick: (s) => n(s)
|
|
1080
|
+
}, [a.value && h("i", {
|
|
1066
1081
|
class: o.value
|
|
1067
1082
|
}, null), t.slots.default && t.slots.default()]);
|
|
1068
1083
|
}
|
|
1069
|
-
}),
|
|
1070
|
-
["appearance",
|
|
1071
|
-
]),
|
|
1084
|
+
}), Yt = /* @__PURE__ */ new Map([
|
|
1085
|
+
["appearance", oe]
|
|
1086
|
+
]), Zt = "https://json-schema.org/draft/2020-12/schema", Kt = "https://farris-design.gitee.io/combo-list.schema.json", en = "combo-list", tn = "A Farris Input Component", nn = "object", on = {
|
|
1072
1087
|
id: {
|
|
1073
1088
|
description: "The unique identifier for a combo list",
|
|
1074
1089
|
type: "string"
|
|
@@ -1096,6 +1111,11 @@ const ye = /* @__PURE__ */ H({
|
|
|
1096
1111
|
type: "object",
|
|
1097
1112
|
default: {}
|
|
1098
1113
|
},
|
|
1114
|
+
disabled: {
|
|
1115
|
+
description: "",
|
|
1116
|
+
type: "boolean",
|
|
1117
|
+
default: !1
|
|
1118
|
+
},
|
|
1099
1119
|
editable: {
|
|
1100
1120
|
description: "",
|
|
1101
1121
|
type: "boolean",
|
|
@@ -1123,7 +1143,7 @@ const ye = /* @__PURE__ */ H({
|
|
|
1123
1143
|
valueField: {
|
|
1124
1144
|
description: "",
|
|
1125
1145
|
type: "string",
|
|
1126
|
-
default: "
|
|
1146
|
+
default: "id"
|
|
1127
1147
|
},
|
|
1128
1148
|
titleField: {
|
|
1129
1149
|
description: "",
|
|
@@ -1179,22 +1199,27 @@ const ye = /* @__PURE__ */ H({
|
|
|
1179
1199
|
type: "sting",
|
|
1180
1200
|
default: ""
|
|
1181
1201
|
}
|
|
1182
|
-
},
|
|
1202
|
+
}, an = [
|
|
1183
1203
|
"id",
|
|
1184
1204
|
"type"
|
|
1185
|
-
],
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1205
|
+
], rn = [
|
|
1206
|
+
"id",
|
|
1207
|
+
"appearance",
|
|
1208
|
+
"binding"
|
|
1209
|
+
], ln = {
|
|
1210
|
+
$schema: Zt,
|
|
1211
|
+
$id: Kt,
|
|
1212
|
+
title: en,
|
|
1213
|
+
description: tn,
|
|
1214
|
+
type: nn,
|
|
1215
|
+
properties: on,
|
|
1216
|
+
required: an,
|
|
1217
|
+
ignore: rn
|
|
1193
1218
|
};
|
|
1194
|
-
function
|
|
1219
|
+
function sn(e, t, n) {
|
|
1195
1220
|
return t;
|
|
1196
1221
|
}
|
|
1197
|
-
const
|
|
1222
|
+
const re = {
|
|
1198
1223
|
/**
|
|
1199
1224
|
* 组件标识
|
|
1200
1225
|
*/
|
|
@@ -1271,7 +1296,7 @@ const ne = {
|
|
|
1271
1296
|
* 可选,是否支持多选
|
|
1272
1297
|
* 默认`false`
|
|
1273
1298
|
*/
|
|
1274
|
-
multiSelect: {
|
|
1299
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1275
1300
|
/**
|
|
1276
1301
|
* 绑定值
|
|
1277
1302
|
*/
|
|
@@ -1360,11 +1385,11 @@ const ne = {
|
|
|
1360
1385
|
},
|
|
1361
1386
|
// 搜索启用高亮
|
|
1362
1387
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1363
|
-
},
|
|
1388
|
+
}, we = z(re, ln, Yt, sn), cn = {
|
|
1364
1389
|
dataSource: { type: Array, default: [] },
|
|
1365
1390
|
enableSearch: { type: Boolean, default: !1 },
|
|
1366
1391
|
idField: { type: String, default: "id" },
|
|
1367
|
-
multiSelect: {
|
|
1392
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1368
1393
|
selectedValues: { type: String, default: "" },
|
|
1369
1394
|
separator: { type: String, default: "," },
|
|
1370
1395
|
textField: { type: String, default: "name" },
|
|
@@ -1381,235 +1406,857 @@ const ne = {
|
|
|
1381
1406
|
},
|
|
1382
1407
|
// 搜索启用高亮
|
|
1383
1408
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1384
|
-
},
|
|
1409
|
+
}, un = /* @__PURE__ */ R({
|
|
1385
1410
|
name: "FComboListContainer",
|
|
1386
|
-
props:
|
|
1411
|
+
props: cn,
|
|
1387
1412
|
emits: ["selectionChange"],
|
|
1388
1413
|
setup(e, t) {
|
|
1389
|
-
const n =
|
|
1414
|
+
const n = v(), o = v(e.dataSource), a = v([]), r = v(e.separator), s = v(e.width), f = v(e.maxHeight), c = v(String(e.selectedValues).split(r.value)), l = V(() => e.multiSelect), g = V(() => ({
|
|
1415
|
+
enableSelectRow: !0,
|
|
1416
|
+
multiSelect: e.multiSelect,
|
|
1417
|
+
multiSelectMode: "OnCheckAndClick",
|
|
1418
|
+
showCheckbox: l.value,
|
|
1419
|
+
showSelectAll: !1,
|
|
1420
|
+
showSelection: !0
|
|
1421
|
+
}));
|
|
1390
1422
|
N(e.dataSource, () => {
|
|
1391
1423
|
o.value = e.dataSource;
|
|
1392
1424
|
});
|
|
1393
|
-
const
|
|
1394
|
-
const
|
|
1395
|
-
return
|
|
1425
|
+
const i = V(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = V(() => {
|
|
1426
|
+
const m = {};
|
|
1427
|
+
return s.value !== void 0 && (m.width = `${s.value}px`), f.value !== void 0 && f.value > 0 && (m.maxHeight = `${f.value}px`), m;
|
|
1428
|
+
});
|
|
1429
|
+
function C(m) {
|
|
1430
|
+
a.value = m.map((p) => Object.assign({}, p)), c.value = m.map((p) => p[e.idField]), t.emit("selectionChange", a.value);
|
|
1431
|
+
}
|
|
1432
|
+
function u(m) {
|
|
1433
|
+
if (e.enableHighlightSearch)
|
|
1434
|
+
return;
|
|
1435
|
+
let p = [];
|
|
1436
|
+
typeof e.searchOption == "function" ? p = o.value.filter((y) => e.searchOption(m, y)) : p = o.value.filter((y) => y[e.valueField].indexOf(m) > -1 || y[e.textField].indexOf(m) > -1), n.value.updateDataSource(p);
|
|
1437
|
+
}
|
|
1438
|
+
return N([() => e.selectedValues], ([m]) => {
|
|
1439
|
+
c.value = m.split(r.value);
|
|
1440
|
+
}), () => h("div", {
|
|
1441
|
+
class: "f-combo-list-container pl-1",
|
|
1442
|
+
style: d.value
|
|
1443
|
+
}, [h(Ye, {
|
|
1444
|
+
ref: n,
|
|
1445
|
+
size: "small",
|
|
1446
|
+
itemClass: "f-combo-list-item",
|
|
1447
|
+
header: i.value,
|
|
1448
|
+
headerClass: "f-combo-list-search-box",
|
|
1449
|
+
data: o.value,
|
|
1450
|
+
idField: e.idField,
|
|
1451
|
+
textField: e.textField,
|
|
1452
|
+
titleField: e.titleField,
|
|
1453
|
+
multiSelect: e.multiSelect,
|
|
1454
|
+
selection: g.value,
|
|
1455
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1456
|
+
selectionValues: c.value,
|
|
1457
|
+
onSelectionChange: C,
|
|
1458
|
+
onAfterSearch: u
|
|
1459
|
+
}, null)]);
|
|
1460
|
+
}
|
|
1461
|
+
});
|
|
1462
|
+
function dn(e) {
|
|
1463
|
+
const t = v(""), n = v(e.modelValue), o = v(e.data || []), a = v(e.editable);
|
|
1464
|
+
function r(i) {
|
|
1465
|
+
const d = String(i).split(e.separator), C = d.map((p) => [p, !0]), u = new Map(C);
|
|
1466
|
+
return o.value.filter((p) => u.has(String(p[e.valueField]))).sort((p, y) => {
|
|
1467
|
+
const S = d.indexOf(p[e.valueField]), k = d.indexOf(y[e.valueField]);
|
|
1468
|
+
return S - k;
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
function s(i) {
|
|
1472
|
+
const d = r(i).map((C) => C[e.textField]).join(e.separator);
|
|
1473
|
+
t.value = a.value ? d || i : d;
|
|
1474
|
+
}
|
|
1475
|
+
function f(i) {
|
|
1476
|
+
const d = i.split(e.separator).map((u) => [u, !0]), C = new Map(d);
|
|
1477
|
+
return o.value.filter((u) => C.has(u[e.textField]));
|
|
1478
|
+
}
|
|
1479
|
+
function c(i) {
|
|
1480
|
+
const d = {};
|
|
1481
|
+
return d[e.idField] = i, d[e.textField] = i, [d];
|
|
1482
|
+
}
|
|
1483
|
+
function l(i) {
|
|
1484
|
+
let d = f(i);
|
|
1485
|
+
const C = d && d.length > 0;
|
|
1486
|
+
return a.value && !C && (d = c(i)), d;
|
|
1487
|
+
}
|
|
1488
|
+
function g() {
|
|
1489
|
+
const { url: i, method: d = "GET", headers: C = {}, body: u = null } = e.remote, m = d.toLowerCase() == "get" ? { method: d, headers: C } : { method: d, headers: C, body: u };
|
|
1490
|
+
let p = !1;
|
|
1491
|
+
fetch(i, m).then((y) => {
|
|
1492
|
+
var k, j;
|
|
1493
|
+
if (y.status === 200)
|
|
1494
|
+
return p = !!((j = (k = y.headers) == null ? void 0 : k.get("content-type")) != null && j.includes("application/json")), p ? y.text() : y.json();
|
|
1495
|
+
throw new Error(y.statusText);
|
|
1496
|
+
}).then((y) => {
|
|
1497
|
+
o.value = p ? JSON.parse(y) : y;
|
|
1498
|
+
}).catch((y) => {
|
|
1499
|
+
console.error(y);
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
return e.remote && g(), N(() => e.data, () => {
|
|
1503
|
+
o.value = e.data;
|
|
1504
|
+
}), N([o], ([i]) => {
|
|
1505
|
+
if (e.modelValue != null) {
|
|
1506
|
+
const d = i.find((C) => C[e.valueField] === e.modelValue);
|
|
1507
|
+
d && (t.value = d[e.textField]);
|
|
1508
|
+
}
|
|
1509
|
+
}), N(() => e.modelValue, (i) => {
|
|
1510
|
+
n.value = i, s(i);
|
|
1511
|
+
}), s(e.modelValue), { dataSource: o, displayText: t, editable: a, modelValue: n, getItemsByDisplayText: f, getItemsByValue: r, getSelectedItemsByDisplayText: l };
|
|
1512
|
+
}
|
|
1513
|
+
const G = /* @__PURE__ */ R({
|
|
1514
|
+
name: "FComboList",
|
|
1515
|
+
props: re,
|
|
1516
|
+
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1517
|
+
setup(e, t) {
|
|
1518
|
+
const n = v(), o = v(e.disabled), a = v(e.enableClear), r = v(e.enableSearch), s = v(e.readonly), {
|
|
1519
|
+
dataSource: f,
|
|
1520
|
+
displayText: c,
|
|
1521
|
+
editable: l,
|
|
1522
|
+
modelValue: g,
|
|
1523
|
+
getSelectedItemsByDisplayText: i
|
|
1524
|
+
} = dn(e), d = V(() => e.multiSelect), C = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1525
|
+
function u() {
|
|
1526
|
+
!d.value && n.value && n.value.hidePopup();
|
|
1527
|
+
}
|
|
1528
|
+
function m(w) {
|
|
1529
|
+
c.value = w.map((b) => b[e.textField]).join(e.separator), w.length === 1 ? g.value = w[0][e.valueField] : g.value = w.map((b) => b[e.valueField]).join(e.separator), t.emit("update:modelValue", g.value), t.emit("change", w, g.value), u();
|
|
1530
|
+
}
|
|
1531
|
+
function p() {
|
|
1532
|
+
s.value || n.value.togglePopup();
|
|
1533
|
+
}
|
|
1534
|
+
function y(w) {
|
|
1535
|
+
g.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1536
|
+
}
|
|
1537
|
+
function S(w) {
|
|
1538
|
+
const b = i(w);
|
|
1539
|
+
m(b);
|
|
1540
|
+
}
|
|
1541
|
+
function k() {
|
|
1542
|
+
return c.value;
|
|
1543
|
+
}
|
|
1544
|
+
function j(w) {
|
|
1545
|
+
t.emit("input", w);
|
|
1546
|
+
}
|
|
1547
|
+
return t.expose({
|
|
1548
|
+
getDisplayText: k
|
|
1549
|
+
}), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([w, b, T, F, I]) => {
|
|
1550
|
+
o.value = w, l.value = b, a.value = T, r.value = F, s.value = I;
|
|
1551
|
+
}), () => h(Ze, {
|
|
1552
|
+
ref: n,
|
|
1553
|
+
id: e.id,
|
|
1554
|
+
disable: o.value,
|
|
1555
|
+
readonly: s.value,
|
|
1556
|
+
forcePlaceholder: e.forcePlaceholder,
|
|
1557
|
+
editable: l.value,
|
|
1558
|
+
buttonContent: e.dropDownIcon,
|
|
1559
|
+
placeholder: e.placeholder,
|
|
1560
|
+
enableClear: a.value,
|
|
1561
|
+
maxLength: e.maxLength,
|
|
1562
|
+
tabIndex: e.tabIndex,
|
|
1563
|
+
enableTitle: e.enableTitle,
|
|
1564
|
+
multiSelect: e.multiSelect,
|
|
1565
|
+
inputType: e.multiSelect ? e.viewType : "text",
|
|
1566
|
+
modelValue: c.value,
|
|
1567
|
+
"onUpdate:modelValue": (w) => c.value = w,
|
|
1568
|
+
focusOnCreated: e.focusOnCreated,
|
|
1569
|
+
selectOnCreated: e.selectOnCreated,
|
|
1570
|
+
onClear: y,
|
|
1571
|
+
onClick: p,
|
|
1572
|
+
onChange: S,
|
|
1573
|
+
onInput: j,
|
|
1574
|
+
beforeOpen: e.beforeOpen
|
|
1575
|
+
}, {
|
|
1576
|
+
default: () => [h(un, {
|
|
1577
|
+
idField: e.idField,
|
|
1578
|
+
valueField: e.valueField,
|
|
1579
|
+
textField: e.textField,
|
|
1580
|
+
titleField: e.titleField,
|
|
1581
|
+
dataSource: f.value,
|
|
1582
|
+
selectedValues: g.value,
|
|
1583
|
+
multiSelect: e.multiSelect,
|
|
1584
|
+
enableSearch: r.value,
|
|
1585
|
+
maxHeight: e.maxHeight,
|
|
1586
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1587
|
+
width: e.fitEditor ? C.value : void 0,
|
|
1588
|
+
onSelectionChange: m
|
|
1589
|
+
}, null)]
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
}), pn = /* @__PURE__ */ new Map([
|
|
1593
|
+
["appearance", Ke]
|
|
1594
|
+
]);
|
|
1595
|
+
function fn(e, t, n) {
|
|
1596
|
+
return t;
|
|
1597
|
+
}
|
|
1598
|
+
const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-design.gitee.io/button-edit.schema.json", gn = "button-edit", hn = "A Farris Input Component", bn = "object", vn = {
|
|
1599
|
+
id: {
|
|
1600
|
+
description: "The unique identifier for a Input Group",
|
|
1601
|
+
type: "string"
|
|
1602
|
+
},
|
|
1603
|
+
type: {
|
|
1604
|
+
description: "The type string of Input Group component",
|
|
1605
|
+
type: "string",
|
|
1606
|
+
default: "button-edit"
|
|
1607
|
+
},
|
|
1608
|
+
appearance: {
|
|
1609
|
+
description: "",
|
|
1610
|
+
type: "object",
|
|
1611
|
+
properties: {
|
|
1612
|
+
class: {
|
|
1613
|
+
type: "string"
|
|
1614
|
+
},
|
|
1615
|
+
style: {
|
|
1616
|
+
type: "string"
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
default: {}
|
|
1620
|
+
},
|
|
1621
|
+
binding: {
|
|
1622
|
+
description: "",
|
|
1623
|
+
type: "object",
|
|
1624
|
+
default: {}
|
|
1625
|
+
},
|
|
1626
|
+
disable: {
|
|
1627
|
+
type: "string",
|
|
1628
|
+
default: !1
|
|
1629
|
+
},
|
|
1630
|
+
editable: {
|
|
1631
|
+
description: "",
|
|
1632
|
+
type: "boolean",
|
|
1633
|
+
default: !0
|
|
1634
|
+
},
|
|
1635
|
+
enableLinkLabel: {
|
|
1636
|
+
description: "",
|
|
1637
|
+
type: "boolean",
|
|
1638
|
+
default: !1
|
|
1639
|
+
},
|
|
1640
|
+
label: {
|
|
1641
|
+
description: "",
|
|
1642
|
+
type: "string",
|
|
1643
|
+
default: ""
|
|
1644
|
+
},
|
|
1645
|
+
lableWidth: {
|
|
1646
|
+
description: "",
|
|
1647
|
+
type: "number"
|
|
1648
|
+
},
|
|
1649
|
+
placeholder: {
|
|
1650
|
+
description: "",
|
|
1651
|
+
type: "string",
|
|
1652
|
+
default: ""
|
|
1653
|
+
},
|
|
1654
|
+
readonly: {
|
|
1655
|
+
description: "",
|
|
1656
|
+
type: "boolean",
|
|
1657
|
+
default: !1
|
|
1658
|
+
},
|
|
1659
|
+
require: {
|
|
1660
|
+
description: "",
|
|
1661
|
+
type: "boolean",
|
|
1662
|
+
default: !1
|
|
1663
|
+
},
|
|
1664
|
+
tabindex: {
|
|
1665
|
+
description: "",
|
|
1666
|
+
type: "number",
|
|
1667
|
+
default: -1
|
|
1668
|
+
},
|
|
1669
|
+
textAlign: {
|
|
1670
|
+
description: "",
|
|
1671
|
+
type: "string",
|
|
1672
|
+
enum: [
|
|
1673
|
+
"left",
|
|
1674
|
+
"middle",
|
|
1675
|
+
"right"
|
|
1676
|
+
],
|
|
1677
|
+
default: "left"
|
|
1678
|
+
},
|
|
1679
|
+
visible: {
|
|
1680
|
+
description: "",
|
|
1681
|
+
type: "boolean",
|
|
1682
|
+
default: !0
|
|
1683
|
+
},
|
|
1684
|
+
onBlur: {
|
|
1685
|
+
description: "",
|
|
1686
|
+
type: "string",
|
|
1687
|
+
default: ""
|
|
1688
|
+
},
|
|
1689
|
+
onClickLinkLabel: {
|
|
1690
|
+
description: "",
|
|
1691
|
+
type: "sting",
|
|
1692
|
+
default: ""
|
|
1693
|
+
},
|
|
1694
|
+
autoComplete: {
|
|
1695
|
+
description: "",
|
|
1696
|
+
type: "boolean",
|
|
1697
|
+
default: !1
|
|
1698
|
+
},
|
|
1699
|
+
buttonContent: {
|
|
1700
|
+
description: "",
|
|
1701
|
+
type: "string",
|
|
1702
|
+
default: ""
|
|
1703
|
+
},
|
|
1704
|
+
enableClear: {
|
|
1705
|
+
description: "",
|
|
1706
|
+
type: "boolean",
|
|
1707
|
+
default: !0
|
|
1708
|
+
},
|
|
1709
|
+
inputType: {
|
|
1710
|
+
description: "",
|
|
1711
|
+
type: "string",
|
|
1712
|
+
enum: [
|
|
1713
|
+
"text",
|
|
1714
|
+
"tag"
|
|
1715
|
+
],
|
|
1716
|
+
default: "text"
|
|
1717
|
+
},
|
|
1718
|
+
multiSelect: {
|
|
1719
|
+
description: "",
|
|
1720
|
+
type: "boolean",
|
|
1721
|
+
default: !1
|
|
1722
|
+
},
|
|
1723
|
+
popup: {
|
|
1724
|
+
description: "",
|
|
1725
|
+
type: "object",
|
|
1726
|
+
properties: {
|
|
1727
|
+
footerButtons: {
|
|
1728
|
+
type: "array",
|
|
1729
|
+
default: []
|
|
1730
|
+
},
|
|
1731
|
+
height: {
|
|
1732
|
+
type: "number",
|
|
1733
|
+
default: 600
|
|
1734
|
+
},
|
|
1735
|
+
dataMapping: {
|
|
1736
|
+
type: "object"
|
|
1737
|
+
},
|
|
1738
|
+
contents: {
|
|
1739
|
+
type: "array",
|
|
1740
|
+
default: []
|
|
1741
|
+
},
|
|
1742
|
+
showMaxButton: {
|
|
1743
|
+
type: "boolean",
|
|
1744
|
+
default: !0
|
|
1745
|
+
},
|
|
1746
|
+
showCloseButton: {
|
|
1747
|
+
type: "boolean",
|
|
1748
|
+
default: !0
|
|
1749
|
+
},
|
|
1750
|
+
showFooter: {
|
|
1751
|
+
type: "boolean",
|
|
1752
|
+
default: !0
|
|
1753
|
+
},
|
|
1754
|
+
title: {
|
|
1755
|
+
type: "string",
|
|
1756
|
+
default: ""
|
|
1757
|
+
},
|
|
1758
|
+
width: {
|
|
1759
|
+
type: "number",
|
|
1760
|
+
default: 800
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
separator: {
|
|
1765
|
+
type: "string",
|
|
1766
|
+
default: ","
|
|
1767
|
+
},
|
|
1768
|
+
showButtonWhenDisabled: {
|
|
1769
|
+
description: "",
|
|
1770
|
+
type: "boolean",
|
|
1771
|
+
default: !1
|
|
1772
|
+
},
|
|
1773
|
+
wrapText: {
|
|
1774
|
+
type: "boolean",
|
|
1775
|
+
default: !1
|
|
1776
|
+
},
|
|
1777
|
+
onClear: {
|
|
1778
|
+
description: "",
|
|
1779
|
+
type: "string",
|
|
1780
|
+
default: ""
|
|
1781
|
+
}
|
|
1782
|
+
}, Cn = [
|
|
1783
|
+
"id",
|
|
1784
|
+
"type"
|
|
1785
|
+
], wn = {
|
|
1786
|
+
$schema: mn,
|
|
1787
|
+
$id: yn,
|
|
1788
|
+
title: gn,
|
|
1789
|
+
description: hn,
|
|
1790
|
+
type: bn,
|
|
1791
|
+
properties: vn,
|
|
1792
|
+
required: Cn
|
|
1793
|
+
}, Sn = "buttonEdit", kn = "A Farris Component", Fn = "object", In = {
|
|
1794
|
+
basic: {
|
|
1795
|
+
description: "Basic Infomation",
|
|
1796
|
+
title: "基本信息",
|
|
1797
|
+
properties: {
|
|
1798
|
+
id: {
|
|
1799
|
+
description: "组件标识",
|
|
1800
|
+
title: "标识",
|
|
1801
|
+
type: "string",
|
|
1802
|
+
readonly: !0
|
|
1803
|
+
},
|
|
1804
|
+
type: {
|
|
1805
|
+
description: "组件类型",
|
|
1806
|
+
title: "控件类型",
|
|
1807
|
+
type: "select",
|
|
1808
|
+
editor: {
|
|
1809
|
+
type: "waiting for modification",
|
|
1810
|
+
enum: []
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
behavior: {
|
|
1816
|
+
description: "Basic Infomation",
|
|
1817
|
+
title: "行为",
|
|
1818
|
+
properties: {
|
|
1819
|
+
editable: {
|
|
1820
|
+
description: "",
|
|
1821
|
+
title: "允许编辑",
|
|
1822
|
+
type: "boolean"
|
|
1823
|
+
},
|
|
1824
|
+
readonly: {
|
|
1825
|
+
description: "",
|
|
1826
|
+
title: "只读",
|
|
1827
|
+
type: "string"
|
|
1828
|
+
},
|
|
1829
|
+
required: {
|
|
1830
|
+
description: "",
|
|
1831
|
+
title: "必填",
|
|
1832
|
+
type: "boolean"
|
|
1833
|
+
},
|
|
1834
|
+
visible: {
|
|
1835
|
+
description: "",
|
|
1836
|
+
title: "可见",
|
|
1837
|
+
type: "boolean"
|
|
1838
|
+
},
|
|
1839
|
+
placeholder: {
|
|
1840
|
+
description: "",
|
|
1841
|
+
title: "提示文本",
|
|
1842
|
+
type: "string"
|
|
1843
|
+
},
|
|
1844
|
+
tabindex: {
|
|
1845
|
+
description: "",
|
|
1846
|
+
title: "tab索引",
|
|
1847
|
+
type: "number"
|
|
1848
|
+
},
|
|
1849
|
+
textAlign: {
|
|
1850
|
+
description: "",
|
|
1851
|
+
title: "对齐方式",
|
|
1852
|
+
type: "enum",
|
|
1853
|
+
editor: {
|
|
1854
|
+
type: "combo-list",
|
|
1855
|
+
textField: "name",
|
|
1856
|
+
valueField: "value",
|
|
1857
|
+
data: [
|
|
1858
|
+
{
|
|
1859
|
+
value: "left",
|
|
1860
|
+
name: "左对齐"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
value: "center",
|
|
1864
|
+
name: "居中对齐"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
value: "right",
|
|
1868
|
+
name: "右对齐"
|
|
1869
|
+
}
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}, Mn = {
|
|
1876
|
+
title: Sn,
|
|
1877
|
+
description: kn,
|
|
1878
|
+
type: Fn,
|
|
1879
|
+
categories: In
|
|
1880
|
+
}, Se = {
|
|
1881
|
+
/**
|
|
1882
|
+
* 组件标识
|
|
1883
|
+
*/
|
|
1884
|
+
id: String,
|
|
1885
|
+
/**
|
|
1886
|
+
* 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
|
|
1887
|
+
*/
|
|
1888
|
+
buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
|
|
1889
|
+
buttonBehavior: { type: String, default: "Popup" },
|
|
1890
|
+
/**
|
|
1891
|
+
* 启用输入框自动完成功能
|
|
1892
|
+
*/
|
|
1893
|
+
autoComplete: { type: Boolean, default: !1 },
|
|
1894
|
+
/**
|
|
1895
|
+
* 组件自定义样式
|
|
1896
|
+
*/
|
|
1897
|
+
customClass: { type: String, default: "" },
|
|
1898
|
+
/**
|
|
1899
|
+
* 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
|
|
1900
|
+
*/
|
|
1901
|
+
disable: { type: Boolean, default: !1 },
|
|
1902
|
+
/**
|
|
1903
|
+
* 允许在输入框中录入文本。
|
|
1904
|
+
*/
|
|
1905
|
+
editable: { type: Boolean, default: !0 },
|
|
1906
|
+
/**
|
|
1907
|
+
* 显示清空文本按钮
|
|
1908
|
+
*/
|
|
1909
|
+
enableClear: { type: Boolean, default: !1 },
|
|
1910
|
+
/**
|
|
1911
|
+
* 组件值
|
|
1912
|
+
*/
|
|
1913
|
+
modelValue: { type: String, default: "" },
|
|
1914
|
+
/**
|
|
1915
|
+
* 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
|
|
1916
|
+
*/
|
|
1917
|
+
readonly: { type: Boolean, default: !1 },
|
|
1918
|
+
/**
|
|
1919
|
+
* 禁用组件时,是否显示扩展按钮
|
|
1920
|
+
*/
|
|
1921
|
+
showButtonWhenDisabled: { type: Boolean, default: !1 },
|
|
1922
|
+
/**
|
|
1923
|
+
* 显示输入框的标签
|
|
1924
|
+
*/
|
|
1925
|
+
enableTitle: { type: Boolean, default: !1 },
|
|
1926
|
+
/**
|
|
1927
|
+
* 输入框类型
|
|
1928
|
+
*/
|
|
1929
|
+
inputType: { type: String, default: "text" },
|
|
1930
|
+
/**
|
|
1931
|
+
* 显示输入框提示信息
|
|
1932
|
+
*/
|
|
1933
|
+
forcePlaceholder: { type: Boolean, default: !1 },
|
|
1934
|
+
/**
|
|
1935
|
+
* 输入框提示文本
|
|
1936
|
+
*/
|
|
1937
|
+
placeholder: { type: String, default: "" },
|
|
1938
|
+
/**
|
|
1939
|
+
* 输入框最小长度
|
|
1940
|
+
*/
|
|
1941
|
+
minLength: Number,
|
|
1942
|
+
/**
|
|
1943
|
+
* 输入框最大长度
|
|
1944
|
+
*/
|
|
1945
|
+
maxLength: Number,
|
|
1946
|
+
/**
|
|
1947
|
+
* 输入框Tab键索引
|
|
1948
|
+
*/
|
|
1949
|
+
tabIndex: Number,
|
|
1950
|
+
popupHost: { type: Object },
|
|
1951
|
+
popupRightBoundary: { type: Object },
|
|
1952
|
+
popupOffsetX: { type: Object },
|
|
1953
|
+
popupOnInput: { type: Boolean, default: !1 },
|
|
1954
|
+
popupOnFocus: { type: Boolean, default: !1 },
|
|
1955
|
+
popupMinWidth: { type: Number, default: 160 },
|
|
1956
|
+
modalOptions: { type: Object, default: {} },
|
|
1957
|
+
wrapText: { type: Boolean, default: !1 },
|
|
1958
|
+
/**
|
|
1959
|
+
* 可选,是否支持多选
|
|
1960
|
+
* 默认`false`
|
|
1961
|
+
*/
|
|
1962
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1963
|
+
/**
|
|
1964
|
+
* 可选,分隔符
|
|
1965
|
+
* 默认`,`
|
|
1966
|
+
*/
|
|
1967
|
+
separator: { type: String, default: "," },
|
|
1968
|
+
/** 对齐方式 */
|
|
1969
|
+
textAlign: { type: String, default: "left" },
|
|
1970
|
+
/**
|
|
1971
|
+
* 废弃
|
|
1972
|
+
*/
|
|
1973
|
+
beforeClickButton: { type: Function, default: null },
|
|
1974
|
+
/**
|
|
1975
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
1976
|
+
*/
|
|
1977
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
1978
|
+
/**
|
|
1979
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
1980
|
+
*/
|
|
1981
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
1982
|
+
/**
|
|
1983
|
+
* 打开前
|
|
1984
|
+
*/
|
|
1985
|
+
beforeOpen: { type: Function, default: null },
|
|
1986
|
+
/** 更新方式 blur | change */
|
|
1987
|
+
updateOn: { type: String, default: "change" }
|
|
1988
|
+
};
|
|
1989
|
+
z(Se, wn, pn, fn, Mn);
|
|
1990
|
+
const jn = {
|
|
1991
|
+
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1992
|
+
host: { type: Object },
|
|
1993
|
+
backgroundColor: { type: String, default: "" }
|
|
1994
|
+
}, Bn = /* @__PURE__ */ R({
|
|
1995
|
+
name: "FOverlay",
|
|
1996
|
+
props: jn,
|
|
1997
|
+
emits: ["click"],
|
|
1998
|
+
setup(e, t) {
|
|
1999
|
+
const n = v(e.popupContentPosition), o = v(e.host), a = V(() => ({
|
|
2000
|
+
backgroundColor: e.backgroundColor || "",
|
|
2001
|
+
pointerEvents: "auto"
|
|
2002
|
+
}));
|
|
2003
|
+
function r(f) {
|
|
2004
|
+
t.emit("click"), f.preventDefault(), f.stopPropagation();
|
|
2005
|
+
}
|
|
2006
|
+
V(() => {
|
|
2007
|
+
const f = o.value;
|
|
2008
|
+
if (f) {
|
|
2009
|
+
const c = f.getBoundingClientRect(), {
|
|
2010
|
+
left: l,
|
|
2011
|
+
top: g,
|
|
2012
|
+
height: i
|
|
2013
|
+
} = c;
|
|
2014
|
+
return {
|
|
2015
|
+
left: l,
|
|
2016
|
+
top: g + i
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
return n.value;
|
|
2020
|
+
});
|
|
2021
|
+
const s = V(() => ({
|
|
2022
|
+
// position: 'relative',
|
|
2023
|
+
// left: `${position.value.left}px`,
|
|
2024
|
+
// top: `${position.value.top}px`
|
|
2025
|
+
}));
|
|
2026
|
+
return () => h(De, {
|
|
2027
|
+
to: "body"
|
|
2028
|
+
}, {
|
|
2029
|
+
default: () => {
|
|
2030
|
+
var f, c;
|
|
2031
|
+
return [h("div", {
|
|
2032
|
+
class: "overlay-container",
|
|
2033
|
+
onClick: (l) => r(l),
|
|
2034
|
+
style: a.value
|
|
2035
|
+
}, [h("div", {
|
|
2036
|
+
style: s.value
|
|
2037
|
+
}, [(c = (f = t.slots).default) == null ? void 0 : c.call(f)])])];
|
|
2038
|
+
}
|
|
1396
2039
|
});
|
|
1397
|
-
|
|
1398
|
-
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
function Tn(e) {
|
|
2043
|
+
if (e.content && e.content.render)
|
|
2044
|
+
return e.content.render;
|
|
2045
|
+
if (e.render && typeof e.render == "function")
|
|
2046
|
+
return e.render;
|
|
2047
|
+
}
|
|
2048
|
+
function On(e) {
|
|
2049
|
+
const t = document.createElement("div");
|
|
2050
|
+
t.style.display = "contents";
|
|
2051
|
+
let n;
|
|
2052
|
+
const o = e.onClickCallback || (() => {
|
|
2053
|
+
}), a = () => {
|
|
2054
|
+
o(), n && n.unmount();
|
|
2055
|
+
};
|
|
2056
|
+
return n = Le({
|
|
2057
|
+
setup() {
|
|
2058
|
+
Ee(() => {
|
|
2059
|
+
document.body.removeChild(t);
|
|
2060
|
+
});
|
|
2061
|
+
const r = Tn(e);
|
|
2062
|
+
return () => h(Bn, {
|
|
2063
|
+
"popup-content-position": e.popupPosition,
|
|
2064
|
+
host: e.host,
|
|
2065
|
+
onClick: a,
|
|
2066
|
+
backgroundColor: e.backgroundColor
|
|
2067
|
+
}, {
|
|
2068
|
+
default: () => [r && r()]
|
|
2069
|
+
});
|
|
1399
2070
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
2071
|
+
}), document.body.appendChild(t), n.mount(t), n;
|
|
2072
|
+
}
|
|
2073
|
+
class Pn {
|
|
2074
|
+
static show(t) {
|
|
2075
|
+
return On(t);
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
const Vn = Symbol("FModalService");
|
|
2079
|
+
function ke(e, t) {
|
|
2080
|
+
function n() {
|
|
2081
|
+
const o = e.beforeOpen || e.beforeClickButton || null;
|
|
2082
|
+
let a = Promise.resolve(!0);
|
|
2083
|
+
if (o) {
|
|
2084
|
+
const r = o(t.value);
|
|
2085
|
+
if (typeof r > "u")
|
|
2086
|
+
return a;
|
|
2087
|
+
typeof r == "boolean" ? a = Promise.resolve(r) : a = r;
|
|
1405
2088
|
}
|
|
1406
|
-
return
|
|
1407
|
-
b.value = g.split(l.value);
|
|
1408
|
-
}), () => v("div", {
|
|
1409
|
-
class: "f-combo-list-container pl-3",
|
|
1410
|
-
style: h.value
|
|
1411
|
-
}, [v(Ue, {
|
|
1412
|
-
ref: n,
|
|
1413
|
-
size: "small",
|
|
1414
|
-
itemClass: "f-combo-list-item",
|
|
1415
|
-
header: y.value,
|
|
1416
|
-
headerClass: "f-combo-list-search-box",
|
|
1417
|
-
data: o.value,
|
|
1418
|
-
idField: e.idField,
|
|
1419
|
-
textField: e.textField,
|
|
1420
|
-
titleField: e.titleField,
|
|
1421
|
-
multiSelect: e.multiSelect,
|
|
1422
|
-
selection: {
|
|
1423
|
-
enableSelectRow: !0,
|
|
1424
|
-
multiSelect: !0,
|
|
1425
|
-
multiSelectMode: "OnCheckAndClick",
|
|
1426
|
-
showCheckbox: !0,
|
|
1427
|
-
showSelectAll: !1,
|
|
1428
|
-
showSelection: !0
|
|
1429
|
-
},
|
|
1430
|
-
enableHighlightSearch: e.enableHighlightSearch,
|
|
1431
|
-
selectionValues: b.value,
|
|
1432
|
-
onSelectionChange: i,
|
|
1433
|
-
onAfterSearch: r
|
|
1434
|
-
}, null)]);
|
|
2089
|
+
return a;
|
|
1435
2090
|
}
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
2091
|
+
return { judgeCanOpen: n };
|
|
2092
|
+
}
|
|
2093
|
+
function An(e, t, n, o, a) {
|
|
2094
|
+
const r = v(e.buttonBehavior), s = v(e.popupOnInput), f = V(() => ({
|
|
2095
|
+
"input-group-append": !0,
|
|
2096
|
+
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
2097
|
+
})), { judgeCanOpen: c } = ke(e, a), l = V(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), g = q(Vn, null), i = v();
|
|
2098
|
+
async function d(m) {
|
|
2099
|
+
if (await c() && l.value) {
|
|
2100
|
+
const p = !!t.slots.default;
|
|
2101
|
+
if (r.value === "Modal") {
|
|
2102
|
+
const y = e.modalOptions, S = g == null ? void 0 : g.open({
|
|
2103
|
+
...y,
|
|
2104
|
+
render: () => t.slots.default && t.slots.default()
|
|
2105
|
+
});
|
|
2106
|
+
i.value = S == null ? void 0 : S.modalRef;
|
|
2107
|
+
}
|
|
2108
|
+
r.value === "Overlay" && Pn.show({
|
|
2109
|
+
// host: buttonEditRef.value,
|
|
2110
|
+
host: document.body,
|
|
2111
|
+
backgroundColor: "rgba(0,0,0,.15)",
|
|
2112
|
+
render: () => t.slots.default && t.slots.default()
|
|
2113
|
+
}), p && r.value === "Popup" && o.togglePopup(!0), p && s.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
|
|
2114
|
+
}
|
|
1442
2115
|
}
|
|
1443
|
-
function
|
|
1444
|
-
|
|
1445
|
-
t.value = c.value ? r || i : r;
|
|
2116
|
+
function C(m) {
|
|
2117
|
+
t.emit("mouseEnterIcon", m);
|
|
1446
2118
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1449
|
-
return o.value.filter((a) => g.has(a[e.textField]));
|
|
1450
|
-
}
|
|
1451
|
-
function b(i) {
|
|
1452
|
-
const r = {};
|
|
1453
|
-
return r[e.idField] = i, r[e.textField] = i, [r];
|
|
1454
|
-
}
|
|
1455
|
-
function y(i) {
|
|
1456
|
-
let r = f(i);
|
|
1457
|
-
const g = r && r.length > 0;
|
|
1458
|
-
return c.value && !g && (r = b(i)), r;
|
|
1459
|
-
}
|
|
1460
|
-
function h() {
|
|
1461
|
-
const { url: i, method: r = "GET", headers: g = {}, body: a = null } = e.remote, m = r.toLowerCase() == "get" ? { method: r, headers: g } : { method: r, headers: g, body: a };
|
|
1462
|
-
let s = !1;
|
|
1463
|
-
fetch(i, m).then((d) => {
|
|
1464
|
-
var F, D;
|
|
1465
|
-
if (d.status === 200)
|
|
1466
|
-
return s = !!((D = (F = d.headers) == null ? void 0 : F.get("content-type")) != null && D.includes("application/json")), s ? d.text() : d.json();
|
|
1467
|
-
throw new Error(d.statusText);
|
|
1468
|
-
}).then((d) => {
|
|
1469
|
-
o.value = s ? JSON.parse(d) : d;
|
|
1470
|
-
}).catch((d) => {
|
|
1471
|
-
console.error(d);
|
|
1472
|
-
});
|
|
2119
|
+
function u(m) {
|
|
2120
|
+
t.emit("mouseLeaveIcon", m);
|
|
1473
2121
|
}
|
|
1474
|
-
return
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
}), N(() => e.modelValue, (i) => {
|
|
1482
|
-
n.value = i, u(i);
|
|
1483
|
-
}), u(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText: f, getItemsByValue: l, getSelectedItemsByDisplayText: y };
|
|
2122
|
+
return {
|
|
2123
|
+
buttonGroupClass: f,
|
|
2124
|
+
onClickButton: d,
|
|
2125
|
+
onMouseEnterButton: C,
|
|
2126
|
+
onMouseLeaveButton: u,
|
|
2127
|
+
modalRef: i
|
|
2128
|
+
};
|
|
1484
2129
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
} = Yt(e), r = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1497
|
-
function a() {
|
|
1498
|
-
!r.value && n.value && n.value.hidePopup();
|
|
1499
|
-
}
|
|
1500
|
-
function m(S) {
|
|
1501
|
-
b.value = S.map((w) => w[e.textField]).join(e.separator), S.length === 1 ? h.value = S[0][e.valueField] : h.value = S.map((w) => w[e.valueField]).join(e.separator), t.emit("update:modelValue", h.value), t.emit("change", S, h.value), a();
|
|
1502
|
-
}
|
|
1503
|
-
function s() {
|
|
1504
|
-
u.value || n.value.togglePopup();
|
|
1505
|
-
}
|
|
1506
|
-
function d(S) {
|
|
1507
|
-
h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1508
|
-
}
|
|
1509
|
-
function k(S) {
|
|
1510
|
-
const w = i(S);
|
|
1511
|
-
m(w);
|
|
1512
|
-
}
|
|
1513
|
-
function F() {
|
|
1514
|
-
return b.value;
|
|
2130
|
+
function Dn(e, t, n, o) {
|
|
2131
|
+
const a = v(), r = v(!1), { judgeCanOpen: s } = ke(e, o);
|
|
2132
|
+
function f() {
|
|
2133
|
+
const i = a.value;
|
|
2134
|
+
i && i.show(n.value);
|
|
2135
|
+
}
|
|
2136
|
+
async function c(i = !1) {
|
|
2137
|
+
if (!!t.slots.default) {
|
|
2138
|
+
if (!i && !r.value && !await s())
|
|
2139
|
+
return;
|
|
2140
|
+
r.value = !r.value, await Z(), f();
|
|
1515
2141
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
2142
|
+
}
|
|
2143
|
+
async function l(i = !1) {
|
|
2144
|
+
if (!!t.slots.default) {
|
|
2145
|
+
if (!i && !await s())
|
|
2146
|
+
return;
|
|
2147
|
+
r.value = !0, await Z(), f();
|
|
1518
2148
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
2149
|
+
}
|
|
2150
|
+
function g() {
|
|
2151
|
+
r.value = !1;
|
|
2152
|
+
}
|
|
2153
|
+
return { hidePopup: g, popup: l, shouldPopupContent: r, togglePopup: c, popoverRef: a };
|
|
2154
|
+
}
|
|
2155
|
+
function Ln(e, t, n) {
|
|
2156
|
+
const {
|
|
2157
|
+
buttonGroupClass: o
|
|
2158
|
+
} = n, a = v();
|
|
2159
|
+
return {
|
|
2160
|
+
renderButtonGroup: () => h("div", {
|
|
2161
|
+
id: `${e.id}-button-group`,
|
|
2162
|
+
class: o.value
|
|
2163
|
+
}, [t.slots.buttonContent ? h("span", {
|
|
2164
|
+
class: "input-group-text input-group-append-button"
|
|
2165
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
|
|
2166
|
+
class: "input-group-text input-group-append-button",
|
|
2167
|
+
innerHTML: e.buttonContent,
|
|
2168
|
+
ref: a
|
|
2169
|
+
}, null) : null]),
|
|
2170
|
+
buttonHandleElement: a
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
const En = /* @__PURE__ */ R({
|
|
2174
|
+
name: "FButtonEdit",
|
|
2175
|
+
props: Se,
|
|
2176
|
+
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
2177
|
+
setup(e, t) {
|
|
2178
|
+
const n = v(), o = q("design-item-context"), a = me(n, o), r = v(e.customClass), s = v(e.modelValue), f = Dn(e, t, n, s), c = An(e, t, n, f, s), l = v(), g = V(() => ({
|
|
2179
|
+
"f-cmp-inputgroup": !0,
|
|
2180
|
+
"input-group": !0,
|
|
2181
|
+
"f-state-disable": !0,
|
|
2182
|
+
"f-state-editable": !1,
|
|
2183
|
+
"f-state-readonly": !0
|
|
2184
|
+
}));
|
|
2185
|
+
ee(() => {
|
|
2186
|
+
n.value.componentInstance = a;
|
|
2187
|
+
}), t.expose(a.value);
|
|
2188
|
+
const i = V(() => {
|
|
2189
|
+
const C = {
|
|
2190
|
+
"f-button-edit": !0,
|
|
2191
|
+
"f-cmp-inputgroup": !0,
|
|
2192
|
+
"f-button-edit-nowrap": !e.wrapText
|
|
2193
|
+
};
|
|
2194
|
+
return r.value && r.value.split(" ").reduce((u, m) => (u[m] = !0, u), C), C;
|
|
2195
|
+
}), {
|
|
2196
|
+
renderButtonGroup: d
|
|
2197
|
+
} = Ln(e, t, c);
|
|
2198
|
+
return () => h("div", $e(t.attrs, {
|
|
1524
2199
|
ref: n,
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
enableTitle: e.enableTitle,
|
|
1536
|
-
multiSelect: e.multiSelect,
|
|
1537
|
-
inputType: e.multiSelect ? e.viewType : "text",
|
|
1538
|
-
modelValue: b.value,
|
|
1539
|
-
"onUpdate:modelValue": (S) => b.value = S,
|
|
1540
|
-
focusOnCreated: e.focusOnCreated,
|
|
1541
|
-
selectOnCreated: e.selectOnCreated,
|
|
1542
|
-
onClear: d,
|
|
1543
|
-
onClick: s,
|
|
1544
|
-
onChange: k,
|
|
1545
|
-
onInput: D,
|
|
1546
|
-
beforeOpen: e.beforeOpen
|
|
1547
|
-
}, {
|
|
1548
|
-
default: () => [v(Qt, {
|
|
1549
|
-
idField: e.idField,
|
|
1550
|
-
valueField: e.valueField,
|
|
1551
|
-
textField: e.textField,
|
|
1552
|
-
titleField: e.titleField,
|
|
1553
|
-
dataSource: f.value,
|
|
1554
|
-
selectedValues: h.value,
|
|
1555
|
-
multiSelect: e.multiSelect,
|
|
1556
|
-
enableSearch: l.value,
|
|
1557
|
-
maxHeight: e.maxHeight,
|
|
1558
|
-
enableHighlightSearch: e.enableHighlightSearch,
|
|
1559
|
-
width: e.fitEditor ? g.value : void 0,
|
|
1560
|
-
onSelectionChange: m
|
|
1561
|
-
}, null)]
|
|
1562
|
-
});
|
|
2200
|
+
class: i.value,
|
|
2201
|
+
id: e.id
|
|
2202
|
+
}), [h("div", {
|
|
2203
|
+
class: g.value
|
|
2204
|
+
}, [h("input", {
|
|
2205
|
+
ref: l,
|
|
2206
|
+
class: "form-control",
|
|
2207
|
+
readonly: !0,
|
|
2208
|
+
placeholder: e.placeholder
|
|
2209
|
+
}, null), d()])]);
|
|
1563
2210
|
}
|
|
1564
2211
|
});
|
|
1565
|
-
function
|
|
2212
|
+
function $n(e, t) {
|
|
1566
2213
|
e.schema;
|
|
1567
|
-
const n =
|
|
1568
|
-
function
|
|
2214
|
+
const n = v(!0), o = v(!0);
|
|
2215
|
+
function a(i) {
|
|
1569
2216
|
return !1;
|
|
1570
2217
|
}
|
|
1571
|
-
function
|
|
2218
|
+
function r() {
|
|
1572
2219
|
return !1;
|
|
1573
2220
|
}
|
|
1574
|
-
function
|
|
2221
|
+
function s() {
|
|
1575
2222
|
return !1;
|
|
1576
2223
|
}
|
|
1577
2224
|
function f() {
|
|
1578
2225
|
return !0;
|
|
1579
2226
|
}
|
|
1580
|
-
function
|
|
2227
|
+
function c(i) {
|
|
1581
2228
|
}
|
|
1582
|
-
function
|
|
2229
|
+
function l() {
|
|
1583
2230
|
}
|
|
1584
|
-
function
|
|
2231
|
+
function g(i) {
|
|
1585
2232
|
return null;
|
|
1586
2233
|
}
|
|
1587
2234
|
return {
|
|
1588
|
-
canAccepts:
|
|
1589
|
-
checkCanDeleteComponent:
|
|
1590
|
-
checkCanMoveComponent:
|
|
2235
|
+
canAccepts: a,
|
|
2236
|
+
checkCanDeleteComponent: r,
|
|
2237
|
+
checkCanMoveComponent: s,
|
|
1591
2238
|
hideNestedPaddingInDesginerView: f,
|
|
1592
|
-
onAcceptMovedChildElement:
|
|
1593
|
-
resolveComponentContext:
|
|
2239
|
+
onAcceptMovedChildElement: c,
|
|
2240
|
+
resolveComponentContext: l,
|
|
1594
2241
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1595
2242
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1596
|
-
getPropsConfig:
|
|
2243
|
+
getPropsConfig: g
|
|
1597
2244
|
};
|
|
1598
2245
|
}
|
|
1599
|
-
class
|
|
2246
|
+
class xn {
|
|
1600
2247
|
constructor(t, n) {
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
2248
|
+
x(this, "componentId");
|
|
2249
|
+
x(this, "viewModelId");
|
|
2250
|
+
x(this, "eventsEditorUtils");
|
|
2251
|
+
x(this, "formSchemaUtils");
|
|
2252
|
+
x(this, "formMetadataConverter");
|
|
2253
|
+
x(this, "designViewModelUtils");
|
|
2254
|
+
x(this, "designViewModelField");
|
|
2255
|
+
x(this, "controlCreatorUtils");
|
|
2256
|
+
x(this, "designerHostService");
|
|
2257
|
+
x(this, "schemaService", null);
|
|
2258
|
+
x(this, "metadataService", null);
|
|
2259
|
+
x(this, "propertyConfig", {
|
|
1613
2260
|
type: "object",
|
|
1614
2261
|
categories: {}
|
|
1615
2262
|
});
|
|
@@ -1625,7 +2272,7 @@ class Kt {
|
|
|
1625
2272
|
if (n) {
|
|
1626
2273
|
if (!this.designViewModelField) {
|
|
1627
2274
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1628
|
-
this.designViewModelField = o.fields.find((
|
|
2275
|
+
this.designViewModelField = o.fields.find((a) => a.id === n);
|
|
1629
2276
|
}
|
|
1630
2277
|
t.updateOn = this.designViewModelField.updateOn;
|
|
1631
2278
|
}
|
|
@@ -1651,7 +2298,7 @@ class Kt {
|
|
|
1651
2298
|
type: "combo-list",
|
|
1652
2299
|
textField: "name",
|
|
1653
2300
|
valueField: "value",
|
|
1654
|
-
data: [{ value: t.type, name:
|
|
2301
|
+
data: [{ value: t.type, name: B[t.type].name }]
|
|
1655
2302
|
}
|
|
1656
2303
|
}
|
|
1657
2304
|
}
|
|
@@ -1677,13 +2324,26 @@ class Kt {
|
|
|
1677
2324
|
}
|
|
1678
2325
|
};
|
|
1679
2326
|
}
|
|
2327
|
+
/**
|
|
2328
|
+
*
|
|
2329
|
+
* @param propertyId
|
|
2330
|
+
* @param componentInstance
|
|
2331
|
+
* @returns
|
|
2332
|
+
*/
|
|
2333
|
+
updateElementByParentContainer(t, n) {
|
|
2334
|
+
const o = n && n.parent && n.parent.schema;
|
|
2335
|
+
if (!o)
|
|
2336
|
+
return;
|
|
2337
|
+
const a = o.contents.findIndex((s) => s.id === t), r = fe(o.contents[a]);
|
|
2338
|
+
o.contents.splice(a, 1), o.contents.splice(a, 0, r);
|
|
2339
|
+
}
|
|
1680
2340
|
}
|
|
1681
|
-
const
|
|
2341
|
+
const U = class U {
|
|
1682
2342
|
/**
|
|
1683
2343
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1684
2344
|
*/
|
|
1685
2345
|
static getEditorTypesByMDataType(t) {
|
|
1686
|
-
const n =
|
|
2346
|
+
const n = U.fieldControlTypeMapping[t];
|
|
1687
2347
|
return n || [{ key: "", value: "" }];
|
|
1688
2348
|
}
|
|
1689
2349
|
/**
|
|
@@ -1691,9 +2351,9 @@ const R = class R {
|
|
|
1691
2351
|
*/
|
|
1692
2352
|
static getAllInputTypes() {
|
|
1693
2353
|
const t = [];
|
|
1694
|
-
for (let n in
|
|
1695
|
-
|
|
1696
|
-
t.find((
|
|
2354
|
+
for (let n in U.fieldControlTypeMapping)
|
|
2355
|
+
U.fieldControlTypeMapping[n].forEach((o) => {
|
|
2356
|
+
t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
1697
2357
|
});
|
|
1698
2358
|
return t;
|
|
1699
2359
|
}
|
|
@@ -1701,66 +2361,68 @@ const R = class R {
|
|
|
1701
2361
|
/**
|
|
1702
2362
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1703
2363
|
*/
|
|
1704
|
-
|
|
2364
|
+
x(U, "fieldControlTypeMapping", {
|
|
1705
2365
|
String: [
|
|
1706
|
-
{ key:
|
|
1707
|
-
{ key:
|
|
1708
|
-
{ key:
|
|
1709
|
-
{ key:
|
|
1710
|
-
{ key:
|
|
1711
|
-
{ key:
|
|
1712
|
-
{ key:
|
|
2366
|
+
{ key: B["input-group"].type, value: B["input-group"].name },
|
|
2367
|
+
{ key: B.lookup.type, value: B.lookup.name },
|
|
2368
|
+
{ key: B["date-picker"].type, value: B["date-picker"].name },
|
|
2369
|
+
{ key: B["check-box"].type, value: B["check-box"].name },
|
|
2370
|
+
{ key: B["radio-group"].type, value: B["radio-group"].name },
|
|
2371
|
+
{ key: B["combo-list"].type, value: B["combo-list"].name },
|
|
2372
|
+
{ key: B.textarea.type, value: B.textarea.name }
|
|
1713
2373
|
],
|
|
1714
2374
|
Text: [
|
|
1715
|
-
{ key:
|
|
1716
|
-
{ key:
|
|
2375
|
+
{ key: B.textarea.type, value: B.textarea.name },
|
|
2376
|
+
{ key: B.lookup.type, value: B.lookup.name }
|
|
1717
2377
|
],
|
|
1718
2378
|
Decimal: [
|
|
1719
|
-
{ key:
|
|
2379
|
+
{ key: B["number-spinner"].type, value: B["number-spinner"].name }
|
|
1720
2380
|
],
|
|
1721
2381
|
Integer: [
|
|
1722
|
-
{ key:
|
|
2382
|
+
{ key: B["number-spinner"].type, value: B["number-spinner"].name }
|
|
1723
2383
|
],
|
|
1724
2384
|
Number: [
|
|
1725
|
-
{ key:
|
|
2385
|
+
{ key: B["number-spinner"].type, value: B["number-spinner"].name }
|
|
1726
2386
|
],
|
|
1727
2387
|
BigNumber: [
|
|
1728
|
-
{ key:
|
|
2388
|
+
{ key: B["number-spinner"].type, value: B["number-spinner"].name }
|
|
1729
2389
|
],
|
|
1730
2390
|
Date: [
|
|
1731
|
-
{ key:
|
|
2391
|
+
{ key: B["date-picker"].type, value: B["date-picker"].name }
|
|
1732
2392
|
],
|
|
1733
2393
|
DateTime: [
|
|
1734
|
-
{ key:
|
|
2394
|
+
{ key: B["date-picker"].type, value: B["date-picker"].name }
|
|
1735
2395
|
],
|
|
1736
2396
|
Boolean: [
|
|
1737
|
-
{ key:
|
|
1738
|
-
{ key:
|
|
2397
|
+
{ key: B.switch.type, value: B.switch.name },
|
|
2398
|
+
{ key: B["check-box"].type, value: B["check-box"].name }
|
|
1739
2399
|
],
|
|
1740
2400
|
Enum: [
|
|
1741
|
-
{ key:
|
|
1742
|
-
{ key:
|
|
2401
|
+
{ key: B["combo-list"].type, value: B["combo-list"].name },
|
|
2402
|
+
{ key: B["radio-group"].type, value: B["radio-group"].name }
|
|
1743
2403
|
],
|
|
1744
2404
|
Object: [
|
|
1745
|
-
{ key:
|
|
1746
|
-
{ key:
|
|
1747
|
-
{ key:
|
|
2405
|
+
{ key: B.lookup.type, value: B.lookup.name },
|
|
2406
|
+
{ key: B["combo-list"].type, value: B["combo-list"].name },
|
|
2407
|
+
{ key: B["radio-group"].type, value: B["radio-group"].name }
|
|
1748
2408
|
]
|
|
1749
2409
|
});
|
|
1750
|
-
let
|
|
1751
|
-
const
|
|
1752
|
-
class
|
|
1753
|
-
constructor(
|
|
1754
|
-
super(
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
2410
|
+
let W = U;
|
|
2411
|
+
const Rn = v(0);
|
|
2412
|
+
class Nn extends xn {
|
|
2413
|
+
constructor(n, o) {
|
|
2414
|
+
super(n, o);
|
|
2415
|
+
x(this, "responseLayoutEditorFunction");
|
|
2416
|
+
this.responseLayoutEditorFunction = ye(this.formSchemaUtils);
|
|
2417
|
+
}
|
|
2418
|
+
getPropertyConfig(n, o) {
|
|
2419
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, o), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
2420
|
+
}
|
|
2421
|
+
getBasicProperties(n, o) {
|
|
2422
|
+
var f;
|
|
2423
|
+
var a = this;
|
|
2424
|
+
this.setDesignViewModelField(n);
|
|
2425
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1764
2426
|
return {
|
|
1765
2427
|
description: "Basic Information",
|
|
1766
2428
|
title: "基本信息",
|
|
@@ -1772,8 +2434,8 @@ class tn extends Kt {
|
|
|
1772
2434
|
readonly: !0
|
|
1773
2435
|
},
|
|
1774
2436
|
type: {
|
|
1775
|
-
description: "
|
|
1776
|
-
title: "
|
|
2437
|
+
description: "编辑器类型",
|
|
2438
|
+
title: "编辑器类型",
|
|
1777
2439
|
type: "string",
|
|
1778
2440
|
refreshPanelAfterChanged: !0,
|
|
1779
2441
|
$converter: "/converter/change-editor.converter",
|
|
@@ -1782,7 +2444,7 @@ class tn extends Kt {
|
|
|
1782
2444
|
textField: "value",
|
|
1783
2445
|
valueField: "key",
|
|
1784
2446
|
editable: !1,
|
|
1785
|
-
data:
|
|
2447
|
+
data: a.designViewModelField ? W.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : W.getAllInputTypes()
|
|
1786
2448
|
}
|
|
1787
2449
|
},
|
|
1788
2450
|
label: {
|
|
@@ -1798,8 +2460,8 @@ class tn extends Kt {
|
|
|
1798
2460
|
type: "field-selector",
|
|
1799
2461
|
bindingType: { enable: !1 },
|
|
1800
2462
|
editorParams: {
|
|
1801
|
-
propertyData:
|
|
1802
|
-
formBasicInfo:
|
|
2463
|
+
propertyData: n,
|
|
2464
|
+
formBasicInfo: r
|
|
1803
2465
|
},
|
|
1804
2466
|
columns: [
|
|
1805
2467
|
{ field: "name", title: "字段名称" },
|
|
@@ -1807,22 +2469,27 @@ class tn extends Kt {
|
|
|
1807
2469
|
{ field: "fieldType", title: "字段类型" }
|
|
1808
2470
|
],
|
|
1809
2471
|
textField: "bindingField",
|
|
1810
|
-
data:
|
|
2472
|
+
data: s
|
|
1811
2473
|
}
|
|
1812
2474
|
}
|
|
1813
2475
|
},
|
|
1814
|
-
setPropertyRelates(
|
|
1815
|
-
if (
|
|
1816
|
-
switch (
|
|
2476
|
+
setPropertyRelates(c, l) {
|
|
2477
|
+
if (c)
|
|
2478
|
+
switch (c && c.propertyID) {
|
|
1817
2479
|
case "type": {
|
|
1818
|
-
|
|
2480
|
+
a.changeControlType(n, c, o);
|
|
2481
|
+
break;
|
|
2482
|
+
}
|
|
2483
|
+
case "label": {
|
|
2484
|
+
c.needRefreshControlTree = !0;
|
|
1819
2485
|
break;
|
|
1820
2486
|
}
|
|
1821
2487
|
}
|
|
1822
2488
|
}
|
|
1823
2489
|
};
|
|
1824
2490
|
}
|
|
1825
|
-
getAppearanceProperties(
|
|
2491
|
+
getAppearanceProperties(n, o) {
|
|
2492
|
+
var a = this;
|
|
1826
2493
|
return {
|
|
1827
2494
|
title: "样式",
|
|
1828
2495
|
description: "Appearance",
|
|
@@ -1843,61 +2510,74 @@ class tn extends Kt {
|
|
|
1843
2510
|
description: "响应式列宽",
|
|
1844
2511
|
title: "响应式列宽",
|
|
1845
2512
|
type: "boolean",
|
|
1846
|
-
visible: !
|
|
2513
|
+
visible: !0,
|
|
2514
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2515
|
+
refreshPanelAfterChanged: !0,
|
|
1847
2516
|
editor: {
|
|
1848
|
-
type: "response-layout-editor-setting"
|
|
1849
|
-
|
|
1850
|
-
|
|
2517
|
+
type: "response-layout-editor-setting",
|
|
2518
|
+
initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, a.componentId)
|
|
2519
|
+
}
|
|
1851
2520
|
}
|
|
2521
|
+
},
|
|
2522
|
+
setPropertyRelates(r, s) {
|
|
2523
|
+
if (r)
|
|
2524
|
+
switch (r && r.propertyID) {
|
|
2525
|
+
case "responseLayout":
|
|
2526
|
+
a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, a.componentId || n.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(n.id, o), delete n.responseLayout;
|
|
2527
|
+
break;
|
|
2528
|
+
case "class":
|
|
2529
|
+
a.updateUnifiedLayoutAfterControlChanged(r.propertyValue, n.id, this.componentId), a.updateElementByParentContainer(n.id, o);
|
|
2530
|
+
break;
|
|
2531
|
+
}
|
|
1852
2532
|
}
|
|
1853
2533
|
};
|
|
1854
2534
|
}
|
|
1855
|
-
getEditorProperties(
|
|
1856
|
-
return this.getComponentConfig(
|
|
2535
|
+
getEditorProperties(n) {
|
|
2536
|
+
return this.getComponentConfig(n);
|
|
1857
2537
|
}
|
|
1858
2538
|
/**
|
|
1859
2539
|
* 卡片控件:切换控件类型后事件
|
|
1860
2540
|
* @param propertyData 控件DOM属性
|
|
1861
2541
|
* @param newControlType 新控件类型
|
|
1862
2542
|
*/
|
|
1863
|
-
changeControlType(
|
|
1864
|
-
var
|
|
1865
|
-
const
|
|
1866
|
-
if (!
|
|
2543
|
+
changeControlType(n, o, a) {
|
|
2544
|
+
var g, i, d, C;
|
|
2545
|
+
const r = o.propertyValue, s = a && a.parent && a.parent.schema;
|
|
2546
|
+
if (!s)
|
|
1867
2547
|
return;
|
|
1868
|
-
const
|
|
1869
|
-
let
|
|
2548
|
+
const f = s.contents.findIndex((u) => u.id === n.id), c = s.contents[f];
|
|
2549
|
+
let l;
|
|
1870
2550
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1871
2551
|
editor: {
|
|
1872
|
-
$type:
|
|
2552
|
+
$type: r
|
|
1873
2553
|
},
|
|
1874
2554
|
name: this.designViewModelField.name,
|
|
1875
2555
|
require: this.designViewModelField.require,
|
|
1876
2556
|
readonly: this.designViewModelField.readonly
|
|
1877
|
-
}, !1),
|
|
1878
|
-
id:
|
|
1879
|
-
appearance:
|
|
1880
|
-
size:
|
|
1881
|
-
label:
|
|
1882
|
-
binding:
|
|
1883
|
-
visible:
|
|
1884
|
-
}), Object.assign(
|
|
1885
|
-
isTextArea:
|
|
1886
|
-
placeholder: (
|
|
1887
|
-
holdPlace: (
|
|
1888
|
-
readonly: (
|
|
1889
|
-
require: (
|
|
1890
|
-
}),
|
|
1891
|
-
(
|
|
1892
|
-
),
|
|
1893
|
-
}
|
|
1894
|
-
getComponentConfig(
|
|
1895
|
-
const
|
|
1896
|
-
description: "
|
|
1897
|
-
title: "
|
|
2557
|
+
}, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), l || (l = ce("form-group") || {}, l.editor = ce(r) || {}, delete l.editor.id, delete l.editor.binding, delete l.editor.appearance), Object.assign(l, {
|
|
2558
|
+
id: c.id,
|
|
2559
|
+
appearance: c.appearance,
|
|
2560
|
+
size: c.size,
|
|
2561
|
+
label: c.label,
|
|
2562
|
+
binding: c.binding,
|
|
2563
|
+
visible: c.visible
|
|
2564
|
+
}), Object.assign(l.editor, {
|
|
2565
|
+
isTextArea: l.isTextArea && c.isTextArea,
|
|
2566
|
+
placeholder: (g = c.editor) == null ? void 0 : g.placeholder,
|
|
2567
|
+
holdPlace: (i = c.editor) == null ? void 0 : i.holdPlace,
|
|
2568
|
+
readonly: (d = c.editor) == null ? void 0 : d.readonly,
|
|
2569
|
+
require: (C = c.editor) == null ? void 0 : C.require
|
|
2570
|
+
}), s.contents.splice(f, 1), s.contents.splice(f, 0, l), a.schema = Object.assign(c, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2571
|
+
(u) => u.classList.remove("dgComponentSelected")
|
|
2572
|
+
), Rn.value++;
|
|
2573
|
+
}
|
|
2574
|
+
getComponentConfig(n, o = {}, a = {}) {
|
|
2575
|
+
const r = Object.assign({
|
|
2576
|
+
description: "编辑器",
|
|
2577
|
+
title: "编辑器",
|
|
1898
2578
|
type: "input-group",
|
|
1899
2579
|
$converter: "/converter/property-editor.converter"
|
|
1900
|
-
},
|
|
2580
|
+
}, o), s = Object.assign({
|
|
1901
2581
|
readonly: {
|
|
1902
2582
|
description: "",
|
|
1903
2583
|
title: "只读",
|
|
@@ -1918,11 +2598,59 @@ class tn extends Kt {
|
|
|
1918
2598
|
title: "提示文本",
|
|
1919
2599
|
type: "string"
|
|
1920
2600
|
}
|
|
1921
|
-
},
|
|
1922
|
-
return { ...
|
|
2601
|
+
}, a);
|
|
2602
|
+
return { ...r, properties: { ...s } };
|
|
2603
|
+
}
|
|
2604
|
+
/**
|
|
2605
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
2606
|
+
* @param controlClass 控件样式
|
|
2607
|
+
* @param controlId 控件Id
|
|
2608
|
+
* @param componentId 控件所在组件id
|
|
2609
|
+
*/
|
|
2610
|
+
updateUnifiedLayoutAfterControlChanged(n, o, a) {
|
|
2611
|
+
const r = n.split(" ");
|
|
2612
|
+
let s = r.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), f = r.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), c = r.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), l = r.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
|
|
2613
|
+
s = s || "col-12", f = f || "col-md-" + s.replace("col-", ""), c = c || "col-xl-" + f.replace("col-md-", ""), l = l || "col-el-" + c.replace("col-xl-", "");
|
|
2614
|
+
const g = {
|
|
2615
|
+
id: o,
|
|
2616
|
+
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
2617
|
+
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
2618
|
+
columnInLG: parseInt(c.replace("col-xl-", ""), 10),
|
|
2619
|
+
columnInEL: parseInt(l.replace("col-el-", ""), 10)
|
|
2620
|
+
};
|
|
2621
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(a, g);
|
|
2622
|
+
}
|
|
2623
|
+
/**
|
|
2624
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
2625
|
+
* @param componentId 组件Id
|
|
2626
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
2627
|
+
*/
|
|
2628
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, o) {
|
|
2629
|
+
const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
2630
|
+
if (!a || !a.unifiedLayout)
|
|
2631
|
+
return;
|
|
2632
|
+
const r = [];
|
|
2633
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, r, 1), o) {
|
|
2634
|
+
const u = r.find((m) => m.id === o.id);
|
|
2635
|
+
Object.assign(u || {}, o);
|
|
2636
|
+
}
|
|
2637
|
+
const s = r.map((u) => u.columnInSM), f = r.map((u) => u.columnInMD), c = r.map((u) => u.columnInLG), l = r.map((u) => u.columnInEL), g = this.checkIsUniqueColumn(s) ? s[0] : null, i = this.checkIsUniqueColumn(f) ? f[0] : null, d = this.checkIsUniqueColumn(c) ? c[0] : null, C = this.checkIsUniqueColumn(l) ? l[0] : null;
|
|
2638
|
+
Object.assign(a.unifiedLayout, {
|
|
2639
|
+
uniqueColClassInSM: g,
|
|
2640
|
+
uniqueColClassInMD: i,
|
|
2641
|
+
uniqueColClassInLG: d,
|
|
2642
|
+
uniqueColClassInEL: C
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
/**
|
|
2646
|
+
* 校验宽度样式值是否一致
|
|
2647
|
+
*/
|
|
2648
|
+
checkIsUniqueColumn(n) {
|
|
2649
|
+
const o = new Set(n);
|
|
2650
|
+
return Array.from(o).length === 1;
|
|
1923
2651
|
}
|
|
1924
2652
|
}
|
|
1925
|
-
class
|
|
2653
|
+
class Un extends Nn {
|
|
1926
2654
|
constructor(t, n) {
|
|
1927
2655
|
super(t, n);
|
|
1928
2656
|
}
|
|
@@ -1946,114 +2674,107 @@ class nn extends tn {
|
|
|
1946
2674
|
});
|
|
1947
2675
|
}
|
|
1948
2676
|
}
|
|
1949
|
-
function
|
|
2677
|
+
function qn(e, t) {
|
|
1950
2678
|
const {
|
|
1951
2679
|
canAccepts: n,
|
|
1952
2680
|
checkCanDeleteComponent: o,
|
|
1953
|
-
checkCanMoveComponent:
|
|
1954
|
-
hideNestedPaddingInDesginerView:
|
|
1955
|
-
onAcceptMovedChildElement:
|
|
2681
|
+
checkCanMoveComponent: a,
|
|
2682
|
+
hideNestedPaddingInDesginerView: r,
|
|
2683
|
+
onAcceptMovedChildElement: s,
|
|
1956
2684
|
resolveComponentContext: f,
|
|
1957
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1958
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1959
|
-
} =
|
|
1960
|
-
function i(
|
|
1961
|
-
return new
|
|
2685
|
+
triggerBelongedComponentToMoveWhenMoved: c,
|
|
2686
|
+
triggerBelongedComponentToDeleteWhenDeleted: l
|
|
2687
|
+
} = $n(e), g = e.schema;
|
|
2688
|
+
function i(d, C) {
|
|
2689
|
+
return new Un(d, t).getPropertyConfig(g, C);
|
|
1962
2690
|
}
|
|
1963
2691
|
return {
|
|
1964
2692
|
canAccepts: n,
|
|
1965
2693
|
checkCanDeleteComponent: o,
|
|
1966
|
-
checkCanMoveComponent:
|
|
1967
|
-
hideNestedPaddingInDesginerView:
|
|
1968
|
-
onAcceptMovedChildElement:
|
|
2694
|
+
checkCanMoveComponent: a,
|
|
2695
|
+
hideNestedPaddingInDesginerView: r,
|
|
2696
|
+
onAcceptMovedChildElement: s,
|
|
1969
2697
|
resolveComponentContext: f,
|
|
1970
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1971
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2698
|
+
triggerBelongedComponentToMoveWhenMoved: c,
|
|
2699
|
+
triggerBelongedComponentToDeleteWhenDeleted: l,
|
|
1972
2700
|
getPropsConfig: i
|
|
1973
2701
|
};
|
|
1974
2702
|
}
|
|
1975
|
-
const
|
|
2703
|
+
const Hn = /* @__PURE__ */ R({
|
|
1976
2704
|
name: "FComboListDesign",
|
|
1977
|
-
props:
|
|
2705
|
+
props: re,
|
|
1978
2706
|
emits: ["clear", "update:modelValue", "change"],
|
|
1979
2707
|
setup(e, t) {
|
|
1980
|
-
const n =
|
|
1981
|
-
return
|
|
1982
|
-
n.value.componentInstance =
|
|
1983
|
-
}), t.expose(
|
|
2708
|
+
const n = v(), o = q("designer-host-service"), a = q("design-item-context"), r = qn(a, o), s = me(n, a, r);
|
|
2709
|
+
return ee(() => {
|
|
2710
|
+
n.value.componentInstance = s;
|
|
2711
|
+
}), t.expose(s.value), () => h(En, {
|
|
1984
2712
|
ref: n,
|
|
1985
|
-
id: e.id,
|
|
1986
|
-
disable: e.disabled,
|
|
1987
|
-
readonly: e.readonly,
|
|
1988
|
-
forcePlaceholder: e.forcePlaceholder,
|
|
1989
|
-
editable: !1,
|
|
1990
2713
|
buttonContent: e.dropDownIcon,
|
|
2714
|
+
readonly: !0,
|
|
2715
|
+
editable: !1,
|
|
2716
|
+
forcePlaceholder: !0,
|
|
1991
2717
|
placeholder: e.placeholder,
|
|
1992
|
-
enableClear: !
|
|
1993
|
-
maxLength: e.maxLength,
|
|
1994
|
-
tabIndex: e.tabIndex,
|
|
1995
|
-
enableTitle: e.enableTitle,
|
|
1996
|
-
multiSelect: e.multiSelect,
|
|
1997
|
-
inputType: e.multiSelect ? "tag" : "text"
|
|
2718
|
+
enableClear: !0
|
|
1998
2719
|
}, null);
|
|
1999
2720
|
}
|
|
2000
|
-
}),
|
|
2721
|
+
}), Gn = (e) => {
|
|
2001
2722
|
const t = e;
|
|
2002
2723
|
return t.install = function(n) {
|
|
2003
2724
|
n.component(t.name, e);
|
|
2004
2725
|
}, e;
|
|
2005
2726
|
};
|
|
2006
2727
|
G.register = (e, t, n, o) => {
|
|
2007
|
-
e["combo-list"] = G, t["combo-list"] =
|
|
2728
|
+
e["combo-list"] = G, t["combo-list"] = we;
|
|
2008
2729
|
};
|
|
2009
2730
|
G.registerDesigner = (e, t, n) => {
|
|
2010
|
-
e["combo-list"] =
|
|
2731
|
+
e["combo-list"] = Hn, t["combo-list"] = we;
|
|
2011
2732
|
};
|
|
2012
|
-
const
|
|
2733
|
+
const _ = Gn(G), Q = /* @__PURE__ */ R({
|
|
2013
2734
|
name: "FOrder",
|
|
2014
|
-
props:
|
|
2735
|
+
props: ae,
|
|
2015
2736
|
emits: ["change"],
|
|
2016
2737
|
setup(e, t) {
|
|
2017
|
-
const n =
|
|
2738
|
+
const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
|
|
2018
2739
|
id: "asc",
|
|
2019
2740
|
name: "升序"
|
|
2020
2741
|
}, {
|
|
2021
2742
|
id: "desc",
|
|
2022
2743
|
name: "降序"
|
|
2023
|
-
}], f =
|
|
2024
|
-
function
|
|
2025
|
-
const
|
|
2026
|
-
f.value = new Map(
|
|
2744
|
+
}], f = v(/* @__PURE__ */ new Map());
|
|
2745
|
+
function c() {
|
|
2746
|
+
const p = n.value.map((y) => [y.id, !0]);
|
|
2747
|
+
f.value = new Map(p);
|
|
2027
2748
|
}
|
|
2028
|
-
|
|
2029
|
-
const
|
|
2749
|
+
c();
|
|
2750
|
+
const l = V(() => e.dataSource.map((p) => (p.disabled = f.value.has(p.id), p))), g = V(() => ({
|
|
2030
2751
|
"f-order": !0
|
|
2031
2752
|
}));
|
|
2032
|
-
function i(
|
|
2033
|
-
n.value = n.value.filter((
|
|
2753
|
+
function i(p) {
|
|
2754
|
+
n.value = n.value.filter((y) => y.id !== p.id), c(), t.emit("change", n.value);
|
|
2034
2755
|
}
|
|
2035
|
-
function
|
|
2756
|
+
function d() {
|
|
2036
2757
|
n.value = [...n.value, {
|
|
2037
2758
|
id: Date.now().toString(),
|
|
2038
2759
|
name: "",
|
|
2039
2760
|
order: "asc"
|
|
2040
|
-
}],
|
|
2761
|
+
}], c(), t.emit("change", n.value);
|
|
2041
2762
|
}
|
|
2042
|
-
function
|
|
2043
|
-
if (
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2763
|
+
function C(p) {
|
|
2764
|
+
if (p && p.length === 1) {
|
|
2765
|
+
const y = p[0], S = n.value.find((k) => k.id === y.id);
|
|
2766
|
+
S && (S.name = y.name);
|
|
2046
2767
|
}
|
|
2047
|
-
|
|
2768
|
+
c(), t.emit("change", n.value);
|
|
2048
2769
|
}
|
|
2049
|
-
function
|
|
2050
|
-
if (
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2770
|
+
function u(p) {
|
|
2771
|
+
if (p && p.length) {
|
|
2772
|
+
const y = /* @__PURE__ */ new Map();
|
|
2773
|
+
p.reduce((S, k) => (S.set(k.id, k), S), y), n.value = p.map((S) => y.get(S.id)), t.emit("change", n.value);
|
|
2053
2774
|
}
|
|
2054
2775
|
}
|
|
2055
2776
|
function m() {
|
|
2056
|
-
return
|
|
2777
|
+
return h(ve, {
|
|
2057
2778
|
style: "flex:1",
|
|
2058
2779
|
data: n.value,
|
|
2059
2780
|
draggable: !0,
|
|
@@ -2061,157 +2782,157 @@ const q = rn(G), z = /* @__PURE__ */ H({
|
|
|
2061
2782
|
"keep-order": !0,
|
|
2062
2783
|
itemClass: "f-order-item",
|
|
2063
2784
|
onRemoveItem: i,
|
|
2064
|
-
onChange:
|
|
2785
|
+
onChange: u
|
|
2065
2786
|
}, {
|
|
2066
|
-
header: () =>
|
|
2787
|
+
header: () => h("div", {
|
|
2067
2788
|
class: "f-order-header"
|
|
2068
|
-
}, [
|
|
2789
|
+
}, [h("span", {
|
|
2069
2790
|
class: "f-order-header-order-field"
|
|
2070
|
-
}, [o.value]),
|
|
2791
|
+
}, [o.value]), h("span", {
|
|
2071
2792
|
class: "f-order-header-order-type"
|
|
2072
|
-
}, [
|
|
2073
|
-
itemContent: (
|
|
2793
|
+
}, [a.value])]),
|
|
2794
|
+
itemContent: (p) => h("div", {
|
|
2074
2795
|
class: "f-order-item-content"
|
|
2075
|
-
}, [
|
|
2796
|
+
}, [h(_, {
|
|
2076
2797
|
class: "f-order-item-content-order-field",
|
|
2077
|
-
data:
|
|
2798
|
+
data: l.value,
|
|
2078
2799
|
valueField: "id",
|
|
2079
2800
|
textField: "name",
|
|
2080
2801
|
idField: "id",
|
|
2081
|
-
modelValue:
|
|
2082
|
-
"onUpdate:modelValue": (
|
|
2083
|
-
onChange:
|
|
2084
|
-
onClear:
|
|
2085
|
-
}, null),
|
|
2802
|
+
modelValue: p.id,
|
|
2803
|
+
"onUpdate:modelValue": (y) => p.id = y,
|
|
2804
|
+
onChange: C,
|
|
2805
|
+
onClear: C
|
|
2806
|
+
}, null), h(_, {
|
|
2086
2807
|
class: "f-order-item-content-order-type",
|
|
2087
|
-
data:
|
|
2808
|
+
data: s,
|
|
2088
2809
|
valueField: "id",
|
|
2089
2810
|
textField: "name",
|
|
2090
2811
|
idField: "id",
|
|
2091
|
-
modelValue:
|
|
2092
|
-
"onUpdate:modelValue": (
|
|
2093
|
-
onChange:
|
|
2812
|
+
modelValue: p.order,
|
|
2813
|
+
"onUpdate:modelValue": (y) => p.order = y,
|
|
2814
|
+
onChange: C
|
|
2094
2815
|
}, null)]),
|
|
2095
|
-
footer: () =>
|
|
2816
|
+
footer: () => h("div", {
|
|
2096
2817
|
class: "f-order-footer"
|
|
2097
|
-
}, [
|
|
2818
|
+
}, [h(Ce, {
|
|
2098
2819
|
type: "link",
|
|
2099
2820
|
class: "f-order-add-button",
|
|
2100
|
-
onClick:
|
|
2821
|
+
onClick: d
|
|
2101
2822
|
}, {
|
|
2102
|
-
default: () =>
|
|
2823
|
+
default: () => h(K, null, [h("span", {
|
|
2103
2824
|
class: "f-order-add-icon"
|
|
2104
|
-
}, [
|
|
2825
|
+
}, [h("i", {
|
|
2105
2826
|
class: "f-icon f-icon-add"
|
|
2106
|
-
}, null)]),
|
|
2827
|
+
}, null)]), r.value])
|
|
2107
2828
|
})])
|
|
2108
2829
|
});
|
|
2109
2830
|
}
|
|
2110
|
-
return () =>
|
|
2111
|
-
class:
|
|
2831
|
+
return () => h("div", {
|
|
2832
|
+
class: g.value
|
|
2112
2833
|
}, [m()]);
|
|
2113
2834
|
}
|
|
2114
2835
|
});
|
|
2115
|
-
function
|
|
2116
|
-
var
|
|
2836
|
+
function Wn(e, t, n) {
|
|
2837
|
+
var w;
|
|
2117
2838
|
function o() {
|
|
2118
2839
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
2119
2840
|
}
|
|
2120
2841
|
o();
|
|
2121
|
-
const
|
|
2842
|
+
const a = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", s = v();
|
|
2122
2843
|
function f() {
|
|
2123
2844
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2124
2845
|
}
|
|
2125
|
-
function
|
|
2846
|
+
function c() {
|
|
2126
2847
|
return !1;
|
|
2127
2848
|
}
|
|
2128
|
-
function
|
|
2849
|
+
function l() {
|
|
2129
2850
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
2130
2851
|
}
|
|
2131
|
-
function
|
|
2852
|
+
function g() {
|
|
2132
2853
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
2133
2854
|
}
|
|
2134
|
-
function i(
|
|
2135
|
-
if (!
|
|
2855
|
+
function i(b) {
|
|
2856
|
+
if (!b || !b.value)
|
|
2136
2857
|
return null;
|
|
2137
|
-
if (
|
|
2138
|
-
return
|
|
2139
|
-
const
|
|
2140
|
-
return
|
|
2858
|
+
if (b.value.schema && b.value.schema.type === "component")
|
|
2859
|
+
return b.value;
|
|
2860
|
+
const T = v(b == null ? void 0 : b.value.parent), F = i(T);
|
|
2861
|
+
return F || null;
|
|
2141
2862
|
}
|
|
2142
|
-
function
|
|
2143
|
-
const { componentInstance:
|
|
2144
|
-
return !
|
|
2863
|
+
function d(b = t) {
|
|
2864
|
+
const { componentInstance: T, designerItemElementRef: F } = b;
|
|
2865
|
+
return !T || !T.value ? null : T.value.canMove ? F : d(b.parent);
|
|
2145
2866
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return !!n && n.canAccepts(
|
|
2867
|
+
function C(b) {
|
|
2868
|
+
return !!n && n.canAccepts(b);
|
|
2148
2869
|
}
|
|
2149
|
-
function
|
|
2870
|
+
function u() {
|
|
2150
2871
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2151
2872
|
}
|
|
2152
2873
|
function m() {
|
|
2153
2874
|
}
|
|
2154
|
-
function
|
|
2155
|
-
|
|
2875
|
+
function p(b, T) {
|
|
2876
|
+
T && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(T);
|
|
2156
2877
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const { componentType:
|
|
2159
|
-
let
|
|
2160
|
-
n && n.onResolveNewComponentSchema && (
|
|
2161
|
-
const
|
|
2162
|
-
return
|
|
2878
|
+
function y(b, T) {
|
|
2879
|
+
const { componentType: F } = b;
|
|
2880
|
+
let I = H(F, b, T);
|
|
2881
|
+
n && n.onResolveNewComponentSchema && (I = n.onResolveNewComponentSchema(b, I));
|
|
2882
|
+
const O = F.toLowerCase().replace("-", "_");
|
|
2883
|
+
return I && !I.id && I.type === F && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
|
|
2163
2884
|
}
|
|
2164
|
-
function
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2167
|
-
let
|
|
2168
|
-
n && n.onAcceptNewChildElement && (
|
|
2169
|
-
const
|
|
2170
|
-
return
|
|
2885
|
+
function S(b, T) {
|
|
2886
|
+
const F = String(b.getAttribute("data-controltype")), I = b.getAttribute("data-feature"), O = I ? JSON.parse(I) : {};
|
|
2887
|
+
O.parentComponentInstance = s.value;
|
|
2888
|
+
let M = H(F, O);
|
|
2889
|
+
n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(b, T, M));
|
|
2890
|
+
const D = F.toLowerCase().replace("-", "_");
|
|
2891
|
+
return M && !M.id && M.type === F && (M.id = `${D}_${Math.random().toString().slice(2, 6)}`), M;
|
|
2171
2892
|
}
|
|
2172
|
-
function
|
|
2893
|
+
function k(b) {
|
|
2173
2894
|
}
|
|
2174
|
-
function
|
|
2895
|
+
function j(...b) {
|
|
2175
2896
|
if (n && n.getPropsConfig)
|
|
2176
|
-
return n.getPropsConfig(...
|
|
2897
|
+
return n.getPropsConfig(...b);
|
|
2177
2898
|
}
|
|
2178
|
-
return
|
|
2899
|
+
return s.value = {
|
|
2179
2900
|
canMove: f(),
|
|
2180
|
-
canSelectParent:
|
|
2181
|
-
canDelete:
|
|
2182
|
-
canNested: !
|
|
2901
|
+
canSelectParent: c(),
|
|
2902
|
+
canDelete: l(),
|
|
2903
|
+
canNested: !g(),
|
|
2183
2904
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2184
2905
|
elementRef: e,
|
|
2185
|
-
parent: (
|
|
2906
|
+
parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
|
|
2186
2907
|
schema: t == null ? void 0 : t.schema,
|
|
2187
|
-
styles:
|
|
2188
|
-
designerClass:
|
|
2189
|
-
canAccepts:
|
|
2908
|
+
styles: a,
|
|
2909
|
+
designerClass: r,
|
|
2910
|
+
canAccepts: C,
|
|
2190
2911
|
getBelongedComponentInstance: i,
|
|
2191
|
-
getDraggableDesignItemElement:
|
|
2192
|
-
getDraggingDisplayText:
|
|
2193
|
-
getPropConfig:
|
|
2912
|
+
getDraggableDesignItemElement: d,
|
|
2913
|
+
getDraggingDisplayText: u,
|
|
2914
|
+
getPropConfig: j,
|
|
2194
2915
|
getDragScopeElement: m,
|
|
2195
|
-
onAcceptMovedChildElement:
|
|
2196
|
-
onAcceptNewChildElement:
|
|
2197
|
-
onChildElementMovedOut:
|
|
2198
|
-
addNewChildComponentSchema:
|
|
2916
|
+
onAcceptMovedChildElement: p,
|
|
2917
|
+
onAcceptNewChildElement: S,
|
|
2918
|
+
onChildElementMovedOut: k,
|
|
2919
|
+
addNewChildComponentSchema: y,
|
|
2199
2920
|
updateDragAndDropRules: o,
|
|
2200
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
2201
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
2202
|
-
},
|
|
2921
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || v(!1),
|
|
2922
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
|
|
2923
|
+
}, s;
|
|
2203
2924
|
}
|
|
2204
|
-
function
|
|
2925
|
+
function _n() {
|
|
2205
2926
|
function e(t) {
|
|
2206
|
-
var
|
|
2927
|
+
var a, r;
|
|
2207
2928
|
if (!t)
|
|
2208
2929
|
return !1;
|
|
2209
|
-
const n = ((
|
|
2930
|
+
const n = ((a = t.targetContainer) == null ? void 0 : a.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2210
2931
|
if (!n)
|
|
2211
2932
|
return !1;
|
|
2212
|
-
const o = (
|
|
2933
|
+
const o = (r = n.schema.appearance) == null ? void 0 : r.class;
|
|
2213
2934
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2214
|
-
const
|
|
2935
|
+
const s = n.schema.type, f = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
|
|
2215
2936
|
if (n.schema.type !== "response-layout-item" && !f)
|
|
2216
2937
|
return !1;
|
|
2217
2938
|
}
|
|
@@ -2221,7 +2942,7 @@ function sn() {
|
|
|
2221
2942
|
basalDragulaRuleForContainer: e
|
|
2222
2943
|
};
|
|
2223
2944
|
}
|
|
2224
|
-
const
|
|
2945
|
+
const zn = "https://json-schema.org/draft/2020-12/schema", Xn = "https://farris-design.gitee.io/dragging-rules.schema.json", Jn = "Dragging Rules", Qn = "The rules of designer canvas", Yn = "object", Zn = {
|
|
2225
2946
|
"f-page": {
|
|
2226
2947
|
description: "The root class of page designed by farris.",
|
|
2227
2948
|
type: "object",
|
|
@@ -2640,6 +3361,80 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
|
|
|
2640
3361
|
"f-list-nav-left": {
|
|
2641
3362
|
description: "",
|
|
2642
3363
|
type: "object"
|
|
3364
|
+
},
|
|
3365
|
+
"f-struct-data-grid-in-nav": {
|
|
3366
|
+
description: "",
|
|
3367
|
+
type: "object",
|
|
3368
|
+
properties: {
|
|
3369
|
+
contents: {
|
|
3370
|
+
type: "object",
|
|
3371
|
+
properties: {
|
|
3372
|
+
"f-section-form": {
|
|
3373
|
+
description: "",
|
|
3374
|
+
type: "object",
|
|
3375
|
+
properties: {
|
|
3376
|
+
rules: {
|
|
3377
|
+
type: "object",
|
|
3378
|
+
properties: {
|
|
3379
|
+
canAccept: {
|
|
3380
|
+
type: "boolean",
|
|
3381
|
+
const: !1
|
|
3382
|
+
},
|
|
3383
|
+
fixed: {
|
|
3384
|
+
type: "boolean",
|
|
3385
|
+
const: !0
|
|
3386
|
+
},
|
|
3387
|
+
hidePadding: {
|
|
3388
|
+
type: "boolean",
|
|
3389
|
+
const: !0
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
},
|
|
3395
|
+
"f-section-grid": {
|
|
3396
|
+
description: "",
|
|
3397
|
+
type: "object",
|
|
3398
|
+
properties: {
|
|
3399
|
+
rules: {
|
|
3400
|
+
type: "object",
|
|
3401
|
+
properties: {
|
|
3402
|
+
canAccept: {
|
|
3403
|
+
type: "boolean",
|
|
3404
|
+
const: !1
|
|
3405
|
+
},
|
|
3406
|
+
fixed: {
|
|
3407
|
+
type: "boolean",
|
|
3408
|
+
const: !0
|
|
3409
|
+
},
|
|
3410
|
+
hidePadding: {
|
|
3411
|
+
type: "boolean",
|
|
3412
|
+
const: !0
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
},
|
|
3420
|
+
rules: {
|
|
3421
|
+
type: "object",
|
|
3422
|
+
properties: {
|
|
3423
|
+
canAccept: {
|
|
3424
|
+
type: "boolean",
|
|
3425
|
+
const: !1
|
|
3426
|
+
},
|
|
3427
|
+
fixed: {
|
|
3428
|
+
type: "boolean",
|
|
3429
|
+
const: !0
|
|
3430
|
+
},
|
|
3431
|
+
hidePadding: {
|
|
3432
|
+
type: "boolean",
|
|
3433
|
+
const: !0
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
2643
3438
|
}
|
|
2644
3439
|
}
|
|
2645
3440
|
}
|
|
@@ -2785,268 +3580,335 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
|
|
|
2785
3580
|
description: "",
|
|
2786
3581
|
type: "object"
|
|
2787
3582
|
}
|
|
2788
|
-
},
|
|
2789
|
-
$schema:
|
|
2790
|
-
$id:
|
|
2791
|
-
title:
|
|
2792
|
-
description:
|
|
2793
|
-
type:
|
|
2794
|
-
properties:
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
function
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
return Number(d[a].length) <= Number(D);
|
|
3583
|
+
}, Kn = {
|
|
3584
|
+
$schema: zn,
|
|
3585
|
+
$id: Xn,
|
|
3586
|
+
title: Jn,
|
|
3587
|
+
description: Qn,
|
|
3588
|
+
type: Yn,
|
|
3589
|
+
properties: Zn
|
|
3590
|
+
}, Y = /* @__PURE__ */ new Map();
|
|
3591
|
+
function eo() {
|
|
3592
|
+
function e(u, m, p, y) {
|
|
3593
|
+
var S;
|
|
3594
|
+
if (typeof p == "number")
|
|
3595
|
+
return ((S = y[u]) == null ? void 0 : S.length) === p;
|
|
3596
|
+
if (typeof p == "object") {
|
|
3597
|
+
const k = Object.keys(p)[0], j = p[k];
|
|
3598
|
+
if (k === "not")
|
|
3599
|
+
return Number(y[u].length) !== Number(j);
|
|
3600
|
+
if (k === "moreThan")
|
|
3601
|
+
return Number(y[u].length) >= Number(j);
|
|
3602
|
+
if (k === "lessThan")
|
|
3603
|
+
return Number(y[u].length) <= Number(j);
|
|
2810
3604
|
}
|
|
2811
3605
|
return !1;
|
|
2812
3606
|
}
|
|
2813
|
-
function t(
|
|
2814
|
-
return typeof
|
|
3607
|
+
function t(u, m, p, y) {
|
|
3608
|
+
return typeof p == "boolean" ? y.childrenClassList.includes(m) === !!p : !1;
|
|
2815
3609
|
}
|
|
2816
|
-
function n(
|
|
2817
|
-
return typeof
|
|
3610
|
+
function n(u, m, p, y) {
|
|
3611
|
+
return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
|
|
2818
3612
|
}
|
|
2819
|
-
function o(
|
|
2820
|
-
return typeof
|
|
3613
|
+
function o(u, m, p, y) {
|
|
3614
|
+
return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
|
|
2821
3615
|
}
|
|
2822
|
-
const
|
|
3616
|
+
const a = /* @__PURE__ */ new Map([
|
|
2823
3617
|
["length", e],
|
|
2824
3618
|
["hasChildren", t],
|
|
2825
3619
|
["hasSibling", o],
|
|
2826
3620
|
["hasParent", n]
|
|
2827
3621
|
]);
|
|
2828
|
-
function
|
|
2829
|
-
const
|
|
2830
|
-
return typeof m == "number" ? [{ target:
|
|
2831
|
-
if (
|
|
2832
|
-
return { target:
|
|
2833
|
-
const
|
|
2834
|
-
return { target:
|
|
3622
|
+
function r(u, m) {
|
|
3623
|
+
const p = u;
|
|
3624
|
+
return typeof m == "number" ? [{ target: p, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((y) => {
|
|
3625
|
+
if (y === "length")
|
|
3626
|
+
return { target: p, operator: "length", param: null, value: m[y] };
|
|
3627
|
+
const S = y, k = m[y];
|
|
3628
|
+
return { target: p, operator: u === "children" ? "hasChildren" : u === "parent" ? "hasParent" : "hasSibling", param: S, value: k };
|
|
2835
3629
|
}) : [];
|
|
2836
3630
|
}
|
|
2837
|
-
function u
|
|
2838
|
-
if (
|
|
2839
|
-
const
|
|
2840
|
-
return
|
|
3631
|
+
function s(u, m) {
|
|
3632
|
+
if (a.has(u.operator)) {
|
|
3633
|
+
const p = a.get(u.operator);
|
|
3634
|
+
return p && p(u.target, u.param, u.value, m) || !1;
|
|
2841
3635
|
}
|
|
2842
3636
|
return !1;
|
|
2843
3637
|
}
|
|
2844
|
-
function f(
|
|
2845
|
-
return Object.keys(
|
|
2846
|
-
const
|
|
2847
|
-
return
|
|
2848
|
-
}, []).reduce((
|
|
3638
|
+
function f(u, m) {
|
|
3639
|
+
return Object.keys(u).reduce((k, j) => {
|
|
3640
|
+
const w = r(j, u[j]);
|
|
3641
|
+
return k.push(...w), k;
|
|
3642
|
+
}, []).reduce((k, j) => k && s(j, m), !0);
|
|
2849
3643
|
}
|
|
2850
|
-
function
|
|
2851
|
-
const
|
|
2852
|
-
return
|
|
3644
|
+
function c(u, m) {
|
|
3645
|
+
const p = Object.keys(u), y = p.includes("allOf"), S = p.includes("anyOf"), k = y || S, b = (k ? u[k ? y ? "allOf" : "anyOf" : "allOf"] : [u]).map((F) => f(F, m));
|
|
3646
|
+
return y ? !b.includes(!1) : b.includes(!0);
|
|
2853
3647
|
}
|
|
2854
|
-
function
|
|
2855
|
-
const
|
|
2856
|
-
return
|
|
3648
|
+
function l(u, m) {
|
|
3649
|
+
const p = u.const;
|
|
3650
|
+
return p ? typeof p == "boolean" ? p : typeof p == "object" ? c(p, m) : !1 : !1;
|
|
2857
3651
|
}
|
|
2858
|
-
function
|
|
3652
|
+
function g(u) {
|
|
2859
3653
|
return (m) => {
|
|
2860
|
-
const
|
|
2861
|
-
return
|
|
2862
|
-
const
|
|
2863
|
-
return
|
|
2864
|
-
},
|
|
3654
|
+
const p = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
3655
|
+
return u && u.properties && Object.keys(u.properties).reduce((y, S) => {
|
|
3656
|
+
const k = u.properties[S];
|
|
3657
|
+
return y[S] = l(k, m), y;
|
|
3658
|
+
}, p), p;
|
|
2865
3659
|
};
|
|
2866
3660
|
}
|
|
2867
|
-
function i(
|
|
3661
|
+
function i(u, m, p) {
|
|
2868
3662
|
if (m.type === "object" && m.properties) {
|
|
2869
|
-
const { rules:
|
|
2870
|
-
|
|
2871
|
-
(
|
|
3663
|
+
const { rules: y, contents: S } = m.properties;
|
|
3664
|
+
p.set(u, g(y)), S && Object.keys(S.properties).forEach(
|
|
3665
|
+
(k) => i(k, S.properties[k], p)
|
|
2872
3666
|
);
|
|
2873
3667
|
}
|
|
2874
3668
|
}
|
|
2875
|
-
function
|
|
2876
|
-
const { properties:
|
|
2877
|
-
Object.keys(
|
|
2878
|
-
i(m,
|
|
3669
|
+
function d() {
|
|
3670
|
+
const { properties: u } = Kn;
|
|
3671
|
+
Object.keys(u).forEach((m) => {
|
|
3672
|
+
i(m, u[m], Y);
|
|
2879
3673
|
});
|
|
2880
3674
|
}
|
|
2881
|
-
function
|
|
2882
|
-
const
|
|
2883
|
-
return
|
|
3675
|
+
function C(u, m) {
|
|
3676
|
+
const p = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
3677
|
+
return Y.has(u) ? Y.get(u)(m) : p;
|
|
2884
3678
|
}
|
|
2885
|
-
return
|
|
3679
|
+
return d(), { getRuleValue: C };
|
|
2886
3680
|
}
|
|
2887
|
-
function
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
3681
|
+
function to(e, t) {
|
|
3682
|
+
function n(c, l = null) {
|
|
3683
|
+
if (l) return l;
|
|
3684
|
+
const g = e.getComponentById(t);
|
|
3685
|
+
return e.selectNode(g, (i) => i.id === c);
|
|
3686
|
+
}
|
|
3687
|
+
function o(c) {
|
|
3688
|
+
const l = e.getComponentById(c);
|
|
3689
|
+
return !(!l || !l.componentType || !l.componentType.startsWith("form"));
|
|
3690
|
+
}
|
|
3691
|
+
function a(c) {
|
|
3692
|
+
const l = n(c.id), g = ye(e), i = [];
|
|
3693
|
+
g.getResonseFormLayoutConfig(l, i, 1);
|
|
3694
|
+
const d = i.map((j) => j.columnInSM), C = i.map((j) => j.columnInMD), u = i.map((j) => j.columnInLG), m = i.map((j) => j.columnInEL), p = r(d) ? d[0] : 0, y = r(C) ? C[0] : 0, S = r(u) ? u[0] : 0, k = r(m) ? m[0] : 0;
|
|
3695
|
+
return {
|
|
3696
|
+
uniqueColClassInSM: p,
|
|
3697
|
+
uniqueColClassInMD: y,
|
|
3698
|
+
uniqueColClassInLG: S,
|
|
3699
|
+
uniqueColClassInEL: k
|
|
3700
|
+
};
|
|
2893
3701
|
}
|
|
2894
|
-
function r(
|
|
2895
|
-
|
|
3702
|
+
function r(c) {
|
|
3703
|
+
const l = new Set(c);
|
|
3704
|
+
return Array.from(l).length === 1;
|
|
2896
3705
|
}
|
|
2897
|
-
function g
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
3706
|
+
function s(c, l, g) {
|
|
3707
|
+
c = n(g, c), c.contents.forEach((i) => {
|
|
3708
|
+
if (i.type === tt.fieldset.type) {
|
|
3709
|
+
s(i, l, i.id);
|
|
3710
|
+
return;
|
|
3711
|
+
}
|
|
3712
|
+
i.appearance || (i.appearance = {});
|
|
3713
|
+
const d = i.appearance.class;
|
|
3714
|
+
i.appearance.class = f(d, l);
|
|
3715
|
+
});
|
|
3716
|
+
}
|
|
3717
|
+
function f(c, l) {
|
|
3718
|
+
let g, i, d, C, u = [];
|
|
3719
|
+
if (c) {
|
|
3720
|
+
const j = c.split(" "), w = j.filter((b) => b.startsWith("col-"));
|
|
3721
|
+
g = w.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), i = w.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), d = w.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), C = w.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b)), u = j.filter((b) => !b.startsWith("col-"));
|
|
3722
|
+
}
|
|
3723
|
+
const m = l.uniqueColClassInSM ? "col-" + l.uniqueColClassInSM : g, p = l.uniqueColClassInMD ? "col-md-" + l.uniqueColClassInMD : i, y = l.uniqueColClassInLG ? "col-xl-" + l.uniqueColClassInLG : d, S = l.uniqueColClassInEL ? "col-el-" + l.uniqueColClassInEL : C;
|
|
3724
|
+
return [m, p, y, S].concat(u).join(" ");
|
|
3725
|
+
}
|
|
3726
|
+
return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: s };
|
|
3727
|
+
}
|
|
3728
|
+
class no extends et {
|
|
3729
|
+
constructor(t, n) {
|
|
3730
|
+
super(t, n);
|
|
3731
|
+
}
|
|
3732
|
+
getPropertyConfig(t, n) {
|
|
3733
|
+
var o = this;
|
|
3734
|
+
this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
|
|
3735
|
+
const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: r, changeFormControlsByUnifiedLayoutConfig: s } = to(this.formSchemaUtils, this.componentId), f = this.getAppearanceConfig(t);
|
|
3736
|
+
return f.properties.unifiedLayout = {
|
|
3737
|
+
title: "统一布局配置",
|
|
3738
|
+
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
3739
|
+
visible: a(this.componentId),
|
|
3740
|
+
refreshPanelAfterChanged: !0,
|
|
3741
|
+
editor: {
|
|
3742
|
+
type: "response-form-layout-setting",
|
|
3743
|
+
initialState: r(t)
|
|
3744
|
+
}
|
|
3745
|
+
}, f.setPropertyRelates = function(c, l) {
|
|
3746
|
+
if (c)
|
|
3747
|
+
switch (c && c.propertyID) {
|
|
3748
|
+
case "unifiedLayout": {
|
|
3749
|
+
s(null, c.propertyValue, t.id), o.updateElementByParentContainer(t.id, n);
|
|
3750
|
+
break;
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
}, this.propertyConfig.categories.appearance = f, this.propertyConfig;
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
function oo(e, t) {
|
|
3757
|
+
var F;
|
|
3758
|
+
const n = e.schema, o = (F = e.parent) == null ? void 0 : F.schema, a = eo(), r = v(!1), s = v(!1);
|
|
3759
|
+
let f = !0, c = !1, l, g = !1;
|
|
3760
|
+
function i(I) {
|
|
3761
|
+
return l && l.componentClassList && l.componentClassList.includes("f-form-layout") && l.componentClassList.includes("farris-form") ? I.sourceType === "control" && I.controlCategory === "input" || I.sourceType === "move" && I.controlType === "form-group" : !0;
|
|
3762
|
+
}
|
|
3763
|
+
function d(I) {
|
|
3764
|
+
return !(!_n().basalDragulaRuleForContainer(I) || !f || !i(I));
|
|
3765
|
+
}
|
|
3766
|
+
function C() {
|
|
3767
|
+
r.value = !1, s.value = !1;
|
|
3768
|
+
const I = n, O = I.appearance && I.appearance.class || "", M = O.split(" "), D = I.contents || [], P = D.length ? D[0] : null, L = P && P.appearance ? P.appearance.class : "", E = L ? L.split(" ") : [], A = D.length ? D.reduce((ie, J) => {
|
|
3769
|
+
const le = J && J.appearance ? J.appearance.class : "", Be = le ? le.split(" ") : [];
|
|
3770
|
+
return ie.push(...Be), ie;
|
|
3771
|
+
}, []) : [], $ = o, X = $ && $.appearance && $.appearance.class || "", Fe = X ? X.split(" ") : [];
|
|
3772
|
+
l = {
|
|
3773
|
+
componentClass: O,
|
|
3774
|
+
componentClassList: M,
|
|
3775
|
+
childContents: D,
|
|
3776
|
+
firstChildContent: P,
|
|
3777
|
+
firstChildClass: L,
|
|
3778
|
+
firstChildClassList: E,
|
|
3779
|
+
parent: $,
|
|
3780
|
+
parentClass: X,
|
|
3781
|
+
parentClassList: Fe,
|
|
3782
|
+
children: D,
|
|
3783
|
+
childrenClassList: A
|
|
2915
3784
|
};
|
|
2916
|
-
const { canAccept:
|
|
2917
|
-
return f =
|
|
3785
|
+
const { canAccept: Ie, fixed: Me, hidePadding: je } = a.getRuleValue(M[0], l);
|
|
3786
|
+
return f = Ie, c = je, g = Me, !0;
|
|
2918
3787
|
}
|
|
2919
|
-
function
|
|
2920
|
-
|
|
3788
|
+
function u(I) {
|
|
3789
|
+
Z();
|
|
2921
3790
|
}
|
|
2922
3791
|
function m() {
|
|
2923
3792
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2924
3793
|
}
|
|
2925
|
-
function
|
|
2926
|
-
const
|
|
2927
|
-
if ((
|
|
2928
|
-
const { label:
|
|
2929
|
-
return
|
|
3794
|
+
function p(I, O) {
|
|
3795
|
+
const M = n;
|
|
3796
|
+
if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3797
|
+
const { label: L } = I, E = H("form-group");
|
|
3798
|
+
return E.editor = O, E.label = L, y(E), delete E.editor.id, delete E.editor.binding, delete E.editor.appearance, delete E.editor.visible, E;
|
|
2930
3799
|
}
|
|
2931
|
-
return
|
|
2932
|
-
}
|
|
2933
|
-
function
|
|
2934
|
-
const
|
|
2935
|
-
if (
|
|
2936
|
-
const
|
|
2937
|
-
|
|
3800
|
+
return O;
|
|
3801
|
+
}
|
|
3802
|
+
function y(I) {
|
|
3803
|
+
const O = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
3804
|
+
if (O && O.schema && O.schema.componentType) {
|
|
3805
|
+
const M = O.schema.formColumns;
|
|
3806
|
+
let D = S(M);
|
|
3807
|
+
D = t.formSchemaUtils.getControlClassByFormUnifiedLayout(D, "", e.schema), I.appearance || (I.appearance = {}), I.appearance.class = D;
|
|
2938
3808
|
}
|
|
2939
3809
|
}
|
|
2940
|
-
function
|
|
2941
|
-
let
|
|
2942
|
-
switch (
|
|
2943
|
-
case
|
|
2944
|
-
|
|
2945
|
-
break;
|
|
2946
|
-
}
|
|
2947
|
-
case "form-col-12": {
|
|
2948
|
-
M = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2949
|
-
break;
|
|
2950
|
-
}
|
|
2951
|
-
case "form-col-2": {
|
|
2952
|
-
M = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2953
|
-
break;
|
|
2954
|
-
}
|
|
2955
|
-
case "form-col-3": {
|
|
2956
|
-
M = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
3810
|
+
function S(I) {
|
|
3811
|
+
let O = "";
|
|
3812
|
+
switch (I) {
|
|
3813
|
+
case 1: {
|
|
3814
|
+
O = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
2957
3815
|
break;
|
|
2958
3816
|
}
|
|
2959
|
-
case
|
|
2960
|
-
|
|
3817
|
+
case 2: {
|
|
3818
|
+
O = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
2961
3819
|
break;
|
|
2962
3820
|
}
|
|
2963
|
-
case
|
|
2964
|
-
|
|
3821
|
+
case 3: {
|
|
3822
|
+
O = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
2965
3823
|
break;
|
|
2966
3824
|
}
|
|
2967
|
-
case
|
|
2968
|
-
|
|
3825
|
+
case 4: {
|
|
3826
|
+
O = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
2969
3827
|
break;
|
|
2970
3828
|
}
|
|
2971
3829
|
}
|
|
2972
|
-
return
|
|
3830
|
+
return O;
|
|
2973
3831
|
}
|
|
2974
|
-
function
|
|
2975
|
-
const
|
|
2976
|
-
if ((
|
|
2977
|
-
const
|
|
2978
|
-
return
|
|
3832
|
+
function k(I, O, M) {
|
|
3833
|
+
const D = n;
|
|
3834
|
+
if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3835
|
+
const E = String(I.innerText), A = H("form-group");
|
|
3836
|
+
return A.editor = M, A.label = E, A;
|
|
2979
3837
|
}
|
|
2980
|
-
return
|
|
2981
|
-
}
|
|
2982
|
-
function D() {
|
|
2983
|
-
return !h;
|
|
3838
|
+
return M;
|
|
2984
3839
|
}
|
|
2985
|
-
function
|
|
2986
|
-
return !
|
|
3840
|
+
function j() {
|
|
3841
|
+
return !g;
|
|
2987
3842
|
}
|
|
2988
3843
|
function w() {
|
|
2989
|
-
return
|
|
3844
|
+
return !g;
|
|
3845
|
+
}
|
|
3846
|
+
function b() {
|
|
3847
|
+
return c;
|
|
3848
|
+
}
|
|
3849
|
+
function T(I) {
|
|
3850
|
+
return new no(I, t).getPropertyConfig(n, e.componentInstance.value);
|
|
2990
3851
|
}
|
|
2991
3852
|
return {
|
|
2992
|
-
canAccepts:
|
|
2993
|
-
checkCanDeleteComponent:
|
|
2994
|
-
checkCanMoveComponent:
|
|
3853
|
+
canAccepts: d,
|
|
3854
|
+
checkCanDeleteComponent: w,
|
|
3855
|
+
checkCanMoveComponent: j,
|
|
2995
3856
|
getStyles: m,
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3857
|
+
getPropsConfig: T,
|
|
3858
|
+
hideNestedPaddingInDesginerView: b,
|
|
3859
|
+
onAcceptNewChildElement: k,
|
|
3860
|
+
onAcceptMovedChildElement: u,
|
|
3861
|
+
resolveComponentContext: C,
|
|
3862
|
+
onResolveNewComponentSchema: p,
|
|
3863
|
+
triggerBelongedComponentToMoveWhenMoved: r,
|
|
3864
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
3003
3865
|
};
|
|
3004
3866
|
}
|
|
3005
|
-
const
|
|
3867
|
+
const ao = /* @__PURE__ */ R({
|
|
3006
3868
|
name: "FOrderDesign",
|
|
3007
|
-
props:
|
|
3869
|
+
props: ae,
|
|
3008
3870
|
emits: ["change"],
|
|
3009
3871
|
setup(e, t) {
|
|
3010
|
-
var
|
|
3011
|
-
const n =
|
|
3872
|
+
var j;
|
|
3873
|
+
const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
|
|
3012
3874
|
id: "asc",
|
|
3013
3875
|
name: "升序"
|
|
3014
3876
|
}, {
|
|
3015
3877
|
id: "desc",
|
|
3016
3878
|
name: "降序"
|
|
3017
|
-
}], f =
|
|
3018
|
-
|
|
3019
|
-
|
|
3879
|
+
}], f = v(/* @__PURE__ */ new Map()), c = v(), l = q("design-item-context"), g = oo(l.schema, (j = l.parent) == null ? void 0 : j.schema), i = Wn(c, l, g);
|
|
3880
|
+
ee(() => {
|
|
3881
|
+
c.value.componentInstance = i;
|
|
3020
3882
|
}), t.expose(i.value);
|
|
3021
|
-
function
|
|
3022
|
-
const
|
|
3023
|
-
f.value = new Map(
|
|
3883
|
+
function d() {
|
|
3884
|
+
const w = n.value.map((b) => [b.id, !0]);
|
|
3885
|
+
f.value = new Map(w);
|
|
3024
3886
|
}
|
|
3025
|
-
|
|
3026
|
-
const
|
|
3887
|
+
d();
|
|
3888
|
+
const C = V(() => e.dataSource.map((w) => (w.disabled = f.value.has(w.id), w))), u = V(() => ({
|
|
3027
3889
|
"f-order": !0
|
|
3028
3890
|
}));
|
|
3029
|
-
function m(
|
|
3030
|
-
n.value = n.value.filter((
|
|
3891
|
+
function m(w) {
|
|
3892
|
+
n.value = n.value.filter((b) => b.id !== w.id), d(), t.emit("change", n.value);
|
|
3031
3893
|
}
|
|
3032
|
-
function
|
|
3894
|
+
function p() {
|
|
3033
3895
|
n.value = [...n.value, {
|
|
3034
3896
|
id: Date.now().toString(),
|
|
3035
3897
|
name: "",
|
|
3036
3898
|
order: "asc"
|
|
3037
|
-
}],
|
|
3899
|
+
}], d(), t.emit("change", n.value);
|
|
3038
3900
|
}
|
|
3039
|
-
function
|
|
3040
|
-
|
|
3901
|
+
function y(w) {
|
|
3902
|
+
d(), t.emit("change", n.value);
|
|
3041
3903
|
}
|
|
3042
|
-
function
|
|
3043
|
-
if (
|
|
3044
|
-
const
|
|
3045
|
-
|
|
3904
|
+
function S(w) {
|
|
3905
|
+
if (w && w.length) {
|
|
3906
|
+
const b = /* @__PURE__ */ new Map();
|
|
3907
|
+
w.reduce((T, F) => (T.set(F.id, F), T), b), n.value = w.map((T) => b.get(T.id)), t.emit("change", n.value);
|
|
3046
3908
|
}
|
|
3047
3909
|
}
|
|
3048
|
-
function
|
|
3049
|
-
return
|
|
3910
|
+
function k() {
|
|
3911
|
+
return h(ve, {
|
|
3050
3912
|
style: "flex:1",
|
|
3051
3913
|
data: n.value,
|
|
3052
3914
|
draggable: !0,
|
|
@@ -3054,71 +3916,71 @@ const vn = /* @__PURE__ */ H({
|
|
|
3054
3916
|
"keep-order": !0,
|
|
3055
3917
|
itemClass: "f-order-item",
|
|
3056
3918
|
onRemoveItem: m,
|
|
3057
|
-
onChange:
|
|
3919
|
+
onChange: S
|
|
3058
3920
|
}, {
|
|
3059
|
-
header: () =>
|
|
3921
|
+
header: () => h("div", {
|
|
3060
3922
|
class: "f-order-header"
|
|
3061
|
-
}, [
|
|
3923
|
+
}, [h("span", {
|
|
3062
3924
|
class: "f-order-header-order-field"
|
|
3063
|
-
}, [o.value]),
|
|
3925
|
+
}, [o.value]), h("span", {
|
|
3064
3926
|
class: "f-order-header-order-type"
|
|
3065
|
-
}, [
|
|
3066
|
-
itemContent: (
|
|
3927
|
+
}, [a.value])]),
|
|
3928
|
+
itemContent: (w) => h("div", {
|
|
3067
3929
|
class: "f-order-item-content"
|
|
3068
|
-
}, [
|
|
3930
|
+
}, [h(_, {
|
|
3069
3931
|
class: "f-order-item-content-order-field",
|
|
3070
|
-
data:
|
|
3932
|
+
data: C.value,
|
|
3071
3933
|
valueField: "id",
|
|
3072
3934
|
textField: "name",
|
|
3073
3935
|
idField: "id",
|
|
3074
|
-
modelValue:
|
|
3075
|
-
"onUpdate:modelValue": (
|
|
3076
|
-
onChange:
|
|
3077
|
-
onClear:
|
|
3078
|
-
}, null),
|
|
3936
|
+
modelValue: w.id,
|
|
3937
|
+
"onUpdate:modelValue": (b) => w.id = b,
|
|
3938
|
+
onChange: y,
|
|
3939
|
+
onClear: y
|
|
3940
|
+
}, null), h(_, {
|
|
3079
3941
|
class: "f-order-item-content-order-type",
|
|
3080
|
-
data:
|
|
3942
|
+
data: s,
|
|
3081
3943
|
valueField: "id",
|
|
3082
3944
|
textField: "name",
|
|
3083
3945
|
idField: "id",
|
|
3084
|
-
modelValue:
|
|
3085
|
-
"onUpdate:modelValue": (
|
|
3086
|
-
onChange:
|
|
3946
|
+
modelValue: w.order,
|
|
3947
|
+
"onUpdate:modelValue": (b) => w.order = b,
|
|
3948
|
+
onChange: y
|
|
3087
3949
|
}, null)]),
|
|
3088
|
-
footer: () =>
|
|
3950
|
+
footer: () => h("div", {
|
|
3089
3951
|
class: "f-order-footer"
|
|
3090
|
-
}, [
|
|
3952
|
+
}, [h(Ce, {
|
|
3091
3953
|
type: "link",
|
|
3092
3954
|
class: "f-order-add-button",
|
|
3093
|
-
onClick:
|
|
3955
|
+
onClick: p
|
|
3094
3956
|
}, {
|
|
3095
|
-
default: () =>
|
|
3957
|
+
default: () => h(K, null, [h("span", {
|
|
3096
3958
|
class: "f-order-add-icon"
|
|
3097
|
-
}, [
|
|
3959
|
+
}, [h("i", {
|
|
3098
3960
|
class: "f-icon f-icon-add"
|
|
3099
|
-
}, null)]),
|
|
3961
|
+
}, null)]), r.value])
|
|
3100
3962
|
})])
|
|
3101
3963
|
});
|
|
3102
3964
|
}
|
|
3103
|
-
return () =>
|
|
3104
|
-
ref:
|
|
3105
|
-
class:
|
|
3106
|
-
}, [
|
|
3965
|
+
return () => h("div", {
|
|
3966
|
+
ref: c,
|
|
3967
|
+
class: u.value
|
|
3968
|
+
}, [k()]);
|
|
3107
3969
|
}
|
|
3108
|
-
}),
|
|
3970
|
+
}), bo = {
|
|
3109
3971
|
install(e) {
|
|
3110
|
-
e.component(
|
|
3972
|
+
e.component(Q.name, Q);
|
|
3111
3973
|
},
|
|
3112
3974
|
register(e, t, n, o) {
|
|
3113
|
-
e.order =
|
|
3975
|
+
e.order = Q, t.order = ue;
|
|
3114
3976
|
},
|
|
3115
3977
|
registerDesigner(e, t, n) {
|
|
3116
|
-
e.order =
|
|
3978
|
+
e.order = ao, t.order = ue;
|
|
3117
3979
|
}
|
|
3118
3980
|
};
|
|
3119
3981
|
export {
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3982
|
+
Q as FOrder,
|
|
3983
|
+
bo as default,
|
|
3984
|
+
ae as orderProps,
|
|
3985
|
+
ue as propsResolver
|
|
3124
3986
|
};
|