@farris/ui-vue 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,114 +1,153 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import
|
|
1
|
+
import { ref as w, computed as T, createVNode as M, defineComponent as G, watch as R, onMounted as _, inject as I } from "vue";
|
|
2
|
+
import { isPlainObject as W, cloneDeep as K } from "lodash-es";
|
|
3
|
+
import ee from "../response-toolbar/index.esm.js";
|
|
4
4
|
import "bignumber.js";
|
|
5
|
-
import { withInstall as
|
|
6
|
-
const J = {},
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title: n } = t,
|
|
9
|
-
return
|
|
5
|
+
import { withInstall as te } from "../common/index.esm.js";
|
|
6
|
+
const J = {}, U = {};
|
|
7
|
+
function H(t) {
|
|
8
|
+
const { properties: e, title: n, ignore: o } = t, s = o && Array.isArray(o), i = Object.keys(e).reduce((y, m) => ((!s || !o.find((C) => C == m)) && (y[m] = e[m].type === "object" && e[m].properties ? H(e[m]) : K(e[m].default)), y), {});
|
|
9
|
+
return (!s || !o.find((y) => y == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
11
|
+
function $(t, e = {}, n) {
|
|
12
|
+
const o = J[t];
|
|
13
|
+
if (o) {
|
|
14
|
+
let s = H(o);
|
|
15
|
+
const i = U[t];
|
|
16
|
+
return s = i ? i({ getSchemaByType: $ }, s, e, n) : s, s;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const n =
|
|
22
|
-
return Object.keys(t).reduce((
|
|
20
|
+
function ne(t, e) {
|
|
21
|
+
const n = H(e);
|
|
22
|
+
return Object.keys(t).reduce((o, s) => (o[s] && W(o[s]) && W(t[s]) ? Object.assign(o[s], t[s]) : o[s] = t[s], o), n), n;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return Object.keys(t).filter((
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
|
|
24
|
+
function oe(t, e) {
|
|
25
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, s) => {
|
|
26
|
+
if (e.has(s)) {
|
|
27
|
+
const i = e.get(s);
|
|
28
|
+
if (typeof i == "string")
|
|
29
|
+
o[i] = t[s];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
31
|
+
const y = i(s, t[s], t);
|
|
32
|
+
Object.assign(o, y);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
|
-
|
|
36
|
-
return
|
|
35
|
+
o[s] = t[s];
|
|
36
|
+
return o;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
return
|
|
39
|
+
function re(t, e, n = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const o = ne(t, e);
|
|
41
|
+
return oe(o, n);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
function e(c,
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
43
|
+
function ae(t = {}) {
|
|
44
|
+
function e(c, b, f, u) {
|
|
45
|
+
if (typeof f == "number")
|
|
46
|
+
return u[c].length === f;
|
|
47
|
+
if (typeof f == "object") {
|
|
48
|
+
const g = Object.keys(f)[0], r = f[g];
|
|
49
|
+
if (g === "not")
|
|
50
|
+
return Number(u[c].length) !== Number(r);
|
|
51
|
+
if (g === "moreThan")
|
|
52
|
+
return Number(u[c].length) >= Number(r);
|
|
53
|
+
if (g === "lessThan")
|
|
54
|
+
return Number(u[c].length) <= Number(r);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function n(c,
|
|
59
|
-
return
|
|
58
|
+
function n(c, b, f, u) {
|
|
59
|
+
return u[c] && u[c].propertyValue && String(u[c].propertyValue.value) === String(f);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const o = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", e],
|
|
63
63
|
["getProperty", n]
|
|
64
64
|
]);
|
|
65
|
-
Object.keys(t).reduce((c,
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const
|
|
72
|
-
return { target:
|
|
65
|
+
Object.keys(t).reduce((c, b) => (c.set(b, t[b]), c), o);
|
|
66
|
+
function s(c, b) {
|
|
67
|
+
const f = c;
|
|
68
|
+
return typeof b == "number" ? [{ target: f, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: f, operator: "getProperty", param: c, value: !!b }] : typeof b == "object" ? Object.keys(b).map((u) => {
|
|
69
|
+
if (u === "length")
|
|
70
|
+
return { target: f, operator: "length", param: null, value: b[u] };
|
|
71
|
+
const g = u, r = b[u];
|
|
72
|
+
return { target: f, operator: "getProperty", param: g, value: r };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return Object.keys(c).reduce((
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
function i(c) {
|
|
76
|
+
return Object.keys(c).reduce((f, u) => {
|
|
77
|
+
const g = s(u, c[u]);
|
|
78
|
+
return f.push(...g), f;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
81
|
+
function y(c, b) {
|
|
82
|
+
if (o.has(c.operator)) {
|
|
83
|
+
const f = o.get(c.operator);
|
|
84
|
+
return f && f(c.target, c.param, c.value, b) || !1;
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function m(c, b) {
|
|
89
|
+
return i(c).reduce((g, r) => g && y(r, b), !0);
|
|
90
90
|
}
|
|
91
|
-
function C(c,
|
|
92
|
-
const
|
|
93
|
-
return
|
|
91
|
+
function C(c, b) {
|
|
92
|
+
const f = Object.keys(c), u = f.includes("allOf"), g = f.includes("anyOf"), r = u || g, p = (r ? c[r ? u ? "allOf" : "anyOf" : "allOf"] : [c]).map((d) => m(d, b));
|
|
93
|
+
return u ? !p.includes(!1) : p.includes(!0);
|
|
94
94
|
}
|
|
95
95
|
return { parseValueSchema: C };
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
const se = {
|
|
98
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
101
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
102
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
103
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
104
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
105
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
106
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
107
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
108
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
109
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
110
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
111
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
112
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
113
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
114
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
116
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
117
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
118
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
119
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
120
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
121
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
122
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
123
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
124
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
125
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
126
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
127
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
128
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
129
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
130
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
131
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
132
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
136
|
+
}, ce = {}, ie = {};
|
|
137
|
+
ae();
|
|
138
|
+
function le(t, e, n = /* @__PURE__ */ new Map(), o = (y, m, C) => m, s = {}, i = (y) => y) {
|
|
139
|
+
return J[e.title] = e, U[e.title] = o, ce[e.title] = s, ie[e.title] = i, (y = {}) => {
|
|
140
|
+
const m = re(y, e, n), C = Object.keys(t).reduce((c, b) => (c[b] = t[b].default, c), {});
|
|
141
|
+
return Object.assign(C, m);
|
|
103
142
|
};
|
|
104
143
|
}
|
|
105
|
-
function
|
|
144
|
+
function pe(t, e) {
|
|
106
145
|
return { customClass: e.class, customStyle: e.style };
|
|
107
146
|
}
|
|
108
|
-
function
|
|
147
|
+
function ue(t, e, n) {
|
|
109
148
|
return e ? { enableAccordion: n.accordionMode } : { enableAccordion: "" };
|
|
110
149
|
}
|
|
111
|
-
function
|
|
150
|
+
function fe(t, e) {
|
|
112
151
|
return e && e.contents && e.contents.length && e.contents.forEach((n) => {
|
|
113
152
|
n.title && (n.text = n.title);
|
|
114
153
|
}), {
|
|
@@ -116,16 +155,43 @@ function le(t, e) {
|
|
|
116
155
|
buttonPosition: e.position
|
|
117
156
|
};
|
|
118
157
|
}
|
|
119
|
-
const
|
|
120
|
-
["appearance",
|
|
158
|
+
const de = /* @__PURE__ */ new Map([
|
|
159
|
+
["appearance", pe],
|
|
121
160
|
["expanded", "expandStatus"],
|
|
122
|
-
["enableAccordion",
|
|
123
|
-
["toolbar",
|
|
161
|
+
["enableAccordion", ue],
|
|
162
|
+
["toolbar", fe]
|
|
124
163
|
]);
|
|
125
|
-
function
|
|
126
|
-
|
|
164
|
+
function ye(t, e, n, o) {
|
|
165
|
+
const s = Math.random().toString().slice(2, 6), i = n.parentComponentInstance;
|
|
166
|
+
Object.assign(e, {
|
|
167
|
+
id: `section-${s}`,
|
|
168
|
+
appearance: {
|
|
169
|
+
class: "f-section-in-mainsubcard"
|
|
170
|
+
},
|
|
171
|
+
enableAccordion: !1,
|
|
172
|
+
mainTitle: e.mainTitle || "标题"
|
|
173
|
+
});
|
|
174
|
+
const y = t.getSchemaByType("content-container");
|
|
175
|
+
Object.assign(y, {
|
|
176
|
+
id: `container-${s}`,
|
|
177
|
+
appearance: {
|
|
178
|
+
class: "f-struct-wrapper"
|
|
179
|
+
},
|
|
180
|
+
contents: [e]
|
|
181
|
+
});
|
|
182
|
+
const m = i.schema;
|
|
183
|
+
switch (m && m.type) {
|
|
184
|
+
case se.splitter.type: {
|
|
185
|
+
e.appearance.class = "f-section-in-main";
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return y;
|
|
127
190
|
}
|
|
128
|
-
|
|
191
|
+
function be(t, e, n, o) {
|
|
192
|
+
return n.parentComponentInstance ? ye(t, e, n) : e;
|
|
193
|
+
}
|
|
194
|
+
const me = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/section.schema.json", ge = "section", Ce = "A Farris Container Component", ve = "object", je = {
|
|
129
195
|
id: {
|
|
130
196
|
description: "The unique identifier for a Section",
|
|
131
197
|
type: "string"
|
|
@@ -250,121 +316,18 @@ const fe = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
250
316
|
},
|
|
251
317
|
default: null
|
|
252
318
|
}
|
|
253
|
-
},
|
|
319
|
+
}, Te = [
|
|
254
320
|
"id",
|
|
255
321
|
"type",
|
|
256
322
|
"contents"
|
|
257
|
-
],
|
|
258
|
-
$schema:
|
|
259
|
-
$id:
|
|
260
|
-
title:
|
|
261
|
-
description:
|
|
262
|
-
type:
|
|
263
|
-
properties:
|
|
264
|
-
required:
|
|
265
|
-
}, Ce = "section", je = "A Farris Container Component", Ae = "object", Te = {
|
|
266
|
-
basic: {
|
|
267
|
-
title: "基本信息",
|
|
268
|
-
description: "Basic Infomation",
|
|
269
|
-
properties: {
|
|
270
|
-
id: {
|
|
271
|
-
title: "标识",
|
|
272
|
-
type: "string",
|
|
273
|
-
description: "The identifier of a component.",
|
|
274
|
-
readonly: !0
|
|
275
|
-
},
|
|
276
|
-
type: {
|
|
277
|
-
title: "组件类型",
|
|
278
|
-
type: "enum",
|
|
279
|
-
description: "The type of a component.",
|
|
280
|
-
editor: {
|
|
281
|
-
type: "combo-list",
|
|
282
|
-
textField: "value",
|
|
283
|
-
valueField: "key",
|
|
284
|
-
data: [
|
|
285
|
-
{
|
|
286
|
-
key: "section",
|
|
287
|
-
value: "分组面板"
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
mainTitle: {
|
|
293
|
-
title: "主标题",
|
|
294
|
-
type: "string",
|
|
295
|
-
description: ""
|
|
296
|
-
},
|
|
297
|
-
subTitle: {
|
|
298
|
-
title: "副标题",
|
|
299
|
-
type: "string",
|
|
300
|
-
description: ""
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
appearance: {
|
|
305
|
-
title: "样式",
|
|
306
|
-
description: "Appearance",
|
|
307
|
-
properties: {
|
|
308
|
-
class: {
|
|
309
|
-
description: "组件的CSS样式",
|
|
310
|
-
title: "class样式"
|
|
311
|
-
},
|
|
312
|
-
style: {
|
|
313
|
-
description: "组件的内容样式",
|
|
314
|
-
title: "style样式"
|
|
315
|
-
},
|
|
316
|
-
fill: {
|
|
317
|
-
title: "填充内容区域",
|
|
318
|
-
type: "boolean",
|
|
319
|
-
description: "To fill the space of parent container in flex layout."
|
|
320
|
-
},
|
|
321
|
-
showHeader: {
|
|
322
|
-
title: "显示标题区域",
|
|
323
|
-
type: "boolean",
|
|
324
|
-
description: ""
|
|
325
|
-
},
|
|
326
|
-
mainTitle: {
|
|
327
|
-
title: "主标题",
|
|
328
|
-
type: "string",
|
|
329
|
-
description: "",
|
|
330
|
-
visible: {
|
|
331
|
-
showHeader: !0
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
subTitle: {
|
|
335
|
-
title: "副标题",
|
|
336
|
-
type: "string",
|
|
337
|
-
description: "",
|
|
338
|
-
visible: {
|
|
339
|
-
showHeader: !0
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
enableAccordion: {
|
|
343
|
-
title: "允许收折",
|
|
344
|
-
type: "boolean",
|
|
345
|
-
description: "",
|
|
346
|
-
visible: {
|
|
347
|
-
showHeader: !0
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
extends: {
|
|
353
|
-
title: "扩展",
|
|
354
|
-
description: "",
|
|
355
|
-
properties: {
|
|
356
|
-
contentClass: {
|
|
357
|
-
title: "内容区域样式",
|
|
358
|
-
type: "string",
|
|
359
|
-
description: ""
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}, we = {
|
|
364
|
-
title: Ce,
|
|
365
|
-
description: je,
|
|
366
|
-
type: Ae,
|
|
367
|
-
categories: Te
|
|
323
|
+
], Ae = {
|
|
324
|
+
$schema: me,
|
|
325
|
+
$id: he,
|
|
326
|
+
title: ge,
|
|
327
|
+
description: Ce,
|
|
328
|
+
type: ve,
|
|
329
|
+
properties: je,
|
|
330
|
+
required: Te
|
|
368
331
|
}, L = {
|
|
369
332
|
/** 设置内容区域样式 */
|
|
370
333
|
contentClass: { type: String, default: "" },
|
|
@@ -409,24 +372,24 @@ const fe = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
409
372
|
// toolbarPosition: { type: String, default: '' },
|
|
410
373
|
// toolbarButtons: { type: Array<object>, default: [] },
|
|
411
374
|
// toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
|
|
412
|
-
},
|
|
413
|
-
function
|
|
414
|
-
let
|
|
415
|
-
function
|
|
416
|
-
!t || !e.value || (n.value = !n.value, n.value ?
|
|
375
|
+
}, Z = le(L, Ae, de, be);
|
|
376
|
+
function we(t, e, n) {
|
|
377
|
+
let o;
|
|
378
|
+
function s() {
|
|
379
|
+
!t || !e.value || (n.value = !n.value, n.value ? i() : y());
|
|
417
380
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
381
|
+
function i() {
|
|
382
|
+
o = t.value.nextElementSibling;
|
|
420
383
|
const C = document && document.querySelector("body");
|
|
421
|
-
C && (C.appendChild(t.value), t.value.style.zIndex =
|
|
384
|
+
C && (C.appendChild(t.value), t.value.style.zIndex = m());
|
|
422
385
|
}
|
|
423
|
-
function
|
|
424
|
-
|
|
386
|
+
function y() {
|
|
387
|
+
o ? e.value.insertBefore(
|
|
425
388
|
t.value,
|
|
426
|
-
|
|
389
|
+
o
|
|
427
390
|
) : e.value.appendChild(t.value), t.value.style.zIndex = null;
|
|
428
391
|
}
|
|
429
|
-
function
|
|
392
|
+
function m(C = 1) {
|
|
430
393
|
const c = [
|
|
431
394
|
"body>.f-datagrid-settings-simple-host",
|
|
432
395
|
"body>div",
|
|
@@ -437,170 +400,170 @@ function Se(t, e, n) {
|
|
|
437
400
|
"body>.popover.show",
|
|
438
401
|
"body>filter-row-panel>.f-datagrid-filter-panel",
|
|
439
402
|
"body>.f-section-maximize"
|
|
440
|
-
],
|
|
441
|
-
const { display:
|
|
442
|
-
return
|
|
443
|
-
}).filter((
|
|
444
|
-
let
|
|
445
|
-
return
|
|
403
|
+
], b = Array.from(document.body.querySelectorAll(c.join(","))).filter((u) => u).map((u) => {
|
|
404
|
+
const { display: g, zIndex: r } = window.getComputedStyle(u);
|
|
405
|
+
return g === "none" ? 0 : parseInt(r, 10);
|
|
406
|
+
}).filter((u) => u);
|
|
407
|
+
let f = Math.max(...b);
|
|
408
|
+
return f < 1040 && (f = 1040), f + C;
|
|
446
409
|
}
|
|
447
|
-
return { onClickMaxMinIcon:
|
|
410
|
+
return { onClickMaxMinIcon: s };
|
|
448
411
|
}
|
|
449
|
-
function
|
|
450
|
-
const n =
|
|
412
|
+
function z(t, e) {
|
|
413
|
+
const n = w(t.buttons), o = T(() => t.buttonPosition === "inHead" ? "right" : "left"), s = T(() => "f-section-toolbar" + (t.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), i = T(() => {
|
|
451
414
|
t.buttons && t.buttons.length > 0 && t.buttonPosition;
|
|
452
415
|
});
|
|
453
|
-
function
|
|
454
|
-
e.emit("Click",
|
|
416
|
+
function y(m) {
|
|
417
|
+
e.emit("Click", m);
|
|
455
418
|
}
|
|
456
|
-
return () =>
|
|
457
|
-
customClass:
|
|
419
|
+
return () => i && M(ee, {
|
|
420
|
+
customClass: s.value,
|
|
458
421
|
items: n.value,
|
|
459
|
-
onClick:
|
|
460
|
-
alignment:
|
|
422
|
+
onClick: y,
|
|
423
|
+
alignment: o.value
|
|
461
424
|
}, null);
|
|
462
425
|
}
|
|
463
|
-
function Q(t, e, n,
|
|
464
|
-
|
|
465
|
-
const
|
|
426
|
+
function Q(t, e, n, o, s, i) {
|
|
427
|
+
w(t.subTitle);
|
|
428
|
+
const y = T(() => t.buttonPosition), m = z(t, e), {
|
|
466
429
|
onClickMaxMinIcon: C
|
|
467
|
-
} =
|
|
468
|
-
const
|
|
430
|
+
} = we(o, s, i), c = T(() => !!t.subTitle), b = T(() => t.enableMaximize), f = T(() => t.enableAccordion != ""), u = T(() => {
|
|
431
|
+
const d = {
|
|
469
432
|
"f-section-header": !0
|
|
470
433
|
};
|
|
471
|
-
return e.slots.header && t.headerClass.split(" ").reduce((
|
|
434
|
+
return e.slots.header && t.headerClass.split(" ").reduce((S, h) => (S[h] = !0, S), d), d;
|
|
472
435
|
});
|
|
473
|
-
function
|
|
474
|
-
|
|
436
|
+
function g(d) {
|
|
437
|
+
d.stopPropagation(), t.enableAccordion !== "" && (n.value = !n.value);
|
|
475
438
|
}
|
|
476
|
-
function
|
|
477
|
-
const
|
|
439
|
+
function r() {
|
|
440
|
+
const d = T(() => ({
|
|
478
441
|
btn: !0,
|
|
479
442
|
"f-btn-collapse-expand": !0,
|
|
480
443
|
"f-btn-mx": !0,
|
|
481
444
|
"f-state-expand": n.value
|
|
482
|
-
})),
|
|
445
|
+
})), v = T(() => ({
|
|
483
446
|
"f-icon": !0,
|
|
484
|
-
"f-icon-maximize": !
|
|
485
|
-
"f-icon-minimize":
|
|
447
|
+
"f-icon-maximize": !i.value,
|
|
448
|
+
"f-icon-minimize": i.value
|
|
486
449
|
}));
|
|
487
|
-
return
|
|
450
|
+
return M("div", {
|
|
488
451
|
class: "f-max-accordion"
|
|
489
|
-
}, [
|
|
490
|
-
class:
|
|
452
|
+
}, [b.value ? M("span", {
|
|
453
|
+
class: v.value,
|
|
491
454
|
onClick: C
|
|
492
|
-
}, null) : "",
|
|
493
|
-
class:
|
|
494
|
-
onClick:
|
|
495
|
-
}, [
|
|
455
|
+
}, null) : "", f.value ? M("button", {
|
|
456
|
+
class: d.value,
|
|
457
|
+
onClick: g
|
|
458
|
+
}, [M("span", null, [n.value ? t.collapseLabel : t.expandLabel])]) : ""]);
|
|
496
459
|
}
|
|
497
|
-
function
|
|
498
|
-
return e.slots.header ?
|
|
499
|
-
class:
|
|
460
|
+
function l() {
|
|
461
|
+
return e.slots.header ? M("div", {
|
|
462
|
+
class: u.value
|
|
500
463
|
}, [e.slots.header()]) : "";
|
|
501
464
|
}
|
|
502
|
-
function
|
|
503
|
-
return
|
|
465
|
+
function a() {
|
|
466
|
+
return M("div", {
|
|
504
467
|
class: "f-title",
|
|
505
|
-
onClick:
|
|
506
|
-
}, [
|
|
468
|
+
onClick: g
|
|
469
|
+
}, [M("h4", {
|
|
507
470
|
class: "f-title-text"
|
|
508
|
-
}, [t.mainTitle]), c.value &&
|
|
471
|
+
}, [t.mainTitle]), c.value && M("span", null, [t.subTitle])]);
|
|
509
472
|
}
|
|
510
|
-
function
|
|
511
|
-
const
|
|
512
|
-
const
|
|
473
|
+
function p() {
|
|
474
|
+
const d = T(() => {
|
|
475
|
+
const v = {
|
|
513
476
|
"f-content": !0
|
|
514
477
|
};
|
|
515
|
-
return t.headerContentClass && t.headerContentClass.split(" ").reduce((
|
|
478
|
+
return t.headerContentClass && t.headerContentClass.split(" ").reduce((h, P) => (h[P] = !0, h), v), v;
|
|
516
479
|
});
|
|
517
|
-
return e.slots.headerContent ?
|
|
518
|
-
class:
|
|
480
|
+
return e.slots.headerContent ? M("div", {
|
|
481
|
+
class: d.value
|
|
519
482
|
}, [e.slots.headerContent()]) : "";
|
|
520
483
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
523
|
-
class:
|
|
524
|
-
}, [e.slots.headerTitle ? e.slots.headerTitle() :
|
|
484
|
+
function j() {
|
|
485
|
+
return M("div", {
|
|
486
|
+
class: u.value
|
|
487
|
+
}, [e.slots.headerTitle ? e.slots.headerTitle() : a(), p(), y.value === "inHead" && m(), (b.value || f.value) && r()]);
|
|
525
488
|
}
|
|
526
|
-
return () => t.showHeader && (e.slots.header ?
|
|
489
|
+
return () => t.showHeader && (e.slots.header ? l() : j());
|
|
527
490
|
}
|
|
528
|
-
const
|
|
529
|
-
function
|
|
491
|
+
const Se = ["moz", "ms", "webkit"];
|
|
492
|
+
function Pe() {
|
|
530
493
|
let t = 0;
|
|
531
494
|
return (e) => {
|
|
532
|
-
const n = (/* @__PURE__ */ new Date()).getTime(),
|
|
533
|
-
e(n +
|
|
534
|
-
},
|
|
535
|
-
return t = n +
|
|
495
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), s = setTimeout(() => {
|
|
496
|
+
e(n + o);
|
|
497
|
+
}, o);
|
|
498
|
+
return t = n + o, s;
|
|
536
499
|
};
|
|
537
500
|
}
|
|
538
|
-
function
|
|
501
|
+
function Me() {
|
|
539
502
|
if (typeof window > "u")
|
|
540
503
|
return () => 0;
|
|
541
504
|
if (window.requestAnimationFrame)
|
|
542
505
|
return window.requestAnimationFrame.bind(window);
|
|
543
|
-
const t =
|
|
544
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
506
|
+
const t = Se.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
507
|
+
return t ? window[`${t}RequestAnimationFrame`] : Pe();
|
|
545
508
|
}
|
|
546
|
-
|
|
547
|
-
function
|
|
548
|
-
return ((e == null ? void 0 : e.split(" ")) || []).reduce((
|
|
509
|
+
Me();
|
|
510
|
+
function O(t, e) {
|
|
511
|
+
return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, s) => (s && (o[s] = !0), o), t), t;
|
|
549
512
|
}
|
|
550
|
-
const
|
|
513
|
+
const x = /* @__PURE__ */ G({
|
|
551
514
|
name: "FSection",
|
|
552
515
|
props: L,
|
|
553
516
|
emits: [],
|
|
554
517
|
setup(t, e) {
|
|
555
|
-
const n =
|
|
556
|
-
let
|
|
557
|
-
const
|
|
558
|
-
const
|
|
518
|
+
const n = w();
|
|
519
|
+
let o = w();
|
|
520
|
+
const s = w(t.customClass), i = T(() => t.enableAccordion), y = w(t.expandStatus), m = T(() => t.buttonPosition), C = w(!1), c = Q(t, e, y, n, o, C), b = z(t, e), f = T(() => {
|
|
521
|
+
const a = {
|
|
559
522
|
"f-section": !0,
|
|
560
|
-
"f-section-accordion":
|
|
561
|
-
"f-state-collapse": (
|
|
562
|
-
"f-section-custom-accordion":
|
|
523
|
+
"f-section-accordion": i.value === "default",
|
|
524
|
+
"f-state-collapse": (i.value === "default" || i.value === "custom") && !y.value,
|
|
525
|
+
"f-section-custom-accordion": i.value === "custom",
|
|
563
526
|
"f-section-fill": t.fill,
|
|
564
527
|
"f-section-maximize": C.value
|
|
565
528
|
};
|
|
566
|
-
return
|
|
567
|
-
}),
|
|
529
|
+
return O(a, s.value);
|
|
530
|
+
}), u = T(() => O({
|
|
568
531
|
"f-section-content": !0
|
|
569
|
-
}, t.contentClass)),
|
|
532
|
+
}, t.contentClass)), g = T(() => O({
|
|
570
533
|
"f-section-extend": !0
|
|
571
|
-
},
|
|
572
|
-
function
|
|
573
|
-
return e.slots.extend &&
|
|
574
|
-
class:
|
|
534
|
+
}, g.value));
|
|
535
|
+
function r() {
|
|
536
|
+
return e.slots.extend && M("div", {
|
|
537
|
+
class: g.value
|
|
575
538
|
}, [e.slots.extend()]);
|
|
576
539
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
579
|
-
class:
|
|
580
|
-
}, [
|
|
540
|
+
function l() {
|
|
541
|
+
return M("div", {
|
|
542
|
+
class: u.value
|
|
543
|
+
}, [m.value === "inContent" && b(), e.slots.default && e.slots.default()]);
|
|
581
544
|
}
|
|
582
|
-
return
|
|
583
|
-
|
|
545
|
+
return R(() => t.expandStatus, (a, p) => {
|
|
546
|
+
a !== p && (y.value = a);
|
|
584
547
|
}), _(() => {
|
|
585
|
-
n && n.value && (
|
|
586
|
-
}), () =>
|
|
587
|
-
class:
|
|
548
|
+
n && n.value && (o.value = n.value.parentElement);
|
|
549
|
+
}), () => M("div", {
|
|
550
|
+
class: f.value,
|
|
588
551
|
ref: n
|
|
589
|
-
}, [c(),
|
|
552
|
+
}, [c(), r(), l()]);
|
|
590
553
|
}
|
|
591
554
|
});
|
|
592
|
-
function
|
|
555
|
+
function ke() {
|
|
593
556
|
function t(e) {
|
|
594
|
-
var
|
|
557
|
+
var s, i;
|
|
595
558
|
if (!e)
|
|
596
559
|
return !1;
|
|
597
|
-
const n = ((
|
|
560
|
+
const n = ((s = e.targetContainer) == null ? void 0 : s.componentInstance) && e.targetContainer.componentInstance.value;
|
|
598
561
|
if (!n)
|
|
599
562
|
return !1;
|
|
600
|
-
const
|
|
563
|
+
const o = (i = n.schema.appearance) == null ? void 0 : i.class;
|
|
601
564
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
602
|
-
const
|
|
603
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
565
|
+
const y = n.schema.type, m = (y === "response-form" || y === "content-container") && o && o.includes("farris-form");
|
|
566
|
+
if (n.schema.type !== "response-layout-item" && !m)
|
|
604
567
|
return !1;
|
|
605
568
|
}
|
|
606
569
|
return e.controlType !== "field-set";
|
|
@@ -609,7 +572,7 @@ function Oe() {
|
|
|
609
572
|
basalDragulaRuleForContainer: t
|
|
610
573
|
};
|
|
611
574
|
}
|
|
612
|
-
const
|
|
575
|
+
const De = "https://json-schema.org/draft/2020-12/schema", Ee = "https://farris-design.gitee.io/dragging-rules.schema.json", Oe = "Dragging Rules", xe = "The rules of designer canvas", Ne = "object", Fe = {
|
|
613
576
|
"f-page": {
|
|
614
577
|
description: "The root class of page designed by farris.",
|
|
615
578
|
type: "object",
|
|
@@ -1028,6 +991,80 @@ const Ee = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-
|
|
|
1028
991
|
"f-list-nav-left": {
|
|
1029
992
|
description: "",
|
|
1030
993
|
type: "object"
|
|
994
|
+
},
|
|
995
|
+
"f-struct-data-grid-in-nav": {
|
|
996
|
+
description: "",
|
|
997
|
+
type: "object",
|
|
998
|
+
properties: {
|
|
999
|
+
contents: {
|
|
1000
|
+
type: "object",
|
|
1001
|
+
properties: {
|
|
1002
|
+
"f-section-form": {
|
|
1003
|
+
description: "",
|
|
1004
|
+
type: "object",
|
|
1005
|
+
properties: {
|
|
1006
|
+
rules: {
|
|
1007
|
+
type: "object",
|
|
1008
|
+
properties: {
|
|
1009
|
+
canAccept: {
|
|
1010
|
+
type: "boolean",
|
|
1011
|
+
const: !1
|
|
1012
|
+
},
|
|
1013
|
+
fixed: {
|
|
1014
|
+
type: "boolean",
|
|
1015
|
+
const: !0
|
|
1016
|
+
},
|
|
1017
|
+
hidePadding: {
|
|
1018
|
+
type: "boolean",
|
|
1019
|
+
const: !0
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
"f-section-grid": {
|
|
1026
|
+
description: "",
|
|
1027
|
+
type: "object",
|
|
1028
|
+
properties: {
|
|
1029
|
+
rules: {
|
|
1030
|
+
type: "object",
|
|
1031
|
+
properties: {
|
|
1032
|
+
canAccept: {
|
|
1033
|
+
type: "boolean",
|
|
1034
|
+
const: !1
|
|
1035
|
+
},
|
|
1036
|
+
fixed: {
|
|
1037
|
+
type: "boolean",
|
|
1038
|
+
const: !0
|
|
1039
|
+
},
|
|
1040
|
+
hidePadding: {
|
|
1041
|
+
type: "boolean",
|
|
1042
|
+
const: !0
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
rules: {
|
|
1051
|
+
type: "object",
|
|
1052
|
+
properties: {
|
|
1053
|
+
canAccept: {
|
|
1054
|
+
type: "boolean",
|
|
1055
|
+
const: !1
|
|
1056
|
+
},
|
|
1057
|
+
fixed: {
|
|
1058
|
+
type: "boolean",
|
|
1059
|
+
const: !0
|
|
1060
|
+
},
|
|
1061
|
+
hidePadding: {
|
|
1062
|
+
type: "boolean",
|
|
1063
|
+
const: !0
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1031
1068
|
}
|
|
1032
1069
|
}
|
|
1033
1070
|
}
|
|
@@ -1173,163 +1210,269 @@ const Ee = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-
|
|
|
1173
1210
|
description: "",
|
|
1174
1211
|
type: "object"
|
|
1175
1212
|
}
|
|
1176
|
-
},
|
|
1177
|
-
$schema:
|
|
1178
|
-
$id:
|
|
1179
|
-
title:
|
|
1180
|
-
description:
|
|
1181
|
-
type:
|
|
1182
|
-
properties:
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
function
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
return Number(f[o].length) <= Number(j);
|
|
1213
|
+
}, Be = {
|
|
1214
|
+
$schema: De,
|
|
1215
|
+
$id: Ee,
|
|
1216
|
+
title: Oe,
|
|
1217
|
+
description: xe,
|
|
1218
|
+
type: Ne,
|
|
1219
|
+
properties: Fe
|
|
1220
|
+
}, B = /* @__PURE__ */ new Map();
|
|
1221
|
+
function $e() {
|
|
1222
|
+
function t(r, l, a, p) {
|
|
1223
|
+
var j;
|
|
1224
|
+
if (typeof a == "number")
|
|
1225
|
+
return ((j = p[r]) == null ? void 0 : j.length) === a;
|
|
1226
|
+
if (typeof a == "object") {
|
|
1227
|
+
const d = Object.keys(a)[0], v = a[d];
|
|
1228
|
+
if (d === "not")
|
|
1229
|
+
return Number(p[r].length) !== Number(v);
|
|
1230
|
+
if (d === "moreThan")
|
|
1231
|
+
return Number(p[r].length) >= Number(v);
|
|
1232
|
+
if (d === "lessThan")
|
|
1233
|
+
return Number(p[r].length) <= Number(v);
|
|
1198
1234
|
}
|
|
1199
1235
|
return !1;
|
|
1200
1236
|
}
|
|
1201
|
-
function e(
|
|
1202
|
-
return typeof
|
|
1237
|
+
function e(r, l, a, p) {
|
|
1238
|
+
return typeof a == "boolean" ? p.childrenClassList.includes(l) === !!a : !1;
|
|
1203
1239
|
}
|
|
1204
|
-
function n(
|
|
1205
|
-
return typeof
|
|
1240
|
+
function n(r, l, a, p) {
|
|
1241
|
+
return typeof a == "boolean" ? p.parentClassList.includes(l) === !!a : !1;
|
|
1206
1242
|
}
|
|
1207
|
-
function r
|
|
1208
|
-
return typeof
|
|
1243
|
+
function o(r, l, a, p) {
|
|
1244
|
+
return typeof a == "boolean" ? p.parentClassList.includes(l) === !!a : !1;
|
|
1209
1245
|
}
|
|
1210
|
-
const
|
|
1246
|
+
const s = /* @__PURE__ */ new Map([
|
|
1211
1247
|
["length", t],
|
|
1212
1248
|
["hasChildren", e],
|
|
1213
|
-
["hasSibling",
|
|
1249
|
+
["hasSibling", o],
|
|
1214
1250
|
["hasParent", n]
|
|
1215
1251
|
]);
|
|
1216
|
-
function
|
|
1217
|
-
const
|
|
1218
|
-
return typeof
|
|
1219
|
-
if (
|
|
1220
|
-
return { target:
|
|
1221
|
-
const
|
|
1222
|
-
return { target:
|
|
1252
|
+
function i(r, l) {
|
|
1253
|
+
const a = r;
|
|
1254
|
+
return typeof l == "number" ? [{ target: a, operator: "length", param: null, value: Number(l) }] : typeof l == "object" ? Object.keys(l).map((p) => {
|
|
1255
|
+
if (p === "length")
|
|
1256
|
+
return { target: a, operator: "length", param: null, value: l[p] };
|
|
1257
|
+
const j = p, d = l[p];
|
|
1258
|
+
return { target: a, operator: r === "children" ? "hasChildren" : r === "parent" ? "hasParent" : "hasSibling", param: j, value: d };
|
|
1223
1259
|
}) : [];
|
|
1224
1260
|
}
|
|
1225
|
-
function
|
|
1226
|
-
if (
|
|
1227
|
-
const
|
|
1228
|
-
return
|
|
1261
|
+
function y(r, l) {
|
|
1262
|
+
if (s.has(r.operator)) {
|
|
1263
|
+
const a = s.get(r.operator);
|
|
1264
|
+
return a && a(r.target, r.param, r.value, l) || !1;
|
|
1229
1265
|
}
|
|
1230
1266
|
return !1;
|
|
1231
1267
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return Object.keys(
|
|
1234
|
-
const
|
|
1235
|
-
return
|
|
1236
|
-
}, []).reduce((
|
|
1268
|
+
function m(r, l) {
|
|
1269
|
+
return Object.keys(r).reduce((d, v) => {
|
|
1270
|
+
const S = i(v, r[v]);
|
|
1271
|
+
return d.push(...S), d;
|
|
1272
|
+
}, []).reduce((d, v) => d && y(v, l), !0);
|
|
1237
1273
|
}
|
|
1238
|
-
function C(
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1274
|
+
function C(r, l) {
|
|
1275
|
+
const a = Object.keys(r), p = a.includes("allOf"), j = a.includes("anyOf"), d = p || j, h = (d ? r[d ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((A) => m(A, l));
|
|
1276
|
+
return p ? !h.includes(!1) : h.includes(!0);
|
|
1241
1277
|
}
|
|
1242
|
-
function c(
|
|
1243
|
-
const
|
|
1244
|
-
return
|
|
1278
|
+
function c(r, l) {
|
|
1279
|
+
const a = r.const;
|
|
1280
|
+
return a ? typeof a == "boolean" ? a : typeof a == "object" ? C(a, l) : !1 : !1;
|
|
1245
1281
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return (
|
|
1248
|
-
const
|
|
1249
|
-
return
|
|
1250
|
-
const
|
|
1251
|
-
return
|
|
1252
|
-
},
|
|
1282
|
+
function b(r) {
|
|
1283
|
+
return (l) => {
|
|
1284
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1285
|
+
return r && r.properties && Object.keys(r.properties).reduce((p, j) => {
|
|
1286
|
+
const d = r.properties[j];
|
|
1287
|
+
return p[j] = c(d, l), p;
|
|
1288
|
+
}, a), a;
|
|
1253
1289
|
};
|
|
1254
1290
|
}
|
|
1255
|
-
function
|
|
1256
|
-
if (
|
|
1257
|
-
const { rules:
|
|
1258
|
-
|
|
1259
|
-
(
|
|
1291
|
+
function f(r, l, a) {
|
|
1292
|
+
if (l.type === "object" && l.properties) {
|
|
1293
|
+
const { rules: p, contents: j } = l.properties;
|
|
1294
|
+
a.set(r, b(p)), j && Object.keys(j.properties).forEach(
|
|
1295
|
+
(d) => f(d, j.properties[d], a)
|
|
1260
1296
|
);
|
|
1261
1297
|
}
|
|
1262
1298
|
}
|
|
1263
|
-
function
|
|
1264
|
-
const { properties:
|
|
1265
|
-
Object.keys(
|
|
1266
|
-
|
|
1299
|
+
function u() {
|
|
1300
|
+
const { properties: r } = Be;
|
|
1301
|
+
Object.keys(r).forEach((l) => {
|
|
1302
|
+
f(l, r[l], B);
|
|
1267
1303
|
});
|
|
1268
1304
|
}
|
|
1269
|
-
function
|
|
1270
|
-
const
|
|
1271
|
-
return
|
|
1305
|
+
function g(r, l) {
|
|
1306
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1307
|
+
return B.has(r) ? B.get(r)(l) : a;
|
|
1272
1308
|
}
|
|
1273
|
-
return
|
|
1309
|
+
return u(), { getRuleValue: g };
|
|
1274
1310
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1311
|
+
const He = {
|
|
1312
|
+
title: "section",
|
|
1313
|
+
description: "A Farris Container Component",
|
|
1314
|
+
type: "object",
|
|
1315
|
+
categories: {
|
|
1316
|
+
basic: {
|
|
1317
|
+
title: "基本信息",
|
|
1318
|
+
description: "Basic Infomation",
|
|
1319
|
+
properties: {
|
|
1320
|
+
id: {
|
|
1321
|
+
title: "标识",
|
|
1322
|
+
type: "string",
|
|
1323
|
+
description: "The identifier of a component.",
|
|
1324
|
+
readonly: !0
|
|
1325
|
+
},
|
|
1326
|
+
type: {
|
|
1327
|
+
title: "组件类型",
|
|
1328
|
+
type: "enum",
|
|
1329
|
+
description: "The type of a component.",
|
|
1330
|
+
editor: {
|
|
1331
|
+
type: "combo-list",
|
|
1332
|
+
textField: "value",
|
|
1333
|
+
valueField: "key",
|
|
1334
|
+
data: [
|
|
1335
|
+
{
|
|
1336
|
+
key: "section",
|
|
1337
|
+
value: "分组面板"
|
|
1338
|
+
}
|
|
1339
|
+
]
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
mainTitle: {
|
|
1343
|
+
title: "主标题",
|
|
1344
|
+
type: "string",
|
|
1345
|
+
description: "",
|
|
1346
|
+
visible: {
|
|
1347
|
+
showHeader: !0
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
subTitle: {
|
|
1351
|
+
title: "副标题",
|
|
1352
|
+
type: "string",
|
|
1353
|
+
description: "",
|
|
1354
|
+
visible: {
|
|
1355
|
+
showHeader: !0
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
setPropertyRelates(t, e) {
|
|
1360
|
+
if (t)
|
|
1361
|
+
switch (t && t.propertyID) {
|
|
1362
|
+
case "mainTitle": {
|
|
1363
|
+
t.needRefreshControlTree = !0;
|
|
1364
|
+
break;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
appearance: {
|
|
1370
|
+
title: "样式",
|
|
1371
|
+
description: "Appearance",
|
|
1372
|
+
properties: {
|
|
1373
|
+
class: {
|
|
1374
|
+
description: "组件的CSS样式",
|
|
1375
|
+
title: "class样式"
|
|
1376
|
+
},
|
|
1377
|
+
style: {
|
|
1378
|
+
description: "组件的内容样式",
|
|
1379
|
+
title: "style样式"
|
|
1380
|
+
},
|
|
1381
|
+
showHeader: {
|
|
1382
|
+
title: "显示标题区域",
|
|
1383
|
+
type: "boolean",
|
|
1384
|
+
description: ""
|
|
1385
|
+
},
|
|
1386
|
+
fill: {
|
|
1387
|
+
title: "填充内容区域",
|
|
1388
|
+
type: "boolean",
|
|
1389
|
+
description: "To fill the space of parent container in flex layout."
|
|
1390
|
+
},
|
|
1391
|
+
enableAccordion: {
|
|
1392
|
+
title: "允许收折",
|
|
1393
|
+
type: "boolean",
|
|
1394
|
+
description: "",
|
|
1395
|
+
visible: {
|
|
1396
|
+
showHeader: !0
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
extends: {
|
|
1402
|
+
title: "扩展",
|
|
1403
|
+
description: "",
|
|
1404
|
+
properties: {
|
|
1405
|
+
contentClass: {
|
|
1406
|
+
title: "内容区域样式",
|
|
1407
|
+
type: "string",
|
|
1408
|
+
description: ""
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1280
1412
|
}
|
|
1281
|
-
|
|
1413
|
+
};
|
|
1414
|
+
function Le(t, e) {
|
|
1415
|
+
const n = w(!1), o = w(!1), s = $e();
|
|
1416
|
+
let i = !0, y = !1, m, C = !1;
|
|
1417
|
+
function c(a) {
|
|
1418
|
+
return He;
|
|
1419
|
+
}
|
|
1420
|
+
function b(a) {
|
|
1421
|
+
return !(!ke().basalDragulaRuleForContainer(a) || !i);
|
|
1422
|
+
}
|
|
1423
|
+
function f() {
|
|
1282
1424
|
return !C;
|
|
1283
1425
|
}
|
|
1284
1426
|
function u() {
|
|
1285
1427
|
return !C;
|
|
1286
1428
|
}
|
|
1287
|
-
function
|
|
1288
|
-
return
|
|
1429
|
+
function g() {
|
|
1430
|
+
return y;
|
|
1289
1431
|
}
|
|
1290
|
-
function
|
|
1432
|
+
function r(a) {
|
|
1291
1433
|
}
|
|
1292
|
-
function
|
|
1293
|
-
n.value = !1,
|
|
1294
|
-
const
|
|
1295
|
-
const q = F && F.appearance ? F.appearance.class : "",
|
|
1296
|
-
return
|
|
1297
|
-
}, []) : [], A = e,
|
|
1298
|
-
|
|
1299
|
-
componentClass:
|
|
1300
|
-
componentClassList:
|
|
1301
|
-
childContents:
|
|
1302
|
-
firstChildContent:
|
|
1303
|
-
firstChildClass:
|
|
1304
|
-
firstChildClassList:
|
|
1434
|
+
function l() {
|
|
1435
|
+
n.value = !1, o.value = !1, C = !1, i = !0;
|
|
1436
|
+
const a = t, p = a.appearance && a.appearance.class || "", j = p ? p.split(" ") : [], d = a.contents || [], v = d.length ? d[0] : null, S = v && v.appearance && v.appearance.class || "", h = S ? S.split(" ") : [], P = d.length ? d.reduce((V, F) => {
|
|
1437
|
+
const q = F && F.appearance ? F.appearance.class : "", Y = q ? q.split(" ") : [];
|
|
1438
|
+
return V.push(...Y), V;
|
|
1439
|
+
}, []) : [], A = e, k = A && A.appearance && A.appearance.class || "", E = k ? k.split(" ") : [];
|
|
1440
|
+
m = {
|
|
1441
|
+
componentClass: p,
|
|
1442
|
+
componentClassList: j,
|
|
1443
|
+
childContents: d,
|
|
1444
|
+
firstChildContent: v,
|
|
1445
|
+
firstChildClass: S,
|
|
1446
|
+
firstChildClassList: h,
|
|
1305
1447
|
parent: A,
|
|
1306
|
-
parentClass:
|
|
1307
|
-
parentClassList:
|
|
1308
|
-
children:
|
|
1309
|
-
childrenClassList:
|
|
1448
|
+
parentClass: k,
|
|
1449
|
+
parentClassList: E,
|
|
1450
|
+
children: d,
|
|
1451
|
+
childrenClassList: P
|
|
1310
1452
|
};
|
|
1311
|
-
const { canAccept:
|
|
1312
|
-
return
|
|
1453
|
+
const { canAccept: D, fixed: N, hidePadding: X } = s.getRuleValue(j[0], m);
|
|
1454
|
+
return i = D, y = X, C = N, !0;
|
|
1313
1455
|
}
|
|
1314
1456
|
return {
|
|
1315
|
-
canAccepts:
|
|
1316
|
-
checkCanDeleteComponent:
|
|
1457
|
+
canAccepts: b,
|
|
1458
|
+
checkCanDeleteComponent: f,
|
|
1317
1459
|
checkCanMoveComponent: u,
|
|
1318
|
-
hideNestedPaddingInDesginerView:
|
|
1319
|
-
onAcceptMovedChildElement:
|
|
1320
|
-
resolveComponentContext:
|
|
1460
|
+
hideNestedPaddingInDesginerView: g,
|
|
1461
|
+
onAcceptMovedChildElement: r,
|
|
1462
|
+
resolveComponentContext: l,
|
|
1321
1463
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1322
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1464
|
+
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1465
|
+
getPropsConfig: c
|
|
1323
1466
|
};
|
|
1324
1467
|
}
|
|
1325
1468
|
function ze(t, e, n) {
|
|
1326
|
-
var
|
|
1327
|
-
function
|
|
1469
|
+
var S;
|
|
1470
|
+
function o() {
|
|
1328
1471
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
1329
1472
|
}
|
|
1330
|
-
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1473
|
+
o();
|
|
1474
|
+
const s = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", y = w();
|
|
1475
|
+
function m() {
|
|
1333
1476
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
1334
1477
|
}
|
|
1335
1478
|
function C() {
|
|
@@ -1338,137 +1481,137 @@ function ze(t, e, n) {
|
|
|
1338
1481
|
function c() {
|
|
1339
1482
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
1340
1483
|
}
|
|
1341
|
-
function
|
|
1484
|
+
function b() {
|
|
1342
1485
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
1343
1486
|
}
|
|
1344
|
-
function
|
|
1345
|
-
if (!
|
|
1487
|
+
function f(h) {
|
|
1488
|
+
if (!h || !h.value)
|
|
1346
1489
|
return null;
|
|
1347
|
-
if (
|
|
1348
|
-
return
|
|
1349
|
-
const
|
|
1350
|
-
return
|
|
1490
|
+
if (h.value.schema && h.value.schema.type === "component")
|
|
1491
|
+
return h.value;
|
|
1492
|
+
const P = w(h == null ? void 0 : h.value.parent), A = f(P);
|
|
1493
|
+
return A || null;
|
|
1351
1494
|
}
|
|
1352
|
-
function
|
|
1353
|
-
const { componentInstance:
|
|
1354
|
-
return !
|
|
1495
|
+
function u(h = e) {
|
|
1496
|
+
const { componentInstance: P, designerItemElementRef: A } = h;
|
|
1497
|
+
return !P || !P.value ? null : P.value.canMove ? A : u(h.parent);
|
|
1355
1498
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return !!n && n.canAccepts(
|
|
1499
|
+
function g(h) {
|
|
1500
|
+
return !!n && n.canAccepts(h);
|
|
1358
1501
|
}
|
|
1359
|
-
function
|
|
1502
|
+
function r() {
|
|
1360
1503
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
1361
1504
|
}
|
|
1362
|
-
function
|
|
1505
|
+
function l() {
|
|
1363
1506
|
}
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1507
|
+
function a(h, P) {
|
|
1508
|
+
P && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(P);
|
|
1366
1509
|
}
|
|
1367
|
-
function
|
|
1368
|
-
const { componentType: A } =
|
|
1369
|
-
let
|
|
1370
|
-
n && n.onResolveNewComponentSchema && (
|
|
1371
|
-
const
|
|
1372
|
-
return
|
|
1510
|
+
function p(h, P) {
|
|
1511
|
+
const { componentType: A } = h;
|
|
1512
|
+
let k = $(A, h, P);
|
|
1513
|
+
n && n.onResolveNewComponentSchema && (k = n.onResolveNewComponentSchema(h, k));
|
|
1514
|
+
const E = A.toLowerCase().replace("-", "_");
|
|
1515
|
+
return k && !k.id && k.type === A && (k.id = `${E}_${Math.random().toString().slice(2, 6)}`), k;
|
|
1373
1516
|
}
|
|
1374
|
-
function
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1377
|
-
let D =
|
|
1378
|
-
n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(
|
|
1379
|
-
const
|
|
1380
|
-
return D && !D.id && D.type ===
|
|
1517
|
+
function j(h, P) {
|
|
1518
|
+
const A = String(h.getAttribute("data-controltype")), k = h.getAttribute("data-feature"), E = k ? JSON.parse(k) : {};
|
|
1519
|
+
E.parentComponentInstance = y.value;
|
|
1520
|
+
let D = $(A, E);
|
|
1521
|
+
n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(h, P, D));
|
|
1522
|
+
const N = A.toLowerCase().replace("-", "_");
|
|
1523
|
+
return D && !D.id && D.type === A && (D.id = `${N}_${Math.random().toString().slice(2, 6)}`), D;
|
|
1381
1524
|
}
|
|
1382
|
-
function
|
|
1525
|
+
function d(h) {
|
|
1383
1526
|
}
|
|
1384
|
-
function
|
|
1527
|
+
function v(...h) {
|
|
1385
1528
|
if (n && n.getPropsConfig)
|
|
1386
|
-
return n.getPropsConfig(...
|
|
1529
|
+
return n.getPropsConfig(...h);
|
|
1387
1530
|
}
|
|
1388
|
-
return
|
|
1389
|
-
canMove:
|
|
1531
|
+
return y.value = {
|
|
1532
|
+
canMove: m(),
|
|
1390
1533
|
canSelectParent: C(),
|
|
1391
1534
|
canDelete: c(),
|
|
1392
|
-
canNested: !
|
|
1535
|
+
canNested: !b(),
|
|
1393
1536
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1394
1537
|
elementRef: t,
|
|
1395
|
-
parent: (
|
|
1538
|
+
parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
|
|
1396
1539
|
schema: e == null ? void 0 : e.schema,
|
|
1397
|
-
styles:
|
|
1398
|
-
designerClass:
|
|
1399
|
-
canAccepts:
|
|
1400
|
-
getBelongedComponentInstance:
|
|
1401
|
-
getDraggableDesignItemElement:
|
|
1402
|
-
getDraggingDisplayText:
|
|
1403
|
-
getPropConfig:
|
|
1404
|
-
getDragScopeElement:
|
|
1405
|
-
onAcceptMovedChildElement:
|
|
1406
|
-
onAcceptNewChildElement:
|
|
1407
|
-
onChildElementMovedOut:
|
|
1408
|
-
addNewChildComponentSchema:
|
|
1409
|
-
updateDragAndDropRules:
|
|
1410
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
1411
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
1412
|
-
},
|
|
1540
|
+
styles: s,
|
|
1541
|
+
designerClass: i,
|
|
1542
|
+
canAccepts: g,
|
|
1543
|
+
getBelongedComponentInstance: f,
|
|
1544
|
+
getDraggableDesignItemElement: u,
|
|
1545
|
+
getDraggingDisplayText: r,
|
|
1546
|
+
getPropConfig: v,
|
|
1547
|
+
getDragScopeElement: l,
|
|
1548
|
+
onAcceptMovedChildElement: a,
|
|
1549
|
+
onAcceptNewChildElement: j,
|
|
1550
|
+
onChildElementMovedOut: d,
|
|
1551
|
+
addNewChildComponentSchema: p,
|
|
1552
|
+
updateDragAndDropRules: o,
|
|
1553
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || w(!1),
|
|
1554
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || w(!1)
|
|
1555
|
+
}, y;
|
|
1413
1556
|
}
|
|
1414
|
-
const
|
|
1557
|
+
const Ve = /* @__PURE__ */ G({
|
|
1415
1558
|
name: "FSectionDesign",
|
|
1416
1559
|
props: L,
|
|
1417
1560
|
emits: [],
|
|
1418
1561
|
setup(t, e) {
|
|
1419
|
-
var
|
|
1420
|
-
const n =
|
|
1421
|
-
let
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1424
|
-
n.value.componentInstance =
|
|
1425
|
-
}), e.expose(
|
|
1426
|
-
const C =
|
|
1427
|
-
const
|
|
1562
|
+
var v;
|
|
1563
|
+
const n = w(), o = w();
|
|
1564
|
+
let s = w();
|
|
1565
|
+
const i = I("design-item-context"), y = Le(i.schema, (v = i.parent) == null ? void 0 : v.schema), m = ze(n, i, y);
|
|
1566
|
+
m.value.styles = "display: inherit;", _(() => {
|
|
1567
|
+
n.value.componentInstance = m;
|
|
1568
|
+
}), e.expose(m.value);
|
|
1569
|
+
const C = w(t.customClass), c = T(() => t.enableAccordion), b = w(t.expandStatus), f = T(() => t.buttonPosition), u = w(!1), g = Q(t, e, b, o, s, u), r = z(t, e), l = T(() => {
|
|
1570
|
+
const S = {
|
|
1428
1571
|
"f-section": !0,
|
|
1429
1572
|
"f-section-accordion": c.value === "default",
|
|
1430
|
-
"f-state-collapse": (c.value === "default" || c.value === "custom") && !
|
|
1573
|
+
"f-state-collapse": (c.value === "default" || c.value === "custom") && !b.value,
|
|
1431
1574
|
"f-section-custom-accordion": c.value === "custom",
|
|
1432
1575
|
"f-section-fill": t.fill,
|
|
1433
|
-
"f-section-maximize":
|
|
1576
|
+
"f-section-maximize": u.value,
|
|
1434
1577
|
"f-utils-fill": !0,
|
|
1435
1578
|
"p-0": !0
|
|
1436
1579
|
};
|
|
1437
|
-
return
|
|
1438
|
-
}),
|
|
1580
|
+
return O(S, C.value);
|
|
1581
|
+
}), a = T(() => O({
|
|
1439
1582
|
"f-section-content": !0,
|
|
1440
1583
|
"drag-container": !0
|
|
1441
|
-
}, t.contentClass)),
|
|
1584
|
+
}, t.contentClass)), p = T(() => O({
|
|
1442
1585
|
"f-section-extend": !0
|
|
1443
|
-
},
|
|
1444
|
-
function
|
|
1445
|
-
return e.slots.extend &&
|
|
1446
|
-
class:
|
|
1586
|
+
}, p.value));
|
|
1587
|
+
function j() {
|
|
1588
|
+
return e.slots.extend && M("div", {
|
|
1589
|
+
class: p.value
|
|
1447
1590
|
}, [e.slots.extend()]);
|
|
1448
1591
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1451
|
-
class:
|
|
1592
|
+
function d() {
|
|
1593
|
+
return M("div", {
|
|
1594
|
+
class: a.value,
|
|
1452
1595
|
ref: n,
|
|
1453
|
-
"data-dragref": `${
|
|
1454
|
-
}, [
|
|
1596
|
+
"data-dragref": `${i.schema.id}-container`
|
|
1597
|
+
}, [f.value === "inContent" && r(), e.slots.default && e.slots.default()]);
|
|
1455
1598
|
}
|
|
1456
|
-
return () =>
|
|
1457
|
-
class:
|
|
1458
|
-
ref:
|
|
1459
|
-
}, [
|
|
1599
|
+
return () => M("div", {
|
|
1600
|
+
class: l.value,
|
|
1601
|
+
ref: o
|
|
1602
|
+
}, [g(), j(), d()]);
|
|
1460
1603
|
}
|
|
1461
1604
|
});
|
|
1462
|
-
|
|
1463
|
-
t.section =
|
|
1605
|
+
x.register = (t, e, n, o) => {
|
|
1606
|
+
t.section = x, e.section = Z;
|
|
1464
1607
|
};
|
|
1465
|
-
|
|
1466
|
-
t.section =
|
|
1608
|
+
x.registerDesigner = (t, e, n) => {
|
|
1609
|
+
t.section = Ve, e.section = Z;
|
|
1467
1610
|
};
|
|
1468
|
-
const
|
|
1611
|
+
const Ue = te(x);
|
|
1469
1612
|
export {
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1613
|
+
x as Section,
|
|
1614
|
+
Ue as default,
|
|
1615
|
+
Z as propsResolver,
|
|
1473
1616
|
L as sectionProps
|
|
1474
1617
|
};
|