@farris/ui-vue 1.2.5 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +201 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +341 -338
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +578 -584
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +287 -278
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1923 -1908
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3719 -3604
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +258 -267
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1452 -1450
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4860 -4657
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4411 -4259
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +98 -107
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +840 -800
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +757 -760
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3659 -3432
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +126 -135
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1400 -1379
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +97 -106
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +393 -402
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import { defineComponent as C, computed as m, createVNode as u,
|
|
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 B(t, e) {
|
|
11
|
-
const i = I(e);
|
|
12
|
-
return Object.keys(t).reduce((n, r) => (n[r] = t[r], n), i), i;
|
|
1
|
+
import { defineComponent as C, computed as m, provide as S, createVNode as u, inject as I, ref as g, onMounted as O } from "vue";
|
|
2
|
+
import { cloneDeep as E } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as R, createPropsResolver as M } from "@farris/ui-vue/components/dynamic-resolver";
|
|
4
|
+
import { useDesignerComponent as T } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component";
|
|
5
|
+
const V = {}, B = {};
|
|
6
|
+
function P(t) {
|
|
7
|
+
const { properties: e, title: i } = t, o = Object.keys(e).reduce((s, l) => (s[l] = e[l].type === "object" && e[l].properties ? P(e[l]) : E(e[l].default), s), {});
|
|
8
|
+
return o.id = `${i}-${Date.now()}`, o;
|
|
13
9
|
}
|
|
14
10
|
function q(t, e) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const i = P(e);
|
|
12
|
+
return Object.keys(t).reduce((o, s) => (o[s] = t[s], o), i), i;
|
|
13
|
+
}
|
|
14
|
+
function x(t, e) {
|
|
15
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, s) => {
|
|
16
|
+
if (e.has(s)) {
|
|
17
|
+
const l = e.get(s);
|
|
18
18
|
if (typeof l == "string")
|
|
19
|
-
|
|
19
|
+
o[l] = t[s];
|
|
20
20
|
else {
|
|
21
|
-
const d = l(
|
|
22
|
-
Object.assign(
|
|
21
|
+
const d = l(s, t[s], t);
|
|
22
|
+
Object.assign(o, d);
|
|
23
23
|
}
|
|
24
24
|
} else
|
|
25
|
-
|
|
26
|
-
return
|
|
25
|
+
o[s] = t[s];
|
|
26
|
+
return o;
|
|
27
27
|
}, {});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return
|
|
29
|
+
function z(t, e, i = /* @__PURE__ */ new Map()) {
|
|
30
|
+
const o = q(t, e);
|
|
31
|
+
return x(o, i);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
function e(
|
|
35
|
-
if (typeof
|
|
36
|
-
return a[
|
|
37
|
-
if (typeof
|
|
38
|
-
const p = Object.keys(
|
|
33
|
+
function H(t = {}) {
|
|
34
|
+
function e(n, c, r, a) {
|
|
35
|
+
if (typeof r == "number")
|
|
36
|
+
return a[n].length === r;
|
|
37
|
+
if (typeof r == "object") {
|
|
38
|
+
const p = Object.keys(r)[0], h = r[p];
|
|
39
39
|
if (p === "not")
|
|
40
|
-
return Number(a[
|
|
40
|
+
return Number(a[n].length) !== Number(h);
|
|
41
41
|
if (p === "moreThan")
|
|
42
|
-
return Number(a[
|
|
42
|
+
return Number(a[n].length) >= Number(h);
|
|
43
43
|
if (p === "lessThan")
|
|
44
|
-
return Number(a[
|
|
44
|
+
return Number(a[n].length) <= Number(h);
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
47
|
}
|
|
48
|
-
function i(
|
|
49
|
-
return a[
|
|
48
|
+
function i(n, c, r, a) {
|
|
49
|
+
return a[n] && a[n].propertyValue && String(a[n].propertyValue.value) === String(r);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const o = /* @__PURE__ */ new Map([
|
|
52
52
|
["length", e],
|
|
53
53
|
["getProperty", i]
|
|
54
54
|
]);
|
|
55
|
-
Object.keys(t).reduce((
|
|
56
|
-
function
|
|
57
|
-
const
|
|
58
|
-
return typeof
|
|
55
|
+
Object.keys(t).reduce((n, c) => (n.set(c, t[c]), n), o);
|
|
56
|
+
function s(n, c) {
|
|
57
|
+
const r = n;
|
|
58
|
+
return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param: n, value: !!c }] : typeof c == "object" ? Object.keys(c).map((a) => {
|
|
59
59
|
if (a === "length")
|
|
60
|
-
return { target:
|
|
61
|
-
const p = a, h =
|
|
62
|
-
return { target:
|
|
60
|
+
return { target: r, operator: "length", param: null, value: c[a] };
|
|
61
|
+
const p = a, h = c[a];
|
|
62
|
+
return { target: r, operator: "getProperty", param: p, value: h };
|
|
63
63
|
}) : [];
|
|
64
64
|
}
|
|
65
|
-
function l(
|
|
66
|
-
return Object.keys(
|
|
67
|
-
const p =
|
|
68
|
-
return
|
|
65
|
+
function l(n) {
|
|
66
|
+
return Object.keys(n).reduce((r, a) => {
|
|
67
|
+
const p = s(a, n[a]);
|
|
68
|
+
return r.push(...p), r;
|
|
69
69
|
}, []);
|
|
70
70
|
}
|
|
71
|
-
function d(
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
return
|
|
71
|
+
function d(n, c) {
|
|
72
|
+
if (o.has(n.operator)) {
|
|
73
|
+
const r = o.get(n.operator);
|
|
74
|
+
return r && r(n.target, n.param, n.value, c) || !1;
|
|
75
75
|
}
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
|
-
function f(
|
|
79
|
-
return l(
|
|
78
|
+
function f(n, c) {
|
|
79
|
+
return l(n).reduce((p, h) => p && d(h, c), !0);
|
|
80
80
|
}
|
|
81
|
-
function y(
|
|
82
|
-
const
|
|
81
|
+
function y(n, c) {
|
|
82
|
+
const r = Object.keys(n), a = r.includes("allOf"), p = r.includes("anyOf"), h = a || p, A = (h ? n[h ? a ? "allOf" : "anyOf" : "allOf"] : [n]).map((D) => f(D, c));
|
|
83
83
|
return a ? !A.includes(!1) : A.includes(!0);
|
|
84
84
|
}
|
|
85
85
|
return { parseValueSchema: y };
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
function
|
|
90
|
-
return
|
|
91
|
-
const f =
|
|
87
|
+
const L = {}, G = {};
|
|
88
|
+
H();
|
|
89
|
+
function J(t, e, i = /* @__PURE__ */ new Map(), o = (d, f, y) => f, s = {}, l = (d) => d) {
|
|
90
|
+
return V[e.title] = e, B[e.title] = o, L[e.title] = s, G[e.title] = l, (d = {}) => {
|
|
91
|
+
const f = z(d, e, i), y = Object.keys(t).reduce((n, c) => (n[c] = t[c].default, n), {});
|
|
92
92
|
return Object.assign(y, f);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
["appearance",
|
|
95
|
+
const F = /* @__PURE__ */ new Map([
|
|
96
|
+
["appearance", R],
|
|
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
|
+
]), Q = "https://json-schema.org/draft/2020-12/schema", U = "https://farris-design.gitee.io/accordion.schema.json", W = "accordion", X = "A Farris Container Component", Y = "object", Z = {
|
|
102
102
|
id: {
|
|
103
103
|
description: "The unique identifier for a Accordion",
|
|
104
104
|
type: "string"
|
|
@@ -154,23 +154,23 @@ const O = /* @__PURE__ */ new Map([
|
|
|
154
154
|
type: "boolean",
|
|
155
155
|
default: !1
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, _ = [
|
|
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
|
+
], K = {
|
|
162
|
+
$schema: Q,
|
|
163
|
+
$id: U,
|
|
164
|
+
title: W,
|
|
165
|
+
description: X,
|
|
166
|
+
type: Y,
|
|
167
|
+
properties: Z,
|
|
168
|
+
required: _
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function ee(t, e, i) {
|
|
171
171
|
return e;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const te = "accordion", ne = "A Farris Component", oe = "object", se = {
|
|
174
174
|
basic: {
|
|
175
175
|
description: "Basic Infomation",
|
|
176
176
|
title: "基本信息",
|
|
@@ -192,10 +192,10 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
title:
|
|
197
|
-
description:
|
|
198
|
-
type:
|
|
195
|
+
}, re = {
|
|
196
|
+
title: te,
|
|
197
|
+
description: ne,
|
|
198
|
+
type: oe,
|
|
199
199
|
categories: se
|
|
200
200
|
}, j = {
|
|
201
201
|
customClass: { type: String, default: "" },
|
|
@@ -203,7 +203,7 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
203
203
|
width: { type: Number },
|
|
204
204
|
enableFold: { type: Boolean, default: !0 },
|
|
205
205
|
expanded: { type: Boolean, default: !1 }
|
|
206
|
-
}, N =
|
|
206
|
+
}, N = J(j, K, F, ee, re), v = /* @__PURE__ */ C({
|
|
207
207
|
name: "FAccordion",
|
|
208
208
|
props: j,
|
|
209
209
|
emits: [],
|
|
@@ -211,19 +211,23 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
211
211
|
const i = m(() => ({
|
|
212
212
|
height: t.height ? `${t.height}px` : "",
|
|
213
213
|
width: t.width ? `${t.width}px` : ""
|
|
214
|
-
}))
|
|
215
|
-
|
|
214
|
+
}));
|
|
215
|
+
S("accordionContext", {
|
|
216
|
+
parentProps: t
|
|
217
|
+
});
|
|
218
|
+
const o = m(() => {
|
|
219
|
+
const s = t.customClass.split(" "), l = {
|
|
216
220
|
"farris-panel": !0,
|
|
217
221
|
accordion: !0
|
|
218
222
|
};
|
|
219
|
-
return
|
|
223
|
+
return s.reduce((d, f) => (d[f] = !0, d), l), l;
|
|
220
224
|
});
|
|
221
225
|
return () => u("div", {
|
|
222
|
-
class:
|
|
226
|
+
class: o.value,
|
|
223
227
|
style: i.value
|
|
224
228
|
}, [e.slots.default && e.slots.default()]);
|
|
225
229
|
}
|
|
226
|
-
}),
|
|
230
|
+
}), ie = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/accordion-item.schema.json", ae = "AccordionItem", le = "A Farris Container Component", ue = "object", de = {
|
|
227
231
|
id: {
|
|
228
232
|
description: "The unique identifier for a Accordion Item",
|
|
229
233
|
type: "string"
|
|
@@ -260,72 +264,76 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
260
264
|
type: "boolean",
|
|
261
265
|
default: !1
|
|
262
266
|
}
|
|
263
|
-
},
|
|
267
|
+
}, pe = [
|
|
264
268
|
"id",
|
|
265
269
|
"type",
|
|
266
270
|
"contents"
|
|
267
|
-
],
|
|
268
|
-
$schema:
|
|
269
|
-
$id:
|
|
270
|
-
title:
|
|
271
|
-
description:
|
|
272
|
-
type:
|
|
273
|
-
properties:
|
|
274
|
-
required:
|
|
271
|
+
], fe = {
|
|
272
|
+
$schema: ie,
|
|
273
|
+
$id: ce,
|
|
274
|
+
title: ae,
|
|
275
|
+
description: le,
|
|
276
|
+
type: ue,
|
|
277
|
+
properties: de,
|
|
278
|
+
required: pe
|
|
275
279
|
}, w = {
|
|
276
280
|
width: { type: Number },
|
|
277
281
|
height: { type: Number, default: 100 },
|
|
278
282
|
title: { type: String, default: "" },
|
|
279
283
|
disabled: { type: Boolean, default: !1 },
|
|
280
284
|
active: { type: Boolean, default: !1 }
|
|
281
|
-
},
|
|
285
|
+
}, k = M(w, fe, F), $ = /* @__PURE__ */ C({
|
|
282
286
|
name: "FAccordionItem",
|
|
283
287
|
props: w,
|
|
284
288
|
emits: [],
|
|
285
289
|
setup(t, e) {
|
|
286
|
-
const i = g(t.title),
|
|
287
|
-
function
|
|
288
|
-
|
|
290
|
+
const i = I("accordionContext"), o = g(t.title), s = g(t.active);
|
|
291
|
+
function l() {
|
|
292
|
+
var r;
|
|
293
|
+
t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (s.value = !s.value);
|
|
289
294
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
295
|
+
function d(r) {
|
|
296
|
+
l();
|
|
292
297
|
}
|
|
293
|
-
const
|
|
298
|
+
const f = m(() => ({
|
|
294
299
|
"f-state-disabled": t.disabled,
|
|
295
300
|
card: !0,
|
|
296
301
|
"farris-panel-item": !0,
|
|
297
|
-
"f-state-selected":
|
|
298
|
-
})),
|
|
302
|
+
"f-state-selected": s.value
|
|
303
|
+
})), y = m(() => !0), n = m(() => ({
|
|
299
304
|
"f-icon": !0,
|
|
300
|
-
"f-accordion-collapse": !
|
|
301
|
-
"f-accordion-expand":
|
|
302
|
-
})),
|
|
303
|
-
const
|
|
305
|
+
"f-accordion-collapse": !s.value,
|
|
306
|
+
"f-accordion-expand": s.value
|
|
307
|
+
})), c = m(() => {
|
|
308
|
+
const r = {
|
|
304
309
|
transition: "height 0.36s ease 0s",
|
|
305
|
-
height:
|
|
310
|
+
height: s.value ? `${t.height}px` : 0
|
|
306
311
|
};
|
|
307
|
-
return
|
|
312
|
+
return s.value || (r.overflow = "hidden"), r;
|
|
308
313
|
});
|
|
309
|
-
return () =>
|
|
310
|
-
|
|
314
|
+
return O(() => {
|
|
315
|
+
var r;
|
|
316
|
+
(r = i == null ? void 0 : i.parentProps) != null && r.expanded && (s.value = !0);
|
|
317
|
+
}), () => u("div", {
|
|
318
|
+
class: f.value
|
|
311
319
|
}, [u("div", {
|
|
312
320
|
class: "card-header",
|
|
313
|
-
onClick:
|
|
321
|
+
onClick: d
|
|
314
322
|
}, [u("div", {
|
|
315
323
|
class: "panel-item-title"
|
|
316
|
-
}, [
|
|
317
|
-
class:
|
|
324
|
+
}, [y.value && u("span", null, [o.value]), e.slots.head && e.slots.head(), u("span", {
|
|
325
|
+
class: n.value
|
|
318
326
|
}, null)]), u("div", {
|
|
319
327
|
class: "panel-item-tool"
|
|
320
328
|
}, [e.slots.toolbar && e.slots.toolbar()]), u("div", {
|
|
321
329
|
class: "panel-item-clear"
|
|
322
330
|
}, null)]), u("div", {
|
|
323
|
-
style:
|
|
331
|
+
style: c.value
|
|
324
332
|
}, [u("div", {
|
|
325
333
|
class: "card-body"
|
|
326
334
|
}, [e.slots.default && e.slots.default()])])]);
|
|
327
335
|
}
|
|
328
|
-
}),
|
|
336
|
+
}), me = /* @__PURE__ */ C({
|
|
329
337
|
name: "FAccordionDesign",
|
|
330
338
|
props: j,
|
|
331
339
|
emits: [],
|
|
@@ -333,48 +341,48 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
333
341
|
const i = m(() => ({
|
|
334
342
|
height: t.height ? `${t.height}px` : "",
|
|
335
343
|
width: t.width ? `${t.width}px` : ""
|
|
336
|
-
})),
|
|
344
|
+
})), o = m(() => {
|
|
337
345
|
const f = t.customClass.split(" "), y = {
|
|
338
346
|
"farris-panel": !0,
|
|
339
347
|
accordion: !0
|
|
340
348
|
};
|
|
341
|
-
return f.reduce((
|
|
342
|
-
}),
|
|
343
|
-
return
|
|
344
|
-
|
|
349
|
+
return f.reduce((n, c) => (n[c] = !0, n), y), y;
|
|
350
|
+
}), s = g(), l = I("design-item-context"), d = T(s, l);
|
|
351
|
+
return O(() => {
|
|
352
|
+
s.value.componentInstance = d;
|
|
345
353
|
}), e.expose(d.value), () => u("div", {
|
|
346
|
-
ref:
|
|
347
|
-
class:
|
|
354
|
+
ref: s,
|
|
355
|
+
class: o.value,
|
|
348
356
|
style: i.value
|
|
349
357
|
}, [e.slots.default && e.slots.default()]);
|
|
350
358
|
}
|
|
351
|
-
}),
|
|
359
|
+
}), he = /* @__PURE__ */ C({
|
|
352
360
|
name: "FAccordionItemDesign",
|
|
353
361
|
props: w,
|
|
354
362
|
emits: [],
|
|
355
363
|
setup(t, e) {
|
|
356
|
-
const i = g(t.title),
|
|
364
|
+
const i = g(t.title), o = g(!1), s = g(!1);
|
|
357
365
|
function l() {
|
|
358
|
-
|
|
366
|
+
o.value = !o.value;
|
|
359
367
|
}
|
|
360
368
|
function d(b) {
|
|
361
369
|
l();
|
|
362
370
|
}
|
|
363
371
|
const f = m(() => ({
|
|
364
|
-
"f-state-disable":
|
|
372
|
+
"f-state-disable": s.value,
|
|
365
373
|
card: !0,
|
|
366
374
|
"farris-panel-item": !0,
|
|
367
|
-
"f-state-selected":
|
|
368
|
-
})), y = m(() => !0),
|
|
375
|
+
"f-state-selected": o.value
|
|
376
|
+
})), y = m(() => !0), n = m(() => !1), c = m(() => ({
|
|
369
377
|
"f-icon": !0,
|
|
370
|
-
"f-accordion-collapse": !
|
|
371
|
-
"f-accordion-expand":
|
|
372
|
-
})),
|
|
378
|
+
"f-accordion-collapse": !o.value,
|
|
379
|
+
"f-accordion-expand": o.value
|
|
380
|
+
})), r = m(() => {
|
|
373
381
|
const b = {
|
|
374
382
|
transition: "height 0.36s ease 0s",
|
|
375
|
-
height:
|
|
383
|
+
height: o.value ? `${t.height}px` : 0
|
|
376
384
|
};
|
|
377
|
-
return
|
|
385
|
+
return o.value || (b.overflow = "hidden"), b;
|
|
378
386
|
});
|
|
379
387
|
function a() {
|
|
380
388
|
return !0;
|
|
@@ -397,14 +405,14 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
397
405
|
onClick: d
|
|
398
406
|
}, [u("div", {
|
|
399
407
|
class: "panel-item-title"
|
|
400
|
-
}, [y.value && u("span", null, [i.value]),
|
|
401
|
-
class:
|
|
408
|
+
}, [y.value && u("span", null, [i.value]), n.value && e.slots.head && e.slots.head(), u("span", {
|
|
409
|
+
class: c.value
|
|
402
410
|
}, null)]), u("div", {
|
|
403
411
|
class: "panel-item-tool"
|
|
404
412
|
}, [e.slots.toolbar && e.slots.toolbar()]), u("div", {
|
|
405
413
|
class: "panel-item-clear"
|
|
406
414
|
}, null)]), u("div", {
|
|
407
|
-
style:
|
|
415
|
+
style: r.value
|
|
408
416
|
}, [u("div", {
|
|
409
417
|
class: "card-body drag-container"
|
|
410
418
|
}, [e.slots.default && e.slots.default()])])]);
|
|
@@ -413,17 +421,17 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
413
421
|
v.install = (t) => {
|
|
414
422
|
t.component(v.name, v), t.component($.name, $);
|
|
415
423
|
};
|
|
416
|
-
v.register = (t, e, i,
|
|
417
|
-
t.accordion = v, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] =
|
|
424
|
+
v.register = (t, e, i, o) => {
|
|
425
|
+
t.accordion = v, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] = k;
|
|
418
426
|
};
|
|
419
427
|
v.registerDesigner = (t, e, i) => {
|
|
420
|
-
t.accordion =
|
|
428
|
+
t.accordion = me, t["accordion-item"] = he, e.accordion = N, e["accordion-item"] = k;
|
|
421
429
|
};
|
|
422
430
|
export {
|
|
423
431
|
v as FAccordion,
|
|
424
432
|
$ as FAccordionItem,
|
|
425
433
|
w as accordionItemProps,
|
|
426
|
-
|
|
434
|
+
k as accordionItemPropsResolver,
|
|
427
435
|
j as accordionProps,
|
|
428
436
|
N as accordionPropsResolver,
|
|
429
437
|
v as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(p,
|
|
1
|
+
(function(p,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es"),require("@farris/ui-vue/components/dynamic-resolver"),require("@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","@farris/ui-vue/components/dynamic-resolver","@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component"],t):(p=typeof globalThis<"u"?globalThis:p||self,t(p.accordion={},p.Vue,p.LodashES,p.dynamicResolver,p.useDesignerComponent))})(this,function(p,t,O,v,P){"use strict";const F={},S={};function A(n){const{properties:e,title:c}=n,r=Object.keys(e).reduce((s,d)=>(s[d]=e[d].type==="object"&&e[d].properties?A(e[d]):O.cloneDeep(e[d].default),s),{});return r.id=`${c}-${Date.now()}`,r}function D(n,e){const c=A(e);return Object.keys(n).reduce((r,s)=>(r[s]=n[s],r),c),c}function k(n,e){return Object.keys(n).filter(r=>n[r]!=null).reduce((r,s)=>{if(e.has(s)){const d=e.get(s);if(typeof d=="string")r[d]=n[s];else{const u=d(s,n[s],n);Object.assign(r,u)}}else r[s]=n[s];return r},{})}function q(n,e,c=new Map){const r=D(n,e);return k(r,c)}function M(n={}){function e(o,a,i,l){if(typeof i=="number")return l[o].length===i;if(typeof i=="object"){const f=Object.keys(i)[0],h=i[f];if(f==="not")return Number(l[o].length)!==Number(h);if(f==="moreThan")return Number(l[o].length)>=Number(h);if(f==="lessThan")return Number(l[o].length)<=Number(h)}return!1}function c(o,a,i,l){return l[o]&&l[o].propertyValue&&String(l[o].propertyValue.value)===String(i)}const r=new Map([["length",e],["getProperty",c]]);Object.keys(n).reduce((o,a)=>(o.set(a,n[a]),o),r);function s(o,a){const i=o;return typeof a=="number"?[{target:i,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:i,operator:"getProperty",param:o,value:!!a}]:typeof a=="object"?Object.keys(a).map(l=>{if(l==="length")return{target:i,operator:"length",param:null,value:a[l]};const f=l,h=a[l];return{target:i,operator:"getProperty",param:f,value:h}}):[]}function d(o){return Object.keys(o).reduce((i,l)=>{const f=s(l,o[l]);return i.push(...f),i},[])}function u(o,a){if(r.has(o.operator)){const i=r.get(o.operator);return i&&i(o.target,o.param,o.value,a)||!1}return!1}function m(o,a){return d(o).reduce((f,h)=>f&&u(h,a),!0)}function y(o,a){const i=Object.keys(o),l=i.includes("allOf"),f=i.includes("anyOf"),h=l||f,I=(h?o[h?l?"allOf":"anyOf":"allOf"]:[o]).map(J=>m(J,a));return l?!I.includes(!1):I.includes(!0)}return{parseValueSchema:y}}const T={},E={};M();function R(n,e,c=new Map,r=(u,m,y)=>m,s={},d=u=>u){return F[e.title]=e,S[e.title]=r,T[e.title]=s,E[e.title]=d,(u={})=>{const m=q(u,e,c),y=Object.keys(n).reduce((o,a)=>(o[a]=n[a].default,o),{});return Object.assign(y,m)}}const w=new Map([["appearance",v.resolveAppearance],["size",(n,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(n,e,c){return e}const H={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}},V=R($,B,w,z,H),g=t.defineComponent({name:"FAccordion",props:$,emits:[],setup(n,e){const c=t.computed(()=>({height:n.height?`${n.height}px`:"",width:n.width?`${n.width}px`:""}));t.provide("accordionContext",{parentProps:n});const r=t.computed(()=>{const s=n.customClass.split(" "),d={"farris-panel":!0,accordion:!0};return s.reduce((u,m)=>(u[m]=!0,u),d),d});return()=>t.createVNode("div",{class:r.value,style:c.value},[e.slots.default&&e.slots.default()])}}),L={$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}},j=v.createPropsResolver(C,L,w),N=t.defineComponent({name:"FAccordionItem",props:C,emits:[],setup(n,e){const c=t.inject("accordionContext"),r=t.ref(n.title),s=t.ref(n.active);function d(){var i;n.disabled||!((i=c==null?void 0:c.parentProps)!=null&&i.enableFold)||(s.value=!s.value)}function u(i){d()}const m=t.computed(()=>({"f-state-disabled":n.disabled,card:!0,"farris-panel-item":!0,"f-state-selected":s.value})),y=t.computed(()=>!0),o=t.computed(()=>({"f-icon":!0,"f-accordion-collapse":!s.value,"f-accordion-expand":s.value})),a=t.computed(()=>{const i={transition:"height 0.36s ease 0s",height:s.value?`${n.height}px`:0};return s.value||(i.overflow="hidden"),i});return t.onMounted(()=>{var i;(i=c==null?void 0:c.parentProps)!=null&&i.expanded&&(s.value=!0)}),()=>t.createVNode("div",{class:m.value},[t.createVNode("div",{class:"card-header",onClick:u},[t.createVNode("div",{class:"panel-item-title"},[y.value&&t.createVNode("span",null,[r.value]),e.slots.head&&e.slots.head(),t.createVNode("span",{class:o.value},null)]),t.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),t.createVNode("div",{class:"panel-item-clear"},null)]),t.createVNode("div",{style:a.value},[t.createVNode("div",{class:"card-body"},[e.slots.default&&e.slots.default()])])])}}),_=t.defineComponent({name:"FAccordionDesign",props:$,emits:[],setup(n,e){const c=t.computed(()=>({height:n.height?`${n.height}px`:"",width:n.width?`${n.width}px`:""})),r=t.computed(()=>{const m=n.customClass.split(" "),y={"farris-panel":!0,accordion:!0};return m.reduce((o,a)=>(o[a]=!0,o),y),y}),s=t.ref(),d=t.inject("design-item-context"),u=P.useDesignerComponent(s,d);return t.onMounted(()=>{s.value.componentInstance=u}),e.expose(u.value),()=>t.createVNode("div",{ref:s,class:r.value,style:c.value},[e.slots.default&&e.slots.default()])}}),G=t.defineComponent({name:"FAccordionItemDesign",props:C,emits:[],setup(n,e){const c=t.ref(n.title),r=t.ref(!1),s=t.ref(!1);function d(){r.value=!r.value}function u(b){d()}const m=t.computed(()=>({"f-state-disable":s.value,card:!0,"farris-panel-item":!0,"f-state-selected":r.value})),y=t.computed(()=>!0),o=t.computed(()=>!1),a=t.computed(()=>({"f-icon":!0,"f-accordion-collapse":!r.value,"f-accordion-expand":r.value})),i=t.computed(()=>{const b={transition:"height 0.36s ease 0s",height:r.value?`${n.height}px`:0};return r.value||(b.overflow="hidden"),b});function l(){return!0}function f(){return!1}function h(){return!0}return e.expose({canMove:l(),canSelectParent:f(),canDelete:h(),canNested:!0}),()=>t.createVNode("div",{class:m.value},[t.createVNode("div",{class:"card-header",onClick:u},[t.createVNode("div",{class:"panel-item-title"},[y.value&&t.createVNode("span",null,[c.value]),o.value&&e.slots.head&&e.slots.head(),t.createVNode("span",{class:a.value},null)]),t.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),t.createVNode("div",{class:"panel-item-clear"},null)]),t.createVNode("div",{style:i.value},[t.createVNode("div",{class:"card-body drag-container"},[e.slots.default&&e.slots.default()])])])}});g.install=n=>{n.component(g.name,g),n.component(N.name,N)},g.register=(n,e,c,r)=>{n.accordion=g,n["accordion-item"]=N,e.accordion=V,e["accordion-item"]=j},g.registerDesigner=(n,e,c)=>{n.accordion=_,n["accordion-item"]=G,e.accordion=V,e["accordion-item"]=j},p.FAccordion=g,p.FAccordionItem=N,p.accordionItemProps=C,p.accordionItemPropsResolver=j,p.accordionProps=$,p.accordionPropsResolver=V,p.default=g,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|