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