@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.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useMemo, useState, memo } from 'react';
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
+
import { shallow } from 'zustand/shallow';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import { useFormikContext, Formik, Form, useField, FieldArray, ErrorMessage } from 'formik';
|
|
5
6
|
import { findBy, noop, isNotEmpty, toLabelAndValue, removeBy } from '@bigbinary/neeto-cist';
|
|
@@ -7,26 +8,27 @@ import { ActionBlock, Textarea, MultiEmailInput, Input as Input$2, Select as Sel
|
|
|
7
8
|
import { t as t$1 } from 'i18next';
|
|
8
9
|
import * as yup from 'yup';
|
|
9
10
|
import { isEditorEmpty, FormikEditor } from '@bigbinary/neeto-editor';
|
|
11
|
+
import { withImmutableActions, useDebounce, useHotKeys } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
12
|
+
import { create } from 'zustand';
|
|
10
13
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
11
14
|
import { Typography, Button, Pane, DatePicker, Dropdown as Dropdown$1, Input as Input$1, Checkbox, Select, Label } from '@bigbinary/neetoui';
|
|
12
15
|
import { useTranslation } from 'react-i18next';
|
|
13
16
|
import { Down, Up, Check, Search, Close, Delete, Plus, Refresh, Eye } from '@bigbinary/neeto-icons';
|
|
14
17
|
import { pluck, isNotNil, assocPath, toLower, isEmpty, isNil, without, append, pipe, partition } from 'ramda';
|
|
15
18
|
import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
|
|
16
|
-
import { useDebounce, useHotKeys } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
19
|
|
|
18
20
|
function _objectDestructuringEmpty(obj) {
|
|
19
21
|
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
function _typeof$1(
|
|
24
|
+
function _typeof$1(o) {
|
|
23
25
|
"@babel/helpers - typeof";
|
|
24
26
|
|
|
25
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
26
|
-
return typeof
|
|
27
|
-
} : function (
|
|
28
|
-
return
|
|
29
|
-
}, _typeof$1(
|
|
27
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
28
|
+
return typeof o;
|
|
29
|
+
} : function (o) {
|
|
30
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
31
|
+
}, _typeof$1(o);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
function _toPrimitive(input, hint) {
|
|
@@ -89,392 +91,12 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
89
91
|
return target;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
93
|
-
try {
|
|
94
|
-
var info = gen[key](arg);
|
|
95
|
-
var value = info.value;
|
|
96
|
-
} catch (error) {
|
|
97
|
-
reject(error);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (info.done) {
|
|
101
|
-
resolve(value);
|
|
102
|
-
} else {
|
|
103
|
-
Promise.resolve(value).then(_next, _throw);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function _asyncToGenerator(fn) {
|
|
107
|
-
return function () {
|
|
108
|
-
var self = this,
|
|
109
|
-
args = arguments;
|
|
110
|
-
return new Promise(function (resolve, reject) {
|
|
111
|
-
var gen = fn.apply(self, args);
|
|
112
|
-
function _next(value) {
|
|
113
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
114
|
-
}
|
|
115
|
-
function _throw(err) {
|
|
116
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
117
|
-
}
|
|
118
|
-
_next(undefined);
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
94
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
124
95
|
|
|
125
96
|
function getDefaultExportFromCjs (x) {
|
|
126
97
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
127
98
|
}
|
|
128
99
|
|
|
129
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
130
|
-
|
|
131
|
-
var _typeof = {exports: {}};
|
|
132
|
-
|
|
133
|
-
_typeof.exports;
|
|
134
|
-
|
|
135
|
-
(function (module) {
|
|
136
|
-
function _typeof(obj) {
|
|
137
|
-
"@babel/helpers - typeof";
|
|
138
|
-
|
|
139
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
140
|
-
return typeof obj;
|
|
141
|
-
} : function (obj) {
|
|
142
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
143
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
144
|
-
}
|
|
145
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
146
|
-
} (_typeof));
|
|
147
|
-
|
|
148
|
-
var _typeofExports = _typeof.exports;
|
|
149
|
-
|
|
150
|
-
regeneratorRuntime$1.exports;
|
|
151
|
-
|
|
152
|
-
(function (module) {
|
|
153
|
-
var _typeof = _typeofExports["default"];
|
|
154
|
-
function _regeneratorRuntime() {
|
|
155
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
156
|
-
return exports;
|
|
157
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
158
|
-
var exports = {},
|
|
159
|
-
Op = Object.prototype,
|
|
160
|
-
hasOwn = Op.hasOwnProperty,
|
|
161
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
162
|
-
obj[key] = desc.value;
|
|
163
|
-
},
|
|
164
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
165
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
166
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
167
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
168
|
-
function define(obj, key, value) {
|
|
169
|
-
return Object.defineProperty(obj, key, {
|
|
170
|
-
value: value,
|
|
171
|
-
enumerable: !0,
|
|
172
|
-
configurable: !0,
|
|
173
|
-
writable: !0
|
|
174
|
-
}), obj[key];
|
|
175
|
-
}
|
|
176
|
-
try {
|
|
177
|
-
define({}, "");
|
|
178
|
-
} catch (err) {
|
|
179
|
-
define = function define(obj, key, value) {
|
|
180
|
-
return obj[key] = value;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
184
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
185
|
-
generator = Object.create(protoGenerator.prototype),
|
|
186
|
-
context = new Context(tryLocsList || []);
|
|
187
|
-
return defineProperty(generator, "_invoke", {
|
|
188
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
189
|
-
}), generator;
|
|
190
|
-
}
|
|
191
|
-
function tryCatch(fn, obj, arg) {
|
|
192
|
-
try {
|
|
193
|
-
return {
|
|
194
|
-
type: "normal",
|
|
195
|
-
arg: fn.call(obj, arg)
|
|
196
|
-
};
|
|
197
|
-
} catch (err) {
|
|
198
|
-
return {
|
|
199
|
-
type: "throw",
|
|
200
|
-
arg: err
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
exports.wrap = wrap;
|
|
205
|
-
var ContinueSentinel = {};
|
|
206
|
-
function Generator() {}
|
|
207
|
-
function GeneratorFunction() {}
|
|
208
|
-
function GeneratorFunctionPrototype() {}
|
|
209
|
-
var IteratorPrototype = {};
|
|
210
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
211
|
-
return this;
|
|
212
|
-
});
|
|
213
|
-
var getProto = Object.getPrototypeOf,
|
|
214
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
215
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
216
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
217
|
-
function defineIteratorMethods(prototype) {
|
|
218
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
219
|
-
define(prototype, method, function (arg) {
|
|
220
|
-
return this._invoke(method, arg);
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
225
|
-
function invoke(method, arg, resolve, reject) {
|
|
226
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
227
|
-
if ("throw" !== record.type) {
|
|
228
|
-
var result = record.arg,
|
|
229
|
-
value = result.value;
|
|
230
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
231
|
-
invoke("next", value, resolve, reject);
|
|
232
|
-
}, function (err) {
|
|
233
|
-
invoke("throw", err, resolve, reject);
|
|
234
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
235
|
-
result.value = unwrapped, resolve(result);
|
|
236
|
-
}, function (error) {
|
|
237
|
-
return invoke("throw", error, resolve, reject);
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
reject(record.arg);
|
|
241
|
-
}
|
|
242
|
-
var previousPromise;
|
|
243
|
-
defineProperty(this, "_invoke", {
|
|
244
|
-
value: function value(method, arg) {
|
|
245
|
-
function callInvokeWithMethodAndArg() {
|
|
246
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
247
|
-
invoke(method, arg, resolve, reject);
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
255
|
-
var state = "suspendedStart";
|
|
256
|
-
return function (method, arg) {
|
|
257
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
258
|
-
if ("completed" === state) {
|
|
259
|
-
if ("throw" === method) throw arg;
|
|
260
|
-
return doneResult();
|
|
261
|
-
}
|
|
262
|
-
for (context.method = method, context.arg = arg;;) {
|
|
263
|
-
var delegate = context.delegate;
|
|
264
|
-
if (delegate) {
|
|
265
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
266
|
-
if (delegateResult) {
|
|
267
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
268
|
-
return delegateResult;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
272
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
273
|
-
context.dispatchException(context.arg);
|
|
274
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
275
|
-
state = "executing";
|
|
276
|
-
var record = tryCatch(innerFn, self, context);
|
|
277
|
-
if ("normal" === record.type) {
|
|
278
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
279
|
-
return {
|
|
280
|
-
value: record.arg,
|
|
281
|
-
done: context.done
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
289
|
-
var methodName = context.method,
|
|
290
|
-
method = delegate.iterator[methodName];
|
|
291
|
-
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;
|
|
292
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
293
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
294
|
-
var info = record.arg;
|
|
295
|
-
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);
|
|
296
|
-
}
|
|
297
|
-
function pushTryEntry(locs) {
|
|
298
|
-
var entry = {
|
|
299
|
-
tryLoc: locs[0]
|
|
300
|
-
};
|
|
301
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
302
|
-
}
|
|
303
|
-
function resetTryEntry(entry) {
|
|
304
|
-
var record = entry.completion || {};
|
|
305
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
306
|
-
}
|
|
307
|
-
function Context(tryLocsList) {
|
|
308
|
-
this.tryEntries = [{
|
|
309
|
-
tryLoc: "root"
|
|
310
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
311
|
-
}
|
|
312
|
-
function values(iterable) {
|
|
313
|
-
if (iterable) {
|
|
314
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
315
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
316
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
317
|
-
if (!isNaN(iterable.length)) {
|
|
318
|
-
var i = -1,
|
|
319
|
-
next = function next() {
|
|
320
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
321
|
-
return next.value = undefined, next.done = !0, next;
|
|
322
|
-
};
|
|
323
|
-
return next.next = next;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return {
|
|
327
|
-
next: doneResult
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
function doneResult() {
|
|
331
|
-
return {
|
|
332
|
-
value: undefined,
|
|
333
|
-
done: !0
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
337
|
-
value: GeneratorFunctionPrototype,
|
|
338
|
-
configurable: !0
|
|
339
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
340
|
-
value: GeneratorFunction,
|
|
341
|
-
configurable: !0
|
|
342
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
343
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
344
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
345
|
-
}, exports.mark = function (genFun) {
|
|
346
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
347
|
-
}, exports.awrap = function (arg) {
|
|
348
|
-
return {
|
|
349
|
-
__await: arg
|
|
350
|
-
};
|
|
351
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
352
|
-
return this;
|
|
353
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
354
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
355
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
356
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
357
|
-
return result.done ? result.value : iter.next();
|
|
358
|
-
});
|
|
359
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
360
|
-
return this;
|
|
361
|
-
}), define(Gp, "toString", function () {
|
|
362
|
-
return "[object Generator]";
|
|
363
|
-
}), exports.keys = function (val) {
|
|
364
|
-
var object = Object(val),
|
|
365
|
-
keys = [];
|
|
366
|
-
for (var key in object) keys.push(key);
|
|
367
|
-
return keys.reverse(), function next() {
|
|
368
|
-
for (; keys.length;) {
|
|
369
|
-
var key = keys.pop();
|
|
370
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
371
|
-
}
|
|
372
|
-
return next.done = !0, next;
|
|
373
|
-
};
|
|
374
|
-
}, exports.values = values, Context.prototype = {
|
|
375
|
-
constructor: Context,
|
|
376
|
-
reset: function reset(skipTempReset) {
|
|
377
|
-
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);
|
|
378
|
-
},
|
|
379
|
-
stop: function stop() {
|
|
380
|
-
this.done = !0;
|
|
381
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
382
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
383
|
-
return this.rval;
|
|
384
|
-
},
|
|
385
|
-
dispatchException: function dispatchException(exception) {
|
|
386
|
-
if (this.done) throw exception;
|
|
387
|
-
var context = this;
|
|
388
|
-
function handle(loc, caught) {
|
|
389
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
390
|
-
}
|
|
391
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
392
|
-
var entry = this.tryEntries[i],
|
|
393
|
-
record = entry.completion;
|
|
394
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
395
|
-
if (entry.tryLoc <= this.prev) {
|
|
396
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
397
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
398
|
-
if (hasCatch && hasFinally) {
|
|
399
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
400
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
401
|
-
} else if (hasCatch) {
|
|
402
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
403
|
-
} else {
|
|
404
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
405
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
abrupt: function abrupt(type, arg) {
|
|
411
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
412
|
-
var entry = this.tryEntries[i];
|
|
413
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
414
|
-
var finallyEntry = entry;
|
|
415
|
-
break;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
419
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
420
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
421
|
-
},
|
|
422
|
-
complete: function complete(record, afterLoc) {
|
|
423
|
-
if ("throw" === record.type) throw record.arg;
|
|
424
|
-
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;
|
|
425
|
-
},
|
|
426
|
-
finish: function finish(finallyLoc) {
|
|
427
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
428
|
-
var entry = this.tryEntries[i];
|
|
429
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
"catch": function _catch(tryLoc) {
|
|
433
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
434
|
-
var entry = this.tryEntries[i];
|
|
435
|
-
if (entry.tryLoc === tryLoc) {
|
|
436
|
-
var record = entry.completion;
|
|
437
|
-
if ("throw" === record.type) {
|
|
438
|
-
var thrown = record.arg;
|
|
439
|
-
resetTryEntry(entry);
|
|
440
|
-
}
|
|
441
|
-
return thrown;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
throw new Error("illegal catch attempt");
|
|
445
|
-
},
|
|
446
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
447
|
-
return this.delegate = {
|
|
448
|
-
iterator: values(iterable),
|
|
449
|
-
resultName: resultName,
|
|
450
|
-
nextLoc: nextLoc
|
|
451
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
452
|
-
}
|
|
453
|
-
}, exports;
|
|
454
|
-
}
|
|
455
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
456
|
-
} (regeneratorRuntime$1));
|
|
457
|
-
|
|
458
|
-
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
459
|
-
|
|
460
|
-
// TODO(Babel 8): Remove this file.
|
|
461
|
-
|
|
462
|
-
var runtime = regeneratorRuntimeExports();
|
|
463
|
-
var regenerator = runtime;
|
|
464
|
-
|
|
465
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
466
|
-
try {
|
|
467
|
-
regeneratorRuntime = runtime;
|
|
468
|
-
} catch (accidentalStrictMode) {
|
|
469
|
-
if (typeof globalThis === "object") {
|
|
470
|
-
globalThis.regeneratorRuntime = runtime;
|
|
471
|
-
} else {
|
|
472
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
477
|
-
|
|
478
100
|
var propTypes = {exports: {}};
|
|
479
101
|
|
|
480
102
|
/**
|
|
@@ -678,8 +300,8 @@ var CONDITION_VALUE_TYPES = {
|
|
|
678
300
|
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
679
301
|
var MAXIMUM_OPTION_LENGTH$2 = 7;
|
|
680
302
|
|
|
681
|
-
function ownKeys$6(
|
|
682
|
-
function _objectSpread$6(
|
|
303
|
+
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; }
|
|
304
|
+
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; }
|
|
683
305
|
var getSchemaForStrings = function getSchemaForStrings(element) {
|
|
684
306
|
var label = element.label,
|
|
685
307
|
_element$componentPro = element.componentProps,
|
|
@@ -796,7 +418,7 @@ var getConditionsSchema = function getConditionsSchema(element) {
|
|
|
796
418
|
}))
|
|
797
419
|
});
|
|
798
420
|
};
|
|
799
|
-
var getActionsSchema = function getActionsSchema(element) {
|
|
421
|
+
var getActionsSchema = function getActionsSchema(element, customData) {
|
|
800
422
|
var actionOptions = element.actionOptions,
|
|
801
423
|
_element$componentPro5 = element.componentProps,
|
|
802
424
|
componentProps = _element$componentPro5 === void 0 ? {} : _element$componentPro5;
|
|
@@ -861,7 +483,7 @@ var getActionsSchema = function getActionsSchema(element) {
|
|
|
861
483
|
value: yup.string().required(t$1("neetoRules.validations.required.body"))
|
|
862
484
|
});
|
|
863
485
|
} else if (selectedAction !== null && selectedAction !== void 0 && selectedAction.component) {
|
|
864
|
-
return selectedAction.validation;
|
|
486
|
+
return typeof selectedAction.validation === "function" ? selectedAction.validation(customData) : selectedAction.validation;
|
|
865
487
|
}
|
|
866
488
|
return schema;
|
|
867
489
|
})
|
|
@@ -879,14 +501,14 @@ var getSchemaForArray = function getSchemaForArray(element) {
|
|
|
879
501
|
then: yup.array().min(1, t$1("neetoRules.validations.atLeastOneValue")).required(t$1("neetoRules.validations.atLeastOneValue"))
|
|
880
502
|
});
|
|
881
503
|
};
|
|
882
|
-
var getSchemaForElement = function getSchemaForElement(element) {
|
|
883
|
-
return VALIDATION_SCHEMA[element.type](element);
|
|
504
|
+
var getSchemaForElement = function getSchemaForElement(element, customData) {
|
|
505
|
+
return VALIDATION_SCHEMA[element.type](element, customData);
|
|
884
506
|
};
|
|
885
|
-
var getValidationSchema = function getValidationSchema(data) {
|
|
507
|
+
var getValidationSchema = function getValidationSchema(data, customData) {
|
|
886
508
|
var fieldKeys = Object.keys(data);
|
|
887
509
|
var schema = fieldKeys.reduce(function (acc, key) {
|
|
888
510
|
return _objectSpread$6(_objectSpread$6({}, acc), {}, _defineProperty({}, key, yup.object({
|
|
889
|
-
value: getSchemaForElement(data[key])
|
|
511
|
+
value: getSchemaForElement(data[key], customData)
|
|
890
512
|
})));
|
|
891
513
|
}, {});
|
|
892
514
|
return yup.object(schema);
|
|
@@ -908,8 +530,8 @@ var VALIDATION_SCHEMA = (_VALIDATION_SCHEMA = {}, _defineProperty(_VALIDATION_SC
|
|
|
908
530
|
var DECIMAL_NUMBER_REGEX = /^\d*\.?\d+$/;
|
|
909
531
|
var POSITIVE_NUMBER_REGEX = /^[0-9]+$/;
|
|
910
532
|
|
|
911
|
-
function ownKeys$5(
|
|
912
|
-
function _objectSpread$5(
|
|
533
|
+
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; }
|
|
534
|
+
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; }
|
|
913
535
|
var buildPayload = function buildPayload(data, values) {
|
|
914
536
|
return Object.keys(data).reduce(function (acc, key) {
|
|
915
537
|
var fieldValue = values[key].value;
|
|
@@ -944,6 +566,14 @@ var formatData = function formatData(data) {
|
|
|
944
566
|
}, {});
|
|
945
567
|
};
|
|
946
568
|
|
|
569
|
+
/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
|
|
570
|
+
var useCustomDataStore = create(withImmutableActions(function (set) {
|
|
571
|
+
return {
|
|
572
|
+
customData: {},
|
|
573
|
+
setCustomDataState: set
|
|
574
|
+
};
|
|
575
|
+
}));
|
|
576
|
+
|
|
947
577
|
var transformObjectToDotNotation = function transformObjectToDotNotation(obj) {
|
|
948
578
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
949
579
|
var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
@@ -985,7 +615,7 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
|
|
|
985
615
|
var errorFormElement = findBy({
|
|
986
616
|
name: fieldErrorNames
|
|
987
617
|
}, _toConsumableArray(formRef.current.elements));
|
|
988
|
-
errorFormElement === null || errorFormElement === void 0
|
|
618
|
+
errorFormElement === null || errorFormElement === void 0 || errorFormElement.scrollIntoView({
|
|
989
619
|
behavior: "smooth",
|
|
990
620
|
block: "center"
|
|
991
621
|
});
|
|
@@ -995,8 +625,8 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
|
|
|
995
625
|
};
|
|
996
626
|
|
|
997
627
|
var _excluded$9 = ["isSubmitting", "dirty", "values"];
|
|
998
|
-
function ownKeys$4(
|
|
999
|
-
function _objectSpread$4(
|
|
628
|
+
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; }
|
|
629
|
+
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; }
|
|
1000
630
|
var NeetoRules$2 = function NeetoRules(_ref) {
|
|
1001
631
|
var _ref$data = _ref.data,
|
|
1002
632
|
data = _ref$data === void 0 ? {} : _ref$data,
|
|
@@ -1007,40 +637,32 @@ var NeetoRules$2 = function NeetoRules(_ref) {
|
|
|
1007
637
|
_ref$handleCancel = _ref.handleCancel,
|
|
1008
638
|
handleCancel = _ref$handleCancel === void 0 ? noop : _ref$handleCancel;
|
|
1009
639
|
var formRef = useRef(null);
|
|
1010
|
-
var submitForm =
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
while (1) switch (_context.prev = _context.next) {
|
|
1015
|
-
case 0:
|
|
1016
|
-
payload = buildPayload(data, values);
|
|
1017
|
-
handleSubmit(payload, formikBag);
|
|
1018
|
-
case 2:
|
|
1019
|
-
case "end":
|
|
1020
|
-
return _context.stop();
|
|
1021
|
-
}
|
|
1022
|
-
}, _callee);
|
|
1023
|
-
}));
|
|
1024
|
-
return function submitForm(_x, _x2) {
|
|
1025
|
-
return _ref2.apply(this, arguments);
|
|
1026
|
-
};
|
|
1027
|
-
}();
|
|
640
|
+
var submitForm = function submitForm(values, formikBag) {
|
|
641
|
+
var payload = buildPayload(data, values);
|
|
642
|
+
handleSubmit(payload, formikBag);
|
|
643
|
+
};
|
|
1028
644
|
var initialValues = useMemo(function () {
|
|
1029
645
|
return formatData(data);
|
|
1030
646
|
}, [data]);
|
|
647
|
+
var _useCustomDataStore = useCustomDataStore(function (store) {
|
|
648
|
+
return {
|
|
649
|
+
customData: store["customData"]
|
|
650
|
+
};
|
|
651
|
+
}, shallow),
|
|
652
|
+
customData = _useCustomDataStore.customData;
|
|
1031
653
|
return /*#__PURE__*/React.createElement(Formik, {
|
|
1032
654
|
initialValues: initialValues,
|
|
1033
655
|
enableReinitialize: true,
|
|
1034
|
-
validationSchema: getValidationSchema(data),
|
|
656
|
+
validationSchema: getValidationSchema(data, customData),
|
|
1035
657
|
onSubmit: submitForm
|
|
1036
|
-
}, function (
|
|
1037
|
-
var isSubmitting =
|
|
1038
|
-
dirty =
|
|
1039
|
-
values =
|
|
1040
|
-
fromikBag = _objectWithoutProperties(
|
|
658
|
+
}, function (_ref2) {
|
|
659
|
+
var isSubmitting = _ref2.isSubmitting,
|
|
660
|
+
dirty = _ref2.dirty,
|
|
661
|
+
values = _ref2.values,
|
|
662
|
+
fromikBag = _objectWithoutProperties(_ref2, _excluded$9);
|
|
1041
663
|
return /*#__PURE__*/React.createElement(Form, {
|
|
1042
|
-
|
|
1043
|
-
|
|
664
|
+
ref: formRef,
|
|
665
|
+
className: classNames(["w-full space-y-6 px-0 md:px-14 xl:px-24", className])
|
|
1044
666
|
}, typeof children === "function" ? children === null || children === void 0 ? void 0 : children(_objectSpread$4({
|
|
1045
667
|
values: values,
|
|
1046
668
|
formattedValues: buildPayload(data, values),
|
|
@@ -1078,7 +700,7 @@ var Main = function Main(_ref) {
|
|
|
1078
700
|
|
|
1079
701
|
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}}
|
|
1080
702
|
|
|
1081
|
-
var css = ".neeto-filters-error-boundary{align-items:center;background-color
|
|
703
|
+
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== */";
|
|
1082
704
|
n(css,{});
|
|
1083
705
|
|
|
1084
706
|
var NeetoRules$1 = function NeetoRules(_ref) {
|
|
@@ -1090,31 +712,31 @@ function _arrayWithHoles(arr) {
|
|
|
1090
712
|
if (Array.isArray(arr)) return arr;
|
|
1091
713
|
}
|
|
1092
714
|
|
|
1093
|
-
function _iterableToArrayLimit(
|
|
1094
|
-
var
|
|
1095
|
-
if (null !=
|
|
1096
|
-
var
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
715
|
+
function _iterableToArrayLimit(r, l) {
|
|
716
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
717
|
+
if (null != t) {
|
|
718
|
+
var e,
|
|
719
|
+
n,
|
|
720
|
+
i,
|
|
721
|
+
u,
|
|
722
|
+
a = [],
|
|
723
|
+
f = !0,
|
|
724
|
+
o = !1;
|
|
1103
725
|
try {
|
|
1104
|
-
if (
|
|
1105
|
-
if (Object(
|
|
1106
|
-
|
|
1107
|
-
} else for (; !(
|
|
1108
|
-
} catch (
|
|
1109
|
-
|
|
726
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
727
|
+
if (Object(t) !== t) return;
|
|
728
|
+
f = !1;
|
|
729
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
730
|
+
} catch (r) {
|
|
731
|
+
o = !0, n = r;
|
|
1110
732
|
} finally {
|
|
1111
733
|
try {
|
|
1112
|
-
if (!
|
|
734
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1113
735
|
} finally {
|
|
1114
|
-
if (
|
|
736
|
+
if (o) throw n;
|
|
1115
737
|
}
|
|
1116
738
|
}
|
|
1117
|
-
return
|
|
739
|
+
return a;
|
|
1118
740
|
}
|
|
1119
741
|
}
|
|
1120
742
|
|
|
@@ -1620,7 +1242,7 @@ var dayjs_min = {exports: {}};
|
|
|
1620
1242
|
dayjs_min.exports;
|
|
1621
1243
|
|
|
1622
1244
|
(function (module, exports) {
|
|
1623
|
-
!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
|
|
1245
|
+
!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}));
|
|
1624
1246
|
} (dayjs_min, dayjs_min.exports));
|
|
1625
1247
|
|
|
1626
1248
|
var dayjs_minExports = dayjs_min.exports;
|
|
@@ -2080,7 +1702,7 @@ var useCloseInputField = function useCloseInputField(ref, showInput, handler) {
|
|
|
2080
1702
|
handler();
|
|
2081
1703
|
}
|
|
2082
1704
|
};
|
|
2083
|
-
(_ref$current = ref.current) === null || _ref$current === void 0
|
|
1705
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.addEventListener("keydown", listener);
|
|
2084
1706
|
return function () {
|
|
2085
1707
|
var _ref$current2;
|
|
2086
1708
|
return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.removeEventListener("keydown", listener);
|
|
@@ -2737,7 +2359,7 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
2737
2359
|
var handleSelectOption = function handleSelectOption(option) {
|
|
2738
2360
|
setFieldValue("".concat(name, ".name"), option.value);
|
|
2739
2361
|
setFieldValue("".concat(name, ".metadata"), {});
|
|
2740
|
-
onSelectAction === null || onSelectAction === void 0
|
|
2362
|
+
onSelectAction === null || onSelectAction === void 0 || onSelectAction(name, option);
|
|
2741
2363
|
setSearchTerm("");
|
|
2742
2364
|
};
|
|
2743
2365
|
var handleClose = function handleClose() {
|
|
@@ -2847,8 +2469,8 @@ var Card = function Card(_ref) {
|
|
|
2847
2469
|
}, children));
|
|
2848
2470
|
};
|
|
2849
2471
|
|
|
2850
|
-
function ownKeys$3(
|
|
2851
|
-
function _objectSpread$3(
|
|
2472
|
+
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; }
|
|
2473
|
+
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; }
|
|
2852
2474
|
var Actions = function Actions(_ref) {
|
|
2853
2475
|
var name = _ref.name,
|
|
2854
2476
|
label = _ref.label,
|
|
@@ -3435,6 +3057,386 @@ var MultiSelectCreate = function MultiSelectCreate(_ref) {
|
|
|
3435
3057
|
}))));
|
|
3436
3058
|
};
|
|
3437
3059
|
|
|
3060
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
3061
|
+
try {
|
|
3062
|
+
var info = gen[key](arg);
|
|
3063
|
+
var value = info.value;
|
|
3064
|
+
} catch (error) {
|
|
3065
|
+
reject(error);
|
|
3066
|
+
return;
|
|
3067
|
+
}
|
|
3068
|
+
if (info.done) {
|
|
3069
|
+
resolve(value);
|
|
3070
|
+
} else {
|
|
3071
|
+
Promise.resolve(value).then(_next, _throw);
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
function _asyncToGenerator(fn) {
|
|
3075
|
+
return function () {
|
|
3076
|
+
var self = this,
|
|
3077
|
+
args = arguments;
|
|
3078
|
+
return new Promise(function (resolve, reject) {
|
|
3079
|
+
var gen = fn.apply(self, args);
|
|
3080
|
+
function _next(value) {
|
|
3081
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
3082
|
+
}
|
|
3083
|
+
function _throw(err) {
|
|
3084
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
3085
|
+
}
|
|
3086
|
+
_next(undefined);
|
|
3087
|
+
});
|
|
3088
|
+
};
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
3092
|
+
|
|
3093
|
+
var _typeof = {exports: {}};
|
|
3094
|
+
|
|
3095
|
+
_typeof.exports;
|
|
3096
|
+
|
|
3097
|
+
(function (module) {
|
|
3098
|
+
function _typeof(o) {
|
|
3099
|
+
"@babel/helpers - typeof";
|
|
3100
|
+
|
|
3101
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3102
|
+
return typeof o;
|
|
3103
|
+
} : function (o) {
|
|
3104
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3105
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
3106
|
+
}
|
|
3107
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3108
|
+
} (_typeof));
|
|
3109
|
+
|
|
3110
|
+
var _typeofExports = _typeof.exports;
|
|
3111
|
+
|
|
3112
|
+
regeneratorRuntime$1.exports;
|
|
3113
|
+
|
|
3114
|
+
(function (module) {
|
|
3115
|
+
var _typeof = _typeofExports["default"];
|
|
3116
|
+
function _regeneratorRuntime() {
|
|
3117
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
3118
|
+
return e;
|
|
3119
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3120
|
+
var t,
|
|
3121
|
+
e = {},
|
|
3122
|
+
r = Object.prototype,
|
|
3123
|
+
n = r.hasOwnProperty,
|
|
3124
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
3125
|
+
t[e] = r.value;
|
|
3126
|
+
},
|
|
3127
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
3128
|
+
a = i.iterator || "@@iterator",
|
|
3129
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
3130
|
+
u = i.toStringTag || "@@toStringTag";
|
|
3131
|
+
function define(t, e, r) {
|
|
3132
|
+
return Object.defineProperty(t, e, {
|
|
3133
|
+
value: r,
|
|
3134
|
+
enumerable: !0,
|
|
3135
|
+
configurable: !0,
|
|
3136
|
+
writable: !0
|
|
3137
|
+
}), t[e];
|
|
3138
|
+
}
|
|
3139
|
+
try {
|
|
3140
|
+
define({}, "");
|
|
3141
|
+
} catch (t) {
|
|
3142
|
+
define = function define(t, e, r) {
|
|
3143
|
+
return t[e] = r;
|
|
3144
|
+
};
|
|
3145
|
+
}
|
|
3146
|
+
function wrap(t, e, r, n) {
|
|
3147
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
3148
|
+
a = Object.create(i.prototype),
|
|
3149
|
+
c = new Context(n || []);
|
|
3150
|
+
return o(a, "_invoke", {
|
|
3151
|
+
value: makeInvokeMethod(t, r, c)
|
|
3152
|
+
}), a;
|
|
3153
|
+
}
|
|
3154
|
+
function tryCatch(t, e, r) {
|
|
3155
|
+
try {
|
|
3156
|
+
return {
|
|
3157
|
+
type: "normal",
|
|
3158
|
+
arg: t.call(e, r)
|
|
3159
|
+
};
|
|
3160
|
+
} catch (t) {
|
|
3161
|
+
return {
|
|
3162
|
+
type: "throw",
|
|
3163
|
+
arg: t
|
|
3164
|
+
};
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
e.wrap = wrap;
|
|
3168
|
+
var h = "suspendedStart",
|
|
3169
|
+
l = "suspendedYield",
|
|
3170
|
+
f = "executing",
|
|
3171
|
+
s = "completed",
|
|
3172
|
+
y = {};
|
|
3173
|
+
function Generator() {}
|
|
3174
|
+
function GeneratorFunction() {}
|
|
3175
|
+
function GeneratorFunctionPrototype() {}
|
|
3176
|
+
var p = {};
|
|
3177
|
+
define(p, a, function () {
|
|
3178
|
+
return this;
|
|
3179
|
+
});
|
|
3180
|
+
var d = Object.getPrototypeOf,
|
|
3181
|
+
v = d && d(d(values([])));
|
|
3182
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
3183
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
3184
|
+
function defineIteratorMethods(t) {
|
|
3185
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
3186
|
+
define(t, e, function (t) {
|
|
3187
|
+
return this._invoke(e, t);
|
|
3188
|
+
});
|
|
3189
|
+
});
|
|
3190
|
+
}
|
|
3191
|
+
function AsyncIterator(t, e) {
|
|
3192
|
+
function invoke(r, o, i, a) {
|
|
3193
|
+
var c = tryCatch(t[r], t, o);
|
|
3194
|
+
if ("throw" !== c.type) {
|
|
3195
|
+
var u = c.arg,
|
|
3196
|
+
h = u.value;
|
|
3197
|
+
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
3198
|
+
invoke("next", t, i, a);
|
|
3199
|
+
}, function (t) {
|
|
3200
|
+
invoke("throw", t, i, a);
|
|
3201
|
+
}) : e.resolve(h).then(function (t) {
|
|
3202
|
+
u.value = t, i(u);
|
|
3203
|
+
}, function (t) {
|
|
3204
|
+
return invoke("throw", t, i, a);
|
|
3205
|
+
});
|
|
3206
|
+
}
|
|
3207
|
+
a(c.arg);
|
|
3208
|
+
}
|
|
3209
|
+
var r;
|
|
3210
|
+
o(this, "_invoke", {
|
|
3211
|
+
value: function value(t, n) {
|
|
3212
|
+
function callInvokeWithMethodAndArg() {
|
|
3213
|
+
return new e(function (e, r) {
|
|
3214
|
+
invoke(t, n, e, r);
|
|
3215
|
+
});
|
|
3216
|
+
}
|
|
3217
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
3218
|
+
}
|
|
3219
|
+
});
|
|
3220
|
+
}
|
|
3221
|
+
function makeInvokeMethod(e, r, n) {
|
|
3222
|
+
var o = h;
|
|
3223
|
+
return function (i, a) {
|
|
3224
|
+
if (o === f) throw new Error("Generator is already running");
|
|
3225
|
+
if (o === s) {
|
|
3226
|
+
if ("throw" === i) throw a;
|
|
3227
|
+
return {
|
|
3228
|
+
value: t,
|
|
3229
|
+
done: !0
|
|
3230
|
+
};
|
|
3231
|
+
}
|
|
3232
|
+
for (n.method = i, n.arg = a;;) {
|
|
3233
|
+
var c = n.delegate;
|
|
3234
|
+
if (c) {
|
|
3235
|
+
var u = maybeInvokeDelegate(c, n);
|
|
3236
|
+
if (u) {
|
|
3237
|
+
if (u === y) continue;
|
|
3238
|
+
return u;
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
3242
|
+
if (o === h) throw o = s, n.arg;
|
|
3243
|
+
n.dispatchException(n.arg);
|
|
3244
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
3245
|
+
o = f;
|
|
3246
|
+
var p = tryCatch(e, r, n);
|
|
3247
|
+
if ("normal" === p.type) {
|
|
3248
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
3249
|
+
return {
|
|
3250
|
+
value: p.arg,
|
|
3251
|
+
done: n.done
|
|
3252
|
+
};
|
|
3253
|
+
}
|
|
3254
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
3255
|
+
}
|
|
3256
|
+
};
|
|
3257
|
+
}
|
|
3258
|
+
function maybeInvokeDelegate(e, r) {
|
|
3259
|
+
var n = r.method,
|
|
3260
|
+
o = e.iterator[n];
|
|
3261
|
+
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;
|
|
3262
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
3263
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
3264
|
+
var a = i.arg;
|
|
3265
|
+
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);
|
|
3266
|
+
}
|
|
3267
|
+
function pushTryEntry(t) {
|
|
3268
|
+
var e = {
|
|
3269
|
+
tryLoc: t[0]
|
|
3270
|
+
};
|
|
3271
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
3272
|
+
}
|
|
3273
|
+
function resetTryEntry(t) {
|
|
3274
|
+
var e = t.completion || {};
|
|
3275
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
3276
|
+
}
|
|
3277
|
+
function Context(t) {
|
|
3278
|
+
this.tryEntries = [{
|
|
3279
|
+
tryLoc: "root"
|
|
3280
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
3281
|
+
}
|
|
3282
|
+
function values(e) {
|
|
3283
|
+
if (e || "" === e) {
|
|
3284
|
+
var r = e[a];
|
|
3285
|
+
if (r) return r.call(e);
|
|
3286
|
+
if ("function" == typeof e.next) return e;
|
|
3287
|
+
if (!isNaN(e.length)) {
|
|
3288
|
+
var o = -1,
|
|
3289
|
+
i = function next() {
|
|
3290
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
3291
|
+
return next.value = t, next.done = !0, next;
|
|
3292
|
+
};
|
|
3293
|
+
return i.next = i;
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
3297
|
+
}
|
|
3298
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
3299
|
+
value: GeneratorFunctionPrototype,
|
|
3300
|
+
configurable: !0
|
|
3301
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
3302
|
+
value: GeneratorFunction,
|
|
3303
|
+
configurable: !0
|
|
3304
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
3305
|
+
var e = "function" == typeof t && t.constructor;
|
|
3306
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
3307
|
+
}, e.mark = function (t) {
|
|
3308
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
3309
|
+
}, e.awrap = function (t) {
|
|
3310
|
+
return {
|
|
3311
|
+
__await: t
|
|
3312
|
+
};
|
|
3313
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
3314
|
+
return this;
|
|
3315
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
3316
|
+
void 0 === i && (i = Promise);
|
|
3317
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
3318
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
3319
|
+
return t.done ? t.value : a.next();
|
|
3320
|
+
});
|
|
3321
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
3322
|
+
return this;
|
|
3323
|
+
}), define(g, "toString", function () {
|
|
3324
|
+
return "[object Generator]";
|
|
3325
|
+
}), e.keys = function (t) {
|
|
3326
|
+
var e = Object(t),
|
|
3327
|
+
r = [];
|
|
3328
|
+
for (var n in e) r.push(n);
|
|
3329
|
+
return r.reverse(), function next() {
|
|
3330
|
+
for (; r.length;) {
|
|
3331
|
+
var t = r.pop();
|
|
3332
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
3333
|
+
}
|
|
3334
|
+
return next.done = !0, next;
|
|
3335
|
+
};
|
|
3336
|
+
}, e.values = values, Context.prototype = {
|
|
3337
|
+
constructor: Context,
|
|
3338
|
+
reset: function reset(e) {
|
|
3339
|
+
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);
|
|
3340
|
+
},
|
|
3341
|
+
stop: function stop() {
|
|
3342
|
+
this.done = !0;
|
|
3343
|
+
var t = this.tryEntries[0].completion;
|
|
3344
|
+
if ("throw" === t.type) throw t.arg;
|
|
3345
|
+
return this.rval;
|
|
3346
|
+
},
|
|
3347
|
+
dispatchException: function dispatchException(e) {
|
|
3348
|
+
if (this.done) throw e;
|
|
3349
|
+
var r = this;
|
|
3350
|
+
function handle(n, o) {
|
|
3351
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
3352
|
+
}
|
|
3353
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
3354
|
+
var i = this.tryEntries[o],
|
|
3355
|
+
a = i.completion;
|
|
3356
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
3357
|
+
if (i.tryLoc <= this.prev) {
|
|
3358
|
+
var c = n.call(i, "catchLoc"),
|
|
3359
|
+
u = n.call(i, "finallyLoc");
|
|
3360
|
+
if (c && u) {
|
|
3361
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
3362
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
3363
|
+
} else if (c) {
|
|
3364
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
3365
|
+
} else {
|
|
3366
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
3367
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
},
|
|
3372
|
+
abrupt: function abrupt(t, e) {
|
|
3373
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
3374
|
+
var o = this.tryEntries[r];
|
|
3375
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
3376
|
+
var i = o;
|
|
3377
|
+
break;
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
3381
|
+
var a = i ? i.completion : {};
|
|
3382
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
3383
|
+
},
|
|
3384
|
+
complete: function complete(t, e) {
|
|
3385
|
+
if ("throw" === t.type) throw t.arg;
|
|
3386
|
+
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;
|
|
3387
|
+
},
|
|
3388
|
+
finish: function finish(t) {
|
|
3389
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
3390
|
+
var r = this.tryEntries[e];
|
|
3391
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
3392
|
+
}
|
|
3393
|
+
},
|
|
3394
|
+
"catch": function _catch(t) {
|
|
3395
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
3396
|
+
var r = this.tryEntries[e];
|
|
3397
|
+
if (r.tryLoc === t) {
|
|
3398
|
+
var n = r.completion;
|
|
3399
|
+
if ("throw" === n.type) {
|
|
3400
|
+
var o = n.arg;
|
|
3401
|
+
resetTryEntry(r);
|
|
3402
|
+
}
|
|
3403
|
+
return o;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
throw new Error("illegal catch attempt");
|
|
3407
|
+
},
|
|
3408
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
3409
|
+
return this.delegate = {
|
|
3410
|
+
iterator: values(e),
|
|
3411
|
+
resultName: r,
|
|
3412
|
+
nextLoc: n
|
|
3413
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
3414
|
+
}
|
|
3415
|
+
}, e;
|
|
3416
|
+
}
|
|
3417
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3418
|
+
} (regeneratorRuntime$1));
|
|
3419
|
+
|
|
3420
|
+
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
3421
|
+
|
|
3422
|
+
// TODO(Babel 8): Remove this file.
|
|
3423
|
+
|
|
3424
|
+
var runtime = regeneratorRuntimeExports();
|
|
3425
|
+
var regenerator = runtime;
|
|
3426
|
+
|
|
3427
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
3428
|
+
try {
|
|
3429
|
+
regeneratorRuntime = runtime;
|
|
3430
|
+
} catch (accidentalStrictMode) {
|
|
3431
|
+
if (typeof globalThis === "object") {
|
|
3432
|
+
globalThis.regeneratorRuntime = runtime;
|
|
3433
|
+
} else {
|
|
3434
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
3439
|
+
|
|
3438
3440
|
var DateField = function DateField(_ref) {
|
|
3439
3441
|
var _conditions$value$ind, _errors$conditions, _touched$conditions;
|
|
3440
3442
|
var name = _ref.name,
|
|
@@ -3617,7 +3619,7 @@ var ConditionItem = function ConditionItem(_ref) {
|
|
|
3617
3619
|
setFieldValue("".concat(name, ".verb"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.allowMatching[0]);
|
|
3618
3620
|
setFieldValue("".concat(name, ".kind"), fieldDetails === null || fieldDetails === void 0 ? void 0 : fieldDetails.kind);
|
|
3619
3621
|
setFieldValue("".concat(name, ".metadata"), {});
|
|
3620
|
-
onSelectCondition === null || onSelectCondition === void 0
|
|
3622
|
+
onSelectCondition === null || onSelectCondition === void 0 || onSelectCondition(name, option);
|
|
3621
3623
|
};
|
|
3622
3624
|
var handleVerbChange = function handleVerbChange(_ref2) {
|
|
3623
3625
|
var value = _ref2.value;
|
|
@@ -3671,8 +3673,8 @@ var LogicOperator = function LogicOperator(_ref) {
|
|
|
3671
3673
|
}, logicOperationLabel);
|
|
3672
3674
|
};
|
|
3673
3675
|
|
|
3674
|
-
function ownKeys$2(
|
|
3675
|
-
function _objectSpread$2(
|
|
3676
|
+
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; }
|
|
3677
|
+
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; }
|
|
3676
3678
|
var Conditions = function Conditions(_ref) {
|
|
3677
3679
|
var _field$value;
|
|
3678
3680
|
var data = _ref.data,
|
|
@@ -3939,8 +3941,8 @@ var Performer$1 = function Performer(_ref) {
|
|
|
3939
3941
|
}, t$1("neetoRules.common.noOptions")))));
|
|
3940
3942
|
};
|
|
3941
3943
|
|
|
3942
|
-
function ownKeys$1(
|
|
3943
|
-
function _objectSpread$1(
|
|
3944
|
+
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; }
|
|
3945
|
+
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; }
|
|
3944
3946
|
var Menu$2 = Dropdown$1.Menu,
|
|
3945
3947
|
MenuItem$2 = Dropdown$1.MenuItem;
|
|
3946
3948
|
var Events$1 = function Events(_ref) {
|
|
@@ -4024,7 +4026,7 @@ var Events$1 = function Events(_ref) {
|
|
|
4024
4026
|
}, options) : [].concat(_toConsumableArray(options), [{
|
|
4025
4027
|
name: option.value
|
|
4026
4028
|
}]);
|
|
4027
|
-
onSelectEvent === null || onSelectEvent === void 0
|
|
4029
|
+
onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, options);
|
|
4028
4030
|
setFieldValue("".concat(name, ".value"), options);
|
|
4029
4031
|
};
|
|
4030
4032
|
var handleClose = function handleClose() {
|
|
@@ -4215,7 +4217,7 @@ var EventItem = function EventItem(_ref) {
|
|
|
4215
4217
|
var events = values[parentName].value || [];
|
|
4216
4218
|
var handleEventChange = function handleEventChange(option) {
|
|
4217
4219
|
setFieldValue(name, option.value);
|
|
4218
|
-
onSelectEvent === null || onSelectEvent === void 0
|
|
4220
|
+
onSelectEvent === null || onSelectEvent === void 0 || onSelectEvent(name, option);
|
|
4219
4221
|
setSelectedOption(option.label);
|
|
4220
4222
|
};
|
|
4221
4223
|
var eventOptions = useMemo(function () {
|
|
@@ -4404,8 +4406,8 @@ var Performer = function Performer(_ref) {
|
|
|
4404
4406
|
}, t$1("neetoRules.common.noOptions")))));
|
|
4405
4407
|
};
|
|
4406
4408
|
|
|
4407
|
-
function ownKeys(
|
|
4408
|
-
function _objectSpread(
|
|
4409
|
+
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; }
|
|
4410
|
+
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; }
|
|
4409
4411
|
var Events = function Events(_ref) {
|
|
4410
4412
|
var name = _ref.name,
|
|
4411
4413
|
label = _ref.label,
|
|
@@ -4679,5 +4681,5 @@ NeetoRules.Card = Card;
|
|
|
4679
4681
|
NeetoRules.MultiSelectField = MultiSelectField;
|
|
4680
4682
|
NeetoRules.EventConditions = EventConditions;
|
|
4681
4683
|
|
|
4682
|
-
export { NeetoRules as NeetoRulesForm, RulePreview, NeetoRules$1 as default };
|
|
4684
|
+
export { NeetoRules as NeetoRulesForm, RulePreview, NeetoRules$1 as default, useCustomDataStore };
|
|
4683
4685
|
//# sourceMappingURL=index.js.map
|