@voplus/morpho-document 1.4.53 → 1.4.54
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/es/components/ActivitiesPrintView/index.d.ts +1 -1
- package/es/components/ActivitiesPrintView/index.js +2 -2
- package/es/components/ActivitiesPrintView/index.js.map +1 -1
- package/es/components/{BreadCrumbsHeader → DocumentBreadCrumbsHeader}/index.d.ts +2 -2
- package/es/components/DocumentBreadCrumbsHeader/index.js +11 -0
- package/es/components/DocumentBreadCrumbsHeader/index.js.map +1 -0
- package/es/components/DocumentList/state.js +1 -1
- package/es/components/DocumentList/state.js.map +1 -1
- package/es/components/DocumentListView/index.js +2 -2
- package/es/components/DocumentListView/index.js.map +1 -1
- package/es/components/DocumentSelectDialog/index.js +1 -1
- package/es/components/DocumentSelectDialog/index.js.map +1 -1
- package/es/components/DocumentSortableTree/index.js +10 -7
- package/es/components/DocumentSortableTree/index.js.map +1 -1
- package/es/components/DocumentSortableTree/index.less +3 -0
- package/es/components/DocumentSortableTree/state.d.ts +2 -0
- package/es/components/DocumentSortableTree/state.js.map +1 -1
- package/es/components/DocumentTabs/index.js +1 -1
- package/es/components/DocumentTabs/index.js.map +1 -1
- package/es/components/Links/index.less +111 -111
- package/es/components/QuickViewDialog/QuickSubTab/index.js +1 -1
- package/es/components/QuickViewDialog/QuickSubTab/index.js.map +1 -1
- package/es/components/ViewFrame/ViewFrameHeader/index.js +2 -2
- package/es/components/ViewFrame/ViewFrameHeader/index.js.map +1 -1
- package/es/controls/MentionState/index.d.ts +1 -1
- package/es/controls/MentionState/state.d.ts +1 -1
- package/es/controls/MentionState/state.js.map +1 -1
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/mobile/index.js +1 -1
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/mobile/index.js.map +1 -1
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/pc/index.js +1 -1
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/pc/index.js.map +1 -1
- package/es/pages/Signature/Envelope/EnvelopeReport/index.js +1 -1
- package/es/pages/Signature/Envelope/EnvelopeReport/index.js.map +1 -1
- package/es/pages/Signature/Envelope/components/EnvelopeQuickView/index.js +1 -1
- package/es/pages/Signature/Envelope/components/EnvelopeQuickView/index.js.map +1 -1
- package/es/pages/TreeViewPage/index.js +2 -2
- package/es/pages/TreeViewPage/index.js.map +1 -1
- package/es/services/MentionViewer/index.js +1 -1
- package/es/services/MentionViewer/index.js.map +1 -1
- package/package.json +1 -1
- package/es/components/ActivityLog/ActivityActionFilter.d.ts +0 -3
- package/es/components/ActivityLog/ActivityActionFilter.js +0 -24
- package/es/components/ActivityLog/ActivityActionFilter.js.map +0 -1
- package/es/components/ActivityLog/ActivityLog2/index.d.ts +0 -23
- package/es/components/ActivityLog/ActivityLog2/index.js +0 -54
- package/es/components/ActivityLog/ActivityLog2/index.js.map +0 -1
- package/es/components/ActivityLog/ActivityLog2/index.less +0 -213
- package/es/components/ActivityLog/CommentBar.d.ts +0 -5
- package/es/components/ActivityLog/CommentBar.js +0 -125
- package/es/components/ActivityLog/CommentBar.js.map +0 -1
- package/es/components/ActivityLog/state.d.ts +0 -28
- package/es/components/ActivityLog/state.js +0 -128
- package/es/components/ActivityLog/state.js.map +0 -1
- package/es/components/BreadCrumbsHeader/index.js +0 -39
- package/es/components/BreadCrumbsHeader/index.js.map +0 -1
- package/es/components/BreadCrumbsHeader/index.less +0 -39
- package/es/data/ActivityStore/ActivityStore.d.ts +0 -26
- package/es/data/ActivityStore/ActivityStore.js +0 -68
- package/es/data/ActivityStore/ActivityStore.js.map +0 -1
- package/es/data/ActivityStore/hook.d.ts +0 -9
- package/es/data/ActivityStore/hook.js +0 -19
- package/es/data/ActivityStore/hook.js.map +0 -1
- package/es/data/ActivityStore/index.d.ts +0 -4
- package/es/data/ActivityStore/index.js +0 -5
- package/es/data/ActivityStore/index.js.map +0 -1
- package/es/data/ActivityStore/interfaces.d.ts +0 -51
- package/es/data/ActivityStore/interfaces.js +0 -2
- package/es/data/ActivityStore/interfaces.js.map +0 -1
- package/es/data/ActivityStore/types.d.ts +0 -7
- package/es/data/ActivityStore/types.js +0 -2
- package/es/data/ActivityStore/types.js.map +0 -1
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { Button, Checkbox, Dropdown, Menu, Modal, Popover, Space } from "@voplus/antd";
|
|
2
|
-
import { useActivityStore } from "../../data/ActivityStore";
|
|
3
|
-
import React, { useRef, useState } from "react";
|
|
4
|
-
import { faComment, faEye, faPaperPlane, faTimes, faUserFriends, faUserShield, faUsers, } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
-
import { DownOutlined } from "@ant-design/icons";
|
|
6
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import ProseMirror from "@voplus/morpho-text/es/controls/ProseMirror";
|
|
8
|
-
import { State } from "./state";
|
|
9
|
-
import classnames from "classnames";
|
|
10
|
-
import { observe } from "@voplus/morpho-ui";
|
|
11
|
-
import { runInAction } from "mobx";
|
|
12
|
-
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
13
|
-
import { useFileStore } from "@voplus/morpho-text/es/data";
|
|
14
|
-
import { useListDataContext } from "@voplus/morpho-ui/es/data";
|
|
15
|
-
const CommentBar = (props) => {
|
|
16
|
-
const { id } = props;
|
|
17
|
-
const element = useRef(null);
|
|
18
|
-
const [state] = useState(new State());
|
|
19
|
-
const store = useActivityStore();
|
|
20
|
-
const docStore = useDocumentStore();
|
|
21
|
-
const storeFile = useFileStore();
|
|
22
|
-
const context = useListDataContext();
|
|
23
|
-
return observe(() => (React.createElement(React.Fragment, null,
|
|
24
|
-
state.floating && (React.createElement("div", { className: "comment-bar-placeholder", onClick: () => state.showEditor(element.current) },
|
|
25
|
-
React.createElement(FAIcon, { icon: faComment }),
|
|
26
|
-
" Add a comment")),
|
|
27
|
-
React.createElement("div", { className: classnames("comment-bar", {
|
|
28
|
-
show: !state.floating,
|
|
29
|
-
warn: state.visibility === "Public",
|
|
30
|
-
}), ref: element },
|
|
31
|
-
React.createElement(ProseMirror, { className: "comment-prosemirror", toolbarProps: {
|
|
32
|
-
sticky: false,
|
|
33
|
-
defaultButtonProps: { UploadImage: { onUploadImage: onUploadImage } },
|
|
34
|
-
}, scroll: true, defaultHtml: state.defaultHtml, readonly: state.floating, onChange: (opt) => runInAction(() => (state.comment =
|
|
35
|
-
opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML)), ...Object.assign({
|
|
36
|
-
onUploadImage: onUploadImage,
|
|
37
|
-
}) }),
|
|
38
|
-
React.createElement("div", { className: "comment-bar-send" },
|
|
39
|
-
React.createElement(Space, { className: "bar-button" },
|
|
40
|
-
React.createElement(Dropdown, { overlay: React.createElement(Menu, { onClick: ({ key }) => runInAction(() => (state.visibility = key)) },
|
|
41
|
-
React.createElement(Menu.Item, { key: "Internal" },
|
|
42
|
-
React.createElement(Popover, { zIndex: 10000, content: "Everyone\u00A0in\u00A0the\u00A0organization\u00A0can\u00A0see\u00A0the\u00A0comment." },
|
|
43
|
-
React.createElement(FAIcon, { icon: faUserFriends }),
|
|
44
|
-
"Internal")),
|
|
45
|
-
React.createElement(Menu.Item, { key: "Private" },
|
|
46
|
-
React.createElement(Popover, { zIndex: 10000, content: "Mentioned people can see the comment." },
|
|
47
|
-
React.createElement(FAIcon, { icon: faUserShield }),
|
|
48
|
-
"Private")),
|
|
49
|
-
React.createElement(Menu.Item, { key: "Public" },
|
|
50
|
-
React.createElement(Popover, { zIndex: 10000, content: "Everyone including external can see the comment." },
|
|
51
|
-
React.createElement(FAIcon, { icon: faUsers }),
|
|
52
|
-
"Public"))), className: "bar-visibility", overlayClassName: "bar-visibility-overlay" },
|
|
53
|
-
React.createElement(Button, { type: "default", disabled: true },
|
|
54
|
-
React.createElement(FAIcon, { icon: faEye }),
|
|
55
|
-
state.visibility,
|
|
56
|
-
React.createElement(DownOutlined, null))),
|
|
57
|
-
React.createElement(Checkbox, { className: "acknowledgement-checked", disabled: true, checked: state.acknowledgement, onClick: (e) => e.stopPropagation(), onChange: (e) => runInAction(() => (state.acknowledgement = e.target.checked)) }, "Acknowledgement")),
|
|
58
|
-
React.createElement(Space, { className: "bar-button" },
|
|
59
|
-
React.createElement(Button, { type: "default", onClick: () => runInAction(() => (state.floating = true)) },
|
|
60
|
-
React.createElement(FAIcon, { icon: faTimes, style: { marginRight: "0.5rem" } }),
|
|
61
|
-
"Close"),
|
|
62
|
-
React.createElement(Button, { type: "primary", disabled: !state.comment.length, onClick: onComment, loading: state.loading },
|
|
63
|
-
React.createElement(FAIcon, { icon: faPaperPlane, style: { marginRight: "0.5rem" } }),
|
|
64
|
-
"Comment")))))));
|
|
65
|
-
function onComment() {
|
|
66
|
-
if (state.visibility === "Public") {
|
|
67
|
-
Modal.confirm({
|
|
68
|
-
title: "Are you sure Everyone including external can see the comment?",
|
|
69
|
-
onOk() {
|
|
70
|
-
return onSend();
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
onSend();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/** send comment */
|
|
79
|
-
async function onSend() {
|
|
80
|
-
runInAction(() => {
|
|
81
|
-
state.loading = true;
|
|
82
|
-
state.defaultHtml = state.comment;
|
|
83
|
-
});
|
|
84
|
-
await store
|
|
85
|
-
.comment(id, {
|
|
86
|
-
data: {
|
|
87
|
-
Comment: state.comment,
|
|
88
|
-
Acknowledgement: state.acknowledgement,
|
|
89
|
-
Visibility: state.visibility,
|
|
90
|
-
},
|
|
91
|
-
error: "message",
|
|
92
|
-
})
|
|
93
|
-
.then((res) => {
|
|
94
|
-
runInAction(() => {
|
|
95
|
-
state.comment = "";
|
|
96
|
-
state.defaultHtml = "";
|
|
97
|
-
state.loading = false;
|
|
98
|
-
state.visibility = "Internal";
|
|
99
|
-
state.acknowledgement = false;
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
/** reload latest ActivityLog */
|
|
103
|
-
await store.loadList(context.filters.options).then((r) => {
|
|
104
|
-
runInAction(() => {
|
|
105
|
-
state.hideEditor();
|
|
106
|
-
/** clear old ActivityLog */
|
|
107
|
-
context.clear();
|
|
108
|
-
/** union latest ActivityLog */
|
|
109
|
-
context.union(r);
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/** 上传图片 */
|
|
114
|
-
async function onUploadImage(state, files) {
|
|
115
|
-
const file = await docStore.upload(props.id, files);
|
|
116
|
-
return await storeFile.download(file[0].id).then((blob) => {
|
|
117
|
-
if (blob) {
|
|
118
|
-
return { id: file[0].id, url: URL.createObjectURL(blob) };
|
|
119
|
-
}
|
|
120
|
-
return {};
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
export default CommentBar;
|
|
125
|
-
//# sourceMappingURL=CommentBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommentBar.js","sourceRoot":"","sources":["../../../src/components/ActivityLog/CommentBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAqB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EACN,SAAS,EACT,KAAK,EACL,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,OAAO,GACP,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,WAAW,MAAM,6CAA6C,CAAC;AAEtE,OAAO,EAAE,KAAK,EAAE,MAAM,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CAAC,GAAG,EAAE;gBAChB,KAAK,CAAC,UAAU,EAAE,CAAC;gBACnB,6BAA6B;gBAC7B,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,gCAAgC;gBAChC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,WAAW;IACX,KAAK,UAAU,aAAa,CAAC,KAAuB,EAAE,KAAa;QAClE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpD,OAAO,MAAM,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAU,EAAE,EAAE;YAC/D,IAAI,IAAI,EAAE;gBACT,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;aAC1D;YACD,OAAO,EAAE,CAAC;QACX,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AACF,eAAe,UAAU,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CommentVisibility } from "../../data/ActivityStore";
|
|
2
|
-
import { FilterOption } from "@voplus/morpho-data";
|
|
3
|
-
import { IFilterState } from "@voplus/morpho-ui/es/data";
|
|
4
|
-
export declare class State implements IFilterState {
|
|
5
|
-
page: number;
|
|
6
|
-
/** loading of save comment */
|
|
7
|
-
loading: boolean;
|
|
8
|
-
/** targetObjects, source, target */
|
|
9
|
-
/** Visible of quickView */
|
|
10
|
-
/** comment */
|
|
11
|
-
comment: string;
|
|
12
|
-
/** comment 的默认值 */
|
|
13
|
-
defaultHtml: string;
|
|
14
|
-
/** floating ? 显示'Add a new comment' Button : ProseMirror */
|
|
15
|
-
floating: boolean;
|
|
16
|
-
/** */
|
|
17
|
-
activityActions: Map<string, boolean>;
|
|
18
|
-
/** comment visibility */
|
|
19
|
-
visibility: CommentVisibility;
|
|
20
|
-
/** Require Acknowledgement */
|
|
21
|
-
acknowledgement: boolean;
|
|
22
|
-
constructor();
|
|
23
|
-
changeAction(value: string): void;
|
|
24
|
-
showEditor(element: HTMLDivElement | null): void;
|
|
25
|
-
hideEditor(): void;
|
|
26
|
-
get filters(): FilterOption[];
|
|
27
|
-
reset(): void;
|
|
28
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { action, makeObservable, observable } from "mobx";
|
|
3
|
-
export class State {
|
|
4
|
-
constructor() {
|
|
5
|
-
Object.defineProperty(this, "page", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true,
|
|
9
|
-
value: 1
|
|
10
|
-
});
|
|
11
|
-
/** loading of save comment */
|
|
12
|
-
Object.defineProperty(this, "loading", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: false
|
|
17
|
-
});
|
|
18
|
-
/** targetObjects, source, target */
|
|
19
|
-
// @observable public docObject: IDocument;
|
|
20
|
-
/** Visible of quickView */
|
|
21
|
-
// @observable public quickViewVisible = false;
|
|
22
|
-
/** comment */
|
|
23
|
-
Object.defineProperty(this, "comment", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: ""
|
|
28
|
-
});
|
|
29
|
-
/** comment 的默认值 */
|
|
30
|
-
Object.defineProperty(this, "defaultHtml", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true,
|
|
34
|
-
value: ""
|
|
35
|
-
});
|
|
36
|
-
/** floating ? 显示'Add a new comment' Button : ProseMirror */
|
|
37
|
-
Object.defineProperty(this, "floating", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: true
|
|
42
|
-
});
|
|
43
|
-
/** */
|
|
44
|
-
Object.defineProperty(this, "activityActions", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
configurable: true,
|
|
47
|
-
writable: true,
|
|
48
|
-
value: new Map()
|
|
49
|
-
});
|
|
50
|
-
/** comment visibility */
|
|
51
|
-
Object.defineProperty(this, "visibility", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: "Internal"
|
|
56
|
-
});
|
|
57
|
-
/** Require Acknowledgement */
|
|
58
|
-
Object.defineProperty(this, "acknowledgement", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
value: false
|
|
63
|
-
});
|
|
64
|
-
makeObservable(this);
|
|
65
|
-
}
|
|
66
|
-
changeAction(value) {
|
|
67
|
-
this.activityActions.has(value)
|
|
68
|
-
? this.activityActions.delete(value)
|
|
69
|
-
: this.activityActions.set(value, true);
|
|
70
|
-
}
|
|
71
|
-
showEditor(element) {
|
|
72
|
-
var _a;
|
|
73
|
-
this.floating = false;
|
|
74
|
-
if (element) {
|
|
75
|
-
(_a = element.querySelector(".ProseMirror")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
hideEditor() {
|
|
79
|
-
this.floating = true;
|
|
80
|
-
}
|
|
81
|
-
get filters() {
|
|
82
|
-
return [
|
|
83
|
-
{
|
|
84
|
-
c: "Action",
|
|
85
|
-
o: "contains",
|
|
86
|
-
v1: JSON.stringify(Array.from(this.activityActions.keys())),
|
|
87
|
-
l: "And",
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
reset() {
|
|
92
|
-
this.activityActions.clear();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
__decorate([
|
|
96
|
-
observable
|
|
97
|
-
], State.prototype, "page", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
observable
|
|
100
|
-
], State.prototype, "loading", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
observable
|
|
103
|
-
], State.prototype, "comment", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
observable
|
|
106
|
-
], State.prototype, "defaultHtml", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
observable
|
|
109
|
-
], State.prototype, "floating", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
observable
|
|
112
|
-
], State.prototype, "activityActions", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
observable
|
|
115
|
-
], State.prototype, "visibility", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
observable
|
|
118
|
-
], State.prototype, "acknowledgement", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
action
|
|
121
|
-
], State.prototype, "changeAction", null);
|
|
122
|
-
__decorate([
|
|
123
|
-
action
|
|
124
|
-
], State.prototype, "showEditor", null);
|
|
125
|
-
__decorate([
|
|
126
|
-
action
|
|
127
|
-
], State.prototype, "hideEditor", null);
|
|
128
|
-
//# sourceMappingURL=state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/ActivityLog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAM1D,MAAM,OAAO,KAAK;IAqBjB;QApBY;;;;mBAAO,CAAC;WAAC;QACrB,8BAA8B;QAClB;;;;mBAAU,KAAK;WAAC;QAC5B,oCAAoC;QACpC,2CAA2C;QAC3C,2BAA2B;QAC3B,+CAA+C;QAC/C,cAAc;QACF;;;;mBAAiB,EAAE;WAAC;QAChC,mBAAmB;QACP;;;;mBAAqB,EAAE;WAAC;QACpC,4DAA4D;QAChD;;;;mBAAkB,IAAI;WAAC;QACnC,MAA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ADC,MAAM;yCAKN;AAGD;IADC,MAAM;uCAMN;AAGD;IADC,MAAM;uCAGN"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Breadcrumb, Button, Popover } from "@voplus/antd";
|
|
2
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { faLayerGroup } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
-
import { observe } from "@voplus/morpho-ui";
|
|
6
|
-
import styles from "./index.less";
|
|
7
|
-
import { useDocument } from "@voplus/morpho-document-core";
|
|
8
|
-
import { useLayout } from "@voplus/morpho-data";
|
|
9
|
-
const BreadCrumbsHeader = (props) => {
|
|
10
|
-
const { id } = props;
|
|
11
|
-
const layout = useLayout();
|
|
12
|
-
const doc = useDocument(id, { reload: (i) => !i.path, includes: "path" });
|
|
13
|
-
const subStrName = (name) => {
|
|
14
|
-
return doc.path && doc.path.length > 4 && name.length > 30 ? name.substr(0, 20) + "..." : name;
|
|
15
|
-
};
|
|
16
|
-
const content = observe(() => {
|
|
17
|
-
var _a;
|
|
18
|
-
return (React.createElement("div", { className: styles["breadcrumb-popover-content"] }, (_a = doc.path) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement("div", { key: item.id, className: "path-item", onClick: () => toPath(item.id) }, item.name)))));
|
|
19
|
-
});
|
|
20
|
-
return observe(() => {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
return (React.createElement("div", { className: styles["breadcrumb-container"] }, layout.ui.mobile ? (React.createElement(Breadcrumb, { separator: ">" }, ((_a = doc.path) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(Breadcrumb.Item, { key: doc.path[doc.path.length - 1].id },
|
|
23
|
-
React.createElement(Popover, { placement: "bottomLeft", content: content, title: "Paths", trigger: "click" },
|
|
24
|
-
React.createElement(Button, { className: "tooltip-btn" },
|
|
25
|
-
React.createElement(FAIcon, { icon: faLayerGroup }))))) : (React.createElement(Breadcrumb.Item, { key: 0 },
|
|
26
|
-
React.createElement(Button, { className: "tooltip-btn" },
|
|
27
|
-
React.createElement(FAIcon, { icon: faLayerGroup })))))) : (React.createElement(Breadcrumb, { separator: ">" },
|
|
28
|
-
((_b = doc.path) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(Breadcrumb.Item, { key: doc.path[doc.path.length - 1].id, onClick: () => { var _a; return ((_a = doc.path) === null || _a === void 0 ? void 0 : _a.length) === 1 && toPath(doc.path[doc.path.length - 1].id); } }, doc.path.length > 1 ? (React.createElement(Popover, { placement: "bottomLeft", content: content, title: "Paths" },
|
|
29
|
-
React.createElement("span", null, subStrName(doc.path[doc.path.length - 1].name)))) : (React.createElement("span", null, subStrName(doc.path[doc.path.length - 1].name))))) : null,
|
|
30
|
-
React.createElement(Breadcrumb.Item, { key: doc.id },
|
|
31
|
-
React.createElement("span", { className: "breadcrumb-active" }, subStrName(doc.name)))))));
|
|
32
|
-
});
|
|
33
|
-
function toPath(id) {
|
|
34
|
-
var _a;
|
|
35
|
-
(_a = props.onBreadCrumb) === null || _a === void 0 ? void 0 : _a.call(props, id);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export default BreadCrumbsHeader;
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BreadCrumbsHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE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C,OAAO,IAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,OAAO;gBAC9D,kCAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAQ,CACpD,CACV,CAAC,CAAC,CAAC,CACH,kCAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAQ,CAC7D,CACgB,CAClB,CAAC,CAAC,CAAC,IAAI;YACR,oBAAC,UAAU,CAAC,IAAI,IAAC,GAAG,EAAE,GAAG,CAAC,EAAE;gBAC3B,8BAAM,SAAS,EAAE,mBAAmB,IAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAQ,CAClD,CACN,CACb,CACI,CACN,CAAA;KAAA,CAAC,CAAC;IACH,SAAS,MAAM,CAAC,EAAU;;QACzB,MAAA,KAAK,CAAC,YAAY,+CAAlB,KAAK,EAAgB,EAAE,CAAC,CAAC;IAC1B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
@import "../../components/styles/common.less";
|
|
2
|
-
.breadcrumb-container {
|
|
3
|
-
flex: 1;
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
:global {
|
|
6
|
-
.breadcrumb-active {
|
|
7
|
-
color: @primary-color;
|
|
8
|
-
}
|
|
9
|
-
.tooltip-btn {
|
|
10
|
-
width: 32px;
|
|
11
|
-
height: 32px;
|
|
12
|
-
padding: 2.4px 0;
|
|
13
|
-
font-size: 16px;
|
|
14
|
-
color: black;
|
|
15
|
-
border: none;
|
|
16
|
-
box-shadow: none;
|
|
17
|
-
&[ant-click-animating-without-extra-node]:after {
|
|
18
|
-
border: 0 none;
|
|
19
|
-
opacity: 0;
|
|
20
|
-
animation: none 0 ease 0 1 normal;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.breadcrumb-popover-content {
|
|
26
|
-
:global {
|
|
27
|
-
.path-item {
|
|
28
|
-
color: #00000073;
|
|
29
|
-
padding: 6px 0;
|
|
30
|
-
&:hover {
|
|
31
|
-
color: #000;
|
|
32
|
-
}
|
|
33
|
-
&.active {
|
|
34
|
-
color: @primary-color;
|
|
35
|
-
}
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
-
import { CountedMap, Store, StoreActionOptions } from "@voplus/morpho-data";
|
|
3
|
-
import { IActivityLog, LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
4
|
-
import { IRecipientsStatus, LoadActivityOptions } from ".";
|
|
5
|
-
export declare type CommentVisibility = "Public" | "Internal" | "Private";
|
|
6
|
-
/** Corporate store supply backend functions. */
|
|
7
|
-
export declare class ActivityStore extends Store {
|
|
8
|
-
readonly endpoint: ApiEndPoint;
|
|
9
|
-
/** Name of the store */
|
|
10
|
-
readonly name: string;
|
|
11
|
-
constructor(endpoint: ApiEndPoint);
|
|
12
|
-
/** All currently used activity. */
|
|
13
|
-
readonly items: CountedMap<string, IActivityLog>;
|
|
14
|
-
loadList(options?: LoadDocumentListOptions): Promise<IActivityLog[]>;
|
|
15
|
-
load(id: string, options: LoadActivityOptions): Promise<IActivityLog>;
|
|
16
|
-
comment(id: string, options: {
|
|
17
|
-
data: {
|
|
18
|
-
Comment: string;
|
|
19
|
-
Acknowledgement?: boolean;
|
|
20
|
-
Visibility: CommentVisibility;
|
|
21
|
-
};
|
|
22
|
-
} & StoreActionOptions): Promise<IActivityLog>;
|
|
23
|
-
recipientsStatus(activityId: string, unitId: string): Promise<IRecipientsStatus[]>;
|
|
24
|
-
}
|
|
25
|
-
/** 响应钩子检索 ActivityStore */
|
|
26
|
-
export declare const useActivityStore: () => ActivityStore;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { RequestBuilder } from "@voplus/api";
|
|
2
|
-
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
3
|
-
import { observable } from "mobx";
|
|
4
|
-
const StoreName = "ActivityStore";
|
|
5
|
-
/** Corporate store supply backend functions. */
|
|
6
|
-
export class ActivityStore extends Store {
|
|
7
|
-
constructor(endpoint) {
|
|
8
|
-
super();
|
|
9
|
-
Object.defineProperty(this, "endpoint", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: endpoint
|
|
14
|
-
});
|
|
15
|
-
/** Name of the store */
|
|
16
|
-
Object.defineProperty(this, "name", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: StoreName
|
|
21
|
-
});
|
|
22
|
-
/** All currently used activity. */
|
|
23
|
-
Object.defineProperty(this, "items", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
async loadList(options) {
|
|
31
|
-
let query = "";
|
|
32
|
-
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
33
|
-
query = query.concat(`includes=${options.Includes}`);
|
|
34
|
-
}
|
|
35
|
-
if (query)
|
|
36
|
-
query = "?".concat(query);
|
|
37
|
-
const r = await this.endpoint.post(`/api/activities${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
38
|
-
return (await r.json());
|
|
39
|
-
}
|
|
40
|
-
async load(id, options) {
|
|
41
|
-
let query = "";
|
|
42
|
-
if (options.includes)
|
|
43
|
-
query = query.concat(`includes=${options.includes}`);
|
|
44
|
-
if (query)
|
|
45
|
-
query = "?".concat(query);
|
|
46
|
-
const r = await this.endpoint.get(`/api/activities/${id}${query}`);
|
|
47
|
-
return (await r.json());
|
|
48
|
-
}
|
|
49
|
-
async comment(id, options) {
|
|
50
|
-
return this.action(async () => {
|
|
51
|
-
const r = await this.endpoint.post(`/api/activities/${id}/comment`, new RequestBuilder().json(options.data));
|
|
52
|
-
return (await r.json());
|
|
53
|
-
}, options);
|
|
54
|
-
}
|
|
55
|
-
async recipientsStatus(activityId, unitId) {
|
|
56
|
-
const r = await this.endpoint.get(`/api/activities/${activityId}/recipients-status?uid=${unitId}`);
|
|
57
|
-
return (await r.json());
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/** 响应钩子检索 ActivityStore */
|
|
61
|
-
export const useActivityStore = () => {
|
|
62
|
-
const context = useApplicationContext();
|
|
63
|
-
if (!context.getService(StoreName)) {
|
|
64
|
-
context.registerService(new ActivityStore(context.api.currentEndPoint));
|
|
65
|
-
}
|
|
66
|
-
return context.getService(StoreName);
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=ActivityStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityStore.js","sourceRoot":"","sources":["../../../src/data/ActivityStore/ActivityStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAsB,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAInG,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,SAAS,GAAG,eAAe,CAAC;AAIlC,gDAAgD;AAChD,MAAM,OAAO,aAAc,SAAQ,KAAK;IAIvC,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;;;;;mBAD0B;;QAHnC,wBAAwB;QACxB;;;;mBAA+B,SAAS;WAAC;QAMzC,mCAAmC;QACnC;;;;mBAA0D,IAAI,UAAU,CACvE,CAAC,GAAW,EAAE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iB,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,OAAO,CACnB,EAAU,EACV,OAAqH;QAErH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC7B,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACjC,mBAAmB,EAAE,UAAU,EAC/B,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CACvC,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAiB,CAAC;QACzC,CAAC,EAAE,OAAO,CAAC,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAC5B,UAAkB,EAClB,MAAc;QAEd,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAChC,mBAAmB,UAAU,0BAA0B,MAAM,EAAE,CAC/D,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAwB,CAAC;IAChD,CAAC;CACD;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;QACnC,OAAO,CAAC,eAAe,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAmB,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IActivity, LoadActivityOptions } from ".";
|
|
2
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
3
|
-
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
4
|
-
/** React hook to retrieve a Activity
|
|
5
|
-
* @param {string} id - id of the Activity
|
|
6
|
-
* @param {LoadActivityOptions} options - options
|
|
7
|
-
*/
|
|
8
|
-
export declare const useActivity: (id: string, options?: LoadActivityOptions | undefined) => import("@voplus/morpho-document-core").IActivityLog;
|
|
9
|
-
export declare const useActivityListEffect: (list: ListDataContextState<IActivity> | null, effect: (list: any[]) => void, options?: LoadDocumentListOptions | undefined) => void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useActivityStore } from ".";
|
|
2
|
-
import { useDocumentListLoaderEffect, } from "@voplus/morpho-document-core";
|
|
3
|
-
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
4
|
-
/** React hook to retrieve a Activity
|
|
5
|
-
* @param {string} id - id of the Activity
|
|
6
|
-
* @param {LoadActivityOptions} options - options
|
|
7
|
-
*/
|
|
8
|
-
export const useActivity = (id, options) => {
|
|
9
|
-
options = options ? options : {};
|
|
10
|
-
const store = useActivityStore();
|
|
11
|
-
return useLoadCountedMapItem(id, store.items, () => store.load(id, options), options);
|
|
12
|
-
};
|
|
13
|
-
export const useActivityListEffect = (list, effect, options) => {
|
|
14
|
-
const deps = options ? options : {};
|
|
15
|
-
const Activity = useActivityStore();
|
|
16
|
-
// Call useDocumentListEffect and ensure won't load twice for same loading options.
|
|
17
|
-
return useDocumentListLoaderEffect(list, effect, () => Activity.loadList(options), [deps]);
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=hook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/data/ActivityStore/hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,gBAAgB,EAAE,MAAM,GAAG,CAAC;AACrE,OAAO,EAGN,2BAA2B,GAE3B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAU,EAAE,OAA6B,EAAE,EAAE;IACxE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC1D,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IAEjC,OAAO,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA4C,EAC5C,MAA6B,EAC7B,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;IAEpC,mFAAmF;IACnF,OAAO,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/ActivityStore/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ILoadable } from "@voplus/morpho-data";
|
|
2
|
-
export declare type ActivityAction = "Created" | "Changed" | "Deleted";
|
|
3
|
-
/** @deprecated use the interface in document-core */
|
|
4
|
-
export interface ICollaborationTarget {
|
|
5
|
-
/** Id of the target. */
|
|
6
|
-
id: string;
|
|
7
|
-
/** Name of the collaboration target. */
|
|
8
|
-
name: string;
|
|
9
|
-
/** email of the target. */
|
|
10
|
-
email?: string;
|
|
11
|
-
/** ip of the target. */
|
|
12
|
-
iP?: string;
|
|
13
|
-
/** type of the target. */
|
|
14
|
-
type: string;
|
|
15
|
-
/** target object if the collaboration object is a link */
|
|
16
|
-
target?: ICollaborationTarget;
|
|
17
|
-
}
|
|
18
|
-
/** @deprecated use the interface in document-core */
|
|
19
|
-
/** Represent an activity log. */
|
|
20
|
-
export interface IActivity extends ILoadable {
|
|
21
|
-
/** Id of the log. */
|
|
22
|
-
id: string;
|
|
23
|
-
/** Subject of the activity. */
|
|
24
|
-
subject: ICollaborationTarget;
|
|
25
|
-
/** The action performed by subject. */
|
|
26
|
-
action: ActivityAction;
|
|
27
|
-
/** @deprecated Please use TargetObjects */
|
|
28
|
-
objects?: ICollaborationTarget[];
|
|
29
|
-
/** The collaboration target (like document task) objects of the activity. */
|
|
30
|
-
targetObjects?: ICollaborationTarget[];
|
|
31
|
-
/** The property target (like "Name", "Description", "Document Status") objects of the activity. */
|
|
32
|
-
propertyObjects?: {
|
|
33
|
-
name: string;
|
|
34
|
-
value: string;
|
|
35
|
-
valueType?: string | null;
|
|
36
|
-
changeSetType?: string | null;
|
|
37
|
-
}[];
|
|
38
|
-
/** The date log created */
|
|
39
|
-
createDate: Date;
|
|
40
|
-
/** Source object of the action. e.g. Original folder when moving files. */
|
|
41
|
-
source?: ICollaborationTarget;
|
|
42
|
-
/** Target object of the action. e.g. Target folder when moving files. */
|
|
43
|
-
target?: ICollaborationTarget;
|
|
44
|
-
}
|
|
45
|
-
export interface IRecipientsStatus extends ILoadable {
|
|
46
|
-
recipient: {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
};
|
|
50
|
-
status: "Read" | "Unread";
|
|
51
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/data/ActivityStore/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IActivity } from "./interfaces";
|
|
2
|
-
import { LoadOptions } from "@voplus/morpho-data";
|
|
3
|
-
/** Custom load contact options type */
|
|
4
|
-
export declare type LoadActivityOptions = {
|
|
5
|
-
/** Comma separated include options e.g. path */
|
|
6
|
-
includes?: string;
|
|
7
|
-
} & LoadOptions<IActivity>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/ActivityStore/types.ts"],"names":[],"mappings":""}
|