@smart-factor/gem-ui-components 0.0.48 → 0.0.50

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,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, exportDataAsExcel, showPaginationFirstAndLastButtons, autosizeOptions, onGridApiRef }: 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, showPaginationFirstAndLastButtons, autosizeOptions, onGridApiRef, }: TableWithPaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { GridColDef, GridValidRowModel } from '@mui/x-data-grid-pro';
2
+
3
+ type DateTimeColumnParams<T extends GridValidRowModel> = Omit<GridColDef<T, Date>, 'type' | 'renderCell'>;
4
+ type DateTimeColumn<T extends GridValidRowModel> = GridColDef<T, Date>;
5
+ export declare function getDateTimeColumn<T extends GridValidRowModel>(params: DateTimeColumnParams<T>): DateTimeColumn<T>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as dayjs } from 'dayjs';
2
+
3
+ export declare const formatDateTime: (dateTime: dayjs.Dayjs | null | undefined) => string | undefined;
@@ -1 +1,2 @@
1
1
  export { formatDate } from './formatDate';
2
+ export { formatDateTime } from './formatDateTime';
package/dist/main.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import fr, { jsx as g, jsxs as de, Fragment as ao } from "react/jsx-runtime";
2
2
  import { G as mr, Z as Zd, $ as Xd, P as r, a0 as Ws, a1 as Jd, u as at, _ as f, a2 as ep, a3 as tp, a4 as rp, q as re, N as La, a5 as op, a6 as np, T as ei, a7 as ap, Y as Qr, a8 as ip, h as Ge, a9 as lp, l as xe, k as Te, m as A, p as Ee, f as wt, t as pe, c as Zr, aa as io, v as Se, U as Wt, b as tt, d as Zt, g as Pe, s as sp, ab as cp, o as Bt, V as Xe, B as Ve, a as he, n as Ke, e as _s, M as up, ac as Ao, R as ti, K as Us, I as ht, D as _t, ad as qs, r as At, ae as ri, af as dp, ag as Wn, ah as oi, Q as pp, w as fp, x as cl, H as Ze, y as ni, z as ai, E as bt, ai as mp, aj as bp, ak as gp, al as hp, F as Mt, S as ct, am as yp, an as lo, ao as so, W as vp, ap as Gs, j as Op, aq as xp, ar as Sp, as as Cp, at as Tp } from "./Stack-Dr1yNuib.js";
3
3
  import { r as br, e as Ys, P as gr, a as Pp, H as Mr, o as Xr, d as _n, i as Un, B as wp, M as Ks, F as qo, b as _r, c as Mp, f as kp, g as Fp, C as Qs, h as Dp } from "./Drawer-D8kHnT0B.js";
4
- import { D as LI, L as EI } from "./Drawer-D8kHnT0B.js";
4
+ import { D as EI, L as $I } from "./Drawer-D8kHnT0B.js";
5
5
  import * as m from "react";
6
6
  import et, { useMemo as Tr, useRef as ko, useReducer as Rp, useEffect as Ht, useCallback as st, forwardRef as Zs, useImperativeHandle as Ip, Fragment as Lp, useState as Xt, useLayoutEffect as Ep, createContext as $p, useContext as Ap } from "react";
7
7
  import { C as Np, u as Ut, F as ii, a as vt, b as je, c as Vp } from "./Tree-B4Bd33fe.js";
8
- import { T as AI } from "./Tree-B4Bd33fe.js";
8
+ import { T as NI } from "./Tree-B4Bd33fe.js";
9
9
  import jp, { createPortal as zp } from "react-dom";
10
10
  import { Link as Bp } from "react-router-dom";
11
11
  import { useGridApiRef as Hp, DataGridPro as Wp, GridToolbarContainer as _p, GridToolbarColumnsButton as Up, GridToolbarFilterButton as qp, GridToolbarDensitySelector as Gp, getGridBooleanOperators as Yp, getGridNumericOperators as Kp, getGridStringOperators as Qp } from "@mui/x-data-grid-pro";
@@ -39148,7 +39148,13 @@ const NR = (e) => {
39148
39148
  return e.format("YYYY-MM-DD");
39149
39149
  console.error("Unable to format date, as it is not dayjs instance");
39150
39150
  }
39151
- }, FI = xp({
39151
+ }, FI = (e) => {
39152
+ if (e) {
39153
+ if (rt.isDayjs(e))
39154
+ return e.format("YYYY-MM-DD HH:mm:ss");
39155
+ console.error("Unable to format dateTime, as it is not dayjs instance");
39156
+ }
39157
+ }, DI = xp({
39152
39158
  palette: {
39153
39159
  primary: {
39154
39160
  dark: "#2f7dc0",
@@ -39196,7 +39202,7 @@ const NR = (e) => {
39196
39202
  duration: 8e3
39197
39203
  }
39198
39204
  }
39199
- ), DI = ({
39205
+ ), RI = ({
39200
39206
  children: e
39201
39207
  }) => /* @__PURE__ */ de(ao, { children: [
39202
39208
  /* @__PURE__ */ g(VR, {}),
@@ -39218,15 +39224,15 @@ export {
39218
39224
  nI as DatePicker,
39219
39225
  aI as DateTimePicker,
39220
39226
  ZR as Dialog,
39221
- LI as Drawer,
39227
+ EI as Drawer,
39222
39228
  gx as Dropzone,
39223
39229
  JR as DropzoneField,
39224
39230
  zx as ElementsPicker,
39225
39231
  eI as ElementsPickerElement,
39226
39232
  tI as FixedActionsBottomPanel,
39227
- DI as GemUIComponentsProvider,
39233
+ RI as GemUIComponentsProvider,
39228
39234
  iI as Input,
39229
- EI as LoadingBackdrop,
39235
+ $I as LoadingBackdrop,
39230
39236
  lI as RadioChips,
39231
39237
  uI as ResizableWrapper,
39232
39238
  sI as SearchInput,
@@ -39241,11 +39247,12 @@ export {
39241
39247
  OI as TableWithPagination,
39242
39248
  xI as TabsPanel,
39243
39249
  df as ThemeProvider,
39244
- AI as Tree,
39250
+ NI as Tree,
39245
39251
  Ze as Typography,
39246
39252
  oO as UPLOADED_FILE_MAX_SIZE,
39247
39253
  SI as errorToast,
39248
39254
  NR as formatDate,
39255
+ FI as formatDateTime,
39249
39256
  TI as getBooleanColumn,
39250
39257
  PI as getDateColumn,
39251
39258
  wI as getNumericColumn,
@@ -39253,7 +39260,7 @@ export {
39253
39260
  kI as getStringColumn,
39254
39261
  A as styled,
39255
39262
  CI as successToast,
39256
- FI as theme,
39263
+ DI as theme,
39257
39264
  XR as useContextMenu,
39258
39265
  XO as useDataGridState,
39259
39266
  JO as useGetFileUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-factor/gem-ui-components",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "private": false,
5
5
  "description": "Gem UI Components",
6
6
  "type": "module",