@wordpress/dataviews 4.2.0 → 4.3.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +47 -7
  3. package/build/components/dataviews/index.js +3 -5
  4. package/build/components/dataviews/index.js.map +1 -1
  5. package/build/components/dataviews-bulk-actions/index.js +145 -141
  6. package/build/components/dataviews-bulk-actions/index.js.map +1 -1
  7. package/build/components/dataviews-filters/add-filter.js +4 -6
  8. package/build/components/dataviews-filters/add-filter.js.map +1 -1
  9. package/build/components/dataviews-filters/search-widget.js +28 -18
  10. package/build/components/dataviews-filters/search-widget.js.map +1 -1
  11. package/build/components/dataviews-footer/index.js +45 -0
  12. package/build/components/dataviews-footer/index.js.map +1 -0
  13. package/build/components/dataviews-item-actions/index.js +5 -8
  14. package/build/components/dataviews-item-actions/index.js.map +1 -1
  15. package/build/components/dataviews-pagination/index.js +4 -4
  16. package/build/components/dataviews-pagination/index.js.map +1 -1
  17. package/build/components/dataviews-view-config/index.js +171 -32
  18. package/build/components/dataviews-view-config/index.js.map +1 -1
  19. package/build/dataforms-layouts/panel/index.js +4 -1
  20. package/build/dataforms-layouts/panel/index.js.map +1 -1
  21. package/build/dataviews-layouts/index.js +48 -2
  22. package/build/dataviews-layouts/index.js.map +1 -1
  23. package/build/dataviews-layouts/list/index.js +124 -84
  24. package/build/dataviews-layouts/list/index.js.map +1 -1
  25. package/build/dataviews-layouts/table/column-header-menu.js +52 -54
  26. package/build/dataviews-layouts/table/column-header-menu.js.map +1 -1
  27. package/build/dataviews-layouts/table/index.js +7 -35
  28. package/build/dataviews-layouts/table/index.js.map +1 -1
  29. package/build/normalize-fields.js +4 -2
  30. package/build/normalize-fields.js.map +1 -1
  31. package/build/types.js.map +1 -1
  32. package/build-module/components/dataviews/index.js +3 -5
  33. package/build-module/components/dataviews/index.js.map +1 -1
  34. package/build-module/components/dataviews-bulk-actions/index.js +145 -143
  35. package/build-module/components/dataviews-bulk-actions/index.js.map +1 -1
  36. package/build-module/components/dataviews-filters/add-filter.js +4 -6
  37. package/build-module/components/dataviews-filters/add-filter.js.map +1 -1
  38. package/build-module/components/dataviews-filters/search-widget.js +28 -18
  39. package/build-module/components/dataviews-filters/search-widget.js.map +1 -1
  40. package/build-module/components/dataviews-footer/index.js +38 -0
  41. package/build-module/components/dataviews-footer/index.js.map +1 -0
  42. package/build-module/components/dataviews-item-actions/index.js +5 -8
  43. package/build-module/components/dataviews-item-actions/index.js.map +1 -1
  44. package/build-module/components/dataviews-pagination/index.js +5 -5
  45. package/build-module/components/dataviews-pagination/index.js.map +1 -1
  46. package/build-module/components/dataviews-view-config/index.js +177 -38
  47. package/build-module/components/dataviews-view-config/index.js.map +1 -1
  48. package/build-module/dataforms-layouts/panel/index.js +4 -1
  49. package/build-module/dataforms-layouts/panel/index.js.map +1 -1
  50. package/build-module/dataviews-layouts/index.js +45 -1
  51. package/build-module/dataviews-layouts/index.js.map +1 -1
  52. package/build-module/dataviews-layouts/list/index.js +125 -83
  53. package/build-module/dataviews-layouts/list/index.js.map +1 -1
  54. package/build-module/dataviews-layouts/table/column-header-menu.js +52 -54
  55. package/build-module/dataviews-layouts/table/column-header-menu.js.map +1 -1
  56. package/build-module/dataviews-layouts/table/index.js +9 -37
  57. package/build-module/dataviews-layouts/table/index.js.map +1 -1
  58. package/build-module/normalize-fields.js +4 -2
  59. package/build-module/normalize-fields.js.map +1 -1
  60. package/build-module/types.js.map +1 -1
  61. package/build-style/style-rtl.css +79 -63
  62. package/build-style/style.css +79 -63
  63. package/build-types/components/dataviews/index.d.ts.map +1 -1
  64. package/build-types/components/dataviews/stories/fixtures.d.ts +27 -131
  65. package/build-types/components/dataviews/stories/fixtures.d.ts.map +1 -1
  66. package/build-types/components/dataviews/stories/index.story.d.ts +12 -53
  67. package/build-types/components/dataviews/stories/index.story.d.ts.map +1 -1
  68. package/build-types/components/dataviews-bulk-actions/index.d.ts +11 -1
  69. package/build-types/components/dataviews-bulk-actions/index.d.ts.map +1 -1
  70. package/build-types/components/dataviews-filters/add-filter.d.ts.map +1 -1
  71. package/build-types/components/dataviews-filters/search-widget.d.ts.map +1 -1
  72. package/build-types/components/dataviews-footer/index.d.ts +2 -0
  73. package/build-types/components/dataviews-footer/index.d.ts.map +1 -0
  74. package/build-types/components/dataviews-item-actions/index.d.ts.map +1 -1
  75. package/build-types/components/dataviews-view-config/index.d.ts.map +1 -1
  76. package/build-types/dataforms-layouts/panel/index.d.ts.map +1 -1
  77. package/build-types/dataviews-layouts/index.d.ts +4 -2
  78. package/build-types/dataviews-layouts/index.d.ts.map +1 -1
  79. package/build-types/dataviews-layouts/list/index.d.ts.map +1 -1
  80. package/build-types/dataviews-layouts/table/column-header-menu.d.ts.map +1 -1
  81. package/build-types/dataviews-layouts/table/index.d.ts.map +1 -1
  82. package/build-types/normalize-fields.d.ts.map +1 -1
  83. package/build-types/types.d.ts +2 -0
  84. package/build-types/types.d.ts.map +1 -1
  85. package/package.json +11 -11
  86. package/src/components/dataviews/index.tsx +2 -6
  87. package/src/components/dataviews/stories/fixtures.tsx +690 -0
  88. package/src/components/dataviews/stories/index.story.tsx +164 -0
  89. package/src/components/dataviews/style.scss +2 -0
  90. package/src/components/dataviews-bulk-actions/index.tsx +264 -213
  91. package/src/components/dataviews-bulk-actions/style.scss +9 -4
  92. package/src/components/dataviews-filters/add-filter.tsx +7 -11
  93. package/src/components/dataviews-filters/search-widget.tsx +45 -17
  94. package/src/components/dataviews-filters/style.scss +12 -2
  95. package/src/components/dataviews-footer/index.tsx +50 -0
  96. package/src/components/dataviews-footer/style.scss +40 -0
  97. package/src/components/dataviews-item-actions/index.tsx +8 -14
  98. package/src/components/dataviews-pagination/index.tsx +5 -5
  99. package/src/components/dataviews-pagination/style.scss +0 -19
  100. package/src/components/dataviews-view-config/index.tsx +252 -53
  101. package/src/components/dataviews-view-config/style.scss +25 -0
  102. package/src/dataforms-layouts/panel/index.tsx +2 -0
  103. package/src/dataviews-layouts/grid/style.scss +1 -1
  104. package/src/dataviews-layouts/index.ts +63 -2
  105. package/src/dataviews-layouts/list/index.tsx +199 -127
  106. package/src/dataviews-layouts/list/style.scss +10 -4
  107. package/src/dataviews-layouts/table/column-header-menu.tsx +85 -87
  108. package/src/dataviews-layouts/table/index.tsx +8 -65
  109. package/src/dataviews-layouts/table/style.scss +0 -5
  110. package/src/normalize-fields.ts +2 -0
  111. package/src/style.scss +1 -1
  112. package/src/types.ts +2 -0
  113. package/tsconfig.tsbuildinfo +1 -1
  114. package/build/components/dataviews-bulk-actions-toolbar/index.js +0 -207
  115. package/build/components/dataviews-bulk-actions-toolbar/index.js.map +0 -1
  116. package/build-module/components/dataviews-bulk-actions-toolbar/index.js +0 -201
  117. package/build-module/components/dataviews-bulk-actions-toolbar/index.js.map +0 -1
  118. package/build-types/components/dataviews-bulk-actions-toolbar/index.d.ts +0 -2
  119. package/build-types/components/dataviews-bulk-actions-toolbar/index.d.ts.map +0 -1
  120. package/src/components/dataviews/stories/fixtures.js +0 -250
  121. package/src/components/dataviews/stories/index.story.js +0 -71
  122. package/src/components/dataviews-bulk-actions-toolbar/index.tsx +0 -288
  123. package/src/components/dataviews-bulk-actions-toolbar/style.scss +0 -45
