@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
|
@@ -2,34 +2,34 @@ import { defineComponent as Z, ref as r, onMounted as J, computed as W, watch as
|
|
|
2
2
|
import { cloneDeep as ae } from "lodash-es";
|
|
3
3
|
const K = {}, x = {};
|
|
4
4
|
function Q(t) {
|
|
5
|
-
const { properties: e, title: a } = t, n = Object.keys(e).reduce((
|
|
5
|
+
const { properties: e, title: a } = t, n = Object.keys(e).reduce((i, y) => (i[y] = e[y].type === "object" && e[y].properties ? Q(e[y]) : ae(e[y].default), i), {});
|
|
6
6
|
return n.id = `${a}-${Date.now()}`, n;
|
|
7
7
|
}
|
|
8
8
|
function G(t, e = {}) {
|
|
9
9
|
const a = K[t];
|
|
10
10
|
if (a) {
|
|
11
11
|
let n = Q(a);
|
|
12
|
-
const
|
|
13
|
-
return n =
|
|
12
|
+
const i = x[t];
|
|
13
|
+
return n = i ? i({ getSchemaByType: G }, n, e) : n, n;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function le(t, e) {
|
|
18
18
|
const a = Q(e);
|
|
19
|
-
return Object.keys(t).reduce((n,
|
|
19
|
+
return Object.keys(t).reduce((n, i) => (n[i] && typeof n[i] == "object" ? Object.assign(n[i], t[i]) : n[i] = t[i], n), a), a;
|
|
20
20
|
}
|
|
21
21
|
function re(t, e) {
|
|
22
|
-
return Object.keys(t).filter((n) => t[n] != null).reduce((n,
|
|
23
|
-
if (e.has(
|
|
24
|
-
const y = e.get(
|
|
22
|
+
return Object.keys(t).filter((n) => t[n] != null).reduce((n, i) => {
|
|
23
|
+
if (e.has(i)) {
|
|
24
|
+
const y = e.get(i);
|
|
25
25
|
if (typeof y == "string")
|
|
26
|
-
n[y] = t[
|
|
26
|
+
n[y] = t[i];
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(n,
|
|
28
|
+
const O = y(i, t[i], t);
|
|
29
|
+
Object.assign(n, O);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
n[
|
|
32
|
+
n[i] = t[i];
|
|
33
33
|
return n;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
@@ -38,64 +38,64 @@ function ne(t, e, a = /* @__PURE__ */ new Map()) {
|
|
|
38
38
|
return re(n, a);
|
|
39
39
|
}
|
|
40
40
|
function oe(t = {}) {
|
|
41
|
-
function e(l, s,
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const h = Object.keys(
|
|
41
|
+
function e(l, s, p, f) {
|
|
42
|
+
if (typeof p == "number")
|
|
43
|
+
return f[l].length === p;
|
|
44
|
+
if (typeof p == "object") {
|
|
45
|
+
const h = Object.keys(p)[0], b = p[h];
|
|
46
46
|
if (h === "not")
|
|
47
|
-
return Number(
|
|
47
|
+
return Number(f[l].length) !== Number(b);
|
|
48
48
|
if (h === "moreThan")
|
|
49
|
-
return Number(
|
|
49
|
+
return Number(f[l].length) >= Number(b);
|
|
50
50
|
if (h === "lessThan")
|
|
51
|
-
return Number(
|
|
51
|
+
return Number(f[l].length) <= Number(b);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function a(l, s,
|
|
56
|
-
return
|
|
55
|
+
function a(l, s, p, f) {
|
|
56
|
+
return f[l] && f[l].propertyValue && String(f[l].propertyValue.value) === String(p);
|
|
57
57
|
}
|
|
58
58
|
const n = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", e],
|
|
60
60
|
["getProperty", a]
|
|
61
61
|
]);
|
|
62
62
|
Object.keys(t).reduce((l, s) => (l.set(s, t[s]), l), n);
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
return typeof s == "number" ? [{ target:
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const h =
|
|
69
|
-
return { target:
|
|
63
|
+
function i(l, s) {
|
|
64
|
+
const p = l;
|
|
65
|
+
return typeof s == "number" ? [{ target: p, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: p, operator: "getProperty", param: l, value: !!s }] : typeof s == "object" ? Object.keys(s).map((f) => {
|
|
66
|
+
if (f === "length")
|
|
67
|
+
return { target: p, operator: "length", param: null, value: s[f] };
|
|
68
|
+
const h = f, b = s[f];
|
|
69
|
+
return { target: p, operator: "getProperty", param: h, value: b };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
72
|
function y(l) {
|
|
73
|
-
return Object.keys(l).reduce((
|
|
74
|
-
const h =
|
|
75
|
-
return
|
|
73
|
+
return Object.keys(l).reduce((p, f) => {
|
|
74
|
+
const h = i(f, l[f]);
|
|
75
|
+
return p.push(...h), p;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function O(l, s) {
|
|
79
79
|
if (n.has(l.operator)) {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
80
|
+
const p = n.get(l.operator);
|
|
81
|
+
return p && p(l.target, l.param, l.value, s) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
85
|
function w(l, s) {
|
|
86
|
-
return y(l).reduce((h, b) => h &&
|
|
86
|
+
return y(l).reduce((h, b) => h && O(b, s), !0);
|
|
87
87
|
}
|
|
88
88
|
function C(l, s) {
|
|
89
|
-
const
|
|
90
|
-
return
|
|
89
|
+
const p = Object.keys(l), f = p.includes("allOf"), h = p.includes("anyOf"), b = f || h, S = (b ? l[b ? f ? "allOf" : "anyOf" : "allOf"] : [l]).map((d) => w(d, s));
|
|
90
|
+
return f ? !S.includes(!1) : S.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: C };
|
|
93
93
|
}
|
|
94
94
|
const se = {}, ue = {};
|
|
95
95
|
oe();
|
|
96
|
-
function ie(t, e, a = /* @__PURE__ */ new Map(), n = (
|
|
97
|
-
return K[e.title] = e, x[e.title] = n, se[e.title] =
|
|
98
|
-
const w = ne(
|
|
96
|
+
function ie(t, e, a = /* @__PURE__ */ new Map(), n = (O, w, C) => w, i = {}, y = (O) => O) {
|
|
97
|
+
return K[e.title] = e, x[e.title] = n, se[e.title] = i, ue[e.title] = y, (O = {}) => {
|
|
98
|
+
const w = ne(O, e, a), C = Object.keys(t).reduce((l, s) => (l[s] = t[s].default, l), {});
|
|
99
99
|
return Object.assign(C, w);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -181,7 +181,7 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
181
181
|
type: ye,
|
|
182
182
|
properties: he,
|
|
183
183
|
required: be
|
|
184
|
-
}, Me = "rate",
|
|
184
|
+
}, Me = "rate", Oe = "A Farris Component", Te = "object", ke = {
|
|
185
185
|
basic: {
|
|
186
186
|
description: "Basic Infomation",
|
|
187
187
|
title: "基本信息",
|
|
@@ -205,8 +205,8 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
205
205
|
}
|
|
206
206
|
}, De = {
|
|
207
207
|
title: Me,
|
|
208
|
-
description:
|
|
209
|
-
type:
|
|
208
|
+
description: Oe,
|
|
209
|
+
type: Te,
|
|
210
210
|
categories: ke
|
|
211
211
|
}, Ne = ["很不满意", "不满意", "一般", "满意", "非常满意"], U = {
|
|
212
212
|
/** 星星大小 */
|
|
@@ -245,10 +245,10 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
245
245
|
props: U,
|
|
246
246
|
emits: ["selectedValue", "update:modelValue"],
|
|
247
247
|
setup(t, e) {
|
|
248
|
-
const a = r(t.size), n = r(t.enableHalf),
|
|
248
|
+
const a = r(t.size), n = r(t.enableHalf), i = r(t.enableClear), y = r(t.disabled), O = r(t.pointSystem), w = r(t.lightColor), C = r(t.darkColor), l = r(t.iconClass), s = r(t.numOfStar), p = r(t.toolTipDisabled), f = r(t.toolTipContents), h = r(t.enableScore), b = r(t.enableSatisfaction);
|
|
249
249
|
let v;
|
|
250
|
-
const M = r(0), S = r(0),
|
|
251
|
-
let D = 1, j,
|
|
250
|
+
const M = r(0), S = r(0), T = r(0), d = r(t.modelValue);
|
|
251
|
+
let D = 1, j, c, m;
|
|
252
252
|
const g = 4;
|
|
253
253
|
J(() => {
|
|
254
254
|
});
|
|
@@ -262,7 +262,7 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
262
262
|
}
|
|
263
263
|
function P() {
|
|
264
264
|
let u;
|
|
265
|
-
n.value ? u = Math.ceil(
|
|
265
|
+
n.value ? u = Math.ceil(d.value / D) : u = d.value, S.value = (v * d.value + Math.floor(d.value) * g) / D, j = f.value[u - 1];
|
|
266
266
|
}
|
|
267
267
|
function R() {
|
|
268
268
|
switch (a.value) {
|
|
@@ -279,25 +279,25 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
279
279
|
v = 24;
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
|
-
E(), s.value && (D =
|
|
282
|
+
E(), s.value && (D = O.value / s.value), d.value && P();
|
|
283
283
|
}
|
|
284
284
|
R();
|
|
285
285
|
function L(u) {
|
|
286
286
|
return u.className.indexOf("f-icon") !== -1;
|
|
287
287
|
}
|
|
288
288
|
function H() {
|
|
289
|
-
return M.value === S.value &&
|
|
289
|
+
return M.value === S.value && i.value && S.value !== 0 ? (S.value = 0, d.value = 0, c = null, M.value = 0, T.value = 0, e.emit("selectedValue", d.value), e.emit("update:modelValue", d.value), !0) : !1;
|
|
290
290
|
}
|
|
291
291
|
function q(u, N, o) {
|
|
292
292
|
if (u.movementX || u.movementY) {
|
|
293
293
|
if (y.value)
|
|
294
294
|
return;
|
|
295
|
-
b.value && (j =
|
|
295
|
+
b.value && (j = f.value[N - 1]), u.offsetX < v / 2 && n.value === !0 ? (M.value = v * N - v / 2 + g * (N - 1), T.value = D * N - D / 2) : (M.value = v * N + g * (N - 1), T.value = D * N);
|
|
296
296
|
}
|
|
297
297
|
if (o === !0) {
|
|
298
298
|
if (H())
|
|
299
299
|
return;
|
|
300
|
-
|
|
300
|
+
d.value = T.value, S.value = M.value, c = j, e.emit("update:modelValue", d.value), e.emit("selectedValue", d.value);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
function F(u, N) {
|
|
@@ -307,14 +307,14 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
307
307
|
q(u, V, N);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
const X = W(() =>
|
|
310
|
+
const X = W(() => T.value ? T.value + "分" : d.value + "分"), _ = W(() => ({
|
|
311
311
|
width: (M.value || S.value) + "px"
|
|
312
312
|
}));
|
|
313
313
|
function B() {
|
|
314
314
|
M.value = 0;
|
|
315
315
|
}
|
|
316
316
|
return ee(() => t.modelValue, (u) => {
|
|
317
|
-
|
|
317
|
+
d.value = u, P();
|
|
318
318
|
}), () => k("div", {
|
|
319
319
|
class: "farris-star-rating",
|
|
320
320
|
onMouseover: A((u) => F(u, !1), ["prevent"]),
|
|
@@ -334,7 +334,7 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
334
334
|
}, {
|
|
335
335
|
"f-star-exlarge": a.value === "extraLarge"
|
|
336
336
|
}, {
|
|
337
|
-
disabled:
|
|
337
|
+
disabled: p.value
|
|
338
338
|
}],
|
|
339
339
|
id: u.id,
|
|
340
340
|
style: {
|
|
@@ -372,14 +372,14 @@ const de = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-
|
|
|
372
372
|
}, {
|
|
373
373
|
"font-exlarge": a.value === "extraLarge"
|
|
374
374
|
}]
|
|
375
|
-
}, [h.value && k("span", null, [$(" "), X.value, $(" ")]), b.value && (
|
|
375
|
+
}, [h.value && k("span", null, [$(" "), X.value, $(" ")]), b.value && (c || j) && k("span", null, [$(" "), j || c])])]);
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
function Ve(t, e, a) {
|
|
379
379
|
var j;
|
|
380
380
|
function n() {
|
|
381
381
|
}
|
|
382
|
-
const
|
|
382
|
+
const i = "", y = "", O = r();
|
|
383
383
|
function w() {
|
|
384
384
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
385
385
|
}
|
|
@@ -392,19 +392,19 @@ function Ve(t, e, a) {
|
|
|
392
392
|
function s() {
|
|
393
393
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (!
|
|
395
|
+
function p(c) {
|
|
396
|
+
if (!c || !c.value)
|
|
397
397
|
return null;
|
|
398
|
-
if (
|
|
399
|
-
return
|
|
400
|
-
const m = r(
|
|
398
|
+
if (c.value.schema && c.value.schema.type === "component")
|
|
399
|
+
return c.value;
|
|
400
|
+
const m = r(c == null ? void 0 : c.value.parent), g = p(m);
|
|
401
401
|
return g || null;
|
|
402
402
|
}
|
|
403
|
-
function c
|
|
404
|
-
const { componentInstance: m, designerItemElementRef: g } =
|
|
405
|
-
return !m || !m.value ? null : m.value.canMove ? g : c
|
|
403
|
+
function f(c = e) {
|
|
404
|
+
const { componentInstance: m, designerItemElementRef: g } = c;
|
|
405
|
+
return !m || !m.value ? null : m.value.canMove ? g : f(c.parent);
|
|
406
406
|
}
|
|
407
|
-
function h(
|
|
407
|
+
function h(c) {
|
|
408
408
|
return !!a;
|
|
409
409
|
}
|
|
410
410
|
function b() {
|
|
@@ -412,26 +412,26 @@ function Ve(t, e, a) {
|
|
|
412
412
|
}
|
|
413
413
|
function v() {
|
|
414
414
|
}
|
|
415
|
-
function M(
|
|
415
|
+
function M(c, m) {
|
|
416
416
|
}
|
|
417
|
-
function S(
|
|
418
|
-
const { componentType: m } =
|
|
419
|
-
let g = G(m,
|
|
417
|
+
function S(c) {
|
|
418
|
+
const { componentType: m } = c;
|
|
419
|
+
let g = G(m, c);
|
|
420
420
|
const E = m.toLowerCase().replace("-", "_");
|
|
421
421
|
return g && !g.id && g.type === m && (g.id = `${E}_${Math.random().toString().slice(2, 6)}`), g;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
const g = String(
|
|
425
|
-
P.parentComponentInstance =
|
|
423
|
+
function T(c, m) {
|
|
424
|
+
const g = String(c.getAttribute("data-controltype")), E = c.getAttribute("data-feature"), P = E ? JSON.parse(E) : {};
|
|
425
|
+
P.parentComponentInstance = O.value;
|
|
426
426
|
let R = G(g, P);
|
|
427
427
|
const L = g.toLowerCase().replace("-", "_");
|
|
428
428
|
return R && !R.id && R.type === g && (R.id = `${L}_${Math.random().toString().slice(2, 6)}`), R;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function d(c) {
|
|
431
431
|
}
|
|
432
|
-
function D(...
|
|
432
|
+
function D(...c) {
|
|
433
433
|
}
|
|
434
|
-
return
|
|
434
|
+
return O.value = {
|
|
435
435
|
canMove: w(),
|
|
436
436
|
canSelectParent: C(),
|
|
437
437
|
canDelete: l(),
|
|
@@ -440,34 +440,34 @@ function Ve(t, e, a) {
|
|
|
440
440
|
elementRef: t,
|
|
441
441
|
parent: (j = e == null ? void 0 : e.parent) == null ? void 0 : j.componentInstance,
|
|
442
442
|
schema: e == null ? void 0 : e.schema,
|
|
443
|
-
styles:
|
|
443
|
+
styles: i,
|
|
444
444
|
designerClass: y,
|
|
445
445
|
canAccepts: h,
|
|
446
|
-
getBelongedComponentInstance:
|
|
447
|
-
getDraggableDesignItemElement:
|
|
446
|
+
getBelongedComponentInstance: p,
|
|
447
|
+
getDraggableDesignItemElement: f,
|
|
448
448
|
getDraggingDisplayText: b,
|
|
449
449
|
getPropConfig: D,
|
|
450
450
|
getDragScopeElement: v,
|
|
451
451
|
onAcceptMovedChildElement: M,
|
|
452
|
-
onAcceptNewChildElement:
|
|
453
|
-
onChildElementMovedOut:
|
|
452
|
+
onAcceptNewChildElement: T,
|
|
453
|
+
onChildElementMovedOut: d,
|
|
454
454
|
addNewChildComponentSchema: S,
|
|
455
455
|
updateDragAndDropRules: n,
|
|
456
456
|
triggerBelongedComponentToMoveWhenMoved: r(!1),
|
|
457
457
|
triggerBelongedComponentToDeleteWhenDeleted: r(!1)
|
|
458
|
-
},
|
|
458
|
+
}, O;
|
|
459
459
|
}
|
|
460
460
|
const je = /* @__PURE__ */ Z({
|
|
461
461
|
name: "FRateDesign",
|
|
462
462
|
props: U,
|
|
463
463
|
emits: ["selectedValue"],
|
|
464
464
|
setup(t, e) {
|
|
465
|
-
const a = r(t.size), n = r(t.enableHalf),
|
|
465
|
+
const a = r(t.size), n = r(t.enableHalf), i = r(t.enableClear), y = r(t.disabled), O = r(t.pointSystem), w = r(t.lightColor), C = r(t.darkColor), l = r(t.iconClass), s = r(t.numOfStar), p = r(t.toolTipDisabled), f = r(t.toolTipContents), h = r(t.enableScore), b = r(t.enableSatisfaction);
|
|
466
466
|
let v;
|
|
467
467
|
const M = r(1);
|
|
468
468
|
let S = 0;
|
|
469
|
-
const
|
|
470
|
-
let D = 1, j,
|
|
469
|
+
const T = r(0), d = r(0);
|
|
470
|
+
let D = 1, j, c, m;
|
|
471
471
|
const g = 4, E = r(), P = te("design-item-context"), R = Ve(E, P);
|
|
472
472
|
J(() => {
|
|
473
473
|
E.value.componentInstance = R;
|
|
@@ -483,7 +483,7 @@ const je = /* @__PURE__ */ Z({
|
|
|
483
483
|
}
|
|
484
484
|
function H() {
|
|
485
485
|
let o;
|
|
486
|
-
n.value ? o = Math.ceil(
|
|
486
|
+
n.value ? o = Math.ceil(d.value / D) : o = d.value, S = (v * d.value + Math.floor(d.value) * g) / D, j = f.value[o - 1];
|
|
487
487
|
}
|
|
488
488
|
function q() {
|
|
489
489
|
switch (a.value) {
|
|
@@ -500,25 +500,25 @@ const je = /* @__PURE__ */ Z({
|
|
|
500
500
|
v = 24;
|
|
501
501
|
break;
|
|
502
502
|
}
|
|
503
|
-
L(), s.value && (D =
|
|
503
|
+
L(), s.value && (D = O.value / s.value), d.value && H();
|
|
504
504
|
}
|
|
505
505
|
q();
|
|
506
506
|
function F(o) {
|
|
507
507
|
return o.className.indexOf("f-icon") !== -1;
|
|
508
508
|
}
|
|
509
509
|
function X() {
|
|
510
|
-
return M.value === S &&
|
|
510
|
+
return M.value === S && i && S !== 0 ? (S = 0, d.value = 0, c = null, M.value = 0, T.value = 0, e.emit("selectedValue", d.value), !0) : !1;
|
|
511
511
|
}
|
|
512
512
|
function _(o, V, Y) {
|
|
513
513
|
if (o.movementX || o.movementY) {
|
|
514
514
|
if (y.value)
|
|
515
515
|
return;
|
|
516
|
-
b.value && (j =
|
|
516
|
+
b.value && (j = f.value[V - 1]), o.offsetX < v / 2 && n.value === !0 ? (M.value = v * V - v / 2 + g * (V - 1), T.value = D * V - D / 2) : (M.value = v * V + g * (V - 1), T.value = D * V);
|
|
517
517
|
}
|
|
518
518
|
if (Y === !0) {
|
|
519
519
|
if (X())
|
|
520
520
|
return;
|
|
521
|
-
|
|
521
|
+
d.value = T.value, S = M.value, c = j, e.emit("selectedValue", d.value);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function B(o, V) {
|
|
@@ -527,7 +527,7 @@ const je = /* @__PURE__ */ Z({
|
|
|
527
527
|
_(o, Y, V);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
const u = W(() =>
|
|
530
|
+
const u = W(() => T.value ? T.value + "分" : d.value + "分"), N = W(() => ({
|
|
531
531
|
width: (M.value || S) + "px"
|
|
532
532
|
}));
|
|
533
533
|
return () => k("div", {
|
|
@@ -550,7 +550,7 @@ const je = /* @__PURE__ */ Z({
|
|
|
550
550
|
}, {
|
|
551
551
|
"f-star-exlarge": a.value === "extraLarge"
|
|
552
552
|
}, {
|
|
553
|
-
disabled:
|
|
553
|
+
disabled: p.value
|
|
554
554
|
}],
|
|
555
555
|
id: o.id,
|
|
556
556
|
style: {
|
|
@@ -588,7 +588,7 @@ const je = /* @__PURE__ */ Z({
|
|
|
588
588
|
}, {
|
|
589
589
|
"font-exlarge": a.value === "extraLarge"
|
|
590
590
|
}]
|
|
591
|
-
}, [h.value && k("span", null, [$(" "), u.value, $(" ")]), b.value && (
|
|
591
|
+
}, [h.value && k("span", null, [$(" "), u.value, $(" ")]), b.value && (c || j) && k("span", null, [$(" "), j || c])])]);
|
|
592
592
|
}
|
|
593
593
|
}), we = (t) => {
|
|
594
594
|
const e = t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, createVNode as D, ref as b, inject as q, onMounted as _ } from "vue";
|
|
2
2
|
import { cloneDeep as X } from "lodash-es";
|
|
3
3
|
const z = {}, W = {};
|
|
4
4
|
function E(t) {
|
|
@@ -16,7 +16,7 @@ function M(t, e = {}) {
|
|
|
16
16
|
}
|
|
17
17
|
function Y(t, e) {
|
|
18
18
|
const o = E(e);
|
|
19
|
-
return Object.keys(t).reduce((n, r) => (n[r] = t[r], n), o), o;
|
|
19
|
+
return Object.keys(t).reduce((n, r) => (n[r] && typeof n[r] == "object" ? Object.assign(n[r], t[r]) : n[r] = t[r], n), o), o;
|
|
20
20
|
}
|
|
21
21
|
function Z(t, e) {
|
|
22
22
|
return Object.keys(t).filter((n) => t[n] != null).reduce((n, r) => {
|
|
@@ -86,8 +86,8 @@ function K(t = {}) {
|
|
|
86
86
|
return u(s).reduce((l, m) => l && y(m, a), !0);
|
|
87
87
|
}
|
|
88
88
|
function g(s, a) {
|
|
89
|
-
const c = Object.keys(s), i = c.includes("allOf"), l = c.includes("anyOf"), m = i || l,
|
|
90
|
-
return i ? !
|
|
89
|
+
const c = Object.keys(s), i = c.includes("allOf"), l = c.includes("anyOf"), m = i || l, L = (m ? s[m ? i ? "allOf" : "anyOf" : "allOf"] : [s]).map((P) => h(P, a));
|
|
90
|
+
return i ? !L.includes(!1) : L.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: g };
|
|
93
93
|
}
|
|
@@ -254,18 +254,18 @@ const re = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
254
254
|
description: le,
|
|
255
255
|
type: fe,
|
|
256
256
|
categories: ye
|
|
257
|
-
},
|
|
257
|
+
}, O = {
|
|
258
258
|
customClass: { type: String, default: "" }
|
|
259
|
-
},
|
|
259
|
+
}, B = J(O, pe, G, te, me), T = /* @__PURE__ */ S({
|
|
260
260
|
name: "FResponseLayout",
|
|
261
|
-
props:
|
|
261
|
+
props: O,
|
|
262
262
|
emits: [],
|
|
263
263
|
setup(t, e) {
|
|
264
264
|
return () => D("div", {
|
|
265
265
|
class: t.customClass
|
|
266
266
|
}, [e.slots.default && e.slots.default()]);
|
|
267
267
|
}
|
|
268
|
-
}), de = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/response-layout-item.schema.json", ge = "response-layout-item", be = "A Farris Container Component", ve = "object",
|
|
268
|
+
}), de = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/response-layout-item.schema.json", ge = "response-layout-item", be = "A Farris Container Component", ve = "object", Le = {
|
|
269
269
|
id: {
|
|
270
270
|
description: "The unique identifier for a Respnse Layout Item",
|
|
271
271
|
type: "string"
|
|
@@ -311,23 +311,23 @@ const re = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
311
311
|
type: "boolean",
|
|
312
312
|
default: !0
|
|
313
313
|
}
|
|
314
|
-
},
|
|
314
|
+
}, Re = [
|
|
315
315
|
"id",
|
|
316
316
|
"type",
|
|
317
317
|
"contents"
|
|
318
|
-
],
|
|
318
|
+
], $e = {
|
|
319
319
|
$schema: de,
|
|
320
320
|
$id: he,
|
|
321
321
|
title: ge,
|
|
322
322
|
description: be,
|
|
323
323
|
type: ve,
|
|
324
|
-
properties:
|
|
325
|
-
required:
|
|
326
|
-
},
|
|
324
|
+
properties: Le,
|
|
325
|
+
required: Re
|
|
326
|
+
}, N = {
|
|
327
327
|
customClass: { type: String, default: "" }
|
|
328
|
-
},
|
|
328
|
+
}, V = J(N, $e, G), $ = /* @__PURE__ */ S({
|
|
329
329
|
name: "FResponseLayoutItem",
|
|
330
|
-
props:
|
|
330
|
+
props: N,
|
|
331
331
|
emits: [],
|
|
332
332
|
setup(t, e) {
|
|
333
333
|
return () => D("div", {
|
|
@@ -374,16 +374,16 @@ function H(t, e, o) {
|
|
|
374
374
|
}
|
|
375
375
|
function w(p, d) {
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function L(p) {
|
|
378
378
|
const { componentType: d } = p;
|
|
379
379
|
let f = M(d, p);
|
|
380
|
-
const
|
|
381
|
-
return f && !f.id && f.type === d && (f.id = `${
|
|
380
|
+
const R = d.toLowerCase().replace("-", "_");
|
|
381
|
+
return f && !f.id && f.type === d && (f.id = `${R}_${Math.random().toString().slice(2, 6)}`), f;
|
|
382
382
|
}
|
|
383
383
|
function F(p, d) {
|
|
384
|
-
const f = String(p.getAttribute("data-controltype")),
|
|
385
|
-
|
|
386
|
-
let v = M(f,
|
|
384
|
+
const f = String(p.getAttribute("data-controltype")), R = p.getAttribute("data-feature"), k = R ? JSON.parse(R) : {};
|
|
385
|
+
k.parentComponentInstance = y.value;
|
|
386
|
+
let v = M(f, k);
|
|
387
387
|
const U = f.toLowerCase().replace("-", "_");
|
|
388
388
|
return v && !v.id && v.type === f && (v.id = `${U}_${Math.random().toString().slice(2, 6)}`), v;
|
|
389
389
|
}
|
|
@@ -411,15 +411,15 @@ function H(t, e, o) {
|
|
|
411
411
|
onAcceptMovedChildElement: w,
|
|
412
412
|
onAcceptNewChildElement: F,
|
|
413
413
|
onChildElementMovedOut: P,
|
|
414
|
-
addNewChildComponentSchema:
|
|
414
|
+
addNewChildComponentSchema: L,
|
|
415
415
|
updateDragAndDropRules: n,
|
|
416
416
|
triggerBelongedComponentToMoveWhenMoved: b(!1),
|
|
417
417
|
triggerBelongedComponentToDeleteWhenDeleted: b(!1)
|
|
418
418
|
}, y;
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const Se = /* @__PURE__ */ S({
|
|
421
421
|
name: "FResponseLayoutDesign",
|
|
422
|
-
props:
|
|
422
|
+
props: O,
|
|
423
423
|
emits: [],
|
|
424
424
|
setup(t, e) {
|
|
425
425
|
const o = b(), n = q("design-item-context"), r = H(o, n);
|
|
@@ -430,15 +430,15 @@ const $e = /* @__PURE__ */ $({
|
|
|
430
430
|
class: "d-flex response-layout"
|
|
431
431
|
}, [e.slots.default && e.slots.default()]);
|
|
432
432
|
}
|
|
433
|
-
}), De = /* @__PURE__ */
|
|
433
|
+
}), De = /* @__PURE__ */ S({
|
|
434
434
|
name: "FResponseLayoutItemDesign",
|
|
435
|
-
props:
|
|
435
|
+
props: N,
|
|
436
436
|
emits: [],
|
|
437
437
|
setup(t, e) {
|
|
438
438
|
const o = b(), n = q("design-item-context"), r = H(o, n);
|
|
439
439
|
return r.value.canNested = !1, r.value.canMove = !1, r.value.canDelete = !1, _(() => {
|
|
440
440
|
o.value.componentInstance = r;
|
|
441
|
-
}), e.expose(r.value), () => D(
|
|
441
|
+
}), e.expose(r.value), () => D($, {
|
|
442
442
|
ref: o
|
|
443
443
|
}, {
|
|
444
444
|
default: () => [e.slots.default && e.slots.default()]
|
|
@@ -446,19 +446,19 @@ const $e = /* @__PURE__ */ $({
|
|
|
446
446
|
}
|
|
447
447
|
}), Te = {
|
|
448
448
|
install(t) {
|
|
449
|
-
t.component(T.name, T).component(
|
|
449
|
+
t.component(T.name, T).component($.name, $);
|
|
450
450
|
},
|
|
451
451
|
register(t, e, o, n) {
|
|
452
|
-
t["response-layout"] = T, t["response-layout-item"] =
|
|
452
|
+
t["response-layout"] = T, t["response-layout-item"] = $, e["response-layout"] = B, e["response-layout-item"] = V;
|
|
453
453
|
},
|
|
454
454
|
registerDesigner(t, e, o) {
|
|
455
|
-
t["response-layout"] =
|
|
455
|
+
t["response-layout"] = Se, t["response-layout-item"] = De, e["response-layout"] = B, e["response-layout-item"] = V;
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
export {
|
|
459
459
|
T as FResponseLayout,
|
|
460
|
-
|
|
460
|
+
$ as FResponseLayoutItem,
|
|
461
461
|
Te as default,
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
O as responseLayoutProps,
|
|
463
|
+
B as responseLayoutPropsResolver
|
|
464
464
|
};
|