@kwantis-id3/frontend-library 1.0.0-rc.17 → 1.0.0-rc.19
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/esm/index.js +29 -29
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/DataGrid/DataGrid.d.ts +3 -0
- package/dist/esm/types/components/DataGrid/DataGridInterfaces.d.ts +9 -0
- package/dist/esm/types/components/DataGrid/index.d.ts +2 -0
- package/dist/esm/types/components/MultiViewList/MultiViewGrid.d.ts +4 -0
- package/dist/esm/types/components/MultiViewList/MultiViewListInterfaces.d.ts +5 -0
- package/dist/esm/types/components/Table/DebouncedFilter.d.ts +1 -2
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/esm/types/utils/testing.d.ts +21 -0
- package/dist/index.d.ts +15 -1
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TCellValues } from "../Table";
|
|
2
|
+
import { TDataGridProps, TDataGridRow } from "./DataGridInterfaces";
|
|
3
|
+
export declare const DataGrid: <Cell extends TCellValues, Row extends TDataGridRow<Cell>>(props: TDataGridProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColumnDef } from "@tanstack/react-table";
|
|
2
|
+
import { TCellValues } from "../Table";
|
|
3
|
+
export type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
|
|
4
|
+
columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
|
|
5
|
+
data: Row[] | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type TDataGridRow<Cell extends TCellValues> = {
|
|
8
|
+
[key: string]: Cell;
|
|
9
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TMultiViewGridProps } from "./MultiViewListInterfaces";
|
|
2
|
+
import { TCellValues } from "../Table";
|
|
3
|
+
import { TDataGridRow } from "../DataGrid";
|
|
4
|
+
export declare const MultiViewGrid: <Cell extends TCellValues, Row extends TDataGridRow<Cell>>(props: TMultiViewGridProps<Cell, Row>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { TCellValues, TTableProps, TTableRow } from "../Table";
|
|
2
|
+
import { TDataGridProps, TDataGridRow } from "../DataGrid/DataGridInterfaces";
|
|
2
3
|
export type TMultiViewListProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = TTableProps<Cell, Row> & {
|
|
3
4
|
mode: "table" | "cards";
|
|
4
5
|
cardComponent: (item: Row) => React.ReactNode;
|
|
5
6
|
};
|
|
7
|
+
export type TMultiViewGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = TDataGridProps<Cell, Row> & {
|
|
8
|
+
mode: "table" | "cards";
|
|
9
|
+
cardComponent: (item: Row) => React.ReactNode;
|
|
10
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { Column, Table } from "@tanstack/react-table";
|
|
3
|
-
|
|
4
|
-
export declare function DebouncedFilter<T extends TTableRow<TCellValues>>({ column, table, }: {
|
|
3
|
+
export declare function DebouncedFilter<T>({ column, table, }: {
|
|
5
4
|
column: Column<T, unknown>;
|
|
6
5
|
table: Table<T>;
|
|
7
6
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { TCellValues, TTableRow } from "../components/index";
|
|
|
2
2
|
import { IThemeContextProps } from "../components/ThemeContext/ThemeInterfaces";
|
|
3
3
|
import { RenderHookResult, RenderResult } from "@testing-library/react";
|
|
4
4
|
import { ColumnDef } from "@tanstack/react-table";
|
|
5
|
+
import { TDataGridRow } from "../components/DataGrid/DataGridInterfaces";
|
|
5
6
|
export declare const renderWithTheme: (ui: React.ReactElement, themeProps?: IThemeContextProps) => RenderResult;
|
|
6
7
|
export declare function renderHookWithTheme<T, R>(hook: (props: T) => R, themeProps?: IThemeContextProps): RenderHookResult<R, T>;
|
|
7
8
|
export declare const headingStyle: {
|
|
@@ -10,6 +11,25 @@ export declare const headingStyle: {
|
|
|
10
11
|
fontWeight: string;
|
|
11
12
|
};
|
|
12
13
|
export declare const templateColumns: ColumnDef<TTableRow<TCellValues>, TCellValues>[];
|
|
14
|
+
export declare const templateDataGridColumns: ColumnDef<TDataGridRow<TCellValues>, TCellValues>[];
|
|
15
|
+
export type TWellData = {
|
|
16
|
+
[key: string]: string | number | boolean | null;
|
|
17
|
+
well_id: string;
|
|
18
|
+
id_t_well: number;
|
|
19
|
+
well_name: string;
|
|
20
|
+
data_quality: number;
|
|
21
|
+
is_live: boolean;
|
|
22
|
+
country: string;
|
|
23
|
+
business_unit: string;
|
|
24
|
+
spud_date: string;
|
|
25
|
+
rig_contractor: string;
|
|
26
|
+
rig_name: string;
|
|
27
|
+
rig_type: string;
|
|
28
|
+
last_sensordate: string | null;
|
|
29
|
+
last_ddr_date: string | null;
|
|
30
|
+
mudlog_data_quality: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const templateDataGridData: TWellData[];
|
|
13
33
|
export declare const templateTableData: {
|
|
14
34
|
cells: {
|
|
15
35
|
well_name: {
|
|
@@ -51,3 +71,4 @@ export declare const templateTableData: {
|
|
|
51
71
|
};
|
|
52
72
|
}[];
|
|
53
73
|
export declare const TemplateCard: (item: TTableRow<TCellValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare const TemplateCardGrid: (item: TDataGridRow<TCellValues>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -458,10 +458,24 @@ type TTableRow<T extends TCellValues> = {
|
|
|
458
458
|
declare const Table: <Cell extends TCellValues, Row extends TTableRow<Cell>>(props: TTableProps<Cell, Row>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
459
459
|
declare const renderCell: (value: string | number | boolean | null) => _emotion_react_jsx_runtime.JSX.Element;
|
|
460
460
|
|
|
461
|
+
type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
|
|
462
|
+
columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
|
|
463
|
+
data: Row[] | undefined;
|
|
464
|
+
};
|
|
465
|
+
type TDataGridRow<Cell extends TCellValues> = {
|
|
466
|
+
[key: string]: Cell;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
declare const DataGrid: <Cell extends TCellValues, Row extends TDataGridRow<Cell>>(props: TDataGridProps<Cell, Row>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
470
|
+
|
|
461
471
|
type TMultiViewListProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = TTableProps<Cell, Row> & {
|
|
462
472
|
mode: "table" | "cards";
|
|
463
473
|
cardComponent: (item: Row) => React.ReactNode;
|
|
464
474
|
};
|
|
475
|
+
type TMultiViewGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = TDataGridProps<Cell, Row> & {
|
|
476
|
+
mode: "table" | "cards";
|
|
477
|
+
cardComponent: (item: Row) => React.ReactNode;
|
|
478
|
+
};
|
|
465
479
|
|
|
466
480
|
declare const MultiViewList: <Cell extends TCellValues, Row extends TTableRow<Cell>>(props: TMultiViewListProps<Cell, Row>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
467
481
|
|
|
@@ -627,4 +641,4 @@ declare const getActiveColor: (color: string) => string;
|
|
|
627
641
|
|
|
628
642
|
declare function usePrefersColorScheme(): "light" | "dark";
|
|
629
643
|
|
|
630
|
-
export { Accordion, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, ControlledTreeView, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewList, SingleSelect, SingleSelectProps, Slider, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewListProps, TRenderTriggerProps, TSliderProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|
|
644
|
+
export { Accordion, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, ControlledTreeView, DataGrid, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewList, SingleSelect, SingleSelectProps, Slider, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDataGridProps, TDataGridRow, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewGridProps, TMultiViewListProps, TRenderTriggerProps, TSliderProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|