@mamrp/components 1.2.0 → 1.2.2
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/charts/index.d.mts +0 -0
- package/dist/charts/index.d.ts +0 -0
- package/dist/charts/index.js +0 -0
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/index.mjs +0 -0
- package/dist/charts/index.mjs.map +1 -1
- package/dist/index.d.mts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +529 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +497 -203
- package/dist/index.mjs.map +1 -1
- package/dist/selectors/index.d.mts +0 -0
- package/dist/selectors/index.d.ts +0 -0
- package/dist/selectors/index.js +0 -0
- package/dist/selectors/index.js.map +1 -1
- package/dist/selectors/index.mjs +0 -0
- package/dist/selectors/index.mjs.map +1 -1
- package/package.json +84 -84
package/dist/index.mjs
CHANGED
|
@@ -1914,17 +1914,211 @@ var JalaliDateTimeRangePicker = ({
|
|
|
1914
1914
|
};
|
|
1915
1915
|
var date_time_range_picker_default = JalaliDateTimeRangePicker;
|
|
1916
1916
|
|
|
1917
|
+
// src/date-month/index.tsx
|
|
1918
|
+
import { Box as Box10, Typography as Typography7 } from "@mui/material";
|
|
1919
|
+
import CircularProgress3 from "@mui/material/CircularProgress";
|
|
1920
|
+
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-pickers";
|
|
1921
|
+
import { AdapterMomentJalaali as AdapterMomentJalaali4 } from "@mui/x-date-pickers/AdapterMomentJalaali";
|
|
1922
|
+
import dayjs2 from "dayjs";
|
|
1923
|
+
import moment6 from "moment-jalaali";
|
|
1924
|
+
import "moment/locale/fa";
|
|
1925
|
+
import React12, { useState as useState7 } from "react";
|
|
1926
|
+
import { Controller as Controller6 } from "react-hook-form";
|
|
1927
|
+
moment6.locale("fa");
|
|
1928
|
+
moment6.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
|
|
1929
|
+
var DateMonthPicker = ({
|
|
1930
|
+
name,
|
|
1931
|
+
control,
|
|
1932
|
+
label,
|
|
1933
|
+
size = "medium",
|
|
1934
|
+
disabled = false,
|
|
1935
|
+
align = "left",
|
|
1936
|
+
isLoading,
|
|
1937
|
+
maxDate,
|
|
1938
|
+
minDate,
|
|
1939
|
+
clear = true
|
|
1940
|
+
}) => {
|
|
1941
|
+
const today = moment6();
|
|
1942
|
+
const [open, setOpen] = useState7(false);
|
|
1943
|
+
const customLocaleText = {
|
|
1944
|
+
cancelButtonLabel: "\u0644\u063A\u0648",
|
|
1945
|
+
okButtonLabel: "\u062A\u0623\u06CC\u06CC\u062F",
|
|
1946
|
+
todayButtonLabel: "\u0627\u0645\u0631\u0648\u0632",
|
|
1947
|
+
clearButtonLabel: "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646",
|
|
1948
|
+
start: "\u0634\u0631\u0648\u0639",
|
|
1949
|
+
end: "\u067E\u0627\u06CC\u0627\u0646",
|
|
1950
|
+
previousMonth: "\u0645\u0627\u0647 \u0642\u0628\u0644",
|
|
1951
|
+
nextMonth: "\u0645\u0627\u0647 \u0628\u0639\u062F",
|
|
1952
|
+
openDatePickerDialogue: (date, utils, formattedDate) => `\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E ${formattedDate ? `(${formattedDate})` : ""}`,
|
|
1953
|
+
selectDate: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
1954
|
+
datePickerToolbarTitle: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
1955
|
+
calendarWeekNumberHeaderLabel: "\u0647\u0641\u062A\u0647",
|
|
1956
|
+
calendarWeekNumberHeaderText: "#",
|
|
1957
|
+
calendarWeekNumberAriaLabelText: (weekNumber) => `\u0647\u0641\u062A\u0647 ${weekNumber}`,
|
|
1958
|
+
calendarWeekNumberText: (weekNumber) => `${weekNumber}`
|
|
1959
|
+
};
|
|
1960
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1961
|
+
LocalizationProvider4,
|
|
1962
|
+
{
|
|
1963
|
+
dateAdapter: AdapterMomentJalaali4,
|
|
1964
|
+
localeText: customLocaleText
|
|
1965
|
+
},
|
|
1966
|
+
/* @__PURE__ */ React12.createElement(
|
|
1967
|
+
Controller6,
|
|
1968
|
+
{
|
|
1969
|
+
name,
|
|
1970
|
+
control,
|
|
1971
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ React12.createElement(Box10, { sx: { width: "100%" } }, /* @__PURE__ */ React12.createElement(
|
|
1972
|
+
DatePicker2,
|
|
1973
|
+
{
|
|
1974
|
+
disabled: isLoading || disabled,
|
|
1975
|
+
closeOnSelect: true,
|
|
1976
|
+
openTo: "month",
|
|
1977
|
+
views: ["year", "month"],
|
|
1978
|
+
label,
|
|
1979
|
+
value: field.value ? moment6(field.value) : null,
|
|
1980
|
+
slotProps: {
|
|
1981
|
+
...clear && !disabled ? { field: { clearable: true } } : {},
|
|
1982
|
+
popper: {
|
|
1983
|
+
modifiers: [
|
|
1984
|
+
{
|
|
1985
|
+
name: "preventOverflow",
|
|
1986
|
+
options: {
|
|
1987
|
+
boundary: "window"
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
name: "flip",
|
|
1992
|
+
options: {
|
|
1993
|
+
fallbackPlacements: ["right", "left", "top"]
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
]
|
|
1997
|
+
},
|
|
1998
|
+
textField: {
|
|
1999
|
+
size,
|
|
2000
|
+
placeholder: field.value ? "" : "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
2001
|
+
InputLabelProps: {
|
|
2002
|
+
shrink: true,
|
|
2003
|
+
style: { color: error ? "#D32F2F" : "inherit" }
|
|
2004
|
+
},
|
|
2005
|
+
InputProps: {
|
|
2006
|
+
...isLoading && {
|
|
2007
|
+
endAdornment: /* @__PURE__ */ React12.createElement(CircularProgress3, { color: "secondary", size: 20 })
|
|
2008
|
+
} || disabled && { endAdornment: false },
|
|
2009
|
+
...field.value && {
|
|
2010
|
+
value: `${moment6(field.value).format("jMMMM jYYYY")}`
|
|
2011
|
+
},
|
|
2012
|
+
sx: {
|
|
2013
|
+
textAlign: align,
|
|
2014
|
+
"& input": {
|
|
2015
|
+
textAlign: align,
|
|
2016
|
+
direction: "rtl"
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
actionBar: {
|
|
2022
|
+
actions: ["cancel", "accept"]
|
|
2023
|
+
// نمایش دکمههای تأیید، لغو و پاک کردن
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
onChange: (value) => {
|
|
2027
|
+
if (value == null) {
|
|
2028
|
+
field.onChange(null);
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
onAccept: (newValue) => {
|
|
2032
|
+
if (newValue) {
|
|
2033
|
+
const currentDate = dayjs2(newValue);
|
|
2034
|
+
const nowUTC3 = /* @__PURE__ */ new Date();
|
|
2035
|
+
let iranHour = nowUTC3.getUTCHours();
|
|
2036
|
+
let iranMinute = nowUTC3.getUTCMinutes();
|
|
2037
|
+
const dateTimeWithIranTime4 = currentDate.hour(iranHour).minute(iranMinute).second(nowUTC3.getUTCSeconds());
|
|
2038
|
+
field.onChange(
|
|
2039
|
+
dateTimeWithIranTime4.format("YYYY-MM-DDTHH:mm:ss")
|
|
2040
|
+
);
|
|
2041
|
+
} else {
|
|
2042
|
+
field.onChange(null);
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
sx: {
|
|
2046
|
+
width: "100%",
|
|
2047
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4",
|
|
2048
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
2049
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4"
|
|
2050
|
+
},
|
|
2051
|
+
"& .MuiInputBase-root": {
|
|
2052
|
+
height: size === "small" ? 40 : 56
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
slots: {
|
|
2056
|
+
...!clear && {
|
|
2057
|
+
clearButton: React12.Fragment,
|
|
2058
|
+
clearIcon: React12.Fragment
|
|
2059
|
+
},
|
|
2060
|
+
toolbar: (props) => {
|
|
2061
|
+
const currentDate = moment6(field.value);
|
|
2062
|
+
const formattedDate = currentDate.format("jMMMM jYYYY");
|
|
2063
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2064
|
+
Box10,
|
|
2065
|
+
{
|
|
2066
|
+
sx: {
|
|
2067
|
+
my: 2,
|
|
2068
|
+
mx: 4
|
|
2069
|
+
}
|
|
2070
|
+
},
|
|
2071
|
+
/* @__PURE__ */ React12.createElement(Typography7, { variant: "overline", color: "primary" }, "\u0645\u0627\u0647 \u0648 \u0633\u0627\u0644 \u0631\u0627 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F"),
|
|
2072
|
+
/* @__PURE__ */ React12.createElement(Typography7, { variant: "h4" }, formattedDate == "Invalid date" ? "" : formattedDate)
|
|
2073
|
+
);
|
|
2074
|
+
},
|
|
2075
|
+
monthButton: (props) => {
|
|
2076
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2077
|
+
"button",
|
|
2078
|
+
{
|
|
2079
|
+
className: `${props.className}`,
|
|
2080
|
+
style: {
|
|
2081
|
+
width: "80%",
|
|
2082
|
+
padding: "10px",
|
|
2083
|
+
marginBottom: "20px",
|
|
2084
|
+
border: "1px solid #ccc",
|
|
2085
|
+
borderRadius: "12px",
|
|
2086
|
+
backgroundColor: props.disabled ? "#f0f0f0" : "#f0000",
|
|
2087
|
+
fontSize: "14px",
|
|
2088
|
+
cursor: props.disabled ? "default" : "pointer"
|
|
2089
|
+
},
|
|
2090
|
+
disabled: props.disabled,
|
|
2091
|
+
onFocus: props.onFocus,
|
|
2092
|
+
onBlur: props.onBlur,
|
|
2093
|
+
onClick: props.onClick,
|
|
2094
|
+
ref: props.ref
|
|
2095
|
+
},
|
|
2096
|
+
props["aria-label"],
|
|
2097
|
+
" "
|
|
2098
|
+
);
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
minDate: minDate ? minDate : null,
|
|
2102
|
+
maxDate: maxDate ? maxDate : today
|
|
2103
|
+
}
|
|
2104
|
+
), error && /* @__PURE__ */ React12.createElement(Typography7, { fontSize: 13, color: "error", sx: { mt: 0.6, ml: 1 } }, error.message))
|
|
2105
|
+
}
|
|
2106
|
+
)
|
|
2107
|
+
);
|
|
2108
|
+
};
|
|
2109
|
+
var date_month_default = DateMonthPicker;
|
|
2110
|
+
|
|
1917
2111
|
// src/license-plate-search/index.tsx
|
|
1918
2112
|
import { convertToEnglishDigits as convertToEnglishDigits2, convertToPersianDigits as convertToPersianDigits2 } from "@mamrp/utils";
|
|
1919
|
-
import { Box as
|
|
2113
|
+
import { Box as Box11, IconButton as IconButton4, Typography as Typography8 } from "@mui/material";
|
|
1920
2114
|
import Button7 from "@mui/material/Button";
|
|
1921
2115
|
import Dialog4 from "@mui/material/Dialog";
|
|
1922
2116
|
import DialogContent4 from "@mui/material/DialogContent";
|
|
1923
2117
|
import DialogTitle4 from "@mui/material/DialogTitle";
|
|
1924
2118
|
import Image2 from "next/image";
|
|
1925
|
-
import { useEffect as useEffect6, useRef as useRef3, useState as
|
|
2119
|
+
import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } from "react";
|
|
1926
2120
|
import { IoClose as IoClose2 } from "react-icons/io5";
|
|
1927
|
-
import
|
|
2121
|
+
import React13 from "react";
|
|
1928
2122
|
function SearchLicensePlate({
|
|
1929
2123
|
width = "100%",
|
|
1930
2124
|
part,
|
|
@@ -1933,9 +2127,9 @@ function SearchLicensePlate({
|
|
|
1933
2127
|
readOnly = true,
|
|
1934
2128
|
size
|
|
1935
2129
|
}) {
|
|
1936
|
-
const [open, setOpen] =
|
|
1937
|
-
const [selectedValue, setSelectedValue] =
|
|
1938
|
-
const [inputValues, setInputValues] =
|
|
2130
|
+
const [open, setOpen] = useState8(false);
|
|
2131
|
+
const [selectedValue, setSelectedValue] = useState8("");
|
|
2132
|
+
const [inputValues, setInputValues] = useState8({
|
|
1939
2133
|
input1: "",
|
|
1940
2134
|
input2: "",
|
|
1941
2135
|
input3: "",
|
|
@@ -1993,8 +2187,8 @@ function SearchLicensePlate({
|
|
|
1993
2187
|
}
|
|
1994
2188
|
}
|
|
1995
2189
|
};
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
|
|
2190
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
2191
|
+
Box11,
|
|
1998
2192
|
{
|
|
1999
2193
|
sx: {
|
|
2000
2194
|
width,
|
|
@@ -2005,16 +2199,16 @@ function SearchLicensePlate({
|
|
|
2005
2199
|
},
|
|
2006
2200
|
dir: "ltr"
|
|
2007
2201
|
},
|
|
2008
|
-
/* @__PURE__ */
|
|
2009
|
-
|
|
2202
|
+
/* @__PURE__ */ React13.createElement(
|
|
2203
|
+
Box11,
|
|
2010
2204
|
{
|
|
2011
2205
|
sx: {
|
|
2012
2206
|
display: "flex",
|
|
2013
2207
|
alignItems: "center"
|
|
2014
2208
|
}
|
|
2015
2209
|
},
|
|
2016
|
-
/* @__PURE__ */
|
|
2017
|
-
|
|
2210
|
+
/* @__PURE__ */ React13.createElement(
|
|
2211
|
+
Box11,
|
|
2018
2212
|
{
|
|
2019
2213
|
sx: {
|
|
2020
2214
|
backgroundColor: "#172554",
|
|
@@ -2028,7 +2222,7 @@ function SearchLicensePlate({
|
|
|
2028
2222
|
mr: 0.4
|
|
2029
2223
|
}
|
|
2030
2224
|
},
|
|
2031
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ React13.createElement(
|
|
2032
2226
|
Image2,
|
|
2033
2227
|
{
|
|
2034
2228
|
src: "/assets/images/iran-flag-dark.svg",
|
|
@@ -2052,8 +2246,8 @@ function SearchLicensePlate({
|
|
|
2052
2246
|
)
|
|
2053
2247
|
)
|
|
2054
2248
|
),
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
|
|
2249
|
+
/* @__PURE__ */ React13.createElement(
|
|
2250
|
+
Box11,
|
|
2057
2251
|
{
|
|
2058
2252
|
sx: {
|
|
2059
2253
|
width: "100%",
|
|
@@ -2066,7 +2260,7 @@ function SearchLicensePlate({
|
|
|
2066
2260
|
alignItems: "center"
|
|
2067
2261
|
}
|
|
2068
2262
|
},
|
|
2069
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ React13.createElement(
|
|
2070
2264
|
"input",
|
|
2071
2265
|
{
|
|
2072
2266
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2091,15 +2285,15 @@ function SearchLicensePlate({
|
|
|
2091
2285
|
}
|
|
2092
2286
|
}
|
|
2093
2287
|
),
|
|
2094
|
-
/* @__PURE__ */
|
|
2095
|
-
|
|
2288
|
+
/* @__PURE__ */ React13.createElement(
|
|
2289
|
+
Box11,
|
|
2096
2290
|
{
|
|
2097
2291
|
sx: {
|
|
2098
2292
|
display: "flex",
|
|
2099
2293
|
alignItems: "center"
|
|
2100
2294
|
}
|
|
2101
2295
|
},
|
|
2102
|
-
!data && /* @__PURE__ */
|
|
2296
|
+
!data && /* @__PURE__ */ React13.createElement(
|
|
2103
2297
|
Image2,
|
|
2104
2298
|
{
|
|
2105
2299
|
src: "/assets/images/solid-arrow-down.svg",
|
|
@@ -2109,7 +2303,7 @@ function SearchLicensePlate({
|
|
|
2109
2303
|
style: { cursor: "pointer", marginRight: 4 }
|
|
2110
2304
|
}
|
|
2111
2305
|
),
|
|
2112
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ React13.createElement(
|
|
2113
2307
|
"input",
|
|
2114
2308
|
{
|
|
2115
2309
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2135,7 +2329,7 @@ function SearchLicensePlate({
|
|
|
2135
2329
|
}
|
|
2136
2330
|
)
|
|
2137
2331
|
),
|
|
2138
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ React13.createElement(
|
|
2139
2333
|
Dialog4,
|
|
2140
2334
|
{
|
|
2141
2335
|
dir: "rtl",
|
|
@@ -2144,8 +2338,8 @@ function SearchLicensePlate({
|
|
|
2144
2338
|
"aria-labelledby": "alert-dialog-title",
|
|
2145
2339
|
"aria-describedby": "alert-dialog-description"
|
|
2146
2340
|
},
|
|
2147
|
-
/* @__PURE__ */
|
|
2148
|
-
|
|
2341
|
+
/* @__PURE__ */ React13.createElement(
|
|
2342
|
+
Box11,
|
|
2149
2343
|
{
|
|
2150
2344
|
sx: {
|
|
2151
2345
|
display: "flex",
|
|
@@ -2155,9 +2349,9 @@ function SearchLicensePlate({
|
|
|
2155
2349
|
// bg-neutral-100
|
|
2156
2350
|
}
|
|
2157
2351
|
},
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
|
|
2352
|
+
/* @__PURE__ */ React13.createElement(DialogTitle4, { id: "alert-dialog-title" }, "\u0627\u0646\u062A\u062E\u0627\u0628 \u062D\u0631\u0641 \u067E\u0644\u0627\u06A9"),
|
|
2353
|
+
/* @__PURE__ */ React13.createElement(
|
|
2354
|
+
Box11,
|
|
2161
2355
|
{
|
|
2162
2356
|
sx: {
|
|
2163
2357
|
cursor: "pointer",
|
|
@@ -2167,11 +2361,11 @@ function SearchLicensePlate({
|
|
|
2167
2361
|
},
|
|
2168
2362
|
onClick: () => setOpen(false)
|
|
2169
2363
|
},
|
|
2170
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ React13.createElement(IconButton4, null, /* @__PURE__ */ React13.createElement(IoClose2, null))
|
|
2171
2365
|
)
|
|
2172
2366
|
),
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
|
|
2367
|
+
/* @__PURE__ */ React13.createElement(DialogContent4, null, /* @__PURE__ */ React13.createElement(
|
|
2368
|
+
Box11,
|
|
2175
2369
|
{
|
|
2176
2370
|
sx: {
|
|
2177
2371
|
display: "flex",
|
|
@@ -2182,7 +2376,7 @@ function SearchLicensePlate({
|
|
|
2182
2376
|
my: 2
|
|
2183
2377
|
}
|
|
2184
2378
|
},
|
|
2185
|
-
letters_default.map((letter, index) => /* @__PURE__ */
|
|
2379
|
+
letters_default.map((letter, index) => /* @__PURE__ */ React13.createElement(
|
|
2186
2380
|
Button7,
|
|
2187
2381
|
{
|
|
2188
2382
|
key: index,
|
|
@@ -2200,9 +2394,9 @@ function SearchLicensePlate({
|
|
|
2200
2394
|
},
|
|
2201
2395
|
onClick: () => handleInputChange(letter, "input2", 3, 1)
|
|
2202
2396
|
},
|
|
2203
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ React13.createElement(Typography8, { color: "#117A4F", fontWeight: "bold" }, letter)
|
|
2204
2398
|
))
|
|
2205
|
-
), /* @__PURE__ */
|
|
2399
|
+
), /* @__PURE__ */ React13.createElement(Box11, { sx: { display: "flex", justifyContent: "center", mt: 2.5 } }, /* @__PURE__ */ React13.createElement(
|
|
2206
2400
|
Button7,
|
|
2207
2401
|
{
|
|
2208
2402
|
sx: { width: "6rem" },
|
|
@@ -2216,7 +2410,7 @@ function SearchLicensePlate({
|
|
|
2216
2410
|
"\u062D\u0630\u0641 \u062D\u0631\u0641"
|
|
2217
2411
|
)))
|
|
2218
2412
|
),
|
|
2219
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ React13.createElement(
|
|
2220
2414
|
"input",
|
|
2221
2415
|
{
|
|
2222
2416
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2242,8 +2436,8 @@ function SearchLicensePlate({
|
|
|
2242
2436
|
}
|
|
2243
2437
|
}
|
|
2244
2438
|
),
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
|
|
2439
|
+
/* @__PURE__ */ React13.createElement(
|
|
2440
|
+
Box11,
|
|
2247
2441
|
{
|
|
2248
2442
|
sx: {
|
|
2249
2443
|
height: "40px",
|
|
@@ -2252,8 +2446,8 @@ function SearchLicensePlate({
|
|
|
2252
2446
|
}
|
|
2253
2447
|
}
|
|
2254
2448
|
),
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
|
|
2449
|
+
/* @__PURE__ */ React13.createElement(
|
|
2450
|
+
Box11,
|
|
2257
2451
|
{
|
|
2258
2452
|
sx: {
|
|
2259
2453
|
display: "flex",
|
|
@@ -2262,7 +2456,7 @@ function SearchLicensePlate({
|
|
|
2262
2456
|
alignItems: "center"
|
|
2263
2457
|
}
|
|
2264
2458
|
},
|
|
2265
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ React13.createElement(
|
|
2266
2460
|
"input",
|
|
2267
2461
|
{
|
|
2268
2462
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2287,7 +2481,7 @@ function SearchLicensePlate({
|
|
|
2287
2481
|
}
|
|
2288
2482
|
}
|
|
2289
2483
|
),
|
|
2290
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ React13.createElement(
|
|
2291
2485
|
Image2,
|
|
2292
2486
|
{
|
|
2293
2487
|
src: "/assets/images/iran.svg",
|
|
@@ -2302,28 +2496,28 @@ function SearchLicensePlate({
|
|
|
2302
2496
|
}
|
|
2303
2497
|
|
|
2304
2498
|
// src/mobile-date-time-picker/index.tsx
|
|
2305
|
-
import { Button as Button8, Typography as
|
|
2499
|
+
import { Button as Button8, Typography as Typography9 } from "@mui/material";
|
|
2306
2500
|
import useMediaQuery5 from "@mui/material/useMediaQuery";
|
|
2307
|
-
import { Box as
|
|
2501
|
+
import { Box as Box12 } from "@mui/system";
|
|
2308
2502
|
import {
|
|
2309
2503
|
MobileDateTimePicker,
|
|
2310
|
-
LocalizationProvider as
|
|
2504
|
+
LocalizationProvider as LocalizationProvider5
|
|
2311
2505
|
} from "@mui/x-date-pickers";
|
|
2312
|
-
import { AdapterMomentJalaali as
|
|
2313
|
-
import
|
|
2314
|
-
import
|
|
2315
|
-
import
|
|
2316
|
-
import { Controller as
|
|
2317
|
-
|
|
2506
|
+
import { AdapterMomentJalaali as AdapterMomentJalaali5 } from "@mui/x-date-pickers/AdapterMomentJalaali";
|
|
2507
|
+
import dayjs3 from "dayjs";
|
|
2508
|
+
import moment7 from "moment-jalaali";
|
|
2509
|
+
import React14, { useState as useState9 } from "react";
|
|
2510
|
+
import { Controller as Controller7 } from "react-hook-form";
|
|
2511
|
+
moment7.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
|
|
2318
2512
|
var JalaliDatePicker3 = ({
|
|
2319
2513
|
name,
|
|
2320
2514
|
control,
|
|
2321
2515
|
label,
|
|
2322
2516
|
isLoading
|
|
2323
2517
|
}) => {
|
|
2324
|
-
const today =
|
|
2518
|
+
const today = moment7();
|
|
2325
2519
|
const isMobile = useMediaQuery5("(max-width:700px)");
|
|
2326
|
-
const [open, setOpen] =
|
|
2520
|
+
const [open, setOpen] = useState9(false);
|
|
2327
2521
|
const customLocaleText = {
|
|
2328
2522
|
cancelButtonLabel: "\u0644\u063A\u0648",
|
|
2329
2523
|
okButtonLabel: "\u062A\u0623\u06CC\u06CC\u062F",
|
|
@@ -2348,18 +2542,18 @@ var JalaliDatePicker3 = ({
|
|
|
2348
2542
|
calendarWeekNumberAriaLabelText: (weekNumber) => `\u0647\u0641\u062A\u0647 ${weekNumber}`,
|
|
2349
2543
|
calendarWeekNumberText: (weekNumber) => `${weekNumber}`
|
|
2350
2544
|
};
|
|
2351
|
-
return /* @__PURE__ */
|
|
2352
|
-
|
|
2545
|
+
return /* @__PURE__ */ React14.createElement(
|
|
2546
|
+
LocalizationProvider5,
|
|
2353
2547
|
{
|
|
2354
|
-
dateAdapter:
|
|
2548
|
+
dateAdapter: AdapterMomentJalaali5,
|
|
2355
2549
|
localeText: customLocaleText
|
|
2356
2550
|
},
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
|
|
2551
|
+
/* @__PURE__ */ React14.createElement(
|
|
2552
|
+
Controller7,
|
|
2359
2553
|
{
|
|
2360
2554
|
name,
|
|
2361
2555
|
control,
|
|
2362
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */
|
|
2556
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ React14.createElement(Box12, { sx: { width: "100%" } }, /* @__PURE__ */ React14.createElement(
|
|
2363
2557
|
MobileDateTimePicker,
|
|
2364
2558
|
{
|
|
2365
2559
|
open,
|
|
@@ -2373,10 +2567,10 @@ var JalaliDatePicker3 = ({
|
|
|
2373
2567
|
openTo: "day",
|
|
2374
2568
|
views: ["year", "month", "day", "hours", "minutes"],
|
|
2375
2569
|
label,
|
|
2376
|
-
value: field.value ?
|
|
2570
|
+
value: field.value ? moment7(field.value) : null,
|
|
2377
2571
|
onChange: (newValue) => {
|
|
2378
2572
|
if (newValue) {
|
|
2379
|
-
field.onChange(
|
|
2573
|
+
field.onChange(dayjs3(newValue).format("YYYY-MM-DDTHH:mm:ss"));
|
|
2380
2574
|
} else {
|
|
2381
2575
|
field.onChange(null);
|
|
2382
2576
|
}
|
|
@@ -2392,7 +2586,7 @@ var JalaliDatePicker3 = ({
|
|
|
2392
2586
|
format: `jDD jMMMM jYYYY ${" "} - ${" "} HH:mm`,
|
|
2393
2587
|
slots: {
|
|
2394
2588
|
toolbar: (props) => {
|
|
2395
|
-
const currentDate =
|
|
2589
|
+
const currentDate = moment7(field.value || null);
|
|
2396
2590
|
let formattedDay, formattedDate, formattedYear, formattedTime;
|
|
2397
2591
|
if (field.value) {
|
|
2398
2592
|
formattedDay = currentDate.format("dddd");
|
|
@@ -2402,8 +2596,8 @@ var JalaliDatePicker3 = ({
|
|
|
2402
2596
|
} else {
|
|
2403
2597
|
formattedDay = "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A", formattedDate = "", formattedYear = "", formattedTime = "";
|
|
2404
2598
|
}
|
|
2405
|
-
return /* @__PURE__ */
|
|
2406
|
-
|
|
2599
|
+
return /* @__PURE__ */ React14.createElement(
|
|
2600
|
+
Box12,
|
|
2407
2601
|
{
|
|
2408
2602
|
sx: {
|
|
2409
2603
|
padding: "16px",
|
|
@@ -2415,8 +2609,8 @@ var JalaliDatePicker3 = ({
|
|
|
2415
2609
|
gap: 1
|
|
2416
2610
|
}
|
|
2417
2611
|
},
|
|
2418
|
-
/* @__PURE__ */
|
|
2419
|
-
|
|
2612
|
+
/* @__PURE__ */ React14.createElement(
|
|
2613
|
+
Typography9,
|
|
2420
2614
|
{
|
|
2421
2615
|
fontSize: 16,
|
|
2422
2616
|
variant: "overline",
|
|
@@ -2424,8 +2618,8 @@ var JalaliDatePicker3 = ({
|
|
|
2424
2618
|
},
|
|
2425
2619
|
`${formattedDay}\u060C`
|
|
2426
2620
|
),
|
|
2427
|
-
/* @__PURE__ */
|
|
2428
|
-
|
|
2621
|
+
/* @__PURE__ */ React14.createElement(
|
|
2622
|
+
Typography9,
|
|
2429
2623
|
{
|
|
2430
2624
|
variant: "h4",
|
|
2431
2625
|
fontSize: 26,
|
|
@@ -2433,8 +2627,8 @@ var JalaliDatePicker3 = ({
|
|
|
2433
2627
|
},
|
|
2434
2628
|
`${formattedDate}`
|
|
2435
2629
|
),
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
|
|
2630
|
+
/* @__PURE__ */ React14.createElement(
|
|
2631
|
+
Typography9,
|
|
2438
2632
|
{
|
|
2439
2633
|
fontSize: 16,
|
|
2440
2634
|
variant: "body2",
|
|
@@ -2442,9 +2636,9 @@ var JalaliDatePicker3 = ({
|
|
|
2442
2636
|
},
|
|
2443
2637
|
`${formattedYear}`
|
|
2444
2638
|
),
|
|
2445
|
-
field.value && /* @__PURE__ */
|
|
2446
|
-
/* @__PURE__ */
|
|
2447
|
-
|
|
2639
|
+
field.value && /* @__PURE__ */ React14.createElement(Typography9, null, "-"),
|
|
2640
|
+
/* @__PURE__ */ React14.createElement(
|
|
2641
|
+
Typography9,
|
|
2448
2642
|
{
|
|
2449
2643
|
fontSize: 16,
|
|
2450
2644
|
variant: "body2",
|
|
@@ -2456,7 +2650,7 @@ var JalaliDatePicker3 = ({
|
|
|
2456
2650
|
);
|
|
2457
2651
|
},
|
|
2458
2652
|
monthButton: (props) => {
|
|
2459
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ React14.createElement(
|
|
2460
2654
|
Button8,
|
|
2461
2655
|
{
|
|
2462
2656
|
className: props.className,
|
|
@@ -2534,7 +2728,7 @@ var JalaliDatePicker3 = ({
|
|
|
2534
2728
|
}
|
|
2535
2729
|
}
|
|
2536
2730
|
}
|
|
2537
|
-
), error && /* @__PURE__ */
|
|
2731
|
+
), error && /* @__PURE__ */ React14.createElement(Typography9, { fontSize: 13, color: "error", sx: { mt: 0.6, ml: 1 } }, error.message))
|
|
2538
2732
|
}
|
|
2539
2733
|
)
|
|
2540
2734
|
);
|
|
@@ -2542,15 +2736,15 @@ var JalaliDatePicker3 = ({
|
|
|
2542
2736
|
var mobile_date_time_picker_default = JalaliDatePicker3;
|
|
2543
2737
|
|
|
2544
2738
|
// src/modal/index.tsx
|
|
2545
|
-
import * as
|
|
2739
|
+
import * as React15 from "react";
|
|
2546
2740
|
import Dialog5 from "@mui/material/Dialog";
|
|
2547
2741
|
import DialogActions3 from "@mui/material/DialogActions";
|
|
2548
2742
|
import DialogContent5 from "@mui/material/DialogContent";
|
|
2549
2743
|
import DialogTitle5 from "@mui/material/DialogTitle";
|
|
2550
2744
|
import {
|
|
2551
|
-
Box as
|
|
2745
|
+
Box as Box13,
|
|
2552
2746
|
Button as Button9,
|
|
2553
|
-
CircularProgress as
|
|
2747
|
+
CircularProgress as CircularProgress4,
|
|
2554
2748
|
Divider as Divider3,
|
|
2555
2749
|
IconButton as IconButton5
|
|
2556
2750
|
} from "@mui/material";
|
|
@@ -2565,7 +2759,7 @@ function ConfirmationDialog2({
|
|
|
2565
2759
|
bodyText,
|
|
2566
2760
|
isLoading
|
|
2567
2761
|
}) {
|
|
2568
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ React15.createElement(Dialog5, { open, onClose: handleClose, fullWidth: true, maxWidth: "xs" }, /* @__PURE__ */ React15.createElement(Box13, null, /* @__PURE__ */ React15.createElement(
|
|
2569
2763
|
DialogTitle5,
|
|
2570
2764
|
{
|
|
2571
2765
|
fontWeight: 700,
|
|
@@ -2574,9 +2768,9 @@ function ConfirmationDialog2({
|
|
|
2574
2768
|
alignItems: "center",
|
|
2575
2769
|
gap: 1
|
|
2576
2770
|
},
|
|
2577
|
-
/* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ React15.createElement(Delete, { style: { color: "red" }, size: 18 }),
|
|
2578
2772
|
headerText
|
|
2579
|
-
), /* @__PURE__ */
|
|
2773
|
+
), /* @__PURE__ */ React15.createElement(
|
|
2580
2774
|
IconButton5,
|
|
2581
2775
|
{
|
|
2582
2776
|
"aria-label": "close",
|
|
@@ -2588,8 +2782,8 @@ function ConfirmationDialog2({
|
|
|
2588
2782
|
color: (theme2) => theme2.palette.grey[500]
|
|
2589
2783
|
}
|
|
2590
2784
|
},
|
|
2591
|
-
/* @__PURE__ */
|
|
2592
|
-
), /* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ React15.createElement(MdClose3, null)
|
|
2786
|
+
), /* @__PURE__ */ React15.createElement(Divider3, { sx: { my: "10px" } }), /* @__PURE__ */ React15.createElement(DialogContent5, null, bodyText), /* @__PURE__ */ React15.createElement(
|
|
2593
2787
|
DialogActions3,
|
|
2594
2788
|
{
|
|
2595
2789
|
sx: {
|
|
@@ -2601,7 +2795,7 @@ function ConfirmationDialog2({
|
|
|
2601
2795
|
padding: "2rem"
|
|
2602
2796
|
}
|
|
2603
2797
|
},
|
|
2604
|
-
/* @__PURE__ */
|
|
2798
|
+
/* @__PURE__ */ React15.createElement(
|
|
2605
2799
|
Button9,
|
|
2606
2800
|
{
|
|
2607
2801
|
disabled: isLoading,
|
|
@@ -2612,17 +2806,17 @@ function ConfirmationDialog2({
|
|
|
2612
2806
|
variant: "contained",
|
|
2613
2807
|
color: "error",
|
|
2614
2808
|
sx: { minWidth: "120px" },
|
|
2615
|
-
startIcon: isLoading ? /* @__PURE__ */
|
|
2809
|
+
startIcon: isLoading ? /* @__PURE__ */ React15.createElement(CircularProgress4, { sx: { color: "white" }, size: 20 }) : /* @__PURE__ */ React15.createElement(Delete, { size: 16 })
|
|
2616
2810
|
},
|
|
2617
2811
|
"\u062D\u0630\u0641"
|
|
2618
2812
|
),
|
|
2619
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ React15.createElement(
|
|
2620
2814
|
Button9,
|
|
2621
2815
|
{
|
|
2622
2816
|
onClick: handleClose,
|
|
2623
2817
|
variant: "outlined",
|
|
2624
2818
|
color: "error",
|
|
2625
|
-
startIcon: /* @__PURE__ */
|
|
2819
|
+
startIcon: /* @__PURE__ */ React15.createElement(MdOutlineCancel2, { size: 15 }),
|
|
2626
2820
|
sx: { minWidth: "120px" }
|
|
2627
2821
|
},
|
|
2628
2822
|
"\u0627\u0646\u0635\u0631\u0627\u0641"
|
|
@@ -2634,17 +2828,17 @@ function ConfirmationDialog2({
|
|
|
2634
2828
|
import {
|
|
2635
2829
|
Card as Card2,
|
|
2636
2830
|
Stack as Stack3,
|
|
2637
|
-
Typography as
|
|
2831
|
+
Typography as Typography10,
|
|
2638
2832
|
useTheme as useTheme4
|
|
2639
2833
|
} from "@mui/material";
|
|
2640
|
-
import
|
|
2834
|
+
import React16 from "react";
|
|
2641
2835
|
function NoResult({
|
|
2642
2836
|
title = "\u062F\u0627\u062F\u0647 \u0627\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F!",
|
|
2643
2837
|
description,
|
|
2644
2838
|
sx = {}
|
|
2645
2839
|
}) {
|
|
2646
2840
|
const theme2 = useTheme4();
|
|
2647
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2648
2842
|
Card2,
|
|
2649
2843
|
{
|
|
2650
2844
|
sx: {
|
|
@@ -2654,7 +2848,7 @@ function NoResult({
|
|
|
2654
2848
|
border: `1px solid ${theme2.palette.secondary.light}`
|
|
2655
2849
|
}
|
|
2656
2850
|
},
|
|
2657
|
-
/* @__PURE__ */
|
|
2851
|
+
/* @__PURE__ */ React16.createElement(
|
|
2658
2852
|
Stack3,
|
|
2659
2853
|
{
|
|
2660
2854
|
spacing: 2,
|
|
@@ -2664,7 +2858,7 @@ function NoResult({
|
|
|
2664
2858
|
...sx
|
|
2665
2859
|
}
|
|
2666
2860
|
},
|
|
2667
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ React16.createElement(
|
|
2668
2862
|
"img",
|
|
2669
2863
|
{
|
|
2670
2864
|
src: "/assets/images/no-data.png",
|
|
@@ -2673,7 +2867,7 @@ function NoResult({
|
|
|
2673
2867
|
width: 100
|
|
2674
2868
|
}
|
|
2675
2869
|
),
|
|
2676
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ React16.createElement(Stack3, { spacing: 1, alignItems: "center" }, /* @__PURE__ */ React16.createElement(Typography10, { fontWeight: "600" }, title), description && /* @__PURE__ */ React16.createElement(Typography10, { fontWeight: "500" }, description))
|
|
2677
2871
|
)
|
|
2678
2872
|
);
|
|
2679
2873
|
}
|
|
@@ -2682,15 +2876,15 @@ function NoResult({
|
|
|
2682
2876
|
import { convertToPersianDigits as convertToPersianDigits3 } from "@mamrp/utils";
|
|
2683
2877
|
import { Button as Button10 } from "@mui/material";
|
|
2684
2878
|
import Stack4 from "@mui/material/Stack";
|
|
2685
|
-
import { Box as
|
|
2686
|
-
import * as
|
|
2879
|
+
import { Box as Box14 } from "@mui/system";
|
|
2880
|
+
import * as React17 from "react";
|
|
2687
2881
|
import { FaChevronLeft as FaChevronLeft3, FaChevronRight as FaChevronRight3 } from "react-icons/fa";
|
|
2688
2882
|
function PaginationList({
|
|
2689
2883
|
currentPage,
|
|
2690
2884
|
setCurrentPage,
|
|
2691
2885
|
totalPages
|
|
2692
2886
|
}) {
|
|
2693
|
-
|
|
2887
|
+
React17.useEffect(() => {
|
|
2694
2888
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
2695
2889
|
}, [currentPage]);
|
|
2696
2890
|
const handlePrevious = () => {
|
|
@@ -2703,7 +2897,7 @@ function PaginationList({
|
|
|
2703
2897
|
setCurrentPage(currentPage + 1);
|
|
2704
2898
|
}
|
|
2705
2899
|
};
|
|
2706
|
-
return /* @__PURE__ */
|
|
2900
|
+
return /* @__PURE__ */ React17.createElement(
|
|
2707
2901
|
Stack4,
|
|
2708
2902
|
{
|
|
2709
2903
|
direction: "row",
|
|
@@ -2711,7 +2905,7 @@ function PaginationList({
|
|
|
2711
2905
|
alignItems: "center",
|
|
2712
2906
|
justifyContent: "center"
|
|
2713
2907
|
},
|
|
2714
|
-
/* @__PURE__ */
|
|
2908
|
+
/* @__PURE__ */ React17.createElement(
|
|
2715
2909
|
Button10,
|
|
2716
2910
|
{
|
|
2717
2911
|
variant: "contained",
|
|
@@ -2728,13 +2922,13 @@ function PaginationList({
|
|
|
2728
2922
|
justifyContent: "center"
|
|
2729
2923
|
},
|
|
2730
2924
|
size: "large",
|
|
2731
|
-
startIcon: /* @__PURE__ */
|
|
2925
|
+
startIcon: /* @__PURE__ */ React17.createElement(FaChevronRight3, null)
|
|
2732
2926
|
},
|
|
2733
2927
|
"\u0642\u0628\u0644\u06CC",
|
|
2734
2928
|
" "
|
|
2735
2929
|
),
|
|
2736
|
-
/* @__PURE__ */
|
|
2737
|
-
|
|
2930
|
+
/* @__PURE__ */ React17.createElement(
|
|
2931
|
+
Box14,
|
|
2738
2932
|
{
|
|
2739
2933
|
sx: {
|
|
2740
2934
|
fontWeight: "bold",
|
|
@@ -2749,10 +2943,10 @@ function PaginationList({
|
|
|
2749
2943
|
backgroundColor: "#065938"
|
|
2750
2944
|
}
|
|
2751
2945
|
},
|
|
2752
|
-
/* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ React17.createElement("span", { style: { margin: "0px 6px", fontSize: "1.2rem" } }, "\u0635\u0641\u062D\u0647"),
|
|
2753
2947
|
convertToPersianDigits3(currentPage)
|
|
2754
2948
|
),
|
|
2755
|
-
/* @__PURE__ */
|
|
2949
|
+
/* @__PURE__ */ React17.createElement(
|
|
2756
2950
|
Button10,
|
|
2757
2951
|
{
|
|
2758
2952
|
variant: "contained",
|
|
@@ -2769,7 +2963,7 @@ function PaginationList({
|
|
|
2769
2963
|
justifyContent: "center"
|
|
2770
2964
|
},
|
|
2771
2965
|
size: "large",
|
|
2772
|
-
endIcon: /* @__PURE__ */
|
|
2966
|
+
endIcon: /* @__PURE__ */ React17.createElement(FaChevronLeft3, null)
|
|
2773
2967
|
},
|
|
2774
2968
|
"\u0628\u0639\u062F\u06CC",
|
|
2775
2969
|
" "
|
|
@@ -2778,16 +2972,16 @@ function PaginationList({
|
|
|
2778
2972
|
}
|
|
2779
2973
|
|
|
2780
2974
|
// src/radio-button/index.tsx
|
|
2781
|
-
import * as
|
|
2782
|
-
import { Controller as
|
|
2975
|
+
import * as React18 from "react";
|
|
2976
|
+
import { Controller as Controller8 } from "react-hook-form";
|
|
2783
2977
|
import Radio from "@mui/material/Radio";
|
|
2784
2978
|
import RadioGroup from "@mui/material/RadioGroup";
|
|
2785
2979
|
import FormControlLabel2 from "@mui/material/FormControlLabel";
|
|
2786
2980
|
import FormControl from "@mui/material/FormControl";
|
|
2787
2981
|
import FormLabel from "@mui/material/FormLabel";
|
|
2788
|
-
import { Typography as
|
|
2982
|
+
import { Typography as Typography11 } from "@mui/material";
|
|
2789
2983
|
import theme from "@mamrp/layout/theme";
|
|
2790
|
-
import { Box as
|
|
2984
|
+
import { Box as Box15 } from "@mui/system";
|
|
2791
2985
|
function RadioButton({
|
|
2792
2986
|
name,
|
|
2793
2987
|
label,
|
|
@@ -2797,7 +2991,7 @@ function RadioButton({
|
|
|
2797
2991
|
disabledBoarder,
|
|
2798
2992
|
direction = "row"
|
|
2799
2993
|
}) {
|
|
2800
|
-
return /* @__PURE__ */
|
|
2994
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
2801
2995
|
FormControl,
|
|
2802
2996
|
{
|
|
2803
2997
|
sx: {
|
|
@@ -2807,12 +3001,12 @@ function RadioButton({
|
|
|
2807
3001
|
justifyContent: "start"
|
|
2808
3002
|
}
|
|
2809
3003
|
},
|
|
2810
|
-
/* @__PURE__ */
|
|
2811
|
-
|
|
3004
|
+
/* @__PURE__ */ React18.createElement(
|
|
3005
|
+
Controller8,
|
|
2812
3006
|
{
|
|
2813
3007
|
name,
|
|
2814
3008
|
control,
|
|
2815
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */
|
|
3009
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ React18.createElement(Box15, { display: "flex", width: "100%", flexDirection: "column" }, label && /* @__PURE__ */ React18.createElement(
|
|
2816
3010
|
FormLabel,
|
|
2817
3011
|
{
|
|
2818
3012
|
id: `${name}-label`,
|
|
@@ -2830,7 +3024,7 @@ function RadioButton({
|
|
|
2830
3024
|
}
|
|
2831
3025
|
},
|
|
2832
3026
|
label
|
|
2833
|
-
), /* @__PURE__ */
|
|
3027
|
+
), /* @__PURE__ */ React18.createElement(
|
|
2834
3028
|
RadioGroup,
|
|
2835
3029
|
{
|
|
2836
3030
|
...field,
|
|
@@ -2848,16 +3042,16 @@ function RadioButton({
|
|
|
2848
3042
|
borderColor: error?.message ? theme.CustomComponents.RadioButton.errorColor : theme.CustomComponents.RadioButton.borderColor
|
|
2849
3043
|
}
|
|
2850
3044
|
},
|
|
2851
|
-
options.map((option) => /* @__PURE__ */
|
|
3045
|
+
options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2852
3046
|
FormControlLabel2,
|
|
2853
3047
|
{
|
|
2854
3048
|
key: option.value,
|
|
2855
3049
|
value: option.value,
|
|
2856
|
-
control: /* @__PURE__ */
|
|
3050
|
+
control: /* @__PURE__ */ React18.createElement(Radio, { id: option.id }),
|
|
2857
3051
|
label: option.name
|
|
2858
3052
|
}
|
|
2859
3053
|
))
|
|
2860
|
-
), error?.message && /* @__PURE__ */
|
|
3054
|
+
), error?.message && /* @__PURE__ */ React18.createElement(Typography11, { color: "error", fontSize: theme.CustomComponents.RadioButton.errorFontSize, ml: 2 }, error?.message))
|
|
2861
3055
|
}
|
|
2862
3056
|
)
|
|
2863
3057
|
));
|
|
@@ -2875,9 +3069,9 @@ import {
|
|
|
2875
3069
|
ListItemText,
|
|
2876
3070
|
MenuItem,
|
|
2877
3071
|
Select,
|
|
2878
|
-
Typography as
|
|
3072
|
+
Typography as Typography12
|
|
2879
3073
|
} from "@mui/material";
|
|
2880
|
-
import
|
|
3074
|
+
import React19, { useState as useState10 } from "react";
|
|
2881
3075
|
var backendResponse = {
|
|
2882
3076
|
value: {
|
|
2883
3077
|
data: [
|
|
@@ -2930,9 +3124,9 @@ var backendResponse = {
|
|
|
2930
3124
|
}
|
|
2931
3125
|
};
|
|
2932
3126
|
var NestedSelect = () => {
|
|
2933
|
-
const [selectedItem, setSelectedItem] =
|
|
2934
|
-
const [openMenus, setOpenMenus] =
|
|
2935
|
-
const [menuOpen, setMenuOpen] =
|
|
3127
|
+
const [selectedItem, setSelectedItem] = useState10(null);
|
|
3128
|
+
const [openMenus, setOpenMenus] = useState10({});
|
|
3129
|
+
const [menuOpen, setMenuOpen] = useState10(false);
|
|
2936
3130
|
const handleSelect = (item) => {
|
|
2937
3131
|
setSelectedItem((prev) => prev?.id === item.id ? null : item);
|
|
2938
3132
|
};
|
|
@@ -2945,7 +3139,7 @@ var NestedSelect = () => {
|
|
|
2945
3139
|
const isAnyChildSelected = item.children?.some(
|
|
2946
3140
|
(child) => selectedItem?.id === child.id
|
|
2947
3141
|
);
|
|
2948
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ React19.createElement("div", { key: item.id }, /* @__PURE__ */ React19.createElement(
|
|
2949
3143
|
MenuItem,
|
|
2950
3144
|
{
|
|
2951
3145
|
onClick: (e) => {
|
|
@@ -2955,9 +3149,9 @@ var NestedSelect = () => {
|
|
|
2955
3149
|
disabled: isAnyChildSelected,
|
|
2956
3150
|
sx: { pl: level * 2 }
|
|
2957
3151
|
},
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
2960
|
-
item.children && item.children.length > 0 && /* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ React19.createElement(Checkbox2, { checked: isParentSelected }),
|
|
3153
|
+
/* @__PURE__ */ React19.createElement(ListItemText, { primary: item.title }),
|
|
3154
|
+
item.children && item.children.length > 0 && /* @__PURE__ */ React19.createElement(
|
|
2961
3155
|
IconButton6,
|
|
2962
3156
|
{
|
|
2963
3157
|
size: "small",
|
|
@@ -2966,12 +3160,12 @@ var NestedSelect = () => {
|
|
|
2966
3160
|
handleToggle(item.id);
|
|
2967
3161
|
}
|
|
2968
3162
|
},
|
|
2969
|
-
openMenus[item.id] ? /* @__PURE__ */
|
|
3163
|
+
openMenus[item.id] ? /* @__PURE__ */ React19.createElement(MdKeyboardArrowLeft, null) : /* @__PURE__ */ React19.createElement(MdKeyboardArrowRight, null)
|
|
2970
3164
|
)
|
|
2971
|
-
), item.children && item.children.length > 0 && /* @__PURE__ */
|
|
3165
|
+
), item.children && item.children.length > 0 && /* @__PURE__ */ React19.createElement(Collapse, { in: openMenus[item.id], timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React19.createElement(List, { component: "div", disablePadding: true }, renderMenuItems(item.children, level + 1))));
|
|
2972
3166
|
});
|
|
2973
3167
|
};
|
|
2974
|
-
return /* @__PURE__ */
|
|
3168
|
+
return /* @__PURE__ */ React19.createElement(FormControl2, { fullWidth: true, variant: "outlined" }, /* @__PURE__ */ React19.createElement(InputLabel, { shrink: true }, "\u062F\u0633\u062A\u0647 \u0628\u0646\u062F\u06CC *"), /* @__PURE__ */ React19.createElement(
|
|
2975
3169
|
Select,
|
|
2976
3170
|
{
|
|
2977
3171
|
label: "\u062F\u0633\u062A\u0647 \u0628\u0646\u062F\u06CC *",
|
|
@@ -2980,7 +3174,7 @@ var NestedSelect = () => {
|
|
|
2980
3174
|
open: menuOpen,
|
|
2981
3175
|
onOpen: () => setMenuOpen(true),
|
|
2982
3176
|
onClose: () => setMenuOpen(false),
|
|
2983
|
-
renderValue: (selected) => selectedItem ? /* @__PURE__ */
|
|
3177
|
+
renderValue: (selected) => selectedItem ? /* @__PURE__ */ React19.createElement(Typography12, null, selectedItem.title) : " "
|
|
2984
3178
|
},
|
|
2985
3179
|
renderMenuItems(backendResponse.value.data)
|
|
2986
3180
|
));
|
|
@@ -2988,9 +3182,9 @@ var NestedSelect = () => {
|
|
|
2988
3182
|
var selector_default = NestedSelect;
|
|
2989
3183
|
|
|
2990
3184
|
// src/spinner/sonar/index.tsx
|
|
2991
|
-
import { Box as
|
|
3185
|
+
import { Box as Box16 } from "@mui/material";
|
|
2992
3186
|
import { keyframes } from "@mui/system";
|
|
2993
|
-
import
|
|
3187
|
+
import React20 from "react";
|
|
2994
3188
|
var radarAnimation = keyframes`
|
|
2995
3189
|
0% {
|
|
2996
3190
|
background: inherit;
|
|
@@ -3003,8 +3197,8 @@ var radarAnimation = keyframes`
|
|
|
3003
3197
|
}
|
|
3004
3198
|
`;
|
|
3005
3199
|
function SonarSpinner({ children }) {
|
|
3006
|
-
return /* @__PURE__ */
|
|
3007
|
-
|
|
3200
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(Box16, { className: "absolute w-[30px] h-[30px] rounded-full bg-white z-10 flex items-center justify-center" }, children), /* @__PURE__ */ React20.createElement(
|
|
3201
|
+
Box16,
|
|
3008
3202
|
{
|
|
3009
3203
|
className: "root",
|
|
3010
3204
|
sx: {
|
|
@@ -3016,8 +3210,8 @@ function SonarSpinner({ children }) {
|
|
|
3016
3210
|
transform: "translateZ(0)"
|
|
3017
3211
|
}
|
|
3018
3212
|
},
|
|
3019
|
-
/* @__PURE__ */
|
|
3020
|
-
|
|
3213
|
+
/* @__PURE__ */ React20.createElement(
|
|
3214
|
+
Box16,
|
|
3021
3215
|
{
|
|
3022
3216
|
className: "radar",
|
|
3023
3217
|
sx: {
|
|
@@ -3034,8 +3228,8 @@ function SonarSpinner({ children }) {
|
|
|
3034
3228
|
animationDelay: "0s"
|
|
3035
3229
|
}
|
|
3036
3230
|
},
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
|
|
3231
|
+
/* @__PURE__ */ React20.createElement(
|
|
3232
|
+
Box16,
|
|
3039
3233
|
{
|
|
3040
3234
|
className: "sonar",
|
|
3041
3235
|
sx: {
|
|
@@ -3048,8 +3242,8 @@ function SonarSpinner({ children }) {
|
|
|
3048
3242
|
}
|
|
3049
3243
|
}
|
|
3050
3244
|
),
|
|
3051
|
-
/* @__PURE__ */
|
|
3052
|
-
|
|
3245
|
+
/* @__PURE__ */ React20.createElement(
|
|
3246
|
+
Box16,
|
|
3053
3247
|
{
|
|
3054
3248
|
className: "sonar delayed",
|
|
3055
3249
|
sx: {
|
|
@@ -3072,18 +3266,18 @@ function SonarSpinner({ children }) {
|
|
|
3072
3266
|
}
|
|
3073
3267
|
|
|
3074
3268
|
// src/stepper/index.tsx
|
|
3075
|
-
import
|
|
3269
|
+
import Box17 from "@mui/material/Box";
|
|
3076
3270
|
import Step from "@mui/material/Step";
|
|
3077
3271
|
import StepButton from "@mui/material/StepButton";
|
|
3078
3272
|
import Stepper from "@mui/material/Stepper";
|
|
3079
|
-
import * as
|
|
3273
|
+
import * as React21 from "react";
|
|
3080
3274
|
function HorizontalStepper({
|
|
3081
3275
|
steps,
|
|
3082
3276
|
currentStep,
|
|
3083
3277
|
setCurrentStep
|
|
3084
3278
|
}) {
|
|
3085
|
-
const [completed, setCompleted] =
|
|
3086
|
-
return /* @__PURE__ */
|
|
3279
|
+
const [completed, setCompleted] = React21.useState({});
|
|
3280
|
+
return /* @__PURE__ */ React21.createElement(Box17, { sx: { width: "100%" } }, /* @__PURE__ */ React21.createElement(Stepper, { nonLinear: true, activeStep: currentStep }, steps.map((label, index) => /* @__PURE__ */ React21.createElement(Step, { key: index, completed: completed[index] }, /* @__PURE__ */ React21.createElement(
|
|
3087
3281
|
StepButton,
|
|
3088
3282
|
{
|
|
3089
3283
|
color: "inherit",
|
|
@@ -3099,13 +3293,13 @@ function HorizontalStepper({
|
|
|
3099
3293
|
}
|
|
3100
3294
|
|
|
3101
3295
|
// src/table/index.tsx
|
|
3102
|
-
import { Typography as
|
|
3296
|
+
import { Typography as Typography13 } from "@mui/material";
|
|
3103
3297
|
import Skeleton2 from "@mui/material/Skeleton";
|
|
3104
3298
|
import { styled as styled2 } from "@mui/material/styles";
|
|
3105
3299
|
import {
|
|
3106
3300
|
DataGrid
|
|
3107
3301
|
} from "@mui/x-data-grid";
|
|
3108
|
-
import
|
|
3302
|
+
import React22, { useEffect as useEffect8 } from "react";
|
|
3109
3303
|
var ScrollableContainer = styled2("div")({
|
|
3110
3304
|
width: "100%",
|
|
3111
3305
|
overflowX: "auto"
|
|
@@ -3135,7 +3329,7 @@ var Table = ({
|
|
|
3135
3329
|
isRowSelectable,
|
|
3136
3330
|
...rest
|
|
3137
3331
|
}) => {
|
|
3138
|
-
const [sortModel, setSortModel] =
|
|
3332
|
+
const [sortModel, setSortModel] = React22.useState([]);
|
|
3139
3333
|
const handleSetQueryOptions = (options) => {
|
|
3140
3334
|
if (!Array.isArray(options)) return;
|
|
3141
3335
|
const formattedOptions = options.reduce((acc, item) => {
|
|
@@ -3163,7 +3357,7 @@ var Table = ({
|
|
|
3163
3357
|
setSortModel([]);
|
|
3164
3358
|
}
|
|
3165
3359
|
}, [sortQuery]);
|
|
3166
|
-
const handleSortModelChange =
|
|
3360
|
+
const handleSortModelChange = React22.useCallback(
|
|
3167
3361
|
(sortModel2) => {
|
|
3168
3362
|
handleSetQueryOptions(
|
|
3169
3363
|
sortModel2.map((item) => ({
|
|
@@ -3204,7 +3398,7 @@ var Table = ({
|
|
|
3204
3398
|
// Connect paginationModel to DataGrid
|
|
3205
3399
|
}
|
|
3206
3400
|
};
|
|
3207
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ React22.createElement(ScrollableContainer, null, /* @__PURE__ */ React22.createElement(
|
|
3208
3402
|
DataGrid,
|
|
3209
3403
|
{
|
|
3210
3404
|
checkboxSelection: selectedRows != void 0,
|
|
@@ -3266,14 +3460,14 @@ var Table = ({
|
|
|
3266
3460
|
noRowsLabel: "\u0647\u06CC\u0686 \u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F!",
|
|
3267
3461
|
noResultsOverlayLabel: "\u0647\u06CC\u0686 \u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F!",
|
|
3268
3462
|
MuiTablePagination: {
|
|
3269
|
-
labelDisplayedRows: ({ from, to, count }) => loading ? /* @__PURE__ */
|
|
3463
|
+
labelDisplayedRows: ({ from, to, count }) => loading ? /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
3270
3464
|
Skeleton2,
|
|
3271
3465
|
{
|
|
3272
3466
|
variant: "text",
|
|
3273
3467
|
width: 30,
|
|
3274
3468
|
style: { display: "inline-block" }
|
|
3275
3469
|
}
|
|
3276
|
-
), " ", /* @__PURE__ */
|
|
3470
|
+
), " ", /* @__PURE__ */ React22.createElement(
|
|
3277
3471
|
Skeleton2,
|
|
3278
3472
|
{
|
|
3279
3473
|
variant: "text",
|
|
@@ -3282,7 +3476,7 @@ var Table = ({
|
|
|
3282
3476
|
}
|
|
3283
3477
|
)) : `${from} - ${!isNaN(to) ? to : "..."} \u0627\u0632 ${count !== void 0 ? count : "..."}`
|
|
3284
3478
|
},
|
|
3285
|
-
footerRowSelected: (count) => /* @__PURE__ */
|
|
3479
|
+
footerRowSelected: (count) => /* @__PURE__ */ React22.createElement(Typography13, null, "\u0633\u0637\u0631 \u0647\u0627\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 : ", count)
|
|
3286
3480
|
},
|
|
3287
3481
|
...rest
|
|
3288
3482
|
}
|
|
@@ -3293,11 +3487,11 @@ var table_default = Table;
|
|
|
3293
3487
|
// src/text-field/number-type/index.tsx
|
|
3294
3488
|
import TextField3 from "@mui/material/TextField";
|
|
3295
3489
|
import { forwardRef } from "react";
|
|
3296
|
-
import { Controller as
|
|
3490
|
+
import { Controller as Controller9 } from "react-hook-form";
|
|
3297
3491
|
import { NumericFormat } from "react-number-format";
|
|
3298
|
-
import
|
|
3492
|
+
import CircularProgress5 from "@mui/material/CircularProgress";
|
|
3299
3493
|
import InputAdornment2 from "@mui/material/InputAdornment";
|
|
3300
|
-
import
|
|
3494
|
+
import React23 from "react";
|
|
3301
3495
|
var FormInputNumber = ({
|
|
3302
3496
|
name,
|
|
3303
3497
|
control,
|
|
@@ -3323,13 +3517,13 @@ var FormInputNumber = ({
|
|
|
3323
3517
|
borderless = false,
|
|
3324
3518
|
...rest
|
|
3325
3519
|
}) => {
|
|
3326
|
-
return /* @__PURE__ */
|
|
3327
|
-
|
|
3520
|
+
return /* @__PURE__ */ React23.createElement(
|
|
3521
|
+
Controller9,
|
|
3328
3522
|
{
|
|
3329
3523
|
rules,
|
|
3330
3524
|
name,
|
|
3331
3525
|
control,
|
|
3332
|
-
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */
|
|
3526
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ React23.createElement(
|
|
3333
3527
|
TextField3,
|
|
3334
3528
|
{
|
|
3335
3529
|
onKeyDown,
|
|
@@ -3389,7 +3583,7 @@ var FormInputNumber = ({
|
|
|
3389
3583
|
maxLength,
|
|
3390
3584
|
decimalScale
|
|
3391
3585
|
},
|
|
3392
|
-
endAdornment: isLoading ? /* @__PURE__ */
|
|
3586
|
+
endAdornment: isLoading ? /* @__PURE__ */ React23.createElement(InputAdornment2, { position: "end" }, /* @__PURE__ */ React23.createElement(CircularProgress5, { size: 20 })) : endAdornment,
|
|
3393
3587
|
startAdornment
|
|
3394
3588
|
},
|
|
3395
3589
|
...rest
|
|
@@ -3409,7 +3603,7 @@ var NumericFormatCustom = forwardRef(
|
|
|
3409
3603
|
decimalScale,
|
|
3410
3604
|
...other
|
|
3411
3605
|
} = props;
|
|
3412
|
-
return /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ React23.createElement(
|
|
3413
3607
|
NumericFormat,
|
|
3414
3608
|
{
|
|
3415
3609
|
...other,
|
|
@@ -3437,11 +3631,11 @@ var NumericFormatCustom = forwardRef(
|
|
|
3437
3631
|
var number_type_default = FormInputNumber;
|
|
3438
3632
|
|
|
3439
3633
|
// src/text-field/text-type/index.tsx
|
|
3440
|
-
import
|
|
3634
|
+
import CircularProgress6 from "@mui/material/CircularProgress";
|
|
3441
3635
|
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
3442
3636
|
import TextField4 from "@mui/material/TextField";
|
|
3443
|
-
import
|
|
3444
|
-
import { Controller as
|
|
3637
|
+
import React24 from "react";
|
|
3638
|
+
import { Controller as Controller10 } from "react-hook-form";
|
|
3445
3639
|
var FormInputText = ({
|
|
3446
3640
|
name,
|
|
3447
3641
|
control,
|
|
@@ -3457,13 +3651,13 @@ var FormInputText = ({
|
|
|
3457
3651
|
rows,
|
|
3458
3652
|
...rest
|
|
3459
3653
|
}) => {
|
|
3460
|
-
return /* @__PURE__ */
|
|
3461
|
-
|
|
3654
|
+
return /* @__PURE__ */ React24.createElement(
|
|
3655
|
+
Controller10,
|
|
3462
3656
|
{
|
|
3463
3657
|
name,
|
|
3464
3658
|
control,
|
|
3465
3659
|
rules,
|
|
3466
|
-
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */
|
|
3660
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ React24.createElement(
|
|
3467
3661
|
TextField4,
|
|
3468
3662
|
{
|
|
3469
3663
|
disabled: disabled || isLoading,
|
|
@@ -3483,7 +3677,7 @@ var FormInputText = ({
|
|
|
3483
3677
|
readOnly
|
|
3484
3678
|
},
|
|
3485
3679
|
InputProps: {
|
|
3486
|
-
endAdornment: isLoading ? /* @__PURE__ */
|
|
3680
|
+
endAdornment: isLoading ? /* @__PURE__ */ React24.createElement(InputAdornment3, { position: "end" }, /* @__PURE__ */ React24.createElement(CircularProgress6, { size: 20 })) : null
|
|
3487
3681
|
},
|
|
3488
3682
|
InputLabelProps: { shrink: true },
|
|
3489
3683
|
inputRef: ref,
|
|
@@ -3495,12 +3689,110 @@ var FormInputText = ({
|
|
|
3495
3689
|
};
|
|
3496
3690
|
var text_type_default = FormInputText;
|
|
3497
3691
|
|
|
3692
|
+
// src/text-field/number-pattern-input/index.tsx
|
|
3693
|
+
import CircularProgress7 from "@mui/material/CircularProgress";
|
|
3694
|
+
import InputAdornment4 from "@mui/material/InputAdornment";
|
|
3695
|
+
import TextField5 from "@mui/material/TextField";
|
|
3696
|
+
import React25, { forwardRef as forwardRef2 } from "react";
|
|
3697
|
+
import { Controller as Controller11 } from "react-hook-form";
|
|
3698
|
+
import { PatternFormat } from "react-number-format";
|
|
3699
|
+
var PatternTextField = ({
|
|
3700
|
+
name,
|
|
3701
|
+
control,
|
|
3702
|
+
label,
|
|
3703
|
+
maxLength,
|
|
3704
|
+
readOnly,
|
|
3705
|
+
rules,
|
|
3706
|
+
size = "small",
|
|
3707
|
+
disabled = false,
|
|
3708
|
+
multiline,
|
|
3709
|
+
isLoading,
|
|
3710
|
+
onBlurHandler,
|
|
3711
|
+
rows,
|
|
3712
|
+
groupEvery,
|
|
3713
|
+
groupSeparator = "-",
|
|
3714
|
+
formatPattern,
|
|
3715
|
+
...rest
|
|
3716
|
+
}) => {
|
|
3717
|
+
const isNumericMode = !!groupEvery;
|
|
3718
|
+
const formatValue = (val) => {
|
|
3719
|
+
if (!val) return "";
|
|
3720
|
+
const raw = isNumericMode ? val.replace(/\D/g, "") : val;
|
|
3721
|
+
if (groupEvery) {
|
|
3722
|
+
return raw.match(new RegExp(`.{1,${groupEvery}}`, "g"))?.join(groupSeparator) || "";
|
|
3723
|
+
}
|
|
3724
|
+
return val;
|
|
3725
|
+
};
|
|
3726
|
+
return /* @__PURE__ */ React25.createElement(
|
|
3727
|
+
Controller11,
|
|
3728
|
+
{
|
|
3729
|
+
name,
|
|
3730
|
+
control,
|
|
3731
|
+
rules,
|
|
3732
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ React25.createElement(
|
|
3733
|
+
TextField5,
|
|
3734
|
+
{
|
|
3735
|
+
...rest,
|
|
3736
|
+
disabled: disabled || isLoading,
|
|
3737
|
+
helperText: error?.message || null,
|
|
3738
|
+
multiline,
|
|
3739
|
+
size,
|
|
3740
|
+
rows: rows || void 0,
|
|
3741
|
+
error: !!error,
|
|
3742
|
+
value: formatValue(value?.toString() || ""),
|
|
3743
|
+
onChange: (e) => {
|
|
3744
|
+
let newRaw = e.target.value;
|
|
3745
|
+
if (isNumericMode) newRaw = newRaw.replace(/\D/g, "");
|
|
3746
|
+
if (!maxLength || newRaw.length <= maxLength) onChange(newRaw);
|
|
3747
|
+
},
|
|
3748
|
+
fullWidth: true,
|
|
3749
|
+
label,
|
|
3750
|
+
variant: "outlined",
|
|
3751
|
+
inputProps: { ...rest.inputProps, readOnly },
|
|
3752
|
+
InputProps: {
|
|
3753
|
+
inputComponent: formatPattern ? PatternFormatCustom : void 0,
|
|
3754
|
+
inputProps: {
|
|
3755
|
+
format: formatPattern
|
|
3756
|
+
// 👈 الگوی نمایش
|
|
3757
|
+
},
|
|
3758
|
+
endAdornment: isLoading ? /* @__PURE__ */ React25.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React25.createElement(CircularProgress7, { size: 20 })) : null
|
|
3759
|
+
},
|
|
3760
|
+
InputLabelProps: { shrink: true },
|
|
3761
|
+
inputRef: ref
|
|
3762
|
+
}
|
|
3763
|
+
)
|
|
3764
|
+
}
|
|
3765
|
+
);
|
|
3766
|
+
};
|
|
3767
|
+
var PatternFormatCustom = forwardRef2(
|
|
3768
|
+
function PatternFormatCustom2(props, ref) {
|
|
3769
|
+
const { onChange, format, ...other } = props;
|
|
3770
|
+
return /* @__PURE__ */ React25.createElement(
|
|
3771
|
+
PatternFormat,
|
|
3772
|
+
{
|
|
3773
|
+
...other,
|
|
3774
|
+
getInputRef: ref,
|
|
3775
|
+
format,
|
|
3776
|
+
onValueChange: (values) => {
|
|
3777
|
+
onChange({
|
|
3778
|
+
target: {
|
|
3779
|
+
name: props.name,
|
|
3780
|
+
value: values.value
|
|
3781
|
+
}
|
|
3782
|
+
});
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
);
|
|
3786
|
+
}
|
|
3787
|
+
);
|
|
3788
|
+
var number_pattern_input_default = PatternTextField;
|
|
3789
|
+
|
|
3498
3790
|
// src/upload-image/index.tsx
|
|
3499
|
-
import
|
|
3791
|
+
import React26 from "react";
|
|
3500
3792
|
import {
|
|
3501
|
-
Controller as
|
|
3793
|
+
Controller as Controller12
|
|
3502
3794
|
} from "react-hook-form";
|
|
3503
|
-
import { Box as
|
|
3795
|
+
import { Box as Box18, Button as Button11, Stack as Stack5, Typography as Typography14 } from "@mui/material";
|
|
3504
3796
|
import { GrUpload, GrGallery } from "react-icons/gr";
|
|
3505
3797
|
import { MdOutlineCameraAlt } from "react-icons/md";
|
|
3506
3798
|
import Image3 from "next/image";
|
|
@@ -3573,12 +3865,12 @@ var UploadImage = ({
|
|
|
3573
3865
|
}
|
|
3574
3866
|
}
|
|
3575
3867
|
};
|
|
3576
|
-
return /* @__PURE__ */
|
|
3577
|
-
|
|
3868
|
+
return /* @__PURE__ */ React26.createElement(
|
|
3869
|
+
Controller12,
|
|
3578
3870
|
{
|
|
3579
3871
|
name,
|
|
3580
3872
|
control,
|
|
3581
|
-
render: ({ field }) => /* @__PURE__ */
|
|
3873
|
+
render: ({ field }) => /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
3582
3874
|
"label",
|
|
3583
3875
|
{
|
|
3584
3876
|
htmlFor: "file-upload",
|
|
@@ -3598,7 +3890,7 @@ var UploadImage = ({
|
|
|
3598
3890
|
overflow: "hidden"
|
|
3599
3891
|
}
|
|
3600
3892
|
},
|
|
3601
|
-
selectedImage ? /* @__PURE__ */
|
|
3893
|
+
selectedImage ? /* @__PURE__ */ React26.createElement(
|
|
3602
3894
|
Image3,
|
|
3603
3895
|
{
|
|
3604
3896
|
src: selectedImage,
|
|
@@ -3606,14 +3898,14 @@ var UploadImage = ({
|
|
|
3606
3898
|
fill: true,
|
|
3607
3899
|
objectFit: imageFit
|
|
3608
3900
|
}
|
|
3609
|
-
) : /* @__PURE__ */
|
|
3901
|
+
) : /* @__PURE__ */ React26.createElement(
|
|
3610
3902
|
Stack5,
|
|
3611
3903
|
{
|
|
3612
3904
|
spacing: allowGallery ? 2 : 0,
|
|
3613
3905
|
sx: { pt: allowGallery ? 2 : 0 }
|
|
3614
3906
|
},
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
|
|
3907
|
+
/* @__PURE__ */ React26.createElement(
|
|
3908
|
+
Box18,
|
|
3617
3909
|
{
|
|
3618
3910
|
sx: {
|
|
3619
3911
|
display: "flex",
|
|
@@ -3622,31 +3914,31 @@ var UploadImage = ({
|
|
|
3622
3914
|
gap: 1.5
|
|
3623
3915
|
}
|
|
3624
3916
|
},
|
|
3625
|
-
/* @__PURE__ */
|
|
3917
|
+
/* @__PURE__ */ React26.createElement(Box18, { sx: { paddingBottom: "0.5rem" } }, /* @__PURE__ */ React26.createElement(GrUpload, null)),
|
|
3626
3918
|
placeholder
|
|
3627
3919
|
),
|
|
3628
|
-
allowGallery && /* @__PURE__ */
|
|
3920
|
+
allowGallery && /* @__PURE__ */ React26.createElement(Stack5, { spacing: 1.5 }, /* @__PURE__ */ React26.createElement(
|
|
3629
3921
|
Button11,
|
|
3630
3922
|
{
|
|
3631
3923
|
sx: { width: "9rem" },
|
|
3632
3924
|
variant: "outlined",
|
|
3633
3925
|
color: "info",
|
|
3634
|
-
startIcon: /* @__PURE__ */
|
|
3926
|
+
startIcon: /* @__PURE__ */ React26.createElement(MdOutlineCameraAlt, { size: 16 }),
|
|
3635
3927
|
onClick: () => document.getElementById("camera-upload")?.click()
|
|
3636
3928
|
},
|
|
3637
3929
|
"\u062F\u0648\u0631\u0628\u06CC\u0646"
|
|
3638
|
-
), /* @__PURE__ */
|
|
3930
|
+
), /* @__PURE__ */ React26.createElement(
|
|
3639
3931
|
Button11,
|
|
3640
3932
|
{
|
|
3641
3933
|
sx: { width: "9rem" },
|
|
3642
3934
|
variant: "outlined",
|
|
3643
3935
|
color: "info",
|
|
3644
|
-
startIcon: /* @__PURE__ */
|
|
3936
|
+
startIcon: /* @__PURE__ */ React26.createElement(GrGallery, { size: 16 }),
|
|
3645
3937
|
onClick: () => document.getElementById("gallery-upload")?.click()
|
|
3646
3938
|
},
|
|
3647
3939
|
"\u06AF\u0627\u0644\u0631\u06CC"
|
|
3648
3940
|
)),
|
|
3649
|
-
!allowGallery && /* @__PURE__ */
|
|
3941
|
+
!allowGallery && /* @__PURE__ */ React26.createElement(
|
|
3650
3942
|
"input",
|
|
3651
3943
|
{
|
|
3652
3944
|
id: "file-upload",
|
|
@@ -3661,7 +3953,7 @@ var UploadImage = ({
|
|
|
3661
3953
|
}
|
|
3662
3954
|
)
|
|
3663
3955
|
)
|
|
3664
|
-
), /* @__PURE__ */
|
|
3956
|
+
), /* @__PURE__ */ React26.createElement(
|
|
3665
3957
|
"input",
|
|
3666
3958
|
{
|
|
3667
3959
|
id: "gallery-upload",
|
|
@@ -3673,7 +3965,7 @@ var UploadImage = ({
|
|
|
3673
3965
|
},
|
|
3674
3966
|
style: { display: "none" }
|
|
3675
3967
|
}
|
|
3676
|
-
), /* @__PURE__ */
|
|
3968
|
+
), /* @__PURE__ */ React26.createElement(
|
|
3677
3969
|
"input",
|
|
3678
3970
|
{
|
|
3679
3971
|
id: "camera-upload",
|
|
@@ -3686,12 +3978,12 @@ var UploadImage = ({
|
|
|
3686
3978
|
},
|
|
3687
3979
|
style: { display: "none" }
|
|
3688
3980
|
}
|
|
3689
|
-
), selectedImage && /* @__PURE__ */
|
|
3690
|
-
|
|
3981
|
+
), selectedImage && /* @__PURE__ */ React26.createElement(
|
|
3982
|
+
Box18,
|
|
3691
3983
|
{
|
|
3692
3984
|
sx: { display: "flex", justifyContent: "center", marginTop: 2 }
|
|
3693
3985
|
},
|
|
3694
|
-
/* @__PURE__ */
|
|
3986
|
+
/* @__PURE__ */ React26.createElement(
|
|
3695
3987
|
Button11,
|
|
3696
3988
|
{
|
|
3697
3989
|
onClick: () => {
|
|
@@ -3711,7 +4003,7 @@ var UploadImage = ({
|
|
|
3711
4003
|
},
|
|
3712
4004
|
"\u062D\u0630\u0641 \u062A\u0635\u0648\u06CC\u0631"
|
|
3713
4005
|
)
|
|
3714
|
-
), errors[name] && /* @__PURE__ */
|
|
4006
|
+
), errors[name] && /* @__PURE__ */ React26.createElement(Typography14, { color: "error", variant: "body2", sx: { mt: 1.5, ml: 1 } }, String(errors[name]?.message || "")))
|
|
3715
4007
|
}
|
|
3716
4008
|
);
|
|
3717
4009
|
};
|
|
@@ -3726,9 +4018,9 @@ import MuiAccordionSummary, {
|
|
|
3726
4018
|
} from "@mui/material/AccordionSummary";
|
|
3727
4019
|
import MuiAccordionDetails from "@mui/material/AccordionDetails";
|
|
3728
4020
|
import {
|
|
3729
|
-
Typography as
|
|
4021
|
+
Typography as Typography15
|
|
3730
4022
|
} from "@mui/material";
|
|
3731
|
-
import { useState as
|
|
4023
|
+
import { useState as useState12 } from "react";
|
|
3732
4024
|
function Page({
|
|
3733
4025
|
data
|
|
3734
4026
|
}) {
|
|
@@ -3758,7 +4050,7 @@ function Page({
|
|
|
3758
4050
|
padding: theme2.spacing(2),
|
|
3759
4051
|
borderTop: "1px solid rgba(0, 0, 0, .125)"
|
|
3760
4052
|
}));
|
|
3761
|
-
const [expanded, setExpanded] =
|
|
4053
|
+
const [expanded, setExpanded] = useState12("");
|
|
3762
4054
|
const handleChange = (panel) => (event, newExpanded) => {
|
|
3763
4055
|
setExpanded(newExpanded ? panel : false);
|
|
3764
4056
|
};
|
|
@@ -3782,7 +4074,7 @@ function Page({
|
|
|
3782
4074
|
}
|
|
3783
4075
|
}
|
|
3784
4076
|
},
|
|
3785
|
-
/* @__PURE__ */ React.createElement(
|
|
4077
|
+
/* @__PURE__ */ React.createElement(Typography15, { component: "span" }, item.title)
|
|
3786
4078
|
),
|
|
3787
4079
|
/* @__PURE__ */ React.createElement(AccordionDetails, null, item.body)
|
|
3788
4080
|
);
|
|
@@ -3790,9 +4082,9 @@ function Page({
|
|
|
3790
4082
|
}
|
|
3791
4083
|
|
|
3792
4084
|
// src/switch-button/index.tsx
|
|
3793
|
-
import { Box as
|
|
4085
|
+
import { Box as Box19, FormControlLabel as FormControlLabel3, Switch } from "@mui/material";
|
|
3794
4086
|
import { styled as styled4 } from "@mui/system";
|
|
3795
|
-
import
|
|
4087
|
+
import React27 from "react";
|
|
3796
4088
|
import { PiCardsDuotone, PiTableDuotone } from "react-icons/pi";
|
|
3797
4089
|
import { useTheme as useTheme6 } from "@mui/material";
|
|
3798
4090
|
var SwitchButton = ({
|
|
@@ -3816,7 +4108,7 @@ var SwitchButton = ({
|
|
|
3816
4108
|
border: isDarkMode ? "2px solid white" : "2px solid rgba(80,80,80, 1)"
|
|
3817
4109
|
}
|
|
3818
4110
|
}));
|
|
3819
|
-
const BoxContainer = styled4(
|
|
4111
|
+
const BoxContainer = styled4(Box19)(({ theme: theme3 }) => ({
|
|
3820
4112
|
display: "flex",
|
|
3821
4113
|
alignItems: "center",
|
|
3822
4114
|
backgroundColor: "rgba(188,188,188, 0.1)",
|
|
@@ -3831,10 +4123,10 @@ var SwitchButton = ({
|
|
|
3831
4123
|
transition: "all 0.2s ease",
|
|
3832
4124
|
color: isDarkMode ? "rgba(220,220,220, 1)" : "rgba(160,160,160, 1)"
|
|
3833
4125
|
});
|
|
3834
|
-
return /* @__PURE__ */
|
|
4126
|
+
return /* @__PURE__ */ React27.createElement(BoxContainer, null, /* @__PURE__ */ React27.createElement(
|
|
3835
4127
|
FormControlLabel3,
|
|
3836
4128
|
{
|
|
3837
|
-
control: /* @__PURE__ */
|
|
4129
|
+
control: /* @__PURE__ */ React27.createElement(
|
|
3838
4130
|
CustomSwitch,
|
|
3839
4131
|
{
|
|
3840
4132
|
checked,
|
|
@@ -3842,15 +4134,15 @@ var SwitchButton = ({
|
|
|
3842
4134
|
name: "switch"
|
|
3843
4135
|
}
|
|
3844
4136
|
),
|
|
3845
|
-
label: /* @__PURE__ */
|
|
4137
|
+
label: /* @__PURE__ */ React27.createElement(LabelContainer, null, checked ? iconChecked ? iconChecked : /* @__PURE__ */ React27.createElement(PiTableDuotone, { size: 30 }) : iconUnchecked ? iconUnchecked : /* @__PURE__ */ React27.createElement(PiCardsDuotone, { size: 30 }))
|
|
3846
4138
|
}
|
|
3847
4139
|
));
|
|
3848
4140
|
};
|
|
3849
4141
|
var switch_button_default = SwitchButton;
|
|
3850
4142
|
|
|
3851
4143
|
// src/bascule-connection-button/index.tsx
|
|
3852
|
-
import { Box as
|
|
3853
|
-
import
|
|
4144
|
+
import { Box as Box20, Button as Button12 } from "@mui/material";
|
|
4145
|
+
import React28, { useRef as useRef4, useState as useState13 } from "react";
|
|
3854
4146
|
import toast from "react-hot-toast";
|
|
3855
4147
|
import { PiPlugs, PiPlugsConnected } from "react-icons/pi";
|
|
3856
4148
|
var ConnectToBasculeButton = ({
|
|
@@ -3860,7 +4152,7 @@ var ConnectToBasculeButton = ({
|
|
|
3860
4152
|
parity = "none",
|
|
3861
4153
|
flowControl = "none"
|
|
3862
4154
|
}) => {
|
|
3863
|
-
const [connected, setConnected] =
|
|
4155
|
+
const [connected, setConnected] = useState13(false);
|
|
3864
4156
|
const portRef = useRef4(null);
|
|
3865
4157
|
const connectToBascule = async () => {
|
|
3866
4158
|
if (!("serial" in navigator)) {
|
|
@@ -3879,7 +4171,7 @@ var ConnectToBasculeButton = ({
|
|
|
3879
4171
|
toast.error("\u062E\u0637\u0627 \u062F\u0631 \u0627\u062A\u0635\u0627\u0644 \u0628\u0647 \u0628\u0627\u0633\u06A9\u0648\u0644. \u0644\u0637\u0641\u0627\u064B \u062F\u0648\u0628\u0627\u0631\u0647 \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F.");
|
|
3880
4172
|
}
|
|
3881
4173
|
};
|
|
3882
|
-
return /* @__PURE__ */
|
|
4174
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("style", null, `
|
|
3883
4175
|
@keyframes jumpAnimation {
|
|
3884
4176
|
0% { transform: translateY(1px); }
|
|
3885
4177
|
12.5% { transform: translateY(-2px); }
|
|
@@ -3888,7 +4180,7 @@ var ConnectToBasculeButton = ({
|
|
|
3888
4180
|
50% { transform: translateY(0); }
|
|
3889
4181
|
100% { transform: translateY(0); }
|
|
3890
4182
|
}
|
|
3891
|
-
`), /* @__PURE__ */
|
|
4183
|
+
`), /* @__PURE__ */ React28.createElement(
|
|
3892
4184
|
Button12,
|
|
3893
4185
|
{
|
|
3894
4186
|
variant: "contained",
|
|
@@ -3896,8 +4188,8 @@ var ConnectToBasculeButton = ({
|
|
|
3896
4188
|
disabled: connected,
|
|
3897
4189
|
sx: { minWidth: "11rem" }
|
|
3898
4190
|
},
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
|
|
4191
|
+
/* @__PURE__ */ React28.createElement(
|
|
4192
|
+
Box20,
|
|
3901
4193
|
{
|
|
3902
4194
|
sx: {
|
|
3903
4195
|
display: "flex",
|
|
@@ -3906,7 +4198,7 @@ var ConnectToBasculeButton = ({
|
|
|
3906
4198
|
fontSize: 16
|
|
3907
4199
|
}
|
|
3908
4200
|
},
|
|
3909
|
-
connected ? /* @__PURE__ */
|
|
4201
|
+
connected ? /* @__PURE__ */ React28.createElement(React28.Fragment, null, "\u0645\u062A\u0635\u0644 \u0628\u0647 \u0628\u0627\u0633\u06A9\u0648\u0644", /* @__PURE__ */ React28.createElement(PiPlugsConnected, { size: 20 })) : /* @__PURE__ */ React28.createElement(React28.Fragment, null, "\u0627\u062A\u0635\u0627\u0644 \u0628\u0647 \u0628\u0627\u0633\u06A9\u0648\u0644", /* @__PURE__ */ React28.createElement(
|
|
3910
4202
|
PiPlugs,
|
|
3911
4203
|
{
|
|
3912
4204
|
size: 20,
|
|
@@ -3951,6 +4243,7 @@ export {
|
|
|
3951
4243
|
CustomTimePicker,
|
|
3952
4244
|
DateFilter,
|
|
3953
4245
|
DateFilterRange,
|
|
4246
|
+
date_month_default as DateMonthPicker,
|
|
3954
4247
|
date_picker_default as DatePicker,
|
|
3955
4248
|
date_time_picker_default as DateTimePicker,
|
|
3956
4249
|
date_time_range_picker_default as DateTimeRangePicker,
|
|
@@ -3964,6 +4257,7 @@ export {
|
|
|
3964
4257
|
selector_default as NestedSelectort,
|
|
3965
4258
|
NoResult,
|
|
3966
4259
|
PaginationList,
|
|
4260
|
+
number_pattern_input_default as PatternTextField,
|
|
3967
4261
|
RadioButton,
|
|
3968
4262
|
SearchLicensePlate,
|
|
3969
4263
|
MultipleSelectChip as Selector,
|