@gnwebsoft/ui 2.18.42 → 2.18.44

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.
@@ -8,7 +8,7 @@ type AsyncMultiSelectPayload = {
8
8
  };
9
9
  type OptionItem2 = {
10
10
  Label: string;
11
- Value: number;
11
+ Value: number | string;
12
12
  };
13
13
 
14
14
  export type { AsyncMultiSelectPayload as A, OptionItem as O, OptionItem2 as a };
@@ -8,7 +8,7 @@ type AsyncMultiSelectPayload = {
8
8
  };
9
9
  type OptionItem2 = {
10
10
  Label: string;
11
- Value: number;
11
+ Value: number | string;
12
12
  };
13
13
 
14
14
  export type { AsyncMultiSelectPayload as A, OptionItem as O, OptionItem2 as a };
@@ -6,16 +6,23 @@ import {
6
6
  } from "./chunk-GAYZ4QSD.mjs";
7
7
 
8
8
  // src/wrappers/DatePickerElement/DatePickerElement.tsx
9
- import { useMemo, useCallback } from "react";
9
+ import { useCallback } from "react";
10
10
  import { useController } from "react-hook-form";
11
11
  import { DatePicker } from "@mui/x-date-pickers";
12
12
  import { Grid2, useForkRef } from "@mui/material";
13
+ import { useLocalizationContext } from "@mui/x-date-pickers/internals";
13
14
  import { jsx } from "react/jsx-runtime";
