abdul-react 0.0.28 → 0.0.30
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/lib/ComponentProps/TreeNodeProps.d.ts +1 -0
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/assets/icons/access_key.svg.js +6 -0
- package/lib/assets/icons/access_key.svg.js.map +1 -0
- package/lib/assets/icons/jSON_code_icon.svg.js +6 -0
- package/lib/assets/icons/jSON_code_icon.svg.js.map +1 -0
- package/lib/assets/icons/list_icon.svg.js +6 -0
- package/lib/assets/icons/list_icon.svg.js.map +1 -0
- package/lib/components/AppHeader/AppHeader.js +9 -6
- package/lib/components/AppHeader/AppHeader.js.map +1 -1
- package/lib/components/ChatModalAi/ChatModalAi.js +7 -2
- package/lib/components/ChatModalAi/ChatModalAi.js.map +1 -1
- package/lib/components/ChatModalAi/types.d.ts +1 -0
- package/lib/components/DatePicker/DatePicker.js +20 -3
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/DatePicker/types.d.ts +5 -1
- package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +7 -4
- package/lib/components/Excel/ExcelFile/ExcelFile.js +107 -4
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js +8 -4
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js +25 -6
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Copied.d.ts +9 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Copied.js +26 -7
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Copied.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js +14 -6
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Selected.d.ts +4 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Selected.js +15 -20
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Selected.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +5 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +74 -32
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js +23 -19
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.js +3 -3
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +14 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.d.ts +1 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.js +33 -44
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.js.map +1 -1
- package/lib/components/Icon/iconList.js +6 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/MobileSkin/MobileSkin.js +22 -2
- package/lib/components/MobileSkin/MobileSkin.js.map +1 -1
- package/lib/components/MobileSkin/MobileSkinInterface.d.ts +1 -1
- package/lib/components/Prompt/Prompt.js +4 -2
- package/lib/components/Prompt/Prompt.js.map +1 -1
- package/lib/components/Prompt/types.d.ts +1 -0
- package/lib/components/PromptContainer/PromptContainer.js +4 -2
- package/lib/components/PromptContainer/PromptContainer.js.map +1 -1
- package/lib/components/PromptContainer/types.d.ts +1 -0
- package/lib/components/SequentialConnectingBranch/components/Branches/Branches.js +1 -1
- package/lib/components/SequentialConnectingBranch/components/Branches/Branches.js.map +1 -1
- package/lib/components/TableTreeFn/Components/TableHead.js +12 -1
- package/lib/components/TableTreeFn/Components/TableHead.js.map +1 -1
- package/lib/index.cjs +411 -160
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +17 -6
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1118,6 +1118,12 @@ const SvgPromptSlider = (props) => /* @__PURE__ */ React__namespace.createElemen
|
|
|
1118
1118
|
|
|
1119
1119
|
const SvgSendPrompt = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M6.2121 17.0818L1.79324 14.7317C0.415403 13.9989 0.398933 12.0304 1.76432 11.2747L20.3297 0.99879C21.7646 0.204609 23.4845 1.41198 23.2242 3.03154L20.2405 21.5944C20.0264 22.9262 18.5657 23.652 17.3749 23.0186L13.2778 20.8396L12.026 22.0913C10.9194 23.1977 9.02629 22.6316 8.70919 21.0991L8.10664 18.1872L14.625 10.125L6.2121 17.0818Z", fill: "url(#paint0_linear_536_25608)" }), /* @__PURE__ */ React__namespace.createElement("defs", null, /* @__PURE__ */ React__namespace.createElement("linearGradient", { id: "paint0_linear_536_25608", x1: 29.4923, y1: 27.7972, x2: 9.5325, y2: 4.44898, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ React__namespace.createElement("stop", { offset: 265844e-8, stopColor: "#FF37DF" }), /* @__PURE__ */ React__namespace.createElement("stop", { offset: 1, stopColor: "#6E00FF" }))));
|
|
1120
1120
|
|
|
1121
|
+
const SvgAccessKey = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("g", { clipPath: "url(#clip0_3902_42568)" }, /* @__PURE__ */ React__namespace.createElement("g", { clipPath: "url(#clip1_3902_42568)" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M18.459 5.54089C17.5953 4.67748 16.4581 4.14136 15.2425 4.02443C14.0268 3.9075 12.8084 4.21704 11.7959 4.89999C10.7835 5.58295 10.0401 6.59679 9.6932 7.76775C9.34631 8.93871 9.4175 10.1939 9.89458 11.3181C7.90552 13.0585 6.03051 14.925 4.28114 16.9062C4.07802 17.1353 3.98021 17.4531 4.00333 17.7771C4.03854 18.2732 4.06489 18.7599 4.08239 19.2371C4.0869 19.4162 4.16006 19.5867 4.28674 19.7134C4.41342 19.8401 4.58393 19.9133 4.76302 19.9178C5.23927 19.934 5.72677 19.9615 6.22271 19.9965C6.54677 20.0196 6.86458 19.9215 7.09489 19.7181C7.20448 19.6212 7.31375 19.524 7.42271 19.4265C7.50553 19.3526 7.559 19.2513 7.57333 19.1412C7.60979 18.8725 7.64385 18.601 7.67552 18.3268C7.72396 17.9081 8.10364 17.6346 8.54521 17.7153C9.35552 17.8646 9.99302 17.2434 9.84677 16.434V16.4278C9.76802 15.9865 10.0446 15.609 10.469 15.5671C10.7427 15.5399 11.0149 15.5111 11.2855 15.4809C11.3974 15.4692 11.5013 15.4172 11.5777 15.3346C11.9515 14.9303 12.3198 14.5207 12.6827 14.1059C13.807 14.5828 15.0621 14.6539 16.2331 14.3069C17.404 13.9599 18.4177 13.2164 19.1006 12.2039C19.7834 11.1913 20.0928 9.97284 19.9758 8.75721C19.8587 7.54157 19.3225 6.4045 18.459 5.54089ZM17.0936 8.96433C16.8901 9.16775 16.6309 9.30627 16.3486 9.36236C16.0664 9.41845 15.7739 9.3896 15.5081 9.27945C15.2422 9.16931 15.015 8.98282 14.8552 8.74356C14.6953 8.5043 14.61 8.22301 14.61 7.93527C14.61 7.64752 14.6953 7.36624 14.8552 7.12698C15.015 6.88772 15.2422 6.70123 15.5081 6.59108C15.7739 6.48094 16.0664 6.45209 16.3486 6.50818C16.6309 6.56427 16.8901 6.70278 17.0936 6.90621C17.2288 7.04132 17.336 7.20175 17.4092 7.37832C17.4824 7.55489 17.52 7.74414 17.52 7.93527C17.52 8.1264 17.4824 8.31565 17.4092 8.49222C17.336 8.66879 17.2288 8.82921 17.0936 8.96433Z", fill: "#71347B" }))), /* @__PURE__ */ React__namespace.createElement("defs", null, /* @__PURE__ */ React__namespace.createElement("clipPath", { id: "clip0_3902_42568" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z", fill: "white" })), /* @__PURE__ */ React__namespace.createElement("clipPath", { id: "clip1_3902_42568" }, /* @__PURE__ */ React__namespace.createElement("rect", { width: 16, height: 16, fill: "white", transform: "translate(4 4)" }))));
|
|
1122
|
+
|
|
1123
|
+
const SvgListIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M12.8605 13.3488H1.13953C0.837424 13.3485 0.547792 13.2283 0.334167 13.0147C0.120543 12.801 0.000367042 12.5114 0 12.2093V1.79069C0.000367042 1.48858 0.120543 1.19895 0.334167 0.985321C0.547792 0.771696 0.837424 0.651521 1.13953 0.651154H12.8605C13.1626 0.651521 13.4522 0.771696 13.6658 0.985321C13.8795 1.19895 13.9996 1.48858 14 1.79069V12.2093C13.9996 12.5114 13.8795 12.801 13.6658 13.0147C13.4522 13.2283 13.1626 13.3485 12.8605 13.3488ZM1.13953 1.6279C1.09639 1.62798 1.05503 1.64516 1.02452 1.67567C0.994005 1.70618 0.976827 1.74754 0.976744 1.79069V12.2093C0.976827 12.2524 0.994005 12.2938 1.02452 12.3243C1.05503 12.3548 1.09639 12.372 1.13953 12.3721H12.8605C12.9036 12.372 12.945 12.3548 12.9755 12.3243C13.006 12.2938 13.0232 12.2524 13.0233 12.2093V1.79069C13.0232 1.74754 13.006 1.70618 12.9755 1.67567C12.945 1.64516 12.9036 1.62798 12.8605 1.6279H1.13953Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M10.9065 10.0931H5.04599C4.91646 10.0931 4.79225 10.0416 4.70066 9.95005C4.60907 9.85846 4.55762 9.73424 4.55762 9.60472C4.55762 9.4752 4.60907 9.35098 4.70066 9.25939C4.79225 9.1678 4.91646 9.11635 5.04599 9.11635H10.9065C11.036 9.11635 11.1602 9.1678 11.2518 9.25939C11.3434 9.35098 11.3948 9.4752 11.3948 9.60472C11.3948 9.73424 11.3434 9.85846 11.2518 9.95005C11.1602 10.0416 11.036 10.0931 10.9065 10.0931Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M3.09257 10.2558C3.4522 10.2558 3.74373 9.96427 3.74373 9.60464C3.74373 9.24501 3.4522 8.95348 3.09257 8.95348C2.73294 8.95348 2.44141 9.24501 2.44141 9.60464C2.44141 9.96427 2.73294 10.2558 3.09257 10.2558Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M10.9065 7.48836H5.04599C4.91646 7.48836 4.79225 7.4369 4.70066 7.34532C4.60907 7.25373 4.55762 7.12951 4.55762 6.99998C4.55762 6.87046 4.60907 6.74624 4.70066 6.65465C4.79225 6.56307 4.91646 6.51161 5.04599 6.51161H10.9065C11.036 6.51161 11.1602 6.56307 11.2518 6.65465C11.3434 6.74624 11.3948 6.87046 11.3948 6.99998C11.3948 7.12951 11.3434 7.25373 11.2518 7.34532C11.1602 7.4369 11.036 7.48836 10.9065 7.48836Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M3.09257 7.65108C3.4522 7.65108 3.74373 7.35954 3.74373 6.99992C3.74373 6.64029 3.4522 6.34875 3.09257 6.34875C2.73294 6.34875 2.44141 6.64029 2.44141 6.99992C2.44141 7.35954 2.73294 7.65108 3.09257 7.65108Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M10.9065 4.88364H5.04599C4.91646 4.88364 4.79225 4.83218 4.70066 4.74059C4.60907 4.64901 4.55762 4.52479 4.55762 4.39526C4.55762 4.26574 4.60907 4.14152 4.70066 4.04993C4.79225 3.95834 4.91646 3.90689 5.04599 3.90689H10.9065C11.036 3.90689 11.1602 3.95834 11.2518 4.04993C11.3434 4.14152 11.3948 4.26574 11.3948 4.39526C11.3948 4.52479 11.3434 4.64901 11.2518 4.74059C11.1602 4.83218 11.036 4.88364 10.9065 4.88364Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M3.09257 5.04659C3.4522 5.04659 3.74373 4.75505 3.74373 4.39543C3.74373 4.0358 3.4522 3.74426 3.09257 3.74426C2.73294 3.74426 2.44141 4.0358 2.44141 4.39543C2.44141 4.75505 2.73294 5.04659 3.09257 5.04659Z", fill: "currentColor" }));
|
|
1124
|
+
|
|
1125
|
+
const SvgJSonCodeIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M10.4186 4.88372V9.40692C10.4522 9.4299 10.48 9.45998 10.5124 9.48442C10.6811 9.25574 10.9217 9.08075 11.2103 9.00086C11.2718 8.98377 11.3335 8.98473 11.3953 8.97686V4.28374C11.3953 3.80523 11.209 3.35565 10.8707 3.01735L8.378 0.524616C8.03971 0.186317 7.59012 0 7.11192 0H1.7907C0.803144 0 0 0.803145 0 1.7907V11.0168C0.207584 10.9284 0.435791 10.8862 0.670242 10.9194C0.554511 10.7251 0.488372 10.4981 0.488372 10.2558C0.488372 9.84634 0.681247 9.48555 0.976744 9.24676V1.79069C0.976744 1.34175 1.34175 0.976738 1.7907 0.976738H6.51163V3.09302C6.51163 4.08057 7.31477 4.88372 8.30233 4.88372H10.4186ZM7.48837 3.09302V1.08249C7.55911 1.12005 7.63038 1.15805 7.68741 1.2152L10.1801 3.70793C10.2381 3.76592 10.276 3.83662 10.3135 3.90697H8.30232C7.85338 3.90697 7.48837 3.54196 7.48837 3.09302ZM4.88372 11.0698C4.88372 11.2462 4.99564 11.3953 5.12791 11.3953H5.61628C6.2897 11.3953 6.83721 11.9794 6.83721 12.6977C6.83721 13.4159 6.2897 14 5.61628 14H4.39535C4.12573 14 3.90698 13.7812 3.90698 13.5116C3.90698 13.242 4.12573 13.0233 4.39535 13.0233H5.61628C5.74854 13.0233 5.86047 12.8741 5.86047 12.6977C5.86047 12.5212 5.74854 12.3721 5.61628 12.3721H5.12791C4.45449 12.3721 3.90698 11.788 3.90698 11.0698C3.90698 10.3515 4.45449 9.76744 5.12791 9.76744H6.34884C6.61846 9.76744 6.83721 9.98619 6.83721 10.2558C6.83721 10.5254 6.61846 10.7442 6.34884 10.7442H5.12791C4.99564 10.7442 4.88372 10.8933 4.88372 11.0698ZM8.95349 9.76744C7.96594 9.76744 7.16279 10.5706 7.16279 11.5581V12.2093C7.16279 13.1969 7.96594 14 8.95349 14C9.94104 14 10.7442 13.1969 10.7442 12.2093V11.5581C10.7442 10.5706 9.94104 9.76744 8.95349 9.76744ZM9.76744 12.2093C9.76744 12.6582 9.40243 13.0233 8.95349 13.0233C8.50454 13.0233 8.13953 12.6582 8.13953 12.2093V11.5581C8.13953 11.1092 8.50454 10.7442 8.95349 10.7442C9.40243 10.7442 9.76744 11.1092 9.76744 11.5581V12.2093ZM14 10.2558V13.5116C14 13.731 13.8537 13.9237 13.642 13.9822C13.5987 13.9943 13.5549 14 13.5116 14C13.3431 14 13.1829 13.9126 13.0926 13.7628L12.0465 12.0188V13.5116C12.0465 13.7812 11.8278 14 11.5581 14C11.2885 14 11.0698 13.7812 11.0698 13.5116V10.2558C11.0698 10.0364 11.216 9.84375 11.4278 9.78524C11.6402 9.72642 11.864 9.8164 11.9772 10.0046L13.0233 11.7486V10.2558C13.0233 9.98619 13.242 9.76743 13.5116 9.76743C13.7812 9.76743 14 9.98619 14 10.2558ZM3.5814 10.2558V12.2093C3.5814 13.1969 2.77825 14 1.7907 14C0.803144 14 0 13.1969 0 12.2093C0 11.9397 0.218752 11.7209 0.488372 11.7209C0.757993 11.7209 0.976744 11.9397 0.976744 12.2093C0.976744 12.6582 1.34175 13.0233 1.7907 13.0233C2.23964 13.0233 2.60465 12.6582 2.60465 12.2093V10.7442H1.7907C1.52108 10.7442 1.30233 10.5254 1.30233 10.2558C1.30233 9.98619 1.52108 9.76744 1.7907 9.76744H3.09302C3.36264 9.76744 3.5814 9.98619 3.5814 10.2558Z", fill: "currentColor" }));
|
|
1126
|
+
|
|
1121
1127
|
let Components = {};
|
|
1122
1128
|
Components['success'] = SvgSuccess;
|
|
1123
1129
|
Components['setting_icon'] = SvgSettingIcon;
|
|
@@ -1598,6 +1604,9 @@ Components['prompt_slider'] = SvgPromptSlider; // Newly Added icon
|
|
|
1598
1604
|
Components['send_prompt'] = SvgSendPrompt; // Newly Added icon
|
|
1599
1605
|
Components['copy_icon_filled'] = SvgCopyIconFilled; // Newly Added icon
|
|
1600
1606
|
Components['generate_command_logo'] = SvgGenerateCommandLogo; // Newly Added icon
|
|
1607
|
+
Components[`access_key`] = SvgAccessKey; // Newly Added icon
|
|
1608
|
+
Components['list_icon'] = SvgListIcon;
|
|
1609
|
+
Components['json_icon'] = SvgJSonCodeIcon;
|
|
1601
1610
|
|
|
1602
1611
|
const Icon = /*#__PURE__*/React.forwardRef(({
|
|
1603
1612
|
name,
|
|
@@ -29125,7 +29134,8 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
29125
29134
|
zIndex = 10,
|
|
29126
29135
|
isFilterDatePicker = false,
|
|
29127
29136
|
isSelectableDate = false,
|
|
29128
|
-
onBlur
|
|
29137
|
+
onBlur,
|
|
29138
|
+
withOutDateFormat = false
|
|
29129
29139
|
}, ref) => {
|
|
29130
29140
|
const [timeValue, setTimeValue] = React.useState('');
|
|
29131
29141
|
const [selectedDate, setSelectedDate] = React.useState();
|
|
@@ -29213,7 +29223,14 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
29213
29223
|
if (dateOnly) {
|
|
29214
29224
|
if (!isSelectableDate || date) {
|
|
29215
29225
|
setSelectedDate(date);
|
|
29216
|
-
|
|
29226
|
+
if (withOutDateFormat && date) {
|
|
29227
|
+
const formatted = format$2(date, dateFormat, {
|
|
29228
|
+
timeZone: timezone
|
|
29229
|
+
});
|
|
29230
|
+
onChange(date, formatted);
|
|
29231
|
+
} else {
|
|
29232
|
+
onChange(date);
|
|
29233
|
+
}
|
|
29217
29234
|
}
|
|
29218
29235
|
resetAndCloseDatePicker();
|
|
29219
29236
|
} else {
|
|
@@ -29231,7 +29248,16 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
29231
29248
|
}
|
|
29232
29249
|
};
|
|
29233
29250
|
const handleSave = () => {
|
|
29234
|
-
|
|
29251
|
+
if (selectedDateRef.current) {
|
|
29252
|
+
if (withOutDateFormat) {
|
|
29253
|
+
const formatted = format$2(selectedDateRef.current, dateFormat, {
|
|
29254
|
+
timeZone: timezone
|
|
29255
|
+
});
|
|
29256
|
+
onChange(selectedDateRef.current, formatted);
|
|
29257
|
+
} else {
|
|
29258
|
+
onChange(selectedDateRef.current);
|
|
29259
|
+
}
|
|
29260
|
+
}
|
|
29235
29261
|
resetAndCloseDatePicker();
|
|
29236
29262
|
};
|
|
29237
29263
|
const handleDateInputClick = () => {
|
|
@@ -30716,12 +30742,15 @@ const AppHeader = ({
|
|
|
30716
30742
|
borderStartStartRadius: borderRadius,
|
|
30717
30743
|
borderStartEndRadius: borderRadius
|
|
30718
30744
|
},
|
|
30719
|
-
children: [jsxRuntime.
|
|
30720
|
-
className: "ff-app-header-
|
|
30721
|
-
children:
|
|
30722
|
-
|
|
30723
|
-
|
|
30724
|
-
|
|
30745
|
+
children: [jsxRuntime.jsxs("div", {
|
|
30746
|
+
className: "ff-app-header-left-container",
|
|
30747
|
+
children: [jsxRuntime.jsx("div", {
|
|
30748
|
+
className: "ff-app-header-logo-icon",
|
|
30749
|
+
children: logo
|
|
30750
|
+
}), leftContent && jsxRuntime.jsx("div", {
|
|
30751
|
+
className: "ff-app-header-left-content",
|
|
30752
|
+
children: leftContent
|
|
30753
|
+
})]
|
|
30725
30754
|
}), jsxRuntime.jsxs("div", {
|
|
30726
30755
|
className: "ff-app-header-nav-bar",
|
|
30727
30756
|
style: {
|
|
@@ -34926,7 +34955,7 @@ const Branches = ({
|
|
|
34926
34955
|
if (device?.name) {
|
|
34927
34956
|
acc.push({
|
|
34928
34957
|
label: device?.name,
|
|
34929
|
-
type: device?.platform,
|
|
34958
|
+
type: scriptType.toLowerCase() === 'manual' ? 'android' : device?.platform,
|
|
34930
34959
|
version: scriptType?.toLowerCase() === 'manual' ? device?.version : ''
|
|
34931
34960
|
});
|
|
34932
34961
|
}
|
|
@@ -37107,49 +37136,6 @@ function getCellDimensions(point, rowDimensions, columnDimensions) {
|
|
|
37107
37136
|
width
|
|
37108
37137
|
};
|
|
37109
37138
|
}
|
|
37110
|
-
/** Get the dimensions of customized cell at point from state */
|
|
37111
|
-
function getScrollCellDimensions(point, rowDimensions, columnDimensions) {
|
|
37112
|
-
const DEFAULT_ROW_HEIGHT = 32;
|
|
37113
|
-
const DEFAULT_COLUMN_WIDTH = 100; // Use your minimumColumnWidth or a default value
|
|
37114
|
-
const HEADER_HEIGHT = 32; // Adjust as needed
|
|
37115
|
-
const ROW_INDICATOR_WIDTH = 60;
|
|
37116
|
-
let top = HEADER_HEIGHT + 4000; // Preserve your fixed top for scrolling, but add header offset
|
|
37117
|
-
for (let r = 0; r < point.row; r++) {
|
|
37118
|
-
top += (rowDimensions?.[r] ? rowDimensions?.[r]?.height : DEFAULT_ROW_HEIGHT) || DEFAULT_ROW_HEIGHT;
|
|
37119
|
-
}
|
|
37120
|
-
const height = (rowDimensions?.[point.row] ? rowDimensions?.[point.row]?.height : DEFAULT_ROW_HEIGHT) || DEFAULT_ROW_HEIGHT;
|
|
37121
|
-
let left = ROW_INDICATOR_WIDTH;
|
|
37122
|
-
for (let c = 0; c < point.column; c++) {
|
|
37123
|
-
left += (columnDimensions?.[c] ? columnDimensions?.[c]?.width : DEFAULT_COLUMN_WIDTH) || DEFAULT_COLUMN_WIDTH;
|
|
37124
|
-
}
|
|
37125
|
-
const width = (columnDimensions?.[point.column] ? columnDimensions?.[point.column]?.width : DEFAULT_COLUMN_WIDTH) || DEFAULT_COLUMN_WIDTH;
|
|
37126
|
-
return {
|
|
37127
|
-
top,
|
|
37128
|
-
height,
|
|
37129
|
-
left,
|
|
37130
|
-
width
|
|
37131
|
-
};
|
|
37132
|
-
}
|
|
37133
|
-
/** Get the dimensions of a range of cells */
|
|
37134
|
-
function getRangeDimensions(rowDimensions, columnDimensions, range) {
|
|
37135
|
-
const startDimensions = getCellDimensions(range.start, rowDimensions, columnDimensions);
|
|
37136
|
-
let endDimensions = getCellDimensions(range.end, rowDimensions, columnDimensions);
|
|
37137
|
-
if (endDimensions === undefined) {
|
|
37138
|
-
endDimensions = getScrollCellDimensions(range.end, rowDimensions, columnDimensions);
|
|
37139
|
-
}
|
|
37140
|
-
return startDimensions && endDimensions && {
|
|
37141
|
-
width: endDimensions.left + endDimensions.width - startDimensions.left,
|
|
37142
|
-
height: endDimensions.top + endDimensions.height - startDimensions.top,
|
|
37143
|
-
top: startDimensions.top + 1,
|
|
37144
|
-
// Note: +1 Because of Active cell width is 2px
|
|
37145
|
-
left: startDimensions.left + 1 // Note: +1 Because of Active cell width is 2px
|
|
37146
|
-
};
|
|
37147
|
-
}
|
|
37148
|
-
/** Get the dimensions of selected */
|
|
37149
|
-
function getSelectedDimensions(rowDimensions, columnDimensions, data, selected) {
|
|
37150
|
-
const range = selected.toRange(data);
|
|
37151
|
-
return range ? getRangeDimensions(rowDimensions, columnDimensions, range) : undefined;
|
|
37152
|
-
}
|
|
37153
37139
|
/** Get given data as CSV */
|
|
37154
37140
|
function getCSV(data) {
|
|
37155
37141
|
const valueMatrix = map(cell => cell?.value || '', data);
|
|
@@ -37295,6 +37281,38 @@ function getMatrixDimensions(matrixData) {
|
|
|
37295
37281
|
columnCount
|
|
37296
37282
|
};
|
|
37297
37283
|
}
|
|
37284
|
+
function getVisibleRangeDimensions(fullRange, visibleRange, rowDimensions, columnDimensions) {
|
|
37285
|
+
const DEFAULT_ROW_HEIGHT = 32;
|
|
37286
|
+
const DEFAULT_COLUMN_WIDTH = 100;
|
|
37287
|
+
if (!fullRange) return undefined;
|
|
37288
|
+
const clippedStartRow = Math.max(fullRange?.start?.row, visibleRange?.start);
|
|
37289
|
+
const clippedEndRow = Math.min(fullRange?.end?.row, visibleRange?.end - 1);
|
|
37290
|
+
if (clippedStartRow > clippedEndRow) {
|
|
37291
|
+
return undefined;
|
|
37292
|
+
}
|
|
37293
|
+
let top = 0;
|
|
37294
|
+
for (let r = visibleRange?.start; r < clippedStartRow; r++) {
|
|
37295
|
+
top += rowDimensions?.[r]?.height || DEFAULT_ROW_HEIGHT;
|
|
37296
|
+
}
|
|
37297
|
+
let height = 0;
|
|
37298
|
+
for (let r = clippedStartRow; r <= clippedEndRow; r++) {
|
|
37299
|
+
height += rowDimensions?.[r]?.height || DEFAULT_ROW_HEIGHT;
|
|
37300
|
+
}
|
|
37301
|
+
let left = 0;
|
|
37302
|
+
for (let c = 0; c < fullRange?.start?.column; c++) {
|
|
37303
|
+
left += columnDimensions?.[c]?.width || DEFAULT_COLUMN_WIDTH;
|
|
37304
|
+
}
|
|
37305
|
+
let width = 0;
|
|
37306
|
+
for (let c = fullRange?.start?.column; c <= fullRange?.end?.column; c++) {
|
|
37307
|
+
width += columnDimensions?.[c]?.width || DEFAULT_COLUMN_WIDTH;
|
|
37308
|
+
}
|
|
37309
|
+
return {
|
|
37310
|
+
top,
|
|
37311
|
+
left,
|
|
37312
|
+
width,
|
|
37313
|
+
height
|
|
37314
|
+
};
|
|
37315
|
+
}
|
|
37298
37316
|
|
|
37299
37317
|
const FORMULA_VALUE_PREFIX = '=';
|
|
37300
37318
|
/** Returns whether given value is a formula */
|
|
@@ -38184,7 +38202,7 @@ function dragEndAutoFill(currentData, selectedRange, cellValue, activeCell, cont
|
|
|
38184
38202
|
}
|
|
38185
38203
|
let updatedData = currentData;
|
|
38186
38204
|
const baseValue = String(cellValue.value ?? '');
|
|
38187
|
-
const matches = [...baseValue.matchAll(/(
|
|
38205
|
+
const matches = [...baseValue.matchAll(/(-?\d+)/g)];
|
|
38188
38206
|
for (let row = startPoint.row; row <= endPoint.row; row++) {
|
|
38189
38207
|
for (let col = startPoint.column; col <= endPoint.column; col++) {
|
|
38190
38208
|
const currentCell = get$1({
|
|
@@ -38203,10 +38221,10 @@ function dragEndAutoFill(currentData, selectedRange, cellValue, activeCell, cont
|
|
|
38203
38221
|
step = col - (activeCell?.column ?? startPoint.column);
|
|
38204
38222
|
}
|
|
38205
38223
|
let index = 0;
|
|
38206
|
-
newValue = newValue.replace(/(
|
|
38224
|
+
newValue = newValue.replace(/(-?\d+)/g, () => {
|
|
38207
38225
|
const match = matches[index++];
|
|
38208
38226
|
if (!match) return '';
|
|
38209
|
-
const originalNum = parseInt(match[
|
|
38227
|
+
const originalNum = parseInt(match?.[1] ?? '', 10);
|
|
38210
38228
|
return (originalNum + step).toString();
|
|
38211
38229
|
});
|
|
38212
38230
|
}
|
|
@@ -38926,13 +38944,15 @@ function reducer(state, action) {
|
|
|
38926
38944
|
const {
|
|
38927
38945
|
active
|
|
38928
38946
|
} = state;
|
|
38947
|
+
const newSelected = extend && active ? new EntireRowsSelection(active.row, row) : new EntireRowsSelection(row, row);
|
|
38948
|
+
const newActive = extend && active ? active : {
|
|
38949
|
+
...ORIGIN,
|
|
38950
|
+
row
|
|
38951
|
+
};
|
|
38929
38952
|
return {
|
|
38930
38953
|
...state,
|
|
38931
|
-
selected:
|
|
38932
|
-
active:
|
|
38933
|
-
...ORIGIN,
|
|
38934
|
-
row
|
|
38935
|
-
},
|
|
38954
|
+
selected: newSelected,
|
|
38955
|
+
active: newActive,
|
|
38936
38956
|
mode: 'view',
|
|
38937
38957
|
selectedColumn: null,
|
|
38938
38958
|
selectedRow: row
|
|
@@ -38947,13 +38967,15 @@ function reducer(state, action) {
|
|
|
38947
38967
|
const {
|
|
38948
38968
|
active
|
|
38949
38969
|
} = state;
|
|
38970
|
+
const newSelected = extend && active ? new EntireColumnsSelection(active.column, column) : new EntireColumnsSelection(column, column);
|
|
38971
|
+
const newActive = extend && active ? active : {
|
|
38972
|
+
...ORIGIN,
|
|
38973
|
+
column
|
|
38974
|
+
};
|
|
38950
38975
|
return {
|
|
38951
38976
|
...state,
|
|
38952
|
-
selected:
|
|
38953
|
-
active:
|
|
38954
|
-
...ORIGIN,
|
|
38955
|
-
column
|
|
38956
|
-
},
|
|
38977
|
+
selected: newSelected,
|
|
38978
|
+
active: newActive,
|
|
38957
38979
|
mode: 'view',
|
|
38958
38980
|
selectedColumn: column,
|
|
38959
38981
|
selectedRow: null
|
|
@@ -39317,23 +39339,23 @@ function reducer(state, action) {
|
|
|
39317
39339
|
row: 0,
|
|
39318
39340
|
column: 0
|
|
39319
39341
|
};
|
|
39320
|
-
if (rowCount > columnCount) {
|
|
39342
|
+
if (Math.abs(rowCount) > Math.abs(columnCount)) {
|
|
39321
39343
|
startPoint = {
|
|
39322
|
-
row:
|
|
39323
|
-
column:
|
|
39344
|
+
row: Math.min(start.row, end.row),
|
|
39345
|
+
column: activeCell?.column ?? 0
|
|
39324
39346
|
};
|
|
39325
39347
|
endPoint = {
|
|
39326
|
-
row:
|
|
39327
|
-
column:
|
|
39348
|
+
row: Math.max(start.row, end.row),
|
|
39349
|
+
column: activeCell?.column ?? 0
|
|
39328
39350
|
};
|
|
39329
39351
|
} else {
|
|
39330
39352
|
startPoint = {
|
|
39331
|
-
row:
|
|
39332
|
-
column:
|
|
39353
|
+
row: activeCell?.row ?? 0,
|
|
39354
|
+
column: Math.min(start.column, end.column)
|
|
39333
39355
|
};
|
|
39334
39356
|
endPoint = {
|
|
39335
|
-
row:
|
|
39336
|
-
column:
|
|
39357
|
+
row: activeCell?.row ?? 0,
|
|
39358
|
+
column: Math.max(start.column, end.column)
|
|
39337
39359
|
};
|
|
39338
39360
|
}
|
|
39339
39361
|
return {
|
|
@@ -40728,7 +40750,10 @@ const ColumnIndicator = ({
|
|
|
40728
40750
|
minimumColumnWidth,
|
|
40729
40751
|
maxColLimit,
|
|
40730
40752
|
disableDeleteOption,
|
|
40731
|
-
contextMenu
|
|
40753
|
+
contextMenu,
|
|
40754
|
+
onAddColumn,
|
|
40755
|
+
onDeleteColumn,
|
|
40756
|
+
scrollToColumn
|
|
40732
40757
|
}) => {
|
|
40733
40758
|
const dispatch = useDispatch();
|
|
40734
40759
|
const minColumnWidth = minimumColumnWidth;
|
|
@@ -40742,7 +40767,13 @@ const ColumnIndicator = ({
|
|
|
40742
40767
|
label: 'Add Column Left',
|
|
40743
40768
|
value: 'Add Column Left',
|
|
40744
40769
|
iconName: 'plus_icon',
|
|
40745
|
-
action: () =>
|
|
40770
|
+
action: () => {
|
|
40771
|
+
addColumnLeft(minColumnWidth);
|
|
40772
|
+
onAddColumn?.(selectedColumn ?? column, true);
|
|
40773
|
+
if (column === columnCount - 1) {
|
|
40774
|
+
scrollToColumn(column); // Scroll to the new column
|
|
40775
|
+
}
|
|
40776
|
+
},
|
|
40746
40777
|
disableTooltip: 'Column limit reached',
|
|
40747
40778
|
visible: cell?.contextDisable?.['Add Column Left'] ?? false,
|
|
40748
40779
|
disable: columnCount >= maxColLimit
|
|
@@ -40750,7 +40781,13 @@ const ColumnIndicator = ({
|
|
|
40750
40781
|
label: 'Add Column Right',
|
|
40751
40782
|
value: 'Add Column Right',
|
|
40752
40783
|
iconName: 'plus_icon',
|
|
40753
|
-
action: () =>
|
|
40784
|
+
action: () => {
|
|
40785
|
+
addColumnRight(minColumnWidth);
|
|
40786
|
+
onAddColumn?.(selectedColumn ?? column, false);
|
|
40787
|
+
if (column === columnCount - 1) {
|
|
40788
|
+
scrollToColumn(column + 1); // Scroll to the new column
|
|
40789
|
+
}
|
|
40790
|
+
},
|
|
40754
40791
|
disableTooltip: 'Column limit reached',
|
|
40755
40792
|
visible: cell?.contextDisable?.['Add Column Right'] ?? false,
|
|
40756
40793
|
disable: columnCount >= maxColLimit
|
|
@@ -40758,12 +40795,15 @@ const ColumnIndicator = ({
|
|
|
40758
40795
|
label: 'Delete Column',
|
|
40759
40796
|
value: 'Delete Column',
|
|
40760
40797
|
iconName: 'delete',
|
|
40761
|
-
action: () =>
|
|
40798
|
+
action: () => {
|
|
40799
|
+
deleteColumn();
|
|
40800
|
+
onDeleteColumn?.(selectedColumn ?? column);
|
|
40801
|
+
},
|
|
40762
40802
|
disableTooltip: '',
|
|
40763
40803
|
visible: cell?.contextDisable?.['Delete Column'] ?? false,
|
|
40764
40804
|
disable: false
|
|
40765
40805
|
}] : [])];
|
|
40766
|
-
}, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn]);
|
|
40806
|
+
}, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn, minColumnWidth, columnCount, maxColLimit, disableDeleteOption, onAddColumn, onDeleteColumn, column]);
|
|
40767
40807
|
const onMouseDrag = React__namespace.useCallback((event, isRight) => {
|
|
40768
40808
|
const getTargetColumn = isRight ? column - 1 : column;
|
|
40769
40809
|
const targetColumn = Math.max(getTargetColumn, 0);
|
|
@@ -40849,7 +40889,8 @@ const enhance$2 = ColumnIndicatorComponent => {
|
|
|
40849
40889
|
cell: cell,
|
|
40850
40890
|
selected: selected,
|
|
40851
40891
|
selectedColumn: selectedColumn,
|
|
40852
|
-
onSelect: selectEntireColumn$1
|
|
40892
|
+
onSelect: selectEntireColumn$1,
|
|
40893
|
+
scrollToColumn: props.scrollToColumn
|
|
40853
40894
|
});
|
|
40854
40895
|
};
|
|
40855
40896
|
};
|
|
@@ -40879,7 +40920,8 @@ const RowIndicator = ({
|
|
|
40879
40920
|
maxRowLimit,
|
|
40880
40921
|
disableDeleteOption,
|
|
40881
40922
|
contextMenu,
|
|
40882
|
-
setVisibleRange
|
|
40923
|
+
setVisibleRange,
|
|
40924
|
+
scrollToRow
|
|
40883
40925
|
}) => {
|
|
40884
40926
|
const dispatch = useDispatch();
|
|
40885
40927
|
const rowHeight = useSelector(state => state.rowDimensions[row]?.height || 32);
|
|
@@ -40888,10 +40930,16 @@ const RowIndicator = ({
|
|
|
40888
40930
|
rowCount
|
|
40889
40931
|
} = getMatrixDimensions(matrixData);
|
|
40890
40932
|
const updateVisibleRangeEnd = action => {
|
|
40891
|
-
setVisibleRange(prev =>
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
|
|
40933
|
+
setVisibleRange(prev => {
|
|
40934
|
+
const value = {
|
|
40935
|
+
...prev,
|
|
40936
|
+
end: action === 'increment' ? prev.end + 1 : prev.end - 1
|
|
40937
|
+
};
|
|
40938
|
+
if (row === rowCount - 1) {
|
|
40939
|
+
scrollToRow(row, value);
|
|
40940
|
+
}
|
|
40941
|
+
return value;
|
|
40942
|
+
});
|
|
40895
40943
|
};
|
|
40896
40944
|
const options = React__namespace.useMemo(() => {
|
|
40897
40945
|
return [{
|
|
@@ -41015,7 +41063,8 @@ const enhance$1 = RowIndicatorComponent => {
|
|
|
41015
41063
|
selected: selected,
|
|
41016
41064
|
cell: cell,
|
|
41017
41065
|
selectedRow: selectedRow,
|
|
41018
|
-
onSelect: selectEntireRow$1
|
|
41066
|
+
onSelect: selectEntireRow$1,
|
|
41067
|
+
scrollToRow: props.scrollToRow
|
|
41019
41068
|
});
|
|
41020
41069
|
};
|
|
41021
41070
|
};
|
|
@@ -41263,7 +41312,7 @@ const ActiveCell = props => {
|
|
|
41263
41312
|
top: dimensions.top - offset
|
|
41264
41313
|
};
|
|
41265
41314
|
}, [dimensions, offset]);
|
|
41266
|
-
const hidden = React__namespace.useMemo(() => !active || !dimensions, [active, dimensions]);
|
|
41315
|
+
const hidden = React__namespace.useMemo(() => !active || !dimensions || active.row < props.visibleRange.start || active.row >= props.visibleRange.end, [active, dimensions, props.visibleRange]);
|
|
41267
41316
|
const initialCellRef = React__namespace.useRef(undefined);
|
|
41268
41317
|
const prevActiveRef = React__namespace.useRef(null);
|
|
41269
41318
|
const prevCellRef = React__namespace.useRef(undefined);
|
|
@@ -41552,7 +41601,9 @@ const ActiveCell = props => {
|
|
|
41552
41601
|
}
|
|
41553
41602
|
const root = rootRef.current;
|
|
41554
41603
|
if (!hidden && root) {
|
|
41555
|
-
root.focus(
|
|
41604
|
+
root.focus({
|
|
41605
|
+
preventScroll: true
|
|
41606
|
+
});
|
|
41556
41607
|
if (cell?.inputType?.type === 'file' && cell?.value) {
|
|
41557
41608
|
try {
|
|
41558
41609
|
const parsedFiles = JSON.parse(cell.value).map(file => new File([new Blob()], file.name.split('*')[0] ?? 'default'));
|
|
@@ -41628,7 +41679,9 @@ const ActiveCell = props => {
|
|
|
41628
41679
|
}, [props]);
|
|
41629
41680
|
return jsxRuntime.jsxs("div", {
|
|
41630
41681
|
ref: rootRef,
|
|
41631
|
-
className: classNames('ff-spreadsheet-active-cell', `ff-spreadsheet-active-cell--${mode}
|
|
41682
|
+
className: classNames('ff-spreadsheet-active-cell', `ff-spreadsheet-active-cell--${mode}`, {
|
|
41683
|
+
'ff-spreadsheet-active-cell--hidden': hidden
|
|
41684
|
+
}),
|
|
41632
41685
|
style: adjustedDimensions,
|
|
41633
41686
|
onContextMenu: contextClick,
|
|
41634
41687
|
onClick: mode === 'view' && !readOnly ? edit : undefined,
|
|
@@ -41682,7 +41735,7 @@ const ActiveCell = props => {
|
|
|
41682
41735
|
className: "ff-spreadsheet-cell-textarea",
|
|
41683
41736
|
style: {
|
|
41684
41737
|
...cell?.style,
|
|
41685
|
-
textDecoration: '
|
|
41738
|
+
textDecoration: cell?.style?.textDecoration === 'underline' ? 'underline' : 'none',
|
|
41686
41739
|
pointerEvents: 'none',
|
|
41687
41740
|
borderTop: '',
|
|
41688
41741
|
borderBottom: '',
|
|
@@ -41742,49 +41795,62 @@ const FloatingRect = ({
|
|
|
41742
41795
|
};
|
|
41743
41796
|
|
|
41744
41797
|
const Selected = ({
|
|
41745
|
-
visibleRange
|
|
41798
|
+
visibleRange,
|
|
41799
|
+
scrollPos = {
|
|
41800
|
+
top: 0,
|
|
41801
|
+
left: 0
|
|
41802
|
+
}
|
|
41746
41803
|
}) => {
|
|
41747
|
-
const selected = useSelector(state => state.selected);
|
|
41748
41804
|
const rowDimensions = useSelector(state => state.rowDimensions);
|
|
41805
|
+
const columnDimensions = useSelector(state => state.columnDimensions);
|
|
41749
41806
|
const dragging = useSelector(state => state.dragging);
|
|
41750
41807
|
const hidden = useSelector(state => state.selected.size(state.model.data) < 2);
|
|
41751
|
-
const
|
|
41752
|
-
|
|
41753
|
-
});
|
|
41754
|
-
const offset = React__namespace.useMemo(() => {
|
|
41755
|
-
let sum = 0;
|
|
41756
|
-
const DEFAULT_ROW_HEIGHT = 32;
|
|
41757
|
-
for (let r = 0; r < visibleRange.start; r++) {
|
|
41758
|
-
sum += rowDimensions[r]?.height || DEFAULT_ROW_HEIGHT;
|
|
41759
|
-
}
|
|
41760
|
-
return sum;
|
|
41761
|
-
}, [rowDimensions, visibleRange.start]);
|
|
41808
|
+
const fullRange = useSelector(state => state.selected.toRange(state.model.data));
|
|
41809
|
+
const dimensions = React__namespace.useMemo(() => getVisibleRangeDimensions(fullRange, visibleRange, rowDimensions, columnDimensions), [fullRange, rowDimensions, columnDimensions, visibleRange]);
|
|
41762
41810
|
const adjustedDimensions = React__namespace.useMemo(() => {
|
|
41763
41811
|
if (!dimensions) return undefined;
|
|
41764
41812
|
return {
|
|
41765
41813
|
...dimensions,
|
|
41766
|
-
top: dimensions.top
|
|
41767
|
-
left: dimensions.left
|
|
41768
|
-
height: dimensions.height
|
|
41769
|
-
width: dimensions.width
|
|
41814
|
+
top: dimensions.top + 32,
|
|
41815
|
+
left: dimensions.left + 60,
|
|
41816
|
+
height: dimensions.height - 1,
|
|
41817
|
+
width: dimensions.width - 1
|
|
41770
41818
|
};
|
|
41771
|
-
}, [dimensions,
|
|
41819
|
+
}, [dimensions, scrollPos]);
|
|
41772
41820
|
return jsxRuntime.jsx(FloatingRect, {
|
|
41773
41821
|
variant: "selected",
|
|
41774
41822
|
dimensions: adjustedDimensions,
|
|
41775
41823
|
dragging: dragging,
|
|
41776
|
-
hidden: hidden
|
|
41824
|
+
hidden: hidden || !dimensions
|
|
41777
41825
|
});
|
|
41778
41826
|
};
|
|
41779
41827
|
|
|
41780
|
-
const Copied = (
|
|
41781
|
-
|
|
41782
|
-
|
|
41783
|
-
|
|
41828
|
+
const Copied = ({
|
|
41829
|
+
visibleRange,
|
|
41830
|
+
scrollPos = {
|
|
41831
|
+
top: 0,
|
|
41832
|
+
left: 0
|
|
41833
|
+
}
|
|
41834
|
+
}) => {
|
|
41835
|
+
const rowDimensions = useSelector(state => state.rowDimensions);
|
|
41836
|
+
const columnDimensions = useSelector(state => state.columnDimensions);
|
|
41837
|
+
const fullRange = useSelector(state => state.copied);
|
|
41838
|
+
const hidden = fullRange === null;
|
|
41839
|
+
const dimensions = React__namespace.useMemo(() => getVisibleRangeDimensions(fullRange, visibleRange, rowDimensions, columnDimensions), [fullRange, rowDimensions, columnDimensions, visibleRange]);
|
|
41840
|
+
const adjustedDimensions = React__namespace.useMemo(() => {
|
|
41841
|
+
if (!dimensions) return undefined;
|
|
41842
|
+
return {
|
|
41843
|
+
...dimensions,
|
|
41844
|
+
top: dimensions.top + 32,
|
|
41845
|
+
left: dimensions.left + 60,
|
|
41846
|
+
height: dimensions.height - 1,
|
|
41847
|
+
width: dimensions.width - 1
|
|
41848
|
+
};
|
|
41849
|
+
}, [dimensions, scrollPos]);
|
|
41784
41850
|
return jsxRuntime.jsx(FloatingRect, {
|
|
41785
41851
|
variant: "copied",
|
|
41786
|
-
dimensions:
|
|
41787
|
-
hidden: hidden,
|
|
41852
|
+
dimensions: adjustedDimensions,
|
|
41853
|
+
hidden: hidden || !dimensions,
|
|
41788
41854
|
dragging: false
|
|
41789
41855
|
});
|
|
41790
41856
|
};
|
|
@@ -42300,7 +42366,7 @@ const throttle = (func, limit) => {
|
|
|
42300
42366
|
/**
|
|
42301
42367
|
* The Spreadsheet component
|
|
42302
42368
|
*/
|
|
42303
|
-
const Spreadsheet = props
|
|
42369
|
+
const Spreadsheet = /*#__PURE__*/React__namespace.forwardRef(function Spreadsheet(props, ref) {
|
|
42304
42370
|
const {
|
|
42305
42371
|
className,
|
|
42306
42372
|
columnLabels,
|
|
@@ -42327,12 +42393,17 @@ const Spreadsheet = props => {
|
|
|
42327
42393
|
maxColLimit,
|
|
42328
42394
|
disableDeleteOption,
|
|
42329
42395
|
contextMenu,
|
|
42330
|
-
getActiveCell
|
|
42396
|
+
getActiveCell,
|
|
42397
|
+
onAddColumn,
|
|
42398
|
+
onDeleteColumn
|
|
42331
42399
|
} = props;
|
|
42332
42400
|
const [sheetChange, setSheetChange] = React__namespace.useState(false);
|
|
42333
42401
|
const [maxWidth, setMaxWidth] = React__namespace.useState(0);
|
|
42334
42402
|
const [maxHeight, setMaxHeight] = React__namespace.useState(0);
|
|
42335
|
-
const [
|
|
42403
|
+
const [scrollPos, setScrollPos] = React__namespace.useState({
|
|
42404
|
+
top: 0,
|
|
42405
|
+
left: 0
|
|
42406
|
+
});
|
|
42336
42407
|
const resizeObserver = new ResizeObserver(entries => {
|
|
42337
42408
|
const entry = entries[0];
|
|
42338
42409
|
if (entry && rootRef.current) {
|
|
@@ -42347,7 +42418,6 @@ const Spreadsheet = props => {
|
|
|
42347
42418
|
setMaxWidth(Math.min(rootRef.current.clientWidth, clientWidth));
|
|
42348
42419
|
}
|
|
42349
42420
|
}
|
|
42350
|
-
removeSelect();
|
|
42351
42421
|
}
|
|
42352
42422
|
});
|
|
42353
42423
|
const scrollOption = props.scroller;
|
|
@@ -42406,6 +42476,10 @@ const Spreadsheet = props => {
|
|
|
42406
42476
|
const addColumnRight$1 = useAction(addColumnRight);
|
|
42407
42477
|
const deleteRow$1 = useAction(deleteRow);
|
|
42408
42478
|
const deleteColumn$1 = useAction(deleteColumn);
|
|
42479
|
+
// Expose removeSelect
|
|
42480
|
+
React__namespace.useImperativeHandle(ref, () => ({
|
|
42481
|
+
removeSelect
|
|
42482
|
+
}));
|
|
42409
42483
|
// Track active
|
|
42410
42484
|
const prevActiveRef = React__namespace.useRef(state.active);
|
|
42411
42485
|
React__namespace.useEffect(() => {
|
|
@@ -42512,17 +42586,6 @@ const Spreadsheet = props => {
|
|
|
42512
42586
|
onKeyDownAction(event);
|
|
42513
42587
|
}
|
|
42514
42588
|
}, [state, onKeyDown, onKeyDownAction]);
|
|
42515
|
-
React__namespace.useEffect(() => {
|
|
42516
|
-
const handleDocumentClick = event => {
|
|
42517
|
-
if (workRef.current && !workRef.current.contains(event.target)) {
|
|
42518
|
-
removeSelect();
|
|
42519
|
-
}
|
|
42520
|
-
};
|
|
42521
|
-
document.addEventListener('click', handleDocumentClick);
|
|
42522
|
-
return () => {
|
|
42523
|
-
document.removeEventListener('click', handleDocumentClick);
|
|
42524
|
-
};
|
|
42525
|
-
}, [workRef]);
|
|
42526
42589
|
const handleClick = React__namespace.useCallback(() => {
|
|
42527
42590
|
if (state.formattedStyle.open && state.active) {
|
|
42528
42591
|
formateClick(state.active);
|
|
@@ -42560,11 +42623,6 @@ const Spreadsheet = props => {
|
|
|
42560
42623
|
if (!table) return;
|
|
42561
42624
|
resizeObserver.observe(table);
|
|
42562
42625
|
};
|
|
42563
|
-
const removeSelection = () => {
|
|
42564
|
-
if ((state.selectedColumn === null || state.selectedRow === null) && !state.autoFill.open) {
|
|
42565
|
-
removeSelect();
|
|
42566
|
-
}
|
|
42567
|
-
};
|
|
42568
42626
|
const updateVisibleRange = (newStart, newEnd, newScrollCount) => {
|
|
42569
42627
|
setScrollCount(newScrollCount);
|
|
42570
42628
|
setVisibleRange({
|
|
@@ -42580,10 +42638,8 @@ const Spreadsheet = props => {
|
|
|
42580
42638
|
});
|
|
42581
42639
|
});
|
|
42582
42640
|
}
|
|
42583
|
-
removeSelection();
|
|
42584
42641
|
};
|
|
42585
42642
|
const throttledHandleScroll = React__namespace.useMemo(() => throttle(e => {
|
|
42586
|
-
setRenderReady(false);
|
|
42587
42643
|
requestAnimationFrame(() => {
|
|
42588
42644
|
const {
|
|
42589
42645
|
scrollTop,
|
|
@@ -42609,7 +42665,6 @@ const Spreadsheet = props => {
|
|
|
42609
42665
|
updateVisibleRange((scrollCount + 1) * rowHeight, size.rows, scrollCount + 1);
|
|
42610
42666
|
setScrollCount(scrollCount + 1);
|
|
42611
42667
|
}
|
|
42612
|
-
setRenderReady(true);
|
|
42613
42668
|
});
|
|
42614
42669
|
setContextMenu({
|
|
42615
42670
|
open: false,
|
|
@@ -42632,6 +42687,42 @@ const Spreadsheet = props => {
|
|
|
42632
42687
|
return range(size.rows);
|
|
42633
42688
|
}
|
|
42634
42689
|
};
|
|
42690
|
+
const scrollToRow = (row, visibleRangeValue) => {
|
|
42691
|
+
if (!scrollOption || !rootRef.current) return;
|
|
42692
|
+
requestAnimationFrame(() => {
|
|
42693
|
+
const DEFAULT_ROW_HEIGHT = 32;
|
|
42694
|
+
let scrollTop = 0;
|
|
42695
|
+
for (let r = 0; r <= row; r++) {
|
|
42696
|
+
scrollTop += state.rowDimensions?.[r]?.height || DEFAULT_ROW_HEIGHT;
|
|
42697
|
+
}
|
|
42698
|
+
if (row >= visibleRange.end - 1) {
|
|
42699
|
+
setVisibleRange(prev => ({
|
|
42700
|
+
...prev,
|
|
42701
|
+
start: visibleRangeValue?.start,
|
|
42702
|
+
end: visibleRangeValue?.end
|
|
42703
|
+
}));
|
|
42704
|
+
rootRef.current?.scrollTo({
|
|
42705
|
+
top: scrollTop + DEFAULT_ROW_HEIGHT,
|
|
42706
|
+
behavior: 'smooth'
|
|
42707
|
+
});
|
|
42708
|
+
}
|
|
42709
|
+
});
|
|
42710
|
+
};
|
|
42711
|
+
const scrollToColumn = column => {
|
|
42712
|
+
requestAnimationFrame(() => {
|
|
42713
|
+
const columnWidth = minimumColumnWidth;
|
|
42714
|
+
const scrollLeft = column * columnWidth;
|
|
42715
|
+
requestAnimationFrame(() => {
|
|
42716
|
+
if (!rootRef.current) return;
|
|
42717
|
+
if (column >= size.columns - 1) {
|
|
42718
|
+
rootRef.current.scrollTo({
|
|
42719
|
+
left: scrollLeft,
|
|
42720
|
+
behavior: 'smooth'
|
|
42721
|
+
});
|
|
42722
|
+
}
|
|
42723
|
+
});
|
|
42724
|
+
});
|
|
42725
|
+
};
|
|
42635
42726
|
const tableNode = React__namespace.useMemo(() => jsxRuntime.jsxs(Table$1, {
|
|
42636
42727
|
columns: size.columns,
|
|
42637
42728
|
hideColumnIndicators: false,
|
|
@@ -42648,7 +42739,10 @@ const Spreadsheet = props => {
|
|
|
42648
42739
|
columnContextEnable: props.columnContextEnable,
|
|
42649
42740
|
maxColLimit: maxColLimit,
|
|
42650
42741
|
disableDeleteOption: disableDeleteOption,
|
|
42651
|
-
contextMenu: contextMenu
|
|
42742
|
+
contextMenu: contextMenu,
|
|
42743
|
+
onAddColumn: onAddColumn,
|
|
42744
|
+
onDeleteColumn: onDeleteColumn,
|
|
42745
|
+
scrollToColumn: scrollToColumn
|
|
42652
42746
|
}, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
|
|
42653
42747
|
column: columnNumber,
|
|
42654
42748
|
minimumColumnWidth: minimumColumnWidth,
|
|
@@ -42659,9 +42753,12 @@ const Spreadsheet = props => {
|
|
|
42659
42753
|
columnContextEnable: props.columnContextEnable,
|
|
42660
42754
|
maxColLimit: maxColLimit,
|
|
42661
42755
|
disableDeleteOption: disableDeleteOption,
|
|
42662
|
-
contextMenu: contextMenu
|
|
42756
|
+
contextMenu: contextMenu,
|
|
42757
|
+
onAddColumn: onAddColumn,
|
|
42758
|
+
onDeleteColumn: onDeleteColumn,
|
|
42759
|
+
scrollToColumn: scrollToColumn
|
|
42663
42760
|
}, columnNumber))]
|
|
42664
|
-
}),
|
|
42761
|
+
}), scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
|
|
42665
42762
|
row: rowNumber,
|
|
42666
42763
|
children: [rowLabels ? jsxRuntime.jsx(RowIndicator$1, {
|
|
42667
42764
|
label: rowNumber in rowLabels ? rowLabels[rowNumber] : null,
|
|
@@ -42674,7 +42771,8 @@ const Spreadsheet = props => {
|
|
|
42674
42771
|
maxRowLimit: maxRowLimit,
|
|
42675
42772
|
disableDeleteOption: disableDeleteOption,
|
|
42676
42773
|
contextMenu: contextMenu,
|
|
42677
|
-
setVisibleRange: setVisibleRange
|
|
42774
|
+
setVisibleRange: setVisibleRange,
|
|
42775
|
+
scrollToRow: scrollToRow
|
|
42678
42776
|
}, rowNumber) : jsxRuntime.jsx(RowIndicator$1, {
|
|
42679
42777
|
row: rowNumber,
|
|
42680
42778
|
addRowTop: addRowTop$1,
|
|
@@ -42685,7 +42783,8 @@ const Spreadsheet = props => {
|
|
|
42685
42783
|
maxRowLimit: maxRowLimit,
|
|
42686
42784
|
disableDeleteOption: disableDeleteOption,
|
|
42687
42785
|
contextMenu: contextMenu,
|
|
42688
|
-
setVisibleRange: setVisibleRange
|
|
42786
|
+
setVisibleRange: setVisibleRange,
|
|
42787
|
+
scrollToRow: scrollToRow
|
|
42689
42788
|
}, rowNumber), range(size.columns).map(columnNumber => jsxRuntime.jsx(Cell$1, {
|
|
42690
42789
|
row: rowNumber,
|
|
42691
42790
|
column: columnNumber,
|
|
@@ -42749,6 +42848,11 @@ const Spreadsheet = props => {
|
|
|
42749
42848
|
onClick: handleClick,
|
|
42750
42849
|
onMouseMove: handleMouseMove,
|
|
42751
42850
|
onScroll: e => {
|
|
42851
|
+
const target = e.target;
|
|
42852
|
+
setScrollPos({
|
|
42853
|
+
top: target.scrollTop,
|
|
42854
|
+
left: target.scrollLeft
|
|
42855
|
+
});
|
|
42752
42856
|
scrollOption && throttledHandleScroll(e);
|
|
42753
42857
|
setContextMenu({
|
|
42754
42858
|
open: false,
|
|
@@ -42765,15 +42869,19 @@ const Spreadsheet = props => {
|
|
|
42765
42869
|
});
|
|
42766
42870
|
},
|
|
42767
42871
|
children: [tableNode, activeCellNode, jsxRuntime.jsx(Selected, {
|
|
42768
|
-
visibleRange: visibleRange
|
|
42769
|
-
|
|
42872
|
+
visibleRange: visibleRange,
|
|
42873
|
+
scrollPos: scrollPos
|
|
42874
|
+
}), jsxRuntime.jsx(Copied, {
|
|
42875
|
+
visibleRange: visibleRange,
|
|
42876
|
+
scrollPos: scrollPos
|
|
42877
|
+
})]
|
|
42770
42878
|
})]
|
|
42771
42879
|
}), [className, onKeyPress, handleKeyDown, handleMouseMove, tableNode, activeCellNode, maxWidth]);
|
|
42772
42880
|
return jsxRuntime.jsx(context.Provider, {
|
|
42773
42881
|
value: reducerElements,
|
|
42774
42882
|
children: rootNode
|
|
42775
42883
|
});
|
|
42776
|
-
};
|
|
42884
|
+
});
|
|
42777
42885
|
|
|
42778
42886
|
const ExcelContextMenu = ({
|
|
42779
42887
|
contextMenu,
|
|
@@ -42898,6 +43006,7 @@ const ExcelFile = ({
|
|
|
42898
43006
|
defaultSheet: [[EmptyCell]]
|
|
42899
43007
|
});
|
|
42900
43008
|
const [selectedSheetData, setSelectedSheetData] = React.useState([[EmptyCell]]);
|
|
43009
|
+
const [headerOldNew, setHeaderOldNew] = React.useState(onSave.length > 1 ? {} : {});
|
|
42901
43010
|
const [position, setPosition] = React.useState({
|
|
42902
43011
|
x: 0,
|
|
42903
43012
|
y: 0
|
|
@@ -42905,6 +43014,7 @@ const ExcelFile = ({
|
|
|
42905
43014
|
const pageRef = React.useRef('');
|
|
42906
43015
|
const workRef = React.useRef(null);
|
|
42907
43016
|
const sheetRef = React.useRef(null);
|
|
43017
|
+
const spreadsheetRef = React.useRef(null);
|
|
42908
43018
|
const checkVal = val => {
|
|
42909
43019
|
if (val === undefined || val === null) {
|
|
42910
43020
|
return null;
|
|
@@ -42925,6 +43035,7 @@ const ExcelFile = ({
|
|
|
42925
43035
|
});
|
|
42926
43036
|
}
|
|
42927
43037
|
const newWorksheetsData = {};
|
|
43038
|
+
const newHeaderOldNew = {};
|
|
42928
43039
|
payload.forEach(sheet => {
|
|
42929
43040
|
const sheetName = sheet.sheetName;
|
|
42930
43041
|
const json = sheet.data;
|
|
@@ -42981,8 +43092,21 @@ const ExcelFile = ({
|
|
|
42981
43092
|
});
|
|
42982
43093
|
});
|
|
42983
43094
|
newWorksheetsData[sheetName] = spreadsheetData;
|
|
43095
|
+
// Only set headerOldNew if onSave expects two arguments
|
|
43096
|
+
if (onSave.length > 1) {
|
|
43097
|
+
const firstRow = json[0] || [];
|
|
43098
|
+
newHeaderOldNew[sheetName] = Array.from({
|
|
43099
|
+
length: maxCols
|
|
43100
|
+
}, (_, col) => ({
|
|
43101
|
+
newData: '',
|
|
43102
|
+
oldData: firstRow[col]?.value || ''
|
|
43103
|
+
}));
|
|
43104
|
+
}
|
|
42984
43105
|
});
|
|
42985
43106
|
setWorksheetsData(newWorksheetsData);
|
|
43107
|
+
if (onSave.length > 1) {
|
|
43108
|
+
setHeaderOldNew(newHeaderOldNew);
|
|
43109
|
+
}
|
|
42986
43110
|
const firstSheetName = Object.keys(newWorksheetsData)[0];
|
|
42987
43111
|
if (firstSheetName && newWorksheetsData[firstSheetName] !== undefined) {
|
|
42988
43112
|
setSelectedSheetData(newWorksheetsData[firstSheetName]);
|
|
@@ -43004,9 +43128,29 @@ const ExcelFile = ({
|
|
|
43004
43128
|
debounceDispatch(handleSaveData());
|
|
43005
43129
|
}, [worksheetsData, pageRef.current]);
|
|
43006
43130
|
const debounceDispatch = React.useCallback(debounce(val => {
|
|
43007
|
-
onSave
|
|
43131
|
+
if (onSave.length > 1) {
|
|
43132
|
+
const updatedHeader = {
|
|
43133
|
+
...headerOldNew
|
|
43134
|
+
};
|
|
43135
|
+
sheetNames.forEach((sheetName, index) => {
|
|
43136
|
+
const firstRow = val[index].data[0] || [];
|
|
43137
|
+
const currentHeaders = firstRow.map(cell => cell?.value || '');
|
|
43138
|
+
updatedHeader[sheetName] = (updatedHeader[sheetName] || []).map((h, i) => ({
|
|
43139
|
+
...h,
|
|
43140
|
+
newData: currentHeaders[i] || ''
|
|
43141
|
+
}));
|
|
43142
|
+
});
|
|
43143
|
+
setHeaderOldNew(updatedHeader);
|
|
43144
|
+
const headerOldNewData = sheetNames.map(sheetName => ({
|
|
43145
|
+
sheetName,
|
|
43146
|
+
headers: updatedHeader[sheetName] || []
|
|
43147
|
+
}));
|
|
43148
|
+
onSave(val, headerOldNewData);
|
|
43149
|
+
} else {
|
|
43150
|
+
onSave(val);
|
|
43151
|
+
}
|
|
43008
43152
|
setSaveInfo('File saved');
|
|
43009
|
-
}, onSaveDelay), [onSave]);
|
|
43153
|
+
}, onSaveDelay), [onSave, headerOldNew, sheetNames]);
|
|
43010
43154
|
const handleSave = React.useCallback(event => {
|
|
43011
43155
|
if (event.ctrlKey && event.key === 's') {
|
|
43012
43156
|
event.preventDefault();
|
|
@@ -43089,6 +43233,17 @@ const ExcelFile = ({
|
|
|
43089
43233
|
[newSheetName]: newSheetData
|
|
43090
43234
|
});
|
|
43091
43235
|
setSelectedSheetData(newSheetData);
|
|
43236
|
+
if (onSave.length > 1) {
|
|
43237
|
+
setHeaderOldNew(prev => ({
|
|
43238
|
+
...prev,
|
|
43239
|
+
[newSheetName]: Array.from({
|
|
43240
|
+
length: colCount
|
|
43241
|
+
}, () => ({
|
|
43242
|
+
newData: '',
|
|
43243
|
+
oldData: ''
|
|
43244
|
+
}))
|
|
43245
|
+
}));
|
|
43246
|
+
}
|
|
43092
43247
|
pageRef.current = newSheetName;
|
|
43093
43248
|
};
|
|
43094
43249
|
React.useEffect(() => {
|
|
@@ -43110,6 +43265,15 @@ const ExcelFile = ({
|
|
|
43110
43265
|
const newIndex = Math.min(index, updatedSheetNames.length - 1);
|
|
43111
43266
|
setSheetNames(updatedSheetNames);
|
|
43112
43267
|
setWorksheetsData(updatedWorksheetsData);
|
|
43268
|
+
if (onSave.length > 1) {
|
|
43269
|
+
setHeaderOldNew(prev => {
|
|
43270
|
+
const newPrev = {
|
|
43271
|
+
...prev
|
|
43272
|
+
};
|
|
43273
|
+
delete newPrev[name];
|
|
43274
|
+
return newPrev;
|
|
43275
|
+
});
|
|
43276
|
+
}
|
|
43113
43277
|
setSelectedSheet({
|
|
43114
43278
|
index: newIndex,
|
|
43115
43279
|
name: updatedSheetNames[newIndex] ? updatedSheetNames[newIndex] : ''
|
|
@@ -43153,6 +43317,17 @@ const ExcelFile = ({
|
|
|
43153
43317
|
name: updatedSheetValue
|
|
43154
43318
|
}));
|
|
43155
43319
|
setWorksheetsData(updatedData);
|
|
43320
|
+
if (onSave.length > 1) {
|
|
43321
|
+
setHeaderOldNew(prev => {
|
|
43322
|
+
const newPrev = {
|
|
43323
|
+
...prev
|
|
43324
|
+
};
|
|
43325
|
+
const headers = newPrev[name];
|
|
43326
|
+
delete newPrev[name];
|
|
43327
|
+
newPrev[updatedSheetValue] = headers ?? [];
|
|
43328
|
+
return newPrev;
|
|
43329
|
+
});
|
|
43330
|
+
}
|
|
43156
43331
|
setEditingSheet(null);
|
|
43157
43332
|
};
|
|
43158
43333
|
function replaceKeyValueByKeyName(obj, oldKey, newKey, newValue) {
|
|
@@ -43314,6 +43489,39 @@ const ExcelFile = ({
|
|
|
43314
43489
|
});
|
|
43315
43490
|
}
|
|
43316
43491
|
};
|
|
43492
|
+
const handleAddColumn = (column, isLeft) => {
|
|
43493
|
+
if (onSave.length > 1) {
|
|
43494
|
+
setHeaderOldNew(prev => {
|
|
43495
|
+
const sheetName = selectedSheet.name;
|
|
43496
|
+
const arr = [...(prev[sheetName] || [])];
|
|
43497
|
+
const pos = isLeft ? column : column + 1;
|
|
43498
|
+
arr.splice(pos, 0, {
|
|
43499
|
+
newData: '',
|
|
43500
|
+
oldData: ''
|
|
43501
|
+
});
|
|
43502
|
+
return {
|
|
43503
|
+
...prev,
|
|
43504
|
+
[sheetName]: arr
|
|
43505
|
+
};
|
|
43506
|
+
});
|
|
43507
|
+
}
|
|
43508
|
+
};
|
|
43509
|
+
const handleDeleteColumn = column => {
|
|
43510
|
+
if (onSave.length > 1) {
|
|
43511
|
+
setHeaderOldNew(prev => {
|
|
43512
|
+
const sheetName = selectedSheet.name;
|
|
43513
|
+
const arr = [...(prev[sheetName] || [])];
|
|
43514
|
+
arr.splice(column, 1);
|
|
43515
|
+
return {
|
|
43516
|
+
...prev,
|
|
43517
|
+
[sheetName]: arr
|
|
43518
|
+
};
|
|
43519
|
+
});
|
|
43520
|
+
}
|
|
43521
|
+
};
|
|
43522
|
+
React.useEffect(() => {
|
|
43523
|
+
spreadsheetRef.current?.removeSelect();
|
|
43524
|
+
}, [selectedSheet.name]);
|
|
43317
43525
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
43318
43526
|
children: sheetNames.length > 0 && jsxRuntime.jsxs("div", {
|
|
43319
43527
|
ref: workRef,
|
|
@@ -43324,6 +43532,7 @@ const ExcelFile = ({
|
|
|
43324
43532
|
ref: sheetRef,
|
|
43325
43533
|
className: "ff-excel-sheet",
|
|
43326
43534
|
children: jsxRuntime.jsx(Spreadsheet, {
|
|
43535
|
+
ref: spreadsheetRef,
|
|
43327
43536
|
editable: editable,
|
|
43328
43537
|
attachmentAction: attachmentAction,
|
|
43329
43538
|
toolbar: toolbar,
|
|
@@ -43342,8 +43551,10 @@ const ExcelFile = ({
|
|
|
43342
43551
|
maxColLimit: maxColLimit,
|
|
43343
43552
|
disableDeleteOption: disableDeleteOption,
|
|
43344
43553
|
contextMenu: contextMenu,
|
|
43345
|
-
getActiveCell: getActiveCell
|
|
43346
|
-
|
|
43554
|
+
getActiveCell: getActiveCell,
|
|
43555
|
+
onAddColumn: handleAddColumn,
|
|
43556
|
+
onDeleteColumn: handleDeleteColumn
|
|
43557
|
+
}, selectedSheet.name)
|
|
43347
43558
|
}), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
|
|
43348
43559
|
className: "ff-excel-sheet-bar",
|
|
43349
43560
|
children: [sheetBar === 'show' && jsxRuntime.jsx("div", {
|
|
@@ -48606,8 +48817,9 @@ const MobileSkin = ({
|
|
|
48606
48817
|
const containerWidth = isPortrait ? mobileWidth : mobileHeight;
|
|
48607
48818
|
const hasTopNav = UtilityBar && navBarPosition === 'top';
|
|
48608
48819
|
const hasBottomNav = UtilityBar && navBarPosition === 'bottom';
|
|
48820
|
+
const hasSideNav = UtilityBar && navBarPosition === 'left';
|
|
48609
48821
|
return jsxRuntime.jsxs("div", {
|
|
48610
|
-
className:
|
|
48822
|
+
className: ['ff-mobileskin-wrapper', isPortrait ? 'portrait' : 'landscape', hasSideNav ? 'ff-side-nav-left' : '', hasTopNav ? 'navbar-top' : '', hasBottomNav ? 'navbar-bottom' : ''].filter(Boolean).join(' '),
|
|
48611
48823
|
children: [hasTopNav && jsxRuntime.jsx("div", {
|
|
48612
48824
|
className: "ff-nav-bar top-nav-bar",
|
|
48613
48825
|
children: navBarIcons.map(({
|
|
@@ -48616,6 +48828,7 @@ const MobileSkin = ({
|
|
|
48616
48828
|
className,
|
|
48617
48829
|
...iconProps
|
|
48618
48830
|
}, index) => {
|
|
48831
|
+
const key = tooltip?.[name] ?? index;
|
|
48619
48832
|
const tooltipTitle = tooltip?.[name] || '';
|
|
48620
48833
|
return jsxRuntime.jsx(Tooltip, {
|
|
48621
48834
|
title: tooltipTitle,
|
|
@@ -48627,7 +48840,7 @@ const MobileSkin = ({
|
|
|
48627
48840
|
...iconProps
|
|
48628
48841
|
})
|
|
48629
48842
|
})
|
|
48630
|
-
},
|
|
48843
|
+
}, key);
|
|
48631
48844
|
})
|
|
48632
48845
|
}), jsxRuntime.jsx("div", {
|
|
48633
48846
|
className: "ff-mobileskin-container",
|
|
@@ -48671,6 +48884,24 @@ const MobileSkin = ({
|
|
|
48671
48884
|
})
|
|
48672
48885
|
}, index);
|
|
48673
48886
|
})
|
|
48887
|
+
}), UtilityBar && hasSideNav && jsxRuntime.jsx("div", {
|
|
48888
|
+
className: "ff-side-nav-bar",
|
|
48889
|
+
children: navBarIcons?.map((icon, index) => {
|
|
48890
|
+
const {
|
|
48891
|
+
title,
|
|
48892
|
+
...iconProps
|
|
48893
|
+
} = icon;
|
|
48894
|
+
return jsxRuntime.jsx("div", {
|
|
48895
|
+
className: `ff-sidebar ${icon?.className || ''} ${index === navBarIcons.length - 1 ? 'last-icon' : ''}`,
|
|
48896
|
+
children: jsxRuntime.jsx(Tooltip, {
|
|
48897
|
+
title: title,
|
|
48898
|
+
placement: "bottom",
|
|
48899
|
+
children: jsxRuntime.jsx(Icon, {
|
|
48900
|
+
...iconProps
|
|
48901
|
+
})
|
|
48902
|
+
})
|
|
48903
|
+
}, index);
|
|
48904
|
+
})
|
|
48674
48905
|
})]
|
|
48675
48906
|
});
|
|
48676
48907
|
};
|
|
@@ -48691,7 +48922,8 @@ const Prompt = /*#__PURE__*/React.forwardRef(({
|
|
|
48691
48922
|
submitPrompt,
|
|
48692
48923
|
onPromptChange,
|
|
48693
48924
|
onBlur,
|
|
48694
|
-
onFocus
|
|
48925
|
+
onFocus,
|
|
48926
|
+
disableInput
|
|
48695
48927
|
}) => {
|
|
48696
48928
|
const containerRef = React.useRef(null);
|
|
48697
48929
|
useKeyboardActions([{
|
|
@@ -48736,7 +48968,8 @@ const Prompt = /*#__PURE__*/React.forwardRef(({
|
|
|
48736
48968
|
onChange: onPromptChange,
|
|
48737
48969
|
onFocus: onFocus,
|
|
48738
48970
|
onBlur: onBlur,
|
|
48739
|
-
value: value
|
|
48971
|
+
value: value,
|
|
48972
|
+
readOnly: disableInput
|
|
48740
48973
|
})]
|
|
48741
48974
|
});
|
|
48742
48975
|
});
|
|
@@ -48940,7 +49173,8 @@ const ChatModalAi = /*#__PURE__*/React.forwardRef(({
|
|
|
48940
49173
|
footerContent = 'Footer Content',
|
|
48941
49174
|
iconWidth,
|
|
48942
49175
|
iconHeight,
|
|
48943
|
-
children
|
|
49176
|
+
children,
|
|
49177
|
+
onVisibilityChange
|
|
48944
49178
|
}, ref) => {
|
|
48945
49179
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
48946
49180
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
@@ -48948,12 +49182,16 @@ const ChatModalAi = /*#__PURE__*/React.forwardRef(({
|
|
|
48948
49182
|
const openModal = () => {
|
|
48949
49183
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
48950
49184
|
setIsVisible(prev => !prev);
|
|
49185
|
+
onVisibilityChange?.(!isVisible);
|
|
48951
49186
|
timerRef.current = setTimeout(() => setIsOpen(prev => !prev), 10);
|
|
48952
49187
|
};
|
|
48953
49188
|
const closeModal = () => {
|
|
48954
49189
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
48955
49190
|
setIsOpen(false);
|
|
48956
|
-
timerRef.current = setTimeout(() =>
|
|
49191
|
+
timerRef.current = setTimeout(() => {
|
|
49192
|
+
setIsVisible(false);
|
|
49193
|
+
onVisibilityChange?.(false);
|
|
49194
|
+
}, 300);
|
|
48957
49195
|
};
|
|
48958
49196
|
React.useImperativeHandle(ref, () => ({
|
|
48959
49197
|
closeModal
|
|
@@ -49185,11 +49423,13 @@ const PromptContainer = ({
|
|
|
49185
49423
|
disabled,
|
|
49186
49424
|
isEditAccess,
|
|
49187
49425
|
versionsLength,
|
|
49188
|
-
count
|
|
49426
|
+
count,
|
|
49427
|
+
hiddenActions = []
|
|
49189
49428
|
}) => {
|
|
49190
49429
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
49191
49430
|
const [showReadMore, setShowReadMore] = React.useState(false);
|
|
49192
49431
|
const contentRef = React.useRef(null);
|
|
49432
|
+
const hiddenListIcons = Array.isArray(hiddenActions) ? hiddenActions : hiddenActions ? [hiddenActions] : [];
|
|
49193
49433
|
const actions = [{
|
|
49194
49434
|
action: 'delete',
|
|
49195
49435
|
title: 'Delete',
|
|
@@ -49276,7 +49516,7 @@ const PromptContainer = ({
|
|
|
49276
49516
|
className: "ff-prompt-icons",
|
|
49277
49517
|
children: [jsxRuntime.jsx("div", {
|
|
49278
49518
|
className: "ff-prompt-icons-leftside",
|
|
49279
|
-
children: actions.map((act, index) => {
|
|
49519
|
+
children: actions.filter(act => !hiddenListIcons.includes(act.action)).map((act, index) => {
|
|
49280
49520
|
const isDelete = act?.action === 'delete';
|
|
49281
49521
|
const isRegenerate = act?.action === 'regenerate';
|
|
49282
49522
|
const shouldDisableIcon = isEditAccess && isDelete || isRegenerate && (versionsLength ?? 0) >= 3 || disabled;
|
|
@@ -50176,11 +50416,22 @@ const TableHead = /*#__PURE__*/React.memo(({
|
|
|
50176
50416
|
// );
|
|
50177
50417
|
const rootNodeRowRef = React.useRef(null);
|
|
50178
50418
|
const [isMounted, setIsMounted] = React.useState(false);
|
|
50419
|
+
const [didMouseEntered, setDidMouseEntered] = React.useState(false);
|
|
50420
|
+
const handleMouseEnter = e => {
|
|
50421
|
+
e.stopPropagation();
|
|
50422
|
+
setDidMouseEntered(true);
|
|
50423
|
+
};
|
|
50424
|
+
const handleMouseLeave = e => {
|
|
50425
|
+
e.stopPropagation();
|
|
50426
|
+
setDidMouseEntered(false);
|
|
50427
|
+
};
|
|
50179
50428
|
React.useEffect(() => {
|
|
50180
50429
|
setIsMounted(true);
|
|
50181
50430
|
}, []);
|
|
50182
50431
|
return jsxRuntime.jsxs("thead", {
|
|
50183
50432
|
className: "ff-table-tree-head",
|
|
50433
|
+
onMouseEnter: handleMouseEnter,
|
|
50434
|
+
onMouseLeave: handleMouseLeave,
|
|
50184
50435
|
children: [jsxRuntime.jsx("tr", {
|
|
50185
50436
|
className: "ff-table-tree-row no-hover",
|
|
50186
50437
|
children: columnsData.map(({
|
|
@@ -50225,7 +50476,7 @@ const TableHead = /*#__PURE__*/React.memo(({
|
|
|
50225
50476
|
return rootNode.cell(rootNode.node);
|
|
50226
50477
|
})()
|
|
50227
50478
|
})]
|
|
50228
|
-
}), rootNode.actions && index === 0 && isMounted && rootNodeRowRef.current && jsxRuntime.jsx("div", {
|
|
50479
|
+
}), didMouseEntered && rootNode.actions && index === 0 && isMounted && rootNodeRowRef.current && jsxRuntime.jsx("div", {
|
|
50229
50480
|
className: "table-tree-row-action",
|
|
50230
50481
|
children: (() => {
|
|
50231
50482
|
return rootNode.actions(rootNode.node, rootNodeRowRef);
|