@workday/canvas-kit-react 9.0.0-alpha.411-next.13 → 9.0.0-alpha.412-next.14

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 (175) hide show
  1. package/collection/lib/useBaseListModel.tsx +24 -12
  2. package/collection/lib/useCursorListModel.tsx +102 -78
  3. package/dist/commonjs/action-bar/lib/ActionBar.d.ts +104 -0
  4. package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
  5. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +3 -0
  6. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  7. package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +3 -0
  8. package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
  9. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
  10. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
  11. package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +55 -0
  12. package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  13. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
  14. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
  15. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
  16. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
  17. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
  18. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
  19. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
  20. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
  21. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
  22. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
  23. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
  24. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
  25. package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
  26. package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
  27. package/dist/commonjs/collection/lib/ListBox.d.ts +39 -0
  28. package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
  29. package/dist/commonjs/collection/lib/useBaseListModel.d.ts +20 -10
  30. package/dist/commonjs/collection/lib/useBaseListModel.d.ts.map +1 -1
  31. package/dist/commonjs/collection/lib/useBaseListModel.js +21 -10
  32. package/dist/commonjs/collection/lib/useCursorListModel.d.ts +171 -10
  33. package/dist/commonjs/collection/lib/useCursorListModel.d.ts.map +1 -1
  34. package/dist/commonjs/collection/lib/useCursorListModel.js +97 -64
  35. package/dist/commonjs/collection/lib/useGridModel.d.ts +39 -0
  36. package/dist/commonjs/collection/lib/useGridModel.d.ts.map +1 -1
  37. package/dist/commonjs/collection/lib/useListItemRegister.d.ts +1 -0
  38. package/dist/commonjs/collection/lib/useListItemRegister.d.ts.map +1 -1
  39. package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts +1 -0
  40. package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
  41. package/dist/commonjs/collection/lib/useListItemSelect.d.ts +1 -0
  42. package/dist/commonjs/collection/lib/useListItemSelect.d.ts.map +1 -1
  43. package/dist/commonjs/collection/lib/useListModel.d.ts +39 -0
  44. package/dist/commonjs/collection/lib/useListModel.d.ts.map +1 -1
  45. package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
  46. package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
  47. package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
  48. package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
  49. package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts +1 -0
  50. package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
  51. package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +51 -0
  52. package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
  53. package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts +1 -0
  54. package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts.map +1 -1
  55. package/dist/commonjs/collection/lib/useSelectionListModel.d.ts +39 -0
  56. package/dist/commonjs/collection/lib/useSelectionListModel.d.ts.map +1 -1
  57. package/dist/commonjs/menu/lib/Menu.d.ts +48 -0
  58. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  59. package/dist/commonjs/menu/lib/MenuCard.d.ts +2 -0
  60. package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
  61. package/dist/commonjs/menu/lib/MenuContextTarget.d.ts +3 -0
  62. package/dist/commonjs/menu/lib/MenuContextTarget.d.ts.map +1 -1
  63. package/dist/commonjs/menu/lib/MenuItem.d.ts +2 -0
  64. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  65. package/dist/commonjs/menu/lib/MenuList.d.ts +2 -0
  66. package/dist/commonjs/menu/lib/MenuList.d.ts.map +1 -1
  67. package/dist/commonjs/menu/lib/MenuPopper.d.ts +1 -0
  68. package/dist/commonjs/menu/lib/MenuPopper.d.ts.map +1 -1
  69. package/dist/commonjs/menu/lib/MenuTarget.d.ts +5 -0
  70. package/dist/commonjs/menu/lib/MenuTarget.d.ts.map +1 -1
  71. package/dist/commonjs/menu/lib/useMenuModel.d.ts +45 -0
  72. package/dist/commonjs/menu/lib/useMenuModel.d.ts.map +1 -1
  73. package/dist/commonjs/tabs/lib/Tabs.d.ts +158 -7
  74. package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
  75. package/dist/commonjs/tabs/lib/TabsItem.d.ts +4 -0
  76. package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
  77. package/dist/commonjs/tabs/lib/TabsList.d.ts +4 -0
  78. package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
  79. package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts +1 -0
  80. package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
  81. package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts +4 -0
  82. package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
  83. package/dist/commonjs/tabs/lib/TabsPanel.d.ts +4 -0
  84. package/dist/commonjs/tabs/lib/TabsPanel.d.ts.map +1 -1
  85. package/dist/commonjs/tabs/lib/TabsPanels.d.ts +2 -0
  86. package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +1 -1
  87. package/dist/commonjs/tabs/lib/useTabsModel.d.ts +143 -12
  88. package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
  89. package/dist/es6/action-bar/lib/ActionBar.d.ts +104 -0
  90. package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
  91. package/dist/es6/action-bar/lib/ActionBarItem.d.ts +3 -0
  92. package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  93. package/dist/es6/action-bar/lib/ActionBarList.d.ts +3 -0
  94. package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
  95. package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
  96. package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
  97. package/dist/es6/action-bar/lib/useActionBarModel.d.ts +55 -0
  98. package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
  99. package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
  100. package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
  101. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
  102. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
  103. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
  104. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
  105. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
  106. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
  107. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
  108. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
  109. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
  110. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
  111. package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
  112. package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
  113. package/dist/es6/collection/lib/ListBox.d.ts +39 -0
  114. package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
  115. package/dist/es6/collection/lib/useBaseListModel.d.ts +20 -10
  116. package/dist/es6/collection/lib/useBaseListModel.d.ts.map +1 -1
  117. package/dist/es6/collection/lib/useBaseListModel.js +22 -11
  118. package/dist/es6/collection/lib/useCursorListModel.d.ts +171 -10
  119. package/dist/es6/collection/lib/useCursorListModel.d.ts.map +1 -1
  120. package/dist/es6/collection/lib/useCursorListModel.js +97 -64
  121. package/dist/es6/collection/lib/useGridModel.d.ts +39 -0
  122. package/dist/es6/collection/lib/useGridModel.d.ts.map +1 -1
  123. package/dist/es6/collection/lib/useListItemRegister.d.ts +1 -0
  124. package/dist/es6/collection/lib/useListItemRegister.d.ts.map +1 -1
  125. package/dist/es6/collection/lib/useListItemRovingFocus.d.ts +1 -0
  126. package/dist/es6/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
  127. package/dist/es6/collection/lib/useListItemSelect.d.ts +1 -0
  128. package/dist/es6/collection/lib/useListItemSelect.d.ts.map +1 -1
  129. package/dist/es6/collection/lib/useListModel.d.ts +39 -0
  130. package/dist/es6/collection/lib/useListModel.d.ts.map +1 -1
  131. package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
  132. package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
  133. package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
  134. package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
  135. package/dist/es6/collection/lib/useOverflowListMeasure.d.ts +1 -0
  136. package/dist/es6/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
  137. package/dist/es6/collection/lib/useOverflowListModel.d.ts +51 -0
  138. package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
  139. package/dist/es6/collection/lib/useOverflowListTarget.d.ts +1 -0
  140. package/dist/es6/collection/lib/useOverflowListTarget.d.ts.map +1 -1
  141. package/dist/es6/collection/lib/useSelectionListModel.d.ts +39 -0
  142. package/dist/es6/collection/lib/useSelectionListModel.d.ts.map +1 -1
  143. package/dist/es6/menu/lib/Menu.d.ts +48 -0
  144. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  145. package/dist/es6/menu/lib/MenuCard.d.ts +2 -0
  146. package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
  147. package/dist/es6/menu/lib/MenuContextTarget.d.ts +3 -0
  148. package/dist/es6/menu/lib/MenuContextTarget.d.ts.map +1 -1
  149. package/dist/es6/menu/lib/MenuItem.d.ts +2 -0
  150. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  151. package/dist/es6/menu/lib/MenuList.d.ts +2 -0
  152. package/dist/es6/menu/lib/MenuList.d.ts.map +1 -1
  153. package/dist/es6/menu/lib/MenuPopper.d.ts +1 -0
  154. package/dist/es6/menu/lib/MenuPopper.d.ts.map +1 -1
  155. package/dist/es6/menu/lib/MenuTarget.d.ts +5 -0
  156. package/dist/es6/menu/lib/MenuTarget.d.ts.map +1 -1
  157. package/dist/es6/menu/lib/useMenuModel.d.ts +45 -0
  158. package/dist/es6/menu/lib/useMenuModel.d.ts.map +1 -1
  159. package/dist/es6/tabs/lib/Tabs.d.ts +158 -7
  160. package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
  161. package/dist/es6/tabs/lib/TabsItem.d.ts +4 -0
  162. package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
  163. package/dist/es6/tabs/lib/TabsList.d.ts +4 -0
  164. package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
  165. package/dist/es6/tabs/lib/TabsMenuPopper.d.ts +1 -0
  166. package/dist/es6/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
  167. package/dist/es6/tabs/lib/TabsOverflowButton.d.ts +4 -0
  168. package/dist/es6/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
  169. package/dist/es6/tabs/lib/TabsPanel.d.ts +4 -0
  170. package/dist/es6/tabs/lib/TabsPanel.d.ts.map +1 -1
  171. package/dist/es6/tabs/lib/TabsPanels.d.ts +2 -0
  172. package/dist/es6/tabs/lib/TabsPanels.d.ts.map +1 -1
  173. package/dist/es6/tabs/lib/useTabsModel.d.ts +143 -12
  174. package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
  175. package/package.json +3 -3
