@mamrp/components 1.4.12 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1172,6 +1172,7 @@ import { AdapterMomentJalaali } from "@mui/x-date-pickers/AdapterMomentJalaali";
1172
1172
  import dayjs from "dayjs";
1173
1173
  import moment from "moment-jalaali";
1174
1174
  import React8, { useState as useState4 } from "react";
1175
+ import "moment/locale/fa";
1175
1176
  import { Controller as Controller4 } from "react-hook-form";
1176
1177
  import { MdChevronLeft, MdChevronRight } from "react-icons/md";
1177
1178
  moment.locale("fa");
@@ -1966,6 +1967,7 @@ import { AdapterMomentJalaali as AdapterMomentJalaali4 } from "@mui/x-date-picke
1966
1967
  import dayjs2 from "dayjs";
1967
1968
  import moment6 from "moment-jalaali";
1968
1969
  import React12 from "react";
1970
+ import "moment/locale/fa";
1969
1971
  import { Controller as Controller6 } from "react-hook-form";
1970
1972
  moment6.locale("fa");
1971
1973
  moment6.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
@@ -2174,7 +2176,7 @@ import Dialog4 from "@mui/material/Dialog";
2174
2176
  import DialogContent4 from "@mui/material/DialogContent";
2175
2177
  import DialogTitle4 from "@mui/material/DialogTitle";
2176
2178
  import Image2 from "next/image";
2177
- import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } from "react";
2179
+ import { useEffect as useEffect6, useRef as useRef3, useState as useState7 } from "react";
2178
2180
  import { IoClose as IoClose2 } from "react-icons/io5";
2179
2181
  import React13 from "react";
