@voplus/morpho-document 1.4.52 → 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.d.ts +1 -1
- package/es/components/DocumentSortableTree/index.js +11 -8
- 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/DocumentSortableTree/themes/FileExplorerTheme/index.d.ts +1 -1
- package/es/components/DocumentSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +1 -1
- package/es/components/DocumentSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +1 -1
- package/es/components/DocumentSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -1
- package/es/components/DocumentSortableTree/themes/SortableTreeDocumentTheme/index.d.ts +2 -2
- package/es/components/DocumentSortableTree/themes/SortableTreeDocumentTheme/index.js +1 -1
- package/es/components/DocumentSortableTree/themes/SortableTreeDocumentTheme/index.js.map +1 -1
- package/es/components/DocumentSortableTree/themes/SortableTreeDocumentTheme/node-content-renderer.d.ts +1 -1
- package/es/components/DocumentSortableTree/themes/SortableTreeDocumentTheme/tree-node-renderer.d.ts +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/ChildDocumentSelect/index.js +1 -1
- package/es/controls/ChildDocumentSelect/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/es/views/DocumentTabbedView/DraggableTabs.js +2 -1
- package/es/views/DocumentTabbedView/DraggableTabs.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,54 +0,0 @@
|
|
|
1
|
-
import "./index.less";
|
|
2
|
-
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
3
|
-
import ActivityActionFilter from "../ActivityActionFilter";
|
|
4
|
-
import CommentBar from "../CommentBar";
|
|
5
|
-
import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
|
|
6
|
-
import ListHeader from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeader";
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { State } from "../state";
|
|
9
|
-
import { Timeline } from "@voplus/antd";
|
|
10
|
-
import classnames from "classnames";
|
|
11
|
-
import { observe } from "@voplus/morpho-ui";
|
|
12
|
-
import { useActivityListEffect } from "../../../data/ActivityStore";
|
|
13
|
-
import { useActivityLogRenderService } from "@voplus/morpho-document-core/es/services/ActivityLogRenderService";
|
|
14
|
-
import { useDeepMemo } from "@voplus/morpho-data";
|
|
15
|
-
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
16
|
-
const ActivityLog = (props) => {
|
|
17
|
-
const { id, nodes, bar, isHeader, children } = props;
|
|
18
|
-
const state = useDeepMemo(() => new State(), [id, nodes]);
|
|
19
|
-
const logRenderer = useActivityLogRenderService();
|
|
20
|
-
const list = useCreateListDataState({
|
|
21
|
-
filterDefaults: {
|
|
22
|
-
page: { Page: state.page, PageSize: 50 },
|
|
23
|
-
filters: [
|
|
24
|
-
{ c: "NodeId", o: "contains", l: "And", v1: JSON.stringify([id].concat(nodes !== null && nodes !== void 0 ? nodes : [])) },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
}, [id, nodes]);
|
|
28
|
-
/** 如果 list.filters.useDocumentActivityListEffect 可以接收新参数*/
|
|
29
|
-
useRenderOnChange(() => list.filters.options);
|
|
30
|
-
/** useActivityListEffect,使之可以自動更新loading, hasmore. */
|
|
31
|
-
useActivityListEffect(list, (result) => list.union(result), list.filters.options);
|
|
32
|
-
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
|
33
|
-
React.createElement("div", { className: classnames("activity-log-view"), style: { flex: "1" } },
|
|
34
|
-
React.createElement("div", { className: "activity-time-line" },
|
|
35
|
-
isHeader && (React.createElement(ListHeader, { viewTitle: "Activity Log", sortable: false, addAble: false, filterViewProps: {
|
|
36
|
-
columns: [React.createElement(ActivityActionFilter, { key: "ActivityActionFilter" })],
|
|
37
|
-
} })),
|
|
38
|
-
React.createElement(InfiniteScrollView, { empty: list.isEmpty, loading: list.loading, hasMore: list.hasMore, loadMore: loadMore },
|
|
39
|
-
bar && React.createElement(CommentBar, { id: id }),
|
|
40
|
-
children,
|
|
41
|
-
React.createElement(Timeline, null, list.data.length &&
|
|
42
|
-
list.data.map((item) => {
|
|
43
|
-
return React.createElement(React.Fragment, { key: item.id }, logRenderer === null || logRenderer === void 0 ? void 0 : logRenderer.render(item));
|
|
44
|
-
}))))))));
|
|
45
|
-
function loadMore() {
|
|
46
|
-
list.triggerNextPage();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
ActivityLog.defaultProps = {
|
|
50
|
-
bar: true,
|
|
51
|
-
isHeader: true,
|
|
52
|
-
};
|
|
53
|
-
export default ActivityLog;
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ActivityLog/ActivityLog2/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,UAAU,MAAM,oEAAoE,CAAC;AAC5F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mEAAmE,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,GAAG,CAAC,KAapB,EAAE,EAA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U,IACV,SAAS,EAAC,cAAc,EACxB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,KAAK,EACd,eAAe,EAAE;wBAChB,OAAO,EAAE,CAAC,oBAAC,oBAAoB,IAAC,GAAG,EAAC,sBAAsB,GAAG,CAAC;qBAC9D,GACA,CACF;gBACD,oBAAC,kBAAkB,IAClB,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,QAAQ;oBAGjB,GAAG,IAAI,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,GAAI;oBAC7B,QAAQ;oBACT,oBAAC,QAAQ,QACP,IAAI,CAAC,IAAI,CAAC,MAAM;wBAChB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAkB,EAAE,EAAE;4BACpC,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAC,IAAI,CAAC,CAAkB,CAAC;wBACnF,CAAC,CAAC,CACO,CACS,CAChB,CACD,CACoB,CAC3B,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,IAAI,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;AACF,CAAC,CAAC;AAEF,WAAW,CAAC,YAAY,GAAG;IAC1B,GAAG,EAAE,IAAI;IACT,QAAQ,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
@import "~@voplus/antd/es/style/themes/default";
|
|
2
|
-
:global {
|
|
3
|
-
.list-view-header {
|
|
4
|
-
display: flex;
|
|
5
|
-
width: 100%;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
align-items: center;
|
|
8
|
-
padding: 10px 20px;
|
|
9
|
-
border-bottom: 1px solid #f2f2f2;
|
|
10
|
-
.view-title {
|
|
11
|
-
color: #000;
|
|
12
|
-
font-size: 16px;
|
|
13
|
-
font-weight: 600;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.activity-log-view {
|
|
17
|
-
position: relative;
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
|
|
24
|
-
&.activity-log-view_top {
|
|
25
|
-
flex-direction: column-reverse;
|
|
26
|
-
}
|
|
27
|
-
.activity-time-line {
|
|
28
|
-
flex: 1;
|
|
29
|
-
width: 100%;
|
|
30
|
-
.ant-timeline {
|
|
31
|
-
padding: 13px 0 0 15px;
|
|
32
|
-
margin: 15px 20px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.dot-icon {
|
|
36
|
-
display: inline-block;
|
|
37
|
-
width: 30px;
|
|
38
|
-
height: 30px;
|
|
39
|
-
line-height: 28px;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
font-size: 17px;
|
|
43
|
-
}
|
|
44
|
-
.ant-timeline-item-head-blue .dot-icon {
|
|
45
|
-
border-color: @primary-color;
|
|
46
|
-
}
|
|
47
|
-
.user-name {
|
|
48
|
-
font-weight: 500;
|
|
49
|
-
color: #000;
|
|
50
|
-
padding-right: 10px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.action {
|
|
54
|
-
padding-right: 10px;
|
|
55
|
-
color: #000;
|
|
56
|
-
font-style: italic;
|
|
57
|
-
}
|
|
58
|
-
.ant-timeline-item-content svg[data-icon] {
|
|
59
|
-
margin-right: 5px;
|
|
60
|
-
}
|
|
61
|
-
.date-time {
|
|
62
|
-
font-size: 12px;
|
|
63
|
-
color: #444;
|
|
64
|
-
}
|
|
65
|
-
.target-object-link {
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
&:hover {
|
|
68
|
-
text-decoration: underline;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
.property-objects {
|
|
72
|
-
display: inline;
|
|
73
|
-
|
|
74
|
-
&.multiple {
|
|
75
|
-
display: block;
|
|
76
|
-
|
|
77
|
-
> span {
|
|
78
|
-
display: block;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
.property-name {
|
|
82
|
-
font-weight: 600;
|
|
83
|
-
font-style: italic;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.property-value {
|
|
87
|
-
font-style: italic;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.ant-timeline-item-content {
|
|
92
|
-
top: -14px;
|
|
93
|
-
margin: 0 0 0 50px;
|
|
94
|
-
line-height: 28px;
|
|
95
|
-
color: #333;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.time-line-comment {
|
|
99
|
-
position: relative;
|
|
100
|
-
color: #24292e;
|
|
101
|
-
background-color: #fff;
|
|
102
|
-
border: @border-width-base @border-style-base @border-color-split;
|
|
103
|
-
border-radius: 6px;
|
|
104
|
-
margin-left: -65px;
|
|
105
|
-
.time-line-comment-header {
|
|
106
|
-
padding: 5px 15px;
|
|
107
|
-
background-color: @background-color-base;
|
|
108
|
-
border-bottom: @border-width-base @border-style-base @border-color-split;
|
|
109
|
-
border-top-left-radius: 6px;
|
|
110
|
-
border-top-right-radius: 6px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.time-line-comment-body {
|
|
114
|
-
padding: 15px;
|
|
115
|
-
.ProseMirror {
|
|
116
|
-
padding: 0;
|
|
117
|
-
.prosemirror-mention-node {
|
|
118
|
-
position: relative;
|
|
119
|
-
.mention-state {
|
|
120
|
-
position: absolute;
|
|
121
|
-
top: -12px;
|
|
122
|
-
right: -3.5px;
|
|
123
|
-
svg {
|
|
124
|
-
width: 5px;
|
|
125
|
-
margin: 0 !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
.time-line-comment-hr {
|
|
131
|
-
height: 0.25em;
|
|
132
|
-
padding: 0;
|
|
133
|
-
margin: 24px 0;
|
|
134
|
-
background-color: #e1e4e8;
|
|
135
|
-
border: 0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.comment-bar-placeholder {
|
|
142
|
-
color: lightgray;
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
padding: 1rem;
|
|
145
|
-
margin-left: 15px;
|
|
146
|
-
}
|
|
147
|
-
.comment-bar {
|
|
148
|
-
display: flex;
|
|
149
|
-
width: 100%;
|
|
150
|
-
height: 0;
|
|
151
|
-
flex-direction: column;
|
|
152
|
-
|
|
153
|
-
opacity: 0;
|
|
154
|
-
transition: height 0.3s, opacity 0.2s ease-out, border-color 0.1s;
|
|
155
|
-
&.show {
|
|
156
|
-
opacity: 1;
|
|
157
|
-
height: 20rem;
|
|
158
|
-
}
|
|
159
|
-
&.warn {
|
|
160
|
-
.comment-prosemirror {
|
|
161
|
-
border: @border-width-base @border-style-base @warning-color;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
> div {
|
|
165
|
-
background-color: #fff;
|
|
166
|
-
}
|
|
167
|
-
.editor-toolbar {
|
|
168
|
-
padding: 0.2rem 0.65rem;
|
|
169
|
-
//border: none;
|
|
170
|
-
}
|
|
171
|
-
.ProseMirror-container {
|
|
172
|
-
//min-height: 100%;
|
|
173
|
-
|
|
174
|
-
.ProseMirror {
|
|
175
|
-
padding: 1.25rem;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.comment-bar-send {
|
|
180
|
-
margin: 0.5rem 20px 0;
|
|
181
|
-
display: flex;
|
|
182
|
-
justify-content: space-between;
|
|
183
|
-
.bar-visibility {
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
.svg-inline--fa {
|
|
187
|
-
margin-right: 8px;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
.bar-button {
|
|
191
|
-
text-align: right;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
.bar-visibility-overlay {
|
|
197
|
-
min-width: 120px !important;
|
|
198
|
-
.svg-inline--fa {
|
|
199
|
-
margin-right: 8px;
|
|
200
|
-
}
|
|
201
|
-
.ant-dropdown-menu-title-content {
|
|
202
|
-
display: inline-block;
|
|
203
|
-
width: 100%;
|
|
204
|
-
> span {
|
|
205
|
-
display: inline-block;
|
|
206
|
-
width: 100%;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
.acknowledgement-checked {
|
|
210
|
-
margin-left: 18px;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
@@ -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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|
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,EAA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AE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACD;AA1DY;IAAX,UAAU;mCAAU;AAET;IAAX,UAAU;sCAAiB;AAMhB;IAAX,UAAU;sCAAqB;AAEpB;IAAX,UAAU;0CAAyB;AAExB;IAAX,UAAU;uCAAwB;AAEvB;IAAX,UAAU;8CAA0D;AAEzD;IAAX,UAAU;yCAAmD;AAElD;IAAX,UAAU;8CAAgC;AAO3C;IADC,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":"AA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
-
: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
|
-
}
|