@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,60 +1,60 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { cloneDeep as
|
|
1
|
+
import { ref as C, computed as D, defineComponent as $, provide as W, createVNode as B, watch as ee, inject as E, onMounted as q } from "vue";
|
|
2
|
+
import { isPlainObject as V, cloneDeep as te } from "lodash-es";
|
|
3
3
|
import "bignumber.js";
|
|
4
|
-
const
|
|
4
|
+
const Y = {}, X = {};
|
|
5
5
|
function N(t) {
|
|
6
|
-
const { properties: e, title: n } = t, o = Object.keys(e).reduce((
|
|
7
|
-
return o.id = `${n}-${Date.now()}
|
|
6
|
+
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((s, m) => ((!r || !o.find((w) => w == m)) && (s[m] = e[m].type === "object" && e[m].properties ? N(e[m]) : te(e[m].default)), s), {});
|
|
7
|
+
return (!r || !o.find((s) => s == "id")) && (l.id = `${n}-${Date.now()}`), l;
|
|
8
8
|
}
|
|
9
|
-
function T(t, e = {}) {
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
return
|
|
9
|
+
function T(t, e = {}, n) {
|
|
10
|
+
const o = Y[t];
|
|
11
|
+
if (o) {
|
|
12
|
+
let r = N(o);
|
|
13
|
+
const l = X[t];
|
|
14
|
+
return r = l ? l({ getSchemaByType: T }, r, e, n) : r, r;
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ne(t, e) {
|
|
19
19
|
const n = N(e);
|
|
20
|
-
return Object.keys(t).reduce((o, r) => (o[r] &&
|
|
20
|
+
return Object.keys(t).reduce((o, r) => (o[r] && V(o[r]) && V(t[r]) ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function oe(t, e) {
|
|
23
23
|
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
|
|
24
24
|
if (e.has(r)) {
|
|
25
|
-
const
|
|
26
|
-
if (typeof
|
|
27
|
-
o[
|
|
25
|
+
const l = e.get(r);
|
|
26
|
+
if (typeof l == "string")
|
|
27
|
+
o[l] = t[r];
|
|
28
28
|
else {
|
|
29
|
-
const
|
|
30
|
-
Object.assign(o,
|
|
29
|
+
const s = l(r, t[r], t);
|
|
30
|
+
Object.assign(o, s);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
33
33
|
o[r] = t[r];
|
|
34
34
|
return o;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const o =
|
|
39
|
-
return
|
|
37
|
+
function ae(t, e, n = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const o = ne(t, e);
|
|
39
|
+
return oe(o, n);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
function e(a, p, c,
|
|
41
|
+
function ie(t = {}) {
|
|
42
|
+
function e(a, p, c, g) {
|
|
43
43
|
if (typeof c == "number")
|
|
44
|
-
return
|
|
44
|
+
return g[a].length === c;
|
|
45
45
|
if (typeof c == "object") {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
46
|
+
const O = Object.keys(c)[0], S = c[O];
|
|
47
|
+
if (O === "not")
|
|
48
|
+
return Number(g[a].length) !== Number(S);
|
|
49
|
+
if (O === "moreThan")
|
|
50
|
+
return Number(g[a].length) >= Number(S);
|
|
51
|
+
if (O === "lessThan")
|
|
52
|
+
return Number(g[a].length) <= Number(S);
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function n(a, p, c,
|
|
57
|
-
return
|
|
56
|
+
function n(a, p, c, g) {
|
|
57
|
+
return g[a] && g[a].propertyValue && String(g[a].propertyValue.value) === String(c);
|
|
58
58
|
}
|
|
59
59
|
const o = /* @__PURE__ */ new Map([
|
|
60
60
|
["length", e],
|
|
@@ -63,53 +63,53 @@ function ae(t = {}) {
|
|
|
63
63
|
Object.keys(t).reduce((a, p) => (a.set(p, t[p]), a), o);
|
|
64
64
|
function r(a, p) {
|
|
65
65
|
const c = a;
|
|
66
|
-
return typeof p == "number" ? [{ target: c, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!p }] : typeof p == "object" ? Object.keys(p).map((
|
|
67
|
-
if (
|
|
68
|
-
return { target: c, operator: "length", param: null, value: p[
|
|
69
|
-
const
|
|
70
|
-
return { target: c, operator: "getProperty", param:
|
|
66
|
+
return typeof p == "number" ? [{ target: c, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!p }] : typeof p == "object" ? Object.keys(p).map((g) => {
|
|
67
|
+
if (g === "length")
|
|
68
|
+
return { target: c, operator: "length", param: null, value: p[g] };
|
|
69
|
+
const O = g, S = p[g];
|
|
70
|
+
return { target: c, operator: "getProperty", param: O, value: S };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return Object.keys(a).reduce((c,
|
|
75
|
-
const
|
|
76
|
-
return c.push(...
|
|
73
|
+
function l(a) {
|
|
74
|
+
return Object.keys(a).reduce((c, g) => {
|
|
75
|
+
const O = r(g, a[g]);
|
|
76
|
+
return c.push(...O), c;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function s(a, p) {
|
|
80
80
|
if (o.has(a.operator)) {
|
|
81
81
|
const c = o.get(a.operator);
|
|
82
82
|
return c && c(a.target, a.param, a.value, p) || !1;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function m(a, p) {
|
|
87
|
+
return l(a).reduce((O, S) => O && s(S, p), !0);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const c = Object.keys(a),
|
|
91
|
-
return
|
|
89
|
+
function w(a, p) {
|
|
90
|
+
const c = Object.keys(a), g = c.includes("allOf"), O = c.includes("anyOf"), S = g || O, u = (S ? a[S ? g ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => m(h, p));
|
|
91
|
+
return g ? !u.includes(!1) : u.includes(!0);
|
|
92
92
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: w };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
-
const
|
|
100
|
-
return Object.assign(
|
|
95
|
+
const re = {}, le = {};
|
|
96
|
+
ie();
|
|
97
|
+
function _(t, e, n = /* @__PURE__ */ new Map(), o = (s, m, w) => m, r = {}, l = (s) => s) {
|
|
98
|
+
return Y[e.title] = e, X[e.title] = o, re[e.title] = r, le[e.title] = l, (s = {}) => {
|
|
99
|
+
const m = ae(s, e, n), w = Object.keys(t).reduce((a, p) => (a[p] = t[p].default, a), {});
|
|
100
|
+
return Object.assign(w, m);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function se(t, e) {
|
|
104
104
|
return { customClass: e.class, customStyle: e.style };
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
["appearance",
|
|
106
|
+
const J = /* @__PURE__ */ new Map([
|
|
107
|
+
["appearance", se]
|
|
108
108
|
]);
|
|
109
|
-
function
|
|
109
|
+
function G(t, e, n) {
|
|
110
110
|
return e;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/layout.schema.json", fe = "layout", pe = "A Farris Container Component", ye = "object", me = {
|
|
113
113
|
id: {
|
|
114
114
|
description: "The unique identifier for layout component",
|
|
115
115
|
type: "string"
|
|
@@ -152,19 +152,19 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
|
|
|
152
152
|
type: "boolean",
|
|
153
153
|
default: !0
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, de = [
|
|
156
156
|
"id",
|
|
157
157
|
"type",
|
|
158
158
|
"contents"
|
|
159
|
-
],
|
|
160
|
-
$schema:
|
|
161
|
-
$id:
|
|
162
|
-
title:
|
|
163
|
-
description:
|
|
164
|
-
type:
|
|
165
|
-
properties:
|
|
166
|
-
required:
|
|
167
|
-
},
|
|
159
|
+
], he = {
|
|
160
|
+
$schema: ce,
|
|
161
|
+
$id: ue,
|
|
162
|
+
title: fe,
|
|
163
|
+
description: pe,
|
|
164
|
+
type: ye,
|
|
165
|
+
properties: me,
|
|
166
|
+
required: de
|
|
167
|
+
}, ve = "layout", ge = "A Farris Component", be = "object", ze = {
|
|
168
168
|
basic: {
|
|
169
169
|
description: "Basic Infomation",
|
|
170
170
|
title: "基本信息",
|
|
@@ -199,96 +199,96 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
},
|
|
203
|
-
title:
|
|
204
|
-
description:
|
|
205
|
-
type:
|
|
206
|
-
categories:
|
|
202
|
+
}, Ce = {
|
|
203
|
+
title: ve,
|
|
204
|
+
description: ge,
|
|
205
|
+
type: be,
|
|
206
|
+
categories: ze
|
|
207
207
|
}, L = {
|
|
208
208
|
customStyle: { type: String, defaut: "" },
|
|
209
209
|
customClass: { type: String, defaut: "" }
|
|
210
|
-
},
|
|
211
|
-
function
|
|
212
|
-
const e =
|
|
213
|
-
display:
|
|
210
|
+
}, Q = _(L, he, J, G, Ce);
|
|
211
|
+
function U(t) {
|
|
212
|
+
const e = C(-1), n = C(-1), o = C(0), r = C(0), l = C(!1), s = C(!1), m = D(() => ({
|
|
213
|
+
display: l.value ? "block" : "none",
|
|
214
214
|
left: `${o.value}px`,
|
|
215
215
|
cursor: "e-resize"
|
|
216
|
-
})),
|
|
217
|
-
display:
|
|
216
|
+
})), w = D(() => ({
|
|
217
|
+
display: s.value ? "block" : "none",
|
|
218
218
|
top: `${r.value}px`,
|
|
219
219
|
cursor: "n-resize"
|
|
220
220
|
})), a = D(() => ({
|
|
221
|
-
display:
|
|
221
|
+
display: s.value || l.value ? "block" : "none"
|
|
222
222
|
}));
|
|
223
|
-
function p(
|
|
223
|
+
function p(b, u, d, h) {
|
|
224
224
|
const H = t.value;
|
|
225
225
|
if (H) {
|
|
226
|
-
const { left:
|
|
227
|
-
let
|
|
228
|
-
|
|
226
|
+
const { left: v, right: i, width: y } = H.getBoundingClientRect();
|
|
227
|
+
let f = b.clientX - v;
|
|
228
|
+
h === "right" && (f = i - b.clientX), f > u && (f = u), f < d && (f = d), h === "right" && (f = y - f), o.value = f;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
function c(
|
|
231
|
+
function c(b, u, d, h) {
|
|
232
232
|
const H = t.value;
|
|
233
233
|
if (H) {
|
|
234
|
-
const { top:
|
|
235
|
-
let
|
|
236
|
-
|
|
234
|
+
const { top: v, bottom: i, height: y } = H.getBoundingClientRect();
|
|
235
|
+
let f = b.clientY - v;
|
|
236
|
+
h === "bottom" && (f = i - b.clientY), f > u && (f = u), f < d && (f = d), h === "bottom" && (f = y - f), r.value = f;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
const { width: u, height:
|
|
243
|
-
return { width: u, height:
|
|
239
|
+
function g() {
|
|
240
|
+
const b = t.value;
|
|
241
|
+
if (b) {
|
|
242
|
+
const { width: u, height: d } = b.getBoundingClientRect();
|
|
243
|
+
return { width: u, height: d };
|
|
244
244
|
}
|
|
245
245
|
return null;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
return
|
|
250
|
-
const
|
|
251
|
-
return u = Object.assign(u, { [
|
|
247
|
+
function O() {
|
|
248
|
+
const b = t.value;
|
|
249
|
+
return b ? Array.from(b.querySelectorAll("[data-position]")).reduce((u, d) => {
|
|
250
|
+
const h = d.getAttribute("data-position");
|
|
251
|
+
return u = Object.assign(u, { [h]: d }), u;
|
|
252
252
|
}, {}) : null;
|
|
253
253
|
}
|
|
254
|
-
function S(
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const H =
|
|
258
|
-
if (
|
|
259
|
-
return H ?
|
|
260
|
-
if (
|
|
261
|
-
return
|
|
254
|
+
function S(b, u) {
|
|
255
|
+
const d = g(), h = O();
|
|
256
|
+
if (d && h) {
|
|
257
|
+
const H = h == null ? void 0 : h.right, v = h == null ? void 0 : h.left;
|
|
258
|
+
if (b === "left" && v)
|
|
259
|
+
return H ? d.width - H.clientWidth - u : d.width - u;
|
|
260
|
+
if (b === "right" && H)
|
|
261
|
+
return v ? d.width - v.clientWidth - u : d.width - u;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
const
|
|
266
|
-
if (
|
|
267
|
-
const H =
|
|
268
|
-
if (
|
|
269
|
-
return H ?
|
|
270
|
-
if (
|
|
271
|
-
return
|
|
264
|
+
function P(b, u) {
|
|
265
|
+
const d = g(), h = O();
|
|
266
|
+
if (d && h) {
|
|
267
|
+
const H = h == null ? void 0 : h.bottom, v = h == null ? void 0 : h.top;
|
|
268
|
+
if (b === "top" && v)
|
|
269
|
+
return H ? d.height - H.clientHeight - u : d.height - u;
|
|
270
|
+
if (b === "bottom" && H)
|
|
271
|
+
return v ? d.height - v.clientHeight - u : d.height - u;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
return {
|
|
275
|
-
horizontalResizeHandleStyle:
|
|
276
|
-
verticalResizeHandleStyle:
|
|
275
|
+
horizontalResizeHandleStyle: m,
|
|
276
|
+
verticalResizeHandleStyle: w,
|
|
277
277
|
resizeOverlayStyle: a,
|
|
278
|
-
showHorizontalResizeHandle:
|
|
279
|
-
showVerticalResizeHandle:
|
|
278
|
+
showHorizontalResizeHandle: l,
|
|
279
|
+
showVerticalResizeHandle: s,
|
|
280
280
|
horizontalResizeBarPosition: e,
|
|
281
281
|
verticalResizeBarPosition: n,
|
|
282
282
|
verticalResizeHandleOffset: r,
|
|
283
283
|
horizontalResizeHandleOffset: o,
|
|
284
284
|
draggingHorizontalResizeHandle: p,
|
|
285
285
|
draggingVerticalResizeHandle: c,
|
|
286
|
-
getPanelMaxHeight:
|
|
286
|
+
getPanelMaxHeight: P,
|
|
287
287
|
getPanelMaxWidth: S
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
290
|
+
const we = ["moz", "ms", "webkit"];
|
|
291
|
+
function Pe() {
|
|
292
292
|
let t = 0;
|
|
293
293
|
return (e) => {
|
|
294
294
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
|
|
@@ -297,59 +297,59 @@ function we() {
|
|
|
297
297
|
return t = n + o, r;
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Oe() {
|
|
301
301
|
if (typeof window > "u")
|
|
302
302
|
return () => 0;
|
|
303
303
|
if (window.requestAnimationFrame)
|
|
304
304
|
return window.requestAnimationFrame.bind(window);
|
|
305
|
-
const t =
|
|
306
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
305
|
+
const t = we.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
306
|
+
return t ? window[`${t}RequestAnimationFrame`] : Pe();
|
|
307
307
|
}
|
|
308
|
-
|
|
309
|
-
function
|
|
308
|
+
Oe();
|
|
309
|
+
function Se(t, e) {
|
|
310
310
|
return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, r) => (r && (o[r] = !0), o), t), t;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function He(t, e) {
|
|
313
313
|
return ((e == null ? void 0 : e.split(";")) || []).reduce((o, r) => {
|
|
314
314
|
if (r) {
|
|
315
|
-
const
|
|
316
|
-
o[
|
|
315
|
+
const l = r.split(":");
|
|
316
|
+
o[l[0]] = l[1];
|
|
317
317
|
}
|
|
318
318
|
return o;
|
|
319
319
|
}, t), t;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
321
|
+
const A = /* @__PURE__ */ $({
|
|
322
322
|
name: "FLayout",
|
|
323
323
|
props: L,
|
|
324
324
|
emits: [],
|
|
325
325
|
setup(t, e) {
|
|
326
|
-
const n =
|
|
326
|
+
const n = C(), o = U(n), {
|
|
327
327
|
horizontalResizeHandleStyle: r,
|
|
328
|
-
verticalResizeHandleStyle:
|
|
329
|
-
resizeOverlayStyle:
|
|
328
|
+
verticalResizeHandleStyle: l,
|
|
329
|
+
resizeOverlayStyle: s
|
|
330
330
|
} = o;
|
|
331
|
-
|
|
331
|
+
W("layout", {
|
|
332
332
|
useResizeHandleComposition: o
|
|
333
333
|
});
|
|
334
|
-
const
|
|
334
|
+
const m = D(() => Se({
|
|
335
335
|
"f-layout": !0
|
|
336
|
-
}, t == null ? void 0 : t.customClass)),
|
|
337
|
-
return () =>
|
|
338
|
-
class:
|
|
339
|
-
style:
|
|
336
|
+
}, t == null ? void 0 : t.customClass)), w = D(() => He({}, t == null ? void 0 : t.customStyle));
|
|
337
|
+
return () => B("div", {
|
|
338
|
+
class: m.value,
|
|
339
|
+
style: w.value,
|
|
340
340
|
ref: n
|
|
341
|
-
}, [e.slots.default && e.slots.default(),
|
|
341
|
+
}, [e.slots.default && e.slots.default(), B("div", {
|
|
342
342
|
class: "f-layout-resize-overlay",
|
|
343
|
-
style:
|
|
344
|
-
}, null),
|
|
343
|
+
style: s.value
|
|
344
|
+
}, null), B("div", {
|
|
345
345
|
class: "f-layout-horizontal-resize-proxy",
|
|
346
346
|
style: r.value
|
|
347
|
-
}, null),
|
|
347
|
+
}, null), B("div", {
|
|
348
348
|
class: "f-layout-vertical-resize-proxy",
|
|
349
|
-
style:
|
|
349
|
+
style: l.value
|
|
350
350
|
}, null)]);
|
|
351
351
|
}
|
|
352
|
-
}),
|
|
352
|
+
}), Me = "https://json-schema.org/draft/2020-12/schema", je = "https://farris-design.gitee.io/layout-pane.schema.json", Be = "layout-pane", De = "A Farris Container Component", Ae = "object", Re = {
|
|
353
353
|
id: {
|
|
354
354
|
description: "The unique identifier for a layout pane",
|
|
355
355
|
type: "string"
|
|
@@ -412,14 +412,14 @@ const R = /* @__PURE__ */ $({
|
|
|
412
412
|
type: "number",
|
|
413
413
|
default: !0
|
|
414
414
|
}
|
|
415
|
-
},
|
|
416
|
-
$schema:
|
|
417
|
-
$id:
|
|
418
|
-
title:
|
|
419
|
-
description:
|
|
420
|
-
type:
|
|
415
|
+
}, Ee = {
|
|
416
|
+
$schema: Me,
|
|
417
|
+
$id: je,
|
|
418
|
+
title: Be,
|
|
419
|
+
description: De,
|
|
420
|
+
type: Ae,
|
|
421
421
|
properties: Re
|
|
422
|
-
},
|
|
422
|
+
}, $e = "layout-pane", Te = "A Farris Container Component", ke = "object", Ne = {
|
|
423
423
|
basic: {
|
|
424
424
|
description: "Basic Infomation",
|
|
425
425
|
title: "基本信息",
|
|
@@ -514,11 +514,11 @@ const R = /* @__PURE__ */ $({
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
},
|
|
518
|
-
title:
|
|
519
|
-
description:
|
|
520
|
-
type:
|
|
521
|
-
categories:
|
|
517
|
+
}, Le = {
|
|
518
|
+
title: $e,
|
|
519
|
+
description: Te,
|
|
520
|
+
type: ke,
|
|
521
|
+
categories: Ne
|
|
522
522
|
}, F = {
|
|
523
523
|
customClass: { type: String, defaut: "" },
|
|
524
524
|
customStyle: { type: String, defaut: "" },
|
|
@@ -538,119 +538,119 @@ const R = /* @__PURE__ */ $({
|
|
|
538
538
|
minWidth: { type: Number, default: 100 },
|
|
539
539
|
/** 面板最小高度 */
|
|
540
540
|
minHeight: { type: Number, default: 100 }
|
|
541
|
-
},
|
|
542
|
-
function
|
|
541
|
+
}, Z = _(F, Ee, J, G, Le);
|
|
542
|
+
function x(t, e, n, o, r) {
|
|
543
543
|
const {
|
|
544
|
-
horizontalResizeBarPosition:
|
|
545
|
-
horizontalResizeHandleOffset:
|
|
546
|
-
showHorizontalResizeHandle:
|
|
547
|
-
showVerticalResizeHandle:
|
|
544
|
+
horizontalResizeBarPosition: l,
|
|
545
|
+
horizontalResizeHandleOffset: s,
|
|
546
|
+
showHorizontalResizeHandle: m,
|
|
547
|
+
showVerticalResizeHandle: w,
|
|
548
548
|
verticalResizeBarPosition: a,
|
|
549
549
|
verticalResizeHandleOffset: p,
|
|
550
550
|
draggingHorizontalResizeHandle: c,
|
|
551
|
-
draggingVerticalResizeHandle:
|
|
552
|
-
getPanelMaxHeight:
|
|
551
|
+
draggingVerticalResizeHandle: g,
|
|
552
|
+
getPanelMaxHeight: O,
|
|
553
553
|
getPanelMaxWidth: S
|
|
554
554
|
} = r;
|
|
555
|
-
let
|
|
556
|
-
function
|
|
557
|
-
if ((
|
|
558
|
-
const { left: y } = u.getBoundingClientRect(), { width:
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
const M = S(
|
|
562
|
-
M != null && (
|
|
555
|
+
let P = "", b, u, d;
|
|
556
|
+
function h(i) {
|
|
557
|
+
if ((P === "left" || P === "right") && u) {
|
|
558
|
+
const { left: y } = u.getBoundingClientRect(), { width: f } = b.getBoundingClientRect(), j = i.clientX - y;
|
|
559
|
+
let z = P === "left" ? (f || 0) + (j - l.value) : (f || 0) - (j - l.value);
|
|
560
|
+
z = n.value > 0 ? Math.max(n.value, z) : z;
|
|
561
|
+
const M = S(P, n.value);
|
|
562
|
+
M != null && (z = M > z ? z : M), t.value = z;
|
|
563
563
|
}
|
|
564
|
-
if ((
|
|
565
|
-
const { top: y } = u.getBoundingClientRect(), { height:
|
|
566
|
-
let
|
|
567
|
-
|
|
568
|
-
const M = P
|
|
569
|
-
M != null && (
|
|
564
|
+
if ((P === "top" || P === "bottom") && u) {
|
|
565
|
+
const { top: y } = u.getBoundingClientRect(), { height: f } = b.getBoundingClientRect(), j = i.clientY - y;
|
|
566
|
+
let z = P === "top" ? (f || 0) + (j - a.value) : (f || 0) - (j - a.value);
|
|
567
|
+
z = o.value > 0 ? Math.max(o.value, z) : z;
|
|
568
|
+
const M = O(P, o.value);
|
|
569
|
+
M != null && (z = M > z ? z : M), e.value = z;
|
|
570
570
|
}
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
function H(
|
|
574
|
-
if (
|
|
575
|
-
const { left:
|
|
576
|
-
|
|
577
|
-
const
|
|
578
|
-
|
|
571
|
+
s.value = 0, p.value = 0, l.value = -1, a.value = -1, m.value = !1, w.value = !1, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", h), document.body.style.userSelect = "", P = "", b = null, u = null;
|
|
572
|
+
}
|
|
573
|
+
function H(i, y, f) {
|
|
574
|
+
if (P = y, b = f, m.value = !0, u = i.composedPath().find((z) => (z.className || "").split(" ")[0] === "f-layout"), u) {
|
|
575
|
+
const { left: z } = u.getBoundingClientRect(), M = i.clientX - z;
|
|
576
|
+
s.value = M, l.value = M;
|
|
577
|
+
const R = S(P, n.value) || 0;
|
|
578
|
+
d = (I) => c(I, R, n.value, P), document.addEventListener("mousemove", d), document.addEventListener("mouseup", h), document.body.style.userSelect = "none";
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
if (
|
|
583
|
-
const { top:
|
|
584
|
-
p.value =
|
|
585
|
-
const M = P
|
|
586
|
-
|
|
581
|
+
function v(i, y, f) {
|
|
582
|
+
if (P = y, b = f, w.value = !0, u = i.composedPath().find((z) => (z.className || "").split(" ")[0] === "f-layout"), u) {
|
|
583
|
+
const { top: z } = u.getBoundingClientRect();
|
|
584
|
+
p.value = i.clientY - z, a.value = i.clientY - z;
|
|
585
|
+
const M = O(P, o.value) || 0;
|
|
586
|
+
d = (R) => g(R, M, o.value, P), document.addEventListener("mousemove", d), document.addEventListener("mouseup", h), document.body.style.userSelect = "none";
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
return { onClickHorizontalResizeBar: H, onClickVerticalResizeBar:
|
|
589
|
+
return { onClickHorizontalResizeBar: H, onClickVerticalResizeBar: v };
|
|
590
590
|
}
|
|
591
591
|
const k = /* @__PURE__ */ $({
|
|
592
592
|
name: "FLayoutPane",
|
|
593
593
|
props: F,
|
|
594
594
|
emits: [],
|
|
595
595
|
setup(t, e) {
|
|
596
|
-
const n =
|
|
597
|
-
|
|
598
|
-
p.value =
|
|
596
|
+
const n = C(t.minHeight <= 0 ? 100 : t.minHeight), o = C(t.minWidth <= 0 ? 100 : t.minWidth), r = C(t.width <= 0 ? 100 : t.width), l = C(t.height <= 100 ? 100 : t.height), s = C(Math.max(n.value, l.value)), m = C(Math.max(o.value, r.value)), w = C(), a = C(t.position), p = C(t.resizable);
|
|
597
|
+
ee(() => t.resizable, (v) => {
|
|
598
|
+
p.value = v;
|
|
599
599
|
});
|
|
600
600
|
const c = E("layout"), {
|
|
601
|
-
useResizeHandleComposition:
|
|
602
|
-
} = c,
|
|
601
|
+
useResizeHandleComposition: g
|
|
602
|
+
} = c, O = x(m, s, o, n, g), {
|
|
603
603
|
onClickHorizontalResizeBar: S,
|
|
604
|
-
onClickVerticalResizeBar:
|
|
605
|
-
} =
|
|
604
|
+
onClickVerticalResizeBar: P
|
|
605
|
+
} = O, b = D(() => ({
|
|
606
606
|
"f-layout-resize-bar": !0,
|
|
607
607
|
"f-layout-resize-bar-e": a.value === "left",
|
|
608
608
|
"f-layout-resize-bar-n": a.value === "bottom",
|
|
609
609
|
"f-layout-resize-bar-s": a.value === "top",
|
|
610
610
|
"f-layout-resize-bar-w": a.value === "right"
|
|
611
611
|
})), u = D(() => a.value !== "center" && p.value);
|
|
612
|
-
function
|
|
613
|
-
(
|
|
612
|
+
function d(v, i) {
|
|
613
|
+
(i === "left" || i === "right") && S(v, i, w.value), (i === "top" || i === "bottom") && P(v, i, w.value);
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
const
|
|
615
|
+
const h = D(() => {
|
|
616
|
+
const v = {
|
|
617
617
|
"f-layout-pane": !0,
|
|
618
618
|
"f-page-content-nav": a.value === "left" || a.value === "right",
|
|
619
619
|
"f-page-content-main": a.value === "center"
|
|
620
620
|
};
|
|
621
|
-
return t.customClass && String(t.customClass).split(" ").reduce((
|
|
621
|
+
return t.customClass && String(t.customClass).split(" ").reduce((i, y) => (i[y] = !0, i), v), v;
|
|
622
622
|
}), H = D(() => {
|
|
623
|
-
const
|
|
624
|
-
return (
|
|
623
|
+
const v = {};
|
|
624
|
+
return (m.value && a.value === "left" || a.value === "right") && (v.width = `${m.value}px`), (s.value && a.value === "bottom" || a.value === "top") && (v.height = `${s.value}px`), t.visible || (v.display = "none"), v;
|
|
625
625
|
});
|
|
626
|
-
return () =>
|
|
627
|
-
ref:
|
|
628
|
-
class:
|
|
626
|
+
return () => B("div", {
|
|
627
|
+
ref: w,
|
|
628
|
+
class: h.value,
|
|
629
629
|
style: H.value,
|
|
630
630
|
"data-position": a.value
|
|
631
|
-
}, [e.slots.default && e.slots.default(), u.value &&
|
|
632
|
-
class:
|
|
633
|
-
onMousedown: (
|
|
631
|
+
}, [e.slots.default && e.slots.default(), u.value && B("span", {
|
|
632
|
+
class: b.value,
|
|
633
|
+
onMousedown: (v) => d(v, a.value)
|
|
634
634
|
}, null)]);
|
|
635
635
|
}
|
|
636
636
|
});
|
|
637
|
-
function
|
|
637
|
+
function Fe(t, e) {
|
|
638
638
|
function n() {
|
|
639
639
|
return !1;
|
|
640
640
|
}
|
|
641
641
|
return { canAccepts: n };
|
|
642
642
|
}
|
|
643
643
|
function K(t, e, n) {
|
|
644
|
-
var
|
|
644
|
+
var v;
|
|
645
645
|
function o() {
|
|
646
646
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
647
647
|
}
|
|
648
648
|
o();
|
|
649
|
-
const r = n && n.getStyles && n.getStyles() || "",
|
|
650
|
-
function
|
|
649
|
+
const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", s = C();
|
|
650
|
+
function m() {
|
|
651
651
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function w() {
|
|
654
654
|
return !1;
|
|
655
655
|
}
|
|
656
656
|
function a() {
|
|
@@ -659,120 +659,120 @@ function K(t, e, n) {
|
|
|
659
659
|
function p() {
|
|
660
660
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
661
661
|
}
|
|
662
|
-
function c(
|
|
663
|
-
if (!
|
|
662
|
+
function c(i) {
|
|
663
|
+
if (!i || !i.value)
|
|
664
664
|
return null;
|
|
665
|
-
if (
|
|
666
|
-
return
|
|
667
|
-
const y =
|
|
668
|
-
return
|
|
665
|
+
if (i.value.schema && i.value.schema.type === "component")
|
|
666
|
+
return i.value;
|
|
667
|
+
const y = C(i == null ? void 0 : i.value.parent), f = c(y);
|
|
668
|
+
return f || null;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
const { componentInstance: y, designerItemElementRef:
|
|
672
|
-
return !y || !y.value ? null : y.value.canMove ?
|
|
670
|
+
function g(i = e) {
|
|
671
|
+
const { componentInstance: y, designerItemElementRef: f } = i;
|
|
672
|
+
return !y || !y.value ? null : y.value.canMove ? f : g(i.parent);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
return !!n && n.canAccepts(
|
|
674
|
+
function O(i) {
|
|
675
|
+
return !!n && n.canAccepts(i);
|
|
676
676
|
}
|
|
677
677
|
function S() {
|
|
678
678
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function P() {
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function b(i, y) {
|
|
683
683
|
y && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(y);
|
|
684
684
|
}
|
|
685
|
-
function u(
|
|
686
|
-
const { componentType:
|
|
687
|
-
let
|
|
688
|
-
n && n.onResolveNewComponentSchema && (
|
|
689
|
-
const
|
|
690
|
-
return
|
|
685
|
+
function u(i, y) {
|
|
686
|
+
const { componentType: f } = i;
|
|
687
|
+
let j = T(f, i, y);
|
|
688
|
+
n && n.onResolveNewComponentSchema && (j = n.onResolveNewComponentSchema(i, j));
|
|
689
|
+
const z = f.toLowerCase().replace("-", "_");
|
|
690
|
+
return j && !j.id && j.type === f && (j.id = `${z}_${Math.random().toString().slice(2, 6)}`), j;
|
|
691
691
|
}
|
|
692
|
-
function
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
let M = T(
|
|
696
|
-
n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(
|
|
697
|
-
const
|
|
698
|
-
return M && !M.id && M.type ===
|
|
692
|
+
function d(i, y) {
|
|
693
|
+
const f = String(i.getAttribute("data-controltype")), j = i.getAttribute("data-feature"), z = j ? JSON.parse(j) : {};
|
|
694
|
+
z.parentComponentInstance = s.value;
|
|
695
|
+
let M = T(f, z);
|
|
696
|
+
n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(i, y, M));
|
|
697
|
+
const R = f.toLowerCase().replace("-", "_");
|
|
698
|
+
return M && !M.id && M.type === f && (M.id = `${R}_${Math.random().toString().slice(2, 6)}`), M;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function h(i) {
|
|
701
701
|
}
|
|
702
|
-
function H(...
|
|
702
|
+
function H(...i) {
|
|
703
703
|
if (n && n.getPropsConfig)
|
|
704
|
-
return n.getPropsConfig(...
|
|
704
|
+
return n.getPropsConfig(...i);
|
|
705
705
|
}
|
|
706
|
-
return
|
|
707
|
-
canMove:
|
|
708
|
-
canSelectParent:
|
|
706
|
+
return s.value = {
|
|
707
|
+
canMove: m(),
|
|
708
|
+
canSelectParent: w(),
|
|
709
709
|
canDelete: a(),
|
|
710
710
|
canNested: !p(),
|
|
711
711
|
contents: e == null ? void 0 : e.schema.contents,
|
|
712
712
|
elementRef: t,
|
|
713
|
-
parent: (
|
|
713
|
+
parent: (v = e == null ? void 0 : e.parent) == null ? void 0 : v.componentInstance,
|
|
714
714
|
schema: e == null ? void 0 : e.schema,
|
|
715
715
|
styles: r,
|
|
716
|
-
designerClass:
|
|
717
|
-
canAccepts:
|
|
716
|
+
designerClass: l,
|
|
717
|
+
canAccepts: O,
|
|
718
718
|
getBelongedComponentInstance: c,
|
|
719
|
-
getDraggableDesignItemElement:
|
|
719
|
+
getDraggableDesignItemElement: g,
|
|
720
720
|
getDraggingDisplayText: S,
|
|
721
721
|
getPropConfig: H,
|
|
722
|
-
getDragScopeElement:
|
|
723
|
-
onAcceptMovedChildElement:
|
|
724
|
-
onAcceptNewChildElement:
|
|
725
|
-
onChildElementMovedOut:
|
|
722
|
+
getDragScopeElement: P,
|
|
723
|
+
onAcceptMovedChildElement: b,
|
|
724
|
+
onAcceptNewChildElement: d,
|
|
725
|
+
onChildElementMovedOut: h,
|
|
726
726
|
addNewChildComponentSchema: u,
|
|
727
727
|
updateDragAndDropRules: o,
|
|
728
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
729
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
730
|
-
},
|
|
728
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
|
|
729
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
|
|
730
|
+
}, s;
|
|
731
731
|
}
|
|
732
|
-
const
|
|
732
|
+
const Ve = /* @__PURE__ */ $({
|
|
733
733
|
name: "FLayoutDesign",
|
|
734
734
|
props: L,
|
|
735
735
|
emits: [],
|
|
736
736
|
setup(t, e) {
|
|
737
737
|
var p;
|
|
738
|
-
const n =
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
horizontalResizeHandleStyle:
|
|
742
|
-
verticalResizeHandleStyle:
|
|
738
|
+
const n = C(), o = E("design-item-context"), r = Fe(o.schema, (p = o.parent) == null ? void 0 : p.schema), l = K(n, o, r);
|
|
739
|
+
l.value.canNested = !1;
|
|
740
|
+
const s = U(n), {
|
|
741
|
+
horizontalResizeHandleStyle: m,
|
|
742
|
+
verticalResizeHandleStyle: w,
|
|
743
743
|
resizeOverlayStyle: a
|
|
744
|
-
} =
|
|
745
|
-
return
|
|
746
|
-
useResizeHandleComposition:
|
|
747
|
-
}),
|
|
748
|
-
n.value.componentInstance =
|
|
749
|
-
}), e.expose(
|
|
744
|
+
} = s;
|
|
745
|
+
return W("layout", {
|
|
746
|
+
useResizeHandleComposition: s
|
|
747
|
+
}), q(() => {
|
|
748
|
+
n.value.componentInstance = l;
|
|
749
|
+
}), e.expose(l.value), () => B("div", {
|
|
750
750
|
class: "f-layout f-page-content",
|
|
751
751
|
ref: n
|
|
752
|
-
}, [e.slots.default && e.slots.default(),
|
|
752
|
+
}, [e.slots.default && e.slots.default(), B("div", {
|
|
753
753
|
class: "f-layout-resize-overlay",
|
|
754
754
|
style: a.value
|
|
755
|
-
}, null),
|
|
755
|
+
}, null), B("div", {
|
|
756
756
|
class: "f-layout-horizontal-resize-proxy",
|
|
757
|
-
style:
|
|
758
|
-
}, null),
|
|
757
|
+
style: m.value
|
|
758
|
+
}, null), B("div", {
|
|
759
759
|
class: "f-layout-vertical-resize-proxy",
|
|
760
|
-
style:
|
|
760
|
+
style: w.value
|
|
761
761
|
}, null)]);
|
|
762
762
|
}
|
|
763
763
|
});
|
|
764
|
-
function
|
|
764
|
+
function We() {
|
|
765
765
|
function t(e) {
|
|
766
|
-
var r,
|
|
766
|
+
var r, l;
|
|
767
767
|
if (!e)
|
|
768
768
|
return !1;
|
|
769
769
|
const n = ((r = e.targetContainer) == null ? void 0 : r.componentInstance) && e.targetContainer.componentInstance.value;
|
|
770
770
|
if (!n)
|
|
771
771
|
return !1;
|
|
772
|
-
const o = (
|
|
772
|
+
const o = (l = n.schema.appearance) == null ? void 0 : l.class;
|
|
773
773
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
774
|
-
const
|
|
775
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
774
|
+
const s = n.schema.type, m = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
|
|
775
|
+
if (n.schema.type !== "response-layout-item" && !m)
|
|
776
776
|
return !1;
|
|
777
777
|
}
|
|
778
778
|
return e.controlType !== "field-set";
|
|
@@ -781,34 +781,34 @@ function Ve() {
|
|
|
781
781
|
basalDragulaRuleForContainer: t
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
function n(
|
|
786
|
-
return !!
|
|
784
|
+
function qe(t, e) {
|
|
785
|
+
function n(l) {
|
|
786
|
+
return !!We().basalDragulaRuleForContainer(l);
|
|
787
787
|
}
|
|
788
|
-
function o(
|
|
789
|
-
return
|
|
788
|
+
function o(l, s, m) {
|
|
789
|
+
return m;
|
|
790
790
|
}
|
|
791
791
|
function r() {
|
|
792
|
-
const
|
|
793
|
-
return (t.position === "left" || t.position === "right") &&
|
|
792
|
+
const l = ["f-layout-pane"];
|
|
793
|
+
return (t.position === "left" || t.position === "right") && l.push("f-page-content-nav"), t.position === "center" && l.push("f-page-content-main"), l.join(" ");
|
|
794
794
|
}
|
|
795
795
|
return { canAccepts: n, getDesignerClass: r, onAcceptNewChildElement: o };
|
|
796
796
|
}
|
|
797
|
-
const
|
|
797
|
+
const Ye = /* @__PURE__ */ $({
|
|
798
798
|
name: "FLayoutPaneDesign",
|
|
799
799
|
props: F,
|
|
800
800
|
emits: [],
|
|
801
801
|
setup(t, e) {
|
|
802
|
-
var
|
|
803
|
-
const n =
|
|
804
|
-
|
|
805
|
-
o.value.componentInstance =
|
|
806
|
-
}), e.expose(
|
|
807
|
-
const
|
|
808
|
-
useResizeHandleComposition:
|
|
809
|
-
} =
|
|
810
|
-
onClickHorizontalResizeBar:
|
|
811
|
-
onClickVerticalResizeBar:
|
|
802
|
+
var v;
|
|
803
|
+
const n = C(), o = C(), r = E("design-item-context"), l = qe(r.schema, (v = r.parent) == null ? void 0 : v.schema), s = K(o, r, l);
|
|
804
|
+
s.value.canNested = !1, s.value.canMove = !1, s.value.canDelete = !1, q(() => {
|
|
805
|
+
o.value.componentInstance = s;
|
|
806
|
+
}), e.expose(s.value);
|
|
807
|
+
const m = C(Math.max(t.minHeight, t.height)), w = C(Math.max(t.minWidth, t.width)), a = C(t.minHeight), p = C(t.minWidth), c = C(t.position), g = E("layout"), {
|
|
808
|
+
useResizeHandleComposition: O
|
|
809
|
+
} = g, S = x(w, m, p, a, O), {
|
|
810
|
+
onClickHorizontalResizeBar: P,
|
|
811
|
+
onClickVerticalResizeBar: b
|
|
812
812
|
} = S, u = D(() => ({
|
|
813
813
|
"f-layout-resize-bar": !0,
|
|
814
814
|
"f-layout-resize-bar-e": c.value === "left",
|
|
@@ -816,49 +816,49 @@ const qe = /* @__PURE__ */ $({
|
|
|
816
816
|
"f-layout-resize-bar-s": c.value === "top",
|
|
817
817
|
"f-layout-resize-bar-w": c.value === "right"
|
|
818
818
|
}));
|
|
819
|
-
function
|
|
820
|
-
(y === "left" || y === "right") &&
|
|
819
|
+
function d(i, y) {
|
|
820
|
+
(y === "left" || y === "right") && P(i, y, n.value), (y === "top" || y === "bottom") && b(i, y, n.value);
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
const
|
|
822
|
+
const h = D(() => {
|
|
823
|
+
const i = {
|
|
824
824
|
"f-layout-pane": !0,
|
|
825
825
|
"f-page-content-nav": c.value === "left" || c.value === "right",
|
|
826
826
|
"f-page-content-main": c.value === "center"
|
|
827
827
|
};
|
|
828
|
-
return t.customClass && String(t.customClass).split(" ").reduce((y,
|
|
828
|
+
return t.customClass && String(t.customClass).split(" ").reduce((y, f) => (y[f] = !0, y), i), i;
|
|
829
829
|
}), H = D(() => {
|
|
830
|
-
const
|
|
830
|
+
const i = {
|
|
831
831
|
flex: "1"
|
|
832
832
|
};
|
|
833
|
-
return (
|
|
833
|
+
return (w.value && c.value === "left" || c.value === "right") && (i.width = `${w.value}px`), (m.value && c.value === "bottom" || c.value === "top") && (i.height = `${m.value}px`), i;
|
|
834
834
|
});
|
|
835
|
-
return () =>
|
|
835
|
+
return () => B("div", {
|
|
836
836
|
ref: n,
|
|
837
|
-
class:
|
|
837
|
+
class: h.value,
|
|
838
838
|
style: H.value
|
|
839
|
-
}, [
|
|
839
|
+
}, [B("div", {
|
|
840
840
|
ref: o,
|
|
841
841
|
class: "drag-container",
|
|
842
842
|
"data-dragref": `${r.schema.id}-container`
|
|
843
|
-
}, [e.slots.default && e.slots.default()]),
|
|
843
|
+
}, [e.slots.default && e.slots.default()]), B("span", {
|
|
844
844
|
class: u.value,
|
|
845
|
-
onMousedown: (
|
|
845
|
+
onMousedown: (i) => d(i, c.value)
|
|
846
846
|
}, null)]);
|
|
847
847
|
}
|
|
848
848
|
});
|
|
849
|
-
|
|
850
|
-
t.component(
|
|
849
|
+
A.install = (t) => {
|
|
850
|
+
t.component(A.name, A), t.component(k.name, k);
|
|
851
851
|
};
|
|
852
|
-
|
|
853
|
-
t.layout =
|
|
852
|
+
A.register = (t, e, n, o) => {
|
|
853
|
+
t.layout = A, e.layout = Q, t["layout-pane"] = k, e["layout-pane"] = Z;
|
|
854
854
|
};
|
|
855
|
-
|
|
856
|
-
t.layout =
|
|
855
|
+
A.registerDesigner = (t, e, n) => {
|
|
856
|
+
t.layout = Ve, e.layout = Q, t["layout-pane"] = Ye, e["layout-pane"] = Z;
|
|
857
857
|
};
|
|
858
858
|
export {
|
|
859
|
-
|
|
859
|
+
A as FLayout,
|
|
860
860
|
k as FLayoutPane,
|
|
861
|
-
|
|
861
|
+
A as default,
|
|
862
862
|
L as layoutProps,
|
|
863
|
-
|
|
863
|
+
Q as layoutPropsResolver
|
|
864
864
|
};
|