@krosoft/react 0.0.381 → 0.0.382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/core/cards/DashboardCard.js +18 -0
- package/dist/components/core/cards/KpiCard.js +36 -0
- package/dist/components/core/cards/KpiCards.js +29 -0
- package/dist/components/core/cards/MetricCard.js +63 -0
- package/dist/components/core/cards/SkeletonCard.js +13 -0
- package/dist/components/core/cards/SkeletonCards.js +11 -0
- package/dist/components/core/cards/index.js +7 -1
- package/dist/components/core/changelog/AppChangelog.js +123 -0
- package/dist/components/core/changelog/AppChangelogEntry.js +85 -0
- package/dist/components/core/changelog/AppChangelogNav.js +39 -0
- package/dist/components/core/changelog/AppChangelogTagFilter.js +39 -0
- package/dist/components/core/changelog/index.js +1 -1
- package/dist/components/core/charts/BarChartHorizontal.js +80 -0
- package/dist/components/core/charts/BarChartVertical.js +68 -0
- package/dist/components/core/charts/ChartCard.js +44 -0
- package/dist/components/core/charts/CircularGauge.js +58 -0
- package/dist/components/core/charts/LineChart.js +69 -0
- package/dist/components/core/charts/PieChart.js +55 -0
- package/dist/components/core/charts/chartColors.js +10 -0
- package/dist/components/core/charts/chartTooltip.helper.js +15 -0
- package/dist/components/core/charts/index.js +8 -1
- package/dist/components/core/dialogs/AboutDialog.js +59 -0
- package/dist/components/core/dialogs/AppDialog.js +81 -0
- package/dist/components/core/dialogs/ConfirmationDialog.js +42 -0
- package/dist/components/core/dialogs/FormDialog.js +105 -0
- package/dist/components/core/dialogs/index.js +7 -4
- package/dist/components/core/filters/ActiveFilters.js +69 -0
- package/dist/components/core/filters/AdvancedFilters.js +103 -0
- package/dist/components/core/filters/ConditionFilter.js +162 -0
- package/dist/components/core/filters/ConditionFilterGroup.js +44 -0
- package/dist/components/core/filters/FilterField.js +64 -0
- package/dist/components/core/filters/FilterPills.js +13 -0
- package/dist/components/core/filters/FilterPillsGroup.js +39 -0
- package/dist/components/core/filters/FiltersContainer.js +54 -0
- package/dist/components/core/filters/FiltersMobileDrawer.js +57 -0
- package/dist/components/core/filters/TableFilter.js +101 -0
- package/dist/components/core/filters/index.js +11 -645
- package/dist/{GenericForm-Dxd6k7l-.js → components/core/forms/GenericForm.js} +45 -43
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/icons/FlagFrIcon.js +28 -0
- package/dist/{icons-n0m_1w7z.js → components/core/icons/FlagGbIcon.js} +3 -26
- package/dist/components/core/icons/index.js +3 -1
- package/dist/components/core/index.js +71 -27
- package/dist/components/core/inputs/DatePicker.js +46 -0
- package/dist/components/core/inputs/DateRangePicker.js +92 -0
- package/dist/{inputs-CBojnClc.js → components/core/inputs/FileDropzone.js} +8 -37
- package/dist/{ImageInput-BeIOm3GY.js → components/core/inputs/ImageInput.js} +5 -5
- package/dist/components/core/inputs/MultiSelect.js +191 -0
- package/dist/components/core/inputs/RatingInput.js +36 -0
- package/dist/{SearchInput-IT_Rvthr.js → components/core/inputs/SearchInput.js} +4 -4
- package/dist/components/core/inputs/SingleSelect.js +198 -0
- package/dist/components/core/inputs/index.js +9 -6
- package/dist/components/core/inputs/select.helper.js +46 -0
- package/dist/{language-DY0EYabh.js → components/core/language/LanguageSelector.js} +13 -12
- package/dist/components/core/language/index.js +1 -1
- package/dist/{AppActions-8HjAaTQK.js → components/core/layouts/AppActions.js} +19 -19
- package/dist/components/core/layouts/AppPageHeader.js +44 -0
- package/dist/{AppSubTitle-DI62BaaB.js → components/core/layouts/AppSubTitle.js} +3 -3
- package/dist/{AppTitle-BXoTrXQc.js → components/core/layouts/AppTitle.js} +3 -3
- package/dist/components/core/layouts/KpiCardsLayout.js +8 -0
- package/dist/components/core/layouts/index.js +6 -50
- package/dist/components/core/markdown/AppMarkdown.js +134 -0
- package/dist/components/core/markdown/AppMarkdownHeading.js +45 -0
- package/dist/components/core/markdown/index.js +1 -1
- package/dist/components/core/navbar/GlobalSearch.js +128 -0
- package/dist/components/core/navbar/NotificationsBell.js +133 -0
- package/dist/components/core/navbar/Sidebar.js +99 -0
- package/dist/components/core/navbar/SidebarHeader.js +26 -0
- package/dist/components/core/navbar/SidebarNavItem.js +72 -0
- package/dist/components/core/navbar/Topbar.js +25 -0
- package/dist/components/core/navbar/index.js +7 -1
- package/dist/{ErrorAlert-cJnfBL8H.js → components/core/states/ErrorAlert.js} +5 -5
- package/dist/{states-CJ8xE_Nm.js → components/core/states/ErrorState.js} +4 -11
- package/dist/components/core/states/LoadingState.js +12 -0
- package/dist/components/core/states/index.js +3 -2
- package/dist/components/core/table/DataTable.js +108 -0
- package/dist/components/core/table/JsonTableOutput.js +75 -0
- package/dist/components/core/table/TableActions.js +75 -0
- package/dist/components/core/table/TableBody.js +130 -0
- package/dist/components/core/table/TableBulkActions.js +47 -0
- package/dist/components/core/table/TableHeader.js +103 -0
- package/dist/components/core/table/TablePagination.js +102 -0
- package/dist/components/core/table/TableSettings.js +117 -0
- package/dist/components/core/table/index.js +9 -709
- package/dist/components/core/tabs/AppTabContainer.js +17 -0
- package/dist/components/core/tabs/AppTabHeader.js +19 -0
- package/dist/components/core/tabs/AppTabs.js +56 -0
- package/dist/components/core/tabs/AppVerticalTabs.js +105 -0
- package/dist/components/core/tabs/index.js +5 -188
- package/dist/{theme-DSumNHLX.js → components/core/theme/ThemeSelector.js} +13 -12
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +117 -34
- package/dist/components/ui/accordion.js +34 -0
- package/dist/components/ui/alert-dialog.js +54 -0
- package/dist/{alert-REQGK9bR.js → components/ui/alert.js} +2 -2
- package/dist/components/ui/aspect-ratio.js +5 -0
- package/dist/components/ui/avatar.js +25 -0
- package/dist/components/ui/badge.js +22 -0
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/{tooltip-_geGvbS7.js → components/ui/button.js} +7 -17
- package/dist/components/ui/calendar.js +44 -0
- package/dist/components/ui/card.js +42 -0
- package/dist/components/ui/carousel.js +115 -0
- package/dist/{chart-wW-fwL3s.js → components/ui/chart.js} +51 -89
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/command.js +84 -0
- package/dist/components/ui/context-menu.js +71 -0
- package/dist/components/ui/control.js +5 -0
- package/dist/components/ui/dialog.js +49 -0
- package/dist/components/ui/drawer.js +47 -0
- package/dist/components/ui/dropdown-menu.js +72 -0
- package/dist/components/ui/form.js +78 -0
- package/dist/components/ui/hover-card.js +15 -0
- package/dist/components/ui/index.js +49 -9
- package/dist/components/ui/input-otp.js +41 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/label.js +14 -0
- package/dist/components/ui/menubar.js +86 -0
- package/dist/components/ui/navigation-menu.js +58 -0
- package/dist/components/ui/pagination.js +62 -0
- package/dist/components/ui/popover.js +15 -0
- package/dist/components/ui/progress.js +17 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/resizable.js +18 -0
- package/dist/components/ui/scroll-area.js +29 -0
- package/dist/{select-KWMg2_7Z.js → components/ui/select.js} +3 -3
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/sheet.js +58 -0
- package/dist/components/ui/simple-table.js +57 -0
- package/dist/{skeleton-D6Ga4BLw.js → components/ui/skeleton.js} +2 -2
- package/dist/components/ui/slider.js +17 -0
- package/dist/components/ui/sonner.js +23 -0
- package/dist/components/ui/switch.js +14 -0
- package/dist/components/ui/tabs.js +58 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.js +53 -0
- package/dist/components/ui/toaster.js +22 -0
- package/dist/components/ui/toggle-group.js +37 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.js +14 -0
- package/dist/{datatable-COQcYUrk.js → constants/datatable.js} +1 -1
- package/dist/constants/index.js +3 -5
- package/dist/constants/search.js +4 -0
- package/dist/contexts/index.js +3 -1
- package/dist/{sidebar.context-BahtU6hE.js → contexts/page.context.js} +2 -2
- package/dist/contexts/sidebar.context.js +5 -0
- package/dist/helpers/changelog.helper.js +69 -0
- package/dist/helpers/index.js +6 -166
- package/dist/{markdown.helper-YJE2H5KQ.js → helpers/markdown.helper.js} +1 -1
- package/dist/helpers/supabase.helper.js +41 -0
- package/dist/helpers/table.helper.js +56 -0
- package/dist/{tailwind.helper-CJaRYBmL.js → helpers/tailwind.helper.js} +1 -1
- package/dist/hooks/behavior/index.js +10 -1
- package/dist/hooks/behavior/useConfirmDeleteDialog.js +21 -0
- package/dist/hooks/behavior/useConfirmationDialog.js +23 -0
- package/dist/hooks/behavior/useDebounce.js +14 -0
- package/dist/hooks/behavior/useDebouncedValue.js +15 -0
- package/dist/hooks/behavior/useDialog.js +21 -0
- package/dist/hooks/behavior/usePage.js +10 -0
- package/dist/hooks/behavior/useSidebar.js +10 -0
- package/dist/hooks/behavior/useTable.js +83 -0
- package/dist/hooks/behavior/useUrlState.js +46 -0
- package/dist/hooks/index.js +20 -11
- package/dist/hooks/ui/index.js +11 -10
- package/dist/{useFixedColumns-Bo-Az3Hp.js → hooks/ui/useDataTable.js} +16 -52
- package/dist/{useDocumentTitle-VoQkict_.js → hooks/ui/useDocumentTitle.js} +2 -2
- package/dist/hooks/ui/useFixedColumns.js +38 -0
- package/dist/{useLanguage-DRnSb5H1.js → hooks/ui/useLanguage.js} +3 -3
- package/dist/{useMobile-pTQ8lWvt.js → hooks/ui/useMobile.js} +1 -1
- package/dist/{useNotifications-CyhTruIG.js → hooks/ui/useNotifications.js} +2 -2
- package/dist/{useScrollFade-D9kqJBDh.js → hooks/ui/useScrollFade.js} +1 -1
- package/dist/{ui-nQGnCss1.js → hooks/ui/useServerTable.js} +2 -2
- package/dist/{useTheme-DIZjiF5F.js → hooks/ui/useTheme.js} +3 -3
- package/dist/{useToast-UeDRLovh.js → hooks/ui/useToast.js} +1 -1
- package/dist/i18n/index.js +4 -1
- package/dist/i18n/krosoftLocales.js +13 -0
- package/dist/i18n/useDateFnsLocale.js +13 -0
- package/dist/i18n/useKrosoftTranslation.js +13 -0
- package/dist/locales/en.json.js +174 -0
- package/dist/locales/fr.json.js +174 -0
- package/dist/providers/SidebarProvider.js +42 -0
- package/dist/providers/index.js +1 -42
- package/dist/pwa/PwaUpdater.js +30 -0
- package/dist/pwa/index.js +3 -50
- package/dist/pwa/pwaUpdateToast.js +25 -0
- package/dist/seasonal/EffectSwitch.js +24 -0
- package/dist/seasonal/EmojiSnowfall.js +24 -0
- package/dist/seasonal/HalloweenEffect.js +17 -0
- package/dist/seasonal/SeasonalEffects.js +8 -0
- package/dist/seasonal/SeasonalEffectsSettings.js +35 -0
- package/dist/seasonal/SnowEffect.js +12 -0
- package/dist/seasonal/index.js +7 -120
- package/dist/seasonal/overlayStyle.js +12 -0
- package/dist/seasonal/seasons.js +7 -0
- package/dist/seasonal/useSeasonalEffects.js +20 -0
- package/dist/seasonal/useStoredToggle.js +21 -0
- package/dist/tailwind/index.js +7 -53
- package/dist/tokens/apply.js +16 -0
- package/dist/tokens/index.js +3 -38
- package/dist/tokens/radius.js +26 -0
- package/dist/types/index.js +0 -1
- package/dist/vendor/tailwindcss/lib/public/create-plugin.js +19 -0
- package/dist/vendor/tailwindcss/lib/util/createPlugin.js +30 -0
- package/dist/vendor/tailwindcss/plugin.js +10 -0
- package/package.json +3 -3
- package/dist/AppMarkdown-CAxm82x0.js +0 -171
- package/dist/MultiSelect-DPN046kI.js +0 -228
- package/dist/SingleSelect-DLY5WylQ.js +0 -313
- package/dist/behavior-B0BYivtN.js +0 -201
- package/dist/cards-DPzVebUM.js +0 -132
- package/dist/changelog-DyPFIscf.js +0 -257
- package/dist/charts-C7rKxkli.js +0 -342
- package/dist/dialogs-CG9Q7pqY.js +0 -269
- package/dist/i18n-BhLphJa3.js +0 -364
- package/dist/navbar-DD0V0pNE.js +0 -432
- package/dist/sheet-cWJO_wkT.js +0 -225
- package/dist/switch-DspImmo_.js +0 -24
- package/dist/ui-Fxy95kSJ.js +0 -1163
package/dist/dialogs-CG9Q7pqY.js
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { r as t, t as n } from "./i18n-BhLphJa3.js";
|
|
3
|
-
import { Bn as r, F as i, Gn as a, Hn as o, Rn as s, Un as c, Vn as l, Wn as u } from "./ui-Fxy95kSJ.js";
|
|
4
|
-
import { c as d } from "./tooltip-_geGvbS7.js";
|
|
5
|
-
import { E as f, O as p, P as m, j as h, k as g } from "./sheet-cWJO_wkT.js";
|
|
6
|
-
import { t as _ } from "./ErrorAlert-cJnfBL8H.js";
|
|
7
|
-
import { t as v } from "./GenericForm-Dxd6k7l-.js";
|
|
8
|
-
import { useEffect as y, useId as b, useState as x } from "react";
|
|
9
|
-
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
10
|
-
import { Pen as T, Save as E, X as D } from "lucide-react";
|
|
11
|
-
import { format as O, isValid as k } from "date-fns";
|
|
12
|
-
//#region src/components/core/dialogs/AppDialog.tsx
|
|
13
|
-
var A = {
|
|
14
|
-
sm: "sm:max-w-sm",
|
|
15
|
-
md: "sm:max-w-md",
|
|
16
|
-
lg: "sm:max-w-lg",
|
|
17
|
-
xl: "sm:max-w-xl",
|
|
18
|
-
"2xl": "sm:max-w-2xl",
|
|
19
|
-
"3xl": "sm:max-w-3xl",
|
|
20
|
-
"4xl": "sm:max-w-4xl",
|
|
21
|
-
full: "sm:max-w-[95vw]"
|
|
22
|
-
};
|
|
23
|
-
function j({ open: t, onOpenChange: r, config: a, isLoading: o, error: s, footer: c, className: l, children: u }) {
|
|
24
|
-
let { t: v } = n(), { title: y, description: b, icon: x, size: S = "xl", maxWidth: T, actions: E, headerClassName: D, footerClassName: O } = a, k = o === !0, j = (e) => typeof e == "string" ? v(e) : e, M = (e) => {
|
|
25
|
-
(e || !k) && r(e);
|
|
26
|
-
}, N = c !== void 0 || E !== void 0 && E.length > 0;
|
|
27
|
-
return /* @__PURE__ */ C(f, {
|
|
28
|
-
open: t,
|
|
29
|
-
onOpenChange: M,
|
|
30
|
-
children: /* @__PURE__ */ w(p, {
|
|
31
|
-
className: e("max-h-[100dvh] sm:max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden", "[&>button]:text-dialog-header-foreground [&>button]:focus:ring-dialog-header-foreground", k && "[&>button]:pointer-events-none [&>button]:opacity-40", T ?? A[S], l),
|
|
32
|
-
children: [
|
|
33
|
-
k ? /* @__PURE__ */ C("div", {
|
|
34
|
-
className: "absolute top-0 left-0 right-0 z-10",
|
|
35
|
-
children: /* @__PURE__ */ C(i, {
|
|
36
|
-
indeterminate: !0,
|
|
37
|
-
className: "h-1 rounded-none"
|
|
38
|
-
})
|
|
39
|
-
}) : null,
|
|
40
|
-
/* @__PURE__ */ w(h, {
|
|
41
|
-
className: e("bg-gradient-to-r from-dialog-header-from to-dialog-header-to p-4 sm:p-6 pr-12 sm:pr-12 sm:rounded-t-surface shrink-0", D),
|
|
42
|
-
children: [/* @__PURE__ */ w(m, {
|
|
43
|
-
className: "text-xl sm:text-2xl font-bold flex items-center gap-2 text-dialog-header-foreground",
|
|
44
|
-
children: [x === void 0 ? null : /* @__PURE__ */ C("div", {
|
|
45
|
-
className: "p-2 bg-dialog-header-foreground/20 rounded-control",
|
|
46
|
-
children: /* @__PURE__ */ C(x, { className: "size-4 text-dialog-header-foreground" })
|
|
47
|
-
}), j(y)]
|
|
48
|
-
}), b !== void 0 && b !== "" ? /* @__PURE__ */ C(g, {
|
|
49
|
-
className: "text-dialog-header-foreground/80 text-base",
|
|
50
|
-
children: j(b)
|
|
51
|
-
}) : null]
|
|
52
|
-
}),
|
|
53
|
-
s ? /* @__PURE__ */ C("div", {
|
|
54
|
-
className: "px-4 sm:px-6 pt-4",
|
|
55
|
-
children: /* @__PURE__ */ C(_, {
|
|
56
|
-
error: s,
|
|
57
|
-
className: "max-w-full"
|
|
58
|
-
})
|
|
59
|
-
}) : null,
|
|
60
|
-
/* @__PURE__ */ C("div", {
|
|
61
|
-
className: "flex-1 overflow-y-auto px-4 sm:px-6 py-4",
|
|
62
|
-
children: u
|
|
63
|
-
}),
|
|
64
|
-
N ? /* @__PURE__ */ C("div", {
|
|
65
|
-
className: e("sm:rounded-b-surface border-t border-border bg-muted/40 shrink-0 p-4 sm:p-6", O),
|
|
66
|
-
children: c ?? /* @__PURE__ */ C("div", {
|
|
67
|
-
className: "flex justify-end gap-3",
|
|
68
|
-
children: E?.map((e) => /* @__PURE__ */ w(d, {
|
|
69
|
-
type: e.type ?? "button",
|
|
70
|
-
form: e.form,
|
|
71
|
-
variant: e.variant ?? "default",
|
|
72
|
-
onClick: e.onClick,
|
|
73
|
-
disabled: e.disabled === !0 || k && e.disableOnLoading !== !1,
|
|
74
|
-
className: e.className,
|
|
75
|
-
children: [e.icon === void 0 ? null : /* @__PURE__ */ C(e.icon, { className: "size-4" }), v(e.label)]
|
|
76
|
-
}, e.id ?? e.label))
|
|
77
|
-
})
|
|
78
|
-
}) : null
|
|
79
|
-
]
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/components/core/dialogs/FormDialog.tsx
|
|
85
|
-
function M({ open: e, onOpenChange: t, data: r, title: i, headerBadge: a, schema: o, onSave: s, customFooter: c, defaultEditing: l = !1, footerActions: u = !0, saveLabel: f, cancelLabel: p, hideSaveIcon: m = !1, size: h = "4xl", maxWidth: g, isLoading: _ = !1 }) {
|
|
86
|
-
let { t: O } = n(), k = f ?? O("actions.save"), [A, M] = x(l), [N, P] = x(!1), F = b();
|
|
87
|
-
if (y(() => {
|
|
88
|
-
e && M(l);
|
|
89
|
-
}, [e, l]), r == null) return null;
|
|
90
|
-
let I = () => {
|
|
91
|
-
M(!0);
|
|
92
|
-
}, L = () => {
|
|
93
|
-
M(!1);
|
|
94
|
-
}, R = async (e) => {
|
|
95
|
-
if (s) {
|
|
96
|
-
P(!0);
|
|
97
|
-
try {
|
|
98
|
-
await s(e), M(!1);
|
|
99
|
-
} catch (e) {
|
|
100
|
-
console.error(e);
|
|
101
|
-
} finally {
|
|
102
|
-
P(!1);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}, z = [];
|
|
106
|
-
s !== void 0 && (A ? (p !== "" && z.push({
|
|
107
|
-
label: p ?? O("actions.cancel"),
|
|
108
|
-
onClick: L,
|
|
109
|
-
variant: "outline",
|
|
110
|
-
disabled: N || _,
|
|
111
|
-
icon: D
|
|
112
|
-
}), z.push({
|
|
113
|
-
label: N ? O("actions.saving") : k,
|
|
114
|
-
type: "submit",
|
|
115
|
-
form: F,
|
|
116
|
-
variant: "default",
|
|
117
|
-
disabled: N || _,
|
|
118
|
-
icon: m ? void 0 : E
|
|
119
|
-
})) : z.push({
|
|
120
|
-
label: O("actions.edit"),
|
|
121
|
-
onClick: I,
|
|
122
|
-
variant: "outline",
|
|
123
|
-
icon: T
|
|
124
|
-
}));
|
|
125
|
-
let B = {
|
|
126
|
-
title: i(r),
|
|
127
|
-
size: h,
|
|
128
|
-
maxWidth: g,
|
|
129
|
-
actions: u ? z : []
|
|
130
|
-
};
|
|
131
|
-
return /* @__PURE__ */ C(j, {
|
|
132
|
-
open: e,
|
|
133
|
-
onOpenChange: (e) => {
|
|
134
|
-
t(e), e || L();
|
|
135
|
-
},
|
|
136
|
-
config: B,
|
|
137
|
-
isLoading: N || _,
|
|
138
|
-
children: /* @__PURE__ */ w("div", { children: [
|
|
139
|
-
a === void 0 ? null : /* @__PURE__ */ C("div", {
|
|
140
|
-
className: "mb-4",
|
|
141
|
-
children: a(r)
|
|
142
|
-
}),
|
|
143
|
-
/* @__PURE__ */ C(v, {
|
|
144
|
-
id: F,
|
|
145
|
-
schema: o,
|
|
146
|
-
initialData: r,
|
|
147
|
-
disabled: !A,
|
|
148
|
-
onSubmit: (e) => {
|
|
149
|
-
R(e);
|
|
150
|
-
},
|
|
151
|
-
renderActions: !1,
|
|
152
|
-
isLoading: N || _
|
|
153
|
-
}),
|
|
154
|
-
c === void 0 ? null : c(r),
|
|
155
|
-
s !== void 0 && !u ? /* @__PURE__ */ C("div", {
|
|
156
|
-
className: "flex justify-end gap-2 border-t pt-4 mt-6",
|
|
157
|
-
children: A ? /* @__PURE__ */ w(S, { children: [p === "" ? null : /* @__PURE__ */ w(d, {
|
|
158
|
-
onClick: L,
|
|
159
|
-
variant: "outline",
|
|
160
|
-
size: "sm",
|
|
161
|
-
disabled: N || _,
|
|
162
|
-
children: [/* @__PURE__ */ C(D, { className: "size-4 mr-2" }), p ?? O("actions.cancel")]
|
|
163
|
-
}), /* @__PURE__ */ w(d, {
|
|
164
|
-
type: "submit",
|
|
165
|
-
form: F,
|
|
166
|
-
size: "sm",
|
|
167
|
-
disabled: N || _,
|
|
168
|
-
className: "text-white",
|
|
169
|
-
children: [m ? null : /* @__PURE__ */ C(E, { className: "size-4 mr-2" }), N ? O("actions.saving") : k]
|
|
170
|
-
})] }) : /* @__PURE__ */ w(d, {
|
|
171
|
-
onClick: I,
|
|
172
|
-
variant: "outline",
|
|
173
|
-
size: "sm",
|
|
174
|
-
children: [/* @__PURE__ */ C(T, { className: "size-4 mr-2" }), O("actions.edit")]
|
|
175
|
-
})
|
|
176
|
-
}) : null
|
|
177
|
-
] })
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/components/core/dialogs/ConfirmationDialog.tsx
|
|
182
|
-
function N({ isLoading: e, error: t, config: i, destructive: f = !1 }) {
|
|
183
|
-
let { t: p } = n();
|
|
184
|
-
return i ? /* @__PURE__ */ C(s, {
|
|
185
|
-
open: i.isOpen,
|
|
186
|
-
onOpenChange: (t) => {
|
|
187
|
-
!t && !e && i.onClose();
|
|
188
|
-
},
|
|
189
|
-
children: /* @__PURE__ */ w(l, { children: [
|
|
190
|
-
/* @__PURE__ */ w(u, { children: [
|
|
191
|
-
/* @__PURE__ */ w(a, {
|
|
192
|
-
className: i.titleClassName,
|
|
193
|
-
children: [i.icon && /* @__PURE__ */ C(i.icon, { className: "size-4" }), p(i.title)]
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ C(o, { children: p(i.description) }),
|
|
196
|
-
i.itemName && /* @__PURE__ */ C(o, { children: /* @__PURE__ */ C("span", {
|
|
197
|
-
className: "font-semibold block my-2",
|
|
198
|
-
children: i.itemName
|
|
199
|
-
}) })
|
|
200
|
-
] }),
|
|
201
|
-
/* @__PURE__ */ C(_, { error: t }),
|
|
202
|
-
/* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(r, {
|
|
203
|
-
disabled: e,
|
|
204
|
-
children: p("actions.cancel")
|
|
205
|
-
}), /* @__PURE__ */ C(d, {
|
|
206
|
-
onClick: (e) => {
|
|
207
|
-
e.preventDefault(), i.onConfirm();
|
|
208
|
-
},
|
|
209
|
-
disabled: e,
|
|
210
|
-
className: f ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "",
|
|
211
|
-
children: p(e ? i.loadingKey ?? "states.loading" : i.confirmKey)
|
|
212
|
-
})] })
|
|
213
|
-
] })
|
|
214
|
-
}) : null;
|
|
215
|
-
}
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region src/components/core/dialogs/AboutDialog.tsx
|
|
218
|
-
var P = (e, t) => {
|
|
219
|
-
let n = e instanceof Date ? e : new Date(e);
|
|
220
|
-
return k(n) ? O(n, "Pp", { locale: t }) : String(e);
|
|
221
|
-
}, F = ({ open: r, onOpenChange: i, info: a, logo: o, title: s = "about.title", className: c }) => {
|
|
222
|
-
let { t: l } = n(), u = t(), d = [
|
|
223
|
-
{
|
|
224
|
-
label: l("about.version"),
|
|
225
|
-
value: a.version
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
label: l("about.environment"),
|
|
229
|
-
value: a.environment
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
label: l("about.buildDate"),
|
|
233
|
-
value: a.buildDate ? P(a.buildDate, u) : void 0
|
|
234
|
-
}
|
|
235
|
-
].filter((e) => e.value);
|
|
236
|
-
return /* @__PURE__ */ C(f, {
|
|
237
|
-
open: r,
|
|
238
|
-
onOpenChange: i,
|
|
239
|
-
children: /* @__PURE__ */ w(p, {
|
|
240
|
-
className: e("sm:max-w-sm", c),
|
|
241
|
-
"aria-describedby": void 0,
|
|
242
|
-
children: [
|
|
243
|
-
/* @__PURE__ */ C(h, {
|
|
244
|
-
className: "mb-6",
|
|
245
|
-
children: /* @__PURE__ */ C(m, { children: l(s) })
|
|
246
|
-
}),
|
|
247
|
-
o && /* @__PURE__ */ C("div", {
|
|
248
|
-
className: "flex justify-center",
|
|
249
|
-
children: o
|
|
250
|
-
}),
|
|
251
|
-
/* @__PURE__ */ C("dl", {
|
|
252
|
-
className: "grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-sm",
|
|
253
|
-
children: d.map(({ label: e, value: t }) => /* @__PURE__ */ w("div", {
|
|
254
|
-
className: "contents",
|
|
255
|
-
children: [/* @__PURE__ */ C("dt", {
|
|
256
|
-
className: "text-muted-foreground",
|
|
257
|
-
children: e
|
|
258
|
-
}), /* @__PURE__ */ C("dd", {
|
|
259
|
-
className: "font-mono",
|
|
260
|
-
children: t
|
|
261
|
-
})]
|
|
262
|
-
}, e))
|
|
263
|
-
})
|
|
264
|
-
]
|
|
265
|
-
})
|
|
266
|
-
});
|
|
267
|
-
};
|
|
268
|
-
//#endregion
|
|
269
|
-
export { j as i, N as n, M as r, F as t };
|
package/dist/i18n-BhLphJa3.js
DELETED
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
import { enGB as e, fr as t } from "date-fns/locale";
|
|
2
|
-
import { useTranslation as n } from "react-i18next";
|
|
3
|
-
var r = {
|
|
4
|
-
actions: {
|
|
5
|
-
cancel: "Cancel",
|
|
6
|
-
save: "Save",
|
|
7
|
-
saving: "Saving...",
|
|
8
|
-
edit: "Edit",
|
|
9
|
-
delete: "Delete",
|
|
10
|
-
deleting: "Deleting...",
|
|
11
|
-
clear: "Clear",
|
|
12
|
-
apply: "Apply"
|
|
13
|
-
},
|
|
14
|
-
states: {
|
|
15
|
-
loading: "Loading...",
|
|
16
|
-
error: "Something went wrong.",
|
|
17
|
-
errorPrefix: "Error:",
|
|
18
|
-
errorTitle: "Error",
|
|
19
|
-
noResult: "No result",
|
|
20
|
-
noResultDot: "No result.",
|
|
21
|
-
noData: "No data available",
|
|
22
|
-
underConstruction: "Section under development",
|
|
23
|
-
comingSoon: "This feature will be available soon"
|
|
24
|
-
},
|
|
25
|
-
search: {
|
|
26
|
-
trigger: "Search",
|
|
27
|
-
placeholder: "Search...",
|
|
28
|
-
globalTitle: "Global search",
|
|
29
|
-
globalDescription: "Search for a page or a record across the application.",
|
|
30
|
-
commandTitle: "Command palette",
|
|
31
|
-
commandDescription: "Search for a command to run.",
|
|
32
|
-
loading: "Searching...",
|
|
33
|
-
historyTitle: "Recent searches",
|
|
34
|
-
removeFromHistory: "Remove from history"
|
|
35
|
-
},
|
|
36
|
-
notifications: {
|
|
37
|
-
trigger: "Notifications",
|
|
38
|
-
title: "Notifications",
|
|
39
|
-
empty: "No notifications.",
|
|
40
|
-
markAllAsRead: "Mark all as read",
|
|
41
|
-
remove: "Delete notification",
|
|
42
|
-
seeAll: "See all"
|
|
43
|
-
},
|
|
44
|
-
select: {
|
|
45
|
-
placeholder: "Select...",
|
|
46
|
-
create: "Create “{{search}}”",
|
|
47
|
-
section: "Select a section",
|
|
48
|
-
theme: "Select a theme",
|
|
49
|
-
language: "Select a language"
|
|
50
|
-
},
|
|
51
|
-
date: {
|
|
52
|
-
pickDate: "Select a date",
|
|
53
|
-
pickPeriod: "Select a period",
|
|
54
|
-
clearPeriod: "Clear the selected period"
|
|
55
|
-
},
|
|
56
|
-
filters: {
|
|
57
|
-
title: "Filters",
|
|
58
|
-
filter: "Filter",
|
|
59
|
-
reset: "Reset",
|
|
60
|
-
advanced: "Advanced filters",
|
|
61
|
-
more: "More filters",
|
|
62
|
-
active: "Active filters:",
|
|
63
|
-
apply: "Search",
|
|
64
|
-
clear: "Clear filters",
|
|
65
|
-
clearAll: "Clear all",
|
|
66
|
-
selectAll: "Select all",
|
|
67
|
-
deselectAll: "Deselect all",
|
|
68
|
-
remove: "Remove",
|
|
69
|
-
yes: "Yes",
|
|
70
|
-
no: "No",
|
|
71
|
-
condition: {
|
|
72
|
-
label: "Condition",
|
|
73
|
-
field: "Field",
|
|
74
|
-
selectField: "Choose a field...",
|
|
75
|
-
operator: "Operator",
|
|
76
|
-
value: "Value",
|
|
77
|
-
apply: "Apply",
|
|
78
|
-
clear: "Remove filter",
|
|
79
|
-
add: "Condition"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
form: {
|
|
83
|
-
validationTitle: "Validation error",
|
|
84
|
-
validationMessage: "Please check the form fields",
|
|
85
|
-
submitError: "Something went wrong while saving"
|
|
86
|
-
},
|
|
87
|
-
image: {
|
|
88
|
-
empty: "No image",
|
|
89
|
-
upload: "Click or drag an image",
|
|
90
|
-
drop: "Drop the image here",
|
|
91
|
-
invalidType: "Only {{types}} files are accepted",
|
|
92
|
-
tooLarge: "The file must not exceed {{size}}MB"
|
|
93
|
-
},
|
|
94
|
-
dropzone: {
|
|
95
|
-
title: "Drag and drop your files here",
|
|
96
|
-
hint: "or click to browse",
|
|
97
|
-
uploading: "Uploading…"
|
|
98
|
-
},
|
|
99
|
-
table: {
|
|
100
|
-
columnsTitle: "Displayed columns",
|
|
101
|
-
showAllColumns: "All",
|
|
102
|
-
hideAllColumns: "None",
|
|
103
|
-
previousPage: "Previous page",
|
|
104
|
-
nextPage: "Next page",
|
|
105
|
-
selectedCount: "{{count}} selected",
|
|
106
|
-
clearSelection: "Clear selection",
|
|
107
|
-
rangeOfTotal: "{{range}} of {{total}}",
|
|
108
|
-
perPage: "{{count}} / page",
|
|
109
|
-
tableMode: "Table mode",
|
|
110
|
-
property: "Property",
|
|
111
|
-
value: "Value"
|
|
112
|
-
},
|
|
113
|
-
sidebar: {
|
|
114
|
-
menu: "Navigation menu",
|
|
115
|
-
description: "Main navigation of the application"
|
|
116
|
-
},
|
|
117
|
-
language: {
|
|
118
|
-
description: "Choose the interface language",
|
|
119
|
-
current: "Current language: {{language}}",
|
|
120
|
-
switchTo: "Switch to {{language}}",
|
|
121
|
-
updatedTitle: "Language updated",
|
|
122
|
-
updatedMessage: "The language has been changed to {{language}}."
|
|
123
|
-
},
|
|
124
|
-
theme: {
|
|
125
|
-
system: "Automatic (system)",
|
|
126
|
-
systemMessage: "The theme automatically follows your system preferences",
|
|
127
|
-
light: "Light",
|
|
128
|
-
dark: "Dark",
|
|
129
|
-
updatedTitle: "Theme updated",
|
|
130
|
-
updatedMessage: "The theme has been changed to {{theme}}."
|
|
131
|
-
},
|
|
132
|
-
pwa: {
|
|
133
|
-
updateAvailable: "A new version is available.",
|
|
134
|
-
updateAction: "Refresh",
|
|
135
|
-
updateDismiss: "Dismiss"
|
|
136
|
-
},
|
|
137
|
-
seasonal: {
|
|
138
|
-
snow: {
|
|
139
|
-
label: "Snow effect",
|
|
140
|
-
description: "Show snowflakes in December",
|
|
141
|
-
toastEnabled: "❄️ Snow effect enabled",
|
|
142
|
-
toastDisabled: "❄️ Snow effect disabled",
|
|
143
|
-
messageEnabled: "Snowflakes are now visible.",
|
|
144
|
-
messageDisabled: "Snowflakes have been hidden."
|
|
145
|
-
},
|
|
146
|
-
halloween: {
|
|
147
|
-
label: "Halloween effect",
|
|
148
|
-
description: "Show pumpkins and bats from October 25 to November 2",
|
|
149
|
-
toastEnabled: "🎃 Halloween effect enabled",
|
|
150
|
-
toastDisabled: "🎃 Halloween effect disabled",
|
|
151
|
-
messageEnabled: "The pumpkins are out.",
|
|
152
|
-
messageDisabled: "The pumpkins have been put away."
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
about: {
|
|
156
|
-
title: "About",
|
|
157
|
-
version: "Version",
|
|
158
|
-
environment: "Environment",
|
|
159
|
-
buildDate: "Build date"
|
|
160
|
-
},
|
|
161
|
-
markdown: {
|
|
162
|
-
copyLink: "Copy link to this section",
|
|
163
|
-
linkCopied: "Link copied to clipboard.",
|
|
164
|
-
linkCopyError: "Unable to copy the link."
|
|
165
|
-
},
|
|
166
|
-
changelog: {
|
|
167
|
-
nav: "Dates",
|
|
168
|
-
empty: "No release notes.",
|
|
169
|
-
noResult: "No release note matches your criteria.",
|
|
170
|
-
tagsPlaceholder: "Categories",
|
|
171
|
-
version: "Version {{version}}"
|
|
172
|
-
}
|
|
173
|
-
}, i = {
|
|
174
|
-
actions: {
|
|
175
|
-
cancel: "Annuler",
|
|
176
|
-
save: "Enregistrer",
|
|
177
|
-
saving: "Enregistrement...",
|
|
178
|
-
edit: "Modifier",
|
|
179
|
-
delete: "Supprimer",
|
|
180
|
-
deleting: "Suppression...",
|
|
181
|
-
clear: "Effacer",
|
|
182
|
-
apply: "Appliquer"
|
|
183
|
-
},
|
|
184
|
-
states: {
|
|
185
|
-
loading: "Chargement...",
|
|
186
|
-
error: "Une erreur est survenue.",
|
|
187
|
-
errorPrefix: "Erreur :",
|
|
188
|
-
errorTitle: "Erreur",
|
|
189
|
-
noResult: "Aucun résultat",
|
|
190
|
-
noResultDot: "Aucun résultat.",
|
|
191
|
-
noData: "Aucune donnée disponible",
|
|
192
|
-
underConstruction: "Section en cours de développement",
|
|
193
|
-
comingSoon: "Cette fonctionnalité sera bientôt disponible"
|
|
194
|
-
},
|
|
195
|
-
search: {
|
|
196
|
-
trigger: "Rechercher",
|
|
197
|
-
placeholder: "Rechercher...",
|
|
198
|
-
globalTitle: "Recherche globale",
|
|
199
|
-
globalDescription: "Rechercher une page ou une donnée dans l'application.",
|
|
200
|
-
commandTitle: "Palette de commandes",
|
|
201
|
-
commandDescription: "Rechercher une commande à exécuter.",
|
|
202
|
-
loading: "Recherche...",
|
|
203
|
-
historyTitle: "Recherches récentes",
|
|
204
|
-
removeFromHistory: "Retirer de l'historique"
|
|
205
|
-
},
|
|
206
|
-
notifications: {
|
|
207
|
-
trigger: "Notifications",
|
|
208
|
-
title: "Notifications",
|
|
209
|
-
empty: "Aucune notification.",
|
|
210
|
-
markAllAsRead: "Tout marquer comme lu",
|
|
211
|
-
remove: "Supprimer la notification",
|
|
212
|
-
seeAll: "Voir tout"
|
|
213
|
-
},
|
|
214
|
-
select: {
|
|
215
|
-
placeholder: "Sélectionner...",
|
|
216
|
-
create: "Créer « {{search}} »",
|
|
217
|
-
section: "Sélectionner une section",
|
|
218
|
-
theme: "Sélectionner un thème",
|
|
219
|
-
language: "Sélectionner une langue"
|
|
220
|
-
},
|
|
221
|
-
date: {
|
|
222
|
-
pickDate: "Sélectionner une date",
|
|
223
|
-
pickPeriod: "Sélectionner une période",
|
|
224
|
-
clearPeriod: "Effacer la période sélectionnée"
|
|
225
|
-
},
|
|
226
|
-
filters: {
|
|
227
|
-
title: "Filtres",
|
|
228
|
-
filter: "Filtrer",
|
|
229
|
-
reset: "Réinitialiser",
|
|
230
|
-
advanced: "Filtres avancés",
|
|
231
|
-
more: "Plus de filtres",
|
|
232
|
-
active: "Filtres actifs :",
|
|
233
|
-
apply: "Rechercher",
|
|
234
|
-
clear: "Effacer les filtres",
|
|
235
|
-
clearAll: "Effacer tout",
|
|
236
|
-
selectAll: "Tout sélectionner",
|
|
237
|
-
deselectAll: "Tout désélectionner",
|
|
238
|
-
remove: "Retirer",
|
|
239
|
-
yes: "Oui",
|
|
240
|
-
no: "Non",
|
|
241
|
-
condition: {
|
|
242
|
-
label: "Condition",
|
|
243
|
-
field: "Champ",
|
|
244
|
-
selectField: "Choisir un champ...",
|
|
245
|
-
operator: "Opérateur",
|
|
246
|
-
value: "Valeur",
|
|
247
|
-
apply: "Appliquer",
|
|
248
|
-
clear: "Retirer le filtre",
|
|
249
|
-
add: "Condition"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
form: {
|
|
253
|
-
validationTitle: "Erreur de validation",
|
|
254
|
-
validationMessage: "Veuillez vérifier les champs du formulaire",
|
|
255
|
-
submitError: "Une erreur est survenue lors de l'enregistrement"
|
|
256
|
-
},
|
|
257
|
-
image: {
|
|
258
|
-
empty: "Aucune image",
|
|
259
|
-
upload: "Cliquer ou glisser une image",
|
|
260
|
-
drop: "Déposer l'image ici",
|
|
261
|
-
invalidType: "Seuls les fichiers {{types}} sont acceptés",
|
|
262
|
-
tooLarge: "Le fichier ne doit pas dépasser {{size}}MB"
|
|
263
|
-
},
|
|
264
|
-
dropzone: {
|
|
265
|
-
title: "Glissez-déposez vos fichiers ici",
|
|
266
|
-
hint: "ou cliquez pour parcourir",
|
|
267
|
-
uploading: "Envoi en cours…"
|
|
268
|
-
},
|
|
269
|
-
table: {
|
|
270
|
-
columnsTitle: "Colonnes affichées",
|
|
271
|
-
showAllColumns: "Tout",
|
|
272
|
-
hideAllColumns: "Aucun",
|
|
273
|
-
previousPage: "Page précédente",
|
|
274
|
-
nextPage: "Page suivante",
|
|
275
|
-
selectedCount: "{{count}} sélectionné(s)",
|
|
276
|
-
clearSelection: "Désélectionner",
|
|
277
|
-
rangeOfTotal: "{{range}} sur {{total}}",
|
|
278
|
-
perPage: "{{count}} / page",
|
|
279
|
-
tableMode: "Mode tableau",
|
|
280
|
-
property: "Propriété",
|
|
281
|
-
value: "Valeur"
|
|
282
|
-
},
|
|
283
|
-
sidebar: {
|
|
284
|
-
menu: "Menu de navigation",
|
|
285
|
-
description: "Navigation principale de l'application"
|
|
286
|
-
},
|
|
287
|
-
language: {
|
|
288
|
-
description: "Choisissez la langue de l'interface",
|
|
289
|
-
current: "Langue actuelle : {{language}}",
|
|
290
|
-
switchTo: "Passer en {{language}}",
|
|
291
|
-
updatedTitle: "Langue mise à jour",
|
|
292
|
-
updatedMessage: "La langue a été changée vers {{language}}."
|
|
293
|
-
},
|
|
294
|
-
theme: {
|
|
295
|
-
system: "Automatique (système)",
|
|
296
|
-
systemMessage: "Le thème suit automatiquement les préférences de votre système",
|
|
297
|
-
light: "Clair",
|
|
298
|
-
dark: "Sombre",
|
|
299
|
-
updatedTitle: "Thème mis à jour",
|
|
300
|
-
updatedMessage: "Le thème a été changé vers {{theme}}."
|
|
301
|
-
},
|
|
302
|
-
pwa: {
|
|
303
|
-
updateAvailable: "Une nouvelle version est disponible.",
|
|
304
|
-
updateAction: "Actualiser",
|
|
305
|
-
updateDismiss: "Ignorer"
|
|
306
|
-
},
|
|
307
|
-
seasonal: {
|
|
308
|
-
snow: {
|
|
309
|
-
label: "Effet neige",
|
|
310
|
-
description: "Afficher les flocons de neige en décembre",
|
|
311
|
-
toastEnabled: "❄️ Effet neige activé",
|
|
312
|
-
toastDisabled: "❄️ Effet neige désactivé",
|
|
313
|
-
messageEnabled: "Les flocons de neige sont maintenant visibles.",
|
|
314
|
-
messageDisabled: "Les flocons de neige ont été masqués."
|
|
315
|
-
},
|
|
316
|
-
halloween: {
|
|
317
|
-
label: "Effet Halloween",
|
|
318
|
-
description: "Afficher citrouilles et chauves-souris du 25 octobre au 2 novembre",
|
|
319
|
-
toastEnabled: "🎃 Effet Halloween activé",
|
|
320
|
-
toastDisabled: "🎃 Effet Halloween désactivé",
|
|
321
|
-
messageEnabled: "Les citrouilles sont de sortie.",
|
|
322
|
-
messageDisabled: "Les citrouilles ont été rangées."
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
about: {
|
|
326
|
-
title: "À propos",
|
|
327
|
-
version: "Version",
|
|
328
|
-
environment: "Environnement",
|
|
329
|
-
buildDate: "Date de build"
|
|
330
|
-
},
|
|
331
|
-
markdown: {
|
|
332
|
-
copyLink: "Copier le lien vers cette section",
|
|
333
|
-
linkCopied: "Lien copié dans le presse-papiers.",
|
|
334
|
-
linkCopyError: "Impossible de copier le lien."
|
|
335
|
-
},
|
|
336
|
-
changelog: {
|
|
337
|
-
nav: "Dates",
|
|
338
|
-
empty: "Aucune note de version.",
|
|
339
|
-
noResult: "Aucune note ne correspond à vos critères.",
|
|
340
|
-
tagsPlaceholder: "Catégories",
|
|
341
|
-
version: "Version {{version}}"
|
|
342
|
-
}
|
|
343
|
-
}, a = "krosoft", o = {
|
|
344
|
-
fr: i,
|
|
345
|
-
en: r
|
|
346
|
-
}, s = (e, { overwrite: t = !1 } = {}) => {
|
|
347
|
-
typeof e.addResourceBundle == "function" && Object.entries(o).forEach(([n, r]) => {
|
|
348
|
-
e.addResourceBundle?.(n, a, r, !0, t);
|
|
349
|
-
});
|
|
350
|
-
}, c = {
|
|
351
|
-
fr: t,
|
|
352
|
-
en: e
|
|
353
|
-
}, l = t, u = (e) => e === void 0 ? l : c[e.split("-")[0]] ?? l, d = () => {
|
|
354
|
-
let { i18n: e, ready: t } = n(a, { useSuspense: !1 });
|
|
355
|
-
return u(t ? e.resolvedLanguage ?? e.language : void 0);
|
|
356
|
-
}, f = (e) => {
|
|
357
|
-
let t = e.split(".").reduce((e, t) => typeof e == "object" && e ? e[t] : void 0, i);
|
|
358
|
-
return typeof t == "string" ? t : void 0;
|
|
359
|
-
}, p = (e, t) => t === void 0 ? e : e.replace(/\{\{(\w+)\}\}/g, (e, n) => n in t ? String(t[n]) : e), m = () => {
|
|
360
|
-
let { t: e, i18n: t, ready: r } = n(a, { useSuspense: !1 }), { t: i } = n(void 0, { useSuspense: !1 });
|
|
361
|
-
return { t: (n, a) => r && t.exists(n) ? i(n, a ?? {}) : r && t.exists(n, { ns: "krosoft" }) ? e(n, a ?? {}) : p(f(n) ?? n, a) };
|
|
362
|
-
};
|
|
363
|
-
//#endregion
|
|
364
|
-
export { o as a, a as i, u as n, s as o, d as r, m as t };
|