@leancodepl/kratos 8.1.1 → 8.2.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/index.cjs.js +251 -79
- package/index.esm.js +251 -79
- package/package.json +1 -2
package/index.cjs.js
CHANGED
|
@@ -5,7 +5,6 @@ var axios = require('axios');
|
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var rxjs = require('rxjs');
|
|
8
|
-
var lodash = require('lodash');
|
|
9
8
|
var yn = require('yn');
|
|
10
9
|
|
|
11
10
|
function createKratosClient(configuration) {
|
|
@@ -207,9 +206,9 @@ function _object_spread_props$f(target, source) {
|
|
|
207
206
|
}
|
|
208
207
|
return target;
|
|
209
208
|
}
|
|
210
|
-
function _object_without_properties$
|
|
209
|
+
function _object_without_properties$b(source, excluded) {
|
|
211
210
|
if (source == null) return {};
|
|
212
|
-
var target = _object_without_properties_loose$
|
|
211
|
+
var target = _object_without_properties_loose$b(source, excluded);
|
|
213
212
|
var key, i;
|
|
214
213
|
if (Object.getOwnPropertySymbols) {
|
|
215
214
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -222,7 +221,7 @@ function _object_without_properties$7(source, excluded) {
|
|
|
222
221
|
}
|
|
223
222
|
return target;
|
|
224
223
|
}
|
|
225
|
-
function _object_without_properties_loose$
|
|
224
|
+
function _object_without_properties_loose$b(source, excluded) {
|
|
226
225
|
if (source == null) return {};
|
|
227
226
|
var target = {};
|
|
228
227
|
var sourceKeys = Object.keys(source);
|
|
@@ -235,7 +234,7 @@ function _object_without_properties_loose$7(source, excluded) {
|
|
|
235
234
|
return target;
|
|
236
235
|
}
|
|
237
236
|
function DefaultButtonComponent(_param) {
|
|
238
|
-
var header = _param.header, props = _object_without_properties$
|
|
237
|
+
var header = _param.header, props = _object_without_properties$b(_param, [
|
|
239
238
|
"header"
|
|
240
239
|
]);
|
|
241
240
|
return /*#__PURE__*/ jsxRuntime.jsx("button", _object_spread_props$f(_object_spread$o({}, props), {
|
|
@@ -290,9 +289,9 @@ function _object_spread_props$e(target, source) {
|
|
|
290
289
|
}
|
|
291
290
|
return target;
|
|
292
291
|
}
|
|
293
|
-
function _object_without_properties$
|
|
292
|
+
function _object_without_properties$a(source, excluded) {
|
|
294
293
|
if (source == null) return {};
|
|
295
|
-
var target = _object_without_properties_loose$
|
|
294
|
+
var target = _object_without_properties_loose$a(source, excluded);
|
|
296
295
|
var key, i;
|
|
297
296
|
if (Object.getOwnPropertySymbols) {
|
|
298
297
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -305,7 +304,7 @@ function _object_without_properties$6(source, excluded) {
|
|
|
305
304
|
}
|
|
306
305
|
return target;
|
|
307
306
|
}
|
|
308
|
-
function _object_without_properties_loose$
|
|
307
|
+
function _object_without_properties_loose$a(source, excluded) {
|
|
309
308
|
if (source == null) return {};
|
|
310
309
|
var target = {};
|
|
311
310
|
var sourceKeys = Object.keys(source);
|
|
@@ -318,7 +317,7 @@ function _object_without_properties_loose$6(source, excluded) {
|
|
|
318
317
|
return target;
|
|
319
318
|
}
|
|
320
319
|
function DefaultCheckboxComponent(_param) {
|
|
321
|
-
var label = _param.label, helperMessage = _param.helperMessage, props = _object_without_properties$
|
|
320
|
+
var label = _param.label, helperMessage = _param.helperMessage, props = _object_without_properties$a(_param, [
|
|
322
321
|
"label",
|
|
323
322
|
"helperMessage"
|
|
324
323
|
]);
|
|
@@ -365,9 +364,9 @@ function _object_spread$m(target) {
|
|
|
365
364
|
}
|
|
366
365
|
return target;
|
|
367
366
|
}
|
|
368
|
-
function _object_without_properties$
|
|
367
|
+
function _object_without_properties$9(source, excluded) {
|
|
369
368
|
if (source == null) return {};
|
|
370
|
-
var target = _object_without_properties_loose$
|
|
369
|
+
var target = _object_without_properties_loose$9(source, excluded);
|
|
371
370
|
var key, i;
|
|
372
371
|
if (Object.getOwnPropertySymbols) {
|
|
373
372
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -380,7 +379,7 @@ function _object_without_properties$5(source, excluded) {
|
|
|
380
379
|
}
|
|
381
380
|
return target;
|
|
382
381
|
}
|
|
383
|
-
function _object_without_properties_loose$
|
|
382
|
+
function _object_without_properties_loose$9(source, excluded) {
|
|
384
383
|
if (source == null) return {};
|
|
385
384
|
var target = {};
|
|
386
385
|
var sourceKeys = Object.keys(source);
|
|
@@ -393,7 +392,7 @@ function _object_without_properties_loose$5(source, excluded) {
|
|
|
393
392
|
return target;
|
|
394
393
|
}
|
|
395
394
|
function DefaultImageComponent(_param) {
|
|
396
|
-
var header = _param.header, props = _object_without_properties$
|
|
395
|
+
var header = _param.header, props = _object_without_properties$9(_param, [
|
|
397
396
|
"header"
|
|
398
397
|
]);
|
|
399
398
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -434,9 +433,9 @@ function _object_spread$l(target) {
|
|
|
434
433
|
}
|
|
435
434
|
return target;
|
|
436
435
|
}
|
|
437
|
-
function _object_without_properties$
|
|
436
|
+
function _object_without_properties$8(source, excluded) {
|
|
438
437
|
if (source == null) return {};
|
|
439
|
-
var target = _object_without_properties_loose$
|
|
438
|
+
var target = _object_without_properties_loose$8(source, excluded);
|
|
440
439
|
var key, i;
|
|
441
440
|
if (Object.getOwnPropertySymbols) {
|
|
442
441
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -449,7 +448,7 @@ function _object_without_properties$4(source, excluded) {
|
|
|
449
448
|
}
|
|
450
449
|
return target;
|
|
451
450
|
}
|
|
452
|
-
function _object_without_properties_loose$
|
|
451
|
+
function _object_without_properties_loose$8(source, excluded) {
|
|
453
452
|
if (source == null) return {};
|
|
454
453
|
var target = {};
|
|
455
454
|
var sourceKeys = Object.keys(source);
|
|
@@ -462,7 +461,7 @@ function _object_without_properties_loose$4(source, excluded) {
|
|
|
462
461
|
return target;
|
|
463
462
|
}
|
|
464
463
|
function DefaultInputComponent(_param) {
|
|
465
|
-
var helperMessage = _param.helperMessage, header = _param.header, props = _object_without_properties$
|
|
464
|
+
var helperMessage = _param.helperMessage, header = _param.header, props = _object_without_properties$8(_param, [
|
|
466
465
|
"helperMessage",
|
|
467
466
|
"header"
|
|
468
467
|
]);
|
|
@@ -509,9 +508,9 @@ function _object_spread$k(target) {
|
|
|
509
508
|
}
|
|
510
509
|
return target;
|
|
511
510
|
}
|
|
512
|
-
function _object_without_properties$
|
|
511
|
+
function _object_without_properties$7(source, excluded) {
|
|
513
512
|
if (source == null) return {};
|
|
514
|
-
var target = _object_without_properties_loose$
|
|
513
|
+
var target = _object_without_properties_loose$7(source, excluded);
|
|
515
514
|
var key, i;
|
|
516
515
|
if (Object.getOwnPropertySymbols) {
|
|
517
516
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -524,7 +523,7 @@ function _object_without_properties$3(source, excluded) {
|
|
|
524
523
|
}
|
|
525
524
|
return target;
|
|
526
525
|
}
|
|
527
|
-
function _object_without_properties_loose$
|
|
526
|
+
function _object_without_properties_loose$7(source, excluded) {
|
|
528
527
|
if (source == null) return {};
|
|
529
528
|
var target = {};
|
|
530
529
|
var sourceKeys = Object.keys(source);
|
|
@@ -537,7 +536,7 @@ function _object_without_properties_loose$3(source, excluded) {
|
|
|
537
536
|
return target;
|
|
538
537
|
}
|
|
539
538
|
function DefaultLinkComponent(_param) {
|
|
540
|
-
_param.href; var props = _object_without_properties$
|
|
539
|
+
_param.href; var props = _object_without_properties$7(_param, [
|
|
541
540
|
"href"
|
|
542
541
|
]);
|
|
543
542
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
@@ -674,9 +673,9 @@ function _object_spread_props$d(target, source) {
|
|
|
674
673
|
}
|
|
675
674
|
return target;
|
|
676
675
|
}
|
|
677
|
-
function _object_without_properties$
|
|
676
|
+
function _object_without_properties$6(source, excluded) {
|
|
678
677
|
if (source == null) return {};
|
|
679
|
-
var target = _object_without_properties_loose$
|
|
678
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
680
679
|
var key, i;
|
|
681
680
|
if (Object.getOwnPropertySymbols) {
|
|
682
681
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -689,7 +688,7 @@ function _object_without_properties$2(source, excluded) {
|
|
|
689
688
|
}
|
|
690
689
|
return target;
|
|
691
690
|
}
|
|
692
|
-
function _object_without_properties_loose$
|
|
691
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
693
692
|
if (source == null) return {};
|
|
694
693
|
var target = {};
|
|
695
694
|
var sourceKeys = Object.keys(source);
|
|
@@ -713,7 +712,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
713
712
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
714
713
|
}
|
|
715
714
|
function NodeMessage(_param) {
|
|
716
|
-
var message = _param.message, props = _object_without_properties$
|
|
715
|
+
var message = _param.message, props = _object_without_properties$6(_param, [
|
|
717
716
|
"message"
|
|
718
717
|
]);
|
|
719
718
|
var _useKratosContext = useKratosContext(), Message = _useKratosContext.components.Message;
|
|
@@ -1526,9 +1525,54 @@ function _object_spread_props$c(target, source) {
|
|
|
1526
1525
|
}
|
|
1527
1526
|
return target;
|
|
1528
1527
|
}
|
|
1528
|
+
function _object_without_properties$5(source, excluded) {
|
|
1529
|
+
if (source == null) return {};
|
|
1530
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
1531
|
+
var key, i;
|
|
1532
|
+
if (Object.getOwnPropertySymbols) {
|
|
1533
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1534
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1535
|
+
key = sourceSymbolKeys[i];
|
|
1536
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1537
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1538
|
+
target[key] = source[key];
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
return target;
|
|
1542
|
+
}
|
|
1543
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
1544
|
+
if (source == null) return {};
|
|
1545
|
+
var target = {};
|
|
1546
|
+
var sourceKeys = Object.keys(source);
|
|
1547
|
+
var key, i;
|
|
1548
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1549
|
+
key = sourceKeys[i];
|
|
1550
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1551
|
+
target[key] = source[key];
|
|
1552
|
+
}
|
|
1553
|
+
return target;
|
|
1554
|
+
}
|
|
1529
1555
|
function _sliced_to_array$4(arr, i) {
|
|
1530
1556
|
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$4();
|
|
1531
1557
|
}
|
|
1558
|
+
function _to_primitive$3(input, hint) {
|
|
1559
|
+
if (_type_of$3(input) !== "object" || input === null) return input;
|
|
1560
|
+
var prim = input[Symbol.toPrimitive];
|
|
1561
|
+
if (prim !== undefined) {
|
|
1562
|
+
var res = prim.call(input, hint);
|
|
1563
|
+
if (_type_of$3(res) !== "object") return res;
|
|
1564
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1565
|
+
}
|
|
1566
|
+
return (String )(input);
|
|
1567
|
+
}
|
|
1568
|
+
function _to_property_key$3(arg) {
|
|
1569
|
+
var key = _to_primitive$3(arg, "string");
|
|
1570
|
+
return _type_of$3(key) === "symbol" ? key : String(key);
|
|
1571
|
+
}
|
|
1572
|
+
function _type_of$3(obj) {
|
|
1573
|
+
"@swc/helpers - typeof";
|
|
1574
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1575
|
+
}
|
|
1532
1576
|
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
1533
1577
|
if (!o) return;
|
|
1534
1578
|
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
@@ -1542,19 +1586,17 @@ function useRecoveryFlow(param) {
|
|
|
1542
1586
|
var useHandleFlowError = useKratosContext().useHandleFlowError;
|
|
1543
1587
|
var _useState = _sliced_to_array$4(react.useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
1544
1588
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
1545
|
-
var
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
1557
|
-
});
|
|
1589
|
+
var _obj;
|
|
1590
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$f(_obj, "resetFlow", react.useCallback(function() {
|
|
1591
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$5(searchParams, [
|
|
1592
|
+
flowIdParameterName
|
|
1593
|
+
].map(_to_property_key$3));
|
|
1594
|
+
updateSearchParams(newParams);
|
|
1595
|
+
setFlow(undefined);
|
|
1596
|
+
}, [
|
|
1597
|
+
searchParams,
|
|
1598
|
+
updateSearchParams
|
|
1599
|
+
])), _define_property$f(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
1558
1600
|
react.useEffect(function() {
|
|
1559
1601
|
if (flow) return;
|
|
1560
1602
|
var controller = new AbortController();
|
|
@@ -1707,9 +1749,54 @@ function _object_spread_props$b(target, source) {
|
|
|
1707
1749
|
}
|
|
1708
1750
|
return target;
|
|
1709
1751
|
}
|
|
1752
|
+
function _object_without_properties$4(source, excluded) {
|
|
1753
|
+
if (source == null) return {};
|
|
1754
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
1755
|
+
var key, i;
|
|
1756
|
+
if (Object.getOwnPropertySymbols) {
|
|
1757
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1758
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1759
|
+
key = sourceSymbolKeys[i];
|
|
1760
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1761
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1762
|
+
target[key] = source[key];
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
return target;
|
|
1766
|
+
}
|
|
1767
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
1768
|
+
if (source == null) return {};
|
|
1769
|
+
var target = {};
|
|
1770
|
+
var sourceKeys = Object.keys(source);
|
|
1771
|
+
var key, i;
|
|
1772
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1773
|
+
key = sourceKeys[i];
|
|
1774
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1775
|
+
target[key] = source[key];
|
|
1776
|
+
}
|
|
1777
|
+
return target;
|
|
1778
|
+
}
|
|
1710
1779
|
function _sliced_to_array$3(arr, i) {
|
|
1711
1780
|
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$3();
|
|
1712
1781
|
}
|
|
1782
|
+
function _to_primitive$2(input, hint) {
|
|
1783
|
+
if (_type_of$2(input) !== "object" || input === null) return input;
|
|
1784
|
+
var prim = input[Symbol.toPrimitive];
|
|
1785
|
+
if (prim !== undefined) {
|
|
1786
|
+
var res = prim.call(input, hint);
|
|
1787
|
+
if (_type_of$2(res) !== "object") return res;
|
|
1788
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1789
|
+
}
|
|
1790
|
+
return (String )(input);
|
|
1791
|
+
}
|
|
1792
|
+
function _to_property_key$2(arg) {
|
|
1793
|
+
var key = _to_primitive$2(arg, "string");
|
|
1794
|
+
return _type_of$2(key) === "symbol" ? key : String(key);
|
|
1795
|
+
}
|
|
1796
|
+
function _type_of$2(obj) {
|
|
1797
|
+
"@swc/helpers - typeof";
|
|
1798
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1799
|
+
}
|
|
1713
1800
|
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
1714
1801
|
if (!o) return;
|
|
1715
1802
|
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
@@ -1723,18 +1810,16 @@ function useSettingsFlow(param) {
|
|
|
1723
1810
|
var useHandleFlowError = useKratosContext().useHandleFlowError;
|
|
1724
1811
|
var _useState = _sliced_to_array$3(react.useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
1725
1812
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
1726
|
-
var handleFlowError = useHandleFlowError({
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
])
|
|
1737
|
-
});
|
|
1813
|
+
var handleFlowError = useHandleFlowError(_define_property$e({}, "resetFlow", react.useCallback(function() {
|
|
1814
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$4(searchParams, [
|
|
1815
|
+
flowIdParameterName
|
|
1816
|
+
].map(_to_property_key$2));
|
|
1817
|
+
updateSearchParams(newParams);
|
|
1818
|
+
setFlow(undefined);
|
|
1819
|
+
}, [
|
|
1820
|
+
searchParams,
|
|
1821
|
+
updateSearchParams
|
|
1822
|
+
])));
|
|
1738
1823
|
react.useEffect(function() {
|
|
1739
1824
|
if (flow) return;
|
|
1740
1825
|
var controller = new AbortController();
|
|
@@ -1891,9 +1976,54 @@ function _object_spread_props$a(target, source) {
|
|
|
1891
1976
|
}
|
|
1892
1977
|
return target;
|
|
1893
1978
|
}
|
|
1979
|
+
function _object_without_properties$3(source, excluded) {
|
|
1980
|
+
if (source == null) return {};
|
|
1981
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
1982
|
+
var key, i;
|
|
1983
|
+
if (Object.getOwnPropertySymbols) {
|
|
1984
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1985
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1986
|
+
key = sourceSymbolKeys[i];
|
|
1987
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1988
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1989
|
+
target[key] = source[key];
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
return target;
|
|
1993
|
+
}
|
|
1994
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
1995
|
+
if (source == null) return {};
|
|
1996
|
+
var target = {};
|
|
1997
|
+
var sourceKeys = Object.keys(source);
|
|
1998
|
+
var key, i;
|
|
1999
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
2000
|
+
key = sourceKeys[i];
|
|
2001
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2002
|
+
target[key] = source[key];
|
|
2003
|
+
}
|
|
2004
|
+
return target;
|
|
2005
|
+
}
|
|
1894
2006
|
function _sliced_to_array$2(arr, i) {
|
|
1895
2007
|
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$2();
|
|
1896
2008
|
}
|
|
2009
|
+
function _to_primitive$1(input, hint) {
|
|
2010
|
+
if (_type_of$1(input) !== "object" || input === null) return input;
|
|
2011
|
+
var prim = input[Symbol.toPrimitive];
|
|
2012
|
+
if (prim !== undefined) {
|
|
2013
|
+
var res = prim.call(input, hint);
|
|
2014
|
+
if (_type_of$1(res) !== "object") return res;
|
|
2015
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2016
|
+
}
|
|
2017
|
+
return (String )(input);
|
|
2018
|
+
}
|
|
2019
|
+
function _to_property_key$1(arg) {
|
|
2020
|
+
var key = _to_primitive$1(arg, "string");
|
|
2021
|
+
return _type_of$1(key) === "symbol" ? key : String(key);
|
|
2022
|
+
}
|
|
2023
|
+
function _type_of$1(obj) {
|
|
2024
|
+
"@swc/helpers - typeof";
|
|
2025
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2026
|
+
}
|
|
1897
2027
|
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
1898
2028
|
if (!o) return;
|
|
1899
2029
|
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
@@ -1912,20 +2042,18 @@ function useLoginFlow(param) {
|
|
|
1912
2042
|
}, [
|
|
1913
2043
|
authorizationAssuranceLevel
|
|
1914
2044
|
]);
|
|
1915
|
-
var
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
1928
|
-
});
|
|
2045
|
+
var _obj;
|
|
2046
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$d(_obj, "resetFlow", react.useCallback(function() {
|
|
2047
|
+
searchParams[flowIdParameterName]; searchParams[aalParameterName]; var newParams = _object_without_properties$3(searchParams, [
|
|
2048
|
+
flowIdParameterName,
|
|
2049
|
+
aalParameterName
|
|
2050
|
+
].map(_to_property_key$1));
|
|
2051
|
+
updateSearchParams(newParams);
|
|
2052
|
+
setFlow(undefined);
|
|
2053
|
+
}, [
|
|
2054
|
+
searchParams,
|
|
2055
|
+
updateSearchParams
|
|
2056
|
+
])), _define_property$d(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
1929
2057
|
react.useEffect(function() {
|
|
1930
2058
|
if (flow) return;
|
|
1931
2059
|
var controller = new AbortController();
|
|
@@ -2082,9 +2210,54 @@ function _object_spread_props$9(target, source) {
|
|
|
2082
2210
|
}
|
|
2083
2211
|
return target;
|
|
2084
2212
|
}
|
|
2213
|
+
function _object_without_properties$2(source, excluded) {
|
|
2214
|
+
if (source == null) return {};
|
|
2215
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
2216
|
+
var key, i;
|
|
2217
|
+
if (Object.getOwnPropertySymbols) {
|
|
2218
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
2219
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
2220
|
+
key = sourceSymbolKeys[i];
|
|
2221
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2222
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
2223
|
+
target[key] = source[key];
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
return target;
|
|
2227
|
+
}
|
|
2228
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
2229
|
+
if (source == null) return {};
|
|
2230
|
+
var target = {};
|
|
2231
|
+
var sourceKeys = Object.keys(source);
|
|
2232
|
+
var key, i;
|
|
2233
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
2234
|
+
key = sourceKeys[i];
|
|
2235
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2236
|
+
target[key] = source[key];
|
|
2237
|
+
}
|
|
2238
|
+
return target;
|
|
2239
|
+
}
|
|
2085
2240
|
function _sliced_to_array$1(arr, i) {
|
|
2086
2241
|
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
|
|
2087
2242
|
}
|
|
2243
|
+
function _to_primitive(input, hint) {
|
|
2244
|
+
if (_type_of(input) !== "object" || input === null) return input;
|
|
2245
|
+
var prim = input[Symbol.toPrimitive];
|
|
2246
|
+
if (prim !== undefined) {
|
|
2247
|
+
var res = prim.call(input, hint);
|
|
2248
|
+
if (_type_of(res) !== "object") return res;
|
|
2249
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2250
|
+
}
|
|
2251
|
+
return (String )(input);
|
|
2252
|
+
}
|
|
2253
|
+
function _to_property_key(arg) {
|
|
2254
|
+
var key = _to_primitive(arg, "string");
|
|
2255
|
+
return _type_of(key) === "symbol" ? key : String(key);
|
|
2256
|
+
}
|
|
2257
|
+
function _type_of(obj) {
|
|
2258
|
+
"@swc/helpers - typeof";
|
|
2259
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2260
|
+
}
|
|
2088
2261
|
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
2089
2262
|
if (!o) return;
|
|
2090
2263
|
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
@@ -2099,19 +2272,17 @@ function useRegisterFlow(param) {
|
|
|
2099
2272
|
var _useState = _sliced_to_array$1(react.useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
2100
2273
|
var _useState1 = _sliced_to_array$1(react.useState(false), 2), isRegistered = _useState1[0], setIsRegistered = _useState1[1];
|
|
2101
2274
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
2102
|
-
var
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
2114
|
-
});
|
|
2275
|
+
var _obj;
|
|
2276
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$c(_obj, "resetFlow", react.useCallback(function() {
|
|
2277
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$2(searchParams, [
|
|
2278
|
+
flowIdParameterName
|
|
2279
|
+
].map(_to_property_key));
|
|
2280
|
+
updateSearchParams(newParams);
|
|
2281
|
+
setFlow(undefined);
|
|
2282
|
+
}, [
|
|
2283
|
+
searchParams,
|
|
2284
|
+
updateSearchParams
|
|
2285
|
+
])), _define_property$c(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
2115
2286
|
react.useEffect(function() {
|
|
2116
2287
|
if (flow) return;
|
|
2117
2288
|
var controller = new AbortController();
|
|
@@ -2532,7 +2703,7 @@ function useLogoutFlow(param) {
|
|
|
2532
2703
|
}
|
|
2533
2704
|
|
|
2534
2705
|
function getNodeInputType(attr) {
|
|
2535
|
-
return
|
|
2706
|
+
return attr && typeof attr === "object" && "type" in attr && attr.type && typeof attr.type === "string" ? attr.type : "";
|
|
2536
2707
|
}
|
|
2537
2708
|
|
|
2538
2709
|
/**
|
|
@@ -2577,7 +2748,8 @@ function getNodeInputType(attr) {
|
|
|
2577
2748
|
});
|
|
2578
2749
|
};
|
|
2579
2750
|
function search(s) {
|
|
2580
|
-
|
|
2751
|
+
if (s !== undefined && typeof s === "string") return s.split(",");
|
|
2752
|
+
return s !== null && s !== void 0 ? s : [];
|
|
2581
2753
|
}
|
|
2582
2754
|
|
|
2583
2755
|
var getNodeLabel = function(node) {
|
package/index.esm.js
CHANGED
|
@@ -3,7 +3,6 @@ import axios from 'axios';
|
|
|
3
3
|
import { createContext, useContext, useMemo, useState, useCallback, useEffect } from 'react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { ReplaySubject, map, shareReplay, Subject, switchMap, from, catchError, of } from 'rxjs';
|
|
6
|
-
import { omit, isObject, isString } from 'lodash';
|
|
7
6
|
import yn from 'yn';
|
|
8
7
|
|
|
9
8
|
function createKratosClient(configuration) {
|
|
@@ -205,9 +204,9 @@ function _object_spread_props$f(target, source) {
|
|
|
205
204
|
}
|
|
206
205
|
return target;
|
|
207
206
|
}
|
|
208
|
-
function _object_without_properties$
|
|
207
|
+
function _object_without_properties$b(source, excluded) {
|
|
209
208
|
if (source == null) return {};
|
|
210
|
-
var target = _object_without_properties_loose$
|
|
209
|
+
var target = _object_without_properties_loose$b(source, excluded);
|
|
211
210
|
var key, i;
|
|
212
211
|
if (Object.getOwnPropertySymbols) {
|
|
213
212
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -220,7 +219,7 @@ function _object_without_properties$7(source, excluded) {
|
|
|
220
219
|
}
|
|
221
220
|
return target;
|
|
222
221
|
}
|
|
223
|
-
function _object_without_properties_loose$
|
|
222
|
+
function _object_without_properties_loose$b(source, excluded) {
|
|
224
223
|
if (source == null) return {};
|
|
225
224
|
var target = {};
|
|
226
225
|
var sourceKeys = Object.keys(source);
|
|
@@ -233,7 +232,7 @@ function _object_without_properties_loose$7(source, excluded) {
|
|
|
233
232
|
return target;
|
|
234
233
|
}
|
|
235
234
|
function DefaultButtonComponent(_param) {
|
|
236
|
-
var header = _param.header, props = _object_without_properties$
|
|
235
|
+
var header = _param.header, props = _object_without_properties$b(_param, [
|
|
237
236
|
"header"
|
|
238
237
|
]);
|
|
239
238
|
return /*#__PURE__*/ jsx("button", _object_spread_props$f(_object_spread$o({}, props), {
|
|
@@ -288,9 +287,9 @@ function _object_spread_props$e(target, source) {
|
|
|
288
287
|
}
|
|
289
288
|
return target;
|
|
290
289
|
}
|
|
291
|
-
function _object_without_properties$
|
|
290
|
+
function _object_without_properties$a(source, excluded) {
|
|
292
291
|
if (source == null) return {};
|
|
293
|
-
var target = _object_without_properties_loose$
|
|
292
|
+
var target = _object_without_properties_loose$a(source, excluded);
|
|
294
293
|
var key, i;
|
|
295
294
|
if (Object.getOwnPropertySymbols) {
|
|
296
295
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -303,7 +302,7 @@ function _object_without_properties$6(source, excluded) {
|
|
|
303
302
|
}
|
|
304
303
|
return target;
|
|
305
304
|
}
|
|
306
|
-
function _object_without_properties_loose$
|
|
305
|
+
function _object_without_properties_loose$a(source, excluded) {
|
|
307
306
|
if (source == null) return {};
|
|
308
307
|
var target = {};
|
|
309
308
|
var sourceKeys = Object.keys(source);
|
|
@@ -316,7 +315,7 @@ function _object_without_properties_loose$6(source, excluded) {
|
|
|
316
315
|
return target;
|
|
317
316
|
}
|
|
318
317
|
function DefaultCheckboxComponent(_param) {
|
|
319
|
-
var label = _param.label, helperMessage = _param.helperMessage, props = _object_without_properties$
|
|
318
|
+
var label = _param.label, helperMessage = _param.helperMessage, props = _object_without_properties$a(_param, [
|
|
320
319
|
"label",
|
|
321
320
|
"helperMessage"
|
|
322
321
|
]);
|
|
@@ -363,9 +362,9 @@ function _object_spread$m(target) {
|
|
|
363
362
|
}
|
|
364
363
|
return target;
|
|
365
364
|
}
|
|
366
|
-
function _object_without_properties$
|
|
365
|
+
function _object_without_properties$9(source, excluded) {
|
|
367
366
|
if (source == null) return {};
|
|
368
|
-
var target = _object_without_properties_loose$
|
|
367
|
+
var target = _object_without_properties_loose$9(source, excluded);
|
|
369
368
|
var key, i;
|
|
370
369
|
if (Object.getOwnPropertySymbols) {
|
|
371
370
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -378,7 +377,7 @@ function _object_without_properties$5(source, excluded) {
|
|
|
378
377
|
}
|
|
379
378
|
return target;
|
|
380
379
|
}
|
|
381
|
-
function _object_without_properties_loose$
|
|
380
|
+
function _object_without_properties_loose$9(source, excluded) {
|
|
382
381
|
if (source == null) return {};
|
|
383
382
|
var target = {};
|
|
384
383
|
var sourceKeys = Object.keys(source);
|
|
@@ -391,7 +390,7 @@ function _object_without_properties_loose$5(source, excluded) {
|
|
|
391
390
|
return target;
|
|
392
391
|
}
|
|
393
392
|
function DefaultImageComponent(_param) {
|
|
394
|
-
var header = _param.header, props = _object_without_properties$
|
|
393
|
+
var header = _param.header, props = _object_without_properties$9(_param, [
|
|
395
394
|
"header"
|
|
396
395
|
]);
|
|
397
396
|
return /*#__PURE__*/ jsxs("div", {
|
|
@@ -432,9 +431,9 @@ function _object_spread$l(target) {
|
|
|
432
431
|
}
|
|
433
432
|
return target;
|
|
434
433
|
}
|
|
435
|
-
function _object_without_properties$
|
|
434
|
+
function _object_without_properties$8(source, excluded) {
|
|
436
435
|
if (source == null) return {};
|
|
437
|
-
var target = _object_without_properties_loose$
|
|
436
|
+
var target = _object_without_properties_loose$8(source, excluded);
|
|
438
437
|
var key, i;
|
|
439
438
|
if (Object.getOwnPropertySymbols) {
|
|
440
439
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -447,7 +446,7 @@ function _object_without_properties$4(source, excluded) {
|
|
|
447
446
|
}
|
|
448
447
|
return target;
|
|
449
448
|
}
|
|
450
|
-
function _object_without_properties_loose$
|
|
449
|
+
function _object_without_properties_loose$8(source, excluded) {
|
|
451
450
|
if (source == null) return {};
|
|
452
451
|
var target = {};
|
|
453
452
|
var sourceKeys = Object.keys(source);
|
|
@@ -460,7 +459,7 @@ function _object_without_properties_loose$4(source, excluded) {
|
|
|
460
459
|
return target;
|
|
461
460
|
}
|
|
462
461
|
function DefaultInputComponent(_param) {
|
|
463
|
-
var helperMessage = _param.helperMessage, header = _param.header, props = _object_without_properties$
|
|
462
|
+
var helperMessage = _param.helperMessage, header = _param.header, props = _object_without_properties$8(_param, [
|
|
464
463
|
"helperMessage",
|
|
465
464
|
"header"
|
|
466
465
|
]);
|
|
@@ -507,9 +506,9 @@ function _object_spread$k(target) {
|
|
|
507
506
|
}
|
|
508
507
|
return target;
|
|
509
508
|
}
|
|
510
|
-
function _object_without_properties$
|
|
509
|
+
function _object_without_properties$7(source, excluded) {
|
|
511
510
|
if (source == null) return {};
|
|
512
|
-
var target = _object_without_properties_loose$
|
|
511
|
+
var target = _object_without_properties_loose$7(source, excluded);
|
|
513
512
|
var key, i;
|
|
514
513
|
if (Object.getOwnPropertySymbols) {
|
|
515
514
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -522,7 +521,7 @@ function _object_without_properties$3(source, excluded) {
|
|
|
522
521
|
}
|
|
523
522
|
return target;
|
|
524
523
|
}
|
|
525
|
-
function _object_without_properties_loose$
|
|
524
|
+
function _object_without_properties_loose$7(source, excluded) {
|
|
526
525
|
if (source == null) return {};
|
|
527
526
|
var target = {};
|
|
528
527
|
var sourceKeys = Object.keys(source);
|
|
@@ -535,7 +534,7 @@ function _object_without_properties_loose$3(source, excluded) {
|
|
|
535
534
|
return target;
|
|
536
535
|
}
|
|
537
536
|
function DefaultLinkComponent(_param) {
|
|
538
|
-
_param.href; var props = _object_without_properties$
|
|
537
|
+
_param.href; var props = _object_without_properties$7(_param, [
|
|
539
538
|
"href"
|
|
540
539
|
]);
|
|
541
540
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
@@ -672,9 +671,9 @@ function _object_spread_props$d(target, source) {
|
|
|
672
671
|
}
|
|
673
672
|
return target;
|
|
674
673
|
}
|
|
675
|
-
function _object_without_properties$
|
|
674
|
+
function _object_without_properties$6(source, excluded) {
|
|
676
675
|
if (source == null) return {};
|
|
677
|
-
var target = _object_without_properties_loose$
|
|
676
|
+
var target = _object_without_properties_loose$6(source, excluded);
|
|
678
677
|
var key, i;
|
|
679
678
|
if (Object.getOwnPropertySymbols) {
|
|
680
679
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -687,7 +686,7 @@ function _object_without_properties$2(source, excluded) {
|
|
|
687
686
|
}
|
|
688
687
|
return target;
|
|
689
688
|
}
|
|
690
|
-
function _object_without_properties_loose$
|
|
689
|
+
function _object_without_properties_loose$6(source, excluded) {
|
|
691
690
|
if (source == null) return {};
|
|
692
691
|
var target = {};
|
|
693
692
|
var sourceKeys = Object.keys(source);
|
|
@@ -711,7 +710,7 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
711
710
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
712
711
|
}
|
|
713
712
|
function NodeMessage(_param) {
|
|
714
|
-
var message = _param.message, props = _object_without_properties$
|
|
713
|
+
var message = _param.message, props = _object_without_properties$6(_param, [
|
|
715
714
|
"message"
|
|
716
715
|
]);
|
|
717
716
|
var _useKratosContext = useKratosContext(), Message = _useKratosContext.components.Message;
|
|
@@ -1524,9 +1523,54 @@ function _object_spread_props$c(target, source) {
|
|
|
1524
1523
|
}
|
|
1525
1524
|
return target;
|
|
1526
1525
|
}
|
|
1526
|
+
function _object_without_properties$5(source, excluded) {
|
|
1527
|
+
if (source == null) return {};
|
|
1528
|
+
var target = _object_without_properties_loose$5(source, excluded);
|
|
1529
|
+
var key, i;
|
|
1530
|
+
if (Object.getOwnPropertySymbols) {
|
|
1531
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1532
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1533
|
+
key = sourceSymbolKeys[i];
|
|
1534
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1535
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1536
|
+
target[key] = source[key];
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
return target;
|
|
1540
|
+
}
|
|
1541
|
+
function _object_without_properties_loose$5(source, excluded) {
|
|
1542
|
+
if (source == null) return {};
|
|
1543
|
+
var target = {};
|
|
1544
|
+
var sourceKeys = Object.keys(source);
|
|
1545
|
+
var key, i;
|
|
1546
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1547
|
+
key = sourceKeys[i];
|
|
1548
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1549
|
+
target[key] = source[key];
|
|
1550
|
+
}
|
|
1551
|
+
return target;
|
|
1552
|
+
}
|
|
1527
1553
|
function _sliced_to_array$4(arr, i) {
|
|
1528
1554
|
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$4();
|
|
1529
1555
|
}
|
|
1556
|
+
function _to_primitive$3(input, hint) {
|
|
1557
|
+
if (_type_of$3(input) !== "object" || input === null) return input;
|
|
1558
|
+
var prim = input[Symbol.toPrimitive];
|
|
1559
|
+
if (prim !== undefined) {
|
|
1560
|
+
var res = prim.call(input, hint);
|
|
1561
|
+
if (_type_of$3(res) !== "object") return res;
|
|
1562
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1563
|
+
}
|
|
1564
|
+
return (String )(input);
|
|
1565
|
+
}
|
|
1566
|
+
function _to_property_key$3(arg) {
|
|
1567
|
+
var key = _to_primitive$3(arg, "string");
|
|
1568
|
+
return _type_of$3(key) === "symbol" ? key : String(key);
|
|
1569
|
+
}
|
|
1570
|
+
function _type_of$3(obj) {
|
|
1571
|
+
"@swc/helpers - typeof";
|
|
1572
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1573
|
+
}
|
|
1530
1574
|
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
1531
1575
|
if (!o) return;
|
|
1532
1576
|
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
@@ -1540,19 +1584,17 @@ function useRecoveryFlow(param) {
|
|
|
1540
1584
|
var useHandleFlowError = useKratosContext().useHandleFlowError;
|
|
1541
1585
|
var _useState = _sliced_to_array$4(useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
1542
1586
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
1543
|
-
var
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
1555
|
-
});
|
|
1587
|
+
var _obj;
|
|
1588
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$f(_obj, "resetFlow", useCallback(function() {
|
|
1589
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$5(searchParams, [
|
|
1590
|
+
flowIdParameterName
|
|
1591
|
+
].map(_to_property_key$3));
|
|
1592
|
+
updateSearchParams(newParams);
|
|
1593
|
+
setFlow(undefined);
|
|
1594
|
+
}, [
|
|
1595
|
+
searchParams,
|
|
1596
|
+
updateSearchParams
|
|
1597
|
+
])), _define_property$f(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
1556
1598
|
useEffect(function() {
|
|
1557
1599
|
if (flow) return;
|
|
1558
1600
|
var controller = new AbortController();
|
|
@@ -1705,9 +1747,54 @@ function _object_spread_props$b(target, source) {
|
|
|
1705
1747
|
}
|
|
1706
1748
|
return target;
|
|
1707
1749
|
}
|
|
1750
|
+
function _object_without_properties$4(source, excluded) {
|
|
1751
|
+
if (source == null) return {};
|
|
1752
|
+
var target = _object_without_properties_loose$4(source, excluded);
|
|
1753
|
+
var key, i;
|
|
1754
|
+
if (Object.getOwnPropertySymbols) {
|
|
1755
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1756
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1757
|
+
key = sourceSymbolKeys[i];
|
|
1758
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1759
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1760
|
+
target[key] = source[key];
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
return target;
|
|
1764
|
+
}
|
|
1765
|
+
function _object_without_properties_loose$4(source, excluded) {
|
|
1766
|
+
if (source == null) return {};
|
|
1767
|
+
var target = {};
|
|
1768
|
+
var sourceKeys = Object.keys(source);
|
|
1769
|
+
var key, i;
|
|
1770
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1771
|
+
key = sourceKeys[i];
|
|
1772
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1773
|
+
target[key] = source[key];
|
|
1774
|
+
}
|
|
1775
|
+
return target;
|
|
1776
|
+
}
|
|
1708
1777
|
function _sliced_to_array$3(arr, i) {
|
|
1709
1778
|
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$3();
|
|
1710
1779
|
}
|
|
1780
|
+
function _to_primitive$2(input, hint) {
|
|
1781
|
+
if (_type_of$2(input) !== "object" || input === null) return input;
|
|
1782
|
+
var prim = input[Symbol.toPrimitive];
|
|
1783
|
+
if (prim !== undefined) {
|
|
1784
|
+
var res = prim.call(input, hint);
|
|
1785
|
+
if (_type_of$2(res) !== "object") return res;
|
|
1786
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1787
|
+
}
|
|
1788
|
+
return (String )(input);
|
|
1789
|
+
}
|
|
1790
|
+
function _to_property_key$2(arg) {
|
|
1791
|
+
var key = _to_primitive$2(arg, "string");
|
|
1792
|
+
return _type_of$2(key) === "symbol" ? key : String(key);
|
|
1793
|
+
}
|
|
1794
|
+
function _type_of$2(obj) {
|
|
1795
|
+
"@swc/helpers - typeof";
|
|
1796
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1797
|
+
}
|
|
1711
1798
|
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
1712
1799
|
if (!o) return;
|
|
1713
1800
|
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
@@ -1721,18 +1808,16 @@ function useSettingsFlow(param) {
|
|
|
1721
1808
|
var useHandleFlowError = useKratosContext().useHandleFlowError;
|
|
1722
1809
|
var _useState = _sliced_to_array$3(useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
1723
1810
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
1724
|
-
var handleFlowError = useHandleFlowError({
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
])
|
|
1735
|
-
});
|
|
1811
|
+
var handleFlowError = useHandleFlowError(_define_property$e({}, "resetFlow", useCallback(function() {
|
|
1812
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$4(searchParams, [
|
|
1813
|
+
flowIdParameterName
|
|
1814
|
+
].map(_to_property_key$2));
|
|
1815
|
+
updateSearchParams(newParams);
|
|
1816
|
+
setFlow(undefined);
|
|
1817
|
+
}, [
|
|
1818
|
+
searchParams,
|
|
1819
|
+
updateSearchParams
|
|
1820
|
+
])));
|
|
1736
1821
|
useEffect(function() {
|
|
1737
1822
|
if (flow) return;
|
|
1738
1823
|
var controller = new AbortController();
|
|
@@ -1889,9 +1974,54 @@ function _object_spread_props$a(target, source) {
|
|
|
1889
1974
|
}
|
|
1890
1975
|
return target;
|
|
1891
1976
|
}
|
|
1977
|
+
function _object_without_properties$3(source, excluded) {
|
|
1978
|
+
if (source == null) return {};
|
|
1979
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
1980
|
+
var key, i;
|
|
1981
|
+
if (Object.getOwnPropertySymbols) {
|
|
1982
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1983
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
1984
|
+
key = sourceSymbolKeys[i];
|
|
1985
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1986
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1987
|
+
target[key] = source[key];
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
return target;
|
|
1991
|
+
}
|
|
1992
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
1993
|
+
if (source == null) return {};
|
|
1994
|
+
var target = {};
|
|
1995
|
+
var sourceKeys = Object.keys(source);
|
|
1996
|
+
var key, i;
|
|
1997
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
1998
|
+
key = sourceKeys[i];
|
|
1999
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2000
|
+
target[key] = source[key];
|
|
2001
|
+
}
|
|
2002
|
+
return target;
|
|
2003
|
+
}
|
|
1892
2004
|
function _sliced_to_array$2(arr, i) {
|
|
1893
2005
|
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$2();
|
|
1894
2006
|
}
|
|
2007
|
+
function _to_primitive$1(input, hint) {
|
|
2008
|
+
if (_type_of$1(input) !== "object" || input === null) return input;
|
|
2009
|
+
var prim = input[Symbol.toPrimitive];
|
|
2010
|
+
if (prim !== undefined) {
|
|
2011
|
+
var res = prim.call(input, hint);
|
|
2012
|
+
if (_type_of$1(res) !== "object") return res;
|
|
2013
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2014
|
+
}
|
|
2015
|
+
return (String )(input);
|
|
2016
|
+
}
|
|
2017
|
+
function _to_property_key$1(arg) {
|
|
2018
|
+
var key = _to_primitive$1(arg, "string");
|
|
2019
|
+
return _type_of$1(key) === "symbol" ? key : String(key);
|
|
2020
|
+
}
|
|
2021
|
+
function _type_of$1(obj) {
|
|
2022
|
+
"@swc/helpers - typeof";
|
|
2023
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2024
|
+
}
|
|
1895
2025
|
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
1896
2026
|
if (!o) return;
|
|
1897
2027
|
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
@@ -1910,20 +2040,18 @@ function useLoginFlow(param) {
|
|
|
1910
2040
|
}, [
|
|
1911
2041
|
authorizationAssuranceLevel
|
|
1912
2042
|
]);
|
|
1913
|
-
var
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
1926
|
-
});
|
|
2043
|
+
var _obj;
|
|
2044
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$d(_obj, "resetFlow", useCallback(function() {
|
|
2045
|
+
searchParams[flowIdParameterName]; searchParams[aalParameterName]; var newParams = _object_without_properties$3(searchParams, [
|
|
2046
|
+
flowIdParameterName,
|
|
2047
|
+
aalParameterName
|
|
2048
|
+
].map(_to_property_key$1));
|
|
2049
|
+
updateSearchParams(newParams);
|
|
2050
|
+
setFlow(undefined);
|
|
2051
|
+
}, [
|
|
2052
|
+
searchParams,
|
|
2053
|
+
updateSearchParams
|
|
2054
|
+
])), _define_property$d(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
1927
2055
|
useEffect(function() {
|
|
1928
2056
|
if (flow) return;
|
|
1929
2057
|
var controller = new AbortController();
|
|
@@ -2080,9 +2208,54 @@ function _object_spread_props$9(target, source) {
|
|
|
2080
2208
|
}
|
|
2081
2209
|
return target;
|
|
2082
2210
|
}
|
|
2211
|
+
function _object_without_properties$2(source, excluded) {
|
|
2212
|
+
if (source == null) return {};
|
|
2213
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
2214
|
+
var key, i;
|
|
2215
|
+
if (Object.getOwnPropertySymbols) {
|
|
2216
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
2217
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
2218
|
+
key = sourceSymbolKeys[i];
|
|
2219
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2220
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
2221
|
+
target[key] = source[key];
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
return target;
|
|
2225
|
+
}
|
|
2226
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
2227
|
+
if (source == null) return {};
|
|
2228
|
+
var target = {};
|
|
2229
|
+
var sourceKeys = Object.keys(source);
|
|
2230
|
+
var key, i;
|
|
2231
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
2232
|
+
key = sourceKeys[i];
|
|
2233
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2234
|
+
target[key] = source[key];
|
|
2235
|
+
}
|
|
2236
|
+
return target;
|
|
2237
|
+
}
|
|
2083
2238
|
function _sliced_to_array$1(arr, i) {
|
|
2084
2239
|
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
|
|
2085
2240
|
}
|
|
2241
|
+
function _to_primitive(input, hint) {
|
|
2242
|
+
if (_type_of(input) !== "object" || input === null) return input;
|
|
2243
|
+
var prim = input[Symbol.toPrimitive];
|
|
2244
|
+
if (prim !== undefined) {
|
|
2245
|
+
var res = prim.call(input, hint);
|
|
2246
|
+
if (_type_of(res) !== "object") return res;
|
|
2247
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2248
|
+
}
|
|
2249
|
+
return (String )(input);
|
|
2250
|
+
}
|
|
2251
|
+
function _to_property_key(arg) {
|
|
2252
|
+
var key = _to_primitive(arg, "string");
|
|
2253
|
+
return _type_of(key) === "symbol" ? key : String(key);
|
|
2254
|
+
}
|
|
2255
|
+
function _type_of(obj) {
|
|
2256
|
+
"@swc/helpers - typeof";
|
|
2257
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2258
|
+
}
|
|
2086
2259
|
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
2087
2260
|
if (!o) return;
|
|
2088
2261
|
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
@@ -2097,19 +2270,17 @@ function useRegisterFlow(param) {
|
|
|
2097
2270
|
var _useState = _sliced_to_array$1(useState(), 2), flow = _useState[0], setFlow = _useState[1];
|
|
2098
2271
|
var _useState1 = _sliced_to_array$1(useState(false), 2), isRegistered = _useState1[0], setIsRegistered = _useState1[1];
|
|
2099
2272
|
var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
|
|
2100
|
-
var
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
onSessionAlreadyAvailable: onSessionAlreadyAvailable
|
|
2112
|
-
});
|
|
2273
|
+
var _obj;
|
|
2274
|
+
var handleFlowError = useHandleFlowError((_obj = {}, _define_property$c(_obj, "resetFlow", useCallback(function() {
|
|
2275
|
+
searchParams[flowIdParameterName]; var newParams = _object_without_properties$2(searchParams, [
|
|
2276
|
+
flowIdParameterName
|
|
2277
|
+
].map(_to_property_key));
|
|
2278
|
+
updateSearchParams(newParams);
|
|
2279
|
+
setFlow(undefined);
|
|
2280
|
+
}, [
|
|
2281
|
+
searchParams,
|
|
2282
|
+
updateSearchParams
|
|
2283
|
+
])), _define_property$c(_obj, "onSessionAlreadyAvailable", onSessionAlreadyAvailable), _obj));
|
|
2113
2284
|
useEffect(function() {
|
|
2114
2285
|
if (flow) return;
|
|
2115
2286
|
var controller = new AbortController();
|
|
@@ -2530,7 +2701,7 @@ function useLogoutFlow(param) {
|
|
|
2530
2701
|
}
|
|
2531
2702
|
|
|
2532
2703
|
function getNodeInputType(attr) {
|
|
2533
|
-
return
|
|
2704
|
+
return attr && typeof attr === "object" && "type" in attr && attr.type && typeof attr.type === "string" ? attr.type : "";
|
|
2534
2705
|
}
|
|
2535
2706
|
|
|
2536
2707
|
/**
|
|
@@ -2575,7 +2746,8 @@ function getNodeInputType(attr) {
|
|
|
2575
2746
|
});
|
|
2576
2747
|
};
|
|
2577
2748
|
function search(s) {
|
|
2578
|
-
|
|
2749
|
+
if (s !== undefined && typeof s === "string") return s.split(",");
|
|
2750
|
+
return s !== null && s !== void 0 ? s : [];
|
|
2579
2751
|
}
|
|
2580
2752
|
|
|
2581
2753
|
var getNodeLabel = function(node) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/kratos",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ory/client": ">=1.14.3",
|
|
7
7
|
"axios": ">=1.6.0",
|
|
8
|
-
"lodash": ">=4.0.0",
|
|
9
8
|
"react-intl": ">=6.0.0",
|
|
10
9
|
"rxjs": ">=7.0.0",
|
|
11
10
|
"yn": ">=5.0.0"
|