aldehyde 0.2.244 → 0.2.245
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/action/index.d.ts +1 -1
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +1 -1
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +8 -0
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +15 -5
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js +11 -4
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +12 -8
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/layout2/components/userButton.js +2 -2
- package/lib/layout2/components/userButton.js.map +1 -1
- package/lib/layout2/header.d.ts.map +1 -1
- package/lib/layout2/header.js +3 -3
- package/lib/layout2/header.js.map +1 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +5 -2
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/util/menu.util.d.ts.map +1 -1
- package/lib/layout2/util/menu.util.js +1 -0
- package/lib/layout2/util/menu.util.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js.map +1 -1
- package/lib/module/dtmpl-view-modal.js +1 -1
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +6 -1
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +2 -0
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +12 -8
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +3 -2
- package/src/aldehyde/controls/entity-select/entity-select.tsx +24 -4
- package/src/aldehyde/controls/rfield/index.tsx +12 -6
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +13 -6
- package/src/aldehyde/layout2/components/userButton.tsx +4 -4
- package/src/aldehyde/layout2/header.tsx +15 -7
- package/src/aldehyde/layout2/page.tsx +5 -3
- package/src/aldehyde/layout2/util/menu.util.tsx +2 -0
- package/src/aldehyde/module/dtmpl-view-card.tsx +3 -1
- package/src/aldehyde/module/dtmpl-view-modal.tsx +2 -2
- package/src/aldehyde/routable/dtmpl-route.tsx +8 -1
- package/src/aldehyde/routable/ltmpl-route.tsx +17 -12
|
@@ -123,8 +123,10 @@ const getMenuConfig = async (): Promise<{
|
|
|
123
123
|
}> => {
|
|
124
124
|
|
|
125
125
|
const res = await HcserviceV3.requestBlocks("", "");
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
let menuList: MenuType[]=[];
|
|
127
|
+
if(res?.blocks){
|
|
128
|
+
menuList = handleMenuRes(res.blocks);
|
|
129
|
+
}
|
|
128
130
|
let tmp={};
|
|
129
131
|
menuList.forEach((menu: MenuType) => {
|
|
130
132
|
getMenuMap(menu,tmp);
|
|
@@ -133,7 +135,7 @@ const getMenuConfig = async (): Promise<{
|
|
|
133
135
|
|
|
134
136
|
return {
|
|
135
137
|
menu: menuList,
|
|
136
|
-
systemName: res
|
|
138
|
+
systemName: res?.programName,
|
|
137
139
|
};
|
|
138
140
|
};
|
|
139
141
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { MenuProps } from "antd";
|
|
3
3
|
import { MenuType } from "../type/layout.type";
|
|
4
|
+
import {SettingOutlined} from "@ant-design/icons";
|
|
4
5
|
|
|
5
6
|
type AntdMenuItemType = Required<MenuProps>["items"][number];
|
|
6
7
|
|
|
@@ -56,6 +57,7 @@ export const handlePropsMenuToAntdMenu = (
|
|
|
56
57
|
const menu: AntdMenuItemType = {
|
|
57
58
|
label: customLabelFn(item, floor),
|
|
58
59
|
key: id,
|
|
60
|
+
// icon: <SettingOutlined />,
|
|
59
61
|
disabled,
|
|
60
62
|
className,
|
|
61
63
|
children:
|
|
@@ -46,7 +46,9 @@ class DtmplViewCard extends React.PureComponent<DtmplViewCardProps, DtmplViewCar
|
|
|
46
46
|
const {showDtmplEdit} = this.state;
|
|
47
47
|
const { sourceId,code,mainCode,editable,serverKey,codeSource,title,showHeader,addTmplId} = this.props;
|
|
48
48
|
return <>
|
|
49
|
-
<ActDtmplView showHeader={showHeader} title={title} codeSource={codeSource} serverKey={serverKey}
|
|
49
|
+
<ActDtmplView showHeader={showHeader} title={title} codeSource={codeSource} serverKey={serverKey}
|
|
50
|
+
goDtmpl={editable?this.goDtmpl:null} sourceId={sourceId}
|
|
51
|
+
code={code} mainCode={mainCode}></ActDtmplView>
|
|
50
52
|
{showDtmplEdit? <DtmplEditModal addTmplId={addTmplId} codeSource={codeSource} serverKey={serverKey} open={showDtmplEdit} onCancel={()=>{
|
|
51
53
|
this.setState({
|
|
52
54
|
showDtmplEdit:false,
|
|
@@ -39,8 +39,8 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
39
39
|
open={open}
|
|
40
40
|
width={width}
|
|
41
41
|
title={title}
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
styles={{body:{height: height, overflow: 'auto'}}}
|
|
43
|
+
destroyOnHidden={true}
|
|
44
44
|
centered
|
|
45
45
|
onCancel={onClose}
|
|
46
46
|
>
|
|
@@ -81,6 +81,13 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
81
81
|
|
|
82
82
|
goBackToLtmpl = () => {
|
|
83
83
|
this.props.navigate(-1);
|
|
84
|
+
//this.props.navigate();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
goNavigatel = () => {
|
|
88
|
+
this.props.navigate(window.location.hash);
|
|
89
|
+
|
|
90
|
+
//.reload();
|
|
84
91
|
};
|
|
85
92
|
|
|
86
93
|
goDtmpl = (code: string) => {
|
|
@@ -157,7 +164,7 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
157
164
|
sourceId={sourceId}
|
|
158
165
|
code={code}
|
|
159
166
|
mainCode={this.getMainCode()}
|
|
160
|
-
goBackToLtmpl={codeSource ?
|
|
167
|
+
goBackToLtmpl={codeSource ? this.goNavigatel : this.goBackToLtmpl}
|
|
161
168
|
goDtmpl={this.goDtmpl}
|
|
162
169
|
></DtmplEdit>
|
|
163
170
|
);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import {
|
|
3
|
-
AddOrUpdate,
|
|
4
3
|
DoEditParam, LtmplConfig,
|
|
5
4
|
LtmplConfigRes, PageType,
|
|
6
5
|
RouterCompProps,
|
|
@@ -18,7 +17,6 @@ import DtmplViewDrawer from "../module/dtmpl-view-drawer";
|
|
|
18
17
|
import DtmplCustomEditModalPage from "../custom-page/dtmpl-custom-edit-modal-page";
|
|
19
18
|
import DtmplEditPage from "../module/dtmpl-edit-page";
|
|
20
19
|
import DtmplViewModal from "../module/dtmpl-view-modal";
|
|
21
|
-
import {arrowsOptions} from "ketcher-react/dist/script/ui/views/toolbars/LeftToolbar/leftToolbarOptions";
|
|
22
20
|
|
|
23
21
|
export interface LtmplRouteProps extends RouterCompProps {
|
|
24
22
|
layoutRootPath?: string;
|
|
@@ -37,6 +35,8 @@ export interface LtmplRouteState {
|
|
|
37
35
|
showViewModal?: boolean;
|
|
38
36
|
showEdit?: boolean;
|
|
39
37
|
showWindowType?: string;
|
|
38
|
+
viewSourceId?: string;
|
|
39
|
+
editSourceId?: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
@@ -60,12 +60,14 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
60
60
|
showEdit: false,
|
|
61
61
|
showWindowType: "modal",
|
|
62
62
|
routeMode:'multiple',
|
|
63
|
+
viewSourceId: undefined,
|
|
64
|
+
editSourceId: undefined
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
async componentDidMount() {
|
|
66
68
|
this.loadData();
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
Z
|
|
69
71
|
get computedLayoutPath() {
|
|
70
72
|
const {layoutRootPath} = this.props;
|
|
71
73
|
if (layoutRootPath !== undefined) return `/${layoutRootPath}`;
|
|
@@ -156,7 +158,8 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
156
158
|
this.setState({
|
|
157
159
|
showViewModal: showType=="modal",
|
|
158
160
|
showViewDrawer: showType=="drawer",
|
|
159
|
-
selectedCode: showViewParam.code
|
|
161
|
+
selectedCode: showViewParam.code,
|
|
162
|
+
viewSourceId:dtmplSourceId
|
|
160
163
|
})
|
|
161
164
|
}
|
|
162
165
|
};
|
|
@@ -194,7 +197,8 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
194
197
|
this.setState({
|
|
195
198
|
showEdit: true,
|
|
196
199
|
showWindowType,
|
|
197
|
-
selectedCode: param.code
|
|
200
|
+
selectedCode: param.code,
|
|
201
|
+
editSourceId:dtmplSourceId,
|
|
198
202
|
})
|
|
199
203
|
}
|
|
200
204
|
};
|
|
@@ -268,7 +272,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
268
272
|
}
|
|
269
273
|
|
|
270
274
|
doSearch = (params_) => {
|
|
271
|
-
const {basePath
|
|
275
|
+
const {basePath} = this.props;
|
|
272
276
|
const {sourceId} = this.props.params;
|
|
273
277
|
let params = {
|
|
274
278
|
...Units.transQueryStrToParams(
|
|
@@ -305,7 +309,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
305
309
|
this.doSearch(params);
|
|
306
310
|
};
|
|
307
311
|
doSubmited = () => {
|
|
308
|
-
this.onChangeSearch(
|
|
312
|
+
this.onChangeSearch({serial_number:Units.getReactKey()});
|
|
309
313
|
this.doClose();
|
|
310
314
|
}
|
|
311
315
|
|
|
@@ -322,7 +326,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
322
326
|
render() {
|
|
323
327
|
const {
|
|
324
328
|
ltmplConfigRes, showDraw, showWindowType, ractionId, selectedCode,
|
|
325
|
-
showViewDrawer, showViewModal, showEdit
|
|
329
|
+
showViewDrawer, showViewModal, showEdit,editSourceId,viewSourceId
|
|
326
330
|
} = this.state;
|
|
327
331
|
const {location, params,tableType,rowOperatable} = this.props;
|
|
328
332
|
const {sourceId} = params;
|
|
@@ -393,13 +397,14 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
393
397
|
width={ windowWidth}
|
|
394
398
|
onClose={this.doClose}
|
|
395
399
|
open={showViewDrawer}
|
|
396
|
-
sourceId={sourceId}
|
|
400
|
+
sourceId={viewSourceId?viewSourceId:sourceId}
|
|
397
401
|
code={selectedCode}
|
|
398
402
|
></DtmplViewDrawer>
|
|
399
403
|
) : null}
|
|
400
404
|
{showViewModal && selectedCode ? (
|
|
401
405
|
<DtmplViewModal
|
|
402
|
-
serverKey={null} width={windowWidth} height={windowHeight} onClose={this.doClose}
|
|
406
|
+
serverKey={null} width={windowWidth} height={windowHeight} onClose={this.doClose}
|
|
407
|
+
open={showViewModal} sourceId={viewSourceId?viewSourceId:sourceId}
|
|
403
408
|
code={selectedCode}
|
|
404
409
|
></DtmplViewModal>
|
|
405
410
|
) : null}
|
|
@@ -425,7 +430,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
425
430
|
height={windowEditHeight}
|
|
426
431
|
onCancel={this.doClose}
|
|
427
432
|
mainCode={mainCode}
|
|
428
|
-
sourceId={sourceId}
|
|
433
|
+
sourceId={editSourceId?editSourceId:sourceId}
|
|
429
434
|
code={selectedCode}
|
|
430
435
|
onOk={this.doSubmited}
|
|
431
436
|
/>
|