mantine-datatable 7.1.0-alpha.5 → 7.1.1

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 (127) hide show
  1. package/dist/esm/DataTableFooter.js +1 -1
  2. package/dist/esm/DataTableFooter.js.map +1 -1
  3. package/dist/esm/DataTableScrollArea.js +3 -5
  4. package/dist/esm/DataTableScrollArea.js.map +1 -1
  5. package/package.json +5 -12
  6. package/dist/cjs/DataTable.js +0 -222
  7. package/dist/cjs/DataTable.js.map +0 -1
  8. package/dist/cjs/DataTableColumnGroupHeaderCell.js +0 -34
  9. package/dist/cjs/DataTableColumnGroupHeaderCell.js.map +0 -1
  10. package/dist/cjs/DataTableEmptyRow.js +0 -9
  11. package/dist/cjs/DataTableEmptyRow.js.map +0 -1
  12. package/dist/cjs/DataTableEmptyState.js +0 -12
  13. package/dist/cjs/DataTableEmptyState.js.map +0 -1
  14. package/dist/cjs/DataTableFooter.js +0 -52
  15. package/dist/cjs/DataTableFooter.js.map +0 -1
  16. package/dist/cjs/DataTableFooterCell.js +0 -33
  17. package/dist/cjs/DataTableFooterCell.js.map +0 -1
  18. package/dist/cjs/DataTableFooterSelectorPlaceholderCell.js +0 -11
  19. package/dist/cjs/DataTableFooterSelectorPlaceholderCell.js.map +0 -1
  20. package/dist/cjs/DataTableHeader.js +0 -48
  21. package/dist/cjs/DataTableHeader.js.map +0 -1
  22. package/dist/cjs/DataTableHeaderCell.js +0 -50
  23. package/dist/cjs/DataTableHeaderCell.js.map +0 -1
  24. package/dist/cjs/DataTableHeaderCellFilter.js +0 -20
  25. package/dist/cjs/DataTableHeaderCellFilter.js.map +0 -1
  26. package/dist/cjs/DataTableHeaderSelectorCell.js +0 -24
  27. package/dist/cjs/DataTableHeaderSelectorCell.js.map +0 -1
  28. package/dist/cjs/DataTableLoader.js +0 -15
  29. package/dist/cjs/DataTableLoader.js.map +0 -1
  30. package/dist/cjs/DataTablePageSizeSelector.js +0 -40
  31. package/dist/cjs/DataTablePageSizeSelector.js.map +0 -1
  32. package/dist/cjs/DataTablePagination.js +0 -46
  33. package/dist/cjs/DataTablePagination.js.map +0 -1
  34. package/dist/cjs/DataTableRow.js +0 -79
  35. package/dist/cjs/DataTableRow.js.map +0 -1
  36. package/dist/cjs/DataTableRowCell.js +0 -51
  37. package/dist/cjs/DataTableRowCell.js.map +0 -1
  38. package/dist/cjs/DataTableRowExpansion.js +0 -25
  39. package/dist/cjs/DataTableRowExpansion.js.map +0 -1
  40. package/dist/cjs/DataTableRowSelectorCell.js +0 -35
  41. package/dist/cjs/DataTableRowSelectorCell.js.map +0 -1
  42. package/dist/cjs/DataTableScrollArea.js +0 -43
  43. package/dist/cjs/DataTableScrollArea.js.map +0 -1
  44. package/dist/cjs/cssVariables.js +0 -53
  45. package/dist/cjs/cssVariables.js.map +0 -1
  46. package/dist/cjs/hooks/index.js +0 -25
  47. package/dist/cjs/hooks/index.js.map +0 -1
  48. package/dist/cjs/hooks/useElementOuterSize.js +0 -13
  49. package/dist/cjs/hooks/useElementOuterSize.js.map +0 -1
  50. package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +0 -7
  51. package/dist/cjs/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  52. package/dist/cjs/hooks/useLastSelectionChangeIndex.js +0 -15
  53. package/dist/cjs/hooks/useLastSelectionChangeIndex.js.map +0 -1
  54. package/dist/cjs/hooks/useMediaQueries.js +0 -57
  55. package/dist/cjs/hooks/useMediaQueries.js.map +0 -1
  56. package/dist/cjs/hooks/useMediaQueriesStringOrFunction.js +0 -15
  57. package/dist/cjs/hooks/useMediaQueriesStringOrFunction.js.map +0 -1
  58. package/dist/cjs/hooks/useMediaQueryStringOrFunction.js +0 -13
  59. package/dist/cjs/hooks/useMediaQueryStringOrFunction.js.map +0 -1
  60. package/dist/cjs/hooks/useRowExpansion.js +0 -69
  61. package/dist/cjs/hooks/useRowExpansion.js.map +0 -1
  62. package/dist/cjs/hooks/useRowExpansionStatus.js +0 -27
  63. package/dist/cjs/hooks/useRowExpansionStatus.js.map +0 -1
  64. package/dist/cjs/icons/IconArrowUp.js +0 -9
  65. package/dist/cjs/icons/IconArrowUp.js.map +0 -1
  66. package/dist/cjs/icons/IconArrowsVertical.js +0 -9
  67. package/dist/cjs/icons/IconArrowsVertical.js.map +0 -1
  68. package/dist/cjs/icons/IconDatabaseOff.js +0 -9
  69. package/dist/cjs/icons/IconDatabaseOff.js.map +0 -1
  70. package/dist/cjs/icons/IconFilter.js +0 -9
  71. package/dist/cjs/icons/IconFilter.js.map +0 -1
  72. package/dist/cjs/icons/IconFilterFilled.js +0 -9
  73. package/dist/cjs/icons/IconFilterFilled.js.map +0 -1
  74. package/dist/cjs/icons/IconSelector.js +0 -9
  75. package/dist/cjs/icons/IconSelector.js.map +0 -1
  76. package/dist/cjs/index.js +0 -22
  77. package/dist/cjs/index.js.map +0 -1
  78. package/dist/cjs/types/DataTableCellClickHandler.js +0 -3
  79. package/dist/cjs/types/DataTableCellClickHandler.js.map +0 -1
  80. package/dist/cjs/types/DataTableColorProps.js +0 -3
  81. package/dist/cjs/types/DataTableColorProps.js.map +0 -1
  82. package/dist/cjs/types/DataTableColumn.js +0 -3
  83. package/dist/cjs/types/DataTableColumn.js.map +0 -1
  84. package/dist/cjs/types/DataTableColumnGroup.js +0 -3
  85. package/dist/cjs/types/DataTableColumnGroup.js.map +0 -1
  86. package/dist/cjs/types/DataTableColumnProps.js +0 -3
  87. package/dist/cjs/types/DataTableColumnProps.js.map +0 -1
  88. package/dist/cjs/types/DataTableColumnTextAlign.js +0 -3
  89. package/dist/cjs/types/DataTableColumnTextAlign.js.map +0 -1
  90. package/dist/cjs/types/DataTableDefaultColumnProps.js +0 -3
  91. package/dist/cjs/types/DataTableDefaultColumnProps.js.map +0 -1
  92. package/dist/cjs/types/DataTableEmptyStateProps.js +0 -3
  93. package/dist/cjs/types/DataTableEmptyStateProps.js.map +0 -1
  94. package/dist/cjs/types/DataTableLoaderProps.js +0 -3
  95. package/dist/cjs/types/DataTableLoaderProps.js.map +0 -1
  96. package/dist/cjs/types/DataTableOuterBorderProps.js +0 -3
  97. package/dist/cjs/types/DataTableOuterBorderProps.js.map +0 -1
  98. package/dist/cjs/types/DataTablePageSizeSelectorProps.js +0 -3
  99. package/dist/cjs/types/DataTablePageSizeSelectorProps.js.map +0 -1
  100. package/dist/cjs/types/DataTablePaginationProps.js +0 -3
  101. package/dist/cjs/types/DataTablePaginationProps.js.map +0 -1
  102. package/dist/cjs/types/DataTableProps.js +0 -3
  103. package/dist/cjs/types/DataTableProps.js.map +0 -1
  104. package/dist/cjs/types/DataTableRowClickHandler.js +0 -3
  105. package/dist/cjs/types/DataTableRowClickHandler.js.map +0 -1
  106. package/dist/cjs/types/DataTableRowExpansionCollapseProps.js +0 -3
  107. package/dist/cjs/types/DataTableRowExpansionCollapseProps.js.map +0 -1
  108. package/dist/cjs/types/DataTableRowExpansionProps.js +0 -3
  109. package/dist/cjs/types/DataTableRowExpansionProps.js.map +0 -1
  110. package/dist/cjs/types/DataTableScrollProps.js +0 -3
  111. package/dist/cjs/types/DataTableScrollProps.js.map +0 -1
  112. package/dist/cjs/types/DataTableSelectionProps.js +0 -3
  113. package/dist/cjs/types/DataTableSelectionProps.js.map +0 -1
  114. package/dist/cjs/types/DataTableSortProps.js +0 -3
  115. package/dist/cjs/types/DataTableSortProps.js.map +0 -1
  116. package/dist/cjs/types/DataTableSortStatus.js +0 -3
  117. package/dist/cjs/types/DataTableSortStatus.js.map +0 -1
  118. package/dist/cjs/types/DataTableVerticalAlign.js +0 -3
  119. package/dist/cjs/types/DataTableVerticalAlign.js.map +0 -1
  120. package/dist/cjs/types/index.js +0 -34
  121. package/dist/cjs/types/index.js.map +0 -1
  122. package/dist/cjs/types/utils.js +0 -3
  123. package/dist/cjs/types/utils.js.map +0 -1
  124. package/dist/cjs/utilityClasses.js +0 -11
  125. package/dist/cjs/utilityClasses.js.map +0 -1
  126. package/dist/cjs/utils.js +0 -49
  127. package/dist/cjs/utils.js.map +0 -1
