mantine-datatable 1.7.36 → 1.7.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataTableEmptyState.d.ts +1 -1
- package/dist/DataTableEmptyState.d.ts.map +1 -1
- package/dist/DataTableFooter.d.ts +4 -4
- package/dist/DataTableFooter.d.ts.map +1 -1
- package/dist/DataTableHeader.d.ts +3 -3
- package/dist/DataTableHeader.d.ts.map +1 -1
- package/dist/DataTableHeaderCell.d.ts +3 -3
- package/dist/DataTableHeaderCell.d.ts.map +1 -1
- package/dist/DataTableLoader.d.ts +2 -2
- package/dist/DataTableLoader.d.ts.map +1 -1
- package/dist/DataTablePageSizeSelector.d.ts +1 -1
- package/dist/DataTablePageSizeSelector.d.ts.map +1 -1
- package/dist/DataTableRow.d.ts +3 -3
- package/dist/DataTableRow.d.ts.map +1 -1
- package/dist/DataTableRowCell.d.ts +5 -5
- package/dist/DataTableRowCell.d.ts.map +1 -1
- package/dist/DataTableRowExpansion.d.ts +2 -2
- package/dist/DataTableRowExpansion.d.ts.map +1 -1
- package/dist/DataTableRowMenu.d.ts +2 -2
- package/dist/DataTableRowMenu.d.ts.map +1 -1
- package/dist/DataTableRowMenuItem.d.ts +2 -2
- package/dist/DataTableRowMenuItem.d.ts.map +1 -1
- package/dist/DataTableRowSelectorCell.d.ts +1 -1
- package/dist/DataTableRowSelectorCell.d.ts.map +1 -1
- package/dist/DataTableScrollArea.d.ts +1 -1
- package/dist/DataTableScrollArea.d.ts.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/types/DataTableColumn.d.ts +18 -5
- package/dist/types/DataTableColumn.d.ts.map +1 -1
- package/dist/types/DataTableLoaderProps.d.ts +2 -2
- package/dist/types/DataTableLoaderProps.d.ts.map +1 -1
- package/dist/types/DataTablePaginationProps.d.ts +1 -1
- package/dist/types/DataTablePaginationProps.d.ts.map +1 -1
- package/dist/types/DataTableProps.d.ts +1 -1
- package/dist/types/DataTableProps.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableEmptyState.d.ts","sourceRoot":"","sources":["../DataTableEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableEmptyState.d.ts","sourceRoot":"","sources":["../DataTableEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvC,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAkB7G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CSSObject, MantineNumberSize, MantineTheme } from '@mantine/core';
|
|
2
|
-
import { ForwardedRef } from 'react';
|
|
3
|
-
import { DataTablePaginationProps } from './types';
|
|
4
|
-
import { WithOptional, WithRequired } from './types/utils';
|
|
1
|
+
import { type CSSObject, type MantineNumberSize, type MantineTheme } from '@mantine/core';
|
|
2
|
+
import { type ForwardedRef } from 'react';
|
|
3
|
+
import type { DataTablePaginationProps } from './types';
|
|
4
|
+
import type { WithOptional, WithRequired } from './types/utils';
|
|
5
5
|
type DataTableFooterProps = WithOptional<WithRequired<DataTablePaginationProps, 'loadingText' | 'paginationSize' | 'recordsPerPageLabel' | 'paginationWrapBreakpoint'>, 'onRecordsPerPageChange' | 'recordsPerPageOptions'> & {
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: CSSObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableFooter.d.ts","sourceRoot":"","sources":["../DataTableFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableFooter.d.ts","sourceRoot":"","sources":["../DataTableFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAkC,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAC;AAE1F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAiChE,KAAK,oBAAoB,GAAG,YAAY,CACtC,YAAY,CACV,wBAAwB,EACxB,aAAa,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,0BAA0B,CACtF,EACD,wBAAwB,GAAG,uBAAuB,CACnD,GAAG;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,CAAC;IAC3D,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;gCAqEY,oBAAoB,GAAG;IAAE,GAAG,EAAE,aAAa,cAAc,CAAC,CAAA;CAAE,KAAK,WAAW;AAnE1F,wBAmE2F"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSObject } from '@mantine/core';
|
|
2
|
-
import { ForwardedRef } from 'react';
|
|
3
|
-
import { DataTableColumn, DataTableSortStatus } from './types';
|
|
1
|
+
import { type CSSObject } from '@mantine/core';
|
|
2
|
+
import { type ForwardedRef } from 'react';
|
|
3
|
+
import type { DataTableColumn, DataTableSortStatus } from './types';
|
|
4
4
|
type DataTableHeaderProps<T> = {
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: CSSObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHeader.d.ts","sourceRoot":"","sources":["../DataTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableHeader.d.ts","sourceRoot":"","sources":["../DataTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAkDpE,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5E,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,iBAAiB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;;SAsEgD,aAAa,uBAAuB,CAAC;MAAO,WAAW;AApEzG,wBAoE0G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MantineTheme, Sx } from '@mantine/core';
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { DataTableColumn, DataTableSortStatus } from './types';
|
|
1
|
+
import { type MantineTheme, type Sx } from '@mantine/core';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import type { DataTableColumn, DataTableSortStatus } from './types';
|
|
4
4
|
type DataTableHeaderCell<T> = {
|
|
5
5
|
className?: string;
|
|
6
6
|
sx?: Sx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmCpE,KAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7E,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,SAAS,EACT,EAAE,EACF,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,EAAE,mBAAmB,CAAC,CAAC,CAAC,sBAwDxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultMantineColor, MantineNumberSize, MantineTheme } from '@mantine/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type DefaultMantineColor, type MantineNumberSize, type MantineTheme } from '@mantine/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
type DataTableLoaderProps = {
|
|
4
4
|
pt: number;
|
|
5
5
|
pb: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableLoader.d.ts","sourceRoot":"","sources":["../DataTableLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableLoader.d.ts","sourceRoot":"","sources":["../DataTableLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBvC,KAAK,oBAAoB,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAC5C,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,EAAE,EACF,EAAE,EACF,QAAQ,EACR,aAAa,EACb,cAAc,EACd,IAAI,EACJ,OAAO,EACP,KAAK,GACN,EAAE,oBAAoB,eAYtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTablePageSizeSelector.d.ts","sourceRoot":"","sources":["../DataTablePageSizeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTablePageSizeSelector.d.ts","sourceRoot":"","sources":["../DataTablePageSizeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAE/F,KAAK,8BAA8B,GAAG;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,GACN,EAAE,8BAA8B,eA+ChC"}
|
package/dist/DataTableRow.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Sx } from '@mantine/core';
|
|
2
|
-
import { ChangeEventHandler, CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
1
|
+
import { type Sx } from '@mantine/core';
|
|
2
|
+
import type { ChangeEventHandler, CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
3
3
|
import { useRowExpansion } from './hooks';
|
|
4
|
-
import { DataTableCellClickHandler, DataTableColumn } from './types';
|
|
4
|
+
import type { DataTableCellClickHandler, DataTableColumn } from './types';
|
|
5
5
|
type DataTableRowProps<T> = {
|
|
6
6
|
record: T;
|
|
7
7
|
recordIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRow.d.ts","sourceRoot":"","sources":["../DataTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,EAAE,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableRow.d.ts","sourceRoot":"","sources":["../DataTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI7F,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiC1E,KAAK,iBAAiB,CAAC,CAAC,IAAI;IAC1B,MAAM,EAAE,CAAC,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;IAC7F,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;IACpE,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IACxE,OAAO,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IAC5D,WAAW,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACtD,aAAa,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;IAClE,SAAS,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC1F,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9E,KAAK,CAAC,EAAE,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC,CAAC;IACxF,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EAAE,EACtC,MAAM,EACN,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,EACP,WAAW,EACX,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,CAAC,CAAC,eA4FtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Sx } from '@mantine/core';
|
|
2
|
-
import { CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
3
|
-
import { DataTableColumn } from './types';
|
|
1
|
+
import { type Sx } from '@mantine/core';
|
|
2
|
+
import type { CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
3
|
+
import type { DataTableColumn } from './types';
|
|
4
4
|
type DataTableRowCellProps<T> = {
|
|
5
5
|
className?: string;
|
|
6
6
|
sx?: Sx;
|
|
@@ -9,7 +9,7 @@ type DataTableRowCellProps<T> = {
|
|
|
9
9
|
recordIndex: number;
|
|
10
10
|
defaultRender: ((record: T, index: number, accessor: string) => ReactNode) | undefined;
|
|
11
11
|
onClick?: MouseEventHandler<HTMLTableCellElement>;
|
|
12
|
-
} & Pick<DataTableColumn<T>, 'accessor' | 'visibleMediaQuery' | 'textAlignment' | 'width' | 'ellipsis' | 'render' | 'customCellAttributes'>;
|
|
13
|
-
export default function DataTableRowCell<T>({ className, sx, style, visibleMediaQuery, record, recordIndex, onClick, ellipsis, textAlignment, width, accessor, render, defaultRender, customCellAttributes, }: DataTableRowCellProps<T>): JSX.Element | null;
|
|
12
|
+
} & Pick<DataTableColumn<T>, 'accessor' | 'visibleMediaQuery' | 'textAlignment' | 'width' | 'noWrap' | 'ellipsis' | 'render' | 'customCellAttributes'>;
|
|
13
|
+
export default function DataTableRowCell<T>({ className, sx, style, visibleMediaQuery, record, recordIndex, onClick, noWrap, ellipsis, textAlignment, width, accessor, render, defaultRender, customCellAttributes, }: DataTableRowCellProps<T>): JSX.Element | null;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=DataTableRowCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowCell.d.ts","sourceRoot":"","sources":["../DataTableRowCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,EAAE,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableRowCell.d.ts","sourceRoot":"","sources":["../DataTableRowCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAgB/C,KAAK,qBAAqB,CAAC,CAAC,IAAI;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,CAAC,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;IACvF,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;CACnD,GAAG,IAAI,CACN,eAAe,CAAC,CAAC,CAAC,EAChB,UAAU,GACV,mBAAmB,GACnB,eAAe,GACf,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,sBAAsB,CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,EAC1C,SAAS,EACT,EAAE,EACF,KAAK,EACL,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,EACR,MAAM,EACN,aAAa,EACb,oBAAoB,GACrB,EAAE,qBAAqB,CAAC,CAAC,CAAC,sBA8B1B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DataTableRowExpansionCollapseProps } from './types';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DataTableRowExpansionCollapseProps } from './types';
|
|
3
3
|
type DataTableRowExpansionProps = {
|
|
4
4
|
open: boolean;
|
|
5
5
|
colSpan: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowExpansion.d.ts","sourceRoot":"","sources":["../DataTableRowExpansion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableRowExpansion.d.ts","sourceRoot":"","sources":["../DataTableRowExpansion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,SAAS,CAAC;AAgBlE,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,kCAAkC,CAAC;CACpD,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,0BAA0B,sBAkBlH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MantineNumberSize, MantineShadow } from '@mantine/core';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type MantineNumberSize, type MantineShadow } from '@mantine/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
type DataTableRowMenuProps = {
|
|
4
4
|
borderRadius: MantineNumberSize | undefined;
|
|
5
5
|
shadow: MantineShadow | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,YAAmB,EACnB,MAAa,EACb,MAAU,EACV,CAAC,EAAE,QAAQ,EACX,CAAC,EAAE,QAAQ,EACX,SAAS,EACT,QAAQ,GACT,EAAE,qBAAqB,eAoCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowMenuItem.d.ts","sourceRoot":"","sources":["../DataTableRowMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableRowMenuItem.d.ts","sourceRoot":"","sources":["../DataTableRowMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2CvC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,yBAAyB,eAUhH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowSelectorCell.d.ts","sourceRoot":"","sources":["../DataTableRowSelectorCell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTableRowSelectorCell.d.ts","sourceRoot":"","sources":["../DataTableRowSelectorCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAyChD,KAAK,6BAA6B,GAAG;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,EAAE,6BAA6B,eAOjH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableScrollArea.d.ts","sourceRoot":"","sources":["../DataTableScrollArea.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DataTableScrollArea.d.ts","sourceRoot":"","sources":["../DataTableScrollArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA8EtE,KAAK,wBAAwB,GAAG;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;gCAgCY,wBAAwB,GAAG;IAAE,GAAG,EAAE,aAAa,cAAc,CAAC,CAAA;CAAE,KAAK,WAAW;AA9B9F,wBA8B+F"}
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataTableRowExpansionProps } from './types';
|
|
2
|
+
import type { DataTableRowExpansionProps } from './types';
|
|
3
3
|
export declare function useScrollStatus(): {
|
|
4
4
|
scrolledToTop: boolean;
|
|
5
5
|
setScrolledToTop: (newValue: boolean) => void;
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../hooks.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../hooks.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAM1D,wBAAgB,eAAe;;;;;;;;;EA4B9B;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,SAAS;;;EAQ3E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO;;WAEhD,MAAM;WACN,MAAM;gBACD,CAAC;qBACI,MAAM;;;WAHhB,MAAM;WACN,MAAM;gBACD,CAAC;qBACI,MAAM;;EAMtB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,YAAY,EACZ,OAAO,EACP,UAAU,GACX,EAAE;IACD,YAAY,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;;4BA+B6B,CAAC;wBAEL,CAAC;0BAPM,CAAC;;sBAaV,CAAC,eAAe,MAAM;cAI7C;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM;;;EAoB/E"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Io=Object.create;var ke=Object.defineProperty;var Wo=Object.getOwnPropertyDescriptor;var zo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var Go=(e,r)=>{for(var o in r)ke(e,o,{get:r[o],enumerable:!0})},vr=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of zo(r))!Vo.call(e,t)&&t!==o&&ke(e,t,{get:()=>r[t],enumerable:!(a=Wo(r,t))||a.enumerable});return e};var Pe=(e,r,o)=>(o=e!=null?Io(qo(e)):{},vr(r||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),Uo=e=>vr(ke({},"__esModule",{value:!0}),e);var ma={};Go(ma,{DataTable:()=>Cr});module.exports=Uo(ma);var p=Pe(require("react"),1);var X=require("@mantine/core"),be=require("@mantine/hooks"),eo=require("react");var Hr=require("@mantine/core"),_e=require("react/jsx-runtime"),Zo=(0,Hr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function er(){let{classes:e}=Zo();return(0,_e.jsx)("tr",{className:e.root,children:(0,_e.jsx)("td",{})})}var le=require("@mantine/core");function V(){return V=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},V.apply(this,arguments)}function Xo(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function ae(e,r){if(e==null)return{};var o=Xo(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var te=Pe(require("react")),$o=["size","color"];function rr(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,$o);return te.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),te.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),te.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}var fe=Pe(require("react")),Ko=["size","color"];function or(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Ko);return fe.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),fe.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),fe.default.createElement("polyline",{points:"8 7 12 3 16 7"}),fe.default.createElement("polyline",{points:"8 17 12 21 16 17"}),fe.default.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}var J=Pe(require("react")),Yo=["size","color"];function ar(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Yo);return J.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),J.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),J.default.createElement("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),J.default.createElement("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),J.default.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),J.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}var N=require("react/jsx-runtime"),Qo=(0,le.createStyles)(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function tr({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=Qo();return(0,N.jsx)(le.Center,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||(0,N.jsxs)(N.Fragment,{children:[e||(0,N.jsx)("div",{className:d.standardIcon,children:(0,N.jsx)(ar,{})}),(0,N.jsx)(le.Text,{size:"sm",color:"dimmed",children:r})]})})}var G=require("@mantine/core"),Fr=require("react");var k=require("@mantine/core"),L=require("react/jsx-runtime"),Nr={xs:22,sm:26,md:32,lg:38,xl:44};function fr({size:e,label:r,values:o,value:a,onChange:t,color:f}){return(0,L.jsxs)(k.Group,{spacing:"xs",children:[(0,L.jsx)(k.Text,{size:e,children:r}),(0,L.jsxs)(k.Menu,{withinPortal:!0,withArrow:!0,children:[(0,L.jsx)(k.Menu.Target,{children:(0,L.jsx)(k.Button,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Nr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),(0,L.jsx)(k.Menu.Dropdown,{children:o.map(d=>{let u=d===a;return(0,L.jsx)(k.Menu.Item,{sx:[{height:Nr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:(0,L.jsx)(k.Text,{size:e,children:d})},d)})})]})]})}var se=require("react/jsx-runtime"),Jo=(0,G.createStyles)((e,{topBorderColor:r,paginationWrapBreakpoint:o})=>({root:{borderTop:`1px solid ${typeof r=="function"?r(e):r}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan(o)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Er=(0,Fr.forwardRef)(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:d,paginationColor:u,paginationSize:i,loadingText:m,noRecordsText:l,paginationText:c,totalRecords:n,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:B,recordsLength:T,horizontalSpacing:$,paginationWrapBreakpoint:v},w){let O;if(t)O=m;else if(!n)O=l;else{let z=(f-1)*s+1,me=z+T-1;O=c({from:z,to:me,totalRecords:n})}let{classes:D,cx:P}=Jo({topBorderColor:a,paginationWrapBreakpoint:v});return(0,se.jsxs)(G.Box,{ref:w,px:$??"xs",py:"xs",className:P(D.root,r),style:o,children:[(0,se.jsx)(G.Text,{className:D.text,size:i,children:O}),B&&(0,se.jsx)(fr,{size:i,label:C,values:B,value:s,onChange:g}),(0,se.jsx)(G.Pagination,{color:u,className:P(D.pagination,{[D.paginationFetching]:t||!T}),page:f,onChange:d,size:i,total:Math.ceil(n/s)})]})});var ve=require("@mantine/core"),qr=require("react");var M=require("@mantine/core");var Ir=require("@mantine/core"),Wr=require("@mantine/hooks");function Le(e){let r=(0,Ir.useMantineTheme)(),o=typeof e=="function"?e(r):e;return(0,Wr.useMediaQuery)(o||"",!0)}function Me(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function zr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function Ae(e,r){return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function S(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}var F=require("react/jsx-runtime"),jo=(0,M.createStyles)(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function lr({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:d,textAlignment:u,width:i,sortStatus:m,onSortStatusChange:l}){let{cx:c,classes:n}=jo();if(!Le(t))return null;let s=f??Me(a),g=typeof s=="string"?s:void 0;return(0,F.jsx)(M.Box,{component:"th",className:c({[n.sortableColumnHeader]:d},e),sx:[{"&&":{textAlign:u},width:i,minWidth:i,maxWidth:i},r],style:o,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:a,direction:m?.direction==="asc"?"desc":"asc"})}:void 0,children:d||m?.columnAccessor===a?(0,F.jsxs)(M.Group,{position:"apart",noWrap:!0,spacing:"xs",children:[(0,F.jsx)(M.Box,{className:c(n.columnHeaderText,n.sortableColumnHeaderText),title:g,children:s}),(0,F.jsx)(M.Center,{children:m?.columnAccessor===a?(0,F.jsx)(rr,{className:c(n.sortableColumnHeaderIcon,{[n.sortableColumnHeaderIconRotated]:m.direction==="desc"}),size:14}):(0,F.jsx)(or,{className:n.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,F.jsx)(M.Box,{className:n.columnHeaderText,title:g,children:s})})}var j=require("react/jsx-runtime"),_o=(0,ve.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Vr=(0,qr.forwardRef)(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:m,leftShadowVisible:l},c){let{classes:n,cx:s}=_o();return(0,j.jsx)("thead",{className:s(n.root,r),style:o,ref:c,children:(0,j.jsxs)("tr",{children:[d&&(0,j.jsx)("th",{className:s(n.selectorColumnHeader,{[n.selectorColumnHeaderWithRightShadow]:l}),children:(0,j.jsx)(ve.Checkbox,{classNames:{input:n.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!m,onChange:m})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:B,textAlignment:T,width:$,title:v,sortable:w,titleClassName:O,titleStyle:D,titleSx:P})=>C?null:(0,j.jsx)(lr,{className:O,style:D,sx:P,accessor:g,visibleMediaQuery:B,textAlignment:T,width:$,title:v,sortable:w,sortStatus:a,onSortStatusChange:t},g))]})})});var de=require("@mantine/core"),sr=require("react/jsx-runtime"),ea=(0,de.createStyles)(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function dr({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:m}=ea();return(0,sr.jsx)(de.Center,{pt:e,pb:r,className:m(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||(0,sr.jsx)(de.Loader,{size:f,variant:d,color:u}))})}var We=require("@mantine/core");var He=require("@mantine/core");var Gr=require("react/jsx-runtime"),ra=(0,He.createStyles)({withPointerCursor:{cursor:"pointer"},ellipsis:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}});function ur({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:d,ellipsis:u,textAlignment:i,width:m,accessor:l,render:c,defaultRender:n,customCellAttributes:s}){let{cx:g,classes:C}=ra();return Le(a)?(0,Gr.jsx)(He.Box,{component:"td",className:g({[C.ellipsis]:u,[C.withPointerCursor]:d},e),sx:[{width:m,minWidth:m,maxWidth:m,textAlign:i},r],style:o,onClick:d,...s?.(t,f),children:c?c(t,f):n?n(t,f,l):S(t,l)}):null}var Ee=require("@mantine/core");var U=require("@mantine/hooks"),A=require("react");var Ne=200,Fe={leading:!0};function Ur(){let[e,r]=(0,U.useDebouncedState)(!0,Ne,Fe),[o,a]=(0,U.useDebouncedState)(!0,Ne,Fe),[t,f]=(0,U.useDebouncedState)(!0,Ne,Fe),[d,u]=(0,U.useDebouncedState)(!0,Ne,Fe);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Zr(e){let[r,o]=(0,A.useState)(null),a=e?.join(":")||"";return(0,A.useEffect)(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function Xr(e){let[r,o]=(0,A.useState)(null);return(0,A.useEffect)(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function $r({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:m}=e;r&&u==="always"?a=r.map(l=>S(l,o)):m&&(a=r.filter(m).map(l=>S(l,o)),i||(a=[a[0]]))}let t,f,d=(0,A.useState)(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:m,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let c=n=>f(t.filter(s=>s!==S(n,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:n=>u==="always"?!0:t.includes(S(n,o)),expandRow:n=>{let s=S(n,o);f(i?[...t,s]:[s])},collapseRow:c,collapseProps:m,content:(n,s)=>()=>l({record:n,recordIndex:s,collapse:()=>c(n)})}}}function Kr(e,r){let[o,a]=(0,A.useState)(e),[t,f]=(0,A.useState)(e),d=(0,U.useTimeout)(()=>a(!0),0),u=(0,U.useTimeout)(()=>f(!1),r||200);return(0,A.useEffect)(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}var E=require("react/jsx-runtime"),oa=(0,Ee.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function pr({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=Kr(e,a?.transitionDuration),{cx:d,classes:u}=oa();return f?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("tr",{}),(0,E.jsx)("tr",{children:(0,E.jsx)("td",{className:d(u.cell,{[u.expandedCell]:t}),colSpan:r,children:(0,E.jsx)(Ee.Collapse,{in:t,...a,children:o()})})})]}):null}var Ie=require("@mantine/core"),mr=require("react/jsx-runtime"),aa=(0,Ie.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function xr({withRightShadow:e,...r}){let{cx:o,classes:a}=aa();return(0,mr.jsx)("td",{className:o(a.root,{[a.withRightShadow]:e}),children:(0,mr.jsx)(Ie.Checkbox,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}var I=require("react/jsx-runtime"),ta=(0,We.createStyles)(e=>{let r=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function nr({record:e,recordIndex:r,columns:o,defaultColumnRender:a,selectionVisible:t,selectionChecked:f,onSelectionChange:d,isRecordSelectable:u,onClick:i,onCellClick:m,onContextMenu:l,expansion:c,customRowAttributes:n,className:s,style:g,sx:C,contextMenuVisible:B,leftShadowVisible:T}){let{cx:$,classes:v}=ta();return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(We.Box,{component:"tr",className:$({[v.withPointerCursor]:i||c?.expandOnClick,[v.selected]:f,[v.contextMenuVisible]:B},typeof s=="function"?s(e,r):s),onClick:w=>{if(c){let{isRowExpanded:O,expandOnClick:D,expandRow:P,collapseRow:z}=c;D&&(O(e)?z(e):P(e))}i?.(w)},style:typeof g=="function"?g(e,r):g,sx:C,...n?.(e,r),onContextMenu:l,children:[t&&(0,I.jsx)(xr,{withRightShadow:T,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((w,O)=>{let{accessor:D,hidden:P,visibleMediaQuery:z,textAlignment:me,ellipsis:ze,width:qe,render:Ve,cellsClassName:xe,cellsStyle:ne,cellsSx:Ge,customCellAttributes:Ue}=w,Be;return m&&(Be=()=>m({record:e,recordIndex:r,column:w,columnIndex:O})),P?null:(0,I.jsx)(ur,{className:typeof xe=="function"?xe(e,r):xe,style:typeof ne=="function"?ne(e,r):ne,sx:Ge,visibleMediaQuery:z,record:e,recordIndex:r,onClick:Be,accessor:D,textAlignment:me,ellipsis:ze,width:qe,render:Ve,defaultRender:a,customCellAttributes:Ue},D)})]}),c&&(0,I.jsx)(pr,{colSpan:o.filter(w=>!w.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}var ue=require("@mantine/core"),W=require("@mantine/hooks"),Yr=require("react/jsx-runtime"),fa=(0,ue.createStyles)(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function ir({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){(0,W.useWindowEvent)("resize",f),(0,W.useWindowEvent)("scroll",f);let u=(0,W.useClickOutside)(f),{ref:i,width:m,height:l}=(0,W.useElementSize)(),c=(0,W.useMergedRef)(u,i),{dir:n,spacing:{md:s}}=(0,ue.useMantineTheme)(),{innerWidth:g,innerHeight:C}=window,{classes:B}=fa();return(0,Yr.jsx)(ue.Paper,{ref:c,shadow:r,radius:e,className:B.root,sx:{zIndex:o,top:a+l+s>C?C-l-s:a,left:n==="ltr"?t+m+s>g?g-m-s:t:g-s-(t-m-s<0?m+s:t)},children:d})}var Qr=require("@mantine/core"),Jr=require("react/jsx-runtime"),la=(0,Qr.createStyles)(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function cr(){let{classes:e}=la();return(0,Jr.jsx)("div",{className:e.root})}var Z=require("@mantine/core"),he=require("react/jsx-runtime"),sa=(0,Z.createStyles)((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function gr({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=sa({color:o});return(0,he.jsxs)(Z.UnstyledButton,{className:f.root,disabled:a,onClick:t,children:[e&&(0,he.jsx)(Z.Box,{className:f.icon,children:e}),(0,he.jsx)(Z.Text,{className:f.title,size:"sm",children:r})]})}var pe=require("@mantine/core"),jr=require("react"),_=require("react/jsx-runtime"),da=(0,pe.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),_r=(0,jr.forwardRef)(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:m,classes:l}=da();return(0,_.jsxs)(pe.ScrollArea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,(0,_.jsx)(pe.Box,{className:m(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),(0,_.jsx)("div",{className:m(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),(0,_.jsx)("div",{className:m(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),(0,_.jsx)("div",{className:m(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});var b=require("react/jsx-runtime"),ua={},pa=(0,X.createStyles)((e,{borderColor:r,rowBorderColor:o})=>{let a=typeof r=="function"?r(e):r,t=typeof o=="function"?o(e):o;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:a},"tbody tr td":{borderBottomColor:t}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${t}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${a}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${t}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Cr({withBorder:e,borderRadius:r,borderColor:o=h=>h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],rowBorderColor:a=h=>h.fn.rgba(h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:d="100%",minHeight:u,shadow:i,verticalAlignment:m="center",fetching:l,columns:c,defaultColumnRender:n,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:B,isRecordSelectable:T,sortStatus:$,onSortStatusChange:v,horizontalSpacing:w,page:O,onPageChange:D,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe="Records per page",paginationColor:Ve,paginationSize:xe="sm",paginationText:ne=({from:h,to:ie,totalRecords:ee})=>`${h} - ${ie} / ${ee}`,paginationWrapBreakpoint:Ge="sm",loaderBackgroundBlur:Ue,customLoader:Be,loaderSize:ro,loaderVariant:oo,loaderColor:ao,loadingText:to="...",emptyState:fo,noRecordsText:Sr="No records",noRecordsIcon:lo,striped:so,onRowClick:Ze,onCellClick:uo,rowContextMenu:H,rowExpansion:po,rowClassName:mo,rowStyle:xo,rowSx:no,customRowAttributes:io,m:co,my:go,mx:Co,mt:So,mb:ho,ml:bo,mr:Bo,sx:To,className:yo,classNames:Xe,style:wo,styles:$e,...Oo}){let{ref:h,width:ie,height:ee}=(0,be.useElementSize)(),{ref:Do,height:Ke}=(0,be.useElementSize)(),{ref:Ro,width:Ye,height:Te}=(0,be.useElementSize)(),{ref:ko,height:hr}=(0,be.useElementSize)(),{scrolledToTop:Po,setScrolledToTop:br,scrolledToBottom:Lo,setScrolledToBottom:Br,scrolledToLeft:Tr,setScrolledToLeft:yr,scrolledToRight:Mo,setScrolledToRight:wr}=Ur(),{rowContextMenuInfo:K,setRowContextMenuInfo:ce}=Xr(l),Ao=$r({rowExpansion:po,records:g,idAccessor:s}),Or=()=>{if(!l&&H&&ce(null),l||Te<=ee)br(!0),Br(!0);else{let x=h.current.scrollTop;br(x===0),Br(Math.round(Te-x)===Math.round(ee))}if(l||Ye===ie)yr(!0),wr(!0);else{let x=h.current.scrollLeft;yr(x===0),wr(Math.round(Ye-x)===Math.round(ie))}};(0,eo.useEffect)(Or,[l,ee,h,ie,Te,Ye]);let vo=x=>{h.current.scrollTo({top:0,left:0}),D(x)},ye=g?.length,Dr=g?.map(x=>S(x,s)),ge=C?.map(x=>S(x,s)),Rr=Dr!==void 0&&ge!==void 0&&ge.length>0,kr=T?g?.filter(T):g,Qe=kr?.map(x=>S(x,s)),Je=Rr&&Qe.every(x=>ge.includes(x)),Ho=Rr&&Qe.some(x=>ge.includes(x)),Pr;B&&(Pr=()=>{B(Je?C.filter(x=>!Qe.includes(S(x,s))):Ae([...C,...kr],x=>S(x,s)))});let{lastSelectionChangeIndex:we,setLastSelectionChangeIndex:No}=Zr(Dr),Lr=!!C&&!Tr,{cx:Mr,classes:q,theme:Fo}=pa({borderColor:o,rowBorderColor:a}),Eo={m:co,my:go,mx:Co,mt:So,mb:ho,ml:bo,mr:Bo},je=typeof $e=="function"?$e(Fo,ua):$e;return(0,b.jsxs)(X.Box,{...Eo,className:Mr(q.root,{[q.tableWithBorder]:e},yo,Xe?.root),sx:[x=>({borderRadius:x.radius[r]||r,boxShadow:x.shadows[i]||i,height:d,minHeight:u}),...(0,X.packSx)(To)],style:{...je?.root,...wo},children:[(0,b.jsx)(_r,{ref:h,topShadowVisible:!Po,leftShadowVisible:!(C||Tr),rightShadowVisible:!Mo,bottomShadowVisible:!Lo,headerHeight:Ke,onScrollPositionChange:Or,children:(0,b.jsxs)(X.Table,{ref:Ro,horizontalSpacing:w,className:Mr(q.table,{[q.tableWithColumnBorders]:t,[q.lastRowBorderBottomVisible]:Te<ee,[q.textSelectionDisabled]:f,[q.verticalAlignmentTop]:m==="top",[q.verticalAlignmentBottom]:m==="bottom"}),striped:ye?so:!1,...Oo,children:[(0,b.jsx)(Vr,{ref:Do,className:Xe?.header,style:je?.header,columns:c,sortStatus:$,onSortStatusChange:v,selectionVisible:!!C,selectionChecked:Je,selectionIndeterminate:Ho&&!Je,onSelectionChange:Pr,leftShadowVisible:Lr}),(0,b.jsx)("tbody",{children:ye?g.map((x,y)=>{let re=S(x,s),Ce=ge?.includes(re)||!1,Oe=!1,De=!1;if(H){let{hidden:R}=H;(!R||!(typeof R=="function"?R(x,y):R))&&(H.trigger==="click"?Oe=!0:De=!0)}let Re;B&&(Re=R=>{if(R.nativeEvent.shiftKey&&we!==null){let oe=g.filter(y>we?(Y,Q)=>Q>=we&&Q<=y&&(T?T(Y,Q):!0):(Y,Q)=>Q>=y&&Q<=we&&(T?T(Y,Q):!0));B(Ce?zr(C,oe,Y=>S(Y,s)):Ae([...C,...oe],Y=>S(Y,s)))}else B(Ce?C.filter(oe=>S(oe,s)!==re):Ae([...C,x],oe=>S(oe,s)));No(y)});let Se;Oe?Se=R=>{ce({y:R.clientY,x:R.clientX,record:x,recordIndex:y}),Ze?.(x,y)}:Ze&&(Se=()=>{Ze(x,y)});let Ar;return De&&(Ar=R=>{R.preventDefault(),ce({y:R.clientY,x:R.clientX,record:x,recordIndex:y})}),(0,b.jsx)(nr,{record:x,recordIndex:y,columns:c,defaultColumnRender:n,selectionVisible:!!C,selectionChecked:Ce,onSelectionChange:Re,isRecordSelectable:T,onClick:Se,onCellClick:uo,onContextMenu:Ar,contextMenuVisible:K?S(K.record,s)===re:!1,expansion:Ao,className:mo,style:xo,sx:no,customRowAttributes:io,leftShadowVisible:Lr},re)}):(0,b.jsx)(er,{})})]})}),O&&(0,b.jsx)(Er,{ref:ko,className:Xe?.pagination,style:je?.pagination,topBorderColor:o,horizontalSpacing:w,fetching:l,page:O,onPageChange:vo,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe,paginationColor:Ve,paginationSize:xe,paginationText:ne,paginationWrapBreakpoint:Ge,noRecordsText:Sr,loadingText:to,recordsLength:ye}),(0,b.jsx)(dr,{pt:Ke,pb:hr,fetching:l,backgroundBlur:Ue,customContent:Be,size:ro,variant:oo,color:ao}),(0,b.jsx)(tr,{pt:Ke,pb:hr,icon:lo,text:Sr,active:!l&&!ye,children:fo}),H&&K&&(0,b.jsx)(ir,{zIndex:H.zIndex,borderRadius:H.borderRadius,shadow:H.shadow,y:K.y,x:K.x,onDestroy:()=>ce(null),children:H.items(K.record,K.recordIndex).map(({divider:x,key:y,title:re,icon:Ce,color:Oe,hidden:De,disabled:Re,onClick:Se})=>x?(0,b.jsx)(cr,{},y):De?null:(0,b.jsx)(gr,{title:re??Me(y),icon:Ce,color:Oe,disabled:Re,onClick:()=>{ce(null),Se()}},y))})]})}
|
|
1
|
+
"use strict";var Wo=Object.create;var ke=Object.defineProperty;var Io=Object.getOwnPropertyDescriptor;var zo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var Go=(e,r)=>{for(var o in r)ke(e,o,{get:r[o],enumerable:!0})},vr=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of zo(r))!Vo.call(e,t)&&t!==o&&ke(e,t,{get:()=>r[t],enumerable:!(a=Io(r,t))||a.enumerable});return e};var Pe=(e,r,o)=>(o=e!=null?Wo(qo(e)):{},vr(r||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),Uo=e=>vr(ke({},"__esModule",{value:!0}),e);var ma={};Go(ma,{DataTable:()=>Cr});module.exports=Uo(ma);var p=Pe(require("react"),1);var X=require("@mantine/core"),he=require("@mantine/hooks"),eo=require("react");var Hr=require("@mantine/core"),_e=require("react/jsx-runtime"),Zo=(0,Hr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function er(){let{classes:e}=Zo();return(0,_e.jsx)("tr",{className:e.root,children:(0,_e.jsx)("td",{})})}var le=require("@mantine/core");function V(){return V=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},V.apply(this,arguments)}function Xo(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function ae(e,r){if(e==null)return{};var o=Xo(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var te=Pe(require("react")),$o=["size","color"];function rr(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,$o);return te.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),te.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),te.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}var fe=Pe(require("react")),Ko=["size","color"];function or(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Ko);return fe.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),fe.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),fe.default.createElement("polyline",{points:"8 7 12 3 16 7"}),fe.default.createElement("polyline",{points:"8 17 12 21 16 17"}),fe.default.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}var J=Pe(require("react")),Yo=["size","color"];function ar(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Yo);return J.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),J.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),J.default.createElement("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),J.default.createElement("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),J.default.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),J.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}var N=require("react/jsx-runtime"),Qo=(0,le.createStyles)(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function tr({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=Qo();return(0,N.jsx)(le.Center,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||(0,N.jsxs)(N.Fragment,{children:[e||(0,N.jsx)("div",{className:d.standardIcon,children:(0,N.jsx)(ar,{})}),(0,N.jsx)(le.Text,{size:"sm",color:"dimmed",children:r})]})})}var G=require("@mantine/core"),Fr=require("react");var k=require("@mantine/core"),L=require("react/jsx-runtime"),Nr={xs:22,sm:26,md:32,lg:38,xl:44};function fr({size:e,label:r,values:o,value:a,onChange:t,color:f}){return(0,L.jsxs)(k.Group,{spacing:"xs",children:[(0,L.jsx)(k.Text,{size:e,children:r}),(0,L.jsxs)(k.Menu,{withinPortal:!0,withArrow:!0,children:[(0,L.jsx)(k.Menu.Target,{children:(0,L.jsx)(k.Button,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Nr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),(0,L.jsx)(k.Menu.Dropdown,{children:o.map(d=>{let u=d===a;return(0,L.jsx)(k.Menu.Item,{sx:[{height:Nr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:(0,L.jsx)(k.Text,{size:e,children:d})},d)})})]})]})}var se=require("react/jsx-runtime"),Jo=(0,G.createStyles)((e,{topBorderColor:r,paginationWrapBreakpoint:o})=>({root:{background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderTop:`1px solid ${typeof r=="function"?r(e):r}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan(o)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Er=(0,Fr.forwardRef)(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:d,paginationColor:u,paginationSize:i,loadingText:x,noRecordsText:l,paginationText:c,totalRecords:n,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:b,recordsLength:y,horizontalSpacing:$,paginationWrapBreakpoint:v},w){let O;if(t)O=x;else if(!n)O=l;else{let z=(f-1)*s+1,me=z+y-1;O=c({from:z,to:me,totalRecords:n})}let{classes:D,cx:P}=Jo({topBorderColor:a,paginationWrapBreakpoint:v});return(0,se.jsxs)(G.Box,{ref:w,px:$??"xs",py:"xs",className:P(D.root,r),style:o,children:[(0,se.jsx)(G.Text,{className:D.text,size:i,children:O}),b&&(0,se.jsx)(fr,{size:i,label:C,values:b,value:s,onChange:g}),(0,se.jsx)(G.Pagination,{color:u,className:P(D.pagination,{[D.paginationFetching]:t||!y}),page:f,onChange:d,size:i,total:Math.ceil(n/s)})]})});var ve=require("@mantine/core"),qr=require("react");var M=require("@mantine/core");var Wr=require("@mantine/core"),Ir=require("@mantine/hooks");function Le(e){let r=(0,Wr.useMantineTheme)(),o=typeof e=="function"?e(r):e;return(0,Ir.useMediaQuery)(o||"",!0)}function Me(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function zr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function Ae(e,r){return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function S(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}var F=require("react/jsx-runtime"),jo=(0,M.createStyles)(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function lr({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:d,textAlignment:u,width:i,sortStatus:x,onSortStatusChange:l}){let{cx:c,classes:n}=jo();if(!Le(t))return null;let s=f??Me(a),g=typeof s=="string"?s:void 0;return(0,F.jsx)(M.Box,{component:"th",className:c({[n.sortableColumnHeader]:d},e),sx:[{"&&":{textAlign:u},width:i,minWidth:i,maxWidth:i},r],style:o,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:a,direction:x?.direction==="asc"?"desc":"asc"})}:void 0,children:d||x?.columnAccessor===a?(0,F.jsxs)(M.Group,{position:"apart",noWrap:!0,spacing:"xs",children:[(0,F.jsx)(M.Box,{className:c(n.columnHeaderText,n.sortableColumnHeaderText),title:g,children:s}),(0,F.jsx)(M.Center,{children:x?.columnAccessor===a?(0,F.jsx)(rr,{className:c(n.sortableColumnHeaderIcon,{[n.sortableColumnHeaderIconRotated]:x.direction==="desc"}),size:14}):(0,F.jsx)(or,{className:n.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,F.jsx)(M.Box,{className:n.columnHeaderText,title:g,children:s})})}var j=require("react/jsx-runtime"),_o=(0,ve.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Vr=(0,qr.forwardRef)(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:x,leftShadowVisible:l},c){let{classes:n,cx:s}=_o();return(0,j.jsx)("thead",{className:s(n.root,r),style:o,ref:c,children:(0,j.jsxs)("tr",{children:[d&&(0,j.jsx)("th",{className:s(n.selectorColumnHeader,{[n.selectorColumnHeaderWithRightShadow]:l}),children:(0,j.jsx)(ve.Checkbox,{classNames:{input:n.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!x,onChange:x})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:b,textAlignment:y,width:$,title:v,sortable:w,titleClassName:O,titleStyle:D,titleSx:P})=>C?null:(0,j.jsx)(lr,{className:O,style:D,sx:P,accessor:g,visibleMediaQuery:b,textAlignment:y,width:$,title:v,sortable:w,sortStatus:a,onSortStatusChange:t},g))]})})});var de=require("@mantine/core"),sr=require("react/jsx-runtime"),ea=(0,de.createStyles)(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function dr({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:x}=ea();return(0,sr.jsx)(de.Center,{pt:e,pb:r,className:x(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||(0,sr.jsx)(de.Loader,{size:f,variant:d,color:u}))})}var Ie=require("@mantine/core");var He=require("@mantine/core");var Gr=require("react/jsx-runtime"),ra=(0,He.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function ur({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:d,noWrap:u,ellipsis:i,textAlignment:x,width:l,accessor:c,render:n,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:b}=ra();return Le(a)?(0,Gr.jsx)(He.Box,{component:"td",className:C({[b.noWrap]:u||i,[b.ellipsis]:i,[b.withPointerCursor]:d},e),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:x},r],style:o,onClick:d,...g?.(t,f),children:n?n(t,f):s?s(t,f,c):S(t,c)}):null}var Ee=require("@mantine/core");var U=require("@mantine/hooks"),A=require("react");var Ne=200,Fe={leading:!0};function Ur(){let[e,r]=(0,U.useDebouncedState)(!0,Ne,Fe),[o,a]=(0,U.useDebouncedState)(!0,Ne,Fe),[t,f]=(0,U.useDebouncedState)(!0,Ne,Fe),[d,u]=(0,U.useDebouncedState)(!0,Ne,Fe);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Zr(e){let[r,o]=(0,A.useState)(null),a=e?.join(":")||"";return(0,A.useEffect)(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function Xr(e){let[r,o]=(0,A.useState)(null);return(0,A.useEffect)(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function $r({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:x}=e;r&&u==="always"?a=r.map(l=>S(l,o)):x&&(a=r.filter(x).map(l=>S(l,o)),i||(a=[a[0]]))}let t,f,d=(0,A.useState)(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:x,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let c=n=>f(t.filter(s=>s!==S(n,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:n=>u==="always"?!0:t.includes(S(n,o)),expandRow:n=>{let s=S(n,o);f(i?[...t,s]:[s])},collapseRow:c,collapseProps:x,content:(n,s)=>()=>l({record:n,recordIndex:s,collapse:()=>c(n)})}}}function Kr(e,r){let[o,a]=(0,A.useState)(e),[t,f]=(0,A.useState)(e),d=(0,U.useTimeout)(()=>a(!0),0),u=(0,U.useTimeout)(()=>f(!1),r||200);return(0,A.useEffect)(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}var E=require("react/jsx-runtime"),oa=(0,Ee.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function pr({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=Kr(e,a?.transitionDuration),{cx:d,classes:u}=oa();return f?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("tr",{}),(0,E.jsx)("tr",{children:(0,E.jsx)("td",{className:d(u.cell,{[u.expandedCell]:t}),colSpan:r,children:(0,E.jsx)(Ee.Collapse,{in:t,...a,children:o()})})})]}):null}var We=require("@mantine/core"),mr=require("react/jsx-runtime"),aa=(0,We.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function xr({withRightShadow:e,...r}){let{cx:o,classes:a}=aa();return(0,mr.jsx)("td",{className:o(a.root,{[a.withRightShadow]:e}),children:(0,mr.jsx)(We.Checkbox,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}var W=require("react/jsx-runtime"),ta=(0,Ie.createStyles)(e=>{let r=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function nr({record:e,recordIndex:r,columns:o,defaultColumnRender:a,selectionVisible:t,selectionChecked:f,onSelectionChange:d,isRecordSelectable:u,onClick:i,onCellClick:x,onContextMenu:l,expansion:c,customRowAttributes:n,className:s,style:g,sx:C,contextMenuVisible:b,leftShadowVisible:y}){let{cx:$,classes:v}=ta();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Ie.Box,{component:"tr",className:$({[v.withPointerCursor]:i||c?.expandOnClick,[v.selected]:f,[v.contextMenuVisible]:b},typeof s=="function"?s(e,r):s),onClick:w=>{if(c){let{isRowExpanded:O,expandOnClick:D,expandRow:P,collapseRow:z}=c;D&&(O(e)?z(e):P(e))}i?.(w)},style:typeof g=="function"?g(e,r):g,sx:C,...n?.(e,r),onContextMenu:l,children:[t&&(0,W.jsx)(xr,{withRightShadow:y,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((w,O)=>{let{accessor:D,hidden:P,visibleMediaQuery:z,textAlignment:me,ellipsis:ze,width:qe,render:Ve,cellsClassName:xe,cellsStyle:ne,cellsSx:Ge,customCellAttributes:Ue}=w,Be;return x&&(Be=()=>x({record:e,recordIndex:r,column:w,columnIndex:O})),P?null:(0,W.jsx)(ur,{className:typeof xe=="function"?xe(e,r):xe,style:typeof ne=="function"?ne(e,r):ne,sx:Ge,visibleMediaQuery:z,record:e,recordIndex:r,onClick:Be,accessor:D,textAlignment:me,ellipsis:ze,width:qe,render:Ve,defaultRender:a,customCellAttributes:Ue},D)})]}),c&&(0,W.jsx)(pr,{colSpan:o.filter(w=>!w.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}var ue=require("@mantine/core"),I=require("@mantine/hooks"),Yr=require("react/jsx-runtime"),fa=(0,ue.createStyles)(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function ir({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){(0,I.useWindowEvent)("resize",f),(0,I.useWindowEvent)("scroll",f);let u=(0,I.useClickOutside)(f),{ref:i,width:x,height:l}=(0,I.useElementSize)(),c=(0,I.useMergedRef)(u,i),{dir:n,spacing:{md:s}}=(0,ue.useMantineTheme)(),{innerWidth:g,innerHeight:C}=window,{classes:b}=fa();return(0,Yr.jsx)(ue.Paper,{ref:c,shadow:r,radius:e,className:b.root,sx:{zIndex:o,top:a+l+s>C?C-l-s:a,left:n==="ltr"?t+x+s>g?g-x-s:t:g-s-(t-x-s<0?x+s:t)},children:d})}var Qr=require("@mantine/core"),Jr=require("react/jsx-runtime"),la=(0,Qr.createStyles)(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function cr(){let{classes:e}=la();return(0,Jr.jsx)("div",{className:e.root})}var Z=require("@mantine/core"),be=require("react/jsx-runtime"),sa=(0,Z.createStyles)((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function gr({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=sa({color:o});return(0,be.jsxs)(Z.UnstyledButton,{className:f.root,disabled:a,onClick:t,children:[e&&(0,be.jsx)(Z.Box,{className:f.icon,children:e}),(0,be.jsx)(Z.Text,{className:f.title,size:"sm",children:r})]})}var pe=require("@mantine/core"),jr=require("react"),_=require("react/jsx-runtime"),da=(0,pe.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),_r=(0,jr.forwardRef)(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:x,classes:l}=da();return(0,_.jsxs)(pe.ScrollArea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,(0,_.jsx)(pe.Box,{className:x(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),(0,_.jsx)("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),(0,_.jsx)("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),(0,_.jsx)("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});var B=require("react/jsx-runtime"),ua={},pa=(0,X.createStyles)((e,{borderColor:r,rowBorderColor:o})=>{let a=typeof r=="function"?r(e):r,t=typeof o=="function"?o(e):o;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:a},"tbody tr td":{borderBottomColor:t}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${t}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${a}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${t}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Cr({withBorder:e,borderRadius:r,borderColor:o=h=>h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],rowBorderColor:a=h=>h.fn.rgba(h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:d="100%",minHeight:u,shadow:i,verticalAlignment:x="center",fetching:l,columns:c,defaultColumnRender:n,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:b,isRecordSelectable:y,sortStatus:$,onSortStatusChange:v,horizontalSpacing:w,page:O,onPageChange:D,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe="Records per page",paginationColor:Ve,paginationSize:xe="sm",paginationText:ne=({from:h,to:ie,totalRecords:ee})=>`${h} - ${ie} / ${ee}`,paginationWrapBreakpoint:Ge="sm",loaderBackgroundBlur:Ue,customLoader:Be,loaderSize:ro,loaderVariant:oo,loaderColor:ao,loadingText:to="...",emptyState:fo,noRecordsText:Sr="No records",noRecordsIcon:lo,striped:so,onRowClick:Ze,onCellClick:uo,rowContextMenu:H,rowExpansion:po,rowClassName:mo,rowStyle:xo,rowSx:no,customRowAttributes:io,m:co,my:go,mx:Co,mt:So,mb:bo,ml:ho,mr:Bo,sx:yo,className:To,classNames:Xe,style:wo,styles:$e,...Oo}){let{ref:h,width:ie,height:ee}=(0,he.useElementSize)(),{ref:Do,height:Ke}=(0,he.useElementSize)(),{ref:Ro,width:Ye,height:ye}=(0,he.useElementSize)(),{ref:ko,height:br}=(0,he.useElementSize)(),{scrolledToTop:Po,setScrolledToTop:hr,scrolledToBottom:Lo,setScrolledToBottom:Br,scrolledToLeft:yr,setScrolledToLeft:Tr,scrolledToRight:Mo,setScrolledToRight:wr}=Ur(),{rowContextMenuInfo:K,setRowContextMenuInfo:ce}=Xr(l),Ao=$r({rowExpansion:po,records:g,idAccessor:s}),Or=()=>{if(!l&&H&&ce(null),l||ye<=ee)hr(!0),Br(!0);else{let m=h.current.scrollTop;hr(m===0),Br(Math.round(ye-m)===Math.round(ee))}if(l||Ye===ie)Tr(!0),wr(!0);else{let m=h.current.scrollLeft;Tr(m===0),wr(Math.round(Ye-m)===Math.round(ie))}};(0,eo.useEffect)(Or,[l,ee,h,ie,ye,Ye]);let vo=m=>{h.current.scrollTo({top:0,left:0}),D(m)},Te=g?.length,Dr=g?.map(m=>S(m,s)),ge=C?.map(m=>S(m,s)),Rr=Dr!==void 0&&ge!==void 0&&ge.length>0,kr=y?g?.filter(y):g,Qe=kr?.map(m=>S(m,s)),Je=Rr&&Qe.every(m=>ge.includes(m)),Ho=Rr&&Qe.some(m=>ge.includes(m)),Pr;b&&(Pr=()=>{b(Je?C.filter(m=>!Qe.includes(S(m,s))):Ae([...C,...kr],m=>S(m,s)))});let{lastSelectionChangeIndex:we,setLastSelectionChangeIndex:No}=Zr(Dr),Lr=!!C&&!yr,{cx:Mr,classes:q,theme:Fo}=pa({borderColor:o,rowBorderColor:a}),Eo={m:co,my:go,mx:Co,mt:So,mb:bo,ml:ho,mr:Bo},je=typeof $e=="function"?$e(Fo,ua):$e;return(0,B.jsxs)(X.Box,{...Eo,className:Mr(q.root,{[q.tableWithBorder]:e},To,Xe?.root),sx:[m=>({borderRadius:m.radius[r]||r,boxShadow:m.shadows[i]||i,height:d,minHeight:u}),...(0,X.packSx)(yo)],style:{...je?.root,...wo},children:[(0,B.jsx)(_r,{ref:h,topShadowVisible:!Po,leftShadowVisible:!(C||yr),rightShadowVisible:!Mo,bottomShadowVisible:!Lo,headerHeight:Ke,onScrollPositionChange:Or,children:(0,B.jsxs)(X.Table,{ref:Ro,horizontalSpacing:w,className:Mr(q.table,{[q.tableWithColumnBorders]:t,[q.lastRowBorderBottomVisible]:ye<ee,[q.textSelectionDisabled]:f,[q.verticalAlignmentTop]:x==="top",[q.verticalAlignmentBottom]:x==="bottom"}),striped:Te?so:!1,...Oo,children:[(0,B.jsx)(Vr,{ref:Do,className:Xe?.header,style:je?.header,columns:c,sortStatus:$,onSortStatusChange:v,selectionVisible:!!C,selectionChecked:Je,selectionIndeterminate:Ho&&!Je,onSelectionChange:Pr,leftShadowVisible:Lr}),(0,B.jsx)("tbody",{children:Te?g.map((m,T)=>{let re=S(m,s),Ce=ge?.includes(re)||!1,Oe=!1,De=!1;if(H){let{hidden:R}=H;(!R||!(typeof R=="function"?R(m,T):R))&&(H.trigger==="click"?Oe=!0:De=!0)}let Re;b&&(Re=R=>{if(R.nativeEvent.shiftKey&&we!==null){let oe=g.filter(T>we?(Y,Q)=>Q>=we&&Q<=T&&(y?y(Y,Q):!0):(Y,Q)=>Q>=T&&Q<=we&&(y?y(Y,Q):!0));b(Ce?zr(C,oe,Y=>S(Y,s)):Ae([...C,...oe],Y=>S(Y,s)))}else b(Ce?C.filter(oe=>S(oe,s)!==re):Ae([...C,m],oe=>S(oe,s)));No(T)});let Se;Oe?Se=R=>{ce({y:R.clientY,x:R.clientX,record:m,recordIndex:T}),Ze?.(m,T)}:Ze&&(Se=()=>{Ze(m,T)});let Ar;return De&&(Ar=R=>{R.preventDefault(),ce({y:R.clientY,x:R.clientX,record:m,recordIndex:T})}),(0,B.jsx)(nr,{record:m,recordIndex:T,columns:c,defaultColumnRender:n,selectionVisible:!!C,selectionChecked:Ce,onSelectionChange:Re,isRecordSelectable:y,onClick:Se,onCellClick:uo,onContextMenu:Ar,contextMenuVisible:K?S(K.record,s)===re:!1,expansion:Ao,className:mo,style:xo,sx:no,customRowAttributes:io,leftShadowVisible:Lr},re)}):(0,B.jsx)(er,{})})]})}),O&&(0,B.jsx)(Er,{ref:ko,className:Xe?.pagination,style:je?.pagination,topBorderColor:o,horizontalSpacing:w,fetching:l,page:O,onPageChange:vo,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe,paginationColor:Ve,paginationSize:xe,paginationText:ne,paginationWrapBreakpoint:Ge,noRecordsText:Sr,loadingText:to,recordsLength:Te}),(0,B.jsx)(dr,{pt:Ke,pb:br,fetching:l,backgroundBlur:Ue,customContent:Be,size:ro,variant:oo,color:ao}),(0,B.jsx)(tr,{pt:Ke,pb:br,icon:lo,text:Sr,active:!l&&!Te,children:fo}),H&&K&&(0,B.jsx)(ir,{zIndex:H.zIndex,borderRadius:H.borderRadius,shadow:H.shadow,y:K.y,x:K.x,onDestroy:()=>ce(null),children:H.items(K.record,K.recordIndex).map(({divider:m,key:T,title:re,icon:Ce,color:Oe,hidden:De,disabled:Re,onClick:Se})=>m?(0,B.jsx)(cr,{},T):De?null:(0,B.jsx)(gr,{title:re??Me(T),icon:Ce,color:Oe,disabled:Re,onClick:()=>{ce(null),Se()}},T))})]})}
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|