@fctc/sme-widget-ui 1.9.7 → 1.9.9

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/utils.js CHANGED
@@ -6894,8 +6894,8 @@ var en_default = {
6894
6894
  download_file: "Download this file",
6895
6895
  upload_success: "Upload file success",
6896
6896
  upload_failure: "Upload file failure",
6897
- file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
6898
- file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
6897
+ file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",
6898
+ file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",
6899
6899
  must_required: "is required",
6900
6900
  invalid_number: "Invalid number",
6901
6901
  active: "Active",
package/dist/utils.mjs CHANGED
@@ -6871,8 +6871,8 @@ var en_default = {
6871
6871
  download_file: "Download this file",
6872
6872
  upload_success: "Upload file success",
6873
6873
  upload_failure: "Upload file failure",
6874
- file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
6875
- file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
6874
+ file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",
6875
+ file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",
6876
6876
  must_required: "is required",
6877
6877
  invalid_number: "Invalid number",
6878
6878
  active: "Active",
package/dist/widgets.js CHANGED
@@ -7817,8 +7817,8 @@ var en_default = {
7817
7817
  download_file: "Download this file",
7818
7818
  upload_success: "Upload file success",
7819
7819
  upload_failure: "Upload file failure",
7820
- file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
7821
- file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
7820
+ file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",
7821
+ file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",
7822
7822
  must_required: "is required",
7823
7823
  invalid_number: "Invalid number",
7824
7824
  active: "Active",
@@ -8731,21 +8731,66 @@ var DownloadIcon = () => {
8731
8731
  // src/icons/excel-icon.tsx
8732
8732
  var import_jsx_runtime17 = require("react/jsx-runtime");
8733
8733
  var ExcelIcon = () => {
8734
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8734
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
8735
8735
  "svg",
8736
8736
  {
8737
8737
  xmlns: "http://www.w3.org/2000/svg",
8738
- width: "19",
8739
- height: "10",
8740
- viewBox: "0 0 19 10",
8738
+ width: "24",
8739
+ height: "24",
8740
+ viewBox: "0 0 24 24",
8741
8741
  fill: "none",
8742
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8743
- "path",
8744
- {
8745
- d: "M18.5 8.5C18.5 8.9125 18.1625 9.25 17.75 9.25H1.25C0.8375 9.25 0.5 8.9125 0.5 8.5V1C0.5 0.5875 0.8375 0.25 1.25 0.25H17.75C18.1625 0.25 18.5 0.5875 18.5 1V8.5Z",
8746
- fill: "#47A800"
8747
- }
8748
- )
8742
+ children: [
8743
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8744
+ "path",
8745
+ {
8746
+ d: "M6 0C5.175 0 4.5 0.675 4.5 1.5V22.5C4.5 23.325 5.175 24 6 24H21C21.825 24 22.5 23.325 22.5 22.5V6L16.5 0H6Z",
8747
+ fill: "#ECECEC"
8748
+ }
8749
+ ),
8750
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8751
+ "path",
8752
+ {
8753
+ d: "M18 6H22.5L16.5 0V4.5C16.5 5.325 17.175 6 18 6Z",
8754
+ fill: "#C6C6C6"
8755
+ }
8756
+ ),
8757
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M22.5 10.5L18 6H22.5V10.5Z", fill: "#DCDCDC" }),
8758
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8759
+ "path",
8760
+ {
8761
+ d: "M19.5 19.5C19.5 19.9125 19.1625 20.25 18.75 20.25H2.25C1.8375 20.25 1.5 19.9125 1.5 19.5V12C1.5 11.5875 1.8375 11.25 2.25 11.25H18.75C19.1625 11.25 19.5 11.5875 19.5 12V19.5Z",
8762
+ fill: "#47A800"
8763
+ }
8764
+ ),
8765
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8766
+ "path",
8767
+ {
8768
+ d: "M6.76622 15.2898L7.80947 13.9826C8.12147 13.5746 8.72747 14.0958 8.38547 14.4859C8.02622 14.9118 7.64822 15.3738 7.28822 15.8471L8.51147 17.3703C8.84147 17.8204 8.18222 18.2516 7.85822 17.8076L6.75422 16.3923L5.66897 17.8384C5.36297 18.2756 4.68497 17.7844 5.02697 17.3764L6.23222 15.8471C5.85422 15.3731 5.48822 14.9118 5.12297 14.4859C4.74572 14.0359 5.44697 13.5746 5.72297 13.9953L6.76622 15.2898Z",
8769
+ fill: "white"
8770
+ }
8771
+ ),
8772
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8773
+ "path",
8774
+ {
8775
+ d: "M9.2517 14.2098C9.2517 14.0118 9.4197 13.8438 9.6297 13.8438C9.8217 13.8438 9.9837 14.0126 9.9837 14.2098V17.2143H11.6149C12.2022 17.2143 12.2149 17.9996 11.6149 17.9996H9.63045C9.42045 17.9996 9.25245 17.8503 9.25245 17.6343L9.2517 14.2098Z",
8776
+ fill: "white"
8777
+ }
8778
+ ),
8779
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8780
+ "path",
8781
+ {
8782
+ d: "M12.752 14.7498C12.89 13.5858 14.6465 13.3766 15.4745 14.0126C15.8825 14.3418 15.4505 14.8638 15.0905 14.5998C14.6465 14.3186 13.6392 14.1866 13.5132 14.8091C13.3512 15.7931 15.9597 15.2298 15.9177 16.8251C15.8757 18.3483 13.6692 18.3836 12.8412 17.7003C12.6425 17.5383 12.6492 17.2751 12.7572 17.1123C12.9132 16.9571 13.0865 16.9031 13.2912 17.0711C13.7825 17.4063 15.0485 17.6583 15.1377 16.8063C15.0605 15.9198 12.566 16.4531 12.752 14.7498Z",
8783
+ fill: "white"
8784
+ }
8785
+ ),
8786
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8787
+ "path",
8788
+ {
8789
+ d: "M18.75 20.25H4.5V21H18.75C19.1625 21 19.5 20.6625 19.5 20.25V19.5C19.5 19.9125 19.1625 20.25 18.75 20.25Z",
8790
+ fill: "#DCDCDC"
8791
+ }
8792
+ )
8793
+ ]
8749
8794
  }
