@carbon/ibm-products 2.41.1-canary.17 → 2.41.1-canary.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -190,6 +190,8 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
190
190
  listRef?: MutableRefObject<any>;
191
191
  handleResize?: () => void;
192
192
  onVirtualScroll?: (evt?: boolean) => void;
193
+ fetchMoreData?: () => void;
194
+ loadMoreThreshold?: number;
193
195
  }
194
196
  export interface ResizeHeaderProps {
195
197
  resizerProps?: ResizerProps;
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useInfiniteScroll: (hooks: Hooks) => void;
1
9
  export default useInfiniteScroll;
2
- declare function useInfiniteScroll(hooks: any): void;
@@ -15,12 +15,13 @@ var useInfiniteScroll = function useInfiniteScroll(hooks) {
15
15
  useResizeTable(hooks);
16
16
  var useInstance = function useInstance(instance) {
17
17
  var _tableElement;
18
- var isFetching = instance.isFetching,
19
- tableHeight = instance.tableHeight,
20
- innerListRef = instance.innerListRef,
21
- fetchMoreData = instance.fetchMoreData,
22
- tableId = instance.tableId,
23
- loadMoreThreshold = instance.loadMoreThreshold;
18
+ var _ref = instance,
19
+ isFetching = _ref.isFetching,
20
+ tableHeight = _ref.tableHeight,
21
+ innerListRef = _ref.innerListRef,
22
+ fetchMoreData = _ref.fetchMoreData,
23
+ tableId = _ref.tableId,
24
+ loadMoreThreshold = _ref.loadMoreThreshold;
24
25
  var tableElement;
25
26
  if (typeof document !== 'undefined') {
26
27
  tableElement = document.querySelector("#".concat(tableId));
@@ -33,9 +34,9 @@ var useInfiniteScroll = function useInfiniteScroll(hooks) {
33
34
  leading: true,
34
35
  trailing: false
35
36
  }), [fetchMoreData]);
36
- var onScroll = function onScroll(_ref) {
37
- var scrollDirection = _ref.scrollDirection,
38
- scrollOffset = _ref.scrollOffset;
37
+ var onScroll = function onScroll(_ref2) {
38
+ var scrollDirection = _ref2.scrollDirection,
39
+ scrollOffset = _ref2.scrollOffset;
39
40
  if (innerListRef && innerListRef.current) {
40
41
  if (!isFetching && scrollDirection === 'forward' && scrollOffset + totalTableHeight >= innerListRef.current.clientHeight - loadMoreThresholdValue) {
41
42
  if (fetchMoreData) {
@@ -190,6 +190,8 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
190
190
  listRef?: MutableRefObject<any>;
191
191
  handleResize?: () => void;
192
192
  onVirtualScroll?: (evt?: boolean) => void;
193
+ fetchMoreData?: () => void;
194
+ loadMoreThreshold?: number;
193
195
  }
194
196
  export interface ResizeHeaderProps {
195
197
  resizerProps?: ResizerProps;
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useInfiniteScroll: (hooks: Hooks) => void;
1
9
  export default useInfiniteScroll;
2
- declare function useInfiniteScroll(hooks: any): void;
@@ -23,12 +23,13 @@ var useInfiniteScroll = function useInfiniteScroll(hooks) {
23
23
  useResizeTable["default"](hooks);
24
24
  var useInstance = function useInstance(instance) {
25
25
  var _tableElement;
26
- var isFetching = instance.isFetching,
27
- tableHeight = instance.tableHeight,
28
- innerListRef = instance.innerListRef,
29
- fetchMoreData = instance.fetchMoreData,
30
- tableId = instance.tableId,
31
- loadMoreThreshold = instance.loadMoreThreshold;
26
+ var _ref = instance,
27
+ isFetching = _ref.isFetching,
28
+ tableHeight = _ref.tableHeight,
29
+ innerListRef = _ref.innerListRef,
30
+ fetchMoreData = _ref.fetchMoreData,
31
+ tableId = _ref.tableId,
32
+ loadMoreThreshold = _ref.loadMoreThreshold;
32
33
  var tableElement;
33
34
  if (typeof document !== 'undefined') {
34
35
  tableElement = document.querySelector("#".concat(tableId));
@@ -41,9 +42,9 @@ var useInfiniteScroll = function useInfiniteScroll(hooks) {
41
42
  leading: true,
42
43
  trailing: false
43
44
  }), [fetchMoreData]);
44
- var onScroll = function onScroll(_ref) {
45
- var scrollDirection = _ref.scrollDirection,
46
- scrollOffset = _ref.scrollOffset;
45
+ var onScroll = function onScroll(_ref2) {
46
+ var scrollDirection = _ref2.scrollDirection,
47
+ scrollOffset = _ref2.scrollOffset;
47
48
  if (innerListRef && innerListRef.current) {
48
49
  if (!isFetching && scrollDirection === 'forward' && scrollOffset + totalTableHeight >= innerListRef.current.clientHeight - loadMoreThresholdValue) {
49
50
  if (fetchMoreData) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "2.41.1-canary.17+d9bc09b97",
4
+ "version": "2.41.1-canary.19+1dec58492",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -121,5 +121,5 @@
121
121
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
122
122
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
123
123
  },
124
- "gitHead": "d9bc09b974c0c2183b00c2584dda25bf3ec224fe"
124
+ "gitHead": "1dec5849277e8f116410de4d23ed0770d57ce2ca"
125
125
  }
package/telemetry.yml CHANGED
@@ -15,6 +15,8 @@ collect:
15
15
  - activeCellCoordinates
16
16
  - activeHref
17
17
  - align
18
+ - allPageRowsLabel
19
+ - allRowsLabel
18
20
  - allTagsModalSearchLabel
19
21
  - allTagsModalSearchPlaceholderText
20
22
  - allTagsModalSearchThreshold
@@ -31,6 +33,8 @@ collect:
31
33
  - assistiveTextInstructionsLabel
32
34
  - backButtonText
33
35
  - backgroundColor
36
+ - batchActionMenuButtonLabel
37
+ - batchActions
34
38
  - body
35
39
  - breadcrumbs
36
40
  - button
@@ -54,23 +58,36 @@ collect:
54
58
  - count
55
59
  - currentMatcher
56
60
  - currentStep
61
+ - CustomizeColumnsTearsheet
57
62
  - customizeTearsheetHeadingLabel
58
63
  - data
64
+ - DatagridActions
65
+ - DatagridBatchActions
66
+ - DatagridPagination
59
67
  - datagridState
60
68
  - defaultColumn
61
69
  - defaultEmptyRowCount
62
70
  - description
63
71
  - disabled
72
+ - disabledCell
64
73
  - disableSubmit
65
74
  - displayMetalPanel
66
75
  - draggableClass
67
76
  - element
77
+ - emptyStateAction
78
+ - emptyStateDescription
79
+ - emptyStateLink
80
+ - emptyStateSize
81
+ - emptyStateTitle
82
+ - emptyStateType
68
83
  - error
69
84
  - errorCodeLabel
70
85
  - errorMessage
71
86
  - expandButtonLabel
87
+ - fetchMoreData
72
88
  - fieldsetLegendText
73
89
  - filterByLabel
90
+ - filterProps
74
91
  - filters
75
92
  - filterString
76
93
  - findColumnPlaceholderLabel
@@ -78,7 +95,9 @@ collect:
78
95
  - footerActionIcon
79
96
  - formDescription
80
97
  - formTitle
98
+ - fullHeightDatagrid
81
99
  - getConditionState
100
+ - getFilterFlyoutProps
82
101
  - getOptions
83
102
  - globalFilters
84
103
  - globalFiltersIconDescription
@@ -90,13 +109,21 @@ collect:
90
109
  - globalSearchPlaceholder
91
110
  - globalSortBy
92
111
  - grid
112
+ - gridDescription
93
113
  - gridGap
114
+ - gridRef
115
+ - gridTitle
94
116
  - group
117
+ - handleResize
95
118
  - hasActions
96
119
  - hasCloseIcon
97
120
  - hasFieldset
98
121
  - headerGroups
122
+ - HeaderRow
123
+ - headers
124
+ - headRef
99
125
  - hideIcon
126
+ - hideSelectAll
100
127
  - href
101
128
  - icon
102
129
  - iconDescription
@@ -116,6 +143,7 @@ collect:
116
143
  - influencerWidth
117
144
  - initialState
118
145
  - initialStep
146
+ - innerListRef
119
147
  - inputConfig
120
148
  - inputLabel
121
149
  - inputPlaceholder
@@ -126,9 +154,11 @@ collect:
126
154
  - invalidText
127
155
  - isFetching
128
156
  - isOpen
157
+ - isTableSortable
129
158
  - item
130
159
  - items
131
160
  - itemsLabel
161
+ - key
132
162
  - kind
133
163
  - label
134
164
  - labelText
@@ -136,7 +166,9 @@ collect:
136
166
  - legendText
137
167
  - link
138
168
  - links
169
+ - listRef
139
170
  - loading
171
+ - loadMoreThreshold
140
172
  - maxVisible
141
173
  - measurementOffset
142
174
  - media
@@ -160,6 +192,7 @@ collect:
160
192
  - noSelectionTitle
161
193
  - noTrailingSlash
162
194
  - onActiveCellChange
195
+ - onAllRowSelect
163
196
  - onApply
164
197
  - onCancel
165
198
  - onChange
@@ -168,6 +201,7 @@ collect:
168
201
  - onClickValue
169
202
  - onClose
170
203
  - onCloseButtonText
204
+ - onColResizeEnd
171
205
  - onContextMenu
172
206
  - onContextMenuLabel
173
207
  - onContextMenuValue
@@ -181,12 +215,14 @@ collect:
181
215
  - onRequestSubmit
182
216
  - onScroll
183
217
  - onSecondaryButtonClick
218
+ - onSelectAllRows
184
219
  - onSelectColumn
185
220
  - onSelectionAreaChange
186
221
  - onShowAllClick
187
222
  - onSubmit
188
223
  - onSubmitButtonText
189
224
  - onToggle
225
+ - onVirtualScroll
190
226
  - onWidthChange
191
227
  - open
192
228
  - originalColumnDefinitions
@@ -214,11 +250,15 @@ collect:
214
250
  - primaryButtonPlacement
215
251
  - primaryButtonText
216
252
  - productive
253
+ - radio
217
254
  - reactTableFiltersState
218
255
  - renderIcon
219
256
  - resetToDefaultLabel
257
+ - resizerAriaLabel
220
258
  - rightAlign
259
+ - row
221
260
  - rows
261
+ - rowSize
222
262
  - score
223
263
  - scoreThresholds
224
264
  - scrollBarSize
@@ -233,6 +273,7 @@ collect:
233
273
  - secondaryLabel
234
274
  - selectAllAriaLabel
235
275
  - selectAllLabel
276
+ - selectAllToggle
236
277
  - selected
237
278
  - selectedOption
238
279
  - selectionAreas
@@ -244,9 +285,11 @@ collect:
244
285
  - setColumnsObject
245
286
  - setCurrentMatcher
246
287
  - setDisplayMetaPanel
288
+ - setGlobalFilter
247
289
  - setHeaderCellHoldActive
248
290
  - setIsTearsheetOpen
249
291
  - setLabelTitle
292
+ - setMouseOverRowIndex
250
293
  - setMultiSelection
251
294
  - setPopoverOpen
252
295
  - setSelectionAreaData
@@ -261,33 +304,47 @@ collect:
261
304
  - small
262
305
  - sortByLabel
263
306
  - startConditionLabel
307
+ - state
264
308
  - status
265
309
  - style
266
310
  - submitButtonText
267
311
  - subtitle
268
312
  - tabIndex
313
+ - tableHeight
269
314
  - tableId
270
315
  - tagline
271
316
  - tags
272
317
  - theme
273
318
  - title
274
319
  - titleSize
320
+ - toolbarBatchActions
275
321
  - tooltipAlignment
276
322
  - tooltipText
277
323
  - totalVisibleColumns
324
+ - translateWithIdBatchActions
278
325
  - truncate
279
326
  - truncateValue
280
327
  - type
281
328
  - updateMethod
329
+ - useDenseHeader
282
330
  - useDragOverlay
283
331
  - value
284
332
  - valueTitle
333
+ - variableRowHeight
285
334
  - variant
335
+ - verticalAlign
286
336
  - verticalPosition
287
337
  - viewAllLabel
288
338
  - viewLessLabel
339
+ - virtualHeight
289
340
  - visibleColumns
341
+ - withExpandedRows
342
+ - withInlineEdit
290
343
  - withLeftGutter
344
+ - withMouseHover
345
+ - withNestedRows
346
+ - withStickyColumn
347
+ - withVirtualScroll
291
348
  - wrapperStyle
292
349
  # AboutModal
293
350
  - additionalInfo
@@ -538,6 +595,8 @@ collect:
538
595
  - successful
539
596
  - successMessage
540
597
  - validExtensions
598
+ # FeatureFlags
599
+ - flags
541
600
  # FilterFlyout
542
601
  - flyoutIconDescription
543
602
  - onFlyoutClose
@@ -560,8 +619,6 @@ collect:
560
619
  - overflowMenuProps
561
620
  # FilterPanelSearch
562
621
  - searchProps
563
- # FilterProvider
564
- - filterProps
565
622
  # FilterSummary
566
623
  - clearButtonInline
567
624
  - clearFilters
@@ -736,13 +793,9 @@ collect:
736
793
  - titleText
737
794
  - translateWithId
738
795
  # SelectAllWithToggle
739
- - allPageRowsLabel
740
- - allRowsLabel
741
796
  - getToggleAllPageRowsSelectedProps
742
797
  - getToggleAllRowsSelectedProps
743
798
  - isAllRowsSelected
744
- - selectAllToggle
745
- - withStickyColumn
746
799
  # SidePanel
747
800
  - actionToolbarButtons
748
801
  - animateTitle
@@ -854,6 +907,9 @@ collect:
854
907
  - one
855
908
  - three
856
909
  - two
910
+ # General - emptyStateSize
911
+ - lg
912
+ - sm
857
913
  # General - illustrationPosition
858
914
  - bottom
859
915
  - left
@@ -931,6 +987,11 @@ collect:
931
987
  # General - primaryButtonPlacement
932
988
  - bottom
933
989
  - top
990
+ # General - rowSize
991
+ - lg
992
+ - md
993
+ - sm
994
+ - xs
934
995
  # General - secondaryButtonKind
935
996
  - ghost
936
997
  - secondary