2180
2182
  function SearchLicensePlate({
@@ -2185,9 +2187,9 @@ function SearchLicensePlate({
2185
2187
  readOnly = true,
2186
2188
  size
2187
2189
  }) {
2188
- const [open, setOpen] = useState8(false);
2189
- const [selectedValue, setSelectedValue] = useState8("");
2190
- const [inputValues, setInputValues] = useState8({
2190
+ const [open, setOpen] = useState7(false);
2191
+ const [selectedValue, setSelectedValue] = useState7("");
2192
+ const [inputValues, setInputValues] = useState7({
2191
2193
  input1: "",
2192
2194
  input2: "",
2193
2195
  input3: "",
@@ -2564,7 +2566,7 @@ import {
2564
2566
  import { AdapterMomentJalaali as AdapterMomentJalaali5 } from "@mui/x-date-pickers/AdapterMomentJalaali";
2565
2567
  import dayjs3 from "dayjs";
2566
2568
  import moment7 from "moment-jalaali";
2567
- import React14, { useState as useState9 } from "react";
2569
+ import React14, { useState as useState8 } from "react";
2568
2570
  import { Controller as Controller7 } from "react-hook-form";
2569
2571
  moment7.loadPersian({ dialect: "persian-modern", usePersianDigits: true });
2570
2572
  var JalaliDatePicker3 = ({
@@ -2575,7 +2577,7 @@ var JalaliDatePicker3 = ({
2575
2577
  }) => {
2576
2578
  const today = moment7();
2577
2579
  const isMobile = useMediaQuery5("(max-width:700px)");
2578
- const [open, setOpen] = useState9(false);
2580
+ const [open, setOpen] = useState8(false);
2579
2581
  const customLocaleText = {
2580
2582
  cancelButtonLabel: "\u0644\u063A\u0648",
2581
2583
  okButtonLabel: "\u062A\u0623\u06CC\u06CC\u062F",
@@ -3129,7 +3131,7 @@ import {
3129
3131
  Select,
3130
3132
  Typography as Typography11
3131
3133
  } from "@mui/material";
3132
- import React19, { useState as useState10 } from "react";
3134
+ import React19, { useState as useState9 } from "react";
3133
3135
  var backendResponse = {
3134
3136
  value: {
3135
3137
  data: [
@@ -3182,9 +3184,9 @@ var backendResponse = {
3182
3184
  }
3183
3185
  };
3184
3186
  var NestedSelect = () => {
3185
- const [selectedItem, setSelectedItem] = useState10(null);
3186
- const [openMenus, setOpenMenus] = useState10({});
3187
- const [menuOpen, setMenuOpen] = useState10(false);
3187
+ const [selectedItem, setSelectedItem] = useState9(null);
3188
+ const [openMenus, setOpenMenus] = useState9({});
3189
+ const [menuOpen, setMenuOpen] = useState9(false);
3188
3190
  const handleSelect = (item) => {
3189
3191
  setSelectedItem((prev) => prev?.id === item.id ? null : item);
3190
3192
  };
@@ -4070,7 +4072,7 @@ import {
4070
4072
  useTheme as useTheme6
4071
4073
  } from "@mui/material";
4072
4074
  import Image5 from "next/image";
4073
- import React27, { useState as useState13 } from "react";
4075
+ import React27, { useState as useState12 } from "react";
4074
4076
  import {
4075
4077
  Controller as Controller13
4076
4078
  } from "react-hook-form";
@@ -4086,7 +4088,7 @@ import {
4086
4088
  Typography as Typography14
4087
4089
  } from "@mui/material";
4088
4090
  import Image4 from "next/image";
4089
- import { useCallback, useEffect as useEffect9, useState as useState12 } from "react";
4091
+ import { useCallback, useEffect as useEffect9, useState as useState11 } from "react";
4090
4092
  import {
4091
4093
  MdClose as MdClose4,
4092
4094
  MdRotateLeft,
@@ -4104,15 +4106,15 @@ function ImageViewer({
4104
4106
  noRotate = false,
4105
4107
  noZoom = false
4106
4108
  }) {
4107
- const [zoom, setZoom] = useState12(1);
4108
- const [rotate, setRotate] = useState12(0);
4109
- const [loading, setLoading] = useState12(true);
4110
- const [viewerOpen, setViewerOpen] = useState12(false);
4111
- const [viewerSrc, setViewerSrc] = useState12("");
4112
- const [position, setPosition] = useState12({ x: 0, y: 0 });
4113
- const [dragging, setDragging] = useState12(false);
4114
- const [startMouse, setStartMouse] = useState12({ x: 0, y: 0 });
4115
- const [startOffset, setStartOffset] = useState12({ x: 0, y: 0 });
4109
+ const [zoom, setZoom] = useState11(1);
4110
+ const [rotate, setRotate] = useState11(0);
4111
+ const [loading, setLoading] = useState11(true);
4112
+ const [viewerOpen, setViewerOpen] = useState11(false);
4113
+ const [viewerSrc, setViewerSrc] = useState11("");
4114
+ const [position, setPosition] = useState11({ x: 0, y: 0 });
4115
+ const [dragging, setDragging] = useState11(false);
4116
+ const [startMouse, setStartMouse] = useState11({ x: 0, y: 0 });
4117
+ const [startOffset, setStartOffset] = useState11({ x: 0, y: 0 });
4116
4118
  const reset = () => {
4117
4119
  setZoom(1);
4118
4120
  setRotate(0);
@@ -4279,8 +4281,8 @@ var UploadImage2 = ({
4279
4281
  imageFit = "cover"
4280
4282
  }) => {
4281
4283
  const theme2 = useTheme6();
4282
- const [viewerOpen, setViewerOpen] = useState13(false);
4283
- const [viewerSrc, setViewerSrc] = useState13("");
4284
+ const [viewerOpen, setViewerOpen] = useState12(false);
4285
+ const [viewerSrc, setViewerSrc] = useState12("");
4284
4286
  const compressImage = (file, quality = 0.9, maxWidth = 1600, maxHeight = 1600) => {
4285
4287
  return new Promise((resolve) => {
4286
4288
  const reader = new FileReader();
@@ -4639,7 +4641,7 @@ import MuiAccordionDetails from "@mui/material/AccordionDetails";
4639
4641
  import {
4640
4642
  Typography as Typography16
4641
4643
  } from "@mui/material";
4642
- import { useState as useState14 } from "react";
4644
+ import { useState as useState13 } from "react";
4643
4645
  function Page({
4644
4646
  data
4645
4647
  }) {
@@ -4669,7 +4671,7 @@ function Page({
4669
4671
  padding: theme2.spacing(2),
4670
4672
  borderTop: "1px solid rgba(0, 0, 0, .125)"
4671
4673
  }));
4672
- const [expanded, setExpanded] = useState14("");
4674
+ const [expanded, setExpanded] = useState13("");
4673
4675
  const handleChange = (panel) => (event, newExpanded) => {
4674
4676
  setExpanded(newExpanded ? panel : false);
4675
4677
  };
@@ -4761,7 +4763,7 @@ var switch_button_default = SwitchButton;
4761
4763
 
4762
4764
  // src/bascule-connection-button/index.tsx
4763
4765
  import { Box as Box22, Button as Button13 } from "@mui/material";
4764
- import React29, { useRef as useRef4, useState as useState15 } from "react";
4766
+ import React29, { useRef as useRef4, useState as useState14 } from "react";
4765
4767
  import toast from "react-hot-toast";
4766
4768
  import { PiPlugs, PiPlugsConnected } from "react-icons/pi";
4767
4769
  var ConnectToBasculeButton = ({
@@ -4771,7 +4773,7 @@ var ConnectToBasculeButton = ({
4771
4773
  parity = "none",
4772
4774
  flowControl = "none"
4773
4775
  }) => {
4774
- const [connected, setConnected] = useState15(false);
4776
+ const [connected, setConnected] = useState14(false);
4775
4777
  const portRef = useRef4(null);
4776
4778
  const connectToBascule = async () => {
4777
4779
  if (!("serial" in navigator)) {