@m4l/components 0.0.27 → 0.0.32

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.
Files changed (68) hide show
  1. package/dist/components/CompanyLogo/index.js +0 -1
  2. package/dist/components/DataGrid/index.js +5 -2
  3. package/dist/components/DynamicFilter/components/ApplyedFilters/components/ApplyedFilter/index.d.ts +3 -0
  4. package/dist/components/DynamicFilter/components/ApplyedFilters/components/ApplyedFilter/styles.d.ts +6 -0
  5. package/dist/components/DynamicFilter/components/ApplyedFilters/index.d.ts +2 -0
  6. package/dist/components/DynamicFilter/components/ApplyedFilters/styles.d.ts +2 -0
  7. package/dist/components/DynamicFilter/components/ClearFilters/index.d.ts +2 -0
  8. package/dist/components/DynamicFilter/components/ClearFilters/styles.d.ts +3 -0
  9. package/dist/components/DynamicFilter/components/FilterButton/index.d.ts +2 -0
  10. package/dist/components/DynamicFilter/components/FilterButton/styles.d.ts +4 -0
  11. package/dist/components/DynamicFilter/components/InputFilter/index.d.ts +2 -0
  12. package/dist/components/DynamicFilter/components/InputFilter/styles.d.ts +3 -0
  13. package/dist/components/DynamicFilter/components/PopupEditFilter/components/BooleanFilter/index.d.ts +2 -0
  14. package/dist/components/DynamicFilter/components/PopupEditFilter/components/BooleanFilter/styles.d.ts +3 -0
  15. package/dist/components/DynamicFilter/components/PopupEditFilter/components/DateTimeFilter/index.d.ts +2 -0
  16. package/dist/components/DynamicFilter/components/PopupEditFilter/components/DateTimeFilter/styles.d.ts +3 -0
  17. package/dist/components/DynamicFilter/components/PopupEditFilter/components/StringFilter/index.d.ts +2 -0
  18. package/dist/components/DynamicFilter/components/PopupEditFilter/components/StringFilter/styles.d.ts +3 -0
  19. package/dist/components/DynamicFilter/components/PopupEditFilter/components/factory.d.ts +6 -0
  20. package/dist/components/DynamicFilter/components/PopupEditFilter/components/validations.d.ts +5 -0
  21. package/dist/components/DynamicFilter/components/PopupEditFilter/index.d.ts +2 -0
  22. package/dist/components/DynamicFilter/components/PopupEditFilter/styles.d.ts +5 -0
  23. package/dist/components/DynamicFilter/contexts/BaseContext/index.d.ts +5 -0
  24. package/dist/components/DynamicFilter/contexts/BaseContext/types.d.ts +42 -0
  25. package/dist/components/DynamicFilter/hooks/useFilter.d.ts +1 -0
  26. package/dist/components/DynamicFilter/index.d.ts +3 -0
  27. package/dist/components/DynamicFilter/index.js +1392 -0
  28. package/dist/components/DynamicFilter/styles.d.ts +8 -0
  29. package/dist/components/DynamicFilter/types.d.ts +65 -0
  30. package/dist/components/Icon/index.js +4 -2
  31. package/dist/components/Icon/styles.d.ts +1 -2
  32. package/dist/components/Icon/types.d.ts +4 -2
  33. package/dist/components/Image/index.js +1 -2
  34. package/dist/components/ObjectLogs/index.js +51 -98
  35. package/dist/components/ObjectLogs/types.d.ts +0 -2
  36. package/dist/components/ScrollBar/index.d.ts +6 -3
  37. package/dist/components/ScrollBar/index.js +7 -15
  38. package/dist/components/hook-form/FormProvider/index.js +0 -1
  39. package/dist/components/hook-form/RHFAutocomplete/index.d.ts +4 -0
  40. package/dist/components/hook-form/RHFAutocomplete/styles.d.ts +5 -0
  41. package/dist/components/hook-form/RHFAutocomplete/types.d.ts +13 -0
  42. package/dist/components/hook-form/RHFAutocompleteAsync/index.js +0 -2
  43. package/dist/components/hook-form/RHFDateTime/index.d.ts +4 -0
  44. package/dist/components/hook-form/RHFDateTime/styles.d.ts +2 -0
  45. package/dist/components/hook-form/RHFDateTime/types.d.ts +9 -0
  46. package/dist/components/hook-form/RHFDateTime.js +72 -0
  47. package/dist/components/hook-form/RHFTextField/index.d.ts +1 -2
  48. package/dist/components/hook-form/RHFTextField/index.js +6 -3
  49. package/dist/components/hook-form/RHFUpload/RHFUploadImage/components/UploadImage/index.d.ts +3 -0
  50. package/dist/components/hook-form/RHFUpload/RHFUploadImage/components/UploadImage/styles.d.ts +4 -0
  51. package/dist/components/hook-form/RHFUpload/RHFUploadImage/components/UploadImage/types.d.ts +11 -0
  52. package/dist/components/hook-form/RHFUpload/RHFUploadImage/index.d.ts +3 -0
  53. package/dist/components/hook-form/RHFUpload/RHFUploadImage/types.d.ts +14 -0
  54. package/dist/components/hook-form/RHFUpload/index.d.ts +1 -0
  55. package/dist/components/hook-form/RHFUpload/types.d.ts +4 -0
  56. package/dist/components/hook-form/RHFUpload.js +182 -0
  57. package/dist/components/hook-form/index.d.ts +3 -0
  58. package/dist/components/index.d.ts +2 -0
  59. package/dist/components/mui_extended/MenuActions/index.js +1 -1
  60. package/dist/index.js +18 -14
  61. package/dist/lodash.js +61 -1
  62. package/dist/node_modules.js +1307 -1
  63. package/dist/simplebar.js +1 -0
  64. package/dist/style.css +1 -0
  65. package/dist/vendor.js +150 -11
  66. package/package.json +9 -7
  67. package/dist/components/ScrollBar/styles.d.ts +0 -6
  68. package/dist/components/ScrollBar/types.d.ts +0 -7
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface WrapperProps {
3
+ inEdition: boolean;
4
+ }
5
+ export declare const WrapperFilter: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const WrapperFilterMobile: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export declare const ContainerFistRow: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
+ export {};
@@ -0,0 +1,65 @@
1
+ import { Maybe } from '@m4l/core';
2
+ export declare type FieldType = 'number' | 'string' | 'boolean' | 'date' | 'datetime' | 'time' | 'select' | 'in';
3
+ export declare type OperandType = number | string | boolean | Date | [] | object;
4
+ export declare type Operator = 'e' | 'ne' | 'b' | 'gt' | 'gte' | 'lt' | 'lte' | 'c' | 'nc';
5
+ export declare const OPERATORS: Array<Operator>;
6
+ export declare type StringOperator = 'c' | 'nc';
7
+ export declare const STRING_OPERATORS: Array<StringOperator>;
8
+ export declare type BooleanOperator = 'e' | 'ne';
9
+ export declare const BOOLEAN_OPERATORS: Array<BooleanOperator>;
10
+ export declare type DateTimeOperator = 'b' | 'e' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
11
+ export declare const DATE_TIME_OPERATORS: Array<DateTimeOperator>;
12
+ export interface Field {
13
+ name: string;
14
+ label: string;
15
+ type: FieldType;
16
+ multiple?: boolean;
17
+ fixed?: boolean;
18
+ urlIcon: string;
19
+ defaultOperand1?: Maybe<OperandType>;
20
+ defaultOperand2?: Maybe<OperandType>;
21
+ }
22
+ export interface OptionOperator<T> {
23
+ id: T;
24
+ label: string;
25
+ }
26
+ export interface BaseApplyFilter {
27
+ id: number;
28
+ fieldName: string;
29
+ isSetted: boolean;
30
+ fixed: boolean;
31
+ }
32
+ export interface ValuesFilter {
33
+ operator: Operator;
34
+ labelOperator: string;
35
+ labelOperands: string;
36
+ operand1?: Maybe<OperandType>;
37
+ operand2?: Maybe<OperandType>;
38
+ }
39
+ export interface FormValuesFilter<T> {
40
+ valueOperator?: Maybe<OptionOperator<T>>;
41
+ valueOperand1?: Maybe<any>;
42
+ valueOperand2?: Maybe<any>;
43
+ }
44
+ export interface RawFilterFieldApply {
45
+ n: string;
46
+ o: Operator;
47
+ o1: Maybe<OperandType>;
48
+ o2: Maybe<OperandType>;
49
+ }
50
+ export interface FilterFieldApply extends BaseApplyFilter, ValuesFilter {
51
+ }
52
+ export declare type InitialFilterFieldApply = Omit<FilterFieldApply, 'id' | 'fixed' | 'isSetted'>;
53
+ export declare type FilterToAddApply = Omit<FilterFieldApply, 'id' | 'labelOperator'>;
54
+ export declare type FilterToEditApply = Omit<FilterFieldApply, 'labelOperator'>;
55
+ export interface FilterFormFieldApply extends BaseApplyFilter, ValuesFilter, FormValuesFilter<Operator> {
56
+ }
57
+ export declare const ALL_FIELDS: Field;
58
+ export interface DynamicFilterProps {
59
+ isSkeleton?: boolean;
60
+ automatic?: boolean;
61
+ withAllField?: boolean;
62
+ fields: Array<Field>;
63
+ initialFilters?: Array<InitialFilterFieldApply>;
64
+ onChangeFilter: (newFilters: Array<FilterFieldApply>, rawFilters: Array<RawFilterFieldApply>) => void;
65
+ }
@@ -14,13 +14,15 @@ function Icon(props) {
14
14
  src = "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/commons/assets/icons/default.svg",
15
15
  width = "20px",
16
16
  height = "20px",
17
- bgColor = "active"
17
+ bgColor = "active",
18
+ onClick
18
19
  } = props;
