@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- 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.esm.js +343 -325
- 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 +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- 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 +27 -27
- 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 +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- 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 +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- 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 +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- 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 +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- 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 +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- 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/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -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/data-grid/index.d.ts +5 -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 +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- 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 +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- 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/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- 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/tags/index.d.ts +36 -5
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { defineComponent as C, computed as
|
|
1
|
+
import { defineComponent as C, computed as h, provide as E, createVNode as d, inject as I, ref as y, onMounted as O } from "vue";
|
|
2
2
|
import { cloneDeep as R } from "lodash-es";
|
|
3
3
|
import { resolveAppearance as M, createPropsResolver as S } from "../dynamic-resolver/index.esm.js";
|
|
4
4
|
import { useDesignerComponent as T } from "../designer-canvas/index.esm.js";
|
|
5
5
|
const B = {}, V = {};
|
|
6
6
|
function P(t) {
|
|
7
|
-
const { properties: e, title: i } = t,
|
|
8
|
-
return
|
|
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 ? P(e[u]) : R(e[u].default)), a), {});
|
|
8
|
+
return (!s || !n.find((a) => a == "id")) && (p.id = `${i}-${Date.now()}`), p;
|
|
9
9
|
}
|
|
10
10
|
function q(t, e) {
|
|
11
11
|
const i = P(e);
|
|
12
|
-
return Object.keys(t).reduce((
|
|
12
|
+
return Object.keys(t).reduce((n, s) => (n[s] && typeof n[s] == "object" ? Object.assign(n[s], t[s]) : n[s] = t[s], n), i), i;
|
|
13
13
|
}
|
|
14
14
|
function x(t, e) {
|
|
15
|
-
return Object.keys(t).filter((
|
|
16
|
-
if (e.has(
|
|
17
|
-
const
|
|
18
|
-
if (typeof
|
|
19
|
-
|
|
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
29
|
function z(t, e, i = /* @__PURE__ */ new Map()) {
|
|
30
|
-
const
|
|
31
|
-
return x(
|
|
30
|
+
const n = q(t, e);
|
|
31
|
+
return x(n, i);
|
|
32
32
|
}
|
|
33
33
|
function H(t = {}) {
|
|
34
|
-
function e(
|
|
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((D) => u(D, c));
|
|
83
|
+
return l ? !w.includes(!1) : w.includes(!0);
|
|
84
84
|
}
|
|
85
|
-
return { parseValueSchema:
|
|
85
|
+
return { parseValueSchema: m };
|
|
86
86
|
}
|
|
87
87
|
const L = {}, G = {};
|
|
88
88
|
H();
|
|
89
|
-
function J(t, e, i = /* @__PURE__ */ new Map(),
|
|
90
|
-
return B[e.title] = e, V[e.title] =
|
|
91
|
-
const
|
|
92
|
-
return Object.assign(
|
|
89
|
+
function J(t, e, i = /* @__PURE__ */ new Map(), n = (a, u, m) => u, s = {}, p = (a) => a) {
|
|
90
|
+
return B[e.title] = e, V[e.title] = n, L[e.title] = s, G[e.title] = p, (a = {}) => {
|
|
91
|
+
const u = z(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
95
|
const F = /* @__PURE__ */ new Map([
|
|
@@ -208,22 +208,22 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
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
|
E("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
|
}
|
|
@@ -276,60 +276,60 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
276
276
|
type: ue,
|
|
277
277
|
properties: de,
|
|
278
278
|
required: pe
|
|
279
|
-
},
|
|
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
|
-
}, k = S(
|
|
285
|
+
}, k = S(A, fe, F), $ = /* @__PURE__ */ C({
|
|
286
286
|
name: "FAccordionItem",
|
|
287
|
-
props:
|
|
287
|
+
props: A,
|
|
288
288
|
emits: [],
|
|
289
289
|
setup(t, e) {
|
|
290
|
-
const i = I("accordionContext"),
|
|
291
|
-
function
|
|
290
|
+
const i = I("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
314
|
return O(() => {
|
|
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
|
}
|
|
@@ -338,82 +338,82 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
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
|
-
}),
|
|
349
|
+
return u.reduce((o, c) => (o[c] = !0, o), m), m;
|
|
350
|
+
}), s = y(), p = I("design-item-context"), a = T(s, p);
|
|
351
351
|
return O(() => {
|
|
352
|
-
|
|
353
|
-
}), e.expose(
|
|
354
|
-
ref:
|
|
355
|
-
class:
|
|
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
|
}), he = /* @__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,7 +421,7 @@ 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,
|
|
424
|
+
b.register = (t, e, i, n) => {
|
|
425
425
|
t.accordion = b, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] = k;
|
|
426
426
|
};
|
|
427
427
|
b.registerDesigner = (t, e, i) => {
|
|
@@ -430,7 +430,7 @@ b.registerDesigner = (t, e, i) => {
|
|
|
430
430
|
export {
|
|
431
431
|
b as FAccordion,
|
|
432
432
|
$ as FAccordionItem,
|
|
433
|
-
|
|
433
|
+
A as accordionItemProps,
|
|
434
434
|
k as accordionItemPropsResolver,
|
|
435
435
|
j as accordionProps,
|
|
436
436
|
N as accordionPropsResolver,
|
|
@@ -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,P,V,v){"use strict";const F={},k={};function I(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?I(e[u]):P.cloneDeep(e[u].default)),d),{});return(!r||!o.find(d=>d=="id"))&&(p.id=`${c}-${Date.now()}`),p}function q(t,e){const c=I(e);return Object.keys(t).reduce((o,r)=>(o[r]&&typeof o[r]=="object"?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],y=i[m];if(m==="not")return Number(l[s].length)!==Number(y);if(m==="moreThan")return Number(l[s].length)>=Number(y);if(m==="lessThan")return Number(l[s].length)<=Number(y)}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,y=a[l];return{target:i,operator:"getProperty",param:m,value:y}}):[]}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,y)=>m&&d(y,a),!0)}function h(s,a){const i=Object.keys(s),l=i.includes("allOf"),m=i.includes("anyOf"),y=l||m,O=(y?s[y?l?"allOf":"anyOf":"allOf"]:[s]).map(G=>u(G,a));return l?!O.includes(!1):O.includes(!0)}return{parseValueSchema:h}}const T={},E={};S();function R(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,E[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 w=new Map([["appearance",V.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}},j=R($,B,w,z,x),g=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}},A=V.createPropsResolver(C,H,w),N=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 y(){return!0}return e.expose({canMove:l(),canSelectParent:m(),canDelete:y(),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()])])])}});g.install=t=>{t.component(g.name,g),t.component(N.name,N)},g.register=(t,e,c,o)=>{t.accordion=g,t["accordion-item"]=N,e.accordion=j,e["accordion-item"]=A},g.registerDesigner=(t,e,c)=>{t.accordion=L,t["accordion-item"]=_,e.accordion=j,e["accordion-item"]=A},f.FAccordion=g,f.FAccordionItem=N,f.accordionItemProps=C,f.accordionItemPropsResolver=A,f.accordionProps=$,f.accordionPropsResolver=j,f.default=g,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|