@instructure/platform-modules 0.4.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/adapters/canvasGraphql/index.d.ts +4 -14
- package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +6 -75
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts +7 -21
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/adapters/inMemory.d.ts +0 -16
- package/dist/adapters/inMemory.d.ts.map +1 -1
- package/dist/adapters/limits.d.ts +3 -24
- package/dist/adapters/limits.d.ts.map +1 -1
- package/dist/adapters/types.d.ts +14 -34
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cache/invalidate.d.ts +0 -23
- package/dist/cache/invalidate.d.ts.map +1 -1
- package/dist/cache/keys.d.ts +3 -14
- package/dist/cache/keys.d.ts.map +1 -1
- package/dist/components/FilterChips.d.ts +4 -11
- package/dist/components/FilterChips.d.ts.map +1 -1
- package/dist/components/ModuleCard.d.ts +0 -9
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleCard.stories.d.ts +3 -5
- package/dist/components/ModuleCard.stories.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +0 -10
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModuleNumberBadge.d.ts +0 -1
- package/dist/components/ModuleNumberBadge.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts +0 -31
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +11 -69
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/StatusPill.d.ts +4 -3
- package/dist/components/StatusPill.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/labels.d.ts +1 -54
- package/dist/components/labels.d.ts.map +1 -1
- package/dist/components/lightThemeDecorator.d.ts +3 -0
- package/dist/components/lightThemeDecorator.d.ts.map +1 -0
- package/dist/config/base.d.ts +0 -5
- package/dist/config/base.d.ts.map +1 -1
- package/dist/config/capabilities.d.ts +8 -0
- package/dist/config/capabilities.d.ts.map +1 -0
- package/dist/config/context.d.ts +1 -1
- package/dist/config/context.d.ts.map +1 -1
- package/dist/config/filters.d.ts +15 -0
- package/dist/config/filters.d.ts.map +1 -0
- package/dist/config/formatters.d.ts +15 -0
- package/dist/config/formatters.d.ts.map +1 -0
- package/dist/config/index.d.ts +9 -4
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/itemMeta.d.ts +5 -0
- package/dist/config/itemMeta.d.ts.map +1 -0
- package/dist/config/itemTypes.d.ts +4 -0
- package/dist/config/itemTypes.d.ts.map +1 -0
- package/dist/config/partialModulesConfig.d.ts +0 -1
- package/dist/config/partialModulesConfig.d.ts.map +1 -1
- package/dist/config/registry.d.ts +2 -22
- package/dist/config/registry.d.ts.map +1 -1
- package/dist/config/resolve.d.ts +0 -4
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/schemas.d.ts +37 -7
- package/dist/config/schemas.d.ts.map +1 -1
- package/dist/config/types.d.ts +8 -11
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/useFormatters.d.ts +10 -0
- package/dist/config/useFormatters.d.ts.map +1 -0
- package/dist/fixtures/generate.d.ts +1 -26
- package/dist/fixtures/generate.d.ts.map +1 -1
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/scenarios.d.ts +1 -6
- package/dist/fixtures/scenarios.d.ts.map +1 -1
- package/dist/hooks/constants.d.ts +6 -23
- package/dist/hooks/constants.d.ts.map +1 -1
- package/dist/hooks/queryOptions.d.ts +2 -5
- package/dist/hooks/queryOptions.d.ts.map +1 -1
- package/dist/hooks/useItemsMode.d.ts +3 -35
- package/dist/hooks/useItemsMode.d.ts.map +1 -1
- package/dist/hooks/useModuleItemQueries.d.ts +1 -7
- package/dist/hooks/useModuleItemQueries.d.ts.map +1 -1
- package/dist/hooks/useModuleItems.d.ts +0 -16
- package/dist/hooks/useModuleItems.d.ts.map +1 -1
- package/dist/hooks/useModules.d.ts +3 -24
- package/dist/hooks/useModules.d.ts.map +1 -1
- package/dist/hooks/useModulesPageData.d.ts +9 -7
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/i18n.d.ts +6 -36
- package/dist/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1807 -1412
- package/dist/types/domain.d.ts +4 -27
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/enums.d.ts +3 -25
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/extensions.d.ts +0 -22
- package/dist/types/extensions.d.ts.map +1 -1
- package/dist/types/filterClause.d.ts +18 -0
- package/dist/types/filterClause.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/navigation.d.ts +0 -6
- package/dist/types/navigation.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +0 -5
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +14 -3
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ const adapter = createCanvasGraphqlAdapter({ executeQuery })
|
|
|
38
38
|
function ModulesPage({ courseId }: { courseId: string }) {
|
|
39
39
|
const data = useModulesPageData({ courseId, adapter, view: 'student' })
|
|
40
40
|
return (
|
|
41
|
-
<ModulesI18nProvider translations={translations} locale={locale}>
|
|
41
|
+
<ModulesI18nProvider translations={translations} locale={locale} timezone={timezone}>
|
|
42
42
|
<ModulesList data={data} courseName={courseName} />
|
|
43
43
|
</ModulesI18nProvider>
|
|
44
44
|
)
|
|
@@ -182,4 +182,5 @@ pnpm storybook
|
|
|
182
182
|
- `docs/adr/` holds the decision records. The decision is append-only: supersede a record, never
|
|
183
183
|
rewrite one. Filenames, headings and links may be corrected — see `docs/adr/README.md`.
|
|
184
184
|
- Reasoning local to one file stays in a doc comment there. Start with `adapters/types.ts`,
|
|
185
|
-
`adapters/limits.ts
|
|
185
|
+
`adapters/limits.ts` and `hooks/constants.ts`. Anything spanning files is a record in
|
|
186
|
+
`docs/adr/`.
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
+
import { FilterCapabilities } from '../../types/filterClause';
|
|
1
2
|
import { ModulesDataAdapter } from '../types';
|
|
2
3
|
import { UnsupportedModuleItem } from './normalize';
|
|
3
4
|
export type ExecuteQuery = <TResult, TVariables>(query: unknown, variables: TVariables) => Promise<TResult>;
|
|
4
5
|
export { INLINE_ITEM_LIMIT, INLINE_QUERY_NODE_BUDGET } from '../limits';
|
|
5
6
|
export interface CanvasGraphqlAdapterOptions {
|
|
6
7
|
executeQuery: ExecuteQuery;
|
|
7
|
-
/** @see INLINE_ITEM_LIMIT */
|
|
8
8
|
inlineItemLimit?: number;
|
|
9
|
-
/** @see INLINE_QUERY_NODE_BUDGET */
|
|
10
9
|
nodeBudget?: number;
|
|
11
|
-
/** Unset by default: dropping is the policy, this is the seam for seeing it. */
|
|
12
10
|
onUnsupportedItem?: (item: UnsupportedModuleItem) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Omit for any viewer without a single subject. Omitting is safe by construction: the
|
|
15
|
-
* submission field set is then not requested, so no status can be filled with somebody
|
|
16
|
-
* else's data. `progression` is still fetched, so a student viewer without an id gets a
|
|
17
|
-
* status derived from requirements alone — which is why `complete` is withheld there.
|
|
18
|
-
*
|
|
19
|
-
* When supplied it must be the viewer's own id. @see `SUBMISSION_FIELDS` in `./queries`
|
|
20
|
-
*/
|
|
21
11
|
studentId?: string | null;
|
|
22
|
-
/** On by default: the only place the contract is enforced at runtime. */
|
|
23
12
|
validate?: boolean;
|
|
13
|
+
capabilities?: FilterCapabilities;
|
|
24
14
|
}
|
|
25
|
-
export declare function createCanvasGraphqlAdapter({ executeQuery, inlineItemLimit, nodeBudget, onUnsupportedItem, studentId, validate, }: CanvasGraphqlAdapterOptions): ModulesDataAdapter;
|
|
15
|
+
export declare function createCanvasGraphqlAdapter({ executeQuery, inlineItemLimit, nodeBudget, onUnsupportedItem, studentId, validate, capabilities, }: CanvasGraphqlAdapterOptions): ModulesDataAdapter;
|
|
26
16
|
export { GET_MODULE_ITEMS, GET_MODULES, type GetModuleItemsVariables, type GetModulesVariables, } from './queries';
|
|
27
|
-
export { buildStudentContext, deriveModuleItemStatus, deriveModuleProgress,
|
|
17
|
+
export { buildStudentContext, deriveModuleItemStatus, deriveModuleProgress, firstSubmission, type GetModuleItemsResult, type GetModulesResult, type GraphqlCompletionRequirement, type GraphqlModuleConnection, type GraphqlModuleItemConnection, type GraphqlModuleItemContent, type GraphqlModuleItemNode, type GraphqlModuleNode, type GraphqlModuleProgression, type GraphqlModuleStatistics, type GraphqlPageInfo, type GraphqlRequirement, type GraphqlSubmission, type GraphqlSubmissionConnection, type ModuleStudentContext, normalizeItemType, normalizeModule, normalizeModuleItem, normalizeModuleItemsPage, normalizeModulesPage, normalizePageInfo, type NormalizeOptions, PartialCanvasResponseError, type PartialResponseSubject, parseDurationMinutes, type UnsupportedModuleItem, } from './normalize';
|
|
28
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,0BAA0B,CAAA;AAEhF,OAAO,KAAK,EAAwC,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAA;AAUpB,MAAM,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ACpB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,0BAA0B,EAC1B,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompletionRequirement, CompletionRequirementType, Module, ModuleItem, ModuleItemsPage, ModuleItemStatus, ModuleItemType, ModuleProgress, ModulesPage,
|
|
1
|
+
import { CompletionRequirement, CompletionRequirementType, Module, ModuleItem, ModuleItemsPage, ModuleItemStatus, ModuleItemType, ModuleProgress, ModulesPage, PageInfo } from '../../types/domain';
|
|
2
2
|
export interface GraphqlPageInfo {
|
|
3
3
|
hasNextPage: boolean;
|
|
4
4
|
endCursor: string | null;
|
|
@@ -9,17 +9,13 @@ export interface GraphqlCompletionRequirement {
|
|
|
9
9
|
minScore?: number | null;
|
|
10
10
|
minPercentage?: number | null;
|
|
11
11
|
}
|
|
12
|
-
/** Present only for a student viewer. */
|
|
13
12
|
export interface GraphqlSubmission {
|
|
14
13
|
_id?: string | number | null;
|
|
15
|
-
/** `SubmissionState`: unsubmitted | submitted | pending_review | graded | ungraded | deleted. */
|
|
16
14
|
state?: string | null;
|
|
17
|
-
/** `SubmissionGradingStatus`: needs_grading | needs_review | graded | excused. */
|
|
18
15
|
gradingStatus?: string | null;
|
|
19
16
|
submittedAt?: string | null;
|
|
20
17
|
attempt?: number | null;
|
|
21
18
|
missing?: boolean | null;
|
|
22
|
-
/** Per-student, override-applied due date, denormalized onto the submission. */
|
|
23
19
|
cachedDueDate?: string | null;
|
|
24
20
|
}
|
|
25
21
|
export interface GraphqlSubmissionConnection {
|
|
@@ -29,7 +25,6 @@ export interface GraphqlModuleItemContent {
|
|
|
29
25
|
__typename?: string | null;
|
|
30
26
|
isNewQuiz?: boolean | null;
|
|
31
27
|
dueAt?: string | null;
|
|
32
|
-
/** Declared on `ModuleItemInterface`; `null` for content that cannot be graded. */
|
|
33
28
|
pointsPossible?: number | null;
|
|
34
29
|
submissionsConnection?: GraphqlSubmissionConnection | null;
|
|
35
30
|
}
|
|
@@ -38,14 +33,15 @@ export interface GraphqlRequirement {
|
|
|
38
33
|
type: string;
|
|
39
34
|
minScore?: number | null;
|
|
40
35
|
minPercentage?: number | null;
|
|
36
|
+
score?: number | null;
|
|
41
37
|
}
|
|
42
38
|
export interface GraphqlModuleProgression {
|
|
43
|
-
/** locked | unlocked | started | completed. */
|
|
44
39
|
workflowState?: string | null;
|
|
45
40
|
completed?: boolean | null;
|
|
46
41
|
locked?: boolean | null;
|
|
47
42
|
started?: boolean | null;
|
|
48
43
|
requirementsMet?: (GraphqlRequirement | null)[] | null;
|
|
44
|
+
incompleteRequirements?: (GraphqlRequirement | null)[] | null;
|
|
49
45
|
}
|
|
50
46
|
export interface GraphqlModuleStatistics {
|
|
51
47
|
latestDueAt?: string | null;
|
|
@@ -59,7 +55,6 @@ export interface GraphqlModuleItemNode {
|
|
|
59
55
|
position?: number | null;
|
|
60
56
|
indent?: number | null;
|
|
61
57
|
published?: boolean | null;
|
|
62
|
-
/** ISO 8601 duration, e.g. `PT45M`. Canvas Career only. */
|
|
63
58
|
estimatedDuration?: string | null;
|
|
64
59
|
content?: GraphqlModuleItemContent | null;
|
|
65
60
|
}
|
|
@@ -73,11 +68,6 @@ export interface GraphqlModuleNode {
|
|
|
73
68
|
position?: number | null;
|
|
74
69
|
published?: boolean | null;
|
|
75
70
|
unlockAt?: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* `Int!` in the Canvas schema, so it is optional here only because a partial
|
|
78
|
-
* response can omit it. `normalizeModule` treats that as a hard error rather
|
|
79
|
-
* than a zero — see `PartialCanvasResponseError`.
|
|
80
|
-
*/
|
|
81
71
|
moduleItemsTotalCount?: number | null;
|
|
82
72
|
requirementCount?: number | null;
|
|
83
73
|
requireSequentialProgress?: boolean | null;
|
|
@@ -86,10 +76,10 @@ export interface GraphqlModuleNode {
|
|
|
86
76
|
name?: string | null;
|
|
87
77
|
} | null)[] | null;
|
|
88
78
|
completionRequirements?: (GraphqlCompletionRequirement | null)[] | null;
|
|
89
|
-
/** Absent for a teacher/anonymous viewer, and `null` when Canvas has none. */
|
|
90
79
|
progression?: GraphqlModuleProgression | null;
|
|
91
80
|
submissionStatistics?: GraphqlModuleStatistics | null;
|
|
92
81
|
moduleItemsConnection?: GraphqlModuleItemConnection | null;
|
|
82
|
+
moduleStatus?: string | null;
|
|
93
83
|
}
|
|
94
84
|
export interface GraphqlModuleConnection {
|
|
95
85
|
nodes?: (GraphqlModuleNode | null)[] | null;
|
|
@@ -108,12 +98,6 @@ export interface GetModuleItemsResult {
|
|
|
108
98
|
} | null;
|
|
109
99
|
}
|
|
110
100
|
export type PartialResponseSubject = 'module' | 'moduleItem';
|
|
111
|
-
/**
|
|
112
|
-
* Thrown rather than defaulted, because the sensible-looking default is the dangerous one:
|
|
113
|
-
* a missing `moduleItemsTotalCount` coerced to `0` makes `resolveItemsMode` answer `inline`
|
|
114
|
-
* exactly when the response is least trustworthy, and a null `published` guessed `true`
|
|
115
|
-
* renders unpublished content as published to the audience that acts on that badge.
|
|
116
|
-
*/
|
|
117
101
|
export declare class PartialCanvasResponseError extends Error {
|
|
118
102
|
readonly subject: PartialResponseSubject;
|
|
119
103
|
readonly id: string;
|
|
@@ -122,22 +106,10 @@ export declare class PartialCanvasResponseError extends Error {
|
|
|
122
106
|
}
|
|
123
107
|
export interface UnsupportedModuleItem {
|
|
124
108
|
id: string;
|
|
125
|
-
/** The `content.__typename` we could not map, or `null` when content was absent. */
|
|
126
109
|
typename: string | null;
|
|
127
110
|
}
|
|
128
111
|
export interface NormalizeOptions {
|
|
129
|
-
/**
|
|
130
|
-
* Dropping an unmappable item is silent data loss, so this defaults to `console.warn`
|
|
131
|
-
* rather than to nothing. Pass a no-op to silence it.
|
|
132
|
-
*/
|
|
133
112
|
onUnsupportedItem?: (item: UnsupportedModuleItem) => void;
|
|
134
|
-
/**
|
|
135
|
-
* Whether the query selected the submission field set. Absent means it did.
|
|
136
|
-
*
|
|
137
|
-
* With no `studentId` the adapter omits submissions but still fetches
|
|
138
|
-
* `progression`, so a met requirement is the only per-item signal left. Without
|
|
139
|
-
* this, `complete` would be claimed on work whose submission was never read.
|
|
140
|
-
*/
|
|
141
113
|
submissionsIncluded?: boolean;
|
|
142
114
|
}
|
|
143
115
|
export declare function normalizeItemType(content: GraphqlModuleItemContent | null | undefined): ModuleItemType | null;
|
|
@@ -146,57 +118,16 @@ export declare function normalizeCompletionRequirementType(type: string): Comple
|
|
|
146
118
|
export declare function normalizePageInfo(pageInfo: GraphqlPageInfo | null | undefined): PageInfo;
|
|
147
119
|
export interface ModuleStudentContext {
|
|
148
120
|
locked: boolean;
|
|
149
|
-
/** Raw `ModuleProgression.workflowState`: locked | unlocked | started | completed. */
|
|
150
121
|
workflowState: string | null;
|
|
151
122
|
completed: boolean;
|
|
152
123
|
started: boolean;
|
|
153
|
-
/** `Requirement.id` is the module *item* id — the same join `completionRequirements` uses. */
|
|
154
124
|
requirementsMetItemIds: ReadonlySet<string>;
|
|
125
|
+
incompleteRequirementItemIds: ReadonlySet<string>;
|
|
155
126
|
}
|
|
156
127
|
export declare function firstSubmission(content: GraphqlModuleItemContent | null | undefined): GraphqlSubmission | null;
|
|
157
|
-
/**
|
|
158
|
-
* `requirementsMet` is filtered against the requirements the module currently defines, as
|
|
159
|
-
* Canvas's own `filterRequirementsMet` does — a progression outliving its requirement would
|
|
160
|
-
* show a student 4 of 3. We match on id and type only, not Canvas's score bounds too: those
|
|
161
|
-
* are what a teacher edits in place, and an edit should not silently un-meet a requirement.
|
|
162
|
-
*/
|
|
163
128
|
export declare function buildStudentContext(progression: GraphqlModuleProgression | null | undefined, completionRequirements: readonly CompletionRequirement[]): ModuleStudentContext | undefined;
|
|
164
|
-
/**
|
|
165
|
-
* `excused` precedes the other submission rules as it does in Canvas — `Submission#missing?`
|
|
166
|
-
* and `#late?` both return false for an excused submission.
|
|
167
|
-
*
|
|
168
|
-
* `missing` ahead of `complete` is a **deliberate divergence**: Canvas's
|
|
169
|
-
* `ModuleItemStatusIcon` falls through to Complete on a met requirement, so a `must_view` met
|
|
170
|
-
* on a past-due assignment hides the missing work. That pill is flag-gated `context_modules_v2`.
|
|
171
|
-
*
|
|
172
|
-
* `complete` does not test gradability: Canvas stores `requirements_met` per ContentTag with
|
|
173
|
-
* no reference to content type.
|
|
174
|
-
*/
|
|
175
129
|
export declare function deriveModuleItemStatus(content: GraphqlModuleItemContent | null | undefined, itemId: string, student: ModuleStudentContext, submissionsIncluded?: boolean): ModuleItemStatus;
|
|
176
|
-
|
|
177
|
-
* Per-module rollup.
|
|
178
|
-
*
|
|
179
|
-
* `missing` is read from `submissionStatistics`, not from items, so the filter row
|
|
180
|
-
* works with nothing expanded.
|
|
181
|
-
*
|
|
182
|
-
* Excused items leave the `all_graded` population rather than counting as graded —
|
|
183
|
-
* an exempted item was never assessed, the same reading the item pill takes. A
|
|
184
|
-
* module whose every gradable item is excused therefore reports `all_submitted`.
|
|
185
|
-
*
|
|
186
|
-
* `all_graded` is reachable **only in inline mode**: Canvas has no module-level
|
|
187
|
-
* "everything is graded" signal, so it takes the items riding along in the same
|
|
188
|
-
* response. In `onDemand` mode a completed module reports `all_submitted` and stays
|
|
189
|
-
* there even once its items arrive all graded, because `progress` is derived once
|
|
190
|
-
* from the list response. Known limitation, left open rather than papered over.
|
|
191
|
-
*/
|
|
192
|
-
export declare function deriveModuleStatus(student: ModuleStudentContext, missingCount: number, requirementsMet: number, items: ModuleItem[] | undefined): ModuleStatus;
|
|
193
|
-
export declare function deriveModuleProgress(node: GraphqlModuleNode, completionRequirements: readonly CompletionRequirement[], student: ModuleStudentContext | undefined, items: ModuleItem[] | undefined): ModuleProgress | undefined;
|
|
194
|
-
/**
|
|
195
|
-
* `dueAt` prefers `submission.cachedDueDate`, the per-student override-applied date: `dueAt`
|
|
196
|
-
* exists on `Assignment` only, a `Quiz` has none, and a graded `Discussion` keeps its date on
|
|
197
|
-
* the backing assignment — but all three carry a submission. The `content.dueAt` fallback is
|
|
198
|
-
* for a teacher viewer, who gets the assignment's date and no submission.
|
|
199
|
-
*/
|
|
130
|
+
export declare function deriveModuleProgress(node: GraphqlModuleNode, completionRequirements: readonly CompletionRequirement[], student: ModuleStudentContext | undefined): ModuleProgress | undefined;
|
|
200
131
|
export declare function normalizeModuleItem(node: GraphqlModuleItemNode, moduleId: string, completionRequirementsByItemId: ReadonlyMap<string, CompletionRequirement>, options?: NormalizeOptions, student?: ModuleStudentContext): ModuleItem | null;
|
|
201
132
|
export declare function normalizeModule(node: GraphqlModuleNode, options?: NormalizeOptions): Module;
|
|
202
133
|
export declare function normalizeModulesPage(result: GetModulesResult | null | undefined, options?: NormalizeOptions): ModulesPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EAEX,QAAQ,EACT,MAAM,oBAAoB,CAAA;AAG3B,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM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AAgB,mBAAmB,CACjC,WAAW,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,EACxD,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,GACvD,oBAAoB,GAAG,SAAS,CA4BlC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,EACpD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,oBAAoB,EAC7B,mBAAmB,UAAO,GACzB,gBAAgB,CAwBlB;AAiBD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,iBAAiB,EACvB,sBAAsB,EAAE,SAAS,qBAAqB,EAAE,EACxD,OAAO,EAAE,oBAAoB,GAAG,SAAS,GACxC,cAAc,GAAG,SAAS,CAkB5B;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,MAAM,EAChB,8BAA8B,EAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAC1E,OAAO,GAAE,gBAAqB,EAC9B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,UAAU,GAAG,IAAI,CAgCnB;AAwCD,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAkC/F;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,GAAE,gBAAqB,GAC7B,WAAW,CAUb;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,EAC/C,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAUjB"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { DocumentNode } from 'graphql';
|
|
2
|
-
/**
|
|
3
|
-
* `includeItems` is an `@include` directive rather than a second document, so there is one
|
|
4
|
-
* operation name and one persisted-query hash.
|
|
5
|
-
*
|
|
6
|
-
* It skips per-item field resolution but **not** the `ModuleItemsVisibleLoader`:
|
|
7
|
-
* `moduleItemsTotalCount` and `completionRequirements` are selected unconditionally and
|
|
8
|
-
* `module_type.rb:137-141,166-169` resolves both through it regardless.
|
|
9
|
-
*/
|
|
10
2
|
export declare const GET_MODULES: DocumentNode;
|
|
11
|
-
/**
|
|
12
|
-
* `completionRequirements` and `progression` are re-read at module level because an item's
|
|
13
|
-
* requirement and status both depend on them — without that, an item fetched on demand would
|
|
14
|
-
* differ from the identical item fetched inline.
|
|
15
|
-
*/
|
|
16
3
|
export declare const GET_MODULE_ITEMS: DocumentNode;
|
|
17
4
|
export interface GetModulesVariables {
|
|
18
5
|
courseId: string;
|
|
@@ -20,17 +7,16 @@ export interface GetModulesVariables {
|
|
|
20
7
|
after?: string | null;
|
|
21
8
|
includeItems: boolean;
|
|
22
9
|
itemsFirst: number;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to select per-item submissions at all.
|
|
25
|
-
*
|
|
26
|
-
* False unless a `studentId` is known. Canvas's `submissionsConnection` is
|
|
27
|
-
* *not* self-scoping for a privileged viewer — see the fragment docstring — so
|
|
28
|
-
* the safe default is to ask for nothing.
|
|
29
|
-
*/
|
|
30
10
|
includeSubmissions: boolean;
|
|
31
|
-
/** The student whose submissions to select. Required whenever `includeSubmissions`. */
|
|
32
11
|
studentId?: string | null;
|
|
12
|
+
filter?: ModuleFilterInput | null;
|
|
33
13
|
}
|
|
14
|
+
/** The subset of Canvas's `ModuleFilterInput` this adapter compiles to. */
|
|
15
|
+
export interface ModuleFilterInput {
|
|
16
|
+
completionStatus?: ModuleCompletionStatus;
|
|
17
|
+
}
|
|
18
|
+
/** Canvas's `ModuleCompletionStatus`. `INCOMPLETE` includes locked, unlocked and started. */
|
|
19
|
+
export type ModuleCompletionStatus = 'COMPLETED' | 'INCOMPLETE' | 'IN_PROGRESS' | 'NOT_STARTED';
|
|
34
20
|
export interface GetModuleItemsVariables {
|
|
35
21
|
moduleId: string;
|
|
36
22
|
includeSubmissions: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/adapters/canvasGraphql/queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AA2F3C,eAAO,MAAM,WAAW,EAAE,YA6DzB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAiC9B,CAAA;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAClC;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;CAC1C;AAED,6FAA6F;AAC7F,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,CAAA;AAE/F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB"}
|
|
@@ -2,7 +2,6 @@ import { Module, ModuleItem } from '../types/domain';
|
|
|
2
2
|
import { ModulesDataAdapter } from './types';
|
|
3
3
|
export { INLINE_ITEM_LIMIT } from './limits';
|
|
4
4
|
export interface InMemoryFixture {
|
|
5
|
-
/** Checked, not just stored: without it one instance would serve every course id. */
|
|
6
5
|
courseId: string;
|
|
7
6
|
modules: Module[];
|
|
8
7
|
itemsByModuleId: Record<string, ModuleItem[]>;
|
|
@@ -10,26 +9,11 @@ export interface InMemoryFixture {
|
|
|
10
9
|
export interface InMemoryRequest {
|
|
11
10
|
operation: 'listModules' | 'listModuleItems';
|
|
12
11
|
courseId: string;
|
|
13
|
-
/** Only set for `listModuleItems`. */
|
|
14
12
|
moduleId?: string;
|
|
15
13
|
}
|
|
16
14
|
export interface InMemoryAdapterOptions {
|
|
17
|
-
/**
|
|
18
|
-
* Invoked once per served request. Test hook for asserting exact request
|
|
19
|
-
* counts, which is how the scaling behavior is locked in.
|
|
20
|
-
*
|
|
21
|
-
* Receives the operation name for the common case, and the full request for
|
|
22
|
-
* tests that care *which* course or module was asked for.
|
|
23
|
-
*/
|
|
24
15
|
onRequest?: (operation: 'listModules' | 'listModuleItems', request: InMemoryRequest) => void;
|
|
25
16
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Thrown when a caller asks this adapter for a course it was not built for.
|
|
28
|
-
*
|
|
29
|
-
* A real transport would return that other course's data, or 404. Silently
|
|
30
|
-
* serving the fixture regardless is the one behavior that could not happen in
|
|
31
|
-
* production, so it is the one behavior the test double must not have.
|
|
32
|
-
*/
|
|
33
17
|
export declare class InMemoryCourseMismatchError extends Error {
|
|
34
18
|
readonly expected: string;
|
|
35
19
|
readonly received: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inMemory.d.ts","sourceRoot":"","sources":["../../src/adapters/inMemory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAgC,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"inMemory.d.ts","sourceRoot":"","sources":["../../src/adapters/inMemory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAgC,MAAM,iBAAiB,CAAA;AAGvF,OAAO,KAAK,EAAwC,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,aAAa,GAAG,iBAAiB,CAAA;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,GAAG,iBAAiB,EAAE,OAAO,EAAE,eAAe,KAAK,IAAI,CAAA;CAC7F;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;gBAEb,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAS/C;AAmDD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,sBAA2B,GACnC,kBAAkB,CAsDpB"}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas REST *refuses* to inline a module over `Api::MAX_PER_PAGE` — the `items` key is
|
|
3
|
-
* simply absent and a client cannot opt out. Canvas GraphQL has no such rule; this package
|
|
4
|
-
* applies the same 100 as policy so both transports fall back at the same point.
|
|
5
|
-
*/
|
|
1
|
+
/** Canvas REST omits the `items` key for a module over `Api::MAX_PER_PAGE`. */
|
|
6
2
|
export declare const INLINE_ITEM_LIMIT = 100;
|
|
7
3
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Canvas's GraphQL complexity analyzer rejects anything over 375,000, and charges
|
|
11
|
-
* the **shape of the request, not the size of the result** — a 13-item course is
|
|
12
|
-
* refused as readily as a 13,000-item one. Measured against a real Canvas
|
|
13
|
-
* (`/api/graphql`, Aug 2026):
|
|
14
|
-
*
|
|
15
|
-
* 100 × 100 1,512,106 rejected 100 × 20 accepted
|
|
16
|
-
* 100 × 50 757,106 rejected 25 × 100 378,031 rejected, barely
|
|
17
|
-
* 100 × 25 379,606 rejected 10 × 100 accepted
|
|
18
|
-
*
|
|
19
|
-
* That is ~151 per requested item node, so 375,000/151 ≈ 2,483 is the real
|
|
20
|
-
* ceiling and this is the round number under it. A product rather than two caps
|
|
21
|
-
* because the analyzer multiplies: 100×20 and 10×100 fit, 25×100 does not.
|
|
22
|
-
*
|
|
23
|
-
* It lives here rather than in the GraphQL adapter so the transport-agnostic
|
|
24
|
-
* `hooks/` layer can default to it without importing `canvasGraphql` — which
|
|
25
|
-
* would drag `queries.ts` and its two module-scope `gql` parses into any bundle
|
|
26
|
-
* that only wanted the in-memory adapter.
|
|
4
|
+
* Canvas GraphQL refuses a request scoring over 375,000 on its complexity analyzer.
|
|
5
|
+
* Measured against `/api/graphql`: ~151 per requested item node, so 2,483 is the true ceiling.
|
|
27
6
|
*/
|
|
28
7
|
export declare const INLINE_QUERY_NODE_BUDGET = 2000;
|
|
29
8
|
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/adapters/limits.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/adapters/limits.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC;;;GAGG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAA"}
|
package/dist/adapters/types.d.ts
CHANGED
|
@@ -1,49 +1,29 @@
|
|
|
1
1
|
import { ModuleItemsPage, ModulesPage } from '../types/domain';
|
|
2
|
+
import { FilterCapabilities, FilterClause } from '../types/filterClause';
|
|
3
|
+
/**
|
|
4
|
+
* Five obligations an adapter must meet:
|
|
5
|
+
*
|
|
6
|
+
* 1. Return the transport's real `pageInfo`. GraphQL: `endCursor`. REST: the parsed `Link` header.
|
|
7
|
+
* 2. Never synthesize a cursor.
|
|
8
|
+
* 3. Abort on the supplied `AbortSignal`.
|
|
9
|
+
* 4. Normalize fully. No transport detail reaches a caller.
|
|
10
|
+
* 5. Honor `ListModulesArgs.filter`, or throw. Serving a clause `capabilities` does not declare
|
|
11
|
+
* issues a cursor against the wrong result set, so every page after it is wrong too.
|
|
12
|
+
*/
|
|
2
13
|
export interface ModulesDataAdapter {
|
|
3
14
|
listModules(args: ListModulesArgs): Promise<ModulesPage>;
|
|
4
15
|
listModuleItems(args: ListModuleItemsArgs): Promise<ModuleItemsPage>;
|
|
5
|
-
/**
|
|
6
|
-
* The largest `modules × itemsPerModule` product this transport accepts in one
|
|
7
|
-
* inline request, or `undefined` for "no limit of my own".
|
|
8
|
-
*
|
|
9
|
-
* Declared by the transport rather than assumed by the hooks, because the
|
|
10
|
-
* ceilings have different causes — GraphQL query complexity, REST response
|
|
11
|
-
* size, none at all for the in-memory double. `resolveItemsMode` falls back to
|
|
12
|
-
* the GraphQL budget when this is unset: guessing low costs one request per
|
|
13
|
-
* opened module, guessing high gets the query rejected outright.
|
|
14
|
-
*/
|
|
15
16
|
readonly inlineNodeBudget?: number;
|
|
17
|
+
readonly capabilities?: FilterCapabilities;
|
|
16
18
|
}
|
|
17
19
|
export interface ListModulesArgs {
|
|
18
20
|
courseId: string;
|
|
19
|
-
/** `null`/omitted requests the first page. */
|
|
20
21
|
cursor?: string | null;
|
|
21
22
|
pageSize: number;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
* A request, not a guarantee — @see INLINE_ITEM_LIMIT. An adapter must report an
|
|
26
|
-
* accurate `itemCount` either way, and leave `items` **undefined** for a module
|
|
27
|
-
* it did not inline, never `[]`.
|
|
28
|
-
*/
|
|
23
|
+
/** Only ever a clause `capabilities` admits. Throw on anything else. */
|
|
24
|
+
filter?: FilterClause;
|
|
29
25
|
includeItems: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* How many items to request per module when `includeItems` is true.
|
|
32
|
-
*
|
|
33
|
-
* Omit to let the adapter use its own ceiling. Supply it when the caller has
|
|
34
|
-
* *measured* what the page needs — `useModulesPageData` does, from the `auto`
|
|
35
|
-
* probe — because a transport may charge for what the query asks for rather
|
|
36
|
-
* than for what exists. @see INLINE_QUERY_NODE_BUDGET
|
|
37
|
-
*/
|
|
38
26
|
inlineItemsFirst?: number;
|
|
39
|
-
/**
|
|
40
|
-
* How many modules to request when inlining.
|
|
41
|
-
*
|
|
42
|
-
* Omit to use `pageSize`. Supply it when the caller has measured that page 1 is
|
|
43
|
-
* the whole list, because the complexity budget is charged on
|
|
44
|
-
* `first x inlineItemsFirst` — asking for 100 modules when the course has 2 is
|
|
45
|
-
* what forces `inlineItemsFirst` to be clamped below what the page needs.
|
|
46
|
-
*/
|
|
47
27
|
inlineFirst?: number;
|
|
48
28
|
signal?: AbortSignal;
|
|
49
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAE7E;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IACxD,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;IACpE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB"}
|
|
@@ -1,29 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { ModuleItemsKeyOptions, ModulesListKeyOptions } from './keys';
|
|
3
|
-
/**
|
|
4
|
-
* One module's items. Use after reordering, adding, or deleting items.
|
|
5
|
-
*
|
|
6
|
-
* Omit `opts` — the default — to hit every variant of that module's items, which
|
|
7
|
-
* is what a mutation wants: adding an item changes the module for the student
|
|
8
|
-
* view and the teacher view alike, at every page size any consumer rendered
|
|
9
|
-
* with. Pass `opts` only to target the exact query one hook instance holds.
|
|
10
|
-
*/
|
|
11
3
|
export declare function invalidateModuleItems(queryClient: QueryClient, courseId: string, moduleId: string, opts?: ModuleItemsKeyOptions): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* The module list for a course.
|
|
14
|
-
*
|
|
15
|
-
* Omit `opts` to hit every list variant (all page sizes, both views, inline and
|
|
16
|
-
* on-demand) — which is almost always what you want, since a mutation that adds
|
|
17
|
-
* or removes a module invalidates all of them. Pass `opts` only to target the
|
|
18
|
-
* exact query a specific hook instance is rendering.
|
|
19
|
-
*/
|
|
20
4
|
export declare function invalidateModuleList(queryClient: QueryClient, courseId: string, opts?: ModulesListKeyOptions): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Everything for a course: the list and every module's items.
|
|
23
|
-
*
|
|
24
|
-
* The blunt instrument. Reasonable after a bulk operation (publish all, import
|
|
25
|
-
* a course package); wasteful after a single-item edit, which should use
|
|
26
|
-
* `invalidateModuleItems`.
|
|
27
|
-
*/
|
|
28
5
|
export declare function invalidateCourse(queryClient: QueryClient, courseId: string): Promise<void>;
|
|
29
6
|
//# sourceMappingURL=invalidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invalidate.d.ts","sourceRoot":"","sources":["../../src/cache/invalidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"invalidate.d.ts","sourceRoot":"","sources":["../../src/cache/invalidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,QAAQ,CAAA;AAEf,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,qBAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,qBAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1F"}
|
package/dist/cache/keys.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { FilterClause } from '../types/filterClause';
|
|
2
2
|
export type ModulesView = 'student' | 'teacher';
|
|
3
3
|
export interface ModulesListKeyOptions {
|
|
4
4
|
view?: ModulesView;
|
|
5
5
|
pageSize?: number;
|
|
6
6
|
includeItems?: boolean;
|
|
7
|
+
/** The clause partitions, not the chip. Chips the server never saw share one entry. */
|
|
8
|
+
filter?: FilterClause;
|
|
7
9
|
}
|
|
8
|
-
/** `pageSize` partitions because two consumers at different sizes cannot share one `InfiniteData`. */
|
|
9
10
|
export interface ModuleItemsKeyOptions {
|
|
10
11
|
view?: ModulesView;
|
|
11
12
|
pageSize?: number;
|
|
@@ -28,18 +29,6 @@ export interface ModulesKeyFactory {
|
|
|
28
29
|
items(courseId: string, moduleId: string, opts?: ModuleItemsKeyOptions): ModuleItemsKey;
|
|
29
30
|
}
|
|
30
31
|
export declare const modulesKeys: ModulesKeyFactory;
|
|
31
|
-
/**
|
|
32
|
-
* The prefix shared by every list key for a course, regardless of `opts`.
|
|
33
|
-
* Used to invalidate "the module list" without knowing which page size or view
|
|
34
|
-
* the caller happened to render with.
|
|
35
|
-
*/
|
|
36
32
|
export declare function modulesListPrefix(courseId: string): readonly ['platform-modules', string, 'list'];
|
|
37
|
-
/**
|
|
38
|
-
* The prefix shared by every items key for one module, regardless of `opts`.
|
|
39
|
-
*
|
|
40
|
-
* This is the one to reach for when acting on "that module's items" without
|
|
41
|
-
* knowing which view or page size rendered them — invalidating after a mutation,
|
|
42
|
-
* or canceling in flight requests on collapse.
|
|
43
|
-
*/
|
|
44
33
|
export declare function moduleItemsPrefix(courseId: string, moduleId: string): readonly ['platform-modules', string, 'module', string, 'items'];
|
|
45
34
|
//# sourceMappingURL=keys.d.ts.map
|
package/dist/cache/keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/cache/keys.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/cache/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAA;AAE/C,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uFAAuF;IACvF,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;AACpE,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAA;AACjG,MAAM,MAAM,cAAc,GAAG,SAAS;IACpC,kBAAkB;IAClB,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,qBAAqB;CACtB,CAAA;AAID,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAA;IAC3B,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAA;IAC1C,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,cAAc,CAAA;IACpE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,cAAc,CAAA;CACxF;AAED,eAAO,MAAM,WAAW,EAAE,iBAOzB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC,kBAAkB,EAAE,MAAM,EAAE,MAAM,CAAC,CAEjG;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,SAAS,CAAC,kBAAkB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAElE"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ModulesFilterId } from './labels';
|
|
3
|
-
/**
|
|
4
|
-
* A toggle group, not tabs: the design draws independent Buttons with nothing tying the
|
|
5
|
-
* selection to a panel, so `role="group"` + `aria-pressed` (FOUND-355).
|
|
6
|
-
*
|
|
7
|
-
* Selected is `primary`, not the mock's tinted `secondary` — the mock's two fills sit 1.25:1
|
|
8
|
-
* apart where WCAG 1.4.11 wants 3:1, and its blues come from InstUI Button v2.
|
|
9
|
-
*/
|
|
10
2
|
export interface FilterChipsProps {
|
|
11
|
-
value:
|
|
12
|
-
onChange: (filter:
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (filter: string) => void;
|
|
5
|
+
describedBy?: string;
|
|
13
6
|
}
|
|
14
|
-
export declare function FilterChips({ value, onChange }: FilterChipsProps): ReactElement;
|
|
7
|
+
export declare function FilterChips({ value, onChange, describedBy }: FilterChipsProps): ReactElement;
|
|
15
8
|
//# sourceMappingURL=FilterChips.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../src/components/FilterChips.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../src/components/FilterChips.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAIzD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,gBAAgB,GAAG,YAAY,CA4C5F"}
|
|
@@ -7,23 +7,14 @@ export interface ModuleCardProps {
|
|
|
7
7
|
module: Module;
|
|
8
8
|
expanded: boolean;
|
|
9
9
|
onToggle: (moduleId: string) => void;
|
|
10
|
-
/** The hook's per-module item state. Only read when `expanded`. */
|
|
11
10
|
itemsState: ModuleItemsState;
|
|
12
11
|
today: Date;
|
|
13
|
-
/** Dev affordance, not host API. */
|
|
14
12
|
showDiagnostics?: boolean;
|
|
15
|
-
/** Stable reference required; see `ModuleItemNavigation`. */
|
|
16
13
|
navigation?: ModuleItemNavigation;
|
|
17
|
-
/** Defaults to `'h3'`, one below `ModulesList`'s default. */
|
|
18
14
|
headingLevel?: 'h2' | 'h3' | 'h4';
|
|
19
|
-
/** Omitted derives from `module.position`; `null` renders no badge. */
|
|
20
15
|
moduleLabel?: string | null;
|
|
21
16
|
breakpoints?: Breakpoints;
|
|
22
17
|
}
|
|
23
18
|
export declare const progressBarTheme: ComponentProps<typeof ProgressBar>['themeOverride'];
|
|
24
|
-
/**
|
|
25
|
-
* Only useful because `itemsState` and `onToggle` are referentially stable, so a card
|
|
26
|
-
* re-renders when *its own* module changes and not when a sibling's items arrive.
|
|
27
|
-
*/
|
|
28
19
|
export declare const ModuleCard: NamedExoticComponent<ModuleCardProps>;
|
|
29
20
|
//# sourceMappingURL=ModuleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleCard.d.ts","sourceRoot":"","sources":["../../src/components/ModuleCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModuleCard.d.ts","sourceRoot":"","sources":["../../src/components/ModuleCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAMzE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAI5D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAI1B,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAQ5D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,KAAK,EAAE,IAAI,CAAA;IACX,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AA8BD,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC,eAAe,CAQ/E,CAAA;AAsRF,eAAO,MAAM,UAAU,EAAE,oBAAoB,CAAC,eAAe,CAAwB,CAAA"}
|