@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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 +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
1
|
+
import { defineComponent as A, ref as D, inject as z, onMounted as G, createVNode as S, computed as q, toRefs as oe, watch as W } from "vue";
|
|
2
2
|
import { useDesignerComponent as ie } from "../designer-canvas/index.esm.js";
|
|
3
3
|
import { InputBaseProperty as ae } from "../property-panel/index.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import { createPropsResolver as
|
|
6
|
-
import {
|
|
4
|
+
import se from "../button-edit/index.esm.js";
|
|
5
|
+
import { createPropsResolver as le } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { cloneDeep as _, isPlainObject as U } from "lodash-es";
|
|
7
7
|
import { FInputGroup as ue } from "../input-group/index.esm.js";
|
|
8
8
|
import { useI18n as ce } from "vue-i18n";
|
|
9
|
-
class
|
|
9
|
+
class pe extends ae {
|
|
10
10
|
constructor(t, n) {
|
|
11
11
|
super(t, n);
|
|
12
12
|
}
|
|
@@ -26,10 +26,10 @@ class fe extends ae {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function fe(e, t) {
|
|
30
30
|
function n(a, g) {
|
|
31
31
|
const y = e.schema;
|
|
32
|
-
return new
|
|
32
|
+
return new pe(a, t).getPropertyConfig(y, g);
|
|
33
33
|
}
|
|
34
34
|
return { getPropsConfig: n };
|
|
35
35
|
}
|
|
@@ -42,7 +42,7 @@ const de = /* @__PURE__ */ A({
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
setup(e, t) {
|
|
45
|
-
const n =
|
|
45
|
+
const n = D(), a = z("design-item-context"), g = z("designer-host-service"), y = fe(a, g), c = ie(n, a, y);
|
|
46
46
|
return G(() => {
|
|
47
47
|
n.value.componentInstance = c;
|
|
48
48
|
}), t.expose(c.value), () => S("div", {
|
|
@@ -67,18 +67,18 @@ const de = /* @__PURE__ */ A({
|
|
|
67
67
|
});
|
|
68
68
|
function H(e, t) {
|
|
69
69
|
let n;
|
|
70
|
-
function a(
|
|
71
|
-
const { properties:
|
|
72
|
-
if (d && (!i || !o.find((
|
|
73
|
-
const
|
|
74
|
-
r.id = `${
|
|
70
|
+
function a(s) {
|
|
71
|
+
const { properties: l, title: d, ignore: o } = s, i = o && Array.isArray(o), r = Object.keys(l).reduce((p, v) => ((!i || !o.find((x) => x === v)) && (p[v] = l[v].type === "object" && l[v].properties ? a(l[v]) : _(l[v].default)), p), {});
|
|
72
|
+
if (d && (!i || !o.find((p) => p === "id"))) {
|
|
73
|
+
const p = d.toLowerCase().replace(/-/g, "_");
|
|
74
|
+
r.id = `${p}_${Math.random().toString().slice(2, 6)}`;
|
|
75
75
|
}
|
|
76
76
|
return r;
|
|
77
77
|
}
|
|
78
|
-
function g(
|
|
79
|
-
const { properties:
|
|
78
|
+
function g(s) {
|
|
79
|
+
const { properties: l, title: d, required: o } = s;
|
|
80
80
|
if (o && Array.isArray(o)) {
|
|
81
|
-
const i = o.reduce((r,
|
|
81
|
+
const i = o.reduce((r, p) => (r[p] = l[p].type === "object" && l[p].properties ? a(l[p]) : _(l[p].default), r), {});
|
|
82
82
|
if (d && o.find((r) => r === "id")) {
|
|
83
83
|
const r = d.toLowerCase().replace(/-/g, "_");
|
|
84
84
|
i.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -89,111 +89,111 @@ function H(e, t) {
|
|
|
89
89
|
type: d
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function y(
|
|
93
|
-
const o = e[
|
|
92
|
+
function y(s, l = {}, d) {
|
|
93
|
+
const o = e[s];
|
|
94
94
|
if (o) {
|
|
95
95
|
let i = g(o);
|
|
96
|
-
const r = t[
|
|
97
|
-
return i = r ? r({ getSchemaByType: y }, i,
|
|
96
|
+
const r = t[s];
|
|
97
|
+
return i = r ? r({ getSchemaByType: y }, i, l, d) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
|
|
98
98
|
}
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
101
|
-
function c(
|
|
102
|
-
const d = a(
|
|
103
|
-
return Object.keys(d).reduce((o, i) => (Object.prototype.hasOwnProperty.call(
|
|
101
|
+
function c(s, l) {
|
|
102
|
+
const d = a(l);
|
|
103
|
+
return Object.keys(d).reduce((o, i) => (Object.prototype.hasOwnProperty.call(s, i) && (o[i] && U(o[i]) && U(s[i] || !s[i]) ? Object.assign(o[i], s[i] || {}) : o[i] = s[i]), o), d), d;
|
|
104
104
|
}
|
|
105
|
-
function F(
|
|
106
|
-
return Object.keys(
|
|
107
|
-
if (
|
|
108
|
-
const r =
|
|
105
|
+
function F(s, l) {
|
|
106
|
+
return Object.keys(s).filter((o) => s[o] != null).reduce((o, i) => {
|
|
107
|
+
if (l.has(i)) {
|
|
108
|
+
const r = l.get(i);
|
|
109
109
|
if (typeof r == "string")
|
|
110
|
-
o[r] =
|
|
110
|
+
o[r] = s[i];
|
|
111
111
|
else {
|
|
112
|
-
const
|
|
113
|
-
Object.assign(o,
|
|
112
|
+
const p = r(i, s[i], s);
|
|
113
|
+
Object.assign(o, p);
|
|
114
114
|
}
|
|
115
115
|
} else
|
|
116
|
-
o[i] =
|
|
116
|
+
o[i] = s[i];
|
|
117
117
|
return o;
|
|
118
118
|
}, {});
|
|
119
119
|
}
|
|
120
|
-
function E(
|
|
121
|
-
const o = c(
|
|
120
|
+
function E(s, l, d = /* @__PURE__ */ new Map()) {
|
|
121
|
+
const o = c(s, l);
|
|
122
122
|
return F(o, d);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function f(s) {
|
|
125
125
|
var d;
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
const o = e[
|
|
126
|
+
const l = s.type;
|
|
127
|
+
if (l) {
|
|
128
|
+
const o = e[l];
|
|
129
129
|
if (!o)
|
|
130
|
-
return
|
|
131
|
-
const i = c(
|
|
130
|
+
return s;
|
|
131
|
+
const i = c(s, o), r = ((d = s.editor) == null ? void 0 : d.type) || "";
|
|
132
132
|
if (r) {
|
|
133
|
-
const
|
|
133
|
+
const p = e[r], v = c(s.editor, p);
|
|
134
134
|
i.editor = v;
|
|
135
135
|
}
|
|
136
136
|
return i;
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return s;
|
|
139
139
|
}
|
|
140
|
-
function m(
|
|
141
|
-
n =
|
|
140
|
+
function m(s) {
|
|
141
|
+
n = s;
|
|
142
142
|
}
|
|
143
|
-
return { getSchemaByType: y, resolveSchemaWithDefaultValue:
|
|
143
|
+
return { getSchemaByType: y, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: E, mappingSchemaToProps: F, setDesignerContext: m };
|
|
144
144
|
}
|
|
145
|
-
const me = {}, ge = {}, { resolveSchemaWithDefaultValue: ve } = H(me, ge);
|
|
145
|
+
const me = {}, ge = {}, { getSchemaByType: mt, resolveSchemaWithDefaultValue: ve, resolveSchemaToProps: gt, mappingSchemaToProps: vt, setDesignerContext: bt } = H(me, ge);
|
|
146
146
|
function be(e = {}) {
|
|
147
|
-
function t(
|
|
148
|
-
if (typeof
|
|
149
|
-
return
|
|
150
|
-
if (typeof
|
|
151
|
-
const d = Object.keys(
|
|
147
|
+
function t(f, m, s, l) {
|
|
148
|
+
if (typeof s == "number")
|
|
149
|
+
return l[f].length === s;
|
|
150
|
+
if (typeof s == "object") {
|
|
151
|
+
const d = Object.keys(s)[0], o = s[d];
|
|
152
152
|
if (d === "not")
|
|
153
|
-
return Number(
|
|
153
|
+
return Number(l[f].length) !== Number(o);
|
|
154
154
|
if (d === "moreThan")
|
|
155
|
-
return Number(
|
|
155
|
+
return Number(l[f].length) >= Number(o);
|
|
156
156
|
if (d === "lessThan")
|
|
157
|
-
return Number(
|
|
157
|
+
return Number(l[f].length) <= Number(o);
|
|
158
158
|
}
|
|
159
159
|
return !1;
|
|
160
160
|
}
|
|
161
|
-
function n(
|
|
162
|
-
return
|
|
161
|
+
function n(f, m, s, l) {
|
|
162
|
+
return l[f] && l[f].propertyValue && String(l[f].propertyValue.value) === String(s);
|
|
163
163
|
}
|
|
164
164
|
const a = /* @__PURE__ */ new Map([
|
|
165
165
|
["length", t],
|
|
166
166
|
["getProperty", n]
|
|
167
167
|
]);
|
|
168
|
-
Object.keys(e).reduce((
|
|
169
|
-
function g(
|
|
170
|
-
const
|
|
171
|
-
return typeof m == "number" ? [{ target:
|
|
172
|
-
if (
|
|
173
|
-
return { target:
|
|
174
|
-
const d =
|
|
175
|
-
return { target:
|
|
168
|
+
Object.keys(e).reduce((f, m) => (f.set(m, e[m]), f), a);
|
|
169
|
+
function g(f, m) {
|
|
170
|
+
const s = f;
|
|
171
|
+
return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: s, operator: "getProperty", param: f, value: !!m }] : typeof m == "object" ? Object.keys(m).map((l) => {
|
|
172
|
+
if (l === "length")
|
|
173
|
+
return { target: s, operator: "length", param: null, value: m[l] };
|
|
174
|
+
const d = l, o = m[l];
|
|
175
|
+
return { target: s, operator: "getProperty", param: d, value: o };
|
|
176
176
|
}) : [];
|
|
177
177
|
}
|
|
178
|
-
function y(
|
|
179
|
-
return Object.keys(
|
|
180
|
-
const d = g(
|
|
181
|
-
return
|
|
178
|
+
function y(f) {
|
|
179
|
+
return Object.keys(f).reduce((s, l) => {
|
|
180
|
+
const d = g(l, f[l]);
|
|
181
|
+
return s.push(...d), s;
|
|
182
182
|
}, []);
|
|
183
183
|
}
|
|
184
|
-
function c(
|
|
185
|
-
if (a.has(
|
|
186
|
-
const
|
|
187
|
-
return
|
|
184
|
+
function c(f, m) {
|
|
185
|
+
if (a.has(f.operator)) {
|
|
186
|
+
const s = a.get(f.operator);
|
|
187
|
+
return s && s(f.target, f.param, f.value, m) || !1;
|
|
188
188
|
}
|
|
189
189
|
return !1;
|
|
190
190
|
}
|
|
191
|
-
function F(
|
|
192
|
-
return y(
|
|
191
|
+
function F(f, m) {
|
|
192
|
+
return y(f).reduce((d, o) => d && c(o, m), !0);
|
|
193
193
|
}
|
|
194
|
-
function E(
|
|
195
|
-
const
|
|
196
|
-
return
|
|
194
|
+
function E(f, m) {
|
|
195
|
+
const s = Object.keys(f), l = s.includes("allOf"), d = s.includes("anyOf"), o = l || d, p = (o ? f[o ? l ? "allOf" : "anyOf" : "allOf"] : [f]).map((x) => F(x, m));
|
|
196
|
+
return l ? !p.includes(!1) : p.includes(!0);
|
|
197
197
|
}
|
|
198
198
|
return { parseValueSchema: E };
|
|
199
199
|
}
|
|
@@ -209,7 +209,7 @@ const ye = {
|
|
|
209
209
|
e.editor && (e.editor[t] = n);
|
|
210
210
|
},
|
|
211
211
|
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
212
|
-
},
|
|
212
|
+
}, he = {
|
|
213
213
|
button: { type: "button", name: "按钮" },
|
|
214
214
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
215
215
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -256,13 +256,13 @@ const ye = {
|
|
|
256
256
|
"list-view": { type: "list-view", name: "列表" },
|
|
257
257
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
258
258
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
259
|
-
},
|
|
259
|
+
}, Te = {
|
|
260
260
|
convertFrom: (e, t, n) => {
|
|
261
261
|
var g;
|
|
262
262
|
const a = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
263
|
-
return ((g =
|
|
263
|
+
return ((g = he[a]) == null ? void 0 : g.name) || a;
|
|
264
264
|
}
|
|
265
|
-
},
|
|
265
|
+
}, Ce = {
|
|
266
266
|
convertTo: (e, t, n, a) => {
|
|
267
267
|
e[t] = e[t];
|
|
268
268
|
},
|
|
@@ -316,7 +316,7 @@ const ye = {
|
|
|
316
316
|
]));
|
|
317
317
|
},
|
|
318
318
|
convertFrom: (e, t, n) => e.command && t === "enable" ? e.command.enable : ""
|
|
319
|
-
},
|
|
319
|
+
}, Pe = {
|
|
320
320
|
convertTo: (e, t, n, a) => {
|
|
321
321
|
e.column ? e.column[t] = n : e.column = {
|
|
322
322
|
[t]: n
|
|
@@ -331,7 +331,7 @@ const ye = {
|
|
|
331
331
|
}
|
|
332
332
|
return "";
|
|
333
333
|
}
|
|
334
|
-
},
|
|
334
|
+
}, we = {
|
|
335
335
|
convertTo: (e, t, n, a) => {
|
|
336
336
|
e.summary ? e.summary[t] = n : e.summary = {
|
|
337
337
|
[t]: n
|
|
@@ -372,12 +372,12 @@ const ye = {
|
|
|
372
372
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
373
373
|
},
|
|
374
374
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
375
|
-
},
|
|
375
|
+
}, De = {
|
|
376
376
|
convertTo: (e, t, n, a) => {
|
|
377
377
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
378
378
|
},
|
|
379
379
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
380
|
-
},
|
|
380
|
+
}, ke = {
|
|
381
381
|
convertTo: (e, t, n, a) => {
|
|
382
382
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
383
383
|
},
|
|
@@ -444,18 +444,18 @@ function J(e, t, n) {
|
|
|
444
444
|
["/converter/buttons.converter", xe],
|
|
445
445
|
["/converter/property-editor.converter", Se],
|
|
446
446
|
["/converter/items-count.converter", Re],
|
|
447
|
-
["/converter/type.converter",
|
|
448
|
-
["/converter/change-editor.converter",
|
|
447
|
+
["/converter/type.converter", Te],
|
|
448
|
+
["/converter/change-editor.converter", Ce],
|
|
449
449
|
["/converter/change-formatter.converter", Fe],
|
|
450
450
|
["/converter/column-command.converter", Oe],
|
|
451
|
-
["/converter/column-option.converter",
|
|
452
|
-
["/converter/summary.converter",
|
|
451
|
+
["/converter/column-option.converter", Pe],
|
|
452
|
+
["/converter/summary.converter", we],
|
|
453
453
|
["/converter/group.converter", je],
|
|
454
454
|
["/converter/form-group-label.converter", Me],
|
|
455
455
|
["/converter/field-selector.converter", Ee],
|
|
456
456
|
["/converter/pagination.converter", Le],
|
|
457
|
-
["/converter/row-number.converter",
|
|
458
|
-
["/converter/grid-selection.converter",
|
|
457
|
+
["/converter/row-number.converter", De],
|
|
458
|
+
["/converter/grid-selection.converter", ke],
|
|
459
459
|
["/converter/size.converter", Ne],
|
|
460
460
|
["/converter/change-formatter-enum.converter", Be],
|
|
461
461
|
["/converter/grid-sort.converter", $e],
|
|
@@ -495,78 +495,78 @@ function J(e, t, n) {
|
|
|
495
495
|
function E(o, i, r) {
|
|
496
496
|
return o.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly : c(i.readonly, r) : () => !1;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function f(o, i) {
|
|
499
499
|
const r = o.$converter || i;
|
|
500
500
|
return typeof r == "string" && r && a.has(r) ? a.get(r) || null : r || null;
|
|
501
501
|
}
|
|
502
|
-
function m(o, i, r,
|
|
502
|
+
function m(o, i, r, p, v, x = "", C = "") {
|
|
503
503
|
return Object.keys(o).map((b) => {
|
|
504
|
-
const O =
|
|
504
|
+
const O = D(1), P = b, u = o[b], T = Object.keys(u), N = u.title, k = u.type, R = g.get(k) || { type: "input-group", enableClear: !1 }, L = u.editor ? Object.assign({}, R, u.editor) : Object.assign({}, R), $ = F(T, u, i), B = E(T, u, i);
|
|
505
505
|
L.readonly = L.readonly === void 0 ? B() : L.readonly;
|
|
506
|
-
const I = u.type === "cascade" ? m(u.properties, i, r,
|
|
507
|
-
let
|
|
506
|
+
const I = u.type === "cascade" ? m(u.properties, i, r, p, v, x, C) : [], Y = !0;
|
|
507
|
+
let w = f(u, C);
|
|
508
508
|
const Z = q({
|
|
509
509
|
get() {
|
|
510
510
|
if (O.value) {
|
|
511
|
-
if (["class", "style"].find((re) => re ===
|
|
512
|
-
return
|
|
511
|
+
if (["class", "style"].find((re) => re === P) && !w && (w = a.get("/converter/appearance.converter") || null), w && w.convertFrom)
|
|
512
|
+
return w.convertFrom(r, b, v, x);
|
|
513
513
|
const j = r[b];
|
|
514
514
|
return Object.prototype.hasOwnProperty.call(u, "defaultValue") && (j === void 0 || typeof j == "string" && j === "") ? u.type === "boolean" ? u.defaultValue : u.defaultValue || "" : j;
|
|
515
515
|
}
|
|
516
516
|
return null;
|
|
517
517
|
},
|
|
518
518
|
set(j) {
|
|
519
|
-
O.value += 1,
|
|
519
|
+
O.value += 1, w && w.convertTo ? (w.convertTo(p, b, j, v, x), w.convertTo(r, b, j, v, x)) : (p[b] = j, r[b] = j);
|
|
520
520
|
}
|
|
521
|
-
}), { refreshPanelAfterChanged: K, description: ee, isExpand: te, parentPropertyID: ne } = u, V = { propertyID:
|
|
522
|
-
return i[
|
|
521
|
+
}), { refreshPanelAfterChanged: K, description: ee, isExpand: te, parentPropertyID: ne } = u, V = { propertyID: P, propertyName: N, propertyType: k, propertyValue: Z, editor: L, visible: $, readonly: B, cascadeConfig: I, hideCascadeTitle: Y, refreshPanelAfterChanged: K, description: ee, isExpand: te, parentPropertyID: ne };
|
|
522
|
+
return i[P] = V, V;
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
const
|
|
527
|
-
return v && v.categories ? Object.keys(v.categories).map((
|
|
528
|
-
const
|
|
529
|
-
return { categoryId:
|
|
525
|
+
function s(o, i, r = {}) {
|
|
526
|
+
const p = {}, v = e[o];
|
|
527
|
+
return v && v.categories ? Object.keys(v.categories).map((C) => {
|
|
528
|
+
const h = v.categories[C], b = h == null ? void 0 : h.title, O = m(h.properties || {}, p, {}, r, i);
|
|
529
|
+
return { categoryId: C, categoryName: b, properties: O };
|
|
530
530
|
}) : [];
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
const x = i.$ref.schema,
|
|
532
|
+
function l(o, i, r, p, v = "") {
|
|
533
|
+
const x = i.$ref.schema, C = i.$ref.converter, h = r[x], b = h.type, O = n(h), P = {}, u = e[b];
|
|
534
534
|
if (u && u.categories) {
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
const T = u.categories[o], N = T == null ? void 0 : T.title;
|
|
536
|
+
C && Object.keys(T.properties).forEach((L) => {
|
|
537
|
+
T.properties[L].$converter = C;
|
|
538
538
|
});
|
|
539
|
-
const
|
|
539
|
+
const k = (T == null ? void 0 : T.properties) || {}, R = m(k, P, O, h, p, v);
|
|
540
540
|
return { categoryId: o, categoryName: N, properties: R };
|
|
541
541
|
}
|
|
542
542
|
return { categoryId: o, categoryName: "", properties: [] };
|
|
543
543
|
}
|
|
544
|
-
function d(o, i, r,
|
|
545
|
-
const x = o.type,
|
|
544
|
+
function d(o, i, r, p, v) {
|
|
545
|
+
const x = o.type, C = n(o), h = {};
|
|
546
546
|
let b = v || e[x];
|
|
547
|
-
if (b && Object.keys(b).length === 0 && r && r.getPropConfig && (b = r.getPropConfig(
|
|
547
|
+
if (b && Object.keys(b).length === 0 && r && r.getPropConfig && (b = r.getPropConfig(p)), b && b.categories) {
|
|
548
548
|
const O = [];
|
|
549
|
-
return Object.keys(b.categories).map((
|
|
550
|
-
const u = b.categories[
|
|
549
|
+
return Object.keys(b.categories).map((P) => {
|
|
550
|
+
const u = b.categories[P];
|
|
551
551
|
if (u.$ref) {
|
|
552
|
-
O.push(
|
|
552
|
+
O.push(l(P, u, o, i, p));
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
|
-
const
|
|
556
|
-
O.push({ categoryId:
|
|
555
|
+
const T = u == null ? void 0 : u.title, N = u == null ? void 0 : u.tabId, k = u == null ? void 0 : u.tabName, R = u == null ? void 0 : u.hide, L = u == null ? void 0 : u.hideTitle, $ = m(u.properties || {}, h, C, o, i, p, u.$converter), { setPropertyRelates: B } = u, I = u == null ? void 0 : u.parentPropertyID;
|
|
556
|
+
O.push({ categoryId: P, categoryName: T, tabId: N, tabName: k, hide: R, properties: $, hideTitle: L, setPropertyRelates: B, parentPropertyID: I });
|
|
557
557
|
}), O;
|
|
558
558
|
}
|
|
559
559
|
return [];
|
|
560
560
|
}
|
|
561
561
|
return {
|
|
562
562
|
getPropertyConfigBySchema: d,
|
|
563
|
-
getPropertyConfigByType:
|
|
563
|
+
getPropertyConfigByType: s,
|
|
564
564
|
propertyConverterMap: a
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
567
|
const Ae = {}, Ge = {};
|
|
568
568
|
J(Ae, Ge, ve);
|
|
569
|
-
const Ve = {}, ze = {}, { resolveSchemaWithDefaultValue: We } = H(Ve, ze), _e = {}, Ue = {};
|
|
569
|
+
const Ve = {}, ze = {}, { getSchemaByType: yt, resolveSchemaWithDefaultValue: We, resolveSchemaToProps: xt, mappingSchemaToProps: St, setDesignerContext: ht } = H(Ve, ze), _e = {}, Ue = {};
|
|
570
570
|
J(_e, Ue, We);
|
|
571
571
|
function He(e, t) {
|
|
572
572
|
return { customClass: t.class, customStyle: t.style };
|
|
@@ -718,7 +718,7 @@ const Q = {
|
|
|
718
718
|
tabIndex: { type: Number, default: -1 },
|
|
719
719
|
enableTitle: { type: Boolean, default: !0 },
|
|
720
720
|
maxLength: { type: Number, default: null }
|
|
721
|
-
}, X =
|
|
721
|
+
}, X = le(Q, rt, Je, ot), it = /* @__PURE__ */ A({
|
|
722
722
|
name: "LanguageContents",
|
|
723
723
|
props: {
|
|
724
724
|
languages: {
|
|
@@ -740,7 +740,7 @@ const Q = {
|
|
|
740
740
|
},
|
|
741
741
|
emits: ["update:modelValue"],
|
|
742
742
|
setup(e, t) {
|
|
743
|
-
const n =
|
|
743
|
+
const n = D(e.languages), a = D(e.modelValue || {}), g = D();
|
|
744
744
|
return G(() => {
|
|
745
745
|
setTimeout(() => {
|
|
746
746
|
var y, c;
|
|
@@ -792,37 +792,37 @@ const Q = {
|
|
|
792
792
|
} = oe(e), F = q(() => {
|
|
793
793
|
var r;
|
|
794
794
|
return (r = c.value) == null ? void 0 : r[n.value];
|
|
795
|
-
}), E =
|
|
795
|
+
}), E = D();
|
|
796
796
|
W(() => e.modelValue, (r) => {
|
|
797
797
|
c.value = r;
|
|
798
798
|
});
|
|
799
|
-
const
|
|
799
|
+
const f = (r) => {
|
|
800
800
|
if ((r == null ? void 0 : r.length) <= 1)
|
|
801
801
|
return;
|
|
802
|
-
let
|
|
803
|
-
const v = r.find((x,
|
|
804
|
-
const
|
|
805
|
-
return
|
|
802
|
+
let p = -1;
|
|
803
|
+
const v = r.find((x, C) => {
|
|
804
|
+
const h = x.code === n.value;
|
|
805
|
+
return h && (p = C), h;
|
|
806
806
|
});
|
|
807
807
|
if (v) {
|
|
808
808
|
const x = Object.assign({}, v);
|
|
809
|
-
r.splice(
|
|
809
|
+
r.splice(p, 1), r.unshift(x);
|
|
810
810
|
}
|
|
811
811
|
return r;
|
|
812
|
-
}, m =
|
|
812
|
+
}, m = D();
|
|
813
813
|
W(() => e.languages, (r) => {
|
|
814
|
-
m.value =
|
|
814
|
+
m.value = f(r) || [];
|
|
815
815
|
});
|
|
816
|
-
function
|
|
816
|
+
function s(r) {
|
|
817
817
|
c.value = c.value || {}, c.value[n.value] !== r && (c.value[n.value] = r, t.emit("update:modelValue", c.value));
|
|
818
818
|
}
|
|
819
|
-
const
|
|
820
|
-
var
|
|
821
|
-
const r = (
|
|
819
|
+
const l = q(() => {
|
|
820
|
+
var p;
|
|
821
|
+
const r = (p = E.value) == null ? void 0 : p.popoverRef;
|
|
822
822
|
return r && m.value.length > 1 ? r.shown : !1;
|
|
823
823
|
});
|
|
824
824
|
G(() => {
|
|
825
|
-
m.value =
|
|
825
|
+
m.value = f(e.languages) || [];
|
|
826
826
|
});
|
|
827
827
|
const d = (r) => {
|
|
828
828
|
c.value = r, t.emit("update:modelValue", c.value);
|
|
@@ -832,7 +832,7 @@ const Q = {
|
|
|
832
832
|
}, i = () => {
|
|
833
833
|
c.value = c.value || {}, c.value[n.value] && (c.value[n.value] = "", t.emit("update:modelValue", c.value));
|
|
834
834
|
};
|
|
835
|
-
return () => S(
|
|
835
|
+
return () => S(se, {
|
|
836
836
|
ref: E,
|
|
837
837
|
id: e.id,
|
|
838
838
|
forcePlaceholder: !1,
|
|
@@ -849,14 +849,14 @@ const Q = {
|
|
|
849
849
|
popupOnClick: !0,
|
|
850
850
|
modelValue: F.value,
|
|
851
851
|
"onUpdate:modelValue": (r) => F.value = r,
|
|
852
|
-
onChange:
|
|
852
|
+
onChange: s,
|
|
853
853
|
placement: "auto",
|
|
854
854
|
popupMinWidth: 365,
|
|
855
855
|
maxLength: e.maxLength,
|
|
856
856
|
beforeOpen: o,
|
|
857
857
|
onClear: i
|
|
858
858
|
}, {
|
|
859
|
-
default: () => [
|
|
859
|
+
default: () => [l.value && S(it, {
|
|
860
860
|
id: e.id,
|
|
861
861
|
languages: m.value,
|
|
862
862
|
modelValue: c.value,
|