aldehyde 0.2.445 → 0.2.447
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/lib/controls/file-view/index.js +1 -1
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/form/criteria-form.js +1 -1
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +2 -1
- package/lib/layout/menu/l2menu-quick-bar.js.map +1 -1
- package/lib/layout2/components/search-menu.d.ts.map +1 -1
- package/lib/layout2/components/search-menu.js +8 -6
- package/lib/layout2/components/search-menu.js.map +1 -1
- package/lib/layout2/components/theme-button.d.ts.map +1 -1
- package/lib/layout2/components/theme-button.js +3 -1
- package/lib/layout2/components/theme-button.js.map +1 -1
- package/lib/layout2/tabs/tabs-layout.js +3 -3
- package/lib/layout2/tabs/tabs-layout.js.map +1 -1
- package/lib/layout3/components/tabs-layout.js +3 -3
- package/lib/layout3/components/tabs-layout.js.map +1 -1
- package/lib/layout3/css/header.less +12 -0
- package/lib/layout4/components/tabs-layout.js +3 -3
- package/lib/layout4/components/tabs-layout.js.map +1 -1
- package/lib/layout5/header.js +1 -1
- package/lib/layout5/header.js.map +1 -1
- package/lib/list/vertical-list/item.js +1 -1
- package/lib/list/vertical-list/item.js.map +1 -1
- package/lib/locale/LocaleButton.js +1 -1
- package/lib/locale/LocaleButton.js.map +1 -1
- package/lib/locale/LocaleProvider.d.ts +6 -2
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.js +32 -11
- package/lib/locale/LocaleProvider.js.map +1 -1
- package/lib/locale/langMp.d.ts +1 -1
- package/lib/locale/langMp.d.ts.map +1 -1
- package/lib/locale/useLocale.d.ts +1 -1
- package/lib/lowcode-components/line-bar-chart/index.d.ts +2 -0
- package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.js +14 -13
- package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-chart/index.d.ts +2 -0
- package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-chart/index.js +14 -13
- package/lib/lowcode-components/line-chart/index.js.map +1 -1
- package/lib/module/ttmpl-tree.d.ts +9 -0
- package/lib/module/ttmpl-tree.d.ts.map +1 -0
- package/lib/module/ttmpl-tree.js +42 -0
- package/lib/module/ttmpl-tree.js.map +1 -0
- package/lib/table/page-config-button.js +1 -1
- package/lib/table/page-config-button.js.map +1 -1
- package/lib/tmpl/interface.d.ts +2 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +11 -3
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/components/menu-card.d.ts.map +1 -1
- package/lib/welcome/components/menu-card.js +5 -3
- package/lib/welcome/components/menu-card.js.map +1 -1
- package/lib/welcome/components/page-card.js +1 -1
- package/lib/welcome/components/page-card.js.map +1 -1
- package/lib/welcome/components/quick-entrance.js +1 -1
- package/lib/welcome/components/quick-entrance.js.map +1 -1
- package/lib/welcome/components/user-menus.js +4 -4
- package/lib/welcome/components/user-menus.js.map +1 -1
- package/lib/welcome/components/workbench.d.ts.map +1 -1
- package/lib/welcome/components/workbench.js +3 -1
- package/lib/welcome/components/workbench.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/file-view/index.tsx +1 -1
- package/src/aldehyde/form/criteria-form.tsx +1 -1
- package/src/aldehyde/index.tsx +3 -1
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +2 -1
- package/src/aldehyde/layout2/components/search-menu.tsx +9 -6
- package/src/aldehyde/layout2/components/theme-button.tsx +3 -1
- package/src/aldehyde/layout2/tabs/tabs-layout.tsx +3 -3
- package/src/aldehyde/layout3/components/tabs-layout.tsx +3 -3
- package/src/aldehyde/layout3/css/header.less +12 -0
- package/src/aldehyde/layout4/components/tabs-layout.tsx +3 -3
- package/src/aldehyde/layout5/header.tsx +1 -1
- package/src/aldehyde/list/vertical-list/item.tsx +1 -1
- package/src/aldehyde/locale/LocaleButton.tsx +1 -1
- package/src/aldehyde/locale/LocaleProvider.tsx +37 -24
- package/src/aldehyde/locale/langMp.ts +1 -1
- package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +17 -13
- package/src/aldehyde/lowcode-components/line-chart/index.tsx +17 -13
- package/src/aldehyde/module/ttmpl-tree.tsx +48 -0
- package/src/aldehyde/table/page-config-button.tsx +1 -1
- package/src/aldehyde/tmpl/interface.tsx +2 -0
- package/src/aldehyde/units/index.tsx +10 -3
- package/src/aldehyde/welcome/components/menu-card.tsx +5 -3
- package/src/aldehyde/welcome/components/page-card.tsx +1 -1
- package/src/aldehyde/welcome/components/quick-entrance.tsx +1 -1
- package/src/aldehyde/welcome/components/user-menus.tsx +4 -4
- package/src/aldehyde/welcome/components/workbench.tsx +3 -1
|
@@ -1188,9 +1188,16 @@ export default {
|
|
|
1188
1188
|
},
|
|
1189
1189
|
toDefaultTheme(defTheme?: string) {
|
|
1190
1190
|
const temTheme = defTheme || ProgramConfig.getDefaultTheme();
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1191
|
+
let hash = window.location.hash;
|
|
1192
|
+
if (regexTheme.test(hash)) {
|
|
1193
|
+
hash = hash.replace(regexTheme, `${temTheme}/home`);
|
|
1194
|
+
window.location.hash = hash;
|
|
1195
|
+
} else {
|
|
1196
|
+
const localVersion = localStorage.getItem("version");
|
|
1197
|
+
if (!localVersion) {
|
|
1198
|
+
window.location.hash = `#/${temTheme}/home`;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1194
1201
|
},
|
|
1195
1202
|
async getThemeConfig(serverKey?: string) {
|
|
1196
1203
|
if (themeConfig) {
|
|
@@ -5,6 +5,7 @@ import { useNavigate } from "react-router-dom";
|
|
|
5
5
|
import "antd/dist/reset.css";
|
|
6
6
|
import { MenuType } from "../../layout2/type/layout-type";
|
|
7
7
|
import IconFont from "../../icon/aliIcon";
|
|
8
|
+
import { useLocale } from "../../locale/useLocale";
|
|
8
9
|
import "./menu-card.less";
|
|
9
10
|
|
|
10
11
|
const { useToken } = theme;
|
|
@@ -18,6 +19,7 @@ const Index = (props: Props) => {
|
|
|
18
19
|
const navigate = useNavigate();
|
|
19
20
|
const [menu, setMenu] = useState<MenuType[]>([]);
|
|
20
21
|
const { token } = useToken();
|
|
22
|
+
const { translate } = useLocale();
|
|
21
23
|
|
|
22
24
|
useEffect(() => {
|
|
23
25
|
if (menus?.length) {
|
|
@@ -29,14 +31,14 @@ const Index = (props: Props) => {
|
|
|
29
31
|
const renderIcon = item.icon ? <IconFont type={item.icon} /> : <RocketTwoTone />;
|
|
30
32
|
const iconColor = item.themeColor || token.colorPrimary;
|
|
31
33
|
const children = item.children?.filter(r => !r.disabled).slice(0, 3) || [];
|
|
32
|
-
const funcDescription = item.funcDescription
|
|
34
|
+
const funcDescription = item.funcDescription ? translate("${" + item.funcDescription + "}") : `${children.map(r => translate("${" + r.label + "}")).join("、")}${translate("${等功能}")}`;
|
|
33
35
|
return <div className="item-card" style={{ borderColor: `${token.colorBorder}CC`, backgroundColor: token.colorBgContainer }} onClick={() => navigate(`/${item.url}`)}>
|
|
34
36
|
<Space size={16} align="start" style={{ marginBottom: "16px" }}>
|
|
35
37
|
<div className="icon-wrapper" style={{ color: iconColor, background: `${iconColor}1A` }}>
|
|
36
38
|
<div className="icon-animated">{renderIcon}</div>
|
|
37
39
|
</div>
|
|
38
40
|
<div>
|
|
39
|
-
<h3 className="item-title">{item.label}</h3>
|
|
41
|
+
<h3 className="item-title">{translate("${" + item.label + "}")}</h3>
|
|
40
42
|
<p style={{ color: token.colorTextSecondary }}>
|
|
41
43
|
{funcDescription}
|
|
42
44
|
</p>
|
|
@@ -48,7 +50,7 @@ const Index = (props: Props) => {
|
|
|
48
50
|
navigate(`/${cItem.url}`);
|
|
49
51
|
}}
|
|
50
52
|
key={cItem.id} className="tag" style={{ color: iconColor, background: `${iconColor}1A` }}>
|
|
51
|
-
{cItem.label}
|
|
53
|
+
{translate("${" + cItem.label + "}")}
|
|
52
54
|
</span>
|
|
53
55
|
))}
|
|
54
56
|
</Flex>
|
|
@@ -82,7 +82,7 @@ const Index = (props: Props) => {
|
|
|
82
82
|
<div className="heard">
|
|
83
83
|
<div className="title">
|
|
84
84
|
<div className="line" style={{ background: token.colorPrimary }} />
|
|
85
|
-
<h3 className="text">{l2Menu?.title || "-"}</h3>
|
|
85
|
+
<h3 className="text">{translate("${" + (l2Menu?.title || "-") + "}")}</h3>
|
|
86
86
|
</div>
|
|
87
87
|
<div style={{ color: token.colorPrimary, cursor: "pointer" }} onClick={() => l2Menu?.url && navigate(`/${l2Menu.url}`)}>
|
|
88
88
|
{translate("${查看更多}")} <RightOutlined />
|
|
@@ -60,7 +60,7 @@ const Index = (props: Props) => {
|
|
|
60
60
|
<div className={`icon-wrapper`} style={{ color: iconColor, background: ` ${iconColor}1A` }}>
|
|
61
61
|
<div className="icon-animated">{renderIcon}</div>
|
|
62
62
|
</div>
|
|
63
|
-
<span className="menu-title">{item.title}</span>
|
|
63
|
+
<span className="menu-title">{translate("${" + item.title + "}")}</span>
|
|
64
64
|
</div>;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -67,7 +67,7 @@ const RenderDrawer = (props: DrawerProps) => {
|
|
|
67
67
|
|
|
68
68
|
const handleTreeData = (arr: MenuType[]) => {
|
|
69
69
|
return arr.map(item => {
|
|
70
|
-
const newItem = { ...item, key: item.id };
|
|
70
|
+
const newItem = { ...item, key: item.id, title: translate("${" + item.title + "}") };
|
|
71
71
|
if (newItem.children && Array.isArray(newItem.children)) {
|
|
72
72
|
newItem.children = handleTreeData(newItem.children);
|
|
73
73
|
}
|
|
@@ -185,7 +185,7 @@ const Index = (props: Props) => {
|
|
|
185
185
|
<div className={`icon-wrapper`} style={{ color: iconColor, background: ` ${iconColor}1A` }}>
|
|
186
186
|
<div className="icon-animated">{renderIcon}</div>
|
|
187
187
|
</div>
|
|
188
|
-
<span className="menu-title">{item.title}</span>
|
|
188
|
+
<span className="menu-title">{translate("${" + item.title + "}")}</span>
|
|
189
189
|
</div>;
|
|
190
190
|
};
|
|
191
191
|
|
|
@@ -219,7 +219,7 @@ const Index = (props: Props) => {
|
|
|
219
219
|
<div className="icon-animated">{renderIcon}</div>
|
|
220
220
|
</div>
|
|
221
221
|
<div>
|
|
222
|
-
<h3 className="item-title" onClick={() => navigate(`/${item.url}`)}>{item.title}</h3>
|
|
222
|
+
<h3 className="item-title" onClick={() => navigate(`/${item.url}`)}>{translate("${" + item.title + "}")}</h3>
|
|
223
223
|
<Flex gap="small" align="center" wrap>
|
|
224
224
|
{children.map((cItem) => (
|
|
225
225
|
<span
|
|
@@ -228,7 +228,7 @@ const Index = (props: Props) => {
|
|
|
228
228
|
onClickPageConfig({ ...cItem, url: item.url });
|
|
229
229
|
}}
|
|
230
230
|
key={cItem.recordCode} className="tag" style={{ color: iconColor, background: `${iconColor}1A` }}>
|
|
231
|
-
{cItem.name}
|
|
231
|
+
{translate("${" + cItem.name + "}")}
|
|
232
232
|
</span>
|
|
233
233
|
))}
|
|
234
234
|
</Flex>
|
|
@@ -8,6 +8,7 @@ import HCDataSource from "../../tmpl/hc-data-source";
|
|
|
8
8
|
import { Level2Menu } from "../../tmpl/interface";
|
|
9
9
|
import IconFont from "../../icon/aliIcon";
|
|
10
10
|
import { handleMenuItemUrl } from "../../layout2/page";
|
|
11
|
+
import { useLocale } from "../../locale/useLocale";
|
|
11
12
|
import "./workbench.less";
|
|
12
13
|
|
|
13
14
|
const { useToken } = theme;
|
|
@@ -29,6 +30,7 @@ const Workbench = (props: WorkbenchProps) => {
|
|
|
29
30
|
const rowRef = useRef(null);
|
|
30
31
|
const navigate = useNavigate();
|
|
31
32
|
const { token } = useToken();
|
|
33
|
+
const { translate } = useLocale();
|
|
32
34
|
|
|
33
35
|
const getL2Menus = async () => {
|
|
34
36
|
let temData: Level2Menu[] = await HCDataSource.fastMenu("QuickPanel");
|
|
@@ -102,7 +104,7 @@ const Workbench = (props: WorkbenchProps) => {
|
|
|
102
104
|
<div className="stat-card" style={{ borderColor: `${token.colorBorder}CC`, backgroundColor: token.colorBgContainer }} onClick={() => navigate(`/${item.url}`)}>
|
|
103
105
|
<div className="bg-gradient" style={{ background: `radial-gradient(circle, ${iconColor}1A 0%, transparent 70%)` }} />
|
|
104
106
|
<div >
|
|
105
|
-
<p className="card-title">{l2Menu.title}</p>
|
|
107
|
+
<p className="card-title">{translate("${" + l2Menu.title + "}")}</p>
|
|
106
108
|
<p className="card-count" style={{ color: iconColor }}>{l2Menu.count || 0}</p>
|
|
107
109
|
</div>
|
|
108
110
|
<div className="icon-wrapper" style={{ color: iconColor, background: `${iconColor}1A` }}>
|