aldehyde 0.2.409 → 0.2.412
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/entity-select/popover-entity-select.js +1 -1
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/enum-badge/index.d.ts.map +1 -1
- package/lib/controls/enum-badge/index.js +1 -1
- package/lib/controls/enum-badge/index.js.map +1 -1
- package/lib/controls/enum-tag/index.d.ts.map +1 -1
- package/lib/controls/enum-tag/index.js +3 -4
- package/lib/controls/enum-tag/index.js.map +1 -1
- package/lib/controls/html-editor/draft.d.ts +2 -1
- package/lib/controls/html-editor/draft.d.ts.map +1 -1
- package/lib/controls/html-editor/draft.js +3 -5
- package/lib/controls/html-editor/draft.js.map +1 -1
- package/lib/controls/html-editor/index.less +68 -0
- package/lib/detail/edit/popover-edit-card.js +1 -1
- package/lib/detail/edit/popover-edit-card.js.map +1 -1
- package/lib/detail/edit/popover-editor.d.ts.map +1 -1
- package/lib/detail/edit/popover-editor.js +1 -3
- package/lib/detail/edit/popover-editor.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +1 -0
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +3 -2
- package/lib/layout/menu/l2menu-message-bar.js.map +1 -1
- package/lib/layout/menu/message-bar.less +69 -0
- package/lib/layout2/components/theme-button.d.ts.map +1 -1
- package/lib/layout2/components/theme-button.js +18 -4
- package/lib/layout2/components/theme-button.js.map +1 -1
- package/lib/layout2/css/header.css +10 -6
- package/lib/layout2/css/tabs-layout.less +6 -0
- package/lib/layout2/header.d.ts +1 -1
- package/lib/layout2/header.d.ts.map +1 -1
- package/lib/layout2/header.js +2 -5
- package/lib/layout2/header.js.map +1 -1
- package/lib/layout2/page.d.ts +5 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +18 -8
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/type/layout-type.d.ts +4 -0
- package/lib/layout2/type/layout-type.d.ts.map +1 -1
- package/lib/layout3/page.d.ts.map +1 -1
- package/lib/layout3/page.js +17 -5
- package/lib/layout3/page.js.map +1 -1
- package/lib/layout4/css/main.less +1 -1
- package/lib/layout4/header.d.ts +1 -1
- package/lib/layout4/header.d.ts.map +1 -1
- package/lib/layout4/header.js +1 -2
- package/lib/layout4/header.js.map +1 -1
- package/lib/layout4/page.d.ts +1 -1
- package/lib/layout4/page.d.ts.map +1 -1
- package/lib/layout4/page.js +21 -6
- package/lib/layout4/page.js.map +1 -1
- package/lib/layout5/css/sider.less +6 -0
- package/lib/layout5/page.d.ts +1 -1
- package/lib/layout5/page.d.ts.map +1 -1
- package/lib/layout5/page.js +21 -6
- package/lib/layout5/page.js.map +1 -1
- package/lib/layout5/sider.d.ts +1 -1
- package/lib/layout5/sider.d.ts.map +1 -1
- package/lib/layout5/sider.js +1 -2
- package/lib/layout5/sider.js.map +1 -1
- package/lib/list/card-list/index.less +6 -4
- package/lib/list/vertical-list/index.d.ts +2 -3
- package/lib/list/vertical-list/index.d.ts.map +1 -1
- package/lib/list/vertical-list/index.js +7 -39
- package/lib/list/vertical-list/index.js.map +1 -1
- package/lib/list/vertical-list/index.less +191 -12
- package/lib/list/vertical-list/item.d.ts +13 -0
- package/lib/list/vertical-list/item.d.ts.map +1 -0
- package/lib/list/vertical-list/item.js +91 -0
- package/lib/list/vertical-list/item.js.map +1 -0
- package/lib/module/ltmpl-table.d.ts +4 -1
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +3 -2
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/sso-Login/index.d.ts +7 -0
- package/lib/sso-Login/index.d.ts.map +1 -0
- package/lib/sso-Login/index.js +51 -0
- package/lib/sso-Login/index.js.map +1 -0
- package/lib/table/act-table.d.ts +2 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +3 -2
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +25 -7
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/column/index.less +7 -5
- package/lib/table/query-table.d.ts +1 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +7 -5
- package/lib/table/query-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +5 -0
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +28 -0
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +8 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/units/index.d.ts +3 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +22 -4
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/HCWelcome.js +45 -20
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/components/menu-card.d.ts +10 -0
- package/lib/welcome/components/menu-card.d.ts.map +1 -0
- package/lib/welcome/components/menu-card.js +43 -0
- package/lib/welcome/components/menu-card.js.map +1 -0
- package/lib/welcome/components/menu-card.less +96 -0
- package/lib/welcome/components/page-card.d.ts +16 -0
- package/lib/welcome/components/page-card.d.ts.map +1 -0
- package/lib/welcome/components/page-card.js +86 -0
- package/lib/welcome/components/page-card.js.map +1 -0
- package/lib/welcome/components/page-card.less +50 -0
- package/lib/welcome/components/quick-entrance.d.ts +14 -0
- package/lib/welcome/components/quick-entrance.d.ts.map +1 -0
- package/lib/welcome/components/quick-entrance.js +66 -0
- package/lib/welcome/components/quick-entrance.js.map +1 -0
- package/lib/welcome/components/quick-entrance.less +121 -0
- package/lib/welcome/components/workbench.d.ts +14 -0
- package/lib/welcome/components/workbench.d.ts.map +1 -0
- package/lib/welcome/components/workbench.js +115 -0
- package/lib/welcome/components/workbench.js.map +1 -0
- package/lib/welcome/components/workbench.less +119 -0
- package/package.json +1 -1
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +1 -1
- package/src/aldehyde/controls/enum-badge/index.tsx +3 -2
- package/src/aldehyde/controls/enum-tag/index.tsx +9 -12
- package/src/aldehyde/controls/html-editor/draft.tsx +27 -31
- package/src/aldehyde/controls/html-editor/index.less +68 -0
- package/src/aldehyde/detail/edit/popover-edit-card.tsx +3 -3
- package/src/aldehyde/detail/edit/popover-editor.tsx +20 -22
- package/src/aldehyde/index.tsx +6 -3
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +4 -1
- package/src/aldehyde/layout/menu/message-bar.less +69 -0
- package/src/aldehyde/layout2/components/theme-button.tsx +9 -4
- package/src/aldehyde/layout2/css/header.css +10 -6
- package/src/aldehyde/layout2/css/tabs-layout.less +6 -0
- package/src/aldehyde/layout2/header.tsx +6 -10
- package/src/aldehyde/layout2/page.tsx +21 -10
- package/src/aldehyde/layout2/type/layout-type.ts +4 -0
- package/src/aldehyde/layout3/page.tsx +9 -5
- package/src/aldehyde/layout4/css/main.less +1 -1
- package/src/aldehyde/layout4/header.tsx +2 -3
- package/src/aldehyde/layout4/page.tsx +14 -7
- package/src/aldehyde/layout5/css/sider.less +6 -0
- package/src/aldehyde/layout5/page.tsx +14 -7
- package/src/aldehyde/layout5/sider.tsx +5 -8
- package/src/aldehyde/list/card-list/index.less +6 -4
- package/src/aldehyde/list/vertical-list/index.less +191 -12
- package/src/aldehyde/list/vertical-list/index.tsx +10 -70
- package/src/aldehyde/list/vertical-list/item.tsx +136 -0
- package/src/aldehyde/module/ltmpl-table.tsx +7 -2
- package/src/aldehyde/sso-Login/index.tsx +49 -0
- package/src/aldehyde/table/act-table.tsx +4 -1
- package/src/aldehyde/table/column/column-builder.tsx +28 -10
- package/src/aldehyde/table/column/index.less +7 -5
- package/src/aldehyde/table/query-table.tsx +8 -7
- package/src/aldehyde/tmpl/hcservice-v3.tsx +26 -0
- package/src/aldehyde/tmpl/interface.tsx +6 -1
- package/src/aldehyde/units/index.tsx +21 -4
- package/src/aldehyde/welcome/HCWelcome.js +54 -28
- package/src/aldehyde/welcome/components/menu-card.less +96 -0
- package/src/aldehyde/welcome/components/menu-card.tsx +68 -0
- package/src/aldehyde/welcome/components/page-card.less +50 -0
- package/src/aldehyde/welcome/components/page-card.tsx +97 -0
- package/src/aldehyde/welcome/components/quick-entrance.less +121 -0
- package/src/aldehyde/welcome/components/quick-entrance.tsx +80 -0
- package/src/aldehyde/welcome/components/workbench.less +119 -0
- package/src/aldehyde/welcome/components/workbench.tsx +144 -0
- package/lib/welcome/quick-entrance.d.ts +0 -37
- package/lib/welcome/quick-entrance.d.ts.map +0 -1
- package/lib/welcome/quick-entrance.js +0 -93
- package/lib/welcome/quick-entrance.js.map +0 -1
- package/lib/welcome/workbench.d.ts +0 -37
- package/lib/welcome/workbench.d.ts.map +0 -1
- package/lib/welcome/workbench.js +0 -92
- package/lib/welcome/workbench.js.map +0 -1
- package/src/aldehyde/welcome/quick-entrance.tsx +0 -100
- package/src/aldehyde/welcome/workbench.tsx +0 -102
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import {Card} from "antd";
|
|
4
|
-
import {VEControlProps} from "../../tmpl/interface";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Card } from "antd";
|
|
4
|
+
import { VEControlProps } from "../../tmpl/interface";
|
|
5
5
|
// 核心
|
|
6
|
-
import { EditorState, ContentState } from 'draft-js'
|
|
7
|
-
import { Editor } from 'react-draft-wysiwyg'
|
|
8
|
-
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'
|
|
6
|
+
import { EditorState, ContentState } from 'draft-js';
|
|
7
|
+
import { Editor } from 'react-draft-wysiwyg';
|
|
8
|
+
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
|
9
9
|
// draft 转换为 html
|
|
10
|
-
import draftToHtml from 'draftjs-to-html'
|
|
10
|
+
import draftToHtml from 'draftjs-to-html';
|
|
11
11
|
// html 转换为 draft
|
|
12
|
-
import htmlToDraft from 'html-to-draftjs'
|
|
12
|
+
import htmlToDraft from 'html-to-draftjs';
|
|
13
|
+
import "./index.less";
|
|
13
14
|
|
|
14
15
|
interface DraftProps extends VEControlProps {
|
|
15
|
-
getHtml?:any;
|
|
16
|
+
getHtml?: any;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
interface DraftState
|
|
19
|
-
editorState?:boolean;
|
|
19
|
+
interface DraftState {
|
|
20
|
+
editorState?: boolean;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export default class Draft extends React.PureComponent<DraftProps, DraftState>{
|
|
23
|
+
export default class Draft extends React.PureComponent<DraftProps, DraftState> {
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
state = {
|
|
26
|
+
editorState: EditorState.createEmpty(),
|
|
27
|
+
}
|
|
27
28
|
|
|
28
29
|
componentDidMount() {
|
|
29
30
|
// 如果从后台读取接口存储的有值,读取过来转换为富文本格式默认显示
|
|
@@ -70,19 +71,17 @@ export default class Draft extends React.PureComponent<DraftProps, DraftState>{
|
|
|
70
71
|
})
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
changeValue = (value) => {
|
|
74
75
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
|
|
78
|
-
render(){
|
|
79
|
-
const {viewOrEdit,disabled} = this.props;
|
|
80
|
-
|
|
81
|
-
const {editorState}=this.state;
|
|
82
|
-
let entryControl = undefined;
|
|
79
|
+
render() {
|
|
80
|
+
const { viewOrEdit, disabled } = this.props;
|
|
81
|
+
const { editorState } = this.state;
|
|
83
82
|
|
|
84
83
|
const toolbar = {
|
|
85
|
-
options: ['inline', 'blockType', 'fontSize', 'fontFamily', 'list', 'textAlign', 'colorPicker','link', 'embedded', 'emoji', 'image', 'remove', 'history'],
|
|
84
|
+
options: ['inline', 'blockType', 'fontSize', 'fontFamily', 'list', 'textAlign', 'colorPicker', 'link', 'embedded', 'emoji', 'image', 'remove', 'history'],
|
|
86
85
|
colorPicker: {
|
|
87
86
|
// 图标可以自定义,如果使用默认就注释掉
|
|
88
87
|
// icon: 'https://-------',
|
|
@@ -105,10 +104,10 @@ export default class Draft extends React.PureComponent<DraftProps, DraftState>{
|
|
|
105
104
|
urlEnabled: true,
|
|
106
105
|
uploadEnabled: true,
|
|
107
106
|
alignmentEnabled: true,
|
|
108
|
-
uploadCallback: ()=>{
|
|
107
|
+
uploadCallback: () => {
|
|
109
108
|
return new Promise(
|
|
110
109
|
(resolve, reject) => {
|
|
111
|
-
resolve({data:{link:'https://img0.baidu.com/it/u=3584251488,339638482&fm=253&fmt=auto&app=138&f=JPEG?w=722&h=500'}});
|
|
110
|
+
resolve({ data: { link: 'https://img0.baidu.com/it/u=3584251488,339638482&fm=253&fmt=auto&app=138&f=JPEG?w=722&h=500' } });
|
|
112
111
|
});
|
|
113
112
|
},
|
|
114
113
|
previewImage: false,
|
|
@@ -119,12 +118,12 @@ export default class Draft extends React.PureComponent<DraftProps, DraftState>{
|
|
|
119
118
|
width: 'auto',
|
|
120
119
|
},
|
|
121
120
|
}
|
|
122
|
-
}
|
|
121
|
+
};
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
return <Card className='html-card' style={{ width: '100%' }} styles={{ body: { padding: '2px', minHeight: '280px' } }} size={'small'}>
|
|
125
124
|
<Editor
|
|
126
125
|
readOnly={disabled}
|
|
127
|
-
toolbarHidden={viewOrEdit
|
|
126
|
+
toolbarHidden={viewOrEdit === 'view' ? true : false}
|
|
128
127
|
editorState={editorState}
|
|
129
128
|
wrapperClassName="contract-template-add-wrapper"
|
|
130
129
|
editorClassName="contract-template-editor"
|
|
@@ -132,9 +131,6 @@ export default class Draft extends React.PureComponent<DraftProps, DraftState>{
|
|
|
132
131
|
onChange={this.editorChange}
|
|
133
132
|
toolbar={toolbar}
|
|
134
133
|
/>
|
|
135
|
-
</Card
|
|
136
|
-
|
|
137
|
-
return entryControl;
|
|
138
|
-
|
|
134
|
+
</Card>;
|
|
139
135
|
}
|
|
140
136
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.html-card {
|
|
2
|
+
border-color: var(--ant-color-border) !important;
|
|
3
|
+
|
|
4
|
+
.rdw-dropdown-optionwrapper {
|
|
5
|
+
background: var(--ant-color-bg-container) !important;
|
|
6
|
+
color: var(--ant-color-text) !important;
|
|
7
|
+
border: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rdw-dropdownoption-active,
|
|
11
|
+
.rdw-dropdownoption-highlighted {
|
|
12
|
+
background: transparent !important;
|
|
13
|
+
color: var(--ant-color-primary) !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rdw-dropdown-optionwrapper {
|
|
17
|
+
box-shadow: none !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rdw-editor-toolbar {
|
|
21
|
+
background: transparent !important;
|
|
22
|
+
border-color: var(--ant-color-border) !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rdw-option-wrapper,
|
|
26
|
+
.rdw-dropdown-wrapper {
|
|
27
|
+
background: var(--ant-button-default-bg) !important;
|
|
28
|
+
border-color: var(--ant-color-border) !important;
|
|
29
|
+
color: var(--ant-color-text) !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rdw-option-wrapper:hover,
|
|
33
|
+
.rdw-dropdown-wrapper:hover {
|
|
34
|
+
box-shadow: 1px 1px 0px var(--ant-color-primary);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.rdw-option-active {
|
|
38
|
+
box-shadow: none !important;
|
|
39
|
+
background: var(--ant-color-primary) !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.rdw-colorpicker-modal,
|
|
43
|
+
.rdw-link-modal,
|
|
44
|
+
.rdw-embedded-modal,
|
|
45
|
+
.rdw-emoji-modal,
|
|
46
|
+
.rdw-image-modal {
|
|
47
|
+
background: var(--ant-color-bg-container) !important;
|
|
48
|
+
border-color: var(--ant-color-border) !important;
|
|
49
|
+
box-shadow: none !important;
|
|
50
|
+
|
|
51
|
+
input,
|
|
52
|
+
button {
|
|
53
|
+
background: var(--ant-color-bg-container) !important;
|
|
54
|
+
border-color: var(--ant-color-border) !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.rdw-embedded-modal-header-option {
|
|
58
|
+
width: 100%;
|
|
59
|
+
align-items: start;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.rdw-image-modal-header-label {
|
|
63
|
+
border-left: none;
|
|
64
|
+
border-right: none;
|
|
65
|
+
border-top: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -48,7 +48,7 @@ export default class PopoverEditCard extends React.PureComponent<
|
|
|
48
48
|
static contextType = LocaleContext;
|
|
49
49
|
context: React.ContextType<typeof LocaleContext>;
|
|
50
50
|
|
|
51
|
-
async componentDidMount() {}
|
|
51
|
+
async componentDidMount() { }
|
|
52
52
|
|
|
53
53
|
async componentDidUpdate() {
|
|
54
54
|
//this.reset();
|
|
@@ -135,9 +135,9 @@ export default class PopoverEditCard extends React.PureComponent<
|
|
|
135
135
|
|
|
136
136
|
return (
|
|
137
137
|
<Card
|
|
138
|
-
style={{ width: fieldGroupConfig&& fieldGroupConfig.addOrEditType=="doubleCol"?1000:600 }}
|
|
138
|
+
style={{ width: fieldGroupConfig && fieldGroupConfig.addOrEditType == "doubleCol" ? 1000 : 600 }}
|
|
139
139
|
title={this.getTitle()}
|
|
140
|
-
styles={{body:{ overflow: "auto" }}}
|
|
140
|
+
styles={{ body: { overflow: "auto", maxHeight: "80vh" } }}
|
|
141
141
|
extra={
|
|
142
142
|
<>
|
|
143
143
|
<Space size={[8, 0]}>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {Button, FormInstance, Popover, Tooltip} from 'antd'
|
|
3
|
-
import {DtmplData, FieldGroupConfig} from "../../tmpl/interface";
|
|
2
|
+
import { Button, FormInstance, Popover, Tooltip } from 'antd'
|
|
3
|
+
import { DtmplData, FieldGroupConfig } from "../../tmpl/interface";
|
|
4
4
|
import PopoverEditCard from './popover-edit-card'
|
|
5
5
|
interface RowEditorProps {
|
|
6
|
-
serverKey?:string,
|
|
6
|
+
serverKey?: string,
|
|
7
7
|
buttonTitle?: string,
|
|
8
8
|
buttonIcon: React.ReactNode,
|
|
9
|
-
tooltipTitle?: React.ReactNode
|
|
9
|
+
tooltipTitle?: React.ReactNode;
|
|
10
10
|
fieldGroupConfig: FieldGroupConfig;
|
|
11
11
|
dtmplData?: DtmplData;
|
|
12
|
-
onOk:(value: DtmplData) => void,
|
|
13
|
-
buttonStyle?:object,
|
|
14
|
-
disabled?:boolean
|
|
12
|
+
onOk: (value: DtmplData) => void,
|
|
13
|
+
buttonStyle?: object,
|
|
14
|
+
disabled?: boolean
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
interface RowEditorState {
|
|
@@ -21,8 +21,8 @@ interface RowEditorState {
|
|
|
21
21
|
export default class PopoverEditor extends React.PureComponent<RowEditorProps, RowEditorState> {
|
|
22
22
|
formRef = React.createRef<FormInstance>();
|
|
23
23
|
static defaultProps = {
|
|
24
|
-
buttonIcon:undefined,
|
|
25
|
-
disabled:false,
|
|
24
|
+
buttonIcon: undefined,
|
|
25
|
+
disabled: false,
|
|
26
26
|
}
|
|
27
27
|
state = {
|
|
28
28
|
popoverOpen: false,
|
|
@@ -41,23 +41,21 @@ export default class PopoverEditor extends React.PureComponent<RowEditorProps, R
|
|
|
41
41
|
// }
|
|
42
42
|
// }
|
|
43
43
|
|
|
44
|
-
onOk = (value,hidden:boolean=true) => {
|
|
45
|
-
if(hidden){
|
|
46
|
-
this.setState({popoverOpen:false});
|
|
44
|
+
onOk = (value, hidden: boolean = true) => {
|
|
45
|
+
if (hidden) {
|
|
46
|
+
this.setState({ popoverOpen: false });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
this.props.onOk(value);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
render() {
|
|
54
|
-
const {popoverOpen}=this.state;
|
|
55
|
-
const { disabled, buttonIcon, buttonTitle, tooltipTitle, fieldGroupConfig, dtmplData,buttonStyle,serverKey} = this.props;
|
|
56
|
-
return <Popover destroyOnHidden={true} placement="
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.setState({popoverOpen:false});}
|
|
60
|
-
} onOk={this.onOk}></PopoverEditCard>} trigger="click">
|
|
54
|
+
const { popoverOpen } = this.state;
|
|
55
|
+
const { disabled, buttonIcon, buttonTitle, tooltipTitle, fieldGroupConfig, dtmplData, buttonStyle, serverKey } = this.props;
|
|
56
|
+
return <Popover destroyOnHidden={true} placement="left" open={popoverOpen}
|
|
57
|
+
content={<PopoverEditCard serverKey={serverKey} fieldGroupConfig={fieldGroupConfig} dtmplData={dtmplData}
|
|
58
|
+
onCancel={() => this.setState({ popoverOpen: false })} onOk={this.onOk} />} trigger="click">
|
|
61
59
|
<Tooltip placement="left" title={tooltipTitle}>
|
|
62
60
|
<Button
|
|
63
61
|
disabled={disabled}
|
|
@@ -65,9 +63,9 @@ export default class PopoverEditor extends React.PureComponent<RowEditorProps, R
|
|
|
65
63
|
icon={buttonIcon}
|
|
66
64
|
size="small"
|
|
67
65
|
onClick={() => {
|
|
68
|
-
this.setState({popoverOpen
|
|
66
|
+
this.setState({ popoverOpen: !popoverOpen });
|
|
69
67
|
}}
|
|
70
|
-
>{buttonTitle?buttonTitle:""}</Button></Tooltip></Popover>
|
|
68
|
+
>{buttonTitle ? buttonTitle : ""}</Button></Tooltip></Popover>
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
}
|
package/src/aldehyde/index.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// import ViewControl from "./controls/view-control";
|
|
3
3
|
import ProgramConfig from "./units";
|
|
4
4
|
import HydrocarbonService from "./tmpl/hcservice-v3";
|
|
5
|
-
import QuickEntrance from "./welcome/quick-entrance";
|
|
6
|
-
import Workbench from "./welcome/workbench";
|
|
5
|
+
import QuickEntrance from "./welcome/components/quick-entrance";
|
|
6
|
+
import Workbench from "./welcome/components/workbench";
|
|
7
7
|
import PopoverEntitySelect from "./controls/entity-select/popover-entity-select";
|
|
8
8
|
|
|
9
9
|
import TmplDataSource from "./tmpl/hc-data-source";
|
|
@@ -145,6 +145,8 @@ import DtmplViewDrawer from './module/dtmpl-view-drawer';
|
|
|
145
145
|
|
|
146
146
|
import SplitViewLtmplRoute from "./routable/splitview-ltmpl-route";
|
|
147
147
|
|
|
148
|
+
import SsoLogin from "./sso-Login";
|
|
149
|
+
|
|
148
150
|
export {
|
|
149
151
|
ActTable,
|
|
150
152
|
SelectTable,
|
|
@@ -202,5 +204,6 @@ export {
|
|
|
202
204
|
ContextPage5,
|
|
203
205
|
DtmplViewModal,
|
|
204
206
|
DtmplViewDrawer,
|
|
205
|
-
SplitViewLtmplRoute
|
|
207
|
+
SplitViewLtmplRoute,
|
|
208
|
+
SsoLogin
|
|
206
209
|
};
|
|
@@ -7,6 +7,8 @@ import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
|
7
7
|
import { NavLink } from "react-router-dom";
|
|
8
8
|
import HCDataSource from "../../tmpl/hc-data-source";
|
|
9
9
|
import Units from "../../units";
|
|
10
|
+
import "./message-bar.less";
|
|
11
|
+
|
|
10
12
|
interface L2MenuMessageBarProps {
|
|
11
13
|
backgroudColor?: string;
|
|
12
14
|
style?: CSSProperties;
|
|
@@ -126,7 +128,7 @@ class L2MenuMessageBar extends React.PureComponent<
|
|
|
126
128
|
}
|
|
127
129
|
className="head-example"
|
|
128
130
|
>
|
|
129
|
-
<Badge count={messageBar.count} overflowCount={99} offset={[
|
|
131
|
+
<Badge size="small" count={messageBar.count} overflowCount={99} offset={[6, -2]} className="ripple-dot">
|
|
130
132
|
<Button
|
|
131
133
|
icon={<BellOutlined />}
|
|
132
134
|
shape="default"
|
|
@@ -154,6 +156,7 @@ class L2MenuMessageBar extends React.PureComponent<
|
|
|
154
156
|
size="small"
|
|
155
157
|
overflowCount={99}
|
|
156
158
|
offset={[6, 0]}
|
|
159
|
+
className="ripple-dot"
|
|
157
160
|
>
|
|
158
161
|
<Button
|
|
159
162
|
icon={<BellOutlined />}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.ripple-dot .ant-badge-count {
|
|
2
|
+
overflow: revert;
|
|
3
|
+
box-shadow: none;
|
|
4
|
+
|
|
5
|
+
.ant-scroll-number-only {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ant-scroll-number-only-unit {
|
|
12
|
+
display: block;
|
|
13
|
+
height: 100%;
|
|
14
|
+
line-height: 12px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ripple-dot .ant-badge-count::before {
|
|
19
|
+
content: '';
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
background: radial-gradient(circle,
|
|
27
|
+
var(--ant-color-error-hover) 0%,
|
|
28
|
+
var(--ant-color-error-hover) 30%,
|
|
29
|
+
transparent 70%);
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
opacity: 1;
|
|
32
|
+
animation: ping 1s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
|
|
33
|
+
will-change: transform, opacity;
|
|
34
|
+
z-index: -1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ripple-dot .ant-badge-count::after {
|
|
38
|
+
content: '';
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
background: radial-gradient(circle,
|
|
46
|
+
var(--ant-color-error-hover) 0%,
|
|
47
|
+
transparent 50%);
|
|
48
|
+
transform: scale(1);
|
|
49
|
+
opacity: 0.8;
|
|
50
|
+
animation: ping 1s 0.5s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
|
|
51
|
+
will-change: transform, opacity;
|
|
52
|
+
z-index: -1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes ping {
|
|
56
|
+
0% {
|
|
57
|
+
transform: scale(1);
|
|
58
|
+
opacity: 0.9;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
70% {
|
|
62
|
+
opacity: 0.6;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
100% {
|
|
66
|
+
transform: scale(2.4);
|
|
67
|
+
opacity: 0.2;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -15,13 +15,18 @@ const ThemeButton = (props: ButtonProps) => {
|
|
|
15
15
|
const [version, setVersion] = useState<string>();
|
|
16
16
|
const [themes, setThemes] = useState<{ label: string, value: string }[]>([]);
|
|
17
17
|
const [keepAliveTabs, setKeepAliveTabs] = useSessionStorageState<KeepAliveTab[]>('keepAliveTabs', { defaultValue: [] });
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
const getThemeConfig = async () => {
|
|
20
|
+
const themeConfig = await ProgramConfig.getThemeConfig();
|
|
21
|
+
const themeKeys = themeConfig?.styleTheme?.split(",") || ProgramConfig.themes();
|
|
22
|
+
const temThemes = defThemes.filter(item => themeKeys?.includes(item.value));
|
|
23
|
+
setThemes(temThemes.length ? temThemes : [{ label: "默认", value: "v2" }]);
|
|
24
|
+
}
|
|
19
25
|
|
|
20
26
|
useEffect(() => {
|
|
27
|
+
getThemeConfig();
|
|
21
28
|
const version = localStorage.getItem("version") || "v2";
|
|
22
29
|
setVersion(version);
|
|
23
|
-
const temThemes = defThemes.filter(item => themeKeys?.includes(item.value));
|
|
24
|
-
setThemes(temThemes.length ? temThemes : [{ label: "默认", value: "v2" }]);
|
|
25
30
|
}, []);
|
|
26
31
|
|
|
27
32
|
const onClick: MenuProps["onClick"] = ({ key }) => {
|
|
@@ -43,7 +48,7 @@ const ThemeButton = (props: ButtonProps) => {
|
|
|
43
48
|
})), [themes]);
|
|
44
49
|
|
|
45
50
|
return (
|
|
46
|
-
themes.length > 1 ? <Dropdown overlayClassName="themeButton" menu={{ items, onClick }}>
|
|
51
|
+
themes.length > 1 ? <Dropdown overlayClassName="themeButton" menu={{ items, onClick, selectedKeys: [version] }}>
|
|
47
52
|
<Button type="text" icon={<AliIcon type="icon-theme" />} {...props} />
|
|
48
53
|
</Dropdown> : undefined
|
|
49
54
|
);
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
border-color: #ffffff !important;
|
|
9
9
|
} */
|
|
10
10
|
|
|
11
|
-
.ant-menu-submenu
|
|
11
|
+
.ant-menu-submenu>.ant-menu-submenu-selected {
|
|
12
12
|
/* background: #fff !important; */
|
|
13
13
|
/* color: #53b572; */
|
|
14
14
|
/* width: calc(100% - 8px); */
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.ant-menu-submenu-selected
|
|
17
|
+
.ant-menu-submenu-selected>.ant-menu-submenu-title {
|
|
18
18
|
/*color: #fff !important;*/
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -27,12 +27,16 @@
|
|
|
27
27
|
width: 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.layout2-header-menu
|
|
30
|
+
.layout2-header-menu>li:nth-last-child(1)::after {
|
|
31
31
|
width: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.ant-menu-sub:has(.layout2-header-menu-item)
|
|
35
|
-
> .ant-menu-submenu-selected
|
|
36
|
-
> .ant-menu-submenu-title {
|
|
34
|
+
.ant-menu-sub:has(.layout2-header-menu-item)>.ant-menu-submenu-selected>.ant-menu-submenu-title {
|
|
37
35
|
background-color: var(--color-3) !important;
|
|
38
36
|
}
|
|
37
|
+
|
|
38
|
+
.v2-header .header-logo {
|
|
39
|
+
width: 24%;
|
|
40
|
+
max-width: 80px;
|
|
41
|
+
margin-right: 4%;
|
|
42
|
+
}
|
|
@@ -12,7 +12,6 @@ import L2MenuQuickBar from "../layout/menu/l2menu-quick-bar";
|
|
|
12
12
|
import L2MenuMessageBar from "../layout/menu/l2menu-message-bar";
|
|
13
13
|
import LocaleButton from "../locale/LocaleButton";
|
|
14
14
|
import UserButton from "./components/user-button";
|
|
15
|
-
import homePng from "./imgs/home.png";
|
|
16
15
|
import { MenuType } from "./type/layout-type";
|
|
17
16
|
import { NavLink, useParams, useSearchParams } from "react-router-dom";
|
|
18
17
|
import {
|
|
@@ -41,7 +40,7 @@ type HeaderPropsType = {
|
|
|
41
40
|
systemName: string;
|
|
42
41
|
menuList: MenuType[];
|
|
43
42
|
style?: any;
|
|
44
|
-
logoImg
|
|
43
|
+
logoImg: string;
|
|
45
44
|
};
|
|
46
45
|
|
|
47
46
|
type MenuItem = Required<MenuProps>["items"][number];
|
|
@@ -163,6 +162,7 @@ const Header: React.FC<HeaderPropsType> = ({ systemName, menuList, style, logoIm
|
|
|
163
162
|
color: "#FFFFFF",
|
|
164
163
|
...style,
|
|
165
164
|
}}
|
|
165
|
+
className="v2-header"
|
|
166
166
|
>
|
|
167
167
|
<NavLink
|
|
168
168
|
style={{
|
|
@@ -178,15 +178,11 @@ const Header: React.FC<HeaderPropsType> = ({ systemName, menuList, style, logoIm
|
|
|
178
178
|
}}
|
|
179
179
|
to={"/v2/home"}
|
|
180
180
|
>
|
|
181
|
-
<img
|
|
182
|
-
|
|
181
|
+
{logoImg ? <img
|
|
182
|
+
className="header-logo"
|
|
183
|
+
src={logoImg}
|
|
183
184
|
alt="home"
|
|
184
|
-
|
|
185
|
-
height={35}
|
|
186
|
-
style={{
|
|
187
|
-
marginRight: 5,
|
|
188
|
-
}}
|
|
189
|
-
/>
|
|
185
|
+
/> : ""}
|
|
190
186
|
<Tooltip title={systemLabel}>
|
|
191
187
|
<span
|
|
192
188
|
style={{
|
|
@@ -18,13 +18,14 @@ import Units from '../units';
|
|
|
18
18
|
import { useLocale } from "../locale/useLocale";
|
|
19
19
|
import { useSessionStorageState } from "ahooks";
|
|
20
20
|
import { KeepAliveTab } from "../hooks/use-tabs";
|
|
21
|
+
import homePng from "./imgs/home.png";
|
|
21
22
|
|
|
22
23
|
type PagePropsType = {
|
|
23
24
|
children?: React.ReactNode;
|
|
24
|
-
logo?:
|
|
25
|
+
logo?: string;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
const handleMenuItemUrl = (
|
|
28
|
+
export const handleMenuItemUrl = (
|
|
28
29
|
id: string,
|
|
29
30
|
pageType: BlockType["pageType"],
|
|
30
31
|
query: { [key: string]: string } = {},
|
|
@@ -117,7 +118,9 @@ const handleMenuRes = (menuList: MenuConfigAPIType["blocks"], version: string):
|
|
|
117
118
|
defaultCriteriaValue,
|
|
118
119
|
items,
|
|
119
120
|
fullScreen,
|
|
120
|
-
icon
|
|
121
|
+
icon,
|
|
122
|
+
themeColor,
|
|
123
|
+
funcDescription
|
|
121
124
|
} of menuList) {
|
|
122
125
|
if (!(hiddenOnDisabled === true && disabled === true)) {
|
|
123
126
|
const menu: MenuType = {
|
|
@@ -128,8 +131,11 @@ const handleMenuRes = (menuList: MenuConfigAPIType["blocks"], version: string):
|
|
|
128
131
|
linkTarget,
|
|
129
132
|
children: items?.length ? handleMenuRes(items, version) : [],
|
|
130
133
|
icon,
|
|
134
|
+
themeColor,
|
|
135
|
+
funcDescription,
|
|
136
|
+
dragDropPageId,
|
|
137
|
+
customPath
|
|
131
138
|
};
|
|
132
|
-
|
|
133
139
|
retList.push(menu);
|
|
134
140
|
}
|
|
135
141
|
}
|
|
@@ -197,17 +203,22 @@ const Page: React.FC<PagePropsType> = (props: PagePropsType) => {
|
|
|
197
203
|
}, []);
|
|
198
204
|
|
|
199
205
|
const [systemName, setSystemName] = useState("");
|
|
206
|
+
const [systemLogo, setSystemLogo] = useState("");
|
|
200
207
|
|
|
201
208
|
const [menu, SetMenu] = useState<MenuType[]>([]);
|
|
202
209
|
|
|
210
|
+
const getThemeConfigAndMenuConfig = async () => {
|
|
211
|
+
const themeConfig = await Units.getThemeConfig();
|
|
212
|
+
const menuConfig = await getMenuConfig();
|
|
213
|
+
setSystemName(themeConfig?.programName || menuConfig?.systemName);
|
|
214
|
+
setSystemLogo(themeConfig?.programIcon || homePng);
|
|
215
|
+
SetMenu(menuConfig?.menu);
|
|
216
|
+
updateMenuItemIdToFirstFloorIdxMap(menuConfig?.menu);
|
|
217
|
+
};
|
|
203
218
|
|
|
204
219
|
|
|
205
220
|
useEffect(() => {
|
|
206
|
-
|
|
207
|
-
setSystemName(name);
|
|
208
|
-
SetMenu(menu);
|
|
209
|
-
updateMenuItemIdToFirstFloorIdxMap(menu);
|
|
210
|
-
});
|
|
221
|
+
getThemeConfigAndMenuConfig();
|
|
211
222
|
}, []);
|
|
212
223
|
|
|
213
224
|
// page ref
|
|
@@ -232,7 +243,7 @@ const Page: React.FC<PagePropsType> = (props: PagePropsType) => {
|
|
|
232
243
|
algorithm: compactTheme ? [theme.compactAlgorithm] : [],
|
|
233
244
|
}}>
|
|
234
245
|
<Layout style={{ height: "100%" }} className={compactTheme ? "layout-compactTheme" : undefined}>
|
|
235
|
-
<Header logoImg={logo} systemName={systemName ? systemName : Units.programName_NavLeft()} menuList={menu}></Header>
|
|
246
|
+
<Header logoImg={logo || systemLogo} systemName={systemName ? systemName : Units.programName_NavLeft()} menuList={menu}></Header>
|
|
236
247
|
<Layout>
|
|
237
248
|
<Sider menuList={menu} collapsed={getSiderCollapsed()}></Sider>
|
|
238
249
|
<Main>{props.children}</Main>
|
|
@@ -31,12 +31,16 @@ const Page: React.FC<PagePropsType> = (props: PagePropsType) => {
|
|
|
31
31
|
const { getSiderCollapsed, compactTheme } = useLocale();
|
|
32
32
|
const { token: { colorPrimary } } = useToken();
|
|
33
33
|
|
|
34
|
+
const getThemeConfigAndMenuConfig = async () => {
|
|
35
|
+
const themeConfig = await Units.getThemeConfig();
|
|
36
|
+
const menuConfig = await getMenuConfig("v3");
|
|
37
|
+
setSystemName(themeConfig?.programName || menuConfig?.systemName);
|
|
38
|
+
setMenu(menuConfig?.menu);
|
|
39
|
+
updateMenuItemIdToFirstFloorIdxMap(menuConfig?.menu);
|
|
40
|
+
};
|
|
41
|
+
|
|
34
42
|
useEffect(() => {
|
|
35
|
-
|
|
36
|
-
setSystemName(name);
|
|
37
|
-
setMenu(menu);
|
|
38
|
-
updateMenuItemIdToFirstFloorIdxMap(menu);
|
|
39
|
-
});
|
|
43
|
+
getThemeConfigAndMenuConfig();
|
|
40
44
|
useVarCssColor(generate(colorPrimary));
|
|
41
45
|
localStorage.setItem("version", "v3");
|
|
42
46
|
window.addEventListener('beforeunload', () => { setKeepAliveTabs([]); });
|