@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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isPlainObject as
|
|
1
|
+
import { defineComponent as N, ref as m, watch as D, computed as V, onMounted as P, createVNode as M, nextTick as T, inject as Q } from "vue";
|
|
2
|
+
import { isPlainObject as L, cloneDeep as U } from "lodash-es";
|
|
3
3
|
import { withInstall as X } from "../common/index.esm.js";
|
|
4
4
|
const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-design.gitee.io/capsule.schema.json", I = "capsule", K = "A Farris Component", x = "object", ee = {
|
|
5
5
|
id: {
|
|
@@ -74,103 +74,103 @@ const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-de
|
|
|
74
74
|
type: x,
|
|
75
75
|
properties: ee,
|
|
76
76
|
required: te
|
|
77
|
-
},
|
|
78
|
-
function
|
|
79
|
-
const { properties: e, title:
|
|
80
|
-
return (!s || !
|
|
77
|
+
}, q = {}, _ = {};
|
|
78
|
+
function F(n) {
|
|
79
|
+
const { properties: e, title: r, ignore: a } = n, s = a && Array.isArray(a), o = Object.keys(e).reduce((p, h) => ((!s || !a.find((O) => O == h)) && (p[h] = e[h].type === "object" && e[h].properties ? F(e[h]) : U(e[h].default)), p), {});
|
|
80
|
+
return r && (!s || !a.find((p) => p == "id")) && (o.id = `${r}-${Date.now()}`), o;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
let s =
|
|
86
|
-
const o =
|
|
87
|
-
return s = o ? o({ getSchemaByType:
|
|
82
|
+
function z(n, e = {}, r) {
|
|
83
|
+
const a = q[n];
|
|
84
|
+
if (a) {
|
|
85
|
+
let s = F(a);
|
|
86
|
+
const o = _[n];
|
|
87
|
+
return s = o ? o({ getSchemaByType: z }, s, e, r) : s, s;
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
function ae(n, e) {
|
|
92
|
-
const
|
|
93
|
-
return Object.keys(n).reduce((
|
|
92
|
+
const r = F(e);
|
|
93
|
+
return Object.keys(n).reduce((a, s) => (a[s] && L(a[s]) && L(n[s]) ? Object.assign(a[s], n[s]) : a[s] = n[s], a), r), r;
|
|
94
94
|
}
|
|
95
95
|
function le(n, e) {
|
|
96
|
-
return Object.keys(n).filter((
|
|
96
|
+
return Object.keys(n).filter((a) => n[a] != null).reduce((a, s) => {
|
|
97
97
|
if (e.has(s)) {
|
|
98
98
|
const o = e.get(s);
|
|
99
99
|
if (typeof o == "string")
|
|
100
|
-
|
|
100
|
+
a[o] = n[s];
|
|
101
101
|
else {
|
|
102
|
-
const
|
|
103
|
-
Object.assign(
|
|
102
|
+
const p = o(s, n[s], n);
|
|
103
|
+
Object.assign(a, p);
|
|
104
104
|
}
|
|
105
105
|
} else
|
|
106
|
-
|
|
107
|
-
return
|
|
106
|
+
a[s] = n[s];
|
|
107
|
+
return a;
|
|
108
108
|
}, {});
|
|
109
109
|
}
|
|
110
|
-
function se(n, e,
|
|
111
|
-
const
|
|
112
|
-
return le(
|
|
110
|
+
function se(n, e, r = /* @__PURE__ */ new Map()) {
|
|
111
|
+
const a = ae(n, e);
|
|
112
|
+
return le(a, r);
|
|
113
113
|
}
|
|
114
114
|
function ce(n = {}) {
|
|
115
|
-
function e(
|
|
116
|
-
if (typeof
|
|
117
|
-
return d[
|
|
118
|
-
if (typeof
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
return Number(d[
|
|
122
|
-
if (
|
|
123
|
-
return Number(d[
|
|
124
|
-
if (
|
|
125
|
-
return Number(d[
|
|
115
|
+
function e(c, f, i, d) {
|
|
116
|
+
if (typeof i == "number")
|
|
117
|
+
return d[c].length === i;
|
|
118
|
+
if (typeof i == "object") {
|
|
119
|
+
const y = Object.keys(i)[0], g = i[y];
|
|
120
|
+
if (y === "not")
|
|
121
|
+
return Number(d[c].length) !== Number(g);
|
|
122
|
+
if (y === "moreThan")
|
|
123
|
+
return Number(d[c].length) >= Number(g);
|
|
124
|
+
if (y === "lessThan")
|
|
125
|
+
return Number(d[c].length) <= Number(g);
|
|
126
126
|
}
|
|
127
127
|
return !1;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return d[
|
|
129
|
+
function r(c, f, i, d) {
|
|
130
|
+
return d[c] && d[c].propertyValue && String(d[c].propertyValue.value) === String(i);
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const a = /* @__PURE__ */ new Map([
|
|
133
133
|
["length", e],
|
|
134
|
-
["getProperty",
|
|
134
|
+
["getProperty", r]
|
|
135
135
|
]);
|
|
136
|
-
Object.keys(n).reduce((
|
|
137
|
-
function s(
|
|
138
|
-
const
|
|
139
|
-
return typeof f == "number" ? [{ target:
|
|
136
|
+
Object.keys(n).reduce((c, f) => (c.set(f, n[f]), c), a);
|
|
137
|
+
function s(c, f) {
|
|
138
|
+
const i = c;
|
|
139
|
+
return typeof f == "number" ? [{ target: i, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: i, operator: "getProperty", param: c, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
|
|
140
140
|
if (d === "length")
|
|
141
|
-
return { target:
|
|
142
|
-
const
|
|
143
|
-
return { target:
|
|
141
|
+
return { target: i, operator: "length", param: null, value: f[d] };
|
|
142
|
+
const y = d, g = f[d];
|
|
143
|
+
return { target: i, operator: "getProperty", param: y, value: g };
|
|
144
144
|
}) : [];
|
|
145
145
|
}
|
|
146
|
-
function o(
|
|
147
|
-
return Object.keys(
|
|
148
|
-
const
|
|
149
|
-
return
|
|
146
|
+
function o(c) {
|
|
147
|
+
return Object.keys(c).reduce((i, d) => {
|
|
148
|
+
const y = s(d, c[d]);
|
|
149
|
+
return i.push(...y), i;
|
|
150
150
|
}, []);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
return
|
|
152
|
+
function p(c, f) {
|
|
153
|
+
if (a.has(c.operator)) {
|
|
154
|
+
const i = a.get(c.operator);
|
|
155
|
+
return i && i(c.target, c.param, c.value, f) || !1;
|
|
156
156
|
}
|
|
157
157
|
return !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return o(
|
|
159
|
+
function h(c, f) {
|
|
160
|
+
return o(c).reduce((y, g) => y && p(g, f), !0);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
const
|
|
164
|
-
return d ? !
|
|
162
|
+
function O(c, f) {
|
|
163
|
+
const i = Object.keys(c), d = i.includes("allOf"), y = i.includes("anyOf"), g = d || y, S = (g ? c[g ? d ? "allOf" : "anyOf" : "allOf"] : [c]).map((E) => h(E, f));
|
|
164
|
+
return d ? !S.includes(!1) : S.includes(!0);
|
|
165
165
|
}
|
|
166
|
-
return { parseValueSchema:
|
|
166
|
+
return { parseValueSchema: O };
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const ue = {}, re = {};
|
|
169
169
|
ce();
|
|
170
|
-
function oe(n, e,
|
|
171
|
-
return
|
|
172
|
-
const
|
|
173
|
-
return Object.assign(
|
|
170
|
+
function oe(n, e, r = /* @__PURE__ */ new Map(), a = (p, h, O) => h, s = {}, o = (p) => p) {
|
|
171
|
+
return q[e.title] = e, _[e.title] = a, ue[e.title] = s, re[e.title] = o, (p = {}) => {
|
|
172
|
+
const h = se(p, e, r), O = Object.keys(n).reduce((c, f) => (c[f] = n[f].default, c), {});
|
|
173
|
+
return Object.assign(O, h);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
function ie(n, e) {
|
|
@@ -179,7 +179,7 @@ function ie(n, e) {
|
|
|
179
179
|
const pe = /* @__PURE__ */ new Map([
|
|
180
180
|
["appearance", ie]
|
|
181
181
|
]);
|
|
182
|
-
function fe(n, e,
|
|
182
|
+
function fe(n, e, r) {
|
|
183
183
|
return e;
|
|
184
184
|
}
|
|
185
185
|
const de = "capsule", ve = "A Farris Component", me = "object", ye = {
|
|
@@ -209,7 +209,7 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
|
|
|
209
209
|
description: ve,
|
|
210
210
|
type: me,
|
|
211
211
|
categories: ye
|
|
212
|
-
},
|
|
212
|
+
}, W = {
|
|
213
213
|
items: {
|
|
214
214
|
Type: Array,
|
|
215
215
|
default: [
|
|
@@ -230,292 +230,284 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
|
|
|
230
230
|
index: { type: Number, default: 0 },
|
|
231
231
|
show: { type: Boolean, default: !0 },
|
|
232
232
|
disabled: { type: Boolean, default: !1 }
|
|
233
|
-
},
|
|
233
|
+
}, G = oe(W, ne, pe, fe, he), H = /* @__PURE__ */ N({
|
|
234
234
|
name: "FCapsuleItem",
|
|
235
235
|
props: ge,
|
|
236
236
|
emits: ["mounted", "active"],
|
|
237
237
|
setup(n, e) {
|
|
238
|
-
const
|
|
239
|
-
D(() => n.isActive, (
|
|
240
|
-
|
|
238
|
+
const r = m(), a = m(n.isActive);
|
|
239
|
+
D(() => n.isActive, (p) => {
|
|
240
|
+
a.value = p;
|
|
241
241
|
});
|
|
242
|
-
const s =
|
|
242
|
+
const s = V(() => ({
|
|
243
243
|
"f-capsule-item": !0,
|
|
244
|
-
"f-capsule-active-item":
|
|
244
|
+
"f-capsule-active-item": a.value,
|
|
245
245
|
"f-capsule-disabled": n.disabled
|
|
246
246
|
}));
|
|
247
247
|
P(() => {
|
|
248
|
-
e.emit("mounted",
|
|
248
|
+
e.emit("mounted", r, n.value);
|
|
249
249
|
});
|
|
250
|
-
function o(
|
|
251
|
-
n.disabled || e.emit("active",
|
|
250
|
+
function o(p) {
|
|
251
|
+
n.disabled || e.emit("active", p, {
|
|
252
252
|
name: n.name,
|
|
253
253
|
value: n.value
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
return () =>
|
|
257
|
-
ref:
|
|
256
|
+
return () => M("div", {
|
|
257
|
+
ref: r,
|
|
258
258
|
class: s.value,
|
|
259
|
-
onClick: (
|
|
260
|
-
}, [n.icon &&
|
|
259
|
+
onClick: (p) => o(p)
|
|
260
|
+
}, [n.icon && M("i", {
|
|
261
261
|
class: n.icon
|
|
262
262
|
}, null), n.name]);
|
|
263
263
|
}
|
|
264
|
-
}), k = /* @__PURE__ */
|
|
264
|
+
}), k = /* @__PURE__ */ N({
|
|
265
265
|
name: "FCapsule",
|
|
266
|
-
props:
|
|
266
|
+
props: W,
|
|
267
267
|
emits: ["change", "update:modelValue"],
|
|
268
268
|
setup(n, e) {
|
|
269
|
-
const
|
|
270
|
-
const
|
|
269
|
+
const r = m(n.items), a = m(), s = 2, o = m(n.modelValue), p = m("none"), h = m(n.type), O = V(() => {
|
|
270
|
+
const l = {
|
|
271
271
|
"f-capsule-container": !0
|
|
272
272
|
};
|
|
273
|
-
return
|
|
274
|
-
}),
|
|
273
|
+
return h.value && (l[h.value] = !0), l;
|
|
274
|
+
}), c = V(() => ({})), f = V(() => ({
|
|
275
275
|
"f-capsule": !0
|
|
276
|
-
})),
|
|
277
|
-
left: `${
|
|
276
|
+
})), i = m(s), d = m(0), y = m(0), g = V(() => ({
|
|
277
|
+
left: `${i.value}px`,
|
|
278
278
|
width: `${d.value}px`,
|
|
279
|
-
transition:
|
|
280
|
-
})),
|
|
281
|
-
width: `${
|
|
279
|
+
transition: p.value
|
|
280
|
+
})), B = V(() => ({
|
|
281
|
+
width: `${y.value}px`
|
|
282
282
|
})), A = /* @__PURE__ */ new Map();
|
|
283
|
-
function
|
|
283
|
+
function S(l) {
|
|
284
284
|
var t;
|
|
285
|
-
if (A.has(
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
const
|
|
289
|
-
|
|
285
|
+
if (A.has(l.value)) {
|
|
286
|
+
const u = (t = A.get(l.value)) == null ? void 0 : t.value;
|
|
287
|
+
if (u) {
|
|
288
|
+
const b = u.getBoundingClientRect(), $ = a.value.getBoundingClientRect();
|
|
289
|
+
i.value = b.left - $.left + s + a.value.scrollLeft, d.value = b.width - 2 * s;
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
const
|
|
295
|
-
o.value =
|
|
293
|
+
function R(l, t) {
|
|
294
|
+
const u = l.value;
|
|
295
|
+
o.value = u, e.emit("update:modelValue", u), S(l), t && e.emit("change", u);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
const t =
|
|
299
|
-
t > -1 &&
|
|
297
|
+
function E(l) {
|
|
298
|
+
const t = r.value.findIndex((u) => u.value === l);
|
|
299
|
+
t > -1 && R(r.value[t], !1);
|
|
300
300
|
}
|
|
301
|
-
D(() => n.modelValue, (
|
|
302
|
-
o.value =
|
|
303
|
-
}), D(() => n.items, async (
|
|
304
|
-
const t =
|
|
305
|
-
|
|
301
|
+
D(() => n.modelValue, (l) => {
|
|
302
|
+
o.value = l, E(o.value);
|
|
303
|
+
}), D(() => n.items, async (l) => {
|
|
304
|
+
const t = l.filter((u) => u.show);
|
|
305
|
+
j(t), r.value = t, await T(), E(o.value), y.value = Array.from(A.values()).reduce((u, b) => (u += b.value.clientWidth, u), 0);
|
|
306
306
|
}), P(async () => {
|
|
307
|
-
|
|
307
|
+
E(o.value), await T(), p.value = "0.1s ease-out all", y.value = Array.from(A.values()).reduce((l, t) => (l += t.value.clientWidth, l), 0);
|
|
308
308
|
});
|
|
309
|
-
function
|
|
310
|
-
|
|
309
|
+
function C(l, t) {
|
|
310
|
+
R(t, !0);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
A.set(t,
|
|
312
|
+
function v(l, t) {
|
|
313
|
+
A.set(t, l);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function j(l) {
|
|
316
316
|
Array.from(A.keys()).forEach((t) => {
|
|
317
|
-
|
|
317
|
+
l.find((b) => b.value === t) || A.delete(t);
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
322
|
-
name:
|
|
323
|
-
value:
|
|
324
|
-
isActive:
|
|
320
|
+
function w(l, t) {
|
|
321
|
+
return M(H, {
|
|
322
|
+
name: l.name,
|
|
323
|
+
value: l.value,
|
|
324
|
+
isActive: l.value === o.value,
|
|
325
325
|
index: t,
|
|
326
|
-
disabled:
|
|
327
|
-
key:
|
|
328
|
-
onMounted:
|
|
329
|
-
onActive:
|
|
326
|
+
disabled: l.disabled,
|
|
327
|
+
key: l.value,
|
|
328
|
+
onMounted: v,
|
|
329
|
+
onActive: C
|
|
330
330
|
}, null);
|
|
331
331
|
}
|
|
332
|
-
return () =>
|
|
333
|
-
ref:
|
|
334
|
-
class:
|
|
335
|
-
style:
|
|
336
|
-
}, [
|
|
332
|
+
return () => M("span", {
|
|
333
|
+
ref: a,
|
|
334
|
+
class: O.value,
|
|
335
|
+
style: c.value
|
|
336
|
+
}, [M("span", {
|
|
337
337
|
class: "f-capsule-pane"
|
|
338
|
-
}, [
|
|
338
|
+
}, [r.value.map((l, t) => w(l, t))]), M("small", {
|
|
339
339
|
class: f.value,
|
|
340
|
-
style:
|
|
341
|
-
}, null),
|
|
340
|
+
style: g.value
|
|
341
|
+
}, null), M("div", {
|
|
342
342
|
class: "f-capsule-board",
|
|
343
|
-
style:
|
|
343
|
+
style: B.value
|
|
344
344
|
}, null)]);
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
function be(n, e,
|
|
348
|
-
var
|
|
349
|
-
function
|
|
347
|
+
function be(n, e, r) {
|
|
348
|
+
var C;
|
|
349
|
+
function a() {
|
|
350
350
|
}
|
|
351
|
-
const s = "", o = "",
|
|
352
|
-
function
|
|
351
|
+
const s = "", o = "", p = m();
|
|
352
|
+
function h() {
|
|
353
353
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function O() {
|
|
356
356
|
return !1;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function c() {
|
|
359
359
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
360
360
|
}
|
|
361
361
|
function f() {
|
|
362
362
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function i(v) {
|
|
365
365
|
if (!v || !v.value)
|
|
366
366
|
return null;
|
|
367
367
|
if (v.value.schema && v.value.schema.type === "component")
|
|
368
368
|
return v.value;
|
|
369
|
-
const
|
|
370
|
-
return
|
|
369
|
+
const j = m(v == null ? void 0 : v.value.parent), w = i(j);
|
|
370
|
+
return w || null;
|
|
371
371
|
}
|
|
372
372
|
function d(v = e) {
|
|
373
|
-
const { componentInstance:
|
|
374
|
-
return !
|
|
373
|
+
const { componentInstance: j, designerItemElementRef: w } = v;
|
|
374
|
+
return !j || !j.value ? null : j.value.canMove ? w : d(v.parent);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
return !!
|
|
376
|
+
function y(v) {
|
|
377
|
+
return !!r;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function g() {
|
|
380
380
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
}
|
|
384
|
-
function A(v, O) {
|
|
382
|
+
function B() {
|
|
385
383
|
}
|
|
386
|
-
function
|
|
387
|
-
const { componentType: a } = v;
|
|
388
|
-
let t = N(a, v, O);
|
|
389
|
-
const c = a.toLowerCase().replace("-", "_");
|
|
390
|
-
return t && !t.id && t.type === a && (t.id = `${c}_${Math.random().toString().slice(2, 6)}`), t;
|
|
384
|
+
function A(v, j) {
|
|
391
385
|
}
|
|
392
|
-
function
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
|
|
386
|
+
function S(v, j) {
|
|
387
|
+
const { componentType: w } = v;
|
|
388
|
+
let l = z(w, v, j);
|
|
389
|
+
const t = w.toLowerCase().replace("-", "_");
|
|
390
|
+
return l && !l.id && l.type === w && (l.id = `${t}_${Math.random().toString().slice(2, 6)}`), l;
|
|
398
391
|
}
|
|
399
|
-
function
|
|
392
|
+
function R(v) {
|
|
400
393
|
}
|
|
401
|
-
function
|
|
394
|
+
function E(...v) {
|
|
402
395
|
}
|
|
403
|
-
return
|
|
404
|
-
canMove:
|
|
405
|
-
canSelectParent:
|
|
406
|
-
canDelete:
|
|
396
|
+
return p.value = {
|
|
397
|
+
canMove: h(),
|
|
398
|
+
canSelectParent: O(),
|
|
399
|
+
canDelete: c(),
|
|
407
400
|
canNested: !f(),
|
|
408
401
|
contents: e == null ? void 0 : e.schema.contents,
|
|
409
402
|
elementRef: n,
|
|
410
|
-
parent: (
|
|
403
|
+
parent: (C = e == null ? void 0 : e.parent) == null ? void 0 : C.componentInstance,
|
|
411
404
|
schema: e == null ? void 0 : e.schema,
|
|
412
405
|
styles: s,
|
|
413
406
|
designerClass: o,
|
|
414
|
-
canAccepts:
|
|
415
|
-
getBelongedComponentInstance:
|
|
407
|
+
canAccepts: y,
|
|
408
|
+
getBelongedComponentInstance: i,
|
|
416
409
|
getDraggableDesignItemElement: d,
|
|
417
|
-
getDraggingDisplayText:
|
|
418
|
-
getPropConfig:
|
|
419
|
-
getDragScopeElement:
|
|
410
|
+
getDraggingDisplayText: g,
|
|
411
|
+
getPropConfig: E,
|
|
412
|
+
getDragScopeElement: B,
|
|
420
413
|
onAcceptMovedChildElement: A,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}, i;
|
|
414
|
+
onChildElementMovedOut: R,
|
|
415
|
+
addNewChildComponentSchema: S,
|
|
416
|
+
updateDragAndDropRules: a,
|
|
417
|
+
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
418
|
+
triggerBelongedComponentToDeleteWhenDeleted: m(!1)
|
|
419
|
+
}, p;
|
|
428
420
|
}
|
|
429
|
-
const
|
|
421
|
+
const je = /* @__PURE__ */ N({
|
|
430
422
|
name: "FCapsuleDesign",
|
|
431
|
-
props:
|
|
423
|
+
props: W,
|
|
432
424
|
emits: ["change", "update:modelValue"],
|
|
433
425
|
setup(n, e) {
|
|
434
|
-
const
|
|
426
|
+
const r = m(n.items), a = m(), s = 2, o = m(n.modelValue), p = m("none"), h = m(n.type), O = Q("design-item-context"), c = be(a, O);
|
|
435
427
|
P(() => {
|
|
436
|
-
|
|
437
|
-
}), e.expose(
|
|
438
|
-
const f =
|
|
428
|
+
a.value.componentInstance = c;
|
|
429
|
+
}), e.expose(c.value);
|
|
430
|
+
const f = V(() => {
|
|
439
431
|
const t = {
|
|
440
432
|
"f-capsule-container": !0
|
|
441
433
|
};
|
|
442
|
-
return
|
|
443
|
-
}),
|
|
434
|
+
return h.value && (t[h.value] = !0), t;
|
|
435
|
+
}), i = V(() => ({})), d = V(() => ({
|
|
444
436
|
"f-capsule": !0
|
|
445
|
-
})),
|
|
446
|
-
left: `${
|
|
447
|
-
width: `${
|
|
448
|
-
transition:
|
|
449
|
-
})),
|
|
450
|
-
width: `${
|
|
451
|
-
})),
|
|
452
|
-
function
|
|
453
|
-
var
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
437
|
+
})), y = m(s), g = m(0), B = m(0), A = V(() => ({
|
|
438
|
+
left: `${y.value}px`,
|
|
439
|
+
width: `${g.value}px`,
|
|
440
|
+
transition: p.value
|
|
441
|
+
})), S = V(() => ({
|
|
442
|
+
width: `${B.value}px`
|
|
443
|
+
})), R = /* @__PURE__ */ new Map();
|
|
444
|
+
function E(t) {
|
|
445
|
+
var u;
|
|
446
|
+
if (R.has(t.value)) {
|
|
447
|
+
const b = (u = R.get(t.value)) == null ? void 0 : u.value;
|
|
448
|
+
if (b) {
|
|
449
|
+
const $ = b.getBoundingClientRect(), J = a.value.getBoundingClientRect();
|
|
450
|
+
y.value = $.left - J.left + s + a.value.scrollLeft, g.value = $.width - 2 * s;
|
|
459
451
|
}
|
|
460
452
|
}
|
|
461
453
|
}
|
|
462
|
-
function
|
|
463
|
-
const
|
|
464
|
-
o.value =
|
|
454
|
+
function C(t, u) {
|
|
455
|
+
const b = t.value;
|
|
456
|
+
o.value = b, e.emit("update:modelValue", b), E(t), u && e.emit("change", b);
|
|
465
457
|
}
|
|
466
|
-
function
|
|
467
|
-
const
|
|
468
|
-
|
|
458
|
+
function v(t) {
|
|
459
|
+
const u = r.value.findIndex((b) => b.value === t);
|
|
460
|
+
u > -1 && C(r.value[u], !1);
|
|
469
461
|
}
|
|
470
462
|
D(() => n.modelValue, (t) => {
|
|
471
|
-
o.value = t,
|
|
463
|
+
o.value = t, v(o.value);
|
|
472
464
|
}), D(() => n.items, async (t) => {
|
|
473
|
-
|
|
465
|
+
r.value = t, await T(), v(o.value), B.value = Array.from(R.values()).reduce((u, b) => (u += b.value.clientWidth, u), 0);
|
|
474
466
|
}), P(async () => {
|
|
475
|
-
|
|
467
|
+
v(o.value), await T(), p.value = "0.1s ease-out all", B.value = Array.from(R.values()).reduce((t, u) => (t += u.value.clientWidth, t), 0);
|
|
476
468
|
});
|
|
477
|
-
function
|
|
478
|
-
|
|
469
|
+
function j(t, u) {
|
|
470
|
+
C(u, !0);
|
|
479
471
|
}
|
|
480
|
-
function
|
|
481
|
-
|
|
472
|
+
function w(t, u) {
|
|
473
|
+
R.set(u, t);
|
|
482
474
|
}
|
|
483
|
-
function
|
|
484
|
-
return
|
|
475
|
+
function l(t, u) {
|
|
476
|
+
return M(H, {
|
|
485
477
|
name: t.name,
|
|
486
478
|
value: t.value,
|
|
487
479
|
isActive: t.value === o.value,
|
|
488
|
-
index:
|
|
489
|
-
onMounted:
|
|
490
|
-
onActive:
|
|
480
|
+
index: u,
|
|
481
|
+
onMounted: w,
|
|
482
|
+
onActive: j
|
|
491
483
|
}, null);
|
|
492
484
|
}
|
|
493
|
-
return () =>
|
|
494
|
-
ref:
|
|
485
|
+
return () => M("span", {
|
|
486
|
+
ref: a,
|
|
495
487
|
class: f.value,
|
|
496
|
-
style:
|
|
497
|
-
}, [
|
|
488
|
+
style: i.value
|
|
489
|
+
}, [M("span", {
|
|
498
490
|
class: "f-capsule-pane"
|
|
499
|
-
}, [
|
|
491
|
+
}, [r.value.map((t, u) => l(t, u))]), M("small", {
|
|
500
492
|
class: d.value,
|
|
501
493
|
style: A.value
|
|
502
|
-
}, null),
|
|
494
|
+
}, null), M("div", {
|
|
503
495
|
class: "f-capsule-board",
|
|
504
|
-
style:
|
|
496
|
+
style: S.value
|
|
505
497
|
}, null)]);
|
|
506
498
|
}
|
|
507
499
|
});
|
|
508
|
-
k.register = (n, e,
|
|
509
|
-
n.capsule = k, e.capsule =
|
|
500
|
+
k.register = (n, e, r) => {
|
|
501
|
+
n.capsule = k, e.capsule = G;
|
|
510
502
|
};
|
|
511
|
-
k.registerDesigner = (n, e,
|
|
512
|
-
n.capsule =
|
|
503
|
+
k.registerDesigner = (n, e, r) => {
|
|
504
|
+
n.capsule = je, e.capsule = G;
|
|
513
505
|
};
|
|
514
506
|
const Me = X(k);
|
|
515
507
|
export {
|
|
516
508
|
k as FCapsule,
|
|
517
509
|
ge as capsuleItemProps,
|
|
518
|
-
|
|
510
|
+
W as capsuleProps,
|
|
519
511
|
Me as default,
|
|
520
|
-
|
|
512
|
+
G as propsResolver
|
|
521
513
|
};
|