pixel-react 1.14.40 → 1.14.41

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.
Files changed (66) hide show
  1. package/lib/_virtual/index4.js +3 -5
  2. package/lib/_virtual/index4.js.map +1 -1
  3. package/lib/_virtual/index5.js +5 -3
  4. package/lib/_virtual/index5.js.map +1 -1
  5. package/lib/assets/icons/windows.svg.js +1 -1
  6. package/lib/assets/icons/windows.svg.js.map +1 -1
  7. package/lib/components/Comments/Comments.js +1 -1
  8. package/lib/components/Comments/Comments.js.map +1 -1
  9. package/lib/components/Excel/Data.d.ts +127 -0
  10. package/lib/components/Excel/Data.js +646 -0
  11. package/lib/components/Excel/Data.js.map +1 -0
  12. package/lib/components/Excel/Data2.d.ts +133 -0
  13. package/lib/components/Excel/Data2.js +698 -0
  14. package/lib/components/Excel/Data2.js.map +1 -0
  15. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.d.ts +0 -1
  16. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.js +3 -6
  17. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.js.map +1 -1
  18. package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +8 -20
  19. package/lib/components/Excel/ExcelFile/ExcelFile.js +37 -31
  20. package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
  21. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.d.ts +1 -12
  22. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js +1 -0
  23. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js.map +1 -1
  24. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js +13 -9
  25. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
  26. package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js +14 -10
  27. package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js.map +1 -1
  28. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +3 -12
  29. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +17 -5
  30. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
  31. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +19 -12
  32. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.js +18 -12
  33. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.js.map +1 -1
  34. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js +39 -21
  35. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js.map +1 -1
  36. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +11 -6
  37. package/lib/components/Excel/Types.d.ts +1 -0
  38. package/lib/components/MultiSelect/MultiSelect.js +1 -1
  39. package/lib/components/MultiSelect/MultiSelect.js.map +1 -1
  40. package/lib/components/Table/Table.js +1 -1
  41. package/lib/components/Table/Table.js.map +1 -1
  42. package/lib/index.cjs +146 -98
  43. package/lib/index.cjs.map +1 -1
  44. package/lib/index.d.ts +29 -27
  45. package/lib/node_modules/input-format/modules/react/Input.js +1 -1
  46. package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
  47. package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
  48. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  49. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  50. package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
  51. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  52. package/lib/node_modules/react-google-recaptcha/lib/esm/recaptcha.js +1 -1
  53. package/lib/node_modules/react-phone-number-input/modules/CountryIcon.js +1 -1
  54. package/lib/node_modules/react-phone-number-input/modules/CountrySelect.js +1 -1
  55. package/lib/node_modules/react-phone-number-input/modules/Flag.js +1 -1
  56. package/lib/node_modules/react-phone-number-input/modules/InputBasic.js +1 -1
  57. package/lib/node_modules/react-phone-number-input/modules/InputSmart.js +1 -1
  58. package/lib/node_modules/react-phone-number-input/modules/InternationalIcon.js +1 -1
  59. package/lib/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.js +1 -1
  60. package/lib/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.js +1 -1
  61. package/lib/node_modules/react-phone-number-input/modules/PropTypes.js +1 -1
  62. package/lib/node_modules/use-context-selector/dist/index.js +1 -1
  63. package/lib/styles.css +1 -1
  64. package/lib/styles.css.map +1 -1
  65. package/lib/tsconfig.tsbuildinfo +1 -1
  66. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -392,7 +392,7 @@ const SvgLicenseWarning = (props) => /* @__PURE__ */ React__namespace.createElem
392
392
 
393
393
  const SvgVariableIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M10.5 4.5L8.40169 10.5H6.59831L4.5 4.5H6.03371L7.5 9.02991L8.97472 4.5H10.5Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.28395 1.28395C2.21109 0.356801 3.60069 0 5.4 0H9.6C11.3993 0 12.7889 0.356801 13.7161 1.28395C14.6432 2.21109 15 3.60069 15 5.4V9.6C15 11.3993 14.6432 12.7889 13.7161 13.7161C12.7889 14.6432 11.3993 15 9.6 15H5.4C3.60069 15 2.21109 14.6432 1.28395 13.7161C0.356801 12.7889 0 11.3993 0 9.6V5.4C0 3.60069 0.356801 2.21109 1.28395 1.28395ZM1.99105 1.99105C1.3432 2.63891 1 3.69931 1 5.4V9.6C1 11.3007 1.3432 12.3611 1.99105 13.0089C2.63891 13.6568 3.69931 14 5.4 14H9.6C11.3007 14 12.3611 13.6568 13.0089 13.0089C13.6568 12.3611 14 11.3007 14 9.6V5.4C14 3.69931 13.6568 2.63891 13.0089 1.99105C12.3611 1.3432 11.3007 1 9.6 1H5.4C3.69931 1 2.63891 1.3432 1.99105 1.99105Z", fill: "currentColor" }));
394
394
 
