wcz-test 4.6.11 → 4.6.12
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.js +16 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1158,7 +1158,7 @@ import { useState as useState5 } from "react";
|
|
|
1158
1158
|
import MoreVert from "@mui/icons-material/MoreVert";
|
|
1159
1159
|
import { Box as Box3, IconButton, ImageListItem, ImageListItemBar, Stack as Stack4, Tooltip } from "@mui/material";
|
|
1160
1160
|
import { grey } from "@mui/material/colors";
|
|
1161
|
-
import { Fragment, useEffect as
|
|
1161
|
+
import { Fragment, useEffect as useEffect2, useState as useState3 } from "react";
|
|
1162
1162
|
|
|
1163
1163
|
// src/components/file/fileViewer/common/ActionsMenu.tsx
|
|
1164
1164
|
import Delete from "@mui/icons-material/Delete";
|
|
@@ -1179,7 +1179,7 @@ var useFile = () => {
|
|
|
1179
1179
|
|
|
1180
1180
|
// src/hooks/DialogsHooks.tsx
|
|
1181
1181
|
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, useEventCallback } from "@mui/material";
|
|
1182
|
-
import { useContext as useContext2,
|
|
1182
|
+
import { useContext as useContext2, useMemo } from "react";
|
|
1183
1183
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1184
1184
|
|
|
1185
1185
|
// src/contexts/DialogsContext.ts
|
|
@@ -1190,30 +1190,20 @@ var DialogsContext = createContext2({});
|
|
|
1190
1190
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1191
1191
|
function AlertDialog({ open, payload, onClose }) {
|
|
1192
1192
|
const { t: t2 } = useTranslation2();
|
|
1193
|
-
|
|
1194
|
-
useEffect2(() => {
|
|
1195
|
-
if (open && buttonRef.current)
|
|
1196
|
-
setTimeout(() => buttonRef.current?.focus());
|
|
1197
|
-
}, [open]);
|
|
1198
|
-
return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), children: [
|
|
1193
|
+
return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(), disableRestoreFocus: true, children: [
|
|
1199
1194
|
/* @__PURE__ */ jsx5(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Alert") }),
|
|
1200
1195
|
/* @__PURE__ */ jsx5(DialogContent, { children: payload.message }),
|
|
1201
|
-
/* @__PURE__ */ jsx5(DialogActions, { children: /* @__PURE__ */ jsx5(Button, {
|
|
1196
|
+
/* @__PURE__ */ jsx5(DialogActions, { children: /* @__PURE__ */ jsx5(Button, { onClick: () => onClose(), autoFocus: true, children: t2("Layout.Dialog.Confirm") }) })
|
|
1202
1197
|
] });
|
|
1203
1198
|
}
|
|
1204
1199
|
function ConfirmDialog({ open, payload, onClose }) {
|
|
1205
1200
|
const { t: t2 } = useTranslation2();
|
|
1206
|
-
|
|
1207
|
-
useEffect2(() => {
|
|
1208
|
-
if (open && buttonRef.current)
|
|
1209
|
-
setTimeout(() => buttonRef.current?.focus());
|
|
1210
|
-
}, [open]);
|
|
1211
|
-
return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), children: [
|
|
1201
|
+
return /* @__PURE__ */ jsxs4(Dialog, { maxWidth: "xs", fullWidth: true, open, onClose: () => onClose(false), disableRestoreFocus: true, children: [
|
|
1212
1202
|
/* @__PURE__ */ jsx5(DialogTitle, { children: payload.title ?? t2("Layout.Dialog.Confirm") }),
|
|
1213
1203
|
/* @__PURE__ */ jsx5(DialogContent, { children: payload.message }),
|
|
1214
1204
|
/* @__PURE__ */ jsxs4(DialogActions, { children: [
|
|
1215
1205
|
/* @__PURE__ */ jsx5(Button, { onClick: () => onClose(false), children: payload.cancelText ?? t2("Layout.Dialog.Cancel") }),
|
|
1216
|
-
/* @__PURE__ */ jsx5(Button, {
|
|
1206
|
+
/* @__PURE__ */ jsx5(Button, { onClick: () => onClose(true), autoFocus: true, children: t2("Layout.Dialog.Confirm") })
|
|
1217
1207
|
] })
|
|
1218
1208
|
] });
|
|
1219
1209
|
}
|
|
@@ -1521,7 +1511,7 @@ var GridFileViewerItem = ({ meta, size, itemBar }) => {
|
|
|
1521
1511
|
const { setImageId, actions } = useFile();
|
|
1522
1512
|
const [showItemBar, setShowItemBar] = useState3(itemBar === "always");
|
|
1523
1513
|
const [menu, setMenu] = useState3(null);
|
|
1524
|
-
|
|
1514
|
+
useEffect2(() => {
|
|
1525
1515
|
setShowItemBar(itemBar === "always");
|
|
1526
1516
|
}, [itemBar]);
|
|
1527
1517
|
const { data: source } = useGetFileThumbnail(meta);
|
|
@@ -1645,13 +1635,13 @@ var ListFileViewerItem = ({ meta }) => {
|
|
|
1645
1635
|
// src/components/file/fileViewer/ImageViewer.tsx
|
|
1646
1636
|
import Close from "@mui/icons-material/Close";
|
|
1647
1637
|
import { Box as Box4, Dialog as Dialog2, Fab } from "@mui/material";
|
|
1648
|
-
import { useEffect as
|
|
1638
|
+
import { useEffect as useEffect3 } from "react";
|
|
1649
1639
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1650
1640
|
var ImageViewer = ({ metaId }) => {
|
|
1651
1641
|
const { fileMetas, setImageId } = useFile();
|
|
1652
1642
|
const meta = fileMetas.find((m) => m.id === metaId);
|
|
1653
1643
|
const { data: source } = useGetFile(meta);
|
|
1654
|
-
|
|
1644
|
+
useEffect3(() => {
|
|
1655
1645
|
if (metaId)
|
|
1656
1646
|
globalThis.addEventListener("keydown", handleOnKeydown);
|
|
1657
1647
|
return () => {
|
|
@@ -2600,18 +2590,18 @@ var AdapterDayjs = class {
|
|
|
2600
2590
|
};
|
|
2601
2591
|
|
|
2602
2592
|
// src/providers/LayoutProvider.tsx
|
|
2603
|
-
import { useEffect as
|
|
2593
|
+
import { useEffect as useEffect6 } from "react";
|
|
2604
2594
|
import * as z from "zod";
|
|
2605
2595
|
import { cs, en } from "zod/locales";
|
|
2606
2596
|
|
|
2607
2597
|
// src/providers/DialogsProvider.tsx
|
|
2608
|
-
import { useCallback, useId, useMemo as useMemo3, useRef as
|
|
2598
|
+
import { useCallback, useId, useMemo as useMemo3, useRef as useRef3, useState as useState6 } from "react";
|
|
2609
2599
|
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2610
2600
|
function DialogsProvider({ children, unmountAfter = 1e3 }) {
|
|
2611
2601
|
const [stack, setStack] = useState6([]);
|
|
2612
2602
|
const keyPrefix = useId();
|
|
2613
|
-
const nextId =
|
|
2614
|
-
const dialogMetadata =
|
|
2603
|
+
const nextId = useRef3(0);
|
|
2604
|
+
const dialogMetadata = useRef3(/* @__PURE__ */ new WeakMap());
|
|
2615
2605
|
const requestDialog = useEventCallback_default(function open(Component7, payload, options = {}) {
|
|
2616
2606
|
const { onClose = async () => {
|
|
2617
2607
|
} } = options;
|
|
@@ -2708,7 +2698,7 @@ import { useNavigate, useRouterState as useRouterState2 } from "@tanstack/react-
|
|
|
2708
2698
|
import Divider3 from "@mui/material/Divider";
|
|
2709
2699
|
import List3 from "@mui/material/List";
|
|
2710
2700
|
import ListSubheader from "@mui/material/ListSubheader";
|
|
2711
|
-
import { Fragment as Fragment5, useEffect as
|
|
2701
|
+
import { Fragment as Fragment5, useEffect as useEffect5, useState as useState8 } from "react";
|
|
2712
2702
|
|
|
2713
2703
|
// src/components/core/navigation/NavigationListItem.tsx
|
|
2714
2704
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
@@ -2905,7 +2895,7 @@ var isDivider = (item) => "kind" in item && item.kind === "divider";
|
|
|
2905
2895
|
var isHeader = (item) => "kind" in item && item.kind === "header";
|
|
2906
2896
|
var NavigationList = ({ subNavigation, depth = 0, collapsed, isPopover, isSidebarFullyExpanded = true, isSidebarFullyCollapsed, expandedWidth, renderItem, activePath, onNavigate, onClose }) => {
|
|
2907
2897
|
const [openKeys, setOpenKeys] = useState8([]);
|
|
2908
|
-
|
|
2898
|
+
useEffect5(() => {
|
|
2909
2899
|
if (collapsed) setOpenKeys([]);
|
|
2910
2900
|
}, [collapsed]);
|
|
2911
2901
|
const toggleKey = (key) => setOpenKeys((previous) => previous.includes(key) ? previous.filter((k) => k !== key) : [...previous, key]);
|
|
@@ -3985,7 +3975,7 @@ var useGetTheme = (theme) => {
|
|
|
3985
3975
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3986
3976
|
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
3987
3977
|
const createdTheme = useGetTheme(theme);
|
|
3988
|
-
|
|
3978
|
+
useEffect6(() => {
|
|
3989
3979
|
const handler = () => {
|
|
3990
3980
|
z.config(default2.resolvedLanguage === "cs" ? cs() : en());
|
|
3991
3981
|
};
|