@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,103 +1,103 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var O = (n, e, t) =>
|
|
4
|
-
import { defineComponent as z, ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title: t } = n,
|
|
12
|
-
return
|
|
1
|
+
var Ne = Object.defineProperty;
|
|
2
|
+
var _e = (n, e, t) => e in n ? Ne(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var O = (n, e, t) => _e(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as z, ref as M, computed as F, watch as G, createVNode as b, createTextVNode as Q, getCurrentInstance as Ce, onMounted as H, onUnmounted as ie, inject as V, provide as Fe, onBeforeUnmount as Le, withModifiers as Ve } from "vue";
|
|
5
|
+
import { isPlainObject as ge, cloneDeep as we } from "lodash-es";
|
|
6
|
+
import We from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { getCustomClass as Y, withInstall as Ue } from "../common/index.esm.js";
|
|
8
|
+
import { useDesignerInnerComponent as Pe } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const ae = {}, Te = {};
|
|
10
|
+
function ce(n) {
|
|
11
|
+
const { properties: e, title: t, ignore: s } = n, c = s && Array.isArray(s), g = Object.keys(e).reduce((d, P) => ((!c || !s.find((S) => S == P)) && (d[P] = e[P].type === "object" && e[P].properties ? ce(e[P]) : we(e[P].default)), d), {});
|
|
12
|
+
return (!c || !s.find((d) => d == "id")) && (g.id = `${t}-${Date.now()}`), g;
|
|
13
13
|
}
|
|
14
|
-
function U(n, e = {}) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
return
|
|
14
|
+
function U(n, e = {}, t) {
|
|
15
|
+
const s = ae[n];
|
|
16
|
+
if (s) {
|
|
17
|
+
let c = ce(s);
|
|
18
|
+
const g = Te[n];
|
|
19
|
+
return c = g ? g({ getSchemaByType: U }, c, e, t) : c, c;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
-
return Object.keys(n).reduce((
|
|
23
|
+
function qe(n, e) {
|
|
24
|
+
const t = ce(e);
|
|
25
|
+
return Object.keys(n).reduce((s, c) => (s[c] && ge(s[c]) && ge(n[c]) ? Object.assign(s[c], n[c]) : s[c] = n[c], s), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(n).filter((
|
|
29
|
-
if (e.has(
|
|
30
|
-
const g = e.get(
|
|
27
|
+
function He(n, e) {
|
|
28
|
+
return Object.keys(n).filter((s) => n[s] != null).reduce((s, c) => {
|
|
29
|
+
if (e.has(c)) {
|
|
30
|
+
const g = e.get(c);
|
|
31
31
|
if (typeof g == "string")
|
|
32
|
-
|
|
32
|
+
s[g] = n[c];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
34
|
+
const d = g(c, n[c], n);
|
|
35
|
+
Object.assign(s, d);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
s[c] = n[c];
|
|
39
|
+
return s;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
function ze(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const s = qe(n, e);
|
|
44
|
+
return He(s, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function e(
|
|
48
|
-
if (typeof
|
|
49
|
-
return
|
|
50
|
-
if (typeof
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
46
|
+
function Ge(n = {}) {
|
|
47
|
+
function e(y, T, p, i) {
|
|
48
|
+
if (typeof p == "number")
|
|
49
|
+
return i[y].length === p;
|
|
50
|
+
if (typeof p == "object") {
|
|
51
|
+
const f = Object.keys(p)[0], l = p[f];
|
|
52
|
+
if (f === "not")
|
|
53
|
+
return Number(i[y].length) !== Number(l);
|
|
54
|
+
if (f === "moreThan")
|
|
55
|
+
return Number(i[y].length) >= Number(l);
|
|
56
|
+
if (f === "lessThan")
|
|
57
|
+
return Number(i[y].length) <= Number(l);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return
|
|
61
|
+
function t(y, T, p, i) {
|
|
62
|
+
return i[y] && i[y].propertyValue && String(i[y].propertyValue.value) === String(p);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const s = /* @__PURE__ */ new Map([
|
|
65
65
|
["length", e],
|
|
66
66
|
["getProperty", t]
|
|
67
67
|
]);
|
|
68
|
-
Object.keys(n).reduce((
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
return typeof T == "number" ? [{ target:
|
|
72
|
-
if (
|
|
73
|
-
return { target:
|
|
74
|
-
const
|
|
75
|
-
return { target:
|
|
68
|
+
Object.keys(n).reduce((y, T) => (y.set(T, n[T]), y), s);
|
|
69
|
+
function c(y, T) {
|
|
70
|
+
const p = y;
|
|
71
|
+
return typeof T == "number" ? [{ target: p, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: p, operator: "getProperty", param: y, value: !!T }] : typeof T == "object" ? Object.keys(T).map((i) => {
|
|
72
|
+
if (i === "length")
|
|
73
|
+
return { target: p, operator: "length", param: null, value: T[i] };
|
|
74
|
+
const f = i, l = T[i];
|
|
75
|
+
return { target: p, operator: "getProperty", param: f, value: l };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function g(
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const
|
|
81
|
-
return
|
|
78
|
+
function g(y) {
|
|
79
|
+
return Object.keys(y).reduce((p, i) => {
|
|
80
|
+
const f = c(i, y[i]);
|
|
81
|
+
return p.push(...f), p;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
84
|
+
function d(y, T) {
|
|
85
|
+
if (s.has(y.operator)) {
|
|
86
|
+
const p = s.get(y.operator);
|
|
87
|
+
return p && p(y.target, y.param, y.value, T) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return g(
|
|
91
|
+
function P(y, T) {
|
|
92
|
+
return g(y).reduce((f, l) => f && d(l, T), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
return
|
|
94
|
+
function S(y, T) {
|
|
95
|
+
const p = Object.keys(y), i = p.includes("allOf"), f = p.includes("anyOf"), l = i || f, j = (l ? y[l ? i ? "allOf" : "anyOf" : "allOf"] : [y]).map((D) => P(D, T));
|
|
96
|
+
return i ? !j.includes(!1) : j.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: S };
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const K = {
|
|
101
101
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
102
102
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
103
103
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -134,25 +134,39 @@ const Z = {
|
|
|
134
134
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
135
135
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
136
136
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
+
}, De = {}, Je = {};
|
|
140
|
+
Ge();
|
|
141
|
+
function le(n, e, t = /* @__PURE__ */ new Map(), s = (d, P, S) => P, c = {}, g = (d) => d) {
|
|
142
|
+
return ae[e.title] = e, Te[e.title] = s, De[e.title] = c, Je[e.title] = g, (d = {}) => {
|
|
143
|
+
const P = ze(d, e, t), S = Object.keys(n).reduce((y, T) => (y[T] = n[T].default, y), {});
|
|
144
|
+
return Object.assign(S, P);
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function Se(n, e) {
|
|
147
148
|
return { customClass: e.class, customStyle: e.style };
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
+
function Qe(n, e) {
|
|
150
151
|
return { buttons: e.buttons };
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
function Xe() {
|
|
154
|
+
function n(e, t) {
|
|
155
|
+
var P;
|
|
156
|
+
const s = (P = e.toolbar) == null ? void 0 : P.buttons;
|
|
157
|
+
if (!s || s.length < 1)
|
|
158
|
+
return null;
|
|
159
|
+
const [c, g] = t.payloads, d = s.find((S) => S.id === g);
|
|
160
|
+
return d ? d.onClick || d.click : null;
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
resolve: n
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const Ye = /* @__PURE__ */ new Map([
|
|
167
|
+
["appearance", Se],
|
|
168
|
+
["toolbar", Qe]
|
|
169
|
+
]), Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/page-header.schema.json", et = "page-header", tt = "A Farris Container Component", nt = "object", ot = {
|
|
156
170
|
id: {
|
|
157
171
|
description: "The unique identifier for a Page Header",
|
|
158
172
|
type: "string"
|
|
@@ -260,18 +274,18 @@ const Qe = /* @__PURE__ */ new Map([
|
|
|
260
274
|
type: "boolean",
|
|
261
275
|
default: !1
|
|
262
276
|
}
|
|
263
|
-
},
|
|
264
|
-
$schema:
|
|
265
|
-
$id:
|
|
266
|
-
title:
|
|
267
|
-
description:
|
|
268
|
-
type:
|
|
269
|
-
properties:
|
|
277
|
+
}, rt = {
|
|
278
|
+
$schema: Ze,
|
|
279
|
+
$id: Ke,
|
|
280
|
+
title: et,
|
|
281
|
+
description: tt,
|
|
282
|
+
type: nt,
|
|
283
|
+
properties: ot
|
|
270
284
|
};
|
|
271
|
-
function
|
|
285
|
+
function st(n, e, t) {
|
|
272
286
|
return e.title = "标题", e;
|
|
273
287
|
}
|
|
274
|
-
const
|
|
288
|
+
const pe = {
|
|
275
289
|
/** 组件自定义样式 */
|
|
276
290
|
customClass: { type: String, default: "" },
|
|
277
291
|
/** 是否显示图标 */
|
|
@@ -300,204 +314,204 @@ const le = {
|
|
|
300
314
|
prePaginationDisabled: { type: Boolean, default: !0 },
|
|
301
315
|
/** 向后翻页是否禁用 */
|
|
302
316
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
303
|
-
},
|
|
317
|
+
}, it = Object.assign({}, pe, {
|
|
304
318
|
componentId: { type: String, default: "" }
|
|
305
|
-
}),
|
|
319
|
+
}), me = le(pe, rt, Ye, st), at = Xe(), oe = /* @__PURE__ */ z({
|
|
306
320
|
name: "FPageHeader",
|
|
307
|
-
props:
|
|
321
|
+
props: pe,
|
|
308
322
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
309
323
|
setup(n, e) {
|
|
310
|
-
const t =
|
|
311
|
-
e.emit("Click",
|
|
324
|
+
const t = M(n.buttons), s = (D, A) => {
|
|
325
|
+
e.emit("Click", D, A);
|
|
312
326
|
};
|
|
313
|
-
function
|
|
314
|
-
|
|
327
|
+
function c(D, A) {
|
|
328
|
+
D && A && A.split(" ").reduce((v, m) => (v[m] = !0, v), D);
|
|
315
329
|
}
|
|
316
330
|
const g = F(() => {
|
|
317
|
-
const
|
|
331
|
+
const D = {
|
|
318
332
|
"f-page-header": !0
|
|
319
333
|
};
|
|
320
|
-
return
|
|
321
|
-
}),
|
|
322
|
-
const
|
|
334
|
+
return c(D, n.customClass), D;
|
|
335
|
+
}), d = F(() => {
|
|
336
|
+
const D = {
|
|
323
337
|
"f-title-icon": !0
|
|
324
338
|
};
|
|
325
|
-
return
|
|
326
|
-
}),
|
|
327
|
-
const
|
|
339
|
+
return c(D, n.iconClass), D;
|
|
340
|
+
}), P = F(() => {
|
|
341
|
+
const D = {
|
|
328
342
|
"f-icon": !0
|
|
329
343
|
};
|
|
330
|
-
return
|
|
331
|
-
}),
|
|
332
|
-
const
|
|
344
|
+
return c(D, n.icon), D;
|
|
345
|
+
}), S = F(() => {
|
|
346
|
+
const D = {
|
|
333
347
|
"f-title": !0
|
|
334
348
|
};
|
|
335
|
-
return
|
|
336
|
-
}),
|
|
337
|
-
const
|
|
349
|
+
return c(D, n.titleContentClass), D;
|
|
350
|
+
}), y = F(() => {
|
|
351
|
+
const D = {
|
|
338
352
|
"f-content": !0
|
|
339
353
|
};
|
|
340
|
-
return
|
|
354
|
+
return c(D, n.contentClass), D;
|
|
341
355
|
}), T = F(() => {
|
|
342
|
-
const
|
|
356
|
+
const D = {
|
|
343
357
|
"f-content": !0
|
|
344
358
|
};
|
|
345
|
-
return
|
|
346
|
-
}),
|
|
359
|
+
return c(D, n.downContentClass), D;
|
|
360
|
+
}), p = F(() => ({
|
|
347
361
|
"f-icon f-icon-arrow-w": !0,
|
|
348
362
|
"f-state-disabled": n.prePaginationDisabled
|
|
349
|
-
})),
|
|
363
|
+
})), i = F(() => ({
|
|
350
364
|
"f-icon f-icon-arrow-e": !0,
|
|
351
365
|
"f-state-disabled": n.nextPaginationDisabled
|
|
352
366
|
}));
|
|
353
|
-
function
|
|
354
|
-
n.prePaginationDisabled || e.emit("PrePaginationClick",
|
|
367
|
+
function f(D) {
|
|
368
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", D);
|
|
355
369
|
}
|
|
356
|
-
function
|
|
357
|
-
n.nextPaginationDisabled || e.emit("NextPaginationClick",
|
|
370
|
+
function l(D) {
|
|
371
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", D);
|
|
358
372
|
}
|
|
359
373
|
function C() {
|
|
360
|
-
return e.slots.titleContent ?
|
|
361
|
-
class:
|
|
362
|
-
}, [Q(" "), e.slots.titleContent()]) :
|
|
374
|
+
return e.slots.titleContent ? b("div", {
|
|
375
|
+
class: S.value
|
|
376
|
+
}, [Q(" "), e.slots.titleContent()]) : b("div", {
|
|
363
377
|
class: "f-title"
|
|
364
|
-
}, [n.showIcon && n.icon ?
|
|
365
|
-
class:
|
|
366
|
-
}, [
|
|
367
|
-
class:
|
|
368
|
-
}, null)]) : "",
|
|
378
|
+
}, [n.showIcon && n.icon ? b("span", {
|
|
379
|
+
class: d.value
|
|
380
|
+
}, [b("i", {
|
|
381
|
+
class: P.value
|
|
382
|
+
}, null)]) : "", b("h4", {
|
|
369
383
|
class: "f-title-text"
|
|
370
|
-
}, [n.title]), n.subTitle ?
|
|
384
|
+
}, [n.title]), n.subTitle ? b("h5", {
|
|
371
385
|
class: "f-title-subtitle"
|
|
372
|
-
}, [n.subTitle]) : "", n.showPagination ?
|
|
386
|
+
}, [n.subTitle]) : "", n.showPagination ? b("div", {
|
|
373
387
|
class: "f-title-pagination"
|
|
374
|
-
}, [
|
|
375
|
-
class:
|
|
376
|
-
onClick:
|
|
377
|
-
}, null),
|
|
378
|
-
class:
|
|
379
|
-
onClick:
|
|
388
|
+
}, [b("span", {
|
|
389
|
+
class: p.value,
|
|
390
|
+
onClick: f
|
|
391
|
+
}, null), b("span", {
|
|
392
|
+
class: i.value,
|
|
393
|
+
onClick: l
|
|
380
394
|
}, null)]) : ""]);
|
|
381
395
|
}
|
|
382
396
|
function w() {
|
|
383
|
-
return e.slots.content ?
|
|
384
|
-
class:
|
|
397
|
+
return e.slots.content ? b("div", {
|
|
398
|
+
class: y.value
|
|
385
399
|
}, [Q(" "), e.slots.content()]) : "";
|
|
386
400
|
}
|
|
387
401
|
function j() {
|
|
388
402
|
if (n.buttons && n.buttons.length > 0)
|
|
389
|
-
return
|
|
403
|
+
return b(We, {
|
|
390
404
|
customClass: n.buttonClass,
|
|
391
405
|
items: t.value,
|
|
392
|
-
onClick:
|
|
406
|
+
onClick: s
|
|
393
407
|
}, null);
|
|
394
408
|
}
|
|
395
|
-
function
|
|
396
|
-
return e.slots.downContent ?
|
|
409
|
+
function I() {
|
|
410
|
+
return e.slots.downContent ? b("div", {
|
|
397
411
|
class: T.value
|
|
398
412
|
}, [Q(" "), e.slots.downContent()]) : "";
|
|
399
413
|
}
|
|
400
|
-
return G(() => n.buttons, (
|
|
401
|
-
t.value =
|
|
414
|
+
return G(() => n.buttons, (D) => {
|
|
415
|
+
t.value = D;
|
|
402
416
|
}, {
|
|
403
417
|
deep: !0
|
|
404
|
-
}), () =>
|
|
418
|
+
}), () => b("div", {
|
|
405
419
|
class: g.value
|
|
406
|
-
}, [
|
|
420
|
+
}, [b("nav", {
|
|
407
421
|
class: "f-page-header-base"
|
|
408
|
-
}, [C(), w(), j()]),
|
|
422
|
+
}, [C(), w(), j()]), I()]);
|
|
409
423
|
}
|
|
410
424
|
});
|
|
411
|
-
function
|
|
412
|
-
var
|
|
413
|
-
function
|
|
425
|
+
function ct(n, e, t) {
|
|
426
|
+
var $;
|
|
427
|
+
function s() {
|
|
414
428
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
415
429
|
}
|
|
416
|
-
|
|
417
|
-
const
|
|
418
|
-
function
|
|
430
|
+
s();
|
|
431
|
+
const c = t && t.getStyles && t.getStyles() || "", g = t && t.getDesignerClass && t.getDesignerClass() || "", d = M();
|
|
432
|
+
function P() {
|
|
419
433
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
420
434
|
}
|
|
421
|
-
function
|
|
435
|
+
function S() {
|
|
422
436
|
return !1;
|
|
423
437
|
}
|
|
424
|
-
function
|
|
438
|
+
function y() {
|
|
425
439
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
426
440
|
}
|
|
427
441
|
function T() {
|
|
428
442
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
429
443
|
}
|
|
430
|
-
function
|
|
431
|
-
if (!
|
|
444
|
+
function p(v) {
|
|
445
|
+
if (!v || !v.value)
|
|
432
446
|
return null;
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
435
|
-
const
|
|
436
|
-
return
|
|
447
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
448
|
+
return v.value;
|
|
449
|
+
const m = M(v == null ? void 0 : v.value.parent), x = p(m);
|
|
450
|
+
return x || null;
|
|
437
451
|
}
|
|
438
|
-
function
|
|
439
|
-
const { componentInstance:
|
|
440
|
-
return !
|
|
452
|
+
function i(v = e) {
|
|
453
|
+
const { componentInstance: m, designerItemElementRef: x } = v;
|
|
454
|
+
return !m || !m.value ? null : m.value.canMove ? x : i(v.parent);
|
|
441
455
|
}
|
|
442
|
-
function
|
|
443
|
-
return !!t && t.canAccepts(
|
|
456
|
+
function f(v) {
|
|
457
|
+
return !!t && t.canAccepts(v);
|
|
444
458
|
}
|
|
445
|
-
function
|
|
459
|
+
function l() {
|
|
446
460
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
447
461
|
}
|
|
448
462
|
function C() {
|
|
449
463
|
}
|
|
450
|
-
function w(
|
|
451
|
-
|
|
464
|
+
function w(v, m) {
|
|
465
|
+
m && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m);
|
|
452
466
|
}
|
|
453
|
-
function j(
|
|
454
|
-
const { componentType:
|
|
455
|
-
let
|
|
456
|
-
t && t.onResolveNewComponentSchema && (
|
|
457
|
-
const
|
|
458
|
-
return
|
|
467
|
+
function j(v, m) {
|
|
468
|
+
const { componentType: x } = v;
|
|
469
|
+
let k = U(x, v, m);
|
|
470
|
+
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(v, k));
|
|
471
|
+
const u = x.toLowerCase().replace("-", "_");
|
|
472
|
+
return k && !k.id && k.type === x && (k.id = `${u}_${Math.random().toString().slice(2, 6)}`), k;
|
|
459
473
|
}
|
|
460
|
-
function
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
let
|
|
464
|
-
t && t.onAcceptNewChildElement && (
|
|
465
|
-
const o =
|
|
466
|
-
return
|
|
474
|
+
function I(v, m) {
|
|
475
|
+
const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), u = k ? JSON.parse(k) : {};
|
|
476
|
+
u.parentComponentInstance = d.value;
|
|
477
|
+
let r = U(x, u);
|
|
478
|
+
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(v, m, r));
|
|
479
|
+
const o = x.toLowerCase().replace("-", "_");
|
|
480
|
+
return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
467
481
|
}
|
|
468
|
-
function
|
|
482
|
+
function D(v) {
|
|
469
483
|
}
|
|
470
|
-
function A(...
|
|
484
|
+
function A(...v) {
|
|
471
485
|
if (t && t.getPropsConfig)
|
|
472
|
-
return t.getPropsConfig(...
|
|
486
|
+
return t.getPropsConfig(...v);
|
|
473
487
|
}
|
|
474
|
-
return
|
|
475
|
-
canMove:
|
|
476
|
-
canSelectParent:
|
|
477
|
-
canDelete:
|
|
488
|
+
return d.value = {
|
|
489
|
+
canMove: P(),
|
|
490
|
+
canSelectParent: S(),
|
|
491
|
+
canDelete: y(),
|
|
478
492
|
canNested: !T(),
|
|
479
493
|
contents: e == null ? void 0 : e.schema.contents,
|
|
480
494
|
elementRef: n,
|
|
481
|
-
parent: (
|
|
495
|
+
parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
|
|
482
496
|
schema: e == null ? void 0 : e.schema,
|
|
483
|
-
styles:
|
|
497
|
+
styles: c,
|
|
484
498
|
designerClass: g,
|
|
485
|
-
canAccepts:
|
|
486
|
-
getBelongedComponentInstance:
|
|
487
|
-
getDraggableDesignItemElement:
|
|
488
|
-
getDraggingDisplayText:
|
|
499
|
+
canAccepts: f,
|
|
500
|
+
getBelongedComponentInstance: p,
|
|
501
|
+
getDraggableDesignItemElement: i,
|
|
502
|
+
getDraggingDisplayText: l,
|
|
489
503
|
getPropConfig: A,
|
|
490
504
|
getDragScopeElement: C,
|
|
491
505
|
onAcceptMovedChildElement: w,
|
|
492
|
-
onAcceptNewChildElement:
|
|
493
|
-
onChildElementMovedOut:
|
|
506
|
+
onAcceptNewChildElement: I,
|
|
507
|
+
onChildElementMovedOut: D,
|
|
494
508
|
addNewChildComponentSchema: j,
|
|
495
|
-
updateDragAndDropRules:
|
|
496
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
497
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
498
|
-
},
|
|
509
|
+
updateDragAndDropRules: s,
|
|
510
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
511
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
|
|
512
|
+
}, d;
|
|
499
513
|
}
|
|
500
|
-
class
|
|
514
|
+
class ee {
|
|
501
515
|
constructor(e, t) {
|
|
502
516
|
O(this, "componentId");
|
|
503
517
|
O(this, "viewModelId");
|
|
@@ -514,8 +528,8 @@ class K {
|
|
|
514
528
|
type: "object",
|
|
515
529
|
categories: {}
|
|
516
530
|
});
|
|
517
|
-
var
|
|
518
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
531
|
+
var s;
|
|
532
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((s = this.formSchemaUtils) == null ? void 0 : s.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
519
533
|
}
|
|
520
534
|
getTableInfo() {
|
|
521
535
|
var e;
|
|
@@ -525,8 +539,8 @@ class K {
|
|
|
525
539
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
526
540
|
if (t) {
|
|
527
541
|
if (!this.designViewModelField) {
|
|
528
|
-
const
|
|
529
|
-
this.designViewModelField =
|
|
542
|
+
const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
543
|
+
this.designViewModelField = s.fields.find((c) => c.id === t);
|
|
530
544
|
}
|
|
531
545
|
e.updateOn = this.designViewModelField.updateOn;
|
|
532
546
|
}
|
|
@@ -552,7 +566,7 @@ class K {
|
|
|
552
566
|
type: "combo-list",
|
|
553
567
|
textField: "name",
|
|
554
568
|
valueField: "value",
|
|
555
|
-
data: [{ value: e.type, name:
|
|
569
|
+
data: [{ value: e.type, name: K[e.type].name }]
|
|
556
570
|
}
|
|
557
571
|
}
|
|
558
572
|
}
|
|
@@ -578,8 +592,21 @@ class K {
|
|
|
578
592
|
}
|
|
579
593
|
};
|
|
580
594
|
}
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @param propertyId
|
|
598
|
+
* @param componentInstance
|
|
599
|
+
* @returns
|
|
600
|
+
*/
|
|
601
|
+
updateElementByParentContainer(e, t) {
|
|
602
|
+
const s = t && t.parent && t.parent.schema;
|
|
603
|
+
if (!s)
|
|
604
|
+
return;
|
|
605
|
+
const c = s.contents.findIndex((d) => d.id === e), g = we(s.contents[c]);
|
|
606
|
+
s.contents.splice(c, 1), s.contents.splice(c, 0, g);
|
|
607
|
+
}
|
|
581
608
|
}
|
|
582
|
-
class
|
|
609
|
+
class lt extends ee {
|
|
583
610
|
constructor(e, t) {
|
|
584
611
|
super(e, t);
|
|
585
612
|
}
|
|
@@ -605,7 +632,7 @@ class it extends K {
|
|
|
605
632
|
type: "combo-list",
|
|
606
633
|
textField: "value",
|
|
607
634
|
valueField: "key",
|
|
608
|
-
data: [{ key: "page-header", value:
|
|
635
|
+
data: [{ key: "page-header", value: K["page-header"].name }]
|
|
609
636
|
}
|
|
610
637
|
},
|
|
611
638
|
icon: {
|
|
@@ -618,6 +645,15 @@ class it extends K {
|
|
|
618
645
|
type: "string",
|
|
619
646
|
description: "标题"
|
|
620
647
|
}
|
|
648
|
+
},
|
|
649
|
+
setPropertyRelates(t, s) {
|
|
650
|
+
if (t)
|
|
651
|
+
switch (t && t.propertyID) {
|
|
652
|
+
case "title": {
|
|
653
|
+
t.needRefreshControlTree = !0;
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
621
657
|
}
|
|
622
658
|
};
|
|
623
659
|
}
|
|
@@ -645,7 +681,7 @@ class it extends K {
|
|
|
645
681
|
label: "click",
|
|
646
682
|
name: "点击事件"
|
|
647
683
|
}
|
|
648
|
-
],
|
|
684
|
+
], s = this, c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
|
|
649
685
|
this.propertyConfig.categories.eventsEditor = {
|
|
650
686
|
title: "事件",
|
|
651
687
|
hideTitle: !0,
|
|
@@ -653,7 +689,7 @@ class it extends K {
|
|
|
653
689
|
"data-grid-component-viewmodel": {
|
|
654
690
|
type: "events-editor",
|
|
655
691
|
editor: {
|
|
656
|
-
initialData:
|
|
692
|
+
initialData: c
|
|
657
693
|
}
|
|
658
694
|
}
|
|
659
695
|
},
|
|
@@ -661,38 +697,38 @@ class it extends K {
|
|
|
661
697
|
refreshPanelAfterChanged: !0,
|
|
662
698
|
tabId: "commands",
|
|
663
699
|
tabName: "交互",
|
|
664
|
-
setPropertyRelates(g,
|
|
665
|
-
const
|
|
666
|
-
delete e[
|
|
700
|
+
setPropertyRelates(g, d) {
|
|
701
|
+
const P = g.propertyValue;
|
|
702
|
+
delete e[s.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, P.events, P));
|
|
667
703
|
}
|
|
668
704
|
};
|
|
669
705
|
}
|
|
670
706
|
}
|
|
671
|
-
function
|
|
672
|
-
function t(
|
|
707
|
+
function pt(n, e) {
|
|
708
|
+
function t(P) {
|
|
673
709
|
return !1;
|
|
674
710
|
}
|
|
675
|
-
function
|
|
711
|
+
function s() {
|
|
676
712
|
return !1;
|
|
677
713
|
}
|
|
678
|
-
function
|
|
714
|
+
function c() {
|
|
679
715
|
return !1;
|
|
680
716
|
}
|
|
681
717
|
function g() {
|
|
682
718
|
return !0;
|
|
683
719
|
}
|
|
684
|
-
function
|
|
685
|
-
return new
|
|
720
|
+
function d(P) {
|
|
721
|
+
return new lt(P, e).getPropertyConfig(n);
|
|
686
722
|
}
|
|
687
723
|
return {
|
|
688
724
|
canAccepts: t,
|
|
689
725
|
hideNestedPaddingInDesginerView: g,
|
|
690
|
-
getPropsConfig:
|
|
691
|
-
checkCanDeleteComponent:
|
|
692
|
-
checkCanMoveComponent:
|
|
726
|
+
getPropsConfig: d,
|
|
727
|
+
checkCanDeleteComponent: s,
|
|
728
|
+
checkCanMoveComponent: c
|
|
693
729
|
};
|
|
694
730
|
}
|
|
695
|
-
class
|
|
731
|
+
class je {
|
|
696
732
|
constructor(e) {
|
|
697
733
|
/** 工具栏项标识 */
|
|
698
734
|
O(this, "id", "");
|
|
@@ -737,8 +773,8 @@ class Te {
|
|
|
737
773
|
"tipsText",
|
|
738
774
|
"onClick"
|
|
739
775
|
];
|
|
740
|
-
Object.keys(e).filter((
|
|
741
|
-
this[
|
|
776
|
+
Object.keys(e).filter((s) => t.indexOf(s) > -1).forEach((s) => {
|
|
777
|
+
this[s] = e[s];
|
|
742
778
|
});
|
|
743
779
|
}
|
|
744
780
|
/** 是否可用 */
|
|
@@ -754,20 +790,20 @@ class Te {
|
|
|
754
790
|
return this.visible ? this.width : !1;
|
|
755
791
|
}
|
|
756
792
|
}
|
|
757
|
-
class
|
|
793
|
+
class ut extends je {
|
|
758
794
|
constructor(e) {
|
|
759
795
|
super(e);
|
|
760
796
|
}
|
|
761
797
|
}
|
|
762
|
-
function
|
|
798
|
+
function xe() {
|
|
763
799
|
function n(e) {
|
|
764
800
|
const t = [];
|
|
765
|
-
return e.reduce((
|
|
801
|
+
return e.reduce((s, c) => (c.children && c.children.length > 0 ? s.push(new J(c)) : s.push(new ut(c)), s), t), t;
|
|
766
802
|
}
|
|
767
803
|
return { buildResponseToolbarItems: n };
|
|
768
804
|
}
|
|
769
|
-
const { buildResponseToolbarItems:
|
|
770
|
-
class J extends
|
|
805
|
+
const { buildResponseToolbarItems: dt } = xe();
|
|
806
|
+
class J extends je {
|
|
771
807
|
constructor(t) {
|
|
772
808
|
super(t);
|
|
773
809
|
O(this, "placement", "");
|
|
@@ -780,19 +816,25 @@ class J extends Te {
|
|
|
780
816
|
O(this, "split", !1);
|
|
781
817
|
O(this, "children", []);
|
|
782
818
|
O(this, "expanded", !1);
|
|
783
|
-
const
|
|
784
|
-
Object.keys(t).filter((
|
|
785
|
-
this[
|
|
786
|
-
}), t.children && t.children.length && (this.children =
|
|
819
|
+
const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
820
|
+
Object.keys(t).filter((c) => s.indexOf(c) > -1).forEach((c) => {
|
|
821
|
+
this[c] = t[c];
|
|
822
|
+
}), t.children && t.children.length && (this.children = dt(t.children));
|
|
787
823
|
}
|
|
788
824
|
}
|
|
789
|
-
const
|
|
790
|
-
["buttons", "items"]
|
|
825
|
+
const ft = /* @__PURE__ */ new Map([
|
|
826
|
+
["buttons", "items"],
|
|
827
|
+
["appearance", Se]
|
|
828
|
+
]), gt = /* @__PURE__ */ new Map([
|
|
829
|
+
["appearance", mt]
|
|
791
830
|
]);
|
|
792
|
-
function
|
|
831
|
+
function mt(n, e) {
|
|
832
|
+
return { class: e.class, style: e.style };
|
|
833
|
+
}
|
|
834
|
+
function Ee(n, e, t) {
|
|
793
835
|
return e;
|
|
794
836
|
}
|
|
795
|
-
const
|
|
837
|
+
const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-design.gitee.io/response-toolbar.schema.json", yt = "response-toolbar", vt = "A Farris Toolbar Component", Ct = "object", wt = {
|
|
796
838
|
id: {
|
|
797
839
|
description: "The unique identifier for a Response Toolbar",
|
|
798
840
|
type: "string"
|
|
@@ -825,19 +867,19 @@ const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
825
867
|
type: "array",
|
|
826
868
|
default: []
|
|
827
869
|
}
|
|
828
|
-
},
|
|
870
|
+
}, Pt = [
|
|
829
871
|
"id",
|
|
830
872
|
"type",
|
|
831
873
|
"buttons"
|
|
832
|
-
],
|
|
833
|
-
$schema:
|
|
834
|
-
$id:
|
|
835
|
-
title:
|
|
836
|
-
description:
|
|
837
|
-
type:
|
|
838
|
-
properties:
|
|
839
|
-
required:
|
|
840
|
-
},
|
|
874
|
+
], Tt = {
|
|
875
|
+
$schema: ht,
|
|
876
|
+
$id: bt,
|
|
877
|
+
title: yt,
|
|
878
|
+
description: vt,
|
|
879
|
+
type: Ct,
|
|
880
|
+
properties: wt,
|
|
881
|
+
required: Pt
|
|
882
|
+
}, Dt = "https://json-schema.org/draft/2020-12/schema", St = "https://farris-design.gitee.io/response-toolbar-item.schema.json", jt = "response-toolbar-item", xt = "A Farris Toolbar Item Component", Et = "object", Mt = {
|
|
841
883
|
id: {
|
|
842
884
|
description: "The unique identifier for a Response Toolbar",
|
|
843
885
|
type: "string"
|
|
@@ -852,7 +894,8 @@ const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
852
894
|
type: "object",
|
|
853
895
|
properties: {
|
|
854
896
|
class: {
|
|
855
|
-
type: "string"
|
|
897
|
+
type: "string",
|
|
898
|
+
default: "btn-primary"
|
|
856
899
|
},
|
|
857
900
|
style: {
|
|
858
901
|
type: "string"
|
|
@@ -860,34 +903,39 @@ const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
860
903
|
},
|
|
861
904
|
default: {}
|
|
862
905
|
},
|
|
906
|
+
alignment: {
|
|
907
|
+
description: "对齐",
|
|
908
|
+
type: "string",
|
|
909
|
+
default: "right"
|
|
910
|
+
},
|
|
863
911
|
text: {
|
|
864
|
-
description: "
|
|
912
|
+
description: "文本",
|
|
865
913
|
type: "string",
|
|
866
914
|
default: "新增"
|
|
867
915
|
},
|
|
868
916
|
icon: {
|
|
869
|
-
description: "
|
|
917
|
+
description: "图标",
|
|
870
918
|
type: "string",
|
|
871
919
|
default: ""
|
|
872
920
|
},
|
|
873
|
-
|
|
874
|
-
description: "
|
|
921
|
+
onClick: {
|
|
922
|
+
description: "点击事件",
|
|
875
923
|
type: "string",
|
|
876
924
|
default: ""
|
|
877
925
|
}
|
|
878
|
-
},
|
|
926
|
+
}, kt = [
|
|
879
927
|
"id",
|
|
880
928
|
"type",
|
|
881
929
|
"text"
|
|
882
930
|
], se = {
|
|
883
|
-
$schema:
|
|
884
|
-
$id:
|
|
885
|
-
title:
|
|
886
|
-
description:
|
|
887
|
-
type:
|
|
888
|
-
properties:
|
|
889
|
-
required:
|
|
890
|
-
},
|
|
931
|
+
$schema: Dt,
|
|
932
|
+
$id: St,
|
|
933
|
+
title: jt,
|
|
934
|
+
description: xt,
|
|
935
|
+
type: Et,
|
|
936
|
+
properties: Mt,
|
|
937
|
+
required: kt
|
|
938
|
+
}, At = "response-toolbar-item", Bt = "A Farris Container Component", Rt = "object", It = {
|
|
891
939
|
basic: {
|
|
892
940
|
title: "基本信息",
|
|
893
941
|
description: "Basic Infomation",
|
|
@@ -920,12 +968,12 @@ const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
920
968
|
}
|
|
921
969
|
}
|
|
922
970
|
}
|
|
923
|
-
},
|
|
924
|
-
title:
|
|
925
|
-
description:
|
|
926
|
-
type:
|
|
927
|
-
categories:
|
|
928
|
-
},
|
|
971
|
+
}, he = {
|
|
972
|
+
title: At,
|
|
973
|
+
description: Bt,
|
|
974
|
+
type: Rt,
|
|
975
|
+
categories: It
|
|
976
|
+
}, ue = {
|
|
929
977
|
/** 组件自定义样式 */
|
|
930
978
|
customClass: { type: String, default: "" },
|
|
931
979
|
alignment: { Type: String, default: "right" },
|
|
@@ -934,771 +982,767 @@ const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
934
982
|
default: []
|
|
935
983
|
}
|
|
936
984
|
};
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
const
|
|
985
|
+
ae[se.title] = se;
|
|
986
|
+
De[he.title] = he;
|
|
987
|
+
const Ot = Object.assign({}, ue, {
|
|
940
988
|
componentId: { type: String, default: "" }
|
|
941
|
-
}),
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
),
|
|
989
|
+
}), de = le(
|
|
990
|
+
ue,
|
|
991
|
+
Tt,
|
|
992
|
+
ft,
|
|
993
|
+
Ee
|
|
994
|
+
), Me = {
|
|
947
995
|
id: { type: String, default: "" },
|
|
948
996
|
items: { type: Object, default: {} },
|
|
997
|
+
class: { type: String, default: "" },
|
|
949
998
|
text: { type: String, default: "" },
|
|
950
999
|
disabled: { type: Boolean, default: !1 },
|
|
951
1000
|
icon: { type: String, default: "" },
|
|
952
|
-
componentId: { type: String, default: "" }
|
|
953
|
-
|
|
954
|
-
|
|
1001
|
+
componentId: { type: String, default: "" },
|
|
1002
|
+
alignment: { Type: String, default: "right" }
|
|
1003
|
+
}, $t = le(
|
|
1004
|
+
Me,
|
|
955
1005
|
se,
|
|
956
|
-
|
|
957
|
-
|
|
1006
|
+
gt,
|
|
1007
|
+
Ee
|
|
958
1008
|
);
|
|
959
|
-
function
|
|
1009
|
+
function ke() {
|
|
960
1010
|
function n(t) {
|
|
961
|
-
const
|
|
1011
|
+
const s = {
|
|
962
1012
|
"f-icon": !0
|
|
963
1013
|
};
|
|
964
1014
|
if (t.icon) {
|
|
965
|
-
const
|
|
966
|
-
|
|
1015
|
+
const c = t.icon.trim().split(" ");
|
|
1016
|
+
c && c.length && c.reduce((g, d) => (g[d] = !0, g), s);
|
|
967
1017
|
}
|
|
968
|
-
return
|
|
1018
|
+
return s;
|
|
969
1019
|
}
|
|
970
1020
|
function e(t) {
|
|
971
1021
|
return !!(t.icon && t.icon.trim());
|
|
972
1022
|
}
|
|
973
1023
|
return { iconClass: n, shouldShowIcon: e };
|
|
974
1024
|
}
|
|
975
|
-
function
|
|
976
|
-
function e(
|
|
977
|
-
const
|
|
1025
|
+
function Nt(n) {
|
|
1026
|
+
function e(p) {
|
|
1027
|
+
const i = {
|
|
978
1028
|
"dropdown-menu": !0
|
|
979
1029
|
};
|
|
980
|
-
if (
|
|
981
|
-
const
|
|
982
|
-
|
|
1030
|
+
if (p.class) {
|
|
1031
|
+
const f = p.menuClass.split(" ");
|
|
1032
|
+
f && f.length && f.reduce((l, C) => (l[C] = !0, l), i);
|
|
983
1033
|
}
|
|
984
|
-
return
|
|
1034
|
+
return i;
|
|
985
1035
|
}
|
|
986
|
-
function t(
|
|
987
|
-
const
|
|
988
|
-
disabled: !
|
|
1036
|
+
function t(p) {
|
|
1037
|
+
const i = {
|
|
1038
|
+
disabled: !p.enable,
|
|
989
1039
|
"dropdown-submenu": !0,
|
|
990
1040
|
"f-rt-dropdown": !0
|
|
991
|
-
},
|
|
992
|
-
return
|
|
1041
|
+
}, f = p.dropdownClass.split(" ");
|
|
1042
|
+
return f && f.length && f.reduce((l, C) => (l[C] = !0, l), i), i;
|
|
993
1043
|
}
|
|
994
|
-
function
|
|
995
|
-
const
|
|
996
|
-
disabled: !
|
|
1044
|
+
function s(p) {
|
|
1045
|
+
const i = {
|
|
1046
|
+
disabled: !p.enable,
|
|
997
1047
|
"dropdown-item": !0,
|
|
998
1048
|
"f-rt-btn": !0
|
|
999
|
-
},
|
|
1000
|
-
return
|
|
1049
|
+
}, f = p.class.split(" ");
|
|
1050
|
+
return f && f.length && f.reduce((l, C) => (l[C] = !0, l), i), i;
|
|
1001
1051
|
}
|
|
1002
|
-
let
|
|
1052
|
+
let c;
|
|
1003
1053
|
const g = /* @__PURE__ */ new Map();
|
|
1004
|
-
function
|
|
1054
|
+
function d(p, i, f) {
|
|
1005
1055
|
var C;
|
|
1006
|
-
((C =
|
|
1007
|
-
const
|
|
1008
|
-
if (
|
|
1009
|
-
const w = g.get(
|
|
1056
|
+
((C = p.target) == null ? void 0 : C.id) === i.id && p.stopPropagation();
|
|
1057
|
+
const l = f ? f.id : "__top_item__";
|
|
1058
|
+
if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? g.set(l, i) : g.delete(l)), g.has(l) && g.get(l) !== i) {
|
|
1059
|
+
const w = g.get(l);
|
|
1010
1060
|
w && (w.expanded = !1);
|
|
1011
1061
|
}
|
|
1012
1062
|
}
|
|
1013
|
-
function
|
|
1014
|
-
document.body.click(),
|
|
1015
|
-
}
|
|
1016
|
-
function
|
|
1017
|
-
return
|
|
1018
|
-
class: t(
|
|
1019
|
-
id:
|
|
1020
|
-
onClick: (
|
|
1021
|
-
}, [
|
|
1022
|
-
id:
|
|
1023
|
-
class:
|
|
1024
|
-
onMouseover: (
|
|
1025
|
-
}, [
|
|
1063
|
+
function P(p, i) {
|
|
1064
|
+
document.body.click(), i.enable && i.onClick(p, i.id);
|
|
1065
|
+
}
|
|
1066
|
+
function S(p) {
|
|
1067
|
+
return p.children.map((i) => i.children && i.children.length ? b("li", {
|
|
1068
|
+
class: t(i),
|
|
1069
|
+
id: i.id,
|
|
1070
|
+
onClick: (f) => i.enable && d(f, i, p)
|
|
1071
|
+
}, [b("span", {
|
|
1072
|
+
id: i.id,
|
|
1073
|
+
class: s(i),
|
|
1074
|
+
onMouseover: (f) => i.enable && d(f, i, p)
|
|
1075
|
+
}, [i.text, b("i", {
|
|
1026
1076
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1027
1077
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1028
|
-
}, null)]),
|
|
1029
|
-
class:
|
|
1030
|
-
id:
|
|
1031
|
-
onClick: (
|
|
1032
|
-
onMouseover: (
|
|
1033
|
-
}, [n.shouldShowIcon(
|
|
1034
|
-
class: n.iconClass(
|
|
1035
|
-
}, null),
|
|
1036
|
-
}
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1039
|
-
display:
|
|
1078
|
+
}, null)]), c(i, i)]) : b("li", {
|
|
1079
|
+
class: s(i),
|
|
1080
|
+
id: i.id,
|
|
1081
|
+
onClick: (f) => P(f, i),
|
|
1082
|
+
onMouseover: (f) => i.enable && d(f, i, p)
|
|
1083
|
+
}, [n.shouldShowIcon(i) && b("i", {
|
|
1084
|
+
class: n.iconClass(i)
|
|
1085
|
+
}, null), i.text]));
|
|
1086
|
+
}
|
|
1087
|
+
function y(p, i, f) {
|
|
1088
|
+
const l = {
|
|
1089
|
+
display: p.expanded ? "block" : "none",
|
|
1040
1090
|
position: "fixed",
|
|
1041
1091
|
maxWidth: "300px",
|
|
1042
1092
|
width: "auto",
|
|
1043
1093
|
minWidth: "120px"
|
|
1044
|
-
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w =
|
|
1094
|
+
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = i, j = w == null ? void 0 : w.getClientRects();
|
|
1045
1095
|
if (w && j && j.length) {
|
|
1046
1096
|
const {
|
|
1047
|
-
top:
|
|
1048
|
-
width:
|
|
1097
|
+
top: I,
|
|
1098
|
+
width: D,
|
|
1049
1099
|
left: A,
|
|
1050
|
-
right:
|
|
1051
|
-
height:
|
|
1052
|
-
} = j[0],
|
|
1053
|
-
|
|
1054
|
-
const
|
|
1100
|
+
right: $,
|
|
1101
|
+
height: v
|
|
1102
|
+
} = j[0], m = Math.ceil(v + I);
|
|
1103
|
+
l.top = `${m}px`, l.left = `${A}px`;
|
|
1104
|
+
const x = p.id + "_menu", k = i ? i.querySelector("#" + x) : null;
|
|
1055
1105
|
if (k) {
|
|
1056
|
-
|
|
1057
|
-
const
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1106
|
+
l.display === "block" && (k.style.display = "block");
|
|
1107
|
+
const u = k.getBoundingClientRect();
|
|
1108
|
+
if (f) {
|
|
1109
|
+
l.top = `${I - 6}px`;
|
|
1110
|
+
const r = Math.ceil(D + A);
|
|
1111
|
+
l.left = `${r}px`;
|
|
1062
1112
|
}
|
|
1063
|
-
C - A -
|
|
1113
|
+
C - A - D < u.width && (l.left = `${(f ? A : $) - u.width}px`);
|
|
1064
1114
|
}
|
|
1065
1115
|
}
|
|
1066
|
-
return
|
|
1116
|
+
return l;
|
|
1067
1117
|
}
|
|
1068
|
-
|
|
1118
|
+
c = function(p, i) {
|
|
1069
1119
|
var w, j;
|
|
1070
|
-
const
|
|
1071
|
-
return
|
|
1072
|
-
class: e(
|
|
1073
|
-
style:
|
|
1074
|
-
id:
|
|
1075
|
-
}, [
|
|
1120
|
+
const f = Ce(), l = i ? i.id : p.id, C = (j = (w = f == null ? void 0 : f.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : j.querySelector("#" + l);
|
|
1121
|
+
return b("ul", {
|
|
1122
|
+
class: e(p),
|
|
1123
|
+
style: y(p, C, i),
|
|
1124
|
+
id: p.id + "_menu"
|
|
1125
|
+
}, [S(p)]);
|
|
1076
1126
|
};
|
|
1077
1127
|
function T() {
|
|
1078
|
-
g.forEach((
|
|
1079
|
-
|
|
1128
|
+
g.forEach((p) => {
|
|
1129
|
+
p.expanded = !1;
|
|
1080
1130
|
}), g.clear();
|
|
1081
1131
|
}
|
|
1082
1132
|
return {
|
|
1083
|
-
renderDropdownMenu:
|
|
1133
|
+
renderDropdownMenu: c,
|
|
1084
1134
|
clearAllDropDownMenu: T
|
|
1085
1135
|
};
|
|
1086
1136
|
}
|
|
1087
|
-
function
|
|
1088
|
-
const t =
|
|
1089
|
-
renderDropdownMenu:
|
|
1090
|
-
clearAllDropDownMenu:
|
|
1091
|
-
} =
|
|
1137
|
+
function _t(n, e) {
|
|
1138
|
+
const t = M(n.alignment), {
|
|
1139
|
+
renderDropdownMenu: s,
|
|
1140
|
+
clearAllDropDownMenu: c
|
|
1141
|
+
} = Nt(e);
|
|
1092
1142
|
function g(T) {
|
|
1093
|
-
const
|
|
1143
|
+
const p = {
|
|
1094
1144
|
"btn-group": !0,
|
|
1095
1145
|
"f-rt-dropdown": !0,
|
|
1096
1146
|
"f-btn-ml": t.value === "right",
|
|
1097
1147
|
"f-btn-mr": t.value === "left"
|
|
1098
|
-
},
|
|
1099
|
-
return
|
|
1148
|
+
}, i = T.dropdownClass.split(" ");
|
|
1149
|
+
return i && i.length && i.reduce((f, l) => (f[l] = !0, f), p), p;
|
|
1100
1150
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const
|
|
1151
|
+
function d(T) {
|
|
1152
|
+
const p = {
|
|
1103
1153
|
btn: !0,
|
|
1104
1154
|
disabled: !T.enable,
|
|
1105
1155
|
"f-rt-btn": !0,
|
|
1106
1156
|
"btn-icontext": !!(T.icon && T.icon.trim())
|
|
1107
1157
|
};
|
|
1108
1158
|
if (T.class) {
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1159
|
+
const i = T.class.split(" ");
|
|
1160
|
+
i && i.length && i.reduce((f, l) => (f[l] = !0, f), p);
|
|
1111
1161
|
}
|
|
1112
|
-
return
|
|
1162
|
+
return p;
|
|
1113
1163
|
}
|
|
1114
|
-
function
|
|
1164
|
+
function P(T, p) {
|
|
1115
1165
|
T.stopPropagation();
|
|
1116
|
-
const
|
|
1117
|
-
document.body.click(),
|
|
1166
|
+
const i = p.expanded;
|
|
1167
|
+
document.body.click(), p.expanded = !i;
|
|
1118
1168
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return
|
|
1169
|
+
function S(T) {
|
|
1170
|
+
return b("div", {
|
|
1121
1171
|
id: T.id,
|
|
1122
1172
|
class: g(T)
|
|
1123
|
-
}, [
|
|
1124
|
-
class:
|
|
1173
|
+
}, [b("div", {
|
|
1174
|
+
class: d(T),
|
|
1125
1175
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1126
|
-
onClick: (
|
|
1127
|
-
}, [e.shouldShowIcon(T) &&
|
|
1176
|
+
onClick: (p) => T.enable && P(p, T)
|
|
1177
|
+
}, [e.shouldShowIcon(T) && b("i", {
|
|
1128
1178
|
class: e.iconClass(T)
|
|
1129
|
-
}, null),
|
|
1179
|
+
}, null), b("span", null, [T.text]), b("i", {
|
|
1130
1180
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1131
1181
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1132
|
-
}, null)]),
|
|
1182
|
+
}, null)]), s(T)]);
|
|
1133
1183
|
}
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1184
|
+
function y() {
|
|
1185
|
+
c();
|
|
1136
1186
|
}
|
|
1137
1187
|
return {
|
|
1138
|
-
renderToolbarDropdown:
|
|
1139
|
-
clearAllDropDown:
|
|
1188
|
+
renderToolbarDropdown: S,
|
|
1189
|
+
clearAllDropDown: y
|
|
1140
1190
|
};
|
|
1141
1191
|
}
|
|
1142
1192
|
const {
|
|
1143
|
-
buildResponseToolbarItems:
|
|
1144
|
-
} =
|
|
1193
|
+
buildResponseToolbarItems: be
|
|
1194
|
+
} = xe(), Z = /* @__PURE__ */ z({
|
|
1145
1195
|
name: "FResponseToolbar",
|
|
1146
|
-
props:
|
|
1196
|
+
props: ue,
|
|
1147
1197
|
emits: ["click"],
|
|
1148
1198
|
setup(n, e) {
|
|
1149
|
-
const t =
|
|
1199
|
+
const t = M(be(n.items)), s = M(), c = M(), g = M(), d = M(n.alignment), P = {
|
|
1150
1200
|
id: "__more_buttons__",
|
|
1151
1201
|
text: "更多"
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
if (n.customClass) {
|
|
1159
|
-
const S = n.customClass.split(" ");
|
|
1160
|
-
S && S.length && S.reduce((k, p) => (k[p] = !0, k), f);
|
|
1161
|
-
}
|
|
1162
|
-
return f;
|
|
1163
|
-
}), a = F(() => ({
|
|
1202
|
+
}, S = M(new J(P)), y = ke(), T = F(() => S.value.children.length > 0), p = F(() => Y({
|
|
1203
|
+
"f-toolbar": !0,
|
|
1204
|
+
"f-response-toolbar": !0,
|
|
1205
|
+
"position-relative": !0
|
|
1206
|
+
}, n.customClass)), i = F(() => ({
|
|
1207
|
+
"w-100": !0,
|
|
1164
1208
|
"d-flex": !0,
|
|
1165
1209
|
"flex-nowrap": !0,
|
|
1166
|
-
"justify-content-end":
|
|
1167
|
-
"justify-content-start":
|
|
1210
|
+
"justify-content-end": d.value === "right",
|
|
1211
|
+
"justify-content-start": d.value === "left"
|
|
1168
1212
|
})), {
|
|
1169
|
-
renderToolbarDropdown:
|
|
1170
|
-
clearAllDropDown:
|
|
1171
|
-
} =
|
|
1213
|
+
renderToolbarDropdown: f,
|
|
1214
|
+
clearAllDropDown: l
|
|
1215
|
+
} = _t(n, y);
|
|
1172
1216
|
function C() {
|
|
1173
|
-
t.value.filter((
|
|
1174
|
-
|
|
1175
|
-
}),
|
|
1217
|
+
t.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
|
|
1218
|
+
m.expanded = !1;
|
|
1219
|
+
}), S.value.expanded = !1, l();
|
|
1176
1220
|
}
|
|
1177
|
-
function w(
|
|
1178
|
-
const
|
|
1221
|
+
function w(m) {
|
|
1222
|
+
const x = {
|
|
1179
1223
|
btn: !0,
|
|
1180
1224
|
"f-rt-btn": !0,
|
|
1181
|
-
"f-btn-ml":
|
|
1182
|
-
"f-btn-mr":
|
|
1183
|
-
"btn-icontext": !!(
|
|
1225
|
+
"f-btn-ml": d.value === "right",
|
|
1226
|
+
"f-btn-mr": d.value === "left",
|
|
1227
|
+
"btn-icontext": !!(m.icon && m.icon.trim())
|
|
1184
1228
|
};
|
|
1185
|
-
if (
|
|
1186
|
-
const k =
|
|
1187
|
-
k && k.length && k.reduce((
|
|
1229
|
+
if (m.class) {
|
|
1230
|
+
const k = m.class.split(" ");
|
|
1231
|
+
k && k.length && k.reduce((u, r) => (u[r] = !0, u), x);
|
|
1188
1232
|
}
|
|
1189
|
-
return
|
|
1233
|
+
return x;
|
|
1190
1234
|
}
|
|
1191
|
-
function j(
|
|
1192
|
-
document.body.click(),
|
|
1235
|
+
function j(m, x) {
|
|
1236
|
+
document.body.click(), typeof x.onClick == "function" && x.onClick(m, x.id), e.emit("click", m, x.id);
|
|
1193
1237
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1238
|
+
function I(m) {
|
|
1239
|
+
return b("button", {
|
|
1196
1240
|
type: "button",
|
|
1197
|
-
class: w(
|
|
1198
|
-
id:
|
|
1199
|
-
disabled: !
|
|
1200
|
-
onClick: (
|
|
1201
|
-
}, [
|
|
1202
|
-
class:
|
|
1203
|
-
}, null),
|
|
1241
|
+
class: w(m),
|
|
1242
|
+
id: m.id,
|
|
1243
|
+
disabled: !m.enable,
|
|
1244
|
+
onClick: (x) => j(x, m)
|
|
1245
|
+
}, [y.shouldShowIcon(m) && b("i", {
|
|
1246
|
+
class: y.iconClass(m)
|
|
1247
|
+
}, null), m.text]);
|
|
1204
1248
|
}
|
|
1205
|
-
const
|
|
1206
|
-
function
|
|
1207
|
-
const
|
|
1208
|
-
let k =
|
|
1209
|
-
const
|
|
1210
|
-
if (
|
|
1211
|
-
const
|
|
1249
|
+
const D = /* @__PURE__ */ new Map(), A = [];
|
|
1250
|
+
function $(m) {
|
|
1251
|
+
const x = g.value;
|
|
1252
|
+
let k = m;
|
|
1253
|
+
const u = Array.from(x.children), r = u[u.length - 1].id === "__more_buttons__" ? u[u.length - 1] : null;
|
|
1254
|
+
if (r) {
|
|
1255
|
+
const E = r.computedStyleMap().get("margin-left"), R = r.computedStyleMap().get("margin-right"), L = (E ? E.value : 0) + r.getBoundingClientRect().width + (R ? R.value : 0);
|
|
1212
1256
|
k -= L;
|
|
1213
1257
|
}
|
|
1214
|
-
const o =
|
|
1215
|
-
for (const
|
|
1216
|
-
const
|
|
1217
|
-
k <
|
|
1218
|
-
id:
|
|
1219
|
-
width:
|
|
1220
|
-
})) : k -=
|
|
1258
|
+
const o = u.filter((E) => E.id !== "__more_buttons__");
|
|
1259
|
+
for (const E of o) {
|
|
1260
|
+
const R = E.computedStyleMap().get("margin-left"), L = E.computedStyleMap().get("margin-right"), N = (R ? R.value : 0) + E.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1261
|
+
k < N ? (D.set(E.id, !0), A.push({
|
|
1262
|
+
id: E.id,
|
|
1263
|
+
width: N
|
|
1264
|
+
})) : k -= N;
|
|
1221
1265
|
}
|
|
1222
1266
|
if (A.length)
|
|
1223
|
-
for (let
|
|
1224
|
-
const
|
|
1225
|
-
if (k >=
|
|
1226
|
-
k -=
|
|
1267
|
+
for (let E = A.length - 1; E >= 0; E--) {
|
|
1268
|
+
const R = A[E].width;
|
|
1269
|
+
if (k >= R)
|
|
1270
|
+
k -= R, D.delete(A[E].id), A.pop();
|
|
1227
1271
|
else
|
|
1228
1272
|
break;
|
|
1229
1273
|
}
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1274
|
+
const a = Object.assign({}, S.value);
|
|
1275
|
+
a.children = [];
|
|
1276
|
+
const h = new J(a), B = t.value.reduce((E, R) => (D.has(R.id) && h.children.push(R), R.visible = !D.has(R.id), E.push(R), E), []);
|
|
1277
|
+
S.value = h, t.value = B;
|
|
1234
1278
|
}
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
const k =
|
|
1238
|
-
(k <
|
|
1279
|
+
const v = new ResizeObserver((m) => {
|
|
1280
|
+
if (m.length) {
|
|
1281
|
+
const k = m[0].contentRect.width, r = g.value.getBoundingClientRect().width;
|
|
1282
|
+
(k < r || A.length) && ($(k), C());
|
|
1239
1283
|
}
|
|
1240
1284
|
});
|
|
1241
1285
|
return H(() => {
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
}),
|
|
1245
|
-
|
|
1286
|
+
const m = c.value;
|
|
1287
|
+
v.observe(m), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
|
|
1288
|
+
}), ie(() => {
|
|
1289
|
+
v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
|
|
1246
1290
|
}), G(() => n.items, () => {
|
|
1247
|
-
t.value =
|
|
1291
|
+
t.value = be(n.items);
|
|
1248
1292
|
}, {
|
|
1249
1293
|
deep: !0
|
|
1250
1294
|
}), e.expose({
|
|
1251
|
-
elementRef:
|
|
1252
|
-
}), () =>
|
|
1253
|
-
class:
|
|
1254
|
-
ref:
|
|
1255
|
-
}, [
|
|
1256
|
-
ref:
|
|
1257
|
-
class:
|
|
1258
|
-
}, [
|
|
1295
|
+
elementRef: s
|
|
1296
|
+
}), () => b("div", {
|
|
1297
|
+
class: p.value,
|
|
1298
|
+
ref: s
|
|
1299
|
+
}, [b("div", {
|
|
1300
|
+
ref: c,
|
|
1301
|
+
class: i.value
|
|
1302
|
+
}, [b("div", {
|
|
1259
1303
|
ref: g,
|
|
1260
1304
|
class: "d-inline-block f-response-content",
|
|
1261
1305
|
style: "white-space: nowrap;"
|
|
1262
|
-
}, [t.value.filter((
|
|
1306
|
+
}, [t.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : I(m)), T.value && f(S.value)])])]);
|
|
1263
1307
|
}
|
|
1264
1308
|
});
|
|
1265
|
-
function
|
|
1266
|
-
const t = V("design-item-context"),
|
|
1309
|
+
function Ft(n, e) {
|
|
1310
|
+
const t = V("design-item-context"), s = V("toolbar-item-handler", () => {
|
|
1267
1311
|
});
|
|
1268
|
-
function
|
|
1269
|
-
|
|
1312
|
+
function c() {
|
|
1313
|
+
s && s();
|
|
1270
1314
|
}
|
|
1271
|
-
function g(
|
|
1315
|
+
function g(r) {
|
|
1272
1316
|
const o = {
|
|
1273
1317
|
"dropdown-menu": !0
|
|
1274
1318
|
};
|
|
1275
|
-
if (
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1319
|
+
if (r.class) {
|
|
1320
|
+
const a = r.menuClass.split(" ");
|
|
1321
|
+
a && a.length && a.reduce((h, B) => (h[B] = !0, h), o);
|
|
1278
1322
|
}
|
|
1279
1323
|
return o;
|
|
1280
1324
|
}
|
|
1281
|
-
function
|
|
1325
|
+
function d(r) {
|
|
1282
1326
|
const o = {
|
|
1283
|
-
disabled: !
|
|
1327
|
+
disabled: !r.enable,
|
|
1284
1328
|
"dropdown-submenu": !0,
|
|
1285
1329
|
"f-rt-dropdown": !0
|
|
1286
|
-
},
|
|
1287
|
-
return
|
|
1330
|
+
}, a = r.dropdownClass.split(" ");
|
|
1331
|
+
return a && a.length && a.reduce((h, B) => (h[B] = !0, h), o), o;
|
|
1288
1332
|
}
|
|
1289
|
-
function
|
|
1333
|
+
function P(r) {
|
|
1290
1334
|
const o = {
|
|
1291
|
-
disabled: !
|
|
1335
|
+
disabled: !r.enable,
|
|
1292
1336
|
"dropdown-item": !0,
|
|
1293
1337
|
"f-rt-btn": !0,
|
|
1294
1338
|
"position-relative": !0,
|
|
1295
1339
|
"farris-component": !0
|
|
1296
|
-
},
|
|
1297
|
-
return
|
|
1340
|
+
}, a = r.class.split(" ");
|
|
1341
|
+
return a && a.length && a.reduce((h, B) => (h[B] = !0, h), o), o;
|
|
1298
1342
|
}
|
|
1299
|
-
let
|
|
1300
|
-
const
|
|
1301
|
-
function T(
|
|
1343
|
+
let S;
|
|
1344
|
+
const y = /* @__PURE__ */ new Map();
|
|
1345
|
+
function T(r, o, a) {
|
|
1302
1346
|
var B;
|
|
1303
|
-
((B =
|
|
1304
|
-
const
|
|
1305
|
-
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ?
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1347
|
+
((B = r.target) == null ? void 0 : B.id) === o.id && r.stopPropagation();
|
|
1348
|
+
const h = a ? a.id : "__top_item__";
|
|
1349
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? y.set(h, o) : y.delete(h)), y.has(h) && y.get(h) !== o) {
|
|
1350
|
+
const E = y.get(h);
|
|
1351
|
+
E && (E.expanded = !1);
|
|
1308
1352
|
}
|
|
1309
1353
|
}
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1354
|
+
function p(r) {
|
|
1355
|
+
r && (r.stopPropagation(), r.preventDefault());
|
|
1312
1356
|
}
|
|
1313
|
-
function
|
|
1357
|
+
function i() {
|
|
1314
1358
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1315
|
-
const
|
|
1316
|
-
Array.from(
|
|
1359
|
+
const r = document.getElementsByClassName("dgComponentSelected");
|
|
1360
|
+
Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1317
1361
|
}
|
|
1318
|
-
function
|
|
1319
|
-
|
|
1362
|
+
function f(r) {
|
|
1363
|
+
r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1320
1364
|
}
|
|
1321
|
-
function
|
|
1365
|
+
function l(r) {
|
|
1322
1366
|
const {
|
|
1323
1367
|
buttons: o = []
|
|
1324
1368
|
} = t.schema;
|
|
1325
|
-
let
|
|
1326
|
-
o.forEach((
|
|
1327
|
-
|
|
1369
|
+
let a = [];
|
|
1370
|
+
o.forEach((E) => {
|
|
1371
|
+
a = a.concat(E.children || []);
|
|
1328
1372
|
});
|
|
1329
|
-
const
|
|
1373
|
+
const h = a.findIndex((E) => E.id === r), B = h === -1 ? null : a[h];
|
|
1330
1374
|
return {
|
|
1331
|
-
index:
|
|
1375
|
+
index: h,
|
|
1332
1376
|
item: B
|
|
1333
1377
|
};
|
|
1334
1378
|
}
|
|
1335
|
-
function C(
|
|
1379
|
+
function C(r) {
|
|
1336
1380
|
const {
|
|
1337
1381
|
buttons: o = []
|
|
1338
|
-
} = t.schema,
|
|
1382
|
+
} = t.schema, a = o.findIndex((B) => B.id === r), h = a === -1 ? null : o[a];
|
|
1339
1383
|
return {
|
|
1340
|
-
index:
|
|
1341
|
-
item:
|
|
1384
|
+
index: a,
|
|
1385
|
+
item: h
|
|
1342
1386
|
};
|
|
1343
1387
|
}
|
|
1344
|
-
function w(
|
|
1345
|
-
var
|
|
1388
|
+
function w(r) {
|
|
1389
|
+
var h;
|
|
1346
1390
|
t.schema;
|
|
1347
1391
|
const {
|
|
1348
1392
|
index: o,
|
|
1349
|
-
item:
|
|
1350
|
-
} =
|
|
1351
|
-
(
|
|
1393
|
+
item: a
|
|
1394
|
+
} = l(r);
|
|
1395
|
+
(h = t == null ? void 0 : t.setupContext) == null || h.emit("selectionChange", a == null ? void 0 : a.type, a);
|
|
1352
1396
|
}
|
|
1353
|
-
const j = function(
|
|
1397
|
+
const j = function(r) {
|
|
1354
1398
|
const {
|
|
1355
1399
|
componentType: o
|
|
1356
|
-
} =
|
|
1357
|
-
return
|
|
1358
|
-
},
|
|
1359
|
-
const
|
|
1400
|
+
} = r, a = U(o, r), h = o.toLowerCase().replace("-", "_");
|
|
1401
|
+
return a && !a.id && a.type === o && (a.id = `${h}_${Math.random().toString().slice(2, 6)}`), a;
|
|
1402
|
+
}, I = function() {
|
|
1403
|
+
const r = {
|
|
1360
1404
|
componentType: "response-toolbar-item",
|
|
1361
1405
|
parentComponentInstance: e.value,
|
|
1362
1406
|
targetPosition: -1
|
|
1363
1407
|
};
|
|
1364
|
-
return j(
|
|
1408
|
+
return j(r);
|
|
1365
1409
|
};
|
|
1366
|
-
function
|
|
1367
|
-
|
|
1410
|
+
function D(r, o) {
|
|
1411
|
+
p(r), i(), f(r), w(o.id);
|
|
1368
1412
|
}
|
|
1369
|
-
function A(
|
|
1370
|
-
|
|
1371
|
-
const
|
|
1372
|
-
buttons:
|
|
1413
|
+
function A(r, o, a) {
|
|
1414
|
+
p(r);
|
|
1415
|
+
const h = o.id, B = a && a.id, {
|
|
1416
|
+
buttons: E = []
|
|
1373
1417
|
} = t.schema;
|
|
1374
1418
|
if (!B)
|
|
1375
1419
|
return;
|
|
1376
1420
|
const {
|
|
1377
|
-
index:
|
|
1421
|
+
index: R
|
|
1378
1422
|
} = C(B);
|
|
1379
|
-
if (
|
|
1423
|
+
if (R === -1)
|
|
1380
1424
|
return;
|
|
1381
1425
|
const {
|
|
1382
1426
|
index: L
|
|
1383
|
-
} =
|
|
1384
|
-
L !== -1 && (
|
|
1427
|
+
} = l(h);
|
|
1428
|
+
L !== -1 && (E[R].children.splice(L, 1), c());
|
|
1385
1429
|
}
|
|
1386
|
-
function
|
|
1387
|
-
|
|
1388
|
-
const
|
|
1430
|
+
function $(r, o, a) {
|
|
1431
|
+
p(r);
|
|
1432
|
+
const h = a && a.id, {
|
|
1389
1433
|
buttons: B = []
|
|
1390
1434
|
} = t.schema;
|
|
1391
|
-
if (!
|
|
1435
|
+
if (!h)
|
|
1392
1436
|
return;
|
|
1393
1437
|
const {
|
|
1394
|
-
index:
|
|
1395
|
-
} = C(
|
|
1396
|
-
if (
|
|
1438
|
+
index: E
|
|
1439
|
+
} = C(h);
|
|
1440
|
+
if (E === -1)
|
|
1397
1441
|
return;
|
|
1398
|
-
const
|
|
1442
|
+
const R = I(), L = Object.assign({}, R, {
|
|
1399
1443
|
text: o.text
|
|
1400
1444
|
});
|
|
1401
|
-
B[
|
|
1445
|
+
B[E].children.push(L), c();
|
|
1402
1446
|
}
|
|
1403
|
-
function
|
|
1404
|
-
|
|
1405
|
-
const
|
|
1447
|
+
function v(r, o, a) {
|
|
1448
|
+
p(r);
|
|
1449
|
+
const h = a && a.id, {
|
|
1406
1450
|
buttons: B = []
|
|
1407
1451
|
} = t.schema;
|
|
1408
|
-
if (!
|
|
1452
|
+
if (!h)
|
|
1409
1453
|
return;
|
|
1410
1454
|
const {
|
|
1411
|
-
index:
|
|
1412
|
-
} = C(
|
|
1413
|
-
if (
|
|
1455
|
+
index: E
|
|
1456
|
+
} = C(h);
|
|
1457
|
+
if (E === -1)
|
|
1414
1458
|
return;
|
|
1415
|
-
const
|
|
1459
|
+
const R = I(), L = Object.assign({}, R, {
|
|
1416
1460
|
text: "按钮"
|
|
1417
1461
|
});
|
|
1418
|
-
B[
|
|
1462
|
+
B[E].children.push(L), c();
|
|
1419
1463
|
}
|
|
1420
|
-
function
|
|
1421
|
-
return
|
|
1464
|
+
function m(r, o) {
|
|
1465
|
+
return b("div", {
|
|
1422
1466
|
class: "component-btn-group"
|
|
1423
|
-
}, [
|
|
1467
|
+
}, [b("div", null, [b("div", {
|
|
1424
1468
|
role: "button",
|
|
1425
1469
|
class: "btn component-settings-button",
|
|
1426
1470
|
title: "删除",
|
|
1427
1471
|
ref: "removeButton",
|
|
1428
1472
|
style: "position:static;",
|
|
1429
|
-
onClick: (
|
|
1430
|
-
}, [
|
|
1473
|
+
onClick: (a) => A(a, r, o)
|
|
1474
|
+
}, [b("i", {
|
|
1431
1475
|
class: "f-icon f-icon-yxs_delete"
|
|
1432
|
-
}, null)]),
|
|
1476
|
+
}, null)]), b("div", {
|
|
1433
1477
|
role: "button",
|
|
1434
1478
|
class: "btn component-settings-button",
|
|
1435
1479
|
title: "复制",
|
|
1436
1480
|
ref: "copyButton",
|
|
1437
1481
|
style: "position:static;",
|
|
1438
|
-
onClick: (
|
|
1439
|
-
}, [
|
|
1482
|
+
onClick: (a) => $(a, r, o)
|
|
1483
|
+
}, [b("i", {
|
|
1440
1484
|
class: "f-icon f-icon-yxs_copy"
|
|
1441
|
-
}, null)]),
|
|
1485
|
+
}, null)]), b("div", {
|
|
1442
1486
|
role: "button",
|
|
1443
1487
|
class: "btn component-settings-button",
|
|
1444
1488
|
title: "新增同级",
|
|
1445
1489
|
ref: "appendSame",
|
|
1446
1490
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1447
|
-
onClick: (
|
|
1448
|
-
}, [
|
|
1491
|
+
onClick: (a) => v(a, r, o)
|
|
1492
|
+
}, [b("i", {
|
|
1449
1493
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1450
|
-
}, null),
|
|
1494
|
+
}, null), b("span", {
|
|
1451
1495
|
style: "font-size:13px;margin:auto"
|
|
1452
1496
|
}, [Q("新增同级")])])])]);
|
|
1453
1497
|
}
|
|
1454
|
-
function
|
|
1455
|
-
return
|
|
1456
|
-
class:
|
|
1498
|
+
function x(r) {
|
|
1499
|
+
return r.children.map((o) => o.children && o.children.length ? b("li", {
|
|
1500
|
+
class: d(o),
|
|
1457
1501
|
id: o.id,
|
|
1458
|
-
onClick: (
|
|
1459
|
-
}, [
|
|
1502
|
+
onClick: (a) => o.enable && T(a, o, r)
|
|
1503
|
+
}, [b("span", {
|
|
1460
1504
|
id: o.id,
|
|
1461
|
-
class:
|
|
1462
|
-
onMouseover: (
|
|
1463
|
-
}, [o.text,
|
|
1505
|
+
class: P(o),
|
|
1506
|
+
onMouseover: (a) => o.enable && T(a, o, r)
|
|
1507
|
+
}, [o.text, b("i", {
|
|
1464
1508
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1465
1509
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1466
|
-
}, null)]),
|
|
1467
|
-
class:
|
|
1510
|
+
}, null)]), S(o, o)]) : b("li", {
|
|
1511
|
+
class: P(o),
|
|
1468
1512
|
id: o.id,
|
|
1469
|
-
onClick: (
|
|
1470
|
-
}, [
|
|
1513
|
+
onClick: (a) => D(a, o)
|
|
1514
|
+
}, [m(o, r), n.shouldShowIcon(o) && b("i", {
|
|
1471
1515
|
class: n.iconClass(o)
|
|
1472
1516
|
}, null), o.text]));
|
|
1473
1517
|
}
|
|
1474
|
-
function k(
|
|
1475
|
-
const
|
|
1476
|
-
display:
|
|
1518
|
+
function k(r, o, a) {
|
|
1519
|
+
const h = {
|
|
1520
|
+
display: r.expanded ? "block" : "none",
|
|
1477
1521
|
position: "fixed",
|
|
1478
1522
|
maxWidth: "300px",
|
|
1479
1523
|
width: "auto",
|
|
1480
1524
|
minWidth: "120px"
|
|
1481
|
-
}, B = document.getElementsByTagName("body")[0].getClientRects()[0].width,
|
|
1482
|
-
if (
|
|
1525
|
+
}, B = document.getElementsByTagName("body")[0].getClientRects()[0].width, E = o, R = E == null ? void 0 : E.getClientRects();
|
|
1526
|
+
if (E && R && R.length) {
|
|
1483
1527
|
const {
|
|
1484
1528
|
top: L,
|
|
1485
|
-
width:
|
|
1529
|
+
width: N,
|
|
1486
1530
|
left: _,
|
|
1487
1531
|
right: W,
|
|
1488
1532
|
height: q
|
|
1489
|
-
} =
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1494
|
-
const
|
|
1495
|
-
if (
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1533
|
+
} = R[0], te = Math.ceil(q + L);
|
|
1534
|
+
h.top = `${te}px`, h.left = `${_}px`;
|
|
1535
|
+
const Oe = r.id + "_menu", ne = o ? o.querySelector("#" + Oe) : null;
|
|
1536
|
+
if (ne) {
|
|
1537
|
+
h.display === "block" && (ne.style.display = "block");
|
|
1538
|
+
const fe = ne.getBoundingClientRect();
|
|
1539
|
+
if (a) {
|
|
1540
|
+
h.top = `${L - 6}px`;
|
|
1541
|
+
const $e = Math.ceil(N + _);
|
|
1542
|
+
h.left = `${$e}px`;
|
|
1499
1543
|
}
|
|
1500
|
-
B - _ -
|
|
1544
|
+
B - _ - N < fe.width && (h.left = `${(a ? _ : W) - fe.width}px`);
|
|
1501
1545
|
}
|
|
1502
1546
|
}
|
|
1503
|
-
return
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
var
|
|
1507
|
-
const
|
|
1508
|
-
return
|
|
1509
|
-
class: g(
|
|
1510
|
-
style: k(
|
|
1511
|
-
id:
|
|
1512
|
-
}, [
|
|
1547
|
+
return h;
|
|
1548
|
+
}
|
|
1549
|
+
S = function(r, o) {
|
|
1550
|
+
var E, R;
|
|
1551
|
+
const a = Ce(), h = o ? o.id : r.id, B = (R = (E = a == null ? void 0 : a.exposed) == null ? void 0 : E.elementRef.value) == null ? void 0 : R.querySelector("#" + h);
|
|
1552
|
+
return b("ul", {
|
|
1553
|
+
class: g(r),
|
|
1554
|
+
style: k(r, B, o),
|
|
1555
|
+
id: r.id + "_menu"
|
|
1556
|
+
}, [x(r)]);
|
|
1513
1557
|
};
|
|
1514
|
-
function
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
}),
|
|
1558
|
+
function u() {
|
|
1559
|
+
y.forEach((r) => {
|
|
1560
|
+
r.expanded = !1;
|
|
1561
|
+
}), y.clear();
|
|
1518
1562
|
}
|
|
1519
1563
|
return {
|
|
1520
|
-
renderDropdownMenu:
|
|
1521
|
-
clearAllDropDownMenu:
|
|
1564
|
+
renderDropdownMenu: S,
|
|
1565
|
+
clearAllDropDownMenu: u
|
|
1522
1566
|
};
|
|
1523
1567
|
}
|
|
1524
|
-
function
|
|
1525
|
-
const
|
|
1526
|
-
renderDropdownMenu:
|
|
1568
|
+
function Lt(n, e, t) {
|
|
1569
|
+
const s = M(n.alignment), {
|
|
1570
|
+
renderDropdownMenu: c,
|
|
1527
1571
|
clearAllDropDownMenu: g
|
|
1528
|
-
} =
|
|
1572
|
+
} = Ft(e, t), d = V("design-item-context"), P = V("toolbar-item-handler", () => {
|
|
1529
1573
|
});
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1574
|
+
function S() {
|
|
1575
|
+
P && P();
|
|
1532
1576
|
}
|
|
1533
|
-
function
|
|
1534
|
-
const
|
|
1577
|
+
function y(u) {
|
|
1578
|
+
const r = {
|
|
1535
1579
|
"btn-group": !0,
|
|
1536
1580
|
"f-rt-dropdown": !0,
|
|
1537
|
-
"f-btn-ml":
|
|
1538
|
-
"f-btn-mr":
|
|
1539
|
-
}, o =
|
|
1540
|
-
return o && o.length && o.reduce((
|
|
1581
|
+
"f-btn-ml": s.value === "right",
|
|
1582
|
+
"f-btn-mr": s.value === "left"
|
|
1583
|
+
}, o = u.dropdownClass.split(" ");
|
|
1584
|
+
return o && o.length && o.reduce((a, h) => (a[h] = !0, a), r), r;
|
|
1541
1585
|
}
|
|
1542
|
-
function T(
|
|
1543
|
-
const
|
|
1586
|
+
function T(u) {
|
|
1587
|
+
const r = {
|
|
1544
1588
|
btn: !0,
|
|
1545
|
-
disabled: !
|
|
1589
|
+
disabled: !u.enable,
|
|
1546
1590
|
"position-relative": !0,
|
|
1547
1591
|
"farris-component": !0,
|
|
1548
1592
|
"f-rt-btn": !0,
|
|
1549
|
-
"btn-icontext": !!(
|
|
1593
|
+
"btn-icontext": !!(u.icon && u.icon.trim())
|
|
1550
1594
|
};
|
|
1551
|
-
if (
|
|
1552
|
-
const o =
|
|
1553
|
-
o && o.length && o.reduce((
|
|
1595
|
+
if (u.class) {
|
|
1596
|
+
const o = u.class.split(" ");
|
|
1597
|
+
o && o.length && o.reduce((a, h) => (a[h] = !0, a), r);
|
|
1554
1598
|
}
|
|
1555
|
-
return
|
|
1599
|
+
return r;
|
|
1556
1600
|
}
|
|
1557
|
-
function
|
|
1558
|
-
|
|
1601
|
+
function p(u) {
|
|
1602
|
+
u && (u.stopPropagation(), u.preventDefault());
|
|
1559
1603
|
}
|
|
1560
|
-
function
|
|
1561
|
-
|
|
1562
|
-
const o =
|
|
1563
|
-
document.body.click(),
|
|
1604
|
+
function i(u, r) {
|
|
1605
|
+
p(u);
|
|
1606
|
+
const o = r.expanded;
|
|
1607
|
+
document.body.click(), r.expanded = !o;
|
|
1564
1608
|
}
|
|
1565
|
-
const
|
|
1609
|
+
const f = function(u) {
|
|
1566
1610
|
const {
|
|
1567
|
-
componentType:
|
|
1568
|
-
} =
|
|
1569
|
-
return o && !o.id && o.type ===
|
|
1570
|
-
},
|
|
1571
|
-
const
|
|
1611
|
+
componentType: r
|
|
1612
|
+
} = u, o = U(r, u), a = r.toLowerCase().replace("-", "_");
|
|
1613
|
+
return o && !o.id && o.type === r && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1614
|
+
}, l = function() {
|
|
1615
|
+
const u = {
|
|
1572
1616
|
componentType: "response-toolbar-item",
|
|
1573
1617
|
parentComponentInstance: t.value,
|
|
1574
1618
|
targetPosition: -1
|
|
1575
1619
|
};
|
|
1576
|
-
return
|
|
1620
|
+
return f(u);
|
|
1577
1621
|
};
|
|
1578
|
-
function C(
|
|
1579
|
-
const
|
|
1622
|
+
function C(u) {
|
|
1623
|
+
const r = d.schema.buttons || d.schema.contents, o = r == null ? void 0 : r.findIndex((h) => h.id === u), a = o === -1 ? null : r[o];
|
|
1580
1624
|
return {
|
|
1581
1625
|
index: o,
|
|
1582
|
-
toolbarItem:
|
|
1626
|
+
toolbarItem: a
|
|
1583
1627
|
};
|
|
1584
1628
|
}
|
|
1585
|
-
function w(
|
|
1586
|
-
var
|
|
1629
|
+
function w(u, r) {
|
|
1630
|
+
var R;
|
|
1587
1631
|
const {
|
|
1588
1632
|
index: o,
|
|
1589
|
-
toolbarItem:
|
|
1590
|
-
} = C(
|
|
1633
|
+
toolbarItem: a
|
|
1634
|
+
} = C(r);
|
|
1591
1635
|
if (o === -1)
|
|
1592
1636
|
return;
|
|
1593
|
-
const
|
|
1594
|
-
text:
|
|
1637
|
+
const h = a.text || "按钮", B = l(), E = Object.assign({}, B, {
|
|
1638
|
+
text: h
|
|
1595
1639
|
});
|
|
1596
|
-
(
|
|
1640
|
+
(R = d.schema.buttons) == null || R.push(E), S();
|
|
1597
1641
|
}
|
|
1598
|
-
function j(
|
|
1642
|
+
function j(u, r) {
|
|
1599
1643
|
const {
|
|
1600
1644
|
index: o,
|
|
1601
|
-
toolbarItem:
|
|
1602
|
-
} = C(
|
|
1645
|
+
toolbarItem: a
|
|
1646
|
+
} = C(r);
|
|
1603
1647
|
if (o === -1)
|
|
1604
1648
|
return;
|
|
1605
|
-
const
|
|
1606
|
-
text:
|
|
1607
|
-
}),
|
|
1608
|
-
|
|
1649
|
+
const h = a.text || "按钮", B = l(), E = Object.assign({}, B, {
|
|
1650
|
+
text: h
|
|
1651
|
+
}), R = d.schema.buttons[o].children || [];
|
|
1652
|
+
R.push(E), d.schema.buttons[o].children = R, S();
|
|
1609
1653
|
}
|
|
1610
|
-
function
|
|
1611
|
-
const o =
|
|
1612
|
-
|
|
1654
|
+
function I(u, r) {
|
|
1655
|
+
const o = d.schema.buttons || d.schema.contents, a = o == null ? void 0 : o.findIndex((h) => h.id === r);
|
|
1656
|
+
a !== -1 && (o.splice(a, 1), S());
|
|
1613
1657
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return
|
|
1658
|
+
function D(u) {
|
|
1659
|
+
return b("div", {
|
|
1616
1660
|
class: "component-btn-group"
|
|
1617
|
-
}, [
|
|
1661
|
+
}, [b("div", null, [b("div", {
|
|
1618
1662
|
role: "button",
|
|
1619
1663
|
class: "btn component-settings-button",
|
|
1620
1664
|
title: "删除",
|
|
1621
1665
|
ref: "removeButton",
|
|
1622
1666
|
style: "position:static;",
|
|
1623
|
-
onClick: (
|
|
1624
|
-
}, [
|
|
1667
|
+
onClick: (r) => I(r, u)
|
|
1668
|
+
}, [b("i", {
|
|
1625
1669
|
class: "f-icon f-icon-yxs_delete"
|
|
1626
|
-
}, null)]),
|
|
1670
|
+
}, null)]), b("div", {
|
|
1627
1671
|
role: "button",
|
|
1628
1672
|
class: "btn component-settings-button",
|
|
1629
1673
|
title: "复制",
|
|
1630
1674
|
ref: "copyButton",
|
|
1631
1675
|
style: "position:static;",
|
|
1632
|
-
onClick: (
|
|
1633
|
-
}, [
|
|
1676
|
+
onClick: (r) => w(r, u)
|
|
1677
|
+
}, [b("i", {
|
|
1634
1678
|
class: "f-icon f-icon-yxs_copy"
|
|
1635
|
-
}, null)]),
|
|
1679
|
+
}, null)]), b("div", {
|
|
1636
1680
|
role: "button",
|
|
1637
1681
|
class: "btn component-settings-button",
|
|
1638
1682
|
title: "新增子级",
|
|
1639
1683
|
ref: "appendChildButton",
|
|
1640
1684
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1641
|
-
onClick: (
|
|
1642
|
-
}, [
|
|
1685
|
+
onClick: (r) => j(r, u)
|
|
1686
|
+
}, [b("i", {
|
|
1643
1687
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1644
|
-
}, null),
|
|
1688
|
+
}, null), b("span", {
|
|
1645
1689
|
style: "font-size:13px;margin:auto"
|
|
1646
1690
|
}, [Q("新增子级")])])])]);
|
|
1647
1691
|
}
|
|
1648
1692
|
function A() {
|
|
1649
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1650
|
-
const
|
|
1651
|
-
Array.from(
|
|
1693
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
|
|
1694
|
+
const u = document.getElementsByClassName("dgComponentSelected");
|
|
1695
|
+
Array.from(u).forEach((r) => r.classList.remove("dgComponentSelected"));
|
|
1652
1696
|
}
|
|
1653
|
-
function
|
|
1654
|
-
|
|
1697
|
+
function $(u) {
|
|
1698
|
+
u.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1655
1699
|
}
|
|
1656
|
-
function
|
|
1657
|
-
var
|
|
1658
|
-
const
|
|
1700
|
+
function v(u) {
|
|
1701
|
+
var h;
|
|
1702
|
+
const r = d.schema.buttons || d.schema.contents, o = r == null ? void 0 : r.findIndex((B) => B.id === u);
|
|
1659
1703
|
if (o === -1)
|
|
1660
1704
|
return;
|
|
1661
|
-
const
|
|
1662
|
-
(
|
|
1663
|
-
}
|
|
1664
|
-
function
|
|
1665
|
-
|
|
1666
|
-
}
|
|
1667
|
-
function
|
|
1668
|
-
return
|
|
1669
|
-
id:
|
|
1670
|
-
class:
|
|
1671
|
-
}, [
|
|
1672
|
-
class: T(
|
|
1705
|
+
const a = r[o];
|
|
1706
|
+
(h = d == null ? void 0 : d.setupContext) == null || h.emit("selectionChange", "response-toolbar-item", a);
|
|
1707
|
+
}
|
|
1708
|
+
function m(u, r) {
|
|
1709
|
+
p(u), A(), $(u), p(u), i(u, r), v(r.id);
|
|
1710
|
+
}
|
|
1711
|
+
function x(u) {
|
|
1712
|
+
return b("div", {
|
|
1713
|
+
id: u.id,
|
|
1714
|
+
class: y(u)
|
|
1715
|
+
}, [b("div", {
|
|
1716
|
+
class: T(u),
|
|
1673
1717
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1674
|
-
onClick: (
|
|
1675
|
-
}, [
|
|
1676
|
-
class: e.iconClass(
|
|
1677
|
-
}, null),
|
|
1718
|
+
onClick: (r) => u.enable && m(r, u)
|
|
1719
|
+
}, [D(u.id), e.shouldShowIcon(u) && b("i", {
|
|
1720
|
+
class: e.iconClass(u)
|
|
1721
|
+
}, null), b("span", null, [u.text]), b("i", {
|
|
1678
1722
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1679
1723
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1680
|
-
}, null)]), u
|
|
1724
|
+
}, null)]), c(u)]);
|
|
1681
1725
|
}
|
|
1682
1726
|
function k() {
|
|
1683
1727
|
g();
|
|
1684
1728
|
}
|
|
1685
1729
|
return {
|
|
1686
|
-
renderToolbarDropdown:
|
|
1730
|
+
renderToolbarDropdown: x,
|
|
1687
1731
|
clearAllDropDown: k
|
|
1688
1732
|
};
|
|
1689
1733
|
}
|
|
1690
|
-
function
|
|
1734
|
+
function Vt() {
|
|
1691
1735
|
function n(e) {
|
|
1692
|
-
var
|
|
1736
|
+
var c, g;
|
|
1693
1737
|
if (!e)
|
|
1694
1738
|
return !1;
|
|
1695
|
-
const t = ((
|
|
1739
|
+
const t = ((c = e.targetContainer) == null ? void 0 : c.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1696
1740
|
if (!t)
|
|
1697
1741
|
return !1;
|
|
1698
|
-
const
|
|
1742
|
+
const s = (g = t.schema.appearance) == null ? void 0 : g.class;
|
|
1699
1743
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1700
|
-
const
|
|
1701
|
-
if (t.schema.type !== "response-layout-item" && !
|
|
1744
|
+
const d = t.schema.type, P = (d === "response-form" || d === "content-container") && s && s.includes("farris-form");
|
|
1745
|
+
if (t.schema.type !== "response-layout-item" && !P)
|
|
1702
1746
|
return !1;
|
|
1703
1747
|
}
|
|
1704
1748
|
return e.controlType !== "field-set";
|
|
@@ -1707,7 +1751,7 @@ function Ot() {
|
|
|
1707
1751
|
basalDragulaRuleForContainer: n
|
|
1708
1752
|
};
|
|
1709
1753
|
}
|
|
1710
|
-
const
|
|
1754
|
+
const Wt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/dragging-rules.schema.json", qt = "Dragging Rules", Ht = "The rules of designer canvas", zt = "object", Gt = {
|
|
1711
1755
|
"f-page": {
|
|
1712
1756
|
description: "The root class of page designed by farris.",
|
|
1713
1757
|
type: "object",
|
|
@@ -2126,6 +2170,80 @@ const Nt = "https://json-schema.org/draft/2020-12/schema", $t = "https://farris-
|
|
|
2126
2170
|
"f-list-nav-left": {
|
|
2127
2171
|
description: "",
|
|
2128
2172
|
type: "object"
|
|
2173
|
+
},
|
|
2174
|
+
"f-struct-data-grid-in-nav": {
|
|
2175
|
+
description: "",
|
|
2176
|
+
type: "object",
|
|
2177
|
+
properties: {
|
|
2178
|
+
contents: {
|
|
2179
|
+
type: "object",
|
|
2180
|
+
properties: {
|
|
2181
|
+
"f-section-form": {
|
|
2182
|
+
description: "",
|
|
2183
|
+
type: "object",
|
|
2184
|
+
properties: {
|
|
2185
|
+
rules: {
|
|
2186
|
+
type: "object",
|
|
2187
|
+
properties: {
|
|
2188
|
+
canAccept: {
|
|
2189
|
+
type: "boolean",
|
|
2190
|
+
const: !1
|
|
2191
|
+
},
|
|
2192
|
+
fixed: {
|
|
2193
|
+
type: "boolean",
|
|
2194
|
+
const: !0
|
|
2195
|
+
},
|
|
2196
|
+
hidePadding: {
|
|
2197
|
+
type: "boolean",
|
|
2198
|
+
const: !0
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
"f-section-grid": {
|
|
2205
|
+
description: "",
|
|
2206
|
+
type: "object",
|
|
2207
|
+
properties: {
|
|
2208
|
+
rules: {
|
|
2209
|
+
type: "object",
|
|
2210
|
+
properties: {
|
|
2211
|
+
canAccept: {
|
|
2212
|
+
type: "boolean",
|
|
2213
|
+
const: !1
|
|
2214
|
+
},
|
|
2215
|
+
fixed: {
|
|
2216
|
+
type: "boolean",
|
|
2217
|
+
const: !0
|
|
2218
|
+
},
|
|
2219
|
+
hidePadding: {
|
|
2220
|
+
type: "boolean",
|
|
2221
|
+
const: !0
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
rules: {
|
|
2230
|
+
type: "object",
|
|
2231
|
+
properties: {
|
|
2232
|
+
canAccept: {
|
|
2233
|
+
type: "boolean",
|
|
2234
|
+
const: !1
|
|
2235
|
+
},
|
|
2236
|
+
fixed: {
|
|
2237
|
+
type: "boolean",
|
|
2238
|
+
const: !0
|
|
2239
|
+
},
|
|
2240
|
+
hidePadding: {
|
|
2241
|
+
type: "boolean",
|
|
2242
|
+
const: !0
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2129
2247
|
}
|
|
2130
2248
|
}
|
|
2131
2249
|
}
|
|
@@ -2271,106 +2389,105 @@ const Nt = "https://json-schema.org/draft/2020-12/schema", $t = "https://farris-
|
|
|
2271
2389
|
description: "",
|
|
2272
2390
|
type: "object"
|
|
2273
2391
|
}
|
|
2274
|
-
},
|
|
2275
|
-
$schema:
|
|
2276
|
-
$id:
|
|
2277
|
-
title:
|
|
2278
|
-
description:
|
|
2279
|
-
type:
|
|
2280
|
-
properties:
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
function
|
|
2284
|
-
|
|
2285
|
-
var R;
|
|
2392
|
+
}, Jt = {
|
|
2393
|
+
$schema: Wt,
|
|
2394
|
+
$id: Ut,
|
|
2395
|
+
title: qt,
|
|
2396
|
+
description: Ht,
|
|
2397
|
+
type: zt,
|
|
2398
|
+
properties: Gt
|
|
2399
|
+
}, re = /* @__PURE__ */ new Map();
|
|
2400
|
+
function Ae() {
|
|
2401
|
+
function n(l, C, w, j) {
|
|
2402
|
+
var I;
|
|
2286
2403
|
if (typeof w == "number")
|
|
2287
|
-
return ((
|
|
2404
|
+
return ((I = j[l]) == null ? void 0 : I.length) === w;
|
|
2288
2405
|
if (typeof w == "object") {
|
|
2289
|
-
const
|
|
2290
|
-
if (
|
|
2291
|
-
return Number(j[
|
|
2292
|
-
if (
|
|
2293
|
-
return Number(j[
|
|
2294
|
-
if (
|
|
2295
|
-
return Number(j[
|
|
2406
|
+
const D = Object.keys(w)[0], A = w[D];
|
|
2407
|
+
if (D === "not")
|
|
2408
|
+
return Number(j[l].length) !== Number(A);
|
|
2409
|
+
if (D === "moreThan")
|
|
2410
|
+
return Number(j[l].length) >= Number(A);
|
|
2411
|
+
if (D === "lessThan")
|
|
2412
|
+
return Number(j[l].length) <= Number(A);
|
|
2296
2413
|
}
|
|
2297
2414
|
return !1;
|
|
2298
2415
|
}
|
|
2299
|
-
function e(
|
|
2416
|
+
function e(l, C, w, j) {
|
|
2300
2417
|
return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
|
|
2301
2418
|
}
|
|
2302
|
-
function t(
|
|
2419
|
+
function t(l, C, w, j) {
|
|
2303
2420
|
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2304
2421
|
}
|
|
2305
|
-
function
|
|
2422
|
+
function s(l, C, w, j) {
|
|
2306
2423
|
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2307
2424
|
}
|
|
2308
|
-
const
|
|
2425
|
+
const c = /* @__PURE__ */ new Map([
|
|
2309
2426
|
["length", n],
|
|
2310
2427
|
["hasChildren", e],
|
|
2311
|
-
["hasSibling",
|
|
2428
|
+
["hasSibling", s],
|
|
2312
2429
|
["hasParent", t]
|
|
2313
2430
|
]);
|
|
2314
|
-
function g(
|
|
2315
|
-
const w =
|
|
2431
|
+
function g(l, C) {
|
|
2432
|
+
const w = l;
|
|
2316
2433
|
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
|
|
2317
2434
|
if (j === "length")
|
|
2318
2435
|
return { target: w, operator: "length", param: null, value: C[j] };
|
|
2319
|
-
const
|
|
2320
|
-
return { target: w, operator:
|
|
2436
|
+
const I = j, D = C[j];
|
|
2437
|
+
return { target: w, operator: l === "children" ? "hasChildren" : l === "parent" ? "hasParent" : "hasSibling", param: I, value: D };
|
|
2321
2438
|
}) : [];
|
|
2322
2439
|
}
|
|
2323
|
-
function
|
|
2324
|
-
if (
|
|
2325
|
-
const w =
|
|
2326
|
-
return w && w(
|
|
2440
|
+
function d(l, C) {
|
|
2441
|
+
if (c.has(l.operator)) {
|
|
2442
|
+
const w = c.get(l.operator);
|
|
2443
|
+
return w && w(l.target, l.param, l.value, C) || !1;
|
|
2327
2444
|
}
|
|
2328
2445
|
return !1;
|
|
2329
2446
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return Object.keys(
|
|
2332
|
-
const
|
|
2333
|
-
return
|
|
2334
|
-
}, []).reduce((
|
|
2447
|
+
function P(l, C) {
|
|
2448
|
+
return Object.keys(l).reduce((D, A) => {
|
|
2449
|
+
const $ = g(A, l[A]);
|
|
2450
|
+
return D.push(...$), D;
|
|
2451
|
+
}, []).reduce((D, A) => D && d(A, C), !0);
|
|
2335
2452
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const w = Object.keys(
|
|
2338
|
-
return j ? !
|
|
2453
|
+
function S(l, C) {
|
|
2454
|
+
const w = Object.keys(l), j = w.includes("allOf"), I = w.includes("anyOf"), D = j || I, v = (D ? l[D ? j ? "allOf" : "anyOf" : "allOf"] : [l]).map((x) => P(x, C));
|
|
2455
|
+
return j ? !v.includes(!1) : v.includes(!0);
|
|
2339
2456
|
}
|
|
2340
|
-
function
|
|
2341
|
-
const w =
|
|
2342
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ?
|
|
2457
|
+
function y(l, C) {
|
|
2458
|
+
const w = l.const;
|
|
2459
|
+
return w ? typeof w == "boolean" ? w : typeof w == "object" ? S(w, C) : !1 : !1;
|
|
2343
2460
|
}
|
|
2344
|
-
function T(
|
|
2461
|
+
function T(l) {
|
|
2345
2462
|
return (C) => {
|
|
2346
2463
|
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2347
|
-
return
|
|
2348
|
-
const
|
|
2349
|
-
return j[
|
|
2464
|
+
return l && l.properties && Object.keys(l.properties).reduce((j, I) => {
|
|
2465
|
+
const D = l.properties[I];
|
|
2466
|
+
return j[I] = y(D, C), j;
|
|
2350
2467
|
}, w), w;
|
|
2351
2468
|
};
|
|
2352
2469
|
}
|
|
2353
|
-
function l
|
|
2470
|
+
function p(l, C, w) {
|
|
2354
2471
|
if (C.type === "object" && C.properties) {
|
|
2355
|
-
const { rules: j, contents:
|
|
2356
|
-
w.set(
|
|
2357
|
-
(
|
|
2472
|
+
const { rules: j, contents: I } = C.properties;
|
|
2473
|
+
w.set(l, T(j)), I && Object.keys(I.properties).forEach(
|
|
2474
|
+
(D) => p(D, I.properties[D], w)
|
|
2358
2475
|
);
|
|
2359
2476
|
}
|
|
2360
2477
|
}
|
|
2361
|
-
function
|
|
2362
|
-
const { properties:
|
|
2363
|
-
Object.keys(
|
|
2364
|
-
|
|
2478
|
+
function i() {
|
|
2479
|
+
const { properties: l } = Jt;
|
|
2480
|
+
Object.keys(l).forEach((C) => {
|
|
2481
|
+
p(C, l[C], re);
|
|
2365
2482
|
});
|
|
2366
2483
|
}
|
|
2367
|
-
function
|
|
2484
|
+
function f(l, C) {
|
|
2368
2485
|
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2369
|
-
return
|
|
2486
|
+
return re.has(l) ? re.get(l)(C) : w;
|
|
2370
2487
|
}
|
|
2371
|
-
return
|
|
2488
|
+
return i(), { getRuleValue: f };
|
|
2372
2489
|
}
|
|
2373
|
-
class
|
|
2490
|
+
class Qt extends ee {
|
|
2374
2491
|
constructor(e, t) {
|
|
2375
2492
|
super(e, t);
|
|
2376
2493
|
}
|
|
@@ -2396,7 +2513,7 @@ class qt extends K {
|
|
|
2396
2513
|
type: "combo-list",
|
|
2397
2514
|
textField: "value",
|
|
2398
2515
|
valueField: "key",
|
|
2399
|
-
data: [{ key: "response-toolbar", value:
|
|
2516
|
+
data: [{ key: "response-toolbar", value: K["response-toolbar"].name }]
|
|
2400
2517
|
}
|
|
2401
2518
|
}
|
|
2402
2519
|
}
|
|
@@ -2439,85 +2556,85 @@ class qt extends K {
|
|
|
2439
2556
|
};
|
|
2440
2557
|
}
|
|
2441
2558
|
}
|
|
2442
|
-
function
|
|
2443
|
-
const
|
|
2444
|
-
let
|
|
2445
|
-
function T(
|
|
2446
|
-
return
|
|
2447
|
-
}
|
|
2448
|
-
function
|
|
2449
|
-
return !
|
|
2450
|
-
}
|
|
2451
|
-
function
|
|
2452
|
-
g.value = !1,
|
|
2453
|
-
const
|
|
2454
|
-
const q = W && W.appearance ? W.appearance.class : "",
|
|
2455
|
-
return _.push(...
|
|
2456
|
-
}, []) : [],
|
|
2457
|
-
|
|
2458
|
-
componentClass:
|
|
2459
|
-
componentClassList:
|
|
2559
|
+
function Xt(n, e, t, s) {
|
|
2560
|
+
const c = Ae(), g = M(!1), d = M(!1);
|
|
2561
|
+
let P = !0, S = !1, y;
|
|
2562
|
+
function T(v) {
|
|
2563
|
+
return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? v.sourceType === "control" && v.controlCategory === "input" || v.sourceType === "move" && v.controlType === "form-group" : !0;
|
|
2564
|
+
}
|
|
2565
|
+
function p(v) {
|
|
2566
|
+
return !Vt().basalDragulaRuleForContainer(v) || !P || !T(v), !1;
|
|
2567
|
+
}
|
|
2568
|
+
function i() {
|
|
2569
|
+
g.value = !1, d.value = !1;
|
|
2570
|
+
const v = n, m = v.appearance && v.appearance.class || "", x = m.split(" "), k = v.buttons || [], u = k.length ? k[0] : null, r = u && u.appearance ? u.appearance.class : "", o = r ? r.split(" ") : [], a = k.length ? k.reduce((_, W) => {
|
|
2571
|
+
const q = W && W.appearance ? W.appearance.class : "", te = q ? q.split(" ") : [];
|
|
2572
|
+
return _.push(...te), _;
|
|
2573
|
+
}, []) : [], h = t == null ? void 0 : t.schema, B = h && h.appearance && h.appearance.class || "", E = B ? B.split(" ") : [];
|
|
2574
|
+
y = {
|
|
2575
|
+
componentClass: m,
|
|
2576
|
+
componentClassList: x,
|
|
2460
2577
|
childContents: k,
|
|
2461
|
-
firstChildContent:
|
|
2462
|
-
firstChildClass:
|
|
2578
|
+
firstChildContent: u,
|
|
2579
|
+
firstChildClass: r,
|
|
2463
2580
|
firstChildClassList: o,
|
|
2464
|
-
parent:
|
|
2581
|
+
parent: h,
|
|
2465
2582
|
parentClass: B,
|
|
2466
|
-
parentClassList:
|
|
2583
|
+
parentClassList: E,
|
|
2467
2584
|
children: k,
|
|
2468
|
-
childrenClassList:
|
|
2585
|
+
childrenClassList: a
|
|
2469
2586
|
};
|
|
2470
|
-
const { canAccept:
|
|
2471
|
-
return
|
|
2587
|
+
const { canAccept: R, fixed: L, hidePadding: N } = c.getRuleValue(x[0], y);
|
|
2588
|
+
return P = R, S = N, !0;
|
|
2472
2589
|
}
|
|
2473
|
-
function
|
|
2590
|
+
function f(v) {
|
|
2474
2591
|
}
|
|
2475
|
-
function
|
|
2592
|
+
function l() {
|
|
2476
2593
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2477
2594
|
}
|
|
2478
|
-
function C(
|
|
2479
|
-
return
|
|
2595
|
+
function C(v, m) {
|
|
2596
|
+
return m.text = v.label, m;
|
|
2480
2597
|
}
|
|
2481
|
-
function w(
|
|
2598
|
+
function w(v, m, x) {
|
|
2482
2599
|
const k = n;
|
|
2483
2600
|
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2484
|
-
const o = String(
|
|
2485
|
-
return
|
|
2601
|
+
const o = String(v.innerText), a = U("form-group");
|
|
2602
|
+
return a.editor = x, a.label = o, a;
|
|
2486
2603
|
}
|
|
2487
|
-
return
|
|
2604
|
+
return x;
|
|
2488
2605
|
}
|
|
2489
2606
|
function j() {
|
|
2490
2607
|
return !1;
|
|
2491
2608
|
}
|
|
2492
|
-
function
|
|
2609
|
+
function I() {
|
|
2493
2610
|
return !1;
|
|
2494
2611
|
}
|
|
2495
|
-
function
|
|
2612
|
+
function D() {
|
|
2496
2613
|
return !0;
|
|
2497
2614
|
}
|
|
2498
2615
|
function A() {
|
|
2499
|
-
return
|
|
2616
|
+
return S;
|
|
2500
2617
|
}
|
|
2501
|
-
function
|
|
2502
|
-
return new
|
|
2618
|
+
function $(v) {
|
|
2619
|
+
return new Qt(v, e).getPropertyConfig(n);
|
|
2503
2620
|
}
|
|
2504
2621
|
return {
|
|
2505
|
-
canAccepts:
|
|
2506
|
-
checkCanAddComponent:
|
|
2507
|
-
checkCanDeleteComponent:
|
|
2622
|
+
canAccepts: p,
|
|
2623
|
+
checkCanAddComponent: D,
|
|
2624
|
+
checkCanDeleteComponent: I,
|
|
2508
2625
|
checkCanMoveComponent: j,
|
|
2509
|
-
getStyles:
|
|
2626
|
+
getStyles: l,
|
|
2510
2627
|
hideNestedPaddingInDesginerView: A,
|
|
2511
2628
|
onAcceptNewChildElement: w,
|
|
2512
|
-
onAcceptMovedChildElement:
|
|
2629
|
+
onAcceptMovedChildElement: f,
|
|
2513
2630
|
onResolveNewComponentSchema: C,
|
|
2514
|
-
resolveComponentContext:
|
|
2515
|
-
getPropsConfig:
|
|
2631
|
+
resolveComponentContext: i,
|
|
2632
|
+
getPropsConfig: $,
|
|
2516
2633
|
triggerBelongedComponentToMoveWhenMoved: g,
|
|
2517
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2634
|
+
triggerBelongedComponentToDeleteWhenDeleted: d
|
|
2518
2635
|
};
|
|
2519
2636
|
}
|
|
2520
|
-
const
|
|
2637
|
+
const Yt = {
|
|
2521
2638
|
id: { type: String, default: "" },
|
|
2522
2639
|
componentId: { type: String, default: "" },
|
|
2523
2640
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2530,12 +2647,12 @@ const zt = {
|
|
|
2530
2647
|
* 组件值
|
|
2531
2648
|
*/
|
|
2532
2649
|
modelValue: { type: Object }
|
|
2533
|
-
}, X =
|
|
2534
|
-
function
|
|
2535
|
-
const t = e.getBoundingClientRect(),
|
|
2536
|
-
return
|
|
2650
|
+
}, X = M(0);
|
|
2651
|
+
function Zt(n, e) {
|
|
2652
|
+
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), c = s.top >= t.top, g = s.top <= t.bottom;
|
|
2653
|
+
return c && g;
|
|
2537
2654
|
}
|
|
2538
|
-
function
|
|
2655
|
+
function Kt(n) {
|
|
2539
2656
|
if (!n)
|
|
2540
2657
|
return;
|
|
2541
2658
|
let e;
|
|
@@ -2544,240 +2661,240 @@ function Jt(n) {
|
|
|
2544
2661
|
const t = e.getBoundingClientRect();
|
|
2545
2662
|
if (t.width === 0 && t.height === 0)
|
|
2546
2663
|
return;
|
|
2547
|
-
const
|
|
2548
|
-
if (
|
|
2549
|
-
if (!
|
|
2550
|
-
|
|
2664
|
+
const s = e.querySelector(".component-btn-group");
|
|
2665
|
+
if (s) {
|
|
2666
|
+
if (!Zt(e, n)) {
|
|
2667
|
+
s.style.display = "none";
|
|
2551
2668
|
return;
|
|
2552
2669
|
}
|
|
2553
|
-
|
|
2554
|
-
const g =
|
|
2555
|
-
if (
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2670
|
+
s.style.display = "";
|
|
2671
|
+
const g = s.getBoundingClientRect(), d = s.querySelector("div");
|
|
2672
|
+
if (d) {
|
|
2673
|
+
const P = d.getBoundingClientRect();
|
|
2674
|
+
d.style.top = g.top + "px", d.style.left = g.left - P.width + "px";
|
|
2558
2675
|
}
|
|
2559
2676
|
}
|
|
2560
2677
|
}
|
|
2561
|
-
function
|
|
2562
|
-
var
|
|
2563
|
-
function
|
|
2678
|
+
function en(n, e, t) {
|
|
2679
|
+
var $;
|
|
2680
|
+
function s() {
|
|
2564
2681
|
}
|
|
2565
|
-
const
|
|
2566
|
-
function
|
|
2682
|
+
const c = "", g = M();
|
|
2683
|
+
function d() {
|
|
2567
2684
|
return !0;
|
|
2568
2685
|
}
|
|
2569
|
-
function
|
|
2686
|
+
function P() {
|
|
2570
2687
|
return !1;
|
|
2571
2688
|
}
|
|
2572
|
-
function
|
|
2689
|
+
function S() {
|
|
2573
2690
|
return !0;
|
|
2574
2691
|
}
|
|
2575
|
-
function
|
|
2692
|
+
function y() {
|
|
2576
2693
|
return !0;
|
|
2577
2694
|
}
|
|
2578
2695
|
function T() {
|
|
2579
2696
|
return !0;
|
|
2580
2697
|
}
|
|
2581
|
-
function
|
|
2582
|
-
if (!
|
|
2698
|
+
function p(v) {
|
|
2699
|
+
if (!v || !v.value)
|
|
2583
2700
|
return null;
|
|
2584
|
-
const
|
|
2585
|
-
return
|
|
2701
|
+
const m = M(v == null ? void 0 : v.value.parent), x = p(m);
|
|
2702
|
+
return x || null;
|
|
2586
2703
|
}
|
|
2587
|
-
function
|
|
2588
|
-
const { componentInstance:
|
|
2589
|
-
return !
|
|
2704
|
+
function i(v = e) {
|
|
2705
|
+
const { componentInstance: m, designerItemElementRef: x } = v;
|
|
2706
|
+
return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? x : i(v.parent);
|
|
2590
2707
|
}
|
|
2591
|
-
function
|
|
2708
|
+
function f(v) {
|
|
2592
2709
|
return !!t;
|
|
2593
2710
|
}
|
|
2594
|
-
function
|
|
2711
|
+
function l() {
|
|
2595
2712
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2596
2713
|
}
|
|
2597
2714
|
function C() {
|
|
2598
2715
|
}
|
|
2599
|
-
function w(
|
|
2716
|
+
function w(v, m) {
|
|
2600
2717
|
}
|
|
2601
|
-
function j(
|
|
2602
|
-
const { componentType:
|
|
2603
|
-
let
|
|
2604
|
-
const k =
|
|
2605
|
-
return
|
|
2718
|
+
function j(v) {
|
|
2719
|
+
const { componentType: m } = v;
|
|
2720
|
+
let x = U(m, v);
|
|
2721
|
+
const k = m.toLowerCase().replace("-", "_");
|
|
2722
|
+
return x && !x.id && x.type === m && (x.id = `${k}_${Math.random().toString().slice(2, 6)}`), x;
|
|
2606
2723
|
}
|
|
2607
|
-
function
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2610
|
-
let
|
|
2611
|
-
const o =
|
|
2612
|
-
return
|
|
2724
|
+
function I(v, m) {
|
|
2725
|
+
const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), u = k ? JSON.parse(k) : {};
|
|
2726
|
+
u.parentComponentInstance = g.value;
|
|
2727
|
+
let r = U(x, u);
|
|
2728
|
+
const o = x.toLowerCase().replace("-", "_");
|
|
2729
|
+
return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
2613
2730
|
}
|
|
2614
|
-
function
|
|
2731
|
+
function D(v) {
|
|
2615
2732
|
}
|
|
2616
|
-
function A(...
|
|
2733
|
+
function A(...v) {
|
|
2617
2734
|
return [];
|
|
2618
2735
|
}
|
|
2619
2736
|
return g.value = {
|
|
2620
|
-
canMove:
|
|
2621
|
-
canSelectParent:
|
|
2622
|
-
canAdd:
|
|
2623
|
-
canDelete:
|
|
2737
|
+
canMove: d(),
|
|
2738
|
+
canSelectParent: P(),
|
|
2739
|
+
canAdd: y(),
|
|
2740
|
+
canDelete: S(),
|
|
2624
2741
|
canNested: !T(),
|
|
2625
2742
|
contents: [],
|
|
2626
2743
|
elementRef: n,
|
|
2627
|
-
parent: (
|
|
2744
|
+
parent: ($ = e.parent) == null ? void 0 : $.componentInstance,
|
|
2628
2745
|
schema: e.schema,
|
|
2629
|
-
styles:
|
|
2630
|
-
canAccepts:
|
|
2631
|
-
getBelongedComponentInstance:
|
|
2632
|
-
getDraggableDesignItemElement:
|
|
2633
|
-
getDraggingDisplayText:
|
|
2746
|
+
styles: c,
|
|
2747
|
+
canAccepts: f,
|
|
2748
|
+
getBelongedComponentInstance: p,
|
|
2749
|
+
getDraggableDesignItemElement: i,
|
|
2750
|
+
getDraggingDisplayText: l,
|
|
2634
2751
|
getPropConfig: A,
|
|
2635
2752
|
getDragScopeElement: C,
|
|
2636
2753
|
onAcceptMovedChildElement: w,
|
|
2637
|
-
onAcceptNewChildElement:
|
|
2638
|
-
onChildElementMovedOut:
|
|
2754
|
+
onAcceptNewChildElement: I,
|
|
2755
|
+
onChildElementMovedOut: D,
|
|
2639
2756
|
addNewChildComponentSchema: j,
|
|
2640
|
-
updateDragAndDropRules:
|
|
2641
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2642
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2757
|
+
updateDragAndDropRules: s,
|
|
2758
|
+
triggerBelongedComponentToMoveWhenMoved: M(!1),
|
|
2759
|
+
triggerBelongedComponentToDeleteWhenDeleted: M(!1)
|
|
2643
2760
|
}, g;
|
|
2644
2761
|
}
|
|
2645
|
-
const
|
|
2762
|
+
const Be = /* @__PURE__ */ z({
|
|
2646
2763
|
name: "FDesignerInnerItem",
|
|
2647
|
-
props:
|
|
2764
|
+
props: Yt,
|
|
2648
2765
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2649
2766
|
setup(n, e) {
|
|
2650
|
-
const t =
|
|
2651
|
-
designerItemElementRef:
|
|
2652
|
-
componentInstance:
|
|
2653
|
-
schema:
|
|
2654
|
-
parent:
|
|
2767
|
+
const t = M(n.canMove), s = M(n.canAdd), c = M(n.canDelete), g = M(!1), d = M(n.contentKey), P = M(n.childType), S = M(n.childLabel), y = M(n.modelValue), T = M(""), p = M(), i = V("canvas-dragula"), f = M(), l = V("design-item-context"), C = {
|
|
2768
|
+
designerItemElementRef: p,
|
|
2769
|
+
componentInstance: f,
|
|
2770
|
+
schema: y.value,
|
|
2771
|
+
parent: l,
|
|
2655
2772
|
setupContext: e
|
|
2656
2773
|
};
|
|
2657
|
-
|
|
2774
|
+
Fe("design-item-context", C);
|
|
2658
2775
|
const w = F(() => ({
|
|
2659
2776
|
"farris-component": !0,
|
|
2660
2777
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2661
2778
|
"flex-fill": n.id == "root-component",
|
|
2662
|
-
"position-relative": t.value ||
|
|
2779
|
+
"position-relative": t.value || c.value,
|
|
2663
2780
|
"farris-nested": g.value,
|
|
2664
2781
|
"can-move": t.value,
|
|
2665
|
-
"d-none":
|
|
2782
|
+
"d-none": p.value && p.value.classList.contains("d-none")
|
|
2666
2783
|
})), j = F(() => {
|
|
2667
2784
|
const o = {};
|
|
2668
|
-
return T.value && T.value.split(";").reduce((
|
|
2669
|
-
const [B,
|
|
2670
|
-
return B && (
|
|
2785
|
+
return T.value && T.value.split(";").reduce((a, h) => {
|
|
2786
|
+
const [B, E] = h.split(":");
|
|
2787
|
+
return B && (a[B] = E), a;
|
|
2671
2788
|
}, o), o;
|
|
2672
2789
|
});
|
|
2673
|
-
function
|
|
2674
|
-
if (
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
const B =
|
|
2678
|
-
|
|
2790
|
+
function I(o, a) {
|
|
2791
|
+
if (l && l.schema[d.value]) {
|
|
2792
|
+
const h = l.schema[d.value].findIndex((B) => B.id === a.id);
|
|
2793
|
+
if (h > -1) {
|
|
2794
|
+
const B = l.schema[d.value].length, E = l.schema[d.value][h % B];
|
|
2795
|
+
l.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), l.schema[d.value].splice(h, 1), l.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
|
|
2679
2796
|
}
|
|
2680
2797
|
}
|
|
2681
2798
|
}
|
|
2682
|
-
function
|
|
2683
|
-
if (
|
|
2684
|
-
const
|
|
2685
|
-
componentType:
|
|
2686
|
-
label:
|
|
2687
|
-
parentComponentInstance:
|
|
2799
|
+
function D(o) {
|
|
2800
|
+
if (f.value.addNewChildComponentSchema) {
|
|
2801
|
+
const a = {
|
|
2802
|
+
componentType: P.value,
|
|
2803
|
+
label: S.value,
|
|
2804
|
+
parentComponentInstance: f.value,
|
|
2688
2805
|
targetPosition: -1
|
|
2689
|
-
},
|
|
2690
|
-
|
|
2806
|
+
}, h = f.value.addNewChildComponentSchema(a);
|
|
2807
|
+
y.value[d.value].push(h), e.emit("addComponent");
|
|
2691
2808
|
}
|
|
2692
2809
|
}
|
|
2693
2810
|
function A() {
|
|
2694
|
-
return
|
|
2811
|
+
return s.value && b("div", {
|
|
2695
2812
|
role: "button",
|
|
2696
2813
|
class: "btn component-settings-button",
|
|
2697
2814
|
title: "新增",
|
|
2698
2815
|
ref: "removeComponent",
|
|
2699
2816
|
onClick: (o) => {
|
|
2700
|
-
|
|
2817
|
+
D();
|
|
2701
2818
|
}
|
|
2702
|
-
}, [
|
|
2819
|
+
}, [b("i", {
|
|
2703
2820
|
class: "f-icon f-icon-plus-circle"
|
|
2704
2821
|
}, null)]);
|
|
2705
2822
|
}
|
|
2706
|
-
function
|
|
2707
|
-
return
|
|
2823
|
+
function $(o) {
|
|
2824
|
+
return c.value && b("div", {
|
|
2708
2825
|
role: "button",
|
|
2709
2826
|
class: "btn component-settings-button",
|
|
2710
2827
|
title: "删除",
|
|
2711
2828
|
ref: "removeComponent",
|
|
2712
|
-
onClick:
|
|
2713
|
-
}, [
|
|
2829
|
+
onClick: Ve((a) => I(a, o), ["stop"])
|
|
2830
|
+
}, [b("i", {
|
|
2714
2831
|
class: "f-icon f-icon-yxs_delete"
|
|
2715
2832
|
}, null)]);
|
|
2716
2833
|
}
|
|
2717
|
-
function
|
|
2718
|
-
return t.value &&
|
|
2834
|
+
function v() {
|
|
2835
|
+
return t.value && b("div", {
|
|
2719
2836
|
role: "button",
|
|
2720
2837
|
class: "btn component-settings-button",
|
|
2721
2838
|
title: "移动",
|
|
2722
2839
|
ref: "moveComponent"
|
|
2723
|
-
}, [
|
|
2840
|
+
}, [b("i", {
|
|
2724
2841
|
"data-dragging-icon": "true",
|
|
2725
2842
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2726
2843
|
}, null)]);
|
|
2727
2844
|
}
|
|
2728
|
-
function
|
|
2729
|
-
return
|
|
2845
|
+
function m(o) {
|
|
2846
|
+
return b("div", {
|
|
2730
2847
|
class: "component-btn-group",
|
|
2731
2848
|
"data-noattach": "true"
|
|
2732
|
-
}, [
|
|
2849
|
+
}, [b("div", null, [A(), v(), $(o)])]);
|
|
2733
2850
|
}
|
|
2734
2851
|
G(() => n.modelValue, (o) => {
|
|
2735
|
-
|
|
2852
|
+
y.value = o, C.schema = o;
|
|
2736
2853
|
});
|
|
2737
|
-
function
|
|
2738
|
-
const
|
|
2739
|
-
|
|
2854
|
+
function x(o) {
|
|
2855
|
+
const a = o.target;
|
|
2856
|
+
Kt(a);
|
|
2740
2857
|
}
|
|
2741
2858
|
function k() {
|
|
2742
|
-
var o,
|
|
2743
|
-
(
|
|
2859
|
+
var o, a;
|
|
2860
|
+
(a = (o = y.value) == null ? void 0 : o.contents) != null && a.length && p.value && p.value.addEventListener("scroll", x);
|
|
2744
2861
|
}
|
|
2745
|
-
function
|
|
2746
|
-
const o =
|
|
2747
|
-
return
|
|
2862
|
+
function u() {
|
|
2863
|
+
const o = p.value, a = M(o.children[1]);
|
|
2864
|
+
return en(a, C).value;
|
|
2748
2865
|
}
|
|
2749
2866
|
H(() => {
|
|
2750
|
-
if (
|
|
2751
|
-
const o =
|
|
2752
|
-
|
|
2867
|
+
if (p.value) {
|
|
2868
|
+
const o = p.value.querySelector(`[data-dragref='${y.value.id}-container']`);
|
|
2869
|
+
f.value = o && o.componentInstance ? o.componentInstance.value : u(), i && o && i.attachComponents(o, y.value), g.value = f.value.canNested !== void 0 ? f.value.canNested : g.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, c.value = f.value.canDelete !== void 0 ? f.value.canDelete : c.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, T.value = f.value.styles || "", p.value && (p.value.componentInstance = f, p.value.designItemContext = C);
|
|
2753
2870
|
}
|
|
2754
2871
|
k(), X.value++;
|
|
2755
|
-
}),
|
|
2756
|
-
|
|
2872
|
+
}), Le(() => {
|
|
2873
|
+
p.value && p.value.removeEventListener("scroll", x);
|
|
2757
2874
|
});
|
|
2758
|
-
function
|
|
2759
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2762
|
-
const
|
|
2763
|
-
if (!(
|
|
2764
|
-
Array.from(
|
|
2765
|
-
const
|
|
2766
|
-
|
|
2875
|
+
function r(o) {
|
|
2876
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((h) => h.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2877
|
+
const a = p.value;
|
|
2878
|
+
if (a) {
|
|
2879
|
+
const h = document.getElementsByClassName("dgComponentSelected");
|
|
2880
|
+
if (!(h && h.length === 1 && h[0] === p.value)) {
|
|
2881
|
+
Array.from(h).forEach((R) => R.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", y.value.type, y.value, n.componentId, f.value);
|
|
2882
|
+
const E = f.value.getDraggableDesignItemElement(C);
|
|
2883
|
+
E && E.value && E.value.classList.add("dgComponentSelected");
|
|
2767
2884
|
}
|
|
2768
2885
|
}
|
|
2769
2886
|
X.value++;
|
|
2770
2887
|
}
|
|
2771
|
-
return () =>
|
|
2888
|
+
return () => b("div", {
|
|
2772
2889
|
id: `${n.id}-design-item`,
|
|
2773
|
-
ref:
|
|
2890
|
+
ref: p,
|
|
2774
2891
|
class: w.value,
|
|
2775
2892
|
style: j.value,
|
|
2776
|
-
onClick:
|
|
2777
|
-
}, [
|
|
2893
|
+
onClick: r
|
|
2894
|
+
}, [m(y.value), e.slots.default && e.slots.default()]);
|
|
2778
2895
|
}
|
|
2779
2896
|
});
|
|
2780
|
-
class
|
|
2897
|
+
class tn extends ee {
|
|
2781
2898
|
constructor(e, t) {
|
|
2782
2899
|
super(e, t);
|
|
2783
2900
|
}
|
|
@@ -2828,23 +2945,23 @@ class Xt extends K {
|
|
|
2828
2945
|
title: "style样式"
|
|
2829
2946
|
}
|
|
2830
2947
|
},
|
|
2831
|
-
setPropertyRelates(t,
|
|
2948
|
+
setPropertyRelates(t, s) {
|
|
2832
2949
|
}
|
|
2833
2950
|
};
|
|
2834
2951
|
}
|
|
2835
2952
|
getEventPropConfig(e) {
|
|
2836
2953
|
const t = [
|
|
2837
2954
|
{
|
|
2838
|
-
label: "
|
|
2955
|
+
label: "onClick",
|
|
2839
2956
|
name: "点击事件"
|
|
2840
2957
|
}
|
|
2841
2958
|
];
|
|
2842
|
-
var
|
|
2843
|
-
const
|
|
2844
|
-
g[
|
|
2959
|
+
var s = this;
|
|
2960
|
+
const c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), g = {};
|
|
2961
|
+
g[s.viewModelId] = {
|
|
2845
2962
|
type: "events-editor",
|
|
2846
2963
|
editor: {
|
|
2847
|
-
initialData:
|
|
2964
|
+
initialData: c
|
|
2848
2965
|
}
|
|
2849
2966
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2850
2967
|
title: "事件",
|
|
@@ -2854,14 +2971,14 @@ class Xt extends K {
|
|
|
2854
2971
|
refreshPanelAfterChanged: !0,
|
|
2855
2972
|
tabId: "commands",
|
|
2856
2973
|
tabName: "交互",
|
|
2857
|
-
setPropertyRelates(
|
|
2858
|
-
const
|
|
2859
|
-
delete e[
|
|
2974
|
+
setPropertyRelates(d, P) {
|
|
2975
|
+
const S = d.propertyValue;
|
|
2976
|
+
delete e[s.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, S.events, S));
|
|
2860
2977
|
}
|
|
2861
2978
|
};
|
|
2862
2979
|
}
|
|
2863
2980
|
}
|
|
2864
|
-
class
|
|
2981
|
+
class nn extends ee {
|
|
2865
2982
|
constructor(e, t) {
|
|
2866
2983
|
super(e, t);
|
|
2867
2984
|
}
|
|
@@ -2887,7 +3004,7 @@ class Yt extends K {
|
|
|
2887
3004
|
type: "combo-list",
|
|
2888
3005
|
textField: "value",
|
|
2889
3006
|
valueField: "key",
|
|
2890
|
-
data: [{ key: "response-toolbar-item", value:
|
|
3007
|
+
data: [{ key: "response-toolbar-item", value: K["response-toolbar-item"].name }]
|
|
2891
3008
|
}
|
|
2892
3009
|
},
|
|
2893
3010
|
text: {
|
|
@@ -2905,18 +3022,34 @@ class Yt extends K {
|
|
|
2905
3022
|
};
|
|
2906
3023
|
}
|
|
2907
3024
|
getAppearanceProperties(e) {
|
|
3025
|
+
this.propertyConfig.categories.appearance = {
|
|
3026
|
+
title: "样式",
|
|
3027
|
+
description: "Appearance",
|
|
3028
|
+
properties: {
|
|
3029
|
+
class: {
|
|
3030
|
+
title: "class",
|
|
3031
|
+
type: "string",
|
|
3032
|
+
description: ""
|
|
3033
|
+
},
|
|
3034
|
+
style: {
|
|
3035
|
+
title: "style",
|
|
3036
|
+
type: "string",
|
|
3037
|
+
description: ""
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
};
|
|
2908
3041
|
}
|
|
2909
3042
|
getEventPropConfig(e) {
|
|
2910
3043
|
const t = [
|
|
2911
3044
|
{
|
|
2912
|
-
label: "
|
|
3045
|
+
label: "onClick",
|
|
2913
3046
|
name: "点击事件"
|
|
2914
3047
|
}
|
|
2915
|
-
],
|
|
2916
|
-
g[
|
|
3048
|
+
], s = this, c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), g = {};
|
|
3049
|
+
g[s.viewModelId] = {
|
|
2917
3050
|
type: "events-editor",
|
|
2918
3051
|
editor: {
|
|
2919
|
-
initialData:
|
|
3052
|
+
initialData: c
|
|
2920
3053
|
}
|
|
2921
3054
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2922
3055
|
title: "事件",
|
|
@@ -2926,266 +3059,263 @@ class Yt extends K {
|
|
|
2926
3059
|
refreshPanelAfterChanged: !0,
|
|
2927
3060
|
tabId: "commands",
|
|
2928
3061
|
tabName: "交互",
|
|
2929
|
-
setPropertyRelates(
|
|
2930
|
-
const
|
|
2931
|
-
delete e[
|
|
3062
|
+
setPropertyRelates(d, P) {
|
|
3063
|
+
const S = d.propertyValue;
|
|
3064
|
+
delete e[s.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, S.events, S));
|
|
2932
3065
|
}
|
|
2933
3066
|
};
|
|
2934
3067
|
}
|
|
2935
3068
|
}
|
|
2936
|
-
function
|
|
2937
|
-
|
|
2938
|
-
const t =
|
|
2939
|
-
let
|
|
2940
|
-
function
|
|
3069
|
+
function on(n, e) {
|
|
3070
|
+
Ae();
|
|
3071
|
+
const t = M(!1), s = M(!1);
|
|
3072
|
+
let c = !1, g = !1;
|
|
3073
|
+
function d(w) {
|
|
2941
3074
|
return !1;
|
|
2942
3075
|
}
|
|
2943
|
-
function
|
|
3076
|
+
function P(w) {
|
|
2944
3077
|
}
|
|
2945
|
-
function
|
|
3078
|
+
function S() {
|
|
2946
3079
|
return "";
|
|
2947
3080
|
}
|
|
2948
|
-
function
|
|
3081
|
+
function y(w, j) {
|
|
2949
3082
|
return j.text = w.label, j;
|
|
2950
3083
|
}
|
|
2951
|
-
function T(w, j,
|
|
2952
|
-
const
|
|
2953
|
-
if ((
|
|
2954
|
-
const
|
|
2955
|
-
return
|
|
3084
|
+
function T(w, j, I) {
|
|
3085
|
+
const D = n.schema;
|
|
3086
|
+
if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3087
|
+
const v = String(w.innerText), m = U("form-group");
|
|
3088
|
+
return m.editor = I, m.label = v, m;
|
|
2956
3089
|
}
|
|
2957
|
-
return
|
|
3090
|
+
return I;
|
|
2958
3091
|
}
|
|
2959
|
-
function
|
|
3092
|
+
function p() {
|
|
2960
3093
|
return !1;
|
|
2961
3094
|
}
|
|
2962
|
-
function
|
|
3095
|
+
function i() {
|
|
2963
3096
|
return !g;
|
|
2964
3097
|
}
|
|
2965
|
-
function
|
|
3098
|
+
function f() {
|
|
2966
3099
|
return !1;
|
|
2967
3100
|
}
|
|
2968
|
-
function
|
|
2969
|
-
return
|
|
3101
|
+
function l() {
|
|
3102
|
+
return c;
|
|
2970
3103
|
}
|
|
2971
3104
|
function C(w) {
|
|
2972
3105
|
let j;
|
|
2973
3106
|
switch (n.schema.type) {
|
|
2974
3107
|
case "tab-toolbar-item":
|
|
2975
|
-
j = new
|
|
3108
|
+
j = new tn(w, e);
|
|
2976
3109
|
break;
|
|
2977
3110
|
default:
|
|
2978
|
-
j = new
|
|
3111
|
+
j = new nn(w, e);
|
|
2979
3112
|
}
|
|
2980
3113
|
return j.getPropertyConfig(n.schema);
|
|
2981
3114
|
}
|
|
2982
3115
|
return {
|
|
2983
|
-
canAccepts:
|
|
2984
|
-
checkCanAddComponent:
|
|
2985
|
-
checkCanDeleteComponent:
|
|
2986
|
-
checkCanMoveComponent:
|
|
2987
|
-
getStyles:
|
|
2988
|
-
hideNestedPaddingInDesginerView:
|
|
3116
|
+
canAccepts: d,
|
|
3117
|
+
checkCanAddComponent: f,
|
|
3118
|
+
checkCanDeleteComponent: i,
|
|
3119
|
+
checkCanMoveComponent: p,
|
|
3120
|
+
getStyles: S,
|
|
3121
|
+
hideNestedPaddingInDesginerView: l,
|
|
2989
3122
|
onAcceptNewChildElement: T,
|
|
2990
|
-
onAcceptMovedChildElement:
|
|
2991
|
-
onResolveNewComponentSchema:
|
|
3123
|
+
onAcceptMovedChildElement: P,
|
|
3124
|
+
onResolveNewComponentSchema: y,
|
|
2992
3125
|
getPropsConfig: C,
|
|
2993
3126
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
2994
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3127
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
2995
3128
|
};
|
|
2996
3129
|
}
|
|
2997
|
-
const
|
|
3130
|
+
const Re = /* @__PURE__ */ z({
|
|
2998
3131
|
name: "FResponseToolbarItemDesign",
|
|
2999
|
-
props:
|
|
3132
|
+
props: Me,
|
|
3000
3133
|
emits: ["Click"],
|
|
3001
3134
|
setup(n, e) {
|
|
3002
|
-
|
|
3003
|
-
const t =
|
|
3135
|
+
M(), M();
|
|
3136
|
+
const t = M(n.alignment), s = {
|
|
3004
3137
|
id: "__more_buttons__",
|
|
3005
3138
|
text: "More"
|
|
3006
|
-
},
|
|
3007
|
-
F(() =>
|
|
3008
|
-
const g =
|
|
3139
|
+
}, c = M(new J(s));
|
|
3140
|
+
F(() => c.value.children.length > 0);
|
|
3141
|
+
const g = M(), d = V("designer-host-service"), P = V("design-item-context"), S = on(P, d), y = Pe(g, P, S);
|
|
3009
3142
|
V("toolbar-item-handler", () => {
|
|
3010
3143
|
}), H(() => {
|
|
3011
|
-
g.value.componentInstance =
|
|
3012
|
-
}), e.expose(
|
|
3144
|
+
g.value.componentInstance = y;
|
|
3145
|
+
}), e.expose(y.value);
|
|
3013
3146
|
function T() {
|
|
3014
|
-
const
|
|
3147
|
+
const f = {
|
|
3015
3148
|
"f-icon": !0
|
|
3016
|
-
};
|
|
3017
|
-
|
|
3018
|
-
const i = n.icon.trim().split(" ");
|
|
3019
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C), d);
|
|
3020
|
-
}
|
|
3021
|
-
return d;
|
|
3149
|
+
}, l = n.icon ? n.icon.trim() : "";
|
|
3150
|
+
return Y(f, l);
|
|
3022
3151
|
}
|
|
3023
|
-
function
|
|
3152
|
+
function p() {
|
|
3024
3153
|
return !!(n.icon && n.icon.trim());
|
|
3025
3154
|
}
|
|
3026
|
-
function
|
|
3027
|
-
const
|
|
3155
|
+
function i() {
|
|
3156
|
+
const f = {
|
|
3028
3157
|
btn: !0,
|
|
3029
3158
|
"f-rt-btn": !0,
|
|
3030
3159
|
"f-btn-ml": t.value === "right",
|
|
3031
3160
|
"f-btn-mr": t.value === "left",
|
|
3032
3161
|
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
3033
3162
|
};
|
|
3034
|
-
|
|
3035
|
-
const i = n.class.split(" ");
|
|
3036
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C), d);
|
|
3037
|
-
}
|
|
3038
|
-
return d;
|
|
3163
|
+
return Y(f, n.class);
|
|
3039
3164
|
}
|
|
3040
3165
|
return H(() => {
|
|
3041
|
-
}),
|
|
3042
|
-
}), () =>
|
|
3166
|
+
}), ie(() => {
|
|
3167
|
+
}), () => b("div", {
|
|
3043
3168
|
ref: g,
|
|
3044
|
-
"data-dragref": `${
|
|
3169
|
+
"data-dragref": `${P.schema.id}-container`,
|
|
3045
3170
|
class: "farris-component position-relative",
|
|
3046
3171
|
style: "display:inline-block!important;"
|
|
3047
|
-
}, [
|
|
3172
|
+
}, [b("button", {
|
|
3048
3173
|
type: "button",
|
|
3049
|
-
class:
|
|
3174
|
+
class: i(),
|
|
3050
3175
|
id: n.id
|
|
3051
|
-
}, [
|
|
3176
|
+
}, [p() && b("i", {
|
|
3052
3177
|
class: T()
|
|
3053
3178
|
}, null), n.text])]);
|
|
3054
3179
|
}
|
|
3055
|
-
}),
|
|
3180
|
+
}), Ie = /* @__PURE__ */ z({
|
|
3056
3181
|
name: "FResponseToolbarDesign",
|
|
3057
|
-
props:
|
|
3182
|
+
props: Ot,
|
|
3058
3183
|
emits: ["Click"],
|
|
3059
3184
|
setup(n, e) {
|
|
3060
|
-
const t =
|
|
3061
|
-
let
|
|
3062
|
-
const
|
|
3185
|
+
const t = M(n.items);
|
|
3186
|
+
let s = new Array(t.value.length).fill(M());
|
|
3187
|
+
const c = M(), g = M(), d = M(n.alignment), P = {
|
|
3063
3188
|
id: "__more_buttons__",
|
|
3064
3189
|
text: "More"
|
|
3065
|
-
},
|
|
3066
|
-
F(() =>
|
|
3067
|
-
const T =
|
|
3190
|
+
}, S = M(new J(P)), y = ke();
|
|
3191
|
+
F(() => S.value.children.length > 0);
|
|
3192
|
+
const T = M(), p = V("designer-host-service"), i = V("design-item-context"), f = Xt(i.schema, p, i), l = Pe(T, i, f);
|
|
3068
3193
|
V("toolbar-item-handler", () => {
|
|
3069
3194
|
}), H(() => {
|
|
3070
|
-
T.value.componentInstance =
|
|
3071
|
-
}), e.expose(
|
|
3072
|
-
const C = F(() => ({
|
|
3195
|
+
T.value.componentInstance = l;
|
|
3196
|
+
}), e.expose(l.value);
|
|
3197
|
+
const C = F(() => Y({
|
|
3073
3198
|
"f-toolbar": !0,
|
|
3074
3199
|
"f-response-toolbar": !0,
|
|
3075
3200
|
"position-relative": !0
|
|
3076
|
-
})), w = F(() => ({
|
|
3201
|
+
}, n.customClass)), w = F(() => ({
|
|
3077
3202
|
"d-flex": !0,
|
|
3078
3203
|
"flex-nowrap": !0,
|
|
3079
|
-
"justify-content-end":
|
|
3080
|
-
"justify-content-start":
|
|
3204
|
+
"justify-content-end": d.value === "right",
|
|
3205
|
+
"justify-content-start": d.value === "left"
|
|
3081
3206
|
})), {
|
|
3082
3207
|
renderToolbarDropdown: j,
|
|
3083
|
-
clearAllDropDown:
|
|
3084
|
-
} =
|
|
3085
|
-
function
|
|
3086
|
-
t.value.filter((
|
|
3087
|
-
|
|
3088
|
-
}),
|
|
3208
|
+
clearAllDropDown: I
|
|
3209
|
+
} = Lt(n, y, l);
|
|
3210
|
+
function D() {
|
|
3211
|
+
t.value.filter((u) => u.children && u.children.length > 0).forEach((u) => {
|
|
3212
|
+
u.expanded = !1;
|
|
3213
|
+
}), S.value.expanded = !1, I();
|
|
3089
3214
|
}
|
|
3090
|
-
const A = /* @__PURE__ */ new Map(),
|
|
3091
|
-
function
|
|
3092
|
-
const
|
|
3093
|
-
let o =
|
|
3094
|
-
const
|
|
3095
|
-
if (
|
|
3096
|
-
const
|
|
3215
|
+
const A = /* @__PURE__ */ new Map(), $ = [];
|
|
3216
|
+
function v(u) {
|
|
3217
|
+
const r = g.value;
|
|
3218
|
+
let o = u;
|
|
3219
|
+
const a = Array.from(r.children), h = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
3220
|
+
if (h) {
|
|
3221
|
+
const N = h.computedStyleMap().get("margin-left"), _ = h.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + h.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
3097
3222
|
o -= W;
|
|
3098
3223
|
}
|
|
3099
|
-
const B =
|
|
3100
|
-
for (const
|
|
3101
|
-
const _ =
|
|
3102
|
-
o < q ? (A.set(
|
|
3103
|
-
id:
|
|
3224
|
+
const B = a.filter((N) => N.id !== "__more_buttons__");
|
|
3225
|
+
for (const N of B) {
|
|
3226
|
+
const _ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
|
|
3227
|
+
o < q ? (A.set(N.id, !0), $.push({
|
|
3228
|
+
id: N.id,
|
|
3104
3229
|
width: q
|
|
3105
3230
|
})) : o -= q;
|
|
3106
3231
|
}
|
|
3107
|
-
if (
|
|
3108
|
-
for (let
|
|
3109
|
-
const _ = N
|
|
3232
|
+
if ($.length)
|
|
3233
|
+
for (let N = $.length - 1; N >= 0; N--) {
|
|
3234
|
+
const _ = $[N].width;
|
|
3110
3235
|
if (o >= _)
|
|
3111
|
-
o -= _, A.delete(N
|
|
3236
|
+
o -= _, A.delete($[N].id), $.pop();
|
|
3112
3237
|
else
|
|
3113
3238
|
break;
|
|
3114
3239
|
}
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3117
|
-
const
|
|
3118
|
-
|
|
3240
|
+
const E = Object.assign({}, S.value);
|
|
3241
|
+
E.children = [];
|
|
3242
|
+
const R = new J(E), L = t.value.reduce((N, _) => (A.has(_.id) && R.children.push(_), _.visible = !A.has(_.id), N.push(_), N), []);
|
|
3243
|
+
S.value = R, t.value = L;
|
|
3119
3244
|
}
|
|
3120
|
-
const
|
|
3121
|
-
if (
|
|
3122
|
-
const o =
|
|
3123
|
-
(o <
|
|
3245
|
+
const m = new ResizeObserver((u) => {
|
|
3246
|
+
if (u.length) {
|
|
3247
|
+
const o = u[0].contentRect.width, h = g.value.getBoundingClientRect().width;
|
|
3248
|
+
(o < h || $.length) && v(o);
|
|
3124
3249
|
}
|
|
3125
3250
|
});
|
|
3126
3251
|
H(() => {
|
|
3127
|
-
const
|
|
3128
|
-
|
|
3129
|
-
}),
|
|
3130
|
-
|
|
3252
|
+
const u = c.value;
|
|
3253
|
+
m.observe(u), document.body.addEventListener("click", D);
|
|
3254
|
+
}), ie(() => {
|
|
3255
|
+
m.disconnect(), document.body.removeEventListener("click", D);
|
|
3131
3256
|
}), G(() => n.items, () => {
|
|
3132
3257
|
t.value = n.items;
|
|
3133
3258
|
}, {
|
|
3134
3259
|
deep: !0
|
|
3135
|
-
}), G(t, (
|
|
3136
|
-
|
|
3260
|
+
}), G(t, (u) => {
|
|
3261
|
+
s = new Array(t.value.length).fill(M());
|
|
3137
3262
|
});
|
|
3138
|
-
function
|
|
3139
|
-
|
|
3263
|
+
function x(u, r, o, a) {
|
|
3264
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", u, r, o, a);
|
|
3140
3265
|
}
|
|
3141
3266
|
function k() {
|
|
3142
|
-
const
|
|
3143
|
-
|
|
3267
|
+
const u = g.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
3268
|
+
u == null || u.classList.remove("dgComponentSelected"), u == null || u.classList.remove("dgComponentFocused");
|
|
3144
3269
|
}
|
|
3145
|
-
return () =>
|
|
3270
|
+
return () => b("div", {
|
|
3146
3271
|
ref: T,
|
|
3147
|
-
"data-dragref": `${
|
|
3272
|
+
"data-dragref": `${i.schema.id}-container`,
|
|
3148
3273
|
class: C.value
|
|
3149
|
-
}, [
|
|
3150
|
-
ref:
|
|
3274
|
+
}, [b("div", {
|
|
3275
|
+
ref: c,
|
|
3151
3276
|
class: w.value
|
|
3152
|
-
}, [
|
|
3277
|
+
}, [b("div", {
|
|
3153
3278
|
ref: g,
|
|
3154
3279
|
class: "d-inline-block f-response-content",
|
|
3155
3280
|
style: "white-space: nowrap;"
|
|
3156
|
-
}, [t.value.map((
|
|
3157
|
-
ref: r
|
|
3281
|
+
}, [t.value.map((u, r) => b(Be, {
|
|
3282
|
+
ref: s[r],
|
|
3158
3283
|
class: "p-0 display-inline-block",
|
|
3159
|
-
modelValue:
|
|
3160
|
-
"onUpdate:modelValue": (o) =>
|
|
3284
|
+
modelValue: u,
|
|
3285
|
+
"onUpdate:modelValue": (o) => u = o,
|
|
3161
3286
|
canMove: !0,
|
|
3162
3287
|
childType: "response-toolbar-item",
|
|
3163
3288
|
childLabel: "按钮",
|
|
3164
3289
|
contentKey: "buttons",
|
|
3165
3290
|
componentId: n.componentId,
|
|
3166
|
-
id:
|
|
3291
|
+
id: u.id,
|
|
3167
3292
|
style: "padding:0 !important;display:inline-block",
|
|
3168
|
-
onSelectionChange:
|
|
3293
|
+
onSelectionChange: x,
|
|
3169
3294
|
onRemoveComponent: k
|
|
3170
3295
|
}, {
|
|
3171
|
-
default: () =>
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3296
|
+
default: () => {
|
|
3297
|
+
var o;
|
|
3298
|
+
return [b(Re, {
|
|
3299
|
+
id: u.id,
|
|
3300
|
+
disable: u.disable,
|
|
3301
|
+
text: u.text,
|
|
3302
|
+
icon: u.icon,
|
|
3303
|
+
class: ((o = u.appearance) == null ? void 0 : o.class) || "btn-secondary",
|
|
3304
|
+
alignment: n.alignment || "right",
|
|
3305
|
+
componentId: n.componentId
|
|
3306
|
+
}, null)];
|
|
3307
|
+
}
|
|
3178
3308
|
}))])])]);
|
|
3179
3309
|
}
|
|
3180
|
-
}),
|
|
3181
|
-
|
|
3182
|
-
n["response-toolbar"] =
|
|
3310
|
+
}), ye = de;
|
|
3311
|
+
Z.register = (n, e, t) => {
|
|
3312
|
+
n["response-toolbar"] = Z, e["response-toolbar"] = de;
|
|
3183
3313
|
};
|
|
3184
|
-
|
|
3185
|
-
n["response-toolbar"] =
|
|
3314
|
+
Z.registerDesigner = (n, e, t) => {
|
|
3315
|
+
n["response-toolbar"] = Ie, e["response-toolbar"] = de, n["response-toolbar-item"] = Re, e["response-toolbar-item"] = $t;
|
|
3186
3316
|
};
|
|
3187
|
-
|
|
3188
|
-
const
|
|
3317
|
+
Ue(Z);
|
|
3318
|
+
const rn = {
|
|
3189
3319
|
id: { type: String, default: "" },
|
|
3190
3320
|
componentId: { type: String, default: "" },
|
|
3191
3321
|
type: { type: String, default: "" },
|
|
@@ -3200,103 +3330,104 @@ const Kt = {
|
|
|
3200
3330
|
*/
|
|
3201
3331
|
modelValue: { type: Object },
|
|
3202
3332
|
ignore: { type: Boolean, default: !1 }
|
|
3203
|
-
},
|
|
3333
|
+
}, ve = /* @__PURE__ */ z({
|
|
3204
3334
|
name: "FDesignerTemplateItem",
|
|
3205
|
-
props:
|
|
3335
|
+
props: rn,
|
|
3206
3336
|
emits: ["selectionChange"],
|
|
3207
3337
|
setup(n, e) {
|
|
3208
|
-
const t =
|
|
3338
|
+
const t = M(), s = F(() => ({
|
|
3209
3339
|
"farris-component": !0
|
|
3210
3340
|
}));
|
|
3211
|
-
function
|
|
3212
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
3213
|
-
const
|
|
3214
|
-
if (
|
|
3215
|
-
const
|
|
3216
|
-
|
|
3341
|
+
function c(g) {
|
|
3342
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")), g && (g.preventDefault(), g.stopPropagation());
|
|
3343
|
+
const d = t.value;
|
|
3344
|
+
if (d) {
|
|
3345
|
+
const P = document.getElementsByClassName("dgComponentSelected");
|
|
3346
|
+
P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((y) => y.classList.remove("dgComponentSelected")), d.classList.add("dgComponentFocused"));
|
|
3217
3347
|
}
|
|
3218
3348
|
X.value++;
|
|
3219
3349
|
}
|
|
3220
|
-
return () =>
|
|
3350
|
+
return () => b("div", {
|
|
3221
3351
|
id: `${n.id}-design-item`,
|
|
3222
3352
|
ref: t,
|
|
3223
|
-
class:
|
|
3224
|
-
onClick:
|
|
3353
|
+
class: s.value,
|
|
3354
|
+
onClick: c
|
|
3225
3355
|
}, [e.slots.default && e.slots.default()]);
|
|
3226
3356
|
}
|
|
3227
|
-
}),
|
|
3357
|
+
}), sn = /* @__PURE__ */ z({
|
|
3228
3358
|
name: "FPageHeaderDesign",
|
|
3229
|
-
props:
|
|
3359
|
+
props: it,
|
|
3230
3360
|
emits: ["Click"],
|
|
3231
3361
|
setup(n, e) {
|
|
3232
|
-
const t =
|
|
3362
|
+
const t = M(), s = V("designer-host-service"), c = V("design-item-context"), g = pt(c.schema, s), d = ct(t, c, g), P = M(c.schema.toolbar || {
|
|
3233
3363
|
type: "response-toolbar",
|
|
3234
3364
|
buttons: []
|
|
3235
|
-
}),
|
|
3365
|
+
}), S = M(ye(P.value));
|
|
3236
3366
|
H(() => {
|
|
3237
|
-
t.value.componentInstance =
|
|
3238
|
-
}), G(() =>
|
|
3239
|
-
|
|
3367
|
+
t.value.componentInstance = d;
|
|
3368
|
+
}), G(() => c.schema.toolbar, () => {
|
|
3369
|
+
P.value = c.schema.toolbar || {
|
|
3240
3370
|
type: "response-toolbar",
|
|
3241
3371
|
buttons: []
|
|
3242
|
-
},
|
|
3372
|
+
}, S.value = ye(P.value);
|
|
3243
3373
|
}, {
|
|
3244
3374
|
deep: !0
|
|
3245
3375
|
});
|
|
3246
|
-
const
|
|
3247
|
-
function T(
|
|
3248
|
-
|
|
3376
|
+
const y = F(() => [...S.value.items]);
|
|
3377
|
+
function T(p, i, f, l) {
|
|
3378
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", p, i, f, l);
|
|
3249
3379
|
}
|
|
3250
|
-
return e.expose(
|
|
3380
|
+
return e.expose(d.value), () => b("div", {
|
|
3251
3381
|
ref: t
|
|
3252
|
-
}, [
|
|
3382
|
+
}, [b("nav", {
|
|
3253
3383
|
class: "f-page-header-base"
|
|
3254
|
-
}, [
|
|
3384
|
+
}, [b("div", {
|
|
3255
3385
|
class: "f-title"
|
|
3256
|
-
}, [
|
|
3257
|
-
default: () => [
|
|
3386
|
+
}, [b(ve, null, {
|
|
3387
|
+
default: () => [b("span", {
|
|
3258
3388
|
class: "f-title-icon f-text-orna-manage"
|
|
3259
|
-
}, [
|
|
3389
|
+
}, [b("i", {
|
|
3260
3390
|
class: n.icon
|
|
3261
3391
|
}, null)])]
|
|
3262
|
-
}),
|
|
3263
|
-
default: () => [
|
|
3392
|
+
}), b(ve, null, {
|
|
3393
|
+
default: () => [b("h4", {
|
|
3264
3394
|
class: "f-title-text"
|
|
3265
3395
|
}, [n.title])]
|
|
3266
|
-
})]),
|
|
3396
|
+
})]), b(Be, {
|
|
3267
3397
|
class: "col-6 text-right",
|
|
3268
|
-
modelValue:
|
|
3269
|
-
"onUpdate:modelValue": (
|
|
3398
|
+
modelValue: P.value,
|
|
3399
|
+
"onUpdate:modelValue": (p) => P.value = p,
|
|
3270
3400
|
canAdd: !0,
|
|
3271
3401
|
childType: "response-toolbar-item",
|
|
3272
3402
|
childLabel: "按钮",
|
|
3273
3403
|
contentKey: "buttons",
|
|
3274
|
-
id:
|
|
3404
|
+
id: P.value.id,
|
|
3275
3405
|
componentId: n.componentId,
|
|
3276
3406
|
onSelectionChange: T
|
|
3277
3407
|
}, {
|
|
3278
|
-
default: () => [
|
|
3408
|
+
default: () => [b(Ie, {
|
|
3279
3409
|
customClass: "w-100",
|
|
3280
|
-
items:
|
|
3410
|
+
items: y.value,
|
|
3281
3411
|
componentId: n.componentId
|
|
3282
3412
|
}, null)]
|
|
3283
3413
|
})])]);
|
|
3284
3414
|
}
|
|
3285
|
-
}),
|
|
3415
|
+
}), fn = {
|
|
3286
3416
|
install(n) {
|
|
3287
|
-
n.component(
|
|
3417
|
+
n.component(oe.name, oe);
|
|
3288
3418
|
},
|
|
3289
|
-
register(n, e, t,
|
|
3290
|
-
n["page-header"] =
|
|
3419
|
+
register(n, e, t, s) {
|
|
3420
|
+
n["page-header"] = oe, e["page-header"] = me, s["page-header"] = { eventHandlerResolver: at };
|
|
3291
3421
|
},
|
|
3292
3422
|
registerDesigner(n, e, t) {
|
|
3293
|
-
n["page-header"] =
|
|
3423
|
+
n["page-header"] = sn, e["page-header"] = me;
|
|
3294
3424
|
}
|
|
3295
3425
|
};
|
|
3296
3426
|
export {
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3427
|
+
oe as PageHeader,
|
|
3428
|
+
fn as default,
|
|
3429
|
+
at as eventHandlerResolver,
|
|
3430
|
+
it as pageHeaderDesignerProps,
|
|
3431
|
+
pe as pageHeaderProps,
|
|
3432
|
+
me as propsResolver
|
|
3302
3433
|
};
|