@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.
@@ -1,17 +1,18 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import s, { createContext as C, useContext as b, useMemo as R } from "react";
3
- import { createErrorReporter as g, GenericErrorPage as f, NotFoundPage as v } from "@instructure/platform-generic-error-page";
4
- const L = {
2
+ import s, { createContext as R, useContext as p, useMemo as v } from "react";
3
+ import { useQueryClient as S, useQuery as L, useMutation as w } from "@tanstack/react-query";
4
+ import { createErrorReporter as C, GenericErrorPage as y, NotFoundPage as T } from "@instructure/platform-generic-error-page";
5
+ const P = {
5
6
  cancel: "Cancel",
6
7
  close: "Close",
7
8
  delete: "Delete",
8
9
  duplicate: "Duplicate",
9
10
  edit: "Edit"
10
- }, S = {
11
+ }, A = {
11
12
  warningModalExitButton: "Exit",
12
13
  warningModalHeader: "Warning",
13
14
  warningModalMessage: "You are about to exit the rubric editor. Any unsaved changes will be lost."
14
- }, w = {
15
+ }, M = {
15
16
  rubricSelectorAssistiveText: "Type or use arrow keys to navigate options.",
16
17
  rubricSelectorEmpty: "This course has no rubrics yet.",
17
18
  rubricSelectorErrorBody: "Please try again.",
@@ -22,31 +23,31 @@ const L = {
22
23
  rubricSelectorRetry: "Retry",
23
24
  rubricSelectorTruncated: "Showing the first 50 rubrics. This is a temporary selector and will be replaced with the rubrics listing page.",
24
25
  rubricSelectorUntitled: "Untitled rubric"
25
- }, y = {
26
+ }, D = {
26
27
  pointsPossibleAbbreviated: "%{possible} pts",
27
28
  pointsPossibleRange: "%{possible} to >%{min} pts"
28
- }, A = {
29
+ }, F = {
29
30
  ratingScaleBelow: "Below",
30
31
  ratingScaleExceeds: "Exceeds",
31
32
  ratingScaleMastery: "Mastery",
32
33
  ratingScaleNear: "Near",
33
34
  ratingScaleNoEvidence: "No Evidence"
34
- }, M = {
35
+ }, B = {
35
36
  rubricSaveSuccess: "Rubric saved successfully"
36
- }, T = {
37
+ }, E = {
37
38
  rubricFormCannotUpdate: "Rubrics cannot be modified once they have been used in more than one place. Any saved changes will create a new rubric.",
38
39
  rubricFormLimitedEdit: "This rubric has already been used for grading. Any changes made may impact existing student scores or grading data.",
39
40
  rubricFormSaveError: "There was an error saving the rubric."
40
- }, P = {
41
+ }, I = {
41
42
  footerCreateRubric: "Create Rubric",
42
43
  footerPreviewRubric: "Preview Rubric",
43
44
  footerSaveAsDraft: "Save as Draft",
44
45
  footerSaveRubric: "Save Rubric"
45
- }, D = {
46
+ }, N = {
46
47
  criteriaBuilderHeaderGenerator: "Rubric Generator",
47
48
  criteriaBuilderHeaderPointsPossible: "%{pointsPossible} Points Possible",
48
49
  criteriaBuilderHeaderTitle: "Criteria Builder"
49
- }, F = {
50
+ }, H = {
50
51
  gradingTypeFreeForm: "Written Feedback",
51
52
  gradingTypeScale: "Scale",
52
53
  gradingTypeSelectLabel: "Type",
@@ -59,31 +60,31 @@ const L = {
59
60
  scoringTypeScored: "Scored",
60
61
  scoringTypeSelectLabel: "Scoring",
61
62
  scoringTypeUnscored: "Unscored"
62
- }, B = {
63
+ }, x = {
63
64
  hideOutcomeResultsLabel: "Don't post to Learning Mastery Gradebook",
64
65
  hideScoreTotalLabel: "Hide rubric score total from students",
65
66
  useForGradingLabel: "Use this rubric for assignment grading"
66
- }, E = {
67
+ }, O = {
67
68
  confirmToContinueHeader: "Confirm to continue",
68
69
  gradingHistoryWarning: "This rubric has already been used for grading. Saving changes may alter student scores or grading history. Are you sure you want to proceed?"
69
- }, N = {
70
+ }, k = {
70
71
  saveConfirmModalLabel: "Rubric Save Confirmation Dialog",
71
72
  saveConfirmModalSave: "Save"
72
- }, I = {
73
+ }, G = {
73
74
  editConfirmModalConfirm: "Confirm",
74
75
  editConfirmModalLabel: "Edit Confirm Modal"
75
- }, H = {
76
+ }, U = {
76
77
  pointsDifferenceModalBody: "Leaving the assignment's total points at %{assignmentPoints} and the rubric's total points at %{rubricPoints} will result in a maximum possible score of %{pointRatio} for student submissions graded with the rubric.",
77
78
  pointsDifferenceModalBodyZeroAssignmentPoints: "The assignment is worth 0 points, but the rubric's total points are %{rubricPoints}. Students graded with the rubric can't earn a percentage of the assignment's points.",
78
79
  pointsDifferenceModalChange: "Change",
79
80
  pointsDifferenceModalLabel: "Rubric Points Difference Dialog",
80
81
  pointsDifferenceModalLeaveDifferent: "Leave Different"
81
- }, k = {
82
+ }, W = {
82
83
  deleteCriterionLabel: "Delete Criterion",
83
84
  duplicateCriterionLabel: "Duplicate Criterion",
84
85
  editCriterionLabel: "Edit Criterion",
85
86
  viewOutcomeCriterionLabel: "View Outcome Criterion"
86
- }, x = {
87
+ }, V = {
87
88
  outcomeCriterionModalCriterionName: "Criterion Name",
88
89
  outcomeCriterionModalDescription: "Description",
89
90
  outcomeCriterionModalDisplay: "Display",
@@ -94,7 +95,7 @@ const L = {
94
95
  outcomeCriterionModalRatingName: "Rating Name",
95
96
  outcomeCriterionModalThreshold: "Threshold: %{threshold}",
96
97
  outcomeCriterionModalViewOutcome: "View Outcome"
97
- }, O = {
98
+ }, q = {
98
99
  errorPageCommentFailed: "Comment failed to post! Please try again later.",
99
100
  errorPageCommentSubmitted: "Comment submitted!",
100
101
  errorPageEmailPlaceholder: "email@example.com",
@@ -108,7 +109,7 @@ const L = {
108
109
  errorPageWhatHappened: "What happened?",
109
110
  errorPageYourEmailAddress: "Your Email Address",
110
111
  rubricErrorPageCategory: "Edit Rubric Error Page"
111
- }, G = {
112
+ }, _ = {
112
113
  criterionModalCreateTitle: "Create New Criterion",
113
114
  criterionModalEditTitle: "Edit Criterion",
114
115
  criterionModalEnableRange: "Enable Range",
@@ -118,12 +119,12 @@ const L = {
118
119
  criterionModalPointsPossible: "Points Possible",
119
120
  criterionModalRatingScaleHeading: "Rating Scale",
120
121
  criterionModalSaveCriterion: "Save Criterion"
121
- }, U = {
122
+ }, j = {
122
123
  criterionLongDescriptionLabel: "Criterion Description",
123
124
  criterionLongDescriptionPlaceholder: "Enter the description",
124
125
  criterionNameLabel: "Criterion Name",
125
126
  criterionNamePlaceholder: "Enter the name"
126
- }, W = {
127
+ }, Y = {
127
128
  pointRangeLabel: "Point Range",
128
129
  pointsLabel: "Points",
129
130
  rangeStartPrefix: ">%{rangeStart} to ",
@@ -133,66 +134,66 @@ const L = {
133
134
  ratingsHeaderDisplay: "Display",
134
135
  removeRatingAriaLabel: "Remove %{ratingName} Rating",
135
136
  reorderRatingAriaLabel: "Reorder %{ratingName} Rating"
136
- }, V = {
137
+ }, K = {
137
138
  addRatingButtonLabel: "Add Rating",
138
139
  addRatingRowLabel: "Add New Rating",
139
140
  addRatingScreenReaderLabel: "Add new rating"
140
- }, j = {
141
+ }, z = {
141
142
  deleteLabel: "Delete",
142
143
  moveDownLabel: "Move Down",
143
144
  moveUpLabel: "Move Up",
144
145
  ratingOptionsLabel: "Rating Options"
145
- }, q = {
146
+ }, J = {
146
147
  ratingScaleColRating: "Rating",
147
148
  ratingScaleColScale: "Scale",
148
149
  ratingScaleSummary: "Rating Scale: %{ratingsLength}"
149
- }, _ = {
150
+ }, Q = {
150
151
  criterionMovedAnnouncement: "Criterion moved to position %{position}"
151
- }, Y = {
152
+ }, X = {
152
153
  aiGeneratedIconTitle: "Ignite AI Generated",
153
154
  freeformCommentAreaHint: "This area will be used by the assessor to leave comments related to this criterion.",
154
155
  outcomeCannotEditTooltip: "An outcome can't be edited",
155
156
  reorderCriterionAriaLabel: "Reorder %{criterionName} Criterion"
156
- }, z = {
157
+ }, Z = {
157
158
  criterionOptionsLabel: "Criterion Options"
158
- }, K = {
159
+ }, $ = {
159
160
  createFromOutcomeButton: "Create From Outcome",
160
161
  draftNewCriterionButton: "Draft New Criterion",
161
162
  newCriteriaActionsHeader: "New Criteria Actions",
162
163
  numberColumnHeader: "Number",
163
164
  reorderColumnHeader: "Reorder"
164
- }, X = {
165
+ }, ee = {
165
166
  assessmentRatingButtonLabel: "Rating Button %{buttonLabel} %{selectedText}",
166
167
  assessmentRatingSelected: "Selected",
167
168
  assessmentRatingSelectedAndSelfAssessment: "Selected and Self Assessment",
168
169
  assessmentRatingSelfAssessment: "Self Assessment"
169
- }, Z = {
170
+ }, re = {
170
171
  assessmentAddComment: "Add Comment",
171
172
  assessmentComment: "Comment",
172
173
  assessmentCommentAriaLabel: "Assessment Comment",
173
174
  assessmentCommentLibraryAssistiveText: "Select from saved comments",
174
175
  assessmentCommentLibraryEllipsis: "…",
175
176
  assessmentLongDescriptionHeader: "Criterion Long Description"
176
- }, $ = {
177
+ }, te = {
177
178
  assessmentSelfAssessmentCommentedAt: ", %{dueDate} at %{time}",
178
179
  assessmentSelfAssessmentEvaluate: "Evaluate your work as you believe your instructor would.",
179
180
  assessmentSelfAssessmentPrompt: "How well did you do?",
180
181
  assessmentSelfAssessmentReviewNotice: "Keep in mind that your instructor can review your self-assessment.",
181
182
  assessmentSelfAssessmentScore: "Self-Assessment Score"
182
- }, J = {
183
+ }, ie = {
183
184
  assessmentInstructorScore: "Instructor Score",
184
185
  assessmentPeerReviewScore: "Peer Review Score",
185
186
  assessmentStatusComplete: "Complete",
186
187
  assessmentStatusIncomplete: "Incomplete"
187
- }, Q = {
188
+ }, ae = {
188
189
  assessmentViewMode: "View Mode",
189
190
  assessmentViewModeHorizontal: "Horizontal",
190
191
  assessmentViewModeTraditional: "Traditional",
191
192
  assessmentViewModeVertical: "Vertical"
192
- }, ee = {
193
+ }, oe = {
193
194
  assessmentAiUsageButton: "AI Assisted",
194
195
  assessmentAiUsageDescription: "To support more fair and consistent grading, AI was used to assist in the grading process. All final grades are determined by your instructor."
195
- }, re = {
196
+ }, ne = {
196
197
  assessmentOutcomeCalculationMethod: "Calculation Method",
197
198
  assessmentOutcomeExample: "Example",
198
199
  assessmentOutcomePopoverLabel: "Rubric Outcome Popover",
@@ -201,7 +202,7 @@ const L = {
201
202
  outcomeContextTagCourseLevel: "This is a course-level outcome",
202
203
  outcomeContextTagInstitution: "Institution",
203
204
  outcomeContextTagInstitutionLevel: "This is an institution-level outcome"
204
- }, te = {
205
+ }, se = {
205
206
  assessmentCommentsHeader: "Comments",
206
207
  assessmentCriteriaHeader: "Criteria",
207
208
  assessmentOutcomeExtraCreditError: "Cannot give outcomes extra credit.",
@@ -212,7 +213,7 @@ const L = {
212
213
  assessmentTotalPointsAriaLabel: "Total Points %{assigned} out of %{possible}",
213
214
  assessmentTotalPointsLabel: "Total Points",
214
215
  assessmentViewLongerDescription: "view longer description"
215
- }, ie = {
216
+ }, ce = {
216
217
  assessmentClear: "Clear",
217
218
  assessmentCommentLibrary: "Comment Library",
218
219
  assessmentCriterionComment: "Criterion Comment",
@@ -221,7 +222,7 @@ const L = {
221
222
  assessmentLeaveComment: "Leave a comment",
222
223
  assessmentSaveCommentForReuse: "Save this comment for reuse",
223
224
  assessmentSelectRating: "Select a rating"
224
- }, ae = {
225
+ }, le = {
225
226
  assessmentInstructorPointsLabel: "Instructor Points %{points} out of %{total}",
226
227
  assessmentPointsInputLabel: "Points",
227
228
  assessmentSelfAssessmentPointsLabel: "Self Assessment Points %{points} out of %{total}",
@@ -229,13 +230,13 @@ const L = {
229
230
  assessmentValidationSelectRating: "Please select a rating",
230
231
  assessmentValidationSelectRatingOrScore: "Please select a rating or enter a score",
231
232
  assessmentValidationSelectScore: "Please select a score"
232
- }, oe = {
233
+ }, ue = {
233
234
  assessmentPeerReviewHeader: "Peer Review",
234
235
  assessmentRubricHeader: "Rubric",
235
236
  assessmentSubmit: "Submit Assessment",
236
237
  assessmentTrayLabel: "Rubric Assessment Tray",
237
238
  assessmentViewSelfAssessmentToggle: "View Student Self-Assessment"
238
- }, ne = {
239
+ }, de = {
239
240
  calculationMethodAchieveMastery: {
240
241
  one: "Achieve mastery %{count} time",
241
242
  other: "Achieve mastery %{count} times"
@@ -273,7 +274,7 @@ const L = {
273
274
  calculationMethodWeightedAverageWithInts: "Weighted Average - %{recentInt}%/%{remainderInt}%",
274
275
  calculationMethodWeightingForLastItem: "% weighting for last item",
275
276
  calculationMethodWeightingOfMostRecentItem: "% weighting of most recent item"
276
- }, se = {
277
+ }, me = {
277
278
  createLabel: "Create",
278
279
  createNewRubricTitle: "Create New Rubric",
279
280
  editRubricTitle: "Edit Rubric",
@@ -282,10 +283,10 @@ const L = {
282
283
  rubricNameLabel: "Rubric Name",
283
284
  rubricNameRequired: "Rubric requires a name",
284
285
  rubricNameTooLong: "The Rubric Name must be between 1 and 255 characters."
285
- }, ce = {
286
+ }, be = {
286
287
  generateCriteriaFailed: "Failed to generate criteria",
287
288
  regenerateCriteriaFailed: "Failed to regenerate criteria"
288
- }, le = {
289
+ }, ge = {
289
290
  regenerateButtonLabel: "Regenerate",
290
291
  regenerateModalCriteriaLabel: "Regenerate Criteria",
291
292
  regenerateModalCriterionLabel: "Regenerate Criterion",
@@ -294,7 +295,7 @@ const L = {
294
295
  regenerateModalPromptLabel: "Additional Prompt Information",
295
296
  regenerateModalPromptPlaceholder: 'Enter additional prompt information here. For example, "Target a college-level seminar." or "Focus on argument substance." or "Be lenient." ',
296
297
  regenerateModalPromptTooLong: "Additional prompt information must be less than 1000 characters"
297
- }, ue = {
298
+ }, he = {
298
299
  feedbackModalCancelLabel: "Cancel feedback",
299
300
  feedbackModalCommentLabel: "Feedback Comment",
300
301
  feedbackModalCommentPlaceholder: 'Enter your feedback here. For example, "The criteria were well-structured." or "The ratings did not match my expectations."',
@@ -307,17 +308,17 @@ const L = {
307
308
  generatedCriteriaFeedbackLabel: "Feedback",
308
309
  negativeFeedbackLabel: "Negative Feedback",
309
310
  positiveFeedbackLabel: "Positive Feedback"
310
- }, de = {
311
+ }, pe = {
311
312
  criteriaAutoGeneratedLabel: "Criteria Auto-Generated",
312
313
  noCriteriaForRegenerationTooltip: "There are no criteria available for regeneration"
313
- }, me = {
314
+ }, Ce = {
314
315
  nutritionFactsCurrentFeatureLabel: "Current Feature:",
315
316
  nutritionFactsModalLabel: "This is a modal for AI facts",
316
317
  nutritionFactsPermissionLevelsModalLabel: "This is a Data Permission Levels modal",
317
318
  nutritionFactsPermissionLevelsTitle: "Data Permission Levels",
318
319
  nutritionFactsTitle: "Nutrition Facts",
319
320
  nutritionFactsTriggerLabel: "Nutrition facts"
320
- }, be = {
321
+ }, fe = {
321
322
  generateCriteriaAdditionalPromptLabel: "Additional Prompt Information",
322
323
  generateCriteriaAdditionalPromptPlaceholder: 'Optional. For example, "Target a college-level seminar." or "Focus on argument substance." or "Be lenient."',
323
324
  generateCriteriaAdditionalPromptTooLong: "Additional prompt information must be less than 1000 characters",
@@ -345,37 +346,37 @@ const L = {
345
346
  standardObjectiveLabel: "Standard / Outcome Information",
346
347
  standardObjectivePlaceholder: 'Optional. Place standard or outcome here. For example, "Students will analyze primary sources".',
347
348
  standardObjectiveTooLong: "Standard and Outcome information must be less than 1000 characters"
348
- }, ge = {
349
+ }, Re = {
349
350
  deleteRubricModalBody: "Are you sure you want to delete this rubric?",
350
351
  deleteRubricModalError: "There was an error deleting the rubric.",
351
352
  deleteRubricModalLabel: "Delete Rubric Modal",
352
353
  deleteRubricModalSuccess: "Rubric deleted successfully",
353
354
  deleteRubricModalTitle: "Delete %{title}"
354
- }, he = {
355
+ }, ve = {
355
356
  duplicateRubricModalBody: "Are you sure you want to duplicate this rubric?",
356
357
  duplicateRubricModalError: "There was an error duplicating the rubric.",
357
358
  duplicateRubricModalLabel: "Duplicate Rubric Modal",
358
359
  duplicateRubricModalSuccess: "Rubric duplicated successfully",
359
360
  duplicateRubricModalTitle: "Duplicate %{title}"
360
- }, pe = {
361
+ }, Se = {
361
362
  usedLocationsModalConcluded: "Concluded",
362
363
  usedLocationsModalFetchFailed: "Failed to load used locations",
363
364
  usedLocationsModalLoading: "Loading",
364
365
  usedLocationsModalSearchLabel: "Search",
365
366
  usedLocationsModalSearchPlaceholder: "Search...",
366
367
  usedLocationsModalTitle: "Locations Used"
367
- }, Ce = {
368
+ }, Le = {
368
369
  rubricPopoverArchiveLabel: "Archive",
369
370
  rubricPopoverCopyToLabel: "Copy To",
370
371
  rubricPopoverOptionsLabel: "Rubric options for %{rubricTitle}",
371
372
  rubricPopoverUnarchiveLabel: "Un-Archive"
372
- }, Re = {
373
+ }, we = {
373
374
  rubricsSearchInputLabel: "Search Rubrics",
374
375
  rubricsSearchInputPlaceholder: "Search..."
375
- }, fe = {
376
+ }, ye = {
376
377
  rubricsInfiniteFooterDisplayedCount: "%{loaded} of %{total} displayed",
377
378
  rubricsInfiniteFooterLoadMore: "Load More"
378
- }, ve = {
379
+ }, Te = {
379
380
  rubricTableActionsHeader: "Actions",
380
381
  rubricTableCaption: "Rubrics",
381
382
  rubricTableCriterionHeader: "Criteria",
@@ -386,7 +387,7 @@ const L = {
386
387
  rubricTablePointsHeader: "Total Points",
387
388
  rubricTableSelectRubricLabel: "Select %{title}",
388
389
  rubricTableSortByLabel: "Sort by"
389
- }, Le = {
390
+ }, Pe = {
390
391
  viewRubricsArchivedTabLabel: "Archived",
391
392
  viewRubricsArchiveError: "Error Archiving Rubric",
392
393
  viewRubricsArchiveSuccess: "Rubric archived successfully",
@@ -402,7 +403,7 @@ const L = {
402
403
  viewRubricsSavedTabLabel: "Saved",
403
404
  viewRubricsUnarchiveError: "Error Un-Archiving Rubric",
404
405
  viewRubricsUnarchiveSuccess: "Rubric un-archived successfully"
405
- }, Se = {
406
+ }, Ae = {
406
407
  importFailuresModalFileListHeader: "The import failed for the following file(s):",
407
408
  importFailuresModalHeading: "Import Failed",
408
409
  importFailuresModalLabel: "Import Failures",
@@ -426,41 +427,41 @@ const L = {
426
427
  importTableFileNameHeader: "File Name",
427
428
  importTableProgressLabel: "Loading completion",
428
429
  importTableSizeHeader: "Size"
429
- }, we = {
430
+ }, Me = {
430
431
  rubricAssignmentDeleteBody: "Are you sure you want to delete this rubric?",
431
432
  rubricAssignmentDeleteTitle: "Delete Rubric?",
432
433
  rubricAssignmentUnlink: "Unlink",
433
434
  rubricAssignmentUnlinkBody: "The rubric is associated with an account, course, or another assignment. You can remove this rubric from the assignment without impacting other assignments by unlinking it.",
434
435
  rubricAssignmentUnlinkTitle: "Unlink Rubric"
435
- }, ye = {
436
+ }, De = {
436
437
  rubricAssignmentSelfAssessmentInfoButtonLabel: "Why is self assessment disabled?",
437
438
  rubricAssignmentSelfAssessmentInfoText: "This toggle will be disabled if the due date has passed OR there have already been self-assessments made on this assignment OR if the assignment is a group assignment.",
438
439
  rubricAssignmentSelfAssessmentLabel: "Enable self assessment",
439
440
  rubricAssignmentSelfAssessmentUpdateError: "Failed to update self assessment settings"
440
- }, Ae = {
441
+ }, Fe = {
441
442
  rubricSearchTrayHeading: "Find Rubric",
442
443
  rubricSearchTrayInputLabel: "search rubrics input",
443
444
  rubricSearchTrayInputPlaceholder: "Search rubrics",
444
445
  rubricSearchTrayLabel: "Rubric Search Tray"
445
- }, Me = {
446
+ }, Be = {
446
447
  rubricContextSelectAccountPrefix: "Account",
447
448
  rubricContextSelectCoursePrefix: "Course",
448
449
  rubricContextSelectEmptyHeading: "No Rubrics Found",
449
450
  rubricContextSelectLabel: "select account or course"
450
- }, Te = {
451
+ }, Ee = {
451
452
  rubricSearchFooterAdd: "Add"
452
- }, Pe = {
453
+ }, Ie = {
453
454
  rubricSearchRowCriterion: "criterion",
454
455
  rubricSearchRowPreviewLabel: "Preview Rubric",
455
456
  rubricSearchRowSelectLabel: "select %{title}",
456
457
  rubricSearchRowUnscored: "Unscored"
457
- }, De = {
458
+ }, Ne = {
458
459
  rubricsForContextNextPage: "Next Page",
459
460
  rubricsForContextPrevPage: "Previous Page"
460
- }, Fe = {
461
+ }, He = {
461
462
  rubricCreateModalCreateHeader: "Create Rubric",
462
463
  rubricCreateModalEditHeader: "Edit Rubric"
463
- }, Be = {
464
+ }, xe = {
464
465
  rubricAssignmentContainerAddError: "Failed to add rubric to assignment",
465
466
  rubricAssignmentContainerAddSuccess: "Rubric added to assignment",
466
467
  rubricAssignmentContainerCreateRubric: "Create Rubric",
@@ -471,7 +472,7 @@ const L = {
471
472
  rubricAssignmentContainerPreviewRubric: "Preview Rubric",
472
473
  rubricAssignmentContainerReplaceRubric: "Replace Rubric",
473
474
  rubricAssignmentContainerUnlinkRubric: "Unlink Rubric"
474
- }, Ee = {
475
+ }, Oe = {
475
476
  rubricBuilderAddCriterion: "Add criterion",
476
477
  rubricBuilderAddCriterionError: "Add at least one criterion.",
477
478
  rubricBuilderAddRatingLevel: "Add rating level",
@@ -524,6 +525,10 @@ const L = {
524
525
  rubricBuilderPointRangeLabel: "Point range",
525
526
  rubricBuilderPointsLabel: "Points",
526
527
  rubricBuilderPointsPossibleLabel: "Points possible",
528
+ rubricBuilderPreviewClose: "Close preview",
529
+ rubricBuilderPreviewHeading: "Preview",
530
+ rubricBuilderPreviewSave: "Save rubric",
531
+ rubricBuilderPreviewToggle: "Preview",
527
532
  rubricBuilderRatingDescriptionLabel: "Rating description",
528
533
  rubricBuilderRatingNameLabel: "Rating name",
529
534
  rubricBuilderRatingNameRequired: "Rating name is required.",
@@ -536,39 +541,34 @@ const L = {
536
541
  rubricBuilderSave: "Save",
537
542
  rubricBuilderWrittenFeedback: "Written feedback"
538
543
  }, c = {
539
- ...L,
540
- ...S,
541
- ...w,
542
- ...y,
544
+ ...P,
543
545
  ...A,
544
546
  ...M,
545
- ...T,
546
- ...P,
547
547
  ...D,
548
548
  ...F,
549
549
  ...B,
550
550
  ...E,
551
- ...N,
552
551
  ...I,
552
+ ...N,
553
553
  ...H,
554
- ...k,
555
554
  ...x,
556
555
  ...O,
556
+ ...k,
557
557
  ...G,
558
558
  ...U,
559
559
  ...W,
560
560
  ...V,
561
- ...j,
562
561
  ...q,
563
562
  ..._,
563
+ ...j,
564
564
  ...Y,
565
- ...z,
566
565
  ...K,
566
+ ...z,
567
+ ...J,
568
+ ...Q,
567
569
  ...X,
568
570
  ...Z,
569
571
  ...$,
570
- ...J,
571
- ...Q,
572
572
  ...ee,
573
573
  ...re,
574
574
  ...te,
@@ -581,125 +581,166 @@ const L = {
581
581
  ...le,
582
582
  ...ue,
583
583
  ...de,
584
- ...be,
585
584
  ...me,
585
+ ...be,
586
586
  ...ge,
587
587
  ...he,
588
588
  ...pe,
589
+ ...fe,
589
590
  ...Ce,
590
591
  ...Re,
591
- ...fe,
592
592
  ...ve,
593
+ ...Se,
593
594
  ...Le,
594
595
  ...we,
595
596
  ...ye,
596
- ...Ae,
597
- ...Me,
598
597
  ...Te,
599
598
  ...Pe,
599
+ ...Me,
600
600
  ...De,
601
601
  ...Fe,
602
602
  ...Be,
603
- ...Se,
604
- ...Ee
605
- }, m = s.createContext(
603
+ ...Ee,
604
+ ...Ie,
605
+ ...Ne,
606
+ ...He,
607
+ ...xe,
608
+ ...Ae,
609
+ ...Oe
610
+ }, g = s.createContext(
606
611
  void 0
607
612
  );
608
- function Ye() {
609
- const e = s.useContext(m);
613
+ function rr() {
614
+ const e = s.useContext(g);
610
615
  if (!e)
611
616
  throw new Error("useTranslations must be used within TranslationsProvider");
612
617
  const r = s.useCallback(
613
- (t) => Ne(t, e.translate),
618
+ (t) => ke(t, e.translate),
614
619
  [e.translate]
615
620
  );
616
621
  return { ...e, resolveToken: r };
617
622
  }
618
- const Ne = (e, r) => {
623
+ const ke = (e, r) => {
619
624
  if (typeof e == "string") return r(e);
620
625
  const { key: t, count: i, vars: a } = e;
621
626
  return i !== void 0 ? r(t, { count: i, ...a }) : r(t, a);
622
- }, Ie = (e) => (r, t) => {
627
+ }, Ge = (e) => (r, t) => {
623
628
  const i = e[r];
624
629
  let a;
625
630
  if (typeof i == "object" && "one" in i && "other" in i) {
626
- const n = Number((t == null ? void 0 : t.count) ?? 0);
627
- a = new Intl.PluralRules("en").select(n) === "one" ? i.one : i.other;
631
+ const o = Number((t == null ? void 0 : t.count) ?? 0);
632
+ a = new Intl.PluralRules("en").select(o) === "one" ? i.one : i.other;
628
633
  } else
629
634
  a = i || r;
630
- return t ? a.replace(/%\{([^}]+)}/g, (n, o) => o in t ? String(t[o]) : n) : a;
631
- }, He = Ie(c), ze = Object.fromEntries(
635
+ return t ? a.replace(/%\{([^}]+)}/g, (o, n) => n in t ? String(t[n]) : o) : a;
636
+ }, Ue = Ge(c), tr = Object.fromEntries(
632
637
  Object.keys(c).map((e) => [
633
638
  e,
634
- (r) => He(e, r)
639
+ (r) => Ue(e, r)
635
640
  ])
636
- ), ke = Object.keys(c).filter((e) => {
641
+ ), We = Object.keys(c).filter((e) => {
637
642
  const r = c[e];
638
643
  return typeof r == "string" && !r.includes("%{");
639
- }), xe = (e) => {
644
+ }), Ve = (e) => {
640
645
  const r = (i, a) => e[i](a), t = {};
641
- for (const i of ke)
646
+ for (const i of We)
642
647
  Object.defineProperty(t, i, { enumerable: !0, get: () => r(i) });
643
648
  return { translations: t, translate: r, bridge: e };
644
649
  };
645
- function Ke({
650
+ function ir({
646
651
  translations: e,
647
652
  children: r
648
653
  }) {
649
- const t = s.useMemo(() => xe(e), [e]);
650
- return /* @__PURE__ */ l(m.Provider, { value: t, children: r });
654
+ const t = s.useMemo(() => Ve(e), [e]);
655
+ return /* @__PURE__ */ l(g.Provider, { value: t, children: r });
651
656
  }
652
- function Xe() {
657
+ function ar() {
653
658
  var r;
654
- const e = (r = s.useContext(m)) == null ? void 0 : r.bridge;
659
+ const e = (r = s.useContext(g)) == null ? void 0 : r.bridge;
655
660
  if (!e)
656
661
  throw new Error("useTranslationBridge must be used within RubricsTranslationsScope");
657
662
  return e;
658
663
  }
659
- const Oe = 8, Ge = 8, Ue = {
664
+ const qe = 8, _e = 8, je = {
660
665
  rubricCriterionRange: !1,
661
666
  gradingRubricsPagination: !1,
662
667
  rubricSelfAssessmentEnabled: !1,
663
668
  outcomeExtraCreditEnabled: !1,
664
669
  aiRubricsEnabled: !1
665
- }, We = {
666
- aiRubricsMaxCriterionCount: Oe,
667
- aiRubricsMaxRatingCount: Ge
668
- }, Ve = {
670
+ }, Ye = {
671
+ aiRubricsMaxCriterionCount: qe,
672
+ aiRubricsMaxRatingCount: _e
673
+ }, Ke = {
669
674
  courseId: void 0,
670
675
  accountId: void 0,
671
676
  rootOutcomeGroupId: void 0,
672
- ...Ue,
673
- ...We
674
- }, d = C(Ve);
675
- function u(e) {
677
+ ...je,
678
+ ...Ye
679
+ }, b = R(Ke);
680
+ function m(e) {
676
681
  return e ? Object.fromEntries(
677
682
  Object.entries(e).filter(([, r]) => r !== void 0)
678
683
  ) : {};
679
684
  }
680
- function Ze({
685
+ function or({
681
686
  courseId: e,
682
687
  accountId: r,
683
688
  rootOutcomeGroupId: t,
684
689
  featureFlags: i,
685
690
  aiLimits: a,
686
- children: n
691
+ children: o
687
692
  }) {
688
- const o = b(d), p = R(
693
+ const n = p(b), u = v(
689
694
  () => ({
690
- ...o,
691
- ...u({ courseId: e, accountId: r, rootOutcomeGroupId: t }),
692
- ...u(i),
693
- ...u(a)
695
+ ...n,
696
+ ...m({ courseId: e, accountId: r, rootOutcomeGroupId: t }),
697
+ ...m(i),
698
+ ...m(a)
694
699
  }),
695
- [o, e, r, t, i, a]
700
+ [n, e, r, t, i, a]
696
701
  );
697
- return /* @__PURE__ */ l(d.Provider, { value: p, children: n });
702
+ return /* @__PURE__ */ l(b.Provider, { value: u, children: o });
703
+ }
704
+ function nr() {
705
+ return p(b);
706
+ }
707
+ const sr = (e) => `Hello from platform-rubrics (${e})`;
708
+ function ze(e) {
709
+ try {
710
+ return { parseError: !1, parsedValue: JSON.parse(e) };
711
+ } catch {
712
+ return { parseError: !0, parsedValue: null };
713
+ }
698
714
  }
699
- function $e() {
700
- return b(d);
715
+ function Je(e, r) {
716
+ return !r.safeParse(e).success;
717
+ }
718
+ function h(e, r, t = void 0) {
719
+ const i = window.localStorage.getItem(e);
720
+ if (i === null)
721
+ return r;
722
+ const { parseError: a, parsedValue: o } = ze(i);
723
+ return a || t && Je(o, t) ? r : o;
724
+ }
725
+ async function Qe(e, r) {
726
+ window.localStorage.setItem(e, JSON.stringify(r));
727
+ }
728
+ function cr(e, r, t) {
729
+ const i = S(), { data: a, status: o } = L({
730
+ queryKey: [e],
731
+ queryFn: () => h(e, r, t),
732
+ initialData: () => h(e, r, t),
733
+ staleTime: Number.POSITIVE_INFINITY,
734
+ gcTime: Number.POSITIVE_INFINITY
735
+ }), n = a, { mutate: u } = w({
736
+ mutationFn: (d) => Qe(e, d),
737
+ onMutate: (d) => {
738
+ i.setQueryData([e], d);
739
+ }
740
+ });
741
+ return [n, u, o];
701
742
  }
702
- const Je = (e) => `Hello from platform-rubrics (${e})`, h = {
743
+ const f = {
703
744
  somethingBroke: () => "Sorry, Something Broke",
704
745
  helpUsImprove: () => "Help us improve by telling us what happened",
705
746
  reportIssue: () => "Report Issue",
@@ -713,7 +754,7 @@ const Je = (e) => `Hello from platform-rubrics (${e})`, h = {
713
754
  notFoundTitle: () => "Whoops... Looks like nothing is here!",
714
755
  notFoundDescription: () => "We couldn't find that page!"
715
756
  };
716
- function Qe(e) {
757
+ function lr(e) {
717
758
  return {
718
759
  somethingBroke: () => e.errorPageSomethingBroke,
719
760
  helpUsImprove: () => e.errorPageHelpUsImprove,
@@ -729,13 +770,13 @@ function Qe(e) {
729
770
  notFoundDescription: () => e.errorPageNotFoundDescription
730
771
  };
731
772
  }
732
- function er(e) {
733
- return g({ userRoles: e });
773
+ function ur(e) {
774
+ return C({ userRoles: e });
734
775
  }
735
- function rr(e) {
736
- const r = e.translations ?? h, t = g({ userRoles: e.userRoles });
776
+ function dr(e) {
777
+ const r = e.translations ?? f, t = C({ userRoles: e.userRoles });
737
778
  return /* @__PURE__ */ l(
738
- f,
779
+ y,
739
780
  {
740
781
  imageUrl: e.errorImageUrl,
741
782
  onReportError: t,
@@ -745,10 +786,10 @@ function rr(e) {
745
786
  }
746
787
  );
747
788
  }
748
- function tr(e) {
749
- const r = e.translations ?? h;
789
+ function mr(e) {
790
+ const r = e.translations ?? f;
750
791
  return /* @__PURE__ */ l(
751
- v,
792
+ T,
752
793
  {
753
794
  artwork: e.artwork,
754
795
  title: r.notFoundTitle(),
@@ -757,18 +798,21 @@ function tr(e) {
757
798
  );
758
799
  }
759
800
  export {
760
- Oe as D,
761
- Ke as R,
762
- Ge as a,
763
- tr as b,
764
- er as c,
765
- ze as d,
766
- h as e,
767
- $e as f,
768
- Je as g,
769
- Ze as h,
770
- Qe as i,
771
- Xe as j,
772
- rr as r,
773
- Ye as u
801
+ qe as D,
802
+ ir as R,
803
+ _e as a,
804
+ h as b,
805
+ mr as c,
806
+ tr as d,
807
+ ur as e,
808
+ f,
809
+ sr as g,
810
+ rr as h,
811
+ nr as i,
812
+ ar as j,
813
+ or as k,
814
+ lr as l,
815
+ dr as r,
816
+ ze as t,
817
+ cr as u
774
818
  };