@@ -116,6 +116,8 @@
116
116
  container: dataviews-wrapper/inline-size;
117
117
  display: flex;
118
118
  flex-direction: column;
119
+ font-size: 13px;
120
+ line-height: 1.4;
119
121
  }
120
122
 
121
123
  .dataviews__view-actions,
@@ -217,53 +219,16 @@
217
219
  padding-right: 24px;
218
220
  }
219
221
  }
220
- .dataviews-bulk-actions__modal {
221
- z-index: 1000001;
222
- }
223
-
224
- .dataviews-bulk-actions__edit-button.components-button {
225
- flex-shrink: 0;
222
+ .dataviews-bulk-actions-footer__item-count {
223
+ color: #1e1e1e;
224
+ font-weight: 500;
225
+ font-size: 11px;
226
+ text-transform: uppercase;
226
227
  }
227
228
 
228
- .dataviews-bulk-actions-toolbar {
229
- position: sticky;
230
- display: flex;
231
- flex-direction: column;
232
- align-content: center;
233
- flex-wrap: wrap;
234
- width: -moz-fit-content;
235
- width: fit-content;
236
- margin-left: auto;
229
+ .dataviews-bulk-actions-footer__container {
237
230
  margin-right: auto;
238
- bottom: 24px;
239
- z-index: 2;
240
- }
241
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar {
242
- border-color: #ddd;
243
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
244
- }
245
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar .components-toolbar-group {
246
- border-color: #e0e0e0;
247
- }
248
- .dataviews-bulk-actions-toolbar .components-accessible-toolbar .components-toolbar-group:last-child {
249
- border: 0;
250
- }
251
- .dataviews-bulk-actions-toolbar .dataviews-bulk-actions-toolbar__selection-count {
252
- display: flex;
253
- align-items: center;
254
- margin: 0 8px 0 8px;
255
- }
256
-
257
- .dataviews-bulk-actions-toolbar__wrapper {
258
- display: flex;
259
- flex-grow: 1;
260
- width: 100%;
261
- }
262
- .dataviews-bulk-actions-toolbar__wrapper .components-toolbar-group {
263
- align-items: center;
264
- }
265
- .dataviews-bulk-actions-toolbar__wrapper .components-button.is-busy {
266
- max-height: 36px;
231
+ min-height: 32px;
267
232
  }
268
233
 
269
234
  .dataviews-filters__button {
@@ -281,11 +246,17 @@
281
246
  opacity: 1;
282
247
  }
283
248
 
249
+ .dataviews-filters__summary-popover {
250
+ font-size: 13px;
251
+ line-height: 1.4;
252
+ }
284
253
  .dataviews-filters__summary-popover .components-popover__content {
285
254
  width: 230px;
286
- padding: 0;
287
255
  border-radius: 4px;
288
256
  }
257
+ .dataviews-filters__summary-popover.components-dropdown__content .components-popover__content {
258
+ padding: 0;
259
+ }
289
260
 
290
261
  .dataviews-filters__summary-operators-container {
291
262
  padding: 8px 8px 0;
@@ -316,6 +287,7 @@
316
287
  position: relative;
317
288
  display: flex;
318
289
  align-items: center;
290
+ box-sizing: border-box;
319
291
  }
320
292
  .dataviews-filters__summary-chip-container .dataviews-filters__summary-chip.has-reset {
321
293
  padding-inline-end: 28px;
@@ -527,6 +499,7 @@
527
499
  font-size: 11px;
528
500
  outline: var(--wp-admin-border-width-focus) solid #fff;
529
501
  color: #fff;
502
+ box-sizing: border-box;
530
503
  }
531
504
 
532
505
  .dataviews-search {
@@ -534,7 +507,7 @@
534
507
  width: fit-content;
535
508
  }
536
509
 
537
- .dataviews-pagination {
510
+ .dataviews-footer {
538
511
  position: sticky;
539
512
  bottom: 0;
540
513
  left: 0;
@@ -543,14 +516,37 @@
543
516
  border-top: 1px solid #f0f0f0;
544
517
  flex-shrink: 0;
545
518
  transition: padding ease-out 0.1s;
519
+ z-index: 2;
546
520
  }
547
521
  @media (prefers-reduced-motion: reduce) {
548
- .dataviews-pagination {
522
+ .dataviews-footer {
549
523
  transition-duration: 0s;
550
524
  transition-delay: 0s;
551
525
  }
552
526
  }
553
527
 
528
+ /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
529
+ @container (max-width: 430px) {
530
+ .dataviews-footer {
531
+ padding: 12px 24px;
532
+ }
533
+ }
534
+ /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
535
+ @container (max-width: 560px) {
536
+ .dataviews-footer {
537
+ flex-direction: column !important;
538
+ }
539
+ .dataviews-footer .dataviews-bulk-actions-footer__container {
540
+ width: 100%;
541
+ }
542
+ .dataviews-footer .dataviews-bulk-actions-footer__item-count {
543
+ flex-grow: 1;
544
+ }
545
+ .dataviews-footer .dataviews-pagination {
546
+ width: 100%;
547
+ justify-content: space-between;
548
+ }
549
+ }
554
550
  .dataviews-pagination__page-select {
555
551
  font-size: 11px;
556
552
  font-weight: 500;
@@ -563,12 +559,6 @@
563
559
  }
564
560
  }
565
561
 
566
- /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
567
- @container (max-width: 430px) {
568
- .dataviews-pagination {
569
- padding: 12px 24px;
570
- }
571
- }
572
562
  .dataviews-action-modal {
573
563
  z-index: 1000001;
574
564
  }
@@ -592,6 +582,8 @@
592
582
  /* stylelint-disable-next-line property-no-unknown -- the linter needs to be updated to accepted the container-type property */
593
583
  container-type: inline-size;
594
584
  padding: 16px;
585
+ font-size: 13px;
586
+ line-height: 1.4;
595
587
  }
596
588
 
597
589
  .dataviews-view-config__sort-direction .components-toggle-group-control-option-base {
@@ -619,6 +611,10 @@
619
611
  grid-column: span 4;
620
612
  }
621
613
 
614
+ .dataviews-settings-section:has(.dataviews-settings-section__content:empty) {
615
+ display: none;
616
+ }
617
+
622
618
  /* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
623
619
  @container (max-width: 500px) {
624
620
  .dataviews-settings-section.dataviews-settings-section {
@@ -631,6 +627,25 @@
631
627
  grid-column: span 2;
632
628
  }
633
629
  }
630
+ .dataviews-field-control__field {
631
+ height: 32px;
632
+ }
633
+
634
+ .dataviews-field-control__actions {
635
+ position: absolute;
636
+ top: -9999em;
637
+ }
638
+
639
+ .dataviews-field-control__actions.dataviews-field-control__actions {
640
+ gap: 4px;
641
+ }
642
+
643
+ .dataviews-field-control__field:hover .dataviews-field-control__actions,
644
+ .dataviews-field-control__field:focus-within .dataviews-field-control__actions {
645
+ position: unset;
646
+ top: unset;
647
+ }
648
+
634
649
  .dataviews-view-grid {
635
650
  margin-bottom: auto;
636
651
  grid-template-rows: max-content;
@@ -780,6 +795,10 @@
780
795
  top: 8px;
781
796
  }
782
797
 
798
+ ul.dataviews-view-list {
799
+ list-style-type: none;
800
+ }
801
+
783
802
  .dataviews-view-list {
784
803
  margin: 0 0 auto;
785
804
  }
@@ -833,12 +852,13 @@
833
852
  .dataviews-view-list li:not(.is-selected) .dataviews-view-list__primary-field {
834
853
  color: #1e1e1e;
835
854
  }
836
- .dataviews-view-list li:not(.is-selected):hover, .dataviews-view-list li:not(.is-selected):focus-within {
855
+ .dataviews-view-list li:not(.is-selected):hover, .dataviews-view-list li:not(.is-selected).is-hovered, .dataviews-view-list li:not(.is-selected):focus-within {
837
856
  color: var(--wp-admin-theme-color);
838
857
  background-color: #f8f8f8;
839
858
  }
840
859
  .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__primary-field,
841
- .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__primary-field,
860
+ .dataviews-view-list li:not(.is-selected):hover .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected).is-hovered .dataviews-view-list__primary-field,
861
+ .dataviews-view-list li:not(.is-selected).is-hovered .dataviews-view-list__fields, .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__primary-field,
842
862
  .dataviews-view-list li:not(.is-selected):focus-within .dataviews-view-list__fields {
843
863
  color: var(--wp-admin-theme-color);
844
864
  }
@@ -854,6 +874,7 @@
854
874
  color: var(--wp-admin-theme-color);
855
875
  }
856
876
  .dataviews-view-list .dataviews-view-list__item {
877
+ box-sizing: border-box;
857
878
  padding: 16px 24px;
858
879
  width: 100%;
859
880
  scroll-margin: 8px 0;
@@ -861,7 +882,7 @@
861
882
  .dataviews-view-list .dataviews-view-list__item:focus-visible::before {
862
883
  position: absolute;
863
884
  content: "";
864
- top: calc(var(--wp-admin-border-width-focus) + 1px);
885
+ top: var(--wp-admin-border-width-focus);
865
886
  right: var(--wp-admin-border-width-focus);
866
887
  bottom: var(--wp-admin-border-width-focus);
867
888
  left: var(--wp-admin-border-width-focus);
@@ -898,8 +919,8 @@
898
919
  border-radius: 4px;
899
920
  }
900
921
  .dataviews-view-list .dataviews-view-list__media-placeholder {
901
- min-width: 32px;
902
- height: 32px;
922
+ width: 52px;
923
+ height: 52px;
903
924
  background-color: #e0e0e0;
904
925
  }
905
926
  .dataviews-view-list .dataviews-view-list__field-wrapper {
@@ -938,11 +959,6 @@
938
959
  color: #757575;
939
960
  margin-bottom: auto;
940
961
  }
941
- .dataviews-view-table a {
942
- text-decoration: none;
943
- color: #1e1e1e;
944
- font-weight: 500;
945
- }
946
962
  .dataviews-view-table th {
947
963
  text-align: left;
948
964
  color: #1e1e1e;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAwBvC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzE,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,KAAK,cAAc,CAAE,IAAI,IAAK;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC3B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,cAAc,EAAE,gBAAgB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,KAAM,IAAI,CAAC;IAChD,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB,GAAG,CAAE,IAAI,SAAS,UAAU,GAC1B;IAAE,SAAS,CAAC,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,GACxC;IAAE,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,CAAE,CAAC;AAI7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,MAAa,EACb,WAAuB,EACvB,OAAY,EACZ,IAAI,EACJ,SAA4B,EAC5B,SAAiB,EACjB,cAAc,EACd,cAAc,EACd,SAAS,EAAE,iBAAiB,EAC5B,iBAAiB,EACjB,MAAM,GACN,EAAE,cAAc,CAAE,IAAI,CAAE,+BA0FxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBvC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzE,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,KAAK,cAAc,CAAE,IAAI,IAAK;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC3B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,cAAc,EAAE,gBAAgB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,EAAE,KAAM,IAAI,CAAC;IAChD,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB,GAAG,CAAE,IAAI,SAAS,UAAU,GAC1B;IAAE,SAAS,CAAC,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,GACxC;IAAE,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAA;CAAE,CAAE,CAAC;AAI7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,MAAa,EACb,WAAuB,EACvB,OAAY,EACZ,IAAI,EACJ,SAA4B,EAC5B,SAAiB,EACjB,cAAc,EACd,cAAc,EACd,SAAS,EAAE,iBAAiB,EAC5B,iBAAiB,EACjB,MAAM,GACN,EAAE,cAAc,CAAE,IAAI,CAAE,+BAwFxB"}
@@ -1,4 +1,16 @@
1
- export const data: {
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Field, Action } from '../../../types';
5
+ export type Theme = {
6
+ slug: string;
7
+ name: string;
8
+ description: string;
9
+ requires: string;
10
+ tested: string;
11
+ tags: string[];
12
+ };
13
+ export type SpaceObject = {
2
14
  id: number;
3
15
  title: string;
4
16
  description: string;
@@ -7,134 +19,18 @@ export const data: {
7
19
  categories: string[];
8
20
  satellites: number;
9
21
  date: string;
10
- }[];
11
- export namespace DEFAULT_VIEW {
12
- export { LAYOUT_TABLE as type };
13
- export let search: string;
14
- export let page: number;
15
- export let perPage: number;
16
- export let fields: string[];
17
- export let layout: {};
18
- export let filters: never[];
19
- }
20
- export const actions: ({
21
- id: string;
22
- label: string;
23
- isPrimary: boolean;
24
- icon: import("react").JSX.Element;
25
- hideModalHeader: boolean;
26
- RenderModal: ({ item, closeModal }: {
27
- item: any;
28
- closeModal: any;
29
- }) => import("react").JSX.Element;
30
- callback?: undefined;
31
- } | {
32
- id: string;
33
- label: string;
34
- callback(): void;
35
- isPrimary?: undefined;
36
- icon?: undefined;
37
- hideModalHeader?: undefined;
38
- RenderModal?: undefined;
39
- })[];
40
- export const fields: ({
41
- label: string;
42
- id: string;
43
- header: import("react").JSX.Element;
44
- render: ({ item }: {
45
- item: any;
46
- }) => import("react").JSX.Element;
47
- enableSorting: boolean;
48
- enableHiding?: undefined;
49
- enableGlobalSearch?: undefined;
50
- type?: undefined;
51
- elements?: undefined;
52
- filterBy?: undefined;
53
- getValue?: undefined;
54
- } | {
55
- label: string;
56
- id: string;
57
- enableHiding: boolean;
58
- enableGlobalSearch: boolean;
59
- header?: undefined;
60
- render?: undefined;
61
- enableSorting?: undefined;
62
- type?: undefined;
63
- elements?: undefined;
64
- filterBy?: undefined;
65
- getValue?: undefined;
66
- } | {
67
- id: string;
68
- label: string;
69
- type: string;
70
- header?: undefined;
71
- render?: undefined;
72
- enableSorting?: undefined;
73
- enableHiding?: undefined;
74
- enableGlobalSearch?: undefined;
75
- elements?: undefined;
76
- filterBy?: undefined;
77
- getValue?: undefined;
78
- } | {
79
- label: string;
80
- id: string;
81
- enableHiding: boolean;
82
- elements: {
83
- value: string;
84
- label: string;
85
- }[];
86
- header?: undefined;
87
- render?: undefined;
88
- enableSorting?: undefined;
89
- enableGlobalSearch?: undefined;
90
- type?: undefined;
91
- filterBy?: undefined;
92
- getValue?: undefined;
93
- } | {
94
- label: string;
95
- id: string;
96
- type: string;
97
- enableSorting: boolean;
98
- header?: undefined;
99
- render?: undefined;
100
- enableHiding?: undefined;
101
- enableGlobalSearch?: undefined;
102
- elements?: undefined;
103
- filterBy?: undefined;
104
- getValue?: undefined;
105
- } | {
106
- label: string;
107
- id: string;
108
- enableSorting: boolean;
109
- enableGlobalSearch: boolean;
110
- header?: undefined;
111
- render?: undefined;
112
- enableHiding?: undefined;
113
- type?: undefined;
114
- elements?: undefined;
115
- filterBy?: undefined;
116
- getValue?: undefined;
117
- } | {
118
- label: string;
119
- id: string;
120
- header: import("react").JSX.Element;
121
- elements: {
122
- value: string;
123
- label: string;
124
- }[];
125
- filterBy: {
126
- operators: string[];
127
- };
128
- getValue: ({ item }: {
129
- item: any;
130
- }) => any;
131
- render: ({ item }: {
132
- item: any;
133
- }) => any;
134
- enableSorting: boolean;
135
- enableHiding?: undefined;
136
- enableGlobalSearch?: undefined;
137
- type?: undefined;
138
- })[];
139
- import { LAYOUT_TABLE } from '../../../constants';
22
+ };
23
+ export declare const data: SpaceObject[];
24
+ export declare const themeData: Theme[];
25
+ export declare const themeFields: Field<Theme>[];
26
+ export declare const DEFAULT_VIEW: {
27
+ type: "table";
28
+ search: string;
29
+ page: number;
30
+ perPage: number;
31
+ layout: {};
32
+ filters: never[];
33
+ };
34
+ export declare const actions: Action<SpaceObject>[];
35
+ export declare const fields: Field<SpaceObject>[];
140
36
  //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/fixtures.js"],"names":[],"mappings":"AAgBA;;;;;;;;;IA+GE;;;;;;;;;;AAYF;;;;;;;;;;;;;;;;;;;KA8BE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EE;6BA3O2B,oBAAoB"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/fixtures.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,WAAW,EA+G7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,EA2Y5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAE,KAAK,CAAE,EAWvC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAE,WAAW,CAAE,EAsC1C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAE,WAAW,CAAE,EAiFxC,CAAC"}
@@ -1,55 +1,14 @@
1
- export default meta;
2
- export function Default(props: any): import("react").JSX.Element;
3
- export namespace Default {
4
- namespace args {
5
- export { actions };
6
- export namespace defaultLayouts {
7
- namespace table {
8
- namespace layout {
9
- let primaryField: string;
10
- namespace styles {
11
- namespace image {
12
- let width: number;
13
- }
14
- namespace title {
15
- let maxWidth: number;
16
- }
17
- namespace type {
18
- let maxWidth_1: number;
19
- export { maxWidth_1 as maxWidth };
20
- }
21
- namespace description {
22
- let maxWidth_2: number;
23
- export { maxWidth_2 as maxWidth };
24
- }
25
- }
26
- }
27
- }
28
- namespace grid {
29
- export namespace layout_1 {
30
- export let mediaField: string;
31
- let primaryField_1: string;
32
- export { primaryField_1 as primaryField };
33
- }
34
- export { layout_1 as layout };
35
- }
36
- namespace list {
37
- export namespace layout_2 {
38
- let mediaField_1: string;
39
- export { mediaField_1 as mediaField };
40
- let primaryField_2: string;
41
- export { primaryField_2 as primaryField };
42
- }
43
- export { layout_2 as layout };
44
- }
45
- }
46
- }
47
- }
48
- declare namespace meta {
49
- let title_1: string;
50
- export { title_1 as title };
51
- export { DataViews as component };
52
- }
53
- import { actions } from './fixtures';
1
+ /**
2
+ * Internal dependencies
3
+ */
54
4
  import DataViews from '../index';
5
+ declare const meta: {
6
+ title: string;
7
+ component: typeof DataViews;
8
+ };
9
+ export default meta;
10
+ export declare const Default: () => import("react").JSX.Element;
11
+ export declare const Empty: () => import("react").JSX.Element;
12
+ export declare const FieldsNoSortableNoHidable: () => import("react").JSX.Element;
13
+ export declare const CombinedFields: () => import("react").JSX.Element;
55
14
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/index.story.js"],"names":[],"mappings":";AAmBO,iEAeN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAzBmD,YAAY;sBAD1C,UAAU"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../../src/components/dataviews/stories/index.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,SAAS,MAAM,UAAU,CAAC;AAajC,QAAA,MAAM,IAAI;;;CAGT,CAAC;AACF,eAAe,IAAI,CAAC;AAoCpB,eAAO,MAAM,OAAO,mCAoBnB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAkBjB,CAAC;AAEF,eAAO,MAAM,yBAAyB,mCA4BrC,CAAC;AAEF,eAAO,MAAM,cAAc,mCA8B1B,CAAC"}
@@ -1,5 +1,15 @@
1
1
  import type { Action } from '../../types';
2
+ import type { SetSelection } from '../../private-types';
2
3
  export declare function useHasAPossibleBulkAction<Item>(actions: Action<Item>[], item: Item): boolean;
3
4
  export declare function useSomeItemHasAPossibleBulkAction<Item>(actions: Action<Item>[], data: Item[]): boolean;
4
- export default function BulkActions(): import("react").JSX.Element | null;
5
+ interface BulkSelectionCheckboxProps<Item> {
6
+ selection: string[];
7
+ onChangeSelection: SetSelection;
8
+ data: Item[];
9
+ actions: Action<Item>[];
10
+ getItemId: (item: Item) => string;
11
+ }
12
+ export declare function BulkSelectionCheckbox<Item>({ selection, onChangeSelection, data, actions, getItemId, }: BulkSelectionCheckboxProps<Item>): import("react").JSX.Element;
13
+ export declare function BulkActionsFooter(): import("react").JSX.Element;
14
+ export {};
5
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-bulk-actions/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AA4BvD,wBAAgB,yBAAyB,CAAE,IAAI,EAC9C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,WAUV;AAED,wBAAgB,iCAAiC,CAAE,IAAI,EACtD,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,EAAE,WAYZ;AAwND,MAAM,CAAC,OAAO,UAAU,WAAW,uCAclC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-bulk-actions/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,wBAAgB,yBAAyB,CAAE,IAAI,EAC9C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,WAUV;AAED,wBAAgB,iCAAiC,CAAE,IAAI,EACtD,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,EACzB,IAAI,EAAE,IAAI,EAAE,WAYZ;AAED,UAAU,0BAA0B,CAAE,IAAI;IACzC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,EAAE,YAAY,CAAC;IAChC,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,MAAM,CAAC;CACpC;AAED,wBAAgB,qBAAqB,CAAE,IAAI,EAAI,EAC9C,SAAS,EACT,iBAAiB,EACjB,IAAI,EACJ,OAAO,EACP,SAAS,GACT,EAAE,0BAA0B,CAAE,IAAI,CAAE,+BAoCpC;AA4OD,wBAAgB,iBAAiB,gCAiBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"add-filter.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/add-filter.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQ1D,UAAU,cAAc;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,eAAe,EAAE,CAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;CACnD;AAED,wBAAgB,qBAAqB,CAAE,EACtC,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,eAAe,EACf,OAAO,GACP,EAAE,cAAc,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,+BAgCA;;AA6BD,wBAAuC"}
1
+ {"version":3,"file":"add-filter.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/add-filter.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAI1D,UAAU,cAAc;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;IACrC,eAAe,EAAE,CAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAM,IAAI,CAAC;CACnD;AAED,wBAAgB,qBAAqB,CAAE,EACtC,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,eAAe,EACf,OAAO,GACP,EAAE,cAAc,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,+BAgCA;;AA6BD,wBAAuC"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/search-widget.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAU,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAQlE,UAAU,iBAAiB;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AA6QD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAG7D"}
1
+ {"version":3,"file":"search-widget.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-filters/search-widget.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAU,gBAAgB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AASlE,UAAU,iBAAiB;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,CAAE,IAAI,EAAE,IAAI,KAAM,IAAI,CAAC;CACrC;AAuSD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAG7D"}
@@ -0,0 +1,2 @@
1
+ export default function DataViewsFooter(): false | import("react").JSX.Element | null;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-footer/index.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,eAAe,+CA8BtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-item-actions/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAoB7D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAU1E,MAAM,WAAW,kBAAkB,CAAE,IAAI;IACxC,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE,CAAC;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACd;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,UAAU,oBAAoB,CAAE,IAAI,CAAG,SAAQ,gBAAgB,CAAE,IAAI,CAAE;IACtE,aAAa,EAAE,CAAE,KAAK,EAAE,kBAAkB,CAAE,IAAI,CAAE,KAAM,YAAY,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,6BAA6B,CAAE,IAAI;IAC5C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,IAAI,EAAE,IAAI,CAAC;CACX;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AA0CD,wBAAgB,WAAW,CAAE,IAAI,EAAI,EACpC,MAAM,EACN,KAAK,EACL,UAAU,GACV,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAiB1B;AAED,wBAAgB,eAAe,CAAE,IAAI,EAAI,EACxC,MAAM,EACN,KAAK,EACL,aAAa,EACb,MAAM,GACN,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAsB9B;AAED,wBAAgB,wBAAwB,CAAE,IAAI,EAAI,EACjD,OAAO,EACP,IAAI,GACJ,EAAE,6BAA6B,CAAE,IAAI,CAAE,+BA4BvC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAI,EAC5C,IAAI,EACJ,OAAO,EACP,SAAS,GACT,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAuD1B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-item-actions/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAoB7D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAI1E,MAAM,WAAW,kBAAkB,CAAE,IAAI;IACxC,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE,CAAC;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACd;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,CAAC;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,UAAU,oBAAoB,CAAE,IAAI,CAAG,SAAQ,gBAAgB,CAAE,IAAI,CAAE;IACtE,aAAa,EAAE,CAAE,KAAK,EAAE,kBAAkB,CAAE,IAAI,CAAE,KAAM,YAAY,CAAC;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,6BAA6B,CAAE,IAAI;IAC5C,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,IAAI,EAAE,IAAI,CAAC;CACX;AAED,UAAU,gBAAgB,CAAE,IAAI;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAE,IAAI,CAAE,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AA0CD,wBAAgB,WAAW,CAAE,IAAI,EAAI,EACpC,MAAM,EACN,KAAK,EACL,UAAU,GACV,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAiB1B;AAED,wBAAgB,eAAe,CAAE,IAAI,EAAI,EACxC,MAAM,EACN,KAAK,EACL,aAAa,EACb,MAAM,GACN,EAAE,oBAAoB,CAAE,IAAI,CAAE,+BAsB9B;AAED,wBAAgB,wBAAwB,CAAE,IAAI,EAAI,EACjD,OAAO,EACP,IAAI,GACJ,EAAE,6BAA6B,CAAE,IAAI,CAAE,+BA4BvC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,IAAI,EAAI,EAC5C,IAAI,EACJ,OAAO,EACP,SAAS,GACT,EAAE,gBAAgB,CAAE,IAAI,CAAE,+BAuD1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-view-config/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgTpD,iBAAS,oBAAoB,CAAE,EAC9B,OAAO,EACP,UAAU,EACV,cAAkD,GAClD,EAAE;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAE,KAAK,CAAC,cAAc,CAAE,MAAM,CAAE,CAAE,CAAC;IAC7D,cAAc,CAAC,EAAE,gBAAgB,CAAC;CAClC,+BA+BA;AAED,QAAA,MAAM,mBAAmB,kEAA+B,CAAC;AAEzD,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dataviews-view-config/index.tsx"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAgfjE,iBAAS,oBAAoB,CAAE,EAC9B,OAAO,EACP,UAAU,EACV,cAAkD,GAClD,EAAE;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAE,KAAK,CAAC,cAAc,CAAE,MAAM,CAAE,CAAE,CAAC;IAC7D,cAAc,CAAC,EAAE,gBAAgB,CAAC;CAClC,+BA+BA;AAED,QAAA,MAAM,mBAAmB,kEAA+B,CAAC;AAEzD,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;AAoHzE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,GACR,EAAE,aAAa,CAAE,IAAI,CAAE,+BA2BvB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataforms-layouts/panel/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;AAsHzE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,GACR,EAAE,aAAa,CAAE,IAAI,CAAE,+BA2BvB"}
@@ -4,7 +4,7 @@
4
4
  import ViewTable from './table';
