@bigbinary/neeto-rules-frontend 0.3.6 → 0.4.0
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/dist/index.cjs.js +463 -460
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +463 -461
- package/dist/index.js.map +1 -1
- package/package.json +77 -71
- package/types.d.ts +70 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactRouterDom = require('react-router-dom');
|
|
7
|
+
var shallow = require('zustand/shallow');
|
|
7
8
|
var classNames = require('classnames');
|
|
8
9
|
var formik = require('formik');
|
|
9
10
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
@@ -11,13 +12,14 @@ var formik$1 = require('@bigbinary/neetoui/formik');
|
|
|
11
12
|
var i18next = require('i18next');
|
|
12
13
|
var yup = require('yup');
|
|
13
14
|
var neetoEditor = require('@bigbinary/neeto-editor');
|
|
15
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
16
|
+
var zustand = require('zustand');
|
|
14
17
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
15
18
|
var neetoui = require('@bigbinary/neetoui');
|
|
16
19
|
var reactI18next = require('react-i18next');
|
|
17
20
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
18
21
|
var ramda = require('ramda');
|
|
19
22
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
20
|
-
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
21
23
|
|
|
22
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
25
|
|
|
@@ -48,14 +50,14 @@ function _objectDestructuringEmpty(obj) {
|
|
|
48
50
|
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
function _typeof$1(
|
|
53
|
+
function _typeof$1(o) {
|
|
52
54
|
"@babel/helpers - typeof";
|
|
53
55
|
|
|
54
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
55
|
-
return typeof
|
|
56
|
-
} : function (
|
|
57
|
-
return
|
|
58
|
-
}, _typeof$1(
|
|
56
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
57
|
+
return typeof o;
|
|
58
|
+
} : function (o) {
|
|
59
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
60
|
+
}, _typeof$1(o);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
function _toPrimitive(input, hint) {
|
|
@@ -118,392 +120,12 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
118
120
|
return target;
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
122
|
-
try {
|
|
123
|
-
var info = gen[key](arg);
|
|
124
|
-
var value = info.value;
|
|
125
|
-
} catch (error) {
|
|
126
|
-
reject(error);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (info.done) {
|
|
130
|
-
resolve(value);
|
|
131
|
-
} else {
|
|
132
|
-
Promise.resolve(value).then(_next, _throw);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function _asyncToGenerator(fn) {
|
|
136
|
-
return function () {
|
|
137
|
-
var self = this,
|
|
138
|
-
args = arguments;
|
|
139
|
-
return new Promise(function (resolve, reject) {
|
|
140
|
-
var gen = fn.apply(self, args);
|
|
141
|
-
function _next(value) {
|
|
142
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
143
|
-
}
|
|
144
|
-
function _throw(err) {
|
|
145
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
146
|
-
}
|
|
147
|
-
_next(undefined);
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
123
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
153
124
|
|
|
154
125
|
function getDefaultExportFromCjs (x) {
|
|
155
126
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
156
127
|
}
|
|
157
128
|
|
|
158
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
159
|
-
|
|
160
|
-
var _typeof = {exports: {}};
|
|
161
|
-
|
|
162
|
-
_typeof.exports;
|
|
163
|
-
|
|
164
|
-
(function (module) {
|
|
165
|
-
function _typeof(obj) {
|
|
166
|
-
"@babel/helpers - typeof";
|
|
167
|
-
|
|
168
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
169
|
-
return typeof obj;
|
|
170
|
-
} : function (obj) {
|
|
171
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
172
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
173
|
-
}
|
|
174
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
175
|
-
} (_typeof));
|
|
176
|
-
|
|
177
|
-
var _typeofExports = _typeof.exports;
|
|
178
|
-
|
|
179
|
-
regeneratorRuntime$1.exports;
|
|
180
|
-
|
|
181
|
-
(function (module) {
|
|
182
|
-
var _typeof = _typeofExports["default"];
|
|
183
|
-
function _regeneratorRuntime() {
|
|
184
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
185
|
-
return exports;
|
|
186
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
187
|
-
var exports = {},
|
|
188
|
-
Op = Object.prototype,
|
|
189
|
-
hasOwn = Op.hasOwnProperty,
|
|
190
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
191
|
-
obj[key] = desc.value;
|
|
192
|
-
},
|
|
193
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
194
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
195
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
196
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
197
|
-
function define(obj, key, value) {
|
|
198
|
-
return Object.defineProperty(obj, key, {
|
|
199
|
-
value: value,
|
|
200
|
-
enumerable: !0,
|
|
201
|
-
configurable: !0,
|
|
202
|
-
writable: !0
|
|
203
|
-
}), obj[key];
|
|
204
|
-
}
|
|
205
|
-
try {
|
|
206
|
-
define({}, "");
|
|
207
|
-
} catch (err) {
|
|
208
|
-
define = function define(obj, key, value) {
|
|
209
|
-
return obj[key] = value;
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
213
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
214
|
-
generator = Object.create(protoGenerator.prototype),
|
|
215
|
-
context = new Context(tryLocsList || []);
|
|
216
|
-
return defineProperty(generator, "_invoke", {
|
|
217
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
218
|
-
}), generator;
|
|
219
|
-
}
|
|
220
|
-
function tryCatch(fn, obj, arg) {
|
|
221
|
-
try {
|
|
222
|
-
return {
|
|
223
|
-
type: "normal",
|
|
224
|
-
arg: fn.call(obj, arg)
|
|
225
|
-
};
|
|
226
|
-
} catch (err) {
|
|
227
|
-
return {
|
|
228
|
-
type: "throw",
|
|
229
|
-
arg: err
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
exports.wrap = wrap;
|
|
234
|
-
var ContinueSentinel = {};
|
|
235
|
-
function Generator() {}
|
|
236
|
-
function GeneratorFunction() {}
|
|
237
|
-
function GeneratorFunctionPrototype() {}
|
|
238
|
-
var IteratorPrototype = {};
|
|
239
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
240
|
-
return this;
|
|
241
|
-
});
|
|
242
|
-
var getProto = Object.getPrototypeOf,
|
|
243
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
244
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
245
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
246
|
-
function defineIteratorMethods(prototype) {
|
|
247
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
248
|
-
define(prototype, method, function (arg) {
|
|
249
|
-
return this._invoke(method, arg);
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
254
|
-
function invoke(method, arg, resolve, reject) {
|
|
255
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
256
|
-
if ("throw" !== record.type) {
|
|
257
|
-
var result = record.arg,
|
|
258
|
-
value = result.value;
|
|
259
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
260
|
-
invoke("next", value, resolve, reject);
|
|
261
|
-
}, function (err) {
|
|
262
|
-
invoke("throw", err, resolve, reject);
|
|
263
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
264
|
-
result.value = unwrapped, resolve(result);
|
|
265
|
-
}, function (error) {
|
|
266
|
-
return invoke("throw", error, resolve, reject);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
reject(record.arg);
|
|
270
|
-
}
|
|
271
|
-
var previousPromise;
|
|
272
|
-
defineProperty(this, "_invoke", {
|
|
273
|
-
value: function value(method, arg) {
|
|
274
|
-
function callInvokeWithMethodAndArg() {
|
|
275
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
276
|
-
invoke(method, arg, resolve, reject);
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
284
|
-
var state = "suspendedStart";
|
|
285
|
-
return function (method, arg) {
|
|
286
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
287
|
-
if ("completed" === state) {
|
|
288
|
-
if ("throw" === method) throw arg;
|
|
289
|
-
return doneResult();
|
|
290
|
-
}
|
|
291
|
-
for (context.method = method, context.arg = arg;;) {
|
|
292
|
-
var delegate = context.delegate;
|
|
293
|
-
if (delegate) {
|
|
294
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
295
|
-
if (delegateResult) {
|
|
296
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
297
|
-
return delegateResult;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
301
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
302
|
-
context.dispatchException(context.arg);
|
|
303
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
304
|
-
state = "executing";
|
|
305
|
-
var record = tryCatch(innerFn, self, context);
|
|
306
|
-
if ("normal" === record.type) {
|
|
307
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
308
|
-
return {
|
|
309
|
-
value: record.arg,
|
|
310
|
-
done: context.done
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
318
|
-
var methodName = context.method,
|
|
319
|
-
method = delegate.iterator[methodName];
|
|
320
|
-
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;
|
|
321
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
322
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
323
|
-
var info = record.arg;
|
|
324
|
-
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);
|
|
325
|
-
}
|
|
326
|
-
function pushTryEntry(locs) {
|
|
327
|
-
var entry = {
|
|
328
|
-
tryLoc: locs[0]
|
|
329
|
-
};
|
|
330
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
331
|
-
}
|
|
332
|
-
function resetTryEntry(entry) {
|
|
333
|
-
var record = entry.completion || {};
|
|
334
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
335
|
-
}
|
|
336
|
-
function Context(tryLocsList) {
|
|
337
|
-
this.tryEntries = [{
|
|
338
|
-
tryLoc: "root"
|
|
339
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
340
|
-
}
|
|
341
|
-
function values(iterable) {
|
|
342
|
-
if (iterable) {
|
|
343
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
344
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
345
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
346
|
-
if (!isNaN(iterable.length)) {
|
|
347
|
-
var i = -1,
|
|
348
|
-
next = function next() {
|
|
349
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
350
|
-
return next.value = undefined, next.done = !0, next;
|
|
351
|
-
};
|
|
352
|
-
return next.next = next;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
next: doneResult
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function doneResult() {
|
|
360
|
-
return {
|
|
361
|
-
value: undefined,
|
|
362
|
-
done: !0
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
366
|
-
value: GeneratorFunctionPrototype,
|
|
367
|
-
configurable: !0
|
|
368
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
369
|
-
value: GeneratorFunction,
|
|
370
|
-
configurable: !0
|
|
371
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
372
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
373
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
374
|
-
}, exports.mark = function (genFun) {
|
|
375
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
376
|
-
}, exports.awrap = function (arg) {
|
|
377
|
-
return {
|
|
378
|
-
__await: arg
|
|
379
|
-
};
|
|
380
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
381
|
-
return this;
|
|
382
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
383
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
384
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
385
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
386
|
-
return result.done ? result.value : iter.next();
|
|
387
|
-
});
|
|
388
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
389
|
-
return this;
|
|
390
|
-
}), define(Gp, "toString", function () {
|
|
391
|
-
return "[object Generator]";
|
|
392
|
-
}), exports.keys = function (val) {
|
|
393
|
-
var object = Object(val),
|
|
394
|
-
keys = [];
|
|
395
|
-
for (var key in object) keys.push(key);
|
|
396
|
-
return keys.reverse(), function next() {
|
|
397
|
-
for (; keys.length;) {
|
|
398
|
-
var key = keys.pop();
|
|
399
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
400
|
-
}
|
|
401
|
-
return next.done = !0, next;
|
|
402
|
-
};
|
|
403
|
-
}, exports.values = values, Context.prototype = {
|
|
404
|
-
constructor: Context,
|
|
405
|
-
reset: function reset(skipTempReset) {
|
|
406
|
-
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);
|
|
407
|
-
},
|
|
408
|
-
stop: function stop() {
|
|
409
|
-
this.done = !0;
|
|
410
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
411
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
412
|
-
return this.rval;
|
|
413
|
-
},
|
|
414
|
-
dispatchException: function dispatchException(exception) {
|
|
415
|
-
if (this.done) throw exception;
|
|
416
|
-
var context = this;
|
|
417
|
-
function handle(loc, caught) {
|
|
418
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
419
|
-
}
|
|
420
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
421
|
-
var entry = this.tryEntries[i],
|
|
422
|
-
record = entry.completion;
|
|
423
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
424
|
-
if (entry.tryLoc <= this.prev) {
|
|
425
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
426
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
427
|
-
if (hasCatch && hasFinally) {
|
|
428
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
429
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
430
|
-
} else if (hasCatch) {
|
|
431
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
432
|
-
} else {
|
|
433
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
434
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
abrupt: function abrupt(type, arg) {
|
|
440
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
441
|
-
var entry = this.tryEntries[i];
|
|
442
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
443
|
-
var finallyEntry = entry;
|
|
444
|
-
break;
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
448
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
449
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
450
|
-
},
|
|
451
|
-
complete: function complete(record, afterLoc) {
|
|
452
|
-
if ("throw" === record.type) throw record.arg;
|
|
453
|
-
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;
|
|
454
|
-
},
|
|
455
|
-
finish: function finish(finallyLoc) {
|
|
456
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
457
|
-
var entry = this.tryEntries[i];
|
|
458
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
"catch": function _catch(tryLoc) {
|
|
462
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
463
|
-
var entry = this.tryEntries[i];
|
|
464
|
-
if (entry.tryLoc === tryLoc) {
|
|
465
|
-
var record = entry.completion;
|
|
466
|
-
if ("throw" === record.type) {
|
|
467
|
-
var thrown = record.arg;
|
|
468
|
-
resetTryEntry(entry);
|
|
469
|
-
}
|
|
470
|
-
return thrown;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
throw new Error("illegal catch attempt");
|
|
474
|
-
},
|
|
475
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
476
|
-
return this.delegate = {
|
|
477
|
-
iterator: values(iterable),
|
|
478
|
-
resultName: resultName,
|
|
479
|
-
nextLoc: nextLoc
|
|
480
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
481
|
-
}
|
|
482
|
-
}, exports;
|
|
483
|
-
}
|
|
484
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
485
|
-
} (regeneratorRuntime$1));
|
|
486
|
-
|
|
487
|
-
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
488
|
-
|
|
489
|
-
// TODO(Babel 8): Remove this file.
|
|
490
|
-
|
|
491
|
-
var runtime = regeneratorRuntimeExports();
|
|
492
|
-
var regenerator = runtime;
|
|
493
|
-
|
|
494
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
495
|
-
try {
|
|
496
|
-
regeneratorRuntime = runtime;
|
|
497
|
-
} catch (accidentalStrictMode) {
|
|
498
|
-
if (typeof globalThis === "object") {
|
|
499
|
-
globalThis.regeneratorRuntime = runtime;
|
|
500
|
-
} else {
|
|
501
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
506
|
-
|
|
507
129
|
var propTypes = {exports: {}};
|
|
508
130
|
|
|
509
131
|
/**
|
|
@@ -707,8 +329,8 @@ var CONDITION_VALUE_TYPES = {
|
|
|
707
329
|
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
708
330
|
var MAXIMUM_OPTION_LENGTH$2 = 7;
|
|
709
331
|
|
|
710
|
-
function ownKeys$6(
|
|
711
|
-
function _objectSpread$6(
|
|
332
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
333
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
712
334
|
var getSchemaForStrings = function getSchemaForStrings(element) {
|
|
713
335
|
var label = element.label,
|
|
714
336
|
_element$componentPro = element.componentProps,
|
|
@@ -825,7 +447,7 @@ var getConditionsSchema = function getConditionsSchema(element) {
|
|
|
825
447
|
}))
|
|
826
448
|
});
|
|
827
449
|
};
|
|
828
|
-
var getActionsSchema = function getActionsSchema(element) {
|
|
450
|
+
var getActionsSchema = function getActionsSchema(element, customData) {
|
|
829
451
|
var actionOptions = element.actionOptions,
|
|
830
452
|
_element$componentPro5 = element.componentProps,
|
|
831
453
|
componentProps = _element$componentPro5 === void 0 ? {} : _element$componentPro5;
|
|
@@ -890,7 +512,7 @@ var getActionsSchema = function getActionsSchema(element) {
|
|
|
890
512
|
value: yup__namespace.string().required(i18next.t("neetoRules.validations.required.body"))
|
|
891
513
|
});
|
|
892
514
|
} else if (selectedAction !== null && selectedAction !== void 0 && selectedAction.component) {
|
|
893
|
-
return selectedAction.validation;
|
|
515
|
+
return typeof selectedAction.validation === "function" ? selectedAction.validation(customData) : selectedAction.validation;
|
|
894
516
|
}
|
|
895
517
|
return schema;
|
|
896
518
|
})
|
|
@@ -908,14 +530,14 @@ var getSchemaForArray = function getSchemaForArray(element) {
|
|
|
908
530
|
then: yup__namespace.array().min(1, i18next.t("neetoRules.validations.atLeastOneValue")).required(i18next.t("neetoRules.validations.atLeastOneValue"))
|
|
909
531
|
});
|
|
910
532
|
};
|
|
911
|
-
var getSchemaForElement = function getSchemaForElement(element) {
|
|
912
|
-
return VALIDATION_SCHEMA[element.type](element);
|
|
533
|
+
var getSchemaForElement = function getSchemaForElement(element, customData) {
|
|
534
|
+
return VALIDATION_SCHEMA[element.type](element, customData);
|
|
913
535
|
};
|
|
914
|
-
var getValidationSchema = function getValidationSchema(data) {
|
|
536
|
+
var getValidationSchema = function getValidationSchema(data, customData) {
|
|
915
537
|
var fieldKeys = Object.keys(data);
|
|
916
538
|
var schema = fieldKeys.reduce(function (acc, key) {
|
|
917
539
|
return _objectSpread$6(_objectSpread$6({}, acc), {}, _defineProperty({}, key, yup__namespace.object({
|
|
918
|
-
value: getSchemaForElement(data[key])
|
|
540
|
+
value: getSchemaForElement(data[key], customData)
|
|
919
541
|
})));
|
|
920
542
|
}, {});
|
|
921
543
|
return yup__namespace.object(schema);
|
|
@@ -937,8 +559,8 @@ var VALIDATION_SCHEMA = (_VALIDATION_SCHEMA = {}, _defineProperty(_VALIDATION_SC
|
|
|
937
559
|
var DECIMAL_NUMBER_REGEX = /^\d*\.?\d+$/;
|
|
938
560
|
var POSITIVE_NUMBER_REGEX = /^[0-9]+$/;
|
|
939
561
|
|
|
940
|
-
function ownKeys$5(
|
|
941
|
-
function _objectSpread$5(
|
|
562
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
563
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
942
564
|
var buildPayload = function buildPayload(data, values) {
|
|
943
565
|
return Object.keys(data).reduce(function (acc, key) {
|
|
944
566
|
var fieldValue = values[key].value;
|
|
@@ -973,6 +595,14 @@ var formatData = function formatData(data) {
|
|
|
973
595
|
}, {});
|
|
974
596
|
};
|
|
975
597
|
|
|
598
|
+
/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
|
|
599
|
+
var useCustomDataStore = zustand.create(reactUtils.withImmutableActions(function (set) {
|
|
600
|
+
return {
|
|
601
|
+
customData: {},
|
|
602
|
+
setCustomDataState: set
|
|
603
|
+
};
|
|
604
|
+
}));
|
|
605
|
+
|
|
976
606
|
var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
|
|
977
607
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
978
608
|
var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
@@ -1014,7 +644,7 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
|
|
|
1014
644
|
var errorFormElement = neetoCist.findBy({
|
|
1015
645
|
name: fieldErrorNames
|
|
1016
646
|
}, _toConsumableArray(formRef.current.elements));
|
|
1017
|
-
errorFormElement === null || errorFormElement === void 0
|
|
647
|
+
errorFormElement === null || errorFormElement === void 0 || errorFormElement.scrollIntoView({
|
|
1018
648
|
behavior: "smooth",
|
|
1019
649
|
block: "center"
|
|
1020
650
|
});
|
|
@@ -1024,8 +654,8 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
|
|
|
1024
654
|
};
|
|
1025
655
|
|
|
1026
656
|
var _excluded$9 = ["isSubmitting", "dirty", "values"];
|
|
1027
|
-
function ownKeys$4(
|
|
1028
|
-
function _objectSpread$4(
|
|
657
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
658
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1029
659
|
var NeetoRules$2 = function NeetoRules(_ref) {
|
|
1030
660
|
var _ref$data = _ref.data,
|
|
1031
661
|
data = _ref$data === void 0 ? {} : _ref$data,
|
|
@@ -1036,40 +666,32 @@ var NeetoRules$2 = function NeetoRules(_ref) {
|
|
|
1036
666
|
_ref$handleCancel = _ref.handleCancel,
|
|
1037
667
|
handleCancel = _ref$handleCancel === void 0 ? neetoCist.noop : _ref$handleCancel;
|
|
1038
668
|
var formRef = React.useRef(null);
|
|
1039
|
-
var submitForm =
|
|
1040
|
-
var
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
while (1) switch (_context.prev = _context.next) {
|
|
1044
|
-
case 0:
|
|
1045
|
-
payload = buildPayload(data, values);
|
|
1046
|
-
handleSubmit(payload, formikBag);
|
|
1047
|
-
case 2:
|
|
1048
|
-
case "end":
|
|
1049
|
-
return _context.stop();
|
|
1050
|
-
}
|
|
1051
|
-
}, _callee);
|
|
1052
|
-
}));
|
|
1053
|
-
return function submitForm(_x, _x2) {
|
|
1054
|
-
return _ref2.apply(this, arguments);
|
|
1055
|
-
};
|
|
1056
|
-
}();
|
|
669
|
+
var submitForm = function submitForm(values, formikBag) {
|
|
670
|
+
var payload = buildPayload(data, values);
|
|
671
|
+
handleSubmit(payload, formikBag);
|
|
672
|
+
};
|
|
1057
673
|
var initialValues = React.useMemo(function () {
|
|
1058
674
|
return formatData(data);
|
|
1059
675
|
}, [data]);
|
|
676
|
+
var _useCustomDataStore = useCustomDataStore(function (store) {
|
|
677
|
+
return {
|
|
678
|
+
customData: store["customData"]
|
|
679
|
+
};
|
|
680
|
+
}, shallow.shallow),
|
|
681
|
+
customData = _useCustomDataStore.customData;
|
|
1060
682
|
return /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
1061
683
|
initialValues: initialValues,
|
|
1062
684
|
enableReinitialize: true,
|
|
1063
|
-
validationSchema: getValidationSchema(data),
|
|
685
|
+
validationSchema: getValidationSchema(data, customData),
|
|
1064
686
|
onSubmit: submitForm
|
|
1065
|
-
}, function (
|
|
1066
|
-
var isSubmitting =
|
|
1067
|
-
dirty =
|
|
1068
|
-
values =
|
|
1069
|
-
fromikBag = _objectWithoutProperties(
|
|
687
|
+
}, function (_ref2) {
|
|
688
|
+
var isSubmitting = _ref2.isSubmitting,
|
|
689
|
+
dirty = _ref2.dirty,
|
|
690
|
+
values = _ref2.values,
|
|
691
|
+
fromikBag = _objectWithoutProperties(_ref2, _excluded$9);
|
|
1070
692
|
return /*#__PURE__*/React__default["default"].createElement(formik.Form, {
|
|
1071
|
-
|
|
1072
|
-
|
|
693
|
+
ref: formRef,
|
|
694
|
+
className: classNames__default["default"](["w-full space-y-6 px-0 md:px-14 xl:px-24", className])
|
|
1073
695
|
}, typeof children === "function" ? children === null || children === void 0 ? void 0 : children(_objectSpread$4({
|
|
1074
696
|
values: values,
|
|
1075
697
|
formattedValues: buildPayload(data, values),
|
|
@@ -1107,7 +729,7 @@ var Main = function Main(_ref) {
|
|
|
1107
729
|
|
|
1108
730
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1109
731
|
|
|
1110
|
-
var css = ".neeto-filters-error-boundary{align-items:center;background-color
|
|
732
|
+
var css = ".neeto-filters-error-boundary{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-sm);display:flex;gap:16px;margin-bottom:12px;padding:8px 20px}.neeto-filters-error-boundary p{color:rgb(var(--neeto-ui-gray-800))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL19lcnJvci1ib3VuZGFyeS5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3JjL3N0eWxlc2hlZXRzL21haW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw4QkFJRSxrQkFBQSxDQUdBLDhDQUFBLENBREEsd0NBQUEsQ0FIQSxZQUFBLENBRUEsUUFBQSxDQUhBLGtCQUFBLENBREEsZ0JDT0YsQ0RDRSxnQ0FDRSxtQ0NDSiIsInNvdXJjZXNDb250ZW50IjpbIi5uZWV0by1maWx0ZXJzLWVycm9yLWJvdW5kYXJ5IHtcbiAgcGFkZGluZzogOHB4IDIwcHg7XG4gIG1hcmdpbi1ib3R0b206IDEycHg7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGdhcDogMTZweDtcbiAgYm9yZGVyLXJhZGl1czogdmFyKC0tbmVldG8tdWktcm91bmRlZC1zbSk7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTEwMCkpO1xuXG4gIHAge1xuICAgIGNvbG9yOiByZ2IodmFyKC0tbmVldG8tdWktZ3JheS04MDApKTtcbiAgfVxufVxuIiwiLm5lZXRvLWZpbHRlcnMtZXJyb3ItYm91bmRhcnkge1xuICBwYWRkaW5nOiA4cHggMjBweDtcbiAgbWFyZ2luLWJvdHRvbTogMTJweDtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgZ2FwOiAxNnB4O1xuICBib3JkZXItcmFkaXVzOiB2YXIoLS1uZWV0by11aS1yb3VuZGVkLXNtKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiKHZhcigtLW5lZXRvLXVpLWdyYXktMTAwKSk7XG59XG4ubmVldG8tZmlsdGVycy1lcnJvci1ib3VuZGFyeSBwIHtcbiAgY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTgwMCkpO1xufSJdfQ== */";
|
|
1111
733
|
n(css,{});
|
|
1112
734
|
|
|
1113
735
|
var NeetoRules$1 = function NeetoRules(_ref) {
|
|
@@ -1119,31 +741,31 @@ function _arrayWithHoles(arr) {
|
|
|
1119
741
|
if (Array.isArray(arr)) return arr;
|
|
1120
742
|
}
|
|
1121
743
|
|
|
1122
|
-
function _iterableToArrayLimit(
|
|
1123
|
-
var
|
|
1124
|
-
if (null !=
|
|
1125
|
-
var
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
744
|
+
function _iterableToArrayLimit(r, l) {
|
|
745
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
746
|
+
if (null != t) {
|
|
747
|
+
var e,
|
|
748
|
+
n,
|
|
749
|
+
i,
|
|
750
|
+
u,
|
|
751
|
+
a = [],
|
|
752
|
+
f = !0,
|
|
753
|
+
o = !1;
|
|
1132
754
|
try {
|
|
1133
|
-
if (
|
|
1134
|
-
if (Object(
|
|
1135
|
-
|
|
1136
|
-
} else for (; !(
|
|
1137
|
-
} catch (
|
|
1138
|
-
|
|
755
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
756
|
+
if (Object(t) !== t) return;
|
|
757
|
+
f = !1;
|
|
758
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
759
|
+
} catch (r) {
|
|
760
|
+
o = !0, n = r;
|
|
1139
761
|
} finally {
|
|
1140
762
|
try {
|
|
1141
|
-
if (!
|
|
763
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1142
764
|
} finally {
|
|
1143
|
-
if (
|
|
765
|
+
if (o) throw n;
|
|
1144
766
|
}
|
|
1145
767
|
}
|
|
1146
|
-
return
|
|
768
|
+
return a;
|
|
1147
769
|
}
|
|
1148
770
|
}
|
|
1149
771
|
|
|
@@ -1649,7 +1271,7 @@ var dayjs_min = {exports: {}};
|
|
|
1649
1271
|
dayjs_min.exports;
|
|
1650
1272
|
|
|
1651
1273
|
(function (module, exports) {
|
|
1652
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof
|
|
1274
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
1653
1275
|
} (dayjs_min, dayjs_min.exports));
|
|
1654
1276
|
|
|
1655
1277
|
var dayjs_minExports = dayjs_min.exports;
|
|
@@ -2109,7 +1731,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
|
|
|
2109
1731
|
handler();
|
|
2110
1732
|
}
|
|
2111
1733
|
};
|
|
2112
|
-
(_ref$current = ref.current) === null || _ref$current === void 0
|
|
1734
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.addEventListener("keydown", listener);
|
|
2113
1735
|
return function () {
|
|
2114
1736
|
var _ref$current2;
|
|
2115
1737
|
return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.removeEventListener("keydown", listener);
|
|
@@ -2766,7 +2388,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
2766
2388
|
var handleSelectOption = function handleSelectOption(option) {
|
|
2767
2389
|
setFieldValue("".concat(name, ".name"), option.value);
|
|
2768
2390
|
setFieldValue("".concat(name, ".metadata"), {});
|
|
2769
|
-
onSelectAction === null || onSelectAction === void 0
|
|
2391
|
+
onSelectAction === null || onSelectAction === void 0 || onSelectAction(name, option);
|
|
2770
2392
|
setSearchTerm("");
|
|
2771
2393
|
};
|
|
2772
2394
|
var handleClose = function handleClose() {
|
|
@@ -2876,8 +2498,8 @@ var Card = function Card(_ref) {
|
|
|
2876
2498
|
}, children));
|
|
2877
2499
|
};
|
|
2878
2500
|
|
|
2879
|
-
function ownKeys$3(
|
|
2880
|
-
function _objectSpread$3(
|
|
2501
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2502
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2881
2503
|
var Actions = function Actions(_ref) {
|
|
2882
2504
|
var name = _ref.name,
|
|
2883
2505
|
label = _ref.label,
|
|
@@ -3464,6 +3086,386 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
|
|
|
3464
3086
|
}))));
|
|
3465
3087
|
};
|
|
3466
3088
|
|
|
3089
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3090
|
+
try {
|
|
3091
|
+
var info = gen[key](arg);
|
|
3092
|
+
var value = info.value;
|
|
3093
|
+
} catch (error) {
|
|
3094
|
+
reject(error);
|
|
3095
|
+
return;
|
|
3096
|
+
}
|
|
3097
|
+
if (info.done) {
|
|
3098
|
+
resolve(value);
|
|
3099
|
+
} else {
|
|
3100
|
+
Promise.resolve(value).then(_next, _throw);
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
function _asyncToGenerator(fn) {
|
|
3104
|
+
return function () {
|
|
3105
|
+
var self = this,
|
|
3106
|
+
args = arguments;
|
|
3107
|
+
return new Promise(function (resolve, reject) {
|
|
3108
|
+
var gen = fn.apply(self, args);
|
|
3109
|
+
function _next(value) {
|
|
3110
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3111
|
+
}
|
|
3112
|
+
function _throw(err) {
|
|
3113
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3114
|
+
}
|
|
3115
|
+
_next(undefined);
|
|
3116
|
+
});
|
|
3117
|
+
};
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
3121
|
+
|
|
3122
|
+
var _typeof = {exports: {}};
|
|
3123
|
+
|
|
3124
|
+
_typeof.exports;
|
|
3125
|
+
|
|
3126
|
+
(function (module) {
|
|
3127
|
+
function _typeof(o) {
|
|
3128
|
+
"@babel/helpers - typeof";
|
|
3129
|
+
|
|
3130
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3131
|
+
return typeof o;
|
|
3132
|
+
} : function (o) {
|
|
3133
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3134
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
3135
|
+
}
|
|
3136
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3137
|
+
} (_typeof));
|
|
3138
|
+
|
|
3139
|
+
var _typeofExports = _typeof.exports;
|
|
3140
|
+
|
|
3141
|
+
regeneratorRuntime$1.exports;
|
|
3142
|
+
|
|
3143
|
+
(function (module) {
|
|
3144
|
+
var _typeof = _typeofExports["default"];
|
|
3145
|
+
function _regeneratorRuntime() {
|
|
3146
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
3147
|
+
return e;
|
|
3148
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3149
|
+
var t,
|
|
3150
|
+
e = {},
|
|
3151
|
+
r = Object.prototype,
|
|
3152
|
+
n = r.hasOwnProperty,
|
|
3153
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
3154
|
+
t[e] = r.value;
|
|
3155
|
+
},
|
|
3156
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
3157
|
+
a = i.iterator || "@@iterator",
|
|
3158
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
3159
|
+
u = i.toStringTag || "@@toStringTag";
|
|
3160
|
+
function define(t, e, r) {
|
|
3161
|
+
return Object.defineProperty(t, e, {
|
|
3162
|
+
value: r,
|
|
3163
|
+
enumerable: !0,
|
|
3164
|
+
configurable: !0,
|
|
3165
|
+
writable: !0
|
|
3166
|
+
}), t[e];
|
|
3167
|
+
}
|
|
3168
|
+
try {
|
|
3169
|
+
define({}, "");
|
|
3170
|
+
} catch (t) {
|
|
3171
|
+
define = function define(t, e, r) {
|
|
3172
|
+
return t[e] = r;
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
function wrap(t, e, r, n) {
|
|
3176
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
3177
|
+
a = Object.create(i.prototype),
|
|
3178
|
+
c = new Context(n || []);
|
|
3179
|
+
return o(a, "_invoke", {
|
|
3180
|
+
value: makeInvokeMethod(t, r, c)
|
|
3181
|
+
}), a;
|
|
3182
|
+
}
|
|
3183
|
+
function tryCatch(t, e, r) {
|
|
3184
|
+
try {
|
|
3185
|
+
return {
|
|
3186
|
+
type: "normal",
|
|
3187
|
+
arg: t.call(e, r)
|
|
3188
|
+
};
|
|
3189
|
+
} catch (t) {
|
|
3190
|
+
return {
|
|
3191
|
+
type: "throw",
|
|
3192
|
+
arg: t
|
|
3193
|
+
};
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
e.wrap = wrap;
|
|
3197
|
+
var h = "suspendedStart",
|
|
3198
|
+
l = "suspendedYield",
|
|
3199
|
+
f = "executing",
|
|
3200
|
+
s = "completed",
|
|
3201
|
+
y = {};
|
|
3202
|
+
function Generator() {}
|
|
3203
|
+
function GeneratorFunction() {}
|
|
3204
|
+
function GeneratorFunctionPrototype() {}
|
|
3205
|
+
var p = {};
|
|
3206
|
+
define(p, a, function () {
|
|
3207
|
+
return this;
|
|
3208
|
+
});
|
|
3209
|
+
var d = Object.getPrototypeOf,
|
|
3210
|
+
v = d && d(d(values([])));
|
|
3211
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
3212
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
3213
|
+
function defineIteratorMethods(t) {
|
|
3214
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
3215
|
+
define(t, e, function (t) {
|
|
3216
|
+
return this._invoke(e, t);
|
|
3217
|
+
});
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
function AsyncIterator(t, e) {
|
|
3221
|
+
function invoke(r, o, i, a) {
|
|
3222
|
+
var c = tryCatch(t[r], t, o);
|
|
3223
|
+
if ("throw" !== c.type) {
|
|
3224
|
+
var u = c.arg,
|
|
3225
|
+
h = u.value;
|
|
3226
|
+
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
3227
|
+
invoke("next", t, i, a);
|
|
3228
|
+
}, function (t) {
|
|
3229
|
+
invoke("throw", t, i, a);
|
|
3230
|
+
}) : e.resolve(h).then(function (t) {
|
|
3231
|
+
u.value = t, i(u);
|
|
3232
|
+
}, function (t) {
|
|
3233
|
+
return invoke("throw", t, i, a);
|
|
3234
|
+
});
|
|
3235
|
+
}
|
|
3236
|
+
a(c.arg);
|
|
3237
|
+
}
|
|
3238
|
+
var r;
|
|
3239
|
+
o(this, "_invoke", {
|
|
3240
|
+
value: function value(t, n) {
|
|
3241
|
+
function callInvokeWithMethodAndArg() {
|
|
3242
|
+
return new e(function (e, r) {
|
|
3243
|
+
invoke(t, n, e, r);
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
3247
|
+
}
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
function makeInvokeMethod(e, r, n) {
|
|
3251
|
+
var o = h;
|
|
3252
|
+
return function (i, a) {
|
|
3253
|
+
if (o === f) throw new Error("Generator is already running");
|
|
3254
|
+
if (o === s) {
|
|
3255
|
+
if ("throw" === i) throw a;
|
|
3256
|
+
return {
|
|
3257
|
+
value: t,
|
|
3258
|
+
done: !0
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
for (n.method = i, n.arg = a;;) {
|
|
3262
|
+
var c = n.delegate;
|
|
3263
|
+
if (c) {
|
|
3264
|
+
var u = maybeInvokeDelegate(c, n);
|
|
3265
|
+
if (u) {
|
|
3266
|
+
if (u === y) continue;
|
|
3267
|
+
return u;
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
3271
|
+
if (o === h) throw o = s, n.arg;
|
|
3272
|
+
n.dispatchException(n.arg);
|
|
3273
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
3274
|
+
o = f;
|
|
3275
|
+
var p = tryCatch(e, r, n);
|
|
3276
|
+
if ("normal" === p.type) {
|
|
3277
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
3278
|
+
return {
|
|
3279
|
+
value: p.arg,
|
|
3280
|
+
done: n.done
|
|
3281
|
+
};
|
|
3282
|
+
}
|
|
3283
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
3284
|
+
}
|
|
3285
|
+
};
|
|
3286
|
+
}
|
|
3287
|
+
function maybeInvokeDelegate(e, r) {
|
|
3288
|
+
var n = r.method,
|
|
3289
|
+
o = e.iterator[n];
|
|
3290
|
+
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;
|
|
3291
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
3292
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
3293
|
+
var a = i.arg;
|
|
3294
|
+
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);
|
|
3295
|
+
}
|
|
3296
|
+
function pushTryEntry(t) {
|
|
3297
|
+
var e = {
|
|
3298
|
+
tryLoc: t[0]
|
|
3299
|
+
};
|
|
3300
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
3301
|
+
}
|
|
3302
|
+
function resetTryEntry(t) {
|
|
3303
|
+
var e = t.completion || {};
|
|
3304
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
3305
|
+
}
|
|
3306
|
+
function Context(t) {
|
|
3307
|
+
this.tryEntries = [{
|
|
3308
|
+
tryLoc: "root"
|
|
3309
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
3310
|
+
}
|
|
3311
|
+
function values(e) {
|
|
3312
|
+
if (e || "" === e) {
|
|
3313
|
+
var r = e[a];
|
|
3314
|
+
if (r) return r.call(e);
|
|
3315
|
+
if ("function" == typeof e.next) return e;
|
|
3316
|
+
if (!isNaN(e.length)) {
|
|
3317
|
+
var o = -1,
|
|
3318
|
+
i = function next() {
|
|
3319
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
3320
|
+
return next.value = t, next.done = !0, next;
|
|
3321
|
+
};
|
|
3322
|
+
return i.next = i;
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
3326
|
+
}
|
|
3327
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
3328
|
+
value: GeneratorFunctionPrototype,
|
|
3329
|
+
configurable: !0
|
|
3330
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
3331
|
+
value: GeneratorFunction,
|
|
3332
|
+
configurable: !0
|
|
3333
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
3334
|
+
var e = "function" == typeof t && t.constructor;
|
|
3335
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
3336
|
+
}, e.mark = function (t) {
|
|
3337
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
3338
|
+
}, e.awrap = function (t) {
|
|
3339
|
+
return {
|
|
3340
|
+
__await: t
|
|
3341
|
+
};
|
|
3342
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
3343
|
+
return this;
|
|
3344
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
3345
|
+
void 0 === i && (i = Promise);
|
|
3346
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
3347
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
3348
|
+
return t.done ? t.value : a.next();
|
|
3349
|
+
});
|
|
3350
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
3351
|
+
return this;
|
|
3352
|
+
}), define(g, "toString", function () {
|
|
3353
|
+
return "[object Generator]";
|
|
3354
|
+
}), e.keys = function (t) {
|
|
3355
|
+
var e = Object(t),
|
|
3356
|
+
r = [];
|
|
3357
|
+
for (var n in e) r.push(n);
|
|
3358
|
+
return r.reverse(), function next() {
|
|
3359
|
+
for (; r.length;) {
|
|
3360
|
+
var t = r.pop();
|
|
3361
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
3362
|
+
}
|
|
3363
|
+
return next.done = !0, next;
|
|
3364
|
+
};
|
|
3365
|
+
}, e.values = values, Context.prototype = {
|
|
3366
|
+
constructor: Context,
|
|
3367
|
+
reset: function reset(e) {
|
|
3368
|
+
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);
|
|
3369
|
+
},
|
|
3370
|
+
stop: function stop() {
|
|
3371
|
+
this.done = !0;
|
|
3372
|
+
var t = this.tryEntries[0].completion;
|
|
3373
|
+
if ("throw" === t.type) throw t.arg;
|
|
3374
|
+
return this.rval;
|
|
3375
|
+
},
|
|
3376
|
+
dispatchException: function dispatchException(e) {
|
|
3377
|
+
if (this.done) throw e;
|
|
3378
|
+
var r = this;
|
|
3379
|
+
function handle(n, o) {
|
|
3380
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
3381
|
+
}
|
|
3382
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
3383
|
+
var i = this.tryEntries[o],
|
|
3384
|
+
a = i.completion;
|
|
3385
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
3386
|
+
if (i.tryLoc <= this.prev) {
|
|
3387
|
+
var c = n.call(i, "catchLoc"),
|
|
3388
|
+
u = n.call(i, "finallyLoc");
|
|
3389
|
+
if (c && u) {
|
|
3390
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
3391
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
3392
|
+
} else if (c) {
|
|
3393
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
3394
|
+
} else {
|
|
3395
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
3396
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
},
|
|
3401
|
+
abrupt: function abrupt(t, e) {
|
|
3402
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
3403
|
+
var o = this.tryEntries[r];
|
|
3404
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
3405
|
+
var i = o;
|
|
3406
|
+
break;
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
3410
|
+
var a = i ? i.completion : {};
|
|
3411
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
3412
|
+
},
|
|
3413
|
+
complete: function complete(t, e) {
|
|
3414
|
+
if ("throw" === t.type) throw t.arg;
|
|
3415
|
+
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;
|
|
3416
|
+
},
|
|
3417
|
+
finish: function finish(t) {
|
|
3418
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
3419
|
+
var r = this.tryEntries[e];
|
|
3420
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
3421
|
+
}
|
|
3422
|
+
},
|
|
3423
|
+
"catch": function _catch(t) {
|
|
3424
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
3425
|
+
var r = this.tryEntries[e];
|
|
3426
|
+
if (r.tryLoc === t) {
|
|
3427
|
+
var n = r.completion;
|
|
3428
|
+
if ("throw" === n.type) {
|
|
3429
|
+
var o = n.arg;
|
|
3430
|
+
resetTryEntry(r);
|
|
3431
|
+
}
|
|
3432
|
+
return o;
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
throw new Error("illegal catch attempt");
|
|
3436
|
+
},
|
|
3437
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
3438
|
+
return this.delegate = {
|
|
3439
|
+
iterator: values(e),
|
|
3440
|
+
resultName: r,
|
|
3441
|
+
nextLoc: n
|
|
3442
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
3443
|
+
}
|
|
3444
|
+
}, e;
|
|
3445
|
+
}
|
|
3446
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3447
|
+
} (regeneratorRuntime$1));
|
|
3448
|
+
|
|
3449
|
+
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
3450
|
+
|
|
3451
|
+
// TODO(Babel 8): Remove this file.
|
|
3452
|
+
|
|
3453
|
+
var runtime = regeneratorRuntimeExports();
|
|
3454
|
+
var regenerator = runtime;
|
|
3455
|
+
|
|
3456
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
3457
|
+
try {
|
|
3458
|
+
regeneratorRuntime = runtime;
|
|
3459
|
+
} catch (accidentalStrictMode) {
|
|
3460
|
+
if (typeof globalThis === "object") {
|
|
3461
|
+
globalThis.regeneratorRuntime = runtime;
|
|
3462
|
+
} else {
|
|
3463
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
3468
|
+
|
|
3467
3469
|
var DateField = function DateField(_ref) {
|
|
3468
3470
|
var _conditions$value$ind, _errors$conditions, _touched$conditions;
|
|
3469
3471
|
var name = _ref.name,
|
|
@@ -3646,7 +3648,7 @@ var ConditionItem = function ConditionItem(_ref) {
|
|
|
3646
3648
|
setFieldValue("".concat(name, ".verb"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.allowMatching[0]);
|
|
3647
3649
|
setFieldValue("".concat(name, ".kind"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.kind);
|
|
3648
3650
|
setFieldValue("".concat(name, ".metadata"), {});
|
|
3649
|
-
onSelectCondition === null || onSelectCondition === void 0
|
|
3651
|
+
onSelectCondition === null || onSelectCondition === void 0 || onSelectCondition(name, option);
|
|
3650
3652
|
};
|
|
3651
3653
|
var handleVerbChange = function handleVerbChange(_ref2) {
|
|
3652
3654
|
var value = _ref2.value;
|
|
@@ -3700,8 +3702,8 @@ var LogicOperator = function LogicOperator(_ref) {
|
|
|
3700
3702
|
}, logicOperationLabel);
|
|
3701
3703
|
};
|
|
3702
3704
|
|
|
3703
|
-
function ownKeys$2(
|
|
3704
|
-
function _objectSpread$2(
|
|
3705
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3706
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3705
3707
|
var Conditions = function Conditions(_ref) {
|
|
3706
3708
|
var _field$value;
|
|
3707
3709
|
var data = _ref.data,
|
|
@@ -3968,8 +3970,8 @@ var Performer$1 = function Performer(_ref) {
|
|
|
3968
3970
|
}, i18next.t("neetoRules.common.noOptions")))));
|
|
3969
3971
|
};
|
|
3970
3972
|
|
|
3971
|
-
function ownKeys$1(
|
|
3972
|
-
function _objectSpread$1(
|
|
3973
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3974
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3973
3975
|
var Menu$2 = neetoui.Dropdown.Menu,
|
|
3974
3976
|
MenuItem$2 = neetoui.Dropdown.MenuItem;
|
|
3975
3977
|
var Events$1 = function Events(_ref) {
|
|
@@ -4053,7 +4055,7 @@ var Events$1 = function Events(_ref) {
|
|
|
4053
4055
|
}, options) : [].concat(_toConsumableArray(options), [{
|
|
4054
4056
|
name: option.value
|
|
4055
4057
|
}]);
|
|
4056
|
-
onSelectEvent === null || onSelectEvent === void 0
|
|
4058
|
+
onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, options);
|
|
4057
4059
|
setFieldValue("".concat(name, ".value"), options);
|
|
4058
4060
|
};
|
|
4059
4061
|
var handleClose = function handleClose() {
|
|
@@ -4244,7 +4246,7 @@ var EventItem = function EventItem(_ref) {
|
|
|
4244
4246
|
var events = values[parentName].value || [];
|
|
4245
4247
|
var handleEventChange = function handleEventChange(option) {
|
|
4246
4248
|
setFieldValue(name, option.value);
|
|
4247
|
-
onSelectEvent === null || onSelectEvent === void 0
|
|
4249
|
+
onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, option);
|
|
4248
4250
|
setSelectedOption(option.label);
|
|
4249
4251
|
};
|
|
4250
4252
|
var eventOptions = React.useMemo(function () {
|
|
@@ -4433,8 +4435,8 @@ var Performer = function Performer(_ref) {
|
|
|
4433
4435
|
}, i18next.t("neetoRules.common.noOptions")))));
|
|
4434
4436
|
};
|
|
4435
4437
|
|
|
4436
|
-
function ownKeys(
|
|
4437
|
-
function _objectSpread(
|
|
4438
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4439
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4438
4440
|
var Events = function Events(_ref) {
|
|
4439
4441
|
var name = _ref.name,
|
|
4440
4442
|
label = _ref.label,
|
|
@@ -4711,4 +4713,5 @@ NeetoRules.EventConditions = EventConditions;
|
|
|
4711
4713
|
exports.NeetoRulesForm = NeetoRules;
|
|
4712
4714
|
exports.RulePreview = RulePreview;
|
|
4713
4715
|
exports["default"] = NeetoRules$1;
|
|
4716
|
+
exports.useCustomDataStore = useCustomDataStore;
|
|
4714
4717
|
//# sourceMappingURL=index.cjs.js.map
|