@creekjs/web-components 1.0.8 → 1.0.9
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.
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @creekjs/web-components@1.0.
|
|
3
|
+
> @creekjs/web-components@1.0.9 father:build /Users/ernestwang/Documents/code-resoorce/creek/packages/web-components
|
|
4
4
|
> father build
|
|
5
5
|
|
|
6
6
|
[36minfo[39m - Clean output directories
|
|
7
7
|
[36minfo[39m - Bundless for [33msrc[39m directory to [33mcjs[39m format
|
|
8
8
|
[35mevent[39m - Bundless [90mCreekConfigContext.tsx[39m to [90mdist/creek-config-provider/CreekConfigContext.js[39m (with declaration)
|
|
9
|
-
[35mevent[39m - Bundless [
|
|
10
|
-
[35mevent[39m - Bundless [90mCreekI18nProvider.tsx[39m to [90mdist/creek-config-provider/CreekI18nProvider.js[39m (with declaration)
|
|
9
|
+
[35mevent[39m - Bundless [90mDrawerHelper.tsx[39m to [90mdist/creek-hooks/useApp/DrawerHelper.js[39m (with declaration)
|
|
11
10
|
[35mevent[39m - Bundless [90mindex.ts[39m to [90mdist/creek-hooks/index.js[39m (with declaration)
|
|
12
|
-
[35mevent[39m - Bundless [90mModalHelper.tsx[39m to [90mdist/creek-hooks/useApp/ModalHelper.js[39m (with declaration)
|
|
13
|
-
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-hooks/useApp/index.js[39m (with declaration)
|
|
14
11
|
[35mevent[39m - Bundless [90museViewportHeight.tsx[39m to [90mdist/creek-hooks/useViewportHeight.js[39m (with declaration)
|
|
15
|
-
[35mevent[39m - Bundless [
|
|
16
|
-
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-
|
|
12
|
+
[35mevent[39m - Bundless [90mCreekI18nProvider.tsx[39m to [90mdist/creek-config-provider/CreekI18nProvider.js[39m (with declaration)
|
|
13
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-hooks/useApp/index.js[39m (with declaration)
|
|
17
14
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-icon/index.js[39m (with declaration)
|
|
18
|
-
[35mevent[39m - Bundless [
|
|
15
|
+
[35mevent[39m - Bundless [90mtypes.ts[39m to [90mdist/creek-hooks/useApp/types.js[39m (with declaration)
|
|
19
16
|
[35mevent[39m - Bundless [90mFullScreen.tsx[39m to [90mdist/creek-layout/ActionRender/FullScreen.js[39m (with declaration)
|
|
20
|
-
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-layout/ActionRender/index.js[39m (with declaration)
|
|
21
17
|
[35mevent[39m - Bundless [90mUserInfo.tsx[39m to [90mdist/creek-layout/ActionRender/UserInfo.js[39m (with declaration)
|
|
18
|
+
[35mevent[39m - Bundless [90mModalHelper.tsx[39m to [90mdist/creek-hooks/useApp/ModalHelper.js[39m (with declaration)
|
|
19
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-keep-alive/index.js[39m (with declaration)
|
|
22
20
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-layout/Exception/index.js[39m (with declaration)
|
|
23
21
|
[35mevent[39m - Bundless [90mNotFound.tsx[39m to [90mdist/creek-layout/Exception/NotFound.js[39m (with declaration)
|
|
24
|
-
[35mevent[39m - Bundless [90mLayoutSettings.tsx[39m to [90mdist/creek-layout/ActionRender/LayoutSettings.js[39m (with declaration)
|
|
25
22
|
[35mevent[39m - Bundless [90mCollapseButton.tsx[39m to [90mdist/creek-layout/CollapseButton.js[39m (with declaration)
|
|
26
|
-
[35mevent[39m - Bundless [
|
|
27
|
-
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-
|
|
28
|
-
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-page-container/index.js[39m (with declaration)
|
|
29
|
-
[35mevent[39m - Bundless [90mscrollbar.ts[39m to [90mdist/creek-style/scrollbar.js[39m (with declaration)
|
|
30
|
-
[35mevent[39m - Bundless [90museLayoutSettingsStore.ts[39m to [90mdist/creek-layout/useLayoutSettingsStore.js[39m (with declaration)
|
|
23
|
+
[35mevent[39m - Bundless [90mNotFoundPage.tsx[39m to [90mdist/creek-layout/Exception/NotFoundPage.js[39m (with declaration)
|
|
24
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-layout/ActionRender/index.js[39m (with declaration)
|
|
31
25
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-loading/index.js[39m (with declaration)
|
|
32
|
-
[35mevent[39m - Bundless [90mDensityIcon.tsx[39m to [90mdist/creek-table/components/DensityIcon.js[39m (with declaration)
|
|
33
26
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-layout/index.js[39m (with declaration)
|
|
27
|
+
[35mevent[39m - Bundless [90mLayoutSettings.tsx[39m to [90mdist/creek-layout/ActionRender/LayoutSettings.js[39m (with declaration)
|
|
28
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-page-container/index.js[39m (with declaration)
|
|
29
|
+
[35mevent[39m - Bundless [90museLayoutSettingsStore.ts[39m to [90mdist/creek-layout/useLayoutSettingsStore.js[39m (with declaration)
|
|
30
|
+
[35mevent[39m - Bundless [90mindex.ts[39m to [90mdist/creek-style/index.js[39m (with declaration)
|
|
31
|
+
[35mevent[39m - Bundless [90mscrollbar.ts[39m to [90mdist/creek-style/scrollbar.js[39m (with declaration)
|
|
32
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-locale-button/index.js[39m (with declaration)
|
|
34
33
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-table/components/index.js[39m (with declaration)
|
|
35
|
-
[35mevent[39m - Bundless [90mEllipsisTooltip.tsx[39m to [90mdist/creek-table/components/EllipsisTooltip.js[39m (with declaration)
|
|
36
|
-
[35mevent[39m - Bundless [90mNotFoundPage.tsx[39m to [90mdist/creek-layout/Exception/NotFoundPage.js[39m (with declaration)
|
|
37
34
|
[35mevent[39m - Bundless [90mindex.ts[39m to [90mdist/creek-table/hooks/index.js[39m (with declaration)
|
|
35
|
+
[35mevent[39m - Bundless [90mDensityIcon.tsx[39m to [90mdist/creek-table/components/DensityIcon.js[39m (with declaration)
|
|
38
36
|
[35mevent[39m - Bundless [90museAdaptiveToolBar.tsx[39m to [90mdist/creek-table/hooks/useAdaptiveToolBar.js[39m (with declaration)
|
|
39
|
-
[35mevent[39m - Bundless [
|
|
40
|
-
[35mevent[39m - Bundless [90museResizableColumns.tsx[39m to [90mdist/creek-table/hooks/useResizableColumns.js[39m (with declaration)
|
|
37
|
+
[35mevent[39m - Bundless [90museIndexColumn.tsx[39m to [90mdist/creek-table/hooks/useIndexColumn.js[39m (with declaration)
|
|
41
38
|
[35mevent[39m - Bundless [90museAutoWidthColumns.tsx[39m to [90mdist/creek-table/hooks/useAutoWidthColumns.js[39m (with declaration)
|
|
42
|
-
[35mevent[39m - Bundless [
|
|
39
|
+
[35mevent[39m - Bundless [90museEllipsisColumns.tsx[39m to [90mdist/creek-table/hooks/useEllipsisColumns.js[39m (with declaration)
|
|
40
|
+
[35mevent[39m - Bundless [90mEllipsisTooltip.tsx[39m to [90mdist/creek-table/components/EllipsisTooltip.js[39m (with declaration)
|
|
41
|
+
[35mevent[39m - Bundless [90museElementDistance.tsx[39m to [90mdist/creek-table/hooks/useElementDistance.js[39m (with declaration)
|
|
43
42
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-table/index.js[39m (with declaration)
|
|
44
|
-
[35mevent[39m - Bundless [90museIndexColumn.tsx[39m to [90mdist/creek-table/hooks/useIndexColumn.js[39m (with declaration)
|
|
45
43
|
[35mevent[39m - Bundless [90museTableScrollHeight.tsx[39m to [90mdist/creek-table/hooks/useTableScrollHeight.js[39m (with declaration)
|
|
46
|
-
[35mevent[39m - Bundless [
|
|
44
|
+
[35mevent[39m - Bundless [90museTableOptions.tsx[39m to [90mdist/creek-table/hooks/useTableOptions.js[39m (with declaration)
|
|
47
45
|
[35mevent[39m - Bundless [90museStatusColumns.tsx[39m to [90mdist/creek-table/hooks/useStatusColumns.js[39m (with declaration)
|
|
48
|
-
[35mevent[39m - Bundless [90mtype.ts[39m to [90mdist/creek-table/type.js[39m (with declaration)
|
|
49
|
-
[35mevent[39m - Bundless [90mzh-CN.ts[39m to [90mdist/locales/zh-CN.js[39m (with declaration)
|
|
50
46
|
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/index.js[39m (with declaration)
|
|
51
|
-
[35mevent[39m - Bundless [
|
|
47
|
+
[35mevent[39m - Bundless [90mzh-CN.ts[39m to [90mdist/locales/zh-CN.js[39m (with declaration)
|
|
52
48
|
[35mevent[39m - Bundless [90men-US.ts[39m to [90mdist/locales/en-US.js[39m (with declaration)
|
|
49
|
+
[35mevent[39m - Bundless [90museResizableColumns.tsx[39m to [90mdist/creek-table/hooks/useResizableColumns.js[39m (with declaration)
|
|
53
50
|
[35mevent[39m - Bundless [90mi18n.ts[39m to [90mdist/utils/i18n.js[39m (with declaration)
|
|
51
|
+
[35mevent[39m - Bundless [90mindex.tsx[39m to [90mdist/creek-config-provider/index.js[39m (with declaration)
|
|
52
|
+
[35mevent[39m - Bundless [90mtype.ts[39m to [90mdist/creek-table/type.js[39m (with declaration)
|
|
53
|
+
[35mevent[39m - Bundless [90mSearchTable.tsx[39m to [90mdist/creek-table/SearchTable.js[39m (with declaration)
|
|
54
54
|
[35mevent[39m - Generate declaration files...
|
|
55
|
-
[35mevent[39m - Transformed successfully in
|
|
55
|
+
[35mevent[39m - Transformed successfully in 3948 ms (46 files)
|
|
@@ -76,13 +76,15 @@ var CreekLayout = (props) => {
|
|
|
76
76
|
const actualShowLocaleButton = settingsStore.showLocaleButton ?? showLocaleButton;
|
|
77
77
|
const colorPrimary = settingsStore.colorPrimary || token.colorPrimary;
|
|
78
78
|
const actualKeepAlive = settingsStore.keepAlive ?? keepAlive;
|
|
79
|
-
|
|
79
|
+
const _userConfig = { ...userConfig, ...runtimeConfig };
|
|
80
80
|
const menuDataRender = (0, import_ahooks.useMemoizedFn)((menuData) => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
const isLocaleEnabled = ((_a = more.menu) == null ? void 0 : _a.locale) !== false && ((_b = _userConfig.menu) == null ? void 0 : _b.locale) !== false;
|
|
81
83
|
const mapMenu = (items) => {
|
|
82
84
|
return items.map((item) => {
|
|
83
85
|
return {
|
|
84
86
|
...item,
|
|
85
|
-
name: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuName, { name: item.name, path: item.path }),
|
|
87
|
+
name: isLocaleEnabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuName, { name: item.name, path: item.path }) : item.name,
|
|
86
88
|
children: item.children ? mapMenu(item.children) : void 0
|
|
87
89
|
};
|
|
88
90
|
});
|
|
@@ -128,7 +130,6 @@ var CreekLayout = (props) => {
|
|
|
128
130
|
actions.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRender.LayoutSettings, { defaultShowFullScreen: showFullScreen, defaultShowLocaleButton: showLocaleButton, defaultKeepAlive: import_lodash.default.isBoolean(keepAlive) ? keepAlive : true }, "settings"));
|
|
129
131
|
}
|
|
130
132
|
const keepAliveProps = import_lodash.default.isBoolean(keepAlive) ? {} : keepAlive;
|
|
131
|
-
const _userConfig = { ...userConfig, ...runtimeConfig };
|
|
132
133
|
const layoutContent = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
133
134
|
import_pro_components.ProLayout,
|
|
134
135
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/creek-layout/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ProLayout, ProLayoutProps } from '@ant-design/pro-components';\nimport { useMemoizedFn } from 'ahooks';\nimport { theme } from 'antd';\nimport _ from 'lodash';\n\nimport classnames from 'classnames';\n\nimport { useT } from '@creekjs/i18n/react';\n\nimport { CreekKeepAlive, CreekKeepAliveProps } from '../creek-keep-alive';\nimport { CreekLocaleButton } from '../creek-locale-button';\nimport { GlobalScrollbarStyle } from '../creek-style/scrollbar';\nimport { FullScreen, LayoutSettings } from './ActionRender';\nimport { CollapsedButton, useCollapsedStore } from './CollapseButton';\nimport { Exception } from './Exception';\nimport { useLayoutSettingsStore } from './useLayoutSettingsStore';\n\nexport type LayoutProps = ProLayoutProps & {\n runtimeConfig: ProLayoutProps;\n userConfig?: ProLayoutProps;\n navigate?: (path?: string | number) => void;\n showFullScreen?: boolean;\n showLocaleButton?: boolean;\n showSettingsButton?: boolean;\n initialInfo?: {\n initialState: any;\n loading: boolean;\n setInitialState: () => void;\n };\n keepAlive?: boolean | CreekKeepAliveProps;\n extraActions?: React.ReactNode[];\n};\n\nconst MenuName = ({ name, path }: { name: string; path?: string }) => {\n const t = useT();\n const key = !path || path === '/' ? 'menu.home' : `menu${path.replace(/\\//g, '.')}`;\n return <>{t(key, name)}</>;\n};\n\nexport const CreekLayout = (props: LayoutProps) => {\n const {\n route,\n userConfig,\n runtimeConfig,\n children,\n location,\n navigate,\n showFullScreen = false,\n showLocaleButton = false,\n showSettingsButton = false,\n keepAlive = false,\n extraActions = [],\n ...more\n } = props;\n\n const { useToken } = theme;\n const { token } = useToken();\n\n const { collapsed } = useCollapsedStore();\n const settingsStore = useLayoutSettingsStore();\n\n const actualShowFullScreen = settingsStore.showFullScreen ?? showFullScreen;\n const actualShowLocaleButton = settingsStore.showLocaleButton ?? showLocaleButton;\n const colorPrimary = settingsStore.colorPrimary || token.colorPrimary;\n const actualKeepAlive = settingsStore.keepAlive ?? keepAlive;\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAC1C,oBAA8B;AAC9B,kBAAsB;AACtB,oBAAc;AAEd,wBAAuB;AAEvB,mBAAqB;AAErB,8BAAoD;AACpD,iCAAkC;AAClC,uBAAqC;AACrC,0BAA2C;AAC3C,4BAAmD;AACnD,uBAA0B;AAC1B,oCAAuC;AA+JvC,iCAAc,wBA9Kd;AAoCS;AAHT,IAAM,WAAW,CAAC,EAAE,MAAM,KAAK,MAAuC;AACpE,QAAM,QAAI,mBAAK;AACf,QAAM,MAAM,CAAC,QAAQ,SAAS,MAAM,cAAc,OAAO,KAAK,QAAQ,OAAO,GAAG;AAChF,SAAO,2EAAG,YAAE,KAAK,IAAI,GAAE;AACzB;AAEO,IAAM,cAAc,CAAC,UAAuB;AACjD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,YAAY;AAAA,IACZ,eAAe,CAAC;AAAA,IAChB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,EAAE,MAAM,IAAI,SAAS;AAE3B,QAAM,EAAE,UAAU,QAAI,yCAAkB;AACxC,QAAM,oBAAgB,sDAAuB;AAE7C,QAAM,uBAAuB,cAAc,kBAAkB;AAC7D,QAAM,yBAAyB,cAAc,oBAAoB;AACjE,QAAM,eAAe,cAAc,gBAAgB,MAAM;AACzD,QAAM,kBAAkB,cAAc,aAAa;AAEnD,
|
|
4
|
+
"sourcesContent": ["import { ProLayout, ProLayoutProps } from '@ant-design/pro-components';\nimport { useMemoizedFn } from 'ahooks';\nimport { theme } from 'antd';\nimport _ from 'lodash';\n\nimport classnames from 'classnames';\n\nimport { useT } from '@creekjs/i18n/react';\n\nimport { CreekKeepAlive, CreekKeepAliveProps } from '../creek-keep-alive';\nimport { CreekLocaleButton } from '../creek-locale-button';\nimport { GlobalScrollbarStyle } from '../creek-style/scrollbar';\nimport { FullScreen, LayoutSettings } from './ActionRender';\nimport { CollapsedButton, useCollapsedStore } from './CollapseButton';\nimport { Exception } from './Exception';\nimport { useLayoutSettingsStore } from './useLayoutSettingsStore';\n\nexport type LayoutProps = ProLayoutProps & {\n runtimeConfig: ProLayoutProps;\n userConfig?: ProLayoutProps;\n navigate?: (path?: string | number) => void;\n showFullScreen?: boolean;\n showLocaleButton?: boolean;\n showSettingsButton?: boolean;\n initialInfo?: {\n initialState: any;\n loading: boolean;\n setInitialState: () => void;\n };\n keepAlive?: boolean | CreekKeepAliveProps;\n extraActions?: React.ReactNode[];\n};\n\nconst MenuName = ({ name, path }: { name: string; path?: string }) => {\n const t = useT();\n const key = !path || path === '/' ? 'menu.home' : `menu${path.replace(/\\//g, '.')}`;\n return <>{t(key, name)}</>;\n};\n\nexport const CreekLayout = (props: LayoutProps) => {\n const {\n route,\n userConfig,\n runtimeConfig,\n children,\n location,\n navigate,\n showFullScreen = false,\n showLocaleButton = false,\n showSettingsButton = false,\n keepAlive = false,\n extraActions = [],\n ...more\n } = props;\n\n const { useToken } = theme;\n const { token } = useToken();\n\n const { collapsed } = useCollapsedStore();\n const settingsStore = useLayoutSettingsStore();\n\n const actualShowFullScreen = settingsStore.showFullScreen ?? showFullScreen;\n const actualShowLocaleButton = settingsStore.showLocaleButton ?? showLocaleButton;\n const colorPrimary = settingsStore.colorPrimary || token.colorPrimary;\n const actualKeepAlive = settingsStore.keepAlive ?? keepAlive;\n\n const _userConfig = { ...userConfig, ...runtimeConfig };\n\n const menuDataRender = useMemoizedFn((menuData: any[]) => {\n const isLocaleEnabled = more.menu?.locale !== false && _userConfig.menu?.locale !== false;\n\n const mapMenu = (items: any[]): any[] => {\n return items.map((item) => {\n return {\n ...item,\n name: isLocaleEnabled ? <MenuName name={item.name} path={item.path} /> : item.name,\n children: item.children ? mapMenu(item.children) : undefined,\n };\n });\n };\n return mapMenu(menuData);\n });\n\n const menuItemRender: ProLayoutProps['menuItemRender'] = useMemoizedFn((itemProps, defaultDom) => {\n return (\n <span\n onClick={() => {\n if (navigate) {\n navigate(itemProps.path);\n }\n }}\n >\n {defaultDom}\n </span>\n );\n });\n\n const getTabTitle = useMemoizedFn((pathname: string) => {\n const findTitle = (routes: any[]): string | React.ReactNode | undefined => {\n for (const r of routes) {\n if (r.path === pathname) return r.name || r.title;\n if (r.children) {\n const found = findTitle(r.children);\n if (found) return found;\n }\n }\n return undefined;\n };\n return findTitle(route?.routes || []) || pathname;\n });\n\n const actions: React.ReactNode[] = [...extraActions];\n\n if (actualShowFullScreen) {\n actions.push(<FullScreen key=\"full-screen\" />);\n }\n\n if (actualShowLocaleButton) {\n actions.push(<CreekLocaleButton key=\"locale-button\" />);\n }\n\n if (showSettingsButton) {\n actions.push(<LayoutSettings key=\"settings\" defaultShowFullScreen={showFullScreen} defaultShowLocaleButton={showLocaleButton} defaultKeepAlive={_.isBoolean(keepAlive) ? keepAlive : true} />);\n }\n\n const keepAliveProps = _.isBoolean(keepAlive) ? {} : keepAlive;\n\n const layoutContent = (\n <ProLayout\n className={classnames('creek-layout-container', _userConfig?.className)}\n route={route}\n title={_userConfig?.title}\n siderWidth={200}\n location={location}\n menuDataRender={menuDataRender}\n menuItemRender={menuItemRender}\n actionsRender={() => actions}\n token={{\n header: {\n colorBgHeader: '#fff',\n colorHeaderTitle: 'rgba(0, 0, 0, 0.80);',\n colorTextMenuSelected: colorPrimary,\n heightLayoutHeader: 48,\n },\n sider: {\n colorMenuBackground: '#f7f8fa',\n colorBgMenuItemSelected: 'transparent',\n colorTextMenuActive: colorPrimary,\n colorTextMenuSelected: colorPrimary,\n colorTextMenuItemHover: colorPrimary,\n colorTextMenu: '#333',\n },\n pageContainer: {\n paddingBlockPageContainerContent: 0,\n paddingInlinePageContainerContent: 0,\n colorBgPageContainer: 'linear-gradient(180deg, #F7F9FF 0%, #FFF 45.59%);',\n },\n }}\n fixSiderbar\n fixedHeader\n collapsed={collapsed}\n collapsedButtonRender={(collapsed) => {\n return <CollapsedButton collapsed={collapsed} />;\n }}\n {...more}\n >\n <GlobalScrollbarStyle />\n <Exception>{actualKeepAlive ? <CreekKeepAlive getTabTitle={getTabTitle} {...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AAkB,kBAAkB,cAAAA,QAAE,UAAU,SAAS,IAAI,YAAY,QAApJ,UAA0J,CAAE;AAAA,EAC/L;AAEA,QAAM,iBAAiB,cAAAA,QAAE,UAAU,SAAS,IAAI,CAAC,IAAI;AAErD,QAAM,gBACJ;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,kBAAAC,SAAW,0BAA0B,2CAAa,SAAS;AAAA,MACtE;AAAA,MACA,OAAO,2CAAa;AAAA,MACpB,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe,MAAM;AAAA,MACrB,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,eAAe;AAAA,UACf,kBAAkB;AAAA,UAClB,uBAAuB;AAAA,UACvB,oBAAoB;AAAA,QACtB;AAAA,QACA,OAAO;AAAA,UACL,qBAAqB;AAAA,UACrB,yBAAyB;AAAA,UACzB,qBAAqB;AAAA,UACrB,uBAAuB;AAAA,UACvB,wBAAwB;AAAA,UACxB,eAAe;AAAA,QACjB;AAAA,QACA,eAAe;AAAA,UACb,kCAAkC;AAAA,UAClC,mCAAmC;AAAA,UACnC,sBAAsB;AAAA,QACxB;AAAA,MACF;AAAA,MACA,aAAW;AAAA,MACX,aAAW;AAAA,MACX;AAAA,MACA,uBAAuB,CAACC,eAAc;AACpC,eAAO,4CAAC,yCAAgB,WAAWA,YAAW;AAAA,MAChD;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,oDAAC,yCAAqB;AAAA,QACtB,4CAAC,8BAAW,4BAAkB,4CAAC,0CAAe,aAA2B,GAAG,gBAAgB,IAAK,UAAS;AAAA;AAAA;AAAA,EAC5G;AAGF,SAAO;AACT;",
|
|
6
6
|
"names": ["_", "classnames", "collapsed"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@creekjs/web-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"react-resizable": "^3.1.3",
|
|
15
15
|
"react-router-dom": "^7.13.0",
|
|
16
16
|
"zustand": "^5.0.1",
|
|
17
|
-
"@creekjs/i18n": "^1.0.
|
|
17
|
+
"@creekjs/i18n": "^1.0.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/lodash": "^4.17.20",
|
|
@@ -64,14 +64,16 @@ export const CreekLayout = (props: LayoutProps) => {
|
|
|
64
64
|
const colorPrimary = settingsStore.colorPrimary || token.colorPrimary;
|
|
65
65
|
const actualKeepAlive = settingsStore.keepAlive ?? keepAlive;
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
const _userConfig = { ...userConfig, ...runtimeConfig };
|
|
68
68
|
|
|
69
69
|
const menuDataRender = useMemoizedFn((menuData: any[]) => {
|
|
70
|
+
const isLocaleEnabled = more.menu?.locale !== false && _userConfig.menu?.locale !== false;
|
|
71
|
+
|
|
70
72
|
const mapMenu = (items: any[]): any[] => {
|
|
71
73
|
return items.map((item) => {
|
|
72
74
|
return {
|
|
73
75
|
...item,
|
|
74
|
-
name: <MenuName name={item.name} path={item.path}
|
|
76
|
+
name: isLocaleEnabled ? <MenuName name={item.name} path={item.path} /> : item.name,
|
|
75
77
|
children: item.children ? mapMenu(item.children) : undefined,
|
|
76
78
|
};
|
|
77
79
|
});
|
|
@@ -123,8 +125,6 @@ export const CreekLayout = (props: LayoutProps) => {
|
|
|
123
125
|
|
|
124
126
|
const keepAliveProps = _.isBoolean(keepAlive) ? {} : keepAlive;
|
|
125
127
|
|
|
126
|
-
const _userConfig = { ...userConfig, ...runtimeConfig };
|
|
127
|
-
|
|
128
128
|
const layoutContent = (
|
|
129
129
|
<ProLayout
|
|
130
130
|
className={classnames('creek-layout-container', _userConfig?.className)}
|