@box/threaded-annotations 1.91.8 → 1.91.9
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 +11 -11
- package/dist/chunks/mock-collaboration-props.js +0 -19379
- package/dist/esm/lib/v2/test-utils/mocks/index.js +0 -7
- package/dist/esm/lib/v2/test-utils/mocks/mock-callbacks.js +0 -15
- package/dist/esm/lib/v2/test-utils/mocks/mock-collaboration-props.js +0 -2
- package/dist/esm/lib/v2/test-utils/mocks/mock-messages-long-strings.js +0 -27
- package/dist/esm/lib/v2/test-utils/mocks/mock-messages.js +0 -198
- package/dist/esm/lib/v2/test-utils/mocks/mock-users.js +0 -86
- package/dist/esm/lib/v2/test-utils/mocks/mock-utilities.js +0 -9
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MOCK_USERS as e, MOCK_USER_SELECTOR_USERS as t } from "./mock-users.js";
|
|
2
|
-
import { DEFAULT_PERMISSIONS as n, DEFAULT_ROOT_PERMISSIONS as r, MOCK_ANNOTATIONS_MESSAGE_CONTENT as i, MOCK_ANNOTATION_MESSAGES as a, MOCK_MESSAGE_CONTENT as o, MOCK_SINGLE_ANNOTATION_MESSAGE as s, createMockAnnotationMessage as c } from "./mock-messages.js";
|
|
3
|
-
import { createDocumentNode as l, createMockFetchAvatarUrls as u, createMockFetchUsers as d } from "./mock-utilities.js";
|
|
4
|
-
import { MOCK_CALLBACKS as f } from "./mock-callbacks.js";
|
|
5
|
-
import { t as p } from "../../../../../chunks/mock-collaboration-props.js";
|
|
6
|
-
import { createLongStringAnnotationMessage as m, createLongStringMessage as h, generateLongAlphabetString as g } from "./mock-messages-long-strings.js";
|
|
7
|
-
export { n as DEFAULT_PERMISSIONS, r as DEFAULT_ROOT_PERMISSIONS, i as MOCK_ANNOTATIONS_MESSAGE_CONTENT, a as MOCK_ANNOTATION_MESSAGES, f as MOCK_CALLBACKS, o as MOCK_MESSAGE_CONTENT, s as MOCK_SINGLE_ANNOTATION_MESSAGE, e as MOCK_USERS, t as MOCK_USER_SELECTOR_USERS, l as createDocumentNode, m as createLongStringAnnotationMessage, h as createLongStringMessage, c as createMockAnnotationMessage, p as createMockCollaborationPopoverProps, u as createMockFetchAvatarUrls, d as createMockFetchUsers, g as generateLongAlphabetString };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { MOCK_USERS as e } from "./mock-users.js";
|
|
2
|
-
import { createMockAnnotationMessage as t } from "./mock-messages.js";
|
|
3
|
-
import { createDocumentNode as n } from "./mock-utilities.js";
|
|
4
|
-
import { v4 as r } from "uuid";
|
|
5
|
-
var i = {
|
|
6
|
-
onPost: async (i) => (await new Promise((e) => setTimeout(e, 1e3)), t(r(), n(i), e.TEST_USER)),
|
|
7
|
-
onPostWithError: async () => {
|
|
8
|
-
throw await new Promise((e) => setTimeout(e, 1e3)), Error("Error message from throw error");
|
|
9
|
-
},
|
|
10
|
-
onSave: async (i) => (await new Promise((e) => setTimeout(e, 1e3)), t(r(), n(i), e.TEST_USER)),
|
|
11
|
-
onSaveWithError: async () => {
|
|
12
|
-
throw await new Promise((e) => setTimeout(e, 1e3)), Error("Error message from save");
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
export { i as MOCK_CALLBACKS };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_PERMISSIONS as e } from "./mock-messages.js";
|
|
2
|
-
var t = (e) => {
|
|
3
|
-
let t = "";
|
|
4
|
-
for (let n = 0; n < e; n += 1) t += "abcdefghijklmnopqrstuvwxyz"[n % 26];
|
|
5
|
-
return t;
|
|
6
|
-
}, n = (e) => ({
|
|
7
|
-
type: "doc",
|
|
8
|
-
content: [{
|
|
9
|
-
type: "paragraph",
|
|
10
|
-
content: [{
|
|
11
|
-
type: "text",
|
|
12
|
-
text: t(e)
|
|
13
|
-
}]
|
|
14
|
-
}]
|
|
15
|
-
}), r = (e, n) => ({
|
|
16
|
-
id: e,
|
|
17
|
-
name: t(n),
|
|
18
|
-
email: `user-${e}@example.com`,
|
|
19
|
-
isExternalUser: !1
|
|
20
|
-
}), i = (t, i, a, o) => ({
|
|
21
|
-
id: t,
|
|
22
|
-
message: n(i),
|
|
23
|
-
createdAt: 1752664303265,
|
|
24
|
-
author: r(o, a),
|
|
25
|
-
permissions: e
|
|
26
|
-
});
|
|
27
|
-
export { i as createLongStringAnnotationMessage, n as createLongStringMessage, t as generateLongAlphabetString };
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { MOCK_USERS as e } from "./mock-users.js";
|
|
2
|
-
var t = [
|
|
3
|
-
{
|
|
4
|
-
type: "doc",
|
|
5
|
-
content: [{
|
|
6
|
-
type: "paragraph",
|
|
7
|
-
content: [
|
|
8
|
-
{
|
|
9
|
-
type: "text",
|
|
10
|
-
text: "Hi "
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: "mention",
|
|
14
|
-
attrs: {
|
|
15
|
-
mentionedUserId: "12312312",
|
|
16
|
-
mentionedUserName: "David Thompson",
|
|
17
|
-
mentionedUserEmail: "david.thompson@example.com",
|
|
18
|
-
authorId: "1",
|
|
19
|
-
mentionId: "mention-1"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
type: "text",
|
|
24
|
-
text: " would you like to join the meeting? "
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: "mention",
|
|
28
|
-
attrs: {
|
|
29
|
-
mentionedUserId: "2",
|
|
30
|
-
mentionedUserName: "Sarah Chen",
|
|
31
|
-
mentionedUserEmail: "sarah.chen@example.com",
|
|
32
|
-
authorId: "1",
|
|
33
|
-
mentionId: "mention-2"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: "text",
|
|
38
|
-
text: " "
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: "mention",
|
|
42
|
-
attrs: {
|
|
43
|
-
mentionedUserId: "3",
|
|
44
|
-
mentionedUserName: "Alex Rodriguez",
|
|
45
|
-
mentionedUserEmail: "alex.rodriguez@example.com",
|
|
46
|
-
authorId: "1",
|
|
47
|
-
mentionId: "mention-3"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
type: "doc",
|
|
55
|
-
content: [{
|
|
56
|
-
type: "paragraph",
|
|
57
|
-
content: [
|
|
58
|
-
{
|
|
59
|
-
type: "text",
|
|
60
|
-
text: "Thanks for the invitation! "
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
type: "mention",
|
|
64
|
-
attrs: {
|
|
65
|
-
mentionedUserId: "12312312",
|
|
66
|
-
mentionedUserName: "David Thompson",
|
|
67
|
-
mentionedUserEmail: "david.thompson@example.com",
|
|
68
|
-
authorId: "1",
|
|
69
|
-
mentionId: "mention-4"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: "text",
|
|
74
|
-
text: " I'll be there."
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: "doc",
|
|
81
|
-
content: [{
|
|
82
|
-
type: "paragraph",
|
|
83
|
-
content: [{
|
|
84
|
-
type: "text",
|
|
85
|
-
text: "Great! Looking forward to collaborating with everyone on this project."
|
|
86
|
-
}]
|
|
87
|
-
}]
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: "doc",
|
|
91
|
-
content: [{
|
|
92
|
-
type: "paragraph",
|
|
93
|
-
content: [{
|
|
94
|
-
type: "mention",
|
|
95
|
-
attrs: {
|
|
96
|
-
mentionedUserId: "3",
|
|
97
|
-
mentionedUserName: "Alex Rodriguez",
|
|
98
|
-
mentionedUserEmail: "alex.rodriguez@example.com",
|
|
99
|
-
authorId: "4",
|
|
100
|
-
mentionId: "mention-5"
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
type: "text",
|
|
104
|
-
text: " can you share the latest design mockups? We should review them before the meeting."
|
|
105
|
-
}]
|
|
106
|
-
}]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: "doc",
|
|
110
|
-
content: [{
|
|
111
|
-
type: "paragraph",
|
|
112
|
-
content: [{
|
|
113
|
-
type: "text",
|
|
114
|
-
text: "Sure! I'll upload them to the shared folder right now."
|
|
115
|
-
}]
|
|
116
|
-
}]
|
|
117
|
-
}
|
|
118
|
-
], n = {
|
|
119
|
-
type: "doc",
|
|
120
|
-
content: [{
|
|
121
|
-
type: "paragraph",
|
|
122
|
-
content: [
|
|
123
|
-
{
|
|
124
|
-
type: "text",
|
|
125
|
-
text: "Hi "
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: "mention",
|
|
129
|
-
attrs: {
|
|
130
|
-
mentionedUserId: "1",
|
|
131
|
-
mentionedUserName: "David Thompson",
|
|
132
|
-
mentionedUserEmail: "david.thompson@example.com",
|
|
133
|
-
authorId: "1",
|
|
134
|
-
mentionId: "mention-6"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
type: "text",
|
|
139
|
-
text: " would you like to join the meeting? "
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
}, {
|
|
143
|
-
type: "paragraph",
|
|
144
|
-
content: [
|
|
145
|
-
{
|
|
146
|
-
type: "text",
|
|
147
|
-
text: " "
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
type: "mention",
|
|
151
|
-
attrs: {
|
|
152
|
-
mentionedUserId: "2",
|
|
153
|
-
mentionedUserName: "Sarah Chen",
|
|
154
|
-
mentionedUserEmail: "sarah.chen@example.com",
|
|
155
|
-
authorId: "1",
|
|
156
|
-
mentionId: "mention-7"
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
type: "text",
|
|
161
|
-
text: " "
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: "mention",
|
|
165
|
-
attrs: {
|
|
166
|
-
mentionedUserId: "3",
|
|
167
|
-
mentionedUserName: "Alex Rodriguez",
|
|
168
|
-
mentionedUserEmail: "alex.rodriguez@example.com",
|
|
169
|
-
authorId: "1",
|
|
170
|
-
mentionId: "mention-8"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
}]
|
|
175
|
-
}, r = {
|
|
176
|
-
canResolve: !1,
|
|
177
|
-
canEdit: !0,
|
|
178
|
-
canDelete: !0,
|
|
179
|
-
canReply: !0
|
|
180
|
-
}, i = {
|
|
181
|
-
canResolve: !0,
|
|
182
|
-
canEdit: !0,
|
|
183
|
-
canDelete: !0,
|
|
184
|
-
canReply: !0
|
|
185
|
-
}, a = (e, t, n, i = r) => ({
|
|
186
|
-
id: e,
|
|
187
|
-
message: t,
|
|
188
|
-
createdAt: 1752664303265,
|
|
189
|
-
author: n,
|
|
190
|
-
permissions: i
|
|
191
|
-
}), o = [
|
|
192
|
-
a("1", t[0], e.LIAM_FOSTER, i),
|
|
193
|
-
a("2", t[1], e.SARAH_CHEN),
|
|
194
|
-
a("3", t[2], e.ALEX_RODRIGUEZ),
|
|
195
|
-
a("4", t[3], e.EMMA_WILSON),
|
|
196
|
-
a("5", t[4], e.ALEX_RODRIGUEZ)
|
|
197
|
-
], s = a("1", n, e.LIAM_FOSTER, i);
|
|
198
|
-
export { r as DEFAULT_PERMISSIONS, i as DEFAULT_ROOT_PERMISSIONS, n as MOCK_ANNOTATIONS_MESSAGE_CONTENT, o as MOCK_ANNOTATION_MESSAGES, t as MOCK_MESSAGE_CONTENT, s as MOCK_SINGLE_ANNOTATION_MESSAGE, a as createMockAnnotationMessage };
|
|
@@ -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 };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MOCK_USER_SELECTOR_USERS as e } from "./mock-users.js";
|
|
2
|
-
var t = (e) => e ? e.type === "doc" && e.content ? e : {
|
|
3
|
-
type: "doc",
|
|
4
|
-
content: [e]
|
|
5
|
-
} : {
|
|
6
|
-
type: "doc",
|
|
7
|
-
content: []
|
|
8
|
-
}, n = (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)), r = () => async () => (await new Promise((e) => setTimeout(e, 50)), {});
|
|
9
|
-
export { t as createDocumentNode, r as createMockFetchAvatarUrls, n as createMockFetchUsers };
|