@flatbiz/pro-layout 5.2.1 → 5.2.2
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 +9 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { App as App$1, Breadcrumb, FloatButton, Result, Button, Dropdown, Space,
|
|
|
6
6
|
import { classNames } from '@dimjs/utils/class-names/class-names';
|
|
7
7
|
import { useEffect, useMemo, Fragment, Children, cloneElement, forwardRef, useState, useImperativeHandle, isValidElement, Suspense, useRef, memo, Component } from 'react';
|
|
8
8
|
import { useParams, useLocation, useSearchParams, matchPath, Link, useNavigate, Routes, Route, Navigate, BrowserRouter } from 'react-router-dom';
|
|
9
|
-
import { getGlobalData, sessionStorageCache, ensureSlash as ensureSlash$1, removeSlash, toLinkPath, isHttpUri, toArray, urlJoinMulti, urlJoin,
|
|
9
|
+
import { getGlobalData, getOssRunningEnv, sessionStorageCache, ensureSlash as ensureSlash$1, removeSlash, toLinkPath, isHttpUri, toArray, urlJoinMulti, urlJoin, isWindows, valueIsEqual, toLinkPathWithQuery, openNewWindow, treeToArray, cloneObject, getUuid, EventEmitter, treeFilter, arrayFindByLoosely, arrayFindIndexByLoosely, isUndefinedOrNull, localStorageCache } from '@flatbiz/utils';
|
|
10
10
|
import { fbaHooks } from '@flatbiz/antd/fba-hooks';
|
|
11
11
|
import { parse } from '@dimjs/utils/json/parse';
|
|
12
12
|
import { useMemoizedFn, useUpdateEffect, useDebounceFn } from 'ahooks';
|
|
@@ -338,7 +338,7 @@ var getIframeOpenNewTabItemOperateLinkList = function getIframeOpenNewTabItemOpe
|
|
|
338
338
|
return isArray(operateLinkData === null || operateLinkData === void 0 ? void 0 : operateLinkData.dataList) ? operateLinkData === null || operateLinkData === void 0 ? void 0 : operateLinkData.dataList : [];
|
|
339
339
|
};
|
|
340
340
|
var getDefaultHeaderThemeConfig = function getDefaultHeaderThemeConfig() {
|
|
341
|
-
var
|
|
341
|
+
var env = getOssRunningEnv();
|
|
342
342
|
var headerThemeConfig = {
|
|
343
343
|
inte: {
|
|
344
344
|
bgColor: '#38B990'
|
|
@@ -350,16 +350,7 @@ var getDefaultHeaderThemeConfig = function getDefaultHeaderThemeConfig() {
|
|
|
350
350
|
bgColor: '#0c1e3e'
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
|
|
354
|
-
return headerThemeConfig.inte;
|
|
355
|
-
}
|
|
356
|
-
if (host.includes('.t.')) {
|
|
357
|
-
return headerThemeConfig.rc;
|
|
358
|
-
}
|
|
359
|
-
if (host.includes('dev.flatjs.com')) {
|
|
360
|
-
return headerThemeConfig.me;
|
|
361
|
-
}
|
|
362
|
-
return undefined;
|
|
353
|
+
return headerThemeConfig[env];
|
|
363
354
|
};
|
|
364
355
|
|
|
365
356
|
var getAllIframeElements = function getAllIframeElements() {
|
|
@@ -1335,11 +1326,11 @@ var Loader = function Loader(_ref) {
|
|
|
1335
1326
|
*/
|
|
1336
1327
|
var Page = function Page(props) {
|
|
1337
1328
|
var loading = props.loading;
|
|
1338
|
-
var
|
|
1329
|
+
var isWin = isWindows();
|
|
1339
1330
|
var className = classNames('page', {
|
|
1340
1331
|
'page-loading': loading,
|
|
1341
1332
|
'page-flex': !isUndefined(props.fullIndex),
|
|
1342
|
-
'page-windows':
|
|
1333
|
+
'page-windows': isWin
|
|
1343
1334
|
}, props.className);
|
|
1344
1335
|
var backTopTarget = useMemoizedFn(function () {
|
|
1345
1336
|
if (!isUndefined(props.fullIndex)) {
|
|
@@ -1888,10 +1879,10 @@ var DevFloatHelp = function DevFloatHelp(props) {
|
|
|
1888
1879
|
|
|
1889
1880
|
var LayoutPage = function LayoutPage(props) {
|
|
1890
1881
|
// const LeaveMenuCompt = layoutCtx.LeaveMenu || LeaveMenuDefault;
|
|
1891
|
-
var
|
|
1882
|
+
var isWin = isWindows();
|
|
1892
1883
|
var className = classNames('layout-page-wrapper', {
|
|
1893
1884
|
'layout-page-noheader': props.hideHeader,
|
|
1894
|
-
'layout-page-windows':
|
|
1885
|
+
'layout-page-windows': isWin
|
|
1895
1886
|
}, props.className);
|
|
1896
1887
|
return /*#__PURE__*/jsx(Fragment, {
|
|
1897
1888
|
children: /*#__PURE__*/jsxs("div", {
|
|
@@ -3654,12 +3645,12 @@ var App = function App() {
|
|
|
3654
3645
|
var isIframeMain = layoutCtx.layoutMode === 'iframe-main';
|
|
3655
3646
|
useAntdApp();
|
|
3656
3647
|
var LayoutContent = layoutCtx.LayoutComponent || LayoutPage;
|
|
3657
|
-
var
|
|
3648
|
+
var isWin = isWindows();
|
|
3658
3649
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
3659
3650
|
children: [/*#__PURE__*/jsx(EventHandling, {}), /*#__PURE__*/jsxs(Layout, {
|
|
3660
3651
|
hasSider: true,
|
|
3661
3652
|
className: classNames('flatbiz-layout', {
|
|
3662
|
-
'flatbiz-layout-windows':
|
|
3653
|
+
'flatbiz-layout-windows': isWin
|
|
3663
3654
|
}),
|
|
3664
3655
|
children: [layoutCtx.hideSidebarMenu ? null : /*#__PURE__*/jsx(SiderBar, {}), /*#__PURE__*/jsxs(Layout, {
|
|
3665
3656
|
className: "flatbiz-layout-main",
|