wcz-test 4.5.6 → 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 +134 -108
- package/dist/index.js.map +1 -1
- package/package.json +5 -7
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,7 +3054,6 @@ var ToolbarAccount = () => {
|
|
|
3087
3054
|
setMode(newMode);
|
|
3088
3055
|
closeMenu();
|
|
3089
3056
|
};
|
|
3090
|
-
const keycloak = useKeycloak();
|
|
3091
3057
|
const user = {
|
|
3092
3058
|
name: "Dalibor Homola",
|
|
3093
3059
|
employeeId: "C2503017",
|
|
@@ -3107,7 +3073,7 @@ var ToolbarAccount = () => {
|
|
|
3107
3073
|
}
|
|
3108
3074
|
};
|
|
3109
3075
|
const usernameInitials = () => {
|
|
3110
|
-
if (!user
|
|
3076
|
+
if (!user.name) return "";
|
|
3111
3077
|
const splittedName = user.name.split(" ");
|
|
3112
3078
|
return `${splittedName[0][0]}${splittedName.length > 1 ? splittedName[1][0] : ""}`;
|
|
3113
3079
|
};
|
|
@@ -3156,19 +3122,19 @@ var ToolbarAccount = () => {
|
|
|
3156
3122
|
/* @__PURE__ */ jsx26(ListItemButton5, { onClick: changeLanguage("cs"), disabled: i18n2.resolvedLanguage === "cs", children: /* @__PURE__ */ jsx26(ListItemText4, { primary: "\u010Ce\u0161tina" }) })
|
|
3157
3123
|
] });
|
|
3158
3124
|
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
3159
|
-
/* @__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" }) }),
|
|
3160
3126
|
/* @__PURE__ */ jsx26(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs14(Box8, { sx: { width: 240 }, children: [
|
|
3161
|
-
/* @__PURE__ */ jsx26(List4, { children: user
|
|
3127
|
+
/* @__PURE__ */ jsx26(List4, { children: user.name ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
3162
3128
|
/* @__PURE__ */ jsx26(ListItem2, { children: /* @__PURE__ */ jsx26(ListItemText4, { primary: user.name, secondary: /* @__PURE__ */ jsxs14("span", { children: [
|
|
3163
3129
|
/* @__PURE__ */ jsx26("span", { children: user.employeeId }),
|
|
3164
3130
|
/* @__PURE__ */ jsx26("br", {}),
|
|
3165
3131
|
/* @__PURE__ */ jsx26("span", { children: user.department })
|
|
3166
3132
|
] }) }) }),
|
|
3167
|
-
/* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () =>
|
|
3133
|
+
/* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => console.log("Logout"), children: [
|
|
3168
3134
|
/* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Logout, { color: "error" }) }),
|
|
3169
3135
|
/* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.Logout") })
|
|
3170
3136
|
] })
|
|
3171
|
-
] }) : /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () =>
|
|
3137
|
+
] }) : /* @__PURE__ */ jsxs14(ListItemButton5, { onClick: () => console.log("Login"), children: [
|
|
3172
3138
|
/* @__PURE__ */ jsx26(ListItemIcon4, { children: /* @__PURE__ */ jsx26(Login, { color: "success" }) }),
|
|
3173
3139
|
/* @__PURE__ */ jsx26(ListItemText4, { primary: t2("Layout.LogIn") })
|
|
3174
3140
|
] }) }),
|
|
@@ -3179,6 +3145,57 @@ var ToolbarAccount = () => {
|
|
|
3179
3145
|
] });
|
|
3180
3146
|
};
|
|
3181
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
|
+
|
|
3182
3199
|
// src/hooks/ThemeHook.ts
|
|
3183
3200
|
import { createTheme, darken, lighten } from "@mui/material";
|
|
3184
3201
|
import { grey as grey2 } from "@mui/material/colors";
|
|
@@ -3238,6 +3255,8 @@ var csCZGrid = {
|
|
|
3238
3255
|
toolbarExportExcel: "St\xE1hnout jako Excel",
|
|
3239
3256
|
// Toolbar pivot button
|
|
3240
3257
|
// toolbarPivot: 'Pivot',
|
|
3258
|
+
// Toolbar charts button
|
|
3259
|
+
// toolbarCharts: 'Charts',
|
|
3241
3260
|
// Toolbar AI Assistant button
|
|
3242
3261
|
// toolbarAssistant: 'AI Assistant',
|
|
3243
3262
|
// Columns management text
|
|
@@ -3317,6 +3336,7 @@ var csCZGrid = {
|
|
|
3317
3336
|
columnMenuSortAsc: "Se\u0159adit vzestupn\u011B",
|
|
3318
3337
|
columnMenuSortDesc: "Se\u0159adit sestupn\u011B",
|
|
3319
3338
|
// columnMenuManagePivot: 'Manage pivot',
|
|
3339
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
3320
3340
|
// Column header text
|
|
3321
3341
|
columnHeaderFiltersTooltipActive: (count) => {
|
|
3322
3342
|
let pluralForm = "aktivn\xEDch filtr\u016F";
|
|
@@ -3405,6 +3425,7 @@ var csCZGrid = {
|
|
|
3405
3425
|
rowReorderingHeaderName: "P\u0159euspo\u0159\xE1d\xE1v\xE1n\xED \u0159\xE1dk\u016F",
|
|
3406
3426
|
// Aggregation
|
|
3407
3427
|
aggregationMenuItemHeader: "Seskupov\xE1n\xED",
|
|
3428
|
+
// aggregationFunctionLabelNone: 'none',
|
|
3408
3429
|
aggregationFunctionLabelSum: "sou\u010Det",
|
|
3409
3430
|
aggregationFunctionLabelAvg: "pr\u016Fm\u011Br",
|
|
3410
3431
|
aggregationFunctionLabelMin: "min",
|
|
@@ -3438,6 +3459,31 @@ var csCZGrid = {
|
|
|
3438
3459
|
// pivotDragToValues: 'Drag here to create values',
|
|
3439
3460
|
// pivotYearColumnHeaderName: '(Year)',
|
|
3440
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}`,
|
|
3441
3487
|
// AI Assistant panel
|
|
3442
3488
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
3443
3489
|
// aiAssistantPanelClose: 'Close AI Assistant',
|
|
@@ -3520,6 +3566,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3520
3566
|
toolbarExportExcel: "Download as Excel",
|
|
3521
3567
|
// Toolbar pivot button
|
|
3522
3568
|
toolbarPivot: "Pivot",
|
|
3569
|
+
// Toolbar charts button
|
|
3570
|
+
toolbarCharts: "Charts",
|
|
3523
3571
|
// Toolbar AI Assistant button
|
|
3524
3572
|
toolbarAssistant: "AI Assistant",
|
|
3525
3573
|
// Columns management text
|
|
@@ -3599,6 +3647,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3599
3647
|
columnMenuSortAsc: "Sort by ASC",
|
|
3600
3648
|
columnMenuSortDesc: "Sort by DESC",
|
|
3601
3649
|
columnMenuManagePivot: "Manage pivot",
|
|
3650
|
+
columnMenuManageCharts: "Manage charts",
|
|
3602
3651
|
// Column header text
|
|
3603
3652
|
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
|
3604
3653
|
columnHeaderFiltersLabel: "Show filters",
|
|
@@ -3666,6 +3715,7 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3666
3715
|
rowReorderingHeaderName: "Row reordering",
|
|
3667
3716
|
// Aggregation
|
|
3668
3717
|
aggregationMenuItemHeader: "Aggregation",
|
|
3718
|
+
aggregationFunctionLabelNone: "none",
|
|
3669
3719
|
aggregationFunctionLabelSum: "sum",
|
|
3670
3720
|
aggregationFunctionLabelAvg: "avg",
|
|
3671
3721
|
aggregationFunctionLabelMin: "min",
|
|
@@ -3699,6 +3749,31 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3699
3749
|
pivotDragToValues: "Drag here to create values",
|
|
3700
3750
|
pivotYearColumnHeaderName: "(Year)",
|
|
3701
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}`,
|
|
3702
3777
|
// AI Assistant panel
|
|
3703
3778
|
aiAssistantPanelTitle: "AI Assistant",
|
|
3704
3779
|
aiAssistantPanelClose: "Close AI Assistant",
|
|
@@ -3887,68 +3962,20 @@ var useGetTheme = (theme) => {
|
|
|
3887
3962
|
);
|
|
3888
3963
|
};
|
|
3889
3964
|
|
|
3890
|
-
// src/components/core/Layout.tsx
|
|
3891
|
-
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3892
|
-
var DrawerHeader = styled2("div")(({ theme }) => ({
|
|
3893
|
-
display: "flex",
|
|
3894
|
-
alignItems: "center",
|
|
3895
|
-
justifyContent: "flex-end",
|
|
3896
|
-
padding: theme.spacing(0, 1),
|
|
3897
|
-
...theme.mixins.toolbar
|
|
3898
|
-
}));
|
|
3899
|
-
var Layout = (props) => {
|
|
3900
|
-
const theme = useGetTheme(props.theme);
|
|
3901
|
-
const [navigationOpen, setNavigationOpen] = useLocalStorageState("navigationOpen", { defaultServerValue: false });
|
|
3902
|
-
const isFetching = !!useIsFetching();
|
|
3903
|
-
const isMutating = !!useIsMutating();
|
|
3904
|
-
return /* @__PURE__ */ jsxs15(ThemeProvider, { theme, children: [
|
|
3905
|
-
/* @__PURE__ */ jsx27(InitColorSchemeScript, {}),
|
|
3906
|
-
/* @__PURE__ */ jsx27(CssBaseline, {}),
|
|
3907
|
-
/* @__PURE__ */ jsxs15(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
|
|
3908
|
-
/* @__PURE__ */ jsx27(
|
|
3909
|
-
AppBar,
|
|
3910
|
-
{
|
|
3911
|
-
color: "transparent",
|
|
3912
|
-
position: "fixed",
|
|
3913
|
-
sx: {
|
|
3914
|
-
borderBottom: "1px solid",
|
|
3915
|
-
borderColor: theme.vars?.palette.divider,
|
|
3916
|
-
boxShadow: "none"
|
|
3917
|
-
},
|
|
3918
|
-
children: /* @__PURE__ */ jsxs15(Toolbar, { children: [
|
|
3919
|
-
props.navigation && /* @__PURE__ */ jsx27(
|
|
3920
|
-
IconButton5,
|
|
3921
|
-
{
|
|
3922
|
-
onClick: () => setNavigationOpen((previous) => !previous),
|
|
3923
|
-
sx: { marginRight: 2 },
|
|
3924
|
-
children: navigationOpen ? /* @__PURE__ */ jsx27(MenuOpen, {}) : /* @__PURE__ */ jsx27(Menu3, {})
|
|
3925
|
-
}
|
|
3926
|
-
),
|
|
3927
|
-
/* @__PURE__ */ jsx27(AppTitle, {}),
|
|
3928
|
-
/* @__PURE__ */ jsx27(ToolbarAccount, {})
|
|
3929
|
-
] })
|
|
3930
|
-
}
|
|
3931
|
-
),
|
|
3932
|
-
props.navigation && /* @__PURE__ */ jsx27(NavigationRail, { navigation: props.navigation, expanded: navigationOpen ?? false, setExpanded: setNavigationOpen }),
|
|
3933
|
-
/* @__PURE__ */ jsxs15(Box9, { component: "main", sx: { flexGrow: 1, display: "flex", flexDirection: "column", minWidth: 0, height: "100%", overflow: "hidden" }, children: [
|
|
3934
|
-
/* @__PURE__ */ jsx27(DrawerHeader, {}),
|
|
3935
|
-
/* @__PURE__ */ jsx27(Box9, { sx: { flex: 1, overflow: "auto", position: "relative" }, children: props.children })
|
|
3936
|
-
] })
|
|
3937
|
-
] }),
|
|
3938
|
-
(isFetching || isMutating) && /* @__PURE__ */ jsx27(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
3939
|
-
] });
|
|
3940
|
-
};
|
|
3941
|
-
|
|
3942
3965
|
// src/providers/LayoutProvider.tsx
|
|
3943
3966
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3944
|
-
var LayoutProvider = (
|
|
3945
|
-
const
|
|
3946
|
-
const { t: t2 } = useTranslation7();
|
|
3947
|
-
const navigation = props.getNavigation?.({ user, t: t2 });
|
|
3967
|
+
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
3968
|
+
const createdTheme = useGetTheme(theme);
|
|
3948
3969
|
useEffect6(() => {
|
|
3949
|
-
|
|
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
|
+
};
|
|
3950
3977
|
}, []);
|
|
3951
|
-
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 }) }) }) });
|
|
3952
3979
|
};
|
|
3953
3980
|
|
|
3954
3981
|
// src/index.ts
|
|
@@ -4255,7 +4282,7 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
4255
4282
|
|
|
4256
4283
|
// src/index.ts
|
|
4257
4284
|
import { default as default3 } from "use-local-storage-state";
|
|
4258
|
-
import { useTranslation as
|
|
4285
|
+
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
4259
4286
|
import { t } from "i18next";
|
|
4260
4287
|
export {
|
|
4261
4288
|
ChipInputCell,
|
|
@@ -4276,7 +4303,6 @@ export {
|
|
|
4276
4303
|
TableContainer,
|
|
4277
4304
|
TypographyWithIcon,
|
|
4278
4305
|
rootRouteHead,
|
|
4279
|
-
setSSRLanguage,
|
|
4280
4306
|
t,
|
|
4281
4307
|
useDeleteFile,
|
|
4282
4308
|
useDeleteFiles,
|
|
@@ -4290,7 +4316,7 @@ export {
|
|
|
4290
4316
|
useLayoutForm,
|
|
4291
4317
|
default3 as useLocalStorageState,
|
|
4292
4318
|
useOpenFile,
|
|
4293
|
-
|
|
4319
|
+
useTranslation7 as useTranslation,
|
|
4294
4320
|
useUpdateFileMeta,
|
|
4295
4321
|
useUploadFile,
|
|
4296
4322
|
uuidv72 as uuidv7,
|