@veeqo/ui 2.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/components/{DataTableExp → DataTable}/DataTable.d.ts +1 -1
  2. package/dist/components/{DataTableExp → DataTable}/index.d.ts +1 -1
  3. package/dist/components/LegacyDataTable/LegacyDataTable.d.ts +26 -0
  4. package/dist/components/LegacyDataTable/LegacyDataTable.test.d.ts +1 -0
  5. package/dist/components/LegacyDataTable/SkeletonContent/SkeletonContent.d.ts +7 -0
  6. package/dist/components/LegacyDataTable/SkeletonContent/index.d.ts +1 -0
  7. package/dist/components/LegacyDataTable/SpecificState/SpecificState.d.ts +7 -0
  8. package/dist/components/LegacyDataTable/SpecificState/index.d.ts +1 -0
  9. package/dist/components/LegacyDataTable/SpecificState/styled.d.ts +8 -0
  10. package/dist/components/LegacyDataTable/StickyHeader.d.ts +10 -0
  11. package/dist/components/LegacyDataTable/cells/ClickableCell.d.ts +7 -0
  12. package/dist/components/LegacyDataTable/cells/EditableCell.d.ts +7 -0
  13. package/dist/components/LegacyDataTable/cells/SkeletonCell.d.ts +11 -0
  14. package/dist/components/LegacyDataTable/cells/SkeletonHeaderCell.d.ts +8 -0
  15. package/dist/components/LegacyDataTable/cells/index.d.ts +3 -0
  16. package/dist/components/LegacyDataTable/cells/styled.d.ts +1 -0
  17. package/dist/components/LegacyDataTable/index.d.ts +1 -0
  18. package/dist/components/LegacyDataTable/styled.d.ts +46 -0
  19. package/dist/components/LegacyDataTable/utils/constants.d.ts +9 -0
  20. package/dist/components/LegacyDataTable/utils/hooks.d.ts +4 -0
  21. package/dist/components/LegacyDataTable/utils/index.d.ts +2 -0
  22. package/dist/components/LegacyDataTable/utils/types.d.ts +106 -0
  23. package/dist/components/index.d.ts +1 -1
  24. package/dist/index.esm.js +1 -1
  25. package/dist/index.esm.js.map +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/package.json +1 -1
  29. /package/dist/components/{DataTableExp → DataTable}/DataTable.test.d.ts +0 -0
  30. /package/dist/components/{DataTableExp → DataTable}/components/ActionBar.d.ts +0 -0
  31. /package/dist/components/{DataTableExp → DataTable}/components/Cell.d.ts +0 -0
  32. /package/dist/components/{DataTableExp → DataTable}/components/ColumnHeader.d.ts +0 -0
  33. /package/dist/components/{DataTableExp → DataTable}/components/ColumnMenu.d.ts +0 -0
  34. /package/dist/components/{DataTableExp → DataTable}/components/EmptyBodyContent.d.ts +0 -0
  35. /package/dist/components/{DataTableExp → DataTable}/components/Header.d.ts +0 -0
  36. /package/dist/components/{DataTableExp → DataTable}/components/LoadingCellContent.d.ts +0 -0
  37. /package/dist/components/{DataTableExp → DataTable}/components/NoWrap.d.ts +0 -0
  38. /package/dist/components/{DataTableExp → DataTable}/components/Row.d.ts +0 -0
  39. /package/dist/components/{DataTableExp → DataTable}/components/ScrollContainer.d.ts +0 -0
  40. /package/dist/components/{DataTableExp → DataTable}/components/SelectionCell.d.ts +0 -0
  41. /package/dist/components/{DataTableExp → DataTable}/components/SelectionHeader.d.ts +0 -0
  42. /package/dist/components/{DataTableExp → DataTable}/components/StickyHead.d.ts +0 -0
  43. /package/dist/components/{DataTableExp → DataTable}/components/TableGrid.d.ts +0 -0
  44. /package/dist/components/{DataTableExp → DataTable}/components/Truncate.d.ts +0 -0
  45. /package/dist/components/{DataTableExp → DataTable}/components/Wrapper.d.ts +0 -0
  46. /package/dist/components/{DataTableExp → DataTable}/constants.d.ts +0 -0
  47. /package/dist/components/{DataTableExp → DataTable}/hooks/index.d.ts +0 -0
  48. /package/dist/components/{DataTableExp → DataTable}/hooks/useCellWidths.d.ts +0 -0
  49. /package/dist/components/{DataTableExp → DataTable}/hooks/useColumns.d.ts +0 -0
  50. /package/dist/components/{DataTableExp → DataTable}/hooks/useDragToScroll.d.ts +0 -0
  51. /package/dist/components/{DataTableExp → DataTable}/hooks/useNested.d.ts +0 -0
  52. /package/dist/components/{DataTableExp → DataTable}/hooks/useScrollPosition.d.ts +0 -0
  53. /package/dist/components/{DataTableExp → DataTable}/hooks/useSelection.d.ts +0 -0
  54. /package/dist/components/{DataTableExp → DataTable}/renderers/index.d.ts +0 -0
  55. /package/dist/components/{DataTableExp → DataTable}/renderers/renderCell.d.ts +0 -0
  56. /package/dist/components/{DataTableExp → DataTable}/renderers/renderFooter.d.ts +0 -0
  57. /package/dist/components/{DataTableExp → DataTable}/renderers/renderHeader.d.ts +0 -0
  58. /package/dist/components/{DataTableExp → DataTable}/renderers/renderLoadingCell.d.ts +0 -0
  59. /package/dist/components/{DataTableExp → DataTable}/renderers/renderNestedCell.d.ts +0 -0
  60. /package/dist/components/{DataTableExp → DataTable}/types.d.ts +0 -0
  61. /package/dist/components/{DataTableExp → DataTable}/utils/GetSortIcon.d.ts +0 -0
  62. /package/dist/components/{DataTableExp → DataTable}/utils/alignmentToFlex.d.ts +0 -0
  63. /package/dist/components/{DataTableExp → DataTable}/utils/generateTableCss.d.ts +0 -0
  64. /package/dist/components/{DataTableExp → DataTable}/utils/getNextSortState.d.ts +0 -0
  65. /package/dist/components/{DataTableExp → DataTable}/utils/getRowState.d.ts +0 -0
  66. /package/dist/components/{DataTableExp → DataTable}/utils/getRowState.test.d.ts +0 -0
  67. /package/dist/components/{DataTableExp → DataTable}/utils/index.d.ts +0 -0
  68. /package/dist/components/{DataTableExp → DataTable}/utils/parseWidth.d.ts +0 -0
  69. /package/dist/components/{DataTableExp → DataTable}/utils/sumAll.d.ts +0 -0