package/dist/cjs/index.js DELETED
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.DataTable = void 0;
18
- var DataTable_1 = require("./DataTable");
19
- Object.defineProperty(exports, "DataTable", { enumerable: true, get: function () { return DataTable_1.DataTable; } });
20
- __exportStar(require("./types"), exports);
21
- __exportStar(require("./utils"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../package/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,0CAAwB;AACxB,0CAAwB","sourcesContent":["export { DataTable } from './DataTable';\nexport * from './types';\nexport * from './utils';\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableCellClickHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableCellClickHandler.js","sourceRoot":"","sources":["../../../package/types/DataTableCellClickHandler.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataTableColumn } from './DataTableColumn';\n\nexport type DataTableCellClickHandler<T = Record<string, unknown>> = (params: {\n /**\n * Click event.\n */\n event: React.MouseEvent;\n\n /**\n * Clicked record.\n */\n record: T;\n /**\n * Clicked record index.\n */\n index: number;\n /**\n * Clicked column information.\n */\n column: DataTableColumn<T>;\n /**\n * Clicked column index.\n */\n columnIndex: number;\n}) => void;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableColorProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableColorProps.js","sourceRoot":"","sources":["../../../package/types/DataTableColorProps.ts"],"names":[],"mappings":"","sourcesContent":["import { MantineColor } from '@mantine/core';\n\nexport type DataTableColorProps<T> = {\n /**\n * Data table text color.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n c?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Data table background color.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n backgroundColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Color of table borders, applied to all borders except row borders.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n borderColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Color of row borders.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n rowBorderColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Background color of striped rows.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n stripedColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Background color of hover-highlighted row.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n highlightOnHoverColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Data table row text color.\n * A function that accepts row data and returns color.\n * The returned color can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n rowColor?: (record: T, index: number) => MantineColor | undefined | { light: MantineColor; dark: MantineColor };\n\n /**\n * Data table row background color.\n * A function that accepts row data and returns background color color.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n */\n rowBackgroundColor?: (\n record: T,\n index: number\n ) => MantineColor | undefined | { light: MantineColor; dark: MantineColor };\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableColumn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableColumn.js","sourceRoot":"","sources":["../../../package/types/DataTableColumn.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineStyleProp, MantineTheme } from '@mantine/core';\nimport type { DataTableColumnTextAlign } from './DataTableColumnTextAlign';\n\nexport type DataTableColumn<T = Record<string, unknown>> = {\n /**\n * Column accessor.\n * You can use dot-notation for nested objects property drilling.\n * (i.e. `department.name` or `department.company.name`)\n */\n accessor: keyof T | (string & NonNullable<unknown>);\n\n /**\n * Optional column header title.\n * If not present, one will be generated by \"humanizing\" the provided column accessor.\n * (i.e. `firstName` -> `First name`; `user.firstName` -> `User first name`)\n */\n title?: React.ReactNode;\n\n /**\n * Custom cell data render function.\n * Accepts the current record and its index in `records` as arguments and returns a React node\n * (remember that a string is a valid React node too).\n */\n render?: (record: T, index: number) => React.ReactNode;\n\n /**\n * Column text alignment.\n * @default `left`\n */\n textAlign?: DataTableColumnTextAlign;\n\n /**\n * If true, column will be sortable.\n */\n sortable?: boolean;\n\n /**\n * Optional node providing the user with filtering options.\n * If present, a filter button will be added to the column's header. Upon clicking that button,\n * a pop-over showing the provided node will be opened.\n *\n * Alternatively, a function returning a node can be provided. The function receives props with a `close`\n * method which allows programatically closing the pop-over.\n *\n * ```tsx\n * // …\n * columns={[\n * {\n * accessor: 'name',\n * filter: ({ close }) => {\n * return <Stack>\n * <Button onClick={() => { setFilter(undefined); close(); }}>Reset</Button>\n * </Stack>\n * },\n * }\n * ]}\n * // …\n * ```\n *\n * Note: this property only takes care of rendering the node which provides the filtering options.\n * It is assumed that the actual filtering is performed somewhere in user code.\n */\n filter?: React.ReactNode | ((params: { close: () => void }) => React.ReactNode);\n\n /**\n * If true, filter icon will be styled differently to indicate the filter is in effect.\n */\n filtering?: boolean;\n\n /**\n * Desired column width.\n */\n width?: string | number;\n\n /**\n * If true, column will not be visible.\n */\n hidden?: boolean;\n\n /**\n * If set, the column will only be visible according to the specified media query.\n * Can be a string, or a function receiving the current theme and returning a string.\n */\n visibleMediaQuery?: string | ((theme: MantineTheme) => string);\n\n /**\n * Optional class name passed to the column title\n */\n titleClassName?: string;\n\n /**\n * Optional style passed to the column title.\n * Either a style object, or a function receiving the current theme and returning a style object.\n */\n titleStyle?: MantineStyleProp;\n\n /**\n * Optional class name passed to each data cell in the column.\n * Can be a string, or a function receiving the current record and its index\n * as arguments and returning a string.\n */\n cellsClassName?: string | ((record: T, index: number) => string | undefined);\n\n /**\n * Optional style passed to each data cell in the column.\n * A function that receives the current record and its index as arguments and returns either\n * a style object, or a function that accepts theme and returns a style object.\n */\n cellsStyle?: (record: T, index: number) => MantineStyleProp | undefined;\n\n /**\n * Optional function returning an object of custom attributes to be applied to each cell in the column.\n * Receives the current record and its index as arguments.\n * Useful for adding data attributes, handling middle-clicks, etc.\n */\n customCellAttributes?: (record: T, index: number) => Record<string, unknown>;\n\n /**\n * Optional column footer content.\n * If at least one column has a footer, the table will display a footer row.\n */\n footer?: React.ReactNode;\n\n /**\n * Optional class name passed to the column footer.\n */\n footerClassName?: string;\n\n /**\n * Optional style passed to the column footer.\n */\n footerStyle?: MantineStyleProp;\n} & (\n | {\n /**\n * If true, cell content in this column will be truncated with ellipsis as needed and will not wrap\n * to multiple lines (i.e. `overflow: hidden; text-overflow: ellipsis`; `white-space: nowrap`).\n * On a column, you can either set this property or `noWrap`, but not both.\n */\n ellipsis?: boolean;\n\n noWrap?: never;\n }\n | {\n ellipsis?: never;\n\n /**\n * If true, cell content in this column will not wrap to multiple lines (i.e. `white-space: nowrap`).\n * This is useful for columns containing long strings.\n * On a column, you can either set this property or `ellipsis`, but not both.\n */\n noWrap?: boolean;\n }\n);\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableColumnGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableColumnGroup.js","sourceRoot":"","sources":["../../../package/types/DataTableColumnGroup.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineStyleProp } from '@mantine/core';\nimport type { DataTableColumn } from './DataTableColumn';\nimport type { DataTableColumnTextAlign } from './DataTableColumnTextAlign';\n\nexport type DataTableColumnGroup<T = Record<string, unknown>> = {\n /**\n * Used as the `key` prop for the created `<th />`.\n */\n id: string;\n\n /**\n * Component to render inside the column group header.\n */\n title?: React.ReactNode;\n\n /**\n * Text alignment of the column group header.\n * @default `left`\n */\n textAlign?: DataTableColumnTextAlign;\n\n /**\n * Columns which are part of the group.\n */\n columns: DataTableColumn<T>[];\n\n /**\n * Optional className to apply to the column group header.\n */\n className?: string;\n\n /**\n * Optional style to apply to the column group header.\n * Can be a style object or a function which receives the current theme and\n * returns a style object.\n */\n style?: MantineStyleProp;\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableColumnProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableColumnProps.js","sourceRoot":"","sources":["../../../package/types/DataTableColumnProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataTableColumn } from './DataTableColumn';\nimport type { DataTableColumnGroup } from './DataTableColumnGroup';\n\nexport type DataTableColumnProps<T = Record<string, unknown>> =\n | {\n /**\n * Grouped columns.\n */\n groups: DataTableColumnGroup<T>[];\n\n columns?: never;\n }\n | {\n groups?: never;\n\n /**\n * Visible columns.\n */\n columns: DataTableColumn<T>[];\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableColumnTextAlign.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableColumnTextAlign.js","sourceRoot":"","sources":["../../../package/types/DataTableColumnTextAlign.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableColumnTextAlign = 'left' | 'center' | 'right';\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableDefaultColumnProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableDefaultColumnProps.js","sourceRoot":"","sources":["../../../package/types/DataTableDefaultColumnProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataTableColumn } from './DataTableColumn';\n\nexport type DataTableDefaultColumnProps<T = Record<string, unknown>> = Omit<\n DataTableColumn<T>,\n 'accessor' | 'hidden' | 'visibleMediaQuery' | 'render'\n>;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableEmptyStateProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableEmptyStateProps.js","sourceRoot":"","sources":["../../../package/types/DataTableEmptyStateProps.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableEmptyStateProps =\n | {\n /**\n * Content to show when no records are available.\n * The provided content will be overlaid and centered automatically.\n * You can either provide this property or `noRecordsIcon`, but not both.\n */\n emptyState?: React.ReactNode;\n\n noRecordsIcon?: never;\n }\n | {\n emptyState?: never;\n\n /**\n * Icon to show when no records are available.\n * The provided icon will be overlaid and centered automatically.\n * You can either provide this property or `emptyState`, but not both.\n */\n noRecordsIcon?: React.ReactNode;\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableLoaderProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableLoaderProps.js","sourceRoot":"","sources":["../../../package/types/DataTableLoaderProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineColor, MantineLoader, MantineSize } from '@mantine/core';\n\nexport type DataTableLoaderProps = {\n /**\n * Loader background blur (in pixels).\n */\n loaderBackgroundBlur?: number;\n} & (\n | {\n loaderSize?: never;\n loaderType?: never;\n loaderColor?: never;\n\n /**\n * Custom loader component to use instead of default one.\n */\n customLoader?: React.ReactNode;\n }\n | {\n /**\n * Loader size.\n * @default `lg`.\n */\n loaderSize?: MantineSize | (string & NonNullable<unknown>) | number;\n\n /**\n * Loader type.\n */\n loaderType?: MantineLoader;\n\n /**\n * Loader color.\n */\n loaderColor?: MantineColor;\n\n customLoader?: never;\n }\n);\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableOuterBorderProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableOuterBorderProps.js","sourceRoot":"","sources":["../../../package/types/DataTableOuterBorderProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineSize } from '@mantine/core';\n\nexport type DataTableOuterBorderProps =\n | {\n withTableBorder?: never;\n borderRadius?: never;\n }\n | {\n /**\n * If true, table will have border.\n */\n withTableBorder: boolean;\n\n /**\n * Table border radius.\n */\n borderRadius?: MantineSize | (string & NonNullable<unknown>) | number;\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTablePageSizeSelectorProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTablePageSizeSelectorProps.js","sourceRoot":"","sources":["../../../package/types/DataTablePageSizeSelectorProps.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTablePageSizeSelectorProps =\n | {\n onRecordsPerPageChange?: never;\n recordsPerPageOptions?: never;\n recordsPerPageLabel?: never;\n }\n | {\n /**\n * Callback fired a new page size is selected.\n * Receives new page size as argument.\n */\n onRecordsPerPageChange: (recordsPerPage: number) => void;\n\n /**\n * Array of page sizes (numbers) to show in records per page selector.\n */\n recordsPerPageOptions: number[];\n\n /**\n * Label for records per page selector.\n */\n recordsPerPageLabel?: string;\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTablePaginationProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTablePaginationProps.js","sourceRoot":"","sources":["../../../package/types/DataTablePaginationProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineColor, MantineSize } from '@mantine/core';\nimport type { DataTablePageSizeSelectorProps } from './DataTablePageSizeSelectorProps';\n\nexport type DataTablePaginationProps = (\n | {\n paginationWithEdges?: never;\n page?: never;\n onPageChange?: never;\n totalRecords?: never;\n recordsPerPage?: never;\n paginationActiveTextColor?: never;\n paginationActiveBackgroundColor?: never;\n paginationSize?: never;\n loadingText?: never;\n paginationText?: never;\n paginationWrapBreakpoint?: never;\n getPaginationControlProps?: never;\n }\n | {\n /**\n * Whenther to show first and last page navigation buttons.\n */\n paginationWithEdges?: boolean;\n\n /**\n * Current page number (1-based).\n * If provided, a pagination component is shown.\n */\n page: number;\n\n /**\n * Callback fired after page change.\n * Receives the new page number as argument.\n */\n onPageChange: (page: number) => void;\n\n /**\n * Total number of records in the dataset.\n */\n totalRecords: number | undefined;\n\n /**\n * Number of records per page.\n */\n recordsPerPage: number;\n\n /**\n * Pagination component size.\n * @default `sm`\n */\n paginationSize?: MantineSize;\n\n /**\n * Color applied to active page button text.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n * Defaults to white.\n */\n paginationActiveTextColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Color applied to active page button background.\n * Can be a `MantineColor` (key of `theme.colors` or any valid CSS color string),\n * or an object with `light` and `dark` keys and `MantineColor` values.\n * Defaults to primary theme color.\n */\n paginationActiveBackgroundColor?: MantineColor | { light: MantineColor; dark: MantineColor };\n\n /**\n * Text to show while records are loading.\n */\n loadingText?: string;\n\n /**\n * Pagination text. Defaults to ```({ from, to, totalRecords }) => `${from}-${to}/${totalRecords}`\n * ```\n */\n paginationText?: (params: { from: number; to: number; totalRecords: number }) => React.ReactNode;\n\n /**\n * Pagination wrap breakpoints.\n * Below this breakpoint the content will be displayed on multiple lines,\n * above it the content will be displayed on a single line.\n * @default `sm`\n */\n paginationWrapBreakpoint?: MantineSize | (string & NonNullable<unknown>) | number;\n\n /**\n * Function that returns props object for pagination control.\n * Useful for improving accessibility.\n */\n getPaginationControlProps?: (control: 'first' | 'last' | 'previous' | 'next') => Record<string, unknown>;\n }\n) &\n DataTablePageSizeSelectorProps;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableProps.js","sourceRoot":"","sources":["../../../package/types/DataTableProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { MantineShadow, MantineStyleProp, ScrollAreaProps, StylesRecord, TableProps } from '@mantine/core';\nimport type { DataTableCellClickHandler } from './DataTableCellClickHandler';\nimport { DataTableColorProps } from './DataTableColorProps';\nimport type { DataTableColumnProps } from './DataTableColumnProps';\nimport type { DataTableDefaultColumnProps } from './DataTableDefaultColumnProps';\nimport type { DataTableEmptyStateProps } from './DataTableEmptyStateProps';\nimport type { DataTableLoaderProps } from './DataTableLoaderProps';\nimport type { DataTableOuterBorderProps } from './DataTableOuterBorderProps';\nimport type { DataTablePaginationProps } from './DataTablePaginationProps';\nimport type { DataTableRowClickHandler } from './DataTableRowClickHandler';\nimport type { DataTableRowExpansionProps } from './DataTableRowExpansionProps';\nimport type { DataTableScrollProps } from './DataTableScrollProps';\nimport type { DataTableSelectionProps } from './DataTableSelectionProps';\nimport type { DataTableSortProps } from './DataTableSortProps';\nimport type { DataTableVerticalAlign } from './DataTableVerticalAlign';\n\nexport type DataTableProps<T = Record<string, unknown>> = {\n /**\n * Data table container class name.\n */\n className?: string;\n\n /**\n * Data table container style.\n * Either a style object or a function that accepts current theme and returns a style object.\n */\n style?: MantineStyleProp;\n\n /**\n * Data table elements class names.\n * An object with `root`, `table`, `header`, `footer` and `pagination` keys and class names\n * as values.\n */\n classNames?: Partial<Record<'root' | 'table' | 'header' | 'footer' | 'pagination', string>>;\n\n /**\n * Data table elements styles.\n * An object with `root`, `table`, `header`, `footer` and `pagination` keys and\n * either style objects, or functions that accept current theme and return style objects, as values.\n */\n styles?: StylesRecord<'root' | 'table' | 'header' | 'footer' | 'pagination', MantineStyleProp>;\n\n /**\n * Table height.\n * @default '100%'\n */\n height?: string | number;\n\n /**\n * Minimum table height.\n */\n minHeight?: string | number;\n\n /**\n * DataTable component shadow.\n */\n shadow?: MantineShadow;\n\n /**\n * If true, the user will not be able to select text.\n */\n textSelectionDisabled?: boolean;\n\n /**\n * Vertical alignment for row cells.\n * @default `center`\n */\n verticalAlign?: DataTableVerticalAlign;\n\n /**\n * If true, will show a loader with semi-transparent background, centered over the table.\n */\n fetching?: boolean;\n\n /**\n * Default column props; will be merged with column props provided to each column\n */\n defaultColumnProps?: DataTableDefaultColumnProps<T>;\n\n /**\n * A default render function for all columns.\n * Accepts the current record, its index in `records` and the column `accessor` as\n * arguments and returns a React node (remember that a string is a valid React node too).\n */\n defaultColumnRender?: (\n record: T,\n index: number,\n accessor: keyof T | (string & NonNullable<unknown>)\n ) => React.ReactNode;\n\n /**\n * Accessor to use as unique record key.\n * Can be a string representing a property name or a function receiving the current record\n * and returning a unique value.\n * If you're providing a string, you can use dot-notation for nested objects property drilling\n * (i.e. `department.name` or `department.company.name`).\n * @default `id`\n */\n idAccessor?: (keyof T | (string & NonNullable<unknown>)) | ((record: T) => React.Key);\n\n /**\n * Visible records.\n * The component will try to infer its row type from here.\n */\n records?: T[];\n\n /**\n * Text to show on empty state and pagination footer when no records are available.\n */\n noRecordsText?: string;\n\n /**\n * If true, the table will not show the header with column titles.\n */\n noHeader?: boolean;\n\n /**\n * Function to call when a row cell is clicked.\n * Receives an object with the current record, its index in `records`, the current column,\n * its index in `columns` and the click event as properties.\n */\n onCellClick?: DataTableCellClickHandler<T>;\n\n /**\n * Function to call when the user right-clicks on a row cell.\n * Receives an object with the current record, its index in `records`, the current column,\n * its index in `columns` and the click event as properties.\n */\n onCellContextMenu?: DataTableCellClickHandler<T>;\n\n /**\n * Function to call when a row is clicked.\n * Receives an object with the current record, its index in `records` and the click event\n * as properties.\n */\n onRowClick?: DataTableRowClickHandler<T>;\n\n /**\n * Function to call when the user right-clicks on a row.\n * Receives an object with the current record, its index in `records` and the click event\n * as properties.\n */\n onRowContextMenu?: DataTableRowClickHandler<T>;\n\n /**\n * Defines the row expansion behavior.\n */\n rowExpansion?: DataTableRowExpansionProps<T>;\n\n /**\n * Optional class name passed to each row.\n * Can be a string or a function receiving the current record and its index as arguments and returning a string.\n */\n rowClassName?: string | ((record: T, index: number) => string | undefined);\n\n /**\n * Optional style passed to each row.\n * A function receiving the current record and its index as arguments and returning either\n * a style object, or a function that accepts theme and returns a style object.\n */\n rowStyle?: (record: T, index: number) => MantineStyleProp | undefined;\n\n /**\n * Optional function returning an object of custom attributes to be applied to each row in the table.\n * Receives the current record and its index as arguments.\n * Useful for adding data attributes, handling middle-clicks, etc.\n */\n customRowAttributes?: (record: T, index: number) => Record<string, unknown>;\n\n /**\n * Ref pointing to the scrollable viewport element.\n * Useful for imperative scrolling.\n */\n scrollViewportRef?: React.RefObject<HTMLDivElement>;\n\n /**\n * Additional props passed to the underlying `ScrollArea` element.\n */\n scrollAreaProps?: Omit<ScrollAreaProps, 'classNames' | 'styles' | 'onScrollPositionChange'>;\n /**\n * Ref pointing to the table body element.\n */\n bodyRef?: ((instance: HTMLTableSectionElement | null) => void) | React.RefObject<HTMLTableSectionElement>;\n} & Omit<\n TableProps,\n | 'onScroll'\n | 'className'\n | 'classNames'\n | 'style'\n | 'styles'\n | 'p'\n | 'px'\n | 'py'\n | 'pt'\n | 'pb'\n | 'layout'\n | 'captionSide'\n | 'c'\n | 'color'\n | 'borderColor'\n | 'stripedColor'\n | 'highlightOnHoverColor'\n> &\n DataTableColorProps<T> &\n DataTableColumnProps<T> &\n DataTableOuterBorderProps &\n DataTableLoaderProps &\n DataTableEmptyStateProps &\n DataTablePaginationProps &\n DataTableSortProps<T> &\n DataTableScrollProps &\n DataTableSelectionProps<T>;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableRowClickHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableRowClickHandler.js","sourceRoot":"","sources":["../../../package/types/DataTableRowClickHandler.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableRowClickHandler<T = Record<string, unknown>> = (params: {\n /**\n * Click event.\n */\n event: React.MouseEvent;\n\n /**\n * Clicked record.\n */\n record: T;\n\n /**\n * Clicked record index.\n */\n index: number;\n}) => void;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableRowExpansionCollapseProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableRowExpansionCollapseProps.js","sourceRoot":"","sources":["../../../package/types/DataTableRowExpansionCollapseProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { CollapseProps } from '@mantine/core';\n\nexport type DataTableRowExpansionCollapseProps = Pick<\n CollapseProps,\n 'animateOpacity' | 'transitionDuration' | 'transitionTimingFunction'\n>;\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableRowExpansionProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableRowExpansionProps.js","sourceRoot":"","sources":["../../../package/types/DataTableRowExpansionProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataTableRowExpansionCollapseProps } from './DataTableRowExpansionCollapseProps';\n\nexport type DataTableRowExpansionProps<T = Record<string, unknown>> = {\n /**\n * Defines when rows should expand.\n * @default `click`\n */\n trigger?: 'click' | 'always' | 'never';\n\n /**\n * If true, multiple rows can be expanded at the same time.\n */\n allowMultiple?: boolean;\n\n /**\n * Function defining which records will be initially expanded.\n * Accepts an object with `record` and `index` properties and returns a boolean specifying\n * whether the row should be expanded initially.\n * Does nothing if `trigger === 'always'`.\n */\n initiallyExpanded?: (options: { record: T; index: number }) => boolean;\n\n /**\n * Additional properties passed to the Mantine Collapse component wrapping the custom content.\n */\n collapseProps?: DataTableRowExpansionCollapseProps;\n\n /**\n * An object defining the row expansion behavior in controlled mode.\n */\n expanded?: {\n /**\n * Currently expanded record IDs.\n */\n recordIds: unknown[];\n\n /**\n * Callback fired when expanded records change.\n * Receives an array containing the newly expanded record IDs.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onRecordIdsChange?: React.Dispatch<React.SetStateAction<any[]>> | ((recordIds: unknown[]) => void);\n };\n\n /**\n * Function returning the custom content to be lazily rendered for an expanded row.\n * Accepts an object with properties containing the current record, its index,\n * and a `collapse()` callback that can be used to collapse the expanded row.\n * Must return a React node.\n */\n content: (params: { record: T; index: number; collapse: () => void }) => React.ReactNode;\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableScrollProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableScrollProps.js","sourceRoot":"","sources":["../../../package/types/DataTableScrollProps.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableScrollProps = {\n /**\n * Function to call when the DataTable is scrolled.\n */\n onScroll?: (position: { x: number; y: number }) => void;\n\n /**\n * Function to call when the DataTable is scrolled to top.\n */\n onScrollToTop?: () => void;\n\n /**\n * Function to call when the DataTable is scrolled to bottom.\n */\n onScrollToBottom?: () => void;\n\n /**\n * Function to call when the DataTable is scrolled to left.\n */\n onScrollToLeft?: () => void;\n\n /**\n * Function to call when the DataTable is scrolled to right.\n */\n onScrollToRight?: () => void;\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableSelectionProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableSelectionProps.js","sourceRoot":"","sources":["../../../package/types/DataTableSelectionProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { CheckboxProps } from '@mantine/core';\n\nexport type DataTableSelectionProps<T = Record<string, unknown>> =\n | {\n selectedRecords?: never;\n onSelectedRecordsChange?: never;\n isRecordSelectable?: never;\n getRecordSelectionCheckboxProps?: never;\n allRecordsSelectionCheckboxProps?: never;\n }\n | {\n /**\n * Currently-selected records.\n */\n selectedRecords?: T[];\n\n /**\n * Callback fired when selected records change.\n * Receives and array of selected records as argument.\n */\n onSelectedRecordsChange?: (selectedRecords: T[]) => void;\n\n /**\n * A function used to determine whether a certain record is selectable.\n * if the function returns false, the row selection checkbox is disabled.\n * Accepts the current recors and index as arguments and returns a boolean.\n */\n isRecordSelectable?: (record: T, index: number) => boolean;\n\n /**\n * A function used to determine additional props of the row selection checkbox.\n * Accepts the current record and its index as arguments and returns an object.\n */\n getRecordSelectionCheckboxProps?: (record: T, index: number) => CheckboxProps;\n\n /**\n * Additional props for the header checkbox that toggles selection of all records.\n */\n allRecordsSelectionCheckboxProps?: CheckboxProps;\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableSortProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableSortProps.js","sourceRoot":"","sources":["../../../package/types/DataTableSortProps.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataTableSortStatus } from './DataTableSortStatus';\n\nexport type DataTableSortProps<T = Record<string, unknown>> =\n | {\n sortStatus?: never;\n onSortStatusChange?: never;\n sortIcons?: never;\n }\n | {\n /**\n * Current sort status (sort column accessor & direction).\n */\n sortStatus: DataTableSortStatus<T>;\n\n /**\n * Callback fired after change of sort status.\n * Receives the new sort status as argument.\n */\n onSortStatusChange?: (sortStatus: DataTableSortStatus<T>) => void;\n\n /**\n * Custom sort icons.\n */\n sortIcons?: {\n /**\n * Icon to display when column is sorted ascending.\n * Will be rotated 180deg for descending sort\n */\n sorted: React.ReactNode;\n /**\n * Icon to display when column is not sorted.\n */\n unsorted: React.ReactNode;\n };\n };\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableSortStatus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableSortStatus.js","sourceRoot":"","sources":["../../../package/types/DataTableSortStatus.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableSortStatus<T = Record<string, unknown>> = {\n /**\n * Sort column accessor.\n * You can use dot-notation for nested objects property drilling\n * (i.e. `department.name` or `department.company.name`).\n */\n columnAccessor: keyof T | (string & NonNullable<unknown>);\n\n /**\n * Sort direction - `asc` for ascending, `desc` for descending.\n */\n direction: 'asc' | 'desc';\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DataTableVerticalAlign.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataTableVerticalAlign.js","sourceRoot":"","sources":["../../../package/types/DataTableVerticalAlign.ts"],"names":[],"mappings":"","sourcesContent":["export type DataTableVerticalAlign = 'top' | 'center' | 'bottom';\n"]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DataTableCellClickHandler"), exports);
18
- __exportStar(require("./DataTableColumn"), exports);
19
- __exportStar(require("./DataTableColumnGroup"), exports);
20
- __exportStar(require("./DataTableColumnTextAlign"), exports);
21
- __exportStar(require("./DataTableDefaultColumnProps"), exports);
22
- __exportStar(require("./DataTableEmptyStateProps"), exports);
23
- __exportStar(require("./DataTableOuterBorderProps"), exports);
24
- __exportStar(require("./DataTablePaginationProps"), exports);
25
- __exportStar(require("./DataTableProps"), exports);
26
- __exportStar(require("./DataTableRowClickHandler"), exports);
27
- __exportStar(require("./DataTableRowExpansionCollapseProps"), exports);
28
- __exportStar(require("./DataTableRowExpansionProps"), exports);
29
- __exportStar(require("./DataTableSelectionProps"), exports);
30
- __exportStar(require("./DataTableSortProps"), exports);
31
- __exportStar(require("./DataTableSortStatus"), exports);
32
- __exportStar(require("./DataTableVerticalAlign"), exports);
33
- __exportStar(require("./utils"), exports);
34
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../package/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,oDAAkC;AAClC,yDAAuC;AACvC,6DAA2C;AAC3C,gEAA8C;AAC9C,6DAA2C;AAC3C,8DAA4C;AAC5C,6DAA2C;AAC3C,mDAAiC;AACjC,6DAA2C;AAC3C,uEAAqD;AACrD,+DAA6C;AAC7C,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC;AACtC,2DAAyC;AACzC,0CAAwB","sourcesContent":["export * from './DataTableCellClickHandler';\nexport * from './DataTableColumn';\nexport * from './DataTableColumnGroup';\nexport * from './DataTableColumnTextAlign';\nexport * from './DataTableDefaultColumnProps';\nexport * from './DataTableEmptyStateProps';\nexport * from './DataTableOuterBorderProps';\nexport * from './DataTablePaginationProps';\nexport * from './DataTableProps';\nexport * from './DataTableRowClickHandler';\nexport * from './DataTableRowExpansionCollapseProps';\nexport * from './DataTableRowExpansionProps';\nexport * from './DataTableSelectionProps';\nexport * from './DataTableSortProps';\nexport * from './DataTableSortStatus';\nexport * from './DataTableVerticalAlign';\nexport * from './utils';\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../package/types/utils.ts"],"names":[],"mappings":"","sourcesContent":["export type WithOptionalProperty<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport type WithRequiredProperty<Type, Key extends keyof Type> = Type & {\n [Property in Key]-?: Type[Property];\n};\n"]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TEXT_ALIGN_RIGHT = exports.TEXT_ALIGN_CENTER = exports.TEXT_ALIGN_LEFT = exports.TEXT_SELECTION_DISABLED = exports.POINTER_CURSOR = exports.ELLIPSIS = exports.NOWRAP = void 0;
4
- exports.NOWRAP = 'mantine-datatable-nowrap';
5
- exports.ELLIPSIS = 'mantine-datatable-ellipsis';
6
- exports.POINTER_CURSOR = 'mantine-datatable-pointer-cursor';
7
- exports.TEXT_SELECTION_DISABLED = 'mantine-datatable-text-selection-disabled';
8
- exports.TEXT_ALIGN_LEFT = 'mantine-datatable-text-align-left';
9
- exports.TEXT_ALIGN_CENTER = 'mantine-datatable-text-align-center';
10
- exports.TEXT_ALIGN_RIGHT = 'mantine-datatable-text-align-right';
11
- //# sourceMappingURL=utilityClasses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilityClasses.js","sourceRoot":"","sources":["../../package/utilityClasses.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,0BAA0B,CAAC;AACpC,QAAA,QAAQ,GAAG,4BAA4B,CAAC;AACxC,QAAA,cAAc,GAAG,kCAAkC,CAAC;AACpD,QAAA,uBAAuB,GAAG,2CAA2C,CAAC;AACtE,QAAA,eAAe,GAAG,mCAAmC,CAAC;AACtD,QAAA,iBAAiB,GAAG,qCAAqC,CAAC;AAC1D,QAAA,gBAAgB,GAAG,oCAAoC,CAAC","sourcesContent":["export const NOWRAP = 'mantine-datatable-nowrap';\nexport const ELLIPSIS = 'mantine-datatable-ellipsis';\nexport const POINTER_CURSOR = 'mantine-datatable-pointer-cursor';\nexport const TEXT_SELECTION_DISABLED = 'mantine-datatable-text-selection-disabled';\nexport const TEXT_ALIGN_LEFT = 'mantine-datatable-text-align-left';\nexport const TEXT_ALIGN_CENTER = 'mantine-datatable-text-align-center';\nexport const TEXT_ALIGN_RIGHT = 'mantine-datatable-text-align-right';\n"]}
package/dist/cjs/utils.js DELETED
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRecordId = exports.getValueAtPath = exports.uniqBy = exports.differenceBy = exports.humanize = void 0;
4
- /**
5
- * Utility function that returns a humanized version of a string, e.g. "camelCase" -> "Camel Case"
6
- */
7
- function humanize(value) {
8
- var str = value
9
- .replace(/([a-z\d])([A-Z]+)/g, '$1 $2')
10
- .replace(/\W|_/g, ' ')
11
- .trim()
12
- .toLowerCase();
13
- return "".concat(str.charAt(0).toUpperCase()).concat(str.slice(1));
14
- }
15
- exports.humanize = humanize;
16
- /**
17
- * Utility function that returns an array of values that are present in the first array but not in the second
18
- */
19
- function differenceBy(arr1, arr2, iteratee) {
20
- return arr1.filter(function (c) { return !arr2.map(iteratee).includes(iteratee(c)); });
21
- }
22
- exports.differenceBy = differenceBy;
23
- /**
24
- * Utility function that returns an array of unique values from a given array
25
- */
26
- function uniqBy(arr, iteratee) {
27
- return arr.filter(function (x, i, self) { return i === self.findIndex(function (y) { return iteratee(x) === iteratee(y); }); });
28
- }
29
- exports.uniqBy = uniqBy;
30
- /**
31
- * Utility function that returns the value at a given path in an object
32
- */
33
- function getValueAtPath(obj, path) {
34
- if (!path)
35
- return undefined;
36
- var pathArray = path.match(/([^[.\]])+/g);
37
- return pathArray.reduce(function (prevObj, key) { return prevObj && prevObj[key]; }, obj);
38
- }
39
- exports.getValueAtPath = getValueAtPath;
40
- /**
41
- * Utility function that returns the record id using idAccessor
42
- */
43
- function getRecordId(record, idAccessor) {
44
- return typeof idAccessor === 'string'
45
- ? getValueAtPath(record, idAccessor)
46
- : idAccessor(record);
47
- }
48
- exports.getRecordId = getRecordId;
49
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../package/utils.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAAa;IACpC,IAAM,GAAG,GAAG,KAAK;SACd,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,IAAI,EAAE;SACN,WAAW,EAAE,CAAC;IACjB,OAAO,UAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,SAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC;AACzD,CAAC;AAPD,4BAOC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAI,IAAS,EAAE,IAAS,EAAE,QAA+B;IACnF,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAzC,CAAyC,CAAC,CAAC;AACvE,CAAC;AAFD,oCAEC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAI,GAAQ,EAAE,QAA+B;IACjE,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,EAAE,IAAI,IAAK,OAAA,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,UAAC,CAAC,IAAK,OAAA,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAA3B,CAA2B,CAAC,EAAxD,CAAwD,CAAC,CAAC;AAC9F,CAAC;AAFD,wBAEC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAI,GAAM,EAAE,IAA+C;IACvF,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,IAAM,SAAS,GAAI,IAAe,CAAC,KAAK,CAAC,aAAa,CAAa,CAAC;IACpE,OAAO,SAAS,CAAC,MAAM,CAAC,UAAC,OAAgB,EAAE,GAAG,IAAK,OAAA,OAAO,IAAK,OAAmC,CAAC,GAAG,CAAC,EAApD,CAAoD,EAAE,GAAG,CAAC,CAAC;AAChH,CAAC;AAJD,wCAIC;AAED;;GAEG;AACH,SAAgB,WAAW,CACzB,MAAS,EACT,UAAkF;IAElF,OAAO,OAAO,UAAU,KAAK,QAAQ;QACnC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC;QACpC,CAAC,CAAE,UAAuC,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAPD,kCAOC","sourcesContent":["/**\n * Utility function that returns a humanized version of a string, e.g. \"camelCase\" -> \"Camel Case\"\n */\nexport function humanize(value: string) {\n const str = value\n .replace(/([a-z\\d])([A-Z]+)/g, '$1 $2')\n .replace(/\\W|_/g, ' ')\n .trim()\n .toLowerCase();\n return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;\n}\n\n/**\n * Utility function that returns an array of values that are present in the first array but not in the second\n */\nexport function differenceBy<T>(arr1: T[], arr2: T[], iteratee: (value: T) => unknown) {\n return arr1.filter((c) => !arr2.map(iteratee).includes(iteratee(c)));\n}\n\n/**\n * Utility function that returns an array of unique values from a given array\n */\nexport function uniqBy<T>(arr: T[], iteratee: (value: T) => unknown) {\n return arr.filter((x, i, self) => i === self.findIndex((y) => iteratee(x) === iteratee(y)));\n}\n\n/**\n * Utility function that returns the value at a given path in an object\n */\nexport function getValueAtPath<T>(obj: T, path: keyof T | (string & NonNullable<unknown>)) {\n if (!path) return undefined;\n const pathArray = (path as string).match(/([^[.\\]])+/g) as string[];\n return pathArray.reduce((prevObj: unknown, key) => prevObj && (prevObj as Record<string, unknown>)[key], obj);\n}\n\n/**\n * Utility function that returns the record id using idAccessor\n */\nexport function getRecordId<T>(\n record: T,\n idAccessor: keyof T | (string & NonNullable<unknown>) | ((record: T) => React.Key)\n) {\n return typeof idAccessor === 'string'\n ? getValueAtPath(record, idAccessor)\n : (idAccessor as (record: T) => React.Key)(record);\n}\n"]}