@voplus/morpho-workspace 6.0.71 → 6.0.72
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/AutoSequenceDialog/index.less +14 -14
- package/es/components/TimeLog/index.less +86 -86
- package/es/controls/Corner/index.less +7 -7
- package/es/controls/InlineSearch/index.less +10 -10
- package/es/controls/MoreOperateDropdown/index.less +12 -12
- package/es/controls/StickyAddButton/index.less +22 -22
- package/es/controls/filters/AssigneeViewFilter/index.less +24 -24
- package/es/controls/filters/WorkTypesFilter/index.d.ts +0 -1
- package/es/controls/filters/WorkTypesFilter/index.js +11 -8
- package/es/controls/filters/WorkTypesFilter/index.js.map +1 -1
- package/es/modules/board/components/Board/index.less +133 -133
- package/es/modules/board/components/BoardColumn/index.less +270 -270
- package/es/modules/board/components/BoardPropertiesView/index.less +12 -12
- package/es/modules/board/components/SubDocumentList/index.less +30 -30
- package/es/modules/board/pages/BoardViewList/index.less +15 -15
- package/es/modules/calendar/components/CalendarMenu/index.less +31 -31
- package/es/modules/calendar/pages/CalendarMonth/index.less +268 -268
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.less +14 -14
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.less +132 -132
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/index.less +57 -57
- package/es/modules/meeting/components/AgendaList/index.less +47 -47
- package/es/modules/meeting/components/MeetingDescription/index.less +12 -12
- package/es/modules/meeting/components/MeetingHeader/index.less +13 -13
- package/es/modules/meeting/components/MeetingItem/index.less +66 -66
- package/es/modules/meeting/components/MeetingList/QuickSearch/index.less +12 -12
- package/es/modules/meeting/components/MeetingPropertiesView/index.less +15 -15
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.less +14 -14
- package/es/modules/meeting/components/MeetingTaskList/index.less +30 -30
- package/es/modules/meeting/components/MeetingsFolderProperitesView/index.less +8 -8
- package/es/modules/meeting/components/MeetingsFolderQuickViewDialog/index.less +7 -7
- package/es/modules/meeting/components/NewMeetingForm/index.less +35 -35
- package/es/modules/meeting/controls/MeetingTasksProgressDataIcon/index.less +7 -7
- package/es/modules/meeting/pages/MeetingDefaultView/index.less +23 -23
- package/es/modules/meeting/pages/MeetingPrintView/index.less +82 -82
- package/es/modules/meeting/pages/MeetingPrintView/print.css +22 -22
- package/es/modules/meeting/pages/MeetingTabView/index.less +21 -21
- package/es/modules/meeting/styles/MeetingMinView.less +32 -32
- package/es/modules/menus/components/AddUsers/index.less +7 -7
- package/es/modules/menus/components/UsersList/index.less +64 -64
- package/es/modules/menus/pages/ListOptions/Company/index.less +20 -20
- package/es/modules/menus/pages/ListOptions/Teams/index.less +44 -44
- package/es/modules/menus/pages/ListOptions/Users/index.less +42 -42
- package/es/modules/notification/components/DocumentNotificationCard/index.less +29 -29
- package/es/modules/notification/components/NewNotificationForm/index.less +38 -38
- package/es/modules/notification/components/NotificationHeader/index.less +12 -12
- package/es/modules/notification/components/NotificationItem/index.less +29 -29
- package/es/modules/notification/components/NotificationList/index.less +31 -31
- package/es/modules/notification/components/NotificationList2/index.less +11 -11
- package/es/modules/notification/components/NotificationPropertiesView/index.less +26 -26
- package/es/modules/notification/components/NotificationQuickViewDialog/index.less +7 -7
- package/es/modules/notification/components/NotificationRecipients/index.less +17 -17
- package/es/modules/notification/components/NotificationTabs/index.less +8 -8
- package/es/modules/notification/controls/NotificationStatusLabel/index.less +14 -14
- package/es/modules/notification/pages/NotificationDefaultView/index.less +19 -19
- package/es/modules/pin/components/MyPinned/index.less +38 -38
- package/es/modules/pin/pages/PinnedPage/index.less +31 -31
- package/es/modules/project/ProjectDefaultView/index.less +38 -38
- package/es/modules/tasks/components/AddTaskDropdown/index.less +37 -37
- package/es/modules/tasks/components/DelegateDialog/index.less +51 -51
- package/es/modules/tasks/components/NewTaskForm/index.less +37 -37
- package/es/modules/tasks/components/SubTaskList/index.less +20 -20
- package/es/modules/tasks/components/TaskCard/index.less +15 -15
- package/es/modules/tasks/components/TaskCheckActiveTab/index.less +24 -24
- package/es/modules/tasks/components/TaskCheckItem/index.less +83 -83
- package/es/modules/tasks/components/TaskCheckList/index.less +54 -54
- package/es/modules/tasks/components/TaskCheckNewForm/index.less +41 -41
- package/es/modules/tasks/components/TaskDescription/index.less +18 -18
- package/es/modules/tasks/components/TaskEstimatedTime/index.less +25 -25
- package/es/modules/tasks/components/TaskItem/defaultTaskItem.less +51 -51
- package/es/modules/tasks/components/TaskItem/subTaskItem.less +67 -67
- package/es/modules/tasks/components/TaskPropertiesView/index.less +23 -23
- package/es/modules/tasks/components/TaskQuickViewDialog/index.less +13 -13
- package/es/modules/tasks/components/TaskSimpleProperties/index.less +18 -18
- package/es/modules/tasks/controls/ChildTasksDataIcon/index.less +29 -29
- package/es/modules/tasks/controls/TaskStatusLabel/index.less +34 -34
- package/es/modules/tasks/pages/TaskDefaultView/index.less +19 -19
- package/es/modules/tasks/pages/TaskTabView/index.less +66 -66
- package/es/modules/tasks/reports/MemberEstimatedDurationCard/index.less +21 -21
- package/es/modules/tasks/reports/TaskAnalyticsDataIcon/index.less +8 -8
- package/es/modules/tasks/reports/TaskSummaryCard/index.less +28 -28
- package/es/modules/user/pages/Positions/index.less +59 -59
- package/es/modules/work/components/NewWorkErrorDialog/index.less +21 -21
- package/es/modules/work/components/NewWorkForm/index.less +18 -18
- package/es/modules/work/components/RejectWorkDialog/index.less +23 -23
- package/es/modules/work/components/RelatedWorkList/index.less +21 -21
- package/es/modules/work/components/SubWorkList/index.less +7 -7
- package/es/modules/work/components/WorkCard/index.less +7 -7
- package/es/modules/work/components/WorkCashReport/index.less +30 -30
- package/es/modules/work/components/WorkErrorItem/index.less +52 -52
- package/es/modules/work/components/WorkErrorList/index.less +4 -4
- package/es/modules/work/components/WorkErrorPropertiesView/index.less +40 -40
- package/es/modules/work/components/WorkErrorQuickViewDialog/index.less +28 -28
- package/es/modules/work/components/WorkItem/index.less +56 -56
- package/es/modules/work/components/WorkList/index.less +7 -7
- package/es/modules/work/components/WorkPropertiesView/index.less +10 -10
- package/es/modules/work/components/WorkQATab/index.less +24 -24
- package/es/modules/work/components/WorkQuickViewDialog/index.less +16 -16
- package/es/modules/work/components/WorkTaskList/index.less +7 -7
- package/es/modules/work/components/WorkTasksTab/index.less +4 -4
- package/es/modules/work/components/WorksProperties/index.less +17 -17
- package/es/modules/work/controls/WorkStatusLabel/index.less +36 -36
- package/es/modules/work/pages/WorkDefaultView/index.less +18 -18
- package/es/modules/work/pages/WorkErrorDefaultView/index.less +22 -22
- package/es/modules/work/work-schedule/components/NewWorkScheduleForm/index.less +10 -10
- package/es/modules/work/work-schedule/components/WorkScheduleHeader/index.less +12 -12
- package/es/modules/work/work-schedule/components/WorkScheduleItem/index.less +40 -40
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js +5 -2
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleList/index.less +20 -12
- package/es/modules/work/work-schedule/components/WorkScheduleQuickViewDialog/index.less +11 -11
- package/es/modules/work/work-schedule/components/WorkScheduleTimeLineView/index.less +7 -7
- package/es/modules/work/work-schedule/pages/WorkScheduleDefaultView/index.less +23 -23
- package/es/modules/work/work-type/components/ErrorTypeList/index.less +59 -59
- package/es/modules/work/work-type/components/NewTypeForm/index.less +7 -7
- package/es/modules/work/work-type/components/RepeatTab/index.less +42 -42
- package/es/modules/work/work-type/components/WorkTypeHeader/index.less +12 -12
- package/es/modules/work/work-type/components/WorkTypeIconList/index.less +14 -14
- package/es/modules/work/work-type/components/WorkTypeItem/index.less +48 -48
- package/es/modules/work/work-type/components/WorkTypeList/index.less +4 -4
- package/es/modules/work/work-type/components/WorkTypePropertiesTabs/index.less +12 -12
- package/es/modules/work/work-type/components/WorkTypePropertiesView/index.less +19 -19
- package/es/modules/work/work-type/components/WorkTypeQA/index.less +42 -42
- package/es/modules/work/work-type/components/WorkTypeStats/index.less +29 -29
- package/es/modules/work/work-type/components/WorkTypeTabs/index.less +45 -45
- package/es/modules/work/work-type/controls/WorkTypeStatusLabel/index.less +15 -15
- package/es/modules/work/work-type/controls/WorktypeCompleteWorksChart/index.less +8 -8
- package/es/modules/work/work-type/pages/WorkTypePage/index.less +56 -56
- package/es/modules/workspace/components/MyWorkspaces/index.less +30 -30
- package/es/modules/workspace/components/NewWorkspaceDialog/index.less +30 -30
- package/es/modules/workspace/components/WorkspaceIcon/index.less +81 -81
- package/es/modules/workspace/components/WorkspaceIconList/index.less +18 -18
- package/es/modules/workspace/components/WorkspaceIconList2/index.less +18 -18
- package/es/modules/workspace/components/WorkspacePropertiesView/index.less +19 -19
- package/es/modules/workspace/components/WorkspaceTabs/index.less +12 -12
- package/es/modules/workspace/controls/WorkspaceCompletedWorksChart/index.less +8 -8
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.less +28 -28
- package/es/modules/workspace/pages/WorkspacePage/index.less +23 -23
- package/es/obsolete/WorkTypeDefaultView/index.less +19 -19
- package/es/obsolete/member/components/member.less +24 -24
- package/es/obsolete/member/styles/MemberMinView.less +24 -24
- package/es/obsolete/space/components/Notes/ColorSelect/index.less +17 -17
- package/es/obsolete/space/components/Notes/NewNoteDialog/index.less +78 -78
- package/es/obsolete/space/components/Notes/TextNoteCard/index.less +56 -56
- package/es/obsolete/space/components/Tasks/index.less +17 -17
- package/es/obsolete/space/components/Works/index.less +18 -18
- package/es/obsolete/space/pages/MySpace/index.less +56 -56
- package/es/style/common.less +187 -187
- package/es/style/index.less +13 -13
- package/package.json +66 -66
- package/readme.md +152 -152
package/readme.md
CHANGED
@@ -1,153 +1,153 @@
|
|
1
|
-
# Typescript support
|
2
|
-
Install dependencies
|
3
|
-
```
|
4
|
-
npm i typescript ts-loader -D
|
5
|
-
```
|
6
|
-
webpack configuration in webpack.config.js
|
7
|
-
```
|
8
|
-
// ts loader for typescript
|
9
|
-
{
|
10
|
-
test: /\.tsx?$/,
|
11
|
-
loader: 'ts-loader',
|
12
|
-
exclude: /node_modules/,
|
13
|
-
},
|
14
|
-
resolve: {
|
15
|
-
extensions: [
|
16
|
-
//required for ts imports
|
17
|
-
".tsx", ".ts",
|
18
|
-
//required for js imports (mostly in webpack dev self dependency)
|
19
|
-
'.js']
|
20
|
-
}
|
21
|
-
```
|
22
|
-
# Less support
|
23
|
-
Install dependencies
|
24
|
-
```
|
25
|
-
npm i less less-loader css-loader style-loader -D
|
26
|
-
```
|
27
|
-
Create tsexternals.d.ts with following content
|
28
|
-
```
|
29
|
-
declare module '*.less'
|
30
|
-
```
|
31
|
-
tsconfig configurations
|
32
|
-
```
|
33
|
-
"includes" : ["./tsexternals.d.ts"],
|
34
|
-
```
|
35
|
-
webpack configurations.
|
36
|
-
```
|
37
|
-
// less support for project
|
38
|
-
// chain less -> css loader (module support) -> style loader (inject styles tag into DOM)
|
39
|
-
{
|
40
|
-
test: /\.less$/,
|
41
|
-
include: [path.join(__dirname, "/src")],
|
42
|
-
use: [
|
43
|
-
{loader: "style-loader"},
|
44
|
-
{
|
45
|
-
loader: "css-loader",
|
46
|
-
options: {
|
47
|
-
sourceMap: true,
|
48
|
-
modules: true,
|
49
|
-
localIdentName: "[local]___[hash:base64:5]"
|
50
|
-
}
|
51
|
-
},
|
52
|
-
{loader: "less-loader"}
|
53
|
-
]
|
54
|
-
},
|
55
|
-
```
|
56
|
-
|
57
|
-
# Antd support
|
58
|
-
Install dependencies
|
59
|
-
```
|
60
|
-
npm i @voplus/antd ts-import-plugin -D
|
61
|
-
```
|
62
|
-
webpack configurations
|
63
|
-
```
|
64
|
-
// Add following to beginning of webpack.config.js
|
65
|
-
const tsImportPlugin = require('ts-import-plugin');
|
66
|
-
|
67
|
-
// Add following options to ts-loader rules
|
68
|
-
options:
|
69
|
-
{
|
70
|
-
getCustomTransformers: () => ({
|
71
|
-
before: [ tsImportPlugin({
|
72
|
-
libraryDirectory: 'es',
|
73
|
-
libraryName: '@voplus/antd',
|
74
|
-
style: true})
|
75
|
-
]})
|
76
|
-
}
|
77
|
-
|
78
|
-
// As antd does not support css module (https://segmentfault.com/q/1010000011170368)
|
79
|
-
// Add following additional less loader
|
80
|
-
// less support for antd
|
81
|
-
// javascriptEnabled are required for antd
|
82
|
-
{
|
83
|
-
test: /\.less$/,
|
84
|
-
include: [path.join(__dirname, "/node_modules/@voplus/antd")],
|
85
|
-
use: [
|
86
|
-
{loader: "style-loader"},
|
87
|
-
{loader: "css-loader"},
|
88
|
-
{loader: "less-loader", options: { javascriptEnabled: true}}
|
89
|
-
]
|
90
|
-
}
|
91
|
-
```
|
92
|
-
|
93
|
-
Override antd style reference
|
94
|
-
https://stackoverflow.com/questions/44817981/how-to-override-antd-style-with-dva
|
95
|
-
|
96
|
-
## Theme
|
97
|
-
### Override less variables
|
98
|
-
modify '/src/style/theme.js'
|
99
|
-
|
100
|
-
### Override antd styles in components with modular less
|
101
|
-
modular css/less will generate a unique class name and make it difficult to override antd class styles.
|
102
|
-
We can use :global to overcome this. Code below demonstrated how to do this.
|
103
|
-
|
104
|
-
```
|
105
|
-
// Less
|
106
|
-
.componentClass {
|
107
|
-
:global {
|
108
|
-
//override ant styles under componentClass
|
109
|
-
.ant-btn-primary {
|
110
|
-
background-color: @success-color;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
}
|
114
|
-
```
|
115
|
-
```
|
116
|
-
// TS
|
117
|
-
<component className={styles.componentClass}>
|
118
|
-
<Button type="primary">Button display with success color instead of primary color.</Button>
|
119
|
-
</component>
|
120
|
-
```
|
121
|
-
|
122
|
-
# Test Setup
|
123
|
-
https://hackernoon.com/testing-react-components-with-jest-and-enzyme-41d592c174f
|
124
|
-
|
125
|
-
"skipBabel" must set to true if allowSyntheticDefaultImports is true in tsconfig.json. Otherwise debugging with VSCode will have source map issues.
|
126
|
-
5 Dec 2018 : The above seems no longer needed after updated ts-jest.
|
127
|
-
|
128
|
-
# Library Build
|
129
|
-
Modify package.json
|
130
|
-
```
|
131
|
-
"main": "lib/index.js",
|
132
|
-
"build" : "webpack --config webpack.prod.js && tsc --outDir lib"
|
133
|
-
```
|
134
|
-
|
135
|
-
Modify tsconfig.json
|
136
|
-
1. Remove "allowJs"
|
137
|
-
2. Add "declaration" : true
|
138
|
-
|
139
|
-
# Knowledges
|
140
|
-
## test
|
141
|
-
[28 Jul 2018]
|
142
|
-
* jest skipBabel need set to true otherwise will have strange sourcemap issues.
|
143
|
-
* tsconfig need following configuration otherwise awync await may not work
|
144
|
-
"target": "es6",
|
145
|
-
"allowSyntheticDefaultImports":false,
|
146
|
-
"esModuleInterop":false
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
**MacOS build时 cpx命令需要给文件目录加上引号**
|
151
|
-
```shell
|
152
|
-
"copy-less": "cpx 'src/**/*.less' lib && cpx 'src/**/*.less' es && cpx 'src/**/*.css' es",
|
1
|
+
# Typescript support
|
2
|
+
Install dependencies
|
3
|
+
```
|
4
|
+
npm i typescript ts-loader -D
|
5
|
+
```
|
6
|
+
webpack configuration in webpack.config.js
|
7
|
+
```
|
8
|
+
// ts loader for typescript
|
9
|
+
{
|
10
|
+
test: /\.tsx?$/,
|
11
|
+
loader: 'ts-loader',
|
12
|
+
exclude: /node_modules/,
|
13
|
+
},
|
14
|
+
resolve: {
|
15
|
+
extensions: [
|
16
|
+
//required for ts imports
|
17
|
+
".tsx", ".ts",
|
18
|
+
//required for js imports (mostly in webpack dev self dependency)
|
19
|
+
'.js']
|
20
|
+
}
|
21
|
+
```
|
22
|
+
# Less support
|
23
|
+
Install dependencies
|
24
|
+
```
|
25
|
+
npm i less less-loader css-loader style-loader -D
|
26
|
+
```
|
27
|
+
Create tsexternals.d.ts with following content
|
28
|
+
```
|
29
|
+
declare module '*.less'
|
30
|
+
```
|
31
|
+
tsconfig configurations
|
32
|
+
```
|
33
|
+
"includes" : ["./tsexternals.d.ts"],
|
34
|
+
```
|
35
|
+
webpack configurations.
|
36
|
+
```
|
37
|
+
// less support for project
|
38
|
+
// chain less -> css loader (module support) -> style loader (inject styles tag into DOM)
|
39
|
+
{
|
40
|
+
test: /\.less$/,
|
41
|
+
include: [path.join(__dirname, "/src")],
|
42
|
+
use: [
|
43
|
+
{loader: "style-loader"},
|
44
|
+
{
|
45
|
+
loader: "css-loader",
|
46
|
+
options: {
|
47
|
+
sourceMap: true,
|
48
|
+
modules: true,
|
49
|
+
localIdentName: "[local]___[hash:base64:5]"
|
50
|
+
}
|
51
|
+
},
|
52
|
+
{loader: "less-loader"}
|
53
|
+
]
|
54
|
+
},
|
55
|
+
```
|
56
|
+
|
57
|
+
# Antd support
|
58
|
+
Install dependencies
|
59
|
+
```
|
60
|
+
npm i @voplus/antd ts-import-plugin -D
|
61
|
+
```
|
62
|
+
webpack configurations
|
63
|
+
```
|
64
|
+
// Add following to beginning of webpack.config.js
|
65
|
+
const tsImportPlugin = require('ts-import-plugin');
|
66
|
+
|
67
|
+
// Add following options to ts-loader rules
|
68
|
+
options:
|
69
|
+
{
|
70
|
+
getCustomTransformers: () => ({
|
71
|
+
before: [ tsImportPlugin({
|
72
|
+
libraryDirectory: 'es',
|
73
|
+
libraryName: '@voplus/antd',
|
74
|
+
style: true})
|
75
|
+
]})
|
76
|
+
}
|
77
|
+
|
78
|
+
// As antd does not support css module (https://segmentfault.com/q/1010000011170368)
|
79
|
+
// Add following additional less loader
|
80
|
+
// less support for antd
|
81
|
+
// javascriptEnabled are required for antd
|
82
|
+
{
|
83
|
+
test: /\.less$/,
|
84
|
+
include: [path.join(__dirname, "/node_modules/@voplus/antd")],
|
85
|
+
use: [
|
86
|
+
{loader: "style-loader"},
|
87
|
+
{loader: "css-loader"},
|
88
|
+
{loader: "less-loader", options: { javascriptEnabled: true}}
|
89
|
+
]
|
90
|
+
}
|
91
|
+
```
|
92
|
+
|
93
|
+
Override antd style reference
|
94
|
+
https://stackoverflow.com/questions/44817981/how-to-override-antd-style-with-dva
|
95
|
+
|
96
|
+
## Theme
|
97
|
+
### Override less variables
|
98
|
+
modify '/src/style/theme.js'
|
99
|
+
|
100
|
+
### Override antd styles in components with modular less
|
101
|
+
modular css/less will generate a unique class name and make it difficult to override antd class styles.
|
102
|
+
We can use :global to overcome this. Code below demonstrated how to do this.
|
103
|
+
|
104
|
+
```
|
105
|
+
// Less
|
106
|
+
.componentClass {
|
107
|
+
:global {
|
108
|
+
//override ant styles under componentClass
|
109
|
+
.ant-btn-primary {
|
110
|
+
background-color: @success-color;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
```
|
115
|
+
```
|
116
|
+
// TS
|
117
|
+
<component className={styles.componentClass}>
|
118
|
+
<Button type="primary">Button display with success color instead of primary color.</Button>
|
119
|
+
</component>
|
120
|
+
```
|
121
|
+
|
122
|
+
# Test Setup
|
123
|
+
https://hackernoon.com/testing-react-components-with-jest-and-enzyme-41d592c174f
|
124
|
+
|
125
|
+
"skipBabel" must set to true if allowSyntheticDefaultImports is true in tsconfig.json. Otherwise debugging with VSCode will have source map issues.
|
126
|
+
5 Dec 2018 : The above seems no longer needed after updated ts-jest.
|
127
|
+
|
128
|
+
# Library Build
|
129
|
+
Modify package.json
|
130
|
+
```
|
131
|
+
"main": "lib/index.js",
|
132
|
+
"build" : "webpack --config webpack.prod.js && tsc --outDir lib"
|
133
|
+
```
|
134
|
+
|
135
|
+
Modify tsconfig.json
|
136
|
+
1. Remove "allowJs"
|
137
|
+
2. Add "declaration" : true
|
138
|
+
|
139
|
+
# Knowledges
|
140
|
+
## test
|
141
|
+
[28 Jul 2018]
|
142
|
+
* jest skipBabel need set to true otherwise will have strange sourcemap issues.
|
143
|
+
* tsconfig need following configuration otherwise awync await may not work
|
144
|
+
"target": "es6",
|
145
|
+
"allowSyntheticDefaultImports":false,
|
146
|
+
"esModuleInterop":false
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
**MacOS build时 cpx命令需要给文件目录加上引号**
|
151
|
+
```shell
|
152
|
+
"copy-less": "cpx 'src/**/*.less' lib && cpx 'src/**/*.less' es && cpx 'src/**/*.css' es",
|
153
153
|
```
|