@undefine-ui/design-system 3.5.1 → 3.6.0
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/index.cjs +750 -206
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -3
- package/dist/index.d.ts +169 -3
- package/dist/index.js +734 -190
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,6 +51,8 @@ __export(index_exports, {
|
|
|
51
51
|
FilterDropdown: () => FilterDropdown,
|
|
52
52
|
FilterList: () => FilterList,
|
|
53
53
|
Form: () => Form,
|
|
54
|
+
GooglePlacesAutocomplete: () => GooglePlacesAutocomplete,
|
|
55
|
+
GooglePlacesProvider: () => GooglePlacesProvider,
|
|
54
56
|
HelpCircle: () => HelpCircle,
|
|
55
57
|
Icon: () => Icon,
|
|
56
58
|
Image: () => Image,
|
|
@@ -77,10 +79,12 @@ __export(index_exports, {
|
|
|
77
79
|
RHFDatePicker: () => RHFDatePicker,
|
|
78
80
|
RHFDateRangePicker: () => RHFDateRangePicker,
|
|
79
81
|
RHFDateTimePicker: () => RHFDateTimePicker,
|
|
82
|
+
RHFGooglePlacesAutocomplete: () => RHFGooglePlacesAutocomplete,
|
|
80
83
|
RHFMultiCheckbox: () => RHFMultiCheckbox,
|
|
81
84
|
RHFMultiSwitch: () => RHFMultiSwitch,
|
|
82
85
|
RHFOTPInput: () => RHFOTPInput,
|
|
83
86
|
RHFRadioGroup: () => RHFRadioGroup,
|
|
87
|
+
RHFSelect: () => RHFSelect,
|
|
84
88
|
RHFSwitch: () => RHFSwitch,
|
|
85
89
|
RHFTextField: () => RHFTextField,
|
|
86
90
|
RHFTimePicker: () => RHFTimePicker,
|
|
@@ -202,6 +206,9 @@ __export(index_exports, {
|
|
|
202
206
|
useCountdownDate: () => useCountdownDate,
|
|
203
207
|
useCountdownSeconds: () => useCountdownSeconds,
|
|
204
208
|
useEventListener: () => useEventListener,
|
|
209
|
+
useGooglePlacesAutocomplete: () => useGooglePlacesAutocomplete,
|
|
210
|
+
useGooglePlacesContext: () => useGooglePlacesContext,
|
|
211
|
+
useGooglePlacesLoaded: () => useGooglePlacesLoaded,
|
|
205
212
|
useLocalStorage: () => useLocalStorage,
|
|
206
213
|
usePopover: () => usePopover,
|
|
207
214
|
useResponsive: () => useResponsive,
|
|
@@ -1840,7 +1847,10 @@ var MuiList = {
|
|
|
1840
1847
|
styleOverrides: {
|
|
1841
1848
|
root: ({ theme }) => ({
|
|
1842
1849
|
'&[role="listbox"]': {
|
|
1843
|
-
padding: theme.spacing(0, 1)
|
|
1850
|
+
// padding: theme.spacing(0, 1)
|
|
1851
|
+
"& .MuiMenuItem-root": {
|
|
1852
|
+
margin: theme.spacing(0.5, 1)
|
|
1853
|
+
}
|
|
1844
1854
|
}
|
|
1845
1855
|
})
|
|
1846
1856
|
}
|
|
@@ -6354,7 +6364,7 @@ import { listItemIconClasses } from "@mui/material/ListItemIcon";
|
|
|
6354
6364
|
import { listItemTextClasses } from "@mui/material/ListItemText";
|
|
6355
6365
|
import { circularProgressClasses } from "@mui/material/CircularProgress";
|
|
6356
6366
|
import { formControlLabelClasses } from "@mui/material/FormControlLabel";
|
|
6357
|
-
import
|
|
6367
|
+
import SvgIcon3, { svgIconClasses as svgIconClasses2 } from "@mui/material/SvgIcon";
|
|
6358
6368
|
|
|
6359
6369
|
// src/components/index.ts
|
|
6360
6370
|
var components_exports2 = {};
|
|
@@ -6391,6 +6401,8 @@ __export(components_exports2, {
|
|
|
6391
6401
|
FilterDropdown: () => FilterDropdown,
|
|
6392
6402
|
FilterList: () => FilterList,
|
|
6393
6403
|
Form: () => Form,
|
|
6404
|
+
GooglePlacesAutocomplete: () => GooglePlacesAutocomplete,
|
|
6405
|
+
GooglePlacesProvider: () => GooglePlacesProvider,
|
|
6394
6406
|
HelpCircle: () => HelpCircle,
|
|
6395
6407
|
Icon: () => Icon,
|
|
6396
6408
|
Image: () => Image,
|
|
@@ -6415,10 +6427,12 @@ __export(components_exports2, {
|
|
|
6415
6427
|
RHFDatePicker: () => RHFDatePicker,
|
|
6416
6428
|
RHFDateRangePicker: () => RHFDateRangePicker,
|
|
6417
6429
|
RHFDateTimePicker: () => RHFDateTimePicker,
|
|
6430
|
+
RHFGooglePlacesAutocomplete: () => RHFGooglePlacesAutocomplete,
|
|
6418
6431
|
RHFMultiCheckbox: () => RHFMultiCheckbox,
|
|
6419
6432
|
RHFMultiSwitch: () => RHFMultiSwitch,
|
|
6420
6433
|
RHFOTPInput: () => RHFOTPInput,
|
|
6421
6434
|
RHFRadioGroup: () => RHFRadioGroup,
|
|
6435
|
+
RHFSelect: () => RHFSelect,
|
|
6422
6436
|
RHFSwitch: () => RHFSwitch,
|
|
6423
6437
|
RHFTextField: () => RHFTextField,
|
|
6424
6438
|
RHFTimePicker: () => RHFTimePicker,
|
|
@@ -6458,7 +6472,10 @@ __export(components_exports2, {
|
|
|
6458
6472
|
feedbackDialogClasses: () => feedbackDialogClasses,
|
|
6459
6473
|
getDateRangeFromPreset: () => getDateRangeFromPreset,
|
|
6460
6474
|
iconClasses: () => iconClasses,
|
|
6461
|
-
toolbarClasses: () => toolbarClasses
|
|
6475
|
+
toolbarClasses: () => toolbarClasses,
|
|
6476
|
+
useGooglePlacesAutocomplete: () => useGooglePlacesAutocomplete,
|
|
6477
|
+
useGooglePlacesContext: () => useGooglePlacesContext,
|
|
6478
|
+
useGooglePlacesLoaded: () => useGooglePlacesLoaded
|
|
6462
6479
|
});
|
|
6463
6480
|
|
|
6464
6481
|
// src/components/Logo/index.tsx
|
|
@@ -9176,8 +9193,8 @@ var RHFSwitch = ({
|
|
|
9176
9193
|
}
|
|
9177
9194
|
),
|
|
9178
9195
|
label: /* @__PURE__ */ jsxs56(Stack6, { children: [
|
|
9179
|
-
/* @__PURE__ */ jsx88(Typography10, { variant: "bodyMd", color: "
|
|
9180
|
-
description && /* @__PURE__ */ jsx88(Typography10, { variant: "body2", color: "
|
|
9196
|
+
/* @__PURE__ */ jsx88(Typography10, { variant: "bodyMd", color: "text.header", fontWeight: 500, children: label }),
|
|
9197
|
+
description && /* @__PURE__ */ jsx88(Typography10, { variant: "body2", color: "text.body", children: description })
|
|
9181
9198
|
] }),
|
|
9182
9199
|
sx: {
|
|
9183
9200
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -9319,8 +9336,53 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
9319
9336
|
);
|
|
9320
9337
|
};
|
|
9321
9338
|
|
|
9322
|
-
// src/components/HookForm/
|
|
9339
|
+
// src/components/HookForm/RHFSelect.tsx
|
|
9323
9340
|
import { Controller as Controller3, useFormContext as useFormContext3 } from "react-hook-form";
|
|
9341
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
9342
|
+
import TextField2 from "@mui/material/TextField";
|
|
9343
|
+
import { jsx as jsx90, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9344
|
+
var RHFSelect = ({
|
|
9345
|
+
name,
|
|
9346
|
+
options,
|
|
9347
|
+
helperText,
|
|
9348
|
+
placeholder,
|
|
9349
|
+
slotProps,
|
|
9350
|
+
...rest
|
|
9351
|
+
}) => {
|
|
9352
|
+
const { control } = useFormContext3();
|
|
9353
|
+
return /* @__PURE__ */ jsx90(
|
|
9354
|
+
Controller3,
|
|
9355
|
+
{
|
|
9356
|
+
name,
|
|
9357
|
+
control,
|
|
9358
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs57(
|
|
9359
|
+
TextField2,
|
|
9360
|
+
{
|
|
9361
|
+
...field,
|
|
9362
|
+
select: true,
|
|
9363
|
+
fullWidth: true,
|
|
9364
|
+
error: !!error2,
|
|
9365
|
+
helperText: error2?.message ?? helperText,
|
|
9366
|
+
slotProps: {
|
|
9367
|
+
...slotProps,
|
|
9368
|
+
select: {
|
|
9369
|
+
displayEmpty: !!placeholder,
|
|
9370
|
+
...slotProps?.select
|
|
9371
|
+
}
|
|
9372
|
+
},
|
|
9373
|
+
...rest,
|
|
9374
|
+
children: [
|
|
9375
|
+
placeholder && /* @__PURE__ */ jsx90(MenuItem, { value: "", disabled: true, sx: { display: "none" }, children: placeholder }),
|
|
9376
|
+
options.map((option) => /* @__PURE__ */ jsx90(MenuItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value))
|
|
9377
|
+
]
|
|
9378
|
+
}
|
|
9379
|
+
)
|
|
9380
|
+
}
|
|
9381
|
+
);
|
|
9382
|
+
};
|
|
9383
|
+
|
|
9384
|
+
// src/components/HookForm/RHFOTPInput.tsx
|
|
9385
|
+
import { Controller as Controller4, useFormContext as useFormContext4 } from "react-hook-form";
|
|
9324
9386
|
|
|
9325
9387
|
// src/components/OTPInput/index.tsx
|
|
9326
9388
|
import { useRef as useRef6, useState as useState15 } from "react";
|
|
@@ -9328,8 +9390,8 @@ import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
|
9328
9390
|
import Box21 from "@mui/material/Box";
|
|
9329
9391
|
import FormHelperText3 from "@mui/material/FormHelperText";
|
|
9330
9392
|
import { inputBaseClasses as inputBaseClasses2 } from "@mui/material/InputBase";
|
|
9331
|
-
import
|
|
9332
|
-
import { Fragment as Fragment2, jsx as
|
|
9393
|
+
import TextField3 from "@mui/material/TextField";
|
|
9394
|
+
import { Fragment as Fragment2, jsx as jsx91, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9333
9395
|
var OTPInput = (props) => {
|
|
9334
9396
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
9335
9397
|
const theme = useTheme3();
|
|
@@ -9397,8 +9459,8 @@ var OTPInput = (props) => {
|
|
|
9397
9459
|
onComplete?.(newOtp.join(""));
|
|
9398
9460
|
}
|
|
9399
9461
|
};
|
|
9400
|
-
return /* @__PURE__ */
|
|
9401
|
-
/* @__PURE__ */
|
|
9462
|
+
return /* @__PURE__ */ jsxs58(Fragment2, { children: [
|
|
9463
|
+
/* @__PURE__ */ jsx91(Box21, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx91(
|
|
9402
9464
|
Box21,
|
|
9403
9465
|
{
|
|
9404
9466
|
display: "flex",
|
|
@@ -9408,8 +9470,8 @@ var OTPInput = (props) => {
|
|
|
9408
9470
|
mr: 1.5
|
|
9409
9471
|
}
|
|
9410
9472
|
},
|
|
9411
|
-
children: /* @__PURE__ */
|
|
9412
|
-
|
|
9473
|
+
children: /* @__PURE__ */ jsx91(
|
|
9474
|
+
TextField3,
|
|
9413
9475
|
{
|
|
9414
9476
|
size: "medium",
|
|
9415
9477
|
value: otp[index],
|
|
@@ -9491,21 +9553,21 @@ var OTPInput = (props) => {
|
|
|
9491
9553
|
},
|
|
9492
9554
|
index
|
|
9493
9555
|
)) }),
|
|
9494
|
-
error2 && /* @__PURE__ */
|
|
9556
|
+
error2 && /* @__PURE__ */ jsx91(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
|
|
9495
9557
|
] });
|
|
9496
9558
|
};
|
|
9497
9559
|
var OTPInput_default = OTPInput;
|
|
9498
9560
|
|
|
9499
9561
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
9500
|
-
import { jsx as
|
|
9562
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
9501
9563
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
9502
|
-
const { control, setValue } =
|
|
9503
|
-
return /* @__PURE__ */
|
|
9504
|
-
|
|
9564
|
+
const { control, setValue } = useFormContext4();
|
|
9565
|
+
return /* @__PURE__ */ jsx92(
|
|
9566
|
+
Controller4,
|
|
9505
9567
|
{
|
|
9506
9568
|
name,
|
|
9507
9569
|
control,
|
|
9508
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9570
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx92(
|
|
9509
9571
|
OTPInput_default,
|
|
9510
9572
|
{
|
|
9511
9573
|
length,
|
|
@@ -9521,21 +9583,21 @@ var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
|
9521
9583
|
};
|
|
9522
9584
|
|
|
9523
9585
|
// src/components/HookForm/RHFTextField.tsx
|
|
9524
|
-
import { Controller as
|
|
9586
|
+
import { Controller as Controller5, useFormContext as useFormContext5 } from "react-hook-form";
|
|
9525
9587
|
import IconButton5 from "@mui/material/IconButton";
|
|
9526
9588
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
9527
|
-
import
|
|
9528
|
-
import { jsx as
|
|
9589
|
+
import TextField4 from "@mui/material/TextField";
|
|
9590
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
9529
9591
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
9530
|
-
const { control } =
|
|
9592
|
+
const { control } = useFormContext5();
|
|
9531
9593
|
const passwordVisibility = useBoolean();
|
|
9532
|
-
return /* @__PURE__ */
|
|
9533
|
-
|
|
9594
|
+
return /* @__PURE__ */ jsx93(
|
|
9595
|
+
Controller5,
|
|
9534
9596
|
{
|
|
9535
9597
|
name,
|
|
9536
9598
|
control,
|
|
9537
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9538
|
-
|
|
9599
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx93(
|
|
9600
|
+
TextField4,
|
|
9539
9601
|
{
|
|
9540
9602
|
...field,
|
|
9541
9603
|
fullWidth: true,
|
|
@@ -9555,7 +9617,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
9555
9617
|
input: {
|
|
9556
9618
|
...slotProps?.input,
|
|
9557
9619
|
...type === "password" && {
|
|
9558
|
-
endAdornment: /* @__PURE__ */
|
|
9620
|
+
endAdornment: /* @__PURE__ */ jsx93(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx93(IconButton5, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx93(
|
|
9559
9621
|
Icon,
|
|
9560
9622
|
{
|
|
9561
9623
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -9573,7 +9635,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
9573
9635
|
};
|
|
9574
9636
|
|
|
9575
9637
|
// src/components/HookForm/RHFRadioGroup.tsx
|
|
9576
|
-
import { Controller as
|
|
9638
|
+
import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
|
|
9577
9639
|
import Stack7 from "@mui/material/Stack";
|
|
9578
9640
|
import Typography11 from "@mui/material/Typography";
|
|
9579
9641
|
import Radio3 from "@mui/material/Radio";
|
|
@@ -9582,7 +9644,7 @@ import FormLabel2 from "@mui/material/FormLabel";
|
|
|
9582
9644
|
import RadioGroup3 from "@mui/material/RadioGroup";
|
|
9583
9645
|
import FormControl2 from "@mui/material/FormControl";
|
|
9584
9646
|
import FormHelperText4 from "@mui/material/FormHelperText";
|
|
9585
|
-
import { jsx as
|
|
9647
|
+
import { jsx as jsx94, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9586
9648
|
var RHFRadioGroup = ({
|
|
9587
9649
|
name,
|
|
9588
9650
|
label,
|
|
@@ -9591,16 +9653,16 @@ var RHFRadioGroup = ({
|
|
|
9591
9653
|
slotProps,
|
|
9592
9654
|
...other
|
|
9593
9655
|
}) => {
|
|
9594
|
-
const { control } =
|
|
9656
|
+
const { control } = useFormContext6();
|
|
9595
9657
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
9596
9658
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
9597
|
-
return /* @__PURE__ */
|
|
9598
|
-
|
|
9659
|
+
return /* @__PURE__ */ jsx94(
|
|
9660
|
+
Controller6,
|
|
9599
9661
|
{
|
|
9600
9662
|
name,
|
|
9601
9663
|
control,
|
|
9602
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9603
|
-
label && /* @__PURE__ */
|
|
9664
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs59(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
9665
|
+
label && /* @__PURE__ */ jsx94(
|
|
9604
9666
|
FormLabel2,
|
|
9605
9667
|
{
|
|
9606
9668
|
id: labelledby,
|
|
@@ -9610,11 +9672,11 @@ var RHFRadioGroup = ({
|
|
|
9610
9672
|
children: label
|
|
9611
9673
|
}
|
|
9612
9674
|
),
|
|
9613
|
-
/* @__PURE__ */
|
|
9675
|
+
/* @__PURE__ */ jsx94(RadioGroup3, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx94(
|
|
9614
9676
|
FormControlLabel4,
|
|
9615
9677
|
{
|
|
9616
9678
|
value: option.value,
|
|
9617
|
-
control: /* @__PURE__ */
|
|
9679
|
+
control: /* @__PURE__ */ jsx94(
|
|
9618
9680
|
Radio3,
|
|
9619
9681
|
{
|
|
9620
9682
|
...slotProps?.radio,
|
|
@@ -9626,9 +9688,9 @@ var RHFRadioGroup = ({
|
|
|
9626
9688
|
}
|
|
9627
9689
|
}
|
|
9628
9690
|
),
|
|
9629
|
-
label: /* @__PURE__ */
|
|
9630
|
-
/* @__PURE__ */
|
|
9631
|
-
option?.description && /* @__PURE__ */
|
|
9691
|
+
label: /* @__PURE__ */ jsxs59(Stack7, { children: [
|
|
9692
|
+
/* @__PURE__ */ jsx94(Typography11, { variant: "bodyMd", color: "text.header", fontWeight: 500, children: option.label }),
|
|
9693
|
+
option?.description && /* @__PURE__ */ jsx94(Typography11, { variant: "body2", color: "text.body", children: option?.description })
|
|
9632
9694
|
] }),
|
|
9633
9695
|
sx: {
|
|
9634
9696
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -9636,17 +9698,17 @@ var RHFRadioGroup = ({
|
|
|
9636
9698
|
},
|
|
9637
9699
|
option.value
|
|
9638
9700
|
)) }),
|
|
9639
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
9701
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx94(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
9640
9702
|
] })
|
|
9641
9703
|
}
|
|
9642
9704
|
);
|
|
9643
9705
|
};
|
|
9644
9706
|
|
|
9645
9707
|
// src/components/HookForm/RHFAutocomplete.tsx
|
|
9646
|
-
import { Controller as
|
|
9647
|
-
import
|
|
9708
|
+
import { Controller as Controller7, useFormContext as useFormContext7 } from "react-hook-form";
|
|
9709
|
+
import TextField5 from "@mui/material/TextField";
|
|
9648
9710
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
9649
|
-
import { jsx as
|
|
9711
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
9650
9712
|
var RHFAutocomplete = ({
|
|
9651
9713
|
name,
|
|
9652
9714
|
label,
|
|
@@ -9656,13 +9718,13 @@ var RHFAutocomplete = ({
|
|
|
9656
9718
|
handleChange,
|
|
9657
9719
|
...other
|
|
9658
9720
|
}) => {
|
|
9659
|
-
const { control, setValue } =
|
|
9660
|
-
return /* @__PURE__ */
|
|
9661
|
-
|
|
9721
|
+
const { control, setValue } = useFormContext7();
|
|
9722
|
+
return /* @__PURE__ */ jsx95(
|
|
9723
|
+
Controller7,
|
|
9662
9724
|
{
|
|
9663
9725
|
name,
|
|
9664
9726
|
control,
|
|
9665
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9727
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx95(
|
|
9666
9728
|
Autocomplete,
|
|
9667
9729
|
{
|
|
9668
9730
|
...field,
|
|
@@ -9671,8 +9733,8 @@ var RHFAutocomplete = ({
|
|
|
9671
9733
|
setValue(name, newValue, { shouldValidate: true });
|
|
9672
9734
|
handleChange?.(newValue);
|
|
9673
9735
|
},
|
|
9674
|
-
renderInput: (params) => /* @__PURE__ */
|
|
9675
|
-
|
|
9736
|
+
renderInput: (params) => /* @__PURE__ */ jsx95(
|
|
9737
|
+
TextField5,
|
|
9676
9738
|
{
|
|
9677
9739
|
label,
|
|
9678
9740
|
placeholder,
|
|
@@ -9691,13 +9753,13 @@ var RHFAutocomplete = ({
|
|
|
9691
9753
|
|
|
9692
9754
|
// src/components/HookForm/RHFDateRangePicker.tsx
|
|
9693
9755
|
import { useMemo as useMemo10, useState as useState16, useCallback as useCallback14 } from "react";
|
|
9694
|
-
import { useWatch, Controller as
|
|
9756
|
+
import { useWatch, Controller as Controller8, useFormContext as useFormContext8 } from "react-hook-form";
|
|
9695
9757
|
import { format as format3, isValid } from "date-fns";
|
|
9696
9758
|
import Box22 from "@mui/material/Box";
|
|
9697
9759
|
import Popover4 from "@mui/material/Popover";
|
|
9698
|
-
import
|
|
9760
|
+
import TextField6 from "@mui/material/TextField";
|
|
9699
9761
|
import InputAdornment2 from "@mui/material/InputAdornment";
|
|
9700
|
-
import { Fragment as Fragment3, jsx as
|
|
9762
|
+
import { Fragment as Fragment3, jsx as jsx96, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
9701
9763
|
function RHFDateRangePicker({
|
|
9702
9764
|
name,
|
|
9703
9765
|
label,
|
|
@@ -9711,7 +9773,7 @@ function RHFDateRangePicker({
|
|
|
9711
9773
|
size = "medium",
|
|
9712
9774
|
fullWidth = true
|
|
9713
9775
|
}) {
|
|
9714
|
-
const { control } =
|
|
9776
|
+
const { control } = useFormContext8();
|
|
9715
9777
|
const [anchorEl, setAnchorEl] = useState16(null);
|
|
9716
9778
|
const open = Boolean(anchorEl);
|
|
9717
9779
|
const watchedValue = useWatch({ control, name });
|
|
@@ -9745,8 +9807,8 @@ function RHFDateRangePicker({
|
|
|
9745
9807
|
const handleClose = useCallback14(() => {
|
|
9746
9808
|
setAnchorEl(null);
|
|
9747
9809
|
}, []);
|
|
9748
|
-
return /* @__PURE__ */
|
|
9749
|
-
|
|
9810
|
+
return /* @__PURE__ */ jsx96(
|
|
9811
|
+
Controller8,
|
|
9750
9812
|
{
|
|
9751
9813
|
name,
|
|
9752
9814
|
control,
|
|
@@ -9755,9 +9817,9 @@ function RHFDateRangePicker({
|
|
|
9755
9817
|
field.onChange({ ...range, preset });
|
|
9756
9818
|
handleClose();
|
|
9757
9819
|
};
|
|
9758
|
-
return /* @__PURE__ */
|
|
9759
|
-
/* @__PURE__ */
|
|
9760
|
-
|
|
9820
|
+
return /* @__PURE__ */ jsxs60(Fragment3, { children: [
|
|
9821
|
+
/* @__PURE__ */ jsx96(Box22, { onClick: handleClick, sx: { cursor: disabled ? "default" : "pointer" }, children: /* @__PURE__ */ jsx96(
|
|
9822
|
+
TextField6,
|
|
9761
9823
|
{
|
|
9762
9824
|
label,
|
|
9763
9825
|
placeholder,
|
|
@@ -9770,13 +9832,13 @@ function RHFDateRangePicker({
|
|
|
9770
9832
|
slotProps: {
|
|
9771
9833
|
input: {
|
|
9772
9834
|
readOnly: true,
|
|
9773
|
-
endAdornment: /* @__PURE__ */
|
|
9835
|
+
endAdornment: /* @__PURE__ */ jsx96(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx96(Icon, { icon: "Calendar", sx: { width: 20, height: 20, color: "icon.mute" } }) }),
|
|
9774
9836
|
sx: { cursor: disabled ? "default" : "pointer" }
|
|
9775
9837
|
}
|
|
9776
9838
|
}
|
|
9777
9839
|
}
|
|
9778
9840
|
) }),
|
|
9779
|
-
/* @__PURE__ */
|
|
9841
|
+
/* @__PURE__ */ jsx96(
|
|
9780
9842
|
Popover4,
|
|
9781
9843
|
{
|
|
9782
9844
|
open,
|
|
@@ -9801,7 +9863,7 @@ function RHFDateRangePicker({
|
|
|
9801
9863
|
}
|
|
9802
9864
|
}
|
|
9803
9865
|
},
|
|
9804
|
-
children: /* @__PURE__ */
|
|
9866
|
+
children: /* @__PURE__ */ jsx96(
|
|
9805
9867
|
DateRangePicker,
|
|
9806
9868
|
{
|
|
9807
9869
|
value: { start: value.start, end: value.end },
|
|
@@ -9822,7 +9884,7 @@ function RHFDateRangePicker({
|
|
|
9822
9884
|
}
|
|
9823
9885
|
|
|
9824
9886
|
// src/components/HookForm/RHFCheckbox.tsx
|
|
9825
|
-
import { Controller as
|
|
9887
|
+
import { Controller as Controller9, useFormContext as useFormContext9 } from "react-hook-form";
|
|
9826
9888
|
import Stack8 from "@mui/material/Stack";
|
|
9827
9889
|
import Box23 from "@mui/material/Box";
|
|
9828
9890
|
import Typography12 from "@mui/material/Typography";
|
|
@@ -9832,7 +9894,7 @@ import FormLabel3 from "@mui/material/FormLabel";
|
|
|
9832
9894
|
import FormControl3 from "@mui/material/FormControl";
|
|
9833
9895
|
import FormHelperText5 from "@mui/material/FormHelperText";
|
|
9834
9896
|
import FormControlLabel5 from "@mui/material/FormControlLabel";
|
|
9835
|
-
import { jsx as
|
|
9897
|
+
import { jsx as jsx97, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9836
9898
|
var RHFCheckbox = ({
|
|
9837
9899
|
name,
|
|
9838
9900
|
description,
|
|
@@ -9842,18 +9904,18 @@ var RHFCheckbox = ({
|
|
|
9842
9904
|
slotProps,
|
|
9843
9905
|
...other
|
|
9844
9906
|
}) => {
|
|
9845
|
-
const { control } =
|
|
9907
|
+
const { control } = useFormContext9();
|
|
9846
9908
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
9847
|
-
return /* @__PURE__ */
|
|
9848
|
-
|
|
9909
|
+
return /* @__PURE__ */ jsx97(
|
|
9910
|
+
Controller9,
|
|
9849
9911
|
{
|
|
9850
9912
|
name,
|
|
9851
9913
|
control,
|
|
9852
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9853
|
-
/* @__PURE__ */
|
|
9914
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs61(Box23, { sx: slotProps?.wrap, children: [
|
|
9915
|
+
/* @__PURE__ */ jsx97(
|
|
9854
9916
|
FormControlLabel5,
|
|
9855
9917
|
{
|
|
9856
|
-
control: /* @__PURE__ */
|
|
9918
|
+
control: /* @__PURE__ */ jsx97(
|
|
9857
9919
|
Checkbox,
|
|
9858
9920
|
{
|
|
9859
9921
|
...field,
|
|
@@ -9868,9 +9930,9 @@ var RHFCheckbox = ({
|
|
|
9868
9930
|
}
|
|
9869
9931
|
}
|
|
9870
9932
|
),
|
|
9871
|
-
label: /* @__PURE__ */
|
|
9872
|
-
/* @__PURE__ */
|
|
9873
|
-
description && /* @__PURE__ */
|
|
9933
|
+
label: /* @__PURE__ */ jsxs61(Stack8, { children: [
|
|
9934
|
+
/* @__PURE__ */ jsx97(Typography12, { variant: "bodyMd", color: "text.header", fontWeight: 500, children: label }),
|
|
9935
|
+
description && /* @__PURE__ */ jsx97(Typography12, { variant: "body2", color: "text.body", children: description })
|
|
9874
9936
|
] }),
|
|
9875
9937
|
sx: {
|
|
9876
9938
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -9879,7 +9941,7 @@ var RHFCheckbox = ({
|
|
|
9879
9941
|
...other
|
|
9880
9942
|
}
|
|
9881
9943
|
),
|
|
9882
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
9944
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx97(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
9883
9945
|
] })
|
|
9884
9946
|
}
|
|
9885
9947
|
);
|
|
@@ -9893,15 +9955,15 @@ var RHFMultiCheckbox = ({
|
|
|
9893
9955
|
row,
|
|
9894
9956
|
...other
|
|
9895
9957
|
}) => {
|
|
9896
|
-
const { control } =
|
|
9958
|
+
const { control } = useFormContext9();
|
|
9897
9959
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
9898
|
-
return /* @__PURE__ */
|
|
9899
|
-
|
|
9960
|
+
return /* @__PURE__ */ jsx97(
|
|
9961
|
+
Controller9,
|
|
9900
9962
|
{
|
|
9901
9963
|
name,
|
|
9902
9964
|
control,
|
|
9903
9965
|
defaultValue: [],
|
|
9904
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
9966
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs61(
|
|
9905
9967
|
FormControl3,
|
|
9906
9968
|
{
|
|
9907
9969
|
component: "fieldset",
|
|
@@ -9909,7 +9971,7 @@ var RHFMultiCheckbox = ({
|
|
|
9909
9971
|
sx: slotProps?.formControl?.sx,
|
|
9910
9972
|
...slotProps?.formControl,
|
|
9911
9973
|
children: [
|
|
9912
|
-
label && /* @__PURE__ */
|
|
9974
|
+
label && /* @__PURE__ */ jsx97(
|
|
9913
9975
|
FormLabel3,
|
|
9914
9976
|
{
|
|
9915
9977
|
component: "legend",
|
|
@@ -9918,12 +9980,12 @@ var RHFMultiCheckbox = ({
|
|
|
9918
9980
|
children: label
|
|
9919
9981
|
}
|
|
9920
9982
|
),
|
|
9921
|
-
/* @__PURE__ */
|
|
9983
|
+
/* @__PURE__ */ jsx97(FormGroup2, { row, ...other, children: options.map((option) => {
|
|
9922
9984
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
9923
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ jsx97(
|
|
9924
9986
|
FormControlLabel5,
|
|
9925
9987
|
{
|
|
9926
|
-
control: /* @__PURE__ */
|
|
9988
|
+
control: /* @__PURE__ */ jsx97(
|
|
9927
9989
|
Checkbox,
|
|
9928
9990
|
{
|
|
9929
9991
|
checked: (field.value || []).includes(option.value),
|
|
@@ -9941,9 +10003,9 @@ var RHFMultiCheckbox = ({
|
|
|
9941
10003
|
}
|
|
9942
10004
|
}
|
|
9943
10005
|
),
|
|
9944
|
-
label: /* @__PURE__ */
|
|
9945
|
-
/* @__PURE__ */
|
|
9946
|
-
option?.description && /* @__PURE__ */
|
|
10006
|
+
label: /* @__PURE__ */ jsxs61(Stack8, { children: [
|
|
10007
|
+
/* @__PURE__ */ jsx97(Typography12, { variant: "bodyMd", color: "text.header", fontWeight: 500, children: option.label }),
|
|
10008
|
+
option?.description && /* @__PURE__ */ jsx97(Typography12, { variant: "body2", color: "text.body", children: option?.description })
|
|
9947
10009
|
] }),
|
|
9948
10010
|
sx: {
|
|
9949
10011
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -9952,7 +10014,7 @@ var RHFMultiCheckbox = ({
|
|
|
9952
10014
|
option.value
|
|
9953
10015
|
);
|
|
9954
10016
|
}) }),
|
|
9955
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
10017
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx97(
|
|
9956
10018
|
FormHelperText5,
|
|
9957
10019
|
{
|
|
9958
10020
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -9967,10 +10029,483 @@ var RHFMultiCheckbox = ({
|
|
|
9967
10029
|
);
|
|
9968
10030
|
};
|
|
9969
10031
|
|
|
10032
|
+
// src/components/HookForm/RHFGooglePlacesAutocomplete.tsx
|
|
10033
|
+
import { Controller as Controller10, useFormContext as useFormContext10 } from "react-hook-form";
|
|
10034
|
+
|
|
10035
|
+
// src/components/GooglePlacesAutocomplete/GooglePlacesContext.tsx
|
|
10036
|
+
import { useMemo as useMemo11, useState as useState17, useEffect as useEffect6, useContext as useContext2, useCallback as useCallback15, createContext as createContext2 } from "react";
|
|
10037
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
10038
|
+
var GOOGLE_NAMESPACE = "_google_callback";
|
|
10039
|
+
var GooglePlacesContext = createContext2(void 0);
|
|
10040
|
+
var GooglePlacesProvider = ({
|
|
10041
|
+
apiKey,
|
|
10042
|
+
children,
|
|
10043
|
+
libraries = []
|
|
10044
|
+
}) => {
|
|
10045
|
+
const [loaded, setLoaded] = useState17(false);
|
|
10046
|
+
const [error2, setError] = useState17(null);
|
|
10047
|
+
const loadScript = useCallback15(() => {
|
|
10048
|
+
if (typeof window !== "undefined" && window.google?.maps?.places) {
|
|
10049
|
+
setLoaded(true);
|
|
10050
|
+
return;
|
|
10051
|
+
}
|
|
10052
|
+
const existingScript = document.querySelector("#google-maps-places");
|
|
10053
|
+
if (existingScript) {
|
|
10054
|
+
if (window.google?.maps?.places) {
|
|
10055
|
+
setLoaded(true);
|
|
10056
|
+
}
|
|
10057
|
+
return;
|
|
10058
|
+
}
|
|
10059
|
+
const callbackName = `initGooglePlaces_${Date.now()}`;
|
|
10060
|
+
const globalContext = window[GOOGLE_NAMESPACE] || (window[GOOGLE_NAMESPACE] = {});
|
|
10061
|
+
globalContext[callbackName] = () => {
|
|
10062
|
+
setLoaded(true);
|
|
10063
|
+
delete globalContext[callbackName];
|
|
10064
|
+
};
|
|
10065
|
+
const allLibraries = ["places", ...libraries.filter((lib) => lib !== "places")].join(",");
|
|
10066
|
+
const script = document.createElement("script");
|
|
10067
|
+
script.id = "google-maps-places";
|
|
10068
|
+
script.async = true;
|
|
10069
|
+
script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=${allLibraries}&loading=async&callback=${GOOGLE_NAMESPACE}.${callbackName}`;
|
|
10070
|
+
script.onerror = () => {
|
|
10071
|
+
setError(new Error("Failed to load Google Maps Places API"));
|
|
10072
|
+
delete globalContext[callbackName];
|
|
10073
|
+
};
|
|
10074
|
+
document.head.appendChild(script);
|
|
10075
|
+
}, [apiKey, libraries]);
|
|
10076
|
+
useEffect6(() => {
|
|
10077
|
+
if (typeof window !== "undefined") {
|
|
10078
|
+
loadScript();
|
|
10079
|
+
}
|
|
10080
|
+
}, [loadScript]);
|
|
10081
|
+
const value = useMemo11(
|
|
10082
|
+
() => ({
|
|
10083
|
+
apiKey,
|
|
10084
|
+
loaded,
|
|
10085
|
+
error: error2
|
|
10086
|
+
}),
|
|
10087
|
+
[apiKey, loaded, error2]
|
|
10088
|
+
);
|
|
10089
|
+
return /* @__PURE__ */ jsx98(GooglePlacesContext.Provider, { value, children });
|
|
10090
|
+
};
|
|
10091
|
+
var useGooglePlacesContext = () => {
|
|
10092
|
+
const context = useContext2(GooglePlacesContext);
|
|
10093
|
+
if (!context) {
|
|
10094
|
+
throw new Error("useGooglePlacesContext must be used within a GooglePlacesProvider");
|
|
10095
|
+
}
|
|
10096
|
+
return context;
|
|
10097
|
+
};
|
|
10098
|
+
var useGooglePlacesLoaded = () => {
|
|
10099
|
+
const { loaded } = useGooglePlacesContext();
|
|
10100
|
+
return loaded;
|
|
10101
|
+
};
|
|
10102
|
+
|
|
10103
|
+
// src/components/GooglePlacesAutocomplete/GooglePlacesAutocomplete.tsx
|
|
10104
|
+
import Box24 from "@mui/material/Box";
|
|
10105
|
+
import Grid from "@mui/material/Grid";
|
|
10106
|
+
import Typography13 from "@mui/material/Typography";
|
|
10107
|
+
import Paper2 from "@mui/material/Paper";
|
|
10108
|
+
import CircularProgress2 from "@mui/material/CircularProgress";
|
|
10109
|
+
import SvgIcon2 from "@mui/material/SvgIcon";
|
|
10110
|
+
import TextField7 from "@mui/material/TextField";
|
|
10111
|
+
import Autocomplete2 from "@mui/material/Autocomplete";
|
|
10112
|
+
|
|
10113
|
+
// src/components/GooglePlacesAutocomplete/useGooglePlacesAutocomplete.ts
|
|
10114
|
+
import { useRef as useRef7, useMemo as useMemo12, useState as useState18, useEffect as useEffect7, useCallback as useCallback16 } from "react";
|
|
10115
|
+
import { debounce } from "@mui/material/utils";
|
|
10116
|
+
var useGooglePlacesAutocomplete = (options = {}) => {
|
|
10117
|
+
const {
|
|
10118
|
+
debounceMs = 300,
|
|
10119
|
+
types,
|
|
10120
|
+
componentRestrictions,
|
|
10121
|
+
fetchPlaceDetails = false,
|
|
10122
|
+
placeDetailsFields = ["geometry", "formatted_address", "address_components"]
|
|
10123
|
+
} = options;
|
|
10124
|
+
const { loaded, error: contextError } = useGooglePlacesContext();
|
|
10125
|
+
const [inputValue, setInputValue] = useState18("");
|
|
10126
|
+
const [value, setValue] = useState18(null);
|
|
10127
|
+
const [autocompleteOptions, setAutocompleteOptions] = useState18([]);
|
|
10128
|
+
const [loading, setLoading] = useState18(false);
|
|
10129
|
+
const [error2, setError] = useState18(contextError);
|
|
10130
|
+
const sessionTokenRef = useRef7(null);
|
|
10131
|
+
useEffect7(() => {
|
|
10132
|
+
if (loaded && !sessionTokenRef.current) {
|
|
10133
|
+
sessionTokenRef.current = new window.google.maps.places.AutocompleteSessionToken();
|
|
10134
|
+
}
|
|
10135
|
+
}, [loaded]);
|
|
10136
|
+
const fetchSuggestions = useMemo12(
|
|
10137
|
+
() => debounce(async (input) => {
|
|
10138
|
+
if (!loaded || !input.trim()) {
|
|
10139
|
+
setAutocompleteOptions(value ? [value] : []);
|
|
10140
|
+
setLoading(false);
|
|
10141
|
+
return;
|
|
10142
|
+
}
|
|
10143
|
+
try {
|
|
10144
|
+
setLoading(true);
|
|
10145
|
+
const request = {
|
|
10146
|
+
input,
|
|
10147
|
+
sessionToken: sessionTokenRef.current
|
|
10148
|
+
};
|
|
10149
|
+
if (types?.length) {
|
|
10150
|
+
request.includedPrimaryTypes = types;
|
|
10151
|
+
}
|
|
10152
|
+
if (componentRestrictions?.country) {
|
|
10153
|
+
const countries = Array.isArray(componentRestrictions.country) ? componentRestrictions.country : [componentRestrictions.country];
|
|
10154
|
+
request.includedRegionCodes = countries;
|
|
10155
|
+
}
|
|
10156
|
+
const { suggestions } = await window.google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);
|
|
10157
|
+
const results = suggestions.map((suggestion) => {
|
|
10158
|
+
const place = suggestion.placePrediction;
|
|
10159
|
+
return {
|
|
10160
|
+
description: place.text.text,
|
|
10161
|
+
place_id: place.placeId,
|
|
10162
|
+
structured_formatting: {
|
|
10163
|
+
main_text: place.mainText.text,
|
|
10164
|
+
main_text_matched_substrings: (place.mainText.matches || []).map((match) => ({
|
|
10165
|
+
offset: match.startOffset || 0,
|
|
10166
|
+
length: (match.endOffset || 0) - (match.startOffset || 0)
|
|
10167
|
+
})),
|
|
10168
|
+
secondary_text: place.secondaryText?.text
|
|
10169
|
+
}
|
|
10170
|
+
};
|
|
10171
|
+
});
|
|
10172
|
+
let newOptions = results;
|
|
10173
|
+
if (value && !results.some((r) => r.description === value.description)) {
|
|
10174
|
+
newOptions = [value, ...results];
|
|
10175
|
+
}
|
|
10176
|
+
setAutocompleteOptions(newOptions);
|
|
10177
|
+
setError(null);
|
|
10178
|
+
} catch (err) {
|
|
10179
|
+
console.error("Google Places Autocomplete error:", err);
|
|
10180
|
+
setError(err);
|
|
10181
|
+
} finally {
|
|
10182
|
+
setLoading(false);
|
|
10183
|
+
}
|
|
10184
|
+
}, debounceMs),
|
|
10185
|
+
[loaded, value, types, componentRestrictions, debounceMs]
|
|
10186
|
+
);
|
|
10187
|
+
useEffect7(() => {
|
|
10188
|
+
if (inputValue === "") {
|
|
10189
|
+
setAutocompleteOptions(value ? [value] : []);
|
|
10190
|
+
return;
|
|
10191
|
+
}
|
|
10192
|
+
fetchSuggestions(inputValue);
|
|
10193
|
+
return () => {
|
|
10194
|
+
fetchSuggestions.clear();
|
|
10195
|
+
};
|
|
10196
|
+
}, [inputValue, fetchSuggestions, value]);
|
|
10197
|
+
const getPlaceDetails = useCallback16(
|
|
10198
|
+
async (placeId) => {
|
|
10199
|
+
if (!loaded || !placeId) return null;
|
|
10200
|
+
try {
|
|
10201
|
+
const { Place } = window.google.maps.places;
|
|
10202
|
+
const place = new Place({ id: placeId });
|
|
10203
|
+
await place.fetchFields({ fields: placeDetailsFields });
|
|
10204
|
+
sessionTokenRef.current = new window.google.maps.places.AutocompleteSessionToken();
|
|
10205
|
+
return {
|
|
10206
|
+
placeId,
|
|
10207
|
+
description: place.displayName || "",
|
|
10208
|
+
mainText: place.displayName || "",
|
|
10209
|
+
secondaryText: place.formattedAddress || "",
|
|
10210
|
+
lat: place.location?.lat(),
|
|
10211
|
+
lng: place.location?.lng(),
|
|
10212
|
+
formattedAddress: place.formattedAddress,
|
|
10213
|
+
addressComponents: place.addressComponents
|
|
10214
|
+
};
|
|
10215
|
+
} catch (err) {
|
|
10216
|
+
console.error("Failed to fetch place details:", err);
|
|
10217
|
+
return null;
|
|
10218
|
+
}
|
|
10219
|
+
},
|
|
10220
|
+
[loaded, placeDetailsFields]
|
|
10221
|
+
);
|
|
10222
|
+
const handleSetValue = useCallback16(
|
|
10223
|
+
async (newValue) => {
|
|
10224
|
+
setValue(newValue);
|
|
10225
|
+
if (newValue && fetchPlaceDetails && newValue.place_id) {
|
|
10226
|
+
await getPlaceDetails(newValue.place_id);
|
|
10227
|
+
}
|
|
10228
|
+
},
|
|
10229
|
+
[fetchPlaceDetails, getPlaceDetails]
|
|
10230
|
+
);
|
|
10231
|
+
const clear = useCallback16(() => {
|
|
10232
|
+
setValue(null);
|
|
10233
|
+
setInputValue("");
|
|
10234
|
+
setAutocompleteOptions([]);
|
|
10235
|
+
}, []);
|
|
10236
|
+
return {
|
|
10237
|
+
inputValue,
|
|
10238
|
+
setInputValue,
|
|
10239
|
+
value,
|
|
10240
|
+
setValue: handleSetValue,
|
|
10241
|
+
options: autocompleteOptions,
|
|
10242
|
+
loaded,
|
|
10243
|
+
loading,
|
|
10244
|
+
error: error2,
|
|
10245
|
+
getPlaceDetails,
|
|
10246
|
+
clear
|
|
10247
|
+
};
|
|
10248
|
+
};
|
|
10249
|
+
|
|
10250
|
+
// src/components/GooglePlacesAutocomplete/GooglePlacesAutocomplete.tsx
|
|
10251
|
+
import { Fragment as Fragment4, jsx as jsx99, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
10252
|
+
var DefaultLocationIcon = (props) => /* @__PURE__ */ jsx99(SvgIcon2, { ...props, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx99("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" }) });
|
|
10253
|
+
var GoogleMapsAttribution = () => /* @__PURE__ */ jsx99(
|
|
10254
|
+
Box24,
|
|
10255
|
+
{
|
|
10256
|
+
sx: (theme) => ({
|
|
10257
|
+
display: "flex",
|
|
10258
|
+
justifyContent: "flex-end",
|
|
10259
|
+
p: "5px 10px 6px 10px",
|
|
10260
|
+
opacity: 0.9,
|
|
10261
|
+
"& path": {
|
|
10262
|
+
fill: theme.palette.text.secondary
|
|
10263
|
+
}
|
|
10264
|
+
}),
|
|
10265
|
+
children: /* @__PURE__ */ jsx99(
|
|
10266
|
+
"svg",
|
|
10267
|
+
{
|
|
10268
|
+
"aria-label": "Google Maps",
|
|
10269
|
+
height: "14",
|
|
10270
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
10271
|
+
viewBox: "0 0 98 18",
|
|
10272
|
+
width: "77",
|
|
10273
|
+
children: /* @__PURE__ */ jsx99("path", { d: "M7.08 13.96a6.9 6.9 0 01-4.99-2.05A6.7 6.7 0 010 6.98Q0 4.1 2.09 2.05A6.9 6.9 0 017.08 0a6.7 6.7 0 014.79 1.92l-1.35 1.35a4.8 4.8 0 00-3.44-1.36q-2.1 0-3.55 1.48a5 5 0 00-1.45 3.59q0 2.12 1.46 3.59a4.8 4.8 0 003.55 1.48 4.8 4.8 0 003.53-1.4q.84-.84 1.04-2.4H7.08v-1.9h6.42a6 6 0 01.1 1.19q0 2.8-1.65 4.46a6.4 6.4 0 01-4.87 1.96M22 12.68a4.4 4.4 0 01-3.2 1.29 4.4 4.4 0 01-3.2-1.29 4.3 4.3 0 01-1.31-3.21q0-1.92 1.31-3.21a4.4 4.4 0 013.2-1.29q1.9 0 3.2 1.29a4.3 4.3 0 011.31 3.21A4.3 4.3 0 0122 12.68m-4.99-1.26q.75.78 1.79.77 1.04 0 1.79-.77.75-.78.75-1.95 0-1.19-.74-1.96-.75-.77-1.8-.77t-1.8.77a2.7 2.7 0 00-.74 1.96q0 1.17.75 1.95m14.84 1.26q-1.3 1.29-3.2 1.29c-1.9 0-2.33-.43-3.2-1.29a4.3 4.3 0 01-1.31-3.21q0-1.92 1.31-3.21 1.3-1.29 3.2-1.29c1.9 0 2.33.43 3.2 1.29a4.3 4.3 0 011.31 3.21q0 1.92-1.31 3.21m-4.99-1.26q.75.78 1.79.77 1.04 0 1.79-.77.75-.78.75-1.95 0-1.19-.74-1.96c-.74-.77-1.09-.77-1.8-.77q-1.05 0-1.8.77a2.7 2.7 0 00-.74 1.96q0 1.17.75 1.95M38.32 18q-1.5 0-2.52-.8a4.5 4.5 0 01-1.46-1.86l1.72-.72q.27.65.85 1.12.59.48 1.41.48a2.3 2.3 0 001.76-.68q.64-.68.64-1.96v-.65h-.07a2.9 2.9 0 01-2.37 1.02 4 4 0 01-3.01-1.31 4.4 4.4 0 01-1.29-3.17 4.4 4.4 0 011.29-3.19 4 4 0 013.01-1.32q.76 0 1.39.29t.98.72h.07v-.72h1.87v8.07q0 2.35-1.2 3.52A4.2 4.2 0 0138.32 18m.13-5.81q1.02 0 1.71-.77a2.8 2.8 0 00.69-1.93q0-1.17-.69-1.96a2.2 2.2 0 00-1.71-.79q-1.03 0-1.77.78a2.8 2.8 0 00-.73 1.96q0 1.16.73 1.93.74.78 1.77.78M45.93.48v13.21h-1.98V.48zm5.41 13.48a4.38 4.38 0 01-4.46-4.49q0-1.98 1.23-3.24a4 4 0 013.01-1.26 3.8 3.8 0 012.68 1.07 5 5 0 011.17 1.8l.2.51-6.01 2.49a2.3 2.3 0 002.18 1.36q1.37 0 2.21-1.24l1.53 1.02q-.5.76-1.45 1.38-.92.6-2.29.6m-2.5-4.63l4.02-1.67a1.4 1.4 0 00-.63-.69 2 2 0 00-1.04-.26q-.87 0-1.63.72a2.4 2.4 0 00-.72 1.9m11.21 4.36V1.5h1.57l4.24 7.42h.07l4.24-7.42h1.57v12.19h-1.57V6.45l.07-2.04h-.07l-3.81 6.69h-.92l-3.81-6.69h-.07l.07 2.04v7.24zm16.31.27q-1.33 0-2.22-.77a2.5 2.5 0 01-.89-2.03q0-1.36 1.06-2.14 1.05-.77 2.61-.77 1.38 0 2.26.51v-.23q0-.91-.63-1.47A2.3 2.3 0 0077 6.51q-.68 0-1.23.32a1.6 1.6 0 00-.77.88l-1.43-.61q.28-.75 1.14-1.39a3.6 3.6 0 012.25-.64q1.6 0 2.66.94 1.05.93 1.06 2.64v5.04h-1.5v-1.16h-.08a3 3 0 01-2.74 1.43m.25-1.43q.97 0 1.76-.72.8-.72.79-1.71-.67-.54-1.99-.54-1.14 0-1.72.49-.58.5-.58 1.16 0 .61.53.97.54.35 1.21.35m9.97 1.43q-.96 0-1.71-.41a3 3 0 01-1.13-1.02h-.07l.07 1.16v3.68h-1.57V5.35h1.5v1.16h.07a3 3 0 011.13-1.02 3.67 3.67 0 014.5.87 4.5 4.5 0 011.18 3.17q0 1.9-1.18 3.17a3.7 3.7 0 01-2.79 1.26m-.26-1.43q1.1 0 1.87-.83.78-.82.78-2.19t-.78-2.19a2.5 2.5 0 00-1.87-.83q-1.11 0-1.88.82-.78.81-.77 2.2c.01 1.39.26 1.65.77 2.2q.78.82 1.88.82m8.39 1.43a3.8 3.8 0 01-3.65-2.38l1.4-.58q.67 1.57 2.26 1.57.73 0 1.2-.32a1 1 0 00.47-.85q0-.81-1.14-1.11l-1.69-.41a4 4 0 01-1.52-.77 1.9 1.9 0 01-.72-1.54q0-1.11.98-1.8a4 4 0 012.32-.69q1.11 0 1.98.5t1.24 1.44l-1.34.56q-.46-1.11-1.91-1.11-.7 0-1.18.29t-.48.78q0 .72 1.11.97l1.65.39a3 3 0 011.74.94q.56.66.56 1.5 0 1.12-.92 1.87-.9.75-2.36.75" })
|
|
10274
|
+
}
|
|
10275
|
+
)
|
|
10276
|
+
}
|
|
10277
|
+
);
|
|
10278
|
+
var CustomPaper = (props) => /* @__PURE__ */ jsxs62(Paper2, { elevation: 8, ...props, children: [
|
|
10279
|
+
props.children,
|
|
10280
|
+
/* @__PURE__ */ jsx99(GoogleMapsAttribution, {})
|
|
10281
|
+
] });
|
|
10282
|
+
var GooglePlacesAutocomplete = ({
|
|
10283
|
+
// Autocomplete options
|
|
10284
|
+
debounceMs,
|
|
10285
|
+
types,
|
|
10286
|
+
componentRestrictions,
|
|
10287
|
+
fetchPlaceDetails,
|
|
10288
|
+
placeDetailsFields,
|
|
10289
|
+
// Component props
|
|
10290
|
+
label = "Search location",
|
|
10291
|
+
placeholder,
|
|
10292
|
+
helperText,
|
|
10293
|
+
error: error2,
|
|
10294
|
+
errorMessage,
|
|
10295
|
+
required,
|
|
10296
|
+
onChange,
|
|
10297
|
+
onPlaceDetailsChange,
|
|
10298
|
+
textFieldProps,
|
|
10299
|
+
LocationIcon = DefaultLocationIcon,
|
|
10300
|
+
noOptionsText = "No locations found",
|
|
10301
|
+
value: externalValue,
|
|
10302
|
+
inputValue: externalInputValue,
|
|
10303
|
+
...autocompleteProps
|
|
10304
|
+
}) => {
|
|
10305
|
+
const {
|
|
10306
|
+
inputValue: internalInputValue,
|
|
10307
|
+
setInputValue,
|
|
10308
|
+
value: internalValue,
|
|
10309
|
+
setValue,
|
|
10310
|
+
options,
|
|
10311
|
+
loaded,
|
|
10312
|
+
loading,
|
|
10313
|
+
getPlaceDetails
|
|
10314
|
+
} = useGooglePlacesAutocomplete({
|
|
10315
|
+
debounceMs,
|
|
10316
|
+
types,
|
|
10317
|
+
componentRestrictions,
|
|
10318
|
+
fetchPlaceDetails,
|
|
10319
|
+
placeDetailsFields
|
|
10320
|
+
});
|
|
10321
|
+
const value = externalValue !== void 0 ? externalValue : internalValue;
|
|
10322
|
+
const inputValueToUse = externalInputValue !== void 0 ? externalInputValue : internalInputValue;
|
|
10323
|
+
const handleChange = async (_event, newValue) => {
|
|
10324
|
+
setValue(newValue);
|
|
10325
|
+
onChange?.(newValue);
|
|
10326
|
+
if (newValue?.place_id && onPlaceDetailsChange) {
|
|
10327
|
+
const details = await getPlaceDetails(newValue.place_id);
|
|
10328
|
+
onPlaceDetailsChange(details);
|
|
10329
|
+
}
|
|
10330
|
+
};
|
|
10331
|
+
const handleInputChange = (_event, newInputValue) => {
|
|
10332
|
+
setInputValue(newInputValue);
|
|
10333
|
+
};
|
|
10334
|
+
const renderOption = (props, option) => {
|
|
10335
|
+
const { key, ...optionProps } = props;
|
|
10336
|
+
const matches = option.structured_formatting.main_text_matched_substrings || [];
|
|
10337
|
+
const parts = [];
|
|
10338
|
+
const mainText = option.structured_formatting.main_text;
|
|
10339
|
+
let lastIndex = 0;
|
|
10340
|
+
matches.forEach((match) => {
|
|
10341
|
+
if (match.offset > lastIndex) {
|
|
10342
|
+
parts.push({
|
|
10343
|
+
text: mainText.substring(lastIndex, match.offset),
|
|
10344
|
+
highlight: false
|
|
10345
|
+
});
|
|
10346
|
+
}
|
|
10347
|
+
parts.push({
|
|
10348
|
+
text: mainText.substring(match.offset, match.offset + match.length),
|
|
10349
|
+
highlight: true
|
|
10350
|
+
});
|
|
10351
|
+
lastIndex = match.offset + match.length;
|
|
10352
|
+
});
|
|
10353
|
+
if (lastIndex < mainText.length) {
|
|
10354
|
+
parts.push({
|
|
10355
|
+
text: mainText.substring(lastIndex),
|
|
10356
|
+
highlight: false
|
|
10357
|
+
});
|
|
10358
|
+
}
|
|
10359
|
+
if (parts.length === 0) {
|
|
10360
|
+
parts.push({ text: mainText, highlight: false });
|
|
10361
|
+
}
|
|
10362
|
+
return /* @__PURE__ */ jsx99("li", { ...optionProps, children: /* @__PURE__ */ jsxs62(Grid, { container: true, sx: { alignItems: "center" }, children: [
|
|
10363
|
+
/* @__PURE__ */ jsx99(Grid, { sx: { display: "flex", width: 44 }, children: /* @__PURE__ */ jsx99(LocationIcon, { sx: { color: "text.secondary", width: 20, height: 20 } }) }),
|
|
10364
|
+
/* @__PURE__ */ jsxs62(Grid, { sx: { width: "calc(100% - 44px)", wordWrap: "break-word" }, children: [
|
|
10365
|
+
parts.map((part, index) => /* @__PURE__ */ jsx99(
|
|
10366
|
+
Box24,
|
|
10367
|
+
{
|
|
10368
|
+
component: "span",
|
|
10369
|
+
sx: {
|
|
10370
|
+
fontWeight: part.highlight ? "fontWeightBold" : "fontWeightRegular"
|
|
10371
|
+
},
|
|
10372
|
+
children: part.text
|
|
10373
|
+
},
|
|
10374
|
+
index
|
|
10375
|
+
)),
|
|
10376
|
+
option.structured_formatting.secondary_text && /* @__PURE__ */ jsx99(Typography13, { variant: "body2", sx: { color: "text.secondary" }, children: option.structured_formatting.secondary_text })
|
|
10377
|
+
] })
|
|
10378
|
+
] }) }, key);
|
|
10379
|
+
};
|
|
10380
|
+
return /* @__PURE__ */ jsx99(
|
|
10381
|
+
Autocomplete2,
|
|
10382
|
+
{
|
|
10383
|
+
getOptionLabel: (option) => typeof option === "string" ? option : option.description,
|
|
10384
|
+
filterOptions: (x) => x,
|
|
10385
|
+
options,
|
|
10386
|
+
autoComplete: true,
|
|
10387
|
+
includeInputInList: true,
|
|
10388
|
+
filterSelectedOptions: true,
|
|
10389
|
+
value,
|
|
10390
|
+
inputValue: inputValueToUse,
|
|
10391
|
+
loading,
|
|
10392
|
+
noOptionsText: loaded ? noOptionsText : "Loading...",
|
|
10393
|
+
onChange: handleChange,
|
|
10394
|
+
onInputChange: handleInputChange,
|
|
10395
|
+
isOptionEqualToValue: (option, val) => option.description === val.description,
|
|
10396
|
+
slots: {
|
|
10397
|
+
paper: CustomPaper
|
|
10398
|
+
},
|
|
10399
|
+
renderOption,
|
|
10400
|
+
renderInput: (params) => /* @__PURE__ */ jsx99(
|
|
10401
|
+
TextField7,
|
|
10402
|
+
{
|
|
10403
|
+
...params,
|
|
10404
|
+
label,
|
|
10405
|
+
placeholder,
|
|
10406
|
+
required,
|
|
10407
|
+
error: error2 || !!errorMessage,
|
|
10408
|
+
helperText: errorMessage || helperText,
|
|
10409
|
+
slotProps: {
|
|
10410
|
+
input: {
|
|
10411
|
+
...params.InputProps,
|
|
10412
|
+
endAdornment: /* @__PURE__ */ jsxs62(Fragment4, { children: [
|
|
10413
|
+
loading && /* @__PURE__ */ jsx99(CircularProgress2, { color: "inherit", size: 20 }),
|
|
10414
|
+
params.InputProps.endAdornment
|
|
10415
|
+
] })
|
|
10416
|
+
}
|
|
10417
|
+
},
|
|
10418
|
+
...textFieldProps
|
|
10419
|
+
}
|
|
10420
|
+
),
|
|
10421
|
+
...autocompleteProps
|
|
10422
|
+
}
|
|
10423
|
+
);
|
|
10424
|
+
};
|
|
10425
|
+
|
|
10426
|
+
// src/components/HookForm/RHFGooglePlacesAutocomplete.tsx
|
|
10427
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
10428
|
+
var RHFGooglePlacesAutocomplete = ({
|
|
10429
|
+
name,
|
|
10430
|
+
helperText,
|
|
10431
|
+
valueType = "full",
|
|
10432
|
+
onValueChange,
|
|
10433
|
+
onPlaceDetailsChange,
|
|
10434
|
+
fetchPlaceDetails,
|
|
10435
|
+
...other
|
|
10436
|
+
}) => {
|
|
10437
|
+
const { control, setValue: setFormValue } = useFormContext10();
|
|
10438
|
+
const shouldFetchDetails = valueType === "details" || fetchPlaceDetails;
|
|
10439
|
+
return /* @__PURE__ */ jsx100(
|
|
10440
|
+
Controller10,
|
|
10441
|
+
{
|
|
10442
|
+
name,
|
|
10443
|
+
control,
|
|
10444
|
+
render: ({ field, fieldState: { error: error2 } }) => {
|
|
10445
|
+
const getDisplayValue = () => {
|
|
10446
|
+
if (!field.value) return null;
|
|
10447
|
+
if (typeof field.value === "string") {
|
|
10448
|
+
return {
|
|
10449
|
+
description: field.value,
|
|
10450
|
+
structured_formatting: {
|
|
10451
|
+
main_text: field.value,
|
|
10452
|
+
main_text_matched_substrings: []
|
|
10453
|
+
}
|
|
10454
|
+
};
|
|
10455
|
+
}
|
|
10456
|
+
if (field.value.placeId) {
|
|
10457
|
+
return {
|
|
10458
|
+
description: field.value.description || field.value.formattedAddress,
|
|
10459
|
+
place_id: field.value.placeId,
|
|
10460
|
+
structured_formatting: {
|
|
10461
|
+
main_text: field.value.mainText || field.value.description,
|
|
10462
|
+
main_text_matched_substrings: [],
|
|
10463
|
+
secondary_text: field.value.secondaryText
|
|
10464
|
+
}
|
|
10465
|
+
};
|
|
10466
|
+
}
|
|
10467
|
+
return field.value;
|
|
10468
|
+
};
|
|
10469
|
+
const handleChange = (newValue) => {
|
|
10470
|
+
onValueChange?.(newValue);
|
|
10471
|
+
if (!newValue) {
|
|
10472
|
+
setFormValue(name, null, { shouldValidate: true });
|
|
10473
|
+
return;
|
|
10474
|
+
}
|
|
10475
|
+
if (valueType === "description") {
|
|
10476
|
+
setFormValue(name, newValue.description, { shouldValidate: true });
|
|
10477
|
+
} else {
|
|
10478
|
+
setFormValue(name, newValue, { shouldValidate: true });
|
|
10479
|
+
}
|
|
10480
|
+
};
|
|
10481
|
+
const handlePlaceDetailsChange = (details) => {
|
|
10482
|
+
onPlaceDetailsChange?.(details);
|
|
10483
|
+
if (valueType === "details" && details) {
|
|
10484
|
+
setFormValue(name, details, { shouldValidate: true });
|
|
10485
|
+
}
|
|
10486
|
+
};
|
|
10487
|
+
return /* @__PURE__ */ jsx100(
|
|
10488
|
+
GooglePlacesAutocomplete,
|
|
10489
|
+
{
|
|
10490
|
+
value: getDisplayValue(),
|
|
10491
|
+
onChange: handleChange,
|
|
10492
|
+
onPlaceDetailsChange: handlePlaceDetailsChange,
|
|
10493
|
+
fetchPlaceDetails: shouldFetchDetails,
|
|
10494
|
+
error: !!error2,
|
|
10495
|
+
errorMessage: error2?.message,
|
|
10496
|
+
helperText,
|
|
10497
|
+
...other
|
|
10498
|
+
}
|
|
10499
|
+
);
|
|
10500
|
+
}
|
|
10501
|
+
}
|
|
10502
|
+
);
|
|
10503
|
+
};
|
|
10504
|
+
|
|
9970
10505
|
// src/components/HookForm/RHFDatePicker.tsx
|
|
9971
|
-
import { memo, useState as
|
|
9972
|
-
import { Controller as
|
|
9973
|
-
import
|
|
10506
|
+
import { memo, useState as useState19, useEffect as useEffect8 } from "react";
|
|
10507
|
+
import { Controller as Controller11, useFormContext as useFormContext11 } from "react-hook-form";
|
|
10508
|
+
import TextField8 from "@mui/material/TextField";
|
|
9974
10509
|
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers";
|
|
9975
10510
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
9976
10511
|
import {
|
|
@@ -9982,7 +10517,7 @@ import {
|
|
|
9982
10517
|
import {
|
|
9983
10518
|
DateTimePicker as MuiDateTimePicker
|
|
9984
10519
|
} from "@mui/x-date-pickers/DateTimePicker";
|
|
9985
|
-
import { jsx as
|
|
10520
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
9986
10521
|
var RHFDatePickerComponent = ({
|
|
9987
10522
|
name,
|
|
9988
10523
|
slotProps,
|
|
@@ -9991,10 +10526,10 @@ var RHFDatePickerComponent = ({
|
|
|
9991
10526
|
format: format4 = "MMM d, yyyy",
|
|
9992
10527
|
...other
|
|
9993
10528
|
}) => {
|
|
9994
|
-
const { control } =
|
|
9995
|
-
const [isOpen, setIsOpen] =
|
|
9996
|
-
const [cleared, setCleared] =
|
|
9997
|
-
|
|
10529
|
+
const { control } = useFormContext11();
|
|
10530
|
+
const [isOpen, setIsOpen] = useState19(false);
|
|
10531
|
+
const [cleared, setCleared] = useState19(false);
|
|
10532
|
+
useEffect8(() => {
|
|
9998
10533
|
if (cleared) {
|
|
9999
10534
|
const timeout = setTimeout(() => setCleared(false), 1500);
|
|
10000
10535
|
return () => clearTimeout(timeout);
|
|
@@ -10002,12 +10537,12 @@ var RHFDatePickerComponent = ({
|
|
|
10002
10537
|
return () => {
|
|
10003
10538
|
};
|
|
10004
10539
|
}, [cleared]);
|
|
10005
|
-
return /* @__PURE__ */
|
|
10006
|
-
|
|
10540
|
+
return /* @__PURE__ */ jsx101(
|
|
10541
|
+
Controller11,
|
|
10007
10542
|
{
|
|
10008
10543
|
name,
|
|
10009
10544
|
control,
|
|
10010
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
10545
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx101(LocalizationProvider2, { dateAdapter: AdapterDateFns2, children: /* @__PURE__ */ jsx101(
|
|
10011
10546
|
MuiDatePicker,
|
|
10012
10547
|
{
|
|
10013
10548
|
...field,
|
|
@@ -10018,7 +10553,7 @@ var RHFDatePickerComponent = ({
|
|
|
10018
10553
|
open: isOpen,
|
|
10019
10554
|
onClose: () => setIsOpen(false),
|
|
10020
10555
|
slots: {
|
|
10021
|
-
textField:
|
|
10556
|
+
textField: TextField8,
|
|
10022
10557
|
...other.slots
|
|
10023
10558
|
},
|
|
10024
10559
|
slotProps: {
|
|
@@ -10048,10 +10583,10 @@ var RHFTimePickerComponent = ({
|
|
|
10048
10583
|
format: format4 = "h:mma",
|
|
10049
10584
|
...other
|
|
10050
10585
|
}) => {
|
|
10051
|
-
const { control } =
|
|
10052
|
-
const [isOpen, setIsOpen] =
|
|
10053
|
-
const [cleared, setCleared] =
|
|
10054
|
-
|
|
10586
|
+
const { control } = useFormContext11();
|
|
10587
|
+
const [isOpen, setIsOpen] = useState19(false);
|
|
10588
|
+
const [cleared, setCleared] = useState19(false);
|
|
10589
|
+
useEffect8(() => {
|
|
10055
10590
|
if (cleared) {
|
|
10056
10591
|
const timeout = setTimeout(() => setCleared(false), 1500);
|
|
10057
10592
|
return () => clearTimeout(timeout);
|
|
@@ -10059,12 +10594,12 @@ var RHFTimePickerComponent = ({
|
|
|
10059
10594
|
return () => {
|
|
10060
10595
|
};
|
|
10061
10596
|
}, [cleared]);
|
|
10062
|
-
return /* @__PURE__ */
|
|
10063
|
-
|
|
10597
|
+
return /* @__PURE__ */ jsx101(
|
|
10598
|
+
Controller11,
|
|
10064
10599
|
{
|
|
10065
10600
|
name,
|
|
10066
10601
|
control,
|
|
10067
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
10602
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx101(LocalizationProvider2, { dateAdapter: AdapterDateFns2, children: /* @__PURE__ */ jsx101(
|
|
10068
10603
|
MuiTimePicker,
|
|
10069
10604
|
{
|
|
10070
10605
|
...field,
|
|
@@ -10075,7 +10610,7 @@ var RHFTimePickerComponent = ({
|
|
|
10075
10610
|
open: isOpen,
|
|
10076
10611
|
onClose: () => setIsOpen(false),
|
|
10077
10612
|
slots: {
|
|
10078
|
-
textField:
|
|
10613
|
+
textField: TextField8,
|
|
10079
10614
|
...other.slots
|
|
10080
10615
|
},
|
|
10081
10616
|
slotProps: {
|
|
@@ -10105,10 +10640,10 @@ var RHFDateTimePickerComponent = ({
|
|
|
10105
10640
|
format: format4 = "MMM d, yyyy h:mma",
|
|
10106
10641
|
...other
|
|
10107
10642
|
}) => {
|
|
10108
|
-
const { control } =
|
|
10109
|
-
const [isOpen, setIsOpen] =
|
|
10110
|
-
const [cleared, setCleared] =
|
|
10111
|
-
|
|
10643
|
+
const { control } = useFormContext11();
|
|
10644
|
+
const [isOpen, setIsOpen] = useState19(false);
|
|
10645
|
+
const [cleared, setCleared] = useState19(false);
|
|
10646
|
+
useEffect8(() => {
|
|
10112
10647
|
if (cleared) {
|
|
10113
10648
|
const timeout = setTimeout(() => setCleared(false), 1500);
|
|
10114
10649
|
return () => clearTimeout(timeout);
|
|
@@ -10116,12 +10651,12 @@ var RHFDateTimePickerComponent = ({
|
|
|
10116
10651
|
return () => {
|
|
10117
10652
|
};
|
|
10118
10653
|
}, [cleared]);
|
|
10119
|
-
return /* @__PURE__ */
|
|
10120
|
-
|
|
10654
|
+
return /* @__PURE__ */ jsx101(
|
|
10655
|
+
Controller11,
|
|
10121
10656
|
{
|
|
10122
10657
|
name,
|
|
10123
10658
|
control,
|
|
10124
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
10659
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx101(LocalizationProvider2, { dateAdapter: AdapterDateFns2, children: /* @__PURE__ */ jsx101(
|
|
10125
10660
|
MuiDateTimePicker,
|
|
10126
10661
|
{
|
|
10127
10662
|
...field,
|
|
@@ -10132,7 +10667,7 @@ var RHFDateTimePickerComponent = ({
|
|
|
10132
10667
|
open: isOpen,
|
|
10133
10668
|
onClose: () => setIsOpen(false),
|
|
10134
10669
|
slots: {
|
|
10135
|
-
textField:
|
|
10670
|
+
textField: TextField8,
|
|
10136
10671
|
...other.slots
|
|
10137
10672
|
},
|
|
10138
10673
|
slotProps: {
|
|
@@ -10160,6 +10695,7 @@ var Field = {
|
|
|
10160
10695
|
OTP: RHFOTPInput,
|
|
10161
10696
|
Switch: RHFSwitch,
|
|
10162
10697
|
Upload: RHFUpload,
|
|
10698
|
+
Select: RHFSelect,
|
|
10163
10699
|
Text: RHFTextField,
|
|
10164
10700
|
Radio: RHFRadioGroup,
|
|
10165
10701
|
Checkbox: RHFCheckbox,
|
|
@@ -10168,35 +10704,36 @@ var Field = {
|
|
|
10168
10704
|
Date: RHFDatePicker,
|
|
10169
10705
|
Time: RHFTimePicker,
|
|
10170
10706
|
DateTime: RHFDateTimePicker,
|
|
10171
|
-
DateRange: RHFDateRangePicker
|
|
10707
|
+
DateRange: RHFDateRangePicker,
|
|
10708
|
+
GooglePlacesAutocomplete: RHFGooglePlacesAutocomplete
|
|
10172
10709
|
};
|
|
10173
10710
|
|
|
10174
10711
|
// src/components/CopyButton/index.tsx
|
|
10175
10712
|
import Tooltip from "@mui/material/Tooltip";
|
|
10176
10713
|
import IconButton6 from "@mui/material/IconButton";
|
|
10177
|
-
import { jsx as
|
|
10714
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
10178
10715
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
10179
10716
|
const { copy, isCopied } = useCopyToClipboard();
|
|
10180
|
-
return /* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsx102(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx102(
|
|
10181
10718
|
IconButton6,
|
|
10182
10719
|
{
|
|
10183
10720
|
size,
|
|
10184
10721
|
onClick: () => copy(text2),
|
|
10185
10722
|
"aria-label": "copy token",
|
|
10186
10723
|
sx: { color: "icon.black" },
|
|
10187
|
-
children: /* @__PURE__ */
|
|
10724
|
+
children: /* @__PURE__ */ jsx102(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
10188
10725
|
}
|
|
10189
10726
|
) });
|
|
10190
10727
|
};
|
|
10191
10728
|
|
|
10192
10729
|
// src/components/LoadingScreen/index.tsx
|
|
10193
10730
|
import Portal2 from "@mui/material/Portal";
|
|
10194
|
-
import
|
|
10731
|
+
import Box25 from "@mui/material/Box";
|
|
10195
10732
|
import LinearProgress from "@mui/material/LinearProgress";
|
|
10196
|
-
import { jsx as
|
|
10733
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
10197
10734
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
10198
|
-
const content = /* @__PURE__ */
|
|
10199
|
-
|
|
10735
|
+
const content = /* @__PURE__ */ jsx103(
|
|
10736
|
+
Box25,
|
|
10200
10737
|
{
|
|
10201
10738
|
sx: {
|
|
10202
10739
|
px: 5,
|
|
@@ -10209,17 +10746,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
10209
10746
|
...sx
|
|
10210
10747
|
},
|
|
10211
10748
|
...rest,
|
|
10212
|
-
children: /* @__PURE__ */
|
|
10749
|
+
children: /* @__PURE__ */ jsx103(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
10213
10750
|
}
|
|
10214
10751
|
);
|
|
10215
10752
|
if (portal) {
|
|
10216
|
-
return /* @__PURE__ */
|
|
10753
|
+
return /* @__PURE__ */ jsx103(Portal2, { children: content });
|
|
10217
10754
|
}
|
|
10218
10755
|
return content;
|
|
10219
10756
|
};
|
|
10220
10757
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
10221
|
-
const content = /* @__PURE__ */
|
|
10222
|
-
|
|
10758
|
+
const content = /* @__PURE__ */ jsx103(
|
|
10759
|
+
Box25,
|
|
10223
10760
|
{
|
|
10224
10761
|
sx: {
|
|
10225
10762
|
right: 0,
|
|
@@ -10235,17 +10772,17 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
10235
10772
|
...sx
|
|
10236
10773
|
},
|
|
10237
10774
|
...rest,
|
|
10238
|
-
children: /* @__PURE__ */
|
|
10775
|
+
children: /* @__PURE__ */ jsx103(AnimatedLogo, {})
|
|
10239
10776
|
}
|
|
10240
10777
|
);
|
|
10241
10778
|
if (portal) {
|
|
10242
|
-
return /* @__PURE__ */
|
|
10779
|
+
return /* @__PURE__ */ jsx103(Portal2, { children: content });
|
|
10243
10780
|
}
|
|
10244
10781
|
return content;
|
|
10245
10782
|
};
|
|
10246
10783
|
|
|
10247
10784
|
// src/theme/core/components/mui-x-data-grid.tsx
|
|
10248
|
-
import { jsx as
|
|
10785
|
+
import { jsx as jsx104, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
10249
10786
|
var MuiDataGrid = {
|
|
10250
10787
|
/** **************************************
|
|
10251
10788
|
* DEFAULT PROPS
|
|
@@ -10253,9 +10790,9 @@ var MuiDataGrid = {
|
|
|
10253
10790
|
defaultProps: {
|
|
10254
10791
|
slots: {
|
|
10255
10792
|
/* Column */
|
|
10256
|
-
columnSortedAscendingIcon: (props) => /* @__PURE__ */
|
|
10257
|
-
columnSortedDescendingIcon: (props) => /* @__PURE__ */
|
|
10258
|
-
columnUnsortedIcon: (props) => /* @__PURE__ */
|
|
10793
|
+
columnSortedAscendingIcon: (props) => /* @__PURE__ */ jsx104(DataGridArrowUpIcon, { sx: { color: "text.primary" }, ...props }),
|
|
10794
|
+
columnSortedDescendingIcon: (props) => /* @__PURE__ */ jsx104(DataGridArrowDownIcon, { sx: { color: "text.primary" }, ...props }),
|
|
10795
|
+
columnUnsortedIcon: (props) => /* @__PURE__ */ jsx104(
|
|
10259
10796
|
DataGridArrowUpIcon,
|
|
10260
10797
|
{
|
|
10261
10798
|
fontSize: props.fontSize,
|
|
@@ -10263,28 +10800,28 @@ var MuiDataGrid = {
|
|
|
10263
10800
|
sx: { color: "text.disabled" }
|
|
10264
10801
|
}
|
|
10265
10802
|
),
|
|
10266
|
-
columnMenuIcon: (props) => /* @__PURE__ */
|
|
10267
|
-
columnMenuSortAscendingIcon: (props) => /* @__PURE__ */
|
|
10268
|
-
columnMenuSortDescendingIcon: (props) => /* @__PURE__ */
|
|
10269
|
-
columnMenuFilterIcon: (props) => /* @__PURE__ */
|
|
10270
|
-
columnMenuHideIcon: (props) => /* @__PURE__ */
|
|
10271
|
-
columnMenuManageColumnsIcon: (props) => /* @__PURE__ */
|
|
10272
|
-
columnSelectorIcon: (props) => /* @__PURE__ */
|
|
10803
|
+
columnMenuIcon: (props) => /* @__PURE__ */ jsx104(DataGridMoreIcon, { width: 20, ...props }),
|
|
10804
|
+
columnMenuSortAscendingIcon: (props) => /* @__PURE__ */ jsx104(DataGridArrowUpIcon, { ...props }),
|
|
10805
|
+
columnMenuSortDescendingIcon: (props) => /* @__PURE__ */ jsx104(DataGridArrowDownIcon, { ...props }),
|
|
10806
|
+
columnMenuFilterIcon: (props) => /* @__PURE__ */ jsx104(DataGridFilterIcon, { ...props }),
|
|
10807
|
+
columnMenuHideIcon: (props) => /* @__PURE__ */ jsx104(DataGridEyeCloseIcon, { ...props }),
|
|
10808
|
+
columnMenuManageColumnsIcon: (props) => /* @__PURE__ */ jsx104(DataGridEyeIcon, { ...props }),
|
|
10809
|
+
columnSelectorIcon: (props) => /* @__PURE__ */ jsx104(DataGridEyeIcon, { ...props }),
|
|
10273
10810
|
/* Filter */
|
|
10274
|
-
filterPanelDeleteIcon: (props) => /* @__PURE__ */
|
|
10275
|
-
openFilterButtonIcon: (props) => /* @__PURE__ */
|
|
10276
|
-
columnFilteredIcon: (props) => /* @__PURE__ */
|
|
10811
|
+
filterPanelDeleteIcon: (props) => /* @__PURE__ */ jsx104(DataGridCloseIcon, { ...props }),
|
|
10812
|
+
openFilterButtonIcon: (props) => /* @__PURE__ */ jsx104(DataGridFilterIcon, { ...props }),
|
|
10813
|
+
columnFilteredIcon: (props) => /* @__PURE__ */ jsx104(DataGridFilterIcon, { sx: { width: 16, color: "text.primary" }, ...props }),
|
|
10277
10814
|
/* Density */
|
|
10278
|
-
densityCompactIcon: (props) => /* @__PURE__ */
|
|
10279
|
-
densityStandardIcon: (props) => /* @__PURE__ */
|
|
10280
|
-
densityComfortableIcon: (props) => /* @__PURE__ */
|
|
10815
|
+
densityCompactIcon: (props) => /* @__PURE__ */ jsx104(DataGridDensityCompactIcon, { ...props }),
|
|
10816
|
+
densityStandardIcon: (props) => /* @__PURE__ */ jsx104(DataGridDensityStandardIcon, { ...props }),
|
|
10817
|
+
densityComfortableIcon: (props) => /* @__PURE__ */ jsx104(DataGridDensityComfortableIcon, { ...props }),
|
|
10281
10818
|
/* Export */
|
|
10282
|
-
exportIcon: (props) => /* @__PURE__ */
|
|
10819
|
+
exportIcon: (props) => /* @__PURE__ */ jsx104(DataGridExportIcon, { ...props }),
|
|
10283
10820
|
/* Quick Filter */
|
|
10284
|
-
quickFilterIcon: (props) => /* @__PURE__ */
|
|
10285
|
-
quickFilterClearIcon: (props) => /* @__PURE__ */
|
|
10821
|
+
quickFilterIcon: (props) => /* @__PURE__ */ jsx104(DataGridSearchIcon, { sx: { width: 24, height: 24, color: "text.secondary" }, ...props }),
|
|
10822
|
+
quickFilterClearIcon: (props) => /* @__PURE__ */ jsx104(DataGridCloseIcon, { ...props }),
|
|
10286
10823
|
/* Actions Column */
|
|
10287
|
-
moreActionsIcon: (props) => /* @__PURE__ */
|
|
10824
|
+
moreActionsIcon: (props) => /* @__PURE__ */ jsx104(Icon, { icon: "MoreHorizontal", sx: { width: 20, height: 20 }, ...props })
|
|
10288
10825
|
},
|
|
10289
10826
|
slotProps: {
|
|
10290
10827
|
basePopper: { placement: "bottom-end" },
|
|
@@ -10461,15 +10998,15 @@ var MuiDataGrid = {
|
|
|
10461
10998
|
}
|
|
10462
10999
|
};
|
|
10463
11000
|
var dataGrid = { MuiDataGrid };
|
|
10464
|
-
var DataGridArrowUpIcon = ({ ...props }) => /* @__PURE__ */
|
|
10465
|
-
/* @__PURE__ */
|
|
11001
|
+
var DataGridArrowUpIcon = ({ ...props }) => /* @__PURE__ */ jsxs63(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: [
|
|
11002
|
+
/* @__PURE__ */ jsx104(
|
|
10466
11003
|
"path",
|
|
10467
11004
|
{
|
|
10468
11005
|
fill: "currentColor",
|
|
10469
11006
|
d: "m8.303 11.596l3.327-3.431a.499.499 0 0 1 .74 0l6.43 6.63c.401.414.158 1.205-.37 1.205h-5.723z"
|
|
10470
11007
|
}
|
|
10471
11008
|
),
|
|
10472
|
-
/* @__PURE__ */
|
|
11009
|
+
/* @__PURE__ */ jsx104(
|
|
10473
11010
|
"path",
|
|
10474
11011
|
{
|
|
10475
11012
|
fill: "currentColor",
|
|
@@ -10478,15 +11015,15 @@ var DataGridArrowUpIcon = ({ ...props }) => /* @__PURE__ */ jsxs61(SvgIcon2, { s
|
|
|
10478
11015
|
}
|
|
10479
11016
|
)
|
|
10480
11017
|
] });
|
|
10481
|
-
var DataGridArrowDownIcon = ({ ...props }) => /* @__PURE__ */
|
|
10482
|
-
/* @__PURE__ */
|
|
11018
|
+
var DataGridArrowDownIcon = ({ ...props }) => /* @__PURE__ */ jsxs63(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: [
|
|
11019
|
+
/* @__PURE__ */ jsx104(
|
|
10483
11020
|
"path",
|
|
10484
11021
|
{
|
|
10485
11022
|
fill: "currentColor",
|
|
10486
11023
|
d: "m8.303 12.404l3.327 3.431c.213.22.527.22.74 0l6.43-6.63C19.201 8.79 18.958 8 18.43 8h-5.723z"
|
|
10487
11024
|
}
|
|
10488
11025
|
),
|
|
10489
|
-
/* @__PURE__ */
|
|
11026
|
+
/* @__PURE__ */ jsx104(
|
|
10490
11027
|
"path",
|
|
10491
11028
|
{
|
|
10492
11029
|
fill: "currentColor",
|
|
@@ -10495,15 +11032,15 @@ var DataGridArrowDownIcon = ({ ...props }) => /* @__PURE__ */ jsxs61(SvgIcon2, {
|
|
|
10495
11032
|
}
|
|
10496
11033
|
)
|
|
10497
11034
|
] });
|
|
10498
|
-
var DataGridFilterIcon = ({ ...props }) => /* @__PURE__ */
|
|
11035
|
+
var DataGridFilterIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsx104(
|
|
10499
11036
|
"path",
|
|
10500
11037
|
{
|
|
10501
11038
|
fill: "currentColor",
|
|
10502
11039
|
d: "M19 3H5c-1.414 0-2.121 0-2.56.412C2 3.824 2 4.488 2 5.815v.69c0 1.037 0 1.556.26 1.986c.26.43.733.698 1.682 1.232l2.913 1.64c.636.358.955.537 1.183.735c.474.411.766.895.898 1.49c.064.284.064.618.064 1.285v2.67c0 .909 0 1.364.252 1.718c.252.355.7.53 1.594.88c1.879.734 2.818 1.101 3.486.683c.668-.417.668-1.372.668-3.282v-2.67c0-.666 0-1 .064-1.285a2.68 2.68 0 0 1 .899-1.49c.227-.197.546-.376 1.182-.735l2.913-1.64c.948-.533 1.423-.8 1.682-1.23c.26-.43.26-.95.26-1.988v-.69c0-1.326 0-1.99-.44-2.402C21.122 3 20.415 3 19 3"
|
|
10503
11040
|
}
|
|
10504
11041
|
) });
|
|
10505
|
-
var DataGridExportIcon = ({ ...props }) => /* @__PURE__ */
|
|
10506
|
-
/* @__PURE__ */
|
|
11042
|
+
var DataGridExportIcon = ({ ...props }) => /* @__PURE__ */ jsxs63(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: [
|
|
11043
|
+
/* @__PURE__ */ jsx104(
|
|
10507
11044
|
"path",
|
|
10508
11045
|
{
|
|
10509
11046
|
fill: "currentColor",
|
|
@@ -10512,7 +11049,7 @@ var DataGridExportIcon = ({ ...props }) => /* @__PURE__ */ jsxs61(SvgIcon2, { sx
|
|
|
10512
11049
|
clipRule: "evenodd"
|
|
10513
11050
|
}
|
|
10514
11051
|
),
|
|
10515
|
-
/* @__PURE__ */
|
|
11052
|
+
/* @__PURE__ */ jsx104(
|
|
10516
11053
|
"path",
|
|
10517
11054
|
{
|
|
10518
11055
|
fill: "currentColor",
|
|
@@ -10520,9 +11057,9 @@ var DataGridExportIcon = ({ ...props }) => /* @__PURE__ */ jsxs61(SvgIcon2, { sx
|
|
|
10520
11057
|
}
|
|
10521
11058
|
)
|
|
10522
11059
|
] });
|
|
10523
|
-
var DataGridEyeIcon = ({ ...props }) => /* @__PURE__ */
|
|
10524
|
-
/* @__PURE__ */
|
|
10525
|
-
/* @__PURE__ */
|
|
11060
|
+
var DataGridEyeIcon = ({ ...props }) => /* @__PURE__ */ jsxs63(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: [
|
|
11061
|
+
/* @__PURE__ */ jsx104("path", { fill: "currentColor", d: "M9.75 12a2.25 2.25 0 1 1 4.5 0a2.25 2.25 0 0 1-4.5 0" }),
|
|
11062
|
+
/* @__PURE__ */ jsx104(
|
|
10526
11063
|
"path",
|
|
10527
11064
|
{
|
|
10528
11065
|
fill: "currentColor",
|
|
@@ -10532,7 +11069,7 @@ var DataGridEyeIcon = ({ ...props }) => /* @__PURE__ */ jsxs61(SvgIcon2, { sx: {
|
|
|
10532
11069
|
}
|
|
10533
11070
|
)
|
|
10534
11071
|
] });
|
|
10535
|
-
var DataGridEyeCloseIcon = ({ ...props }) => /* @__PURE__ */
|
|
11072
|
+
var DataGridEyeCloseIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsx104(
|
|
10536
11073
|
"path",
|
|
10537
11074
|
{
|
|
10538
11075
|
fill: "currentColor",
|
|
@@ -10541,23 +11078,23 @@ var DataGridEyeCloseIcon = ({ ...props }) => /* @__PURE__ */ jsx100(SvgIcon2, {
|
|
|
10541
11078
|
clipRule: "evenodd"
|
|
10542
11079
|
}
|
|
10543
11080
|
) });
|
|
10544
|
-
var DataGridSearchIcon = ({ ...props }) => /* @__PURE__ */
|
|
11081
|
+
var DataGridSearchIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsx104(
|
|
10545
11082
|
"path",
|
|
10546
11083
|
{
|
|
10547
11084
|
fill: "currentColor",
|
|
10548
11085
|
d: "m20.71 19.29l-3.4-3.39A7.92 7.92 0 0 0 19 11a8 8 0 1 0-8 8a7.92 7.92 0 0 0 4.9-1.69l3.39 3.4a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42M5 11a6 6 0 1 1 6 6a6 6 0 0 1-6-6"
|
|
10549
11086
|
}
|
|
10550
11087
|
) });
|
|
10551
|
-
var DataGridCloseIcon = ({ ...props }) => /* @__PURE__ */
|
|
11088
|
+
var DataGridCloseIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsx104(
|
|
10552
11089
|
"path",
|
|
10553
11090
|
{
|
|
10554
11091
|
fill: "currentColor",
|
|
10555
11092
|
d: "m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"
|
|
10556
11093
|
}
|
|
10557
11094
|
) });
|
|
10558
|
-
var DataGridMoreIcon = ({ ...props }) => /* @__PURE__ */
|
|
10559
|
-
/* @__PURE__ */
|
|
10560
|
-
/* @__PURE__ */
|
|
11095
|
+
var DataGridMoreIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsxs63("g", { fill: "none", children: [
|
|
11096
|
+
/* @__PURE__ */ jsx104("path", { d: "M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }),
|
|
11097
|
+
/* @__PURE__ */ jsx104(
|
|
10561
11098
|
"path",
|
|
10562
11099
|
{
|
|
10563
11100
|
fill: "currentColor",
|
|
@@ -10565,16 +11102,16 @@ var DataGridMoreIcon = ({ ...props }) => /* @__PURE__ */ jsx100(SvgIcon2, { sx:
|
|
|
10565
11102
|
}
|
|
10566
11103
|
)
|
|
10567
11104
|
] }) });
|
|
10568
|
-
var DataGridDensityCompactIcon = ({ ...props }) => /* @__PURE__ */
|
|
11105
|
+
var DataGridDensityCompactIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsx104(
|
|
10569
11106
|
"path",
|
|
10570
11107
|
{
|
|
10571
11108
|
fill: "currentColor",
|
|
10572
11109
|
d: "M4 15.5q-.425 0-.712-.288T3 14.5V14q0-.425.288-.712T4 13h16q.425 0 .713.288T21 14v.5q0 .425-.288.713T20 15.5zM4 11q-.425 0-.712-.288T3 10v-.5q0-.425.288-.712T4 8.5h16q.425 0 .713.288T21 9.5v.5q0 .425-.288.713T20 11zm0-4.5q-.425 0-.712-.288T3 5.5V5q0-.425.288-.712T4 4h16q.425 0 .713.288T21 5v.5q0 .425-.288.713T20 6.5zM4 20q-.425 0-.712-.288T3 19v-.5q0-.425.288-.712T4 17.5h16q.425 0 .713.288T21 18.5v.5q0 .425-.288.713T20 20z"
|
|
10573
11110
|
}
|
|
10574
11111
|
) });
|
|
10575
|
-
var DataGridDensityComfortableIcon = ({ ...props }) => /* @__PURE__ */
|
|
10576
|
-
/* @__PURE__ */
|
|
10577
|
-
/* @__PURE__ */
|
|
11112
|
+
var DataGridDensityComfortableIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsxs63("g", { fill: "none", fillRule: "evenodd", children: [
|
|
11113
|
+
/* @__PURE__ */ jsx104("path", { d: "M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }),
|
|
11114
|
+
/* @__PURE__ */ jsx104(
|
|
10578
11115
|
"path",
|
|
10579
11116
|
{
|
|
10580
11117
|
fill: "currentColor",
|
|
@@ -10582,9 +11119,9 @@ var DataGridDensityComfortableIcon = ({ ...props }) => /* @__PURE__ */ jsx100(Sv
|
|
|
10582
11119
|
}
|
|
10583
11120
|
)
|
|
10584
11121
|
] }) });
|
|
10585
|
-
var DataGridDensityStandardIcon = ({ ...props }) => /* @__PURE__ */
|
|
10586
|
-
/* @__PURE__ */
|
|
10587
|
-
/* @__PURE__ */
|
|
11122
|
+
var DataGridDensityStandardIcon = ({ ...props }) => /* @__PURE__ */ jsx104(SvgIcon3, { sx: { width: 20, height: 20, ...props.sx }, ...props, children: /* @__PURE__ */ jsxs63("g", { fill: "none", children: [
|
|
11123
|
+
/* @__PURE__ */ jsx104("path", { d: "M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }),
|
|
11124
|
+
/* @__PURE__ */ jsx104(
|
|
10588
11125
|
"path",
|
|
10589
11126
|
{
|
|
10590
11127
|
fill: "currentColor",
|
|
@@ -10744,12 +11281,12 @@ var buttonGroup = { MuiButtonGroup };
|
|
|
10744
11281
|
// src/theme/core/components/autocomplete.tsx
|
|
10745
11282
|
import { svgIconClasses as svgIconClasses3 } from "@mui/material/SvgIcon";
|
|
10746
11283
|
import { autocompleteClasses as autocompleteClasses3 } from "@mui/material/Autocomplete";
|
|
10747
|
-
import { jsx as
|
|
11284
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
10748
11285
|
var MuiAutocomplete = {
|
|
10749
11286
|
/** **************************************
|
|
10750
11287
|
* DEFAULT PROPS
|
|
10751
11288
|
*************************************** */
|
|
10752
|
-
defaultProps: { popupIcon: /* @__PURE__ */
|
|
11289
|
+
defaultProps: { popupIcon: /* @__PURE__ */ jsx105(Icon, { icon: "NavArrowDown" }) },
|
|
10753
11290
|
/** **************************************
|
|
10754
11291
|
* STYLE
|
|
10755
11292
|
*************************************** */
|
|
@@ -10874,11 +11411,11 @@ var toggleButton = { MuiToggleButton, MuiToggleButtonGroup };
|
|
|
10874
11411
|
|
|
10875
11412
|
// src/theme/core/components/mui-x-date-picker.tsx
|
|
10876
11413
|
import IconButton7 from "@mui/material/IconButton";
|
|
10877
|
-
import
|
|
11414
|
+
import Typography14 from "@mui/material/Typography";
|
|
10878
11415
|
import { buttonClasses as buttonClasses3 } from "@mui/material/Button";
|
|
10879
11416
|
import { styled as styled3 } from "@mui/material/styles";
|
|
10880
11417
|
import { dialogActionsClasses } from "@mui/material/DialogActions";
|
|
10881
|
-
import { jsx as
|
|
11418
|
+
import { jsx as jsx106, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10882
11419
|
var CustomCalendarHeaderRoot = styled3("div")(({ theme }) => ({
|
|
10883
11420
|
display: "flex",
|
|
10884
11421
|
justifyContent: "space-between",
|
|
@@ -10916,10 +11453,10 @@ function CustomCalendarHeader(props) {
|
|
|
10916
11453
|
onViewChange("year");
|
|
10917
11454
|
}
|
|
10918
11455
|
};
|
|
10919
|
-
return /* @__PURE__ */
|
|
10920
|
-
/* @__PURE__ */
|
|
10921
|
-
/* @__PURE__ */
|
|
10922
|
-
|
|
11456
|
+
return /* @__PURE__ */ jsxs64(CustomCalendarHeaderRoot, { children: [
|
|
11457
|
+
/* @__PURE__ */ jsx106(CustomIconButton, { onClick: selectPreviousMonth, title: "Previous month", size: "small", children: /* @__PURE__ */ jsx106(Icon, { icon: "NavArrowLeft", width: 16 }) }),
|
|
11458
|
+
/* @__PURE__ */ jsx106(
|
|
11459
|
+
Typography14,
|
|
10923
11460
|
{
|
|
10924
11461
|
variant: "subtitle1",
|
|
10925
11462
|
onClick: handleLabelClick,
|
|
@@ -10933,7 +11470,7 @@ function CustomCalendarHeader(props) {
|
|
|
10933
11470
|
children: monthLabel
|
|
10934
11471
|
}
|
|
10935
11472
|
),
|
|
10936
|
-
/* @__PURE__ */
|
|
11473
|
+
/* @__PURE__ */ jsx106(CustomIconButton, { onClick: selectNextMonth, title: "Next month", size: "small", children: /* @__PURE__ */ jsx106(Icon, { icon: "NavArrowRight", width: 16 }) })
|
|
10937
11474
|
] });
|
|
10938
11475
|
}
|
|
10939
11476
|
var localeText = {
|
|
@@ -10941,13 +11478,13 @@ var localeText = {
|
|
|
10941
11478
|
};
|
|
10942
11479
|
var defaultProps = {
|
|
10943
11480
|
date: {
|
|
10944
|
-
openPickerIcon: () => /* @__PURE__ */
|
|
11481
|
+
openPickerIcon: () => /* @__PURE__ */ jsx106(Icon, { icon: "Calendar", sx: { width: 20, height: 20 } }),
|
|
10945
11482
|
calendarHeader: CustomCalendarHeader
|
|
10946
11483
|
},
|
|
10947
11484
|
time: {
|
|
10948
|
-
openPickerIcon: () => /* @__PURE__ */
|
|
10949
|
-
rightArrowIcon: () => /* @__PURE__ */
|
|
10950
|
-
switchViewIcon: () => /* @__PURE__ */
|
|
11485
|
+
openPickerIcon: () => /* @__PURE__ */ jsx106(Icon, { icon: "Clock", sx: { width: 20, height: 20 } }),
|
|
11486
|
+
rightArrowIcon: () => /* @__PURE__ */ jsx106(Icon, { icon: "NavArrowRight" }),
|
|
11487
|
+
switchViewIcon: () => /* @__PURE__ */ jsx106(Icon, { icon: "NavArrowDownSolid" })
|
|
10951
11488
|
}
|
|
10952
11489
|
};
|
|
10953
11490
|
var dateViews = ["year", "month", "day"];
|
|
@@ -11378,18 +11915,18 @@ import "@fontsource/geist/500.css";
|
|
|
11378
11915
|
import "@fontsource/geist/600.css";
|
|
11379
11916
|
import "@fontsource/geist/700.css";
|
|
11380
11917
|
import "./satoshi-4X3TX4PE.css";
|
|
11381
|
-
import { jsx as
|
|
11918
|
+
import { jsx as jsx107, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
11382
11919
|
var ThemeProvider = ({ children }) => {
|
|
11383
11920
|
const settings = useSettings();
|
|
11384
11921
|
const theme = createTheme(settings);
|
|
11385
|
-
return /* @__PURE__ */
|
|
11922
|
+
return /* @__PURE__ */ jsxs65(
|
|
11386
11923
|
MuiThemeProvider,
|
|
11387
11924
|
{
|
|
11388
11925
|
theme,
|
|
11389
11926
|
defaultMode: schemeConfig.defaultMode,
|
|
11390
11927
|
modeStorageKey: schemeConfig.modeStorageKey,
|
|
11391
11928
|
children: [
|
|
11392
|
-
/* @__PURE__ */
|
|
11929
|
+
/* @__PURE__ */ jsx107(CssBaseline, {}),
|
|
11393
11930
|
children
|
|
11394
11931
|
]
|
|
11395
11932
|
}
|
|
@@ -11431,6 +11968,8 @@ export {
|
|
|
11431
11968
|
FilterDropdown,
|
|
11432
11969
|
FilterList,
|
|
11433
11970
|
Form,
|
|
11971
|
+
GooglePlacesAutocomplete,
|
|
11972
|
+
GooglePlacesProvider,
|
|
11434
11973
|
HelpCircle,
|
|
11435
11974
|
Icon,
|
|
11436
11975
|
Image,
|
|
@@ -11457,10 +11996,12 @@ export {
|
|
|
11457
11996
|
RHFDatePicker,
|
|
11458
11997
|
RHFDateRangePicker,
|
|
11459
11998
|
RHFDateTimePicker,
|
|
11999
|
+
RHFGooglePlacesAutocomplete,
|
|
11460
12000
|
RHFMultiCheckbox,
|
|
11461
12001
|
RHFMultiSwitch,
|
|
11462
12002
|
RHFOTPInput,
|
|
11463
12003
|
RHFRadioGroup,
|
|
12004
|
+
RHFSelect,
|
|
11464
12005
|
RHFSwitch,
|
|
11465
12006
|
RHFTextField,
|
|
11466
12007
|
RHFTimePicker,
|
|
@@ -11582,6 +12123,9 @@ export {
|
|
|
11582
12123
|
useCountdownDate,
|
|
11583
12124
|
useCountdownSeconds,
|
|
11584
12125
|
useEventListener,
|
|
12126
|
+
useGooglePlacesAutocomplete,
|
|
12127
|
+
useGooglePlacesContext,
|
|
12128
|
+
useGooglePlacesLoaded,
|
|
11585
12129
|
useLocalStorage,
|
|
11586
12130
|
usePopover,
|
|
11587
12131
|
useResponsive,
|