wcz-test 4.5.5 → 4.6.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/dist/index.d.ts +18 -21
- package/dist/index.js +139 -109
- package/dist/index.js.map +1 -1
- package/package.json +4 -6
- package/dist/index.cjs +0 -4379
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -429
package/dist/index.d.ts
CHANGED
|
@@ -5,17 +5,16 @@ import { DropzoneOptions } from 'react-dropzone';
|
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { GridValidRowModel, GridRenderCellParams, GridColumnHeaderParams, GridActionsCellItemProps } from '@mui/x-data-grid-premium';
|
|
7
7
|
import { LinkComponent, ErrorComponentProps, LinkOptions } from '@tanstack/react-router';
|
|
8
|
-
import { TFunction } from 'i18next';
|
|
9
|
-
export { t } from 'i18next';
|
|
10
8
|
export { uuidv7 } from 'uuidv7';
|
|
11
9
|
import * as axios from 'axios';
|
|
12
|
-
import * as _tanstack_start_client_core from '@tanstack/start-client-core';
|
|
13
10
|
import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
14
11
|
import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
|
|
15
12
|
import * as _tanstack_react_form from '@tanstack/react-form';
|
|
16
13
|
import * as _tanstack_form_core from '@tanstack/form-core';
|
|
17
14
|
export { default as useLocalStorageState } from 'use-local-storage-state';
|
|
18
15
|
export { useTranslation } from 'react-i18next';
|
|
16
|
+
import { TFunction } from 'i18next';
|
|
17
|
+
export { t } from 'i18next';
|
|
19
18
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
20
19
|
import { DefinedInitialDataOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
21
20
|
import { DetailedError } from 'tus-js-client';
|
|
@@ -118,20 +117,6 @@ interface RouterErrorProps {
|
|
|
118
117
|
}
|
|
119
118
|
declare const RouterError: FC<RouterErrorProps>;
|
|
120
119
|
|
|
121
|
-
interface User {
|
|
122
|
-
employeeId: string;
|
|
123
|
-
name: string;
|
|
124
|
-
department: string;
|
|
125
|
-
email?: string;
|
|
126
|
-
company: string;
|
|
127
|
-
category: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
interface NavigationParams {
|
|
131
|
-
user: User;
|
|
132
|
-
t: TFunction<"translation", undefined>;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
120
|
interface NavigationPageItem extends Pick<LinkOptions, "to">, Partial<Pick<LinkOptions, "href" | "params" | "search">> {
|
|
136
121
|
title: string;
|
|
137
122
|
icon: React.ReactNode;
|
|
@@ -151,7 +136,7 @@ type NavigationItem = NavigationPageItem | NavigationDivider | NavigationHeader;
|
|
|
151
136
|
type Navigation = Array<NavigationItem>;
|
|
152
137
|
|
|
153
138
|
interface ProvidersProps {
|
|
154
|
-
|
|
139
|
+
navigation?: Navigation;
|
|
155
140
|
theme?: Pick<CssVarsThemeOptions, "colorSchemes" | "components">;
|
|
156
141
|
children: ReactNode;
|
|
157
142
|
}
|
|
@@ -203,8 +188,6 @@ declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
|
|
|
203
188
|
};
|
|
204
189
|
declare const wczApiClient: axios.AxiosInstance;
|
|
205
190
|
|
|
206
|
-
declare const setSSRLanguage: _tanstack_start_client_core.ServerOnlyFn<[], Promise<void>>;
|
|
207
|
-
|
|
208
191
|
type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
|
|
209
192
|
|
|
210
193
|
type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
|
|
@@ -349,6 +332,20 @@ declare const useUploadFile: ({ subId, onSuccess, onError }: UseUploadFileProps)
|
|
|
349
332
|
progress: number;
|
|
350
333
|
};
|
|
351
334
|
|
|
335
|
+
interface User {
|
|
336
|
+
employeeId: string;
|
|
337
|
+
name: string;
|
|
338
|
+
department: string;
|
|
339
|
+
email?: string;
|
|
340
|
+
company: string;
|
|
341
|
+
category: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
interface NavigationParams {
|
|
345
|
+
user: User;
|
|
346
|
+
t: TFunction<"translation", undefined>;
|
|
347
|
+
}
|
|
348
|
+
|
|
352
349
|
interface EmailAttachment {
|
|
353
350
|
appName: string;
|
|
354
351
|
subId: string;
|
|
@@ -426,4 +423,4 @@ interface Department {
|
|
|
426
423
|
manager: Employee;
|
|
427
424
|
}
|
|
428
425
|
|
|
429
|
-
export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead,
|
|
426
|
+
export { ChipInputCell, type Department, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, type Employee, EmployeeCategoryGroup, EmployeeStatus, type FileMeta, FileViewer, LayoutProvider, type Navigation, type NavigationParams, PageHeader, Platform, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, TableContainer, TypographyWithIcon, type User, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, wczApiClient, withLayoutForm };
|
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment8 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment8;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -2587,8 +2587,7 @@ var AdapterDayjs = class {
|
|
|
2587
2587
|
};
|
|
2588
2588
|
|
|
2589
2589
|
// src/providers/LayoutProvider.tsx
|
|
2590
|
-
import { useEffect as useEffect6
|
|
2591
|
-
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
2590
|
+
import { useEffect as useEffect6 } from "react";
|
|
2592
2591
|
import * as z from "zod";
|
|
2593
2592
|
import { cs, en } from "zod/locales";
|
|
2594
2593
|
|
|
@@ -2662,40 +2661,27 @@ function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
|
2662
2661
|
] });
|
|
2663
2662
|
}
|
|
2664
2663
|
|
|
2664
|
+
// src/providers/LayoutProvider.tsx
|
|
2665
|
+
import { ThemeProvider } from "@mui/material";
|
|
2666
|
+
|
|
2665
2667
|
// src/utils/i18n.ts
|
|
2666
|
-
import { createIsomorphicFn } from "@tanstack/react-start";
|
|
2667
|
-
import { getCookie } from "@tanstack/react-start/server";
|
|
2668
2668
|
import i18n from "i18next";
|
|
2669
2669
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
2670
2670
|
import HttpBackend from "i18next-http-backend";
|
|
2671
2671
|
import { initReactI18next } from "react-i18next";
|
|
2672
2672
|
import { default as default2 } from "i18next";
|
|
2673
|
-
var i18nCookieName = "i18nextLng";
|
|
2674
2673
|
i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
2675
2674
|
fallbackLng: "en",
|
|
2676
|
-
detection: {
|
|
2677
|
-
order: ["cookie"],
|
|
2678
|
-
lookupCookie: i18nCookieName,
|
|
2679
|
-
caches: ["cookie"],
|
|
2680
|
-
cookieMinutes: 60 * 24 * 365
|
|
2681
|
-
},
|
|
2682
2675
|
interpolation: { escapeValue: false }
|
|
2683
2676
|
});
|
|
2684
|
-
var setSSRLanguage = createIsomorphicFn().server(async () => {
|
|
2685
|
-
const language = getCookie(i18nCookieName);
|
|
2686
|
-
await i18n.changeLanguage(language || "en");
|
|
2687
|
-
});
|
|
2688
|
-
|
|
2689
|
-
// src/contexts/LayoutContext.ts
|
|
2690
|
-
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
2691
|
-
var LayoutContext = createContext4(null);
|
|
2692
2677
|
|
|
2693
2678
|
// src/components/core/Layout.tsx
|
|
2694
2679
|
import Menu3 from "@mui/icons-material/Menu";
|
|
2695
2680
|
import MenuOpen from "@mui/icons-material/MenuOpen";
|
|
2696
2681
|
import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
|
|
2697
|
-
import {
|
|
2682
|
+
import { styled as styled2 } from "@mui/material/styles";
|
|
2698
2683
|
import { useIsFetching, useIsMutating } from "@tanstack/react-query";
|
|
2684
|
+
import { Fragment as Fragment7 } from "react";
|
|
2699
2685
|
import useLocalStorageState from "use-local-storage-state";
|
|
2700
2686
|
|
|
2701
2687
|
// src/components/core/navigation/NavigationRail.tsx
|
|
@@ -3054,25 +3040,6 @@ import Translate from "@mui/icons-material/Translate";
|
|
|
3054
3040
|
import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as ListItemButton5, ListItemIcon as ListItemIcon4, ListItemText as ListItemText4, ListSubheader as ListSubheader2, Menu as Menu2, Typography as Typography8, useColorScheme } from "@mui/material";
|
|
3055
3041
|
import { Fragment as Fragment6, useState as useState9 } from "react";
|
|
3056
3042
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
3057
|
-
|
|
3058
|
-
// src/auth-test/keycloak.ts
|
|
3059
|
-
import { useRouter } from "@tanstack/react-router";
|
|
3060
|
-
import Keycloak from "keycloak-js";
|
|
3061
|
-
var keycloakConfig = {
|
|
3062
|
-
url: import.meta.env.VITE_KEYCLOAK_URL,
|
|
3063
|
-
realm: import.meta.env.VITE_KEYCLOAK_REALM,
|
|
3064
|
-
clientId: import.meta.env.VITE_KEYCLOAK_CLIENT_ID,
|
|
3065
|
-
idpHint: import.meta.env.VITE_KEYCLOAK_IDP_HINT,
|
|
3066
|
-
confidentialClientId: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_ID,
|
|
3067
|
-
confidentialClientSecret: import.meta.env.VITE_KEYCLOAK_CONFIDENTIAL_CLIENT_SECRET
|
|
3068
|
-
};
|
|
3069
|
-
function useKeycloak() {
|
|
3070
|
-
const routerContext = useRouter();
|
|
3071
|
-
const keycloak = routerContext.options.context.keycloak;
|
|
3072
|
-
return keycloak;
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
// src/components/core/ToolbarAccount.tsx
|
|
3076
3043
|
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3077
3044
|
var ToolbarAccount = () => {
|
|
3078
3045
|
const [anchorElement, setAnchorElement] = useState9();
|
|
@@ -3087,8 +3054,11 @@ var ToolbarAccount = () => {
|
|
|
3087
3054
|
setMode(newMode);
|
|
3088
3055
|
closeMenu();
|
|
3089
3056
|
};
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3057
|
+
const user = {
|
|
3058
|
+
name: "Dalibor Homola",
|
|
3059
|
+
employeeId: "C2503017",
|
|
3060
|
+
department: "IT"
|
|
3061
|
+
};
|
|
3092
3062
|
const getModeText = () => {
|
|
3093
3063
|
switch (mode) {
|
|
3094
3064
|
case "light": {
|
|
@@ -3103,7 +3073,7 @@ var ToolbarAccount = () => {
|
|
|
3103
3073
|
}
|
|
3104
3074
|
};
|
|
3105
3075
|
const usernameInitials = () => {
|
|
3106
|
-
if (!user
|
|
3076
|
+
if (!user.name) return "";
|
|
3107
3077
|
const splittedName = user.name.split(" ");
|
|
3108
3078
|
return `${splittedName[0][0]}${splittedName.length > 1 ? splittedName[1][0] : ""}`;
|
|
3109
3079
|
};
|
|
@@ -3152,19 +3122,19 @@ var ToolbarAccount = () => {
|
|
|
3152
3122
|
/* @__PURE__ */ jsx26(ListItemButton5, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx26(ListItemText4, { primary: "\u010Ce\u0161tina" }) })
|
|
3153
3123
|
] });
|
|
3154
3124
|
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
3155
|
-
/* @__PURE__ */ jsx26(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user
|
|
3125
|
+
/* @__PURE__ */ jsx26(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx26(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx26(Typography8, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx26(AccountCircle, { fontSize: "large" }) }),
|
|
3156
3126
|
/* @__PURE__ */ jsx26(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs14(Box8, { sx: { width: 240 }, children: [
|
|
3157
|
-
/* @__PURE__ */ jsx26(List4, { children: user
|
|
3127
|
+
/* @__PURE__ */ jsx26(List4, { children: user.name ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
3158
3128
|
/* @__PURE__ */ jsx26(ListItem2, { children: /* @__PURE__ */ jsx26(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs14("span", { children: [
|
|
3159
3129
|
/* @__PURE__ */ jsx26("span", { children: user.employeeId }),
|
|
3160
3130
|
/* @__PURE__ */ jsx26("br", {}),
|
|
3161
3131
|
/* @__PURE__ */ jsx26("span", { children: user.department })
|
|
3162
3132
|
] }) }) }),
|
|
3163
|
-
/* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () =>
|
|
3133
|
+
/* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => console.log("Logout"), children: [
|
|
3164
3134
|
/* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Logout, { color: "error" }) }),
|
|
3165
3135
|
/* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Logout") })
|
|
3166
3136
|
] })
|
|
3167
|
-
] }) : /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () =>
|
|
3137
|
+
] }) : /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => console.log("Login"), children: [
|
|
3168
3138
|
/* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Login, { color: "success" }) }),
|
|
3169
3139
|
/* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.LogIn") })
|
|
3170
3140
|
] }) }),
|
|
@@ -3175,6 +3145,57 @@ var ToolbarAccount = () => {
|
|
|
3175
3145
|
] });
|
|
3176
3146
|
};
|
|
3177
3147
|
|
|
3148
|
+
// src/components/core/Layout.tsx
|
|
3149
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3150
|
+
var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
3151
|
+
display: "flex",
|
|
3152
|
+
alignItems: "center",
|
|
3153
|
+
justifyContent: "flex-end",
|
|
3154
|
+
padding: theme.spacing(0, 1),
|
|
3155
|
+
...theme.mixins.toolbar
|
|
3156
|
+
}));
|
|
3157
|
+
var Layout = (props) => {
|
|
3158
|
+
const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
|
|
3159
|
+
const isFetching = !!useIsFetching();
|
|
3160
|
+
const isMutating = !!useIsMutating();
|
|
3161
|
+
return /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
3162
|
+
/* @__PURE__ */ jsx27(InitColorSchemeScript, {}),
|
|
3163
|
+
/* @__PURE__ */ jsx27(CssBaseline, {}),
|
|
3164
|
+
/* @__PURE__ */ jsxs15(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
3165
|
+
/* @__PURE__ */ jsx27(
|
|
3166
|
+
AppBar,
|
|
3167
|
+
{
|
|
3168
|
+
color: "transparent",
|
|
3169
|
+
position: "fixed",
|
|
3170
|
+
sx: (theme) => ({
|
|
3171
|
+
borderBottom: "1px solid",
|
|
3172
|
+
borderColor: theme.vars?.palette.divider,
|
|
3173
|
+
boxShadow: "none"
|
|
3174
|
+
}),
|
|
3175
|
+
children: /* @__PURE__ */ jsxs15(Toolbar, { children: [
|
|
3176
|
+
props.navigation && /* @__PURE__ */ jsx27(
|
|
3177
|
+
IconButton5,
|
|
3178
|
+
{
|
|
3179
|
+
onClick: () => setNavigationOpen((previous) => !previous),
|
|
3180
|
+
sx: { marginRight: 2 },
|
|
3181
|
+
children: navigationOpen ? /* @__PURE__ */ jsx27(MenuOpen, {}) : /* @__PURE__ */ jsx27(Menu3, {})
|
|
3182
|
+
}
|
|
3183
|
+
),
|
|
3184
|
+
/* @__PURE__ */ jsx27(AppTitle, {}),
|
|
3185
|
+
/* @__PURE__ */ jsx27(ToolbarAccount, {})
|
|
3186
|
+
] })
|
|
3187
|
+
}
|
|
3188
|
+
),
|
|
3189
|
+
props.navigation && /* @__PURE__ */ jsx27(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
|
|
3190
|
+
/* @__PURE__ */ jsxs15(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
3191
|
+
/* @__PURE__ */ jsx27(DrawerHeader, {}),
|
|
3192
|
+
/* @__PURE__ */ jsx27(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
3193
|
+
] })
|
|
3194
|
+
] }),
|
|
3195
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx27(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
3196
|
+
] });
|
|
3197
|
+
};
|
|
3198
|
+
|
|
3178
3199
|
// src/hooks/ThemeHook.ts
|
|
3179
3200
|
import { createTheme, darken, lighten } from "@mui/material";
|
|
3180
3201
|
import { grey as grey2 } from "@mui/material/colors";
|
|
@@ -3234,6 +3255,8 @@ var csCZGrid = {
|
|
|
3234
3255
|
toolbarExportExcel: "St\xE1hnout jako Excel",
|
|
3235
3256
|
// Toolbar pivot button
|
|
3236
3257
|
// toolbarPivot: 'Pivot',
|
|
3258
|
+
// Toolbar charts button
|
|
3259
|
+
// toolbarCharts: 'Charts',
|
|
3237
3260
|
// Toolbar AI Assistant button
|
|
3238
3261
|
// toolbarAssistant: 'AI Assistant',
|
|
3239
3262
|
// Columns management text
|
|
@@ -3313,6 +3336,7 @@ var csCZGrid = {
|
|
|
3313
3336
|
columnMenuSortAsc: "Se\u0159adit vzestupn\u011B",
|
|
3314
3337
|
columnMenuSortDesc: "Se\u0159adit sestupn\u011B",
|
|
3315
3338
|
// columnMenuManagePivot: 'Manage pivot',
|
|
3339
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
3316
3340
|
// Column header text
|
|
3317
3341
|
columnHeaderFiltersTooltipActive: (count) => {
|
|
3318
3342
|
let pluralForm = "aktivn\xEDch filtr\u016F";
|
|
@@ -3401,6 +3425,7 @@ var csCZGrid = {
|
|
|
3401
3425
|
rowReorderingHeaderName: "P\u0159euspo\u0159\xE1d\xE1v\xE1n\xED \u0159\xE1dk\u016F",
|
|
3402
3426
|
// Aggregation
|
|
3403
3427
|
aggregationMenuItemHeader: "Seskupov\xE1n\xED",
|
|
3428
|
+
// aggregationFunctionLabelNone: 'none',
|
|
3404
3429
|
aggregationFunctionLabelSum: "sou\u010Det",
|
|
3405
3430
|
aggregationFunctionLabelAvg: "pr\u016Fm\u011Br",
|
|
3406
3431
|
aggregationFunctionLabelMin: "min",
|
|
@@ -3434,6 +3459,31 @@ var csCZGrid = {
|
|
|
3434
3459
|
// pivotDragToValues: 'Drag here to create values',
|
|
3435
3460
|
// pivotYearColumnHeaderName: '(Year)',
|
|
3436
3461
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
3462
|
+
// Charts configuration panel
|
|
3463
|
+
// chartsNoCharts: 'There are no charts available',
|
|
3464
|
+
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
3465
|
+
// chartsTabChart: 'Chart',
|
|
3466
|
+
// chartsTabFields: 'Fields',
|
|
3467
|
+
// chartsTabCustomize: 'Customize',
|
|
3468
|
+
// chartsCloseButton: 'Close charts configuration',
|
|
3469
|
+
// chartsSyncButtonLabel: 'Sync chart',
|
|
3470
|
+
// chartsSearchPlaceholder: 'Search fields',
|
|
3471
|
+
// chartsSearchLabel: 'Search fields',
|
|
3472
|
+
// chartsSearchClear: 'Clear search',
|
|
3473
|
+
// chartsNoFields: 'No fields',
|
|
3474
|
+
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
3475
|
+
// chartsCategories: 'Categories',
|
|
3476
|
+
// chartsSeries: 'Series',
|
|
3477
|
+
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
3478
|
+
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
3479
|
+
// chartsMenuMoveUp: 'Move up',
|
|
3480
|
+
// chartsMenuMoveDown: 'Move down',
|
|
3481
|
+
// chartsMenuMoveToTop: 'Move to top',
|
|
3482
|
+
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
3483
|
+
// chartsMenuOptions: 'Field options',
|
|
3484
|
+
// chartsMenuRemove: 'Remove',
|
|
3485
|
+
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
3486
|
+
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
3437
3487
|
// AI Assistant panel
|
|
3438
3488
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
3439
3489
|
// aiAssistantPanelClose: 'Close AI Assistant',
|
|
@@ -3516,6 +3566,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3516
3566
|
toolbarExportExcel: "Download as Excel",
|
|
3517
3567
|
// Toolbar pivot button
|
|
3518
3568
|
toolbarPivot: "Pivot",
|
|
3569
|
+
// Toolbar charts button
|
|
3570
|
+
toolbarCharts: "Charts",
|
|
3519
3571
|
// Toolbar AI Assistant button
|
|
3520
3572
|
toolbarAssistant: "AI Assistant",
|
|
3521
3573
|
// Columns management text
|
|
@@ -3595,6 +3647,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3595
3647
|
columnMenuSortAsc: "Sort by ASC",
|
|
3596
3648
|
columnMenuSortDesc: "Sort by DESC",
|
|
3597
3649
|
columnMenuManagePivot: "Manage pivot",
|
|
3650
|
+
columnMenuManageCharts: "Manage charts",
|
|
3598
3651
|
// Column header text
|
|
3599
3652
|
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
3600
3653
|
columnHeaderFiltersLabel: "Show filters",
|
|
@@ -3662,6 +3715,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3662
3715
|
rowReorderingHeaderName: "Row reordering",
|
|
3663
3716
|
// Aggregation
|
|
3664
3717
|
aggregationMenuItemHeader: "Aggregation",
|
|
3718
|
+
aggregationFunctionLabelNone: "none",
|
|
3665
3719
|
aggregationFunctionLabelSum: "sum",
|
|
3666
3720
|
aggregationFunctionLabelAvg: "avg",
|
|
3667
3721
|
aggregationFunctionLabelMin: "min",
|
|
@@ -3695,6 +3749,31 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3695
3749
|
pivotDragToValues: "Drag here to create values",
|
|
3696
3750
|
pivotYearColumnHeaderName: "(Year)",
|
|
3697
3751
|
pivotQuarterColumnHeaderName: "(Quarter)",
|
|
3752
|
+
// Charts configuration panel
|
|
3753
|
+
chartsNoCharts: "There are no charts available",
|
|
3754
|
+
chartsChartNotSelected: "Select a chart type to configure its options",
|
|
3755
|
+
chartsTabChart: "Chart",
|
|
3756
|
+
chartsTabFields: "Fields",
|
|
3757
|
+
chartsTabCustomize: "Customize",
|
|
3758
|
+
chartsCloseButton: "Close charts configuration",
|
|
3759
|
+
chartsSyncButtonLabel: "Sync chart",
|
|
3760
|
+
chartsSearchPlaceholder: "Search fields",
|
|
3761
|
+
chartsSearchLabel: "Search fields",
|
|
3762
|
+
chartsSearchClear: "Clear search",
|
|
3763
|
+
chartsNoFields: "No fields",
|
|
3764
|
+
chartsFieldBlocked: "This field cannot be added to any section",
|
|
3765
|
+
chartsCategories: "Categories",
|
|
3766
|
+
chartsSeries: "Series",
|
|
3767
|
+
chartsMenuAddToDimensions: (dimensionLabel) => `Add to ${dimensionLabel}`,
|
|
3768
|
+
chartsMenuAddToValues: (valuesLabel) => `Add to ${valuesLabel}`,
|
|
3769
|
+
chartsMenuMoveUp: "Move up",
|
|
3770
|
+
chartsMenuMoveDown: "Move down",
|
|
3771
|
+
chartsMenuMoveToTop: "Move to top",
|
|
3772
|
+
chartsMenuMoveToBottom: "Move to bottom",
|
|
3773
|
+
chartsMenuOptions: "Field options",
|
|
3774
|
+
chartsMenuRemove: "Remove",
|
|
3775
|
+
chartsDragToDimensions: (dimensionLabel) => `Drag here to use column as ${dimensionLabel}`,
|
|
3776
|
+
chartsDragToValues: (valuesLabel) => `Drag here to use column as ${valuesLabel}`,
|
|
3698
3777
|
// AI Assistant panel
|
|
3699
3778
|
aiAssistantPanelTitle: "AI Assistant",
|
|
3700
3779
|
aiAssistantPanelClose: "Close AI Assistant",
|
|
@@ -3883,68 +3962,20 @@ var useGetTheme = (theme) => {
|
|
|
3883
3962
|
);
|
|
3884
3963
|
};
|
|
3885
3964
|
|
|
3886
|
-
// src/components/core/Layout.tsx
|
|
3887
|
-
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3888
|
-
var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
3889
|
-
display: "flex",
|
|
3890
|
-
alignItems: "center",
|
|
3891
|
-
justifyContent: "flex-end",
|
|
3892
|
-
padding: theme.spacing(0, 1),
|
|
3893
|
-
...theme.mixins.toolbar
|
|
3894
|
-
}));
|
|
3895
|
-
var Layout = (props) => {
|
|
3896
|
-
const theme = useGetTheme(props.theme);
|
|
3897
|
-
const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
|
|
3898
|
-
const isFetching = !!useIsFetching();
|
|
3899
|
-
const isMutating = !!useIsMutating();
|
|
3900
|
-
return /* @__PURE__ */ jsxs15(ThemeProvider, { theme, children: [
|
|
3901
|
-
/* @__PURE__ */ jsx27(InitColorSchemeScript, {}),
|
|
3902
|
-
/* @__PURE__ */ jsx27(CssBaseline, {}),
|
|
3903
|
-
/* @__PURE__ */ jsxs15(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
3904
|
-
/* @__PURE__ */ jsx27(
|
|
3905
|
-
AppBar,
|
|
3906
|
-
{
|
|
3907
|
-
color: "transparent",
|
|
3908
|
-
position: "fixed",
|
|
3909
|
-
sx: {
|
|
3910
|
-
borderBottom: "1px solid",
|
|
3911
|
-
borderColor: theme.vars?.palette.divider,
|
|
3912
|
-
boxShadow: "none"
|
|
3913
|
-
},
|
|
3914
|
-
children: /* @__PURE__ */ jsxs15(Toolbar, { children: [
|
|
3915
|
-
props.navigation && /* @__PURE__ */ jsx27(
|
|
3916
|
-
IconButton5,
|
|
3917
|
-
{
|
|
3918
|
-
onClick: () => setNavigationOpen((previous) => !previous),
|
|
3919
|
-
sx: { marginRight: 2 },
|
|
3920
|
-
children: navigationOpen ? /* @__PURE__ */ jsx27(MenuOpen, {}) : /* @__PURE__ */ jsx27(Menu3, {})
|
|
3921
|
-
}
|
|
3922
|
-
),
|
|
3923
|
-
/* @__PURE__ */ jsx27(AppTitle, {}),
|
|
3924
|
-
/* @__PURE__ */ jsx27(ToolbarAccount, {})
|
|
3925
|
-
] })
|
|
3926
|
-
}
|
|
3927
|
-
),
|
|
3928
|
-
props.navigation && /* @__PURE__ */ jsx27(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
|
|
3929
|
-
/* @__PURE__ */ jsxs15(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
3930
|
-
/* @__PURE__ */ jsx27(DrawerHeader, {}),
|
|
3931
|
-
/* @__PURE__ */ jsx27(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
3932
|
-
] })
|
|
3933
|
-
] }),
|
|
3934
|
-
(isFetching || isMutating) && /* @__PURE__ */ jsx27(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
3935
|
-
] });
|
|
3936
|
-
};
|
|
3937
|
-
|
|
3938
3965
|
// src/providers/LayoutProvider.tsx
|
|
3939
3966
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3940
|
-
var LayoutProvider = (
|
|
3941
|
-
const
|
|
3942
|
-
const { t: t2 } = useTranslation7();
|
|
3943
|
-
const navigation = props.getNavigation?.({ user, t: t2 });
|
|
3967
|
+
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
3968
|
+
const createdTheme = useGetTheme(theme);
|
|
3944
3969
|
useEffect6(() => {
|
|
3945
|
-
|
|
3970
|
+
const handler = () => {
|
|
3971
|
+
z.config(default2.resolvedLanguage === "cs" ? cs() : en());
|
|
3972
|
+
};
|
|
3973
|
+
default2.on("languageChanged", handler);
|
|
3974
|
+
return () => {
|
|
3975
|
+
default2.off("languageChanged", handler);
|
|
3976
|
+
};
|
|
3946
3977
|
}, []);
|
|
3947
|
-
return /* @__PURE__ */ jsx28(
|
|
3978
|
+
return /* @__PURE__ */ jsx28(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx28(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: default2.resolvedLanguage, children: /* @__PURE__ */ jsx28(DialogsProvider, { children: /* @__PURE__ */ jsx28(Layout, { navigation, children }) }) }) });
|
|
3948
3979
|
};
|
|
3949
3980
|
|
|
3950
3981
|
// src/index.ts
|
|
@@ -4251,7 +4282,7 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
4251
4282
|
|
|
4252
4283
|
// src/index.ts
|
|
4253
4284
|
import { default as default3 } from "use-local-storage-state";
|
|
4254
|
-
import { useTranslation as
|
|
4285
|
+
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
4255
4286
|
import { t } from "i18next";
|
|
4256
4287
|
export {
|
|
4257
4288
|
ChipInputCell,
|
|
@@ -4272,7 +4303,6 @@ export {
|
|
|
4272
4303
|
TableContainer,
|
|
4273
4304
|
TypographyWithIcon,
|
|
4274
4305
|
rootRouteHead,
|
|
4275
|
-
setSSRLanguage,
|
|
4276
4306
|
t,
|
|
4277
4307
|
useDeleteFile,
|
|
4278
4308
|
useDeleteFiles,
|
|
@@ -4286,7 +4316,7 @@ export {
|
|
|
4286
4316
|
useLayoutForm,
|
|
4287
4317
|
default3 as useLocalStorageState,
|
|
4288
4318
|
useOpenFile,
|
|
4289
|
-
|
|
4319
|
+
useTranslation7 as useTranslation,
|
|
4290
4320
|
useUpdateFileMeta,
|
|
4291
4321
|
useUploadFile,
|
|
4292
4322
|
uuidv72 as uuidv7,
|