@farris/ui-vue 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
var
|
|
2
|
-
var $e = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import { getCustomClass as Y, withInstall as
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var $e = (n, e, t) => e in n ? je(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var R = (n, e, t) => $e(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as U, ref as S, computed as N, watch as q, createVNode as g, createTextVNode as J, getCurrentInstance as be, onMounted as H, onUnmounted as ye, inject as V, provide as _e, onBeforeUnmount as Ne, withModifiers as Fe } from "vue";
|
|
5
|
+
import { isPlainObject as ue, cloneDeep as ve } from "lodash-es";
|
|
6
|
+
import Le from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { getCustomClass as Y, withInstall as Ve } from "../common/index.esm.js";
|
|
8
8
|
import { useDesignerInnerComponent as Ce } from "../designer-canvas/index.esm.js";
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title: t, ignore:
|
|
12
|
-
return (!
|
|
9
|
+
const se = {}, we = {};
|
|
10
|
+
function re(n) {
|
|
11
|
+
const { properties: e, title: t, ignore: s } = n, i = s && Array.isArray(s), p = Object.keys(e).reduce((u, y) => ((!i || !s.find((w) => w == y)) && (u[y] = e[y].type === "object" && e[y].properties ? re(e[y]) : ve(e[y].default)), u), {});
|
|
12
|
+
return t && (!i || !s.find((u) => u == "id")) && (p.id = `${t}-${Date.now()}`), p;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
return
|
|
14
|
+
function Q(n, e = {}, t) {
|
|
15
|
+
const s = se[n];
|
|
16
|
+
if (s) {
|
|
17
|
+
let i = re(s);
|
|
18
|
+
const p = we[n];
|
|
19
|
+
return i = p ? p({ getSchemaByType: Q }, i, e, t) : i, i;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
function Ue(n, e) {
|
|
24
|
-
const t =
|
|
25
|
-
return Object.keys(n).reduce((
|
|
24
|
+
const t = re(e);
|
|
25
|
+
return Object.keys(n).reduce((s, i) => (s[i] && ue(s[i]) && ue(n[i]) ? Object.assign(s[i], n[i]) : s[i] = n[i], s), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(n).filter((
|
|
29
|
-
if (e.has(
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
27
|
+
function We(n, e) {
|
|
28
|
+
return Object.keys(n).filter((s) => n[s] != null).reduce((s, i) => {
|
|
29
|
+
if (e.has(i)) {
|
|
30
|
+
const p = e.get(i);
|
|
31
|
+
if (typeof p == "string")
|
|
32
|
+
s[p] = n[i];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
34
|
+
const u = p(i, n[i], n);
|
|
35
|
+
Object.assign(s, u);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
s[i] = n[i];
|
|
39
|
+
return s;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
function qe(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const s = Ue(n, e);
|
|
44
|
+
return We(s, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function e(
|
|
46
|
+
function He(n = {}) {
|
|
47
|
+
function e(h, b, l, c) {
|
|
48
48
|
if (typeof l == "number")
|
|
49
|
-
return
|
|
49
|
+
return c[h].length === l;
|
|
50
50
|
if (typeof l == "object") {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
51
|
+
const f = Object.keys(l)[0], v = l[f];
|
|
52
|
+
if (f === "not")
|
|
53
|
+
return Number(c[h].length) !== Number(v);
|
|
54
|
+
if (f === "moreThan")
|
|
55
|
+
return Number(c[h].length) >= Number(v);
|
|
56
|
+
if (f === "lessThan")
|
|
57
|
+
return Number(c[h].length) <= Number(v);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return
|
|
61
|
+
function t(h, b, l, c) {
|
|
62
|
+
return c[h] && c[h].propertyValue && String(c[h].propertyValue.value) === String(l);
|
|
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 l =
|
|
71
|
-
return typeof
|
|
72
|
-
if (
|
|
73
|
-
return { target: l, operator: "length", param: null, value:
|
|
74
|
-
const
|
|
75
|
-
return { target: l, operator: "getProperty", param:
|
|
68
|
+
Object.keys(n).reduce((h, b) => (h.set(b, n[b]), h), s);
|
|
69
|
+
function i(h, b) {
|
|
70
|
+
const l = h;
|
|
71
|
+
return typeof b == "number" ? [{ target: l, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: l, operator: "getProperty", param: h, value: !!b }] : typeof b == "object" ? Object.keys(b).map((c) => {
|
|
72
|
+
if (c === "length")
|
|
73
|
+
return { target: l, operator: "length", param: null, value: b[c] };
|
|
74
|
+
const f = c, v = b[c];
|
|
75
|
+
return { target: l, operator: "getProperty", param: f, value: v };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function h
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const
|
|
81
|
-
return l.push(...
|
|
78
|
+
function p(h) {
|
|
79
|
+
return Object.keys(h).reduce((l, c) => {
|
|
80
|
+
const f = i(c, h[c]);
|
|
81
|
+
return l.push(...f), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const l =
|
|
87
|
-
return l && l(
|
|
84
|
+
function u(h, b) {
|
|
85
|
+
if (s.has(h.operator)) {
|
|
86
|
+
const l = s.get(h.operator);
|
|
87
|
+
return l && l(h.target, h.param, h.value, b) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return h
|
|
91
|
+
function y(h, b) {
|
|
92
|
+
return p(h).reduce((f, v) => f && u(v, b), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const l = Object.keys(
|
|
96
|
-
return
|
|
94
|
+
function w(h, b) {
|
|
95
|
+
const l = Object.keys(h), c = l.includes("allOf"), f = l.includes("anyOf"), v = c || f, $ = (v ? h[v ? c ? "allOf" : "anyOf" : "allOf"] : [h]).map((T) => y(T, b));
|
|
96
|
+
return c ? !$.includes(!1) : $.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: w };
|
|
99
99
|
}
|
|
100
100
|
const K = {
|
|
101
101
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -134,24 +134,45 @@ const K = {
|
|
|
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
|
-
ze
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
+
}, Pe = {}, ze = {};
|
|
140
|
+
He();
|
|
141
|
+
function ie(n, e, t = /* @__PURE__ */ new Map(), s = (u, y, w) => y, i = {}, p = (u) => u) {
|
|
142
|
+
return se[e.title] = e, we[e.title] = s, Pe[e.title] = i, ze[e.title] = p, (u = {}) => {
|
|
143
|
+
const y = qe(u, e, t), w = Object.keys(n).reduce((h, b) => (h[b] = n[b].default, h), {});
|
|
144
|
+
return Object.assign(w, y);
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function De(n, e) {
|
|
147
148
|
return { customClass: e.class, customStyle: e.style };
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
150
|
+
function Ge(n, e) {
|
|
151
|
+
const t = [];
|
|
152
|
+
return e == null || e.buttons.map((s) => {
|
|
153
|
+
const i = {};
|
|
154
|
+
Object.keys(s).map((p) => {
|
|
155
|
+
var u;
|
|
156
|
+
p == "appearance" ? i.class = ((u = s[p]) == null ? void 0 : u.class) || "" : i[p] = s[p];
|
|
157
|
+
}), t.push(i);
|
|
158
|
+
}), { buttons: t };
|
|
159
|
+
}
|
|
160
|
+
function Je() {
|
|
161
|
+
function n(e, t) {
|
|
162
|
+
var y;
|
|
163
|
+
const s = (y = e.toolbar) == null ? void 0 : y.buttons;
|
|
164
|
+
if (!s || s.length < 1)
|
|
165
|
+
return null;
|
|
166
|
+
const [i, p] = t.payloads, u = s.find((w) => w.id === p);
|
|
167
|
+
return u ? u.onClick || u.click : null;
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
resolve: n
|
|
171
|
+
};
|
|
151
172
|
}
|
|
152
173
|
const Qe = /* @__PURE__ */ new Map([
|
|
153
|
-
["appearance",
|
|
154
|
-
["toolbar",
|
|
174
|
+
["appearance", De],
|
|
175
|
+
["toolbar", Ge]
|
|
155
176
|
]), Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/page-header.schema.json", Ze = "page-header", Ke = "A Farris Container Component", et = "object", tt = {
|
|
156
177
|
id: {
|
|
157
178
|
description: "The unique identifier for a Page Header",
|
|
@@ -271,7 +292,7 @@ const Qe = /* @__PURE__ */ new Map([
|
|
|
271
292
|
function ot(n, e, t) {
|
|
272
293
|
return e.title = "标题", e;
|
|
273
294
|
}
|
|
274
|
-
const
|
|
295
|
+
const ae = {
|
|
275
296
|
/** 组件自定义样式 */
|
|
276
297
|
customClass: { type: String, default: "" },
|
|
277
298
|
/** 是否显示图标 */
|
|
@@ -300,222 +321,213 @@ const pe = {
|
|
|
300
321
|
prePaginationDisabled: { type: Boolean, default: !0 },
|
|
301
322
|
/** 向后翻页是否禁用 */
|
|
302
323
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
303
|
-
}, st = Object.assign({},
|
|
324
|
+
}, st = Object.assign({}, ae, {
|
|
304
325
|
componentId: { type: String, default: "" }
|
|
305
|
-
}),
|
|
326
|
+
}), pe = ie(ae, nt, Qe, ot), rt = Je(), ne = /* @__PURE__ */ U({
|
|
306
327
|
name: "FPageHeader",
|
|
307
|
-
props:
|
|
328
|
+
props: ae,
|
|
308
329
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
309
330
|
setup(n, e) {
|
|
310
|
-
const t =
|
|
311
|
-
e.emit("Click",
|
|
331
|
+
const t = S(n.buttons), s = (T, B) => {
|
|
332
|
+
e.emit("Click", T, B);
|
|
312
333
|
};
|
|
313
|
-
function
|
|
314
|
-
|
|
334
|
+
function i(T, B) {
|
|
335
|
+
T && B && B.split(" ").reduce((x, C) => (x[C] = !0, x), T);
|
|
315
336
|
}
|
|
316
|
-
const
|
|
317
|
-
const
|
|
337
|
+
const p = N(() => {
|
|
338
|
+
const T = {
|
|
318
339
|
"f-page-header": !0
|
|
319
340
|
};
|
|
320
|
-
return
|
|
321
|
-
}),
|
|
322
|
-
const
|
|
341
|
+
return i(T, n.customClass), T;
|
|
342
|
+
}), u = N(() => {
|
|
343
|
+
const T = {
|
|
323
344
|
"f-title-icon": !0
|
|
324
345
|
};
|
|
325
|
-
return
|
|
326
|
-
}),
|
|
327
|
-
const
|
|
346
|
+
return i(T, n.iconClass), T;
|
|
347
|
+
}), y = N(() => {
|
|
348
|
+
const T = {
|
|
328
349
|
"f-icon": !0
|
|
329
350
|
};
|
|
330
|
-
return
|
|
331
|
-
}),
|
|
332
|
-
const
|
|
351
|
+
return i(T, n.icon), T;
|
|
352
|
+
}), w = N(() => {
|
|
353
|
+
const T = {
|
|
333
354
|
"f-title": !0
|
|
334
355
|
};
|
|
335
|
-
return
|
|
336
|
-
}),
|
|
337
|
-
const
|
|
356
|
+
return i(T, n.titleContentClass), T;
|
|
357
|
+
}), h = N(() => {
|
|
358
|
+
const T = {
|
|
338
359
|
"f-content": !0
|
|
339
360
|
};
|
|
340
|
-
return
|
|
341
|
-
}),
|
|
342
|
-
const
|
|
361
|
+
return i(T, n.contentClass), T;
|
|
362
|
+
}), b = N(() => {
|
|
363
|
+
const T = {
|
|
343
364
|
"f-content": !0
|
|
344
365
|
};
|
|
345
|
-
return
|
|
346
|
-
}), l =
|
|
366
|
+
return i(T, n.downContentClass), T;
|
|
367
|
+
}), l = N(() => ({
|
|
347
368
|
"f-icon f-icon-arrow-w": !0,
|
|
348
369
|
"f-state-disabled": n.prePaginationDisabled
|
|
349
|
-
})),
|
|
370
|
+
})), c = N(() => ({
|
|
350
371
|
"f-icon f-icon-arrow-e": !0,
|
|
351
372
|
"f-state-disabled": n.nextPaginationDisabled
|
|
352
373
|
}));
|
|
353
|
-
function
|
|
354
|
-
n.prePaginationDisabled || e.emit("PrePaginationClick",
|
|
374
|
+
function f(T) {
|
|
375
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", T);
|
|
355
376
|
}
|
|
356
|
-
function
|
|
357
|
-
n.nextPaginationDisabled || e.emit("NextPaginationClick",
|
|
377
|
+
function v(T) {
|
|
378
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", T);
|
|
358
379
|
}
|
|
359
|
-
function
|
|
360
|
-
return e.slots.titleContent ?
|
|
361
|
-
class:
|
|
362
|
-
}, [
|
|
380
|
+
function k() {
|
|
381
|
+
return e.slots.titleContent ? g("div", {
|
|
382
|
+
class: w.value
|
|
383
|
+
}, [J(" "), e.slots.titleContent()]) : g("div", {
|
|
363
384
|
class: "f-title"
|
|
364
|
-
}, [n.showIcon && n.icon ?
|
|
365
|
-
class:
|
|
366
|
-
}, [
|
|
367
|
-
class:
|
|
368
|
-
}, null)]) : "",
|
|
385
|
+
}, [n.showIcon && n.icon ? g("span", {
|
|
386
|
+
class: u.value
|
|
387
|
+
}, [g("i", {
|
|
388
|
+
class: y.value
|
|
389
|
+
}, null)]) : "", g("h4", {
|
|
369
390
|
class: "f-title-text"
|
|
370
|
-
}, [n.title]), n.subTitle ?
|
|
391
|
+
}, [n.title]), n.subTitle ? g("h5", {
|
|
371
392
|
class: "f-title-subtitle"
|
|
372
|
-
}, [n.subTitle]) : "", n.showPagination ?
|
|
393
|
+
}, [n.subTitle]) : "", n.showPagination ? g("div", {
|
|
373
394
|
class: "f-title-pagination"
|
|
374
|
-
}, [
|
|
395
|
+
}, [g("span", {
|
|
375
396
|
class: l.value,
|
|
376
|
-
onClick:
|
|
377
|
-
}, null),
|
|
378
|
-
class:
|
|
379
|
-
onClick:
|
|
397
|
+
onClick: f
|
|
398
|
+
}, null), g("span", {
|
|
399
|
+
class: c.value,
|
|
400
|
+
onClick: v
|
|
380
401
|
}, null)]) : ""]);
|
|
381
402
|
}
|
|
382
|
-
function
|
|
383
|
-
return e.slots.content ?
|
|
384
|
-
class:
|
|
385
|
-
}, [
|
|
403
|
+
function A() {
|
|
404
|
+
return e.slots.content ? g("div", {
|
|
405
|
+
class: h.value
|
|
406
|
+
}, [J(" "), e.slots.content()]) : "";
|
|
386
407
|
}
|
|
387
|
-
function
|
|
408
|
+
function $() {
|
|
388
409
|
if (n.buttons && n.buttons.length > 0)
|
|
389
|
-
return
|
|
410
|
+
return g(Le, {
|
|
390
411
|
customClass: n.buttonClass,
|
|
391
412
|
items: t.value,
|
|
392
|
-
onClick:
|
|
413
|
+
onClick: s
|
|
393
414
|
}, null);
|
|
394
415
|
}
|
|
395
|
-
function
|
|
396
|
-
return e.slots.downContent ?
|
|
397
|
-
class:
|
|
398
|
-
}, [
|
|
416
|
+
function _() {
|
|
417
|
+
return e.slots.downContent ? g("div", {
|
|
418
|
+
class: b.value
|
|
419
|
+
}, [J(" "), e.slots.downContent()]) : "";
|
|
399
420
|
}
|
|
400
|
-
return
|
|
401
|
-
t.value =
|
|
421
|
+
return q(() => n.buttons, (T) => {
|
|
422
|
+
t.value = T;
|
|
402
423
|
}, {
|
|
403
424
|
deep: !0
|
|
404
|
-
}), () =>
|
|
405
|
-
class:
|
|
406
|
-
}, [
|
|
425
|
+
}), () => g("div", {
|
|
426
|
+
class: p.value
|
|
427
|
+
}, [g("nav", {
|
|
407
428
|
class: "f-page-header-base"
|
|
408
|
-
}, [
|
|
429
|
+
}, [k(), A(), $()]), _()]);
|
|
409
430
|
}
|
|
410
431
|
});
|
|
411
|
-
function
|
|
412
|
-
var
|
|
413
|
-
function
|
|
432
|
+
function it(n, e, t) {
|
|
433
|
+
var B;
|
|
434
|
+
function s() {
|
|
414
435
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
415
436
|
}
|
|
416
|
-
|
|
417
|
-
const
|
|
418
|
-
function
|
|
437
|
+
s();
|
|
438
|
+
const i = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", u = S();
|
|
439
|
+
function y() {
|
|
419
440
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
420
441
|
}
|
|
421
|
-
function
|
|
442
|
+
function w() {
|
|
422
443
|
return !1;
|
|
423
444
|
}
|
|
424
|
-
function
|
|
445
|
+
function h() {
|
|
425
446
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
426
447
|
}
|
|
427
|
-
function
|
|
448
|
+
function b() {
|
|
428
449
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
429
450
|
}
|
|
430
|
-
function l(
|
|
431
|
-
if (!
|
|
451
|
+
function l(P) {
|
|
452
|
+
if (!P || !P.value)
|
|
432
453
|
return null;
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
435
|
-
const
|
|
436
|
-
return
|
|
454
|
+
if (P.value.schema && P.value.schema.type === "component")
|
|
455
|
+
return P.value;
|
|
456
|
+
const x = S(P == null ? void 0 : P.value.parent), C = l(x);
|
|
457
|
+
return C || null;
|
|
437
458
|
}
|
|
438
|
-
function
|
|
439
|
-
const { componentInstance:
|
|
440
|
-
return !
|
|
459
|
+
function c(P = e) {
|
|
460
|
+
const { componentInstance: x, designerItemElementRef: C } = P;
|
|
461
|
+
return !x || !x.value ? null : x.value.canMove ? C : c(P.parent);
|
|
441
462
|
}
|
|
442
|
-
function
|
|
443
|
-
return !!t && t.canAccepts(
|
|
463
|
+
function f(P) {
|
|
464
|
+
return !!t && t.canAccepts(P);
|
|
444
465
|
}
|
|
445
|
-
function
|
|
466
|
+
function v() {
|
|
446
467
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
447
468
|
}
|
|
448
|
-
function
|
|
449
|
-
}
|
|
450
|
-
function w(v, f) {
|
|
451
|
-
f && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(f);
|
|
469
|
+
function k() {
|
|
452
470
|
}
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
let k = U(x, v, f);
|
|
456
|
-
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(v, k));
|
|
457
|
-
const p = x.toLowerCase().replace("-", "_");
|
|
458
|
-
return k && !k.id && k.type === x && (k.id = `${p}_${Math.random().toString().slice(2, 6)}`), k;
|
|
471
|
+
function A(P, x) {
|
|
472
|
+
x && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(x);
|
|
459
473
|
}
|
|
460
|
-
function
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
474
|
+
function $(P, x) {
|
|
475
|
+
const { componentType: C } = P;
|
|
476
|
+
let I = Q(C, P, x);
|
|
477
|
+
t && t.onResolveNewComponentSchema && (I = t.onResolveNewComponentSchema(P, I));
|
|
478
|
+
const O = C.toLowerCase().replace("-", "_");
|
|
479
|
+
return I && !I.id && I.type === C && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
|
|
467
480
|
}
|
|
468
|
-
function P
|
|
481
|
+
function _(P) {
|
|
469
482
|
}
|
|
470
|
-
function
|
|
483
|
+
function T(...P) {
|
|
471
484
|
if (t && t.getPropsConfig)
|
|
472
|
-
return t.getPropsConfig(...
|
|
485
|
+
return t.getPropsConfig(...P);
|
|
473
486
|
}
|
|
474
|
-
return
|
|
475
|
-
canMove:
|
|
476
|
-
canSelectParent:
|
|
477
|
-
canDelete:
|
|
478
|
-
canNested: !
|
|
487
|
+
return u.value = {
|
|
488
|
+
canMove: y(),
|
|
489
|
+
canSelectParent: w(),
|
|
490
|
+
canDelete: h(),
|
|
491
|
+
canNested: !b(),
|
|
479
492
|
contents: e == null ? void 0 : e.schema.contents,
|
|
480
493
|
elementRef: n,
|
|
481
|
-
parent: (
|
|
494
|
+
parent: (B = e == null ? void 0 : e.parent) == null ? void 0 : B.componentInstance,
|
|
482
495
|
schema: e == null ? void 0 : e.schema,
|
|
483
|
-
styles:
|
|
484
|
-
designerClass:
|
|
485
|
-
canAccepts:
|
|
496
|
+
styles: i,
|
|
497
|
+
designerClass: p,
|
|
498
|
+
canAccepts: f,
|
|
486
499
|
getBelongedComponentInstance: l,
|
|
487
|
-
getDraggableDesignItemElement:
|
|
488
|
-
getDraggingDisplayText:
|
|
489
|
-
getPropConfig:
|
|
490
|
-
getDragScopeElement:
|
|
491
|
-
onAcceptMovedChildElement:
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}, g;
|
|
500
|
+
getDraggableDesignItemElement: c,
|
|
501
|
+
getDraggingDisplayText: v,
|
|
502
|
+
getPropConfig: T,
|
|
503
|
+
getDragScopeElement: k,
|
|
504
|
+
onAcceptMovedChildElement: A,
|
|
505
|
+
onChildElementMovedOut: _,
|
|
506
|
+
addNewChildComponentSchema: $,
|
|
507
|
+
updateDragAndDropRules: s,
|
|
508
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
|
|
509
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
|
|
510
|
+
}, u;
|
|
499
511
|
}
|
|
500
512
|
class ee {
|
|
501
513
|
constructor(e, t) {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
+
R(this, "componentId");
|
|
515
|
+
R(this, "viewModelId");
|
|
516
|
+
R(this, "eventsEditorUtils");
|
|
517
|
+
R(this, "formSchemaUtils");
|
|
518
|
+
R(this, "formMetadataConverter");
|
|
519
|
+
R(this, "designViewModelUtils");
|
|
520
|
+
R(this, "designViewModelField");
|
|
521
|
+
R(this, "controlCreatorUtils");
|
|
522
|
+
R(this, "designerHostService");
|
|
523
|
+
R(this, "schemaService", null);
|
|
524
|
+
R(this, "metadataService", null);
|
|
525
|
+
R(this, "propertyConfig", {
|
|
514
526
|
type: "object",
|
|
515
527
|
categories: {}
|
|
516
528
|
});
|
|
517
|
-
var
|
|
518
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
529
|
+
var s;
|
|
530
|
+
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
531
|
}
|
|
520
532
|
getTableInfo() {
|
|
521
533
|
var e;
|
|
@@ -525,8 +537,8 @@ class ee {
|
|
|
525
537
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
526
538
|
if (t) {
|
|
527
539
|
if (!this.designViewModelField) {
|
|
528
|
-
const
|
|
529
|
-
this.designViewModelField =
|
|
540
|
+
const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
541
|
+
this.designViewModelField = s.fields.find((i) => i.id === t);
|
|
530
542
|
}
|
|
531
543
|
e.updateOn = this.designViewModelField.updateOn;
|
|
532
544
|
}
|
|
@@ -578,8 +590,21 @@ class ee {
|
|
|
578
590
|
}
|
|
579
591
|
};
|
|
580
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
* @param propertyId
|
|
596
|
+
* @param componentInstance
|
|
597
|
+
* @returns
|
|
598
|
+
*/
|
|
599
|
+
updateElementByParentContainer(e, t) {
|
|
600
|
+
const s = t && t.parent && t.parent.schema;
|
|
601
|
+
if (!s)
|
|
602
|
+
return;
|
|
603
|
+
const i = s.contents.findIndex((u) => u.id === e), p = ve(s.contents[i]);
|
|
604
|
+
s.contents.splice(i, 1), s.contents.splice(i, 0, p);
|
|
605
|
+
}
|
|
581
606
|
}
|
|
582
|
-
class
|
|
607
|
+
class at extends ee {
|
|
583
608
|
constructor(e, t) {
|
|
584
609
|
super(e, t);
|
|
585
610
|
}
|
|
@@ -619,7 +644,7 @@ class it extends ee {
|
|
|
619
644
|
description: "标题"
|
|
620
645
|
}
|
|
621
646
|
},
|
|
622
|
-
setPropertyRelates(t,
|
|
647
|
+
setPropertyRelates(t, s) {
|
|
623
648
|
if (t)
|
|
624
649
|
switch (t && t.propertyID) {
|
|
625
650
|
case "title": {
|
|
@@ -654,7 +679,7 @@ class it extends ee {
|
|
|
654
679
|
label: "click",
|
|
655
680
|
name: "点击事件"
|
|
656
681
|
}
|
|
657
|
-
],
|
|
682
|
+
], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
|
|
658
683
|
this.propertyConfig.categories.eventsEditor = {
|
|
659
684
|
title: "事件",
|
|
660
685
|
hideTitle: !0,
|
|
@@ -662,7 +687,7 @@ class it extends ee {
|
|
|
662
687
|
"data-grid-component-viewmodel": {
|
|
663
688
|
type: "events-editor",
|
|
664
689
|
editor: {
|
|
665
|
-
initialData:
|
|
690
|
+
initialData: i
|
|
666
691
|
}
|
|
667
692
|
}
|
|
668
693
|
},
|
|
@@ -670,65 +695,65 @@ class it extends ee {
|
|
|
670
695
|
refreshPanelAfterChanged: !0,
|
|
671
696
|
tabId: "commands",
|
|
672
697
|
tabName: "交互",
|
|
673
|
-
setPropertyRelates(
|
|
674
|
-
const
|
|
675
|
-
delete e[
|
|
698
|
+
setPropertyRelates(p, u) {
|
|
699
|
+
const y = p.propertyValue;
|
|
700
|
+
delete e[s.viewModelId], y && (y.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, y.events, y));
|
|
676
701
|
}
|
|
677
702
|
};
|
|
678
703
|
}
|
|
679
704
|
}
|
|
680
|
-
function
|
|
681
|
-
function t(
|
|
705
|
+
function lt(n, e) {
|
|
706
|
+
function t(y) {
|
|
682
707
|
return !1;
|
|
683
708
|
}
|
|
684
|
-
function
|
|
709
|
+
function s() {
|
|
685
710
|
return !1;
|
|
686
711
|
}
|
|
687
|
-
function
|
|
712
|
+
function i() {
|
|
688
713
|
return !1;
|
|
689
714
|
}
|
|
690
|
-
function
|
|
715
|
+
function p() {
|
|
691
716
|
return !0;
|
|
692
717
|
}
|
|
693
|
-
function
|
|
694
|
-
return new
|
|
718
|
+
function u(y) {
|
|
719
|
+
return new at(y, e).getPropertyConfig(n);
|
|
695
720
|
}
|
|
696
721
|
return {
|
|
697
722
|
canAccepts: t,
|
|
698
|
-
hideNestedPaddingInDesginerView:
|
|
699
|
-
getPropsConfig:
|
|
700
|
-
checkCanDeleteComponent:
|
|
701
|
-
checkCanMoveComponent:
|
|
723
|
+
hideNestedPaddingInDesginerView: p,
|
|
724
|
+
getPropsConfig: u,
|
|
725
|
+
checkCanDeleteComponent: s,
|
|
726
|
+
checkCanMoveComponent: i
|
|
702
727
|
};
|
|
703
728
|
}
|
|
704
|
-
class
|
|
729
|
+
class Te {
|
|
705
730
|
constructor(e) {
|
|
706
731
|
/** 工具栏项标识 */
|
|
707
|
-
|
|
732
|
+
R(this, "id", "");
|
|
708
733
|
/** 工具栏项自定义样式 */
|
|
709
|
-
|
|
734
|
+
R(this, "class", "btn-secondary");
|
|
710
735
|
/** 图标 */
|
|
711
|
-
|
|
736
|
+
R(this, "icon", "");
|
|
712
737
|
/** 所属分组 */
|
|
713
|
-
|
|
738
|
+
R(this, "groupId", "");
|
|
714
739
|
/** 收藏顺序 */
|
|
715
|
-
|
|
740
|
+
R(this, "order", -1);
|
|
716
741
|
/** 是否作为下拉菜单的顶层按钮 */
|
|
717
|
-
|
|
742
|
+
R(this, "asDropDownTop", !1);
|
|
718
743
|
/** 文本 */
|
|
719
|
-
|
|
744
|
+
R(this, "text", "");
|
|
720
745
|
/** 是否可见 */
|
|
721
|
-
|
|
722
|
-
|
|
746
|
+
R(this, "visible", !0);
|
|
747
|
+
R(this, "responsed", !1);
|
|
723
748
|
/** 是否启用提示消息 */
|
|
724
|
-
|
|
749
|
+
R(this, "tipsEnable", !1);
|
|
725
750
|
/** 提示消息内容 */
|
|
726
|
-
|
|
751
|
+
R(this, "tipsText", "");
|
|
727
752
|
/** 记录宽度 */
|
|
728
|
-
|
|
729
|
-
|
|
753
|
+
R(this, "width", 0);
|
|
754
|
+
R(this, "onClick", () => {
|
|
730
755
|
});
|
|
731
|
-
|
|
756
|
+
R(this, "options");
|
|
732
757
|
this.options = e;
|
|
733
758
|
const t = [
|
|
734
759
|
"id",
|
|
@@ -746,13 +771,13 @@ class De {
|
|
|
746
771
|
"tipsText",
|
|
747
772
|
"onClick"
|
|
748
773
|
];
|
|
749
|
-
Object.keys(e).filter((
|
|
750
|
-
this[
|
|
774
|
+
Object.keys(e).filter((s) => t.indexOf(s) > -1).forEach((s) => {
|
|
775
|
+
this[s] = e[s];
|
|
751
776
|
});
|
|
752
777
|
}
|
|
753
778
|
/** 是否可用 */
|
|
754
779
|
get enable() {
|
|
755
|
-
return Object.keys(this.options).indexOf("
|
|
780
|
+
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : N(() => !0);
|
|
756
781
|
}
|
|
757
782
|
/** 设置宽度 */
|
|
758
783
|
setWidth(e) {
|
|
@@ -763,7 +788,7 @@ class De {
|
|
|
763
788
|
return this.visible ? this.width : !1;
|
|
764
789
|
}
|
|
765
790
|
}
|
|
766
|
-
class ct extends
|
|
791
|
+
class ct extends Te {
|
|
767
792
|
constructor(e) {
|
|
768
793
|
super(e);
|
|
769
794
|
}
|
|
@@ -771,43 +796,43 @@ class ct extends De {
|
|
|
771
796
|
function Se() {
|
|
772
797
|
function n(e) {
|
|
773
798
|
const t = [];
|
|
774
|
-
return e.reduce((
|
|
799
|
+
return e.reduce((s, i) => (i.children && i.children.length > 0 ? s.push(new z(i)) : s.push(new ct(i)), s), t), t;
|
|
775
800
|
}
|
|
776
801
|
return { buildResponseToolbarItems: n };
|
|
777
802
|
}
|
|
778
|
-
const { buildResponseToolbarItems:
|
|
779
|
-
class
|
|
803
|
+
const { buildResponseToolbarItems: dt } = Se();
|
|
804
|
+
class z extends Te {
|
|
780
805
|
constructor(t) {
|
|
781
806
|
super(t);
|
|
782
|
-
|
|
807
|
+
R(this, "placement", "");
|
|
783
808
|
// 下拉位置
|
|
784
809
|
/** 下拉class */
|
|
785
|
-
|
|
810
|
+
R(this, "dropdownClass", "");
|
|
786
811
|
/** 下拉菜单class */
|
|
787
|
-
|
|
812
|
+
R(this, "menuClass", "");
|
|
788
813
|
/** 是否用分开的下拉按钮 */
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
const
|
|
793
|
-
Object.keys(t).filter((
|
|
794
|
-
this[
|
|
795
|
-
}), t.children && t.children.length && (this.children =
|
|
814
|
+
R(this, "split", !1);
|
|
815
|
+
R(this, "children", []);
|
|
816
|
+
R(this, "expanded", !1);
|
|
817
|
+
const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
818
|
+
Object.keys(t).filter((i) => s.indexOf(i) > -1).forEach((i) => {
|
|
819
|
+
this[i] = t[i];
|
|
820
|
+
}), t.children && t.children.length && (this.children = dt(t.children));
|
|
796
821
|
}
|
|
797
822
|
}
|
|
798
|
-
const
|
|
823
|
+
const ut = /* @__PURE__ */ new Map([
|
|
799
824
|
["buttons", "items"],
|
|
800
|
-
["appearance",
|
|
801
|
-
]),
|
|
802
|
-
["appearance",
|
|
825
|
+
["appearance", De]
|
|
826
|
+
]), pt = /* @__PURE__ */ new Map([
|
|
827
|
+
["appearance", ft]
|
|
803
828
|
]);
|
|
804
|
-
function
|
|
829
|
+
function ft(n, e) {
|
|
805
830
|
return { class: e.class, style: e.style };
|
|
806
831
|
}
|
|
807
|
-
function
|
|
832
|
+
function ke(n, e, t) {
|
|
808
833
|
return e;
|
|
809
834
|
}
|
|
810
|
-
const
|
|
835
|
+
const gt = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/response-toolbar.schema.json", ht = "response-toolbar", bt = "A Farris Toolbar Component", yt = "object", vt = {
|
|
811
836
|
id: {
|
|
812
837
|
description: "The unique identifier for a Response Toolbar",
|
|
813
838
|
type: "string"
|
|
@@ -823,9 +848,6 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
823
848
|
properties: {
|
|
824
849
|
class: {
|
|
825
850
|
type: "string"
|
|
826
|
-
},
|
|
827
|
-
style: {
|
|
828
|
-
type: "string"
|
|
829
851
|
}
|
|
830
852
|
},
|
|
831
853
|
default: {}
|
|
@@ -840,19 +862,19 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
840
862
|
type: "array",
|
|
841
863
|
default: []
|
|
842
864
|
}
|
|
843
|
-
},
|
|
865
|
+
}, Ct = [
|
|
844
866
|
"id",
|
|
845
867
|
"type",
|
|
846
868
|
"buttons"
|
|
847
|
-
],
|
|
848
|
-
$schema:
|
|
849
|
-
$id:
|
|
850
|
-
title:
|
|
851
|
-
description:
|
|
852
|
-
type:
|
|
853
|
-
properties:
|
|
854
|
-
required:
|
|
855
|
-
},
|
|
869
|
+
], wt = {
|
|
870
|
+
$schema: gt,
|
|
871
|
+
$id: mt,
|
|
872
|
+
title: ht,
|
|
873
|
+
description: bt,
|
|
874
|
+
type: yt,
|
|
875
|
+
properties: vt,
|
|
876
|
+
required: Ct
|
|
877
|
+
}, Pt = "https://json-schema.org/draft/2020-12/schema", Dt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Tt = "response-toolbar-item", St = "A Farris Toolbar Item Component", kt = "object", Mt = {
|
|
856
878
|
id: {
|
|
857
879
|
description: "The unique identifier for a Response Toolbar",
|
|
858
880
|
type: "string"
|
|
@@ -868,31 +890,33 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
868
890
|
properties: {
|
|
869
891
|
class: {
|
|
870
892
|
type: "string",
|
|
871
|
-
default: "btn-
|
|
872
|
-
},
|
|
873
|
-
style: {
|
|
874
|
-
type: "string"
|
|
893
|
+
default: "btn-secondary"
|
|
875
894
|
}
|
|
876
895
|
},
|
|
877
896
|
default: {}
|
|
878
897
|
},
|
|
879
898
|
alignment: {
|
|
880
|
-
description: "
|
|
899
|
+
description: "对齐",
|
|
881
900
|
type: "string",
|
|
882
901
|
default: "right"
|
|
883
902
|
},
|
|
884
903
|
text: {
|
|
885
|
-
description: "
|
|
904
|
+
description: "文本",
|
|
886
905
|
type: "string",
|
|
887
|
-
default: "
|
|
906
|
+
default: "按钮"
|
|
888
907
|
},
|
|
889
908
|
icon: {
|
|
890
|
-
description: "
|
|
909
|
+
description: "图标",
|
|
891
910
|
type: "string",
|
|
892
911
|
default: ""
|
|
893
912
|
},
|
|
894
|
-
|
|
895
|
-
description: "
|
|
913
|
+
disabled: {
|
|
914
|
+
description: "禁用",
|
|
915
|
+
type: "boolean",
|
|
916
|
+
default: !1
|
|
917
|
+
},
|
|
918
|
+
onClick: {
|
|
919
|
+
description: "点击事件",
|
|
896
920
|
type: "string",
|
|
897
921
|
default: ""
|
|
898
922
|
}
|
|
@@ -900,15 +924,15 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
900
924
|
"id",
|
|
901
925
|
"type",
|
|
902
926
|
"text"
|
|
903
|
-
],
|
|
904
|
-
$schema:
|
|
905
|
-
$id:
|
|
906
|
-
title:
|
|
907
|
-
description:
|
|
908
|
-
type:
|
|
909
|
-
properties:
|
|
927
|
+
], oe = {
|
|
928
|
+
$schema: Pt,
|
|
929
|
+
$id: Dt,
|
|
930
|
+
title: Tt,
|
|
931
|
+
description: St,
|
|
932
|
+
type: kt,
|
|
933
|
+
properties: Mt,
|
|
910
934
|
required: xt
|
|
911
|
-
}, Et = "response-toolbar-item",
|
|
935
|
+
}, Et = "response-toolbar-item", Bt = "A Farris Container Component", It = "object", Rt = {
|
|
912
936
|
basic: {
|
|
913
937
|
title: "基本信息",
|
|
914
938
|
description: "Basic Infomation",
|
|
@@ -941,12 +965,12 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
941
965
|
}
|
|
942
966
|
}
|
|
943
967
|
}
|
|
944
|
-
},
|
|
968
|
+
}, fe = {
|
|
945
969
|
title: Et,
|
|
946
|
-
description:
|
|
947
|
-
type:
|
|
948
|
-
categories:
|
|
949
|
-
},
|
|
970
|
+
description: Bt,
|
|
971
|
+
type: It,
|
|
972
|
+
categories: Rt
|
|
973
|
+
}, le = {
|
|
950
974
|
/** 组件自定义样式 */
|
|
951
975
|
customClass: { type: String, default: "" },
|
|
952
976
|
alignment: { Type: String, default: "right" },
|
|
@@ -955,16 +979,16 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
|
|
|
955
979
|
default: []
|
|
956
980
|
}
|
|
957
981
|
};
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
const
|
|
982
|
+
se[oe.title] = oe;
|
|
983
|
+
Pe[fe.title] = fe;
|
|
984
|
+
const At = Object.assign({}, le, {
|
|
961
985
|
componentId: { type: String, default: "" }
|
|
962
|
-
}),
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
),
|
|
986
|
+
}), ce = ie(
|
|
987
|
+
le,
|
|
988
|
+
wt,
|
|
989
|
+
ut,
|
|
990
|
+
ke
|
|
991
|
+
), Me = {
|
|
968
992
|
id: { type: String, default: "" },
|
|
969
993
|
items: { type: Object, default: {} },
|
|
970
994
|
class: { type: String, default: "" },
|
|
@@ -973,1493 +997,738 @@ const Bt = Object.assign({}, ue, {
|
|
|
973
997
|
icon: { type: String, default: "" },
|
|
974
998
|
componentId: { type: String, default: "" },
|
|
975
999
|
alignment: { Type: String, default: "right" }
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1000
|
+
}, Ot = ie(
|
|
1001
|
+
Me,
|
|
1002
|
+
oe,
|
|
1003
|
+
pt,
|
|
1004
|
+
ke
|
|
981
1005
|
);
|
|
982
|
-
function
|
|
1006
|
+
function xe() {
|
|
983
1007
|
function n(t) {
|
|
984
|
-
const
|
|
1008
|
+
const s = {
|
|
985
1009
|
"f-icon": !0
|
|
986
1010
|
};
|
|
987
1011
|
if (t.icon) {
|
|
988
|
-
const
|
|
989
|
-
|
|
1012
|
+
const i = t.icon.trim().split(" ");
|
|
1013
|
+
i && i.length && i.reduce((p, u) => (p[u] = !0, p), s);
|
|
990
1014
|
}
|
|
991
|
-
return
|
|
1015
|
+
return s;
|
|
992
1016
|
}
|
|
993
1017
|
function e(t) {
|
|
994
1018
|
return !!(t.icon && t.icon.trim());
|
|
995
1019
|
}
|
|
996
1020
|
return { iconClass: n, shouldShowIcon: e };
|
|
997
1021
|
}
|
|
998
|
-
function
|
|
1022
|
+
function jt(n) {
|
|
999
1023
|
function e(l) {
|
|
1000
|
-
const
|
|
1024
|
+
const c = {
|
|
1001
1025
|
"dropdown-menu": !0
|
|
1002
1026
|
};
|
|
1003
1027
|
if (l.class) {
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1028
|
+
const f = l.menuClass.split(" ");
|
|
1029
|
+
f && f.length && f.reduce((v, k) => (v[k] = !0, v), c);
|
|
1006
1030
|
}
|
|
1007
|
-
return
|
|
1031
|
+
return c;
|
|
1008
1032
|
}
|
|
1009
1033
|
function t(l) {
|
|
1010
|
-
const
|
|
1034
|
+
const c = {
|
|
1011
1035
|
disabled: !l.enable,
|
|
1012
1036
|
"dropdown-submenu": !0,
|
|
1013
1037
|
"f-rt-dropdown": !0
|
|
1014
|
-
},
|
|
1015
|
-
return
|
|
1038
|
+
}, f = l.dropdownClass.split(" ");
|
|
1039
|
+
return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
|
|
1016
1040
|
}
|
|
1017
|
-
function
|
|
1018
|
-
const
|
|
1041
|
+
function s(l) {
|
|
1042
|
+
const c = {
|
|
1019
1043
|
disabled: !l.enable,
|
|
1020
1044
|
"dropdown-item": !0,
|
|
1021
1045
|
"f-rt-btn": !0
|
|
1022
|
-
},
|
|
1023
|
-
return
|
|
1024
|
-
}
|
|
1025
|
-
let
|
|
1026
|
-
const
|
|
1027
|
-
function
|
|
1028
|
-
var
|
|
1029
|
-
((
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1046
|
+
}, f = l.class.split(" ");
|
|
1047
|
+
return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
|
|
1048
|
+
}
|
|
1049
|
+
let i;
|
|
1050
|
+
const p = /* @__PURE__ */ new Map();
|
|
1051
|
+
function u(l, c, f) {
|
|
1052
|
+
var k;
|
|
1053
|
+
((k = l.target) == null ? void 0 : k.id) === c.id && l.stopPropagation();
|
|
1054
|
+
const v = f ? f.id : "__top_item__";
|
|
1055
|
+
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? p.set(v, c) : p.delete(v)), p.has(v) && p.get(v) !== c) {
|
|
1056
|
+
const A = p.get(v);
|
|
1057
|
+
A && (A.expanded = !1);
|
|
1034
1058
|
}
|
|
1035
1059
|
}
|
|
1036
|
-
function
|
|
1037
|
-
document.body.click(),
|
|
1038
|
-
}
|
|
1039
|
-
function
|
|
1040
|
-
return l.children.map((
|
|
1041
|
-
class: t(
|
|
1042
|
-
id:
|
|
1043
|
-
onClick: (
|
|
1044
|
-
}, [
|
|
1045
|
-
id:
|
|
1046
|
-
class:
|
|
1047
|
-
onMouseover: (
|
|
1048
|
-
}, [
|
|
1060
|
+
function y(l, c) {
|
|
1061
|
+
document.body.click(), c.enable && c.onClick(l, c.id);
|
|
1062
|
+
}
|
|
1063
|
+
function w(l) {
|
|
1064
|
+
return l.children.map((c) => c.children && c.children.length ? g("li", {
|
|
1065
|
+
class: t(c),
|
|
1066
|
+
id: c.id,
|
|
1067
|
+
onClick: (f) => c.enable && u(f, c, l)
|
|
1068
|
+
}, [g("span", {
|
|
1069
|
+
id: c.id,
|
|
1070
|
+
class: s(c),
|
|
1071
|
+
onMouseover: (f) => c.enable && u(f, c, l)
|
|
1072
|
+
}, [c.text, g("i", {
|
|
1049
1073
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1050
1074
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1051
|
-
}, null)]),
|
|
1052
|
-
class:
|
|
1053
|
-
id:
|
|
1054
|
-
onClick: (
|
|
1055
|
-
onMouseover: (
|
|
1056
|
-
}, [n.shouldShowIcon(
|
|
1057
|
-
class: n.iconClass(
|
|
1058
|
-
}, null),
|
|
1059
|
-
}
|
|
1060
|
-
function
|
|
1061
|
-
const
|
|
1075
|
+
}, null)]), i(c, c)]) : g("li", {
|
|
1076
|
+
class: s(c),
|
|
1077
|
+
id: c.id,
|
|
1078
|
+
onClick: (f) => y(f, c),
|
|
1079
|
+
onMouseover: (f) => c.enable && u(f, c, l)
|
|
1080
|
+
}, [n.shouldShowIcon(c) && g("i", {
|
|
1081
|
+
class: n.iconClass(c)
|
|
1082
|
+
}, null), c.text]));
|
|
1083
|
+
}
|
|
1084
|
+
function h(l, c, f) {
|
|
1085
|
+
const v = {
|
|
1062
1086
|
display: l.expanded ? "block" : "none",
|
|
1063
1087
|
position: "fixed",
|
|
1064
1088
|
maxWidth: "300px",
|
|
1065
1089
|
width: "auto",
|
|
1066
1090
|
minWidth: "120px"
|
|
1067
|
-
},
|
|
1068
|
-
if (
|
|
1091
|
+
}, k = document.getElementsByTagName("body")[0].getClientRects()[0].width, A = c, $ = A == null ? void 0 : A.getClientRects();
|
|
1092
|
+
if (A && $ && $.length) {
|
|
1069
1093
|
const {
|
|
1070
|
-
top:
|
|
1071
|
-
width:
|
|
1072
|
-
left:
|
|
1073
|
-
right:
|
|
1074
|
-
height:
|
|
1075
|
-
} =
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1081
|
-
if (
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1094
|
+
top: _,
|
|
1095
|
+
width: T,
|
|
1096
|
+
left: B,
|
|
1097
|
+
right: P,
|
|
1098
|
+
height: x
|
|
1099
|
+
} = $[0], C = Math.ceil(x + _);
|
|
1100
|
+
v.top = `${C}px`, v.left = `${B}px`;
|
|
1101
|
+
const I = l.id + "_menu", O = c ? c.querySelector("#" + I) : null;
|
|
1102
|
+
if (O) {
|
|
1103
|
+
v.display === "block" && (O.style.display = "block");
|
|
1104
|
+
const d = O.getBoundingClientRect();
|
|
1105
|
+
if (f) {
|
|
1106
|
+
v.top = `${_ - 6}px`;
|
|
1107
|
+
const r = Math.ceil(T + B);
|
|
1108
|
+
v.left = `${r}px`;
|
|
1085
1109
|
}
|
|
1086
|
-
|
|
1110
|
+
k - B - T < d.width && (v.left = `${(f ? B : P) - d.width}px`);
|
|
1087
1111
|
}
|
|
1088
1112
|
}
|
|
1089
|
-
return
|
|
1113
|
+
return v;
|
|
1090
1114
|
}
|
|
1091
|
-
|
|
1092
|
-
var
|
|
1093
|
-
const
|
|
1094
|
-
return
|
|
1115
|
+
i = function(l, c) {
|
|
1116
|
+
var A, $;
|
|
1117
|
+
const f = be(), v = c ? c.id : l.id, k = ($ = (A = f == null ? void 0 : f.exposed) == null ? void 0 : A.elementRef.value) == null ? void 0 : $.querySelector("#" + v);
|
|
1118
|
+
return g("ul", {
|
|
1095
1119
|
class: e(l),
|
|
1096
|
-
style:
|
|
1120
|
+
style: h(l, k, c),
|
|
1097
1121
|
id: l.id + "_menu"
|
|
1098
|
-
}, [
|
|
1122
|
+
}, [w(l)]);
|
|
1099
1123
|
};
|
|
1100
|
-
function
|
|
1101
|
-
|
|
1124
|
+
function b() {
|
|
1125
|
+
p.forEach((l) => {
|
|
1102
1126
|
l.expanded = !1;
|
|
1103
|
-
}),
|
|
1127
|
+
}), p.clear();
|
|
1104
1128
|
}
|
|
1105
1129
|
return {
|
|
1106
|
-
renderDropdownMenu:
|
|
1107
|
-
clearAllDropDownMenu:
|
|
1130
|
+
renderDropdownMenu: i,
|
|
1131
|
+
clearAllDropDownMenu: b
|
|
1108
1132
|
};
|
|
1109
1133
|
}
|
|
1110
|
-
function
|
|
1111
|
-
const t =
|
|
1112
|
-
renderDropdownMenu:
|
|
1113
|
-
clearAllDropDownMenu:
|
|
1114
|
-
} =
|
|
1115
|
-
function
|
|
1134
|
+
function $t(n, e) {
|
|
1135
|
+
const t = S(n.alignment), {
|
|
1136
|
+
renderDropdownMenu: s,
|
|
1137
|
+
clearAllDropDownMenu: i
|
|
1138
|
+
} = jt(e);
|
|
1139
|
+
function p(b) {
|
|
1116
1140
|
const l = {
|
|
1117
1141
|
"btn-group": !0,
|
|
1118
1142
|
"f-rt-dropdown": !0,
|
|
1119
1143
|
"f-btn-ml": t.value === "right",
|
|
1120
1144
|
"f-btn-mr": t.value === "left"
|
|
1121
|
-
},
|
|
1122
|
-
return
|
|
1145
|
+
}, c = b.dropdownClass.split(" ");
|
|
1146
|
+
return c && c.length && c.reduce((f, v) => (f[v] = !0, f), l), l;
|
|
1123
1147
|
}
|
|
1124
|
-
function
|
|
1148
|
+
function u(b) {
|
|
1125
1149
|
const l = {
|
|
1126
1150
|
btn: !0,
|
|
1127
|
-
disabled: !
|
|
1151
|
+
disabled: !b.enable,
|
|
1128
1152
|
"f-rt-btn": !0,
|
|
1129
|
-
"btn-icontext": !!(
|
|
1153
|
+
"btn-icontext": !!(b.icon && b.icon.trim())
|
|
1130
1154
|
};
|
|
1131
|
-
if (
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1155
|
+
if (b.class) {
|
|
1156
|
+
const c = b.class.split(" ");
|
|
1157
|
+
c && c.length && c.reduce((f, v) => (f[v] = !0, f), l);
|
|
1134
1158
|
}
|
|
1135
1159
|
return l;
|
|
1136
1160
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
document.body.click(), l.expanded = !
|
|
1141
|
-
}
|
|
1142
|
-
function
|
|
1143
|
-
return
|
|
1144
|
-
id:
|
|
1145
|
-
class:
|
|
1146
|
-
}, [
|
|
1147
|
-
class:
|
|
1161
|
+
function y(b, l) {
|
|
1162
|
+
b.stopPropagation();
|
|
1163
|
+
const c = l.expanded;
|
|
1164
|
+
document.body.click(), l.expanded = !c;
|
|
1165
|
+
}
|
|
1166
|
+
function w(b) {
|
|
1167
|
+
return g("div", {
|
|
1168
|
+
id: b.id,
|
|
1169
|
+
class: p(b)
|
|
1170
|
+
}, [g("div", {
|
|
1171
|
+
class: u(b),
|
|
1148
1172
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1149
|
-
onClick: (l) =>
|
|
1150
|
-
}, [e.shouldShowIcon(
|
|
1151
|
-
class: e.iconClass(
|
|
1152
|
-
}, null),
|
|
1173
|
+
onClick: (l) => b.enable && y(l, b)
|
|
1174
|
+
}, [e.shouldShowIcon(b) && g("i", {
|
|
1175
|
+
class: e.iconClass(b)
|
|
1176
|
+
}, null), g("span", null, [b.text]), g("i", {
|
|
1153
1177
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1154
1178
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1155
|
-
}, null)]),
|
|
1179
|
+
}, null)]), s(b)]);
|
|
1156
1180
|
}
|
|
1157
|
-
function
|
|
1158
|
-
|
|
1181
|
+
function h() {
|
|
1182
|
+
i();
|
|
1159
1183
|
}
|
|
1160
1184
|
return {
|
|
1161
|
-
renderToolbarDropdown:
|
|
1162
|
-
clearAllDropDown:
|
|
1185
|
+
renderToolbarDropdown: w,
|
|
1186
|
+
clearAllDropDown: h
|
|
1163
1187
|
};
|
|
1164
1188
|
}
|
|
1165
1189
|
const {
|
|
1166
|
-
buildResponseToolbarItems:
|
|
1167
|
-
} = Se(), Z = /* @__PURE__ */
|
|
1190
|
+
buildResponseToolbarItems: ge
|
|
1191
|
+
} = Se(), Z = /* @__PURE__ */ U({
|
|
1168
1192
|
name: "FResponseToolbar",
|
|
1169
|
-
props:
|
|
1193
|
+
props: le,
|
|
1170
1194
|
emits: ["click"],
|
|
1171
1195
|
setup(n, e) {
|
|
1172
|
-
const t =
|
|
1196
|
+
const t = S(ge(n.items)), s = S(), i = S(), p = S(), u = S(n.alignment), y = {
|
|
1173
1197
|
id: "__more_buttons__",
|
|
1174
1198
|
text: "更多"
|
|
1175
|
-
},
|
|
1199
|
+
}, w = S(new z(y)), h = xe(), b = N(() => w.value.children.length > 0), l = N(() => Y({
|
|
1176
1200
|
"f-toolbar": !0,
|
|
1177
1201
|
"f-response-toolbar": !0,
|
|
1178
1202
|
"position-relative": !0
|
|
1179
|
-
}, n.customClass)),
|
|
1203
|
+
}, n.customClass)), c = N(() => ({
|
|
1204
|
+
"w-100": !0,
|
|
1180
1205
|
"d-flex": !0,
|
|
1181
1206
|
"flex-nowrap": !0,
|
|
1182
|
-
"justify-content-end":
|
|
1183
|
-
"justify-content-start":
|
|
1207
|
+
"justify-content-end": u.value === "right",
|
|
1208
|
+
"justify-content-start": u.value === "left"
|
|
1184
1209
|
})), {
|
|
1185
|
-
renderToolbarDropdown:
|
|
1186
|
-
clearAllDropDown:
|
|
1187
|
-
} =
|
|
1188
|
-
function
|
|
1189
|
-
t.value.filter((
|
|
1190
|
-
|
|
1191
|
-
}),
|
|
1210
|
+
renderToolbarDropdown: f,
|
|
1211
|
+
clearAllDropDown: v
|
|
1212
|
+
} = $t(n, h);
|
|
1213
|
+
function k() {
|
|
1214
|
+
t.value.filter((C) => C.children && C.children.length > 0).forEach((C) => {
|
|
1215
|
+
C.expanded = !1;
|
|
1216
|
+
}), w.value.expanded = !1, v();
|
|
1192
1217
|
}
|
|
1193
|
-
function
|
|
1194
|
-
const
|
|
1218
|
+
function A(C) {
|
|
1219
|
+
const I = {
|
|
1195
1220
|
btn: !0,
|
|
1196
1221
|
"f-rt-btn": !0,
|
|
1197
|
-
"f-btn-ml":
|
|
1198
|
-
"f-btn-mr":
|
|
1199
|
-
"btn-icontext": !!(
|
|
1222
|
+
"f-btn-ml": u.value === "right",
|
|
1223
|
+
"f-btn-mr": u.value === "left",
|
|
1224
|
+
"btn-icontext": !!(C.icon && C.icon.trim())
|
|
1200
1225
|
};
|
|
1201
|
-
if (
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1226
|
+
if (C.class) {
|
|
1227
|
+
const O = C.class.split(" ");
|
|
1228
|
+
O && O.length && O.reduce((d, r) => (d[r] = !0, d), I);
|
|
1204
1229
|
}
|
|
1205
|
-
return
|
|
1230
|
+
return I;
|
|
1206
1231
|
}
|
|
1207
|
-
function
|
|
1208
|
-
document.body.click(),
|
|
1232
|
+
function $(C, I) {
|
|
1233
|
+
document.body.click(), typeof I.onClick == "function" && I.onClick(C, I.id), e.emit("click", C, I.id);
|
|
1209
1234
|
}
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1235
|
+
function _(C) {
|
|
1236
|
+
return g("button", {
|
|
1212
1237
|
type: "button",
|
|
1213
|
-
class:
|
|
1214
|
-
id:
|
|
1215
|
-
disabled: !
|
|
1216
|
-
onClick: (
|
|
1217
|
-
}, [
|
|
1218
|
-
class:
|
|
1219
|
-
}, null),
|
|
1238
|
+
class: A(C),
|
|
1239
|
+
id: C.id,
|
|
1240
|
+
disabled: !C.enable,
|
|
1241
|
+
onClick: (I) => $(I, C)
|
|
1242
|
+
}, [h.shouldShowIcon(C) && g("i", {
|
|
1243
|
+
class: h.iconClass(C)
|
|
1244
|
+
}, null), C.text]);
|
|
1220
1245
|
}
|
|
1221
|
-
const
|
|
1222
|
-
function
|
|
1223
|
-
const
|
|
1224
|
-
let
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1246
|
+
const T = /* @__PURE__ */ new Map(), B = [];
|
|
1247
|
+
function P(C) {
|
|
1248
|
+
const I = p.value;
|
|
1249
|
+
let O = C;
|
|
1250
|
+
const d = Array.from(I.children), r = d[d.length - 1].id === "__more_buttons__" ? d[d.length - 1] : null;
|
|
1251
|
+
if (r) {
|
|
1252
|
+
const D = r.computedStyleMap().get("margin-left"), E = r.computedStyleMap().get("margin-right"), L = (D ? D.value : 0) + r.getBoundingClientRect().width + (E ? E.value : 0);
|
|
1253
|
+
O -= L;
|
|
1229
1254
|
}
|
|
1230
|
-
const o =
|
|
1231
|
-
for (const
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
id:
|
|
1235
|
-
width:
|
|
1236
|
-
})) :
|
|
1255
|
+
const o = d.filter((D) => D.id !== "__more_buttons__");
|
|
1256
|
+
for (const D of o) {
|
|
1257
|
+
const E = D.computedStyleMap().get("margin-left"), L = D.computedStyleMap().get("margin-right"), j = (E ? E.value : 0) + D.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1258
|
+
O < j ? (T.set(D.id, !0), B.push({
|
|
1259
|
+
id: D.id,
|
|
1260
|
+
width: j
|
|
1261
|
+
})) : O -= j;
|
|
1237
1262
|
}
|
|
1238
|
-
if (
|
|
1239
|
-
for (let
|
|
1240
|
-
const
|
|
1241
|
-
if (
|
|
1242
|
-
|
|
1263
|
+
if (B.length)
|
|
1264
|
+
for (let D = B.length - 1; D >= 0; D--) {
|
|
1265
|
+
const E = B[D].width;
|
|
1266
|
+
if (O >= E)
|
|
1267
|
+
O -= E, T.delete(B[D].id), B.pop();
|
|
1243
1268
|
else
|
|
1244
1269
|
break;
|
|
1245
1270
|
}
|
|
1246
|
-
const a = Object.assign({},
|
|
1271
|
+
const a = Object.assign({}, w.value);
|
|
1247
1272
|
a.children = [];
|
|
1248
|
-
const m = new
|
|
1249
|
-
|
|
1273
|
+
const m = new z(a), M = t.value.reduce((D, E) => (T.has(E.id) && m.children.push(E), E.visible = !T.has(E.id), D.push(E), D), []);
|
|
1274
|
+
w.value = m, t.value = M;
|
|
1250
1275
|
}
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1253
|
-
const
|
|
1254
|
-
(
|
|
1276
|
+
const x = new ResizeObserver((C) => {
|
|
1277
|
+
if (C.length) {
|
|
1278
|
+
const O = C[0].contentRect.width, r = p.value.getBoundingClientRect().width;
|
|
1279
|
+
(O < r || B.length) && (P(O), k());
|
|
1255
1280
|
}
|
|
1256
1281
|
});
|
|
1257
1282
|
return H(() => {
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
}),
|
|
1261
|
-
|
|
1262
|
-
}),
|
|
1263
|
-
t.value =
|
|
1283
|
+
const C = i.value;
|
|
1284
|
+
x.observe(C), document.body.addEventListener("click", k), document.body.addEventListener("wheel", k);
|
|
1285
|
+
}), ye(() => {
|
|
1286
|
+
x.disconnect(), document.body.removeEventListener("click", k), document.body.removeEventListener("wheel", k);
|
|
1287
|
+
}), q(() => n.items, () => {
|
|
1288
|
+
t.value = ge(n.items);
|
|
1264
1289
|
}, {
|
|
1265
1290
|
deep: !0
|
|
1266
1291
|
}), e.expose({
|
|
1267
|
-
elementRef:
|
|
1268
|
-
}), () =>
|
|
1292
|
+
elementRef: s
|
|
1293
|
+
}), () => g("div", {
|
|
1269
1294
|
class: l.value,
|
|
1270
|
-
ref:
|
|
1271
|
-
}, [
|
|
1272
|
-
ref:
|
|
1273
|
-
class:
|
|
1274
|
-
}, [
|
|
1275
|
-
ref:
|
|
1295
|
+
ref: s
|
|
1296
|
+
}, [g("div", {
|
|
1297
|
+
ref: i,
|
|
1298
|
+
class: c.value
|
|
1299
|
+
}, [g("div", {
|
|
1300
|
+
ref: p,
|
|
1276
1301
|
class: "d-inline-block f-response-content",
|
|
1277
1302
|
style: "white-space: nowrap;"
|
|
1278
|
-
}, [t.value.filter((
|
|
1303
|
+
}, [t.value.filter((C) => C.visible).map((C) => C.children && C.children.length > 0 ? f(C) : _(C)), b.value && f(w.value)])])]);
|
|
1279
1304
|
}
|
|
1280
1305
|
});
|
|
1281
|
-
function
|
|
1282
|
-
const t = V("design-item-context"),
|
|
1306
|
+
function _t(n, e) {
|
|
1307
|
+
const t = V("design-item-context"), s = V("toolbar-item-handler", () => {
|
|
1283
1308
|
});
|
|
1284
|
-
function
|
|
1285
|
-
|
|
1309
|
+
function i() {
|
|
1310
|
+
s && s();
|
|
1286
1311
|
}
|
|
1287
|
-
function
|
|
1312
|
+
function p(r) {
|
|
1288
1313
|
const o = {
|
|
1289
1314
|
"dropdown-menu": !0
|
|
1290
1315
|
};
|
|
1291
|
-
if (
|
|
1292
|
-
const a =
|
|
1293
|
-
a && a.length && a.reduce((m,
|
|
1316
|
+
if (r.class) {
|
|
1317
|
+
const a = r.menuClass.split(" ");
|
|
1318
|
+
a && a.length && a.reduce((m, M) => (m[M] = !0, m), o);
|
|
1294
1319
|
}
|
|
1295
1320
|
return o;
|
|
1296
1321
|
}
|
|
1297
|
-
function
|
|
1322
|
+
function u(r) {
|
|
1298
1323
|
const o = {
|
|
1299
|
-
disabled: !
|
|
1324
|
+
disabled: !r.enable,
|
|
1300
1325
|
"dropdown-submenu": !0,
|
|
1301
1326
|
"f-rt-dropdown": !0
|
|
1302
|
-
}, a =
|
|
1303
|
-
return a && a.length && a.reduce((m,
|
|
1327
|
+
}, a = r.dropdownClass.split(" ");
|
|
1328
|
+
return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
|
|
1304
1329
|
}
|
|
1305
|
-
function
|
|
1330
|
+
function y(r) {
|
|
1306
1331
|
const o = {
|
|
1307
|
-
disabled: !
|
|
1332
|
+
disabled: !r.enable,
|
|
1308
1333
|
"dropdown-item": !0,
|
|
1309
1334
|
"f-rt-btn": !0,
|
|
1310
1335
|
"position-relative": !0,
|
|
1311
1336
|
"farris-component": !0
|
|
1312
|
-
}, a =
|
|
1313
|
-
return a && a.length && a.reduce((m,
|
|
1314
|
-
}
|
|
1315
|
-
let
|
|
1316
|
-
const
|
|
1317
|
-
function
|
|
1318
|
-
var
|
|
1319
|
-
((
|
|
1337
|
+
}, a = r.class.split(" ");
|
|
1338
|
+
return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
|
|
1339
|
+
}
|
|
1340
|
+
let w;
|
|
1341
|
+
const h = /* @__PURE__ */ new Map();
|
|
1342
|
+
function b(r, o, a) {
|
|
1343
|
+
var M;
|
|
1344
|
+
((M = r.target) == null ? void 0 : M.id) === o.id && r.stopPropagation();
|
|
1320
1345
|
const m = a ? a.id : "__top_item__";
|
|
1321
|
-
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ?
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1346
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? h.set(m, o) : h.delete(m)), h.has(m) && h.get(m) !== o) {
|
|
1347
|
+
const D = h.get(m);
|
|
1348
|
+
D && (D.expanded = !1);
|
|
1324
1349
|
}
|
|
1325
1350
|
}
|
|
1326
|
-
function l(
|
|
1327
|
-
|
|
1351
|
+
function l(r) {
|
|
1352
|
+
r && (r.stopPropagation(), r.preventDefault());
|
|
1328
1353
|
}
|
|
1329
|
-
function
|
|
1354
|
+
function c() {
|
|
1330
1355
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1331
|
-
const
|
|
1332
|
-
Array.from(
|
|
1356
|
+
const r = document.getElementsByClassName("dgComponentSelected");
|
|
1357
|
+
Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1333
1358
|
}
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1359
|
+
function f(r) {
|
|
1360
|
+
r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1336
1361
|
}
|
|
1337
|
-
function
|
|
1362
|
+
function v(r) {
|
|
1338
1363
|
const {
|
|
1339
1364
|
buttons: o = []
|
|
1340
1365
|
} = t.schema;
|
|
1341
1366
|
let a = [];
|
|
1342
|
-
o.forEach((
|
|
1343
|
-
a = a.concat(
|
|
1367
|
+
o.forEach((D) => {
|
|
1368
|
+
a = a.concat(D.children || []);
|
|
1344
1369
|
});
|
|
1345
|
-
const m = a.findIndex((
|
|
1370
|
+
const m = a.findIndex((D) => D.id === r), M = m === -1 ? null : a[m];
|
|
1346
1371
|
return {
|
|
1347
1372
|
index: m,
|
|
1348
|
-
item:
|
|
1373
|
+
item: M
|
|
1349
1374
|
};
|
|
1350
1375
|
}
|
|
1351
|
-
function
|
|
1376
|
+
function k(r) {
|
|
1352
1377
|
const {
|
|
1353
1378
|
buttons: o = []
|
|
1354
|
-
} = t.schema, a = o.findIndex((
|
|
1379
|
+
} = t.schema, a = o.findIndex((M) => M.id === r), m = a === -1 ? null : o[a];
|
|
1355
1380
|
return {
|
|
1356
1381
|
index: a,
|
|
1357
1382
|
item: m
|
|
1358
1383
|
};
|
|
1359
1384
|
}
|
|
1360
|
-
function
|
|
1385
|
+
function A(r) {
|
|
1361
1386
|
var m;
|
|
1362
1387
|
t.schema;
|
|
1363
1388
|
const {
|
|
1364
1389
|
index: o,
|
|
1365
1390
|
item: a
|
|
1366
|
-
} =
|
|
1391
|
+
} = v(r);
|
|
1367
1392
|
(m = t == null ? void 0 : t.setupContext) == null || m.emit("selectionChange", a == null ? void 0 : a.type, a);
|
|
1368
1393
|
}
|
|
1369
|
-
const
|
|
1394
|
+
const $ = function(r) {
|
|
1370
1395
|
const {
|
|
1371
1396
|
componentType: o
|
|
1372
|
-
} =
|
|
1397
|
+
} = r, a = Q(o, r), m = o.toLowerCase().replace("-", "_");
|
|
1373
1398
|
return a && !a.id && a.type === o && (a.id = `${m}_${Math.random().toString().slice(2, 6)}`), a;
|
|
1374
|
-
},
|
|
1375
|
-
const
|
|
1399
|
+
}, _ = function() {
|
|
1400
|
+
const r = {
|
|
1376
1401
|
componentType: "response-toolbar-item",
|
|
1377
1402
|
parentComponentInstance: e.value,
|
|
1378
1403
|
targetPosition: -1
|
|
1379
1404
|
};
|
|
1380
|
-
return
|
|
1405
|
+
return $(r);
|
|
1381
1406
|
};
|
|
1382
|
-
function
|
|
1383
|
-
l(
|
|
1407
|
+
function T(r, o) {
|
|
1408
|
+
l(r), c(), f(r), A(o.id);
|
|
1384
1409
|
}
|
|
1385
|
-
function
|
|
1386
|
-
l(
|
|
1387
|
-
const m = o.id,
|
|
1388
|
-
buttons:
|
|
1410
|
+
function B(r, o, a) {
|
|
1411
|
+
l(r);
|
|
1412
|
+
const m = o.id, M = a && a.id, {
|
|
1413
|
+
buttons: D = []
|
|
1389
1414
|
} = t.schema;
|
|
1390
|
-
if (!
|
|
1415
|
+
if (!M)
|
|
1391
1416
|
return;
|
|
1392
1417
|
const {
|
|
1393
|
-
index:
|
|
1394
|
-
} =
|
|
1395
|
-
if (
|
|
1418
|
+
index: E
|
|
1419
|
+
} = k(M);
|
|
1420
|
+
if (E === -1)
|
|
1396
1421
|
return;
|
|
1397
1422
|
const {
|
|
1398
1423
|
index: L
|
|
1399
|
-
} =
|
|
1400
|
-
L !== -1 && (E
|
|
1424
|
+
} = v(m);
|
|
1425
|
+
L !== -1 && (D[E].children.splice(L, 1), i());
|
|
1401
1426
|
}
|
|
1402
|
-
function
|
|
1403
|
-
l(
|
|
1427
|
+
function P(r, o, a) {
|
|
1428
|
+
l(r);
|
|
1404
1429
|
const m = a && a.id, {
|
|
1405
|
-
buttons:
|
|
1430
|
+
buttons: M = []
|
|
1406
1431
|
} = t.schema;
|
|
1407
1432
|
if (!m)
|
|
1408
1433
|
return;
|
|
1409
1434
|
const {
|
|
1410
|
-
index:
|
|
1411
|
-
} =
|
|
1412
|
-
if (
|
|
1435
|
+
index: D
|
|
1436
|
+
} = k(m);
|
|
1437
|
+
if (D === -1)
|
|
1413
1438
|
return;
|
|
1414
|
-
const
|
|
1439
|
+
const E = _(), L = Object.assign({}, E, {
|
|
1415
1440
|
text: o.text
|
|
1416
1441
|
});
|
|
1417
|
-
|
|
1442
|
+
M[D].children.push(L), i();
|
|
1418
1443
|
}
|
|
1419
|
-
function
|
|
1420
|
-
l(
|
|
1444
|
+
function x(r, o, a) {
|
|
1445
|
+
l(r);
|
|
1421
1446
|
const m = a && a.id, {
|
|
1422
|
-
buttons:
|
|
1447
|
+
buttons: M = []
|
|
1423
1448
|
} = t.schema;
|
|
1424
1449
|
if (!m)
|
|
1425
1450
|
return;
|
|
1426
1451
|
const {
|
|
1427
|
-
index:
|
|
1428
|
-
} =
|
|
1429
|
-
if (
|
|
1452
|
+
index: D
|
|
1453
|
+
} = k(m);
|
|
1454
|
+
if (D === -1)
|
|
1430
1455
|
return;
|
|
1431
|
-
const
|
|
1456
|
+
const E = _(), L = Object.assign({}, E, {
|
|
1432
1457
|
text: "按钮"
|
|
1433
1458
|
});
|
|
1434
|
-
|
|
1459
|
+
M[D].children.push(L), i();
|
|
1435
1460
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1461
|
+
function C(r, o) {
|
|
1462
|
+
return g("div", {
|
|
1438
1463
|
class: "component-btn-group"
|
|
1439
|
-
}, [
|
|
1464
|
+
}, [g("div", null, [g("div", {
|
|
1440
1465
|
role: "button",
|
|
1441
1466
|
class: "btn component-settings-button",
|
|
1442
1467
|
title: "删除",
|
|
1443
1468
|
ref: "removeButton",
|
|
1444
1469
|
style: "position:static;",
|
|
1445
|
-
onClick: (a) =>
|
|
1446
|
-
}, [
|
|
1470
|
+
onClick: (a) => B(a, r, o)
|
|
1471
|
+
}, [g("i", {
|
|
1447
1472
|
class: "f-icon f-icon-yxs_delete"
|
|
1448
|
-
}, null)]),
|
|
1473
|
+
}, null)]), g("div", {
|
|
1449
1474
|
role: "button",
|
|
1450
1475
|
class: "btn component-settings-button",
|
|
1451
1476
|
title: "复制",
|
|
1452
1477
|
ref: "copyButton",
|
|
1453
1478
|
style: "position:static;",
|
|
1454
|
-
onClick: (a) =>
|
|
1455
|
-
}, [
|
|
1479
|
+
onClick: (a) => P(a, r, o)
|
|
1480
|
+
}, [g("i", {
|
|
1456
1481
|
class: "f-icon f-icon-yxs_copy"
|
|
1457
|
-
}, null)]),
|
|
1482
|
+
}, null)]), g("div", {
|
|
1458
1483
|
role: "button",
|
|
1459
1484
|
class: "btn component-settings-button",
|
|
1460
1485
|
title: "新增同级",
|
|
1461
1486
|
ref: "appendSame",
|
|
1462
1487
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1463
|
-
onClick: (a) =>
|
|
1464
|
-
}, [
|
|
1488
|
+
onClick: (a) => x(a, r, o)
|
|
1489
|
+
}, [g("i", {
|
|
1465
1490
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1466
|
-
}, null),
|
|
1491
|
+
}, null), g("span", {
|
|
1467
1492
|
style: "font-size:13px;margin:auto"
|
|
1468
|
-
}, [
|
|
1493
|
+
}, [J("新增同级")])])])]);
|
|
1469
1494
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return
|
|
1472
|
-
class:
|
|
1495
|
+
function I(r) {
|
|
1496
|
+
return r.children.map((o) => o.children && o.children.length ? g("li", {
|
|
1497
|
+
class: u(o),
|
|
1473
1498
|
id: o.id,
|
|
1474
|
-
onClick: (a) => o.enable &&
|
|
1475
|
-
}, [
|
|
1499
|
+
onClick: (a) => o.enable && b(a, o, r)
|
|
1500
|
+
}, [g("span", {
|
|
1476
1501
|
id: o.id,
|
|
1477
|
-
class:
|
|
1478
|
-
onMouseover: (a) => o.enable &&
|
|
1479
|
-
}, [o.text,
|
|
1502
|
+
class: y(o),
|
|
1503
|
+
onMouseover: (a) => o.enable && b(a, o, r)
|
|
1504
|
+
}, [o.text, g("i", {
|
|
1480
1505
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1481
1506
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1482
|
-
}, null)]),
|
|
1483
|
-
class:
|
|
1507
|
+
}, null)]), w(o, o)]) : g("li", {
|
|
1508
|
+
class: y(o),
|
|
1484
1509
|
id: o.id,
|
|
1485
|
-
onClick: (a) =>
|
|
1486
|
-
}, [
|
|
1510
|
+
onClick: (a) => T(a, o)
|
|
1511
|
+
}, [C(o, r), n.shouldShowIcon(o) && g("i", {
|
|
1487
1512
|
class: n.iconClass(o)
|
|
1488
1513
|
}, null), o.text]));
|
|
1489
1514
|
}
|
|
1490
|
-
function
|
|
1515
|
+
function O(r, o, a) {
|
|
1491
1516
|
const m = {
|
|
1492
|
-
display:
|
|
1517
|
+
display: r.expanded ? "block" : "none",
|
|
1493
1518
|
position: "fixed",
|
|
1494
1519
|
maxWidth: "300px",
|
|
1495
1520
|
width: "auto",
|
|
1496
1521
|
minWidth: "120px"
|
|
1497
|
-
},
|
|
1498
|
-
if (
|
|
1522
|
+
}, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, D = o, E = D == null ? void 0 : D.getClientRects();
|
|
1523
|
+
if (D && E && E.length) {
|
|
1499
1524
|
const {
|
|
1500
1525
|
top: L,
|
|
1501
|
-
width:
|
|
1502
|
-
left:
|
|
1526
|
+
width: j,
|
|
1527
|
+
left: F,
|
|
1503
1528
|
right: W,
|
|
1504
|
-
height:
|
|
1505
|
-
} =
|
|
1506
|
-
m.top = `${
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1509
|
-
m.display === "block" && (
|
|
1510
|
-
const
|
|
1529
|
+
height: G
|
|
1530
|
+
} = E[0], Re = Math.ceil(G + L);
|
|
1531
|
+
m.top = `${Re}px`, m.left = `${F}px`;
|
|
1532
|
+
const Ae = r.id + "_menu", te = o ? o.querySelector("#" + Ae) : null;
|
|
1533
|
+
if (te) {
|
|
1534
|
+
m.display === "block" && (te.style.display = "block");
|
|
1535
|
+
const de = te.getBoundingClientRect();
|
|
1511
1536
|
if (a) {
|
|
1512
1537
|
m.top = `${L - 6}px`;
|
|
1513
|
-
const
|
|
1514
|
-
m.left = `${
|
|
1538
|
+
const Oe = Math.ceil(j + F);
|
|
1539
|
+
m.left = `${Oe}px`;
|
|
1515
1540
|
}
|
|
1516
|
-
|
|
1541
|
+
M - F - j < de.width && (m.left = `${(a ? F : W) - de.width}px`);
|
|
1517
1542
|
}
|
|
1518
1543
|
}
|
|
1519
1544
|
return m;
|
|
1520
1545
|
}
|
|
1521
|
-
|
|
1522
|
-
var
|
|
1523
|
-
const a =
|
|
1524
|
-
return
|
|
1525
|
-
class:
|
|
1526
|
-
style:
|
|
1527
|
-
id:
|
|
1528
|
-
}, [
|
|
1546
|
+
w = function(r, o) {
|
|
1547
|
+
var D, E;
|
|
1548
|
+
const a = be(), m = o ? o.id : r.id, M = (E = (D = a == null ? void 0 : a.exposed) == null ? void 0 : D.elementRef.value) == null ? void 0 : E.querySelector("#" + m);
|
|
1549
|
+
return g("ul", {
|
|
1550
|
+
class: p(r),
|
|
1551
|
+
style: O(r, M, o),
|
|
1552
|
+
id: r.id + "_menu"
|
|
1553
|
+
}, [I(r)]);
|
|
1529
1554
|
};
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
}),
|
|
1555
|
+
function d() {
|
|
1556
|
+
h.forEach((r) => {
|
|
1557
|
+
r.expanded = !1;
|
|
1558
|
+
}), h.clear();
|
|
1534
1559
|
}
|
|
1535
1560
|
return {
|
|
1536
|
-
renderDropdownMenu:
|
|
1537
|
-
clearAllDropDownMenu:
|
|
1561
|
+
renderDropdownMenu: w,
|
|
1562
|
+
clearAllDropDownMenu: d
|
|
1538
1563
|
};
|
|
1539
1564
|
}
|
|
1540
1565
|
function Nt(n, e, t) {
|
|
1541
|
-
const
|
|
1542
|
-
renderDropdownMenu:
|
|
1543
|
-
clearAllDropDownMenu:
|
|
1544
|
-
} =
|
|
1566
|
+
const s = S(n.alignment), {
|
|
1567
|
+
renderDropdownMenu: i,
|
|
1568
|
+
clearAllDropDownMenu: p
|
|
1569
|
+
} = _t(e, t), u = V("design-item-context"), y = V("toolbar-item-handler", () => {
|
|
1545
1570
|
});
|
|
1546
|
-
function
|
|
1547
|
-
|
|
1571
|
+
function w() {
|
|
1572
|
+
y && y();
|
|
1548
1573
|
}
|
|
1549
|
-
function
|
|
1550
|
-
const
|
|
1574
|
+
function h(d) {
|
|
1575
|
+
const r = {
|
|
1551
1576
|
"btn-group": !0,
|
|
1552
1577
|
"f-rt-dropdown": !0,
|
|
1553
|
-
"f-btn-ml":
|
|
1554
|
-
"f-btn-mr":
|
|
1555
|
-
}, o =
|
|
1556
|
-
return o && o.length && o.reduce((a, m) => (a[m] = !0, a),
|
|
1578
|
+
"f-btn-ml": s.value === "right",
|
|
1579
|
+
"f-btn-mr": s.value === "left"
|
|
1580
|
+
}, o = d.dropdownClass.split(" ");
|
|
1581
|
+
return o && o.length && o.reduce((a, m) => (a[m] = !0, a), r), r;
|
|
1557
1582
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const
|
|
1583
|
+
function b(d) {
|
|
1584
|
+
const r = {
|
|
1560
1585
|
btn: !0,
|
|
1561
|
-
disabled: !
|
|
1586
|
+
disabled: !d.enable,
|
|
1562
1587
|
"position-relative": !0,
|
|
1563
1588
|
"farris-component": !0,
|
|
1564
1589
|
"f-rt-btn": !0,
|
|
1565
|
-
"btn-icontext": !!(
|
|
1590
|
+
"btn-icontext": !!(d.icon && d.icon.trim())
|
|
1566
1591
|
};
|
|
1567
|
-
if (
|
|
1568
|
-
const o =
|
|
1569
|
-
o && o.length && o.reduce((a, m) => (a[m] = !0, a),
|
|
1592
|
+
if (d.class) {
|
|
1593
|
+
const o = d.class.split(" ");
|
|
1594
|
+
o && o.length && o.reduce((a, m) => (a[m] = !0, a), r);
|
|
1570
1595
|
}
|
|
1571
|
-
return
|
|
1596
|
+
return r;
|
|
1572
1597
|
}
|
|
1573
|
-
function l(
|
|
1574
|
-
|
|
1598
|
+
function l(d) {
|
|
1599
|
+
d && (d.stopPropagation(), d.preventDefault());
|
|
1575
1600
|
}
|
|
1576
|
-
function
|
|
1577
|
-
l(
|
|
1578
|
-
const o =
|
|
1579
|
-
document.body.click(),
|
|
1601
|
+
function c(d, r) {
|
|
1602
|
+
l(d);
|
|
1603
|
+
const o = r.expanded;
|
|
1604
|
+
document.body.click(), r.expanded = !o;
|
|
1580
1605
|
}
|
|
1581
|
-
const
|
|
1606
|
+
const f = function(d) {
|
|
1582
1607
|
const {
|
|
1583
|
-
componentType:
|
|
1584
|
-
} =
|
|
1585
|
-
return o && !o.id && o.type ===
|
|
1586
|
-
},
|
|
1587
|
-
const
|
|
1608
|
+
componentType: r
|
|
1609
|
+
} = d, o = Q(r, d), a = r.toLowerCase().replace("-", "_");
|
|
1610
|
+
return o && !o.id && o.type === r && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1611
|
+
}, v = function() {
|
|
1612
|
+
const d = {
|
|
1588
1613
|
componentType: "response-toolbar-item",
|
|
1589
1614
|
parentComponentInstance: t.value,
|
|
1590
1615
|
targetPosition: -1
|
|
1591
1616
|
};
|
|
1592
|
-
return d
|
|
1617
|
+
return f(d);
|
|
1593
1618
|
};
|
|
1594
|
-
function
|
|
1595
|
-
const
|
|
1619
|
+
function k(d) {
|
|
1620
|
+
const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((m) => m.id === d), a = o === -1 ? null : r[o];
|
|
1596
1621
|
return {
|
|
1597
1622
|
index: o,
|
|
1598
1623
|
toolbarItem: a
|
|
1599
1624
|
};
|
|
1600
1625
|
}
|
|
1601
|
-
function
|
|
1602
|
-
var
|
|
1626
|
+
function A(d, r) {
|
|
1627
|
+
var E;
|
|
1603
1628
|
const {
|
|
1604
1629
|
index: o,
|
|
1605
1630
|
toolbarItem: a
|
|
1606
|
-
} =
|
|
1631
|
+
} = k(r);
|
|
1607
1632
|
if (o === -1)
|
|
1608
1633
|
return;
|
|
1609
|
-
const m = a.text || "按钮",
|
|
1634
|
+
const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
|
|
1610
1635
|
text: m
|
|
1611
1636
|
});
|
|
1612
|
-
(
|
|
1637
|
+
(E = u.schema.buttons) == null || E.push(D), w();
|
|
1613
1638
|
}
|
|
1614
|
-
function
|
|
1639
|
+
function $(d, r) {
|
|
1615
1640
|
const {
|
|
1616
1641
|
index: o,
|
|
1617
1642
|
toolbarItem: a
|
|
1618
|
-
} =
|
|
1643
|
+
} = k(r);
|
|
1619
1644
|
if (o === -1)
|
|
1620
1645
|
return;
|
|
1621
|
-
const m = a.text || "按钮",
|
|
1646
|
+
const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
|
|
1622
1647
|
text: m
|
|
1623
|
-
}),
|
|
1624
|
-
|
|
1648
|
+
}), E = u.schema.buttons[o].children || [];
|
|
1649
|
+
E.push(D), u.schema.buttons[o].children = E, w();
|
|
1625
1650
|
}
|
|
1626
|
-
function
|
|
1627
|
-
const o =
|
|
1628
|
-
a !== -1 && (o.splice(a, 1),
|
|
1651
|
+
function _(d, r) {
|
|
1652
|
+
const o = u.schema.buttons || u.schema.contents, a = o == null ? void 0 : o.findIndex((m) => m.id === r);
|
|
1653
|
+
a !== -1 && (o.splice(a, 1), w());
|
|
1629
1654
|
}
|
|
1630
|
-
function
|
|
1631
|
-
return
|
|
1655
|
+
function T(d) {
|
|
1656
|
+
return g("div", {
|
|
1632
1657
|
class: "component-btn-group"
|
|
1633
|
-
}, [
|
|
1658
|
+
}, [g("div", null, [g("div", {
|
|
1634
1659
|
role: "button",
|
|
1635
1660
|
class: "btn component-settings-button",
|
|
1636
1661
|
title: "删除",
|
|
1637
1662
|
ref: "removeButton",
|
|
1638
1663
|
style: "position:static;",
|
|
1639
|
-
onClick: (
|
|
1640
|
-
}, [
|
|
1664
|
+
onClick: (r) => _(r, d)
|
|
1665
|
+
}, [g("i", {
|
|
1641
1666
|
class: "f-icon f-icon-yxs_delete"
|
|
1642
|
-
}, null)]),
|
|
1667
|
+
}, null)]), g("div", {
|
|
1643
1668
|
role: "button",
|
|
1644
1669
|
class: "btn component-settings-button",
|
|
1645
1670
|
title: "复制",
|
|
1646
1671
|
ref: "copyButton",
|
|
1647
1672
|
style: "position:static;",
|
|
1648
|
-
onClick: (
|
|
1649
|
-
}, [
|
|
1673
|
+
onClick: (r) => A(r, d)
|
|
1674
|
+
}, [g("i", {
|
|
1650
1675
|
class: "f-icon f-icon-yxs_copy"
|
|
1651
|
-
}, null)]),
|
|
1676
|
+
}, null)]), g("div", {
|
|
1652
1677
|
role: "button",
|
|
1653
1678
|
class: "btn component-settings-button",
|
|
1654
1679
|
title: "新增子级",
|
|
1655
1680
|
ref: "appendChildButton",
|
|
1656
1681
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1657
|
-
onClick: (
|
|
1658
|
-
}, [
|
|
1682
|
+
onClick: (r) => $(r, d)
|
|
1683
|
+
}, [g("i", {
|
|
1659
1684
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1660
|
-
}, null),
|
|
1685
|
+
}, null), g("span", {
|
|
1661
1686
|
style: "font-size:13px;margin:auto"
|
|
1662
|
-
}, [
|
|
1687
|
+
}, [J("新增子级")])])])]);
|
|
1663
1688
|
}
|
|
1664
|
-
function
|
|
1665
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1666
|
-
const
|
|
1667
|
-
Array.from(
|
|
1689
|
+
function B() {
|
|
1690
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
|
|
1691
|
+
const d = document.getElementsByClassName("dgComponentSelected");
|
|
1692
|
+
Array.from(d).forEach((r) => r.classList.remove("dgComponentSelected"));
|
|
1668
1693
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1694
|
+
function P(d) {
|
|
1695
|
+
d.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1671
1696
|
}
|
|
1672
|
-
function
|
|
1697
|
+
function x(d) {
|
|
1673
1698
|
var m;
|
|
1674
|
-
const
|
|
1699
|
+
const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((M) => M.id === d);
|
|
1675
1700
|
if (o === -1)
|
|
1676
1701
|
return;
|
|
1677
|
-
const a =
|
|
1678
|
-
(m =
|
|
1679
|
-
}
|
|
1680
|
-
function
|
|
1681
|
-
l(
|
|
1682
|
-
}
|
|
1683
|
-
function
|
|
1684
|
-
return
|
|
1685
|
-
id:
|
|
1686
|
-
class:
|
|
1687
|
-
}, [
|
|
1688
|
-
class:
|
|
1702
|
+
const a = r[o];
|
|
1703
|
+
(m = u == null ? void 0 : u.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", a);
|
|
1704
|
+
}
|
|
1705
|
+
function C(d, r) {
|
|
1706
|
+
l(d), B(), P(d), l(d), c(d, r), x(r.id);
|
|
1707
|
+
}
|
|
1708
|
+
function I(d) {
|
|
1709
|
+
return g("div", {
|
|
1710
|
+
id: d.id,
|
|
1711
|
+
class: h(d)
|
|
1712
|
+
}, [g("div", {
|
|
1713
|
+
class: b(d),
|
|
1689
1714
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1690
|
-
onClick: (
|
|
1691
|
-
}, [
|
|
1692
|
-
class: e.iconClass(
|
|
1693
|
-
}, null),
|
|
1715
|
+
onClick: (r) => d.enable && C(r, d)
|
|
1716
|
+
}, [T(d.id), e.shouldShowIcon(d) && g("i", {
|
|
1717
|
+
class: e.iconClass(d)
|
|
1718
|
+
}, null), g("span", null, [d.text]), g("i", {
|
|
1694
1719
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1695
1720
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1696
|
-
}, null)]),
|
|
1697
|
-
}
|
|
1698
|
-
function k() {
|
|
1699
|
-
h();
|
|
1721
|
+
}, null)]), i(d)]);
|
|
1700
1722
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
clearAllDropDown: k
|
|
1704
|
-
};
|
|
1705
|
-
}
|
|
1706
|
-
function _t() {
|
|
1707
|
-
function n(e) {
|
|
1708
|
-
var u, h;
|
|
1709
|
-
if (!e)
|
|
1710
|
-
return !1;
|
|
1711
|
-
const t = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1712
|
-
if (!t)
|
|
1713
|
-
return !1;
|
|
1714
|
-
const r = (h = t.schema.appearance) == null ? void 0 : h.class;
|
|
1715
|
-
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1716
|
-
const g = t.schema.type, D = (g === "response-form" || g === "content-container") && r && r.includes("farris-form");
|
|
1717
|
-
if (t.schema.type !== "response-layout-item" && !D)
|
|
1718
|
-
return !1;
|
|
1719
|
-
}
|
|
1720
|
-
return e.controlType !== "field-set";
|
|
1723
|
+
function O() {
|
|
1724
|
+
p();
|
|
1721
1725
|
}
|
|
1722
1726
|
return {
|
|
1723
|
-
|
|
1727
|
+
renderToolbarDropdown: I,
|
|
1728
|
+
clearAllDropDown: O
|
|
1724
1729
|
};
|
|
1725
1730
|
}
|
|
1726
|
-
|
|
1727
|
-
"f-page": {
|
|
1728
|
-
description: "The root class of page designed by farris.",
|
|
1729
|
-
type: "object",
|
|
1730
|
-
properties: {
|
|
1731
|
-
contents: {
|
|
1732
|
-
type: "object",
|
|
1733
|
-
properties: {
|
|
1734
|
-
"f-page-header": {
|
|
1735
|
-
description: "The class of page header designed by farris.",
|
|
1736
|
-
type: "string"
|
|
1737
|
-
},
|
|
1738
|
-
"f-page-main": {
|
|
1739
|
-
description: "The class of page body designed by farris.",
|
|
1740
|
-
type: "object",
|
|
1741
|
-
properties: {
|
|
1742
|
-
contents: {
|
|
1743
|
-
type: "object",
|
|
1744
|
-
properties: {
|
|
1745
|
-
"f-struct-like-card": {
|
|
1746
|
-
description: "",
|
|
1747
|
-
type: "object",
|
|
1748
|
-
properties: {
|
|
1749
|
-
contents: {
|
|
1750
|
-
type: "object",
|
|
1751
|
-
properties: {
|
|
1752
|
-
"f-struct-form": {
|
|
1753
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
1754
|
-
type: "object",
|
|
1755
|
-
properties: {
|
|
1756
|
-
contents: {
|
|
1757
|
-
type: "object",
|
|
1758
|
-
properties: {
|
|
1759
|
-
"f-section-form": {
|
|
1760
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1761
|
-
type: "object",
|
|
1762
|
-
properties: {
|
|
1763
|
-
contents: {
|
|
1764
|
-
type: "object",
|
|
1765
|
-
properties: {
|
|
1766
|
-
"f-form-layout": {
|
|
1767
|
-
description: "The class of reponse form",
|
|
1768
|
-
type: "object",
|
|
1769
|
-
properties: {
|
|
1770
|
-
rules: {
|
|
1771
|
-
type: "object",
|
|
1772
|
-
properties: {
|
|
1773
|
-
canAccept: {
|
|
1774
|
-
type: "boolean",
|
|
1775
|
-
const: !0
|
|
1776
|
-
},
|
|
1777
|
-
fixed: {
|
|
1778
|
-
type: "boolean",
|
|
1779
|
-
const: !0
|
|
1780
|
-
},
|
|
1781
|
-
hidePadding: {
|
|
1782
|
-
type: "boolean",
|
|
1783
|
-
const: !1
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
},
|
|
1791
|
-
rules: {
|
|
1792
|
-
type: "object",
|
|
1793
|
-
properties: {
|
|
1794
|
-
canAccept: {
|
|
1795
|
-
type: "boolean",
|
|
1796
|
-
const: !1
|
|
1797
|
-
},
|
|
1798
|
-
fixed: {
|
|
1799
|
-
type: "boolean",
|
|
1800
|
-
const: !0
|
|
1801
|
-
},
|
|
1802
|
-
hidePadding: {
|
|
1803
|
-
type: "boolean",
|
|
1804
|
-
const: !0
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
},
|
|
1812
|
-
rules: {
|
|
1813
|
-
type: "object",
|
|
1814
|
-
properties: {
|
|
1815
|
-
canAccept: {
|
|
1816
|
-
type: "boolean",
|
|
1817
|
-
const: !1
|
|
1818
|
-
},
|
|
1819
|
-
fixed: {
|
|
1820
|
-
type: "boolean",
|
|
1821
|
-
const: !1
|
|
1822
|
-
},
|
|
1823
|
-
hidePadding: {
|
|
1824
|
-
type: "boolean",
|
|
1825
|
-
const: !0
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
},
|
|
1831
|
-
"f-struct-wrapper": {
|
|
1832
|
-
description: "",
|
|
1833
|
-
type: "object",
|
|
1834
|
-
properties: {
|
|
1835
|
-
contents: {
|
|
1836
|
-
type: "object",
|
|
1837
|
-
properties: {
|
|
1838
|
-
"f-section-tabs": {
|
|
1839
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
1840
|
-
type: "object",
|
|
1841
|
-
properties: {
|
|
1842
|
-
contents: {
|
|
1843
|
-
type: "object",
|
|
1844
|
-
properties: {
|
|
1845
|
-
"f-tabs-in-card": {
|
|
1846
|
-
description: "The class of tabs which contains sub-grid.",
|
|
1847
|
-
type: "object",
|
|
1848
|
-
properties: {
|
|
1849
|
-
contents: {
|
|
1850
|
-
type: "object",
|
|
1851
|
-
properties: {
|
|
1852
|
-
"f-struct-data-grid-in-card": {
|
|
1853
|
-
description: "The class of sub-grid component",
|
|
1854
|
-
type: "object",
|
|
1855
|
-
properties: {
|
|
1856
|
-
contents: {
|
|
1857
|
-
type: "object",
|
|
1858
|
-
properties: {
|
|
1859
|
-
"f-grid-is-sub": {
|
|
1860
|
-
description: "The class of sub-grid",
|
|
1861
|
-
type: "object",
|
|
1862
|
-
properties: {
|
|
1863
|
-
rules: {
|
|
1864
|
-
type: "object",
|
|
1865
|
-
properties: {
|
|
1866
|
-
canAccept: {
|
|
1867
|
-
type: "boolean",
|
|
1868
|
-
const: !0
|
|
1869
|
-
},
|
|
1870
|
-
fixed: {
|
|
1871
|
-
type: "boolean",
|
|
1872
|
-
const: !0
|
|
1873
|
-
},
|
|
1874
|
-
hidePadding: {
|
|
1875
|
-
type: "boolean",
|
|
1876
|
-
const: !1
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
},
|
|
1884
|
-
rules: {
|
|
1885
|
-
type: "object",
|
|
1886
|
-
properties: {
|
|
1887
|
-
canAccept: {
|
|
1888
|
-
type: "boolean",
|
|
1889
|
-
const: !1
|
|
1890
|
-
},
|
|
1891
|
-
fixed: {
|
|
1892
|
-
type: "boolean",
|
|
1893
|
-
const: !1
|
|
1894
|
-
},
|
|
1895
|
-
hidePadding: {
|
|
1896
|
-
type: "boolean",
|
|
1897
|
-
const: !0
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
},
|
|
1905
|
-
rules: {
|
|
1906
|
-
type: "object",
|
|
1907
|
-
properties: {
|
|
1908
|
-
canAccept: {
|
|
1909
|
-
type: "boolean",
|
|
1910
|
-
const: !1
|
|
1911
|
-
},
|
|
1912
|
-
fixed: {
|
|
1913
|
-
type: "boolean",
|
|
1914
|
-
const: !0
|
|
1915
|
-
},
|
|
1916
|
-
hidePadding: {
|
|
1917
|
-
type: "boolean",
|
|
1918
|
-
const: !0
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
},
|
|
1926
|
-
rules: {
|
|
1927
|
-
type: "object",
|
|
1928
|
-
properties: {
|
|
1929
|
-
canAccept: {
|
|
1930
|
-
type: "boolean",
|
|
1931
|
-
const: !1
|
|
1932
|
-
},
|
|
1933
|
-
fixed: {
|
|
1934
|
-
type: "boolean",
|
|
1935
|
-
const: !0
|
|
1936
|
-
},
|
|
1937
|
-
hidePadding: {
|
|
1938
|
-
type: "boolean",
|
|
1939
|
-
const: !0
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
},
|
|
1945
|
-
"f-section-in-main": {
|
|
1946
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1947
|
-
type: "object",
|
|
1948
|
-
properties: {
|
|
1949
|
-
rules: {
|
|
1950
|
-
type: "object",
|
|
1951
|
-
properties: {
|
|
1952
|
-
canAccept: {
|
|
1953
|
-
type: "boolean",
|
|
1954
|
-
const: !0
|
|
1955
|
-
},
|
|
1956
|
-
fixed: {
|
|
1957
|
-
type: "boolean",
|
|
1958
|
-
const: !0
|
|
1959
|
-
},
|
|
1960
|
-
hidePadding: {
|
|
1961
|
-
type: "boolean",
|
|
1962
|
-
const: !1
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
rules: {
|
|
1971
|
-
type: "object",
|
|
1972
|
-
properties: {
|
|
1973
|
-
canAccept: {
|
|
1974
|
-
type: "boolean",
|
|
1975
|
-
const: !1
|
|
1976
|
-
},
|
|
1977
|
-
fixed: {
|
|
1978
|
-
type: "boolean",
|
|
1979
|
-
const: !1
|
|
1980
|
-
},
|
|
1981
|
-
hidePadding: {
|
|
1982
|
-
type: "boolean",
|
|
1983
|
-
const: !0
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
},
|
|
1991
|
-
rules: {
|
|
1992
|
-
type: "object",
|
|
1993
|
-
properties: {
|
|
1994
|
-
canAccept: {
|
|
1995
|
-
type: "boolean",
|
|
1996
|
-
const: !0
|
|
1997
|
-
},
|
|
1998
|
-
fixed: {
|
|
1999
|
-
type: "boolean",
|
|
2000
|
-
const: !0
|
|
2001
|
-
},
|
|
2002
|
-
hidePadding: {
|
|
2003
|
-
type: "object",
|
|
2004
|
-
const: {
|
|
2005
|
-
allOf: [
|
|
2006
|
-
{
|
|
2007
|
-
sibling: 0,
|
|
2008
|
-
parent: {
|
|
2009
|
-
"f-page-main": !0
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
]
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
},
|
|
2019
|
-
"f-struct-data-grid": {
|
|
2020
|
-
description: "",
|
|
2021
|
-
type: "object",
|
|
2022
|
-
properties: {
|
|
2023
|
-
rules: {
|
|
2024
|
-
type: "object",
|
|
2025
|
-
properties: {
|
|
2026
|
-
canAccept: {
|
|
2027
|
-
type: "object",
|
|
2028
|
-
const: !0
|
|
2029
|
-
},
|
|
2030
|
-
fixed: {
|
|
2031
|
-
type: "boolean",
|
|
2032
|
-
const: !0
|
|
2033
|
-
},
|
|
2034
|
-
hidePadding: {
|
|
2035
|
-
type: "boolean",
|
|
2036
|
-
const: !0
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
},
|
|
2042
|
-
"f-page-main-content": {
|
|
2043
|
-
description: "",
|
|
2044
|
-
type: "object",
|
|
2045
|
-
properties: {
|
|
2046
|
-
contents: {
|
|
2047
|
-
type: "object",
|
|
2048
|
-
properties: {
|
|
2049
|
-
"f-page-content-nav": {
|
|
2050
|
-
description: "",
|
|
2051
|
-
type: "object",
|
|
2052
|
-
properties: {
|
|
2053
|
-
contents: {
|
|
2054
|
-
type: "object",
|
|
2055
|
-
properties: {
|
|
2056
|
-
"f-struct-data-grid-in-nav": {
|
|
2057
|
-
description: "",
|
|
2058
|
-
type: "object",
|
|
2059
|
-
properties: {
|
|
2060
|
-
contents: {
|
|
2061
|
-
type: "object",
|
|
2062
|
-
properties: {
|
|
2063
|
-
"f-page-content-nav-extend": {
|
|
2064
|
-
description: "",
|
|
2065
|
-
type: "object"
|
|
2066
|
-
},
|
|
2067
|
-
"f-section-in-nav": {
|
|
2068
|
-
description: "",
|
|
2069
|
-
type: "object",
|
|
2070
|
-
properties: {
|
|
2071
|
-
rules: {
|
|
2072
|
-
type: "object",
|
|
2073
|
-
properties: {
|
|
2074
|
-
canAccept: {
|
|
2075
|
-
type: "boolean",
|
|
2076
|
-
const: !1
|
|
2077
|
-
},
|
|
2078
|
-
fixed: {
|
|
2079
|
-
type: "boolean",
|
|
2080
|
-
const: !0
|
|
2081
|
-
},
|
|
2082
|
-
hidePadding: {
|
|
2083
|
-
type: "boolean",
|
|
2084
|
-
const: !1
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
},
|
|
2092
|
-
rules: {
|
|
2093
|
-
type: "object",
|
|
2094
|
-
properties: {
|
|
2095
|
-
canAccept: {
|
|
2096
|
-
type: "boolean",
|
|
2097
|
-
const: !0
|
|
2098
|
-
},
|
|
2099
|
-
fixed: {
|
|
2100
|
-
type: "boolean",
|
|
2101
|
-
const: !1
|
|
2102
|
-
},
|
|
2103
|
-
hidePadding: {
|
|
2104
|
-
type: "boolean",
|
|
2105
|
-
const: !0
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
},
|
|
2115
|
-
"f-page-content-main": {
|
|
2116
|
-
description: "",
|
|
2117
|
-
type: "object",
|
|
2118
|
-
properties: {}
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
},
|
|
2124
|
-
"f-page-content": {
|
|
2125
|
-
description: "",
|
|
2126
|
-
type: "object",
|
|
2127
|
-
properties: {
|
|
2128
|
-
contents: {
|
|
2129
|
-
type: "object",
|
|
2130
|
-
properties: {
|
|
2131
|
-
"f-page-content-nav": {
|
|
2132
|
-
description: "",
|
|
2133
|
-
type: "object",
|
|
2134
|
-
properties: {
|
|
2135
|
-
contents: {
|
|
2136
|
-
type: "object",
|
|
2137
|
-
properties: {
|
|
2138
|
-
"f-list-nav": {
|
|
2139
|
-
description: "",
|
|
2140
|
-
type: "object"
|
|
2141
|
-
},
|
|
2142
|
-
"f-list-nav-left": {
|
|
2143
|
-
description: "",
|
|
2144
|
-
type: "object"
|
|
2145
|
-
},
|
|
2146
|
-
"f-struct-data-grid-in-nav": {
|
|
2147
|
-
description: "",
|
|
2148
|
-
type: "object",
|
|
2149
|
-
properties: {
|
|
2150
|
-
contents: {
|
|
2151
|
-
type: "object",
|
|
2152
|
-
properties: {
|
|
2153
|
-
"f-section-form": {
|
|
2154
|
-
description: "",
|
|
2155
|
-
type: "object",
|
|
2156
|
-
properties: {
|
|
2157
|
-
rules: {
|
|
2158
|
-
type: "object",
|
|
2159
|
-
properties: {
|
|
2160
|
-
canAccept: {
|
|
2161
|
-
type: "boolean",
|
|
2162
|
-
const: !1
|
|
2163
|
-
},
|
|
2164
|
-
fixed: {
|
|
2165
|
-
type: "boolean",
|
|
2166
|
-
const: !0
|
|
2167
|
-
},
|
|
2168
|
-
hidePadding: {
|
|
2169
|
-
type: "boolean",
|
|
2170
|
-
const: !0
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
},
|
|
2176
|
-
"f-section-grid": {
|
|
2177
|
-
description: "",
|
|
2178
|
-
type: "object",
|
|
2179
|
-
properties: {
|
|
2180
|
-
rules: {
|
|
2181
|
-
type: "object",
|
|
2182
|
-
properties: {
|
|
2183
|
-
canAccept: {
|
|
2184
|
-
type: "boolean",
|
|
2185
|
-
const: !1
|
|
2186
|
-
},
|
|
2187
|
-
fixed: {
|
|
2188
|
-
type: "boolean",
|
|
2189
|
-
const: !0
|
|
2190
|
-
},
|
|
2191
|
-
hidePadding: {
|
|
2192
|
-
type: "boolean",
|
|
2193
|
-
const: !0
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
}
|
|
2200
|
-
},
|
|
2201
|
-
rules: {
|
|
2202
|
-
type: "object",
|
|
2203
|
-
properties: {
|
|
2204
|
-
canAccept: {
|
|
2205
|
-
type: "boolean",
|
|
2206
|
-
const: !1
|
|
2207
|
-
},
|
|
2208
|
-
fixed: {
|
|
2209
|
-
type: "boolean",
|
|
2210
|
-
const: !0
|
|
2211
|
-
},
|
|
2212
|
-
hidePadding: {
|
|
2213
|
-
type: "boolean",
|
|
2214
|
-
const: !0
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
},
|
|
2223
|
-
rules: {
|
|
2224
|
-
type: "object",
|
|
2225
|
-
properties: {
|
|
2226
|
-
canAccept: {
|
|
2227
|
-
type: "boolean",
|
|
2228
|
-
const: !1
|
|
2229
|
-
},
|
|
2230
|
-
fixed: {
|
|
2231
|
-
type: "boolean",
|
|
2232
|
-
const: !0
|
|
2233
|
-
},
|
|
2234
|
-
hidePadding: {
|
|
2235
|
-
type: "boolean",
|
|
2236
|
-
const: !0
|
|
2237
|
-
}
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
},
|
|
2241
|
-
"f-page-content-main": {
|
|
2242
|
-
description: "",
|
|
2243
|
-
type: "object",
|
|
2244
|
-
properties: {
|
|
2245
|
-
rules: {
|
|
2246
|
-
type: "object",
|
|
2247
|
-
properties: {
|
|
2248
|
-
canAccept: {
|
|
2249
|
-
type: "boolean",
|
|
2250
|
-
const: !1
|
|
2251
|
-
},
|
|
2252
|
-
fixed: {
|
|
2253
|
-
type: "boolean",
|
|
2254
|
-
const: !1
|
|
2255
|
-
},
|
|
2256
|
-
hidePadding: {
|
|
2257
|
-
type: "boolean",
|
|
2258
|
-
const: !0
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
},
|
|
2266
|
-
rules: {
|
|
2267
|
-
type: "object",
|
|
2268
|
-
properties: {
|
|
2269
|
-
canAccept: {
|
|
2270
|
-
type: "boolean",
|
|
2271
|
-
const: !1
|
|
2272
|
-
},
|
|
2273
|
-
fixed: {
|
|
2274
|
-
type: "boolean",
|
|
2275
|
-
const: !0
|
|
2276
|
-
},
|
|
2277
|
-
hidePadding: {
|
|
2278
|
-
type: "boolean",
|
|
2279
|
-
const: !0
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
},
|
|
2287
|
-
rules: {
|
|
2288
|
-
type: "object",
|
|
2289
|
-
properties: {
|
|
2290
|
-
canAccept: {
|
|
2291
|
-
type: "object",
|
|
2292
|
-
const: {
|
|
2293
|
-
anyOf: [
|
|
2294
|
-
{
|
|
2295
|
-
children: 0
|
|
2296
|
-
},
|
|
2297
|
-
{
|
|
2298
|
-
children: {
|
|
2299
|
-
length: {
|
|
2300
|
-
not: 1
|
|
2301
|
-
},
|
|
2302
|
-
"f-struct-like-card": !0
|
|
2303
|
-
}
|
|
2304
|
-
},
|
|
2305
|
-
{
|
|
2306
|
-
children: {
|
|
2307
|
-
"scroll-spy": !1,
|
|
2308
|
-
"f-page-content": !1,
|
|
2309
|
-
"f-struct-like-card": !1
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
]
|
|
2313
|
-
}
|
|
2314
|
-
},
|
|
2315
|
-
fixed: {
|
|
2316
|
-
type: "boolean",
|
|
2317
|
-
const: !0
|
|
2318
|
-
},
|
|
2319
|
-
hidePadding: {
|
|
2320
|
-
type: "boolean",
|
|
2321
|
-
const: !0
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
},
|
|
2327
|
-
"f-page-footer": {
|
|
2328
|
-
description: "The class of page footer designed by farris.",
|
|
2329
|
-
type: "string"
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
},
|
|
2333
|
-
rules: {
|
|
2334
|
-
type: "object",
|
|
2335
|
-
properties: {
|
|
2336
|
-
canAccept: {
|
|
2337
|
-
type: "boolean",
|
|
2338
|
-
const: !1
|
|
2339
|
-
},
|
|
2340
|
-
fixed: {
|
|
2341
|
-
type: "boolean",
|
|
2342
|
-
const: !0
|
|
2343
|
-
},
|
|
2344
|
-
hidePadding: {
|
|
2345
|
-
type: "boolean",
|
|
2346
|
-
const: !0
|
|
2347
|
-
}
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2350
|
-
}
|
|
2351
|
-
},
|
|
2352
|
-
"f-page-is-managelist": {
|
|
2353
|
-
description: "The root class of mangement list page.",
|
|
2354
|
-
type: "string"
|
|
2355
|
-
},
|
|
2356
|
-
"f-page-card": {
|
|
2357
|
-
description: "",
|
|
2358
|
-
type: "object"
|
|
2359
|
-
},
|
|
2360
|
-
"f-page-is-mainsubcard": {
|
|
2361
|
-
description: "",
|
|
2362
|
-
type: "object"
|
|
2363
|
-
}
|
|
2364
|
-
}, Ht = {
|
|
2365
|
-
$schema: Ft,
|
|
2366
|
-
$id: Lt,
|
|
2367
|
-
title: Vt,
|
|
2368
|
-
description: Wt,
|
|
2369
|
-
type: Ut,
|
|
2370
|
-
properties: qt
|
|
2371
|
-
}, se = /* @__PURE__ */ new Map();
|
|
2372
|
-
function Me() {
|
|
2373
|
-
function n(c, C, w, j) {
|
|
2374
|
-
var I;
|
|
2375
|
-
if (typeof w == "number")
|
|
2376
|
-
return ((I = j[c]) == null ? void 0 : I.length) === w;
|
|
2377
|
-
if (typeof w == "object") {
|
|
2378
|
-
const P = Object.keys(w)[0], A = w[P];
|
|
2379
|
-
if (P === "not")
|
|
2380
|
-
return Number(j[c].length) !== Number(A);
|
|
2381
|
-
if (P === "moreThan")
|
|
2382
|
-
return Number(j[c].length) >= Number(A);
|
|
2383
|
-
if (P === "lessThan")
|
|
2384
|
-
return Number(j[c].length) <= Number(A);
|
|
2385
|
-
}
|
|
2386
|
-
return !1;
|
|
2387
|
-
}
|
|
2388
|
-
function e(c, C, w, j) {
|
|
2389
|
-
return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
|
|
2390
|
-
}
|
|
2391
|
-
function t(c, C, w, j) {
|
|
2392
|
-
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2393
|
-
}
|
|
2394
|
-
function r(c, C, w, j) {
|
|
2395
|
-
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2396
|
-
}
|
|
2397
|
-
const u = /* @__PURE__ */ new Map([
|
|
2398
|
-
["length", n],
|
|
2399
|
-
["hasChildren", e],
|
|
2400
|
-
["hasSibling", r],
|
|
2401
|
-
["hasParent", t]
|
|
2402
|
-
]);
|
|
2403
|
-
function h(c, C) {
|
|
2404
|
-
const w = c;
|
|
2405
|
-
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
|
|
2406
|
-
if (j === "length")
|
|
2407
|
-
return { target: w, operator: "length", param: null, value: C[j] };
|
|
2408
|
-
const I = j, P = C[j];
|
|
2409
|
-
return { target: w, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: I, value: P };
|
|
2410
|
-
}) : [];
|
|
2411
|
-
}
|
|
2412
|
-
function g(c, C) {
|
|
2413
|
-
if (u.has(c.operator)) {
|
|
2414
|
-
const w = u.get(c.operator);
|
|
2415
|
-
return w && w(c.target, c.param, c.value, C) || !1;
|
|
2416
|
-
}
|
|
2417
|
-
return !1;
|
|
2418
|
-
}
|
|
2419
|
-
function D(c, C) {
|
|
2420
|
-
return Object.keys(c).reduce((P, A) => {
|
|
2421
|
-
const $ = h(A, c[A]);
|
|
2422
|
-
return P.push(...$), P;
|
|
2423
|
-
}, []).reduce((P, A) => P && g(A, C), !0);
|
|
2424
|
-
}
|
|
2425
|
-
function S(c, C) {
|
|
2426
|
-
const w = Object.keys(c), j = w.includes("allOf"), I = w.includes("anyOf"), P = j || I, v = (P ? c[P ? j ? "allOf" : "anyOf" : "allOf"] : [c]).map((x) => D(x, C));
|
|
2427
|
-
return j ? !v.includes(!1) : v.includes(!0);
|
|
2428
|
-
}
|
|
2429
|
-
function y(c, C) {
|
|
2430
|
-
const w = c.const;
|
|
2431
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ? S(w, C) : !1 : !1;
|
|
2432
|
-
}
|
|
2433
|
-
function T(c) {
|
|
2434
|
-
return (C) => {
|
|
2435
|
-
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2436
|
-
return c && c.properties && Object.keys(c.properties).reduce((j, I) => {
|
|
2437
|
-
const P = c.properties[I];
|
|
2438
|
-
return j[I] = y(P, C), j;
|
|
2439
|
-
}, w), w;
|
|
2440
|
-
};
|
|
2441
|
-
}
|
|
2442
|
-
function l(c, C, w) {
|
|
2443
|
-
if (C.type === "object" && C.properties) {
|
|
2444
|
-
const { rules: j, contents: I } = C.properties;
|
|
2445
|
-
w.set(c, T(j)), I && Object.keys(I.properties).forEach(
|
|
2446
|
-
(P) => l(P, I.properties[P], w)
|
|
2447
|
-
);
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
function i() {
|
|
2451
|
-
const { properties: c } = Ht;
|
|
2452
|
-
Object.keys(c).forEach((C) => {
|
|
2453
|
-
l(C, c[C], se);
|
|
2454
|
-
});
|
|
2455
|
-
}
|
|
2456
|
-
function d(c, C) {
|
|
2457
|
-
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2458
|
-
return se.has(c) ? se.get(c)(C) : w;
|
|
2459
|
-
}
|
|
2460
|
-
return i(), { getRuleValue: d };
|
|
2461
|
-
}
|
|
2462
|
-
class zt extends ee {
|
|
1731
|
+
class Ft extends ee {
|
|
2463
1732
|
constructor(e, t) {
|
|
2464
1733
|
super(e, t);
|
|
2465
1734
|
}
|
|
@@ -2528,85 +1797,40 @@ class zt extends ee {
|
|
|
2528
1797
|
};
|
|
2529
1798
|
}
|
|
2530
1799
|
}
|
|
2531
|
-
function
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
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;
|
|
2536
|
-
}
|
|
2537
|
-
function l(v) {
|
|
2538
|
-
return !_t().basalDragulaRuleForContainer(v) || !D || !T(v), !1;
|
|
2539
|
-
}
|
|
2540
|
-
function i() {
|
|
2541
|
-
h.value = !1, g.value = !1;
|
|
2542
|
-
const v = n, f = v.appearance && v.appearance.class || "", x = f.split(" "), k = v.buttons || [], p = k.length ? k[0] : null, s = p && p.appearance ? p.appearance.class : "", o = s ? s.split(" ") : [], a = k.length ? k.reduce((_, W) => {
|
|
2543
|
-
const q = W && W.appearance ? W.appearance.class : "", te = q ? q.split(" ") : [];
|
|
2544
|
-
return _.push(...te), _;
|
|
2545
|
-
}, []) : [], m = t == null ? void 0 : t.schema, B = m && m.appearance && m.appearance.class || "", E = B ? B.split(" ") : [];
|
|
2546
|
-
y = {
|
|
2547
|
-
componentClass: f,
|
|
2548
|
-
componentClassList: x,
|
|
2549
|
-
childContents: k,
|
|
2550
|
-
firstChildContent: p,
|
|
2551
|
-
firstChildClass: s,
|
|
2552
|
-
firstChildClassList: o,
|
|
2553
|
-
parent: m,
|
|
2554
|
-
parentClass: B,
|
|
2555
|
-
parentClassList: E,
|
|
2556
|
-
children: k,
|
|
2557
|
-
childrenClassList: a
|
|
2558
|
-
};
|
|
2559
|
-
const { canAccept: R, fixed: L, hidePadding: N } = u.getRuleValue(x[0], y);
|
|
2560
|
-
return D = R, S = N, !0;
|
|
2561
|
-
}
|
|
2562
|
-
function d(v) {
|
|
2563
|
-
}
|
|
2564
|
-
function c() {
|
|
2565
|
-
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2566
|
-
}
|
|
2567
|
-
function C(v, f) {
|
|
2568
|
-
return f.text = v.label, f;
|
|
1800
|
+
function Lt(n, e) {
|
|
1801
|
+
const t = n.schema;
|
|
1802
|
+
function s(b) {
|
|
1803
|
+
return !1;
|
|
2569
1804
|
}
|
|
2570
|
-
function
|
|
2571
|
-
|
|
2572
|
-
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2573
|
-
const o = String(v.innerText), a = U("form-group");
|
|
2574
|
-
return a.editor = x, a.label = o, a;
|
|
2575
|
-
}
|
|
2576
|
-
return x;
|
|
1805
|
+
function i(b, l) {
|
|
1806
|
+
return l.text = b.label, l;
|
|
2577
1807
|
}
|
|
2578
|
-
function
|
|
1808
|
+
function p() {
|
|
2579
1809
|
return !1;
|
|
2580
1810
|
}
|
|
2581
|
-
function
|
|
1811
|
+
function u() {
|
|
2582
1812
|
return !1;
|
|
2583
1813
|
}
|
|
2584
|
-
function
|
|
1814
|
+
function y() {
|
|
2585
1815
|
return !0;
|
|
2586
1816
|
}
|
|
2587
|
-
function
|
|
2588
|
-
return
|
|
1817
|
+
function w() {
|
|
1818
|
+
return !0;
|
|
2589
1819
|
}
|
|
2590
|
-
function
|
|
2591
|
-
return new
|
|
1820
|
+
function h(b) {
|
|
1821
|
+
return new Ft(b, e).getPropertyConfig(t);
|
|
2592
1822
|
}
|
|
2593
1823
|
return {
|
|
2594
|
-
canAccepts:
|
|
2595
|
-
checkCanAddComponent:
|
|
2596
|
-
checkCanDeleteComponent:
|
|
2597
|
-
checkCanMoveComponent:
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
onAcceptMovedChildElement: d,
|
|
2602
|
-
onResolveNewComponentSchema: C,
|
|
2603
|
-
resolveComponentContext: i,
|
|
2604
|
-
getPropsConfig: $,
|
|
2605
|
-
triggerBelongedComponentToMoveWhenMoved: h,
|
|
2606
|
-
triggerBelongedComponentToDeleteWhenDeleted: g
|
|
1824
|
+
canAccepts: s,
|
|
1825
|
+
checkCanAddComponent: y,
|
|
1826
|
+
checkCanDeleteComponent: u,
|
|
1827
|
+
checkCanMoveComponent: p,
|
|
1828
|
+
hideNestedPaddingInDesginerView: w,
|
|
1829
|
+
onResolveNewComponentSchema: i,
|
|
1830
|
+
getPropsConfig: h
|
|
2607
1831
|
};
|
|
2608
1832
|
}
|
|
2609
|
-
const
|
|
1833
|
+
const Vt = {
|
|
2610
1834
|
id: { type: String, default: "" },
|
|
2611
1835
|
componentId: { type: String, default: "" },
|
|
2612
1836
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2619,12 +1843,12 @@ const Jt = {
|
|
|
2619
1843
|
* 组件值
|
|
2620
1844
|
*/
|
|
2621
1845
|
modelValue: { type: Object }
|
|
2622
|
-
}, X =
|
|
2623
|
-
function
|
|
2624
|
-
const t = e.getBoundingClientRect(),
|
|
2625
|
-
return
|
|
1846
|
+
}, X = S(0);
|
|
1847
|
+
function Ut(n, e) {
|
|
1848
|
+
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), i = s.top >= t.top, p = s.top <= t.bottom;
|
|
1849
|
+
return i && p;
|
|
2626
1850
|
}
|
|
2627
|
-
function
|
|
1851
|
+
function Wt(n) {
|
|
2628
1852
|
if (!n)
|
|
2629
1853
|
return;
|
|
2630
1854
|
let e;
|
|
@@ -2633,240 +1857,232 @@ function Xt(n) {
|
|
|
2633
1857
|
const t = e.getBoundingClientRect();
|
|
2634
1858
|
if (t.width === 0 && t.height === 0)
|
|
2635
1859
|
return;
|
|
2636
|
-
const
|
|
2637
|
-
if (
|
|
2638
|
-
if (!
|
|
2639
|
-
|
|
1860
|
+
const s = e.querySelector(".component-btn-group");
|
|
1861
|
+
if (s) {
|
|
1862
|
+
if (!Ut(e, n)) {
|
|
1863
|
+
s.style.display = "none";
|
|
2640
1864
|
return;
|
|
2641
1865
|
}
|
|
2642
|
-
|
|
2643
|
-
const
|
|
2644
|
-
if (
|
|
2645
|
-
const
|
|
2646
|
-
|
|
1866
|
+
s.style.display = "";
|
|
1867
|
+
const p = s.getBoundingClientRect(), u = s.querySelector("div");
|
|
1868
|
+
if (u) {
|
|
1869
|
+
const y = u.getBoundingClientRect();
|
|
1870
|
+
u.style.top = p.top + "px", u.style.left = p.left - y.width + "px";
|
|
2647
1871
|
}
|
|
2648
1872
|
}
|
|
2649
1873
|
}
|
|
2650
|
-
function
|
|
2651
|
-
var
|
|
2652
|
-
function
|
|
1874
|
+
function qt(n, e, t) {
|
|
1875
|
+
var B;
|
|
1876
|
+
function s() {
|
|
2653
1877
|
}
|
|
2654
|
-
const
|
|
2655
|
-
function
|
|
1878
|
+
const i = "", p = S();
|
|
1879
|
+
function u() {
|
|
2656
1880
|
return !0;
|
|
2657
1881
|
}
|
|
2658
|
-
function
|
|
1882
|
+
function y() {
|
|
2659
1883
|
return !1;
|
|
2660
1884
|
}
|
|
2661
|
-
function
|
|
1885
|
+
function w() {
|
|
2662
1886
|
return !0;
|
|
2663
1887
|
}
|
|
2664
|
-
function
|
|
1888
|
+
function h() {
|
|
2665
1889
|
return !0;
|
|
2666
1890
|
}
|
|
2667
|
-
function
|
|
1891
|
+
function b() {
|
|
2668
1892
|
return !0;
|
|
2669
1893
|
}
|
|
2670
|
-
function l(
|
|
2671
|
-
if (!
|
|
1894
|
+
function l(P) {
|
|
1895
|
+
if (!P || !P.value)
|
|
2672
1896
|
return null;
|
|
2673
|
-
const
|
|
2674
|
-
return
|
|
1897
|
+
const x = S(P == null ? void 0 : P.value.parent), C = l(x);
|
|
1898
|
+
return C || null;
|
|
2675
1899
|
}
|
|
2676
|
-
function
|
|
2677
|
-
const { componentInstance:
|
|
2678
|
-
return !
|
|
1900
|
+
function c(P = e) {
|
|
1901
|
+
const { componentInstance: x, designerItemElementRef: C } = P;
|
|
1902
|
+
return !x || !x.value ? null : x.value.canMove || x.value.canAdd || x.value.canDelete ? C : c(P.parent);
|
|
2679
1903
|
}
|
|
2680
|
-
function
|
|
1904
|
+
function f(P) {
|
|
2681
1905
|
return !!t;
|
|
2682
1906
|
}
|
|
2683
|
-
function
|
|
1907
|
+
function v() {
|
|
2684
1908
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2685
1909
|
}
|
|
2686
|
-
function
|
|
2687
|
-
}
|
|
2688
|
-
function w(v, f) {
|
|
1910
|
+
function k() {
|
|
2689
1911
|
}
|
|
2690
|
-
function
|
|
2691
|
-
const { componentType: f } = v;
|
|
2692
|
-
let x = U(f, v);
|
|
2693
|
-
const k = f.toLowerCase().replace("-", "_");
|
|
2694
|
-
return x && !x.id && x.type === f && (x.id = `${k}_${Math.random().toString().slice(2, 6)}`), x;
|
|
1912
|
+
function A(P, x) {
|
|
2695
1913
|
}
|
|
2696
|
-
function
|
|
2697
|
-
const
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
1914
|
+
function $(P) {
|
|
1915
|
+
const { componentType: x } = P;
|
|
1916
|
+
let C = Q(x, P);
|
|
1917
|
+
const I = x.toLowerCase().replace("-", "_");
|
|
1918
|
+
return C && !C.id && C.type === x && (C.id = `${I}_${Math.random().toString().slice(2, 6)}`), C;
|
|
2702
1919
|
}
|
|
2703
|
-
function P
|
|
1920
|
+
function _(P) {
|
|
2704
1921
|
}
|
|
2705
|
-
function
|
|
1922
|
+
function T(...P) {
|
|
2706
1923
|
return [];
|
|
2707
1924
|
}
|
|
2708
|
-
return
|
|
2709
|
-
canMove:
|
|
2710
|
-
canSelectParent:
|
|
2711
|
-
canAdd:
|
|
2712
|
-
canDelete:
|
|
2713
|
-
canNested: !
|
|
1925
|
+
return p.value = {
|
|
1926
|
+
canMove: u(),
|
|
1927
|
+
canSelectParent: y(),
|
|
1928
|
+
canAdd: h(),
|
|
1929
|
+
canDelete: w(),
|
|
1930
|
+
canNested: !b(),
|
|
2714
1931
|
contents: [],
|
|
2715
1932
|
elementRef: n,
|
|
2716
|
-
parent: (
|
|
1933
|
+
parent: (B = e.parent) == null ? void 0 : B.componentInstance,
|
|
2717
1934
|
schema: e.schema,
|
|
2718
|
-
styles:
|
|
2719
|
-
canAccepts:
|
|
1935
|
+
styles: i,
|
|
1936
|
+
canAccepts: f,
|
|
2720
1937
|
getBelongedComponentInstance: l,
|
|
2721
|
-
getDraggableDesignItemElement:
|
|
2722
|
-
getDraggingDisplayText:
|
|
2723
|
-
getPropConfig:
|
|
2724
|
-
getDragScopeElement:
|
|
2725
|
-
onAcceptMovedChildElement:
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
}, h;
|
|
1938
|
+
getDraggableDesignItemElement: c,
|
|
1939
|
+
getDraggingDisplayText: v,
|
|
1940
|
+
getPropConfig: T,
|
|
1941
|
+
getDragScopeElement: k,
|
|
1942
|
+
onAcceptMovedChildElement: A,
|
|
1943
|
+
onChildElementMovedOut: _,
|
|
1944
|
+
addNewChildComponentSchema: $,
|
|
1945
|
+
updateDragAndDropRules: s,
|
|
1946
|
+
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1947
|
+
triggerBelongedComponentToDeleteWhenDeleted: S(!1)
|
|
1948
|
+
}, p;
|
|
2733
1949
|
}
|
|
2734
|
-
const
|
|
1950
|
+
const Ee = /* @__PURE__ */ U({
|
|
2735
1951
|
name: "FDesignerInnerItem",
|
|
2736
|
-
props:
|
|
1952
|
+
props: Vt,
|
|
2737
1953
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2738
1954
|
setup(n, e) {
|
|
2739
|
-
const t =
|
|
1955
|
+
const t = S(n.canMove), s = S(n.canAdd), i = S(n.canDelete), p = S(!1), u = S(n.contentKey), y = S(n.childType), w = S(n.childLabel), h = S(n.modelValue), b = S(""), l = S(), c = V("canvas-dragula"), f = S(), v = V("design-item-context"), k = {
|
|
2740
1956
|
designerItemElementRef: l,
|
|
2741
|
-
componentInstance:
|
|
2742
|
-
schema:
|
|
2743
|
-
parent:
|
|
1957
|
+
componentInstance: f,
|
|
1958
|
+
schema: h.value,
|
|
1959
|
+
parent: v,
|
|
2744
1960
|
setupContext: e
|
|
2745
1961
|
};
|
|
2746
|
-
|
|
2747
|
-
const
|
|
1962
|
+
_e("design-item-context", k);
|
|
1963
|
+
const A = N(() => ({
|
|
2748
1964
|
"farris-component": !0,
|
|
2749
1965
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2750
1966
|
"flex-fill": n.id == "root-component",
|
|
2751
|
-
"position-relative": t.value ||
|
|
2752
|
-
"farris-nested":
|
|
1967
|
+
"position-relative": t.value || i.value,
|
|
1968
|
+
"farris-nested": p.value,
|
|
2753
1969
|
"can-move": t.value,
|
|
2754
1970
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2755
|
-
})),
|
|
1971
|
+
})), $ = N(() => {
|
|
2756
1972
|
const o = {};
|
|
2757
|
-
return
|
|
2758
|
-
const [
|
|
2759
|
-
return
|
|
1973
|
+
return b.value && b.value.split(";").reduce((a, m) => {
|
|
1974
|
+
const [M, D] = m.split(":");
|
|
1975
|
+
return M && (a[M] = D), a;
|
|
2760
1976
|
}, o), o;
|
|
2761
1977
|
});
|
|
2762
|
-
function
|
|
2763
|
-
if (
|
|
2764
|
-
const m =
|
|
1978
|
+
function _(o, a) {
|
|
1979
|
+
if (v && v.schema[u.value]) {
|
|
1980
|
+
const m = v.schema[u.value].findIndex((M) => M.id === a.id);
|
|
2765
1981
|
if (m > -1) {
|
|
2766
|
-
const
|
|
2767
|
-
|
|
1982
|
+
const M = v.schema[u.value].length, D = v.schema[u.value][m % M];
|
|
1983
|
+
v.designerItemElementRef.value.querySelector(`#${D.id}-design-item`), v.schema[u.value].splice(m, 1), v.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
|
|
2768
1984
|
}
|
|
2769
1985
|
}
|
|
2770
1986
|
}
|
|
2771
|
-
function
|
|
2772
|
-
if (
|
|
1987
|
+
function T(o) {
|
|
1988
|
+
if (f.value.addNewChildComponentSchema) {
|
|
2773
1989
|
const a = {
|
|
2774
|
-
componentType:
|
|
2775
|
-
label:
|
|
2776
|
-
parentComponentInstance:
|
|
1990
|
+
componentType: y.value,
|
|
1991
|
+
label: w.value,
|
|
1992
|
+
parentComponentInstance: f.value,
|
|
2777
1993
|
targetPosition: -1
|
|
2778
|
-
}, m =
|
|
2779
|
-
|
|
1994
|
+
}, m = f.value.addNewChildComponentSchema(a);
|
|
1995
|
+
h.value[u.value].push(m), e.emit("addComponent");
|
|
2780
1996
|
}
|
|
2781
1997
|
}
|
|
2782
|
-
function
|
|
2783
|
-
return
|
|
1998
|
+
function B() {
|
|
1999
|
+
return s.value && g("div", {
|
|
2784
2000
|
role: "button",
|
|
2785
2001
|
class: "btn component-settings-button",
|
|
2786
2002
|
title: "新增",
|
|
2787
2003
|
ref: "removeComponent",
|
|
2788
2004
|
onClick: (o) => {
|
|
2789
|
-
|
|
2005
|
+
T();
|
|
2790
2006
|
}
|
|
2791
|
-
}, [
|
|
2007
|
+
}, [g("i", {
|
|
2792
2008
|
class: "f-icon f-icon-plus-circle"
|
|
2793
2009
|
}, null)]);
|
|
2794
2010
|
}
|
|
2795
|
-
function
|
|
2796
|
-
return
|
|
2011
|
+
function P(o) {
|
|
2012
|
+
return i.value && g("div", {
|
|
2797
2013
|
role: "button",
|
|
2798
2014
|
class: "btn component-settings-button",
|
|
2799
2015
|
title: "删除",
|
|
2800
2016
|
ref: "removeComponent",
|
|
2801
|
-
onClick: Fe((a) =>
|
|
2802
|
-
}, [
|
|
2017
|
+
onClick: Fe((a) => _(a, o), ["stop"])
|
|
2018
|
+
}, [g("i", {
|
|
2803
2019
|
class: "f-icon f-icon-yxs_delete"
|
|
2804
2020
|
}, null)]);
|
|
2805
2021
|
}
|
|
2806
|
-
function
|
|
2807
|
-
return t.value &&
|
|
2022
|
+
function x() {
|
|
2023
|
+
return t.value && g("div", {
|
|
2808
2024
|
role: "button",
|
|
2809
2025
|
class: "btn component-settings-button",
|
|
2810
2026
|
title: "移动",
|
|
2811
2027
|
ref: "moveComponent"
|
|
2812
|
-
}, [
|
|
2028
|
+
}, [g("i", {
|
|
2813
2029
|
"data-dragging-icon": "true",
|
|
2814
2030
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2815
2031
|
}, null)]);
|
|
2816
2032
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return
|
|
2033
|
+
function C(o) {
|
|
2034
|
+
return g("div", {
|
|
2819
2035
|
class: "component-btn-group",
|
|
2820
2036
|
"data-noattach": "true"
|
|
2821
|
-
}, [
|
|
2037
|
+
}, [g("div", null, [B(), x(), P(o)])]);
|
|
2822
2038
|
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2039
|
+
q(() => n.modelValue, (o) => {
|
|
2040
|
+
h.value = o, k.schema = o;
|
|
2825
2041
|
});
|
|
2826
|
-
function
|
|
2042
|
+
function I(o) {
|
|
2827
2043
|
const a = o.target;
|
|
2828
|
-
|
|
2044
|
+
Wt(a);
|
|
2829
2045
|
}
|
|
2830
|
-
function
|
|
2046
|
+
function O() {
|
|
2831
2047
|
var o, a;
|
|
2832
|
-
(a = (o =
|
|
2048
|
+
(a = (o = h.value) == null ? void 0 : o.contents) != null && a.length && l.value && l.value.addEventListener("scroll", I);
|
|
2833
2049
|
}
|
|
2834
|
-
function
|
|
2835
|
-
const o = l.value, a =
|
|
2836
|
-
return
|
|
2050
|
+
function d() {
|
|
2051
|
+
const o = l.value, a = S(o.children[1]);
|
|
2052
|
+
return qt(a, k).value;
|
|
2837
2053
|
}
|
|
2838
2054
|
H(() => {
|
|
2839
2055
|
if (l.value) {
|
|
2840
|
-
const o = l.value.querySelector(`[data-dragref='${
|
|
2841
|
-
|
|
2056
|
+
const o = l.value.querySelector(`[data-dragref='${h.value.id}-container']`);
|
|
2057
|
+
f.value = o && o.componentInstance ? o.componentInstance.value : d(), c && o && c.attachComponents(o, h.value), p.value = f.value.canNested !== void 0 ? f.value.canNested : p.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, i.value = f.value.canDelete !== void 0 ? f.value.canDelete : i.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, b.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = k);
|
|
2842
2058
|
}
|
|
2843
|
-
|
|
2844
|
-
}),
|
|
2845
|
-
l.value && l.value.removeEventListener("scroll",
|
|
2059
|
+
O(), X.value++;
|
|
2060
|
+
}), Ne(() => {
|
|
2061
|
+
l.value && l.value.removeEventListener("scroll", I);
|
|
2846
2062
|
});
|
|
2847
|
-
function
|
|
2063
|
+
function r(o) {
|
|
2848
2064
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((m) => m.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2849
2065
|
const a = l.value;
|
|
2850
2066
|
if (a) {
|
|
2851
2067
|
const m = document.getElementsByClassName("dgComponentSelected");
|
|
2852
2068
|
if (!(m && m.length === 1 && m[0] === l.value)) {
|
|
2853
|
-
Array.from(m).forEach((
|
|
2854
|
-
const
|
|
2855
|
-
|
|
2069
|
+
Array.from(m).forEach((E) => E.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", h.value.type, h.value, n.componentId, f.value);
|
|
2070
|
+
const D = f.value.getDraggableDesignItemElement(k);
|
|
2071
|
+
D && D.value && D.value.classList.add("dgComponentSelected");
|
|
2856
2072
|
}
|
|
2857
2073
|
}
|
|
2858
2074
|
X.value++;
|
|
2859
2075
|
}
|
|
2860
|
-
return () =>
|
|
2076
|
+
return () => g("div", {
|
|
2861
2077
|
id: `${n.id}-design-item`,
|
|
2862
2078
|
ref: l,
|
|
2863
|
-
class:
|
|
2864
|
-
style:
|
|
2865
|
-
onClick:
|
|
2866
|
-
}, [
|
|
2079
|
+
class: A.value,
|
|
2080
|
+
style: $.value,
|
|
2081
|
+
onClick: r
|
|
2082
|
+
}, [C(h.value), e.slots.default && e.slots.default()]);
|
|
2867
2083
|
}
|
|
2868
2084
|
});
|
|
2869
|
-
class
|
|
2085
|
+
class Ht extends ee {
|
|
2870
2086
|
constructor(e, t) {
|
|
2871
2087
|
super(e, t);
|
|
2872
2088
|
}
|
|
@@ -2917,45 +2133,45 @@ class Zt extends ee {
|
|
|
2917
2133
|
title: "style样式"
|
|
2918
2134
|
}
|
|
2919
2135
|
},
|
|
2920
|
-
setPropertyRelates(t,
|
|
2136
|
+
setPropertyRelates(t, s) {
|
|
2921
2137
|
}
|
|
2922
2138
|
};
|
|
2923
2139
|
}
|
|
2924
2140
|
getEventPropConfig(e) {
|
|
2925
2141
|
const t = [
|
|
2926
2142
|
{
|
|
2927
|
-
label: "
|
|
2143
|
+
label: "onClick",
|
|
2928
2144
|
name: "点击事件"
|
|
2929
2145
|
}
|
|
2930
2146
|
];
|
|
2931
|
-
var
|
|
2932
|
-
const
|
|
2933
|
-
|
|
2147
|
+
var s = this;
|
|
2148
|
+
const i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
|
|
2149
|
+
p[s.viewModelId] = {
|
|
2934
2150
|
type: "events-editor",
|
|
2935
2151
|
editor: {
|
|
2936
|
-
initialData:
|
|
2152
|
+
initialData: i
|
|
2937
2153
|
}
|
|
2938
2154
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2939
2155
|
title: "事件",
|
|
2940
2156
|
hideTitle: !0,
|
|
2941
|
-
properties:
|
|
2157
|
+
properties: p,
|
|
2942
2158
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2943
2159
|
refreshPanelAfterChanged: !0,
|
|
2944
2160
|
tabId: "commands",
|
|
2945
2161
|
tabName: "交互",
|
|
2946
|
-
setPropertyRelates(
|
|
2947
|
-
const
|
|
2948
|
-
delete e[
|
|
2162
|
+
setPropertyRelates(u, y) {
|
|
2163
|
+
const w = u.propertyValue;
|
|
2164
|
+
delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
|
|
2949
2165
|
}
|
|
2950
2166
|
};
|
|
2951
2167
|
}
|
|
2952
2168
|
}
|
|
2953
|
-
class
|
|
2169
|
+
class zt extends ee {
|
|
2954
2170
|
constructor(e, t) {
|
|
2955
2171
|
super(e, t);
|
|
2956
2172
|
}
|
|
2957
2173
|
getPropertyConfig(e) {
|
|
2958
|
-
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
2174
|
+
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
|
|
2959
2175
|
}
|
|
2960
2176
|
getBasicPropConfig() {
|
|
2961
2177
|
this.propertyConfig.categories.basic = {
|
|
@@ -2993,6 +2209,20 @@ class Kt extends ee {
|
|
|
2993
2209
|
}
|
|
2994
2210
|
};
|
|
2995
2211
|
}
|
|
2212
|
+
getbBehaviorConfig() {
|
|
2213
|
+
this.propertyConfig.categories.behavior = {
|
|
2214
|
+
title: "行为",
|
|
2215
|
+
description: "Behavior",
|
|
2216
|
+
properties: {
|
|
2217
|
+
disabled: {
|
|
2218
|
+
title: "禁用状态",
|
|
2219
|
+
type: "boolean",
|
|
2220
|
+
description: "按钮禁用状态",
|
|
2221
|
+
refreshPanelAfterChanged: !0
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2996
2226
|
getAppearanceProperties(e) {
|
|
2997
2227
|
this.propertyConfig.categories.appearance = {
|
|
2998
2228
|
title: "样式",
|
|
@@ -3001,12 +2231,8 @@ class Kt extends ee {
|
|
|
3001
2231
|
class: {
|
|
3002
2232
|
title: "class",
|
|
3003
2233
|
type: "string",
|
|
3004
|
-
description: ""
|
|
3005
|
-
|
|
3006
|
-
style: {
|
|
3007
|
-
title: "style",
|
|
3008
|
-
type: "string",
|
|
3009
|
-
description: ""
|
|
2234
|
+
description: "",
|
|
2235
|
+
$converter: "/converter/appearance.converter"
|
|
3010
2236
|
}
|
|
3011
2237
|
}
|
|
3012
2238
|
};
|
|
@@ -3014,280 +2240,250 @@ class Kt extends ee {
|
|
|
3014
2240
|
getEventPropConfig(e) {
|
|
3015
2241
|
const t = [
|
|
3016
2242
|
{
|
|
3017
|
-
label: "
|
|
2243
|
+
label: "onClick",
|
|
3018
2244
|
name: "点击事件"
|
|
3019
2245
|
}
|
|
3020
|
-
],
|
|
3021
|
-
|
|
2246
|
+
], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
|
|
2247
|
+
p[s.viewModelId] = {
|
|
3022
2248
|
type: "events-editor",
|
|
3023
2249
|
editor: {
|
|
3024
|
-
initialData:
|
|
2250
|
+
initialData: i
|
|
3025
2251
|
}
|
|
3026
2252
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3027
2253
|
title: "事件",
|
|
3028
2254
|
hideTitle: !0,
|
|
3029
|
-
properties:
|
|
2255
|
+
properties: p,
|
|
3030
2256
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3031
2257
|
refreshPanelAfterChanged: !0,
|
|
3032
2258
|
tabId: "commands",
|
|
3033
2259
|
tabName: "交互",
|
|
3034
|
-
setPropertyRelates(
|
|
3035
|
-
const
|
|
3036
|
-
delete e[
|
|
2260
|
+
setPropertyRelates(u, y) {
|
|
2261
|
+
const w = u.propertyValue;
|
|
2262
|
+
delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
|
|
3037
2263
|
}
|
|
3038
2264
|
};
|
|
3039
2265
|
}
|
|
3040
2266
|
}
|
|
3041
|
-
function
|
|
3042
|
-
|
|
3043
|
-
const t = M(!1), r = M(!1);
|
|
3044
|
-
let u = !1, h = !1;
|
|
3045
|
-
function g(w) {
|
|
2267
|
+
function Gt(n, e) {
|
|
2268
|
+
function t(y) {
|
|
3046
2269
|
return !1;
|
|
3047
2270
|
}
|
|
3048
|
-
function
|
|
3049
|
-
}
|
|
3050
|
-
function S() {
|
|
3051
|
-
return "";
|
|
3052
|
-
}
|
|
3053
|
-
function y(w, j) {
|
|
3054
|
-
return j.text = w.label, j;
|
|
3055
|
-
}
|
|
3056
|
-
function T(w, j, I) {
|
|
3057
|
-
const P = n.schema;
|
|
3058
|
-
if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3059
|
-
const v = String(w.innerText), f = U("form-group");
|
|
3060
|
-
return f.editor = I, f.label = v, f;
|
|
3061
|
-
}
|
|
3062
|
-
return I;
|
|
3063
|
-
}
|
|
3064
|
-
function l() {
|
|
2271
|
+
function s() {
|
|
3065
2272
|
return !1;
|
|
3066
2273
|
}
|
|
3067
2274
|
function i() {
|
|
3068
|
-
return !
|
|
2275
|
+
return !0;
|
|
3069
2276
|
}
|
|
3070
|
-
function
|
|
2277
|
+
function p() {
|
|
3071
2278
|
return !1;
|
|
3072
2279
|
}
|
|
3073
|
-
function
|
|
3074
|
-
|
|
3075
|
-
}
|
|
3076
|
-
function C(w) {
|
|
3077
|
-
let j;
|
|
2280
|
+
function u(y) {
|
|
2281
|
+
let w;
|
|
3078
2282
|
switch (n.schema.type) {
|
|
3079
2283
|
case "tab-toolbar-item":
|
|
3080
|
-
|
|
2284
|
+
w = new Ht(y, e);
|
|
3081
2285
|
break;
|
|
3082
2286
|
default:
|
|
3083
|
-
|
|
2287
|
+
w = new zt(y, e);
|
|
3084
2288
|
}
|
|
3085
|
-
return
|
|
2289
|
+
return w.getPropertyConfig(n.schema);
|
|
3086
2290
|
}
|
|
3087
2291
|
return {
|
|
3088
|
-
canAccepts:
|
|
3089
|
-
|
|
2292
|
+
canAccepts: t,
|
|
2293
|
+
checkCanMoveComponent: s,
|
|
3090
2294
|
checkCanDeleteComponent: i,
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
hideNestedPaddingInDesginerView: c,
|
|
3094
|
-
onAcceptNewChildElement: T,
|
|
3095
|
-
onAcceptMovedChildElement: D,
|
|
3096
|
-
onResolveNewComponentSchema: y,
|
|
3097
|
-
getPropsConfig: C,
|
|
3098
|
-
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3099
|
-
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
2295
|
+
checkCanAddComponent: p,
|
|
2296
|
+
getPropsConfig: u
|
|
3100
2297
|
};
|
|
3101
2298
|
}
|
|
3102
|
-
const
|
|
2299
|
+
const Be = /* @__PURE__ */ U({
|
|
3103
2300
|
name: "FResponseToolbarItemDesign",
|
|
3104
|
-
props:
|
|
2301
|
+
props: Me,
|
|
3105
2302
|
emits: ["Click"],
|
|
3106
2303
|
setup(n, e) {
|
|
3107
|
-
|
|
3108
|
-
const t =
|
|
2304
|
+
S(), S();
|
|
2305
|
+
const t = S(n.alignment), s = {
|
|
3109
2306
|
id: "__more_buttons__",
|
|
3110
2307
|
text: "More"
|
|
3111
|
-
},
|
|
3112
|
-
|
|
3113
|
-
const
|
|
2308
|
+
}, i = S(new z(s));
|
|
2309
|
+
N(() => i.value.children.length > 0);
|
|
2310
|
+
const p = S(), u = V("designer-host-service"), y = V("design-item-context"), w = Gt(y, u), h = Ce(p, y, w);
|
|
3114
2311
|
V("toolbar-item-handler", () => {
|
|
3115
2312
|
}), H(() => {
|
|
3116
|
-
|
|
3117
|
-
}), e.expose(
|
|
3118
|
-
function
|
|
3119
|
-
const
|
|
2313
|
+
p.value.componentInstance = h;
|
|
2314
|
+
}), e.expose(h.value);
|
|
2315
|
+
function b() {
|
|
2316
|
+
const f = {
|
|
3120
2317
|
"f-icon": !0
|
|
3121
|
-
},
|
|
3122
|
-
return Y(
|
|
2318
|
+
}, v = n.icon ? n.icon.trim() : "";
|
|
2319
|
+
return Y(f, v);
|
|
3123
2320
|
}
|
|
3124
2321
|
function l() {
|
|
3125
2322
|
return !!(n.icon && n.icon.trim());
|
|
3126
2323
|
}
|
|
3127
|
-
function
|
|
3128
|
-
const
|
|
2324
|
+
function c() {
|
|
2325
|
+
const f = {
|
|
3129
2326
|
btn: !0,
|
|
3130
2327
|
"f-rt-btn": !0,
|
|
3131
2328
|
"f-btn-ml": t.value === "right",
|
|
3132
2329
|
"f-btn-mr": t.value === "left",
|
|
3133
|
-
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
2330
|
+
"btn-icontext": !!(n.icon && n.icon.trim()),
|
|
2331
|
+
disabled: n.disabled === !0
|
|
3134
2332
|
};
|
|
3135
|
-
return Y(
|
|
2333
|
+
return Y(f, n.class);
|
|
3136
2334
|
}
|
|
3137
|
-
return
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
ref: h,
|
|
3141
|
-
"data-dragref": `${D.schema.id}-container`,
|
|
2335
|
+
return () => g("div", {
|
|
2336
|
+
ref: p,
|
|
2337
|
+
"data-dragref": `${y.schema.id}-container`,
|
|
3142
2338
|
class: "farris-component position-relative",
|
|
3143
2339
|
style: "display:inline-block!important;"
|
|
3144
|
-
}, [
|
|
2340
|
+
}, [g("button", {
|
|
3145
2341
|
type: "button",
|
|
3146
|
-
class:
|
|
2342
|
+
class: c(),
|
|
3147
2343
|
id: n.id
|
|
3148
|
-
}, [l() &&
|
|
3149
|
-
class:
|
|
2344
|
+
}, [l() && g("i", {
|
|
2345
|
+
class: b()
|
|
3150
2346
|
}, null), n.text])]);
|
|
3151
2347
|
}
|
|
3152
|
-
}),
|
|
2348
|
+
}), Ie = /* @__PURE__ */ U({
|
|
3153
2349
|
name: "FResponseToolbarDesign",
|
|
3154
|
-
props:
|
|
2350
|
+
props: At,
|
|
3155
2351
|
emits: ["Click"],
|
|
3156
2352
|
setup(n, e) {
|
|
3157
|
-
const t =
|
|
3158
|
-
let
|
|
3159
|
-
const
|
|
2353
|
+
const t = S(n.items);
|
|
2354
|
+
let s = new Array(t.value.length).fill(S());
|
|
2355
|
+
const i = S(), p = S(), u = S(n.alignment), y = {
|
|
3160
2356
|
id: "__more_buttons__",
|
|
3161
2357
|
text: "More"
|
|
3162
|
-
},
|
|
3163
|
-
|
|
3164
|
-
const
|
|
2358
|
+
}, w = S(new z(y)), h = xe();
|
|
2359
|
+
N(() => w.value.children.length > 0);
|
|
2360
|
+
const b = S(), l = V("designer-host-service"), c = V("design-item-context"), f = Lt(c, l), v = Ce(b, c, f);
|
|
3165
2361
|
V("toolbar-item-handler", () => {
|
|
3166
2362
|
}), H(() => {
|
|
3167
|
-
|
|
3168
|
-
}), e.expose(
|
|
3169
|
-
const
|
|
2363
|
+
b.value.componentInstance = v;
|
|
2364
|
+
}), e.expose(v.value);
|
|
2365
|
+
const k = N(() => Y({
|
|
3170
2366
|
"f-toolbar": !0,
|
|
3171
2367
|
"f-response-toolbar": !0,
|
|
3172
2368
|
"position-relative": !0
|
|
3173
|
-
}, n.customClass)),
|
|
2369
|
+
}, n.customClass)), A = N(() => ({
|
|
3174
2370
|
"d-flex": !0,
|
|
3175
2371
|
"flex-nowrap": !0,
|
|
3176
|
-
"justify-content-end":
|
|
3177
|
-
"justify-content-start":
|
|
2372
|
+
"justify-content-end": u.value === "right",
|
|
2373
|
+
"justify-content-start": u.value === "left"
|
|
3178
2374
|
})), {
|
|
3179
|
-
renderToolbarDropdown:
|
|
3180
|
-
clearAllDropDown:
|
|
3181
|
-
} = Nt(n,
|
|
3182
|
-
function
|
|
3183
|
-
t.value.filter((
|
|
3184
|
-
|
|
3185
|
-
}),
|
|
2375
|
+
renderToolbarDropdown: $,
|
|
2376
|
+
clearAllDropDown: _
|
|
2377
|
+
} = Nt(n, h, v);
|
|
2378
|
+
function T() {
|
|
2379
|
+
t.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
|
|
2380
|
+
d.expanded = !1;
|
|
2381
|
+
}), w.value.expanded = !1, _();
|
|
3186
2382
|
}
|
|
3187
|
-
const
|
|
3188
|
-
function
|
|
3189
|
-
const
|
|
3190
|
-
let o =
|
|
3191
|
-
const a = Array.from(
|
|
2383
|
+
const B = /* @__PURE__ */ new Map(), P = [];
|
|
2384
|
+
function x(d) {
|
|
2385
|
+
const r = p.value;
|
|
2386
|
+
let o = d;
|
|
2387
|
+
const a = Array.from(r.children), m = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
3192
2388
|
if (m) {
|
|
3193
|
-
const
|
|
2389
|
+
const j = m.computedStyleMap().get("margin-left"), F = m.computedStyleMap().get("margin-right"), W = (j ? j.value : 0) + m.getBoundingClientRect().width + (F ? F.value : 0);
|
|
3194
2390
|
o -= W;
|
|
3195
2391
|
}
|
|
3196
|
-
const
|
|
3197
|
-
for (const
|
|
3198
|
-
const
|
|
3199
|
-
o <
|
|
3200
|
-
id:
|
|
3201
|
-
width:
|
|
3202
|
-
})) : o -=
|
|
2392
|
+
const M = a.filter((j) => j.id !== "__more_buttons__");
|
|
2393
|
+
for (const j of M) {
|
|
2394
|
+
const F = j.computedStyleMap().get("margin-left"), W = j.computedStyleMap().get("margin-right"), G = (F ? F.value : 0) + j.getBoundingClientRect().width + (W ? W.value : 0);
|
|
2395
|
+
o < G ? (B.set(j.id, !0), P.push({
|
|
2396
|
+
id: j.id,
|
|
2397
|
+
width: G
|
|
2398
|
+
})) : o -= G;
|
|
3203
2399
|
}
|
|
3204
|
-
if (
|
|
3205
|
-
for (let
|
|
3206
|
-
const
|
|
3207
|
-
if (o >=
|
|
3208
|
-
o -=
|
|
2400
|
+
if (P.length)
|
|
2401
|
+
for (let j = P.length - 1; j >= 0; j--) {
|
|
2402
|
+
const F = P[j].width;
|
|
2403
|
+
if (o >= F)
|
|
2404
|
+
o -= F, B.delete(P[j].id), P.pop();
|
|
3209
2405
|
else
|
|
3210
2406
|
break;
|
|
3211
2407
|
}
|
|
3212
|
-
const
|
|
3213
|
-
|
|
3214
|
-
const
|
|
3215
|
-
|
|
2408
|
+
const D = Object.assign({}, w.value);
|
|
2409
|
+
D.children = [];
|
|
2410
|
+
const E = new z(D), L = t.value.reduce((j, F) => (B.has(F.id) && E.children.push(F), F.visible = !B.has(F.id), j.push(F), j), []);
|
|
2411
|
+
w.value = E, t.value = L;
|
|
3216
2412
|
}
|
|
3217
|
-
const
|
|
3218
|
-
if (
|
|
3219
|
-
const o =
|
|
3220
|
-
(o < m ||
|
|
2413
|
+
const C = new ResizeObserver((d) => {
|
|
2414
|
+
if (d.length) {
|
|
2415
|
+
const o = d[0].contentRect.width, m = p.value.getBoundingClientRect().width;
|
|
2416
|
+
(o < m || P.length) && x(o);
|
|
3221
2417
|
}
|
|
3222
2418
|
});
|
|
3223
2419
|
H(() => {
|
|
3224
|
-
const
|
|
3225
|
-
|
|
3226
|
-
}),
|
|
3227
|
-
|
|
3228
|
-
}),
|
|
2420
|
+
const d = i.value;
|
|
2421
|
+
C.observe(d), document.body.addEventListener("click", T);
|
|
2422
|
+
}), ye(() => {
|
|
2423
|
+
C.disconnect(), document.body.removeEventListener("click", T);
|
|
2424
|
+
}), q(() => n.items, () => {
|
|
3229
2425
|
t.value = n.items;
|
|
3230
2426
|
}, {
|
|
3231
2427
|
deep: !0
|
|
3232
|
-
}),
|
|
3233
|
-
|
|
2428
|
+
}), q(t, (d) => {
|
|
2429
|
+
s = new Array(t.value.length).fill(S());
|
|
3234
2430
|
});
|
|
3235
|
-
function
|
|
3236
|
-
|
|
2431
|
+
function I(d, r, o, a) {
|
|
2432
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", d, r, o, a);
|
|
3237
2433
|
}
|
|
3238
|
-
function
|
|
3239
|
-
const
|
|
3240
|
-
|
|
2434
|
+
function O() {
|
|
2435
|
+
const d = p.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
2436
|
+
d == null || d.classList.remove("dgComponentSelected"), d == null || d.classList.remove("dgComponentFocused");
|
|
3241
2437
|
}
|
|
3242
|
-
return () =>
|
|
3243
|
-
ref:
|
|
3244
|
-
"data-dragref": `${
|
|
3245
|
-
class:
|
|
3246
|
-
}, [
|
|
3247
|
-
ref:
|
|
3248
|
-
class:
|
|
3249
|
-
}, [
|
|
3250
|
-
ref:
|
|
2438
|
+
return () => g("div", {
|
|
2439
|
+
ref: b,
|
|
2440
|
+
"data-dragref": `${c.schema.id}-container`,
|
|
2441
|
+
class: k.value
|
|
2442
|
+
}, [g("div", {
|
|
2443
|
+
ref: i,
|
|
2444
|
+
class: A.value
|
|
2445
|
+
}, [g("div", {
|
|
2446
|
+
ref: p,
|
|
3251
2447
|
class: "d-inline-block f-response-content",
|
|
3252
2448
|
style: "white-space: nowrap;"
|
|
3253
|
-
}, [t.value.map((
|
|
3254
|
-
ref: r
|
|
2449
|
+
}, [t.value.map((d, r) => g(Ee, {
|
|
2450
|
+
ref: s[r],
|
|
3255
2451
|
class: "p-0 display-inline-block",
|
|
3256
|
-
modelValue:
|
|
3257
|
-
"onUpdate:modelValue": (o) =>
|
|
2452
|
+
modelValue: d,
|
|
2453
|
+
"onUpdate:modelValue": (o) => d = o,
|
|
3258
2454
|
canMove: !0,
|
|
3259
2455
|
childType: "response-toolbar-item",
|
|
3260
2456
|
childLabel: "按钮",
|
|
3261
2457
|
contentKey: "buttons",
|
|
3262
2458
|
componentId: n.componentId,
|
|
3263
|
-
id:
|
|
2459
|
+
id: d.id,
|
|
3264
2460
|
style: "padding:0 !important;display:inline-block",
|
|
3265
|
-
onSelectionChange:
|
|
3266
|
-
onRemoveComponent:
|
|
2461
|
+
onSelectionChange: I,
|
|
2462
|
+
onRemoveComponent: O
|
|
3267
2463
|
}, {
|
|
3268
2464
|
default: () => {
|
|
3269
2465
|
var o;
|
|
3270
|
-
return [
|
|
3271
|
-
id:
|
|
3272
|
-
|
|
3273
|
-
text:
|
|
3274
|
-
icon:
|
|
3275
|
-
class: ((o =
|
|
2466
|
+
return [g(Be, {
|
|
2467
|
+
id: d.id,
|
|
2468
|
+
disabled: d.disabled,
|
|
2469
|
+
text: d.text,
|
|
2470
|
+
icon: d.icon,
|
|
2471
|
+
class: ((o = d.appearance) == null ? void 0 : o.class) || "btn-secondary",
|
|
3276
2472
|
alignment: n.alignment || "right",
|
|
3277
2473
|
componentId: n.componentId
|
|
3278
2474
|
}, null)];
|
|
3279
2475
|
}
|
|
3280
2476
|
}))])])]);
|
|
3281
2477
|
}
|
|
3282
|
-
}),
|
|
2478
|
+
}), me = ce;
|
|
3283
2479
|
Z.register = (n, e, t) => {
|
|
3284
|
-
n["response-toolbar"] = Z, e["response-toolbar"] =
|
|
2480
|
+
n["response-toolbar"] = Z, e["response-toolbar"] = ce;
|
|
3285
2481
|
};
|
|
3286
2482
|
Z.registerDesigner = (n, e, t) => {
|
|
3287
|
-
n["response-toolbar"] =
|
|
2483
|
+
n["response-toolbar"] = Ie, e["response-toolbar"] = ce, n["response-toolbar-item"] = Be, e["response-toolbar-item"] = Ot;
|
|
3288
2484
|
};
|
|
3289
|
-
|
|
3290
|
-
const
|
|
2485
|
+
Ve(Z);
|
|
2486
|
+
const Jt = {
|
|
3291
2487
|
id: { type: String, default: "" },
|
|
3292
2488
|
componentId: { type: String, default: "" },
|
|
3293
2489
|
type: { type: String, default: "" },
|
|
@@ -3302,103 +2498,104 @@ const tn = {
|
|
|
3302
2498
|
*/
|
|
3303
2499
|
modelValue: { type: Object },
|
|
3304
2500
|
ignore: { type: Boolean, default: !1 }
|
|
3305
|
-
},
|
|
2501
|
+
}, he = /* @__PURE__ */ U({
|
|
3306
2502
|
name: "FDesignerTemplateItem",
|
|
3307
|
-
props:
|
|
2503
|
+
props: Jt,
|
|
3308
2504
|
emits: ["selectionChange"],
|
|
3309
2505
|
setup(n, e) {
|
|
3310
|
-
const t =
|
|
2506
|
+
const t = S(), s = N(() => ({
|
|
3311
2507
|
"farris-component": !0
|
|
3312
2508
|
}));
|
|
3313
|
-
function
|
|
3314
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
3315
|
-
const
|
|
3316
|
-
if (
|
|
3317
|
-
const
|
|
3318
|
-
|
|
2509
|
+
function i(p) {
|
|
2510
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")), p && (p.preventDefault(), p.stopPropagation());
|
|
2511
|
+
const u = t.value;
|
|
2512
|
+
if (u) {
|
|
2513
|
+
const y = document.getElementsByClassName("dgComponentSelected");
|
|
2514
|
+
y && y.length === 1 && y[0] === t.value || (Array.from(y).forEach((h) => h.classList.remove("dgComponentSelected")), u.classList.add("dgComponentFocused"));
|
|
3319
2515
|
}
|
|
3320
2516
|
X.value++;
|
|
3321
2517
|
}
|
|
3322
|
-
return () =>
|
|
2518
|
+
return () => g("div", {
|
|
3323
2519
|
id: `${n.id}-design-item`,
|
|
3324
2520
|
ref: t,
|
|
3325
|
-
class:
|
|
3326
|
-
onClick:
|
|
2521
|
+
class: s.value,
|
|
2522
|
+
onClick: i
|
|
3327
2523
|
}, [e.slots.default && e.slots.default()]);
|
|
3328
2524
|
}
|
|
3329
|
-
}),
|
|
2525
|
+
}), Qt = /* @__PURE__ */ U({
|
|
3330
2526
|
name: "FPageHeaderDesign",
|
|
3331
2527
|
props: st,
|
|
3332
2528
|
emits: ["Click"],
|
|
3333
2529
|
setup(n, e) {
|
|
3334
|
-
const t =
|
|
2530
|
+
const t = S(), s = V("designer-host-service"), i = V("design-item-context"), p = lt(i.schema, s), u = it(t, i, p), y = S(i.schema.toolbar || {
|
|
3335
2531
|
type: "response-toolbar",
|
|
3336
2532
|
buttons: []
|
|
3337
|
-
}),
|
|
2533
|
+
}), w = S(me(y.value));
|
|
3338
2534
|
H(() => {
|
|
3339
|
-
t.value.componentInstance =
|
|
3340
|
-
}),
|
|
3341
|
-
|
|
2535
|
+
t.value.componentInstance = u;
|
|
2536
|
+
}), q(() => i.schema.toolbar, () => {
|
|
2537
|
+
y.value = i.schema.toolbar || {
|
|
3342
2538
|
type: "response-toolbar",
|
|
3343
2539
|
buttons: []
|
|
3344
|
-
},
|
|
2540
|
+
}, w.value = me(y.value);
|
|
3345
2541
|
}, {
|
|
3346
2542
|
deep: !0
|
|
3347
2543
|
});
|
|
3348
|
-
const
|
|
3349
|
-
function
|
|
3350
|
-
|
|
2544
|
+
const h = N(() => [...w.value.items]);
|
|
2545
|
+
function b(l, c, f, v) {
|
|
2546
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", l, c, f, v);
|
|
3351
2547
|
}
|
|
3352
|
-
return e.expose(
|
|
2548
|
+
return e.expose(u.value), () => g("div", {
|
|
3353
2549
|
ref: t
|
|
3354
|
-
}, [
|
|
2550
|
+
}, [g("nav", {
|
|
3355
2551
|
class: "f-page-header-base"
|
|
3356
|
-
}, [
|
|
2552
|
+
}, [g("div", {
|
|
3357
2553
|
class: "f-title"
|
|
3358
|
-
}, [
|
|
3359
|
-
default: () => [
|
|
2554
|
+
}, [g(he, null, {
|
|
2555
|
+
default: () => [g("span", {
|
|
3360
2556
|
class: "f-title-icon f-text-orna-manage"
|
|
3361
|
-
}, [
|
|
2557
|
+
}, [g("i", {
|
|
3362
2558
|
class: n.icon
|
|
3363
2559
|
}, null)])]
|
|
3364
|
-
}),
|
|
3365
|
-
default: () => [
|
|
2560
|
+
}), g(he, null, {
|
|
2561
|
+
default: () => [g("h4", {
|
|
3366
2562
|
class: "f-title-text"
|
|
3367
2563
|
}, [n.title])]
|
|
3368
|
-
})]),
|
|
2564
|
+
})]), g(Ee, {
|
|
3369
2565
|
class: "col-6 text-right",
|
|
3370
|
-
modelValue:
|
|
3371
|
-
"onUpdate:modelValue": (l) =>
|
|
2566
|
+
modelValue: y.value,
|
|
2567
|
+
"onUpdate:modelValue": (l) => y.value = l,
|
|
3372
2568
|
canAdd: !0,
|
|
3373
2569
|
childType: "response-toolbar-item",
|
|
3374
2570
|
childLabel: "按钮",
|
|
3375
2571
|
contentKey: "buttons",
|
|
3376
|
-
id:
|
|
2572
|
+
id: y.value.id,
|
|
3377
2573
|
componentId: n.componentId,
|
|
3378
|
-
onSelectionChange:
|
|
2574
|
+
onSelectionChange: b
|
|
3379
2575
|
}, {
|
|
3380
|
-
default: () => [
|
|
2576
|
+
default: () => [g(Ie, {
|
|
3381
2577
|
customClass: "w-100",
|
|
3382
|
-
items:
|
|
2578
|
+
items: h.value,
|
|
3383
2579
|
componentId: n.componentId
|
|
3384
2580
|
}, null)]
|
|
3385
2581
|
})])]);
|
|
3386
2582
|
}
|
|
3387
|
-
}),
|
|
2583
|
+
}), nn = {
|
|
3388
2584
|
install(n) {
|
|
3389
|
-
n.component(
|
|
2585
|
+
n.component(ne.name, ne);
|
|
3390
2586
|
},
|
|
3391
|
-
register(n, e, t,
|
|
3392
|
-
n["page-header"] =
|
|
2587
|
+
register(n, e, t, s) {
|
|
2588
|
+
n["page-header"] = ne, e["page-header"] = pe, s["page-header"] = { eventHandlerResolver: rt };
|
|
3393
2589
|
},
|
|
3394
2590
|
registerDesigner(n, e, t) {
|
|
3395
|
-
n["page-header"] =
|
|
2591
|
+
n["page-header"] = Qt, e["page-header"] = pe;
|
|
3396
2592
|
}
|
|
3397
2593
|
};
|
|
3398
2594
|
export {
|
|
3399
|
-
|
|
3400
|
-
|
|
2595
|
+
ne as PageHeader,
|
|
2596
|
+
nn as default,
|
|
2597
|
+
rt as eventHandlerResolver,
|
|
3401
2598
|
st as pageHeaderDesignerProps,
|
|
3402
|
-
|
|
3403
|
-
|
|
2599
|
+
ae as pageHeaderProps,
|
|
2600
|
+
pe as propsResolver
|
|
3404
2601
|
};
|