@zydon/common 2.8.46 → 2.8.47
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.
- package/dist/components/DynamicDataView/index.js +1 -1
- package/dist/components/form/Address/index.d.ts +1 -0
- package/dist/components/form/DatePicker/index.d.ts +1 -0
- package/dist/components/form/DateRangePicker/index.d.ts +2 -1
- package/dist/components/form/DateRangePicker/index.js +4 -4
- package/dist/components/form/DateRangePicker/index.js.map +1 -1
- package/dist/components/form/DateTimePicker/index.d.ts +2 -1
- package/dist/components/form/DateTimePicker/index.js +3 -3
- package/dist/components/form/DateTimePicker/index.js.map +1 -1
- package/dist/components/form/Switch/index.d.ts +1 -0
- package/dist/types/addressProps.d.ts +2 -0
- package/dist/types/datePickerProps.d.ts +2 -1
- package/dist/types/dateRangePickerProps.d.ts +2 -0
- package/dist/types/dateTimePickerProps.d.ts +2 -0
- package/dist/types/size.d.ts +3 -0
- package/dist/types/size.js +2 -0
- package/dist/types/size.js.map +1 -0
- package/dist/types/switchProps.d.ts +2 -1
- package/dist/utils/buildExportPayload.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../../chunk-4P2L7UJA.js';
|
|
2
1
|
export { a as FilterOperator, b as SortType } from '../../chunk-VL4W63YA.js';
|
|
2
|
+
import '../../chunk-4P2L7UJA.js';
|
|
3
3
|
import { a as a$1 } from '../../chunk-LG2B5RFV.js';
|
|
4
4
|
import { d, c } from '../../chunk-N7IK5EUP.js';
|
|
5
5
|
import { h, a as a$3 } from '../../chunk-OF6623HG.js';
|
|
@@ -3,6 +3,7 @@ import { AddressProps } from '../../../types/addressProps.js';
|
|
|
3
3
|
import '@mui/material/Stack';
|
|
4
4
|
import '../../../types/baseField.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
|
+
import '../../../types/size.js';
|
|
6
7
|
|
|
7
8
|
declare const Address: ({ name, containerProps, required, rules, tabIndex, loading, disableTyping, onZipCodeChange, }: AddressProps) => react_jsx_runtime.JSX.Element;
|
|
8
9
|
|
|
@@ -5,6 +5,7 @@ import '@mui/x-date-pickers-pro';
|
|
|
5
5
|
import 'dayjs';
|
|
6
6
|
import '../../../types/baseField.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
|
+
import '../../../types/size.js';
|
|
8
9
|
|
|
9
10
|
declare const DatePicker: ({ name, id, rules, tabIndex, helperText, required, size, fullWidth, placeholder, ...other }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
@@ -5,7 +5,8 @@ import '@mui/x-date-pickers-pro';
|
|
|
5
5
|
import 'dayjs';
|
|
6
6
|
import '../../../types/baseField.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
|
+
import '../../../types/size.js';
|
|
8
9
|
|
|
9
|
-
declare const DateRangePicker: ({ name, label, rules, helperText, required, ...other }: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare const DateRangePicker: ({ name, label, rules, helperText, required, size, ...other }: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
export { DateRangePicker as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import k from '@mui/material/FormHelperText';
|
|
3
|
+
import x from '@mui/material/Stack';
|
|
4
4
|
import { DateRangePicker } from '@mui/x-date-pickers-pro';
|
|
5
5
|
import i from 'dayjs';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var F=({name:e,label:s,rules:D,helperText:l,required:d,size:f,...r})=>{let{control:c,setError:p}=useFormContext();return jsx(Controller,{name:e,control:c,rules:D,render:({field:{value:o,onChange:g},fieldState:{error:a}})=>jsxs(x,{children:[jsx(DateRangePicker,{"data-intercom-target":e,...r,format:"DD/MM/YYYY",value:[o?.startDate?i(o.startDate):null,o?.endDate?i(o.endDate):null],onChange:t=>{let m={startDate:t[0]?t[0].toDate():null,endDate:t[1]?t[1].toDate():null};g(m),r.onChange&&r.onChange(m);},onError:t=>{p(e,{message:t[0]||t[1]||void 0});},slotProps:{textField:({position:t})=>({...r.slotProps?.textField,required:d,error:!!a,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:t==="start"?`${s} (Dt. In\xEDcio)`:`${s} (Dt. Fim)`,name:t==="start"?`${e}Start`:`${e}End`,size:f})},sx:{width:1}}),(a?.message||l)&&jsx(k,{error:!!a,sx:{mx:"14px"},children:a?.message||l})]})})},E=F;
|
|
9
9
|
|
|
10
|
-
export {
|
|
10
|
+
export { E as default };
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/DateRangePicker/index.tsx"],"names":["Controller","useFormContext","FormHelperText","Stack","MuiDateRangePicker","dayjs","jsx","jsxs","DateRangePicker","name","label","rules","helperText","required","other","control","setError","value","onChange","error","v","newValue","newError","position","DateRangePicker_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAoB,+BAC3B,OAAOC,MAAW,sBAClB,OAAS,mBAAmBC,MAA0B,0BACtD,OAAOC,MAAW,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/DateRangePicker/index.tsx"],"names":["Controller","useFormContext","FormHelperText","Stack","MuiDateRangePicker","dayjs","jsx","jsxs","DateRangePicker","name","label","rules","helperText","required","size","other","control","setError","value","onChange","error","v","newValue","newError","position","DateRangePicker_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAOC,MAAoB,+BAC3B,OAAOC,MAAW,sBAClB,OAAS,mBAAmBC,MAA0B,0BACtD,OAAOC,MAAW,QAsBR,OACE,OAAAC,EADF,QAAAC,MAAA,oBAlBV,IAAMC,EAAkB,CAAC,CACvB,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,SAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAA4B,CAC1B,GAAM,CAAE,QAAAC,EAAS,SAAAC,CAAS,EAAIhB,EAAe,EAE7C,OACEK,EAACN,EAAA,CACC,KAAMS,EACN,QAASO,EACT,MAAOL,EACP,OAAQ,CAAC,CAAE,MAAO,CAAE,MAAAO,EAAO,SAAAC,CAAS,EAAG,WAAY,CAAE,MAAAC,CAAM,CAAE,IAEzDb,EAACJ,EAAA,CACC,UAAAG,EAACF,EAAA,CACC,uBAAsBK,EACrB,GAAGM,EACJ,OAAO,aACP,MAAO,CACLG,GAAO,UAAYb,EAAMa,EAAM,SAAS,EAAI,KAC5CA,GAAO,QAAUb,EAAMa,EAAM,OAAO,EAAI,IAC1C,EACA,SAAUG,GAAK,CACb,IAAMC,EAAW,CACf,UAAWD,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAE,OAAO,EAAI,KAClC,QAASA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAE,OAAO,EAAI,IAClC,EACAF,EAASG,CAAQ,EACjBP,EAAM,UAAYA,EAAM,SAASO,CAAQ,CAC3C,EACA,QAASC,GAAY,CACnBN,EAASR,EAAM,CACb,QAASc,EAAS,CAAC,GAAKA,EAAS,CAAC,GAAK,MACzC,CAAC,CACH,EACA,UAAW,CACT,UAAW,CAAC,CAAE,SAAAC,CAAS,KAAO,CAC5B,GAAGT,EAAM,WAAW,UACpB,SAAAF,EACA,MAAO,CAAC,CAACO,EACT,aAAc,MACd,WAAY,QACZ,UAAW,GACX,MACEI,IAAa,QACT,GAAGd,oBACH,GAAGA,cACT,KAAMc,IAAa,QAAU,GAAGf,SAAc,GAAGA,OACjD,KAAAK,CACF,EACF,EACA,GAAI,CACF,MAAO,CACT,EACF,GACEM,GAAO,SAAWR,IAClBN,EAACJ,EAAA,CAAe,MAAO,CAAC,CAACkB,EAAO,GAAI,CAAE,GAAI,MAAO,EAC9C,SAAAA,GAAO,SAAWR,EACrB,GAEJ,EAGN,CAEJ,EAEOa,EAAQjB","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport Stack from '@mui/material/Stack';\nimport { DateRangePicker as MuiDateRangePicker } from '@mui/x-date-pickers-pro';\nimport dayjs from 'dayjs';\n\nimport { DateRangePickerProps } from 'types/dateRangePickerProps';\n\nconst DateRangePicker = ({\n name,\n label,\n rules,\n helperText,\n required,\n size,\n ...other\n}: DateRangePickerProps) => {\n const { control, setError } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { value, onChange }, fieldState: { error } }) => {\n return (\n <Stack>\n <MuiDateRangePicker\n data-intercom-target={name}\n {...other}\n format=\"DD/MM/YYYY\"\n value={[\n value?.startDate ? dayjs(value.startDate) : null,\n value?.endDate ? dayjs(value.endDate) : null,\n ]}\n onChange={v => {\n const newValue = {\n startDate: v[0] ? v[0].toDate() : null,\n endDate: v[1] ? v[1].toDate() : null,\n };\n onChange(newValue);\n other.onChange && other.onChange(newValue);\n }}\n onError={newError => {\n setError(name, {\n message: newError[0] || newError[1] || undefined,\n });\n }}\n slotProps={{\n textField: ({ position }) => ({\n ...other.slotProps?.textField,\n required,\n error: !!error,\n autoComplete: 'off',\n spellCheck: 'false',\n fullWidth: true,\n label:\n position === 'start'\n ? `${label} (Dt. Início)`\n : `${label} (Dt. Fim)`,\n name: position === 'start' ? `${name}Start` : `${name}End`,\n size,\n }),\n }}\n sx={{\n width: 1,\n }}\n />\n {(error?.message || helperText) && (\n <FormHelperText error={!!error} sx={{ mx: '14px' }}>\n {error?.message || helperText}\n </FormHelperText>\n )}\n </Stack>\n );\n }}\n />\n );\n};\n\nexport default DateRangePicker;\n"]}
|
|
@@ -5,7 +5,8 @@ import '@mui/x-date-pickers-pro';
|
|
|
5
5
|
import 'dayjs';
|
|
6
6
|
import '../../../types/baseField.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
|
+
import '../../../types/size.js';
|
|
8
9
|
|
|
9
|
-
declare const DateTimePicker: ({ name, rules, tabIndex, helperText, required, ...other }: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare const DateTimePicker: ({ name, rules, tabIndex, helperText, required, size, ...other }: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
export { DateTimePicker as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
2
2
|
import { DateTimePicker } from '@mui/x-date-pickers-pro';
|
|
3
|
-
import
|
|
3
|
+
import C from 'dayjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var T=({name:t,rules:n,tabIndex:m,helperText:s,required:u,size:p,...e})=>{let{control:c}=useFormContext();return jsx(Controller,{name:t,control:c,rules:n,render:({field:{ref:f,onChange:P,...o},fieldState:{error:r}})=>jsx(DateTimePicker,{format:"DD/MM/YYYY HH:mm",inputRef:f,...o,"data-intercom-target":t,...e,value:o.value?C(o.value):null,onChange:l=>{let a=l?l.toDate():null;P(a),e.onChange&&e.onChange(a);},slotProps:{textField:{...e.slotProps?.textField,name:t,required:u,error:!!r,helperText:r?.message||s,autoComplete:"off",spellCheck:"false",fullWidth:!0,size:p},openPickerButton:{tabIndex:m}}})})},h=T;
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { h as default };
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/form/DateTimePicker/index.tsx"],"names":["Controller","useFormContext","MuiDateTimePicker","dayjs","jsx","DateTimePicker","name","rules","tabIndex","helperText","required","other","control","ref","onChange","field","error","v","newValue","DateTimePicker_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAS,kBAAkBC,MAAyB,0BACpD,OAAOC,MAAW,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/form/DateTimePicker/index.tsx"],"names":["Controller","useFormContext","MuiDateTimePicker","dayjs","jsx","DateTimePicker","name","rules","tabIndex","helperText","required","size","other","control","ref","onChange","field","error","v","newValue","DateTimePicker_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,kBAAAC,MAAsB,kBAC3C,OAAS,kBAAkBC,MAAyB,0BACpD,OAAOC,MAAW,QAwBV,cAAAC,MAAA,oBApBR,IAAMC,EAAiB,CAAC,CACtB,KAAAC,EACA,MAAAC,EACA,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAA2B,CACzB,GAAM,CAAE,QAAAC,CAAQ,EAAIZ,EAAe,EAEnC,OACEG,EAACJ,EAAA,CACC,KAAMM,EACN,QAASO,EACT,MAAON,EACP,OAAQ,CAAC,CACP,MAAO,CAAE,IAAAO,EAAK,SAAAC,EAAU,GAAGC,CAAM,EACjC,WAAY,CAAE,MAAAC,CAAM,CACtB,IACEb,EAACF,EAAA,CACC,OAAO,mBACP,SAAUY,EACT,GAAGE,EACJ,uBAAsBV,EACrB,GAAGM,EACJ,MAAOI,EAAM,MAAQb,EAAMa,EAAM,KAAK,EAAI,KAC1C,SAAUE,GAAK,CACb,IAAMC,EAAWD,EAAIA,EAAE,OAAO,EAAI,KAClCH,EAASI,CAAQ,EACjBP,EAAM,UAAYA,EAAM,SAASO,CAAQ,CAC3C,EACA,UAAW,CACT,UAAW,CACT,GAAGP,EAAM,WAAW,UACpB,KAAAN,EACA,SAAAI,EACA,MAAO,CAAC,CAACO,EACT,WAAYA,GAAO,SAAWR,EAC9B,aAAc,MACd,WAAY,QACZ,UAAW,GACX,KAAAE,CACF,EACA,iBAAkB,CAChB,SAAAH,CACF,CACF,EACF,EAEJ,CAEJ,EAEOY,EAAQf","sourcesContent":["import { Controller, useFormContext } from 'react-hook-form';\nimport { DateTimePicker as MuiDateTimePicker } from '@mui/x-date-pickers-pro';\nimport dayjs from 'dayjs';\n\nimport { DateTimePickerProps } from 'types/dateTimePickerProps';\n\nconst DateTimePicker = ({\n name,\n rules,\n tabIndex,\n helperText,\n required,\n size,\n ...other\n}: DateTimePickerProps) => {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({\n field: { ref, onChange, ...field },\n fieldState: { error },\n }) => (\n <MuiDateTimePicker\n format=\"DD/MM/YYYY HH:mm\"\n inputRef={ref}\n {...field}\n data-intercom-target={name}\n {...other}\n value={field.value ? dayjs(field.value) : null}\n onChange={v => {\n const newValue = v ? v.toDate() : null;\n onChange(newValue);\n other.onChange && other.onChange(newValue);\n }}\n slotProps={{\n textField: {\n ...other.slotProps?.textField,\n name,\n required,\n error: !!error,\n helperText: error?.message || helperText,\n autoComplete: 'off',\n spellCheck: 'false',\n fullWidth: true,\n size,\n },\n openPickerButton: {\n tabIndex,\n },\n }}\n />\n )}\n />\n );\n};\n\nexport default DateTimePicker;\n"]}
|
|
@@ -4,6 +4,7 @@ import '@mui/material/FormControlLabel';
|
|
|
4
4
|
import '@mui/material/Switch';
|
|
5
5
|
import '../../../types/baseField.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
|
+
import '../../../types/size.js';
|
|
7
8
|
|
|
8
9
|
declare const Switch: ({ name, helperText, rules, onChange, tabIndex, size, label, sx, ...other }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
9
10
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StackProps } from '@mui/material/Stack';
|
|
2
2
|
import { BaseField } from './baseField.js';
|
|
3
|
+
import { Size } from './size.js';
|
|
3
4
|
import 'react-hook-form';
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
@@ -9,6 +10,7 @@ interface Props {
|
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
disableTyping?: boolean;
|
|
11
12
|
onZipCodeChange?: (zipCode: string) => void;
|
|
13
|
+
size?: Size;
|
|
12
14
|
}
|
|
13
15
|
type AddressProps = BaseField<Props>;
|
|
14
16
|
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
import { BaseField } from './baseField.js';
|
|
5
|
+
import { Size } from './size.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
|
|
7
8
|
type DatePickerProps = BaseField<Omit<DatePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
|
|
@@ -11,7 +12,7 @@ type DatePickerProps = BaseField<Omit<DatePickerProps$1<Dayjs>, 'value' | 'onCha
|
|
|
11
12
|
required?: boolean;
|
|
12
13
|
value?: Date | null | undefined;
|
|
13
14
|
onChange?(value: Date | null | undefined): void;
|
|
14
|
-
size?:
|
|
15
|
+
size?: Size;
|
|
15
16
|
fullWidth?: boolean;
|
|
16
17
|
placeholder?: string;
|
|
17
18
|
};
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DateRangePickerProps as DateRangePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
import { BaseField } from './baseField.js';
|
|
5
|
+
import { Size } from './size.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
|
|
7
8
|
type DateRange = {
|
|
@@ -13,6 +14,7 @@ type DateRangePickerProps = BaseField<Omit<DateRangePickerProps$1<Dayjs>, 'value
|
|
|
13
14
|
onChange?(value?: DateRange): void;
|
|
14
15
|
helperText?: ReactNode;
|
|
15
16
|
required?: boolean;
|
|
17
|
+
size?: Size;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
export { DateRangePickerProps };
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
4
|
import { BaseField } from './baseField.js';
|
|
5
|
+
import { Size } from './size.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
|
|
7
8
|
type DateTimePickerProps = BaseField<Omit<DateTimePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
|
|
@@ -10,6 +11,7 @@ type DateTimePickerProps = BaseField<Omit<DateTimePickerProps$1<Dayjs>, 'value'
|
|
|
10
11
|
required?: boolean;
|
|
11
12
|
value?: Date | null | undefined;
|
|
12
13
|
onChange?(value: Date | null | undefined): void;
|
|
14
|
+
size?: Size;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export { DateTimePickerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
2
2
|
import { SwitchProps as SwitchProps$1 } from '@mui/material/Switch';
|
|
3
3
|
import { BaseField } from './baseField.js';
|
|
4
|
+
import { Size } from './size.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
7
|
interface Props extends Omit<FormControlLabelProps, 'control'> {
|
|
7
8
|
helperText?: React.ReactNode;
|
|
8
|
-
size?:
|
|
9
|
+
size?: Size;
|
|
9
10
|
sx?: SwitchProps$1['sx'];
|
|
10
11
|
}
|
|
11
12
|
type SwitchProps = BaseField<Props>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../chunk-4P2L7UJA.js';
|
|
2
1
|
import '../chunk-VL4W63YA.js';
|
|
2
|
+
import '../chunk-4P2L7UJA.js';
|
|
3
3
|
|
|
4
4
|
var u=(t,e)=>{if(!(!t?.fields||!e))return t.fields.find(r=>r.name===e||r.filter_field_name===e)},i=(t,e)=>{if(!e)return;let r=u(t,e);return t?.fields?r?.filter_field_name||r?.name:e},f=(t,e)=>{if(!(!t?.fields||!e||e.length===0))return e.filter(r=>r!=="ACTIONS")},l=(t,e)=>{let r=e?.trim();if(!r)return;let n=i(t,t?.description_field_name)||i(t,"name");if(n)return {operator:"AND",groups:[{operator:"AND",conditionals:[{fieldName:n,conditional:"LIKE",value:[r]}]}]}},p=(t,e,r)=>{if(!e||!r)return;let n=i(t,e);if(n)return {fieldName:n,sortType:r==="desc"?"DESC":"ASC"}},c=({metadata:t,visibleFieldNames:e,search:r,sort:n,dir:s})=>{let o=f(t,e),d=l(t,r),a=p(t,n,s);return {...o&&{criteria:o},...d&&{filter:d},...a&&{sort:a}}},y=c;
|
|
5
5
|
|