19
20
  return /* @__PURE__ */ jsx(MaskIcon, {
20
21
  src,
21
22
  width,
22
23
  height,
23
- bgColor
24
+ bgColor,
25
+ onClick
24
26
  });
25
27
  }
26
28
  export { Icon as I };
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { IconProps } from './types';
3
- export declare const MaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & IconProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
+ export declare const MaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("./types").OwnProps & import("react").HTMLProps<HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,6 +1,8 @@
1
- export interface IconProps {
2
- src: string;
1
+ import { HTMLProps } from 'react';
2
+ export interface OwnProps {
3
+ src: string | undefined;
3
4
  width?: number | string;
4
5
  height?: number | string;
5
6
  bgColor?: string | 'info' | 'warning' | 'error' | 'active' | 'disabled';
6
7
  }
8
+ export declare type IconProps = OwnProps & HTMLProps<HTMLDivElement>;
@@ -9,7 +9,7 @@ const SKTWrapperImage = styled("div")(({
9
9
  width,
10
10
  height: "100%",
11
11
  padding: theme.spacing(3),
12
- mask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
12
+ mask: `zurl("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
13
13
  WebkitMask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`
14
14
  }));
15
15
  const WrapperLazyLoadImage = styled("div")(({
@@ -54,7 +54,6 @@ function Image({
54
54
  src,
55
55
  ...other
56
56
  }) {
57
- console.log("ImageSkeleton", isSekeleton);
58
57
  const theme = useTheme();
59
58
  const themeMode = theme.palette.mode;
60
59
  if (isSekeleton) {
@@ -1,15 +1,13 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, usePaginate } from "@m4l/core";
3
- import { Tooltip, IconButton, TextField } from "@mui/material";
4
- import { DateTimePicker } from "@mui/x-date-pickers";
5
- import { styled, useTheme } from "@mui/material/styles";
6
- import { startOfMonth, endOfDay } from "date-fns";
3
+ import { styled } from "@mui/material/styles";
7
4
  import { D as DataGrid } from "../DataGrid/index.js";
8
- import { I as IconButton$1 } from "../mui_extended/IconButton/index.js";
9
5
  import { D as DateFormatter } from "../DataGrid/formatters/DateFormatter/index.js";
6
+ import { Tooltip, IconButton } from "@mui/material";
10
7
  import { R as ReactJson } from "../../react-json-view.js";
11
8
  import { jsx, jsxs } from "react/jsx-runtime";
12
9
  import { u as useModal } from "../../hooks/useModal/index.js";
10
+ import { D as DynamicFilter } from "../DynamicFilter/index.js";
13
11
  const Container$1 = styled("div")(() => ({
14
12
  height: "100%",
15
13
  width: "100%",
@@ -77,13 +75,6 @@ function DetailDialog(props) {
77
75
  mounted = false;
78
76
  };
79
77
  }, []);
80
- const detailTest = {
81
- id: "id",
82
- test: true,
83
- number: 123
84
- };
85
- console.log("parseJson", detail, typeof detail);
86
- console.log("parseJosnTest", detailTest, typeof detailTest);
87
78
  return /* @__PURE__ */ jsx(Container, {
88
79
  id: "objectLogsDetail",
89
80
  children: /* @__PURE__ */ jsx(ReactJson, {
@@ -133,17 +124,10 @@ function ObjectLogs(props) {
133
124
  resource_id,
134
125
  object_id
135
126
  } = props;
136
- const now = new Date();
137
- const [startValue, setStartValue] = useState(startOfMonth(now));
138
- const [endValue, setEndtValue] = useState(endOfDay(now));
139
127
  const [queryParams, setQueryParams] = useState({
140
128
  resource_id,
141
- object_id,
142
- init_date: startValue,
143
- end_date: endValue
129
+ object_id
144
130
  });
145
- const [queryActive, setQueryActive] = useState(true);
146
- const theme = useTheme();
147
131
  const dateFormatterCreatedAt = useCallback((rowProps) => /* @__PURE__ */ jsx(DateFormatter, {
148
132
  presentationType: "datetime",
149
133
  dateTime: rowProps.row.created_at
@@ -151,42 +135,35 @@ function ObjectLogs(props) {
151
135
  const DetailRowFormatter = useCallback((rowProps) => /* @__PURE__ */ jsx(DetailFormatter, {
152
136
  log_id: rowProps.row.id
153
137
  }), []);
154
- const columns = useMemo(() => [
155
- {
156
- key: "created_at",
157
- name: getLabel("object_logs.created_at"),
158
- type: "date",
159
- width: 300,
160
- formatter: dateFormatterCreatedAt
161
- },
162
- {
163
- key: "email",
164
- name: getLabel("object_logs.email"),
165
- type: "text",
166
- width: 300
167
- },
168
- {
169
- key: "resource_name",
170
- name: getLabel("object_logs.resource_name"),
171
- type: "text"
172
- },
173
- {
174
- key: "preview",
175
- name: getLabel("object_logs.preview"),
176
- type: "text"
177
- },
178
- {
179
- key: "Detail",
180
- name: getLabel("object_logs.log_detail"),
181
- type: "custom",
182
- formatter: DetailRowFormatter
183
- },
184
- {
185
- key: "ip",
186
- name: getLabel("object_logs.ip"),
187
- type: "text"
188
- }
189
- ], [getLabel]);
138
+ const columns = useMemo(() => [{
139
+ key: "created_at",
140
+ name: getLabel("object_logs.created_at"),
141
+ type: "date",
142
+ width: 300,
143
+ formatter: dateFormatterCreatedAt
144
+ }, {
145
+ key: "email",
146
+ name: getLabel("object_logs.email"),
147
+ type: "text",
148
+ width: 300
149
+ }, {
150
+ key: "resource_name",
151
+ name: getLabel("object_logs.resource_name"),
152
+ type: "text"
153
+ }, {
154
+ key: "preview",
155
+ name: getLabel("object_logs.preview"),
156
+ type: "text"
157
+ }, {
158
+ key: "Detail",
159
+ name: getLabel("object_logs.log_detail"),
160
+ type: "custom",
161
+ formatter: DetailRowFormatter
162
+ }, {
163
+ key: "ip",
164
+ name: getLabel("object_logs.ip"),
165
+ type: "text"
166
+ }], [getLabel]);
190
167
  const {
191
168
  pagerState,
192
169
  rows,
@@ -199,57 +176,33 @@ function ObjectLogs(props) {
199
176
  queryParams
200
177
  });
201
178
  useEffect(() => {
202
- setQueryActive(true);
203
179
  clearRows();
204
180
  }, [object_id]);
205
- const onChangeDate = (date, which) => {
206
- if (!date)
207
- return;
208
- if (which === "start") {
209
- setStartValue(date);
210
- } else {
211
- setEndtValue(date);
212
- }
213
- setQueryActive(true);
214
- };
215
- const onClickFilter = () => {
181
+ const onChangeFilter = (filters, rawFilters) => {
216
182
  setQueryParams({
217
183
  resource_id,
218
184
  object_id,
219
- init_date: startValue,
220
- end_date: endValue
185
+ f: rawFilters
221
186
  });
222
- setQueryActive(false);
187
+ console.log("filter was change*****", JSON.stringify(rawFilters));
223
188
  };
224
189
  return /* @__PURE__ */ jsxs(Container$1, {
225
- children: [/* @__PURE__ */ jsxs(Actions, {
190
+ children: [/* @__PURE__ */ jsx(Actions, {
226
191
  id: "objectLogsActions",
227
- children: [/* @__PURE__ */ jsx(DateTimePicker, {
228
- value: startValue,
229
- onChange: (newValue) => {
230
- onChangeDate(newValue, "start");
231
- },
232
- renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
233
- ...params
234
- })
235
- }), /* @__PURE__ */ jsx(DateTimePicker, {
236
- value: endValue,
237
- onChange: (newValue) => {
238
- onChangeDate(newValue, "end");
239
- },
240
- renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
241
- ...params
242
- })
243
- }), /* @__PURE__ */ jsx(IconButton$1, {
244
- dictionaryTooltip: "object_logs.search",
245
- onClick: onClickFilter,
246
- sx: {
247
- color: queryActive ? theme.palette.primary.main : theme.palette.text.primary
248
- },
249
- disabled: object_id === void 0,
250
- "aria-label": "searc",
251
- src: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/object_logs/assets/icons/search.svg"
252
- })]
192
+ children: /* @__PURE__ */ jsx(DynamicFilter, {
193
+ withAllField: false,
194
+ onChangeFilter,
195
+ automatic: false,
196
+ fields: [{
197
+ name: "user_logs.created_at",
198
+ label: getLabel("object_logs.date"),
199
+ type: "datetime",
200
+ multiple: false,
201
+ fixed: true,
202
+ urlIcon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/icon/assets/icons/default.svg"
203
+ }],
204
+ initialFilters: []
205
+ })
253
206
  }), /* @__PURE__ */ jsx(GridWrapper, {
254
207
  id: "GridWrapper",
255
208
  children: /* @__PURE__ */ jsx(DataGrid, {
@@ -13,6 +13,4 @@ export interface LogsProps {
13
13
  object_id: Maybe<number>;
14
14
  }
15
15
  export interface QueryParams extends LogsProps, Record<string, unknown> {
16
- init_date: Date;
17
- end_date: Date;
18
16
  }
@@ -1,3 +1,6 @@
1
- /// <reference types="react" />
2
- import { ScrollBarProps } from './types';
3
- export declare function ScrollBar({ children, sx, ...other }: ScrollBarProps): JSX.Element;
1
+ import { ReactElement } from 'react';
2
+ interface Props {
3
+ children?: ReactElement;
4
+ }
5
+ export declare function Scrollbar({ children }: Props): JSX.Element;
6
+ export default Scrollbar;
@@ -1,6 +1,6 @@
1
- import { Box } from "@mui/material";
2
- import { styled, alpha } from "@mui/material/styles";
3
1
  import { S as SimpleBar } from "../../simplebar.js";
2
+ import { styled, alpha } from "@mui/material/styles";
3
+ import { Box } from "@mui/material";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const RootStyle = styled("div")(() => ({
6
6
  flexGrow: 1,
@@ -29,32 +29,24 @@ const SimpleBarStyle = styled(SimpleBar)(({
29
29
  zIndex: "inherit"
30
30
  }
31
31
  }));
32
- function ScrollBar({
33
- children,
34
- sx,
35
- ...other
32
+ function Scrollbar({
33
+ children
36
34
  }) {
37
35
  const userAgent = typeof navigator === "undefined" ? "SSR" : navigator.userAgent;
38
36
  const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
39
37
  if (isMobile) {
40
38
  return /* @__PURE__ */ jsx(Box, {
41
39
  sx: {
42
- overflowX: "auto",
43
- ...sx
40
+ overflowX: "auto"
44
41
  },
45
- ...other,
46
42
  children
47
43
  });
48
44
  }
49
45
  return /* @__PURE__ */ jsx(RootStyle, {
50
- id: "RootStyle",
51
46
  children: /* @__PURE__ */ jsx(SimpleBarStyle, {
52
- timeout: 500,
53
- clickOnTrack: false,
54
- sx,
55
- ...other,
47
+ autoHide: false,
56
48
  children
57
49
  })
58
50
  });
59
51
  }
60
- export { ScrollBar as S };
52
+ export { Scrollbar as S };
@@ -137,7 +137,6 @@ function FormProvider(props) {
137
137
  if (values.initial) {
138
138
  return;
139
139
  }
140
- console.log("****\xB7\xB7\xB7\xB7\xB7\xB7useEffect FormProvider", values);
141
140
  const keys = Object.keys(values);
142
141
  keys.forEach((key) => {
143
142
  methods.setValue(key, values[key], {
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from '@mui/material';
3
+ import type { RHFAutocompleteProps } from './types';
4
+ export declare function RHFAutocomplete<T>(props: RHFAutocompleteProps<T> & TextFieldProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const SKTRHFAutocompleteWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const PropertieValueLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
+ export declare const SKTInputText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const WrapperAutocomplete: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,13 @@
1
+ export interface SkeletonProps {
2
+ isSkeleton?: boolean;
3
+ width?: string | number;
4
+ height?: string | number;
5
+ }
6
+ export interface RHFAutocompleteProps<T> {
7
+ name: string;
8
+ options: Array<T>;
9
+ getOptionLabel: (option: T) => string;
10
+ isOptionEqualToValue: (option: T, value: T) => boolean;
11
+ skeletonProps?: SkeletonProps;
12
+ label: string;
13
+ }
@@ -74,7 +74,6 @@ function RHFAutocompleteAsync(props) {
74
74
  setOptions([initialValue]);
75
75
  }
76
76
  }, [initialValue, optionsLoaded]);
77
- console.log("***2022Render RHFAutocompleteAsync", loading, options, initialValue);
78
77
  const getOptionLabelLocal = (option) => {
79
78
  if (option === void 0 || option === null) {
80
79
  return "";
@@ -155,7 +154,6 @@ function RHFAutocompleteAsync(props) {
155
154
  loadingText: "",
156
155
  noOptionsText: getLabel("component_no_options"),
157
156
  renderInput: (params) => {
158
- console.log("TextField", params);
159
157
  return /* @__PURE__ */ jsx(TextField, {
160
158
  ...params,
161
159
  label,
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from '@mui/material';
3
+ import { RHFDateTimeProps } from './types';
4
+ export declare function RHFDateTime(props: RHFDateTimeProps & TextFieldProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SKTRHFWrapperTextField: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,9 @@
1
+ export interface SkeletonProps {
2
+ isSkeleton?: boolean;
3
+ width?: string | number;
4
+ height?: string | number;
5
+ }
6
+ export interface RHFDateTimeProps {
7
+ skeletonProps?: SkeletonProps;
8
+ name: string;
9
+ }
@@ -0,0 +1,72 @@
1
+ import { useFormContext, Controller } from "react-hook-form";
2
+ import { Skeleton, TextField } from "@mui/material";
3
+ import { styled } from "@mui/material/styles";
4
+ import { DateTimePicker } from "@mui/x-date-pickers";
5
+ import { jsx } from "react/jsx-runtime";
6
+ const SKTRHFWrapperTextField = styled("div")(({
7
+ theme
8
+ }) => ({
9
+ display: "flex",
10
+ width: "100%",
11
+ alignItems: "center",
12
+ border: `1px solid ${theme.palette.divider}`,
13
+ padding: "12px 14px",
14
+ borderRadius: theme.spacing(1)
15
+ }));
16
+ function RHFDateTime(props) {
17
+ const {
18
+ name,
19
+ autoComplete = "off",
20
+ skeletonProps: skeletoProps = {}
21
+ } = props;
22
+ const {
23
+ isSkeleton = false,
24
+ width = "100%",
25
+ height = 14
26
+ } = skeletoProps;
27
+ const {
28
+ control
29
+ } = useFormContext();
30
+ if (isSkeleton) {
31
+ return /* @__PURE__ */ jsx(SKTRHFWrapperTextField, {
32
+ children: /* @__PURE__ */ jsx(Skeleton, {
33
+ variant: "text",
34
+ width,
35
+ height
36
+ })
37
+ });
38
+ }
39
+ return /* @__PURE__ */ jsx(Controller, {
40
+ name,
41
+ control,
42
+ render: ({
43
+ field,
44
+ fieldState: {
45
+ error
46
+ }
47
+ }) => {
48
+ return /* @__PURE__ */ jsx(DateTimePicker, {
49
+ ampm: false,
50
+ inputFormat: "yyyy-MM-dd HH:mm:ss",
51
+ mask: "____-__-__ __:__:__",
52
+ label: "",
53
+ value: field.value,
54
+ onChange: (value) => {
55
+ if (!isNaN(value)) {
56
+ field.onChange(value);
57
+ } else {
58
+ field.onChange(void 0);
59
+ }
60
+ },
61
+ renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
62
+ autoComplete,
63
+ fullWidth: true,
64
+ error: !!error,
65
+ helperText: error?.message,
66
+ ...params
67
+ })
68
+ });
69
+ }
70
+ });
71
+ }
72
+ export { RHFDateTime as R };
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { TextFieldProps } from '@mui/material';
3
2
  import { RHFTextFieldProps } from './types';
4
- export declare function RHFTextField(props: RHFTextFieldProps & TextFieldProps): JSX.Element;
3
+ export declare const RHFTextField: import("react").ForwardRefExoticComponent<(Pick<RHFTextFieldProps & import("@mui/material").StandardTextFieldProps, "error" | "size" | "label" | "slot" | "select" | "style" | "title" | "color" | "translate" | "margin" | "sx" | "key" | "children" | "className" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "name" | "type" | "autoFocus" | "disabled" | "value" | "autoComplete" | "required" | "rows" | "fullWidth" | "focused" | "inputProps" | "inputRef" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "multiline" | "maxRows" | "minRows" | "SelectProps" | "skeletonProps"> | Pick<RHFTextFieldProps & import("@mui/material").FilledTextFieldProps, "error" | "size" | "label" | "slot" | "select" | "style" | "title" | "color" | "translate" | "margin" | "sx" | "key" | "children" | "className" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "name" | "type" | "autoFocus" | "disabled" | "value" | "autoComplete" | "required" | "rows" | "fullWidth" | "focused" | "inputProps" | "inputRef" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "multiline" | "maxRows" | "minRows" | "SelectProps" | "skeletonProps"> | Pick<RHFTextFieldProps & import("@mui/material").OutlinedTextFieldProps, "error" | "size" | "label" | "slot" | "select" | "style" | "title" | "color" | "translate" | "margin" | "sx" | "key" | "children" | "className" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "name" | "type" | "autoFocus" | "disabled" | "value" | "autoComplete" | "required" | "rows" | "fullWidth" | "focused" | "inputProps" | "inputRef" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "multiline" | "maxRows" | "minRows" | "SelectProps" | "skeletonProps">) & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,6 +1,7 @@
1
1
  import { useFormContext, Controller } from "react-hook-form";
2
2
  import { Skeleton, TextField } from "@mui/material";
3
3
  import { styled } from "@mui/material/styles";
4
+ import { forwardRef } from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  const SKTRHFWrapperTextField = styled("div")(({
6
7
  theme
@@ -12,7 +13,7 @@ const SKTRHFWrapperTextField = styled("div")(({
12
13
  padding: "12px 14px",
13
14
  borderRadius: theme.spacing(1)
14
15
  }));
15
- function RHFTextField(props) {
16
+ const RHFTextField = forwardRef((props, ref) => {
16
17
  const {
17
18
  name,
18
19
  autoComplete = "off",
@@ -20,7 +21,7 @@ function RHFTextField(props) {
20
21
  ...other
21
22
  } = props;
22
23
  const {
23
- isSkeleton = true,
24
+ isSkeleton = false,
24
25
  width = "100%",
25
26
  height = 14
26
27
  } = skeletoProps;
@@ -45,6 +46,7 @@ function RHFTextField(props) {
45
46
  error
46
47
  }
47
48
  }) => /* @__PURE__ */ jsx(TextField, {
49
+ inputRef: ref,
48
50
  autoComplete,
49
51
  ...field,
50
52
  fullWidth: true,
@@ -53,5 +55,6 @@ function RHFTextField(props) {
53
55
  ...other
54
56
  })
55
57
  });
56
- }
58
+ });
59
+ RHFTextField.displayName = "RHFTextField";
57
60
  export { RHFTextField as R };