@smart-factor/gem-ui-components 0.0.73 → 0.0.75

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.
@@ -1,5 +1,5 @@
1
1
  import pt, { jsx as x, jsxs as de } from "react/jsx-runtime";
2
- import { a as Z, P as n, _ as f, o as q, C as ft, b as H, e as mt, s as ge, g as ye, h as ht, i as bt, j as vt, k as Ee, l as Y, m as gt, n as yt, p as Q, q as ee, r as L, t as $e, v as te, w as z, x as pe, y as V, z as ne, A as He, B as Ue, D as le, E as ze, F as We, G as Et, H as Me, I as xt, J as Tt, K as kt, S as ke, L as Pt, M as Rt, N as Nt } from "./Stack-ThmeJzqr.js";
2
+ import { a as Z, P as n, _ as f, o as q, C as ft, b as H, e as mt, s as ge, g as ye, h as ht, i as bt, j as vt, k as Ee, l as Y, m as gt, n as yt, p as Q, q as ee, r as L, t as $e, v as te, w as z, x as pe, y as V, z as ne, A as He, B as Ue, D as le, E as ze, F as We, G as Et, H as Me, I as xt, J as Tt, K as kt, S as ke, L as Pt, M as Rt, N as Nt } from "./Stack-B3SBR1st.js";
3
3
  import * as u from "react";
4
4
  import * as wt from "react-dom";
5
5
  var be = {};
@@ -2098,14 +2098,15 @@ export {
2098
2098
  nt as M,
2099
2099
  Qe as P,
2100
2100
  ce as a,
2101
- Dt as b,
2102
- $t as c,
2101
+ oe as b,
2102
+ Dt as c,
2103
2103
  Ge as d,
2104
2104
  Ye as e,
2105
- oe as f,
2105
+ $t as f,
2106
2106
  Mt as g,
2107
2107
  ue as h,
2108
2108
  Ze as i,
2109
+ lt as j,
2109
2110
  G as o,
2110
2111
  Lt as r
2111
2112
  };
