@farris/ui-vue 1.3.0 → 1.3.1
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 +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- 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 +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const { properties: t, title:
|
|
6
|
-
return (!i || !o.find((m) => m == "id")) && (
|
|
1
|
+
import { ref as h, onMounted as X, defineComponent as F, createVNode as y, withDirectives as L, vShow as N, Teleport as U, Fragment as Y, inject as x } from "vue";
|
|
2
|
+
import { isPlainObject as q, cloneDeep as P } from "lodash-es";
|
|
3
|
+
const _ = {}, Z = {};
|
|
4
|
+
function A(e) {
|
|
5
|
+
const { properties: t, title: a, ignore: o } = e, i = o && Array.isArray(o), p = Object.keys(t).reduce((m, c) => ((!i || !o.find((D) => D == c)) && (m[c] = t[c].type === "object" && t[c].properties ? A(t[c]) : P(t[c].default)), m), {});
|
|
6
|
+
return a && (!i || !o.find((m) => m == "id")) && (p.id = `${a}-${Date.now()}`), p;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const o =
|
|
8
|
+
function G(e, t = {}, a) {
|
|
9
|
+
const o = _[e];
|
|
10
10
|
if (o) {
|
|
11
|
-
let i =
|
|
12
|
-
const
|
|
13
|
-
return i =
|
|
11
|
+
let i = A(o);
|
|
12
|
+
const p = Z[e];
|
|
13
|
+
return i = p ? p({ getSchemaByType: G }, i, t, a) : i, i;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return Object.keys(e).reduce((o, i) => (o[i] &&
|
|
17
|
+
function K(e, t) {
|
|
18
|
+
const a = A(t);
|
|
19
|
+
return Object.keys(e).reduce((o, i) => (o[i] && q(o[i]) && q(e[i]) ? Object.assign(o[i], e[i]) : o[i] = e[i], o), a), a;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function I(e, t) {
|
|
22
22
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, i) => {
|
|
23
23
|
if (t.has(i)) {
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
o[
|
|
24
|
+
const p = t.get(i);
|
|
25
|
+
if (typeof p == "string")
|
|
26
|
+
o[p] = e[i];
|
|
27
27
|
else {
|
|
28
|
-
const m =
|
|
28
|
+
const m = p(i, e[i], e);
|
|
29
29
|
Object.assign(o, m);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
@@ -33,81 +33,81 @@ function ee(e, t) {
|
|
|
33
33
|
return o;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const o =
|
|
38
|
-
return
|
|
36
|
+
function ee(e, t, a = /* @__PURE__ */ new Map()) {
|
|
37
|
+
const o = K(e, t);
|
|
38
|
+
return I(o, a);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
function t(r,
|
|
40
|
+
function te(e = {}) {
|
|
41
|
+
function t(r, u, s, f) {
|
|
42
42
|
if (typeof s == "number")
|
|
43
|
-
return
|
|
43
|
+
return f[r].length === s;
|
|
44
44
|
if (typeof s == "object") {
|
|
45
45
|
const b = Object.keys(s)[0], g = s[b];
|
|
46
46
|
if (b === "not")
|
|
47
|
-
return Number(
|
|
47
|
+
return Number(f[r].length) !== Number(g);
|
|
48
48
|
if (b === "moreThan")
|
|
49
|
-
return Number(
|
|
49
|
+
return Number(f[r].length) >= Number(g);
|
|
50
50
|
if (b === "lessThan")
|
|
51
|
-
return Number(
|
|
51
|
+
return Number(f[r].length) <= Number(g);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function a(r, u, s, f) {
|
|
56
|
+
return f[r] && f[r].propertyValue && String(f[r].propertyValue.value) === String(s);
|
|
57
57
|
}
|
|
58
58
|
const o = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", t],
|
|
60
|
-
["getProperty",
|
|
60
|
+
["getProperty", a]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(e).reduce((r,
|
|
63
|
-
function i(r,
|
|
62
|
+
Object.keys(e).reduce((r, u) => (r.set(u, e[u]), r), o);
|
|
63
|
+
function i(r, u) {
|
|
64
64
|
const s = r;
|
|
65
|
-
return typeof
|
|
66
|
-
if (
|
|
67
|
-
return { target: s, operator: "length", param: null, value:
|
|
68
|
-
const b =
|
|
65
|
+
return typeof u == "number" ? [{ target: s, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: s, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((f) => {
|
|
66
|
+
if (f === "length")
|
|
67
|
+
return { target: s, operator: "length", param: null, value: u[f] };
|
|
68
|
+
const b = f, g = u[f];
|
|
69
69
|
return { target: s, operator: "getProperty", param: b, value: g };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(r).reduce((s,
|
|
74
|
-
const b = i(
|
|
72
|
+
function p(r) {
|
|
73
|
+
return Object.keys(r).reduce((s, f) => {
|
|
74
|
+
const b = i(f, r[f]);
|
|
75
75
|
return s.push(...b), s;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function m(r,
|
|
78
|
+
function m(r, u) {
|
|
79
79
|
if (o.has(r.operator)) {
|
|
80
80
|
const s = o.get(r.operator);
|
|
81
|
-
return s && s(r.target, r.param, r.value,
|
|
81
|
+
return s && s(r.target, r.param, r.value, u) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function c(r, u) {
|
|
86
|
+
return p(r).reduce((b, g) => b && m(g, u), !0);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
const s = Object.keys(r),
|
|
90
|
-
return
|
|
88
|
+
function D(r, u) {
|
|
89
|
+
const s = Object.keys(r), f = s.includes("allOf"), b = s.includes("anyOf"), g = f || b, d = (g ? r[g ? f ? "allOf" : "anyOf" : "allOf"] : [r]).map((B) => c(B, u));
|
|
90
|
+
return f ? !d.includes(!1) : d.includes(!0);
|
|
91
91
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
92
|
+
return { parseValueSchema: D };
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
function
|
|
97
|
-
return
|
|
98
|
-
const
|
|
99
|
-
return Object.assign(
|
|
94
|
+
const ne = {}, oe = {};
|
|
95
|
+
te();
|
|
96
|
+
function ie(e, t, a = /* @__PURE__ */ new Map(), o = (m, c, D) => c, i = {}, p = (m) => m) {
|
|
97
|
+
return _[t.title] = t, Z[t.title] = o, ne[t.title] = i, oe[t.title] = p, (m = {}) => {
|
|
98
|
+
const c = ee(m, t, a), D = Object.keys(e).reduce((r, u) => (r[u] = e[u].default, r), {});
|
|
99
|
+
return Object.assign(D, c);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function re(e, t) {
|
|
103
103
|
return { customClass: t.class, customStyle: t.style };
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function se(e, t, a) {
|
|
106
106
|
return t;
|
|
107
107
|
}
|
|
108
108
|
const le = /* @__PURE__ */ new Map([
|
|
109
|
-
["appearance",
|
|
110
|
-
]),
|
|
109
|
+
["appearance", re]
|
|
110
|
+
]), ae = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/dropdown.schema.json", ue = "dropdown", de = "A Farris Component", fe = "object", pe = {
|
|
111
111
|
id: {
|
|
112
112
|
description: "The unique identifier for dropdown",
|
|
113
113
|
type: "string"
|
|
@@ -169,18 +169,18 @@ const le = /* @__PURE__ */ new Map([
|
|
|
169
169
|
type: "boolean",
|
|
170
170
|
default: !0
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, me = [
|
|
173
173
|
"id",
|
|
174
174
|
"type"
|
|
175
|
-
],
|
|
176
|
-
$schema:
|
|
177
|
-
$id:
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
type:
|
|
181
|
-
properties:
|
|
182
|
-
required:
|
|
183
|
-
},
|
|
175
|
+
], ye = {
|
|
176
|
+
$schema: ae,
|
|
177
|
+
$id: ce,
|
|
178
|
+
title: ue,
|
|
179
|
+
description: de,
|
|
180
|
+
type: fe,
|
|
181
|
+
properties: pe,
|
|
182
|
+
required: me
|
|
183
|
+
}, ge = "dropdown", be = "A Farris Component", we = "object", he = {
|
|
184
184
|
basic: {
|
|
185
185
|
description: "Basic Infomation",
|
|
186
186
|
title: "基本信息",
|
|
@@ -233,12 +233,12 @@ const le = /* @__PURE__ */ new Map([
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
},
|
|
237
|
-
title:
|
|
238
|
-
description:
|
|
239
|
-
type:
|
|
240
|
-
categories:
|
|
241
|
-
},
|
|
236
|
+
}, ve = {
|
|
237
|
+
title: ge,
|
|
238
|
+
description: be,
|
|
239
|
+
type: we,
|
|
240
|
+
categories: he
|
|
241
|
+
}, W = {
|
|
242
242
|
/** 默认展开或折叠 */
|
|
243
243
|
show: { type: Boolean, default: !1 },
|
|
244
244
|
/** 下拉按钮是否禁用 */
|
|
@@ -268,14 +268,14 @@ const le = /* @__PURE__ */ new Map([
|
|
|
268
268
|
},
|
|
269
269
|
onSelect: { type: Function, default: () => {
|
|
270
270
|
} }
|
|
271
|
-
},
|
|
272
|
-
function
|
|
273
|
-
let
|
|
274
|
-
const o =
|
|
275
|
-
|
|
276
|
-
|
|
271
|
+
}, C = ie(W, ye, le, se, ve);
|
|
272
|
+
function J(e, t) {
|
|
273
|
+
let a;
|
|
274
|
+
const o = h(e.show), i = h(), p = h(), m = h(), c = 10;
|
|
275
|
+
X(() => {
|
|
276
|
+
a = p.value;
|
|
277
277
|
});
|
|
278
|
-
const
|
|
278
|
+
const D = (d = 1) => {
|
|
279
279
|
const n = [
|
|
280
280
|
"body>.f-datagrid-settings-simple-host",
|
|
281
281
|
"body>div",
|
|
@@ -286,71 +286,71 @@ function G(e, t) {
|
|
|
286
286
|
"body>.popover.show",
|
|
287
287
|
"body>filter-row-panel>.f-datagrid-filter-panel",
|
|
288
288
|
"body>.f-section-maximize"
|
|
289
|
-
],
|
|
290
|
-
const { display:
|
|
291
|
-
return
|
|
292
|
-
}).filter((
|
|
293
|
-
let
|
|
294
|
-
return
|
|
295
|
-
}, r = (
|
|
289
|
+
], B = Array.from(document.body.querySelectorAll(n.join(","))).filter((l) => l).map((l) => {
|
|
290
|
+
const { display: S, zIndex: v } = window.getComputedStyle(l);
|
|
291
|
+
return S === "none" ? 0 : parseInt(v, 10);
|
|
292
|
+
}).filter((l) => l);
|
|
293
|
+
let w = Math.max(...B);
|
|
294
|
+
return w < 1040 && (w = 1040), w + d;
|
|
295
|
+
}, r = (d, n) => {
|
|
296
296
|
const {
|
|
297
|
-
height:
|
|
298
|
-
left:
|
|
299
|
-
top:
|
|
300
|
-
width:
|
|
301
|
-
} =
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
let
|
|
306
|
-
n.offsetWidth >
|
|
297
|
+
height: B,
|
|
298
|
+
left: w,
|
|
299
|
+
top: l,
|
|
300
|
+
width: S
|
|
301
|
+
} = d.getBoundingClientRect(), { width: v, height: E, top: M } = n.getBoundingClientRect();
|
|
302
|
+
if (d.className.indexOf("dropdown-submenu") > -1 || d.closest(".dropdown-submenu") || d.classList.contains("dropright")) {
|
|
303
|
+
const O = window.innerWidth - w - d.offsetWidth, j = window.innerHeight - l, { position: R } = getComputedStyle(n);
|
|
304
|
+
if (R === "fixed") {
|
|
305
|
+
let T = w + d.offsetWidth;
|
|
306
|
+
n.offsetWidth > O && w > O && (T = w - v), n.style.left = T + "px", n.style.right = "auto", window.innerHeight - 2 * c < n.offsetHeight ? (n.style.top = c + "px", n.style.bottom = c + "px", n.style.maxHeight = window.innerHeight - 2 * c + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : j < n.offsetHeight ? (n.style.top = "auto", n.style.bottom = c + "px") : (n.style.top = l + "px", n.style.bottom = "auto");
|
|
307
307
|
} else {
|
|
308
|
-
if (n.offsetWidth >
|
|
309
|
-
const
|
|
310
|
-
n.style.left =
|
|
308
|
+
if (n.offsetWidth > O) {
|
|
309
|
+
const T = -v;
|
|
310
|
+
n.style.left = T + "px";
|
|
311
311
|
}
|
|
312
|
-
window.innerHeight - 2 *
|
|
312
|
+
window.innerHeight - 2 * c < n.offsetHeight ? (n.style.top = -1 * (l - c) + "px", n.style.bottom = "auto", n.style.maxHeight = window.innerHeight - 2 * c + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : j < n.offsetHeight && (n.style.top = j - n.offsetHeight - c + "px", n.style.bottom = "auto");
|
|
313
313
|
}
|
|
314
314
|
} else {
|
|
315
|
-
const { marginTop:
|
|
316
|
-
let
|
|
317
|
-
const
|
|
318
|
-
let
|
|
319
|
-
window.innerHeight -
|
|
320
|
-
!important;top:${
|
|
315
|
+
const { marginTop: O, marginBottom: j } = getComputedStyle(n);
|
|
316
|
+
let R = 0;
|
|
317
|
+
const T = Math.ceil(parseFloat(O)) + Math.ceil(parseFloat(j));
|
|
318
|
+
let $ = l + B, V = w;
|
|
319
|
+
window.innerHeight - $ - T < E && ($ = l - E, $ < 0 && (window.innerHeight - l - B > l ? ($ = l + B, R = window.innerHeight - $ - T - c) : ($ = c, R = l - $ - T))), window.innerWidth - w < v && window.innerWidth - w < w + S && (V = w - v + S), document.body.append(n), n.style.cssText = `position:fixed;bottom:unset;left:${V}px
|
|
320
|
+
!important;top:${$}px !important;right: unset;${R ? "max-height:" + R + "px;overflow-y:auto;" : ""}`, R && (n.className += " dropdown-menu-maxheight"), n.style.zIndex = D().toString();
|
|
321
321
|
}
|
|
322
|
-
},
|
|
323
|
-
r(i.value,
|
|
322
|
+
}, u = () => {
|
|
323
|
+
r(i.value, p.value);
|
|
324
324
|
}, s = () => {
|
|
325
|
-
e.hover || (o.value = !1, document.removeEventListener("click", s),
|
|
325
|
+
e.hover || (o.value = !1, document.removeEventListener("click", s), a.removeEventListener("click", s), document.removeEventListener("scroll", s), a.removeEventListener("scroll", s));
|
|
326
326
|
};
|
|
327
327
|
return {
|
|
328
328
|
show: o,
|
|
329
329
|
dropdownRef: i,
|
|
330
|
-
dropdownMenuRef:
|
|
330
|
+
dropdownMenuRef: p,
|
|
331
331
|
clickEventRef: m,
|
|
332
|
-
showDropMenu: (
|
|
333
|
-
e.hover || e.disabled || (
|
|
334
|
-
|
|
335
|
-
}), o.value = !o.value, document.addEventListener("click", s), document.addEventListener("scroll", s), e.hideOnClick || (
|
|
332
|
+
showDropMenu: (d) => {
|
|
333
|
+
e.hover || e.disabled || (d == null || d.stopPropagation(), o.value || setTimeout(() => {
|
|
334
|
+
u();
|
|
335
|
+
}), o.value = !o.value, document.addEventListener("click", s), document.addEventListener("scroll", s), e.hideOnClick || (a.addEventListener("click", (n) => {
|
|
336
336
|
n.stopPropagation();
|
|
337
|
-
}),
|
|
337
|
+
}), a.addEventListener("scroll", (n) => {
|
|
338
338
|
n.stopPropagation();
|
|
339
339
|
})));
|
|
340
340
|
},
|
|
341
|
-
hoverDropdown: (
|
|
341
|
+
hoverDropdown: (d) => {
|
|
342
342
|
e.hover && (o.value || setTimeout(() => {
|
|
343
343
|
}), o.value = !o.value);
|
|
344
344
|
},
|
|
345
345
|
leftButtonClick: () => {
|
|
346
346
|
},
|
|
347
347
|
closeDropMenu: s,
|
|
348
|
-
selectItem: (
|
|
349
|
-
t.emit("select",
|
|
348
|
+
selectItem: (d) => {
|
|
349
|
+
t.emit("select", d);
|
|
350
350
|
},
|
|
351
|
-
resolveSize: (
|
|
351
|
+
resolveSize: (d) => {
|
|
352
352
|
const n = /px|em|rem|pt|%/;
|
|
353
|
-
return n.test(
|
|
353
|
+
return n.test(d) ? `${parseInt(d, 10)}${d.match(n)[0]}` : `${d}px`;
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
}
|
|
@@ -365,44 +365,44 @@ const De = {
|
|
|
365
365
|
divide: { type: Boolean, default: !1 },
|
|
366
366
|
onSelect: { type: Function, default: () => {
|
|
367
367
|
} }
|
|
368
|
-
}, Q = /* @__PURE__ */
|
|
368
|
+
}, Q = /* @__PURE__ */ F({
|
|
369
369
|
name: "FDropdownItem",
|
|
370
370
|
props: De,
|
|
371
371
|
emits: ["select"],
|
|
372
372
|
setup(e, t) {
|
|
373
|
-
const
|
|
373
|
+
const a = h(e.value), o = h(e.label), i = h(e.disabled), p = h(e.active), m = h(e.divide), c = () => {
|
|
374
374
|
i.value || t.emit("select", e);
|
|
375
375
|
};
|
|
376
|
-
return () => y("div", null, [
|
|
376
|
+
return () => y("div", null, [L(y("div", {
|
|
377
377
|
class: "dropdown-divider"
|
|
378
|
-
}, null), [[
|
|
379
|
-
class: `dropdown-item${
|
|
380
|
-
onClick:
|
|
381
|
-
title:
|
|
378
|
+
}, null), [[N, m.value]]), y("li", {
|
|
379
|
+
class: `dropdown-item${p.value ? " active" : ""} ${i.value ? " disabled" : ""}`,
|
|
380
|
+
onClick: c,
|
|
381
|
+
title: a.value.toString()
|
|
382
382
|
}, [o.value])]);
|
|
383
383
|
}
|
|
384
|
-
}),
|
|
384
|
+
}), z = /* @__PURE__ */ F({
|
|
385
385
|
name: "FDropdown",
|
|
386
|
-
props:
|
|
386
|
+
props: W,
|
|
387
387
|
emits: ["select"],
|
|
388
388
|
setup(e, t) {
|
|
389
|
-
const
|
|
389
|
+
const a = h(e.model), {
|
|
390
390
|
show: o,
|
|
391
391
|
dropdownMenuRef: i,
|
|
392
|
-
dropdownRef:
|
|
392
|
+
dropdownRef: p,
|
|
393
393
|
clickEventRef: m,
|
|
394
|
-
showDropMenu:
|
|
395
|
-
hoverDropdown:
|
|
394
|
+
showDropMenu: c,
|
|
395
|
+
hoverDropdown: D,
|
|
396
396
|
leftButtonClick: r,
|
|
397
|
-
closeDropMenu:
|
|
397
|
+
closeDropMenu: u,
|
|
398
398
|
selectItem: s,
|
|
399
|
-
resolveSize:
|
|
400
|
-
} =
|
|
399
|
+
resolveSize: f
|
|
400
|
+
} = J(e, t);
|
|
401
401
|
function b(g) {
|
|
402
402
|
t.emit("select", g);
|
|
403
403
|
}
|
|
404
404
|
return () => y("div", {
|
|
405
|
-
ref:
|
|
405
|
+
ref: p
|
|
406
406
|
}, [y("div", {
|
|
407
407
|
class: ["farris-dropdown", "btn-group", {
|
|
408
408
|
dropup: e.position === "top"
|
|
@@ -463,137 +463,129 @@ const De = {
|
|
|
463
463
|
disabled: e.disabled
|
|
464
464
|
}],
|
|
465
465
|
style: "width:100%",
|
|
466
|
-
onClick:
|
|
467
|
-
onMouseenter:
|
|
468
|
-
onMouseleave:
|
|
469
|
-
}, [
|
|
466
|
+
onClick: c,
|
|
467
|
+
onMouseenter: D,
|
|
468
|
+
onMouseleave: D
|
|
469
|
+
}, [L(y("span", {
|
|
470
470
|
class: "sr-only"
|
|
471
|
-
}, null), [[
|
|
471
|
+
}, null), [[N, e.splitButton]]), e.splitButton ? "" : e.title, L(y("span", {
|
|
472
472
|
class: `f-icon ${e.iconClass.toString()}`
|
|
473
|
-
}, null), [[
|
|
473
|
+
}, null), [[N, e.iconClass]])]), y(U, {
|
|
474
474
|
to: "body"
|
|
475
475
|
}, {
|
|
476
476
|
default: () => [y("div", {
|
|
477
477
|
ref: i,
|
|
478
478
|
class: `dropdown-menu${o.value ? " show" : ""}`
|
|
479
|
-
}, [y(
|
|
479
|
+
}, [y(Y, null, [a.value.map(({
|
|
480
480
|
label: g,
|
|
481
|
-
value:
|
|
482
|
-
disabled:
|
|
483
|
-
active:
|
|
481
|
+
value: k,
|
|
482
|
+
disabled: H,
|
|
483
|
+
active: d,
|
|
484
484
|
divide: n
|
|
485
485
|
}) => y(Q, {
|
|
486
|
-
value:
|
|
486
|
+
value: k.toString(),
|
|
487
487
|
label: g,
|
|
488
|
-
disabled:
|
|
489
|
-
active:
|
|
488
|
+
disabled: H,
|
|
489
|
+
active: d,
|
|
490
490
|
divide: n,
|
|
491
|
-
onSelect: (
|
|
491
|
+
onSelect: (B) => b(B)
|
|
492
492
|
}, null))])])]
|
|
493
493
|
})])]);
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
|
-
function
|
|
496
|
+
function Se(e, t, a) {
|
|
497
497
|
var w;
|
|
498
498
|
function o() {
|
|
499
499
|
}
|
|
500
|
-
const i = "",
|
|
501
|
-
function
|
|
500
|
+
const i = "", p = "", m = h();
|
|
501
|
+
function c() {
|
|
502
502
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function D() {
|
|
505
505
|
return !1;
|
|
506
506
|
}
|
|
507
507
|
function r() {
|
|
508
508
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function u() {
|
|
511
511
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
512
512
|
}
|
|
513
|
-
function s(
|
|
514
|
-
if (!
|
|
513
|
+
function s(l) {
|
|
514
|
+
if (!l || !l.value)
|
|
515
515
|
return null;
|
|
516
|
-
if (
|
|
517
|
-
return
|
|
518
|
-
const
|
|
519
|
-
return
|
|
516
|
+
if (l.value.schema && l.value.schema.type === "component")
|
|
517
|
+
return l.value;
|
|
518
|
+
const S = h(l == null ? void 0 : l.value.parent), v = s(S);
|
|
519
|
+
return v || null;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
const { componentInstance:
|
|
523
|
-
return !
|
|
521
|
+
function f(l = t) {
|
|
522
|
+
const { componentInstance: S, designerItemElementRef: v } = l;
|
|
523
|
+
return !S || !S.value ? null : S.value.canMove ? v : f(l.parent);
|
|
524
524
|
}
|
|
525
|
-
function b(
|
|
526
|
-
return !!
|
|
525
|
+
function b(l) {
|
|
526
|
+
return !!a;
|
|
527
527
|
}
|
|
528
528
|
function g() {
|
|
529
529
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
}
|
|
533
|
-
function O(p, h) {
|
|
531
|
+
function k() {
|
|
534
532
|
}
|
|
535
|
-
function
|
|
536
|
-
const { componentType: D } = p;
|
|
537
|
-
let $ = M(D, p, h);
|
|
538
|
-
const L = D.toLowerCase().replace("-", "_");
|
|
539
|
-
return $ && !$.id && $.type === D && ($.id = `${L}_${Math.random().toString().slice(2, 6)}`), $;
|
|
533
|
+
function H(l, S) {
|
|
540
534
|
}
|
|
541
|
-
function
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
return E && !E.id && E.type === D && (E.id = `${N}_${Math.random().toString().slice(2, 6)}`), E;
|
|
535
|
+
function d(l, S) {
|
|
536
|
+
const { componentType: v } = l;
|
|
537
|
+
let E = G(v, l, S);
|
|
538
|
+
const M = v.toLowerCase().replace("-", "_");
|
|
539
|
+
return E && !E.id && E.type === v && (E.id = `${M}_${Math.random().toString().slice(2, 6)}`), E;
|
|
547
540
|
}
|
|
548
|
-
function
|
|
541
|
+
function n(l) {
|
|
549
542
|
}
|
|
550
|
-
function
|
|
543
|
+
function B(...l) {
|
|
551
544
|
}
|
|
552
545
|
return m.value = {
|
|
553
|
-
canMove:
|
|
554
|
-
canSelectParent:
|
|
546
|
+
canMove: c(),
|
|
547
|
+
canSelectParent: D(),
|
|
555
548
|
canDelete: r(),
|
|
556
|
-
canNested: !
|
|
549
|
+
canNested: !u(),
|
|
557
550
|
contents: t == null ? void 0 : t.schema.contents,
|
|
558
551
|
elementRef: e,
|
|
559
552
|
parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
|
|
560
553
|
schema: t == null ? void 0 : t.schema,
|
|
561
554
|
styles: i,
|
|
562
|
-
designerClass:
|
|
555
|
+
designerClass: p,
|
|
563
556
|
canAccepts: b,
|
|
564
557
|
getBelongedComponentInstance: s,
|
|
565
|
-
getDraggableDesignItemElement:
|
|
558
|
+
getDraggableDesignItemElement: f,
|
|
566
559
|
getDraggingDisplayText: g,
|
|
567
|
-
getPropConfig:
|
|
568
|
-
getDragScopeElement:
|
|
569
|
-
onAcceptMovedChildElement:
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
addNewChildComponentSchema: u,
|
|
560
|
+
getPropConfig: B,
|
|
561
|
+
getDragScopeElement: k,
|
|
562
|
+
onAcceptMovedChildElement: H,
|
|
563
|
+
onChildElementMovedOut: n,
|
|
564
|
+
addNewChildComponentSchema: d,
|
|
573
565
|
updateDragAndDropRules: o,
|
|
574
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
575
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
566
|
+
triggerBelongedComponentToMoveWhenMoved: h(!1),
|
|
567
|
+
triggerBelongedComponentToDeleteWhenDeleted: h(!1)
|
|
576
568
|
}, m;
|
|
577
569
|
}
|
|
578
|
-
const
|
|
570
|
+
const Be = /* @__PURE__ */ F({
|
|
579
571
|
name: "FDropdownDesign",
|
|
580
|
-
props:
|
|
572
|
+
props: W,
|
|
581
573
|
emits: ["select"],
|
|
582
574
|
setup(e, t) {
|
|
583
|
-
const
|
|
575
|
+
const a = h(e.model), {
|
|
584
576
|
show: o,
|
|
585
577
|
showDropMenu: i,
|
|
586
|
-
hoverDropdown:
|
|
578
|
+
hoverDropdown: p,
|
|
587
579
|
leftButtonClick: m,
|
|
588
|
-
closeDropMenu:
|
|
589
|
-
selectItem:
|
|
580
|
+
closeDropMenu: c,
|
|
581
|
+
selectItem: D,
|
|
590
582
|
resolveSize: r
|
|
591
|
-
} =
|
|
592
|
-
function
|
|
583
|
+
} = J(e, t);
|
|
584
|
+
function u(g) {
|
|
593
585
|
t.emit("select", g);
|
|
594
586
|
}
|
|
595
|
-
const s =
|
|
596
|
-
return
|
|
587
|
+
const s = h(), f = x("design-item-context"), b = Se(s, f);
|
|
588
|
+
return X(() => {
|
|
597
589
|
s.value.componentInstance = b;
|
|
598
590
|
}), t.expose(b.value), () => y("div", {
|
|
599
591
|
ref: s
|
|
@@ -660,43 +652,43 @@ const ke = /* @__PURE__ */ W({
|
|
|
660
652
|
}],
|
|
661
653
|
style: "width:100%",
|
|
662
654
|
onClick: i,
|
|
663
|
-
onMouseenter:
|
|
664
|
-
onMouseleave:
|
|
665
|
-
}, [
|
|
655
|
+
onMouseenter: p,
|
|
656
|
+
onMouseleave: p
|
|
657
|
+
}, [L(y("span", {
|
|
666
658
|
class: "sr-only"
|
|
667
|
-
}, null), [[
|
|
659
|
+
}, null), [[N, e.splitButton]]), e.splitButton ? "" : e.title, L(y("span", {
|
|
668
660
|
class: `f-icon ${e.iconClass.toString()}`
|
|
669
|
-
}, null), [[
|
|
661
|
+
}, null), [[N, e.iconClass]])]), y("div", {
|
|
670
662
|
class: `dropdown-menu${o.value ? " show" : ""}`
|
|
671
|
-
}, [y(
|
|
663
|
+
}, [y(Y, null, [a.value.map(({
|
|
672
664
|
label: g,
|
|
673
|
-
value:
|
|
674
|
-
disabled:
|
|
675
|
-
active:
|
|
665
|
+
value: k,
|
|
666
|
+
disabled: H,
|
|
667
|
+
active: d,
|
|
676
668
|
divide: n
|
|
677
669
|
}) => y(Q, {
|
|
678
|
-
value:
|
|
670
|
+
value: k.toString(),
|
|
679
671
|
label: g,
|
|
680
|
-
disabled:
|
|
681
|
-
active:
|
|
672
|
+
disabled: H,
|
|
673
|
+
active: d,
|
|
682
674
|
divide: n,
|
|
683
|
-
onSelect: (
|
|
675
|
+
onSelect: (B) => u(B)
|
|
684
676
|
}, null))])])])]);
|
|
685
677
|
}
|
|
686
|
-
}),
|
|
678
|
+
}), $e = {
|
|
687
679
|
install(e) {
|
|
688
|
-
e.component(
|
|
680
|
+
e.component(z.name, z);
|
|
689
681
|
},
|
|
690
|
-
register(e, t,
|
|
691
|
-
e.dropdown =
|
|
682
|
+
register(e, t, a, o) {
|
|
683
|
+
e.dropdown = z, t.dropdown = C;
|
|
692
684
|
},
|
|
693
|
-
registerDesigner(e, t,
|
|
694
|
-
e.dropdown =
|
|
685
|
+
registerDesigner(e, t, a) {
|
|
686
|
+
e.dropdown = Be, t.dropdown = C;
|
|
695
687
|
}
|
|
696
688
|
};
|
|
697
689
|
export {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
690
|
+
z as Dropdown,
|
|
691
|
+
$e as default,
|
|
692
|
+
W as dropdownProps,
|
|
693
|
+
C as propsResolver
|
|
702
694
|
};
|