@box/activity-feed 1.21.1 → 1.21.3
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/package.json +14 -14
- package/dist/chunks/mock-collaboration-props.js +0 -19379
- package/dist/esm/lib/test-utils/mocks/index.js +0 -6
- package/dist/esm/lib/test-utils/mocks/mock-collaboration-props.js +0 -2
- package/dist/esm/lib/test-utils/mocks/mock-feed-items.js +0 -187
- package/dist/esm/lib/test-utils/mocks/mock-mention-context.js +0 -7
- package/dist/esm/lib/test-utils/mocks/mock-user-selector-props.js +0 -9
- package/dist/esm/lib/test-utils/mocks/mock-users.js +0 -86
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../../../../chunks/mock-collaboration-props.js";
|
|
2
|
-
import { MOCK_ANNOTATION_THREAD as t, MOCK_APP_ACTIVITY_SHARED as n, MOCK_APP_ACTIVITY_WORKFLOW as r, MOCK_COMMENT_THREAD as i, MOCK_FEED_ITEMS as a, MOCK_RESOLVED_COMMENT_THREAD as o, MOCK_TASK_APPROVED as s, MOCK_TASK_IN_PROGRESS as c, MOCK_VERSION_RESTORED as l, MOCK_VERSION_UPLOADED as u } from "./mock-feed-items.js";
|
|
3
|
-
import { createMockMentionContext as d } from "./mock-mention-context.js";
|
|
4
|
-
import { MOCK_USERS as f, MOCK_USER_SELECTOR_USERS as p } from "./mock-users.js";
|
|
5
|
-
import { createDefaultUserSelectorProps as m } from "./mock-user-selector-props.js";
|
|
6
|
-
export { t as MOCK_ANNOTATION_THREAD, n as MOCK_APP_ACTIVITY_SHARED, r as MOCK_APP_ACTIVITY_WORKFLOW, i as MOCK_COMMENT_THREAD, a as MOCK_FEED_ITEMS, o as MOCK_RESOLVED_COMMENT_THREAD, s as MOCK_TASK_APPROVED, c as MOCK_TASK_IN_PROGRESS, f as MOCK_USERS, p as MOCK_USER_SELECTOR_USERS, l as MOCK_VERSION_RESTORED, u as MOCK_VERSION_UPLOADED, m as createDefaultUserSelectorProps, e as createMockCollaborationPopoverProps, d as createMockMentionContext };
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
var e = 60 * 1e3, t = 60 * e, n = 24 * t, r = 17096544e5, i = (e) => ({
|
|
2
|
-
content: [{
|
|
3
|
-
content: [{
|
|
4
|
-
text: e,
|
|
5
|
-
type: "text"
|
|
6
|
-
}],
|
|
7
|
-
type: "paragraph"
|
|
8
|
-
}],
|
|
9
|
-
type: "doc"
|
|
10
|
-
}), a = {
|
|
11
|
-
activityType: "comment",
|
|
12
|
-
author: {
|
|
13
|
-
avatarUrl: "https://cdn01.boxcdn.net/app-assets/aistudio/discover/avatars/lperry-avatar.png",
|
|
14
|
-
id: "101",
|
|
15
|
-
name: "Liam Perry"
|
|
16
|
-
},
|
|
17
|
-
body: i("Can we tighten the copy in the header? \"Comments\" feels generic."),
|
|
18
|
-
createdAt: r - 2 * t,
|
|
19
|
-
id: "comment-root",
|
|
20
|
-
permissions: {
|
|
21
|
-
canDelete: !0,
|
|
22
|
-
canEdit: !0,
|
|
23
|
-
canReply: !0,
|
|
24
|
-
canResolve: !0
|
|
25
|
-
},
|
|
26
|
-
replies: [{
|
|
27
|
-
activityType: "comment",
|
|
28
|
-
author: {
|
|
29
|
-
avatarUrl: "https://cdn01.boxcdn.net/app-assets/aistudio/discover/avatars/msyu-avatar.png",
|
|
30
|
-
id: "102",
|
|
31
|
-
name: "Mia Syu"
|
|
32
|
-
},
|
|
33
|
-
body: i("Agreed — proposed copy: \"Activity\"?"),
|
|
34
|
-
createdAt: r - 1 * t,
|
|
35
|
-
id: "comment-reply-1",
|
|
36
|
-
permissions: {
|
|
37
|
-
canDelete: !0,
|
|
38
|
-
canEdit: !0,
|
|
39
|
-
canReply: !0,
|
|
40
|
-
canResolve: !1
|
|
41
|
-
},
|
|
42
|
-
replies: []
|
|
43
|
-
}],
|
|
44
|
-
status: "open"
|
|
45
|
-
}, o = {
|
|
46
|
-
activityType: "comment",
|
|
47
|
-
author: {
|
|
48
|
-
id: "103",
|
|
49
|
-
name: "Bilal Khan"
|
|
50
|
-
},
|
|
51
|
-
body: i("Resolved last week — dropped the deprecated icon."),
|
|
52
|
-
createdAt: r - 7 * n,
|
|
53
|
-
id: "comment-resolved",
|
|
54
|
-
modifiedAt: r - 6 * n,
|
|
55
|
-
permissions: {
|
|
56
|
-
canDelete: !1,
|
|
57
|
-
canEdit: !1,
|
|
58
|
-
canReply: !1,
|
|
59
|
-
canResolve: !0
|
|
60
|
-
},
|
|
61
|
-
replies: [],
|
|
62
|
-
status: "resolved"
|
|
63
|
-
}, s = {
|
|
64
|
-
activityType: "annotation",
|
|
65
|
-
annotationTarget: {
|
|
66
|
-
page: 3,
|
|
67
|
-
type: "point"
|
|
68
|
-
},
|
|
69
|
-
author: {
|
|
70
|
-
id: "104",
|
|
71
|
-
name: "Priya Iyer"
|
|
72
|
-
},
|
|
73
|
-
body: i("Add a callout here pointing to the diagram."),
|
|
74
|
-
createdAt: r - 30 * e,
|
|
75
|
-
id: "annotation-1",
|
|
76
|
-
permissions: {
|
|
77
|
-
canDelete: !0,
|
|
78
|
-
canEdit: !0,
|
|
79
|
-
canReply: !0,
|
|
80
|
-
canResolve: !0
|
|
81
|
-
},
|
|
82
|
-
replies: [],
|
|
83
|
-
status: "open"
|
|
84
|
-
}, c = {
|
|
85
|
-
activityType: "task",
|
|
86
|
-
assignees: [{
|
|
87
|
-
avatarUrl: "https://cdn01.boxcdn.net/app-assets/aistudio/discover/avatars/bkus-avatar.png",
|
|
88
|
-
id: "999",
|
|
89
|
-
name: "You",
|
|
90
|
-
status: "NOT_STARTED"
|
|
91
|
-
}, {
|
|
92
|
-
id: "888",
|
|
93
|
-
isExternal: !0,
|
|
94
|
-
name: "External reviewer",
|
|
95
|
-
status: "NOT_STARTED"
|
|
96
|
-
}],
|
|
97
|
-
author: {
|
|
98
|
-
id: "203",
|
|
99
|
-
name: "Morgan Patel"
|
|
100
|
-
},
|
|
101
|
-
completionRule: "ALL_ASSIGNEES",
|
|
102
|
-
createdAt: r - 4 * t,
|
|
103
|
-
description: "Review the redlines and confirm whether the new contract clauses are acceptable.",
|
|
104
|
-
dueAt: r + 3 * n,
|
|
105
|
-
id: "task-in-progress",
|
|
106
|
-
name: "Review final contract",
|
|
107
|
-
permissions: {
|
|
108
|
-
canDelete: !0,
|
|
109
|
-
canUpdate: !0
|
|
110
|
-
},
|
|
111
|
-
status: "IN_PROGRESS"
|
|
112
|
-
}, l = {
|
|
113
|
-
activityType: "task",
|
|
114
|
-
assignees: [{
|
|
115
|
-
id: "999",
|
|
116
|
-
name: "You",
|
|
117
|
-
status: "APPROVED",
|
|
118
|
-
completedAt: r - 1 * n
|
|
119
|
-
}],
|
|
120
|
-
author: {
|
|
121
|
-
id: "204",
|
|
122
|
-
name: "Jamal Davis"
|
|
123
|
-
},
|
|
124
|
-
completionRule: "ANY_ASSIGNEE",
|
|
125
|
-
createdAt: r - 5 * n,
|
|
126
|
-
description: "Sign off on the v3 launch checklist.",
|
|
127
|
-
id: "task-approved",
|
|
128
|
-
name: "Approve launch checklist",
|
|
129
|
-
permissions: {
|
|
130
|
-
canDelete: !1,
|
|
131
|
-
canUpdate: !1
|
|
132
|
-
},
|
|
133
|
-
status: "APPROVED"
|
|
134
|
-
}, u = {
|
|
135
|
-
activityType: "app_activity",
|
|
136
|
-
appIconUrl: "https://cdn01.boxcdn.net/app-assets/preview/box-social.jpeg",
|
|
137
|
-
appName: "Box for Slack",
|
|
138
|
-
author: {
|
|
139
|
-
id: "301",
|
|
140
|
-
name: "Box for Slack"
|
|
141
|
-
},
|
|
142
|
-
createdAt: r - 6 * t,
|
|
143
|
-
id: "app-activity-shared",
|
|
144
|
-
renderedText: "shared this file in <a href=\"https://www.box.com\" data-resin-target=\"app_activity_external\" data-resin-action=\"click\">#design-reviews</a>"
|
|
145
|
-
}, d = {
|
|
146
|
-
activityType: "app_activity",
|
|
147
|
-
appIconUrl: "https://cdn01.boxcdn.net/app-assets/preview/box-social.jpeg",
|
|
148
|
-
appName: "Box Relay",
|
|
149
|
-
author: {
|
|
150
|
-
id: "302",
|
|
151
|
-
name: "Box Relay"
|
|
152
|
-
},
|
|
153
|
-
createdAt: r - 8 * t,
|
|
154
|
-
id: "app-activity-workflow",
|
|
155
|
-
renderedText: "completed workflow step \"Review and Approve\""
|
|
156
|
-
}, f = {
|
|
157
|
-
actionType: "upload",
|
|
158
|
-
activityType: "version",
|
|
159
|
-
author: {
|
|
160
|
-
id: "401",
|
|
161
|
-
name: "Priya Kumar"
|
|
162
|
-
},
|
|
163
|
-
createdAt: r - 12 * t,
|
|
164
|
-
id: "version-uploaded",
|
|
165
|
-
versionNumber: 28
|
|
166
|
-
}, p = {
|
|
167
|
-
actionType: "restore",
|
|
168
|
-
activityType: "version",
|
|
169
|
-
author: {
|
|
170
|
-
id: "402",
|
|
171
|
-
name: "Alex Rivera"
|
|
172
|
-
},
|
|
173
|
-
createdAt: r - 2 * n,
|
|
174
|
-
id: "version-restored",
|
|
175
|
-
versionNumber: 24
|
|
176
|
-
}, m = [
|
|
177
|
-
s,
|
|
178
|
-
a,
|
|
179
|
-
c,
|
|
180
|
-
f,
|
|
181
|
-
u,
|
|
182
|
-
l,
|
|
183
|
-
p,
|
|
184
|
-
o,
|
|
185
|
-
d
|
|
186
|
-
];
|
|
187
|
-
export { s as MOCK_ANNOTATION_THREAD, u as MOCK_APP_ACTIVITY_SHARED, d as MOCK_APP_ACTIVITY_WORKFLOW, a as MOCK_COMMENT_THREAD, m as MOCK_FEED_ITEMS, o as MOCK_RESOLVED_COMMENT_THREAD, l as MOCK_TASK_APPROVED, c as MOCK_TASK_IN_PROGRESS, p as MOCK_VERSION_RESTORED, f as MOCK_VERSION_UPLOADED };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MOCK_USER_SELECTOR_USERS as e } from "./mock-users.js";
|
|
2
|
-
var t = (t = e) => async (e) => (await new Promise((e) => setTimeout(e, 100)), t.filter((t) => t.name.toLowerCase().includes(e.toLowerCase()) || t.email.toLowerCase().includes(e.toLowerCase())).slice(0, 5)), n = () => async () => (await new Promise((e) => setTimeout(e, 50)), {}), r = () => ({
|
|
3
|
-
fetchUsers: t(),
|
|
4
|
-
fetchAvatarUrls: n(),
|
|
5
|
-
allowEmptyQuery: !0,
|
|
6
|
-
ariaRoleDescription: "User selector for mentions",
|
|
7
|
-
loadingAriaLabel: "Loading users..."
|
|
8
|
-
});
|
|
9
|
-
export { r as createDefaultUserSelectorProps };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var e = {
|
|
2
|
-
LIAM_FOSTER: {
|
|
3
|
-
avatarUrl: "/img/avatar.svg",
|
|
4
|
-
email: "liam.foster@example.com",
|
|
5
|
-
id: 1,
|
|
6
|
-
name: "Liam Foster",
|
|
7
|
-
value: "Liam Foster",
|
|
8
|
-
isExternalUser: !1
|
|
9
|
-
},
|
|
10
|
-
SARAH_CHEN: {
|
|
11
|
-
email: "sarah.chen@example.com",
|
|
12
|
-
id: 2,
|
|
13
|
-
name: "Sarah Chen",
|
|
14
|
-
value: "Sarah Chen",
|
|
15
|
-
isExternalUser: !0
|
|
16
|
-
},
|
|
17
|
-
ALEX_RODRIGUEZ: {
|
|
18
|
-
email: "alex.rodriguez@example.com",
|
|
19
|
-
id: 3,
|
|
20
|
-
name: "Alex Rodriguez",
|
|
21
|
-
value: "Alex Rodriguez",
|
|
22
|
-
isExternalUser: !1
|
|
23
|
-
},
|
|
24
|
-
EMMA_WILSON: {
|
|
25
|
-
avatarUrl: "/img/avatar.svg",
|
|
26
|
-
email: "emma.wilson@external.com",
|
|
27
|
-
id: 4,
|
|
28
|
-
name: "Emma Wilson",
|
|
29
|
-
value: "Emma Wilson",
|
|
30
|
-
isExternalUser: !0
|
|
31
|
-
},
|
|
32
|
-
DAVID_THOMPSON: {
|
|
33
|
-
email: "david.thompson@example.com",
|
|
34
|
-
id: 12312312,
|
|
35
|
-
name: "David Thompson",
|
|
36
|
-
value: "David Thompson",
|
|
37
|
-
isExternalUser: !1
|
|
38
|
-
},
|
|
39
|
-
TEST_USER: {
|
|
40
|
-
id: 1213123,
|
|
41
|
-
name: "Test User",
|
|
42
|
-
email: "test@box.com",
|
|
43
|
-
isExternalUser: !1,
|
|
44
|
-
value: "Test User"
|
|
45
|
-
},
|
|
46
|
-
CURRENT_USER: {
|
|
47
|
-
email: "you@example.com",
|
|
48
|
-
id: 999,
|
|
49
|
-
name: "Test User",
|
|
50
|
-
value: "Test User",
|
|
51
|
-
isExternalUser: !1
|
|
52
|
-
}
|
|
53
|
-
}, t = [
|
|
54
|
-
{
|
|
55
|
-
email: "abc@box.com",
|
|
56
|
-
id: 12312312,
|
|
57
|
-
name: "A",
|
|
58
|
-
value: "A"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
email: "def@box.com",
|
|
62
|
-
id: 2324432,
|
|
63
|
-
name: "B",
|
|
64
|
-
value: "B"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
email: "test@email.com",
|
|
68
|
-
id: 343242323,
|
|
69
|
-
name: "Test User",
|
|
70
|
-
value: "Test User"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
email: "bartholomew@box.com",
|
|
74
|
-
id: 41231423,
|
|
75
|
-
name: "Bartholomew Constantine",
|
|
76
|
-
value: "Bartholomew Constantine"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
email: "lorem@box.com",
|
|
80
|
-
id: 5123123123,
|
|
81
|
-
name: "Lorem ipsum dolor sitamet",
|
|
82
|
-
value: "Lorem ipsum dolor sitamet",
|
|
83
|
-
isExternalUser: !0
|
|
84
|
-
}
|
|
85
|
-
];
|
|
86
|
-
export { e as MOCK_USERS, t as MOCK_USER_SELECTOR_USERS };
|