@djb25/digit-ui-module-ws 1.0.88 → 1.0.89
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.js +1267 -86
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1315 -134
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,29 +9,36 @@ var reactHookForm = require('react-hook-form');
|
|
|
9
9
|
var XLSX = require('xlsx');
|
|
10
10
|
var reactQuery = require('react-query');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
13
|
+
|
|
14
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
15
|
+
|
|
16
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
17
|
+
|
|
18
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
14
19
|
function _catch(body, recover) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
try {
|
|
21
|
+
var result = body();
|
|
22
|
+
} catch(e) {
|
|
23
|
+
return recover(e);
|
|
24
|
+
}
|
|
25
|
+
if (result && result.then) {
|
|
26
|
+
return result.then(void 0, recover);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
24
29
|
}
|
|
30
|
+
|
|
31
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
25
32
|
function _finallyRethrows(body, finalizer) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
try {
|
|
34
|
+
var result = body();
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return finalizer(true, e);
|
|
37
|
+
}
|
|
38
|
+
if (result && result.then) {
|
|
39
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
40
|
+
}
|
|
41
|
+
return finalizer(false, result);
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
const TestAcknowledgment = () => {
|
|
@@ -16752,6 +16759,31 @@ const WSActivationSupportingDocuments = _ref => {
|
|
|
16752
16759
|
}))));
|
|
16753
16760
|
};
|
|
16754
16761
|
|
|
16762
|
+
const _iteratorSymbol$1 = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
16763
|
+
const _asyncIteratorSymbol$1 = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
16764
|
+
function _catch$1(body, recover) {
|
|
16765
|
+
try {
|
|
16766
|
+
var result = body();
|
|
16767
|
+
} catch (e) {
|
|
16768
|
+
return recover(e);
|
|
16769
|
+
}
|
|
16770
|
+
if (result && result.then) {
|
|
16771
|
+
return result.then(void 0, recover);
|
|
16772
|
+
}
|
|
16773
|
+
return result;
|
|
16774
|
+
}
|
|
16775
|
+
function _finallyRethrows$1(body, finalizer) {
|
|
16776
|
+
try {
|
|
16777
|
+
var result = body();
|
|
16778
|
+
} catch (e) {
|
|
16779
|
+
return finalizer(true, e);
|
|
16780
|
+
}
|
|
16781
|
+
if (result && result.then) {
|
|
16782
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
16783
|
+
}
|
|
16784
|
+
return finalizer(false, result);
|
|
16785
|
+
}
|
|
16786
|
+
|
|
16755
16787
|
var b = "function" === typeof Symbol && Symbol.for,
|
|
16756
16788
|
c = b ? Symbol.for("react.element") : 60103,
|
|
16757
16789
|
d = b ? Symbol.for("react.portal") : 60106,
|
|
@@ -17904,7 +17936,7 @@ const UploadFileDigiLocker = props => {
|
|
|
17904
17936
|
try {
|
|
17905
17937
|
let _exit = false;
|
|
17906
17938
|
e.preventDefault();
|
|
17907
|
-
return Promise.resolve(_catch(function () {
|
|
17939
|
+
return Promise.resolve(_catch$1(function () {
|
|
17908
17940
|
function _temp13(_result) {
|
|
17909
17941
|
if (_exit) return _result;
|
|
17910
17942
|
let TokenReq = {
|
|
@@ -18115,7 +18147,7 @@ const UploadFileDigiLocker = props => {
|
|
|
18115
18147
|
function _temp2() {
|
|
18116
18148
|
_exit = true;
|
|
18117
18149
|
}
|
|
18118
|
-
const _temp = _catch(function () {
|
|
18150
|
+
const _temp = _catch$1(function () {
|
|
18119
18151
|
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
|
|
18120
18152
|
return Promise.resolve(Digit.DigiLockerService.authorization({
|
|
18121
18153
|
module: "WS",
|
|
@@ -29360,6 +29392,1101 @@ const config = [{
|
|
|
29360
29392
|
}]
|
|
29361
29393
|
}];
|
|
29362
29394
|
|
|
29395
|
+
/** @license React v16.13.1
|
|
29396
|
+
* react-is.production.min.js
|
|
29397
|
+
*
|
|
29398
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29399
|
+
*
|
|
29400
|
+
* This source code is licensed under the MIT license found in the
|
|
29401
|
+
* LICENSE file in the root directory of this source tree.
|
|
29402
|
+
*/
|
|
29403
|
+
var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$1=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$1=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$1=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?
|
|
29404
|
+
Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$1=b$1?Symbol.for("react.block"):60121,w$1=b$1?Symbol.for("react.fundamental"):60117,x$1=b$1?Symbol.for("react.responder"):60118,y$1=b$1?Symbol.for("react.scope"):60119;
|
|
29405
|
+
function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r$1:case h$1:return a;default:return u}}case d$1:return u}}}function A$1(a){return z$1(a)===m$1}var AsyncMode$1=l$1;var ConcurrentMode$1=m$1;var ContextConsumer$1=k$1;var ContextProvider$1=h$1;var Element$1=c$1;var ForwardRef$1=n$1;var Fragment$1=e$1;var Lazy$1=t$1;var Memo$1=r$1;var Portal$1=d$1;
|
|
29406
|
+
var Profiler$1=g$1;var StrictMode$1=f$1;var Suspense$1=p$1;var isAsyncMode$1=function(a){return A$1(a)||z$1(a)===l$1};var isConcurrentMode$1=A$1;var isContextConsumer$1=function(a){return z$1(a)===k$1};var isContextProvider$1=function(a){return z$1(a)===h$1};var isElement$1=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};var isForwardRef$1=function(a){return z$1(a)===n$1};var isFragment$1=function(a){return z$1(a)===e$1};var isLazy$1=function(a){return z$1(a)===t$1};
|
|
29407
|
+
var isMemo$1=function(a){return z$1(a)===r$1};var isPortal$1=function(a){return z$1(a)===d$1};var isProfiler$1=function(a){return z$1(a)===g$1};var isStrictMode$1=function(a){return z$1(a)===f$1};var isSuspense$1=function(a){return z$1(a)===p$1};
|
|
29408
|
+
var isValidElementType$1=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$1||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w$1||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$1)};var typeOf$1=z$1;
|
|
29409
|
+
|
|
29410
|
+
var reactIs_production_min$1 = {
|
|
29411
|
+
AsyncMode: AsyncMode$1,
|
|
29412
|
+
ConcurrentMode: ConcurrentMode$1,
|
|
29413
|
+
ContextConsumer: ContextConsumer$1,
|
|
29414
|
+
ContextProvider: ContextProvider$1,
|
|
29415
|
+
Element: Element$1,
|
|
29416
|
+
ForwardRef: ForwardRef$1,
|
|
29417
|
+
Fragment: Fragment$1,
|
|
29418
|
+
Lazy: Lazy$1,
|
|
29419
|
+
Memo: Memo$1,
|
|
29420
|
+
Portal: Portal$1,
|
|
29421
|
+
Profiler: Profiler$1,
|
|
29422
|
+
StrictMode: StrictMode$1,
|
|
29423
|
+
Suspense: Suspense$1,
|
|
29424
|
+
isAsyncMode: isAsyncMode$1,
|
|
29425
|
+
isConcurrentMode: isConcurrentMode$1,
|
|
29426
|
+
isContextConsumer: isContextConsumer$1,
|
|
29427
|
+
isContextProvider: isContextProvider$1,
|
|
29428
|
+
isElement: isElement$1,
|
|
29429
|
+
isForwardRef: isForwardRef$1,
|
|
29430
|
+
isFragment: isFragment$1,
|
|
29431
|
+
isLazy: isLazy$1,
|
|
29432
|
+
isMemo: isMemo$1,
|
|
29433
|
+
isPortal: isPortal$1,
|
|
29434
|
+
isProfiler: isProfiler$1,
|
|
29435
|
+
isStrictMode: isStrictMode$1,
|
|
29436
|
+
isSuspense: isSuspense$1,
|
|
29437
|
+
isValidElementType: isValidElementType$1,
|
|
29438
|
+
typeOf: typeOf$1
|
|
29439
|
+
};
|
|
29440
|
+
|
|
29441
|
+
var reactIs_development$1 = createCommonjsModule(function (module, exports) {
|
|
29442
|
+
|
|
29443
|
+
|
|
29444
|
+
|
|
29445
|
+
if (process.env.NODE_ENV !== "production") {
|
|
29446
|
+
(function() {
|
|
29447
|
+
|
|
29448
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
29449
|
+
// nor polyfill, then a plain number is used for performance.
|
|
29450
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
29451
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
29452
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
29453
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
29454
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
29455
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
29456
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
29457
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
29458
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
29459
|
+
|
|
29460
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
29461
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
29462
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
29463
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
29464
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
29465
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
29466
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
29467
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
29468
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
29469
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
29470
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
29471
|
+
|
|
29472
|
+
function isValidElementType(type) {
|
|
29473
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
29474
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
29475
|
+
}
|
|
29476
|
+
|
|
29477
|
+
function typeOf(object) {
|
|
29478
|
+
if (typeof object === 'object' && object !== null) {
|
|
29479
|
+
var $$typeof = object.$$typeof;
|
|
29480
|
+
|
|
29481
|
+
switch ($$typeof) {
|
|
29482
|
+
case REACT_ELEMENT_TYPE:
|
|
29483
|
+
var type = object.type;
|
|
29484
|
+
|
|
29485
|
+
switch (type) {
|
|
29486
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
29487
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
29488
|
+
case REACT_FRAGMENT_TYPE:
|
|
29489
|
+
case REACT_PROFILER_TYPE:
|
|
29490
|
+
case REACT_STRICT_MODE_TYPE:
|
|
29491
|
+
case REACT_SUSPENSE_TYPE:
|
|
29492
|
+
return type;
|
|
29493
|
+
|
|
29494
|
+
default:
|
|
29495
|
+
var $$typeofType = type && type.$$typeof;
|
|
29496
|
+
|
|
29497
|
+
switch ($$typeofType) {
|
|
29498
|
+
case REACT_CONTEXT_TYPE:
|
|
29499
|
+
case REACT_FORWARD_REF_TYPE:
|
|
29500
|
+
case REACT_LAZY_TYPE:
|
|
29501
|
+
case REACT_MEMO_TYPE:
|
|
29502
|
+
case REACT_PROVIDER_TYPE:
|
|
29503
|
+
return $$typeofType;
|
|
29504
|
+
|
|
29505
|
+
default:
|
|
29506
|
+
return $$typeof;
|
|
29507
|
+
}
|
|
29508
|
+
|
|
29509
|
+
}
|
|
29510
|
+
|
|
29511
|
+
case REACT_PORTAL_TYPE:
|
|
29512
|
+
return $$typeof;
|
|
29513
|
+
}
|
|
29514
|
+
}
|
|
29515
|
+
|
|
29516
|
+
return undefined;
|
|
29517
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
29518
|
+
|
|
29519
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
29520
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
29521
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
29522
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
29523
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
29524
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
29525
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
29526
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
29527
|
+
var Memo = REACT_MEMO_TYPE;
|
|
29528
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
29529
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
29530
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
29531
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
29532
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
29533
|
+
|
|
29534
|
+
function isAsyncMode(object) {
|
|
29535
|
+
{
|
|
29536
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
29537
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
29538
|
+
|
|
29539
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
29540
|
+
}
|
|
29541
|
+
}
|
|
29542
|
+
|
|
29543
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
29544
|
+
}
|
|
29545
|
+
function isConcurrentMode(object) {
|
|
29546
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
29547
|
+
}
|
|
29548
|
+
function isContextConsumer(object) {
|
|
29549
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
29550
|
+
}
|
|
29551
|
+
function isContextProvider(object) {
|
|
29552
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
29553
|
+
}
|
|
29554
|
+
function isElement(object) {
|
|
29555
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
29556
|
+
}
|
|
29557
|
+
function isForwardRef(object) {
|
|
29558
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
29559
|
+
}
|
|
29560
|
+
function isFragment(object) {
|
|
29561
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
29562
|
+
}
|
|
29563
|
+
function isLazy(object) {
|
|
29564
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
29565
|
+
}
|
|
29566
|
+
function isMemo(object) {
|
|
29567
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
29568
|
+
}
|
|
29569
|
+
function isPortal(object) {
|
|
29570
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
29571
|
+
}
|
|
29572
|
+
function isProfiler(object) {
|
|
29573
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
29574
|
+
}
|
|
29575
|
+
function isStrictMode(object) {
|
|
29576
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
29577
|
+
}
|
|
29578
|
+
function isSuspense(object) {
|
|
29579
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
29580
|
+
}
|
|
29581
|
+
|
|
29582
|
+
exports.AsyncMode = AsyncMode;
|
|
29583
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
29584
|
+
exports.ContextConsumer = ContextConsumer;
|
|
29585
|
+
exports.ContextProvider = ContextProvider;
|
|
29586
|
+
exports.Element = Element;
|
|
29587
|
+
exports.ForwardRef = ForwardRef;
|
|
29588
|
+
exports.Fragment = Fragment;
|
|
29589
|
+
exports.Lazy = Lazy;
|
|
29590
|
+
exports.Memo = Memo;
|
|
29591
|
+
exports.Portal = Portal;
|
|
29592
|
+
exports.Profiler = Profiler;
|
|
29593
|
+
exports.StrictMode = StrictMode;
|
|
29594
|
+
exports.Suspense = Suspense;
|
|
29595
|
+
exports.isAsyncMode = isAsyncMode;
|
|
29596
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
29597
|
+
exports.isContextConsumer = isContextConsumer;
|
|
29598
|
+
exports.isContextProvider = isContextProvider;
|
|
29599
|
+
exports.isElement = isElement;
|
|
29600
|
+
exports.isForwardRef = isForwardRef;
|
|
29601
|
+
exports.isFragment = isFragment;
|
|
29602
|
+
exports.isLazy = isLazy;
|
|
29603
|
+
exports.isMemo = isMemo;
|
|
29604
|
+
exports.isPortal = isPortal;
|
|
29605
|
+
exports.isProfiler = isProfiler;
|
|
29606
|
+
exports.isStrictMode = isStrictMode;
|
|
29607
|
+
exports.isSuspense = isSuspense;
|
|
29608
|
+
exports.isValidElementType = isValidElementType;
|
|
29609
|
+
exports.typeOf = typeOf;
|
|
29610
|
+
})();
|
|
29611
|
+
}
|
|
29612
|
+
});
|
|
29613
|
+
|
|
29614
|
+
var reactIs$1 = createCommonjsModule(function (module) {
|
|
29615
|
+
|
|
29616
|
+
if (process.env.NODE_ENV === 'production') {
|
|
29617
|
+
module.exports = reactIs_production_min$1;
|
|
29618
|
+
} else {
|
|
29619
|
+
module.exports = reactIs_development$1;
|
|
29620
|
+
}
|
|
29621
|
+
});
|
|
29622
|
+
|
|
29623
|
+
/*
|
|
29624
|
+
object-assign
|
|
29625
|
+
(c) Sindre Sorhus
|
|
29626
|
+
@license MIT
|
|
29627
|
+
*/
|
|
29628
|
+
/* eslint-disable no-unused-vars */
|
|
29629
|
+
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
29630
|
+
var hasOwnProperty$b = Object.prototype.hasOwnProperty;
|
|
29631
|
+
var propIsEnumerable$1 = Object.prototype.propertyIsEnumerable;
|
|
29632
|
+
|
|
29633
|
+
function toObject$1(val) {
|
|
29634
|
+
if (val === null || val === undefined) {
|
|
29635
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
29636
|
+
}
|
|
29637
|
+
|
|
29638
|
+
return Object(val);
|
|
29639
|
+
}
|
|
29640
|
+
|
|
29641
|
+
function shouldUseNative$1() {
|
|
29642
|
+
try {
|
|
29643
|
+
if (!Object.assign) {
|
|
29644
|
+
return false;
|
|
29645
|
+
}
|
|
29646
|
+
|
|
29647
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
29648
|
+
|
|
29649
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
29650
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
29651
|
+
test1[5] = 'de';
|
|
29652
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
29653
|
+
return false;
|
|
29654
|
+
}
|
|
29655
|
+
|
|
29656
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
29657
|
+
var test2 = {};
|
|
29658
|
+
for (var i = 0; i < 10; i++) {
|
|
29659
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
29660
|
+
}
|
|
29661
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
29662
|
+
return test2[n];
|
|
29663
|
+
});
|
|
29664
|
+
if (order2.join('') !== '0123456789') {
|
|
29665
|
+
return false;
|
|
29666
|
+
}
|
|
29667
|
+
|
|
29668
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
29669
|
+
var test3 = {};
|
|
29670
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
29671
|
+
test3[letter] = letter;
|
|
29672
|
+
});
|
|
29673
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
29674
|
+
'abcdefghijklmnopqrst') {
|
|
29675
|
+
return false;
|
|
29676
|
+
}
|
|
29677
|
+
|
|
29678
|
+
return true;
|
|
29679
|
+
} catch (err) {
|
|
29680
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
29681
|
+
return false;
|
|
29682
|
+
}
|
|
29683
|
+
}
|
|
29684
|
+
|
|
29685
|
+
var objectAssign$1 = shouldUseNative$1() ? Object.assign : function (target, source) {
|
|
29686
|
+
var from;
|
|
29687
|
+
var to = toObject$1(target);
|
|
29688
|
+
var symbols;
|
|
29689
|
+
|
|
29690
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
29691
|
+
from = Object(arguments[s]);
|
|
29692
|
+
|
|
29693
|
+
for (var key in from) {
|
|
29694
|
+
if (hasOwnProperty$b.call(from, key)) {
|
|
29695
|
+
to[key] = from[key];
|
|
29696
|
+
}
|
|
29697
|
+
}
|
|
29698
|
+
|
|
29699
|
+
if (getOwnPropertySymbols$1) {
|
|
29700
|
+
symbols = getOwnPropertySymbols$1(from);
|
|
29701
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
29702
|
+
if (propIsEnumerable$1.call(from, symbols[i])) {
|
|
29703
|
+
to[symbols[i]] = from[symbols[i]];
|
|
29704
|
+
}
|
|
29705
|
+
}
|
|
29706
|
+
}
|
|
29707
|
+
}
|
|
29708
|
+
|
|
29709
|
+
return to;
|
|
29710
|
+
};
|
|
29711
|
+
|
|
29712
|
+
/**
|
|
29713
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
29714
|
+
*
|
|
29715
|
+
* This source code is licensed under the MIT license found in the
|
|
29716
|
+
* LICENSE file in the root directory of this source tree.
|
|
29717
|
+
*/
|
|
29718
|
+
|
|
29719
|
+
var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
29720
|
+
|
|
29721
|
+
var ReactPropTypesSecret_1$1 = ReactPropTypesSecret$2;
|
|
29722
|
+
|
|
29723
|
+
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
29724
|
+
|
|
29725
|
+
var printWarning$2 = function() {};
|
|
29726
|
+
|
|
29727
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29728
|
+
var ReactPropTypesSecret$3 = ReactPropTypesSecret_1$1;
|
|
29729
|
+
var loggedTypeFailures$1 = {};
|
|
29730
|
+
var has$3 = has$2;
|
|
29731
|
+
|
|
29732
|
+
printWarning$2 = function(text) {
|
|
29733
|
+
var message = 'Warning: ' + text;
|
|
29734
|
+
if (typeof console !== 'undefined') {
|
|
29735
|
+
console.error(message);
|
|
29736
|
+
}
|
|
29737
|
+
try {
|
|
29738
|
+
// --- Welcome to debugging React ---
|
|
29739
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
29740
|
+
// to find the callsite that caused this warning to fire.
|
|
29741
|
+
throw new Error(message);
|
|
29742
|
+
} catch (x) { /**/ }
|
|
29743
|
+
};
|
|
29744
|
+
}
|
|
29745
|
+
|
|
29746
|
+
/**
|
|
29747
|
+
* Assert that the values match with the type specs.
|
|
29748
|
+
* Error messages are memorized and will only be shown once.
|
|
29749
|
+
*
|
|
29750
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
29751
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
29752
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
29753
|
+
* @param {string} componentName Name of the component for error messages.
|
|
29754
|
+
* @param {?Function} getStack Returns the component stack.
|
|
29755
|
+
* @private
|
|
29756
|
+
*/
|
|
29757
|
+
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
29758
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29759
|
+
for (var typeSpecName in typeSpecs) {
|
|
29760
|
+
if (has$3(typeSpecs, typeSpecName)) {
|
|
29761
|
+
var error;
|
|
29762
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
29763
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
29764
|
+
// After these have been cleaned up, we'll let them throw.
|
|
29765
|
+
try {
|
|
29766
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
29767
|
+
// behavior as without this statement except with a better message.
|
|
29768
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
29769
|
+
var err = Error(
|
|
29770
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
29771
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
29772
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
29773
|
+
);
|
|
29774
|
+
err.name = 'Invariant Violation';
|
|
29775
|
+
throw err;
|
|
29776
|
+
}
|
|
29777
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$3);
|
|
29778
|
+
} catch (ex) {
|
|
29779
|
+
error = ex;
|
|
29780
|
+
}
|
|
29781
|
+
if (error && !(error instanceof Error)) {
|
|
29782
|
+
printWarning$2(
|
|
29783
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
29784
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
29785
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
29786
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
29787
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
29788
|
+
'shape all require an argument).'
|
|
29789
|
+
);
|
|
29790
|
+
}
|
|
29791
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures$1)) {
|
|
29792
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
29793
|
+
// same error.
|
|
29794
|
+
loggedTypeFailures$1[error.message] = true;
|
|
29795
|
+
|
|
29796
|
+
var stack = getStack ? getStack() : '';
|
|
29797
|
+
|
|
29798
|
+
printWarning$2(
|
|
29799
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
29800
|
+
);
|
|
29801
|
+
}
|
|
29802
|
+
}
|
|
29803
|
+
}
|
|
29804
|
+
}
|
|
29805
|
+
}
|
|
29806
|
+
|
|
29807
|
+
/**
|
|
29808
|
+
* Resets warning cache when testing.
|
|
29809
|
+
*
|
|
29810
|
+
* @private
|
|
29811
|
+
*/
|
|
29812
|
+
checkPropTypes$1.resetWarningCache = function() {
|
|
29813
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29814
|
+
loggedTypeFailures$1 = {};
|
|
29815
|
+
}
|
|
29816
|
+
};
|
|
29817
|
+
|
|
29818
|
+
var checkPropTypes_1$1 = checkPropTypes$1;
|
|
29819
|
+
|
|
29820
|
+
var printWarning$3 = function() {};
|
|
29821
|
+
|
|
29822
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29823
|
+
printWarning$3 = function(text) {
|
|
29824
|
+
var message = 'Warning: ' + text;
|
|
29825
|
+
if (typeof console !== 'undefined') {
|
|
29826
|
+
console.error(message);
|
|
29827
|
+
}
|
|
29828
|
+
try {
|
|
29829
|
+
// --- Welcome to debugging React ---
|
|
29830
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
29831
|
+
// to find the callsite that caused this warning to fire.
|
|
29832
|
+
throw new Error(message);
|
|
29833
|
+
} catch (x) {}
|
|
29834
|
+
};
|
|
29835
|
+
}
|
|
29836
|
+
|
|
29837
|
+
function emptyFunctionThatReturnsNull$1() {
|
|
29838
|
+
return null;
|
|
29839
|
+
}
|
|
29840
|
+
|
|
29841
|
+
var factoryWithTypeCheckers$1 = function(isValidElement, throwOnDirectAccess) {
|
|
29842
|
+
/* global Symbol */
|
|
29843
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
29844
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
29845
|
+
|
|
29846
|
+
/**
|
|
29847
|
+
* Returns the iterator method function contained on the iterable object.
|
|
29848
|
+
*
|
|
29849
|
+
* Be sure to invoke the function with the iterable as context:
|
|
29850
|
+
*
|
|
29851
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
29852
|
+
* if (iteratorFn) {
|
|
29853
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
29854
|
+
* ...
|
|
29855
|
+
* }
|
|
29856
|
+
*
|
|
29857
|
+
* @param {?object} maybeIterable
|
|
29858
|
+
* @return {?function}
|
|
29859
|
+
*/
|
|
29860
|
+
function getIteratorFn(maybeIterable) {
|
|
29861
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
29862
|
+
if (typeof iteratorFn === 'function') {
|
|
29863
|
+
return iteratorFn;
|
|
29864
|
+
}
|
|
29865
|
+
}
|
|
29866
|
+
|
|
29867
|
+
/**
|
|
29868
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
29869
|
+
* supplied to React components. Example usage:
|
|
29870
|
+
*
|
|
29871
|
+
* var Props = require('ReactPropTypes');
|
|
29872
|
+
* var MyArticle = React.createClass({
|
|
29873
|
+
* propTypes: {
|
|
29874
|
+
* // An optional string prop named "description".
|
|
29875
|
+
* description: Props.string,
|
|
29876
|
+
*
|
|
29877
|
+
* // A required enum prop named "category".
|
|
29878
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
29879
|
+
*
|
|
29880
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
29881
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
29882
|
+
* },
|
|
29883
|
+
* render: function() { ... }
|
|
29884
|
+
* });
|
|
29885
|
+
*
|
|
29886
|
+
* A more formal specification of how these methods are used:
|
|
29887
|
+
*
|
|
29888
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
29889
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
29890
|
+
*
|
|
29891
|
+
* Each and every declaration produces a function with the same signature. This
|
|
29892
|
+
* allows the creation of custom validation functions. For example:
|
|
29893
|
+
*
|
|
29894
|
+
* var MyLink = React.createClass({
|
|
29895
|
+
* propTypes: {
|
|
29896
|
+
* // An optional string or URI prop named "href".
|
|
29897
|
+
* href: function(props, propName, componentName) {
|
|
29898
|
+
* var propValue = props[propName];
|
|
29899
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
29900
|
+
* !(propValue instanceof URI)) {
|
|
29901
|
+
* return new Error(
|
|
29902
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
29903
|
+
* componentName
|
|
29904
|
+
* );
|
|
29905
|
+
* }
|
|
29906
|
+
* }
|
|
29907
|
+
* },
|
|
29908
|
+
* render: function() {...}
|
|
29909
|
+
* });
|
|
29910
|
+
*
|
|
29911
|
+
* @internal
|
|
29912
|
+
*/
|
|
29913
|
+
|
|
29914
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
29915
|
+
|
|
29916
|
+
// Important!
|
|
29917
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
29918
|
+
var ReactPropTypes = {
|
|
29919
|
+
array: createPrimitiveTypeChecker('array'),
|
|
29920
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
29921
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
29922
|
+
func: createPrimitiveTypeChecker('function'),
|
|
29923
|
+
number: createPrimitiveTypeChecker('number'),
|
|
29924
|
+
object: createPrimitiveTypeChecker('object'),
|
|
29925
|
+
string: createPrimitiveTypeChecker('string'),
|
|
29926
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
29927
|
+
|
|
29928
|
+
any: createAnyTypeChecker(),
|
|
29929
|
+
arrayOf: createArrayOfTypeChecker,
|
|
29930
|
+
element: createElementTypeChecker(),
|
|
29931
|
+
elementType: createElementTypeTypeChecker(),
|
|
29932
|
+
instanceOf: createInstanceTypeChecker,
|
|
29933
|
+
node: createNodeChecker(),
|
|
29934
|
+
objectOf: createObjectOfTypeChecker,
|
|
29935
|
+
oneOf: createEnumTypeChecker,
|
|
29936
|
+
oneOfType: createUnionTypeChecker,
|
|
29937
|
+
shape: createShapeTypeChecker,
|
|
29938
|
+
exact: createStrictShapeTypeChecker,
|
|
29939
|
+
};
|
|
29940
|
+
|
|
29941
|
+
/**
|
|
29942
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
29943
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
29944
|
+
*/
|
|
29945
|
+
/*eslint-disable no-self-compare*/
|
|
29946
|
+
function is(x, y) {
|
|
29947
|
+
// SameValue algorithm
|
|
29948
|
+
if (x === y) {
|
|
29949
|
+
// Steps 1-5, 7-10
|
|
29950
|
+
// Steps 6.b-6.e: +0 != -0
|
|
29951
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
29952
|
+
} else {
|
|
29953
|
+
// Step 6.a: NaN == NaN
|
|
29954
|
+
return x !== x && y !== y;
|
|
29955
|
+
}
|
|
29956
|
+
}
|
|
29957
|
+
/*eslint-enable no-self-compare*/
|
|
29958
|
+
|
|
29959
|
+
/**
|
|
29960
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
29961
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
29962
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
29963
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
29964
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
29965
|
+
*/
|
|
29966
|
+
function PropTypeError(message, data) {
|
|
29967
|
+
this.message = message;
|
|
29968
|
+
this.data = data && typeof data === 'object' ? data: {};
|
|
29969
|
+
this.stack = '';
|
|
29970
|
+
}
|
|
29971
|
+
// Make `instanceof Error` still work for returned errors.
|
|
29972
|
+
PropTypeError.prototype = Error.prototype;
|
|
29973
|
+
|
|
29974
|
+
function createChainableTypeChecker(validate) {
|
|
29975
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29976
|
+
var manualPropTypeCallCache = {};
|
|
29977
|
+
var manualPropTypeWarningCount = 0;
|
|
29978
|
+
}
|
|
29979
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
29980
|
+
componentName = componentName || ANONYMOUS;
|
|
29981
|
+
propFullName = propFullName || propName;
|
|
29982
|
+
|
|
29983
|
+
if (secret !== ReactPropTypesSecret_1$1) {
|
|
29984
|
+
if (throwOnDirectAccess) {
|
|
29985
|
+
// New behavior only for users of `prop-types` package
|
|
29986
|
+
var err = new Error(
|
|
29987
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
29988
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
29989
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
29990
|
+
);
|
|
29991
|
+
err.name = 'Invariant Violation';
|
|
29992
|
+
throw err;
|
|
29993
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
29994
|
+
// Old behavior for people using React.PropTypes
|
|
29995
|
+
var cacheKey = componentName + ':' + propName;
|
|
29996
|
+
if (
|
|
29997
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
29998
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
29999
|
+
manualPropTypeWarningCount < 3
|
|
30000
|
+
) {
|
|
30001
|
+
printWarning$3(
|
|
30002
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
30003
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
30004
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
30005
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
30006
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
30007
|
+
);
|
|
30008
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
30009
|
+
manualPropTypeWarningCount++;
|
|
30010
|
+
}
|
|
30011
|
+
}
|
|
30012
|
+
}
|
|
30013
|
+
if (props[propName] == null) {
|
|
30014
|
+
if (isRequired) {
|
|
30015
|
+
if (props[propName] === null) {
|
|
30016
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
30017
|
+
}
|
|
30018
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
30019
|
+
}
|
|
30020
|
+
return null;
|
|
30021
|
+
} else {
|
|
30022
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
30023
|
+
}
|
|
30024
|
+
}
|
|
30025
|
+
|
|
30026
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
30027
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
30028
|
+
|
|
30029
|
+
return chainedCheckType;
|
|
30030
|
+
}
|
|
30031
|
+
|
|
30032
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
30033
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
30034
|
+
var propValue = props[propName];
|
|
30035
|
+
var propType = getPropType(propValue);
|
|
30036
|
+
if (propType !== expectedType) {
|
|
30037
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
30038
|
+
// check, but we can offer a more precise error message here rather than
|
|
30039
|
+
// 'of type `object`'.
|
|
30040
|
+
var preciseType = getPreciseType(propValue);
|
|
30041
|
+
|
|
30042
|
+
return new PropTypeError(
|
|
30043
|
+
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
30044
|
+
{expectedType: expectedType}
|
|
30045
|
+
);
|
|
30046
|
+
}
|
|
30047
|
+
return null;
|
|
30048
|
+
}
|
|
30049
|
+
return createChainableTypeChecker(validate);
|
|
30050
|
+
}
|
|
30051
|
+
|
|
30052
|
+
function createAnyTypeChecker() {
|
|
30053
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull$1);
|
|
30054
|
+
}
|
|
30055
|
+
|
|
30056
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
30057
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30058
|
+
if (typeof typeChecker !== 'function') {
|
|
30059
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
30060
|
+
}
|
|
30061
|
+
var propValue = props[propName];
|
|
30062
|
+
if (!Array.isArray(propValue)) {
|
|
30063
|
+
var propType = getPropType(propValue);
|
|
30064
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
30065
|
+
}
|
|
30066
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
30067
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1$1);
|
|
30068
|
+
if (error instanceof Error) {
|
|
30069
|
+
return error;
|
|
30070
|
+
}
|
|
30071
|
+
}
|
|
30072
|
+
return null;
|
|
30073
|
+
}
|
|
30074
|
+
return createChainableTypeChecker(validate);
|
|
30075
|
+
}
|
|
30076
|
+
|
|
30077
|
+
function createElementTypeChecker() {
|
|
30078
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30079
|
+
var propValue = props[propName];
|
|
30080
|
+
if (!isValidElement(propValue)) {
|
|
30081
|
+
var propType = getPropType(propValue);
|
|
30082
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
30083
|
+
}
|
|
30084
|
+
return null;
|
|
30085
|
+
}
|
|
30086
|
+
return createChainableTypeChecker(validate);
|
|
30087
|
+
}
|
|
30088
|
+
|
|
30089
|
+
function createElementTypeTypeChecker() {
|
|
30090
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30091
|
+
var propValue = props[propName];
|
|
30092
|
+
if (!reactIs$1.isValidElementType(propValue)) {
|
|
30093
|
+
var propType = getPropType(propValue);
|
|
30094
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
30095
|
+
}
|
|
30096
|
+
return null;
|
|
30097
|
+
}
|
|
30098
|
+
return createChainableTypeChecker(validate);
|
|
30099
|
+
}
|
|
30100
|
+
|
|
30101
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
30102
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30103
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
30104
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
30105
|
+
var actualClassName = getClassName(props[propName]);
|
|
30106
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
30107
|
+
}
|
|
30108
|
+
return null;
|
|
30109
|
+
}
|
|
30110
|
+
return createChainableTypeChecker(validate);
|
|
30111
|
+
}
|
|
30112
|
+
|
|
30113
|
+
function createEnumTypeChecker(expectedValues) {
|
|
30114
|
+
if (!Array.isArray(expectedValues)) {
|
|
30115
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
30116
|
+
if (arguments.length > 1) {
|
|
30117
|
+
printWarning$3(
|
|
30118
|
+
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
30119
|
+
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
30120
|
+
);
|
|
30121
|
+
} else {
|
|
30122
|
+
printWarning$3('Invalid argument supplied to oneOf, expected an array.');
|
|
30123
|
+
}
|
|
30124
|
+
}
|
|
30125
|
+
return emptyFunctionThatReturnsNull$1;
|
|
30126
|
+
}
|
|
30127
|
+
|
|
30128
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30129
|
+
var propValue = props[propName];
|
|
30130
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
30131
|
+
if (is(propValue, expectedValues[i])) {
|
|
30132
|
+
return null;
|
|
30133
|
+
}
|
|
30134
|
+
}
|
|
30135
|
+
|
|
30136
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
30137
|
+
var type = getPreciseType(value);
|
|
30138
|
+
if (type === 'symbol') {
|
|
30139
|
+
return String(value);
|
|
30140
|
+
}
|
|
30141
|
+
return value;
|
|
30142
|
+
});
|
|
30143
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
30144
|
+
}
|
|
30145
|
+
return createChainableTypeChecker(validate);
|
|
30146
|
+
}
|
|
30147
|
+
|
|
30148
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
30149
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30150
|
+
if (typeof typeChecker !== 'function') {
|
|
30151
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
30152
|
+
}
|
|
30153
|
+
var propValue = props[propName];
|
|
30154
|
+
var propType = getPropType(propValue);
|
|
30155
|
+
if (propType !== 'object') {
|
|
30156
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
30157
|
+
}
|
|
30158
|
+
for (var key in propValue) {
|
|
30159
|
+
if (has$2(propValue, key)) {
|
|
30160
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
|
|
30161
|
+
if (error instanceof Error) {
|
|
30162
|
+
return error;
|
|
30163
|
+
}
|
|
30164
|
+
}
|
|
30165
|
+
}
|
|
30166
|
+
return null;
|
|
30167
|
+
}
|
|
30168
|
+
return createChainableTypeChecker(validate);
|
|
30169
|
+
}
|
|
30170
|
+
|
|
30171
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
30172
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
30173
|
+
process.env.NODE_ENV !== 'production' ? printWarning$3('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
30174
|
+
return emptyFunctionThatReturnsNull$1;
|
|
30175
|
+
}
|
|
30176
|
+
|
|
30177
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
30178
|
+
var checker = arrayOfTypeCheckers[i];
|
|
30179
|
+
if (typeof checker !== 'function') {
|
|
30180
|
+
printWarning$3(
|
|
30181
|
+
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
30182
|
+
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
30183
|
+
);
|
|
30184
|
+
return emptyFunctionThatReturnsNull$1;
|
|
30185
|
+
}
|
|
30186
|
+
}
|
|
30187
|
+
|
|
30188
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30189
|
+
var expectedTypes = [];
|
|
30190
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
30191
|
+
var checker = arrayOfTypeCheckers[i];
|
|
30192
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1$1);
|
|
30193
|
+
if (checkerResult == null) {
|
|
30194
|
+
return null;
|
|
30195
|
+
}
|
|
30196
|
+
if (checkerResult.data && has$2(checkerResult.data, 'expectedType')) {
|
|
30197
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
30198
|
+
}
|
|
30199
|
+
}
|
|
30200
|
+
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
30201
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
30202
|
+
}
|
|
30203
|
+
return createChainableTypeChecker(validate);
|
|
30204
|
+
}
|
|
30205
|
+
|
|
30206
|
+
function createNodeChecker() {
|
|
30207
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30208
|
+
if (!isNode(props[propName])) {
|
|
30209
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
30210
|
+
}
|
|
30211
|
+
return null;
|
|
30212
|
+
}
|
|
30213
|
+
return createChainableTypeChecker(validate);
|
|
30214
|
+
}
|
|
30215
|
+
|
|
30216
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
30217
|
+
return new PropTypeError(
|
|
30218
|
+
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
30219
|
+
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
30220
|
+
);
|
|
30221
|
+
}
|
|
30222
|
+
|
|
30223
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
30224
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30225
|
+
var propValue = props[propName];
|
|
30226
|
+
var propType = getPropType(propValue);
|
|
30227
|
+
if (propType !== 'object') {
|
|
30228
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
30229
|
+
}
|
|
30230
|
+
for (var key in shapeTypes) {
|
|
30231
|
+
var checker = shapeTypes[key];
|
|
30232
|
+
if (typeof checker !== 'function') {
|
|
30233
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
30234
|
+
}
|
|
30235
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
|
|
30236
|
+
if (error) {
|
|
30237
|
+
return error;
|
|
30238
|
+
}
|
|
30239
|
+
}
|
|
30240
|
+
return null;
|
|
30241
|
+
}
|
|
30242
|
+
return createChainableTypeChecker(validate);
|
|
30243
|
+
}
|
|
30244
|
+
|
|
30245
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
30246
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
30247
|
+
var propValue = props[propName];
|
|
30248
|
+
var propType = getPropType(propValue);
|
|
30249
|
+
if (propType !== 'object') {
|
|
30250
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
30251
|
+
}
|
|
30252
|
+
// We need to check all keys in case some are required but missing from props.
|
|
30253
|
+
var allKeys = objectAssign$1({}, props[propName], shapeTypes);
|
|
30254
|
+
for (var key in allKeys) {
|
|
30255
|
+
var checker = shapeTypes[key];
|
|
30256
|
+
if (has$2(shapeTypes, key) && typeof checker !== 'function') {
|
|
30257
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
30258
|
+
}
|
|
30259
|
+
if (!checker) {
|
|
30260
|
+
return new PropTypeError(
|
|
30261
|
+
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
30262
|
+
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
30263
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
30264
|
+
);
|
|
30265
|
+
}
|
|
30266
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1$1);
|
|
30267
|
+
if (error) {
|
|
30268
|
+
return error;
|
|
30269
|
+
}
|
|
30270
|
+
}
|
|
30271
|
+
return null;
|
|
30272
|
+
}
|
|
30273
|
+
|
|
30274
|
+
return createChainableTypeChecker(validate);
|
|
30275
|
+
}
|
|
30276
|
+
|
|
30277
|
+
function isNode(propValue) {
|
|
30278
|
+
switch (typeof propValue) {
|
|
30279
|
+
case 'number':
|
|
30280
|
+
case 'string':
|
|
30281
|
+
case 'undefined':
|
|
30282
|
+
return true;
|
|
30283
|
+
case 'boolean':
|
|
30284
|
+
return !propValue;
|
|
30285
|
+
case 'object':
|
|
30286
|
+
if (Array.isArray(propValue)) {
|
|
30287
|
+
return propValue.every(isNode);
|
|
30288
|
+
}
|
|
30289
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
30290
|
+
return true;
|
|
30291
|
+
}
|
|
30292
|
+
|
|
30293
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
30294
|
+
if (iteratorFn) {
|
|
30295
|
+
var iterator = iteratorFn.call(propValue);
|
|
30296
|
+
var step;
|
|
30297
|
+
if (iteratorFn !== propValue.entries) {
|
|
30298
|
+
while (!(step = iterator.next()).done) {
|
|
30299
|
+
if (!isNode(step.value)) {
|
|
30300
|
+
return false;
|
|
30301
|
+
}
|
|
30302
|
+
}
|
|
30303
|
+
} else {
|
|
30304
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
30305
|
+
while (!(step = iterator.next()).done) {
|
|
30306
|
+
var entry = step.value;
|
|
30307
|
+
if (entry) {
|
|
30308
|
+
if (!isNode(entry[1])) {
|
|
30309
|
+
return false;
|
|
30310
|
+
}
|
|
30311
|
+
}
|
|
30312
|
+
}
|
|
30313
|
+
}
|
|
30314
|
+
} else {
|
|
30315
|
+
return false;
|
|
30316
|
+
}
|
|
30317
|
+
|
|
30318
|
+
return true;
|
|
30319
|
+
default:
|
|
30320
|
+
return false;
|
|
30321
|
+
}
|
|
30322
|
+
}
|
|
30323
|
+
|
|
30324
|
+
function isSymbol(propType, propValue) {
|
|
30325
|
+
// Native Symbol.
|
|
30326
|
+
if (propType === 'symbol') {
|
|
30327
|
+
return true;
|
|
30328
|
+
}
|
|
30329
|
+
|
|
30330
|
+
// falsy value can't be a Symbol
|
|
30331
|
+
if (!propValue) {
|
|
30332
|
+
return false;
|
|
30333
|
+
}
|
|
30334
|
+
|
|
30335
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
30336
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
30337
|
+
return true;
|
|
30338
|
+
}
|
|
30339
|
+
|
|
30340
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
30341
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
30342
|
+
return true;
|
|
30343
|
+
}
|
|
30344
|
+
|
|
30345
|
+
return false;
|
|
30346
|
+
}
|
|
30347
|
+
|
|
30348
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
30349
|
+
function getPropType(propValue) {
|
|
30350
|
+
var propType = typeof propValue;
|
|
30351
|
+
if (Array.isArray(propValue)) {
|
|
30352
|
+
return 'array';
|
|
30353
|
+
}
|
|
30354
|
+
if (propValue instanceof RegExp) {
|
|
30355
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
30356
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
30357
|
+
// passes PropTypes.object.
|
|
30358
|
+
return 'object';
|
|
30359
|
+
}
|
|
30360
|
+
if (isSymbol(propType, propValue)) {
|
|
30361
|
+
return 'symbol';
|
|
30362
|
+
}
|
|
30363
|
+
return propType;
|
|
30364
|
+
}
|
|
30365
|
+
|
|
30366
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
30367
|
+
// See `createPrimitiveTypeChecker`.
|
|
30368
|
+
function getPreciseType(propValue) {
|
|
30369
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
30370
|
+
return '' + propValue;
|
|
30371
|
+
}
|
|
30372
|
+
var propType = getPropType(propValue);
|
|
30373
|
+
if (propType === 'object') {
|
|
30374
|
+
if (propValue instanceof Date) {
|
|
30375
|
+
return 'date';
|
|
30376
|
+
} else if (propValue instanceof RegExp) {
|
|
30377
|
+
return 'regexp';
|
|
30378
|
+
}
|
|
30379
|
+
}
|
|
30380
|
+
return propType;
|
|
30381
|
+
}
|
|
30382
|
+
|
|
30383
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
30384
|
+
// For example, "undefined" or "of type array"
|
|
30385
|
+
function getPostfixForTypeWarning(value) {
|
|
30386
|
+
var type = getPreciseType(value);
|
|
30387
|
+
switch (type) {
|
|
30388
|
+
case 'array':
|
|
30389
|
+
case 'object':
|
|
30390
|
+
return 'an ' + type;
|
|
30391
|
+
case 'boolean':
|
|
30392
|
+
case 'date':
|
|
30393
|
+
case 'regexp':
|
|
30394
|
+
return 'a ' + type;
|
|
30395
|
+
default:
|
|
30396
|
+
return type;
|
|
30397
|
+
}
|
|
30398
|
+
}
|
|
30399
|
+
|
|
30400
|
+
// Returns class name of the object, if any.
|
|
30401
|
+
function getClassName(propValue) {
|
|
30402
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
30403
|
+
return ANONYMOUS;
|
|
30404
|
+
}
|
|
30405
|
+
return propValue.constructor.name;
|
|
30406
|
+
}
|
|
30407
|
+
|
|
30408
|
+
ReactPropTypes.checkPropTypes = checkPropTypes_1$1;
|
|
30409
|
+
ReactPropTypes.resetWarningCache = checkPropTypes_1$1.resetWarningCache;
|
|
30410
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
30411
|
+
|
|
30412
|
+
return ReactPropTypes;
|
|
30413
|
+
};
|
|
30414
|
+
|
|
30415
|
+
function emptyFunction$1() {}
|
|
30416
|
+
function emptyFunctionWithReset$1() {}
|
|
30417
|
+
emptyFunctionWithReset$1.resetWarningCache = emptyFunction$1;
|
|
30418
|
+
|
|
30419
|
+
var factoryWithThrowingShims$1 = function() {
|
|
30420
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
30421
|
+
if (secret === ReactPropTypesSecret_1$1) {
|
|
30422
|
+
// It is still safe when called from React.
|
|
30423
|
+
return;
|
|
30424
|
+
}
|
|
30425
|
+
var err = new Error(
|
|
30426
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
30427
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
30428
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
30429
|
+
);
|
|
30430
|
+
err.name = 'Invariant Violation';
|
|
30431
|
+
throw err;
|
|
30432
|
+
} shim.isRequired = shim;
|
|
30433
|
+
function getShim() {
|
|
30434
|
+
return shim;
|
|
30435
|
+
} // Important!
|
|
30436
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
30437
|
+
var ReactPropTypes = {
|
|
30438
|
+
array: shim,
|
|
30439
|
+
bigint: shim,
|
|
30440
|
+
bool: shim,
|
|
30441
|
+
func: shim,
|
|
30442
|
+
number: shim,
|
|
30443
|
+
object: shim,
|
|
30444
|
+
string: shim,
|
|
30445
|
+
symbol: shim,
|
|
30446
|
+
|
|
30447
|
+
any: shim,
|
|
30448
|
+
arrayOf: getShim,
|
|
30449
|
+
element: shim,
|
|
30450
|
+
elementType: shim,
|
|
30451
|
+
instanceOf: getShim,
|
|
30452
|
+
node: shim,
|
|
30453
|
+
objectOf: getShim,
|
|
30454
|
+
oneOf: getShim,
|
|
30455
|
+
oneOfType: getShim,
|
|
30456
|
+
shape: getShim,
|
|
30457
|
+
exact: getShim,
|
|
30458
|
+
|
|
30459
|
+
checkPropTypes: emptyFunctionWithReset$1,
|
|
30460
|
+
resetWarningCache: emptyFunction$1
|
|
30461
|
+
};
|
|
30462
|
+
|
|
30463
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
30464
|
+
|
|
30465
|
+
return ReactPropTypes;
|
|
30466
|
+
};
|
|
30467
|
+
|
|
30468
|
+
var propTypes$1 = createCommonjsModule(function (module) {
|
|
30469
|
+
/**
|
|
30470
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
30471
|
+
*
|
|
30472
|
+
* This source code is licensed under the MIT license found in the
|
|
30473
|
+
* LICENSE file in the root directory of this source tree.
|
|
30474
|
+
*/
|
|
30475
|
+
|
|
30476
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
30477
|
+
var ReactIs = reactIs$1;
|
|
30478
|
+
|
|
30479
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
30480
|
+
// http://fb.me/prop-types-in-prod
|
|
30481
|
+
var throwOnDirectAccess = true;
|
|
30482
|
+
module.exports = factoryWithTypeCheckers$1(ReactIs.isElement, throwOnDirectAccess);
|
|
30483
|
+
} else {
|
|
30484
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
30485
|
+
// http://fb.me/prop-types-in-prod
|
|
30486
|
+
module.exports = factoryWithThrowingShims$1();
|
|
30487
|
+
}
|
|
30488
|
+
});
|
|
30489
|
+
|
|
29363
30490
|
const SearchConnection = _ref => {
|
|
29364
30491
|
var _Digit$Hooks$ws$usews;
|
|
29365
30492
|
let {
|
|
@@ -29761,7 +30888,7 @@ const SearchConnection = _ref => {
|
|
|
29761
30888
|
}));
|
|
29762
30889
|
};
|
|
29763
30890
|
SearchConnection.propTypes = {
|
|
29764
|
-
loginParams: propTypes.any
|
|
30891
|
+
loginParams: propTypes$1.any
|
|
29765
30892
|
};
|
|
29766
30893
|
SearchConnection.defaultProps = {
|
|
29767
30894
|
loginParams: null
|
|
@@ -30737,9 +31864,9 @@ const ChallanSearchResults = _ref => {
|
|
|
30737
31864
|
}, t("WS_CLICK_HERE_TO_APPLY"))))));
|
|
30738
31865
|
};
|
|
30739
31866
|
ChallanSearchResults.propTypes = {
|
|
30740
|
-
template: propTypes.any,
|
|
30741
|
-
header: propTypes.string,
|
|
30742
|
-
actionButtonLabel: propTypes.string
|
|
31867
|
+
template: propTypes$1.any,
|
|
31868
|
+
header: propTypes$1.string,
|
|
31869
|
+
actionButtonLabel: propTypes$1.string
|
|
30743
31870
|
};
|
|
30744
31871
|
ChallanSearchResults.defaultProps = {
|
|
30745
31872
|
template: [],
|
|
@@ -37678,9 +38805,9 @@ const WNSMyBills = _ref => {
|
|
|
37678
38805
|
}, t("CS_BILLS_TEXT_NO_BILLS_FOUND")));
|
|
37679
38806
|
};
|
|
37680
38807
|
WNSMyBills.propTypes = {
|
|
37681
|
-
template: propTypes.any,
|
|
37682
|
-
header: propTypes.string,
|
|
37683
|
-
actionButtonLabel: propTypes.string
|
|
38808
|
+
template: propTypes$1.any,
|
|
38809
|
+
header: propTypes$1.string,
|
|
38810
|
+
actionButtonLabel: propTypes$1.string
|
|
37684
38811
|
};
|
|
37685
38812
|
WNSMyBills.defaultProps = {
|
|
37686
38813
|
template: [],
|
|
@@ -43439,7 +44566,7 @@ const ActionModal = _ref => {
|
|
|
43439
44566
|
if (file.size >= 5242880) {
|
|
43440
44567
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
43441
44568
|
} else {
|
|
43442
|
-
const _temp = _catch(function () {
|
|
44569
|
+
const _temp = _catch$1(function () {
|
|
43443
44570
|
return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
43444
44571
|
var _response$data, _response$data$files;
|
|
43445
44572
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -43662,7 +44789,7 @@ const ActionModal$1 = _ref => {
|
|
|
43662
44789
|
if (file.size >= 5242880) {
|
|
43663
44790
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
43664
44791
|
} else {
|
|
43665
|
-
const _temp = _catch(function () {
|
|
44792
|
+
const _temp = _catch$1(function () {
|
|
43666
44793
|
return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
43667
44794
|
var _response$data, _response$data$files;
|
|
43668
44795
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -43827,7 +44954,7 @@ const ActionModal$2 = _ref => {
|
|
|
43827
44954
|
if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
|
|
43828
44955
|
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
43829
44956
|
} else {
|
|
43830
|
-
const _temp = _catch(function () {
|
|
44957
|
+
const _temp = _catch$1(function () {
|
|
43831
44958
|
return Promise.resolve(Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
|
|
43832
44959
|
var _response$data, _response$data$files;
|
|
43833
44960
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -44106,7 +45233,7 @@ const ActionModal$3 = _ref => {
|
|
|
44106
45233
|
if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
|
|
44107
45234
|
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
44108
45235
|
} else {
|
|
44109
|
-
const _temp = _catch(function () {
|
|
45236
|
+
const _temp = _catch$1(function () {
|
|
44110
45237
|
return Promise.resolve(Digit.UploadServices.Filestorage("OBPS", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
|
|
44111
45238
|
var _response$data, _response$data$files;
|
|
44112
45239
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -44358,7 +45485,7 @@ const ActionModal$4 = _ref => {
|
|
|
44358
45485
|
if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
|
|
44359
45486
|
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
44360
45487
|
} else {
|
|
44361
|
-
const _temp = _catch(function () {
|
|
45488
|
+
const _temp = _catch$1(function () {
|
|
44362
45489
|
return Promise.resolve(Digit.UploadServices.Filestorage("NOC", file, Digit.ULBService.getStateId() || (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]))).then(function (response) {
|
|
44363
45490
|
var _response$data, _response$data$files;
|
|
44364
45491
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -44586,7 +45713,7 @@ const ActionModal$5 = _ref => {
|
|
|
44586
45713
|
if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
|
|
44587
45714
|
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
44588
45715
|
} else {
|
|
44589
|
-
const _temp = _catch(function () {
|
|
45716
|
+
const _temp = _catch$1(function () {
|
|
44590
45717
|
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getCurrentTenantId())).then(function (response) {
|
|
44591
45718
|
var _response$data, _response$data$files;
|
|
44592
45719
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -44922,7 +46049,7 @@ const ActionModal$6 = _ref => {
|
|
|
44922
46049
|
if (file.size >= 5242880) {
|
|
44923
46050
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
44924
46051
|
} else {
|
|
44925
|
-
const _temp = _catch(function () {
|
|
46052
|
+
const _temp = _catch$1(function () {
|
|
44926
46053
|
return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
44927
46054
|
var _response$data, _response$data$files;
|
|
44928
46055
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -45207,7 +46334,7 @@ const ActionModal$8 = _ref => {
|
|
|
45207
46334
|
if (file.size >= 5242880) {
|
|
45208
46335
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
45209
46336
|
} else {
|
|
45210
|
-
const _temp = _catch(function () {
|
|
46337
|
+
const _temp = _catch$1(function () {
|
|
45211
46338
|
return Promise.resolve(Digit.UploadServices.Filestorage("CHB", file, tenantId)).then(function (response) {
|
|
45212
46339
|
var _response$data, _response$data$files;
|
|
45213
46340
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -45369,7 +46496,7 @@ const ActionModal$9 = _ref => {
|
|
|
45369
46496
|
if (file.size >= 5242880) {
|
|
45370
46497
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
45371
46498
|
} else {
|
|
45372
|
-
const _temp = _catch(function () {
|
|
46499
|
+
const _temp = _catch$1(function () {
|
|
45373
46500
|
return Promise.resolve(Digit.UploadServices.Filestorage("PTR", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
45374
46501
|
var _response$data, _response$data$files;
|
|
45375
46502
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -45535,8 +46662,8 @@ const ActionModal$a = _ref => {
|
|
|
45535
46662
|
if (file.size >= 5242880) {
|
|
45536
46663
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
45537
46664
|
} else {
|
|
45538
|
-
const _temp = _finallyRethrows(function () {
|
|
45539
|
-
return _catch(function () {
|
|
46665
|
+
const _temp = _finallyRethrows$1(function () {
|
|
46666
|
+
return _catch$1(function () {
|
|
45540
46667
|
return Promise.resolve(Digit.UploadServices.Filestorage("StreetVending", file, tenantId)).then(function (response) {
|
|
45541
46668
|
var _response$data, _response$data$files;
|
|
45542
46669
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -45825,7 +46952,7 @@ const ActionModal$b = _ref => {
|
|
|
45825
46952
|
if (file.size >= 5242880) {
|
|
45826
46953
|
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
45827
46954
|
} else {
|
|
45828
|
-
const _temp = _catch(function () {
|
|
46955
|
+
const _temp = _catch$1(function () {
|
|
45829
46956
|
return Promise.resolve(Digit.UploadServices.Filestorage("WT", file, tenantId)).then(function (response) {
|
|
45830
46957
|
var _response$data, _response$data$files;
|
|
45831
46958
|
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
@@ -46509,7 +47636,7 @@ function SelectDocument$4(_ref) {
|
|
|
46509
47636
|
if (file !== null && file !== void 0 && file.type && !allowedFileTypesRegex.test(file === null || file === void 0 ? void 0 : file.type)) {
|
|
46510
47637
|
setError(t(`NOT_SUPPORTED_FILE_TYPE`));
|
|
46511
47638
|
} else {
|
|
46512
|
-
const _temp = _catch(function () {
|
|
47639
|
+
const _temp = _catch$1(function () {
|
|
46513
47640
|
setUploadedFile(null);
|
|
46514
47641
|
return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
46515
47642
|
var _response$data, _response$data$files;
|
|
@@ -46890,7 +48017,7 @@ function PropertyDocuments(_ref) {
|
|
|
46890
48017
|
};
|
|
46891
48018
|
const forceDownload = function (url, fileName) {
|
|
46892
48019
|
try {
|
|
46893
|
-
return Promise.resolve(_catch(function () {
|
|
48020
|
+
return Promise.resolve(_catch$1(function () {
|
|
46894
48021
|
return Promise.resolve(fetch(url)).then(function (response) {
|
|
46895
48022
|
if (!response.ok) {
|
|
46896
48023
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
@@ -48388,7 +49515,7 @@ const DueVerification = _ref => {
|
|
|
48388
49515
|
try {
|
|
48389
49516
|
return Promise.resolve(function () {
|
|
48390
49517
|
if (isZROApproval && applicationData !== null && applicationData !== void 0 && applicationData.applicationNo) {
|
|
48391
|
-
return _catch(function () {
|
|
49518
|
+
return _catch$1(function () {
|
|
48392
49519
|
return Promise.resolve(checkDueVerification({
|
|
48393
49520
|
DueVerification: {
|
|
48394
49521
|
applicationNo: applicationData.applicationNo
|
|
@@ -48432,7 +49559,7 @@ const DueVerification = _ref => {
|
|
|
48432
49559
|
});
|
|
48433
49560
|
return;
|
|
48434
49561
|
}
|
|
48435
|
-
return _catch(function () {
|
|
49562
|
+
return _catch$1(function () {
|
|
48436
49563
|
return Promise.resolve(checkDueVerification({
|
|
48437
49564
|
DueVerification: {
|
|
48438
49565
|
kno: kno
|
|
@@ -49794,7 +50921,7 @@ const ApplicationDetails = props => {
|
|
|
49794
50921
|
const nocPrmomises = (_nocData = nocData) === null || _nocData === void 0 ? void 0 : _nocData.map(noc => {
|
|
49795
50922
|
return nocMutation === null || nocMutation === void 0 ? void 0 : nocMutation.mutateAsync(noc);
|
|
49796
50923
|
});
|
|
49797
|
-
const _temp = _catch(function () {
|
|
50924
|
+
const _temp = _catch$1(function () {
|
|
49798
50925
|
setIsEnableLoader(true);
|
|
49799
50926
|
return Promise.resolve(Promise.all(nocPrmomises)).then(function (values) {
|
|
49800
50927
|
values && values.map(ob => {
|
|
@@ -53112,56 +54239,110 @@ const Step1_SearchConnection = _ref => {
|
|
|
53112
54239
|
businessService: "WS"
|
|
53113
54240
|
}).catch(() => null)).then(function (wsResponse) {
|
|
53114
54241
|
var _wsResponse$WaterConn;
|
|
53115
|
-
function
|
|
53116
|
-
|
|
53117
|
-
|
|
53118
|
-
|
|
53119
|
-
|
|
53120
|
-
|
|
53121
|
-
|
|
54242
|
+
function _temp5() {
|
|
54243
|
+
let _exit = false;
|
|
54244
|
+
function _temp3(_result5) {
|
|
54245
|
+
var _connection, _connection$connectio, _connection$connectio2, _connection2;
|
|
54246
|
+
if (_exit) return _result5;
|
|
54247
|
+
const fetchedMobileNumber = ((_connection = connection) === null || _connection === void 0 ? void 0 : (_connection$connectio = _connection.connectionHolders) === null || _connection$connectio === void 0 ? void 0 : (_connection$connectio2 = _connection$connectio[0]) === null || _connection$connectio2 === void 0 ? void 0 : _connection$connectio2.mobileNumber) || ((_connection2 = connection) === null || _connection2 === void 0 ? void 0 : _connection2.mobileNumber);
|
|
54248
|
+
if (!fetchedMobileNumber || fetchedMobileNumber.length !== 10) {
|
|
54249
|
+
setIsLoading(false);
|
|
54250
|
+
setShowToast({
|
|
54251
|
+
key: "error",
|
|
54252
|
+
message: "No valid registered mobile number found for this connection"
|
|
54253
|
+
});
|
|
54254
|
+
return;
|
|
54255
|
+
}
|
|
54256
|
+
if (isEditFlow) {
|
|
54257
|
+
setIsLoading(false);
|
|
54258
|
+
onNext({
|
|
54259
|
+
kNumber,
|
|
54260
|
+
mobileNumber: fetchedMobileNumber,
|
|
54261
|
+
serviceType: detectedServiceType,
|
|
54262
|
+
activeConnection: connection
|
|
54263
|
+
});
|
|
54264
|
+
return;
|
|
54265
|
+
}
|
|
54266
|
+
const userType = Digit.UserService.getType().toUpperCase();
|
|
54267
|
+
const payload = {
|
|
54268
|
+
otp: {
|
|
54269
|
+
mobileNumber: fetchedMobileNumber,
|
|
54270
|
+
tenantId: "dl",
|
|
54271
|
+
type: "register",
|
|
54272
|
+
userType: userType
|
|
54273
|
+
}
|
|
54274
|
+
};
|
|
54275
|
+
return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function () {
|
|
54276
|
+
setIsLoading(false);
|
|
54277
|
+
onNext({
|
|
54278
|
+
kNumber,
|
|
54279
|
+
mobileNumber: fetchedMobileNumber,
|
|
54280
|
+
serviceType: detectedServiceType,
|
|
54281
|
+
activeConnection: connection
|
|
54282
|
+
});
|
|
53122
54283
|
});
|
|
53123
|
-
return;
|
|
53124
54284
|
}
|
|
53125
|
-
|
|
53126
|
-
if (!fetchedMobileNumber || fetchedMobileNumber.length !== 10) {
|
|
54285
|
+
if (!connection) {
|
|
53127
54286
|
setIsLoading(false);
|
|
53128
54287
|
setShowToast({
|
|
53129
54288
|
key: "error",
|
|
53130
|
-
message: "
|
|
53131
|
-
});
|
|
53132
|
-
return;
|
|
53133
|
-
}
|
|
53134
|
-
if (isEditFlow) {
|
|
53135
|
-
setIsLoading(false);
|
|
53136
|
-
onNext({
|
|
53137
|
-
kNumber,
|
|
53138
|
-
mobileNumber: fetchedMobileNumber,
|
|
53139
|
-
serviceType: detectedServiceType,
|
|
53140
|
-
activeConnection: connection
|
|
54289
|
+
message: "Active connection not found for the given K Number"
|
|
53141
54290
|
});
|
|
53142
54291
|
return;
|
|
53143
54292
|
}
|
|
53144
|
-
const
|
|
53145
|
-
|
|
53146
|
-
|
|
53147
|
-
|
|
53148
|
-
|
|
53149
|
-
|
|
53150
|
-
|
|
54293
|
+
const _temp2 = function () {
|
|
54294
|
+
if (detectedServiceType === "WATER") {
|
|
54295
|
+
const allConnections = (wsResponse === null || wsResponse === void 0 ? void 0 : wsResponse.WaterConnection) || [];
|
|
54296
|
+
const terminalStatuses = ["CONNECTION_ACTIVATED", "APPROVED", "REJECTED", "DISAPPROVED", "CANCELLED", "TERMINATED", "DISCONNECTION_EXECUTED", "CONNECTION_DISCONNECTED"];
|
|
54297
|
+
const pendingStatusApp = allConnections.find(c => c.applicationNo && c.applicationStatus && !terminalStatuses.includes(c.applicationStatus));
|
|
54298
|
+
if (pendingStatusApp) {
|
|
54299
|
+
var _connection3;
|
|
54300
|
+
setIsLoading(false);
|
|
54301
|
+
setShowToast({
|
|
54302
|
+
key: "error",
|
|
54303
|
+
message: `Application (${pendingStatusApp.applicationNo}) already exists in Workflow for Connection No. ${((_connection3 = connection) === null || _connection3 === void 0 ? void 0 : _connection3.connectionNo) || kNumber}. Cannot modify connection.`
|
|
54304
|
+
});
|
|
54305
|
+
_exit = true;
|
|
54306
|
+
return;
|
|
54307
|
+
}
|
|
54308
|
+
const appsToCheck = allConnections.filter(c => c.applicationNo && !terminalStatuses.includes(c.applicationStatus)).map(c => c.applicationNo);
|
|
54309
|
+
return function (_Digit, _Digit$WorkflowServic) {
|
|
54310
|
+
if (appsToCheck.length > 0 && (_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$WorkflowServic = _Digit.WorkflowService) !== null && _Digit$WorkflowServic !== void 0 && _Digit$WorkflowServic.getByBusinessId) {
|
|
54311
|
+
return _catch(function () {
|
|
54312
|
+
var _connection4;
|
|
54313
|
+
return Promise.resolve(Digit.WorkflowService.getByBusinessId(((_connection4 = connection) === null || _connection4 === void 0 ? void 0 : _connection4.tenantId) || tenantId, appsToCheck.join(","), {}, false)).then(function (wfRes) {
|
|
54314
|
+
const latestProcessMap = {};
|
|
54315
|
+
((wfRes === null || wfRes === void 0 ? void 0 : wfRes.ProcessInstances) || []).forEach(pi => {
|
|
54316
|
+
if (pi !== null && pi !== void 0 && pi.businessId) {
|
|
54317
|
+
var _pi$auditDetails, _existing$auditDetail;
|
|
54318
|
+
const existing = latestProcessMap[pi.businessId];
|
|
54319
|
+
if (!existing || (((_pi$auditDetails = pi.auditDetails) === null || _pi$auditDetails === void 0 ? void 0 : _pi$auditDetails.lastModifiedTime) || 0) > (((_existing$auditDetail = existing.auditDetails) === null || _existing$auditDetail === void 0 ? void 0 : _existing$auditDetail.lastModifiedTime) || 0)) {
|
|
54320
|
+
latestProcessMap[pi.businessId] = pi;
|
|
54321
|
+
}
|
|
54322
|
+
}
|
|
54323
|
+
});
|
|
54324
|
+
const activeProcess = Object.values(latestProcessMap).find(pi => (pi === null || pi === void 0 ? void 0 : pi.state) && !pi.state.isTerminateState && !terminalStatuses.includes(pi.state.state) && !terminalStatuses.includes(pi.state.applicationStatus));
|
|
54325
|
+
if (activeProcess) {
|
|
54326
|
+
var _connection5;
|
|
54327
|
+
setIsLoading(false);
|
|
54328
|
+
setShowToast({
|
|
54329
|
+
key: "error",
|
|
54330
|
+
message: `Application (${activeProcess.businessId}) already exists in Workflow for Connection No. ${((_connection5 = connection) === null || _connection5 === void 0 ? void 0 : _connection5.connectionNo) || kNumber}. Cannot modify connection.`
|
|
54331
|
+
});
|
|
54332
|
+
_exit = true;
|
|
54333
|
+
}
|
|
54334
|
+
});
|
|
54335
|
+
}, function (wfErr) {
|
|
54336
|
+
console.error("Workflow check error:", wfErr);
|
|
54337
|
+
});
|
|
54338
|
+
}
|
|
54339
|
+
}();
|
|
53151
54340
|
}
|
|
53152
|
-
};
|
|
53153
|
-
return
|
|
53154
|
-
setIsLoading(false);
|
|
53155
|
-
onNext({
|
|
53156
|
-
kNumber,
|
|
53157
|
-
mobileNumber: fetchedMobileNumber,
|
|
53158
|
-
serviceType: detectedServiceType,
|
|
53159
|
-
activeConnection: connection
|
|
53160
|
-
});
|
|
53161
|
-
});
|
|
54341
|
+
}();
|
|
54342
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
53162
54343
|
}
|
|
53163
54344
|
let connection = wsResponse === null || wsResponse === void 0 ? void 0 : (_wsResponse$WaterConn = wsResponse.WaterConnection) === null || _wsResponse$WaterConn === void 0 ? void 0 : _wsResponse$WaterConn.find(c => c.applicationStatus === 'CONNECTION_ACTIVATED');
|
|
53164
|
-
const
|
|
54345
|
+
const _temp4 = function () {
|
|
53165
54346
|
if (!connection) {
|
|
53166
54347
|
return Promise.resolve(Digit.WSService.search({
|
|
53167
54348
|
tenantId,
|
|
@@ -53174,7 +54355,7 @@ const Step1_SearchConnection = _ref => {
|
|
|
53174
54355
|
});
|
|
53175
54356
|
}
|
|
53176
54357
|
}();
|
|
53177
|
-
return
|
|
54358
|
+
return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
|
|
53178
54359
|
});
|
|
53179
54360
|
}, function (err) {
|
|
53180
54361
|
var _err$response2, _err$response2$data, _err$response2$data$E, _err$response2$data$E2;
|