@wibetter/json-schema-editor 5.0.7 → 5.0.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/lib/index.css +3 -3
- package/lib/index.js +1282 -1716
- package/lib/index.js.LICENSE.txt +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -12,67 +12,59 @@
|
|
|
12
12
|
var e = {
|
|
13
13
|
264: function () {},
|
|
14
14
|
286: function () {},
|
|
15
|
-
804: function () {},
|
|
16
15
|
382: function () {},
|
|
17
16
|
80: function () {},
|
|
18
17
|
707: function () {},
|
|
19
18
|
975: function (e, t, n) {
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
'string' == typeof
|
|
23
|
-
|
|
24
|
-
(0, n(611).A)('b8de86ae',
|
|
19
|
+
var a = n(264);
|
|
20
|
+
a.__esModule && (a = a.default),
|
|
21
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
22
|
+
a.locals && (e.exports = a.locals),
|
|
23
|
+
(0, n(611).A)('b8de86ae', a, !1, { sourceMap: !1 });
|
|
25
24
|
},
|
|
26
25
|
915: function (e, t, n) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
'string' == typeof
|
|
30
|
-
|
|
31
|
-
(0, n(611).A)('5e9c0933',
|
|
32
|
-
},
|
|
33
|
-
797: function (e, t, n) {
|
|
34
|
-
var o = n(804);
|
|
35
|
-
o.__esModule && (o = o.default),
|
|
36
|
-
'string' == typeof o && (o = [[e.id, o, '']]),
|
|
37
|
-
o.locals && (e.exports = o.locals),
|
|
38
|
-
(0, n(611).A)('c1e4665a', o, !1, { sourceMap: !1 });
|
|
26
|
+
var a = n(286);
|
|
27
|
+
a.__esModule && (a = a.default),
|
|
28
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
29
|
+
a.locals && (e.exports = a.locals),
|
|
30
|
+
(0, n(611).A)('5e9c0933', a, !1, { sourceMap: !1 });
|
|
39
31
|
},
|
|
40
32
|
23: function (e, t, n) {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
'string' == typeof
|
|
44
|
-
|
|
45
|
-
(0, n(611).A)('adbe60da',
|
|
33
|
+
var a = n(382);
|
|
34
|
+
a.__esModule && (a = a.default),
|
|
35
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
36
|
+
a.locals && (e.exports = a.locals),
|
|
37
|
+
(0, n(611).A)('adbe60da', a, !1, { sourceMap: !1 });
|
|
46
38
|
},
|
|
47
39
|
617: function (e, t, n) {
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
'string' == typeof
|
|
51
|
-
|
|
52
|
-
(0, n(611).A)('9c82b91a',
|
|
40
|
+
var a = n(80);
|
|
41
|
+
a.__esModule && (a = a.default),
|
|
42
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
43
|
+
a.locals && (e.exports = a.locals),
|
|
44
|
+
(0, n(611).A)('9c82b91a', a, !1, { sourceMap: !1 });
|
|
53
45
|
},
|
|
54
46
|
790: function (e, t, n) {
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
'string' == typeof
|
|
58
|
-
|
|
59
|
-
(0, n(611).A)('2b121068',
|
|
47
|
+
var a = n(707);
|
|
48
|
+
a.__esModule && (a = a.default),
|
|
49
|
+
'string' == typeof a && (a = [[e.id, a, '']]),
|
|
50
|
+
a.locals && (e.exports = a.locals),
|
|
51
|
+
(0, n(611).A)('2b121068', a, !1, { sourceMap: !1 });
|
|
60
52
|
},
|
|
61
53
|
611: function (e, t, n) {
|
|
62
54
|
'use strict';
|
|
63
|
-
function
|
|
64
|
-
for (var n = [],
|
|
65
|
-
var r = t[
|
|
55
|
+
function a(e, t) {
|
|
56
|
+
for (var n = [], a = {}, o = 0; o < t.length; o++) {
|
|
57
|
+
var r = t[o],
|
|
66
58
|
i = r[0],
|
|
67
59
|
s = {
|
|
68
|
-
id: e + ':' +
|
|
60
|
+
id: e + ':' + o,
|
|
69
61
|
css: r[1],
|
|
70
62
|
media: r[2],
|
|
71
63
|
sourceMap: r[3],
|
|
72
64
|
};
|
|
73
|
-
|
|
74
|
-
?
|
|
75
|
-
: n.push((
|
|
65
|
+
a[i]
|
|
66
|
+
? a[i].parts.push(s)
|
|
67
|
+
: n.push((a[i] = { id: i, parts: [s] }));
|
|
76
68
|
}
|
|
77
69
|
return n;
|
|
78
70
|
}
|
|
@@ -81,40 +73,40 @@
|
|
|
81
73
|
return h;
|
|
82
74
|
},
|
|
83
75
|
});
|
|
84
|
-
var
|
|
85
|
-
if ('undefined' != typeof DEBUG && DEBUG && !
|
|
76
|
+
var o = 'undefined' != typeof document;
|
|
77
|
+
if ('undefined' != typeof DEBUG && DEBUG && !o)
|
|
86
78
|
throw new Error(
|
|
87
79
|
"vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.",
|
|
88
80
|
);
|
|
89
81
|
var r = {},
|
|
90
82
|
i =
|
|
91
|
-
|
|
83
|
+
o && (document.head || document.getElementsByTagName('head')[0]),
|
|
92
84
|
s = null,
|
|
93
85
|
c = 0,
|
|
94
86
|
l = !1,
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
p = function () {},
|
|
88
|
+
d = null,
|
|
97
89
|
u = 'data-vue-ssr-id',
|
|
98
90
|
m =
|
|
99
91
|
'undefined' != typeof navigator &&
|
|
100
92
|
/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());
|
|
101
|
-
function h(e, t, n,
|
|
102
|
-
(l = n), (
|
|
103
|
-
var i =
|
|
93
|
+
function h(e, t, n, o) {
|
|
94
|
+
(l = n), (d = o || {});
|
|
95
|
+
var i = a(e, t);
|
|
104
96
|
return (
|
|
105
97
|
y(i),
|
|
106
98
|
function (t) {
|
|
107
|
-
for (var n = [],
|
|
108
|
-
var s = i[
|
|
99
|
+
for (var n = [], o = 0; o < i.length; o++) {
|
|
100
|
+
var s = i[o];
|
|
109
101
|
(c = r[s.id]).refs--, n.push(c);
|
|
110
102
|
}
|
|
111
103
|
for (
|
|
112
|
-
t ? y((i =
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
t ? y((i = a(e, t))) : (i = []), o = 0;
|
|
105
|
+
o < n.length;
|
|
106
|
+
o++
|
|
115
107
|
) {
|
|
116
108
|
var c;
|
|
117
|
-
if (0 === (c = n[
|
|
109
|
+
if (0 === (c = n[o]).refs) {
|
|
118
110
|
for (var l = 0; l < c.parts.length; l++) c.parts[l]();
|
|
119
111
|
delete r[c.id];
|
|
120
112
|
}
|
|
@@ -125,16 +117,16 @@
|
|
|
125
117
|
function y(e) {
|
|
126
118
|
for (var t = 0; t < e.length; t++) {
|
|
127
119
|
var n = e[t],
|
|
128
|
-
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
for (var
|
|
132
|
-
for (;
|
|
133
|
-
|
|
134
|
-
(
|
|
120
|
+
a = r[n.id];
|
|
121
|
+
if (a) {
|
|
122
|
+
a.refs++;
|
|
123
|
+
for (var o = 0; o < a.parts.length; o++) a.parts[o](n.parts[o]);
|
|
124
|
+
for (; o < n.parts.length; o++) a.parts.push(f(n.parts[o]));
|
|
125
|
+
a.parts.length > n.parts.length &&
|
|
126
|
+
(a.parts.length = n.parts.length);
|
|
135
127
|
} else {
|
|
136
128
|
var i = [];
|
|
137
|
-
for (
|
|
129
|
+
for (o = 0; o < n.parts.length; o++) i.push(f(n.parts[o]));
|
|
138
130
|
r[n.id] = { id: n.id, refs: 1, parts: i };
|
|
139
131
|
}
|
|
140
132
|
}
|
|
@@ -146,65 +138,65 @@
|
|
|
146
138
|
function f(e) {
|
|
147
139
|
var t,
|
|
148
140
|
n,
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
if (l) return
|
|
152
|
-
|
|
141
|
+
a = document.querySelector('style[' + u + '~="' + e.id + '"]');
|
|
142
|
+
if (a) {
|
|
143
|
+
if (l) return p;
|
|
144
|
+
a.parentNode.removeChild(a);
|
|
153
145
|
}
|
|
154
146
|
if (m) {
|
|
155
|
-
var
|
|
156
|
-
(
|
|
157
|
-
(t =
|
|
158
|
-
(n =
|
|
147
|
+
var o = c++;
|
|
148
|
+
(a = s || (s = g())),
|
|
149
|
+
(t = b.bind(null, a, o, !1)),
|
|
150
|
+
(n = b.bind(null, a, o, !0));
|
|
159
151
|
} else
|
|
160
|
-
(
|
|
161
|
-
(t =
|
|
152
|
+
(a = g()),
|
|
153
|
+
(t = S.bind(null, a)),
|
|
162
154
|
(n = function () {
|
|
163
|
-
|
|
155
|
+
a.parentNode.removeChild(a);
|
|
164
156
|
});
|
|
165
157
|
return (
|
|
166
158
|
t(e),
|
|
167
|
-
function (
|
|
168
|
-
if (
|
|
159
|
+
function (a) {
|
|
160
|
+
if (a) {
|
|
169
161
|
if (
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
162
|
+
a.css === e.css &&
|
|
163
|
+
a.media === e.media &&
|
|
164
|
+
a.sourceMap === e.sourceMap
|
|
173
165
|
)
|
|
174
166
|
return;
|
|
175
|
-
t((e =
|
|
167
|
+
t((e = a));
|
|
176
168
|
} else n();
|
|
177
169
|
}
|
|
178
170
|
);
|
|
179
171
|
}
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
((
|
|
172
|
+
var v,
|
|
173
|
+
x =
|
|
174
|
+
((v = []),
|
|
183
175
|
function (e, t) {
|
|
184
|
-
return (
|
|
176
|
+
return (v[e] = t), v.filter(Boolean).join('\n');
|
|
185
177
|
});
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (e.styleSheet) e.styleSheet.cssText =
|
|
178
|
+
function b(e, t, n, a) {
|
|
179
|
+
var o = n ? '' : a.css;
|
|
180
|
+
if (e.styleSheet) e.styleSheet.cssText = x(t, o);
|
|
189
181
|
else {
|
|
190
|
-
var r = document.createTextNode(
|
|
182
|
+
var r = document.createTextNode(o),
|
|
191
183
|
i = e.childNodes;
|
|
192
184
|
i[t] && e.removeChild(i[t]),
|
|
193
185
|
i.length ? e.insertBefore(r, i[t]) : e.appendChild(r);
|
|
194
186
|
}
|
|
195
187
|
}
|
|
196
|
-
function
|
|
188
|
+
function S(e, t) {
|
|
197
189
|
var n = t.css,
|
|
198
|
-
|
|
199
|
-
|
|
190
|
+
a = t.media,
|
|
191
|
+
o = t.sourceMap;
|
|
200
192
|
if (
|
|
201
|
-
(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
((n += '\n/*# sourceURL=' +
|
|
193
|
+
(a && e.setAttribute('media', a),
|
|
194
|
+
d.ssrId && e.setAttribute(u, t.id),
|
|
195
|
+
o &&
|
|
196
|
+
((n += '\n/*# sourceURL=' + o.sources[0] + ' */'),
|
|
205
197
|
(n +=
|
|
206
198
|
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
207
|
-
btoa(unescape(encodeURIComponent(JSON.stringify(
|
|
199
|
+
btoa(unescape(encodeURIComponent(JSON.stringify(o)))) +
|
|
208
200
|
' */')),
|
|
209
201
|
e.styleSheet)
|
|
210
202
|
)
|
|
@@ -217,11 +209,11 @@
|
|
|
217
209
|
},
|
|
218
210
|
},
|
|
219
211
|
t = {};
|
|
220
|
-
function n(
|
|
221
|
-
var
|
|
222
|
-
if (void 0 !==
|
|
223
|
-
var r = (t[
|
|
224
|
-
return e[
|
|
212
|
+
function n(a) {
|
|
213
|
+
var o = t[a];
|
|
214
|
+
if (void 0 !== o) return o.exports;
|
|
215
|
+
var r = (t[a] = { id: a, exports: {} });
|
|
216
|
+
return e[a](r, r.exports, n), r.exports;
|
|
225
217
|
}
|
|
226
218
|
(n.n = function (e) {
|
|
227
219
|
var t =
|
|
@@ -235,10 +227,10 @@
|
|
|
235
227
|
return n.d(t, { a: t }), t;
|
|
236
228
|
}),
|
|
237
229
|
(n.d = function (e, t) {
|
|
238
|
-
for (var
|
|
239
|
-
n.o(t,
|
|
240
|
-
!n.o(e,
|
|
241
|
-
Object.defineProperty(e,
|
|
230
|
+
for (var a in t)
|
|
231
|
+
n.o(t, a) &&
|
|
232
|
+
!n.o(e, a) &&
|
|
233
|
+
Object.defineProperty(e, a, { enumerable: !0, get: t[a] });
|
|
242
234
|
}),
|
|
243
235
|
(n.o = function (e, t) {
|
|
244
236
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
@@ -249,60 +241,60 @@
|
|
|
249
241
|
Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }),
|
|
250
242
|
Object.defineProperty(e, '__esModule', { value: !0 });
|
|
251
243
|
});
|
|
252
|
-
var
|
|
244
|
+
var a = {};
|
|
253
245
|
return (
|
|
254
246
|
(function () {
|
|
255
247
|
'use strict';
|
|
256
|
-
n.r(
|
|
257
|
-
n.d(
|
|
248
|
+
n.r(a),
|
|
249
|
+
n.d(a, {
|
|
258
250
|
default: function () {
|
|
259
|
-
return
|
|
251
|
+
return ct;
|
|
260
252
|
},
|
|
261
253
|
});
|
|
262
254
|
var e,
|
|
263
255
|
t = require('@babel/runtime/helpers/inheritsLoose'),
|
|
264
|
-
|
|
256
|
+
o = n.n(t),
|
|
265
257
|
r = require('react'),
|
|
266
258
|
i = n.n(r),
|
|
267
259
|
s = require('react-dom'),
|
|
268
260
|
c = n.n(s),
|
|
269
261
|
l = require('mobx-react'),
|
|
270
|
-
|
|
271
|
-
|
|
262
|
+
p = require('prop-types'),
|
|
263
|
+
d = n.n(p),
|
|
272
264
|
u = require('@babel/runtime/helpers/extends'),
|
|
273
265
|
m = n.n(u),
|
|
274
266
|
h = require('@babel/runtime/helpers/initializerDefineProperty'),
|
|
275
267
|
y = n.n(h),
|
|
276
268
|
g = require('@babel/runtime/helpers/createClass'),
|
|
277
269
|
f = n.n(g),
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
270
|
+
v = require('@babel/runtime/helpers/applyDecoratedDescriptor'),
|
|
271
|
+
x = n.n(v),
|
|
272
|
+
b =
|
|
281
273
|
(require('@babel/runtime/helpers/initializerWarningHelper'),
|
|
282
274
|
require('mobx')),
|
|
283
|
-
|
|
275
|
+
S = require('antd');
|
|
284
276
|
function E(e) {
|
|
285
277
|
var t = JSON.stringify(e);
|
|
286
278
|
return JSON.parse(t);
|
|
287
279
|
}
|
|
288
|
-
function
|
|
280
|
+
function O(e, t) {
|
|
289
281
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
290
282
|
}
|
|
291
|
-
function
|
|
283
|
+
function C(e, t) {
|
|
292
284
|
window.sessionStorage && window.sessionStorage.setItem(e, t);
|
|
293
285
|
}
|
|
294
|
-
var
|
|
295
|
-
R,
|
|
286
|
+
var j,
|
|
296
287
|
N,
|
|
297
288
|
I,
|
|
298
|
-
k,
|
|
299
289
|
w,
|
|
290
|
+
R,
|
|
300
291
|
K,
|
|
301
|
-
|
|
292
|
+
k,
|
|
293
|
+
T,
|
|
302
294
|
J,
|
|
303
295
|
D,
|
|
304
|
-
T,
|
|
305
296
|
B,
|
|
297
|
+
P,
|
|
306
298
|
V,
|
|
307
299
|
L,
|
|
308
300
|
F,
|
|
@@ -310,11 +302,11 @@
|
|
|
310
302
|
A,
|
|
311
303
|
_,
|
|
312
304
|
M,
|
|
313
|
-
H,
|
|
314
|
-
z,
|
|
315
|
-
G,
|
|
316
305
|
W,
|
|
306
|
+
G,
|
|
307
|
+
z,
|
|
317
308
|
U,
|
|
309
|
+
H,
|
|
318
310
|
Q,
|
|
319
311
|
X,
|
|
320
312
|
Y,
|
|
@@ -323,26 +315,21 @@
|
|
|
323
315
|
ee,
|
|
324
316
|
te,
|
|
325
317
|
ne,
|
|
326
|
-
oe,
|
|
327
318
|
ae,
|
|
319
|
+
oe,
|
|
328
320
|
re,
|
|
329
321
|
ie,
|
|
330
322
|
se,
|
|
331
323
|
ce,
|
|
332
324
|
le,
|
|
333
|
-
de,
|
|
334
325
|
pe,
|
|
326
|
+
de,
|
|
335
327
|
ue,
|
|
336
328
|
me,
|
|
337
329
|
he,
|
|
338
330
|
ye,
|
|
339
331
|
ge,
|
|
340
|
-
fe
|
|
341
|
-
Se,
|
|
342
|
-
ve,
|
|
343
|
-
xe,
|
|
344
|
-
be,
|
|
345
|
-
Ee = [
|
|
332
|
+
fe = [
|
|
346
333
|
'input',
|
|
347
334
|
'boolean',
|
|
348
335
|
'number',
|
|
@@ -355,8 +342,9 @@
|
|
|
355
342
|
'date',
|
|
356
343
|
'date-time',
|
|
357
344
|
'time',
|
|
345
|
+
'input-image',
|
|
358
346
|
],
|
|
359
|
-
|
|
347
|
+
ve = ['object'].concat([
|
|
360
348
|
'datasource',
|
|
361
349
|
'event',
|
|
362
350
|
'dynamic-data',
|
|
@@ -364,7 +352,7 @@
|
|
|
364
352
|
'sohu-source',
|
|
365
353
|
'sohu-event',
|
|
366
354
|
]),
|
|
367
|
-
|
|
355
|
+
xe = [
|
|
368
356
|
'quantity',
|
|
369
357
|
'box-style',
|
|
370
358
|
'text-editor',
|
|
@@ -372,12 +360,12 @@
|
|
|
372
360
|
'codearea',
|
|
373
361
|
'htmlarea',
|
|
374
362
|
'array',
|
|
375
|
-
].concat(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
363
|
+
].concat(ve),
|
|
364
|
+
be = [].concat(fe, xe),
|
|
365
|
+
Se = ['string'],
|
|
366
|
+
Ee =
|
|
379
367
|
(((e = {
|
|
380
|
-
object:
|
|
368
|
+
object: be,
|
|
381
369
|
array: [
|
|
382
370
|
'object',
|
|
383
371
|
'input',
|
|
@@ -387,70 +375,66 @@
|
|
|
387
375
|
'date',
|
|
388
376
|
'date-time',
|
|
389
377
|
'time',
|
|
378
|
+
'input-image',
|
|
390
379
|
],
|
|
391
|
-
radio:
|
|
392
|
-
select:
|
|
380
|
+
radio: Se,
|
|
381
|
+
select: Se,
|
|
393
382
|
}).select = ['string']),
|
|
394
|
-
(e.all =
|
|
383
|
+
(e.all = be),
|
|
395
384
|
e),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
((
|
|
402
|
-
(
|
|
403
|
-
(
|
|
404
|
-
(
|
|
405
|
-
(
|
|
406
|
-
(
|
|
407
|
-
(
|
|
408
|
-
(
|
|
409
|
-
(J =
|
|
410
|
-
(D =
|
|
411
|
-
(
|
|
412
|
-
(
|
|
413
|
-
(V =
|
|
414
|
-
(L =
|
|
415
|
-
(F =
|
|
416
|
-
(q =
|
|
417
|
-
(A =
|
|
418
|
-
(_ =
|
|
419
|
-
(M =
|
|
420
|
-
(
|
|
421
|
-
(
|
|
422
|
-
(
|
|
423
|
-
(
|
|
424
|
-
(
|
|
425
|
-
(Q =
|
|
426
|
-
(X =
|
|
427
|
-
(Y =
|
|
428
|
-
(Z =
|
|
429
|
-
($ =
|
|
430
|
-
(ee =
|
|
431
|
-
(te =
|
|
432
|
-
(ne =
|
|
433
|
-
(
|
|
434
|
-
(
|
|
435
|
-
(re =
|
|
436
|
-
(ie =
|
|
437
|
-
(se =
|
|
438
|
-
(ce =
|
|
439
|
-
(le =
|
|
440
|
-
(
|
|
441
|
-
(
|
|
442
|
-
(ue = x.action.bound),
|
|
443
|
-
(me = x.action.bound),
|
|
444
|
-
(he = x.action.bound),
|
|
445
|
-
(ye = x.action.bound),
|
|
446
|
-
(ge = (function () {
|
|
385
|
+
Oe = require('@wibetter/json-utils'),
|
|
386
|
+
Ce = Oe.TypeDataList.jsonschema,
|
|
387
|
+
je = Oe.TypeDataList.input,
|
|
388
|
+
Ne = {
|
|
389
|
+
schemaStore:
|
|
390
|
+
((j = b.action.bound),
|
|
391
|
+
(N = b.action.bound),
|
|
392
|
+
(I = b.action.bound),
|
|
393
|
+
(w = b.action.bound),
|
|
394
|
+
(R = b.action.bound),
|
|
395
|
+
(K = b.action.bound),
|
|
396
|
+
(k = b.action.bound),
|
|
397
|
+
(T = b.action.bound),
|
|
398
|
+
(J = b.action.bound),
|
|
399
|
+
(D = b.action.bound),
|
|
400
|
+
(B = b.action.bound),
|
|
401
|
+
(P = b.action.bound),
|
|
402
|
+
(V = b.action.bound),
|
|
403
|
+
(L = b.action.bound),
|
|
404
|
+
(F = b.action.bound),
|
|
405
|
+
(q = b.action.bound),
|
|
406
|
+
(A = b.action.bound),
|
|
407
|
+
(_ = b.action.bound),
|
|
408
|
+
(M = b.action.bound),
|
|
409
|
+
(W = b.action.bound),
|
|
410
|
+
(G = b.action.bound),
|
|
411
|
+
(z = b.action.bound),
|
|
412
|
+
(U = b.action.bound),
|
|
413
|
+
(H = b.action.bound),
|
|
414
|
+
(Q = b.action.bound),
|
|
415
|
+
(X = b.action.bound),
|
|
416
|
+
(Y = b.action.bound),
|
|
417
|
+
(Z = b.action.bound),
|
|
418
|
+
($ = b.action.bound),
|
|
419
|
+
(ee = b.action.bound),
|
|
420
|
+
(te = b.action.bound),
|
|
421
|
+
(ne = b.action.bound),
|
|
422
|
+
(ae = b.action.bound),
|
|
423
|
+
(oe = b.action.bound),
|
|
424
|
+
(re = b.action.bound),
|
|
425
|
+
(ie = b.action.bound),
|
|
426
|
+
(se = b.action.bound),
|
|
427
|
+
(ce = b.action.bound),
|
|
428
|
+
(le = b.action.bound),
|
|
429
|
+
(pe = b.action.bound),
|
|
430
|
+
(de = (function () {
|
|
447
431
|
function e() {
|
|
448
432
|
(this.curJsonKeyIndex = 1),
|
|
449
|
-
y()(this, 'triggerChange',
|
|
450
|
-
y()(this, 'jsonSchema',
|
|
451
|
-
y()(this, 'SchemaTypeList',
|
|
452
|
-
y()(this, 'onChange',
|
|
453
|
-
y()(this, 'childElemSort',
|
|
433
|
+
y()(this, 'triggerChange', ue, this),
|
|
434
|
+
y()(this, 'jsonSchema', me, this),
|
|
435
|
+
y()(this, 'SchemaTypeList', he, this),
|
|
436
|
+
y()(this, 'onChange', ye, this),
|
|
437
|
+
y()(this, 'childElemSort', ge, this);
|
|
454
438
|
}
|
|
455
439
|
var t = e.prototype;
|
|
456
440
|
return (
|
|
@@ -461,7 +445,7 @@
|
|
|
461
445
|
var t = this;
|
|
462
446
|
e &&
|
|
463
447
|
'{}' !== JSON.stringify(e) &&
|
|
464
|
-
(
|
|
448
|
+
(O(e, this.SchemaTypeList) ||
|
|
465
449
|
(e &&
|
|
466
450
|
Object.keys(e).map(function (n) {
|
|
467
451
|
t.SchemaTypeList[n] = e[n];
|
|
@@ -469,14 +453,14 @@
|
|
|
469
453
|
}),
|
|
470
454
|
(t.initJSONSchemaData = function (e) {
|
|
471
455
|
if (e && '{}' !== JSON.stringify(e)) {
|
|
472
|
-
if (!
|
|
473
|
-
if (e && (0,
|
|
456
|
+
if (!O(e, this.JSONSchemaObj))
|
|
457
|
+
if (e && (0, Oe.isNewSchemaData)(e))
|
|
474
458
|
this.jsonSchema = e;
|
|
475
459
|
else {
|
|
476
|
-
var t = (0,
|
|
460
|
+
var t = (0, Oe.oldSchemaToNewSchema)(e);
|
|
477
461
|
this.jsonSchema = t;
|
|
478
462
|
}
|
|
479
|
-
} else this.jsonSchema = E(
|
|
463
|
+
} else this.jsonSchema = E(Ce);
|
|
480
464
|
}),
|
|
481
465
|
(t.initOnChange = function (e) {
|
|
482
466
|
var t, n;
|
|
@@ -494,20 +478,20 @@
|
|
|
494
478
|
e || this.onChange(this.JSONSchemaObj);
|
|
495
479
|
}),
|
|
496
480
|
(t.indexRoute2keyRoute = function (e) {
|
|
497
|
-
return (0,
|
|
481
|
+
return (0, Oe.indexRoute2keyRoute)(e, this.jsonSchema);
|
|
498
482
|
}),
|
|
499
483
|
(t.keyRoute2indexRoute = function (e) {
|
|
500
|
-
return (0,
|
|
484
|
+
return (0, Oe.keyRoute2indexRoute)(e, this.jsonSchema);
|
|
501
485
|
}),
|
|
502
486
|
(t.getSchemaByIndexRoute = function (e) {
|
|
503
|
-
return (0,
|
|
487
|
+
return (0, Oe.getSchemaByIndexRoute)(
|
|
504
488
|
e,
|
|
505
489
|
this.jsonSchema,
|
|
506
490
|
!0,
|
|
507
491
|
);
|
|
508
492
|
}),
|
|
509
493
|
(t.getSchemaByKeyRoute = function (e) {
|
|
510
|
-
return (0,
|
|
494
|
+
return (0, Oe.getSchemaByKeyRoute)(e, this.jsonSchema, !0);
|
|
511
495
|
}),
|
|
512
496
|
(t.getNewJsonKeyIndex = function (e, t) {
|
|
513
497
|
var n = (t || 'field') + '_' + this.curJsonKeyIndex;
|
|
@@ -520,19 +504,19 @@
|
|
|
520
504
|
);
|
|
521
505
|
}),
|
|
522
506
|
(t.isExitJsonKey = function (e, t) {
|
|
523
|
-
var n = (0,
|
|
524
|
-
|
|
507
|
+
var n = (0, Oe.getParentIndexRoute)(e),
|
|
508
|
+
a = this.getSchemaByIndexRoute(n);
|
|
525
509
|
return (
|
|
526
|
-
!!(
|
|
527
|
-
(
|
|
528
|
-
|
|
529
|
-
|
|
510
|
+
!!(a.propertyOrder && a.propertyOrder.indexOf(t) >= 0) ||
|
|
511
|
+
(Oe.KeyWordList &&
|
|
512
|
+
Oe.KeyWordList.indexOf(t) >= 0 &&
|
|
513
|
+
S.message.warning(
|
|
530
514
|
t +
|
|
531
515
|
'是JSONSchema的关键字,建议您换一个,避免后续出现数据异常。',
|
|
532
516
|
),
|
|
533
517
|
t &&
|
|
534
518
|
t.indexOf('-') > -1 &&
|
|
535
|
-
|
|
519
|
+
S.message.warning(
|
|
536
520
|
t +
|
|
537
521
|
'含特殊字符(‘-’),会影响后续数据获取和更新,建议您换一个数值。',
|
|
538
522
|
),
|
|
@@ -540,134 +524,134 @@
|
|
|
540
524
|
);
|
|
541
525
|
}),
|
|
542
526
|
(t.isSupportCurType = function (e, t) {
|
|
543
|
-
var n = (0,
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
return !!(
|
|
527
|
+
var n = (0, Oe.getParentIndexRoute)(e),
|
|
528
|
+
a = this.getSchemaByIndexRoute(n),
|
|
529
|
+
o = this.SchemaTypeList[a.type];
|
|
530
|
+
return !!(o && o.indexOf(t) >= 0);
|
|
547
531
|
}),
|
|
548
532
|
(t.addChildJson = function (e, t) {
|
|
549
|
-
var n = (0,
|
|
550
|
-
if ((0,
|
|
551
|
-
var
|
|
552
|
-
n.propertyOrder.push(
|
|
553
|
-
(n.properties[
|
|
533
|
+
var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
534
|
+
if ((0, Oe.isContainerSchema)(n)) {
|
|
535
|
+
var a = this.getNewJsonKeyIndex(n);
|
|
536
|
+
n.propertyOrder.push(a),
|
|
537
|
+
(n.properties[a] = je),
|
|
554
538
|
this.jsonSchemaChange(t);
|
|
555
|
-
} else
|
|
539
|
+
} else S.message.warning('非对象类型字段不允许插入子元素');
|
|
556
540
|
}),
|
|
557
|
-
(t.changeType = function (e, t, n,
|
|
558
|
-
var
|
|
559
|
-
r = (0,
|
|
541
|
+
(t.changeType = function (e, t, n, a) {
|
|
542
|
+
var o = (0, Oe.getParentIndexRoute)(e),
|
|
543
|
+
r = (0, Oe.getSchemaByIndexRoute)(o, this.jsonSchema);
|
|
560
544
|
r.properties && r.properties[t]
|
|
561
545
|
? (r.properties[t] = E(n))
|
|
562
546
|
: r[t] && (r[t] = E(n)),
|
|
563
|
-
this.jsonSchemaChange(
|
|
547
|
+
this.jsonSchemaChange(a);
|
|
564
548
|
}),
|
|
565
549
|
(t.updateSchemaData = function (e, t, n) {
|
|
566
|
-
var
|
|
567
|
-
Object.assign(
|
|
550
|
+
var a = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
551
|
+
Object.assign(a, E(t)), this.jsonSchemaChange(n);
|
|
568
552
|
}),
|
|
569
|
-
(t.editSchemaData = function (e, t, n,
|
|
570
|
-
var
|
|
571
|
-
r = (0,
|
|
553
|
+
(t.editSchemaData = function (e, t, n, a) {
|
|
554
|
+
var o = (0, Oe.getParentIndexRoute)(e),
|
|
555
|
+
r = (0, Oe.getSchemaByIndexRoute)(o, this.jsonSchema);
|
|
572
556
|
(r.properties[t] = m()({}, E(r.properties[t]), n)),
|
|
573
|
-
this.jsonSchemaChange(
|
|
557
|
+
this.jsonSchemaChange(a);
|
|
574
558
|
}),
|
|
575
559
|
(t.editJsonKey = function (e, t, n) {
|
|
576
|
-
var
|
|
560
|
+
var a = (0, Oe.getSchemaByIndexRoute)(
|
|
577
561
|
e,
|
|
578
562
|
this.jsonSchema,
|
|
579
563
|
!0,
|
|
580
564
|
);
|
|
581
|
-
this.insertJsonData(e, t,
|
|
565
|
+
this.insertJsonData(e, t, a, '', !0),
|
|
582
566
|
this.deleteJsonByIndex(e, !0),
|
|
583
567
|
this.jsonSchemaChange(n);
|
|
584
568
|
}),
|
|
585
569
|
(t.addNextJsonData = function (e) {
|
|
586
|
-
var t = (0,
|
|
587
|
-
n = (0,
|
|
588
|
-
|
|
589
|
-
this.insertJsonData(e,
|
|
570
|
+
var t = (0, Oe.getParentIndexRoute)(e),
|
|
571
|
+
n = (0, Oe.getSchemaByIndexRoute)(t, this.jsonSchema),
|
|
572
|
+
a = this.getNewJsonKeyIndex(n);
|
|
573
|
+
this.insertJsonData(e, a, je);
|
|
590
574
|
}),
|
|
591
|
-
(t.insertJsonData = function (e, t, n,
|
|
592
|
-
var r = (0,
|
|
575
|
+
(t.insertJsonData = function (e, t, n, a, o) {
|
|
576
|
+
var r = (0, Oe.getParentIndexRoute_CurIndex)(e),
|
|
593
577
|
i = r[0],
|
|
594
578
|
s = r[1],
|
|
595
|
-
c = (0,
|
|
579
|
+
c = (0, Oe.getSchemaByIndexRoute)(i, this.jsonSchema);
|
|
596
580
|
c.properties[t] = n;
|
|
597
581
|
var l = c.propertyOrder,
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
u = l.slice(
|
|
601
|
-
(c.propertyOrder = [].concat(
|
|
602
|
-
this.jsonSchemaChange(
|
|
582
|
+
p = 'before' === a ? Number(s) : Number(s) + 1,
|
|
583
|
+
d = l.slice(0, p),
|
|
584
|
+
u = l.slice(p);
|
|
585
|
+
(c.propertyOrder = [].concat(d, [t], u)),
|
|
586
|
+
this.jsonSchemaChange(o);
|
|
603
587
|
}),
|
|
604
588
|
(t.deleteJsonByIndex_CurKey = function (e, t, n) {
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
delete
|
|
608
|
-
var r =
|
|
609
|
-
|
|
589
|
+
var a = (0, Oe.getParentIndexRoute)(e),
|
|
590
|
+
o = (0, Oe.getSchemaByIndexRoute)(a, this.jsonSchema);
|
|
591
|
+
delete o.properties[t];
|
|
592
|
+
var r = o.propertyOrder.indexOf(t);
|
|
593
|
+
o.propertyOrder.splice(r, 1), this.jsonSchemaChange(n);
|
|
610
594
|
}),
|
|
611
595
|
(t.deleteJsonByIndex = function (e, t) {
|
|
612
|
-
var n = (0,
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
r = (0,
|
|
616
|
-
i = r.propertyOrder[
|
|
596
|
+
var n = (0, Oe.getParentIndexRoute_CurIndex)(e),
|
|
597
|
+
a = n[0],
|
|
598
|
+
o = n[1],
|
|
599
|
+
r = (0, Oe.getSchemaByIndexRoute)(a, this.jsonSchema),
|
|
600
|
+
i = r.propertyOrder[o];
|
|
617
601
|
delete r.properties[i];
|
|
618
602
|
var s = r.propertyOrder.indexOf(i);
|
|
619
603
|
r.propertyOrder.splice(s, 1), this.jsonSchemaChange(t);
|
|
620
604
|
}),
|
|
621
|
-
(t.updateEnumItem = function (e, t, n,
|
|
622
|
-
var r = (0,
|
|
605
|
+
(t.updateEnumItem = function (e, t, n, a, o) {
|
|
606
|
+
var r = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
623
607
|
r.enum &&
|
|
624
608
|
r.enumextra &&
|
|
625
|
-
((r.enum[t] = n), (r.enumextra[t] =
|
|
626
|
-
this.jsonSchemaChange(
|
|
609
|
+
((r.enum[t] = n), (r.enumextra[t] = a)),
|
|
610
|
+
this.jsonSchemaChange(o);
|
|
627
611
|
}),
|
|
628
612
|
(t.isExitEnumKey = function (e, t, n) {
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
if (
|
|
632
|
-
var r = E(
|
|
633
|
-
t >= 0 && r.splice(t, 1), r.indexOf(n) >= 0 && (
|
|
613
|
+
var a = !1,
|
|
614
|
+
o = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
615
|
+
if (o.enum) {
|
|
616
|
+
var r = E(o.enum);
|
|
617
|
+
t >= 0 && r.splice(t, 1), r.indexOf(n) >= 0 && (a = !0);
|
|
634
618
|
}
|
|
635
619
|
return (
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
620
|
+
Oe.KeyWordList &&
|
|
621
|
+
Oe.KeyWordList.indexOf(n) >= 0 &&
|
|
622
|
+
S.message.warning(
|
|
639
623
|
n +
|
|
640
624
|
'是JSONSchema的关键字,建议您换一个,避免后续出现数据异常。',
|
|
641
625
|
),
|
|
642
|
-
|
|
626
|
+
a
|
|
643
627
|
);
|
|
644
628
|
}),
|
|
645
|
-
(t.updateEnumKey = function (e, t, n,
|
|
646
|
-
var
|
|
647
|
-
|
|
629
|
+
(t.updateEnumKey = function (e, t, n, a) {
|
|
630
|
+
var o = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
631
|
+
o.enum && (o.enum[t] = n), this.jsonSchemaChange(a);
|
|
648
632
|
}),
|
|
649
|
-
(t.updateEnumText = function (e, t, n,
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
this.jsonSchemaChange(
|
|
633
|
+
(t.updateEnumText = function (e, t, n, a) {
|
|
634
|
+
var o = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
635
|
+
o.enumextra && (o.enumextra[t] = n),
|
|
636
|
+
this.jsonSchemaChange(a);
|
|
653
637
|
}),
|
|
654
638
|
(t.deleteEnumItem = function (e, t, n) {
|
|
655
|
-
var
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
(
|
|
639
|
+
var a = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
640
|
+
a.enum &&
|
|
641
|
+
a.enumextra &&
|
|
642
|
+
(a.enum.splice(t, 1), a.enumextra.splice(t, 1)),
|
|
659
643
|
this.jsonSchemaChange(n);
|
|
660
644
|
}),
|
|
661
|
-
(t.insertEnumItem = function (e, t, n,
|
|
662
|
-
var i = (0,
|
|
645
|
+
(t.insertEnumItem = function (e, t, n, a, o, r) {
|
|
646
|
+
var i = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
663
647
|
if (i.enum && i.enumextra) {
|
|
664
|
-
var s = 'before' ===
|
|
648
|
+
var s = 'before' === o ? Number(t) : Number(t) + 1,
|
|
665
649
|
c = i.enum.slice(0, s),
|
|
666
650
|
l = i.enum.slice(s);
|
|
667
651
|
i.enum = [].concat(c, [n], l);
|
|
668
|
-
var
|
|
669
|
-
|
|
670
|
-
i.enumextra = [].concat(
|
|
652
|
+
var p = i.enumextra.slice(0, s),
|
|
653
|
+
d = i.enumextra.slice(s);
|
|
654
|
+
i.enumextra = [].concat(p, [a], d);
|
|
671
655
|
}
|
|
672
656
|
this.jsonSchemaChange(r);
|
|
673
657
|
}),
|
|
@@ -682,70 +666,70 @@
|
|
|
682
666
|
);
|
|
683
667
|
}),
|
|
684
668
|
(t.addEnumItem = function (e, t) {
|
|
685
|
-
var n = (0,
|
|
669
|
+
var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
686
670
|
if (n.enum) {
|
|
687
|
-
var
|
|
688
|
-
|
|
689
|
-
this.insertEnumItem(e, t,
|
|
671
|
+
var a = this.getNewEnumIndex(n.enum),
|
|
672
|
+
o = '选项' + (this.curJsonKeyIndex - 1);
|
|
673
|
+
this.insertEnumItem(e, t, a, o);
|
|
690
674
|
}
|
|
691
675
|
}),
|
|
692
676
|
(t.copyEnumItem = function (e, t) {
|
|
693
|
-
var n = (0,
|
|
677
|
+
var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
694
678
|
if (n.enum) {
|
|
695
|
-
var
|
|
696
|
-
|
|
697
|
-
r = this.getNewEnumIndex(n.enum,
|
|
698
|
-
i =
|
|
679
|
+
var a = n.enum[t],
|
|
680
|
+
o = n.enumextra[t],
|
|
681
|
+
r = this.getNewEnumIndex(n.enum, a),
|
|
682
|
+
i = o + '_' + (this.curJsonKeyIndex - 1);
|
|
699
683
|
this.insertEnumItem(e, t, r, i);
|
|
700
684
|
}
|
|
701
685
|
}),
|
|
702
|
-
(t.updateOptionItem = function (e, t, n,
|
|
703
|
-
var r = (0,
|
|
686
|
+
(t.updateOptionItem = function (e, t, n, a, o) {
|
|
687
|
+
var r = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
704
688
|
r.options &&
|
|
705
689
|
r.options[t] &&
|
|
706
|
-
((r.options[t].label = n), (r.options[t].value =
|
|
707
|
-
this.jsonSchemaChange(
|
|
690
|
+
((r.options[t].label = n), (r.options[t].value = a)),
|
|
691
|
+
this.jsonSchemaChange(o);
|
|
708
692
|
}),
|
|
709
693
|
(t.isExitOptionLabel = function (e, t) {
|
|
710
694
|
var n = !1,
|
|
711
|
-
|
|
695
|
+
a = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
712
696
|
return (
|
|
713
|
-
|
|
714
|
-
|
|
697
|
+
a.options &&
|
|
698
|
+
a.options.find(function (e) {
|
|
715
699
|
return e.label === t || e.name === t;
|
|
716
700
|
}) &&
|
|
717
701
|
(n = !0),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
702
|
+
Oe.KeyWordList &&
|
|
703
|
+
Oe.KeyWordList.indexOf(t) >= 0 &&
|
|
704
|
+
S.message.warning(
|
|
721
705
|
t + '是JSONSchema的保留关键字,建议您换一个名称。',
|
|
722
706
|
),
|
|
723
707
|
n
|
|
724
708
|
);
|
|
725
709
|
}),
|
|
726
|
-
(t.updateOptionLabel = function (e, t, n,
|
|
727
|
-
var
|
|
728
|
-
|
|
729
|
-
this.jsonSchemaChange(
|
|
710
|
+
(t.updateOptionLabel = function (e, t, n, a) {
|
|
711
|
+
var o = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
712
|
+
o.options && o.options[t] && (o.options[t].label = n),
|
|
713
|
+
this.jsonSchemaChange(a);
|
|
730
714
|
}),
|
|
731
|
-
(t.updateOptionValue = function (e, t, n,
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
this.jsonSchemaChange(
|
|
715
|
+
(t.updateOptionValue = function (e, t, n, a) {
|
|
716
|
+
var o = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
717
|
+
o.options && o.options[t] && (o.options[t].value = n),
|
|
718
|
+
this.jsonSchemaChange(a);
|
|
735
719
|
}),
|
|
736
720
|
(t.deleteOptionItem = function (e, t, n) {
|
|
737
|
-
var
|
|
738
|
-
|
|
721
|
+
var a = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
722
|
+
a.options && a.options[t] && a.options.splice(t, 1),
|
|
739
723
|
this.jsonSchemaChange(n);
|
|
740
724
|
}),
|
|
741
|
-
(t.insertOption = function (e, t, n,
|
|
742
|
-
var i = (0,
|
|
725
|
+
(t.insertOption = function (e, t, n, a, o, r) {
|
|
726
|
+
var i = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
743
727
|
if (i.options) {
|
|
744
|
-
var s = 'before' ===
|
|
728
|
+
var s = 'before' === o ? Number(t) : Number(t) + 1,
|
|
745
729
|
c = i.options.slice(0, s),
|
|
746
730
|
l = i.options.slice(s),
|
|
747
|
-
|
|
748
|
-
i.options = [].concat(c, [
|
|
731
|
+
p = { label: n, value: a };
|
|
732
|
+
i.options = [].concat(c, [p], l);
|
|
749
733
|
}
|
|
750
734
|
this.jsonSchemaChange(r);
|
|
751
735
|
}),
|
|
@@ -755,72 +739,33 @@
|
|
|
755
739
|
: 'value1';
|
|
756
740
|
}),
|
|
757
741
|
(t.addOptionItem = function (e, t) {
|
|
758
|
-
var n = (0,
|
|
742
|
+
var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
759
743
|
if (n.options) {
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
this.insertOption(e, t,
|
|
744
|
+
var a = this.getNewOptionValue(n.options),
|
|
745
|
+
o = '选项' + (n.options.length + 1);
|
|
746
|
+
this.insertOption(e, t, o, a);
|
|
763
747
|
}
|
|
764
748
|
}),
|
|
765
749
|
(t.copyOptionItem = function (e, t) {
|
|
766
|
-
var n = (0,
|
|
750
|
+
var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
|
|
767
751
|
if (n.options) {
|
|
768
752
|
n.options[t];
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
this.insertOption(e, t,
|
|
753
|
+
var a = this.getNewOptionValue(n.options),
|
|
754
|
+
o = (label, name + '_copy');
|
|
755
|
+
this.insertOption(e, t, o, a);
|
|
772
756
|
}
|
|
773
757
|
}),
|
|
774
|
-
(t.checkConditionProp = function (e) {
|
|
775
|
-
var t = !1;
|
|
776
|
-
return (
|
|
777
|
-
(this.jsonSchema && this.jsonSchema.conditionProps
|
|
778
|
-
? this.jsonSchema.conditionProps
|
|
779
|
-
: {})[e] && (t = !0),
|
|
780
|
-
t
|
|
781
|
-
);
|
|
782
|
-
}),
|
|
783
|
-
(t.addConditionProp = function (e) {
|
|
784
|
-
if (this.jsonSchema) {
|
|
785
|
-
this.jsonSchema.conditionProps ||
|
|
786
|
-
(this.jsonSchema.conditionProps = {});
|
|
787
|
-
var t = this.jsonSchema.conditionProps;
|
|
788
|
-
e &&
|
|
789
|
-
e.keyRoute &&
|
|
790
|
-
((t[e.keyRoute] = e), this.jsonSchemaChange());
|
|
791
|
-
} else b.message.error('当前schema为空');
|
|
792
|
-
}),
|
|
793
|
-
(t.removeConditionProp = function (e) {
|
|
794
|
-
if (this.jsonSchema) {
|
|
795
|
-
this.jsonSchema.conditionProps ||
|
|
796
|
-
(this.jsonSchema.conditionProps = {});
|
|
797
|
-
var t = this.jsonSchema.conditionProps;
|
|
798
|
-
e && t[e] && (delete t[e], this.jsonSchemaChange());
|
|
799
|
-
} else b.message.error('当前schema为空');
|
|
800
|
-
}),
|
|
801
|
-
(t.cancelConditionProp = function (e, t) {
|
|
802
|
-
if (this.jsonSchema) {
|
|
803
|
-
var n = this.getSchemaByKeyRoute(e);
|
|
804
|
-
n.isConditionProp = !1;
|
|
805
|
-
var o = this.keyRoute2indexRoute(e);
|
|
806
|
-
this.editSchemaData(o, t, n);
|
|
807
|
-
} else b.message.error('当前schema为空');
|
|
808
|
-
}),
|
|
809
|
-
(t.deleteSchemaProp = function (e, t, n) {
|
|
810
|
-
delete (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema)[t],
|
|
811
|
-
this.jsonSchemaChange(n);
|
|
812
|
-
}),
|
|
813
758
|
f()(e, [
|
|
814
759
|
{
|
|
815
760
|
key: 'JSONSchemaObj',
|
|
816
761
|
get: function () {
|
|
817
|
-
return (0,
|
|
762
|
+
return (0, b.toJS)(this.jsonSchema);
|
|
818
763
|
},
|
|
819
764
|
},
|
|
820
765
|
])
|
|
821
766
|
);
|
|
822
767
|
})()),
|
|
823
|
-
(
|
|
768
|
+
(ue = x()(de.prototype, 'triggerChange', [b.observable], {
|
|
824
769
|
configurable: !0,
|
|
825
770
|
enumerable: !0,
|
|
826
771
|
writable: !0,
|
|
@@ -828,7 +773,7 @@
|
|
|
828
773
|
return !1;
|
|
829
774
|
},
|
|
830
775
|
})),
|
|
831
|
-
(
|
|
776
|
+
(me = x()(de.prototype, 'jsonSchema', [b.observable], {
|
|
832
777
|
configurable: !0,
|
|
833
778
|
enumerable: !0,
|
|
834
779
|
writable: !0,
|
|
@@ -836,15 +781,15 @@
|
|
|
836
781
|
return {};
|
|
837
782
|
},
|
|
838
783
|
})),
|
|
839
|
-
(
|
|
784
|
+
(he = x()(de.prototype, 'SchemaTypeList', [b.observable], {
|
|
840
785
|
configurable: !0,
|
|
841
786
|
enumerable: !0,
|
|
842
787
|
writable: !0,
|
|
843
788
|
initializer: function () {
|
|
844
|
-
return
|
|
789
|
+
return Ee;
|
|
845
790
|
},
|
|
846
791
|
})),
|
|
847
|
-
(
|
|
792
|
+
(ye = x()(de.prototype, 'onChange', [b.observable], {
|
|
848
793
|
configurable: !0,
|
|
849
794
|
enumerable: !0,
|
|
850
795
|
writable: !0,
|
|
@@ -852,350 +797,350 @@
|
|
|
852
797
|
return function () {};
|
|
853
798
|
},
|
|
854
799
|
})),
|
|
855
|
-
|
|
856
|
-
|
|
800
|
+
x()(
|
|
801
|
+
de.prototype,
|
|
857
802
|
'triggerChangeAction',
|
|
858
|
-
[
|
|
803
|
+
[j],
|
|
859
804
|
Object.getOwnPropertyDescriptor(
|
|
860
|
-
|
|
805
|
+
de.prototype,
|
|
861
806
|
'triggerChangeAction',
|
|
862
807
|
),
|
|
863
|
-
|
|
808
|
+
de.prototype,
|
|
864
809
|
),
|
|
865
|
-
|
|
866
|
-
|
|
810
|
+
x()(
|
|
811
|
+
de.prototype,
|
|
867
812
|
'initSchemaTypeList',
|
|
868
|
-
[
|
|
813
|
+
[N],
|
|
869
814
|
Object.getOwnPropertyDescriptor(
|
|
870
|
-
|
|
815
|
+
de.prototype,
|
|
871
816
|
'initSchemaTypeList',
|
|
872
817
|
),
|
|
873
|
-
|
|
818
|
+
de.prototype,
|
|
874
819
|
),
|
|
875
|
-
|
|
876
|
-
|
|
820
|
+
x()(
|
|
821
|
+
de.prototype,
|
|
877
822
|
'initJSONSchemaData',
|
|
878
|
-
[
|
|
823
|
+
[I],
|
|
879
824
|
Object.getOwnPropertyDescriptor(
|
|
880
|
-
|
|
825
|
+
de.prototype,
|
|
881
826
|
'initJSONSchemaData',
|
|
882
827
|
),
|
|
883
|
-
|
|
828
|
+
de.prototype,
|
|
884
829
|
),
|
|
885
|
-
|
|
886
|
-
|
|
830
|
+
x()(
|
|
831
|
+
de.prototype,
|
|
887
832
|
'JSONSchemaObj',
|
|
888
|
-
[
|
|
889
|
-
Object.getOwnPropertyDescriptor(
|
|
890
|
-
|
|
833
|
+
[b.computed],
|
|
834
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'JSONSchemaObj'),
|
|
835
|
+
de.prototype,
|
|
891
836
|
),
|
|
892
|
-
|
|
893
|
-
|
|
837
|
+
x()(
|
|
838
|
+
de.prototype,
|
|
894
839
|
'initOnChange',
|
|
895
|
-
[
|
|
896
|
-
Object.getOwnPropertyDescriptor(
|
|
897
|
-
|
|
840
|
+
[w],
|
|
841
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'initOnChange'),
|
|
842
|
+
de.prototype,
|
|
898
843
|
),
|
|
899
|
-
|
|
900
|
-
|
|
844
|
+
x()(
|
|
845
|
+
de.prototype,
|
|
901
846
|
'jsonSchemaChange',
|
|
902
|
-
[
|
|
847
|
+
[R],
|
|
903
848
|
Object.getOwnPropertyDescriptor(
|
|
904
|
-
|
|
849
|
+
de.prototype,
|
|
905
850
|
'jsonSchemaChange',
|
|
906
851
|
),
|
|
907
|
-
|
|
852
|
+
de.prototype,
|
|
908
853
|
),
|
|
909
|
-
|
|
910
|
-
|
|
854
|
+
x()(
|
|
855
|
+
de.prototype,
|
|
911
856
|
'indexRoute2keyRoute',
|
|
912
|
-
[
|
|
857
|
+
[K],
|
|
913
858
|
Object.getOwnPropertyDescriptor(
|
|
914
|
-
|
|
859
|
+
de.prototype,
|
|
915
860
|
'indexRoute2keyRoute',
|
|
916
861
|
),
|
|
917
|
-
|
|
862
|
+
de.prototype,
|
|
918
863
|
),
|
|
919
|
-
|
|
920
|
-
|
|
864
|
+
x()(
|
|
865
|
+
de.prototype,
|
|
921
866
|
'keyRoute2indexRoute',
|
|
922
|
-
[
|
|
867
|
+
[k],
|
|
923
868
|
Object.getOwnPropertyDescriptor(
|
|
924
|
-
|
|
869
|
+
de.prototype,
|
|
925
870
|
'keyRoute2indexRoute',
|
|
926
871
|
),
|
|
927
|
-
|
|
872
|
+
de.prototype,
|
|
928
873
|
),
|
|
929
|
-
|
|
930
|
-
|
|
874
|
+
x()(
|
|
875
|
+
de.prototype,
|
|
931
876
|
'getSchemaByIndexRoute',
|
|
932
|
-
[
|
|
877
|
+
[T],
|
|
933
878
|
Object.getOwnPropertyDescriptor(
|
|
934
|
-
|
|
879
|
+
de.prototype,
|
|
935
880
|
'getSchemaByIndexRoute',
|
|
936
881
|
),
|
|
937
|
-
|
|
882
|
+
de.prototype,
|
|
938
883
|
),
|
|
939
|
-
|
|
940
|
-
|
|
884
|
+
x()(
|
|
885
|
+
de.prototype,
|
|
941
886
|
'getSchemaByKeyRoute',
|
|
942
887
|
[J],
|
|
943
888
|
Object.getOwnPropertyDescriptor(
|
|
944
|
-
|
|
889
|
+
de.prototype,
|
|
945
890
|
'getSchemaByKeyRoute',
|
|
946
891
|
),
|
|
947
|
-
|
|
892
|
+
de.prototype,
|
|
948
893
|
),
|
|
949
|
-
|
|
950
|
-
|
|
894
|
+
x()(
|
|
895
|
+
de.prototype,
|
|
951
896
|
'getNewJsonKeyIndex',
|
|
952
897
|
[D],
|
|
953
898
|
Object.getOwnPropertyDescriptor(
|
|
954
|
-
|
|
899
|
+
de.prototype,
|
|
955
900
|
'getNewJsonKeyIndex',
|
|
956
901
|
),
|
|
957
|
-
|
|
902
|
+
de.prototype,
|
|
958
903
|
),
|
|
959
|
-
|
|
960
|
-
|
|
904
|
+
x()(
|
|
905
|
+
de.prototype,
|
|
961
906
|
'isExitJsonKey',
|
|
962
|
-
[
|
|
963
|
-
Object.getOwnPropertyDescriptor(
|
|
964
|
-
|
|
907
|
+
[B],
|
|
908
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'isExitJsonKey'),
|
|
909
|
+
de.prototype,
|
|
965
910
|
),
|
|
966
|
-
|
|
967
|
-
|
|
911
|
+
x()(
|
|
912
|
+
de.prototype,
|
|
968
913
|
'isSupportCurType',
|
|
969
|
-
[
|
|
914
|
+
[P],
|
|
970
915
|
Object.getOwnPropertyDescriptor(
|
|
971
|
-
|
|
916
|
+
de.prototype,
|
|
972
917
|
'isSupportCurType',
|
|
973
918
|
),
|
|
974
|
-
|
|
919
|
+
de.prototype,
|
|
975
920
|
),
|
|
976
|
-
|
|
977
|
-
|
|
921
|
+
x()(
|
|
922
|
+
de.prototype,
|
|
978
923
|
'addChildJson',
|
|
979
924
|
[V],
|
|
980
|
-
Object.getOwnPropertyDescriptor(
|
|
981
|
-
|
|
925
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'addChildJson'),
|
|
926
|
+
de.prototype,
|
|
982
927
|
),
|
|
983
|
-
|
|
984
|
-
|
|
928
|
+
x()(
|
|
929
|
+
de.prototype,
|
|
985
930
|
'changeType',
|
|
986
931
|
[L],
|
|
987
|
-
Object.getOwnPropertyDescriptor(
|
|
988
|
-
|
|
932
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'changeType'),
|
|
933
|
+
de.prototype,
|
|
989
934
|
),
|
|
990
|
-
|
|
991
|
-
|
|
935
|
+
x()(
|
|
936
|
+
de.prototype,
|
|
992
937
|
'updateSchemaData',
|
|
993
938
|
[F],
|
|
994
939
|
Object.getOwnPropertyDescriptor(
|
|
995
|
-
|
|
940
|
+
de.prototype,
|
|
996
941
|
'updateSchemaData',
|
|
997
942
|
),
|
|
998
|
-
|
|
943
|
+
de.prototype,
|
|
999
944
|
),
|
|
1000
|
-
|
|
1001
|
-
|
|
945
|
+
x()(
|
|
946
|
+
de.prototype,
|
|
1002
947
|
'editSchemaData',
|
|
1003
948
|
[q],
|
|
1004
|
-
Object.getOwnPropertyDescriptor(
|
|
1005
|
-
|
|
949
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'editSchemaData'),
|
|
950
|
+
de.prototype,
|
|
1006
951
|
),
|
|
1007
|
-
|
|
1008
|
-
|
|
952
|
+
x()(
|
|
953
|
+
de.prototype,
|
|
1009
954
|
'editJsonKey',
|
|
1010
955
|
[A],
|
|
1011
|
-
Object.getOwnPropertyDescriptor(
|
|
1012
|
-
|
|
956
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'editJsonKey'),
|
|
957
|
+
de.prototype,
|
|
1013
958
|
),
|
|
1014
|
-
|
|
1015
|
-
|
|
959
|
+
x()(
|
|
960
|
+
de.prototype,
|
|
1016
961
|
'addNextJsonData',
|
|
1017
962
|
[_],
|
|
1018
963
|
Object.getOwnPropertyDescriptor(
|
|
1019
|
-
|
|
964
|
+
de.prototype,
|
|
1020
965
|
'addNextJsonData',
|
|
1021
966
|
),
|
|
1022
|
-
|
|
967
|
+
de.prototype,
|
|
1023
968
|
),
|
|
1024
|
-
|
|
1025
|
-
|
|
969
|
+
x()(
|
|
970
|
+
de.prototype,
|
|
1026
971
|
'insertJsonData',
|
|
1027
972
|
[M],
|
|
1028
|
-
Object.getOwnPropertyDescriptor(
|
|
1029
|
-
|
|
973
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'insertJsonData'),
|
|
974
|
+
de.prototype,
|
|
1030
975
|
),
|
|
1031
|
-
|
|
1032
|
-
|
|
976
|
+
x()(
|
|
977
|
+
de.prototype,
|
|
1033
978
|
'deleteJsonByIndex_CurKey',
|
|
1034
|
-
[
|
|
979
|
+
[W],
|
|
1035
980
|
Object.getOwnPropertyDescriptor(
|
|
1036
|
-
|
|
981
|
+
de.prototype,
|
|
1037
982
|
'deleteJsonByIndex_CurKey',
|
|
1038
983
|
),
|
|
1039
|
-
|
|
984
|
+
de.prototype,
|
|
1040
985
|
),
|
|
1041
|
-
|
|
1042
|
-
|
|
986
|
+
x()(
|
|
987
|
+
de.prototype,
|
|
1043
988
|
'deleteJsonByIndex',
|
|
1044
|
-
[
|
|
989
|
+
[G],
|
|
1045
990
|
Object.getOwnPropertyDescriptor(
|
|
1046
|
-
|
|
991
|
+
de.prototype,
|
|
1047
992
|
'deleteJsonByIndex',
|
|
1048
993
|
),
|
|
1049
|
-
|
|
994
|
+
de.prototype,
|
|
1050
995
|
),
|
|
1051
|
-
|
|
1052
|
-
|
|
996
|
+
x()(
|
|
997
|
+
de.prototype,
|
|
1053
998
|
'updateEnumItem',
|
|
1054
|
-
[
|
|
1055
|
-
Object.getOwnPropertyDescriptor(
|
|
1056
|
-
|
|
999
|
+
[z],
|
|
1000
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumItem'),
|
|
1001
|
+
de.prototype,
|
|
1057
1002
|
),
|
|
1058
|
-
|
|
1059
|
-
|
|
1003
|
+
x()(
|
|
1004
|
+
de.prototype,
|
|
1060
1005
|
'isExitEnumKey',
|
|
1061
|
-
[
|
|
1062
|
-
Object.getOwnPropertyDescriptor(
|
|
1063
|
-
|
|
1006
|
+
[U],
|
|
1007
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'isExitEnumKey'),
|
|
1008
|
+
de.prototype,
|
|
1064
1009
|
),
|
|
1065
|
-
|
|
1066
|
-
|
|
1010
|
+
x()(
|
|
1011
|
+
de.prototype,
|
|
1067
1012
|
'updateEnumKey',
|
|
1068
|
-
[
|
|
1069
|
-
Object.getOwnPropertyDescriptor(
|
|
1070
|
-
|
|
1013
|
+
[H],
|
|
1014
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumKey'),
|
|
1015
|
+
de.prototype,
|
|
1071
1016
|
),
|
|
1072
|
-
|
|
1073
|
-
|
|
1017
|
+
x()(
|
|
1018
|
+
de.prototype,
|
|
1074
1019
|
'updateEnumText',
|
|
1075
1020
|
[Q],
|
|
1076
|
-
Object.getOwnPropertyDescriptor(
|
|
1077
|
-
|
|
1021
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumText'),
|
|
1022
|
+
de.prototype,
|
|
1078
1023
|
),
|
|
1079
|
-
|
|
1080
|
-
|
|
1024
|
+
x()(
|
|
1025
|
+
de.prototype,
|
|
1081
1026
|
'deleteEnumItem',
|
|
1082
1027
|
[X],
|
|
1083
|
-
Object.getOwnPropertyDescriptor(
|
|
1084
|
-
|
|
1028
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'deleteEnumItem'),
|
|
1029
|
+
de.prototype,
|
|
1085
1030
|
),
|
|
1086
|
-
|
|
1087
|
-
|
|
1031
|
+
x()(
|
|
1032
|
+
de.prototype,
|
|
1088
1033
|
'insertEnumItem',
|
|
1089
1034
|
[Y],
|
|
1090
|
-
Object.getOwnPropertyDescriptor(
|
|
1091
|
-
|
|
1035
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'insertEnumItem'),
|
|
1036
|
+
de.prototype,
|
|
1092
1037
|
),
|
|
1093
|
-
|
|
1094
|
-
|
|
1038
|
+
x()(
|
|
1039
|
+
de.prototype,
|
|
1095
1040
|
'getNewEnumIndex',
|
|
1096
1041
|
[Z],
|
|
1097
1042
|
Object.getOwnPropertyDescriptor(
|
|
1098
|
-
|
|
1043
|
+
de.prototype,
|
|
1099
1044
|
'getNewEnumIndex',
|
|
1100
1045
|
),
|
|
1101
|
-
|
|
1046
|
+
de.prototype,
|
|
1102
1047
|
),
|
|
1103
|
-
|
|
1104
|
-
|
|
1048
|
+
x()(
|
|
1049
|
+
de.prototype,
|
|
1105
1050
|
'addEnumItem',
|
|
1106
1051
|
[$],
|
|
1107
|
-
Object.getOwnPropertyDescriptor(
|
|
1108
|
-
|
|
1052
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'addEnumItem'),
|
|
1053
|
+
de.prototype,
|
|
1109
1054
|
),
|
|
1110
|
-
|
|
1111
|
-
|
|
1055
|
+
x()(
|
|
1056
|
+
de.prototype,
|
|
1112
1057
|
'copyEnumItem',
|
|
1113
1058
|
[ee],
|
|
1114
|
-
Object.getOwnPropertyDescriptor(
|
|
1115
|
-
|
|
1059
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'copyEnumItem'),
|
|
1060
|
+
de.prototype,
|
|
1116
1061
|
),
|
|
1117
|
-
|
|
1118
|
-
|
|
1062
|
+
x()(
|
|
1063
|
+
de.prototype,
|
|
1119
1064
|
'updateOptionItem',
|
|
1120
1065
|
[te],
|
|
1121
1066
|
Object.getOwnPropertyDescriptor(
|
|
1122
|
-
|
|
1067
|
+
de.prototype,
|
|
1123
1068
|
'updateOptionItem',
|
|
1124
1069
|
),
|
|
1125
|
-
|
|
1070
|
+
de.prototype,
|
|
1126
1071
|
),
|
|
1127
|
-
|
|
1128
|
-
|
|
1072
|
+
x()(
|
|
1073
|
+
de.prototype,
|
|
1129
1074
|
'isExitOptionLabel',
|
|
1130
1075
|
[ne],
|
|
1131
1076
|
Object.getOwnPropertyDescriptor(
|
|
1132
|
-
|
|
1077
|
+
de.prototype,
|
|
1133
1078
|
'isExitOptionLabel',
|
|
1134
1079
|
),
|
|
1135
|
-
|
|
1080
|
+
de.prototype,
|
|
1136
1081
|
),
|
|
1137
|
-
|
|
1138
|
-
|
|
1082
|
+
x()(
|
|
1083
|
+
de.prototype,
|
|
1139
1084
|
'updateOptionLabel',
|
|
1140
|
-
[
|
|
1085
|
+
[ae],
|
|
1141
1086
|
Object.getOwnPropertyDescriptor(
|
|
1142
|
-
|
|
1087
|
+
de.prototype,
|
|
1143
1088
|
'updateOptionLabel',
|
|
1144
1089
|
),
|
|
1145
|
-
|
|
1090
|
+
de.prototype,
|
|
1146
1091
|
),
|
|
1147
|
-
|
|
1148
|
-
|
|
1092
|
+
x()(
|
|
1093
|
+
de.prototype,
|
|
1149
1094
|
'updateOptionValue',
|
|
1150
|
-
[
|
|
1095
|
+
[oe],
|
|
1151
1096
|
Object.getOwnPropertyDescriptor(
|
|
1152
|
-
|
|
1097
|
+
de.prototype,
|
|
1153
1098
|
'updateOptionValue',
|
|
1154
1099
|
),
|
|
1155
|
-
|
|
1100
|
+
de.prototype,
|
|
1156
1101
|
),
|
|
1157
|
-
|
|
1158
|
-
|
|
1102
|
+
x()(
|
|
1103
|
+
de.prototype,
|
|
1159
1104
|
'deleteOptionItem',
|
|
1160
1105
|
[re],
|
|
1161
1106
|
Object.getOwnPropertyDescriptor(
|
|
1162
|
-
|
|
1107
|
+
de.prototype,
|
|
1163
1108
|
'deleteOptionItem',
|
|
1164
1109
|
),
|
|
1165
|
-
|
|
1110
|
+
de.prototype,
|
|
1166
1111
|
),
|
|
1167
|
-
|
|
1168
|
-
|
|
1112
|
+
x()(
|
|
1113
|
+
de.prototype,
|
|
1169
1114
|
'insertOption',
|
|
1170
1115
|
[ie],
|
|
1171
|
-
Object.getOwnPropertyDescriptor(
|
|
1172
|
-
|
|
1116
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'insertOption'),
|
|
1117
|
+
de.prototype,
|
|
1173
1118
|
),
|
|
1174
|
-
|
|
1175
|
-
|
|
1119
|
+
x()(
|
|
1120
|
+
de.prototype,
|
|
1176
1121
|
'getNewOptionValue',
|
|
1177
1122
|
[se],
|
|
1178
1123
|
Object.getOwnPropertyDescriptor(
|
|
1179
|
-
|
|
1124
|
+
de.prototype,
|
|
1180
1125
|
'getNewOptionValue',
|
|
1181
1126
|
),
|
|
1182
|
-
|
|
1127
|
+
de.prototype,
|
|
1183
1128
|
),
|
|
1184
|
-
|
|
1185
|
-
|
|
1129
|
+
x()(
|
|
1130
|
+
de.prototype,
|
|
1186
1131
|
'addOptionItem',
|
|
1187
1132
|
[ce],
|
|
1188
|
-
Object.getOwnPropertyDescriptor(
|
|
1189
|
-
|
|
1133
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'addOptionItem'),
|
|
1134
|
+
de.prototype,
|
|
1190
1135
|
),
|
|
1191
|
-
|
|
1192
|
-
|
|
1136
|
+
x()(
|
|
1137
|
+
de.prototype,
|
|
1193
1138
|
'copyOptionItem',
|
|
1194
1139
|
[le],
|
|
1195
|
-
Object.getOwnPropertyDescriptor(
|
|
1196
|
-
|
|
1140
|
+
Object.getOwnPropertyDescriptor(de.prototype, 'copyOptionItem'),
|
|
1141
|
+
de.prototype,
|
|
1197
1142
|
),
|
|
1198
|
-
(
|
|
1143
|
+
(ge = x()(de.prototype, 'childElemSort', [pe], {
|
|
1199
1144
|
configurable: !0,
|
|
1200
1145
|
enumerable: !0,
|
|
1201
1146
|
writable: !0,
|
|
@@ -1203,26 +1148,26 @@
|
|
|
1203
1148
|
var e = this;
|
|
1204
1149
|
return function (t) {
|
|
1205
1150
|
for (
|
|
1206
|
-
var n = (0,
|
|
1207
|
-
|
|
1208
|
-
|
|
1151
|
+
var n = (0, Oe.getSchemaByIndexRoute)(t, e.jsonSchema),
|
|
1152
|
+
a = n.propertyOrder,
|
|
1153
|
+
o = [],
|
|
1209
1154
|
r = [],
|
|
1210
1155
|
i = [],
|
|
1211
1156
|
s = [],
|
|
1212
1157
|
c = [],
|
|
1213
1158
|
l = [],
|
|
1214
|
-
d = [],
|
|
1215
1159
|
p = [],
|
|
1160
|
+
d = [],
|
|
1216
1161
|
u = 0,
|
|
1217
|
-
m =
|
|
1162
|
+
m = a.length;
|
|
1218
1163
|
u < m;
|
|
1219
1164
|
u++
|
|
1220
1165
|
) {
|
|
1221
|
-
var h =
|
|
1166
|
+
var h = a[u];
|
|
1222
1167
|
switch (n.properties[h].type) {
|
|
1223
1168
|
case 'input':
|
|
1224
1169
|
case 'url':
|
|
1225
|
-
|
|
1170
|
+
o.push(h);
|
|
1226
1171
|
break;
|
|
1227
1172
|
case 'number':
|
|
1228
1173
|
case 'quantity':
|
|
@@ -1250,259 +1195,117 @@
|
|
|
1250
1195
|
break;
|
|
1251
1196
|
case 'object':
|
|
1252
1197
|
case 'array':
|
|
1253
|
-
|
|
1198
|
+
p.push(h);
|
|
1254
1199
|
break;
|
|
1255
1200
|
default:
|
|
1256
|
-
|
|
1201
|
+
d.push(h);
|
|
1257
1202
|
}
|
|
1258
1203
|
}
|
|
1259
|
-
(n.propertyOrder = [].concat(
|
|
1204
|
+
(n.propertyOrder = [].concat(o, r, i, s, l, c, p, d)),
|
|
1260
1205
|
e.jsonSchemaChange();
|
|
1261
1206
|
};
|
|
1262
1207
|
},
|
|
1263
1208
|
})),
|
|
1264
|
-
|
|
1265
|
-
ge.prototype,
|
|
1266
|
-
'checkConditionProp',
|
|
1267
|
-
[pe],
|
|
1268
|
-
Object.getOwnPropertyDescriptor(
|
|
1269
|
-
ge.prototype,
|
|
1270
|
-
'checkConditionProp',
|
|
1271
|
-
),
|
|
1272
|
-
ge.prototype,
|
|
1273
|
-
),
|
|
1274
|
-
v()(
|
|
1275
|
-
ge.prototype,
|
|
1276
|
-
'addConditionProp',
|
|
1277
|
-
[ue],
|
|
1278
|
-
Object.getOwnPropertyDescriptor(
|
|
1279
|
-
ge.prototype,
|
|
1280
|
-
'addConditionProp',
|
|
1281
|
-
),
|
|
1282
|
-
ge.prototype,
|
|
1283
|
-
),
|
|
1284
|
-
v()(
|
|
1285
|
-
ge.prototype,
|
|
1286
|
-
'removeConditionProp',
|
|
1287
|
-
[me],
|
|
1288
|
-
Object.getOwnPropertyDescriptor(
|
|
1289
|
-
ge.prototype,
|
|
1290
|
-
'removeConditionProp',
|
|
1291
|
-
),
|
|
1292
|
-
ge.prototype,
|
|
1293
|
-
),
|
|
1294
|
-
v()(
|
|
1295
|
-
ge.prototype,
|
|
1296
|
-
'cancelConditionProp',
|
|
1297
|
-
[he],
|
|
1298
|
-
Object.getOwnPropertyDescriptor(
|
|
1299
|
-
ge.prototype,
|
|
1300
|
-
'cancelConditionProp',
|
|
1301
|
-
),
|
|
1302
|
-
ge.prototype,
|
|
1303
|
-
),
|
|
1304
|
-
v()(
|
|
1305
|
-
ge.prototype,
|
|
1306
|
-
'deleteSchemaProp',
|
|
1307
|
-
[ye],
|
|
1308
|
-
Object.getOwnPropertyDescriptor(
|
|
1309
|
-
ge.prototype,
|
|
1310
|
-
'deleteSchemaProp',
|
|
1311
|
-
),
|
|
1312
|
-
ge.prototype,
|
|
1313
|
-
),
|
|
1314
|
-
ge),
|
|
1209
|
+
de),
|
|
1315
1210
|
},
|
|
1316
|
-
|
|
1317
|
-
Je = b.Select.Option,
|
|
1318
|
-
De = (0, l.inject)(function (e) {
|
|
1319
|
-
return {
|
|
1320
|
-
getSchemaByKeyRoute: e.jsonSchemaStore.getSchemaByKeyRoute,
|
|
1321
|
-
};
|
|
1322
|
-
})(
|
|
1323
|
-
(0, l.observer)(function (e) {
|
|
1324
|
-
var t = e.conditionRule,
|
|
1325
|
-
n = e.hiddenRuleConditionValueChange,
|
|
1326
|
-
o = e.getSchemaByKeyRoute,
|
|
1327
|
-
a = {};
|
|
1328
|
-
if (t.conditionProp && t.conditionProp.keyRoute) {
|
|
1329
|
-
var r = o(t.conditionProp.keyRoute);
|
|
1330
|
-
r.items && (a = r.items);
|
|
1331
|
-
}
|
|
1332
|
-
return !t.conditionProp ||
|
|
1333
|
-
('radio' !== t.conditionProp.type &&
|
|
1334
|
-
'select' !== t.conditionProp.type)
|
|
1335
|
-
? t.conditionProp && 'boolean' === t.conditionProp.type
|
|
1336
|
-
? i().createElement(
|
|
1337
|
-
b.Radio.Group,
|
|
1338
|
-
{
|
|
1339
|
-
style: { display: 'inline-block' },
|
|
1340
|
-
onChange: function (e) {
|
|
1341
|
-
n(e.target.value);
|
|
1342
|
-
},
|
|
1343
|
-
defaultValue: t.conditionValue,
|
|
1344
|
-
},
|
|
1345
|
-
i().createElement(
|
|
1346
|
-
b.Radio,
|
|
1347
|
-
{ value: !0, key: !0 },
|
|
1348
|
-
'true',
|
|
1349
|
-
),
|
|
1350
|
-
i().createElement(
|
|
1351
|
-
b.Radio,
|
|
1352
|
-
{ value: !1, key: !1 },
|
|
1353
|
-
'false',
|
|
1354
|
-
),
|
|
1355
|
-
)
|
|
1356
|
-
: i().createElement(b.Input, {
|
|
1357
|
-
defaultValue: t.conditionValue,
|
|
1358
|
-
onPressEnter: function (e) {
|
|
1359
|
-
return n(e.target.value);
|
|
1360
|
-
},
|
|
1361
|
-
onBlur: function (e) {
|
|
1362
|
-
return n(e.target.value);
|
|
1363
|
-
},
|
|
1364
|
-
})
|
|
1365
|
-
: i().createElement(
|
|
1366
|
-
b.Select,
|
|
1367
|
-
{
|
|
1368
|
-
showSearch: !0,
|
|
1369
|
-
defaultValue: t.conditionValue,
|
|
1370
|
-
style: { width: 150 },
|
|
1371
|
-
onChange: function (e) {
|
|
1372
|
-
n(e);
|
|
1373
|
-
},
|
|
1374
|
-
},
|
|
1375
|
-
a &&
|
|
1376
|
-
a.enum &&
|
|
1377
|
-
a.enum.map(function (e, n) {
|
|
1378
|
-
return i().createElement(
|
|
1379
|
-
Je,
|
|
1380
|
-
{ key: e, value: e, select: e === t.conditionValue },
|
|
1381
|
-
a.enumextra[n],
|
|
1382
|
-
);
|
|
1383
|
-
}),
|
|
1384
|
-
);
|
|
1385
|
-
}),
|
|
1386
|
-
);
|
|
1211
|
+
Ie = require('@ant-design/icons');
|
|
1387
1212
|
n(975);
|
|
1388
|
-
var
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
function
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
e,
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
a =
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
style: { display: 'inline-block' },
|
|
1412
|
-
defaultChecked: t.default,
|
|
1413
|
-
checkedChildren: 'true',
|
|
1414
|
-
unCheckedChildren: 'false',
|
|
1415
|
-
onChange: function (e) {
|
|
1416
|
-
n.handleValueChange('default', e);
|
|
1417
|
-
},
|
|
1418
|
-
});
|
|
1419
|
-
if ('checkboxes' === e || ('select' === e && t.multiple)) {
|
|
1420
|
-
var a = t.options;
|
|
1421
|
-
return r.createElement(
|
|
1422
|
-
b.Checkbox.Group,
|
|
1423
|
-
{
|
|
1213
|
+
var we = S.Input.TextArea,
|
|
1214
|
+
Re =
|
|
1215
|
+
(S.Select.Option,
|
|
1216
|
+
(function (e) {
|
|
1217
|
+
function t(t) {
|
|
1218
|
+
var n;
|
|
1219
|
+
return (
|
|
1220
|
+
((n = e.call(this, t) || this).handleValueChange = function (
|
|
1221
|
+
e,
|
|
1222
|
+
t,
|
|
1223
|
+
) {
|
|
1224
|
+
var a = (n.props.schemaStore || {}).editSchemaData,
|
|
1225
|
+
o = n.props,
|
|
1226
|
+
r = o.indexRoute,
|
|
1227
|
+
i = o.jsonKey;
|
|
1228
|
+
if (o.targetJsonSchema[e] !== t) {
|
|
1229
|
+
var s = {};
|
|
1230
|
+
(s[e] = t), a(r, i, s);
|
|
1231
|
+
}
|
|
1232
|
+
}),
|
|
1233
|
+
(n.renderDefaultContent = function (e, t, a) {
|
|
1234
|
+
if ('boolean' === e)
|
|
1235
|
+
return r.createElement(S.Switch, {
|
|
1424
1236
|
style: { display: 'inline-block' },
|
|
1237
|
+
defaultChecked: t.default,
|
|
1238
|
+
checkedChildren: 'true',
|
|
1239
|
+
unCheckedChildren: 'false',
|
|
1425
1240
|
onChange: function (e) {
|
|
1426
1241
|
n.handleValueChange('default', e);
|
|
1427
1242
|
},
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
}),
|
|
1440
|
-
);
|
|
1441
|
-
}
|
|
1442
|
-
if ('radio' === e || 'select' === e) {
|
|
1443
|
-
var i = t.options;
|
|
1444
|
-
return r.createElement(
|
|
1445
|
-
b.Radio.Group,
|
|
1446
|
-
{
|
|
1447
|
-
style: { display: 'inline-block' },
|
|
1448
|
-
defaultValue: t.default,
|
|
1449
|
-
onChange: function (e) {
|
|
1450
|
-
var t = e.target.value;
|
|
1451
|
-
n.handleValueChange('default', t);
|
|
1452
|
-
},
|
|
1453
|
-
},
|
|
1454
|
-
i &&
|
|
1455
|
-
i.length > 0 &&
|
|
1456
|
-
i.map(function (e, t) {
|
|
1457
|
-
var n = o + '-options-' + t;
|
|
1458
|
-
return r.createElement(
|
|
1459
|
-
b.Radio,
|
|
1460
|
-
{ value: e.value, key: n },
|
|
1461
|
-
e.label || e.name,
|
|
1462
|
-
);
|
|
1463
|
-
}),
|
|
1464
|
-
);
|
|
1465
|
-
}
|
|
1466
|
-
return 'color' === e
|
|
1467
|
-
? r.createElement(b.Input, {
|
|
1468
|
-
style: { display: 'inline-block' },
|
|
1469
|
-
className: 'color-item-form',
|
|
1470
|
-
type: 'color',
|
|
1471
|
-
defaultValue: t.default,
|
|
1472
|
-
onChange: function (e) {
|
|
1473
|
-
var t = e.target.value;
|
|
1474
|
-
n.handleValueChange('default', t);
|
|
1243
|
+
});
|
|
1244
|
+
if ('checkboxes' === e || ('select' === e && t.multiple)) {
|
|
1245
|
+
var o = t.options;
|
|
1246
|
+
return r.createElement(
|
|
1247
|
+
S.Checkbox.Group,
|
|
1248
|
+
{
|
|
1249
|
+
style: { display: 'inline-block' },
|
|
1250
|
+
onChange: function (e) {
|
|
1251
|
+
n.handleValueChange('default', e);
|
|
1252
|
+
},
|
|
1253
|
+
defaultValue: t.default,
|
|
1475
1254
|
},
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1255
|
+
o &&
|
|
1256
|
+
o.length > 0 &&
|
|
1257
|
+
o.map(function (e, t) {
|
|
1258
|
+
var n = a + '-options-' + t;
|
|
1259
|
+
return r.createElement(
|
|
1260
|
+
S.Checkbox,
|
|
1261
|
+
{ value: e.value, key: n },
|
|
1262
|
+
e.label || e.name,
|
|
1263
|
+
);
|
|
1264
|
+
}),
|
|
1265
|
+
);
|
|
1266
|
+
}
|
|
1267
|
+
if ('radio' === e || 'select' === e) {
|
|
1268
|
+
var i = t.options;
|
|
1269
|
+
return r.createElement(
|
|
1270
|
+
S.Radio.Group,
|
|
1271
|
+
{
|
|
1482
1272
|
style: { display: 'inline-block' },
|
|
1483
|
-
rows: 4,
|
|
1484
|
-
placeholder: '请输入' + t.title + '的默认值',
|
|
1485
1273
|
defaultValue: t.default,
|
|
1486
|
-
|
|
1274
|
+
onChange: function (e) {
|
|
1487
1275
|
var t = e.target.value;
|
|
1488
1276
|
n.handleValueChange('default', t);
|
|
1489
1277
|
},
|
|
1490
|
-
|
|
1278
|
+
},
|
|
1279
|
+
i &&
|
|
1280
|
+
i.length > 0 &&
|
|
1281
|
+
i.map(function (e, t) {
|
|
1282
|
+
var n = a + '-options-' + t;
|
|
1283
|
+
return r.createElement(
|
|
1284
|
+
S.Radio,
|
|
1285
|
+
{ value: e.value, key: n },
|
|
1286
|
+
e.label || e.name,
|
|
1287
|
+
);
|
|
1288
|
+
}),
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
1291
|
+
return 'color' === e
|
|
1292
|
+
? r.createElement(S.Input, {
|
|
1293
|
+
style: { display: 'inline-block' },
|
|
1294
|
+
className: 'color-item-form',
|
|
1295
|
+
type: 'color',
|
|
1296
|
+
defaultValue: t.default,
|
|
1297
|
+
onChange: function (e) {
|
|
1491
1298
|
var t = e.target.value;
|
|
1492
1299
|
n.handleValueChange('default', t);
|
|
1493
1300
|
},
|
|
1494
1301
|
})
|
|
1495
|
-
: '
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
onChange: function (e) {
|
|
1501
|
-
n.handleValueChange('default', e);
|
|
1502
|
-
},
|
|
1503
|
-
})
|
|
1504
|
-
: r.createElement(b.Input, {
|
|
1302
|
+
: 'textarea' === e ||
|
|
1303
|
+
'codearea' === e ||
|
|
1304
|
+
'htmlarea' === e ||
|
|
1305
|
+
'json' === e
|
|
1306
|
+
? r.createElement(we, {
|
|
1505
1307
|
style: { display: 'inline-block' },
|
|
1308
|
+
rows: 4,
|
|
1506
1309
|
placeholder: '请输入' + t.title + '的默认值',
|
|
1507
1310
|
defaultValue: t.default,
|
|
1508
1311
|
onPressEnter: function (e) {
|
|
@@ -1513,79 +1316,47 @@
|
|
|
1513
1316
|
var t = e.target.value;
|
|
1514
1317
|
n.handleValueChange('default', t);
|
|
1515
1318
|
},
|
|
1516
|
-
})
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
(
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
(o.conditionValue = e),
|
|
1558
|
-
n.handleValueChange('hiddenRule', o);
|
|
1559
|
-
}),
|
|
1560
|
-
(n.handleValueChange = n.handleValueChange.bind(n)),
|
|
1561
|
-
n
|
|
1562
|
-
);
|
|
1563
|
-
}
|
|
1564
|
-
return (
|
|
1565
|
-
a()(t, e),
|
|
1566
|
-
(t.prototype.render = function () {
|
|
1567
|
-
var e,
|
|
1568
|
-
t,
|
|
1569
|
-
n = this,
|
|
1570
|
-
o = this.props,
|
|
1571
|
-
a = o.nodeKey,
|
|
1572
|
-
i = o.indexRoute,
|
|
1573
|
-
s = o.targetJsonSchema,
|
|
1574
|
-
c = o.checkConditionProp,
|
|
1575
|
-
l = o.jsonSchema,
|
|
1576
|
-
d = o.indexRoute2keyRoute,
|
|
1577
|
-
p = s.type,
|
|
1578
|
-
u = d(i);
|
|
1579
|
-
t = (0, Ie.hasProperties)(s.isConditionProp)
|
|
1580
|
-
? s.isConditionProp
|
|
1581
|
-
: c(u);
|
|
1582
|
-
var m = {};
|
|
1583
|
-
l.conditionProps && (m = l.conditionProps);
|
|
1584
|
-
var h = Object.keys(m),
|
|
1585
|
-
y = {};
|
|
1586
|
-
return (
|
|
1587
|
-
s.hiddenRule && (y = s.hiddenRule),
|
|
1588
|
-
r.createElement(
|
|
1319
|
+
})
|
|
1320
|
+
: 'number' === e
|
|
1321
|
+
? r.createElement(S.InputNumber, {
|
|
1322
|
+
style: { display: 'inline-block' },
|
|
1323
|
+
placeholder: '请输入' + t.title + '的默认值',
|
|
1324
|
+
defaultValue: t.default,
|
|
1325
|
+
onChange: function (e) {
|
|
1326
|
+
n.handleValueChange('default', e);
|
|
1327
|
+
},
|
|
1328
|
+
})
|
|
1329
|
+
: r.createElement(S.Input, {
|
|
1330
|
+
style: { display: 'inline-block' },
|
|
1331
|
+
placeholder: '请输入' + t.title + '的默认值',
|
|
1332
|
+
defaultValue: t.default,
|
|
1333
|
+
onPressEnter: function (e) {
|
|
1334
|
+
var t = e.target.value;
|
|
1335
|
+
n.handleValueChange('default', t);
|
|
1336
|
+
},
|
|
1337
|
+
onBlur: function (e) {
|
|
1338
|
+
var t = e.target.value;
|
|
1339
|
+
n.handleValueChange('default', t);
|
|
1340
|
+
},
|
|
1341
|
+
});
|
|
1342
|
+
}),
|
|
1343
|
+
(n.handleValueChange = n.handleValueChange.bind(n)),
|
|
1344
|
+
n
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
return (
|
|
1348
|
+
o()(t, e),
|
|
1349
|
+
(t.prototype.render = function () {
|
|
1350
|
+
var e,
|
|
1351
|
+
t = this,
|
|
1352
|
+
n = (this.props.schemaStore || {}).indexRoute2keyRoute,
|
|
1353
|
+
a = this.props,
|
|
1354
|
+
o = a.nodeKey,
|
|
1355
|
+
i = a.indexRoute,
|
|
1356
|
+
s = a.targetJsonSchema,
|
|
1357
|
+
c = s.type,
|
|
1358
|
+
l = (n(i), s.isConditionProp);
|
|
1359
|
+
return r.createElement(
|
|
1589
1360
|
'div',
|
|
1590
1361
|
{ className: 'advance-config-model' },
|
|
1591
1362
|
(function (e) {
|
|
@@ -1601,23 +1372,24 @@
|
|
|
1601
1372
|
'date',
|
|
1602
1373
|
'date-time',
|
|
1603
1374
|
'time',
|
|
1375
|
+
'input-image',
|
|
1604
1376
|
].indexOf(e) > -1
|
|
1605
1377
|
);
|
|
1606
|
-
})(
|
|
1378
|
+
})(c) &&
|
|
1607
1379
|
r.createElement(
|
|
1608
1380
|
'div',
|
|
1609
1381
|
{
|
|
1610
1382
|
className: 'wide-screen-element-warp',
|
|
1611
|
-
key:
|
|
1383
|
+
key: o + '-isConditionProp',
|
|
1612
1384
|
},
|
|
1613
1385
|
r.createElement(
|
|
1614
1386
|
'div',
|
|
1615
1387
|
{ className: 'element-title' },
|
|
1616
1388
|
r.createElement(
|
|
1617
|
-
|
|
1389
|
+
S.Tooltip,
|
|
1618
1390
|
{
|
|
1619
1391
|
title:
|
|
1620
|
-
'
|
|
1392
|
+
'设置为条件字段后,其他字段可根据其数值变化进行实时联动',
|
|
1621
1393
|
placement: 'top',
|
|
1622
1394
|
},
|
|
1623
1395
|
r.createElement(
|
|
@@ -1634,32 +1406,32 @@
|
|
|
1634
1406
|
'div',
|
|
1635
1407
|
{
|
|
1636
1408
|
className: 'form-item-box',
|
|
1637
|
-
key:
|
|
1409
|
+
key: o + '-isConditionProp-switch',
|
|
1638
1410
|
},
|
|
1639
|
-
r.createElement(
|
|
1411
|
+
r.createElement(S.Switch, {
|
|
1640
1412
|
style: { display: 'inline-block' },
|
|
1641
|
-
defaultChecked:
|
|
1413
|
+
defaultChecked: l,
|
|
1642
1414
|
checkedChildren: '是',
|
|
1643
1415
|
unCheckedChildren: '否',
|
|
1644
1416
|
onChange: function (e) {
|
|
1645
|
-
|
|
1417
|
+
t.handleValueChange('isConditionProp', e);
|
|
1646
1418
|
},
|
|
1647
1419
|
}),
|
|
1648
1420
|
),
|
|
1649
1421
|
),
|
|
1650
1422
|
),
|
|
1651
|
-
'select' ===
|
|
1423
|
+
'select' === c &&
|
|
1652
1424
|
r.createElement(
|
|
1653
1425
|
'div',
|
|
1654
1426
|
{
|
|
1655
1427
|
className: 'wide-screen-element-warp',
|
|
1656
|
-
key:
|
|
1428
|
+
key: o + '-selectConfig',
|
|
1657
1429
|
},
|
|
1658
1430
|
r.createElement(
|
|
1659
1431
|
'div',
|
|
1660
1432
|
{ className: 'element-title' },
|
|
1661
1433
|
r.createElement(
|
|
1662
|
-
|
|
1434
|
+
S.Tooltip,
|
|
1663
1435
|
{
|
|
1664
1436
|
title:
|
|
1665
1437
|
'开启多选后,select下拉列表支持选择多个选项。',
|
|
@@ -1679,15 +1451,15 @@
|
|
|
1679
1451
|
'div',
|
|
1680
1452
|
{
|
|
1681
1453
|
className: 'form-item-box',
|
|
1682
|
-
key:
|
|
1454
|
+
key: o + '-selectConfig-multiple',
|
|
1683
1455
|
},
|
|
1684
|
-
r.createElement(
|
|
1456
|
+
r.createElement(S.Switch, {
|
|
1685
1457
|
style: { display: 'inline-block' },
|
|
1686
1458
|
defaultChecked: s.multiple,
|
|
1687
1459
|
checkedChildren: '多选',
|
|
1688
1460
|
unCheckedChildren: '单选',
|
|
1689
1461
|
onChange: function (e) {
|
|
1690
|
-
|
|
1462
|
+
t.handleValueChange('multiple', e);
|
|
1691
1463
|
},
|
|
1692
1464
|
}),
|
|
1693
1465
|
),
|
|
@@ -1696,7 +1468,7 @@
|
|
|
1696
1468
|
(function (e) {
|
|
1697
1469
|
return (
|
|
1698
1470
|
[]
|
|
1699
|
-
.concat(
|
|
1471
|
+
.concat(fe, [
|
|
1700
1472
|
'quantity',
|
|
1701
1473
|
'text-editor',
|
|
1702
1474
|
'json',
|
|
@@ -1705,18 +1477,18 @@
|
|
|
1705
1477
|
])
|
|
1706
1478
|
.indexOf(e) > -1
|
|
1707
1479
|
);
|
|
1708
|
-
})(
|
|
1480
|
+
})(c) &&
|
|
1709
1481
|
r.createElement(
|
|
1710
1482
|
'div',
|
|
1711
1483
|
{
|
|
1712
1484
|
className: 'wide-screen-element-warp',
|
|
1713
|
-
key:
|
|
1485
|
+
key: o + '-readOnly-' + s.readOnly,
|
|
1714
1486
|
},
|
|
1715
1487
|
r.createElement(
|
|
1716
1488
|
'div',
|
|
1717
1489
|
{ className: 'element-title' },
|
|
1718
1490
|
r.createElement(
|
|
1719
|
-
|
|
1491
|
+
S.Tooltip,
|
|
1720
1492
|
{
|
|
1721
1493
|
title:
|
|
1722
1494
|
'当前属性设置为只读后,用户不能对其进行任何编辑操作',
|
|
@@ -1735,13 +1507,13 @@
|
|
|
1735
1507
|
r.createElement(
|
|
1736
1508
|
'div',
|
|
1737
1509
|
{ className: 'form-item-box' },
|
|
1738
|
-
r.createElement(
|
|
1510
|
+
r.createElement(S.Switch, {
|
|
1739
1511
|
style: { display: 'inline-block' },
|
|
1740
1512
|
defaultChecked: s.readOnly,
|
|
1741
1513
|
checkedChildren: 'true',
|
|
1742
1514
|
unCheckedChildren: 'false',
|
|
1743
1515
|
onChange: function (e) {
|
|
1744
|
-
|
|
1516
|
+
t.handleValueChange('readOnly', e);
|
|
1745
1517
|
},
|
|
1746
1518
|
}),
|
|
1747
1519
|
),
|
|
@@ -1750,7 +1522,7 @@
|
|
|
1750
1522
|
(function (e) {
|
|
1751
1523
|
return (
|
|
1752
1524
|
[]
|
|
1753
|
-
.concat(
|
|
1525
|
+
.concat(fe, [
|
|
1754
1526
|
'quantity',
|
|
1755
1527
|
'text-editor',
|
|
1756
1528
|
'json',
|
|
@@ -1759,18 +1531,18 @@
|
|
|
1759
1531
|
])
|
|
1760
1532
|
.indexOf(e) > -1
|
|
1761
1533
|
);
|
|
1762
|
-
})(
|
|
1534
|
+
})(c) &&
|
|
1763
1535
|
r.createElement(
|
|
1764
1536
|
'div',
|
|
1765
1537
|
{
|
|
1766
1538
|
className: 'wide-screen-element-warp',
|
|
1767
|
-
key:
|
|
1539
|
+
key: o + '-isRequired-' + s.isRequired,
|
|
1768
1540
|
},
|
|
1769
1541
|
r.createElement(
|
|
1770
1542
|
'div',
|
|
1771
1543
|
{ className: 'element-title' },
|
|
1772
1544
|
r.createElement(
|
|
1773
|
-
|
|
1545
|
+
S.Tooltip,
|
|
1774
1546
|
{
|
|
1775
1547
|
title:
|
|
1776
1548
|
'当前属性设置为必填项后,如果用户没有给其设置数值,则会进行标红提示。',
|
|
@@ -1789,13 +1561,13 @@
|
|
|
1789
1561
|
r.createElement(
|
|
1790
1562
|
'div',
|
|
1791
1563
|
{ className: 'form-item-box' },
|
|
1792
|
-
r.createElement(
|
|
1564
|
+
r.createElement(S.Switch, {
|
|
1793
1565
|
style: { display: 'inline-block' },
|
|
1794
1566
|
defaultChecked: s.isRequired,
|
|
1795
1567
|
checkedChildren: 'true',
|
|
1796
1568
|
unCheckedChildren: 'false',
|
|
1797
1569
|
onChange: function (e) {
|
|
1798
|
-
|
|
1570
|
+
t.handleValueChange('isRequired', e);
|
|
1799
1571
|
},
|
|
1800
1572
|
}),
|
|
1801
1573
|
),
|
|
@@ -1804,21 +1576,21 @@
|
|
|
1804
1576
|
(function (e) {
|
|
1805
1577
|
return (
|
|
1806
1578
|
[]
|
|
1807
|
-
.concat(
|
|
1579
|
+
.concat(fe, ['json', 'codearea', 'htmlarea'])
|
|
1808
1580
|
.indexOf(e) > -1
|
|
1809
1581
|
);
|
|
1810
|
-
})(
|
|
1582
|
+
})(c) &&
|
|
1811
1583
|
r.createElement(
|
|
1812
1584
|
'div',
|
|
1813
1585
|
{
|
|
1814
1586
|
className: 'wide-screen-element-warp',
|
|
1815
|
-
key:
|
|
1587
|
+
key: o + '-default',
|
|
1816
1588
|
},
|
|
1817
1589
|
r.createElement(
|
|
1818
1590
|
'div',
|
|
1819
1591
|
{ className: 'element-title' },
|
|
1820
1592
|
r.createElement(
|
|
1821
|
-
|
|
1593
|
+
S.Tooltip,
|
|
1822
1594
|
{ placement: 'top' },
|
|
1823
1595
|
r.createElement(
|
|
1824
1596
|
'span',
|
|
@@ -1833,7 +1605,7 @@
|
|
|
1833
1605
|
r.createElement(
|
|
1834
1606
|
'div',
|
|
1835
1607
|
{ className: 'form-item-box' },
|
|
1836
|
-
this.renderDefaultContent(
|
|
1608
|
+
this.renderDefaultContent(c, s, o),
|
|
1837
1609
|
),
|
|
1838
1610
|
),
|
|
1839
1611
|
),
|
|
@@ -1841,13 +1613,13 @@
|
|
|
1841
1613
|
'div',
|
|
1842
1614
|
{
|
|
1843
1615
|
className: 'wide-screen-element-warp',
|
|
1844
|
-
key:
|
|
1616
|
+
key: o + '-description',
|
|
1845
1617
|
},
|
|
1846
1618
|
r.createElement(
|
|
1847
1619
|
'div',
|
|
1848
1620
|
{ className: 'element-title' },
|
|
1849
1621
|
r.createElement(
|
|
1850
|
-
|
|
1622
|
+
S.Tooltip,
|
|
1851
1623
|
{
|
|
1852
1624
|
title:
|
|
1853
1625
|
'字段描述内容将作为Title的补充信息提供给用户',
|
|
@@ -1866,17 +1638,17 @@
|
|
|
1866
1638
|
r.createElement(
|
|
1867
1639
|
'div',
|
|
1868
1640
|
{ className: 'form-item-box' },
|
|
1869
|
-
r.createElement(
|
|
1641
|
+
r.createElement(S.Input, {
|
|
1870
1642
|
style: { display: 'inline-block' },
|
|
1871
1643
|
placeholder: '请输入' + s.title + '的字段描述',
|
|
1872
1644
|
defaultValue: s.description,
|
|
1873
1645
|
onPressEnter: function (e) {
|
|
1874
|
-
var
|
|
1875
|
-
|
|
1646
|
+
var n = e.target.value;
|
|
1647
|
+
t.handleValueChange('description', n);
|
|
1876
1648
|
},
|
|
1877
1649
|
onBlur: function (e) {
|
|
1878
|
-
var
|
|
1879
|
-
|
|
1650
|
+
var n = e.target.value;
|
|
1651
|
+
t.handleValueChange('description', n);
|
|
1880
1652
|
},
|
|
1881
1653
|
}),
|
|
1882
1654
|
),
|
|
@@ -1886,13 +1658,13 @@
|
|
|
1886
1658
|
'div',
|
|
1887
1659
|
{
|
|
1888
1660
|
className: 'wide-screen-element-warp',
|
|
1889
|
-
key:
|
|
1661
|
+
key: o + '-showKey',
|
|
1890
1662
|
},
|
|
1891
1663
|
r.createElement(
|
|
1892
1664
|
'div',
|
|
1893
1665
|
{ className: 'element-title' },
|
|
1894
1666
|
r.createElement(
|
|
1895
|
-
|
|
1667
|
+
S.Tooltip,
|
|
1896
1668
|
{
|
|
1897
1669
|
title:
|
|
1898
1670
|
'开启后,在JSONEditor端会展示当前Key值,以便增加辨识度。',
|
|
@@ -1911,13 +1683,13 @@
|
|
|
1911
1683
|
r.createElement(
|
|
1912
1684
|
'div',
|
|
1913
1685
|
{ className: 'form-item-box' },
|
|
1914
|
-
r.createElement(
|
|
1686
|
+
r.createElement(S.Switch, {
|
|
1915
1687
|
style: { display: 'inline-block' },
|
|
1916
1688
|
defaultChecked: s.showKey,
|
|
1917
1689
|
checkedChildren: 'true',
|
|
1918
1690
|
unCheckedChildren: 'false',
|
|
1919
1691
|
onChange: function (e) {
|
|
1920
|
-
|
|
1692
|
+
t.handleValueChange('showKey', e);
|
|
1921
1693
|
},
|
|
1922
1694
|
}),
|
|
1923
1695
|
),
|
|
@@ -1938,18 +1710,18 @@
|
|
|
1938
1710
|
'htmlarea',
|
|
1939
1711
|
].indexOf(e) > -1
|
|
1940
1712
|
);
|
|
1941
|
-
})(
|
|
1713
|
+
})(c) &&
|
|
1942
1714
|
r.createElement(
|
|
1943
1715
|
'div',
|
|
1944
1716
|
{
|
|
1945
1717
|
className: 'wide-screen-element-warp',
|
|
1946
|
-
key:
|
|
1718
|
+
key: o + '-placeholder',
|
|
1947
1719
|
},
|
|
1948
1720
|
r.createElement(
|
|
1949
1721
|
'div',
|
|
1950
1722
|
{ className: 'element-title' },
|
|
1951
1723
|
r.createElement(
|
|
1952
|
-
|
|
1724
|
+
S.Tooltip,
|
|
1953
1725
|
{
|
|
1954
1726
|
title:
|
|
1955
1727
|
'输入提示内容将作为输入区域的提示信息展示给用户',
|
|
@@ -1968,36 +1740,36 @@
|
|
|
1968
1740
|
r.createElement(
|
|
1969
1741
|
'div',
|
|
1970
1742
|
{ className: 'form-item-box' },
|
|
1971
|
-
r.createElement(
|
|
1743
|
+
r.createElement(S.Input, {
|
|
1972
1744
|
style: { display: 'inline-block' },
|
|
1973
1745
|
placeholder: '请输入' + s.title + '的输入提示',
|
|
1974
1746
|
defaultValue: s.placeholder,
|
|
1975
1747
|
onPressEnter: function (e) {
|
|
1976
|
-
var
|
|
1977
|
-
|
|
1748
|
+
var n = e.target.value;
|
|
1749
|
+
t.handleValueChange('placeholder', n);
|
|
1978
1750
|
},
|
|
1979
1751
|
onBlur: function (e) {
|
|
1980
|
-
var
|
|
1981
|
-
|
|
1752
|
+
var n = e.target.value;
|
|
1753
|
+
t.handleValueChange('placeholder', n);
|
|
1982
1754
|
},
|
|
1983
1755
|
}),
|
|
1984
1756
|
),
|
|
1985
1757
|
),
|
|
1986
1758
|
),
|
|
1987
1759
|
(function (e) {
|
|
1988
|
-
return [].concat(
|
|
1989
|
-
})(
|
|
1760
|
+
return [].concat(ve, ['array']).indexOf(e) > -1;
|
|
1761
|
+
})(c) &&
|
|
1990
1762
|
r.createElement(
|
|
1991
1763
|
'div',
|
|
1992
1764
|
{
|
|
1993
1765
|
className: 'wide-screen-element-warp',
|
|
1994
|
-
key:
|
|
1766
|
+
key: o + '-showCodeViewBtn-' + s.showCodeViewBtn,
|
|
1995
1767
|
},
|
|
1996
1768
|
r.createElement(
|
|
1997
1769
|
'div',
|
|
1998
1770
|
{ className: 'element-title' },
|
|
1999
1771
|
r.createElement(
|
|
2000
|
-
|
|
1772
|
+
S.Tooltip,
|
|
2001
1773
|
{
|
|
2002
1774
|
title:
|
|
2003
1775
|
'用于控制是否显示源码模式切换按钮,默认显示',
|
|
@@ -2016,20 +1788,20 @@
|
|
|
2016
1788
|
r.createElement(
|
|
2017
1789
|
'div',
|
|
2018
1790
|
{ className: 'form-item-box' },
|
|
2019
|
-
r.createElement(
|
|
1791
|
+
r.createElement(S.Switch, {
|
|
2020
1792
|
style: { display: 'inline-block' },
|
|
2021
1793
|
defaultChecked:
|
|
2022
1794
|
null == (e = s.showCodeViewBtn) || e,
|
|
2023
1795
|
checkedChildren: 'true',
|
|
2024
1796
|
unCheckedChildren: 'false',
|
|
2025
1797
|
onChange: function (e) {
|
|
2026
|
-
|
|
1798
|
+
t.handleValueChange('showCodeViewBtn', e);
|
|
2027
1799
|
},
|
|
2028
1800
|
}),
|
|
2029
1801
|
),
|
|
2030
1802
|
),
|
|
2031
1803
|
),
|
|
2032
|
-
'number' === (0,
|
|
1804
|
+
'number' === (0, Oe.getExpectType)(c) &&
|
|
2033
1805
|
r.createElement(
|
|
2034
1806
|
r.Fragment,
|
|
2035
1807
|
null,
|
|
@@ -2037,13 +1809,13 @@
|
|
|
2037
1809
|
'div',
|
|
2038
1810
|
{
|
|
2039
1811
|
className: 'wide-screen-element-warp',
|
|
2040
|
-
key:
|
|
1812
|
+
key: o + '-minimum-' + s.minimum,
|
|
2041
1813
|
},
|
|
2042
1814
|
r.createElement(
|
|
2043
1815
|
'div',
|
|
2044
1816
|
{ className: 'element-title' },
|
|
2045
1817
|
r.createElement(
|
|
2046
|
-
|
|
1818
|
+
S.Tooltip,
|
|
2047
1819
|
{
|
|
2048
1820
|
title:
|
|
2049
1821
|
'设置最小值后,用户输入的数值必须大于当前最小值',
|
|
@@ -2062,16 +1834,16 @@
|
|
|
2062
1834
|
r.createElement(
|
|
2063
1835
|
'div',
|
|
2064
1836
|
{ className: 'form-item-box' },
|
|
2065
|
-
r.createElement(
|
|
1837
|
+
r.createElement(S.InputNumber, {
|
|
2066
1838
|
style: { display: 'inline-block' },
|
|
2067
1839
|
defaultValue: s.minimum,
|
|
2068
1840
|
onPressEnter: function (e) {
|
|
2069
|
-
var
|
|
2070
|
-
|
|
1841
|
+
var n = e.target.value;
|
|
1842
|
+
t.handleValueChange('minimum', n);
|
|
2071
1843
|
},
|
|
2072
1844
|
onBlur: function (e) {
|
|
2073
|
-
var
|
|
2074
|
-
|
|
1845
|
+
var n = e.target.value;
|
|
1846
|
+
t.handleValueChange('minimum', n);
|
|
2075
1847
|
},
|
|
2076
1848
|
}),
|
|
2077
1849
|
),
|
|
@@ -2081,13 +1853,13 @@
|
|
|
2081
1853
|
'div',
|
|
2082
1854
|
{
|
|
2083
1855
|
className: 'wide-screen-element-warp',
|
|
2084
|
-
key:
|
|
1856
|
+
key: o + '-maximum-' + s.maximum,
|
|
2085
1857
|
},
|
|
2086
1858
|
r.createElement(
|
|
2087
1859
|
'div',
|
|
2088
1860
|
{ className: 'element-title' },
|
|
2089
1861
|
r.createElement(
|
|
2090
|
-
|
|
1862
|
+
S.Tooltip,
|
|
2091
1863
|
{
|
|
2092
1864
|
title:
|
|
2093
1865
|
'设置最大值后,用户输入的数值必须大于当前最大值',
|
|
@@ -2106,23 +1878,23 @@
|
|
|
2106
1878
|
r.createElement(
|
|
2107
1879
|
'div',
|
|
2108
1880
|
{ className: 'form-item-box' },
|
|
2109
|
-
r.createElement(
|
|
1881
|
+
r.createElement(S.InputNumber, {
|
|
2110
1882
|
style: { display: 'inline-block' },
|
|
2111
1883
|
defaultValue: s.maximum,
|
|
2112
1884
|
onPressEnter: function (e) {
|
|
2113
|
-
var
|
|
2114
|
-
|
|
1885
|
+
var n = e.target.value;
|
|
1886
|
+
t.handleValueChange('maximum', n);
|
|
2115
1887
|
},
|
|
2116
1888
|
onBlur: function (e) {
|
|
2117
|
-
var
|
|
2118
|
-
|
|
1889
|
+
var n = e.target.value;
|
|
1890
|
+
t.handleValueChange('maximum', n);
|
|
2119
1891
|
},
|
|
2120
1892
|
}),
|
|
2121
1893
|
),
|
|
2122
1894
|
),
|
|
2123
1895
|
),
|
|
2124
1896
|
),
|
|
2125
|
-
'array' === (0,
|
|
1897
|
+
'array' === (0, Oe.getExpectType)(c) &&
|
|
2126
1898
|
r.createElement(
|
|
2127
1899
|
r.Fragment,
|
|
2128
1900
|
null,
|
|
@@ -2130,13 +1902,13 @@
|
|
|
2130
1902
|
'div',
|
|
2131
1903
|
{
|
|
2132
1904
|
className: 'wide-screen-element-warp',
|
|
2133
|
-
key:
|
|
1905
|
+
key: o + '-minimum-child',
|
|
2134
1906
|
},
|
|
2135
1907
|
r.createElement(
|
|
2136
1908
|
'div',
|
|
2137
1909
|
{ className: 'element-title' },
|
|
2138
1910
|
r.createElement(
|
|
2139
|
-
|
|
1911
|
+
S.Tooltip,
|
|
2140
1912
|
{
|
|
2141
1913
|
title: '用于限制数据项最小个数',
|
|
2142
1914
|
placement: 'top',
|
|
@@ -2154,11 +1926,11 @@
|
|
|
2154
1926
|
r.createElement(
|
|
2155
1927
|
'div',
|
|
2156
1928
|
{ className: 'form-item-box' },
|
|
2157
|
-
r.createElement(
|
|
1929
|
+
r.createElement(S.InputNumber, {
|
|
2158
1930
|
style: { display: 'inline-block' },
|
|
2159
1931
|
defaultValue: s['minimum-child'],
|
|
2160
1932
|
onChange: function (e) {
|
|
2161
|
-
|
|
1933
|
+
t.handleValueChange('minimum-child', e);
|
|
2162
1934
|
},
|
|
2163
1935
|
}),
|
|
2164
1936
|
),
|
|
@@ -2168,13 +1940,13 @@
|
|
|
2168
1940
|
'div',
|
|
2169
1941
|
{
|
|
2170
1942
|
className: 'wide-screen-element-warp',
|
|
2171
|
-
key:
|
|
1943
|
+
key: o + '-maximum-child',
|
|
2172
1944
|
},
|
|
2173
1945
|
r.createElement(
|
|
2174
1946
|
'div',
|
|
2175
1947
|
{ className: 'element-title' },
|
|
2176
1948
|
r.createElement(
|
|
2177
|
-
|
|
1949
|
+
S.Tooltip,
|
|
2178
1950
|
{
|
|
2179
1951
|
title: '用于限制数据项最多个数',
|
|
2180
1952
|
placement: 'top',
|
|
@@ -2192,269 +1964,155 @@
|
|
|
2192
1964
|
r.createElement(
|
|
2193
1965
|
'div',
|
|
2194
1966
|
{ className: 'form-item-box' },
|
|
2195
|
-
r.createElement(
|
|
1967
|
+
r.createElement(S.InputNumber, {
|
|
2196
1968
|
style: { display: 'inline-block' },
|
|
2197
1969
|
defaultValue: s['maximum-child'],
|
|
2198
1970
|
onChange: function (e) {
|
|
2199
|
-
|
|
1971
|
+
t.handleValueChange('maximum-child', e);
|
|
2200
1972
|
},
|
|
2201
1973
|
}),
|
|
2202
1974
|
),
|
|
2203
1975
|
),
|
|
2204
1976
|
),
|
|
2205
1977
|
),
|
|
2206
|
-
|
|
1978
|
+
r.createElement(
|
|
1979
|
+
'div',
|
|
1980
|
+
{
|
|
1981
|
+
className: 'wide-screen-element-warp',
|
|
1982
|
+
key: o + '-onShow',
|
|
1983
|
+
},
|
|
2207
1984
|
r.createElement(
|
|
2208
1985
|
'div',
|
|
2209
|
-
{ className: '
|
|
1986
|
+
{ className: 'element-title' },
|
|
2210
1987
|
r.createElement(
|
|
2211
|
-
|
|
2212
|
-
{
|
|
1988
|
+
S.Tooltip,
|
|
1989
|
+
{
|
|
1990
|
+
title:
|
|
1991
|
+
'用于设置显隐表达式(onShow),比如设置 "dataType === 1",则表示当数据域中 dataType 为 1 时显示当前配置项。',
|
|
1992
|
+
placement: 'top',
|
|
1993
|
+
},
|
|
2213
1994
|
r.createElement(
|
|
2214
1995
|
'span',
|
|
2215
1996
|
{ className: 'title-text' },
|
|
2216
|
-
'
|
|
2217
|
-
),
|
|
2218
|
-
),
|
|
2219
|
-
r.createElement(
|
|
2220
|
-
'div',
|
|
2221
|
-
{ className: 'content-item' },
|
|
2222
|
-
r.createElement(
|
|
2223
|
-
b.Button,
|
|
2224
|
-
{
|
|
2225
|
-
size: 'small',
|
|
2226
|
-
className: 'add-rule-condition-btn',
|
|
2227
|
-
onClick: this.addHiddenRule,
|
|
2228
|
-
},
|
|
2229
|
-
'添加隐藏规则',
|
|
1997
|
+
'显隐表达式',
|
|
2230
1998
|
),
|
|
2231
1999
|
),
|
|
2232
2000
|
),
|
|
2233
|
-
s.hiddenRule &&
|
|
2234
2001
|
r.createElement(
|
|
2235
2002
|
'div',
|
|
2236
|
-
{
|
|
2237
|
-
className: 'wide-screen-element-warp',
|
|
2238
|
-
key:
|
|
2239
|
-
a + '-clearValueOnHidden-' + s.clearValueOnHidden,
|
|
2240
|
-
},
|
|
2003
|
+
{ className: 'content-item' },
|
|
2241
2004
|
r.createElement(
|
|
2242
2005
|
'div',
|
|
2243
|
-
{ className: '
|
|
2244
|
-
r.createElement(
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2006
|
+
{ className: 'form-item-box' },
|
|
2007
|
+
r.createElement(S.Input, {
|
|
2008
|
+
style: { display: 'inline-block' },
|
|
2009
|
+
placeholder: '请输入显隐表达式',
|
|
2010
|
+
defaultValue: s.onShow,
|
|
2011
|
+
onPressEnter: function (e) {
|
|
2012
|
+
var n = e.target.value;
|
|
2013
|
+
t.handleValueChange('onShow', n);
|
|
2250
2014
|
},
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
),
|
|
2257
|
-
),
|
|
2258
|
-
r.createElement(
|
|
2259
|
-
'div',
|
|
2260
|
-
{ className: 'content-item' },
|
|
2261
|
-
r.createElement(
|
|
2262
|
-
'div',
|
|
2263
|
-
{ className: 'form-item-box' },
|
|
2264
|
-
r.createElement(b.Switch, {
|
|
2265
|
-
style: { display: 'inline-block' },
|
|
2266
|
-
defaultChecked: s.clearValueOnHidden,
|
|
2267
|
-
checkedChildren: 'true',
|
|
2268
|
-
unCheckedChildren: 'false',
|
|
2269
|
-
onChange: function (e) {
|
|
2270
|
-
n.handleValueChange('clearValueOnHidden', e);
|
|
2271
|
-
},
|
|
2272
|
-
}),
|
|
2273
|
-
),
|
|
2274
|
-
),
|
|
2275
|
-
),
|
|
2276
|
-
s.hiddenRule &&
|
|
2277
|
-
r.createElement(
|
|
2278
|
-
'div',
|
|
2279
|
-
{ className: 'hidden-rule-box' },
|
|
2280
|
-
r.createElement(
|
|
2281
|
-
'div',
|
|
2282
|
-
{ className: 'rule-title' },
|
|
2283
|
-
r.createElement(
|
|
2284
|
-
'div',
|
|
2285
|
-
{ className: 'title' },
|
|
2286
|
-
'隐藏规则:',
|
|
2287
|
-
),
|
|
2288
|
-
r.createElement(
|
|
2289
|
-
'div',
|
|
2290
|
-
{ className: 'btn-box' },
|
|
2291
|
-
r.createElement(
|
|
2292
|
-
b.Button,
|
|
2293
|
-
{ size: 'small', onClick: this.deleteHiddenRule },
|
|
2294
|
-
'删除规则',
|
|
2295
|
-
),
|
|
2296
|
-
),
|
|
2297
|
-
),
|
|
2298
|
-
r.createElement(
|
|
2299
|
-
'div',
|
|
2300
|
-
{ className: 'rule-condition-box' },
|
|
2301
|
-
r.createElement(
|
|
2302
|
-
'div',
|
|
2303
|
-
{ className: 'condition-title' },
|
|
2304
|
-
'隐藏条件:',
|
|
2305
|
-
),
|
|
2306
|
-
r.createElement(
|
|
2307
|
-
'div',
|
|
2308
|
-
{ className: 'condition-prop' },
|
|
2309
|
-
r.createElement(
|
|
2310
|
-
b.Select,
|
|
2311
|
-
{
|
|
2312
|
-
showSearch: !0,
|
|
2313
|
-
defaultValue: y.conditionProp
|
|
2314
|
-
? y.conditionProp.keyRoute
|
|
2315
|
-
: null,
|
|
2316
|
-
style: { width: 150 },
|
|
2317
|
-
onChange: function (e) {
|
|
2318
|
-
var t = m[e];
|
|
2319
|
-
n.hiddenRuleConditionChange(t);
|
|
2320
|
-
},
|
|
2321
|
-
},
|
|
2322
|
-
h.map(function (e) {
|
|
2323
|
-
var t = m[e];
|
|
2324
|
-
return r.createElement(
|
|
2325
|
-
Be,
|
|
2326
|
-
{
|
|
2327
|
-
key: t.keyRoute,
|
|
2328
|
-
value: t.keyRoute,
|
|
2329
|
-
disabled: u === t.keyRoute,
|
|
2330
|
-
},
|
|
2331
|
-
t.title,
|
|
2332
|
-
'(',
|
|
2333
|
-
t.key,
|
|
2334
|
-
')',
|
|
2335
|
-
);
|
|
2336
|
-
}),
|
|
2337
|
-
),
|
|
2338
|
-
),
|
|
2339
|
-
r.createElement(
|
|
2340
|
-
'div',
|
|
2341
|
-
{ className: 'condition-equal' },
|
|
2342
|
-
'等于',
|
|
2343
|
-
),
|
|
2344
|
-
r.createElement(
|
|
2345
|
-
'div',
|
|
2346
|
-
{ className: 'condition-value' },
|
|
2347
|
-
r.createElement(De, {
|
|
2348
|
-
conditionRule: y,
|
|
2349
|
-
hiddenRuleConditionValueChange:
|
|
2350
|
-
this.hiddenRuleConditionValueChange,
|
|
2351
|
-
}),
|
|
2352
|
-
),
|
|
2015
|
+
onBlur: function (e) {
|
|
2016
|
+
var n = e.target.value;
|
|
2017
|
+
t.handleValueChange('onShow', n);
|
|
2018
|
+
},
|
|
2019
|
+
}),
|
|
2353
2020
|
),
|
|
2354
2021
|
),
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
jsonKey:
|
|
2363
|
-
indexRoute:
|
|
2364
|
-
nodeKey:
|
|
2365
|
-
targetJsonSchema:
|
|
2366
|
-
checkConditionProp: p().any,
|
|
2367
|
-
addConditionProp: p().any,
|
|
2368
|
-
removeConditionProp: p().any,
|
|
2369
|
-
jsonSchema: p().any,
|
|
2022
|
+
),
|
|
2023
|
+
);
|
|
2024
|
+
}),
|
|
2025
|
+
t
|
|
2026
|
+
);
|
|
2027
|
+
})(r.PureComponent));
|
|
2028
|
+
Re.propTypes = {
|
|
2029
|
+
jsonKey: d().string,
|
|
2030
|
+
indexRoute: d().string,
|
|
2031
|
+
nodeKey: d().string,
|
|
2032
|
+
targetJsonSchema: d().any,
|
|
2370
2033
|
};
|
|
2371
|
-
var
|
|
2372
|
-
return {
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
addConditionProp: e.jsonSchemaStore.addConditionProp,
|
|
2377
|
-
indexRoute2keyRoute: e.jsonSchemaStore.indexRoute2keyRoute,
|
|
2378
|
-
removeConditionProp: e.jsonSchemaStore.removeConditionProp,
|
|
2379
|
-
deleteSchemaProp: e.jsonSchemaStore.deleteSchemaProp,
|
|
2380
|
-
jsonSchema: e.jsonSchemaStore.jsonSchema,
|
|
2381
|
-
};
|
|
2382
|
-
})((0, l.observer)(Ve)),
|
|
2383
|
-
Fe = (n(915), b.Select.Option),
|
|
2384
|
-
qe = (function (e) {
|
|
2034
|
+
var Ke = (0, l.inject)(function (e) {
|
|
2035
|
+
return { schemaStore: e.schemaStore };
|
|
2036
|
+
})((0, l.observer)(Re)),
|
|
2037
|
+
ke = (n(915), S.Select.Option),
|
|
2038
|
+
Te = (function (e) {
|
|
2385
2039
|
function t(t) {
|
|
2386
2040
|
var n;
|
|
2387
2041
|
return (
|
|
2388
2042
|
((n = e.call(this, t) || this).selectHandleChange = function (
|
|
2389
2043
|
e,
|
|
2390
2044
|
) {
|
|
2391
|
-
var t = n.props,
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
r =
|
|
2395
|
-
|
|
2045
|
+
var t = (n.props.schemaStore || {}).changeType,
|
|
2046
|
+
a = n.props,
|
|
2047
|
+
o = a.indexRoute,
|
|
2048
|
+
r = a.jsonKey;
|
|
2049
|
+
a.targetJsonSchema.type !== e && t(o, r, Oe.TypeDataList[e]);
|
|
2396
2050
|
}),
|
|
2397
2051
|
(n.handleJsonKeyChange = function (e) {
|
|
2398
|
-
var t =
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
r =
|
|
2402
|
-
i =
|
|
2403
|
-
s =
|
|
2404
|
-
|
|
2405
|
-
(s
|
|
2406
|
-
?
|
|
2407
|
-
:
|
|
2052
|
+
var t = n.props.schemaStore || {},
|
|
2053
|
+
a = t.editJsonKey,
|
|
2054
|
+
o = t.isExitJsonKey,
|
|
2055
|
+
r = e.target.value,
|
|
2056
|
+
i = n.props,
|
|
2057
|
+
s = i.indexRoute;
|
|
2058
|
+
i.jsonKey !== r &&
|
|
2059
|
+
(o(s, r)
|
|
2060
|
+
? S.message.warning('当前key已存在,请换一个吧。')
|
|
2061
|
+
: a(s, r));
|
|
2408
2062
|
}),
|
|
2409
2063
|
(n.handleTitleChange = function (e) {
|
|
2410
|
-
var t =
|
|
2064
|
+
var t = (n.props.schemaStore || {}).editSchemaData,
|
|
2065
|
+
a = e.target.value,
|
|
2411
2066
|
o = n.props,
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
o.targetJsonSchema.title !== t && i(a, r, { title: t });
|
|
2067
|
+
r = o.indexRoute,
|
|
2068
|
+
i = o.jsonKey;
|
|
2069
|
+
o.targetJsonSchema.title !== a && t(r, i, { title: a });
|
|
2416
2070
|
}),
|
|
2417
2071
|
(n.getCurrentTypeList = function (e) {
|
|
2418
|
-
var t = n.props.SchemaTypeList,
|
|
2419
|
-
|
|
2420
|
-
return (
|
|
2072
|
+
var t = (n.props.schemaStore || {}).SchemaTypeList,
|
|
2073
|
+
a = t[e || 'all'];
|
|
2074
|
+
return (a && 0 !== a.length) || (a = t.all), a;
|
|
2421
2075
|
}),
|
|
2422
2076
|
(n.onAddBtnEvent = function () {
|
|
2423
|
-
var e = n.props,
|
|
2424
|
-
t = e.
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
r =
|
|
2428
|
-
|
|
2077
|
+
var e = n.props.schemaStore || {},
|
|
2078
|
+
t = e.addChildJson,
|
|
2079
|
+
a = e.addNextJsonData,
|
|
2080
|
+
o = n.props,
|
|
2081
|
+
r = o.indexRoute,
|
|
2082
|
+
i = o.targetJsonSchema;
|
|
2083
|
+
(0, Oe.isContainerSchema)(i) ? t(r) : a(r);
|
|
2429
2084
|
}),
|
|
2430
2085
|
(n.onCopyBtnEvent = function () {
|
|
2431
2086
|
var e = n.props,
|
|
2432
2087
|
t = e.indexRoute,
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
r =
|
|
2436
|
-
i =
|
|
2437
|
-
s =
|
|
2438
|
-
c =
|
|
2439
|
-
l =
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
u = o
|
|
2443
|
-
|
|
2088
|
+
a = e.targetJsonSchema,
|
|
2089
|
+
o = e.jsonKey,
|
|
2090
|
+
r = n.props.schemaStore || {},
|
|
2091
|
+
i = r.getSchemaByIndexRoute,
|
|
2092
|
+
s = r.indexRoute2keyRoute,
|
|
2093
|
+
c = r.insertJsonData,
|
|
2094
|
+
l = r.getNewJsonKeyIndex,
|
|
2095
|
+
p = E(a),
|
|
2096
|
+
d = (0, Oe.getParentIndexRoute)(t),
|
|
2097
|
+
u = l(i(d), o),
|
|
2098
|
+
m = a.type;
|
|
2099
|
+
C(s(d) + '-' + u + '-' + m, s(t)), c(t, u, p);
|
|
2444
2100
|
}),
|
|
2445
2101
|
(n.onDeleteBtnEvent = function () {
|
|
2446
2102
|
var e = n.props,
|
|
2447
2103
|
t = e.jsonKey,
|
|
2448
|
-
|
|
2449
|
-
(0,
|
|
2104
|
+
a = e.indexRoute;
|
|
2105
|
+
(0, (n.props.schemaStore || {}).deleteJsonByIndex_CurKey)(
|
|
2106
|
+
a,
|
|
2107
|
+
t,
|
|
2108
|
+
);
|
|
2450
2109
|
}),
|
|
2451
2110
|
(n.ignoreDragEvent = function (e) {
|
|
2452
2111
|
e.preventDefault(), e.stopPropagation();
|
|
2453
2112
|
}),
|
|
2454
2113
|
(n.childElemSort = function () {
|
|
2455
|
-
var e = n.props
|
|
2456
|
-
|
|
2457
|
-
(0, e.childElemSort)(t);
|
|
2114
|
+
var e = n.props.indexRoute;
|
|
2115
|
+
(0, (n.props.schemaStore || {}).childElemSort)(e);
|
|
2458
2116
|
}),
|
|
2459
2117
|
(n.state = { showAdvanceConfig: !1 }),
|
|
2460
2118
|
(n.onAddBtnEvent = n.onAddBtnEvent.bind(n)),
|
|
@@ -2468,24 +2126,24 @@
|
|
|
2468
2126
|
);
|
|
2469
2127
|
}
|
|
2470
2128
|
return (
|
|
2471
|
-
|
|
2129
|
+
o()(t, e),
|
|
2472
2130
|
(t.prototype.render = function () {
|
|
2473
2131
|
var e,
|
|
2474
2132
|
t = this,
|
|
2475
|
-
n = this.props,
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
i =
|
|
2479
|
-
s =
|
|
2480
|
-
c =
|
|
2481
|
-
l =
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
u =
|
|
2133
|
+
n = (this.props.schemaStore || {}).getSchemaByIndexRoute,
|
|
2134
|
+
a = this.props,
|
|
2135
|
+
o = a.parentType,
|
|
2136
|
+
i = a.indexRoute,
|
|
2137
|
+
s = a.jsonKey,
|
|
2138
|
+
c = a.nodeKey,
|
|
2139
|
+
l = a.targetJsonSchema,
|
|
2140
|
+
p = this.state.showAdvanceConfig,
|
|
2141
|
+
d = i ? (0, Oe.getParentIndexRoute)(i) : '',
|
|
2142
|
+
u = d ? n(d) : {},
|
|
2485
2143
|
m = null == (e = u && u.isContainer) || e,
|
|
2486
|
-
h =
|
|
2144
|
+
h = l.isFixed || this.props.isFixed || !1,
|
|
2487
2145
|
y =
|
|
2488
|
-
(this.props.readOnly ||
|
|
2146
|
+
(this.props.readOnly || l.readOnly,
|
|
2489
2147
|
void 0 !== this.props.keyIsFixed
|
|
2490
2148
|
? this.props.keyIsFixed
|
|
2491
2149
|
: !m || h),
|
|
@@ -2497,18 +2155,18 @@
|
|
|
2497
2155
|
void 0 !== this.props.titleIsFixed
|
|
2498
2156
|
? this.props.titleIsFixed
|
|
2499
2157
|
: h,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
E =
|
|
2504
|
-
|
|
2158
|
+
v = this.props.hideOperaBtn || !m,
|
|
2159
|
+
x = !!v && this.props.showAdvanceBtn,
|
|
2160
|
+
b = this.getCurrentTypeList(o),
|
|
2161
|
+
E = l.type,
|
|
2162
|
+
O = (0, Oe.isContainerSchema)(l);
|
|
2505
2163
|
return r.createElement(
|
|
2506
2164
|
r.Fragment,
|
|
2507
2165
|
null,
|
|
2508
|
-
|
|
2166
|
+
l &&
|
|
2509
2167
|
r.createElement(
|
|
2510
2168
|
'div',
|
|
2511
|
-
{ className: 'base-schema-box', id:
|
|
2169
|
+
{ className: 'base-schema-box', id: c },
|
|
2512
2170
|
r.createElement(
|
|
2513
2171
|
'div',
|
|
2514
2172
|
{
|
|
@@ -2516,8 +2174,8 @@
|
|
|
2516
2174
|
draggable: 'true',
|
|
2517
2175
|
onDragStart: this.ignoreDragEvent,
|
|
2518
2176
|
},
|
|
2519
|
-
r.createElement(
|
|
2520
|
-
defaultValue:
|
|
2177
|
+
r.createElement(S.Input, {
|
|
2178
|
+
defaultValue: s || 'key值不存在',
|
|
2521
2179
|
disabled: y,
|
|
2522
2180
|
onPressEnter: this.handleJsonKeyChange,
|
|
2523
2181
|
onBlur: this.handleJsonKeyChange,
|
|
@@ -2531,7 +2189,7 @@
|
|
|
2531
2189
|
onDragStart: this.ignoreDragEvent,
|
|
2532
2190
|
},
|
|
2533
2191
|
r.createElement(
|
|
2534
|
-
|
|
2192
|
+
S.Select,
|
|
2535
2193
|
{
|
|
2536
2194
|
showSearch: !0,
|
|
2537
2195
|
defaultValue: E,
|
|
@@ -2539,8 +2197,8 @@
|
|
|
2539
2197
|
onChange: this.selectHandleChange,
|
|
2540
2198
|
disabled: g,
|
|
2541
2199
|
},
|
|
2542
|
-
|
|
2543
|
-
return r.createElement(
|
|
2200
|
+
b.map(function (e) {
|
|
2201
|
+
return r.createElement(ke, { key: e, value: e }, e);
|
|
2544
2202
|
}),
|
|
2545
2203
|
),
|
|
2546
2204
|
),
|
|
@@ -2551,39 +2209,39 @@
|
|
|
2551
2209
|
draggable: 'true',
|
|
2552
2210
|
onDragStart: this.ignoreDragEvent,
|
|
2553
2211
|
},
|
|
2554
|
-
r.createElement(
|
|
2555
|
-
defaultValue:
|
|
2212
|
+
r.createElement(S.Input, {
|
|
2213
|
+
defaultValue: l.title,
|
|
2556
2214
|
disabled: f,
|
|
2557
2215
|
onPressEnter: this.handleTitleChange,
|
|
2558
2216
|
onBlur: this.handleTitleChange,
|
|
2559
2217
|
}),
|
|
2560
2218
|
),
|
|
2561
|
-
!
|
|
2219
|
+
!v &&
|
|
2562
2220
|
r.createElement(
|
|
2563
2221
|
'div',
|
|
2564
2222
|
{ className: 'operate-item' },
|
|
2565
2223
|
!h &&
|
|
2566
2224
|
r.createElement(
|
|
2567
|
-
|
|
2225
|
+
S.Tooltip,
|
|
2568
2226
|
{ title: '删除' },
|
|
2569
|
-
r.createElement(
|
|
2227
|
+
r.createElement(Ie.CloseOutlined, {
|
|
2570
2228
|
className: 'operate-btn delete-operate',
|
|
2571
2229
|
onClick: this.onDeleteBtnEvent,
|
|
2572
2230
|
}),
|
|
2573
2231
|
),
|
|
2574
2232
|
r.createElement(
|
|
2575
|
-
|
|
2576
|
-
{ title:
|
|
2577
|
-
r.createElement(
|
|
2233
|
+
S.Tooltip,
|
|
2234
|
+
{ title: O ? '新增子元素' : '新增同级元素' },
|
|
2235
|
+
r.createElement(Ie.PlusOutlined, {
|
|
2578
2236
|
className: 'operate-btn',
|
|
2579
2237
|
onClick: this.onAddBtnEvent,
|
|
2580
2238
|
}),
|
|
2581
2239
|
),
|
|
2582
|
-
|
|
2240
|
+
O &&
|
|
2583
2241
|
r.createElement(
|
|
2584
|
-
|
|
2242
|
+
S.Tooltip,
|
|
2585
2243
|
{ title: '数据项排序' },
|
|
2586
|
-
r.createElement(
|
|
2244
|
+
r.createElement(Ie.SortAscendingOutlined, {
|
|
2587
2245
|
className: 'operate-btn',
|
|
2588
2246
|
onClick: this.childElemSort,
|
|
2589
2247
|
}),
|
|
@@ -2593,17 +2251,17 @@
|
|
|
2593
2251
|
r.Fragment,
|
|
2594
2252
|
null,
|
|
2595
2253
|
r.createElement(
|
|
2596
|
-
|
|
2254
|
+
S.Tooltip,
|
|
2597
2255
|
{ title: '复制' },
|
|
2598
|
-
r.createElement(
|
|
2256
|
+
r.createElement(Ie.CopyOutlined, {
|
|
2599
2257
|
className: 'operate-btn',
|
|
2600
2258
|
onClick: this.onCopyBtnEvent,
|
|
2601
2259
|
}),
|
|
2602
2260
|
),
|
|
2603
2261
|
r.createElement(
|
|
2604
|
-
|
|
2262
|
+
S.Tooltip,
|
|
2605
2263
|
{ title: '高级设置' },
|
|
2606
|
-
r.createElement(
|
|
2264
|
+
r.createElement(Ie.SettingOutlined, {
|
|
2607
2265
|
className: 'operate-btn',
|
|
2608
2266
|
onClick: function () {
|
|
2609
2267
|
t.setState({ showAdvanceConfig: !0 });
|
|
@@ -2611,22 +2269,22 @@
|
|
|
2611
2269
|
}),
|
|
2612
2270
|
),
|
|
2613
2271
|
r.createElement(
|
|
2614
|
-
|
|
2272
|
+
S.Tooltip,
|
|
2615
2273
|
{ title: '按住进行拖拽' },
|
|
2616
|
-
r.createElement(
|
|
2274
|
+
r.createElement(Ie.DragOutlined, {
|
|
2617
2275
|
className: 'operate-btn drag-btn',
|
|
2618
2276
|
}),
|
|
2619
2277
|
),
|
|
2620
2278
|
),
|
|
2621
2279
|
),
|
|
2622
|
-
|
|
2280
|
+
x &&
|
|
2623
2281
|
r.createElement(
|
|
2624
2282
|
'div',
|
|
2625
2283
|
{ className: 'operate-item' },
|
|
2626
2284
|
r.createElement(
|
|
2627
|
-
|
|
2285
|
+
S.Tooltip,
|
|
2628
2286
|
{ title: '高级设置' },
|
|
2629
|
-
r.createElement(
|
|
2287
|
+
r.createElement(Ie.SettingOutlined, {
|
|
2630
2288
|
className: 'operate-btn',
|
|
2631
2289
|
onClick: function () {
|
|
2632
2290
|
t.setState({ showAdvanceConfig: !0 });
|
|
@@ -2634,19 +2292,19 @@
|
|
|
2634
2292
|
}),
|
|
2635
2293
|
),
|
|
2636
2294
|
),
|
|
2637
|
-
|
|
2295
|
+
p &&
|
|
2638
2296
|
r.createElement(
|
|
2639
|
-
|
|
2297
|
+
S.Modal,
|
|
2640
2298
|
{
|
|
2641
2299
|
visible: !0,
|
|
2642
2300
|
title:
|
|
2643
|
-
'高级设置 / 当前字段:' +
|
|
2301
|
+
'高级设置 / 当前字段:' + l.title + '(' + s + ')',
|
|
2644
2302
|
onCancel: function () {
|
|
2645
2303
|
t.setState({ showAdvanceConfig: !1 });
|
|
2646
2304
|
},
|
|
2647
2305
|
footer: [
|
|
2648
2306
|
r.createElement(
|
|
2649
|
-
|
|
2307
|
+
S.Button,
|
|
2650
2308
|
{
|
|
2651
2309
|
key: 'submit',
|
|
2652
2310
|
type: 'primary',
|
|
@@ -2658,21 +2316,21 @@
|
|
|
2658
2316
|
),
|
|
2659
2317
|
],
|
|
2660
2318
|
},
|
|
2661
|
-
r.createElement(
|
|
2662
|
-
indexRoute:
|
|
2663
|
-
jsonKey:
|
|
2664
|
-
targetJsonSchema:
|
|
2319
|
+
r.createElement(Ke, {
|
|
2320
|
+
indexRoute: i,
|
|
2321
|
+
jsonKey: s,
|
|
2322
|
+
targetJsonSchema: l,
|
|
2665
2323
|
}),
|
|
2666
2324
|
),
|
|
2667
2325
|
),
|
|
2668
|
-
!
|
|
2326
|
+
!l &&
|
|
2669
2327
|
r.createElement(
|
|
2670
2328
|
'div',
|
|
2671
2329
|
{ className: 'base-schema-box' },
|
|
2672
2330
|
r.createElement(
|
|
2673
2331
|
'div',
|
|
2674
2332
|
{ className: 'warn-text' },
|
|
2675
|
-
|
|
2333
|
+
s,
|
|
2676
2334
|
':数据元素为空',
|
|
2677
2335
|
),
|
|
2678
2336
|
),
|
|
@@ -2681,82 +2339,67 @@
|
|
|
2681
2339
|
t
|
|
2682
2340
|
);
|
|
2683
2341
|
})(r.PureComponent);
|
|
2684
|
-
|
|
2685
|
-
parentType:
|
|
2686
|
-
jsonKey:
|
|
2687
|
-
indexRoute:
|
|
2688
|
-
nodeKey:
|
|
2689
|
-
targetJsonSchema:
|
|
2690
|
-
isFixed:
|
|
2691
|
-
hideOperaBtn:
|
|
2692
|
-
showAdvanceBtn:
|
|
2693
|
-
keyIsFixed:
|
|
2694
|
-
typeIsFixed:
|
|
2695
|
-
titleIsFixed:
|
|
2342
|
+
Te.propTypes = {
|
|
2343
|
+
parentType: d().string,
|
|
2344
|
+
jsonKey: d().string,
|
|
2345
|
+
indexRoute: d().string,
|
|
2346
|
+
nodeKey: d().string,
|
|
2347
|
+
targetJsonSchema: d().any,
|
|
2348
|
+
isFixed: d().bool,
|
|
2349
|
+
hideOperaBtn: d().bool,
|
|
2350
|
+
showAdvanceBtn: d().bool,
|
|
2351
|
+
keyIsFixed: d().bool,
|
|
2352
|
+
typeIsFixed: d().bool,
|
|
2353
|
+
titleIsFixed: d().bool,
|
|
2696
2354
|
};
|
|
2697
|
-
var
|
|
2698
|
-
return {
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
getSchemaByIndexRoute: e.jsonSchemaStore.getSchemaByIndexRoute,
|
|
2704
|
-
indexRoute2keyRoute: e.jsonSchemaStore.indexRoute2keyRoute,
|
|
2705
|
-
addChildJson: e.jsonSchemaStore.addChildJson,
|
|
2706
|
-
addNextJsonData: e.jsonSchemaStore.addNextJsonData,
|
|
2707
|
-
insertJsonData: e.jsonSchemaStore.insertJsonData,
|
|
2708
|
-
childElemSort: e.jsonSchemaStore.childElemSort,
|
|
2709
|
-
editSchemaData: e.jsonSchemaStore.editSchemaData,
|
|
2710
|
-
editJsonKey: e.jsonSchemaStore.editJsonKey,
|
|
2711
|
-
changeType: e.jsonSchemaStore.changeType,
|
|
2712
|
-
isExitJsonKey: e.jsonSchemaStore.isExitJsonKey,
|
|
2713
|
-
};
|
|
2714
|
-
})((0, l.observer)(qe)),
|
|
2715
|
-
_e = b.Tree.TreeNode,
|
|
2716
|
-
Me = function (e) {
|
|
2717
|
-
return i().createElement(Ae, e);
|
|
2355
|
+
var Je = (0, l.inject)(function (e) {
|
|
2356
|
+
return { schemaStore: e.schemaStore };
|
|
2357
|
+
})((0, l.observer)(Te)),
|
|
2358
|
+
De = S.Tree.TreeNode,
|
|
2359
|
+
Be = function (e) {
|
|
2360
|
+
return i().createElement(Je, e);
|
|
2718
2361
|
},
|
|
2719
|
-
|
|
2362
|
+
Pe = function (e) {
|
|
2720
2363
|
var t = e.jsonKey,
|
|
2721
2364
|
n = e.indexRoute,
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
r =
|
|
2365
|
+
a = e.nodeKey,
|
|
2366
|
+
o = e.targetJsonSchema,
|
|
2367
|
+
r = o.type,
|
|
2725
2368
|
s = n ? n + '-0' : '0',
|
|
2726
2369
|
c = 'items',
|
|
2727
|
-
l =
|
|
2728
|
-
|
|
2370
|
+
l = a ? a + '-' + c : c,
|
|
2371
|
+
p = o[c] || {};
|
|
2729
2372
|
return i().createElement(
|
|
2730
|
-
|
|
2373
|
+
De,
|
|
2731
2374
|
{
|
|
2732
2375
|
className: r + '-schema schema-item-form',
|
|
2733
|
-
id:
|
|
2734
|
-
key:
|
|
2376
|
+
id: a,
|
|
2377
|
+
key: a,
|
|
2735
2378
|
indexRoute: n,
|
|
2736
2379
|
jsonKey: t,
|
|
2737
|
-
title:
|
|
2380
|
+
title: Be(m()({}, e)),
|
|
2738
2381
|
},
|
|
2739
2382
|
(function (e) {
|
|
2740
2383
|
var t = e.parentType,
|
|
2741
2384
|
n = e.jsonKey,
|
|
2742
|
-
|
|
2743
|
-
|
|
2385
|
+
a = e.indexRoute,
|
|
2386
|
+
o = e.nodeKey,
|
|
2744
2387
|
r = e.targetJsonSchema;
|
|
2745
2388
|
return i().createElement(
|
|
2746
|
-
|
|
2389
|
+
De,
|
|
2747
2390
|
{
|
|
2748
2391
|
className: 'array-item-schema schema-item-form',
|
|
2749
|
-
id:
|
|
2750
|
-
key:
|
|
2751
|
-
indexRoute:
|
|
2392
|
+
id: o,
|
|
2393
|
+
key: o,
|
|
2394
|
+
indexRoute: a,
|
|
2752
2395
|
jsonKey: n,
|
|
2753
2396
|
disabled: !0,
|
|
2754
|
-
title:
|
|
2755
|
-
indexRoute:
|
|
2397
|
+
title: Be({
|
|
2398
|
+
indexRoute: a,
|
|
2756
2399
|
jsonKey: n,
|
|
2757
2400
|
targetJsonSchema: r,
|
|
2758
2401
|
parentType: t,
|
|
2759
|
-
nodeKey:
|
|
2402
|
+
nodeKey: o,
|
|
2760
2403
|
isFixed: !0,
|
|
2761
2404
|
typeIsFixed: !1,
|
|
2762
2405
|
}),
|
|
@@ -2765,28 +2408,28 @@
|
|
|
2765
2408
|
(function (e) {
|
|
2766
2409
|
var t = e.properties,
|
|
2767
2410
|
n = e.parentIndexRoute,
|
|
2768
|
-
|
|
2769
|
-
|
|
2411
|
+
a = e.parentNodeKey,
|
|
2412
|
+
o = e.parentType;
|
|
2770
2413
|
return e.propertyOrder.map(function (e, r) {
|
|
2771
2414
|
var i = n ? n + '-' + r : '' + r,
|
|
2772
2415
|
s = e,
|
|
2773
2416
|
c = t[s],
|
|
2774
2417
|
l = c.type,
|
|
2775
|
-
|
|
2776
|
-
return
|
|
2777
|
-
parentType:
|
|
2418
|
+
p = (a ? a + '-' : '') + l + '-' + s;
|
|
2419
|
+
return nt({
|
|
2420
|
+
parentType: o,
|
|
2778
2421
|
jsonKey: s,
|
|
2779
2422
|
indexRoute: i,
|
|
2780
|
-
key:
|
|
2781
|
-
nodeKey:
|
|
2423
|
+
key: p,
|
|
2424
|
+
nodeKey: p,
|
|
2782
2425
|
targetJsonSchema: c,
|
|
2783
2426
|
});
|
|
2784
2427
|
});
|
|
2785
2428
|
})({
|
|
2786
2429
|
propertyOrder: r.propertyOrder,
|
|
2787
2430
|
properties: r.properties,
|
|
2788
|
-
parentIndexRoute:
|
|
2789
|
-
parentNodeKey:
|
|
2431
|
+
parentIndexRoute: a,
|
|
2432
|
+
parentNodeKey: o,
|
|
2790
2433
|
parentType: t,
|
|
2791
2434
|
}),
|
|
2792
2435
|
);
|
|
@@ -2795,35 +2438,36 @@
|
|
|
2795
2438
|
jsonKey: c,
|
|
2796
2439
|
indexRoute: s,
|
|
2797
2440
|
nodeKey: l,
|
|
2798
|
-
targetJsonSchema:
|
|
2441
|
+
targetJsonSchema: p,
|
|
2799
2442
|
}),
|
|
2800
2443
|
);
|
|
2801
2444
|
},
|
|
2802
|
-
|
|
2803
|
-
|
|
2445
|
+
Ve = (n(790), S.Select.Option),
|
|
2446
|
+
Le = (function (e) {
|
|
2804
2447
|
function t(t) {
|
|
2805
2448
|
var n;
|
|
2806
2449
|
return (
|
|
2807
2450
|
((n = e.call(this, t) || this).typeChange = function (e) {
|
|
2808
|
-
var t = n.props,
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
r =
|
|
2812
|
-
i =
|
|
2813
|
-
s =
|
|
2814
|
-
c =
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
l
|
|
2819
|
-
|
|
2820
|
-
|
|
2451
|
+
var t = n.props.schemaStore || {},
|
|
2452
|
+
a = t.editSchemaData,
|
|
2453
|
+
o = t.updateSchemaData,
|
|
2454
|
+
r = n.props,
|
|
2455
|
+
i = r.indexRoute,
|
|
2456
|
+
s = r.jsonKey,
|
|
2457
|
+
c = r.targetJsonSchema,
|
|
2458
|
+
l = r.typeSelectData;
|
|
2459
|
+
if (c.default !== e) {
|
|
2460
|
+
if ((a(i, s, { default: e }), l)) {
|
|
2461
|
+
var p = l[e];
|
|
2462
|
+
p &&
|
|
2463
|
+
'数据源类型' === c.title &&
|
|
2464
|
+
a((0, Oe.getNextIndexRoute)(i), 'data', p);
|
|
2821
2465
|
}
|
|
2822
|
-
if (
|
|
2823
|
-
var d =
|
|
2824
|
-
'事件类型' ===
|
|
2466
|
+
if (Oe.EventTypeDataList) {
|
|
2467
|
+
var d = Oe.EventTypeDataList[e];
|
|
2468
|
+
'事件类型' === c.title &&
|
|
2825
2469
|
d &&
|
|
2826
|
-
|
|
2470
|
+
o((0, Oe.getParentIndexRoute)(i), d);
|
|
2827
2471
|
}
|
|
2828
2472
|
}
|
|
2829
2473
|
}),
|
|
@@ -2832,13 +2476,13 @@
|
|
|
2832
2476
|
);
|
|
2833
2477
|
}
|
|
2834
2478
|
return (
|
|
2835
|
-
|
|
2479
|
+
o()(t, e),
|
|
2836
2480
|
(t.prototype.render = function () {
|
|
2837
2481
|
var e = this.props,
|
|
2838
2482
|
t = e.nodeKey,
|
|
2839
2483
|
n = e.targetJsonSchema,
|
|
2840
|
-
|
|
2841
|
-
|
|
2484
|
+
a = n.type,
|
|
2485
|
+
o = n.options || [];
|
|
2842
2486
|
return r.createElement(
|
|
2843
2487
|
'div',
|
|
2844
2488
|
{ className: 'typeSelect-schema-box', id: t },
|
|
@@ -2846,14 +2490,14 @@
|
|
|
2846
2490
|
'div',
|
|
2847
2491
|
{ className: 'key-input-item' },
|
|
2848
2492
|
r.createElement(
|
|
2849
|
-
|
|
2493
|
+
S.Select,
|
|
2850
2494
|
{
|
|
2851
2495
|
defaultValue: n.default || 'local',
|
|
2852
2496
|
onChange: this.typeChange,
|
|
2853
2497
|
},
|
|
2854
|
-
|
|
2498
|
+
o.map(function (e, t) {
|
|
2855
2499
|
return r.createElement(
|
|
2856
|
-
|
|
2500
|
+
Ve,
|
|
2857
2501
|
{ key: t, value: e.value },
|
|
2858
2502
|
e.label || e.name,
|
|
2859
2503
|
);
|
|
@@ -2864,15 +2508,15 @@
|
|
|
2864
2508
|
'div',
|
|
2865
2509
|
{ className: 'type-select-item' },
|
|
2866
2510
|
r.createElement(
|
|
2867
|
-
|
|
2868
|
-
{ defaultValue:
|
|
2869
|
-
r.createElement(
|
|
2511
|
+
S.Select,
|
|
2512
|
+
{ defaultValue: a, style: { width: 120 }, disabled: !0 },
|
|
2513
|
+
r.createElement(Ve, { key: a, value: a }, a),
|
|
2870
2514
|
),
|
|
2871
2515
|
),
|
|
2872
2516
|
r.createElement(
|
|
2873
2517
|
'div',
|
|
2874
2518
|
{ className: 'title-input-item' },
|
|
2875
|
-
r.createElement(
|
|
2519
|
+
r.createElement(S.Input, {
|
|
2876
2520
|
defaultValue: n.title,
|
|
2877
2521
|
disabled: !0,
|
|
2878
2522
|
}),
|
|
@@ -2883,26 +2527,23 @@
|
|
|
2883
2527
|
t
|
|
2884
2528
|
);
|
|
2885
2529
|
})(r.PureComponent);
|
|
2886
|
-
|
|
2887
|
-
parentType:
|
|
2888
|
-
jsonKey:
|
|
2889
|
-
indexRoute:
|
|
2890
|
-
nodeKey:
|
|
2891
|
-
targetJsonSchema:
|
|
2892
|
-
typeSelectData:
|
|
2893
|
-
isFixed:
|
|
2530
|
+
Le.propTypes = {
|
|
2531
|
+
parentType: d().string,
|
|
2532
|
+
jsonKey: d().string,
|
|
2533
|
+
indexRoute: d().string,
|
|
2534
|
+
nodeKey: d().string,
|
|
2535
|
+
targetJsonSchema: d().any,
|
|
2536
|
+
typeSelectData: d().any,
|
|
2537
|
+
isFixed: d().any,
|
|
2894
2538
|
};
|
|
2895
|
-
var
|
|
2896
|
-
return {
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
Ue = b.Tree.TreeNode,
|
|
2902
|
-
Qe = function (e) {
|
|
2903
|
-
return i().createElement(Ae, e);
|
|
2539
|
+
var Fe = (0, l.inject)(function (e) {
|
|
2540
|
+
return { schemaStore: e.schemaStore };
|
|
2541
|
+
})((0, l.observer)(Le)),
|
|
2542
|
+
qe = S.Tree.TreeNode,
|
|
2543
|
+
Ae = function (e) {
|
|
2544
|
+
return i().createElement(Je, e);
|
|
2904
2545
|
},
|
|
2905
|
-
|
|
2546
|
+
_e = {
|
|
2906
2547
|
local: {
|
|
2907
2548
|
type: 'json',
|
|
2908
2549
|
title: '本地json数据',
|
|
@@ -2920,71 +2561,69 @@
|
|
|
2920
2561
|
description: '用于设置获取元素数据的请求地址',
|
|
2921
2562
|
},
|
|
2922
2563
|
},
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
return i().createElement(
|
|
2564
|
+
Me = S.Tree.TreeNode,
|
|
2565
|
+
We = function (e) {
|
|
2566
|
+
return i().createElement(Je, e);
|
|
2926
2567
|
},
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
return i().createElement(
|
|
2568
|
+
Ge = S.Tree.TreeNode,
|
|
2569
|
+
ze = function (e) {
|
|
2570
|
+
return i().createElement(Je, e);
|
|
2930
2571
|
},
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
return i().createElement(
|
|
2572
|
+
Ue = S.Tree.TreeNode,
|
|
2573
|
+
He = function (e) {
|
|
2574
|
+
return i().createElement(Je, e);
|
|
2934
2575
|
},
|
|
2935
|
-
|
|
2936
|
-
|
|
2576
|
+
Qe = (n(617), S.Select.Option),
|
|
2577
|
+
Xe = (function (e) {
|
|
2937
2578
|
function t(t) {
|
|
2938
2579
|
var n;
|
|
2939
2580
|
return (
|
|
2940
2581
|
((n = e.call(this, t) || this).handleLabelChange = function (
|
|
2941
2582
|
e,
|
|
2942
2583
|
) {
|
|
2943
|
-
var t =
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
r =
|
|
2947
|
-
i =
|
|
2948
|
-
s =
|
|
2949
|
-
c =
|
|
2950
|
-
|
|
2951
|
-
(s
|
|
2952
|
-
?
|
|
2584
|
+
var t = n.props.schemaStore || {},
|
|
2585
|
+
a = t.isExitOptionLabel,
|
|
2586
|
+
o = t.updateOptionLabel,
|
|
2587
|
+
r = e.target.value,
|
|
2588
|
+
i = n.props,
|
|
2589
|
+
s = i.indexRoute,
|
|
2590
|
+
c = i.optionIndex;
|
|
2591
|
+
r !== i.optionLabel &&
|
|
2592
|
+
(a(s, r)
|
|
2593
|
+
? S.message.warning(
|
|
2953
2594
|
'对不起,存在相同的Label值,请重新设置。',
|
|
2954
2595
|
)
|
|
2955
|
-
:
|
|
2596
|
+
: o(s, c, r));
|
|
2956
2597
|
}),
|
|
2957
2598
|
(n.handleValueChange = function (e) {
|
|
2958
|
-
var t =
|
|
2599
|
+
var t = (n.props.schemaStore || {}).updateOptionValue,
|
|
2600
|
+
a = e.target.value,
|
|
2959
2601
|
o = n.props,
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
s = o.updateOptionValue;
|
|
2964
|
-
t !== i && s(a, r, t);
|
|
2602
|
+
r = o.indexRoute,
|
|
2603
|
+
i = o.optionIndex;
|
|
2604
|
+
a !== o.optionValue && t(r, i, a);
|
|
2965
2605
|
}),
|
|
2966
2606
|
(n.onAddBtnEvent = function () {
|
|
2967
|
-
var e = n.props,
|
|
2968
|
-
t =
|
|
2969
|
-
|
|
2970
|
-
(0, e.addOptionItem)(t, o);
|
|
2607
|
+
var e = (n.props.schemaStore || {}).addOptionItem,
|
|
2608
|
+
t = n.props;
|
|
2609
|
+
e(t.indexRoute, t.optionIndex);
|
|
2971
2610
|
}),
|
|
2972
2611
|
(n.onCopyBtnEvent = function () {
|
|
2973
|
-
var e = n.props,
|
|
2974
|
-
t =
|
|
2975
|
-
|
|
2976
|
-
(0, e.copyOptionItem)(t, o);
|
|
2612
|
+
var e = (n.props.schemaStore || {}).copyOptionItem,
|
|
2613
|
+
t = n.props;
|
|
2614
|
+
e(t.indexRoute, t.optionIndex);
|
|
2977
2615
|
}),
|
|
2978
2616
|
(n.onDeleteBtnEvent = function () {
|
|
2979
|
-
var e = n.props,
|
|
2980
|
-
t = e.
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
r =
|
|
2984
|
-
i =
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2617
|
+
var e = n.props.schemaStore || {},
|
|
2618
|
+
t = e.getSchemaByIndexRoute,
|
|
2619
|
+
a = e.deleteOptionItem,
|
|
2620
|
+
o = n.props,
|
|
2621
|
+
r = o.indexRoute,
|
|
2622
|
+
i = o.optionIndex,
|
|
2623
|
+
s = t(r);
|
|
2624
|
+
s.options && s.options.length > 1
|
|
2625
|
+
? a(r, i)
|
|
2626
|
+
: S.message.warning('删除失败,至少保留一个可选项。');
|
|
2988
2627
|
}),
|
|
2989
2628
|
(n.onAddBtnEvent = n.onAddBtnEvent.bind(n)),
|
|
2990
2629
|
(n.onCopyBtnEvent = n.onCopyBtnEvent.bind(n)),
|
|
@@ -2995,7 +2634,7 @@
|
|
|
2995
2634
|
);
|
|
2996
2635
|
}
|
|
2997
2636
|
return (
|
|
2998
|
-
|
|
2637
|
+
o()(t, e),
|
|
2999
2638
|
(t.prototype.render = function () {
|
|
3000
2639
|
var e = this.props,
|
|
3001
2640
|
t = e.optionLabel,
|
|
@@ -3008,7 +2647,7 @@
|
|
|
3008
2647
|
r.createElement(
|
|
3009
2648
|
'div',
|
|
3010
2649
|
{ className: 'key-input-item' },
|
|
3011
|
-
r.createElement(
|
|
2650
|
+
r.createElement(S.Input, {
|
|
3012
2651
|
defaultValue: n,
|
|
3013
2652
|
onPressEnter: this.handleValueChange,
|
|
3014
2653
|
onBlur: this.handleValueChange,
|
|
@@ -3018,10 +2657,10 @@
|
|
|
3018
2657
|
'div',
|
|
3019
2658
|
{ className: 'type-select-item' },
|
|
3020
2659
|
r.createElement(
|
|
3021
|
-
|
|
2660
|
+
S.Select,
|
|
3022
2661
|
{ defaultValue: 'string', style: { width: 120 } },
|
|
3023
2662
|
r.createElement(
|
|
3024
|
-
|
|
2663
|
+
Qe,
|
|
3025
2664
|
{ key: 'string', value: 'string' },
|
|
3026
2665
|
'string',
|
|
3027
2666
|
),
|
|
@@ -3030,7 +2669,7 @@
|
|
|
3030
2669
|
r.createElement(
|
|
3031
2670
|
'div',
|
|
3032
2671
|
{ className: 'title-input-item' },
|
|
3033
|
-
r.createElement(
|
|
2672
|
+
r.createElement(S.Input, {
|
|
3034
2673
|
defaultValue: t,
|
|
3035
2674
|
onPressEnter: this.handleLabelChange,
|
|
3036
2675
|
onBlur: this.handleLabelChange,
|
|
@@ -3040,25 +2679,25 @@
|
|
|
3040
2679
|
'div',
|
|
3041
2680
|
{ className: 'operate-item' },
|
|
3042
2681
|
r.createElement(
|
|
3043
|
-
|
|
2682
|
+
S.Tooltip,
|
|
3044
2683
|
{ title: '删除' },
|
|
3045
|
-
r.createElement(
|
|
2684
|
+
r.createElement(Ie.CloseOutlined, {
|
|
3046
2685
|
className: 'operate-btn delete-operate',
|
|
3047
2686
|
onClick: this.onDeleteBtnEvent,
|
|
3048
2687
|
}),
|
|
3049
2688
|
),
|
|
3050
2689
|
r.createElement(
|
|
3051
|
-
|
|
2690
|
+
S.Tooltip,
|
|
3052
2691
|
{ title: '新增可选项' },
|
|
3053
|
-
r.createElement(
|
|
2692
|
+
r.createElement(Ie.PlusOutlined, {
|
|
3054
2693
|
className: 'operate-btn',
|
|
3055
2694
|
onClick: this.onAddBtnEvent,
|
|
3056
2695
|
}),
|
|
3057
2696
|
),
|
|
3058
2697
|
r.createElement(
|
|
3059
|
-
|
|
2698
|
+
S.Tooltip,
|
|
3060
2699
|
{ title: '复制' },
|
|
3061
|
-
r.createElement(
|
|
2700
|
+
r.createElement(Ie.CopyOutlined, {
|
|
3062
2701
|
className: 'operate-btn',
|
|
3063
2702
|
onClick: this.onCopyBtnEvent,
|
|
3064
2703
|
}),
|
|
@@ -3070,33 +2709,25 @@
|
|
|
3070
2709
|
t
|
|
3071
2710
|
);
|
|
3072
2711
|
})(r.PureComponent);
|
|
3073
|
-
|
|
3074
|
-
indexRoute:
|
|
3075
|
-
optionIndex:
|
|
3076
|
-
optionLabel:
|
|
3077
|
-
optionValue:
|
|
3078
|
-
optionNodeKey:
|
|
2712
|
+
Xe.propTypes = {
|
|
2713
|
+
indexRoute: d().string,
|
|
2714
|
+
optionIndex: d().any,
|
|
2715
|
+
optionLabel: d().string,
|
|
2716
|
+
optionValue: d().string,
|
|
2717
|
+
optionNodeKey: d().string,
|
|
3079
2718
|
};
|
|
3080
|
-
var
|
|
3081
|
-
return {
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
deleteOptionItem: e.jsonSchemaStore.deleteOptionItem,
|
|
3087
|
-
addOptionItem: e.jsonSchemaStore.addOptionItem,
|
|
3088
|
-
copyOptionItem: e.jsonSchemaStore.copyOptionItem,
|
|
3089
|
-
};
|
|
3090
|
-
})((0, l.observer)(at)),
|
|
3091
|
-
it = b.Tree.TreeNode,
|
|
3092
|
-
st = function (e) {
|
|
3093
|
-
return i().createElement(rt, e);
|
|
2719
|
+
var Ye = (0, l.inject)(function (e) {
|
|
2720
|
+
return { schemaStore: e.schemaStore };
|
|
2721
|
+
})((0, l.observer)(Xe)),
|
|
2722
|
+
Ze = S.Tree.TreeNode,
|
|
2723
|
+
$e = function (e) {
|
|
2724
|
+
return i().createElement(Ye, e);
|
|
3094
2725
|
},
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
return i().createElement(
|
|
2726
|
+
et = S.Tree.TreeNode,
|
|
2727
|
+
tt = function (e) {
|
|
2728
|
+
return i().createElement(Je, e);
|
|
3098
2729
|
},
|
|
3099
|
-
|
|
2730
|
+
nt = function (e) {
|
|
3100
2731
|
switch (e.targetJsonSchema.type) {
|
|
3101
2732
|
case 'object':
|
|
3102
2733
|
case 'func':
|
|
@@ -3105,78 +2736,78 @@
|
|
|
3105
2736
|
case 'dynamic-config':
|
|
3106
2737
|
case 'sohu-source':
|
|
3107
2738
|
case 'sohu-event':
|
|
3108
|
-
return
|
|
2739
|
+
return rt(e);
|
|
3109
2740
|
case 'array':
|
|
3110
|
-
return
|
|
2741
|
+
return Pe(e);
|
|
3111
2742
|
case 'datasource':
|
|
3112
2743
|
return (function (e) {
|
|
3113
2744
|
var t,
|
|
3114
2745
|
n = e.jsonKey,
|
|
3115
|
-
|
|
3116
|
-
|
|
2746
|
+
a = e.indexRoute,
|
|
2747
|
+
o = e.nodeKey,
|
|
3117
2748
|
r = e.targetJsonSchema,
|
|
3118
2749
|
s = r.type,
|
|
3119
2750
|
c = r.properties.data || {};
|
|
3120
2751
|
return i().createElement(
|
|
3121
|
-
|
|
2752
|
+
qe,
|
|
3122
2753
|
{
|
|
3123
2754
|
className: s + '-schema schema-item-form',
|
|
3124
|
-
id:
|
|
3125
|
-
key:
|
|
3126
|
-
indexRoute:
|
|
2755
|
+
id: o,
|
|
2756
|
+
key: o,
|
|
2757
|
+
indexRoute: a,
|
|
3127
2758
|
jsonKey: n,
|
|
3128
|
-
title:
|
|
2759
|
+
title: Ae(m()({}, e)),
|
|
3129
2760
|
},
|
|
3130
|
-
i().createElement(
|
|
2761
|
+
i().createElement(qe, {
|
|
3131
2762
|
className: 'dataSource-type-item-schema schema-item-form',
|
|
3132
|
-
id:
|
|
3133
|
-
key:
|
|
3134
|
-
indexRoute:
|
|
2763
|
+
id: o + '-type',
|
|
2764
|
+
key: o + '-type',
|
|
2765
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3135
2766
|
jsonKey: 'type',
|
|
3136
2767
|
disabled: !0,
|
|
3137
2768
|
title:
|
|
3138
2769
|
((t = {
|
|
3139
|
-
indexRoute:
|
|
2770
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3140
2771
|
jsonKey: 'type',
|
|
3141
2772
|
targetJsonSchema: r.properties.type,
|
|
3142
2773
|
parentType: s,
|
|
3143
|
-
nodeKey:
|
|
3144
|
-
typeSelectData:
|
|
2774
|
+
nodeKey: o + '-type',
|
|
2775
|
+
typeSelectData: _e,
|
|
3145
2776
|
}),
|
|
3146
|
-
i().createElement(
|
|
2777
|
+
i().createElement(Fe, t)),
|
|
3147
2778
|
}),
|
|
3148
|
-
i().createElement(
|
|
2779
|
+
i().createElement(qe, {
|
|
3149
2780
|
className: 'dataSource-data-item-schema schema-item-form',
|
|
3150
|
-
id:
|
|
3151
|
-
key:
|
|
3152
|
-
indexRoute:
|
|
2781
|
+
id: o + '-data-' + c.type,
|
|
2782
|
+
key: o + '-data-' + c.type,
|
|
2783
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3153
2784
|
jsonKey: 'data',
|
|
3154
2785
|
disabled: !0,
|
|
3155
|
-
title:
|
|
3156
|
-
indexRoute:
|
|
2786
|
+
title: Ae({
|
|
2787
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3157
2788
|
jsonKey: 'data',
|
|
3158
2789
|
targetJsonSchema: c,
|
|
3159
2790
|
parentType: s,
|
|
3160
|
-
nodeKey:
|
|
2791
|
+
nodeKey: o + '-data-' + c.type,
|
|
3161
2792
|
hideOperaBtn: !0,
|
|
3162
2793
|
keyIsFixed: !0,
|
|
3163
2794
|
typeIsFixed: !0,
|
|
3164
2795
|
}),
|
|
3165
2796
|
}),
|
|
3166
|
-
i().createElement(
|
|
2797
|
+
i().createElement(qe, {
|
|
3167
2798
|
className:
|
|
3168
2799
|
'dataSource-filter-item-schema schema-item-form',
|
|
3169
|
-
id:
|
|
3170
|
-
key:
|
|
3171
|
-
indexRoute:
|
|
2800
|
+
id: o + '-filter',
|
|
2801
|
+
key: o + '-filter',
|
|
2802
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3172
2803
|
jsonKey: 'filter',
|
|
3173
2804
|
disabled: !0,
|
|
3174
|
-
title:
|
|
3175
|
-
indexRoute:
|
|
2805
|
+
title: Ae({
|
|
2806
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3176
2807
|
jsonKey: 'filter',
|
|
3177
2808
|
targetJsonSchema: r.properties.filter,
|
|
3178
2809
|
parentType: s,
|
|
3179
|
-
nodeKey:
|
|
2810
|
+
nodeKey: o + '-filter',
|
|
3180
2811
|
hideOperaBtn: !0,
|
|
3181
2812
|
keyIsFixed: !0,
|
|
3182
2813
|
typeIsFixed: !0,
|
|
@@ -3188,71 +2819,71 @@
|
|
|
3188
2819
|
return (function (e) {
|
|
3189
2820
|
var t,
|
|
3190
2821
|
n = e.jsonKey,
|
|
3191
|
-
|
|
3192
|
-
|
|
2822
|
+
a = e.indexRoute,
|
|
2823
|
+
o = e.nodeKey,
|
|
3193
2824
|
r = e.targetJsonSchema,
|
|
3194
2825
|
s = r.type,
|
|
3195
2826
|
c = r.properties.config || {},
|
|
3196
2827
|
l = r.properties.data || {};
|
|
3197
2828
|
return i().createElement(
|
|
3198
|
-
|
|
2829
|
+
Me,
|
|
3199
2830
|
{
|
|
3200
2831
|
className: s + '-schema schema-item-form',
|
|
3201
|
-
id:
|
|
3202
|
-
key:
|
|
3203
|
-
indexRoute:
|
|
2832
|
+
id: o,
|
|
2833
|
+
key: o,
|
|
2834
|
+
indexRoute: a,
|
|
3204
2835
|
jsonKey: n,
|
|
3205
|
-
title:
|
|
2836
|
+
title: We(m()({}, e)),
|
|
3206
2837
|
},
|
|
3207
|
-
i().createElement(
|
|
2838
|
+
i().createElement(Me, {
|
|
3208
2839
|
className: 'dataSource-type-item-schema schema-item-form',
|
|
3209
|
-
id:
|
|
3210
|
-
key:
|
|
3211
|
-
indexRoute:
|
|
2840
|
+
id: o + '-type',
|
|
2841
|
+
key: o + '-type',
|
|
2842
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3212
2843
|
jsonKey: 'type',
|
|
3213
2844
|
disabled: !0,
|
|
3214
2845
|
title:
|
|
3215
2846
|
((t = {
|
|
3216
|
-
indexRoute:
|
|
2847
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3217
2848
|
jsonKey: 'type',
|
|
3218
2849
|
targetJsonSchema: r.properties.type,
|
|
3219
2850
|
parentType: s,
|
|
3220
|
-
nodeKey:
|
|
2851
|
+
nodeKey: o + '-type',
|
|
3221
2852
|
}),
|
|
3222
|
-
i().createElement(
|
|
2853
|
+
i().createElement(Fe, t)),
|
|
3223
2854
|
}),
|
|
3224
|
-
i().createElement(
|
|
2855
|
+
i().createElement(Me, {
|
|
3225
2856
|
className:
|
|
3226
2857
|
'dataSource-config-item-schema schema-item-form',
|
|
3227
|
-
id:
|
|
3228
|
-
key:
|
|
3229
|
-
indexRoute:
|
|
2858
|
+
id: o + '-config-' + l.type,
|
|
2859
|
+
key: o + '-config-' + l.type,
|
|
2860
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3230
2861
|
jsonKey: 'config',
|
|
3231
2862
|
disabled: !0,
|
|
3232
|
-
title:
|
|
3233
|
-
indexRoute:
|
|
2863
|
+
title: We({
|
|
2864
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3234
2865
|
jsonKey: 'config',
|
|
3235
2866
|
targetJsonSchema: c,
|
|
3236
2867
|
parentType: s,
|
|
3237
|
-
nodeKey:
|
|
2868
|
+
nodeKey: o + '-config-' + c.type,
|
|
3238
2869
|
hideOperaBtn: !0,
|
|
3239
2870
|
keyIsFixed: !0,
|
|
3240
2871
|
typeIsFixed: !0,
|
|
3241
2872
|
}),
|
|
3242
2873
|
}),
|
|
3243
|
-
i().createElement(
|
|
2874
|
+
i().createElement(Me, {
|
|
3244
2875
|
className: 'dataSource-data-item-schema schema-item-form',
|
|
3245
|
-
id:
|
|
3246
|
-
key:
|
|
3247
|
-
indexRoute:
|
|
2876
|
+
id: o + '-data-' + l.type,
|
|
2877
|
+
key: o + '-data-' + l.type,
|
|
2878
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3248
2879
|
jsonKey: 'data',
|
|
3249
2880
|
disabled: !0,
|
|
3250
|
-
title:
|
|
3251
|
-
indexRoute:
|
|
2881
|
+
title: We({
|
|
2882
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3252
2883
|
jsonKey: 'data',
|
|
3253
2884
|
targetJsonSchema: l,
|
|
3254
2885
|
parentType: s,
|
|
3255
|
-
nodeKey:
|
|
2886
|
+
nodeKey: o + '-data-' + l.type,
|
|
3256
2887
|
hideOperaBtn: !0,
|
|
3257
2888
|
keyIsFixed: !0,
|
|
3258
2889
|
typeIsFixed: !0,
|
|
@@ -3264,99 +2895,99 @@
|
|
|
3264
2895
|
return (function (e) {
|
|
3265
2896
|
var t,
|
|
3266
2897
|
n = e.jsonKey,
|
|
3267
|
-
|
|
3268
|
-
|
|
2898
|
+
a = e.indexRoute,
|
|
2899
|
+
o = e.nodeKey,
|
|
3269
2900
|
r = e.targetJsonSchema,
|
|
3270
2901
|
s = r.type,
|
|
3271
2902
|
c = r.properties.type || {},
|
|
3272
2903
|
l = r.properties.register || {},
|
|
3273
|
-
|
|
3274
|
-
|
|
2904
|
+
p = r.properties.actionFunc || {},
|
|
2905
|
+
d = r.properties.trigger || {},
|
|
3275
2906
|
u = r.properties.eventData || {};
|
|
3276
2907
|
return i().createElement(
|
|
3277
|
-
|
|
2908
|
+
Ge,
|
|
3278
2909
|
{
|
|
3279
2910
|
className: s + '-schema schema-item-form',
|
|
3280
|
-
id:
|
|
3281
|
-
key:
|
|
3282
|
-
indexRoute:
|
|
2911
|
+
id: o,
|
|
2912
|
+
key: o,
|
|
2913
|
+
indexRoute: a,
|
|
3283
2914
|
jsonKey: n,
|
|
3284
|
-
title:
|
|
2915
|
+
title: ze(m()({}, e)),
|
|
3285
2916
|
},
|
|
3286
|
-
i().createElement(
|
|
2917
|
+
i().createElement(Ge, {
|
|
3287
2918
|
className: 'event-type-item-schema schema-item-form',
|
|
3288
|
-
id:
|
|
3289
|
-
key:
|
|
3290
|
-
indexRoute:
|
|
2919
|
+
id: o + '-type',
|
|
2920
|
+
key: o + '-type',
|
|
2921
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3291
2922
|
jsonKey: 'type',
|
|
3292
2923
|
disabled: !0,
|
|
3293
2924
|
title:
|
|
3294
2925
|
((t = {
|
|
3295
|
-
indexRoute:
|
|
2926
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3296
2927
|
jsonKey: 'type',
|
|
3297
2928
|
targetJsonSchema: c,
|
|
3298
2929
|
parentType: s,
|
|
3299
|
-
nodeKey:
|
|
2930
|
+
nodeKey: o + '-type',
|
|
3300
2931
|
}),
|
|
3301
|
-
i().createElement(
|
|
2932
|
+
i().createElement(Fe, t)),
|
|
3302
2933
|
}),
|
|
3303
2934
|
'on' === c.default &&
|
|
3304
2935
|
l &&
|
|
3305
|
-
i().createElement(
|
|
2936
|
+
i().createElement(Ge, {
|
|
3306
2937
|
className:
|
|
3307
2938
|
'event-register-item-schema schema-item-form',
|
|
3308
|
-
id:
|
|
3309
|
-
key:
|
|
3310
|
-
indexRoute:
|
|
2939
|
+
id: o + '-register-' + c.default,
|
|
2940
|
+
key: o + '-register-' + c.default,
|
|
2941
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3311
2942
|
jsonKey: 'register',
|
|
3312
2943
|
disabled: !0,
|
|
3313
|
-
title:
|
|
3314
|
-
indexRoute:
|
|
2944
|
+
title: ze({
|
|
2945
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3315
2946
|
jsonKey: 'register',
|
|
3316
2947
|
targetJsonSchema: l,
|
|
3317
2948
|
parentType: s,
|
|
3318
|
-
nodeKey:
|
|
2949
|
+
nodeKey: o + '-register-' + c.default,
|
|
3319
2950
|
hideOperaBtn: !0,
|
|
3320
2951
|
keyIsFixed: !0,
|
|
3321
2952
|
typeIsFixed: !0,
|
|
3322
2953
|
}),
|
|
3323
2954
|
}),
|
|
3324
2955
|
'on' === c.default &&
|
|
3325
|
-
|
|
3326
|
-
i().createElement(
|
|
2956
|
+
p &&
|
|
2957
|
+
i().createElement(Ge, {
|
|
3327
2958
|
className:
|
|
3328
2959
|
'event-actionFunc-item-schema schema-item-form',
|
|
3329
|
-
id:
|
|
3330
|
-
key:
|
|
3331
|
-
indexRoute:
|
|
2960
|
+
id: o + '-actionFunc-' + c.default,
|
|
2961
|
+
key: o + '-actionFunc-' + c.default,
|
|
2962
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3332
2963
|
jsonKey: 'actionFunc',
|
|
3333
2964
|
disabled: !0,
|
|
3334
|
-
title:
|
|
3335
|
-
indexRoute:
|
|
2965
|
+
title: ze({
|
|
2966
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3336
2967
|
jsonKey: 'actionFunc',
|
|
3337
|
-
targetJsonSchema:
|
|
2968
|
+
targetJsonSchema: p,
|
|
3338
2969
|
parentType: s,
|
|
3339
|
-
nodeKey:
|
|
2970
|
+
nodeKey: o + '-actionFunc-' + c.default,
|
|
3340
2971
|
hideOperaBtn: !0,
|
|
3341
2972
|
keyIsFixed: !0,
|
|
3342
2973
|
typeIsFixed: !0,
|
|
3343
2974
|
}),
|
|
3344
2975
|
}),
|
|
3345
2976
|
'emit' === c.default &&
|
|
3346
|
-
|
|
3347
|
-
i().createElement(
|
|
2977
|
+
d &&
|
|
2978
|
+
i().createElement(Ge, {
|
|
3348
2979
|
className: 'event-trigger-item-schema schema-item-form',
|
|
3349
|
-
id:
|
|
3350
|
-
key:
|
|
3351
|
-
indexRoute:
|
|
2980
|
+
id: o + '-trigger-' + c.default,
|
|
2981
|
+
key: o + '-trigger-' + c.default,
|
|
2982
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3352
2983
|
jsonKey: 'trigger',
|
|
3353
2984
|
disabled: !0,
|
|
3354
|
-
title:
|
|
3355
|
-
indexRoute:
|
|
2985
|
+
title: ze({
|
|
2986
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3356
2987
|
jsonKey: 'trigger',
|
|
3357
|
-
targetJsonSchema:
|
|
2988
|
+
targetJsonSchema: d,
|
|
3358
2989
|
parentType: s,
|
|
3359
|
-
nodeKey:
|
|
2990
|
+
nodeKey: o + '-trigger-' + c.default,
|
|
3360
2991
|
hideOperaBtn: !0,
|
|
3361
2992
|
keyIsFixed: !0,
|
|
3362
2993
|
typeIsFixed: !0,
|
|
@@ -3364,20 +2995,20 @@
|
|
|
3364
2995
|
}),
|
|
3365
2996
|
'emit' === c.default &&
|
|
3366
2997
|
u &&
|
|
3367
|
-
i().createElement(
|
|
2998
|
+
i().createElement(Ge, {
|
|
3368
2999
|
className:
|
|
3369
3000
|
'event-eventData-item-schema schema-item-form',
|
|
3370
|
-
id:
|
|
3371
|
-
key:
|
|
3372
|
-
indexRoute:
|
|
3001
|
+
id: o + '-eventData-' + c.default,
|
|
3002
|
+
key: o + '-eventData-' + c.default,
|
|
3003
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3373
3004
|
jsonKey: 'eventData',
|
|
3374
3005
|
disabled: !0,
|
|
3375
|
-
title:
|
|
3376
|
-
indexRoute:
|
|
3006
|
+
title: ze({
|
|
3007
|
+
indexRoute: a ? a + '-2' : '2',
|
|
3377
3008
|
jsonKey: 'eventData',
|
|
3378
3009
|
targetJsonSchema: u,
|
|
3379
3010
|
parentType: s,
|
|
3380
|
-
nodeKey:
|
|
3011
|
+
nodeKey: o + '-eventData-' + c.default,
|
|
3381
3012
|
hideOperaBtn: !0,
|
|
3382
3013
|
keyIsFixed: !0,
|
|
3383
3014
|
typeIsFixed: !0,
|
|
@@ -3390,57 +3021,57 @@
|
|
|
3390
3021
|
return (function (e) {
|
|
3391
3022
|
var t,
|
|
3392
3023
|
n = e.jsonKey,
|
|
3393
|
-
|
|
3394
|
-
|
|
3024
|
+
a = e.indexRoute,
|
|
3025
|
+
o = e.nodeKey,
|
|
3395
3026
|
r = e.targetJsonSchema,
|
|
3396
3027
|
s = r.type,
|
|
3397
3028
|
c = r.propertyOrder[0],
|
|
3398
3029
|
l = r.properties[c];
|
|
3399
3030
|
return i().createElement(
|
|
3400
|
-
|
|
3031
|
+
Ue,
|
|
3401
3032
|
{
|
|
3402
3033
|
className: s + '-schema schema-item-form',
|
|
3403
|
-
id:
|
|
3404
|
-
key:
|
|
3405
|
-
indexRoute:
|
|
3034
|
+
id: o,
|
|
3035
|
+
key: o,
|
|
3036
|
+
indexRoute: a,
|
|
3406
3037
|
jsonKey: n,
|
|
3407
|
-
title:
|
|
3038
|
+
title: He(m()({}, e)),
|
|
3408
3039
|
},
|
|
3409
|
-
i().createElement(
|
|
3040
|
+
i().createElement(Ue, {
|
|
3410
3041
|
className: 'quantity-unit-item-schema schema-item-form',
|
|
3411
|
-
id:
|
|
3412
|
-
key:
|
|
3413
|
-
indexRoute:
|
|
3042
|
+
id: o + '-' + c,
|
|
3043
|
+
key: o + '-' + c,
|
|
3044
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3414
3045
|
jsonKey: c,
|
|
3415
3046
|
disabled: !0,
|
|
3416
|
-
title:
|
|
3417
|
-
indexRoute:
|
|
3047
|
+
title: He({
|
|
3048
|
+
indexRoute: a ? a + '-0' : '0',
|
|
3418
3049
|
jsonKey: c,
|
|
3419
3050
|
targetJsonSchema: l,
|
|
3420
3051
|
parentType: s,
|
|
3421
|
-
nodeKey:
|
|
3052
|
+
nodeKey: o + '-' + c,
|
|
3422
3053
|
hideOperaBtn: !0,
|
|
3423
3054
|
showAdvanceBtn: !0,
|
|
3424
3055
|
typeIsFixed: !0,
|
|
3425
3056
|
}),
|
|
3426
3057
|
}),
|
|
3427
|
-
i().createElement(
|
|
3058
|
+
i().createElement(Ue, {
|
|
3428
3059
|
className:
|
|
3429
3060
|
'quantity-typeSelect-item-schema schema-item-form',
|
|
3430
|
-
id:
|
|
3431
|
-
key:
|
|
3432
|
-
indexRoute:
|
|
3061
|
+
id: o + '-quantity',
|
|
3062
|
+
key: o + '-quantity',
|
|
3063
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3433
3064
|
jsonKey: 'quantity',
|
|
3434
3065
|
disabled: !0,
|
|
3435
3066
|
title:
|
|
3436
3067
|
((t = {
|
|
3437
|
-
indexRoute:
|
|
3068
|
+
indexRoute: a ? a + '-1' : '1',
|
|
3438
3069
|
jsonKey: 'quantity',
|
|
3439
3070
|
targetJsonSchema: r.properties.quantity,
|
|
3440
3071
|
parentType: s,
|
|
3441
|
-
nodeKey:
|
|
3072
|
+
nodeKey: o + '-quantity',
|
|
3442
3073
|
}),
|
|
3443
|
-
i().createElement(
|
|
3074
|
+
i().createElement(Fe, t)),
|
|
3444
3075
|
}),
|
|
3445
3076
|
);
|
|
3446
3077
|
})(e);
|
|
@@ -3450,39 +3081,39 @@
|
|
|
3450
3081
|
return (function (e) {
|
|
3451
3082
|
var t,
|
|
3452
3083
|
n = e.jsonKey,
|
|
3453
|
-
|
|
3454
|
-
|
|
3084
|
+
a = e.indexRoute,
|
|
3085
|
+
o = e.nodeKey,
|
|
3455
3086
|
r = e.targetJsonSchema,
|
|
3456
3087
|
s = r.type,
|
|
3457
3088
|
c = r.options,
|
|
3458
|
-
l =
|
|
3089
|
+
l = a || '0';
|
|
3459
3090
|
return i().createElement(
|
|
3460
|
-
|
|
3091
|
+
Ze,
|
|
3461
3092
|
{
|
|
3462
3093
|
className: s + '-schema schema-item-form',
|
|
3463
|
-
id:
|
|
3464
|
-
key:
|
|
3465
|
-
indexRoute:
|
|
3094
|
+
id: o,
|
|
3095
|
+
key: o,
|
|
3096
|
+
indexRoute: a,
|
|
3466
3097
|
jsonKey: n,
|
|
3467
|
-
title: ((t = m()({}, e)), i().createElement(
|
|
3098
|
+
title: ((t = m()({}, e)), i().createElement(Je, t)),
|
|
3468
3099
|
},
|
|
3469
3100
|
c &&
|
|
3470
3101
|
c.length > 0 &&
|
|
3471
3102
|
c.map(function (e, t) {
|
|
3472
3103
|
var n = e.label || e.name,
|
|
3473
|
-
|
|
3474
|
-
r = '' +
|
|
3475
|
-
return i().createElement(
|
|
3104
|
+
a = e.value,
|
|
3105
|
+
r = '' + o + s + '-' + n;
|
|
3106
|
+
return i().createElement(Ze, {
|
|
3476
3107
|
className: 'enum-item-schema schema-item-form',
|
|
3477
3108
|
id: r,
|
|
3478
3109
|
key: r,
|
|
3479
3110
|
indexRoute: l,
|
|
3480
3111
|
disabled: !0,
|
|
3481
|
-
title:
|
|
3112
|
+
title: $e({
|
|
3482
3113
|
indexRoute: l,
|
|
3483
3114
|
optionIndex: t,
|
|
3484
3115
|
optionLabel: n,
|
|
3485
|
-
optionValue:
|
|
3116
|
+
optionValue: a,
|
|
3486
3117
|
optionNodeKey: r,
|
|
3487
3118
|
}),
|
|
3488
3119
|
});
|
|
@@ -3493,66 +3124,66 @@
|
|
|
3493
3124
|
return (function (e) {
|
|
3494
3125
|
var t = e.jsonKey,
|
|
3495
3126
|
n = e.indexRoute,
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
return i().createElement(
|
|
3499
|
-
className:
|
|
3500
|
-
id:
|
|
3501
|
-
key:
|
|
3127
|
+
a = e.nodeKey,
|
|
3128
|
+
o = e.targetJsonSchema.type;
|
|
3129
|
+
return i().createElement(et, {
|
|
3130
|
+
className: o + '-schema schema-item-form',
|
|
3131
|
+
id: a,
|
|
3132
|
+
key: a,
|
|
3502
3133
|
indexRoute: n,
|
|
3503
3134
|
jsonKey: t,
|
|
3504
|
-
title:
|
|
3135
|
+
title: tt(e),
|
|
3505
3136
|
});
|
|
3506
3137
|
})(e);
|
|
3507
3138
|
}
|
|
3508
3139
|
},
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
return i().createElement(
|
|
3140
|
+
at = S.Tree.TreeNode,
|
|
3141
|
+
ot = function (e) {
|
|
3142
|
+
return i().createElement(Je, e);
|
|
3512
3143
|
},
|
|
3513
|
-
|
|
3144
|
+
rt = function (e) {
|
|
3514
3145
|
var t,
|
|
3515
3146
|
n,
|
|
3516
|
-
o,
|
|
3517
3147
|
a,
|
|
3148
|
+
o,
|
|
3518
3149
|
r,
|
|
3519
3150
|
s = e.jsonKey,
|
|
3520
3151
|
c = e.indexRoute,
|
|
3521
3152
|
l = e.nodeKey,
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
u =
|
|
3525
|
-
h =
|
|
3153
|
+
p = e.targetJsonSchema,
|
|
3154
|
+
d = e.isOnlyShowChild,
|
|
3155
|
+
u = p.type,
|
|
3156
|
+
h = p.isFixed,
|
|
3526
3157
|
y =
|
|
3527
3158
|
((t = {
|
|
3528
|
-
propertyOrder:
|
|
3529
|
-
properties:
|
|
3159
|
+
propertyOrder: p.propertyOrder,
|
|
3160
|
+
properties: p.properties,
|
|
3530
3161
|
parentIndexRoute: c,
|
|
3531
3162
|
parentNodeKey: l,
|
|
3532
3163
|
parentType: u,
|
|
3533
|
-
isOnlyShowChild:
|
|
3164
|
+
isOnlyShowChild: d,
|
|
3534
3165
|
}),
|
|
3535
3166
|
(n = t.properties),
|
|
3536
|
-
(
|
|
3537
|
-
(
|
|
3167
|
+
(a = t.parentIndexRoute),
|
|
3168
|
+
(o = t.parentNodeKey),
|
|
3538
3169
|
(r = t.parentType),
|
|
3539
3170
|
t.propertyOrder.map(function (e, t) {
|
|
3540
|
-
var i =
|
|
3171
|
+
var i = a ? a + '-' + t : '' + t,
|
|
3541
3172
|
s = e,
|
|
3542
3173
|
c = n[s],
|
|
3543
3174
|
l = c.type,
|
|
3544
|
-
|
|
3545
|
-
return
|
|
3175
|
+
p = (o ? o + '-' : '') + l + '-' + s;
|
|
3176
|
+
return nt({
|
|
3546
3177
|
parentType: r,
|
|
3547
3178
|
jsonKey: s,
|
|
3548
3179
|
indexRoute: i,
|
|
3549
|
-
key:
|
|
3550
|
-
nodeKey:
|
|
3180
|
+
key: p,
|
|
3181
|
+
nodeKey: p,
|
|
3551
3182
|
targetJsonSchema: c,
|
|
3552
3183
|
});
|
|
3553
3184
|
})),
|
|
3554
3185
|
g = i().createElement(
|
|
3555
|
-
|
|
3186
|
+
at,
|
|
3556
3187
|
{
|
|
3557
3188
|
className: u + '-schema schema-item-form',
|
|
3558
3189
|
id: l,
|
|
@@ -3560,128 +3191,70 @@
|
|
|
3560
3191
|
indexRoute: c,
|
|
3561
3192
|
jsonKey: s,
|
|
3562
3193
|
disabled: h,
|
|
3563
|
-
title:
|
|
3194
|
+
title: ot(m()({}, e)),
|
|
3564
3195
|
},
|
|
3565
3196
|
y,
|
|
3566
3197
|
);
|
|
3567
|
-
return
|
|
3198
|
+
return d ? y : g;
|
|
3568
3199
|
},
|
|
3569
|
-
|
|
3570
|
-
(n(797),
|
|
3571
|
-
(0, l.inject)(function (e) {
|
|
3572
|
-
return {
|
|
3573
|
-
jsonSchema: e.jsonSchemaStore.jsonSchema,
|
|
3574
|
-
removeConditionProp: e.jsonSchemaStore.removeConditionProp,
|
|
3575
|
-
cancelConditionProp: e.jsonSchemaStore.cancelConditionProp,
|
|
3576
|
-
};
|
|
3577
|
-
})(
|
|
3578
|
-
(0, l.observer)(function (e) {
|
|
3579
|
-
var t = e.jsonSchema,
|
|
3580
|
-
n = e.removeConditionProp,
|
|
3581
|
-
o = e.cancelConditionProp,
|
|
3582
|
-
a = {};
|
|
3583
|
-
t.conditionProps && (a = t.conditionProps);
|
|
3584
|
-
var r = Object.keys(a);
|
|
3585
|
-
return 0 === r.length
|
|
3586
|
-
? ''
|
|
3587
|
-
: i().createElement(
|
|
3588
|
-
'div',
|
|
3589
|
-
{ className: 'condition-props-box' },
|
|
3590
|
-
i().createElement(
|
|
3591
|
-
'div',
|
|
3592
|
-
{ className: 'title' },
|
|
3593
|
-
i().createElement(
|
|
3594
|
-
b.Tooltip,
|
|
3595
|
-
{
|
|
3596
|
-
title: '其他字段可根据条件字段的数值设置规则联动',
|
|
3597
|
-
placement: 'top',
|
|
3598
|
-
},
|
|
3599
|
-
'条件字段:',
|
|
3600
|
-
),
|
|
3601
|
-
),
|
|
3602
|
-
i().createElement(
|
|
3603
|
-
'div',
|
|
3604
|
-
{ className: 'tags-box' },
|
|
3605
|
-
r.map(function (e) {
|
|
3606
|
-
var t = a[e];
|
|
3607
|
-
return i().createElement(
|
|
3608
|
-
b.Tag,
|
|
3609
|
-
{
|
|
3610
|
-
key: t.keyRoute,
|
|
3611
|
-
color: 'geekblue',
|
|
3612
|
-
closable: !0,
|
|
3613
|
-
onClose: function () {
|
|
3614
|
-
n(t.keyRoute), o(t.keyRoute, t.key);
|
|
3615
|
-
},
|
|
3616
|
-
},
|
|
3617
|
-
t.key,
|
|
3618
|
-
'(',
|
|
3619
|
-
t.title,
|
|
3620
|
-
')',
|
|
3621
|
-
);
|
|
3622
|
-
}),
|
|
3623
|
-
),
|
|
3624
|
-
);
|
|
3625
|
-
}),
|
|
3626
|
-
)),
|
|
3627
|
-
yt =
|
|
3200
|
+
it =
|
|
3628
3201
|
(n(23),
|
|
3629
3202
|
(function (e) {
|
|
3630
3203
|
function t(t) {
|
|
3631
3204
|
var n;
|
|
3632
|
-
|
|
3633
|
-
((n
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3205
|
+
((n = e.call(this, t) || this).onDragStart = function (e) {
|
|
3206
|
+
(0, (n.props.schemaStore || {}).getSchemaByIndexRoute)(
|
|
3207
|
+
e.node.indexRoute,
|
|
3208
|
+
).isFixed && S.message.warning('当前元素不支持拖拽哦。');
|
|
3209
|
+
}),
|
|
3637
3210
|
(n.onDrop = function (e) {
|
|
3638
3211
|
var t = e.dragNode,
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
r =
|
|
3642
|
-
i =
|
|
3643
|
-
s =
|
|
3644
|
-
c =
|
|
3645
|
-
l =
|
|
3646
|
-
|
|
3647
|
-
|
|
3212
|
+
a = e.node,
|
|
3213
|
+
o = n.props.schemaStore || {},
|
|
3214
|
+
r = o.getSchemaByIndexRoute,
|
|
3215
|
+
i = o.indexRoute2keyRoute,
|
|
3216
|
+
s = o.insertJsonData,
|
|
3217
|
+
c = o.deleteJsonByIndex,
|
|
3218
|
+
l = o.isExitJsonKey,
|
|
3219
|
+
p = o.isSupportCurType,
|
|
3220
|
+
d = t.indexRoute,
|
|
3648
3221
|
u = t.jsonKey,
|
|
3649
|
-
m = r(
|
|
3222
|
+
m = r(d);
|
|
3650
3223
|
if (!m.isFixed) {
|
|
3651
|
-
var h =
|
|
3652
|
-
y = (0,
|
|
3653
|
-
g = (0,
|
|
3224
|
+
var h = a.indexRoute,
|
|
3225
|
+
y = (0, Oe.isSameParent)(d, h),
|
|
3226
|
+
g = (0, Oe.getCurPosition)(d, h);
|
|
3654
3227
|
if (y)
|
|
3655
|
-
c(
|
|
3656
|
-
'before' === g && (h = (0,
|
|
3657
|
-
|
|
3228
|
+
c(d, !0),
|
|
3229
|
+
'before' === g && (h = (0, Oe.moveForward)(h)),
|
|
3230
|
+
a.dragOverGapTop
|
|
3658
3231
|
? s(h, u, m, 'before')
|
|
3659
|
-
: (
|
|
3232
|
+
: (a.dragOver || a.dragOverGapBottom) && s(h, u, m);
|
|
3660
3233
|
else {
|
|
3661
3234
|
if (l(h, u))
|
|
3662
|
-
return void
|
|
3235
|
+
return void S.message.warning(
|
|
3663
3236
|
'目标位置中有重名的元素',
|
|
3664
3237
|
);
|
|
3665
3238
|
var f = m.type;
|
|
3666
|
-
if (!
|
|
3667
|
-
return void
|
|
3239
|
+
if (!p(h, f))
|
|
3240
|
+
return void S.message.warning(
|
|
3668
3241
|
'目标位置不支持' + f + '类型元素',
|
|
3669
3242
|
);
|
|
3670
|
-
var
|
|
3671
|
-
|
|
3672
|
-
|
|
3243
|
+
var v = i(d),
|
|
3244
|
+
x = (0, Oe.getParentIndexRoute)(h),
|
|
3245
|
+
b = (function (e) {
|
|
3673
3246
|
if (window.sessionStorage)
|
|
3674
3247
|
return window.sessionStorage.getItem(e);
|
|
3675
|
-
})(
|
|
3676
|
-
|
|
3677
|
-
|
|
3248
|
+
})(v + '-' + f);
|
|
3249
|
+
C(i(x) + '-' + u + '-' + f, b || v),
|
|
3250
|
+
a.dragOverGapTop
|
|
3678
3251
|
? 'after' === g
|
|
3679
|
-
? (c(
|
|
3680
|
-
: (s(h, u, m, 'before', !0), c(
|
|
3681
|
-
: (
|
|
3252
|
+
? (c(d, !0), s(h, u, m, 'before'))
|
|
3253
|
+
: (s(h, u, m, 'before', !0), c(d))
|
|
3254
|
+
: (a.dragOver || a.dragOverGapBottom) &&
|
|
3682
3255
|
('after' === g
|
|
3683
|
-
? (c(
|
|
3684
|
-
: (s(h, u, m, '', !0), c(
|
|
3256
|
+
? (c(d, !0), s(h, u, m))
|
|
3257
|
+
: (s(h, u, m, '', !0), c(d)));
|
|
3685
3258
|
}
|
|
3686
3259
|
}
|
|
3687
3260
|
}),
|
|
@@ -3691,34 +3264,40 @@
|
|
|
3691
3264
|
e &&
|
|
3692
3265
|
e.propertyOrder &&
|
|
3693
3266
|
e.properties &&
|
|
3694
|
-
e.propertyOrder.map(function (n,
|
|
3695
|
-
var
|
|
3696
|
-
r = e.properties[
|
|
3267
|
+
e.propertyOrder.map(function (n, a) {
|
|
3268
|
+
var o = n,
|
|
3269
|
+
r = e.properties[o].type + '-' + o;
|
|
3697
3270
|
t.push(r);
|
|
3698
3271
|
}),
|
|
3699
3272
|
t
|
|
3700
3273
|
);
|
|
3701
|
-
})
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3274
|
+
});
|
|
3275
|
+
var a = n.props.schemaStore || {},
|
|
3276
|
+
o = a.initJSONSchemaData,
|
|
3277
|
+
r = a.initOnChange,
|
|
3278
|
+
i = a.initSchemaTypeList;
|
|
3279
|
+
return (
|
|
3280
|
+
t.data && o(t.data),
|
|
3281
|
+
t.onChange && r(t.onChange),
|
|
3282
|
+
t.typeList && i(t.typeList),
|
|
3705
3283
|
n
|
|
3706
3284
|
);
|
|
3707
3285
|
}
|
|
3708
|
-
|
|
3286
|
+
o()(t, e);
|
|
3709
3287
|
var n = t.prototype;
|
|
3710
3288
|
return (
|
|
3711
3289
|
(n.componentWillReceiveProps = function (e) {
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3290
|
+
var t = this.props.schemaStore || {},
|
|
3291
|
+
n = t.initJSONSchemaData,
|
|
3292
|
+
a = t.initOnChange,
|
|
3293
|
+
o = t.initSchemaTypeList;
|
|
3294
|
+
O(e.data, this.props.data) || n(e.data),
|
|
3295
|
+
O(e.onChange, this.props.onChange) || a(e.onChange),
|
|
3296
|
+
O(e.typeList, this.props.typeList) || o(e.typeList);
|
|
3718
3297
|
}),
|
|
3719
3298
|
(n.render = function () {
|
|
3720
|
-
var e = this.props.jsonSchema,
|
|
3721
|
-
t = (0,
|
|
3299
|
+
var e = (this.props.schemaStore || {}).jsonSchema,
|
|
3300
|
+
t = (0, Oe.isEmptySchema)(e),
|
|
3722
3301
|
n = e.type;
|
|
3723
3302
|
return r.createElement(
|
|
3724
3303
|
'div',
|
|
@@ -3727,9 +3306,8 @@
|
|
|
3727
3306
|
r.createElement(
|
|
3728
3307
|
r.Fragment,
|
|
3729
3308
|
null,
|
|
3730
|
-
r.createElement(ht, null),
|
|
3731
3309
|
r.createElement(
|
|
3732
|
-
|
|
3310
|
+
S.Tree,
|
|
3733
3311
|
{
|
|
3734
3312
|
draggable: !0,
|
|
3735
3313
|
selectable: !1,
|
|
@@ -3741,7 +3319,7 @@
|
|
|
3741
3319
|
: this.catchExpandedKeys(e),
|
|
3742
3320
|
},
|
|
3743
3321
|
'object' === n &&
|
|
3744
|
-
|
|
3322
|
+
rt({
|
|
3745
3323
|
parentType: '',
|
|
3746
3324
|
jsonKey: '',
|
|
3747
3325
|
indexRoute: '',
|
|
@@ -3750,7 +3328,7 @@
|
|
|
3750
3328
|
isOnlyShowChild: !0,
|
|
3751
3329
|
}),
|
|
3752
3330
|
'object' !== n &&
|
|
3753
|
-
|
|
3331
|
+
nt({
|
|
3754
3332
|
parentType: '',
|
|
3755
3333
|
jsonKey: '',
|
|
3756
3334
|
indexRoute: '',
|
|
@@ -3772,70 +3350,58 @@
|
|
|
3772
3350
|
t
|
|
3773
3351
|
);
|
|
3774
3352
|
})(r.PureComponent));
|
|
3775
|
-
|
|
3776
|
-
onChange:
|
|
3777
|
-
data:
|
|
3778
|
-
typeList:
|
|
3353
|
+
it.propTypes = {
|
|
3354
|
+
onChange: d().func,
|
|
3355
|
+
data: d().object,
|
|
3356
|
+
typeList: d().object,
|
|
3779
3357
|
};
|
|
3780
|
-
var
|
|
3781
|
-
return {
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
initOnChange: e.jsonSchemaStore.initOnChange,
|
|
3785
|
-
initSchemaTypeList: e.jsonSchemaStore.initSchemaTypeList,
|
|
3786
|
-
setPageScreen: e.jsonSchemaStore.setPageScreen,
|
|
3787
|
-
getSchemaByIndexRoute: e.jsonSchemaStore.getSchemaByIndexRoute,
|
|
3788
|
-
indexRoute2keyRoute: e.jsonSchemaStore.indexRoute2keyRoute,
|
|
3789
|
-
insertJsonData: e.jsonSchemaStore.insertJsonData,
|
|
3790
|
-
deleteJsonByIndex: e.jsonSchemaStore.deleteJsonByIndex,
|
|
3791
|
-
isExitJsonKey: e.jsonSchemaStore.isExitJsonKey,
|
|
3792
|
-
isSupportCurType: e.jsonSchemaStore.isSupportCurType,
|
|
3793
|
-
};
|
|
3794
|
-
})((0, l.observer)(yt)),
|
|
3795
|
-
ft = (function (e) {
|
|
3358
|
+
var st = (0, l.inject)(function (e) {
|
|
3359
|
+
return { schemaStore: e.schemaStore };
|
|
3360
|
+
})((0, l.observer)(it)),
|
|
3361
|
+
ct = (function (e) {
|
|
3796
3362
|
function t(t) {
|
|
3797
3363
|
var n;
|
|
3798
3364
|
return (
|
|
3799
3365
|
((n = e.call(this, t) || this).state = {
|
|
3800
|
-
|
|
3366
|
+
schemaStore: new Ne.schemaStore(),
|
|
3801
3367
|
}),
|
|
3802
3368
|
n
|
|
3803
3369
|
);
|
|
3804
3370
|
}
|
|
3805
3371
|
return (
|
|
3806
|
-
|
|
3372
|
+
o()(t, e),
|
|
3807
3373
|
(t.prototype.render = function () {
|
|
3808
3374
|
var e = this.props,
|
|
3809
3375
|
t = e.data,
|
|
3810
3376
|
n = e.typeList,
|
|
3811
|
-
|
|
3812
|
-
|
|
3377
|
+
a = e.onChange,
|
|
3378
|
+
o = e.element,
|
|
3813
3379
|
i = e.wideScreen,
|
|
3814
|
-
s = this.state.
|
|
3815
|
-
|
|
3380
|
+
s = this.state.schemaStore,
|
|
3381
|
+
p = r.createElement(
|
|
3816
3382
|
l.Provider,
|
|
3817
|
-
{
|
|
3818
|
-
r.createElement(
|
|
3383
|
+
{ schemaStore: s },
|
|
3384
|
+
r.createElement(st, {
|
|
3819
3385
|
data: t,
|
|
3820
3386
|
typeList: n,
|
|
3821
|
-
onChange:
|
|
3387
|
+
onChange: a,
|
|
3822
3388
|
wideScreen: i,
|
|
3823
3389
|
}),
|
|
3824
3390
|
);
|
|
3825
|
-
return
|
|
3391
|
+
return o ? (c().render(p, o), '') : p;
|
|
3826
3392
|
}),
|
|
3827
3393
|
t
|
|
3828
3394
|
);
|
|
3829
3395
|
})(r.PureComponent);
|
|
3830
|
-
|
|
3831
|
-
wideScreen:
|
|
3832
|
-
onChange:
|
|
3833
|
-
data:
|
|
3834
|
-
typeList:
|
|
3835
|
-
element:
|
|
3396
|
+
ct.propTypes = {
|
|
3397
|
+
wideScreen: d().any,
|
|
3398
|
+
onChange: d().func,
|
|
3399
|
+
data: d().any,
|
|
3400
|
+
typeList: d().any,
|
|
3401
|
+
element: d().any,
|
|
3836
3402
|
};
|
|
3837
3403
|
})(),
|
|
3838
|
-
|
|
3404
|
+
a
|
|
3839
3405
|
);
|
|
3840
3406
|
})();
|
|
3841
3407
|
});
|