@cuemath/leap 3.5.52-as1 → 3.5.53-j1

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 (127) hide show
  1. package/dist/features/homework/homework-card.js +122 -121
  2. package/dist/features/homework/homework-card.js.map +1 -1
  3. package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js +66 -61
  4. package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js.map +1 -1
  5. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +56 -55
  6. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
  7. package/dist/features/milestone/create/comps/add-custom-chapter/search-chapter/search-chapters.js +32 -25
  8. package/dist/features/milestone/create/comps/add-custom-chapter/search-chapter/search-chapters.js.map +1 -1
  9. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.js +16 -15
  10. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.js.map +1 -1
  11. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.js +17 -10
  12. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.js.map +1 -1
  13. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js +6 -6
  14. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js.map +1 -1
  15. package/dist/features/milestone/create/comps/body-layout/body-layout.js +30 -29
  16. package/dist/features/milestone/create/comps/body-layout/body-layout.js.map +1 -1
  17. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +77 -74
  18. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  19. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +82 -79
  20. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js.map +1 -1
  21. package/dist/features/milestone/create/milestone-create-styled.js +8 -8
  22. package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
  23. package/dist/features/milestone/create/milestone-create.js +48 -46
  24. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  25. package/dist/features/milestone/edit/goal-draft-edit-sync.js +26 -0
  26. package/dist/features/milestone/edit/goal-draft-edit-sync.js.map +1 -0
  27. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +72 -66
  28. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  29. package/dist/features/milestone/edit/hooks/use-milestone-edit-sync.js +82 -0
  30. package/dist/features/milestone/edit/hooks/use-milestone-edit-sync.js.map +1 -0
  31. package/dist/features/milestone/milestone-list-container/hooks/use-milestone-list-sync.js +49 -0
  32. package/dist/features/milestone/milestone-list-container/hooks/use-milestone-list-sync.js.map +1 -0
  33. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +109 -105
  34. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  35. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +2 -2
  36. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  37. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +21 -16
  38. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  39. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +106 -98
  40. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  41. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +136 -117
  42. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  43. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +96 -92
  44. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  45. package/dist/features/milestone/milestone-list-container/milestone-list-sync.js +25 -0
  46. package/dist/features/milestone/milestone-list-container/milestone-list-sync.js.map +1 -0
  47. package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +78 -81
  48. package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -1
  49. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +28 -25
  50. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -1
  51. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +39 -33
  52. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +1 -1
  53. package/dist/features/milestone/milestone-resources/resources-assign/hooks/use-resource-assign-sync.js +50 -0
  54. package/dist/features/milestone/milestone-resources/resources-assign/hooks/use-resource-assign-sync.js.map +1 -0
  55. package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-sync.js +25 -0
  56. package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-sync.js.map +1 -0
  57. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +43 -53
  58. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +1 -1
  59. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +218 -174
  60. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  61. package/dist/features/milestone/milestone-resources/resources-assign/store/resource-assign-store.js +198 -0
  62. package/dist/features/milestone/milestone-resources/resources-assign/store/resource-assign-store.js.map +1 -0
  63. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +69 -67
  64. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  65. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +46 -45
  66. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
  67. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +34 -32
  68. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
  69. package/dist/features/milestone/milestone-tests/tests-creation/hooks/use-tests-creation-sync.js +52 -0
  70. package/dist/features/milestone/milestone-tests/tests-creation/hooks/use-tests-creation-sync.js.map +1 -0
  71. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js +51 -41
  72. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js.map +1 -1
  73. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js +85 -71
  74. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js.map +1 -1
  75. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview-styled.js +5 -5
  76. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview-styled.js.map +1 -1
  77. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +36 -26
  78. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
  79. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-sync.js +25 -0
  80. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-sync.js.map +1 -0
  81. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js +5 -0
  82. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js.map +1 -0
  83. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +150 -89
  84. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  85. package/dist/features/sheet-v2/resource-list/resource-list.js +26 -24
  86. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
  87. package/dist/features/trial-session/comps/learning-plan/index.js +218 -91
  88. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  89. package/dist/features/trial-session/comps/learning-plan/learning-plan-styled.js +7 -6
  90. package/dist/features/trial-session/comps/learning-plan/learning-plan-styled.js.map +1 -1
  91. package/dist/features/trial-session/hooks/use-learning-plan-scroll-sync.js +75 -0
  92. package/dist/features/trial-session/hooks/use-learning-plan-scroll-sync.js.map +1 -0
  93. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +125 -115
  94. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  95. package/dist/features/trial-session/trial-session-types.js +3 -2
  96. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  97. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +69 -54
  98. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
  99. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  100. package/dist/features/worksheet/worksheet/worksheet.js +44 -33
  101. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  102. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +25 -22
  103. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  104. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +48 -44
  105. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  106. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +2 -2
  107. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  108. package/dist/index.d.ts +138 -2
  109. package/dist/node_modules/decode-uri-component/index.js.map +1 -0
  110. package/dist/node_modules/query-string/base.js +1 -1
  111. package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
  112. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  113. package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
  114. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  115. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
  116. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  117. package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
  118. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  119. package/package.json +1 -1
  120. package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js +0 -37
  121. package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js.map +0 -1
  122. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
  123. package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  124. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  125. package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  126. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
  127. /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"use-worksheet-layout.js","sources":["../../../../../src/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport type { THueNames, TUserTypes } from '../../../ui/types';\nimport {\n QUESTIONS_GAP,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_NUDGE_BANNER_HEIGHT,\n} from '../../worksheet/constants';\nimport type { IWorksheetLayout } from '../../worksheet/worksheet-types';\n\ninterface IUseWorksheetLayout {\n (options: {\n userType: TUserTypes;\n nodeType: IResumeWorksheetModel['node_type'];\n isSATAssessment: boolean;\n showNudgeBanner?: boolean;\n topOffset: number;\n imageHue?: THueNames;\n }): IWorksheetLayout;\n}\n\nconst useWorksheetLayout: IUseWorksheetLayout = ({\n userType,\n nodeType,\n isSATAssessment,\n showNudgeBanner,\n topOffset,\n imageHue,\n}) => {\n const isPuzzleSheet = nodeType === 'PUZZLE_CARD';\n\n const navigationBar = useMemo<IWorksheetLayout['navigationBar']>(() => {\n if (isSATAssessment) return 'bottom';\n\n switch (nodeType) {\n case 'PUZZLE_CARD':\n case 'TRIAL_DIAGNOSTIC':\n case 'TRIAL_BASIC':\n case 'TRIAL_INTERMEDIATE':\n case 'TRIAL_ADVANCED':\n return 'none';\n default:\n return 'top';\n }\n }, [isSATAssessment, nodeType]);\n\n const navHeight = navigationBar === 'top' ? TOP_NAVIGATION_HEIGHT : 0;\n const minQuestionHeight = `calc(100vh - ${topOffset + navHeight}px)`;\n const minSummaryHeight = `calc(100vh - ${topOffset + navHeight}px)`;\n const tOffset = showNudgeBanner ? topOffset + WORKSHEET_NUDGE_BANNER_HEIGHT : topOffset;\n\n return useMemo<IWorksheetLayout>(\n () => ({\n containerStyle: isSATAssessment || isPuzzleSheet ? 'none' : 'card',\n //* The width of the container is set based on the user type and whether it is a SAT assessment\n //* For Puzzle sheets, on student side we are showing a header with 800px fixed width.\n containerWidth: isSATAssessment ? '1024px' : userType === 'TEACHER' ? '100%' : '800px',\n actionBar: 'bottom',\n topOffset: tOffset,\n navigationBar,\n questionsScrollable: !(\n isSATAssessment ||\n nodeType === 'TRIAL_DIAGNOSTIC' ||\n nodeType === 'TRIAL_BASIC' ||\n nodeType === 'TRIAL_INTERMEDIATE' ||\n nodeType === 'TRIAL_ADVANCED'\n ),\n minQuestionHeight,\n minSummaryHeight,\n renderSideBar: userType === 'TEACHER' && !isSATAssessment,\n renderQuestionHeader: !isPuzzleSheet,\n imageHue,\n background: isSATAssessment || isPuzzleSheet ? 'none' : 'paper',\n questionPadding: isPuzzleSheet ? 0 : QUESTIONS_GAP,\n }),\n [\n isSATAssessment,\n isPuzzleSheet,\n userType,\n tOffset,\n navigationBar,\n nodeType,\n minQuestionHeight,\n minSummaryHeight,\n imageHue,\n ],\n );\n};\n\nexport default useWorksheetLayout;\n"],"names":["useWorksheetLayout","userType","nodeType","isSATAssessment","showNudgeBanner","topOffset","imageHue","isPuzzleSheet","navigationBar","useMemo","navHeight","TOP_NAVIGATION_HEIGHT","minQuestionHeight","minSummaryHeight","tOffset","WORKSHEET_NUDGE_BANNER_HEIGHT","QUESTIONS_GAP","useWorksheetLayout$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GAEAW,IAAejB;"}
