@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.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 o = n(264);
21
- o.__esModule && (o = o.default),
22
- 'string' == typeof o && (o = [[e.id, o, '']]),
23
- o.locals && (e.exports = o.locals),
24
- (0, n(611).A)('b8de86ae', o, !1, { sourceMap: !1 });
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 o = n(286);
28
- o.__esModule && (o = o.default),
29
- 'string' == typeof o && (o = [[e.id, o, '']]),
30
- o.locals && (e.exports = o.locals),
31
- (0, n(611).A)('5e9c0933', o, !1, { sourceMap: !1 });
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 o = n(382);
42
- o.__esModule && (o = o.default),
43
- 'string' == typeof o && (o = [[e.id, o, '']]),
44
- o.locals && (e.exports = o.locals),
45
- (0, n(611).A)('adbe60da', o, !1, { sourceMap: !1 });
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 o = n(80);
49
- o.__esModule && (o = o.default),
50
- 'string' == typeof o && (o = [[e.id, o, '']]),
51
- o.locals && (e.exports = o.locals),
52
- (0, n(611).A)('9c82b91a', o, !1, { sourceMap: !1 });
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 o = n(707);
56
- o.__esModule && (o = o.default),
57
- 'string' == typeof o && (o = [[e.id, o, '']]),
58
- o.locals && (e.exports = o.locals),
59
- (0, n(611).A)('2b121068', o, !1, { sourceMap: !1 });
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 o(e, t) {
64
- for (var n = [], o = {}, a = 0; a < t.length; a++) {
65
- var r = t[a],
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 + ':' + a,
60
+ id: e + ':' + o,
69
61
  css: r[1],
70
62
  media: r[2],
71
63
  sourceMap: r[3],
72
64
  };
73
- o[i]
74
- ? o[i].parts.push(s)
75
- : n.push((o[i] = { id: i, parts: [s] }));
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 a = 'undefined' != typeof document;
85
- if ('undefined' != typeof DEBUG && DEBUG && !a)
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
- a && (document.head || document.getElementsByTagName('head')[0]),
83
+ o && (document.head || document.getElementsByTagName('head')[0]),
92
84
  s = null,
93
85
  c = 0,
94
86
  l = !1,
95
- d = function () {},
96
- p = null,
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, a) {
102
- (l = n), (p = a || {});
103
- var i = o(e, t);
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 = [], a = 0; a < i.length; a++) {
108
- var s = i[a];
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 = o(e, t))) : (i = []), a = 0;
113
- a < n.length;
114
- a++
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[a]).refs) {
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
- o = r[n.id];
129
- if (o) {
130
- o.refs++;
131
- for (var a = 0; a < o.parts.length; a++) o.parts[a](n.parts[a]);
132
- for (; a < n.parts.length; a++) o.parts.push(f(n.parts[a]));
133
- o.parts.length > n.parts.length &&
134
- (o.parts.length = n.parts.length);
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 (a = 0; a < n.parts.length; a++) i.push(f(n.parts[a]));
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
- o = document.querySelector('style[' + u + '~="' + e.id + '"]');
150
- if (o) {
151
- if (l) return d;
152
- o.parentNode.removeChild(o);
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 a = c++;
156
- (o = s || (s = g())),
157
- (t = x.bind(null, o, a, !1)),
158
- (n = x.bind(null, o, a, !0));
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
- (o = g()),
161
- (t = b.bind(null, o)),
152
+ (a = g()),
153
+ (t = S.bind(null, a)),
162
154
  (n = function () {
163
- o.parentNode.removeChild(o);
155
+ a.parentNode.removeChild(a);
164
156
  });
165
157
  return (
166
158
  t(e),
167
- function (o) {
168
- if (o) {
159
+ function (a) {
160
+ if (a) {
169
161
  if (
170
- o.css === e.css &&
171
- o.media === e.media &&
172
- o.sourceMap === e.sourceMap
162
+ a.css === e.css &&
163
+ a.media === e.media &&
164
+ a.sourceMap === e.sourceMap
173
165
  )
174
166
  return;
175
- t((e = o));
167
+ t((e = a));
176
168
  } else n();
177
169
  }
178
170
  );
179
171
  }
180
- var S,
181
- v =
182
- ((S = []),
172
+ var v,
173
+ x =
174
+ ((v = []),
183
175
  function (e, t) {
184
- return (S[e] = t), S.filter(Boolean).join('\n');
176
+ return (v[e] = t), v.filter(Boolean).join('\n');
185
177
  });
186
- function x(e, t, n, o) {
187
- var a = n ? '' : o.css;
188
- if (e.styleSheet) e.styleSheet.cssText = v(t, a);
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(a),
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 b(e, t) {
188
+ function S(e, t) {
197
189
  var n = t.css,
198
- o = t.media,
199
- a = t.sourceMap;
190
+ a = t.media,
191
+ o = t.sourceMap;
200
192
  if (
201
- (o && e.setAttribute('media', o),
202
- p.ssrId && e.setAttribute(u, t.id),
203
- a &&
204
- ((n += '\n/*# sourceURL=' + a.sources[0] + ' */'),
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(a)))) +
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(o) {
221
- var a = t[o];
222
- if (void 0 !== a) return a.exports;
223
- var r = (t[o] = { id: o, exports: {} });
224
- return e[o](r, r.exports, n), r.exports;
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 o in t)
239
- n.o(t, o) &&
240
- !n.o(e, o) &&
241
- Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
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 o = {};
244
+ var a = {};
253
245
  return (
254
246
  (function () {
255
247
  'use strict';
256
- n.r(o),
257
- n.d(o, {
248
+ n.r(a),
249
+ n.d(a, {
258
250
  default: function () {
259
- return ft;
251
+ return ct;
260
252
  },
261
253
  });
262
254
  var e,
263
255
  t = require('@babel/runtime/helpers/inheritsLoose'),
264
- a = n.n(t),
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
- d = require('prop-types'),
271
- p = n.n(d),
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
- S = require('@babel/runtime/helpers/applyDecoratedDescriptor'),
279
- v = n.n(S),
280
- x =
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
- b = require('antd');
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 C(e, t) {
280
+ function O(e, t) {
289
281
  return JSON.stringify(e) === JSON.stringify(t);
290
282
  }
291
- function j(e, t) {
283
+ function C(e, t) {
292
284
  window.sessionStorage && window.sessionStorage.setItem(e, t);
293
285
  }
294
- var O,
295
- R,
286
+ var j,
296
287
  N,
297
288
  I,
298
- k,
299
289
  w,
290
+ R,
300
291
  K,
301
- P,
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
- Ce = ['object'].concat([
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
- je = [
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(Ce),
376
- Oe = [].concat(Ee, je),
377
- Re = ['string'],
378
- Ne =
363
+ ].concat(ve),
364
+ be = [].concat(fe, xe),
365
+ Se = ['string'],
366
+ Ee =
379
367
  (((e = {
380
- object: Oe,
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: Re,
392
- select: Re,
380
+ radio: Se,
381
+ select: Se,
393
382
  }).select = ['string']),
394
- (e.all = Oe),
383
+ (e.all = be),
395
384
  e),
396
- Ie = require('@wibetter/json-utils'),
397
- ke = Ie.TypeDataList.jsonschema,
398
- we = Ie.TypeDataList.input,
399
- Ke = {
400
- jsonSchemaStore:
401
- ((O = x.action.bound),
402
- (R = x.action.bound),
403
- (N = x.action.bound),
404
- (I = x.action.bound),
405
- (k = x.action.bound),
406
- (w = x.action.bound),
407
- (K = x.action.bound),
408
- (P = x.action.bound),
409
- (J = x.action.bound),
410
- (D = x.action.bound),
411
- (T = x.action.bound),
412
- (B = x.action.bound),
413
- (V = x.action.bound),
414
- (L = x.action.bound),
415
- (F = x.action.bound),
416
- (q = x.action.bound),
417
- (A = x.action.bound),
418
- (_ = x.action.bound),
419
- (M = x.action.bound),
420
- (H = x.action.bound),
421
- (z = x.action.bound),
422
- (G = x.action.bound),
423
- (W = x.action.bound),
424
- (U = x.action.bound),
425
- (Q = x.action.bound),
426
- (X = x.action.bound),
427
- (Y = x.action.bound),
428
- (Z = x.action.bound),
429
- ($ = x.action.bound),
430
- (ee = x.action.bound),
431
- (te = x.action.bound),
432
- (ne = x.action.bound),
433
- (oe = x.action.bound),
434
- (ae = x.action.bound),
435
- (re = x.action.bound),
436
- (ie = x.action.bound),
437
- (se = x.action.bound),
438
- (ce = x.action.bound),
439
- (le = x.action.bound),
440
- (de = x.action.bound),
441
- (pe = x.action.bound),
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', fe, this),
450
- y()(this, 'jsonSchema', Se, this),
451
- y()(this, 'SchemaTypeList', ve, this),
452
- y()(this, 'onChange', xe, this),
453
- y()(this, 'childElemSort', be, this);
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
- (C(e, this.SchemaTypeList) ||
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 (!C(e, this.JSONSchemaObj))
473
- if (e && (0, Ie.isNewSchemaData)(e))
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, Ie.oldSchemaToNewSchema)(e);
460
+ var t = (0, Oe.oldSchemaToNewSchema)(e);
477
461
  this.jsonSchema = t;
478
462
  }
479
- } else this.jsonSchema = E(ke);
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, Ie.indexRoute2keyRoute)(e, this.jsonSchema);
481
+ return (0, Oe.indexRoute2keyRoute)(e, this.jsonSchema);
498
482
  }),
499
483
  (t.keyRoute2indexRoute = function (e) {
500
- return (0, Ie.keyRoute2indexRoute)(e, this.jsonSchema);
484
+ return (0, Oe.keyRoute2indexRoute)(e, this.jsonSchema);
501
485
  }),
502
486
  (t.getSchemaByIndexRoute = function (e) {
503
- return (0, Ie.getSchemaByIndexRoute)(
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, Ie.getSchemaByKeyRoute)(e, this.jsonSchema, !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, Ie.getParentIndexRoute)(e),
524
- o = this.getSchemaByIndexRoute(n);
507
+ var n = (0, Oe.getParentIndexRoute)(e),
508
+ a = this.getSchemaByIndexRoute(n);
525
509
  return (
526
- !!(o.propertyOrder && o.propertyOrder.indexOf(t) >= 0) ||
527
- (Ie.KeyWordList &&
528
- Ie.KeyWordList.indexOf(t) >= 0 &&
529
- b.message.warning(
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
- b.message.warning(
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, Ie.getParentIndexRoute)(e),
544
- o = this.getSchemaByIndexRoute(n),
545
- a = this.SchemaTypeList[o.type];
546
- return !!(a && a.indexOf(t) >= 0);
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, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
550
- if ((0, Ie.isContainerSchema)(n)) {
551
- var o = this.getNewJsonKeyIndex(n);
552
- n.propertyOrder.push(o),
553
- (n.properties[o] = we),
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 b.message.warning('非对象类型字段不允许插入子元素');
539
+ } else S.message.warning('非对象类型字段不允许插入子元素');
556
540
  }),
557
- (t.changeType = function (e, t, n, o) {
558
- var a = (0, Ie.getParentIndexRoute)(e),
559
- r = (0, Ie.getSchemaByIndexRoute)(a, this.jsonSchema);
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(o);
547
+ this.jsonSchemaChange(a);
564
548
  }),
565
549
  (t.updateSchemaData = function (e, t, n) {
566
- var o = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
567
- Object.assign(o, E(t)), this.jsonSchemaChange(n);
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, o) {
570
- var a = (0, Ie.getParentIndexRoute)(e),
571
- r = (0, Ie.getSchemaByIndexRoute)(a, this.jsonSchema);
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(o);
557
+ this.jsonSchemaChange(a);
574
558
  }),
575
559
  (t.editJsonKey = function (e, t, n) {
576
- var o = (0, Ie.getSchemaByIndexRoute)(
560
+ var a = (0, Oe.getSchemaByIndexRoute)(
577
561
  e,
578
562
  this.jsonSchema,
579
563
  !0,
580
564
  );
581
- this.insertJsonData(e, t, o, '', !0),
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, Ie.getParentIndexRoute)(e),
587
- n = (0, Ie.getSchemaByIndexRoute)(t, this.jsonSchema),
588
- o = this.getNewJsonKeyIndex(n);
589
- this.insertJsonData(e, o, we);
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, o, a) {
592
- var r = (0, Ie.getParentIndexRoute_CurIndex)(e),
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, Ie.getSchemaByIndexRoute)(i, this.jsonSchema);
579
+ c = (0, Oe.getSchemaByIndexRoute)(i, this.jsonSchema);
596
580
  c.properties[t] = n;
597
581
  var l = c.propertyOrder,
598
- d = 'before' === o ? Number(s) : Number(s) + 1,
599
- p = l.slice(0, d),
600
- u = l.slice(d);
601
- (c.propertyOrder = [].concat(p, [t], u)),
602
- this.jsonSchemaChange(a);
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 o = (0, Ie.getParentIndexRoute)(e),
606
- a = (0, Ie.getSchemaByIndexRoute)(o, this.jsonSchema);
607
- delete a.properties[t];
608
- var r = a.propertyOrder.indexOf(t);
609
- a.propertyOrder.splice(r, 1), this.jsonSchemaChange(n);
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, Ie.getParentIndexRoute_CurIndex)(e),
613
- o = n[0],
614
- a = n[1],
615
- r = (0, Ie.getSchemaByIndexRoute)(o, this.jsonSchema),
616
- i = r.propertyOrder[a];
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, o, a) {
622
- var r = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
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] = o)),
626
- this.jsonSchemaChange(a);
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 o = !1,
630
- a = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
631
- if (a.enum) {
632
- var r = E(a.enum);
633
- t >= 0 && r.splice(t, 1), r.indexOf(n) >= 0 && (o = !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
- Ie.KeyWordList &&
637
- Ie.KeyWordList.indexOf(n) >= 0 &&
638
- b.message.warning(
620
+ Oe.KeyWordList &&
621
+ Oe.KeyWordList.indexOf(n) >= 0 &&
622
+ S.message.warning(
639
623
  n +
640
624
  '是JSONSchema的关键字,建议您换一个,避免后续出现数据异常。',
641
625
  ),
642
- o
626
+ a
643
627
  );
644
628
  }),
645
- (t.updateEnumKey = function (e, t, n, o) {
646
- var a = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
647
- a.enum && (a.enum[t] = n), this.jsonSchemaChange(o);
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, o) {
650
- var a = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
651
- a.enumextra && (a.enumextra[t] = n),
652
- this.jsonSchemaChange(o);
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 o = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
656
- o.enum &&
657
- o.enumextra &&
658
- (o.enum.splice(t, 1), o.enumextra.splice(t, 1)),
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, o, a, r) {
662
- var i = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
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' === a ? Number(t) : Number(t) + 1,
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 d = i.enumextra.slice(0, s),
669
- p = i.enumextra.slice(s);
670
- i.enumextra = [].concat(d, [o], p);
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, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
669
+ var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
686
670
  if (n.enum) {
687
- var o = this.getNewEnumIndex(n.enum),
688
- a = '选项' + (this.curJsonKeyIndex - 1);
689
- this.insertEnumItem(e, t, o, a);
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, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
677
+ var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
694
678
  if (n.enum) {
695
- var o = n.enum[t],
696
- a = n.enumextra[t],
697
- r = this.getNewEnumIndex(n.enum, o),
698
- i = a + '_' + (this.curJsonKeyIndex - 1);
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, o, a) {
703
- var r = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
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 = o)),
707
- this.jsonSchemaChange(a);
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
- o = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
695
+ a = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
712
696
  return (
713
- o.options &&
714
- o.options.find(function (e) {
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
- Ie.KeyWordList &&
719
- Ie.KeyWordList.indexOf(t) >= 0 &&
720
- b.message.warning(
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, o) {
727
- var a = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
728
- a.options && a.options[t] && (a.options[t].label = n),
729
- this.jsonSchemaChange(o);
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, o) {
732
- var a = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
733
- a.options && a.options[t] && (a.options[t].value = n),
734
- this.jsonSchemaChange(o);
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 o = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
738
- o.options && o.options[t] && o.options.splice(t, 1),
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, o, a, r) {
742
- var i = (0, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
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' === a ? Number(t) : Number(t) + 1,
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
- d = { label: n, value: o };
748
- i.options = [].concat(c, [d], l);
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, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
742
+ var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
759
743
  if (n.options) {
760
- var o = this.getNewOptionValue(n.options),
761
- a = '选项' + (n.options.length + 1);
762
- this.insertOption(e, t, a, o);
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, Ie.getSchemaByIndexRoute)(e, this.jsonSchema);
750
+ var n = (0, Oe.getSchemaByIndexRoute)(e, this.jsonSchema);
767
751
  if (n.options) {
768
752
  n.options[t];
769
- var o = this.getNewOptionValue(n.options),
770
- a = (label, name + '_copy');
771
- this.insertOption(e, t, a, o);
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, x.toJS)(this.jsonSchema);
762
+ return (0, b.toJS)(this.jsonSchema);
818
763
  },
819
764
  },
820
765
  ])
821
766
  );
822
767
  })()),
823
- (fe = v()(ge.prototype, 'triggerChange', [x.observable], {
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
- (Se = v()(ge.prototype, 'jsonSchema', [x.observable], {
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
- (ve = v()(ge.prototype, 'SchemaTypeList', [x.observable], {
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 Ne;
789
+ return Ee;
845
790
  },
846
791
  })),
847
- (xe = v()(ge.prototype, 'onChange', [x.observable], {
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
- v()(
856
- ge.prototype,
800
+ x()(
801
+ de.prototype,
857
802
  'triggerChangeAction',
858
- [O],
803
+ [j],
859
804
  Object.getOwnPropertyDescriptor(
860
- ge.prototype,
805
+ de.prototype,
861
806
  'triggerChangeAction',
862
807
  ),
863
- ge.prototype,
808
+ de.prototype,
864
809
  ),
865
- v()(
866
- ge.prototype,
810
+ x()(
811
+ de.prototype,
867
812
  'initSchemaTypeList',
868
- [R],
813
+ [N],
869
814
  Object.getOwnPropertyDescriptor(
870
- ge.prototype,
815
+ de.prototype,
871
816
  'initSchemaTypeList',
872
817
  ),
873
- ge.prototype,
818
+ de.prototype,
874
819
  ),
875
- v()(
876
- ge.prototype,
820
+ x()(
821
+ de.prototype,
877
822
  'initJSONSchemaData',
878
- [N],
823
+ [I],
879
824
  Object.getOwnPropertyDescriptor(
880
- ge.prototype,
825
+ de.prototype,
881
826
  'initJSONSchemaData',
882
827
  ),
883
- ge.prototype,
828
+ de.prototype,
884
829
  ),
885
- v()(
886
- ge.prototype,
830
+ x()(
831
+ de.prototype,
887
832
  'JSONSchemaObj',
888
- [x.computed],
889
- Object.getOwnPropertyDescriptor(ge.prototype, 'JSONSchemaObj'),
890
- ge.prototype,
833
+ [b.computed],
834
+ Object.getOwnPropertyDescriptor(de.prototype, 'JSONSchemaObj'),
835
+ de.prototype,
891
836
  ),
892
- v()(
893
- ge.prototype,
837
+ x()(
838
+ de.prototype,
894
839
  'initOnChange',
895
- [I],
896
- Object.getOwnPropertyDescriptor(ge.prototype, 'initOnChange'),
897
- ge.prototype,
840
+ [w],
841
+ Object.getOwnPropertyDescriptor(de.prototype, 'initOnChange'),
842
+ de.prototype,
898
843
  ),
899
- v()(
900
- ge.prototype,
844
+ x()(
845
+ de.prototype,
901
846
  'jsonSchemaChange',
902
- [k],
847
+ [R],
903
848
  Object.getOwnPropertyDescriptor(
904
- ge.prototype,
849
+ de.prototype,
905
850
  'jsonSchemaChange',
906
851
  ),
907
- ge.prototype,
852
+ de.prototype,
908
853
  ),
909
- v()(
910
- ge.prototype,
854
+ x()(
855
+ de.prototype,
911
856
  'indexRoute2keyRoute',
912
- [w],
857
+ [K],
913
858
  Object.getOwnPropertyDescriptor(
914
- ge.prototype,
859
+ de.prototype,
915
860
  'indexRoute2keyRoute',
916
861
  ),
917
- ge.prototype,
862
+ de.prototype,
918
863
  ),
919
- v()(
920
- ge.prototype,
864
+ x()(
865
+ de.prototype,
921
866
  'keyRoute2indexRoute',
922
- [K],
867
+ [k],
923
868
  Object.getOwnPropertyDescriptor(
924
- ge.prototype,
869
+ de.prototype,
925
870
  'keyRoute2indexRoute',
926
871
  ),
927
- ge.prototype,
872
+ de.prototype,
928
873
  ),
929
- v()(
930
- ge.prototype,
874
+ x()(
875
+ de.prototype,
931
876
  'getSchemaByIndexRoute',
932
- [P],
877
+ [T],
933
878
  Object.getOwnPropertyDescriptor(
934
- ge.prototype,
879
+ de.prototype,
935
880
  'getSchemaByIndexRoute',
936
881
  ),
937
- ge.prototype,
882
+ de.prototype,
938
883
  ),
939
- v()(
940
- ge.prototype,
884
+ x()(
885
+ de.prototype,
941
886
  'getSchemaByKeyRoute',
942
887
  [J],
943
888
  Object.getOwnPropertyDescriptor(
944
- ge.prototype,
889
+ de.prototype,
945
890
  'getSchemaByKeyRoute',
946
891
  ),
947
- ge.prototype,
892
+ de.prototype,
948
893
  ),
949
- v()(
950
- ge.prototype,
894
+ x()(
895
+ de.prototype,
951
896
  'getNewJsonKeyIndex',
952
897
  [D],
953
898
  Object.getOwnPropertyDescriptor(
954
- ge.prototype,
899
+ de.prototype,
955
900
  'getNewJsonKeyIndex',
956
901
  ),
957
- ge.prototype,
902
+ de.prototype,
958
903
  ),
959
- v()(
960
- ge.prototype,
904
+ x()(
905
+ de.prototype,
961
906
  'isExitJsonKey',
962
- [T],
963
- Object.getOwnPropertyDescriptor(ge.prototype, 'isExitJsonKey'),
964
- ge.prototype,
907
+ [B],
908
+ Object.getOwnPropertyDescriptor(de.prototype, 'isExitJsonKey'),
909
+ de.prototype,
965
910
  ),
966
- v()(
967
- ge.prototype,
911
+ x()(
912
+ de.prototype,
968
913
  'isSupportCurType',
969
- [B],
914
+ [P],
970
915
  Object.getOwnPropertyDescriptor(
971
- ge.prototype,
916
+ de.prototype,
972
917
  'isSupportCurType',
973
918
  ),
974
- ge.prototype,
919
+ de.prototype,
975
920
  ),
976
- v()(
977
- ge.prototype,
921
+ x()(
922
+ de.prototype,
978
923
  'addChildJson',
979
924
  [V],
980
- Object.getOwnPropertyDescriptor(ge.prototype, 'addChildJson'),
981
- ge.prototype,
925
+ Object.getOwnPropertyDescriptor(de.prototype, 'addChildJson'),
926
+ de.prototype,
982
927
  ),
983
- v()(
984
- ge.prototype,
928
+ x()(
929
+ de.prototype,
985
930
  'changeType',
986
931
  [L],
987
- Object.getOwnPropertyDescriptor(ge.prototype, 'changeType'),
988
- ge.prototype,
932
+ Object.getOwnPropertyDescriptor(de.prototype, 'changeType'),
933
+ de.prototype,
989
934
  ),
990
- v()(
991
- ge.prototype,
935
+ x()(
936
+ de.prototype,
992
937
  'updateSchemaData',
993
938
  [F],
994
939
  Object.getOwnPropertyDescriptor(
995
- ge.prototype,
940
+ de.prototype,
996
941
  'updateSchemaData',
997
942
  ),
998
- ge.prototype,
943
+ de.prototype,
999
944
  ),
1000
- v()(
1001
- ge.prototype,
945
+ x()(
946
+ de.prototype,
1002
947
  'editSchemaData',
1003
948
  [q],
1004
- Object.getOwnPropertyDescriptor(ge.prototype, 'editSchemaData'),
1005
- ge.prototype,
949
+ Object.getOwnPropertyDescriptor(de.prototype, 'editSchemaData'),
950
+ de.prototype,
1006
951
  ),
1007
- v()(
1008
- ge.prototype,
952
+ x()(
953
+ de.prototype,
1009
954
  'editJsonKey',
1010
955
  [A],
1011
- Object.getOwnPropertyDescriptor(ge.prototype, 'editJsonKey'),
1012
- ge.prototype,
956
+ Object.getOwnPropertyDescriptor(de.prototype, 'editJsonKey'),
957
+ de.prototype,
1013
958
  ),
1014
- v()(
1015
- ge.prototype,
959
+ x()(
960
+ de.prototype,
1016
961
  'addNextJsonData',
1017
962
  [_],
1018
963
  Object.getOwnPropertyDescriptor(
1019
- ge.prototype,
964
+ de.prototype,
1020
965
  'addNextJsonData',
1021
966
  ),
1022
- ge.prototype,
967
+ de.prototype,
1023
968
  ),
1024
- v()(
1025
- ge.prototype,
969
+ x()(
970
+ de.prototype,
1026
971
  'insertJsonData',
1027
972
  [M],
1028
- Object.getOwnPropertyDescriptor(ge.prototype, 'insertJsonData'),
1029
- ge.prototype,
973
+ Object.getOwnPropertyDescriptor(de.prototype, 'insertJsonData'),
974
+ de.prototype,
1030
975
  ),
1031
- v()(
1032
- ge.prototype,
976
+ x()(
977
+ de.prototype,
1033
978
  'deleteJsonByIndex_CurKey',
1034
- [H],
979
+ [W],
1035
980
  Object.getOwnPropertyDescriptor(
1036
- ge.prototype,
981
+ de.prototype,
1037
982
  'deleteJsonByIndex_CurKey',
1038
983
  ),
1039
- ge.prototype,
984
+ de.prototype,
1040
985
  ),
1041
- v()(
1042
- ge.prototype,
986
+ x()(
987
+ de.prototype,
1043
988
  'deleteJsonByIndex',
1044
- [z],
989
+ [G],
1045
990
  Object.getOwnPropertyDescriptor(
1046
- ge.prototype,
991
+ de.prototype,
1047
992
  'deleteJsonByIndex',
1048
993
  ),
1049
- ge.prototype,
994
+ de.prototype,
1050
995
  ),
1051
- v()(
1052
- ge.prototype,
996
+ x()(
997
+ de.prototype,
1053
998
  'updateEnumItem',
1054
- [G],
1055
- Object.getOwnPropertyDescriptor(ge.prototype, 'updateEnumItem'),
1056
- ge.prototype,
999
+ [z],
1000
+ Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumItem'),
1001
+ de.prototype,
1057
1002
  ),
1058
- v()(
1059
- ge.prototype,
1003
+ x()(
1004
+ de.prototype,
1060
1005
  'isExitEnumKey',
1061
- [W],
1062
- Object.getOwnPropertyDescriptor(ge.prototype, 'isExitEnumKey'),
1063
- ge.prototype,
1006
+ [U],
1007
+ Object.getOwnPropertyDescriptor(de.prototype, 'isExitEnumKey'),
1008
+ de.prototype,
1064
1009
  ),
1065
- v()(
1066
- ge.prototype,
1010
+ x()(
1011
+ de.prototype,
1067
1012
  'updateEnumKey',
1068
- [U],
1069
- Object.getOwnPropertyDescriptor(ge.prototype, 'updateEnumKey'),
1070
- ge.prototype,
1013
+ [H],
1014
+ Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumKey'),
1015
+ de.prototype,
1071
1016
  ),
1072
- v()(
1073
- ge.prototype,
1017
+ x()(
1018
+ de.prototype,
1074
1019
  'updateEnumText',
1075
1020
  [Q],
1076
- Object.getOwnPropertyDescriptor(ge.prototype, 'updateEnumText'),
1077
- ge.prototype,
1021
+ Object.getOwnPropertyDescriptor(de.prototype, 'updateEnumText'),
1022
+ de.prototype,
1078
1023
  ),
1079
- v()(
1080
- ge.prototype,
1024
+ x()(
1025
+ de.prototype,
1081
1026
  'deleteEnumItem',
1082
1027
  [X],
1083
- Object.getOwnPropertyDescriptor(ge.prototype, 'deleteEnumItem'),
1084
- ge.prototype,
1028
+ Object.getOwnPropertyDescriptor(de.prototype, 'deleteEnumItem'),
1029
+ de.prototype,
1085
1030
  ),
1086
- v()(
1087
- ge.prototype,
1031
+ x()(
1032
+ de.prototype,
1088
1033
  'insertEnumItem',
1089
1034
  [Y],
1090
- Object.getOwnPropertyDescriptor(ge.prototype, 'insertEnumItem'),
1091
- ge.prototype,
1035
+ Object.getOwnPropertyDescriptor(de.prototype, 'insertEnumItem'),
1036
+ de.prototype,
1092
1037
  ),
1093
- v()(
1094
- ge.prototype,
1038
+ x()(
1039
+ de.prototype,
1095
1040
  'getNewEnumIndex',
1096
1041
  [Z],
1097
1042
  Object.getOwnPropertyDescriptor(
1098
- ge.prototype,
1043
+ de.prototype,
1099
1044
  'getNewEnumIndex',
1100
1045
  ),
1101
- ge.prototype,
1046
+ de.prototype,
1102
1047
  ),
1103
- v()(
1104
- ge.prototype,
1048
+ x()(
1049
+ de.prototype,
1105
1050
  'addEnumItem',
1106
1051
  [$],
1107
- Object.getOwnPropertyDescriptor(ge.prototype, 'addEnumItem'),
1108
- ge.prototype,
1052
+ Object.getOwnPropertyDescriptor(de.prototype, 'addEnumItem'),
1053
+ de.prototype,
1109
1054
  ),
1110
- v()(
1111
- ge.prototype,
1055
+ x()(
1056
+ de.prototype,
1112
1057
  'copyEnumItem',
1113
1058
  [ee],
1114
- Object.getOwnPropertyDescriptor(ge.prototype, 'copyEnumItem'),
1115
- ge.prototype,
1059
+ Object.getOwnPropertyDescriptor(de.prototype, 'copyEnumItem'),
1060
+ de.prototype,
1116
1061
  ),
1117
- v()(
1118
- ge.prototype,
1062
+ x()(
1063
+ de.prototype,
1119
1064
  'updateOptionItem',
1120
1065
  [te],
1121
1066
  Object.getOwnPropertyDescriptor(
1122
- ge.prototype,
1067
+ de.prototype,
1123
1068
  'updateOptionItem',
1124
1069
  ),
1125
- ge.prototype,
1070
+ de.prototype,
1126
1071
  ),
1127
- v()(
1128
- ge.prototype,
1072
+ x()(
1073
+ de.prototype,
1129
1074
  'isExitOptionLabel',
1130
1075
  [ne],
1131
1076
  Object.getOwnPropertyDescriptor(
1132
- ge.prototype,
1077
+ de.prototype,
1133
1078
  'isExitOptionLabel',
1134
1079
  ),
1135
- ge.prototype,
1080
+ de.prototype,
1136
1081
  ),
1137
- v()(
1138
- ge.prototype,
1082
+ x()(
1083
+ de.prototype,
1139
1084
  'updateOptionLabel',
1140
- [oe],
1085
+ [ae],
1141
1086
  Object.getOwnPropertyDescriptor(
1142
- ge.prototype,
1087
+ de.prototype,
1143
1088
  'updateOptionLabel',
1144
1089
  ),
1145
- ge.prototype,
1090
+ de.prototype,
1146
1091
  ),
1147
- v()(
1148
- ge.prototype,
1092
+ x()(
1093
+ de.prototype,
1149
1094
  'updateOptionValue',
1150
- [ae],
1095
+ [oe],
1151
1096
  Object.getOwnPropertyDescriptor(
1152
- ge.prototype,
1097
+ de.prototype,
1153
1098
  'updateOptionValue',
1154
1099
  ),
1155
- ge.prototype,
1100
+ de.prototype,
1156
1101
  ),
1157
- v()(
1158
- ge.prototype,
1102
+ x()(
1103
+ de.prototype,
1159
1104
  'deleteOptionItem',
1160
1105
  [re],
1161
1106
  Object.getOwnPropertyDescriptor(
1162
- ge.prototype,
1107
+ de.prototype,
1163
1108
  'deleteOptionItem',
1164
1109
  ),
1165
- ge.prototype,
1110
+ de.prototype,
1166
1111
  ),
1167
- v()(
1168
- ge.prototype,
1112
+ x()(
1113
+ de.prototype,
1169
1114
  'insertOption',
1170
1115
  [ie],
1171
- Object.getOwnPropertyDescriptor(ge.prototype, 'insertOption'),
1172
- ge.prototype,
1116
+ Object.getOwnPropertyDescriptor(de.prototype, 'insertOption'),
1117
+ de.prototype,
1173
1118
  ),
1174
- v()(
1175
- ge.prototype,
1119
+ x()(
1120
+ de.prototype,
1176
1121
  'getNewOptionValue',
1177
1122
  [se],
1178
1123
  Object.getOwnPropertyDescriptor(
1179
- ge.prototype,
1124
+ de.prototype,
1180
1125
  'getNewOptionValue',
1181
1126
  ),
1182
- ge.prototype,
1127
+ de.prototype,
1183
1128
  ),
1184
- v()(
1185
- ge.prototype,
1129
+ x()(
1130
+ de.prototype,
1186
1131
  'addOptionItem',
1187
1132
  [ce],
1188
- Object.getOwnPropertyDescriptor(ge.prototype, 'addOptionItem'),
1189
- ge.prototype,
1133
+ Object.getOwnPropertyDescriptor(de.prototype, 'addOptionItem'),
1134
+ de.prototype,
1190
1135
  ),
1191
- v()(
1192
- ge.prototype,
1136
+ x()(
1137
+ de.prototype,
1193
1138
  'copyOptionItem',
1194
1139
  [le],
1195
- Object.getOwnPropertyDescriptor(ge.prototype, 'copyOptionItem'),
1196
- ge.prototype,
1140
+ Object.getOwnPropertyDescriptor(de.prototype, 'copyOptionItem'),
1141
+ de.prototype,
1197
1142
  ),
1198
- (be = v()(ge.prototype, 'childElemSort', [de], {
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, Ie.getSchemaByIndexRoute)(t, e.jsonSchema),
1207
- o = n.propertyOrder,
1208
- a = [],
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 = o.length;
1162
+ m = a.length;
1218
1163
  u < m;
1219
1164
  u++
1220
1165
  ) {
1221
- var h = o[u];
1166
+ var h = a[u];
1222
1167
  switch (n.properties[h].type) {
1223
1168
  case 'input':
1224
1169
  case 'url':
1225
- a.push(h);
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
- d.push(h);
1198
+ p.push(h);
1254
1199
  break;
1255
1200
  default:
1256
- p.push(h);
1201
+ d.push(h);
1257
1202
  }
1258
1203
  }
1259
- (n.propertyOrder = [].concat(a, r, i, s, l, c, d, p)),
1204
+ (n.propertyOrder = [].concat(o, r, i, s, l, c, p, d)),
1260
1205
  e.jsonSchemaChange();
1261
1206
  };
1262
1207
  },
1263
1208
  })),
1264
- v()(
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
- Pe = require('@ant-design/icons'),
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 Te = b.Input.TextArea,
1389
- Be = b.Select.Option,
1390
- Ve = (function (e) {
1391
- function t(t) {
1392
- var n;
1393
- return (
1394
- ((n = e.call(this, t) || this).handleValueChange = function (
1395
- e,
1396
- t,
1397
- ) {
1398
- var o = n.props,
1399
- a = o.indexRoute,
1400
- r = o.jsonKey,
1401
- i = o.targetJsonSchema,
1402
- s = o.editSchemaData;
1403
- if (i[e] !== t) {
1404
- var c = {};
1405
- (c[e] = t), s(a, r, c);
1406
- }
1407
- }),
1408
- (n.renderDefaultContent = function (e, t, o) {
1409
- if ('boolean' === e)
1410
- return r.createElement(b.Switch, {
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
- defaultValue: t.default,
1429
- },
1430
- a &&
1431
- a.length > 0 &&
1432
- a.map(function (e, t) {
1433
- var n = o + '-options-' + t;
1434
- return r.createElement(
1435
- b.Checkbox,
1436
- { value: e.value, key: n },
1437
- e.label || e.name,
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
- : 'textarea' === e ||
1478
- 'codearea' === e ||
1479
- 'htmlarea' === e ||
1480
- 'json' === e
1481
- ? r.createElement(Te, {
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
- onPressEnter: function (e) {
1274
+ onChange: function (e) {
1487
1275
  var t = e.target.value;
1488
1276
  n.handleValueChange('default', t);
1489
1277
  },
1490
- onBlur: function (e) {
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
- : 'number' === e
1496
- ? r.createElement(b.InputNumber, {
1497
- style: { display: 'inline-block' },
1498
- placeholder: '请输入' + t.title + '的默认值',
1499
- defaultValue: t.default,
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
- (n.curConditionPropChange = function (e, t) {
1519
- var o = n.props,
1520
- a = o.indexRoute,
1521
- r = o.jsonKey,
1522
- i = o.targetJsonSchema,
1523
- s = o.addConditionProp,
1524
- c = o.removeConditionProp,
1525
- l = o.indexRoute2keyRoute,
1526
- d = t || l(a);
1527
- e
1528
- ? (s({
1529
- key: r,
1530
- keyRoute: d,
1531
- title: i.title,
1532
- format: i.type,
1533
- type: i.type,
1534
- }),
1535
- n.handleValueChange('isConditionProp', !0))
1536
- : (c(d), n.handleValueChange('isConditionProp', !1));
1537
- }),
1538
- (n.deleteHiddenRule = function () {
1539
- var e = n.props,
1540
- t = e.indexRoute;
1541
- (0, e.deleteSchemaProp)(t, 'hiddenRule');
1542
- }),
1543
- (n.addHiddenRule = function () {
1544
- n.handleValueChange('hiddenRule', {});
1545
- }),
1546
- (n.hiddenRuleConditionChange = function (e) {
1547
- var t = n.props.targetJsonSchema,
1548
- o = {};
1549
- t.hiddenRule && (o = (0, x.toJS)(t.hiddenRule)),
1550
- (o.conditionProp = e),
1551
- n.handleValueChange('hiddenRule', o);
1552
- }),
1553
- (n.hiddenRuleConditionValueChange = function (e) {
1554
- var t = n.props.targetJsonSchema,
1555
- o = {};
1556
- t.hiddenRule && (o = (0, x.toJS)(t.hiddenRule)),
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
- })(p) &&
1378
+ })(c) &&
1607
1379
  r.createElement(
1608
1380
  'div',
1609
1381
  {
1610
1382
  className: 'wide-screen-element-warp',
1611
- key: a + '-isConditionProp-' + t,
1383
+ key: o + '-isConditionProp',
1612
1384
  },
1613
1385
  r.createElement(
1614
1386
  'div',
1615
1387
  { className: 'element-title' },
1616
1388
  r.createElement(
1617
- b.Tooltip,
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: a + '-isConditionProp-switch-' + t,
1409
+ key: o + '-isConditionProp-switch',
1638
1410
  },
1639
- r.createElement(b.Switch, {
1411
+ r.createElement(S.Switch, {
1640
1412
  style: { display: 'inline-block' },
1641
- defaultChecked: t,
1413
+ defaultChecked: l,
1642
1414
  checkedChildren: '是',
1643
1415
  unCheckedChildren: '否',
1644
1416
  onChange: function (e) {
1645
- n.curConditionPropChange(e, u);
1417
+ t.handleValueChange('isConditionProp', e);
1646
1418
  },
1647
1419
  }),
1648
1420
  ),
1649
1421
  ),
1650
1422
  ),
1651
- 'select' === p &&
1423
+ 'select' === c &&
1652
1424
  r.createElement(
1653
1425
  'div',
1654
1426
  {
1655
1427
  className: 'wide-screen-element-warp',
1656
- key: a + '-selectConfig',
1428
+ key: o + '-selectConfig',
1657
1429
  },
1658
1430
  r.createElement(
1659
1431
  'div',
1660
1432
  { className: 'element-title' },
1661
1433
  r.createElement(
1662
- b.Tooltip,
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: a + '-selectConfig-multiple',
1454
+ key: o + '-selectConfig-multiple',
1683
1455
  },
1684
- r.createElement(b.Switch, {
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
- n.handleValueChange('multiple', e);
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(Ee, [
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
- })(p) &&
1480
+ })(c) &&
1709
1481
  r.createElement(
1710
1482
  'div',
1711
1483
  {
1712
1484
  className: 'wide-screen-element-warp',
1713
- key: a + '-readOnly-' + s.readOnly,
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
- b.Tooltip,
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(b.Switch, {
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
- n.handleValueChange('readOnly', e);
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(Ee, [
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
- })(p) &&
1534
+ })(c) &&
1763
1535
  r.createElement(
1764
1536
  'div',
1765
1537
  {
1766
1538
  className: 'wide-screen-element-warp',
1767
- key: a + '-isRequired-' + s.isRequired,
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
- b.Tooltip,
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(b.Switch, {
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
- n.handleValueChange('isRequired', e);
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(Ee, ['json', 'codearea', 'htmlarea'])
1579
+ .concat(fe, ['json', 'codearea', 'htmlarea'])
1808
1580
  .indexOf(e) > -1
1809
1581
  );
1810
- })(p) &&
1582
+ })(c) &&
1811
1583
  r.createElement(
1812
1584
  'div',
1813
1585
  {
1814
1586
  className: 'wide-screen-element-warp',
1815
- key: a + '-default',
1587
+ key: o + '-default',
1816
1588
  },
1817
1589
  r.createElement(
1818
1590
  'div',
1819
1591
  { className: 'element-title' },
1820
1592
  r.createElement(
1821
- b.Tooltip,
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(p, s, a),
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: a + '-description',
1616
+ key: o + '-description',
1845
1617
  },
1846
1618
  r.createElement(
1847
1619
  'div',
1848
1620
  { className: 'element-title' },
1849
1621
  r.createElement(
1850
- b.Tooltip,
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(b.Input, {
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 t = e.target.value;
1875
- n.handleValueChange('description', t);
1646
+ var n = e.target.value;
1647
+ t.handleValueChange('description', n);
1876
1648
  },
1877
1649
  onBlur: function (e) {
1878
- var t = e.target.value;
1879
- n.handleValueChange('description', t);
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: a + '-showKey',
1661
+ key: o + '-showKey',
1890
1662
  },
1891
1663
  r.createElement(
1892
1664
  'div',
1893
1665
  { className: 'element-title' },
1894
1666
  r.createElement(
1895
- b.Tooltip,
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(b.Switch, {
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
- n.handleValueChange('showKey', e);
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
- })(p) &&
1713
+ })(c) &&
1942
1714
  r.createElement(
1943
1715
  'div',
1944
1716
  {
1945
1717
  className: 'wide-screen-element-warp',
1946
- key: a + '-placeholder',
1718
+ key: o + '-placeholder',
1947
1719
  },
1948
1720
  r.createElement(
1949
1721
  'div',
1950
1722
  { className: 'element-title' },
1951
1723
  r.createElement(
1952
- b.Tooltip,
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(b.Input, {
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 t = e.target.value;
1977
- n.handleValueChange('placeholder', t);
1748
+ var n = e.target.value;
1749
+ t.handleValueChange('placeholder', n);
1978
1750
  },
1979
1751
  onBlur: function (e) {
1980
- var t = e.target.value;
1981
- n.handleValueChange('placeholder', t);
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(Ce, ['array']).indexOf(e) > -1;
1989
- })(p) &&
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: a + '-showCodeViewBtn-' + s.showCodeViewBtn,
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
- b.Tooltip,
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(b.Switch, {
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
- n.handleValueChange('showCodeViewBtn', e);
1798
+ t.handleValueChange('showCodeViewBtn', e);
2027
1799
  },
2028
1800
  }),
2029
1801
  ),
2030
1802
  ),
2031
1803
  ),
2032
- 'number' === (0, Ie.getExpectType)(p) &&
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: a + '-minimum-' + s.minimum,
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
- b.Tooltip,
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(b.InputNumber, {
1837
+ r.createElement(S.InputNumber, {
2066
1838
  style: { display: 'inline-block' },
2067
1839
  defaultValue: s.minimum,
2068
1840
  onPressEnter: function (e) {
2069
- var t = e.target.value;
2070
- n.handleValueChange('minimum', t);
1841
+ var n = e.target.value;
1842
+ t.handleValueChange('minimum', n);
2071
1843
  },
2072
1844
  onBlur: function (e) {
2073
- var t = e.target.value;
2074
- n.handleValueChange('minimum', t);
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: a + '-maximum-' + s.maximum,
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
- b.Tooltip,
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(b.InputNumber, {
1881
+ r.createElement(S.InputNumber, {
2110
1882
  style: { display: 'inline-block' },
2111
1883
  defaultValue: s.maximum,
2112
1884
  onPressEnter: function (e) {
2113
- var t = e.target.value;
2114
- n.handleValueChange('maximum', t);
1885
+ var n = e.target.value;
1886
+ t.handleValueChange('maximum', n);
2115
1887
  },
2116
1888
  onBlur: function (e) {
2117
- var t = e.target.value;
2118
- n.handleValueChange('maximum', t);
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, Ie.getExpectType)(p) &&
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: a + '-minimum-child',
1905
+ key: o + '-minimum-child',
2134
1906
  },
2135
1907
  r.createElement(
2136
1908
  'div',
2137
1909
  { className: 'element-title' },
2138
1910
  r.createElement(
2139
- b.Tooltip,
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(b.InputNumber, {
1929
+ r.createElement(S.InputNumber, {
2158
1930
  style: { display: 'inline-block' },
2159
1931
  defaultValue: s['minimum-child'],
2160
1932
  onChange: function (e) {
2161
- n.handleValueChange('minimum-child', e);
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: a + '-maximum-child',
1943
+ key: o + '-maximum-child',
2172
1944
  },
2173
1945
  r.createElement(
2174
1946
  'div',
2175
1947
  { className: 'element-title' },
2176
1948
  r.createElement(
2177
- b.Tooltip,
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(b.InputNumber, {
1967
+ r.createElement(S.InputNumber, {
2196
1968
  style: { display: 'inline-block' },
2197
1969
  defaultValue: s['maximum-child'],
2198
1970
  onChange: function (e) {
2199
- n.handleValueChange('maximum-child', e);
1971
+ t.handleValueChange('maximum-child', e);
2200
1972
  },
2201
1973
  }),
2202
1974
  ),
2203
1975
  ),
2204
1976
  ),
2205
1977
  ),
2206
- !s.hiddenRule &&
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: 'wide-screen-element-warp' },
1986
+ { className: 'element-title' },
2210
1987
  r.createElement(
2211
- 'div',
2212
- { className: 'element-title' },
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: 'element-title' },
2244
- r.createElement(
2245
- b.Tooltip,
2246
- {
2247
- title:
2248
- '默认隐藏表单项时,会保留其对应的表单项数值。如需隐藏时删除表单项数值,请开启以下配置项。',
2249
- placement: 'top',
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
- r.createElement(
2252
- 'span',
2253
- { className: 'title-text' },
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
- t
2359
- );
2360
- })(r.PureComponent);
2361
- Ve.propTypes = {
2362
- jsonKey: p().string,
2363
- indexRoute: p().string,
2364
- nodeKey: p().string,
2365
- targetJsonSchema: p().any,
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 Le = (0, l.inject)(function (e) {
2372
- return {
2373
- getSchemaByIndexRoute: e.jsonSchemaStore.getSchemaByIndexRoute,
2374
- editSchemaData: e.jsonSchemaStore.editSchemaData,
2375
- checkConditionProp: e.jsonSchemaStore.checkConditionProp,
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
- o = t.indexRoute,
2393
- a = t.jsonKey,
2394
- r = t.changeType;
2395
- t.targetJsonSchema.type !== e && r(o, a, Ie.TypeDataList[e]);
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 = e.target.value,
2399
- o = n.props,
2400
- a = o.indexRoute,
2401
- r = o.jsonKey,
2402
- i = o.editJsonKey,
2403
- s = o.isExitJsonKey;
2404
- r !== t &&
2405
- (s(a, t)
2406
- ? b.message.warning('当前key已存在,请换一个吧。')
2407
- : i(a, t));
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 = e.target.value,
2064
+ var t = (n.props.schemaStore || {}).editSchemaData,
2065
+ a = e.target.value,
2411
2066
  o = n.props,
2412
- a = o.indexRoute,
2413
- r = o.jsonKey,
2414
- i = o.editSchemaData;
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
- o = t[e || 'all'];
2420
- return (o && 0 !== o.length) || (o = t.all), o;
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.indexRoute,
2425
- o = e.targetJsonSchema,
2426
- a = e.addChildJson,
2427
- r = e.addNextJsonData;
2428
- (0, Ie.isContainerSchema)(o) ? a(t) : r(t);
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
- o = e.targetJsonSchema,
2434
- a = e.getSchemaByIndexRoute,
2435
- r = e.indexRoute2keyRoute,
2436
- i = e.jsonKey,
2437
- s = e.insertJsonData,
2438
- c = e.getNewJsonKeyIndex,
2439
- l = E(o),
2440
- d = (0, Ie.getParentIndexRoute)(t),
2441
- p = c(a(d), i),
2442
- u = o.type;
2443
- j(r(d) + '-' + p + '-' + u, r(t)), s(t, p, l);
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
- o = e.indexRoute;
2449
- (0, e.deleteJsonByIndex_CurKey)(o, t);
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
- t = e.indexRoute;
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
- a()(t, e),
2129
+ o()(t, e),
2472
2130
  (t.prototype.render = function () {
2473
2131
  var e,
2474
2132
  t = this,
2475
- n = this.props,
2476
- o = n.parentType,
2477
- a = n.indexRoute,
2478
- i = n.jsonKey,
2479
- s = n.nodeKey,
2480
- c = n.targetJsonSchema,
2481
- l = n.getSchemaByIndexRoute,
2482
- d = this.state.showAdvanceConfig,
2483
- p = a ? (0, Ie.getParentIndexRoute)(a) : '',
2484
- u = p ? l(p) : {},
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 = c.isFixed || this.props.isFixed || !1,
2144
+ h = l.isFixed || this.props.isFixed || !1,
2487
2145
  y =
2488
- (this.props.readOnly || c.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
- S = this.props.hideOperaBtn || !m,
2501
- v = !!S && this.props.showAdvanceBtn,
2502
- x = this.getCurrentTypeList(o),
2503
- E = c.type,
2504
- C = (0, Ie.isContainerSchema)(c);
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
- c &&
2166
+ l &&
2509
2167
  r.createElement(
2510
2168
  'div',
2511
- { className: 'base-schema-box', id: s },
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(b.Input, {
2520
- defaultValue: i || 'key值不存在',
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
- b.Select,
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
- x.map(function (e) {
2543
- return r.createElement(Fe, { key: e, value: e }, e);
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(b.Input, {
2555
- defaultValue: c.title,
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
- !S &&
2219
+ !v &&
2562
2220
  r.createElement(
2563
2221
  'div',
2564
2222
  { className: 'operate-item' },
2565
2223
  !h &&
2566
2224
  r.createElement(
2567
- b.Tooltip,
2225
+ S.Tooltip,
2568
2226
  { title: '删除' },
2569
- r.createElement(Pe.CloseOutlined, {
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
- b.Tooltip,
2576
- { title: C ? '新增子元素' : '新增同级元素' },
2577
- r.createElement(Pe.PlusOutlined, {
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
- C &&
2240
+ O &&
2583
2241
  r.createElement(
2584
- b.Tooltip,
2242
+ S.Tooltip,
2585
2243
  { title: '数据项排序' },
2586
- r.createElement(Pe.SortAscendingOutlined, {
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
- b.Tooltip,
2254
+ S.Tooltip,
2597
2255
  { title: '复制' },
2598
- r.createElement(Pe.CopyOutlined, {
2256
+ r.createElement(Ie.CopyOutlined, {
2599
2257
  className: 'operate-btn',
2600
2258
  onClick: this.onCopyBtnEvent,
2601
2259
  }),
2602
2260
  ),
2603
2261
  r.createElement(
2604
- b.Tooltip,
2262
+ S.Tooltip,
2605
2263
  { title: '高级设置' },
2606
- r.createElement(Pe.SettingOutlined, {
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
- b.Tooltip,
2272
+ S.Tooltip,
2615
2273
  { title: '按住进行拖拽' },
2616
- r.createElement(Pe.DragOutlined, {
2274
+ r.createElement(Ie.DragOutlined, {
2617
2275
  className: 'operate-btn drag-btn',
2618
2276
  }),
2619
2277
  ),
2620
2278
  ),
2621
2279
  ),
2622
- v &&
2280
+ x &&
2623
2281
  r.createElement(
2624
2282
  'div',
2625
2283
  { className: 'operate-item' },
2626
2284
  r.createElement(
2627
- b.Tooltip,
2285
+ S.Tooltip,
2628
2286
  { title: '高级设置' },
2629
- r.createElement(Pe.SettingOutlined, {
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
- d &&
2295
+ p &&
2638
2296
  r.createElement(
2639
- b.Modal,
2297
+ S.Modal,
2640
2298
  {
2641
2299
  visible: !0,
2642
2300
  title:
2643
- '高级设置 / 当前字段:' + c.title + '(' + i + ')',
2301
+ '高级设置 / 当前字段:' + l.title + '(' + s + ')',
2644
2302
  onCancel: function () {
2645
2303
  t.setState({ showAdvanceConfig: !1 });
2646
2304
  },
2647
2305
  footer: [
2648
2306
  r.createElement(
2649
- b.Button,
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(Le, {
2662
- indexRoute: a,
2663
- jsonKey: i,
2664
- targetJsonSchema: c,
2319
+ r.createElement(Ke, {
2320
+ indexRoute: i,
2321
+ jsonKey: s,
2322
+ targetJsonSchema: l,
2665
2323
  }),
2666
2324
  ),
2667
2325
  ),
2668
- !c &&
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
- i,
2333
+ s,
2676
2334
  ':数据元素为空',
2677
2335
  ),
2678
2336
  ),
@@ -2681,82 +2339,67 @@
2681
2339
  t
2682
2340
  );
2683
2341
  })(r.PureComponent);
2684
- qe.propTypes = {
2685
- parentType: p().string,
2686
- jsonKey: p().string,
2687
- indexRoute: p().string,
2688
- nodeKey: p().string,
2689
- targetJsonSchema: p().any,
2690
- isFixed: p().bool,
2691
- hideOperaBtn: p().bool,
2692
- showAdvanceBtn: p().bool,
2693
- keyIsFixed: p().bool,
2694
- typeIsFixed: p().bool,
2695
- titleIsFixed: p().bool,
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 Ae = (0, l.inject)(function (e) {
2698
- return {
2699
- SchemaTypeList: e.jsonSchemaStore.SchemaTypeList,
2700
- getNewJsonKeyIndex: e.jsonSchemaStore.getNewJsonKeyIndex,
2701
- deleteJsonByIndex_CurKey:
2702
- e.jsonSchemaStore.deleteJsonByIndex_CurKey,
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
- He = function (e) {
2362
+ Pe = function (e) {
2720
2363
  var t = e.jsonKey,
2721
2364
  n = e.indexRoute,
2722
- o = e.nodeKey,
2723
- a = e.targetJsonSchema,
2724
- r = a.type,
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 = o ? o + '-' + c : c,
2728
- d = a[c] || {};
2370
+ l = a ? a + '-' + c : c,
2371
+ p = o[c] || {};
2729
2372
  return i().createElement(
2730
- _e,
2373
+ De,
2731
2374
  {
2732
2375
  className: r + '-schema schema-item-form',
2733
- id: o,
2734
- key: o,
2376
+ id: a,
2377
+ key: a,
2735
2378
  indexRoute: n,
2736
2379
  jsonKey: t,
2737
- title: Me(m()({}, e)),
2380
+ title: Be(m()({}, e)),
2738
2381
  },
2739
2382
  (function (e) {
2740
2383
  var t = e.parentType,
2741
2384
  n = e.jsonKey,
2742
- o = e.indexRoute,
2743
- a = e.nodeKey,
2385
+ a = e.indexRoute,
2386
+ o = e.nodeKey,
2744
2387
  r = e.targetJsonSchema;
2745
2388
  return i().createElement(
2746
- _e,
2389
+ De,
2747
2390
  {
2748
2391
  className: 'array-item-schema schema-item-form',
2749
- id: a,
2750
- key: a,
2751
- indexRoute: o,
2392
+ id: o,
2393
+ key: o,
2394
+ indexRoute: a,
2752
2395
  jsonKey: n,
2753
2396
  disabled: !0,
2754
- title: Me({
2755
- indexRoute: o,
2397
+ title: Be({
2398
+ indexRoute: a,
2756
2399
  jsonKey: n,
2757
2400
  targetJsonSchema: r,
2758
2401
  parentType: t,
2759
- nodeKey: a,
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
- o = e.parentNodeKey,
2769
- a = e.parentType;
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
- d = (o ? o + '-' : '') + l + '-' + s;
2776
- return dt({
2777
- parentType: a,
2418
+ p = (a ? a + '-' : '') + l + '-' + s;
2419
+ return nt({
2420
+ parentType: o,
2778
2421
  jsonKey: s,
2779
2422
  indexRoute: i,
2780
- key: d,
2781
- nodeKey: d,
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: o,
2789
- parentNodeKey: a,
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: d,
2441
+ targetJsonSchema: p,
2799
2442
  }),
2800
2443
  );
2801
2444
  },
2802
- ze = (n(790), b.Select.Option),
2803
- Ge = (function (e) {
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
- o = t.indexRoute,
2810
- a = t.jsonKey,
2811
- r = t.targetJsonSchema,
2812
- i = t.typeSelectData,
2813
- s = t.editSchemaData,
2814
- c = t.updateSchemaData;
2815
- if (r.default !== e) {
2816
- if ((s(o, a, { default: e }), i)) {
2817
- var l = i[e];
2818
- l &&
2819
- '数据源类型' === r.title &&
2820
- s((0, Ie.getNextIndexRoute)(o), 'data', l);
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 (Ie.EventTypeDataList) {
2823
- var d = Ie.EventTypeDataList[e];
2824
- '事件类型' === r.title &&
2466
+ if (Oe.EventTypeDataList) {
2467
+ var d = Oe.EventTypeDataList[e];
2468
+ '事件类型' === c.title &&
2825
2469
  d &&
2826
- c((0, Ie.getParentIndexRoute)(o), d);
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
- a()(t, e),
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
- o = n.type,
2841
- a = n.options || [];
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
- b.Select,
2493
+ S.Select,
2850
2494
  {
2851
2495
  defaultValue: n.default || 'local',
2852
2496
  onChange: this.typeChange,
2853
2497
  },
2854
- a.map(function (e, t) {
2498
+ o.map(function (e, t) {
2855
2499
  return r.createElement(
2856
- ze,
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
- b.Select,
2868
- { defaultValue: o, style: { width: 120 }, disabled: !0 },
2869
- r.createElement(ze, { key: o, value: o }, o),
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(b.Input, {
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
- Ge.propTypes = {
2887
- parentType: p().string,
2888
- jsonKey: p().string,
2889
- indexRoute: p().string,
2890
- nodeKey: p().string,
2891
- targetJsonSchema: p().any,
2892
- typeSelectData: p().any,
2893
- isFixed: p().any,
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 We = (0, l.inject)(function (e) {
2896
- return {
2897
- editSchemaData: e.jsonSchemaStore.editSchemaData,
2898
- updateSchemaData: e.jsonSchemaStore.updateSchemaData,
2899
- };
2900
- })((0, l.observer)(Ge)),
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
- Xe = {
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
- Ye = b.Tree.TreeNode,
2924
- Ze = function (e) {
2925
- return i().createElement(Ae, e);
2564
+ Me = S.Tree.TreeNode,
2565
+ We = function (e) {
2566
+ return i().createElement(Je, e);
2926
2567
  },
2927
- $e = b.Tree.TreeNode,
2928
- et = function (e) {
2929
- return i().createElement(Ae, e);
2568
+ Ge = S.Tree.TreeNode,
2569
+ ze = function (e) {
2570
+ return i().createElement(Je, e);
2930
2571
  },
2931
- tt = b.Tree.TreeNode,
2932
- nt = function (e) {
2933
- return i().createElement(Ae, e);
2572
+ Ue = S.Tree.TreeNode,
2573
+ He = function (e) {
2574
+ return i().createElement(Je, e);
2934
2575
  },
2935
- ot = (n(617), b.Select.Option),
2936
- at = (function (e) {
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 = e.target.value,
2944
- o = n.props,
2945
- a = o.indexRoute,
2946
- r = o.optionIndex,
2947
- i = o.optionLabel,
2948
- s = o.isExitOptionLabel,
2949
- c = o.updateOptionLabel;
2950
- t !== i &&
2951
- (s(a, t)
2952
- ? b.message.warning(
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
- : c(a, r, t));
2596
+ : o(s, c, r));
2956
2597
  }),
2957
2598
  (n.handleValueChange = function (e) {
2958
- var t = e.target.value,
2599
+ var t = (n.props.schemaStore || {}).updateOptionValue,
2600
+ a = e.target.value,
2959
2601
  o = n.props,
2960
- a = o.indexRoute,
2961
- r = o.optionIndex,
2962
- i = o.optionValue,
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 = e.indexRoute,
2969
- o = e.optionIndex;
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 = e.indexRoute,
2975
- o = e.optionIndex;
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.indexRoute,
2981
- o = e.optionIndex,
2982
- a = e.getSchemaByIndexRoute,
2983
- r = e.deleteOptionItem,
2984
- i = a(t);
2985
- i.options && i.options.length > 1
2986
- ? r(t, o)
2987
- : b.message.warning('删除失败,至少保留一个可选项。');
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
- a()(t, e),
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(b.Input, {
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
- b.Select,
2660
+ S.Select,
3022
2661
  { defaultValue: 'string', style: { width: 120 } },
3023
2662
  r.createElement(
3024
- ot,
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(b.Input, {
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
- b.Tooltip,
2682
+ S.Tooltip,
3044
2683
  { title: '删除' },
3045
- r.createElement(Pe.CloseOutlined, {
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
- b.Tooltip,
2690
+ S.Tooltip,
3052
2691
  { title: '新增可选项' },
3053
- r.createElement(Pe.PlusOutlined, {
2692
+ r.createElement(Ie.PlusOutlined, {
3054
2693
  className: 'operate-btn',
3055
2694
  onClick: this.onAddBtnEvent,
3056
2695
  }),
3057
2696
  ),
3058
2697
  r.createElement(
3059
- b.Tooltip,
2698
+ S.Tooltip,
3060
2699
  { title: '复制' },
3061
- r.createElement(Pe.CopyOutlined, {
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
- at.propTypes = {
3074
- indexRoute: p().string,
3075
- optionIndex: p().any,
3076
- optionLabel: p().string,
3077
- optionValue: p().string,
3078
- optionNodeKey: p().string,
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 rt = (0, l.inject)(function (e) {
3081
- return {
3082
- getSchemaByIndexRoute: e.jsonSchemaStore.getSchemaByIndexRoute,
3083
- updateOptionLabel: e.jsonSchemaStore.updateOptionLabel,
3084
- updateOptionValue: e.jsonSchemaStore.updateOptionValue,
3085
- isExitOptionLabel: e.jsonSchemaStore.isExitOptionLabel,
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
- ct = b.Tree.TreeNode,
3096
- lt = function (e) {
3097
- return i().createElement(Ae, e);
2726
+ et = S.Tree.TreeNode,
2727
+ tt = function (e) {
2728
+ return i().createElement(Je, e);
3098
2729
  },
3099
- dt = function (e) {
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 mt(e);
2739
+ return rt(e);
3109
2740
  case 'array':
3110
- return He(e);
2741
+ return Pe(e);
3111
2742
  case 'datasource':
3112
2743
  return (function (e) {
3113
2744
  var t,
3114
2745
  n = e.jsonKey,
3115
- o = e.indexRoute,
3116
- a = e.nodeKey,
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
- Ue,
2752
+ qe,
3122
2753
  {
3123
2754
  className: s + '-schema schema-item-form',
3124
- id: a,
3125
- key: a,
3126
- indexRoute: o,
2755
+ id: o,
2756
+ key: o,
2757
+ indexRoute: a,
3127
2758
  jsonKey: n,
3128
- title: Qe(m()({}, e)),
2759
+ title: Ae(m()({}, e)),
3129
2760
  },
3130
- i().createElement(Ue, {
2761
+ i().createElement(qe, {
3131
2762
  className: 'dataSource-type-item-schema schema-item-form',
3132
- id: a + '-type',
3133
- key: a + '-type',
3134
- indexRoute: o ? o + '-0' : '0',
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: o ? o + '-0' : '0',
2770
+ indexRoute: a ? a + '-0' : '0',
3140
2771
  jsonKey: 'type',
3141
2772
  targetJsonSchema: r.properties.type,
3142
2773
  parentType: s,
3143
- nodeKey: a + '-type',
3144
- typeSelectData: Xe,
2774
+ nodeKey: o + '-type',
2775
+ typeSelectData: _e,
3145
2776
  }),
3146
- i().createElement(We, t)),
2777
+ i().createElement(Fe, t)),
3147
2778
  }),
3148
- i().createElement(Ue, {
2779
+ i().createElement(qe, {
3149
2780
  className: 'dataSource-data-item-schema schema-item-form',
3150
- id: a + '-data-' + c.type,
3151
- key: a + '-data-' + c.type,
3152
- indexRoute: o ? o + '-1' : '1',
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: Qe({
3156
- indexRoute: o ? o + '-1' : '1',
2786
+ title: Ae({
2787
+ indexRoute: a ? a + '-1' : '1',
3157
2788
  jsonKey: 'data',
3158
2789
  targetJsonSchema: c,
3159
2790
  parentType: s,
3160
- nodeKey: a + '-data-' + c.type,
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(Ue, {
2797
+ i().createElement(qe, {
3167
2798
  className:
3168
2799
  'dataSource-filter-item-schema schema-item-form',
3169
- id: a + '-filter',
3170
- key: a + '-filter',
3171
- indexRoute: o ? o + '-2' : '2',
2800
+ id: o + '-filter',
2801
+ key: o + '-filter',
2802
+ indexRoute: a ? a + '-2' : '2',
3172
2803
  jsonKey: 'filter',
3173
2804
  disabled: !0,
3174
- title: Qe({
3175
- indexRoute: o ? o + '-2' : '2',
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: a + '-filter',
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
- o = e.indexRoute,
3192
- a = e.nodeKey,
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
- Ye,
2829
+ Me,
3199
2830
  {
3200
2831
  className: s + '-schema schema-item-form',
3201
- id: a,
3202
- key: a,
3203
- indexRoute: o,
2832
+ id: o,
2833
+ key: o,
2834
+ indexRoute: a,
3204
2835
  jsonKey: n,
3205
- title: Ze(m()({}, e)),
2836
+ title: We(m()({}, e)),
3206
2837
  },
3207
- i().createElement(Ye, {
2838
+ i().createElement(Me, {
3208
2839
  className: 'dataSource-type-item-schema schema-item-form',
3209
- id: a + '-type',
3210
- key: a + '-type',
3211
- indexRoute: o ? o + '-0' : '0',
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: o ? o + '-0' : '0',
2847
+ indexRoute: a ? a + '-0' : '0',
3217
2848
  jsonKey: 'type',
3218
2849
  targetJsonSchema: r.properties.type,
3219
2850
  parentType: s,
3220
- nodeKey: a + '-type',
2851
+ nodeKey: o + '-type',
3221
2852
  }),
3222
- i().createElement(We, t)),
2853
+ i().createElement(Fe, t)),
3223
2854
  }),
3224
- i().createElement(Ye, {
2855
+ i().createElement(Me, {
3225
2856
  className:
3226
2857
  'dataSource-config-item-schema schema-item-form',
3227
- id: a + '-config-' + l.type,
3228
- key: a + '-config-' + l.type,
3229
- indexRoute: o ? o + '-1' : '1',
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: Ze({
3233
- indexRoute: o ? o + '-1' : '1',
2863
+ title: We({
2864
+ indexRoute: a ? a + '-1' : '1',
3234
2865
  jsonKey: 'config',
3235
2866
  targetJsonSchema: c,
3236
2867
  parentType: s,
3237
- nodeKey: a + '-config-' + c.type,
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(Ye, {
2874
+ i().createElement(Me, {
3244
2875
  className: 'dataSource-data-item-schema schema-item-form',
3245
- id: a + '-data-' + l.type,
3246
- key: a + '-data-' + l.type,
3247
- indexRoute: o ? o + '-2' : '2',
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: Ze({
3251
- indexRoute: o ? o + '-2' : '2',
2881
+ title: We({
2882
+ indexRoute: a ? a + '-2' : '2',
3252
2883
  jsonKey: 'data',
3253
2884
  targetJsonSchema: l,
3254
2885
  parentType: s,
3255
- nodeKey: a + '-data-' + l.type,
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
- o = e.indexRoute,
3268
- a = e.nodeKey,
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
- d = r.properties.actionFunc || {},
3274
- p = r.properties.trigger || {},
2904
+ p = r.properties.actionFunc || {},
2905
+ d = r.properties.trigger || {},
3275
2906
  u = r.properties.eventData || {};
3276
2907
  return i().createElement(
3277
- $e,
2908
+ Ge,
3278
2909
  {
3279
2910
  className: s + '-schema schema-item-form',
3280
- id: a,
3281
- key: a,
3282
- indexRoute: o,
2911
+ id: o,
2912
+ key: o,
2913
+ indexRoute: a,
3283
2914
  jsonKey: n,
3284
- title: et(m()({}, e)),
2915
+ title: ze(m()({}, e)),
3285
2916
  },
3286
- i().createElement($e, {
2917
+ i().createElement(Ge, {
3287
2918
  className: 'event-type-item-schema schema-item-form',
3288
- id: a + '-type',
3289
- key: a + '-type',
3290
- indexRoute: o ? o + '-0' : '0',
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: o ? o + '-0' : '0',
2926
+ indexRoute: a ? a + '-0' : '0',
3296
2927
  jsonKey: 'type',
3297
2928
  targetJsonSchema: c,
3298
2929
  parentType: s,
3299
- nodeKey: a + '-type',
2930
+ nodeKey: o + '-type',
3300
2931
  }),
3301
- i().createElement(We, t)),
2932
+ i().createElement(Fe, t)),
3302
2933
  }),
3303
2934
  'on' === c.default &&
3304
2935
  l &&
3305
- i().createElement($e, {
2936
+ i().createElement(Ge, {
3306
2937
  className:
3307
2938
  'event-register-item-schema schema-item-form',
3308
- id: a + '-register-' + c.default,
3309
- key: a + '-register-' + c.default,
3310
- indexRoute: o ? o + '-1' : '1',
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: et({
3314
- indexRoute: o ? o + '-1' : '1',
2944
+ title: ze({
2945
+ indexRoute: a ? a + '-1' : '1',
3315
2946
  jsonKey: 'register',
3316
2947
  targetJsonSchema: l,
3317
2948
  parentType: s,
3318
- nodeKey: a + '-register-' + c.default,
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
- d &&
3326
- i().createElement($e, {
2956
+ p &&
2957
+ i().createElement(Ge, {
3327
2958
  className:
3328
2959
  'event-actionFunc-item-schema schema-item-form',
3329
- id: a + '-actionFunc-' + c.default,
3330
- key: a + '-actionFunc-' + c.default,
3331
- indexRoute: o ? o + '-2' : '2',
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: et({
3335
- indexRoute: o ? o + '-2' : '2',
2965
+ title: ze({
2966
+ indexRoute: a ? a + '-2' : '2',
3336
2967
  jsonKey: 'actionFunc',
3337
- targetJsonSchema: d,
2968
+ targetJsonSchema: p,
3338
2969
  parentType: s,
3339
- nodeKey: a + '-actionFunc-' + c.default,
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
- p &&
3347
- i().createElement($e, {
2977
+ d &&
2978
+ i().createElement(Ge, {
3348
2979
  className: 'event-trigger-item-schema schema-item-form',
3349
- id: a + '-trigger-' + c.default,
3350
- key: a + '-trigger-' + c.default,
3351
- indexRoute: o ? o + '-1' : '1',
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: et({
3355
- indexRoute: o ? o + '-1' : '1',
2985
+ title: ze({
2986
+ indexRoute: a ? a + '-1' : '1',
3356
2987
  jsonKey: 'trigger',
3357
- targetJsonSchema: p,
2988
+ targetJsonSchema: d,
3358
2989
  parentType: s,
3359
- nodeKey: a + '-trigger-' + c.default,
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($e, {
2998
+ i().createElement(Ge, {
3368
2999
  className:
3369
3000
  'event-eventData-item-schema schema-item-form',
3370
- id: a + '-eventData-' + c.default,
3371
- key: a + '-eventData-' + c.default,
3372
- indexRoute: o ? o + '-2' : '2',
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: et({
3376
- indexRoute: o ? o + '-2' : '2',
3006
+ title: ze({
3007
+ indexRoute: a ? a + '-2' : '2',
3377
3008
  jsonKey: 'eventData',
3378
3009
  targetJsonSchema: u,
3379
3010
  parentType: s,
3380
- nodeKey: a + '-eventData-' + c.default,
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
- o = e.indexRoute,
3394
- a = e.nodeKey,
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
- tt,
3031
+ Ue,
3401
3032
  {
3402
3033
  className: s + '-schema schema-item-form',
3403
- id: a,
3404
- key: a,
3405
- indexRoute: o,
3034
+ id: o,
3035
+ key: o,
3036
+ indexRoute: a,
3406
3037
  jsonKey: n,
3407
- title: nt(m()({}, e)),
3038
+ title: He(m()({}, e)),
3408
3039
  },
3409
- i().createElement(tt, {
3040
+ i().createElement(Ue, {
3410
3041
  className: 'quantity-unit-item-schema schema-item-form',
3411
- id: a + '-' + c,
3412
- key: a + '-' + c,
3413
- indexRoute: o ? o + '-0' : '0',
3042
+ id: o + '-' + c,
3043
+ key: o + '-' + c,
3044
+ indexRoute: a ? a + '-0' : '0',
3414
3045
  jsonKey: c,
3415
3046
  disabled: !0,
3416
- title: nt({
3417
- indexRoute: o ? o + '-0' : '0',
3047
+ title: He({
3048
+ indexRoute: a ? a + '-0' : '0',
3418
3049
  jsonKey: c,
3419
3050
  targetJsonSchema: l,
3420
3051
  parentType: s,
3421
- nodeKey: a + '-' + c,
3052
+ nodeKey: o + '-' + c,
3422
3053
  hideOperaBtn: !0,
3423
3054
  showAdvanceBtn: !0,
3424
3055
  typeIsFixed: !0,
3425
3056
  }),
3426
3057
  }),
3427
- i().createElement(tt, {
3058
+ i().createElement(Ue, {
3428
3059
  className:
3429
3060
  'quantity-typeSelect-item-schema schema-item-form',
3430
- id: a + '-quantity',
3431
- key: a + '-quantity',
3432
- indexRoute: o ? o + '-1' : '1',
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: o ? o + '-1' : '1',
3068
+ indexRoute: a ? a + '-1' : '1',
3438
3069
  jsonKey: 'quantity',
3439
3070
  targetJsonSchema: r.properties.quantity,
3440
3071
  parentType: s,
3441
- nodeKey: a + '-quantity',
3072
+ nodeKey: o + '-quantity',
3442
3073
  }),
3443
- i().createElement(We, t)),
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
- o = e.indexRoute,
3454
- a = e.nodeKey,
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 = o || '0';
3089
+ l = a || '0';
3459
3090
  return i().createElement(
3460
- it,
3091
+ Ze,
3461
3092
  {
3462
3093
  className: s + '-schema schema-item-form',
3463
- id: a,
3464
- key: a,
3465
- indexRoute: o,
3094
+ id: o,
3095
+ key: o,
3096
+ indexRoute: a,
3466
3097
  jsonKey: n,
3467
- title: ((t = m()({}, e)), i().createElement(Ae, t)),
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
- o = e.value,
3474
- r = '' + a + s + '-' + n;
3475
- return i().createElement(it, {
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: st({
3112
+ title: $e({
3482
3113
  indexRoute: l,
3483
3114
  optionIndex: t,
3484
3115
  optionLabel: n,
3485
- optionValue: o,
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
- o = e.nodeKey,
3497
- a = e.targetJsonSchema.type;
3498
- return i().createElement(ct, {
3499
- className: a + '-schema schema-item-form',
3500
- id: o,
3501
- key: o,
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: lt(e),
3135
+ title: tt(e),
3505
3136
  });
3506
3137
  })(e);
3507
3138
  }
3508
3139
  },
3509
- pt = b.Tree.TreeNode,
3510
- ut = function (e) {
3511
- return i().createElement(Ae, e);
3140
+ at = S.Tree.TreeNode,
3141
+ ot = function (e) {
3142
+ return i().createElement(Je, e);
3512
3143
  },
3513
- mt = function (e) {
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
- d = e.targetJsonSchema,
3523
- p = e.isOnlyShowChild,
3524
- u = d.type,
3525
- h = d.isFixed,
3153
+ p = e.targetJsonSchema,
3154
+ d = e.isOnlyShowChild,
3155
+ u = p.type,
3156
+ h = p.isFixed,
3526
3157
  y =
3527
3158
  ((t = {
3528
- propertyOrder: d.propertyOrder,
3529
- properties: d.properties,
3159
+ propertyOrder: p.propertyOrder,
3160
+ properties: p.properties,
3530
3161
  parentIndexRoute: c,
3531
3162
  parentNodeKey: l,
3532
3163
  parentType: u,
3533
- isOnlyShowChild: p,
3164
+ isOnlyShowChild: d,
3534
3165
  }),
3535
3166
  (n = t.properties),
3536
- (o = t.parentIndexRoute),
3537
- (a = t.parentNodeKey),
3167
+ (a = t.parentIndexRoute),
3168
+ (o = t.parentNodeKey),
3538
3169
  (r = t.parentType),
3539
3170
  t.propertyOrder.map(function (e, t) {
3540
- var i = o ? o + '-' + t : '' + t,
3171
+ var i = a ? a + '-' + t : '' + t,
3541
3172
  s = e,
3542
3173
  c = n[s],
3543
3174
  l = c.type,
3544
- d = (a ? a + '-' : '') + l + '-' + s;
3545
- return dt({
3175
+ p = (o ? o + '-' : '') + l + '-' + s;
3176
+ return nt({
3546
3177
  parentType: r,
3547
3178
  jsonKey: s,
3548
3179
  indexRoute: i,
3549
- key: d,
3550
- nodeKey: d,
3180
+ key: p,
3181
+ nodeKey: p,
3551
3182
  targetJsonSchema: c,
3552
3183
  });
3553
3184
  })),
3554
3185
  g = i().createElement(
3555
- pt,
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: ut(m()({}, e)),
3194
+ title: ot(m()({}, e)),
3564
3195
  },
3565
3196
  y,
3566
3197
  );
3567
- return p ? y : g;
3198
+ return d ? y : g;
3568
3199
  },
3569
- ht =
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
- return (
3633
- ((n = e.call(this, t) || this).onDragStart = function (e) {
3634
- (0, n.props.getSchemaByIndexRoute)(e.node.indexRoute)
3635
- .isFixed && b.message.warning('当前元素不支持拖拽哦。');
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
- o = e.node,
3640
- a = n.props,
3641
- r = a.getSchemaByIndexRoute,
3642
- i = a.indexRoute2keyRoute,
3643
- s = a.insertJsonData,
3644
- c = a.deleteJsonByIndex,
3645
- l = a.isExitJsonKey,
3646
- d = a.isSupportCurType,
3647
- p = t.indexRoute,
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(p);
3222
+ m = r(d);
3650
3223
  if (!m.isFixed) {
3651
- var h = o.indexRoute,
3652
- y = (0, Ie.isSameParent)(p, h),
3653
- g = (0, Ie.getCurPosition)(p, h);
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(p, !0),
3656
- 'before' === g && (h = (0, Ie.moveForward)(h)),
3657
- o.dragOverGapTop
3228
+ c(d, !0),
3229
+ 'before' === g && (h = (0, Oe.moveForward)(h)),
3230
+ a.dragOverGapTop
3658
3231
  ? s(h, u, m, 'before')
3659
- : (o.dragOver || o.dragOverGapBottom) && s(h, u, m);
3232
+ : (a.dragOver || a.dragOverGapBottom) && s(h, u, m);
3660
3233
  else {
3661
3234
  if (l(h, u))
3662
- return void b.message.warning(
3235
+ return void S.message.warning(
3663
3236
  '目标位置中有重名的元素',
3664
3237
  );
3665
3238
  var f = m.type;
3666
- if (!d(h, f))
3667
- return void b.message.warning(
3239
+ if (!p(h, f))
3240
+ return void S.message.warning(
3668
3241
  '目标位置不支持' + f + '类型元素',
3669
3242
  );
3670
- var S = i(p),
3671
- v = (0, Ie.getParentIndexRoute)(h),
3672
- x = (function (e) {
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
- })(S + '-' + f);
3676
- j(i(v) + '-' + u + '-' + f, x || S),
3677
- o.dragOverGapTop
3248
+ })(v + '-' + f);
3249
+ C(i(x) + '-' + u + '-' + f, b || v),
3250
+ a.dragOverGapTop
3678
3251
  ? 'after' === g
3679
- ? (c(p, !0), s(h, u, m, 'before'))
3680
- : (s(h, u, m, 'before', !0), c(p))
3681
- : (o.dragOver || o.dragOverGapBottom) &&
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(p, !0), s(h, u, m))
3684
- : (s(h, u, m, '', !0), c(p)));
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, o) {
3695
- var a = n,
3696
- r = e.properties[a].type + '-' + a;
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
- t.data && n.props.initJSONSchemaData(t.data),
3703
- t.onChange && n.props.initOnChange(t.onChange),
3704
- t.typeList && n.props.initSchemaTypeList(t.typeList),
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
- a()(t, e);
3286
+ o()(t, e);
3709
3287
  var n = t.prototype;
3710
3288
  return (
3711
3289
  (n.componentWillReceiveProps = function (e) {
3712
- C(e.data, this.props.data) ||
3713
- this.props.initJSONSchemaData(e.data),
3714
- C(e.onChange, this.props.onChange) ||
3715
- this.props.initOnChange(e.onChange),
3716
- C(e.typeList, this.props.typeList) ||
3717
- this.props.initSchemaTypeList(e.typeList);
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, Ie.isEmptySchema)(e),
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
- b.Tree,
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
- mt({
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
- dt({
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
- yt.propTypes = {
3776
- onChange: p().func,
3777
- data: p().object,
3778
- typeList: p().object,
3353
+ it.propTypes = {
3354
+ onChange: d().func,
3355
+ data: d().object,
3356
+ typeList: d().object,
3779
3357
  };
3780
- var gt = (0, l.inject)(function (e) {
3781
- return {
3782
- jsonSchema: e.jsonSchemaStore.jsonSchema,
3783
- initJSONSchemaData: e.jsonSchemaStore.initJSONSchemaData,
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
- jsonSchemaStore: new Ke.jsonSchemaStore(),
3366
+ schemaStore: new Ne.schemaStore(),
3801
3367
  }),
3802
3368
  n
3803
3369
  );
3804
3370
  }
3805
3371
  return (
3806
- a()(t, e),
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
- o = e.onChange,
3812
- a = e.element,
3377
+ a = e.onChange,
3378
+ o = e.element,
3813
3379
  i = e.wideScreen,
3814
- s = this.state.jsonSchemaStore,
3815
- d = r.createElement(
3380
+ s = this.state.schemaStore,
3381
+ p = r.createElement(
3816
3382
  l.Provider,
3817
- { jsonSchemaStore: s },
3818
- r.createElement(gt, {
3383
+ { schemaStore: s },
3384
+ r.createElement(st, {
3819
3385
  data: t,
3820
3386
  typeList: n,
3821
- onChange: o,
3387
+ onChange: a,
3822
3388
  wideScreen: i,
3823
3389
  }),
3824
3390
  );
3825
- return a ? (c().render(d, a), '') : d;
3391
+ return o ? (c().render(p, o), '') : p;
3826
3392
  }),
3827
3393
  t
3828
3394
  );
3829
3395
  })(r.PureComponent);
3830
- ft.propTypes = {
3831
- wideScreen: p().any,
3832
- onChange: p().func,
3833
- data: p().any,
3834
- typeList: p().any,
3835
- element: p().any,
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
- o
3404
+ a
3839
3405
  );
3840
3406
  })();
3841
3407
  });