@instructure/platform-rubrics 3.1.0 → 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/index.js CHANGED
@@ -1,17 +1,16 @@
1
- import { D as s, a as t, c as l, e as u, d as g, g as c, r as i, b as n } from "./chunks/errorPage-B145UIKY.js";
1
+ import { D as s, a as t, e as l, f as u, d as c, g, b as i, r as n, c as T, t as _, u as A } from "./chunks/errorPage-C2-lUC8H.js";
2
2
  import "@instructure/platform-provider";
3
3
  import "react";
4
- import { g as _, t as A, u as p } from "./chunks/useLocalStorage-BoUaI48x.js";
5
4
  export {
6
5
  s as DEFAULT_AI_MAX_CRITERION_COUNT,
7
6
  t as DEFAULT_AI_MAX_RATING_COUNT,
8
7
  l as createRubricErrorReporter,
9
8
  u as defaultErrorPageTranslations,
10
- g as defaultRubricsTranslations,
11
- c as getHelloWorldMessage,
12
- _ as getLocalStorageValue,
13
- i as rubricErrorComponent,
14
- n as rubricNotFoundPage,
15
- A as tryParseJson,
16
- p as useLocalStorage
9
+ c as defaultRubricsTranslations,
10
+ g as getHelloWorldMessage,
11
+ i as getLocalStorageValue,
12
+ n as rubricErrorComponent,
13
+ T as rubricNotFoundPage,
14
+ _ as tryParseJson,
15
+ A as useLocalStorage
17
16
  };
package/locales/en.json CHANGED
@@ -428,6 +428,10 @@
428
428
  "rubricBuilderPointRangeLabel": "Point range",
429
429
  "rubricBuilderPointsLabel": "Points",
430
430
  "rubricBuilderPointsPossibleLabel": "Points possible",
431
+ "rubricBuilderPreviewClose": "Close preview",
432
+ "rubricBuilderPreviewHeading": "Preview",
433
+ "rubricBuilderPreviewSave": "Save rubric",
434
+ "rubricBuilderPreviewToggle": "Preview",
431
435
  "rubricBuilderRatingDescriptionLabel": "Rating description",
432
436
  "rubricBuilderRatingNameLabel": "Rating name",
433
437
  "rubricBuilderRatingNameRequired": "Rating name is required.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/platform-rubrics",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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
- };