@voplus/morpho-document 1.0.0-dev225 → 1.0.0-dev228
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 +5 -0
- package/es/components/ActivityLog/ActivityActionFilter.d.ts +3 -0
- package/es/components/ActivityLog/ActivityActionFilter.js +23 -0
- package/es/components/ActivityLog/ActivityActionFilter.js.map +1 -0
- package/es/components/ActivityLog/index.d.ts +1 -1
- package/es/components/ActivityLog/index.js +72 -43
- package/es/components/ActivityLog/index.js.map +1 -1
- package/es/components/ActivityLog/index.less +73 -64
- package/es/components/ActivityLog/state.d.ts +12 -1
- package/es/components/ActivityLog/state.js +55 -16
- package/es/components/ActivityLog/state.js.map +1 -1
- package/es/components/AddDocDropdown/state.js +97 -93
- package/es/components/AddDocDropdown/state.js.map +1 -1
- package/es/components/AvatarList/AvatarItem/index.d.ts +3 -3
- package/es/components/AvatarList/state.js +50 -46
- package/es/components/AvatarList/state.js.map +1 -1
- package/es/components/BreadCrumbsHeader/state.js +31 -27
- package/es/components/BreadCrumbsHeader/state.js.map +1 -1
- package/es/components/DocumentDescription/index.d.ts +1 -1
- package/es/components/DocumentHeader/index.js +10 -18
- package/es/components/DocumentHeader/index.js.map +1 -1
- package/es/components/DocumentItem/index.js +2 -2
- package/es/components/DocumentItem/index.js.map +1 -1
- package/es/components/DocumentItem/state.js +48 -44
- package/es/components/DocumentItem/state.js.map +1 -1
- package/es/components/DocumentList/index.js +16 -1
- package/es/components/DocumentList/index.js.map +1 -1
- package/es/components/DocumentList/index.less +9 -2
- package/es/components/DocumentList/state.d.ts +7 -0
- package/es/components/DocumentList/state.js +221 -200
- package/es/components/DocumentList/state.js.map +1 -1
- package/es/components/DocumentListView/state.js +12 -8
- package/es/components/DocumentListView/state.js.map +1 -1
- package/es/components/DocumentMenu/index.js +12 -9
- package/es/components/DocumentMenu/index.js.map +1 -1
- package/es/components/DocumentMenu/state.d.ts +2 -1
- package/es/components/DocumentMenu/state.js +78 -65
- package/es/components/DocumentMenu/state.js.map +1 -1
- package/es/components/DocumentName/index.js +5 -4
- package/es/components/DocumentName/index.js.map +1 -1
- package/es/components/DocumentName/index.less +6 -2
- package/es/components/DocumentQuickViewDialog/index.js +0 -1
- package/es/components/DocumentQuickViewDialog/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.less +1 -1
- package/es/components/DocumentSelectDialog/state.js +72 -68
- package/es/components/DocumentSelectDialog/state.js.map +1 -1
- package/es/components/DocumentSortableTree/index.js +3 -1
- package/es/components/DocumentSortableTree/index.js.map +1 -1
- package/es/components/DocumentSortableTree/state.js +175 -171
- package/es/components/DocumentSortableTree/state.js.map +1 -1
- package/es/components/DocumentTabs/index.d.ts +4 -4
- package/es/components/DocumentTree/state.js +86 -82
- package/es/components/DocumentTree/state.js.map +1 -1
- package/es/components/FileExplorerTheme/node-content-renderer.js +5 -3
- package/es/components/FileExplorerTheme/node-content-renderer.js.map +1 -1
- package/es/components/FileExplorerTheme/node-content-renderer.less +9 -25
- package/es/components/FileViewer/Preview.d.ts +1 -1
- package/es/components/Links/Item.d.ts +3 -3
- package/es/components/Links/Item.js +2 -2
- package/es/components/Links/Item.js.map +1 -1
- package/es/components/Links/state.js +67 -63
- package/es/components/Links/state.js.map +1 -1
- package/es/components/NewDocumentForm/index.d.ts +1 -0
- package/es/components/NewDocumentForm/index.js +1 -1
- package/es/components/NewDocumentForm/index.js.map +1 -1
- package/es/components/NewDocumentForm/state.js +47 -43
- package/es/components/NewDocumentForm/state.js.map +1 -1
- package/es/components/PeopleAccess/NewAccessSelector.d.ts +1 -1
- package/es/components/PeopleAccess/PeopleAccessState.js +136 -132
- package/es/components/PeopleAccess/PeopleAccessState.js.map +1 -1
- package/es/components/PublishModal/index.d.ts +2 -2
- package/es/components/PublishModal/state.js +14 -10
- package/es/components/PublishModal/state.js.map +1 -1
- package/es/components/QuickAccessSearch/ObjectItem/index.d.ts +1 -1
- package/es/components/QuickAccessSearch/state.js +63 -59
- package/es/components/QuickAccessSearch/state.js.map +1 -1
- package/es/components/QuickViewDialog/QuickSubTab/index.d.ts +5 -5
- package/es/components/QuickViewDialog/QuickSubTab/index.js +1 -2
- package/es/components/QuickViewDialog/QuickSubTab/index.js.map +1 -1
- package/es/components/QuickViewDialog/index.d.ts +0 -1
- package/es/components/QuickViewDialog/index.js +5 -2
- package/es/components/QuickViewDialog/index.js.map +1 -1
- package/es/components/QuickViewDialog/state.js +26 -22
- package/es/components/QuickViewDialog/state.js.map +1 -1
- package/es/components/TagView/state.js +63 -59
- package/es/components/TagView/state.js.map +1 -1
- package/es/components/VersionsModal/state.js +27 -23
- package/es/components/VersionsModal/state.js.map +1 -1
- package/es/components/helper.d.ts +2 -1
- package/es/components/helper.js +17 -18
- package/es/components/helper.js.map +1 -1
- package/es/controls/FlagIcon/index.d.ts +1 -1
- package/es/controls/Panable/state.js +31 -27
- package/es/controls/Panable/state.js.map +1 -1
- package/es/controls/PermissionModal/index.d.ts +1 -1
- package/es/controls/QuickDataIcon/index.d.ts +3 -3
- package/es/controls/TimeLog/index.d.ts +1 -1
- package/es/controls/ToolBar/index.js +2 -2
- package/es/controls/ToolBar/index.js.map +1 -1
- package/es/controls/ToolBar/state.js +147 -143
- package/es/controls/ToolBar/state.js.map +1 -1
- package/es/controls/filters/CreateDateFilter/state.js +31 -27
- package/es/controls/filters/CreateDateFilter/state.js.map +1 -1
- package/es/controls/filters/DocumentStatusFilter/state.js +42 -38
- package/es/controls/filters/DocumentStatusFilter/state.js.map +1 -1
- package/es/controls/filters/DocumentTypeFilter/state.js +52 -48
- package/es/controls/filters/DocumentTypeFilter/state.js.map +1 -1
- package/es/controls/filters/FlagFilter/state.js +50 -46
- package/es/controls/filters/FlagFilter/state.js.map +1 -1
- package/es/data/DocumentMetaStore.js +38 -34
- package/es/data/DocumentMetaStore.js.map +1 -1
- package/es/data/DocumentStore/DocumentStore.d.ts +1 -1
- package/es/data/DocumentStore/DocumentStore.js +232 -228
- package/es/data/DocumentStore/DocumentStore.js.map +1 -1
- package/es/data/DocumentStore/hooks/useDocumentActivityListEffect.d.ts +3 -2
- package/es/data/DocumentStore/hooks/useDocumentActivityListEffect.js +3 -5
- package/es/data/DocumentStore/hooks/useDocumentActivityListEffect.js.map +1 -1
- package/es/data/DocumentStore/hooks/useDocumentListLoaderEffect.d.ts +1 -1
- package/es/data/DocumentStore/hooks/useDocumentListLoaderEffect.js.map +1 -1
- package/es/data/DocumentType.d.ts +1 -0
- package/es/data/DocumentType.js +2 -1
- package/es/data/DocumentType.js.map +1 -1
- package/es/data/contexts/DocumentListContext/index.d.ts +0 -2
- package/es/data/contexts/DocumentListContext/index.js +34 -30
- package/es/data/contexts/DocumentListContext/index.js.map +1 -1
- package/es/data/index.js +1 -0
- package/es/data/index.js.map +1 -1
- package/es/data/interfaces/index.js +9 -0
- package/es/data/interfaces/index.js.map +1 -1
- package/es/data/metas/FileTypeMeta.js +25 -21
- package/es/data/metas/FileTypeMeta.js.map +1 -1
- package/es/data/metas/ShortcutMeta.js +26 -22
- package/es/data/metas/ShortcutMeta.js.map +1 -1
- package/es/modules/unit/components/ActivityLog/index.d.ts +1 -1
- package/es/modules/unit/components/ActivityLog/state.js +19 -15
- package/es/modules/unit/components/ActivityLog/state.js.map +1 -1
- package/es/modules/unit/components/AddUnitDropdown/state.js +79 -75
- package/es/modules/unit/components/AddUnitDropdown/state.js.map +1 -1
- package/es/modules/unit/components/BreadCrumbsHeader/state.js +18 -14
- package/es/modules/unit/components/BreadCrumbsHeader/state.js.map +1 -1
- package/es/modules/unit/components/Members/state.js +25 -21
- package/es/modules/unit/components/Members/state.js.map +1 -1
- package/es/modules/unit/components/NewUnitForm/index.d.ts +1 -0
- package/es/modules/unit/components/NewUnitForm/index.js +1 -1
- package/es/modules/unit/components/NewUnitForm/index.js.map +1 -1
- package/es/modules/unit/components/NewUnitForm/state.js +47 -43
- package/es/modules/unit/components/NewUnitForm/state.js.map +1 -1
- package/es/modules/unit/components/SubUnitList/state.js +32 -28
- package/es/modules/unit/components/SubUnitList/state.js.map +1 -1
- package/es/modules/unit/components/UnitAvatar/index.d.ts +5 -5
- package/es/modules/unit/components/UnitDetails/index.js +50 -33
- package/es/modules/unit/components/UnitDetails/index.js.map +1 -1
- package/es/modules/unit/components/UnitDetails/index.less +25 -3
- package/es/modules/unit/components/UnitDetails/state.js +24 -20
- package/es/modules/unit/components/UnitDetails/state.js.map +1 -1
- package/es/modules/unit/components/UnitHead/index.d.ts +2 -2
- package/es/modules/unit/components/UnitHead/state.js +9 -5
- package/es/modules/unit/components/UnitHead/state.js.map +1 -1
- package/es/modules/unit/components/UnitItem/state.js +20 -16
- package/es/modules/unit/components/UnitItem/state.js.map +1 -1
- package/es/modules/unit/components/UnitList/state.js +31 -27
- package/es/modules/unit/components/UnitList/state.js.map +1 -1
- package/es/modules/unit/components/UnitSortableTree/index.js +20 -1
- package/es/modules/unit/components/UnitSortableTree/index.js.map +1 -1
- package/es/modules/unit/components/UnitSortableTree/state.d.ts +3 -0
- package/es/modules/unit/components/UnitSortableTree/state.js +158 -138
- package/es/modules/unit/components/UnitSortableTree/state.js.map +1 -1
- package/es/modules/unit/components/UnitTabs/index.d.ts +2 -2
- package/es/modules/unit/controls/ContactSelect/state.js +40 -36
- package/es/modules/unit/controls/ContactSelect/state.js.map +1 -1
- package/es/modules/unit/controls/QuickDataIcon/index.d.ts +3 -3
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.js +1 -1
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.js.map +1 -1
- package/es/modules/unit/controls/ToolBar/ContactMenu/state.js +68 -64
- package/es/modules/unit/controls/ToolBar/ContactMenu/state.js.map +1 -1
- package/es/modules/unit/controls/ToolBar/index.js +1 -1
- package/es/modules/unit/controls/ToolBar/index.js.map +1 -1
- package/es/modules/unit/controls/ToolBar/state.js +62 -58
- package/es/modules/unit/controls/ToolBar/state.js.map +1 -1
- package/es/modules/unit/controls/UnitTypeFilter/state.js +59 -55
- package/es/modules/unit/controls/UnitTypeFilter/state.js.map +1 -1
- package/es/modules/unit/data/UnitContext/index.d.ts +0 -2
- package/es/modules/unit/data/UnitContext/index.js +24 -20
- package/es/modules/unit/data/UnitContext/index.js.map +1 -1
- package/es/modules/unit/data/UnitStore.js +202 -198
- package/es/modules/unit/data/UnitStore.js.map +1 -1
- package/es/modules/unit/data/hooks/useTeamListEffect.d.ts +1 -1
- package/es/modules/unit/data/hooks/useTeamListEffect.js.map +1 -1
- package/es/modules/unit/data/hooks/useUnitListEffect.d.ts +1 -1
- package/es/modules/unit/data/hooks/useUnitListEffect.js.map +1 -1
- package/es/modules/unit/data/index.js +2 -0
- package/es/modules/unit/data/index.js.map +1 -1
- package/es/modules/unit/data/interfaces/index.js +3 -0
- package/es/modules/unit/data/interfaces/index.js.map +1 -1
- package/es/modules/unit/pages/UnitTreeView/state.js +14 -10
- package/es/modules/unit/pages/UnitTreeView/state.js.map +1 -1
- package/es/pages/TreeViewPage/state.js +14 -10
- package/es/pages/TreeViewPage/state.js.map +1 -1
- package/package.json +4 -4
- package/es/components/DocumentIconView/index.d.ts +0 -13
- package/es/components/DocumentIconView/index.js +0 -118
- package/es/components/DocumentIconView/index.js.map +0 -1
- package/es/components/DocumentIconView/index.less +0 -70
|
@@ -7,205 +7,209 @@ import hash from "object-hash";
|
|
|
7
7
|
import invariant from "invariant";
|
|
8
8
|
import { setTimeout } from "timers";
|
|
9
9
|
const StoreName = "UnitStore";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
10
|
+
let UnitStore = /** @class */ (() => {
|
|
11
|
+
class UnitStore extends Store {
|
|
12
|
+
constructor(_api) {
|
|
13
|
+
super();
|
|
14
|
+
this._api = _api;
|
|
15
|
+
this.name = StoreName;
|
|
16
|
+
/** Contac created event dispatcher */
|
|
17
|
+
this._created = new EventDispatcher();
|
|
18
|
+
this._deleted = new EventDispatcher();
|
|
19
|
+
this._memberCreated = new EventDispatcher();
|
|
20
|
+
this._memberDeleted = new EventDispatcher();
|
|
21
|
+
/** Id of documents to be moved. */
|
|
22
|
+
this.moveIds = [];
|
|
23
|
+
this.items = new CountedMap((key) => UnitStore.createDefaultContact({ id: key }), observable.map([], { deep: true }));
|
|
24
|
+
this._listCache = new Map();
|
|
25
|
+
invariant(_api, `API cannot be ${_api}.`);
|
|
26
|
+
}
|
|
27
|
+
/** Event fires when a new unit has been created. */
|
|
28
|
+
get UnitCreatedEvent() {
|
|
29
|
+
return this._created.asEvent();
|
|
30
|
+
}
|
|
31
|
+
/** Event fires when a delete contact has been deleted. */
|
|
32
|
+
get UnitDeletedEvent() {
|
|
33
|
+
return this._deleted.asEvent();
|
|
34
|
+
}
|
|
35
|
+
/** Event fires when a new member has been created. */
|
|
36
|
+
get MemberCreatedEvent() {
|
|
37
|
+
return this._memberCreated.asEvent();
|
|
38
|
+
}
|
|
39
|
+
/** Event fires when a delete member has been deleted. */
|
|
40
|
+
get MemberDeletedEvent() {
|
|
41
|
+
return this._memberDeleted.asEvent();
|
|
42
|
+
}
|
|
43
|
+
/** Create a default contact object with optional default values. */
|
|
44
|
+
static createDefaultContact(defaultValues) {
|
|
45
|
+
const v = { loaded: false, address: {}, primaryLegalIdentity: {} };
|
|
46
|
+
if (defaultValues)
|
|
47
|
+
Object.assign(v, defaultValues);
|
|
48
|
+
return v;
|
|
49
|
+
}
|
|
50
|
+
/** Create a new contact base on type. */
|
|
51
|
+
async createFromType(options) {
|
|
52
|
+
invariant(options.name, "Name cannot be empty.");
|
|
53
|
+
const r = await this._api.post(`api/groups/create`, new RequestBuilder().form(options));
|
|
54
|
+
const t = (await r.json());
|
|
55
|
+
this._created.dispatch(this, t);
|
|
56
|
+
console.log("createFromType", t);
|
|
57
|
+
return t;
|
|
58
|
+
}
|
|
59
|
+
/** 新增用戶至Group.
|
|
60
|
+
* pid是小組id type必须是Team
|
|
61
|
+
* id 是現有用戶id (必须是用户)
|
|
62
|
+
*/
|
|
63
|
+
async addUserFromGroup(options) {
|
|
64
|
+
// invariant(options.name, "Name cannot be empty.");
|
|
65
|
+
const r = await this._api.post(`/api/groups/${options.pid}/add/${options.id}`);
|
|
66
|
+
const t = (await r.json());
|
|
67
|
+
t.parentNodeId = options.pid;
|
|
68
|
+
this._memberCreated.dispatch(this, t);
|
|
69
|
+
console.log("addUserFromGroup", t);
|
|
70
|
+
return t;
|
|
71
|
+
}
|
|
72
|
+
/** Load a task from server.
|
|
73
|
+
* @param {string} id - id of the task.
|
|
74
|
+
* @param {LoadTaskOptions} options - Optional load options.
|
|
75
|
+
*/
|
|
76
|
+
async load(id, options) {
|
|
77
|
+
let query = "";
|
|
78
|
+
if (options.includes)
|
|
79
|
+
query = query.concat(`includes=${options.includes}`);
|
|
80
|
+
if (query)
|
|
81
|
+
query = "?".concat(query);
|
|
82
|
+
const r = await this._api.get(`/units/${id}${query}`);
|
|
83
|
+
return (await r.json());
|
|
84
|
+
}
|
|
85
|
+
/** Refresh a loaded unit. */
|
|
86
|
+
async refresh(id, options) {
|
|
87
|
+
if (!this.items.has(id))
|
|
88
|
+
return;
|
|
89
|
+
const c = await this.load(id, options);
|
|
90
|
+
this.items.overwrite(id, c);
|
|
91
|
+
}
|
|
92
|
+
/** Load a list of contacts from server.
|
|
93
|
+
* @param {LoadTaskListOptions}
|
|
94
|
+
*/
|
|
95
|
+
async loadList(options) {
|
|
96
|
+
options = options !== null && options !== void 0 ? options : { Filters: [] };
|
|
97
|
+
// skip local cache with paging.
|
|
98
|
+
if (options === null || options === void 0 ? void 0 : options.Page)
|
|
99
|
+
return await this.loadUnitsFromServer(options);
|
|
100
|
+
// const reload = options.reload;
|
|
101
|
+
delete options["reload"];
|
|
102
|
+
// Calculate hash code for load options.
|
|
103
|
+
const hc = hash(options);
|
|
104
|
+
// load from server if not cached
|
|
105
|
+
if (!this._listCache.has(hc)) {
|
|
106
|
+
const result = await this.loadUnitsFromServer(options);
|
|
107
|
+
// Save cache and clear time out.
|
|
108
|
+
this._listCache.set(hc, result);
|
|
109
|
+
setTimeout(() => {
|
|
110
|
+
this._listCache.delete(hc);
|
|
111
|
+
}, 5 * 60 * 1000);
|
|
112
|
+
}
|
|
113
|
+
return this._listCache.get(hc);
|
|
114
|
+
}
|
|
115
|
+
async loadUnitsFromServer(options) {
|
|
116
|
+
const urlPostFix = options.parent ? `/${options.parent}/units` : "";
|
|
117
|
+
const r = await this._api.post(`/units${urlPostFix}`, new RequestBuilder().json(options));
|
|
118
|
+
const result = await r.json();
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
/** Load a list of team of a contact from server.
|
|
122
|
+
* @param id - id of the contact.
|
|
123
|
+
* @param {LoadUnitListOptions}
|
|
124
|
+
*/
|
|
125
|
+
async loadTeamList(id, options) {
|
|
126
|
+
invariant(id, "id cannot be empty");
|
|
127
|
+
const r = await this._api.post(`/api/groups/${id}/members`, new RequestBuilder().json(options ? options : {}));
|
|
128
|
+
return (await r.json());
|
|
129
|
+
}
|
|
130
|
+
/** Load a list of activities of a contact from server.
|
|
131
|
+
* @param id - id of the contact.
|
|
132
|
+
* @param {LoadUnitListOptions}
|
|
133
|
+
*/
|
|
134
|
+
async loadActivityList(id, options) {
|
|
135
|
+
invariant(id, "id cannot be empty");
|
|
136
|
+
let query = "";
|
|
137
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
138
|
+
query = query.concat(`includes=${options.Includes}`);
|
|
139
|
+
}
|
|
140
|
+
if (query)
|
|
141
|
+
query = "?".concat(query);
|
|
142
|
+
const r = await this._api.post(`/units/${id}/activities${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
143
|
+
return (await r.json());
|
|
144
|
+
}
|
|
145
|
+
/** Edit an existing item on server. */
|
|
146
|
+
async edit(id, options) {
|
|
147
|
+
const r = await this._api.post(`api/units/${id}/info`, new RequestBuilder().json(options));
|
|
148
|
+
const t = await r.json();
|
|
149
|
+
this.items.overwrite(t.id, t);
|
|
150
|
+
}
|
|
151
|
+
async delete(id) {
|
|
152
|
+
await this._api.delete(`api/groups/${id}`);
|
|
153
|
+
const item = this.items.peek(id);
|
|
154
|
+
this._deleted.dispatch(this, item);
|
|
155
|
+
return item;
|
|
156
|
+
}
|
|
157
|
+
/** 把用戶從Group移除
|
|
158
|
+
* pid是小組id
|
|
159
|
+
* id 是現有用戶id (必须是用户)
|
|
160
|
+
*/
|
|
161
|
+
async deleteUser(options) {
|
|
162
|
+
await this._api.delete(`api/groups/${options.pid}/remove/${options.id}`);
|
|
163
|
+
const item = this.items.peek(options.id);
|
|
164
|
+
item.parentNodeId = options.pid;
|
|
165
|
+
this._memberDeleted.dispatch(this, item);
|
|
166
|
+
return item;
|
|
167
|
+
}
|
|
168
|
+
async moveAfter(id, afterId) {
|
|
169
|
+
await this._api.post(`api/units/${id}/move?afterId=${afterId}`);
|
|
170
|
+
}
|
|
171
|
+
cut(ids) {
|
|
172
|
+
invariant(ids, "Ids cannot be empty.");
|
|
173
|
+
this.moveIds = ids;
|
|
174
|
+
}
|
|
175
|
+
paste(target) {
|
|
176
|
+
this.move(toJS(this.moveIds), target);
|
|
177
|
+
this.moveIds = [];
|
|
178
|
+
}
|
|
179
|
+
async move(ids, targetId) {
|
|
180
|
+
const result = await this._api.post(`api/units/move`, new RequestBuilder().json({ Ids: ids, TargetId: targetId }));
|
|
181
|
+
const moved = await result.json();
|
|
182
|
+
for (const item of moved) {
|
|
183
|
+
this._created.dispatch(this, item);
|
|
184
|
+
}
|
|
185
|
+
this._deleted.dispatch(this, moved);
|
|
186
|
+
return moved;
|
|
187
|
+
}
|
|
186
188
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
189
|
+
__decorate([
|
|
190
|
+
observable
|
|
191
|
+
], UnitStore.prototype, "moveIds", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
observable
|
|
194
|
+
], UnitStore.prototype, "items", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
action
|
|
197
|
+
], UnitStore.prototype, "delete", null);
|
|
198
|
+
__decorate([
|
|
199
|
+
action
|
|
200
|
+
], UnitStore.prototype, "moveAfter", null);
|
|
201
|
+
__decorate([
|
|
202
|
+
action
|
|
203
|
+
], UnitStore.prototype, "cut", null);
|
|
204
|
+
__decorate([
|
|
205
|
+
action
|
|
206
|
+
], UnitStore.prototype, "paste", null);
|
|
207
|
+
__decorate([
|
|
208
|
+
action
|
|
209
|
+
], UnitStore.prototype, "move", null);
|
|
210
|
+
return UnitStore;
|
|
211
|
+
})();
|
|
212
|
+
export { UnitStore };
|
|
209
213
|
/** React hook to retrieve ContactStore */
|
|
210
214
|
export const useUnitStore = () => {
|
|
211
215
|
const context = useApplicationContext();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnitStore.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/UnitStore.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAe,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG5F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,SAAS,GAAG,WAAW,CAAC;AAqD9B,
|
|
1
|
+
{"version":3,"file":"UnitStore.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/UnitStore.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAe,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG5F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,SAAS,G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C;YACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACzB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aACnC;YACD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,OAAO,KAAK,CAAC;QACd,CAAC;KACD;IAhOY;QAAX,UAAU;8CAA+B;IAwB1C;QAFC,UAAU;4CAKT;IA0IF;QAFC,MAAM;2CAON;IAmBD;QALC,MAAM;8CAON;IAID;QAFC,MAAM;wCAKN;IAID;QAFC,MAAM;0CAKN;IAOD;QALC,MAAM;yCAgBN;IACF,gBAAC;KAAA;SA9OY,SAAS;AAgPtB,0CAA0C;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KAC7D;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -5,4 +5,4 @@ import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
|
5
5
|
* @param effect - Effect callback to be ran after successful retrieved the list.
|
|
6
6
|
* @param options - Optional team list loading options.
|
|
7
7
|
*/
|
|
8
|
-
export declare const useTeamListEffect: (id: string, list: ListDataContextState<IUnit> | null, effect: (list: IUnit[]) => void, options?: LoadUnitListOptions | undefined) => void;
|
|
8
|
+
export declare const useTeamListEffect: (id: string, list: ListDataContextState<IUnit> | null, effect: ((list: IUnit[]) => void) | null, options?: LoadUnitListOptions | undefined) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTeamListEffect.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/hooks/useTeamListEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,EAAU,EACV,IAAwC,EACxC,
|
|
1
|
+
{"version":3,"file":"useTeamListEffect.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/hooks/useTeamListEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,EAAU,EACV,IAAwC,EACxC,MAAwC,EACxC,OAA6B,EAC5B,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC7D,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;IAEhC,kFAAkF;IAClF,OAAO,uBAAuB,CAC7B,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAC7B,QAAQ,CAAC,KAAK,EACd,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,EACxC,CAAC,IAAI,CAAC,EACN;QACC,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,IAAI;gBAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAC/B,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE;YACd,IAAI,IAAI;gBAAE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAChC,CAAC;KACD,CACD,CAAC;IAEF,SAAS,WAAW,CAAC,MAAe;QACnC,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ;YAAE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/E,MAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -5,4 +5,4 @@ import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
|
5
5
|
* @param effect - Effect callback to be ran after successful retrieved the list.
|
|
6
6
|
* @param options - Optional unit list loading options.
|
|
7
7
|
*/
|
|
8
|
-
export declare const useUnitListEffect: (list: ListDataContextState<IUnit> | null, effect: (list: IUnit[]) => void, options?: LoadUnitListOptions | undefined) => void;
|
|
8
|
+
export declare const useUnitListEffect: (list: ListDataContextState<IUnit> | null, effect: ((list: IUnit[]) => void) | null, options?: LoadUnitListOptions | undefined) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnitListEffect.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/hooks/useUnitListEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,IAAwC,EACxC,
|
|
1
|
+
{"version":3,"file":"useUnitListEffect.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/hooks/useUnitListEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,IAAwC,EACxC,MAAwC,EACxC,OAA6B,EAC5B,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC7D,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;IAEhC,kFAAkF;IAClF,0GAA0G;IAC1G,OAAO,uBAAuB,CAC7B,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAC7B,QAAQ,CAAC,KAAK,EACd,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAChC,CAAC,IAAI,CAAC,EACN;QACC,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,IAAI;gBAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAC/B,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE;YACd,IAAI,IAAI;gBAAE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAChC,CAAC;KACD,CACD,CAAC;IAEF,SAAS,WAAW,CAAC,MAAe;QACnC,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ;YAAE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/E,MAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/interfaces/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/data/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { observable } from "mobx";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
let State = /** @class */ (() => {
|
|
4
|
+
class State {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.types = [];
|
|
7
|
+
}
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
__decorate([
|
|
10
|
+
observable
|
|
11
|
+
], State.prototype, "types", void 0);
|
|
12
|
+
__decorate([
|
|
13
|
+
observable
|
|
14
|
+
], State.prototype, "filterType", void 0);
|
|
15
|
+
return State;
|
|
16
|
+
})();
|
|
17
|
+
export { State };
|
|
14
18
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/pages/UnitTreeView/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/pages/UnitTreeView/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC;IAAA,MAAa,KAAK;QAAlB;YACoB,UAAK,GAAa,EAAE,CAAC;QAEzC,CAAC;KAAA;IAFY;QAAX,UAAU;wCAA6B;IAC5B;QAAX,UAAU;6CAA6C;IACzD,YAAC;KAAA;SAHY,KAAK"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { observable } from "mobx";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
let State = /** @class */ (() => {
|
|
4
|
+
class State {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.types = [];
|
|
7
|
+
}
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
__decorate([
|
|
10
|
+
observable
|
|
11
|
+
], State.prototype, "types", void 0);
|
|
12
|
+
__decorate([
|
|
13
|
+
observable
|
|
14
|
+
], State.prototype, "filterType", void 0);
|
|
15
|
+
return State;
|
|
16
|
+
})();
|
|
17
|
+
export { State };
|
|
14
18
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/pages/TreeViewPage/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/pages/TreeViewPage/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC;IAAA,MAAa,KAAK;QAAlB;YACoB,UAAK,GAAa,EAAE,CAAC;QAEzC,CAAC;KAAA;IAFY;QAAX,UAAU;wCAA6B;IAC5B;QAAX,UAAU;6CAA6C;IACzD,YAAC;KAAA;SAHY,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voplus/morpho-document",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-dev228",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@ant-design/icons": "^4.1.0",
|
|
43
43
|
"@types/classnames": "^2.2.10",
|
|
44
44
|
"@types/file-saver": "^2.0.1",
|
|
45
|
-
"@types/invariant": "^2.2.
|
|
45
|
+
"@types/invariant": "^2.2.33",
|
|
46
46
|
"@types/lodash-es": "^4.17.3",
|
|
47
47
|
"@types/object-hash": "^1.3.2",
|
|
48
48
|
"@types/react": "^16.9.35",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@types/react-sortable-tree-theme-file-explorer": "0.0.0",
|
|
54
54
|
"@types/react-test-renderer": "^16.9.2",
|
|
55
55
|
"@types/uuid": "^3.4.9",
|
|
56
|
-
"@voplus/antd": "^4.
|
|
56
|
+
"@voplus/antd": "^4.2.2-vo1.0.2",
|
|
57
57
|
"@voplus/morpho-client-test": "^1.0.0-dev014",
|
|
58
58
|
"@voplus/morpho-collaboration": "^1.0.0-dev024",
|
|
59
59
|
"@voplus/morpho-config": "^1.0.0-dev50",
|
|
60
|
-
"@voplus/morpho-data": "^1.0.0-
|
|
60
|
+
"@voplus/morpho-data": "^1.0.0-dev096",
|
|
61
61
|
"@voplus/morpho-org": "^1.0.0-dev032-antd4",
|
|
62
62
|
"@voplus/morpho-text": "^1.0.0-dev016",
|
|
63
63
|
"@voplus/morpho-ui": "^1.0.0-dev113",
|