@blueking/bkui-form 0.0.41-beta.1 → 0.0.42-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,572 +8,537 @@
8
8
 
9
9
  var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);
10
10
 
11
- function _iterableToArrayLimit(arr, i) {
12
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
13
- if (null != _i) {
14
- var _s,
15
- _e,
16
- _x,
17
- _r,
18
- _arr = [],
19
- _n = !0,
20
- _d = !1;
11
+ function _arrayLikeToArray(r, a) {
12
+ (null == a || a > r.length) && (a = r.length);
13
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
14
+ return n;
15
+ }
16
+ function _arrayWithHoles(r) {
17
+ if (Array.isArray(r)) return r;
18
+ }
19
+ function _arrayWithoutHoles(r) {
20
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
21
+ }
22
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
23
+ try {
24
+ var i = n[a](c),
25
+ u = i.value;
26
+ } catch (n) {
27
+ return void e(n);
28
+ }
29
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
30
+ }
31
+ function _asyncToGenerator(n) {
32
+ return function () {
33
+ var t = this,
34
+ e = arguments;
35
+ return new Promise(function (r, o) {
36
+ var a = n.apply(t, e);
37
+ function _next(n) {
38
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
39
+ }
40
+ function _throw(n) {
41
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
42
+ }
43
+ _next(void 0);
44
+ });
45
+ };
46
+ }
47
+ function _classCallCheck(a, n) {
48
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
49
+ }
50
+ function _defineProperties(e, r) {
51
+ for (var t = 0; t < r.length; t++) {
52
+ var o = r[t];
53
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
54
+ }
55
+ }
56
+ function _createClass(e, r, t) {
57
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
58
+ writable: !1
59
+ }), e;
60
+ }
61
+ function _createForOfIteratorHelper(r, e) {
62
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
63
+ if (!t) {
64
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
65
+ t && (r = t);
66
+ var n = 0,
67
+ F = function () {};
68
+ return {
69
+ s: F,
70
+ n: function () {
71
+ return n >= r.length ? {
72
+ done: !0
73
+ } : {
74
+ done: !1,
75
+ value: r[n++]
76
+ };
77
+ },
78
+ e: function (r) {
79
+ throw r;
80
+ },
81
+ f: F
82
+ };
83
+ }
84
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
85
+ }
86
+ var o,
87
+ a = !0,
88
+ u = !1;
89
+ return {
90
+ s: function () {
91
+ t = t.call(r);
92
+ },
93
+ n: function () {
94
+ var r = t.next();
95
+ return a = r.done, r;
96
+ },
97
+ e: function (r) {
98
+ u = !0, o = r;
99
+ },
100
+ f: function () {
101
+ try {
102
+ a || null == t.return || t.return();
103
+ } finally {
104
+ if (u) throw o;
105
+ }
106
+ }
107
+ };
108
+ }
109
+ function _defineProperty(e, r, t) {
110
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
111
+ value: t,
112
+ enumerable: !0,
113
+ configurable: !0,
114
+ writable: !0
115
+ }) : e[r] = t, e;
116
+ }
117
+ function _extends$1() {
118
+ return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
119
+ for (var e = 1; e < arguments.length; e++) {
120
+ var t = arguments[e];
121
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
122
+ }
123
+ return n;
124
+ }, _extends$1.apply(null, arguments);
125
+ }
126
+ function _iterableToArray(r) {
127
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
128
+ }
129
+ function _iterableToArrayLimit(r, l) {
130
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
131
+ if (null != t) {
132
+ var e,
133
+ n,
134
+ i,
135
+ u,
136
+ a = [],
137
+ f = !0,
138
+ o = !1;
21
139
  try {
22
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
23
- if (Object(_i) !== _i) return;
24
- _n = !1;
25
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
26
- } catch (err) {
27
- _d = !0, _e = err;
140
+ if (i = (t = t.call(r)).next, 0 === l) {
141
+ if (Object(t) !== t) return;
142
+ f = !1;
143
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
144
+ } catch (r) {
145
+ o = !0, n = r;
28
146
  } finally {
29
147
  try {
30
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
148
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
31
149
  } finally {
32
- if (_d) throw _e;
150
+ if (o) throw n;
33
151
  }
34
152
  }
35
- return _arr;
153
+ return a;
36
154
  }
37
155
  }
38
- function ownKeys(object, enumerableOnly) {
39
- var keys = Object.keys(object);
156
+ function _nonIterableRest() {
157
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
158
+ }
159
+ function _nonIterableSpread() {
160
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
161
+ }
162
+ function _objectDestructuringEmpty(t) {
163
+ if (null == t) throw new TypeError("Cannot destructure " + t);
164
+ }
165
+ function ownKeys(e, r) {
166
+ var t = Object.keys(e);
40
167
  if (Object.getOwnPropertySymbols) {
41
- var symbols = Object.getOwnPropertySymbols(object);
42
- enumerableOnly && (symbols = symbols.filter(function (sym) {
43
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
44
- })), keys.push.apply(keys, symbols);
168
+ var o = Object.getOwnPropertySymbols(e);
169
+ r && (o = o.filter(function (r) {
170
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
171
+ })), t.push.apply(t, o);
45
172
  }
46
- return keys;
47
- }
48
- function _objectSpread2(target) {
49
- for (var i = 1; i < arguments.length; i++) {
50
- var source = null != arguments[i] ? arguments[i] : {};
51
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
52
- _defineProperty(target, key, source[key]);
53
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
54
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
173
+ return t;
174
+ }
175
+ function _objectSpread2(e) {
176
+ for (var r = 1; r < arguments.length; r++) {
177
+ var t = null != arguments[r] ? arguments[r] : {};
178
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
179
+ _defineProperty(e, r, t[r]);
180
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
181
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
55
182
  });
56
183
  }
57
- return target;
184
+ return e;
185
+ }
186
+ function _objectWithoutProperties(e, t) {
187
+ if (null == e) return {};
188
+ var o,
189
+ r,
190
+ i = _objectWithoutPropertiesLoose(e, t);
191
+ if (Object.getOwnPropertySymbols) {
192
+ var n = Object.getOwnPropertySymbols(e);
193
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
194
+ }
195
+ return i;
196
+ }
197
+ function _objectWithoutPropertiesLoose(r, e) {
198
+ if (null == r) return {};
199
+ var t = {};
200
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
201
+ if (e.indexOf(n) >= 0) continue;
202
+ t[n] = r[n];
203
+ }
204
+ return t;
58
205
  }
