@voplus/morpho-document 1.0.0-dev214 → 1.0.0-dev215
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 +7 -0
- package/es/components/AddDocDropdown/index.js +12 -1
- package/es/components/AddDocDropdown/index.js.map +1 -1
- package/es/components/AddDocDropdown/state.js +7 -1
- package/es/components/AddDocDropdown/state.js.map +1 -1
- package/es/components/BreadCrumbsHeader/index.d.ts +9 -0
- package/es/components/BreadCrumbsHeader/index.js +30 -0
- package/es/components/BreadCrumbsHeader/index.js.map +1 -0
- package/es/components/BreadCrumbsHeader/index.less +10 -0
- package/es/components/BreadCrumbsHeader/state.d.ts +10 -0
- package/es/components/BreadCrumbsHeader/state.js +34 -0
- package/es/components/BreadCrumbsHeader/state.js.map +1 -0
- package/es/components/DocumentItem/index.js +2 -8
- package/es/components/DocumentItem/index.js.map +1 -1
- package/es/components/DocumentList/Header.d.ts +13 -0
- package/es/components/DocumentList/Header.js +16 -0
- package/es/components/DocumentList/Header.js.map +1 -0
- package/es/components/DocumentList/index.js +29 -29
- package/es/components/DocumentList/index.js.map +1 -1
- package/es/components/DocumentList/index.less +39 -15
- package/es/components/DocumentList/state.d.ts +5 -8
- package/es/components/DocumentList/state.js +21 -38
- package/es/components/DocumentList/state.js.map +1 -1
- package/es/components/DocumentListView/index.d.ts +3 -2
- package/es/components/DocumentListView/index.js +31 -54
- package/es/components/DocumentListView/index.js.map +1 -1
- package/es/components/DocumentListView/state.d.ts +1 -36
- package/es/components/DocumentListView/state.js +1 -100
- package/es/components/DocumentListView/state.js.map +1 -1
- package/es/components/DocumentSortableTree/index.js +31 -4
- package/es/components/DocumentSortableTree/index.js.map +1 -1
- package/es/components/DocumentSortableTree/state.d.ts +7 -6
- package/es/components/DocumentSortableTree/state.js +23 -32
- package/es/components/DocumentSortableTree/state.js.map +1 -1
- package/es/components/DocumentTabs/index.js +2 -4
- package/es/components/DocumentTabs/index.js.map +1 -1
- package/es/components/DocumentTree/index.js +1 -1
- package/es/components/DocumentTree/index.js.map +1 -1
- package/es/components/FileViewer/ImageViewer.js +4 -3
- package/es/components/FileViewer/ImageViewer.js.map +1 -1
- package/es/components/FileViewer/PDFViewer.js +4 -2
- package/es/components/FileViewer/PDFViewer.js.map +1 -1
- package/es/components/FileViewer/Preview.js +12 -10
- package/es/components/FileViewer/Preview.js.map +1 -1
- package/es/components/FileViewer/index.less +33 -0
- package/es/components/NewDocumentForm/index.d.ts +1 -1
- package/es/components/NewDocumentForm/index.js +3 -1
- package/es/components/NewDocumentForm/index.js.map +1 -1
- package/es/components/QuickAccessSearch/index.js +5 -4
- package/es/components/QuickAccessSearch/index.js.map +1 -1
- package/es/components/QuickViewDialog/QuickSubTab/index.d.ts +10 -4
- package/es/components/QuickViewDialog/QuickSubTab/index.js +16 -16
- package/es/components/QuickViewDialog/QuickSubTab/index.js.map +1 -1
- package/es/components/QuickViewDialog/QuickSubTab/index.less +7 -19
- package/es/components/QuickViewDialog/index.js +2 -1
- package/es/components/QuickViewDialog/index.js.map +1 -1
- package/es/components/QuickViewDialog/index.less +8 -1
- package/es/components/helper.d.ts +1 -1
- package/es/components/helper.js +4 -0
- package/es/components/helper.js.map +1 -1
- package/es/components/styles/common.less +4 -1
- package/es/controls/filters/DocumentTypeFilter/index.d.ts +3 -0
- package/es/controls/filters/DocumentTypeFilter/index.js +21 -0
- package/es/controls/filters/DocumentTypeFilter/index.js.map +1 -0
- package/es/controls/filters/DocumentTypeFilter/state.d.ts +18 -0
- package/es/controls/filters/DocumentTypeFilter/state.js +57 -0
- package/es/controls/filters/DocumentTypeFilter/state.js.map +1 -0
- package/es/controls/filters/index.d.ts +1 -0
- package/es/controls/filters/index.js +1 -0
- package/es/controls/filters/index.js.map +1 -1
- package/es/data/DocumentStore/hooks/useDocumentListEffect.d.ts +2 -1
- package/es/data/DocumentStore/hooks/useDocumentListEffect.js +2 -2
- package/es/data/DocumentStore/hooks/useDocumentListEffect.js.map +1 -1
- package/es/data/DocumentType.d.ts +3 -1
- package/es/data/DocumentType.js +3 -1
- package/es/data/DocumentType.js.map +1 -1
- package/es/modules/unit/components/ActivityLog/index.d.ts +6 -0
- package/es/modules/unit/components/ActivityLog/index.js +62 -0
- package/es/modules/unit/components/ActivityLog/index.js.map +1 -0
- package/es/modules/unit/components/ActivityLog/index.less +64 -0
- package/es/modules/unit/components/ActivityLog/state.d.ts +14 -0
- package/es/modules/unit/components/ActivityLog/state.js +51 -0
- package/es/modules/unit/components/ActivityLog/state.js.map +1 -0
- package/es/modules/unit/components/BreadCrumbsHeader/index.d.ts +6 -0
- package/es/modules/unit/components/BreadCrumbsHeader/index.js +27 -0
- package/es/modules/unit/components/BreadCrumbsHeader/index.js.map +1 -0
- package/es/modules/unit/components/BreadCrumbsHeader/index.less +10 -0
- package/es/modules/unit/components/BreadCrumbsHeader/state.d.ts +5 -0
- package/es/modules/unit/components/BreadCrumbsHeader/state.js +19 -0
- package/es/modules/unit/components/BreadCrumbsHeader/state.js.map +1 -0
- package/es/modules/unit/components/NewUnitForm/index.d.ts +11 -0
- package/es/modules/unit/components/NewUnitForm/index.js +51 -0
- package/es/modules/unit/components/NewUnitForm/index.js.map +1 -0
- package/es/modules/unit/components/NewUnitForm/index.less +33 -0
- package/es/modules/unit/components/NewUnitForm/state.d.ts +22 -0
- package/es/modules/unit/components/NewUnitForm/state.js +49 -0
- package/es/modules/unit/components/NewUnitForm/state.js.map +1 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/index.d.ts +4 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/index.js +23 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/index.js.map +1 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.js +58 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.less +46 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.js +73 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.less +12 -0
- package/es/modules/unit/components/SubUnitList/index.d.ts +5 -0
- package/es/modules/unit/components/SubUnitList/index.js +77 -0
- package/es/modules/unit/components/SubUnitList/index.js.map +1 -0
- package/es/modules/unit/components/SubUnitList/index.less +13 -0
- package/es/modules/unit/components/SubUnitList/state.d.ts +17 -0
- package/es/modules/unit/components/SubUnitList/state.js +41 -0
- package/es/modules/unit/components/SubUnitList/state.js.map +1 -0
- package/es/modules/unit/components/UnitAvatar/index.d.ts +1 -0
- package/es/modules/unit/components/UnitAvatar/index.js +4 -3
- package/es/modules/unit/components/UnitAvatar/index.js.map +1 -1
- package/es/modules/unit/components/UnitAvatar/index.less +2 -3
- package/es/modules/unit/components/UnitDetails/index.js +98 -7
- package/es/modules/unit/components/UnitDetails/index.js.map +1 -1
- package/es/modules/unit/components/UnitDetails/index.less +41 -5
- package/es/modules/unit/components/UnitDetails/state.d.ts +8 -0
- package/es/modules/unit/components/UnitDetails/state.js +24 -0
- package/es/modules/unit/components/UnitDetails/state.js.map +1 -0
- package/es/modules/unit/components/UnitHead/index.d.ts +2 -0
- package/es/modules/unit/components/UnitHead/index.js +31 -7
- package/es/modules/unit/components/UnitHead/index.js.map +1 -1
- package/es/modules/unit/components/UnitHead/index.less +18 -3
- package/es/modules/unit/components/UnitHead/state.d.ts +11 -0
- package/es/modules/unit/components/UnitHead/state.js +8 -0
- package/es/modules/unit/components/UnitHead/state.js.map +1 -0
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.d.ts +4 -0
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js +29 -0
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js.map +1 -0
- package/es/modules/unit/components/UnitItem/SubUnitItem.d.ts +4 -0
- package/es/modules/unit/components/UnitItem/SubUnitItem.js +35 -0
- package/es/modules/unit/components/UnitItem/SubUnitItem.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.less +23 -5
- package/es/modules/unit/components/UnitItem/state.d.ts +20 -0
- package/es/modules/unit/components/UnitItem/state.js +20 -0
- package/es/modules/unit/components/UnitItem/state.js.map +1 -0
- package/es/modules/unit/components/UnitList/index.d.ts +4 -0
- package/es/modules/unit/components/UnitList/index.js +35 -0
- package/es/modules/unit/components/UnitList/index.js.map +1 -0
- package/es/modules/unit/components/UnitList/state.d.ts +15 -0
- package/es/modules/unit/components/UnitList/state.js +31 -0
- package/es/modules/unit/components/UnitList/state.js.map +1 -0
- package/es/modules/unit/components/UnitPropertiesView/index.d.ts +6 -0
- package/es/modules/unit/components/UnitPropertiesView/index.js +22 -0
- package/es/modules/unit/components/UnitPropertiesView/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/index.d.ts +10 -0
- package/es/modules/unit/components/UnitSortableTree/index.js +54 -0
- package/es/modules/unit/components/UnitSortableTree/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/state.d.ts +50 -0
- package/es/modules/unit/components/UnitSortableTree/state.js +151 -0
- package/es/modules/unit/components/UnitSortableTree/state.js.map +1 -0
- package/es/modules/unit/components/UnitTabs/index.d.ts +6 -0
- package/es/modules/unit/components/UnitTabs/index.js +27 -0
- package/es/modules/unit/components/UnitTabs/index.js.map +1 -0
- package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.d.ts +6 -0
- package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.js +32 -0
- package/es/modules/unit/controls/QuickDataIcon/UnitTeamsIcon/index.js.map +1 -0
- package/es/modules/unit/{components → controls}/QuickDataIcon/index.d.ts +1 -5
- package/es/modules/unit/controls/QuickDataIcon/index.js +36 -0
- package/es/modules/unit/controls/QuickDataIcon/index.js.map +1 -0
- package/es/modules/unit/controls/QuickDataIcon/index.less +0 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.d.ts +13 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.js +59 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.js.map +1 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/index.less +20 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/state.d.ts +34 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/state.js +71 -0
- package/es/modules/unit/controls/ToolBar/ContactMenu/state.js.map +1 -0
- package/es/modules/unit/controls/ToolBar/index.d.ts +12 -0
- package/es/modules/unit/controls/ToolBar/index.js +54 -0
- package/es/modules/unit/controls/ToolBar/index.js.map +1 -0
- package/es/modules/unit/controls/ToolBar/index.less +18 -0
- package/es/modules/unit/controls/ToolBar/state.d.ts +40 -0
- package/es/modules/unit/controls/ToolBar/state.js +50 -0
- package/es/modules/unit/controls/ToolBar/state.js.map +1 -0
- package/es/modules/unit/controls/UnitTypeFilter/index.d.ts +3 -0
- package/es/modules/unit/controls/UnitTypeFilter/index.js +21 -0
- package/es/modules/unit/controls/UnitTypeFilter/index.js.map +1 -0
- package/es/modules/unit/controls/UnitTypeFilter/state.d.ts +18 -0
- package/es/modules/unit/controls/UnitTypeFilter/state.js +63 -0
- package/es/modules/unit/controls/UnitTypeFilter/state.js.map +1 -0
- package/es/modules/unit/data/ContactStore.d.ts +82 -0
- package/es/modules/unit/data/ContactStore.js +140 -0
- package/es/modules/unit/data/ContactStore.js.map +1 -0
- package/es/modules/unit/data/FileStore/FileContext.d.ts +6 -0
- package/es/modules/unit/data/FileStore/FileContext.js +40 -0
- package/es/modules/unit/data/FileStore/FileContext.js.map +1 -0
- package/es/modules/unit/data/FileStore/index.d.ts +1 -0
- package/es/modules/unit/data/FileStore/index.js +2 -0
- package/es/modules/unit/data/FileStore/index.js.map +1 -0
- package/es/modules/unit/data/StoreContext/index.d.ts +3 -0
- package/es/modules/unit/data/StoreContext/index.js +4 -0
- package/es/modules/unit/data/StoreContext/index.js.map +1 -0
- package/es/modules/unit/data/UnitContext/index.d.ts +20 -0
- package/es/modules/unit/data/UnitContext/index.js +32 -0
- package/es/modules/unit/data/UnitContext/index.js.map +1 -0
- package/es/modules/unit/data/hooks.d.ts +24 -0
- package/es/modules/unit/data/hooks.js +65 -0
- package/es/modules/unit/data/hooks.js.map +1 -0
- package/es/modules/unit/data/index.d.ts +3 -0
- package/es/modules/unit/data/index.js +3 -0
- package/es/modules/unit/data/index.js.map +1 -0
- package/es/modules/unit/data/interfaces/IAddress.d.ts +14 -0
- package/es/modules/unit/data/interfaces/IAddress.js +1 -0
- package/es/modules/unit/data/interfaces/IAddress.js.map +1 -0
- package/es/modules/unit/data/interfaces/IContact.d.ts +45 -0
- package/es/modules/unit/data/interfaces/IContact.js +1 -0
- package/es/modules/unit/data/interfaces/IContact.js.map +1 -0
- package/es/modules/unit/data/interfaces/IEntityName.d.ts +6 -0
- package/es/modules/unit/data/interfaces/IEntityName.js +1 -0
- package/es/modules/unit/data/interfaces/IEntityName.js.map +1 -0
- package/es/modules/unit/data/interfaces/index.d.ts +3 -0
- package/es/modules/unit/data/interfaces/index.js +1 -0
- package/es/modules/unit/data/interfaces/index.js.map +1 -0
- package/es/modules/unit/pages/UnitDefaultView/index.d.ts +3 -0
- package/es/modules/unit/pages/UnitDefaultView/index.js +47 -0
- package/es/modules/unit/pages/UnitDefaultView/index.js.map +1 -0
- package/es/modules/unit/pages/UnitDefaultView/index.less +17 -0
- package/es/modules/unit/pages/UnitListView/index.d.ts +3 -0
- package/es/modules/unit/pages/UnitListView/index.js +10 -0
- package/es/modules/unit/pages/UnitListView/index.js.map +1 -0
- package/es/modules/unit/pages/UnitTreeView/index.d.ts +3 -0
- package/es/modules/unit/pages/UnitTreeView/index.js +47 -0
- package/es/modules/unit/pages/UnitTreeView/index.js.map +1 -0
- package/es/modules/unit/pages/UnitTreeView/index.less +31 -0
- package/es/modules/unit/pages/UnitTreeView/state.d.ts +5 -0
- package/es/modules/unit/pages/UnitTreeView/state.js +14 -0
- package/es/modules/unit/pages/UnitTreeView/state.js.map +1 -0
- package/es/pages/TreeViewPage/index.js +27 -20
- package/es/pages/TreeViewPage/index.js.map +1 -1
- package/es/pages/TreeViewPage/index.less +28 -19
- package/es/pages/TreeViewPage/state.d.ts +5 -0
- package/es/pages/TreeViewPage/state.js +14 -0
- package/es/pages/TreeViewPage/state.js.map +1 -0
- package/es/routes.d.ts +18 -0
- package/es/routes.js +40 -1
- package/es/routes.js.map +1 -1
- package/package.json +3 -1
- package/es/controls/DocumentTypeFilter/index.js +0 -54
- package/es/controls/DocumentTypeFilter/index.js.map +0 -1
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.d.ts +0 -14
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js +0 -28
- package/es/modules/unit/components/QuickDataIcon/UnitTeamsIcon/index.js.map +0 -1
- package/es/modules/unit/components/QuickDataIcon/index.js +0 -45
- package/es/modules/unit/components/QuickDataIcon/index.js.map +0 -1
- package/es/modules/unit/components/UnitItem/index.d.ts +0 -6
- package/es/modules/unit/components/UnitItem/index.js +0 -19
- package/es/modules/unit/components/UnitItem/index.js.map +0 -1
- /package/es/modules/unit/components/{QuickDataIcon → UnitList}/index.less +0 -0
- /package/es/{controls/DocumentTypeFilter/index.d.ts → modules/unit/components/UnitPropertiesView/index.less} +0 -0
- /package/es/modules/unit/{components → controls}/QuickDataIcon/UnitTeamsIcon/index.less +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Modal, message } from "@voplus/antd";
|
|
3
|
+
import { action, observable } from "mobx";
|
|
4
|
+
import Routes from "../../../../../routes";
|
|
5
|
+
export class State {
|
|
6
|
+
constructor(_store, _filestore) {
|
|
7
|
+
this._store = _store;
|
|
8
|
+
this._filestore = _filestore;
|
|
9
|
+
}
|
|
10
|
+
/** Menu item click */
|
|
11
|
+
async moreOperate({ key, domEvent }) {
|
|
12
|
+
domEvent.stopPropagation();
|
|
13
|
+
if (key === "Edit")
|
|
14
|
+
this.props.onEdit();
|
|
15
|
+
if (key === "Delete") {
|
|
16
|
+
Modal.confirm({
|
|
17
|
+
title: this.props.deleteTitel ? this.props.deleteTitel : "Do you want to delete this item?",
|
|
18
|
+
onOk: () => {
|
|
19
|
+
if (this.props.onDelete) {
|
|
20
|
+
return this.props.onDelete();
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this._store.delete(this.props.id);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (key === "Move") {
|
|
29
|
+
this.props.onMove ? this.props.onMove() : this._filestore.onMove([this.props.id]);
|
|
30
|
+
}
|
|
31
|
+
if (key === "Paste") {
|
|
32
|
+
if (this.props.onPaste) {
|
|
33
|
+
this.props.onPaste();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (this._filestore.moveIds.some((id) => id === this.props.id)) {
|
|
37
|
+
return message.warn("Cannot move to itself");
|
|
38
|
+
}
|
|
39
|
+
this._filestore.onPaste(() => {
|
|
40
|
+
this._store.move(this._filestore.moveIds, this.props.id);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (key === "OpenTreeView" && this.props.id)
|
|
45
|
+
this.layout.history.push(Routes.UnitTree.getUrl(this.props.id));
|
|
46
|
+
if (key === "Open")
|
|
47
|
+
this.layout.history.push(this.props.url);
|
|
48
|
+
// if (key === "Lock") {
|
|
49
|
+
// this.props.onLock
|
|
50
|
+
// ? this.props.onLock()
|
|
51
|
+
// : this._store.edit(this.props.id!, { Status: "Readonly" });
|
|
52
|
+
// }
|
|
53
|
+
// if (key === "Unlock") {
|
|
54
|
+
// this.props.onUnlock
|
|
55
|
+
// ? this.props.onUnlock()
|
|
56
|
+
// : this._store.edit(this.props.id!, { Status: "Normal" });
|
|
57
|
+
// }
|
|
58
|
+
if (key === "Print")
|
|
59
|
+
window.open(window.location.protocol + "//" + window.location.host + `${this.props.printPath}`, "_blank");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
__decorate([
|
|
63
|
+
observable
|
|
64
|
+
], State.prototype, "props", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
observable
|
|
67
|
+
], State.prototype, "layout", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
action
|
|
70
|
+
], State.prototype, "moreOperate", null);
|
|
71
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/unit/controls/ToolBar/ContactMenu/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAI1C,OAAO,MAAM,MAAM,uBAAuB,CAAC;AA0B3C,MAAM,OAAO,KAAK;IACjB,YAA2B,MAAoB,EAAU,UAAqB;QAAnD,WAAM,GAAN,MAAM,CAAc;QAAU,eAAU,GAAV,UAAU,CAAW;IAAG,CAAC;IAIlF,sBAAsB;IAEf,KAAK,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAO;QAC9C,QAAQ,CAAC,eAAe,EAAE,CAAC;QAC3B,IAAI,GAAG,KAAK,MAAM;YAAE,IAAI,CAAC,KAAK,CAAC,MAAO,EAAE,CAAC;QACzC,IAAI,GAAG,KAAK,QAAQ,EAAE;YACrB,KAAK,CAAC,OAAO,CAAC;gBACb,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,kCAAkC;gBAC3F,IAAI,EAAE,GAAG,EAAE;oBACV,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;wBACxB,OAAO,IAAI,CAAC,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C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAI,CAAC,CAAC;QAC9D,wBAAwB;QACxB,qBAAqB;QACrB,0BAA0B;QAC1B,gEAAgE;QAChE,IAAI;QACJ,0BAA0B;QAC1B,uBAAuB;QACvB,4BAA4B;QAC5B,8DAA8D;QAC9D,IAAI;QACJ,IAAI,GAAG,KAAK,OAAO;YAClB,MAAM,CAAC,IAAI,CACV,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,EAClF,QAAQ,CACR,CAAC;IACJ,CAAC;CACD;AAtDY;IAAX,UAAU;oCAAgC;AAC/B;IAAX,UAAU;qCAAoB;AAI/B;IADC,MAAM;wCAiDN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ToolBarProps } from "./state";
|
|
3
|
+
declare const ToolBar: {
|
|
4
|
+
(props: ToolBarProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
edit: boolean;
|
|
7
|
+
more: boolean;
|
|
8
|
+
shape: boolean;
|
|
9
|
+
size: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default ToolBar;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Button, Modal, Tooltip } from "@voplus/antd";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { State } from "./state";
|
|
4
|
+
import { faExpandAlt, faExternalLink, faPencilAlt, faPrint, faRedo, faTrashAlt } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import ContactMenu from "./ContactMenu";
|
|
6
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import styles from "./index.less";
|
|
8
|
+
import { useContact } from "../../data";
|
|
9
|
+
import { useLayout } from "@voplus/morpho-data";
|
|
10
|
+
import { useObserver } from "mobx-react-lite";
|
|
11
|
+
const ToolBar = (props) => {
|
|
12
|
+
const [state] = useState(new State());
|
|
13
|
+
const layout = useLayout();
|
|
14
|
+
const { id, path, url, expand, size, more, hoverEdit, hoverDel, reload, onEdit, onReLoad, onExpand } = props;
|
|
15
|
+
state.props = props;
|
|
16
|
+
state.contact = useContact(props.id);
|
|
17
|
+
// state.parentDoc = useContact(state.contact.parentId!);
|
|
18
|
+
return useObserver(() => (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement("div", { className: styles["tool-bar"] },
|
|
20
|
+
reload && (React.createElement(Tooltip, { title: "Reload" },
|
|
21
|
+
React.createElement(Button, { size: size, shape: "circle", onClick: onReLoad },
|
|
22
|
+
React.createElement(FAIcon, { icon: faRedo })))),
|
|
23
|
+
expand && (React.createElement(Tooltip, { title: "Expand" },
|
|
24
|
+
React.createElement(Button, { size: size, shape: "circle", onClick: () => onExpand() },
|
|
25
|
+
React.createElement(FAIcon, { icon: faExpandAlt })))),
|
|
26
|
+
url && (React.createElement(Tooltip, { title: "Open a new page" },
|
|
27
|
+
React.createElement(Button, { size: size, shape: "circle", onClick: () => layout.history.push(url) },
|
|
28
|
+
React.createElement(FAIcon, { icon: faExternalLink })))),
|
|
29
|
+
hoverEdit && (React.createElement(Tooltip, { title: "Edit" },
|
|
30
|
+
React.createElement(Button, { size: size, shape: "circle", onClick: () => onEdit() },
|
|
31
|
+
React.createElement(FAIcon, { icon: faPencilAlt })))),
|
|
32
|
+
hoverDel && (React.createElement(Button, { type: "danger", size: size, shape: "circle", onClick: onDelete, className: "del-btn" },
|
|
33
|
+
React.createElement(FAIcon, { icon: faTrashAlt }))),
|
|
34
|
+
path && (React.createElement(Tooltip, { title: "Print" },
|
|
35
|
+
React.createElement(Button, { size: size, shape: "circle", onClick: () => window.open(window.location.origin + `/${path}`, "_blank") },
|
|
36
|
+
React.createElement(FAIcon, { icon: faPrint })))),
|
|
37
|
+
more && React.createElement(ContactMenu, Object.assign({}, props, { del: state.del, move: state.move, paste: state.paste }))))));
|
|
38
|
+
function onDelete() {
|
|
39
|
+
Modal.confirm({
|
|
40
|
+
title: "Do you want to delete this item?",
|
|
41
|
+
onOk() {
|
|
42
|
+
return props.onDelete();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
ToolBar.defaultProps = {
|
|
48
|
+
edit: false,
|
|
49
|
+
more: true,
|
|
50
|
+
shape: true,
|
|
51
|
+
size: "small"
|
|
52
|
+
};
|
|
53
|
+
export default ToolBar;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/controls/ToolBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAC;AAC9C,OAAO,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,OAAO,EACP,MAAM,EACN,UAAU,EACV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,S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,IAAI,EAAE,OAAO;CACb,CAAC;AACF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.tool-bar {
|
|
2
|
+
:global {
|
|
3
|
+
.ant-btn {
|
|
4
|
+
margin-left: 5px;
|
|
5
|
+
}
|
|
6
|
+
.archive-btn {
|
|
7
|
+
background: #fff;
|
|
8
|
+
border-color: #faad14;
|
|
9
|
+
color: #faad14;
|
|
10
|
+
}
|
|
11
|
+
.archive-btn:active,
|
|
12
|
+
.archive-btn.active,
|
|
13
|
+
.archive-btn:hover {
|
|
14
|
+
background-color: #faad14;
|
|
15
|
+
color: #fff;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IContact } from "../../data";
|
|
2
|
+
export declare type ToolBarProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
includes?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
hoverEdit?: boolean;
|
|
8
|
+
hoverDel?: boolean;
|
|
9
|
+
hoverOpen?: boolean;
|
|
10
|
+
edit?: boolean;
|
|
11
|
+
more?: boolean;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
expand?: boolean;
|
|
14
|
+
url?: string;
|
|
15
|
+
shape?: boolean;
|
|
16
|
+
reload?: boolean;
|
|
17
|
+
size?: "middle" | "small" | "large";
|
|
18
|
+
deleteTitel?: string;
|
|
19
|
+
onEdit?: (params?: any) => void;
|
|
20
|
+
onDelete?: (params?: any) => void;
|
|
21
|
+
onMove?: () => void;
|
|
22
|
+
onPaste?: () => void;
|
|
23
|
+
onOpen?: () => void;
|
|
24
|
+
onLock?: () => void;
|
|
25
|
+
onUnlock?: () => void;
|
|
26
|
+
onReLoad?: () => void;
|
|
27
|
+
onExpand?: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare class State {
|
|
30
|
+
props: ToolBarProps;
|
|
31
|
+
contact: IContact;
|
|
32
|
+
parentDoc: IContact;
|
|
33
|
+
permissionVisible: boolean;
|
|
34
|
+
versionsModalVisible: boolean;
|
|
35
|
+
publishlock: boolean;
|
|
36
|
+
publishVisible: boolean;
|
|
37
|
+
get del(): boolean;
|
|
38
|
+
get move(): boolean;
|
|
39
|
+
get paste(): boolean;
|
|
40
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { computed, observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.permissionVisible = false;
|
|
6
|
+
this.versionsModalVisible = false;
|
|
7
|
+
this.publishlock = false;
|
|
8
|
+
this.publishVisible = false;
|
|
9
|
+
}
|
|
10
|
+
get del() {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
get move() {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
get paste() {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
observable
|
|
22
|
+
], State.prototype, "props", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
observable
|
|
25
|
+
], State.prototype, "contact", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
observable
|
|
28
|
+
], State.prototype, "parentDoc", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
observable
|
|
31
|
+
], State.prototype, "permissionVisible", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
observable
|
|
34
|
+
], State.prototype, "versionsModalVisible", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
observable
|
|
37
|
+
], State.prototype, "publishlock", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
observable
|
|
40
|
+
], State.prototype, "publishVisible", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
computed
|
|
43
|
+
], State.prototype, "del", null);
|
|
44
|
+
__decorate([
|
|
45
|
+
computed
|
|
46
|
+
], State.prototype, "move", null);
|
|
47
|
+
__decorate([
|
|
48
|
+
computed
|
|
49
|
+
], State.prototype, "paste", null);
|
|
50
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/controls/ToolBar/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAU,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAyCpD,MAAM,OAAO,KAAK;IAAlB;QAIoB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,yBAAoB,GAAG,KAAK,CAAC;QAC7B,gBAAW,GAAG,KAAK,CAAC;QACpB,mBAAc,GAAG,KAAK,CAAC;IAgB3C,CAAC;IAbA,IAAW,GAAG;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,IAAW,IAAI;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,IAAW,KAAK;QACf,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAtBY;IAAX,UAAU;oCAA4B;AAC3B;IAAX,UAAU;sCAA0B;AACzB;IAAX,UAAU;wCAA4B;AAC3B;IAAX,UAAU;gDAAkC;AACjC;IAAX,UAAU;mDAAqC;AACpC;IAAX,UAAU;0CAA4B;AAC3B;IAAX,UAAU;6CAA+B;AAG1C;IADC,QAAQ;gCAGR;AAGD;IADC,QAAQ;iCAGR;AAGD;IADC,QAAQ;kCAGR"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { State } from "./state";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
|
5
|
+
import { useObserver } from "mobx-react-lite";
|
|
6
|
+
const UnitTypeFilter = () => {
|
|
7
|
+
/** 引入父組件的 FilterOptionsContextState */
|
|
8
|
+
const context = useFilterOptionsContext();
|
|
9
|
+
/** 尝试从 context 取得 Type, 如果没有的话context会使用第二个factory参数创建一个State. */
|
|
10
|
+
const state = context.getFilterState("Type", () => new State());
|
|
11
|
+
return useObserver(() => (React.createElement("div", null,
|
|
12
|
+
React.createElement("div", { className: "menu-item-title" }, "Types"),
|
|
13
|
+
state.menus.map(item => (React.createElement("div", { key: item.value, className: classnames("filter-menu-item", {
|
|
14
|
+
bold: state.types.has(item.value)
|
|
15
|
+
}), onClick: () => state.changeType(item.value) },
|
|
16
|
+
React.createElement("div", { className: "filter-name" },
|
|
17
|
+
item.icon,
|
|
18
|
+
item.name)))))));
|
|
19
|
+
};
|
|
20
|
+
export default UnitTypeFilter;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/controls/UnitTypeFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,uCAAuC;IACvC,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,kEAAkE;IAClE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEhE,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB;QACC,6BAAK,SAAS,EAAC,iBAAiB,YAAY;QAC3C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACxB,6BACC,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aACjC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YAE3C,6BAAK,SAAS,EAAC,aAAa;gBAC1B,IAAI,CAAC,IAAI;gBACT,IAAI,CAAC,IAAI,CACL,CACD,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterOption } from "@voplus/morpho-data";
|
|
3
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data";
|
|
4
|
+
/** TypeFilter的 State, 实现 IFilterState 接口 */
|
|
5
|
+
export declare class State implements IFilterState {
|
|
6
|
+
/** Types of unit of filter */
|
|
7
|
+
types: Map<string, boolean>;
|
|
8
|
+
/** Alter unit type */
|
|
9
|
+
changeType(value: string): void;
|
|
10
|
+
get menus(): {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
icon: JSX.Element;
|
|
14
|
+
}[];
|
|
15
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
|
16
|
+
get filters(): FilterOption[];
|
|
17
|
+
reset(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, observable } from "mobx";
|
|
3
|
+
import { faSitemap, faUser, faUserCircle, faUsers } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import React from "react";
|
|
6
|
+
/** TypeFilter的 State, 实现 IFilterState 接口 */
|
|
7
|
+
export class State {
|
|
8
|
+
constructor() {
|
|
9
|
+
/** Types of unit of filter */
|
|
10
|
+
this.types = new Map();
|
|
11
|
+
}
|
|
12
|
+
/** Alter unit type */
|
|
13
|
+
changeType(value) {
|
|
14
|
+
this.types.has(value) ? this.types.delete(value) : this.types.set(value, true);
|
|
15
|
+
}
|
|
16
|
+
get menus() {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
name: "Account",
|
|
20
|
+
value: "Account",
|
|
21
|
+
icon: React.createElement(FAIcon, { icon: faUserCircle, color: "#fd7e14", className: "icon" })
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Organization",
|
|
25
|
+
value: "Organization",
|
|
26
|
+
icon: React.createElement(FAIcon, { icon: faSitemap, color: "#ff4d4f", className: "icon" })
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "User",
|
|
30
|
+
value: "User",
|
|
31
|
+
icon: React.createElement(FAIcon, { icon: faUser, color: "#ff4d4f", className: "icon" })
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "Team",
|
|
35
|
+
value: "Team",
|
|
36
|
+
icon: React.createElement(FAIcon, { icon: faUsers, color: "#ff4d4f", className: "icon" })
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
|
41
|
+
get filters() {
|
|
42
|
+
if (this.types.size === 0)
|
|
43
|
+
return [];
|
|
44
|
+
return [
|
|
45
|
+
{
|
|
46
|
+
c: "Type",
|
|
47
|
+
o: "contains",
|
|
48
|
+
v1: JSON.stringify(Array.from(this.types.keys())),
|
|
49
|
+
l: "And"
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
reset() {
|
|
54
|
+
this.types.clear();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
__decorate([
|
|
58
|
+
observable
|
|
59
|
+
], State.prototype, "types", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
action
|
|
62
|
+
], State.prototype, "changeType", null);
|
|
63
|
+
//# sourceMappingURL=state.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E,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,MAAM,GAAG;aAC/D;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,MAAM,GAAG;aAChE;SACD,CAAC;IACH,CAAC;IAED,6FAA6F;IAC7F,IAAW,OAAO;QACjB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACrC,OAAO;YACN;gBACC,CAAC,EAAE,MAAM;gBACT,CAAC,EAAE,UAAU;gBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;gBACjD,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CACD;AAjDY;IAAX,UAAU;oCAAgD;AAI3D;IADC,MAAM;uCAGN"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
+
import { CountedMap, LoadOptions, Store } from "@voplus/morpho-data";
|
|
3
|
+
import { FilterOption, PageParameters } from "@voplus/morpho-data/es/types";
|
|
4
|
+
import { IAddress, IContact } from "./interfaces";
|
|
5
|
+
import { IActivityLog } from "@voplus/morpho-collaboration/es/data/interfaces/IActivityLog";
|
|
6
|
+
/** Custom load contact list options type */
|
|
7
|
+
export declare type LoadContactListOptions = {
|
|
8
|
+
Includes?: string;
|
|
9
|
+
reload?: boolean;
|
|
10
|
+
/** Parent id of of the units to be loaded */
|
|
11
|
+
parent?: string;
|
|
12
|
+
Filters?: FilterOption[];
|
|
13
|
+
Page?: PageParameters;
|
|
14
|
+
};
|
|
15
|
+
/** Custom load contact options type */
|
|
16
|
+
export declare type LoadContactOptions = {
|
|
17
|
+
/** Comma separated include options e.g. path */
|
|
18
|
+
includes?: string;
|
|
19
|
+
} & LoadOptions<IContact>;
|
|
20
|
+
export declare type EditContactOptions = {
|
|
21
|
+
/** New name of the contact. */
|
|
22
|
+
Name?: string;
|
|
23
|
+
/** New Size of the contact. */
|
|
24
|
+
Size?: string;
|
|
25
|
+
/** New Gender of the contact. */
|
|
26
|
+
Gender?: "Male" | "Female";
|
|
27
|
+
/** New Email of the contact. */
|
|
28
|
+
Email?: string;
|
|
29
|
+
/** New Address of the contact. */
|
|
30
|
+
Address?: IAddress;
|
|
31
|
+
/** New Phone of the contact. */
|
|
32
|
+
Phone?: string;
|
|
33
|
+
/** New Nationality of the contact. */
|
|
34
|
+
Nationality?: string;
|
|
35
|
+
/** New Birthday of the contact. */
|
|
36
|
+
Birthday?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Custom load contact list options type. */
|
|
39
|
+
export declare type DeleteContactOptions = {
|
|
40
|
+
DeleteChilds?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export declare class ContactStore extends Store {
|
|
43
|
+
private readonly _api;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
/** Document created event dispatcher */
|
|
46
|
+
private readonly _documentCreated;
|
|
47
|
+
private readonly _documentDeleted;
|
|
48
|
+
readonly items: CountedMap<string, IContact>;
|
|
49
|
+
/** Create a default contact object with optional default values. */
|
|
50
|
+
static createDefaultContact(defaultValues?: Partial<IContact>): IContact;
|
|
51
|
+
constructor(_api: ApiEndPoint);
|
|
52
|
+
/** Create a new document base on type. */
|
|
53
|
+
createFromType(options: {
|
|
54
|
+
name: string;
|
|
55
|
+
parentId: string;
|
|
56
|
+
type: string;
|
|
57
|
+
}): Promise<IContact>;
|
|
58
|
+
/** Load a task from server.
|
|
59
|
+
* @param {string} id - id of the task.
|
|
60
|
+
* @param {LoadTaskOptions} options - Optional load options.
|
|
61
|
+
*/
|
|
62
|
+
load(id: string, options: LoadContactOptions): Promise<IContact>;
|
|
63
|
+
/** Refresh a loaded unit. */
|
|
64
|
+
refresh(id: string, options: LoadContactOptions): Promise<void>;
|
|
65
|
+
private _listCache;
|
|
66
|
+
/** Load a list of contacts from server.
|
|
67
|
+
* @param {LoadTaskListOptions}
|
|
68
|
+
*/
|
|
69
|
+
loadList(options?: LoadContactListOptions): Promise<any>;
|
|
70
|
+
/** Load a list of activities of a contact from server.
|
|
71
|
+
* @param id - id of the contact.
|
|
72
|
+
* @param {LoadContactListOptions}
|
|
73
|
+
*/
|
|
74
|
+
loadContactActivityList(id: string, options?: LoadContactListOptions): Promise<IActivityLog[]>;
|
|
75
|
+
/** Edit an existing item on server. */
|
|
76
|
+
edit(id: string, options: EditContactOptions): Promise<void>;
|
|
77
|
+
delete(id: string): Promise<IContact>;
|
|
78
|
+
moveAfter(id: string, afterId?: string): Promise<void>;
|
|
79
|
+
move(ids: string[], targetId?: string): Promise<any>;
|
|
80
|
+
}
|
|
81
|
+
/** React hook to retrieve ContactStore */
|
|
82
|
+
export declare const useContactStore: () => ContactStore;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { RequestBuilder } from "@voplus/api";
|
|
3
|
+
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
4
|
+
import { action, observable } from "mobx";
|
|
5
|
+
import { EventDispatcher } from "strongly-typed-events";
|
|
6
|
+
import hash from "object-hash";
|
|
7
|
+
import invariant from "invariant";
|
|
8
|
+
import { setTimeout } from "timers";
|
|
9
|
+
const StoreName = "ContactStore";
|
|
10
|
+
export class ContactStore extends Store {
|
|
11
|
+
constructor(_api) {
|
|
12
|
+
super();
|
|
13
|
+
this._api = _api;
|
|
14
|
+
this.name = StoreName;
|
|
15
|
+
/** Document created event dispatcher */
|
|
16
|
+
this._documentCreated = new EventDispatcher();
|
|
17
|
+
this._documentDeleted = new EventDispatcher();
|
|
18
|
+
this.items = new CountedMap((key) => ContactStore.createDefaultContact({ id: key }), observable.map([], { deep: true }));
|
|
19
|
+
this._listCache = new Map();
|
|
20
|
+
invariant(_api, `API cannot be ${_api}.`);
|
|
21
|
+
}
|
|
22
|
+
/** Create a default contact object with optional default values. */
|
|
23
|
+
static createDefaultContact(defaultValues) {
|
|
24
|
+
const v = { loaded: false, address: {}, primaryLegalIdentity: {} };
|
|
25
|
+
if (defaultValues)
|
|
26
|
+
Object.assign(v, defaultValues);
|
|
27
|
+
return v;
|
|
28
|
+
}
|
|
29
|
+
/** Create a new document base on type. */
|
|
30
|
+
async createFromType(options) {
|
|
31
|
+
invariant(options.name, "Name cannot be empty.");
|
|
32
|
+
const r = await this._api.post(`api/groups/create`, new RequestBuilder().form(options));
|
|
33
|
+
const t = (await r.json());
|
|
34
|
+
this._documentCreated.dispatch(this, t);
|
|
35
|
+
console.log("createFromType", t);
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
/** Load a task from server.
|
|
39
|
+
* @param {string} id - id of the task.
|
|
40
|
+
* @param {LoadTaskOptions} options - Optional load options.
|
|
41
|
+
*/
|
|
42
|
+
async load(id, options) {
|
|
43
|
+
let query = "";
|
|
44
|
+
if (options.includes)
|
|
45
|
+
query = query.concat(`includes=${options.includes}`);
|
|
46
|
+
if (query)
|
|
47
|
+
query = "?".concat(query);
|
|
48
|
+
const r = await this._api.get(`/units/${id}${query}`);
|
|
49
|
+
return (await r.json());
|
|
50
|
+
}
|
|
51
|
+
/** Refresh a loaded unit. */
|
|
52
|
+
async refresh(id, options) {
|
|
53
|
+
if (!this.items.has(id))
|
|
54
|
+
return;
|
|
55
|
+
const c = await this.load(id, options);
|
|
56
|
+
this.items.overwrite(id, c);
|
|
57
|
+
}
|
|
58
|
+
/** Load a list of contacts from server.
|
|
59
|
+
* @param {LoadTaskListOptions}
|
|
60
|
+
*/
|
|
61
|
+
async loadList(options) {
|
|
62
|
+
options = options !== null && options !== void 0 ? options : { Filters: [] };
|
|
63
|
+
// const reload = options.reload;
|
|
64
|
+
delete options["reload"];
|
|
65
|
+
// Calculate hash code for load options.
|
|
66
|
+
const hc = hash(options);
|
|
67
|
+
// load from server if not cached
|
|
68
|
+
if (!this._listCache.has(hc)) {
|
|
69
|
+
const urlPostFix = options.parent ? `/${options.parent}/units` : "";
|
|
70
|
+
const r = await this._api.post(`/units${urlPostFix}`, new RequestBuilder().json(options));
|
|
71
|
+
const result = await r.json();
|
|
72
|
+
// Save cache and clear time out.
|
|
73
|
+
this._listCache.set(hc, result);
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
this._listCache.delete(hc);
|
|
76
|
+
}, 5 * 60 * 1000);
|
|
77
|
+
}
|
|
78
|
+
return this._listCache.get(hc);
|
|
79
|
+
}
|
|
80
|
+
/** Load a list of activities of a contact from server.
|
|
81
|
+
* @param id - id of the contact.
|
|
82
|
+
* @param {LoadContactListOptions}
|
|
83
|
+
*/
|
|
84
|
+
async loadContactActivityList(id, options) {
|
|
85
|
+
invariant(id, "id cannot be empty");
|
|
86
|
+
let query = "";
|
|
87
|
+
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
88
|
+
query = query.concat(`includes=${options.Includes}`);
|
|
89
|
+
}
|
|
90
|
+
if (query)
|
|
91
|
+
query = "?".concat(query);
|
|
92
|
+
const r = await this._api.post(`/units/${id}/activities${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
93
|
+
return (await r.json());
|
|
94
|
+
}
|
|
95
|
+
/** Edit an existing item on server. */
|
|
96
|
+
async edit(id, options) {
|
|
97
|
+
const r = await this._api.post(`api/units/${id}/info`, new RequestBuilder().json(options));
|
|
98
|
+
const t = await r.json();
|
|
99
|
+
this.items.overwrite(t.id, t);
|
|
100
|
+
}
|
|
101
|
+
async delete(id) {
|
|
102
|
+
await this._api.delete(`api/groups/${id}`);
|
|
103
|
+
const item = this.items.peek(id);
|
|
104
|
+
this._documentDeleted.dispatch(this, item);
|
|
105
|
+
return item;
|
|
106
|
+
}
|
|
107
|
+
async moveAfter(id, afterId) {
|
|
108
|
+
await this._api.post(`api/units/${id}/move?afterId=${afterId}`);
|
|
109
|
+
}
|
|
110
|
+
async move(ids, targetId) {
|
|
111
|
+
const result = await this._api.post(`api/units/move`, new RequestBuilder().json({ Ids: ids, TargetId: targetId }));
|
|
112
|
+
const moved = await result.json();
|
|
113
|
+
for (const item of moved) {
|
|
114
|
+
this._documentCreated.dispatch(this, item);
|
|
115
|
+
}
|
|
116
|
+
this._documentDeleted.dispatch(this, moved);
|
|
117
|
+
return moved;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
__decorate([
|
|
121
|
+
observable
|
|
122
|
+
], ContactStore.prototype, "items", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
action
|
|
125
|
+
], ContactStore.prototype, "delete", null);
|
|
126
|
+
__decorate([
|
|
127
|
+
action
|
|
128
|
+
], ContactStore.prototype, "moveAfter", null);
|
|
129
|
+
__decorate([
|
|
130
|
+
action
|
|
131
|
+
], ContactStore.prototype, "move", null);
|
|
132
|
+
/** React hook to retrieve ContactStore */
|
|
133
|
+
export const useContactStore = () => {
|
|
134
|
+
const context = useApplicationContext();
|
|
135
|
+
if (!context.getStore(StoreName)) {
|
|
136
|
+
context.addStore(new ContactStore(context.api.currentEndPoint));
|
|
137
|
+
}
|
|
138
|
+
return context.getStore(StoreName);
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=ContactStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactStore.js","sourceRoot":"","sources":["../../../../src/modules/unit/data/ContactStore.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,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;A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