8750
8795
  );
8751
8796
  };
@@ -8886,21 +8931,66 @@ var MoreIcon = () => {
8886
8931
  // src/icons/pdf-icon.tsx
8887
8932
  var import_jsx_runtime25 = require("react/jsx-runtime");
8888
8933
  var PdfIcon = () => {
8889
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8934
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
8890
8935
  "svg",
8891
8936
  {
8892
8937
  xmlns: "http://www.w3.org/2000/svg",
8893
- width: "19",
8894
- height: "10",
8895
- viewBox: "0 0 19 10",
8938
+ width: "25",
8939
+ height: "24",
8940
+ viewBox: "0 0 25 24",
8896
8941
  fill: "none",
8897
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8898
- "path",
8899
- {
8900
- d: "M18.6992 8.5C18.6992 8.9125 18.3617 9.25 17.9492 9.25H1.44922C1.03672 9.25 0.699219 8.9125 0.699219 8.5V1C0.699219 0.5875 1.03672 0.25 1.44922 0.25H17.9492C18.3617 0.25 18.6992 0.5875 18.6992 1V8.5Z",
8901
- fill: "#FF4B34"
8902
- }
8903
- )
8942
+ children: [
8943
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8944
+ "path",
8945
+ {
8946
+ d: "M6.19922 0C5.37422 0 4.69922 0.675 4.69922 1.5V22.5C4.69922 23.325 5.37422 24 6.19922 24H21.1992C22.0242 24 22.6992 23.325 22.6992 22.5V6L16.6992 0H6.19922Z",
8947
+ fill: "#ECECEC"
8948
+ }
8949
+ ),
8950
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8951
+ "path",
8952
+ {
8953
+ d: "M18.1992 6H22.6992L16.6992 0V4.5C16.6992 5.325 17.3742 6 18.1992 6Z",
8954
+ fill: "#C6C6C6"
8955
+ }
8956
+ ),
8957
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M22.6992 10.5L18.1992 6H22.6992V10.5Z", fill: "#DCDCDC" }),
8958
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8959
+ "path",
8960
+ {
8961
+ d: "M19.6992 19.5C19.6992 19.9125 19.3617 20.25 18.9492 20.25H2.44922C2.03672 20.25 1.69922 19.9125 1.69922 19.5V12C1.69922 11.5875 2.03672 11.25 2.44922 11.25H18.9492C19.3617 11.25 19.6992 11.5875 19.6992 12V19.5Z",
8962
+ fill: "#FF4B34"
8963
+ }
8964
+ ),
8965
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8966
+ "path",
8967
+ {
8968
+ d: "M4.96855 14.2096C4.96855 14.0116 5.12455 13.7956 5.3758 13.7956H6.76105C7.54105 13.7956 8.24305 14.3176 8.24305 15.3181C8.24305 16.2661 7.54105 16.7941 6.76105 16.7941H5.7598V17.5861C5.7598 17.8501 5.5918 17.9994 5.3758 17.9994C5.1778 17.9994 4.96855 17.8501 4.96855 17.5861V14.2096ZM5.7598 14.5509V16.0449H6.76105C7.16305 16.0449 7.48105 15.6901 7.48105 15.3181C7.48105 14.8989 7.16305 14.5509 6.76105 14.5509H5.7598Z",
8969
+ fill: "white"
8970
+ }
8971
+ ),
8972
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8973
+ "path",
8974
+ {
8975
+ d: "M9.41755 17.9994C9.21955 17.9994 9.00355 17.8914 9.00355 17.6281V14.2216C9.00355 14.0064 9.21955 13.8496 9.41755 13.8496H10.7908C13.5313 13.8496 13.4713 17.9994 10.8448 17.9994H9.41755ZM9.79555 14.5816V17.2681H10.7908C12.4101 17.2681 12.4821 14.5816 10.7908 14.5816H9.79555Z",
8976
+ fill: "white"
8977
+ }
8978
+ ),
8979
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8980
+ "path",
8981
+ {
8982
+ d: "M14.4433 14.6296V15.5829H15.9726C16.1886 15.5829 16.4046 15.7989 16.4046 16.0081C16.4046 16.2061 16.1886 16.3681 15.9726 16.3681H14.4433V17.6274C14.4433 17.8374 14.2941 17.9986 14.0841 17.9986C13.8201 17.9986 13.6588 17.8374 13.6588 17.6274V14.2209C13.6588 14.0056 13.8208 13.8489 14.0841 13.8489H16.1893C16.4533 13.8489 16.6093 14.0056 16.6093 14.2209C16.6093 14.4129 16.4533 14.6289 16.1893 14.6289L14.4433 14.6296Z",
8983
+ fill: "white"
8984
+ }
8985
+ ),
8986
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8987
+ "path",
8988
+ {
8989
+ d: "M18.9492 20.25H4.69922V21H18.9492C19.3617 21 19.6992 20.6625 19.6992 20.25V19.5C19.6992 19.9125 19.3617 20.25 18.9492 20.25Z",
8990
+ fill: "#DCDCDC"
8991
+ }
8992
+ )
8993
+ ]
8904
8994
  }
