@thefreshop/tb 1.0.30 → 1.1.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/cjs/index.js +12 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, useState, useEffect, useContext, useCallback, useMemo, useRef, forwardRef, useImperativeHandle, memo } from 'react';
|
|
3
|
-
import { useNavigate, useLocation, Outlet, createHashRouter, createBrowserRouter, RouterProvider, Navigate } from 'react-router';
|
|
3
|
+
import { useNavigate, useLocation, useSearchParams, Outlet, createHashRouter, createBrowserRouter, RouterProvider, Navigate } from 'react-router';
|
|
4
4
|
import Editor from '@monaco-editor/react';
|
|
5
5
|
import { DownOutlined, UpOutlined, DoubleRightOutlined, DoubleLeftOutlined, LoadingOutlined, ReloadOutlined, SearchOutlined, UploadOutlined, ExclamationCircleOutlined, RedoOutlined, TagOutlined } from '@ant-design/icons';
|
|
6
6
|
import { Typography, Row, Col, Space, Button, Input, Tag, Image as Image$1, Tooltip, Upload, Form, Select, DatePicker, Switch, InputNumber, Flex, Modal, Table, List, Card, Checkbox, ConfigProvider, Result, Spin } from 'antd';
|
|
@@ -378,12 +378,15 @@ const Tabs = ({ nav: { menuSet, openIcon, closeIcon }, frameStyle }) => {
|
|
|
378
378
|
})));
|
|
379
379
|
};
|
|
380
380
|
|
|
381
|
-
var css_248z$7 = ".main-module_mainFrame__Etjvl{height:100%;width:100%}\n/*# sourceMappingURL=data:application/json;base64,
|
|
382
|
-
var styles$5 = {"mainFrame":"main-module_mainFrame__Etjvl"};
|
|
381
|
+
var css_248z$7 = ".main-module_mainFrame__Etjvl{height:100%;width:100%}.main-module_mainFrameFullscreen__oEwV8{background:#fff;inset:0;overflow:auto;padding:0;position:fixed;z-index:9999}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4ubW9kdWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw4QkFFSSxXQUFZLENBRFosVUFFSixDQUVBLHdDQU1JLGVBQWdCLENBSmhCLE9BQVEsQ0FHUixhQUFjLENBRGQsU0FBVSxDQUhWLGNBQWUsQ0FFZixZQUlKIiwiZmlsZSI6Im1haW4ubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5tYWluRnJhbWUge1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDEwMCU7XHJcbn1cclxuXHJcbi5tYWluRnJhbWVGdWxsc2NyZWVuIHtcclxuICAgIHBvc2l0aW9uOiBmaXhlZDtcclxuICAgIGluc2V0OiAwO1xyXG4gICAgei1pbmRleDogOTk5OTtcclxuICAgIHBhZGRpbmc6IDA7XHJcbiAgICBvdmVyZmxvdzogYXV0bztcclxuICAgIGJhY2tncm91bmQ6ICNmZmY7XHJcbn1cclxuIl19 */";
|
|
382
|
+
var styles$5 = {"mainFrame":"main-module_mainFrame__Etjvl","mainFrameFullscreen":"main-module_mainFrameFullscreen__oEwV8"};
|
|
383
383
|
styleInject(css_248z$7);
|
|
384
384
|
|
|
385
385
|
const Main = () => {
|
|
386
|
-
|
|
386
|
+
const [sp] = useSearchParams();
|
|
387
|
+
const isFs = sp.get("fs") === "1" || sp.get("fullscreen") === "1";
|
|
388
|
+
// console.log("Main render, isFs:", isFs);
|
|
389
|
+
return (React__default.createElement("div", { className: isFs ? styles$5.mainFrameFullscreen : styles$5.mainFrame },
|
|
387
390
|
React__default.createElement(Outlet, null)));
|
|
388
391
|
};
|
|
389
392
|
|
|
@@ -478,7 +481,7 @@ const NullPage = () => {
|
|
|
478
481
|
};
|
|
479
482
|
|
|
480
483
|
const TbFrame = ({ setting, top, bottom, nav, top_banner, hashmode = false, frameStyle, }) => {
|
|
481
|
-
const { user, errMsg, tabList, setTabList, startTabKey, setStartTabKey } = useTbState();
|
|
484
|
+
const { user, errMsg, tabList, setTabList, startTabKey, setStartTabKey, loginUser } = useTbState();
|
|
482
485
|
useEffect(() => {
|
|
483
486
|
let p_tabList = [];
|
|
484
487
|
nav.menuSet.forEach((item) => {
|
|
@@ -492,8 +495,11 @@ const TbFrame = ({ setting, top, bottom, nav, top_banner, hashmode = false, fram
|
|
|
492
495
|
nav?.globalTabs?.forEach((item) => {
|
|
493
496
|
p_tabList.push(item);
|
|
494
497
|
});
|
|
495
|
-
|
|
496
|
-
|
|
498
|
+
const isSameTabs = tabList.length === p_tabList.length && tabList.every((tab, idx) => tab.key === p_tabList[idx]?.key);
|
|
499
|
+
if (!isSameTabs) {
|
|
500
|
+
setTabList(p_tabList);
|
|
501
|
+
}
|
|
502
|
+
}, [nav.menuSet, nav.globalTabs, tabList, setTabList]);
|
|
497
503
|
useEffect(() => {
|
|
498
504
|
if (!errMsg?.isPopup) ;
|
|
499
505
|
}, [errMsg]);
|