@wordpress/dataviews 1.1.0 → 2.0.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/CHANGELOG.md +27 -5
- package/README.md +33 -30
- package/build/add-filter.js +30 -22
- package/build/add-filter.js.map +1 -1
- package/build/bulk-actions-toolbar.js +187 -0
- package/build/bulk-actions-toolbar.js.map +1 -0
- package/build/bulk-actions.js +75 -62
- package/build/bulk-actions.js.map +1 -1
- package/build/constants.js +17 -10
- package/build/constants.js.map +1 -1
- package/build/dataviews.js +64 -50
- package/build/dataviews.js.map +1 -1
- package/build/filter-and-sort-data-view.js +2 -2
- package/build/filter-and-sort-data-view.js.map +1 -1
- package/build/filter-summary.js +106 -96
- package/build/filter-summary.js.map +1 -1
- package/build/filters.js +18 -17
- package/build/filters.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/item-actions.js +101 -69
- package/build/item-actions.js.map +1 -1
- package/build/layouts.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/normalize-fields.js.map +1 -1
- package/build/pagination.js +66 -57
- package/build/pagination.js.map +1 -1
- package/build/reset-filters.js +9 -4
- package/build/reset-filters.js.map +1 -1
- package/build/search-widget.js +108 -89
- package/build/search-widget.js.map +1 -1
- package/build/search.js +13 -6
- package/build/search.js.map +1 -1
- package/build/single-selection-checkbox.js +6 -2
- package/build/single-selection-checkbox.js.map +1 -1
- package/build/types.js.map +1 -1
- package/build/utils.js +3 -15
- package/build/utils.js.map +1 -1
- package/build/view-actions.js +168 -120
- package/build/view-actions.js.map +1 -1
- package/build/view-grid.js +119 -106
- package/build/view-grid.js.map +1 -1
- package/build/view-list.js +217 -83
- package/build/view-list.js.map +1 -1
- package/build/view-table.js +227 -199
- package/build/view-table.js.map +1 -1
- package/build-module/add-filter.js +30 -22
- package/build-module/add-filter.js.map +1 -1
- package/build-module/bulk-actions-toolbar.js +182 -0
- package/build-module/bulk-actions-toolbar.js.map +1 -0
- package/build-module/bulk-actions.js +77 -62
- package/build-module/bulk-actions.js.map +1 -1
- package/build-module/constants.js +16 -9
- package/build-module/constants.js.map +1 -1
- package/build-module/dataviews.js +65 -50
- package/build-module/dataviews.js.map +1 -1
- package/build-module/filter-and-sort-data-view.js +2 -2
- package/build-module/filter-and-sort-data-view.js.map +1 -1
- package/build-module/filter-summary.js +107 -97
- package/build-module/filter-summary.js.map +1 -1
- package/build-module/filters.js +18 -17
- package/build-module/filters.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/item-actions.js +102 -71
- package/build-module/item-actions.js.map +1 -1
- package/build-module/layouts.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/normalize-fields.js.map +1 -1
- package/build-module/pagination.js +67 -57
- package/build-module/pagination.js.map +1 -1
- package/build-module/reset-filters.js +9 -4
- package/build-module/reset-filters.js.map +1 -1
- package/build-module/search-widget.js +109 -89
- package/build-module/search-widget.js.map +1 -1
- package/build-module/search.js +13 -6
- package/build-module/search.js.map +1 -1
- package/build-module/single-selection-checkbox.js +6 -2
- package/build-module/single-selection-checkbox.js.map +1 -1
- package/build-module/types.js.map +1 -1
- package/build-module/utils.js +2 -13
- package/build-module/utils.js.map +1 -1
- package/build-module/view-actions.js +170 -121
- package/build-module/view-actions.js.map +1 -1
- package/build-module/view-grid.js +121 -106
- package/build-module/view-grid.js.map +1 -1
- package/build-module/view-list.js +219 -85
- package/build-module/view-list.js.map +1 -1
- package/build-module/view-table.js +230 -201
- package/build-module/view-table.js.map +1 -1
- package/build-style/style-rtl.css +168 -44
- package/build-style/style.css +168 -44
- package/build-types/add-filter.d.ts +11 -0
- package/build-types/add-filter.d.ts.map +1 -0
- package/build-types/bulk-actions-toolbar.d.ts +12 -0
- package/build-types/bulk-actions-toolbar.d.ts.map +1 -0
- package/build-types/bulk-actions.d.ts +14 -0
- package/build-types/bulk-actions.d.ts.map +1 -0
- package/build-types/constants.d.ts +19 -32
- package/build-types/constants.d.ts.map +1 -1
- package/build-types/dataviews.d.ts +22 -0
- package/build-types/dataviews.d.ts.map +1 -0
- package/build-types/filter-and-sort-data-view.d.ts +3 -3
- package/build-types/filter-and-sort-data-view.d.ts.map +1 -1
- package/build-types/filter-summary.d.ts +14 -0
- package/build-types/filter-summary.d.ts.map +1 -0
- package/build-types/filters.d.ts +13 -0
- package/build-types/filters.d.ts.map +1 -0
- package/build-types/index.d.ts +4 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/item-actions.d.ts +35 -0
- package/build-types/item-actions.d.ts.map +1 -0
- package/build-types/layouts.d.ts +24 -0
- package/build-types/layouts.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/normalize-fields.d.ts +2 -2
- package/build-types/normalize-fields.d.ts.map +1 -1
- package/build-types/pagination.d.ts +16 -0
- package/build-types/pagination.d.ts.map +1 -0
- package/build-types/reset-filters.d.ts +13 -0
- package/build-types/reset-filters.d.ts.map +1 -0
- package/build-types/search-widget.d.ts +10 -0
- package/build-types/search-widget.d.ts.map +1 -0
- package/build-types/search.d.ts +13 -0
- package/build-types/search.d.ts.map +1 -0
- package/build-types/single-selection-checkbox.d.ts +17 -0
- package/build-types/single-selection-checkbox.d.ts.map +1 -0
- package/build-types/stories/fixtures.d.ts +114 -0
- package/build-types/stories/fixtures.d.ts.map +1 -0
- package/build-types/stories/index.story.d.ts +15 -0
- package/build-types/stories/index.story.d.ts.map +1 -0
- package/build-types/types.d.ts +221 -21
- package/build-types/types.d.ts.map +1 -1
- package/build-types/utils.d.ts +3 -0
- package/build-types/utils.d.ts.map +1 -0
- package/build-types/view-actions.d.ts +12 -0
- package/build-types/view-actions.d.ts.map +1 -0
- package/build-types/view-grid.d.ts +4 -0
- package/build-types/view-grid.d.ts.map +1 -0
- package/build-types/view-list.d.ts +4 -0
- package/build-types/view-list.d.ts.map +1 -0
- package/build-types/view-table.d.ts +5 -0
- package/build-types/view-table.d.ts.map +1 -0
- package/package.json +12 -13
- package/src/{add-filter.js → add-filter.tsx} +17 -1
- package/src/bulk-actions-toolbar.tsx +272 -0
- package/src/{bulk-actions.js → bulk-actions.tsx} +77 -17
- package/src/constants.ts +12 -5
- package/src/{dataviews.js → dataviews.tsx} +54 -14
- package/src/filter-and-sort-data-view.ts +13 -8
- package/src/{filter-summary.js → filter-summary.tsx} +38 -9
- package/src/{filters.js → filters.tsx} +18 -6
- package/src/{item-actions.js → item-actions.tsx} +119 -30
- package/src/normalize-fields.ts +4 -2
- package/src/{pagination.js → pagination.tsx} +29 -8
- package/src/{reset-filters.js → reset-filters.tsx} +17 -2
- package/src/{search-widget.js → search-widget.tsx} +27 -7
- package/src/{search.js → search.tsx} +22 -5
- package/src/{single-selection-checkbox.js → single-selection-checkbox.tsx} +17 -2
- package/src/style.scss +166 -43
- package/src/types.ts +286 -21
- package/src/{utils.js → utils.ts} +5 -13
- package/src/{view-actions.js → view-actions.tsx} +105 -49
- package/src/{view-grid.js → view-grid.tsx} +31 -18
- package/src/view-list.tsx +410 -0
- package/src/{view-table.js → view-table.tsx} +99 -40
- package/tsconfig.json +3 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/dropdown-menu-helper.js +0 -71
- package/build/dropdown-menu-helper.js.map +0 -1
- package/build-module/dropdown-menu-helper.js +0 -64
- package/build-module/dropdown-menu-helper.js.map +0 -1
- package/src/dropdown-menu-helper.js +0 -61
- package/src/view-list.js +0 -207
- /package/src/{index.js → index.ts} +0 -0
- /package/src/{layouts.js → layouts.ts} +0 -0
- /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import type { ReactNode, Ref, PropsWithoutRef, RefAttributes } from 'react';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -33,11 +34,24 @@ import SingleSelectionCheckbox from './single-selection-checkbox';
|
|
|
33
34
|
import { unlock } from './lock-unlock';
|
|
34
35
|
import ItemActions from './item-actions';
|
|
35
36
|
import { sanitizeOperators } from './utils';
|
|
36
|
-
import {
|
|
37
|
+
import {
|
|
38
|
+
SORTING_DIRECTIONS,
|
|
39
|
+
sortArrows,
|
|
40
|
+
sortLabels,
|
|
41
|
+
sortValues,
|
|
42
|
+
} from './constants';
|
|
37
43
|
import {
|
|
38
44
|
useSomeItemHasAPossibleBulkAction,
|
|
39
45
|
useHasAPossibleBulkAction,
|
|
40
46
|
} from './bulk-actions';
|
|
47
|
+
import type {
|
|
48
|
+
Action,
|
|
49
|
+
AnyItem,
|
|
50
|
+
NormalizedField,
|
|
51
|
+
SortDirection,
|
|
52
|
+
ViewTable as ViewTableType,
|
|
53
|
+
ViewTableProps,
|
|
54
|
+
} from './types';
|
|
41
55
|
|
|
42
56
|
const {
|
|
43
57
|
DropdownMenuV2: DropdownMenu,
|
|
@@ -48,7 +62,35 @@ const {
|
|
|
48
62
|
DropdownMenuSeparatorV2: DropdownMenuSeparator,
|
|
49
63
|
} = unlock( componentsPrivateApis );
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
interface HeaderMenuProps< Item extends AnyItem > {
|
|
66
|
+
field: NormalizedField< Item >;
|
|
67
|
+
view: ViewTableType;
|
|
68
|
+
onChangeView: ( view: ViewTableType ) => void;
|
|
69
|
+
onHide: ( field: NormalizedField< Item > ) => void;
|
|
70
|
+
setOpenedFilter: ( fieldId: string ) => void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface BulkSelectionCheckboxProps< Item extends AnyItem > {
|
|
74
|
+
selection: string[];
|
|
75
|
+
onSelectionChange: ( items: Item[] ) => void;
|
|
76
|
+
data: Item[];
|
|
77
|
+
actions: Action< Item >[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface TableRowProps< Item extends AnyItem > {
|
|
81
|
+
hasBulkActions: boolean;
|
|
82
|
+
item: Item;
|
|
83
|
+
actions: Action< Item >[];
|
|
84
|
+
id: string;
|
|
85
|
+
visibleFields: NormalizedField< Item >[];
|
|
86
|
+
primaryField?: NormalizedField< Item >;
|
|
87
|
+
selection: string[];
|
|
88
|
+
getItemId: ( item: Item ) => string;
|
|
89
|
+
onSelectionChange: ( items: Item[] ) => void;
|
|
90
|
+
data: Item[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function WithDropDownMenuSeparators( { children }: { children: ReactNode } ) {
|
|
52
94
|
return Children.toArray( children )
|
|
53
95
|
.filter( Boolean )
|
|
54
96
|
.map( ( child, i ) => (
|
|
@@ -59,11 +101,15 @@ function WithDropDownMenuSeparators( { children } ) {
|
|
|
59
101
|
) );
|
|
60
102
|
}
|
|
61
103
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
104
|
+
const _HeaderMenu = forwardRef( function HeaderMenu< Item extends AnyItem >(
|
|
105
|
+
{
|
|
106
|
+
field,
|
|
107
|
+
view,
|
|
108
|
+
onChangeView,
|
|
109
|
+
onHide,
|
|
110
|
+
setOpenedFilter,
|
|
111
|
+
}: HeaderMenuProps< Item >,
|
|
112
|
+
ref: Ref< HTMLButtonElement >
|
|
67
113
|
) {
|
|
68
114
|
const isHidable = field.enableHiding !== false;
|
|
69
115
|
const isSortable = field.enableSorting !== false;
|
|
@@ -92,9 +138,9 @@ const HeaderMenu = forwardRef( function HeaderMenu(
|
|
|
92
138
|
variant="tertiary"
|
|
93
139
|
>
|
|
94
140
|
{ field.header }
|
|
95
|
-
{ isSorted && (
|
|
141
|
+
{ view.sort && isSorted && (
|
|
96
142
|
<span aria-hidden="true">
|
|
97
|
-
{
|
|
143
|
+
{ sortArrows[ view.sort.direction ] }
|
|
98
144
|
</span>
|
|
99
145
|
) }
|
|
100
146
|
</Button>
|
|
@@ -104,9 +150,10 @@ const HeaderMenu = forwardRef( function HeaderMenu(
|
|
|
104
150
|
<WithDropDownMenuSeparators>
|
|
105
151
|
{ isSortable && (
|
|
106
152
|
<DropdownMenuGroup>
|
|
107
|
-
{
|
|
108
|
-
(
|
|
153
|
+
{ SORTING_DIRECTIONS.map(
|
|
154
|
+
( direction: SortDirection ) => {
|
|
109
155
|
const isChecked =
|
|
156
|
+
view.sort &&
|
|
110
157
|
isSorted &&
|
|
111
158
|
view.sort.direction === direction;
|
|
112
159
|
|
|
@@ -134,7 +181,7 @@ const HeaderMenu = forwardRef( function HeaderMenu(
|
|
|
134
181
|
} }
|
|
135
182
|
>
|
|
136
183
|
<DropdownMenuItemLabel>
|
|
137
|
-
{
|
|
184
|
+
{ sortLabels[ direction ] }
|
|
138
185
|
</DropdownMenuItemLabel>
|
|
139
186
|
</DropdownMenuRadioItem>
|
|
140
187
|
);
|
|
@@ -191,16 +238,24 @@ const HeaderMenu = forwardRef( function HeaderMenu(
|
|
|
191
238
|
);
|
|
192
239
|
} );
|
|
193
240
|
|
|
194
|
-
|
|
241
|
+
// @ts-expect-error Lift the `Item` type argument through the forwardRef.
|
|
242
|
+
const HeaderMenu: < Item extends AnyItem >(
|
|
243
|
+
props: PropsWithoutRef< HeaderMenuProps< Item > > &
|
|
244
|
+
RefAttributes< HTMLButtonElement >
|
|
245
|
+
) => ReturnType< typeof _HeaderMenu > = _HeaderMenu;
|
|
246
|
+
|
|
247
|
+
function BulkSelectionCheckbox< Item extends AnyItem >( {
|
|
195
248
|
selection,
|
|
196
249
|
onSelectionChange,
|
|
197
250
|
data,
|
|
198
251
|
actions,
|
|
199
|
-
} ) {
|
|
252
|
+
}: BulkSelectionCheckboxProps< Item > ) {
|
|
200
253
|
const selectableItems = useMemo( () => {
|
|
201
254
|
return data.filter( ( item ) => {
|
|
202
255
|
return actions.some(
|
|
203
|
-
( action ) =>
|
|
256
|
+
( action ) =>
|
|
257
|
+
action.supportsBulk &&
|
|
258
|
+
( ! action.isEligible || action.isEligible( item ) )
|
|
204
259
|
);
|
|
205
260
|
} );
|
|
206
261
|
}, [ data, actions ] );
|
|
@@ -210,7 +265,7 @@ function BulkSelectionCheckbox( {
|
|
|
210
265
|
className="dataviews-view-table-selection-checkbox"
|
|
211
266
|
__nextHasNoMarginBottom
|
|
212
267
|
checked={ areAllSelected }
|
|
213
|
-
indeterminate={ ! areAllSelected && selection.length }
|
|
268
|
+
indeterminate={ ! areAllSelected && !! selection.length }
|
|
214
269
|
onChange={ () => {
|
|
215
270
|
if ( areAllSelected ) {
|
|
216
271
|
onSelectionChange( [] );
|
|
@@ -225,7 +280,7 @@ function BulkSelectionCheckbox( {
|
|
|
225
280
|
);
|
|
226
281
|
}
|
|
227
282
|
|
|
228
|
-
function TableRow( {
|
|
283
|
+
function TableRow< Item extends AnyItem >( {
|
|
229
284
|
hasBulkActions,
|
|
230
285
|
item,
|
|
231
286
|
actions,
|
|
@@ -236,7 +291,7 @@ function TableRow( {
|
|
|
236
291
|
getItemId,
|
|
237
292
|
onSelectionChange,
|
|
238
293
|
data,
|
|
239
|
-
} ) {
|
|
294
|
+
}: TableRowProps< Item > ) {
|
|
240
295
|
const hasPossibleBulkAction = useHasAPossibleBulkAction( actions, item );
|
|
241
296
|
const isSelected = selection.includes( id );
|
|
242
297
|
|
|
@@ -257,7 +312,7 @@ function TableRow( {
|
|
|
257
312
|
|
|
258
313
|
return (
|
|
259
314
|
<tr
|
|
260
|
-
className={
|
|
315
|
+
className={ clsx( 'dataviews-view-table__row', {
|
|
261
316
|
'is-selected': hasPossibleBulkAction && isSelected,
|
|
262
317
|
'is-hovered': isHovered,
|
|
263
318
|
'has-bulk-actions': hasPossibleBulkAction,
|
|
@@ -270,7 +325,7 @@ function TableRow( {
|
|
|
270
325
|
onClick={ () => {
|
|
271
326
|
if (
|
|
272
327
|
! isTouchDevice.current &&
|
|
273
|
-
document.getSelection()
|
|
328
|
+
document.getSelection()?.type !== 'Range'
|
|
274
329
|
) {
|
|
275
330
|
if ( ! isSelected ) {
|
|
276
331
|
onSelectionChange(
|
|
@@ -305,7 +360,6 @@ function TableRow( {
|
|
|
305
360
|
>
|
|
306
361
|
<div className="dataviews-view-table__cell-content-wrapper">
|
|
307
362
|
<SingleSelectionCheckbox
|
|
308
|
-
id={ id }
|
|
309
363
|
item={ item }
|
|
310
364
|
selection={ selection }
|
|
311
365
|
onSelectionChange={ onSelectionChange }
|
|
@@ -327,7 +381,7 @@ function TableRow( {
|
|
|
327
381
|
} }
|
|
328
382
|
>
|
|
329
383
|
<div
|
|
330
|
-
className={
|
|
384
|
+
className={ clsx(
|
|
331
385
|
'dataviews-view-table__cell-content-wrapper',
|
|
332
386
|
{
|
|
333
387
|
'dataviews-view-table__primary-field':
|
|
@@ -361,21 +415,24 @@ function TableRow( {
|
|
|
361
415
|
);
|
|
362
416
|
}
|
|
363
417
|
|
|
364
|
-
function ViewTable( {
|
|
365
|
-
view,
|
|
366
|
-
onChangeView,
|
|
367
|
-
fields,
|
|
418
|
+
function ViewTable< Item extends AnyItem >( {
|
|
368
419
|
actions,
|
|
369
420
|
data,
|
|
421
|
+
fields,
|
|
370
422
|
getItemId,
|
|
371
423
|
isLoading = false,
|
|
372
|
-
|
|
424
|
+
onChangeView,
|
|
373
425
|
onSelectionChange,
|
|
426
|
+
selection,
|
|
374
427
|
setOpenedFilter,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
|
|
428
|
+
view,
|
|
429
|
+
}: ViewTableProps< Item > ) {
|
|
430
|
+
const headerMenuRefs = useRef<
|
|
431
|
+
Map< string, { node: HTMLButtonElement; fallback: string } >
|
|
432
|
+
>( new Map() );
|
|
433
|
+
const headerMenuToFocusRef = useRef< HTMLButtonElement >();
|
|
434
|
+
const [ nextHeaderMenuToFocus, setNextHeaderMenuToFocus ] =
|
|
435
|
+
useState< HTMLButtonElement >();
|
|
379
436
|
const hasBulkActions = useSomeItemHasAPossibleBulkAction( actions, data );
|
|
380
437
|
|
|
381
438
|
useEffect( () => {
|
|
@@ -393,13 +450,15 @@ function ViewTable( {
|
|
|
393
450
|
// Clearing out the focus directive is necessary to make sure
|
|
394
451
|
// future renders don't cause unexpected focus jumps.
|
|
395
452
|
headerMenuToFocusRef.current = nextHeaderMenuToFocus;
|
|
396
|
-
setNextHeaderMenuToFocus();
|
|
453
|
+
setNextHeaderMenuToFocus( undefined );
|
|
397
454
|
return;
|
|
398
455
|
}
|
|
399
456
|
|
|
400
|
-
const onHide = ( field ) => {
|
|
457
|
+
const onHide = ( field: NormalizedField< Item > ) => {
|
|
401
458
|
const hidden = headerMenuRefs.current.get( field.id );
|
|
402
|
-
const fallback =
|
|
459
|
+
const fallback = hidden
|
|
460
|
+
? headerMenuRefs.current.get( hidden.fallback )
|
|
461
|
+
: undefined;
|
|
403
462
|
setNextHeaderMenuToFocus( fallback?.node );
|
|
404
463
|
};
|
|
405
464
|
const visibleFields = fields.filter(
|
|
@@ -408,7 +467,6 @@ function ViewTable( {
|
|
|
408
467
|
! [ view.layout.mediaField ].includes( field.id )
|
|
409
468
|
);
|
|
410
469
|
const hasData = !! data?.length;
|
|
411
|
-
const sortValues = { asc: 'ascending', desc: 'descending' };
|
|
412
470
|
|
|
413
471
|
const primaryField = fields.find(
|
|
414
472
|
( field ) => field.id === view.layout.primaryField
|
|
@@ -450,8 +508,9 @@ function ViewTable( {
|
|
|
450
508
|
} }
|
|
451
509
|
data-field-id={ field.id }
|
|
452
510
|
aria-sort={
|
|
453
|
-
view.sort?.field === field.id
|
|
454
|
-
|
|
511
|
+
view.sort?.field === field.id
|
|
512
|
+
? sortValues[ view.sort.direction ]
|
|
513
|
+
: undefined
|
|
455
514
|
}
|
|
456
515
|
scope="col"
|
|
457
516
|
>
|
|
@@ -504,7 +563,7 @@ function ViewTable( {
|
|
|
504
563
|
item={ item }
|
|
505
564
|
hasBulkActions={ hasBulkActions }
|
|
506
565
|
actions={ actions }
|
|
507
|
-
id={ getItemId( item ) || index }
|
|
566
|
+
id={ getItemId( item ) || index.toString() }
|
|
508
567
|
visibleFields={ visibleFields }
|
|
509
568
|
primaryField={ primaryField }
|
|
510
569
|
selection={ selection }
|
|
@@ -516,7 +575,7 @@ function ViewTable( {
|
|
|
516
575
|
</tbody>
|
|
517
576
|
</table>
|
|
518
577
|
<div
|
|
519
|
-
className={
|
|
578
|
+
className={ clsx( {
|
|
520
579
|
'dataviews-loading': isLoading,
|
|
521
580
|
'dataviews-no-results': ! hasData && ! isLoading,
|
|
522
581
|
} ) }
|
package/tsconfig.json
CHANGED
|
@@ -3,18 +3,17 @@
|
|
|
3
3
|
"extends": "../../tsconfig.base.json",
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"rootDir": "src",
|
|
6
|
-
"declarationDir": "build-types"
|
|
6
|
+
"declarationDir": "build-types",
|
|
7
|
+
"checkJs": false
|
|
7
8
|
},
|
|
8
9
|
"references": [
|
|
9
|
-
{ "path": "../a11y" },
|
|
10
10
|
{ "path": "../components" },
|
|
11
11
|
{ "path": "../compose" },
|
|
12
12
|
{ "path": "../element" },
|
|
13
13
|
{ "path": "../i18n" },
|
|
14
14
|
{ "path": "../icons" },
|
|
15
|
-
{ "path": "../keycodes" },
|
|
16
15
|
{ "path": "../primitives" },
|
|
17
16
|
{ "path": "../private-apis" }
|
|
18
17
|
],
|
|
19
|
-
"include": [ "src
|
|
18
|
+
"include": [ "src" ]
|
|
20
19
|
}
|