@instructure/platform-rubrics 0.4.0 → 0.6.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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/dist/_internal/RubricAssessment/rubricUtils.d.ts +25 -0
  3. package/dist/_internal/RubricAssessment/rubricUtils.d.ts.map +1 -1
  4. package/dist/_internal/RubricForm/ratingPoints.d.ts +4 -0
  5. package/dist/_internal/RubricForm/ratingPoints.d.ts.map +1 -0
  6. package/dist/_internal/RubricForm/useCriteriaReorder.d.ts +19 -0
  7. package/dist/_internal/RubricForm/useCriteriaReorder.d.ts.map +1 -0
  8. package/dist/_internal/RubricForm/useCriterionForm.d.ts +40 -0
  9. package/dist/_internal/RubricForm/useCriterionForm.d.ts.map +1 -0
  10. package/dist/_internal/RubricForm/useRubricForm.d.ts +60 -0
  11. package/dist/_internal/RubricForm/useRubricForm.d.ts.map +1 -0
  12. package/dist/_internal/RubricForm/useSaveRubricForm.d.ts.map +1 -1
  13. package/dist/_internal/RubricForm/utils.d.ts +26 -0
  14. package/dist/_internal/RubricForm/utils.d.ts.map +1 -1
  15. package/dist/_internal/ViewRubrics/queryKeys.d.ts +7 -0
  16. package/dist/_internal/ViewRubrics/queryKeys.d.ts.map +1 -0
  17. package/dist/_internal/ViewRubrics/useRubricsQuery.d.ts.map +1 -1
  18. package/dist/_internal/constants/i18n.d.ts +4 -0
  19. package/dist/_internal/constants/i18n.d.ts.map +1 -1
  20. package/dist/_internal/contexts/RubricsConfigContext.d.ts +5 -0
  21. package/dist/_internal/contexts/RubricsConfigContext.d.ts.map +1 -1
  22. package/dist/canvas/RubricAssessment/AssessmentHeader.d.ts +1 -2
  23. package/dist/canvas/RubricAssessment/AssessmentHeader.d.ts.map +1 -1
  24. package/dist/canvas/RubricAssessment/InstructorScore.d.ts.map +1 -1
  25. package/dist/canvas/RubricAssessment/ModernView.d.ts.map +1 -1
  26. package/dist/canvas/RubricAssessment/RubricAssessmentContainer.d.ts.map +1 -1
  27. package/dist/canvas/RubricAssessment/TraditionalView.d.ts.map +1 -1
  28. package/dist/canvas/RubricAssessment/TraditionalViewCriterionComment.d.ts +2 -0
  29. package/dist/canvas/RubricAssessment/TraditionalViewCriterionComment.d.ts.map +1 -1
  30. package/dist/canvas/RubricAssessment/TraditionalViewCriterionPoints.d.ts +2 -0
  31. package/dist/canvas/RubricAssessment/TraditionalViewCriterionPoints.d.ts.map +1 -1
  32. package/dist/canvas/RubricAssessment/TraditionalViewCriterionRating.d.ts +2 -0
  33. package/dist/canvas/RubricAssessment/TraditionalViewCriterionRating.d.ts.map +1 -1
  34. package/dist/canvas/RubricAssessment/TraditionalViewCriterionRatings.d.ts.map +1 -1
  35. package/dist/canvas/RubricAssessment/TraditionalViewCriterionRow.d.ts.map +1 -1
  36. package/dist/canvas/RubricAssessment/TraditionalViewTableFooter.d.ts +14 -0
  37. package/dist/canvas/RubricAssessment/TraditionalViewTableFooter.d.ts.map +1 -0
  38. package/dist/canvas/RubricAssessment/ViewModeSelect.d.ts +1 -2
  39. package/dist/canvas/RubricAssessment/ViewModeSelect.d.ts.map +1 -1
  40. package/dist/canvas/RubricForm/components/CriterionModal/CriterionModal.d.ts.map +1 -1
  41. package/dist/canvas/RubricForm/components/CriterionModal/RatingPointsInput.d.ts.map +1 -1
  42. package/dist/canvas/RubricForm/components/RubricCriteriaContainer.d.ts.map +1 -1
  43. package/dist/canvas/RubricForm/components/RubricFormSettings.d.ts.map +1 -1
  44. package/dist/canvas/RubricForm/index.d.ts.map +1 -1
  45. package/dist/canvas/ViewRubrics/DeleteRubricModal.d.ts.map +1 -1
  46. package/dist/canvas/ViewRubrics/DuplicateRubricModal.d.ts.map +1 -1
  47. package/dist/canvas.js +4344 -4064
  48. package/dist/chunks/{helloWorld-C70R4yfC.js → helloWorld-D6kk__YY.js} +20 -19
  49. package/dist/chunks/{useRubricsPlatformUiContext-BDRhg138.js → useRubricsPlatformUiContext-De8KgECI.js} +13 -9
  50. package/dist/foundation.js +3 -3
  51. package/dist/index.js +1 -1
  52. package/locales/en.json +4 -0
  53. package/package.json +2 -2
