@wibetter/json-schema-editor 5.0.9 → 5.0.20
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 +305 -206
- package/lib/index.js.LICENSE.txt +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
l = !1,
|
|
87
87
|
p = function () {},
|
|
88
88
|
d = null,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
m = 'data-vue-ssr-id',
|
|
90
|
+
u =
|
|
91
91
|
'undefined' != typeof navigator &&
|
|
92
92
|
/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());
|
|
93
93
|
function h(e, t, n, o) {
|
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
function f(e) {
|
|
139
139
|
var t,
|
|
140
140
|
n,
|
|
141
|
-
a = document.querySelector('style[' +
|
|
141
|
+
a = document.querySelector('style[' + m + '~="' + e.id + '"]');
|
|
142
142
|
if (a) {
|
|
143
143
|
if (l) return p;
|
|
144
144
|
a.parentNode.removeChild(a);
|
|
145
145
|
}
|
|
146
|
-
if (
|
|
146
|
+
if (u) {
|
|
147
147
|
var o = c++;
|
|
148
148
|
(a = s || (s = g())),
|
|
149
149
|
(t = b.bind(null, a, o, !1)),
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
o = t.sourceMap;
|
|
192
192
|
if (
|
|
193
193
|
(a && e.setAttribute('media', a),
|
|
194
|
-
d.ssrId && e.setAttribute(
|
|
194
|
+
d.ssrId && e.setAttribute(m, t.id),
|
|
195
195
|
o &&
|
|
196
196
|
((n += '\n/*# sourceURL=' + o.sources[0] + ' */'),
|
|
197
197
|
(n +=
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
n.r(a),
|
|
249
249
|
n.d(a, {
|
|
250
250
|
default: function () {
|
|
251
|
-
return
|
|
251
|
+
return pt;
|
|
252
252
|
},
|
|
253
253
|
});
|
|
254
254
|
var e,
|
|
@@ -261,8 +261,8 @@
|
|
|
261
261
|
l = require('mobx-react'),
|
|
262
262
|
p = require('prop-types'),
|
|
263
263
|
d = n.n(p),
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
m = require('@babel/runtime/helpers/extends'),
|
|
265
|
+
u = n.n(m),
|
|
266
266
|
h = require('@babel/runtime/helpers/initializerDefineProperty'),
|
|
267
267
|
y = n.n(h),
|
|
268
268
|
g = require('@babel/runtime/helpers/createClass'),
|
|
@@ -283,10 +283,10 @@
|
|
|
283
283
|
function C(e, t) {
|
|
284
284
|
window.sessionStorage && window.sessionStorage.setItem(e, t);
|
|
285
285
|
}
|
|
286
|
-
var
|
|
287
|
-
|
|
288
|
-
I,
|
|
286
|
+
var N,
|
|
287
|
+
j,
|
|
289
288
|
w,
|
|
289
|
+
I,
|
|
290
290
|
R,
|
|
291
291
|
K,
|
|
292
292
|
k,
|
|
@@ -303,12 +303,12 @@
|
|
|
303
303
|
_,
|
|
304
304
|
M,
|
|
305
305
|
W,
|
|
306
|
-
G,
|
|
307
306
|
z,
|
|
307
|
+
G,
|
|
308
308
|
U,
|
|
309
309
|
H,
|
|
310
|
-
Q,
|
|
311
310
|
X,
|
|
311
|
+
Q,
|
|
312
312
|
Y,
|
|
313
313
|
Z,
|
|
314
314
|
$,
|
|
@@ -324,8 +324,8 @@
|
|
|
324
324
|
le,
|
|
325
325
|
pe,
|
|
326
326
|
de,
|
|
327
|
-
ue,
|
|
328
327
|
me,
|
|
328
|
+
ue,
|
|
329
329
|
he,
|
|
330
330
|
ye,
|
|
331
331
|
ge,
|
|
@@ -338,6 +338,7 @@
|
|
|
338
338
|
'textarea',
|
|
339
339
|
'radio',
|
|
340
340
|
'select',
|
|
341
|
+
'cascader',
|
|
341
342
|
'checkboxes',
|
|
342
343
|
'date',
|
|
343
344
|
'date-time',
|
|
@@ -370,6 +371,8 @@
|
|
|
370
371
|
'object',
|
|
371
372
|
'input',
|
|
372
373
|
'number',
|
|
374
|
+
'select',
|
|
375
|
+
'cascader',
|
|
373
376
|
'color',
|
|
374
377
|
'url',
|
|
375
378
|
'date',
|
|
@@ -384,13 +387,13 @@
|
|
|
384
387
|
e),
|
|
385
388
|
Oe = require('@wibetter/json-utils'),
|
|
386
389
|
Ce = Oe.TypeDataList.jsonschema,
|
|
387
|
-
|
|
388
|
-
|
|
390
|
+
Ne = Oe.TypeDataList.input,
|
|
391
|
+
je = {
|
|
389
392
|
schemaStore:
|
|
390
|
-
((
|
|
391
|
-
(
|
|
392
|
-
(I = b.action.bound),
|
|
393
|
+
((N = b.action.bound),
|
|
394
|
+
(j = b.action.bound),
|
|
393
395
|
(w = b.action.bound),
|
|
396
|
+
(I = b.action.bound),
|
|
394
397
|
(R = b.action.bound),
|
|
395
398
|
(K = b.action.bound),
|
|
396
399
|
(k = b.action.bound),
|
|
@@ -407,12 +410,12 @@
|
|
|
407
410
|
(_ = b.action.bound),
|
|
408
411
|
(M = b.action.bound),
|
|
409
412
|
(W = b.action.bound),
|
|
410
|
-
(G = b.action.bound),
|
|
411
413
|
(z = b.action.bound),
|
|
414
|
+
(G = b.action.bound),
|
|
412
415
|
(U = b.action.bound),
|
|
413
416
|
(H = b.action.bound),
|
|
414
|
-
(Q = b.action.bound),
|
|
415
417
|
(X = b.action.bound),
|
|
418
|
+
(Q = b.action.bound),
|
|
416
419
|
(Y = b.action.bound),
|
|
417
420
|
(Z = b.action.bound),
|
|
418
421
|
($ = b.action.bound),
|
|
@@ -430,8 +433,8 @@
|
|
|
430
433
|
(de = (function () {
|
|
431
434
|
function e() {
|
|
432
435
|
(this.curJsonKeyIndex = 1),
|
|
433
|
-
y()(this, 'triggerChange',
|
|
434
|
-
y()(this, 'jsonSchema',
|
|
436
|
+
y()(this, 'triggerChange', me, this),
|
|
437
|
+
y()(this, 'jsonSchema', ue, this),
|
|
435
438
|
y()(this, 'SchemaTypeList', he, this),
|
|
436
439
|
y()(this, 'onChange', ye, this),
|
|
437
440
|
y()(this, 'childElemSort', ge, this);
|
|
@@ -534,7 +537,7 @@
|
|
|
534
537
|
if ((0, Oe.isContainerSchema)(n)) {
|
|
535
538
|
var a = this.getNewJsonKeyIndex(n);
|
|
536
539
|
n.propertyOrder.push(a),
|
|
537
|
-
(n.properties[a] =
|
|
540
|
+
(n.properties[a] = Ne),
|
|
538
541
|
this.jsonSchemaChange(t);
|
|
539
542
|
} else S.message.warning('非对象类型字段不允许插入子元素');
|
|
540
543
|
}),
|
|
@@ -553,7 +556,7 @@
|
|
|
553
556
|
(t.editSchemaData = function (e, t, n, a) {
|
|
554
557
|
var o = (0, Oe.getParentIndexRoute)(e),
|
|
555
558
|
r = (0, Oe.getSchemaByIndexRoute)(o, this.jsonSchema);
|
|
556
|
-
(r.properties[t] =
|
|
559
|
+
(r.properties[t] = u()({}, E(r.properties[t]), n)),
|
|
557
560
|
this.jsonSchemaChange(a);
|
|
558
561
|
}),
|
|
559
562
|
(t.editJsonKey = function (e, t, n) {
|
|
@@ -570,7 +573,7 @@
|
|
|
570
573
|
var t = (0, Oe.getParentIndexRoute)(e),
|
|
571
574
|
n = (0, Oe.getSchemaByIndexRoute)(t, this.jsonSchema),
|
|
572
575
|
a = this.getNewJsonKeyIndex(n);
|
|
573
|
-
this.insertJsonData(e, a,
|
|
576
|
+
this.insertJsonData(e, a, Ne);
|
|
574
577
|
}),
|
|
575
578
|
(t.insertJsonData = function (e, t, n, a, o) {
|
|
576
579
|
var r = (0, Oe.getParentIndexRoute_CurIndex)(e),
|
|
@@ -581,8 +584,8 @@
|
|
|
581
584
|
var l = c.propertyOrder,
|
|
582
585
|
p = 'before' === a ? Number(s) : Number(s) + 1,
|
|
583
586
|
d = l.slice(0, p),
|
|
584
|
-
|
|
585
|
-
(c.propertyOrder = [].concat(d, [t],
|
|
587
|
+
m = l.slice(p);
|
|
588
|
+
(c.propertyOrder = [].concat(d, [t], m)),
|
|
586
589
|
this.jsonSchemaChange(o);
|
|
587
590
|
}),
|
|
588
591
|
(t.deleteJsonByIndex_CurKey = function (e, t, n) {
|
|
@@ -765,7 +768,7 @@
|
|
|
765
768
|
])
|
|
766
769
|
);
|
|
767
770
|
})()),
|
|
768
|
-
(
|
|
771
|
+
(me = x()(de.prototype, 'triggerChange', [b.observable], {
|
|
769
772
|
configurable: !0,
|
|
770
773
|
enumerable: !0,
|
|
771
774
|
writable: !0,
|
|
@@ -773,7 +776,7 @@
|
|
|
773
776
|
return !1;
|
|
774
777
|
},
|
|
775
778
|
})),
|
|
776
|
-
(
|
|
779
|
+
(ue = x()(de.prototype, 'jsonSchema', [b.observable], {
|
|
777
780
|
configurable: !0,
|
|
778
781
|
enumerable: !0,
|
|
779
782
|
writable: !0,
|
|
@@ -800,7 +803,7 @@
|
|
|
800
803
|
x()(
|
|
801
804
|
de.prototype,
|
|
802
805
|
'triggerChangeAction',
|
|
803
|
-
[
|
|
806
|
+
[N],
|
|
804
807
|
Object.getOwnPropertyDescriptor(
|
|
805
808
|
de.prototype,
|
|
806
809
|
'triggerChangeAction',
|
|
@@ -810,7 +813,7 @@
|
|
|
810
813
|
x()(
|
|
811
814
|
de.prototype,
|
|
812
815
|
'initSchemaTypeList',
|
|
813
|
-
[
|
|
816
|
+
[j],
|
|
814
817
|
Object.getOwnPropertyDescriptor(
|
|
815
818
|
de.prototype,
|
|
816
819
|
'initSchemaTypeList',
|
|
@@ -820,7 +823,7 @@
|
|
|
820
823
|
x()(
|
|
821
824
|
de.prototype,
|
|
822
825
|
'initJSONSchemaData',
|
|
823
|
-
[
|
|
826
|
+
[w],
|
|
824
827
|
Object.getOwnPropertyDescriptor(
|
|
825
828
|
de.prototype,
|
|
826
829
|
'initJSONSchemaData',
|
|
@@ -837,7 +840,7 @@
|
|
|
837
840
|
x()(
|
|
838
841
|
de.prototype,
|
|
839
842
|
'initOnChange',
|
|
840
|
-
[
|
|
843
|
+
[I],
|
|
841
844
|
Object.getOwnPropertyDescriptor(de.prototype, 'initOnChange'),
|
|
842
845
|
de.prototype,
|
|
843
846
|
),
|
|
@@ -986,7 +989,7 @@
|
|
|
986
989
|
x()(
|
|
987
990
|
de.prototype,
|
|
988
991
|
'deleteJsonByIndex',
|
|
989
|
-
[
|
|
992
|
+
[z],
|
|
990
993
|
Object.getOwnPropertyDescriptor(
|
|
991
994
|
de.prototype,
|
|
992
995
|
'deleteJsonByIndex',
|
|
@@ -996,7 +999,7 @@
|
|
|
996
999
|
x()(
|
|
997
1000
|
de.prototype,
|
|
998
1001
|
'updateEnumItem',
|
|
999
|
-
[
|
|
1002
|
+
[G],
|
|
1000
1003
|
Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumItem'),
|
|
1001
1004
|
de.prototype,
|
|
1002
1005
|
),
|
|
@@ -1017,14 +1020,14 @@
|
|
|
1017
1020
|
x()(
|
|
1018
1021
|
de.prototype,
|
|
1019
1022
|
'updateEnumText',
|
|
1020
|
-
[
|
|
1023
|
+
[X],
|
|
1021
1024
|
Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumText'),
|
|
1022
1025
|
de.prototype,
|
|
1023
1026
|
),
|
|
1024
1027
|
x()(
|
|
1025
1028
|
de.prototype,
|
|
1026
1029
|
'deleteEnumItem',
|
|
1027
|
-
[
|
|
1030
|
+
[Q],
|
|
1028
1031
|
Object.getOwnPropertyDescriptor(de.prototype, 'deleteEnumItem'),
|
|
1029
1032
|
de.prototype,
|
|
1030
1033
|
),
|
|
@@ -1158,12 +1161,12 @@
|
|
|
1158
1161
|
l = [],
|
|
1159
1162
|
p = [],
|
|
1160
1163
|
d = [],
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1164
|
+
m = 0,
|
|
1165
|
+
u = a.length;
|
|
1166
|
+
m < u;
|
|
1167
|
+
m++
|
|
1165
1168
|
) {
|
|
1166
|
-
var h = a[
|
|
1169
|
+
var h = a[m];
|
|
1167
1170
|
switch (n.properties[h].type) {
|
|
1168
1171
|
case 'input':
|
|
1169
1172
|
case 'url':
|
|
@@ -1208,10 +1211,15 @@
|
|
|
1208
1211
|
})),
|
|
1209
1212
|
de),
|
|
1210
1213
|
},
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1214
|
+
we = require('@ant-design/icons'),
|
|
1215
|
+
Ie = require('react-ace'),
|
|
1216
|
+
Re = n.n(Ie),
|
|
1217
|
+
Ke =
|
|
1218
|
+
(require('ace-builds/src-noconflict/mode-json'),
|
|
1219
|
+
require('ace-builds/src-noconflict/theme-solarized_light'),
|
|
1220
|
+
n(975),
|
|
1221
|
+
S.Input.TextArea),
|
|
1222
|
+
ke =
|
|
1215
1223
|
(S.Select.Option,
|
|
1216
1224
|
(function (e) {
|
|
1217
1225
|
function t(t) {
|
|
@@ -1303,7 +1311,7 @@
|
|
|
1303
1311
|
'codearea' === e ||
|
|
1304
1312
|
'htmlarea' === e ||
|
|
1305
1313
|
'json' === e
|
|
1306
|
-
? r.createElement(
|
|
1314
|
+
? r.createElement(Ke, {
|
|
1307
1315
|
style: { display: 'inline-block' },
|
|
1308
1316
|
rows: 4,
|
|
1309
1317
|
placeholder: '请输入' + t.title + '的默认值',
|
|
@@ -1340,6 +1348,11 @@
|
|
|
1340
1348
|
},
|
|
1341
1349
|
});
|
|
1342
1350
|
}),
|
|
1351
|
+
(n.state = {
|
|
1352
|
+
isShowWarn: !1,
|
|
1353
|
+
warnText: '',
|
|
1354
|
+
curJSONDataTemp: void 0,
|
|
1355
|
+
}),
|
|
1343
1356
|
(n.handleValueChange = n.handleValueChange.bind(n)),
|
|
1344
1357
|
n
|
|
1345
1358
|
);
|
|
@@ -1354,8 +1367,12 @@
|
|
|
1354
1367
|
o = a.nodeKey,
|
|
1355
1368
|
i = a.indexRoute,
|
|
1356
1369
|
s = a.targetJsonSchema,
|
|
1357
|
-
c =
|
|
1358
|
-
l =
|
|
1370
|
+
c = this.state,
|
|
1371
|
+
l = c.isShowWarn,
|
|
1372
|
+
p = c.warnText,
|
|
1373
|
+
d = c.curJSONDataTemp,
|
|
1374
|
+
m = s.type,
|
|
1375
|
+
u = (n(i), s.isConditionProp);
|
|
1359
1376
|
return r.createElement(
|
|
1360
1377
|
'div',
|
|
1361
1378
|
{ className: 'advance-config-model' },
|
|
@@ -1375,7 +1392,7 @@
|
|
|
1375
1392
|
'input-image',
|
|
1376
1393
|
].indexOf(e) > -1
|
|
1377
1394
|
);
|
|
1378
|
-
})(
|
|
1395
|
+
})(m) &&
|
|
1379
1396
|
r.createElement(
|
|
1380
1397
|
'div',
|
|
1381
1398
|
{
|
|
@@ -1410,7 +1427,7 @@
|
|
|
1410
1427
|
},
|
|
1411
1428
|
r.createElement(S.Switch, {
|
|
1412
1429
|
style: { display: 'inline-block' },
|
|
1413
|
-
defaultChecked:
|
|
1430
|
+
defaultChecked: u,
|
|
1414
1431
|
checkedChildren: '是',
|
|
1415
1432
|
unCheckedChildren: '否',
|
|
1416
1433
|
onChange: function (e) {
|
|
@@ -1420,7 +1437,7 @@
|
|
|
1420
1437
|
),
|
|
1421
1438
|
),
|
|
1422
1439
|
),
|
|
1423
|
-
'select' ===
|
|
1440
|
+
('select' === m || 'cascader' === m) &&
|
|
1424
1441
|
r.createElement(
|
|
1425
1442
|
'div',
|
|
1426
1443
|
{
|
|
@@ -1477,7 +1494,7 @@
|
|
|
1477
1494
|
])
|
|
1478
1495
|
.indexOf(e) > -1
|
|
1479
1496
|
);
|
|
1480
|
-
})(
|
|
1497
|
+
})(m) &&
|
|
1481
1498
|
r.createElement(
|
|
1482
1499
|
'div',
|
|
1483
1500
|
{
|
|
@@ -1531,7 +1548,7 @@
|
|
|
1531
1548
|
])
|
|
1532
1549
|
.indexOf(e) > -1
|
|
1533
1550
|
);
|
|
1534
|
-
})(
|
|
1551
|
+
})(m) &&
|
|
1535
1552
|
r.createElement(
|
|
1536
1553
|
'div',
|
|
1537
1554
|
{
|
|
@@ -1579,7 +1596,7 @@
|
|
|
1579
1596
|
.concat(fe, ['json', 'codearea', 'htmlarea'])
|
|
1580
1597
|
.indexOf(e) > -1
|
|
1581
1598
|
);
|
|
1582
|
-
})(
|
|
1599
|
+
})(m) &&
|
|
1583
1600
|
r.createElement(
|
|
1584
1601
|
'div',
|
|
1585
1602
|
{
|
|
@@ -1605,10 +1622,92 @@
|
|
|
1605
1622
|
r.createElement(
|
|
1606
1623
|
'div',
|
|
1607
1624
|
{ className: 'form-item-box' },
|
|
1608
|
-
this.renderDefaultContent(
|
|
1625
|
+
this.renderDefaultContent(m, s, o),
|
|
1609
1626
|
),
|
|
1610
1627
|
),
|
|
1611
1628
|
),
|
|
1629
|
+
'cascader' === m &&
|
|
1630
|
+
r.createElement(
|
|
1631
|
+
'div',
|
|
1632
|
+
{
|
|
1633
|
+
className: 'wide-screen-element-warp',
|
|
1634
|
+
key: o + '-cascader-options',
|
|
1635
|
+
},
|
|
1636
|
+
r.createElement(
|
|
1637
|
+
'div',
|
|
1638
|
+
{ className: 'element-title' },
|
|
1639
|
+
r.createElement(
|
|
1640
|
+
S.Tooltip,
|
|
1641
|
+
{
|
|
1642
|
+
title: '用于添加 级联选择 组件的 options 数据。',
|
|
1643
|
+
placement: 'top',
|
|
1644
|
+
},
|
|
1645
|
+
r.createElement(
|
|
1646
|
+
'span',
|
|
1647
|
+
{ className: 'title-text' },
|
|
1648
|
+
'options 配置',
|
|
1649
|
+
),
|
|
1650
|
+
),
|
|
1651
|
+
),
|
|
1652
|
+
r.createElement(
|
|
1653
|
+
'div',
|
|
1654
|
+
{ className: 'content-item' },
|
|
1655
|
+
l &&
|
|
1656
|
+
r.createElement(
|
|
1657
|
+
'div',
|
|
1658
|
+
{ className: 'warning-box code-area-item' },
|
|
1659
|
+
r.createElement(
|
|
1660
|
+
'div',
|
|
1661
|
+
{ className: 'warning-img' },
|
|
1662
|
+
'X',
|
|
1663
|
+
),
|
|
1664
|
+
r.createElement(
|
|
1665
|
+
'div',
|
|
1666
|
+
{ className: 'warning-text' },
|
|
1667
|
+
p,
|
|
1668
|
+
),
|
|
1669
|
+
),
|
|
1670
|
+
r.createElement(Re(), {
|
|
1671
|
+
id: o + '-json_area_ace',
|
|
1672
|
+
value: (0, Oe.hasProperties)(d)
|
|
1673
|
+
? d
|
|
1674
|
+
: JSON.stringify(s.options, null, 2),
|
|
1675
|
+
className: 'json-view-ace',
|
|
1676
|
+
mode: 'json',
|
|
1677
|
+
theme: 'solarized_light',
|
|
1678
|
+
name: 'JSON_CODE_EDIT',
|
|
1679
|
+
fontSize: 14,
|
|
1680
|
+
showPrintMargin: !0,
|
|
1681
|
+
showGutter: !0,
|
|
1682
|
+
highlightActiveLine: !0,
|
|
1683
|
+
readOnly: !1,
|
|
1684
|
+
minLines: 3,
|
|
1685
|
+
maxLines: 6,
|
|
1686
|
+
width: '100%',
|
|
1687
|
+
onChange: function (e) {
|
|
1688
|
+
try {
|
|
1689
|
+
var n = JSON.parse(e);
|
|
1690
|
+
t.handleValueChange('options', n),
|
|
1691
|
+
t.setState({
|
|
1692
|
+
isShowWarn: !1,
|
|
1693
|
+
curJSONDataTemp: void 0,
|
|
1694
|
+
});
|
|
1695
|
+
} catch (n) {
|
|
1696
|
+
t.setState({
|
|
1697
|
+
curJSONDataTemp: e,
|
|
1698
|
+
warnText: n.message,
|
|
1699
|
+
isShowWarn: !0,
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
setOptions: {
|
|
1704
|
+
useWorker: !1,
|
|
1705
|
+
showLineNumbers: !0,
|
|
1706
|
+
tabSize: 2,
|
|
1707
|
+
},
|
|
1708
|
+
}),
|
|
1709
|
+
),
|
|
1710
|
+
),
|
|
1612
1711
|
r.createElement(
|
|
1613
1712
|
'div',
|
|
1614
1713
|
{
|
|
@@ -1710,7 +1809,7 @@
|
|
|
1710
1809
|
'htmlarea',
|
|
1711
1810
|
].indexOf(e) > -1
|
|
1712
1811
|
);
|
|
1713
|
-
})(
|
|
1812
|
+
})(m) &&
|
|
1714
1813
|
r.createElement(
|
|
1715
1814
|
'div',
|
|
1716
1815
|
{
|
|
@@ -1758,7 +1857,7 @@
|
|
|
1758
1857
|
),
|
|
1759
1858
|
(function (e) {
|
|
1760
1859
|
return [].concat(ve, ['array']).indexOf(e) > -1;
|
|
1761
|
-
})(
|
|
1860
|
+
})(m) &&
|
|
1762
1861
|
r.createElement(
|
|
1763
1862
|
'div',
|
|
1764
1863
|
{
|
|
@@ -1801,7 +1900,7 @@
|
|
|
1801
1900
|
),
|
|
1802
1901
|
),
|
|
1803
1902
|
),
|
|
1804
|
-
'number' === (0, Oe.getExpectType)(
|
|
1903
|
+
'number' === (0, Oe.getExpectType)(m) &&
|
|
1805
1904
|
r.createElement(
|
|
1806
1905
|
r.Fragment,
|
|
1807
1906
|
null,
|
|
@@ -1894,7 +1993,7 @@
|
|
|
1894
1993
|
),
|
|
1895
1994
|
),
|
|
1896
1995
|
),
|
|
1897
|
-
'array' === (0, Oe.getExpectType)(
|
|
1996
|
+
'array' === (0, Oe.getExpectType)(m) &&
|
|
1898
1997
|
r.createElement(
|
|
1899
1998
|
r.Fragment,
|
|
1900
1999
|
null,
|
|
@@ -2025,17 +2124,17 @@
|
|
|
2025
2124
|
t
|
|
2026
2125
|
);
|
|
2027
2126
|
})(r.PureComponent));
|
|
2028
|
-
|
|
2127
|
+
ke.propTypes = {
|
|
2029
2128
|
jsonKey: d().string,
|
|
2030
2129
|
indexRoute: d().string,
|
|
2031
2130
|
nodeKey: d().string,
|
|
2032
2131
|
targetJsonSchema: d().any,
|
|
2033
2132
|
};
|
|
2034
|
-
var
|
|
2133
|
+
var Te = (0, l.inject)(function (e) {
|
|
2035
2134
|
return { schemaStore: e.schemaStore };
|
|
2036
|
-
})((0, l.observer)(
|
|
2037
|
-
|
|
2038
|
-
|
|
2135
|
+
})((0, l.observer)(ke)),
|
|
2136
|
+
Je = (n(915), S.Select.Option),
|
|
2137
|
+
De = (function (e) {
|
|
2039
2138
|
function t(t) {
|
|
2040
2139
|
var n;
|
|
2041
2140
|
return (
|
|
@@ -2094,9 +2193,9 @@
|
|
|
2094
2193
|
l = r.getNewJsonKeyIndex,
|
|
2095
2194
|
p = E(a),
|
|
2096
2195
|
d = (0, Oe.getParentIndexRoute)(t),
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
C(s(d) + '-' +
|
|
2196
|
+
m = l(i(d), o),
|
|
2197
|
+
u = a.type;
|
|
2198
|
+
C(s(d) + '-' + m + '-' + u, s(t)), c(t, m, p);
|
|
2100
2199
|
}),
|
|
2101
2200
|
(n.onDeleteBtnEvent = function () {
|
|
2102
2201
|
var e = n.props,
|
|
@@ -2139,14 +2238,14 @@
|
|
|
2139
2238
|
l = a.targetJsonSchema,
|
|
2140
2239
|
p = this.state.showAdvanceConfig,
|
|
2141
2240
|
d = i ? (0, Oe.getParentIndexRoute)(i) : '',
|
|
2142
|
-
|
|
2143
|
-
|
|
2241
|
+
m = d ? n(d) : {},
|
|
2242
|
+
u = null == (e = m && m.isContainer) || e,
|
|
2144
2243
|
h = l.isFixed || this.props.isFixed || !1,
|
|
2145
2244
|
y =
|
|
2146
2245
|
(this.props.readOnly || l.readOnly,
|
|
2147
2246
|
void 0 !== this.props.keyIsFixed
|
|
2148
2247
|
? this.props.keyIsFixed
|
|
2149
|
-
: !
|
|
2248
|
+
: !u || h),
|
|
2150
2249
|
g =
|
|
2151
2250
|
void 0 !== this.props.typeIsFixed
|
|
2152
2251
|
? this.props.typeIsFixed
|
|
@@ -2155,7 +2254,7 @@
|
|
|
2155
2254
|
void 0 !== this.props.titleIsFixed
|
|
2156
2255
|
? this.props.titleIsFixed
|
|
2157
2256
|
: h,
|
|
2158
|
-
v = this.props.hideOperaBtn || !
|
|
2257
|
+
v = this.props.hideOperaBtn || !u,
|
|
2159
2258
|
x = !!v && this.props.showAdvanceBtn,
|
|
2160
2259
|
b = this.getCurrentTypeList(o),
|
|
2161
2260
|
E = l.type,
|
|
@@ -2198,7 +2297,7 @@
|
|
|
2198
2297
|
disabled: g,
|
|
2199
2298
|
},
|
|
2200
2299
|
b.map(function (e) {
|
|
2201
|
-
return r.createElement(
|
|
2300
|
+
return r.createElement(Je, { key: e, value: e }, e);
|
|
2202
2301
|
}),
|
|
2203
2302
|
),
|
|
2204
2303
|
),
|
|
@@ -2224,7 +2323,7 @@
|
|
|
2224
2323
|
r.createElement(
|
|
2225
2324
|
S.Tooltip,
|
|
2226
2325
|
{ title: '删除' },
|
|
2227
|
-
r.createElement(
|
|
2326
|
+
r.createElement(we.CloseOutlined, {
|
|
2228
2327
|
className: 'operate-btn delete-operate',
|
|
2229
2328
|
onClick: this.onDeleteBtnEvent,
|
|
2230
2329
|
}),
|
|
@@ -2232,7 +2331,7 @@
|
|
|
2232
2331
|
r.createElement(
|
|
2233
2332
|
S.Tooltip,
|
|
2234
2333
|
{ title: O ? '新增子元素' : '新增同级元素' },
|
|
2235
|
-
r.createElement(
|
|
2334
|
+
r.createElement(we.PlusOutlined, {
|
|
2236
2335
|
className: 'operate-btn',
|
|
2237
2336
|
onClick: this.onAddBtnEvent,
|
|
2238
2337
|
}),
|
|
@@ -2241,7 +2340,7 @@
|
|
|
2241
2340
|
r.createElement(
|
|
2242
2341
|
S.Tooltip,
|
|
2243
2342
|
{ title: '数据项排序' },
|
|
2244
|
-
r.createElement(
|
|
2343
|
+
r.createElement(we.SortAscendingOutlined, {
|
|
2245
2344
|
className: 'operate-btn',
|
|
2246
2345
|
onClick: this.childElemSort,
|
|
2247
2346
|
}),
|
|
@@ -2253,7 +2352,7 @@
|
|
|
2253
2352
|
r.createElement(
|
|
2254
2353
|
S.Tooltip,
|
|
2255
2354
|
{ title: '复制' },
|
|
2256
|
-
r.createElement(
|
|
2355
|
+
r.createElement(we.CopyOutlined, {
|
|
2257
2356
|
className: 'operate-btn',
|
|
2258
2357
|
onClick: this.onCopyBtnEvent,
|
|
2259
2358
|
}),
|
|
@@ -2261,7 +2360,7 @@
|
|
|
2261
2360
|
r.createElement(
|
|
2262
2361
|
S.Tooltip,
|
|
2263
2362
|
{ title: '高级设置' },
|
|
2264
|
-
r.createElement(
|
|
2363
|
+
r.createElement(we.SettingOutlined, {
|
|
2265
2364
|
className: 'operate-btn',
|
|
2266
2365
|
onClick: function () {
|
|
2267
2366
|
t.setState({ showAdvanceConfig: !0 });
|
|
@@ -2271,7 +2370,7 @@
|
|
|
2271
2370
|
r.createElement(
|
|
2272
2371
|
S.Tooltip,
|
|
2273
2372
|
{ title: '按住进行拖拽' },
|
|
2274
|
-
r.createElement(
|
|
2373
|
+
r.createElement(we.DragOutlined, {
|
|
2275
2374
|
className: 'operate-btn drag-btn',
|
|
2276
2375
|
}),
|
|
2277
2376
|
),
|
|
@@ -2284,7 +2383,7 @@
|
|
|
2284
2383
|
r.createElement(
|
|
2285
2384
|
S.Tooltip,
|
|
2286
2385
|
{ title: '高级设置' },
|
|
2287
|
-
r.createElement(
|
|
2386
|
+
r.createElement(we.SettingOutlined, {
|
|
2288
2387
|
className: 'operate-btn',
|
|
2289
2388
|
onClick: function () {
|
|
2290
2389
|
t.setState({ showAdvanceConfig: !0 });
|
|
@@ -2316,7 +2415,7 @@
|
|
|
2316
2415
|
),
|
|
2317
2416
|
],
|
|
2318
2417
|
},
|
|
2319
|
-
r.createElement(
|
|
2418
|
+
r.createElement(Te, {
|
|
2320
2419
|
indexRoute: i,
|
|
2321
2420
|
jsonKey: s,
|
|
2322
2421
|
targetJsonSchema: l,
|
|
@@ -2339,7 +2438,7 @@
|
|
|
2339
2438
|
t
|
|
2340
2439
|
);
|
|
2341
2440
|
})(r.PureComponent);
|
|
2342
|
-
|
|
2441
|
+
De.propTypes = {
|
|
2343
2442
|
parentType: d().string,
|
|
2344
2443
|
jsonKey: d().string,
|
|
2345
2444
|
indexRoute: d().string,
|
|
@@ -2352,14 +2451,14 @@
|
|
|
2352
2451
|
typeIsFixed: d().bool,
|
|
2353
2452
|
titleIsFixed: d().bool,
|
|
2354
2453
|
};
|
|
2355
|
-
var
|
|
2454
|
+
var Be = (0, l.inject)(function (e) {
|
|
2356
2455
|
return { schemaStore: e.schemaStore };
|
|
2357
|
-
})((0, l.observer)(
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
return i().createElement(
|
|
2456
|
+
})((0, l.observer)(De)),
|
|
2457
|
+
Pe = S.Tree.TreeNode,
|
|
2458
|
+
Ve = function (e) {
|
|
2459
|
+
return i().createElement(Be, e);
|
|
2361
2460
|
},
|
|
2362
|
-
|
|
2461
|
+
Le = function (e) {
|
|
2363
2462
|
var t = e.jsonKey,
|
|
2364
2463
|
n = e.indexRoute,
|
|
2365
2464
|
a = e.nodeKey,
|
|
@@ -2370,14 +2469,14 @@
|
|
|
2370
2469
|
l = a ? a + '-' + c : c,
|
|
2371
2470
|
p = o[c] || {};
|
|
2372
2471
|
return i().createElement(
|
|
2373
|
-
|
|
2472
|
+
Pe,
|
|
2374
2473
|
{
|
|
2375
2474
|
className: r + '-schema schema-item-form',
|
|
2376
2475
|
id: a,
|
|
2377
2476
|
key: a,
|
|
2378
2477
|
indexRoute: n,
|
|
2379
2478
|
jsonKey: t,
|
|
2380
|
-
title:
|
|
2479
|
+
title: Ve(u()({}, e)),
|
|
2381
2480
|
},
|
|
2382
2481
|
(function (e) {
|
|
2383
2482
|
var t = e.parentType,
|
|
@@ -2386,7 +2485,7 @@
|
|
|
2386
2485
|
o = e.nodeKey,
|
|
2387
2486
|
r = e.targetJsonSchema;
|
|
2388
2487
|
return i().createElement(
|
|
2389
|
-
|
|
2488
|
+
Pe,
|
|
2390
2489
|
{
|
|
2391
2490
|
className: 'array-item-schema schema-item-form',
|
|
2392
2491
|
id: o,
|
|
@@ -2394,7 +2493,7 @@
|
|
|
2394
2493
|
indexRoute: a,
|
|
2395
2494
|
jsonKey: n,
|
|
2396
2495
|
disabled: !0,
|
|
2397
|
-
title:
|
|
2496
|
+
title: Ve({
|
|
2398
2497
|
indexRoute: a,
|
|
2399
2498
|
jsonKey: n,
|
|
2400
2499
|
targetJsonSchema: r,
|
|
@@ -2416,7 +2515,7 @@
|
|
|
2416
2515
|
c = t[s],
|
|
2417
2516
|
l = c.type,
|
|
2418
2517
|
p = (a ? a + '-' : '') + l + '-' + s;
|
|
2419
|
-
return
|
|
2518
|
+
return ot({
|
|
2420
2519
|
parentType: o,
|
|
2421
2520
|
jsonKey: s,
|
|
2422
2521
|
indexRoute: i,
|
|
@@ -2442,8 +2541,8 @@
|
|
|
2442
2541
|
}),
|
|
2443
2542
|
);
|
|
2444
2543
|
},
|
|
2445
|
-
|
|
2446
|
-
|
|
2544
|
+
Fe = (n(790), S.Select.Option),
|
|
2545
|
+
qe = (function (e) {
|
|
2447
2546
|
function t(t) {
|
|
2448
2547
|
var n;
|
|
2449
2548
|
return (
|
|
@@ -2497,7 +2596,7 @@
|
|
|
2497
2596
|
},
|
|
2498
2597
|
o.map(function (e, t) {
|
|
2499
2598
|
return r.createElement(
|
|
2500
|
-
|
|
2599
|
+
Fe,
|
|
2501
2600
|
{ key: t, value: e.value },
|
|
2502
2601
|
e.label || e.name,
|
|
2503
2602
|
);
|
|
@@ -2510,7 +2609,7 @@
|
|
|
2510
2609
|
r.createElement(
|
|
2511
2610
|
S.Select,
|
|
2512
2611
|
{ defaultValue: a, style: { width: 120 }, disabled: !0 },
|
|
2513
|
-
r.createElement(
|
|
2612
|
+
r.createElement(Fe, { key: a, value: a }, a),
|
|
2514
2613
|
),
|
|
2515
2614
|
),
|
|
2516
2615
|
r.createElement(
|
|
@@ -2527,7 +2626,7 @@
|
|
|
2527
2626
|
t
|
|
2528
2627
|
);
|
|
2529
2628
|
})(r.PureComponent);
|
|
2530
|
-
|
|
2629
|
+
qe.propTypes = {
|
|
2531
2630
|
parentType: d().string,
|
|
2532
2631
|
jsonKey: d().string,
|
|
2533
2632
|
indexRoute: d().string,
|
|
@@ -2536,14 +2635,14 @@
|
|
|
2536
2635
|
typeSelectData: d().any,
|
|
2537
2636
|
isFixed: d().any,
|
|
2538
2637
|
};
|
|
2539
|
-
var
|
|
2638
|
+
var Ae = (0, l.inject)(function (e) {
|
|
2540
2639
|
return { schemaStore: e.schemaStore };
|
|
2541
|
-
})((0, l.observer)(
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
return i().createElement(
|
|
2640
|
+
})((0, l.observer)(qe)),
|
|
2641
|
+
_e = S.Tree.TreeNode,
|
|
2642
|
+
Me = function (e) {
|
|
2643
|
+
return i().createElement(Be, e);
|
|
2545
2644
|
},
|
|
2546
|
-
|
|
2645
|
+
We = {
|
|
2547
2646
|
local: {
|
|
2548
2647
|
type: 'json',
|
|
2549
2648
|
title: '本地json数据',
|
|
@@ -2561,20 +2660,20 @@
|
|
|
2561
2660
|
description: '用于设置获取元素数据的请求地址',
|
|
2562
2661
|
},
|
|
2563
2662
|
},
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
return i().createElement(
|
|
2567
|
-
},
|
|
2568
|
-
Ge = S.Tree.TreeNode,
|
|
2569
|
-
ze = function (e) {
|
|
2570
|
-
return i().createElement(Je, e);
|
|
2663
|
+
ze = S.Tree.TreeNode,
|
|
2664
|
+
Ge = function (e) {
|
|
2665
|
+
return i().createElement(Be, e);
|
|
2571
2666
|
},
|
|
2572
2667
|
Ue = S.Tree.TreeNode,
|
|
2573
2668
|
He = function (e) {
|
|
2574
|
-
return i().createElement(
|
|
2669
|
+
return i().createElement(Be, e);
|
|
2670
|
+
},
|
|
2671
|
+
Xe = S.Tree.TreeNode,
|
|
2672
|
+
Qe = function (e) {
|
|
2673
|
+
return i().createElement(Be, e);
|
|
2575
2674
|
},
|
|
2576
|
-
|
|
2577
|
-
|
|
2675
|
+
Ye = (n(617), S.Select.Option),
|
|
2676
|
+
Ze = (function (e) {
|
|
2578
2677
|
function t(t) {
|
|
2579
2678
|
var n;
|
|
2580
2679
|
return (
|
|
@@ -2660,7 +2759,7 @@
|
|
|
2660
2759
|
S.Select,
|
|
2661
2760
|
{ defaultValue: 'string', style: { width: 120 } },
|
|
2662
2761
|
r.createElement(
|
|
2663
|
-
|
|
2762
|
+
Ye,
|
|
2664
2763
|
{ key: 'string', value: 'string' },
|
|
2665
2764
|
'string',
|
|
2666
2765
|
),
|
|
@@ -2681,7 +2780,7 @@
|
|
|
2681
2780
|
r.createElement(
|
|
2682
2781
|
S.Tooltip,
|
|
2683
2782
|
{ title: '删除' },
|
|
2684
|
-
r.createElement(
|
|
2783
|
+
r.createElement(we.CloseOutlined, {
|
|
2685
2784
|
className: 'operate-btn delete-operate',
|
|
2686
2785
|
onClick: this.onDeleteBtnEvent,
|
|
2687
2786
|
}),
|
|
@@ -2689,7 +2788,7 @@
|
|
|
2689
2788
|
r.createElement(
|
|
2690
2789
|
S.Tooltip,
|
|
2691
2790
|
{ title: '新增可选项' },
|
|
2692
|
-
r.createElement(
|
|
2791
|
+
r.createElement(we.PlusOutlined, {
|
|
2693
2792
|
className: 'operate-btn',
|
|
2694
2793
|
onClick: this.onAddBtnEvent,
|
|
2695
2794
|
}),
|
|
@@ -2697,7 +2796,7 @@
|
|
|
2697
2796
|
r.createElement(
|
|
2698
2797
|
S.Tooltip,
|
|
2699
2798
|
{ title: '复制' },
|
|
2700
|
-
r.createElement(
|
|
2799
|
+
r.createElement(we.CopyOutlined, {
|
|
2701
2800
|
className: 'operate-btn',
|
|
2702
2801
|
onClick: this.onCopyBtnEvent,
|
|
2703
2802
|
}),
|
|
@@ -2709,25 +2808,25 @@
|
|
|
2709
2808
|
t
|
|
2710
2809
|
);
|
|
2711
2810
|
})(r.PureComponent);
|
|
2712
|
-
|
|
2811
|
+
Ze.propTypes = {
|
|
2713
2812
|
indexRoute: d().string,
|
|
2714
2813
|
optionIndex: d().any,
|
|
2715
2814
|
optionLabel: d().string,
|
|
2716
2815
|
optionValue: d().string,
|
|
2717
2816
|
optionNodeKey: d().string,
|
|
2718
2817
|
};
|
|
2719
|
-
var
|
|
2818
|
+
var $e = (0, l.inject)(function (e) {
|
|
2720
2819
|
return { schemaStore: e.schemaStore };
|
|
2721
|
-
})((0, l.observer)(
|
|
2722
|
-
Ze = S.Tree.TreeNode,
|
|
2723
|
-
$e = function (e) {
|
|
2724
|
-
return i().createElement(Ye, e);
|
|
2725
|
-
},
|
|
2820
|
+
})((0, l.observer)(Ze)),
|
|
2726
2821
|
et = S.Tree.TreeNode,
|
|
2727
2822
|
tt = function (e) {
|
|
2728
|
-
return i().createElement(
|
|
2823
|
+
return i().createElement($e, e);
|
|
2824
|
+
},
|
|
2825
|
+
nt = S.Tree.TreeNode,
|
|
2826
|
+
at = function (e) {
|
|
2827
|
+
return i().createElement(Be, e);
|
|
2729
2828
|
},
|
|
2730
|
-
|
|
2829
|
+
ot = function (e) {
|
|
2731
2830
|
switch (e.targetJsonSchema.type) {
|
|
2732
2831
|
case 'object':
|
|
2733
2832
|
case 'func':
|
|
@@ -2736,9 +2835,9 @@
|
|
|
2736
2835
|
case 'dynamic-config':
|
|
2737
2836
|
case 'sohu-source':
|
|
2738
2837
|
case 'sohu-event':
|
|
2739
|
-
return
|
|
2838
|
+
return st(e);
|
|
2740
2839
|
case 'array':
|
|
2741
|
-
return
|
|
2840
|
+
return Le(e);
|
|
2742
2841
|
case 'datasource':
|
|
2743
2842
|
return (function (e) {
|
|
2744
2843
|
var t,
|
|
@@ -2749,16 +2848,16 @@
|
|
|
2749
2848
|
s = r.type,
|
|
2750
2849
|
c = r.properties.data || {};
|
|
2751
2850
|
return i().createElement(
|
|
2752
|
-
|
|
2851
|
+
_e,
|
|
2753
2852
|
{
|
|
2754
2853
|
className: s + '-schema schema-item-form',
|
|
2755
2854
|
id: o,
|
|
2756
2855
|
key: o,
|
|
2757
2856
|
indexRoute: a,
|
|
2758
2857
|
jsonKey: n,
|
|
2759
|
-
title:
|
|
2858
|
+
title: Me(u()({}, e)),
|
|
2760
2859
|
},
|
|
2761
|
-
i().createElement(
|
|
2860
|
+
i().createElement(_e, {
|
|
2762
2861
|
className: 'dataSource-type-item-schema schema-item-form',
|
|
2763
2862
|
id: o + '-type',
|
|
2764
2863
|
key: o + '-type',
|
|
@@ -2772,18 +2871,18 @@
|
|
|
2772
2871
|
targetJsonSchema: r.properties.type,
|
|
2773
2872
|
parentType: s,
|
|
2774
2873
|
nodeKey: o + '-type',
|
|
2775
|
-
typeSelectData:
|
|
2874
|
+
typeSelectData: We,
|
|
2776
2875
|
}),
|
|
2777
|
-
i().createElement(
|
|
2876
|
+
i().createElement(Ae, t)),
|
|
2778
2877
|
}),
|
|
2779
|
-
i().createElement(
|
|
2878
|
+
i().createElement(_e, {
|
|
2780
2879
|
className: 'dataSource-data-item-schema schema-item-form',
|
|
2781
2880
|
id: o + '-data-' + c.type,
|
|
2782
2881
|
key: o + '-data-' + c.type,
|
|
2783
2882
|
indexRoute: a ? a + '-1' : '1',
|
|
2784
2883
|
jsonKey: 'data',
|
|
2785
2884
|
disabled: !0,
|
|
2786
|
-
title:
|
|
2885
|
+
title: Me({
|
|
2787
2886
|
indexRoute: a ? a + '-1' : '1',
|
|
2788
2887
|
jsonKey: 'data',
|
|
2789
2888
|
targetJsonSchema: c,
|
|
@@ -2794,7 +2893,7 @@
|
|
|
2794
2893
|
typeIsFixed: !0,
|
|
2795
2894
|
}),
|
|
2796
2895
|
}),
|
|
2797
|
-
i().createElement(
|
|
2896
|
+
i().createElement(_e, {
|
|
2798
2897
|
className:
|
|
2799
2898
|
'dataSource-filter-item-schema schema-item-form',
|
|
2800
2899
|
id: o + '-filter',
|
|
@@ -2802,7 +2901,7 @@
|
|
|
2802
2901
|
indexRoute: a ? a + '-2' : '2',
|
|
2803
2902
|
jsonKey: 'filter',
|
|
2804
2903
|
disabled: !0,
|
|
2805
|
-
title:
|
|
2904
|
+
title: Me({
|
|
2806
2905
|
indexRoute: a ? a + '-2' : '2',
|
|
2807
2906
|
jsonKey: 'filter',
|
|
2808
2907
|
targetJsonSchema: r.properties.filter,
|
|
@@ -2826,16 +2925,16 @@
|
|
|
2826
2925
|
c = r.properties.config || {},
|
|
2827
2926
|
l = r.properties.data || {};
|
|
2828
2927
|
return i().createElement(
|
|
2829
|
-
|
|
2928
|
+
ze,
|
|
2830
2929
|
{
|
|
2831
2930
|
className: s + '-schema schema-item-form',
|
|
2832
2931
|
id: o,
|
|
2833
2932
|
key: o,
|
|
2834
2933
|
indexRoute: a,
|
|
2835
2934
|
jsonKey: n,
|
|
2836
|
-
title:
|
|
2935
|
+
title: Ge(u()({}, e)),
|
|
2837
2936
|
},
|
|
2838
|
-
i().createElement(
|
|
2937
|
+
i().createElement(ze, {
|
|
2839
2938
|
className: 'dataSource-type-item-schema schema-item-form',
|
|
2840
2939
|
id: o + '-type',
|
|
2841
2940
|
key: o + '-type',
|
|
@@ -2850,9 +2949,9 @@
|
|
|
2850
2949
|
parentType: s,
|
|
2851
2950
|
nodeKey: o + '-type',
|
|
2852
2951
|
}),
|
|
2853
|
-
i().createElement(
|
|
2952
|
+
i().createElement(Ae, t)),
|
|
2854
2953
|
}),
|
|
2855
|
-
i().createElement(
|
|
2954
|
+
i().createElement(ze, {
|
|
2856
2955
|
className:
|
|
2857
2956
|
'dataSource-config-item-schema schema-item-form',
|
|
2858
2957
|
id: o + '-config-' + l.type,
|
|
@@ -2860,7 +2959,7 @@
|
|
|
2860
2959
|
indexRoute: a ? a + '-1' : '1',
|
|
2861
2960
|
jsonKey: 'config',
|
|
2862
2961
|
disabled: !0,
|
|
2863
|
-
title:
|
|
2962
|
+
title: Ge({
|
|
2864
2963
|
indexRoute: a ? a + '-1' : '1',
|
|
2865
2964
|
jsonKey: 'config',
|
|
2866
2965
|
targetJsonSchema: c,
|
|
@@ -2871,14 +2970,14 @@
|
|
|
2871
2970
|
typeIsFixed: !0,
|
|
2872
2971
|
}),
|
|
2873
2972
|
}),
|
|
2874
|
-
i().createElement(
|
|
2973
|
+
i().createElement(ze, {
|
|
2875
2974
|
className: 'dataSource-data-item-schema schema-item-form',
|
|
2876
2975
|
id: o + '-data-' + l.type,
|
|
2877
2976
|
key: o + '-data-' + l.type,
|
|
2878
2977
|
indexRoute: a ? a + '-2' : '2',
|
|
2879
2978
|
jsonKey: 'data',
|
|
2880
2979
|
disabled: !0,
|
|
2881
|
-
title:
|
|
2980
|
+
title: Ge({
|
|
2882
2981
|
indexRoute: a ? a + '-2' : '2',
|
|
2883
2982
|
jsonKey: 'data',
|
|
2884
2983
|
targetJsonSchema: l,
|
|
@@ -2903,18 +3002,18 @@
|
|
|
2903
3002
|
l = r.properties.register || {},
|
|
2904
3003
|
p = r.properties.actionFunc || {},
|
|
2905
3004
|
d = r.properties.trigger || {},
|
|
2906
|
-
|
|
3005
|
+
m = r.properties.eventData || {};
|
|
2907
3006
|
return i().createElement(
|
|
2908
|
-
|
|
3007
|
+
Ue,
|
|
2909
3008
|
{
|
|
2910
3009
|
className: s + '-schema schema-item-form',
|
|
2911
3010
|
id: o,
|
|
2912
3011
|
key: o,
|
|
2913
3012
|
indexRoute: a,
|
|
2914
3013
|
jsonKey: n,
|
|
2915
|
-
title:
|
|
3014
|
+
title: He(u()({}, e)),
|
|
2916
3015
|
},
|
|
2917
|
-
i().createElement(
|
|
3016
|
+
i().createElement(Ue, {
|
|
2918
3017
|
className: 'event-type-item-schema schema-item-form',
|
|
2919
3018
|
id: o + '-type',
|
|
2920
3019
|
key: o + '-type',
|
|
@@ -2929,11 +3028,11 @@
|
|
|
2929
3028
|
parentType: s,
|
|
2930
3029
|
nodeKey: o + '-type',
|
|
2931
3030
|
}),
|
|
2932
|
-
i().createElement(
|
|
3031
|
+
i().createElement(Ae, t)),
|
|
2933
3032
|
}),
|
|
2934
3033
|
'on' === c.default &&
|
|
2935
3034
|
l &&
|
|
2936
|
-
i().createElement(
|
|
3035
|
+
i().createElement(Ue, {
|
|
2937
3036
|
className:
|
|
2938
3037
|
'event-register-item-schema schema-item-form',
|
|
2939
3038
|
id: o + '-register-' + c.default,
|
|
@@ -2941,7 +3040,7 @@
|
|
|
2941
3040
|
indexRoute: a ? a + '-1' : '1',
|
|
2942
3041
|
jsonKey: 'register',
|
|
2943
3042
|
disabled: !0,
|
|
2944
|
-
title:
|
|
3043
|
+
title: He({
|
|
2945
3044
|
indexRoute: a ? a + '-1' : '1',
|
|
2946
3045
|
jsonKey: 'register',
|
|
2947
3046
|
targetJsonSchema: l,
|
|
@@ -2954,7 +3053,7 @@
|
|
|
2954
3053
|
}),
|
|
2955
3054
|
'on' === c.default &&
|
|
2956
3055
|
p &&
|
|
2957
|
-
i().createElement(
|
|
3056
|
+
i().createElement(Ue, {
|
|
2958
3057
|
className:
|
|
2959
3058
|
'event-actionFunc-item-schema schema-item-form',
|
|
2960
3059
|
id: o + '-actionFunc-' + c.default,
|
|
@@ -2962,7 +3061,7 @@
|
|
|
2962
3061
|
indexRoute: a ? a + '-2' : '2',
|
|
2963
3062
|
jsonKey: 'actionFunc',
|
|
2964
3063
|
disabled: !0,
|
|
2965
|
-
title:
|
|
3064
|
+
title: He({
|
|
2966
3065
|
indexRoute: a ? a + '-2' : '2',
|
|
2967
3066
|
jsonKey: 'actionFunc',
|
|
2968
3067
|
targetJsonSchema: p,
|
|
@@ -2975,14 +3074,14 @@
|
|
|
2975
3074
|
}),
|
|
2976
3075
|
'emit' === c.default &&
|
|
2977
3076
|
d &&
|
|
2978
|
-
i().createElement(
|
|
3077
|
+
i().createElement(Ue, {
|
|
2979
3078
|
className: 'event-trigger-item-schema schema-item-form',
|
|
2980
3079
|
id: o + '-trigger-' + c.default,
|
|
2981
3080
|
key: o + '-trigger-' + c.default,
|
|
2982
3081
|
indexRoute: a ? a + '-1' : '1',
|
|
2983
3082
|
jsonKey: 'trigger',
|
|
2984
3083
|
disabled: !0,
|
|
2985
|
-
title:
|
|
3084
|
+
title: He({
|
|
2986
3085
|
indexRoute: a ? a + '-1' : '1',
|
|
2987
3086
|
jsonKey: 'trigger',
|
|
2988
3087
|
targetJsonSchema: d,
|
|
@@ -2994,8 +3093,8 @@
|
|
|
2994
3093
|
}),
|
|
2995
3094
|
}),
|
|
2996
3095
|
'emit' === c.default &&
|
|
2997
|
-
|
|
2998
|
-
i().createElement(
|
|
3096
|
+
m &&
|
|
3097
|
+
i().createElement(Ue, {
|
|
2999
3098
|
className:
|
|
3000
3099
|
'event-eventData-item-schema schema-item-form',
|
|
3001
3100
|
id: o + '-eventData-' + c.default,
|
|
@@ -3003,10 +3102,10 @@
|
|
|
3003
3102
|
indexRoute: a ? a + '-2' : '2',
|
|
3004
3103
|
jsonKey: 'eventData',
|
|
3005
3104
|
disabled: !0,
|
|
3006
|
-
title:
|
|
3105
|
+
title: He({
|
|
3007
3106
|
indexRoute: a ? a + '-2' : '2',
|
|
3008
3107
|
jsonKey: 'eventData',
|
|
3009
|
-
targetJsonSchema:
|
|
3108
|
+
targetJsonSchema: m,
|
|
3010
3109
|
parentType: s,
|
|
3011
3110
|
nodeKey: o + '-eventData-' + c.default,
|
|
3012
3111
|
hideOperaBtn: !0,
|
|
@@ -3028,23 +3127,23 @@
|
|
|
3028
3127
|
c = r.propertyOrder[0],
|
|
3029
3128
|
l = r.properties[c];
|
|
3030
3129
|
return i().createElement(
|
|
3031
|
-
|
|
3130
|
+
Xe,
|
|
3032
3131
|
{
|
|
3033
3132
|
className: s + '-schema schema-item-form',
|
|
3034
3133
|
id: o,
|
|
3035
3134
|
key: o,
|
|
3036
3135
|
indexRoute: a,
|
|
3037
3136
|
jsonKey: n,
|
|
3038
|
-
title:
|
|
3137
|
+
title: Qe(u()({}, e)),
|
|
3039
3138
|
},
|
|
3040
|
-
i().createElement(
|
|
3139
|
+
i().createElement(Xe, {
|
|
3041
3140
|
className: 'quantity-unit-item-schema schema-item-form',
|
|
3042
3141
|
id: o + '-' + c,
|
|
3043
3142
|
key: o + '-' + c,
|
|
3044
3143
|
indexRoute: a ? a + '-0' : '0',
|
|
3045
3144
|
jsonKey: c,
|
|
3046
3145
|
disabled: !0,
|
|
3047
|
-
title:
|
|
3146
|
+
title: Qe({
|
|
3048
3147
|
indexRoute: a ? a + '-0' : '0',
|
|
3049
3148
|
jsonKey: c,
|
|
3050
3149
|
targetJsonSchema: l,
|
|
@@ -3055,7 +3154,7 @@
|
|
|
3055
3154
|
typeIsFixed: !0,
|
|
3056
3155
|
}),
|
|
3057
3156
|
}),
|
|
3058
|
-
i().createElement(
|
|
3157
|
+
i().createElement(Xe, {
|
|
3059
3158
|
className:
|
|
3060
3159
|
'quantity-typeSelect-item-schema schema-item-form',
|
|
3061
3160
|
id: o + '-quantity',
|
|
@@ -3071,7 +3170,7 @@
|
|
|
3071
3170
|
parentType: s,
|
|
3072
3171
|
nodeKey: o + '-quantity',
|
|
3073
3172
|
}),
|
|
3074
|
-
i().createElement(
|
|
3173
|
+
i().createElement(Ae, t)),
|
|
3075
3174
|
}),
|
|
3076
3175
|
);
|
|
3077
3176
|
})(e);
|
|
@@ -3088,14 +3187,14 @@
|
|
|
3088
3187
|
c = r.options,
|
|
3089
3188
|
l = a || '0';
|
|
3090
3189
|
return i().createElement(
|
|
3091
|
-
|
|
3190
|
+
et,
|
|
3092
3191
|
{
|
|
3093
3192
|
className: s + '-schema schema-item-form',
|
|
3094
3193
|
id: o,
|
|
3095
3194
|
key: o,
|
|
3096
3195
|
indexRoute: a,
|
|
3097
3196
|
jsonKey: n,
|
|
3098
|
-
title: ((t =
|
|
3197
|
+
title: ((t = u()({}, e)), i().createElement(Be, t)),
|
|
3099
3198
|
},
|
|
3100
3199
|
c &&
|
|
3101
3200
|
c.length > 0 &&
|
|
@@ -3103,13 +3202,13 @@
|
|
|
3103
3202
|
var n = e.label || e.name,
|
|
3104
3203
|
a = e.value,
|
|
3105
3204
|
r = '' + o + s + '-' + n;
|
|
3106
|
-
return i().createElement(
|
|
3205
|
+
return i().createElement(et, {
|
|
3107
3206
|
className: 'enum-item-schema schema-item-form',
|
|
3108
3207
|
id: r,
|
|
3109
3208
|
key: r,
|
|
3110
3209
|
indexRoute: l,
|
|
3111
3210
|
disabled: !0,
|
|
3112
|
-
title:
|
|
3211
|
+
title: tt({
|
|
3113
3212
|
indexRoute: l,
|
|
3114
3213
|
optionIndex: t,
|
|
3115
3214
|
optionLabel: n,
|
|
@@ -3126,22 +3225,22 @@
|
|
|
3126
3225
|
n = e.indexRoute,
|
|
3127
3226
|
a = e.nodeKey,
|
|
3128
3227
|
o = e.targetJsonSchema.type;
|
|
3129
|
-
return i().createElement(
|
|
3228
|
+
return i().createElement(nt, {
|
|
3130
3229
|
className: o + '-schema schema-item-form',
|
|
3131
3230
|
id: a,
|
|
3132
3231
|
key: a,
|
|
3133
3232
|
indexRoute: n,
|
|
3134
3233
|
jsonKey: t,
|
|
3135
|
-
title:
|
|
3234
|
+
title: at(e),
|
|
3136
3235
|
});
|
|
3137
3236
|
})(e);
|
|
3138
3237
|
}
|
|
3139
3238
|
},
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
return i().createElement(
|
|
3239
|
+
rt = S.Tree.TreeNode,
|
|
3240
|
+
it = function (e) {
|
|
3241
|
+
return i().createElement(Be, e);
|
|
3143
3242
|
},
|
|
3144
|
-
|
|
3243
|
+
st = function (e) {
|
|
3145
3244
|
var t,
|
|
3146
3245
|
n,
|
|
3147
3246
|
a,
|
|
@@ -3152,7 +3251,7 @@
|
|
|
3152
3251
|
l = e.nodeKey,
|
|
3153
3252
|
p = e.targetJsonSchema,
|
|
3154
3253
|
d = e.isOnlyShowChild,
|
|
3155
|
-
|
|
3254
|
+
m = p.type,
|
|
3156
3255
|
h = p.isFixed,
|
|
3157
3256
|
y =
|
|
3158
3257
|
((t = {
|
|
@@ -3160,7 +3259,7 @@
|
|
|
3160
3259
|
properties: p.properties,
|
|
3161
3260
|
parentIndexRoute: c,
|
|
3162
3261
|
parentNodeKey: l,
|
|
3163
|
-
parentType:
|
|
3262
|
+
parentType: m,
|
|
3164
3263
|
isOnlyShowChild: d,
|
|
3165
3264
|
}),
|
|
3166
3265
|
(n = t.properties),
|
|
@@ -3173,7 +3272,7 @@
|
|
|
3173
3272
|
c = n[s],
|
|
3174
3273
|
l = c.type,
|
|
3175
3274
|
p = (o ? o + '-' : '') + l + '-' + s;
|
|
3176
|
-
return
|
|
3275
|
+
return ot({
|
|
3177
3276
|
parentType: r,
|
|
3178
3277
|
jsonKey: s,
|
|
3179
3278
|
indexRoute: i,
|
|
@@ -3183,21 +3282,21 @@
|
|
|
3183
3282
|
});
|
|
3184
3283
|
})),
|
|
3185
3284
|
g = i().createElement(
|
|
3186
|
-
|
|
3285
|
+
rt,
|
|
3187
3286
|
{
|
|
3188
|
-
className:
|
|
3287
|
+
className: m + '-schema schema-item-form',
|
|
3189
3288
|
id: l,
|
|
3190
3289
|
key: l,
|
|
3191
3290
|
indexRoute: c,
|
|
3192
3291
|
jsonKey: s,
|
|
3193
3292
|
disabled: h,
|
|
3194
|
-
title:
|
|
3293
|
+
title: it(u()({}, e)),
|
|
3195
3294
|
},
|
|
3196
3295
|
y,
|
|
3197
3296
|
);
|
|
3198
3297
|
return d ? y : g;
|
|
3199
3298
|
},
|
|
3200
|
-
|
|
3299
|
+
ct =
|
|
3201
3300
|
(n(23),
|
|
3202
3301
|
(function (e) {
|
|
3203
3302
|
function t(t) {
|
|
@@ -3218,9 +3317,9 @@
|
|
|
3218
3317
|
l = o.isExitJsonKey,
|
|
3219
3318
|
p = o.isSupportCurType,
|
|
3220
3319
|
d = t.indexRoute,
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
if (!
|
|
3320
|
+
m = t.jsonKey,
|
|
3321
|
+
u = r(d);
|
|
3322
|
+
if (!u.isFixed) {
|
|
3224
3323
|
var h = a.indexRoute,
|
|
3225
3324
|
y = (0, Oe.isSameParent)(d, h),
|
|
3226
3325
|
g = (0, Oe.getCurPosition)(d, h);
|
|
@@ -3228,14 +3327,14 @@
|
|
|
3228
3327
|
c(d, !0),
|
|
3229
3328
|
'before' === g && (h = (0, Oe.moveForward)(h)),
|
|
3230
3329
|
a.dragOverGapTop
|
|
3231
|
-
? s(h,
|
|
3232
|
-
: (a.dragOver || a.dragOverGapBottom) && s(h,
|
|
3330
|
+
? s(h, m, u, 'before')
|
|
3331
|
+
: (a.dragOver || a.dragOverGapBottom) && s(h, m, u);
|
|
3233
3332
|
else {
|
|
3234
|
-
if (l(h,
|
|
3333
|
+
if (l(h, m))
|
|
3235
3334
|
return void S.message.warning(
|
|
3236
3335
|
'目标位置中有重名的元素',
|
|
3237
3336
|
);
|
|
3238
|
-
var f =
|
|
3337
|
+
var f = u.type;
|
|
3239
3338
|
if (!p(h, f))
|
|
3240
3339
|
return void S.message.warning(
|
|
3241
3340
|
'目标位置不支持' + f + '类型元素',
|
|
@@ -3246,15 +3345,15 @@
|
|
|
3246
3345
|
if (window.sessionStorage)
|
|
3247
3346
|
return window.sessionStorage.getItem(e);
|
|
3248
3347
|
})(v + '-' + f);
|
|
3249
|
-
C(i(x) + '-' +
|
|
3348
|
+
C(i(x) + '-' + m + '-' + f, b || v),
|
|
3250
3349
|
a.dragOverGapTop
|
|
3251
3350
|
? 'after' === g
|
|
3252
|
-
? (c(d, !0), s(h,
|
|
3253
|
-
: (s(h,
|
|
3351
|
+
? (c(d, !0), s(h, m, u, 'before'))
|
|
3352
|
+
: (s(h, m, u, 'before', !0), c(d))
|
|
3254
3353
|
: (a.dragOver || a.dragOverGapBottom) &&
|
|
3255
3354
|
('after' === g
|
|
3256
|
-
? (c(d, !0), s(h,
|
|
3257
|
-
: (s(h,
|
|
3355
|
+
? (c(d, !0), s(h, m, u))
|
|
3356
|
+
: (s(h, m, u, '', !0), c(d)));
|
|
3258
3357
|
}
|
|
3259
3358
|
}
|
|
3260
3359
|
}),
|
|
@@ -3319,7 +3418,7 @@
|
|
|
3319
3418
|
: this.catchExpandedKeys(e),
|
|
3320
3419
|
},
|
|
3321
3420
|
'object' === n &&
|
|
3322
|
-
|
|
3421
|
+
st({
|
|
3323
3422
|
parentType: '',
|
|
3324
3423
|
jsonKey: '',
|
|
3325
3424
|
indexRoute: '',
|
|
@@ -3328,7 +3427,7 @@
|
|
|
3328
3427
|
isOnlyShowChild: !0,
|
|
3329
3428
|
}),
|
|
3330
3429
|
'object' !== n &&
|
|
3331
|
-
|
|
3430
|
+
ot({
|
|
3332
3431
|
parentType: '',
|
|
3333
3432
|
jsonKey: '',
|
|
3334
3433
|
indexRoute: '',
|
|
@@ -3350,20 +3449,20 @@
|
|
|
3350
3449
|
t
|
|
3351
3450
|
);
|
|
3352
3451
|
})(r.PureComponent));
|
|
3353
|
-
|
|
3452
|
+
ct.propTypes = {
|
|
3354
3453
|
onChange: d().func,
|
|
3355
3454
|
data: d().object,
|
|
3356
3455
|
typeList: d().object,
|
|
3357
3456
|
};
|
|
3358
|
-
var
|
|
3457
|
+
var lt = (0, l.inject)(function (e) {
|
|
3359
3458
|
return { schemaStore: e.schemaStore };
|
|
3360
|
-
})((0, l.observer)(
|
|
3361
|
-
|
|
3459
|
+
})((0, l.observer)(ct)),
|
|
3460
|
+
pt = (function (e) {
|
|
3362
3461
|
function t(t) {
|
|
3363
3462
|
var n;
|
|
3364
3463
|
return (
|
|
3365
3464
|
((n = e.call(this, t) || this).state = {
|
|
3366
|
-
schemaStore: new
|
|
3465
|
+
schemaStore: new je.schemaStore(),
|
|
3367
3466
|
}),
|
|
3368
3467
|
n
|
|
3369
3468
|
);
|
|
@@ -3381,7 +3480,7 @@
|
|
|
3381
3480
|
p = r.createElement(
|
|
3382
3481
|
l.Provider,
|
|
3383
3482
|
{ schemaStore: s },
|
|
3384
|
-
r.createElement(
|
|
3483
|
+
r.createElement(lt, {
|
|
3385
3484
|
data: t,
|
|
3386
3485
|
typeList: n,
|
|
3387
3486
|
onChange: a,
|
|
@@ -3393,7 +3492,7 @@
|
|
|
3393
3492
|
t
|
|
3394
3493
|
);
|
|
3395
3494
|
})(r.PureComponent);
|
|
3396
|
-
|
|
3495
|
+
pt.propTypes = {
|
|
3397
3496
|
wideScreen: d().any,
|
|
3398
3497
|
onChange: d().func,
|
|
3399
3498
|
data: d().any,
|