15
+ function readValueAsDate2(adapter, value) {
16
+ if (typeof value === "string") {
17
+ if (value === "") {
18
+ return null;
19
+ }
20
+ return adapter.utils.date(value);
21
+ }
22
+ return value;
23
+ }
14
24
  function useTransform2(options) {
15
- const value = useMemo(
16
- () => typeof options.transform?.input === "function" ? options.transform.input(options.value) : options.value,
17
- [options.transform, options.value]
18
- );
25
+ const value = typeof options.transform?.input === "function" ? options.transform.input(options.value) : options.value;
19
26
  const onChange = useCallback(
20
27
  (...event) => {
21
28
  if (typeof options.transform?.output === "function") {
@@ -42,9 +49,11 @@ var Component = function DatePickerElement(props) {
42
49
  placeholder,
43
50
  slotProps,
44
51
  datePickerProps = {},
52
+ transform,
45
53
  sx,
46
54
  ...rest
47
55
  } = props;
56
+ const adapter = useLocalizationContext();
48
57
  const { disabled, inputRef, onClose, ...restDatePickerProps } = datePickerProps;
49
58
  const {
50
59
  field,
@@ -58,7 +67,7 @@ var Component = function DatePickerElement(props) {
58
67
  value: field.value,
59
68
  onChange: field.onChange,
60
69
  transform: {
61
- //@ts-ignore
70
+ input: typeof transform?.input === "function" ? transform.input : (newValue) => readValueAsDate2(adapter, newValue),
62
71
  output: (outputValue, context) => {
63
72
  if (outputValue === null) return null;
64
73
  return outputValue;
@@ -122,7 +131,7 @@ var DatePickerElement2 = ({
122
131
  ...props
123
132
  }) => {
124
133
  if (gridProps) {
125
- return /* @__PURE__ */ jsx(Grid2, { ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps }, children: /* @__PURE__ */ jsx(Component, { ...props }) });
134
+ return /* @__PURE__ */ jsx(Grid2, { ...gridProps, children: /* @__PURE__ */ jsx(Component, { ...props }) });
126
135
  }
127
136
  return /* @__PURE__ */ jsx(Component, { ...props });
128
137
  };
@@ -498,7 +507,7 @@ import {
498
507
  useController as useController5
499
508
  } from "react-hook-form";
500
509
  import { useForkRef as useForkRef4, Grid2 as Grid25 } from "@mui/material";
501
- import { useLocalizationContext } from "@mui/x-date-pickers/internals";
510
+ import { useLocalizationContext as useLocalizationContext2 } from "@mui/x-date-pickers/internals";
502
511
  import { jsx as jsx5 } from "react/jsx-runtime";
503
512
  var Component5 = function TimePickerElement(props) {
504
513
  const {
@@ -514,7 +523,7 @@ var Component5 = function TimePickerElement(props) {
514
523
  transform,
515
524
  ...rest
516
525
  } = props;
517
- const adapter = useLocalizationContext();
526
+ const adapter = useLocalizationContext2();
518
527
  const {
519
528
  field,
520
529
  fieldState: { error }
@@ -584,7 +593,7 @@ var TimePickerElement_default = TimePickerElement2;
584
593
  // src/wrappers/AsyncSelect/AsyncSelectElement.tsx
585
594
  import * as React from "react";
586
595
  import { useController as useController6 } from "react-hook-form";
587
- import { useRef, useMemo as useMemo2, Fragment, useState as useState2, useEffect as useEffect2, useCallback as useCallback2 } from "react";
596
+ import { useRef, useMemo, Fragment, useState as useState2, useEffect as useEffect2, useCallback as useCallback2 } from "react";
588
597
  import { debounce } from "@mui/material/utils";
589
598
  import TextField3 from "@mui/material/TextField";
590
599
  import Autocomplete from "@mui/material/Autocomplete";
@@ -618,14 +627,14 @@ var Component6 = function AsyncSelectElement(props) {
618
627
  const [loading, setLoading] = useState2(false);
619
628
  const [selectedOption, setSelectedOption] = useState2(null);
620
629
  const [inputValue, setInputValue] = useState2("");
621
- const inputValue2 = useMemo2(() => inputValue, [inputValue]);
630
+ const inputValue2 = useMemo(() => inputValue, [inputValue]);
622
631
  const setInputValue2 = useCallback2((newValue) => setInputValue(newValue), []);
623
632
  const [options, setOptions] = useState2([]);
624
633
  const initialValueLoaded = useRef(
625
634
  !initialValue ? true : !(initialValue != null)
626
635
  );
627
636
  const fieldValue = useRef(field.value);
628
- const fetchData = useMemo2(
637
+ const fetchData = useMemo(
629
638
  () => debounce((payload, callback) => {
630
639
  queryFn(payload).then((c) => callback(c));
631
640
  }, 400),
@@ -797,7 +806,7 @@ import _ from "lodash";
797
806
  import {
798
807
  useState as useState3,
799
808
  useRef as useRef2,
800
- useMemo as useMemo3,
809
+ useMemo as useMemo2,
801
810
  useEffect as useEffect3,
802
811
  useCallback as useCallback3,
803
812
  Fragment as Fragment2
@@ -845,12 +854,12 @@ var Component7 = function AsyncSelectMultiElement(props) {
845
854
  const initialValuesLoaded = useRef2(
846
855
  !(initialValues && initialValues.length > 0)
847
856
  );
848
- const inputValue2 = useMemo3(() => inputValue, [inputValue]);
857
+ const inputValue2 = useMemo2(() => inputValue, [inputValue]);
849
858
  const setInputValue2 = useCallback3(
850
859
  (inputValue3) => setInputValue(inputValue3),
851
860
  []
852
861
  );
853
- const fetchData = useMemo3(
862
+ const fetchData = useMemo2(
854
863
  () => debounce2(
855
864
  (payload, callback) => {
856
865
  queryFn(payload).then((c) => callback(c));
@@ -1008,7 +1017,7 @@ var AsyncMultiSelect_default = AsyncSelectMultiElement2;
1008
1017
 
1009
1018
  // src/wrappers/SelectElement/SelectElement.tsx
1010
1019
  import {
1011
- useMemo as useMemo4,
1020
+ useMemo as useMemo3,
1012
1021
  useEffect as useEffect4,
1013
1022
  useCallback as useCallback4
1014
1023
  } from "react";
@@ -1069,7 +1078,7 @@ var Component8 = function SelectElement(props) {
1069
1078
  field.onChange(defaultValue);
1070
1079
  }
1071
1080
  }, [isEdit, options]);
1072
- const autocompleteValue = useMemo4(
1081
+ const autocompleteValue = useMemo3(
1073
1082
  () => options.find((option) => getOptionValue(option) === field.value) ?? null,
1074
1083
  [field.value, options, getOptionValue]
1075
1084
  );
@@ -10,12 +10,19 @@ var _react = require('react'); var React = _interopRequireWildcard(_react);
10
10
  var _reacthookform = require('react-hook-form');
11
11
  var _xdatepickers = require('@mui/x-date-pickers');
12
12
  var _material = require('@mui/material');
13
+ var _internals = require('@mui/x-date-pickers/internals');
13
14
  var _jsxruntime = require('react/jsx-runtime');
15
+ function readValueAsDate2(adapter, value) {
16
+ if (typeof value === "string") {
17
+ if (value === "") {
18
+ return null;
19
+ }
20
+ return adapter.utils.date(value);
21
+ }
22
+ return value;
23
+ }
14
24
  function useTransform2(options) {
15
- const value = _react.useMemo.call(void 0,
16
- () => typeof _optionalChain([options, 'access', _3 => _3.transform, 'optionalAccess', _4 => _4.input]) === "function" ? options.transform.input(options.value) : options.value,
17
- [options.transform, options.value]
18
- );
25
+ const value = typeof _optionalChain([options, 'access', _3 => _3.transform, 'optionalAccess', _4 => _4.input]) === "function" ? options.transform.input(options.value) : options.value;
19
26
  const onChange = _react.useCallback.call(void 0,
20
27
  (...event) => {
21
28
  if (typeof _optionalChain([options, 'access', _5 => _5.transform, 'optionalAccess', _6 => _6.output]) === "function") {
@@ -42,9 +49,11 @@ var Component = function DatePickerElement(props) {
42
49
  placeholder,
43
50
  slotProps,
44
51
  datePickerProps = {},
52
+ transform,
45
53
  sx,
46
54
  ...rest
47
55
  } = props;
56
+ const adapter = _internals.useLocalizationContext.call(void 0, );
48
57
  const { disabled, inputRef, onClose, ...restDatePickerProps } = datePickerProps;
49
58
  const {
50
59
  field,
@@ -58,7 +67,7 @@ var Component = function DatePickerElement(props) {
58
67
  value: field.value,
59
68
  onChange: field.onChange,
60
69
  transform: {
61
- //@ts-ignore
70
+ input: typeof _optionalChain([transform, 'optionalAccess', _7 => _7.input]) === "function" ? transform.input : (newValue) => readValueAsDate2(adapter, newValue),
62
71
  output: (outputValue, context) => {
63
72
  if (outputValue === null) return null;
64
73
  return outputValue;
@@ -102,15 +111,15 @@ var Component = function DatePickerElement(props) {
102
111
  fullWidth: true,
103
112
  onBlur: (event) => {
104
113
  field.onBlur();
105
- if (typeof _optionalChain([inputProps, 'optionalAccess', _7 => _7.onBlur]) === "function") {
114
+ if (typeof _optionalChain([inputProps, 'optionalAccess', _8 => _8.onBlur]) === "function") {
106
115
  inputProps.onBlur(event);
107
116
  }
108
117
  },
109
118
  error: !!error,
110
- helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _8 => _8.helperText]) || rest.helperText,
119
+ helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _9 => _9.helperText]) || rest.helperText,
111
120
  inputProps: {
112
121
  readOnly: !!textReadOnly,
113
- ..._optionalChain([inputProps, 'optionalAccess', _9 => _9.inputProps])
122
+ ..._optionalChain([inputProps, 'optionalAccess', _10 => _10.inputProps])
114
123
  }
115
124
  }
116
125
  }
@@ -122,7 +131,7 @@ var DatePickerElement2 = ({
122
131
  ...props
123
132
  }) => {
124
133
  if (gridProps) {
125
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid2, { ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ...props }) });
134
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid2, { ...gridProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ...props }) });
126
135
  }
127
136
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ...props });
128
137
  };
@@ -206,7 +215,7 @@ var Component2 = function PasswordEl(props) {
206
215
  ...slotProps,
207
216
  input: {
208
217
  endAdornment,
209
- ..._optionalChain([slotProps, 'optionalAccess', _10 => _10.input])
218
+ ..._optionalChain([slotProps, 'optionalAccess', _11 => _11.input])
210
219
  }
211
220
  }
212
221
  },
@@ -280,10 +289,10 @@ var Component3 = function RadioButtonGroup(props) {
280
289
  value: field.value,
281
290
  onChange: field.onChange,
282
291
  transform: {
283
- input: typeof _optionalChain([transform, 'optionalAccess', _11 => _11.input]) === "function" ? transform.input : (value2) => {
292
+ input: typeof _optionalChain([transform, 'optionalAccess', _12 => _12.input]) === "function" ? transform.input : (value2) => {
284
293
  return value2 || "";
285
294
  },
286
- output: typeof _optionalChain([transform, 'optionalAccess', _12 => _12.output]) === "function" ? _optionalChain([transform, 'optionalAccess', _13 => _13.output]) : (_event, value2) => {
295
+ output: typeof _optionalChain([transform, 'optionalAccess', _13 => _13.output]) === "function" ? _optionalChain([transform, 'optionalAccess', _14 => _14.output]) : (_event, value2) => {
287
296
  if (value2 && type === "number") {
288
297
  return Number(value2);
289
298
  }
@@ -328,7 +337,7 @@ var Component3 = function RadioButtonGroup(props) {
328
337
  option
329
338
  );
330
339
  }
331
- let val = returnObject ? _optionalChain([value, 'optionalAccess', _14 => _14[valueKey]]) : value;
340
+ let val = returnObject ? _optionalChain([value, 'optionalAccess', _15 => _15[valueKey]]) : value;
332
341
  if (type === "number") {
333
342
  val = Number(val);
334
343
  }
@@ -418,10 +427,10 @@ var Component4 = function TextFieldElement(props) {
418
427
  value: field.value,
419
428
  onChange: field.onChange,
420
429
  transform: {
421
- input: typeof _optionalChain([transform, 'optionalAccess', _15 => _15.input]) === "function" ? transform.input : (value2) => {
430
+ input: typeof _optionalChain([transform, 'optionalAccess', _16 => _16.input]) === "function" ? transform.input : (value2) => {
422
431
  return _nullishCoalesce(value2, () => ( ""));
423
432
  },
424
- output: typeof _optionalChain([transform, 'optionalAccess', _16 => _16.output]) === "function" ? transform.output : (event) => {
433
+ output: typeof _optionalChain([transform, 'optionalAccess', _17 => _17.output]) === "function" ? transform.output : (event) => {
425
434
  const value2 = event.target.value;
426
435
  if (type !== "number") {
427
436
  return value2;
@@ -498,7 +507,7 @@ var TextFieldElement_default = TextFieldElement2;
498
507
 
499
508
 
500
509
 
501
- var _internals = require('@mui/x-date-pickers/internals');
510
+
502
511
 
503
512
  var Component5 = function TimePickerElement(props) {
504
513
  const {
@@ -528,8 +537,8 @@ var Component5 = function TimePickerElement(props) {
528
537
  value: field.value,
529
538
  onChange: field.onChange,
530
539
  transform: {
531
- input: typeof _optionalChain([transform, 'optionalAccess', _17 => _17.input]) === "function" ? transform.input : (newValue) => _chunkFYN7F5WJjs.readValueAsDate.call(void 0, adapter, newValue),
532
- output: typeof _optionalChain([transform, 'optionalAccess', _18 => _18.output]) === "function" ? transform.output : (newValue) => newValue
540
+ input: typeof _optionalChain([transform, 'optionalAccess', _18 => _18.input]) === "function" ? transform.input : (newValue) => _chunkFYN7F5WJjs.readValueAsDate.call(void 0, adapter, newValue),
541
+ output: typeof _optionalChain([transform, 'optionalAccess', _19 => _19.output]) === "function" ? transform.output : (newValue) => newValue
533
542
  }
534
543
  });
535
544
  const handleInputRef = _material.useForkRef.call(void 0, field.ref, inputRef);
@@ -559,10 +568,10 @@ var Component5 = function TimePickerElement(props) {
559
568
  required,
560
569
  fullWidth: true,
561
570
  error: !!error,
562
- helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _19 => _19.helperText]) || rest.helperText,
571
+ helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _20 => _20.helperText]) || rest.helperText,
563
572
  inputProps: {
564
573
  readOnly: textReadOnly,
565
- ..._optionalChain([inputProps, 'optionalAccess', _20 => _20.inputProps])
574
+ ..._optionalChain([inputProps, 'optionalAccess', _21 => _21.inputProps])
566
575
  }
567
576
  }
568
577
  }
@@ -653,7 +662,7 @@ var Component6 = function AsyncSelectElement(props) {
653
662
  fetchData(payload, (results) => {
654
663
  if (active) {
655
664
  if (!!results && results.length > 0) {
656
- fillOptions(_optionalChain([results, 'optionalAccess', _21 => _21.filter, 'call', _22 => _22((c) => c.Value == initialValue)]));
665
+ fillOptions(_optionalChain([results, 'optionalAccess', _22 => _22.filter, 'call', _23 => _23((c) => c.Value == initialValue)]));
657
666
  setSelectedOption(results[0]);
658
667
  field.onChange(results[0].Value);
659
668
  fieldValue.current = results[0].Value;
@@ -1060,7 +1069,7 @@ var Component8 = function SelectElement(props) {
1060
1069
  const handleChange = (event, newValue, reason) => {
1061
1070
  const option = newValue;
1062
1071
  field.onChange(option ? getOptionValue(option) : null);
1063
- _optionalChain([onChange, 'optionalCall', _23 => _23(event, newValue, reason)]);
1072
+ _optionalChain([onChange, 'optionalCall', _24 => _24(event, newValue, reason)]);
1064
1073
  };
1065
1074
  _react.useEffect.call(void 0, () => {
1066
1075
  if (!isEdit && options.length === 1 && (field.value == null || field.value == void 0 || field.value === "")) {
@@ -1309,7 +1318,7 @@ var Component10 = function SelectCascadeElement(props) {
1309
1318
  const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
1310
1319
  const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
1311
1320
  _react.useEffect.call(void 0, () => {
1312
- if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _24 => _24.current]) !== dependentField.value || dependentField.value === null) {
1321
+ if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _25 => _25.current]) !== dependentField.value || dependentField.value === null) {
1313
1322
  field.onChange(null);
1314
1323
  setHasAutoSelected(false);
1315
1324
  }
@@ -1491,7 +1500,7 @@ var Component12 = function CheckboxGroup(props) {
1491
1500
  disabled: rest.disabled
1492
1501
  });
1493
1502
  const [selectedValues, setSelectedValues] = _react.useState.call(void 0,
1494
- options.filter((c) => _optionalChain([field, 'access', _25 => _25.value, 'optionalAccess', _26 => _26.includes, 'call', _27 => _27(c.Value)])).map((c) => c.Value) || []
1503
+ options.filter((c) => _optionalChain([field, 'access', _26 => _26.value, 'optionalAccess', _27 => _27.includes, 'call', _28 => _28(c.Value)])).map((c) => c.Value) || []
1495
1504
  );
1496
1505
  _react.useEffect.call(void 0, () => {
1497
1506
  field.onChange(selectedValues ? [...selectedValues] : []);
package/dist/index.d.mts CHANGED
@@ -5,7 +5,7 @@ export { api, api2, flattenObjectKeys, getTimezone, handleServerErrors, property
5
5
  export { Field } from './wrappers/index.mjs';
6
6
  export { Field2 } from './wrappers2/index.mjs';
7
7
  export { a as AsyncSelectMultiPayload, A as AsyncSelectPayload } from './AsyncSelectPayload-Cz4bgak0.mjs';
8
- export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from './OptionItem-8fG5uP-B.mjs';
8
+ export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from './OptionItem-oN6XnOTJ.mjs';
9
9
  import 'react/jsx-runtime';
10
10
  import '@mui/material';
11
11
  import 'react';
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { api, api2, flattenObjectKeys, getTimezone, handleServerErrors, property
5
5
  export { Field } from './wrappers/index.js';
6
6
  export { Field2 } from './wrappers2/index.js';
7
7
  export { a as AsyncSelectMultiPayload, A as AsyncSelectPayload } from './AsyncSelectPayload-Cz4bgak0.js';
8
- export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from './OptionItem-8fG5uP-B.js';
8
+ export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from './OptionItem-oN6XnOTJ.js';
9
9
  import 'react/jsx-runtime';
10
10
  import '@mui/material';
11
11
  import 'react';
package/dist/index.js CHANGED
@@ -14,10 +14,10 @@ require('./chunk-7M2VOCYN.js');
14
14
  require('./chunk-6BGQA4BQ.js');
15
15
 
16
16
 
17
- var _chunkWCNR24BMjs = require('./chunk-WCNR24BM.js');
17
+ var _chunkIZSKZD5Mjs = require('./chunk-IZSKZD5M.js');
18
18
 
19
19
 
20
- var _chunkIZSKZD5Mjs = require('./chunk-IZSKZD5M.js');
20
+ var _chunkBBDVHJQ3js = require('./chunk-BBDVHJQ3.js');
21
21
 
22
22
 
23
23
  var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
@@ -55,4 +55,4 @@ var _chunkFYN7F5WJjs = require('./chunk-FYN7F5WJ.js');
55
55
 
56
56
 
57
57
 
58
- exports.AuthorizedView = _chunkJKUOV3MNjs.AuthorizedView_default; exports.CancelButton = _chunkJKUOV3MNjs.CancelButton_default; exports.ClearButton = _chunkJKUOV3MNjs.ClearButton_default; exports.Field = _chunkWCNR24BMjs.Field_default; exports.Field2 = _chunkIZSKZD5Mjs.Field_default; exports.FilterButton = _chunkJKUOV3MNjs.FilterButton_default; exports.FilterWrapper = _chunkJKUOV3MNjs.FilterWrapper_default; exports.FormWrapper = _chunkJKUOV3MNjs.FormWrapper_default; exports.LabelText = _chunkJKUOV3MNjs.LabelText_default; exports.ListWrapper = _chunkJKUOV3MNjs.ListWrapper_default; exports.SimpleButton = _chunkJKUOV3MNjs.SimpleButton_default; exports.SimpleToolbar = _chunkJKUOV3MNjs.SimpleToolbar_default; exports.api = _chunkFYN7F5WJjs.api; exports.api2 = _chunkFYN7F5WJjs.api2; exports.flattenObjectKeys = _chunkFYN7F5WJjs.flattenObjectKeys; exports.getTimezone = _chunkFYN7F5WJjs.getTimezone; exports.handleServerErrors = _chunkFYN7F5WJjs.handleServerErrors; exports.propertyExists = _chunkFYN7F5WJjs.propertyExists; exports.readValueAsDate = _chunkFYN7F5WJjs.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkFYN7F5WJjs.removeLeadingTrailingSlashes; exports.schemaTools = _chunkFYN7F5WJjs.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
58
+ exports.AuthorizedView = _chunkJKUOV3MNjs.AuthorizedView_default; exports.CancelButton = _chunkJKUOV3MNjs.CancelButton_default; exports.ClearButton = _chunkJKUOV3MNjs.ClearButton_default; exports.Field = _chunkBBDVHJQ3js.Field_default; exports.Field2 = _chunkIZSKZD5Mjs.Field_default; exports.FilterButton = _chunkJKUOV3MNjs.FilterButton_default; exports.FilterWrapper = _chunkJKUOV3MNjs.FilterWrapper_default; exports.FormWrapper = _chunkJKUOV3MNjs.FormWrapper_default; exports.LabelText = _chunkJKUOV3MNjs.LabelText_default; exports.ListWrapper = _chunkJKUOV3MNjs.ListWrapper_default; exports.SimpleButton = _chunkJKUOV3MNjs.SimpleButton_default; exports.SimpleToolbar = _chunkJKUOV3MNjs.SimpleToolbar_default; exports.api = _chunkFYN7F5WJjs.api; exports.api2 = _chunkFYN7F5WJjs.api2; exports.flattenObjectKeys = _chunkFYN7F5WJjs.flattenObjectKeys; exports.getTimezone = _chunkFYN7F5WJjs.getTimezone; exports.handleServerErrors = _chunkFYN7F5WJjs.handleServerErrors; exports.propertyExists = _chunkFYN7F5WJjs.propertyExists; exports.readValueAsDate = _chunkFYN7F5WJjs.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkFYN7F5WJjs.removeLeadingTrailingSlashes; exports.schemaTools = _chunkFYN7F5WJjs.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
package/dist/index.mjs CHANGED
@@ -12,12 +12,12 @@ import {
12
12
  } from "./chunk-FSU3H777.mjs";
13
13
  import "./chunk-2JFL7TS5.mjs";
14
14
  import "./chunk-EVPUCTZA.mjs";
15
- import {
16
- Field_default
17
- } from "./chunk-KB3ODFZD.mjs";
18
15
  import {
19
16
  Field_default as Field_default2
20
17
  } from "./chunk-MM6OQZAY.mjs";
18
+ import {
19
+ Field_default
20
+ } from "./chunk-3LU2Q6FI.mjs";
21
21
  import {
22
22
  useTransform
23
23
  } from "./chunk-GFSTK7KN.mjs";
@@ -1,6 +1,6 @@
1
1
  import { GridSortModel } from '@mui/x-data-grid';
2
2
  export { a as AsyncSelectMultiPayload, A as AsyncSelectPayload } from '../AsyncSelectPayload-Cz4bgak0.mjs';
3
- export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from '../OptionItem-8fG5uP-B.mjs';
3
+ export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from '../OptionItem-oN6XnOTJ.mjs';
4
4
 
5
5
  type ValidationErrors = {
6
6
  [field: string]: string | string[] | boolean | {
@@ -37,7 +37,7 @@ type ListResponse<TGridModel> = {
37
37
  Total: number;
38
38
  };
39
39
  type ValueLabel = {
40
- Value: number;
40
+ Value: number | string;
41
41
  Label: string;
42
42
  };
43
43
 
@@ -1,6 +1,6 @@
1
1
  import { GridSortModel } from '@mui/x-data-grid';
2
2
  export { a as AsyncSelectMultiPayload, A as AsyncSelectPayload } from '../AsyncSelectPayload-Cz4bgak0.js';
3
- export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from '../OptionItem-8fG5uP-B.js';
3
+ export { A as AsyncMultiSelectPayload, O as OptionItem, a as OptionItem2 } from '../OptionItem-oN6XnOTJ.js';
4
4
 
5
5
  type ValidationErrors = {
6
6
  [field: string]: string | string[] | boolean | {
@@ -37,7 +37,7 @@ type ListResponse<TGridModel> = {
37
37
  Total: number;
38
38
  };
39
39
  type ValueLabel = {
40
- Value: number;
40
+ Value: number | string;
41
41
  Label: string;
42
42
  };
43
43
 
@@ -5,7 +5,7 @@ import { FieldValues, UseFormSetError } from 'react-hook-form';
5
5
  import { z } from 'zod';
6
6
  import '@mui/x-data-grid';
7
7
  import '../AsyncSelectPayload-Cz4bgak0.mjs';
8
- import '../OptionItem-8fG5uP-B.mjs';
8
+ import '../OptionItem-oN6XnOTJ.mjs';
9
9
 
10
10
  declare class api {
11
11
  static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
@@ -5,7 +5,7 @@ import { FieldValues, UseFormSetError } from 'react-hook-form';
5
5
  import { z } from 'zod';
6
6
  import '@mui/x-data-grid';
7
7
  import '../AsyncSelectPayload-Cz4bgak0.js';
8
- import '../OptionItem-8fG5uP-B.js';
8
+ import '../OptionItem-oN6XnOTJ.js';
9
9
 
10
10
  declare class api {
11
11
  static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<ListResponse<T>>>;
@@ -139,20 +139,20 @@ type DatePickerElementProps<TFieldValues extends FieldValues = FieldValues, TNam
139
139
  required?: boolean;
140
140
  isDate?: boolean;
141
141
  parseError?: (error: FieldError | DateValidationError) => ReactNode;
142
- rules?: UseControllerProps<TFieldValues, TName>['rules'];
142
+ rules?: UseControllerProps<TFieldValues, TName>["rules"];
143
143
  control?: Control<TFieldValues>;
144
144
  inputProps?: TextFieldProps;
145
- helperText?: TextFieldProps['helperText'];
145
+ helperText?: TextFieldProps["helperText"];
146
146
  label?: ReactNode;
147
147
  placeholder?: string;
148
148
  textReadOnly?: boolean;
149
- slotProps?: Omit<DatePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, 'textField'>;
149
+ slotProps?: Omit<DatePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, "textField">;
150
150
  transform?: {
151
151
  input?: (value: PathValue<TFieldValues, TName>) => TValue | null;
152
152
  output?: (value: TValue | null, context: PickerChangeHandlerContext<DateValidationError>) => PathValue<TFieldValues, TName>;
153
153
  };
154
154
  gridProps?: Grid2Props;
155
- datePickerProps?: Omit<DatePickerProps<TValue, TEnableAccessibleFieldDOMStructure>, 'value' | 'slotProps'>;
155
+ datePickerProps?: Omit<DatePickerProps<TValue, TEnableAccessibleFieldDOMStructure>, "value" | "slotProps">;
156
156
  variant?: TextFieldVariants;
157
157
  sx?: SxProps;
158
158
  };
@@ -139,20 +139,20 @@ type DatePickerElementProps<TFieldValues extends FieldValues = FieldValues, TNam
139
139
  required?: boolean;
140
140
  isDate?: boolean;
141
141
  parseError?: (error: FieldError | DateValidationError) => ReactNode;
142
- rules?: UseControllerProps<TFieldValues, TName>['rules'];
142
+ rules?: UseControllerProps<TFieldValues, TName>["rules"];
143
143
  control?: Control<TFieldValues>;
144
144
  inputProps?: TextFieldProps;
145
- helperText?: TextFieldProps['helperText'];
145
+ helperText?: TextFieldProps["helperText"];
146
146
  label?: ReactNode;
147
147
  placeholder?: string;
148
148
  textReadOnly?: boolean;
149
- slotProps?: Omit<DatePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, 'textField'>;
149
+ slotProps?: Omit<DatePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, "textField">;
150
150
  transform?: {
151
151
  input?: (value: PathValue<TFieldValues, TName>) => TValue | null;
152
152
  output?: (value: TValue | null, context: PickerChangeHandlerContext<DateValidationError>) => PathValue<TFieldValues, TName>;
153
153
  };
154
154
  gridProps?: Grid2Props;
155
- datePickerProps?: Omit<DatePickerProps<TValue, TEnableAccessibleFieldDOMStructure>, 'value' | 'slotProps'>;
155
+ datePickerProps?: Omit<DatePickerProps<TValue, TEnableAccessibleFieldDOMStructure>, "value" | "slotProps">;
156
156
  variant?: TextFieldVariants;
157
157
  sx?: SxProps;
158
158
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWCNR24BMjs = require('../chunk-WCNR24BM.js');
3
+ var _chunkBBDVHJQ3js = require('../chunk-BBDVHJQ3.js');
4
4
  require('../chunk-6JZ35VQJ.js');
5
5
  require('../chunk-FYN7F5WJ.js');
6
6
 
7
7
 
8
- exports.Field = _chunkWCNR24BMjs.Field_default;
8
+ exports.Field = _chunkBBDVHJQ3js.Field_default;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Field_default
3
- } from "../chunk-KB3ODFZD.mjs";
3
+ } from "../chunk-3LU2Q6FI.mjs";
4
4
  import "../chunk-GFSTK7KN.mjs";
5
5
  import "../chunk-GAYZ4QSD.mjs";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import { CheckboxProps, FormControlLabelProps, Grid2Props, ChipTypeMap, AutocompleteProps, TextFieldProps, IconButtonProps, FormLabelProps, RadioProps, TextField } from '@mui/material';
2
2
  import * as react_hook_form from 'react-hook-form';
3
3
  import { FieldValues, FieldPath, Control, UseControllerProps, FieldError, PathValue } from 'react-hook-form';
4
- import { A as AsyncMultiSelectPayload, O as OptionItem } from '../OptionItem-8fG5uP-B.mjs';
4
+ import { A as AsyncMultiSelectPayload, O as OptionItem } from '../OptionItem-oN6XnOTJ.mjs';
5
5
  import { A as AsyncSelectPayload } from '../AsyncSelectPayload-Cz4bgak0.mjs';
6
6
  import * as react from 'react';
7
7
  import { ReactNode, ChangeEvent } from 'react';
@@ -1,7 +1,7 @@
1
1
  import { CheckboxProps, FormControlLabelProps, Grid2Props, ChipTypeMap, AutocompleteProps, TextFieldProps, IconButtonProps, FormLabelProps, RadioProps, TextField } from '@mui/material';
2
2
  import * as react_hook_form from 'react-hook-form';
3
3
  import { FieldValues, FieldPath, Control, UseControllerProps, FieldError, PathValue } from 'react-hook-form';
4
- import { A as AsyncMultiSelectPayload, O as OptionItem } from '../OptionItem-8fG5uP-B.js';
4
+ import { A as AsyncMultiSelectPayload, O as OptionItem } from '../OptionItem-oN6XnOTJ.js';
5
5
  import { A as AsyncSelectPayload } from '../AsyncSelectPayload-Cz4bgak0.js';
6
6
  import * as react from 'react';
7
7
  import { ReactNode, ChangeEvent } from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnwebsoft/ui",
3
- "version": "2.18.42",
3
+ "version": "2.18.44",
4
4
  "description": "A set of reusable wrappers for MUI v6",
5
5
  "author": "GNWebsoft Private Limited",
6
6
  "license": "",