@reachfive/identity-ui 1.20.2 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -2
- package/cjs/identity-ui.js +264 -285
- package/es/identity-ui.js +269 -289
- package/package.json +2 -2
- package/umd/identity-ui.js +279 -334
- package/umd/identity-ui.min.js +1 -1
package/cjs/identity-ui.js
CHANGED
|
@@ -16,8 +16,7 @@ var styled__default = _interopDefault(styled);
|
|
|
16
16
|
var reactTransitionGroup = require('react-transition-group');
|
|
17
17
|
var classes = _interopDefault(require('classnames'));
|
|
18
18
|
var remarkable = require('remarkable');
|
|
19
|
-
var validator = require('validator');
|
|
20
|
-
var validator__default = _interopDefault(validator);
|
|
19
|
+
var validator = _interopDefault(require('validator'));
|
|
21
20
|
var libphonenumber = require('libphonenumber-js');
|
|
22
21
|
var lodashEs = require('lodash-es');
|
|
23
22
|
var luxon = require('luxon');
|
|
@@ -6286,75 +6285,88 @@ var paypal = {
|
|
|
6286
6285
|
icon: icon$e
|
|
6287
6286
|
};
|
|
6288
6287
|
|
|
6289
|
-
var icon$f = "data:image/svg+xml,%3Csvg%20width%3D%
|
|
6288
|
+
var icon$f = "data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%20128%20128%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20role%3D%22img%22%20class%3D%22iconify%20iconify--noto%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cpath%20d%3D%22M72.51%2015.42H34.65c-.15%200-.28.06-.42.08h-6.47c-1.24%200-2.24%201-2.24%202.24v100.97c0%201.24%201%202.24%202.24%202.24h21.9c1.24%200%202.24-1%202.24-2.24V86.63h20.61c19.83%200%2035.96-15.97%2035.96-35.6c.01-19.63-16.13-35.61-35.96-35.61zm-1.72%2050.22c-.35.03-.7.06-1.06.06H52.28c-.05%200-.09-.04-.14-.06a.513.513%200%200%201-.24-.1a.577.577%200%200%201-.21-.43V36.94c0-.18.09-.32.21-.43c.06-.06.14-.07.22-.09c.06-.02.09-.06.15-.06h17.45c.4%200%20.8.03%201.19.06c7.25.63%2012.97%206.94%2012.97%2014.61c.01%207.71-5.77%2014.05-13.09%2014.61z%22%20fill%3D%22%23fff%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E";
|
|
6289
|
+
|
|
6290
|
+
var ping = {
|
|
6291
|
+
key: 'ping',
|
|
6292
|
+
name: 'Ping',
|
|
6293
|
+
color: '#c90917',
|
|
6294
|
+
icon: icon$f,
|
|
6295
|
+
windowSize: {
|
|
6296
|
+
width: 450,
|
|
6297
|
+
height: 400
|
|
6298
|
+
}
|
|
6299
|
+
};
|
|
6300
|
+
|
|
6301
|
+
var icon$g = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M270%20806q-8-19-8-52%200-20%2011-49t24-45q-1-22%207.5-53t22.5-43q0-139%2092.5-288.5t217.5-209.5q139-66%20324-66%20133%200%20266%2055%2049%2021%2090%2048t71%2056%2055%2068%2042%2074%2032.5%2084.5%2025.5%2089.5%2022%2098l1%205q55%2083%2055%20150%200%2014-9%2040t-9%2038q0%201%201.5%203.5t3.5%205%202%203.5q77%20114%20120.5%20214.5t43.5%20208.5q0%2043-19.5%20100t-55.5%2057q-9%200-19.5-7.5t-19-17.5-19-26-16-26.5-13.5-26-9-17.5q-1-1-3-1l-5%204q-59%20154-132%20223%2020%2020%2061.5%2038.5t69%2041.5%2035.5%2065q-2%204-4%2016t-7%2018q-64%2097-302%2097-53%200-110.5-9t-98-20-104.5-30q-15-5-23-7-14-4-46-4.5t-40-1.5q-41%2045-127.5%2065t-168.5%2020q-35%200-69-1.5t-93-9-101-20.5-74.5-40-32.5-64q0-40%2010-59.5t41-48.5q11-2%2040.5-13t49.5-12q4%200%2014-2%202-2%202-4l-2-3q-48-11-108-105.5t-73-156.5l-5-3q-4%200-12%2020-18%2041-54.5%2074.5t-77.5%2037.5h-1q-4%200-6-4.5t-5-5.5q-23-54-23-100%200-275%20252-466z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6290
6302
|
|
|
6291
6303
|
var qq = {
|
|
6292
6304
|
key: 'qq',
|
|
6293
6305
|
name: 'QQ',
|
|
6294
6306
|
color: '#0071c3',
|
|
6295
|
-
icon: icon$
|
|
6307
|
+
icon: icon$g,
|
|
6296
6308
|
windowSize: {
|
|
6297
6309
|
width: 450,
|
|
6298
6310
|
height: 400
|
|
6299
6311
|
}
|
|
6300
6312
|
};
|
|
6301
6313
|
|
|
6302
|
-
var icon$
|
|
6314
|
+
var icon$h = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1684%20408q-67%2098-162%20167%201%2014%201%2042%200%20130-38%20259.5t-115.5%20248.5-184.5%20210.5-258%20146-323%2054.5q-271%200-496-145%2035%204%2078%204%20225%200%20401-138-105-2-188-64.5t-114-159.5q33%205%2061%205%2043%200%2085-11-112-23-185.5-111.5t-73.5-205.5v-4q68%2038%20146%2041-66-44-105-115t-39-154q0-88%2044-163%20121%20149%20294.5%20238.5t371.5%2099.5q-8-38-8-74%200-134%2094.5-228.5t228.5-94.5q140%200%20236%20102%20109-21%20205-78-37%20115-142%20178%2093-10%20186-50z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6303
6315
|
|
|
6304
6316
|
var twitter = {
|
|
6305
6317
|
key: 'twitter',
|
|
6306
6318
|
name: 'Twitter',
|
|
6307
6319
|
color: '#55acee',
|
|
6308
|
-
icon: icon$
|
|
6320
|
+
icon: icon$h,
|
|
6309
6321
|
windowSize: {
|
|
6310
6322
|
width: 800,
|
|
6311
6323
|
height: 440
|
|
6312
6324
|
}
|
|
6313
6325
|
};
|
|
6314
6326
|
|
|
6315
|
-
var icon$
|
|
6327
|
+
var icon$i = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1853%20520q23%2064-150%20294-24%2032-65%2085-78%20100-90%20131-17%2041%2014%2081%2017%2021%2081%2082h1l1%201%201%201%202%202q141%20131%20191%20221%203%205%206.5%2012.5t7%2026.5-.5%2034-25%2027.5-59%2012.5l-256%204q-24%205-56-5t-52-22l-20-12q-30-21-70-64t-68.5-77.5-61-58-56.5-15.5q-3%201-8%203.5t-17%2014.5-21.5%2029.5-17%2052-6.5%2077.5q0%2015-3.5%2027.5t-7.5%2018.5l-4%205q-18%2019-53%2022h-115q-71%204-146-16.5t-131.5-53-103-66-70.5-57.5l-25-24q-10-10-27.5-30t-71.5-91-106-151-122.5-211-130.5-272q-6-16-6-27t3-16l4-6q15-19%2057-19l274-2q12%202%2023%206.5t16%208.5l5%203q16%2011%2024%2032%2020%2050%2046%20103.5t41%2081.5l16%2029q29%2060%2056%20104t48.5%2068.5%2041.5%2038.5%2034%2014%2027-5q2-1%205-5t12-22%2013.5-47%209.5-81%200-125q-2-40-9-73t-14-46l-6-12q-25-34-85-43-13-2%205-24%2017-19%2038-30%2053-26%20239-24%2082%201%20135%2013%2020%205%2033.5%2013.5t20.5%2024%2010.5%2032%203.5%2045.5-1%2055-2.5%2070.5-1.5%2082.5q0%2011-1%2042t-.5%2048%203.5%2040.5%2011.5%2039%2022.5%2024.5q8%202%2017%204t26-11%2038-34.5%2052-67%2068-107.5q60-104%20107-225%204-10%2010-17.5t11-10.5l4-3%205-2.5%2013-3%2020-.5%20288-2q39-5%2064%202.5t31%2016.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6316
6328
|
|
|
6317
6329
|
var vkontakte = {
|
|
6318
6330
|
key: 'vkontakte',
|
|
6319
6331
|
fontKey: 'vk',
|
|
6320
6332
|
name: 'VKontakte',
|
|
6321
6333
|
color: '#45668e',
|
|
6322
|
-
icon: icon$
|
|
6334
|
+
icon: icon$i,
|
|
6323
6335
|
windowSize: {
|
|
6324
6336
|
width: 655,
|
|
6325
6337
|
height: 430
|
|
6326
6338
|
}
|
|
6327
6339
|
};
|
|
6328
6340
|
|
|
6329
|
-
var icon$
|
|
6341
|
+
var icon$j = "data:image/svg+xml,%3Csvg%20width%3D%222048%22%20height%3D%221792%22%20viewBox%3D%220%200%202048%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M580%20461q0-41-25-66t-66-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2066-24.5t25-65.5zm743%20507q0-28-25.5-50t-65.5-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q40%200%2065.5-22t25.5-51zm-236-507q0-41-24.5-66t-65.5-25q-43%200-76%2025.5t-33%2065.5q0%2039%2033%2064.5t76%2025.5q41%200%2065.5-24.5t24.5-65.5zm635%20507q0-28-26-50t-65-22q-27%200-49.5%2022.5t-22.5%2049.5q0%2028%2022.5%2050.5t49.5%2022.5q39%200%2065-22t26-51zm-266-397q-31-4-70-4-169%200-311%2077t-223.5%20208.5-81.5%20287.5q0%2078%2023%20152-35%203-68%203-26%200-50-1.5t-55-6.5-44.5-7-54.5-10.5-50-10.5l-253%20127%2072-218q-290-203-290-490%200-169%2097.5-311t264-223.5%20363.5-81.5q176%200%20332.5%2066t262%20182.5%20136.5%20260.5zm592%20561q0%20117-68.5%20223.5t-185.5%20193.5l55%20181-199-109q-150%2037-218%2037-169%200-311-70.5t-223.5-191.5-81.5-264%2081.5-264%20223.5-191.5%20311-70.5q161%200%20303%2070.5t227.5%20192%2085.5%20263.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6330
6342
|
|
|
6331
6343
|
var wechat = {
|
|
6332
6344
|
key: 'wechat',
|
|
6333
6345
|
name: 'WeChat',
|
|
6334
6346
|
color: '#44b549',
|
|
6335
|
-
icon: icon$
|
|
6347
|
+
icon: icon$j,
|
|
6336
6348
|
windowSize: {
|
|
6337
6349
|
width: 450,
|
|
6338
6350
|
height: 400
|
|
6339
6351
|
}
|
|
6340
6352
|
};
|
|
6341
6353
|
|
|
6342
|
-
var icon$
|
|
6354
|
+
var icon$k = "data:image/svg+xml,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M675%201284q21-34%2011-69t-45-50q-34-14-73-1t-60%2046q-22%2034-13%2068.5t43%2050.5%2074.5%202.5%2062.5-47.5zm94-121q8-13%203.5-26.5t-17.5-18.5q-14-5-28.5.5t-21.5%2018.5q-17%2031%2013%2045%2014%205%2029-.5t22-18.5zm174%20107q-45%20102-158%20150t-224%2012q-107-34-147.5-126.5t6.5-187.5q47-93%20151.5-139t210.5-19q111%2029%20158.5%20119.5t2.5%20190.5zm312-160q-9-96-89-170t-208.5-109-274.5-21q-223%2023-369.5%20141.5t-132.5%20264.5q9%2096%2089%20170t208.5%20109%20274.5%2021q223-23%20369.5-141.5t132.5-264.5zm308%204q0%2068-37%20139.5t-109%20137-168.5%20117.5-226%2083-270.5%2031-275-33.5-240.5-93-171.5-151-65-199.5q0-115%2069.5-245t197.5-258q169-169%20341.5-236t246.5%207q65%2064%2020%20209-4%2014-1%2020t10%207%2014.5-.5%2013.5-3.5l6-2q139-59%20246-59t153%2061q45%2063%200%20178-2%2013-4.5%2020t4.5%2012.5%2012%207.5%2017%206q57%2018%20103%2047t80%2081.5%2034%20116.5zm-74-624q42%2047%2054.5%20108.5t-6.5%20117.5q-8%2023-29.5%2034t-44.5%204q-23-8-34-29.5t-4-44.5q20-63-24-111t-107-35q-24%205-45-8t-25-37q-5-24%208-44.5t37-25.5q60-13%20119%205.5t101%2065.5zm181-163q87%2096%20112.5%20222.5t-13.5%20241.5q-9%2027-34%2040t-52%204-40-34-5-52q28-82%2010-172t-80-158q-62-69-148-95.5t-173-8.5q-28%206-52-9.5t-30-43.5%209.5-51.5%2043.5-29.5q123-26%20244%2011.5t208%20134.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6343
6355
|
|
|
6344
6356
|
var weibo = {
|
|
6345
6357
|
key: 'weibo',
|
|
6346
6358
|
name: 'Weibo',
|
|
6347
6359
|
color: '#e71d34',
|
|
6348
|
-
icon: icon$
|
|
6360
|
+
icon: icon$k
|
|
6349
6361
|
};
|
|
6350
6362
|
|
|
6351
|
-
var icon$
|
|
6363
|
+
var icon$l = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M937%201004l266-499h-112l-157%20312q-24%2048-44%2092l-42-92-155-312h-120l263%20493v324h101v-318zm727-588v960q0%20119-84.5%20203.5t-203.5%2084.5h-960q-119%200-203.5-84.5t-84.5-203.5v-960q0-119%2084.5-203.5t203.5-84.5h960q119%200%20203.5%2084.5t84.5%20203.5z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E";
|
|
6352
6364
|
|
|
6353
6365
|
var yandex = {
|
|
6354
6366
|
key: 'yandex',
|
|
6355
6367
|
name: 'Yandex',
|
|
6356
6368
|
color: '#d43b2f',
|
|
6357
|
-
icon: icon$
|
|
6369
|
+
icon: icon$l,
|
|
6358
6370
|
windowSize: {
|
|
6359
6371
|
width: 655,
|
|
6360
6372
|
height: 700
|
|
@@ -6378,6 +6390,7 @@ var providers = /*#__PURE__*/Object.freeze({
|
|
|
6378
6390
|
oney: oney,
|
|
6379
6391
|
orange: orange,
|
|
6380
6392
|
paypal: paypal,
|
|
6393
|
+
ping: ping,
|
|
6381
6394
|
qq: qq,
|
|
6382
6395
|
twitter: twitter,
|
|
6383
6396
|
vkontakte: vkontakte,
|
|
@@ -7314,12 +7327,6 @@ function isValued(v) {
|
|
|
7314
7327
|
var unwrap = isObject(v) ? v[rawProperty] : v;
|
|
7315
7328
|
return unwrap !== null && unwrap !== undefined && unwrap !== '' && !Number.isNaN(unwrap) && (Array.isArray(unwrap) ? unwrap.length > 0 : true);
|
|
7316
7329
|
}
|
|
7317
|
-
function formatISO8601Date(year, month, day) {
|
|
7318
|
-
if (isValued(year) && isValued(month) && isValued(day)) {
|
|
7319
|
-
return "".concat(year, "-").concat(month.toString().padStart(2, '0'), "-").concat(day.toString().padStart(2, '0'));
|
|
7320
|
-
}
|
|
7321
|
-
return null;
|
|
7322
|
-
}
|
|
7323
7330
|
function specializeIdentifierData(data) {
|
|
7324
7331
|
return data.identifier ? _objectSpread2(_objectSpread2(_objectSpread2({}, data), {}, {
|
|
7325
7332
|
identifier: undefined
|
|
@@ -7412,15 +7419,15 @@ var checked = new Validator({
|
|
|
7412
7419
|
hint: 'checked'
|
|
7413
7420
|
});
|
|
7414
7421
|
var email = new Validator({
|
|
7415
|
-
rule:
|
|
7422
|
+
rule: validator.isEmail,
|
|
7416
7423
|
hint: 'email'
|
|
7417
7424
|
});
|
|
7418
7425
|
var integer = new Validator({
|
|
7419
|
-
rule:
|
|
7426
|
+
rule: validator.isInt,
|
|
7420
7427
|
hint: 'integer'
|
|
7421
7428
|
});
|
|
7422
7429
|
var _float = new Validator({
|
|
7423
|
-
rule:
|
|
7430
|
+
rule: validator.isFloat,
|
|
7424
7431
|
hint: 'float'
|
|
7425
7432
|
});
|
|
7426
7433
|
|
|
@@ -8702,6 +8709,7 @@ var IdentifierField = /*#__PURE__*/function (_React$Component) {
|
|
|
8702
8709
|
var _this$props$value = this.props.value,
|
|
8703
8710
|
userInput = _this$props$value.userInput,
|
|
8704
8711
|
country = _this$props$value.country;
|
|
8712
|
+
if (!userInput) return;
|
|
8705
8713
|
try {
|
|
8706
8714
|
var parsed = libphonenumber.parse(userInput, country);
|
|
8707
8715
|
var phoneValue = country === parsed.country ? libphonenumber.format(parsed, 'National') : userInput;
|
|
@@ -9610,275 +9618,248 @@ function selectField(_ref) {
|
|
|
9610
9618
|
}));
|
|
9611
9619
|
}
|
|
9612
9620
|
|
|
9613
|
-
var
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9621
|
+
var useDebounce = function useDebounce(value, milliSeconds) {
|
|
9622
|
+
var _useState = React.useState(value),
|
|
9623
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9624
|
+
debouncedValue = _useState2[0],
|
|
9625
|
+
setDebouncedValue = _useState2[1];
|
|
9626
|
+
React.useEffect(function () {
|
|
9627
|
+
var handler = setTimeout(function () {
|
|
9628
|
+
setDebouncedValue(value);
|
|
9629
|
+
}, milliSeconds);
|
|
9630
|
+
return function () {
|
|
9631
|
+
clearTimeout(handler);
|
|
9632
|
+
};
|
|
9633
|
+
}, [value, milliSeconds]);
|
|
9634
|
+
return debouncedValue;
|
|
9625
9635
|
};
|
|
9626
|
-
function dateField(config) {
|
|
9627
|
-
return simpleField(_objectSpread2(_objectSpread2({
|
|
9628
|
-
placeholder: 'mm/dd/yyyy'
|
|
9629
|
-
}, config), {}, {
|
|
9630
|
-
type: 'text',
|
|
9631
|
-
format: {
|
|
9632
|
-
bind: function bind(modelValue) {
|
|
9633
|
-
if (modelValue && modelValue.length) {
|
|
9634
|
-
var _modelValue$split = modelValue.split('-'),
|
|
9635
|
-
_modelValue$split2 = _slicedToArray(_modelValue$split, 3),
|
|
9636
|
-
_modelValue$split2$ = _modelValue$split2[0],
|
|
9637
|
-
year = _modelValue$split2$ === void 0 ? '' : _modelValue$split2$,
|
|
9638
|
-
_modelValue$split2$2 = _modelValue$split2[1],
|
|
9639
|
-
month = _modelValue$split2$2 === void 0 ? '' : _modelValue$split2$2,
|
|
9640
|
-
_modelValue$split2$3 = _modelValue$split2[2],
|
|
9641
|
-
day = _modelValue$split2$3 === void 0 ? '' : _modelValue$split2$3;
|
|
9642
|
-
return "".concat(month, "/").concat(day, "/").concat(year);
|
|
9643
|
-
}
|
|
9644
|
-
},
|
|
9645
|
-
unbind: formatDate
|
|
9646
|
-
},
|
|
9647
|
-
validator: new Validator({
|
|
9648
|
-
rule: function rule(value) {
|
|
9649
|
-
var date = formatDate(value);
|
|
9650
|
-
return !date || validator__default(date);
|
|
9651
|
-
},
|
|
9652
|
-
hint: 'date'
|
|
9653
|
-
})
|
|
9654
|
-
}));
|
|
9655
|
-
}
|
|
9656
9636
|
|
|
9657
|
-
var _excluded$6 = ["state"];
|
|
9658
9637
|
var _templateObject$a, _templateObject2$5;
|
|
9659
|
-
var BIRTHDAY_PATH = 'birthdate';
|
|
9660
|
-
var months = function months(i18n) {
|
|
9661
|
-
return ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].map(function (m, i) {
|
|
9662
|
-
return {
|
|
9663
|
-
value: i + 1,
|
|
9664
|
-
label: i18n(m)
|
|
9665
|
-
};
|
|
9666
|
-
});
|
|
9667
|
-
};
|
|
9668
9638
|
var inputRowGutter = 10;
|
|
9669
|
-
var InputRow = styled__default.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n
|
|
9670
|
-
var InputCol = styled__default.div(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n
|
|
9639
|
+
var InputRow = styled__default.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: ", "px;\n"])), inputRowGutter);
|
|
9640
|
+
var InputCol = styled__default.div(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n flex-basis: ", "%;\n"])), function (props) {
|
|
9671
9641
|
return props.width;
|
|
9672
9642
|
});
|
|
9673
|
-
var
|
|
9674
|
-
var
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9643
|
+
var DateField = function DateField(_ref) {
|
|
9644
|
+
var i18n = _ref.i18n,
|
|
9645
|
+
inputId = _ref.inputId,
|
|
9646
|
+
label = _ref.label,
|
|
9647
|
+
locale = _ref.locale,
|
|
9648
|
+
onChange = _ref.onChange,
|
|
9649
|
+
path = _ref.path,
|
|
9650
|
+
required = _ref.required,
|
|
9651
|
+
showLabel = _ref.showLabel,
|
|
9652
|
+
validation = _ref.validation,
|
|
9653
|
+
value = _ref.value;
|
|
9654
|
+
var _useState = React.useState(isValued(value) ? value.raw.day : undefined),
|
|
9655
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9656
|
+
day = _useState2[0],
|
|
9657
|
+
setDay = _useState2[1];
|
|
9658
|
+
var _useState3 = React.useState(isValued(value) ? value.raw.month : undefined),
|
|
9659
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
9660
|
+
month = _useState4[0],
|
|
9661
|
+
setMonth = _useState4[1];
|
|
9662
|
+
var _useState5 = React.useState(isValued(value) ? value.raw.year : undefined),
|
|
9663
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
9664
|
+
year = _useState6[0],
|
|
9665
|
+
setYear = _useState6[1];
|
|
9666
|
+
|
|
9667
|
+
// debounce year value to delay value update when user is currently editing it
|
|
9668
|
+
var debouncedYear = useDebounce(year, 1000);
|
|
9669
|
+
var setDatePart = function setDatePart(setter, value) {
|
|
9670
|
+
if (Number.isNaN(Number(value))) return; // only accept number value
|
|
9671
|
+
setter(Number(value));
|
|
9696
9672
|
};
|
|
9697
|
-
var
|
|
9698
|
-
return
|
|
9699
|
-
|
|
9700
|
-
|
|
9673
|
+
var handleDayChange = function handleDayChange(event) {
|
|
9674
|
+
return setDatePart(setDay, event.target.value);
|
|
9675
|
+
};
|
|
9676
|
+
var handleMonthChange = function handleMonthChange(event) {
|
|
9677
|
+
return setDatePart(setMonth, event.target.value);
|
|
9678
|
+
};
|
|
9679
|
+
var handleYearChange = function handleYearChange(event) {
|
|
9680
|
+
return setDatePart(setYear, event.target.value);
|
|
9681
|
+
};
|
|
9682
|
+
React.useEffect(function () {
|
|
9683
|
+
if (day && month && debouncedYear) {
|
|
9684
|
+
onChange(function () {
|
|
9685
|
+
return {
|
|
9686
|
+
value: {
|
|
9687
|
+
raw: luxon.DateTime.fromObject({
|
|
9688
|
+
year: debouncedYear,
|
|
9689
|
+
month: month,
|
|
9690
|
+
day: day
|
|
9691
|
+
})
|
|
9692
|
+
},
|
|
9701
9693
|
isDirty: true
|
|
9702
|
-
}
|
|
9694
|
+
};
|
|
9703
9695
|
});
|
|
9704
|
-
}
|
|
9696
|
+
}
|
|
9697
|
+
}, [debouncedYear, month, day]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
9698
|
+
|
|
9699
|
+
var months = React.useMemo(function () {
|
|
9700
|
+
return luxon.Info.months("long", {
|
|
9701
|
+
locale: locale
|
|
9702
|
+
});
|
|
9703
|
+
}, [locale]);
|
|
9704
|
+
var daysInMonth = React.useMemo(function () {
|
|
9705
|
+
return Array.from({
|
|
9706
|
+
length: luxon.DateTime.fromObject({
|
|
9707
|
+
year: debouncedYear,
|
|
9708
|
+
month: month
|
|
9709
|
+
}).daysInMonth
|
|
9710
|
+
}, function (_value, index) {
|
|
9711
|
+
return index + 1;
|
|
9712
|
+
});
|
|
9713
|
+
}, [debouncedYear, month]);
|
|
9714
|
+
|
|
9715
|
+
// reset day if current value is out of range
|
|
9716
|
+
if (day && !daysInMonth.includes(day)) {
|
|
9717
|
+
setDay(undefined);
|
|
9718
|
+
}
|
|
9719
|
+
var parts = React.useMemo(function () {
|
|
9720
|
+
return luxon.DateTime.now().setLocale(locale).toLocaleParts().map(function (part) {
|
|
9721
|
+
return part.type;
|
|
9722
|
+
}).filter(function (type) {
|
|
9723
|
+
return type !== 'literal';
|
|
9724
|
+
});
|
|
9725
|
+
}, [locale]);
|
|
9726
|
+
var error = _typeof(validation) === 'object' && 'error' in validation ? validation.error : null;
|
|
9727
|
+
var fields = {
|
|
9728
|
+
day: /*#__PURE__*/React__default.createElement(InputCol, {
|
|
9729
|
+
key: "day",
|
|
9730
|
+
width: 20
|
|
9731
|
+
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
9732
|
+
name: "".concat(path, ".day"),
|
|
9733
|
+
value: day || '',
|
|
9734
|
+
hasError: error,
|
|
9735
|
+
required: required,
|
|
9736
|
+
onChange: handleDayChange,
|
|
9737
|
+
placeholder: i18n('day'),
|
|
9738
|
+
options: daysInMonth.map(function (day) {
|
|
9739
|
+
return {
|
|
9740
|
+
value: day,
|
|
9741
|
+
label: day
|
|
9742
|
+
};
|
|
9743
|
+
}),
|
|
9744
|
+
"data-testid": "".concat(path, ".day"),
|
|
9745
|
+
"aria-label": i18n('day')
|
|
9746
|
+
})),
|
|
9747
|
+
month: /*#__PURE__*/React__default.createElement(InputCol, {
|
|
9748
|
+
key: "month",
|
|
9749
|
+
width: 50
|
|
9750
|
+
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
9751
|
+
name: "".concat(path, ".month"),
|
|
9752
|
+
value: month || '',
|
|
9753
|
+
hasError: error,
|
|
9754
|
+
required: required,
|
|
9755
|
+
onChange: handleMonthChange,
|
|
9756
|
+
placeholder: i18n('month'),
|
|
9757
|
+
options: months.map(function (month, index) {
|
|
9758
|
+
return {
|
|
9759
|
+
value: index + 1,
|
|
9760
|
+
label: month
|
|
9761
|
+
};
|
|
9762
|
+
}),
|
|
9763
|
+
"data-testid": "".concat(path, ".month"),
|
|
9764
|
+
"aria-label": i18n('month')
|
|
9765
|
+
})),
|
|
9766
|
+
year: /*#__PURE__*/React__default.createElement(InputCol, {
|
|
9767
|
+
key: "year",
|
|
9768
|
+
width: 30
|
|
9769
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
9770
|
+
type: "number",
|
|
9771
|
+
maxlength: "4",
|
|
9772
|
+
inputmode: "numeric",
|
|
9773
|
+
name: "".concat(path, ".year"),
|
|
9774
|
+
value: year || '',
|
|
9775
|
+
hasError: error,
|
|
9776
|
+
required: required,
|
|
9777
|
+
onChange: handleYearChange,
|
|
9778
|
+
placeholder: i18n('year'),
|
|
9779
|
+
"data-testid": "".concat(path, ".year"),
|
|
9780
|
+
"aria-label": i18n('year')
|
|
9781
|
+
}))
|
|
9705
9782
|
};
|
|
9706
|
-
return /*#__PURE__*/React__default.createElement(FormGroup,
|
|
9783
|
+
return /*#__PURE__*/React__default.createElement(FormGroup, {
|
|
9707
9784
|
inputId: inputId,
|
|
9708
|
-
labelText: label
|
|
9709
|
-
|
|
9785
|
+
labelText: label,
|
|
9786
|
+
error: error,
|
|
9710
9787
|
showLabel: showLabel
|
|
9711
|
-
}
|
|
9712
|
-
|
|
9713
|
-
}
|
|
9714
|
-
type: "text",
|
|
9715
|
-
id: inputId,
|
|
9716
|
-
name: "".concat(BIRTHDAY_PATH, ".day"),
|
|
9717
|
-
maxlength: "2",
|
|
9718
|
-
inputmode: "numeric",
|
|
9719
|
-
value: day.value,
|
|
9720
|
-
hasError: !!validation.day,
|
|
9721
|
-
required: required,
|
|
9722
|
-
placeholder: i18n('day'),
|
|
9723
|
-
onChange: handleFieldChange('day'),
|
|
9724
|
-
onBlur: handleFieldBlur('day'),
|
|
9725
|
-
"data-testid": "".concat(BIRTHDAY_PATH, ".day")
|
|
9726
|
-
})), /*#__PURE__*/React__default.createElement(InputCol, {
|
|
9727
|
-
width: 50
|
|
9728
|
-
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
9729
|
-
name: "".concat(BIRTHDAY_PATH, ".month"),
|
|
9730
|
-
value: month.value || '',
|
|
9731
|
-
hasError: !!validation.month,
|
|
9732
|
-
required: required,
|
|
9733
|
-
onChange: handleFieldChange('month'),
|
|
9734
|
-
onBlur: handleFieldBlur('month'),
|
|
9735
|
-
placeholder: i18n('month'),
|
|
9736
|
-
options: months,
|
|
9737
|
-
"data-testid": "".concat(BIRTHDAY_PATH, ".month")
|
|
9738
|
-
})), /*#__PURE__*/React__default.createElement(InputCol, {
|
|
9739
|
-
width: 30
|
|
9740
|
-
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
9741
|
-
type: "text",
|
|
9742
|
-
name: "".concat(BIRTHDAY_PATH, ".year"),
|
|
9743
|
-
maxlength: "4",
|
|
9744
|
-
inputmode: "numeric",
|
|
9745
|
-
value: year.value,
|
|
9746
|
-
hasError: !!validation.year,
|
|
9747
|
-
required: required,
|
|
9748
|
-
placeholder: i18n('year'),
|
|
9749
|
-
onChange: handleFieldChange('year'),
|
|
9750
|
-
onBlur: handleFieldBlur('year'),
|
|
9751
|
-
"data-testid": "".concat(BIRTHDAY_PATH, ".year")
|
|
9752
|
-
}))));
|
|
9788
|
+
}, /*#__PURE__*/React__default.createElement(InputRow, null, parts.map(function (part) {
|
|
9789
|
+
return fields[part];
|
|
9790
|
+
})));
|
|
9753
9791
|
};
|
|
9754
|
-
var
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9792
|
+
var dateFormat = function dateFormat(locale) {
|
|
9793
|
+
return luxon.DateTime.now().setLocale(locale).toLocaleParts().map(function (part) {
|
|
9794
|
+
switch (part.type) {
|
|
9795
|
+
case 'day':
|
|
9796
|
+
return 'dd';
|
|
9797
|
+
case 'month':
|
|
9798
|
+
return 'mm';
|
|
9799
|
+
case 'year':
|
|
9800
|
+
return 'yyyy';
|
|
9801
|
+
case 'literal':
|
|
9802
|
+
return part.value;
|
|
9803
|
+
}
|
|
9804
|
+
}).join('');
|
|
9763
9805
|
};
|
|
9764
|
-
var
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9806
|
+
var datetimeValidator = function datetimeValidator(locale) {
|
|
9807
|
+
return new Validator({
|
|
9808
|
+
rule: function rule(value) {
|
|
9809
|
+
return isValued(value) && value.raw.isValid;
|
|
9810
|
+
},
|
|
9811
|
+
hint: 'date',
|
|
9812
|
+
parameters: {
|
|
9813
|
+
format: dateFormat(locale)
|
|
9814
|
+
}
|
|
9815
|
+
});
|
|
9769
9816
|
};
|
|
9770
|
-
function
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
};
|
|
9788
|
-
return {
|
|
9789
|
-
key: BIRTHDAY_PATH,
|
|
9790
|
-
modelPath: BIRTHDAY_PATH,
|
|
9791
|
-
render: function render(_ref6) {
|
|
9792
|
-
var state = _ref6.state,
|
|
9793
|
-
props = _objectWithoutProperties(_ref6, _excluded$6);
|
|
9794
|
-
return /*#__PURE__*/React__default.createElement(BirthdateField, _extends({
|
|
9795
|
-
key: BIRTHDAY_PATH
|
|
9796
|
-
}, state, props, staticProps));
|
|
9797
|
-
},
|
|
9798
|
-
initialize: function initialize(model) {
|
|
9799
|
-
var modelValue = model.birthdate || defaultValue;
|
|
9800
|
-
var _ref7 = modelValue ? modelValue.split('-') : [],
|
|
9801
|
-
_ref8 = _slicedToArray(_ref7, 3),
|
|
9802
|
-
_ref8$ = _ref8[0],
|
|
9803
|
-
year = _ref8$ === void 0 ? '' : _ref8$,
|
|
9804
|
-
_ref8$2 = _ref8[1],
|
|
9805
|
-
month = _ref8$2 === void 0 ? '' : _ref8$2,
|
|
9806
|
-
_ref8$3 = _ref8[2],
|
|
9807
|
-
day = _ref8$3 === void 0 ? '' : _ref8$3;
|
|
9808
|
-
return {
|
|
9809
|
-
day: {
|
|
9810
|
-
value: day,
|
|
9811
|
-
isDirty: false
|
|
9812
|
-
},
|
|
9813
|
-
month: {
|
|
9814
|
-
value: parseInt(month),
|
|
9815
|
-
isDirty: false
|
|
9816
|
-
},
|
|
9817
|
-
year: {
|
|
9818
|
-
value: year,
|
|
9819
|
-
isDirty: false
|
|
9820
|
-
}
|
|
9821
|
-
};
|
|
9822
|
-
},
|
|
9823
|
-
unbind: function unbind(model, state) {
|
|
9824
|
-
return _objectSpread2(_objectSpread2({}, model), {}, {
|
|
9825
|
-
birthdate: format(state)
|
|
9826
|
-
});
|
|
9827
|
-
},
|
|
9828
|
-
validate: function validate(state, _ref9) {
|
|
9829
|
-
var isSubmitted = _ref9.isSubmitted;
|
|
9830
|
-
var required = staticProps.required;
|
|
9831
|
-
var day = state.day,
|
|
9832
|
-
month = state.month,
|
|
9833
|
-
year = state.year;
|
|
9834
|
-
var missingFields = ['day', 'month', 'year'].filter(function (field) {
|
|
9835
|
-
return (isSubmitted || state[field].isDirty) && !isValued(state[field].value);
|
|
9836
|
-
});
|
|
9837
|
-
if (missingFields.length) {
|
|
9838
|
-
return required || missingFields.length < 3 ? _objectSpread2({
|
|
9839
|
-
error: i18n('validation.required')
|
|
9840
|
-
}, missingFields.reduce(function (acc, field) {
|
|
9841
|
-
return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, field, true));
|
|
9842
|
-
}, {})) : {};
|
|
9843
|
-
}
|
|
9844
|
-
if (isSubmitted || day.isDirty || month.isDirty || year.isDirty) {
|
|
9845
|
-
if (!validator.isNumeric(year.value.toString()) || !luxon.DateTime.fromObject({
|
|
9846
|
-
year: parseInt(year.value, 10)
|
|
9847
|
-
}).isValid) {
|
|
9848
|
-
return {
|
|
9849
|
-
error: i18n("validation.birthdate.year"),
|
|
9850
|
-
year: true
|
|
9851
|
-
};
|
|
9852
|
-
}
|
|
9853
|
-
var birthdate = format(state);
|
|
9854
|
-
if (!birthdate || !validator.isISO8601(birthdate)) {
|
|
9855
|
-
return {
|
|
9856
|
-
error: i18n('validation.birthdate.dayOfMonth'),
|
|
9857
|
-
day: true
|
|
9858
|
-
};
|
|
9859
|
-
}
|
|
9860
|
-
if (!(validator.isNumeric(month.value.toString()) && validator.isNumeric(day.value.toString())) || !luxon.DateTime.fromObject({
|
|
9861
|
-
year: year.value,
|
|
9862
|
-
month: month.value,
|
|
9863
|
-
day: day.value
|
|
9864
|
-
}).isValid) {
|
|
9865
|
-
return {
|
|
9866
|
-
error: i18n("validation.birthdate.dayOfMonth"),
|
|
9867
|
-
day: true
|
|
9868
|
-
};
|
|
9869
|
-
}
|
|
9870
|
-
var limitAge = validateLimitAge(day.value, month.value, year.value);
|
|
9871
|
-
if (limitAge) {
|
|
9872
|
-
return {
|
|
9873
|
-
error: i18n("validation.".concat(limitAge))
|
|
9874
|
-
};
|
|
9875
|
-
}
|
|
9876
|
-
}
|
|
9877
|
-
return {};
|
|
9878
|
-
}
|
|
9879
|
-
};
|
|
9817
|
+
function dateField(props, config) {
|
|
9818
|
+
return createField(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
9819
|
+
format: {
|
|
9820
|
+
bind: function bind(value) {
|
|
9821
|
+
var dt = value ? luxon.DateTime.fromISO(value) : luxon.DateTime.invalid('empty value');
|
|
9822
|
+
return dt.isValid ? {
|
|
9823
|
+
raw: dt
|
|
9824
|
+
} : undefined;
|
|
9825
|
+
},
|
|
9826
|
+
unbind: function unbind(value) {
|
|
9827
|
+
return value.raw.toISODate();
|
|
9828
|
+
}
|
|
9829
|
+
},
|
|
9830
|
+
validator: props.validator ? datetimeValidator(config.language).and(props.validator) : datetimeValidator(config.language),
|
|
9831
|
+
component: DateField,
|
|
9832
|
+
extendedParams: {
|
|
9833
|
+
locale: config.language
|
|
9880
9834
|
}
|
|
9881
|
-
};
|
|
9835
|
+
}));
|
|
9836
|
+
}
|
|
9837
|
+
|
|
9838
|
+
var _excluded$6 = ["min", "max", "label"];
|
|
9839
|
+
var ageLimitValidator = function ageLimitValidator() {
|
|
9840
|
+
var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;
|
|
9841
|
+
var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 129;
|
|
9842
|
+
return new Validator({
|
|
9843
|
+
rule: function rule(value) {
|
|
9844
|
+
var age = luxon.DateTime.now().diff(value.raw, 'years').years;
|
|
9845
|
+
return min < age && age < max;
|
|
9846
|
+
},
|
|
9847
|
+
hint: 'birthdate.yearLimit',
|
|
9848
|
+
parameters: {
|
|
9849
|
+
min: min,
|
|
9850
|
+
max: max
|
|
9851
|
+
}
|
|
9852
|
+
});
|
|
9853
|
+
};
|
|
9854
|
+
function birthdateField(_ref, config) {
|
|
9855
|
+
var min = _ref.min,
|
|
9856
|
+
max = _ref.max,
|
|
9857
|
+
label = _ref.label,
|
|
9858
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
9859
|
+
return dateField(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
9860
|
+
label: label || 'birthdate',
|
|
9861
|
+
validator: ageLimitValidator(min, max)
|
|
9862
|
+
}), config);
|
|
9882
9863
|
}
|
|
9883
9864
|
|
|
9884
9865
|
var PhoneNumberField = /*#__PURE__*/function (_React$Component) {
|
|
@@ -10499,7 +10480,7 @@ var predefinedFields = {
|
|
|
10499
10480
|
}, cfg));
|
|
10500
10481
|
}
|
|
10501
10482
|
};
|
|
10502
|
-
function customFieldComponent(customField, cfg) {
|
|
10483
|
+
function customFieldComponent(customField, cfg, config) {
|
|
10503
10484
|
var baseConfig = _objectSpread2(_objectSpread2({
|
|
10504
10485
|
label: customField.name
|
|
10505
10486
|
}, cfg), {}, {
|
|
@@ -10511,7 +10492,7 @@ function customFieldComponent(customField, cfg) {
|
|
|
10511
10492
|
}) : _objectSpread2({}, baseConfig);
|
|
10512
10493
|
return checkboxField(checkboxConfig);
|
|
10513
10494
|
} else if (customField.dataType === 'date') {
|
|
10514
|
-
return dateField(baseConfig);
|
|
10495
|
+
return dateField(baseConfig, config);
|
|
10515
10496
|
} else if (customField.dataType === 'integer') {
|
|
10516
10497
|
return simpleField(_objectSpread2(_objectSpread2({}, baseConfig), {}, {
|
|
10517
10498
|
type: 'number',
|
|
@@ -10606,7 +10587,7 @@ var resolveField = function resolveField(fieldConfig, config) {
|
|
|
10606
10587
|
}
|
|
10607
10588
|
var customField = findCustomField(config, camelPath);
|
|
10608
10589
|
if (customField) {
|
|
10609
|
-
return customFieldComponent(customField, fieldConfig);
|
|
10590
|
+
return customFieldComponent(customField, fieldConfig, config);
|
|
10610
10591
|
}
|
|
10611
10592
|
var camelPathSplit = camelPath.split('.v'); // TODO What if consent start with a `v`?
|
|
10612
10593
|
var consentField = findConsentField(config, camelPathSplit[0]);
|
|
@@ -11227,12 +11208,10 @@ var VerificationCodeView = /*#__PURE__*/function (_React$Component3) {
|
|
|
11227
11208
|
var _this5$props = _this5.props,
|
|
11228
11209
|
apiClient = _this5$props.apiClient,
|
|
11229
11210
|
auth = _this5$props.auth,
|
|
11230
|
-
challengeId = _this5$props.challengeId
|
|
11231
|
-
accessToken = _this5$props.accessToken;
|
|
11211
|
+
challengeId = _this5$props.challengeId;
|
|
11232
11212
|
return apiClient.verifyMfaPasswordless({
|
|
11233
11213
|
challengeId: challengeId,
|
|
11234
|
-
verificationCode: data.verificationCode
|
|
11235
|
-
accessToken: accessToken
|
|
11214
|
+
verificationCode: data.verificationCode
|
|
11236
11215
|
}).then(function (resp) {
|
|
11237
11216
|
return window.location.replace(auth.redirectUri + "?" + toQueryString(resp));
|
|
11238
11217
|
});
|
|
@@ -12535,7 +12514,7 @@ var Credential = withTheme(styled__default(Card)(_templateObject3$6 || (_templat
|
|
|
12535
12514
|
var CardContent = withTheme(styled__default.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n white-space: initial;\n"])), function (props) {
|
|
12536
12515
|
return props.theme.get('_blockInnerHeight');
|
|
12537
12516
|
}));
|
|
12538
|
-
var dateFormat = function dateFormat(dateString, locales) {
|
|
12517
|
+
var dateFormat$1 = function dateFormat(dateString, locales) {
|
|
12539
12518
|
return new Date(dateString).toLocaleDateString(locales, {
|
|
12540
12519
|
timeZone: 'UTC'
|
|
12541
12520
|
});
|
|
@@ -12558,7 +12537,7 @@ var MfaList = compose(withI18n, withConfig)(function (_ref) {
|
|
|
12558
12537
|
}
|
|
12559
12538
|
}, friendlyName), /*#__PURE__*/React__default.createElement("div", null, email || phoneNumber), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("span", null, i18n('mfaList.createdAt'), "\xA0: "), /*#__PURE__*/React__default.createElement("time", {
|
|
12560
12539
|
dateTime: createdAt
|
|
12561
|
-
}, dateFormat(createdAt, config.language)))));
|
|
12540
|
+
}, dateFormat$1(createdAt, config.language)))));
|
|
12562
12541
|
}));
|
|
12563
12542
|
});
|
|
12564
12543
|
var mfaListWidget = createWidget({
|