395
- const SvgWindows = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M4.80888 12.0185L0.114433 11.3751L0.00422248 11.36L0.00421445 11.2489L0.00396729 7.39195V7.26428H0.131141H4.82583H4.95351V7.39195V11.8924V12.0384L4.80888 12.0185Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M12.0003 7.39195L11.9987 12.8732V13.0197L11.8541 12.9993L5.59136 12.1182L5.48114 12.1028V11.9921V7.39195V7.26428H5.60882H11.8731H12.0003V7.39195Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M5.59086 1.91281L11.8536 1.00154L11.9993 0.980347V1.12771V6.60891V6.73658H11.8715H5.60882H5.48114V6.60891V2.03899V1.92879L5.59086 1.91281Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M0.00418431 6.60893L-0.000124334 2.79077L-0.000244141 2.67959L0.110094 2.6646L4.80836 2.02659L4.95299 2.00696V2.15276V6.60893V6.7366H4.82531H0.131358H0.00433601L0.00418431 6.60893Z", fill: "currentColor" }));
395
+ const SvgWindows = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 12 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M4.80888 12.0185L0.114433 11.3751L0.00422248 11.36L0.00421445 11.2489L0.00396729 7.39195V7.26428H0.131141H4.82583H4.95351V7.39195V11.8924V12.0384L4.80888 12.0185Z", fill: "#00BCD4" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M12.0003 7.39195L11.9987 12.8732V13.0197L11.8541 12.9993L5.59136 12.1182L5.48114 12.1028V11.9921V7.39195V7.26428H5.60882H11.8731H12.0003V7.39195Z", fill: "#00BCD4" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M5.59086 1.91281L11.8536 1.00154L11.9993 0.980347V1.12771V6.60891V6.73658H11.8715H5.60882H5.48114V6.60891V2.03899V1.92879L5.59086 1.91281Z", fill: "#00BCD4" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M0.00418431 6.60893L-0.000124334 2.79077L-0.000244141 2.67959L0.110094 2.6646L4.80836 2.02659L4.95299 2.00696V2.15276V6.60893V6.7366H4.82531H0.131358H0.00433601L0.00418431 6.60893Z", fill: "#00BCD4" }));
396
396
 
