@gnwebsoft/ui 2.18.9 → 2.18.11

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.
@@ -199,11 +199,11 @@ var removeLeadingTrailingSlashes = (route) => {
199
199
  var _dayjs = require('dayjs'); var _dayjs2 = _interopRequireDefault(_dayjs);
200
200
  var _zod = require('zod');
201
201
  var schemaTools = {
202
- date: () => _zod.z.coerce.string().transform((c) => c === "null" || c === "undefined" ? null : c).refine((c) => !!c, { message: "required" }).refine((c) => !!c ? _dayjs2.default.call(void 0, c).isValid() : true, {
203
- message: "Invalid date"
202
+ date: ({ message }) => _zod.z.coerce.string().transform((c) => c === "null" || c === "undefined" ? null : c).refine((c) => !!c, { message: "required" }).refine((c) => !!c ? _dayjs2.default.call(void 0, c).isValid() : true, {
203
+ message: message ? message : "Invalid date"
204
204
  }),
205
- nullableDate: () => _zod.z.coerce.string().transform((c) => c === "null" ? null : c).transform((c) => c === "undefined" ? null : c).refine((c) => !c && c != null ? _dayjs2.default.call(void 0, c).isValid() : true, {
206
- message: "Invalid date"
205
+ nullableDate: ({ message }) => _zod.z.coerce.string().transform((c) => c === "null" ? null : c).transform((c) => c === "undefined" ? null : c).refine((c) => !c && c != null ? _dayjs2.default.call(void 0, c).isValid() : true, {
206
+ message: message ? message : "Invalid date"
207
207
  })
208
208
  };
209
209
 
@@ -199,11 +199,11 @@ var removeLeadingTrailingSlashes = (route) => {
199
199
  import dayjs from "dayjs";
200
200
  import { z } from "zod";
201
201
  var schemaTools = {
202
- date: () => z.coerce.string().transform((c) => c === "null" || c === "undefined" ? null : c).refine((c) => !!c, { message: "required" }).refine((c) => !!c ? dayjs(c).isValid() : true, {
203
- message: "Invalid date"
202
+ date: ({ message }) => z.coerce.string().transform((c) => c === "null" || c === "undefined" ? null : c).refine((c) => !!c, { message: "required" }).refine((c) => !!c ? dayjs(c).isValid() : true, {
203
+ message: message ? message : "Invalid date"
204
204
  }),
205
- nullableDate: () => z.coerce.string().transform((c) => c === "null" ? null : c).transform((c) => c === "undefined" ? null : c).refine((c) => !c && c != null ? dayjs(c).isValid() : true, {
206
- message: "Invalid date"
205
+ nullableDate: ({ message }) => z.coerce.string().transform((c) => c === "null" ? null : c).transform((c) => c === "undefined" ? null : c).refine((c) => !c && c != null ? dayjs(c).isValid() : true, {
206
+ message: message ? message : "Invalid date"
207
207
  })
208
208
  };
209
209
 
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GFSTK7KN.mjs";
4
4
  import {
5
5
  readValueAsDate
6
- } from "./chunk-NIG6OXKY.mjs";
6
+ } from "./chunk-RU644IPB.mjs";
7
7
 
8
8
  // src/wrappers/DatePickerElement/DatePickerElement.tsx
9
9
  import {
@@ -3,7 +3,7 @@
3
3
  var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
4
4
 
5
5
 
6
- var _chunkKTAQRRS7js = require('./chunk-KTAQRRS7.js');
6
+ var _chunk5UQNB4A7js = require('./chunk-5UQNB4A7.js');
7
7
 
8
8
  // src/wrappers/DatePickerElement/DatePickerElement.tsx
9
9
 
@@ -47,7 +47,7 @@ var Component = function DatePickerElement(props) {
47
47
  value: field.value,
48
48
  onChange: field.onChange,
49
49
  transform: {
50
- input: typeof _optionalChain([transform, 'optionalAccess', _3 => _3.input]) === "function" ? transform.input : (newValue) => _chunkKTAQRRS7js.readValueAsDate.call(void 0, adapter, newValue),
50
+ input: typeof _optionalChain([transform, 'optionalAccess', _3 => _3.input]) === "function" ? transform.input : (newValue) => _chunk5UQNB4A7js.readValueAsDate.call(void 0, adapter, newValue),
51
51
  output: typeof _optionalChain([transform, 'optionalAccess', _4 => _4.output]) === "function" ? transform.output : (newValue) => newValue
52
52
  }
53
53
  });
@@ -487,7 +487,7 @@ var Component5 = function TimePickerElement(props) {
487
487
  value: field.value,
488
488
  onChange: field.onChange,
489
489
  transform: {
490
- input: typeof _optionalChain([transform, 'optionalAccess', _15 => _15.input]) === "function" ? transform.input : (newValue) => _chunkKTAQRRS7js.readValueAsDate.call(void 0, adapter, newValue),
490
+ input: typeof _optionalChain([transform, 'optionalAccess', _15 => _15.input]) === "function" ? transform.input : (newValue) => _chunk5UQNB4A7js.readValueAsDate.call(void 0, adapter, newValue),
491
491
  output: typeof _optionalChain([transform, 'optionalAccess', _16 => _16.output]) === "function" ? transform.output : (newValue) => newValue
492
492
  }
493
493
  });
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ require('./chunk-7M2VOCYN.js');
11
11
  require('./chunk-6BGQA4BQ.js');
12
12
 
13
13
 
14
- var _chunkXER4GDCGjs = require('./chunk-XER4GDCG.js');
14
+ var _chunkV7PRQ6T4js = require('./chunk-V7PRQ6T4.js');
15
15
 
16
16
 
17
17
  var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
@@ -24,7 +24,7 @@ var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
24
24
 
25
25
 
26
26
 
27
- var _chunkKTAQRRS7js = require('./chunk-KTAQRRS7.js');
27
+ var _chunk5UQNB4A7js = require('./chunk-5UQNB4A7.js');
28
28
 
29
29
 
30
30
 
@@ -43,4 +43,4 @@ var _chunkKTAQRRS7js = require('./chunk-KTAQRRS7.js');
43
43
 
44
44
 
45
45
 
46
- exports.ClearButton = _chunkFP2QMQOOjs.ClearButton_default; exports.Field = _chunkXER4GDCGjs.Field_default; exports.FilterButton = _chunkFP2QMQOOjs.FilterButton_default; exports.FilterWrapper = _chunkFP2QMQOOjs.FilterWrapper_default; exports.FormWrapper = _chunkFP2QMQOOjs.FormWrapper_default; exports.LabelText = _chunkFP2QMQOOjs.LabelText_default; exports.ListWrapper = _chunkFP2QMQOOjs.ListWrapper_default; exports.SimpleToolbar = _chunkFP2QMQOOjs.SimpleToolbar_default; exports.api = _chunkKTAQRRS7js.api; exports.flattenObjectKeys = _chunkKTAQRRS7js.flattenObjectKeys; exports.getTimezone = _chunkKTAQRRS7js.getTimezone; exports.handleServerErrors = _chunkKTAQRRS7js.handleServerErrors; exports.propertyExists = _chunkKTAQRRS7js.propertyExists; exports.readValueAsDate = _chunkKTAQRRS7js.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkKTAQRRS7js.removeLeadingTrailingSlashes; exports.schemaTools = _chunkKTAQRRS7js.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
46
+ exports.ClearButton = _chunkFP2QMQOOjs.ClearButton_default; exports.Field = _chunkV7PRQ6T4js.Field_default; exports.FilterButton = _chunkFP2QMQOOjs.FilterButton_default; exports.FilterWrapper = _chunkFP2QMQOOjs.FilterWrapper_default; exports.FormWrapper = _chunkFP2QMQOOjs.FormWrapper_default; exports.LabelText = _chunkFP2QMQOOjs.LabelText_default; exports.ListWrapper = _chunkFP2QMQOOjs.ListWrapper_default; exports.SimpleToolbar = _chunkFP2QMQOOjs.SimpleToolbar_default; exports.api = _chunk5UQNB4A7js.api; exports.flattenObjectKeys = _chunk5UQNB4A7js.flattenObjectKeys; exports.getTimezone = _chunk5UQNB4A7js.getTimezone; exports.handleServerErrors = _chunk5UQNB4A7js.handleServerErrors; exports.propertyExists = _chunk5UQNB4A7js.propertyExists; exports.readValueAsDate = _chunk5UQNB4A7js.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunk5UQNB4A7js.removeLeadingTrailingSlashes; exports.schemaTools = _chunk5UQNB4A7js.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import "./chunk-2JFL7TS5.mjs";
11
11
  import "./chunk-EVPUCTZA.mjs";
12
12
  import {
13
13
  Field_default
14
- } from "./chunk-KJ7FWNMN.mjs";
14
+ } from "./chunk-T5US7GRV.mjs";
15
15
  import {
16
16
  useTransform
17
17
  } from "./chunk-GFSTK7KN.mjs";
@@ -24,7 +24,7 @@ import {
24
24
  readValueAsDate,
25
25
  removeLeadingTrailingSlashes,
26
26
  schemaTools
27
- } from "./chunk-NIG6OXKY.mjs";
27
+ } from "./chunk-RU644IPB.mjs";
28
28
  export {
29
29
  ClearButton_default as ClearButton,
30
30
  Field_default as Field,
@@ -1,4 +1,4 @@
1
- import { PostModel, ApiResponse } from '../types/index.mjs';
1
+ import { PostModel, ApiResponse, ListResponse } from '../types/index.mjs';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers';
3
3
  import { useLocalizationContext } from '@mui/x-date-pickers/internals';
4
4
  import { FieldValues, UseFormSetError } from 'react-hook-form';
@@ -7,7 +7,7 @@ import '@mui/x-data-grid';
7
7
  import '../OptionItem-CzX7oHfv.mjs';
8
8
 
9
9
  declare class api {
10
- static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
10
+ static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
11
11
  static post<T>(url: string, body?: any): Promise<ApiResponse<T>>;
12
12
  static get<T>(url: string): Promise<ApiResponse<T>>;
13
13
  static delete<T>(url: string): Promise<ApiResponse<T>>;
@@ -36,8 +36,12 @@ declare function readValueAsDate<TDate extends PickerValidDate>(adapter: ReturnT
36
36
  declare const removeLeadingTrailingSlashes: (route: string) => string;
37
37
 
38
38
  declare const schemaTools: {
39
- date: () => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
40
- nullableDate: () => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
39
+ date: ({ message }: {
40
+ message?: string;
41
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
42
+ nullableDate: ({ message }: {
43
+ message?: string;
44
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
41
45
  };
42
46
 
43
47
  export { api, flattenObjectKeys, getTimezone, handleServerErrors, propertyExists, readValueAsDate, removeLeadingTrailingSlashes, schemaTools };
@@ -1,4 +1,4 @@
1
- import { PostModel, ApiResponse } from '../types/index.js';
1
+ import { PostModel, ApiResponse, ListResponse } from '../types/index.js';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers';
3
3
  import { useLocalizationContext } from '@mui/x-date-pickers/internals';
4
4
  import { FieldValues, UseFormSetError } from 'react-hook-form';
@@ -7,7 +7,7 @@ import '@mui/x-data-grid';
7
7
  import '../OptionItem-CzX7oHfv.js';
8
8
 
9
9
  declare class api {
10
- static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
10
+ static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
11
11
  static post<T>(url: string, body?: any): Promise<ApiResponse<T>>;
12
12
  static get<T>(url: string): Promise<ApiResponse<T>>;
13
13
  static delete<T>(url: string): Promise<ApiResponse<T>>;
@@ -36,8 +36,12 @@ declare function readValueAsDate<TDate extends PickerValidDate>(adapter: ReturnT
36
36
  declare const removeLeadingTrailingSlashes: (route: string) => string;
37
37
 
38
38
  declare const schemaTools: {
39
- date: () => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
40
- nullableDate: () => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
39
+ date: ({ message }: {
40
+ message?: string;
41
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
42
+ nullableDate: ({ message }: {
43
+ message?: string;
44
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string | null, string>, string | null, string>, string | null, string>;
41
45
  };
42
46
 
43
47
  export { api, flattenObjectKeys, getTimezone, handleServerErrors, propertyExists, readValueAsDate, removeLeadingTrailingSlashes, schemaTools };
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkKTAQRRS7js = require('../chunk-KTAQRRS7.js');
10
+ var _chunk5UQNB4A7js = require('../chunk-5UQNB4A7.js');
11
11
 
12
12
 
13
13
 
@@ -17,4 +17,4 @@ var _chunkKTAQRRS7js = require('../chunk-KTAQRRS7.js');
17
17
 
18
18
 
19
19
 
20
- exports.api = _chunkKTAQRRS7js.api; exports.flattenObjectKeys = _chunkKTAQRRS7js.flattenObjectKeys; exports.getTimezone = _chunkKTAQRRS7js.getTimezone; exports.handleServerErrors = _chunkKTAQRRS7js.handleServerErrors; exports.propertyExists = _chunkKTAQRRS7js.propertyExists; exports.readValueAsDate = _chunkKTAQRRS7js.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkKTAQRRS7js.removeLeadingTrailingSlashes; exports.schemaTools = _chunkKTAQRRS7js.schemaTools;
20
+ exports.api = _chunk5UQNB4A7js.api; exports.flattenObjectKeys = _chunk5UQNB4A7js.flattenObjectKeys; exports.getTimezone = _chunk5UQNB4A7js.getTimezone; exports.handleServerErrors = _chunk5UQNB4A7js.handleServerErrors; exports.propertyExists = _chunk5UQNB4A7js.propertyExists; exports.readValueAsDate = _chunk5UQNB4A7js.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunk5UQNB4A7js.removeLeadingTrailingSlashes; exports.schemaTools = _chunk5UQNB4A7js.schemaTools;
@@ -7,7 +7,7 @@ import {
7
7
  readValueAsDate,
8
8
  removeLeadingTrailingSlashes,
9
9
  schemaTools
10
- } from "../chunk-NIG6OXKY.mjs";
10
+ } from "../chunk-RU644IPB.mjs";
11
11
  export {
12
12
  api,
13
13
  flattenObjectKeys,
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXER4GDCGjs = require('../chunk-XER4GDCG.js');
3
+ var _chunkV7PRQ6T4js = require('../chunk-V7PRQ6T4.js');
4
4
  require('../chunk-6JZ35VQJ.js');
5
- require('../chunk-KTAQRRS7.js');
5
+ require('../chunk-5UQNB4A7.js');
6
6
 
7
7
 
8
- exports.Field = _chunkXER4GDCGjs.Field_default;
8
+ exports.Field = _chunkV7PRQ6T4js.Field_default;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Field_default
3
- } from "../chunk-KJ7FWNMN.mjs";
3
+ } from "../chunk-T5US7GRV.mjs";
4
4
  import "../chunk-GFSTK7KN.mjs";
5
- import "../chunk-NIG6OXKY.mjs";
5
+ import "../chunk-RU644IPB.mjs";
6
6
  export {
7
7
  Field_default as Field
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnwebsoft/ui",
3
- "version": "2.18.9",
3
+ "version": "2.18.11",
4
4
  "description": "A set of reusable wrappers for MUI v6",
5
5
  "author": "GNWebsoft Private Limited",
6
6
  "license": "",
@@ -66,19 +66,15 @@
66
66
  "peerDependencies": {
67
67
  "@emotion/cache": "^11.14.0",
68
68
  "@emotion/react": "^11.14.0",
69
- "@emotion/styled": "^11.14.0"
70
- ,
69
+ "@emotion/styled": "^11.14.0",
71
70
  "@fontsource/roboto": "^5.1.1",
72
-
73
71
  "@hookform/resolvers": "^3.9.1",
74
72
  "@mui/icons-material": "^6.4.11",
75
-
76
73
  "@mui/lab": "^6.0.0-beta.21",
77
74
  "@mui/material": "6.4.11",
78
75
  "@mui/x-data-grid": "^7.23.5",
79
76
  "@mui/x-date-pickers": "^7.28.3",
80
77
  "@mui/x-tree-view": "^7.23.2",
81
-
82
78
  "autosuggest-highlight": "^3.3.4",
83
79
  "axios": "^1.8.4",
84
80
  "dayjs": "^1.11.13",