@instructure/platform-institutional-tagging 8.1.1 → 8.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useAccountTagsScreen.d.ts.map +1 -1
- package/dist/hooks/useClampPage.d.ts +12 -0
- package/dist/hooks/useClampPage.d.ts.map +1 -0
- package/dist/hooks/useFetchTagUsers.d.ts.map +1 -1
- package/dist/hooks/useFetchTagsForCategory.d.ts.map +1 -1
- package/dist/hooks/usePagination.d.ts +6 -3
- package/dist/hooks/usePagination.d.ts.map +1 -1
- package/dist/index.js +2026 -2039
- package/dist/query/map.d.ts.map +1 -1
- package/dist/utils/base64url.d.ts +4 -0
- package/dist/utils/base64url.d.ts.map +1 -0
- package/dist/utils/cursor.d.ts +12 -0
- package/dist/utils/cursor.d.ts.map +1 -0
- package/dist/utils/relayId.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountTagsScreen.d.ts","sourceRoot":"","sources":["../../src/hooks/useAccountTagsScreen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAccountTagsScreen.d.ts","sourceRoot":"","sources":["../../src/hooks/useAccountTagsScreen.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD,eAAO,MAAM,oBAAoB;;;;;;WAyDb,KAAK,GAAG,IAAI;;;;;CAM/B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulls the current page back into range when the total shrinks under it — archive the last
|
|
3
|
+
* item on a page and the user is otherwise stranded on a page that no longer exists, with the
|
|
4
|
+
* pager unmounted and nothing left to click. An emptied list clamps to page 1, which always
|
|
5
|
+
* exists.
|
|
6
|
+
*
|
|
7
|
+
* `isTotalKnown` must be false until the response lands. The cursor is part of the query key
|
|
8
|
+
* and no caller keeps previous data, so `totalPages` reads 0 throughout every page fetch;
|
|
9
|
+
* clamping on that would drag the user back to page 1 on each forward navigation.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useClampPage: (currentPage: number, totalPages: number, isTotalKnown: boolean, onPageChange: (page: number) => void) => void;
|
|
12
|
+
//# sourceMappingURL=useClampPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClampPage.d.ts","sourceRoot":"","sources":["../../src/hooks/useClampPage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GACvB,aAAa,MAAM,EACnB,YAAY,MAAM,EAClB,cAAc,OAAO,EACrB,cAAc,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,SAUrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchTagUsers.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetchTagUsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,8BAA8B,EAC/B,MAAM,qCAAqC,CAAA;AAO5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAKzC,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,OAAO,8BAA8B,EACrC,aAAa,MAAM;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useFetchTagUsers.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetchTagUsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,8BAA8B,EAC/B,MAAM,qCAAqC,CAAA;AAO5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAKzC,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,OAAO,8BAA8B,EACrC,aAAa,MAAM;;;;;;;;;CAsDpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchTagsForCategory.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetchTagsForCategory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,6BAA6B,EAC9B,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"useFetchTagsForCategory.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetchTagsForCategory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,6BAA6B,EAC9B,MAAM,qCAAqC,CAAA;AAQ5C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAI5C,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,EAClB,gBAAgB,6BAA6B,EAC7C,cAAc,eAAe;;;;;;;CAsE9B,CAAA"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
interface UsePaginationOptions<T> {
|
|
3
2
|
items?: T[];
|
|
4
3
|
currentPage?: number;
|
|
5
4
|
totalPages?: number;
|
|
6
5
|
onPageChange?: (page: number) => void;
|
|
7
|
-
|
|
8
|
-
totalCount?: number | null;
|
|
6
|
+
mode?: 'cursor';
|
|
9
7
|
resetKey?: string;
|
|
10
8
|
}
|
|
11
9
|
interface UsePaginationResult<T> {
|
|
12
10
|
cursor: string | null;
|
|
13
11
|
currentPage: number;
|
|
12
|
+
/**
|
|
13
|
+
* Always 0 in cursor mode, which has no total of its own — the total arrives with the
|
|
14
|
+
* response, so those callers derive their own with `getTotalPages` and hand it to
|
|
15
|
+
* `useClampPage`.
|
|
16
|
+
*/
|
|
14
17
|
totalPages: number;
|
|
15
18
|
shownItems: T[];
|
|
16
19
|
handlePageChange: (page: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../src/hooks/usePagination.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../src/hooks/usePagination.ts"],"names":[],"mappings":"AAIA,UAAU,oBAAoB,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,CAAC,EAAE,CAAA;IAEX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAGrC,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,mBAAmB,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,CAAC,EAAE,CAAA;IACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAA;CACtD;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,SAAS,oBAAoB,CAAC,CAAC,CAAC,KAAG,mBAAmB,CAAC,CAAC,CA0DxF,CAAA"}
|