@@ -1,13 +1,14 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { createContext as t, useContext as a, useMemo as u } from "react";
3
- import { usePlatformUi as g } from "@instructure/platform-provider";
4
- const d = 8, C = 8, c = {
3
+ import { usePlatformUi as d } from "@instructure/platform-provider";
4
+ const g = 8, C = 8, c = {
5
5
  rubricCriterionRange: !1,
6
6
  gradingRubricsPagination: !1,
7
7
  rubricSelfAssessmentEnabled: !1,
8
+ outcomeExtraCreditEnabled: !1,
8
9
  aiRubricsEnabled: !1
9
10
  }, f = {
10
- aiRubricsMaxCriterionCount: d,
11
+ aiRubricsMaxCriterionCount: g,
11
12
  aiRubricsMaxRatingCount: C
12
13
  }, P = {
13
14
  courseId: void 0,
@@ -16,11 +17,11 @@ const d = 8, C = 8, c = {
16
17
  ...c,
17
18
  ...f
18
19
  }, l = t(P);
19
- function p({
20
+ function E({
20
21
  courseId: s,
21
22
  accountId: r,
22
- rootOutcomeGroupId: i,
23
- featureFlags: e,
23
+ rootOutcomeGroupId: e,
24
+ featureFlags: i,
24
25
  aiLimits: o,
25
26
  children: m
26
27
  }) {
@@ -28,43 +29,43 @@ function p({
28
29
  () => ({
29
30
  courseId: s,
30
31
  accountId: r,
31
- rootOutcomeGroupId: i,
32
+ rootOutcomeGroupId: e,
32
33
  ...c,
33
- ...e,
34
+ ...i,
34
35
  ...f,
35
36
  ...o
36
37
  }),
37
- [s, r, i, e, o]
38
+ [s, r, e, i, o]
38
39
  );
39
40
  return /* @__PURE__ */ n(l.Provider, { value: R, children: m });
40
41
  }
41
- function M() {
42
+ function p() {
42
43
  return a(l);
43
44
  }
44
45
  const _ = {
45
46
  manageRubrics: !1
46
47
  }, b = t(_);
47
- function T({
48
+ function M({
48
49
  children: s
49
50
  }) {
50
- const { permissions: r } = g(), i = u(
51
+ const { permissions: r } = d(), e = u(
51
52
  () => ({
52
53
  manageRubrics: r.manage_rubrics ?? !1
53
54
  }),
54
55
  [r.manage_rubrics]
55
56
  );
56
- return /* @__PURE__ */ n(b.Provider, { value: i, children: s });
57
+ return /* @__PURE__ */ n(b.Provider, { value: e, children: s });
57
58
  }
58
- function E() {
59
+ function T() {
59
60
  return a(b);
60
61
  }
61
62
  const I = (s) => `Hello from platform-rubrics (${s})`;
62
63
  export {
63
- d as D,
64
- p as R,
64
+ g as D,
65
+ E as R,
65
66
  C as a,
66
- T as b,
67
- E as c,
67
+ M as b,
68
+ T as c,
68
69
  I as g,
69
- M as u
70
+ p as u
70
71
  };
@@ -37,12 +37,12 @@ const d = {
37
37
  rubricFormCannotUpdate: "Rubrics cannot be modified once they have been used in more than one place. Any saved changes will create a new rubric.",
38
38
  rubricFormLimitedEdit: "This rubric has already been used for grading. Any changes made may impact existing student scores or grading data.",
39
39
  rubricFormSaveError: "There was an error saving the rubric."
40
- }, R = {
40
+ }, C = {
41
41
  footerCreateRubric: "Create Rubric",
42
42
  footerPreviewRubric: "Preview Rubric",
43
43
  footerSaveAsDraft: "Save as Draft",
44
44
  footerSaveRubric: "Save Rubric"
45
- }, C = {
45
+ }, R = {
46
46
  criteriaBuilderHeaderGenerator: "Rubric Generator",
47
47
  criteriaBuilderHeaderPointsPossible: "%{pointsPossible} Points Possible",
48
48
  criteriaBuilderHeaderTitle: "Criteria Builder"
@@ -154,18 +154,19 @@ const d = {
154
154
  reorderCriterionAriaLabel: "Reorder %{criterionName} Criterion"
155
155
  }, k = {
156
156
  criterionOptionsLabel: "Criterion Options"
157
- }, B = {
157
+ }, O = {
158
158
  createFromOutcomeButton: "Create From Outcome",
159
159
  draftNewCriterionButton: "Draft New Criterion",
160
160
  newCriteriaActionsHeader: "New Criteria Actions",
161
161
  numberColumnHeader: "Number",
162
162
  reorderColumnHeader: "Reorder"
163
- }, O = {
163
+ }, B = {
164
164
  assessmentRatingButtonLabel: "Rating Button %{buttonLabel} %{selectedText}",
165
165
  assessmentRatingSelected: "Selected",
166
166
  assessmentRatingSelectedAndSelfAssessment: "Selected and Self Assessment",
167
167
  assessmentRatingSelfAssessment: "Self Assessment"
168
168
  }, U = {
169
+ assessmentAddComment: "Add Comment",
169
170
  assessmentComment: "Comment",
170
171
  assessmentCommentAriaLabel: "Assessment Comment",
171
172
  assessmentCommentLibraryAssistiveText: "Select from saved comments",
@@ -202,10 +203,13 @@ const d = {
202
203
  }, Y = {
203
204
  assessmentCommentsHeader: "Comments",
204
205
  assessmentCriteriaHeader: "Criteria",
206
+ assessmentOutcomeExtraCreditError: "Cannot give outcomes extra credit.",
205
207
  assessmentPointsHeader: "Points",
206
208
  assessmentRatingsHeader: "Ratings",
207
209
  assessmentRubricCaption: "Rubric",
208
210
  assessmentThreshold: "Threshold: %{threshold}",
211
+ assessmentTotalPointsAriaLabel: "Total Points %{assigned} out of %{possible}",
212
+ assessmentTotalPointsLabel: "Total Points",
209
213
  assessmentViewLongerDescription: "view longer description"
210
214
  }, j = {
211
215
  assessmentClear: "Clear",
@@ -444,12 +448,12 @@ const d = {
444
448
  rubricContextSelectLabel: "select account or course"
445
449
  }, pe = {
446
450
  rubricSearchFooterAdd: "Add"
447
- }, Re = {
451
+ }, Ce = {
448
452
  rubricSearchRowCriterion: "criterion",
449
453
  rubricSearchRowPreviewLabel: "Preview Rubric",
450
454
  rubricSearchRowSelectLabel: "select %{title}",
451
455
  rubricSearchRowUnscored: "Unscored"
452
- }, Ce = {
456
+ }, Re = {
453
457
  rubricsForContextNextPage: "Next Page",
454
458
  rubricsForContextPrevPage: "Previous Page"
455
459
  }, fe = {
@@ -474,8 +478,8 @@ const d = {
474
478
  ...g,
475
479
  ...h,
476
480
  ...p,
477
- ...R,
478
481
  ...C,
482
+ ...R,
479
483
  ...f,
480
484
  ...v,
481
485
  ...S,
@@ -494,8 +498,8 @@ const d = {
494
498
  ...H,
495
499
  ...x,
496
500
  ...k,
497
- ...B,
498
501
  ...O,
502
+ ...B,
499
503
  ...U,
500
504
  ...G,
501
505
  ...V,
@@ -527,8 +531,8 @@ const d = {
527
531
  ...ge,
528
532
  ...he,
529
533
  ...pe,
530
- ...Re,
531
534
  ...Ce,
535
+ ...Re,
532
536
  ...fe,
533
537
  ...ve,
534
538
  ...ue
@@ -1,5 +1,5 @@
1
- import { g as R } from "./chunks/helloWorld-C70R4yfC.js";
2
- import { D as G, a as Y, R as J, b as Z, u as V, c as rr } from "./chunks/helloWorld-C70R4yfC.js";
1
+ import { g as R } from "./chunks/helloWorld-D6kk__YY.js";
2
+ import { D as G, a as Y, R as J, b as Z, u as V, c as rr } from "./chunks/helloWorld-D6kk__YY.js";
3
3
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
4
4
  import { Heading as v } from "@instructure/ui-heading";
5
5
  import { View as o } from "@instructure/ui-view";
@@ -9,7 +9,7 @@ import { SimpleSelect as b } from "@instructure/ui-simple-select";
9
9
  import { Spinner as C } from "@instructure/ui-spinner";
10
10
  import { Text as u } from "@instructure/ui-text";
11
11
  import { useQuery as T } from "@tanstack/react-query";
12
- import { u as I, T as y, t as _, i as P, a as E } from "./chunks/useRubricsPlatformUiContext-BDRhg138.js";
12
+ import { u as I, T as y, t as _, i as P, a as E } from "./chunks/useRubricsPlatformUiContext-De8KgECI.js";
13
13
  import L from "graphql-tag";
14
14
  const j = () => /* @__PURE__ */ e(o, { as: "div", padding: "small", children: /* @__PURE__ */ e(v, { level: "h2", children: R("foundation") }) }), U = L`
15
15
  query CourseRubricsList($courseId: ID!, $first: Int) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as a, a as e, R as o, b as i, g as u, u as t, c } from "./chunks/helloWorld-C70R4yfC.js";
1
+ import { D as a, a as e, R as o, b as i, g as u, u as t, c } from "./chunks/helloWorld-D6kk__YY.js";
2
2
  import { c as n, d as R, g as b, r as l, a as _, t as A, u as P } from "./chunks/errorPage-CMPx9rIp.js";
3
3
  export {
4
4
  a as DEFAULT_AI_MAX_CRITERION_COUNT,
package/locales/en.json CHANGED
@@ -134,6 +134,7 @@
134
134
  "assessmentRatingSelected": "Selected",
135
135
  "assessmentRatingSelectedAndSelfAssessment": "Selected and Self Assessment",
136
136
  "assessmentRatingSelfAssessment": "Self Assessment",
137
+ "assessmentAddComment": "Add Comment",
137
138
  "assessmentComment": "Comment",
138
139
  "assessmentCommentAriaLabel": "Assessment Comment",
139
140
  "assessmentCommentLibraryAssistiveText": "Select from saved comments",
@@ -164,10 +165,13 @@
164
165
  "outcomeContextTagInstitutionLevel": "This is an institution-level outcome",
165
166
  "assessmentCommentsHeader": "Comments",
166
167
  "assessmentCriteriaHeader": "Criteria",
168
+ "assessmentOutcomeExtraCreditError": "Cannot give outcomes extra credit.",
167
169
  "assessmentPointsHeader": "Points",
168
170
  "assessmentRatingsHeader": "Ratings",
169
171
  "assessmentRubricCaption": "Rubric",
170
172
  "assessmentThreshold": "Threshold: %{threshold}",
173
+ "assessmentTotalPointsAriaLabel": "Total Points %{assigned} out of %{possible}",
174
+ "assessmentTotalPointsLabel": "Total Points",
171
175
  "assessmentViewLongerDescription": "view longer description",
172
176
  "assessmentClear": "Clear",
173
177
  "assessmentCommentLibrary": "Comment Library",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/platform-rubrics",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -151,7 +151,7 @@
151
151
  "@instructure/platform-alerts": "1.0.1",
152
152
  "@instructure/platform-canvas-fetch": "0.1.3",
153
153
  "@instructure/platform-get-cookie": "0.2.1",
154
- "@instructure/platform-graphql-types": "0.2.1",
154
+ "@instructure/platform-graphql-types": "0.2.2",
155
155
  "@instructure/platform-instui-bindings": "0.7.0",
156
156
  "@instructure/platform-loading-indicator": "0.3.0",
157
157
  "@instructure/platform-provider": "0.5.2",