397
397
  const SvgDatasetList = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.4756 6.76071V8.19947C11.4756 8.73156 9.91947 9.16302 8 9.16302C6.08053 9.16302 4.52444 8.73173 4.52444 8.19947V6.76071C4.52444 6.7344 4.5376 6.71182 4.56036 6.69885C4.58311 6.68587 4.60924 6.68605 4.63182 6.69956C5.55129 7.24676 7.39342 7.31307 7.99982 7.31307C8.60622 7.31307 10.4484 7.24676 11.3678 6.69956C11.3904 6.68605 11.4165 6.68587 11.4393 6.69885C11.4624 6.71182 11.4756 6.7344 11.4756 6.76071ZM12.6032 8.94151H15.3159C15.6921 8.94151 16 9.24925 16 9.6256V10.949C16 11.3252 15.6923 11.6331 15.3159 11.6331H12.6032C12.227 11.6331 11.9191 11.3253 11.9191 10.949V9.6256C11.9191 9.24942 12.227 8.94151 12.6032 8.94151ZM3.65689 5.87058C3.77476 5.87058 3.87022 5.96604 3.87022 6.08391C3.87022 6.20178 3.77476 6.29725 3.65689 6.29725H2.25387V7.24356C2.4272 7.32409 2.5472 7.49973 2.5472 7.70329C2.5472 7.98311 2.32036 8.20996 2.04053 8.20996C1.76071 8.20996 1.53387 7.98311 1.53387 7.70329C1.53387 7.49973 1.65404 7.32409 1.8272 7.24356V6.08391C1.8272 5.96604 1.92267 5.87058 2.04053 5.87058H3.65689ZM14.1728 7.24356C14.3461 7.32409 14.4661 7.49973 14.4661 7.70329C14.4661 7.98311 14.2393 8.20996 13.9595 8.20996C13.6796 8.20996 13.4528 7.98311 13.4528 7.70329C13.4528 7.49956 13.573 7.32409 13.7461 7.24356V6.29725H12.3431C12.2252 6.29725 12.1298 6.20178 12.1298 6.08391C12.1298 5.96604 12.2252 5.87058 12.3431 5.87058H13.9595C14.0773 5.87058 14.1728 5.96604 14.1728 6.08391V7.24356ZM8.21333 11.3625C8.38667 11.443 8.50667 11.6185 8.50667 11.8222C8.50667 12.102 8.27982 12.3289 8 12.3289C7.72018 12.3289 7.49333 12.102 7.49333 11.8222C7.49333 11.6187 7.61351 11.443 7.78667 11.3625V9.79858C7.78667 9.68071 7.88213 9.58525 8 9.58525C8.11787 9.58525 8.21333 9.68071 8.21333 9.79858V11.3625ZM0.684089 8.94151H3.3968C3.77298 8.94151 4.08089 9.24925 4.08089 9.6256V10.949C4.08089 11.3252 3.77316 11.6331 3.3968 11.6331H0.684089C0.307911 11.6331 0 11.3252 0 10.949V9.6256C0 9.24942 0.307911 8.94151 0.684089 8.94151ZM1.13013 10.8976H2.95058C3.06844 10.8976 3.16391 10.8021 3.16391 10.6843C3.16391 10.5664 3.06844 10.4709 2.95058 10.4709H1.13013C1.01227 10.4709 0.9168 10.5664 0.9168 10.6843C0.9168 10.8021 1.01244 10.8976 1.13013 10.8976ZM1.13013 10.1038H2.95058C3.06844 10.1038 3.16391 10.0084 3.16391 9.89049C3.16391 9.77262 3.06844 9.67716 2.95058 9.67716H1.13013C1.01227 9.67716 0.9168 9.77262 0.9168 9.89049C0.9168 10.0084 1.01244 10.1038 1.13013 10.1038ZM6.64356 13.0231H9.35644C9.73262 13.0231 10.0405 13.331 10.0405 13.7072V15.0306C10.0405 15.4068 9.7328 15.7147 9.35644 15.7147H6.64356C6.26738 15.7147 5.95947 15.4068 5.95947 15.0306V13.7072C5.95964 13.3308 6.26738 13.0231 6.64356 13.0231ZM7.08978 14.979H8.91022C9.02809 14.979 9.12356 14.8836 9.12356 14.7657C9.12356 14.6478 9.02809 14.5524 8.91022 14.5524H7.08978C6.97191 14.5524 6.87644 14.6478 6.87644 14.7657C6.87644 14.8836 6.97191 14.979 7.08978 14.979ZM7.08978 14.1852H8.91022C9.02809 14.1852 9.12356 14.0898 9.12356 13.9719C9.12356 13.854 9.02809 13.7586 8.91022 13.7586H7.08978C6.97191 13.7586 6.87644 13.854 6.87644 13.9719C6.87644 14.0898 6.97191 14.1852 7.08978 14.1852ZM13.0492 10.8976H14.8697C14.9876 10.8976 15.083 10.8021 15.083 10.6843C15.083 10.5664 14.9876 10.4709 14.8697 10.4709H13.0492C12.9314 10.4709 12.8359 10.5664 12.8359 10.6843C12.8359 10.8021 12.9316 10.8976 13.0492 10.8976ZM13.0492 10.1038H14.8697C14.9876 10.1038 15.083 10.0084 15.083 9.89049C15.083 9.77262 14.9876 9.67716 14.8697 9.67716H13.0492C12.9314 9.67716 12.8359 9.77262 12.8359 9.89049C12.8359 10.0084 12.9316 10.1038 13.0492 10.1038ZM8 0.285156C9.91947 0.285156 11.4756 0.716445 11.4756 1.24871C11.4756 1.7808 9.91947 2.21227 8 2.21227C6.08053 2.21227 4.52444 1.78098 4.52444 1.24871C4.52444 0.716445 6.08053 0.285156 8 0.285156ZM11.4756 2.01209C11.4756 1.98578 11.4624 1.96302 11.4393 1.95022C11.4164 1.93725 11.39 1.93778 11.3675 1.95147C10.6898 2.36267 9.43538 2.63876 8 2.63876C6.56462 2.63876 5.31022 2.36267 4.63253 1.95129C4.60996 1.9376 4.58382 1.93725 4.56071 1.95005C4.53778 1.96302 4.52444 1.9856 4.52444 2.01191V3.45885C4.52444 3.99093 6.08053 4.4224 8 4.4224C9.91947 4.4224 11.4756 3.99111 11.4756 3.45885V2.01209ZM9.45778 3.25067C9.57422 3.23556 9.68089 3.31751 9.69618 3.43396C9.71129 3.5504 9.62933 3.65707 9.51289 3.67236C9.38489 3.68907 9.25458 3.70364 9.12231 3.71591C8.98364 3.72889 8.84996 3.73884 8.72107 3.74631C8.60373 3.75271 8.50329 3.66276 8.49689 3.54542C8.49049 3.42809 8.58044 3.32765 8.69778 3.32125C8.83164 3.3136 8.96071 3.304 9.08391 3.29262C9.20711 3.28124 9.33173 3.2672 9.45778 3.25067ZM10.4039 3.0656C10.5172 3.03431 10.6343 3.1008 10.6656 3.21387C10.6969 3.32711 10.6304 3.44427 10.5173 3.47556L10.4656 3.48996C10.4617 3.49102 10.4578 3.49191 10.4539 3.4928L10.4123 3.50329C10.2987 3.53227 10.1829 3.46364 10.154 3.35004C10.125 3.23644 10.1936 3.12071 10.3072 3.09173C10.3191 3.08871 10.3131 3.09013 10.3467 3.08107L10.3556 3.0784C10.394 3.06827 10.3961 3.06791 10.4039 3.0656ZM11.4756 5.92302V4.29689C11.4756 4.27058 11.4624 4.248 11.4396 4.23502C11.4169 4.22205 11.3908 4.22222 11.3682 4.23573C10.4485 4.78293 8.6064 4.84925 8 4.84925C7.3936 4.84925 5.55147 4.78293 4.632 4.23573C4.60942 4.22222 4.58329 4.22205 4.56053 4.23502C4.53778 4.248 4.52462 4.27058 4.52462 4.29689V5.92302C4.52462 6.45511 6.08071 6.88658 8.00018 6.88658C9.91947 6.88658 11.4756 6.45511 11.4756 5.92302ZM10.4039 5.41333C10.5172 5.38205 10.6343 5.44853 10.6656 5.5616C10.6969 5.67484 10.6304 5.792 10.5173 5.82329L10.466 5.83751C10.4416 5.84409 10.4699 5.83627 10.4123 5.85102C10.2987 5.88 10.1829 5.81138 10.154 5.69778C10.125 5.58418 10.1936 5.46845 10.3072 5.43947C10.3303 5.4336 10.2978 5.4416 10.3559 5.42613L10.4039 5.41333ZM9.45778 5.5984C9.57422 5.58329 9.68089 5.66525 9.69618 5.78169C9.71147 5.89813 9.62933 6.0048 9.51289 6.02009C9.38329 6.03716 9.25138 6.05173 9.11751 6.06418C8.98044 6.07698 8.84818 6.08676 8.72107 6.09405C8.60373 6.10045 8.50329 6.01049 8.49689 5.89316C8.49049 5.77582 8.58044 5.67538 8.69778 5.66898C8.83022 5.66133 8.95769 5.65191 9.07929 5.64071C9.20409 5.62916 9.33031 5.61511 9.45778 5.5984ZM9.45778 7.968C9.33191 7.98453 9.20711 7.9984 9.08373 8.00996C8.96036 8.02151 8.83147 8.03093 8.6976 8.03858C8.58027 8.04498 8.49031 8.14542 8.49671 8.26276C8.50311 8.38009 8.60356 8.47005 8.72089 8.46364C8.84978 8.45618 8.98347 8.44622 9.12213 8.43324C9.2544 8.42098 9.38471 8.4064 9.51271 8.38969C9.62916 8.37458 9.71129 8.26773 9.696 8.15129C9.68071 8.03485 9.57422 7.95289 9.45778 7.968ZM10.4039 7.78311L10.3559 7.79609C10.2978 7.81156 10.3303 7.80338 10.3072 7.80925C10.1936 7.83822 10.1248 7.95396 10.154 8.06756C10.1829 8.18116 10.2987 8.24996 10.4123 8.2208C10.4699 8.20605 10.4416 8.21387 10.466 8.20747L10.5173 8.19307C10.6306 8.16178 10.6969 8.04462 10.6656 7.93138C10.6341 7.81813 10.517 7.75182 10.4039 7.78311Z", fill: "#71347B" }));
