@nxgt/material 2.16.0 → 2.18.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 +96 -0
- package/README.md +9 -4
- package/dist/{_Uint8Array-CjLUgWgf.js → _Uint8Array-C7apDrb7.js} +1 -1
- package/dist/{_overRest-HfSwfmH1.js → _overRest-CCAbV-eT.js} +1 -1
- package/dist/async-slice-Cuekts5f.js +459 -0
- package/dist/{blockDiagram-BEXU5L5S-DSNWJcbS.js → blockDiagram-BEXU5L5S-B63zbmDg.js} +2 -2
- package/dist/{chunk-3FUC2YCW-CcZvlyvW.js → chunk-3FUC2YCW-CE9T5wr6.js} +2 -2
- package/dist/{chunk-7M6MHVWA-21OdxoBq.js → chunk-7M6MHVWA-BjaezAbj.js} +1 -1
- package/dist/{chunk-GNY47TPC-BZdgq2LF.js → chunk-GNY47TPC-DjnciAsL.js} +4 -4
- package/dist/{chunk-NETBCI7D-CAgvlb0w.js → chunk-NETBCI7D-CxQxB74H.js} +1 -1
- package/dist/{chunk-Z7XXMR3K-BSXPgLtN.js → chunk-Z7XXMR3K-BBrCUBwp.js} +1 -1
- package/dist/{classDiagram-v2-NBCMYWYE-D_BHO1iT.js → classDiagram-v2-NBCMYWYE-FeyVcYCs.js} +2 -2
- package/dist/components/components.css +1 -0
- package/dist/components/print-only.css +44 -0
- package/dist/{components-Bkdm6jn6.js → components-CsPEBzNF.js} +59383 -58881
- package/dist/components.js +6 -6
- package/dist/{dagre-6A5THRUB-CsnftAPx.js → dagre-6A5THRUB-BjO_Ytfq.js} +64 -64
- package/dist/{diagram-22UHCM2B-D0yPa8vo.js → diagram-22UHCM2B-BBKawlhX.js} +2 -2
- package/dist/{diagram-3UASUU5V-f8LIX2sj.js → diagram-3UASUU5V-CKj_37_k.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{elk-276RUBZZ-DI8bDQAL.js → elk-276RUBZZ-DmkPwZLS.js} +3 -3
- package/dist/{erDiagram-OPXOYQCR-BGHFtxmB.js → erDiagram-OPXOYQCR-Dja943M3.js} +2 -2
- package/dist/{field-blur-C-5K6U1F.js → field-blur-DNHXOY0J.js} +3 -3
- package/dist/{flowDiagram-KWPJA3E3-CnFLTW-3.js → flowDiagram-KWPJA3E3-jmbjSQZS.js} +3 -3
- package/dist/{ganttDiagram-FUAMR5RP-B5uyVKE4.js → ganttDiagram-FUAMR5RP-BONNpqJt.js} +1 -1
- package/dist/{graphlib-BqO9Go2u.js → graphlib-DxjKaXeR.js} +42 -42
- package/dist/hooks.js +38 -26
- package/dist/{i18n-provider-C3SlA4J0.js → i18n-provider-Dv9ZSmgO.js} +1 -1
- package/dist/i18n.js +6 -6
- package/dist/{isArrayLikeObject-83P1fvEs.js → isArrayLikeObject-H8k6W51O.js} +3 -3
- package/dist/{isEmpty-C2z3Hypl.js → isEmpty-B0Bavg-e.js} +9 -9
- package/dist/{journeyDiagram-ZHPQQLJL-CKtbGcVT.js → journeyDiagram-ZHPQQLJL-C_omtnEz.js} +1 -1
- package/dist/lib/components/ui/actions/copy-button/use-copy-status.d.ts +13 -0
- package/dist/lib/components/ui/display/enrolment-secret/enrolment-secret.d.ts +30 -0
- package/dist/lib/components/ui/display/enrolment-secret/index.d.ts +2 -0
- package/dist/lib/components/ui/display/enrolment-secret/use-enrolment-secret-labels.d.ts +11 -0
- package/dist/lib/components/ui/display/index.d.ts +2 -0
- package/dist/lib/components/ui/display/recovery-codes/index.d.ts +4 -0
- package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-actions.d.ts +14 -0
- package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-confirm.d.ts +13 -0
- package/dist/lib/components/ui/display/recovery-codes/partials/recovery-codes-list.d.ts +5 -0
- package/dist/lib/components/ui/display/recovery-codes/recovery-codes.d.ts +8 -0
- package/dist/lib/components/ui/display/recovery-codes/types.d.ts +64 -0
- package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +7 -0
- package/dist/lib/components/ui/fields/form-section/form-section-classes.d.ts +30 -0
- package/dist/lib/components/ui/fields/form-section/form-section.d.ts +25 -0
- package/dist/lib/components/ui/fields/form-section/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/forms/index.d.ts +1 -0
- package/dist/lib/components/ui/forms/use-code-resolver.d.ts +42 -0
- package/dist/lib/components/ui/layout/auth-card/auth-card-notice.d.ts +18 -0
- package/dist/lib/components/ui/layout/auth-card/auth-card.d.ts +35 -0
- package/dist/lib/components/ui/layout/auth-card/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/index.d.ts +1 -0
- package/dist/lib/components/ui/selection/autocomplete/types.d.ts +9 -1
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-status.d.ts +2 -2
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +2 -2
- package/dist/lib/hooks/index.d.ts +2 -0
- package/dist/lib/hooks/use-focus-on-mount.d.ts +24 -0
- package/dist/lib/hooks/use-submit-once.d.ts +32 -0
- package/dist/lib/i18n/resources/en/en.d.ts +21 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +21 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +21 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +21 -0
- package/dist/lib/i18n/resources/resources.d.ts +42 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/lib/index.d.ts +1 -0
- package/dist/lib.js +58 -102
- package/dist/main.js +16 -16
- package/dist/map.js +22 -22
- package/dist/material.css +1 -1
- package/dist/{merge-CZIEHTTe.js → merge-Js8537dg.js} +4 -4
- package/dist/{mermaid.core-Cp75fWA9.js → mermaid.core-9dpDfc6Y.js} +21 -21
- package/dist/{mindmap-definition-NLK3R4M7-CFYIlEfW.js → mindmap-definition-NLK3R4M7-CjYayluH.js} +2 -2
- package/dist/{pieDiagram-5QR66LMP-CjvtBYDr.js → pieDiagram-5QR66LMP-BfFcf84S.js} +1 -1
- package/dist/print.js +2 -2
- package/dist/{quadrantDiagram-O4NWA36T-DPj8ndqA.js → quadrantDiagram-O4NWA36T-DdvYjvR0.js} +1 -1
- package/dist/{requirementDiagram-PLB6GJNP-DjVFwRJg.js → requirementDiagram-PLB6GJNP-CGG6Y3SN.js} +2 -2
- package/dist/{sankeyDiagram-IPEJSGJF-63wsgHUY.js → sankeyDiagram-IPEJSGJF-DJufZkAf.js} +1 -1
- package/dist/{sortable-provider-Chbn1x1i.js → sortable-provider-CUT5Wfdl.js} +1 -1
- package/dist/{stateDiagram-v2-GCMORJYK-DNc8m371.js → stateDiagram-v2-GCMORJYK-vRvpKK9I.js} +2 -2
- package/dist/{stored-language-DPqzxRmf.js → stored-language-BKoohv2_.js} +42 -0
- package/dist/{swimlanes-2SLR337P-B7_gOJxx.js → swimlanes-2SLR337P-Czy9f6gp.js} +3 -3
- package/dist/{swimlanesDiagram-TC7HE7FX-tqlBrGuu.js → swimlanesDiagram-TC7HE7FX-C6RYBQ-A.js} +3 -3
- package/dist/{timeline-definition-EJHVYXUP-DIA9CBZK.js → timeline-definition-EJHVYXUP-CS9RiAiW.js} +1 -1
- package/dist/{translate-material-CqB-j9WD.js → translate-material-CCJg3yfc.js} +2 -2
- package/dist/{translator-DTl9h__E.js → translator-DEde7BKz.js} +1 -1
- package/dist/{use-heading-spy-C1KA3PrF.js → use-heading-spy-XkSExwoT.js} +67 -59
- package/dist/{use-material-translation-DMa4Xrnd.js → use-material-translation-Cndoq_iK.js} +2 -2
- package/dist/{usecaseDiagram-POWQR4AR-FMjCkoxs.js → usecaseDiagram-POWQR4AR-CW-8YHgN.js} +2 -2
- package/dist/{xychartDiagram-PMCCYNJV-B76HOkCh.js → xychartDiagram-PMCCYNJV-G4PopeeF.js} +1 -1
- package/docs/components/README.md +3 -3
- package/docs/components/data-display.md +101 -0
- package/docs/components/feedback-and-status.md +2 -0
- package/docs/components/form-fields.md +78 -0
- package/docs/components/navigation-and-layout.md +51 -0
- package/docs/components/overlays-and-menus.md +18 -0
- package/docs/components/selection-and-choice.md +11 -3
- package/docs/guides/forms.md +111 -0
- package/docs/guides/helpers.md +81 -0
- package/docs/guides/i18n.md +17 -0
- package/docs/guides/printing.md +27 -0
- package/docs/previews/data-display-enrolmentsecret.webp +0 -0
- package/docs/previews/data-display-recoverycodes.webp +0 -0
- package/docs/previews/form-fields-formsection.webp +0 -0
- package/docs/previews/navigation-layout-authcard.webp +0 -0
- package/docs/roadmap.md +15 -0
- package/docs/troubleshooting.md +141 -0
- package/lib/components/components.css +1 -0
- package/lib/components/print-only.css +44 -0
- package/package.json +2 -2
- package/dist/async-slice-CsE3hkCD.js +0 -411
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as e, a as t, f as n, g as r, i, o as a, v as o, y as s } from "./translator-
|
|
2
|
-
import { a as c, o as l } from "./_overRest-
|
|
3
|
-
import { A as u, C as d,
|
|
4
|
-
import { d as
|
|
5
|
-
import { n as
|
|
6
|
-
import { i as
|
|
1
|
+
import { _ as e, a as t, f as n, g as r, i, o as a, v as o, y as s } from "./translator-DEde7BKz.js";
|
|
2
|
+
import { a as c, o as l } from "./_overRest-CCAbV-eT.js";
|
|
3
|
+
import { A as u, C as d, M as f, S as p, T as m, b as h, x as g } from "./async-slice-Cuekts5f.js";
|
|
4
|
+
import { d as ee, n as te } from "./_Uint8Array-C7apDrb7.js";
|
|
5
|
+
import { n as ne, r as re, t as _ } from "./isArrayLikeObject-H8k6W51O.js";
|
|
6
|
+
import { i as ie, n as ae, t as v } from "./isEmpty-B0Bavg-e.js";
|
|
7
7
|
//#region ../../node_modules/lodash-es/noop.js
|
|
8
8
|
function oe() {}
|
|
9
9
|
//#endregion
|
|
@@ -48,8 +48,8 @@ function T(e, t, n, r) {
|
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region ../../node_modules/lodash-es/_baseIsMatch.js
|
|
51
|
-
var
|
|
52
|
-
function
|
|
51
|
+
var E = 1, se = 2;
|
|
52
|
+
function ce(e, t, n, r) {
|
|
53
53
|
var i = n.length, a = i, o = !r;
|
|
54
54
|
if (e == null) return !a;
|
|
55
55
|
for (e = Object(e); i--;) {
|
|
@@ -62,53 +62,53 @@ function le(e, t, n, r) {
|
|
|
62
62
|
if (o && s[2]) {
|
|
63
63
|
if (l === void 0 && !(c in e)) return !1;
|
|
64
64
|
} else {
|
|
65
|
-
var d = new
|
|
65
|
+
var d = new te();
|
|
66
66
|
if (r) var f = r(l, u, c, e, t, d);
|
|
67
|
-
if (!(f === void 0 ?
|
|
67
|
+
if (!(f === void 0 ? h(u, l, E | se, r, d) : f)) return !1;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return !0;
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region ../../node_modules/lodash-es/_isStrictComparable.js
|
|
74
|
-
function
|
|
74
|
+
function D(t) {
|
|
75
75
|
return t === t && !e(t);
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region ../../node_modules/lodash-es/_getMatchData.js
|
|
79
|
-
function
|
|
80
|
-
for (var t =
|
|
79
|
+
function le(e) {
|
|
80
|
+
for (var t = f(e), n = t.length; n--;) {
|
|
81
81
|
var r = t[n], i = e[r];
|
|
82
82
|
t[n] = [
|
|
83
83
|
r,
|
|
84
84
|
i,
|
|
85
|
-
|
|
85
|
+
D(i)
|
|
86
86
|
];
|
|
87
87
|
}
|
|
88
88
|
return t;
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region ../../node_modules/lodash-es/_matchesStrictComparable.js
|
|
92
|
-
function
|
|
92
|
+
function O(e, t) {
|
|
93
93
|
return function(n) {
|
|
94
94
|
return n != null && n[e] === t && (t !== void 0 || e in Object(n));
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region ../../node_modules/lodash-es/_baseMatches.js
|
|
99
|
-
function
|
|
100
|
-
var t =
|
|
101
|
-
return t.length == 1 && t[0][2] ?
|
|
102
|
-
return n === e ||
|
|
99
|
+
function ue(e) {
|
|
100
|
+
var t = le(e);
|
|
101
|
+
return t.length == 1 && t[0][2] ? O(t[0][0], t[0][1]) : function(n) {
|
|
102
|
+
return n === e || ce(n, e, t);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region ../../node_modules/lodash-es/_baseMatchesProperty.js
|
|
107
107
|
var k = 1, A = 2;
|
|
108
108
|
function j(e, t) {
|
|
109
|
-
return n(e) &&
|
|
109
|
+
return n(e) && D(t) ? O(a(e), t) : function(n) {
|
|
110
110
|
var r = i(n, e);
|
|
111
|
-
return r === void 0 && r === t ? ae(n, e) :
|
|
111
|
+
return r === void 0 && r === t ? ae(n, e) : h(t, r, k | A);
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
@@ -133,19 +133,19 @@ function P(e) {
|
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region ../../node_modules/lodash-es/_baseIteratee.js
|
|
135
135
|
function F(e) {
|
|
136
|
-
return typeof e == "function" ? e : e == null ? l : typeof e == "object" ? o(e) ? j(e[0], e[1]) :
|
|
136
|
+
return typeof e == "function" ? e : e == null ? l : typeof e == "object" ? o(e) ? j(e[0], e[1]) : ue(e) : P(e);
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region ../../node_modules/lodash-es/_baseForOwn.js
|
|
140
140
|
function I(e, t) {
|
|
141
|
-
return e &&
|
|
141
|
+
return e && ne(e, t, f);
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region ../../node_modules/lodash-es/_createBaseEach.js
|
|
145
145
|
function L(e, t) {
|
|
146
146
|
return function(n, r) {
|
|
147
147
|
if (n == null) return n;
|
|
148
|
-
if (!
|
|
148
|
+
if (!ee(n)) return e(n, r);
|
|
149
149
|
for (var i = n.length, a = t ? i : -1, o = Object(n); (t ? a-- : ++a < i) && r(o[a], a, o) !== !1;);
|
|
150
150
|
return n;
|
|
151
151
|
};
|
|
@@ -180,7 +180,7 @@ function H(e, t) {
|
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region ../../node_modules/lodash-es/filter.js
|
|
182
182
|
function U(e, t) {
|
|
183
|
-
return (o(e) ?
|
|
183
|
+
return (o(e) ? u : H)(e, F(t, 3));
|
|
184
184
|
}
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region ../../node_modules/lodash-es/_baseValues.js
|
|
@@ -192,7 +192,7 @@ function de(e, t) {
|
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region ../../node_modules/lodash-es/values.js
|
|
194
194
|
function W(e) {
|
|
195
|
-
return e == null ? [] : de(e,
|
|
195
|
+
return e == null ? [] : de(e, f(e));
|
|
196
196
|
}
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region ../../node_modules/lodash-es/isUndefined.js
|
|
@@ -214,30 +214,30 @@ function K(e, t, n) {
|
|
|
214
214
|
}
|
|
215
215
|
//#endregion
|
|
216
216
|
//#region ../../node_modules/lodash-es/_createSet.js
|
|
217
|
-
var pe =
|
|
218
|
-
return new
|
|
217
|
+
var pe = m && 1 / g(new m([, -0]))[1] == Infinity ? function(e) {
|
|
218
|
+
return new m(e);
|
|
219
219
|
} : oe, me = 200;
|
|
220
220
|
function he(e, t, n) {
|
|
221
221
|
var r = -1, i = w, a = e.length, o = !0, s = [], c = s;
|
|
222
222
|
if (n) o = !1, i = z;
|
|
223
223
|
else if (a >= me) {
|
|
224
224
|
var l = t ? null : pe(e);
|
|
225
|
-
if (l) return
|
|
226
|
-
o = !1, i = p, c = new
|
|
225
|
+
if (l) return g(l);
|
|
226
|
+
o = !1, i = p, c = new d();
|
|
227
227
|
} else c = t ? [] : s;
|
|
228
228
|
outer: for (; ++r < a;) {
|
|
229
|
-
var u = e[r],
|
|
230
|
-
if (u = n || u !== 0 ? u : 0, o &&
|
|
231
|
-
for (var
|
|
232
|
-
t && c.push(
|
|
233
|
-
} else i(c,
|
|
229
|
+
var u = e[r], f = t ? t(u) : u;
|
|
230
|
+
if (u = n || u !== 0 ? u : 0, o && f === f) {
|
|
231
|
+
for (var m = c.length; m--;) if (c[m] === f) continue outer;
|
|
232
|
+
t && c.push(f), s.push(u);
|
|
233
|
+
} else i(c, f, n) || (c !== s && c.push(f), s.push(u));
|
|
234
234
|
}
|
|
235
235
|
return s;
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region ../../node_modules/lodash-es/union.js
|
|
239
|
-
var ge =
|
|
240
|
-
return he(
|
|
239
|
+
var ge = re(function(e) {
|
|
240
|
+
return he(ie(e, 1, _, !0));
|
|
241
241
|
}), _e = "\0", q = "\0", J = "", Y = class {
|
|
242
242
|
constructor(e = {}) {
|
|
243
243
|
this._isDirected = !Object.prototype.hasOwnProperty.call(e, "directed") || e.directed, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = c(void 0), this._defaultEdgeLabelFn = c(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[q] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
|
@@ -264,7 +264,7 @@ var ge = ie(function(e) {
|
|
|
264
264
|
return this._nodeCount;
|
|
265
265
|
}
|
|
266
266
|
nodes() {
|
|
267
|
-
return
|
|
267
|
+
return f(this._nodes);
|
|
268
268
|
}
|
|
269
269
|
sources() {
|
|
270
270
|
var e = this;
|
|
@@ -298,7 +298,7 @@ var ge = ie(function(e) {
|
|
|
298
298
|
var t = (e) => this.removeEdge(this._edgeObjs[e]);
|
|
299
299
|
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], V(this.children(e), (e) => {
|
|
300
300
|
this.setParent(e);
|
|
301
|
-
}), delete this._children[e]), V(
|
|
301
|
+
}), delete this._children[e]), V(f(this._in[e]), t), delete this._in[e], delete this._preds[e], V(f(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
|
302
302
|
}
|
|
303
303
|
return this;
|
|
304
304
|
}
|
|
@@ -324,17 +324,17 @@ var ge = ie(function(e) {
|
|
|
324
324
|
children(e) {
|
|
325
325
|
if (G(e) && (e = q), this._isCompound) {
|
|
326
326
|
var t = this._children[e];
|
|
327
|
-
if (t) return
|
|
327
|
+
if (t) return f(t);
|
|
328
328
|
} else if (e === q) return this.nodes();
|
|
329
329
|
else if (this.hasNode(e)) return [];
|
|
330
330
|
}
|
|
331
331
|
predecessors(e) {
|
|
332
332
|
var t = this._preds[e];
|
|
333
|
-
if (t) return
|
|
333
|
+
if (t) return f(t);
|
|
334
334
|
}
|
|
335
335
|
successors(e) {
|
|
336
336
|
var t = this._sucs[e];
|
|
337
|
-
if (t) return
|
|
337
|
+
if (t) return f(t);
|
|
338
338
|
}
|
|
339
339
|
neighbors(e) {
|
|
340
340
|
var t = this.predecessors(e);
|
package/dist/hooks.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { r as e } from "./i18n-provider-
|
|
2
|
-
import {
|
|
3
|
-
import { L as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { useNavigate as
|
|
6
|
-
import { createFormatters as
|
|
1
|
+
import { r as e } from "./i18n-provider-Dv9ZSmgO.js";
|
|
2
|
+
import { c as t, d as n, i as r, n as i, r as a, s as o, t as s, u as c } from "./use-heading-spy-XkSExwoT.js";
|
|
3
|
+
import { L as l, t as u } from "./number.utils-BiBN2hWJ.js";
|
|
4
|
+
import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
|
|
5
|
+
import { useNavigate as h, useSearchParams as g } from "react-router";
|
|
6
|
+
import { createFormatters as _ } from "@nxgt/material-core/print-format";
|
|
7
|
+
import { busySettler as v, busySettler as y, createSubmitGuard as b, createSubmitGuard as x } from "@nxgt/material-core/submit-guard";
|
|
7
8
|
//#region lib/hooks/use-allowed-transitions.ts
|
|
8
|
-
function
|
|
9
|
+
function S(e, t, n) {
|
|
9
10
|
return (t[e] || []).map((e) => {
|
|
10
11
|
let t = n[e];
|
|
11
12
|
return t ? {
|
|
@@ -16,18 +17,18 @@ function h(e, t, n) {
|
|
|
16
17
|
}
|
|
17
18
|
//#endregion
|
|
18
19
|
//#region lib/hooks/use-formatters.ts
|
|
19
|
-
function
|
|
20
|
+
function C(t = {}) {
|
|
20
21
|
let n = e(), r = t.locale ?? n?.language ?? "en", { timeZone: i } = t;
|
|
21
|
-
return
|
|
22
|
+
return p(() => _({
|
|
22
23
|
locale: r,
|
|
23
24
|
timeZone: i
|
|
24
25
|
}), [r, i]);
|
|
25
26
|
}
|
|
26
27
|
//#endregion
|
|
27
28
|
//#region lib/hooks/use-navigation.ts
|
|
28
|
-
function
|
|
29
|
-
let n =
|
|
30
|
-
return
|
|
29
|
+
function w(e, t) {
|
|
30
|
+
let n = h();
|
|
31
|
+
return d(() => {
|
|
31
32
|
n(e, t);
|
|
32
33
|
}, [
|
|
33
34
|
n,
|
|
@@ -35,21 +36,21 @@ function _(e, t) {
|
|
|
35
36
|
t
|
|
36
37
|
]);
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
let t =
|
|
40
|
-
return
|
|
39
|
+
function T(e) {
|
|
40
|
+
let t = h();
|
|
41
|
+
return p(() => e.map(({ to: e, options: n }) => () => {
|
|
41
42
|
t(e, n);
|
|
42
43
|
}), [t, e]);
|
|
43
44
|
}
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region lib/hooks/use-number-formatter.ts
|
|
46
|
-
function
|
|
47
|
-
let t = e(), n =
|
|
47
|
+
function E() {
|
|
48
|
+
let t = e(), n = d((e, n) => u(e, {
|
|
48
49
|
...n,
|
|
49
50
|
language: t?.language
|
|
50
51
|
}), [t?.language]);
|
|
51
52
|
return {
|
|
52
|
-
formatCurrency:
|
|
53
|
+
formatCurrency: d((e, t) => n(e, {
|
|
53
54
|
...t,
|
|
54
55
|
currency: t?.currency,
|
|
55
56
|
style: t?.currency ? "currency" : void 0
|
|
@@ -59,7 +60,7 @@ function y() {
|
|
|
59
60
|
}
|
|
60
61
|
//#endregion
|
|
61
62
|
//#region lib/hooks/use-options.ts
|
|
62
|
-
function
|
|
63
|
+
function D(e, { filter: t, value: n, label: r, expanded: i }) {
|
|
63
64
|
return e.filter((e) => e && (t?.(e) ?? !0)).map((e) => {
|
|
64
65
|
let t = typeof n == "function" ? n(e) : e[n]?.toString() ?? "", a = "";
|
|
65
66
|
return a = typeof r == "function" ? r(e) : Array.isArray(r) ? r.map((t) => e[t]).filter(Boolean).join(" ") : e[r]?.toString() ?? "", {
|
|
@@ -69,9 +70,9 @@ function b(e, { filter: t, value: n, label: r, expanded: i }) {
|
|
|
69
70
|
};
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
+
function O(e, t) {
|
|
73
74
|
let { filter: n, value: r, label: i, expanded: a } = t;
|
|
74
|
-
return
|
|
75
|
+
return p(() => D(e, {
|
|
75
76
|
filter: n,
|
|
76
77
|
value: r,
|
|
77
78
|
label: i,
|
|
@@ -84,14 +85,25 @@ function x(e, t) {
|
|
|
84
85
|
a
|
|
85
86
|
]);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function k(e) {
|
|
88
89
|
return e?.edges?.map((e) => e.node) ?? [];
|
|
89
90
|
}
|
|
90
91
|
//#endregion
|
|
91
92
|
//#region lib/hooks/use-search-param.ts
|
|
92
|
-
function
|
|
93
|
-
let [t, n] =
|
|
94
|
-
return
|
|
93
|
+
function A(e) {
|
|
94
|
+
let [t, n] = g();
|
|
95
|
+
return p(() => t.get(e), [t, e]);
|
|
95
96
|
}
|
|
96
97
|
//#endregion
|
|
97
|
-
|
|
98
|
+
//#region lib/hooks/use-submit-once.ts
|
|
99
|
+
function j(e) {
|
|
100
|
+
let [t] = m(x), [n] = m(() => y(t)), r = e !== void 0;
|
|
101
|
+
return f(() => {
|
|
102
|
+
e !== void 0 && n(e);
|
|
103
|
+
}, [e, n]), d((e, n) => t.once(e, {
|
|
104
|
+
settleSync: !r,
|
|
105
|
+
...n
|
|
106
|
+
}), [t, r]);
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { c as applyResolvedTheme, D as buildOptions, v as busySettler, b as createSubmitGuard, k as extractNode, n as resolveTheme, S as useAllowedTransitions, o as useCspNonce, i as useFocusOnMount, C as useFormatters, s as useHeadingSpy, l as useIsClient, r as useIsMobile, a as useLocalizedDate, w as useNavigationHandler, T as useNavigationHandlers, E as useNumberFormatter, O as useOptions, A as useSearchParam, j as useSubmitOnce, t as useTheme };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, t as n } from "./stored-language-
|
|
1
|
+
import { a as e, i as t, t as n } from "./stored-language-BKoohv2_.js";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as i, useCallback as a, useContext as o, useMemo as s, useState as c } from "react";
|
|
4
4
|
//#region lib/i18n/i18n-provider.tsx
|
package/dist/i18n.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r } from "./stored-language-
|
|
2
|
-
import { n as i, r as a, t as o } from "./i18n-provider-
|
|
3
|
-
import { n as s, r as c, t as l } from "./translator-
|
|
4
|
-
import { o as u, t as d } from "./merge-
|
|
5
|
-
import { t as f } from "./translate-material-
|
|
6
|
-
import { t as p } from "./use-material-translation-
|
|
1
|
+
import { a as e, i as t, o as n, r } from "./stored-language-BKoohv2_.js";
|
|
2
|
+
import { n as i, r as a, t as o } from "./i18n-provider-Dv9ZSmgO.js";
|
|
3
|
+
import { n as s, r as c, t as l } from "./translator-DEde7BKz.js";
|
|
4
|
+
import { o as u, t as d } from "./merge-Js8537dg.js";
|
|
5
|
+
import { t as f } from "./translate-material-CCJg3yfc.js";
|
|
6
|
+
import { t as p } from "./use-material-translation-Cndoq_iK.js";
|
|
7
7
|
import { useCallback as m } from "react";
|
|
8
8
|
//#region lib/i18n/merge-resources.ts
|
|
9
9
|
function h(e, t, n = "") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x as e } from "./translator-
|
|
2
|
-
import { i as t, o as n, t as r } from "./_overRest-
|
|
3
|
-
import { d as i } from "./_Uint8Array-
|
|
1
|
+
import { x as e } from "./translator-DEde7BKz.js";
|
|
2
|
+
import { i as t, o as n, t as r } from "./_overRest-CCAbV-eT.js";
|
|
3
|
+
import { d as i } from "./_Uint8Array-C7apDrb7.js";
|
|
4
4
|
//#region ../../node_modules/lodash-es/_baseRest.js
|
|
5
5
|
function a(e, i) {
|
|
6
6
|
return t(r(e, i, n), e + "");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as e, o as t, s as n, v as r } from "./translator-
|
|
2
|
-
import {
|
|
3
|
-
import { a as s, c, d as l, f as u, l as d, p as f, u as p } from "./_Uint8Array-
|
|
1
|
+
import { C as e, o as t, s as n, v as r } from "./translator-DEde7BKz.js";
|
|
2
|
+
import { N as i, j as a, w as o } from "./async-slice-Cuekts5f.js";
|
|
3
|
+
import { a as s, c, d as l, f as u, l as d, p as f, u as p } from "./_Uint8Array-C7apDrb7.js";
|
|
4
4
|
//#region ../../node_modules/lodash-es/_isFlattenable.js
|
|
5
5
|
var m = e ? e.isConcatSpreadable : void 0;
|
|
6
6
|
function h(e) {
|
|
@@ -9,10 +9,10 @@ function h(e) {
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region ../../node_modules/lodash-es/_baseFlatten.js
|
|
11
11
|
function g(e, t, n, r, i) {
|
|
12
|
-
var
|
|
13
|
-
for (n ||= h, i ||= []; ++
|
|
14
|
-
var c = e[
|
|
15
|
-
t > 0 && n(c) ? t > 1 ? g(c, t - 1, n, r, i) :
|
|
12
|
+
var o = -1, s = e.length;
|
|
13
|
+
for (n ||= h, i ||= []; ++o < s;) {
|
|
14
|
+
var c = e[o];
|
|
15
|
+
t > 0 && n(c) ? t > 1 ? g(c, t - 1, n, r, i) : a(i, c) : r || (i[i.length] = c);
|
|
16
16
|
}
|
|
17
17
|
return i;
|
|
18
18
|
}
|
|
@@ -43,9 +43,9 @@ var b = "[object Map]", x = "[object Set]", S = Object.prototype.hasOwnProperty;
|
|
|
43
43
|
function C(e) {
|
|
44
44
|
if (e == null) return !0;
|
|
45
45
|
if (l(e) && (r(e) || typeof e == "string" || typeof e.splice == "function" || c(e) || s(e) || d(e))) return !e.length;
|
|
46
|
-
var t =
|
|
46
|
+
var t = o(e);
|
|
47
47
|
if (t == b || t == x) return !e.size;
|
|
48
|
-
if (p(e)) return !
|
|
48
|
+
if (p(e)) return !i(e).length;
|
|
49
49
|
for (var n in e) if (S.call(e, n)) return !1;
|
|
50
50
|
return !0;
|
|
51
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ct as e } from "./components-
|
|
1
|
+
import { ct as e } from "./components-CsPEBzNF.js";
|
|
2
2
|
import { t } from "./src-CsLQInsN.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-BAad7w_K.js";
|
|
4
4
|
import { H as r, U as i, a, c as o, q as s, v as c, w as l, x as u, y as d } from "./chunk-O7XYJQB3-BChweQ_V.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Where a copy stands: nothing to say, on the clipboard, or refused. */
|
|
2
|
+
export type CopyStatus = 'idle' | 'copied' | 'failed';
|
|
3
|
+
/** How long `copied` / `failed` stays before the status is idle again. */
|
|
4
|
+
export declare const COPY_STATUS_RESET_MS = 1500;
|
|
5
|
+
/**
|
|
6
|
+
* Copies a text and remembers the outcome for a moment, for a polite status
|
|
7
|
+
* region to announce: what `CopyButton` and `RecoveryCodes` share. Nothing
|
|
8
|
+
* is set after unmount.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useCopyStatus(resetMs?: number): {
|
|
11
|
+
status: CopyStatus;
|
|
12
|
+
copy: (text: string) => Promise<void>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export type EnrolmentSecretProps = Omit<ComponentProps<'div'>, 'children'> & {
|
|
3
|
+
/** The `otpauth://` URI: the QR code's content and the link's target (a link only for an `otpauth:` scheme). */
|
|
4
|
+
uri: string;
|
|
5
|
+
/** The secret, typed by hand when the code cannot be scanned. */
|
|
6
|
+
secret: string;
|
|
7
|
+
/** Shows the QR code. Default `true`. */
|
|
8
|
+
showQrCode?: boolean;
|
|
9
|
+
/** The QR code's width and height, in pixels. Default `192`. */
|
|
10
|
+
qrSize?: number;
|
|
11
|
+
/** The QR code's accessible name. */
|
|
12
|
+
qrLabel?: string;
|
|
13
|
+
/** The link that opens the URI in an authenticator app on the same device. */
|
|
14
|
+
openAppLabel?: string;
|
|
15
|
+
/** The line before the secret. */
|
|
16
|
+
manualLabel?: string;
|
|
17
|
+
/** Names the group around the secret and its copy button. */
|
|
18
|
+
secretLabel?: string;
|
|
19
|
+
/** The copy button's accessible name. */
|
|
20
|
+
copyLabel?: string;
|
|
21
|
+
/** Announced once the secret is on the clipboard. */
|
|
22
|
+
copiedLabel?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A TOTP enrolment: the QR code of the `otpauth://` URI, the URI as a link
|
|
26
|
+
* (a phone cannot scan its own screen; an authenticator app on it opens the
|
|
27
|
+
* link), and the secret in groups of four, to type or copy. The QR code sits
|
|
28
|
+
* beside the rest when the component is 28rem wide or more, above it on a phone.
|
|
29
|
+
*/
|
|
30
|
+
export declare function EnrolmentSecret({ uri, secret, showQrCode, qrSize, qrLabel, openAppLabel, manualLabel, secretLabel, copyLabel, copiedLabel, className, ...props }: EnrolmentSecretProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The texts an `EnrolmentSecret` shows, each one overridable by a prop. */
|
|
2
|
+
export type EnrolmentSecretLabels = {
|
|
3
|
+
qr: string;
|
|
4
|
+
openApp: string;
|
|
5
|
+
manual: string;
|
|
6
|
+
secret: string;
|
|
7
|
+
copy: string;
|
|
8
|
+
copied: string;
|
|
9
|
+
};
|
|
10
|
+
/** The built-in labels, with the given overrides on top. */
|
|
11
|
+
export declare function useEnrolmentSecretLabels(overrides: Partial<Record<keyof EnrolmentSecretLabels, string | undefined>>): EnrolmentSecretLabels;
|
|
@@ -10,6 +10,7 @@ export * from './chip';
|
|
|
10
10
|
export * from './code';
|
|
11
11
|
export * from './count-badge';
|
|
12
12
|
export * from './description';
|
|
13
|
+
export * from './enrolment-secret';
|
|
13
14
|
export * from './entity-header';
|
|
14
15
|
export * from './event-chip';
|
|
15
16
|
export * from './figure';
|
|
@@ -18,6 +19,7 @@ export * from './markdown';
|
|
|
18
19
|
export * from './metrics';
|
|
19
20
|
export * from './param-table';
|
|
20
21
|
export * from './qrcode';
|
|
22
|
+
export * from './recovery-codes';
|
|
21
23
|
export * from './stat-card';
|
|
22
24
|
export * from './status-indicator';
|
|
23
25
|
export * from './summary-data';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DownloadTextOptions, RecoveryCodesTextOptions, } from '@nxgt/material-core/two-factor';
|
|
2
|
+
export { downloadText, recoveryCodesText, } from '@nxgt/material-core/two-factor';
|
|
3
|
+
export * from './recovery-codes';
|
|
4
|
+
export type { RecoveryCodesLabels, RecoveryCodesProps, RecoveryCodesTitleElement, } from './types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RecoveryCodesLabels } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
codes: readonly string[];
|
|
4
|
+
labels: RecoveryCodesLabels;
|
|
5
|
+
fileName: string;
|
|
6
|
+
fileHeading: string;
|
|
7
|
+
fileNote?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Copy, download and print. The copy's outcome is announced by a polite
|
|
11
|
+
* status region of its own, so it needs no Toaster mounted.
|
|
12
|
+
*/
|
|
13
|
+
export declare function RecoveryCodesActions({ codes, labels, fileName, fileHeading, fileNote, }: Props): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RecoveryCodesLabels } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
labels: RecoveryCodesLabels;
|
|
4
|
+
saved?: boolean;
|
|
5
|
+
onSavedChange?: (saved: boolean) => void;
|
|
6
|
+
onDone?: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* "I have saved these codes", then "Done". "Done" before the box is ticked
|
|
10
|
+
* moves the focus to it, marks it invalid and says why under it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function RecoveryCodesConfirm({ labels, saved: controlled, onSavedChange, onDone, }: Props): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RecoveryCodesProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* One-time recovery codes, shown once: a list, copy, download, print (the
|
|
4
|
+
* card alone), and an "I have saved these codes" confirmation before "Done".
|
|
5
|
+
* Guarding the page against leaving before it is ticked is the app's, with
|
|
6
|
+
* its router: `saved` and `onSavedChange` say when.
|
|
7
|
+
*/
|
|
8
|
+
export declare function RecoveryCodes({ codes, title, titleAs, description, warning, focusTitle, fileName, fileHeading, fileNote, onDone, saved, onSavedChange, labels: overrides, className, ...props }: RecoveryCodesProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
/** The heading levels the title may take. */
|
|
3
|
+
export type RecoveryCodesTitleElement = 'h2' | 'h3' | 'h4';
|
|
4
|
+
/** Every built-in string of {@link RecoveryCodes}, each overridable. */
|
|
5
|
+
export type RecoveryCodesLabels = {
|
|
6
|
+
/** Names the list of codes. "Recovery codes". */
|
|
7
|
+
list: string;
|
|
8
|
+
/** The copy button. "Copy codes". */
|
|
9
|
+
copy: string;
|
|
10
|
+
/** Announced once the codes are on the clipboard. "Codes copied". */
|
|
11
|
+
copied: string;
|
|
12
|
+
/** Announced when the clipboard refused them. "Copy failed". */
|
|
13
|
+
copyFailed: string;
|
|
14
|
+
/** The download button. "Download". */
|
|
15
|
+
download: string;
|
|
16
|
+
/** The print button. "Print". */
|
|
17
|
+
print: string;
|
|
18
|
+
/** The confirmation's label. "I have saved these codes". */
|
|
19
|
+
saved: string;
|
|
20
|
+
/** Under the confirmation once "Done" was pressed before it was ticked. */
|
|
21
|
+
savedRequired: string;
|
|
22
|
+
/** The button that calls `onDone`. "Done". */
|
|
23
|
+
done: string;
|
|
24
|
+
};
|
|
25
|
+
export type RecoveryCodesProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
26
|
+
/** The one-time codes, in the order they are shown and saved. */
|
|
27
|
+
codes: readonly string[];
|
|
28
|
+
/** The card's heading. "Recovery codes" by default. */
|
|
29
|
+
title?: ReactNode;
|
|
30
|
+
/** The heading element; `'h2'` by default. */
|
|
31
|
+
titleAs?: RecoveryCodesTitleElement;
|
|
32
|
+
/** A line under the title. */
|
|
33
|
+
description?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* A warning above the codes; a built-in one by default ("Each code works
|
|
36
|
+
* once…"). `false` hides it. Not printed.
|
|
37
|
+
*/
|
|
38
|
+
warning?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Moves the focus to the title once shown, as the codes replaced what the
|
|
41
|
+
* user acted on. Default `true`.
|
|
42
|
+
*/
|
|
43
|
+
focusTitle?: boolean;
|
|
44
|
+
/** The downloaded file's name. Default `"recovery-codes.txt"`. */
|
|
45
|
+
fileName?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The file's first line (the account the codes belong to); the title's
|
|
48
|
+
* text when it is a string, else "Recovery codes".
|
|
49
|
+
*/
|
|
50
|
+
fileHeading?: string;
|
|
51
|
+
/** The file's second line; the warning's text when it is a string. */
|
|
52
|
+
fileNote?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Called by the "Done" button, which is shown only when this is given and
|
|
55
|
+
* calls it only once the confirmation is ticked.
|
|
56
|
+
*/
|
|
57
|
+
onDone?: () => void;
|
|
58
|
+
/** The confirmation, controlled; uncontrolled when left out. */
|
|
59
|
+
saved?: boolean;
|
|
60
|
+
/** Called when the confirmation is ticked or unticked. */
|
|
61
|
+
onSavedChange?: (saved: boolean) => void;
|
|
62
|
+
/** Overrides for the built-in strings. */
|
|
63
|
+
labels?: Partial<RecoveryCodesLabels>;
|
|
64
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RecoveryCodesLabels } from './types';
|
|
2
|
+
/** The built-in title and warning, and the labels with their overrides. */
|
|
3
|
+
export declare function useRecoveryCodesLabels(overrides?: Partial<RecoveryCodesLabels>): {
|
|
4
|
+
labels: RecoveryCodesLabels;
|
|
5
|
+
title: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
};
|