@voplus/morpho-document 1.0.0-dev200 → 1.0.0-dev202
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/changelog.md +4 -0
- package/es/components/ActivityLog/index.js +2 -2
- package/es/components/ActivityLog/index.js.map +1 -1
- package/es/components/ActivityLog/state.d.ts +1 -0
- package/es/components/ActivityLog/state.js +4 -1
- package/es/components/ActivityLog/state.js.map +1 -1
- package/es/components/DocumentName/index.js +7 -2
- package/es/components/DocumentName/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.js +4 -2
- package/es/components/DocumentSelectDialog/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.less +3 -0
- package/es/components/DocumentSortableTree/index.d.ts +7 -1
- package/es/components/DocumentSortableTree/index.js +12 -2
- package/es/components/DocumentSortableTree/index.js.map +1 -1
- package/es/components/DocumentSortableTree/state.d.ts +6 -0
- package/es/components/DocumentSortableTree/state.js.map +1 -1
- package/es/components/FileExplorerTheme/index.d.ts +3 -0
- package/es/components/FileExplorerTheme/index.js +22 -0
- package/es/components/FileExplorerTheme/index.js.map +1 -0
- package/es/components/FileExplorerTheme/node-content-renderer.d.ts +3 -0
- package/es/components/FileExplorerTheme/node-content-renderer.js +80 -0
- package/es/components/FileExplorerTheme/node-content-renderer.js.map +1 -0
- package/es/components/FileExplorerTheme/node-content-renderer.less +332 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.d.ts +3 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.js +21 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.js.map +1 -0
- package/es/components/FileExplorerTheme/tree-node-renderer.less +4 -0
- package/es/components/Links/Item.js +1 -13
- package/es/components/Links/Item.js.map +1 -1
- package/es/components/QuickAccessSearch/ObjectItem/index.d.ts +1 -1
- package/es/components/QuickAccessSearch/ObjectItem/index.js +2 -2
- package/es/components/QuickAccessSearch/ObjectItem/index.js.map +1 -1
- package/es/components/QuickAccessSearch/index.js +6 -16
- package/es/components/QuickAccessSearch/index.js.map +1 -1
- package/es/components/QuickAccessSearch/state.d.ts +2 -4
- package/es/components/QuickAccessSearch/state.js +3 -8
- package/es/components/QuickAccessSearch/state.js.map +1 -1
- package/es/components/SortableTreeDocumentTheme/index.d.ts +2 -2
- package/es/components/SortableTreeDocumentTheme/index.js +2 -2
- package/es/components/SortableTreeDocumentTheme/index.js.map +1 -1
- package/es/components/TagView/index.js +17 -11
- package/es/components/TagView/index.js.map +1 -1
- package/es/components/TagView/index.less +13 -0
- package/es/components/TagView/state.d.ts +4 -0
- package/es/components/TagView/state.js +10 -0
- package/es/components/TagView/state.js.map +1 -1
- package/es/components/VersionsModal/index.js.map +1 -1
- package/es/data/ObjectStore/hooks.d.ts +7 -0
- package/es/data/ObjectStore/hooks.js +19 -0
- package/es/data/ObjectStore/hooks.js.map +1 -0
- package/es/data/ObjectStore/index.d.ts +1 -0
- package/es/data/ObjectStore/index.js +2 -0
- package/es/data/ObjectStore/index.js.map +1 -0
- package/es/data/index.d.ts +1 -0
- package/es/data/index.js +1 -0
- package/es/data/index.js.map +1 -1
- package/es/data/interfaces/IObject.d.ts +11 -0
- package/es/data/interfaces/IObject.js +1 -0
- package/es/data/interfaces/IObject.js.map +1 -0
- package/es/data/interfaces/index.d.ts +1 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.d.ts +14 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js +28 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js.map +1 -0
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.less +21 -0
- package/es/modules/unit/components/QuickDataIcon/index.d.ts +25 -0
- package/es/modules/unit/components/QuickDataIcon/index.js +45 -0
- package/es/modules/unit/components/QuickDataIcon/index.js.map +1 -0
- package/es/modules/unit/components/QuickDataIcon/index.less +0 -0
- package/es/modules/unit/components/UnitAvatar/index.d.ts +15 -0
- package/es/modules/unit/components/UnitAvatar/index.js +29 -0
- package/es/modules/unit/components/UnitAvatar/index.js.map +1 -0
- package/es/modules/unit/components/UnitAvatar/index.less +14 -0
- package/es/modules/unit/components/UnitHead/index.d.ts +3 -0
- package/es/modules/unit/components/UnitHead/index.js +7 -0
- package/es/modules/unit/components/UnitHead/index.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.d.ts +6 -0
- package/es/modules/unit/components/UnitItem/index.js +19 -0
- package/es/modules/unit/components/UnitItem/index.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.less +19 -0
- package/es/pages/TreeViewPage/index.js +1 -1
- package/es/pages/TreeViewPage/index.js.map +1 -1
- package/es/routes.d.ts +6 -0
- package/es/routes.js +12 -1
- package/es/routes.js.map +1 -1
- package/package.json +2 -2
- package/es/components/QuickAccessSearch/ObjectList/index.d.ts +0 -5
- package/es/components/QuickAccessSearch/ObjectList/index.js +0 -42
- package/es/components/QuickAccessSearch/ObjectList/index.js.map +0 -1
- package/es/components/QuickAccessSearch/ObjectList/index.less +0 -10
- package/es/components/QuickAccessSearch/ObjectList/state.d.ts +0 -40
- package/es/components/QuickAccessSearch/ObjectList/state.js +0 -61
- package/es/components/QuickAccessSearch/ObjectList/state.js.map +0 -1
- package/es/views/DocumentListView/index.d.ts +0 -5
- package/es/views/DocumentListView/index.js +0 -100
- package/es/views/DocumentListView/index.js.map +0 -1
- package/es/views/DocumentListView/state.d.ts +0 -22
- package/es/views/DocumentListView/state.js +0 -38
- package/es/views/DocumentListView/state.js.map +0 -1
- package/es/views/DocumentRoutes.d.ts +0 -11
- package/es/views/DocumentRoutes.js +0 -25
- package/es/views/DocumentRoutes.js.map +0 -1
- package/es/views/DocumentTabView/index.d.ts +0 -3
- package/es/views/DocumentTabView/index.js +0 -68
- package/es/views/DocumentTabView/index.js.map +0 -1
- package/es/views/DocumentTabView/index.less +0 -47
- package/es/views/DocumentTabView/state.d.ts +0 -6
- package/es/views/DocumentTabView/state.js +0 -18
- package/es/views/DocumentTabView/state.js.map +0 -1
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
.file-explorer-theme {
|
|
2
|
+
height: 100%;
|
|
3
|
+
:global {
|
|
4
|
+
.doc-spin{
|
|
5
|
+
z-index: 2;
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 50%;
|
|
8
|
+
width: 30px;
|
|
9
|
+
height: 30px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
transform: translate3d(-50%, -50%, 0);
|
|
14
|
+
}
|
|
15
|
+
.collapseButton,
|
|
16
|
+
.expandButton {
|
|
17
|
+
appearance: none;
|
|
18
|
+
border: none;
|
|
19
|
+
background: transparent;
|
|
20
|
+
padding: 0;
|
|
21
|
+
z-index: 2;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 45%;
|
|
24
|
+
width: 30px;
|
|
25
|
+
height: 30px;
|
|
26
|
+
transform: translate3d(-50%, -50%, 0);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&::after {
|
|
30
|
+
content: "";
|
|
31
|
+
position: absolute;
|
|
32
|
+
transform-origin: 7px 4px;
|
|
33
|
+
transform: translate3d(-50%, -20%, 0);
|
|
34
|
+
border: solid transparent 10px;
|
|
35
|
+
border-left-width: 7px;
|
|
36
|
+
border-right-width: 7px;
|
|
37
|
+
border-top-color: gray;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover::after {
|
|
41
|
+
border-top-color: black;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
|
|
47
|
+
// &::after {
|
|
48
|
+
// filter: drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)
|
|
49
|
+
// drop-shadow(0 0 1px #83bef9);
|
|
50
|
+
// }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.expandButton::after {
|
|
55
|
+
transform: translate3d(-50%, -20%, 0) rotateZ(-90deg);
|
|
56
|
+
}
|
|
57
|
+
.rowWrapper {
|
|
58
|
+
height: 100%;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
// cursor: move;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
opacity: 0.7;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:active {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.rowWrapperDragDisabled {
|
|
71
|
+
cursor: default;
|
|
72
|
+
}
|
|
73
|
+
.row {
|
|
74
|
+
height: 100%;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
display: flex;
|
|
77
|
+
position: relative;
|
|
78
|
+
|
|
79
|
+
& > * {
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The outline of where the element will go if dropped, displayed while dragging
|
|
86
|
+
*/
|
|
87
|
+
.rowLandingPad {
|
|
88
|
+
border: none;
|
|
89
|
+
box-shadow: none;
|
|
90
|
+
outline: none;
|
|
91
|
+
|
|
92
|
+
* {
|
|
93
|
+
opacity: 0 !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&::before {
|
|
97
|
+
background-color: lightblue;
|
|
98
|
+
border: 2px dotted black;
|
|
99
|
+
content: "";
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0;
|
|
102
|
+
right: 0;
|
|
103
|
+
bottom: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
z-index: -1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Alternate appearance of the landing pad when the dragged location is invalid
|
|
111
|
+
*/
|
|
112
|
+
.rowCancelPad {
|
|
113
|
+
// @extend .rowLandingPad;
|
|
114
|
+
|
|
115
|
+
&::before {
|
|
116
|
+
background-color: #e6a8ad;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Nodes matching the search conditions are highlighted
|
|
122
|
+
*/
|
|
123
|
+
.rowSearchMatch {
|
|
124
|
+
box-shadow: inset 0 -7px 7px -3px #0080ff;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The node that matches the search conditions and is currently focused
|
|
129
|
+
*/
|
|
130
|
+
.rowSearchFocus {
|
|
131
|
+
box-shadow: inset 0 -7px 7px -3px #fc6421;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// %rowItem {
|
|
135
|
+
// display: inline-block;
|
|
136
|
+
// vertical-align: middle;
|
|
137
|
+
// }
|
|
138
|
+
|
|
139
|
+
.rowContents {
|
|
140
|
+
// @extend %rowItem;
|
|
141
|
+
position: relative;
|
|
142
|
+
height: 100%;
|
|
143
|
+
flex: 1 0 auto;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.rowLabel {
|
|
150
|
+
// @extend %rowItem;
|
|
151
|
+
display: flex;
|
|
152
|
+
flex: 0 1 auto;
|
|
153
|
+
padding-right: 20px;
|
|
154
|
+
// .doc-spin{
|
|
155
|
+
// padding-right: 6px;
|
|
156
|
+
// }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.file-document-name {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
.file-type {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
width: 22px;
|
|
166
|
+
}
|
|
167
|
+
.file-name {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
color: #000;
|
|
170
|
+
font-size: 15px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
z-index: 100;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// .rowToolbar {
|
|
178
|
+
// // @extend %rowItem;
|
|
179
|
+
// flex: 0 1 auto;
|
|
180
|
+
// display: flex;
|
|
181
|
+
// }
|
|
182
|
+
|
|
183
|
+
.toolbarButton {
|
|
184
|
+
// @extend %rowItem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Line for under a node with children
|
|
189
|
+
*/
|
|
190
|
+
.lineChildren {
|
|
191
|
+
height: 100%;
|
|
192
|
+
display: inline-block;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* ==========================================================================
|
|
196
|
+
Scaffold
|
|
197
|
+
|
|
198
|
+
Line-overlaid blocks used for showing the tree structure
|
|
199
|
+
========================================================================== */
|
|
200
|
+
.lineBlock {
|
|
201
|
+
height: 100%;
|
|
202
|
+
position: relative;
|
|
203
|
+
display: inline-block;
|
|
204
|
+
flex: 0 0 auto;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.absoluteLineBlock {
|
|
208
|
+
// @extend .lineBlock;
|
|
209
|
+
position: absolute;
|
|
210
|
+
top: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Highlight line for pointing to dragged row destination
|
|
214
|
+
========================================================================== */
|
|
215
|
+
// $highlight-color: #36c2f6;
|
|
216
|
+
// $highlight-line-size: 6px; // Make it an even number for clean rendering
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* +--+--+
|
|
220
|
+
* | | |
|
|
221
|
+
* | | |
|
|
222
|
+
* | | |
|
|
223
|
+
* +--+--+
|
|
224
|
+
*/
|
|
225
|
+
.highlightLineVertical {
|
|
226
|
+
z-index: 3;
|
|
227
|
+
|
|
228
|
+
&::before {
|
|
229
|
+
position: absolute;
|
|
230
|
+
content: "";
|
|
231
|
+
// background-color: $highlight-color;
|
|
232
|
+
// width: $highlight-line-size;
|
|
233
|
+
// margin-left: $highlight-line-size / -2;
|
|
234
|
+
left: 50%;
|
|
235
|
+
top: 0;
|
|
236
|
+
height: 100%;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// @keyframes arrow-pulse {
|
|
240
|
+
// $base-multiplier: 10;
|
|
241
|
+
// 0% {
|
|
242
|
+
// transform: translate(0, 0);
|
|
243
|
+
// opacity: 0;
|
|
244
|
+
// }
|
|
245
|
+
// 30% {
|
|
246
|
+
// transform: translate(0, 30% * $base-multiplier);
|
|
247
|
+
// opacity: 1;
|
|
248
|
+
// }
|
|
249
|
+
// 70% {
|
|
250
|
+
// transform: translate(0, 70% * $base-multiplier);
|
|
251
|
+
// opacity: 1;
|
|
252
|
+
// }
|
|
253
|
+
// 100% {
|
|
254
|
+
// transform: translate(0, 100% * $base-multiplier);
|
|
255
|
+
// opacity: 0;
|
|
256
|
+
// }
|
|
257
|
+
// }
|
|
258
|
+
|
|
259
|
+
&::after {
|
|
260
|
+
content: "";
|
|
261
|
+
position: absolute;
|
|
262
|
+
height: 0;
|
|
263
|
+
// margin-left: -1 * $highlight-line-size / 2;
|
|
264
|
+
left: 50%;
|
|
265
|
+
top: 0;
|
|
266
|
+
// border-left: $highlight-line-size / 2 solid transparent;
|
|
267
|
+
// border-right: $highlight-line-size / 2 solid transparent;
|
|
268
|
+
// border-top: $highlight-line-size / 2 solid white;
|
|
269
|
+
animation: arrow-pulse 1s infinite linear both;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* +-----+
|
|
275
|
+
* | |
|
|
276
|
+
* | +--+
|
|
277
|
+
* | | |
|
|
278
|
+
* +--+--+
|
|
279
|
+
*/
|
|
280
|
+
.highlightTopLeftCorner {
|
|
281
|
+
&::before {
|
|
282
|
+
z-index: 3;
|
|
283
|
+
content: "";
|
|
284
|
+
position: absolute;
|
|
285
|
+
// border-top: solid $highlight-line-size $highlight-color;
|
|
286
|
+
// border-left: solid $highlight-line-size $highlight-color;
|
|
287
|
+
box-sizing: border-box;
|
|
288
|
+
// height: calc(50% + #{$highlight-line-size / 2});
|
|
289
|
+
// top: 50%;
|
|
290
|
+
// margin-top: $highlight-line-size / -2;
|
|
291
|
+
// right: 0;
|
|
292
|
+
// width: calc(50% + #{$highlight-line-size / 2});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* +--+--+
|
|
298
|
+
* | | |
|
|
299
|
+
* | | |
|
|
300
|
+
* | +->|
|
|
301
|
+
* +-----+
|
|
302
|
+
*/
|
|
303
|
+
.highlightBottomLeftCorner {
|
|
304
|
+
// $arrow-size: 7px;
|
|
305
|
+
z-index: 3;
|
|
306
|
+
|
|
307
|
+
&::before {
|
|
308
|
+
content: "";
|
|
309
|
+
position: absolute;
|
|
310
|
+
// border-bottom: solid $highlight-line-size $highlight-color;
|
|
311
|
+
// border-left: solid $highlight-line-size $highlight-color;
|
|
312
|
+
box-sizing: border-box;
|
|
313
|
+
// height: calc(100% + #{$highlight-line-size / 2});
|
|
314
|
+
// top: 0;
|
|
315
|
+
// right: $arrow-size;
|
|
316
|
+
// width: calc(50% - #{$arrow-size - ($highlight-line-size / 2)});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&::after {
|
|
320
|
+
content: "";
|
|
321
|
+
position: absolute;
|
|
322
|
+
height: 0;
|
|
323
|
+
right: 0;
|
|
324
|
+
top: 100%;
|
|
325
|
+
// margin-top: -1 * $arrow-size;
|
|
326
|
+
// border-top: $arrow-size solid transparent;
|
|
327
|
+
// border-bottom: $arrow-size solid transparent;
|
|
328
|
+
// border-left: $arrow-size solid $highlight-color;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { Children, cloneElement } from "react";
|
|
2
|
+
import styles from "./tree-node-renderer.less";
|
|
3
|
+
const FileThemeTreeNodeRenderer = (props) => {
|
|
4
|
+
const { children, listIndex, swapFrom, swapLength, swapDepth, scaffoldBlockPxWidth, lowerSiblingCounts, connectDropTarget, isOver, draggedNode, canDrop, treeIndex, treeId, // Delete from otherProps
|
|
5
|
+
getPrevRow, // Delete from otherProps
|
|
6
|
+
node, // Delete from otherProps
|
|
7
|
+
path, // Delete from otherProps
|
|
8
|
+
rowDirection, ...otherProps } = props;
|
|
9
|
+
return connectDropTarget(React.createElement("div", Object.assign({}, otherProps, { className: styles.node }), Children.map(children, child => cloneElement(child, {
|
|
10
|
+
isOver,
|
|
11
|
+
canDrop,
|
|
12
|
+
draggedNode,
|
|
13
|
+
lowerSiblingCounts,
|
|
14
|
+
listIndex,
|
|
15
|
+
swapFrom,
|
|
16
|
+
swapLength,
|
|
17
|
+
swapDepth
|
|
18
|
+
}))));
|
|
19
|
+
};
|
|
20
|
+
export default FileThemeTreeNodeRenderer;
|
|
21
|
+
//# sourceMappingURL=tree-node-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../src/components/FileExplorerTheme/tree-node-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,YAAY,EAAE,MAAM,OAAO,CAAC;AAIjE,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,yBAAyB,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC5E,MAAM,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,OAAO,EACP,SAAS,EACT,MAAM,EAAE,yBAAyB;IACjC,UAAU,EAAE,yBAAyB;IACrC,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EACZ,GAAG,UAAU,EACb,GAAG,KAAK,CAAC;IACV,OAAO,iBAAiB,CACvB,6CAAS,UAAU,IAAE,SAAS,EAAE,MAAM,CAAC,IAAI,KACzC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAC/B,YAAY,CAAC,KAAK,EAAE;QACnB,MAAM;QACN,OAAO;QACP,WAAW;QACX,kBAAkB;QAClB,SAAS;QACT,QAAQ;QACR,UAAU;QACV,SAAS;KACT,CAAC,CACF,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -10,24 +10,12 @@ import FlagIcon from "../../controls/FlagIcon";
|
|
|
10
10
|
import { State } from "./state";
|
|
11
11
|
import ToolBar from "../../controls/ToolBar";
|
|
12
12
|
import classnames from "classnames";
|
|
13
|
+
import { getRouteByType } from "../helper";
|
|
13
14
|
import { useObserver } from "mobx-react-lite";
|
|
14
15
|
const Item = (props) => {
|
|
15
16
|
const { id, type, multiple, onRemove } = props;
|
|
16
17
|
const document = useDocument(id, { reload: false });
|
|
17
18
|
const [state] = useState(new State());
|
|
18
|
-
// route of document type detail
|
|
19
|
-
const getRouteByType = (type) => {
|
|
20
|
-
switch (type) {
|
|
21
|
-
case DocumentType.Folder:
|
|
22
|
-
return "/document";
|
|
23
|
-
case DocumentType.Meeting:
|
|
24
|
-
return "/meetings";
|
|
25
|
-
case DocumentType.Task:
|
|
26
|
-
return "/tasks";
|
|
27
|
-
default:
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
19
|
const iconList = (React.createElement("div", { className: "task-control" },
|
|
32
20
|
React.createElement("span", null,
|
|
33
21
|
React.createElement(FAIcon, { icon: faPaperclip }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../src/components/Links/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../src/components/Links/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EA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AAI,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,GAAI,CACjF,CACI;oBACN;wBACC,6BAAK,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,IAAG,QAAQ,CAAC,IAAI,CAAO;wBACzE,QAAQ,CACJ,CACD,CACD,CAEU,CACjB;QACD,6BAAK,SAAS,EAAC,oBAAoB;YAClC,oBAAC,OAAO,IACP,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,EACnD,QAAQ,EAAE,IAAI,EACd,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,QAAQ,GACjB,CACG;QACN,oBAAC,uBAAuB,IACvB,EAAE,EAAE,QAAQ,CAAC,EAAE,EACf,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,GAC/C,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -6,8 +6,8 @@ import { useObserver } from "mobx-react-lite";
|
|
|
6
6
|
const ObjectItem = (props) => {
|
|
7
7
|
const { id, type, index } = { ...props };
|
|
8
8
|
return useObserver(() => (React.createElement(React.Fragment, null,
|
|
9
|
-
type === "
|
|
10
|
-
type === "
|
|
9
|
+
type === "Document" && (React.createElement(DocumentName, { id: id, showIcon: true, showTags: false, status: false, quickView: false, className: "docment-item-name" })),
|
|
10
|
+
type === "Unit" && React.createElement(AvatarItem, { id: id, index: index }))));
|
|
11
11
|
};
|
|
12
12
|
export default ObjectItem;
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QuickAccessSearch/ObjectItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,KAInB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IACzC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ;QACb,IAAI,KAAK,UAAU,IAAI,CACvB,oBAAC,YAAY,IACZ,EAAE,EAAE,EAAE,EACN,QAAQ,QACR,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,mBAAmB,GAC7B,CACF;QACA,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QuickAccessSearch/ObjectItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,KAInB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IACzC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ;QACb,IAAI,KAAK,UAAU,IAAI,CACvB,oBAAC,YAAY,IACZ,EAAE,EAAE,EAAE,EACN,QAAQ,QACR,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,mBAAmB,GAC7B,CACF;QACA,IAAI,KAAK,MAAM,IAAI,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CACxC,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { useContactListEffect } from "@voplus/morpho-org";
|
|
2
|
-
import { useDocumentListEffect } from "../../data";
|
|
3
1
|
import React, { useState } from "react";
|
|
4
2
|
import { Input } from "@voplus/antd";
|
|
5
3
|
import ObjectItem from "./ObjectItem";
|
|
6
|
-
import
|
|
4
|
+
import PageListView from "@voplus/morpho-ui/es/controls/PageListView";
|
|
7
5
|
import { State } from "./state";
|
|
8
6
|
import styles from "./index.less";
|
|
7
|
+
import { useObjectListEffect } from "../../data/ObjectStore";
|
|
9
8
|
import { useObserver } from "mobx-react-lite";
|
|
10
9
|
const QuickAccessSearch = () => {
|
|
11
10
|
const [state] = useState(new State());
|
|
12
|
-
|
|
13
|
-
state.
|
|
11
|
+
useObjectListEffect(list => {
|
|
12
|
+
state.lists = list || [];
|
|
14
13
|
state.loading = false;
|
|
15
14
|
}, {
|
|
16
15
|
Filters: state.filters,
|
|
17
|
-
Page: { Page: state.page, PageSize:
|
|
18
|
-
});
|
|
19
|
-
useContactListEffect(list => {
|
|
20
|
-
state.contactList =
|
|
21
|
-
list.filter(item => item.name.toLowerCase().includes(state.filterName)) || [];
|
|
22
|
-
state.loading = false;
|
|
23
|
-
}, {
|
|
24
|
-
Filters: state.filters
|
|
16
|
+
Page: { Page: state.page, PageSize: 10 }
|
|
25
17
|
});
|
|
26
18
|
return useObserver(() => (React.createElement("div", { className: styles["quick-access-search"] },
|
|
27
19
|
React.createElement("div", { className: "obj-search" },
|
|
28
20
|
React.createElement(Input.Search, { value: state.keyword, autoFocus: true, placeholder: "Search...", onSearch: searchByKeWord, onChange: e => searchByKeWord(e.target.value) })),
|
|
29
21
|
React.createElement("div", { className: "obj-list" },
|
|
30
|
-
React.createElement(
|
|
31
|
-
contactList.map((item, index) => (React.createElement(ObjectItem, { key: item.id, id: item.id, type: "contact", index: index }))),
|
|
32
|
-
list.map((item, index) => (React.createElement(ObjectItem, { key: item.id, id: item.id, type: "document", index: index }))))))))));
|
|
22
|
+
React.createElement(PageListView, { data: state.lists, loading: state.loading, loadMore: () => state.loadData(), page: state.page, pageSize: 20 }, (list) => list.map((item, index) => (React.createElement(ObjectItem, { key: item.id, id: item.id, type: item.objectType, index: index }))))))));
|
|
33
23
|
/** 搜索关键字 */
|
|
34
24
|
function searchByKeWord(keyWord) {
|
|
35
25
|
state.keyword = keyWord;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuickAccessSearch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuickAccessSearch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,KAAK,CAAC,GAAG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CAAC,CAAC;IAEH,YAAY;IACZ,SAAS,cAAc,CAAC,OAAe;QACtC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QACxB,IAAI,KAAK,CAAC,OAAO,EAAE;YAClB,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC5B;QACD,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC/B,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;YACrB,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC;YAC3B,KAAK,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IDocument } from "../../data";
|
|
1
|
+
import { IObject } from "../../data";
|
|
3
2
|
export declare class State {
|
|
4
3
|
keyword: string;
|
|
5
|
-
|
|
6
|
-
contactList: IContact[];
|
|
4
|
+
lists: IObject[];
|
|
7
5
|
loading: boolean;
|
|
8
6
|
page: number;
|
|
9
7
|
/** documentlist filter name */
|
|
@@ -3,8 +3,7 @@ import { action, computed, observable } from "mobx";
|
|
|
3
3
|
export class State {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.keyword = "";
|
|
6
|
-
this.
|
|
7
|
-
this.contactList = [];
|
|
6
|
+
this.lists = [];
|
|
8
7
|
this.loading = true;
|
|
9
8
|
this.page = 1;
|
|
10
9
|
/** documentlist filter name */
|
|
@@ -14,8 +13,7 @@ export class State {
|
|
|
14
13
|
}
|
|
15
14
|
/** reset */
|
|
16
15
|
reset() {
|
|
17
|
-
this.
|
|
18
|
-
this.contactList = [];
|
|
16
|
+
this.lists = [];
|
|
19
17
|
this.page = 1;
|
|
20
18
|
this.loading = true;
|
|
21
19
|
}
|
|
@@ -41,10 +39,7 @@ __decorate([
|
|
|
41
39
|
], State.prototype, "keyword", void 0);
|
|
42
40
|
__decorate([
|
|
43
41
|
observable
|
|
44
|
-
], State.prototype, "
|
|
45
|
-
__decorate([
|
|
46
|
-
observable
|
|
47
|
-
], State.prototype, "contactList", void 0);
|
|
42
|
+
], State.prototype, "lists", void 0);
|
|
48
43
|
__decorate([
|
|
49
44
|
observable
|
|
50
45
|
], State.prototype, "loading", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/QuickAccessSearch/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/QuickAccessSearch/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIpD,MAAM,OAAO,KAAK;IAAlB;QACoB,YAAO,GAAG,EAAE,CAAC;QACb,UAAK,GAAc,EAAE,CAAC;QACtB,YAAO,GAAG,IAAI,CAAC;QACf,SAAI,GAAG,CAAC,CAAC;QAC5B,+BAA+B;QACZ,eAAU,GAAG,EAAE,CAAC;QACnC,4BAA4B;QACT,YAAO,GAAQ,IAAI,CAAC;IA6BxC,CAAC;IA3BA,YAAY;IAEL,KAAK;QACX,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,gBAAgB;IAET,QAAQ;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;OAGG;IAEH,IAAW,OAAO;QACjB,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SAC1E;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AApCY;IAAX,UAAU;sCAAqB;AACpB;IAAX,UAAU;oCAA8B;AAC7B;IAAX,UAAU;sCAAuB;AACtB;IAAX,UAAU;mCAAiB;AAEhB;IAAX,UAAU;yCAAwB;AAEvB;IAAX,UAAU;sCAA4B;AAIvC;IADC,MAAM;kCAKN;AAID;IADC,MAAM;qCAIN;AAOD;IADC,QAAQ;oCAOR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "react-sortable-tree/style.css";
|
|
2
2
|
import { ThemeProps } from "react-sortable-tree";
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const SortableTreeDocumentTheme: ThemeProps;
|
|
4
|
+
export default SortableTreeDocumentTheme;
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
import "react-sortable-tree/style.css";
|
|
13
13
|
import nodeContentRenderer from "./node-content-renderer";
|
|
14
14
|
import treeNodeRenderer from "./tree-node-renderer";
|
|
15
|
-
const
|
|
15
|
+
const SortableTreeDocumentTheme = {
|
|
16
16
|
nodeContentRenderer,
|
|
17
17
|
treeNodeRenderer,
|
|
18
18
|
scaffoldBlockPxWidth: 44,
|
|
19
19
|
rowHeight: 80,
|
|
20
20
|
slideRegionSize: 50
|
|
21
21
|
};
|
|
22
|
-
export default
|
|
22
|
+
export default SortableTreeDocumentTheme;
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SortableTreeDocumentTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAEvC,OAAO,+BAA+B,CAAC;AAGvC,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SortableTreeDocumentTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAEvC,OAAO,+BAA+B,CAAC;AAGvC,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,yBAAyB,GAAe;IAC7C,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
|
-
import { Button, Popover, Select, Spin, Tag } from "@voplus/antd";
|
|
2
|
+
import { Button, Popover, Select, Spin, Tag, Tooltip } from "@voplus/antd";
|
|
3
|
+
import { useDocumentStore } from "../../data";
|
|
3
4
|
import React, { useEffect, useState } from "react";
|
|
4
5
|
import { State, colorList } from "./state";
|
|
5
6
|
import { PlusOutlined } from "@ant-design/icons";
|
|
6
7
|
import classnames from "classnames";
|
|
7
|
-
import { useDocumentStore } from "../../data";
|
|
8
8
|
import { useObserver } from "mobx-react-lite";
|
|
9
9
|
const TagView = (props) => {
|
|
10
10
|
const { id, tags, editable, className } = props;
|
|
@@ -26,15 +26,12 @@ const TagView = (props) => {
|
|
|
26
26
|
backgroundColor: item.color,
|
|
27
27
|
borderColor: item.borderColor
|
|
28
28
|
} }, ""))))),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
React.createElement(
|
|
34
|
-
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
state.addTags = state.addTags.filter(({ name }) => tag.name !== name);
|
|
37
|
-
} }, tag.name)))),
|
|
29
|
+
state.editTagName && (React.createElement("div", { className: "reselect-information" },
|
|
30
|
+
React.createElement(Tag, { color: state.info.color }, state.editTagName),
|
|
31
|
+
React.createElement(Button, { type: "link", onClick: () => (state.info = {}) }, "Close Reselect"))),
|
|
32
|
+
React.createElement(Select, { autoFocus: true, showSearch: true, value: state.name, disabled: !!state.editTagName, showArrow: false, filterOption: false, notFoundContent: state.loading ? React.createElement(Spin, null) : null, placeholder: state.name, onSearch: onSearch, onSelect: onChange, onInputKeyDown: onkeydown }, state.list.map(d => (React.createElement(Select.Option, { key: d.id, value: d.name }, d.name)))),
|
|
33
|
+
React.createElement("div", null, state.addTags.map((tag, index) => (React.createElement(Tooltip, { key: index, title: state.editTagName === tag.name ? "" : "Click to reselect color" },
|
|
34
|
+
React.createElement(Tag, { color: tag.color, closable: true, onClick: () => (state.info = tag), onClose: (e) => onRemove(e, tag.name) }, tag.name))))),
|
|
38
35
|
React.createElement("div", { className: "add-tag-dialog-footer" },
|
|
39
36
|
React.createElement(Button, { type: "link", className: "cancel", onClick: () => (state.visible = false) }, "Cancel"),
|
|
40
37
|
React.createElement(Button, { type: "link", loading: state.saveLoading, onClick: onOk }, "Ok")))));
|
|
@@ -47,6 +44,12 @@ const TagView = (props) => {
|
|
|
47
44
|
React.createElement(Tag, { className: classnames("add-tag-btn", { show: state.show }) },
|
|
48
45
|
React.createElement(PlusOutlined, null),
|
|
49
46
|
" tag"))))));
|
|
47
|
+
function onRemove(e, tagName) {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
state.addTags = state.addTags.filter(({ name }) => tagName !== name);
|
|
50
|
+
if (state.editTagName === tagName)
|
|
51
|
+
state.info = {};
|
|
52
|
+
}
|
|
50
53
|
// delete tag
|
|
51
54
|
async function onClose(removedTag) {
|
|
52
55
|
state.tags = state.tags.filter(({ name }) => name !== removedTag);
|
|
@@ -118,11 +121,14 @@ const TagView = (props) => {
|
|
|
118
121
|
}
|
|
119
122
|
function selectColor(value) {
|
|
120
123
|
state.color = value;
|
|
124
|
+
if (state.info)
|
|
125
|
+
state.info.color = value;
|
|
121
126
|
deduplicate();
|
|
122
127
|
}
|
|
123
128
|
function reset() {
|
|
124
129
|
state.name = "";
|
|
125
130
|
state.color = "geekblue";
|
|
131
|
+
state.info = {};
|
|
126
132
|
}
|
|
127
133
|
};
|
|
128
134
|
TagView.defaultProps = {
|