@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.js
CHANGED
|
@@ -38,6 +38,7 @@ __export(src_exports, {
|
|
|
38
38
|
CustomTimePicker: () => CustomTimePicker,
|
|
39
39
|
DateFilter: () => DateFilter,
|
|
40
40
|
DateFilterRange: () => DateFilterRange,
|
|
41
|
+
DateMonthPicker: () => date_month_default,
|
|
41
42
|
DatePicker: () => date_picker_default,
|
|
42
43
|
DateTimePicker: () => date_time_picker_default,
|
|
43
44
|
DateTimeRangePicker: () => date_time_range_picker_default,
|
|
@@ -51,6 +52,7 @@ __export(src_exports, {
|
|
|
51
52
|
NestedSelectort: () => selector_default,
|
|
52
53
|
NoResult: () => NoResult,
|
|
53
54
|
PaginationList: () => PaginationList,
|
|
55
|
+
PatternTextField: () => number_pattern_input_default,
|
|
54
56
|
RadioButton: () => RadioButton,
|
|
55
57
|
SearchLicensePlate: () => SearchLicensePlate,
|
|
56
58
|
Selector: () => MultipleSelectChip,
|
|
@@ -1962,17 +1964,211 @@ var JalaliDateTimeRangePicker = ({
|
|
|
1962
1964
|
};
|
|
1963
1965
|
var date_time_range_picker_default = JalaliDateTimeRangePicker;
|
|
1964
1966
|
|
|
1967
|
+
// src/date-month/index.tsx
|
|
1968
|
+
var import_material12 = require("@mui/material");
|
|
1969
|
+
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"));
|
|
1970
|
+
var import_x_date_pickers4 = require("@mui/x-date-pickers");
|
|
1971
|
+
var import_AdapterMomentJalaali4 = require("@mui/x-date-pickers/AdapterMomentJalaali");
|
|
1972
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
1973
|
+
var import_moment_jalaali4 = __toESM(require("moment-jalaali"));
|
|
1974
|
+
var import_fa5 = require("moment/locale/fa");
|
|
1975
|
+
var import_react13 = __toESM(require("react"));
|
|
1976
|
+
var import_react_hook_form9 = require("react-hook-form");
|
|
1977
|
+
import_moment_jalaali4.default.locale("fa");
|
|
1978
|
+
import_moment_jalaali4.default.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
|
|
1979
|
+
var DateMonthPicker = ({
|
|
1980
|
+
name,
|
|
1981
|
+
control,
|
|
1982
|
+
label,
|
|
1983
|
+
size = "medium",
|
|
1984
|
+
disabled = false,
|
|
1985
|
+
align = "left",
|
|
1986
|
+
isLoading,
|
|
1987
|
+
maxDate,
|
|
1988
|
+
minDate,
|
|
1989
|
+
clear = true
|
|
1990
|
+
}) => {
|
|
1991
|
+
const today = (0, import_moment_jalaali4.default)();
|
|
1992
|
+
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
1993
|
+
const customLocaleText = {
|
|
1994
|
+
cancelButtonLabel: "\u0644\u063A\u0648",
|
|
1995
|
+
okButtonLabel: "\u062A\u0623\u06CC\u06CC\u062F",
|
|
1996
|
+
todayButtonLabel: "\u0627\u0645\u0631\u0648\u0632",
|
|
1997
|
+
clearButtonLabel: "\u067E\u0627\u06A9 \u06A9\u0631\u062F\u0646",
|
|
1998
|
+
start: "\u0634\u0631\u0648\u0639",
|
|
1999
|
+
end: "\u067E\u0627\u06CC\u0627\u0646",
|
|
2000
|
+
previousMonth: "\u0645\u0627\u0647 \u0642\u0628\u0644",
|
|
2001
|
+
nextMonth: "\u0645\u0627\u0647 \u0628\u0639\u062F",
|
|
2002
|
+
openDatePickerDialogue: (date, utils, formattedDate) => `\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E ${formattedDate ? `(${formattedDate})` : ""}`,
|
|
2003
|
+
selectDate: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
2004
|
+
datePickerToolbarTitle: "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
2005
|
+
calendarWeekNumberHeaderLabel: "\u0647\u0641\u062A\u0647",
|
|
2006
|
+
calendarWeekNumberHeaderText: "#",
|
|
2007
|
+
calendarWeekNumberAriaLabelText: (weekNumber) => `\u0647\u0641\u062A\u0647 ${weekNumber}`,
|
|
2008
|
+
calendarWeekNumberText: (weekNumber) => `${weekNumber}`
|
|
2009
|
+
};
|
|
2010
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2011
|
+
import_x_date_pickers4.LocalizationProvider,
|
|
2012
|
+
{
|
|
2013
|
+
dateAdapter: import_AdapterMomentJalaali4.AdapterMomentJalaali,
|
|
2014
|
+
localeText: customLocaleText
|
|
2015
|
+
},
|
|
2016
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
|
2017
|
+
import_react_hook_form9.Controller,
|
|
2018
|
+
{
|
|
2019
|
+
name,
|
|
2020
|
+
control,
|
|
2021
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ import_react13.default.createElement(import_material12.Box, { sx: { width: "100%" } }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2022
|
+
import_x_date_pickers4.DatePicker,
|
|
2023
|
+
{
|
|
2024
|
+
disabled: isLoading || disabled,
|
|
2025
|
+
closeOnSelect: true,
|
|
2026
|
+
openTo: "month",
|
|
2027
|
+
views: ["year", "month"],
|
|
2028
|
+
label,
|
|
2029
|
+
value: field.value ? (0, import_moment_jalaali4.default)(field.value) : null,
|
|
2030
|
+
slotProps: {
|
|
2031
|
+
...clear && !disabled ? { field: { clearable: true } } : {},
|
|
2032
|
+
popper: {
|
|
2033
|
+
modifiers: [
|
|
2034
|
+
{
|
|
2035
|
+
name: "preventOverflow",
|
|
2036
|
+
options: {
|
|
2037
|
+
boundary: "window"
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
name: "flip",
|
|
2042
|
+
options: {
|
|
2043
|
+
fallbackPlacements: ["right", "left", "top"]
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
]
|
|
2047
|
+
},
|
|
2048
|
+
textField: {
|
|
2049
|
+
size,
|
|
2050
|
+
placeholder: field.value ? "" : "\u0627\u0646\u062A\u062E\u0627\u0628 \u0645\u0627\u0647 \u0648 \u0633\u0627\u0644",
|
|
2051
|
+
InputLabelProps: {
|
|
2052
|
+
shrink: true,
|
|
2053
|
+
style: { color: error ? "#D32F2F" : "inherit" }
|
|
2054
|
+
},
|
|
2055
|
+
InputProps: {
|
|
2056
|
+
...isLoading && {
|
|
2057
|
+
endAdornment: /* @__PURE__ */ import_react13.default.createElement(import_CircularProgress2.default, { color: "secondary", size: 20 })
|
|
2058
|
+
} || disabled && { endAdornment: false },
|
|
2059
|
+
...field.value && {
|
|
2060
|
+
value: `${(0, import_moment_jalaali4.default)(field.value).format("jMMMM jYYYY")}`
|
|
2061
|
+
},
|
|
2062
|
+
sx: {
|
|
2063
|
+
textAlign: align,
|
|
2064
|
+
"& input": {
|
|
2065
|
+
textAlign: align,
|
|
2066
|
+
direction: "rtl"
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
},
|
|
2071
|
+
actionBar: {
|
|
2072
|
+
actions: ["cancel", "accept"]
|
|
2073
|
+
// نمایش دکمههای تأیید، لغو و پاک کردن
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
onChange: (value) => {
|
|
2077
|
+
if (value == null) {
|
|
2078
|
+
field.onChange(null);
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
onAccept: (newValue) => {
|
|
2082
|
+
if (newValue) {
|
|
2083
|
+
const currentDate = (0, import_dayjs2.default)(newValue);
|
|
2084
|
+
const nowUTC3 = /* @__PURE__ */ new Date();
|
|
2085
|
+
let iranHour = nowUTC3.getUTCHours();
|
|
2086
|
+
let iranMinute = nowUTC3.getUTCMinutes();
|
|
2087
|
+
const dateTimeWithIranTime4 = currentDate.hour(iranHour).minute(iranMinute).second(nowUTC3.getUTCSeconds());
|
|
2088
|
+
field.onChange(
|
|
2089
|
+
dateTimeWithIranTime4.format("YYYY-MM-DDTHH:mm:ss")
|
|
2090
|
+
);
|
|
2091
|
+
} else {
|
|
2092
|
+
field.onChange(null);
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
sx: {
|
|
2096
|
+
width: "100%",
|
|
2097
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4",
|
|
2098
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
2099
|
+
borderColor: error ? "#D32F2F" : "#C4C4C4"
|
|
2100
|
+
},
|
|
2101
|
+
"& .MuiInputBase-root": {
|
|
2102
|
+
height: size === "small" ? 40 : 56
|
|
2103
|
+
}
|
|
2104
|
+
},
|
|
2105
|
+
slots: {
|
|
2106
|
+
...!clear && {
|
|
2107
|
+
clearButton: import_react13.default.Fragment,
|
|
2108
|
+
clearIcon: import_react13.default.Fragment
|
|
2109
|
+
},
|
|
2110
|
+
toolbar: (props) => {
|
|
2111
|
+
const currentDate = (0, import_moment_jalaali4.default)(field.value);
|
|
2112
|
+
const formattedDate = currentDate.format("jMMMM jYYYY");
|
|
2113
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2114
|
+
import_material12.Box,
|
|
2115
|
+
{
|
|
2116
|
+
sx: {
|
|
2117
|
+
my: 2,
|
|
2118
|
+
mx: 4
|
|
2119
|
+
}
|
|
2120
|
+
},
|
|
2121
|
+
/* @__PURE__ */ import_react13.default.createElement(import_material12.Typography, { variant: "overline", color: "primary" }, "\u0645\u0627\u0647 \u0648 \u0633\u0627\u0644 \u0631\u0627 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F"),
|
|
2122
|
+
/* @__PURE__ */ import_react13.default.createElement(import_material12.Typography, { variant: "h4" }, formattedDate == "Invalid date" ? "" : formattedDate)
|
|
2123
|
+
);
|
|
2124
|
+
},
|
|
2125
|
+
monthButton: (props) => {
|
|
2126
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2127
|
+
"button",
|
|
2128
|
+
{
|
|
2129
|
+
className: `${props.className}`,
|
|
2130
|
+
style: {
|
|
2131
|
+
width: "80%",
|
|
2132
|
+
padding: "10px",
|
|
2133
|
+
marginBottom: "20px",
|
|
2134
|
+
border: "1px solid #ccc",
|
|
2135
|
+
borderRadius: "12px",
|
|
2136
|
+
backgroundColor: props.disabled ? "#f0f0f0" : "#f0000",
|
|
2137
|
+
fontSize: "14px",
|
|
2138
|
+
cursor: props.disabled ? "default" : "pointer"
|
|
2139
|
+
},
|
|
2140
|
+
disabled: props.disabled,
|
|
2141
|
+
onFocus: props.onFocus,
|
|
2142
|
+
onBlur: props.onBlur,
|
|
2143
|
+
onClick: props.onClick,
|
|
2144
|
+
ref: props.ref
|
|
2145
|
+
},
|
|
2146
|
+
props["aria-label"],
|
|
2147
|
+
" "
|
|
2148
|
+
);
|
|
2149
|
+
}
|
|
2150
|
+
},
|
|
2151
|
+
minDate: minDate ? minDate : null,
|
|
2152
|
+
maxDate: maxDate ? maxDate : today
|
|
2153
|
+
}
|
|
2154
|
+
), error && /* @__PURE__ */ import_react13.default.createElement(import_material12.Typography, { fontSize: 13, color: "error", sx: { mt: 0.6, ml: 1 } }, error.message))
|
|
2155
|
+
}
|
|
2156
|
+
)
|
|
2157
|
+
);
|
|
2158
|
+
};
|
|
2159
|
+
var date_month_default = DateMonthPicker;
|
|
2160
|
+
|
|
1965
2161
|
// src/license-plate-search/index.tsx
|
|
1966
2162
|
var import_utils2 = require("@mamrp/utils");
|
|
1967
|
-
var
|
|
2163
|
+
var import_material13 = require("@mui/material");
|
|
1968
2164
|
var import_Button4 = __toESM(require("@mui/material/Button"));
|
|
1969
2165
|
var import_Dialog4 = __toESM(require("@mui/material/Dialog"));
|
|
1970
2166
|
var import_DialogContent4 = __toESM(require("@mui/material/DialogContent"));
|
|
1971
2167
|
var import_DialogTitle4 = __toESM(require("@mui/material/DialogTitle"));
|
|
1972
2168
|
var import_image2 = __toESM(require("next/image"));
|
|
1973
|
-
var
|
|
2169
|
+
var import_react14 = require("react");
|
|
1974
2170
|
var import_io52 = require("react-icons/io5");
|
|
1975
|
-
var
|
|
2171
|
+
var import_react15 = __toESM(require("react"));
|
|
1976
2172
|
function SearchLicensePlate({
|
|
1977
2173
|
width = "100%",
|
|
1978
2174
|
part,
|
|
@@ -1981,21 +2177,21 @@ function SearchLicensePlate({
|
|
|
1981
2177
|
readOnly = true,
|
|
1982
2178
|
size
|
|
1983
2179
|
}) {
|
|
1984
|
-
const [open, setOpen] = (0,
|
|
1985
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
1986
|
-
const [inputValues, setInputValues] = (0,
|
|
2180
|
+
const [open, setOpen] = (0, import_react14.useState)(false);
|
|
2181
|
+
const [selectedValue, setSelectedValue] = (0, import_react14.useState)("");
|
|
2182
|
+
const [inputValues, setInputValues] = (0, import_react14.useState)({
|
|
1987
2183
|
input1: "",
|
|
1988
2184
|
input2: "",
|
|
1989
2185
|
input3: "",
|
|
1990
2186
|
input4: ""
|
|
1991
2187
|
});
|
|
1992
2188
|
const inputRefs = {
|
|
1993
|
-
input1: (0,
|
|
1994
|
-
input2: (0,
|
|
1995
|
-
input3: (0,
|
|
1996
|
-
input4: (0,
|
|
2189
|
+
input1: (0, import_react14.useRef)(null),
|
|
2190
|
+
input2: (0, import_react14.useRef)(null),
|
|
2191
|
+
input3: (0, import_react14.useRef)(null),
|
|
2192
|
+
input4: (0, import_react14.useRef)(null)
|
|
1997
2193
|
};
|
|
1998
|
-
(0,
|
|
2194
|
+
(0, import_react14.useEffect)(() => {
|
|
1999
2195
|
if (data) {
|
|
2000
2196
|
let newdata = data.split(" ").filter((word) => word !== "\u0627\u06CC\u0631\u0627\u0646");
|
|
2001
2197
|
setInputValues({
|
|
@@ -2041,8 +2237,8 @@ function SearchLicensePlate({
|
|
|
2041
2237
|
}
|
|
2042
2238
|
}
|
|
2043
2239
|
};
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
|
|
2240
|
+
return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement(
|
|
2241
|
+
import_material13.Box,
|
|
2046
2242
|
{
|
|
2047
2243
|
sx: {
|
|
2048
2244
|
width,
|
|
@@ -2053,16 +2249,16 @@ function SearchLicensePlate({
|
|
|
2053
2249
|
},
|
|
2054
2250
|
dir: "ltr"
|
|
2055
2251
|
},
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
|
|
2252
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2253
|
+
import_material13.Box,
|
|
2058
2254
|
{
|
|
2059
2255
|
sx: {
|
|
2060
2256
|
display: "flex",
|
|
2061
2257
|
alignItems: "center"
|
|
2062
2258
|
}
|
|
2063
2259
|
},
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
|
|
2260
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2261
|
+
import_material13.Box,
|
|
2066
2262
|
{
|
|
2067
2263
|
sx: {
|
|
2068
2264
|
backgroundColor: "#172554",
|
|
@@ -2076,7 +2272,7 @@ function SearchLicensePlate({
|
|
|
2076
2272
|
mr: 0.4
|
|
2077
2273
|
}
|
|
2078
2274
|
},
|
|
2079
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2080
2276
|
import_image2.default,
|
|
2081
2277
|
{
|
|
2082
2278
|
src: "/assets/images/iran-flag-dark.svg",
|
|
@@ -2100,8 +2296,8 @@ function SearchLicensePlate({
|
|
|
2100
2296
|
)
|
|
2101
2297
|
)
|
|
2102
2298
|
),
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
|
|
2299
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2300
|
+
import_material13.Box,
|
|
2105
2301
|
{
|
|
2106
2302
|
sx: {
|
|
2107
2303
|
width: "100%",
|
|
@@ -2114,7 +2310,7 @@ function SearchLicensePlate({
|
|
|
2114
2310
|
alignItems: "center"
|
|
2115
2311
|
}
|
|
2116
2312
|
},
|
|
2117
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2118
2314
|
"input",
|
|
2119
2315
|
{
|
|
2120
2316
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2139,15 +2335,15 @@ function SearchLicensePlate({
|
|
|
2139
2335
|
}
|
|
2140
2336
|
}
|
|
2141
2337
|
),
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
|
|
2338
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2339
|
+
import_material13.Box,
|
|
2144
2340
|
{
|
|
2145
2341
|
sx: {
|
|
2146
2342
|
display: "flex",
|
|
2147
2343
|
alignItems: "center"
|
|
2148
2344
|
}
|
|
2149
2345
|
},
|
|
2150
|
-
!data && /* @__PURE__ */
|
|
2346
|
+
!data && /* @__PURE__ */ import_react15.default.createElement(
|
|
2151
2347
|
import_image2.default,
|
|
2152
2348
|
{
|
|
2153
2349
|
src: "/assets/images/solid-arrow-down.svg",
|
|
@@ -2157,7 +2353,7 @@ function SearchLicensePlate({
|
|
|
2157
2353
|
style: { cursor: "pointer", marginRight: 4 }
|
|
2158
2354
|
}
|
|
2159
2355
|
),
|
|
2160
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2161
2357
|
"input",
|
|
2162
2358
|
{
|
|
2163
2359
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2183,7 +2379,7 @@ function SearchLicensePlate({
|
|
|
2183
2379
|
}
|
|
2184
2380
|
)
|
|
2185
2381
|
),
|
|
2186
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2187
2383
|
import_Dialog4.default,
|
|
2188
2384
|
{
|
|
2189
2385
|
dir: "rtl",
|
|
@@ -2192,8 +2388,8 @@ function SearchLicensePlate({
|
|
|
2192
2388
|
"aria-labelledby": "alert-dialog-title",
|
|
2193
2389
|
"aria-describedby": "alert-dialog-description"
|
|
2194
2390
|
},
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
|
|
2391
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2392
|
+
import_material13.Box,
|
|
2197
2393
|
{
|
|
2198
2394
|
sx: {
|
|
2199
2395
|
display: "flex",
|
|
@@ -2203,9 +2399,9 @@ function SearchLicensePlate({
|
|
|
2203
2399
|
// bg-neutral-100
|
|
2204
2400
|
}
|
|
2205
2401
|
},
|
|
2206
|
-
/* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
|
|
2402
|
+
/* @__PURE__ */ import_react15.default.createElement(import_DialogTitle4.default, { id: "alert-dialog-title" }, "\u0627\u0646\u062A\u062E\u0627\u0628 \u062D\u0631\u0641 \u067E\u0644\u0627\u06A9"),
|
|
2403
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2404
|
+
import_material13.Box,
|
|
2209
2405
|
{
|
|
2210
2406
|
sx: {
|
|
2211
2407
|
cursor: "pointer",
|
|
@@ -2215,11 +2411,11 @@ function SearchLicensePlate({
|
|
|
2215
2411
|
},
|
|
2216
2412
|
onClick: () => setOpen(false)
|
|
2217
2413
|
},
|
|
2218
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ import_react15.default.createElement(import_material13.IconButton, null, /* @__PURE__ */ import_react15.default.createElement(import_io52.IoClose, null))
|
|
2219
2415
|
)
|
|
2220
2416
|
),
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
|
|
2417
|
+
/* @__PURE__ */ import_react15.default.createElement(import_DialogContent4.default, null, /* @__PURE__ */ import_react15.default.createElement(
|
|
2418
|
+
import_material13.Box,
|
|
2223
2419
|
{
|
|
2224
2420
|
sx: {
|
|
2225
2421
|
display: "flex",
|
|
@@ -2230,7 +2426,7 @@ function SearchLicensePlate({
|
|
|
2230
2426
|
my: 2
|
|
2231
2427
|
}
|
|
2232
2428
|
},
|
|
2233
|
-
letters_default.map((letter, index) => /* @__PURE__ */
|
|
2429
|
+
letters_default.map((letter, index) => /* @__PURE__ */ import_react15.default.createElement(
|
|
2234
2430
|
import_Button4.default,
|
|
2235
2431
|
{
|
|
2236
2432
|
key: index,
|
|
@@ -2248,9 +2444,9 @@ function SearchLicensePlate({
|
|
|
2248
2444
|
},
|
|
2249
2445
|
onClick: () => handleInputChange(letter, "input2", 3, 1)
|
|
2250
2446
|
},
|
|
2251
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ import_react15.default.createElement(import_material13.Typography, { color: "#117A4F", fontWeight: "bold" }, letter)
|
|
2252
2448
|
))
|
|
2253
|
-
), /* @__PURE__ */
|
|
2449
|
+
), /* @__PURE__ */ import_react15.default.createElement(import_material13.Box, { sx: { display: "flex", justifyContent: "center", mt: 2.5 } }, /* @__PURE__ */ import_react15.default.createElement(
|
|
2254
2450
|
import_Button4.default,
|
|
2255
2451
|
{
|
|
2256
2452
|
sx: { width: "6rem" },
|
|
@@ -2264,7 +2460,7 @@ function SearchLicensePlate({
|
|
|
2264
2460
|
"\u062D\u0630\u0641 \u062D\u0631\u0641"
|
|
2265
2461
|
)))
|
|
2266
2462
|
),
|
|
2267
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2268
2464
|
"input",
|
|
2269
2465
|
{
|
|
2270
2466
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2290,8 +2486,8 @@ function SearchLicensePlate({
|
|
|
2290
2486
|
}
|
|
2291
2487
|
}
|
|
2292
2488
|
),
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
|
|
2489
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2490
|
+
import_material13.Box,
|
|
2295
2491
|
{
|
|
2296
2492
|
sx: {
|
|
2297
2493
|
height: "40px",
|
|
@@ -2300,8 +2496,8 @@ function SearchLicensePlate({
|
|
|
2300
2496
|
}
|
|
2301
2497
|
}
|
|
2302
2498
|
),
|
|
2303
|
-
/* @__PURE__ */
|
|
2304
|
-
|
|
2499
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2500
|
+
import_material13.Box,
|
|
2305
2501
|
{
|
|
2306
2502
|
sx: {
|
|
2307
2503
|
display: "flex",
|
|
@@ -2310,7 +2506,7 @@ function SearchLicensePlate({
|
|
|
2310
2506
|
alignItems: "center"
|
|
2311
2507
|
}
|
|
2312
2508
|
},
|
|
2313
|
-
/* @__PURE__ */
|
|
2509
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2314
2510
|
"input",
|
|
2315
2511
|
{
|
|
2316
2512
|
disabled: readOnly || !!data && readOnly,
|
|
@@ -2335,7 +2531,7 @@ function SearchLicensePlate({
|
|
|
2335
2531
|
}
|
|
2336
2532
|
}
|
|
2337
2533
|
),
|
|
2338
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2339
2535
|
import_image2.default,
|
|
2340
2536
|
{
|
|
2341
2537
|
src: "/assets/images/iran.svg",
|
|
@@ -2350,25 +2546,25 @@ function SearchLicensePlate({
|
|
|
2350
2546
|
}
|
|
2351
2547
|
|
|
2352
2548
|
// src/mobile-date-time-picker/index.tsx
|
|
2353
|
-
var
|
|
2549
|
+
var import_material14 = require("@mui/material");
|
|
2354
2550
|
var import_useMediaQuery2 = __toESM(require("@mui/material/useMediaQuery"));
|
|
2355
2551
|
var import_system4 = require("@mui/system");
|
|
2356
|
-
var
|
|
2357
|
-
var
|
|
2358
|
-
var
|
|
2359
|
-
var
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2362
|
-
|
|
2552
|
+
var import_x_date_pickers5 = require("@mui/x-date-pickers");
|
|
2553
|
+
var import_AdapterMomentJalaali5 = require("@mui/x-date-pickers/AdapterMomentJalaali");
|
|
2554
|
+
var import_dayjs3 = __toESM(require("dayjs"));
|
|
2555
|
+
var import_moment_jalaali5 = __toESM(require("moment-jalaali"));
|
|
2556
|
+
var import_react16 = __toESM(require("react"));
|
|
2557
|
+
var import_react_hook_form10 = require("react-hook-form");
|
|
2558
|
+
import_moment_jalaali5.default.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
|
|
2363
2559
|
var JalaliDatePicker3 = ({
|
|
2364
2560
|
name,
|
|
2365
2561
|
control,
|
|
2366
2562
|
label,
|
|
2367
2563
|
isLoading
|
|
2368
2564
|
}) => {
|
|
2369
|
-
const today = (0,
|
|
2565
|
+
const today = (0, import_moment_jalaali5.default)();
|
|
2370
2566
|
const isMobile = (0, import_useMediaQuery2.default)("(max-width:700px)");
|
|
2371
|
-
const [open, setOpen] = (0,
|
|
2567
|
+
const [open, setOpen] = (0, import_react16.useState)(false);
|
|
2372
2568
|
const customLocaleText = {
|
|
2373
2569
|
cancelButtonLabel: "\u0644\u063A\u0648",
|
|
2374
2570
|
okButtonLabel: "\u062A\u0623\u06CC\u06CC\u062F",
|
|
@@ -2393,19 +2589,19 @@ var JalaliDatePicker3 = ({
|
|
|
2393
2589
|
calendarWeekNumberAriaLabelText: (weekNumber) => `\u0647\u0641\u062A\u0647 ${weekNumber}`,
|
|
2394
2590
|
calendarWeekNumberText: (weekNumber) => `${weekNumber}`
|
|
2395
2591
|
};
|
|
2396
|
-
return /* @__PURE__ */
|
|
2397
|
-
|
|
2592
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2593
|
+
import_x_date_pickers5.LocalizationProvider,
|
|
2398
2594
|
{
|
|
2399
|
-
dateAdapter:
|
|
2595
|
+
dateAdapter: import_AdapterMomentJalaali5.AdapterMomentJalaali,
|
|
2400
2596
|
localeText: customLocaleText
|
|
2401
2597
|
},
|
|
2402
|
-
/* @__PURE__ */
|
|
2403
|
-
|
|
2598
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
2599
|
+
import_react_hook_form10.Controller,
|
|
2404
2600
|
{
|
|
2405
2601
|
name,
|
|
2406
2602
|
control,
|
|
2407
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */
|
|
2408
|
-
|
|
2603
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ import_react16.default.createElement(import_system4.Box, { sx: { width: "100%" } }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2604
|
+
import_x_date_pickers5.MobileDateTimePicker,
|
|
2409
2605
|
{
|
|
2410
2606
|
open,
|
|
2411
2607
|
onClose: () => {
|
|
@@ -2418,10 +2614,10 @@ var JalaliDatePicker3 = ({
|
|
|
2418
2614
|
openTo: "day",
|
|
2419
2615
|
views: ["year", "month", "day", "hours", "minutes"],
|
|
2420
2616
|
label,
|
|
2421
|
-
value: field.value ? (0,
|
|
2617
|
+
value: field.value ? (0, import_moment_jalaali5.default)(field.value) : null,
|
|
2422
2618
|
onChange: (newValue) => {
|
|
2423
2619
|
if (newValue) {
|
|
2424
|
-
field.onChange((0,
|
|
2620
|
+
field.onChange((0, import_dayjs3.default)(newValue).format("YYYY-MM-DDTHH:mm:ss"));
|
|
2425
2621
|
} else {
|
|
2426
2622
|
field.onChange(null);
|
|
2427
2623
|
}
|
|
@@ -2437,7 +2633,7 @@ var JalaliDatePicker3 = ({
|
|
|
2437
2633
|
format: `jDD jMMMM jYYYY ${" "} - ${" "} HH:mm`,
|
|
2438
2634
|
slots: {
|
|
2439
2635
|
toolbar: (props) => {
|
|
2440
|
-
const currentDate = (0,
|
|
2636
|
+
const currentDate = (0, import_moment_jalaali5.default)(field.value || null);
|
|
2441
2637
|
let formattedDay, formattedDate, formattedYear, formattedTime;
|
|
2442
2638
|
if (field.value) {
|
|
2443
2639
|
formattedDay = currentDate.format("dddd");
|
|
@@ -2447,7 +2643,7 @@ var JalaliDatePicker3 = ({
|
|
|
2447
2643
|
} else {
|
|
2448
2644
|
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 = "";
|
|
2449
2645
|
}
|
|
2450
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2451
2647
|
import_system4.Box,
|
|
2452
2648
|
{
|
|
2453
2649
|
sx: {
|
|
@@ -2460,8 +2656,8 @@ var JalaliDatePicker3 = ({
|
|
|
2460
2656
|
gap: 1
|
|
2461
2657
|
}
|
|
2462
2658
|
},
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
|
|
2659
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
2660
|
+
import_material14.Typography,
|
|
2465
2661
|
{
|
|
2466
2662
|
fontSize: 16,
|
|
2467
2663
|
variant: "overline",
|
|
@@ -2469,8 +2665,8 @@ var JalaliDatePicker3 = ({
|
|
|
2469
2665
|
},
|
|
2470
2666
|
`${formattedDay}\u060C`
|
|
2471
2667
|
),
|
|
2472
|
-
/* @__PURE__ */
|
|
2473
|
-
|
|
2668
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
2669
|
+
import_material14.Typography,
|
|
2474
2670
|
{
|
|
2475
2671
|
variant: "h4",
|
|
2476
2672
|
fontSize: 26,
|
|
@@ -2478,8 +2674,8 @@ var JalaliDatePicker3 = ({
|
|
|
2478
2674
|
},
|
|
2479
2675
|
`${formattedDate}`
|
|
2480
2676
|
),
|
|
2481
|
-
/* @__PURE__ */
|
|
2482
|
-
|
|
2677
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
2678
|
+
import_material14.Typography,
|
|
2483
2679
|
{
|
|
2484
2680
|
fontSize: 16,
|
|
2485
2681
|
variant: "body2",
|
|
@@ -2487,9 +2683,9 @@ var JalaliDatePicker3 = ({
|
|
|
2487
2683
|
},
|
|
2488
2684
|
`${formattedYear}`
|
|
2489
2685
|
),
|
|
2490
|
-
field.value && /* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
|
|
2686
|
+
field.value && /* @__PURE__ */ import_react16.default.createElement(import_material14.Typography, null, "-"),
|
|
2687
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
2688
|
+
import_material14.Typography,
|
|
2493
2689
|
{
|
|
2494
2690
|
fontSize: 16,
|
|
2495
2691
|
variant: "body2",
|
|
@@ -2501,8 +2697,8 @@ var JalaliDatePicker3 = ({
|
|
|
2501
2697
|
);
|
|
2502
2698
|
},
|
|
2503
2699
|
monthButton: (props) => {
|
|
2504
|
-
return /* @__PURE__ */
|
|
2505
|
-
|
|
2700
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2701
|
+
import_material14.Button,
|
|
2506
2702
|
{
|
|
2507
2703
|
className: props.className,
|
|
2508
2704
|
style: {
|
|
@@ -2579,7 +2775,7 @@ var JalaliDatePicker3 = ({
|
|
|
2579
2775
|
}
|
|
2580
2776
|
}
|
|
2581
2777
|
}
|
|
2582
|
-
), error && /* @__PURE__ */
|
|
2778
|
+
), error && /* @__PURE__ */ import_react16.default.createElement(import_material14.Typography, { fontSize: 13, color: "error", sx: { mt: 0.6, ml: 1 } }, error.message))
|
|
2583
2779
|
}
|
|
2584
2780
|
)
|
|
2585
2781
|
);
|
|
@@ -2587,12 +2783,12 @@ var JalaliDatePicker3 = ({
|
|
|
2587
2783
|
var mobile_date_time_picker_default = JalaliDatePicker3;
|
|
2588
2784
|
|
|
2589
2785
|
// src/modal/index.tsx
|
|
2590
|
-
var
|
|
2786
|
+
var React15 = __toESM(require("react"));
|
|
2591
2787
|
var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
|
|
2592
2788
|
var import_DialogActions3 = __toESM(require("@mui/material/DialogActions"));
|
|
2593
2789
|
var import_DialogContent5 = __toESM(require("@mui/material/DialogContent"));
|
|
2594
2790
|
var import_DialogTitle5 = __toESM(require("@mui/material/DialogTitle"));
|
|
2595
|
-
var
|
|
2791
|
+
var import_material15 = require("@mui/material");
|
|
2596
2792
|
var import_common2 = require("@mamrp/icons/common");
|
|
2597
2793
|
var import_md3 = require("react-icons/md");
|
|
2598
2794
|
function ConfirmationDialog2({
|
|
@@ -2604,7 +2800,7 @@ function ConfirmationDialog2({
|
|
|
2604
2800
|
bodyText,
|
|
2605
2801
|
isLoading
|
|
2606
2802
|
}) {
|
|
2607
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ React15.createElement(import_Dialog5.default, { open, onClose: handleClose, fullWidth: true, maxWidth: "xs" }, /* @__PURE__ */ React15.createElement(import_material15.Box, null, /* @__PURE__ */ React15.createElement(
|
|
2608
2804
|
import_DialogTitle5.default,
|
|
2609
2805
|
{
|
|
2610
2806
|
fontWeight: 700,
|
|
@@ -2613,10 +2809,10 @@ function ConfirmationDialog2({
|
|
|
2613
2809
|
alignItems: "center",
|
|
2614
2810
|
gap: 1
|
|
2615
2811
|
},
|
|
2616
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ React15.createElement(import_common2.Delete, { style: { color: "red" }, size: 18 }),
|
|
2617
2813
|
headerText
|
|
2618
|
-
), /* @__PURE__ */
|
|
2619
|
-
|
|
2814
|
+
), /* @__PURE__ */ React15.createElement(
|
|
2815
|
+
import_material15.IconButton,
|
|
2620
2816
|
{
|
|
2621
2817
|
"aria-label": "close",
|
|
2622
2818
|
onClick: handleClose,
|
|
@@ -2627,8 +2823,8 @@ function ConfirmationDialog2({
|
|
|
2627
2823
|
color: (theme2) => theme2.palette.grey[500]
|
|
2628
2824
|
}
|
|
2629
2825
|
},
|
|
2630
|
-
/* @__PURE__ */
|
|
2631
|
-
), /* @__PURE__ */
|
|
2826
|
+
/* @__PURE__ */ React15.createElement(import_md3.MdClose, null)
|
|
2827
|
+
), /* @__PURE__ */ React15.createElement(import_material15.Divider, { sx: { my: "10px" } }), /* @__PURE__ */ React15.createElement(import_DialogContent5.default, null, bodyText), /* @__PURE__ */ React15.createElement(
|
|
2632
2828
|
import_DialogActions3.default,
|
|
2633
2829
|
{
|
|
2634
2830
|
sx: {
|
|
@@ -2640,8 +2836,8 @@ function ConfirmationDialog2({
|
|
|
2640
2836
|
padding: "2rem"
|
|
2641
2837
|
}
|
|
2642
2838
|
},
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
|
|
2839
|
+
/* @__PURE__ */ React15.createElement(
|
|
2840
|
+
import_material15.Button,
|
|
2645
2841
|
{
|
|
2646
2842
|
disabled: isLoading,
|
|
2647
2843
|
onClick: () => {
|
|
@@ -2651,17 +2847,17 @@ function ConfirmationDialog2({
|
|
|
2651
2847
|
variant: "contained",
|
|
2652
2848
|
color: "error",
|
|
2653
2849
|
sx: { minWidth: "120px" },
|
|
2654
|
-
startIcon: isLoading ? /* @__PURE__ */
|
|
2850
|
+
startIcon: isLoading ? /* @__PURE__ */ React15.createElement(import_material15.CircularProgress, { sx: { color: "white" }, size: 20 }) : /* @__PURE__ */ React15.createElement(import_common2.Delete, { size: 16 })
|
|
2655
2851
|
},
|
|
2656
2852
|
"\u062D\u0630\u0641"
|
|
2657
2853
|
),
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
|
|
2854
|
+
/* @__PURE__ */ React15.createElement(
|
|
2855
|
+
import_material15.Button,
|
|
2660
2856
|
{
|
|
2661
2857
|
onClick: handleClose,
|
|
2662
2858
|
variant: "outlined",
|
|
2663
2859
|
color: "error",
|
|
2664
|
-
startIcon: /* @__PURE__ */
|
|
2860
|
+
startIcon: /* @__PURE__ */ React15.createElement(import_md3.MdOutlineCancel, { size: 15 }),
|
|
2665
2861
|
sx: { minWidth: "120px" }
|
|
2666
2862
|
},
|
|
2667
2863
|
"\u0627\u0646\u0635\u0631\u0627\u0641"
|
|
@@ -2670,16 +2866,16 @@ function ConfirmationDialog2({
|
|
|
2670
2866
|
}
|
|
2671
2867
|
|
|
2672
2868
|
// src/no-result/index.tsx
|
|
2673
|
-
var
|
|
2674
|
-
var
|
|
2869
|
+
var import_material16 = require("@mui/material");
|
|
2870
|
+
var import_react17 = __toESM(require("react"));
|
|
2675
2871
|
function NoResult({
|
|
2676
2872
|
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!",
|
|
2677
2873
|
description,
|
|
2678
2874
|
sx = {}
|
|
2679
2875
|
}) {
|
|
2680
|
-
const theme2 = (0,
|
|
2681
|
-
return /* @__PURE__ */
|
|
2682
|
-
|
|
2876
|
+
const theme2 = (0, import_material16.useTheme)();
|
|
2877
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
2878
|
+
import_material16.Card,
|
|
2683
2879
|
{
|
|
2684
2880
|
sx: {
|
|
2685
2881
|
width: "100%",
|
|
@@ -2688,8 +2884,8 @@ function NoResult({
|
|
|
2688
2884
|
border: `1px solid ${theme2.palette.secondary.light}`
|
|
2689
2885
|
}
|
|
2690
2886
|
},
|
|
2691
|
-
/* @__PURE__ */
|
|
2692
|
-
|
|
2887
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
2888
|
+
import_material16.Stack,
|
|
2693
2889
|
{
|
|
2694
2890
|
spacing: 2,
|
|
2695
2891
|
alignItems: "center",
|
|
@@ -2698,7 +2894,7 @@ function NoResult({
|
|
|
2698
2894
|
...sx
|
|
2699
2895
|
}
|
|
2700
2896
|
},
|
|
2701
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
2702
2898
|
"img",
|
|
2703
2899
|
{
|
|
2704
2900
|
src: "/assets/images/no-data.png",
|
|
@@ -2707,24 +2903,24 @@ function NoResult({
|
|
|
2707
2903
|
width: 100
|
|
2708
2904
|
}
|
|
2709
2905
|
),
|
|
2710
|
-
/* @__PURE__ */
|
|
2906
|
+
/* @__PURE__ */ import_react17.default.createElement(import_material16.Stack, { spacing: 1, alignItems: "center" }, /* @__PURE__ */ import_react17.default.createElement(import_material16.Typography, { fontWeight: "600" }, title), description && /* @__PURE__ */ import_react17.default.createElement(import_material16.Typography, { fontWeight: "500" }, description))
|
|
2711
2907
|
)
|
|
2712
2908
|
);
|
|
2713
2909
|
}
|
|
2714
2910
|
|
|
2715
2911
|
// src/pagination-list/index.tsx
|
|
2716
2912
|
var import_utils3 = require("@mamrp/utils");
|
|
2717
|
-
var
|
|
2913
|
+
var import_material17 = require("@mui/material");
|
|
2718
2914
|
var import_Stack = __toESM(require("@mui/material/Stack"));
|
|
2719
2915
|
var import_system5 = require("@mui/system");
|
|
2720
|
-
var
|
|
2721
|
-
var
|
|
2916
|
+
var React17 = __toESM(require("react"));
|
|
2917
|
+
var import_fa6 = require("react-icons/fa");
|
|
2722
2918
|
function PaginationList({
|
|
2723
2919
|
currentPage,
|
|
2724
2920
|
setCurrentPage,
|
|
2725
2921
|
totalPages
|
|
2726
2922
|
}) {
|
|
2727
|
-
|
|
2923
|
+
React17.useEffect(() => {
|
|
2728
2924
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
2729
2925
|
}, [currentPage]);
|
|
2730
2926
|
const handlePrevious = () => {
|
|
@@ -2737,7 +2933,7 @@ function PaginationList({
|
|
|
2737
2933
|
setCurrentPage(currentPage + 1);
|
|
2738
2934
|
}
|
|
2739
2935
|
};
|
|
2740
|
-
return /* @__PURE__ */
|
|
2936
|
+
return /* @__PURE__ */ React17.createElement(
|
|
2741
2937
|
import_Stack.default,
|
|
2742
2938
|
{
|
|
2743
2939
|
direction: "row",
|
|
@@ -2745,8 +2941,8 @@ function PaginationList({
|
|
|
2745
2941
|
alignItems: "center",
|
|
2746
2942
|
justifyContent: "center"
|
|
2747
2943
|
},
|
|
2748
|
-
/* @__PURE__ */
|
|
2749
|
-
|
|
2944
|
+
/* @__PURE__ */ React17.createElement(
|
|
2945
|
+
import_material17.Button,
|
|
2750
2946
|
{
|
|
2751
2947
|
variant: "contained",
|
|
2752
2948
|
onClick: handlePrevious,
|
|
@@ -2762,12 +2958,12 @@ function PaginationList({
|
|
|
2762
2958
|
justifyContent: "center"
|
|
2763
2959
|
},
|
|
2764
2960
|
size: "large",
|
|
2765
|
-
startIcon: /* @__PURE__ */
|
|
2961
|
+
startIcon: /* @__PURE__ */ React17.createElement(import_fa6.FaChevronRight, null)
|
|
2766
2962
|
},
|
|
2767
2963
|
"\u0642\u0628\u0644\u06CC",
|
|
2768
2964
|
" "
|
|
2769
2965
|
),
|
|
2770
|
-
/* @__PURE__ */
|
|
2966
|
+
/* @__PURE__ */ React17.createElement(
|
|
2771
2967
|
import_system5.Box,
|
|
2772
2968
|
{
|
|
2773
2969
|
sx: {
|
|
@@ -2783,11 +2979,11 @@ function PaginationList({
|
|
|
2783
2979
|
backgroundColor: "#065938"
|
|
2784
2980
|
}
|
|
2785
2981
|
},
|
|
2786
|
-
/* @__PURE__ */
|
|
2982
|
+
/* @__PURE__ */ React17.createElement("span", { style: { margin: "0px 6px", fontSize: "1.2rem" } }, "\u0635\u0641\u062D\u0647"),
|
|
2787
2983
|
(0, import_utils3.convertToPersianDigits)(currentPage)
|
|
2788
2984
|
),
|
|
2789
|
-
/* @__PURE__ */
|
|
2790
|
-
|
|
2985
|
+
/* @__PURE__ */ React17.createElement(
|
|
2986
|
+
import_material17.Button,
|
|
2791
2987
|
{
|
|
2792
2988
|
variant: "contained",
|
|
2793
2989
|
onClick: handleNext,
|
|
@@ -2803,7 +2999,7 @@ function PaginationList({
|
|
|
2803
2999
|
justifyContent: "center"
|
|
2804
3000
|
},
|
|
2805
3001
|
size: "large",
|
|
2806
|
-
endIcon: /* @__PURE__ */
|
|
3002
|
+
endIcon: /* @__PURE__ */ React17.createElement(import_fa6.FaChevronLeft, null)
|
|
2807
3003
|
},
|
|
2808
3004
|
"\u0628\u0639\u062F\u06CC",
|
|
2809
3005
|
" "
|
|
@@ -2812,14 +3008,14 @@ function PaginationList({
|
|
|
2812
3008
|
}
|
|
2813
3009
|
|
|
2814
3010
|
// src/radio-button/index.tsx
|
|
2815
|
-
var
|
|
2816
|
-
var
|
|
3011
|
+
var React18 = __toESM(require("react"));
|
|
3012
|
+
var import_react_hook_form11 = require("react-hook-form");
|
|
2817
3013
|
var import_Radio = __toESM(require("@mui/material/Radio"));
|
|
2818
3014
|
var import_RadioGroup = __toESM(require("@mui/material/RadioGroup"));
|
|
2819
3015
|
var import_FormControlLabel = __toESM(require("@mui/material/FormControlLabel"));
|
|
2820
3016
|
var import_FormControl = __toESM(require("@mui/material/FormControl"));
|
|
2821
3017
|
var import_FormLabel = __toESM(require("@mui/material/FormLabel"));
|
|
2822
|
-
var
|
|
3018
|
+
var import_material18 = require("@mui/material");
|
|
2823
3019
|
var import_theme = __toESM(require("@mamrp/layout/theme"));
|
|
2824
3020
|
var import_system6 = require("@mui/system");
|
|
2825
3021
|
function RadioButton({
|
|
@@ -2831,7 +3027,7 @@ function RadioButton({
|
|
|
2831
3027
|
disabledBoarder,
|
|
2832
3028
|
direction = "row"
|
|
2833
3029
|
}) {
|
|
2834
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
2835
3031
|
import_FormControl.default,
|
|
2836
3032
|
{
|
|
2837
3033
|
sx: {
|
|
@@ -2841,12 +3037,12 @@ function RadioButton({
|
|
|
2841
3037
|
justifyContent: "start"
|
|
2842
3038
|
}
|
|
2843
3039
|
},
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
|
|
3040
|
+
/* @__PURE__ */ React18.createElement(
|
|
3041
|
+
import_react_hook_form11.Controller,
|
|
2846
3042
|
{
|
|
2847
3043
|
name,
|
|
2848
3044
|
control,
|
|
2849
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */
|
|
3045
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ React18.createElement(import_system6.Box, { display: "flex", width: "100%", flexDirection: "column" }, label && /* @__PURE__ */ React18.createElement(
|
|
2850
3046
|
import_FormLabel.default,
|
|
2851
3047
|
{
|
|
2852
3048
|
id: `${name}-label`,
|
|
@@ -2864,7 +3060,7 @@ function RadioButton({
|
|
|
2864
3060
|
}
|
|
2865
3061
|
},
|
|
2866
3062
|
label
|
|
2867
|
-
), /* @__PURE__ */
|
|
3063
|
+
), /* @__PURE__ */ React18.createElement(
|
|
2868
3064
|
import_RadioGroup.default,
|
|
2869
3065
|
{
|
|
2870
3066
|
...field,
|
|
@@ -2882,16 +3078,16 @@ function RadioButton({
|
|
|
2882
3078
|
borderColor: error?.message ? import_theme.default.CustomComponents.RadioButton.errorColor : import_theme.default.CustomComponents.RadioButton.borderColor
|
|
2883
3079
|
}
|
|
2884
3080
|
},
|
|
2885
|
-
options.map((option) => /* @__PURE__ */
|
|
3081
|
+
options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2886
3082
|
import_FormControlLabel.default,
|
|
2887
3083
|
{
|
|
2888
3084
|
key: option.value,
|
|
2889
3085
|
value: option.value,
|
|
2890
|
-
control: /* @__PURE__ */
|
|
3086
|
+
control: /* @__PURE__ */ React18.createElement(import_Radio.default, { id: option.id }),
|
|
2891
3087
|
label: option.name
|
|
2892
3088
|
}
|
|
2893
3089
|
))
|
|
2894
|
-
), error?.message && /* @__PURE__ */
|
|
3090
|
+
), error?.message && /* @__PURE__ */ React18.createElement(import_material18.Typography, { color: "error", fontSize: import_theme.default.CustomComponents.RadioButton.errorFontSize, ml: 2 }, error?.message))
|
|
2895
3091
|
}
|
|
2896
3092
|
)
|
|
2897
3093
|
));
|
|
@@ -2899,8 +3095,8 @@ function RadioButton({
|
|
|
2899
3095
|
|
|
2900
3096
|
// src/selector/index.tsx
|
|
2901
3097
|
var import_md4 = require("react-icons/md");
|
|
2902
|
-
var
|
|
2903
|
-
var
|
|
3098
|
+
var import_material19 = require("@mui/material");
|
|
3099
|
+
var import_react18 = __toESM(require("react"));
|
|
2904
3100
|
var backendResponse = {
|
|
2905
3101
|
value: {
|
|
2906
3102
|
data: [
|
|
@@ -2953,9 +3149,9 @@ var backendResponse = {
|
|
|
2953
3149
|
}
|
|
2954
3150
|
};
|
|
2955
3151
|
var NestedSelect = () => {
|
|
2956
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
2957
|
-
const [openMenus, setOpenMenus] = (0,
|
|
2958
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
3152
|
+
const [selectedItem, setSelectedItem] = (0, import_react18.useState)(null);
|
|
3153
|
+
const [openMenus, setOpenMenus] = (0, import_react18.useState)({});
|
|
3154
|
+
const [menuOpen, setMenuOpen] = (0, import_react18.useState)(false);
|
|
2959
3155
|
const handleSelect = (item) => {
|
|
2960
3156
|
setSelectedItem((prev) => prev?.id === item.id ? null : item);
|
|
2961
3157
|
};
|
|
@@ -2968,8 +3164,8 @@ var NestedSelect = () => {
|
|
|
2968
3164
|
const isAnyChildSelected = item.children?.some(
|
|
2969
3165
|
(child) => selectedItem?.id === child.id
|
|
2970
3166
|
);
|
|
2971
|
-
return /* @__PURE__ */
|
|
2972
|
-
|
|
3167
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { key: item.id }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3168
|
+
import_material19.MenuItem,
|
|
2973
3169
|
{
|
|
2974
3170
|
onClick: (e) => {
|
|
2975
3171
|
e.stopPropagation();
|
|
@@ -2978,10 +3174,10 @@ var NestedSelect = () => {
|
|
|
2978
3174
|
disabled: isAnyChildSelected,
|
|
2979
3175
|
sx: { pl: level * 2 }
|
|
2980
3176
|
},
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
item.children && item.children.length > 0 && /* @__PURE__ */
|
|
2984
|
-
|
|
3177
|
+
/* @__PURE__ */ import_react18.default.createElement(import_material19.Checkbox, { checked: isParentSelected }),
|
|
3178
|
+
/* @__PURE__ */ import_react18.default.createElement(import_material19.ListItemText, { primary: item.title }),
|
|
3179
|
+
item.children && item.children.length > 0 && /* @__PURE__ */ import_react18.default.createElement(
|
|
3180
|
+
import_material19.IconButton,
|
|
2985
3181
|
{
|
|
2986
3182
|
size: "small",
|
|
2987
3183
|
onClick: (e) => {
|
|
@@ -2989,13 +3185,13 @@ var NestedSelect = () => {
|
|
|
2989
3185
|
handleToggle(item.id);
|
|
2990
3186
|
}
|
|
2991
3187
|
},
|
|
2992
|
-
openMenus[item.id] ? /* @__PURE__ */
|
|
3188
|
+
openMenus[item.id] ? /* @__PURE__ */ import_react18.default.createElement(import_md4.MdKeyboardArrowLeft, null) : /* @__PURE__ */ import_react18.default.createElement(import_md4.MdKeyboardArrowRight, null)
|
|
2993
3189
|
)
|
|
2994
|
-
), item.children && item.children.length > 0 && /* @__PURE__ */
|
|
3190
|
+
), item.children && item.children.length > 0 && /* @__PURE__ */ import_react18.default.createElement(import_material19.Collapse, { in: openMenus[item.id], timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react18.default.createElement(import_material19.List, { component: "div", disablePadding: true }, renderMenuItems(item.children, level + 1))));
|
|
2995
3191
|
});
|
|
2996
3192
|
};
|
|
2997
|
-
return /* @__PURE__ */
|
|
2998
|
-
|
|
3193
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_material19.FormControl, { fullWidth: true, variant: "outlined" }, /* @__PURE__ */ import_react18.default.createElement(import_material19.InputLabel, { shrink: true }, "\u062F\u0633\u062A\u0647 \u0628\u0646\u062F\u06CC *"), /* @__PURE__ */ import_react18.default.createElement(
|
|
3194
|
+
import_material19.Select,
|
|
2999
3195
|
{
|
|
3000
3196
|
label: "\u062F\u0633\u062A\u0647 \u0628\u0646\u062F\u06CC *",
|
|
3001
3197
|
value: selectedItem?.id || "",
|
|
@@ -3003,7 +3199,7 @@ var NestedSelect = () => {
|
|
|
3003
3199
|
open: menuOpen,
|
|
3004
3200
|
onOpen: () => setMenuOpen(true),
|
|
3005
3201
|
onClose: () => setMenuOpen(false),
|
|
3006
|
-
renderValue: (selected) => selectedItem ? /* @__PURE__ */
|
|
3202
|
+
renderValue: (selected) => selectedItem ? /* @__PURE__ */ import_react18.default.createElement(import_material19.Typography, null, selectedItem.title) : " "
|
|
3007
3203
|
},
|
|
3008
3204
|
renderMenuItems(backendResponse.value.data)
|
|
3009
3205
|
));
|
|
@@ -3011,9 +3207,9 @@ var NestedSelect = () => {
|
|
|
3011
3207
|
var selector_default = NestedSelect;
|
|
3012
3208
|
|
|
3013
3209
|
// src/spinner/sonar/index.tsx
|
|
3014
|
-
var
|
|
3210
|
+
var import_material20 = require("@mui/material");
|
|
3015
3211
|
var import_system7 = require("@mui/system");
|
|
3016
|
-
var
|
|
3212
|
+
var import_react19 = __toESM(require("react"));
|
|
3017
3213
|
var radarAnimation = import_system7.keyframes`
|
|
3018
3214
|
0% {
|
|
3019
3215
|
background: inherit;
|
|
@@ -3026,8 +3222,8 @@ var radarAnimation = import_system7.keyframes`
|
|
|
3026
3222
|
}
|
|
3027
3223
|
`;
|
|
3028
3224
|
function SonarSpinner({ children }) {
|
|
3029
|
-
return /* @__PURE__ */
|
|
3030
|
-
|
|
3225
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement(import_material20.Box, { className: "absolute w-[30px] h-[30px] rounded-full bg-white z-10 flex items-center justify-center" }, children), /* @__PURE__ */ import_react19.default.createElement(
|
|
3226
|
+
import_material20.Box,
|
|
3031
3227
|
{
|
|
3032
3228
|
className: "root",
|
|
3033
3229
|
sx: {
|
|
@@ -3039,8 +3235,8 @@ function SonarSpinner({ children }) {
|
|
|
3039
3235
|
transform: "translateZ(0)"
|
|
3040
3236
|
}
|
|
3041
3237
|
},
|
|
3042
|
-
/* @__PURE__ */
|
|
3043
|
-
|
|
3238
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
3239
|
+
import_material20.Box,
|
|
3044
3240
|
{
|
|
3045
3241
|
className: "radar",
|
|
3046
3242
|
sx: {
|
|
@@ -3057,8 +3253,8 @@ function SonarSpinner({ children }) {
|
|
|
3057
3253
|
animationDelay: "0s"
|
|
3058
3254
|
}
|
|
3059
3255
|
},
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
|
|
3256
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
3257
|
+
import_material20.Box,
|
|
3062
3258
|
{
|
|
3063
3259
|
className: "sonar",
|
|
3064
3260
|
sx: {
|
|
@@ -3071,8 +3267,8 @@ function SonarSpinner({ children }) {
|
|
|
3071
3267
|
}
|
|
3072
3268
|
}
|
|
3073
3269
|
),
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
|
|
3270
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
3271
|
+
import_material20.Box,
|
|
3076
3272
|
{
|
|
3077
3273
|
className: "sonar delayed",
|
|
3078
3274
|
sx: {
|
|
@@ -3099,14 +3295,14 @@ var import_Box = __toESM(require("@mui/material/Box"));
|
|
|
3099
3295
|
var import_Step = __toESM(require("@mui/material/Step"));
|
|
3100
3296
|
var import_StepButton = __toESM(require("@mui/material/StepButton"));
|
|
3101
3297
|
var import_Stepper = __toESM(require("@mui/material/Stepper"));
|
|
3102
|
-
var
|
|
3298
|
+
var React21 = __toESM(require("react"));
|
|
3103
3299
|
function HorizontalStepper({
|
|
3104
3300
|
steps,
|
|
3105
3301
|
currentStep,
|
|
3106
3302
|
setCurrentStep
|
|
3107
3303
|
}) {
|
|
3108
|
-
const [completed, setCompleted] =
|
|
3109
|
-
return /* @__PURE__ */
|
|
3304
|
+
const [completed, setCompleted] = React21.useState({});
|
|
3305
|
+
return /* @__PURE__ */ React21.createElement(import_Box.default, { sx: { width: "100%" } }, /* @__PURE__ */ React21.createElement(import_Stepper.default, { nonLinear: true, activeStep: currentStep }, steps.map((label, index) => /* @__PURE__ */ React21.createElement(import_Step.default, { key: index, completed: completed[index] }, /* @__PURE__ */ React21.createElement(
|
|
3110
3306
|
import_StepButton.default,
|
|
3111
3307
|
{
|
|
3112
3308
|
color: "inherit",
|
|
@@ -3122,11 +3318,11 @@ function HorizontalStepper({
|
|
|
3122
3318
|
}
|
|
3123
3319
|
|
|
3124
3320
|
// src/table/index.tsx
|
|
3125
|
-
var
|
|
3321
|
+
var import_material21 = require("@mui/material");
|
|
3126
3322
|
var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
|
|
3127
3323
|
var import_styles = require("@mui/material/styles");
|
|
3128
3324
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
3129
|
-
var
|
|
3325
|
+
var import_react20 = __toESM(require("react"));
|
|
3130
3326
|
var ScrollableContainer = (0, import_styles.styled)("div")({
|
|
3131
3327
|
width: "100%",
|
|
3132
3328
|
overflowX: "auto"
|
|
@@ -3156,7 +3352,7 @@ var Table = ({
|
|
|
3156
3352
|
isRowSelectable,
|
|
3157
3353
|
...rest
|
|
3158
3354
|
}) => {
|
|
3159
|
-
const [sortModel, setSortModel] =
|
|
3355
|
+
const [sortModel, setSortModel] = import_react20.default.useState([]);
|
|
3160
3356
|
const handleSetQueryOptions = (options) => {
|
|
3161
3357
|
if (!Array.isArray(options)) return;
|
|
3162
3358
|
const formattedOptions = options.reduce((acc, item) => {
|
|
@@ -3166,7 +3362,7 @@ var Table = ({
|
|
|
3166
3362
|
}, {});
|
|
3167
3363
|
setsortQuery && setsortQuery(formattedOptions);
|
|
3168
3364
|
};
|
|
3169
|
-
(0,
|
|
3365
|
+
(0, import_react20.useEffect)(() => {
|
|
3170
3366
|
if (sortQuery && Object.keys(sortQuery).length > 0) {
|
|
3171
3367
|
const queryKey = Object.keys(sortQuery)[0];
|
|
3172
3368
|
if (sortFieldMapping) {
|
|
@@ -3184,7 +3380,7 @@ var Table = ({
|
|
|
3184
3380
|
setSortModel([]);
|
|
3185
3381
|
}
|
|
3186
3382
|
}, [sortQuery]);
|
|
3187
|
-
const handleSortModelChange =
|
|
3383
|
+
const handleSortModelChange = import_react20.default.useCallback(
|
|
3188
3384
|
(sortModel2) => {
|
|
3189
3385
|
handleSetQueryOptions(
|
|
3190
3386
|
sortModel2.map((item) => ({
|
|
@@ -3225,7 +3421,7 @@ var Table = ({
|
|
|
3225
3421
|
// Connect paginationModel to DataGrid
|
|
3226
3422
|
}
|
|
3227
3423
|
};
|
|
3228
|
-
return /* @__PURE__ */
|
|
3424
|
+
return /* @__PURE__ */ import_react20.default.createElement(ScrollableContainer, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
3229
3425
|
import_x_data_grid.DataGrid,
|
|
3230
3426
|
{
|
|
3231
3427
|
checkboxSelection: selectedRows != void 0,
|
|
@@ -3287,14 +3483,14 @@ var Table = ({
|
|
|
3287
3483
|
noRowsLabel: "\u0647\u06CC\u0686 \u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F!",
|
|
3288
3484
|
noResultsOverlayLabel: "\u0647\u06CC\u0686 \u062F\u0627\u062F\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F!",
|
|
3289
3485
|
MuiTablePagination: {
|
|
3290
|
-
labelDisplayedRows: ({ from, to, count }) => loading ? /* @__PURE__ */
|
|
3486
|
+
labelDisplayedRows: ({ from, to, count }) => loading ? /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(
|
|
3291
3487
|
import_Skeleton.default,
|
|
3292
3488
|
{
|
|
3293
3489
|
variant: "text",
|
|
3294
3490
|
width: 30,
|
|
3295
3491
|
style: { display: "inline-block" }
|
|
3296
3492
|
}
|
|
3297
|
-
), " ", /* @__PURE__ */
|
|
3493
|
+
), " ", /* @__PURE__ */ import_react20.default.createElement(
|
|
3298
3494
|
import_Skeleton.default,
|
|
3299
3495
|
{
|
|
3300
3496
|
variant: "text",
|
|
@@ -3303,7 +3499,7 @@ var Table = ({
|
|
|
3303
3499
|
}
|
|
3304
3500
|
)) : `${from} - ${!isNaN(to) ? to : "..."} \u0627\u0632 ${count !== void 0 ? count : "..."}`
|
|
3305
3501
|
},
|
|
3306
|
-
footerRowSelected: (count) => /* @__PURE__ */
|
|
3502
|
+
footerRowSelected: (count) => /* @__PURE__ */ import_react20.default.createElement(import_material21.Typography, null, "\u0633\u0637\u0631 \u0647\u0627\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 : ", count)
|
|
3307
3503
|
},
|
|
3308
3504
|
...rest
|
|
3309
3505
|
}
|
|
@@ -3313,12 +3509,12 @@ var table_default = Table;
|
|
|
3313
3509
|
|
|
3314
3510
|
// src/text-field/number-type/index.tsx
|
|
3315
3511
|
var import_TextField2 = __toESM(require("@mui/material/TextField"));
|
|
3316
|
-
var
|
|
3317
|
-
var
|
|
3512
|
+
var import_react21 = require("react");
|
|
3513
|
+
var import_react_hook_form12 = require("react-hook-form");
|
|
3318
3514
|
var import_react_number_format = require("react-number-format");
|
|
3319
|
-
var
|
|
3515
|
+
var import_CircularProgress3 = __toESM(require("@mui/material/CircularProgress"));
|
|
3320
3516
|
var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
|
|
3321
|
-
var
|
|
3517
|
+
var import_react22 = __toESM(require("react"));
|
|
3322
3518
|
var FormInputNumber = ({
|
|
3323
3519
|
name,
|
|
3324
3520
|
control,
|
|
@@ -3344,13 +3540,13 @@ var FormInputNumber = ({
|
|
|
3344
3540
|
borderless = false,
|
|
3345
3541
|
...rest
|
|
3346
3542
|
}) => {
|
|
3347
|
-
return /* @__PURE__ */
|
|
3348
|
-
|
|
3543
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
3544
|
+
import_react_hook_form12.Controller,
|
|
3349
3545
|
{
|
|
3350
3546
|
rules,
|
|
3351
3547
|
name,
|
|
3352
3548
|
control,
|
|
3353
|
-
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */
|
|
3549
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ import_react22.default.createElement(
|
|
3354
3550
|
import_TextField2.default,
|
|
3355
3551
|
{
|
|
3356
3552
|
onKeyDown,
|
|
@@ -3410,7 +3606,7 @@ var FormInputNumber = ({
|
|
|
3410
3606
|
maxLength,
|
|
3411
3607
|
decimalScale
|
|
3412
3608
|
},
|
|
3413
|
-
endAdornment: isLoading ? /* @__PURE__ */
|
|
3609
|
+
endAdornment: isLoading ? /* @__PURE__ */ import_react22.default.createElement(import_InputAdornment.default, { position: "end" }, /* @__PURE__ */ import_react22.default.createElement(import_CircularProgress3.default, { size: 20 })) : endAdornment,
|
|
3414
3610
|
startAdornment
|
|
3415
3611
|
},
|
|
3416
3612
|
...rest
|
|
@@ -3419,7 +3615,7 @@ var FormInputNumber = ({
|
|
|
3419
3615
|
}
|
|
3420
3616
|
);
|
|
3421
3617
|
};
|
|
3422
|
-
var NumericFormatCustom = (0,
|
|
3618
|
+
var NumericFormatCustom = (0, import_react21.forwardRef)(
|
|
3423
3619
|
function NumericFormatCustom2(props, ref) {
|
|
3424
3620
|
const {
|
|
3425
3621
|
onChange,
|
|
@@ -3430,7 +3626,7 @@ var NumericFormatCustom = (0, import_react20.forwardRef)(
|
|
|
3430
3626
|
decimalScale,
|
|
3431
3627
|
...other
|
|
3432
3628
|
} = props;
|
|
3433
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
3434
3630
|
import_react_number_format.NumericFormat,
|
|
3435
3631
|
{
|
|
3436
3632
|
...other,
|
|
@@ -3458,11 +3654,11 @@ var NumericFormatCustom = (0, import_react20.forwardRef)(
|
|
|
3458
3654
|
var number_type_default = FormInputNumber;
|
|
3459
3655
|
|
|
3460
3656
|
// src/text-field/text-type/index.tsx
|
|
3461
|
-
var
|
|
3657
|
+
var import_CircularProgress4 = __toESM(require("@mui/material/CircularProgress"));
|
|
3462
3658
|
var import_InputAdornment2 = __toESM(require("@mui/material/InputAdornment"));
|
|
3463
3659
|
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
3464
|
-
var
|
|
3465
|
-
var
|
|
3660
|
+
var import_react23 = __toESM(require("react"));
|
|
3661
|
+
var import_react_hook_form13 = require("react-hook-form");
|
|
3466
3662
|
var FormInputText = ({
|
|
3467
3663
|
name,
|
|
3468
3664
|
control,
|
|
@@ -3478,13 +3674,13 @@ var FormInputText = ({
|
|
|
3478
3674
|
rows,
|
|
3479
3675
|
...rest
|
|
3480
3676
|
}) => {
|
|
3481
|
-
return /* @__PURE__ */
|
|
3482
|
-
|
|
3677
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3678
|
+
import_react_hook_form13.Controller,
|
|
3483
3679
|
{
|
|
3484
3680
|
name,
|
|
3485
3681
|
control,
|
|
3486
3682
|
rules,
|
|
3487
|
-
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */
|
|
3683
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ import_react23.default.createElement(
|
|
3488
3684
|
import_TextField3.default,
|
|
3489
3685
|
{
|
|
3490
3686
|
disabled: disabled || isLoading,
|
|
@@ -3504,7 +3700,7 @@ var FormInputText = ({
|
|
|
3504
3700
|
readOnly
|
|
3505
3701
|
},
|
|
3506
3702
|
InputProps: {
|
|
3507
|
-
endAdornment: isLoading ? /* @__PURE__ */
|
|
3703
|
+
endAdornment: isLoading ? /* @__PURE__ */ import_react23.default.createElement(import_InputAdornment2.default, { position: "end" }, /* @__PURE__ */ import_react23.default.createElement(import_CircularProgress4.default, { size: 20 })) : null
|
|
3508
3704
|
},
|
|
3509
3705
|
InputLabelProps: { shrink: true },
|
|
3510
3706
|
inputRef: ref,
|
|
@@ -3516,10 +3712,108 @@ var FormInputText = ({
|
|
|
3516
3712
|
};
|
|
3517
3713
|
var text_type_default = FormInputText;
|
|
3518
3714
|
|
|
3715
|
+
// src/text-field/number-pattern-input/index.tsx
|
|
3716
|
+
var import_CircularProgress5 = __toESM(require("@mui/material/CircularProgress"));
|
|
3717
|
+
var import_InputAdornment3 = __toESM(require("@mui/material/InputAdornment"));
|
|
3718
|
+
var import_TextField4 = __toESM(require("@mui/material/TextField"));
|
|
3719
|
+
var import_react24 = __toESM(require("react"));
|
|
3720
|
+
var import_react_hook_form14 = require("react-hook-form");
|
|
3721
|
+
var import_react_number_format2 = require("react-number-format");
|
|
3722
|
+
var PatternTextField = ({
|
|
3723
|
+
name,
|
|
3724
|
+
control,
|
|
3725
|
+
label,
|
|
3726
|
+
maxLength,
|
|
3727
|
+
readOnly,
|
|
3728
|
+
rules,
|
|
3729
|
+
size = "small",
|
|
3730
|
+
disabled = false,
|
|
3731
|
+
multiline,
|
|
3732
|
+
isLoading,
|
|
3733
|
+
onBlurHandler,
|
|
3734
|
+
rows,
|
|
3735
|
+
groupEvery,
|
|
3736
|
+
groupSeparator = "-",
|
|
3737
|
+
formatPattern,
|
|
3738
|
+
...rest
|
|
3739
|
+
}) => {
|
|
3740
|
+
const isNumericMode = !!groupEvery;
|
|
3741
|
+
const formatValue = (val) => {
|
|
3742
|
+
if (!val) return "";
|
|
3743
|
+
const raw = isNumericMode ? val.replace(/\D/g, "") : val;
|
|
3744
|
+
if (groupEvery) {
|
|
3745
|
+
return raw.match(new RegExp(`.{1,${groupEvery}}`, "g"))?.join(groupSeparator) || "";
|
|
3746
|
+
}
|
|
3747
|
+
return val;
|
|
3748
|
+
};
|
|
3749
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3750
|
+
import_react_hook_form14.Controller,
|
|
3751
|
+
{
|
|
3752
|
+
name,
|
|
3753
|
+
control,
|
|
3754
|
+
rules,
|
|
3755
|
+
render: ({ field: { onChange, value, ref }, fieldState: { error } }) => /* @__PURE__ */ import_react24.default.createElement(
|
|
3756
|
+
import_TextField4.default,
|
|
3757
|
+
{
|
|
3758
|
+
...rest,
|
|
3759
|
+
disabled: disabled || isLoading,
|
|
3760
|
+
helperText: error?.message || null,
|
|
3761
|
+
multiline,
|
|
3762
|
+
size,
|
|
3763
|
+
rows: rows || void 0,
|
|
3764
|
+
error: !!error,
|
|
3765
|
+
value: formatValue(value?.toString() || ""),
|
|
3766
|
+
onChange: (e) => {
|
|
3767
|
+
let newRaw = e.target.value;
|
|
3768
|
+
if (isNumericMode) newRaw = newRaw.replace(/\D/g, "");
|
|
3769
|
+
if (!maxLength || newRaw.length <= maxLength) onChange(newRaw);
|
|
3770
|
+
},
|
|
3771
|
+
fullWidth: true,
|
|
3772
|
+
label,
|
|
3773
|
+
variant: "outlined",
|
|
3774
|
+
inputProps: { ...rest.inputProps, readOnly },
|
|
3775
|
+
InputProps: {
|
|
3776
|
+
inputComponent: formatPattern ? PatternFormatCustom : void 0,
|
|
3777
|
+
inputProps: {
|
|
3778
|
+
format: formatPattern
|
|
3779
|
+
// 👈 الگوی نمایش
|
|
3780
|
+
},
|
|
3781
|
+
endAdornment: isLoading ? /* @__PURE__ */ import_react24.default.createElement(import_InputAdornment3.default, { position: "end" }, /* @__PURE__ */ import_react24.default.createElement(import_CircularProgress5.default, { size: 20 })) : null
|
|
3782
|
+
},
|
|
3783
|
+
InputLabelProps: { shrink: true },
|
|
3784
|
+
inputRef: ref
|
|
3785
|
+
}
|
|
3786
|
+
)
|
|
3787
|
+
}
|
|
3788
|
+
);
|
|
3789
|
+
};
|
|
3790
|
+
var PatternFormatCustom = (0, import_react24.forwardRef)(
|
|
3791
|
+
function PatternFormatCustom2(props, ref) {
|
|
3792
|
+
const { onChange, format, ...other } = props;
|
|
3793
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3794
|
+
import_react_number_format2.PatternFormat,
|
|
3795
|
+
{
|
|
3796
|
+
...other,
|
|
3797
|
+
getInputRef: ref,
|
|
3798
|
+
format,
|
|
3799
|
+
onValueChange: (values) => {
|
|
3800
|
+
onChange({
|
|
3801
|
+
target: {
|
|
3802
|
+
name: props.name,
|
|
3803
|
+
value: values.value
|
|
3804
|
+
}
|
|
3805
|
+
});
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
);
|
|
3809
|
+
}
|
|
3810
|
+
);
|
|
3811
|
+
var number_pattern_input_default = PatternTextField;
|
|
3812
|
+
|
|
3519
3813
|
// src/upload-image/index.tsx
|
|
3520
|
-
var
|
|
3521
|
-
var
|
|
3522
|
-
var
|
|
3814
|
+
var import_react25 = __toESM(require("react"));
|
|
3815
|
+
var import_react_hook_form15 = require("react-hook-form");
|
|
3816
|
+
var import_material22 = require("@mui/material");
|
|
3523
3817
|
var import_gr = require("react-icons/gr");
|
|
3524
3818
|
var import_md5 = require("react-icons/md");
|
|
3525
3819
|
var import_image3 = __toESM(require("next/image"));
|
|
@@ -3592,12 +3886,12 @@ var UploadImage = ({
|
|
|
3592
3886
|
}
|
|
3593
3887
|
}
|
|
3594
3888
|
};
|
|
3595
|
-
return /* @__PURE__ */
|
|
3596
|
-
|
|
3889
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3890
|
+
import_react_hook_form15.Controller,
|
|
3597
3891
|
{
|
|
3598
3892
|
name,
|
|
3599
3893
|
control,
|
|
3600
|
-
render: ({ field }) => /* @__PURE__ */
|
|
3894
|
+
render: ({ field }) => /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
3601
3895
|
"label",
|
|
3602
3896
|
{
|
|
3603
3897
|
htmlFor: "file-upload",
|
|
@@ -3617,7 +3911,7 @@ var UploadImage = ({
|
|
|
3617
3911
|
overflow: "hidden"
|
|
3618
3912
|
}
|
|
3619
3913
|
},
|
|
3620
|
-
selectedImage ? /* @__PURE__ */
|
|
3914
|
+
selectedImage ? /* @__PURE__ */ import_react25.default.createElement(
|
|
3621
3915
|
import_image3.default,
|
|
3622
3916
|
{
|
|
3623
3917
|
src: selectedImage,
|
|
@@ -3625,14 +3919,14 @@ var UploadImage = ({
|
|
|
3625
3919
|
fill: true,
|
|
3626
3920
|
objectFit: imageFit
|
|
3627
3921
|
}
|
|
3628
|
-
) : /* @__PURE__ */
|
|
3629
|
-
|
|
3922
|
+
) : /* @__PURE__ */ import_react25.default.createElement(
|
|
3923
|
+
import_material22.Stack,
|
|
3630
3924
|
{
|
|
3631
3925
|
spacing: allowGallery ? 2 : 0,
|
|
3632
3926
|
sx: { pt: allowGallery ? 2 : 0 }
|
|
3633
3927
|
},
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
|
|
3928
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
|
3929
|
+
import_material22.Box,
|
|
3636
3930
|
{
|
|
3637
3931
|
sx: {
|
|
3638
3932
|
display: "flex",
|
|
@@ -3641,31 +3935,31 @@ var UploadImage = ({
|
|
|
3641
3935
|
gap: 1.5
|
|
3642
3936
|
}
|
|
3643
3937
|
},
|
|
3644
|
-
/* @__PURE__ */
|
|
3938
|
+
/* @__PURE__ */ import_react25.default.createElement(import_material22.Box, { sx: { paddingBottom: "0.5rem" } }, /* @__PURE__ */ import_react25.default.createElement(import_gr.GrUpload, null)),
|
|
3645
3939
|
placeholder
|
|
3646
3940
|
),
|
|
3647
|
-
allowGallery && /* @__PURE__ */
|
|
3648
|
-
|
|
3941
|
+
allowGallery && /* @__PURE__ */ import_react25.default.createElement(import_material22.Stack, { spacing: 1.5 }, /* @__PURE__ */ import_react25.default.createElement(
|
|
3942
|
+
import_material22.Button,
|
|
3649
3943
|
{
|
|
3650
3944
|
sx: { width: "9rem" },
|
|
3651
3945
|
variant: "outlined",
|
|
3652
3946
|
color: "info",
|
|
3653
|
-
startIcon: /* @__PURE__ */
|
|
3947
|
+
startIcon: /* @__PURE__ */ import_react25.default.createElement(import_md5.MdOutlineCameraAlt, { size: 16 }),
|
|
3654
3948
|
onClick: () => document.getElementById("camera-upload")?.click()
|
|
3655
3949
|
},
|
|
3656
3950
|
"\u062F\u0648\u0631\u0628\u06CC\u0646"
|
|
3657
|
-
), /* @__PURE__ */
|
|
3658
|
-
|
|
3951
|
+
), /* @__PURE__ */ import_react25.default.createElement(
|
|
3952
|
+
import_material22.Button,
|
|
3659
3953
|
{
|
|
3660
3954
|
sx: { width: "9rem" },
|
|
3661
3955
|
variant: "outlined",
|
|
3662
3956
|
color: "info",
|
|
3663
|
-
startIcon: /* @__PURE__ */
|
|
3957
|
+
startIcon: /* @__PURE__ */ import_react25.default.createElement(import_gr.GrGallery, { size: 16 }),
|
|
3664
3958
|
onClick: () => document.getElementById("gallery-upload")?.click()
|
|
3665
3959
|
},
|
|
3666
3960
|
"\u06AF\u0627\u0644\u0631\u06CC"
|
|
3667
3961
|
)),
|
|
3668
|
-
!allowGallery && /* @__PURE__ */
|
|
3962
|
+
!allowGallery && /* @__PURE__ */ import_react25.default.createElement(
|
|
3669
3963
|
"input",
|
|
3670
3964
|
{
|
|
3671
3965
|
id: "file-upload",
|
|
@@ -3680,7 +3974,7 @@ var UploadImage = ({
|
|
|
3680
3974
|
}
|
|
3681
3975
|
)
|
|
3682
3976
|
)
|
|
3683
|
-
), /* @__PURE__ */
|
|
3977
|
+
), /* @__PURE__ */ import_react25.default.createElement(
|
|
3684
3978
|
"input",
|
|
3685
3979
|
{
|
|
3686
3980
|
id: "gallery-upload",
|
|
@@ -3692,7 +3986,7 @@ var UploadImage = ({
|
|
|
3692
3986
|
},
|
|
3693
3987
|
style: { display: "none" }
|
|
3694
3988
|
}
|
|
3695
|
-
), /* @__PURE__ */
|
|
3989
|
+
), /* @__PURE__ */ import_react25.default.createElement(
|
|
3696
3990
|
"input",
|
|
3697
3991
|
{
|
|
3698
3992
|
id: "camera-upload",
|
|
@@ -3705,13 +3999,13 @@ var UploadImage = ({
|
|
|
3705
3999
|
},
|
|
3706
4000
|
style: { display: "none" }
|
|
3707
4001
|
}
|
|
3708
|
-
), selectedImage && /* @__PURE__ */
|
|
3709
|
-
|
|
4002
|
+
), selectedImage && /* @__PURE__ */ import_react25.default.createElement(
|
|
4003
|
+
import_material22.Box,
|
|
3710
4004
|
{
|
|
3711
4005
|
sx: { display: "flex", justifyContent: "center", marginTop: 2 }
|
|
3712
4006
|
},
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
|
|
4007
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
|
4008
|
+
import_material22.Button,
|
|
3715
4009
|
{
|
|
3716
4010
|
onClick: () => {
|
|
3717
4011
|
setSelectedImage(null);
|
|
@@ -3730,7 +4024,7 @@ var UploadImage = ({
|
|
|
3730
4024
|
},
|
|
3731
4025
|
"\u062D\u0630\u0641 \u062A\u0635\u0648\u06CC\u0631"
|
|
3732
4026
|
)
|
|
3733
|
-
), errors[name] && /* @__PURE__ */
|
|
4027
|
+
), errors[name] && /* @__PURE__ */ import_react25.default.createElement(import_material22.Typography, { color: "error", variant: "body2", sx: { mt: 1.5, ml: 1 } }, String(errors[name]?.message || "")))
|
|
3734
4028
|
}
|
|
3735
4029
|
);
|
|
3736
4030
|
};
|
|
@@ -3742,8 +4036,8 @@ var import_io2 = require("react-icons/io");
|
|
|
3742
4036
|
var import_Accordion = __toESM(require("@mui/material/Accordion"));
|
|
3743
4037
|
var import_AccordionSummary = __toESM(require("@mui/material/AccordionSummary"));
|
|
3744
4038
|
var import_AccordionDetails = __toESM(require("@mui/material/AccordionDetails"));
|
|
3745
|
-
var
|
|
3746
|
-
var
|
|
4039
|
+
var import_material23 = require("@mui/material");
|
|
4040
|
+
var import_react26 = require("react");
|
|
3747
4041
|
function Page({
|
|
3748
4042
|
data
|
|
3749
4043
|
}) {
|
|
@@ -3773,7 +4067,7 @@ function Page({
|
|
|
3773
4067
|
padding: theme2.spacing(2),
|
|
3774
4068
|
borderTop: "1px solid rgba(0, 0, 0, .125)"
|
|
3775
4069
|
}));
|
|
3776
|
-
const [expanded, setExpanded] = (0,
|
|
4070
|
+
const [expanded, setExpanded] = (0, import_react26.useState)("");
|
|
3777
4071
|
const handleChange = (panel) => (event, newExpanded) => {
|
|
3778
4072
|
setExpanded(newExpanded ? panel : false);
|
|
3779
4073
|
};
|
|
@@ -3797,7 +4091,7 @@ function Page({
|
|
|
3797
4091
|
}
|
|
3798
4092
|
}
|
|
3799
4093
|
},
|
|
3800
|
-
/* @__PURE__ */ React.createElement(
|
|
4094
|
+
/* @__PURE__ */ React.createElement(import_material23.Typography, { component: "span" }, item.title)
|
|
3801
4095
|
),
|
|
3802
4096
|
/* @__PURE__ */ React.createElement(AccordionDetails, null, item.body)
|
|
3803
4097
|
);
|
|
@@ -3805,20 +4099,20 @@ function Page({
|
|
|
3805
4099
|
}
|
|
3806
4100
|
|
|
3807
4101
|
// src/switch-button/index.tsx
|
|
3808
|
-
var
|
|
4102
|
+
var import_material24 = require("@mui/material");
|
|
3809
4103
|
var import_system8 = require("@mui/system");
|
|
3810
|
-
var
|
|
4104
|
+
var import_react27 = __toESM(require("react"));
|
|
3811
4105
|
var import_pi = require("react-icons/pi");
|
|
3812
|
-
var
|
|
4106
|
+
var import_material25 = require("@mui/material");
|
|
3813
4107
|
var SwitchButton = ({
|
|
3814
4108
|
checked,
|
|
3815
4109
|
handleChange,
|
|
3816
4110
|
iconChecked,
|
|
3817
4111
|
iconUnchecked
|
|
3818
4112
|
}) => {
|
|
3819
|
-
const theme2 = (0,
|
|
4113
|
+
const theme2 = (0, import_material25.useTheme)();
|
|
3820
4114
|
const isDarkMode = theme2.palette.mode === "dark";
|
|
3821
|
-
const CustomSwitch = (0, import_system8.styled)(
|
|
4115
|
+
const CustomSwitch = (0, import_system8.styled)(import_material24.Switch)(({ theme: theme3 }) => ({
|
|
3822
4116
|
"& .MuiSwitch-switchBase.Mui-checked": {
|
|
3823
4117
|
color: theme3.palette.primary.main
|
|
3824
4118
|
},
|
|
@@ -3831,7 +4125,7 @@ var SwitchButton = ({
|
|
|
3831
4125
|
border: isDarkMode ? "2px solid white" : "2px solid rgba(80,80,80, 1)"
|
|
3832
4126
|
}
|
|
3833
4127
|
}));
|
|
3834
|
-
const BoxContainer = (0, import_system8.styled)(
|
|
4128
|
+
const BoxContainer = (0, import_system8.styled)(import_material24.Box)(({ theme: theme3 }) => ({
|
|
3835
4129
|
display: "flex",
|
|
3836
4130
|
alignItems: "center",
|
|
3837
4131
|
backgroundColor: "rgba(188,188,188, 0.1)",
|
|
@@ -3846,10 +4140,10 @@ var SwitchButton = ({
|
|
|
3846
4140
|
transition: "all 0.2s ease",
|
|
3847
4141
|
color: isDarkMode ? "rgba(220,220,220, 1)" : "rgba(160,160,160, 1)"
|
|
3848
4142
|
});
|
|
3849
|
-
return /* @__PURE__ */
|
|
3850
|
-
|
|
4143
|
+
return /* @__PURE__ */ import_react27.default.createElement(BoxContainer, null, /* @__PURE__ */ import_react27.default.createElement(
|
|
4144
|
+
import_material24.FormControlLabel,
|
|
3851
4145
|
{
|
|
3852
|
-
control: /* @__PURE__ */
|
|
4146
|
+
control: /* @__PURE__ */ import_react27.default.createElement(
|
|
3853
4147
|
CustomSwitch,
|
|
3854
4148
|
{
|
|
3855
4149
|
checked,
|
|
@@ -3857,15 +4151,15 @@ var SwitchButton = ({
|
|
|
3857
4151
|
name: "switch"
|
|
3858
4152
|
}
|
|
3859
4153
|
),
|
|
3860
|
-
label: /* @__PURE__ */
|
|
4154
|
+
label: /* @__PURE__ */ import_react27.default.createElement(LabelContainer, null, checked ? iconChecked ? iconChecked : /* @__PURE__ */ import_react27.default.createElement(import_pi.PiTableDuotone, { size: 30 }) : iconUnchecked ? iconUnchecked : /* @__PURE__ */ import_react27.default.createElement(import_pi.PiCardsDuotone, { size: 30 }))
|
|
3861
4155
|
}
|
|
3862
4156
|
));
|
|
3863
4157
|
};
|
|
3864
4158
|
var switch_button_default = SwitchButton;
|
|
3865
4159
|
|
|
3866
4160
|
// src/bascule-connection-button/index.tsx
|
|
3867
|
-
var
|
|
3868
|
-
var
|
|
4161
|
+
var import_material26 = require("@mui/material");
|
|
4162
|
+
var import_react28 = __toESM(require("react"));
|
|
3869
4163
|
var import_react_hot_toast = __toESM(require("react-hot-toast"));
|
|
3870
4164
|
var import_pi2 = require("react-icons/pi");
|
|
3871
4165
|
var ConnectToBasculeButton = ({
|
|
@@ -3875,8 +4169,8 @@ var ConnectToBasculeButton = ({
|
|
|
3875
4169
|
parity = "none",
|
|
3876
4170
|
flowControl = "none"
|
|
3877
4171
|
}) => {
|
|
3878
|
-
const [connected, setConnected] = (0,
|
|
3879
|
-
const portRef = (0,
|
|
4172
|
+
const [connected, setConnected] = (0, import_react28.useState)(false);
|
|
4173
|
+
const portRef = (0, import_react28.useRef)(null);
|
|
3880
4174
|
const connectToBascule = async () => {
|
|
3881
4175
|
if (!("serial" in navigator)) {
|
|
3882
4176
|
import_react_hot_toast.default.error("Web Serial API \u062A\u0648\u0633\u0637 \u0627\u06CC\u0646 \u0645\u0631\u0648\u0631\u06AF\u0631 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC\u200C\u0634\u0648\u062F.");
|
|
@@ -3894,7 +4188,7 @@ var ConnectToBasculeButton = ({
|
|
|
3894
4188
|
import_react_hot_toast.default.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.");
|
|
3895
4189
|
}
|
|
3896
4190
|
};
|
|
3897
|
-
return /* @__PURE__ */
|
|
4191
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("style", null, `
|
|
3898
4192
|
@keyframes jumpAnimation {
|
|
3899
4193
|
0% { transform: translateY(1px); }
|
|
3900
4194
|
12.5% { transform: translateY(-2px); }
|
|
@@ -3903,16 +4197,16 @@ var ConnectToBasculeButton = ({
|
|
|
3903
4197
|
50% { transform: translateY(0); }
|
|
3904
4198
|
100% { transform: translateY(0); }
|
|
3905
4199
|
}
|
|
3906
|
-
`), /* @__PURE__ */
|
|
3907
|
-
|
|
4200
|
+
`), /* @__PURE__ */ import_react28.default.createElement(
|
|
4201
|
+
import_material26.Button,
|
|
3908
4202
|
{
|
|
3909
4203
|
variant: "contained",
|
|
3910
4204
|
onClick: connectToBascule,
|
|
3911
4205
|
disabled: connected,
|
|
3912
4206
|
sx: { minWidth: "11rem" }
|
|
3913
4207
|
},
|
|
3914
|
-
/* @__PURE__ */
|
|
3915
|
-
|
|
4208
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
|
4209
|
+
import_material26.Box,
|
|
3916
4210
|
{
|
|
3917
4211
|
sx: {
|
|
3918
4212
|
display: "flex",
|
|
@@ -3921,7 +4215,7 @@ var ConnectToBasculeButton = ({
|
|
|
3921
4215
|
fontSize: 16
|
|
3922
4216
|
}
|
|
3923
4217
|
},
|
|
3924
|
-
connected ? /* @__PURE__ */
|
|
4218
|
+
connected ? /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, "\u0645\u062A\u0635\u0644 \u0628\u0647 \u0628\u0627\u0633\u06A9\u0648\u0644", /* @__PURE__ */ import_react28.default.createElement(import_pi2.PiPlugsConnected, { size: 20 })) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, "\u0627\u062A\u0635\u0627\u0644 \u0628\u0647 \u0628\u0627\u0633\u06A9\u0648\u0644", /* @__PURE__ */ import_react28.default.createElement(
|
|
3925
4219
|
import_pi2.PiPlugs,
|
|
3926
4220
|
{
|
|
3927
4221
|
size: 20,
|
|
@@ -3936,15 +4230,15 @@ var ConnectToBasculeButton = ({
|
|
|
3936
4230
|
var bascule_connection_button_default = ConnectToBasculeButton;
|
|
3937
4231
|
|
|
3938
4232
|
// src/draggable-paper/index.tsx
|
|
3939
|
-
var
|
|
3940
|
-
var
|
|
4233
|
+
var import_material27 = require("@mui/material");
|
|
4234
|
+
var import_react29 = require("react");
|
|
3941
4235
|
var import_react_draggable = __toESM(require("react-draggable"));
|
|
3942
4236
|
function DraggablePaper({
|
|
3943
4237
|
handle = "#draggable-dialog",
|
|
3944
4238
|
cancel = '[class*="MuiDialogContent-root"]',
|
|
3945
4239
|
...props
|
|
3946
4240
|
}) {
|
|
3947
|
-
const nodeRef = (0,
|
|
4241
|
+
const nodeRef = (0, import_react29.useRef)(null);
|
|
3948
4242
|
return /* @__PURE__ */ React.createElement(
|
|
3949
4243
|
import_react_draggable.default,
|
|
3950
4244
|
{
|
|
@@ -3954,7 +4248,7 @@ function DraggablePaper({
|
|
|
3954
4248
|
bounds: "parent",
|
|
3955
4249
|
defaultPosition: { x: 0, y: 0 }
|
|
3956
4250
|
},
|
|
3957
|
-
/* @__PURE__ */ React.createElement(
|
|
4251
|
+
/* @__PURE__ */ React.createElement(import_material27.Paper, { ref: nodeRef, ...props })
|
|
3958
4252
|
);
|
|
3959
4253
|
}
|
|
3960
4254
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -3967,6 +4261,7 @@ function DraggablePaper({
|
|
|
3967
4261
|
CustomTimePicker,
|
|
3968
4262
|
DateFilter,
|
|
3969
4263
|
DateFilterRange,
|
|
4264
|
+
DateMonthPicker,
|
|
3970
4265
|
DatePicker,
|
|
3971
4266
|
DateTimePicker,
|
|
3972
4267
|
DateTimeRangePicker,
|
|
@@ -3980,6 +4275,7 @@ function DraggablePaper({
|
|
|
3980
4275
|
NestedSelectort,
|
|
3981
4276
|
NoResult,
|
|
3982
4277
|
PaginationList,
|
|
4278
|
+
PatternTextField,
|
|
3983
4279
|
RadioButton,
|
|
3984
4280
|
SearchLicensePlate,
|
|
3985
4281
|
Selector,
|