@absreim/react-bootstrap-data-grid 4.0.0 → 4.2.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 (91) hide show
  1. package/common/constants.d.ts +2 -0
  2. package/common/constants.js +2 -0
  3. package/common/editing/types.d.ts +30 -0
  4. package/common/export/types.d.ts +6 -0
  5. package/common/export/useExportFn.js +1 -1
  6. package/common/filtering/DateFilterRow.d.ts +1 -1
  7. package/common/filtering/DateFilterRow.js +1 -1
  8. package/common/filtering/FilterOptionsTable.d.ts +3 -2
  9. package/common/filtering/NumberFilterRow.d.ts +1 -1
  10. package/common/filtering/NumberFilterRow.js +1 -1
  11. package/common/filtering/StringFilterRow.js +1 -1
  12. package/common/filtering/constants.d.ts +19 -0
  13. package/common/filtering/constants.js +44 -0
  14. package/common/filtering/internalTypes.d.ts +77 -0
  15. package/common/filtering/types.d.ts +165 -22
  16. package/common/filtering/types.js +46 -17
  17. package/common/filtering/useFilterFormState.d.ts +1 -1
  18. package/common/index.d.ts +0 -3
  19. package/common/index.js +0 -3
  20. package/common/internalTypes.d.ts +10 -0
  21. package/common/pagination/Pagination.d.ts +1 -1
  22. package/common/pagination/internalTypes.d.ts +8 -0
  23. package/common/pagination/internalTypes.js +1 -0
  24. package/common/pagination/types.d.ts +105 -5
  25. package/common/pipeline/{types.d.ts → internalTypes.d.ts} +5 -0
  26. package/common/pipeline/internalTypes.js +1 -0
  27. package/common/pipeline/useAugFormattedRows.d.ts +3 -2
  28. package/common/pipeline/useColNameToWidth.d.ts +2 -1
  29. package/common/pipeline/useCombinedPipeline/index.d.ts +4 -3
  30. package/common/pipeline/useCombinedPipeline/useCurrentPageRows.d.ts +2 -1
  31. package/common/pipeline/useCombinedPipeline/useCurrentPageRows.js +3 -2
  32. package/common/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +2 -1
  33. package/common/pipeline/useCombinedPipeline/useFilterStateStore.d.ts +2 -1
  34. package/common/pipeline/useGridSelectionFns.d.ts +2 -1
  35. package/common/selection/internalTypes.d.ts +34 -0
  36. package/common/selection/internalTypes.js +1 -0
  37. package/common/selection/types.d.ts +91 -17
  38. package/common/selection/types.js +0 -3
  39. package/common/sorting/internalTypes.d.ts +10 -0
  40. package/common/sorting/internalTypes.js +1 -0
  41. package/common/sorting/types.d.ts +48 -4
  42. package/common/sorting/useSortHeaderStates.d.ts +1 -1
  43. package/common/styling/types.d.ts +57 -0
  44. package/common/toolbar/Toolbar.d.ts +1 -1
  45. package/common/toolbar/ToolbarContainer.d.ts +1 -1
  46. package/common/toolbar/{types.d.ts → internalTypes.d.ts} +27 -0
  47. package/common/toolbar/internalTypes.js +1 -0
  48. package/common/toolbar/useInterfaces.d.ts +1 -1
  49. package/common/types.d.ts +165 -18
  50. package/common/util/datetime.d.ts +17 -0
  51. package/common/util/datetime.js +17 -0
  52. package/common/util/getWidthStyle.d.ts +9 -0
  53. package/common/util/getWidthStyle.js +9 -0
  54. package/common/util/index.d.ts +0 -4
  55. package/common/util/index.js +0 -4
  56. package/common/util/isSubset.d.ts +12 -1
  57. package/common/util/isSubset.js +13 -2
  58. package/common/util/useControlledHover.d.ts +5 -0
  59. package/common/util/useControlledHover.js +5 -0
  60. package/grid/focus/types.d.ts +15 -0
  61. package/grid/focus/types.js +1 -0
  62. package/grid/focus/useGridFocus.d.ts +10 -0
  63. package/grid/focus/useGridFocus.js +130 -0
  64. package/grid/main/Grid.d.ts +5 -0
  65. package/grid/main/Grid.js +26 -8
  66. package/grid/main/GridBody.d.ts +1 -1
  67. package/grid/main/GridBody.js +20 -9
  68. package/grid/main/GridHeader.d.ts +1 -1
  69. package/grid/main/GridHeader.js +8 -4
  70. package/grid/main/internalTypes.d.ts +29 -0
  71. package/grid/main/internalTypes.js +1 -0
  72. package/grid/main/types.d.ts +114 -16
  73. package/grid.css +1 -1
  74. package/grid.scss +26 -14
  75. package/package.json +5 -5
  76. package/table/InternalTable.d.ts +1 -1
  77. package/table/Table.d.ts +5 -1
  78. package/table/Table.js +5 -0
  79. package/table/editing/EditableRow.d.ts +1 -1
  80. package/table/editing/EditableRow.js +1 -1
  81. package/table/internalTypes.d.ts +23 -0
  82. package/table/internalTypes.js +1 -0
  83. package/table/main/BodyRows.d.ts +4 -3
  84. package/table/main/ColHeaderCell/index.d.ts +1 -1
  85. package/table/selection/SelectAllHeaderCell.d.ts +1 -1
  86. package/table/styling/types.d.ts +122 -5
  87. package/table/types.d.ts +62 -15
  88. package/common/util/trueModulo.d.ts +0 -2
  89. package/common/util/trueModulo.js +0 -4
  90. /package/common/{pipeline/types.js → filtering/internalTypes.js} +0 -0
  91. /package/common/{toolbar/types.js → internalTypes.js} +0 -0