@@ -3,7 +3,7 @@ import { DataTableProps } from './types';
3
3
  import { ColumnMenu } from './components/ColumnMenu';
4
4
  import { SelectionCell } from './components/SelectionCell';
5
5
  import { SelectionHeader } from './components/SelectionHeader';
6
- export declare const DataTableExp: {
6
+ export declare const DataTable: {
7
7
  ({ ActionBarSlot, borderMode, columns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, }: DataTableProps): React.JSX.Element;
8
8
  defaultProps: {
9
9
  loading: boolean;
@@ -1,2 +1,2 @@
1
- export { DataTableExp } from './DataTable';
1
+ export { DataTable } from './DataTable';
2
2
  export { useCellWidths, useColumns, useDragToScroll, useNested, useScrollPosition, useSelection, } from './hooks';
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { LegacyDataTableProps } from './utils/types';
3
+ export declare const IconUnsorted: () => React.JSX.Element;
4
+ export declare const IconSortAsc: () => React.JSX.Element;
5
+ export declare const IconSortDesc: () => React.JSX.Element;
6
+ /**
7
+ * @deprecated
8
+ *
9
+ * Use DataTable instead
10
+ */
11
+ export declare const LegacyDataTable: {
12
+ ({ borderless, striped, noWrap, showScrollbar, headers, rows, renderRow, renderNestedRow, expandedRowIds, renderLoadingRow, renderFooterRow, renderFooterLoadingRow, omitFooterSelectionCell, selectedRowIds, disabledSelectionInputRowIds, selectionMode, onChangeSelectedRowIds, sortColumnId, sortDirection, onChangeSort, isError, isLoading, skeletonRowsNumber, isHeaderSticky, stickyHeaderStyle, customSpecificState, bodyHeightInSpecificStates, startFixedColumnsNumber, endFixedColumnsNumber, }: LegacyDataTableProps): React.JSX.Element;
13
+ Cell: import("styled-components").StyledComponent<"td", any, import("./styled").CellProps, never>;
14
+ ClickableCell: ({ onClick, children, ...otherProps }: import("./cells/ClickableCell").ClickableCellProps) => React.JSX.Element;
15
+ EditableCell: ({ onClick, children, ...otherProps }: import("./cells/EditableCell").EditableCellProps) => React.JSX.Element;
16
+ SkeletonCell: {
17
+ ({ style, ...otherProps }: import("./cells/SkeletonCell").SkeletonCellProps): React.JSX.Element;
18
+ defaultProps: {
19
+ style: {};
20
+ };
21
+ };
22
+ SkeletonContent: ({ isLoading, style }: {
23
+ isLoading?: boolean | undefined;
24
+ style?: React.CSSProperties | undefined;
25
+ }) => React.JSX.Element;
26
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type SkeletonContentPropTypes = {
3
+ isLoading?: boolean;
4
+ style?: React.CSSProperties;
5
+ };
6
+ export declare const SkeletonContent: ({ isLoading, style }: SkeletonContentPropTypes) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { SkeletonContent } from './SkeletonContent';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SpecificStateType } from '../utils/types';
3
+ type SpecificStatePropTypes = SpecificStateType & {
4
+ height: number;
5
+ };
6
+ export declare const SpecificState: ({ height, icon, title, subTitle }: SpecificStatePropTypes) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { SpecificState } from './SpecificState';
@@ -0,0 +1,8 @@
1
+ type SpecificStateContainerPropTypes = {
2
+ height: number;
3
+ };
4
+ declare const SpecificStateContainer: import("styled-components").StyledComponent<"div", any, SpecificStateContainerPropTypes, never>;
5
+ declare const EllipseContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ declare const TitleText: import("styled-components").StyledComponent<"span", any, {} & import("../../Text/types").TextProps, never>;
7
+ declare const SubTitleText: import("styled-components").StyledComponent<"span", any, {} & import("../../Text/types").TextProps, never>;
8
+ export { SpecificStateContainer, EllipseContainer, TitleText, SubTitleText };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type StickyHeaderPropTypes = {
3
+ tableRef: React.RefObject<HTMLTableElement>;
4
+ wrapperRef: React.RefObject<HTMLDivElement>;
5
+ isFixedLayout: boolean;
6
+ renderHeader: (offset?: number) => React.ReactNode;
7
+ wrapperStyle?: React.CSSProperties;
8
+ };
9
+ export declare const StickyHeader: ({ renderHeader, tableRef, wrapperRef, isFixedLayout, wrapperStyle, }: StickyHeaderPropTypes) => React.JSX.Element | null;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CellProps } from '../styled';
3
+ export interface ClickableCellProps extends CellProps {
4
+ onClick: React.MouseEventHandler<HTMLButtonElement>;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const ClickableCell: ({ onClick, children, ...otherProps }: ClickableCellProps) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CellProps } from '../styled';
3
+ export interface EditableCellProps extends CellProps {
4
+ onClick: React.MouseEventHandler<HTMLButtonElement>;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const EditableCell: ({ onClick, children, ...otherProps }: EditableCellProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { CellProps } from '../styled';
3
+ export interface SkeletonCellProps extends CellProps {
4
+ style?: CSSProperties;
5
+ }
6
+ export declare const SkeletonCell: {
7
+ ({ style, ...otherProps }: SkeletonCellProps): React.JSX.Element;
8
+ defaultProps: {
9
+ style: {};
10
+ };
11
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { SkeletonCellProps } from './SkeletonCell';
3
+ type SkeletonHeaderCellPropTypes = SkeletonCellProps & {
4
+ width: string | number;
5
+ isLoading: boolean;
6
+ };
7
+ export declare const SkeletonHeaderCell: ({ style, width, isLoading, ...otherProps }: SkeletonHeaderCellPropTypes) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export { ClickableCell } from './ClickableCell';
2
+ export { EditableCell } from './EditableCell';
3
+ export { SkeletonCell } from './SkeletonCell';
@@ -0,0 +1 @@
1
+ export declare const CellButton: import("styled-components").StyledComponent<"button", any, {}, never>;
@@ -0,0 +1 @@
1
+ export { LegacyDataTable } from './LegacyDataTable';
@@ -0,0 +1,46 @@
1
+ import { NoWrapType, StripedType } from './utils/types';
2
+ import { ScrollPosition } from './utils/constants';
3
+ type WrapperPropTypes = {
4
+ scrollDisabled: boolean;
5
+ scrollPosition?: ScrollPosition;
6
+ lastStartFixedColumnsIndex?: number;
7
+ firstEndFixedColumnsIndex?: number;
8
+ showScrollbar?: boolean;
9
+ };
10
+ export declare const TooltipContent: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, WrapperPropTypes, never>;
12
+ export declare const WrapperBordered: import("styled-components").StyledComponent<"div", any, WrapperPropTypes, never>;
13
+ export declare const Head: import("styled-components").StyledComponent<"thead", any, {}, never>;
14
+ export declare const Body: import("styled-components").StyledComponent<"tbody", any, {
15
+ fixedColumnsStyle?: string | undefined;
16
+ }, never>;
17
+ export declare const Foot: import("styled-components").StyledComponent<"tfoot", any, {}, never>;
18
+ export interface RowProps {
19
+ accentColor?: string;
20
+ }
21
+ export declare const Row: import("styled-components").StyledComponent<"tr", any, RowProps, never>;
22
+ export interface CellProps {
23
+ align?: 'left' | 'center' | 'right';
24
+ grow?: boolean;
25
+ }
26
+ export declare const Cell: import("styled-components").StyledComponent<"td", any, CellProps, never>;
27
+ export declare const HeaderCell: import("styled-components").StyledComponent<"td", any, CellProps & {
28
+ as: string;
29
+ }, "as">;
30
+ export interface HeaderCellLayoutProps {
31
+ align?: 'left' | 'center' | 'right';
32
+ }
33
+ export declare const HeaderCellLayout: import("styled-components").StyledComponent<"div", any, HeaderCellLayoutProps, never>;
34
+ type TablePropTypes = {
35
+ striped?: StripedType;
36
+ noWrap?: NoWrapType;
37
+ tableLoading?: boolean;
38
+ isFixedLayout?: boolean;
39
+ };
40
+ export declare const Table: import("styled-components").StyledComponent<"table", any, TablePropTypes, never>;
41
+ export declare const Footer: import("styled-components").StyledComponent<"tfoot", any, {
42
+ fixedColumnsStyle?: string | undefined;
43
+ }, never>;
44
+ export declare const StickyHeaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
45
+ export declare const FakeHeaderTable: import("styled-components").StyledComponent<"table", any, TablePropTypes, never>;
46
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SpecificStateType } from './types';
2
+ export declare const defaultEmptyState: SpecificStateType;
3
+ export declare const defaultErrorState: SpecificStateType;
4
+ export declare enum ScrollPosition {
5
+ start = "start",
6
+ middle = "middle",
7
+ end = "End",
8
+ none = "none"
9
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const useStickyHeader: (tableRef: React.RefObject<HTMLTableElement | null>, topOffset?: number) => {
3
+ isSticky: boolean;
4
+ };
@@ -0,0 +1,2 @@
1
+ import { FixedColumnInlineStyle } from './types';
2
+ export declare const convertFixedColumnInlineStyleToStyled: (fixedColumnsStyle: FixedColumnInlineStyle[]) => string;
@@ -0,0 +1,106 @@
1
+ import { ReactNode, CSSProperties, ReactElement } from 'react';
2
+ export type LegacyDataTableId = string | number;
3
+ export type RowData = any;
4
+ export type LegacyDataTableHeader = {
5
+ id: LegacyDataTableId;
6
+ title?: string;
7
+ icon?: ReactElement;
8
+ tooltip?: string;
9
+ align?: 'left' | 'center' | 'right';
10
+ sortable?: boolean;
11
+ grow?: boolean;
12
+ width?: number | string;
13
+ skeleton?: string;
14
+ skeletonStyle?: CSSProperties;
15
+ };
16
+ export type LegacyDataTableRow = {
17
+ id: LegacyDataTableId;
18
+ data: RowData;
19
+ nestedRows?: LegacyDataTableNestedRow[];
20
+ accentColor?: string;
21
+ };
22
+ export type LegacyDataTableNestedRow = {
23
+ id: LegacyDataTableId;
24
+ data: RowData;
25
+ };
26
+ export type LegacyDataTableSortDirection = 'ascending' | 'descending';
27
+ export type LegacyDataTableSelectionMode = 'multiple' | 'single';
28
+ export type SpecificStates = '' | 'empty' | 'emptyWithSearch' | 'error';
29
+ export type SpecificStateType = {
30
+ icon: ReactNode;
31
+ title: string;
32
+ subTitle?: string;
33
+ };
34
+ export type StripedType = boolean;
35
+ export type NoWrapType = boolean;
36
+ export type ShowScrollbarType = boolean;
37
+ /**
38
+ * LegacyDataTable properties.
39
+ */
40
+ export interface LegacyDataTableProps {
41
+ /** Removes the outer border */
42
+ borderless?: boolean;
43
+ /** Enables row zebra striping */
44
+ striped?: StripedType;
45
+ /** Disables text wrapping in header cells */
46
+ noWrap?: NoWrapType;
47
+ /** Forces OSX to render scrollbars */
48
+ showScrollbar?: ShowScrollbarType;
49
+ /** Configure column headers */
50
+ headers?: LegacyDataTableHeader[];
51
+ /** Configure content rows */
52
+ rows: LegacyDataTableRow[];
53
+ /** Render a content row */
54
+ renderRow: (row: LegacyDataTableRow) => ReactNode;
55
+ /** Render a nested content row */
56
+ renderNestedRow?: (nestedRow: LegacyDataTableNestedRow) => ReactNode;
57
+ /** List of row IDs that are expanded - their nested rows will be rendered */
58
+ expandedRowIds?: LegacyDataTableId[];
59
+ /** Render a content row when in the LOADING state */
60
+ renderLoadingRow?: () => ReactNode;
61
+ /** Render a footer row */
62
+ renderFooterRow?: (rows: LegacyDataTableRow[]) => ReactNode;
63
+ /** Render a footer row when in the LOADING state */
64
+ renderFooterLoadingRow?: () => ReactNode;
65
+ /** Hides the extra first cell added to the footer when row selection is enabled */
66
+ omitFooterSelectionCell?: boolean;
67
+ /** List of selected row IDs */
68
+ selectedRowIds?: Array<LegacyDataTableId>;
69
+ /** Sets the mode of row selection */
70
+ selectionMode?: LegacyDataTableSelectionMode;
71
+ /** Disable ability to select specified rows */
72
+ disabledSelectionInputRowIds?: LegacyDataTableId[];
73
+ /** Event triggered when rows are selected/deselected */
74
+ onChangeSelectedRowIds?: (selectedRowIds: Array<LegacyDataTableId>) => void;
75
+ /** Current sorted column ID (see headers config) */
76
+ sortColumnId?: LegacyDataTableId;
77
+ /** Current sort direction */
78
+ sortDirection?: LegacyDataTableSortDirection;
79
+ /** Event triggered when sortable column headers are clicked */
80
+ onChangeSort?: (columnId: LegacyDataTableId, direction: LegacyDataTableSortDirection) => void;
81
+ /** Shows the ERROR state */
82
+ isError: boolean;
83
+ /** Shows the LOADING state */
84
+ isLoading: boolean;
85
+ /** Default number of rows shown in LOADING state */
86
+ skeletonRowsNumber?: number;
87
+ /** Enables sticky headers row */
88
+ isHeaderSticky?: boolean;
89
+ /** Custom styles for stick header container - e.g. adding `top` offset */
90
+ stickyHeaderStyle?: CSSProperties;
91
+ /**
92
+ * Config object to show custom content when in ERROR or EMPTY states.
93
+ * Accepts `title`, `subTitle` and `icon`.
94
+ * */
95
+ customSpecificState?: SpecificStateType;
96
+ /** Override the table content height when using customSpecificState */
97
+ bodyHeightInSpecificStates?: number;
98
+ /** Number of fixed columns at the start of the table */
99
+ startFixedColumnsNumber?: number;
100
+ /** Number of fixed columns at the end of the table */
101
+ endFixedColumnsNumber?: number;
102
+ }
103
+ export type FixedColumnInlineStyle = {
104
+ index: number;
105
+ style: CSSProperties;
106
+ };
@@ -14,7 +14,7 @@ export { Checkbox } from './Checkbox';
14
14
  export { Choice } from './Choice';
15
15
  export { ChoiceList } from './ChoiceList';
16
16
  export { CopyToClipboard } from './CopyToClipboard';
17
- export { DataTableExp, useCellWidths, useColumns, useDragToScroll, useNested, useScrollPosition, useSelection, } from './DataTableExp';
17
+ export { DataTable, useCellWidths, useColumns, useDragToScroll, useNested, useScrollPosition, useSelection, } from './DataTable';
18
18
  export { DescriptionList } from './DescriptionList';
19
19
  export { DetailPage } from './DetailPage';
20
20
  export { DimensionsInput } from './DimensionsInput';