@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,56 +1,60 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
import
|
|
1
|
+
import { ref as C, computed as b, createVNode as v, defineComponent as z, watch as _, onMounted as V, inject as O } from "vue";
|
|
2
|
+
import { isPlainObject as N, cloneDeep as U } from "lodash-es";
|
|
3
|
+
import Q from "../response-toolbar/index.esm.js";
|
|
4
4
|
import "bignumber.js";
|
|
5
5
|
import { withInstall as Z } from "../common/index.esm.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title: t, ignore: a } = n,
|
|
9
|
-
|
|
6
|
+
const q = {}, R = {};
|
|
7
|
+
function j(n) {
|
|
8
|
+
const { properties: e, title: t, ignore: a } = n, i = a && Array.isArray(a), r = Object.keys(e).reduce((o, f) => ((!i || !a.find((p) => p === f)) && (o[f] = e[f].type === "object" && e[f].properties ? j(e[f]) : U(e[f].default)), o), {});
|
|
9
|
+
if (t && (!i || !a.find((o) => o === "id"))) {
|
|
10
|
+
const o = t.toLowerCase().replace(/-/g, "_");
|
|
11
|
+
r.id = `${o}_${Math.random().toString().slice(2, 6)}`;
|
|
12
|
+
}
|
|
13
|
+
return r;
|
|
10
14
|
}
|
|
11
|
-
function
|
|
12
|
-
const a =
|
|
15
|
+
function $(n, e = {}, t) {
|
|
16
|
+
const a = q[n];
|
|
13
17
|
if (a) {
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
18
|
+
let i = j(a);
|
|
19
|
+
const r = R[n];
|
|
20
|
+
return i = r ? r({ getSchemaByType: $ }, i, e, t) : i, i;
|
|
17
21
|
}
|
|
18
22
|
return null;
|
|
19
23
|
}
|
|
20
24
|
function J(n, e) {
|
|
21
|
-
const t =
|
|
22
|
-
return Object.keys(
|
|
25
|
+
const t = j(e);
|
|
26
|
+
return Object.keys(t).reduce((a, i) => (a[i] && N(a[i]) && N(n[i] || !n[i]) ? Object.assign(a[i], n[i] || {}) : a[i] = n[i], a), t), t;
|
|
23
27
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(n).filter((a) => n[a] != null).reduce((a,
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
a[
|
|
28
|
+
function X(n, e) {
|
|
29
|
+
return Object.keys(n).filter((a) => n[a] != null).reduce((a, i) => {
|
|
30
|
+
if (e.has(i)) {
|
|
31
|
+
const r = e.get(i);
|
|
32
|
+
if (typeof r == "string")
|
|
33
|
+
a[r] = n[i];
|
|
30
34
|
else {
|
|
31
|
-
const o = i
|
|
35
|
+
const o = r(i, n[i], n);
|
|
32
36
|
Object.assign(a, o);
|
|
33
37
|
}
|
|
34
38
|
} else
|
|
35
|
-
a[
|
|
39
|
+
a[i] = n[i];
|
|
36
40
|
return a;
|
|
37
41
|
}, {});
|
|
38
42
|
}
|
|
39
|
-
function
|
|
43
|
+
function Y(n, e, t = /* @__PURE__ */ new Map()) {
|
|
40
44
|
const a = J(n, e);
|
|
41
|
-
return
|
|
45
|
+
return X(a, t);
|
|
42
46
|
}
|
|
43
|
-
function
|
|
47
|
+
function x(n = {}) {
|
|
44
48
|
function e(s, c, l, u) {
|
|
45
49
|
if (typeof l == "number")
|
|
46
50
|
return u[s].length === l;
|
|
47
51
|
if (typeof l == "object") {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
52
|
+
const m = Object.keys(l)[0], y = l[m];
|
|
53
|
+
if (m === "not")
|
|
50
54
|
return Number(u[s].length) !== Number(y);
|
|
51
|
-
if (
|
|
55
|
+
if (m === "moreThan")
|
|
52
56
|
return Number(u[s].length) >= Number(y);
|
|
53
|
-
if (
|
|
57
|
+
if (m === "lessThan")
|
|
54
58
|
return Number(u[s].length) <= Number(y);
|
|
55
59
|
}
|
|
56
60
|
return !1;
|
|
@@ -63,19 +67,19 @@ function Y(n = {}) {
|
|
|
63
67
|
["getProperty", t]
|
|
64
68
|
]);
|
|
65
69
|
Object.keys(n).reduce((s, c) => (s.set(c, n[c]), s), a);
|
|
66
|
-
function
|
|
70
|
+
function i(s, c) {
|
|
67
71
|
const l = s;
|
|
68
72
|
return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((u) => {
|
|
69
73
|
if (u === "length")
|
|
70
74
|
return { target: l, operator: "length", param: null, value: c[u] };
|
|
71
|
-
const
|
|
72
|
-
return { target: l, operator: "getProperty", param:
|
|
75
|
+
const m = u, y = c[u];
|
|
76
|
+
return { target: l, operator: "getProperty", param: m, value: y };
|
|
73
77
|
}) : [];
|
|
74
78
|
}
|
|
75
|
-
function
|
|
79
|
+
function r(s) {
|
|
76
80
|
return Object.keys(s).reduce((l, u) => {
|
|
77
|
-
const
|
|
78
|
-
return l.push(...
|
|
81
|
+
const m = i(u, s[u]);
|
|
82
|
+
return l.push(...m), l;
|
|
79
83
|
}, []);
|
|
80
84
|
}
|
|
81
85
|
function o(s, c) {
|
|
@@ -85,16 +89,16 @@ function Y(n = {}) {
|
|
|
85
89
|
}
|
|
86
90
|
return !1;
|
|
87
91
|
}
|
|
88
|
-
function p(s, c) {
|
|
89
|
-
return i(s).reduce((d, y) => d && o(y, c), !0);
|
|
90
|
-
}
|
|
91
92
|
function f(s, c) {
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
return r(s).reduce((m, y) => m && o(y, c), !0);
|
|
94
|
+
}
|
|
95
|
+
function p(s, c) {
|
|
96
|
+
const l = Object.keys(s), u = l.includes("allOf"), m = l.includes("anyOf"), y = u || m, M = (y ? s[y ? u ? "allOf" : "anyOf" : "allOf"] : [s]).map((S) => f(S, c));
|
|
97
|
+
return u ? !M.includes(!1) : M.includes(!0);
|
|
94
98
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
99
|
+
return { parseValueSchema: p };
|
|
96
100
|
}
|
|
97
|
-
const
|
|
101
|
+
const P = {
|
|
98
102
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
103
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
104
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -132,13 +136,14 @@ const k = {
|
|
|
132
136
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
137
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
138
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
140
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
136
141
|
}, K = {}, I = {};
|
|
137
|
-
|
|
138
|
-
function ee(n, e, t = /* @__PURE__ */ new Map(), a = (o, p,
|
|
139
|
-
return
|
|
140
|
-
const
|
|
141
|
-
return Object.assign(
|
|
142
|
+
x();
|
|
143
|
+
function ee(n, e, t = /* @__PURE__ */ new Map(), a = (o, f, p, s) => f, i = {}, r = (o) => o) {
|
|
144
|
+
return q[e.title] = e, R[e.title] = a, K[e.title] = i, I[e.title] = r, (o = {}) => {
|
|
145
|
+
const f = Y(o, e, t), p = Object.keys(n).reduce((s, c) => (s[c] = n[c].default, s), {});
|
|
146
|
+
return Object.assign(p, f);
|
|
142
147
|
};
|
|
143
148
|
}
|
|
144
149
|
function te(n, e) {
|
|
@@ -148,10 +153,8 @@ function ne(n, e, t) {
|
|
|
148
153
|
return e ? { enableAccordion: t.accordionMode } : { enableAccordion: "" };
|
|
149
154
|
}
|
|
150
155
|
function oe(n, e) {
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
}), {
|
|
154
|
-
buttons: e.contents,
|
|
156
|
+
return {
|
|
157
|
+
buttons: e.buttons,
|
|
155
158
|
buttonPosition: e.position
|
|
156
159
|
};
|
|
157
160
|
}
|
|
@@ -161,34 +164,34 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
161
164
|
["enableAccordion", ne],
|
|
162
165
|
["toolbar", oe]
|
|
163
166
|
]);
|
|
164
|
-
function re(n, e, t
|
|
165
|
-
const
|
|
167
|
+
function re(n, e, t) {
|
|
168
|
+
const a = Math.random().toString().slice(2, 6), i = t.parentComponentInstance;
|
|
166
169
|
Object.assign(e, {
|
|
167
|
-
id: `section-${
|
|
170
|
+
id: `section-${a}`,
|
|
168
171
|
appearance: {
|
|
169
172
|
class: "f-section-in-mainsubcard"
|
|
170
173
|
},
|
|
171
174
|
enableAccordion: !1,
|
|
172
|
-
mainTitle: e.mainTitle || "标题"
|
|
175
|
+
mainTitle: t.mainTitle || e.mainTitle || "标题"
|
|
173
176
|
});
|
|
174
|
-
const
|
|
175
|
-
Object.assign(
|
|
176
|
-
id: `container-${
|
|
177
|
+
const r = n.getSchemaByType("content-container");
|
|
178
|
+
Object.assign(r, {
|
|
179
|
+
id: `container-${a}`,
|
|
177
180
|
appearance: {
|
|
178
181
|
class: "f-struct-wrapper"
|
|
179
182
|
},
|
|
180
183
|
contents: [e]
|
|
181
184
|
});
|
|
182
|
-
const
|
|
183
|
-
switch (
|
|
184
|
-
case
|
|
185
|
+
const o = i.schema;
|
|
186
|
+
switch (o && o.type) {
|
|
187
|
+
case P["splitter-pane"].type: {
|
|
185
188
|
e.appearance.class = "f-section-in-main";
|
|
186
189
|
break;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
return
|
|
192
|
+
return r;
|
|
190
193
|
}
|
|
191
|
-
function ie(n, e, t
|
|
194
|
+
function ie(n, e, t) {
|
|
192
195
|
return t.parentComponentInstance ? re(n, e, t) : e;
|
|
193
196
|
}
|
|
194
197
|
const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/section.schema.json", le = "section", ue = "A Farris Container Component", pe = "object", fe = {
|
|
@@ -309,7 +312,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
|
|
|
309
312
|
type: "string",
|
|
310
313
|
default: "inHead"
|
|
311
314
|
},
|
|
312
|
-
|
|
315
|
+
buttons: {
|
|
313
316
|
type: "array",
|
|
314
317
|
default: []
|
|
315
318
|
}
|
|
@@ -328,11 +331,12 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
|
|
|
328
331
|
type: pe,
|
|
329
332
|
properties: fe,
|
|
330
333
|
required: de
|
|
331
|
-
},
|
|
334
|
+
}, B = {
|
|
332
335
|
/** 设置内容区域样式 */
|
|
333
336
|
contentClass: { type: String, default: "" },
|
|
334
337
|
/** 自定义样式 */
|
|
335
338
|
customClass: { type: String, default: "" },
|
|
339
|
+
customStyle: { type: String, default: "" },
|
|
336
340
|
/** 设置是否启用収折功能。支持:空字符串,不启用収折 | default 默认収折方式 || custom自定义収折方式 */
|
|
337
341
|
enableAccordion: { type: String, default: "" },
|
|
338
342
|
/** 设置初始是否处于展开状态,支持:true 内容区域被展开|false 内容区域被収折 */
|
|
@@ -372,24 +376,10 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
|
|
|
372
376
|
// toolbarPosition: { type: String, default: '' },
|
|
373
377
|
// toolbarButtons: { type: Array<object>, default: [] },
|
|
374
378
|
// toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
|
|
375
|
-
},
|
|
379
|
+
}, H = ee(B, me, ae, ie);
|
|
376
380
|
function ye(n, e, t) {
|
|
377
381
|
let a;
|
|
378
|
-
function
|
|
379
|
-
!n || !e.value || (t.value = !t.value, t.value ? i() : o());
|
|
380
|
-
}
|
|
381
|
-
function i() {
|
|
382
|
-
a = n.value.nextElementSibling;
|
|
383
|
-
const f = document && document.querySelector("body");
|
|
384
|
-
f && (f.appendChild(n.value), n.value.style.zIndex = p());
|
|
385
|
-
}
|
|
386
|
-
function o() {
|
|
387
|
-
a ? e.value.insertBefore(
|
|
388
|
-
n.value,
|
|
389
|
-
a
|
|
390
|
-
) : e.value.appendChild(n.value), n.value.style.zIndex = null;
|
|
391
|
-
}
|
|
392
|
-
function p(f = 1) {
|
|
382
|
+
function i(p = 1) {
|
|
393
383
|
const s = [
|
|
394
384
|
"body>.f-datagrid-settings-simple-host",
|
|
395
385
|
"body>div",
|
|
@@ -401,101 +391,113 @@ function ye(n, e, t) {
|
|
|
401
391
|
"body>filter-row-panel>.f-datagrid-filter-panel",
|
|
402
392
|
"body>.f-section-maximize"
|
|
403
393
|
], c = Array.from(document.body.querySelectorAll(s.join(","))).filter((u) => u).map((u) => {
|
|
404
|
-
const { display:
|
|
405
|
-
return
|
|
394
|
+
const { display: m, zIndex: y } = window.getComputedStyle(u);
|
|
395
|
+
return m === "none" ? 0 : parseInt(y, 10);
|
|
406
396
|
}).filter((u) => u);
|
|
407
397
|
let l = Math.max(...c);
|
|
408
|
-
return l < 1040 && (l = 1040), l +
|
|
398
|
+
return l < 1040 && (l = 1040), l + p;
|
|
399
|
+
}
|
|
400
|
+
function r() {
|
|
401
|
+
a = n.value.nextElementSibling;
|
|
402
|
+
const p = document && document.querySelector("body");
|
|
403
|
+
p && (p.appendChild(n.value), n.value.style.zIndex = i());
|
|
404
|
+
}
|
|
405
|
+
function o() {
|
|
406
|
+
a ? e.value.insertBefore(
|
|
407
|
+
n.value,
|
|
408
|
+
a
|
|
409
|
+
) : e.value.appendChild(n.value), n.value.style.zIndex = null;
|
|
410
|
+
}
|
|
411
|
+
function f() {
|
|
412
|
+
!n || !e.value || (t.value = !t.value, t.value ? r() : o());
|
|
409
413
|
}
|
|
410
|
-
return { onClickMaxMinIcon:
|
|
414
|
+
return { onClickMaxMinIcon: f };
|
|
411
415
|
}
|
|
412
|
-
function
|
|
413
|
-
const t =
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
function o(p) {
|
|
417
|
-
e.emit("Click", p);
|
|
416
|
+
function F(n, e) {
|
|
417
|
+
const t = C(n.buttons), a = b(() => n.buttonPosition === "inHead" ? "right" : "left"), i = b(() => "f-section-toolbar" + (n.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), r = b(() => n.buttons && n.buttons.length > 0 && n.buttonPosition === "inHead");
|
|
418
|
+
function o(f) {
|
|
419
|
+
e.emit("Click", f);
|
|
418
420
|
}
|
|
419
|
-
return () =>
|
|
420
|
-
customClass:
|
|
421
|
+
return () => r.value && v(Q, {
|
|
422
|
+
customClass: i.value,
|
|
421
423
|
items: t.value,
|
|
422
424
|
onClick: o,
|
|
423
425
|
alignment: a.value
|
|
424
426
|
}, null);
|
|
425
427
|
}
|
|
426
|
-
function
|
|
427
|
-
|
|
428
|
-
const o =
|
|
429
|
-
onClickMaxMinIcon:
|
|
430
|
-
} = ye(a,
|
|
431
|
-
const
|
|
428
|
+
function G(n, e, t, a, i, r) {
|
|
429
|
+
C(n.subTitle);
|
|
430
|
+
const o = b(() => n.buttonPosition), f = F(n, e), {
|
|
431
|
+
onClickMaxMinIcon: p
|
|
432
|
+
} = ye(a, i, r), s = b(() => !!n.subTitle), c = b(() => n.enableMaximize), l = b(() => n.enableAccordion !== ""), u = b(() => {
|
|
433
|
+
const S = {
|
|
432
434
|
"f-section-header": !0
|
|
433
435
|
};
|
|
434
|
-
return e.slots.header && n.headerClass.split(" ").reduce((
|
|
436
|
+
return e.slots.header && n.headerClass.split(" ").reduce((d, h) => (d[h] = !0, d), S), S;
|
|
435
437
|
});
|
|
436
|
-
function
|
|
437
|
-
|
|
438
|
+
function m(S) {
|
|
439
|
+
S.stopPropagation(), n.enableAccordion !== "" && (t.value = !t.value);
|
|
438
440
|
}
|
|
439
441
|
function y() {
|
|
440
|
-
const
|
|
442
|
+
const S = b(() => ({
|
|
441
443
|
btn: !0,
|
|
442
444
|
"f-btn-collapse-expand": !0,
|
|
443
445
|
"f-btn-mx": !0,
|
|
444
446
|
"f-state-expand": t.value
|
|
445
|
-
})),
|
|
447
|
+
})), D = b(() => ({
|
|
446
448
|
"f-icon": !0,
|
|
447
|
-
"f-icon-maximize": !
|
|
448
|
-
"f-icon-minimize":
|
|
449
|
+
"f-icon-maximize": !r.value,
|
|
450
|
+
"f-icon-minimize": r.value
|
|
449
451
|
}));
|
|
450
|
-
return
|
|
452
|
+
return v("div", {
|
|
451
453
|
class: "f-max-accordion"
|
|
452
|
-
}, [c.value ?
|
|
453
|
-
class:
|
|
454
|
-
onClick:
|
|
455
|
-
}, null) : "", l.value ?
|
|
456
|
-
class:
|
|
457
|
-
onClick:
|
|
458
|
-
}, [
|
|
454
|
+
}, [c.value ? v("span", {
|
|
455
|
+
class: D.value,
|
|
456
|
+
onClick: p
|
|
457
|
+
}, null) : "", l.value ? v("button", {
|
|
458
|
+
class: S.value,
|
|
459
|
+
onClick: m
|
|
460
|
+
}, [v("span", null, [t.value ? n.collapseLabel : n.expandLabel])]) : ""]);
|
|
459
461
|
}
|
|
460
|
-
function
|
|
461
|
-
return e.slots.header ?
|
|
462
|
+
function w() {
|
|
463
|
+
return e.slots.header ? v("div", {
|
|
462
464
|
class: u.value
|
|
463
465
|
}, [e.slots.header()]) : "";
|
|
464
466
|
}
|
|
465
|
-
function
|
|
466
|
-
return
|
|
467
|
+
function g() {
|
|
468
|
+
return v("div", {
|
|
467
469
|
class: "f-title",
|
|
468
|
-
onClick:
|
|
469
|
-
}, [
|
|
470
|
+
onClick: m
|
|
471
|
+
}, [v("h4", {
|
|
470
472
|
class: "f-title-text"
|
|
471
|
-
}, [n.mainTitle]), s.value &&
|
|
473
|
+
}, [n.mainTitle]), s.value && v("span", null, [n.subTitle])]);
|
|
472
474
|
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
const
|
|
475
|
+
function M() {
|
|
476
|
+
const S = b(() => {
|
|
477
|
+
const D = {
|
|
476
478
|
"f-content": !0
|
|
477
479
|
};
|
|
478
|
-
return n.headerContentClass && n.headerContentClass.split(" ").reduce((
|
|
480
|
+
return n.headerContentClass && n.headerContentClass.split(" ").reduce((h, T) => (h[T] = !0, h), D), D;
|
|
479
481
|
});
|
|
480
|
-
return e.slots.headerContent ?
|
|
481
|
-
class:
|
|
482
|
+
return e.slots.headerContent ? v("div", {
|
|
483
|
+
class: S.value
|
|
482
484
|
}, [e.slots.headerContent()]) : "";
|
|
483
485
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
486
|
+
function A() {
|
|
487
|
+
return v("div", {
|
|
486
488
|
class: u.value
|
|
487
|
-
}, [e.slots.headerTitle ? e.slots.headerTitle() :
|
|
489
|
+
}, [e.slots.headerTitle ? e.slots.headerTitle() : g(), M(), o.value === "inHead" && f(), (c.value || l.value) && y()]);
|
|
488
490
|
}
|
|
489
|
-
return () => n.showHeader && (e.slots.header ?
|
|
491
|
+
return () => n.showHeader && (e.slots.header ? w() : A());
|
|
490
492
|
}
|
|
491
|
-
const
|
|
492
|
-
function
|
|
493
|
+
const be = ["moz", "ms", "webkit"];
|
|
494
|
+
function he() {
|
|
493
495
|
let n = 0;
|
|
494
496
|
return (e) => {
|
|
495
|
-
const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - n)),
|
|
497
|
+
const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - n)), i = setTimeout(() => {
|
|
496
498
|
e(t + a);
|
|
497
499
|
}, a);
|
|
498
|
-
return n = t + a,
|
|
500
|
+
return n = t + a, i;
|
|
499
501
|
};
|
|
500
502
|
}
|
|
501
503
|
function ve() {
|
|
@@ -503,53 +505,52 @@ function ve() {
|
|
|
503
505
|
return () => 0;
|
|
504
506
|
if (window.requestAnimationFrame)
|
|
505
507
|
return window.requestAnimationFrame.bind(window);
|
|
506
|
-
const n =
|
|
507
|
-
return n ? window[`${n}RequestAnimationFrame`] :
|
|
508
|
+
const n = be.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
509
|
+
return n ? window[`${n}RequestAnimationFrame`] : he();
|
|
508
510
|
}
|
|
509
511
|
ve();
|
|
510
|
-
function
|
|
511
|
-
return ((e == null ? void 0 : e.split(" ")) || []).reduce((a,
|
|
512
|
+
function L(n, e) {
|
|
513
|
+
return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, i) => (i && (a[i] = !0), a), n), n;
|
|
512
514
|
}
|
|
513
515
|
const E = /* @__PURE__ */ z({
|
|
514
516
|
name: "FSection",
|
|
515
|
-
props:
|
|
517
|
+
props: B,
|
|
516
518
|
emits: [],
|
|
517
519
|
setup(n, e) {
|
|
518
|
-
const t =
|
|
519
|
-
|
|
520
|
-
const r = v(n.customClass), i = h(() => n.enableAccordion), o = v(n.expandStatus), p = h(() => n.buttonPosition), f = v(!1), s = R(n, e, o, t, a, f), c = j(n, e), l = h(() => {
|
|
521
|
-
const C = {
|
|
520
|
+
const t = C(), a = C(), i = C(n.customClass), r = b(() => n.enableAccordion), o = C(n.expandStatus), f = b(() => n.buttonPosition), p = C(!1), s = G(n, e, o, t, a, p), c = F(n, e), l = b(() => {
|
|
521
|
+
const g = {
|
|
522
522
|
"f-section": !0,
|
|
523
|
-
"f-section-accordion":
|
|
524
|
-
"f-state-collapse": (
|
|
525
|
-
"f-section-custom-accordion":
|
|
523
|
+
"f-section-accordion": r.value === "default",
|
|
524
|
+
"f-state-collapse": (r.value === "default" || r.value === "custom") && !o.value,
|
|
525
|
+
"f-section-custom-accordion": r.value === "custom",
|
|
526
526
|
"f-section-fill": n.fill,
|
|
527
|
-
"f-section-maximize":
|
|
527
|
+
"f-section-maximize": p.value
|
|
528
528
|
};
|
|
529
|
-
return
|
|
530
|
-
}), u =
|
|
529
|
+
return L(g, i.value);
|
|
530
|
+
}), u = b(() => L({
|
|
531
531
|
"f-section-content": !0
|
|
532
|
-
}, n.contentClass)),
|
|
532
|
+
}, n.contentClass)), m = b(() => L({
|
|
533
533
|
"f-section-extend": !0
|
|
534
|
-
},
|
|
534
|
+
}, m.value));
|
|
535
535
|
function y() {
|
|
536
|
-
return e.slots.extend &&
|
|
537
|
-
class:
|
|
536
|
+
return e.slots.extend && v("div", {
|
|
537
|
+
class: m.value
|
|
538
538
|
}, [e.slots.extend()]);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
541
|
-
return
|
|
540
|
+
function w() {
|
|
541
|
+
return v("div", {
|
|
542
542
|
class: u.value
|
|
543
|
-
}, [
|
|
543
|
+
}, [f.value === "inContent" && c(), e.slots.default && e.slots.default()]);
|
|
544
544
|
}
|
|
545
|
-
return
|
|
546
|
-
|
|
547
|
-
}),
|
|
548
|
-
t && t.value && (a.value = t.value.parentElement);
|
|
549
|
-
}), () =>
|
|
545
|
+
return _(() => n.expandStatus, (g, M) => {
|
|
546
|
+
g !== M && (o.value = g);
|
|
547
|
+
}), V(() => {
|
|
548
|
+
t.value && t.value && (a.value = t.value.parentElement);
|
|
549
|
+
}), () => v("div", {
|
|
550
550
|
class: l.value,
|
|
551
|
-
ref: t
|
|
552
|
-
|
|
551
|
+
ref: t,
|
|
552
|
+
style: n.customStyle
|
|
553
|
+
}, [s(), y(), w()]);
|
|
553
554
|
}
|
|
554
555
|
});
|
|
555
556
|
function Ce() {
|
|
@@ -560,8 +561,8 @@ function Ce() {
|
|
|
560
561
|
const a = ((o = e.targetContainer) == null ? void 0 : o.componentInstance) && e.targetContainer.componentInstance.value;
|
|
561
562
|
if (!a)
|
|
562
563
|
return !1;
|
|
563
|
-
const
|
|
564
|
-
return !((e.
|
|
564
|
+
const i = a.schema.type, r = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
|
|
565
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![P["response-layout-item"].type, P["response-form"].type].includes(i) || (e.componentType === P.tabs.type || e.componentType === P.section.type) && ((r == null ? void 0 : r.componentType) !== "frame" || ![P["content-container"].type, P["splitter-pane"].type, P["response-layout-item"].type].includes(i)));
|
|
565
566
|
}
|
|
566
567
|
return {
|
|
567
568
|
basalDragulaRuleForContainer: n
|
|
@@ -597,36 +598,11 @@ const ge = {
|
|
|
597
598
|
}
|
|
598
599
|
]
|
|
599
600
|
}
|
|
600
|
-
},
|
|
601
|
-
mainTitle: {
|
|
602
|
-
title: "主标题",
|
|
603
|
-
type: "string",
|
|
604
|
-
description: "",
|
|
605
|
-
visible: {
|
|
606
|
-
showHeader: !0
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
subTitle: {
|
|
610
|
-
title: "副标题",
|
|
611
|
-
type: "string",
|
|
612
|
-
description: "",
|
|
613
|
-
visible: {
|
|
614
|
-
showHeader: !0
|
|
615
|
-
}
|
|
616
601
|
}
|
|
617
|
-
},
|
|
618
|
-
setPropertyRelates(n, e) {
|
|
619
|
-
if (n)
|
|
620
|
-
switch (n && n.propertyID) {
|
|
621
|
-
case "mainTitle": {
|
|
622
|
-
n.needRefreshControlTree = !0;
|
|
623
|
-
break;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
602
|
}
|
|
627
603
|
},
|
|
628
604
|
appearance: {
|
|
629
|
-
title: "
|
|
605
|
+
title: "外观",
|
|
630
606
|
description: "Appearance",
|
|
631
607
|
properties: {
|
|
632
608
|
class: {
|
|
@@ -642,10 +618,26 @@ const ge = {
|
|
|
642
618
|
type: "boolean",
|
|
643
619
|
description: ""
|
|
644
620
|
},
|
|
621
|
+
mainTitle: {
|
|
622
|
+
title: "主标题",
|
|
623
|
+
type: "string",
|
|
624
|
+
description: "",
|
|
625
|
+
visible: {
|
|
626
|
+
showHeader: !0
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
subTitle: {
|
|
630
|
+
title: "副标题",
|
|
631
|
+
type: "string",
|
|
632
|
+
description: "",
|
|
633
|
+
visible: {
|
|
634
|
+
showHeader: !0
|
|
635
|
+
}
|
|
636
|
+
},
|
|
645
637
|
fill: {
|
|
646
638
|
title: "填充内容区域",
|
|
647
639
|
type: "boolean",
|
|
648
|
-
description: "
|
|
640
|
+
description: ""
|
|
649
641
|
},
|
|
650
642
|
enableAccordion: {
|
|
651
643
|
title: "允许收折",
|
|
@@ -655,6 +647,15 @@ const ge = {
|
|
|
655
647
|
showHeader: !0
|
|
656
648
|
}
|
|
657
649
|
}
|
|
650
|
+
},
|
|
651
|
+
setPropertyRelates(n, e) {
|
|
652
|
+
if (n)
|
|
653
|
+
switch (n && n.propertyID) {
|
|
654
|
+
case "mainTitle": {
|
|
655
|
+
n.needRefreshControlTree = !0;
|
|
656
|
+
break;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
658
659
|
}
|
|
659
660
|
},
|
|
660
661
|
extends: {
|
|
@@ -672,258 +673,268 @@ const ge = {
|
|
|
672
673
|
};
|
|
673
674
|
class Te {
|
|
674
675
|
getTemplateRule(e, t) {
|
|
675
|
-
const a = t == null ? void 0 : t.formSchemaUtils,
|
|
676
|
-
if (!
|
|
677
|
-
return
|
|
678
|
-
const o = this.getComponentContext(e);
|
|
679
|
-
return
|
|
680
|
-
if (!
|
|
676
|
+
const a = t == null ? void 0 : t.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), r = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
677
|
+
if (!i)
|
|
678
|
+
return r;
|
|
679
|
+
const o = this.getComponentContext(e), { componentClassList: f } = o;
|
|
680
|
+
return f.forEach((p) => {
|
|
681
|
+
if (!p || !i[p])
|
|
681
682
|
return;
|
|
682
|
-
const { canMove: s, canDelete: c, canAccept: l } =
|
|
683
|
-
|
|
684
|
-
}),
|
|
683
|
+
const { canMove: s, canDelete: c, canAccept: l } = i[p];
|
|
684
|
+
r.canMove = r.canMove && this.resolveRuleValue(s, o), r.canDelete = r.canDelete && this.resolveRuleValue(c, o), r.canAccept = r.canAccept && this.resolveRuleValue(l, o);
|
|
685
|
+
}), r;
|
|
685
686
|
}
|
|
686
687
|
resolveRuleValue(e, t) {
|
|
687
688
|
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
|
|
688
689
|
}
|
|
689
690
|
parseRuleValueSchema(e, t) {
|
|
690
691
|
const a = e.invalidContext || [];
|
|
691
|
-
let
|
|
692
|
-
for (const
|
|
693
|
-
if (
|
|
694
|
-
if (
|
|
695
|
-
const o = t
|
|
696
|
-
if (o && !o.includes(
|
|
697
|
-
|
|
692
|
+
let i = !0;
|
|
693
|
+
for (const r of a) {
|
|
694
|
+
if (r.firstLevelChild) {
|
|
695
|
+
if (r.firstLevelChild.class) {
|
|
696
|
+
const { firstLevelChildClassList: o } = t;
|
|
697
|
+
if (o && !o.includes(r.firstLevelChild.class)) {
|
|
698
|
+
i = !1;
|
|
698
699
|
continue;
|
|
699
700
|
}
|
|
700
701
|
}
|
|
701
|
-
if (
|
|
702
|
-
const o = t
|
|
703
|
-
if (o
|
|
704
|
-
|
|
702
|
+
if (r.firstLevelChild.type) {
|
|
703
|
+
const { firstLevelChildSchema: o } = t;
|
|
704
|
+
if (!o || o.type !== r.firstLevelChild.type) {
|
|
705
|
+
i = !1;
|
|
705
706
|
continue;
|
|
706
707
|
}
|
|
707
708
|
}
|
|
708
709
|
}
|
|
709
|
-
if (
|
|
710
|
-
if (
|
|
711
|
-
const o = t
|
|
712
|
-
if (o && !o.includes(
|
|
713
|
-
|
|
710
|
+
if (r.secondLevelChild) {
|
|
711
|
+
if (r.secondLevelChild.class) {
|
|
712
|
+
const { secondLevelChildClassList: o } = t;
|
|
713
|
+
if (o && !o.includes(r.secondLevelChild.class)) {
|
|
714
|
+
i = !1;
|
|
714
715
|
continue;
|
|
715
716
|
}
|
|
716
717
|
}
|
|
717
|
-
if (
|
|
718
|
-
const o = t
|
|
719
|
-
if (o
|
|
720
|
-
|
|
718
|
+
if (r.secondLevelChild.type) {
|
|
719
|
+
const { secondLevelChildSchema: o } = t;
|
|
720
|
+
if (!o || o.type !== r.secondLevelChild.type) {
|
|
721
|
+
i = !1;
|
|
721
722
|
continue;
|
|
722
723
|
}
|
|
723
724
|
}
|
|
724
725
|
}
|
|
725
|
-
if (
|
|
726
|
-
if (
|
|
727
|
-
const o = t
|
|
728
|
-
if (o && !o.includes(
|
|
729
|
-
|
|
726
|
+
if (r.parent) {
|
|
727
|
+
if (r.parent.class) {
|
|
728
|
+
const { parentClassList: o } = t;
|
|
729
|
+
if (o && !o.includes(r.parent.class)) {
|
|
730
|
+
i = !1;
|
|
730
731
|
continue;
|
|
731
732
|
}
|
|
732
733
|
}
|
|
733
|
-
if (
|
|
734
|
-
const o = t
|
|
735
|
-
if (o && o.type !==
|
|
736
|
-
|
|
734
|
+
if (r.parent.type) {
|
|
735
|
+
const { parentSchema: o } = t;
|
|
736
|
+
if (o && o.type !== r.parent.type) {
|
|
737
|
+
i = !1;
|
|
737
738
|
continue;
|
|
738
739
|
}
|
|
739
740
|
}
|
|
740
741
|
}
|
|
741
|
-
|
|
742
|
+
i = !0;
|
|
742
743
|
break;
|
|
743
744
|
}
|
|
744
|
-
return !
|
|
745
|
+
return !i;
|
|
745
746
|
}
|
|
746
747
|
getComponentContext(e) {
|
|
747
|
-
var
|
|
748
|
-
const t = e.schema, a = t.appearance && t.appearance.class || "",
|
|
748
|
+
var w, g, M, A;
|
|
749
|
+
const t = e.schema, a = t.appearance && t.appearance.class || "", i = a.split(" ") || [], r = t.contents || [], o = r.length ? r[0] : null, f = o && o.appearance ? o.appearance.class : "", p = f ? f.split(" ") : [], s = (w = o == null ? void 0 : o.contents) != null && w.length ? o == null ? void 0 : o.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", l = c ? c.split(" ") : [], u = t.type === "component" ? (M = (g = e.parent) == null ? void 0 : g.parent) == null ? void 0 : M.schema : (A = e.parent) == null ? void 0 : A.schema, m = u && u.appearance && u.appearance.class || "", y = m ? m.split(" ") : [];
|
|
749
750
|
return {
|
|
750
751
|
componentClass: a,
|
|
751
|
-
componentClassList:
|
|
752
|
-
childContents:
|
|
752
|
+
componentClassList: i,
|
|
753
|
+
childContents: r,
|
|
753
754
|
firstLevelChildSchema: o,
|
|
754
|
-
firstLevelChildClass:
|
|
755
|
-
firstLevelChildClassList:
|
|
755
|
+
firstLevelChildClass: f,
|
|
756
|
+
firstLevelChildClassList: p,
|
|
756
757
|
secondLevelChildSchema: s,
|
|
757
758
|
secondLevelChildClass: c,
|
|
758
759
|
secondLevelChildClassList: l,
|
|
759
760
|
parentSchema: u,
|
|
760
|
-
parentClass:
|
|
761
|
+
parentClass: m,
|
|
761
762
|
parentClassList: y
|
|
762
763
|
};
|
|
763
764
|
}
|
|
764
765
|
}
|
|
765
766
|
function Se(n, e) {
|
|
766
|
-
const t = new Te()
|
|
767
|
-
function
|
|
767
|
+
const t = new Te();
|
|
768
|
+
function a(p) {
|
|
768
769
|
return ge;
|
|
769
770
|
}
|
|
770
|
-
function p
|
|
771
|
-
|
|
771
|
+
function i(p) {
|
|
772
|
+
if (!Ce().basalDragulaRuleForContainer(p, e))
|
|
773
|
+
return !1;
|
|
774
|
+
const { canAccept: c } = t.getTemplateRule(n, e);
|
|
775
|
+
return c;
|
|
772
776
|
}
|
|
773
|
-
function
|
|
774
|
-
|
|
777
|
+
function r() {
|
|
778
|
+
const { canDelete: p } = t.getTemplateRule(n, e);
|
|
779
|
+
return p;
|
|
775
780
|
}
|
|
776
|
-
function
|
|
777
|
-
|
|
781
|
+
function o() {
|
|
782
|
+
const { canMove: p } = t.getTemplateRule(n, e);
|
|
783
|
+
return p;
|
|
778
784
|
}
|
|
779
|
-
function
|
|
780
|
-
|
|
785
|
+
function f() {
|
|
786
|
+
const { canMove: p, canDelete: s } = t.getTemplateRule(n, e);
|
|
787
|
+
return !p && !s;
|
|
781
788
|
}
|
|
782
789
|
return {
|
|
783
|
-
canAccepts:
|
|
784
|
-
checkCanDeleteComponent:
|
|
785
|
-
checkCanMoveComponent:
|
|
786
|
-
hideNestedPaddingInDesginerView:
|
|
787
|
-
getPropsConfig:
|
|
790
|
+
canAccepts: i,
|
|
791
|
+
checkCanDeleteComponent: r,
|
|
792
|
+
checkCanMoveComponent: o,
|
|
793
|
+
hideNestedPaddingInDesginerView: f,
|
|
794
|
+
getPropsConfig: a
|
|
788
795
|
};
|
|
789
796
|
}
|
|
790
797
|
function Me(n, e, t) {
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
795
|
-
a();
|
|
796
|
-
const r = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", o = v();
|
|
797
|
-
function p() {
|
|
798
|
+
var D;
|
|
799
|
+
const a = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = C();
|
|
800
|
+
function o() {
|
|
798
801
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
799
802
|
}
|
|
800
803
|
function f() {
|
|
801
804
|
return !1;
|
|
802
805
|
}
|
|
803
|
-
function
|
|
806
|
+
function p() {
|
|
804
807
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
805
808
|
}
|
|
806
|
-
function
|
|
809
|
+
function s() {
|
|
807
810
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
808
811
|
}
|
|
809
|
-
function
|
|
810
|
-
if (!
|
|
812
|
+
function c(d) {
|
|
813
|
+
if (!d || !d.value)
|
|
811
814
|
return null;
|
|
812
|
-
if (
|
|
813
|
-
return
|
|
814
|
-
const
|
|
815
|
-
return
|
|
815
|
+
if (d.value.schema && d.value.schema.type === "component")
|
|
816
|
+
return d.value;
|
|
817
|
+
const h = C(d == null ? void 0 : d.value.parent), T = c(h);
|
|
818
|
+
return T || null;
|
|
816
819
|
}
|
|
817
|
-
function
|
|
818
|
-
const { componentInstance:
|
|
819
|
-
return !
|
|
820
|
+
function l(d = e) {
|
|
821
|
+
const { componentInstance: h, designerItemElementRef: T } = d;
|
|
822
|
+
return !h || !h.value ? null : h.value.canMove ? T : l(d.parent);
|
|
820
823
|
}
|
|
821
|
-
function d
|
|
822
|
-
return !!t && t.canAccepts(
|
|
824
|
+
function u(d) {
|
|
825
|
+
return !!t && t.canAccepts(d);
|
|
823
826
|
}
|
|
824
|
-
function
|
|
827
|
+
function m() {
|
|
825
828
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
826
829
|
}
|
|
827
|
-
function
|
|
830
|
+
function y() {
|
|
828
831
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
832
|
+
function w(d, h) {
|
|
833
|
+
h && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(h);
|
|
831
834
|
}
|
|
832
|
-
function
|
|
833
|
-
const { componentType:
|
|
834
|
-
let
|
|
835
|
-
t && t.onResolveNewComponentSchema && (
|
|
836
|
-
const W =
|
|
837
|
-
return
|
|
835
|
+
function g(d, h) {
|
|
836
|
+
const { componentType: T } = d;
|
|
837
|
+
let k = $(T, d, h);
|
|
838
|
+
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(d, k));
|
|
839
|
+
const W = T.toLowerCase().replace(/-/g, "_");
|
|
840
|
+
return k && !k.id && k.type === T && (k.id = `${W}_${Math.random().toString().slice(2, 6)}`), k;
|
|
838
841
|
}
|
|
839
|
-
function
|
|
842
|
+
function M(d) {
|
|
840
843
|
}
|
|
841
|
-
function
|
|
844
|
+
function A(...d) {
|
|
842
845
|
if (t && t.getPropsConfig)
|
|
843
|
-
return t.getPropsConfig(...
|
|
846
|
+
return t.getPropsConfig(...d);
|
|
847
|
+
}
|
|
848
|
+
function S() {
|
|
849
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((d) => {
|
|
850
|
+
var k;
|
|
851
|
+
let h = d.id;
|
|
852
|
+
d.type === "component-ref" && (h = d.component);
|
|
853
|
+
const T = n.value.querySelector(`#${h}-design-item`);
|
|
854
|
+
(k = T == null ? void 0 : T.componentInstance) != null && k.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
|
|
855
|
+
});
|
|
844
856
|
}
|
|
845
|
-
return
|
|
846
|
-
canMove:
|
|
857
|
+
return r.value = {
|
|
858
|
+
canMove: o(),
|
|
847
859
|
canSelectParent: f(),
|
|
848
|
-
canDelete:
|
|
849
|
-
canNested: !
|
|
860
|
+
canDelete: p(),
|
|
861
|
+
canNested: !s(),
|
|
850
862
|
contents: e == null ? void 0 : e.schema.contents,
|
|
851
863
|
elementRef: n,
|
|
852
|
-
parent: (
|
|
864
|
+
parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
|
|
853
865
|
schema: e == null ? void 0 : e.schema,
|
|
854
|
-
styles:
|
|
866
|
+
styles: a,
|
|
855
867
|
designerClass: i,
|
|
856
|
-
canAccepts:
|
|
857
|
-
getBelongedComponentInstance:
|
|
858
|
-
getDraggableDesignItemElement:
|
|
859
|
-
getDraggingDisplayText:
|
|
860
|
-
getPropConfig:
|
|
861
|
-
getDragScopeElement:
|
|
862
|
-
onAcceptMovedChildElement:
|
|
863
|
-
onChildElementMovedOut:
|
|
864
|
-
addNewChildComponentSchema:
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
},
|
|
868
|
+
canAccepts: u,
|
|
869
|
+
getBelongedComponentInstance: c,
|
|
870
|
+
getDraggableDesignItemElement: l,
|
|
871
|
+
getDraggingDisplayText: m,
|
|
872
|
+
getPropConfig: A,
|
|
873
|
+
getDragScopeElement: y,
|
|
874
|
+
onAcceptMovedChildElement: w,
|
|
875
|
+
onChildElementMovedOut: M,
|
|
876
|
+
addNewChildComponentSchema: g,
|
|
877
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
878
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || C(!1),
|
|
879
|
+
onRemoveComponent: S
|
|
880
|
+
}, r;
|
|
869
881
|
}
|
|
870
882
|
const we = /* @__PURE__ */ z({
|
|
871
883
|
name: "FSectionDesign",
|
|
872
|
-
props:
|
|
884
|
+
props: B,
|
|
873
885
|
emits: [],
|
|
874
886
|
setup(n, e) {
|
|
875
|
-
const t =
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
const s = v(n.customClass), c = h(() => n.enableAccordion), l = v(n.expandStatus), u = h(() => n.buttonPosition), d = v(!1), y = R(n, e, l, a, r, d), M = j(n, e), C = h(() => {
|
|
882
|
-
const m = {
|
|
887
|
+
const t = C(), a = C(), i = C(), r = O("designer-host-service"), o = O("design-item-context"), f = Se(o, r), p = Me(t, o, f);
|
|
888
|
+
p.value.styles = "display: inherit;", V(() => {
|
|
889
|
+
t.value.componentInstance = p;
|
|
890
|
+
}), e.expose(p.value);
|
|
891
|
+
const s = C(n.customClass), c = b(() => n.enableAccordion), l = C(n.expandStatus), u = b(() => n.buttonPosition), m = C(!1), y = G(n, e, l, a, i, m), w = F(n, e), g = b(() => {
|
|
892
|
+
const d = {
|
|
883
893
|
"f-section": !0,
|
|
884
894
|
"f-section-accordion": c.value === "default",
|
|
885
895
|
"f-state-collapse": (c.value === "default" || c.value === "custom") && !l.value,
|
|
886
896
|
"f-section-custom-accordion": c.value === "custom",
|
|
887
897
|
"f-section-fill": n.fill,
|
|
888
|
-
"f-section-maximize":
|
|
898
|
+
"f-section-maximize": m.value,
|
|
889
899
|
"f-utils-fill": !0,
|
|
890
900
|
"p-0": !0
|
|
891
901
|
};
|
|
892
|
-
return
|
|
893
|
-
}),
|
|
902
|
+
return L(d, s.value);
|
|
903
|
+
}), M = b(() => L({
|
|
894
904
|
"f-section-content": !0,
|
|
895
905
|
"drag-container": !0
|
|
896
|
-
}, n.contentClass)),
|
|
906
|
+
}, n.contentClass)), A = b(() => L({
|
|
897
907
|
"f-section-extend": !0
|
|
898
|
-
},
|
|
899
|
-
function
|
|
900
|
-
return e.slots.extend &&
|
|
901
|
-
class:
|
|
908
|
+
}, A.value));
|
|
909
|
+
function S() {
|
|
910
|
+
return e.slots.extend && v("div", {
|
|
911
|
+
class: A.value
|
|
902
912
|
}, [e.slots.extend()]);
|
|
903
913
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
906
|
-
class:
|
|
914
|
+
function D() {
|
|
915
|
+
return v("div", {
|
|
916
|
+
class: M.value,
|
|
907
917
|
ref: t,
|
|
908
918
|
"data-dragref": `${o.schema.id}-container`
|
|
909
|
-
}, [u.value === "inContent" &&
|
|
919
|
+
}, [u.value === "inContent" && w(), e.slots.default && e.slots.default()]);
|
|
910
920
|
}
|
|
911
|
-
return () =>
|
|
912
|
-
class:
|
|
913
|
-
ref: a
|
|
914
|
-
|
|
921
|
+
return () => v("div", {
|
|
922
|
+
class: g.value,
|
|
923
|
+
ref: a,
|
|
924
|
+
style: n.customStyle
|
|
925
|
+
}, [y(), S(), D()]);
|
|
915
926
|
}
|
|
916
927
|
});
|
|
917
928
|
E.register = (n, e, t, a) => {
|
|
918
|
-
n.section = E, e.section =
|
|
929
|
+
n.section = E, e.section = H;
|
|
919
930
|
};
|
|
920
931
|
E.registerDesigner = (n, e, t) => {
|
|
921
|
-
n.section = we, e.section =
|
|
932
|
+
n.section = we, e.section = H;
|
|
922
933
|
};
|
|
923
934
|
const Ee = Z(E);
|
|
924
935
|
export {
|
|
925
936
|
E as Section,
|
|
926
937
|
Ee as default,
|
|
927
|
-
|
|
928
|
-
|
|
938
|
+
H as propsResolver,
|
|
939
|
+
B as sectionProps
|
|
929
940
|
};
|