@farris/ui-vue 1.2.7 → 1.2.9
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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,109 +1,107 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var O = (n, e, t) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title: t } = n,
|
|
12
|
-
return
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var $e = (n, e, t) => e in n ? Oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var O = (n, e, t) => $e(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as z, ref as M, computed as F, watch as G, createVNode as b, createTextVNode as Q, getCurrentInstance as ve, onMounted as H, onUnmounted as ie, inject as V, provide as Ne, onBeforeUnmount as _e, withModifiers as Fe } from "vue";
|
|
5
|
+
import { cloneDeep as Le } from "lodash-es";
|
|
6
|
+
import Ve from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { getCustomClass as Y, withInstall as We } from "../common/index.esm.js";
|
|
8
|
+
import { useDesignerInnerComponent as Ce } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const ae = {}, we = {};
|
|
10
|
+
function ce(n) {
|
|
11
|
+
const { properties: e, title: t, ignore: r } = n, u = r && Array.isArray(r), h = Object.keys(e).reduce((g, D) => ((!u || !r.find((S) => S == D)) && (g[D] = e[D].type === "object" && e[D].properties ? ce(e[D]) : Le(e[D].default)), g), {});
|
|
12
|
+
return (!u || !r.find((g) => g == "id")) && (h.id = `${t}-${Date.now()}`), h;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
return
|
|
14
|
+
function U(n, e = {}, t) {
|
|
15
|
+
const r = ae[n];
|
|
16
|
+
if (r) {
|
|
17
|
+
let u = ce(r);
|
|
18
|
+
const h = we[n];
|
|
19
|
+
return u = h ? h({ getSchemaByType: U }, u, e, t) : u, u;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
-
return Object.keys(n).reduce((
|
|
23
|
+
function Ue(n, e) {
|
|
24
|
+
const t = ce(e);
|
|
25
|
+
return Object.keys(n).reduce((r, u) => (r[u] && typeof r[u] == "object" ? Object.assign(r[u], n[u]) : r[u] = n[u], r), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(n).filter((
|
|
29
|
-
if (e.has(
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
27
|
+
function qe(n, e) {
|
|
28
|
+
return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
|
|
29
|
+
if (e.has(u)) {
|
|
30
|
+
const h = e.get(u);
|
|
31
|
+
if (typeof h == "string")
|
|
32
|
+
r[h] = n[u];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
34
|
+
const g = h(u, n[u], n);
|
|
35
|
+
Object.assign(r, g);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
r[u] = n[u];
|
|
39
|
+
return r;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
42
|
function He(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
43
|
+
const r = Ue(n, e);
|
|
44
|
+
return qe(r, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function e(
|
|
46
|
+
function ze(n = {}) {
|
|
47
|
+
function e(y, T, l, i) {
|
|
48
48
|
if (typeof l == "number")
|
|
49
|
-
return
|
|
49
|
+
return i[y].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 d = Object.keys(l)[0], c = l[d];
|
|
52
|
+
if (d === "not")
|
|
53
|
+
return Number(i[y].length) !== Number(c);
|
|
54
|
+
if (d === "moreThan")
|
|
55
|
+
return Number(i[y].length) >= Number(c);
|
|
56
|
+
if (d === "lessThan")
|
|
57
|
+
return Number(i[y].length) <= Number(c);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return
|
|
61
|
+
function t(y, T, l, i) {
|
|
62
|
+
return i[y] && i[y].propertyValue && String(i[y].propertyValue.value) === String(l);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const r = /* @__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 T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param:
|
|
72
|
-
if (
|
|
73
|
-
return { target: l, operator: "length", param: null, value: T[
|
|
74
|
-
const
|
|
75
|
-
return { target: l, operator: "getProperty", param:
|
|
68
|
+
Object.keys(n).reduce((y, T) => (y.set(T, n[T]), y), r);
|
|
69
|
+
function u(y, T) {
|
|
70
|
+
const l = y;
|
|
71
|
+
return typeof T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param: y, value: !!T }] : typeof T == "object" ? Object.keys(T).map((i) => {
|
|
72
|
+
if (i === "length")
|
|
73
|
+
return { target: l, operator: "length", param: null, value: T[i] };
|
|
74
|
+
const d = i, c = T[i];
|
|
75
|
+
return { target: l, operator: "getProperty", param: d, value: c };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const
|
|
81
|
-
return l.push(...
|
|
78
|
+
function h(y) {
|
|
79
|
+
return Object.keys(y).reduce((l, i) => {
|
|
80
|
+
const d = u(i, y[i]);
|
|
81
|
+
return l.push(...d), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const l =
|
|
87
|
-
return l && l(
|
|
84
|
+
function g(y, T) {
|
|
85
|
+
if (r.has(y.operator)) {
|
|
86
|
+
const l = r.get(y.operator);
|
|
87
|
+
return l && l(y.target, y.param, y.value, T) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function D(y, T) {
|
|
92
|
+
return h(y).reduce((d, c) => d && g(c, T), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const l = Object.keys(
|
|
96
|
-
return
|
|
94
|
+
function S(y, T) {
|
|
95
|
+
const l = Object.keys(y), i = l.includes("allOf"), d = l.includes("anyOf"), c = i || d, j = (c ? y[c ? i ? "allOf" : "anyOf" : "allOf"] : [y]).map((P) => D(P, T));
|
|
96
|
+
return i ? !j.includes(!1) : j.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: S };
|
|
99
99
|
}
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
100
|
+
const K = {
|
|
101
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
103
102
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
104
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
103
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
105
104
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
106
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
107
105
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
108
106
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
109
107
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -114,118 +112,47 @@ const E = {
|
|
|
114
112
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
115
113
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
116
114
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
121
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
122
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
116
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
117
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
123
118
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
124
|
-
|
|
125
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
126
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
127
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
119
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
128
120
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
129
121
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
130
|
-
|
|
131
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
122
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
132
123
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
133
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
134
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
135
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
136
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
137
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
138
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
139
124
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
140
125
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
141
126
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
142
|
-
|
|
143
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
144
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
145
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
146
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
147
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
148
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
127
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
149
128
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
157
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
158
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
159
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
160
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
161
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
162
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
163
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
164
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
165
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
166
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
167
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
168
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
169
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
170
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
171
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
172
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
173
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
174
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
175
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
176
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
177
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
178
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
129
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
130
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
131
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
132
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
133
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
134
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
179
135
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
189
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
190
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
191
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
192
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
193
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
194
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
195
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
196
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
197
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
198
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
199
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
200
|
-
/** 查询类 start */
|
|
201
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
202
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
203
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
204
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
205
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
206
|
-
/** 查询类 end */
|
|
207
|
-
/** 审批类 start */
|
|
208
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
209
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
210
|
-
/** 审批类 end */
|
|
211
|
-
}, we = {}, Ge = {};
|
|
212
|
-
qe();
|
|
213
|
-
function ce(n, e, t = /* @__PURE__ */ new Map(), s = (h, P, k) => P, p = {}, u = (h) => h) {
|
|
214
|
-
return ie[e.title] = e, Ce[e.title] = s, we[e.title] = p, Ge[e.title] = u, (h = {}) => {
|
|
215
|
-
const P = He(h, e, t), k = Object.keys(n).reduce((g, T) => (g[T] = n[T].default, g), {});
|
|
216
|
-
return Object.assign(k, P);
|
|
136
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
138
|
+
}, Te = {}, Ge = {};
|
|
139
|
+
ze();
|
|
140
|
+
function le(n, e, t = /* @__PURE__ */ new Map(), r = (g, D, S) => D, u = {}, h = (g) => g) {
|
|
141
|
+
return ae[e.title] = e, we[e.title] = r, Te[e.title] = u, Ge[e.title] = h, (g = {}) => {
|
|
142
|
+
const D = He(g, e, t), S = Object.keys(n).reduce((y, T) => (y[T] = n[T].default, y), {});
|
|
143
|
+
return Object.assign(S, D);
|
|
217
144
|
};
|
|
218
145
|
}
|
|
219
|
-
function
|
|
146
|
+
function Pe(n, e) {
|
|
220
147
|
return { customClass: e.class, customStyle: e.style };
|
|
221
148
|
}
|
|
222
|
-
function
|
|
149
|
+
function Je(n, e) {
|
|
223
150
|
return { buttons: e.buttons };
|
|
224
151
|
}
|
|
225
|
-
const
|
|
226
|
-
["appearance",
|
|
227
|
-
["toolbar",
|
|
228
|
-
]),
|
|
152
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
153
|
+
["appearance", Pe],
|
|
154
|
+
["toolbar", Je]
|
|
155
|
+
]), 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 = {
|
|
229
156
|
id: {
|
|
230
157
|
description: "The unique identifier for a Page Header",
|
|
231
158
|
type: "string"
|
|
@@ -333,18 +260,18 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
333
260
|
type: "boolean",
|
|
334
261
|
default: !1
|
|
335
262
|
}
|
|
336
|
-
},
|
|
337
|
-
$schema:
|
|
338
|
-
$id:
|
|
339
|
-
title:
|
|
340
|
-
description:
|
|
341
|
-
type:
|
|
342
|
-
properties:
|
|
263
|
+
}, nt = {
|
|
264
|
+
$schema: Xe,
|
|
265
|
+
$id: Ye,
|
|
266
|
+
title: Ze,
|
|
267
|
+
description: Ke,
|
|
268
|
+
type: et,
|
|
269
|
+
properties: tt
|
|
343
270
|
};
|
|
344
|
-
function
|
|
271
|
+
function ot(n, e, t) {
|
|
345
272
|
return e.title = "标题", e;
|
|
346
273
|
}
|
|
347
|
-
const
|
|
274
|
+
const pe = {
|
|
348
275
|
/** 组件自定义样式 */
|
|
349
276
|
customClass: { type: String, default: "" },
|
|
350
277
|
/** 是否显示图标 */
|
|
@@ -373,71 +300,71 @@ const le = {
|
|
|
373
300
|
prePaginationDisabled: { type: Boolean, default: !0 },
|
|
374
301
|
/** 向后翻页是否禁用 */
|
|
375
302
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
376
|
-
}, st = Object.assign({},
|
|
303
|
+
}, st = Object.assign({}, pe, {
|
|
377
304
|
componentId: { type: String, default: "" }
|
|
378
|
-
}),
|
|
305
|
+
}), ge = le(pe, nt, Qe, ot), oe = /* @__PURE__ */ z({
|
|
379
306
|
name: "FPageHeader",
|
|
380
|
-
props:
|
|
307
|
+
props: pe,
|
|
381
308
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
382
309
|
setup(n, e) {
|
|
383
|
-
const t =
|
|
384
|
-
e.emit("Click",
|
|
310
|
+
const t = M(n.buttons), r = (P, A) => {
|
|
311
|
+
e.emit("Click", P, A);
|
|
385
312
|
};
|
|
386
|
-
function
|
|
387
|
-
|
|
313
|
+
function u(P, A) {
|
|
314
|
+
P && A && A.split(" ").reduce((v, f) => (v[f] = !0, v), P);
|
|
388
315
|
}
|
|
389
|
-
const
|
|
390
|
-
const
|
|
316
|
+
const h = F(() => {
|
|
317
|
+
const P = {
|
|
391
318
|
"f-page-header": !0
|
|
392
319
|
};
|
|
393
|
-
return
|
|
394
|
-
}),
|
|
395
|
-
const
|
|
320
|
+
return u(P, n.customClass), P;
|
|
321
|
+
}), g = F(() => {
|
|
322
|
+
const P = {
|
|
396
323
|
"f-title-icon": !0
|
|
397
324
|
};
|
|
398
|
-
return
|
|
399
|
-
}),
|
|
400
|
-
const
|
|
325
|
+
return u(P, n.iconClass), P;
|
|
326
|
+
}), D = F(() => {
|
|
327
|
+
const P = {
|
|
401
328
|
"f-icon": !0
|
|
402
329
|
};
|
|
403
|
-
return
|
|
404
|
-
}),
|
|
405
|
-
const
|
|
330
|
+
return u(P, n.icon), P;
|
|
331
|
+
}), S = F(() => {
|
|
332
|
+
const P = {
|
|
406
333
|
"f-title": !0
|
|
407
334
|
};
|
|
408
|
-
return
|
|
409
|
-
}),
|
|
410
|
-
const
|
|
335
|
+
return u(P, n.titleContentClass), P;
|
|
336
|
+
}), y = F(() => {
|
|
337
|
+
const P = {
|
|
411
338
|
"f-content": !0
|
|
412
339
|
};
|
|
413
|
-
return
|
|
414
|
-
}), T =
|
|
415
|
-
const
|
|
340
|
+
return u(P, n.contentClass), P;
|
|
341
|
+
}), T = F(() => {
|
|
342
|
+
const P = {
|
|
416
343
|
"f-content": !0
|
|
417
344
|
};
|
|
418
|
-
return
|
|
419
|
-
}), l =
|
|
345
|
+
return u(P, n.downContentClass), P;
|
|
346
|
+
}), l = F(() => ({
|
|
420
347
|
"f-icon f-icon-arrow-w": !0,
|
|
421
348
|
"f-state-disabled": n.prePaginationDisabled
|
|
422
|
-
})),
|
|
349
|
+
})), i = F(() => ({
|
|
423
350
|
"f-icon f-icon-arrow-e": !0,
|
|
424
351
|
"f-state-disabled": n.nextPaginationDisabled
|
|
425
352
|
}));
|
|
426
|
-
function
|
|
427
|
-
n.prePaginationDisabled || e.emit("PrePaginationClick",
|
|
353
|
+
function d(P) {
|
|
354
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", P);
|
|
428
355
|
}
|
|
429
|
-
function
|
|
430
|
-
n.nextPaginationDisabled || e.emit("NextPaginationClick",
|
|
356
|
+
function c(P) {
|
|
357
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", P);
|
|
431
358
|
}
|
|
432
359
|
function C() {
|
|
433
360
|
return e.slots.titleContent ? b("div", {
|
|
434
|
-
class:
|
|
435
|
-
}, [
|
|
361
|
+
class: S.value
|
|
362
|
+
}, [Q(" "), e.slots.titleContent()]) : b("div", {
|
|
436
363
|
class: "f-title"
|
|
437
364
|
}, [n.showIcon && n.icon ? b("span", {
|
|
438
|
-
class:
|
|
365
|
+
class: g.value
|
|
439
366
|
}, [b("i", {
|
|
440
|
-
class:
|
|
367
|
+
class: D.value
|
|
441
368
|
}, null)]) : "", b("h4", {
|
|
442
369
|
class: "f-title-text"
|
|
443
370
|
}, [n.title]), n.subTitle ? b("h5", {
|
|
@@ -446,55 +373,55 @@ const le = {
|
|
|
446
373
|
class: "f-title-pagination"
|
|
447
374
|
}, [b("span", {
|
|
448
375
|
class: l.value,
|
|
449
|
-
onClick:
|
|
376
|
+
onClick: d
|
|
450
377
|
}, null), b("span", {
|
|
451
|
-
class:
|
|
452
|
-
onClick:
|
|
378
|
+
class: i.value,
|
|
379
|
+
onClick: c
|
|
453
380
|
}, null)]) : ""]);
|
|
454
381
|
}
|
|
455
382
|
function w() {
|
|
456
383
|
return e.slots.content ? b("div", {
|
|
457
|
-
class:
|
|
458
|
-
}, [
|
|
384
|
+
class: y.value
|
|
385
|
+
}, [Q(" "), e.slots.content()]) : "";
|
|
459
386
|
}
|
|
460
|
-
function
|
|
387
|
+
function j() {
|
|
461
388
|
if (n.buttons && n.buttons.length > 0)
|
|
462
|
-
return b(
|
|
389
|
+
return b(Ve, {
|
|
463
390
|
customClass: n.buttonClass,
|
|
464
391
|
items: t.value,
|
|
465
|
-
onClick:
|
|
392
|
+
onClick: r
|
|
466
393
|
}, null);
|
|
467
394
|
}
|
|
468
|
-
function
|
|
395
|
+
function I() {
|
|
469
396
|
return e.slots.downContent ? b("div", {
|
|
470
397
|
class: T.value
|
|
471
|
-
}, [
|
|
398
|
+
}, [Q(" "), e.slots.downContent()]) : "";
|
|
472
399
|
}
|
|
473
|
-
return
|
|
474
|
-
t.value =
|
|
400
|
+
return G(() => n.buttons, (P) => {
|
|
401
|
+
t.value = P;
|
|
475
402
|
}, {
|
|
476
403
|
deep: !0
|
|
477
404
|
}), () => b("div", {
|
|
478
|
-
class:
|
|
405
|
+
class: h.value
|
|
479
406
|
}, [b("nav", {
|
|
480
407
|
class: "f-page-header-base"
|
|
481
|
-
}, [C(), w(),
|
|
408
|
+
}, [C(), w(), j()]), I()]);
|
|
482
409
|
}
|
|
483
410
|
});
|
|
484
|
-
function
|
|
485
|
-
var
|
|
486
|
-
function
|
|
411
|
+
function rt(n, e, t) {
|
|
412
|
+
var $;
|
|
413
|
+
function r() {
|
|
487
414
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
488
415
|
}
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
function
|
|
416
|
+
r();
|
|
417
|
+
const u = t && t.getStyles && t.getStyles() || "", h = t && t.getDesignerClass && t.getDesignerClass() || "", g = M();
|
|
418
|
+
function D() {
|
|
492
419
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
493
420
|
}
|
|
494
|
-
function
|
|
421
|
+
function S() {
|
|
495
422
|
return !1;
|
|
496
423
|
}
|
|
497
|
-
function
|
|
424
|
+
function y() {
|
|
498
425
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
499
426
|
}
|
|
500
427
|
function T() {
|
|
@@ -505,136 +432,72 @@ function it(n, e, t) {
|
|
|
505
432
|
return null;
|
|
506
433
|
if (v.value.schema && v.value.schema.type === "component")
|
|
507
434
|
return v.value;
|
|
508
|
-
const
|
|
509
|
-
return
|
|
435
|
+
const f = M(v == null ? void 0 : v.value.parent), x = l(f);
|
|
436
|
+
return x || null;
|
|
510
437
|
}
|
|
511
|
-
function
|
|
512
|
-
const { componentInstance:
|
|
513
|
-
return !
|
|
438
|
+
function i(v = e) {
|
|
439
|
+
const { componentInstance: f, designerItemElementRef: x } = v;
|
|
440
|
+
return !f || !f.value ? null : f.value.canMove ? x : i(v.parent);
|
|
514
441
|
}
|
|
515
|
-
function
|
|
442
|
+
function d(v) {
|
|
516
443
|
return !!t && t.canAccepts(v);
|
|
517
444
|
}
|
|
518
|
-
function
|
|
445
|
+
function c() {
|
|
519
446
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
520
447
|
}
|
|
521
448
|
function C() {
|
|
522
449
|
}
|
|
523
|
-
function w(v,
|
|
524
|
-
|
|
450
|
+
function w(v, f) {
|
|
451
|
+
f && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(f);
|
|
525
452
|
}
|
|
526
|
-
function
|
|
527
|
-
const { componentType:
|
|
528
|
-
let
|
|
529
|
-
t && t.onResolveNewComponentSchema && (
|
|
530
|
-
const
|
|
531
|
-
return
|
|
453
|
+
function j(v, f) {
|
|
454
|
+
const { componentType: x } = v;
|
|
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;
|
|
532
459
|
}
|
|
533
|
-
function
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
let
|
|
537
|
-
t && t.onAcceptNewChildElement && (
|
|
538
|
-
const o =
|
|
539
|
-
return
|
|
460
|
+
function I(v, f) {
|
|
461
|
+
const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
|
|
462
|
+
p.parentComponentInstance = g.value;
|
|
463
|
+
let s = U(x, p);
|
|
464
|
+
t && t.onAcceptNewChildElement && (s = t.onAcceptNewChildElement(v, f, s));
|
|
465
|
+
const o = x.toLowerCase().replace("-", "_");
|
|
466
|
+
return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
540
467
|
}
|
|
541
|
-
function
|
|
468
|
+
function P(v) {
|
|
542
469
|
}
|
|
543
470
|
function A(...v) {
|
|
544
471
|
if (t && t.getPropsConfig)
|
|
545
472
|
return t.getPropsConfig(...v);
|
|
546
473
|
}
|
|
547
|
-
return
|
|
548
|
-
canMove:
|
|
549
|
-
canSelectParent:
|
|
550
|
-
canDelete:
|
|
474
|
+
return g.value = {
|
|
475
|
+
canMove: D(),
|
|
476
|
+
canSelectParent: S(),
|
|
477
|
+
canDelete: y(),
|
|
551
478
|
canNested: !T(),
|
|
552
479
|
contents: e == null ? void 0 : e.schema.contents,
|
|
553
480
|
elementRef: n,
|
|
554
|
-
parent: (
|
|
481
|
+
parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
|
|
555
482
|
schema: e == null ? void 0 : e.schema,
|
|
556
|
-
styles:
|
|
557
|
-
designerClass:
|
|
558
|
-
canAccepts:
|
|
483
|
+
styles: u,
|
|
484
|
+
designerClass: h,
|
|
485
|
+
canAccepts: d,
|
|
559
486
|
getBelongedComponentInstance: l,
|
|
560
|
-
getDraggableDesignItemElement:
|
|
561
|
-
getDraggingDisplayText:
|
|
487
|
+
getDraggableDesignItemElement: i,
|
|
488
|
+
getDraggingDisplayText: c,
|
|
562
489
|
getPropConfig: A,
|
|
563
490
|
getDragScopeElement: C,
|
|
564
491
|
onAcceptMovedChildElement: w,
|
|
565
|
-
onAcceptNewChildElement:
|
|
566
|
-
onChildElementMovedOut:
|
|
567
|
-
addNewChildComponentSchema:
|
|
568
|
-
updateDragAndDropRules:
|
|
569
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
570
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
571
|
-
},
|
|
492
|
+
onAcceptNewChildElement: I,
|
|
493
|
+
onChildElementMovedOut: P,
|
|
494
|
+
addNewChildComponentSchema: j,
|
|
495
|
+
updateDragAndDropRules: r,
|
|
496
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
497
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
|
|
498
|
+
}, g;
|
|
572
499
|
}
|
|
573
|
-
class
|
|
574
|
-
static getEditorTypesByMDataType(e) {
|
|
575
|
-
const t = this.fieldControlTypeMapping[e];
|
|
576
|
-
return t || [{ key: "", value: "" }];
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* <字段类型,可配置的控件类型列表>的映射
|
|
581
|
-
*/
|
|
582
|
-
O(Te, "fieldControlTypeMapping", {
|
|
583
|
-
String: [
|
|
584
|
-
{ key: E["input-group"].type, value: E["input-group"].name },
|
|
585
|
-
{ key: E.lookup.type, value: E.lookup.name },
|
|
586
|
-
{ key: E.Image.type, value: E.Image.name },
|
|
587
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name },
|
|
588
|
-
{ key: E["check-box"].type, value: E["check-box"].name },
|
|
589
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name },
|
|
590
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
591
|
-
{ key: E.textarea.type, value: E.textarea.name }
|
|
592
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
593
|
-
],
|
|
594
|
-
Text: [
|
|
595
|
-
{ key: E.textarea.type, value: E.textarea.name },
|
|
596
|
-
{ key: E.avatar.type, value: E.avatar.name },
|
|
597
|
-
{ key: E.lookup.type, value: E.lookup.name }
|
|
598
|
-
],
|
|
599
|
-
Decimal: [
|
|
600
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
601
|
-
],
|
|
602
|
-
Integer: [
|
|
603
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
604
|
-
],
|
|
605
|
-
Number: [
|
|
606
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
607
|
-
],
|
|
608
|
-
BigNumber: [
|
|
609
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
610
|
-
],
|
|
611
|
-
Date: [
|
|
612
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
613
|
-
],
|
|
614
|
-
DateTime: [
|
|
615
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
616
|
-
],
|
|
617
|
-
Boolean: [
|
|
618
|
-
{ key: E.switch.type, value: E.switch.name },
|
|
619
|
-
{ key: E["check-box"].type, value: E["check-box"].name }
|
|
620
|
-
],
|
|
621
|
-
Enum: [
|
|
622
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
623
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
624
|
-
],
|
|
625
|
-
Object: [
|
|
626
|
-
{ key: E.lookup.type, value: E.lookup.name },
|
|
627
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
628
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
629
|
-
],
|
|
630
|
-
EmployeeSelector: [
|
|
631
|
-
{ key: E.EmployeeSelector.type, value: E.EmployeeSelector.name }
|
|
632
|
-
],
|
|
633
|
-
AdminOrganizationSelector: [
|
|
634
|
-
{ key: E.AdminOrganizationSelector.type, value: E.AdminOrganizationSelector.name }
|
|
635
|
-
]
|
|
636
|
-
});
|
|
637
|
-
class J {
|
|
500
|
+
class ee {
|
|
638
501
|
constructor(e, t) {
|
|
639
502
|
O(this, "componentId");
|
|
640
503
|
O(this, "viewModelId");
|
|
@@ -651,8 +514,8 @@ class J {
|
|
|
651
514
|
type: "object",
|
|
652
515
|
categories: {}
|
|
653
516
|
});
|
|
654
|
-
var
|
|
655
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
517
|
+
var r;
|
|
518
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
656
519
|
}
|
|
657
520
|
getTableInfo() {
|
|
658
521
|
var e;
|
|
@@ -662,8 +525,8 @@ class J {
|
|
|
662
525
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
663
526
|
if (t) {
|
|
664
527
|
if (!this.designViewModelField) {
|
|
665
|
-
const
|
|
666
|
-
this.designViewModelField =
|
|
528
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
529
|
+
this.designViewModelField = r.fields.find((u) => u.id === t);
|
|
667
530
|
}
|
|
668
531
|
e.updateOn = this.designViewModelField.updateOn;
|
|
669
532
|
}
|
|
@@ -671,9 +534,7 @@ class J {
|
|
|
671
534
|
changeFieldEditorType(e, t) {
|
|
672
535
|
}
|
|
673
536
|
getBasicPropConfig(e) {
|
|
674
|
-
|
|
675
|
-
var t = this;
|
|
676
|
-
return this.setDesignViewModelField(e), {
|
|
537
|
+
return {
|
|
677
538
|
description: "Basic Information",
|
|
678
539
|
title: "基本信息",
|
|
679
540
|
properties: {
|
|
@@ -686,69 +547,17 @@ class J {
|
|
|
686
547
|
type: {
|
|
687
548
|
description: "组件类型",
|
|
688
549
|
title: "控件类型",
|
|
689
|
-
type: "
|
|
690
|
-
refreshPanelAfterChanged: !0,
|
|
691
|
-
$converter: "/converter/change-editor.converter",
|
|
550
|
+
type: "select",
|
|
692
551
|
editor: {
|
|
693
552
|
type: "combo-list",
|
|
694
|
-
textField: "
|
|
695
|
-
valueField: "
|
|
696
|
-
data:
|
|
697
|
-
editable: !1
|
|
553
|
+
textField: "name",
|
|
554
|
+
valueField: "value",
|
|
555
|
+
data: [{ value: e.type, name: K[e.type].name }]
|
|
698
556
|
}
|
|
699
|
-
},
|
|
700
|
-
label: {
|
|
701
|
-
title: "标签",
|
|
702
|
-
type: "string",
|
|
703
|
-
$converter: "/converter/form-group-label.converter"
|
|
704
557
|
}
|
|
705
|
-
},
|
|
706
|
-
setPropertyRelates(u, h) {
|
|
707
|
-
if (u)
|
|
708
|
-
switch (u && u.propertyID) {
|
|
709
|
-
case "type": {
|
|
710
|
-
t.changeControlType(e, u);
|
|
711
|
-
break;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
558
|
}
|
|
715
559
|
};
|
|
716
560
|
}
|
|
717
|
-
/**
|
|
718
|
-
* 卡片控件:切换控件类型后事件
|
|
719
|
-
* @param propertyData 控件DOM属性
|
|
720
|
-
* @param newControlType 新控件类型
|
|
721
|
-
*/
|
|
722
|
-
changeControlType(e, t) {
|
|
723
|
-
var g, T, l, a, f;
|
|
724
|
-
const s = t.propertyValue, p = this.formSchemaUtils.getComponentById(this.componentId);
|
|
725
|
-
let u = this.getControlParentContainer(e.id, p);
|
|
726
|
-
if (!u)
|
|
727
|
-
return;
|
|
728
|
-
const h = u.contents.findIndex((i) => i.id === e.id), P = u.contents[h];
|
|
729
|
-
let k;
|
|
730
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
731
|
-
editor: {
|
|
732
|
-
$type: s
|
|
733
|
-
},
|
|
734
|
-
name: this.designViewModelField.name,
|
|
735
|
-
require: this.designViewModelField.require,
|
|
736
|
-
readonly: this.designViewModelField.readonly
|
|
737
|
-
}, !1), k = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, s)), Object.assign(k, {
|
|
738
|
-
id: P.id,
|
|
739
|
-
appearance: P.appearance,
|
|
740
|
-
size: P.size,
|
|
741
|
-
label: P.label
|
|
742
|
-
}), Object.assign(k.editor, {
|
|
743
|
-
isTextArea: k.isTextArea && P.isTextArea,
|
|
744
|
-
type: s || "",
|
|
745
|
-
placeHolder: (g = P.editor) == null ? void 0 : g.placeHolder,
|
|
746
|
-
holdPlace: (T = P.editor) == null ? void 0 : T.holdPlace,
|
|
747
|
-
readonly: (l = P.editor) == null ? void 0 : l.readonly,
|
|
748
|
-
require: (a = P.editor) == null ? void 0 : a.require,
|
|
749
|
-
visible: (f = P.editor) == null ? void 0 : f.visible
|
|
750
|
-
}), u.contents.splice(h, 1, k);
|
|
751
|
-
}
|
|
752
561
|
getAppearanceConfig(e = null) {
|
|
753
562
|
return {
|
|
754
563
|
title: "样式",
|
|
@@ -765,38 +574,12 @@ class J {
|
|
|
765
574
|
type: "string",
|
|
766
575
|
description: "组件的样式",
|
|
767
576
|
$converter: "/converter/appearance.converter"
|
|
768
|
-
},
|
|
769
|
-
responseLayout: {
|
|
770
|
-
description: "响应式列宽",
|
|
771
|
-
title: "响应式列宽",
|
|
772
|
-
type: "boolean",
|
|
773
|
-
visible: !1,
|
|
774
|
-
editor: {
|
|
775
|
-
type: "response-layout-editor-setting"
|
|
776
|
-
},
|
|
777
|
-
$converter: "/converter/response-form-layout.converter"
|
|
778
577
|
}
|
|
779
578
|
}
|
|
780
579
|
};
|
|
781
580
|
}
|
|
782
|
-
/**
|
|
783
|
-
* 获取控件:以contents为节点进行定位
|
|
784
|
-
* @param controlId 控件ID
|
|
785
|
-
* @param domJson 容器
|
|
786
|
-
*/
|
|
787
|
-
getControlParentContainer(e, t) {
|
|
788
|
-
let s;
|
|
789
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
790
|
-
return null;
|
|
791
|
-
for (const p of t.contents) {
|
|
792
|
-
if (p.id === e)
|
|
793
|
-
return s = t, t;
|
|
794
|
-
if (s = this.getControlParentContainer(e, p), s)
|
|
795
|
-
return s;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
581
|
}
|
|
799
|
-
class
|
|
582
|
+
class it extends ee {
|
|
800
583
|
constructor(e, t) {
|
|
801
584
|
super(e, t);
|
|
802
585
|
}
|
|
@@ -822,7 +605,7 @@ class at extends J {
|
|
|
822
605
|
type: "combo-list",
|
|
823
606
|
textField: "value",
|
|
824
607
|
valueField: "key",
|
|
825
|
-
data: [{ key: "page-header", value:
|
|
608
|
+
data: [{ key: "page-header", value: K["page-header"].name }]
|
|
826
609
|
}
|
|
827
610
|
},
|
|
828
611
|
icon: {
|
|
@@ -835,6 +618,15 @@ class at extends J {
|
|
|
835
618
|
type: "string",
|
|
836
619
|
description: "标题"
|
|
837
620
|
}
|
|
621
|
+
},
|
|
622
|
+
setPropertyRelates(t, r) {
|
|
623
|
+
if (t)
|
|
624
|
+
switch (t && t.propertyID) {
|
|
625
|
+
case "title": {
|
|
626
|
+
t.needRefreshControlTree = !0;
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
838
630
|
}
|
|
839
631
|
};
|
|
840
632
|
}
|
|
@@ -862,7 +654,7 @@ class at extends J {
|
|
|
862
654
|
label: "click",
|
|
863
655
|
name: "点击事件"
|
|
864
656
|
}
|
|
865
|
-
],
|
|
657
|
+
], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t);
|
|
866
658
|
this.propertyConfig.categories.eventsEditor = {
|
|
867
659
|
title: "事件",
|
|
868
660
|
hideTitle: !0,
|
|
@@ -870,7 +662,7 @@ class at extends J {
|
|
|
870
662
|
"data-grid-component-viewmodel": {
|
|
871
663
|
type: "events-editor",
|
|
872
664
|
editor: {
|
|
873
|
-
initialData:
|
|
665
|
+
initialData: u
|
|
874
666
|
}
|
|
875
667
|
}
|
|
876
668
|
},
|
|
@@ -878,30 +670,38 @@ class at extends J {
|
|
|
878
670
|
refreshPanelAfterChanged: !0,
|
|
879
671
|
tabId: "commands",
|
|
880
672
|
tabName: "交互",
|
|
881
|
-
setPropertyRelates(
|
|
882
|
-
const
|
|
883
|
-
delete e[
|
|
673
|
+
setPropertyRelates(h, g) {
|
|
674
|
+
const D = h.propertyValue;
|
|
675
|
+
delete e[r.viewModelId], D && (D.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, D.events, D));
|
|
884
676
|
}
|
|
885
677
|
};
|
|
886
678
|
}
|
|
887
679
|
}
|
|
888
|
-
function
|
|
889
|
-
function t(
|
|
680
|
+
function at(n, e) {
|
|
681
|
+
function t(D) {
|
|
682
|
+
return !1;
|
|
683
|
+
}
|
|
684
|
+
function r() {
|
|
890
685
|
return !1;
|
|
891
686
|
}
|
|
892
|
-
function
|
|
687
|
+
function u() {
|
|
688
|
+
return !1;
|
|
689
|
+
}
|
|
690
|
+
function h() {
|
|
893
691
|
return !0;
|
|
894
692
|
}
|
|
895
|
-
function
|
|
896
|
-
return new
|
|
693
|
+
function g(D) {
|
|
694
|
+
return new it(D, e).getPropertyConfig(n);
|
|
897
695
|
}
|
|
898
696
|
return {
|
|
899
697
|
canAccepts: t,
|
|
900
|
-
hideNestedPaddingInDesginerView:
|
|
901
|
-
getPropsConfig:
|
|
698
|
+
hideNestedPaddingInDesginerView: h,
|
|
699
|
+
getPropsConfig: g,
|
|
700
|
+
checkCanDeleteComponent: r,
|
|
701
|
+
checkCanMoveComponent: u
|
|
902
702
|
};
|
|
903
703
|
}
|
|
904
|
-
class
|
|
704
|
+
class De {
|
|
905
705
|
constructor(e) {
|
|
906
706
|
/** 工具栏项标识 */
|
|
907
707
|
O(this, "id", "");
|
|
@@ -946,13 +746,13 @@ class Se {
|
|
|
946
746
|
"tipsText",
|
|
947
747
|
"onClick"
|
|
948
748
|
];
|
|
949
|
-
Object.keys(e).filter((
|
|
950
|
-
this[
|
|
749
|
+
Object.keys(e).filter((r) => t.indexOf(r) > -1).forEach((r) => {
|
|
750
|
+
this[r] = e[r];
|
|
951
751
|
});
|
|
952
752
|
}
|
|
953
753
|
/** 是否可用 */
|
|
954
754
|
get enable() {
|
|
955
|
-
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable :
|
|
755
|
+
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : F(() => !0);
|
|
956
756
|
}
|
|
957
757
|
/** 设置宽度 */
|
|
958
758
|
setWidth(e) {
|
|
@@ -963,20 +763,20 @@ class Se {
|
|
|
963
763
|
return this.visible ? this.width : !1;
|
|
964
764
|
}
|
|
965
765
|
}
|
|
966
|
-
class
|
|
766
|
+
class ct extends De {
|
|
967
767
|
constructor(e) {
|
|
968
768
|
super(e);
|
|
969
769
|
}
|
|
970
770
|
}
|
|
971
|
-
function
|
|
771
|
+
function Se() {
|
|
972
772
|
function n(e) {
|
|
973
773
|
const t = [];
|
|
974
|
-
return e.reduce((
|
|
774
|
+
return e.reduce((r, u) => (u.children && u.children.length > 0 ? r.push(new J(u)) : r.push(new ct(u)), r), t), t;
|
|
975
775
|
}
|
|
976
776
|
return { buildResponseToolbarItems: n };
|
|
977
777
|
}
|
|
978
|
-
const { buildResponseToolbarItems:
|
|
979
|
-
class
|
|
778
|
+
const { buildResponseToolbarItems: lt } = Se();
|
|
779
|
+
class J extends De {
|
|
980
780
|
constructor(t) {
|
|
981
781
|
super(t);
|
|
982
782
|
O(this, "placement", "");
|
|
@@ -989,19 +789,25 @@ class X extends Se {
|
|
|
989
789
|
O(this, "split", !1);
|
|
990
790
|
O(this, "children", []);
|
|
991
791
|
O(this, "expanded", !1);
|
|
992
|
-
const
|
|
993
|
-
Object.keys(t).filter((
|
|
994
|
-
this[
|
|
995
|
-
}), t.children && t.children.length && (this.children =
|
|
792
|
+
const r = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
793
|
+
Object.keys(t).filter((u) => r.indexOf(u) > -1).forEach((u) => {
|
|
794
|
+
this[u] = t[u];
|
|
795
|
+
}), t.children && t.children.length && (this.children = lt(t.children));
|
|
996
796
|
}
|
|
997
797
|
}
|
|
998
|
-
const
|
|
999
|
-
["buttons", "items"]
|
|
798
|
+
const pt = /* @__PURE__ */ new Map([
|
|
799
|
+
["buttons", "items"],
|
|
800
|
+
["appearance", Pe]
|
|
801
|
+
]), ut = /* @__PURE__ */ new Map([
|
|
802
|
+
["appearance", dt]
|
|
1000
803
|
]);
|
|
1001
|
-
function
|
|
804
|
+
function dt(n, e) {
|
|
805
|
+
return { class: e.class, style: e.style };
|
|
806
|
+
}
|
|
807
|
+
function je(n, e, t) {
|
|
1002
808
|
return e;
|
|
1003
809
|
}
|
|
1004
|
-
const
|
|
810
|
+
const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-design.gitee.io/response-toolbar.schema.json", mt = "response-toolbar", ht = "A Farris Toolbar Component", bt = "object", yt = {
|
|
1005
811
|
id: {
|
|
1006
812
|
description: "The unique identifier for a Response Toolbar",
|
|
1007
813
|
type: "string"
|
|
@@ -1034,19 +840,19 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1034
840
|
type: "array",
|
|
1035
841
|
default: []
|
|
1036
842
|
}
|
|
1037
|
-
},
|
|
843
|
+
}, vt = [
|
|
1038
844
|
"id",
|
|
1039
845
|
"type",
|
|
1040
846
|
"buttons"
|
|
1041
|
-
],
|
|
1042
|
-
$schema:
|
|
1043
|
-
$id:
|
|
1044
|
-
title:
|
|
1045
|
-
description:
|
|
1046
|
-
type:
|
|
847
|
+
], Ct = {
|
|
848
|
+
$schema: ft,
|
|
849
|
+
$id: gt,
|
|
850
|
+
title: mt,
|
|
851
|
+
description: ht,
|
|
852
|
+
type: bt,
|
|
1047
853
|
properties: yt,
|
|
1048
|
-
required:
|
|
1049
|
-
},
|
|
854
|
+
required: vt
|
|
855
|
+
}, wt = "https://json-schema.org/draft/2020-12/schema", Tt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Pt = "response-toolbar-item", Dt = "A Farris Toolbar Item Component", St = "object", jt = {
|
|
1050
856
|
id: {
|
|
1051
857
|
description: "The unique identifier for a Response Toolbar",
|
|
1052
858
|
type: "string"
|
|
@@ -1061,7 +867,8 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1061
867
|
type: "object",
|
|
1062
868
|
properties: {
|
|
1063
869
|
class: {
|
|
1064
|
-
type: "string"
|
|
870
|
+
type: "string",
|
|
871
|
+
default: "btn-primary"
|
|
1065
872
|
},
|
|
1066
873
|
style: {
|
|
1067
874
|
type: "string"
|
|
@@ -1069,6 +876,11 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1069
876
|
},
|
|
1070
877
|
default: {}
|
|
1071
878
|
},
|
|
879
|
+
alignment: {
|
|
880
|
+
description: "The alignment of Response Toolbar Button.",
|
|
881
|
+
type: "string",
|
|
882
|
+
default: "right"
|
|
883
|
+
},
|
|
1072
884
|
text: {
|
|
1073
885
|
description: "The items of Response Toolbar.",
|
|
1074
886
|
type: "string",
|
|
@@ -1084,19 +896,19 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1084
896
|
type: "string",
|
|
1085
897
|
default: ""
|
|
1086
898
|
}
|
|
1087
|
-
},
|
|
899
|
+
}, xt = [
|
|
1088
900
|
"id",
|
|
1089
901
|
"type",
|
|
1090
902
|
"text"
|
|
1091
903
|
], re = {
|
|
1092
|
-
$schema:
|
|
1093
|
-
$id:
|
|
1094
|
-
title:
|
|
1095
|
-
description:
|
|
904
|
+
$schema: wt,
|
|
905
|
+
$id: Tt,
|
|
906
|
+
title: Pt,
|
|
907
|
+
description: Dt,
|
|
1096
908
|
type: St,
|
|
1097
|
-
properties:
|
|
1098
|
-
required:
|
|
1099
|
-
},
|
|
909
|
+
properties: jt,
|
|
910
|
+
required: xt
|
|
911
|
+
}, Et = "response-toolbar-item", Mt = "A Farris Container Component", kt = "object", At = {
|
|
1100
912
|
basic: {
|
|
1101
913
|
title: "基本信息",
|
|
1102
914
|
description: "Basic Infomation",
|
|
@@ -1130,11 +942,11 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1130
942
|
}
|
|
1131
943
|
}
|
|
1132
944
|
}, me = {
|
|
1133
|
-
title:
|
|
945
|
+
title: Et,
|
|
1134
946
|
description: Mt,
|
|
1135
|
-
type:
|
|
1136
|
-
categories:
|
|
1137
|
-
},
|
|
947
|
+
type: kt,
|
|
948
|
+
categories: At
|
|
949
|
+
}, ue = {
|
|
1138
950
|
/** 组件自定义样式 */
|
|
1139
951
|
customClass: { type: String, default: "" },
|
|
1140
952
|
alignment: { Type: String, default: "right" },
|
|
@@ -1143,171 +955,173 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1143
955
|
default: []
|
|
1144
956
|
}
|
|
1145
957
|
};
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
const Bt = Object.assign({},
|
|
958
|
+
ae[re.title] = re;
|
|
959
|
+
Te[me.title] = me;
|
|
960
|
+
const Bt = Object.assign({}, ue, {
|
|
1149
961
|
componentId: { type: String, default: "" }
|
|
1150
|
-
}), de =
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
),
|
|
962
|
+
}), de = le(
|
|
963
|
+
ue,
|
|
964
|
+
Ct,
|
|
965
|
+
pt,
|
|
966
|
+
je
|
|
967
|
+
), xe = {
|
|
1156
968
|
id: { type: String, default: "" },
|
|
1157
969
|
items: { type: Object, default: {} },
|
|
970
|
+
class: { type: String, default: "" },
|
|
1158
971
|
text: { type: String, default: "" },
|
|
1159
972
|
disabled: { type: Boolean, default: !1 },
|
|
1160
973
|
icon: { type: String, default: "" },
|
|
1161
|
-
componentId: { type: String, default: "" }
|
|
1162
|
-
|
|
1163
|
-
|
|
974
|
+
componentId: { type: String, default: "" },
|
|
975
|
+
alignment: { Type: String, default: "right" }
|
|
976
|
+
}, Rt = le(
|
|
977
|
+
xe,
|
|
1164
978
|
re,
|
|
1165
|
-
|
|
1166
|
-
|
|
979
|
+
ut,
|
|
980
|
+
je
|
|
1167
981
|
);
|
|
1168
|
-
function
|
|
982
|
+
function Ee() {
|
|
1169
983
|
function n(t) {
|
|
1170
|
-
const
|
|
984
|
+
const r = {
|
|
1171
985
|
"f-icon": !0
|
|
1172
986
|
};
|
|
1173
987
|
if (t.icon) {
|
|
1174
|
-
const
|
|
1175
|
-
|
|
988
|
+
const u = t.icon.trim().split(" ");
|
|
989
|
+
u && u.length && u.reduce((h, g) => (h[g] = !0, h), r);
|
|
1176
990
|
}
|
|
1177
|
-
return
|
|
991
|
+
return r;
|
|
1178
992
|
}
|
|
1179
993
|
function e(t) {
|
|
1180
994
|
return !!(t.icon && t.icon.trim());
|
|
1181
995
|
}
|
|
1182
996
|
return { iconClass: n, shouldShowIcon: e };
|
|
1183
997
|
}
|
|
1184
|
-
function
|
|
998
|
+
function It(n) {
|
|
1185
999
|
function e(l) {
|
|
1186
|
-
const
|
|
1000
|
+
const i = {
|
|
1187
1001
|
"dropdown-menu": !0
|
|
1188
1002
|
};
|
|
1189
1003
|
if (l.class) {
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1004
|
+
const d = l.menuClass.split(" ");
|
|
1005
|
+
d && d.length && d.reduce((c, C) => (c[C] = !0, c), i);
|
|
1192
1006
|
}
|
|
1193
|
-
return
|
|
1007
|
+
return i;
|
|
1194
1008
|
}
|
|
1195
1009
|
function t(l) {
|
|
1196
|
-
const
|
|
1010
|
+
const i = {
|
|
1197
1011
|
disabled: !l.enable,
|
|
1198
1012
|
"dropdown-submenu": !0,
|
|
1199
1013
|
"f-rt-dropdown": !0
|
|
1200
|
-
},
|
|
1201
|
-
return
|
|
1014
|
+
}, d = l.dropdownClass.split(" ");
|
|
1015
|
+
return d && d.length && d.reduce((c, C) => (c[C] = !0, c), i), i;
|
|
1202
1016
|
}
|
|
1203
|
-
function
|
|
1204
|
-
const
|
|
1017
|
+
function r(l) {
|
|
1018
|
+
const i = {
|
|
1205
1019
|
disabled: !l.enable,
|
|
1206
1020
|
"dropdown-item": !0,
|
|
1207
1021
|
"f-rt-btn": !0
|
|
1208
|
-
},
|
|
1209
|
-
return
|
|
1022
|
+
}, d = l.class.split(" ");
|
|
1023
|
+
return d && d.length && d.reduce((c, C) => (c[C] = !0, c), i), i;
|
|
1210
1024
|
}
|
|
1211
|
-
let
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1025
|
+
let u;
|
|
1026
|
+
const h = /* @__PURE__ */ new Map();
|
|
1027
|
+
function g(l, i, d) {
|
|
1214
1028
|
var C;
|
|
1215
|
-
((C = l.target) == null ? void 0 : C.id) ===
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1218
|
-
const w =
|
|
1029
|
+
((C = l.target) == null ? void 0 : C.id) === i.id && l.stopPropagation();
|
|
1030
|
+
const c = d ? d.id : "__top_item__";
|
|
1031
|
+
if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? h.set(c, i) : h.delete(c)), h.has(c) && h.get(c) !== i) {
|
|
1032
|
+
const w = h.get(c);
|
|
1219
1033
|
w && (w.expanded = !1);
|
|
1220
1034
|
}
|
|
1221
1035
|
}
|
|
1222
|
-
function
|
|
1223
|
-
document.body.click(),
|
|
1036
|
+
function D(l, i) {
|
|
1037
|
+
document.body.click(), i.enable && i.onClick(l, i.id);
|
|
1224
1038
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return l.children.map((
|
|
1227
|
-
class: t(
|
|
1228
|
-
id:
|
|
1229
|
-
onClick: (
|
|
1039
|
+
function S(l) {
|
|
1040
|
+
return l.children.map((i) => i.children && i.children.length ? b("li", {
|
|
1041
|
+
class: t(i),
|
|
1042
|
+
id: i.id,
|
|
1043
|
+
onClick: (d) => i.enable && g(d, i, l)
|
|
1230
1044
|
}, [b("span", {
|
|
1231
|
-
id:
|
|
1232
|
-
class:
|
|
1233
|
-
onMouseover: (
|
|
1234
|
-
}, [
|
|
1045
|
+
id: i.id,
|
|
1046
|
+
class: r(i),
|
|
1047
|
+
onMouseover: (d) => i.enable && g(d, i, l)
|
|
1048
|
+
}, [i.text, b("i", {
|
|
1235
1049
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1236
1050
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1237
|
-
}, null)]),
|
|
1238
|
-
class:
|
|
1239
|
-
id:
|
|
1240
|
-
onClick: (
|
|
1241
|
-
onMouseover: (
|
|
1242
|
-
}, [n.shouldShowIcon(
|
|
1243
|
-
class: n.iconClass(
|
|
1244
|
-
}, null),
|
|
1245
|
-
}
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1051
|
+
}, null)]), u(i, i)]) : b("li", {
|
|
1052
|
+
class: r(i),
|
|
1053
|
+
id: i.id,
|
|
1054
|
+
onClick: (d) => D(d, i),
|
|
1055
|
+
onMouseover: (d) => i.enable && g(d, i, l)
|
|
1056
|
+
}, [n.shouldShowIcon(i) && b("i", {
|
|
1057
|
+
class: n.iconClass(i)
|
|
1058
|
+
}, null), i.text]));
|
|
1059
|
+
}
|
|
1060
|
+
function y(l, i, d) {
|
|
1061
|
+
const c = {
|
|
1248
1062
|
display: l.expanded ? "block" : "none",
|
|
1249
1063
|
position: "fixed",
|
|
1250
1064
|
maxWidth: "300px",
|
|
1251
1065
|
width: "auto",
|
|
1252
1066
|
minWidth: "120px"
|
|
1253
|
-
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w =
|
|
1254
|
-
if (w &&
|
|
1067
|
+
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = i, j = w == null ? void 0 : w.getClientRects();
|
|
1068
|
+
if (w && j && j.length) {
|
|
1255
1069
|
const {
|
|
1256
|
-
top:
|
|
1257
|
-
width:
|
|
1070
|
+
top: I,
|
|
1071
|
+
width: P,
|
|
1258
1072
|
left: A,
|
|
1259
|
-
right:
|
|
1073
|
+
right: $,
|
|
1260
1074
|
height: v
|
|
1261
|
-
} =
|
|
1262
|
-
|
|
1263
|
-
const
|
|
1264
|
-
if (
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
if (
|
|
1268
|
-
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1075
|
+
} = j[0], f = Math.ceil(v + I);
|
|
1076
|
+
c.top = `${f}px`, c.left = `${A}px`;
|
|
1077
|
+
const x = l.id + "_menu", k = i ? i.querySelector("#" + x) : null;
|
|
1078
|
+
if (k) {
|
|
1079
|
+
c.display === "block" && (k.style.display = "block");
|
|
1080
|
+
const p = k.getBoundingClientRect();
|
|
1081
|
+
if (d) {
|
|
1082
|
+
c.top = `${I - 6}px`;
|
|
1083
|
+
const s = Math.ceil(P + A);
|
|
1084
|
+
c.left = `${s}px`;
|
|
1271
1085
|
}
|
|
1272
|
-
C - A -
|
|
1086
|
+
C - A - P < p.width && (c.left = `${(d ? A : $) - p.width}px`);
|
|
1273
1087
|
}
|
|
1274
1088
|
}
|
|
1275
|
-
return
|
|
1089
|
+
return c;
|
|
1276
1090
|
}
|
|
1277
|
-
|
|
1278
|
-
var w,
|
|
1279
|
-
const
|
|
1091
|
+
u = function(l, i) {
|
|
1092
|
+
var w, j;
|
|
1093
|
+
const d = ve(), c = i ? i.id : l.id, C = (j = (w = d == null ? void 0 : d.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : j.querySelector("#" + c);
|
|
1280
1094
|
return b("ul", {
|
|
1281
1095
|
class: e(l),
|
|
1282
|
-
style:
|
|
1096
|
+
style: y(l, C, i),
|
|
1283
1097
|
id: l.id + "_menu"
|
|
1284
|
-
}, [
|
|
1098
|
+
}, [S(l)]);
|
|
1285
1099
|
};
|
|
1286
1100
|
function T() {
|
|
1287
|
-
|
|
1101
|
+
h.forEach((l) => {
|
|
1288
1102
|
l.expanded = !1;
|
|
1289
|
-
}),
|
|
1103
|
+
}), h.clear();
|
|
1290
1104
|
}
|
|
1291
1105
|
return {
|
|
1292
|
-
renderDropdownMenu:
|
|
1106
|
+
renderDropdownMenu: u,
|
|
1293
1107
|
clearAllDropDownMenu: T
|
|
1294
1108
|
};
|
|
1295
1109
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const t =
|
|
1298
|
-
renderDropdownMenu:
|
|
1299
|
-
clearAllDropDownMenu:
|
|
1300
|
-
} =
|
|
1301
|
-
function
|
|
1110
|
+
function Ot(n, e) {
|
|
1111
|
+
const t = M(n.alignment), {
|
|
1112
|
+
renderDropdownMenu: r,
|
|
1113
|
+
clearAllDropDownMenu: u
|
|
1114
|
+
} = It(e);
|
|
1115
|
+
function h(T) {
|
|
1302
1116
|
const l = {
|
|
1303
1117
|
"btn-group": !0,
|
|
1304
1118
|
"f-rt-dropdown": !0,
|
|
1305
1119
|
"f-btn-ml": t.value === "right",
|
|
1306
1120
|
"f-btn-mr": t.value === "left"
|
|
1307
|
-
},
|
|
1308
|
-
return
|
|
1121
|
+
}, i = T.dropdownClass.split(" ");
|
|
1122
|
+
return i && i.length && i.reduce((d, c) => (d[c] = !0, d), l), l;
|
|
1309
1123
|
}
|
|
1310
|
-
function
|
|
1124
|
+
function g(T) {
|
|
1311
1125
|
const l = {
|
|
1312
1126
|
btn: !0,
|
|
1313
1127
|
disabled: !T.enable,
|
|
@@ -1315,318 +1129,311 @@ function It(n, e) {
|
|
|
1315
1129
|
"btn-icontext": !!(T.icon && T.icon.trim())
|
|
1316
1130
|
};
|
|
1317
1131
|
if (T.class) {
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1132
|
+
const i = T.class.split(" ");
|
|
1133
|
+
i && i.length && i.reduce((d, c) => (d[c] = !0, d), l);
|
|
1320
1134
|
}
|
|
1321
1135
|
return l;
|
|
1322
1136
|
}
|
|
1323
|
-
function
|
|
1137
|
+
function D(T, l) {
|
|
1324
1138
|
T.stopPropagation();
|
|
1325
|
-
const
|
|
1326
|
-
document.body.click(), l.expanded = !
|
|
1139
|
+
const i = l.expanded;
|
|
1140
|
+
document.body.click(), l.expanded = !i;
|
|
1327
1141
|
}
|
|
1328
|
-
function
|
|
1142
|
+
function S(T) {
|
|
1329
1143
|
return b("div", {
|
|
1330
1144
|
id: T.id,
|
|
1331
|
-
class:
|
|
1145
|
+
class: h(T)
|
|
1332
1146
|
}, [b("div", {
|
|
1333
|
-
class:
|
|
1147
|
+
class: g(T),
|
|
1334
1148
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1335
|
-
onClick: (l) => T.enable &&
|
|
1149
|
+
onClick: (l) => T.enable && D(l, T)
|
|
1336
1150
|
}, [e.shouldShowIcon(T) && b("i", {
|
|
1337
1151
|
class: e.iconClass(T)
|
|
1338
1152
|
}, null), b("span", null, [T.text]), b("i", {
|
|
1339
1153
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1340
1154
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1341
|
-
}, null)]),
|
|
1155
|
+
}, null)]), r(T)]);
|
|
1342
1156
|
}
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1157
|
+
function y() {
|
|
1158
|
+
u();
|
|
1345
1159
|
}
|
|
1346
1160
|
return {
|
|
1347
|
-
renderToolbarDropdown:
|
|
1348
|
-
clearAllDropDown:
|
|
1161
|
+
renderToolbarDropdown: S,
|
|
1162
|
+
clearAllDropDown: y
|
|
1349
1163
|
};
|
|
1350
1164
|
}
|
|
1351
1165
|
const {
|
|
1352
|
-
buildResponseToolbarItems:
|
|
1353
|
-
} =
|
|
1166
|
+
buildResponseToolbarItems: he
|
|
1167
|
+
} = Se(), Z = /* @__PURE__ */ z({
|
|
1354
1168
|
name: "FResponseToolbar",
|
|
1355
|
-
props:
|
|
1169
|
+
props: ue,
|
|
1356
1170
|
emits: ["click"],
|
|
1357
1171
|
setup(n, e) {
|
|
1358
|
-
const t =
|
|
1172
|
+
const t = M(he(n.items)), r = M(), u = M(), h = M(), g = M(n.alignment), D = {
|
|
1359
1173
|
id: "__more_buttons__",
|
|
1360
1174
|
text: "更多"
|
|
1361
|
-
},
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
};
|
|
1367
|
-
if (n.customClass) {
|
|
1368
|
-
const D = n.customClass.split(" ");
|
|
1369
|
-
D && D.length && D.reduce((j, d) => (j[d] = !0, j), m);
|
|
1370
|
-
}
|
|
1371
|
-
return m;
|
|
1372
|
-
}), a = V(() => ({
|
|
1175
|
+
}, S = M(new J(D)), y = Ee(), T = F(() => S.value.children.length > 0), l = F(() => Y({
|
|
1176
|
+
"f-toolbar": !0,
|
|
1177
|
+
"f-response-toolbar": !0,
|
|
1178
|
+
"position-relative": !0
|
|
1179
|
+
}, n.customClass)), i = F(() => ({
|
|
1373
1180
|
"d-flex": !0,
|
|
1374
1181
|
"flex-nowrap": !0,
|
|
1375
|
-
"justify-content-end":
|
|
1376
|
-
"justify-content-start":
|
|
1182
|
+
"justify-content-end": g.value === "right",
|
|
1183
|
+
"justify-content-start": g.value === "left"
|
|
1377
1184
|
})), {
|
|
1378
|
-
renderToolbarDropdown:
|
|
1379
|
-
clearAllDropDown:
|
|
1380
|
-
} =
|
|
1185
|
+
renderToolbarDropdown: d,
|
|
1186
|
+
clearAllDropDown: c
|
|
1187
|
+
} = Ot(n, y);
|
|
1381
1188
|
function C() {
|
|
1382
|
-
t.value.filter((
|
|
1383
|
-
|
|
1384
|
-
}),
|
|
1189
|
+
t.value.filter((f) => f.children && f.children.length > 0).forEach((f) => {
|
|
1190
|
+
f.expanded = !1;
|
|
1191
|
+
}), S.value.expanded = !1, c();
|
|
1385
1192
|
}
|
|
1386
|
-
function w(
|
|
1387
|
-
const
|
|
1193
|
+
function w(f) {
|
|
1194
|
+
const x = {
|
|
1388
1195
|
btn: !0,
|
|
1389
1196
|
"f-rt-btn": !0,
|
|
1390
|
-
"f-btn-ml":
|
|
1391
|
-
"f-btn-mr":
|
|
1392
|
-
"btn-icontext": !!(
|
|
1197
|
+
"f-btn-ml": g.value === "right",
|
|
1198
|
+
"f-btn-mr": g.value === "left",
|
|
1199
|
+
"btn-icontext": !!(f.icon && f.icon.trim())
|
|
1393
1200
|
};
|
|
1394
|
-
if (
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1201
|
+
if (f.class) {
|
|
1202
|
+
const k = f.class.split(" ");
|
|
1203
|
+
k && k.length && k.reduce((p, s) => (p[s] = !0, p), x);
|
|
1397
1204
|
}
|
|
1398
|
-
return
|
|
1205
|
+
return x;
|
|
1399
1206
|
}
|
|
1400
|
-
function
|
|
1401
|
-
document.body.click(),
|
|
1207
|
+
function j(f, x) {
|
|
1208
|
+
document.body.click(), x.onClick(f, x.id), e.emit("click", f, x.id);
|
|
1402
1209
|
}
|
|
1403
|
-
function
|
|
1210
|
+
function I(f) {
|
|
1404
1211
|
return b("button", {
|
|
1405
1212
|
type: "button",
|
|
1406
|
-
class: w(
|
|
1407
|
-
id:
|
|
1408
|
-
disabled: !
|
|
1409
|
-
onClick: (
|
|
1410
|
-
}, [
|
|
1411
|
-
class:
|
|
1412
|
-
}, null),
|
|
1213
|
+
class: w(f),
|
|
1214
|
+
id: f.id,
|
|
1215
|
+
disabled: !f.enable,
|
|
1216
|
+
onClick: (x) => j(x, f)
|
|
1217
|
+
}, [y.shouldShowIcon(f) && b("i", {
|
|
1218
|
+
class: y.iconClass(f)
|
|
1219
|
+
}, null), f.text]);
|
|
1413
1220
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
const
|
|
1417
|
-
let
|
|
1418
|
-
const
|
|
1419
|
-
if (
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1221
|
+
const P = /* @__PURE__ */ new Map(), A = [];
|
|
1222
|
+
function $(f) {
|
|
1223
|
+
const x = h.value;
|
|
1224
|
+
let k = f;
|
|
1225
|
+
const p = Array.from(x.children), s = p[p.length - 1].id === "__more_buttons__" ? p[p.length - 1] : null;
|
|
1226
|
+
if (s) {
|
|
1227
|
+
const E = s.computedStyleMap().get("margin-left"), R = s.computedStyleMap().get("margin-right"), L = (E ? E.value : 0) + s.getBoundingClientRect().width + (R ? R.value : 0);
|
|
1228
|
+
k -= L;
|
|
1422
1229
|
}
|
|
1423
|
-
const o =
|
|
1424
|
-
for (const
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
id:
|
|
1230
|
+
const o = p.filter((E) => E.id !== "__more_buttons__");
|
|
1231
|
+
for (const E of o) {
|
|
1232
|
+
const R = E.computedStyleMap().get("margin-left"), L = E.computedStyleMap().get("margin-right"), N = (R ? R.value : 0) + E.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1233
|
+
k < N ? (P.set(E.id, !0), A.push({
|
|
1234
|
+
id: E.id,
|
|
1428
1235
|
width: N
|
|
1429
|
-
})) :
|
|
1236
|
+
})) : k -= N;
|
|
1430
1237
|
}
|
|
1431
1238
|
if (A.length)
|
|
1432
|
-
for (let
|
|
1433
|
-
const
|
|
1434
|
-
if (
|
|
1435
|
-
|
|
1239
|
+
for (let E = A.length - 1; E >= 0; E--) {
|
|
1240
|
+
const R = A[E].width;
|
|
1241
|
+
if (k >= R)
|
|
1242
|
+
k -= R, P.delete(A[E].id), A.pop();
|
|
1436
1243
|
else
|
|
1437
1244
|
break;
|
|
1438
1245
|
}
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1246
|
+
const a = Object.assign({}, S.value);
|
|
1247
|
+
a.children = [];
|
|
1248
|
+
const m = new J(a), B = t.value.reduce((E, R) => (P.has(R.id) && m.children.push(R), R.visible = !P.has(R.id), E.push(R), E), []);
|
|
1249
|
+
S.value = m, t.value = B;
|
|
1443
1250
|
}
|
|
1444
|
-
const v = new ResizeObserver((
|
|
1445
|
-
if (
|
|
1446
|
-
const
|
|
1447
|
-
(
|
|
1251
|
+
const v = new ResizeObserver((f) => {
|
|
1252
|
+
if (f.length) {
|
|
1253
|
+
const k = f[0].contentRect.width, s = h.value.getBoundingClientRect().width;
|
|
1254
|
+
(k < s || A.length) && ($(k), C());
|
|
1448
1255
|
}
|
|
1449
1256
|
});
|
|
1450
|
-
return
|
|
1451
|
-
const
|
|
1452
|
-
v.observe(
|
|
1453
|
-
}),
|
|
1257
|
+
return H(() => {
|
|
1258
|
+
const f = u.value;
|
|
1259
|
+
v.observe(f), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
|
|
1260
|
+
}), ie(() => {
|
|
1454
1261
|
v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
|
|
1455
|
-
}),
|
|
1456
|
-
t.value =
|
|
1262
|
+
}), G(() => n.items, () => {
|
|
1263
|
+
t.value = he(n.items);
|
|
1457
1264
|
}, {
|
|
1458
1265
|
deep: !0
|
|
1459
1266
|
}), e.expose({
|
|
1460
|
-
elementRef:
|
|
1267
|
+
elementRef: r
|
|
1461
1268
|
}), () => b("div", {
|
|
1462
1269
|
class: l.value,
|
|
1463
|
-
ref:
|
|
1464
|
-
}, [b("div", {
|
|
1465
|
-
ref: p,
|
|
1466
|
-
class: a.value
|
|
1270
|
+
ref: r
|
|
1467
1271
|
}, [b("div", {
|
|
1468
1272
|
ref: u,
|
|
1273
|
+
class: i.value
|
|
1274
|
+
}, [b("div", {
|
|
1275
|
+
ref: h,
|
|
1469
1276
|
class: "d-inline-block f-response-content",
|
|
1470
1277
|
style: "white-space: nowrap;"
|
|
1471
|
-
}, [t.value.filter((
|
|
1278
|
+
}, [t.value.filter((f) => f.visible).map((f) => f.children && f.children.length > 0 ? d(f) : I(f)), T.value && d(S.value)])])]);
|
|
1472
1279
|
}
|
|
1473
1280
|
});
|
|
1474
|
-
function
|
|
1475
|
-
const t =
|
|
1281
|
+
function $t(n, e) {
|
|
1282
|
+
const t = V("design-item-context"), r = V("toolbar-item-handler", () => {
|
|
1476
1283
|
});
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1284
|
+
function u() {
|
|
1285
|
+
r && r();
|
|
1479
1286
|
}
|
|
1480
|
-
function
|
|
1287
|
+
function h(s) {
|
|
1481
1288
|
const o = {
|
|
1482
1289
|
"dropdown-menu": !0
|
|
1483
1290
|
};
|
|
1484
|
-
if (
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1291
|
+
if (s.class) {
|
|
1292
|
+
const a = s.menuClass.split(" ");
|
|
1293
|
+
a && a.length && a.reduce((m, B) => (m[B] = !0, m), o);
|
|
1487
1294
|
}
|
|
1488
1295
|
return o;
|
|
1489
1296
|
}
|
|
1490
|
-
function
|
|
1297
|
+
function g(s) {
|
|
1491
1298
|
const o = {
|
|
1492
|
-
disabled: !
|
|
1299
|
+
disabled: !s.enable,
|
|
1493
1300
|
"dropdown-submenu": !0,
|
|
1494
1301
|
"f-rt-dropdown": !0
|
|
1495
|
-
},
|
|
1496
|
-
return
|
|
1302
|
+
}, a = s.dropdownClass.split(" ");
|
|
1303
|
+
return a && a.length && a.reduce((m, B) => (m[B] = !0, m), o), o;
|
|
1497
1304
|
}
|
|
1498
|
-
function
|
|
1305
|
+
function D(s) {
|
|
1499
1306
|
const o = {
|
|
1500
|
-
disabled: !
|
|
1307
|
+
disabled: !s.enable,
|
|
1501
1308
|
"dropdown-item": !0,
|
|
1502
1309
|
"f-rt-btn": !0,
|
|
1503
1310
|
"position-relative": !0,
|
|
1504
1311
|
"farris-component": !0
|
|
1505
|
-
},
|
|
1506
|
-
return
|
|
1507
|
-
}
|
|
1508
|
-
let
|
|
1509
|
-
const
|
|
1510
|
-
function T(
|
|
1511
|
-
var
|
|
1512
|
-
((
|
|
1513
|
-
const
|
|
1514
|
-
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ?
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1312
|
+
}, a = s.class.split(" ");
|
|
1313
|
+
return a && a.length && a.reduce((m, B) => (m[B] = !0, m), o), o;
|
|
1314
|
+
}
|
|
1315
|
+
let S;
|
|
1316
|
+
const y = /* @__PURE__ */ new Map();
|
|
1317
|
+
function T(s, o, a) {
|
|
1318
|
+
var B;
|
|
1319
|
+
((B = s.target) == null ? void 0 : B.id) === o.id && s.stopPropagation();
|
|
1320
|
+
const m = a ? a.id : "__top_item__";
|
|
1321
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? y.set(m, o) : y.delete(m)), y.has(m) && y.get(m) !== o) {
|
|
1322
|
+
const E = y.get(m);
|
|
1323
|
+
E && (E.expanded = !1);
|
|
1517
1324
|
}
|
|
1518
1325
|
}
|
|
1519
|
-
function l(
|
|
1520
|
-
|
|
1326
|
+
function l(s) {
|
|
1327
|
+
s && (s.stopPropagation(), s.preventDefault());
|
|
1521
1328
|
}
|
|
1522
|
-
function
|
|
1329
|
+
function i() {
|
|
1523
1330
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1524
|
-
const
|
|
1525
|
-
Array.from(
|
|
1331
|
+
const s = document.getElementsByClassName("dgComponentSelected");
|
|
1332
|
+
Array.from(s).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1526
1333
|
}
|
|
1527
|
-
function
|
|
1528
|
-
|
|
1334
|
+
function d(s) {
|
|
1335
|
+
s.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1529
1336
|
}
|
|
1530
|
-
function
|
|
1337
|
+
function c(s) {
|
|
1531
1338
|
const {
|
|
1532
1339
|
buttons: o = []
|
|
1533
1340
|
} = t.schema;
|
|
1534
|
-
let
|
|
1535
|
-
o.forEach((
|
|
1536
|
-
|
|
1341
|
+
let a = [];
|
|
1342
|
+
o.forEach((E) => {
|
|
1343
|
+
a = a.concat(E.children || []);
|
|
1537
1344
|
});
|
|
1538
|
-
const
|
|
1345
|
+
const m = a.findIndex((E) => E.id === s), B = m === -1 ? null : a[m];
|
|
1539
1346
|
return {
|
|
1540
|
-
index:
|
|
1541
|
-
item:
|
|
1347
|
+
index: m,
|
|
1348
|
+
item: B
|
|
1542
1349
|
};
|
|
1543
1350
|
}
|
|
1544
|
-
function C(
|
|
1351
|
+
function C(s) {
|
|
1545
1352
|
const {
|
|
1546
1353
|
buttons: o = []
|
|
1547
|
-
} = t.schema,
|
|
1354
|
+
} = t.schema, a = o.findIndex((B) => B.id === s), m = a === -1 ? null : o[a];
|
|
1548
1355
|
return {
|
|
1549
|
-
index:
|
|
1550
|
-
item:
|
|
1356
|
+
index: a,
|
|
1357
|
+
item: m
|
|
1551
1358
|
};
|
|
1552
1359
|
}
|
|
1553
|
-
function w(
|
|
1554
|
-
var
|
|
1360
|
+
function w(s) {
|
|
1361
|
+
var m;
|
|
1555
1362
|
t.schema;
|
|
1556
1363
|
const {
|
|
1557
1364
|
index: o,
|
|
1558
|
-
item:
|
|
1559
|
-
} =
|
|
1560
|
-
(
|
|
1365
|
+
item: a
|
|
1366
|
+
} = c(s);
|
|
1367
|
+
(m = t == null ? void 0 : t.setupContext) == null || m.emit("selectionChange", a == null ? void 0 : a.type, a);
|
|
1561
1368
|
}
|
|
1562
|
-
const
|
|
1369
|
+
const j = function(s) {
|
|
1563
1370
|
const {
|
|
1564
1371
|
componentType: o
|
|
1565
|
-
} =
|
|
1566
|
-
return
|
|
1567
|
-
},
|
|
1568
|
-
const
|
|
1372
|
+
} = s, a = U(o, s), m = o.toLowerCase().replace("-", "_");
|
|
1373
|
+
return a && !a.id && a.type === o && (a.id = `${m}_${Math.random().toString().slice(2, 6)}`), a;
|
|
1374
|
+
}, I = function() {
|
|
1375
|
+
const s = {
|
|
1569
1376
|
componentType: "response-toolbar-item",
|
|
1570
1377
|
parentComponentInstance: e.value,
|
|
1571
1378
|
targetPosition: -1
|
|
1572
1379
|
};
|
|
1573
|
-
return
|
|
1380
|
+
return j(s);
|
|
1574
1381
|
};
|
|
1575
|
-
function
|
|
1576
|
-
l(
|
|
1382
|
+
function P(s, o) {
|
|
1383
|
+
l(s), i(), d(s), w(o.id);
|
|
1577
1384
|
}
|
|
1578
|
-
function A(
|
|
1579
|
-
l(
|
|
1580
|
-
const
|
|
1581
|
-
buttons:
|
|
1385
|
+
function A(s, o, a) {
|
|
1386
|
+
l(s);
|
|
1387
|
+
const m = o.id, B = a && a.id, {
|
|
1388
|
+
buttons: E = []
|
|
1582
1389
|
} = t.schema;
|
|
1583
|
-
if (!
|
|
1390
|
+
if (!B)
|
|
1584
1391
|
return;
|
|
1585
1392
|
const {
|
|
1586
|
-
index:
|
|
1587
|
-
} = C(
|
|
1588
|
-
if (
|
|
1393
|
+
index: R
|
|
1394
|
+
} = C(B);
|
|
1395
|
+
if (R === -1)
|
|
1589
1396
|
return;
|
|
1590
1397
|
const {
|
|
1591
|
-
index:
|
|
1592
|
-
} =
|
|
1593
|
-
|
|
1594
|
-
}
|
|
1595
|
-
function
|
|
1596
|
-
l(
|
|
1597
|
-
const
|
|
1598
|
-
buttons:
|
|
1398
|
+
index: L
|
|
1399
|
+
} = c(m);
|
|
1400
|
+
L !== -1 && (E[R].children.splice(L, 1), u());
|
|
1401
|
+
}
|
|
1402
|
+
function $(s, o, a) {
|
|
1403
|
+
l(s);
|
|
1404
|
+
const m = a && a.id, {
|
|
1405
|
+
buttons: B = []
|
|
1599
1406
|
} = t.schema;
|
|
1600
|
-
if (!
|
|
1407
|
+
if (!m)
|
|
1601
1408
|
return;
|
|
1602
1409
|
const {
|
|
1603
|
-
index:
|
|
1604
|
-
} = C(
|
|
1605
|
-
if (
|
|
1410
|
+
index: E
|
|
1411
|
+
} = C(m);
|
|
1412
|
+
if (E === -1)
|
|
1606
1413
|
return;
|
|
1607
|
-
const
|
|
1414
|
+
const R = I(), L = Object.assign({}, R, {
|
|
1608
1415
|
text: o.text
|
|
1609
1416
|
});
|
|
1610
|
-
|
|
1417
|
+
B[E].children.push(L), u();
|
|
1611
1418
|
}
|
|
1612
|
-
function v(
|
|
1613
|
-
l(
|
|
1614
|
-
const
|
|
1615
|
-
buttons:
|
|
1419
|
+
function v(s, o, a) {
|
|
1420
|
+
l(s);
|
|
1421
|
+
const m = a && a.id, {
|
|
1422
|
+
buttons: B = []
|
|
1616
1423
|
} = t.schema;
|
|
1617
|
-
if (!
|
|
1424
|
+
if (!m)
|
|
1618
1425
|
return;
|
|
1619
1426
|
const {
|
|
1620
|
-
index:
|
|
1621
|
-
} = C(
|
|
1622
|
-
if (
|
|
1427
|
+
index: E
|
|
1428
|
+
} = C(m);
|
|
1429
|
+
if (E === -1)
|
|
1623
1430
|
return;
|
|
1624
|
-
const
|
|
1431
|
+
const R = I(), L = Object.assign({}, R, {
|
|
1625
1432
|
text: "按钮"
|
|
1626
1433
|
});
|
|
1627
|
-
|
|
1434
|
+
B[E].children.push(L), u();
|
|
1628
1435
|
}
|
|
1629
|
-
function
|
|
1436
|
+
function f(s, o) {
|
|
1630
1437
|
return b("div", {
|
|
1631
1438
|
class: "component-btn-group"
|
|
1632
1439
|
}, [b("div", null, [b("div", {
|
|
@@ -1635,7 +1442,7 @@ function Ft(n, e) {
|
|
|
1635
1442
|
title: "删除",
|
|
1636
1443
|
ref: "removeButton",
|
|
1637
1444
|
style: "position:static;",
|
|
1638
|
-
onClick: (
|
|
1445
|
+
onClick: (a) => A(a, s, o)
|
|
1639
1446
|
}, [b("i", {
|
|
1640
1447
|
class: "f-icon f-icon-yxs_delete"
|
|
1641
1448
|
}, null)]), b("div", {
|
|
@@ -1644,7 +1451,7 @@ function Ft(n, e) {
|
|
|
1644
1451
|
title: "复制",
|
|
1645
1452
|
ref: "copyButton",
|
|
1646
1453
|
style: "position:static;",
|
|
1647
|
-
onClick: (
|
|
1454
|
+
onClick: (a) => $(a, s, o)
|
|
1648
1455
|
}, [b("i", {
|
|
1649
1456
|
class: "f-icon f-icon-yxs_copy"
|
|
1650
1457
|
}, null)]), b("div", {
|
|
@@ -1653,174 +1460,174 @@ function Ft(n, e) {
|
|
|
1653
1460
|
title: "新增同级",
|
|
1654
1461
|
ref: "appendSame",
|
|
1655
1462
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1656
|
-
onClick: (
|
|
1463
|
+
onClick: (a) => v(a, s, o)
|
|
1657
1464
|
}, [b("i", {
|
|
1658
1465
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1659
1466
|
}, null), b("span", {
|
|
1660
1467
|
style: "font-size:13px;margin:auto"
|
|
1661
|
-
}, [
|
|
1468
|
+
}, [Q("新增同级")])])])]);
|
|
1662
1469
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1665
|
-
class:
|
|
1470
|
+
function x(s) {
|
|
1471
|
+
return s.children.map((o) => o.children && o.children.length ? b("li", {
|
|
1472
|
+
class: g(o),
|
|
1666
1473
|
id: o.id,
|
|
1667
|
-
onClick: (
|
|
1474
|
+
onClick: (a) => o.enable && T(a, o, s)
|
|
1668
1475
|
}, [b("span", {
|
|
1669
1476
|
id: o.id,
|
|
1670
|
-
class:
|
|
1671
|
-
onMouseover: (
|
|
1477
|
+
class: D(o),
|
|
1478
|
+
onMouseover: (a) => o.enable && T(a, o, s)
|
|
1672
1479
|
}, [o.text, b("i", {
|
|
1673
1480
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1674
1481
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1675
|
-
}, null)]),
|
|
1676
|
-
class:
|
|
1482
|
+
}, null)]), S(o, o)]) : b("li", {
|
|
1483
|
+
class: D(o),
|
|
1677
1484
|
id: o.id,
|
|
1678
|
-
onClick: (
|
|
1679
|
-
}, [
|
|
1485
|
+
onClick: (a) => P(a, o)
|
|
1486
|
+
}, [f(o, s), n.shouldShowIcon(o) && b("i", {
|
|
1680
1487
|
class: n.iconClass(o)
|
|
1681
1488
|
}, null), o.text]));
|
|
1682
1489
|
}
|
|
1683
|
-
function
|
|
1684
|
-
const
|
|
1685
|
-
display:
|
|
1490
|
+
function k(s, o, a) {
|
|
1491
|
+
const m = {
|
|
1492
|
+
display: s.expanded ? "block" : "none",
|
|
1686
1493
|
position: "fixed",
|
|
1687
1494
|
maxWidth: "300px",
|
|
1688
1495
|
width: "auto",
|
|
1689
1496
|
minWidth: "120px"
|
|
1690
|
-
},
|
|
1691
|
-
if (
|
|
1497
|
+
}, B = document.getElementsByTagName("body")[0].getClientRects()[0].width, E = o, R = E == null ? void 0 : E.getClientRects();
|
|
1498
|
+
if (E && R && R.length) {
|
|
1692
1499
|
const {
|
|
1693
|
-
top:
|
|
1500
|
+
top: L,
|
|
1694
1501
|
width: N,
|
|
1695
|
-
left:
|
|
1502
|
+
left: _,
|
|
1696
1503
|
right: W,
|
|
1697
|
-
height:
|
|
1698
|
-
} =
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
if (
|
|
1702
|
-
|
|
1703
|
-
const
|
|
1704
|
-
if (
|
|
1705
|
-
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1504
|
+
height: q
|
|
1505
|
+
} = R[0], te = Math.ceil(q + L);
|
|
1506
|
+
m.top = `${te}px`, m.left = `${_}px`;
|
|
1507
|
+
const Re = s.id + "_menu", ne = o ? o.querySelector("#" + Re) : null;
|
|
1508
|
+
if (ne) {
|
|
1509
|
+
m.display === "block" && (ne.style.display = "block");
|
|
1510
|
+
const fe = ne.getBoundingClientRect();
|
|
1511
|
+
if (a) {
|
|
1512
|
+
m.top = `${L - 6}px`;
|
|
1513
|
+
const Ie = Math.ceil(N + _);
|
|
1514
|
+
m.left = `${Ie}px`;
|
|
1708
1515
|
}
|
|
1709
|
-
|
|
1516
|
+
B - _ - N < fe.width && (m.left = `${(a ? _ : W) - fe.width}px`);
|
|
1710
1517
|
}
|
|
1711
1518
|
}
|
|
1712
|
-
return
|
|
1519
|
+
return m;
|
|
1713
1520
|
}
|
|
1714
|
-
|
|
1715
|
-
var
|
|
1716
|
-
const
|
|
1521
|
+
S = function(s, o) {
|
|
1522
|
+
var E, R;
|
|
1523
|
+
const a = ve(), m = o ? o.id : s.id, B = (R = (E = a == null ? void 0 : a.exposed) == null ? void 0 : E.elementRef.value) == null ? void 0 : R.querySelector("#" + m);
|
|
1717
1524
|
return b("ul", {
|
|
1718
|
-
class:
|
|
1719
|
-
style:
|
|
1720
|
-
id:
|
|
1721
|
-
}, [
|
|
1525
|
+
class: h(s),
|
|
1526
|
+
style: k(s, B, o),
|
|
1527
|
+
id: s.id + "_menu"
|
|
1528
|
+
}, [x(s)]);
|
|
1722
1529
|
};
|
|
1723
|
-
function
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
}),
|
|
1530
|
+
function p() {
|
|
1531
|
+
y.forEach((s) => {
|
|
1532
|
+
s.expanded = !1;
|
|
1533
|
+
}), y.clear();
|
|
1727
1534
|
}
|
|
1728
1535
|
return {
|
|
1729
|
-
renderDropdownMenu:
|
|
1730
|
-
clearAllDropDownMenu:
|
|
1536
|
+
renderDropdownMenu: S,
|
|
1537
|
+
clearAllDropDownMenu: p
|
|
1731
1538
|
};
|
|
1732
1539
|
}
|
|
1733
|
-
function
|
|
1734
|
-
const
|
|
1735
|
-
renderDropdownMenu:
|
|
1736
|
-
clearAllDropDownMenu:
|
|
1737
|
-
} =
|
|
1540
|
+
function Nt(n, e, t) {
|
|
1541
|
+
const r = M(n.alignment), {
|
|
1542
|
+
renderDropdownMenu: u,
|
|
1543
|
+
clearAllDropDownMenu: h
|
|
1544
|
+
} = $t(e, t), g = V("design-item-context"), D = V("toolbar-item-handler", () => {
|
|
1738
1545
|
});
|
|
1739
|
-
function
|
|
1740
|
-
|
|
1546
|
+
function S() {
|
|
1547
|
+
D && D();
|
|
1741
1548
|
}
|
|
1742
|
-
function
|
|
1743
|
-
const
|
|
1549
|
+
function y(p) {
|
|
1550
|
+
const s = {
|
|
1744
1551
|
"btn-group": !0,
|
|
1745
1552
|
"f-rt-dropdown": !0,
|
|
1746
|
-
"f-btn-ml":
|
|
1747
|
-
"f-btn-mr":
|
|
1748
|
-
}, o =
|
|
1749
|
-
return o && o.length && o.reduce((
|
|
1553
|
+
"f-btn-ml": r.value === "right",
|
|
1554
|
+
"f-btn-mr": r.value === "left"
|
|
1555
|
+
}, o = p.dropdownClass.split(" ");
|
|
1556
|
+
return o && o.length && o.reduce((a, m) => (a[m] = !0, a), s), s;
|
|
1750
1557
|
}
|
|
1751
|
-
function T(
|
|
1752
|
-
const
|
|
1558
|
+
function T(p) {
|
|
1559
|
+
const s = {
|
|
1753
1560
|
btn: !0,
|
|
1754
|
-
disabled: !
|
|
1561
|
+
disabled: !p.enable,
|
|
1755
1562
|
"position-relative": !0,
|
|
1756
1563
|
"farris-component": !0,
|
|
1757
1564
|
"f-rt-btn": !0,
|
|
1758
|
-
"btn-icontext": !!(
|
|
1565
|
+
"btn-icontext": !!(p.icon && p.icon.trim())
|
|
1759
1566
|
};
|
|
1760
|
-
if (
|
|
1761
|
-
const o =
|
|
1762
|
-
o && o.length && o.reduce((
|
|
1567
|
+
if (p.class) {
|
|
1568
|
+
const o = p.class.split(" ");
|
|
1569
|
+
o && o.length && o.reduce((a, m) => (a[m] = !0, a), s);
|
|
1763
1570
|
}
|
|
1764
|
-
return
|
|
1571
|
+
return s;
|
|
1765
1572
|
}
|
|
1766
|
-
function l(
|
|
1767
|
-
|
|
1573
|
+
function l(p) {
|
|
1574
|
+
p && (p.stopPropagation(), p.preventDefault());
|
|
1768
1575
|
}
|
|
1769
|
-
function
|
|
1770
|
-
l(
|
|
1771
|
-
const o =
|
|
1772
|
-
document.body.click(),
|
|
1576
|
+
function i(p, s) {
|
|
1577
|
+
l(p);
|
|
1578
|
+
const o = s.expanded;
|
|
1579
|
+
document.body.click(), s.expanded = !o;
|
|
1773
1580
|
}
|
|
1774
|
-
const
|
|
1581
|
+
const d = function(p) {
|
|
1775
1582
|
const {
|
|
1776
|
-
componentType:
|
|
1777
|
-
} =
|
|
1778
|
-
return o && !o.id && o.type ===
|
|
1779
|
-
},
|
|
1780
|
-
const
|
|
1583
|
+
componentType: s
|
|
1584
|
+
} = p, o = U(s, p), a = s.toLowerCase().replace("-", "_");
|
|
1585
|
+
return o && !o.id && o.type === s && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1586
|
+
}, c = function() {
|
|
1587
|
+
const p = {
|
|
1781
1588
|
componentType: "response-toolbar-item",
|
|
1782
1589
|
parentComponentInstance: t.value,
|
|
1783
1590
|
targetPosition: -1
|
|
1784
1591
|
};
|
|
1785
|
-
return
|
|
1592
|
+
return d(p);
|
|
1786
1593
|
};
|
|
1787
|
-
function C(
|
|
1788
|
-
const
|
|
1594
|
+
function C(p) {
|
|
1595
|
+
const s = g.schema.buttons || g.schema.contents, o = s == null ? void 0 : s.findIndex((m) => m.id === p), a = o === -1 ? null : s[o];
|
|
1789
1596
|
return {
|
|
1790
1597
|
index: o,
|
|
1791
|
-
toolbarItem:
|
|
1598
|
+
toolbarItem: a
|
|
1792
1599
|
};
|
|
1793
1600
|
}
|
|
1794
|
-
function w(
|
|
1795
|
-
var
|
|
1601
|
+
function w(p, s) {
|
|
1602
|
+
var R;
|
|
1796
1603
|
const {
|
|
1797
1604
|
index: o,
|
|
1798
|
-
toolbarItem:
|
|
1799
|
-
} = C(
|
|
1605
|
+
toolbarItem: a
|
|
1606
|
+
} = C(s);
|
|
1800
1607
|
if (o === -1)
|
|
1801
1608
|
return;
|
|
1802
|
-
const
|
|
1803
|
-
text:
|
|
1609
|
+
const m = a.text || "按钮", B = c(), E = Object.assign({}, B, {
|
|
1610
|
+
text: m
|
|
1804
1611
|
});
|
|
1805
|
-
(
|
|
1612
|
+
(R = g.schema.buttons) == null || R.push(E), S();
|
|
1806
1613
|
}
|
|
1807
|
-
function
|
|
1614
|
+
function j(p, s) {
|
|
1808
1615
|
const {
|
|
1809
1616
|
index: o,
|
|
1810
|
-
toolbarItem:
|
|
1811
|
-
} = C(
|
|
1617
|
+
toolbarItem: a
|
|
1618
|
+
} = C(s);
|
|
1812
1619
|
if (o === -1)
|
|
1813
1620
|
return;
|
|
1814
|
-
const
|
|
1815
|
-
text:
|
|
1816
|
-
}),
|
|
1817
|
-
|
|
1621
|
+
const m = a.text || "按钮", B = c(), E = Object.assign({}, B, {
|
|
1622
|
+
text: m
|
|
1623
|
+
}), R = g.schema.buttons[o].children || [];
|
|
1624
|
+
R.push(E), g.schema.buttons[o].children = R, S();
|
|
1818
1625
|
}
|
|
1819
|
-
function
|
|
1820
|
-
const o =
|
|
1821
|
-
|
|
1626
|
+
function I(p, s) {
|
|
1627
|
+
const o = g.schema.buttons || g.schema.contents, a = o == null ? void 0 : o.findIndex((m) => m.id === s);
|
|
1628
|
+
a !== -1 && (o.splice(a, 1), S());
|
|
1822
1629
|
}
|
|
1823
|
-
function
|
|
1630
|
+
function P(p) {
|
|
1824
1631
|
return b("div", {
|
|
1825
1632
|
class: "component-btn-group"
|
|
1826
1633
|
}, [b("div", null, [b("div", {
|
|
@@ -1829,7 +1636,7 @@ function Rt(n, e, t) {
|
|
|
1829
1636
|
title: "删除",
|
|
1830
1637
|
ref: "removeButton",
|
|
1831
1638
|
style: "position:static;",
|
|
1832
|
-
onClick: (
|
|
1639
|
+
onClick: (s) => I(s, p)
|
|
1833
1640
|
}, [b("i", {
|
|
1834
1641
|
class: "f-icon f-icon-yxs_delete"
|
|
1835
1642
|
}, null)]), b("div", {
|
|
@@ -1838,7 +1645,7 @@ function Rt(n, e, t) {
|
|
|
1838
1645
|
title: "复制",
|
|
1839
1646
|
ref: "copyButton",
|
|
1840
1647
|
style: "position:static;",
|
|
1841
|
-
onClick: (
|
|
1648
|
+
onClick: (s) => w(s, p)
|
|
1842
1649
|
}, [b("i", {
|
|
1843
1650
|
class: "f-icon f-icon-yxs_copy"
|
|
1844
1651
|
}, null)]), b("div", {
|
|
@@ -1847,67 +1654,67 @@ function Rt(n, e, t) {
|
|
|
1847
1654
|
title: "新增子级",
|
|
1848
1655
|
ref: "appendChildButton",
|
|
1849
1656
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1850
|
-
onClick: (
|
|
1657
|
+
onClick: (s) => j(s, p)
|
|
1851
1658
|
}, [b("i", {
|
|
1852
1659
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1853
1660
|
}, null), b("span", {
|
|
1854
1661
|
style: "font-size:13px;margin:auto"
|
|
1855
|
-
}, [
|
|
1662
|
+
}, [Q("新增子级")])])])]);
|
|
1856
1663
|
}
|
|
1857
1664
|
function A() {
|
|
1858
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1859
|
-
const
|
|
1860
|
-
Array.from(
|
|
1665
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((s) => s.classList.remove("dgComponentFocused"));
|
|
1666
|
+
const p = document.getElementsByClassName("dgComponentSelected");
|
|
1667
|
+
Array.from(p).forEach((s) => s.classList.remove("dgComponentSelected"));
|
|
1861
1668
|
}
|
|
1862
|
-
function
|
|
1863
|
-
|
|
1669
|
+
function $(p) {
|
|
1670
|
+
p.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1864
1671
|
}
|
|
1865
|
-
function v(
|
|
1866
|
-
var
|
|
1867
|
-
const
|
|
1672
|
+
function v(p) {
|
|
1673
|
+
var m;
|
|
1674
|
+
const s = g.schema.buttons || g.schema.contents, o = s == null ? void 0 : s.findIndex((B) => B.id === p);
|
|
1868
1675
|
if (o === -1)
|
|
1869
1676
|
return;
|
|
1870
|
-
const
|
|
1871
|
-
(
|
|
1677
|
+
const a = s[o];
|
|
1678
|
+
(m = g == null ? void 0 : g.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", a);
|
|
1872
1679
|
}
|
|
1873
|
-
function
|
|
1874
|
-
l(
|
|
1680
|
+
function f(p, s) {
|
|
1681
|
+
l(p), A(), $(p), l(p), i(p, s), v(s.id);
|
|
1875
1682
|
}
|
|
1876
|
-
function
|
|
1683
|
+
function x(p) {
|
|
1877
1684
|
return b("div", {
|
|
1878
|
-
id:
|
|
1879
|
-
class:
|
|
1685
|
+
id: p.id,
|
|
1686
|
+
class: y(p)
|
|
1880
1687
|
}, [b("div", {
|
|
1881
|
-
class: T(
|
|
1688
|
+
class: T(p),
|
|
1882
1689
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1883
|
-
onClick: (
|
|
1884
|
-
}, [
|
|
1885
|
-
class: e.iconClass(
|
|
1886
|
-
}, null), b("span", null, [
|
|
1690
|
+
onClick: (s) => p.enable && f(s, p)
|
|
1691
|
+
}, [P(p.id), e.shouldShowIcon(p) && b("i", {
|
|
1692
|
+
class: e.iconClass(p)
|
|
1693
|
+
}, null), b("span", null, [p.text]), b("i", {
|
|
1887
1694
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1888
1695
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1889
|
-
}, null)]), p
|
|
1696
|
+
}, null)]), u(p)]);
|
|
1890
1697
|
}
|
|
1891
|
-
function
|
|
1892
|
-
|
|
1698
|
+
function k() {
|
|
1699
|
+
h();
|
|
1893
1700
|
}
|
|
1894
1701
|
return {
|
|
1895
|
-
renderToolbarDropdown:
|
|
1896
|
-
clearAllDropDown:
|
|
1702
|
+
renderToolbarDropdown: x,
|
|
1703
|
+
clearAllDropDown: k
|
|
1897
1704
|
};
|
|
1898
1705
|
}
|
|
1899
|
-
function
|
|
1706
|
+
function _t() {
|
|
1900
1707
|
function n(e) {
|
|
1901
|
-
var
|
|
1708
|
+
var u, h;
|
|
1902
1709
|
if (!e)
|
|
1903
1710
|
return !1;
|
|
1904
|
-
const t = ((
|
|
1711
|
+
const t = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1905
1712
|
if (!t)
|
|
1906
1713
|
return !1;
|
|
1907
|
-
const
|
|
1714
|
+
const r = (h = t.schema.appearance) == null ? void 0 : h.class;
|
|
1908
1715
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1909
|
-
const
|
|
1910
|
-
if (t.schema.type !== "response-layout-item" && !
|
|
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)
|
|
1911
1718
|
return !1;
|
|
1912
1719
|
}
|
|
1913
1720
|
return e.controlType !== "field-set";
|
|
@@ -1916,7 +1723,7 @@ function Ot() {
|
|
|
1916
1723
|
basalDragulaRuleForContainer: n
|
|
1917
1724
|
};
|
|
1918
1725
|
}
|
|
1919
|
-
const
|
|
1726
|
+
const Ft = "https://json-schema.org/draft/2020-12/schema", Lt = "https://farris-design.gitee.io/dragging-rules.schema.json", Vt = "Dragging Rules", Wt = "The rules of designer canvas", Ut = "object", qt = {
|
|
1920
1727
|
"f-page": {
|
|
1921
1728
|
description: "The root class of page designed by farris.",
|
|
1922
1729
|
type: "object",
|
|
@@ -2335,6 +2142,80 @@ const Lt = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-
|
|
|
2335
2142
|
"f-list-nav-left": {
|
|
2336
2143
|
description: "",
|
|
2337
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
|
+
}
|
|
2338
2219
|
}
|
|
2339
2220
|
}
|
|
2340
2221
|
}
|
|
@@ -2480,106 +2361,105 @@ const Lt = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-
|
|
|
2480
2361
|
description: "",
|
|
2481
2362
|
type: "object"
|
|
2482
2363
|
}
|
|
2483
|
-
},
|
|
2484
|
-
$schema:
|
|
2485
|
-
$id:
|
|
2486
|
-
title:
|
|
2487
|
-
description:
|
|
2488
|
-
type:
|
|
2489
|
-
properties:
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
function
|
|
2493
|
-
|
|
2494
|
-
var R;
|
|
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;
|
|
2495
2375
|
if (typeof w == "number")
|
|
2496
|
-
return ((
|
|
2376
|
+
return ((I = j[c]) == null ? void 0 : I.length) === w;
|
|
2497
2377
|
if (typeof w == "object") {
|
|
2498
|
-
const
|
|
2499
|
-
if (
|
|
2500
|
-
return Number(
|
|
2501
|
-
if (
|
|
2502
|
-
return Number(
|
|
2503
|
-
if (
|
|
2504
|
-
return Number(
|
|
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);
|
|
2505
2385
|
}
|
|
2506
2386
|
return !1;
|
|
2507
2387
|
}
|
|
2508
|
-
function e(
|
|
2509
|
-
return typeof w == "boolean" ?
|
|
2388
|
+
function e(c, C, w, j) {
|
|
2389
|
+
return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
|
|
2510
2390
|
}
|
|
2511
|
-
function t(
|
|
2512
|
-
return typeof w == "boolean" ?
|
|
2391
|
+
function t(c, C, w, j) {
|
|
2392
|
+
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2513
2393
|
}
|
|
2514
|
-
function
|
|
2515
|
-
return typeof w == "boolean" ?
|
|
2394
|
+
function r(c, C, w, j) {
|
|
2395
|
+
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2516
2396
|
}
|
|
2517
|
-
const
|
|
2397
|
+
const u = /* @__PURE__ */ new Map([
|
|
2518
2398
|
["length", n],
|
|
2519
2399
|
["hasChildren", e],
|
|
2520
|
-
["hasSibling",
|
|
2400
|
+
["hasSibling", r],
|
|
2521
2401
|
["hasParent", t]
|
|
2522
2402
|
]);
|
|
2523
|
-
function
|
|
2524
|
-
const w =
|
|
2525
|
-
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((
|
|
2526
|
-
if (
|
|
2527
|
-
return { target: w, operator: "length", param: null, value: C[
|
|
2528
|
-
const
|
|
2529
|
-
return { target: w, operator:
|
|
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 };
|
|
2530
2410
|
}) : [];
|
|
2531
2411
|
}
|
|
2532
|
-
function
|
|
2533
|
-
if (
|
|
2534
|
-
const w =
|
|
2535
|
-
return w && w(
|
|
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;
|
|
2536
2416
|
}
|
|
2537
2417
|
return !1;
|
|
2538
2418
|
}
|
|
2539
|
-
function
|
|
2540
|
-
return Object.keys(
|
|
2541
|
-
const
|
|
2542
|
-
return
|
|
2543
|
-
}, []).reduce((
|
|
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);
|
|
2544
2424
|
}
|
|
2545
|
-
function
|
|
2546
|
-
const w = Object.keys(
|
|
2547
|
-
return
|
|
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);
|
|
2548
2428
|
}
|
|
2549
|
-
function
|
|
2550
|
-
const w =
|
|
2551
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ?
|
|
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;
|
|
2552
2432
|
}
|
|
2553
|
-
function T(
|
|
2433
|
+
function T(c) {
|
|
2554
2434
|
return (C) => {
|
|
2555
2435
|
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2556
|
-
return
|
|
2557
|
-
const
|
|
2558
|
-
return
|
|
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;
|
|
2559
2439
|
}, w), w;
|
|
2560
2440
|
};
|
|
2561
2441
|
}
|
|
2562
|
-
function l(
|
|
2442
|
+
function l(c, C, w) {
|
|
2563
2443
|
if (C.type === "object" && C.properties) {
|
|
2564
|
-
const { rules:
|
|
2565
|
-
w.set(
|
|
2566
|
-
(
|
|
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)
|
|
2567
2447
|
);
|
|
2568
2448
|
}
|
|
2569
2449
|
}
|
|
2570
|
-
function
|
|
2571
|
-
const { properties:
|
|
2572
|
-
Object.keys(
|
|
2573
|
-
l(C,
|
|
2450
|
+
function i() {
|
|
2451
|
+
const { properties: c } = Ht;
|
|
2452
|
+
Object.keys(c).forEach((C) => {
|
|
2453
|
+
l(C, c[C], se);
|
|
2574
2454
|
});
|
|
2575
2455
|
}
|
|
2576
|
-
function
|
|
2456
|
+
function d(c, C) {
|
|
2577
2457
|
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2578
|
-
return
|
|
2458
|
+
return se.has(c) ? se.get(c)(C) : w;
|
|
2579
2459
|
}
|
|
2580
|
-
return
|
|
2460
|
+
return i(), { getRuleValue: d };
|
|
2581
2461
|
}
|
|
2582
|
-
class
|
|
2462
|
+
class zt extends ee {
|
|
2583
2463
|
constructor(e, t) {
|
|
2584
2464
|
super(e, t);
|
|
2585
2465
|
}
|
|
@@ -2605,7 +2485,7 @@ class Ht extends J {
|
|
|
2605
2485
|
type: "combo-list",
|
|
2606
2486
|
textField: "value",
|
|
2607
2487
|
valueField: "key",
|
|
2608
|
-
data: [{ key: "response-toolbar", value:
|
|
2488
|
+
data: [{ key: "response-toolbar", value: K["response-toolbar"].name }]
|
|
2609
2489
|
}
|
|
2610
2490
|
}
|
|
2611
2491
|
}
|
|
@@ -2648,85 +2528,85 @@ class Ht extends J {
|
|
|
2648
2528
|
};
|
|
2649
2529
|
}
|
|
2650
2530
|
}
|
|
2651
|
-
function
|
|
2652
|
-
const
|
|
2653
|
-
let
|
|
2531
|
+
function Gt(n, e, t, r) {
|
|
2532
|
+
const u = Me(), h = M(!1), g = M(!1);
|
|
2533
|
+
let D = !0, S = !1, y;
|
|
2654
2534
|
function T(v) {
|
|
2655
|
-
return
|
|
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;
|
|
2656
2536
|
}
|
|
2657
2537
|
function l(v) {
|
|
2658
|
-
return !
|
|
2659
|
-
}
|
|
2660
|
-
function
|
|
2661
|
-
|
|
2662
|
-
const v = n,
|
|
2663
|
-
const
|
|
2664
|
-
return
|
|
2665
|
-
}, []) : [],
|
|
2666
|
-
|
|
2667
|
-
componentClass:
|
|
2668
|
-
componentClassList:
|
|
2669
|
-
childContents:
|
|
2670
|
-
firstChildContent:
|
|
2671
|
-
firstChildClass:
|
|
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,
|
|
2672
2552
|
firstChildClassList: o,
|
|
2673
|
-
parent:
|
|
2674
|
-
parentClass:
|
|
2675
|
-
parentClassList:
|
|
2676
|
-
children:
|
|
2677
|
-
childrenClassList:
|
|
2553
|
+
parent: m,
|
|
2554
|
+
parentClass: B,
|
|
2555
|
+
parentClassList: E,
|
|
2556
|
+
children: k,
|
|
2557
|
+
childrenClassList: a
|
|
2678
2558
|
};
|
|
2679
|
-
const { canAccept:
|
|
2680
|
-
return
|
|
2559
|
+
const { canAccept: R, fixed: L, hidePadding: N } = u.getRuleValue(x[0], y);
|
|
2560
|
+
return D = R, S = N, !0;
|
|
2681
2561
|
}
|
|
2682
|
-
function
|
|
2562
|
+
function d(v) {
|
|
2683
2563
|
}
|
|
2684
|
-
function
|
|
2564
|
+
function c() {
|
|
2685
2565
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2686
2566
|
}
|
|
2687
|
-
function C(v,
|
|
2688
|
-
return
|
|
2567
|
+
function C(v, f) {
|
|
2568
|
+
return f.text = v.label, f;
|
|
2689
2569
|
}
|
|
2690
|
-
function w(v,
|
|
2691
|
-
const
|
|
2692
|
-
if ((
|
|
2693
|
-
const o = String(v.innerText),
|
|
2694
|
-
return
|
|
2570
|
+
function w(v, f, x) {
|
|
2571
|
+
const k = n;
|
|
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;
|
|
2695
2575
|
}
|
|
2696
|
-
return
|
|
2576
|
+
return x;
|
|
2697
2577
|
}
|
|
2698
|
-
function
|
|
2578
|
+
function j() {
|
|
2699
2579
|
return !1;
|
|
2700
2580
|
}
|
|
2701
|
-
function
|
|
2581
|
+
function I() {
|
|
2702
2582
|
return !1;
|
|
2703
2583
|
}
|
|
2704
|
-
function
|
|
2584
|
+
function P() {
|
|
2705
2585
|
return !0;
|
|
2706
2586
|
}
|
|
2707
2587
|
function A() {
|
|
2708
|
-
return
|
|
2588
|
+
return S;
|
|
2709
2589
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return new
|
|
2590
|
+
function $(v) {
|
|
2591
|
+
return new zt(v, e).getPropertyConfig(n);
|
|
2712
2592
|
}
|
|
2713
2593
|
return {
|
|
2714
2594
|
canAccepts: l,
|
|
2715
|
-
checkCanAddComponent:
|
|
2716
|
-
checkCanDeleteComponent:
|
|
2717
|
-
checkCanMoveComponent:
|
|
2718
|
-
getStyles:
|
|
2595
|
+
checkCanAddComponent: P,
|
|
2596
|
+
checkCanDeleteComponent: I,
|
|
2597
|
+
checkCanMoveComponent: j,
|
|
2598
|
+
getStyles: c,
|
|
2719
2599
|
hideNestedPaddingInDesginerView: A,
|
|
2720
2600
|
onAcceptNewChildElement: w,
|
|
2721
|
-
onAcceptMovedChildElement:
|
|
2601
|
+
onAcceptMovedChildElement: d,
|
|
2722
2602
|
onResolveNewComponentSchema: C,
|
|
2723
|
-
resolveComponentContext:
|
|
2724
|
-
getPropsConfig:
|
|
2725
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2726
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2603
|
+
resolveComponentContext: i,
|
|
2604
|
+
getPropsConfig: $,
|
|
2605
|
+
triggerBelongedComponentToMoveWhenMoved: h,
|
|
2606
|
+
triggerBelongedComponentToDeleteWhenDeleted: g
|
|
2727
2607
|
};
|
|
2728
2608
|
}
|
|
2729
|
-
const
|
|
2609
|
+
const Jt = {
|
|
2730
2610
|
id: { type: String, default: "" },
|
|
2731
2611
|
componentId: { type: String, default: "" },
|
|
2732
2612
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2739,10 +2619,10 @@ const Gt = {
|
|
|
2739
2619
|
* 组件值
|
|
2740
2620
|
*/
|
|
2741
2621
|
modelValue: { type: Object }
|
|
2742
|
-
},
|
|
2622
|
+
}, X = M(0);
|
|
2743
2623
|
function Qt(n, e) {
|
|
2744
|
-
const t = e.getBoundingClientRect(),
|
|
2745
|
-
return
|
|
2624
|
+
const t = e.getBoundingClientRect(), r = n.getBoundingClientRect(), u = r.top >= t.top, h = r.top <= t.bottom;
|
|
2625
|
+
return u && h;
|
|
2746
2626
|
}
|
|
2747
2627
|
function Xt(n) {
|
|
2748
2628
|
if (!n)
|
|
@@ -2753,35 +2633,35 @@ function Xt(n) {
|
|
|
2753
2633
|
const t = e.getBoundingClientRect();
|
|
2754
2634
|
if (t.width === 0 && t.height === 0)
|
|
2755
2635
|
return;
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2636
|
+
const r = e.querySelector(".component-btn-group");
|
|
2637
|
+
if (r) {
|
|
2758
2638
|
if (!Qt(e, n)) {
|
|
2759
|
-
|
|
2639
|
+
r.style.display = "none";
|
|
2760
2640
|
return;
|
|
2761
2641
|
}
|
|
2762
|
-
|
|
2763
|
-
const
|
|
2764
|
-
if (
|
|
2765
|
-
const
|
|
2766
|
-
|
|
2642
|
+
r.style.display = "";
|
|
2643
|
+
const h = r.getBoundingClientRect(), g = r.querySelector("div");
|
|
2644
|
+
if (g) {
|
|
2645
|
+
const D = g.getBoundingClientRect();
|
|
2646
|
+
g.style.top = h.top + "px", g.style.left = h.left - D.width + "px";
|
|
2767
2647
|
}
|
|
2768
2648
|
}
|
|
2769
2649
|
}
|
|
2770
2650
|
function Yt(n, e, t) {
|
|
2771
|
-
var
|
|
2772
|
-
function
|
|
2651
|
+
var $;
|
|
2652
|
+
function r() {
|
|
2773
2653
|
}
|
|
2774
|
-
const
|
|
2775
|
-
function
|
|
2654
|
+
const u = "", h = M();
|
|
2655
|
+
function g() {
|
|
2776
2656
|
return !0;
|
|
2777
2657
|
}
|
|
2778
|
-
function
|
|
2658
|
+
function D() {
|
|
2779
2659
|
return !1;
|
|
2780
2660
|
}
|
|
2781
|
-
function
|
|
2661
|
+
function S() {
|
|
2782
2662
|
return !0;
|
|
2783
2663
|
}
|
|
2784
|
-
function
|
|
2664
|
+
function y() {
|
|
2785
2665
|
return !0;
|
|
2786
2666
|
}
|
|
2787
2667
|
function T() {
|
|
@@ -2790,135 +2670,135 @@ function Yt(n, e, t) {
|
|
|
2790
2670
|
function l(v) {
|
|
2791
2671
|
if (!v || !v.value)
|
|
2792
2672
|
return null;
|
|
2793
|
-
const
|
|
2794
|
-
return
|
|
2673
|
+
const f = M(v == null ? void 0 : v.value.parent), x = l(f);
|
|
2674
|
+
return x || null;
|
|
2795
2675
|
}
|
|
2796
|
-
function
|
|
2797
|
-
const { componentInstance:
|
|
2798
|
-
return !
|
|
2676
|
+
function i(v = e) {
|
|
2677
|
+
const { componentInstance: f, designerItemElementRef: x } = v;
|
|
2678
|
+
return !f || !f.value ? null : f.value.canMove || f.value.canAdd || f.value.canDelete ? x : i(v.parent);
|
|
2799
2679
|
}
|
|
2800
|
-
function
|
|
2680
|
+
function d(v) {
|
|
2801
2681
|
return !!t;
|
|
2802
2682
|
}
|
|
2803
|
-
function
|
|
2683
|
+
function c() {
|
|
2804
2684
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2805
2685
|
}
|
|
2806
2686
|
function C() {
|
|
2807
2687
|
}
|
|
2808
|
-
function w(v,
|
|
2688
|
+
function w(v, f) {
|
|
2809
2689
|
}
|
|
2810
|
-
function
|
|
2811
|
-
const { componentType:
|
|
2812
|
-
let
|
|
2813
|
-
const
|
|
2814
|
-
return
|
|
2690
|
+
function j(v) {
|
|
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;
|
|
2815
2695
|
}
|
|
2816
|
-
function
|
|
2817
|
-
const
|
|
2818
|
-
|
|
2819
|
-
let
|
|
2820
|
-
const o =
|
|
2821
|
-
return
|
|
2696
|
+
function I(v, f) {
|
|
2697
|
+
const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
|
|
2698
|
+
p.parentComponentInstance = h.value;
|
|
2699
|
+
let s = U(x, p);
|
|
2700
|
+
const o = x.toLowerCase().replace("-", "_");
|
|
2701
|
+
return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
2822
2702
|
}
|
|
2823
|
-
function
|
|
2703
|
+
function P(v) {
|
|
2824
2704
|
}
|
|
2825
2705
|
function A(...v) {
|
|
2826
2706
|
return [];
|
|
2827
2707
|
}
|
|
2828
|
-
return
|
|
2829
|
-
canMove:
|
|
2830
|
-
canSelectParent:
|
|
2831
|
-
canAdd:
|
|
2832
|
-
canDelete:
|
|
2708
|
+
return h.value = {
|
|
2709
|
+
canMove: g(),
|
|
2710
|
+
canSelectParent: D(),
|
|
2711
|
+
canAdd: y(),
|
|
2712
|
+
canDelete: S(),
|
|
2833
2713
|
canNested: !T(),
|
|
2834
2714
|
contents: [],
|
|
2835
2715
|
elementRef: n,
|
|
2836
|
-
parent: (
|
|
2716
|
+
parent: ($ = e.parent) == null ? void 0 : $.componentInstance,
|
|
2837
2717
|
schema: e.schema,
|
|
2838
|
-
styles:
|
|
2839
|
-
canAccepts:
|
|
2718
|
+
styles: u,
|
|
2719
|
+
canAccepts: d,
|
|
2840
2720
|
getBelongedComponentInstance: l,
|
|
2841
|
-
getDraggableDesignItemElement:
|
|
2842
|
-
getDraggingDisplayText:
|
|
2721
|
+
getDraggableDesignItemElement: i,
|
|
2722
|
+
getDraggingDisplayText: c,
|
|
2843
2723
|
getPropConfig: A,
|
|
2844
2724
|
getDragScopeElement: C,
|
|
2845
2725
|
onAcceptMovedChildElement: w,
|
|
2846
|
-
onAcceptNewChildElement:
|
|
2847
|
-
onChildElementMovedOut:
|
|
2848
|
-
addNewChildComponentSchema:
|
|
2849
|
-
updateDragAndDropRules:
|
|
2850
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2851
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2852
|
-
},
|
|
2726
|
+
onAcceptNewChildElement: I,
|
|
2727
|
+
onChildElementMovedOut: P,
|
|
2728
|
+
addNewChildComponentSchema: j,
|
|
2729
|
+
updateDragAndDropRules: r,
|
|
2730
|
+
triggerBelongedComponentToMoveWhenMoved: M(!1),
|
|
2731
|
+
triggerBelongedComponentToDeleteWhenDeleted: M(!1)
|
|
2732
|
+
}, h;
|
|
2853
2733
|
}
|
|
2854
|
-
const
|
|
2734
|
+
const ke = /* @__PURE__ */ z({
|
|
2855
2735
|
name: "FDesignerInnerItem",
|
|
2856
|
-
props:
|
|
2736
|
+
props: Jt,
|
|
2857
2737
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2858
2738
|
setup(n, e) {
|
|
2859
|
-
const t =
|
|
2739
|
+
const t = M(n.canMove), r = M(n.canAdd), u = M(n.canDelete), h = M(!1), g = M(n.contentKey), D = M(n.childType), S = M(n.childLabel), y = M(n.modelValue), T = M(""), l = M(), i = V("canvas-dragula"), d = M(), c = V("design-item-context"), C = {
|
|
2860
2740
|
designerItemElementRef: l,
|
|
2861
|
-
componentInstance:
|
|
2862
|
-
schema:
|
|
2863
|
-
parent:
|
|
2741
|
+
componentInstance: d,
|
|
2742
|
+
schema: y.value,
|
|
2743
|
+
parent: c,
|
|
2864
2744
|
setupContext: e
|
|
2865
2745
|
};
|
|
2866
|
-
|
|
2867
|
-
const w =
|
|
2746
|
+
Ne("design-item-context", C);
|
|
2747
|
+
const w = F(() => ({
|
|
2868
2748
|
"farris-component": !0,
|
|
2869
2749
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2870
2750
|
"flex-fill": n.id == "root-component",
|
|
2871
|
-
"position-relative": t.value ||
|
|
2872
|
-
"farris-nested":
|
|
2751
|
+
"position-relative": t.value || u.value,
|
|
2752
|
+
"farris-nested": h.value,
|
|
2873
2753
|
"can-move": t.value,
|
|
2874
2754
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2875
|
-
})),
|
|
2755
|
+
})), j = F(() => {
|
|
2876
2756
|
const o = {};
|
|
2877
|
-
return T.value && T.value.split(";").reduce((
|
|
2878
|
-
const [
|
|
2879
|
-
return
|
|
2757
|
+
return T.value && T.value.split(";").reduce((a, m) => {
|
|
2758
|
+
const [B, E] = m.split(":");
|
|
2759
|
+
return B && (a[B] = E), a;
|
|
2880
2760
|
}, o), o;
|
|
2881
2761
|
});
|
|
2882
|
-
function
|
|
2883
|
-
if (
|
|
2884
|
-
const
|
|
2885
|
-
if (
|
|
2886
|
-
const
|
|
2887
|
-
|
|
2762
|
+
function I(o, a) {
|
|
2763
|
+
if (c && c.schema[g.value]) {
|
|
2764
|
+
const m = c.schema[g.value].findIndex((B) => B.id === a.id);
|
|
2765
|
+
if (m > -1) {
|
|
2766
|
+
const B = c.schema[g.value].length, E = c.schema[g.value][m % B];
|
|
2767
|
+
c.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), c.schema[g.value].splice(m, 1), c.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
|
|
2888
2768
|
}
|
|
2889
2769
|
}
|
|
2890
2770
|
}
|
|
2891
|
-
function
|
|
2892
|
-
if (
|
|
2893
|
-
const
|
|
2894
|
-
componentType:
|
|
2895
|
-
label:
|
|
2896
|
-
parentComponentInstance:
|
|
2771
|
+
function P(o) {
|
|
2772
|
+
if (d.value.addNewChildComponentSchema) {
|
|
2773
|
+
const a = {
|
|
2774
|
+
componentType: D.value,
|
|
2775
|
+
label: S.value,
|
|
2776
|
+
parentComponentInstance: d.value,
|
|
2897
2777
|
targetPosition: -1
|
|
2898
|
-
},
|
|
2899
|
-
|
|
2778
|
+
}, m = d.value.addNewChildComponentSchema(a);
|
|
2779
|
+
y.value[g.value].push(m), e.emit("addComponent");
|
|
2900
2780
|
}
|
|
2901
2781
|
}
|
|
2902
2782
|
function A() {
|
|
2903
|
-
return
|
|
2783
|
+
return r.value && b("div", {
|
|
2904
2784
|
role: "button",
|
|
2905
2785
|
class: "btn component-settings-button",
|
|
2906
2786
|
title: "新增",
|
|
2907
2787
|
ref: "removeComponent",
|
|
2908
2788
|
onClick: (o) => {
|
|
2909
|
-
|
|
2789
|
+
P();
|
|
2910
2790
|
}
|
|
2911
2791
|
}, [b("i", {
|
|
2912
2792
|
class: "f-icon f-icon-plus-circle"
|
|
2913
2793
|
}, null)]);
|
|
2914
2794
|
}
|
|
2915
|
-
function
|
|
2916
|
-
return
|
|
2795
|
+
function $(o) {
|
|
2796
|
+
return u.value && b("div", {
|
|
2917
2797
|
role: "button",
|
|
2918
2798
|
class: "btn component-settings-button",
|
|
2919
2799
|
title: "删除",
|
|
2920
2800
|
ref: "removeComponent",
|
|
2921
|
-
onClick:
|
|
2801
|
+
onClick: Fe((a) => I(a, o), ["stop"])
|
|
2922
2802
|
}, [b("i", {
|
|
2923
2803
|
class: "f-icon f-icon-yxs_delete"
|
|
2924
2804
|
}, null)]);
|
|
@@ -2934,59 +2814,59 @@ const Be = /* @__PURE__ */ G({
|
|
|
2934
2814
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2935
2815
|
}, null)]);
|
|
2936
2816
|
}
|
|
2937
|
-
function
|
|
2817
|
+
function f(o) {
|
|
2938
2818
|
return b("div", {
|
|
2939
2819
|
class: "component-btn-group",
|
|
2940
2820
|
"data-noattach": "true"
|
|
2941
|
-
}, [b("div", null, [A(), v(),
|
|
2821
|
+
}, [b("div", null, [A(), v(), $(o)])]);
|
|
2942
2822
|
}
|
|
2943
|
-
|
|
2944
|
-
|
|
2823
|
+
G(() => n.modelValue, (o) => {
|
|
2824
|
+
y.value = o, C.schema = o;
|
|
2945
2825
|
});
|
|
2946
|
-
function
|
|
2947
|
-
const
|
|
2948
|
-
Xt(
|
|
2826
|
+
function x(o) {
|
|
2827
|
+
const a = o.target;
|
|
2828
|
+
Xt(a);
|
|
2949
2829
|
}
|
|
2950
|
-
function
|
|
2951
|
-
var o,
|
|
2952
|
-
(
|
|
2830
|
+
function k() {
|
|
2831
|
+
var o, a;
|
|
2832
|
+
(a = (o = y.value) == null ? void 0 : o.contents) != null && a.length && l.value && l.value.addEventListener("scroll", x);
|
|
2953
2833
|
}
|
|
2954
|
-
function
|
|
2955
|
-
const o = l.value,
|
|
2956
|
-
return Yt(
|
|
2834
|
+
function p() {
|
|
2835
|
+
const o = l.value, a = M(o.children[1]);
|
|
2836
|
+
return Yt(a, C).value;
|
|
2957
2837
|
}
|
|
2958
|
-
|
|
2838
|
+
H(() => {
|
|
2959
2839
|
if (l.value) {
|
|
2960
|
-
const o = l.value.querySelector(`[data-dragref='${
|
|
2961
|
-
|
|
2840
|
+
const o = l.value.querySelector(`[data-dragref='${y.value.id}-container']`);
|
|
2841
|
+
d.value = o && o.componentInstance ? o.componentInstance.value : p(), i && o && i.attachComponents(o, y.value), h.value = d.value.canNested !== void 0 ? d.value.canNested : h.value, r.value = d.value.canAdd !== void 0 ? d.value.canAdd : r.value, u.value = d.value.canDelete !== void 0 ? d.value.canDelete : u.value, t.value = d.value.canMove !== void 0 ? d.value.canMove : t.value, T.value = d.value.styles || "", l.value && (l.value.componentInstance = d, l.value.designItemContext = C);
|
|
2962
2842
|
}
|
|
2963
|
-
|
|
2964
|
-
}),
|
|
2965
|
-
l.value && l.value.removeEventListener("scroll",
|
|
2843
|
+
k(), X.value++;
|
|
2844
|
+
}), _e(() => {
|
|
2845
|
+
l.value && l.value.removeEventListener("scroll", x);
|
|
2966
2846
|
});
|
|
2967
|
-
function
|
|
2968
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2969
|
-
const
|
|
2970
|
-
if (
|
|
2971
|
-
const
|
|
2972
|
-
if (!(
|
|
2973
|
-
Array.from(
|
|
2974
|
-
const
|
|
2975
|
-
|
|
2847
|
+
function s(o) {
|
|
2848
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((m) => m.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2849
|
+
const a = l.value;
|
|
2850
|
+
if (a) {
|
|
2851
|
+
const m = document.getElementsByClassName("dgComponentSelected");
|
|
2852
|
+
if (!(m && m.length === 1 && m[0] === l.value)) {
|
|
2853
|
+
Array.from(m).forEach((R) => R.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", y.value.type, y.value, n.componentId, d.value);
|
|
2854
|
+
const E = d.value.getDraggableDesignItemElement(C);
|
|
2855
|
+
E && E.value && E.value.classList.add("dgComponentSelected");
|
|
2976
2856
|
}
|
|
2977
2857
|
}
|
|
2978
|
-
|
|
2858
|
+
X.value++;
|
|
2979
2859
|
}
|
|
2980
2860
|
return () => b("div", {
|
|
2981
2861
|
id: `${n.id}-design-item`,
|
|
2982
2862
|
ref: l,
|
|
2983
2863
|
class: w.value,
|
|
2984
|
-
style:
|
|
2985
|
-
onClick:
|
|
2986
|
-
}, [
|
|
2864
|
+
style: j.value,
|
|
2865
|
+
onClick: s
|
|
2866
|
+
}, [f(y.value), e.slots.default && e.slots.default()]);
|
|
2987
2867
|
}
|
|
2988
2868
|
});
|
|
2989
|
-
class Zt extends
|
|
2869
|
+
class Zt extends ee {
|
|
2990
2870
|
constructor(e, t) {
|
|
2991
2871
|
super(e, t);
|
|
2992
2872
|
}
|
|
@@ -3037,7 +2917,7 @@ class Zt extends J {
|
|
|
3037
2917
|
title: "style样式"
|
|
3038
2918
|
}
|
|
3039
2919
|
},
|
|
3040
|
-
setPropertyRelates(t,
|
|
2920
|
+
setPropertyRelates(t, r) {
|
|
3041
2921
|
}
|
|
3042
2922
|
};
|
|
3043
2923
|
}
|
|
@@ -3048,29 +2928,29 @@ class Zt extends J {
|
|
|
3048
2928
|
name: "点击事件"
|
|
3049
2929
|
}
|
|
3050
2930
|
];
|
|
3051
|
-
var
|
|
3052
|
-
const
|
|
3053
|
-
|
|
2931
|
+
var r = this;
|
|
2932
|
+
const u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), h = {};
|
|
2933
|
+
h[r.viewModelId] = {
|
|
3054
2934
|
type: "events-editor",
|
|
3055
2935
|
editor: {
|
|
3056
|
-
initialData:
|
|
2936
|
+
initialData: u
|
|
3057
2937
|
}
|
|
3058
2938
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3059
2939
|
title: "事件",
|
|
3060
2940
|
hideTitle: !0,
|
|
3061
|
-
properties:
|
|
2941
|
+
properties: h,
|
|
3062
2942
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3063
2943
|
refreshPanelAfterChanged: !0,
|
|
3064
2944
|
tabId: "commands",
|
|
3065
2945
|
tabName: "交互",
|
|
3066
|
-
setPropertyRelates(
|
|
3067
|
-
const
|
|
3068
|
-
delete e[
|
|
2946
|
+
setPropertyRelates(g, D) {
|
|
2947
|
+
const S = g.propertyValue;
|
|
2948
|
+
delete e[r.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, S.events, S));
|
|
3069
2949
|
}
|
|
3070
2950
|
};
|
|
3071
2951
|
}
|
|
3072
2952
|
}
|
|
3073
|
-
class Kt extends
|
|
2953
|
+
class Kt extends ee {
|
|
3074
2954
|
constructor(e, t) {
|
|
3075
2955
|
super(e, t);
|
|
3076
2956
|
}
|
|
@@ -3096,7 +2976,7 @@ class Kt extends J {
|
|
|
3096
2976
|
type: "combo-list",
|
|
3097
2977
|
textField: "value",
|
|
3098
2978
|
valueField: "key",
|
|
3099
|
-
data: [{ key: "response-toolbar-item", value:
|
|
2979
|
+
data: [{ key: "response-toolbar-item", value: K["response-toolbar-item"].name }]
|
|
3100
2980
|
}
|
|
3101
2981
|
},
|
|
3102
2982
|
text: {
|
|
@@ -3114,6 +2994,22 @@ class Kt extends J {
|
|
|
3114
2994
|
};
|
|
3115
2995
|
}
|
|
3116
2996
|
getAppearanceProperties(e) {
|
|
2997
|
+
this.propertyConfig.categories.appearance = {
|
|
2998
|
+
title: "样式",
|
|
2999
|
+
description: "Appearance",
|
|
3000
|
+
properties: {
|
|
3001
|
+
class: {
|
|
3002
|
+
title: "class",
|
|
3003
|
+
type: "string",
|
|
3004
|
+
description: ""
|
|
3005
|
+
},
|
|
3006
|
+
style: {
|
|
3007
|
+
title: "style",
|
|
3008
|
+
type: "string",
|
|
3009
|
+
description: ""
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
};
|
|
3117
3013
|
}
|
|
3118
3014
|
getEventPropConfig(e) {
|
|
3119
3015
|
const t = [
|
|
@@ -3121,280 +3017,277 @@ class Kt extends J {
|
|
|
3121
3017
|
label: "click",
|
|
3122
3018
|
name: "点击事件"
|
|
3123
3019
|
}
|
|
3124
|
-
],
|
|
3125
|
-
|
|
3020
|
+
], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), h = {};
|
|
3021
|
+
h[r.viewModelId] = {
|
|
3126
3022
|
type: "events-editor",
|
|
3127
3023
|
editor: {
|
|
3128
|
-
initialData:
|
|
3024
|
+
initialData: u
|
|
3129
3025
|
}
|
|
3130
3026
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3131
3027
|
title: "事件",
|
|
3132
3028
|
hideTitle: !0,
|
|
3133
|
-
properties:
|
|
3029
|
+
properties: h,
|
|
3134
3030
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3135
3031
|
refreshPanelAfterChanged: !0,
|
|
3136
3032
|
tabId: "commands",
|
|
3137
3033
|
tabName: "交互",
|
|
3138
|
-
setPropertyRelates(
|
|
3139
|
-
const
|
|
3140
|
-
delete e[
|
|
3034
|
+
setPropertyRelates(g, D) {
|
|
3035
|
+
const S = g.propertyValue;
|
|
3036
|
+
delete e[r.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, S.events, S));
|
|
3141
3037
|
}
|
|
3142
3038
|
};
|
|
3143
3039
|
}
|
|
3144
3040
|
}
|
|
3145
|
-
function
|
|
3146
|
-
|
|
3147
|
-
const t =
|
|
3148
|
-
let
|
|
3149
|
-
function
|
|
3041
|
+
function en(n, e) {
|
|
3042
|
+
Me();
|
|
3043
|
+
const t = M(!1), r = M(!1);
|
|
3044
|
+
let u = !1, h = !1;
|
|
3045
|
+
function g(w) {
|
|
3150
3046
|
return !1;
|
|
3151
3047
|
}
|
|
3152
|
-
function
|
|
3048
|
+
function D(w) {
|
|
3153
3049
|
}
|
|
3154
|
-
function
|
|
3050
|
+
function S() {
|
|
3155
3051
|
return "";
|
|
3156
3052
|
}
|
|
3157
|
-
function
|
|
3158
|
-
return
|
|
3053
|
+
function y(w, j) {
|
|
3054
|
+
return j.text = w.label, j;
|
|
3159
3055
|
}
|
|
3160
|
-
function T(w,
|
|
3161
|
-
const
|
|
3162
|
-
if ((
|
|
3163
|
-
const v = String(w.innerText),
|
|
3164
|
-
return
|
|
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;
|
|
3165
3061
|
}
|
|
3166
|
-
return
|
|
3062
|
+
return I;
|
|
3167
3063
|
}
|
|
3168
3064
|
function l() {
|
|
3169
3065
|
return !1;
|
|
3170
3066
|
}
|
|
3171
|
-
function
|
|
3172
|
-
return !
|
|
3067
|
+
function i() {
|
|
3068
|
+
return !h;
|
|
3173
3069
|
}
|
|
3174
|
-
function
|
|
3070
|
+
function d() {
|
|
3175
3071
|
return !1;
|
|
3176
3072
|
}
|
|
3177
|
-
function
|
|
3178
|
-
return
|
|
3073
|
+
function c() {
|
|
3074
|
+
return u;
|
|
3179
3075
|
}
|
|
3180
3076
|
function C(w) {
|
|
3181
|
-
let
|
|
3077
|
+
let j;
|
|
3182
3078
|
switch (n.schema.type) {
|
|
3183
3079
|
case "tab-toolbar-item":
|
|
3184
|
-
|
|
3080
|
+
j = new Zt(w, e);
|
|
3185
3081
|
break;
|
|
3186
3082
|
default:
|
|
3187
|
-
|
|
3083
|
+
j = new Kt(w, e);
|
|
3188
3084
|
}
|
|
3189
|
-
return
|
|
3085
|
+
return j.getPropertyConfig(n.schema);
|
|
3190
3086
|
}
|
|
3191
3087
|
return {
|
|
3192
|
-
canAccepts:
|
|
3193
|
-
checkCanAddComponent:
|
|
3194
|
-
checkCanDeleteComponent:
|
|
3088
|
+
canAccepts: g,
|
|
3089
|
+
checkCanAddComponent: d,
|
|
3090
|
+
checkCanDeleteComponent: i,
|
|
3195
3091
|
checkCanMoveComponent: l,
|
|
3196
|
-
getStyles:
|
|
3197
|
-
hideNestedPaddingInDesginerView:
|
|
3092
|
+
getStyles: S,
|
|
3093
|
+
hideNestedPaddingInDesginerView: c,
|
|
3198
3094
|
onAcceptNewChildElement: T,
|
|
3199
|
-
onAcceptMovedChildElement:
|
|
3200
|
-
onResolveNewComponentSchema:
|
|
3095
|
+
onAcceptMovedChildElement: D,
|
|
3096
|
+
onResolveNewComponentSchema: y,
|
|
3201
3097
|
getPropsConfig: C,
|
|
3202
3098
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3203
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3099
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
3204
3100
|
};
|
|
3205
3101
|
}
|
|
3206
|
-
const
|
|
3102
|
+
const Ae = /* @__PURE__ */ z({
|
|
3207
3103
|
name: "FResponseToolbarItemDesign",
|
|
3208
|
-
props:
|
|
3104
|
+
props: xe,
|
|
3209
3105
|
emits: ["Click"],
|
|
3210
3106
|
setup(n, e) {
|
|
3211
|
-
|
|
3212
|
-
const t =
|
|
3107
|
+
M(), M();
|
|
3108
|
+
const t = M(n.alignment), r = {
|
|
3213
3109
|
id: "__more_buttons__",
|
|
3214
3110
|
text: "More"
|
|
3215
|
-
},
|
|
3216
|
-
|
|
3217
|
-
const
|
|
3218
|
-
|
|
3219
|
-
}),
|
|
3220
|
-
|
|
3221
|
-
}), e.expose(
|
|
3111
|
+
}, u = M(new J(r));
|
|
3112
|
+
F(() => u.value.children.length > 0);
|
|
3113
|
+
const h = M(), g = V("designer-host-service"), D = V("design-item-context"), S = en(D, g), y = Ce(h, D, S);
|
|
3114
|
+
V("toolbar-item-handler", () => {
|
|
3115
|
+
}), H(() => {
|
|
3116
|
+
h.value.componentInstance = y;
|
|
3117
|
+
}), e.expose(y.value);
|
|
3222
3118
|
function T() {
|
|
3223
|
-
const
|
|
3119
|
+
const d = {
|
|
3224
3120
|
"f-icon": !0
|
|
3225
|
-
};
|
|
3226
|
-
|
|
3227
|
-
const i = n.icon.trim().split(" ");
|
|
3228
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3229
|
-
}
|
|
3230
|
-
return f;
|
|
3121
|
+
}, c = n.icon ? n.icon.trim() : "";
|
|
3122
|
+
return Y(d, c);
|
|
3231
3123
|
}
|
|
3232
3124
|
function l() {
|
|
3233
3125
|
return !!(n.icon && n.icon.trim());
|
|
3234
3126
|
}
|
|
3235
|
-
function
|
|
3236
|
-
const
|
|
3127
|
+
function i() {
|
|
3128
|
+
const d = {
|
|
3237
3129
|
btn: !0,
|
|
3238
3130
|
"f-rt-btn": !0,
|
|
3239
3131
|
"f-btn-ml": t.value === "right",
|
|
3240
3132
|
"f-btn-mr": t.value === "left",
|
|
3241
3133
|
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
3242
3134
|
};
|
|
3243
|
-
|
|
3244
|
-
const i = n.class.split(" ");
|
|
3245
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3246
|
-
}
|
|
3247
|
-
return f;
|
|
3135
|
+
return Y(d, n.class);
|
|
3248
3136
|
}
|
|
3249
|
-
return
|
|
3250
|
-
}),
|
|
3137
|
+
return H(() => {
|
|
3138
|
+
}), ie(() => {
|
|
3251
3139
|
}), () => b("div", {
|
|
3252
|
-
ref:
|
|
3253
|
-
"data-dragref": `${
|
|
3140
|
+
ref: h,
|
|
3141
|
+
"data-dragref": `${D.schema.id}-container`,
|
|
3254
3142
|
class: "farris-component position-relative",
|
|
3255
3143
|
style: "display:inline-block!important;"
|
|
3256
3144
|
}, [b("button", {
|
|
3257
3145
|
type: "button",
|
|
3258
|
-
class:
|
|
3146
|
+
class: i(),
|
|
3259
3147
|
id: n.id
|
|
3260
3148
|
}, [l() && b("i", {
|
|
3261
3149
|
class: T()
|
|
3262
3150
|
}, null), n.text])]);
|
|
3263
3151
|
}
|
|
3264
|
-
}),
|
|
3152
|
+
}), Be = /* @__PURE__ */ z({
|
|
3265
3153
|
name: "FResponseToolbarDesign",
|
|
3266
3154
|
props: Bt,
|
|
3267
3155
|
emits: ["Click"],
|
|
3268
3156
|
setup(n, e) {
|
|
3269
|
-
const t =
|
|
3270
|
-
let
|
|
3271
|
-
const
|
|
3157
|
+
const t = M(n.items);
|
|
3158
|
+
let r = new Array(t.value.length).fill(M());
|
|
3159
|
+
const u = M(), h = M(), g = M(n.alignment), D = {
|
|
3272
3160
|
id: "__more_buttons__",
|
|
3273
3161
|
text: "More"
|
|
3274
|
-
},
|
|
3275
|
-
|
|
3276
|
-
const T =
|
|
3277
|
-
|
|
3278
|
-
}),
|
|
3279
|
-
T.value.componentInstance =
|
|
3280
|
-
}), e.expose(
|
|
3281
|
-
const C =
|
|
3162
|
+
}, S = M(new J(D)), y = Ee();
|
|
3163
|
+
F(() => S.value.children.length > 0);
|
|
3164
|
+
const T = M(), l = V("designer-host-service"), i = V("design-item-context"), d = Gt(i.schema, l, i), c = Ce(T, i, d);
|
|
3165
|
+
V("toolbar-item-handler", () => {
|
|
3166
|
+
}), H(() => {
|
|
3167
|
+
T.value.componentInstance = c;
|
|
3168
|
+
}), e.expose(c.value);
|
|
3169
|
+
const C = F(() => Y({
|
|
3282
3170
|
"f-toolbar": !0,
|
|
3283
3171
|
"f-response-toolbar": !0,
|
|
3284
3172
|
"position-relative": !0
|
|
3285
|
-
})), w =
|
|
3173
|
+
}, n.customClass)), w = F(() => ({
|
|
3286
3174
|
"d-flex": !0,
|
|
3287
3175
|
"flex-nowrap": !0,
|
|
3288
|
-
"justify-content-end":
|
|
3289
|
-
"justify-content-start":
|
|
3176
|
+
"justify-content-end": g.value === "right",
|
|
3177
|
+
"justify-content-start": g.value === "left"
|
|
3290
3178
|
})), {
|
|
3291
|
-
renderToolbarDropdown:
|
|
3292
|
-
clearAllDropDown:
|
|
3293
|
-
} =
|
|
3294
|
-
function
|
|
3295
|
-
t.value.filter((
|
|
3296
|
-
|
|
3297
|
-
}),
|
|
3179
|
+
renderToolbarDropdown: j,
|
|
3180
|
+
clearAllDropDown: I
|
|
3181
|
+
} = Nt(n, y, c);
|
|
3182
|
+
function P() {
|
|
3183
|
+
t.value.filter((p) => p.children && p.children.length > 0).forEach((p) => {
|
|
3184
|
+
p.expanded = !1;
|
|
3185
|
+
}), S.value.expanded = !1, I();
|
|
3298
3186
|
}
|
|
3299
|
-
const A = /* @__PURE__ */ new Map(),
|
|
3300
|
-
function v(
|
|
3301
|
-
const
|
|
3302
|
-
let o =
|
|
3303
|
-
const
|
|
3304
|
-
if (
|
|
3305
|
-
const N =
|
|
3187
|
+
const A = /* @__PURE__ */ new Map(), $ = [];
|
|
3188
|
+
function v(p) {
|
|
3189
|
+
const s = h.value;
|
|
3190
|
+
let o = p;
|
|
3191
|
+
const a = Array.from(s.children), m = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
3192
|
+
if (m) {
|
|
3193
|
+
const N = m.computedStyleMap().get("margin-left"), _ = m.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + m.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
3306
3194
|
o -= W;
|
|
3307
3195
|
}
|
|
3308
|
-
const
|
|
3309
|
-
for (const N of
|
|
3310
|
-
const
|
|
3311
|
-
o <
|
|
3196
|
+
const B = a.filter((N) => N.id !== "__more_buttons__");
|
|
3197
|
+
for (const N of B) {
|
|
3198
|
+
const _ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
|
|
3199
|
+
o < q ? (A.set(N.id, !0), $.push({
|
|
3312
3200
|
id: N.id,
|
|
3313
|
-
width:
|
|
3314
|
-
})) : o -=
|
|
3201
|
+
width: q
|
|
3202
|
+
})) : o -= q;
|
|
3315
3203
|
}
|
|
3316
|
-
if (
|
|
3317
|
-
for (let N =
|
|
3318
|
-
const
|
|
3319
|
-
if (o >=
|
|
3320
|
-
o -=
|
|
3204
|
+
if ($.length)
|
|
3205
|
+
for (let N = $.length - 1; N >= 0; N--) {
|
|
3206
|
+
const _ = $[N].width;
|
|
3207
|
+
if (o >= _)
|
|
3208
|
+
o -= _, A.delete($[N].id), $.pop();
|
|
3321
3209
|
else
|
|
3322
3210
|
break;
|
|
3323
3211
|
}
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3212
|
+
const E = Object.assign({}, S.value);
|
|
3213
|
+
E.children = [];
|
|
3214
|
+
const R = new J(E), L = t.value.reduce((N, _) => (A.has(_.id) && R.children.push(_), _.visible = !A.has(_.id), N.push(_), N), []);
|
|
3215
|
+
S.value = R, t.value = L;
|
|
3328
3216
|
}
|
|
3329
|
-
const
|
|
3330
|
-
if (
|
|
3331
|
-
const o =
|
|
3332
|
-
(o <
|
|
3217
|
+
const f = new ResizeObserver((p) => {
|
|
3218
|
+
if (p.length) {
|
|
3219
|
+
const o = p[0].contentRect.width, m = h.value.getBoundingClientRect().width;
|
|
3220
|
+
(o < m || $.length) && v(o);
|
|
3333
3221
|
}
|
|
3334
3222
|
});
|
|
3335
|
-
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3338
|
-
}),
|
|
3339
|
-
|
|
3340
|
-
}),
|
|
3223
|
+
H(() => {
|
|
3224
|
+
const p = u.value;
|
|
3225
|
+
f.observe(p), document.body.addEventListener("click", P);
|
|
3226
|
+
}), ie(() => {
|
|
3227
|
+
f.disconnect(), document.body.removeEventListener("click", P);
|
|
3228
|
+
}), G(() => n.items, () => {
|
|
3341
3229
|
t.value = n.items;
|
|
3342
3230
|
}, {
|
|
3343
3231
|
deep: !0
|
|
3344
|
-
}),
|
|
3345
|
-
|
|
3232
|
+
}), G(t, (p) => {
|
|
3233
|
+
r = new Array(t.value.length).fill(M());
|
|
3346
3234
|
});
|
|
3347
|
-
function
|
|
3348
|
-
|
|
3235
|
+
function x(p, s, o, a) {
|
|
3236
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", p, s, o, a);
|
|
3349
3237
|
}
|
|
3350
|
-
function
|
|
3351
|
-
const
|
|
3352
|
-
|
|
3238
|
+
function k() {
|
|
3239
|
+
const p = h.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
3240
|
+
p == null || p.classList.remove("dgComponentSelected"), p == null || p.classList.remove("dgComponentFocused");
|
|
3353
3241
|
}
|
|
3354
3242
|
return () => b("div", {
|
|
3355
3243
|
ref: T,
|
|
3356
|
-
"data-dragref": `${
|
|
3244
|
+
"data-dragref": `${i.schema.id}-container`,
|
|
3357
3245
|
class: C.value
|
|
3358
3246
|
}, [b("div", {
|
|
3359
|
-
ref:
|
|
3247
|
+
ref: u,
|
|
3360
3248
|
class: w.value
|
|
3361
3249
|
}, [b("div", {
|
|
3362
|
-
ref:
|
|
3250
|
+
ref: h,
|
|
3363
3251
|
class: "d-inline-block f-response-content",
|
|
3364
3252
|
style: "white-space: nowrap;"
|
|
3365
|
-
}, [t.value.map((
|
|
3366
|
-
ref: s
|
|
3253
|
+
}, [t.value.map((p, s) => b(ke, {
|
|
3254
|
+
ref: r[s],
|
|
3367
3255
|
class: "p-0 display-inline-block",
|
|
3368
|
-
modelValue:
|
|
3369
|
-
"onUpdate:modelValue": (o) =>
|
|
3256
|
+
modelValue: p,
|
|
3257
|
+
"onUpdate:modelValue": (o) => p = o,
|
|
3370
3258
|
canMove: !0,
|
|
3371
3259
|
childType: "response-toolbar-item",
|
|
3372
3260
|
childLabel: "按钮",
|
|
3373
3261
|
contentKey: "buttons",
|
|
3374
3262
|
componentId: n.componentId,
|
|
3375
|
-
id:
|
|
3263
|
+
id: p.id,
|
|
3376
3264
|
style: "padding:0 !important;display:inline-block",
|
|
3377
|
-
onSelectionChange:
|
|
3378
|
-
onRemoveComponent:
|
|
3265
|
+
onSelectionChange: x,
|
|
3266
|
+
onRemoveComponent: k
|
|
3379
3267
|
}, {
|
|
3380
|
-
default: () =>
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3268
|
+
default: () => {
|
|
3269
|
+
var o;
|
|
3270
|
+
return [b(Ae, {
|
|
3271
|
+
id: p.id,
|
|
3272
|
+
disable: p.disable,
|
|
3273
|
+
text: p.text,
|
|
3274
|
+
icon: p.icon,
|
|
3275
|
+
class: ((o = p.appearance) == null ? void 0 : o.class) || "btn-secondary",
|
|
3276
|
+
alignment: n.alignment || "right",
|
|
3277
|
+
componentId: n.componentId
|
|
3278
|
+
}, null)];
|
|
3279
|
+
}
|
|
3387
3280
|
}))])])]);
|
|
3388
3281
|
}
|
|
3389
|
-
}),
|
|
3390
|
-
|
|
3391
|
-
n["response-toolbar"] =
|
|
3282
|
+
}), be = de;
|
|
3283
|
+
Z.register = (n, e, t) => {
|
|
3284
|
+
n["response-toolbar"] = Z, e["response-toolbar"] = de;
|
|
3392
3285
|
};
|
|
3393
|
-
|
|
3394
|
-
n["response-toolbar"] =
|
|
3286
|
+
Z.registerDesigner = (n, e, t) => {
|
|
3287
|
+
n["response-toolbar"] = Be, e["response-toolbar"] = de, n["response-toolbar-item"] = Ae, e["response-toolbar-item"] = Rt;
|
|
3395
3288
|
};
|
|
3396
|
-
|
|
3397
|
-
const
|
|
3289
|
+
We(Z);
|
|
3290
|
+
const tn = {
|
|
3398
3291
|
id: { type: String, default: "" },
|
|
3399
3292
|
componentId: { type: String, default: "" },
|
|
3400
3293
|
type: { type: String, default: "" },
|
|
@@ -3409,102 +3302,103 @@ const en = {
|
|
|
3409
3302
|
*/
|
|
3410
3303
|
modelValue: { type: Object },
|
|
3411
3304
|
ignore: { type: Boolean, default: !1 }
|
|
3412
|
-
},
|
|
3305
|
+
}, ye = /* @__PURE__ */ z({
|
|
3413
3306
|
name: "FDesignerTemplateItem",
|
|
3414
|
-
props:
|
|
3307
|
+
props: tn,
|
|
3415
3308
|
emits: ["selectionChange"],
|
|
3416
3309
|
setup(n, e) {
|
|
3417
|
-
const t =
|
|
3310
|
+
const t = M(), r = F(() => ({
|
|
3418
3311
|
"farris-component": !0
|
|
3419
3312
|
}));
|
|
3420
|
-
function
|
|
3421
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
3422
|
-
const
|
|
3423
|
-
if (
|
|
3424
|
-
const
|
|
3425
|
-
|
|
3313
|
+
function u(h) {
|
|
3314
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((D) => D.classList.remove("dgComponentFocused")), h && (h.preventDefault(), h.stopPropagation());
|
|
3315
|
+
const g = t.value;
|
|
3316
|
+
if (g) {
|
|
3317
|
+
const D = document.getElementsByClassName("dgComponentSelected");
|
|
3318
|
+
D && D.length === 1 && D[0] === t.value || (Array.from(D).forEach((y) => y.classList.remove("dgComponentSelected")), g.classList.add("dgComponentFocused"));
|
|
3426
3319
|
}
|
|
3427
|
-
|
|
3320
|
+
X.value++;
|
|
3428
3321
|
}
|
|
3429
3322
|
return () => b("div", {
|
|
3430
3323
|
id: `${n.id}-design-item`,
|
|
3431
3324
|
ref: t,
|
|
3432
|
-
class:
|
|
3433
|
-
onClick:
|
|
3325
|
+
class: r.value,
|
|
3326
|
+
onClick: u
|
|
3434
3327
|
}, [e.slots.default && e.slots.default()]);
|
|
3435
3328
|
}
|
|
3436
|
-
}),
|
|
3329
|
+
}), nn = /* @__PURE__ */ z({
|
|
3437
3330
|
name: "FPageHeaderDesign",
|
|
3438
3331
|
props: st,
|
|
3439
3332
|
emits: ["Click"],
|
|
3440
3333
|
setup(n, e) {
|
|
3441
|
-
const t =
|
|
3334
|
+
const t = M(), r = V("designer-host-service"), u = V("design-item-context"), h = at(u.schema, r), g = rt(t, u, h), D = M(u.schema.toolbar || {
|
|
3442
3335
|
type: "response-toolbar",
|
|
3443
3336
|
buttons: []
|
|
3444
|
-
}),
|
|
3445
|
-
|
|
3446
|
-
t.value.componentInstance =
|
|
3447
|
-
}),
|
|
3448
|
-
|
|
3337
|
+
}), S = M(be(D.value));
|
|
3338
|
+
H(() => {
|
|
3339
|
+
t.value.componentInstance = g;
|
|
3340
|
+
}), G(() => u.schema.toolbar, () => {
|
|
3341
|
+
D.value = u.schema.toolbar || {
|
|
3449
3342
|
type: "response-toolbar",
|
|
3450
3343
|
buttons: []
|
|
3451
|
-
},
|
|
3344
|
+
}, S.value = be(D.value);
|
|
3452
3345
|
}, {
|
|
3453
3346
|
deep: !0
|
|
3454
3347
|
});
|
|
3455
|
-
const
|
|
3456
|
-
function T(l,
|
|
3457
|
-
|
|
3348
|
+
const y = F(() => [...S.value.items]);
|
|
3349
|
+
function T(l, i, d, c) {
|
|
3350
|
+
u && u.setupContext && u.setupContext.emit("selectionChange", l, i, d, c);
|
|
3458
3351
|
}
|
|
3459
|
-
return e.expose(
|
|
3352
|
+
return e.expose(g.value), () => b("div", {
|
|
3460
3353
|
ref: t
|
|
3461
3354
|
}, [b("nav", {
|
|
3462
3355
|
class: "f-page-header-base"
|
|
3463
3356
|
}, [b("div", {
|
|
3464
3357
|
class: "f-title"
|
|
3465
|
-
}, [b(
|
|
3358
|
+
}, [b(ye, null, {
|
|
3466
3359
|
default: () => [b("span", {
|
|
3467
3360
|
class: "f-title-icon f-text-orna-manage"
|
|
3468
3361
|
}, [b("i", {
|
|
3469
3362
|
class: n.icon
|
|
3470
3363
|
}, null)])]
|
|
3471
|
-
}), b(
|
|
3364
|
+
}), b(ye, null, {
|
|
3472
3365
|
default: () => [b("h4", {
|
|
3473
3366
|
class: "f-title-text"
|
|
3474
3367
|
}, [n.title])]
|
|
3475
|
-
})]), b(
|
|
3476
|
-
class: "col-
|
|
3477
|
-
modelValue:
|
|
3478
|
-
"onUpdate:modelValue": (l) =>
|
|
3368
|
+
})]), b(ke, {
|
|
3369
|
+
class: "col-6 text-right",
|
|
3370
|
+
modelValue: D.value,
|
|
3371
|
+
"onUpdate:modelValue": (l) => D.value = l,
|
|
3479
3372
|
canAdd: !0,
|
|
3480
3373
|
childType: "response-toolbar-item",
|
|
3481
3374
|
childLabel: "按钮",
|
|
3482
3375
|
contentKey: "buttons",
|
|
3483
|
-
id:
|
|
3376
|
+
id: D.value.id,
|
|
3484
3377
|
componentId: n.componentId,
|
|
3485
3378
|
onSelectionChange: T
|
|
3486
3379
|
}, {
|
|
3487
|
-
default: () => [b(
|
|
3488
|
-
|
|
3380
|
+
default: () => [b(Be, {
|
|
3381
|
+
customClass: "w-100",
|
|
3382
|
+
items: y.value,
|
|
3489
3383
|
componentId: n.componentId
|
|
3490
3384
|
}, null)]
|
|
3491
3385
|
})])]);
|
|
3492
3386
|
}
|
|
3493
|
-
}),
|
|
3387
|
+
}), pn = {
|
|
3494
3388
|
install(n) {
|
|
3495
|
-
n.component(
|
|
3389
|
+
n.component(oe.name, oe);
|
|
3496
3390
|
},
|
|
3497
|
-
register(n, e, t,
|
|
3498
|
-
n["page-header"] =
|
|
3391
|
+
register(n, e, t, r) {
|
|
3392
|
+
n["page-header"] = oe, e["page-header"] = ge;
|
|
3499
3393
|
},
|
|
3500
3394
|
registerDesigner(n, e, t) {
|
|
3501
|
-
n["page-header"] =
|
|
3395
|
+
n["page-header"] = nn, e["page-header"] = ge;
|
|
3502
3396
|
}
|
|
3503
3397
|
};
|
|
3504
3398
|
export {
|
|
3505
|
-
|
|
3506
|
-
|
|
3399
|
+
oe as PageHeader,
|
|
3400
|
+
pn as default,
|
|
3507
3401
|
st as pageHeaderDesignerProps,
|
|
3508
|
-
|
|
3509
|
-
|
|
3402
|
+
pe as pageHeaderProps,
|
|
3403
|
+
ge as propsResolver
|
|
3510
3404
|
};
|