8905
8995
  );
8906
8996
  };
@@ -9007,8 +9097,8 @@ var ZipIcon = () => {
9007
9097
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9008
9098
  "svg",
9009
9099
  {
9010
- width: "40",
9011
- height: "40",
9100
+ width: "30",
9101
+ height: "30",
9012
9102
  viewBox: "0 0 40 40",
9013
9103
  fill: "none",
9014
9104
  xmlns: "http://www.w3.org/2000/svg",
@@ -12198,6 +12288,7 @@ var M = import_react16.default.forwardRef(({ id: t3, anchorId: l2, anchorSelect:
12198
12288
  });
12199
12289
 
12200
12290
  // src/widgets/advanced/table/table-head.tsx
12291
+ var import_react_dom2 = require("react-dom");
12201
12292
  var import_jsx_runtime48 = require("react/jsx-runtime");
12202
12293
  var TableHead = (props) => {
12203
12294
  const {
@@ -12239,27 +12330,31 @@ var TableHead = (props) => {
12239
12330
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12240
12331
  "th",
12241
12332
  {
12333
+ "data-rtc-resizable": col?.name,
12242
12334
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12243
12335
  children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
12244
12336
  col.title,
12245
12337
  col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12246
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12247
- M,
12248
- {
12249
- style: {
12250
- padding: "6px 12px",
12251
- fontSize: "12px",
12252
- borderRadius: "4px",
12253
- maxWidth: "200%",
12254
- whiteSpace: "wrap",
12255
- fontWeight: 400,
12256
- textTransform: "none"
12257
- },
12258
- id: `field-help-${col?.field?.name}`,
12259
- content: col?.field?.help,
12260
- place: "top",
12261
- className: "z-30"
12262
- }
12338
+ (0, import_react_dom2.createPortal)(
12339
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12340
+ M,
12341
+ {
12342
+ style: {
12343
+ padding: "6px 12px",
12344
+ fontSize: "12px",
12345
+ borderRadius: "4px",
12346
+ maxWidth: "200px",
12347
+ whiteSpace: "wrap",
12348
+ fontWeight: 400,
12349
+ textTransform: "none",
12350
+ zIndex: "9999"
12351
+ },
12352
+ id: `field-help-${col?.field?.name}`,
12353
+ content: col?.field?.help,
12354
+ place: "top"
12355
+ }
12356
+ ),
12357
+ document.body
12263
12358
  ),
12264
12359
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12265
12360
  "span",
@@ -15397,7 +15492,7 @@ var ModalConfirm = ({
15397
15492
 
15398
15493
  // src/widgets/common/modal-detail.tsx
15399
15494
  var import_react24 = require("react");
15400
- var import_react_dom2 = require("react-dom");
15495
+ var import_react_dom3 = require("react-dom");
15401
15496
  var import_jsx_runtime66 = require("react/jsx-runtime");
15402
15497
  var ModalDetail = ({
15403
15498
  idToolTip,
@@ -15420,7 +15515,7 @@ var ModalDetail = ({
15420
15515
  sessionStorage.setItem("actionData", JSON.stringify(actionData));
15421
15516
  window.location.href = `/form/menu?model=${model}&id=${idForm}`;
15422
15517
  };
15423
- return (0, import_react_dom2.createPortal)(
15518
+ return (0, import_react_dom3.createPortal)(
15424
15519
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: showModalDetail && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
15425
15520
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
15426
15521
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative z-[1] max-w-full p-4 flex flex-col gap-4 w-[1000px] transform rounded-3xl bg-[#FFF] h-[90%]", children: [
@@ -15713,7 +15808,8 @@ var ButtonSelectFiles = ({
15713
15808
  "application/zip",
15714
15809
  "application/x-zip-compressed",
15715
15810
  "application/vnd.ms-excel",
15716
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
15811
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
15812
+ "application/json"
15717
15813
  ];
15718
15814
  const MAX_FILE_SIZE = 10 * 1024 * 1024;
15719
15815
  const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
@@ -15814,7 +15910,7 @@ var ButtonSelectFiles = ({
15814
15910
  style: { display: "none" },
15815
15911
  onChange: handleOnChange,
15816
15912
  multiple: true,
15817
- accept: ".jpeg,.jpg,.png,.pdf,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
15913
+ accept: ".jpeg,.jpg,.png,.pdf,.json,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
15818
15914
  }
15819
15915
  )
15820
15916
  ] });
@@ -21160,7 +21256,7 @@ function useFloating2(options2) {
21160
21256
  }
21161
21257
 
21162
21258
  // node_modules/react-datepicker/dist/index.es.js
21163
- var import_react_dom5 = __toESM(require("react-dom"));
21259
+ var import_react_dom6 = __toESM(require("react-dom"));
21164
21260
  var _extendStatics = function extendStatics(d, b2) {
21165
21261
  _extendStatics = Object.setPrototypeOf || {
21166
21262
  __proto__: []
@@ -24403,7 +24499,7 @@ var Portal = (
24403
24499
  }
24404
24500
  };
24405
24501
  Portal2.prototype.render = function() {
24406
- return import_react_dom5.default.createPortal(this.props.children, this.el);
24502
+ return import_react_dom6.default.createPortal(this.props.children, this.el);
24407
24503
  };
24408
24504
  return Portal2;
24409
24505
  }(import_react44.Component)
@@ -26971,7 +27067,7 @@ function _taggedTemplateLiteral(e3, t3) {
26971
27067
 
26972
27068
  // node_modules/react-select/dist/index-641ee5b8.esm.js
26973
27069
  var import_react50 = require("react");
26974
- var import_react_dom6 = require("react-dom");
27070
+ var import_react_dom7 = require("react-dom");
26975
27071
 
26976
27072
  // node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
26977
27073
  var import_react48 = require("react");
@@ -27474,7 +27570,7 @@ var MenuPortal = function MenuPortal2(props) {
27474
27570
  }), innerProps), children);
27475
27571
  return jsx81(PortalPlacementContext.Provider, {
27476
27572
  value: portalPlacementContext
27477
- }, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
27573
+ }, appendTo ? /* @__PURE__ */ (0, import_react_dom7.createPortal)(menuWrapper, appendTo) : menuWrapper);
27478
27574
  };
27479
27575
  var containerCSS = function containerCSS2(_ref3) {
27480
27576
  var isDisabled = _ref3.isDisabled, isRtl = _ref3.isRtl;
@@ -30367,7 +30463,7 @@ var import_toConsumableArray2 = __toESM(require_toConsumableArray());
30367
30463
  var import_typeof5 = __toESM(require_typeof());
30368
30464
  var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
30369
30465
  var import_defineProperty3 = __toESM(require_defineProperty());
30370
- var import_react_dom7 = require("react-dom");
30466
+ var import_react_dom8 = require("react-dom");
30371
30467
  var StateManagedSelect = /* @__PURE__ */ (0, import_react53.forwardRef)(function(props, ref) {
30372
30468
  var baseSelectProps = useStateManager(props);
30373
30469
  return /* @__PURE__ */ React14.createElement(Select, _extends({
@@ -32314,7 +32410,7 @@ var StatusDropdownField = (props) => {
32314
32410
  };
32315
32411
 
32316
32412
  // src/widgets/basic/many2many-field/many2many.tsx
32317
- var import_react_dom8 = require("react-dom");
32413
+ var import_react_dom9 = require("react-dom");
32318
32414
  var import_react65 = require("react");
32319
32415
  var import_jsx_runtime104 = require("react/jsx-runtime");
32320
32416
  var Many2ManyField = (props) => {
@@ -32389,7 +32485,7 @@ var Many2ManyField = (props) => {
32389
32485
  typeof setGroupByList === "function" && setGroupByList(null);
32390
32486
  };
32391
32487
  }, [selectedTags]);
32392
- return (0, import_react_dom8.createPortal)(
32488
+ return (0, import_react_dom9.createPortal)(
32393
32489
  /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
32394
32490
  "div",
32395
32491
  {