@@ -22,74 +22,73 @@ export const createNavigationManager = (manager) => manager;
22
22
  /**
23
23
  * Get the first item in a list regardless of column count
24
24
  */
25
- export const getFirst = (_, { state }) => state.items[0];
25
+ export const getFirst = (_, { state }) => 0;
26
26
  /**
27
27
  * Get the last item in a list regardless of column count
28
28
  */
29
- export const getLast = (_, { state }) => state.items[state.items.length - 1];
29
+ export const getLast = (_, { state }) => state.items.length - 1;
30
30
  /**
31
31
  * Get the first item in a row. If column count is 0, it will return the results of `getFirst`
32
32
  */
33
- export const getFirstOfRow = (id, { state }) => {
33
+ export const getFirstOfRow = (index, { state }) => {
34
34
  if (state.columnCount) {
35
- const item = getItem(id, { state });
36
- const currentIndex = item.index;
37
- const offset = currentIndex % state.columnCount;
38
- return state.items[currentIndex - offset];
35
+ const offset = index % state.columnCount;
36
+ return index - offset;
39
37
  }
40
- return getFirst(id, { state });
38
+ return getFirst(index, { state });
41
39
  };
42
40
  /**
43
41
  * get the last item in a row - if column count is 0, it will return the results of `getLast`
44
42
  */
45
- export const getLastOfRow = (id, { state }) => {
43
+ export const getLastOfRow = (index, { state }) => {
46
44
  if (state.columnCount) {
47
- const item = getItem(id, { state });
48
- const currentIndex = item.index;
49
- const offset = (currentIndex % state.columnCount) - state.columnCount + 1;
50
- let nextIndex = currentIndex - offset;
45
+ const offset = (index % state.columnCount) - state.columnCount + 1;
46
+ let nextIndex = index - offset;
51
47
  if (nextIndex >= state.items.length) {
52
48
  nextIndex = state.items.length - 1;
53
49
  }
54
- return state.items[nextIndex];
50
+ return nextIndex;
55
51
  }
56
- return getLast(id, { state });
52
+ return getLast(index, { state });
57
53
  };
58
54
  /**
59
55
  * get the item in the previous page. This can be author defined. By default it will return the
60
56
  * first item for a list, and the first item in the same column for a grid.
61
57
  */
62
- export const getPreviousPage = (id, { state }) => {
58
+ export const getPreviousPage = (index, { state }) => {
63
59
  if (state.columnCount) {
64
- const item = getItem(id, { state });
65
- const currentIndex = item.index;
66
- return state.items[currentIndex % state.columnCount];
60
+ return index % state.columnCount;
67
61
  }
68
- return getFirst(id, { state });
62
+ return getFirst(index, { state });
69
63
  };
70
64
  /**
71
65
  * get the item in the next page. This can be author defined. By default, it will return the last
72
66
  * item for a list, and the last item in the same column for a grid.
73
67
  */
74
- export const getNextPage = (id, { state }) => {
68
+ export const getNextPage = (index, { state }) => {
75
69
  if (state.columnCount) {
76
- const item = getItem(id, { state });
77
- const currentIndex = item.index;
78
70
  const lastRowIndex = state.items.length - state.columnCount;
79
- return state.items[lastRowIndex + (currentIndex % state.columnCount)];
71
+ return lastRowIndex + (index % state.columnCount);
80
72
  }
81
- return getLast(id, { state });
73
+ return getLast(index, { state });
82
74
  };
83
75
  const getItem = (id, { state }) => {
84
- const item = id ? state.items.find(item => getId(item) === id) : getFirst(id, { state }); // no id, return first item
76
+ const item = id ? state.items.find(item => item.id === id) : state.items[0]; // no id, return first item
85
77
  assert(item, `Item not found: ${id}`);
86
78
  return item;
87
79
  };
88
- export const getWrappingOffsetItem = (offset) => (id, { state }, tries = state.items.length) => {
80
+ export const getWrappingOffsetItem = (offset) => (index, { state }, tries = state.items.length) => {
81
+ if (Number.isNaN(index)) {
82
+ // we have no valid index. If the offset is positive, we'll return the first item
83
+ if (offset === 1) {
84
+ return getFirst(index, { state });
85
+ }
86
+ if (offset === -1) {
87
+ return getLast(index, { state });
88
+ }
89
+ }
89
90
  const items = state.items;
90
- const item = getItem(id, { state });
91
- const currentIndex = item.index;
92
- let nextIndex = currentIndex + offset;
91
+ let nextIndex = index + offset;
93
92
  // calculate idealLength as in if the grid was a perfect rectangle
94
93
  const rows = Math.ceil(items.length / state.columnCount);
95
94
  const idealLength = rows * state.columnCount;
@@ -123,25 +122,23 @@ export const getWrappingOffsetItem = (offset) => (id, { state }, tries = state.i
123
122
  nextIndex = nextIndex - idealLength;
124
123
  }
125
124
  }
126
- if (state.nonInteractiveIds.includes(getId(items[nextIndex])) && tries > 0) {
125
+ if (state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
127
126
  // The next item is disabled, try again, but only if we haven't already tried everything.
128
127
  // Avoid an infinite loop with `tries`
129
- return getWrappingOffsetItem(offset)(getId(items[nextIndex]), { state }, tries - 1);
128
+ return getWrappingOffsetItem(offset)(nextIndex, { state }, tries - 1);
130
129
  }
131
- return items[nextIndex];
130
+ return nextIndex;
132
131
  };
133
- export const getOffsetItem = (offset) => (id, { state }, tries = state.items.length) => {
132
+ export const getOffsetItem = (offset) => (index, { state }, tries = state.items.length) => {
134
133
  const { items, columnCount } = state;
135
- const item = getItem(id, { state });
136
- const currentIndex = item.index;
137
- let nextIndex = currentIndex + offset;
134
+ let nextIndex = index + offset;
138
135
  if (Math.abs(offset) < columnCount) {
139
136
  // if we're here, the columnCount is non-zero and the absolute value of offset is less than the
140
137
  // column count. We don't want to wrap, so we'll bound within the row
141
- const currentIndexInRow = currentIndex % columnCount;
142
- const nextIndexInRow = nextIndex - currentIndex + currentIndexInRow;
138
+ const currentIndexInRow = index % columnCount;
139
+ const nextIndexInRow = nextIndex - index + currentIndexInRow;
143
140
  if (nextIndexInRow >= columnCount || nextIndexInRow < 0) {
144
- nextIndex = currentIndex;
141
+ nextIndex = index;
145
142
  }
146
143
  }
147
144
  else if (columnCount) {
@@ -149,11 +146,11 @@ export const getOffsetItem = (offset) => (id, { state }, tries = state.items.len
149
146
  // bound to row values
150
147
  const nextRow = Math.floor(nextIndex / columnCount);
151
148
  if (nextRow < 0 || nextRow >= columnCount) {
152
- nextIndex = currentIndex;
149
+ nextIndex = index;
153
150
  }
154
151
  // make sure we don't go out of bounds if the grid isn't a perfect rectangle
155
152
  if (nextIndex > items.length - 1) {
156
- nextIndex = currentIndex;
153
+ nextIndex = index;
157
154
  }
158
155
  }
159
156
  // make sure we're always in bounds
@@ -163,12 +160,12 @@ export const getOffsetItem = (offset) => (id, { state }, tries = state.items.len
163
160
  else if (nextIndex >= items.length) {
164
161
  nextIndex = items.length - 1;
165
162
  }
166
- if (state.nonInteractiveIds.includes(getId(items[nextIndex])) && tries > 0) {
163
+ if (state.nonInteractiveIds.includes(items[nextIndex].id) && tries > 0) {
167
164
  // The next item is disabled, try again, but only if we haven't already tried everything.
168
165
  // Avoid an infinite loop with `tries`
169
- return getOffsetItem(offset)(getId(items[nextIndex]), { state }, tries - 1);
166
+ return getOffsetItem(offset)(nextIndex, { state }, tries - 1);
170
167
  }
171
- return items[nextIndex];
168
+ return nextIndex;
172
169
  };
173
170
  /**
174
171
  * The default navigation manager of lists. This navigation manager will wrap around when the edge
@@ -180,9 +177,9 @@ export const wrappingNavigationManager = createNavigationManager({
180
177
  getLast,
181
178
  getItem,
182
179
  getNext: getWrappingOffsetItem(1),
183
- getNextRow: (id, { state }) => getWrappingOffsetItem(state.columnCount)(id, { state }),
180
+ getNextRow: (index, { state }) => getWrappingOffsetItem(state.columnCount)(index, { state }),
184
181
  getPrevious: getWrappingOffsetItem(-1),
185
- getPreviousRow: (id, { state }) => getWrappingOffsetItem(-state.columnCount)(id, { state }),
182
+ getPreviousRow: (index, { state }) => getWrappingOffsetItem(-state.columnCount)(index, { state }),
186
183
  getPreviousPage,
187
184
  getNextPage,
188
185
  getFirstOfRow,
@@ -197,9 +194,9 @@ export const navigationManager = createNavigationManager({
197
194
  getLast,
198
195
  getItem,
199
196
  getNext: getOffsetItem(1),
200
- getNextRow: (id, { state }) => getOffsetItem(state.columnCount)(id, { state }),
197
+ getNextRow: (index, { state }) => getOffsetItem(state.columnCount)(index, { state }),
201
198
  getPrevious: getOffsetItem(-1),
202
- getPreviousRow: (id, { state }) => getOffsetItem(-state.columnCount)(id, { state }),
199
+ getPreviousRow: (index, { state }) => getOffsetItem(-state.columnCount)(index, { state }),
203
200
  getPreviousPage,
204
201
  getNextPage,
205
202
  getFirstOfRow,
@@ -235,15 +232,35 @@ export const useCursorListModel = createModelHook({
235
232
  * well as left/right keys to give a more consistent experience to all users.
236
233
  */
237
234
  navigation: wrappingNavigationManager,
235
+ /**
236
+ * Controls how much a pageUp/pageDown navigation request will jump. If not provided, the size
237
+ * of the list and number of items rendered will determine this value.
238
+ */
239
+ pageSize: 0,
238
240
  },
239
241
  requiredConfig: useBaseListModel.requiredConfig,
242
+ contextOverride: useBaseListModel.Context,
240
243
  })(config => {
241
- var _a;
244
+ var _a, _b;
242
245
  const [cursorId, setCursorId] = React.useState(config.initialCursorId);
246
+ const pageSizeRef = React.useRef(config.pageSize);
243
247
  const columnCount = config.columnCount || 0;
244
248
  const list = useBaseListModel(config);
245
- const initialCurrentRef = React.useRef(config.initialCursorId || (((_a = config.items) === null || _a === void 0 ? void 0 : _a.length) ? getId(list.state.items[0]) : ''));
249
+ const initialCurrentRef = React.useRef(config.initialCursorId || (((_a = config.items) === null || _a === void 0 ? void 0 : _a.length) ? list.state.items[0].id : ''));
246
250
  const navigation = config.navigation;
251
+ const cursorIndexRef = React.useRef(-1);
252
+ const setCursor = (index) => {
253
+ var _a;
254
+ const id = ((_a = state.items[index]) === null || _a === void 0 ? void 0 : _a.id) || '';
255
+ setCursorId(id);
256
+ };
257
+ // Keep the cursorIndex up to date with the cursor ID
258
+ if (cursorId && ((_b = list.state.items[cursorIndexRef.current]) === null || _b === void 0 ? void 0 : _b.id) !== cursorId) {
259
+ cursorIndexRef.current = list.state.items.findIndex(item => item.id === cursorId);
260
+ }
261
+ else if (!cursorId) {
262
+ cursorIndexRef.current = -1;
263
+ }
247
264
  const state = {
248
265
  ...list.state,
249
266
  /** The id of the list item the cursor is pointing to */
@@ -254,6 +271,11 @@ export const useCursorListModel = createModelHook({
254
271
  * @private Use useGridModel instead to make a grid instead of a list
255
272
  */
256
273
  columnCount,
274
+ /**
275
+ * A React.Ref of the current page size. Either provided as config, or determined at runtime
276
+ * based on the size of the list container and the number of items fitting within the container.
277
+ */
278
+ pageSizeRef,
257
279
  };
258
280
  const events = {
259
281
  ...list.events,
@@ -271,7 +293,8 @@ export const useCursorListModel = createModelHook({
271
293
  },
272
294
  /** Directly sets the cursor to the list item by its identifier. */
273
295
  goTo(data) {
274
- setCursorId(data.id);
296
+ const index = state.items.findIndex(item => item.id === data.id);
297
+ setCursor(index);
275
298
  },
276
299
  /**
277
300
  * Set the cursor to the "next" item in the list. This event delegates to the `getNext` method of
@@ -280,14 +303,16 @@ export const useCursorListModel = createModelHook({
280
303
  * item in a row.
281
304
  */
282
305
  goToNext() {
283
- setCursorId(getId(navigation.getNext(state.cursorId, { state })));
306
+ const index = navigation.getNext(cursorIndexRef.current, { state });
307
+ setCursor(index);
284
308
  },
285
309
  /**
286
310
  * Set the cursor to the "previous" item in the list. If the beginning of the list is detected,
287
311
  * it will wrap to the last item
288
312
  */
289
313
  goToPrevious() {
290
- setCursorId(getId(navigation.getPrevious(state.cursorId, { state })));
314
+ const index = navigation.getPrevious(cursorIndexRef.current, { state });
315
+ setCursor(index);
291
316
  },
292
317
  /**
293
318
  * Previous item perpendicular to the orientation of a list, or the previous row in a grid. For
@@ -296,9 +321,10 @@ export const useCursorListModel = createModelHook({
296
321
  * this would be the previous row (current position - column count).
297
322
  */
298
323
  goToPreviousRow() {
299
- setCursorId(getId(navigation.getPreviousRow(state.cursorId, {
324
+ const index = navigation.getPreviousRow(cursorIndexRef.current, {
300
325
  state,
301
- })));
326
+ });
327
+ setCursor(index);
302
328
  },
303
329
  /**
304
330
  * Next item perpendicular to the orientation of a list, or the next row in a grid. For example,
@@ -307,29 +333,36 @@ export const useCursorListModel = createModelHook({
307
333
  * next row (current position + column count).
308
334
  */
309
335
  goToNextRow() {
310
- setCursorId(getId(navigation.getNextRow(state.cursorId, { state })));
336
+ const index = navigation.getNextRow(cursorIndexRef.current, { state });
337
+ setCursor(index);
311
338
  },
312
339
  /** Set the cursor to the first item in the list */
313
340
  goToFirst() {
314
- setCursorId(getId(navigation.getFirst(state.cursorId, { state })));
341
+ const index = navigation.getFirst(cursorIndexRef.current, { state });
342
+ setCursor(index);
315
343
  },
316
344
  /** Set the cursor to the last item in the list */
317
345
  goToLast() {
318
- setCursorId(getId(navigation.getLast(state.cursorId, { state })));
346
+ const index = navigation.getLast(cursorIndexRef.current, { state });
347
+ setCursor(index);
319
348
  },
320
349
  goToFirstOfRow() {
321
- setCursorId(getId(navigation.getFirstOfRow(state.cursorId, { state })));
350
+ const index = navigation.getFirstOfRow(cursorIndexRef.current, { state });
351
+ setCursor(index);
322
352
  },
323
353
  goToLastOfRow() {
324
- setCursorId(getId(navigation.getLastOfRow(state.cursorId, { state })));
354
+ const index = navigation.getLastOfRow(cursorIndexRef.current, { state });
355
+ setCursor(index);
325
356
  },
326
357
  goToNextPage() {
327
- setCursorId(getId(navigation.getNextPage(state.cursorId, { state })));
358
+ const index = navigation.getNextPage(cursorIndexRef.current, { state });
359
+ setCursor(index);
328
360
  },
329
361
  goToPreviousPage() {
330
- setCursorId(getId(navigation.getPreviousPage(state.cursorId, {
362
+ const index = navigation.getPreviousPage(cursorIndexRef.current, {
331
363
  state,
332
- })));
364
+ });
365
+ setCursor(index);
333
366
  },
334
367
  };
335
368
  return { ...list, state, events, navigation };
@@ -18,6 +18,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
18
18
  initialUnselectedIds: string[];
19
19
  selection: import("./useSelectionListModel").SelectionManager;
20
20
  initialCursorId: string;
21
+ pageSize: number;
21
22
  id: string;
22
23
  getId: (item: any) => string;
23
24
  getTextValue: (item: any) => string;
@@ -38,6 +39,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
38
39
  unselectedIds: string[];
39
40
  cursorId: string;
40
41
  columnCount: number;
42
+ pageSizeRef: import("react").MutableRefObject<number>;
41
43
  UNSTABLE_virtual: {
42
44
  virtualItems: import("./react-virtual").VirtualItem[];
43
45
  totalSize: number;
@@ -59,6 +61,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
59
61
  unselectedIds: string[];
60
62
  cursorId: string;
61
63
  columnCount: number;
64
+ pageSizeRef: import("react").MutableRefObject<number>;
62
65
  UNSTABLE_virtual: {
63
66
  virtualItems: import("./react-virtual").VirtualItem[];
64
67
  totalSize: number;
@@ -80,6 +83,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
80
83
  unselectedIds: string[];
81
84
  cursorId: string;
82
85
  columnCount: number;
86
+ pageSizeRef: import("react").MutableRefObject<number>;
83
87
  UNSTABLE_virtual: {
84
88
  virtualItems: import("./react-virtual").VirtualItem[];
85
89
  totalSize: number;
@@ -104,6 +108,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
104
108
  unselectedIds: string[];
105
109
  cursorId: string;
106
110
  columnCount: number;
111
+ pageSizeRef: import("react").MutableRefObject<number>;
107
112
  UNSTABLE_virtual: {
108
113
  virtualItems: import("./react-virtual").VirtualItem[];
109
114
  totalSize: number;
@@ -127,6 +132,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
127
132
  unselectedIds: string[];
128
133
  cursorId: string;
129
134
  columnCount: number;
135
+ pageSizeRef: import("react").MutableRefObject<number>;
130
136
  UNSTABLE_virtual: {
131
137
  virtualItems: import("./react-virtual").VirtualItem[];
132
138
  totalSize: number;
@@ -148,6 +154,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
148
154
  unselectedIds: string[];
149
155
  cursorId: string;
150
156
  columnCount: number;
157
+ pageSizeRef: import("react").MutableRefObject<number>;
151
158
  UNSTABLE_virtual: {
152
159
  virtualItems: import("./react-virtual").VirtualItem[];
153
160
  totalSize: number;
@@ -169,6 +176,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
169
176
  unselectedIds: string[];
170
177
  cursorId: string;
171
178
  columnCount: number;
179
+ pageSizeRef: import("react").MutableRefObject<number>;
172
180
  UNSTABLE_virtual: {
173
181
  virtualItems: import("./react-virtual").VirtualItem[];
174
182
  totalSize: number;
@@ -190,6 +198,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
190
198
  unselectedIds: string[];
191
199
  cursorId: string;
192
200
  columnCount: number;
201
+ pageSizeRef: import("react").MutableRefObject<number>;
193
202
  UNSTABLE_virtual: {
194
203
  virtualItems: import("./react-virtual").VirtualItem[];
195
204
  totalSize: number;
@@ -211,6 +220,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
211
220
  unselectedIds: string[];
212
221
  cursorId: string;
213
222
  columnCount: number;
223
+ pageSizeRef: import("react").MutableRefObject<number>;
214
224
  UNSTABLE_virtual: {
215
225
  virtualItems: import("./react-virtual").VirtualItem[];
216
226
  totalSize: number;
@@ -232,6 +242,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
232
242
  unselectedIds: string[];
233
243
  cursorId: string;
234
244
  columnCount: number;
245
+ pageSizeRef: import("react").MutableRefObject<number>;
235
246
  UNSTABLE_virtual: {
236
247
  virtualItems: import("./react-virtual").VirtualItem[];
237
248
  totalSize: number;
@@ -253,6 +264,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
253
264
  unselectedIds: string[];
254
265
  cursorId: string;
255
266
  columnCount: number;
267
+ pageSizeRef: import("react").MutableRefObject<number>;
256
268
  UNSTABLE_virtual: {
257
269
  virtualItems: import("./react-virtual").VirtualItem[];
258
270
  totalSize: number;
@@ -274,6 +286,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
274
286
  unselectedIds: string[];
275
287
  cursorId: string;
276
288
  columnCount: number;
289
+ pageSizeRef: import("react").MutableRefObject<number>;
277
290
  UNSTABLE_virtual: {
278
291
  virtualItems: import("./react-virtual").VirtualItem[];
279
292
  totalSize: number;
@@ -295,6 +308,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
295
308
  unselectedIds: string[];
296
309
  cursorId: string;
297
310
  columnCount: number;
311
+ pageSizeRef: import("react").MutableRefObject<number>;
298
312
  UNSTABLE_virtual: {
299
313
  virtualItems: import("./react-virtual").VirtualItem[];
300
314
  totalSize: number;
@@ -316,6 +330,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
316
330
  unselectedIds: string[];
317
331
  cursorId: string;
318
332
  columnCount: number;
333
+ pageSizeRef: import("react").MutableRefObject<number>;
319
334
  UNSTABLE_virtual: {
320
335
  virtualItems: import("./react-virtual").VirtualItem[];
321
336
  totalSize: number;
@@ -337,6 +352,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
337
352
  unselectedIds: string[];
338
353
  cursorId: string;
339
354
  columnCount: number;
355
+ pageSizeRef: import("react").MutableRefObject<number>;
340
356
  UNSTABLE_virtual: {
341
357
  virtualItems: import("./react-virtual").VirtualItem[];
342
358
  totalSize: number;
@@ -360,6 +376,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
360
376
  unselectedIds: string[];
361
377
  cursorId: string;
362
378
  columnCount: number;
379
+ pageSizeRef: import("react").MutableRefObject<number>;
363
380
  UNSTABLE_virtual: {
364
381
  virtualItems: import("./react-virtual").VirtualItem[];
365
382
  totalSize: number;
@@ -383,6 +400,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
383
400
  unselectedIds: string[];
384
401
  cursorId: string;
385
402
  columnCount: number;
403
+ pageSizeRef: import("react").MutableRefObject<number>;
386
404
  UNSTABLE_virtual: {
387
405
  virtualItems: import("./react-virtual").VirtualItem[];
388
406
  totalSize: number;
@@ -407,6 +425,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
407
425
  unselectedIds: string[];
408
426
  cursorId: string;
409
427
  columnCount: number;
428
+ pageSizeRef: import("react").MutableRefObject<number>;
410
429
  UNSTABLE_virtual: {
411
430
  virtualItems: import("./react-virtual").VirtualItem[];
412
431
  totalSize: number;
@@ -428,6 +447,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
428
447
  unselectedIds: string[];
429
448
  cursorId: string;
430
449
  columnCount: number;
450
+ pageSizeRef: import("react").MutableRefObject<number>;
431
451
  UNSTABLE_virtual: {
432
452
  virtualItems: import("./react-virtual").VirtualItem[];
433
453
  totalSize: number;
@@ -449,6 +469,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
449
469
  unselectedIds: string[];
450
470
  cursorId: string;
451
471
  columnCount: number;
472
+ pageSizeRef: import("react").MutableRefObject<number>;
452
473
  UNSTABLE_virtual: {
453
474
  virtualItems: import("./react-virtual").VirtualItem[];
454
475
  totalSize: number;
@@ -473,6 +494,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
473
494
  unselectedIds: string[];
474
495
  cursorId: string;
475
496
  columnCount: number;
497
+ pageSizeRef: import("react").MutableRefObject<number>;
476
498
  UNSTABLE_virtual: {
477
499
  virtualItems: import("./react-virtual").VirtualItem[];
478
500
  totalSize: number;
@@ -496,6 +518,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
496
518
  unselectedIds: string[];
497
519
  cursorId: string;
498
520
  columnCount: number;
521
+ pageSizeRef: import("react").MutableRefObject<number>;
499
522
  UNSTABLE_virtual: {
500
523
  virtualItems: import("./react-virtual").VirtualItem[];
501
524
  totalSize: number;
@@ -517,6 +540,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
517
540
  unselectedIds: string[];
518
541
  cursorId: string;
519
542
  columnCount: number;
543
+ pageSizeRef: import("react").MutableRefObject<number>;
520
544
  UNSTABLE_virtual: {
521
545
  virtualItems: import("./react-virtual").VirtualItem[];
522
546
  totalSize: number;
@@ -538,6 +562,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
538
562
  unselectedIds: string[];
539
563
  cursorId: string;
540
564
  columnCount: number;
565
+ pageSizeRef: import("react").MutableRefObject<number>;
541
566
  UNSTABLE_virtual: {
542
567
  virtualItems: import("./react-virtual").VirtualItem[];
543
568
  totalSize: number;
@@ -559,6 +584,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
559
584
  unselectedIds: string[];
560
585
  cursorId: string;
561
586
  columnCount: number;
587
+ pageSizeRef: import("react").MutableRefObject<number>;
562
588
  UNSTABLE_virtual: {
563
589
  virtualItems: import("./react-virtual").VirtualItem[];
564
590
  totalSize: number;
@@ -580,6 +606,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
580
606
  unselectedIds: string[];
581
607
  cursorId: string;
582
608
  columnCount: number;
609
+ pageSizeRef: import("react").MutableRefObject<number>;
583
610
  UNSTABLE_virtual: {
584
611
  virtualItems: import("./react-virtual").VirtualItem[];
585
612
  totalSize: number;
@@ -601,6 +628,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
601
628
  unselectedIds: string[];
602
629
  cursorId: string;
603
630
  columnCount: number;
631
+ pageSizeRef: import("react").MutableRefObject<number>;
604
632
  UNSTABLE_virtual: {
605
633
  virtualItems: import("./react-virtual").VirtualItem[];
606
634
  totalSize: number;
@@ -622,6 +650,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
622
650
  unselectedIds: string[];
623
651
  cursorId: string;
624
652
  columnCount: number;
653
+ pageSizeRef: import("react").MutableRefObject<number>;
625
654
  UNSTABLE_virtual: {
626
655
  virtualItems: import("./react-virtual").VirtualItem[];
627
656
  totalSize: number;
@@ -643,6 +672,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
643
672
  unselectedIds: string[];
644
673
  cursorId: string;
645
674
  columnCount: number;
675
+ pageSizeRef: import("react").MutableRefObject<number>;
646
676
  UNSTABLE_virtual: {
647
677
  virtualItems: import("./react-virtual").VirtualItem[];
648
678
  totalSize: number;
@@ -664,6 +694,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
664
694
  unselectedIds: string[];
665
695
  cursorId: string;
666
696
  columnCount: number;
697
+ pageSizeRef: import("react").MutableRefObject<number>;
667
698
  UNSTABLE_virtual: {
668
699
  virtualItems: import("./react-virtual").VirtualItem[];
669
700
  totalSize: number;
@@ -685,6 +716,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
685
716
  unselectedIds: string[];
686
717
  cursorId: string;
687
718
  columnCount: number;
719
+ pageSizeRef: import("react").MutableRefObject<number>;
688
720
  UNSTABLE_virtual: {
689
721
  virtualItems: import("./react-virtual").VirtualItem[];
690
722
  totalSize: number;
@@ -706,6 +738,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
706
738
  unselectedIds: string[];
707
739
  cursorId: string;
708
740
  columnCount: number;
741
+ pageSizeRef: import("react").MutableRefObject<number>;
709
742
  UNSTABLE_virtual: {
710
743
  virtualItems: import("./react-virtual").VirtualItem[];
711
744
  totalSize: number;
@@ -729,6 +762,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
729
762
  unselectedIds: string[];
730
763
  cursorId: string;
731
764
  columnCount: number;
765
+ pageSizeRef: import("react").MutableRefObject<number>;
732
766
  UNSTABLE_virtual: {
733
767
  virtualItems: import("./react-virtual").VirtualItem[];
734
768
  totalSize: number;
@@ -752,6 +786,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
752
786
  unselectedIds: string[];
753
787
  cursorId: string;
754
788
  columnCount: number;
789
+ pageSizeRef: import("react").MutableRefObject<number>;
755
790
  UNSTABLE_virtual: {
756
791
  virtualItems: import("./react-virtual").VirtualItem[];
757
792
  totalSize: number;
@@ -774,6 +809,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
774
809
  unselectedIds: string[];
775
810
  cursorId: string;
776
811
  columnCount: number;
812
+ pageSizeRef: import("react").MutableRefObject<number>;
777
813
  UNSTABLE_virtual: {
778
814
  virtualItems: import("./react-virtual").VirtualItem[];
779
815
  totalSize: number;
@@ -839,6 +875,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
839
875
  initialUnselectedIds: string[];
840
876
  selection: import("./useSelectionListModel").SelectionManager;
841
877
  initialCursorId: string;
878
+ pageSize: number;
842
879
  id: string;
843
880
  getId: (item: any) => string;
844
881
  getTextValue: (item: any) => string;
@@ -856,6 +893,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
856
893
  unselectedIds: string[];
857
894
  cursorId: string;
858
895
  columnCount: number;
896
+ pageSizeRef: import("react").MutableRefObject<number>;
859
897
  UNSTABLE_virtual: {
860
898
  virtualItems: import("./react-virtual").VirtualItem[];
861
899
  totalSize: number;
@@ -906,6 +944,7 @@ export declare const useGridModel: (<TT_Special_Generic>(config?: (Partial<{
906
944
  unselectedIds: string[];
907
945
  cursorId: string;
908
946
  columnCount: number;
947
+ pageSizeRef: import("react").MutableRefObject<number>;
909
948
  UNSTABLE_virtual: {
910
949
  virtualItems: import("./react-virtual").VirtualItem[];
911
950
  totalSize: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useGridModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useGridModel.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,YAAY;IAGrB;;;;;;;;;OASG;;;;;;;;;;;;;;IAIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAfH;;;;;;;;;OASG;;;;;;;;;;;;;;IAIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASL,CAAC"}
1
+ {"version":3,"file":"useGridModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useGridModel.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,YAAY;IAGrB;;;;;;;;;OASG;;;;;;;;;;;;;;;IAIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAfH;;;;;;;;;OASG;;;;;;;;;;;;;;;IAIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASL,CAAC"}
@@ -20,6 +20,7 @@ export declare const useListItemRegister: import("@workday/canvas-kit-react/comm
20
20
  unselectedIds: string[];
21
21
  cursorId: string;
22
22
  columnCount: number;
23
+ pageSizeRef: React.MutableRefObject<number>;
23
24
  UNSTABLE_virtual: {
24
25
  virtualItems: VirtualItem[];
25
26
  totalSize: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useListItemRegister.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRegister.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAS3C,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAG5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmE/B,CAAC"}
1
+ {"version":3,"file":"useListItemRegister.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRegister.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAS3C,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAG5C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmE/B,CAAC"}
@@ -17,6 +17,7 @@ export declare const useListItemRovingFocus: import("@workday/canvas-kit-react/c
17
17
  state: {
18
18
  cursorId: string;
19
19
  columnCount: number;
20
+ pageSizeRef: React.MutableRefObject<number>;
20
21
  UNSTABLE_virtual: {
21
22
  virtualItems: import("./react-virtual").VirtualItem[];
22
23
  totalSize: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useListItemRovingFocus.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRovingFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8BZ,mBAAmB;;;;;EAmBzC,CAAC"}
1
+ {"version":3,"file":"useListItemRovingFocus.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useListItemRovingFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8BZ,mBAAmB;;;;;EAmBzC,CAAC"}