@kwantis-id3/frontend-library 1.0.0-rc.18 → 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.
@@ -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,2 @@
1
+ export * from "./DataGrid";
2
+ export * from "./DataGridInterfaces";
@@ -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
- import { TCellValues, TTableRow } from "./TableInterfaces";
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;
@@ -10,6 +10,7 @@ export * from "./Indicator";
10
10
  export * from "./Tag";
11
11
  export * from "./Card";
12
12
  export * from "./Table";
13
+ export * from "./DataGrid";
13
14
  export * from "./MultiViewList";
14
15
  export * from "./TreeView";
15
16
  export * from "./Drawer";
@@ -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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwantis-id3/frontend-library",
3
- "version": "1.0.0-rc.18",
3
+ "version": "1.0.0-rc.19",
4
4
  "description": "Kwantis frontend components collection",
5
5
  "scriptsComments": {
6
6
  "storybook": "Starts storybook in development mode",