@instructure/platform-assignment-review 0.4.14 → 0.4.15
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/index.js +36 -45
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -239,7 +239,7 @@ function _n() {
|
|
|
239
239
|
if (n.version = "3.4.5", n.removed = [], !e || !e.document || e.document.nodeType !== Se.document || !e.Element)
|
|
240
240
|
return n.isSupported = !1, n;
|
|
241
241
|
let o = e.document;
|
|
242
|
-
const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, f = e.Node, m = e.Element, p = e.NodeFilter, h = e.NamedNodeMap, C = h === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : h, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = m.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"),
|
|
242
|
+
const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, f = e.Node, m = e.Element, p = e.NodeFilter, h = e.NamedNodeMap, C = h === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : h, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = m.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), k = de(V, "nextSibling"), ne = de(V, "childNodes"), O = de(V, "parentNode"), ce = f && f.prototype ? de(f.prototype, "nodeType") : null;
|
|
243
243
|
if (typeof d == "function") {
|
|
244
244
|
const g = o.createElement("template");
|
|
245
245
|
g.content && g.content.ownerDocument && (o = g.content.ownerDocument);
|
|
@@ -248,7 +248,7 @@ function _n() {
|
|
|
248
248
|
const J = o, Ie = J.implementation, xe = J.createNodeIterator, Xe = J.createDocumentFragment, Ke = J.getElementsByTagName, Ze = a.importNode;
|
|
249
249
|
let j = mn();
|
|
250
250
|
n.isSupported = typeof An == "function" && typeof O == "function" && Ie && Ie.createHTMLDocument !== void 0;
|
|
251
|
-
const
|
|
251
|
+
const Me = yi, ke = Ai, Pe = Si, Cn = _i, Dn = Ei, Rn = Ii, wt = wi, On = Di;
|
|
252
252
|
let Ct = cn, P = null;
|
|
253
253
|
const Dt = T({}, [...rn, ...ft, ...pt, ...gt, ...sn]);
|
|
254
254
|
let U = null;
|
|
@@ -288,10 +288,10 @@ function _n() {
|
|
|
288
288
|
}
|
|
289
289
|
}));
|
|
290
290
|
let Ot = !0, Qe = !0, Nt = !1, vt = !0, oe = !1, Ce = !0, me = !1, Je = !1, et = !1, pe = !1, Ue = !1, ze = !1, Lt = !0, xt = !1;
|
|
291
|
-
const
|
|
291
|
+
const Mt = "user-content-";
|
|
292
292
|
let tt = !0, De = !1, ge = {}, Z = null;
|
|
293
293
|
const nt = T({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
294
|
-
let
|
|
294
|
+
let kt = null;
|
|
295
295
|
const Pt = T({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
296
296
|
let it = null;
|
|
297
297
|
const Ft = T({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), je = "http://www.w3.org/1998/Math/MathML", He = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
|
|
@@ -301,17 +301,17 @@ function _n() {
|
|
|
301
301
|
const vn = T({}, ["title", "style", "font", "a", "script"]);
|
|
302
302
|
let Re = null;
|
|
303
303
|
const Ln = ["application/xhtml+xml", "text/html"], xn = "text/html";
|
|
304
|
-
let
|
|
305
|
-
const
|
|
304
|
+
let M = null, be = null;
|
|
305
|
+
const Mn = o.createElement("form"), Ut = function(t) {
|
|
306
306
|
return t instanceof RegExp || t instanceof Function;
|
|
307
307
|
}, lt = function() {
|
|
308
308
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
309
309
|
if (be && be === t)
|
|
310
310
|
return;
|
|
311
311
|
(!t || typeof t != "object") && (t = {}), t = W(t), Re = // eslint-disable-next-line unicorn/prefer-includes
|
|
312
|
-
Ln.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? xn : t.PARSER_MEDIA_TYPE,
|
|
312
|
+
Ln.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? xn : t.PARSER_MEDIA_TYPE, M = Re === "application/xhtml+xml" ? dt : Ne, P = D(t, "ALLOWED_TAGS") && H(t.ALLOWED_TAGS) ? T({}, t.ALLOWED_TAGS, M) : Dt, U = D(t, "ALLOWED_ATTR") && H(t.ALLOWED_ATTR) ? T({}, t.ALLOWED_ATTR, M) : Rt, rt = D(t, "ALLOWED_NAMESPACES") && H(t.ALLOWED_NAMESPACES) ? T({}, t.ALLOWED_NAMESPACES, dt) : Nn, it = D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) ? T(W(Ft), t.ADD_URI_SAFE_ATTR, M) : Ft, kt = D(t, "ADD_DATA_URI_TAGS") && H(t.ADD_DATA_URI_TAGS) ? T(W(Pt), t.ADD_DATA_URI_TAGS, M) : Pt, Z = D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) ? T({}, t.FORBID_CONTENTS, M) : nt, we = D(t, "FORBID_TAGS") && H(t.FORBID_TAGS) ? T({}, t.FORBID_TAGS, M) : W({}), Fe = D(t, "FORBID_ATTR") && H(t.FORBID_ATTR) ? T({}, t.FORBID_ATTR, M) : W({}), ge = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? W(t.USE_PROFILES) : t.USE_PROFILES : !1, Ot = t.ALLOW_ARIA_ATTR !== !1, Qe = t.ALLOW_DATA_ATTR !== !1, Nt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = t.SAFE_FOR_TEMPLATES || !1, Ce = t.SAFE_FOR_XML !== !1, me = t.WHOLE_DOCUMENT || !1, pe = t.RETURN_DOM || !1, Ue = t.RETURN_DOM_FRAGMENT || !1, ze = t.RETURN_TRUSTED_TYPE || !1, et = t.FORCE_BODY || !1, Lt = t.SANITIZE_DOM !== !1, xt = t.SANITIZE_NAMED_PROPS || !1, tt = t.KEEP_CONTENT !== !1, De = t.IN_PLACE || !1, Ct = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : cn, he = typeof t.NAMESPACE == "string" ? t.NAMESPACE : Q, st = D(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? W(t.MATHML_TEXT_INTEGRATION_POINTS) : T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = D(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? W(t.HTML_INTEGRATION_POINTS) : T({}, ["annotation-xml"]);
|
|
313
313
|
const s = D(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? W(t.CUSTOM_ELEMENT_HANDLING) : _e(null);
|
|
314
|
-
if (R = _e(null), D(s, "tagNameCheck") && Ut(s.tagNameCheck) && (R.tagNameCheck = s.tagNameCheck), D(s, "attributeNameCheck") && Ut(s.attributeNameCheck) && (R.attributeNameCheck = s.attributeNameCheck), D(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), oe && (Qe = !1), Ue && (pe = !0), ge && (P = T({}, sn), U = _e(null), ge.html === !0 && (T(P, rn), T(U, an)), ge.svg === !0 && (T(P, ft), T(U, ht), T(U, We)), ge.svgFilters === !0 && (T(P, pt), T(U, ht), T(U, We)), ge.mathMl === !0 && (T(P, gt), T(U, ln), T(U, We))), ie.tagCheck = null, ie.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? ie.tagCheck = t.ADD_TAGS : H(t.ADD_TAGS) && (P === Dt && (P = W(P)), T(P, t.ADD_TAGS,
|
|
314
|
+
if (R = _e(null), D(s, "tagNameCheck") && Ut(s.tagNameCheck) && (R.tagNameCheck = s.tagNameCheck), D(s, "attributeNameCheck") && Ut(s.attributeNameCheck) && (R.attributeNameCheck = s.attributeNameCheck), D(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), oe && (Qe = !1), Ue && (pe = !0), ge && (P = T({}, sn), U = _e(null), ge.html === !0 && (T(P, rn), T(U, an)), ge.svg === !0 && (T(P, ft), T(U, ht), T(U, We)), ge.svgFilters === !0 && (T(P, pt), T(U, ht), T(U, We)), ge.mathMl === !0 && (T(P, gt), T(U, ln), T(U, We))), ie.tagCheck = null, ie.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? ie.tagCheck = t.ADD_TAGS : H(t.ADD_TAGS) && (P === Dt && (P = W(P)), T(P, t.ADD_TAGS, M))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? ie.attributeCheck = t.ADD_ATTR : H(t.ADD_ATTR) && (U === Rt && (U = W(U)), T(U, t.ADD_ATTR, M))), D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) && T(it, t.ADD_URI_SAFE_ATTR, M), D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.FORBID_CONTENTS, M)), D(t, "ADD_FORBID_CONTENTS") && H(t.ADD_FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.ADD_FORBID_CONTENTS, M)), tt && (P["#text"] = !0), me && T(P, ["html", "head", "body"]), P.table && (T(P, ["tbody"]), delete we.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
315
315
|
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
316
316
|
throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
317
317
|
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -320,7 +320,7 @@ function _n() {
|
|
|
320
320
|
} else
|
|
321
321
|
E === void 0 && (E = Oi(y, l)), E !== null && typeof N == "string" && (N = E.createHTML(""));
|
|
322
322
|
B && B(t), be = t;
|
|
323
|
-
}, zt = T({}, [...ft, ...pt, ...bi]), jt = T({}, [...gt, ...Ti]),
|
|
323
|
+
}, zt = T({}, [...ft, ...pt, ...bi]), jt = T({}, [...gt, ...Ti]), kn = function(t) {
|
|
324
324
|
let s = O(t);
|
|
325
325
|
(!s || !s.tagName) && (s = {
|
|
326
326
|
namespaceURI: he,
|
|
@@ -404,7 +404,7 @@ function _n() {
|
|
|
404
404
|
let u = s.nextNode();
|
|
405
405
|
for (; u; ) {
|
|
406
406
|
let A = u.data;
|
|
407
|
-
Te([
|
|
407
|
+
Te([Me, ke, Pe], (v) => {
|
|
408
408
|
A = Ae(A, v, " ");
|
|
409
409
|
}), u.data = A, u = s.nextNode();
|
|
410
410
|
}
|
|
@@ -428,7 +428,7 @@ function _n() {
|
|
|
428
428
|
let s = null;
|
|
429
429
|
if (ee(j.beforeSanitizeElements, t, null), ct(t))
|
|
430
430
|
return X(t), !0;
|
|
431
|
-
const u =
|
|
431
|
+
const u = M(t.nodeName);
|
|
432
432
|
if (ee(j.uponSanitizeElement, t, {
|
|
433
433
|
tagName: u,
|
|
434
434
|
allowedTags: P
|
|
@@ -443,19 +443,19 @@ function _n() {
|
|
|
443
443
|
const L = v.length;
|
|
444
444
|
for (let G = L - 1; G >= 0; --G) {
|
|
445
445
|
const re = fe(v[G], !0);
|
|
446
|
-
A.insertBefore(re,
|
|
446
|
+
A.insertBefore(re, k(t));
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
return X(t), !0;
|
|
451
451
|
}
|
|
452
|
-
return t instanceof m && !
|
|
452
|
+
return t instanceof m && !kn(t) || (u === "noscript" || u === "noembed" || u === "noframes") && z(/<\/no(script|embed|frames)/i, t.innerHTML) ? (X(t), !0) : (oe && t.nodeType === Se.text && (s = t.textContent, Te([Me, ke, Pe], (A) => {
|
|
453
453
|
s = Ae(s, A, " ");
|
|
454
454
|
}), t.textContent !== s && (ye(n.removed, {
|
|
455
455
|
element: t.cloneNode()
|
|
456
456
|
}), t.textContent = s)), ee(j.afterSanitizeElements, t, null), !1);
|
|
457
457
|
}, Wt = function(t, s, u) {
|
|
458
|
-
if (Fe[s] || Lt && (s === "id" || s === "name") && (u in o || u in
|
|
458
|
+
if (Fe[s] || Lt && (s === "id" || s === "name") && (u in o || u in Mn))
|
|
459
459
|
return !1;
|
|
460
460
|
const A = U[s] || ie.attributeCheck instanceof Function && ie.attributeCheck(s, t);
|
|
461
461
|
if (!(Qe && !Fe[s] && z(Cn, s))) {
|
|
@@ -471,7 +471,7 @@ function _n() {
|
|
|
471
471
|
) return !1;
|
|
472
472
|
} else if (!it[s]) {
|
|
473
473
|
if (!z(Ct, Ae(u, wt, ""))) {
|
|
474
|
-
if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(u, "data:") === 0 &&
|
|
474
|
+
if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(u, "data:") === 0 && kt[t])) {
|
|
475
475
|
if (!(Nt && !z(Rn, Ae(u, wt, "")))) {
|
|
476
476
|
if (u)
|
|
477
477
|
return !1;
|
|
@@ -498,9 +498,9 @@ function _n() {
|
|
|
498
498
|
};
|
|
499
499
|
let A = s.length;
|
|
500
500
|
for (; A--; ) {
|
|
501
|
-
const v = s[A], L = v.name, G = v.namespaceURI, re = v.value, te =
|
|
501
|
+
const v = s[A], L = v.name, G = v.namespaceURI, re = v.value, te = M(L), ut = re;
|
|
502
502
|
let F = L === "value" ? ut : mi(ut);
|
|
503
|
-
if (u.attrName = te, u.attrValue = F, u.keepAttr = !0, u.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, u), F = u.attrValue, xt && (te === "id" || te === "name") && tn(F,
|
|
503
|
+
if (u.attrName = te, u.attrValue = F, u.keepAttr = !0, u.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, u), F = u.attrValue, xt && (te === "id" || te === "name") && tn(F, Mt) !== 0 && (ue(L, t), F = Mt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
|
|
504
504
|
ue(L, t);
|
|
505
505
|
continue;
|
|
506
506
|
}
|
|
@@ -518,10 +518,10 @@ function _n() {
|
|
|
518
518
|
ue(L, t);
|
|
519
519
|
continue;
|
|
520
520
|
}
|
|
521
|
-
oe && Te([
|
|
521
|
+
oe && Te([Me, ke, Pe], (Xt) => {
|
|
522
522
|
F = Ae(F, Xt, " ");
|
|
523
523
|
});
|
|
524
|
-
const Vt =
|
|
524
|
+
const Vt = M(t.nodeName);
|
|
525
525
|
if (!Wt(Vt, te, F)) {
|
|
526
526
|
ue(L, t);
|
|
527
527
|
continue;
|
|
@@ -575,7 +575,7 @@ function _n() {
|
|
|
575
575
|
if (Je || lt(t), n.removed = [], typeof g == "string" && (De = !1), De) {
|
|
576
576
|
const re = g.nodeName;
|
|
577
577
|
if (typeof re == "string") {
|
|
578
|
-
const te =
|
|
578
|
+
const te = M(re);
|
|
579
579
|
if (!P[te] || we[te])
|
|
580
580
|
throw Ge("root node is forbidden and cannot be sanitized in-place");
|
|
581
581
|
}
|
|
@@ -605,7 +605,7 @@ function _n() {
|
|
|
605
605
|
}
|
|
606
606
|
let G = me ? s.outerHTML : s.innerHTML;
|
|
607
607
|
return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(Ci, s.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
|
|
608
|
-
` + G), oe && Te([
|
|
608
|
+
` + G), oe && Te([Me, ke, Pe], (re) => {
|
|
609
609
|
G = Ae(G, re, " ");
|
|
610
610
|
}), E && ze ? E.createHTML(G) : G;
|
|
611
611
|
}, n.setConfig = function() {
|
|
@@ -615,7 +615,7 @@ function _n() {
|
|
|
615
615
|
be = null, Je = !1;
|
|
616
616
|
}, n.isValidAttribute = function(g, t, s) {
|
|
617
617
|
be || lt({});
|
|
618
|
-
const u =
|
|
618
|
+
const u = M(g), A = M(t);
|
|
619
619
|
return Wt(u, A, s);
|
|
620
620
|
}, n.addHook = function(g, t) {
|
|
621
621
|
typeof t == "function" && ye(j[g], t);
|
|
@@ -885,16 +885,7 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
885
885
|
"cite",
|
|
886
886
|
"longdesc",
|
|
887
887
|
"xlink:href"
|
|
888
|
-
]), Li = [
|
|
889
|
-
"background",
|
|
890
|
-
"background-image",
|
|
891
|
-
"list-style",
|
|
892
|
-
"list-style-image",
|
|
893
|
-
"cursor",
|
|
894
|
-
// content: url(...) triggers an HTTP GET even on non-pseudo elements in some
|
|
895
|
-
// browsers; strip it as defense-in-depth against tracking-pixel exfiltration.
|
|
896
|
-
"content"
|
|
897
|
-
], xi = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, ki = /* @__PURE__ */ new Set([
|
|
888
|
+
]), Li = ["content"], xi = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, Mi = /* @__PURE__ */ new Set([
|
|
898
889
|
"allow-downloads",
|
|
899
890
|
"allow-forms",
|
|
900
891
|
"allow-modals",
|
|
@@ -907,7 +898,7 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
907
898
|
"allow-scripts",
|
|
908
899
|
"allow-storage-access-by-user-activation",
|
|
909
900
|
"allow-top-navigation-by-user-activation"
|
|
910
|
-
]),
|
|
901
|
+
]), ki = {
|
|
911
902
|
ADD_TAGS: ["iframe"],
|
|
912
903
|
ADD_ATTR: [
|
|
913
904
|
"allowfullscreen",
|
|
@@ -1007,14 +998,14 @@ function Pi() {
|
|
|
1007
998
|
a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
|
|
1008
999
|
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
1009
1000
|
if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
|
|
1010
|
-
const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) =>
|
|
1001
|
+
const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => Mi.has(a));
|
|
1011
1002
|
o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
|
|
1012
1003
|
}), se);
|
|
1013
1004
|
}
|
|
1014
1005
|
function It(e, n) {
|
|
1015
1006
|
if (typeof window > "u")
|
|
1016
1007
|
throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
|
|
1017
|
-
const o =
|
|
1008
|
+
const o = ki;
|
|
1018
1009
|
return Pi().sanitize(e ?? "", o);
|
|
1019
1010
|
}
|
|
1020
1011
|
const Fi = ae`
|
|
@@ -1848,7 +1839,7 @@ function po({
|
|
|
1848
1839
|
pageParams: C.pageParams,
|
|
1849
1840
|
direction: C.direction,
|
|
1850
1841
|
executeQuery: f
|
|
1851
|
-
}), le = ao({ executeQuery: f }),
|
|
1842
|
+
}), le = ao({ executeQuery: f }), k = co({ executeQuery: f });
|
|
1852
1843
|
Tt(() => {
|
|
1853
1844
|
if (!(y != null && y.comments) || y.comments.length === 0) return;
|
|
1854
1845
|
const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
|
|
@@ -1858,9 +1849,9 @@ function po({
|
|
|
1858
1849
|
if (E.length > 0) {
|
|
1859
1850
|
for (const N of E)
|
|
1860
1851
|
w.current.add(N);
|
|
1861
|
-
|
|
1852
|
+
k.mutate({ submissionId: e, assignmentId: o, submissionCommentIds: E });
|
|
1862
1853
|
}
|
|
1863
|
-
}, [y == null ? void 0 : y.comments, e, o,
|
|
1854
|
+
}, [y == null ? void 0 : y.comments, e, o, k]);
|
|
1864
1855
|
const ne = y == null ? void 0 : y.comments.some(
|
|
1865
1856
|
(E) => {
|
|
1866
1857
|
var N;
|
|
@@ -1952,10 +1943,10 @@ function Wo({
|
|
|
1952
1943
|
error: w
|
|
1953
1944
|
} = Xi({ courseId: e, assignmentId: n, userId: o, executeQuery: f }), [y, V] = Ee(null), [fe, le] = Ee(
|
|
1954
1945
|
a ? "comments" : null
|
|
1955
|
-
),
|
|
1946
|
+
), k = qe(
|
|
1956
1947
|
() => (h == null ? void 0 : h.submissionsConnection.nodes[0]) ?? null,
|
|
1957
1948
|
[h]
|
|
1958
|
-
), ne =
|
|
1949
|
+
), ne = k != null && k.attempt > 0, O = y ?? k, ce = y == null || y.attempt === (k == null ? void 0 : k.attempt), E = ne && ce, N = ((h == null ? void 0 : h.allowedAttempts) ?? 0) !== 1, J = jn((Ze) => {
|
|
1959
1950
|
V(Ze);
|
|
1960
1951
|
}, []);
|
|
1961
1952
|
if (Tt(() => {
|
|
@@ -1966,10 +1957,10 @@ function Wo({
|
|
|
1966
1957
|
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: m.progressLoading() }) });
|
|
1967
1958
|
if (I || !h)
|
|
1968
1959
|
return /* @__PURE__ */ r(b, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: m.assignmentLoadError() }) });
|
|
1969
|
-
const Ie = !!h.dueAt && new Date(h.dueAt) < /* @__PURE__ */ new Date() && !ne, xe =
|
|
1960
|
+
const Ie = !!h.dueAt && new Date(h.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = k ? /* @__PURE__ */ r(
|
|
1970
1961
|
po,
|
|
1971
1962
|
{
|
|
1972
|
-
submissionId:
|
|
1963
|
+
submissionId: k.id,
|
|
1973
1964
|
courseId: e,
|
|
1974
1965
|
assignmentId: n,
|
|
1975
1966
|
attempt: (O == null ? void 0 : O.attempt) ?? 0,
|
|
@@ -1977,10 +1968,10 @@ function Wo({
|
|
|
1977
1968
|
renderHTML: p,
|
|
1978
1969
|
executeQuery: f
|
|
1979
1970
|
}
|
|
1980
|
-
) : null, Xe = N &&
|
|
1971
|
+
) : null, Xe = N && k ? /* @__PURE__ */ r(
|
|
1981
1972
|
Ji,
|
|
1982
1973
|
{
|
|
1983
|
-
submissionId:
|
|
1974
|
+
submissionId: k.id,
|
|
1984
1975
|
selectedAttempt: O == null ? void 0 : O.attempt,
|
|
1985
1976
|
onAttemptSelect: J,
|
|
1986
1977
|
pointsPossible: h.pointsPossible,
|
|
@@ -1991,7 +1982,7 @@ function Wo({
|
|
|
1991
1982
|
attemptsPanel: Xe,
|
|
1992
1983
|
activePanel: fe,
|
|
1993
1984
|
setActivePanel: le,
|
|
1994
|
-
unreadCommentCount: (
|
|
1985
|
+
unreadCommentCount: (k == null ? void 0 : k.unreadCommentCount) ?? 0,
|
|
1995
1986
|
hasMultipleAttempts: N
|
|
1996
1987
|
};
|
|
1997
1988
|
return /* @__PURE__ */ S(b, { direction: "column", gap: "medium", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/platform-assignment-review",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"graphql": "^16.0.0",
|
|
40
40
|
"graphql-tag": "^2.12.0",
|
|
41
41
|
"zod": "^3.23.8",
|
|
42
|
-
"@instructure/platform-sanitize": "0.
|
|
42
|
+
"@instructure/platform-sanitize": "0.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/jest-dom": "^6.9.1",
|