@bigbinary/neetoui 5.0.2 → 5.0.4
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/formik.cjs.js +468 -48
- package/formik.cjs.js.map +1 -1
- package/formik.js +468 -48
- package/formik.js.map +1 -1
- package/index.cjs.js +13 -6
- package/index.cjs.js.map +1 -1
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/formik.cjs.js
CHANGED
|
@@ -14162,22 +14162,22 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
14162
14162
|
}, cancelButtonProps)));
|
|
14163
14163
|
};
|
|
14164
14164
|
|
|
14165
|
-
function _typeof$
|
|
14165
|
+
function _typeof$2(obj) {
|
|
14166
14166
|
"@babel/helpers - typeof";
|
|
14167
14167
|
|
|
14168
|
-
return _typeof$
|
|
14168
|
+
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
14169
14169
|
return typeof obj;
|
|
14170
14170
|
} : function (obj) {
|
|
14171
14171
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
14172
|
-
}, _typeof$
|
|
14172
|
+
}, _typeof$2(obj);
|
|
14173
14173
|
}
|
|
14174
14174
|
|
|
14175
14175
|
function _toPrimitive(input, hint) {
|
|
14176
|
-
if (_typeof$
|
|
14176
|
+
if (_typeof$2(input) !== "object" || input === null) return input;
|
|
14177
14177
|
var prim = input[Symbol.toPrimitive];
|
|
14178
14178
|
if (prim !== undefined) {
|
|
14179
14179
|
var res = prim.call(input, hint || "default");
|
|
14180
|
-
if (_typeof$
|
|
14180
|
+
if (_typeof$2(res) !== "object") return res;
|
|
14181
14181
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
14182
14182
|
}
|
|
14183
14183
|
return (hint === "string" ? String : Number)(input);
|
|
@@ -14185,7 +14185,7 @@ function _toPrimitive(input, hint) {
|
|
|
14185
14185
|
|
|
14186
14186
|
function _toPropertyKey(arg) {
|
|
14187
14187
|
var key = _toPrimitive(arg, "string");
|
|
14188
|
-
return _typeof$
|
|
14188
|
+
return _typeof$2(key) === "symbol" ? key : String(key);
|
|
14189
14189
|
}
|
|
14190
14190
|
|
|
14191
14191
|
function _defineProperty$1(obj, key, value) {
|
|
@@ -17812,15 +17812,383 @@ Checkbox.propTypes = {
|
|
|
17812
17812
|
name: propTypes.exports.string
|
|
17813
17813
|
};
|
|
17814
17814
|
|
|
17815
|
-
|
|
17815
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
17816
|
+
try {
|
|
17817
|
+
var info = gen[key](arg);
|
|
17818
|
+
var value = info.value;
|
|
17819
|
+
} catch (error) {
|
|
17820
|
+
reject(error);
|
|
17821
|
+
return;
|
|
17822
|
+
}
|
|
17823
|
+
if (info.done) {
|
|
17824
|
+
resolve(value);
|
|
17825
|
+
} else {
|
|
17826
|
+
Promise.resolve(value).then(_next, _throw);
|
|
17827
|
+
}
|
|
17828
|
+
}
|
|
17829
|
+
function _asyncToGenerator(fn) {
|
|
17830
|
+
return function () {
|
|
17831
|
+
var self = this,
|
|
17832
|
+
args = arguments;
|
|
17833
|
+
return new Promise(function (resolve, reject) {
|
|
17834
|
+
var gen = fn.apply(self, args);
|
|
17835
|
+
function _next(value) {
|
|
17836
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
17837
|
+
}
|
|
17838
|
+
function _throw(err) {
|
|
17839
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
17840
|
+
}
|
|
17841
|
+
_next(undefined);
|
|
17842
|
+
});
|
|
17843
|
+
};
|
|
17844
|
+
}
|
|
17845
|
+
|
|
17846
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
17847
|
+
|
|
17848
|
+
var _typeof$1 = {exports: {}};
|
|
17849
|
+
|
|
17850
|
+
(function (module) {
|
|
17851
|
+
function _typeof(obj) {
|
|
17852
|
+
"@babel/helpers - typeof";
|
|
17853
|
+
|
|
17854
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
17855
|
+
return typeof obj;
|
|
17856
|
+
} : function (obj) {
|
|
17857
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
17858
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
17859
|
+
}
|
|
17860
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17861
|
+
} (_typeof$1));
|
|
17862
|
+
|
|
17863
|
+
(function (module) {
|
|
17864
|
+
var _typeof = _typeof$1.exports["default"];
|
|
17865
|
+
function _regeneratorRuntime() {
|
|
17866
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
17867
|
+
return exports;
|
|
17868
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17869
|
+
var exports = {},
|
|
17870
|
+
Op = Object.prototype,
|
|
17871
|
+
hasOwn = Op.hasOwnProperty,
|
|
17872
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
17873
|
+
obj[key] = desc.value;
|
|
17874
|
+
},
|
|
17875
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
17876
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
17877
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
17878
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
17879
|
+
function define(obj, key, value) {
|
|
17880
|
+
return Object.defineProperty(obj, key, {
|
|
17881
|
+
value: value,
|
|
17882
|
+
enumerable: !0,
|
|
17883
|
+
configurable: !0,
|
|
17884
|
+
writable: !0
|
|
17885
|
+
}), obj[key];
|
|
17886
|
+
}
|
|
17887
|
+
try {
|
|
17888
|
+
define({}, "");
|
|
17889
|
+
} catch (err) {
|
|
17890
|
+
define = function define(obj, key, value) {
|
|
17891
|
+
return obj[key] = value;
|
|
17892
|
+
};
|
|
17893
|
+
}
|
|
17894
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
17895
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
17896
|
+
generator = Object.create(protoGenerator.prototype),
|
|
17897
|
+
context = new Context(tryLocsList || []);
|
|
17898
|
+
return defineProperty(generator, "_invoke", {
|
|
17899
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
17900
|
+
}), generator;
|
|
17901
|
+
}
|
|
17902
|
+
function tryCatch(fn, obj, arg) {
|
|
17903
|
+
try {
|
|
17904
|
+
return {
|
|
17905
|
+
type: "normal",
|
|
17906
|
+
arg: fn.call(obj, arg)
|
|
17907
|
+
};
|
|
17908
|
+
} catch (err) {
|
|
17909
|
+
return {
|
|
17910
|
+
type: "throw",
|
|
17911
|
+
arg: err
|
|
17912
|
+
};
|
|
17913
|
+
}
|
|
17914
|
+
}
|
|
17915
|
+
exports.wrap = wrap;
|
|
17916
|
+
var ContinueSentinel = {};
|
|
17917
|
+
function Generator() {}
|
|
17918
|
+
function GeneratorFunction() {}
|
|
17919
|
+
function GeneratorFunctionPrototype() {}
|
|
17920
|
+
var IteratorPrototype = {};
|
|
17921
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
17922
|
+
return this;
|
|
17923
|
+
});
|
|
17924
|
+
var getProto = Object.getPrototypeOf,
|
|
17925
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
17926
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
17927
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
17928
|
+
function defineIteratorMethods(prototype) {
|
|
17929
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
17930
|
+
define(prototype, method, function (arg) {
|
|
17931
|
+
return this._invoke(method, arg);
|
|
17932
|
+
});
|
|
17933
|
+
});
|
|
17934
|
+
}
|
|
17935
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
17936
|
+
function invoke(method, arg, resolve, reject) {
|
|
17937
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
17938
|
+
if ("throw" !== record.type) {
|
|
17939
|
+
var result = record.arg,
|
|
17940
|
+
value = result.value;
|
|
17941
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
17942
|
+
invoke("next", value, resolve, reject);
|
|
17943
|
+
}, function (err) {
|
|
17944
|
+
invoke("throw", err, resolve, reject);
|
|
17945
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
17946
|
+
result.value = unwrapped, resolve(result);
|
|
17947
|
+
}, function (error) {
|
|
17948
|
+
return invoke("throw", error, resolve, reject);
|
|
17949
|
+
});
|
|
17950
|
+
}
|
|
17951
|
+
reject(record.arg);
|
|
17952
|
+
}
|
|
17953
|
+
var previousPromise;
|
|
17954
|
+
defineProperty(this, "_invoke", {
|
|
17955
|
+
value: function value(method, arg) {
|
|
17956
|
+
function callInvokeWithMethodAndArg() {
|
|
17957
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
17958
|
+
invoke(method, arg, resolve, reject);
|
|
17959
|
+
});
|
|
17960
|
+
}
|
|
17961
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
17962
|
+
}
|
|
17963
|
+
});
|
|
17964
|
+
}
|
|
17965
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
17966
|
+
var state = "suspendedStart";
|
|
17967
|
+
return function (method, arg) {
|
|
17968
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
17969
|
+
if ("completed" === state) {
|
|
17970
|
+
if ("throw" === method) throw arg;
|
|
17971
|
+
return doneResult();
|
|
17972
|
+
}
|
|
17973
|
+
for (context.method = method, context.arg = arg;;) {
|
|
17974
|
+
var delegate = context.delegate;
|
|
17975
|
+
if (delegate) {
|
|
17976
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
17977
|
+
if (delegateResult) {
|
|
17978
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
17979
|
+
return delegateResult;
|
|
17980
|
+
}
|
|
17981
|
+
}
|
|
17982
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
17983
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
17984
|
+
context.dispatchException(context.arg);
|
|
17985
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
17986
|
+
state = "executing";
|
|
17987
|
+
var record = tryCatch(innerFn, self, context);
|
|
17988
|
+
if ("normal" === record.type) {
|
|
17989
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
17990
|
+
return {
|
|
17991
|
+
value: record.arg,
|
|
17992
|
+
done: context.done
|
|
17993
|
+
};
|
|
17994
|
+
}
|
|
17995
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
17996
|
+
}
|
|
17997
|
+
};
|
|
17998
|
+
}
|
|
17999
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
18000
|
+
var methodName = context.method,
|
|
18001
|
+
method = delegate.iterator[methodName];
|
|
18002
|
+
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;
|
|
18003
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
18004
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
18005
|
+
var info = record.arg;
|
|
18006
|
+
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);
|
|
18007
|
+
}
|
|
18008
|
+
function pushTryEntry(locs) {
|
|
18009
|
+
var entry = {
|
|
18010
|
+
tryLoc: locs[0]
|
|
18011
|
+
};
|
|
18012
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
18013
|
+
}
|
|
18014
|
+
function resetTryEntry(entry) {
|
|
18015
|
+
var record = entry.completion || {};
|
|
18016
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
18017
|
+
}
|
|
18018
|
+
function Context(tryLocsList) {
|
|
18019
|
+
this.tryEntries = [{
|
|
18020
|
+
tryLoc: "root"
|
|
18021
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
18022
|
+
}
|
|
18023
|
+
function values(iterable) {
|
|
18024
|
+
if (iterable) {
|
|
18025
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
18026
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
18027
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
18028
|
+
if (!isNaN(iterable.length)) {
|
|
18029
|
+
var i = -1,
|
|
18030
|
+
next = function next() {
|
|
18031
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
18032
|
+
return next.value = undefined, next.done = !0, next;
|
|
18033
|
+
};
|
|
18034
|
+
return next.next = next;
|
|
18035
|
+
}
|
|
18036
|
+
}
|
|
18037
|
+
return {
|
|
18038
|
+
next: doneResult
|
|
18039
|
+
};
|
|
18040
|
+
}
|
|
18041
|
+
function doneResult() {
|
|
18042
|
+
return {
|
|
18043
|
+
value: undefined,
|
|
18044
|
+
done: !0
|
|
18045
|
+
};
|
|
18046
|
+
}
|
|
18047
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
18048
|
+
value: GeneratorFunctionPrototype,
|
|
18049
|
+
configurable: !0
|
|
18050
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
18051
|
+
value: GeneratorFunction,
|
|
18052
|
+
configurable: !0
|
|
18053
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
18054
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
18055
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
18056
|
+
}, exports.mark = function (genFun) {
|
|
18057
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
18058
|
+
}, exports.awrap = function (arg) {
|
|
18059
|
+
return {
|
|
18060
|
+
__await: arg
|
|
18061
|
+
};
|
|
18062
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
18063
|
+
return this;
|
|
18064
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
18065
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
18066
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
18067
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
18068
|
+
return result.done ? result.value : iter.next();
|
|
18069
|
+
});
|
|
18070
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
18071
|
+
return this;
|
|
18072
|
+
}), define(Gp, "toString", function () {
|
|
18073
|
+
return "[object Generator]";
|
|
18074
|
+
}), exports.keys = function (val) {
|
|
18075
|
+
var object = Object(val),
|
|
18076
|
+
keys = [];
|
|
18077
|
+
for (var key in object) keys.push(key);
|
|
18078
|
+
return keys.reverse(), function next() {
|
|
18079
|
+
for (; keys.length;) {
|
|
18080
|
+
var key = keys.pop();
|
|
18081
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
18082
|
+
}
|
|
18083
|
+
return next.done = !0, next;
|
|
18084
|
+
};
|
|
18085
|
+
}, exports.values = values, Context.prototype = {
|
|
18086
|
+
constructor: Context,
|
|
18087
|
+
reset: function reset(skipTempReset) {
|
|
18088
|
+
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);
|
|
18089
|
+
},
|
|
18090
|
+
stop: function stop() {
|
|
18091
|
+
this.done = !0;
|
|
18092
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
18093
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
18094
|
+
return this.rval;
|
|
18095
|
+
},
|
|
18096
|
+
dispatchException: function dispatchException(exception) {
|
|
18097
|
+
if (this.done) throw exception;
|
|
18098
|
+
var context = this;
|
|
18099
|
+
function handle(loc, caught) {
|
|
18100
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
18101
|
+
}
|
|
18102
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
18103
|
+
var entry = this.tryEntries[i],
|
|
18104
|
+
record = entry.completion;
|
|
18105
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
18106
|
+
if (entry.tryLoc <= this.prev) {
|
|
18107
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
18108
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
18109
|
+
if (hasCatch && hasFinally) {
|
|
18110
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
18111
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
18112
|
+
} else if (hasCatch) {
|
|
18113
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
18114
|
+
} else {
|
|
18115
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
18116
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
18117
|
+
}
|
|
18118
|
+
}
|
|
18119
|
+
}
|
|
18120
|
+
},
|
|
18121
|
+
abrupt: function abrupt(type, arg) {
|
|
18122
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
18123
|
+
var entry = this.tryEntries[i];
|
|
18124
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
18125
|
+
var finallyEntry = entry;
|
|
18126
|
+
break;
|
|
18127
|
+
}
|
|
18128
|
+
}
|
|
18129
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
18130
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
18131
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
18132
|
+
},
|
|
18133
|
+
complete: function complete(record, afterLoc) {
|
|
18134
|
+
if ("throw" === record.type) throw record.arg;
|
|
18135
|
+
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;
|
|
18136
|
+
},
|
|
18137
|
+
finish: function finish(finallyLoc) {
|
|
18138
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
18139
|
+
var entry = this.tryEntries[i];
|
|
18140
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
18141
|
+
}
|
|
18142
|
+
},
|
|
18143
|
+
"catch": function _catch(tryLoc) {
|
|
18144
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
18145
|
+
var entry = this.tryEntries[i];
|
|
18146
|
+
if (entry.tryLoc === tryLoc) {
|
|
18147
|
+
var record = entry.completion;
|
|
18148
|
+
if ("throw" === record.type) {
|
|
18149
|
+
var thrown = record.arg;
|
|
18150
|
+
resetTryEntry(entry);
|
|
18151
|
+
}
|
|
18152
|
+
return thrown;
|
|
18153
|
+
}
|
|
18154
|
+
}
|
|
18155
|
+
throw new Error("illegal catch attempt");
|
|
18156
|
+
},
|
|
18157
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
18158
|
+
return this.delegate = {
|
|
18159
|
+
iterator: values(iterable),
|
|
18160
|
+
resultName: resultName,
|
|
18161
|
+
nextLoc: nextLoc
|
|
18162
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
18163
|
+
}
|
|
18164
|
+
}, exports;
|
|
18165
|
+
}
|
|
18166
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
18167
|
+
} (regeneratorRuntime$1));
|
|
18168
|
+
|
|
18169
|
+
// TODO(Babel 8): Remove this file.
|
|
18170
|
+
|
|
18171
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
18172
|
+
var regenerator = runtime;
|
|
18173
|
+
|
|
18174
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
18175
|
+
try {
|
|
18176
|
+
regeneratorRuntime = runtime;
|
|
18177
|
+
} catch (accidentalStrictMode) {
|
|
18178
|
+
if (typeof globalThis === "object") {
|
|
18179
|
+
globalThis.regeneratorRuntime = runtime;
|
|
18180
|
+
} else {
|
|
18181
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
18182
|
+
}
|
|
18183
|
+
}
|
|
18184
|
+
|
|
18185
|
+
var _excluded$j = ["values", "validateForm", "setErrors", "setTouched"];
|
|
17816
18186
|
var FormWrapper = /*#__PURE__*/React.forwardRef(function (_ref, formRef) {
|
|
17817
18187
|
var className = _ref.className,
|
|
17818
18188
|
formProps = _ref.formProps,
|
|
17819
18189
|
children = _ref.children,
|
|
17820
|
-
onSubmit = _ref.onSubmit
|
|
17821
|
-
setEnableChangeAndBlurValidation = _ref.setEnableChangeAndBlurValidation;
|
|
18190
|
+
onSubmit = _ref.onSubmit;
|
|
17822
18191
|
var _useFormikContext = formik.useFormikContext(),
|
|
17823
|
-
submitCount = _useFormikContext.submitCount,
|
|
17824
18192
|
values = _useFormikContext.values,
|
|
17825
18193
|
validateForm = _useFormikContext.validateForm,
|
|
17826
18194
|
setErrors = _useFormikContext.setErrors,
|
|
@@ -17828,30 +18196,66 @@ var FormWrapper = /*#__PURE__*/React.forwardRef(function (_ref, formRef) {
|
|
|
17828
18196
|
formikBag = _objectWithoutProperties$1(_useFormikContext, _excluded$j);
|
|
17829
18197
|
var isFormDirty = formikBag.dirty,
|
|
17830
18198
|
isSubmitting = formikBag.isSubmitting;
|
|
17831
|
-
var handleKeyDown = React.useCallback(function (
|
|
17832
|
-
var
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
18199
|
+
var handleKeyDown = React.useCallback( /*#__PURE__*/function () {
|
|
18200
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(event) {
|
|
18201
|
+
var isEventFromEditorOrTextarea, errors;
|
|
18202
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
18203
|
+
while (1) switch (_context.prev = _context.next) {
|
|
18204
|
+
case 0:
|
|
18205
|
+
isEventFromEditorOrTextarea = event.target.tagName === "TEXTAREA" || event.target.editor;
|
|
18206
|
+
if (!(event.key !== "Enter")) {
|
|
18207
|
+
_context.next = 3;
|
|
18208
|
+
break;
|
|
18209
|
+
}
|
|
18210
|
+
return _context.abrupt("return");
|
|
18211
|
+
case 3:
|
|
18212
|
+
if (!(isEventFromEditorOrTextarea && !event.metaKey)) {
|
|
18213
|
+
_context.next = 5;
|
|
18214
|
+
break;
|
|
18215
|
+
}
|
|
18216
|
+
return _context.abrupt("return");
|
|
18217
|
+
case 5:
|
|
18218
|
+
event.preventDefault();
|
|
18219
|
+
if (!event.shiftKey) {
|
|
18220
|
+
_context.next = 8;
|
|
18221
|
+
break;
|
|
18222
|
+
}
|
|
18223
|
+
return _context.abrupt("return");
|
|
18224
|
+
case 8:
|
|
18225
|
+
if (!(!isFormDirty || isSubmitting)) {
|
|
18226
|
+
_context.next = 10;
|
|
18227
|
+
break;
|
|
18228
|
+
}
|
|
18229
|
+
return _context.abrupt("return");
|
|
18230
|
+
case 10:
|
|
18231
|
+
_context.prev = 10;
|
|
18232
|
+
_context.next = 13;
|
|
18233
|
+
return validateForm();
|
|
18234
|
+
case 13:
|
|
18235
|
+
errors = _context.sent;
|
|
18236
|
+
if (Object.keys(errors).length > 0) {
|
|
18237
|
+
setErrors(errors);
|
|
18238
|
+
setTouched(errors);
|
|
18239
|
+
} else {
|
|
18240
|
+
onSubmit(values, formikBag);
|
|
18241
|
+
}
|
|
18242
|
+
_context.next = 20;
|
|
18243
|
+
break;
|
|
18244
|
+
case 17:
|
|
18245
|
+
_context.prev = 17;
|
|
18246
|
+
_context.t0 = _context["catch"](10);
|
|
18247
|
+
// eslint-disable-next-line no-console
|
|
18248
|
+
console.error("An unhandled error was caught from validateForm()", _context.t0);
|
|
18249
|
+
case 20:
|
|
18250
|
+
case "end":
|
|
18251
|
+
return _context.stop();
|
|
18252
|
+
}
|
|
18253
|
+
}, _callee, null, [[10, 17]]);
|
|
18254
|
+
}));
|
|
18255
|
+
return function (_x) {
|
|
18256
|
+
return _ref2.apply(this, arguments);
|
|
18257
|
+
};
|
|
18258
|
+
}(), [values, validateForm, setErrors, setTouched, onSubmit, isFormDirty, isSubmitting]);
|
|
17855
18259
|
return /*#__PURE__*/React__default["default"].createElement(formik.Form, _extends$2({
|
|
17856
18260
|
noValidate: true,
|
|
17857
18261
|
className: className,
|
|
@@ -17860,30 +18264,45 @@ var FormWrapper = /*#__PURE__*/React.forwardRef(function (_ref, formRef) {
|
|
|
17860
18264
|
onKeyDown: handleKeyDown
|
|
17861
18265
|
}, formProps), children);
|
|
17862
18266
|
});
|
|
18267
|
+
FormWrapper.displayName = "FormWrapper";
|
|
17863
18268
|
|
|
17864
18269
|
var Form = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17865
18270
|
var className = _ref.className,
|
|
17866
18271
|
children = _ref.children,
|
|
17867
18272
|
formikProps = _ref.formikProps,
|
|
17868
18273
|
formProps = _ref.formProps;
|
|
17869
|
-
|
|
17870
|
-
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17871
|
-
enabledChangeAndBlurValidation = _useState2[0],
|
|
17872
|
-
setEnabledChangeAndBlurValidation = _useState2[1];
|
|
17873
|
-
return /*#__PURE__*/React__default["default"].createElement(formik.Formik, _extends$2({}, formikProps, {
|
|
17874
|
-
validateOnBlur: (formikProps === null || formikProps === void 0 ? void 0 : formikProps.validateOnBlur) && enabledChangeAndBlurValidation,
|
|
17875
|
-
validateOnChange: (formikProps === null || formikProps === void 0 ? void 0 : formikProps.validateOnChange) && enabledChangeAndBlurValidation
|
|
17876
|
-
}), function (props) {
|
|
18274
|
+
return /*#__PURE__*/React__default["default"].createElement(formik.Formik, formikProps, function (props) {
|
|
17877
18275
|
return /*#__PURE__*/React__default["default"].createElement(FormWrapper, {
|
|
17878
18276
|
className: className,
|
|
17879
18277
|
formProps: formProps,
|
|
17880
18278
|
ref: ref,
|
|
17881
|
-
setEnableChangeAndBlurValidation: setEnabledChangeAndBlurValidation,
|
|
17882
18279
|
onSubmit: formikProps === null || formikProps === void 0 ? void 0 : formikProps.onSubmit
|
|
17883
18280
|
}, typeof children === "function" ? children(props) : children);
|
|
17884
18281
|
});
|
|
17885
18282
|
});
|
|
17886
18283
|
Form.displayName = "Form";
|
|
18284
|
+
Form.propTypes = {
|
|
18285
|
+
/**
|
|
18286
|
+
* Pass a function to render children or pass the children directly
|
|
18287
|
+
**/
|
|
18288
|
+
children: propTypes.exports.node,
|
|
18289
|
+
/**
|
|
18290
|
+
* Additional classnames to be passed to the form wrapper
|
|
18291
|
+
**/
|
|
18292
|
+
className: propTypes.exports.string,
|
|
18293
|
+
/**
|
|
18294
|
+
* Props to be passed to the Formik component like `initialValues`, `validationSchema`, `onSubmit`
|
|
18295
|
+
* Refer to the Formik docs for more details
|
|
18296
|
+
* https://formik.org/docs/api/formik
|
|
18297
|
+
**/
|
|
18298
|
+
formikProps: propTypes.exports.object,
|
|
18299
|
+
/**
|
|
18300
|
+
* Props to be passed to the form element like `className`.
|
|
18301
|
+
* Refer to the Formik docs for more details
|
|
18302
|
+
* https://formik.org/docs/api/form
|
|
18303
|
+
**/
|
|
18304
|
+
formProps: propTypes.exports.object
|
|
18305
|
+
};
|
|
17887
18306
|
|
|
17888
18307
|
var _excluded$i = ["size", "type", "label", "error", "suffix", "prefix", "disabled", "helpText", "className", "nakedInput", "contentSize", "required", "maxLength", "unlimitedChars", "labelProps"];
|
|
17889
18308
|
var SIZES$2 = {
|
|
@@ -24749,7 +25168,7 @@ var renderValidEmails = function renderValidEmails(values) {
|
|
|
24749
25168
|
return email.valid && email;
|
|
24750
25169
|
});
|
|
24751
25170
|
};
|
|
24752
|
-
var
|
|
25171
|
+
var getValidEmailsCount = function getValidEmailsCount(values) {
|
|
24753
25172
|
return renderValidEmails(values).length;
|
|
24754
25173
|
};
|
|
24755
25174
|
var renderDefaultText = function renderDefaultText(count) {
|
|
@@ -24788,7 +25207,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24788
25207
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
24789
25208
|
inputValue = _useState2[0],
|
|
24790
25209
|
setInputValue = _useState2[1];
|
|
24791
|
-
var isCounterVisible = !!counter && (!counter.startsFrom ||
|
|
25210
|
+
var isCounterVisible = !!counter && (!counter.startsFrom || getValidEmailsCount(value) >= counter.startsFrom);
|
|
24792
25211
|
var isOptionsPresent = !!otherProps.options;
|
|
24793
25212
|
var handleFilterEmails = function handleFilterEmails() {
|
|
24794
25213
|
return onChange(renderValidEmails(value));
|
|
@@ -24846,6 +25265,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24846
25265
|
isValidNewOption: isValidNewOption
|
|
24847
25266
|
};
|
|
24848
25267
|
}
|
|
25268
|
+
var isFilterEmailsLinkVisible = !!filterInvalidEmails && value.length > getValidEmailsCount(value);
|
|
24849
25269
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24850
25270
|
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-email-input"
|
|
24851
25271
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -24858,7 +25278,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24858
25278
|
className: "neeto-ui-email-input__counter",
|
|
24859
25279
|
"data-cy": "".concat(hyphenize(label), "-email-counter"),
|
|
24860
25280
|
style: "body2"
|
|
24861
|
-
},
|
|
25281
|
+
}, getValidEmailsCount(value), " ", counter.label ? counter.label : renderDefaultText(getValidEmailsCount(value)))), /*#__PURE__*/React__default["default"].createElement(CreatableSelect, _extends$2({
|
|
24862
25282
|
isMulti: true,
|
|
24863
25283
|
required: true,
|
|
24864
25284
|
classNamePrefix: "neeto-ui-react-select",
|
|
@@ -24891,7 +25311,7 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24891
25311
|
className: "neeto-ui-input__error",
|
|
24892
25312
|
"data-cy": "".concat(hyphenize(label), "-input-error"),
|
|
24893
25313
|
style: "body3"
|
|
24894
|
-
}, error,
|
|
25314
|
+
}, error, isFilterEmailsLinkVisible && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
24895
25315
|
className: "neeto-ui-typography neeto-ui-text-body3 neeto-ui-font-semibold cursor-pointer",
|
|
24896
25316
|
onClick: handleFilterEmails
|
|
24897
25317
|
}, "\xA0", filterInvalidEmails.label ? filterInvalidEmails.label : "Click here to remove invalid emails.")), !!helpText && /*#__PURE__*/React__default["default"].createElement(Typography, {
|
|
@@ -25336,7 +25756,7 @@ var SelectField = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
25336
25756
|
return getOptionValue(option);
|
|
25337
25757
|
};
|
|
25338
25758
|
var buildValueObj = function buildValueObj(value, options) {
|
|
25339
|
-
if (_typeof$
|
|
25759
|
+
if (_typeof$2(value) === "object") return value;
|
|
25340
25760
|
return options.filter(function (option) {
|
|
25341
25761
|
return getRealOptionValue(option) === value;
|
|
25342
25762
|
})[0];
|