5
5
  import ViewGrid from './grid';
6
6
  import ViewList from './list';
7
- import type { View } from '../types';
7
+ import type { View, Field } from '../types';
8
8
  export declare const VIEW_LAYOUTS: ({
9
9
  type: string;
10
10
  label: string;
@@ -21,5 +21,7 @@ export declare const VIEW_LAYOUTS: ({
21
21
  component: typeof ViewList;
22
22
  icon: import("react").JSX.Element;
23
23
  })[];
24
- export declare function getMandatoryFields(view: View): string[];
24
+ export declare function getNotHidableFieldIds(view: View): string[];
25
+ export declare function getVisibleFieldIds(view: View, fields: Field<any>[]): string[];
26
+ export declare function getHiddenFieldIds(view: View, fields: Field<any>[]): string[];
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dataviews-layouts/index.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,SAAS,MAAM,SAAS,CAAC;AAChC,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAC9B,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAE9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;IAmBxB,CAAC;AAEF,wBAAgB,kBAAkB,CAAE,IAAI,EAAE,IAAI,GAAI,MAAM,EAAE,CAwBzD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dataviews-layouts/index.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,SAAS,MAAM,SAAS,CAAC;AAChC,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAC9B,OAAO,QAAQ,MAAM,QAAQ,CAAC;AAE9B,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;IAmBxB,CAAC;AAEF,wBAAgB,qBAAqB,CAAE,IAAI,EAAE,IAAI,GAAI,MAAM,EAAE,CAwB5D;AAYD,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,CAAE,GAAG,CAAE,EAAE,GACpB,MAAM,EAAE,CAoBV;AAED,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,CAAE,GAAG,CAAE,EAAE,GACpB,MAAM,EAAE,CAqBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/list/index.tsx"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,aAAa,CAAC;AAuR1E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,KAAK,EAAE,aAAa,CAAE,IAAI,CAAE,+BA0GrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/list/index.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,aAAa,CAAC;AAyR1E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,IAAI,EAAI,KAAK,EAAE,aAAa,CAAE,IAAI,CAAE,+BAsLrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"column-header-menu.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/column-header-menu.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAkB,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAoB5E,OAAO,KAAK,EACX,eAAe,EAEf,SAAS,IAAI,aAAa,EAC1B,MAAM,aAAa,CAAC;AAWrB,UAAU,eAAe,CAAE,IAAI;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,YAAY,EAAE,CAAE,IAAI,EAAE,aAAa,KAAM,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,KAAM,IAAI,CAAC;IACnD,eAAe,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;CAC7C;AAaD,QAAA,MAAM,WAAW,wGAuMd,CAAC;AAGJ,QAAA,MAAM,gBAAgB,EAAE,CAAE,IAAI,EAC7B,KAAK,EAAE,eAAe,CAAE,eAAe,CAAE,IAAI,CAAE,CAAE,GAChD,aAAa,CAAE,iBAAiB,CAAE,KAC/B,UAAU,CAAE,OAAO,WAAW,CAAgB,CAAC;AAEpD,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"column-header-menu.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/column-header-menu.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAkB,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAoB5E,OAAO,KAAK,EACX,eAAe,EAEf,SAAS,IAAI,aAAa,EAE1B,MAAM,aAAa,CAAC;AAKrB,UAAU,eAAe,CAAE,IAAI;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAE,IAAI,CAAE,EAAE,CAAC;IAClC,YAAY,EAAE,CAAE,IAAI,EAAE,aAAa,KAAM,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAE,KAAK,EAAE,eAAe,CAAE,IAAI,CAAE,KAAM,IAAI,CAAC;IACnD,eAAe,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;CAC7C;AAaD,QAAA,MAAM,WAAW,wGA0Md,CAAC;AAGJ,QAAA,MAAM,gBAAgB,EAAE,CAAE,IAAI,EAC7B,KAAK,EAAE,eAAe,CAAE,eAAe,CAAE,IAAI,CAAE,CAAE,GAChD,aAAa,CAAE,iBAAiB,CAAE,KAC/B,UAAU,CAAE,OAAO,WAAW,CAAgB,CAAC;AAEpD,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAIX,cAAc,EAEd,MAAM,aAAa,CAAC;AAsQrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,IAAI,GACJ,EAAE,cAAc,CAAE,IAAI,CAAE,2CA4JxB;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews-layouts/table/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAIX,cAAc,EAEd,MAAM,aAAa,CAAC;AAmNrB,iBAAS,SAAS,CAAE,IAAI,EAAI,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,IAAI,GACJ,EAAE,cAAc,CAAE,IAAI,CAAE,2CA4JxB;AAED,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-fields.d.ts","sourceRoot":"","sources":["../src/normalize-fields.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,IAAI,EACpC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CAkD3B"}
1
+ {"version":3,"file":"normalize-fields.d.ts","sourceRoot":"","sources":["../src/normalize-fields.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAE,IAAI,EACpC,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE,EAAE,GACrB,eAAe,CAAE,IAAI,CAAE,EAAE,CAoD3B"}
@@ -137,6 +137,8 @@ export type NormalizedField<Item> = Field<Item> & {
137
137
  Edit: ComponentType<DataFormControlProps<Item>>;
138
138
  sort: (a: Item, b: Item, direction: SortDirection) => number;
139
139
  isValid: (item: Item, context?: ValidationContext) => boolean;
140
+ enableHiding: boolean;
141
+ enableSorting: boolean;
140
142
  };
141
143
  /**
142
144
  * A collection of dataview fields for a data type.