package/table/types.d.ts CHANGED
@@ -1,19 +1,66 @@
1
- import { ColSortModel } from "../common/sorting/types";
2
- import { ColDefBase, MainComponentSharedProps } from "../common/types";
3
- import { StyleModel } from "../common/styling/types";
1
+ import { EditModel, FilterModel, MainComponentSharedProps, PaginationModel, SelectModel, SortModel, StyleModel } from "../common";
2
+ /**
3
+ * Available options for the displayMode prop of {@link TableSpecificProps}.
4
+ *
5
+ * @public
6
+ */
4
7
  export type DisplayMode = "table" | "block";
5
- export type TableProps = MainComponentSharedProps & {
6
- caption?: string;
8
+ /**
9
+ * Props specific to the {@link Table} component and not the {@link Grid}
10
+ * component.
11
+ *
12
+ * @public
13
+ */
14
+ export interface TableSpecificProps {
15
+ /**
16
+ * The pagination model of the table. Passing a truthy value enables
17
+ * the pagination feature of the component.
18
+ */
19
+ pagination?: PaginationModel;
20
+ /**
21
+ * The sort model of the table. Passing a truthy value enables the
22
+ * sorting feature of the component.
23
+ */
24
+ sortModel?: SortModel;
25
+ /**
26
+ * The filter model of the table. Passing a truthy value enables the
27
+ * filtering feature of the component.
28
+ */
29
+ filterModel?: FilterModel;
30
+ /**
31
+ * The select model of the table. Passing a truthy value enables the
32
+ * selection feature of the component.
33
+ */
34
+ selectModel?: SelectModel;
35
+ /**
36
+ * The edit model of the table. Passing a truthy value enables the
37
+ * editing feature of the component.
38
+ */
39
+ editModel?: EditModel;
40
+ /**
41
+ * The style model of the table. Passing a truthy value enables the
42
+ * developer to customize the CSS classes applied to various elements of the
43
+ * table.
44
+ */
7
45
  styleModel?: StyleModel;
46
+ /**
47
+ * Enables exporting of data from the table.
48
+ */
49
+ allowExport?: boolean;
50
+ /**
51
+ * Sets a caption for the table
52
+ */
53
+ caption?: string;
54
+ /**
55
+ * Sets the CSS display property for the table element.
56
+ *
57
+ * @defaultValue `"table"`
58
+ */
8
59
  displayMode?: DisplayMode;
9
- };
10
- export type BaseTableProps = Omit<TableProps, "cols"> & {
11
- cols: ColDefBase[];
12
- };
13
- export interface ColHeaderCellProps {
14
- label: string;
15
- sortModel?: ColSortModel;
16
- ariaColIndex: number;
17
- additionalClasses?: string[] | null;
18
- width?: number;
19
60
  }
61
+ /**
62
+ * The type of the props object for the Table component.
63
+ *
64
+ * @public
65
+ */
66
+ export type TableProps = MainComponentSharedProps & TableSpecificProps;
@@ -1,2 +0,0 @@
1
- declare const trueModulo: (num: number, divisor: number) => number;
2
- export default trueModulo;
@@ -1,4 +0,0 @@
1
- var trueModulo = function (num, divisor) {
2
- return ((num % divisor) + divisor) % divisor;
3
- };
4
- export default trueModulo;
File without changes