@fctc/sme-widget-ui 1.4.9 → 1.5.1

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/README.md CHANGED
@@ -1,93 +1,93 @@
1
- # edu-widget-ui
2
-
3
-
4
-
5
- ## Getting started
6
-
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
-
16
- ```
17
- cd existing_repo
18
- git remote add origin https://gitlab.atomsolution.vn/education-erp/edu-widget-ui.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](https://gitlab.atomsolution.vn/education-erp/edu-widget-ui/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
-
47
- # Editing this README
48
-
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
-
51
- ## Suggestions for a good README
52
-
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
-
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
88
-
89
- ## License
90
- For open source projects, say how it is licensed.
91
-
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
1
+ # edu-widget-ui
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.atomsolution.vn/education-erp/edu-widget-ui.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.atomsolution.vn/education-erp/edu-widget-ui/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
package/dist/index.js CHANGED
@@ -10659,7 +10659,7 @@ var IcEmptyTable = () => {
10659
10659
  viewBox: "0 0 216 140",
10660
10660
  fill: "none",
10661
10661
  children: [
10662
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("g", { "clip-path": "url(#clip0_2454_28950)", children: [
10662
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
10663
10663
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
10664
10664
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10665
10665
  "path",
@@ -17925,7 +17925,7 @@ var ButtonSelectFiles = ({
17925
17925
  id,
17926
17926
  widget,
17927
17927
  useUploadImage,
17928
- useUploadFile
17928
+ useUploadFileExcel
17929
17929
  }) => {
17930
17930
  const ALLOWED_TYPES = [
17931
17931
  "image/jpeg",
@@ -17940,7 +17940,7 @@ var ButtonSelectFiles = ({
17940
17940
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
17941
17941
  const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
17942
17942
  const { mutate: onUploadImage, isPending } = useUploadImage();
17943
- const { mutate: onUploadFile } = useUploadFile();
17943
+ const { mutate: onUploadFile } = useUploadFileExcel();
17944
17944
  const handleUploadImage = async ({ formData }) => {
17945
17945
  console.log("data", formData);
17946
17946
  if (widget !== "many2many_binary") {
@@ -32892,7 +32892,7 @@ var FileUploadField = (props) => {
32892
32892
  idForm,
32893
32893
  widget,
32894
32894
  useUploadImage,
32895
- useUploadFile,
32895
+ useUploadFileExcel,
32896
32896
  useGetImage,
32897
32897
  isBase64File
32898
32898
  } = props;
@@ -32946,7 +32946,7 @@ var FileUploadField = (props) => {
32946
32946
  model,
32947
32947
  widget,
32948
32948
  useUploadImage,
32949
- useUploadFile
32949
+ useUploadFile: useUploadFileExcel
32950
32950
  }
32951
32951
  ),
32952
32952
  error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -33427,9 +33427,12 @@ var Many2ManyTagField = (props) => {
33427
33427
  clearErrors(name2);
33428
33428
  }
33429
33429
  }, [field.value]);
33430
- const filteredValue = options2 && Array.isArray(field.value) ? options2.filter(
33430
+ const filteredValue = options2 && options2?.length > 0 && Array.isArray(field.value) ? options2.filter(
33431
33431
  (option) => field.value.some((item) => item?.id === option.value)
33432
- ) : null;
33432
+ ) : options2?.length === 0 && Array.isArray(field?.value) ? field?.value?.map((value2) => ({
33433
+ value: value2?.id,
33434
+ label: value2?.display_name
33435
+ })) : null;
33433
33436
  const handleChange = (selectedOptions) => {
33434
33437
  const newValue = tranfer(selectedOptions);
33435
33438
  field.onChange(newValue);
package/dist/index.mjs CHANGED
@@ -10540,7 +10540,7 @@ var IcEmptyTable = () => {
10540
10540
  viewBox: "0 0 216 140",
10541
10541
  fill: "none",
10542
10542
  children: [
10543
- /* @__PURE__ */ jsxs27("g", { "clip-path": "url(#clip0_2454_28950)", children: [
10543
+ /* @__PURE__ */ jsxs27("g", { clipPath: "url(#clip0_2454_28950)", children: [
10544
10544
  /* @__PURE__ */ jsx45("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
10545
10545
  /* @__PURE__ */ jsx45(
10546
10546
  "path",
@@ -17806,7 +17806,7 @@ var ButtonSelectFiles = ({
17806
17806
  id,
17807
17807
  widget,
17808
17808
  useUploadImage,
17809
- useUploadFile
17809
+ useUploadFileExcel
17810
17810
  }) => {
17811
17811
  const ALLOWED_TYPES = [
17812
17812
  "image/jpeg",
@@ -17821,7 +17821,7 @@ var ButtonSelectFiles = ({
17821
17821
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
17822
17822
  const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
17823
17823
  const { mutate: onUploadImage, isPending } = useUploadImage();
17824
- const { mutate: onUploadFile } = useUploadFile();
17824
+ const { mutate: onUploadFile } = useUploadFileExcel();
17825
17825
  const handleUploadImage = async ({ formData }) => {
17826
17826
  console.log("data", formData);
17827
17827
  if (widget !== "many2many_binary") {
@@ -32773,7 +32773,7 @@ var FileUploadField = (props) => {
32773
32773
  idForm,
32774
32774
  widget,
32775
32775
  useUploadImage,
32776
- useUploadFile,
32776
+ useUploadFileExcel,
32777
32777
  useGetImage,
32778
32778
  isBase64File
32779
32779
  } = props;
@@ -32827,7 +32827,7 @@ var FileUploadField = (props) => {
32827
32827
  model,
32828
32828
  widget,
32829
32829
  useUploadImage,
32830
- useUploadFile
32830
+ useUploadFile: useUploadFileExcel
32831
32831
  }
32832
32832
  ),
32833
32833
  error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -33308,9 +33308,12 @@ var Many2ManyTagField = (props) => {
33308
33308
  clearErrors(name2);
33309
33309
  }
33310
33310
  }, [field.value]);
33311
- const filteredValue = options2 && Array.isArray(field.value) ? options2.filter(
33311
+ const filteredValue = options2 && options2?.length > 0 && Array.isArray(field.value) ? options2.filter(
33312
33312
  (option) => field.value.some((item) => item?.id === option.value)
33313
- ) : null;
33313
+ ) : options2?.length === 0 && Array.isArray(field?.value) ? field?.value?.map((value2) => ({
33314
+ value: value2?.id,
33315
+ label: value2?.display_name
33316
+ })) : null;
33314
33317
  const handleChange = (selectedOptions) => {
33315
33318
  const newValue = tranfer(selectedOptions);
33316
33319
  field.onChange(newValue);
@@ -280,7 +280,7 @@ declare const FeeField: (props: IInputFieldProps) => JSX.Element;
280
280
 
281
281
  interface IFileUploadProps extends IInputFieldProps {
282
282
  useUploadImage?: any;
283
- useUploadFile?: any;
283
+ useUploadFileExcel?: any;
284
284
  useGetImage?: any;
285
285
  isBase64File?: any;
286
286
  }
@@ -484,7 +484,7 @@ declare const LoadingSmall: () => JSX.Element;
484
484
 
485
485
  declare const RenderFiles: ({ selectedFiles, setSelectedFiles, useGetImage }: any) => JSX.Element;
486
486
 
487
- declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile, }: any) => JSX.Element;
487
+ declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFileExcel, }: any) => JSX.Element;
488
488
 
489
489
  interface VideoPlayerProps {
490
490
  src: string;
package/dist/widgets.d.ts CHANGED
@@ -280,7 +280,7 @@ declare const FeeField: (props: IInputFieldProps) => JSX.Element;
280
280
 
281
281
  interface IFileUploadProps extends IInputFieldProps {
282
282
  useUploadImage?: any;
283
- useUploadFile?: any;
283
+ useUploadFileExcel?: any;
284
284
  useGetImage?: any;
285
285
  isBase64File?: any;
286
286
  }
@@ -484,7 +484,7 @@ declare const LoadingSmall: () => JSX.Element;
484
484
 
485
485
  declare const RenderFiles: ({ selectedFiles, setSelectedFiles, useGetImage }: any) => JSX.Element;
486
486
 
487
- declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile, }: any) => JSX.Element;
487
+ declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFileExcel, }: any) => JSX.Element;
488
488
 
489
489
  interface VideoPlayerProps {
490
490
  src: string;
package/dist/widgets.js CHANGED
@@ -10274,7 +10274,7 @@ var IcEmptyTable = () => {
10274
10274
  viewBox: "0 0 216 140",
10275
10275
  fill: "none",
10276
10276
  children: [
10277
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("g", { "clip-path": "url(#clip0_2454_28950)", children: [
10277
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
10278
10278
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
10279
10279
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
10280
10280
  "path",
@@ -17551,7 +17551,7 @@ var ButtonSelectFiles = ({
17551
17551
  id,
17552
17552
  widget,
17553
17553
  useUploadImage,
17554
- useUploadFile
17554
+ useUploadFileExcel
17555
17555
  }) => {
17556
17556
  const ALLOWED_TYPES = [
17557
17557
  "image/jpeg",
@@ -17566,7 +17566,7 @@ var ButtonSelectFiles = ({
17566
17566
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
17567
17567
  const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
17568
17568
  const { mutate: onUploadImage, isPending } = useUploadImage();
17569
- const { mutate: onUploadFile } = useUploadFile();
17569
+ const { mutate: onUploadFile } = useUploadFileExcel();
17570
17570
  const handleUploadImage = async ({ formData }) => {
17571
17571
  console.log("data", formData);
17572
17572
  if (widget !== "many2many_binary") {
@@ -32518,7 +32518,7 @@ var FileUploadField = (props) => {
32518
32518
  idForm,
32519
32519
  widget,
32520
32520
  useUploadImage,
32521
- useUploadFile,
32521
+ useUploadFileExcel,
32522
32522
  useGetImage,
32523
32523
  isBase64File
32524
32524
  } = props;
@@ -32572,7 +32572,7 @@ var FileUploadField = (props) => {
32572
32572
  model,
32573
32573
  widget,
32574
32574
  useUploadImage,
32575
- useUploadFile
32575
+ useUploadFile: useUploadFileExcel
32576
32576
  }
32577
32577
  ),
32578
32578
  error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -33053,9 +33053,12 @@ var Many2ManyTagField = (props) => {
33053
33053
  clearErrors(name2);
33054
33054
  }
33055
33055
  }, [field.value]);
33056
- const filteredValue = options2 && Array.isArray(field.value) ? options2.filter(
33056
+ const filteredValue = options2 && options2?.length > 0 && Array.isArray(field.value) ? options2.filter(
33057
33057
  (option) => field.value.some((item) => item?.id === option.value)
33058
- ) : null;
33058
+ ) : options2?.length === 0 && Array.isArray(field?.value) ? field?.value?.map((value2) => ({
33059
+ value: value2?.id,
33060
+ label: value2?.display_name
33061
+ })) : null;
33059
33062
  const handleChange = (selectedOptions) => {
33060
33063
  const newValue = tranfer(selectedOptions);
33061
33064
  field.onChange(newValue);
package/dist/widgets.mjs CHANGED
@@ -10211,7 +10211,7 @@ var IcEmptyTable = () => {
10211
10211
  viewBox: "0 0 216 140",
10212
10212
  fill: "none",
10213
10213
  children: [
10214
- /* @__PURE__ */ jsxs27("g", { "clip-path": "url(#clip0_2454_28950)", children: [
10214
+ /* @__PURE__ */ jsxs27("g", { clipPath: "url(#clip0_2454_28950)", children: [
10215
10215
  /* @__PURE__ */ jsx45("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
10216
10216
  /* @__PURE__ */ jsx45(
10217
10217
  "path",
@@ -17488,7 +17488,7 @@ var ButtonSelectFiles = ({
17488
17488
  id,
17489
17489
  widget,
17490
17490
  useUploadImage,
17491
- useUploadFile
17491
+ useUploadFileExcel
17492
17492
  }) => {
17493
17493
  const ALLOWED_TYPES = [
17494
17494
  "image/jpeg",
@@ -17503,7 +17503,7 @@ var ButtonSelectFiles = ({
17503
17503
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
17504
17504
  const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
17505
17505
  const { mutate: onUploadImage, isPending } = useUploadImage();
17506
- const { mutate: onUploadFile } = useUploadFile();
17506
+ const { mutate: onUploadFile } = useUploadFileExcel();
17507
17507
  const handleUploadImage = async ({ formData }) => {
17508
17508
  console.log("data", formData);
17509
17509
  if (widget !== "many2many_binary") {
@@ -32455,7 +32455,7 @@ var FileUploadField = (props) => {
32455
32455
  idForm,
32456
32456
  widget,
32457
32457
  useUploadImage,
32458
- useUploadFile,
32458
+ useUploadFileExcel,
32459
32459
  useGetImage,
32460
32460
  isBase64File
32461
32461
  } = props;
@@ -32509,7 +32509,7 @@ var FileUploadField = (props) => {
32509
32509
  model,
32510
32510
  widget,
32511
32511
  useUploadImage,
32512
- useUploadFile
32512
+ useUploadFile: useUploadFileExcel
32513
32513
  }
32514
32514
  ),
32515
32515
  error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -32990,9 +32990,12 @@ var Many2ManyTagField = (props) => {
32990
32990
  clearErrors(name2);
32991
32991
  }
32992
32992
  }, [field.value]);
32993
- const filteredValue = options2 && Array.isArray(field.value) ? options2.filter(
32993
+ const filteredValue = options2 && options2?.length > 0 && Array.isArray(field.value) ? options2.filter(
32994
32994
  (option) => field.value.some((item) => item?.id === option.value)
32995
- ) : null;
32995
+ ) : options2?.length === 0 && Array.isArray(field?.value) ? field?.value?.map((value2) => ({
32996
+ value: value2?.id,
32997
+ label: value2?.display_name
32998
+ })) : null;
32996
32999
  const handleChange = (selectedOptions) => {
32997
33000
  const newValue = tranfer(selectedOptions);
32998
33001
  field.onChange(newValue);
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "@fctc/sme-widget-ui",
3
- "version": "1.4.9",
4
- "main": "dist/index.cjs",
5
- "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./hooks": {
14
- "types": "./dist/hooks.d.ts",
15
- "import": "./dist/hooks.mjs",
16
- "require": "./dist/hooks.cjs"
17
- },
18
- "./icons": {
19
- "types": "./dist/icons.d.ts",
20
- "import": "./dist/icons.mjs",
21
- "require": "./dist/icons.cjs"
22
- },
23
- "./types": {
24
- "types": "./dist/types.d.ts",
25
- "import": "./dist/types.mjs",
26
- "require": "./dist/types.cjs"
27
- },
28
- "./widgets": {
29
- "types": "./dist/widgets.d.ts",
30
- "import": "./dist/widgets.mjs",
31
- "require": "./dist/widgets.cjs"
32
- },
33
- "./utils": {
34
- "types": "./dist/utils.d.ts",
35
- "import": "./dist/utils.mjs",
36
- "require": "./dist/utils.cjs"
37
- }
38
- },
39
- "files": [
40
- "dist"
41
- ],
42
- "scripts": {
43
- "build": "tsup",
44
- "test": "jest"
45
- },
46
- "dependencies": {
47
- "@headlessui/react": "^2.2.7",
48
- "@types/react-dom": "^19.1.7",
49
- "react-dom": "18.0.0",
50
- "zod": "^3.24.2"
51
- },
52
- "devDependencies": {
53
- "@hookform/resolvers": "^4.1.3",
54
- "@types/react": "18.0.0",
55
- "i18next": "^24.2.3",
56
- "i18next-browser-languagedetector": "^8.0.4",
57
- "jest": "^29.7.0",
58
- "moment": "^2.30.1",
59
- "react": "18.0.0",
60
- "react-datepicker": "^8.2.1",
61
- "react-hook-form": "^7.54.2",
62
- "react-i18next": "^15.4.1",
63
- "react-redux": "^9.2.0",
64
- "react-select": "^5.10.1",
65
- "react-toastify": "^11.0.5",
66
- "react-tooltip": "^5.28.0",
67
- "tailwindcss": "^3",
68
- "tsup": "^8.0.0",
69
- "typescript": "^5.8.2"
70
- }
71
- }
1
+ {
2
+ "name": "@fctc/sme-widget-ui",
3
+ "version": "1.5.1",
4
+ "main": "dist/index.cjs",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./hooks": {
14
+ "types": "./dist/hooks.d.ts",
15
+ "import": "./dist/hooks.mjs",
16
+ "require": "./dist/hooks.cjs"
17
+ },
18
+ "./icons": {
19
+ "types": "./dist/icons.d.ts",
20
+ "import": "./dist/icons.mjs",
21
+ "require": "./dist/icons.cjs"
22
+ },
23
+ "./types": {
24
+ "types": "./dist/types.d.ts",
25
+ "import": "./dist/types.mjs",
26
+ "require": "./dist/types.cjs"
27
+ },
28
+ "./widgets": {
29
+ "types": "./dist/widgets.d.ts",
30
+ "import": "./dist/widgets.mjs",
31
+ "require": "./dist/widgets.cjs"
32
+ },
33
+ "./utils": {
34
+ "types": "./dist/utils.d.ts",
35
+ "import": "./dist/utils.mjs",
36
+ "require": "./dist/utils.cjs"
37
+ }
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsup",
44
+ "test": "jest"
45
+ },
46
+ "dependencies": {
47
+ "@headlessui/react": "^2.2.7",
48
+ "@types/react-dom": "^19.1.7",
49
+ "react-dom": "18.0.0",
50
+ "zod": "^3.24.2"
51
+ },
52
+ "devDependencies": {
53
+ "@hookform/resolvers": "^4.1.3",
54
+ "@types/react": "18.0.0",
55
+ "i18next": "^24.2.3",
56
+ "i18next-browser-languagedetector": "^8.0.4",
57
+ "jest": "^29.7.0",
58
+ "moment": "^2.30.1",
59
+ "react": "18.0.0",
60
+ "react-datepicker": "^8.2.1",
61
+ "react-hook-form": "^7.54.2",
62
+ "react-i18next": "^15.4.1",
63
+ "react-redux": "^9.2.0",
64
+ "react-select": "^5.10.1",
65
+ "react-toastify": "^11.0.5",
66
+ "react-tooltip": "^5.28.0",
67
+ "tailwindcss": "^3",
68
+ "tsup": "^8.0.0",
69
+ "typescript": "^5.8.2"
70
+ }
71
+ }
package/dist/.babelrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "presets": [
3
- "@babel/preset-env",
4
- "@babel/preset-react",
5
- "@babel/preset-typescript"
6
- ]
7
- }
@@ -1,10 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- insert_final_newline = true
6
-
7
- [*.{js,json,yml}]
8
- charset = utf-8
9
- indent_style = space
10
- indent_size = 2
@@ -1,6 +0,0 @@
1
- dist
2
- .cache
3
- package-lock.json
4
- public
5
- node_modules
6
- yarn.lock
@@ -1,66 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: { browser: true, es2020: true },
4
- extends: [
5
- 'eslint:recommended',
6
- 'plugin:@typescript-eslint/recommended',
7
- 'plugin:prettier/recommended',
8
- ],
9
- ignorePatterns: ['dist', '.eslintrc.cjs', 'commitlint.config.cjs'],
10
- parser: '@typescript-eslint/parser',
11
- overrides: [
12
- {
13
- files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs'],
14
- plugins: [
15
- '@typescript-eslint',
16
- 'unused-imports',
17
- 'simple-import-sort',
18
- 'react-refresh',
19
- ],
20
- rules: {
21
- 'react-refresh/only-export-components': [
22
- 'warn',
23
- { allowConstantExport: true },
24
- ],
25
- 'import/prefer-default-export': 'off',
26
- 'simple-import-sort/imports': [
27
- 'error',
28
- {
29
- groups: [
30
- // Packages `react` related packages come first.
31
- ['^react', '^@?\\w'],
32
- // Internal packages.
33
- ['^(@|components)(/.*|$)'],
34
- // Side effect imports.
35
- ['^\\u0000'],
36
- // Parent imports. Put `..` last.
37
- ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
38
- // Other relative imports. Put same-folder imports and `.` last.
39
- ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
40
- // Style imports.
41
- ['^.+\\.?(css)$'],
42
- ],
43
- },
44
- ],
45
- 'prettier/prettier': [
46
- 'error',
47
- {
48
- endOfLine: 'auto',
49
- },
50
- ],
51
- 'react/react-in-jsx-scope': 'off',
52
- 'no-param-reassign': 'off',
53
- 'simple-import-sort/exports': 'error',
54
- '@typescript-eslint/no-unused-vars': 'off',
55
- '@typescript-eslint/no-non-null-assertion': 'off',
56
- '@typescript-eslint/no-explicit-any': 'off',
57
- '@typescript-eslint/ban-ts-comment': 'off',
58
- '@typescript-eslint/ban-types': 'off',
59
- 'unused-imports/no-unused-imports': 'error',
60
- 'unused-imports/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
61
- 'no-plusplus': 'off',
62
- 'no-case-declarations': 'off',
63
- },
64
- },
65
- ],
66
- }
@@ -1,4 +0,0 @@
1
- /.yarn/** linguist-vendored
2
- /.yarn/releases/* binary
3
- /.yarn/plugins/**/* binary
4
- /.pnp.* binary linguist-generated
package/dist/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "semi": false
4
- }