@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,104 +1,104 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { resolveAppearance as
|
|
4
|
-
import { useDesignerComponent as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const { properties: e, title: i } = t,
|
|
8
|
-
return
|
|
9
|
-
}
|
|
10
|
-
function q(t, e) {
|
|
11
|
-
const i = P(e);
|
|
12
|
-
return Object.keys(t).reduce((o, n) => (o[n] && typeof o[n] == "object" ? Object.assign(o[n], t[n]) : o[n] = t[n], o), i), i;
|
|
1
|
+
import { defineComponent as C, computed as h, provide as R, createVNode as d, inject as O, ref as y, onMounted as P } from "vue";
|
|
2
|
+
import { isPlainObject as I, cloneDeep as M } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as S, createPropsResolver as T } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import { useDesignerComponent as B } from "../designer-canvas/index.esm.js";
|
|
5
|
+
const q = {}, V = {};
|
|
6
|
+
function F(t) {
|
|
7
|
+
const { properties: e, title: i, ignore: n } = t, s = n && Array.isArray(n), p = Object.keys(e).reduce((a, u) => ((!s || !n.find((m) => m == u)) && (a[u] = e[u].type === "object" && e[u].properties ? F(e[u]) : M(e[u].default)), a), {});
|
|
8
|
+
return (!s || !n.find((a) => a == "id")) && (p.id = `${i}-${Date.now()}`), p;
|
|
13
9
|
}
|
|
14
10
|
function x(t, e) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const i = F(e);
|
|
12
|
+
return Object.keys(t).reduce((n, s) => (n[s] && I(n[s]) && I(t[s]) ? Object.assign(n[s], t[s]) : n[s] = t[s], n), i), i;
|
|
13
|
+
}
|
|
14
|
+
function z(t, e) {
|
|
15
|
+
return Object.keys(t).filter((n) => t[n] != null).reduce((n, s) => {
|
|
16
|
+
if (e.has(s)) {
|
|
17
|
+
const p = e.get(s);
|
|
18
|
+
if (typeof p == "string")
|
|
19
|
+
n[p] = t[s];
|
|
20
20
|
else {
|
|
21
|
-
const
|
|
22
|
-
Object.assign(
|
|
21
|
+
const a = p(s, t[s], t);
|
|
22
|
+
Object.assign(n, a);
|
|
23
23
|
}
|
|
24
24
|
} else
|
|
25
|
-
|
|
26
|
-
return
|
|
25
|
+
n[s] = t[s];
|
|
26
|
+
return n;
|
|
27
27
|
}, {});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return
|
|
29
|
+
function H(t, e, i = /* @__PURE__ */ new Map()) {
|
|
30
|
+
const n = x(t, e);
|
|
31
|
+
return z(n, i);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
function e(
|
|
33
|
+
function L(t = {}) {
|
|
34
|
+
function e(o, c, r, l) {
|
|
35
35
|
if (typeof r == "number")
|
|
36
|
-
return
|
|
36
|
+
return l[o].length === r;
|
|
37
37
|
if (typeof r == "object") {
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
return Number(
|
|
41
|
-
if (
|
|
42
|
-
return Number(
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
38
|
+
const f = Object.keys(r)[0], g = r[f];
|
|
39
|
+
if (f === "not")
|
|
40
|
+
return Number(l[o].length) !== Number(g);
|
|
41
|
+
if (f === "moreThan")
|
|
42
|
+
return Number(l[o].length) >= Number(g);
|
|
43
|
+
if (f === "lessThan")
|
|
44
|
+
return Number(l[o].length) <= Number(g);
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
47
|
}
|
|
48
|
-
function i(
|
|
49
|
-
return
|
|
48
|
+
function i(o, c, r, l) {
|
|
49
|
+
return l[o] && l[o].propertyValue && String(l[o].propertyValue.value) === String(r);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const n = /* @__PURE__ */ new Map([
|
|
52
52
|
["length", e],
|
|
53
53
|
["getProperty", i]
|
|
54
54
|
]);
|
|
55
|
-
Object.keys(t).reduce((
|
|
56
|
-
function
|
|
57
|
-
const r =
|
|
58
|
-
return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param:
|
|
59
|
-
if (
|
|
60
|
-
return { target: r, operator: "length", param: null, value: c[
|
|
61
|
-
const
|
|
62
|
-
return { target: r, operator: "getProperty", param:
|
|
55
|
+
Object.keys(t).reduce((o, c) => (o.set(c, t[c]), o), n);
|
|
56
|
+
function s(o, c) {
|
|
57
|
+
const r = o;
|
|
58
|
+
return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param: o, value: !!c }] : typeof c == "object" ? Object.keys(c).map((l) => {
|
|
59
|
+
if (l === "length")
|
|
60
|
+
return { target: r, operator: "length", param: null, value: c[l] };
|
|
61
|
+
const f = l, g = c[l];
|
|
62
|
+
return { target: r, operator: "getProperty", param: f, value: g };
|
|
63
63
|
}) : [];
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return Object.keys(
|
|
67
|
-
const
|
|
68
|
-
return r.push(...
|
|
65
|
+
function p(o) {
|
|
66
|
+
return Object.keys(o).reduce((r, l) => {
|
|
67
|
+
const f = s(l, o[l]);
|
|
68
|
+
return r.push(...f), r;
|
|
69
69
|
}, []);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
if (
|
|
73
|
-
const r =
|
|
74
|
-
return r && r(
|
|
71
|
+
function a(o, c) {
|
|
72
|
+
if (n.has(o.operator)) {
|
|
73
|
+
const r = n.get(o.operator);
|
|
74
|
+
return r && r(o.target, o.param, o.value, c) || !1;
|
|
75
75
|
}
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
78
|
+
function u(o, c) {
|
|
79
|
+
return p(o).reduce((f, g) => f && a(g, c), !0);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const r = Object.keys(
|
|
83
|
-
return
|
|
81
|
+
function m(o, c) {
|
|
82
|
+
const r = Object.keys(o), l = r.includes("allOf"), f = r.includes("anyOf"), g = l || f, w = (g ? o[g ? l ? "allOf" : "anyOf" : "allOf"] : [o]).map((E) => u(E, c));
|
|
83
|
+
return l ? !w.includes(!1) : w.includes(!0);
|
|
84
84
|
}
|
|
85
|
-
return { parseValueSchema:
|
|
85
|
+
return { parseValueSchema: m };
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
function
|
|
90
|
-
return
|
|
91
|
-
const
|
|
92
|
-
return Object.assign(
|
|
87
|
+
const G = {}, J = {};
|
|
88
|
+
L();
|
|
89
|
+
function Q(t, e, i = /* @__PURE__ */ new Map(), n = (a, u, m) => u, s = {}, p = (a) => a) {
|
|
90
|
+
return q[e.title] = e, V[e.title] = n, G[e.title] = s, J[e.title] = p, (a = {}) => {
|
|
91
|
+
const u = H(a, e, i), m = Object.keys(t).reduce((o, c) => (o[c] = t[c].default, o), {});
|
|
92
|
+
return Object.assign(m, u);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
["appearance",
|
|
95
|
+
const N = /* @__PURE__ */ new Map([
|
|
96
|
+
["appearance", S],
|
|
97
97
|
["size", (t, e) => {
|
|
98
98
|
const i = {};
|
|
99
99
|
return e.width && (i.width = Number(e.width)), e.height && (i.height = Number(e.height)), i;
|
|
100
100
|
}]
|
|
101
|
-
]),
|
|
101
|
+
]), U = "https://json-schema.org/draft/2020-12/schema", W = "https://farris-design.gitee.io/accordion.schema.json", X = "accordion", Y = "A Farris Container Component", Z = "object", _ = {
|
|
102
102
|
id: {
|
|
103
103
|
description: "The unique identifier for a Accordion",
|
|
104
104
|
type: "string"
|
|
@@ -154,23 +154,23 @@ const F = /* @__PURE__ */ new Map([
|
|
|
154
154
|
type: "boolean",
|
|
155
155
|
default: !1
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, K = [
|
|
158
158
|
"id",
|
|
159
159
|
"type",
|
|
160
160
|
"contents"
|
|
161
|
-
],
|
|
162
|
-
$schema:
|
|
163
|
-
$id:
|
|
164
|
-
title:
|
|
165
|
-
description:
|
|
166
|
-
type:
|
|
167
|
-
properties:
|
|
168
|
-
required:
|
|
161
|
+
], ee = {
|
|
162
|
+
$schema: U,
|
|
163
|
+
$id: W,
|
|
164
|
+
title: X,
|
|
165
|
+
description: Y,
|
|
166
|
+
type: Z,
|
|
167
|
+
properties: _,
|
|
168
|
+
required: K
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function te(t, e, i) {
|
|
171
171
|
return e;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const ne = "accordion", se = "A Farris Component", oe = "object", re = {
|
|
174
174
|
basic: {
|
|
175
175
|
description: "Basic Infomation",
|
|
176
176
|
title: "基本信息",
|
|
@@ -192,42 +192,42 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
title:
|
|
197
|
-
description:
|
|
198
|
-
type:
|
|
199
|
-
categories:
|
|
195
|
+
}, ie = {
|
|
196
|
+
title: ne,
|
|
197
|
+
description: se,
|
|
198
|
+
type: oe,
|
|
199
|
+
categories: re
|
|
200
200
|
}, j = {
|
|
201
201
|
customClass: { type: String, default: "" },
|
|
202
202
|
height: { type: Number },
|
|
203
203
|
width: { type: Number },
|
|
204
204
|
enableFold: { type: Boolean, default: !0 },
|
|
205
205
|
expanded: { type: Boolean, default: !1 }
|
|
206
|
-
},
|
|
206
|
+
}, k = Q(j, ee, N, te, ie), b = /* @__PURE__ */ C({
|
|
207
207
|
name: "FAccordion",
|
|
208
208
|
props: j,
|
|
209
209
|
emits: [],
|
|
210
210
|
setup(t, e) {
|
|
211
|
-
const i =
|
|
211
|
+
const i = h(() => ({
|
|
212
212
|
height: t.height ? `${t.height}px` : "",
|
|
213
213
|
width: t.width ? `${t.width}px` : ""
|
|
214
214
|
}));
|
|
215
|
-
|
|
215
|
+
R("accordionContext", {
|
|
216
216
|
parentProps: t
|
|
217
217
|
});
|
|
218
|
-
const
|
|
219
|
-
const
|
|
218
|
+
const n = h(() => {
|
|
219
|
+
const s = t.customClass.split(" "), p = {
|
|
220
220
|
"farris-panel": !0,
|
|
221
221
|
accordion: !0
|
|
222
222
|
};
|
|
223
|
-
return
|
|
223
|
+
return s.reduce((a, u) => (a[u] = !0, a), p), p;
|
|
224
224
|
});
|
|
225
|
-
return () =>
|
|
226
|
-
class:
|
|
225
|
+
return () => d("div", {
|
|
226
|
+
class: n.value,
|
|
227
227
|
style: i.value
|
|
228
228
|
}, [e.slots.default && e.slots.default()]);
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), ce = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/accordion-item.schema.json", le = "AccordionItem", ue = "A Farris Container Component", de = "object", pe = {
|
|
231
231
|
id: {
|
|
232
232
|
description: "The unique identifier for a Accordion Item",
|
|
233
233
|
type: "string"
|
|
@@ -264,156 +264,156 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
264
264
|
type: "boolean",
|
|
265
265
|
default: !1
|
|
266
266
|
}
|
|
267
|
-
},
|
|
267
|
+
}, fe = [
|
|
268
268
|
"id",
|
|
269
269
|
"type",
|
|
270
270
|
"contents"
|
|
271
|
-
],
|
|
272
|
-
$schema:
|
|
273
|
-
$id:
|
|
274
|
-
title:
|
|
275
|
-
description:
|
|
276
|
-
type:
|
|
277
|
-
properties:
|
|
278
|
-
required:
|
|
279
|
-
},
|
|
271
|
+
], me = {
|
|
272
|
+
$schema: ce,
|
|
273
|
+
$id: ae,
|
|
274
|
+
title: le,
|
|
275
|
+
description: ue,
|
|
276
|
+
type: de,
|
|
277
|
+
properties: pe,
|
|
278
|
+
required: fe
|
|
279
|
+
}, A = {
|
|
280
280
|
width: { type: Number },
|
|
281
281
|
height: { type: Number, default: 100 },
|
|
282
282
|
title: { type: String, default: "" },
|
|
283
283
|
disabled: { type: Boolean, default: !1 },
|
|
284
284
|
active: { type: Boolean, default: !1 }
|
|
285
|
-
},
|
|
285
|
+
}, D = T(A, me, N), $ = /* @__PURE__ */ C({
|
|
286
286
|
name: "FAccordionItem",
|
|
287
|
-
props:
|
|
287
|
+
props: A,
|
|
288
288
|
emits: [],
|
|
289
289
|
setup(t, e) {
|
|
290
|
-
const i =
|
|
291
|
-
function
|
|
290
|
+
const i = O("accordionContext"), n = y(t.title), s = y(t.active);
|
|
291
|
+
function p() {
|
|
292
292
|
var r;
|
|
293
|
-
t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (
|
|
293
|
+
t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (s.value = !s.value);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
|
|
295
|
+
function a(r) {
|
|
296
|
+
p();
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const u = h(() => ({
|
|
299
299
|
"f-state-disabled": t.disabled,
|
|
300
300
|
card: !0,
|
|
301
301
|
"farris-panel-item": !0,
|
|
302
|
-
"f-state-selected":
|
|
303
|
-
})),
|
|
302
|
+
"f-state-selected": s.value
|
|
303
|
+
})), m = h(() => !0), o = h(() => ({
|
|
304
304
|
"f-icon": !0,
|
|
305
|
-
"f-accordion-collapse": !
|
|
306
|
-
"f-accordion-expand":
|
|
307
|
-
})), c =
|
|
305
|
+
"f-accordion-collapse": !s.value,
|
|
306
|
+
"f-accordion-expand": s.value
|
|
307
|
+
})), c = h(() => {
|
|
308
308
|
const r = {
|
|
309
309
|
transition: "height 0.36s ease 0s",
|
|
310
|
-
height:
|
|
310
|
+
height: s.value ? `${t.height}px` : 0
|
|
311
311
|
};
|
|
312
|
-
return
|
|
312
|
+
return s.value || (r.overflow = "hidden"), r;
|
|
313
313
|
});
|
|
314
|
-
return
|
|
314
|
+
return P(() => {
|
|
315
315
|
var r;
|
|
316
|
-
(r = i == null ? void 0 : i.parentProps) != null && r.expanded && (
|
|
317
|
-
}), () =>
|
|
318
|
-
class:
|
|
319
|
-
}, [
|
|
316
|
+
(r = i == null ? void 0 : i.parentProps) != null && r.expanded && (s.value = !0);
|
|
317
|
+
}), () => d("div", {
|
|
318
|
+
class: u.value
|
|
319
|
+
}, [d("div", {
|
|
320
320
|
class: "card-header",
|
|
321
|
-
onClick:
|
|
322
|
-
}, [
|
|
321
|
+
onClick: a
|
|
322
|
+
}, [d("div", {
|
|
323
323
|
class: "panel-item-title"
|
|
324
|
-
}, [
|
|
325
|
-
class:
|
|
326
|
-
}, null)]),
|
|
324
|
+
}, [m.value && d("span", null, [n.value]), e.slots.head && e.slots.head(), d("span", {
|
|
325
|
+
class: o.value
|
|
326
|
+
}, null)]), d("div", {
|
|
327
327
|
class: "panel-item-tool"
|
|
328
|
-
}, [e.slots.toolbar && e.slots.toolbar()]),
|
|
328
|
+
}, [e.slots.toolbar && e.slots.toolbar()]), d("div", {
|
|
329
329
|
class: "panel-item-clear"
|
|
330
|
-
}, null)]),
|
|
330
|
+
}, null)]), d("div", {
|
|
331
331
|
style: c.value
|
|
332
|
-
}, [
|
|
332
|
+
}, [d("div", {
|
|
333
333
|
class: "card-body"
|
|
334
334
|
}, [e.slots.default && e.slots.default()])])]);
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
336
|
+
}), he = /* @__PURE__ */ C({
|
|
337
337
|
name: "FAccordionDesign",
|
|
338
338
|
props: j,
|
|
339
339
|
emits: [],
|
|
340
340
|
setup(t, e) {
|
|
341
|
-
const i =
|
|
341
|
+
const i = h(() => ({
|
|
342
342
|
height: t.height ? `${t.height}px` : "",
|
|
343
343
|
width: t.width ? `${t.width}px` : ""
|
|
344
|
-
})),
|
|
345
|
-
const
|
|
344
|
+
})), n = h(() => {
|
|
345
|
+
const u = t.customClass.split(" "), m = {
|
|
346
346
|
"farris-panel": !0,
|
|
347
347
|
accordion: !0
|
|
348
348
|
};
|
|
349
|
-
return
|
|
350
|
-
}),
|
|
351
|
-
return
|
|
352
|
-
|
|
353
|
-
}), e.expose(
|
|
354
|
-
ref:
|
|
355
|
-
class:
|
|
349
|
+
return u.reduce((o, c) => (o[c] = !0, o), m), m;
|
|
350
|
+
}), s = y(), p = O("design-item-context"), a = B(s, p);
|
|
351
|
+
return P(() => {
|
|
352
|
+
s.value.componentInstance = a;
|
|
353
|
+
}), e.expose(a.value), () => d("div", {
|
|
354
|
+
ref: s,
|
|
355
|
+
class: n.value,
|
|
356
356
|
style: i.value
|
|
357
357
|
}, [e.slots.default && e.slots.default()]);
|
|
358
358
|
}
|
|
359
|
-
}),
|
|
359
|
+
}), ge = /* @__PURE__ */ C({
|
|
360
360
|
name: "FAccordionItemDesign",
|
|
361
|
-
props:
|
|
361
|
+
props: A,
|
|
362
362
|
emits: [],
|
|
363
363
|
setup(t, e) {
|
|
364
|
-
const i = y(t.title),
|
|
365
|
-
function
|
|
366
|
-
|
|
364
|
+
const i = y(t.title), n = y(!1), s = y(!1);
|
|
365
|
+
function p() {
|
|
366
|
+
n.value = !n.value;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
368
|
+
function a(v) {
|
|
369
|
+
p();
|
|
370
370
|
}
|
|
371
|
-
const
|
|
372
|
-
"f-state-disable":
|
|
371
|
+
const u = h(() => ({
|
|
372
|
+
"f-state-disable": s.value,
|
|
373
373
|
card: !0,
|
|
374
374
|
"farris-panel-item": !0,
|
|
375
|
-
"f-state-selected":
|
|
376
|
-
})),
|
|
375
|
+
"f-state-selected": n.value
|
|
376
|
+
})), m = h(() => !0), o = h(() => !1), c = h(() => ({
|
|
377
377
|
"f-icon": !0,
|
|
378
|
-
"f-accordion-collapse": !
|
|
379
|
-
"f-accordion-expand":
|
|
380
|
-
})), r =
|
|
378
|
+
"f-accordion-collapse": !n.value,
|
|
379
|
+
"f-accordion-expand": n.value
|
|
380
|
+
})), r = h(() => {
|
|
381
381
|
const v = {
|
|
382
382
|
transition: "height 0.36s ease 0s",
|
|
383
|
-
height:
|
|
383
|
+
height: n.value ? `${t.height}px` : 0
|
|
384
384
|
};
|
|
385
|
-
return
|
|
385
|
+
return n.value || (v.overflow = "hidden"), v;
|
|
386
386
|
});
|
|
387
|
-
function
|
|
387
|
+
function l() {
|
|
388
388
|
return !0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function f() {
|
|
391
391
|
return !1;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function g() {
|
|
394
394
|
return !0;
|
|
395
395
|
}
|
|
396
396
|
return e.expose({
|
|
397
|
-
canMove:
|
|
398
|
-
canSelectParent:
|
|
399
|
-
canDelete:
|
|
397
|
+
canMove: l(),
|
|
398
|
+
canSelectParent: f(),
|
|
399
|
+
canDelete: g(),
|
|
400
400
|
canNested: !0
|
|
401
|
-
}), () =>
|
|
402
|
-
class:
|
|
403
|
-
}, [
|
|
401
|
+
}), () => d("div", {
|
|
402
|
+
class: u.value
|
|
403
|
+
}, [d("div", {
|
|
404
404
|
class: "card-header",
|
|
405
|
-
onClick:
|
|
406
|
-
}, [
|
|
405
|
+
onClick: a
|
|
406
|
+
}, [d("div", {
|
|
407
407
|
class: "panel-item-title"
|
|
408
|
-
}, [
|
|
408
|
+
}, [m.value && d("span", null, [i.value]), o.value && e.slots.head && e.slots.head(), d("span", {
|
|
409
409
|
class: c.value
|
|
410
|
-
}, null)]),
|
|
410
|
+
}, null)]), d("div", {
|
|
411
411
|
class: "panel-item-tool"
|
|
412
|
-
}, [e.slots.toolbar && e.slots.toolbar()]),
|
|
412
|
+
}, [e.slots.toolbar && e.slots.toolbar()]), d("div", {
|
|
413
413
|
class: "panel-item-clear"
|
|
414
|
-
}, null)]),
|
|
414
|
+
}, null)]), d("div", {
|
|
415
415
|
style: r.value
|
|
416
|
-
}, [
|
|
416
|
+
}, [d("div", {
|
|
417
417
|
class: "card-body drag-container"
|
|
418
418
|
}, [e.slots.default && e.slots.default()])])]);
|
|
419
419
|
}
|
|
@@ -421,18 +421,18 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
421
421
|
b.install = (t) => {
|
|
422
422
|
t.component(b.name, b), t.component($.name, $);
|
|
423
423
|
};
|
|
424
|
-
b.register = (t, e, i,
|
|
425
|
-
t.accordion = b, t["accordion-item"] = $, e.accordion =
|
|
424
|
+
b.register = (t, e, i, n) => {
|
|
425
|
+
t.accordion = b, t["accordion-item"] = $, e.accordion = k, e["accordion-item"] = D;
|
|
426
426
|
};
|
|
427
427
|
b.registerDesigner = (t, e, i) => {
|
|
428
|
-
t.accordion =
|
|
428
|
+
t.accordion = he, t["accordion-item"] = ge, e.accordion = k, e["accordion-item"] = D;
|
|
429
429
|
};
|
|
430
430
|
export {
|
|
431
431
|
b as FAccordion,
|
|
432
432
|
$ as FAccordionItem,
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
A as accordionItemProps,
|
|
434
|
+
D as accordionItemPropsResolver,
|
|
435
435
|
j as accordionProps,
|
|
436
|
-
|
|
436
|
+
k as accordionPropsResolver,
|
|
437
437
|
b as default
|
|
438
438
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(f,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js"],n):(f=typeof globalThis<"u"?globalThis:f||self,n(f.accordion={},f.Vue,f.LodashES,f.dynamicResolver,f.designerCanvas))})(this,function(f,n,N,I,v){"use strict";const F={},k={};function w(t){const{properties:e,title:c,ignore:o}=t,r=o&&Array.isArray(o),p=Object.keys(e).reduce((d,u)=>((!r||!o.find(h=>h==u))&&(d[u]=e[u].type==="object"&&e[u].properties?w(e[u]):N.cloneDeep(e[u].default)),d),{});return(!r||!o.find(d=>d=="id"))&&(p.id=`${c}-${Date.now()}`),p}function q(t,e){const c=w(e);return Object.keys(t).reduce((o,r)=>(o[r]&&N.isPlainObject(o[r])&&N.isPlainObject(t[r])?Object.assign(o[r],t[r]):o[r]=t[r],o),c),c}function D(t,e){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,r)=>{if(e.has(r)){const p=e.get(r);if(typeof p=="string")o[p]=t[r];else{const d=p(r,t[r],t);Object.assign(o,d)}}else o[r]=t[r];return o},{})}function M(t,e,c=new Map){const o=q(t,e);return D(o,c)}function S(t={}){function e(s,a,i,l){if(typeof i=="number")return l[s].length===i;if(typeof i=="object"){const m=Object.keys(i)[0],g=i[m];if(m==="not")return Number(l[s].length)!==Number(g);if(m==="moreThan")return Number(l[s].length)>=Number(g);if(m==="lessThan")return Number(l[s].length)<=Number(g)}return!1}function c(s,a,i,l){return l[s]&&l[s].propertyValue&&String(l[s].propertyValue.value)===String(i)}const o=new Map([["length",e],["getProperty",c]]);Object.keys(t).reduce((s,a)=>(s.set(a,t[a]),s),o);function r(s,a){const i=s;return typeof a=="number"?[{target:i,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:i,operator:"getProperty",param:s,value:!!a}]:typeof a=="object"?Object.keys(a).map(l=>{if(l==="length")return{target:i,operator:"length",param:null,value:a[l]};const m=l,g=a[l];return{target:i,operator:"getProperty",param:m,value:g}}):[]}function p(s){return Object.keys(s).reduce((i,l)=>{const m=r(l,s[l]);return i.push(...m),i},[])}function d(s,a){if(o.has(s.operator)){const i=o.get(s.operator);return i&&i(s.target,s.param,s.value,a)||!1}return!1}function u(s,a){return p(s).reduce((m,g)=>m&&d(g,a),!0)}function h(s,a){const i=Object.keys(s),l=i.includes("allOf"),m=i.includes("anyOf"),g=l||m,P=(g?s[g?l?"allOf":"anyOf":"allOf"]:[s]).map(G=>u(G,a));return l?!P.includes(!1):P.includes(!0)}return{parseValueSchema:h}}const T={},R={};S();function E(t,e,c=new Map,o=(d,u,h)=>u,r={},p=d=>d){return F[e.title]=e,k[e.title]=o,T[e.title]=r,R[e.title]=p,(d={})=>{const u=M(d,e,c),h=Object.keys(t).reduce((s,a)=>(s[a]=t[a].default,s),{});return Object.assign(h,u)}}const O=new Map([["appearance",I.resolveAppearance],["size",(t,e)=>{const c={};return e.width&&(c.width=Number(e.width)),e.height&&(c.height=Number(e.height)),c}]]),B={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion.schema.json",title:"accordion",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion",type:"string"},type:{description:"The type string of Accordion component",type:"string",default:"accordion"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},customClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},enableFold:{description:"",type:"boolean",default:!0},expanded:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]};function z(t,e,c){return e}const x={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},$={customClass:{type:String,default:""},height:{type:Number},width:{type:Number},enableFold:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1}},A=E($,B,O,z,x),y=n.defineComponent({name:"FAccordion",props:$,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""}));n.provide("accordionContext",{parentProps:t});const o=n.computed(()=>{const r=t.customClass.split(" "),p={"farris-panel":!0,accordion:!0};return r.reduce((d,u)=>(d[u]=!0,d),p),p});return()=>n.createVNode("div",{class:o.value,style:c.value},[e.slots.default&&e.slots.default()])}}),H={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion-item.schema.json",title:"AccordionItem",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion Item",type:"string"},type:{description:"The type string of Accordion Item component",type:"string"},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},title:{description:"",type:"string",default:""},disable:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]},C={width:{type:Number},height:{type:Number,default:100},title:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},V=I.createPropsResolver(C,H,O),j=n.defineComponent({name:"FAccordionItem",props:C,emits:[],setup(t,e){const c=n.inject("accordionContext"),o=n.ref(t.title),r=n.ref(t.active);function p(){var i;t.disabled||!((i=c==null?void 0:c.parentProps)!=null&&i.enableFold)||(r.value=!r.value)}function d(i){p()}const u=n.computed(()=>({"f-state-disabled":t.disabled,card:!0,"farris-panel-item":!0,"f-state-selected":r.value})),h=n.computed(()=>!0),s=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!r.value,"f-accordion-expand":r.value})),a=n.computed(()=>{const i={transition:"height 0.36s ease 0s",height:r.value?`${t.height}px`:0};return r.value||(i.overflow="hidden"),i});return n.onMounted(()=>{var i;(i=c==null?void 0:c.parentProps)!=null&&i.expanded&&(r.value=!0)}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[o.value]),e.slots.head&&e.slots.head(),n.createVNode("span",{class:s.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:a.value},[n.createVNode("div",{class:"card-body"},[e.slots.default&&e.slots.default()])])])}}),L=n.defineComponent({name:"FAccordionDesign",props:$,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""})),o=n.computed(()=>{const u=t.customClass.split(" "),h={"farris-panel":!0,accordion:!0};return u.reduce((s,a)=>(s[a]=!0,s),h),h}),r=n.ref(),p=n.inject("design-item-context"),d=v.useDesignerComponent(r,p);return n.onMounted(()=>{r.value.componentInstance=d}),e.expose(d.value),()=>n.createVNode("div",{ref:r,class:o.value,style:c.value},[e.slots.default&&e.slots.default()])}}),_=n.defineComponent({name:"FAccordionItemDesign",props:C,emits:[],setup(t,e){const c=n.ref(t.title),o=n.ref(!1),r=n.ref(!1);function p(){o.value=!o.value}function d(b){p()}const u=n.computed(()=>({"f-state-disable":r.value,card:!0,"farris-panel-item":!0,"f-state-selected":o.value})),h=n.computed(()=>!0),s=n.computed(()=>!1),a=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!o.value,"f-accordion-expand":o.value})),i=n.computed(()=>{const b={transition:"height 0.36s ease 0s",height:o.value?`${t.height}px`:0};return o.value||(b.overflow="hidden"),b});function l(){return!0}function m(){return!1}function g(){return!0}return e.expose({canMove:l(),canSelectParent:m(),canDelete:g(),canNested:!0}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[c.value]),s.value&&e.slots.head&&e.slots.head(),n.createVNode("span",{class:a.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:i.value},[n.createVNode("div",{class:"card-body drag-container"},[e.slots.default&&e.slots.default()])])])}});y.install=t=>{t.component(y.name,y),t.component(j.name,j)},y.register=(t,e,c,o)=>{t.accordion=y,t["accordion-item"]=j,e.accordion=A,e["accordion-item"]=V},y.registerDesigner=(t,e,c)=>{t.accordion=L,t["accordion-item"]=_,e.accordion=A,e["accordion-item"]=V},f.FAccordion=y,f.FAccordionItem=j,f.accordionItemProps=C,f.accordionItemPropsResolver=V,f.accordionProps=$,f.accordionPropsResolver=A,f.default=y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|