1
+ {"version":3,"file":"use-worksheet-layout.js","sources":["../../../../../src/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../../types/models/worksheet';\nimport type { THueNames, TUserTypes } from '../../../ui/types';\nimport {\n QUESTIONS_GAP,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_NUDGE_BANNER_HEIGHT,\n} from '../../worksheet/constants';\nimport type { IWorksheetLayout } from '../../worksheet/worksheet-types';\n\ninterface IUseWorksheetLayout {\n (options: {\n userType: TUserTypes;\n nodeType: IResumeWorksheetModel['node_type'];\n isSATAssessment: boolean;\n showNudgeBanner?: boolean;\n topOffset: number;\n imageHue?: THueNames;\n layoutOverride?: Partial<IWorksheetLayout>;\n }): IWorksheetLayout;\n}\n\nconst useWorksheetLayout: IUseWorksheetLayout = ({\n userType,\n nodeType,\n isSATAssessment,\n showNudgeBanner,\n topOffset,\n imageHue,\n layoutOverride = {},\n}) => {\n const isPuzzleSheet = nodeType === 'PUZZLE_CARD';\n\n const navigationBar = useMemo<IWorksheetLayout['navigationBar']>(() => {\n if (isSATAssessment) return 'bottom';\n\n switch (nodeType) {\n case 'PUZZLE_CARD':\n case 'TRIAL_DIAGNOSTIC':\n case 'TRIAL_BASIC':\n case 'TRIAL_INTERMEDIATE':\n case 'TRIAL_ADVANCED':\n return 'none';\n default:\n return 'top';\n }\n }, [isSATAssessment, nodeType]);\n\n const navHeight = navigationBar === 'top' ? TOP_NAVIGATION_HEIGHT : 0;\n const minQuestionHeight = `calc(100vh - ${topOffset + navHeight}px)`;\n const minSummaryHeight = `calc(100vh - ${topOffset + navHeight}px)`;\n const tOffset = showNudgeBanner ? topOffset + WORKSHEET_NUDGE_BANNER_HEIGHT : topOffset;\n\n return useMemo<IWorksheetLayout>(\n () => ({\n containerStyle: isSATAssessment || isPuzzleSheet ? 'none' : 'card',\n //* The width of the container is set based on the user type and whether it is a SAT assessment\n //* For Puzzle sheets, on student side we are showing a header with 800px fixed width.\n containerWidth: isSATAssessment ? '1024px' : userType === 'TEACHER' ? '100%' : '800px',\n actionBar: 'bottom',\n topOffset: tOffset,\n navigationBar,\n questionsScrollable: !(\n isSATAssessment ||\n nodeType === 'TRIAL_DIAGNOSTIC' ||\n nodeType === 'TRIAL_BASIC' ||\n nodeType === 'TRIAL_INTERMEDIATE' ||\n nodeType === 'TRIAL_ADVANCED'\n ),\n minQuestionHeight,\n minSummaryHeight,\n renderSideBar: userType === 'TEACHER' && !isSATAssessment,\n renderQuestionHeader: !isPuzzleSheet,\n imageHue,\n background: isSATAssessment || isPuzzleSheet ? 'none' : 'paper',\n questionPadding: isPuzzleSheet ? 0 : QUESTIONS_GAP,\n ...layoutOverride,\n }),\n [\n isSATAssessment,\n isPuzzleSheet,\n userType,\n tOffset,\n navigationBar,\n nodeType,\n minQuestionHeight,\n minSummaryHeight,\n imageHue,\n layoutOverride,\n ],\n );\n};\n\nexport default useWorksheetLayout;\n"],"names":["useWorksheetLayout","userType","nodeType","isSATAssessment","showNudgeBanner","topOffset","imageHue","layoutOverride","isPuzzleSheet","navigationBar","useMemo","navHeight","TOP_NAVIGATION_HEIGHT","minQuestionHeight","minSummaryHeight","tOffset","WORKSHEET_NUDGE_BANNER_HEIGHT","QUESTIONS_GAP","useWorksheetLayout$1"],"mappings":";;AAuBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC,IAAiB,CAAC;AACpB,MAAM;AACJ,QAAMC,IAAgBN,MAAa,eAE7BO,IAAgBC,EAA2C,MAAM;AACrE,QAAIP,EAAwB,QAAA;AAE5B,YAAQD,GAAU;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACI,eAAA;AAAA,MACT;AACS,eAAA;AAAA,IACX;AAAA,EAAA,GACC,CAACC,GAAiBD,CAAQ,CAAC,GAExBS,IAAYF,MAAkB,QAAQG,IAAwB,GAC9DC,IAAoB,gBAAgBR,IAAYM,CAAS,OACzDG,IAAmB,gBAAgBT,IAAYM,CAAS,OACxDI,IAAUX,IAAkBC,IAAYW,IAAgCX;AAEvE,SAAAK;AAAA,IACL,OAAO;AAAA,MACL,gBAAgBP,KAAmBK,IAAgB,SAAS;AAAA;AAAA;AAAA,MAG5D,gBAAgBL,IAAkB,WAAWF,MAAa,YAAY,SAAS;AAAA,MAC/E,WAAW;AAAA,MACX,WAAWc;AAAA,MACX,eAAAN;AAAA,MACA,qBAAqB,EACnBN,KACAD,MAAa,sBACbA,MAAa,iBACbA,MAAa,wBACbA,MAAa;AAAA,MAEf,mBAAAW;AAAA,MACA,kBAAAC;AAAA,MACA,eAAeb,MAAa,aAAa,CAACE;AAAA,MAC1C,sBAAsB,CAACK;AAAA,MACvB,UAAAF;AAAA,MACA,YAAYH,KAAmBK,IAAgB,SAAS;AAAA,MACxD,iBAAiBA,IAAgB,IAAIS;AAAA,MACrC,GAAGV;AAAA,IAAA;AAAA,IAEL;AAAA,MACEJ;AAAA,MACAK;AAAA,MACAP;AAAA,MACAc;AAAA,MACAN;AAAA,MACAP;AAAA,MACAW;AAAA,MACAC;AAAA,MACAR;AAAA,MACAC;AAAA,IACF;AAAA,EAAA;AAEJ,GAEAW,IAAelB;"}
@@ -1,91 +1,94 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { memo as N, useMemo as i, useRef as P, useCallback as v } from "react";
3
- import B from "../../ui/layout/flex-view.js";
4
- import L from "../../ui/text/text.js";
5
- import M from "../worksheet/worksheet.js";
6
- import { getWorksheetHeaderLayout as z } from "../worksheet/worksheet-helpers.js";
7
- import V from "./hooks/use-worksheet-layout.js";
8
- import { WorksheetPageWrapper as j, HeaderWrapper as D, Header as O, StyledBackIcon as F, HeaderTitleWrapper as G } from "./worksheet-preview-styled.js";
9
- const U = [
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { memo as P, useMemo as i, useRef as B, useCallback as L } from "react";
3
+ import M from "../../ui/layout/flex-view.js";
4
+ import O from "../../ui/text/text.js";
5
+ import z from "../worksheet/worksheet.js";
6
+ import { getWorksheetHeaderLayout as V } from "../worksheet/worksheet-helpers.js";
7
+ import j from "./hooks/use-worksheet-layout.js";
8
+ import { WorksheetPageWrapper as D, HeaderWrapper as F, Header as G, StyledBackIcon as U, HeaderTitleWrapper as X } from "./worksheet-preview-styled.js";
9
+ const Z = [
10
10
  "SAT_ENGLISH_ASSESSMENT",
11
11
  "SAT_MATH_ASSESSMENT"
12
- ], te = N(
12
+ ], ne = P(
13
13
  function(k) {
14
14
  const {
15
15
  studentId: a,
16
- userType: c,
16
+ userType: d,
17
17
  activityReference: t,
18
18
  worksheet: S,
19
19
  nodeType: e,
20
- worksheetName: d,
20
+ worksheetName: c,
21
21
  showNudgeBanner: l,
22
22
  markedAsCompleted: T,
23
23
  imageHue: m,
24
24
  onWorksheetLoaded: g,
25
25
  onWorksheetErrored: E,
26
26
  openQuestionFeedbackModal: W,
27
- onBackIconClick: r,
27
+ onBackIconClick: o,
28
28
  activityType: w,
29
29
  canShowActionBar: A,
30
30
  mode: n,
31
- actionBarRightElement: $,
32
- topOffset: y = 56
33
- } = k, { signed_request: C, questions_signed_request: x } = S, u = i(() => e === "PUZZLE_CARD", [e]), s = i(() => t === "test", [t]), H = i(() => U.includes(e), [e]), R = P(() => null), h = s ? !1 : A, _ = V({
34
- userType: c,
31
+ actionBarRightElement: y,
32
+ topOffset: $ = 56,
33
+ behaviorOverride: C,
34
+ layoutOverride: x
35
+ } = k, { signed_request: H, questions_signed_request: R } = S, u = i(() => e === "PUZZLE_CARD", [e]), s = i(() => t === "test", [t]), _ = i(() => Z.includes(e), [e]), b = B(() => null), h = s ? !1 : A, v = j({
36
+ userType: d,
35
37
  nodeType: e,
36
- isSATAssessment: H,
38
+ isSATAssessment: _,
37
39
  showNudgeBanner: l,
38
- topOffset: y,
39
- imageHue: m
40
- }), b = v(() => {
41
- r == null || r();
42
- }, [r]), { bgColor: I, borderColor: q, textColor: p } = z({
40
+ topOffset: $,
41
+ imageHue: m,
42
+ layoutOverride: x
43
+ }), I = L(() => {
44
+ o == null || o();
45
+ }, [o]), { bgColor: q, borderColor: N, textColor: p } = V({
43
46
  isPuzzleWorksheet: u && h,
44
47
  isTestWorksheet: s,
45
48
  imageHue: m
46
49
  });
47
- return /* @__PURE__ */ f(j, { children: [
48
- /* @__PURE__ */ o(D, { children: /* @__PURE__ */ f(
49
- O,
50
+ return /* @__PURE__ */ f(D, { children: [
51
+ /* @__PURE__ */ r(F, { children: /* @__PURE__ */ f(
52
+ G,
50
53
  {
51
54
  $flexDirection: "row",
52
55
  $alignItems: "center",
53
56
  $justifyContent: s ? "flex-start" : "center",
54
- $background: I,
57
+ $background: q,
55
58
  $height: 56,
56
59
  $gutterX: 1,
57
60
  $flexGapX: 1,
58
- $borderColor: q,
61
+ $borderColor: N,
59
62
  children: [
60
- r && /* @__PURE__ */ o(
61
- F,
63
+ o && /* @__PURE__ */ r(
64
+ U,
62
65
  {
63
66
  $color: p ?? "WHITE",
64
- onClick: b
67
+ onClick: I
65
68
  }
66
69
  ),
67
- /* @__PURE__ */ o(
68
- G,
70
+ /* @__PURE__ */ r(
71
+ X,
69
72
  {
70
73
  $alignItems: s && !u ? "flex-start" : "center",
71
- children: /* @__PURE__ */ o(L, { $renderAs: "body1", $color: p, children: d || t })
74
+ children: /* @__PURE__ */ r(O, { $renderAs: "body1", $color: p, children: c || t })
72
75
  }
73
76
  )
74
77
  ]
75
78
  }
76
79
  ) }),
77
- /* @__PURE__ */ o(B, { $alignItems: "center", children: /* @__PURE__ */ o(
78
- M,
80
+ /* @__PURE__ */ r(M, { $alignItems: "center", children: /* @__PURE__ */ r(
81
+ z,
79
82
  {
80
- userType: c ?? (n === "review" ? "TEACHER" : "STUDENT"),
83
+ userType: d ?? (n === "review" ? "TEACHER" : "STUDENT"),
81
84
  worksheetCompleted: n === "review",
82
- worksheetName: d || t,
83
- itemsSignedRequest: C,
84
- questionsSignedRequest: x,
85
+ worksheetName: c || t,
86
+ itemsSignedRequest: H,
87
+ questionsSignedRequest: R,
85
88
  studentId: a,
86
- layout: _,
89
+ layout: v,
87
90
  canShowActionBar: h,
88
- loggerRef: R,
91
+ loggerRef: b,
89
92
  showNudgeBanner: l,
90
93
  markedAsCompleted: T,
91
94
  onLoaded: g,
@@ -95,13 +98,14 @@ const U = [
95
98
  nodeType: e,
96
99
  mode: n,
97
100
  activityType: w,
98
- actionBarRightElement: $
101
+ actionBarRightElement: y,
102
+ behaviorOverride: C
99
103
  }
100
104
  ) })
101
105
  ] });
102
106
  }
103
107
  );
104
108
  export {
105
- te as default
109
+ ne as default
106
110
  };
107
111
  //# sourceMappingURL=worksheet-preview-view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-preview-view.js","sources":["../../../../src/features/worksheet/worksheet-preview/worksheet-preview-view.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useRef, type FC } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../types/models/worksheet';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport Worksheet from '../worksheet/worksheet';\nimport { getWorksheetHeaderLayout } from '../worksheet/worksheet-helpers';\nimport useWorksheetLayout from './hooks/use-worksheet-layout';\nimport * as Styled from './worksheet-preview-styled';\nimport type { IPreviewWorksheetViewProps } from './worksheet-preview-types';\n\nconst SAT_WORKSHEET_TYPES: IResumeWorksheetModel['node_type'][] = [\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_ASSESSMENT',\n];\n\nconst PreviewWorksheetView: FC<IPreviewWorksheetViewProps> = memo(\n function PreviewWorksheetView(props) {\n const {\n studentId,\n userType,\n activityReference,\n worksheet,\n nodeType,\n worksheetName,\n showNudgeBanner,\n markedAsCompleted,\n imageHue,\n onWorksheetLoaded,\n onWorksheetErrored,\n openQuestionFeedbackModal,\n onBackIconClick,\n activityType,\n canShowActionBar,\n mode,\n actionBarRightElement,\n topOffset = 56,\n } = props;\n const { signed_request: signedRequest, questions_signed_request: questionsSignedRequest } =\n worksheet;\n\n const isPuzzleWorksheet = useMemo(() => nodeType === 'PUZZLE_CARD', [nodeType]);\n const isTestWorksheet = useMemo(() => activityReference === 'test', [activityReference]);\n const isSATAssessment = useMemo(() => SAT_WORKSHEET_TYPES.includes(nodeType), [nodeType]);\n const loggerRef = useRef(() => null);\n const isActionBarVisible = isTestWorksheet ? false : canShowActionBar;\n\n const layout = useWorksheetLayout({\n userType,\n nodeType,\n isSATAssessment,\n showNudgeBanner,\n topOffset,\n imageHue,\n });\n\n const handleOnBackIconClick = useCallback(() => {\n onBackIconClick?.();\n }, [onBackIconClick]);\n\n const { bgColor, borderColor, textColor } = getWorksheetHeaderLayout({\n isPuzzleWorksheet: isPuzzleWorksheet && isActionBarVisible,\n isTestWorksheet,\n imageHue,\n });\n\n return (\n <Styled.WorksheetPageWrapper>\n <Styled.HeaderWrapper>\n <Styled.Header\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent={isTestWorksheet ? 'flex-start' : 'center'}\n $background={bgColor}\n $height={56}\n $gutterX={1}\n $flexGapX={1}\n $borderColor={borderColor}\n >\n {onBackIconClick && (\n <Styled.StyledBackIcon\n $color={textColor ?? 'WHITE'}\n onClick={handleOnBackIconClick}\n />\n )}\n\n <Styled.HeaderTitleWrapper\n $alignItems={isTestWorksheet && !isPuzzleWorksheet ? 'flex-start' : 'center'}\n >\n <Text $renderAs=\"body1\" $color={textColor}>\n {worksheetName || activityReference}\n </Text>\n </Styled.HeaderTitleWrapper>\n </Styled.Header>\n </Styled.HeaderWrapper>\n\n <FlexView $alignItems=\"center\">\n <Worksheet\n userType={userType ?? (mode === 'review' ? 'TEACHER' : 'STUDENT')}\n worksheetCompleted={mode === 'review'}\n worksheetName={worksheetName || activityReference}\n itemsSignedRequest={signedRequest}\n questionsSignedRequest={questionsSignedRequest}\n studentId={studentId}\n layout={layout}\n canShowActionBar={isActionBarVisible}\n loggerRef={loggerRef}\n showNudgeBanner={showNudgeBanner}\n markedAsCompleted={markedAsCompleted}\n onLoaded={onWorksheetLoaded}\n onErrored={onWorksheetErrored}\n userId={studentId}\n openQuestionFeedbackModal={openQuestionFeedbackModal}\n nodeType={nodeType}\n mode={mode}\n activityType={activityType}\n actionBarRightElement={actionBarRightElement}\n />\n </FlexView>\n </Styled.WorksheetPageWrapper>\n );\n },\n);\n\nexport default PreviewWorksheetView;\n"],"names":["SAT_WORKSHEET_TYPES","PreviewWorksheetView","memo","props","studentId","userType","activityReference","worksheet","nodeType","worksheetName","showNudgeBanner","markedAsCompleted","imageHue","onWorksheetLoaded","onWorksheetErrored","openQuestionFeedbackModal","onBackIconClick","activityType","canShowActionBar","mode","actionBarRightElement","topOffset","signedRequest","questionsSignedRequest","isPuzzleWorksheet","useMemo","isTestWorksheet","isSATAssessment","loggerRef","useRef","isActionBarVisible","layout","useWorksheetLayout","handleOnBackIconClick","useCallback","bgColor","borderColor","textColor","getWorksheetHeaderLayout","jsxs","Styled.WorksheetPageWrapper","jsx","Styled.HeaderWrapper","Styled.Header","Styled.StyledBackIcon","Styled.HeaderTitleWrapper","Text","FlexView","Worksheet"],"mappings":";;;;;;;;AAWA,MAAMA,IAA4D;AAAA,EAChE;AAAA,EACA;AACF,GAEMC,KAAuDC;AAAA,EAC3D,SAA8BC,GAAO;AAC7B,UAAA;AAAA,MACJ,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,eAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,2BAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,cAAAC;AAAA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AAAA,YACX;AAAA,YAGF,gBAAAQ;AAAA,cAACI;AAAAA,cAAA;AAAA,gBACC,aAAanB,KAAmB,CAACF,IAAoB,eAAe;AAAA,gBAEpE,4BAACsB,GAAK,EAAA,WAAU,SAAQ,QAAQT,GAC7B,eAAiB/B,EACpB,CAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,MAEA,gBAAAmC,EAACM,GAAS,EAAA,aAAY,UACpB,UAAA,gBAAAN;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,UAAU3C,MAAac,MAAS,WAAW,YAAY;AAAA,UACvD,oBAAoBA,MAAS;AAAA,UAC7B,eAAeV,KAAiBH;AAAA,UAChC,oBAAoBgB;AAAA,UACpB,wBAAAC;AAAA,UACA,WAAAnB;AAAA,UACA,QAAA2B;AAAA,UACA,kBAAkBD;AAAA,UAClB,WAAAF;AAAA,UACA,iBAAAlB;AAAA,UACA,mBAAAC;AAAA,UACA,UAAUE;AAAA,UACV,WAAWC;AAAA,UACX,QAAQV;AAAA,UACR,2BAAAW;AAAA,UACA,UAAAP;AAAA,UACA,MAAAW;AAAA,UACA,cAAAF;AAAA,UACA,uBAAAG;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"worksheet-preview-view.js","sources":["../../../../src/features/worksheet/worksheet-preview/worksheet-preview-view.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useRef, type FC } from 'react';\n\nimport type { IResumeWorksheetModel } from '../../../types/models/worksheet';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport Worksheet from '../worksheet/worksheet';\nimport { getWorksheetHeaderLayout } from '../worksheet/worksheet-helpers';\nimport useWorksheetLayout from './hooks/use-worksheet-layout';\nimport * as Styled from './worksheet-preview-styled';\nimport type { IPreviewWorksheetViewProps } from './worksheet-preview-types';\n\nconst SAT_WORKSHEET_TYPES: IResumeWorksheetModel['node_type'][] = [\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_ASSESSMENT',\n];\n\nconst PreviewWorksheetView: FC<IPreviewWorksheetViewProps> = memo(\n function PreviewWorksheetView(props) {\n const {\n studentId,\n userType,\n activityReference,\n worksheet,\n nodeType,\n worksheetName,\n showNudgeBanner,\n markedAsCompleted,\n imageHue,\n onWorksheetLoaded,\n onWorksheetErrored,\n openQuestionFeedbackModal,\n onBackIconClick,\n activityType,\n canShowActionBar,\n mode,\n actionBarRightElement,\n topOffset = 56,\n behaviorOverride,\n layoutOverride,\n } = props;\n const { signed_request: signedRequest, questions_signed_request: questionsSignedRequest } =\n worksheet;\n\n const isPuzzleWorksheet = useMemo(() => nodeType === 'PUZZLE_CARD', [nodeType]);\n const isTestWorksheet = useMemo(() => activityReference === 'test', [activityReference]);\n const isSATAssessment = useMemo(() => SAT_WORKSHEET_TYPES.includes(nodeType), [nodeType]);\n const loggerRef = useRef(() => null);\n const isActionBarVisible = isTestWorksheet ? false : canShowActionBar;\n\n const layout = useWorksheetLayout({\n userType,\n nodeType,\n isSATAssessment,\n showNudgeBanner,\n topOffset,\n imageHue,\n layoutOverride,\n });\n\n const handleOnBackIconClick = useCallback(() => {\n onBackIconClick?.();\n }, [onBackIconClick]);\n\n const { bgColor, borderColor, textColor } = getWorksheetHeaderLayout({\n isPuzzleWorksheet: isPuzzleWorksheet && isActionBarVisible,\n isTestWorksheet,\n imageHue,\n });\n\n return (\n <Styled.WorksheetPageWrapper>\n <Styled.HeaderWrapper>\n <Styled.Header\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent={isTestWorksheet ? 'flex-start' : 'center'}\n $background={bgColor}\n $height={56}\n $gutterX={1}\n $flexGapX={1}\n $borderColor={borderColor}\n >\n {onBackIconClick && (\n <Styled.StyledBackIcon\n $color={textColor ?? 'WHITE'}\n onClick={handleOnBackIconClick}\n />\n )}\n\n <Styled.HeaderTitleWrapper\n $alignItems={isTestWorksheet && !isPuzzleWorksheet ? 'flex-start' : 'center'}\n >\n <Text $renderAs=\"body1\" $color={textColor}>\n {worksheetName || activityReference}\n </Text>\n </Styled.HeaderTitleWrapper>\n </Styled.Header>\n </Styled.HeaderWrapper>\n\n <FlexView $alignItems=\"center\">\n <Worksheet\n userType={userType ?? (mode === 'review' ? 'TEACHER' : 'STUDENT')}\n worksheetCompleted={mode === 'review'}\n worksheetName={worksheetName || activityReference}\n itemsSignedRequest={signedRequest}\n questionsSignedRequest={questionsSignedRequest}\n studentId={studentId}\n layout={layout}\n canShowActionBar={isActionBarVisible}\n loggerRef={loggerRef}\n showNudgeBanner={showNudgeBanner}\n markedAsCompleted={markedAsCompleted}\n onLoaded={onWorksheetLoaded}\n onErrored={onWorksheetErrored}\n userId={studentId}\n openQuestionFeedbackModal={openQuestionFeedbackModal}\n nodeType={nodeType}\n mode={mode}\n activityType={activityType}\n actionBarRightElement={actionBarRightElement}\n behaviorOverride={behaviorOverride}\n />\n </FlexView>\n </Styled.WorksheetPageWrapper>\n );\n },\n);\n\nexport default PreviewWorksheetView;\n"],"names":["SAT_WORKSHEET_TYPES","PreviewWorksheetView","memo","props","studentId","userType","activityReference","worksheet","nodeType","worksheetName","showNudgeBanner","markedAsCompleted","imageHue","onWorksheetLoaded","onWorksheetErrored","openQuestionFeedbackModal","onBackIconClick","activityType","canShowActionBar","mode","actionBarRightElement","topOffset","behaviorOverride","layoutOverride","signedRequest","questionsSignedRequest","isPuzzleWorksheet","useMemo","isTestWorksheet","isSATAssessment","loggerRef","useRef","isActionBarVisible","layout","useWorksheetLayout","handleOnBackIconClick","useCallback","bgColor","borderColor","textColor","getWorksheetHeaderLayout","jsxs","Styled.WorksheetPageWrapper","jsx","Styled.HeaderWrapper","Styled.Header","Styled.StyledBackIcon","Styled.HeaderTitleWrapper","Text","FlexView","Worksheet"],"mappings":";;;;;;;;AAWA,MAAMA,IAA4D;AAAA,EAChE;AAAA,EACA;AACF,GAEMC,KAAuDC;AAAA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) {
21
21
  return j(() => {
22
22
  o();
23
23
  }, [o]), u || p ? /* @__PURE__ */ t(A, { height: "100vh", onTryAgain: o }) : W ? /* @__PURE__ */ t(k, { height: "100vh" }) : /* @__PURE__ */ P(y, { children: [
24
- !v && /* @__PURE__ */ t(k, { height: "100vh" }),
25
24
  d && /* @__PURE__ */ t(
26
25
  T,
27
26
  {
@@ -30,7 +29,8 @@ const b = x(function(n) {
30
29
  onWorksheetLoaded: g,
31
30
  onWorksheetErrored: l
32
31
  }
33
- )
32
+ ),
33
+ !v && /* @__PURE__ */ t(k, { height: "100vh" })
34
34
  ] });
35
35
  }), _ = b;
36
36
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"worksheet-preview.js","sources":["../../../../src/features/worksheet/worksheet-preview/worksheet-preview.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useState, type FC } from 'react';\n\nimport Error from '../../ui/error/error';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport { usePreviewWorksheetGet } from './api/get-preview-worksheet';\nimport type { IPreviewWorksheetProps } from './worksheet-preview-types';\nimport PreviewWorksheetView from './worksheet-preview-view';\n\nconst PreviewWorksheet: FC<IPreviewWorksheetProps> = memo(function PreviewWorksheet(props) {\n const { activityReference, nodeType, items, onWorksheetLoaded } = props;\n\n const [error, setError] = useState<string>();\n const [worksheetRendered, setWorksheetRendered] = useState<boolean>(false);\n const { isProcessing, get, data: worksheetData, error: fetchError } = usePreviewWorksheetGet();\n\n const worksheet = useMemo<typeof worksheetData>(() => {\n if (worksheetData) {\n return {\n ...worksheetData,\n };\n }\n\n return worksheetData;\n }, [worksheetData]);\n\n const fetchWorksheet = useCallback(() => {\n setError(undefined);\n get(activityReference, {\n action: 'review',\n node_type: nodeType,\n items,\n });\n }, [activityReference, get, nodeType, items]);\n\n const handleWorksheetLoaded = useCallback(() => {\n setWorksheetRendered(true);\n\n onWorksheetLoaded?.(true);\n }, [onWorksheetLoaded]);\n\n const handleWorksheetErrored = useCallback((err: { code?: number; message: string }) => {\n setError(err.message);\n }, []);\n\n useEffect(() => {\n fetchWorksheet();\n }, [fetchWorksheet]);\n\n if (error || fetchError) {\n return <Error height=\"100vh\" onTryAgain={fetchWorksheet} />;\n }\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <>\n {!worksheetRendered && <AppLoader height=\"100vh\" />}\n {worksheet && (\n <PreviewWorksheetView\n {...props}\n worksheet={worksheet}\n onWorksheetLoaded={handleWorksheetLoaded}\n onWorksheetErrored={handleWorksheetErrored}\n />\n )}\n </>\n );\n});\n\nexport default PreviewWorksheet;\n"],"names":["PreviewWorksheet","memo","props","activityReference","nodeType","items","onWorksheetLoaded","error","setError","useState","worksheetRendered","setWorksheetRendered","isProcessing","get","worksheetData","fetchError","usePreviewWorksheetGet","worksheet","useMemo","fetchWorksheet","useCallback","handleWorksheetLoaded","handleWorksheetErrored","err","useEffect","jsx","Error","AppLoader","jsxs","Fragment","PreviewWorksheetView","PreviewWorksheet$1"],"mappings":";;;;;;AAQA,MAAMA,IAA+CC,EAAK,SAA0BC,GAAO;AACzF,QAAM,EAAE,mBAAAC,GAAmB,UAAAC,GAAU,OAAAC,GAAO,mBAAAC,MAAsBJ,GAE5D,CAACK,GAAOC,CAAQ,IAAIC,EAAiB,GACrC,CAACC,GAAmBC,CAAoB,IAAIF,EAAkB,EAAK,GACnE,EAAE,cAAAG,GAAc,KAAAC,GAAK,MAAMC,GAAe,OAAOC,MAAeC,KAEhEC,IAAYC,EAA8B,MAC1CJ,KACK;AAAA,IACL,GAAGA;AAAA,EAAA,GAKN,CAACA,CAAa,CAAC,GAEZK,IAAiBC,EAAY,MAAM;AACvC,IAAAZ,EAAS,MAAS,GAClBK,EAAIV,GAAmB;AAAA,MACrB,QAAQ;AAAA,MACR,WAAWC;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAAA,KACA,CAACF,GAAmBU,GAAKT,GAAUC,CAAK,CAAC,GAEtCgB,IAAwBD,EAAY,MAAM;AAC9C,IAAAT,EAAqB,EAAI,GAEzBL,KAAA,QAAAA,EAAoB;AAAA,EAAI,GACvB,CAACA,CAAiB,CAAC,GAEhBgB,IAAyBF,EAAY,CAACG,MAA4C;AACtF,IAAAf,EAASe,EAAI,OAAO;AAAA,EACtB,GAAG,CAAE,CAAA;AAML,SAJAC,EAAU,MAAM;AACC,IAAAL;EAAA,GACd,CAACA,CAAc,CAAC,GAEfZ,KAASQ,IACH,gBAAAU,EAAAC,GAAA,EAAM,QAAO,SAAQ,YAAYP,EAAgB,CAAA,IAGvDP,IACK,gBAAAa,EAACE,GAAU,EAAA,QAAO,QAAQ,CAAA,IAK9B,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,CAACnB,KAAqB,gBAAAe,EAACE,GAAU,EAAA,QAAO,QAAQ,CAAA;AAAA,IAChDV,KACC,gBAAAQ;AAAA,MAACK;AAAA,MAAA;AAAA,QACE,GAAG5B;AAAA,QACJ,WAAAe;AAAA,QACA,mBAAmBI;AAAA,QACnB,oBAAoBC;AAAA,MAAA;AAAA,IACtB;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC,GAEDS,IAAe/B;"}
1
+ {"version":3,"file":"worksheet-preview.js","sources":["../../../../src/features/worksheet/worksheet-preview/worksheet-preview.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useState, type FC } from 'react';\n\nimport Error from '../../ui/error/error';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport { usePreviewWorksheetGet } from './api/get-preview-worksheet';\nimport type { IPreviewWorksheetProps } from './worksheet-preview-types';\nimport PreviewWorksheetView from './worksheet-preview-view';\n\nconst PreviewWorksheet: FC<IPreviewWorksheetProps> = memo(function PreviewWorksheet(props) {\n const { activityReference, nodeType, items, onWorksheetLoaded } = props;\n\n const [error, setError] = useState<string>();\n const [worksheetRendered, setWorksheetRendered] = useState<boolean>(false);\n const { isProcessing, get, data: worksheetData, error: fetchError } = usePreviewWorksheetGet();\n\n const worksheet = useMemo<typeof worksheetData>(() => {\n if (worksheetData) {\n return {\n ...worksheetData,\n };\n }\n\n return worksheetData;\n }, [worksheetData]);\n\n const fetchWorksheet = useCallback(() => {\n setError(undefined);\n get(activityReference, {\n action: 'review',\n node_type: nodeType,\n items,\n });\n }, [activityReference, get, nodeType, items]);\n\n const handleWorksheetLoaded = useCallback(() => {\n setWorksheetRendered(true);\n\n onWorksheetLoaded?.(true);\n }, [onWorksheetLoaded]);\n\n const handleWorksheetErrored = useCallback((err: { code?: number; message: string }) => {\n setError(err.message);\n }, []);\n\n useEffect(() => {\n fetchWorksheet();\n }, [fetchWorksheet]);\n\n if (error || fetchError) {\n return <Error height=\"100vh\" onTryAgain={fetchWorksheet} />;\n }\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <>\n {worksheet && (\n <PreviewWorksheetView\n {...props}\n worksheet={worksheet}\n onWorksheetLoaded={handleWorksheetLoaded}\n onWorksheetErrored={handleWorksheetErrored}\n />\n )}\n {!worksheetRendered && <AppLoader height=\"100vh\" />}\n </>\n );\n});\n\nexport default PreviewWorksheet;\n"],"names":["PreviewWorksheet","memo","props","activityReference","nodeType","items","onWorksheetLoaded","error","setError","useState","worksheetRendered","setWorksheetRendered","isProcessing","get","worksheetData","fetchError","usePreviewWorksheetGet","worksheet","useMemo","fetchWorksheet","useCallback","handleWorksheetLoaded","handleWorksheetErrored","err","useEffect","jsx","Error","AppLoader","jsxs","Fragment","PreviewWorksheetView","PreviewWorksheet$1"],"mappings":";;;;;;AAQA,MAAMA,IAA+CC,EAAK,SAA0BC,GAAO;AACzF,QAAM,EAAE,mBAAAC,GAAmB,UAAAC,GAAU,OAAAC,GAAO,mBAAAC,MAAsBJ,GAE5D,CAACK,GAAOC,CAAQ,IAAIC,EAAiB,GACrC,CAACC,GAAmBC,CAAoB,IAAIF,EAAkB,EAAK,GACnE,EAAE,cAAAG,GAAc,KAAAC,GAAK,MAAMC,GAAe,OAAOC,MAAeC,KAEhEC,IAAYC,EAA8B,MAC1CJ,KACK;AAAA,IACL,GAAGA;AAAA,EAAA,GAKN,CAACA,CAAa,CAAC,GAEZK,IAAiBC,EAAY,MAAM;AACvC,IAAAZ,EAAS,MAAS,GAClBK,EAAIV,GAAmB;AAAA,MACrB,QAAQ;AAAA,MACR,WAAWC;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAAA,KACA,CAACF,GAAmBU,GAAKT,GAAUC,CAAK,CAAC,GAEtCgB,IAAwBD,EAAY,MAAM;AAC9C,IAAAT,EAAqB,EAAI,GAEzBL,KAAA,QAAAA,EAAoB;AAAA,EAAI,GACvB,CAACA,CAAiB,CAAC,GAEhBgB,IAAyBF,EAAY,CAACG,MAA4C;AACtF,IAAAf,EAASe,EAAI,OAAO;AAAA,EACtB,GAAG,CAAE,CAAA;AAML,SAJAC,EAAU,MAAM;AACC,IAAAL;EAAA,GACd,CAACA,CAAc,CAAC,GAEfZ,KAASQ,IACH,gBAAAU,EAAAC,GAAA,EAAM,QAAO,SAAQ,YAAYP,EAAgB,CAAA,IAGvDP,IACK,gBAAAa,EAACE,GAAU,EAAA,QAAO,QAAQ,CAAA,IAK9B,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCZ,KAAA,gBAAAQ;AAAA,MAACK;AAAA,MAAA;AAAA,QACE,GAAG5B;AAAA,QACJ,WAAAe;AAAA,QACA,mBAAmBI;AAAA,QACnB,oBAAoBC;AAAA,MAAA;AAAA,IACtB;AAAA,IAED,CAACZ,KAAsB,gBAAAe,EAAAE,GAAA,EAAU,QAAO,QAAQ,CAAA;AAAA,EACnD,EAAA,CAAA;AAEJ,CAAC,GAEDI,IAAe/B;"}
package/dist/index.d.ts CHANGED
@@ -585,6 +585,14 @@ export declare enum ELeaderboardType {
585
585
  INFINITE_TABLE = "infiniteTable"
586
586
  }
587
587
 
588
+ declare enum ELearningPlanView {
589
+ ADD_RESOURCE = "add-resource",
590
+ ADD_TESTS = "add-tests",
591
+ EDIT_MILESTONES = "edit-milestones",
592
+ VIEW_WORKSHEET = "view-worksheet",
593
+ VIEW_CHAPTER_DETAILS = "view-chapter-details"
594
+ }
595
+
588
596
  declare enum EMathFitTestState {
589
597
  IN_PROGRESS = "IN_PROGRESS",
590
598
  COMPLETED = "COMPLETED",
@@ -669,6 +677,12 @@ export declare enum ETAB_IDS {
669
677
  MONTHLY = "monthly"
670
678
  }
671
679
 
680
+ declare enum ETestsStage {
681
+ CHAPTER_SELECTION = "CHAPTER_SELECTION",
682
+ DIFFICULTY_AND_DURATION_SELECTION = "DIFFICULTY_AND_DURATION_SELECTION",
683
+ PREVIEW = "PREVIEW"
684
+ }
685
+
672
686
  export declare const EveningIcon: FC<SVGProps<SVGSVGElement>>;
673
687
 
674
688
  export declare const EVENTS: {
@@ -1130,6 +1144,7 @@ declare interface IBaseWorksheetProps {
1130
1144
  nodeType: TNodeTypes;
1131
1145
  mode: 'resume' | 'review' | 'preview';
1132
1146
  loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;
1147
+ behaviorOverride?: Partial<IWorksheetBehavior>;
1133
1148
  }
1134
1149
 
1135
1150
  declare interface IBillingDetails {
@@ -1766,12 +1781,26 @@ declare interface IEPResourceAssign {
1766
1781
  stream: TCourseStream;
1767
1782
  programId?: string;
1768
1783
  userMilestoneId?: string;
1784
+ userType?: TUserTypes;
1785
+ state?: Partial<IEPResourceState>;
1786
+ onStateChange?: (state: Partial<IEPResourceState>) => void;
1769
1787
  onError: (errorMessage: string) => void;
1770
1788
  onResourceAssign: (toastMessage: string) => void;
1771
1789
  onExitResourceAssign: () => void;
1772
1790
  onViewResource: (resource: IResourceItemData) => void;
1773
1791
  }
1774
1792
 
1793
+ declare interface IEPResourceState {
1794
+ pageNumber: number;
1795
+ searchValue: string;
1796
+ searchQuery: IExtraPracticeQuery;
1797
+ resourceItems: IResourceItemData[];
1798
+ selectedResourceItems: IResourceItemData[];
1799
+ resourceFilters: IResourceData['filters'];
1800
+ selectedTab: TResourceTab;
1801
+ filterExpansion: Record<TFilterType, boolean>;
1802
+ }
1803
+
1775
1804
  declare interface IErrorProps {
1776
1805
  onTryAgain?: () => void;
1777
1806
  height?: string | number;
@@ -1811,6 +1840,19 @@ declare interface IExtraPracticeProps extends Omit<ISheetItemCallbackProps, 'onM
1811
1840
  onShowOlderSheets?: () => void;
1812
1841
  }
1813
1842
 
1843
+ declare interface IExtraPracticeQuery {
1844
+ board?: string;
1845
+ grade?: string;
1846
+ stream: TCourseStream;
1847
+ search_term?: string;
1848
+ node_type?: string;
1849
+ page?: number;
1850
+ per_page?: number;
1851
+ user_milestone_id?: string;
1852
+ program_id?: string;
1853
+ user_id?: string;
1854
+ }
1855
+
1814
1856
  declare interface IExtraPracticeSection extends ILPARMilestoneSheetItemCallbacks {
1815
1857
  userType: TUserTypes;
1816
1858
  extraPracticeData: TLPARMilestoneSheetData[];
@@ -1822,6 +1864,12 @@ declare interface IFile {
1822
1864
  url: string;
1823
1865
  }
1824
1866
 
1867
+ declare interface IFilterInfo {
1868
+ applied: boolean;
1869
+ code: string;
1870
+ name: string;
1871
+ }
1872
+
1825
1873
  declare interface IFirstSessionIntroductionProps {
1826
1874
  onRunSystemCheck: () => void;
1827
1875
  studentId: string;
@@ -2874,6 +2922,8 @@ declare interface IMilestoneContainerProps extends Omit<IMilestoneWidgetResource
2874
2922
  activeTabId?: string;
2875
2923
  isTrialSession?: boolean;
2876
2924
  onWidgetTabSelection?: IMilestoneTabsProps['onWidgetTabSelection'];
2925
+ state?: IMilestoneState;
2926
+ onStateChange?: (milestoneId: string, milestoneState: IMilestoneWidgetState) => void;
2877
2927
  }
2878
2928
 
2879
2929
  export declare type IMileStoneCreateContainerProps = Omit<IMileStoneCreateProps, 'config' | 'learningConfig' | 'journeyCodesToInclude' | 'flow'>;
@@ -2903,6 +2953,7 @@ declare interface IMileStoneCreateProps {
2903
2953
  onFormDataChange?: (formData: IMilestoneFormData) => void;
2904
2954
  onExit?: () => void;
2905
2955
  onPreSubmit?: TCreateOnPresubmit;
2956
+ isTrialSession?: boolean;
2906
2957
  }
2907
2958
 
2908
2959
  export declare interface IMilestoneData {
@@ -2935,6 +2986,7 @@ export declare interface IMilestoneData {
2935
2986
 
2936
2987
  declare interface IMileStoneEditContainerProps extends IMileStoneCreateContainerProps {
2937
2988
  milestoneId: string;
2989
+ isTrialSession?: boolean;
2938
2990
  }
2939
2991
 
2940
2992
  declare interface IMilestoneEditProps {
@@ -3008,6 +3060,25 @@ declare interface IMilestoneStartProps {
3008
3060
  handleOnClick?: () => void;
3009
3061
  }
3010
3062
 
3063
+ declare interface IMilestoneState {
3064
+ [milestoneId: string]: IMilestoneWidgetState;
3065
+ }
3066
+
3067
+ declare interface IMilestoneTabConfig {
3068
+ chapters: {
3069
+ label: string;
3070
+ component: ReactElement;
3071
+ };
3072
+ tests: {
3073
+ label: string;
3074
+ component: ReactElement;
3075
+ };
3076
+ resources: {
3077
+ label: string;
3078
+ component: ReactElement;
3079
+ };
3080
+ }
3081
+
3011
3082
  declare interface IMilestoneTabsProps extends Pick<IChaptersListProps, 'chapters' | 'onAddChapter' | 'onChapterClick' | 'isGoalCreation'>, Pick<IMilestoneWidgetResourcesProps, 'onAssignResources' | 'isDraftMilestone'>, ITestsListProps, INodeCardCallbacks {
3012
3083
  isPlanAvailable: boolean;
3013
3084
  isMilestoneActive: boolean;
@@ -3017,7 +3088,9 @@ declare interface IMilestoneTabsProps extends Pick<IChaptersListProps, 'chapters
3017
3088
  milestonePermissions: IMilestoneCardPermissions;
3018
3089
  activeMilestoneId?: string;
3019
3090
  activeTabId?: string;
3020
- onWidgetTabSelection?: (milestoneId: string, tabName: string) => void;
3091
+ onWidgetTabSelection?: (milestoneId: string, tabName: TMilestoneTabName) => void;
3092
+ selectedTabName?: TMilestoneTabName;
3093
+ isTrialSession?: boolean;
3021
3094
  }
3022
3095
 
3023
3096
  declare interface IMilestoneWidgetProps extends Omit<IMilestoneWidgetResourcesProps, 'userMilestoneId' | 'onChangeLocation'>, Omit<ITestsListProps, 'userMilestoneId'> {
@@ -3041,6 +3114,8 @@ declare interface IMilestoneWidgetProps extends Omit<IMilestoneWidgetResourcesPr
3041
3114
  activeTabId?: string;
3042
3115
  onWidgetTabSelection?: IMilestoneTabsProps['onWidgetTabSelection'];
3043
3116
  courseStream: TCourseStream;
3117
+ state?: IMilestoneWidgetState;
3118
+ onStateChange?: (milestoneId: string, milestoneState: IMilestoneWidgetState) => void;
3044
3119
  }
3045
3120
 
3046
3121
  declare interface IMilestoneWidgetResourcesProps extends INodeCardCallbacks {
@@ -3054,6 +3129,11 @@ declare interface IMilestoneWidgetResourcesProps extends INodeCardCallbacks {
3054
3129
  isTrialSession?: boolean;
3055
3130
  }
3056
3131
 
3132
+ declare interface IMilestoneWidgetState {
3133
+ selectedTab?: string;
3134
+ isExpanded?: boolean;
3135
+ }
3136
+
3057
3137
  declare interface IMiniGoalDetail {
3058
3138
  order: number;
3059
3139
  description: string;
@@ -3535,6 +3615,8 @@ declare interface IPreviewWorksheetProps {
3535
3615
  actionBarRightElement?: ReactElement;
3536
3616
  canShowActionBar?: boolean;
3537
3617
  topOffset?: number;
3618
+ behaviorOverride?: Partial<IWorksheetBehavior>;
3619
+ layoutOverride?: Partial<IWorksheetLayout>;
3538
3620
  }
3539
3621
 
3540
3622
  declare interface IProgramOption {
@@ -3769,6 +3851,18 @@ declare interface IResetPasswordFormProps {
3769
3851
  isValid?: boolean;
3770
3852
  }
3771
3853
 
3854
+ declare interface IResourceData {
3855
+ filters: {
3856
+ boards: IFilterInfo[];
3857
+ grades: IFilterInfo[];
3858
+ node_types: IFilterInfo[];
3859
+ };
3860
+ page: number;
3861
+ per_page: number;
3862
+ results: IResourceItemData[];
3863
+ total_pages: number;
3864
+ }
3865
+
3772
3866
  export declare interface IResourceItemData {
3773
3867
  boards: string[];
3774
3868
  created_on: string;
@@ -4543,11 +4637,24 @@ declare interface ITeacherReview {
4543
4637
  images?: string[];
4544
4638
  }
4545
4639
 
4640
+ declare interface ITestFormData {
4641
+ selectedChapters: string[] | null;
4642
+ difficultyLevel: TTestDifficultyLevel | null;
4643
+ title: string | null;
4644
+ duration: number | null;
4645
+ chapters?: IChapterDataProps[] | null;
4646
+ }
4647
+
4546
4648
  declare type ITestHelpItemTopicsDataProps = {
4547
4649
  chapter_name: string;
4548
4650
  goals: string[];
4549
4651
  };
4550
4652
 
4653
+ declare interface ITestHelpPreviewResponse {
4654
+ ref: string;
4655
+ chapter_id: string;
4656
+ }
4657
+
4551
4658
  declare interface ITestListItem {
4552
4659
  entity_type: EHWCardListEntityType;
4553
4660
  entity_id: string;
@@ -4564,11 +4671,21 @@ declare interface ITestsCreationProps {
4564
4671
  milestoneId: string;
4565
4672
  studentId: string;
4566
4673
  testNumber: number;
4674
+ userType?: TUserTypes;
4675
+ state?: Partial<ITestsCreationState>;
4676
+ isTrialSession?: boolean;
4677
+ onStateChange?: (state: ITestsCreationState) => void;
4567
4678
  onTestAssign: () => void;
4568
4679
  onExit: () => void;
4569
4680
  onError: (errorMessage?: string) => void;
4570
4681
  }
4571
4682
 
4683
+ declare interface ITestsCreationState {
4684
+ testStage: ETestsStage;
4685
+ testFormData: ITestFormData;
4686
+ testPreviewItems?: ITestHelpPreviewResponse[];
4687
+ }
4688
+
4572
4689
  declare interface ITestsListProps {
4573
4690
  userType: TUserTypes;
4574
4691
  studentId: string;
@@ -4578,6 +4695,7 @@ declare interface ITestsListProps {
4578
4695
  isDraftMilestone?: boolean;
4579
4696
  isChaptersAvailable?: boolean;
4580
4697
  canUpdatePlan?: boolean;
4698
+ isTrialSession?: boolean;
4581
4699
  onNodeReattempt?: (sheetData: INodeDataProps, milestoneId?: string) => void;
4582
4700
  onNodeAssignAsHomework?: (sheetData: INodeDataProps, milestoneId?: string) => void;
4583
4701
  onTestPreview?: (sheetData: INodeDataProps, milestoneId: string) => void;
@@ -4748,11 +4866,14 @@ export declare interface ITrialSessionFormFields {
4748
4866
  showCircleGameScreen?: boolean;
4749
4867
  accuracyStr?: string;
4750
4868
  totalTimeTaken?: number;
4751
- chapterId?: string;
4752
4869
  matchmakingId?: string;
4753
4870
  numberInNameError?: boolean;
4754
4871
  confirmationModalActive?: boolean;
4755
4872
  resetAttempt: boolean;
4873
+ learningPlanView?: ELearningPlanView;
4874
+ learningPlanChapterId?: string;
4875
+ learningPlanActiveMilestoneId?: string;
4876
+ learningPlanWorksheetData?: IWorksheetData;
4756
4877
  }
4757
4878
 
4758
4879
  declare interface ITrialSessionMetadata {
@@ -5021,6 +5142,7 @@ declare interface IUseWorksheetLayout {
5021
5142
  showNudgeBanner?: boolean;
5022
5143
  topOffset: number;
5023
5144
  imageHue?: THueNames;
5145
+ layoutOverride?: Partial<IWorksheetLayout>;
5024
5146
  }): IWorksheetLayout;
5025
5147
  }
5026
5148
 
@@ -5255,6 +5377,14 @@ declare interface IWorksheetCallbackProps {
5255
5377
  openQuestionFeedbackModal?: (itemRef: string) => void;
5256
5378
  }
5257
5379
 
5380
+ declare interface IWorksheetData {
5381
+ itemRefs: string[];
5382
+ activityReference: string;
5383
+ nodeType: INodeDataProps['node_type'];
5384
+ worksheetName: string;
5385
+ activityType: INodeDataProps['activity_type'];
5386
+ }
5387
+
5258
5388
  declare interface IWorksheetLayout {
5259
5389
  containerStyle: 'none' | 'card';
5260
5390
  navigationBar: 'none' | 'top' | 'bottom';
@@ -6617,6 +6747,8 @@ declare interface TextProps {
6617
6747
 
6618
6748
  declare type TFeedback = 'positive' | 'negative';
6619
6749
 
6750
+ declare type TFilterType = 'curriculum' | 'grade' | 'type';
6751
+
6620
6752
  export declare type TFontFamilyNames = `${'Athletics'}-${'Light' | 'Regular' | 'Medium' | 'Bold' | 'Black'}` | `${'UntitledSans'}-${'Regular' | 'Medium'}`;
6621
6753
 
6622
6754
  declare type TGoalCategory = keyof typeof GOAL_CATEGORY | null;
@@ -7203,6 +7335,8 @@ declare type TMilestoneFormFlow = 'CREATE' | 'EDIT' | 'DRAFT_EDIT';
7203
7335
 
7204
7336
  declare type TMilestoneStates = 'ACTIVE' | 'OUTCOME_PENDING' | 'OUTCOME_ADDED' | 'COURSE_COMPLETED' | 'COURSE_NOT_COMPLETED' | 'CLOSED' | 'CANCELED' | 'DRAFT';
7205
7337
 
7338
+ declare type TMilestoneTabName = keyof IMilestoneTabConfig;
7339
+
7206
7340
  declare type TMilestoneType = 'ACTIVE' | 'INACTIVE' | 'DRAFT';
7207
7341
 
7208
7342
  export declare interface TNodeDataTestItemsDataProps {
@@ -7315,6 +7449,8 @@ declare type TRenderAs = 'primary' | 'secondary';
7315
7449
 
7316
7450
  declare type TRenderAs_2 = 'canvas' | 'whiteboard';
7317
7451
 
7452
+ declare type TResourceTab = 'resource-filters' | 'resource-added';
7453
+
7318
7454
  declare type TRewardHomeData = {
7319
7455
  user_badges: TBadgeData[] | [];
7320
7456
  user_rewards: TRewardsData[] | [];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/decode-uri-component/index.js"],"sourcesContent":["const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n"],"names":["token","singleMatcher","multiMatcher","decodeComponents","components","split","left","right","decode","input","tokens","i","customDecodeURIComponent","replaceMap","match","result","entries","key","decodeUriComponent","encodedURI"],"mappings":"AAAA,MAAMA,IAAQ,gBACRC,IAAgB,IAAI,OAAO,MAAMD,IAAQ,cAAc,IAAI,GAC3DE,IAAe,IAAI,OAAO,MAAMF,IAAQ,MAAM,IAAI;AAExD,SAASG,EAAiBC,GAAYC,GAAO;AAC5C,MAAI;AAEH,WAAO,CAAC,mBAAmBD,EAAW,KAAK,EAAE,CAAC,CAAC;AAAA,EACjD,QAAS;AAAA,EAEP;AAED,MAAIA,EAAW,WAAW;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,IAAI,UAAU,wDAAwD,OAAOA,IAAa,GAAG;AAGpG,MAAI;AAEH,WAAO,mBAAmBA,CAAU;AAAA,EACtC,QAAS;AAEP,WAAOP,EAAyBO,CAAU;AAAA,EAC1C;AACF;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import b from "./node_modules/decode-uri-component/index.js";
1
+ import b from "../decode-uri-component/index.js";
2
2
  import l from "../split-on-first/index.js";
3
3
  import { includeKeys as N } from "../filter-obj/index.js";
4
4
  const j = (r) => r == null, A = (r) => encodeURIComponent(r).replace(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), u = Symbol("encodeFragmentIdentifier");
@@ -0,0 +1,7 @@
1
+ const o = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), t = {
2
+ randomUUID: o
3
+ };
4
+ export {
5
+ t as default
6
+ };
7
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}
@@ -1,6 +1,7 @@
1
- var t, e = new Uint8Array(16);
1
+ let t;
2
+ const e = new Uint8Array(16);
2
3
  function o() {
3
- if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !t))
4
+ if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
4
5
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5
6
  return t(e);
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA,GACAC,IAAQ,IAAI,WAAW,EAAE;AACd,SAASC,IAAM;AAE5B,MAAI,CAACF,MAGHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,KAAK,OAAO,WAAa,OAAe,OAAO,SAAS,mBAAoB,cAAc,SAAS,gBAAgB,KAAK,QAAQ,GAE3O,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA;AACJ,MAAMC,IAAQ,IAAI,WAAW,EAAE;AAChB,SAASC,IAAM;AAE5B,MAAI,CAACF,MAEHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAE3G,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}