@farris/ui-vue 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- 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.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/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-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-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-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- 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
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import J from "
|
|
1
|
+
import { defineComponent as M, ref as m, computed as D, watch as S, createVNode as v, Fragment as X, inject as U, onMounted as W, resolveComponent as x } from "vue";
|
|
2
|
+
import J from "../button-edit/index.esm.js";
|
|
3
3
|
import { cloneDeep as z } from "lodash-es";
|
|
4
|
-
import G from "
|
|
5
|
-
import Q from "
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title: c } = t,
|
|
9
|
-
return
|
|
4
|
+
import G from "../list-view/index.esm.js";
|
|
5
|
+
import Q from "../loading/index.esm.js";
|
|
6
|
+
const $ = {}, T = {};
|
|
7
|
+
function P(t) {
|
|
8
|
+
const { properties: e, title: c, ignore: o } = t, l = o && Array.isArray(o), d = Object.keys(e).reduce((p, s) => ((!l || !o.find((g) => g == s)) && (p[s] = e[s].type === "object" && e[s].properties ? P(e[s]) : z(e[s].default)), p), {});
|
|
9
|
+
return (!l || !o.find((p) => p == "id")) && (d.id = `${c}-${Date.now()}`), d;
|
|
10
10
|
}
|
|
11
|
-
function E(t, e = {}) {
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
return
|
|
11
|
+
function E(t, e = {}, c) {
|
|
12
|
+
const o = $[t];
|
|
13
|
+
if (o) {
|
|
14
|
+
let l = P(o);
|
|
15
|
+
const d = T[t];
|
|
16
|
+
return l = d ? d({ getSchemaByType: E }, l, e, c) : l, l;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
function Y(t, e) {
|
|
21
|
-
const c =
|
|
22
|
-
return Object.keys(t).reduce((
|
|
21
|
+
const c = P(e);
|
|
22
|
+
return Object.keys(t).reduce((o, l) => (o[l] && typeof o[l] == "object" ? Object.assign(o[l], t[l]) : o[l] = t[l], o), c), c;
|
|
23
23
|
}
|
|
24
24
|
function Z(t, e) {
|
|
25
|
-
return Object.keys(t).filter((
|
|
26
|
-
if (e.has(
|
|
27
|
-
const
|
|
28
|
-
if (typeof
|
|
29
|
-
|
|
25
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, l) => {
|
|
26
|
+
if (e.has(l)) {
|
|
27
|
+
const d = e.get(l);
|
|
28
|
+
if (typeof d == "string")
|
|
29
|
+
o[d] = t[l];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(
|
|
31
|
+
const p = d(l, t[l], t);
|
|
32
|
+
Object.assign(o, p);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
|
-
|
|
36
|
-
return
|
|
35
|
+
o[l] = t[l];
|
|
36
|
+
return o;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
39
39
|
function K(t, e, c = /* @__PURE__ */ new Map()) {
|
|
40
|
-
const
|
|
41
|
-
return Z(
|
|
40
|
+
const o = Y(t, e);
|
|
41
|
+
return Z(o, c);
|
|
42
42
|
}
|
|
43
43
|
function I(t = {}) {
|
|
44
|
-
function e(
|
|
45
|
-
if (typeof
|
|
46
|
-
return i[
|
|
47
|
-
if (typeof
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return Number(i[
|
|
51
|
-
if (
|
|
52
|
-
return Number(i[
|
|
53
|
-
if (
|
|
54
|
-
return Number(i[
|
|
44
|
+
function e(a, n, u, i) {
|
|
45
|
+
if (typeof u == "number")
|
|
46
|
+
return i[a].length === u;
|
|
47
|
+
if (typeof u == "object") {
|
|
48
|
+
const r = Object.keys(u)[0], f = u[r];
|
|
49
|
+
if (r === "not")
|
|
50
|
+
return Number(i[a].length) !== Number(f);
|
|
51
|
+
if (r === "moreThan")
|
|
52
|
+
return Number(i[a].length) >= Number(f);
|
|
53
|
+
if (r === "lessThan")
|
|
54
|
+
return Number(i[a].length) <= Number(f);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function c(
|
|
59
|
-
return i[
|
|
58
|
+
function c(a, n, u, i) {
|
|
59
|
+
return i[a] && i[a].propertyValue && String(i[a].propertyValue.value) === String(u);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const o = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", e],
|
|
63
63
|
["getProperty", c]
|
|
64
64
|
]);
|
|
65
|
-
Object.keys(t).reduce((
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof n == "number" ? [{ target:
|
|
65
|
+
Object.keys(t).reduce((a, n) => (a.set(n, t[n]), a), o);
|
|
66
|
+
function l(a, n) {
|
|
67
|
+
const u = a;
|
|
68
|
+
return typeof n == "number" ? [{ target: u, operator: "length", param: null, value: Number(n) }] : typeof n == "boolean" ? [{ target: u, operator: "getProperty", param: a, value: !!n }] : typeof n == "object" ? Object.keys(n).map((i) => {
|
|
69
69
|
if (i === "length")
|
|
70
|
-
return { target:
|
|
71
|
-
const
|
|
72
|
-
return { target:
|
|
70
|
+
return { target: u, operator: "length", param: null, value: n[i] };
|
|
71
|
+
const r = i, f = n[i];
|
|
72
|
+
return { target: u, operator: "getProperty", param: r, value: f };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return Object.keys(
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
function d(a) {
|
|
76
|
+
return Object.keys(a).reduce((u, i) => {
|
|
77
|
+
const r = l(i, a[i]);
|
|
78
|
+
return u.push(...r), u;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
const
|
|
84
|
-
return
|
|
81
|
+
function p(a, n) {
|
|
82
|
+
if (o.has(a.operator)) {
|
|
83
|
+
const u = o.get(a.operator);
|
|
84
|
+
return u && u(a.target, a.param, a.value, n) || !1;
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function s(a, n) {
|
|
89
|
+
return d(a).reduce((r, f) => r && p(f, n), !0);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return i ? !
|
|
91
|
+
function g(a, n) {
|
|
92
|
+
const u = Object.keys(a), i = u.includes("allOf"), r = u.includes("anyOf"), f = i || r, R = (f ? a[f ? i ? "allOf" : "anyOf" : "allOf"] : [a]).map((j) => s(j, n));
|
|
93
|
+
return i ? !R.includes(!1) : R.includes(!0);
|
|
94
94
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: g };
|
|
96
96
|
}
|
|
97
97
|
const ee = {}, te = {};
|
|
98
98
|
I();
|
|
99
|
-
function ne(t, e, c = /* @__PURE__ */ new Map(),
|
|
100
|
-
return
|
|
101
|
-
const
|
|
102
|
-
return Object.assign(
|
|
99
|
+
function ne(t, e, c = /* @__PURE__ */ new Map(), o = (p, s, g) => s, l = {}, d = (p) => p) {
|
|
100
|
+
return $[e.title] = e, T[e.title] = o, ee[e.title] = l, te[e.title] = d, (p = {}) => {
|
|
101
|
+
const s = K(p, e, c), g = Object.keys(t).reduce((a, n) => (a[n] = t[n].default, a), {});
|
|
102
|
+
return Object.assign(g, s);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
function oe(t, e) {
|
|
@@ -169,22 +169,22 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
169
169
|
type: "boolean",
|
|
170
170
|
default: !0
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, fe = [
|
|
173
173
|
"id",
|
|
174
174
|
"type"
|
|
175
|
-
],
|
|
175
|
+
], pe = {
|
|
176
176
|
$schema: re,
|
|
177
177
|
$id: le,
|
|
178
178
|
title: ue,
|
|
179
179
|
description: ce,
|
|
180
180
|
type: ie,
|
|
181
181
|
properties: se,
|
|
182
|
-
required:
|
|
182
|
+
required: fe
|
|
183
183
|
};
|
|
184
184
|
function de(t, e, c) {
|
|
185
185
|
return e;
|
|
186
186
|
}
|
|
187
|
-
const he = "search-box", me = "A Farris Component",
|
|
187
|
+
const he = "search-box", me = "A Farris Component", ge = "object", ye = {
|
|
188
188
|
basic: {
|
|
189
189
|
description: "Basic Infomation",
|
|
190
190
|
title: "基本信息",
|
|
@@ -209,9 +209,9 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
209
209
|
}, be = {
|
|
210
210
|
title: he,
|
|
211
211
|
description: me,
|
|
212
|
-
type:
|
|
213
|
-
categories:
|
|
214
|
-
},
|
|
212
|
+
type: ge,
|
|
213
|
+
categories: ye
|
|
214
|
+
}, C = {
|
|
215
215
|
/**
|
|
216
216
|
* 自定义图标
|
|
217
217
|
*/
|
|
@@ -257,7 +257,7 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
257
257
|
/**
|
|
258
258
|
* popupOnFoucs TODO
|
|
259
259
|
*/
|
|
260
|
-
}, H = ne(
|
|
260
|
+
}, H = ne(C, pe, ae, de, be), ve = {
|
|
261
261
|
data: { type: Array, default: [] },
|
|
262
262
|
/** 确认结果事件 */
|
|
263
263
|
onConfirmResult: { type: Function, default: () => {
|
|
@@ -281,54 +281,54 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
281
281
|
*/
|
|
282
282
|
maxHeight: { default: 350, type: Number },
|
|
283
283
|
loading: { default: !1, type: Boolean }
|
|
284
|
-
}, L = /* @__PURE__ */
|
|
284
|
+
}, L = /* @__PURE__ */ M({
|
|
285
285
|
name: "FSearchBoxContainer",
|
|
286
286
|
props: ve,
|
|
287
287
|
emits: ["confirmResult", "searchedValue"],
|
|
288
288
|
setup(t, e) {
|
|
289
|
-
const c =
|
|
290
|
-
slots:
|
|
291
|
-
} = e,
|
|
289
|
+
const c = m(t.data), o = m(), {
|
|
290
|
+
slots: l
|
|
291
|
+
} = e, d = D(() => ({
|
|
292
292
|
"search-box-container": !0,
|
|
293
293
|
"f-utils-overflow-xhya": !0,
|
|
294
294
|
"position-relative": !0
|
|
295
295
|
}));
|
|
296
|
-
function
|
|
297
|
-
var
|
|
298
|
-
(
|
|
296
|
+
function p(n) {
|
|
297
|
+
var u;
|
|
298
|
+
(u = o.value) == null || u.search(n);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function s(n) {
|
|
301
301
|
n.length && (e.emit("confirmResult", n[0].name), e.emit("searchedValue", n));
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
return
|
|
303
|
+
function g(n) {
|
|
304
|
+
return l.default ? v(X, null, [l.default(n)]) : v("span", null, [n.item[t.textField]]);
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const a = D(() => {
|
|
307
307
|
const n = {};
|
|
308
308
|
return n.padding = "8px", t.maxHeight !== void 0 && t.maxHeight > 0 && (n.maxHeight = `${t.maxHeight}px`), n;
|
|
309
309
|
});
|
|
310
310
|
return S(() => t.loading, (n) => {
|
|
311
311
|
console.log("loading状态改变" + n);
|
|
312
312
|
}), S(() => t.data, (n) => {
|
|
313
|
-
n !== c.value && (c.value = n),
|
|
313
|
+
n !== c.value && (c.value = n), o.value.updateDataSource(n);
|
|
314
314
|
}), e.expose({
|
|
315
|
-
search:
|
|
315
|
+
search: p
|
|
316
316
|
}), () => {
|
|
317
317
|
const n = {
|
|
318
|
-
content:
|
|
318
|
+
content: g
|
|
319
319
|
};
|
|
320
320
|
return v("div", {
|
|
321
|
-
class:
|
|
322
|
-
style:
|
|
321
|
+
class: d.value,
|
|
322
|
+
style: a.value
|
|
323
323
|
}, [v(Q, {
|
|
324
324
|
ref: "loadingInstance",
|
|
325
325
|
isActive: t.loading
|
|
326
326
|
}, null), v(G, {
|
|
327
|
-
ref:
|
|
327
|
+
ref: o,
|
|
328
328
|
itemClass: "dropdown-item",
|
|
329
329
|
data: c.value,
|
|
330
330
|
view: "ContentView",
|
|
331
|
-
onClickItem: (
|
|
331
|
+
onClickItem: (u) => s(u.data),
|
|
332
332
|
idField: t.idField,
|
|
333
333
|
textField: t.textField,
|
|
334
334
|
titleField: t.textField,
|
|
@@ -336,32 +336,32 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
336
336
|
}, n)]);
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
}),
|
|
339
|
+
}), B = /* @__PURE__ */ M({
|
|
340
340
|
name: "FSearchBox",
|
|
341
|
-
props:
|
|
341
|
+
props: C,
|
|
342
342
|
emits: ["update:modelValue", "change", "selectedValue", "clickButton"],
|
|
343
343
|
setup(t, e) {
|
|
344
|
-
|
|
345
|
-
const c =
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
S(
|
|
349
|
-
var
|
|
350
|
-
(
|
|
351
|
-
}), S(() => t.modelValue, (
|
|
352
|
-
|
|
344
|
+
m(t.data);
|
|
345
|
+
const c = m(), o = m(), l = m(t.placeholder), d = '<i class="f-icon f-icon-clockwise f-icon-spin"></i>', p = D(() => t.loading ? d : t.buttonContent);
|
|
346
|
+
m(t.editable);
|
|
347
|
+
const s = m(t.modelValue);
|
|
348
|
+
S(s, (r) => {
|
|
349
|
+
var f;
|
|
350
|
+
(f = o.value) == null || f.search(r), e.emit("update:modelValue", r);
|
|
351
|
+
}), S(() => t.modelValue, (r) => {
|
|
352
|
+
s.value = r;
|
|
353
353
|
});
|
|
354
|
-
function
|
|
355
|
-
c.value.commitValue(
|
|
354
|
+
function g(r) {
|
|
355
|
+
c.value.commitValue(r);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
e.emit("change",
|
|
357
|
+
function a(r) {
|
|
358
|
+
e.emit("change", r);
|
|
359
359
|
}
|
|
360
|
-
function n(
|
|
361
|
-
e.emit("selectedValue",
|
|
360
|
+
function n(r) {
|
|
361
|
+
e.emit("selectedValue", r);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
e.emit("clickButton",
|
|
363
|
+
function u(r) {
|
|
364
|
+
e.emit("clickButton", r);
|
|
365
365
|
}
|
|
366
366
|
function i() {
|
|
367
367
|
c.value.togglePopup();
|
|
@@ -369,21 +369,21 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
369
369
|
return e.expose({
|
|
370
370
|
togglePopup: i
|
|
371
371
|
}), () => {
|
|
372
|
-
const
|
|
372
|
+
const r = {
|
|
373
373
|
default: e.slots.default
|
|
374
374
|
};
|
|
375
375
|
return v(J, {
|
|
376
376
|
ref: c,
|
|
377
|
-
"button-content":
|
|
377
|
+
"button-content": p.value,
|
|
378
378
|
"custom-class": t.customClass,
|
|
379
|
-
placeholder:
|
|
380
|
-
onChange: (
|
|
381
|
-
onClickButton: (
|
|
379
|
+
placeholder: l.value,
|
|
380
|
+
onChange: (f) => a(f),
|
|
381
|
+
onClickButton: (f) => u(f),
|
|
382
382
|
disable: t.disable,
|
|
383
383
|
"enable-clear": !0,
|
|
384
384
|
"button-behavior": "Execute",
|
|
385
|
-
modelValue:
|
|
386
|
-
"onUpdate:modelValue": (
|
|
385
|
+
modelValue: s.value,
|
|
386
|
+
"onUpdate:modelValue": (f) => s.value = f,
|
|
387
387
|
"popup-host": t.popupHost,
|
|
388
388
|
"popup-right-boundary": t.popupRightBoundary,
|
|
389
389
|
"popup-offset-x": t.popupOffsetX,
|
|
@@ -391,131 +391,131 @@ const he = "search-box", me = "A Farris Component", ye = "object", ge = {
|
|
|
391
391
|
"popup-on-focus": t.showDropdown
|
|
392
392
|
}, {
|
|
393
393
|
default: () => [t.showDropdown && v(L, {
|
|
394
|
-
ref:
|
|
394
|
+
ref: o,
|
|
395
395
|
data: t.data,
|
|
396
|
-
onConfirmResult:
|
|
397
|
-
onSearchedValue: (
|
|
396
|
+
onConfirmResult: g,
|
|
397
|
+
onSearchedValue: (f) => n(f),
|
|
398
398
|
loading: t.loading,
|
|
399
399
|
maxHeight: t.maxHeight
|
|
400
|
-
},
|
|
400
|
+
}, r)],
|
|
401
401
|
...e.slots
|
|
402
402
|
});
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
405
|
});
|
|
406
406
|
function Ve(t, e, c) {
|
|
407
|
-
var
|
|
408
|
-
function
|
|
407
|
+
var A;
|
|
408
|
+
function o() {
|
|
409
409
|
}
|
|
410
|
-
const
|
|
411
|
-
function
|
|
410
|
+
const l = "", d = "", p = m();
|
|
411
|
+
function s() {
|
|
412
412
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function g() {
|
|
415
415
|
return !1;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function a() {
|
|
418
418
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
419
419
|
}
|
|
420
420
|
function n() {
|
|
421
421
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
if (!
|
|
423
|
+
function u(h) {
|
|
424
|
+
if (!h || !h.value)
|
|
425
425
|
return null;
|
|
426
|
-
if (
|
|
427
|
-
return
|
|
428
|
-
const b = h
|
|
429
|
-
return
|
|
426
|
+
if (h.value.schema && h.value.schema.type === "component")
|
|
427
|
+
return h.value;
|
|
428
|
+
const b = m(h == null ? void 0 : h.value.parent), y = u(b);
|
|
429
|
+
return y || null;
|
|
430
430
|
}
|
|
431
|
-
function i(
|
|
432
|
-
const { componentInstance: b, designerItemElementRef:
|
|
433
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
431
|
+
function i(h = e) {
|
|
432
|
+
const { componentInstance: b, designerItemElementRef: y } = h;
|
|
433
|
+
return !b || !b.value ? null : b.value.canMove ? y : i(h.parent);
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function r(h) {
|
|
436
436
|
return !!c;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function f() {
|
|
439
439
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
440
440
|
}
|
|
441
441
|
function w() {
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function N(h, b) {
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
const { componentType:
|
|
447
|
-
let
|
|
448
|
-
const
|
|
449
|
-
return
|
|
445
|
+
function R(h, b) {
|
|
446
|
+
const { componentType: y } = h;
|
|
447
|
+
let V = E(y, h, b);
|
|
448
|
+
const O = y.toLowerCase().replace("-", "_");
|
|
449
|
+
return V && !V.id && V.type === y && (V.id = `${O}_${Math.random().toString().slice(2, 6)}`), V;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
let
|
|
455
|
-
const _ =
|
|
456
|
-
return
|
|
451
|
+
function k(h, b) {
|
|
452
|
+
const y = String(h.getAttribute("data-controltype")), V = h.getAttribute("data-feature"), O = V ? JSON.parse(V) : {};
|
|
453
|
+
O.parentComponentInstance = p.value;
|
|
454
|
+
let F = E(y, O);
|
|
455
|
+
const _ = y.toLowerCase().replace("-", "_");
|
|
456
|
+
return F && !F.id && F.type === y && (F.id = `${_}_${Math.random().toString().slice(2, 6)}`), F;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function j(h) {
|
|
459
459
|
}
|
|
460
|
-
function q(...
|
|
460
|
+
function q(...h) {
|
|
461
461
|
}
|
|
462
|
-
return
|
|
463
|
-
canMove:
|
|
464
|
-
canSelectParent:
|
|
465
|
-
canDelete:
|
|
462
|
+
return p.value = {
|
|
463
|
+
canMove: s(),
|
|
464
|
+
canSelectParent: g(),
|
|
465
|
+
canDelete: a(),
|
|
466
466
|
canNested: !n(),
|
|
467
467
|
contents: e == null ? void 0 : e.schema.contents,
|
|
468
468
|
elementRef: t,
|
|
469
|
-
parent: (
|
|
469
|
+
parent: (A = e == null ? void 0 : e.parent) == null ? void 0 : A.componentInstance,
|
|
470
470
|
schema: e == null ? void 0 : e.schema,
|
|
471
|
-
styles:
|
|
472
|
-
designerClass:
|
|
473
|
-
canAccepts:
|
|
474
|
-
getBelongedComponentInstance:
|
|
471
|
+
styles: l,
|
|
472
|
+
designerClass: d,
|
|
473
|
+
canAccepts: r,
|
|
474
|
+
getBelongedComponentInstance: u,
|
|
475
475
|
getDraggableDesignItemElement: i,
|
|
476
|
-
getDraggingDisplayText:
|
|
476
|
+
getDraggingDisplayText: f,
|
|
477
477
|
getPropConfig: q,
|
|
478
478
|
getDragScopeElement: w,
|
|
479
|
-
onAcceptMovedChildElement:
|
|
480
|
-
onAcceptNewChildElement:
|
|
481
|
-
onChildElementMovedOut:
|
|
482
|
-
addNewChildComponentSchema:
|
|
483
|
-
updateDragAndDropRules:
|
|
484
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
485
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
486
|
-
},
|
|
479
|
+
onAcceptMovedChildElement: N,
|
|
480
|
+
onAcceptNewChildElement: k,
|
|
481
|
+
onChildElementMovedOut: j,
|
|
482
|
+
addNewChildComponentSchema: R,
|
|
483
|
+
updateDragAndDropRules: o,
|
|
484
|
+
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
485
|
+
triggerBelongedComponentToDeleteWhenDeleted: m(!1)
|
|
486
|
+
}, p;
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const Be = /* @__PURE__ */ M({
|
|
489
489
|
name: "FSearchBoxDesign",
|
|
490
|
-
props:
|
|
490
|
+
props: C,
|
|
491
491
|
emits: ["update:modelValue", "change"],
|
|
492
492
|
setup(t, e) {
|
|
493
|
-
const c =
|
|
493
|
+
const c = m(t.data), o = m(), l = m(), d = m("请输入关键词"), p = m('<i class="f-icon f-icon-search"></i>'), s = m(t.modelValue), g = m(), a = U("design-item-context"), n = Ve(g, a);
|
|
494
494
|
W(() => {
|
|
495
|
-
|
|
496
|
-
}), e.expose(n.value), S(
|
|
497
|
-
var
|
|
498
|
-
(
|
|
499
|
-
}), S(() => t.modelValue, (
|
|
500
|
-
|
|
495
|
+
g.value.componentInstance = n;
|
|
496
|
+
}), e.expose(n.value), S(s, (r) => {
|
|
497
|
+
var f;
|
|
498
|
+
(f = l.value) == null || f.search(r), e.emit("update:modelValue", r);
|
|
499
|
+
}), S(() => t.modelValue, (r) => {
|
|
500
|
+
s.value = r;
|
|
501
501
|
});
|
|
502
|
-
function
|
|
503
|
-
|
|
502
|
+
function u(r) {
|
|
503
|
+
o.value.commitValue(r);
|
|
504
504
|
}
|
|
505
|
-
function i(
|
|
506
|
-
e.emit("change",
|
|
505
|
+
function i(r) {
|
|
506
|
+
e.emit("change", r);
|
|
507
507
|
}
|
|
508
508
|
return () => v("div", {
|
|
509
|
-
ref:
|
|
509
|
+
ref: g
|
|
510
510
|
}, [v(x("f-button-edit"), {
|
|
511
|
-
ref:
|
|
512
|
-
"button-content":
|
|
513
|
-
placeholder:
|
|
511
|
+
ref: o,
|
|
512
|
+
"button-content": p.value,
|
|
513
|
+
placeholder: d.value,
|
|
514
514
|
onChange: i,
|
|
515
515
|
"enable-clear": !0,
|
|
516
516
|
"button-behavior": "Execute",
|
|
517
|
-
modelValue:
|
|
518
|
-
"onUpdate:modelValue": (
|
|
517
|
+
modelValue: s.value,
|
|
518
|
+
"onUpdate:modelValue": (r) => s.value = r,
|
|
519
519
|
"popup-host": t.popupHost,
|
|
520
520
|
"popup-right-boundary": t.popupRightBoundary,
|
|
521
521
|
"popup-offset-x": t.popupOffsetX,
|
|
@@ -523,25 +523,25 @@ const Se = /* @__PURE__ */ j({
|
|
|
523
523
|
"popup-on-focus": !0
|
|
524
524
|
}, {
|
|
525
525
|
default: () => [v(L, {
|
|
526
|
-
ref:
|
|
526
|
+
ref: l,
|
|
527
527
|
data: c.value,
|
|
528
|
-
onConfirmResult:
|
|
528
|
+
onConfirmResult: u
|
|
529
529
|
}, null)]
|
|
530
530
|
})]);
|
|
531
531
|
}
|
|
532
532
|
});
|
|
533
|
-
|
|
534
|
-
t.component(
|
|
533
|
+
B.install = (t) => {
|
|
534
|
+
t.component(B.name, B);
|
|
535
535
|
};
|
|
536
|
-
|
|
537
|
-
t["search-box"] =
|
|
536
|
+
B.register = (t, e, c, o) => {
|
|
537
|
+
t["search-box"] = B, e["search-box"] = H;
|
|
538
538
|
};
|
|
539
|
-
|
|
540
|
-
t["search-box"] =
|
|
539
|
+
B.registerDesigner = (t, e, c) => {
|
|
540
|
+
t["search-box"] = Be, e["search-box"] = H;
|
|
541
541
|
};
|
|
542
542
|
export {
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
B as FSearchBox,
|
|
544
|
+
B as default,
|
|
545
545
|
H as propsResolver,
|
|
546
|
-
|
|
546
|
+
C as searchBoxProps
|
|
547
547
|
};
|