@instructure/platform-rubrics 3.0.1 → 3.2.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/_internal/RubricAssignment/hooks/useAssignmentRubric.d.ts +1 -0
- package/dist/_internal/RubricAssignment/hooks/useAssignmentRubric.d.ts.map +1 -1
- package/dist/_internal/RubricAssignment/hooks/useAssignmentRubricState.d.ts +1 -0
- package/dist/_internal/RubricAssignment/hooks/useAssignmentRubricState.d.ts.map +1 -1
- package/dist/_internal/RubricForm/components/RubricGeneratorNutritionFacts.d.ts.map +1 -0
- package/dist/_internal/ViewRubrics/useRubricsQuery.d.ts.map +1 -1
- package/dist/_internal/ViewRubrics/useViewRubrics.d.ts.map +1 -1
- package/dist/_internal/constants/i18n.d.ts +18 -0
- package/dist/_internal/constants/i18n.d.ts.map +1 -1
- package/dist/_internal/utils/i18n.d.ts +18 -0
- package/dist/_internal/utils/i18n.d.ts.map +1 -1
- package/dist/canvas.js +3679 -9389
- package/dist/chunks/{errorPage-CYyehhNJ.js → errorPage-C2-lUC8H.js} +209 -151
- package/dist/chunks/useAssignmentRubricState-DpcMVo45.js +10497 -0
- package/dist/foundation/RubricAssignmentBuilder/RubricAssignmentBuilder.d.ts +28 -0
- package/dist/foundation/RubricAssignmentBuilder/RubricAssignmentBuilder.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/RubricBuilder.d.ts.map +1 -1
- package/dist/foundation/RubricBuilder/components/CriteriaSection.d.ts +3 -1
- package/dist/foundation/RubricBuilder/components/CriteriaSection.d.ts.map +1 -1
- package/dist/foundation/RubricBuilder/components/RubricBuilderFooter.d.ts +4 -1
- package/dist/foundation/RubricBuilder/components/RubricBuilderFooter.d.ts.map +1 -1
- package/dist/foundation/RubricBuilder/components/generator/GenerateCriteriaForm.d.ts +14 -0
- package/dist/foundation/RubricBuilder/components/generator/GenerateCriteriaForm.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/generator/GeneratedCriteriaFeedback.d.ts +8 -0
- package/dist/foundation/RubricBuilder/components/generator/GeneratedCriteriaFeedback.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/generator/GeneratedCriteriaSummary.d.ts +11 -0
- package/dist/foundation/RubricBuilder/components/generator/GeneratedCriteriaSummary.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/generator/RegenerateCriteriaModal.d.ts +7 -0
- package/dist/foundation/RubricBuilder/components/generator/RegenerateCriteriaModal.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/generator/RubricGeneratorPanel.d.ts +9 -0
- package/dist/foundation/RubricBuilder/components/generator/RubricGeneratorPanel.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/generator/RubricGeneratorStatus.d.ts +9 -0
- package/dist/foundation/RubricBuilder/components/generator/RubricGeneratorStatus.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/preview/RubricPreviewPanel.d.ts +10 -0
- package/dist/foundation/RubricBuilder/components/preview/RubricPreviewPanel.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/useCriteriaGenerator.d.ts +44 -0
- package/dist/foundation/RubricBuilder/useCriteriaGenerator.d.ts.map +1 -0
- package/dist/foundation/index.d.ts +2 -0
- package/dist/foundation/index.d.ts.map +1 -1
- package/dist/foundation.js +1304 -571
- package/dist/index.js +8 -9
- package/locales/en.json +18 -0
- package/package.json +2 -2
- package/dist/canvas/RubricForm/components/AIGeneratedCriteria/RubricGeneratorNutritionFacts.d.ts.map +0 -1
- package/dist/chunks/ErrorShip-COgM3wMV.js +0 -4726
- package/dist/chunks/useLocalStorage-BoUaI48x.js +0 -41
- /package/dist/{canvas/RubricForm/components/AIGeneratedCriteria → _internal/RubricForm/components}/RubricGeneratorNutritionFacts.d.ts +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useQueryClient as i, useQuery as I, useMutation as d } from "@tanstack/react-query";
|
|
2
|
-
function f(e) {
|
|
3
|
-
try {
|
|
4
|
-
return { parseError: !1, parsedValue: JSON.parse(e) };
|
|
5
|
-
} catch {
|
|
6
|
-
return { parseError: !0, parsedValue: null };
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
function m(e, t) {
|
|
10
|
-
return !t.safeParse(e).success;
|
|
11
|
-
}
|
|
12
|
-
function s(e, t, r = void 0) {
|
|
13
|
-
const a = window.localStorage.getItem(e);
|
|
14
|
-
if (a === null)
|
|
15
|
-
return t;
|
|
16
|
-
const { parseError: n, parsedValue: u } = f(a);
|
|
17
|
-
return n || r && m(u, r) ? t : u;
|
|
18
|
-
}
|
|
19
|
-
async function S(e, t) {
|
|
20
|
-
window.localStorage.setItem(e, JSON.stringify(t));
|
|
21
|
-
}
|
|
22
|
-
function p(e, t, r) {
|
|
23
|
-
const a = i(), { data: n, status: u } = I({
|
|
24
|
-
queryKey: [e],
|
|
25
|
-
queryFn: () => s(e, t, r),
|
|
26
|
-
initialData: () => s(e, t, r),
|
|
27
|
-
staleTime: Number.POSITIVE_INFINITY,
|
|
28
|
-
gcTime: Number.POSITIVE_INFINITY
|
|
29
|
-
}), c = n, { mutate: l } = d({
|
|
30
|
-
mutationFn: (o) => S(e, o),
|
|
31
|
-
onMutate: (o) => {
|
|
32
|
-
a.setQueryData([e], o);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return [c, l, u];
|
|
36
|
-
}
|
|
37
|
-
export {
|
|
38
|
-
s as g,
|
|
39
|
-
f as t,
|
|
40
|
-
p as u
|
|
41
|
-
};
|