@smart-factor/gem-ui-components 0.0.19 → 0.0.21
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/{Drawer-Bt301-Fw.js → Drawer-ClBanoDR.js} +1 -1
- package/dist/{Stack-C-c-qEyo.js → Stack-B21Kr1Fq.js} +7 -6
- package/dist/{Tree-BQQfGoK7.js → Tree-CAPqaaUN.js} +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/FormComponents/ContextualSearch/ContextualSearch.d.ts +12 -7
- package/dist/components/FormComponents/ContextualSearch/ContextualSearch.stories.d.ts +6 -2
- package/dist/components/FormComponents/ContextualSearch/ContextualSearchControlled.d.ts +5 -5
- package/dist/components/FormComponents/ContextualSearch/ContextualSearchListListbox.d.ts +7 -0
- package/dist/components/FormComponents/ContextualSearch/mock.d.ts +1 -1
- package/dist/components/TableComponents/TableExportButton/TableExportButton.d.ts +9 -0
- package/dist/components/TableComponents/TableExportButton/index.d.ts +1 -0
- package/dist/components/TableComponents/TableWithPagination/TableWithPagination.d.ts +1 -1
- package/dist/components/TableComponents/TableWithPagination/TableWithPagination.stories.d.ts +1 -0
- package/dist/components/TableComponents/TableWithPagination/TableWithPaginationExport.d.ts +0 -0
- package/dist/components/TableComponents/TableWithPagination/types.d.ts +2 -1
- package/dist/components/Tree/index.js +1 -1
- package/dist/main.js +6538 -6452
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pt, { jsx as x, jsxs as de } from "react/jsx-runtime";
|
|
2
|
-
import { c as J, P as n, _ as f, o as q, C as ft, a as H, b as mt, s as ge, u as ye, d as ht, e as bt, f as vt, g as Ee, h as Y, i as gt, j as yt, k as Q, l as ee, m as L, n as $e, p as te, q as z, r as pe, t as V, v as ne, T as He, w as Ue, x as le, y as ze, z as We, A as Et, B as Ie, D as xt, E as Tt, F as kt, S as ke, G as Pt, H as Rt, I as wt } from "./Stack-
|
|
2
|
+
import { c as J, P as n, _ as f, o as q, C as ft, a as H, b as mt, s as ge, u as ye, d as ht, e as bt, f as vt, g as Ee, h as Y, i as gt, j as yt, k as Q, l as ee, m as L, n as $e, p as te, q as z, r as pe, t as V, v as ne, T as He, w as Ue, x as le, y as ze, z as We, A as Et, B as Ie, D as xt, E as Tt, F as kt, S as ke, G as Pt, H as Rt, I as wt } from "./Stack-B21Kr1Fq.js";
|
|
3
3
|
import * as u from "react";
|
|
4
4
|
import * as Nt from "react-dom";
|
|
5
5
|
var be = {};
|
|
@@ -6581,12 +6581,13 @@ export {
|
|
|
6581
6581
|
Ac as aj,
|
|
6582
6582
|
du as ak,
|
|
6583
6583
|
Yt as al,
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6584
|
+
Uc as am,
|
|
6585
|
+
Al as an,
|
|
6586
|
+
di as ao,
|
|
6587
|
+
Qr as ap,
|
|
6588
|
+
Ho as aq,
|
|
6589
|
+
Je as ar,
|
|
6590
|
+
Ke as as,
|
|
6590
6591
|
Fl as b,
|
|
6591
6592
|
no as c,
|
|
6592
6593
|
Nl as d,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as w, jsxs as ve } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import { createElement as Ht } from "react";
|
|
4
|
-
import { J as Yt, K as Qe, L as Qt, M as Zt, N as en, k as fe, l as me, m as U, _ as D, p as ot, O as tn, T as nn, q as Ne, r as on, Q as rn, h as de, t as Ie, P as r, R as rt, v as ge, x as Ze, U as sn, D as it, f as ln, V as st, a as ue, b as te, n as an, d as cn, g as G, o as dn, E as un, u as pn, B as ce, W as fn, X as lt, Y as ie, A as et, e as mn, F as In, S as gn, H as hn, I as bn } from "./Stack-
|
|
4
|
+
import { J as Yt, K as Qe, L as Qt, M as Zt, N as en, k as fe, l as me, m as U, _ as D, p as ot, O as tn, T as nn, q as Ne, r as on, Q as rn, h as de, t as Ie, P as r, R as rt, v as ge, x as Ze, U as sn, D as it, f as ln, V as st, a as ue, b as te, n as an, d as cn, g as G, o as dn, E as un, u as pn, B as ce, W as fn, X as lt, Y as ie, A as et, e as mn, F as In, S as gn, H as hn, I as bn } from "./Stack-B21Kr1Fq.js";
|
|
5
5
|
function yn(e, t = 0, n = 1) {
|
|
6
6
|
return process.env.NODE_ENV !== "production" && (e < t || e > n) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`), Yt(e, t, n);
|
|
7
7
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FilterOptionsState, TextFieldVariants } from '@mui/material';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface ContextualSearchBaseProps<T> {
|
|
5
5
|
options: T[];
|
|
6
6
|
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
7
7
|
renderOption: (option: T) => ReactNode;
|
|
8
8
|
label: string;
|
|
9
|
-
multiple?: boolean;
|
|
10
9
|
required?: boolean;
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
loading?: boolean;
|
|
@@ -21,16 +20,22 @@ interface ContextualBaseSearchProps<T> {
|
|
|
21
20
|
getOptionLabel: (option: T) => string;
|
|
22
21
|
filterOptions?: (options: T[], state: FilterOptionsState<T>) => T[];
|
|
23
22
|
}
|
|
24
|
-
type
|
|
23
|
+
type ContextualSearchPropsByMultiple<T> = {
|
|
25
24
|
multiple: false;
|
|
26
25
|
value: T | null;
|
|
27
26
|
onChange: (value: T | null) => void;
|
|
28
|
-
}
|
|
29
|
-
type ContextualSearchPropsMultiple<T> = ContextualBaseSearchProps<T> & {
|
|
27
|
+
} | {
|
|
30
28
|
multiple: true;
|
|
31
29
|
value: T[];
|
|
32
30
|
onChange: (value: T[]) => void;
|
|
33
31
|
};
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
type ContextualSearchPropsByType = {
|
|
33
|
+
listboxType: 'default';
|
|
34
|
+
listboxPortalId?: string;
|
|
35
|
+
} | {
|
|
36
|
+
listboxType: 'list';
|
|
37
|
+
listboxPortalId: string;
|
|
38
|
+
};
|
|
39
|
+
export type ContextualSearchProps<T> = ContextualSearchBaseProps<T> & ContextualSearchPropsByMultiple<T> & ContextualSearchPropsByType;
|
|
40
|
+
export declare function ContextualSearch<T>({ listboxType, ...props }: ContextualSearchProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
36
41
|
export {};
|
|
@@ -2,10 +2,14 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { ContextualSearchProps } from './ContextualSearch';
|
|
3
3
|
import { ContextualSearchStoryOption } from './mock';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type StoryArgs = ContextualSearchProps<ContextualSearchStoryOption> & {
|
|
6
|
+
loadingSize?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const meta: Meta<StoryArgs>;
|
|
6
9
|
export default meta;
|
|
7
|
-
type Story = StoryObj<
|
|
10
|
+
type Story = StoryObj<StoryArgs>;
|
|
8
11
|
export declare const Single: Story;
|
|
9
12
|
export declare const Multiple: Story;
|
|
10
13
|
export declare const Loading: Story;
|
|
11
14
|
export declare const WithEntryAdd: Story;
|
|
15
|
+
export declare const List: Story;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
2
|
import { ContextualSearchProps } from './ContextualSearch';
|
|
3
3
|
|
|
4
|
-
type ContextualSearchControlledProps<T extends FieldValues> = {
|
|
5
|
-
control: Control<
|
|
6
|
-
name: Path<
|
|
7
|
-
}
|
|
8
|
-
export declare function ContextualSearchControlled<T extends FieldValues>(props: ContextualSearchControlledProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type ContextualSearchControlledProps<T, R extends FieldValues> = ContextualSearchProps<T> & {
|
|
5
|
+
control: Control<R>;
|
|
6
|
+
name: Path<R>;
|
|
7
|
+
};
|
|
8
|
+
export declare function ContextualSearchControlled<T, R extends FieldValues>(props: ContextualSearchControlledProps<T, R>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AutocompleteProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
type ContextualSearchListListbox<T> = AutocompleteProps<T, boolean, false, false, 'div'>['ListboxProps'] & {
|
|
4
|
+
listboxPortalId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function ContextualSearchListListbox<T>(props: ContextualSearchListListbox<T>): import('react').ReactPortal;
|
|
7
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export type ContextualSearchStoryOption = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
secondaryLabel: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function useLazyOptions(): {
|
|
7
|
+
export declare function useLazyOptions(size?: number): {
|
|
8
8
|
options: ContextualSearchStoryOption[];
|
|
9
9
|
loading: boolean;
|
|
10
10
|
onLastOptionInView: () => Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { GridApiPro } from '@mui/x-data-grid-pro';
|
|
3
|
+
|
|
4
|
+
interface TableExportButtonProps {
|
|
5
|
+
gridApiRef: React.MutableRefObject<GridApiPro>;
|
|
6
|
+
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableExportButton: FC<TableExportButtonProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableExportButton } from './TableExportButton';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
2
|
import { TableWithPaginationProps } from './types';
|
|
3
3
|
|
|
4
|
-
export declare const TableWithPagination: <T extends GridValidRowModel>({ rowsData, paginationAndSortState, setPaginationAndSortState, isLoading, columns, offset, tableKey, filterModel, onFilterModelChange, pinnedColumns, }: TableWithPaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const TableWithPagination: <T extends GridValidRowModel>({ rowsData, paginationAndSortState, setPaginationAndSortState, isLoading, columns, offset, tableKey, filterModel, onFilterModelChange, pinnedColumns, exportDataAsExcel, }: TableWithPaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { GridCallbackDetails, GridColDef, GridColumnPinningState, GridFilterModel, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridApiPro, GridCallbackDetails, GridColDef, GridColumnPinningState, GridFilterModel, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
3
3
|
|
|
4
4
|
interface SortState {
|
|
5
5
|
field: string;
|
|
@@ -47,5 +47,6 @@ export interface TableWithPaginationProps<T extends GridValidRowModel> {
|
|
|
47
47
|
setPaginationAndSortState: Dispatch<SetStateAction<PaginationAndSortState>>;
|
|
48
48
|
filterModel?: GridFilterModel;
|
|
49
49
|
onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter'>) => void;
|
|
50
|
+
exportDataAsExcel?: (gridApiRef: React.MutableRefObject<GridApiPro>) => void;
|
|
50
51
|
}
|
|
51
52
|
export {};
|