@farris/ui-vue 1.2.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +63 -63
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +402 -323
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +98 -96
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +66 -66
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +118 -118
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +539 -460
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +135 -135
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1007 -312
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +97 -97
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +472 -329
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2231 -1055
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +79 -79
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6408 -5034
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4762 -3511
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3442 -2742
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2597 -1141
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +114 -71
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +171 -171
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3075 -2586
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5272 -8511
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1726 -1822
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +126 -126
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +620 -540
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +88 -88
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +71 -71
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3582 -2356
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10752 -8972
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5601 -5329
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +535 -452
- package/components/nav/index.umd.cjs +2 -2
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +556 -477
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +504 -425
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1833 -1054
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +899 -870
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +576 -487
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +73 -73
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +1916 -1220
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +783 -886
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3632 -2556
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +484 -405
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +152 -152
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +73 -73
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1081 -1043
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +753 -738
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4418 -4177
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +119 -119
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +92 -91
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +59 -59
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +103 -103
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +85 -85
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +457 -378
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +1696 -1617
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +53 -53
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +268 -268
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +420 -341
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1062 -981
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +381 -379
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5252 -9560
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3920 -2692
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +373 -367
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +92 -92
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +597 -417
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +251 -251
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +17125 -16176
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +1 -1
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as C, computed as h, provide as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { resolveAppearance as
|
|
4
|
-
import { useDesignerComponent as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
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 ?
|
|
1
|
+
import { defineComponent as C, computed as h, provide as R, createVNode as d, inject as O, ref as y, onMounted as P } from "vue";
|
|
2
|
+
import { isPlainObject as I, cloneDeep as M } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as S, createPropsResolver as T } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import { useDesignerComponent as B } from "../designer-canvas/index.esm.js";
|
|
5
|
+
const q = {}, V = {};
|
|
6
|
+
function F(t) {
|
|
7
|
+
const { properties: e, title: i, ignore: n } = t, s = n && Array.isArray(n), p = Object.keys(e).reduce((a, u) => ((!s || !n.find((m) => m == u)) && (a[u] = e[u].type === "object" && e[u].properties ? F(e[u]) : M(e[u].default)), a), {});
|
|
8
8
|
return (!s || !n.find((a) => a == "id")) && (p.id = `${i}-${Date.now()}`), p;
|
|
9
9
|
}
|
|
10
|
-
function q(t, e) {
|
|
11
|
-
const i = P(e);
|
|
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
|
-
}
|
|
14
10
|
function x(t, e) {
|
|
11
|
+
const i = F(e);
|
|
12
|
+
return Object.keys(t).reduce((n, s) => (n[s] && I(n[s]) && I(t[s]) ? Object.assign(n[s], t[s]) : n[s] = t[s], n), i), i;
|
|
13
|
+
}
|
|
14
|
+
function z(t, e) {
|
|
15
15
|
return Object.keys(t).filter((n) => t[n] != null).reduce((n, s) => {
|
|
16
16
|
if (e.has(s)) {
|
|
17
17
|
const p = e.get(s);
|
|
@@ -26,11 +26,11 @@ function x(t, e) {
|
|
|
26
26
|
return n;
|
|
27
27
|
}, {});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const n =
|
|
31
|
-
return
|
|
29
|
+
function H(t, e, i = /* @__PURE__ */ new Map()) {
|
|
30
|
+
const n = x(t, e);
|
|
31
|
+
return z(n, i);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function L(t = {}) {
|
|
34
34
|
function e(o, c, r, l) {
|
|
35
35
|
if (typeof r == "number")
|
|
36
36
|
return l[o].length === r;
|
|
@@ -79,26 +79,26 @@ function H(t = {}) {
|
|
|
79
79
|
return p(o).reduce((f, g) => f && a(g, c), !0);
|
|
80
80
|
}
|
|
81
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((
|
|
82
|
+
const r = Object.keys(o), l = r.includes("allOf"), f = r.includes("anyOf"), g = l || f, w = (g ? o[g ? l ? "allOf" : "anyOf" : "allOf"] : [o]).map((E) => u(E, c));
|
|
83
83
|
return l ? !w.includes(!1) : w.includes(!0);
|
|
84
84
|
}
|
|
85
85
|
return { parseValueSchema: m };
|
|
86
86
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
function
|
|
90
|
-
return
|
|
91
|
-
const u =
|
|
87
|
+
const G = {}, J = {};
|
|
88
|
+
L();
|
|
89
|
+
function Q(t, e, i = /* @__PURE__ */ new Map(), n = (a, u, m) => u, s = {}, p = (a) => a) {
|
|
90
|
+
return q[e.title] = e, V[e.title] = n, G[e.title] = s, J[e.title] = p, (a = {}) => {
|
|
91
|
+
const u = H(a, e, i), m = Object.keys(t).reduce((o, c) => (o[c] = t[c].default, o), {});
|
|
92
92
|
return Object.assign(m, u);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
["appearance",
|
|
95
|
+
const N = /* @__PURE__ */ new Map([
|
|
96
|
+
["appearance", S],
|
|
97
97
|
["size", (t, e) => {
|
|
98
98
|
const i = {};
|
|
99
99
|
return e.width && (i.width = Number(e.width)), e.height && (i.height = Number(e.height)), i;
|
|
100
100
|
}]
|
|
101
|
-
]),
|
|
101
|
+
]), U = "https://json-schema.org/draft/2020-12/schema", W = "https://farris-design.gitee.io/accordion.schema.json", X = "accordion", Y = "A Farris Container Component", Z = "object", _ = {
|
|
102
102
|
id: {
|
|
103
103
|
description: "The unique identifier for a Accordion",
|
|
104
104
|
type: "string"
|
|
@@ -154,23 +154,23 @@ const F = /* @__PURE__ */ new Map([
|
|
|
154
154
|
type: "boolean",
|
|
155
155
|
default: !1
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, K = [
|
|
158
158
|
"id",
|
|
159
159
|
"type",
|
|
160
160
|
"contents"
|
|
161
|
-
],
|
|
162
|
-
$schema:
|
|
163
|
-
$id:
|
|
164
|
-
title:
|
|
165
|
-
description:
|
|
166
|
-
type:
|
|
167
|
-
properties:
|
|
168
|
-
required:
|
|
161
|
+
], ee = {
|
|
162
|
+
$schema: U,
|
|
163
|
+
$id: W,
|
|
164
|
+
title: X,
|
|
165
|
+
description: Y,
|
|
166
|
+
type: Z,
|
|
167
|
+
properties: _,
|
|
168
|
+
required: K
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function te(t, e, i) {
|
|
171
171
|
return e;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const ne = "accordion", se = "A Farris Component", oe = "object", re = {
|
|
174
174
|
basic: {
|
|
175
175
|
description: "Basic Infomation",
|
|
176
176
|
title: "基本信息",
|
|
@@ -192,18 +192,18 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
title:
|
|
197
|
-
description:
|
|
198
|
-
type:
|
|
199
|
-
categories:
|
|
195
|
+
}, ie = {
|
|
196
|
+
title: ne,
|
|
197
|
+
description: se,
|
|
198
|
+
type: oe,
|
|
199
|
+
categories: re
|
|
200
200
|
}, j = {
|
|
201
201
|
customClass: { type: String, default: "" },
|
|
202
202
|
height: { type: Number },
|
|
203
203
|
width: { type: Number },
|
|
204
204
|
enableFold: { type: Boolean, default: !0 },
|
|
205
205
|
expanded: { type: Boolean, default: !1 }
|
|
206
|
-
},
|
|
206
|
+
}, k = Q(j, ee, N, te, ie), b = /* @__PURE__ */ C({
|
|
207
207
|
name: "FAccordion",
|
|
208
208
|
props: j,
|
|
209
209
|
emits: [],
|
|
@@ -212,7 +212,7 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
212
212
|
height: t.height ? `${t.height}px` : "",
|
|
213
213
|
width: t.width ? `${t.width}px` : ""
|
|
214
214
|
}));
|
|
215
|
-
|
|
215
|
+
R("accordionContext", {
|
|
216
216
|
parentProps: t
|
|
217
217
|
});
|
|
218
218
|
const n = h(() => {
|
|
@@ -227,7 +227,7 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
227
227
|
style: i.value
|
|
228
228
|
}, [e.slots.default && e.slots.default()]);
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), ce = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/accordion-item.schema.json", le = "AccordionItem", ue = "A Farris Container Component", de = "object", pe = {
|
|
231
231
|
id: {
|
|
232
232
|
description: "The unique identifier for a Accordion Item",
|
|
233
233
|
type: "string"
|
|
@@ -264,30 +264,30 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
264
264
|
type: "boolean",
|
|
265
265
|
default: !1
|
|
266
266
|
}
|
|
267
|
-
},
|
|
267
|
+
}, fe = [
|
|
268
268
|
"id",
|
|
269
269
|
"type",
|
|
270
270
|
"contents"
|
|
271
|
-
],
|
|
272
|
-
$schema:
|
|
273
|
-
$id:
|
|
274
|
-
title:
|
|
275
|
-
description:
|
|
276
|
-
type:
|
|
277
|
-
properties:
|
|
278
|
-
required:
|
|
271
|
+
], me = {
|
|
272
|
+
$schema: ce,
|
|
273
|
+
$id: ae,
|
|
274
|
+
title: le,
|
|
275
|
+
description: ue,
|
|
276
|
+
type: de,
|
|
277
|
+
properties: pe,
|
|
278
|
+
required: fe
|
|
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
|
-
},
|
|
285
|
+
}, D = T(A, me, N), $ = /* @__PURE__ */ C({
|
|
286
286
|
name: "FAccordionItem",
|
|
287
287
|
props: A,
|
|
288
288
|
emits: [],
|
|
289
289
|
setup(t, e) {
|
|
290
|
-
const i =
|
|
290
|
+
const i = O("accordionContext"), n = y(t.title), s = y(t.active);
|
|
291
291
|
function p() {
|
|
292
292
|
var r;
|
|
293
293
|
t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (s.value = !s.value);
|
|
@@ -311,7 +311,7 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
311
311
|
};
|
|
312
312
|
return s.value || (r.overflow = "hidden"), r;
|
|
313
313
|
});
|
|
314
|
-
return
|
|
314
|
+
return P(() => {
|
|
315
315
|
var r;
|
|
316
316
|
(r = i == null ? void 0 : i.parentProps) != null && r.expanded && (s.value = !0);
|
|
317
317
|
}), () => d("div", {
|
|
@@ -333,7 +333,7 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
333
333
|
class: "card-body"
|
|
334
334
|
}, [e.slots.default && e.slots.default()])])]);
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
336
|
+
}), he = /* @__PURE__ */ C({
|
|
337
337
|
name: "FAccordionDesign",
|
|
338
338
|
props: j,
|
|
339
339
|
emits: [],
|
|
@@ -347,8 +347,8 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
347
347
|
accordion: !0
|
|
348
348
|
};
|
|
349
349
|
return u.reduce((o, c) => (o[c] = !0, o), m), m;
|
|
350
|
-
}), s = y(), p =
|
|
351
|
-
return
|
|
350
|
+
}), s = y(), p = O("design-item-context"), a = B(s, p);
|
|
351
|
+
return P(() => {
|
|
352
352
|
s.value.componentInstance = a;
|
|
353
353
|
}), e.expose(a.value), () => d("div", {
|
|
354
354
|
ref: s,
|
|
@@ -356,7 +356,7 @@ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
|
|
|
356
356
|
style: i.value
|
|
357
357
|
}, [e.slots.default && e.slots.default()]);
|
|
358
358
|
}
|
|
359
|
-
}),
|
|
359
|
+
}), ge = /* @__PURE__ */ C({
|
|
360
360
|
name: "FAccordionItemDesign",
|
|
361
361
|
props: A,
|
|
362
362
|
emits: [],
|
|
@@ -422,17 +422,17 @@ b.install = (t) => {
|
|
|
422
422
|
t.component(b.name, b), t.component($.name, $);
|
|
423
423
|
};
|
|
424
424
|
b.register = (t, e, i, n) => {
|
|
425
|
-
t.accordion = b, t["accordion-item"] = $, e.accordion =
|
|
425
|
+
t.accordion = b, t["accordion-item"] = $, e.accordion = k, e["accordion-item"] = D;
|
|
426
426
|
};
|
|
427
427
|
b.registerDesigner = (t, e, i) => {
|
|
428
|
-
t.accordion =
|
|
428
|
+
t.accordion = he, t["accordion-item"] = ge, e.accordion = k, e["accordion-item"] = D;
|
|
429
429
|
};
|
|
430
430
|
export {
|
|
431
431
|
b as FAccordion,
|
|
432
432
|
$ as FAccordionItem,
|
|
433
433
|
A as accordionItemProps,
|
|
434
|
-
|
|
434
|
+
D as accordionItemPropsResolver,
|
|
435
435
|
j as accordionProps,
|
|
436
|
-
|
|
436
|
+
k as accordionPropsResolver,
|
|
437
437
|
b as default
|
|
438
438
|
};
|
|
@@ -1 +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,
|
|
1
|
+
(function(f,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js"],n):(f=typeof globalThis<"u"?globalThis:f||self,n(f.accordion={},f.Vue,f.LodashES,f.dynamicResolver,f.designerCanvas))})(this,function(f,n,N,I,v){"use strict";const F={},k={};function w(t){const{properties:e,title:c,ignore:o}=t,r=o&&Array.isArray(o),p=Object.keys(e).reduce((d,u)=>((!r||!o.find(h=>h==u))&&(d[u]=e[u].type==="object"&&e[u].properties?w(e[u]):N.cloneDeep(e[u].default)),d),{});return(!r||!o.find(d=>d=="id"))&&(p.id=`${c}-${Date.now()}`),p}function q(t,e){const c=w(e);return Object.keys(t).reduce((o,r)=>(o[r]&&N.isPlainObject(o[r])&&N.isPlainObject(t[r])?Object.assign(o[r],t[r]):o[r]=t[r],o),c),c}function D(t,e){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,r)=>{if(e.has(r)){const p=e.get(r);if(typeof p=="string")o[p]=t[r];else{const d=p(r,t[r],t);Object.assign(o,d)}}else o[r]=t[r];return o},{})}function M(t,e,c=new Map){const o=q(t,e);return D(o,c)}function S(t={}){function e(s,a,i,l){if(typeof i=="number")return l[s].length===i;if(typeof i=="object"){const m=Object.keys(i)[0],g=i[m];if(m==="not")return Number(l[s].length)!==Number(g);if(m==="moreThan")return Number(l[s].length)>=Number(g);if(m==="lessThan")return Number(l[s].length)<=Number(g)}return!1}function c(s,a,i,l){return l[s]&&l[s].propertyValue&&String(l[s].propertyValue.value)===String(i)}const o=new Map([["length",e],["getProperty",c]]);Object.keys(t).reduce((s,a)=>(s.set(a,t[a]),s),o);function r(s,a){const i=s;return typeof a=="number"?[{target:i,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:i,operator:"getProperty",param:s,value:!!a}]:typeof a=="object"?Object.keys(a).map(l=>{if(l==="length")return{target:i,operator:"length",param:null,value:a[l]};const m=l,g=a[l];return{target:i,operator:"getProperty",param:m,value:g}}):[]}function p(s){return Object.keys(s).reduce((i,l)=>{const m=r(l,s[l]);return i.push(...m),i},[])}function d(s,a){if(o.has(s.operator)){const i=o.get(s.operator);return i&&i(s.target,s.param,s.value,a)||!1}return!1}function u(s,a){return p(s).reduce((m,g)=>m&&d(g,a),!0)}function h(s,a){const i=Object.keys(s),l=i.includes("allOf"),m=i.includes("anyOf"),g=l||m,P=(g?s[g?l?"allOf":"anyOf":"allOf"]:[s]).map(G=>u(G,a));return l?!P.includes(!1):P.includes(!0)}return{parseValueSchema:h}}const T={},R={};S();function E(t,e,c=new Map,o=(d,u,h)=>u,r={},p=d=>d){return F[e.title]=e,k[e.title]=o,T[e.title]=r,R[e.title]=p,(d={})=>{const u=M(d,e,c),h=Object.keys(t).reduce((s,a)=>(s[a]=t[a].default,s),{});return Object.assign(h,u)}}const O=new Map([["appearance",I.resolveAppearance],["size",(t,e)=>{const c={};return e.width&&(c.width=Number(e.width)),e.height&&(c.height=Number(e.height)),c}]]),B={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion.schema.json",title:"accordion",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion",type:"string"},type:{description:"The type string of Accordion component",type:"string",default:"accordion"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},customClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},enableFold:{description:"",type:"boolean",default:!0},expanded:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]};function z(t,e,c){return e}const x={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},$={customClass:{type:String,default:""},height:{type:Number},width:{type:Number},enableFold:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1}},A=E($,B,O,z,x),y=n.defineComponent({name:"FAccordion",props:$,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""}));n.provide("accordionContext",{parentProps:t});const o=n.computed(()=>{const r=t.customClass.split(" "),p={"farris-panel":!0,accordion:!0};return r.reduce((d,u)=>(d[u]=!0,d),p),p});return()=>n.createVNode("div",{class:o.value,style:c.value},[e.slots.default&&e.slots.default()])}}),H={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion-item.schema.json",title:"AccordionItem",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion Item",type:"string"},type:{description:"The type string of Accordion Item component",type:"string"},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},title:{description:"",type:"string",default:""},disable:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]},C={width:{type:Number},height:{type:Number,default:100},title:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},V=I.createPropsResolver(C,H,O),j=n.defineComponent({name:"FAccordionItem",props:C,emits:[],setup(t,e){const c=n.inject("accordionContext"),o=n.ref(t.title),r=n.ref(t.active);function p(){var i;t.disabled||!((i=c==null?void 0:c.parentProps)!=null&&i.enableFold)||(r.value=!r.value)}function d(i){p()}const u=n.computed(()=>({"f-state-disabled":t.disabled,card:!0,"farris-panel-item":!0,"f-state-selected":r.value})),h=n.computed(()=>!0),s=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!r.value,"f-accordion-expand":r.value})),a=n.computed(()=>{const i={transition:"height 0.36s ease 0s",height:r.value?`${t.height}px`:0};return r.value||(i.overflow="hidden"),i});return n.onMounted(()=>{var i;(i=c==null?void 0:c.parentProps)!=null&&i.expanded&&(r.value=!0)}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[o.value]),e.slots.head&&e.slots.head(),n.createVNode("span",{class:s.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:a.value},[n.createVNode("div",{class:"card-body"},[e.slots.default&&e.slots.default()])])])}}),L=n.defineComponent({name:"FAccordionDesign",props:$,emits:[],setup(t,e){const c=n.computed(()=>({height:t.height?`${t.height}px`:"",width:t.width?`${t.width}px`:""})),o=n.computed(()=>{const u=t.customClass.split(" "),h={"farris-panel":!0,accordion:!0};return u.reduce((s,a)=>(s[a]=!0,s),h),h}),r=n.ref(),p=n.inject("design-item-context"),d=v.useDesignerComponent(r,p);return n.onMounted(()=>{r.value.componentInstance=d}),e.expose(d.value),()=>n.createVNode("div",{ref:r,class:o.value,style:c.value},[e.slots.default&&e.slots.default()])}}),_=n.defineComponent({name:"FAccordionItemDesign",props:C,emits:[],setup(t,e){const c=n.ref(t.title),o=n.ref(!1),r=n.ref(!1);function p(){o.value=!o.value}function d(b){p()}const u=n.computed(()=>({"f-state-disable":r.value,card:!0,"farris-panel-item":!0,"f-state-selected":o.value})),h=n.computed(()=>!0),s=n.computed(()=>!1),a=n.computed(()=>({"f-icon":!0,"f-accordion-collapse":!o.value,"f-accordion-expand":o.value})),i=n.computed(()=>{const b={transition:"height 0.36s ease 0s",height:o.value?`${t.height}px`:0};return o.value||(b.overflow="hidden"),b});function l(){return!0}function m(){return!1}function g(){return!0}return e.expose({canMove:l(),canSelectParent:m(),canDelete:g(),canNested:!0}),()=>n.createVNode("div",{class:u.value},[n.createVNode("div",{class:"card-header",onClick:d},[n.createVNode("div",{class:"panel-item-title"},[h.value&&n.createVNode("span",null,[c.value]),s.value&&e.slots.head&&e.slots.head(),n.createVNode("span",{class:a.value},null)]),n.createVNode("div",{class:"panel-item-tool"},[e.slots.toolbar&&e.slots.toolbar()]),n.createVNode("div",{class:"panel-item-clear"},null)]),n.createVNode("div",{style:i.value},[n.createVNode("div",{class:"card-body drag-container"},[e.slots.default&&e.slots.default()])])])}});y.install=t=>{t.component(y.name,y),t.component(j.name,j)},y.register=(t,e,c,o)=>{t.accordion=y,t["accordion-item"]=j,e.accordion=A,e["accordion-item"]=V},y.registerDesigner=(t,e,c)=>{t.accordion=L,t["accordion-item"]=_,e.accordion=A,e["accordion-item"]=V},f.FAccordion=y,f.FAccordionItem=j,f.accordionItemProps=C,f.accordionItemPropsResolver=V,f.accordionProps=$,f.accordionPropsResolver=A,f.default=y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|