59
206
  function _regeneratorRuntime() {
60
207
  _regeneratorRuntime = function () {
61
- return exports;
208
+ return e;
62
209
  };
63
- var exports = {},
64
- Op = Object.prototype,
65
- hasOwn = Op.hasOwnProperty,
66
- defineProperty = Object.defineProperty || function (obj, key, desc) {
67
- obj[key] = desc.value;
210
+ var t,
211
+ e = {},
212
+ r = Object.prototype,
213
+ n = r.hasOwnProperty,
214
+ o = Object.defineProperty || function (t, e, r) {
215
+ t[e] = r.value;
68
216
  },
69
- $Symbol = "function" == typeof Symbol ? Symbol : {},
70
- iteratorSymbol = $Symbol.iterator || "@@iterator",
71
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
72
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
73
- function define(obj, key, value) {
74
- return Object.defineProperty(obj, key, {
75
- value: value,
217
+ i = "function" == typeof Symbol ? Symbol : {},
218
+ a = i.iterator || "@@iterator",
219
+ c = i.asyncIterator || "@@asyncIterator",
220
+ u = i.toStringTag || "@@toStringTag";
221
+ function define(t, e, r) {
222
+ return Object.defineProperty(t, e, {
223
+ value: r,
76
224
  enumerable: !0,
77
225
  configurable: !0,
78
226
  writable: !0
79
- }), obj[key];
227
+ }), t[e];
80
228
  }
81
229
  try {
82
230
  define({}, "");
83
- } catch (err) {
84
- define = function (obj, key, value) {
85
- return obj[key] = value;
231
+ } catch (t) {
232
+ define = function (t, e, r) {
233
+ return t[e] = r;
86
234
  };
87
235
  }
88
- function wrap(innerFn, outerFn, self, tryLocsList) {
89
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
90
- generator = Object.create(protoGenerator.prototype),
91
- context = new Context(tryLocsList || []);
92
- return defineProperty(generator, "_invoke", {
93
- value: makeInvokeMethod(innerFn, self, context)
94
- }), generator;
236
+ function wrap(t, e, r, n) {
237
+ var i = e && e.prototype instanceof Generator ? e : Generator,
238
+ a = Object.create(i.prototype),
239
+ c = new Context(n || []);
240
+ return o(a, "_invoke", {
241
+ value: makeInvokeMethod(t, r, c)
242
+ }), a;
95
243
  }
96
- function tryCatch(fn, obj, arg) {
244
+ function tryCatch(t, e, r) {
97
245
  try {
98
246
  return {
99
247
  type: "normal",
100
- arg: fn.call(obj, arg)
248
+ arg: t.call(e, r)
101
249
  };
102
- } catch (err) {
250
+ } catch (t) {
103
251
  return {
104
252
  type: "throw",
105
- arg: err
253
+ arg: t
106
254
  };
107
255
  }
108
256
  }
109
- exports.wrap = wrap;
110
- var ContinueSentinel = {};
257
+ e.wrap = wrap;
258
+ var h = "suspendedStart",
259
+ l = "suspendedYield",
260
+ f = "executing",
261
+ s = "completed",
262
+ y = {};
111
263
  function Generator() {}
112
264
  function GeneratorFunction() {}
113
265
  function GeneratorFunctionPrototype() {}
114
- var IteratorPrototype = {};
115
- define(IteratorPrototype, iteratorSymbol, function () {
266
+ var p = {};
267
+ define(p, a, function () {
116
268
  return this;
117
269
  });
118
- var getProto = Object.getPrototypeOf,
119
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
120
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
121
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
122
- function defineIteratorMethods(prototype) {
123
- ["next", "throw", "return"].forEach(function (method) {
124
- define(prototype, method, function (arg) {
125
- return this._invoke(method, arg);
270
+ var d = Object.getPrototypeOf,
271
+ v = d && d(d(values([])));
272
+ v && v !== r && n.call(v, a) && (p = v);
273
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
274
+ function defineIteratorMethods(t) {
275
+ ["next", "throw", "return"].forEach(function (e) {
276
+ define(t, e, function (t) {
277
+ return this._invoke(e, t);
126
278
  });
127
279
  });
128
280
  }
129
- function AsyncIterator(generator, PromiseImpl) {
130
- function invoke(method, arg, resolve, reject) {
131
- var record = tryCatch(generator[method], generator, arg);
132
- if ("throw" !== record.type) {
133
- var result = record.arg,
134
- value = result.value;
135
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
136
- invoke("next", value, resolve, reject);
137
- }, function (err) {
138
- invoke("throw", err, resolve, reject);
139
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
140
- result.value = unwrapped, resolve(result);
141
- }, function (error) {
142
- return invoke("throw", error, resolve, reject);
281
+ function AsyncIterator(t, e) {
282
+ function invoke(r, o, i, a) {
283
+ var c = tryCatch(t[r], t, o);
284
+ if ("throw" !== c.type) {
285
+ var u = c.arg,
286
+ h = u.value;
287
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
288
+ invoke("next", t, i, a);
289
+ }, function (t) {
290
+ invoke("throw", t, i, a);
291
+ }) : e.resolve(h).then(function (t) {
292
+ u.value = t, i(u);
293
+ }, function (t) {
294
+ return invoke("throw", t, i, a);
143
295
  });
144
296
  }
145
- reject(record.arg);
297
+ a(c.arg);
146
298
  }
147
- var previousPromise;
148
- defineProperty(this, "_invoke", {
149
- value: function (method, arg) {
299
+ var r;
300
+ o(this, "_invoke", {
301
+ value: function (t, n) {
150
302
  function callInvokeWithMethodAndArg() {
151
- return new PromiseImpl(function (resolve, reject) {
152
- invoke(method, arg, resolve, reject);
303
+ return new e(function (e, r) {
304
+ invoke(t, n, e, r);
153
305
  });
154
306
  }
155
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
307
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
156
308
  }
157
309
  });
158
310
  }
159
- function makeInvokeMethod(innerFn, self, context) {
160
- var state = "suspendedStart";
161
- return function (method, arg) {
162
- if ("executing" === state) throw new Error("Generator is already running");
163
- if ("completed" === state) {
164
- if ("throw" === method) throw arg;
165
- return doneResult();
311
+ function makeInvokeMethod(e, r, n) {
312
+ var o = h;
313
+ return function (i, a) {
314
+ if (o === f) throw Error("Generator is already running");
315
+ if (o === s) {
316
+ if ("throw" === i) throw a;
317
+ return {
318
+ value: t,
319
+ done: !0
320
+ };
166
321
  }
167
- for (context.method = method, context.arg = arg;;) {
168
- var delegate = context.delegate;
169
- if (delegate) {
170
- var delegateResult = maybeInvokeDelegate(delegate, context);
171
- if (delegateResult) {
172
- if (delegateResult === ContinueSentinel) continue;
173
- return delegateResult;
322
+ for (n.method = i, n.arg = a;;) {
323
+ var c = n.delegate;
324
+ if (c) {
325
+ var u = maybeInvokeDelegate(c, n);
326
+ if (u) {
327
+ if (u === y) continue;
328
+ return u;
174
329
  }
175
330
  }
176
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
177
- if ("suspendedStart" === state) throw state = "completed", context.arg;
178
- context.dispatchException(context.arg);
179
- } else "return" === context.method && context.abrupt("return", context.arg);
180
- state = "executing";
181
- var record = tryCatch(innerFn, self, context);
182
- if ("normal" === record.type) {
183
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
331
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
332
+ if (o === h) throw o = s, n.arg;
333
+ n.dispatchException(n.arg);
334
+ } else "return" === n.method && n.abrupt("return", n.arg);
335
+ o = f;
336
+ var p = tryCatch(e, r, n);
337
+ if ("normal" === p.type) {
338
+ if (o = n.done ? s : l, p.arg === y) continue;
184
339
  return {
185
- value: record.arg,
186
- done: context.done
340
+ value: p.arg,
341
+ done: n.done
187
342
  };
188
343
  }
189
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
344
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
190
345
  }
191
346
  };
192
347
  }
193
- function maybeInvokeDelegate(delegate, context) {
194
- var methodName = context.method,
195
- method = delegate.iterator[methodName];
196
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
197
- var record = tryCatch(method, delegate.iterator, context.arg);
198
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
199
- var info = record.arg;
200
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
348
+ function maybeInvokeDelegate(e, r) {
349
+ var n = r.method,
350
+ o = e.iterator[n];
351
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
352
+ var i = tryCatch(o, e.iterator, r.arg);
353
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
354
+ var a = i.arg;
355
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
201
356
  }
202
- function pushTryEntry(locs) {
203
- var entry = {
204
- tryLoc: locs[0]
357
+ function pushTryEntry(t) {
358
+ var e = {
359
+ tryLoc: t[0]
205
360
  };
206
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
361
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
207
362
  }
208
- function resetTryEntry(entry) {
209
- var record = entry.completion || {};
210
- record.type = "normal", delete record.arg, entry.completion = record;
363
+ function resetTryEntry(t) {
364
+ var e = t.completion || {};
365
+ e.type = "normal", delete e.arg, t.completion = e;
211
366
  }
212
- function Context(tryLocsList) {
367
+ function Context(t) {
213
368
  this.tryEntries = [{
214
369
  tryLoc: "root"
215
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
370
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
216
371
  }
217
- function values(iterable) {
218
- if (iterable) {
219
- var iteratorMethod = iterable[iteratorSymbol];
220
- if (iteratorMethod) return iteratorMethod.call(iterable);
221
- if ("function" == typeof iterable.next) return iterable;
222
- if (!isNaN(iterable.length)) {
223
- var i = -1,
224
- next = function next() {
225
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
226
- return next.value = undefined, next.done = !0, next;
372
+ function values(e) {
373
+ if (e || "" === e) {
374
+ var r = e[a];
375
+ if (r) return r.call(e);
376
+ if ("function" == typeof e.next) return e;
377
+ if (!isNaN(e.length)) {
378
+ var o = -1,
379
+ i = function next() {
380
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
381
+ return next.value = t, next.done = !0, next;
227
382
  };
228
- return next.next = next;
383
+ return i.next = i;
229
384
  }
230
385
  }
231
- return {
232
- next: doneResult
233
- };
386
+ throw new TypeError(typeof e + " is not iterable");
234
387
  }
235
- function doneResult() {
236
- return {
237
- value: undefined,
238
- done: !0
239
- };
240
- }
241
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
388
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
242
389
  value: GeneratorFunctionPrototype,
243
390
  configurable: !0
244
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
391
+ }), o(GeneratorFunctionPrototype, "constructor", {
245
392
  value: GeneratorFunction,
246
393
  configurable: !0
247
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
248
- var ctor = "function" == typeof genFun && genFun.constructor;
249
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
250
- }, exports.mark = function (genFun) {
251
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
252
- }, exports.awrap = function (arg) {
394
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
395
+ var e = "function" == typeof t && t.constructor;
396
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
397
+ }, e.mark = function (t) {
398
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
399
+ }, e.awrap = function (t) {
253
400
  return {
254
- __await: arg
401
+ __await: t
255
402
  };
256
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
403
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
257
404
  return this;
258
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
259
- void 0 === PromiseImpl && (PromiseImpl = Promise);
260
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
261
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
262
- return result.done ? result.value : iter.next();
405
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
406
+ void 0 === i && (i = Promise);
407
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
408
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
409
+ return t.done ? t.value : a.next();
263
410
  });
264
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
411
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
265
412
  return this;
266
- }), define(Gp, "toString", function () {
413
+ }), define(g, "toString", function () {
267
414
  return "[object Generator]";
268
- }), exports.keys = function (val) {
269
- var object = Object(val),
270
- keys = [];
271
- for (var key in object) keys.push(key);
272
- return keys.reverse(), function next() {
273
- for (; keys.length;) {
274
- var key = keys.pop();
275
- if (key in object) return next.value = key, next.done = !1, next;
415
+ }), e.keys = function (t) {
416
+ var e = Object(t),
417
+ r = [];
418
+ for (var n in e) r.push(n);
419
+ return r.reverse(), function next() {
420
+ for (; r.length;) {
421
+ var t = r.pop();
422
+ if (t in e) return next.value = t, next.done = !1, next;
276
423
  }
277
424
  return next.done = !0, next;
278
425
  };
279
- }, exports.values = values, Context.prototype = {
426
+ }, e.values = values, Context.prototype = {
280
427
  constructor: Context,
281
- reset: function (skipTempReset) {
282
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
428
+ reset: function (e) {
429
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
283
430
  },
284
431
  stop: function () {
285
432
  this.done = !0;
286
- var rootRecord = this.tryEntries[0].completion;
287
- if ("throw" === rootRecord.type) throw rootRecord.arg;
433
+ var t = this.tryEntries[0].completion;
434
+ if ("throw" === t.type) throw t.arg;
288
435
  return this.rval;
289
436
  },
290
- dispatchException: function (exception) {
291
- if (this.done) throw exception;
292
- var context = this;
293
- function handle(loc, caught) {
294
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
437
+ dispatchException: function (e) {
438
+ if (this.done) throw e;
439
+ var r = this;
440
+ function handle(n, o) {
441
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
295
442
  }
296
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
297
- var entry = this.tryEntries[i],
298
- record = entry.completion;
299
- if ("root" === entry.tryLoc) return handle("end");
300
- if (entry.tryLoc <= this.prev) {
301
- var hasCatch = hasOwn.call(entry, "catchLoc"),
302
- hasFinally = hasOwn.call(entry, "finallyLoc");
303
- if (hasCatch && hasFinally) {
304
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
305
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
306
- } else if (hasCatch) {
307
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
443
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
444
+ var i = this.tryEntries[o],
445
+ a = i.completion;
446
+ if ("root" === i.tryLoc) return handle("end");
447
+ if (i.tryLoc <= this.prev) {
448
+ var c = n.call(i, "catchLoc"),
449
+ u = n.call(i, "finallyLoc");
450
+ if (c && u) {
451
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
452
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
453
+ } else if (c) {
454
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
308
455
  } else {
309
- if (!hasFinally) throw new Error("try statement without catch or finally");
310
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
456
+ if (!u) throw Error("try statement without catch or finally");
457
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
311
458
  }
312
459
  }
313
460
  }
314
461
  },
315
- abrupt: function (type, arg) {
316
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
317
- var entry = this.tryEntries[i];
318
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
319
- var finallyEntry = entry;
462
+ abrupt: function (t, e) {
463
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
464
+ var o = this.tryEntries[r];
465
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
466
+ var i = o;
320
467
  break;
321
468
  }
322
469
  }
323
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
324
- var record = finallyEntry ? finallyEntry.completion : {};
325
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
470
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
471
+ var a = i ? i.completion : {};
472
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
326
473
  },
327
- complete: function (record, afterLoc) {
328
- if ("throw" === record.type) throw record.arg;
329
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
474
+ complete: function (t, e) {
475
+ if ("throw" === t.type) throw t.arg;
476
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
330
477
  },
331
- finish: function (finallyLoc) {
332
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
333
- var entry = this.tryEntries[i];
334
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
478
+ finish: function (t) {
479
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
480
+ var r = this.tryEntries[e];
481
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
335
482
  }
336
483
  },
337
- catch: function (tryLoc) {
338
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
339
- var entry = this.tryEntries[i];
340
- if (entry.tryLoc === tryLoc) {
341
- var record = entry.completion;
342
- if ("throw" === record.type) {
343
- var thrown = record.arg;
344
- resetTryEntry(entry);
484
+ catch: function (t) {
485
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
486
+ var r = this.tryEntries[e];
487
+ if (r.tryLoc === t) {
488
+ var n = r.completion;
489
+ if ("throw" === n.type) {
490
+ var o = n.arg;
491
+ resetTryEntry(r);
345
492
  }
346
- return thrown;
493
+ return o;
347
494
  }
348
495
  }
349
- throw new Error("illegal catch attempt");
496
+ throw Error("illegal catch attempt");
350
497
  },
351
- delegateYield: function (iterable, resultName, nextLoc) {
498
+ delegateYield: function (e, r, n) {
352
499
  return this.delegate = {
353
- iterator: values(iterable),
354
- resultName: resultName,
355
- nextLoc: nextLoc
356
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
500
+ iterator: values(e),
501
+ resultName: r,
502
+ nextLoc: n
503
+ }, "next" === this.method && (this.arg = t), y;
357
504
  }
358
- }, exports;
505
+ }, e;
359
506
  }
360
- function _typeof(obj) {
361
- "@babel/helpers - typeof";
362
-
363
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
364
- return typeof obj;
365
- } : function (obj) {
366
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
367
- }, _typeof(obj);
507
+ function _slicedToArray(r, e) {
508
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
368
509
  }
369
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
370
- try {
371
- var info = gen[key](arg);
372
- var value = info.value;
373
- } catch (error) {
374
- reject(error);
375
- return;
376
- }
377
- if (info.done) {
378
- resolve(value);
379
- } else {
380
- Promise.resolve(value).then(_next, _throw);
381
- }
382
- }
383
- function _asyncToGenerator(fn) {
384
- return function () {
385
- var self = this,
386
- args = arguments;
387
- return new Promise(function (resolve, reject) {
388
- var gen = fn.apply(self, args);
389
- function _next(value) {
390
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
391
- }
392
- function _throw(err) {
393
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
394
- }
395
- _next(undefined);
396
- });
397
- };
510
+ function _toConsumableArray(r) {
511
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
398
512
  }
399
- function _classCallCheck(instance, Constructor) {
400
- if (!(instance instanceof Constructor)) {
401
- throw new TypeError("Cannot call a class as a function");
402
- }
403
- }
404
- function _defineProperties(target, props) {
405
- for (var i = 0; i < props.length; i++) {
406
- var descriptor = props[i];
407
- descriptor.enumerable = descriptor.enumerable || false;
408
- descriptor.configurable = true;
409
- if ("value" in descriptor) descriptor.writable = true;
410
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
411
- }
412
- }
413
- function _createClass(Constructor, protoProps, staticProps) {
414
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
415
- if (staticProps) _defineProperties(Constructor, staticProps);
416
- Object.defineProperty(Constructor, "prototype", {
417
- writable: false
418
- });
419
- return Constructor;
420
- }
421
- function _defineProperty(obj, key, value) {
422
- key = _toPropertyKey(key);
423
- if (key in obj) {
424
- Object.defineProperty(obj, key, {
425
- value: value,
426
- enumerable: true,
427
- configurable: true,
428
- writable: true
429
- });
430
- } else {
431
- obj[key] = value;
432
- }
433
- return obj;
434
- }
435
- function _extends$1() {
436
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
437
- for (var i = 1; i < arguments.length; i++) {
438
- var source = arguments[i];
439
- for (var key in source) {
440
- if (Object.prototype.hasOwnProperty.call(source, key)) {
441
- target[key] = source[key];
442
- }
443
- }
444
- }
445
- return target;
446
- };
447
- return _extends$1.apply(this, arguments);
448
- }
449
- function _objectDestructuringEmpty(obj) {
450
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
451
- }
452
- function _objectWithoutPropertiesLoose(source, excluded) {
453
- if (source == null) return {};
454
- var target = {};
455
- var sourceKeys = Object.keys(source);
456
- var key, i;
457
- for (i = 0; i < sourceKeys.length; i++) {
458
- key = sourceKeys[i];
459
- if (excluded.indexOf(key) >= 0) continue;
460
- target[key] = source[key];
461
- }
462
- return target;
463
- }
464
- function _objectWithoutProperties(source, excluded) {
465
- if (source == null) return {};
466
- var target = _objectWithoutPropertiesLoose(source, excluded);
467
- var key, i;
468
- if (Object.getOwnPropertySymbols) {
469
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
470
- for (i = 0; i < sourceSymbolKeys.length; i++) {
471
- key = sourceSymbolKeys[i];
472
- if (excluded.indexOf(key) >= 0) continue;
473
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
474
- target[key] = source[key];
475
- }
513
+ function _toPrimitive(t, r) {
514
+ if ("object" != typeof t || !t) return t;
515
+ var e = t[Symbol.toPrimitive];
516
+ if (void 0 !== e) {
517
+ var i = e.call(t, r || "default");
518
+ if ("object" != typeof i) return i;
519
+ throw new TypeError("@@toPrimitive must return a primitive value.");
476
520
  }
477
- return target;
478
- }
479
- function _slicedToArray(arr, i) {
480
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
481
- }
482
- function _toConsumableArray(arr) {
483
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
484
- }
485
- function _arrayWithoutHoles(arr) {
486
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
521
+ return ("string" === r ? String : Number)(t);
487
522
  }
488
- function _arrayWithHoles(arr) {
489
- if (Array.isArray(arr)) return arr;
523
+ function _toPropertyKey(t) {
524
+ var i = _toPrimitive(t, "string");
525
+ return "symbol" == typeof i ? i : i + "";
490
526
  }
491
- function _iterableToArray(iter) {
492
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
493
- }
494
- function _unsupportedIterableToArray(o, minLen) {
495
- if (!o) return;
496
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
497
- var n = Object.prototype.toString.call(o).slice(8, -1);
498
- if (n === "Object" && o.constructor) n = o.constructor.name;
499
- if (n === "Map" || n === "Set") return Array.from(o);
500
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
501
- }
502
- function _arrayLikeToArray(arr, len) {
503
- if (len == null || len > arr.length) len = arr.length;
504
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
505
- return arr2;
506
- }
507
- function _nonIterableSpread() {
508
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
509
- }
510
- function _nonIterableRest() {
511
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
512
- }
513
- function _createForOfIteratorHelper(o, allowArrayLike) {
514
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
515
- if (!it) {
516
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
517
- if (it) o = it;
518
- var i = 0;
519
- var F = function () {};
520
- return {
521
- s: F,
522
- n: function () {
523
- if (i >= o.length) return {
524
- done: true
525
- };
526
- return {
527
- done: false,
528
- value: o[i++]
529
- };
530
- },
531
- e: function (e) {
532
- throw e;
533
- },
534
- f: F
535
- };
536
- }
537
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
538
- }
539
- var normalCompletion = true,
540
- didErr = false,
541
- err;
542
- return {
543
- s: function () {
544
- it = it.call(o);
545
- },
546
- n: function () {
547
- var step = it.next();
548
- normalCompletion = step.done;
549
- return step;
550
- },
551
- e: function (e) {
552
- didErr = true;
553
- err = e;
554
- },
555
- f: function () {
556
- try {
557
- if (!normalCompletion && it.return != null) it.return();
558
- } finally {
559
- if (didErr) throw err;
560
- }
561
- }
562
- };
563
- }
564
- function _toPrimitive(input, hint) {
565
- if (typeof input !== "object" || input === null) return input;
566
- var prim = input[Symbol.toPrimitive];
567
- if (prim !== undefined) {
568
- var res = prim.call(input, hint || "default");
569
- if (typeof res !== "object") return res;
570
- throw new TypeError("@@toPrimitive must return a primitive value.");
527
+ function _typeof(o) {
528
+ "@babel/helpers - typeof";
529
+
530
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
531
+ return typeof o;
532
+ } : function (o) {
533
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
534
+ }, _typeof(o);
535
+ }
536
+ function _unsupportedIterableToArray(r, a) {
537
+ if (r) {
538
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
539
+ var t = {}.toString.call(r).slice(8, -1);
540
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
571
541
  }
572
- return (hint === "string" ? String : Number)(input);
573
- }
574
- function _toPropertyKey(arg) {
575
- var key = _toPrimitive(arg, "string");
576
- return typeof key === "symbol" ? key : String(key);
577
542
  }
578
543
 
579
544
  // eslint-disable-next-line no-new-func
@@ -652,7 +617,6 @@
652
617
  integer: undefined,
653
618
  number: undefined // 默认初始化值(number类型0值会有特殊含义)
654
619
  };
655
-
656
620
  switch (type) {
657
621
  case 'any':
658
622
  return undefined;
@@ -830,7 +794,7 @@
830
794
  // 每种Schema type对于的处理器
831
795
  this.fields = new Map();
832
796
  }
833
- _createClass(Registry, [{
797
+ return _createClass(Registry, [{
834
798
  key: "addComponentsMap",
835
799
  value: function addComponentsMap() {
836
800
  var coms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -887,7 +851,6 @@
887
851
  });
888
852
  }
889
853
  }]);
890
- return Registry;
891
854
  }();
892
855
  // 全局命名空间
893
856
  Registry.namespace = 'bk';
@@ -902,7 +865,7 @@
902
865
  _classCallCheck(this, Schema);
903
866
  Schema.rootSchema = rootSchema;
904
867
  }
905
- _createClass(Schema, null, [{
868
+ return _createClass(Schema, null, [{
906
869
  key: "resolveRef",
907
870
  value: function resolveRef() {}
908
871
  }, {
@@ -1169,7 +1132,6 @@
1169
1132
  }
1170
1133
  }
1171
1134
  }]);
1172
- return Schema;
1173
1135
  }();
1174
1136
  Schema.rootSchema = void 0;
1175
1137
 
@@ -1188,7 +1150,7 @@
1188
1150
  this.layout = this.parseLayout(layout);
1189
1151
  }
1190
1152
  }
1191
- _createClass(Layout, [{
1153
+ return _createClass(Layout, [{
1192
1154
  key: "transformValueToPixel",
1193
1155
  value: function transformValueToPixel(value) {
1194
1156
  if (typeof value === 'number') {
@@ -1319,7 +1281,6 @@
1319
1281
  return layoutConfig;
1320
1282
  }
1321
1283
  }]);
1322
- return Layout;
1323
1284
  }();
1324
1285
 
1325
1286
  function createProxy(schema, context) {
@@ -1337,7 +1298,7 @@
1337
1298
  function Path() {
1338
1299
  _classCallCheck(this, Path);
1339
1300
  }
1340
- _createClass(Path, null, [{
1301
+ return _createClass(Path, null, [{
1341
1302
  key: "getCurPath",
1342
1303
  value: function getCurPath(parent, current) {
1343
1304
  return parent === '' ? current : [parent, current].join(this.separator);
@@ -1391,11 +1352,9 @@
1391
1352
  if (arrPath.length <= 1) {
1392
1353
  return ''; // root path
1393
1354
  }
1394
-
1395
1355
  return arrPath.slice(0, arrPath.length - 1).join(this.separator);
1396
1356
  }
1397
1357
  }]);
1398
- return Path;
1399
1358
  }();
1400
1359
  Path.separator = '.';
1401
1360
 
@@ -1408,7 +1367,7 @@
1408
1367
  headers: {},
1409
1368
  cache: 'no-cache'
1410
1369
  };
1411
- var request = /*#__PURE__*/(function () {
1370
+ var request = ( /*#__PURE__*/(function () {
1412
1371
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
1413
1372
  var config,
1414
1373
  _mergeDeep,
@@ -1518,7 +1477,7 @@
1518
1477
  return function (_x) {
1519
1478
  return _ref.apply(this, arguments);
1520
1479
  };
1521
- })();
1480
+ })());
1522
1481
 
1523
1482
  var props$1 = {
1524
1483
  // 表单值
@@ -1580,7 +1539,6 @@
1580
1539
  };
1581
1540
  }
1582
1541
  },
1583
-
1584
1542
  readonly: {
1585
1543
  type: Boolean,
1586
1544
  default: false
@@ -1663,7 +1621,6 @@
1663
1621
  };
1664
1622
  }
1665
1623
  },
1666
-
1667
1624
  visible: {
1668
1625
  type: Boolean,
1669
1626
  default: true
@@ -1814,7 +1771,7 @@
1814
1771
  this.children = children;
1815
1772
  }
1816
1773
  // 当前node的值
1817
- _createClass(WidgetNode, [{
1774
+ return _createClass(WidgetNode, [{
1818
1775
  key: "value",
1819
1776
  get: function get() {
1820
1777
  var _this$instance;
@@ -1914,14 +1871,13 @@
1914
1871
  return nodes;
1915
1872
  }
1916
1873
  }]);
1917
- return WidgetNode;
1918
1874
  }();
1919
1875
  var WidgetTree = /*#__PURE__*/function () {
1920
1876
  function WidgetTree() {
1921
1877
  _classCallCheck(this, WidgetTree);
1922
1878
  this.widgetMap = {};
1923
1879
  }
1924
- _createClass(WidgetTree, [{
1880
+ return _createClass(WidgetTree, [{
1925
1881
  key: "addWidgetNode",
1926
1882
  value: function addWidgetNode(path, instance, type, index) {
1927
1883
  if (path === '') {
@@ -1978,7 +1934,6 @@
1978
1934
  }
1979
1935
  }
1980
1936
  }]);
1981
- return WidgetTree;
1982
1937
  }();
1983
1938
  var widgetTree = new WidgetTree();
1984
1939
 
@@ -2299,7 +2254,7 @@
2299
2254
  (function (UsedValueState) {
2300
2255
  UsedValueState[UsedValueState["Started"] = 0] = "Started";
2301
2256
  UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
2302
- })(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {}));
2257
+ })(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
2303
2258
  exports.varKinds = {
2304
2259
  const: new code_1.Name("const"),
2305
2260
  let: new code_1.Name("let"),
@@ -3131,11 +3086,10 @@
3131
3086
 
3132
3087
  var util = {};
3133
3088
 
3134
- (function (exports) {
3135
- Object.defineProperty(exports, "__esModule", { value: true });
3136
- exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
3137
- const codegen_1 = codegen;
3138
- const code_1 = code$1;
3089
+ Object.defineProperty(util, "__esModule", { value: true });
3090
+ util.checkStrictMode = util.getErrorPath = util.Type = util.useFunc = util.setEvaluated = util.evaluatedPropsToName = util.mergeEvaluated = util.eachItem = util.unescapeJsonPointer = util.escapeJsonPointer = util.escapeFragment = util.unescapeFragment = util.schemaRefOrVal = util.schemaHasRulesButRef = util.schemaHasRules = util.checkUnknownRules = util.alwaysValidSchema = util.toHash = void 0;
3091
+ const codegen_1$v = codegen;
3092
+ const code_1$a = code$1;
3139
3093
  // TODO refactor to use Set
3140
3094
  function toHash(arr) {
3141
3095
  const hash = {};
@@ -3143,7 +3097,7 @@
3143
3097
  hash[item] = true;
3144
3098
  return hash;
3145
3099
  }
3146
- exports.toHash = toHash;
3100
+ util.toHash = toHash;
3147
3101
  function alwaysValidSchema(it, schema) {
3148
3102
  if (typeof schema == "boolean")
3149
3103
  return schema;
@@ -3152,7 +3106,7 @@
3152
3106
  checkUnknownRules(it, schema);
3153
3107
  return !schemaHasRules(schema, it.self.RULES.all);
3154
3108
  }
3155
- exports.alwaysValidSchema = alwaysValidSchema;
3109
+ util.alwaysValidSchema = alwaysValidSchema;
3156
3110
  function checkUnknownRules(it, schema = it.schema) {
3157
3111
  const { opts, self } = it;
3158
3112
  if (!opts.strictSchema)
@@ -3165,7 +3119,7 @@
3165
3119
  checkStrictMode(it, `unknown keyword: "${key}"`);
3166
3120
  }
3167
3121
  }
3168
- exports.checkUnknownRules = checkUnknownRules;
3122
+ util.checkUnknownRules = checkUnknownRules;
3169
3123
  function schemaHasRules(schema, rules) {
3170
3124
  if (typeof schema == "boolean")
3171
3125
  return !schema;
@@ -3174,7 +3128,7 @@
3174
3128
  return true;
3175
3129
  return false;
3176
3130
  }
3177
- exports.schemaHasRules = schemaHasRules;
3131
+ util.schemaHasRules = schemaHasRules;
3178
3132
  function schemaHasRulesButRef(schema, RULES) {
3179
3133
  if (typeof schema == "boolean")
3180
3134
  return !schema;
@@ -3183,35 +3137,35 @@
3183
3137
  return true;
3184
3138
  return false;
3185
3139
  }
3186
- exports.schemaHasRulesButRef = schemaHasRulesButRef;
3140
+ util.schemaHasRulesButRef = schemaHasRulesButRef;
3187
3141
  function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
3188
3142
  if (!$data) {
3189
3143
  if (typeof schema == "number" || typeof schema == "boolean")
3190
3144
  return schema;
3191
3145
  if (typeof schema == "string")
3192
- return (0, codegen_1._) `${schema}`;
3146
+ return (0, codegen_1$v._) `${schema}`;
3193
3147
  }
3194
- return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
3148
+ return (0, codegen_1$v._) `${topSchemaRef}${schemaPath}${(0, codegen_1$v.getProperty)(keyword)}`;
3195
3149
  }
3196
- exports.schemaRefOrVal = schemaRefOrVal;
3150
+ util.schemaRefOrVal = schemaRefOrVal;
3197
3151
  function unescapeFragment(str) {
3198
3152
  return unescapeJsonPointer(decodeURIComponent(str));
3199
3153
  }
3200
- exports.unescapeFragment = unescapeFragment;
3154
+ util.unescapeFragment = unescapeFragment;
3201
3155
  function escapeFragment(str) {
3202
3156
  return encodeURIComponent(escapeJsonPointer(str));
3203
3157
  }
3204
- exports.escapeFragment = escapeFragment;
3158
+ util.escapeFragment = escapeFragment;
3205
3159
  function escapeJsonPointer(str) {
3206
3160
  if (typeof str == "number")
3207
3161
  return `${str}`;
3208
3162
  return str.replace(/~/g, "~0").replace(/\//g, "~1");
3209
3163
  }
3210
- exports.escapeJsonPointer = escapeJsonPointer;
3164
+ util.escapeJsonPointer = escapeJsonPointer;
3211
3165
  function unescapeJsonPointer(str) {
3212
3166
  return str.replace(/~1/g, "/").replace(/~0/g, "~");
3213
3167
  }
3214
- exports.unescapeJsonPointer = unescapeJsonPointer;
3168
+ util.unescapeJsonPointer = unescapeJsonPointer;
3215
3169
  function eachItem(xs, f) {
3216
3170
  if (Array.isArray(xs)) {
3217
3171
  for (const x of xs)
@@ -3221,30 +3175,30 @@
3221
3175
  f(xs);
3222
3176
  }
3223
3177
  }
3224
- exports.eachItem = eachItem;
3178
+ util.eachItem = eachItem;
3225
3179
  function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {
3226
3180
  return (gen, from, to, toName) => {
3227
3181
  const res = to === undefined
3228
3182
  ? from
3229
- : to instanceof codegen_1.Name
3230
- ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
3231
- : from instanceof codegen_1.Name
3183
+ : to instanceof codegen_1$v.Name
3184
+ ? (from instanceof codegen_1$v.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
3185
+ : from instanceof codegen_1$v.Name
3232
3186
  ? (mergeToName(gen, to, from), from)
3233
3187
  : mergeValues(from, to);
3234
- return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
3188
+ return toName === codegen_1$v.Name && !(res instanceof codegen_1$v.Name) ? resultToName(gen, res) : res;
3235
3189
  };
3236
3190
  }
3237
- exports.mergeEvaluated = {
3191
+ util.mergeEvaluated = {
3238
3192
  props: makeMergeEvaluated({
3239
- mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {
3240
- gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));
3193
+ mergeNames: (gen, from, to) => gen.if((0, codegen_1$v._) `${to} !== true && ${from} !== undefined`, () => {
3194
+ gen.if((0, codegen_1$v._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1$v._) `${to} || {}`).code((0, codegen_1$v._) `Object.assign(${to}, ${from})`));
3241
3195
  }),
3242
- mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {
3196
+ mergeToName: (gen, from, to) => gen.if((0, codegen_1$v._) `${to} !== true`, () => {
3243
3197
  if (from === true) {
3244
3198
  gen.assign(to, true);
3245
3199
  }
3246
3200
  else {
3247
- gen.assign(to, (0, codegen_1._) `${to} || {}`);
3201
+ gen.assign(to, (0, codegen_1$v._) `${to} || {}`);
3248
3202
  setEvaluated(gen, to, from);
3249
3203
  }
3250
3204
  }),
@@ -3252,8 +3206,8 @@
3252
3206
  resultToName: evaluatedPropsToName,
3253
3207
  }),
3254
3208
  items: makeMergeEvaluated({
3255
- mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
3256
- mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),
3209
+ mergeNames: (gen, from, to) => gen.if((0, codegen_1$v._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1$v._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
3210
+ mergeToName: (gen, from, to) => gen.if((0, codegen_1$v._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1$v._) `${to} > ${from} ? ${to} : ${from}`)),
3257
3211
  mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),
3258
3212
  resultToName: (gen, items) => gen.var("items", items),
3259
3213
  }),
@@ -3261,44 +3215,44 @@
3261
3215
  function evaluatedPropsToName(gen, ps) {
3262
3216
  if (ps === true)
3263
3217
  return gen.var("props", true);
3264
- const props = gen.var("props", (0, codegen_1._) `{}`);
3218
+ const props = gen.var("props", (0, codegen_1$v._) `{}`);
3265
3219
  if (ps !== undefined)
3266
3220
  setEvaluated(gen, props, ps);
3267
3221
  return props;
3268
3222
  }
3269
- exports.evaluatedPropsToName = evaluatedPropsToName;
3223
+ util.evaluatedPropsToName = evaluatedPropsToName;
3270
3224
  function setEvaluated(gen, props, ps) {
3271
- Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));
3225
+ Object.keys(ps).forEach((p) => gen.assign((0, codegen_1$v._) `${props}${(0, codegen_1$v.getProperty)(p)}`, true));
3272
3226
  }
3273
- exports.setEvaluated = setEvaluated;
3227
+ util.setEvaluated = setEvaluated;
3274
3228
  const snippets = {};
3275
3229
  function useFunc(gen, f) {
3276
3230
  return gen.scopeValue("func", {
3277
3231
  ref: f,
3278
- code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),
3232
+ code: snippets[f.code] || (snippets[f.code] = new code_1$a._Code(f.code)),
3279
3233
  });
3280
3234
  }
3281
- exports.useFunc = useFunc;
3235
+ util.useFunc = useFunc;
3282
3236
  var Type;
3283
3237
  (function (Type) {
3284
3238
  Type[Type["Num"] = 0] = "Num";
3285
3239
  Type[Type["Str"] = 1] = "Str";
3286
- })(Type = exports.Type || (exports.Type = {}));
3240
+ })(Type || (util.Type = Type = {}));
3287
3241
  function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
3288
3242
  // let path
3289
- if (dataProp instanceof codegen_1.Name) {
3243
+ if (dataProp instanceof codegen_1$v.Name) {
3290
3244
  const isNumber = dataPropType === Type.Num;
3291
3245
  return jsPropertySyntax
3292
3246
  ? isNumber
3293
- ? (0, codegen_1._) `"[" + ${dataProp} + "]"`
3294
- : (0, codegen_1._) `"['" + ${dataProp} + "']"`
3247
+ ? (0, codegen_1$v._) `"[" + ${dataProp} + "]"`
3248
+ : (0, codegen_1$v._) `"['" + ${dataProp} + "']"`
3295
3249
  : isNumber
3296
- ? (0, codegen_1._) `"/" + ${dataProp}`
3297
- : (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer
3250
+ ? (0, codegen_1$v._) `"/" + ${dataProp}`
3251
+ : (0, codegen_1$v._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer
3298
3252
  }
3299
- return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
3253
+ return jsPropertySyntax ? (0, codegen_1$v.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
3300
3254
  }
3301
- exports.getErrorPath = getErrorPath;
3255
+ util.getErrorPath = getErrorPath;
3302
3256
  function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
3303
3257
  if (!mode)
3304
3258
  return;
@@ -3307,36 +3261,34 @@
3307
3261
  throw new Error(msg);
3308
3262
  it.self.logger.warn(msg);
3309
3263
  }
3310
- exports.checkStrictMode = checkStrictMode;
3311
-
3312
- }(util));
3264
+ util.checkStrictMode = checkStrictMode;
3313
3265
 
3314
3266
  var names$1 = {};
3315
3267
 
3316
3268
  Object.defineProperty(names$1, "__esModule", { value: true });
3317
- const codegen_1$t = codegen;
3269
+ const codegen_1$u = codegen;
3318
3270
  const names = {
3319
3271
  // validation function arguments
3320
- data: new codegen_1$t.Name("data"),
3272
+ data: new codegen_1$u.Name("data"), // data passed to validation function
3321
3273
  // args passed from referencing schema
3322
- valCxt: new codegen_1$t.Name("valCxt"),
3323
- instancePath: new codegen_1$t.Name("instancePath"),
3324
- parentData: new codegen_1$t.Name("parentData"),
3325
- parentDataProperty: new codegen_1$t.Name("parentDataProperty"),
3326
- rootData: new codegen_1$t.Name("rootData"),
3327
- dynamicAnchors: new codegen_1$t.Name("dynamicAnchors"),
3274
+ valCxt: new codegen_1$u.Name("valCxt"), // validation/data context - should not be used directly, it is destructured to the names below
3275
+ instancePath: new codegen_1$u.Name("instancePath"),
3276
+ parentData: new codegen_1$u.Name("parentData"),
3277
+ parentDataProperty: new codegen_1$u.Name("parentDataProperty"),
3278
+ rootData: new codegen_1$u.Name("rootData"), // root data - same as the data passed to the first/top validation function
3279
+ dynamicAnchors: new codegen_1$u.Name("dynamicAnchors"), // used to support recursiveRef and dynamicRef
3328
3280
  // function scoped variables
3329
- vErrors: new codegen_1$t.Name("vErrors"),
3330
- errors: new codegen_1$t.Name("errors"),
3331
- this: new codegen_1$t.Name("this"),
3281
+ vErrors: new codegen_1$u.Name("vErrors"), // null or array of validation errors
3282
+ errors: new codegen_1$u.Name("errors"), // counter of validation errors
3283
+ this: new codegen_1$u.Name("this"),
3332
3284
  // "globals"
3333
- self: new codegen_1$t.Name("self"),
3334
- scope: new codegen_1$t.Name("scope"),
3285
+ self: new codegen_1$u.Name("self"),
3286
+ scope: new codegen_1$u.Name("scope"),
3335
3287
  // JTD serialize/parse name for JSON string and position
3336
- json: new codegen_1$t.Name("json"),
3337
- jsonPos: new codegen_1$t.Name("jsonPos"),
3338
- jsonLen: new codegen_1$t.Name("jsonLen"),
3339
- jsonPart: new codegen_1$t.Name("jsonPart"),
3288
+ json: new codegen_1$u.Name("json"),
3289
+ jsonPos: new codegen_1$u.Name("jsonPos"),
3290
+ jsonLen: new codegen_1$u.Name("jsonLen"),
3291
+ jsonPart: new codegen_1$u.Name("jsonPart"),
3340
3292
  };
3341
3293
  names$1.default = names;
3342
3294
 
@@ -3414,7 +3366,7 @@
3414
3366
  }
3415
3367
  const E = {
3416
3368
  keyword: new codegen_1.Name("keyword"),
3417
- schemaPath: new codegen_1.Name("schemaPath"),
3369
+ schemaPath: new codegen_1.Name("schemaPath"), // also used in JTD errors
3418
3370
  params: new codegen_1.Name("params"),
3419
3371
  propertyName: new codegen_1.Name("propertyName"),
3420
3372
  message: new codegen_1.Name("message"),
@@ -3467,8 +3419,8 @@
3467
3419
 
3468
3420
  Object.defineProperty(boolSchema, "__esModule", { value: true });
3469
3421
  boolSchema.boolOrEmptySchema = boolSchema.topBoolOrEmptySchema = void 0;
3470
- const errors_1$2 = errors;
3471
- const codegen_1$s = codegen;
3422
+ const errors_1$3 = errors;
3423
+ const codegen_1$t = codegen;
3472
3424
  const names_1$6 = names$1;
3473
3425
  const boolError = {
3474
3426
  message: "boolean schema is false",
@@ -3482,7 +3434,7 @@
3482
3434
  gen.return(names_1$6.default.data);
3483
3435
  }
3484
3436
  else {
3485
- gen.assign((0, codegen_1$s._) `${validateName}.errors`, null);
3437
+ gen.assign((0, codegen_1$t._) `${validateName}.errors`, null);
3486
3438
  gen.return(true);
3487
3439
  }
3488
3440
  }
@@ -3511,7 +3463,7 @@
3511
3463
  params: {},
3512
3464
  it,
3513
3465
  };
3514
- (0, errors_1$2.reportError)(cxt, boolError, undefined, overrideAllErrors);
3466
+ (0, errors_1$3.reportError)(cxt, boolError, undefined, overrideAllErrors);
3515
3467
  }
3516
3468
 
3517
3469
  var dataType = {};
@@ -3563,19 +3515,18 @@
3563
3515
  }
3564
3516
  applicability.shouldUseRule = shouldUseRule;
3565
3517
 
3566
- (function (exports) {
3567
- Object.defineProperty(exports, "__esModule", { value: true });
3568
- exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
3518
+ Object.defineProperty(dataType, "__esModule", { value: true });
3519
+ dataType.reportTypeError = dataType.checkDataTypes = dataType.checkDataType = dataType.coerceAndCheckDataType = dataType.getJSONTypes = dataType.getSchemaTypes = dataType.DataType = void 0;
3569
3520
  const rules_1 = rules;
3570
- const applicability_1 = applicability;
3571
- const errors_1 = errors;
3572
- const codegen_1 = codegen;
3573
- const util_1 = util;
3521
+ const applicability_1$1 = applicability;
3522
+ const errors_1$2 = errors;
3523
+ const codegen_1$s = codegen;
3524
+ const util_1$q = util;
3574
3525
  var DataType;
3575
3526
  (function (DataType) {
3576
3527
  DataType[DataType["Correct"] = 0] = "Correct";
3577
3528
  DataType[DataType["Wrong"] = 1] = "Wrong";
3578
- })(DataType = exports.DataType || (exports.DataType = {}));
3529
+ })(DataType || (dataType.DataType = DataType = {}));
3579
3530
  function getSchemaTypes(schema) {
3580
3531
  const types = getJSONTypes(schema.type);
3581
3532
  const hasNull = types.includes("null");
@@ -3592,19 +3543,20 @@
3592
3543
  }
3593
3544
  return types;
3594
3545
  }
3595
- exports.getSchemaTypes = getSchemaTypes;
3546
+ dataType.getSchemaTypes = getSchemaTypes;
3547
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
3596
3548
  function getJSONTypes(ts) {
3597
3549
  const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
3598
3550
  if (types.every(rules_1.isJSONType))
3599
3551
  return types;
3600
3552
  throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
3601
3553
  }
3602
- exports.getJSONTypes = getJSONTypes;
3554
+ dataType.getJSONTypes = getJSONTypes;
3603
3555
  function coerceAndCheckDataType(it, types) {
3604
3556
  const { gen, data, opts } = it;
3605
3557
  const coerceTo = coerceToTypes(types, opts.coerceTypes);
3606
3558
  const checkTypes = types.length > 0 &&
3607
- !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
3559
+ !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1$1.schemaHasRulesForType)(it, types[0]));
3608
3560
  if (checkTypes) {
3609
3561
  const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
3610
3562
  gen.if(wrongType, () => {
@@ -3616,7 +3568,7 @@
3616
3568
  }
3617
3569
  return checkTypes;
3618
3570
  }
3619
- exports.coerceAndCheckDataType = coerceAndCheckDataType;
3571
+ dataType.coerceAndCheckDataType = coerceAndCheckDataType;
3620
3572
  const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]);
3621
3573
  function coerceToTypes(types, coerceTypes) {
3622
3574
  return coerceTypes
@@ -3625,15 +3577,15 @@
3625
3577
  }
3626
3578
  function coerceData(it, types, coerceTo) {
3627
3579
  const { gen, data, opts } = it;
3628
- const dataType = gen.let("dataType", (0, codegen_1._) `typeof ${data}`);
3629
- const coerced = gen.let("coerced", (0, codegen_1._) `undefined`);
3580
+ const dataType = gen.let("dataType", (0, codegen_1$s._) `typeof ${data}`);
3581
+ const coerced = gen.let("coerced", (0, codegen_1$s._) `undefined`);
3630
3582
  if (opts.coerceTypes === "array") {
3631
- gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen
3632
- .assign(data, (0, codegen_1._) `${data}[0]`)
3633
- .assign(dataType, (0, codegen_1._) `typeof ${data}`)
3583
+ gen.if((0, codegen_1$s._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen
3584
+ .assign(data, (0, codegen_1$s._) `${data}[0]`)
3585
+ .assign(dataType, (0, codegen_1$s._) `typeof ${data}`)
3634
3586
  .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
3635
3587
  }
3636
- gen.if((0, codegen_1._) `${coerced} !== undefined`);
3588
+ gen.if((0, codegen_1$s._) `${coerced} !== undefined`);
3637
3589
  for (const t of coerceTo) {
3638
3590
  if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) {
3639
3591
  coerceSpecificType(t);
@@ -3642,7 +3594,7 @@
3642
3594
  gen.else();
3643
3595
  reportTypeError(it);
3644
3596
  gen.endIf();
3645
- gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {
3597
+ gen.if((0, codegen_1$s._) `${coerced} !== undefined`, () => {
3646
3598
  gen.assign(data, coerced);
3647
3599
  assignParentData(it, coerced);
3648
3600
  });
@@ -3650,108 +3602,108 @@
3650
3602
  switch (t) {
3651
3603
  case "string":
3652
3604
  gen
3653
- .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`)
3654
- .assign(coerced, (0, codegen_1._) `"" + ${data}`)
3655
- .elseIf((0, codegen_1._) `${data} === null`)
3656
- .assign(coerced, (0, codegen_1._) `""`);
3605
+ .elseIf((0, codegen_1$s._) `${dataType} == "number" || ${dataType} == "boolean"`)
3606
+ .assign(coerced, (0, codegen_1$s._) `"" + ${data}`)
3607
+ .elseIf((0, codegen_1$s._) `${data} === null`)
3608
+ .assign(coerced, (0, codegen_1$s._) `""`);
3657
3609
  return;
3658
3610
  case "number":
3659
3611
  gen
3660
- .elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null
3612
+ .elseIf((0, codegen_1$s._) `${dataType} == "boolean" || ${data} === null
3661
3613
  || (${dataType} == "string" && ${data} && ${data} == +${data})`)
3662
- .assign(coerced, (0, codegen_1._) `+${data}`);
3614
+ .assign(coerced, (0, codegen_1$s._) `+${data}`);
3663
3615
  return;
3664
3616
  case "integer":
3665
3617
  gen
3666
- .elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null
3618
+ .elseIf((0, codegen_1$s._) `${dataType} === "boolean" || ${data} === null
3667
3619
  || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`)
3668
- .assign(coerced, (0, codegen_1._) `+${data}`);
3620
+ .assign(coerced, (0, codegen_1$s._) `+${data}`);
3669
3621
  return;
3670
3622
  case "boolean":
3671
3623
  gen
3672
- .elseIf((0, codegen_1._) `${data} === "false" || ${data} === 0 || ${data} === null`)
3624
+ .elseIf((0, codegen_1$s._) `${data} === "false" || ${data} === 0 || ${data} === null`)
3673
3625
  .assign(coerced, false)
3674
- .elseIf((0, codegen_1._) `${data} === "true" || ${data} === 1`)
3626
+ .elseIf((0, codegen_1$s._) `${data} === "true" || ${data} === 1`)
3675
3627
  .assign(coerced, true);
3676
3628
  return;
3677
3629
  case "null":
3678
- gen.elseIf((0, codegen_1._) `${data} === "" || ${data} === 0 || ${data} === false`);
3630
+ gen.elseIf((0, codegen_1$s._) `${data} === "" || ${data} === 0 || ${data} === false`);
3679
3631
  gen.assign(coerced, null);
3680
3632
  return;
3681
3633
  case "array":
3682
3634
  gen
3683
- .elseIf((0, codegen_1._) `${dataType} === "string" || ${dataType} === "number"
3635
+ .elseIf((0, codegen_1$s._) `${dataType} === "string" || ${dataType} === "number"
3684
3636
  || ${dataType} === "boolean" || ${data} === null`)
3685
- .assign(coerced, (0, codegen_1._) `[${data}]`);
3637
+ .assign(coerced, (0, codegen_1$s._) `[${data}]`);
3686
3638
  }
3687
3639
  }
3688
3640
  }
3689
3641
  function assignParentData({ gen, parentData, parentDataProperty }, expr) {
3690
3642
  // TODO use gen.property
3691
- gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));
3643
+ gen.if((0, codegen_1$s._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1$s._) `${parentData}[${parentDataProperty}]`, expr));
3692
3644
  }
3693
3645
  function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
3694
- const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
3646
+ const EQ = correct === DataType.Correct ? codegen_1$s.operators.EQ : codegen_1$s.operators.NEQ;
3695
3647
  let cond;
3696
3648
  switch (dataType) {
3697
3649
  case "null":
3698
- return (0, codegen_1._) `${data} ${EQ} null`;
3650
+ return (0, codegen_1$s._) `${data} ${EQ} null`;
3699
3651
  case "array":
3700
- cond = (0, codegen_1._) `Array.isArray(${data})`;
3652
+ cond = (0, codegen_1$s._) `Array.isArray(${data})`;
3701
3653
  break;
3702
3654
  case "object":
3703
- cond = (0, codegen_1._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
3655
+ cond = (0, codegen_1$s._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
3704
3656
  break;
3705
3657
  case "integer":
3706
- cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);
3658
+ cond = numCond((0, codegen_1$s._) `!(${data} % 1) && !isNaN(${data})`);
3707
3659
  break;
3708
3660
  case "number":
3709
3661
  cond = numCond();
3710
3662
  break;
3711
3663
  default:
3712
- return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;
3664
+ return (0, codegen_1$s._) `typeof ${data} ${EQ} ${dataType}`;
3713
3665
  }
3714
- return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
3715
- function numCond(_cond = codegen_1.nil) {
3716
- return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);
3666
+ return correct === DataType.Correct ? cond : (0, codegen_1$s.not)(cond);
3667
+ function numCond(_cond = codegen_1$s.nil) {
3668
+ return (0, codegen_1$s.and)((0, codegen_1$s._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1$s._) `isFinite(${data})` : codegen_1$s.nil);
3717
3669
  }
3718
3670
  }
3719
- exports.checkDataType = checkDataType;
3671
+ dataType.checkDataType = checkDataType;
3720
3672
  function checkDataTypes(dataTypes, data, strictNums, correct) {
3721
3673
  if (dataTypes.length === 1) {
3722
3674
  return checkDataType(dataTypes[0], data, strictNums, correct);
3723
3675
  }
3724
3676
  let cond;
3725
- const types = (0, util_1.toHash)(dataTypes);
3677
+ const types = (0, util_1$q.toHash)(dataTypes);
3726
3678
  if (types.array && types.object) {
3727
- const notObj = (0, codegen_1._) `typeof ${data} != "object"`;
3728
- cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;
3679
+ const notObj = (0, codegen_1$s._) `typeof ${data} != "object"`;
3680
+ cond = types.null ? notObj : (0, codegen_1$s._) `!${data} || ${notObj}`;
3729
3681
  delete types.null;
3730
3682
  delete types.array;
3731
3683
  delete types.object;
3732
3684
  }
3733
3685
  else {
3734
- cond = codegen_1.nil;
3686
+ cond = codegen_1$s.nil;
3735
3687
  }
3736
3688
  if (types.number)
3737
3689
  delete types.integer;
3738
3690
  for (const t in types)
3739
- cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
3691
+ cond = (0, codegen_1$s.and)(cond, checkDataType(t, data, strictNums, correct));
3740
3692
  return cond;
3741
3693
  }
3742
- exports.checkDataTypes = checkDataTypes;
3694
+ dataType.checkDataTypes = checkDataTypes;
3743
3695
  const typeError = {
3744
3696
  message: ({ schema }) => `must be ${schema}`,
3745
- params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,
3697
+ params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1$s._) `{type: ${schema}}` : (0, codegen_1$s._) `{type: ${schemaValue}}`,
3746
3698
  };
3747
3699
  function reportTypeError(it) {
3748
3700
  const cxt = getTypeErrorContext(it);
3749
- (0, errors_1.reportError)(cxt, typeError);
3701
+ (0, errors_1$2.reportError)(cxt, typeError);
3750
3702
  }
3751
- exports.reportTypeError = reportTypeError;
3703
+ dataType.reportTypeError = reportTypeError;
3752
3704
  function getTypeErrorContext(it) {
3753
3705
  const { gen, data, schema } = it;
3754
- const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
3706
+ const schemaCode = (0, util_1$q.schemaRefOrVal)(it, schema, "type");
3755
3707
  return {
3756
3708
  gen,
3757
3709
  keyword: "type",
@@ -3765,8 +3717,6 @@
3765
3717
  };
3766
3718
  }
3767
3719
 
3768
- }(dataType));
3769
-
3770
3720
  var defaults = {};
3771
3721
 
3772
3722
  Object.defineProperty(defaults, "__esModule", { value: true });
@@ -4388,16 +4338,16 @@
4388
4338
  if (parentJsonPtr === undefined)
4389
4339
  return;
4390
4340
  const fullPath = pathPrefix + jsonPtr;
4391
- let baseId = baseIds[parentJsonPtr];
4341
+ let innerBaseId = baseIds[parentJsonPtr];
4392
4342
  if (typeof sch[schemaId] == "string")
4393
- baseId = addRef.call(this, sch[schemaId]);
4343
+ innerBaseId = addRef.call(this, sch[schemaId]);
4394
4344
  addAnchor.call(this, sch.$anchor);
4395
4345
  addAnchor.call(this, sch.$dynamicAnchor);
4396
- baseIds[jsonPtr] = baseId;
4346
+ baseIds[jsonPtr] = innerBaseId;
4397
4347
  function addRef(ref) {
4398
4348
  // eslint-disable-next-line @typescript-eslint/unbound-method
4399
4349
  const _resolve = this.opts.uriResolver.resolve;
4400
- ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);
4350
+ ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);
4401
4351
  if (schemaRefs.has(ref))
4402
4352
  throw ambiguos(ref);
4403
4353
  schemaRefs.add(ref);
@@ -5038,7 +4988,7 @@
5038
4988
  parentData: names_1$2.default.parentData,
5039
4989
  parentDataProperty: names_1$2.default.parentDataProperty,
5040
4990
  dataNames: [names_1$2.default.data],
5041
- dataPathArr: [codegen_1$m.nil],
4991
+ dataPathArr: [codegen_1$m.nil], // TODO can its length be used as dataLevel if nil is removed?
5042
4992
  dataLevel: 0,
5043
4993
  dataTypes: [],
5044
4994
  definedProperties: new Set(),
@@ -6807,6 +6757,7 @@
6807
6757
  return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined);
6808
6758
  }
6809
6759
  validate(schemaKeyRef, // key, ref or schema object
6760
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6810
6761
  data // to be validated
6811
6762
  ) {
6812
6763
  let v;
@@ -7155,9 +7106,9 @@
7155
7106
  }
7156
7107
  }
7157
7108
  }
7158
- exports.default = Ajv;
7159
7109
  Ajv.ValidationError = validation_error_1.default;
7160
7110
  Ajv.MissingRefError = ref_error_1.default;
7111
+ exports.default = Ajv;
7161
7112
  function checkOptions(checkOpts, options, msg, log = "error") {
7162
7113
  for (const key in checkOpts) {
7163
7114
  const opt = key;
@@ -7305,7 +7256,7 @@
7305
7256
 
7306
7257
  Object.defineProperty(ref, "__esModule", { value: true });
7307
7258
  ref.callRef = ref.getValidate = void 0;
7308
- const ref_error_1 = ref_error;
7259
+ const ref_error_1$1 = ref_error;
7309
7260
  const code_1$8 = code;
7310
7261
  const codegen_1$l = codegen;
7311
7262
  const names_1$1 = names$1;
@@ -7322,7 +7273,7 @@
7322
7273
  return callRootRef();
7323
7274
  const schOrEnv = compile_1$1.resolveRef.call(self, root, baseId, $ref);
7324
7275
  if (schOrEnv === undefined)
7325
- throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
7276
+ throw new ref_error_1$1.default(it.opts.uriResolver, baseId, $ref);
7326
7277
  if (schOrEnv instanceof compile_1$1.SchemaEnv)
7327
7278
  return callValidate(schOrEnv);
7328
7279
  return inlineRefSchema(schOrEnv);
@@ -8883,20 +8834,19 @@
8883
8834
 
8884
8835
  var types = {};
8885
8836
 
8886
- (function (exports) {
8887
- Object.defineProperty(exports, "__esModule", { value: true });
8888
- exports.DiscrError = void 0;
8837
+ Object.defineProperty(types, "__esModule", { value: true });
8838
+ types.DiscrError = void 0;
8839
+ var DiscrError;
8889
8840
  (function (DiscrError) {
8890
8841
  DiscrError["Tag"] = "tag";
8891
8842
  DiscrError["Mapping"] = "mapping";
8892
- })(exports.DiscrError || (exports.DiscrError = {}));
8893
-
8894
- }(types));
8843
+ })(DiscrError || (types.DiscrError = DiscrError = {}));
8895
8844
 
8896
8845
  Object.defineProperty(discriminator, "__esModule", { value: true });
8897
8846
  const codegen_1 = codegen;
8898
8847
  const types_1 = types;
8899
8848
  const compile_1 = compile;
8849
+ const ref_error_1 = ref_error;
8900
8850
  const util_1 = util;
8901
8851
  const error = {
8902
8852
  message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag
@@ -8951,9 +8901,12 @@
8951
8901
  for (let i = 0; i < oneOf.length; i++) {
8952
8902
  let sch = oneOf[i];
8953
8903
  if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
8954
- sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
8904
+ const ref = sch.$ref;
8905
+ sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
8955
8906
  if (sch instanceof compile_1.SchemaEnv)
8956
8907
  sch = sch.schema;
8908
+ if (sch === undefined)
8909
+ throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
8957
8910
  }
8958
8911
  const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
8959
8912
  if (typeof propSch != "object") {
@@ -9246,7 +9199,7 @@
9246
9199
 
9247
9200
  (function (module, exports) {
9248
9201
  Object.defineProperty(exports, "__esModule", { value: true });
9249
- exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
9202
+ exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
9250
9203
  const core_1 = core$2;
9251
9204
  const draft7_1 = draft7;
9252
9205
  const discriminator_1 = discriminator;
@@ -9275,7 +9228,9 @@
9275
9228
  super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
9276
9229
  }
9277
9230
  }
9231
+ exports.Ajv = Ajv;
9278
9232
  module.exports = exports = Ajv;
9233
+ module.exports.Ajv = Ajv;
9279
9234
  Object.defineProperty(exports, "__esModule", { value: true });
9280
9235
  exports.default = Ajv;
9281
9236
  var validate_1 = validate$1;
@@ -9846,7 +9801,7 @@
9846
9801
  var _instance$schema;
9847
9802
  // TODO 校验逻辑梳理
9848
9803
  var formItem = widgetTree.widgetMap[path];
9849
- if (!formItem) return {
9804
+ if (!formItem || !formItem.instance) return {
9850
9805
  result: true,
9851
9806
  message: '',
9852
9807
  path: ''
@@ -9998,7 +9953,7 @@
9998
9953
  this.callbacks = void 0;
9999
9954
  this.callbacks = Object.create(null);
10000
9955
  }
10001
- _createClass(FormEvent, [{
9956
+ return _createClass(FormEvent, [{
10002
9957
  key: "on",
10003
9958
  value: function on(path, type, cb) {
10004
9959
  if (!(path in this.callbacks)) {
@@ -10070,7 +10025,6 @@
10070
10025
  }
10071
10026
  }
10072
10027
  }]);
10073
- return FormEvent;
10074
10028
  }();
10075
10029
  var events = new FormEvent();
10076
10030
 
@@ -10523,7 +10477,6 @@
10523
10477
  layout: _objectSpread2(_objectSpread2({}, _this.layout), {}, {
10524
10478
  item: {} // todo: 暂时不支持数组项之间的布局
10525
10479
  }),
10526
-
10527
10480
  removeable: true
10528
10481
  }),
10529
10482
  on: _objectSpread2(_objectSpread2({}, _this.$listeners), {}, {
@@ -10541,7 +10494,6 @@
10541
10494
  layout: {},
10542
10495
  showTitle: true // 数组类型默认展示分组title
10543
10496
  }),
10544
-
10545
10497
  style: _objectSpread2({}, this.layout.item || {})
10546
10498
  }, vnode), [].concat(_toConsumableArray(arrVnodeList), [h(registry.getBaseWidget('form-item'), {
10547
10499
  class: {
@@ -11055,7 +11007,7 @@
11055
11007
  default: function _default(props) {
11056
11008
  return h(SchemaField, {
11057
11009
  props: _objectSpread2(_objectSpread2({}, _this2.$props), {}, {
11058
- schema: mergeDeep(colField, {
11010
+ schema: mergeDeep({}, colField, {
11059
11011
  'ui:props': {
11060
11012
  // 默认不展示标题
11061
11013
  showTitle: false,
@@ -11228,7 +11180,6 @@
11228
11180
  display: 'grid',
11229
11181
  gridGap: '20px' // 未设置layout的布局组的默认样式
11230
11182
  });
11231
-
11232
11183
  var self = this;
11233
11184
  var renderDelete = function renderDelete() {
11234
11185
  return h('span', {
@@ -11332,7 +11283,6 @@
11332
11283
  gridGap: '20px',
11333
11284
  'grid-template-columns': defaultCols // 默认配置
11334
11285
  });
11335
-
11336
11286
  var self = this;
11337
11287
  var dealSchema = function dealSchema(schema) {
11338
11288
  return (
@@ -11455,7 +11405,6 @@
11455
11405
  layout: _objectSpread2(_objectSpread2({}, this.layout), {}, {
11456
11406
  container: {} // Tab组的容器layout由panel内容控制
11457
11407
  }),
11458
-
11459
11408
  title: this.schema.title
11460
11409
  });
11461
11410
  var self = this;
@@ -11488,7 +11437,6 @@
11488
11437
  layout: layoutConfig,
11489
11438
  removeable: false // todo: 不往下传递可删除属性
11490
11439
  }),
11491
-
11492
11440
  on: _objectSpread2({}, _this.$listeners)
11493
11441
  })]);
11494
11442
  }))]);
@@ -11550,7 +11498,6 @@
11550
11498
  layout: _objectSpread2(_objectSpread2({}, this.layout), {}, {
11551
11499
  container: {} // Tab组的容器layout由panel内容控制
11552
11500
  }),
11553
-
11554
11501
  title: this.schema.title
11555
11502
  });
11556
11503
  var properties = orderProperties(Object.keys(((_this$schema = this.schema) === null || _this$schema === void 0 ? void 0 : _this$schema.properties) || {}), this.schema['ui:order']);
@@ -11585,7 +11532,6 @@
11585
11532
  layout: layoutConfig,
11586
11533
  removeable: false // todo: 不往下传递可删除属性
11587
11534
  }),
11588
-
11589
11535
  on: _objectSpread2({}, _this.$listeners)
11590
11536
  })])]);
11591
11537
  });