@@ -17,12 +17,12 @@ var T_ = (o, e, t, n) => ({
17
17
  import Gk, { jsx as Wt, jsxs as Fr, Fragment as Mb } from "react/jsx-runtime";
18
18
  import * as vr from "react";
19
19
  import { useCallback as pd, createContext as iQ, useContext as rQ, useState as kc, useEffect as uu, useMemo as Hm, useRef as aQ } from "react";
20
- import { ai as sQ, ak as lQ, G as Ix, al as Mx, am as A0, an as cQ, a8 as tN, B as Um, ao as Rb, ag as eb, ah as nN, v as uQ, ac as h2, ae as dQ, a2 as AQ, n as hQ, f as pQ, a9 as gQ } from "./theme-DQCPHf7F.js";
21
- import { C as oN, r as Qk } from "./Drawer-d8461jqd.js";
20
+ import { aj as sQ, al as lQ, G as Ix, am as Mx, an as A0, ao as cQ, a8 as tN, B as Um, ap as Rb, ah as eb, ai as nN, v as uQ, ad as h2, af as dQ, a2 as AQ, n as hQ, f as pQ, aa as gQ } from "./theme-BBp3_Hm7.js";
21
+ import { C as oN, r as Qk } from "./Drawer-AZWlL1mS.js";
22
22
  import "react-dom";
23
23
  import "@mui/x-data-grid-pro";
24
24
  import "react-router-dom";
25
- import { r as ur, K as Ed, M as Gb, n as mQ, a9 as p2, aa as fQ, S as zm, L as Dk } from "./Stack-ThmeJzqr.js";
25
+ import { r as ur, K as Ed, M as Gb, n as mQ, a9 as p2, aa as fQ, S as zm, L as Dk } from "./Stack-B3SBR1st.js";
26
26
  var ag = class {
27
27
  constructor() {
28
28
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -6585,10 +6585,11 @@ export {
6585
6585
  du as an,
6586
6586
  Yt as ao,
6587
6587
  Qr as ap,
6588
- Ho as aq,
6589
- Je as ar,
6590
- He as as,
6591
- Ke as at,
6588
+ Au as aq,
6589
+ Ho as ar,
6590
+ Je as as,
6591
+ He as at,
6592
+ Ke as au,
6592
6593
  be as b,
6593
6594
  Xi as c,
6594
6595
  Xo as d,
@@ -1,8 +1,8 @@
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 Wt } from "react";
4
- import { p as fe, q as me, r as U, _ as D, v as nt, O as Jt, A as Gt, w as Le, x as Ht, Q as Yt, l as de, y as Ie, P as r, R as ot, z as ge, D as Qe, U as Qt, I as rt, j as Zt, V as it, b as ue, e as te, t as en, h as tn, k as G, o as nn, J as on, g as rn, H as ce, W as sn, X as st, Y as ie, G as Ze, i as ln, K as an, S as cn, M as dn, N as un } from "./Stack-ThmeJzqr.js";
5
- import { u as pn, a as fn, b as X } from "./useFormControl-Cj8rSR6R.js";
4
+ import { p as fe, q as me, r as U, _ as D, v as nt, O as Jt, A as Gt, w as Le, x as Ht, Q as Yt, l as de, y as Ie, P as r, R as ot, z as ge, D as Qe, U as Qt, I as rt, j as Zt, V as it, b as ue, e as te, t as en, h as tn, k as G, o as nn, J as on, g as rn, H as ce, W as sn, X as st, Y as ie, G as Ze, i as ln, K as an, S as cn, M as dn, N as un } from "./Stack-B3SBR1st.js";
5
+ import { u as pn, a as fn, b as X } from "./useFormControl-K73YLReg.js";
6
6
  function mn(e) {
7
7
  return fe("MuiCollapse", e);
8
8
  }
@@ -1,4 +1,4 @@
1
- import { D as e } from "../../Drawer-d8461jqd.js";
1
+ import { D as e } from "../../Drawer-AZWlL1mS.js";
2
2
  export {
3
3
  e as Drawer
4
4
  };
@@ -6,4 +6,4 @@ export interface MuiLikeWrapperProps {
6
6
  required?: boolean;
7
7
  errorMessage?: string;
8
8
  }
9
- export declare const MuiLikeWrapper: ({ label, children, required, errorMessage }: MuiLikeWrapperProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const MuiLikeWrapper: ({ label, children, required, errorMessage, }: MuiLikeWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { PaginatedPopoverProps } from './types';
3
+
4
+ interface NotificationItemProps {
5
+ children: ReactNode;
6
+ onClick?: () => void;
7
+ }
8
+ export declare const PaginatedPopover: (<T>({ notifications, loadParams, setLoadParams, isLoading, width, height, title, children, Icon, }: PaginatedPopoverProps<T & {
9
+ id: string | number;
10
+ }>) => import("react/jsx-runtime").JSX.Element) & {
11
+ Item: ({ children, onClick }: NotificationItemProps) => import("react/jsx-runtime").JSX.Element;
12
+ };
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { PaginatedPopover } from './PaginatedPopover';
3
+ import { PaginatedPopoverProps } from './types';
4
+
5
+ declare const meta: Meta<typeof PaginatedPopover>;
6
+ export default meta;
7
+ type Story = StoryObj<PaginatedPopoverProps<{
8
+ id: string | number;
9
+ content: string;
10
+ date: Date;
11
+ }>>;
12
+ export declare const Docs: Story;
13
+ export declare const Empty: Story;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ export declare const ListViewCellWrapper: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/system').Theme>, {}, {}>;
5
+ export declare const NotificationItemWrapper: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/system').Theme>, {}, {}>;
8
+ export declare const StyledPaper: import('@emotion/styled').StyledComponent<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
10
+ }, "className" | "style" | "classes" | "children" | "sx" | "elevation" | "variant" | "square"> & import('@mui/system').MUIStyledCommonProps<import('@mui/system').Theme> & {
11
+ width: string;
12
+ height: string;
13
+ }, {}, {}>;
14
+ export declare const StyledList: import('@emotion/styled').StyledComponent<import('@mui/material').ListOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
15
+ ref?: ((instance: HTMLUListElement | null) => void) | import('react').RefObject<HTMLUListElement> | null | undefined;
16
+ }, "className" | "style" | "classes" | "children" | "sx" | "dense" | "disablePadding" | "subheader"> & import('@mui/system').MUIStyledCommonProps<import('@mui/system').Theme>, {}, {}>;
17
+ export declare const StyledListHeader: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
18
+ ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
19
+ }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/system').Theme>, {}, {}>;
@@ -0,0 +1,18 @@
1
+ import { PaginatedPopoverProps } from './types';
2
+
3
+ export declare const NotificationContent: <T extends {
4
+ id: string | number;
5
+ }>({ open, anchorEl, onClose, notifications, loadingMore, isLoading, allItemsLoaded, width, height, title, children, listRef, }: {
6
+ open: boolean;
7
+ anchorEl: HTMLButtonElement | null;
8
+ onClose: () => void;
9
+ notifications: PaginatedPopoverProps<T>['notifications'];
10
+ loadingMore: boolean;
11
+ isLoading: boolean;
12
+ allItemsLoaded: boolean;
13
+ width: string;
14
+ height: string;
15
+ title: React.ReactNode;
16
+ children: PaginatedPopoverProps<T>['children'];
17
+ listRef: React.RefObject<HTMLUListElement>;
18
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'react';
2
+
3
+ export interface PaginatedPopoverHeaderProps {
4
+ children: ReactNode;
5
+ onClose: () => void;
6
+ }
7
+ export declare const PaginatedPopoverHeader: FC<PaginatedPopoverHeaderProps>;
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ import { GenericPageDataDto } from '../../main';
3
+
4
+ export interface LoadParams {
5
+ page: number;
6
+ size: number;
7
+ }
8
+ export interface PaginatedPopoverProps<T> {
9
+ notifications: GenericPageDataDto<T> | undefined;
10
+ isLoading: boolean;
11
+ loadParams: LoadParams;
12
+ setLoadParams: (loadParams: LoadParams) => void;
13
+ onDelete: (id: string) => void;
14
+ width?: string;
15
+ height?: string;
16
+ title: string;
17
+ children: ((item: T & {
18
+ id: string | number;
19
+ }) => ReactNode) | ReactNode;
20
+ Icon: ReactNode;
21
+ }
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../Tree-D_Zjc1fk.js";
1
+ import { T as o } from "../../Tree-DjhO_q-b.js";
2
2
  export {
3
3
  o as Tree
4
4
  };
@@ -0,0 +1 @@
1
+ export declare const withAliases: <A extends object, B>(component: A, properties: B) => A & B;
package/dist/main.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './components/FormComponents';
11
11
  export { Grid, GridInitialState } from './components/Grid';
12
12
  export { LoadingBackdrop } from './components/LoadingBackdrop/LoadingBackdrop';
13
13
  export { MuiLikeWrapper } from './components/MuiLikeWrapper';
14
+ export { PaginatedPopover } from './components/PaginatedPopover/PaginatedPopover';
14
15
  export { ResizableWrapper } from './components/ResizableWrapper/ResizableWrapper';
15
16
  export { SimpleAutocomplete } from './components/SimpleAutocomplete';
16
17
  export { SimpleInput } from './components/SimpleInput/SimpleInput';
package/dist/main.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import te, { jsx as a, jsxs as k, Fragment as at } from "react/jsx-runtime";
2
- import { L as re, P as l, _ as x, Z as Wt, $ as Gt, a0 as qt, a1 as Zt, w as N, T as qe, Y as Xt, a2 as Jt, l as Kt, a3 as Qt, q as ye, p as ve, r as R, v as Z, j as er, y as X, a as tr, a4 as rr, z as J, E as Ye, b as z, F as ze, J as or, a5 as nr, a6 as sr, M as q, U as ir, a7 as ar, x as Te, e as oe, K as H, a8 as lr, S as Ne, a9 as ne, aa as se, N as pe } from "./Stack-ThmeJzqr.js";
3
- import { r as ie, e as lt, P as ct, i as cr, C as dr } from "./Drawer-d8461jqd.js";
4
- import { D as ii, L as ai } from "./Drawer-d8461jqd.js";
5
- import { A as ur, l as Ze, L as hr, g as fr, S as pr, a as mr, t as Xe, T as gr, b as br, c as yr, d as vr, e as Tr, B as ee, f as xr, G as Cr, i as Mr, h as Or, F as Sr, j as Dr, k as dt, M as A, m as Ie, n as ut, C as K, o as P, w as Pr, p as je, q as Lr, r as kr, s as wr, u as Er, v as $r, x as xe, y as _r, z as Yr, D as zr, I as ht, E as Nr, H as ft, J as pt, K as Ir, N as jr, O as Ar, P as mt, Q as Rr, R as Br, U as Fr, V as Vr, W as Ur, X as Hr, Y as Wr, Z as Gr, _ as qr, $ as Zr, a0 as Xr, a1 as Jr, a2 as Kr, a3 as Qr, a4 as gt, a5 as bt, a6 as yt, a7 as eo } from "./theme-DQCPHf7F.js";
6
- import { ab as ci, ah as di, a8 as ui, ad as hi, ae as fi, af as pi, ag as mi, a9 as gi, ac as bi, ai as yi, ak as vi, aa as Ti, aj as xi } from "./theme-DQCPHf7F.js";
2
+ import { L as re, P as l, _ as x, Z as Wt, $ as Gt, a0 as qt, a1 as Zt, w as N, T as qe, Y as Xt, a2 as Jt, l as Kt, a3 as Qt, q as ye, p as ve, r as R, v as Z, j as er, y as X, a as tr, a4 as rr, z as J, E as Ye, b as z, F as ze, J as or, a5 as nr, a6 as sr, M as q, U as ir, a7 as ar, x as Te, e as oe, K as H, a8 as lr, S as Ne, a9 as ne, aa as se, N as pe } from "./Stack-B3SBR1st.js";
3
+ import { r as ie, e as lt, P as ct, i as cr, C as dr } from "./Drawer-AZWlL1mS.js";
4
+ import { D as ii, L as ai } from "./Drawer-AZWlL1mS.js";
5
+ import { A as ur, l as Ze, L as hr, g as fr, S as pr, a as mr, t as Xe, T as gr, b as br, c as yr, d as vr, e as Tr, B as ee, f as xr, G as Cr, i as Mr, h as Or, F as Sr, j as Dr, k as dt, M as A, m as Ie, n as ut, C as K, o as P, w as Pr, p as je, q as Lr, r as kr, s as wr, u as Er, v as $r, x as xe, y as _r, z as Yr, D as zr, I as ht, E as Nr, H as ft, J as pt, K as Ir, N as jr, O as Ar, P as mt, Q as Rr, R as Br, U as Fr, V as Vr, W as Ur, X as Hr, Y as Wr, Z as Gr, _ as qr, $ as Zr, a0 as Xr, a1 as Jr, a2 as Kr, a3 as Qr, a4 as gt, a5 as bt, a6 as yt, a7 as eo } from "./theme-BBp3_Hm7.js";
6
+ import { ac as ci, ai as di, a8 as ui, ae as hi, af as fi, ag as pi, ah as mi, a9 as gi, aa as bi, ad as yi, aj as vi, al as Ti, ab as xi, ak as Ci } from "./theme-BBp3_Hm7.js";
7
7
  import * as L from "react";
8
8
  import { useState as F, useCallback as me, useLayoutEffect as vt, useEffect as Ce, useMemo as Tt, useRef as to } from "react";
9
- import { b as de } from "./useFormControl-Cj8rSR6R.js";
9
+ import { b as de } from "./useFormControl-K73YLReg.js";
10
10
  import ro, { createPortal as oo } from "react-dom";
11
11
  import { GridToolbarContainer as no, GridToolbarColumnsButton as so, GridToolbarFilterButton as io, GridToolbarDensitySelector as ao, DataGridPro as xt, useGridApiRef as lo, getGridBooleanOperators as co, getGridNumericOperators as uo, getGridStringOperators as ho } from "@mui/x-data-grid-pro";
12
12
  export * from "@mui/x-data-grid-pro";
13
13
  import { Link as fo } from "react-router-dom";
14
- import { C as po, a as mo } from "./Tree-D_Zjc1fk.js";
15
- import { T as Oi } from "./Tree-D_Zjc1fk.js";
14
+ import { C as po, a as mo } from "./Tree-DjhO_q-b.js";
15
+ import { T as Si } from "./Tree-DjhO_q-b.js";
16
16
  var Ae = {}, go = re;
17
17
  Object.defineProperty(Ae, "__esModule", {
18
18
  value: !0
@@ -2610,7 +2610,12 @@ const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2610
2610
  __proto__: null,
2611
2611
  getGridInitialStateFromStorage: _e,
2612
2612
  useGridInitialState: Jn
2613
- }, Symbol.toStringTag, { value: "Module" })), Is = ({ label: e, children: r, required: n, errorMessage: t }) => /* @__PURE__ */ k(Rr, { error: !!t, children: [
2613
+ }, Symbol.toStringTag, { value: "Module" })), Is = ({
2614
+ label: e,
2615
+ children: r,
2616
+ required: n,
2617
+ errorMessage: t
2618
+ }) => /* @__PURE__ */ k(Rr, { error: !!t, children: [
2614
2619
  /* @__PURE__ */ a(Br, { error: !!t, required: n, children: e }),
2615
2620
  r,
2616
2621
  t && /* @__PURE__ */ a(Ie, { error: !0, children: t })
@@ -2887,8 +2892,6 @@ const Ws = (e) => /* @__PURE__ */ k(Ne, { direction: "row", display: "inline-fle
2887
2892
  paginationMode: "server",
2888
2893
  rowCount: S,
2889
2894
  paginationModel: T,
2890
- showFirstButton: !0,
2891
- showLastButton: !0,
2892
2895
  onPaginationModelChange: y,
2893
2896
  pageSizeOptions: [10, 20, 30, 40, 50],
2894
2897
  filterMode: "server",
@@ -3031,6 +3034,7 @@ export {
3031
3034
  mi as Input,
3032
3035
  ai as LoadingBackdrop,
3033
3036
  Is as MuiLikeWrapper,
3037
+ gi as PaginatedPopover,
3034
3038
  Es as RadioChips,
3035
3039
  js as ResizableWrapper,
3036
3040
  $s as SearchInput,
@@ -3043,29 +3047,29 @@ export {
3043
3047
  Ws as TableActions,
3044
3048
  Gs as TableRecord,
3045
3049
  qs as TableWithPagination,
3046
- gi as TabsPanel,
3050
+ bi as TabsPanel,
3047
3051
  Mo as ThemeProvider,
3048
3052
  Ys as TimePicker,
3049
- Oi as Tree,
3053
+ Si as Tree,
3050
3054
  q as Typography,
3051
- bi as UPLOADED_FILE_MAX_SIZE,
3052
- yi as errorToast,
3055
+ yi as UPLOADED_FILE_MAX_SIZE,
3056
+ vi as errorToast,
3053
3057
  as as formatDate,
3054
3058
  ls as formatDateTime,
3055
3059
  Js as getBooleanColumn,
3056
3060
  Ks as getDateColumn,
3057
3061
  Qs as getDateTimeColumn,
3058
- vi as getErrorMessage,
3062
+ Ti as getErrorMessage,
3059
3063
  ei as getNumericColumn,
3060
3064
  ti as getStaticColumn,
3061
3065
  ri as getStringColumn,
3062
3066
  Zs as infoToast,
3063
3067
  R as styled,
3064
3068
  Xs as successToast,
3065
- Ti as theme,
3069
+ xi as theme,
3066
3070
  Ss as useContextMenu,
3067
3071
  sn as useDataGridState,
3068
- xi as useGetFileUrl,
3072
+ Ci as useGetFileUrl,
3069
3073
  an as useScrollPosition,
3070
3074
  Te as useTheme
3071
3075
  };