398
398
 
@@ -2907,7 +2907,7 @@ function useMergeRefs(...refs) {
2907
2907
  }, [refs]);
2908
2908
  }
2909
2909
 
2910
- const MAX_SEARCH_CHARACTER_LENGTH = 25;
2910
+ const MAX_SEARCH_CHARACTER_LENGTH = 100;
2911
2911
  const MAX_ALLOWED_PIXEL = 150;
2912
2912
  const FONT_SIZE$1 = 6;
2913
2913
  const ChipElement = ({
@@ -11923,7 +11923,7 @@ const SortableRow = ({
11923
11923
  style: {
11924
11924
  position: isFrozen ? 'sticky' : 'static',
11925
11925
  left: isFrozen ? getColumnLeftPosition(index, columns, freezeColumns) : 'auto',
11926
- zIndex: isFrozen ? 99 : 'auto',
11926
+ zIndex: isFrozen ? 120 : 'auto',
11927
11927
  backgroundColor: isFrozen ? 'var(--input-label-bg-color)' : 'transparent',
11928
11928
  width: column.width ? `${column.width}px` : 'auto',
11929
11929
  padding: '7px 8px',
@@ -36890,34 +36890,40 @@ function formatePainter(data) {
36890
36890
  }
36891
36891
  };
36892
36892
  }
36893
- function addRowTop() {
36893
+ function addRowTop(row) {
36894
36894
  return {
36895
- type: ADD_ROW_TOP
36895
+ type: ADD_ROW_TOP,
36896
+ row
36896
36897
  };
36897
36898
  }
36898
- function addRowBottom() {
36899
+ function addRowBottom(row) {
36899
36900
  return {
36900
- type: ADD_ROW_BOTTOM
36901
+ type: ADD_ROW_BOTTOM,
36902
+ row
36901
36903
  };
36902
36904
  }
36903
- function addColumnLeft() {
36905
+ function addColumnLeft(column) {
36904
36906
  return {
36905
- type: ADD_COLUMN_LEFT
36907
+ type: ADD_COLUMN_LEFT,
36908
+ column
36906
36909
  };
36907
36910
  }
36908
- function addColumnRight() {
36911
+ function addColumnRight(column) {
36909
36912
  return {
36910
- type: ADD_COLUMN_RIGHT
36913
+ type: ADD_COLUMN_RIGHT,
36914
+ column
36911
36915
  };
36912
36916
  }
36913
- function deleteRow() {
36917
+ function deleteRow(row) {
36914
36918
  return {
36915
- type: DELETE_ROW
36919
+ type: DELETE_ROW,
36920
+ row
36916
36921
  };
36917
36922
  }
36918
- function deleteColumn() {
36923
+ function deleteColumn(column) {
36919
36924
  return {
36920
- type: DELETE_COLUMN
36925
+ type: DELETE_COLUMN,
36926
+ column
36921
36927
  };
36922
36928
  }
36923
36929
  function keyPress(event) {
@@ -39007,18 +39013,21 @@ function reducer(state, action) {
39007
39013
  selectedColumn,
39008
39014
  model
39009
39015
  } = state;
39010
- if (checkEmpty(selectedRow)) {
39016
+ const {
39017
+ row
39018
+ } = action;
39019
+ if (checkEmpty(row ?? selectedRow)) {
39011
39020
  return state;
39012
39021
  }
39013
- selectedRow = selectedRow;
39022
+ selectedRow = row ?? selectedRow;
39014
39023
  let updatedData = [...model.data];
39015
39024
  const newRow = Array(updatedData[0]?.length || 0).fill(EmptyCell);
39016
- updatedData.splice(selectedRow, 0, newRow);
39025
+ updatedData.splice(row ?? selectedRow, 0, newRow);
39017
39026
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39018
39027
  return {
39019
39028
  ...state,
39020
39029
  model: updatedModel,
39021
- selectedRow: selectedRow,
39030
+ selectedRow: row ?? selectedRow,
39022
39031
  selectedColumn: selectedColumn
39023
39032
  };
39024
39033
  }
@@ -39029,18 +39038,21 @@ function reducer(state, action) {
39029
39038
  selectedColumn,
39030
39039
  model
39031
39040
  } = state;
39041
+ const {
39042
+ row
39043
+ } = action;
39032
39044
  if (checkEmpty(selectedRow)) {
39033
39045
  return state;
39034
39046
  }
39035
- selectedRow = selectedRow;
39047
+ selectedRow = row ?? selectedRow;
39036
39048
  let updatedData = [...model.data];
39037
39049
  const newRow = Array(updatedData[0]?.length || 0).fill(EmptyCell);
39038
- updatedData.splice(selectedRow + 1, 0, newRow);
39050
+ updatedData.splice((row ?? selectedRow) + 1, 0, newRow);
39039
39051
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39040
39052
  return {
39041
39053
  ...state,
39042
39054
  model: updatedModel,
39043
- selectedRow: selectedRow + 1,
39055
+ selectedRow: (row ?? selectedRow) + 1,
39044
39056
  selectedColumn: selectedColumn
39045
39057
  };
39046
39058
  }
@@ -39051,20 +39063,23 @@ function reducer(state, action) {
39051
39063
  selectedColumn,
39052
39064
  model
39053
39065
  } = state;
39054
- if (checkEmpty(selectedColumn)) {
39066
+ const {
39067
+ column
39068
+ } = action;
39069
+ if (checkEmpty(column ?? selectedColumn)) {
39055
39070
  return state;
39056
39071
  }
39057
- selectedColumn = selectedColumn;
39072
+ selectedColumn = column ?? selectedColumn;
39058
39073
  let updatedData = [...model.data];
39059
39074
  updatedData = updatedData.map(row => {
39060
- return [...row.slice(0, selectedColumn), EmptyCell, ...row.slice(selectedColumn)];
39075
+ return [...row.slice(0, column ?? selectedColumn), EmptyCell, ...row.slice(column ?? selectedColumn)];
39061
39076
  });
39062
39077
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39063
39078
  return {
39064
39079
  ...state,
39065
39080
  model: updatedModel,
39066
39081
  selectedRow: selectedRow,
39067
- selectedColumn: selectedColumn - 1
39082
+ selectedColumn: (column ?? selectedColumn) - 1
39068
39083
  };
39069
39084
  }
39070
39085
  case ADD_COLUMN_RIGHT:
@@ -39074,20 +39089,23 @@ function reducer(state, action) {
39074
39089
  selectedColumn,
39075
39090
  model
39076
39091
  } = state;
39077
- if (checkEmpty(selectedColumn)) {
39092
+ const {
39093
+ column
39094
+ } = action;
39095
+ if (checkEmpty(column ?? selectedColumn)) {
39078
39096
  return state;
39079
39097
  }
39080
- selectedColumn = selectedColumn;
39098
+ selectedColumn = column ?? selectedColumn;
39081
39099
  let updatedData = [...model.data];
39082
39100
  updatedData = updatedData.map(row => {
39083
- return [...row.slice(0, selectedColumn + 1), EmptyCell, ...row.slice(selectedColumn + 1)];
39101
+ return [...row.slice(0, (column ?? selectedColumn) + 1), EmptyCell, ...row.slice((column ?? selectedColumn) + 1)];
39084
39102
  });
39085
39103
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39086
39104
  return {
39087
39105
  ...state,
39088
39106
  model: updatedModel,
39089
39107
  selectedRow: selectedRow,
39090
- selectedColumn: selectedColumn + 1
39108
+ selectedColumn: (column ?? selectedColumn) + 1
39091
39109
  };
39092
39110
  }
39093
39111
  case DELETE_ROW:
@@ -39097,14 +39115,17 @@ function reducer(state, action) {
39097
39115
  selectedColumn,
39098
39116
  model
39099
39117
  } = state;
39118
+ const {
39119
+ row
39120
+ } = action;
39100
39121
  if (checkEmpty(selectedRow)) {
39101
39122
  return state;
39102
39123
  }
39103
- selectedRow = selectedRow;
39124
+ selectedRow = row ?? selectedRow;
39104
39125
  let updatedData = [...model.data];
39105
- updatedData.splice(selectedRow, 1);
39126
+ updatedData.splice(row ?? selectedRow, 1);
39106
39127
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39107
- let newSelectedRow = selectedRow > 0 ? selectedRow - 1 : 0;
39128
+ let newSelectedRow = row ?? selectedRow > 0 ? row ?? selectedRow - 1 : 0;
39108
39129
  const newSelectedColumn = selectedColumn !== null ? selectedColumn : 0;
39109
39130
  const newActive = updatedData.length > 0 ? {
39110
39131
  row: newSelectedRow,
@@ -39112,7 +39133,7 @@ function reducer(state, action) {
39112
39133
  } : null;
39113
39134
  const newSelected = updatedData.length > 0 ? new EntireRowsSelection(newSelectedRow, newSelectedRow) : new EmptySelection();
39114
39135
  const {
39115
- [selectedRow]: _,
39136
+ [row ?? selectedRow]: _,
39116
39137
  ...cleanedRowDimensions
39117
39138
  } = state.rowDimensions;
39118
39139
  return {
@@ -39132,8 +39153,11 @@ function reducer(state, action) {
39132
39153
  selectedColumn,
39133
39154
  model
39134
39155
  } = state;
39135
- if (checkEmpty(selectedColumn)) return state;
39136
- const colIndex = selectedColumn;
39156
+ const {
39157
+ column
39158
+ } = action;
39159
+ if (checkEmpty(column ?? selectedColumn)) return state;
39160
+ const colIndex = column ?? selectedColumn;
39137
39161
  const updatedData = model.data.map(row => row.filter((_, cellIndex) => cellIndex !== colIndex));
39138
39162
  const updatedModel = new Model(model.createFormulaParser, updatedData);
39139
39163
  const newSelectedRow = selectedRow || 0;
@@ -41103,7 +41127,9 @@ const ColumnIndicator = ({
41103
41127
  cell,
41104
41128
  selectedColumn,
41105
41129
  minimumColumnWidth,
41106
- maxColLimit
41130
+ maxColLimit,
41131
+ disableDeleteOption,
41132
+ contextMenu
41107
41133
  }) => {
41108
41134
  const dispatch = useDispatch();
41109
41135
  const minColumnWidth = minimumColumnWidth;
@@ -41117,7 +41143,7 @@ const ColumnIndicator = ({
41117
41143
  label: 'Add Column Left',
41118
41144
  value: 'Add Column Left',
41119
41145
  iconName: 'plus_icon',
41120
- action: addColumnLeft,
41146
+ action: () => addColumnLeft(),
41121
41147
  disableTooltip: 'Column limit reached',
41122
41148
  visible: cell?.contextDisable?.['Add Column Left'] ?? false,
41123
41149
  disable: columnCount >= maxColLimit
@@ -41125,19 +41151,19 @@ const ColumnIndicator = ({
41125
41151
  label: 'Add Column Right',
41126
41152
  value: 'Add Column Right',
41127
41153
  iconName: 'plus_icon',
41128
- action: addColumnRight,
41154
+ action: () => addColumnRight(),
41129
41155
  disableTooltip: 'Column limit reached',
41130
41156
  visible: cell?.contextDisable?.['Add Column Right'] ?? false,
41131
41157
  disable: columnCount >= maxColLimit
41132
- }, {
41158
+ }, ...(!disableDeleteOption ? [{
41133
41159
  label: 'Delete Column',
41134
41160
  value: 'Delete Column',
41135
41161
  iconName: 'delete',
41136
- action: deleteColumn,
41137
- disableTooltip: 'Column limit reached',
41162
+ action: () => deleteColumn(),
41163
+ disableTooltip: '',
41138
41164
  visible: cell?.contextDisable?.['Delete Column'] ?? false,
41139
41165
  disable: false
41140
- }];
41166
+ }] : [])];
41141
41167
  }, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn]);
41142
41168
  const onMouseDrag = React__namespace.useCallback((event, isRight) => {
41143
41169
  const getTargetColumn = isRight ? column - 1 : column;
@@ -41167,17 +41193,19 @@ const ColumnIndicator = ({
41167
41193
  onSelect(column, event.shiftKey);
41168
41194
  setContextMenu({
41169
41195
  open: columnContextEnable,
41196
+ contextType: 'column',
41170
41197
  options
41171
41198
  });
41172
41199
  }, [column, selectedColumn, columnContextEnable, options]);
41173
41200
  React__namespace.useEffect(() => {
41174
- if (selectedColumn !== undefined) {
41201
+ if (selectedColumn !== undefined && contextMenu?.contextType === 'column' || !contextMenu?.contextType) {
41175
41202
  setContextMenu(prev => ({
41176
41203
  open: prev.open,
41204
+ contextType: 'column',
41177
41205
  options
41178
41206
  }));
41179
41207
  }
41180
- }, [column, selectedColumn, columnContextEnable, options]);
41208
+ }, [column, selectedColumn, columnContextEnable, options, contextMenu?.contextType]);
41181
41209
  return jsxRuntime.jsxs("th", {
41182
41210
  className: classNames('ff-spreadsheet-header', {
41183
41211
  'ff-spreadsheet-header--selected': selected
@@ -41249,7 +41277,9 @@ const RowIndicator = ({
41249
41277
  rowContextEnable,
41250
41278
  selectedRow,
41251
41279
  cell,
41252
- maxRowLimit
41280
+ maxRowLimit,
41281
+ disableDeleteOption,
41282
+ contextMenu
41253
41283
  }) => {
41254
41284
  const dispatch = useDispatch();
41255
41285
  const rowHeight = useSelector(state => state.rowDimensions[row]?.height || 32);
@@ -41262,7 +41292,7 @@ const RowIndicator = ({
41262
41292
  label: 'Add Row Top',
41263
41293
  value: 'Add Row Top',
41264
41294
  iconName: 'plus_icon',
41265
- action: addRowTop,
41295
+ action: () => addRowTop(),
41266
41296
  disableTooltip: 'Row limit reached',
41267
41297
  visible: cell?.contextDisable?.['Add Row Top'] ?? false,
41268
41298
  disable: rowCount >= maxRowLimit
@@ -41270,20 +41300,20 @@ const RowIndicator = ({
41270
41300
  label: 'Add Row Bottom',
41271
41301
  value: 'Add Row Bottom',
41272
41302
  iconName: 'plus_icon',
41273
- action: addRowBottom,
41303
+ action: () => addRowBottom(),
41274
41304
  disableTooltip: 'Row limit reached',
41275
41305
  visible: cell?.contextDisable?.['Add Row Bottom'] ?? false,
41276
41306
  disable: rowCount >= maxRowLimit
41277
- }, {
41307
+ }, ...(!disableDeleteOption ? [{
41278
41308
  label: 'Delete Row',
41279
41309
  value: 'Delete Row',
41280
41310
  iconName: 'delete',
41281
- action: deleteRow,
41282
- disableTooltip: 'Row limit reached',
41311
+ action: () => deleteRow(),
41312
+ disableTooltip: '',
41283
41313
  visible: cell?.contextDisable?.['Delete Row'] ?? false,
41284
41314
  disable: false
41285
- }];
41286
- }, [selectedRow]);
41315
+ }] : [])];
41316
+ }, [selectedRow, row]);
41287
41317
  const handleMouseDrag = React__namespace.useCallback((event, isUp) => {
41288
41318
  const getTargetRow = isUp ? row : row - 1;
41289
41319
  const targetRow = Math.max(getTargetRow, 0);
@@ -41312,17 +41342,19 @@ const RowIndicator = ({
41312
41342
  onSelect(row, event.shiftKey);
41313
41343
  setContextMenu({
41314
41344
  open: rowContextEnable,
41345
+ contextType: 'row',
41315
41346
  options
41316
41347
  });
41317
41348
  }, [row, rowContextEnable, options, selectedRow]);
41318
41349
  React__namespace.useEffect(() => {
41319
- if (selectedRow !== undefined) {
41350
+ if (selectedRow !== undefined && contextMenu?.contextType === 'row' || !contextMenu?.contextType) {
41320
41351
  setContextMenu(prev => ({
41321
41352
  open: prev.open,
41353
+ contextType: 'row',
41322
41354
  options
41323
41355
  }));
41324
41356
  }
41325
- }, [row, rowContextEnable, options, selectedRow]);
41357
+ }, [row, rowContextEnable, options, selectedRow, contextMenu?.contextType]);
41326
41358
  return jsxRuntime.jsxs("th", {
41327
41359
  className: classNames('ff-spreadsheet-header', {
41328
41360
  'ff-spreadsheet-header--selected': selected
@@ -41953,6 +41985,7 @@ const ActiveCell = props => {
41953
41985
  event.preventDefault();
41954
41986
  props.setContextMenu({
41955
41987
  open: props.contextOption?.open ?? false,
41988
+ contextType: props.contextOption?.contextType ?? null,
41956
41989
  options: props.contextOption?.options || []
41957
41990
  });
41958
41991
  }, [props]);
@@ -42623,7 +42656,9 @@ const Spreadsheet = props => {
42623
42656
  setContextMenu,
42624
42657
  showHider,
42625
42658
  maxRowLimit,
42626
- maxColLimit
42659
+ maxColLimit,
42660
+ disableDeleteOption,
42661
+ contextMenu
42627
42662
  } = props;
42628
42663
  const [sheetChange, setSheetChange] = React__namespace.useState(false);
42629
42664
  const [maxWidth, setMaxWidth] = React__namespace.useState(0);
@@ -42920,6 +42955,7 @@ const Spreadsheet = props => {
42920
42955
  });
42921
42956
  setContextMenu({
42922
42957
  open: false,
42958
+ contextType: null,
42923
42959
  options: [{
42924
42960
  label: '',
42925
42961
  value: '',
@@ -42952,7 +42988,9 @@ const Spreadsheet = props => {
42952
42988
  addColumnLeft: addColumnLeft$1,
42953
42989
  addColumnRight: addColumnRight$1,
42954
42990
  columnContextEnable: props.columnContextEnable,
42955
- maxColLimit: maxColLimit
42991
+ maxColLimit: maxColLimit,
42992
+ disableDeleteOption: disableDeleteOption,
42993
+ contextMenu: contextMenu
42956
42994
  }, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
42957
42995
  column: columnNumber,
42958
42996
  minimumColumnWidth: minimumColumnWidth,
@@ -42961,7 +42999,9 @@ const Spreadsheet = props => {
42961
42999
  addColumnLeft: addColumnLeft$1,
42962
43000
  addColumnRight: addColumnRight$1,
42963
43001
  columnContextEnable: props.columnContextEnable,
42964
- maxColLimit: maxColLimit
43002
+ maxColLimit: maxColLimit,
43003
+ disableDeleteOption: disableDeleteOption,
43004
+ contextMenu: contextMenu
42965
43005
  }, columnNumber))]
42966
43006
  }), renderReady && scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
42967
43007
  row: rowNumber,
@@ -42973,7 +43013,9 @@ const Spreadsheet = props => {
42973
43013
  deleteRow: deleteRow$1,
42974
43014
  setContextMenu: props.setContextMenu,
42975
43015
  rowContextEnable: props.rowContextEnable,
42976
- maxRowLimit: maxRowLimit
43016
+ maxRowLimit: maxRowLimit,
43017
+ disableDeleteOption: disableDeleteOption,
43018
+ contextMenu: contextMenu
42977
43019
  }, rowNumber) : jsxRuntime.jsx(RowIndicator$1, {
42978
43020
  row: rowNumber,
42979
43021
  addRowTop: addRowTop$1,
@@ -42981,7 +43023,9 @@ const Spreadsheet = props => {
42981
43023
  deleteRow: deleteRow$1,
42982
43024
  setContextMenu: props.setContextMenu,
42983
43025
  rowContextEnable: props.rowContextEnable,
42984
- maxRowLimit: maxRowLimit
43026
+ maxRowLimit: maxRowLimit,
43027
+ disableDeleteOption: disableDeleteOption,
43028
+ contextMenu: contextMenu
42985
43029
  }, rowNumber), range(size.columns).map(columnNumber => jsxRuntime.jsx(Cell$1, {
42986
43030
  row: rowNumber,
42987
43031
  column: columnNumber,
@@ -43045,6 +43089,7 @@ const Spreadsheet = props => {
43045
43089
  scrollOption && throttledHandleScroll(e);
43046
43090
  setContextMenu({
43047
43091
  open: false,
43092
+ contextType: null,
43048
43093
  options: [{
43049
43094
  label: '',
43050
43095
  value: '',
@@ -43068,15 +43113,12 @@ const Spreadsheet = props => {
43068
43113
  const ExcelContextMenu = ({
43069
43114
  contextMenu,
43070
43115
  position,
43071
- editable,
43072
- disableDeleteOption
43116
+ editable
43073
43117
  }) => {
43118
+ if (!contextMenu.open) return null;
43074
43119
  const checkDelete = label => {
43075
43120
  return label.includes('Delete');
43076
43121
  };
43077
- const isOptionDisabled = option => {
43078
- return option.disable || checkDelete(option.label) && disableDeleteOption;
43079
- };
43080
43122
  return editable && jsxRuntime.jsx("div", {
43081
43123
  onContextMenu: event => {
43082
43124
  event.preventDefault();
@@ -43091,7 +43133,7 @@ const ExcelContextMenu = ({
43091
43133
  },
43092
43134
  children: contextMenu.options.map(option => {
43093
43135
  if (!option.visible) {
43094
- const disabled = isOptionDisabled(option);
43136
+ const disabled = option.disable;
43095
43137
  return jsxRuntime.jsx(Tooltip, {
43096
43138
  title: disabled ? option.disableTooltip : '',
43097
43139
  children: jsxRuntime.jsxs("div", {
@@ -43171,6 +43213,7 @@ const ExcelFile = ({
43171
43213
  const [saveInfo, setSaveInfo] = React.useState('');
43172
43214
  const [contextMenu, setContextMenu] = React.useState({
43173
43215
  open: false,
43216
+ contextType: null,
43174
43217
  options: [{
43175
43218
  label: '',
43176
43219
  value: '',
@@ -43483,28 +43526,34 @@ const ExcelFile = ({
43483
43526
  selection?.removeAllRanges();
43484
43527
  selection?.addRange(range);
43485
43528
  };
43486
- const handleClickOutside = React.useCallback(event => {
43487
- if (contextMenu.open) {
43488
- event.preventDefault();
43489
- event.stopPropagation();
43490
- setContextMenu({
43491
- open: false,
43492
- options: [{
43493
- label: '',
43494
- value: '',
43495
- iconName: '',
43496
- action: () => {},
43497
- disableTooltip: '',
43498
- visible: false,
43499
- disable: false
43500
- }]
43501
- });
43529
+ const handleClickOutside = React.useCallback((event, isLeftClick = false) => {
43530
+ const target = event.target;
43531
+ if (!(target.closest('.ff-excel-tab-list') || target.closest('.ff-excel-sheet')) || isLeftClick) {
43532
+ if (contextMenu.open) {
43533
+ event.preventDefault();
43534
+ event.stopPropagation();
43535
+ setContextMenu({
43536
+ open: false,
43537
+ contextType: null,
43538
+ options: [{
43539
+ label: '',
43540
+ value: '',
43541
+ iconName: '',
43542
+ action: () => {},
43543
+ disableTooltip: '',
43544
+ visible: false,
43545
+ disable: false
43546
+ }]
43547
+ });
43548
+ }
43502
43549
  }
43503
43550
  }, [contextMenu.open]);
43504
43551
  React.useEffect(() => {
43505
- document.addEventListener('click', handleClickOutside);
43552
+ document.addEventListener('contextmenu', handleClickOutside);
43553
+ document.addEventListener('click', e => handleClickOutside(e, true));
43506
43554
  return () => {
43507
- document.removeEventListener('click', handleClickOutside);
43555
+ document.removeEventListener('contextmenu', handleClickOutside);
43556
+ document.addEventListener('click', e => handleClickOutside(e, true));
43508
43557
  };
43509
43558
  }, [handleClickOutside]);
43510
43559
  const contextClick = (event, name, index) => {
@@ -43513,27 +43562,24 @@ const ExcelFile = ({
43513
43562
  label: 'Add Sheet',
43514
43563
  value: 'Add Sheet',
43515
43564
  iconName: 'plus_icon',
43516
- action: () => {
43517
- handleAddSheet();
43518
- },
43565
+ action: () => handleAddSheet(),
43519
43566
  disableTooltip: 'Sheet limit reached',
43520
43567
  visible: false,
43521
43568
  disable: addSheetIconDisable()
43522
- }, {
43569
+ }, ...(!disableDeleteOption ? [{
43523
43570
  label: 'Delete Sheet',
43524
43571
  value: 'Delete Sheet',
43525
43572
  iconName: 'delete',
43526
- action: () => {
43527
- handleDeleteSheet(name, index);
43528
- },
43573
+ action: () => handleDeleteSheet(name, index),
43529
43574
  disableTooltip: '',
43530
43575
  visible: false,
43531
43576
  disable: false
43532
- }];
43577
+ }] : [])];
43533
43578
  setContextMenu(prev => ({
43534
43579
  ...prev,
43535
43580
  open: true,
43536
- options: options
43581
+ contextType: 'sheet',
43582
+ options
43537
43583
  }));
43538
43584
  };
43539
43585
  const setContextPosition = event => {
@@ -43566,7 +43612,7 @@ const ExcelFile = ({
43566
43612
  if (event.target.classList.contains('ff-excel-tab-list')) {
43567
43613
  setPosition({
43568
43614
  x: sheetRefX,
43569
- y: sheetRefY - 65
43615
+ y: sheetRefY - (disableDeleteOption ? 32 : 65)
43570
43616
  });
43571
43617
  return;
43572
43618
  }
@@ -43587,6 +43633,7 @@ const ExcelFile = ({
43587
43633
  if (contextMenu.open) {
43588
43634
  setContextMenu({
43589
43635
  open: false,
43636
+ contextType: null,
43590
43637
  options: [{
43591
43638
  label: '',
43592
43639
  value: '',
@@ -43624,7 +43671,9 @@ const ExcelFile = ({
43624
43671
  scroller: scroller,
43625
43672
  showHider: showHider,
43626
43673
  maxRowLimit: maxRowLimit,
43627
- maxColLimit: maxColLimit
43674
+ maxColLimit: maxColLimit,
43675
+ disableDeleteOption: disableDeleteOption,
43676
+ contextMenu: contextMenu
43628
43677
  })
43629
43678
  }), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
43630
43679
  className: "ff-excel-sheet-bar",
@@ -43686,8 +43735,7 @@ const ExcelFile = ({
43686
43735
  }), contextMenu.open && jsxRuntime.jsx(ExcelContextMenu, {
43687
43736
  contextMenu: contextMenu,
43688
43737
  position: position,
43689
- editable: editable,
43690
- disableDeleteOption: disableDeleteOption
43738
+ editable: editable
43691
43739
  }), jsxRuntime.jsx(Toastify, {})]
43692
43740
  })
43693
43741
  });
@@ -65332,7 +65380,7 @@ const Comments = ({
65332
65380
  if (mentionNameMatch) {
65333
65381
  const mentionNameStart = textBeforeCaret.lastIndexOf(mentionNameMatch[1] ?? '');
65334
65382
  const remainingText = input.slice(caretPosition);
65335
- const mentionedUserName = `@${name.replace(/\s+/g, '')} `;
65383
+ const mentionedUserName = `@${name} `;
65336
65384
  const newText = input.slice(0, mentionNameStart) + mentionedUserName + remainingText;
65337
65385
  setInput(newText);
65338
65386
  setHasAtSymbol(false);