@egovernments/digit-ui-module-core 1.3.2 → 1.3.6
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 +15 -40
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -40
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -256,8 +256,6 @@ var SelectName = function SelectName(_ref) {
|
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
var _excluded = ["ResponseInfo", "UserRequest"],
|
|
260
|
-
_excluded2 = ["ResponseInfo", "UserRequest"];
|
|
261
259
|
var TYPE_REGISTER = {
|
|
262
260
|
type: "register"
|
|
263
261
|
};
|
|
@@ -465,7 +463,7 @@ var Login = function Login(_ref) {
|
|
|
465
463
|
|
|
466
464
|
var ResponseInfo = _ref4.ResponseInfo,
|
|
467
465
|
info = _ref4.UserRequest,
|
|
468
|
-
tokens = _objectWithoutPropertiesLoose(_ref4,
|
|
466
|
+
tokens = _objectWithoutPropertiesLoose(_ref4, ["ResponseInfo", "UserRequest"]);
|
|
469
467
|
|
|
470
468
|
if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
|
|
471
469
|
var roleInfo = info.roles.find(function (userRole) {
|
|
@@ -497,7 +495,7 @@ var Login = function Login(_ref) {
|
|
|
497
495
|
return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref5) {
|
|
498
496
|
var ResponseInfo = _ref5.ResponseInfo,
|
|
499
497
|
info = _ref5.UserRequest,
|
|
500
|
-
tokens = _objectWithoutPropertiesLoose(_ref5,
|
|
498
|
+
tokens = _objectWithoutPropertiesLoose(_ref5, ["ResponseInfo", "UserRequest"]);
|
|
501
499
|
|
|
502
500
|
setUser(_extends({
|
|
503
501
|
info: info
|
|
@@ -1057,14 +1055,12 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
1057
1055
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1058
1056
|
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
1059
1057
|
|
|
1060
|
-
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1061
|
-
|
|
1062
1058
|
var printWarning = function printWarning() {};
|
|
1063
1059
|
|
|
1064
1060
|
if (process.env.NODE_ENV !== 'production') {
|
|
1065
1061
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
1066
1062
|
var loggedTypeFailures = {};
|
|
1067
|
-
var has
|
|
1063
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1068
1064
|
|
|
1069
1065
|
printWarning = function printWarning(text) {
|
|
1070
1066
|
var message = 'Warning: ' + text;
|
|
@@ -1082,12 +1078,12 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1082
1078
|
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1083
1079
|
if (process.env.NODE_ENV !== 'production') {
|
|
1084
1080
|
for (var typeSpecName in typeSpecs) {
|
|
1085
|
-
if (has
|
|
1081
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1086
1082
|
var error;
|
|
1087
1083
|
|
|
1088
1084
|
try {
|
|
1089
1085
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1090
|
-
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
1086
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.');
|
|
1091
1087
|
err.name = 'Invariant Violation';
|
|
1092
1088
|
throw err;
|
|
1093
1089
|
}
|
|
@@ -1119,6 +1115,8 @@ checkPropTypes.resetWarningCache = function () {
|
|
|
1119
1115
|
|
|
1120
1116
|
var checkPropTypes_1 = checkPropTypes;
|
|
1121
1117
|
|
|
1118
|
+
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1119
|
+
|
|
1122
1120
|
var printWarning$1 = function printWarning() {};
|
|
1123
1121
|
|
|
1124
1122
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1154,7 +1152,6 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1154
1152
|
var ANONYMOUS = '<<anonymous>>';
|
|
1155
1153
|
var ReactPropTypes = {
|
|
1156
1154
|
array: createPrimitiveTypeChecker('array'),
|
|
1157
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
1158
1155
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
1159
1156
|
func: createPrimitiveTypeChecker('function'),
|
|
1160
1157
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -1182,9 +1179,8 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1182
1179
|
}
|
|
1183
1180
|
}
|
|
1184
1181
|
|
|
1185
|
-
function PropTypeError(message
|
|
1182
|
+
function PropTypeError(message) {
|
|
1186
1183
|
this.message = message;
|
|
1187
|
-
this.data = data && typeof data === 'object' ? data : {};
|
|
1188
1184
|
this.stack = '';
|
|
1189
1185
|
}
|
|
1190
1186
|
|
|
@@ -1243,9 +1239,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1243
1239
|
|
|
1244
1240
|
if (propType !== expectedType) {
|
|
1245
1241
|
var preciseType = getPreciseType(propValue);
|
|
1246
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')
|
|
1247
|
-
expectedType: expectedType
|
|
1248
|
-
});
|
|
1242
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
1249
1243
|
}
|
|
1250
1244
|
|
|
1251
1245
|
return null;
|
|
@@ -1380,7 +1374,7 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1380
1374
|
}
|
|
1381
1375
|
|
|
1382
1376
|
for (var key in propValue) {
|
|
1383
|
-
if (has(propValue, key)) {
|
|
1377
|
+
if (has$1(propValue, key)) {
|
|
1384
1378
|
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1385
1379
|
|
|
1386
1380
|
if (error instanceof Error) {
|
|
@@ -1411,23 +1405,15 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1411
1405
|
}
|
|
1412
1406
|
|
|
1413
1407
|
function validate(props, propName, componentName, location, propFullName) {
|
|
1414
|
-
var expectedTypes = [];
|
|
1415
|
-
|
|
1416
1408
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1417
1409
|
var checker = arrayOfTypeCheckers[i];
|
|
1418
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
|
|
1419
1410
|
|
|
1420
|
-
if (
|
|
1411
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
|
|
1421
1412
|
return null;
|
|
1422
1413
|
}
|
|
1423
|
-
|
|
1424
|
-
if (checkerResult.data.hasOwnProperty('expectedType')) {
|
|
1425
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
1426
|
-
}
|
|
1427
1414
|
}
|
|
1428
1415
|
|
|
1429
|
-
|
|
1430
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
1416
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1431
1417
|
}
|
|
1432
1418
|
|
|
1433
1419
|
return createChainableTypeChecker(validate);
|
|
@@ -1445,10 +1431,6 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1445
1431
|
return createChainableTypeChecker(validate);
|
|
1446
1432
|
}
|
|
1447
1433
|
|
|
1448
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1449
|
-
return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
1434
|
function createShapeTypeChecker(shapeTypes) {
|
|
1453
1435
|
function validate(props, propName, componentName, location, propFullName) {
|
|
1454
1436
|
var propValue = props[propName];
|
|
@@ -1461,8 +1443,8 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1461
1443
|
for (var key in shapeTypes) {
|
|
1462
1444
|
var checker = shapeTypes[key];
|
|
1463
1445
|
|
|
1464
|
-
if (
|
|
1465
|
-
|
|
1446
|
+
if (!checker) {
|
|
1447
|
+
continue;
|
|
1466
1448
|
}
|
|
1467
1449
|
|
|
1468
1450
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
@@ -1492,10 +1474,6 @@ var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, t
|
|
|
1492
1474
|
for (var key in allKeys) {
|
|
1493
1475
|
var checker = shapeTypes[key];
|
|
1494
1476
|
|
|
1495
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
1496
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
1477
|
if (!checker) {
|
|
1500
1478
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
|
|
1501
1479
|
}
|
|
@@ -1677,7 +1655,6 @@ var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
|
1677
1655
|
}
|
|
1678
1656
|
var ReactPropTypes = {
|
|
1679
1657
|
array: shim,
|
|
1680
|
-
bigint: shim,
|
|
1681
1658
|
bool: shim,
|
|
1682
1659
|
func: shim,
|
|
1683
1660
|
number: shim,
|
|
@@ -1712,8 +1689,6 @@ var propTypes = createCommonjsModule(function (module) {
|
|
|
1712
1689
|
}
|
|
1713
1690
|
});
|
|
1714
1691
|
|
|
1715
|
-
var _excluded$1 = ["UserRequest"];
|
|
1716
|
-
|
|
1717
1692
|
var Login$1 = function Login(_ref) {
|
|
1718
1693
|
var propsConfig = _ref.config,
|
|
1719
1694
|
t = _ref.t;
|
|
@@ -1761,7 +1736,7 @@ var Login$1 = function Login(_ref) {
|
|
|
1761
1736
|
var _temp2 = _catch(function () {
|
|
1762
1737
|
return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref2) {
|
|
1763
1738
|
var info = _ref2.UserRequest,
|
|
1764
|
-
tokens = _objectWithoutPropertiesLoose(_ref2,
|
|
1739
|
+
tokens = _objectWithoutPropertiesLoose(_ref2, ["UserRequest"]);
|
|
1765
1740
|
|
|
1766
1741
|
setUser(_extends({
|
|
1767
1742
|
info: info
|