@nxgt/material 3.101.0 → 3.104.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 +82 -0
- package/README.md +37 -5
- package/dist/{alert-dialog-DYzxchiS.js → alert-dialog-CK_47jfm.js} +1 -1
- package/dist/{async-slice-drJyPvuM.js → async-slice-1ZNMiwyJ.js} +1 -1
- package/dist/{bubble-input-CQwVSoU3.js → bubble-input-BxI1WmNs.js} +17 -5
- package/dist/{button-GeIsUekU.js → button-YfEMZbRO.js} +2 -2
- package/dist/{calculator-BS4PAm6l.js → calculator-BmYZId4c.js} +261 -460
- package/dist/calculator-field.js +7 -7
- package/dist/{calculator-segment-CEdwE24M.js → calculator-segment-DJ08DJ-n.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +819 -764
- package/dist/{chip-BdEtFQ85.js → chip-DPj6e-3v.js} +2 -2
- package/dist/{code-editor-BByXZOGy.js → code-editor-CZg3nLZO.js} +178 -177
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-CSZX5zxD.js → code-language-items-Nq1iOGId.js} +14 -5
- package/dist/components/ui/actions/action-card/action-card-tile.css +47 -0
- package/dist/components/ui/display/chip/chip-soft.css +27 -2
- package/dist/components/ui/display/code/code-moonlight.css +10 -10
- package/dist/components/ui/primitives/collapsible/collapsible.css +9 -0
- package/dist/{components-DQ4MljCr.js → components-B2wrH_W0.js} +19302 -18583
- package/dist/components.js +38 -37
- package/dist/{conversion-variant-DTQqAyDt.js → conversion-variant-C-LPx5ek.js} +5 -5
- package/dist/{currency-field-Dnju7ss2.js → currency-field-DnsRIA80.js} +24 -23
- package/dist/{dialog-5_2__tu8.js → dialog-BKBsDGFc.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-FdGC5kIP.js → dropdown-menu-QMDbRidH.js} +1 -1
- package/dist/editor.js +9 -9
- package/dist/{empty-state-BoepPG5v.js → empty-state-BLIJ6znY.js} +1 -1
- package/dist/{field-blur-DkiZOVNV.js → field-blur-DMJwPLsg.js} +9 -9
- package/dist/field-blur-context-3rKussBQ.js +29 -0
- package/dist/{financial-variant-BhqJp5C-.js → financial-variant-Ws0Jp01H.js} +5 -5
- package/dist/{hooks-DjcbJZiO.js → hooks-C3vkQmzh.js} +106 -61
- package/dist/hooks.js +3 -3
- package/dist/{hover-card-CmHJeBeY.js → hover-card-Df649U6I.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-LGUPQh_c.js → icon-badge-Cma1qOOJ.js} +1 -1
- package/dist/{icon-button-BSVpO1jP.js → icon-button-CpKxV264.js} +1 -1
- package/dist/key-layout-D2goCDkD.js +31 -0
- package/dist/keypad.js +551 -0
- package/dist/label-DR-zZyGQ.js +47 -0
- package/dist/lib/components/ui/actions/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/product-tile/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/product-tile/product-tile-link.d.ts +16 -0
- package/dist/lib/components/ui/actions/product-tile/product-tile.d.ts +41 -0
- package/dist/lib/components/ui/collections/data-table/data-table-density.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/partials/data-table-scroll-region.d.ts +4 -1
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +6 -3
- package/dist/lib/components/ui/collections/data-table/partials/layouts/list-bar-in-row.d.ts +2 -1
- package/dist/lib/components/ui/collections/data-table/types.d.ts +11 -8
- package/dist/lib/components/ui/collections/data-table/virtual-option.d.ts +9 -3
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-passed-through.d.ts +1 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +1 -1
- package/dist/lib/components/ui/display/chip/chip.variants.d.ts +5 -4
- package/dist/lib/components/ui/display/code/code-block-parts.d.ts +1 -1
- package/dist/lib/components/ui/display/code/code-block.d.ts +4 -1
- package/dist/lib/components/ui/display/code/languages.d.ts +2 -0
- package/dist/lib/components/ui/display/code/moonlight-tokens.d.ts +10 -10
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-props.d.ts +73 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog-rules.d.ts +12 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-dialog.d.ts +5 -61
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-footer.d.ts +12 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/confirm-phrase.d.ts +26 -0
- package/dist/lib/components/ui/feedback/confirm-dialog/use-confirm-action.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/quantity-field/types.d.ts +1 -1
- package/dist/lib/components/ui/fields/quantity-stepper/index.d.ts +2 -0
- package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-model.d.ts +9 -0
- package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-value.d.ts +15 -0
- package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.d.ts +9 -0
- package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.types.d.ts +35 -0
- package/dist/lib/components/ui/fields/quantity-stepper/use-quantity-stepper.d.ts +28 -0
- package/dist/lib/components/ui/layout/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/pane-layout/pane-layout.d.ts +8 -3
- package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-classes.d.ts +2 -2
- package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-context.d.ts +9 -0
- package/dist/lib/components/ui/layout/pane-layout/partials/use-pane-layout-state.d.ts +7 -2
- package/dist/lib/components/ui/layout/panel-card/index.d.ts +1 -0
- package/dist/lib/components/ui/layout/panel-card/panel-card.d.ts +23 -0
- package/dist/lib/components/ui/primitives/collapsible/collapsible.d.ts +9 -1
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-list.d.ts +6 -1
- package/dist/lib/components/ui/primitives/tabs/tabs-classes.d.ts +1 -0
- package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +8 -0
- package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.types.d.ts +6 -0
- package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-reasons.d.ts +10 -0
- package/dist/lib/components/ui/selection/chip-group-field/partials/use-chip-rail.d.ts +12 -0
- package/dist/lib/components/ui/selection/choice-group/choice-group-root.d.ts +5 -2
- package/dist/lib/components/ui/selection/index.d.ts +1 -0
- package/dist/lib/components/ui/selection/status-menu/index.d.ts +3 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-confirm.d.ts +12 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-icon.d.ts +6 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-items.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-menu-list.d.ts +14 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-sheet-row.d.ts +11 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-sheet.d.ts +21 -0
- package/dist/lib/components/ui/selection/status-menu/partials/status-trigger.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu-data.d.ts +12 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu-form-field.d.ts +20 -0
- package/dist/lib/components/ui/selection/status-menu/status-menu.d.ts +13 -0
- package/dist/lib/components/ui/selection/status-menu/types.d.ts +76 -0
- package/dist/lib/components/ui/selection/status-menu/use-status-change.d.ts +18 -0
- package/dist/lib/components/ui/selection/status-menu/use-status-menu.d.ts +30 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +1 -5
- package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +3 -49
- package/dist/lib/components/ui/widgets/keypad/cash-model.d.ts +16 -0
- package/dist/lib/components/ui/widgets/keypad/index.d.ts +5 -0
- package/dist/lib/components/ui/widgets/keypad/key-layout.d.ts +56 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-binding.d.ts +32 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-cash.d.ts +28 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-display.d.ts +11 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-entry.d.ts +39 -0
- package/dist/lib/components/ui/widgets/keypad/keypad-grid.d.ts +27 -0
- package/dist/lib/components/ui/widgets/{calculator/partials/calculator-key.d.ts → keypad/keypad-key.d.ts} +6 -3
- package/dist/lib/components/ui/widgets/keypad/keypad-layout.d.ts +19 -0
- package/dist/lib/components/ui/widgets/{calculator/partials → keypad}/keypad-navigation.d.ts +1 -1
- package/dist/lib/components/ui/widgets/keypad/keypad.d.ts +9 -0
- package/dist/lib/components/ui/widgets/keypad/keypad.types.d.ts +91 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-cash.d.ts +14 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-keyboard.d.ts +7 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-number.d.ts +10 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-quantity.d.ts +16 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad-value.d.ts +17 -0
- package/dist/lib/components/ui/widgets/keypad/use-keypad.d.ts +23 -0
- package/dist/lib/components/ui/widgets/native-charts/core/label-placement.d.ts +25 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference-geometry.d.ts +3 -2
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/use-barcode-scanner.d.ts +39 -0
- package/dist/lib/i18n/resources/en/en.d.ts +28 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +30 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +28 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +30 -2
- package/dist/lib/i18n/resources/resources.d.ts +56 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/keypad/index.d.ts +20 -0
- package/dist/lib/print/output/csv.d.ts +37 -0
- package/dist/lib/print/output/index.d.ts +1 -0
- package/dist/lib.js +1 -1
- package/dist/main.js +54 -53
- package/dist/map.js +9 -9
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/{percent-field-DGlU_xii.js → percent-field-sAq7BaxN.js} +15 -14
- package/dist/{picker-surface-CGhqNR8a.js → picker-surface--6E-nvpU.js} +4 -4
- package/dist/{popover-ZxL7ktKk.js → popover-bEB8I_-w.js} +1 -1
- package/dist/{pos-types-BQ0QpYMp.js → pos-types-Cpdc4E33.js} +1 -1
- package/dist/{pos-variant-CKy8h_5i.js → pos-variant-ClMGu59I.js} +25 -25
- package/dist/print.js +146 -127
- package/dist/{programmer-variant-CbHstE28.js → programmer-variant-ChzgyA7x.js} +30 -30
- package/dist/{public-D-tdOz4b.js → public-BY8N5NDT.js} +9 -9
- package/dist/{rich-code-block-CTPj1LuD.js → rich-code-block-D2GiWuqD.js} +18 -18
- package/dist/{scientific-variant-B8U9h3II.js → scientific-variant-31_93gcZ.js} +8 -8
- package/dist/{sortable-provider-CSoWE7Ce.js → sortable-provider-DGiVn72t.js} +2 -2
- package/dist/{spinner-ffuwBXHl.js → spinner-CEVomQ5K.js} +1 -1
- package/dist/standard-layout-DTr9yy8Z.js +48 -0
- package/dist/{tabs-JgRq6ZJx.js → tabs-B8MXBbPW.js} +14 -14
- package/dist/{text-field-DURkIP-v.js → text-field-DN88qD0Q.js} +16 -15
- package/dist/theme-picker.js +13 -13
- package/dist/{theme-toggle-n_Zg7JAA.js → theme-toggle-C7pnu1Xh.js} +1 -1
- package/dist/{toolbar-items-IANZdcw4.js → toolbar-items-BDfoh8QB.js} +4 -4
- package/dist/{translate-material-CMHUH5Ha.js → translate-material-s_lxIV43.js} +1 -1
- package/dist/{translator-9zA-Um3W.js → translator-Cgql9srO.js} +56 -4
- package/dist/use-calculator-keyboard-DysnFK8m.js +222 -0
- package/dist/{use-chat-composer-BoIN7RCA.js → use-chat-composer-xCcp9fVc.js} +2250 -2195
- package/dist/{use-heading-spy-Ciw9GBHL.js → use-heading-spy-FIZlf9qj.js} +235 -154
- package/dist/{use-material-translation-CLNaMhUf.js → use-material-translation-xNzbSVgS.js} +1 -1
- package/dist/{use-return-focus-DWhbTGVe.js → use-return-focus-CW9KkDkp.js} +1 -1
- package/docs/README.md +2 -1
- package/docs/components/README.md +2 -0
- package/docs/components/buttons-and-actions.md +81 -2
- package/docs/components/data-display.md +6 -3
- package/docs/components/data-table-filter-and-lists.md +19 -6
- package/docs/components/feedback-and-status.md +20 -0
- package/docs/components/form-fields.md +60 -7
- package/docs/components/navigation-and-layout.md +48 -2
- package/docs/components/primitives.md +44 -2
- package/docs/components/rich-widgets.md +28 -0
- package/docs/components/selection-and-choice.md +176 -1
- package/docs/guides/calculator.md +1 -1
- package/docs/guides/cards-and-tiles.md +31 -24
- package/docs/guides/csp.md +4 -3
- package/docs/guides/data-grid.md +5 -4
- package/docs/guides/field-look-refined.md +2 -2
- package/docs/guides/forms.md +1 -0
- package/docs/guides/helpers.md +49 -0
- package/docs/guides/keypad.md +233 -0
- package/docs/guides/printing.md +51 -1
- package/docs/previews/buttons-actions-producttile.webp +0 -0
- package/docs/previews/data-display-codeblock.webp +0 -0
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-jsonviewer.webp +0 -0
- package/docs/previews/form-fields-quantitystepper.webp +0 -0
- package/docs/previews/navigation-layout-panelcard.webp +0 -0
- package/docs/previews/rich-widgets-keypad.webp +0 -0
- package/docs/previews/selection-choice-statusmenu.webp +0 -0
- package/docs/roadmap.md +21 -0
- package/docs/troubleshooting.md +68 -4
- package/lib/components/ui/actions/action-card/action-card-tile.css +47 -0
- package/lib/components/ui/display/chip/chip-soft.css +27 -2
- package/lib/components/ui/display/code/code-moonlight.css +10 -10
- package/lib/components/ui/primitives/collapsible/collapsible.css +9 -0
- package/lib/components/ui/widgets/calculator/calculator-keys.css +3 -0
- package/lib/components/ui/widgets/calculator/calculator.css +118 -0
- package/package.json +7 -2
- package/dist/field-blur-context-BLGgf_3z.js +0 -73
- package/dist/key-layout-cR79xfGE.js +0 -38
- package/dist/standard-layout-BuSRr3TY.js +0 -40
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { i as e } from "./translate-material-
|
|
2
|
-
import { n as t } from "./use-heading-spy-
|
|
1
|
+
import { i as e } from "./translate-material-s_lxIV43.js";
|
|
2
|
+
import { n as t } from "./use-heading-spy-FIZlf9qj.js";
|
|
3
3
|
import { t as n } from "./number.utils-CSueQZcv.js";
|
|
4
4
|
import { useCallback as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
5
5
|
import { jsx as l } from "react/jsx-runtime";
|
|
6
6
|
import { useBlocker as u, useNavigate as d, useSearchParams as f } from "react-router";
|
|
7
|
-
import {
|
|
7
|
+
import { DEFAULT_SCANNER_MAX_GAP as p, DEFAULT_SCANNER_MIN_LENGTH as m, createScanner as h, createScanner as g } from "@nxgt/material-core/barcode-scanner";
|
|
8
|
+
import { createFormatters as _ } from "@nxgt/material-core/print-format";
|
|
8
9
|
//#region lib/hooks/unsaved-guard-rules.ts
|
|
9
|
-
function
|
|
10
|
+
function v(e, t, n = {}) {
|
|
10
11
|
return e.pathname !== t.pathname || !n.ignoreSearch && e.search !== t.search;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function y({ dirty: e, released: t, context: n, leaves: r, ignoreSearch: i }) {
|
|
13
14
|
if (t || !e) return !1;
|
|
14
15
|
let { currentLocation: a, nextLocation: o } = n;
|
|
15
|
-
return r ? r(a, o) :
|
|
16
|
+
return r ? r(a, o) : v(a, o, { ignoreSearch: i });
|
|
16
17
|
}
|
|
17
18
|
//#endregion
|
|
18
19
|
//#region lib/hooks/use-allowed-transitions.ts
|
|
19
|
-
function
|
|
20
|
+
function b(e, t, n) {
|
|
20
21
|
return (t[e] || []).map((e) => {
|
|
21
22
|
let t = n[e];
|
|
22
23
|
return t ? {
|
|
@@ -26,8 +27,52 @@ function g(e, t, n) {
|
|
|
26
27
|
}).filter((e) => e !== null);
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
30
|
+
//#region lib/hooks/use-barcode-scanner.ts
|
|
31
|
+
var x = "input, textarea, select, [contenteditable='true']", S = (e, t) => {
|
|
32
|
+
let { closest: n } = e ?? {};
|
|
33
|
+
return typeof n == "function" && n.call(e, t) !== null;
|
|
34
|
+
};
|
|
35
|
+
function C(e, { onScan: t, acceptIn: n, onKey: r, maxGap: i, minLength: a }) {
|
|
36
|
+
let o = h({
|
|
37
|
+
maxGap: i,
|
|
38
|
+
minLength: a
|
|
39
|
+
}), s = (e) => {
|
|
40
|
+
let i = e;
|
|
41
|
+
if (i.ctrlKey || i.metaKey || i.altKey || i.repeat) return;
|
|
42
|
+
if (S(i.target, x) && !(n && S(i.target, n))) {
|
|
43
|
+
o.reset();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
let a = o.feed(i.key, i.timeStamp);
|
|
47
|
+
a.kind === "scan" && (i.preventDefault(), i.stopPropagation(), t(a.code)), r?.(i, {
|
|
48
|
+
result: a,
|
|
49
|
+
pending: o.pending
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
return e.addEventListener("keydown", s, !0), () => e.removeEventListener("keydown", s, !0);
|
|
53
|
+
}
|
|
54
|
+
function w(e) {
|
|
55
|
+
let t = s(e);
|
|
56
|
+
t.current = e;
|
|
57
|
+
let { enabled: n = !0, acceptIn: r, maxGap: a, minLength: o } = e;
|
|
58
|
+
i(() => {
|
|
59
|
+
if (n) return C(document, {
|
|
60
|
+
acceptIn: r,
|
|
61
|
+
maxGap: a,
|
|
62
|
+
minLength: o,
|
|
63
|
+
onScan: (e) => t.current.onScan(e),
|
|
64
|
+
onKey: (e, n) => t.current.onKey?.(e, n)
|
|
65
|
+
});
|
|
66
|
+
}, [
|
|
67
|
+
n,
|
|
68
|
+
r,
|
|
69
|
+
a,
|
|
70
|
+
o
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
29
74
|
//#region lib/hooks/drafts-store.ts
|
|
30
|
-
function
|
|
75
|
+
function T(e, t, n) {
|
|
31
76
|
let r = {};
|
|
32
77
|
try {
|
|
33
78
|
let i = e?.getItem(t);
|
|
@@ -41,7 +86,7 @@ function _(e, t, n) {
|
|
|
41
86
|
} catch {}
|
|
42
87
|
return r;
|
|
43
88
|
}
|
|
44
|
-
function
|
|
89
|
+
function E(e, t, n, r) {
|
|
45
90
|
try {
|
|
46
91
|
let i = Object.keys(n);
|
|
47
92
|
if (i.length === 0) {
|
|
@@ -55,34 +100,34 @@ function v(e, t, n, r) {
|
|
|
55
100
|
}
|
|
56
101
|
//#endregion
|
|
57
102
|
//#region lib/hooks/use-drafts.ts
|
|
58
|
-
function
|
|
103
|
+
function D() {
|
|
59
104
|
try {
|
|
60
105
|
return window.sessionStorage;
|
|
61
106
|
} catch {
|
|
62
107
|
return;
|
|
63
108
|
}
|
|
64
109
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
110
|
+
var O = (e) => JSON.parse(e);
|
|
111
|
+
function k(e) {
|
|
67
112
|
try {
|
|
68
|
-
return e === void 0 ?
|
|
113
|
+
return e === void 0 ? D() : typeof e == "function" ? e() : e;
|
|
69
114
|
} catch {
|
|
70
115
|
return;
|
|
71
116
|
}
|
|
72
117
|
}
|
|
73
|
-
function
|
|
118
|
+
function A(e, t) {
|
|
74
119
|
try {
|
|
75
|
-
|
|
120
|
+
k(t)?.removeItem(e);
|
|
76
121
|
} catch {}
|
|
77
122
|
}
|
|
78
|
-
function
|
|
79
|
-
let { serialize: n = JSON.stringify, parse: a =
|
|
123
|
+
function j(e, t = {}) {
|
|
124
|
+
let { serialize: n = JSON.stringify, parse: a = O, storage: l } = t, [u, d] = c({
|
|
80
125
|
key: e,
|
|
81
126
|
drafts: {},
|
|
82
127
|
loaded: !1
|
|
83
|
-
}), f = s(u), p = u.key === e, m = p ? u.drafts :
|
|
128
|
+
}), f = s(u), p = u.key === e, m = p ? u.drafts : M, h = p && u.loaded;
|
|
84
129
|
i(() => {
|
|
85
|
-
let t =
|
|
130
|
+
let t = T(k(l), e, a), n = f.current, r = {
|
|
86
131
|
key: e,
|
|
87
132
|
drafts: n.key === e ? {
|
|
88
133
|
...t,
|
|
@@ -93,41 +138,41 @@ function C(e, t = {}) {
|
|
|
93
138
|
f.current = r, d(r);
|
|
94
139
|
}, [e]);
|
|
95
140
|
let g = r((t) => {
|
|
96
|
-
let r =
|
|
141
|
+
let r = k(l), i = f.current, o = i.key === e && i.loaded, s = {
|
|
97
142
|
key: e,
|
|
98
|
-
drafts: t(o ? i.drafts :
|
|
143
|
+
drafts: t(o ? i.drafts : T(r, e, a)),
|
|
99
144
|
loaded: o
|
|
100
145
|
};
|
|
101
|
-
|
|
102
|
-
}, [e]),
|
|
146
|
+
E(r, e, s.drafts, n), f.current = s, d(s);
|
|
147
|
+
}, [e]), _ = r((e, t) => g((n) => ({
|
|
103
148
|
...n,
|
|
104
149
|
[e]: t
|
|
105
|
-
})), [g]),
|
|
150
|
+
})), [g]), v = r((e) => g((t) => {
|
|
106
151
|
let { [e]: n, ...r } = t;
|
|
107
152
|
return r;
|
|
108
|
-
}), [g]),
|
|
153
|
+
}), [g]), y = r(() => g(() => ({})), [g]);
|
|
109
154
|
return {
|
|
110
155
|
get: r((e) => m[e], [m]),
|
|
111
|
-
set:
|
|
112
|
-
drop:
|
|
113
|
-
clear:
|
|
156
|
+
set: _,
|
|
157
|
+
drop: v,
|
|
158
|
+
clear: y,
|
|
114
159
|
keys: o(() => Object.keys(m), [m]),
|
|
115
160
|
loaded: h
|
|
116
161
|
};
|
|
117
162
|
}
|
|
118
|
-
var
|
|
163
|
+
var M = {};
|
|
119
164
|
//#endregion
|
|
120
165
|
//#region lib/hooks/use-formatters.ts
|
|
121
|
-
function
|
|
166
|
+
function N(t = {}) {
|
|
122
167
|
let n = e(), r = t.locale ?? n?.language ?? "en", { timeZone: i } = t;
|
|
123
|
-
return o(() =>
|
|
168
|
+
return o(() => _({
|
|
124
169
|
locale: r,
|
|
125
170
|
timeZone: i
|
|
126
171
|
}), [r, i]);
|
|
127
172
|
}
|
|
128
173
|
//#endregion
|
|
129
174
|
//#region lib/hooks/use-navigation.ts
|
|
130
|
-
function
|
|
175
|
+
function P(e, t) {
|
|
131
176
|
let n = d();
|
|
132
177
|
return r(() => {
|
|
133
178
|
n(e, t);
|
|
@@ -137,7 +182,7 @@ function E(e, t) {
|
|
|
137
182
|
t
|
|
138
183
|
]);
|
|
139
184
|
}
|
|
140
|
-
function
|
|
185
|
+
function F(e) {
|
|
141
186
|
let t = d();
|
|
142
187
|
return o(() => e.map(({ to: e, options: n }) => () => {
|
|
143
188
|
t(e, n);
|
|
@@ -145,7 +190,7 @@ function D(e) {
|
|
|
145
190
|
}
|
|
146
191
|
//#endregion
|
|
147
192
|
//#region lib/hooks/use-number-formatter.ts
|
|
148
|
-
function
|
|
193
|
+
function I() {
|
|
149
194
|
let t = e(), i = r((e, r) => n(e, {
|
|
150
195
|
...r,
|
|
151
196
|
language: t?.language
|
|
@@ -161,7 +206,7 @@ function O() {
|
|
|
161
206
|
}
|
|
162
207
|
//#endregion
|
|
163
208
|
//#region lib/hooks/use-options.ts
|
|
164
|
-
function
|
|
209
|
+
function L(e, { filter: t, value: n, label: r, expanded: i }) {
|
|
165
210
|
return e.filter((e) => e && (t?.(e) ?? !0)).map((e) => {
|
|
166
211
|
let t = typeof n == "function" ? n(e) : e[n]?.toString() ?? "", a = "";
|
|
167
212
|
return a = typeof r == "function" ? r(e) : Array.isArray(r) ? r.map((t) => e[t]).filter(Boolean).join(" ") : e[r]?.toString() ?? "", {
|
|
@@ -171,9 +216,9 @@ function k(e, { filter: t, value: n, label: r, expanded: i }) {
|
|
|
171
216
|
};
|
|
172
217
|
});
|
|
173
218
|
}
|
|
174
|
-
function
|
|
219
|
+
function R(e, t) {
|
|
175
220
|
let { filter: n, value: r, label: i, expanded: a } = t;
|
|
176
|
-
return o(() =>
|
|
221
|
+
return o(() => L(e, {
|
|
177
222
|
filter: n,
|
|
178
223
|
value: r,
|
|
179
224
|
label: i,
|
|
@@ -186,13 +231,13 @@ function A(e, t) {
|
|
|
186
231
|
a
|
|
187
232
|
]);
|
|
188
233
|
}
|
|
189
|
-
function
|
|
234
|
+
function z(e) {
|
|
190
235
|
return e?.edges?.map((e) => e.node) ?? [];
|
|
191
236
|
}
|
|
192
237
|
//#endregion
|
|
193
238
|
//#region lib/hooks/poll.ts
|
|
194
|
-
var
|
|
195
|
-
function
|
|
239
|
+
var B = () => typeof document > "u" || document.visibilityState === "visible";
|
|
240
|
+
function V({ ms: e, read: t, active: n = () => !0, visible: r = B, onError: i, flight: a = { current: !1 } }) {
|
|
196
241
|
let o = !1, s = setInterval(() => {
|
|
197
242
|
a.current || !n() || !r() || (a.current = !0, new Promise((e) => e(t())).catch((e) => {
|
|
198
243
|
o || i?.(e);
|
|
@@ -206,7 +251,7 @@ function N({ ms: e, read: t, active: n = () => !0, visible: r = M, onError: i, f
|
|
|
206
251
|
}
|
|
207
252
|
//#endregion
|
|
208
253
|
//#region lib/hooks/use-poll.ts
|
|
209
|
-
function
|
|
254
|
+
function H({ ms: e, enabled: t = !0, read: n, onError: r }) {
|
|
210
255
|
let o = s({
|
|
211
256
|
read: n,
|
|
212
257
|
onError: r
|
|
@@ -217,7 +262,7 @@ function P({ ms: e, enabled: t = !0, read: n, onError: r }) {
|
|
|
217
262
|
onError: r
|
|
218
263
|
};
|
|
219
264
|
}), i(() => {
|
|
220
|
-
if (t) return
|
|
265
|
+
if (t) return V({
|
|
221
266
|
ms: e,
|
|
222
267
|
read: () => o.current.read(),
|
|
223
268
|
onError: (e) => o.current.onError?.(e),
|
|
@@ -227,7 +272,7 @@ function P({ ms: e, enabled: t = !0, read: n, onError: r }) {
|
|
|
227
272
|
}
|
|
228
273
|
//#endregion
|
|
229
274
|
//#region lib/hooks/use-react-router-block.ts
|
|
230
|
-
var
|
|
275
|
+
var U = (e) => {
|
|
231
276
|
let t = u(e);
|
|
232
277
|
return {
|
|
233
278
|
state: t.state,
|
|
@@ -237,14 +282,14 @@ var F = (e) => {
|
|
|
237
282
|
};
|
|
238
283
|
//#endregion
|
|
239
284
|
//#region lib/hooks/use-search-param.ts
|
|
240
|
-
function
|
|
285
|
+
function W(e) {
|
|
241
286
|
let [t, n] = f();
|
|
242
287
|
return o(() => t.get(e), [t, e]);
|
|
243
288
|
}
|
|
244
289
|
//#endregion
|
|
245
290
|
//#region lib/hooks/use-unsaved-guard/guard-core.ts
|
|
246
|
-
var
|
|
247
|
-
function
|
|
291
|
+
var G = (e) => typeof e == "function" ? e() : e;
|
|
292
|
+
function K(e) {
|
|
248
293
|
let t = !1, n, r = () => {
|
|
249
294
|
n !== void 0 && clearTimeout(n), n = void 0;
|
|
250
295
|
}, i = () => {
|
|
@@ -257,27 +302,27 @@ function R(e) {
|
|
|
257
302
|
rearm: i,
|
|
258
303
|
dispose: r,
|
|
259
304
|
shouldBlock(n, r) {
|
|
260
|
-
if (!
|
|
305
|
+
if (!y({
|
|
261
306
|
dirty: !0,
|
|
262
307
|
released: !1,
|
|
263
308
|
context: n,
|
|
264
309
|
...r
|
|
265
310
|
})) return !1;
|
|
266
311
|
let a = t;
|
|
267
|
-
return i(), !a &&
|
|
312
|
+
return i(), !a && G(e());
|
|
268
313
|
},
|
|
269
314
|
shouldWarnUnload() {
|
|
270
|
-
return !t &&
|
|
315
|
+
return !t && G(e());
|
|
271
316
|
}
|
|
272
317
|
};
|
|
273
318
|
}
|
|
274
|
-
function
|
|
319
|
+
function q(e, t) {
|
|
275
320
|
let n = (e) => {
|
|
276
321
|
t.shouldWarnUnload() && (e.preventDefault(), e.returnValue = "");
|
|
277
322
|
};
|
|
278
323
|
return e.addEventListener("beforeunload", n), () => e.removeEventListener("beforeunload", n);
|
|
279
324
|
}
|
|
280
|
-
async function
|
|
325
|
+
async function J(e) {
|
|
281
326
|
if (!e) return !1;
|
|
282
327
|
try {
|
|
283
328
|
return await e() === !0;
|
|
@@ -287,13 +332,13 @@ async function B(e) {
|
|
|
287
332
|
}
|
|
288
333
|
//#endregion
|
|
289
334
|
//#region lib/hooks/use-unsaved-guard/use-discard-guard.tsx
|
|
290
|
-
function
|
|
335
|
+
function Y(e, n = {}) {
|
|
291
336
|
let i = s(e);
|
|
292
337
|
i.current = e;
|
|
293
338
|
let [a, o] = c(null);
|
|
294
339
|
return {
|
|
295
340
|
close: r((e) => {
|
|
296
|
-
|
|
341
|
+
G(i.current) ? o(() => e) : e();
|
|
297
342
|
}, []),
|
|
298
343
|
dialog: /* @__PURE__ */ l(t, {
|
|
299
344
|
...n,
|
|
@@ -309,10 +354,10 @@ function V(e, n = {}) {
|
|
|
309
354
|
}
|
|
310
355
|
//#endregion
|
|
311
356
|
//#region lib/hooks/use-unsaved-guard/use-unsaved-guard.tsx
|
|
312
|
-
function
|
|
313
|
-
i(() =>
|
|
357
|
+
function X(e) {
|
|
358
|
+
i(() => q(window, e), [e]);
|
|
314
359
|
}
|
|
315
|
-
function
|
|
360
|
+
function Z(e, t) {
|
|
316
361
|
let [n, r] = c(!1), a = s(!1), o = s(e);
|
|
317
362
|
o.current = e;
|
|
318
363
|
let l = s(t);
|
|
@@ -321,7 +366,7 @@ function U(e, t) {
|
|
|
321
366
|
a.current = !1, r(!1);
|
|
322
367
|
return;
|
|
323
368
|
}
|
|
324
|
-
a.current || (a.current = !0,
|
|
369
|
+
a.current || (a.current = !0, J(l.current).then((e) => {
|
|
325
370
|
e ? o.current.proceed() : r(!0);
|
|
326
371
|
}));
|
|
327
372
|
}, [e.state]), {
|
|
@@ -330,14 +375,14 @@ function U(e, t) {
|
|
|
330
375
|
blockerRef: o
|
|
331
376
|
};
|
|
332
377
|
}
|
|
333
|
-
function
|
|
378
|
+
function Q(e, n) {
|
|
334
379
|
let { block: a, leaves: o, ignoreSearch: u, onBlock: d, ...f } = n, p = s(e);
|
|
335
380
|
p.current = e;
|
|
336
|
-
let [m] = c(() =>
|
|
381
|
+
let [m] = c(() => K(() => p.current)), h = s(!1), { asking: g, setAsking: _, blockerRef: v } = Z(a((e) => m.shouldBlock(e, {
|
|
337
382
|
leaves: o,
|
|
338
383
|
ignoreSearch: u
|
|
339
384
|
})), d);
|
|
340
|
-
|
|
385
|
+
X(m), i(() => m.dispose, [m]);
|
|
341
386
|
let y = typeof e == "boolean" ? e : void 0;
|
|
342
387
|
return i(() => {
|
|
343
388
|
y && m.rearm();
|
|
@@ -362,4 +407,4 @@ function W(e, n) {
|
|
|
362
407
|
};
|
|
363
408
|
}
|
|
364
409
|
//#endregion
|
|
365
|
-
export { m as _,
|
|
410
|
+
export { y as C, v as S, m as _, H as a, w as b, z as c, P as d, F as f, p as g, j as h, U as i, R as l, A as m, Y as n, V as o, N as p, W as r, L as s, Q as t, I as u, C as v, b as x, g as y };
|
package/dist/hooks.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./use-ssr-media-query-C6M5m8sf.js";
|
|
2
2
|
import { a as t, i as n, o as r, r as i, s as a } from "./theme-store-BdPp43cV.js";
|
|
3
3
|
import { n as o, t as s } from "./use-theme-BCLireTd.js";
|
|
4
|
-
import { a as c, f as l, g as u, i as d, o as f, p, r as m, s as h, t as g } from "./use-heading-spy-
|
|
4
|
+
import { a as c, f as l, g as u, i as d, o as f, p, r as m, s as h, t as g } from "./use-heading-spy-FIZlf9qj.js";
|
|
5
5
|
import { r as _ } from "./use-csp-nonce-ZKs9k-ov.js";
|
|
6
6
|
import { t as v } from "./use-mobile-BDro060N.js";
|
|
7
7
|
import { t as y } from "./use-scroll-away-PQRFZkT2.js";
|
|
8
|
-
import {
|
|
9
|
-
export { i as DEFAULT_THEME, n as applyResolvedTheme, t as applyThemeName,
|
|
8
|
+
import { C as b, S as x, _ as S, a as C, b as w, c as T, d as E, f as D, g as O, h as k, i as A, l as j, m as M, n as N, o as P, p as F, r as I, s as L, t as R, u as z, v as B, x as V, y as H } from "./hooks-C3vkQmzh.js";
|
|
9
|
+
export { O as DEFAULT_SCANNER_MAX_GAP, S as DEFAULT_SCANNER_MIN_LENGTH, i as DEFAULT_THEME, n as applyResolvedTheme, t as applyThemeName, B as attachBarcodeScanner, L as buildOptions, d as busySettler, M as clearDrafts, H as createScanner, c as createSubmitGuard, T as extractNode, x as isLeaving, r as resolveTheme, a as resolveThemeName, b as shouldBlockNavigation, P as startPoll, V as useAllowedTransitions, w as useBarcodeScanner, m as useCountdown, _ as useCspNonce, N as useDiscardGuard, k as useDrafts, h as useFocusOnMount, F as useFormatters, g as useHeadingSpy, o as useIsClient, v as useIsMobile, l as useLatched, p as useLatchedWhileClosed, u as useLocalizedDate, E as useNavigationHandler, D as useNavigationHandlers, z as useNumberFormatter, j as useOptions, C as usePoll, A as useReactRouterBlock, y as useScrollAway, I as useSearchParam, e as useSsrMediaQuery, f as useSubmitOnce, s as useTheme, R as useUnsavedGuard };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { o as t } from "./dist-DVRQkaTK.js";
|
|
3
3
|
import { i as n, r, t as i } from "./dist-DWZXlCZR.js";
|
|
4
|
-
import { S as a, d as o, f as s, l as c, p as l, x as u } from "./spinner-
|
|
4
|
+
import { S as a, d as o, f as s, l as c, p as l, x as u } from "./spinner-CEVomQ5K.js";
|
|
5
5
|
import { a as d, i as f } from "./dist-DHdUUM1w.js";
|
|
6
6
|
import { t as p } from "./in-dialog-D61Yeaol.js";
|
|
7
7
|
import { i as m } from "./escape-owner-DpaP0lm1.js";
|
package/dist/i18n.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./is-production-GLw59WU8.js";
|
|
2
|
-
import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-
|
|
3
|
-
import { i as u, n as d, r as f, t as p } from "./translate-material-
|
|
2
|
+
import { c as t, d as n, i as r, l as i, n as a, o, r as s, t as c, u as l } from "./translator-Cgql9srO.js";
|
|
3
|
+
import { i as u, n as d, r as f, t as p } from "./translate-material-s_lxIV43.js";
|
|
4
4
|
import { o as m, t as h } from "./merge-BCZE6HGq.js";
|
|
5
|
-
import { t as g } from "./use-material-translation-
|
|
5
|
+
import { t as g } from "./use-material-translation-xNzbSVgS.js";
|
|
6
6
|
import { useCallback as _ } from "react";
|
|
7
7
|
//#region lib/i18n/merge-resources.ts
|
|
8
8
|
function v(e, t, n = "") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./icon-button-
|
|
2
|
+
import { t } from "./icon-button-CpKxV264.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/components/ui/actions/icon-button/icon-badge.tsx
|
|
5
5
|
function r({ children: r, className: i, ...a }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
2
|
import { n as t } from "./use-shape-morph-BKA_R5P5.js";
|
|
3
3
|
import { n, t as r } from "./dist-DVRQkaTK.js";
|
|
4
|
-
import { n as i, t as a } from "./spinner-
|
|
4
|
+
import { n as i, t as a } from "./spinner-CEVomQ5K.js";
|
|
5
5
|
import { t as o } from "./dist-DkQbkF9T.js";
|
|
6
6
|
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./use-click-lock-Bwg_caHO.js";
|
|
7
7
|
import { t as m } from "./is-production-GLw59WU8.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region lib/components/ui/widgets/keypad/key-layout.ts
|
|
2
|
+
var e = (e) => e.map((e) => ({
|
|
3
|
+
...e,
|
|
4
|
+
span: (e.span ?? 1) * 3
|
|
5
|
+
})), t = (e, t) => t && e.alt ? {
|
|
6
|
+
...e,
|
|
7
|
+
...e.alt
|
|
8
|
+
} : e, n = (e) => e.sequence ?? [e.key], r = (e, t) => ({
|
|
9
|
+
key: `material.calculator.keys.${e}`,
|
|
10
|
+
fallback: t
|
|
11
|
+
}), i = (e, t, n, i, a, o, s) => ({
|
|
12
|
+
id: e,
|
|
13
|
+
key: t,
|
|
14
|
+
glyph: n,
|
|
15
|
+
role: i,
|
|
16
|
+
name: r(a, o),
|
|
17
|
+
span: s
|
|
18
|
+
}), a = [
|
|
19
|
+
"zero",
|
|
20
|
+
"one",
|
|
21
|
+
"two",
|
|
22
|
+
"three",
|
|
23
|
+
"four",
|
|
24
|
+
"five",
|
|
25
|
+
"six",
|
|
26
|
+
"seven",
|
|
27
|
+
"eight",
|
|
28
|
+
"nine"
|
|
29
|
+
], o = (e, t) => i(`d${e}`, String(e), String(e), "digit", a[e] ?? "zero", String(e), t);
|
|
30
|
+
//#endregion
|
|
31
|
+
export { r as a, n as i, t as n, e as o, i as r, o as t };
|