@instructure/platform-notebook 1.11.1 → 1.12.0
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/dist/ContentWithNoteWrapper.d.ts +1 -1
- package/dist/ContentWithNoteWrapper.d.ts.map +1 -1
- package/dist/Highlight.d.ts.map +1 -1
- package/dist/NoteCard.d.ts.map +1 -1
- package/dist/NoteChip.d.ts +2 -1
- package/dist/NoteChip.d.ts.map +1 -1
- package/dist/NoteReactionMenu.d.ts +12 -1
- package/dist/NoteReactionMenu.d.ts.map +1 -1
- package/dist/NotesListView.d.ts.map +1 -1
- package/dist/SingleNote.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +954 -906
- package/locales/en.json +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Dialog as
|
|
19
|
-
import { TextArea as
|
|
20
|
-
import { Pill as
|
|
21
|
-
import { Pagination as
|
|
22
|
-
import { Spinner as
|
|
23
|
-
const
|
|
24
|
-
startContainer:
|
|
25
|
-
endContainer:
|
|
26
|
-
startOffset:
|
|
27
|
-
endOffset:
|
|
28
|
-
}),
|
|
29
|
-
start:
|
|
30
|
-
end:
|
|
31
|
-
}),
|
|
32
|
-
selectedText:
|
|
33
|
-
hasNoHighlightAnymore:
|
|
34
|
-
textPosition:
|
|
35
|
-
range:
|
|
36
|
-
pageLastModifiedAt:
|
|
1
|
+
import { jsx as i, jsxs as C, Fragment as De } from "react/jsx-runtime";
|
|
2
|
+
import { ScreenReaderContent as pe } from "@instructure/ui-a11y-content";
|
|
3
|
+
import { createContext as Ze, useContext as Je, useMemo as be, useReducer as et, useRef as P, forwardRef as Tt, useCallback as z, useEffect as K, useImperativeHandle as vt, useState as H } from "react";
|
|
4
|
+
import { createPortal as Ct } from "react-dom";
|
|
5
|
+
import { z as u } from "zod";
|
|
6
|
+
import It from "diff-match-patch";
|
|
7
|
+
import { useQueryClient as Pe, useMutation as _e, useQuery as Rt } from "@tanstack/react-query";
|
|
8
|
+
import { CloseButton as xt, Button as ee, IconButton as ye } from "@instructure/ui-buttons/v11_7";
|
|
9
|
+
import { Flex as R } from "@instructure/ui-flex/v11_7";
|
|
10
|
+
import { Heading as Ie } from "@instructure/ui-heading/v11_7";
|
|
11
|
+
import { Tray as wt } from "@instructure/ui-tray/v11_7";
|
|
12
|
+
import { View as Q } from "@instructure/ui-view/v11_7";
|
|
13
|
+
import { IconQuestionLine as Me, IconPinLine as Fe, NotebookInstUIIcon as Ot, IconWarningLine as kt, IconEditLine as Le, IconTrashLine as Ce, IconArrowStartLine as Lt } from "@instructure/ui-icons";
|
|
14
|
+
import { Menu as ge } from "@instructure/ui-menu/v11_7";
|
|
15
|
+
import { Text as V } from "@instructure/ui-text/v11_7";
|
|
16
|
+
import { TruncateText as ve } from "@instructure/ui-truncate-text/v11_7";
|
|
17
|
+
import { SimpleSelect as ze } from "@instructure/ui-simple-select/v11_7";
|
|
18
|
+
import { Dialog as At } from "@instructure/ui-dialog";
|
|
19
|
+
import { TextArea as tt } from "@instructure/ui-text-area/v11_7";
|
|
20
|
+
import { Pill as we } from "@instructure/ui-pill/v11_7";
|
|
21
|
+
import { Pagination as Dt } from "@instructure/ui-pagination/v11_7";
|
|
22
|
+
import { Spinner as Pt } from "@instructure/ui-spinner/v11_7";
|
|
23
|
+
const _t = u.object({
|
|
24
|
+
startContainer: u.string(),
|
|
25
|
+
endContainer: u.string(),
|
|
26
|
+
startOffset: u.number(),
|
|
27
|
+
endOffset: u.number()
|
|
28
|
+
}), Mt = u.object({
|
|
29
|
+
start: u.number(),
|
|
30
|
+
end: u.number()
|
|
31
|
+
}), Be = u.object({
|
|
32
|
+
selectedText: u.string(),
|
|
33
|
+
hasNoHighlightAnymore: u.boolean().optional(),
|
|
34
|
+
textPosition: Mt.nullable(),
|
|
35
|
+
range: _t.nullable(),
|
|
36
|
+
pageLastModifiedAt: u.string()
|
|
37
37
|
});
|
|
38
|
-
var
|
|
39
|
-
const
|
|
38
|
+
var O = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(O || {});
|
|
39
|
+
const Ue = u.enum([
|
|
40
40
|
"Important",
|
|
41
41
|
"Confusing"
|
|
42
42
|
/* CONFUSING */
|
|
43
|
-
]),
|
|
44
|
-
totalCount:
|
|
45
|
-
totalNrOfPages:
|
|
46
|
-
}),
|
|
47
|
-
id:
|
|
48
|
-
rootAccountUuid:
|
|
49
|
-
userId:
|
|
50
|
-
courseId:
|
|
51
|
-
objectId:
|
|
52
|
-
objectType:
|
|
53
|
-
userText:
|
|
54
|
-
reaction:
|
|
55
|
-
highlightData:
|
|
43
|
+
]), Ft = u.object({
|
|
44
|
+
totalCount: u.number().nullish(),
|
|
45
|
+
totalNrOfPages: u.number().nullish()
|
|
46
|
+
}), Re = u.object({
|
|
47
|
+
id: u.string(),
|
|
48
|
+
rootAccountUuid: u.string(),
|
|
49
|
+
userId: u.string(),
|
|
50
|
+
courseId: u.string(),
|
|
51
|
+
objectId: u.string(),
|
|
52
|
+
objectType: u.string(),
|
|
53
|
+
userText: u.string().optional(),
|
|
54
|
+
reaction: u.array(Ue),
|
|
55
|
+
highlightData: Be,
|
|
56
56
|
// Set by the host when the note's highlight is gone specifically because its source
|
|
57
57
|
// (the page/assignment/quiz it was captured from) was unpublished or deleted, as opposed
|
|
58
58
|
// to the note never having had a highlight. Selects the HighlightError reason in NoteCard.
|
|
59
|
-
highlightSourceUnavailable:
|
|
60
|
-
createdAt:
|
|
61
|
-
updatedAt:
|
|
62
|
-
}),
|
|
63
|
-
cursor:
|
|
64
|
-
node:
|
|
59
|
+
highlightSourceUnavailable: u.boolean().optional(),
|
|
60
|
+
createdAt: u.string(),
|
|
61
|
+
updatedAt: u.string()
|
|
62
|
+
}), Bt = u.object({
|
|
63
|
+
cursor: u.string(),
|
|
64
|
+
node: Re
|
|
65
65
|
});
|
|
66
|
-
|
|
67
|
-
notes:
|
|
68
|
-
edges:
|
|
69
|
-
nodes:
|
|
70
|
-
pageInfo:
|
|
66
|
+
u.object({
|
|
67
|
+
notes: u.object({
|
|
68
|
+
edges: u.array(Bt),
|
|
69
|
+
nodes: u.array(Re),
|
|
70
|
+
pageInfo: Ft
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
|
-
const
|
|
74
|
-
type:
|
|
75
|
-
id:
|
|
76
|
-
}),
|
|
77
|
-
courseId:
|
|
78
|
-
learningObject:
|
|
79
|
-
reactions:
|
|
73
|
+
const Ut = u.object({
|
|
74
|
+
type: u.string(),
|
|
75
|
+
id: u.string()
|
|
76
|
+
}), Ht = u.object({
|
|
77
|
+
courseId: u.string().optional(),
|
|
78
|
+
learningObject: Ut.optional(),
|
|
79
|
+
reactions: u.array(u.string()).optional()
|
|
80
80
|
}).optional();
|
|
81
|
-
|
|
82
|
-
courseId:
|
|
83
|
-
filter:
|
|
84
|
-
offset:
|
|
85
|
-
pageSize:
|
|
81
|
+
u.object({
|
|
82
|
+
courseId: u.string().optional(),
|
|
83
|
+
filter: Ht,
|
|
84
|
+
offset: u.number().optional(),
|
|
85
|
+
pageSize: u.number().optional()
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
courseId:
|
|
89
|
-
objectId:
|
|
90
|
-
objectType:
|
|
91
|
-
userText:
|
|
92
|
-
reaction:
|
|
93
|
-
highlightData:
|
|
87
|
+
u.object({
|
|
88
|
+
courseId: u.string(),
|
|
89
|
+
objectId: u.string(),
|
|
90
|
+
objectType: u.string(),
|
|
91
|
+
userText: u.string().optional(),
|
|
92
|
+
reaction: u.array(Ue),
|
|
93
|
+
highlightData: Be
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
createNote:
|
|
95
|
+
u.object({
|
|
96
|
+
createNote: Re
|
|
97
97
|
});
|
|
98
|
-
|
|
99
|
-
id:
|
|
100
|
-
userText:
|
|
101
|
-
reaction:
|
|
102
|
-
highlightData:
|
|
98
|
+
u.object({
|
|
99
|
+
id: u.string(),
|
|
100
|
+
userText: u.string().optional(),
|
|
101
|
+
reaction: u.array(Ue),
|
|
102
|
+
highlightData: Be
|
|
103
103
|
});
|
|
104
|
-
|
|
105
|
-
updateNote:
|
|
104
|
+
u.object({
|
|
105
|
+
updateNote: Re
|
|
106
106
|
});
|
|
107
|
-
|
|
108
|
-
deleteNote:
|
|
107
|
+
u.object({
|
|
108
|
+
deleteNote: u.string()
|
|
109
109
|
});
|
|
110
|
-
var
|
|
111
|
-
class
|
|
110
|
+
var nt = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(nt || {});
|
|
111
|
+
class te {
|
|
112
112
|
constructor(e, n) {
|
|
113
113
|
this.start = e, this.end = n;
|
|
114
114
|
}
|
|
115
115
|
toRange() {
|
|
116
116
|
let e, n;
|
|
117
117
|
try {
|
|
118
|
-
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] =
|
|
118
|
+
this.start.element === this.end.element && this.start.offset <= this.end.offset ? [e, n] = rt(this.start.element, this.start.offset, this.end.offset) : (e = this.start.resolve({
|
|
119
119
|
direction: 1
|
|
120
120
|
/* FORWARDS */
|
|
121
121
|
}), n = this.end.resolve({
|
|
@@ -131,23 +131,23 @@ class oe {
|
|
|
131
131
|
return o.setStart(e.node, e.offset), o.setEnd(n.node, n.offset), o;
|
|
132
132
|
}
|
|
133
133
|
static fromRange(e) {
|
|
134
|
-
const n =
|
|
135
|
-
return !n || !o ? null : new
|
|
134
|
+
const n = q.fromPoint(e.startContainer, e.startOffset), o = q.fromPoint(e.endContainer, e.endOffset);
|
|
135
|
+
return !n || !o ? null : new te(n, o);
|
|
136
136
|
}
|
|
137
137
|
static fromOffsets(e, n, o) {
|
|
138
|
-
return new
|
|
138
|
+
return new te(new q(e, n), new q(e, o));
|
|
139
139
|
}
|
|
140
140
|
relativeTo(e) {
|
|
141
|
-
return new
|
|
141
|
+
return new te(this.start.relativeTo(e), this.end.relativeTo(e));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
class
|
|
144
|
+
class q {
|
|
145
145
|
constructor(e, n) {
|
|
146
146
|
n < 0 && console.error("Offset is invalid"), this.element = e, this.offset = n;
|
|
147
147
|
}
|
|
148
148
|
resolve(e = {}) {
|
|
149
149
|
try {
|
|
150
|
-
const n =
|
|
150
|
+
const n = rt(this.element, this.offset)[0];
|
|
151
151
|
if (!n)
|
|
152
152
|
throw new Error("Could not resolve offset to a text node");
|
|
153
153
|
return n;
|
|
@@ -155,7 +155,7 @@ class X {
|
|
|
155
155
|
if (this.offset === 0 && e.direction !== void 0) {
|
|
156
156
|
const o = document.createTreeWalker(this.element.getRootNode(), NodeFilter.SHOW_TEXT);
|
|
157
157
|
o.currentNode = this.element;
|
|
158
|
-
const r = e.direction ===
|
|
158
|
+
const r = e.direction === nt.FORWARDS, s = r ? o.nextNode() : o.previousNode();
|
|
159
159
|
if (!s)
|
|
160
160
|
throw n;
|
|
161
161
|
return { node: s, offset: r ? 0 : s.data.length };
|
|
@@ -166,9 +166,9 @@ class X {
|
|
|
166
166
|
static fromCharOffset(e, n) {
|
|
167
167
|
switch (e.nodeType) {
|
|
168
168
|
case Node.TEXT_NODE:
|
|
169
|
-
return
|
|
169
|
+
return q.fromPoint(e, n);
|
|
170
170
|
case Node.ELEMENT_NODE:
|
|
171
|
-
return new
|
|
171
|
+
return new q(e, n);
|
|
172
172
|
default:
|
|
173
173
|
return console.error("Node is not an element or text node"), null;
|
|
174
174
|
}
|
|
@@ -180,16 +180,16 @@ class X {
|
|
|
180
180
|
return console.error("Text node offset is out of range"), null;
|
|
181
181
|
if (!e.parentElement)
|
|
182
182
|
return console.error("Text node has no parent"), null;
|
|
183
|
-
const o =
|
|
184
|
-
return new
|
|
183
|
+
const o = Xe(e) + n;
|
|
184
|
+
return new q(e.parentElement, o);
|
|
185
185
|
}
|
|
186
186
|
case Node.ELEMENT_NODE: {
|
|
187
187
|
if (n < 0 || n > e.childNodes.length)
|
|
188
188
|
return console.error("Child node offset is out of range"), null;
|
|
189
189
|
let o = 0;
|
|
190
190
|
for (let r = 0; r < n; r++)
|
|
191
|
-
o +=
|
|
192
|
-
return new
|
|
191
|
+
o += ot(e.childNodes[r]);
|
|
192
|
+
return new q(e, o);
|
|
193
193
|
}
|
|
194
194
|
default:
|
|
195
195
|
return console.error("Point is not in an element or text node"), null;
|
|
@@ -200,34 +200,34 @@ class X {
|
|
|
200
200
|
throw new Error("Parent is not an ancestor of current element");
|
|
201
201
|
let n = this.element, o = this.offset;
|
|
202
202
|
for (; n !== e; )
|
|
203
|
-
o +=
|
|
204
|
-
return new
|
|
203
|
+
o += Xe(n), n.parentElement && (n = n.parentElement);
|
|
204
|
+
return new q(n, o);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const $t = (t) => {
|
|
208
208
|
const e = t.nodeName.toLowerCase();
|
|
209
209
|
return e === "#text" ? "text()" : e;
|
|
210
210
|
};
|
|
211
|
-
function
|
|
211
|
+
function Gt(t) {
|
|
212
212
|
let e = 0, n = t;
|
|
213
213
|
for (; n; )
|
|
214
214
|
n.nodeName === t.nodeName && (e += 1), n = n.previousSibling;
|
|
215
215
|
return e;
|
|
216
216
|
}
|
|
217
|
-
const
|
|
218
|
-
const e =
|
|
217
|
+
const jt = (t) => {
|
|
218
|
+
const e = $t(t), n = Gt(t);
|
|
219
219
|
return `${e}[${n}]`;
|
|
220
|
-
},
|
|
220
|
+
}, Ke = (t, e) => {
|
|
221
221
|
let n = "", o = t;
|
|
222
222
|
for (; o !== e; ) {
|
|
223
223
|
if (!o) {
|
|
224
224
|
console.error("Node is not a descendant of root");
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
n = `${
|
|
227
|
+
n = `${jt(o)}/${n}`, o = o.parentNode;
|
|
228
228
|
}
|
|
229
229
|
return n = `/${n}`, n = n.replace(/\/$/, ""), n;
|
|
230
|
-
},
|
|
230
|
+
}, Wt = (t, e, n) => {
|
|
231
231
|
const o = e.toUpperCase();
|
|
232
232
|
let r = -1;
|
|
233
233
|
for (let s = 0; s < t.children.length; s++) {
|
|
@@ -236,7 +236,7 @@ const _t = (t) => {
|
|
|
236
236
|
return l;
|
|
237
237
|
}
|
|
238
238
|
return null;
|
|
239
|
-
},
|
|
239
|
+
}, zt = (t, e) => {
|
|
240
240
|
if (!(t.match(/^(\/[A-Za-z0-9-]+(\[[0-9]+])?)+$/) !== null))
|
|
241
241
|
return console.error("Expression is not a simple XPath"), null;
|
|
242
242
|
const o = t.split("/");
|
|
@@ -247,22 +247,22 @@ const _t = (t) => {
|
|
|
247
247
|
const f = s.indexOf("[");
|
|
248
248
|
if (f !== -1) {
|
|
249
249
|
l = s.slice(0, f);
|
|
250
|
-
const
|
|
251
|
-
if (a = Number.parseInt(
|
|
250
|
+
const g = s.slice(f + 1, s.indexOf("]"));
|
|
251
|
+
if (a = Number.parseInt(g, 10) - 1, a < 0)
|
|
252
252
|
return null;
|
|
253
253
|
} else
|
|
254
254
|
l = s, a = 0;
|
|
255
|
-
const
|
|
256
|
-
if (!
|
|
255
|
+
const m = Wt(r, l, a);
|
|
256
|
+
if (!m)
|
|
257
257
|
return null;
|
|
258
|
-
r =
|
|
258
|
+
r = m;
|
|
259
259
|
}
|
|
260
260
|
return r;
|
|
261
|
-
},
|
|
261
|
+
}, qe = (t, e = document.body) => {
|
|
262
262
|
if (t === "")
|
|
263
263
|
return e;
|
|
264
264
|
try {
|
|
265
|
-
return
|
|
265
|
+
return zt(t, e);
|
|
266
266
|
} catch {
|
|
267
267
|
return document.evaluate(`.${t}`, e, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
|
|
268
268
|
}
|
|
@@ -277,16 +277,16 @@ class ce {
|
|
|
277
277
|
static fromSelector(e, n) {
|
|
278
278
|
if ((n == null ? void 0 : n.startContainer) == null || (n == null ? void 0 : n.endContainer) == null)
|
|
279
279
|
return console.error("No start or end container in selector"), null;
|
|
280
|
-
const o =
|
|
280
|
+
const o = qe(n.startContainer, e);
|
|
281
281
|
if (!o)
|
|
282
282
|
return console.error("Failed to resolve startContainer XPath"), null;
|
|
283
|
-
const r =
|
|
283
|
+
const r = qe(n.endContainer, e);
|
|
284
284
|
if (!r)
|
|
285
285
|
return console.error("Failed to resolve endContainer XPath"), null;
|
|
286
|
-
const s =
|
|
286
|
+
const s = q.fromCharOffset(o, n.startOffset), l = q.fromCharOffset(r, n.endOffset);
|
|
287
287
|
if (!s || !l)
|
|
288
288
|
return null;
|
|
289
|
-
const a = new
|
|
289
|
+
const a = new te(s, l).toRange();
|
|
290
290
|
return a ? !e.contains(a.startContainer) || !e.contains(a.endContainer) ? (console.error("Resolved range escapes root"), null) : new ce(e, a) : null;
|
|
291
291
|
}
|
|
292
292
|
toRange() {
|
|
@@ -294,7 +294,7 @@ class ce {
|
|
|
294
294
|
}
|
|
295
295
|
toSelector() {
|
|
296
296
|
var s;
|
|
297
|
-
const e = (s =
|
|
297
|
+
const e = (s = te.fromRange(this.range)) == null ? void 0 : s.toRange(), n = e && te.fromRange(e), o = n && Ke(n.start.element, this.root), r = n && Ke(n.end.element, this.root);
|
|
298
298
|
return !n || o == null || r == null ? null : {
|
|
299
299
|
startContainer: o,
|
|
300
300
|
startOffset: n.start.offset,
|
|
@@ -303,17 +303,17 @@ class ce {
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
class
|
|
306
|
+
class re {
|
|
307
307
|
constructor(e, n, o) {
|
|
308
308
|
this.root = e, this.start = n, this.end = o;
|
|
309
309
|
}
|
|
310
310
|
static fromRange(e, n) {
|
|
311
311
|
var r;
|
|
312
|
-
const o = (r =
|
|
313
|
-
return o ? new
|
|
312
|
+
const o = (r = te.fromRange(n)) == null ? void 0 : r.relativeTo(e);
|
|
313
|
+
return o ? new re(e, o.start.offset, o.end.offset) : null;
|
|
314
314
|
}
|
|
315
315
|
static fromSelector(e, n) {
|
|
316
|
-
return new
|
|
316
|
+
return new re(e, n.start, n.end);
|
|
317
317
|
}
|
|
318
318
|
toSelector() {
|
|
319
319
|
return {
|
|
@@ -322,10 +322,10 @@ class le {
|
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
toRange() {
|
|
325
|
-
return
|
|
325
|
+
return te.fromOffsets(this.root, this.start, this.end).toRange();
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
const
|
|
328
|
+
const ot = (t) => {
|
|
329
329
|
var e;
|
|
330
330
|
switch (t.nodeType) {
|
|
331
331
|
case Node.ELEMENT_NODE:
|
|
@@ -334,12 +334,12 @@ const et = (t) => {
|
|
|
334
334
|
default:
|
|
335
335
|
return 0;
|
|
336
336
|
}
|
|
337
|
-
},
|
|
337
|
+
}, Xe = (t) => {
|
|
338
338
|
let e = t.previousSibling, n = 0;
|
|
339
339
|
for (; e; )
|
|
340
|
-
n +=
|
|
340
|
+
n += ot(e), e = e.previousSibling;
|
|
341
341
|
return n;
|
|
342
|
-
},
|
|
342
|
+
}, rt = (t, ...e) => {
|
|
343
343
|
let n = e.shift();
|
|
344
344
|
const o = t.ownerDocument.createNodeIterator(t, NodeFilter.SHOW_TEXT), r = [];
|
|
345
345
|
let s = o.nextNode(), l = null, a = 0;
|
|
@@ -348,63 +348,63 @@ const et = (t) => {
|
|
|
348
348
|
for (; n !== void 0 && l && a === n; )
|
|
349
349
|
r.push({ node: l, offset: l.data.length }), n = e.shift();
|
|
350
350
|
return n !== void 0 && console.error("Offset exceeds text length"), r;
|
|
351
|
-
},
|
|
351
|
+
}, Kt = (t, e, n, o) => {
|
|
352
352
|
const r = n - e;
|
|
353
|
-
return Math.abs(r - o) <= 5 ?
|
|
353
|
+
return Math.abs(r - o) <= 5 ? re.fromSelector(t, {
|
|
354
354
|
start: e,
|
|
355
355
|
end: n
|
|
356
356
|
}) : null;
|
|
357
|
-
},
|
|
358
|
-
const r = new
|
|
357
|
+
}, qt = (t, e, n, o) => {
|
|
358
|
+
const r = new It();
|
|
359
359
|
r.Match_Distance = 5e3;
|
|
360
360
|
const s = t.textContent;
|
|
361
361
|
if (!s)
|
|
362
362
|
return null;
|
|
363
363
|
if (e.length > 32) {
|
|
364
364
|
const l = e.slice(0, 32), a = e.slice(-32), f = o - n;
|
|
365
|
-
let
|
|
366
|
-
const
|
|
367
|
-
if (
|
|
365
|
+
let m = r.match_main(s, l, n);
|
|
366
|
+
const g = r.match_main(s, a, o), c = g + a.length;
|
|
367
|
+
if (m === -1 || g === -1)
|
|
368
368
|
return null;
|
|
369
|
-
const
|
|
370
|
-
if ((
|
|
371
|
-
return
|
|
372
|
-
if (
|
|
373
|
-
return
|
|
374
|
-
start:
|
|
369
|
+
const N = c - m, S = Math.abs(N - f);
|
|
370
|
+
if ((m > c || S > 5) && (r.Match_Distance = e.length + 100, m = r.match_main(s, l, c), m !== -1 && m < c))
|
|
371
|
+
return Kt(t, m, c, f);
|
|
372
|
+
if (m < c && S <= 5)
|
|
373
|
+
return re.fromSelector(t, {
|
|
374
|
+
start: m,
|
|
375
375
|
end: c
|
|
376
376
|
});
|
|
377
377
|
} else {
|
|
378
378
|
const l = r.match_main(s, e, n);
|
|
379
379
|
if (l !== -1)
|
|
380
|
-
return
|
|
380
|
+
return re.fromSelector(t, {
|
|
381
381
|
start: l,
|
|
382
382
|
end: l + e.length
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
return null;
|
|
386
|
-
},
|
|
386
|
+
}, Xt = (t, e) => {
|
|
387
387
|
if (!e) return null;
|
|
388
388
|
const { highlightData: n } = t, { textPosition: o, selectedText: r } = n;
|
|
389
|
-
return
|
|
389
|
+
return qt(
|
|
390
390
|
e,
|
|
391
391
|
r,
|
|
392
392
|
(o == null ? void 0 : o.start) ?? 0,
|
|
393
393
|
(o == null ? void 0 : o.end) ?? 0
|
|
394
394
|
);
|
|
395
|
-
},
|
|
395
|
+
}, Vt = (t, e, n) => {
|
|
396
396
|
const o = [], r = [];
|
|
397
397
|
for (const s of e) {
|
|
398
|
-
const l =
|
|
398
|
+
const l = Xt(s, t);
|
|
399
399
|
if (l) {
|
|
400
|
-
const a = l.toRange(), f = a && ce.fromRange(t, a),
|
|
400
|
+
const a = l.toRange(), f = a && ce.fromRange(t, a), m = (a == null ? void 0 : a.toString().trim()) || s.highlightData.selectedText;
|
|
401
401
|
o.push({
|
|
402
402
|
id: s.id,
|
|
403
403
|
reaction: s.reaction,
|
|
404
404
|
userText: s.userText,
|
|
405
405
|
highlightData: {
|
|
406
406
|
...s.highlightData,
|
|
407
|
-
selectedText:
|
|
407
|
+
selectedText: m,
|
|
408
408
|
hasNoHighlightAnymore: !1,
|
|
409
409
|
range: (f == null ? void 0 : f.toSelector()) ?? null,
|
|
410
410
|
textPosition: l.toSelector(),
|
|
@@ -424,63 +424,63 @@ const et = (t) => {
|
|
|
424
424
|
}) : r.push(s.id);
|
|
425
425
|
}
|
|
426
426
|
return { notesForUpdate: o, noteIdsForDelete: r };
|
|
427
|
-
},
|
|
427
|
+
}, Ve = (t, e) => {
|
|
428
428
|
var l;
|
|
429
429
|
if (!e) return;
|
|
430
430
|
const { highlightData: n, id: o } = t, { range: r } = n ?? {};
|
|
431
|
-
r && ((l = ce.fromSelector(e, r)) == null ? void 0 : l.toRange()) &&
|
|
432
|
-
},
|
|
431
|
+
r && ((l = ce.fromSelector(e, r)) == null ? void 0 : l.toRange()) && cn({ id: o });
|
|
432
|
+
}, Qt = (t) => {
|
|
433
433
|
const n = document.querySelector(
|
|
434
434
|
`[data-highlight-id="${CSS.escape(t)}"].highlight-content`
|
|
435
|
-
) ?? document.getElementById(
|
|
435
|
+
) ?? document.getElementById(xe(t));
|
|
436
436
|
if (n) {
|
|
437
437
|
const o = n.getBoundingClientRect();
|
|
438
438
|
o.top >= 0 && o.bottom <= (window.innerHeight || document.documentElement.clientHeight) || n.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
439
439
|
}
|
|
440
|
-
},
|
|
440
|
+
}, Ee = 90, Se = 172, Yt = (t) => {
|
|
441
441
|
const e = t.getClientRects();
|
|
442
442
|
if (!e.length)
|
|
443
443
|
return null;
|
|
444
|
-
const n = e[0], o = e[e.length - 1], r = 4, s = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, f = (
|
|
445
|
-
const x =
|
|
446
|
-
return
|
|
447
|
-
},
|
|
448
|
-
const x =
|
|
449
|
-
return
|
|
444
|
+
const n = e[0], o = e[e.length - 1], r = 4, s = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, f = (b) => {
|
|
445
|
+
const x = b + Se;
|
|
446
|
+
return b >= s && x <= l - s;
|
|
447
|
+
}, m = (b) => {
|
|
448
|
+
const x = b + Ee;
|
|
449
|
+
return b >= s && x <= a - s;
|
|
450
450
|
};
|
|
451
|
-
let
|
|
452
|
-
const c = n.right -
|
|
451
|
+
let g;
|
|
452
|
+
const c = n.right - Se;
|
|
453
453
|
if (f(c))
|
|
454
|
-
|
|
454
|
+
g = c;
|
|
455
455
|
else {
|
|
456
|
-
const
|
|
457
|
-
if (f(
|
|
458
|
-
|
|
456
|
+
const b = n.left;
|
|
457
|
+
if (f(b))
|
|
458
|
+
g = b;
|
|
459
459
|
else {
|
|
460
|
-
const
|
|
461
|
-
f(
|
|
460
|
+
const h = (n.left + n.right) / 2 - Se / 2;
|
|
461
|
+
f(h) ? g = h : c < s ? g = s : g = l - Se - s;
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
let
|
|
465
|
-
const
|
|
466
|
-
if (
|
|
467
|
-
|
|
464
|
+
let N;
|
|
465
|
+
const S = o.bottom + r;
|
|
466
|
+
if (m(S))
|
|
467
|
+
N = S;
|
|
468
468
|
else {
|
|
469
|
-
const
|
|
470
|
-
|
|
469
|
+
const b = n.top - Ee - r;
|
|
470
|
+
m(b) ? N = b : S + Ee > a - s ? N = a - Ee - s : N = s;
|
|
471
471
|
}
|
|
472
|
-
return { top:
|
|
473
|
-
},
|
|
472
|
+
return { top: N, left: g };
|
|
473
|
+
}, Zt = (t, e) => {
|
|
474
474
|
for (const n of e)
|
|
475
475
|
if (t.start < n.end && t.end > n.start)
|
|
476
476
|
return !0;
|
|
477
477
|
return !1;
|
|
478
|
-
},
|
|
478
|
+
}, He = (t) => `highlight-wrapper-${t}`, xe = (t) => `${He(t)}-start`, st = (t) => `${He(t)}-end`, Ne = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, Jt = "2px", en = "3px", tn = "1px", it = "3px", nn = "1px", lt = "Notebook note", $e = (t, e) => {
|
|
479
479
|
const n = Number.parseInt(t.slice(1, 3), 16), o = Number.parseInt(t.slice(3, 5), 16), r = Number.parseInt(t.slice(5, 7), 16);
|
|
480
480
|
return `rgba(${n}, ${o}, ${r}, ${e})`;
|
|
481
|
-
},
|
|
482
|
-
t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${
|
|
483
|
-
},
|
|
481
|
+
}, at = (t, e, n, o, r) => {
|
|
482
|
+
t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${tn} ${r} ${o}`, t.style.outlineOffset = nn, t.style.borderRadius = it, t.style.fontWeight = "bold") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "");
|
|
483
|
+
}, on = /* @__PURE__ */ new Set([
|
|
484
484
|
"AREA",
|
|
485
485
|
"BASE",
|
|
486
486
|
"BR",
|
|
@@ -495,15 +495,15 @@ const et = (t) => {
|
|
|
495
495
|
"SOURCE",
|
|
496
496
|
"TRACK",
|
|
497
497
|
"WBR"
|
|
498
|
-
]),
|
|
498
|
+
]), Qe = (t, e) => {
|
|
499
499
|
const n = t.cloneRange();
|
|
500
500
|
n.collapse(e);
|
|
501
501
|
const o = n.startContainer;
|
|
502
|
-
if (!(o.nodeType === Node.ELEMENT_NODE &&
|
|
502
|
+
if (!(o.nodeType === Node.ELEMENT_NODE && on.has(o.tagName)) || !o.parentNode)
|
|
503
503
|
return n;
|
|
504
504
|
const s = o.parentNode, l = Array.from(s.childNodes).indexOf(o), a = document.createRange();
|
|
505
505
|
return a.setStart(s, l), a.collapse(!0), a;
|
|
506
|
-
},
|
|
506
|
+
}, rn = (t, e) => {
|
|
507
507
|
var n;
|
|
508
508
|
try {
|
|
509
509
|
const o = ((n = e.nodeValue) == null ? void 0 : n.length) ?? e.childNodes.length;
|
|
@@ -511,7 +511,7 @@ const et = (t) => {
|
|
|
511
511
|
} catch {
|
|
512
512
|
return !1;
|
|
513
513
|
}
|
|
514
|
-
},
|
|
514
|
+
}, sn = (t) => {
|
|
515
515
|
var s;
|
|
516
516
|
if (t.collapsed)
|
|
517
517
|
return [];
|
|
@@ -521,7 +521,7 @@ const et = (t) => {
|
|
|
521
521
|
const n = [], o = (s = e == null ? void 0 : e.ownerDocument) == null ? void 0 : s.createNodeIterator(e, NodeFilter.SHOW_TEXT);
|
|
522
522
|
let r = (o == null ? void 0 : o.nextNode()) || null;
|
|
523
523
|
for (; r; ) {
|
|
524
|
-
if (!
|
|
524
|
+
if (!rn(t, r)) {
|
|
525
525
|
r = (o == null ? void 0 : o.nextNode()) || null;
|
|
526
526
|
continue;
|
|
527
527
|
}
|
|
@@ -533,129 +533,129 @@ const et = (t) => {
|
|
|
533
533
|
l === t.endContainer && t.endOffset < l.data.length && l.splitText(t.endOffset), n.push(l), r = (o == null ? void 0 : o.nextNode()) || null;
|
|
534
534
|
}
|
|
535
535
|
return n;
|
|
536
|
-
},
|
|
536
|
+
}, ln = (t, e, n) => {
|
|
537
537
|
if (t.collapsed) return;
|
|
538
|
-
const o = e.id ?? "", r =
|
|
539
|
-
if (document.getElementById(
|
|
540
|
-
|
|
538
|
+
const o = e.id ?? "", r = He(o);
|
|
539
|
+
if (document.getElementById(xe(o))) {
|
|
540
|
+
an(e, n);
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
|
-
const l = e.type ===
|
|
543
|
+
const l = e.type === O.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, a = e.id === e.selectedNoteId, f = a ? l : $e(l, 0.5), m = e.type === O.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, g = e.type === O.IMPORTANT ? "solid" : "dashed", c = document.createElement("span");
|
|
544
544
|
c.id = `${r}-start`, c.className = "highlight-marker-start", c.dataset.highlightId = o || "";
|
|
545
|
-
const
|
|
546
|
-
c.setAttribute("role", "button"), c.setAttribute("tabindex", "0"), c.setAttribute("aria-label",
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
const
|
|
552
|
-
|
|
545
|
+
const N = e.labelPrefix ?? lt;
|
|
546
|
+
c.setAttribute("role", "button"), c.setAttribute("tabindex", "0"), c.setAttribute("aria-label", N), c.setAttribute("aria-haspopup", "dialog"), c.setAttribute("aria-expanded", String(a && !!e.isTrayOpen)), a && c.setAttribute("aria-current", "true"), e.popupId && c.setAttribute("aria-controls", e.popupId), c.style.position = "relative", c.style.fontSize = "0", c.style.lineHeight = "0", c.style.width = "0", c.style.height = "0", c.style.margin = "0", c.style.padding = "0", c.style.border = "0", c.style.outline = "none";
|
|
547
|
+
const S = document.createElement("span");
|
|
548
|
+
S.id = st(o), S.className = "highlight-marker-end", S.dataset.highlightId = o || "", Qe(t, !1).insertNode(S), Qe(t, !0).insertNode(c);
|
|
549
|
+
const h = document.createRange();
|
|
550
|
+
h.setStartAfter(c), h.setEndBefore(S);
|
|
551
|
+
const $ = sn(h).filter((y) => y.textContent && y.textContent.length > 0);
|
|
552
|
+
$.forEach((y, v) => {
|
|
553
553
|
var j;
|
|
554
|
-
const
|
|
555
|
-
if ((
|
|
556
|
-
const
|
|
554
|
+
const _ = y.parentElement;
|
|
555
|
+
if ((_ == null ? void 0 : _.dataset.highlightId) === o) return;
|
|
556
|
+
const A = v === 0, G = v === $.length - 1, E = $.length === 1;
|
|
557
557
|
let w;
|
|
558
|
-
E ? w = "single" :
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
}), (j =
|
|
564
|
-
}), c.addEventListener("click", (
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
}), c.addEventListener("keydown", (
|
|
568
|
-
var
|
|
569
|
-
if (
|
|
570
|
-
|
|
571
|
-
else if (
|
|
572
|
-
const
|
|
573
|
-
for (const
|
|
574
|
-
const G =
|
|
558
|
+
E ? w = "single" : A ? w = "first" : G ? w = "last" : w = "middle";
|
|
559
|
+
const I = document.createElement("span");
|
|
560
|
+
I.className = "highlight-content", I.dataset.highlightId = o || "", I.dataset.position = w, I.style.textDecorationLine = "underline", I.style.textDecorationThickness = n.borderWidthSmall, I.style.textUnderlineOffset = n.underlineOffset, I.style.cursor = "pointer", at(I, a, f, m, g), I.addEventListener("click", (J) => {
|
|
561
|
+
var X;
|
|
562
|
+
J.target.tagName !== "A" && ((X = e.onClick) == null || X.call(e));
|
|
563
|
+
}), (j = y.parentNode) == null || j.insertBefore(I, y), I.appendChild(y);
|
|
564
|
+
}), c.addEventListener("click", (y) => {
|
|
565
|
+
var v;
|
|
566
|
+
y.target.tagName !== "A" && ((v = e.onClick) == null || v.call(e));
|
|
567
|
+
}), c.addEventListener("keydown", (y) => {
|
|
568
|
+
var v;
|
|
569
|
+
if (y.key === "Enter" || y.key === " ")
|
|
570
|
+
y.preventDefault(), (v = e.onClick) == null || v.call(e);
|
|
571
|
+
else if (y.key === "Tab" && !y.shiftKey) {
|
|
572
|
+
const _ = document.querySelectorAll(Ne(o));
|
|
573
|
+
for (const A of _) {
|
|
574
|
+
const G = A.querySelector("a");
|
|
575
575
|
if (G) {
|
|
576
|
-
|
|
576
|
+
y.preventDefault(), G.focus();
|
|
577
577
|
break;
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
}), c.addEventListener("focus", () => {
|
|
582
582
|
document.querySelectorAll(
|
|
583
|
-
`.highlight-content${
|
|
584
|
-
).forEach((
|
|
585
|
-
|
|
583
|
+
`.highlight-content${Ne(o)}`
|
|
584
|
+
).forEach((v) => {
|
|
585
|
+
v.style.boxShadow = `0 0 0 ${Jt} ${n.colors.focusOutline}`, v.style.borderRadius = en;
|
|
586
586
|
});
|
|
587
587
|
}), c.addEventListener("blur", () => {
|
|
588
588
|
document.querySelectorAll(
|
|
589
|
-
`.highlight-content${
|
|
590
|
-
).forEach((
|
|
591
|
-
|
|
589
|
+
`.highlight-content${Ne(o)}`
|
|
590
|
+
).forEach((v) => {
|
|
591
|
+
v.style.boxShadow = "", v.style.borderRadius = v.dataset.selected ? it : "";
|
|
592
592
|
});
|
|
593
593
|
});
|
|
594
594
|
};
|
|
595
|
-
function
|
|
596
|
-
const n = t.type ===
|
|
595
|
+
function an(t, e) {
|
|
596
|
+
const n = t.type === O.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : $e(n, 0.5), s = t.type === O.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, l = t.type === O.IMPORTANT ? "solid" : "dashed";
|
|
597
597
|
document.querySelectorAll(
|
|
598
|
-
`.highlight-content${
|
|
599
|
-
).forEach((
|
|
600
|
-
|
|
598
|
+
`.highlight-content${Ne(t.id ?? "")}`
|
|
599
|
+
).forEach((m) => {
|
|
600
|
+
at(m, o, r, s, l);
|
|
601
601
|
});
|
|
602
602
|
const f = document.getElementById(
|
|
603
|
-
|
|
603
|
+
xe(t.id ?? "")
|
|
604
604
|
);
|
|
605
|
-
f && (f.setAttribute("aria-label", t.labelPrefix ??
|
|
605
|
+
f && (f.setAttribute("aria-label", t.labelPrefix ?? lt), f.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? f.setAttribute("aria-current", "true") : f.removeAttribute("aria-current"));
|
|
606
606
|
}
|
|
607
|
-
const
|
|
608
|
-
const e = t.id ?? "", n = document.getElementById(
|
|
607
|
+
const cn = (t) => {
|
|
608
|
+
const e = t.id ?? "", n = document.getElementById(xe(e)), o = document.getElementById(st(e));
|
|
609
609
|
document.querySelectorAll(
|
|
610
|
-
|
|
610
|
+
Ne(e)
|
|
611
611
|
).forEach((s) => {
|
|
612
612
|
var l;
|
|
613
613
|
for (; s.firstChild; )
|
|
614
614
|
(l = s.parentNode) == null || l.insertBefore(s.firstChild, s);
|
|
615
615
|
s.remove();
|
|
616
616
|
}), n == null || n.remove(), o == null || o.remove();
|
|
617
|
-
},
|
|
617
|
+
}, he = {
|
|
618
618
|
all: ["notebook"],
|
|
619
619
|
notes: (t) => ["notebook", "notes", t]
|
|
620
620
|
};
|
|
621
|
-
function
|
|
622
|
-
const e =
|
|
623
|
-
return
|
|
621
|
+
function dn(t) {
|
|
622
|
+
const e = Pe();
|
|
623
|
+
return _e({
|
|
624
624
|
mutationFn: (n) => t.createNote(n),
|
|
625
625
|
onSuccess: () => {
|
|
626
|
-
e.invalidateQueries({ queryKey:
|
|
626
|
+
e.invalidateQueries({ queryKey: he.all });
|
|
627
627
|
}
|
|
628
628
|
});
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
const e =
|
|
632
|
-
return
|
|
630
|
+
function un(t) {
|
|
631
|
+
const e = Pe();
|
|
632
|
+
return _e({
|
|
633
633
|
mutationFn: (n) => t.deleteNote(n),
|
|
634
634
|
onSuccess: () => {
|
|
635
|
-
e.invalidateQueries({ queryKey:
|
|
635
|
+
e.invalidateQueries({ queryKey: he.all });
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function ct({
|
|
640
640
|
api: t,
|
|
641
641
|
enabled: e = !0,
|
|
642
642
|
...n
|
|
643
643
|
}) {
|
|
644
|
-
return
|
|
645
|
-
queryKey:
|
|
644
|
+
return Rt({
|
|
645
|
+
queryKey: he.notes(n),
|
|
646
646
|
queryFn: () => t.getNotes(n),
|
|
647
647
|
enabled: e
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
|
-
const
|
|
651
|
-
function
|
|
650
|
+
const fn = 100;
|
|
651
|
+
function dt({
|
|
652
652
|
api: t,
|
|
653
653
|
courseId: e,
|
|
654
654
|
learningObject: n,
|
|
655
655
|
reactions: o,
|
|
656
656
|
enabled: r = !0
|
|
657
657
|
}) {
|
|
658
|
-
return
|
|
658
|
+
return ct({
|
|
659
659
|
api: t,
|
|
660
660
|
filter: {
|
|
661
661
|
...e ? { courseId: e } : {},
|
|
@@ -663,23 +663,23 @@ function lt({
|
|
|
663
663
|
...o != null && o.length ? { reactions: o } : {}
|
|
664
664
|
},
|
|
665
665
|
offset: 0,
|
|
666
|
-
pageSize:
|
|
666
|
+
pageSize: fn,
|
|
667
667
|
enabled: r
|
|
668
668
|
});
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
const e =
|
|
672
|
-
return
|
|
670
|
+
function mn(t) {
|
|
671
|
+
const e = Pe();
|
|
672
|
+
return _e({
|
|
673
673
|
mutationFn: ({ id: n, input: o }) => t.updateNote(n, o),
|
|
674
674
|
onMutate: async ({ id: n, input: o }) => {
|
|
675
|
-
await e.cancelQueries({ queryKey:
|
|
676
|
-
const s = e.getQueryCache().findAll({ queryKey:
|
|
675
|
+
await e.cancelQueries({ queryKey: he.all });
|
|
676
|
+
const s = e.getQueryCache().findAll({ queryKey: he.all }), l = /* @__PURE__ */ new Map();
|
|
677
677
|
for (const a of s) {
|
|
678
678
|
const f = a.state.data;
|
|
679
679
|
f && (l.set(a.queryKey, f), e.setQueryData(a.queryKey, {
|
|
680
680
|
...f,
|
|
681
681
|
notes: f.notes.map(
|
|
682
|
-
(
|
|
682
|
+
(m) => m.id === n ? { ...m, ...o, updatedAt: (/* @__PURE__ */ new Date()).toISOString() } : m
|
|
683
683
|
)
|
|
684
684
|
}));
|
|
685
685
|
}
|
|
@@ -691,81 +691,83 @@ function rn(t) {
|
|
|
691
691
|
e.setQueryData(s, l);
|
|
692
692
|
},
|
|
693
693
|
onSettled: () => {
|
|
694
|
-
e.invalidateQueries({ queryKey:
|
|
694
|
+
e.invalidateQueries({ queryKey: he.all });
|
|
695
695
|
}
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
|
-
const
|
|
699
|
-
notebook:
|
|
700
|
-
notes:
|
|
701
|
-
important:
|
|
702
|
-
unclear:
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
698
|
+
const gn = "Notebook", hn = "Notes", pn = "Important", yn = "Unclear", Nn = "Source changed", bn = "Back", En = "Edit note", Sn = "Save", Tn = "Cancel", vn = "Delete note", Cn = "Delete note confirmation", In = "note", Rn = "Add note (optional)", xn = "Remove from Notebook", wn = "Add a note (optional)", On = "Mark important", kn = "Mark unclear", Ln = "Press Ctrl+Shift+L (Windows/Linux) or Cmd+Shift+L (Mac) to mark this selection as unclear or important.", An = "Saved to Notebook.", Dn = "Note updated", Pn = "Note deleted", _n = "Error saving to Notebook.", Mn = "Error updating note", Fn = "Note deletion failed", Bn = "Loading notes", Un = "Failed to load notes", Hn = "Start capturing your notes", $n = "To use the Notebook feature, select text on a page to mark it as Important or Unclear, and add an optional note.", Gn = "Only you can see your Notebook. Instructors and classmates don't see your notes.", jn = "Nothing here yet", Wn = "Adjust your filters or create a new note to get started.", zn = "You have no notes for the selected filter", Kn = "Filter", qn = "Previous page", Xn = "Next page", Vn = "All courses", Qn = "All notes", Yn = "Close Notebook panel", Zn = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", Jn = "This text was changed or removed.", eo = "This source is no longer available.", to = "Notebook note", Ge = {
|
|
699
|
+
notebook: gn,
|
|
700
|
+
notes: hn,
|
|
701
|
+
important: pn,
|
|
702
|
+
unclear: yn,
|
|
703
|
+
sourceChanged: Nn,
|
|
704
|
+
back: bn,
|
|
705
|
+
editNote: En,
|
|
706
|
+
save: Sn,
|
|
707
|
+
cancel: Tn,
|
|
708
|
+
deleteNote: vn,
|
|
709
|
+
deleteNoteConfirmation: Cn,
|
|
710
|
+
note: In,
|
|
711
|
+
addNotePrompt: Rn,
|
|
712
|
+
removeFromNotebook: xn,
|
|
713
|
+
addNoteOptional: wn,
|
|
714
|
+
markImportant: On,
|
|
715
|
+
markUnclear: kn,
|
|
716
|
+
selectionMenuInstructions: Ln,
|
|
717
|
+
savedToNotebook: An,
|
|
718
|
+
noteUpdated: Dn,
|
|
719
|
+
noteDeleted: Pn,
|
|
720
|
+
errorSavingNote: _n,
|
|
721
|
+
errorUpdatingNote: Mn,
|
|
722
|
+
noteDeletionFailed: Fn,
|
|
723
|
+
loadingNotes: Bn,
|
|
724
|
+
failedToLoadNotes: Un,
|
|
725
|
+
emptyStateHeading: Hn,
|
|
726
|
+
emptyStateDescription: $n,
|
|
727
|
+
emptyStatePrecision: Gn,
|
|
728
|
+
nothingHereYet: jn,
|
|
729
|
+
adjustFiltersOrCreate: Wn,
|
|
730
|
+
noNotesForFilter: zn,
|
|
731
|
+
filter: Kn,
|
|
732
|
+
previousPage: qn,
|
|
733
|
+
nextPage: Xn,
|
|
734
|
+
allCourses: Vn,
|
|
735
|
+
allNotes: Qn,
|
|
736
|
+
closeNotebookPanel: Yn,
|
|
737
|
+
featureDescription: Zn,
|
|
738
|
+
highlightUnavailable: Jn,
|
|
739
|
+
highlightSourceUnavailable: eo,
|
|
740
|
+
notebookNote: to
|
|
741
|
+
}, ut = Ze(null);
|
|
742
|
+
function ft(t, e) {
|
|
743
|
+
const n = Ge[t] ?? t;
|
|
742
744
|
return e ? n.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : n;
|
|
743
745
|
}
|
|
744
|
-
function
|
|
746
|
+
function no({
|
|
745
747
|
translations: t,
|
|
746
748
|
translate: e,
|
|
747
749
|
children: n
|
|
748
750
|
}) {
|
|
749
|
-
const o =
|
|
750
|
-
translations: new Proxy(
|
|
751
|
+
const o = be(() => ({
|
|
752
|
+
translations: new Proxy(Ge, {
|
|
751
753
|
get(s, l) {
|
|
752
754
|
return (t == null ? void 0 : t[l]) ?? s[l];
|
|
753
755
|
}
|
|
754
756
|
}),
|
|
755
|
-
translate: e ??
|
|
757
|
+
translate: e ?? ft
|
|
756
758
|
}), [t, e]);
|
|
757
|
-
return /* @__PURE__ */ i(
|
|
759
|
+
return /* @__PURE__ */ i(ut.Provider, { value: o, children: n });
|
|
758
760
|
}
|
|
759
|
-
function
|
|
760
|
-
const t =
|
|
761
|
-
return t || { translations:
|
|
761
|
+
function Z() {
|
|
762
|
+
const t = Je(ut);
|
|
763
|
+
return t || { translations: Ge, translate: ft };
|
|
762
764
|
}
|
|
763
|
-
const
|
|
765
|
+
const oo = (t) => ({
|
|
764
766
|
selectedNoteId: t ?? null,
|
|
765
767
|
isNoteEditing: !1,
|
|
766
768
|
isTrayOpen: t != null
|
|
767
769
|
});
|
|
768
|
-
function
|
|
770
|
+
function ro(t, e) {
|
|
769
771
|
switch (e.type) {
|
|
770
772
|
case "SELECT_NOTE":
|
|
771
773
|
return {
|
|
@@ -785,8 +787,8 @@ function Xn(t, e) {
|
|
|
785
787
|
return t;
|
|
786
788
|
}
|
|
787
789
|
}
|
|
788
|
-
const
|
|
789
|
-
function
|
|
790
|
+
const mt = Ze(null);
|
|
791
|
+
function Fo({
|
|
790
792
|
api: t,
|
|
791
793
|
currentUserId: e,
|
|
792
794
|
objectId: n,
|
|
@@ -796,10 +798,10 @@ function Ro({
|
|
|
796
798
|
onOpen: l,
|
|
797
799
|
initialNoteId: a,
|
|
798
800
|
translations: f,
|
|
799
|
-
translate:
|
|
800
|
-
children:
|
|
801
|
+
translate: m,
|
|
802
|
+
children: g
|
|
801
803
|
}) {
|
|
802
|
-
const [c,
|
|
804
|
+
const [c, N] = et(ro, oo(a)), S = P(a != null), b = be(
|
|
803
805
|
() => ({
|
|
804
806
|
api: t,
|
|
805
807
|
currentUserId: e,
|
|
@@ -808,41 +810,41 @@ function Ro({
|
|
|
808
810
|
courseId: r,
|
|
809
811
|
pageLastModifiedAt: s,
|
|
810
812
|
...c,
|
|
811
|
-
selectNote: (x,
|
|
812
|
-
clearSelectedNote: () =>
|
|
813
|
-
setEditing: (x) =>
|
|
813
|
+
selectNote: (x, h = !1) => N({ type: "SELECT_NOTE", payload: { id: x, isEditing: h } }),
|
|
814
|
+
clearSelectedNote: () => N({ type: "CLEAR_SELECTED_NOTE" }),
|
|
815
|
+
setEditing: (x) => N({ type: "SET_EDITING", payload: x }),
|
|
814
816
|
openTray: () => {
|
|
815
|
-
|
|
817
|
+
S.current || (S.current = !0, l == null || l()), N({ type: "OPEN_TRAY" });
|
|
816
818
|
},
|
|
817
819
|
closeTray: () => {
|
|
818
|
-
|
|
820
|
+
S.current = !1, N({ type: "CLOSE_TRAY" });
|
|
819
821
|
}
|
|
820
822
|
}),
|
|
821
823
|
[t, e, n, o, r, s, l, c]
|
|
822
824
|
);
|
|
823
|
-
return /* @__PURE__ */ i(
|
|
825
|
+
return /* @__PURE__ */ i(mt.Provider, { value: b, children: /* @__PURE__ */ i(no, { translations: f, translate: m, children: g }) });
|
|
824
826
|
}
|
|
825
|
-
function
|
|
826
|
-
const t =
|
|
827
|
+
function gt() {
|
|
828
|
+
const t = Je(mt);
|
|
827
829
|
if (!t)
|
|
828
830
|
throw new Error("useNotebook must be used within a NotebookProvider");
|
|
829
831
|
return t;
|
|
830
832
|
}
|
|
831
|
-
const
|
|
832
|
-
const { isTrayOpen: e, closeTray: n } =
|
|
833
|
+
const ht = "notebook-tray-content", Bo = ({ children: t }) => {
|
|
834
|
+
const { isTrayOpen: e, closeTray: n } = gt(), { translations: o } = Z();
|
|
833
835
|
return /* @__PURE__ */ i(
|
|
834
|
-
|
|
836
|
+
wt,
|
|
835
837
|
{
|
|
836
838
|
label: o.notebook,
|
|
837
839
|
open: e,
|
|
838
840
|
onDismiss: n,
|
|
839
841
|
placement: "end",
|
|
840
842
|
size: "regular",
|
|
841
|
-
children: /* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */ i(
|
|
843
|
-
/* @__PURE__ */ i(
|
|
843
|
+
children: /* @__PURE__ */ C(R, { direction: "column", height: "100vh", id: ht, children: [
|
|
844
|
+
/* @__PURE__ */ i(R.Item, { children: /* @__PURE__ */ i(Q, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ C(R, { justifyItems: "space-between", alignItems: "center", children: [
|
|
845
|
+
/* @__PURE__ */ i(Ie, { level: "h3", children: o.notebook }),
|
|
844
846
|
/* @__PURE__ */ i(
|
|
845
|
-
|
|
847
|
+
xt,
|
|
846
848
|
{
|
|
847
849
|
screenReaderLabel: o.closeNotebookPanel,
|
|
848
850
|
onClick: n,
|
|
@@ -851,57 +853,63 @@ const ft = "notebook-tray-content", Oo = ({ children: t }) => {
|
|
|
851
853
|
}
|
|
852
854
|
)
|
|
853
855
|
] }) }) }),
|
|
854
|
-
/* @__PURE__ */ i(
|
|
856
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
|
|
855
857
|
] })
|
|
856
858
|
}
|
|
857
859
|
);
|
|
858
|
-
},
|
|
859
|
-
currentType: t,
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
})
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
)
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
860
|
+
}, pt = Tt(
|
|
861
|
+
({ currentType: t, disabled: e = !1, autoFocus: n = !0, onSelectReaction: o }, r) => {
|
|
862
|
+
const { translations: s } = Z(), l = P(null), a = P(null), f = z(() => {
|
|
863
|
+
t === O.CONFUSING && l.current ? l.current.focus() : t === O.IMPORTANT && a.current ? a.current.focus() : l.current && l.current.focus();
|
|
864
|
+
}, [t]);
|
|
865
|
+
return K(() => {
|
|
866
|
+
n && f();
|
|
867
|
+
}, [n, f]), vt(r, () => ({ focus: f }), [f]), /* @__PURE__ */ i(
|
|
868
|
+
Q,
|
|
869
|
+
{
|
|
870
|
+
as: "div",
|
|
871
|
+
background: "primary",
|
|
872
|
+
borderWidth: "small",
|
|
873
|
+
borderColor: "secondary",
|
|
874
|
+
borderRadius: "medium",
|
|
875
|
+
shadow: "resting",
|
|
876
|
+
children: /* @__PURE__ */ C(ge, { children: [
|
|
877
|
+
/* @__PURE__ */ C(
|
|
878
|
+
ge.Item,
|
|
879
|
+
{
|
|
880
|
+
ref: l,
|
|
881
|
+
disabled: e,
|
|
882
|
+
onClick: () => o(O.CONFUSING),
|
|
883
|
+
children: [
|
|
884
|
+
/* @__PURE__ */ i(Me, { size: "x-small" }),
|
|
885
|
+
` ${s.markUnclear}`
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
),
|
|
889
|
+
/* @__PURE__ */ C(
|
|
890
|
+
ge.Item,
|
|
891
|
+
{
|
|
892
|
+
ref: a,
|
|
893
|
+
disabled: e,
|
|
894
|
+
onClick: () => o(O.IMPORTANT),
|
|
895
|
+
children: [
|
|
896
|
+
/* @__PURE__ */ i(Fe, { size: "x-small" }),
|
|
897
|
+
` ${s.markImportant}`
|
|
898
|
+
]
|
|
899
|
+
}
|
|
900
|
+
)
|
|
901
|
+
] })
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
pt.displayName = "NoteReactionMenu";
|
|
907
|
+
const yt = "notebook-inline-reaction-menu";
|
|
908
|
+
function Oe(t) {
|
|
909
|
+
var e;
|
|
910
|
+
return !!((e = document.getElementById(yt)) != null && e.contains(t));
|
|
911
|
+
}
|
|
912
|
+
function Uo({
|
|
905
913
|
containerRef: t,
|
|
906
914
|
highlightTheme: e,
|
|
907
915
|
debounceTime: n = 500,
|
|
@@ -913,201 +921,219 @@ function wo({
|
|
|
913
921
|
const {
|
|
914
922
|
api: a,
|
|
915
923
|
objectId: f,
|
|
916
|
-
objectType:
|
|
917
|
-
courseId:
|
|
924
|
+
objectType: m,
|
|
925
|
+
courseId: g,
|
|
918
926
|
pageLastModifiedAt: c,
|
|
919
|
-
selectedNoteId:
|
|
920
|
-
isTrayOpen:
|
|
921
|
-
selectNote:
|
|
927
|
+
selectedNoteId: N,
|
|
928
|
+
isTrayOpen: S,
|
|
929
|
+
selectNote: b,
|
|
922
930
|
openTray: x
|
|
923
|
-
} =
|
|
931
|
+
} = gt(), { translations: h } = Z(), { data: T } = dt({
|
|
924
932
|
api: a,
|
|
925
|
-
courseId:
|
|
926
|
-
learningObject: { type:
|
|
927
|
-
}), { mutate:
|
|
928
|
-
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
-
const
|
|
932
|
-
if (!
|
|
933
|
-
const
|
|
934
|
-
if (
|
|
935
|
-
|
|
933
|
+
courseId: g,
|
|
934
|
+
learningObject: { type: m, id: f }
|
|
935
|
+
}), { mutate: $, isPending: y } = dn(a), { mutateAsync: v } = mn(a), { mutate: _ } = un(a), A = P([]), [G, E] = H([]), [w, I] = H(null), [j, J] = H(""), [X, se] = H(null), ne = P(null);
|
|
936
|
+
ne.current = X;
|
|
937
|
+
const [ie, de] = H(""), oe = P(null), M = P(!1), [W, le] = H(!1);
|
|
938
|
+
K(() => {
|
|
939
|
+
const U = t.current;
|
|
940
|
+
if (!U) return;
|
|
941
|
+
const k = U.closest(".user_content") ?? U;
|
|
942
|
+
if (k.classList.contains("enhanced")) {
|
|
943
|
+
le(!0);
|
|
936
944
|
return;
|
|
937
945
|
}
|
|
938
|
-
const
|
|
939
|
-
for (const
|
|
940
|
-
if (
|
|
941
|
-
|
|
946
|
+
const L = new MutationObserver((F) => {
|
|
947
|
+
for (const B of F)
|
|
948
|
+
if (B.type === "attributes" && B.attributeName === "class" && B.target.classList.contains("enhanced")) {
|
|
949
|
+
le(!0), L.disconnect();
|
|
942
950
|
return;
|
|
943
951
|
}
|
|
944
952
|
});
|
|
945
|
-
return
|
|
953
|
+
return L.observe(k, { attributes: !0, attributeFilter: ["class"] }), () => L.disconnect();
|
|
946
954
|
}, [t]);
|
|
947
|
-
const
|
|
948
|
-
|
|
955
|
+
const Y = z(() => {
|
|
956
|
+
se(null), I(null), J(""), de("");
|
|
949
957
|
}, []);
|
|
950
|
-
|
|
951
|
-
if (!
|
|
952
|
-
let
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
var
|
|
956
|
-
const
|
|
957
|
-
if (!
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
958
|
+
K(() => {
|
|
959
|
+
if (!W || !t.current) return;
|
|
960
|
+
let k = null;
|
|
961
|
+
const L = () => {
|
|
962
|
+
k && clearTimeout(k), k = setTimeout(() => {
|
|
963
|
+
var We;
|
|
964
|
+
const p = window.getSelection(), D = t.current;
|
|
965
|
+
if (!D) return;
|
|
966
|
+
const fe = p != null && p.rangeCount ? p.toString().trim() : "";
|
|
967
|
+
if (!p || fe === "") {
|
|
968
|
+
ne.current !== null && !Oe(document.activeElement) && Y();
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
const me = p.getRangeAt(0);
|
|
972
|
+
if (!D.contains(me.commonAncestorContainer)) return;
|
|
973
|
+
const je = (We = re.fromRange(D, me)) == null ? void 0 : We.toSelector();
|
|
974
|
+
je && !Zt(je, G) && (I(me.cloneRange()), J(fe), se(Yt(me)), de(h.selectionMenuInstructions));
|
|
964
975
|
}, n);
|
|
965
|
-
},
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
976
|
+
}, F = (p) => {
|
|
977
|
+
p.target instanceof Node && (Oe(p.target) ? (p.preventDefault(), p.stopImmediatePropagation()) : Y());
|
|
978
|
+
}, B = () => {
|
|
979
|
+
Y();
|
|
980
|
+
}, d = (p) => {
|
|
981
|
+
var D;
|
|
982
|
+
if (p.key === "Escape" && ne.current !== null) {
|
|
983
|
+
Y(), p.stopImmediatePropagation();
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
(p.ctrlKey || p.metaKey) && p.shiftKey && p.key.toLowerCase() === "l" && ne.current !== null && (p.preventDefault(), (D = oe.current) == null || D.focus());
|
|
973
987
|
};
|
|
974
|
-
return document.addEventListener("selectionchange",
|
|
975
|
-
|
|
988
|
+
return document.addEventListener("selectionchange", L), document.addEventListener("mousedown", F), document.addEventListener("touchstart", F), document.addEventListener("keydown", d), window.addEventListener("scroll", B, !0), () => {
|
|
989
|
+
k && clearTimeout(k), document.removeEventListener("selectionchange", L), document.removeEventListener("mousedown", F), document.removeEventListener("touchstart", F), document.removeEventListener("keydown", d), window.removeEventListener("scroll", B, !0);
|
|
976
990
|
};
|
|
977
|
-
}, [
|
|
978
|
-
const
|
|
979
|
-
(
|
|
980
|
-
var
|
|
981
|
-
const
|
|
982
|
-
if (!
|
|
983
|
-
const { highlightData:
|
|
984
|
-
if (
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
991
|
+
}, [W, G, n, t, Y, h]);
|
|
992
|
+
const ae = z(
|
|
993
|
+
(U) => {
|
|
994
|
+
var D;
|
|
995
|
+
const k = t.current;
|
|
996
|
+
if (!k || !U.highlightData) return null;
|
|
997
|
+
const { highlightData: L, reaction: F, id: B } = U;
|
|
998
|
+
if (L.hasNoHighlightAnymore) return null;
|
|
999
|
+
const { range: d } = L, p = d && ((D = ce.fromSelector(k, d)) == null ? void 0 : D.toRange());
|
|
1000
|
+
if (p) {
|
|
1001
|
+
const fe = F[0] === O.IMPORTANT ? h.important : h.unclear, me = {
|
|
1002
|
+
id: B,
|
|
1003
|
+
selectedNoteId: N,
|
|
1004
|
+
type: F[0],
|
|
1005
|
+
isTrayOpen: S,
|
|
1006
|
+
labelPrefix: `${h.notebookNote} (${fe})`,
|
|
1007
|
+
popupId: ht,
|
|
992
1008
|
onClick: () => {
|
|
993
|
-
|
|
1009
|
+
b(B), x();
|
|
994
1010
|
}
|
|
995
1011
|
};
|
|
996
|
-
return
|
|
1012
|
+
return ln(p, me, e), L.textPosition;
|
|
997
1013
|
}
|
|
998
1014
|
return null;
|
|
999
1015
|
},
|
|
1000
|
-
[t,
|
|
1016
|
+
[t, N, S, e, h, b, x]
|
|
1001
1017
|
);
|
|
1002
|
-
|
|
1003
|
-
if (!
|
|
1004
|
-
const
|
|
1005
|
-
if (
|
|
1006
|
-
if (
|
|
1007
|
-
for (const
|
|
1008
|
-
|
|
1009
|
-
|
|
1018
|
+
K(() => {
|
|
1019
|
+
if (!W || !T || !t.current) return;
|
|
1020
|
+
const U = t.current, k = T.notes, L = /* @__PURE__ */ new Set(), F = [], B = [];
|
|
1021
|
+
if (k.length === 0) {
|
|
1022
|
+
if (A.current.length > 0) {
|
|
1023
|
+
for (const d of A.current)
|
|
1024
|
+
Ve(d, U);
|
|
1025
|
+
A.current = [], E([]);
|
|
1010
1026
|
}
|
|
1011
1027
|
return;
|
|
1012
1028
|
}
|
|
1013
|
-
if (c &&
|
|
1014
|
-
const { notesForUpdate:
|
|
1015
|
-
|
|
1016
|
-
|
|
1029
|
+
if (c && k[0].highlightData.pageLastModifiedAt !== c) {
|
|
1030
|
+
const { notesForUpdate: d, noteIdsForDelete: p } = Vt(
|
|
1031
|
+
U,
|
|
1032
|
+
k,
|
|
1017
1033
|
c
|
|
1018
1034
|
);
|
|
1019
|
-
for (const
|
|
1020
|
-
|
|
1021
|
-
for (const
|
|
1022
|
-
|
|
1035
|
+
for (const D of d)
|
|
1036
|
+
v({ id: D.id, input: D }).catch((fe) => r == null ? void 0 : r(fe));
|
|
1037
|
+
for (const D of p)
|
|
1038
|
+
_(D, { onError: s });
|
|
1023
1039
|
} else {
|
|
1024
|
-
for (const
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1040
|
+
for (const d of k) {
|
|
1041
|
+
const p = ae(d);
|
|
1042
|
+
p && (L.add(d.id), F.push(d), B.push(p));
|
|
1027
1043
|
}
|
|
1028
|
-
for (const
|
|
1029
|
-
|
|
1030
|
-
E(
|
|
1044
|
+
for (const d of A.current)
|
|
1045
|
+
L.has(d.id) || Ve(d, U);
|
|
1046
|
+
E(B), A.current = F, N && Qt(N);
|
|
1031
1047
|
}
|
|
1032
1048
|
}, [
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1049
|
+
W,
|
|
1050
|
+
T,
|
|
1051
|
+
ae,
|
|
1036
1052
|
c,
|
|
1037
1053
|
t,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1054
|
+
v,
|
|
1055
|
+
_,
|
|
1056
|
+
N
|
|
1041
1057
|
]);
|
|
1042
|
-
const ue = (
|
|
1043
|
-
const
|
|
1044
|
-
if (!w || !
|
|
1045
|
-
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1058
|
+
const ue = (U) => {
|
|
1059
|
+
const k = t.current;
|
|
1060
|
+
if (!w || !k || M.current) return;
|
|
1061
|
+
M.current = !0;
|
|
1062
|
+
const L = ce.fromRange(k, w), F = re.fromRange(k, w);
|
|
1063
|
+
$(
|
|
1048
1064
|
{
|
|
1049
|
-
courseId:
|
|
1065
|
+
courseId: g,
|
|
1050
1066
|
objectId: f,
|
|
1051
|
-
objectType:
|
|
1067
|
+
objectType: m,
|
|
1052
1068
|
userText: "",
|
|
1053
|
-
reaction: [
|
|
1069
|
+
reaction: [U],
|
|
1054
1070
|
highlightData: {
|
|
1055
1071
|
selectedText: j,
|
|
1056
|
-
textPosition: (
|
|
1057
|
-
range:
|
|
1072
|
+
textPosition: (F == null ? void 0 : F.toSelector()) ?? null,
|
|
1073
|
+
range: L.toSelector(),
|
|
1058
1074
|
pageLastModifiedAt: c ?? ""
|
|
1059
1075
|
}
|
|
1060
1076
|
},
|
|
1061
1077
|
{
|
|
1062
|
-
onSuccess: (
|
|
1063
|
-
var
|
|
1064
|
-
const
|
|
1065
|
-
|
|
1078
|
+
onSuccess: (B) => {
|
|
1079
|
+
var p;
|
|
1080
|
+
const d = B.id;
|
|
1081
|
+
Y(), (p = window.getSelection()) == null || p.removeAllRanges(), b(d), x(), l == null || l(B);
|
|
1066
1082
|
},
|
|
1067
1083
|
onError: o,
|
|
1068
1084
|
// Unlock on failure too, so the user can retry from the still-open menu
|
|
1069
1085
|
onSettled: () => {
|
|
1070
|
-
|
|
1086
|
+
M.current = !1;
|
|
1071
1087
|
}
|
|
1072
1088
|
}
|
|
1073
1089
|
);
|
|
1074
1090
|
};
|
|
1075
|
-
return
|
|
1076
|
-
/* @__PURE__ */ i(
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1091
|
+
return /* @__PURE__ */ C(De, { children: [
|
|
1092
|
+
/* @__PURE__ */ i(pe, { "aria-live": "polite", "aria-atomic": "true", children: ie }),
|
|
1093
|
+
w && X && Ct(
|
|
1094
|
+
/* @__PURE__ */ i(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
id: yt,
|
|
1098
|
+
role: "toolbar",
|
|
1099
|
+
style: {
|
|
1100
|
+
position: "fixed",
|
|
1101
|
+
zIndex: 100,
|
|
1102
|
+
top: X.top,
|
|
1103
|
+
left: X.left,
|
|
1104
|
+
whiteSpace: "nowrap"
|
|
1105
|
+
},
|
|
1106
|
+
onBlur: (U) => {
|
|
1107
|
+
Oe(U.relatedTarget) || Y();
|
|
1108
|
+
},
|
|
1109
|
+
children: /* @__PURE__ */ i(
|
|
1110
|
+
pt,
|
|
1111
|
+
{
|
|
1112
|
+
ref: oe,
|
|
1113
|
+
autoFocus: !1,
|
|
1114
|
+
onSelectReaction: ue,
|
|
1115
|
+
disabled: y
|
|
1116
|
+
}
|
|
1117
|
+
)
|
|
1118
|
+
}
|
|
1119
|
+
),
|
|
1120
|
+
document.body
|
|
1121
|
+
)
|
|
1122
|
+
] });
|
|
1097
1123
|
}
|
|
1098
|
-
const
|
|
1099
|
-
backgroundColor: t ===
|
|
1100
|
-
underlineColor: t ===
|
|
1101
|
-
underlineStyle: t ===
|
|
1102
|
-
}),
|
|
1124
|
+
const so = (t, e) => ({
|
|
1125
|
+
backgroundColor: t === O.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
|
|
1126
|
+
underlineColor: t === O.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
|
|
1127
|
+
underlineStyle: t === O.IMPORTANT ? "solid" : "dashed"
|
|
1128
|
+
}), Ae = ({
|
|
1103
1129
|
children: t,
|
|
1104
|
-
type: e =
|
|
1130
|
+
type: e = O.IMPORTANT,
|
|
1105
1131
|
isCardActive: n = !0,
|
|
1106
1132
|
theme: o
|
|
1107
1133
|
}) => {
|
|
1108
|
-
const r =
|
|
1134
|
+
const r = so(e, o), l = {
|
|
1109
1135
|
position: "relative",
|
|
1110
|
-
backgroundColor: n ? r.backgroundColor :
|
|
1136
|
+
backgroundColor: n ? r.backgroundColor : $e(r.backgroundColor, 0.5),
|
|
1111
1137
|
textDecorationLine: "underline",
|
|
1112
1138
|
textDecorationStyle: r.underlineStyle,
|
|
1113
1139
|
textDecorationColor: r.underlineColor,
|
|
@@ -1117,50 +1143,47 @@ const Qn = (t, e) => ({
|
|
|
1117
1143
|
};
|
|
1118
1144
|
return /* @__PURE__ */ i("span", { "data-note-highlight": "true", style: l, children: t });
|
|
1119
1145
|
};
|
|
1120
|
-
function
|
|
1146
|
+
function Nt(t, e = "noHighlight") {
|
|
1121
1147
|
return e === "sourceUnavailable" ? t.highlightSourceUnavailable : t.highlightUnavailable;
|
|
1122
1148
|
}
|
|
1123
|
-
const
|
|
1124
|
-
const { translations: e } =
|
|
1125
|
-
return /* @__PURE__ */
|
|
1126
|
-
|
|
1127
|
-
/* @__PURE__ */ i(I.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ i(Te, { maxLines: 3, children: mt(e, t) }) })
|
|
1128
|
-
] });
|
|
1129
|
-
}, Yn = {
|
|
1149
|
+
const bt = ({ reason: t } = {}) => {
|
|
1150
|
+
const { translations: e } = Z();
|
|
1151
|
+
return /* @__PURE__ */ i(R, { gap: "xx-small", alignItems: "start", as: "div", children: /* @__PURE__ */ i(R.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ i(V, { as: "div", fontStyle: "italic", color: "secondary", children: /* @__PURE__ */ i(ve, { maxLines: 3, children: Nt(e, t) }) }) }) });
|
|
1152
|
+
}, io = {
|
|
1130
1153
|
filter: null,
|
|
1131
1154
|
courseFilter: null,
|
|
1132
1155
|
currentPage: 1,
|
|
1133
1156
|
totalPages: void 0
|
|
1134
1157
|
};
|
|
1135
|
-
function
|
|
1158
|
+
function Te(t, e) {
|
|
1136
1159
|
const n = typeof e == "number" ? Math.min(e, t) : t;
|
|
1137
1160
|
return Math.max(1, n);
|
|
1138
1161
|
}
|
|
1139
|
-
function
|
|
1162
|
+
function lo(t, e) {
|
|
1140
1163
|
switch (e.type) {
|
|
1141
1164
|
case "SET_FILTER":
|
|
1142
1165
|
return { ...t, filter: e.payload, currentPage: 1 };
|
|
1143
1166
|
case "SET_COURSE_FILTER":
|
|
1144
1167
|
return { ...t, courseFilter: e.payload, currentPage: 1 };
|
|
1145
1168
|
case "SET_PAGE":
|
|
1146
|
-
return { ...t, currentPage:
|
|
1169
|
+
return { ...t, currentPage: Te(e.payload, t.totalPages) };
|
|
1147
1170
|
case "FOCUS_PAGE":
|
|
1148
1171
|
return { ...t, currentPage: Math.max(1, e.payload) };
|
|
1149
1172
|
case "INCREMENT_PAGE":
|
|
1150
|
-
return { ...t, currentPage:
|
|
1173
|
+
return { ...t, currentPage: Te(t.currentPage + 1, t.totalPages) };
|
|
1151
1174
|
case "DECREMENT_PAGE":
|
|
1152
|
-
return { ...t, currentPage:
|
|
1175
|
+
return { ...t, currentPage: Te(t.currentPage - 1, t.totalPages) };
|
|
1153
1176
|
case "SET_TOTAL_PAGES":
|
|
1154
1177
|
return t.totalPages === e.payload ? t : {
|
|
1155
1178
|
...t,
|
|
1156
1179
|
totalPages: e.payload,
|
|
1157
|
-
currentPage:
|
|
1180
|
+
currentPage: Te(t.currentPage, e.payload)
|
|
1158
1181
|
};
|
|
1159
1182
|
default:
|
|
1160
1183
|
return t;
|
|
1161
1184
|
}
|
|
1162
1185
|
}
|
|
1163
|
-
function
|
|
1186
|
+
function Ho({
|
|
1164
1187
|
api: t,
|
|
1165
1188
|
courseId: e,
|
|
1166
1189
|
enableCourseFilter: n = !1,
|
|
@@ -1168,111 +1191,111 @@ function ko({
|
|
|
1168
1191
|
pageSize: r = 16,
|
|
1169
1192
|
focusNoteId: s
|
|
1170
1193
|
}) {
|
|
1171
|
-
var
|
|
1172
|
-
const [l, a] =
|
|
1173
|
-
|
|
1194
|
+
var oe;
|
|
1195
|
+
const [l, a] = et(lo, io), { filter: f, courseFilter: m, currentPage: g, totalPages: c } = l;
|
|
1196
|
+
K(() => {
|
|
1174
1197
|
a({ type: "SET_PAGE", payload: 1 });
|
|
1175
1198
|
}, [r]);
|
|
1176
|
-
const
|
|
1177
|
-
...
|
|
1199
|
+
const N = n ? m : e, S = (g - 1) * r, b = !!o, x = {
|
|
1200
|
+
...N ? { courseId: N } : {},
|
|
1178
1201
|
...f ? { reactions: [f] } : {},
|
|
1179
1202
|
...o ? { learningObject: o } : {}
|
|
1180
1203
|
}, {
|
|
1181
|
-
data:
|
|
1182
|
-
isLoading:
|
|
1183
|
-
isError:
|
|
1184
|
-
} =
|
|
1204
|
+
data: h,
|
|
1205
|
+
isLoading: T,
|
|
1206
|
+
isError: $
|
|
1207
|
+
} = ct({
|
|
1185
1208
|
api: t,
|
|
1186
1209
|
filter: x,
|
|
1187
|
-
offset:
|
|
1210
|
+
offset: S,
|
|
1188
1211
|
pageSize: r,
|
|
1189
|
-
enabled: !
|
|
1212
|
+
enabled: !b
|
|
1190
1213
|
}), {
|
|
1191
|
-
data:
|
|
1192
|
-
isLoading:
|
|
1193
|
-
isError:
|
|
1194
|
-
} =
|
|
1214
|
+
data: y,
|
|
1215
|
+
isLoading: v,
|
|
1216
|
+
isError: _
|
|
1217
|
+
} = dt({
|
|
1195
1218
|
api: t,
|
|
1196
|
-
courseId:
|
|
1219
|
+
courseId: N ?? void 0,
|
|
1197
1220
|
learningObject: o,
|
|
1198
|
-
enabled:
|
|
1199
|
-
}),
|
|
1200
|
-
const
|
|
1201
|
-
return f ?
|
|
1202
|
-
}, [
|
|
1203
|
-
|
|
1221
|
+
enabled: b
|
|
1222
|
+
}), A = be(() => {
|
|
1223
|
+
const M = (y == null ? void 0 : y.notes) ?? [];
|
|
1224
|
+
return f ? M.filter((W) => W.reaction.includes(f)) : M;
|
|
1225
|
+
}, [y, f]), G = P(null);
|
|
1226
|
+
K(() => {
|
|
1204
1227
|
if (!s) {
|
|
1205
1228
|
G.current = null;
|
|
1206
1229
|
return;
|
|
1207
1230
|
}
|
|
1208
1231
|
if (G.current === s) return;
|
|
1209
|
-
const
|
|
1210
|
-
if (
|
|
1232
|
+
const M = A.findIndex((le) => le.id === s);
|
|
1233
|
+
if (M === -1) return;
|
|
1211
1234
|
G.current = s;
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
}, [s,
|
|
1215
|
-
const E =
|
|
1216
|
-
|
|
1235
|
+
const W = Math.floor(M / r) + 1;
|
|
1236
|
+
W !== g && a({ type: "FOCUS_PAGE", payload: W });
|
|
1237
|
+
}, [s, A, r, g]);
|
|
1238
|
+
const E = b ? A.slice(S, S + r) : (h == null ? void 0 : h.notes) ?? [], w = b ? v : T, I = b ? _ : $, j = b ? Math.max(1, Math.ceil(A.length / r)) : ((oe = h == null ? void 0 : h.pageInfo) == null ? void 0 : oe.totalNrOfPages) ?? void 0, J = b ? { totalCount: A.length, totalNrOfPages: j } : h == null ? void 0 : h.pageInfo;
|
|
1239
|
+
K(() => {
|
|
1217
1240
|
a({ type: "SET_TOTAL_PAGES", payload: j });
|
|
1218
1241
|
}, [j]);
|
|
1219
|
-
const
|
|
1220
|
-
a({ type: "SET_PAGE", payload:
|
|
1221
|
-
}, []),
|
|
1242
|
+
const X = z((M) => {
|
|
1243
|
+
a({ type: "SET_PAGE", payload: M });
|
|
1244
|
+
}, []), se = z(() => {
|
|
1222
1245
|
a({
|
|
1223
1246
|
type: "INCREMENT_PAGE"
|
|
1224
1247
|
/* IncrementPage */
|
|
1225
1248
|
});
|
|
1226
|
-
}, []),
|
|
1249
|
+
}, []), ne = z(() => {
|
|
1227
1250
|
a({
|
|
1228
1251
|
type: "DECREMENT_PAGE"
|
|
1229
1252
|
/* DecrementPage */
|
|
1230
1253
|
});
|
|
1231
|
-
}, []),
|
|
1232
|
-
a({ type: "SET_FILTER", payload:
|
|
1233
|
-
}, []),
|
|
1234
|
-
a({ type: "SET_COURSE_FILTER", payload:
|
|
1254
|
+
}, []), ie = z((M) => {
|
|
1255
|
+
a({ type: "SET_FILTER", payload: M });
|
|
1256
|
+
}, []), de = z((M) => {
|
|
1257
|
+
a({ type: "SET_COURSE_FILTER", payload: M });
|
|
1235
1258
|
}, []);
|
|
1236
1259
|
return {
|
|
1237
1260
|
notes: E,
|
|
1238
|
-
pageInfo:
|
|
1261
|
+
pageInfo: J,
|
|
1239
1262
|
isLoading: w,
|
|
1240
|
-
isError:
|
|
1263
|
+
isError: I,
|
|
1241
1264
|
filter: f,
|
|
1242
|
-
courseFilter:
|
|
1243
|
-
currentPage:
|
|
1265
|
+
courseFilter: m,
|
|
1266
|
+
currentPage: g,
|
|
1244
1267
|
totalPages: c,
|
|
1245
|
-
setFilter:
|
|
1246
|
-
setCourseFilter:
|
|
1247
|
-
setPage:
|
|
1248
|
-
fetchNextPage:
|
|
1249
|
-
fetchPreviousPage:
|
|
1268
|
+
setFilter: ie,
|
|
1269
|
+
setCourseFilter: de,
|
|
1270
|
+
setPage: X,
|
|
1271
|
+
fetchNextPage: se,
|
|
1272
|
+
fetchPreviousPage: ne
|
|
1250
1273
|
};
|
|
1251
1274
|
}
|
|
1252
|
-
const
|
|
1253
|
-
function
|
|
1254
|
-
const { translations: n } =
|
|
1275
|
+
const ke = "all";
|
|
1276
|
+
function $o({ filter: t, setFilter: e }) {
|
|
1277
|
+
const { translations: n } = Z(), o = be(
|
|
1255
1278
|
() => [
|
|
1256
|
-
{ label: n.allNotes, value:
|
|
1257
|
-
{ label: n.important, value:
|
|
1258
|
-
{ label: n.unclear, value:
|
|
1279
|
+
{ label: n.allNotes, value: ke },
|
|
1280
|
+
{ label: n.important, value: O.IMPORTANT },
|
|
1281
|
+
{ label: n.unclear, value: O.CONFUSING }
|
|
1259
1282
|
],
|
|
1260
1283
|
[n]
|
|
1261
|
-
), r =
|
|
1284
|
+
), r = z(
|
|
1262
1285
|
(l, { value: a }) => {
|
|
1263
|
-
e(!a || a ===
|
|
1286
|
+
e(!a || a === ke ? null : a);
|
|
1264
1287
|
},
|
|
1265
1288
|
[e]
|
|
1266
1289
|
);
|
|
1267
1290
|
return {
|
|
1268
|
-
filterElement:
|
|
1291
|
+
filterElement: be(
|
|
1269
1292
|
() => /* @__PURE__ */ i(
|
|
1270
|
-
|
|
1293
|
+
ze,
|
|
1271
1294
|
{
|
|
1272
1295
|
renderLabel: n.filter,
|
|
1273
|
-
value: t ??
|
|
1296
|
+
value: t ?? ke,
|
|
1274
1297
|
onChange: r,
|
|
1275
|
-
children: o.map((l) => /* @__PURE__ */ i(
|
|
1298
|
+
children: o.map((l) => /* @__PURE__ */ i(ze.Option, { id: l.value, value: l.value, children: l.label }, l.value))
|
|
1276
1299
|
}
|
|
1277
1300
|
),
|
|
1278
1301
|
[t, o, r, n.filter]
|
|
@@ -1281,94 +1304,114 @@ function Lo({ filter: t, setFilter: e }) {
|
|
|
1281
1304
|
handleReactionFilterChange: r
|
|
1282
1305
|
};
|
|
1283
1306
|
}
|
|
1284
|
-
const
|
|
1285
|
-
const { translations: e } =
|
|
1286
|
-
return /* @__PURE__ */ i(
|
|
1287
|
-
!t && /* @__PURE__ */ i(
|
|
1288
|
-
/* @__PURE__ */ i(
|
|
1289
|
-
/* @__PURE__ */ i(
|
|
1290
|
-
!t && /* @__PURE__ */ i(
|
|
1307
|
+
const ao = ({ hasActiveFilter: t = !1 }) => {
|
|
1308
|
+
const { translations: e } = Z(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
|
|
1309
|
+
return /* @__PURE__ */ i(Q, { as: "div", textAlign: "center", children: /* @__PURE__ */ C(R, { direction: "column", alignItems: "center", gap: "small", children: [
|
|
1310
|
+
!t && /* @__PURE__ */ i(Ot, { size: "medium" }),
|
|
1311
|
+
/* @__PURE__ */ i(Ie, { level: "h3", children: n }),
|
|
1312
|
+
/* @__PURE__ */ i(V, { color: "secondary", children: o }),
|
|
1313
|
+
!t && /* @__PURE__ */ i(V, { color: "secondary", children: e.emptyStatePrecision })
|
|
1291
1314
|
] }) });
|
|
1292
|
-
},
|
|
1293
|
-
[
|
|
1315
|
+
}, co = "#2871AF", uo = (t) => ({
|
|
1316
|
+
[O.IMPORTANT]: {
|
|
1294
1317
|
color: "success",
|
|
1295
1318
|
themeOverride: {
|
|
1296
1319
|
successTextColor: t,
|
|
1297
1320
|
successBorderColor: t
|
|
1298
1321
|
},
|
|
1299
1322
|
translationKey: "important",
|
|
1300
|
-
icon: /* @__PURE__ */ i(
|
|
1323
|
+
icon: /* @__PURE__ */ i(Fe, { size: "x-small" })
|
|
1301
1324
|
},
|
|
1302
|
-
[
|
|
1325
|
+
[O.CONFUSING]: {
|
|
1303
1326
|
color: "error",
|
|
1304
1327
|
themeOverride: void 0,
|
|
1305
1328
|
translationKey: "unclear",
|
|
1306
|
-
icon: /* @__PURE__ */ i(
|
|
1329
|
+
icon: /* @__PURE__ */ i(Me, { size: "x-small" })
|
|
1307
1330
|
}
|
|
1308
|
-
}),
|
|
1331
|
+
}), Et = ({
|
|
1309
1332
|
type: t,
|
|
1310
1333
|
onTypeChange: e,
|
|
1311
1334
|
renderAsMenuTrigger: n = !1,
|
|
1312
|
-
theme: o
|
|
1335
|
+
theme: o,
|
|
1336
|
+
unavailable: r
|
|
1313
1337
|
}) => {
|
|
1314
|
-
const { translations:
|
|
1315
|
-
|
|
1316
|
-
|
|
1338
|
+
const { translations: s } = Z(), a = uo((o == null ? void 0 : o.importantPill) ?? co)[t], f = {
|
|
1339
|
+
color: "warning",
|
|
1340
|
+
themeOverride: void 0,
|
|
1341
|
+
translationKey: "sourceChanged",
|
|
1342
|
+
icon: /* @__PURE__ */ i(kt, { size: "x-small" })
|
|
1343
|
+
}, m = s[a.translationKey], [g, c] = H(!1), N = P(null), S = P(null), b = P(null), x = z(
|
|
1344
|
+
(T) => {
|
|
1345
|
+
e == null || e(T), c(!1);
|
|
1317
1346
|
},
|
|
1318
1347
|
[e]
|
|
1319
|
-
)
|
|
1320
|
-
|
|
1321
|
-
if (!f) return;
|
|
1322
|
-
const h = (p) => {
|
|
1323
|
-
p.key === "Escape" && p.stopPropagation();
|
|
1324
|
-
}, x = (p) => {
|
|
1325
|
-
var R;
|
|
1326
|
-
p.key === "Escape" && (p.stopPropagation(), u(!1), (R = y.current) == null || R.focus());
|
|
1327
|
-
};
|
|
1328
|
-
return document.addEventListener("keydown", h, !0), document.addEventListener("keyup", x, !0), () => {
|
|
1329
|
-
document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", x, !0);
|
|
1330
|
-
};
|
|
1331
|
-
}, [f]), n && e ? /* @__PURE__ */ T(
|
|
1332
|
-
fe,
|
|
1348
|
+
), h = r ? /* @__PURE__ */ i(
|
|
1349
|
+
we,
|
|
1333
1350
|
{
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
shouldFocusTriggerOnClose: !0,
|
|
1339
|
-
trigger: /* @__PURE__ */ i(
|
|
1340
|
-
$e,
|
|
1341
|
-
{
|
|
1342
|
-
color: l.color,
|
|
1343
|
-
themeOverride: l.themeOverride,
|
|
1344
|
-
renderIcon: l.icon,
|
|
1345
|
-
elementRef: (h) => {
|
|
1346
|
-
y.current = h;
|
|
1347
|
-
},
|
|
1348
|
-
children: a
|
|
1349
|
-
}
|
|
1350
|
-
),
|
|
1351
|
-
children: [
|
|
1352
|
-
/* @__PURE__ */ T(fe.Item, { ref: m, onClick: () => N(L.CONFUSING), children: [
|
|
1353
|
-
/* @__PURE__ */ i(Ae, { size: "x-small" }),
|
|
1354
|
-
` ${r.markUnclear}`
|
|
1355
|
-
] }),
|
|
1356
|
-
/* @__PURE__ */ T(fe.Item, { ref: c, onClick: () => N(L.IMPORTANT), children: [
|
|
1357
|
-
/* @__PURE__ */ i(De, { size: "x-small" }),
|
|
1358
|
-
` ${r.markImportant}`
|
|
1359
|
-
] })
|
|
1360
|
-
]
|
|
1351
|
+
color: f.color,
|
|
1352
|
+
themeOverride: f.themeOverride,
|
|
1353
|
+
renderIcon: f.icon,
|
|
1354
|
+
children: s[f.translationKey]
|
|
1361
1355
|
}
|
|
1362
|
-
) :
|
|
1356
|
+
) : null;
|
|
1357
|
+
return K(() => {
|
|
1358
|
+
if (!g) return;
|
|
1359
|
+
const T = (y) => {
|
|
1360
|
+
y.key === "Escape" && y.stopPropagation();
|
|
1361
|
+
}, $ = (y) => {
|
|
1362
|
+
var v;
|
|
1363
|
+
y.key === "Escape" && (y.stopPropagation(), c(!1), (v = b.current) == null || v.focus());
|
|
1364
|
+
};
|
|
1365
|
+
return document.addEventListener("keydown", T, !0), document.addEventListener("keyup", $, !0), () => {
|
|
1366
|
+
document.removeEventListener("keydown", T, !0), document.removeEventListener("keyup", $, !0);
|
|
1367
|
+
};
|
|
1368
|
+
}, [g]), n && e ? /* @__PURE__ */ C(R, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
|
|
1369
|
+
/* @__PURE__ */ C(
|
|
1370
|
+
ge,
|
|
1371
|
+
{
|
|
1372
|
+
placement: "bottom start",
|
|
1373
|
+
show: g,
|
|
1374
|
+
onToggle: (T) => c(T),
|
|
1375
|
+
shouldHideOnSelect: !0,
|
|
1376
|
+
shouldFocusTriggerOnClose: !0,
|
|
1377
|
+
trigger: /* @__PURE__ */ i(
|
|
1378
|
+
we,
|
|
1379
|
+
{
|
|
1380
|
+
color: a.color,
|
|
1381
|
+
themeOverride: a.themeOverride,
|
|
1382
|
+
renderIcon: a.icon,
|
|
1383
|
+
elementRef: (T) => {
|
|
1384
|
+
b.current = T;
|
|
1385
|
+
},
|
|
1386
|
+
children: m
|
|
1387
|
+
}
|
|
1388
|
+
),
|
|
1389
|
+
children: [
|
|
1390
|
+
/* @__PURE__ */ C(ge.Item, { ref: N, onClick: () => x(O.CONFUSING), children: [
|
|
1391
|
+
/* @__PURE__ */ i(Me, { size: "x-small" }),
|
|
1392
|
+
` ${s.markUnclear}`
|
|
1393
|
+
] }),
|
|
1394
|
+
/* @__PURE__ */ C(ge.Item, { ref: S, onClick: () => x(O.IMPORTANT), children: [
|
|
1395
|
+
/* @__PURE__ */ i(Fe, { size: "x-small" }),
|
|
1396
|
+
` ${s.markImportant}`
|
|
1397
|
+
] })
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
),
|
|
1401
|
+
h
|
|
1402
|
+
] }) : /* @__PURE__ */ C(R, { gap: "x-small", wrap: "wrap", direction: "column", alignItems: "start", children: [
|
|
1403
|
+
/* @__PURE__ */ i(we, { color: a.color, themeOverride: a.themeOverride, renderIcon: a.icon, children: m }),
|
|
1404
|
+
h
|
|
1405
|
+
] });
|
|
1363
1406
|
};
|
|
1364
|
-
function
|
|
1407
|
+
function Ye(t, e) {
|
|
1365
1408
|
return (t instanceof Date ? t : new Date(t)).toLocaleString(e, {
|
|
1366
1409
|
year: "numeric",
|
|
1367
1410
|
month: "short",
|
|
1368
1411
|
day: "numeric"
|
|
1369
1412
|
});
|
|
1370
1413
|
}
|
|
1371
|
-
const
|
|
1414
|
+
const fo = ({
|
|
1372
1415
|
noteId: t,
|
|
1373
1416
|
date: e,
|
|
1374
1417
|
highlight: n,
|
|
@@ -1378,53 +1421,53 @@ const no = ({
|
|
|
1378
1421
|
onClick: l,
|
|
1379
1422
|
onDelete: a,
|
|
1380
1423
|
onSaveNote: f,
|
|
1381
|
-
onTypeChange:
|
|
1382
|
-
isActive:
|
|
1424
|
+
onTypeChange: m,
|
|
1425
|
+
isActive: g,
|
|
1383
1426
|
isPanelView: c = !1,
|
|
1384
|
-
courseName:
|
|
1385
|
-
locale:
|
|
1386
|
-
highlightTheme:
|
|
1427
|
+
courseName: N,
|
|
1428
|
+
locale: S,
|
|
1429
|
+
highlightTheme: b,
|
|
1387
1430
|
renderLink: x,
|
|
1388
|
-
href:
|
|
1431
|
+
href: h
|
|
1389
1432
|
}) => {
|
|
1390
|
-
const { translations:
|
|
1391
|
-
|
|
1392
|
-
}, []),
|
|
1393
|
-
|
|
1394
|
-
var
|
|
1395
|
-
|
|
1396
|
-
}, [
|
|
1397
|
-
var
|
|
1398
|
-
|
|
1399
|
-
}, [
|
|
1400
|
-
if (!E &&
|
|
1401
|
-
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1433
|
+
const { translations: T } = Z(), [$, y] = H(!1), [v, _] = H(!1), [A, G] = H(r || ""), [E, w] = H(!1), [I, j] = H(!1), [J, X] = H(!1), [se, ne] = H(!1), ie = P(null), de = z((d) => {
|
|
1434
|
+
ie.current = d;
|
|
1435
|
+
}, []), oe = P(null), M = P(null), W = P(!1), le = P(null), Y = P(null), ae = P(!1);
|
|
1436
|
+
K(() => {
|
|
1437
|
+
var d, p;
|
|
1438
|
+
g ? ((d = ie.current) == null || d.scrollIntoView({ behavior: "smooth", block: "nearest" }), (p = ie.current) == null || p.focus()) : w(!1);
|
|
1439
|
+
}, [g]), K(() => {
|
|
1440
|
+
var d, p;
|
|
1441
|
+
v ? (W.current = !0, (d = oe.current) == null || d.focus()) : W.current && (W.current = !1, (p = M.current) == null || p.focus());
|
|
1442
|
+
}, [v]), K(() => {
|
|
1443
|
+
if (!E && ae.current) {
|
|
1444
|
+
ae.current = !1;
|
|
1445
|
+
const d = le.current;
|
|
1446
|
+
d != null && d.isConnected && d.focus();
|
|
1404
1447
|
}
|
|
1405
1448
|
}, [E]);
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1449
|
+
const ue = z((d, p) => {
|
|
1450
|
+
ae.current = !p, w(!1);
|
|
1408
1451
|
}, []);
|
|
1409
|
-
|
|
1452
|
+
K(() => {
|
|
1410
1453
|
if (!E) return;
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
},
|
|
1414
|
-
|
|
1454
|
+
const d = (D) => {
|
|
1455
|
+
D.key === "Escape" && D.stopPropagation();
|
|
1456
|
+
}, p = (D) => {
|
|
1457
|
+
D.key === "Escape" && (D.stopPropagation(), ue());
|
|
1415
1458
|
};
|
|
1416
|
-
return window.addEventListener("keydown",
|
|
1417
|
-
window.removeEventListener("keydown",
|
|
1459
|
+
return window.addEventListener("keydown", d, !0), window.addEventListener("keyup", p, !0), () => {
|
|
1460
|
+
window.removeEventListener("keydown", d, !0), window.removeEventListener("keyup", p, !0);
|
|
1418
1461
|
};
|
|
1419
|
-
}, [E,
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
},
|
|
1423
|
-
|
|
1424
|
-
n ||
|
|
1425
|
-
), r &&
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1462
|
+
}, [E, ue]);
|
|
1463
|
+
const U = s === O.IMPORTANT ? T.important : T.unclear, k = (d) => {
|
|
1464
|
+
d.key === "Enter" && (d.preventDefault(), l == null || l());
|
|
1465
|
+
}, L = [T.note, U];
|
|
1466
|
+
L.push(
|
|
1467
|
+
n || Nt(T, o)
|
|
1468
|
+
), r && L.push(r), e && L.push(Ye(e, S)), N && L.push(N);
|
|
1469
|
+
const F = L.join(", "), B = /* @__PURE__ */ C(
|
|
1470
|
+
Q,
|
|
1428
1471
|
{
|
|
1429
1472
|
as: "div",
|
|
1430
1473
|
height: "100%",
|
|
@@ -1432,17 +1475,17 @@ const no = ({
|
|
|
1432
1475
|
borderRadius: "medium",
|
|
1433
1476
|
padding: "small",
|
|
1434
1477
|
position: "relative",
|
|
1435
|
-
role:
|
|
1436
|
-
"aria-label":
|
|
1437
|
-
"aria-pressed":
|
|
1438
|
-
tabIndex:
|
|
1478
|
+
role: h ? void 0 : g || v ? "group" : "button",
|
|
1479
|
+
"aria-label": h ? void 0 : F,
|
|
1480
|
+
"aria-pressed": h || g || v ? void 0 : g,
|
|
1481
|
+
tabIndex: h || g ? -1 : 0,
|
|
1439
1482
|
"data-testid": `note-card-${t}`,
|
|
1440
|
-
elementRef:
|
|
1441
|
-
onClick:
|
|
1442
|
-
onMouseEnter: () =>
|
|
1443
|
-
onMouseLeave: () =>
|
|
1444
|
-
onKeyDown:
|
|
1445
|
-
cursor:
|
|
1483
|
+
elementRef: de,
|
|
1484
|
+
onClick: g ? void 0 : l,
|
|
1485
|
+
onMouseEnter: () => y(!0),
|
|
1486
|
+
onMouseLeave: () => y(!1),
|
|
1487
|
+
onKeyDown: g ? void 0 : k,
|
|
1488
|
+
cursor: v ? "default" : "pointer",
|
|
1446
1489
|
children: [
|
|
1447
1490
|
/* @__PURE__ */ i(
|
|
1448
1491
|
"div",
|
|
@@ -1450,16 +1493,17 @@ const no = ({
|
|
|
1450
1493
|
"data-testid": `note-card-${t}-content`,
|
|
1451
1494
|
style: {
|
|
1452
1495
|
height: "100%",
|
|
1453
|
-
opacity:
|
|
1496
|
+
opacity: g && E && a ? 0.25 : void 0
|
|
1454
1497
|
},
|
|
1455
|
-
children: /* @__PURE__ */
|
|
1498
|
+
children: /* @__PURE__ */ C(R, { direction: "column", gap: "small", height: "100%", children: [
|
|
1456
1499
|
/* @__PURE__ */ i(
|
|
1457
|
-
|
|
1500
|
+
Et,
|
|
1458
1501
|
{
|
|
1459
1502
|
type: s,
|
|
1460
|
-
onTypeChange: c &&
|
|
1461
|
-
renderAsMenuTrigger: c && !!
|
|
1462
|
-
theme:
|
|
1503
|
+
onTypeChange: c && m ? (d) => m(t, d) : void 0,
|
|
1504
|
+
renderAsMenuTrigger: c && !!m && !!g,
|
|
1505
|
+
theme: b.colors,
|
|
1506
|
+
unavailable: !n
|
|
1463
1507
|
}
|
|
1464
1508
|
),
|
|
1465
1509
|
n ? /* @__PURE__ */ i(
|
|
@@ -1470,66 +1514,66 @@ const no = ({
|
|
|
1470
1514
|
overflowWrap: "break-word",
|
|
1471
1515
|
whiteSpace: "pre-wrap"
|
|
1472
1516
|
},
|
|
1473
|
-
children: /* @__PURE__ */ i(
|
|
1474
|
-
|
|
1517
|
+
children: /* @__PURE__ */ i(V, { children: g && c ? /* @__PURE__ */ i(
|
|
1518
|
+
Ae,
|
|
1475
1519
|
{
|
|
1476
1520
|
type: s,
|
|
1477
|
-
isCardActive: !!
|
|
1478
|
-
theme:
|
|
1521
|
+
isCardActive: !!g || $,
|
|
1522
|
+
theme: b,
|
|
1479
1523
|
children: n
|
|
1480
1524
|
}
|
|
1481
|
-
) : /* @__PURE__ */
|
|
1482
|
-
|
|
1483
|
-
/* @__PURE__ */ i("span", { "aria-hidden":
|
|
1484
|
-
|
|
1525
|
+
) : /* @__PURE__ */ C(De, { children: [
|
|
1526
|
+
I && /* @__PURE__ */ i(pe, { children: n }),
|
|
1527
|
+
/* @__PURE__ */ i("span", { "aria-hidden": I, style: { display: "block" }, children: /* @__PURE__ */ i(ve, { maxLines: 3, truncate: "word", onUpdate: j, children: /* @__PURE__ */ i(
|
|
1528
|
+
Ae,
|
|
1485
1529
|
{
|
|
1486
1530
|
type: s,
|
|
1487
|
-
isCardActive: !!
|
|
1488
|
-
theme:
|
|
1531
|
+
isCardActive: !!g || $,
|
|
1532
|
+
theme: b,
|
|
1489
1533
|
children: n
|
|
1490
1534
|
}
|
|
1491
1535
|
) }) })
|
|
1492
1536
|
] }) })
|
|
1493
1537
|
}
|
|
1494
|
-
) : /* @__PURE__ */ i(
|
|
1495
|
-
/* @__PURE__ */ i(
|
|
1496
|
-
|
|
1538
|
+
) : /* @__PURE__ */ i(bt, { reason: o }),
|
|
1539
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ C(R, { direction: "column", gap: "small", height: "100%", children: [
|
|
1540
|
+
v && c ? /* @__PURE__ */ C(R, { direction: "column", gap: "x-small", margin: "xx-small", children: [
|
|
1497
1541
|
/* @__PURE__ */ i(
|
|
1498
|
-
|
|
1542
|
+
tt,
|
|
1499
1543
|
{
|
|
1500
|
-
label: /* @__PURE__ */ i(
|
|
1501
|
-
value:
|
|
1502
|
-
onChange: (
|
|
1503
|
-
placeholder:
|
|
1504
|
-
textareaRef: (
|
|
1505
|
-
|
|
1544
|
+
label: /* @__PURE__ */ i(pe, { children: T.editNote }),
|
|
1545
|
+
value: A,
|
|
1546
|
+
onChange: (d) => G(d.target.value),
|
|
1547
|
+
placeholder: T.addNoteOptional,
|
|
1548
|
+
textareaRef: (d) => {
|
|
1549
|
+
oe.current = d;
|
|
1506
1550
|
}
|
|
1507
1551
|
}
|
|
1508
1552
|
),
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */ i(
|
|
1511
|
-
|
|
1553
|
+
/* @__PURE__ */ C(R, { gap: "xx-small", children: [
|
|
1554
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1555
|
+
ee,
|
|
1512
1556
|
{
|
|
1513
1557
|
display: "block",
|
|
1514
1558
|
size: "small",
|
|
1515
1559
|
"data-testid": `note-card-${t}-cancel`,
|
|
1516
1560
|
onClick: () => {
|
|
1517
|
-
G(r || ""),
|
|
1561
|
+
G(r || ""), _(!1);
|
|
1518
1562
|
},
|
|
1519
|
-
children:
|
|
1563
|
+
children: T.cancel
|
|
1520
1564
|
}
|
|
1521
1565
|
) }),
|
|
1522
|
-
/* @__PURE__ */ i(
|
|
1523
|
-
|
|
1566
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1567
|
+
ee,
|
|
1524
1568
|
{
|
|
1525
1569
|
display: "block",
|
|
1526
1570
|
color: "primary",
|
|
1527
1571
|
size: "small",
|
|
1528
1572
|
"data-testid": `note-card-${t}-save`,
|
|
1529
1573
|
onClick: () => {
|
|
1530
|
-
f == null || f(t,
|
|
1574
|
+
f == null || f(t, A.trim()), _(!1);
|
|
1531
1575
|
},
|
|
1532
|
-
children:
|
|
1576
|
+
children: T.save
|
|
1533
1577
|
}
|
|
1534
1578
|
) })
|
|
1535
1579
|
] })
|
|
@@ -1541,86 +1585,86 @@ const no = ({
|
|
|
1541
1585
|
overflowWrap: "break-word",
|
|
1542
1586
|
whiteSpace: "pre-wrap"
|
|
1543
1587
|
},
|
|
1544
|
-
children:
|
|
1588
|
+
children: g && c ? /* @__PURE__ */ C(V, { children: [
|
|
1545
1589
|
r,
|
|
1546
1590
|
" ",
|
|
1547
1591
|
/* @__PURE__ */ i(
|
|
1548
|
-
|
|
1592
|
+
ye,
|
|
1549
1593
|
{
|
|
1550
1594
|
size: "small",
|
|
1551
1595
|
withBackground: !1,
|
|
1552
1596
|
withBorder: !1,
|
|
1553
1597
|
margin: "xx-small 0 0 xxx-small",
|
|
1554
|
-
screenReaderLabel:
|
|
1598
|
+
screenReaderLabel: T.editNote,
|
|
1555
1599
|
"data-testid": `note-card-${t}-edit`,
|
|
1556
|
-
elementRef: (
|
|
1557
|
-
|
|
1600
|
+
elementRef: (d) => {
|
|
1601
|
+
M.current = d;
|
|
1558
1602
|
},
|
|
1559
|
-
onClick: (
|
|
1560
|
-
|
|
1603
|
+
onClick: (d) => {
|
|
1604
|
+
d.stopPropagation(), _(!0);
|
|
1561
1605
|
},
|
|
1562
|
-
children: /* @__PURE__ */ i(
|
|
1606
|
+
children: /* @__PURE__ */ i(Le, {})
|
|
1563
1607
|
}
|
|
1564
1608
|
)
|
|
1565
|
-
] }) : /* @__PURE__ */
|
|
1566
|
-
|
|
1567
|
-
/* @__PURE__ */ i("span", { "aria-hidden":
|
|
1609
|
+
] }) : /* @__PURE__ */ C(V, { children: [
|
|
1610
|
+
J && /* @__PURE__ */ i(pe, { children: r }),
|
|
1611
|
+
/* @__PURE__ */ i("span", { "aria-hidden": J, style: { display: "block" }, children: /* @__PURE__ */ i(ve, { maxLines: 3, truncate: "word", onUpdate: X, children: r }) })
|
|
1568
1612
|
] })
|
|
1569
1613
|
}
|
|
1570
|
-
) : c &&
|
|
1571
|
-
|
|
1614
|
+
) : c && g ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ C(V, { color: "secondary", children: [
|
|
1615
|
+
T.addNotePrompt,
|
|
1572
1616
|
" ",
|
|
1573
1617
|
/* @__PURE__ */ i(
|
|
1574
|
-
|
|
1618
|
+
ye,
|
|
1575
1619
|
{
|
|
1576
1620
|
size: "small",
|
|
1577
1621
|
withBackground: !1,
|
|
1578
1622
|
withBorder: !1,
|
|
1579
1623
|
margin: "xx-small 0 0 xxx-small",
|
|
1580
|
-
screenReaderLabel:
|
|
1624
|
+
screenReaderLabel: T.editNote,
|
|
1581
1625
|
"data-testid": `note-card-${t}-edit`,
|
|
1582
|
-
elementRef: (
|
|
1583
|
-
|
|
1626
|
+
elementRef: (d) => {
|
|
1627
|
+
M.current = d;
|
|
1584
1628
|
},
|
|
1585
|
-
onClick: (
|
|
1586
|
-
|
|
1629
|
+
onClick: (d) => {
|
|
1630
|
+
d.stopPropagation(), _(!0);
|
|
1587
1631
|
},
|
|
1588
|
-
children: /* @__PURE__ */ i(
|
|
1632
|
+
children: /* @__PURE__ */ i(Le, {})
|
|
1589
1633
|
}
|
|
1590
1634
|
)
|
|
1591
1635
|
] }) }) : null,
|
|
1592
|
-
/* @__PURE__ */
|
|
1593
|
-
/* @__PURE__ */ i(
|
|
1594
|
-
|
|
1595
|
-
|
|
1636
|
+
/* @__PURE__ */ C(R, { justifyItems: "space-between", alignItems: "center", margin: "auto 0 0 0", children: [
|
|
1637
|
+
/* @__PURE__ */ i(V, { as: "div", size: "small", color: "secondary", children: Ye(e, S) }),
|
|
1638
|
+
g && a && /* @__PURE__ */ i(
|
|
1639
|
+
ye,
|
|
1596
1640
|
{
|
|
1597
1641
|
size: "small",
|
|
1598
1642
|
withBackground: !1,
|
|
1599
1643
|
withBorder: !1,
|
|
1600
1644
|
color: "danger",
|
|
1601
1645
|
margin: "xx-small",
|
|
1602
|
-
screenReaderLabel:
|
|
1646
|
+
screenReaderLabel: T.deleteNote,
|
|
1603
1647
|
"data-testid": `note-card-${t}-delete`,
|
|
1604
|
-
elementRef: (
|
|
1605
|
-
|
|
1648
|
+
elementRef: (d) => {
|
|
1649
|
+
le.current = d;
|
|
1606
1650
|
},
|
|
1607
|
-
onClick: (
|
|
1608
|
-
|
|
1651
|
+
onClick: (d) => {
|
|
1652
|
+
d.stopPropagation(), ae.current = !1, w(!0);
|
|
1609
1653
|
},
|
|
1610
|
-
children: /* @__PURE__ */ i(
|
|
1654
|
+
children: /* @__PURE__ */ i(Ce, {})
|
|
1611
1655
|
}
|
|
1612
1656
|
)
|
|
1613
1657
|
] }),
|
|
1614
|
-
|
|
1615
|
-
|
|
1658
|
+
N && /* @__PURE__ */ C(
|
|
1659
|
+
V,
|
|
1616
1660
|
{
|
|
1617
1661
|
as: "div",
|
|
1618
1662
|
size: "small",
|
|
1619
1663
|
color: "secondary",
|
|
1620
1664
|
"data-testid": `note-card-${t}-course`,
|
|
1621
1665
|
children: [
|
|
1622
|
-
|
|
1623
|
-
/* @__PURE__ */ i("span", { "aria-hidden":
|
|
1666
|
+
se && /* @__PURE__ */ i(pe, { children: N }),
|
|
1667
|
+
/* @__PURE__ */ i("span", { "aria-hidden": se, style: { display: "block" }, children: /* @__PURE__ */ i(ve, { maxLines: 1, onUpdate: ne, children: N }) })
|
|
1624
1668
|
]
|
|
1625
1669
|
}
|
|
1626
1670
|
)
|
|
@@ -1628,21 +1672,21 @@ const no = ({
|
|
|
1628
1672
|
] })
|
|
1629
1673
|
}
|
|
1630
1674
|
),
|
|
1631
|
-
|
|
1632
|
-
|
|
1675
|
+
g && E && a && /* @__PURE__ */ i(
|
|
1676
|
+
At,
|
|
1633
1677
|
{
|
|
1634
1678
|
open: !0,
|
|
1635
1679
|
as: "div",
|
|
1636
|
-
label:
|
|
1680
|
+
label: T.deleteNoteConfirmation,
|
|
1637
1681
|
shouldContainFocus: !0,
|
|
1638
1682
|
shouldFocusOnOpen: !0,
|
|
1639
|
-
defaultFocusElement: () =>
|
|
1683
|
+
defaultFocusElement: () => Y.current,
|
|
1640
1684
|
shouldCloseOnDocumentClick: !0,
|
|
1641
1685
|
shouldCloseOnEscape: !1,
|
|
1642
1686
|
shouldReturnFocus: !1,
|
|
1643
|
-
onDismiss:
|
|
1687
|
+
onDismiss: ue,
|
|
1644
1688
|
children: /* @__PURE__ */ i(
|
|
1645
|
-
|
|
1689
|
+
Q,
|
|
1646
1690
|
{
|
|
1647
1691
|
as: "div",
|
|
1648
1692
|
background: "primary",
|
|
@@ -1654,8 +1698,8 @@ const no = ({
|
|
|
1654
1698
|
insetInlineStart: "0",
|
|
1655
1699
|
insetInlineEnd: "0",
|
|
1656
1700
|
stacking: "above",
|
|
1657
|
-
children: /* @__PURE__ */
|
|
1658
|
-
|
|
1701
|
+
children: /* @__PURE__ */ C(
|
|
1702
|
+
R,
|
|
1659
1703
|
{
|
|
1660
1704
|
direction: "column",
|
|
1661
1705
|
justifyItems: "center",
|
|
@@ -1664,32 +1708,32 @@ const no = ({
|
|
|
1664
1708
|
height: "100%",
|
|
1665
1709
|
children: [
|
|
1666
1710
|
/* @__PURE__ */ i(
|
|
1667
|
-
|
|
1711
|
+
ee,
|
|
1668
1712
|
{
|
|
1669
1713
|
display: "block",
|
|
1670
1714
|
color: "danger",
|
|
1671
1715
|
withBackground: !1,
|
|
1672
|
-
renderIcon: /* @__PURE__ */ i(
|
|
1716
|
+
renderIcon: /* @__PURE__ */ i(Ce, {}),
|
|
1673
1717
|
"data-testid": `note-card-${t}-confirm-delete`,
|
|
1674
|
-
onClick: (
|
|
1675
|
-
|
|
1718
|
+
onClick: (d) => {
|
|
1719
|
+
d.stopPropagation(), a(t), w(!1);
|
|
1676
1720
|
},
|
|
1677
|
-
children:
|
|
1721
|
+
children: T.deleteNote
|
|
1678
1722
|
}
|
|
1679
1723
|
),
|
|
1680
1724
|
/* @__PURE__ */ i(
|
|
1681
|
-
|
|
1725
|
+
ee,
|
|
1682
1726
|
{
|
|
1683
1727
|
display: "block",
|
|
1684
1728
|
withBackground: !1,
|
|
1685
1729
|
"data-testid": `note-card-${t}-cancel-delete`,
|
|
1686
|
-
elementRef: (
|
|
1687
|
-
|
|
1730
|
+
elementRef: (d) => {
|
|
1731
|
+
Y.current = d;
|
|
1688
1732
|
},
|
|
1689
|
-
onClick: (
|
|
1690
|
-
|
|
1733
|
+
onClick: (d) => {
|
|
1734
|
+
d.stopPropagation(), ue();
|
|
1691
1735
|
},
|
|
1692
|
-
children:
|
|
1736
|
+
children: T.cancel
|
|
1693
1737
|
}
|
|
1694
1738
|
)
|
|
1695
1739
|
]
|
|
@@ -1702,8 +1746,11 @@ const no = ({
|
|
|
1702
1746
|
]
|
|
1703
1747
|
}
|
|
1704
1748
|
);
|
|
1705
|
-
return
|
|
1706
|
-
},
|
|
1749
|
+
return h && x ? x({ href: h, children: B, ariaLabel: F }) : B;
|
|
1750
|
+
}, St = (t) => {
|
|
1751
|
+
var e;
|
|
1752
|
+
return t.highlightSourceUnavailable ? "sourceUnavailable" : (e = t.highlightData) != null && e.hasNoHighlightAnymore ? "noHighlight" : void 0;
|
|
1753
|
+
}, mo = (t) => St(t) !== void 0, go = {
|
|
1707
1754
|
display: "grid",
|
|
1708
1755
|
gap: "1rem",
|
|
1709
1756
|
boxSizing: "border-box",
|
|
@@ -1711,7 +1758,7 @@ const no = ({
|
|
|
1711
1758
|
margin: 0,
|
|
1712
1759
|
padding: 0,
|
|
1713
1760
|
listStyle: "none"
|
|
1714
|
-
},
|
|
1761
|
+
}, Go = ({
|
|
1715
1762
|
notes: t,
|
|
1716
1763
|
isLoading: e,
|
|
1717
1764
|
isError: n,
|
|
@@ -1721,93 +1768,93 @@ const no = ({
|
|
|
1721
1768
|
onNoteSelect: l,
|
|
1722
1769
|
onNoteDelete: a,
|
|
1723
1770
|
onNoteSave: f,
|
|
1724
|
-
onNoteTypeChange:
|
|
1725
|
-
onNotesEmptied:
|
|
1771
|
+
onNoteTypeChange: m,
|
|
1772
|
+
onNotesEmptied: g,
|
|
1726
1773
|
selectedNoteId: c,
|
|
1727
|
-
hasActiveFilter:
|
|
1728
|
-
columnCount:
|
|
1729
|
-
highlightTheme:
|
|
1774
|
+
hasActiveFilter: N = !1,
|
|
1775
|
+
columnCount: S = 1,
|
|
1776
|
+
highlightTheme: b,
|
|
1730
1777
|
locale: x,
|
|
1731
|
-
courseNames:
|
|
1732
|
-
renderNoteLink:
|
|
1733
|
-
noteHref:
|
|
1778
|
+
courseNames: h,
|
|
1779
|
+
renderNoteLink: T,
|
|
1780
|
+
noteHref: $
|
|
1734
1781
|
}) => {
|
|
1735
|
-
const { translations:
|
|
1782
|
+
const { translations: y } = Z(), v = P(null), _ = P(null), A = z(
|
|
1736
1783
|
(E) => {
|
|
1737
1784
|
const w = t.findIndex((j) => j.id === E);
|
|
1738
|
-
let
|
|
1739
|
-
t.length > 1 && (
|
|
1785
|
+
let I = null;
|
|
1786
|
+
t.length > 1 && (I = w > 0 ? t[w - 1].id : t[1].id), _.current = { targetId: I }, a == null || a(E);
|
|
1740
1787
|
},
|
|
1741
1788
|
[t, a]
|
|
1742
1789
|
);
|
|
1743
|
-
if (
|
|
1790
|
+
if (K(() => {
|
|
1744
1791
|
var w;
|
|
1745
|
-
const E =
|
|
1792
|
+
const E = _.current;
|
|
1746
1793
|
if (E)
|
|
1747
|
-
if (
|
|
1748
|
-
|
|
1794
|
+
if (_.current = null, E.targetId === null)
|
|
1795
|
+
g == null || g();
|
|
1749
1796
|
else {
|
|
1750
|
-
const
|
|
1797
|
+
const I = (w = v.current) == null ? void 0 : w.querySelector(
|
|
1751
1798
|
`[data-testid="note-card-${E.targetId}"]`
|
|
1752
1799
|
);
|
|
1753
|
-
|
|
1800
|
+
I == null || I.focus();
|
|
1754
1801
|
}
|
|
1755
|
-
}, [t,
|
|
1756
|
-
return /* @__PURE__ */ i(
|
|
1802
|
+
}, [t, g]), e)
|
|
1803
|
+
return /* @__PURE__ */ i(Q, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ i(Pt, { renderTitle: y.loadingNotes }) });
|
|
1757
1804
|
if (n)
|
|
1758
|
-
return /* @__PURE__ */ i(
|
|
1805
|
+
return /* @__PURE__ */ i(Q, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ i(Ie, { level: "h4", children: y.failedToLoadNotes }) });
|
|
1759
1806
|
if (t.length === 0)
|
|
1760
|
-
return /* @__PURE__ */ i(
|
|
1807
|
+
return /* @__PURE__ */ i(Q, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ i(ao, { hasActiveFilter: N }) });
|
|
1761
1808
|
const G = typeof o == "number" && typeof r == "number" && r > 1 && s !== void 0;
|
|
1762
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ C(De, { children: [
|
|
1763
1810
|
/* @__PURE__ */ i(
|
|
1764
1811
|
"ul",
|
|
1765
1812
|
{
|
|
1766
|
-
ref:
|
|
1767
|
-
style: { ...
|
|
1813
|
+
ref: v,
|
|
1814
|
+
style: { ...go, gridTemplateColumns: `repeat(${S}, minmax(0, 1fr))` },
|
|
1768
1815
|
role: "list",
|
|
1769
1816
|
"data-testid": "notes-grid",
|
|
1770
1817
|
children: t.map((E) => {
|
|
1771
1818
|
var w;
|
|
1772
1819
|
return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1773
|
-
|
|
1820
|
+
fo,
|
|
1774
1821
|
{
|
|
1775
1822
|
noteId: E.id,
|
|
1776
1823
|
date: E.createdAt,
|
|
1777
|
-
type: E.reaction[0] ??
|
|
1778
|
-
highlight: (w = E.highlightData) == null ? void 0 : w.selectedText,
|
|
1779
|
-
highlightUnavailableReason: E
|
|
1824
|
+
type: E.reaction[0] ?? O.IMPORTANT,
|
|
1825
|
+
highlight: mo(E) || (w = E.highlightData) == null ? void 0 : w.selectedText,
|
|
1826
|
+
highlightUnavailableReason: St(E),
|
|
1780
1827
|
note: E.userText,
|
|
1781
1828
|
isActive: c === E.id,
|
|
1782
1829
|
isPanelView: !!c,
|
|
1783
1830
|
onClick: l ? () => l(E.id) : void 0,
|
|
1784
|
-
onDelete: a ?
|
|
1785
|
-
onSaveNote: f ? (
|
|
1786
|
-
onTypeChange:
|
|
1787
|
-
highlightTheme:
|
|
1831
|
+
onDelete: a ? A : void 0,
|
|
1832
|
+
onSaveNote: f ? (I, j) => f(I, j) : void 0,
|
|
1833
|
+
onTypeChange: m ? (I, j) => m(I, j) : void 0,
|
|
1834
|
+
highlightTheme: b,
|
|
1788
1835
|
locale: x,
|
|
1789
|
-
courseName:
|
|
1790
|
-
renderLink:
|
|
1791
|
-
href:
|
|
1836
|
+
courseName: h == null ? void 0 : h.get(E.courseId),
|
|
1837
|
+
renderLink: T,
|
|
1838
|
+
href: $ ? $(E.id, E) : void 0
|
|
1792
1839
|
}
|
|
1793
1840
|
) }, E.id);
|
|
1794
1841
|
})
|
|
1795
1842
|
}
|
|
1796
1843
|
),
|
|
1797
|
-
G && /* @__PURE__ */ i(
|
|
1798
|
-
|
|
1844
|
+
G && /* @__PURE__ */ i(R, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ i(R.Item, { children: /* @__PURE__ */ i(
|
|
1845
|
+
Dt,
|
|
1799
1846
|
{
|
|
1800
1847
|
as: "nav",
|
|
1801
1848
|
variant: "input",
|
|
1802
|
-
labelNext:
|
|
1803
|
-
labelPrev:
|
|
1849
|
+
labelNext: y.nextPage,
|
|
1850
|
+
labelPrev: y.previousPage,
|
|
1804
1851
|
currentPage: o,
|
|
1805
1852
|
totalPageNumber: r,
|
|
1806
1853
|
onPageChange: s
|
|
1807
1854
|
}
|
|
1808
1855
|
) }) })
|
|
1809
1856
|
] });
|
|
1810
|
-
},
|
|
1857
|
+
}, jo = ({
|
|
1811
1858
|
noteText: t,
|
|
1812
1859
|
reaction: e,
|
|
1813
1860
|
highlightText: n,
|
|
@@ -1818,122 +1865,123 @@ const no = ({
|
|
|
1818
1865
|
onBack: a,
|
|
1819
1866
|
editing: f = !1
|
|
1820
1867
|
}) => {
|
|
1821
|
-
const { translations:
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
n != null ? /* @__PURE__ */ i(
|
|
1868
|
+
const { translations: m } = Z(), [g, c] = H(f), [N, S] = H(t || ""), [b, x] = H(!1);
|
|
1869
|
+
return /* @__PURE__ */ C(R, { direction: "column", gap: "small", "data-testid": "single-note", children: [
|
|
1870
|
+
n != null ? /* @__PURE__ */ i(Q, { as: "div", children: /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(Ae, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ i(bt, {}),
|
|
1824
1871
|
/* @__PURE__ */ i(
|
|
1825
|
-
|
|
1872
|
+
Et,
|
|
1826
1873
|
{
|
|
1827
1874
|
type: e,
|
|
1828
1875
|
onTypeChange: l,
|
|
1829
1876
|
renderAsMenuTrigger: !!l,
|
|
1830
|
-
theme: o.colors
|
|
1877
|
+
theme: o.colors,
|
|
1878
|
+
unavailable: n == null
|
|
1831
1879
|
}
|
|
1832
1880
|
),
|
|
1833
|
-
|
|
1881
|
+
g ? /* @__PURE__ */ C(R, { direction: "column", gap: "x-small", children: [
|
|
1834
1882
|
/* @__PURE__ */ i(
|
|
1835
|
-
|
|
1883
|
+
tt,
|
|
1836
1884
|
{
|
|
1837
|
-
label:
|
|
1838
|
-
value:
|
|
1839
|
-
onChange: (
|
|
1885
|
+
label: m.addNoteOptional,
|
|
1886
|
+
value: N,
|
|
1887
|
+
onChange: (h) => S(h.target.value),
|
|
1840
1888
|
resize: "vertical"
|
|
1841
1889
|
}
|
|
1842
1890
|
),
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */ i(
|
|
1845
|
-
|
|
1891
|
+
/* @__PURE__ */ C(R, { gap: "xx-small", children: [
|
|
1892
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1893
|
+
ee,
|
|
1846
1894
|
{
|
|
1847
1895
|
display: "block",
|
|
1848
1896
|
size: "small",
|
|
1849
1897
|
"data-testid": "single-note-cancel",
|
|
1850
1898
|
onClick: () => {
|
|
1851
|
-
|
|
1899
|
+
S(t || ""), c(!1);
|
|
1852
1900
|
},
|
|
1853
|
-
children:
|
|
1901
|
+
children: m.cancel
|
|
1854
1902
|
}
|
|
1855
1903
|
) }),
|
|
1856
|
-
/* @__PURE__ */ i(
|
|
1857
|
-
|
|
1904
|
+
/* @__PURE__ */ i(R.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1905
|
+
ee,
|
|
1858
1906
|
{
|
|
1859
1907
|
display: "block",
|
|
1860
1908
|
color: "primary",
|
|
1861
1909
|
size: "small",
|
|
1862
1910
|
"data-testid": "single-note-save",
|
|
1863
1911
|
onClick: () => {
|
|
1864
|
-
r(
|
|
1912
|
+
r(N), c(!1);
|
|
1865
1913
|
},
|
|
1866
|
-
children:
|
|
1914
|
+
children: m.save
|
|
1867
1915
|
}
|
|
1868
1916
|
) })
|
|
1869
1917
|
] })
|
|
1870
|
-
] }) : /* @__PURE__ */
|
|
1871
|
-
t && /* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */ i(
|
|
1873
|
-
/* @__PURE__ */ i(
|
|
1918
|
+
] }) : /* @__PURE__ */ C(R, { direction: "column", gap: "small", children: [
|
|
1919
|
+
t && /* @__PURE__ */ C(Q, { as: "div", children: [
|
|
1920
|
+
/* @__PURE__ */ i(Ie, { level: "h4", margin: "0 0 xx-small 0", children: m.note }),
|
|
1921
|
+
/* @__PURE__ */ i(V, { children: t })
|
|
1874
1922
|
] }),
|
|
1875
|
-
/* @__PURE__ */
|
|
1923
|
+
/* @__PURE__ */ C(R, { justifyItems: "space-between", children: [
|
|
1876
1924
|
/* @__PURE__ */ i(
|
|
1877
|
-
|
|
1925
|
+
ee,
|
|
1878
1926
|
{
|
|
1879
1927
|
size: "small",
|
|
1880
|
-
renderIcon: /* @__PURE__ */ i(
|
|
1928
|
+
renderIcon: /* @__PURE__ */ i(Lt, {}),
|
|
1881
1929
|
"data-testid": "single-note-back",
|
|
1882
1930
|
onClick: () => a == null ? void 0 : a(),
|
|
1883
|
-
children:
|
|
1931
|
+
children: m.back
|
|
1884
1932
|
}
|
|
1885
1933
|
),
|
|
1886
|
-
/* @__PURE__ */
|
|
1934
|
+
/* @__PURE__ */ C(R, { gap: "xx-small", children: [
|
|
1887
1935
|
s && /* @__PURE__ */ i(
|
|
1888
|
-
|
|
1936
|
+
ye,
|
|
1889
1937
|
{
|
|
1890
1938
|
size: "small",
|
|
1891
1939
|
withBackground: !1,
|
|
1892
1940
|
withBorder: !1,
|
|
1893
1941
|
color: "danger",
|
|
1894
|
-
screenReaderLabel:
|
|
1942
|
+
screenReaderLabel: m.deleteNote,
|
|
1895
1943
|
"data-testid": "single-note-delete",
|
|
1896
1944
|
onClick: () => x(!0),
|
|
1897
|
-
children: /* @__PURE__ */ i(
|
|
1945
|
+
children: /* @__PURE__ */ i(Ce, {})
|
|
1898
1946
|
}
|
|
1899
1947
|
),
|
|
1900
1948
|
/* @__PURE__ */ i(
|
|
1901
|
-
|
|
1949
|
+
ye,
|
|
1902
1950
|
{
|
|
1903
1951
|
size: "small",
|
|
1904
1952
|
withBackground: !1,
|
|
1905
1953
|
withBorder: !1,
|
|
1906
|
-
screenReaderLabel:
|
|
1954
|
+
screenReaderLabel: m.editNote,
|
|
1907
1955
|
"data-testid": "single-note-edit",
|
|
1908
1956
|
onClick: () => c(!0),
|
|
1909
|
-
children: /* @__PURE__ */ i(
|
|
1957
|
+
children: /* @__PURE__ */ i(Le, {})
|
|
1910
1958
|
}
|
|
1911
1959
|
)
|
|
1912
1960
|
] })
|
|
1913
1961
|
] }),
|
|
1914
|
-
|
|
1962
|
+
b && s && /* @__PURE__ */ i(Q, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ C(R, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
|
|
1915
1963
|
/* @__PURE__ */ i(
|
|
1916
|
-
|
|
1964
|
+
ee,
|
|
1917
1965
|
{
|
|
1918
1966
|
display: "block",
|
|
1919
1967
|
color: "danger",
|
|
1920
1968
|
size: "small",
|
|
1921
|
-
renderIcon: /* @__PURE__ */ i(
|
|
1969
|
+
renderIcon: /* @__PURE__ */ i(Ce, {}),
|
|
1922
1970
|
"data-testid": "single-note-confirm-delete",
|
|
1923
1971
|
onClick: () => {
|
|
1924
1972
|
s(), x(!1);
|
|
1925
1973
|
},
|
|
1926
|
-
children:
|
|
1974
|
+
children: m.deleteNote
|
|
1927
1975
|
}
|
|
1928
1976
|
),
|
|
1929
1977
|
/* @__PURE__ */ i(
|
|
1930
|
-
|
|
1978
|
+
ee,
|
|
1931
1979
|
{
|
|
1932
1980
|
display: "block",
|
|
1933
1981
|
size: "small",
|
|
1934
1982
|
"data-testid": "single-note-cancel-delete",
|
|
1935
1983
|
onClick: () => x(!1),
|
|
1936
|
-
children:
|
|
1984
|
+
children: m.cancel
|
|
1937
1985
|
}
|
|
1938
1986
|
)
|
|
1939
1987
|
] }) })
|
|
@@ -1941,27 +1989,27 @@ const no = ({
|
|
|
1941
1989
|
] });
|
|
1942
1990
|
};
|
|
1943
1991
|
export {
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1992
|
+
Uo as ContentWithNoteWrapper,
|
|
1993
|
+
Ae as Highlight,
|
|
1994
|
+
bt as HighlightError,
|
|
1995
|
+
fo as NoteCard,
|
|
1996
|
+
Et as NoteChip,
|
|
1997
|
+
pt as NoteReactionMenu,
|
|
1998
|
+
ao as NotebookEmptyState,
|
|
1999
|
+
Fo as NotebookProvider,
|
|
2000
|
+
no as NotebookTranslationsProvider,
|
|
2001
|
+
Bo as NotebookTray,
|
|
2002
|
+
Go as NotesListView,
|
|
2003
|
+
O as REACTION_TYPE,
|
|
2004
|
+
jo as SingleNote,
|
|
2005
|
+
$e as createTransparentColor,
|
|
2006
|
+
Nt as getHighlightUnavailableMessage,
|
|
2007
|
+
dn as useCreateNote,
|
|
2008
|
+
un as useDeleteNote,
|
|
2009
|
+
ct as useGetNotes,
|
|
2010
|
+
gt as useNotebook,
|
|
2011
|
+
Z as useNotebookTranslations,
|
|
2012
|
+
Ho as useNotesData,
|
|
2013
|
+
$o as useReactionFilter,
|
|
2014
|
+
mn as useUpdateNote
|
|
1967
2015
|
};
|