@farris/ui-vue 1.2.6 → 1.2.8
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 +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- 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/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.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/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,41 +1,41 @@
|
|
|
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 E, createVNode as u, inject as I, ref as y, onMounted as O } from "vue";
|
|
2
|
+
import { cloneDeep as R } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as M, createPropsResolver as S } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import { useDesignerComponent as T } from "../designer-canvas/index.esm.js";
|
|
5
|
+
const B = {}, V = {};
|
|
6
|
+
function P(t) {
|
|
7
|
+
const { properties: e, title: i } = t, o = Object.keys(e).reduce((n, l) => (n[l] = e[l].type === "object" && e[l].properties ? P(e[l]) : R(e[l].default), n), {});
|
|
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, n) => (o[n] && typeof o[n] == "object" ? Object.assign(o[n], t[n]) : o[n] = t[n], o), i), i;
|
|
13
|
+
}
|
|
14
|
+
function x(t, e) {
|
|
15
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, n) => {
|
|
16
|
+
if (e.has(n)) {
|
|
17
|
+
const l = e.get(n);
|
|
18
18
|
if (typeof l == "string")
|
|
19
|
-
|
|
19
|
+
o[l] = t[n];
|
|
20
20
|
else {
|
|
21
|
-
const d = l(
|
|
22
|
-
Object.assign(
|
|
21
|
+
const d = l(n, t[n], t);
|
|
22
|
+
Object.assign(o, d);
|
|
23
23
|
}
|
|
24
24
|
} else
|
|
25
|
-
n
|
|
26
|
-
return
|
|
25
|
+
o[n] = t[n];
|
|
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(s,
|
|
35
|
-
if (typeof
|
|
36
|
-
return a[s].length ===
|
|
37
|
-
if (typeof
|
|
38
|
-
const p = Object.keys(
|
|
33
|
+
function H(t = {}) {
|
|
34
|
+
function e(s, c, r, a) {
|
|
35
|
+
if (typeof r == "number")
|
|
36
|
+
return a[s].length === r;
|
|
37
|
+
if (typeof r == "object") {
|
|
38
|
+
const p = Object.keys(r)[0], h = r[p];
|
|
39
39
|
if (p === "not")
|
|
40
40
|
return Number(a[s].length) !== Number(h);
|
|
41
41
|
if (p === "moreThan")
|
|
@@ -45,60 +45,60 @@ function z(t = {}) {
|
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
47
|
}
|
|
48
|
-
function i(s,
|
|
49
|
-
return a[s] && a[s].propertyValue && String(a[s].propertyValue.value) === String(
|
|
48
|
+
function i(s, c, r, a) {
|
|
49
|
+
return a[s] && a[s].propertyValue && String(a[s].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((s,
|
|
56
|
-
function
|
|
57
|
-
const
|
|
58
|
-
return typeof
|
|
55
|
+
Object.keys(t).reduce((s, c) => (s.set(c, t[c]), s), o);
|
|
56
|
+
function n(s, c) {
|
|
57
|
+
const r = s;
|
|
58
|
+
return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param: s, 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
65
|
function l(s) {
|
|
66
|
-
return Object.keys(s).reduce((
|
|
67
|
-
const p =
|
|
68
|
-
return
|
|
66
|
+
return Object.keys(s).reduce((r, a) => {
|
|
67
|
+
const p = n(a, s[a]);
|
|
68
|
+
return r.push(...p), r;
|
|
69
69
|
}, []);
|
|
70
70
|
}
|
|
71
|
-
function d(s,
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
return
|
|
71
|
+
function d(s, c) {
|
|
72
|
+
if (o.has(s.operator)) {
|
|
73
|
+
const r = o.get(s.operator);
|
|
74
|
+
return r && r(s.target, s.param, s.value, c) || !1;
|
|
75
75
|
}
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
|
-
function f(s,
|
|
79
|
-
return l(s).reduce((p, h) => p && d(h,
|
|
78
|
+
function f(s, c) {
|
|
79
|
+
return l(s).reduce((p, h) => p && d(h, c), !0);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
81
|
+
function g(s, c) {
|
|
82
|
+
const r = Object.keys(s), a = r.includes("allOf"), p = r.includes("anyOf"), h = a || p, A = (h ? s[h ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((D) => f(D, c));
|
|
83
83
|
return a ? !A.includes(!1) : A.includes(!0);
|
|
84
84
|
}
|
|
85
|
-
return { parseValueSchema:
|
|
85
|
+
return { parseValueSchema: g };
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
function
|
|
90
|
-
return
|
|
91
|
-
const f =
|
|
92
|
-
return Object.assign(
|
|
87
|
+
const L = {}, G = {};
|
|
88
|
+
H();
|
|
89
|
+
function J(t, e, i = /* @__PURE__ */ new Map(), o = (d, f, g) => f, n = {}, l = (d) => d) {
|
|
90
|
+
return B[e.title] = e, V[e.title] = o, L[e.title] = n, G[e.title] = l, (d = {}) => {
|
|
91
|
+
const f = z(d, e, i), g = Object.keys(t).reduce((s, c) => (s[c] = t[c].default, s), {});
|
|
92
|
+
return Object.assign(g, f);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
["appearance",
|
|
95
|
+
const F = /* @__PURE__ */ new Map([
|
|
96
|
+
["appearance", M],
|
|
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", se = "object", oe = {
|
|
174
174
|
basic: {
|
|
175
175
|
description: "Basic Infomation",
|
|
176
176
|
title: "基本信息",
|
|
@@ -192,18 +192,18 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
title:
|
|
197
|
-
description:
|
|
198
|
-
type:
|
|
199
|
-
categories:
|
|
195
|
+
}, re = {
|
|
196
|
+
title: te,
|
|
197
|
+
description: ne,
|
|
198
|
+
type: se,
|
|
199
|
+
categories: oe
|
|
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
|
-
}, N =
|
|
206
|
+
}, N = J(j, K, F, ee, re), b = /* @__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
|
+
E("accordionContext", {
|
|
216
|
+
parentProps: t
|
|
217
|
+
});
|
|
218
|
+
const o = m(() => {
|
|
219
|
+
const n = t.customClass.split(" "), l = {
|
|
216
220
|
"farris-panel": !0,
|
|
217
221
|
accordion: !0
|
|
218
222
|
};
|
|
219
|
-
return
|
|
223
|
+
return n.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 = S(w, fe, F), $ = /* @__PURE__ */ C({
|
|
282
286
|
name: "FAccordionItem",
|
|
283
287
|
props: w,
|
|
284
288
|
emits: [],
|
|
285
289
|
setup(t, e) {
|
|
286
|
-
const i =
|
|
287
|
-
function
|
|
288
|
-
|
|
290
|
+
const i = I("accordionContext"), o = y(t.title), n = y(t.active);
|
|
291
|
+
function l() {
|
|
292
|
+
var r;
|
|
293
|
+
t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (n.value = !n.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
302
|
"f-state-selected": n.value
|
|
298
|
-
})),
|
|
303
|
+
})), g = m(() => !0), s = m(() => ({
|
|
299
304
|
"f-icon": !0,
|
|
300
305
|
"f-accordion-collapse": !n.value,
|
|
301
306
|
"f-accordion-expand": n.value
|
|
302
|
-
})),
|
|
303
|
-
const
|
|
307
|
+
})), c = m(() => {
|
|
308
|
+
const r = {
|
|
304
309
|
transition: "height 0.36s ease 0s",
|
|
305
310
|
height: n.value ? `${t.height}px` : 0
|
|
306
311
|
};
|
|
307
|
-
return n.value || (
|
|
312
|
+
return n.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 && (n.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
|
+
}, [g.value && u("span", null, [o.value]), e.slots.head && e.slots.head(), u("span", {
|
|
325
|
+
class: s.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
|
-
})),
|
|
337
|
-
const f = t.customClass.split(" "),
|
|
344
|
+
})), o = m(() => {
|
|
345
|
+
const f = t.customClass.split(" "), g = {
|
|
338
346
|
"farris-panel": !0,
|
|
339
347
|
accordion: !0
|
|
340
348
|
};
|
|
341
|
-
return f.reduce((s,
|
|
342
|
-
}),
|
|
343
|
-
return
|
|
344
|
-
|
|
349
|
+
return f.reduce((s, c) => (s[c] = !0, s), g), g;
|
|
350
|
+
}), n = y(), l = I("design-item-context"), d = T(n, l);
|
|
351
|
+
return O(() => {
|
|
352
|
+
n.value.componentInstance = d;
|
|
345
353
|
}), e.expose(d.value), () => u("div", {
|
|
346
|
-
ref:
|
|
347
|
-
class:
|
|
354
|
+
ref: n,
|
|
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 =
|
|
364
|
+
const i = y(t.title), o = y(!1), n = y(!1);
|
|
357
365
|
function l() {
|
|
358
|
-
|
|
366
|
+
o.value = !o.value;
|
|
359
367
|
}
|
|
360
|
-
function d(
|
|
368
|
+
function d(v) {
|
|
361
369
|
l();
|
|
362
370
|
}
|
|
363
371
|
const f = m(() => ({
|
|
364
|
-
"f-state-disable":
|
|
372
|
+
"f-state-disable": n.value,
|
|
365
373
|
card: !0,
|
|
366
374
|
"farris-panel-item": !0,
|
|
367
|
-
"f-state-selected":
|
|
368
|
-
})),
|
|
375
|
+
"f-state-selected": o.value
|
|
376
|
+
})), g = m(() => !0), s = m(() => !1), c = m(() => ({
|
|
369
377
|
"f-icon": !0,
|
|
370
|
-
"f-accordion-collapse": !
|
|
371
|
-
"f-accordion-expand":
|
|
372
|
-
})),
|
|
373
|
-
const
|
|
378
|
+
"f-accordion-collapse": !o.value,
|
|
379
|
+
"f-accordion-expand": o.value
|
|
380
|
+
})), r = m(() => {
|
|
381
|
+
const v = {
|
|
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 || (v.overflow = "hidden"), v;
|
|
378
386
|
});
|
|
379
387
|
function a() {
|
|
380
388
|
return !0;
|
|
@@ -397,34 +405,34 @@ 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
|
-
}, [
|
|
401
|
-
class:
|
|
408
|
+
}, [g.value && u("span", null, [i.value]), s.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()])])]);
|
|
411
419
|
}
|
|
412
420
|
});
|
|
413
|
-
|
|
414
|
-
t.component(
|
|
421
|
+
b.install = (t) => {
|
|
422
|
+
t.component(b.name, b), t.component($.name, $);
|
|
415
423
|
};
|
|
416
|
-
|
|
417
|
-
t.accordion =
|
|
424
|
+
b.register = (t, e, i, o) => {
|
|
425
|
+
t.accordion = b, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] = k;
|
|
418
426
|
};
|
|
419
|
-
|
|
420
|
-
t.accordion =
|
|
427
|
+
b.registerDesigner = (t, e, i) => {
|
|
428
|
+
t.accordion = me, t["accordion-item"] = he, e.accordion = N, e["accordion-item"] = k;
|
|
421
429
|
};
|
|
422
430
|
export {
|
|
423
|
-
|
|
431
|
+
b 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
|
+
b as default
|
|
430
438
|
};
|