@fileverse-dev/fortune-react 1.0.2-mod-39 → 1.0.2-mod-40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, onIframeMoveStart, onIframeResizeStart, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, sanitizeDuneUrl, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, insertDuneChart, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
1
+ import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
2
2
  import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
3
3
  import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
4
4
  import _ from 'lodash';
@@ -172,7 +172,7 @@ function _regenerator() {
172
172
  i = p[t],
173
173
  d = G.p,
174
174
  l = i[2];
175
- r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
175
+ r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
176
176
  }
177
177
  if (o || r > 1) return a;
178
178
  throw y = !0, n;
@@ -801,43 +801,49 @@ var FormulaSearch = function FormulaSearch(props) {
801
801
  justifyContent: "space-between"
802
802
  }
803
803
  }, /*#__PURE__*/React.createElement("div", {
804
- className: "luckysheet-formula-search-func text-body-sm"
804
+ className: "luckysheet-formula-search-func"
805
805
  }, v.n), /*#__PURE__*/React.createElement("div", {
806
806
  style: {
807
807
  display: "flex",
808
- justifyContent: "end",
809
- width: "68px",
810
- height: "20px",
811
- alignItems: "center",
812
808
  gap: "4px"
813
809
  }
814
810
  }, v.LOGO && (/*#__PURE__*/React.createElement("img", {
815
811
  src: v.LOGO,
816
812
  alt: "Service Logo",
817
- style: {
818
- width: "20px"
819
- }
813
+ width: 32,
814
+ height: 32
820
815
  })), v.API_KEY && (/*#__PURE__*/React.createElement("div", {
821
816
  style: {
822
817
  borderRadius: "4px",
823
- backgroundColor: "".concat(localStorage.getItem(v.API_KEY) ? "#177E23" : "#e8ebec"),
824
- width: "16px",
825
- height: "16px"
826
- },
827
- className: "flex justify-center"
818
+ width: "20px",
819
+ height: "20px",
820
+ backgroundColor: "".concat(localStorage.getItem(v.API_KEY) ? "#177E23" : "#F9A92B")
821
+ }
828
822
  }, /*#__PURE__*/React.createElement(LucideIcon, {
829
823
  name: "Key",
830
824
  style: {
831
- color: localStorage.getItem(v.API_KEY) ? "white" : "#77818A",
832
- width: "12px",
833
- height: "12px"
825
+ color: "white"
834
826
  }
835
827
  }))))), /*#__PURE__*/React.createElement("div", {
836
- className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm"
828
+ className: "luckysheet-formula-search-detail"
837
829
  }, v.d));
838
830
  }));
839
831
  };
840
832
 
833
+ function lightenHexColor(hex) {
834
+ var amount = 100;
835
+ if (hex.startsWith("#")) {
836
+ hex = hex.slice(1);
837
+ }
838
+ var r = parseInt(hex.slice(0, 2), 16);
839
+ var g = parseInt(hex.slice(2, 4), 16);
840
+ var b = parseInt(hex.slice(4, 6), 16);
841
+ r = Math.min(255, r + amount);
842
+ g = Math.min(255, g + amount);
843
+ b = Math.min(255, b + amount);
844
+ var newHex = "#".concat((1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase());
845
+ return newHex;
846
+ }
841
847
  var FormulaHint = function FormulaHint(props) {
842
848
  var _useContext = useContext(WorkbookContext),
843
849
  context = _useContext.context;
@@ -852,34 +858,13 @@ var FormulaHint = function FormulaHint(props) {
852
858
  _useState4 = _slicedToArray(_useState3, 2),
853
859
  showAPInput = _useState4[0],
854
860
  setShowAPInput = _useState4[1];
855
- var _useState5 = useState(!!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY)),
856
- _useState6 = _slicedToArray(_useState5, 2),
857
- isKeyAdded = _useState6[0],
858
- setApiKeyAdded = _useState6[1];
859
- var _useState7 = useState(false),
860
- _useState8 = _slicedToArray(_useState7, 2),
861
- showFunctionBody = _useState8[0],
862
- setShouldShowFunctionBody = _useState8[1];
863
- useEffect(function () {
864
- if (fn) {
865
- setApiKeyAdded(!!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY));
866
- setAPI_KEY(localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY) || "");
867
- setShowAPInput(!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY));
868
- }
869
- }, [fn]);
870
- var apiKeyPlaceholder = {
871
- ETHERSCAN_API_KEY: "Etherscan API key"
872
- };
873
861
  if (!fn) return null;
874
862
  return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, props), {}, {
875
863
  id: "luckysheet-formula-help-c",
876
864
  className: "luckysheet-formula-help-c",
877
865
  style: {
878
- borderWidth: "1px",
879
- borderColor: (fn === null || fn === void 0 ? void 0 : fn.BRAND_SECONDARY_COLOR) ? fn === null || fn === void 0 ? void 0 : fn.BRAND_SECONDARY_COLOR : "#F8F9FA",
880
- backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
881
- width: "340px",
882
- padding: "0px"
866
+ border: "1px solid ".concat(fn.BRAND_COLOR),
867
+ backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
883
868
  }
884
869
  }), /*#__PURE__*/React.createElement("div", {
885
870
  className: "luckysheet-formula-help-close",
@@ -894,25 +879,17 @@ var FormulaHint = function FormulaHint(props) {
894
879
  className: "fa fa-angle-up",
895
880
  "aria-hidden": "true"
896
881
  })), /*#__PURE__*/React.createElement("div", {
897
- onClick: function onClick() {
898
- setShouldShowFunctionBody(!showFunctionBody);
899
- },
900
- className: "flex cursor-pointer items-center justify-between",
882
+ className: "luckysheet-formula-help-title formula-title",
901
883
  style: {
902
- backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
903
- padding: "10px",
904
- borderRadius: "10px"
884
+ backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
905
885
  }
906
886
  }, /*#__PURE__*/React.createElement("div", {
907
- className: " flex-grow color-text-default"
908
- }, /*#__PURE__*/React.createElement("code", {
909
- style: {
910
- fontWeight: 500
911
- },
887
+ className: "luckysheet-formula-help-title-formula"
888
+ }, /*#__PURE__*/React.createElement("span", {
912
889
  className: "luckysheet-arguments-help-function-name"
913
- }, fn.n), /*#__PURE__*/React.createElement("code", {
890
+ }, fn.n), /*#__PURE__*/React.createElement("span", {
914
891
  className: "luckysheet-arguments-paren"
915
- }, "("), /*#__PURE__*/React.createElement("code", {
892
+ }, "("), /*#__PURE__*/React.createElement("span", {
916
893
  className: "luckysheet-arguments-parameter-holder"
917
894
  }, fn.p.map(function (param, i) {
918
895
  var name = param.name;
@@ -922,55 +899,43 @@ var FormulaHint = function FormulaHint(props) {
922
899
  if (param.require === "o") {
923
900
  name = "[".concat(name, "]");
924
901
  }
925
- return /*#__PURE__*/React.createElement("code", {
902
+ return /*#__PURE__*/React.createElement("span", {
926
903
  className: "luckysheet-arguments-help-parameter",
927
904
  dir: "auto",
928
905
  key: name
929
906
  }, name, i !== fn.p.length - 1 && ", ");
930
- })), /*#__PURE__*/React.createElement("code", {
907
+ })), /*#__PURE__*/React.createElement("span", {
931
908
  className: "luckysheet-arguments-paren"
932
909
  }, ")")), /*#__PURE__*/React.createElement("div", {
933
910
  style: {
934
911
  display: "flex",
935
- justifyContent: "end",
936
- width: "68px",
937
- height: "20px",
938
- alignItems: "center",
939
912
  gap: "4px"
940
913
  }
941
914
  }, fn.LOGO && (/*#__PURE__*/React.createElement("img", {
942
915
  src: fn.LOGO,
943
916
  alt: "Service Logo",
944
- style: {
945
- width: "20px"
946
- }
917
+ width: 32,
918
+ height: 32
947
919
  })), fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
948
920
  style: {
949
921
  borderRadius: "4px",
950
- backgroundColor: "".concat(isKeyAdded ? "#177E23" : "#e8ebec"),
951
- width: "16px",
952
- height: "16px"
953
- },
954
- className: "flex justify-center"
922
+ width: "20px",
923
+ height: "20px",
924
+ backgroundColor: "".concat(localStorage.getItem(fn.API_KEY) ? "#177E23" : "#F9A92B")
925
+ }
955
926
  }, /*#__PURE__*/React.createElement(LucideIcon, {
956
927
  name: "Key",
957
928
  style: {
958
- color: isKeyAdded ? "white" : "#77818A",
959
- width: "12px",
960
- height: "12px"
929
+ color: "white"
961
930
  }
962
- }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LucideIcon, {
963
- name: showFunctionBody ? "ChevronUp" : "ChevronDown",
964
- width: 16,
965
- height: 16
966
- })))), showFunctionBody && (/*#__PURE__*/React.createElement("div", {
931
+ }))))), /*#__PURE__*/React.createElement("div", {
967
932
  className: "luckysheet-formula-help-content",
968
933
  style: {
969
- backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA")
934
+ backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
970
935
  }
971
936
  }, fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
972
937
  style: {
973
- borderLeft: "4px solid ".concat(isKeyAdded ? "#177E23" : "#fb923c"),
938
+ borderLeft: "4px solid ".concat(API_KEY ? "#177E23" : "#fb923c"),
974
939
  backgroundColor: "white",
975
940
  padding: "16px",
976
941
  margin: "4px 4px 0px 4px",
@@ -987,40 +952,38 @@ var FormulaHint = function FormulaHint(props) {
987
952
  }
988
953
  }, /*#__PURE__*/React.createElement("h3", {
989
954
  style: {
955
+ fontSize: "14px",
956
+ fontWeight: "600",
957
+ color: "#1f2937",
990
958
  margin: "0 0 8px 0"
991
- },
992
- className: "text-heading-xsm color-text-default"
993
- }, isKeyAdded ? "API key provided" : "API key is required"), /*#__PURE__*/React.createElement(LucideIcon, {
994
- name: showAPInput ? "ChevronUp" : "ChevronDown",
959
+ }
960
+ }, "API key is required"), /*#__PURE__*/React.createElement(LucideIcon, {
961
+ name: "ChevronDown",
995
962
  width: 24,
996
963
  height: 24
997
964
  })), showAPInput && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
998
965
  style: {
966
+ color: "#6b7280",
999
967
  margin: "0 0 16px 0"
1000
- },
1001
- className: "text-body-sm color-text-default"
1002
- }, "This function requires an API key. Please paste it below and\n press 'Ok'."), /*#__PURE__*/React.createElement("div", {
1003
- className: "w-full"
968
+ }
969
+ }, "This function is require API key. Please paste it below and\n press 'Ok'."), /*#__PURE__*/React.createElement("div", {
970
+ style: {
971
+ display: "flex",
972
+ gap: "12px"
973
+ }
1004
974
  }, /*#__PURE__*/React.createElement(TextField, {
1005
975
  value: API_KEY,
1006
976
  id: "function-api-key",
1007
977
  type: "text",
1008
- placeholder: apiKeyPlaceholder[fn.API_KEY],
978
+ placeholder: "API key",
1009
979
  onChange: function onChange(e) {
1010
980
  setAPI_KEY(e.target.value);
1011
- setApiKeyAdded(false);
1012
981
  }
1013
- }), /*#__PURE__*/React.createElement("div", {
1014
- className: "flex justify-end mt-2"
1015
- }, /*#__PURE__*/React.createElement(Button$1, {
982
+ }), /*#__PURE__*/React.createElement(Button$1, {
1016
983
  onClick: function onClick() {
1017
984
  localStorage.setItem(fn.API_KEY, API_KEY);
1018
- setApiKeyAdded(true);
1019
- setShowAPInput(false);
1020
- },
1021
- disabled: !API_KEY,
1022
- className: "min-w-[80px]"
1023
- }, "Ok"))))))), /*#__PURE__*/React.createElement("div", {
985
+ }
986
+ }, "Ok")))))), /*#__PURE__*/React.createElement("div", {
1024
987
  style: {
1025
988
  backgroundColor: "white",
1026
989
  padding: "6px",
@@ -1028,20 +991,13 @@ var FormulaHint = function FormulaHint(props) {
1028
991
  borderRadius: "4px"
1029
992
  }
1030
993
  }, /*#__PURE__*/React.createElement("div", {
1031
- className: ""
994
+ className: "luckysheet-formula-help-content-example"
1032
995
  }, /*#__PURE__*/React.createElement("div", {
1033
- style: {
1034
- lineHeight: "16px",
1035
- fontSize: "12px"
1036
- },
1037
- className: "text-body-sm-bold mb-1 color-text-secondary"
1038
- }, formulaMore.helpExample), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", {
1039
- style: {
1040
- overflowWrap: "break-word"
1041
- },
1042
- className: "example-value-code"
996
+ className: "luckysheet-arguments-help-section-title example-title"
997
+ }, formulaMore.helpExample), /*#__PURE__*/React.createElement("div", {
998
+ className: "luckysheet-arguments-help-formula"
1043
999
  }, /*#__PURE__*/React.createElement("span", {
1044
- className: "luckysheet-arguments-help-function-name"
1000
+ className: "luckysheet-arguments-help-function-name example-value"
1045
1001
  }, fn.n), /*#__PURE__*/React.createElement("span", {
1046
1002
  className: "luckysheet-arguments-paren"
1047
1003
  }, "("), /*#__PURE__*/React.createElement("span", {
@@ -1054,32 +1010,26 @@ var FormulaHint = function FormulaHint(props) {
1054
1010
  }, param.example, i !== fn.p.length - 1 && ", ");
1055
1011
  })), /*#__PURE__*/React.createElement("span", {
1056
1012
  className: "luckysheet-arguments-paren"
1057
- }, ")")))), /*#__PURE__*/React.createElement("div", {
1013
+ }, ")"))), /*#__PURE__*/React.createElement("div", {
1058
1014
  className: "luckysheet-formula-help-content-detail",
1059
1015
  style: {
1060
- paddingBottom: "16px"
1016
+ paddingBottom: "6px"
1061
1017
  }
1062
1018
  }, /*#__PURE__*/React.createElement("div", {
1063
- className: ""
1019
+ className: "luckysheet-arguments-help-section"
1064
1020
  }, /*#__PURE__*/React.createElement("div", {
1065
- style: {
1066
- lineHeight: "16px",
1067
- fontSize: "12px",
1068
- padding: "0px"
1069
- },
1070
- className: "text-body-sm-bold mb-1 mt-2 color-text-secondary"
1021
+ className: "luckysheet-arguments-help-section-title luckysheet-arguments-help-parameter-name example-title"
1071
1022
  }, "About"), /*#__PURE__*/React.createElement("span", {
1072
- className: "luckysheet-arguments-help-parameter-content text-helper-text-sm"
1023
+ className: "luckysheet-arguments-help-parameter-content example-value"
1073
1024
  }, fn.d))), /*#__PURE__*/React.createElement("div", {
1074
- style: {
1075
- paddingTop: "16px"
1076
- },
1077
1025
  className: "luckysheet-formula-help-content-param"
1078
1026
  }, fn.p.map(function (param) {
1079
1027
  return /*#__PURE__*/React.createElement("div", {
1080
- className: "",
1028
+ className: "luckysheet-arguments-help-section",
1081
1029
  key: param.name
1082
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", null, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
1030
+ }, /*#__PURE__*/React.createElement("div", {
1031
+ className: "luckysheet-arguments-help-section-title example-title"
1032
+ }, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
1083
1033
  className: "luckysheet-arguments-help-argument-info example-value",
1084
1034
  style: {
1085
1035
  marginTop: "2px"
@@ -1089,23 +1039,15 @@ var FormulaHint = function FormulaHint(props) {
1089
1039
  style: {
1090
1040
  marginTop: "2px"
1091
1041
  }
1092
- }, "-[", formulaMore.allowOptionText, "]")))), /*#__PURE__*/React.createElement("span", {
1093
- className: "luckysheet-arguments-help-parameter-content text-helper-text-sm",
1042
+ }, "-[", formulaMore.allowOptionText, "]"))), /*#__PURE__*/React.createElement("span", {
1043
+ className: "luckysheet-arguments-help-parameter-content example-value",
1094
1044
  style: {
1095
1045
  marginTop: "2px"
1096
1046
  }
1097
1047
  }, param.detail));
1098
- }))))), /*#__PURE__*/React.createElement("div", {
1099
- style: {
1100
- backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
1101
- padding: "8px",
1102
- borderBottomLeftRadius: "10px",
1103
- borderBottomRightRadius: "10px"
1104
- },
1105
- className: "w-full"
1106
- }, /*#__PURE__*/React.createElement("p", {
1107
- className: "color-text-link text-helper-text-sm"
1108
- }, "Learn More")));
1048
+ })))), /*#__PURE__*/React.createElement("div", {
1049
+ className: "luckysheet-formula-help-foot"
1050
+ }));
1109
1051
  };
1110
1052
 
1111
1053
  function usePrevious(value) {
@@ -1251,48 +1193,6 @@ var InputBox = function InputBox() {
1251
1193
  e.stopPropagation();
1252
1194
  }
1253
1195
  }, [getActiveFormula, setContext]);
1254
- var selectActiveFormulaOnClick = useCallback(function (e) {
1255
- var activeFormula = getActiveFormula();
1256
- var formulaNameDiv = activeFormula === null || activeFormula === void 0 ? void 0 : activeFormula.querySelector(".luckysheet-formula-search-func");
1257
- if (formulaNameDiv) {
1258
- var formulaName = formulaNameDiv.textContent;
1259
- var textEditor = document.getElementById("luckysheet-rich-text-editor");
1260
- if (textEditor) {
1261
- var _getrangeseleciton2;
1262
- var searchTxt = ((_getrangeseleciton2 = getrangeseleciton()) === null || _getrangeseleciton2 === void 0 ? void 0 : _getrangeseleciton2.textContent) || "";
1263
- var deleteCount = searchTxt.length;
1264
- textEditor.focus();
1265
- var selection = window.getSelection();
1266
- if ((selection === null || selection === void 0 ? void 0 : selection.rangeCount) === 0) return;
1267
- var range = selection === null || selection === void 0 ? void 0 : selection.getRangeAt(0);
1268
- if (deleteCount !== 0 && range) {
1269
- var startOffset = Math.max(range.startOffset - deleteCount, 0);
1270
- var endOffset = range.startOffset;
1271
- range.setStart(range.startContainer, startOffset);
1272
- range.setEnd(range.startContainer, endOffset);
1273
- range.deleteContents();
1274
- }
1275
- var functionStr = "<span dir=\"auto\" class=\"luckysheet-formula-text-func\">".concat(formulaName, "</span>");
1276
- var lParStr = "<span dir=\"auto\" class=\"luckysheet-formula-text-lpar\">(</span>";
1277
- var functionNode = new DOMParser().parseFromString(functionStr, "text/html").body.childNodes[0];
1278
- var lParNode = new DOMParser().parseFromString(lParStr, "text/html").body.childNodes[0];
1279
- if (range === null || range === void 0 ? void 0 : range.startContainer.parentNode) {
1280
- range === null || range === void 0 ? void 0 : range.setStart(range.startContainer.parentNode, 1);
1281
- }
1282
- range === null || range === void 0 ? void 0 : range.insertNode(lParNode);
1283
- range === null || range === void 0 ? void 0 : range.insertNode(functionNode);
1284
- range === null || range === void 0 ? void 0 : range.collapse();
1285
- selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();
1286
- if (range) selection === null || selection === void 0 ? void 0 : selection.addRange(range);
1287
- setContext(function (draftCtx) {
1288
- draftCtx.functionCandidates = [];
1289
- draftCtx.functionHint = formulaName;
1290
- });
1291
- }
1292
- e.preventDefault();
1293
- e.stopPropagation();
1294
- }
1295
- }, [getActiveFormula, setContext]);
1296
1196
  var onKeyDown = useCallback(function (e) {
1297
1197
  lastKeyDownEventRef.current = new KeyboardEvent(e.type, e.nativeEvent);
1298
1198
  preText.current = inputRef.current.innerText;
@@ -1412,18 +1312,6 @@ var InputBox = function InputBox() {
1412
1312
  })), document.activeElement === inputRef.current && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
1413
1313
  style: {
1414
1314
  top: ((firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.height_move) || 0) + 4
1415
- },
1416
- onMouseOver: function onMouseOver(e) {
1417
- if (document.getElementById("luckysheet-formula-search-c")) {
1418
- var hoveredItem = e.target.closest(".luckysheet-formula-search-item");
1419
- if (!hoveredItem) return;
1420
- clearSearchItemActiveClass();
1421
- hoveredItem.classList.add("luckysheet-formula-search-item-active");
1422
- }
1423
- e.preventDefault();
1424
- },
1425
- onClick: function onClick(e) {
1426
- selectActiveFormulaOnClick(e);
1427
1315
  }
1428
1316
  }), /*#__PURE__*/React.createElement(FormulaHint, {
1429
1317
  style: {
@@ -2559,18 +2447,8 @@ function useDialog() {
2559
2447
  };
2560
2448
  }
2561
2449
 
2562
- var datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
2563
- var injectDatepickerStyles = function injectDatepickerStyles() {
2564
- if (typeof document !== "undefined") {
2565
- var styleSheet = document.createElement("style");
2566
- styleSheet.textContent = datepickerStyles;
2567
- document.head.appendChild(styleSheet);
2568
- }
2569
- };
2570
-
2571
- injectDatepickerStyles();
2572
2450
  var DataVerification = function DataVerification() {
2573
- var _context$dataVerifica, _context$dataVerifica2, _context$dataVerifica3, _context$dataVerifica4, _context$dataVerifica5, _context$dataVerifica6, _context$dataVerifica7, _context$dataVerifica8, _context$dataVerifica9, _context$dataVerifica0, _context$dataVerifica1, _context$dataVerifica10, _context$dataVerifica11;
2451
+ var _context$dataVerifica, _context$dataVerifica2, _context$dataVerifica3, _context$dataVerifica4, _context$dataVerifica5, _context$dataVerifica6, _context$dataVerifica7, _context$dataVerifica8, _context$dataVerifica9, _context$dataVerifica0, _context$dataVerifica1, _context$dataVerifica10, _context$dataVerifica11, _context$dataVerifica12, _context$dataVerifica13, _context$dataVerifica14, _context$dataVerifica15, _context$dataVerifica16, _context$dataVerifica17, _context$dataVerifica18, _context$dataVerifica19, _context$dataVerifica20, _context$dataVerifica21, _context$dataVerifica22, _context$dataVerifica23;
2574
2452
  var _useContext = useContext(WorkbookContext),
2575
2453
  context = _useContext.context,
2576
2454
  setContext = _useContext.setContext;
@@ -2579,11 +2457,15 @@ var DataVerification = function DataVerification() {
2579
2457
  hideDialog = _useDialog.hideDialog;
2580
2458
  var _locale = locale(context),
2581
2459
  dataVerification = _locale.dataVerification,
2460
+ toolbar = _locale.toolbar,
2582
2461
  button = _locale.button,
2583
2462
  generalDialog = _locale.generalDialog;
2584
- var _useState = useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
2463
+ var _useState = useState(["between", "notBetween", "equal", "notEqualTo", "moreThanThe", "lessThan", "greaterOrEqualTo", "lessThanOrEqualTo"]),
2585
2464
  _useState2 = _slicedToArray(_useState, 1),
2586
- dateCondition = _useState2[0];
2465
+ numberCondition = _useState2[0];
2466
+ var _useState3 = useState(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"]),
2467
+ _useState4 = _slicedToArray(_useState3, 1),
2468
+ dateCondition = _useState4[0];
2587
2469
  var dataSelectRange = useCallback(function (type, value) {
2588
2470
  hideDialog();
2589
2471
  setContext(function (ctx) {
@@ -2718,36 +2600,48 @@ var DataVerification = function DataVerification() {
2718
2600
  return /*#__PURE__*/React.createElement("div", {
2719
2601
  id: "fortune-data-verification"
2720
2602
  }, /*#__PURE__*/React.createElement("div", {
2721
- className: "flex flex-col gap-4"
2603
+ className: "title"
2604
+ }, toolbar.dataVerification), /*#__PURE__*/React.createElement("div", {
2605
+ className: "box"
2722
2606
  }, /*#__PURE__*/React.createElement("div", {
2723
- className: "flex flex-col"
2607
+ className: "box-item",
2608
+ style: {
2609
+ borderTop: "1px solid #E1E4E8"
2610
+ }
2724
2611
  }, /*#__PURE__*/React.createElement("div", {
2725
- className: "text-heading-xsm mb-2"
2726
- }, dataVerification.cellRange), /*#__PURE__*/React.createElement(TextField, {
2727
- rightIcon: /*#__PURE__*/React.createElement(LucideIcon, {
2728
- name: "Grid2x2",
2729
- size: "sm"
2730
- }),
2731
- "aria-hidden": "true",
2732
- readOnly: true,
2612
+ className: "box-item-title"
2613
+ }, dataVerification.cellRange), /*#__PURE__*/React.createElement("div", {
2614
+ className: "data-verification-range"
2615
+ }, /*#__PURE__*/React.createElement("input", {
2616
+ className: "formulaInputFocus",
2617
+ spellCheck: "false",
2733
2618
  value: (_context$dataVerifica = context.dataVerification.dataRegulation) === null || _context$dataVerifica === void 0 ? void 0 : _context$dataVerifica.rangeTxt,
2734
2619
  onChange: function onChange(e) {
2735
2620
  var value = e.target.value;
2736
2621
  setContext(function (ctx) {
2737
2622
  ctx.dataVerification.dataRegulation.rangeTxt = value;
2738
2623
  });
2739
- },
2624
+ }
2625
+ }), /*#__PURE__*/React.createElement("i", {
2626
+ className: "icon",
2627
+ "aria-hidden": "true",
2740
2628
  onClick: function onClick() {
2741
2629
  hideDialog();
2742
2630
  dataSelectRange("rangeTxt", context.dataVerification.dataRegulation.value1);
2743
- }
2744
- })), /*#__PURE__*/React.createElement("div", {
2745
- className: "flex flex-col"
2631
+ },
2632
+ tabIndex: 0
2633
+ }, /*#__PURE__*/React.createElement(SVGIcon, {
2634
+ name: "tab",
2635
+ width: 18
2636
+ })))), /*#__PURE__*/React.createElement("div", {
2637
+ className: "box-item"
2746
2638
  }, /*#__PURE__*/React.createElement("div", {
2747
- className: "text-heading-xsm mb-2"
2748
- }, dataVerification.verificationCondition), /*#__PURE__*/React.createElement(Select$1, {
2639
+ className: "box-item-title"
2640
+ }, dataVerification.verificationCondition), /*#__PURE__*/React.createElement("select", {
2641
+ className: "data-verification-type-select",
2749
2642
  value: context.dataVerification.dataRegulation.type,
2750
- onValueChange: function onValueChange(value) {
2643
+ onChange: function onChange(e) {
2644
+ var value = e.target.value;
2751
2645
  setContext(function (ctx) {
2752
2646
  ctx.dataVerification.dataRegulation.type = value;
2753
2647
  if (value === "dropdown" || value === "checkbox") {
@@ -2763,14 +2657,18 @@ var DataVerification = function DataVerification() {
2763
2657
  ctx.dataVerification.dataRegulation.value2 = "";
2764
2658
  });
2765
2659
  }
2766
- }, /*#__PURE__*/React.createElement(SelectTrigger, null, /*#__PURE__*/React.createElement(SelectValue, null)), /*#__PURE__*/React.createElement(SelectContent, null, ["dropdown", "checkbox", "date"].map(function (v) {
2767
- return /*#__PURE__*/React.createElement(SelectItem$1, {
2660
+ }, ["dropdown", "checkbox", "number", "number_integer", "number_decimal", "text_content", "text_length", "date", "validity"].map(function (v) {
2661
+ return /*#__PURE__*/React.createElement("option", {
2768
2662
  value: v,
2769
2663
  key: v
2770
2664
  }, dataVerification[v]);
2771
- }))), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && (/*#__PURE__*/React.createElement("div", {
2772
- className: "mt-4"
2773
- }, /*#__PURE__*/React.createElement(TextField, {
2665
+ })), ((_context$dataVerifica2 = context.dataVerification) === null || _context$dataVerifica2 === void 0 ? void 0 : (_context$dataVerifica3 = _context$dataVerifica2.dataRegulation) === null || _context$dataVerifica3 === void 0 ? void 0 : _context$dataVerifica3.type) === "dropdown" && (/*#__PURE__*/React.createElement("div", {
2666
+ className: "show-box-item"
2667
+ }, /*#__PURE__*/React.createElement("div", {
2668
+ className: "data-verification-range"
2669
+ }, /*#__PURE__*/React.createElement("input", {
2670
+ className: "formulaInputFocus",
2671
+ spellCheck: "false",
2774
2672
  value: context.dataVerification.dataRegulation.value1,
2775
2673
  placeholder: dataVerification.placeholder1,
2776
2674
  onChange: function onChange(e) {
@@ -2779,28 +2677,39 @@ var DataVerification = function DataVerification() {
2779
2677
  ctx.dataVerification.dataRegulation.value1 = value;
2780
2678
  });
2781
2679
  }
2782
- }), /*#__PURE__*/React.createElement("div", {
2783
- className: "mt-4 flex items-center"
2784
- }, /*#__PURE__*/React.createElement(Checkbox, {
2785
- className: "border-2",
2680
+ }), /*#__PURE__*/React.createElement("i", {
2681
+ className: "icon",
2682
+ "aria-hidden": "true",
2683
+ onClick: function onClick() {
2684
+ return dataSelectRange("dropDown", context.dataVerification.dataRegulation.value1);
2685
+ },
2686
+ tabIndex: 0
2687
+ }, /*#__PURE__*/React.createElement(SVGIcon, {
2688
+ name: "tab",
2689
+ width: 18
2690
+ }))), /*#__PURE__*/React.createElement("div", {
2691
+ className: "check"
2692
+ }, /*#__PURE__*/React.createElement("input", {
2693
+ type: "checkbox",
2786
2694
  checked: context.dataVerification.dataRegulation.type2 === "true",
2787
- onCheckedChange: function onCheckedChange(e) {
2695
+ id: "mul",
2696
+ onChange: function onChange(e) {
2788
2697
  var checked = e.target.checked;
2789
2698
  setContext(function (ctx) {
2790
2699
  ctx.dataVerification.dataRegulation.type2 = "".concat(checked);
2791
2700
  });
2792
2701
  }
2793
- }), /*#__PURE__*/React.createElement("span", {
2794
- className: "ml-2"
2702
+ }), /*#__PURE__*/React.createElement("label", {
2703
+ htmlFor: "mul"
2795
2704
  }, dataVerification.allowMultiSelect)))), ((_context$dataVerifica4 = context.dataVerification) === null || _context$dataVerifica4 === void 0 ? void 0 : (_context$dataVerifica5 = _context$dataVerifica4.dataRegulation) === null || _context$dataVerifica5 === void 0 ? void 0 : _context$dataVerifica5.type) === "checkbox" && (/*#__PURE__*/React.createElement("div", {
2796
- className: "mt-4 space-y-2"
2705
+ className: "show-box-item"
2797
2706
  }, /*#__PURE__*/React.createElement("div", {
2798
- className: "flex items-center gap-2"
2799
- }, /*#__PURE__*/React.createElement("span", {
2800
- className: "data-verification-checkbox-label"
2801
- }, dataVerification.selected), /*#__PURE__*/React.createElement(TextField, {
2802
- value: (_context$dataVerifica6 = context.dataVerification) === null || _context$dataVerifica6 === void 0 ? void 0 : (_context$dataVerifica7 = _context$dataVerifica6.dataRegulation) === null || _context$dataVerifica7 === void 0 ? void 0 : _context$dataVerifica7.value1,
2707
+ className: "check-box"
2708
+ }, /*#__PURE__*/React.createElement("span", null, dataVerification.selected, " \u2014\u2014 "), /*#__PURE__*/React.createElement("input", {
2709
+ type: "text",
2710
+ className: "data-verification-value1",
2803
2711
  placeholder: dataVerification.placeholder2,
2712
+ value: (_context$dataVerifica6 = context.dataVerification) === null || _context$dataVerifica6 === void 0 ? void 0 : (_context$dataVerifica7 = _context$dataVerifica6.dataRegulation) === null || _context$dataVerifica7 === void 0 ? void 0 : _context$dataVerifica7.value1,
2804
2713
  onChange: function onChange(e) {
2805
2714
  var value = e.target.value;
2806
2715
  setContext(function (ctx) {
@@ -2808,41 +2717,41 @@ var DataVerification = function DataVerification() {
2808
2717
  });
2809
2718
  }
2810
2719
  })), /*#__PURE__*/React.createElement("div", {
2811
- className: "flex items-center gap-2"
2812
- }, /*#__PURE__*/React.createElement("span", {
2813
- className: "data-verification-checkbox-label"
2814
- }, dataVerification.notSelected), /*#__PURE__*/React.createElement(TextField, {
2815
- value: (_context$dataVerifica8 = context.dataVerification) === null || _context$dataVerifica8 === void 0 ? void 0 : (_context$dataVerifica9 = _context$dataVerifica8.dataRegulation) === null || _context$dataVerifica9 === void 0 ? void 0 : _context$dataVerifica9.value2,
2720
+ className: "check-box"
2721
+ }, /*#__PURE__*/React.createElement("span", null, dataVerification.notSelected, " \u2014\u2014 "), /*#__PURE__*/React.createElement("input", {
2722
+ type: "text",
2723
+ className: "data-verification-value2",
2816
2724
  placeholder: dataVerification.placeholder2,
2725
+ value: (_context$dataVerifica8 = context.dataVerification) === null || _context$dataVerifica8 === void 0 ? void 0 : (_context$dataVerifica9 = _context$dataVerifica8.dataRegulation) === null || _context$dataVerifica9 === void 0 ? void 0 : _context$dataVerifica9.value2,
2817
2726
  onChange: function onChange(e) {
2818
2727
  var value = e.target.value;
2819
2728
  setContext(function (ctx) {
2820
2729
  ctx.dataVerification.dataRegulation.value2 = value;
2821
2730
  });
2822
2731
  }
2823
- })))), ((_context$dataVerifica0 = context.dataVerification) === null || _context$dataVerifica0 === void 0 ? void 0 : (_context$dataVerifica1 = _context$dataVerifica0.dataRegulation) === null || _context$dataVerifica1 === void 0 ? void 0 : _context$dataVerifica1.type) === "date" && (/*#__PURE__*/React.createElement("div", {
2824
- className: "mt-4"
2825
- }, /*#__PURE__*/React.createElement(Select$1, {
2732
+ })))), (((_context$dataVerifica0 = context.dataVerification) === null || _context$dataVerifica0 === void 0 ? void 0 : (_context$dataVerifica1 = _context$dataVerifica0.dataRegulation) === null || _context$dataVerifica1 === void 0 ? void 0 : _context$dataVerifica1.type) === "number" || ((_context$dataVerifica10 = context.dataVerification) === null || _context$dataVerifica10 === void 0 ? void 0 : (_context$dataVerifica11 = _context$dataVerifica10.dataRegulation) === null || _context$dataVerifica11 === void 0 ? void 0 : _context$dataVerifica11.type) === "number_integer" || ((_context$dataVerifica12 = context.dataVerification) === null || _context$dataVerifica12 === void 0 ? void 0 : (_context$dataVerifica13 = _context$dataVerifica12.dataRegulation) === null || _context$dataVerifica13 === void 0 ? void 0 : _context$dataVerifica13.type) === "number_decimal" || ((_context$dataVerifica14 = context.dataVerification) === null || _context$dataVerifica14 === void 0 ? void 0 : (_context$dataVerifica15 = _context$dataVerifica14.dataRegulation) === null || _context$dataVerifica15 === void 0 ? void 0 : _context$dataVerifica15.type) === "text_length") && (/*#__PURE__*/React.createElement("div", {
2733
+ className: "show-box-item"
2734
+ }, /*#__PURE__*/React.createElement("select", {
2735
+ className: "data-verification-type-select",
2826
2736
  value: context.dataVerification.dataRegulation.type2,
2827
- onValueChange: function onValueChange(value) {
2737
+ onChange: function onChange(e) {
2738
+ var value = e.target.value;
2828
2739
  setContext(function (ctx) {
2829
2740
  ctx.dataVerification.dataRegulation.type2 = value;
2830
2741
  ctx.dataVerification.dataRegulation.value1 = "";
2831
2742
  ctx.dataVerification.dataRegulation.value2 = "";
2832
2743
  });
2833
2744
  }
2834
- }, /*#__PURE__*/React.createElement(SelectTrigger, null, /*#__PURE__*/React.createElement(SelectValue, null)), /*#__PURE__*/React.createElement(SelectContent, null, dateCondition.map(function (v) {
2835
- return /*#__PURE__*/React.createElement(SelectItem$1, {
2745
+ }, numberCondition.map(function (v) {
2746
+ return /*#__PURE__*/React.createElement("option", {
2836
2747
  value: v,
2837
2748
  key: v
2838
2749
  }, dataVerification[v]);
2839
- }))), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
2840
- className: "mt-4 flex gap-2 items-center"
2841
- }, /*#__PURE__*/React.createElement("div", {
2842
- className: "datepicker-toggle"
2750
+ })), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
2751
+ className: "input-box"
2843
2752
  }, /*#__PURE__*/React.createElement("input", {
2844
- type: "date",
2845
- className: "datepicker-input",
2753
+ type: "number",
2754
+ placeholder: "1",
2846
2755
  value: context.dataVerification.dataRegulation.value1,
2847
2756
  onChange: function onChange(e) {
2848
2757
  var value = e.target.value;
@@ -2850,13 +2759,97 @@ var DataVerification = function DataVerification() {
2850
2759
  ctx.dataVerification.dataRegulation.value1 = value;
2851
2760
  });
2852
2761
  }
2853
- }), /*#__PURE__*/React.createElement("span", {
2854
- className: "datepicker-toggle-button"
2855
- })), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("div", {
2856
- className: "datepicker-toggle"
2762
+ }), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("input", {
2763
+ type: "number",
2764
+ placeholder: "100",
2765
+ value: context.dataVerification.dataRegulation.value2,
2766
+ onChange: function onChange(e) {
2767
+ var value = e.target.value;
2768
+ setContext(function (ctx) {
2769
+ ctx.dataVerification.dataRegulation.value2 = value;
2770
+ });
2771
+ }
2772
+ }))) : (/*#__PURE__*/React.createElement("div", {
2773
+ className: "input-box"
2774
+ }, /*#__PURE__*/React.createElement("input", {
2775
+ type: "number",
2776
+ style: {
2777
+ width: "100%"
2778
+ },
2779
+ placeholder: dataVerification.placeholder3,
2780
+ value: context.dataVerification.dataRegulation.value1,
2781
+ onChange: function onChange(e) {
2782
+ var value = e.target.value;
2783
+ setContext(function (ctx) {
2784
+ ctx.dataVerification.dataRegulation.value1 = value;
2785
+ });
2786
+ }
2787
+ }))))), ((_context$dataVerifica16 = context.dataVerification) === null || _context$dataVerifica16 === void 0 ? void 0 : (_context$dataVerifica17 = _context$dataVerifica16.dataRegulation) === null || _context$dataVerifica17 === void 0 ? void 0 : _context$dataVerifica17.type) === "text_content" && (/*#__PURE__*/React.createElement("div", {
2788
+ className: "show-box-item"
2789
+ }, /*#__PURE__*/React.createElement("select", {
2790
+ className: "data-verification-type-select",
2791
+ value: context.dataVerification.dataRegulation.type2,
2792
+ onChange: function onChange(e) {
2793
+ var value = e.target.value;
2794
+ setContext(function (ctx) {
2795
+ ctx.dataVerification.dataRegulation.type2 = value;
2796
+ ctx.dataVerification.dataRegulation.value1 = "";
2797
+ ctx.dataVerification.dataRegulation.value2 = "";
2798
+ });
2799
+ }
2800
+ }, ["include", "exclude", "equal"].map(function (v) {
2801
+ return /*#__PURE__*/React.createElement("option", {
2802
+ value: v,
2803
+ key: v
2804
+ }, dataVerification[v]);
2805
+ })), /*#__PURE__*/React.createElement("div", {
2806
+ className: "input-box"
2807
+ }, /*#__PURE__*/React.createElement("input", {
2808
+ type: "text",
2809
+ style: {
2810
+ width: "100%"
2811
+ },
2812
+ placeholder: dataVerification.placeholder4,
2813
+ value: context.dataVerification.dataRegulation.value1,
2814
+ onChange: function onChange(e) {
2815
+ var value = e.target.value;
2816
+ setContext(function (ctx) {
2817
+ ctx.dataVerification.dataRegulation.value1 = value;
2818
+ });
2819
+ }
2820
+ })))), ((_context$dataVerifica18 = context.dataVerification) === null || _context$dataVerifica18 === void 0 ? void 0 : (_context$dataVerifica19 = _context$dataVerifica18.dataRegulation) === null || _context$dataVerifica19 === void 0 ? void 0 : _context$dataVerifica19.type) === "date" && (/*#__PURE__*/React.createElement("div", {
2821
+ className: "show-box-item"
2822
+ }, /*#__PURE__*/React.createElement("select", {
2823
+ className: "data-verification-type-select",
2824
+ value: context.dataVerification.dataRegulation.type2,
2825
+ onChange: function onChange(e) {
2826
+ var value = e.target.value;
2827
+ setContext(function (ctx) {
2828
+ ctx.dataVerification.dataRegulation.type2 = value;
2829
+ ctx.dataVerification.dataRegulation.value1 = "";
2830
+ ctx.dataVerification.dataRegulation.value2 = "";
2831
+ });
2832
+ }
2833
+ }, dateCondition.map(function (v) {
2834
+ return /*#__PURE__*/React.createElement("option", {
2835
+ value: v,
2836
+ key: v
2837
+ }, dataVerification[v]);
2838
+ })), context.dataVerification.dataRegulation.type2 === "between" || context.dataVerification.dataRegulation.type2 === "notBetween" ? (/*#__PURE__*/React.createElement("div", {
2839
+ className: "input-box"
2857
2840
  }, /*#__PURE__*/React.createElement("input", {
2858
2841
  type: "date",
2859
- className: "datepicker-input",
2842
+ placeholder: "1",
2843
+ value: context.dataVerification.dataRegulation.value1,
2844
+ onChange: function onChange(e) {
2845
+ var value = e.target.value;
2846
+ setContext(function (ctx) {
2847
+ ctx.dataVerification.dataRegulation.value1 = value;
2848
+ });
2849
+ }
2850
+ }), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("input", {
2851
+ type: "date",
2852
+ placeholder: "100",
2860
2853
  value: context.dataVerification.dataRegulation.value2,
2861
2854
  onChange: function onChange(e) {
2862
2855
  var value = e.target.value;
@@ -2864,15 +2857,13 @@ var DataVerification = function DataVerification() {
2864
2857
  ctx.dataVerification.dataRegulation.value2 = value;
2865
2858
  });
2866
2859
  }
2867
- }), /*#__PURE__*/React.createElement("span", {
2868
- className: "datepicker-toggle-button"
2869
- })))) : (/*#__PURE__*/React.createElement("div", {
2870
- className: "mt-4"
2871
- }, /*#__PURE__*/React.createElement("div", {
2872
- className: "datepicker-toggle"
2860
+ }))) : (/*#__PURE__*/React.createElement("div", {
2861
+ className: "input-box"
2873
2862
  }, /*#__PURE__*/React.createElement("input", {
2874
2863
  type: "date",
2875
- className: "datepicker-input",
2864
+ style: {
2865
+ width: "100%"
2866
+ },
2876
2867
  placeholder: dataVerification.placeholder3,
2877
2868
  value: context.dataVerification.dataRegulation.value1,
2878
2869
  onChange: function onChange(e) {
@@ -2881,35 +2872,57 @@ var DataVerification = function DataVerification() {
2881
2872
  ctx.dataVerification.dataRegulation.value1 = value;
2882
2873
  });
2883
2874
  }
2884
- }), /*#__PURE__*/React.createElement("span", {
2885
- className: "datepicker-toggle-button"
2886
- }))))))), /*#__PURE__*/React.createElement(Divider$2, {
2887
- className: "w-full border-t-[1px]"
2888
- }), /*#__PURE__*/React.createElement("div", {
2889
- className: "flex flex-col gap-2"
2875
+ }))))), ((_context$dataVerifica20 = context.dataVerification) === null || _context$dataVerifica20 === void 0 ? void 0 : (_context$dataVerifica21 = _context$dataVerifica20.dataRegulation) === null || _context$dataVerifica21 === void 0 ? void 0 : _context$dataVerifica21.type) === "validity" && (/*#__PURE__*/React.createElement("div", {
2876
+ className: "show-box-item"
2877
+ }, /*#__PURE__*/React.createElement("select", {
2878
+ className: "data-verification-type-select",
2879
+ value: context.dataVerification.dataRegulation.type2,
2880
+ onChange: function onChange(e) {
2881
+ var value = e.target.value;
2882
+ setContext(function (ctx) {
2883
+ ctx.dataVerification.dataRegulation.type2 = value;
2884
+ ctx.dataVerification.dataRegulation.value1 = "";
2885
+ ctx.dataVerification.dataRegulation.value2 = "";
2886
+ });
2887
+ }
2888
+ }, ["identificationNumber", "phoneNumber"].map(function (v) {
2889
+ return /*#__PURE__*/React.createElement("option", {
2890
+ value: v,
2891
+ key: v
2892
+ }, dataVerification[v]);
2893
+ }))))), /*#__PURE__*/React.createElement("div", {
2894
+ className: "box-item"
2890
2895
  }, ["prohibitInput", "hintShow"].map(function (v) {
2891
2896
  return /*#__PURE__*/React.createElement("div", {
2892
- key: v,
2893
- className: "flex items-center"
2894
- }, /*#__PURE__*/React.createElement(Checkbox, {
2895
- className: "border-2",
2897
+ className: "check",
2898
+ key: "div".concat(v)
2899
+ }, /*#__PURE__*/React.createElement("input", {
2900
+ type: "checkbox",
2901
+ id: v,
2902
+ key: "input".concat(v),
2896
2903
  checked: context.dataVerification.dataRegulation[v],
2897
- onCheckedChange: function onCheckedChange(e) {
2898
- var checked = e.target.checked;
2904
+ onChange: function onChange() {
2899
2905
  setContext(function (ctx) {
2900
2906
  var _ctx$dataVerification5;
2901
2907
  var dataRegulation = (_ctx$dataVerification5 = ctx.dataVerification) === null || _ctx$dataVerification5 === void 0 ? void 0 : _ctx$dataVerification5.dataRegulation;
2902
2908
  if (v === "prohibitInput") {
2903
- dataRegulation.prohibitInput = checked;
2909
+ dataRegulation.prohibitInput = !dataRegulation.prohibitInput;
2904
2910
  } else if (v === "hintShow") {
2905
- dataRegulation.hintShow = checked;
2911
+ dataRegulation.hintShow = !dataRegulation.hintShow;
2906
2912
  }
2907
2913
  });
2908
2914
  }
2909
- }), /*#__PURE__*/React.createElement("span", {
2910
- className: "ml-2"
2915
+ }), /*#__PURE__*/React.createElement("label", {
2916
+ htmlFor: v,
2917
+ key: "label".concat(v)
2911
2918
  }, dataVerification[v]));
2912
- }), ((_context$dataVerifica10 = context.dataVerification) === null || _context$dataVerifica10 === void 0 ? void 0 : (_context$dataVerifica11 = _context$dataVerifica10.dataRegulation) === null || _context$dataVerifica11 === void 0 ? void 0 : _context$dataVerifica11.hintShow) && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextField, {
2919
+ }), ((_context$dataVerifica22 = context.dataVerification) === null || _context$dataVerifica22 === void 0 ? void 0 : (_context$dataVerifica23 = _context$dataVerifica22.dataRegulation) === null || _context$dataVerifica23 === void 0 ? void 0 : _context$dataVerifica23.hintShow) && (/*#__PURE__*/React.createElement("div", {
2920
+ className: "input-box"
2921
+ }, /*#__PURE__*/React.createElement("input", {
2922
+ type: "text",
2923
+ style: {
2924
+ width: "100%"
2925
+ },
2913
2926
  placeholder: dataVerification.placeholder5,
2914
2927
  value: context.dataVerification.dataRegulation.hintValue,
2915
2928
  onChange: function onChange(e) {
@@ -2918,37 +2931,25 @@ var DataVerification = function DataVerification() {
2918
2931
  ctx.dataVerification.dataRegulation.hintValue = value;
2919
2932
  });
2920
2933
  }
2921
- }))))), /*#__PURE__*/React.createElement(Divider$2, {
2922
- className: "w-full border-t-[1px] my-4"
2923
- }), /*#__PURE__*/React.createElement("div", {
2924
- className: "flex gap-2 justify-between items-center"
2925
- }, /*#__PURE__*/React.createElement(Button$1, {
2926
- variant: "secondary",
2927
- style: {
2928
- minWidth: "80px"
2929
- },
2934
+ }))))), /*#__PURE__*/React.createElement("div", {
2935
+ className: "button-basic button-primary",
2930
2936
  onClick: function onClick() {
2931
- btn("close");
2932
- }
2933
- }, button.cancel), /*#__PURE__*/React.createElement("div", {
2934
- className: "flex gap-2"
2935
- }, /*#__PURE__*/React.createElement(Button$1, {
2936
- variant: "secondary",
2937
- style: {
2938
- minWidth: "80px"
2937
+ btn("confirm");
2939
2938
  },
2939
+ tabIndex: 0
2940
+ }, button.confirm), /*#__PURE__*/React.createElement("div", {
2941
+ className: "button-basic button-close",
2940
2942
  onClick: function onClick() {
2941
2943
  btn("delete");
2942
- }
2943
- }, dataVerification.deleteVerification), /*#__PURE__*/React.createElement(Button$1, {
2944
- variant: "default",
2945
- style: {
2946
- minWidth: "80px"
2947
2944
  },
2945
+ tabIndex: 0
2946
+ }, dataVerification.deleteVerification), /*#__PURE__*/React.createElement("div", {
2947
+ className: "button-basic button-close",
2948
2948
  onClick: function onClick() {
2949
- btn("confirm");
2950
- }
2951
- }, button.confirm))));
2949
+ btn("close");
2950
+ },
2951
+ tabIndex: 0
2952
+ }, button.cancel));
2952
2953
  };
2953
2954
 
2954
2955
  function getDisplayedRangeTxt(context) {
@@ -2960,7 +2961,12 @@ function getDisplayedRangeTxt(context) {
2960
2961
  return (_context$rangeDialog$ = (_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.rangeTxt) !== null && _context$rangeDialog$ !== void 0 ? _context$rangeDialog$ : "";
2961
2962
  }
2962
2963
 
2963
- injectDatepickerStyles();
2964
+ var datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
2965
+ if (typeof document !== "undefined") {
2966
+ var styleSheet = document.createElement("style");
2967
+ styleSheet.textContent = datepickerStyles;
2968
+ document.head.appendChild(styleSheet);
2969
+ }
2964
2970
  var ConditionRules = function ConditionRules(_ref) {
2965
2971
  var type = _ref.type;
2966
2972
  var _useContext = useContext(WorkbookContext),
@@ -3281,8 +3287,7 @@ var RangeDialog = function RangeDialog() {
3281
3287
  showDialog = _useDialog.showDialog;
3282
3288
  var _locale = locale(context),
3283
3289
  dataVerification = _locale.dataVerification,
3284
- button = _locale.button,
3285
- toolbar = _locale.toolbar;
3290
+ button = _locale.button;
3286
3291
  var _useState = useState(getDisplayedRangeTxt(context)),
3287
3292
  _useState2 = _slicedToArray(_useState, 2),
3288
3293
  rangeTxt2 = _useState2[0],
@@ -3307,7 +3312,7 @@ var RangeDialog = function RangeDialog() {
3307
3312
  }), undefined, locale(context).conditionformat["conditionformat_".concat(rulesType)]);
3308
3313
  return;
3309
3314
  }
3310
- showDialog(/*#__PURE__*/React.createElement(DataVerification, null), undefined, toolbar.dataVerification);
3315
+ showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
3311
3316
  }, [setContext, showDialog, context]);
3312
3317
  useEffect(function () {
3313
3318
  setRangeTxt2(getDisplayedRangeTxt(context));
@@ -3496,7 +3501,7 @@ var DropDownList = function DropDownList() {
3496
3501
  arr.splice(index, 1);
3497
3502
  }
3498
3503
  setSelected(arr);
3499
- setDropdownValue(ctx, v, arr);
3504
+ setDropcownValue(ctx, v, arr);
3500
3505
  });
3501
3506
  },
3502
3507
  tabIndex: 0
@@ -3511,118 +3516,6 @@ var DropDownList = function DropDownList() {
3511
3516
  }));
3512
3517
  };
3513
3518
 
3514
- var IframeBoxs = function IframeBoxs() {
3515
- var _context$insertedIfra;
3516
- var _useContext = useContext(WorkbookContext),
3517
- context = _useContext.context,
3518
- setContext = _useContext.setContext,
3519
- refs = _useContext.refs;
3520
- var containerRef = useRef(null);
3521
- useEffect(function () {
3522
- var handleClickOutside = function handleClickOutside(e) {
3523
- if (!containerRef.current) return;
3524
- var iframeBoxes = containerRef.current.querySelectorAll(".luckysheet-modal-dialog-iframe");
3525
- var clickedInsideSomeIframe = Array.from(iframeBoxes).some(function (el) {
3526
- return el.contains(e.target);
3527
- });
3528
- if (!clickedInsideSomeIframe && context.activeIframe !== undefined) {
3529
- setContext(function (ctx) {
3530
- ctx.activeIframe = undefined;
3531
- });
3532
- }
3533
- };
3534
- document.addEventListener("mousedown", handleClickOutside);
3535
- return function () {
3536
- document.removeEventListener("mousedown", handleClickOutside);
3537
- };
3538
- }, [context.activeIframe, setContext]);
3539
- return /*#__PURE__*/React.createElement("div", {
3540
- id: "fortune-iframe-boxes",
3541
- ref: containerRef
3542
- }, (_context$insertedIfra = context.insertedIframes) === null || _context$insertedIfra === void 0 ? void 0 : _context$insertedIfra.map(function (frame) {
3543
- var isActive = frame.id === context.activeIframe;
3544
- var style = {
3545
- width: frame.width * context.zoomRatio,
3546
- height: frame.height * context.zoomRatio,
3547
- left: frame.left * context.zoomRatio,
3548
- top: frame.top * context.zoomRatio,
3549
- position: "absolute",
3550
- padding: 0,
3551
- zIndex: isActive ? 300 : 200
3552
- };
3553
- return /*#__PURE__*/React.createElement("div", {
3554
- key: frame.id,
3555
- id: isActive ? "fortune-modal-dialog-activeIframe" : frame.id,
3556
- className: "luckysheet-modal-dialog luckysheet-modal-dialog-iframe",
3557
- style: style,
3558
- onClick: function onClick(e) {
3559
- if (!isActive) {
3560
- setContext(function (ctx) {
3561
- ctx.activeIframe = frame.id;
3562
- });
3563
- }
3564
- e.stopPropagation();
3565
- },
3566
- onMouseDown: function onMouseDown(e) {
3567
- if (isActive) {
3568
- onIframeMoveStart(context, refs.globalCache, e.nativeEvent);
3569
- }
3570
- e.stopPropagation();
3571
- }
3572
- }, /*#__PURE__*/React.createElement("div", {
3573
- className: "luckysheet-modal-dialog-content",
3574
- style: {
3575
- width: "100%",
3576
- height: "100%",
3577
- overflow: "hidden"
3578
- }
3579
- }, /*#__PURE__*/React.createElement("iframe", {
3580
- title: "iframe-".concat(frame.id),
3581
- src: frame.src,
3582
- style: {
3583
- width: "100%",
3584
- height: "100%",
3585
- border: "none",
3586
- pointerEvents: "none"
3587
- }
3588
- })), /*#__PURE__*/React.createElement("div", {
3589
- className: "luckysheet-modal-dialog-border"
3590
- }), isActive && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
3591
- className: "luckysheet-modal-dialog-resize"
3592
- }, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (dir) {
3593
- return /*#__PURE__*/React.createElement("div", {
3594
- key: dir,
3595
- className: "luckysheet-modal-dialog-resize-item luckysheet-modal-dialog-resize-item-".concat(dir),
3596
- "data-type": dir,
3597
- style: {
3598
- zIndex: 300,
3599
- position: "absolute"
3600
- },
3601
- onMouseDown: function onMouseDown(e) {
3602
- onIframeResizeStart(context, refs.globalCache, e.nativeEvent, dir);
3603
- e.stopPropagation();
3604
- }
3605
- });
3606
- })), /*#__PURE__*/React.createElement("div", {
3607
- className: "luckysheet-modal-dialog-controll"
3608
- }, /*#__PURE__*/React.createElement("span", {
3609
- className: "luckysheet-modal-controll-btn luckysheet-modal-controll-del",
3610
- role: "button",
3611
- tabIndex: 0,
3612
- title: "Delete",
3613
- onClick: function onClick() {
3614
- setContext(function (ctx) {
3615
- var _ctx$insertedIframes;
3616
- ctx.insertedIframes = ctx === null || ctx === void 0 ? void 0 : (_ctx$insertedIframes = ctx.insertedIframes) === null || _ctx$insertedIframes === void 0 ? void 0 : _ctx$insertedIframes.filter(function (f) {
3617
- return f.id !== frame.id;
3618
- });
3619
- ctx.activeIframe = undefined;
3620
- });
3621
- }
3622
- }, "DELETE")))));
3623
- }));
3624
- };
3625
-
3626
3519
  var SheetOverlay = function SheetOverlay() {
3627
3520
  var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
3628
3521
  var _useContext = useContext(WorkbookContext),
@@ -4065,7 +3958,7 @@ var SheetOverlay = function SheetOverlay() {
4065
3958
  id: "luckysheet-multipleRange-show"
4066
3959
  }), /*#__PURE__*/React.createElement("div", {
4067
3960
  id: "luckysheet-dynamicArray-hightShow"
4068
- }), /*#__PURE__*/React.createElement(ImgBoxs, null), /*#__PURE__*/React.createElement(IframeBoxs, null), /*#__PURE__*/React.createElement("div", {
3961
+ }), /*#__PURE__*/React.createElement(ImgBoxs, null), /*#__PURE__*/React.createElement("div", {
4069
3962
  id: "luckysheet-dataVerification-dropdown-btn",
4070
3963
  onClick: function onClick() {
4071
3964
  setContext(function (ctx) {
@@ -4078,9 +3971,8 @@ var SheetOverlay = function SheetOverlay() {
4078
3971
  display: "none"
4079
3972
  }
4080
3973
  }, /*#__PURE__*/React.createElement(SVGIcon, {
4081
- name: "caret-down-fill",
4082
- width: 16,
4083
- height: 16
3974
+ name: "combo-arrow",
3975
+ width: 16
4084
3976
  })), context.dataVerificationDropDownList && /*#__PURE__*/React.createElement(DropDownList, null), /*#__PURE__*/React.createElement("div", {
4085
3977
  id: "luckysheet-dataVerification-showHintBox",
4086
3978
  className: "luckysheet-mousedown-cancel",
@@ -4399,9 +4291,6 @@ var Combo = function Combo(_ref) {
4399
4291
  setPopupPosition = _useState4[1];
4400
4292
  var popupRef = useRef(null);
4401
4293
  var buttonRef = useRef(null);
4402
- var isLucideIcon = useMemo(function () {
4403
- return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip"].includes(iconId);
4404
- }, [iconId]);
4405
4294
  useOutsideClick(popupRef, function () {
4406
4295
  setOpen(false);
4407
4296
  });
@@ -4429,7 +4318,7 @@ var Combo = function Combo(_ref) {
4429
4318
  }, /*#__PURE__*/React.createElement("div", {
4430
4319
  ref: buttonRef,
4431
4320
  className: "fortune-toolbar-combo"
4432
- }, !isLucideIcon ? (/*#__PURE__*/React.createElement("div", {
4321
+ }, /*#__PURE__*/React.createElement("div", {
4433
4322
  className: "fortune-toolbar-combo-button",
4434
4323
  onClick: function onClick(e) {
4435
4324
  if (_onClick) {
@@ -4448,13 +4337,7 @@ var Combo = function Combo(_ref) {
4448
4337
  name: iconId
4449
4338
  })) : (/*#__PURE__*/React.createElement("span", {
4450
4339
  className: "fortune-toolbar-combo-text"
4451
- }, text !== undefined ? text : "")))) : (/*#__PURE__*/React.createElement(IconButton, {
4452
- icon: getIcon(iconId),
4453
- variant: "ghost",
4454
- onClick: function onClick() {
4455
- return setOpen(!open);
4456
- }
4457
- })), showArrow && (/*#__PURE__*/React.createElement("div", {
4340
+ }, text !== undefined ? text : ""))), showArrow && (/*#__PURE__*/React.createElement("div", {
4458
4341
  className: "fortune-toolbar-combo-arrow",
4459
4342
  onClick: function onClick() {
4460
4343
  return setOpen(!open);
@@ -5359,121 +5242,6 @@ var FormatSearch = function FormatSearch(_ref) {
5359
5242
  }, button.cancel)));
5360
5243
  };
5361
5244
 
5362
- var DuneChartsInputModal = function DuneChartsInputModal(_ref) {
5363
- var isOpen = _ref.isOpen,
5364
- onClose = _ref.onClose,
5365
- onSubmit = _ref.onSubmit,
5366
- icon = _ref.icon,
5367
- _ref$submitText = _ref.submitText,
5368
- submitText = _ref$submitText === void 0 ? "Submit" : _ref$submitText,
5369
- _ref$placeholder = _ref.placeholder,
5370
- placeholder = _ref$placeholder === void 0 ? "Enter a value..." : _ref$placeholder;
5371
- var _useState = useState(""),
5372
- _useState2 = _slicedToArray(_useState, 2),
5373
- url = _useState2[0],
5374
- setUrl = _useState2[1];
5375
- var _useState3 = useState(false),
5376
- _useState4 = _slicedToArray(_useState3, 2),
5377
- showError = _useState4[0],
5378
- setShowError = _useState4[1];
5379
- var inputRef = useRef(null);
5380
- useEffect(function () {
5381
- if (isOpen && inputRef.current) {
5382
- var timer = setTimeout(function () {
5383
- var _inputRef$current;
5384
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
5385
- }, 100);
5386
- return function () {
5387
- return clearTimeout(timer);
5388
- };
5389
- }
5390
- return undefined;
5391
- }, [isOpen]);
5392
- if (!isOpen) return null;
5393
- var handleSubmit = function handleSubmit() {
5394
- var trimmed = url.trim();
5395
- if (trimmed && sanitizeDuneUrl(trimmed)) {
5396
- onSubmit(trimmed);
5397
- setUrl("");
5398
- setShowError(false);
5399
- onClose();
5400
- } else {
5401
- setShowError(true);
5402
- }
5403
- };
5404
- var handleKeyDown = function handleKeyDown(e) {
5405
- e.stopPropagation();
5406
- if (e.key === "Enter") {
5407
- handleSubmit();
5408
- }
5409
- };
5410
- return /*#__PURE__*/React.createElement("div", {
5411
- className: "custom-overlay",
5412
- onClick: onClose
5413
- }, /*#__PURE__*/React.createElement("div", {
5414
- className: "input-modal",
5415
- style: {
5416
- transformOrigin: "top center"
5417
- },
5418
- onClick: function onClick(e) {
5419
- return e.stopPropagation();
5420
- },
5421
- onKeyDown: handleKeyDown
5422
- }, /*#__PURE__*/React.createElement("div", {
5423
- className: "modal-header"
5424
- }, /*#__PURE__*/React.createElement(SVGIcon, {
5425
- name: icon
5426
- }), /*#__PURE__*/React.createElement("input", {
5427
- ref: inputRef,
5428
- className: "modal-input",
5429
- type: "text",
5430
- placeholder: placeholder,
5431
- value: url,
5432
- onChange: function onChange(e) {
5433
- setUrl(e.target.value);
5434
- setShowError(false);
5435
- },
5436
- onKeyDown: handleKeyDown
5437
- })), showError && (/*#__PURE__*/React.createElement("div", {
5438
- className: "modal-error-message"
5439
- }, /*#__PURE__*/React.createElement(SVGIcon, {
5440
- style: {
5441
- width: "14px",
5442
- height: "14px"
5443
- },
5444
- name: "circle-alert"
5445
- }), /*#__PURE__*/React.createElement("span", null, "Please make sure the URL is a valid Dune chart link"))), url.length > 0 && !showError && (/*#__PURE__*/React.createElement("div", {
5446
- className: "modal-footer"
5447
- }, /*#__PURE__*/React.createElement(Button$1, {
5448
- onClick: handleSubmit,
5449
- className: "modal-button"
5450
- }, submitText)))));
5451
- };
5452
-
5453
- var getIcon = function getIcon(title) {
5454
- switch (title) {
5455
- case "align-left":
5456
- return "AlignLeft";
5457
- case "align-center":
5458
- return "AlignCenter";
5459
- case "align-right":
5460
- return "AlignRight";
5461
- case "align-top":
5462
- return "ArrowUpFromLine";
5463
- case "align-middle":
5464
- return "AlignVerticalMiddle";
5465
- case "align-bottom":
5466
- return "ArrowDownFromLine";
5467
- case "text-overflow":
5468
- return "TextOverflow";
5469
- case "text-wrap":
5470
- return "WrapText";
5471
- case "text-clip":
5472
- return "TextClip";
5473
- default:
5474
- return "";
5475
- }
5476
- };
5477
5245
  var Toolbar = function Toolbar(_ref) {
5478
5246
  var _context$luckysheet_s, _flowdata$row, _settings$customToolb;
5479
5247
  var setMoreItems = _ref.setMoreItems,
@@ -5495,10 +5263,6 @@ var Toolbar = function Toolbar(_ref) {
5495
5263
  _useState4 = _slicedToArray(_useState3, 2),
5496
5264
  itemLocations = _useState4[0],
5497
5265
  setItemLocations = _useState4[1];
5498
- var _useState5 = useState(false),
5499
- _useState6 = _slicedToArray(_useState5, 2),
5500
- showDuneModal = _useState6[0],
5501
- setShowDuneModal = _useState6[1];
5502
5266
  var _useDialog = useDialog(),
5503
5267
  showDialog = _useDialog.showDialog,
5504
5268
  hideDialog = _useDialog.hideDialog;
@@ -5529,12 +5293,14 @@ var Toolbar = function Toolbar(_ref) {
5529
5293
  var sheetWidth = context.luckysheetTableContentHW[0];
5530
5294
  var currency = settings.currency;
5531
5295
  var defaultFormat = defaultFmt(currency);
5532
- var _useState7 = useState("#000000"),
5533
- _useState8 = _slicedToArray(_useState7, 1),
5534
- customColor = _useState8[0];
5535
- var _useState9 = useState("1"),
5536
- _useState0 = _slicedToArray(_useState9, 1),
5537
- customStyle = _useState0[0];
5296
+ var _useState5 = useState("#000000"),
5297
+ _useState6 = _slicedToArray(_useState5, 2),
5298
+ customColor = _useState6[0],
5299
+ setcustomColor = _useState6[1];
5300
+ var _useState7 = useState("1"),
5301
+ _useState8 = _slicedToArray(_useState7, 2),
5302
+ customStyle = _useState8[0],
5303
+ setcustomStyle = _useState8[1];
5538
5304
  var showSubMenu = useCallback(function (e, className) {
5539
5305
  var target = e.target;
5540
5306
  var menuItem = target.className === "fortune-toolbar-menu-line" ? target.parentElement : target;
@@ -5814,38 +5580,27 @@ var Toolbar = function Toolbar(_ref) {
5814
5580
  tooltip: toolbar.horizontalAlign,
5815
5581
  showArrow: false
5816
5582
  }, function (setOpen) {
5817
- return /*#__PURE__*/React.createElement(Select, {
5818
- style: {
5819
- minWidth: "fit-content",
5820
- display: "flex",
5821
- flexDirection: "row",
5822
- alignItems: "center",
5823
- justifyContent: "center",
5824
- gap: 4
5825
- }
5826
- }, items.map(function (_ref3) {
5827
- var _$find2;
5828
- var title = _ref3.title;
5829
- return /*#__PURE__*/React.createElement(IconButton, {
5583
+ return /*#__PURE__*/React.createElement(Select, null, items.map(function (_ref3) {
5584
+ var text = _ref3.text,
5585
+ title = _ref3.title;
5586
+ return /*#__PURE__*/React.createElement(Option, {
5830
5587
  key: title,
5831
- isActive: ((_$find2 = _.find(items, function (item) {
5832
- return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.ht);
5833
- })) === null || _$find2 === void 0 ? void 0 : _$find2.title) === title,
5834
- icon: getIcon(title),
5835
- variant: "ghost",
5836
5588
  onClick: function onClick() {
5837
5589
  setContext(function (ctx) {
5838
5590
  handleHorizontalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
5839
5591
  });
5840
5592
  setOpen(false);
5841
- },
5842
- tabIndex: 0
5843
- });
5593
+ }
5594
+ }, /*#__PURE__*/React.createElement("div", {
5595
+ className: "fortune-toolbar-menu-line"
5596
+ }, text, /*#__PURE__*/React.createElement(SVGIcon, {
5597
+ name: title
5598
+ })));
5844
5599
  }));
5845
5600
  });
5846
5601
  }
5847
5602
  if (name === "vertical-align") {
5848
- var _$find3;
5603
+ var _$find2;
5849
5604
  var _items = [{
5850
5605
  title: "align-top",
5851
5606
  text: align.top,
@@ -5860,40 +5615,29 @@ var Toolbar = function Toolbar(_ref) {
5860
5615
  value: 2
5861
5616
  }];
5862
5617
  return /*#__PURE__*/React.createElement(Combo, {
5863
- iconId: ((_$find3 = _.find(_items, function (item) {
5618
+ iconId: ((_$find2 = _.find(_items, function (item) {
5864
5619
  return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
5865
- })) === null || _$find3 === void 0 ? void 0 : _$find3.title) || "align-top",
5620
+ })) === null || _$find2 === void 0 ? void 0 : _$find2.title) || "align-top",
5866
5621
  key: name,
5867
5622
  tooltip: toolbar.verticalAlign,
5868
5623
  showArrow: false
5869
5624
  }, function (setOpen) {
5870
- return /*#__PURE__*/React.createElement(Select, {
5871
- style: {
5872
- minWidth: "fit-content",
5873
- display: "flex",
5874
- flexDirection: "row",
5875
- alignItems: "center",
5876
- justifyContent: "center",
5877
- gap: 4
5878
- }
5879
- }, _items.map(function (_ref4) {
5880
- var _$find4;
5881
- var title = _ref4.title;
5882
- return /*#__PURE__*/React.createElement(IconButton, {
5625
+ return /*#__PURE__*/React.createElement(Select, null, _items.map(function (_ref4) {
5626
+ var text = _ref4.text,
5627
+ title = _ref4.title;
5628
+ return /*#__PURE__*/React.createElement(Option, {
5883
5629
  key: title,
5884
- isActive: ((_$find4 = _.find(_items, function (item) {
5885
- return "".concat(item.value) === "".concat(cell === null || cell === void 0 ? void 0 : cell.vt);
5886
- })) === null || _$find4 === void 0 ? void 0 : _$find4.title) === title,
5887
- icon: getIcon(title),
5888
- variant: "ghost",
5889
5630
  onClick: function onClick() {
5890
5631
  setContext(function (ctx) {
5891
5632
  handleVerticalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
5892
5633
  });
5893
5634
  setOpen(false);
5894
- },
5895
- tabIndex: 0
5896
- });
5635
+ }
5636
+ }, /*#__PURE__*/React.createElement("div", {
5637
+ className: "fortune-toolbar-menu-line"
5638
+ }, text, /*#__PURE__*/React.createElement(SVGIcon, {
5639
+ name: title
5640
+ })));
5897
5641
  }));
5898
5642
  });
5899
5643
  }
@@ -5968,7 +5712,7 @@ var Toolbar = function Toolbar(_ref) {
5968
5712
  key: name,
5969
5713
  onClick: function onClick() {
5970
5714
  if (context.allowEdit === false) return;
5971
- showDialog(/*#__PURE__*/React.createElement(DataVerification, null), undefined, toolbar.dataVerification);
5715
+ showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
5972
5716
  }
5973
5717
  });
5974
5718
  }
@@ -6442,23 +6186,12 @@ var Toolbar = function Toolbar(_ref) {
6442
6186
  tooltip: toolbar.textWrap,
6443
6187
  showArrow: false
6444
6188
  }, function (setOpen) {
6445
- return /*#__PURE__*/React.createElement(Select, {
6446
- style: {
6447
- minWidth: "fit-content",
6448
- display: "flex",
6449
- flexDirection: "row",
6450
- alignItems: "center",
6451
- justifyContent: "center",
6452
- gap: 4
6453
- }
6454
- }, _items6.map(function (_ref1) {
6455
- var iconId = _ref1.iconId,
6189
+ return /*#__PURE__*/React.createElement(Select, null, _items6.map(function (_ref1) {
6190
+ var text = _ref1.text,
6191
+ iconId = _ref1.iconId,
6456
6192
  value = _ref1.value;
6457
- return /*#__PURE__*/React.createElement(IconButton, {
6193
+ return /*#__PURE__*/React.createElement(Option, {
6458
6194
  key: value,
6459
- isActive: _curr.value === value,
6460
- icon: getIcon(iconId),
6461
- variant: "ghost",
6462
6195
  onClick: function onClick() {
6463
6196
  setContext(function (ctx) {
6464
6197
  var d = getFlowdata(ctx);
@@ -6466,9 +6199,12 @@ var Toolbar = function Toolbar(_ref) {
6466
6199
  updateFormat(ctx, refs.cellInput.current, d, "tb", value);
6467
6200
  });
6468
6201
  setOpen(false);
6469
- },
6470
- tabIndex: 0
6471
- });
6202
+ }
6203
+ }, /*#__PURE__*/React.createElement("div", {
6204
+ className: "fortune-toolbar-menu-line"
6205
+ }, text, /*#__PURE__*/React.createElement(SVGIcon, {
6206
+ name: iconId
6207
+ })));
6472
6208
  }));
6473
6209
  });
6474
6210
  }
@@ -6619,7 +6355,7 @@ var Toolbar = function Toolbar(_ref) {
6619
6355
  });
6620
6356
  }
6621
6357
  });
6622
- }, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFormat, align, handleUndo, handleRedo, flowdata, formula, showDuneModal, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
6358
+ }, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFormat, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
6623
6359
  return /*#__PURE__*/React.createElement("div", {
6624
6360
  ref: containerRef,
6625
6361
  className: "fortune-toolbar",
@@ -6674,29 +6410,7 @@ var Toolbar = function Toolbar(_ref) {
6674
6410
  icon: n.icon,
6675
6411
  iconName: n.iconName
6676
6412
  }, n.children);
6677
- }), /*#__PURE__*/React.createElement(Button, {
6678
- iconId: "dune-logo",
6679
- tooltip: "Insert Dune Chart",
6680
- key: "dune-charts",
6681
- onClick: function onClick() {
6682
- if (context.allowEdit === false) return;
6683
- setShowDuneModal(true);
6684
- }
6685
- }), showDuneModal && (/*#__PURE__*/React.createElement(DuneChartsInputModal, {
6686
- isOpen: showDuneModal,
6687
- onSubmit: function onSubmit(url) {
6688
- setContext(function (draftCtx) {
6689
- insertDuneChart(draftCtx, url);
6690
- });
6691
- setShowDuneModal(false);
6692
- },
6693
- onClose: function onClose() {
6694
- return setShowDuneModal(false);
6695
- },
6696
- icon: "dune-logo",
6697
- placeholder: "Add Dune chart link to embed",
6698
- submitText: "Embed Dune chart"
6699
- })));
6413
+ }));
6700
6414
  };
6701
6415
 
6702
6416
  var LocationBox = function LocationBox() {
@@ -9827,74 +9541,6 @@ var SVGDefines = function SVGDefines(_ref) {
9827
9541
  "clip-rule": "evenodd",
9828
9542
  d: "M12.75 2.25C13.1642 2.25 13.5 2.58579 13.5 3V15C13.5 15.4142 13.1642 15.75 12.75 15.75C12.3358 15.75 12 15.4142 12 15V3C12 2.58579 12.3358 2.25 12.75 2.25Z",
9829
9543
  fill: "#363B3F"
9830
- })), /*#__PURE__*/React.createElement("symbol", {
9831
- id: "dune-logo",
9832
- viewBox: "0 0 18 16",
9833
- fill: "none"
9834
- }, /*#__PURE__*/React.createElement("svg", {
9835
- width: "18",
9836
- height: "16",
9837
- viewBox: "0 0 18 16",
9838
- fill: "none",
9839
- xmlns: "http://www.w3.org/2000/svg"
9840
- }, /*#__PURE__*/React.createElement("g", {
9841
- "clip-path": "url(#clip0_80_246690)"
9842
- }, /*#__PURE__*/React.createElement("path", {
9843
- d: "M7.99485 15.9875C12.4102 15.9875 15.9896 12.4085 15.9896 7.99373C15.9896 3.57891 12.4102 0 7.99485 0C3.57941 0 0 3.57891 0 7.99373C0 12.4085 3.57941 15.9875 7.99485 15.9875Z",
9844
- fill: "#F4603E"
9845
- }), /*#__PURE__*/React.createElement("path", {
9846
- d: "M1.39258 12.5028C1.39258 12.5028 6.67562 10.7723 15.9868 7.73633C15.9868 7.73633 16.4968 12.7082 11.3424 15.3015C11.3424 15.3015 8.80068 16.5197 6.01215 15.7383C6.01215 15.7383 3.23545 15.2142 1.39258 12.5028Z",
9847
- fill: "#1E1870"
9848
- })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
9849
- id: "clip0_80_246690"
9850
- }, /*#__PURE__*/React.createElement("rect", {
9851
- width: "16",
9852
- height: "16",
9853
- fill: "white"
9854
- }))))), /*#__PURE__*/React.createElement("symbol", {
9855
- id: "circle-alert",
9856
- viewBox: "0 0 14 14",
9857
- fill: "none"
9858
- }, /*#__PURE__*/React.createElement("svg", {
9859
- width: "14",
9860
- height: "14",
9861
- viewBox: "0 0 14 14",
9862
- fill: "none",
9863
- xmlns: "http://www.w3.org/2000/svg"
9864
- }, /*#__PURE__*/React.createElement("g", {
9865
- "clip-path": "url(#clip0_138_127604)"
9866
- }, /*#__PURE__*/React.createElement("path", {
9867
- d: "M6.99967 4.0835C7.32184 4.0835 7.58301 4.34466 7.58301 4.66683V7.00016C7.58301 7.32233 7.32184 7.5835 6.99967 7.5835C6.67751 7.5835 6.41634 7.32233 6.41634 7.00016V4.66683C6.41634 4.34466 6.67751 4.0835 6.99967 4.0835Z",
9868
- fill: "#FB3449"
9869
- }), /*#__PURE__*/React.createElement("path", {
9870
- d: "M6.99967 8.75016C6.67751 8.75016 6.41634 9.01133 6.41634 9.3335C6.41634 9.65566 6.67751 9.91683 6.99967 9.91683H7.00551C7.32767 9.91683 7.58884 9.65566 7.58884 9.3335C7.58884 9.01133 7.32767 8.75016 7.00551 8.75016H6.99967Z",
9871
- fill: "#FB3449"
9872
- }), /*#__PURE__*/React.createElement("path", {
9873
- "fill-rule": "evenodd",
9874
- "clip-rule": "evenodd",
9875
- d: "M0.583008 7.00016C0.583008 3.45634 3.45585 0.583496 6.99967 0.583496C10.5435 0.583496 13.4163 3.45634 13.4163 7.00016C13.4163 10.544 10.5435 13.4168 6.99967 13.4168C3.45585 13.4168 0.583008 10.544 0.583008 7.00016ZM6.99967 1.75016C4.10018 1.75016 1.74967 4.10067 1.74967 7.00016C1.74967 9.89966 4.10018 12.2502 6.99967 12.2502C9.89917 12.2502 12.2497 9.89966 12.2497 7.00016C12.2497 4.10067 9.89917 1.75016 6.99967 1.75016Z",
9876
- fill: "#FB3449"
9877
- })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
9878
- id: "clip0_138_127604"
9879
- }, /*#__PURE__*/React.createElement("rect", {
9880
- width: "14",
9881
- height: "14",
9882
- fill: "white"
9883
- }))))), /*#__PURE__*/React.createElement("symbol", {
9884
- id: "caret-down-fill",
9885
- width: "14",
9886
- height: "14",
9887
- viewBox: "0 0 14 14",
9888
- fill: "none"
9889
- }, /*#__PURE__*/React.createElement("rect", {
9890
- width: "14",
9891
- height: "14",
9892
- rx: "4",
9893
- fill: "black",
9894
- "fill-opacity": "0.1"
9895
- }), /*#__PURE__*/React.createElement("path", {
9896
- d: "M6.64775 8.97978L3.77152 6.10355C3.45654 5.78857 3.67962 5.25 4.12507 5.25H9.87753C10.323 5.25 10.5461 5.78857 10.2311 6.10355L7.35486 8.97978C7.15959 9.17504 6.84301 9.17504 6.64775 8.97978Z",
9897
- fill: "#363B3F"
9898
9544
  }))));
9899
9545
  };
9900
9546
 
@@ -10534,9 +10180,6 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10534
10180
  },
10535
10181
  getLocaleContext: function getLocaleContext() {
10536
10182
  return locale(context);
10537
- },
10538
- getWorkbookContect: function getWorkbookContect() {
10539
- return context;
10540
10183
  }
10541
10184
  };
10542
10185
  }
@@ -11260,48 +10903,6 @@ var SheetList = function SheetList() {
11260
10903
  }));
11261
10904
  };
11262
10905
 
11263
- var DunePreview = function DunePreview(_ref) {
11264
- var url = _ref.url,
11265
- position = _ref.position,
11266
- onKeepAsLink = _ref.onKeepAsLink,
11267
- onEmbed = _ref.onEmbed;
11268
- var embedUrl = sanitizeDuneUrl(url);
11269
- if (!embedUrl) return null;
11270
- return /*#__PURE__*/React.createElement("div", {
11271
- className: "fortune-dune-preview",
11272
- style: {
11273
- left: position.left,
11274
- top: position.top
11275
- },
11276
- onClick: function onClick(e) {
11277
- return e.stopPropagation();
11278
- }
11279
- }, /*#__PURE__*/React.createElement("div", {
11280
- className: "fortune-dune-preview-header"
11281
- }, /*#__PURE__*/React.createElement("span", {
11282
- className: "fortune-dune-preview-title"
11283
- }, "Detected Dune chart link")), /*#__PURE__*/React.createElement("div", {
11284
- className: "fortune-dune-preview-content"
11285
- }, /*#__PURE__*/React.createElement("iframe", {
11286
- src: embedUrl,
11287
- title: "Dune Chart Preview",
11288
- style: {
11289
- width: "100%",
11290
- height: "100%",
11291
- border: "none"
11292
- }
11293
- })), /*#__PURE__*/React.createElement("p", null, "Do you want to insert Dune chart?"), /*#__PURE__*/React.createElement("div", {
11294
- className: "fortune-dune-preview-footer"
11295
- }, /*#__PURE__*/React.createElement(Button$1, {
11296
- variant: "ghost",
11297
- onClick: onKeepAsLink,
11298
- className: "!w-fit px-0"
11299
- }, "Keep as Link"), /*#__PURE__*/React.createElement(Button$1, {
11300
- onClick: onEmbed,
11301
- className: "!w-fit px-0"
11302
- }, "Embed")));
11303
- };
11304
-
11305
10906
  var _excluded = ["onChange", "onOp", "data"];
11306
10907
  enablePatches();
11307
10908
  var triggerGroupValuesRefresh = function triggerGroupValuesRefresh(ctx) {
@@ -11834,25 +11435,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11834
11435
  style: {
11835
11436
  width: "60px"
11836
11437
  }
11837
- }, formula.count, ": ", calInfo.count)), !!calInfo.numberC && !!calInfo.sum && (/*#__PURE__*/React.createElement("div", null, formula.sum, ": ", calInfo.sum)), !!calInfo.numberC && !!calInfo.average && (/*#__PURE__*/React.createElement("div", null, formula.average, ": ", calInfo.average)), !!calInfo.numberC && !!calInfo.max && (/*#__PURE__*/React.createElement("div", null, formula.max, ": ", calInfo.max)), !!calInfo.numberC && !!calInfo.min && (/*#__PURE__*/React.createElement("div", null, formula.min, ": ", calInfo.min)))), context.showDunePreview && (/*#__PURE__*/React.createElement(DunePreview, {
11838
- url: context.showDunePreview.url,
11839
- position: context.showDunePreview.position,
11840
- onKeepAsLink: function onKeepAsLink() {
11841
- setContextWithProduce(function (draftCtx) {
11842
- draftCtx.showDunePreview = undefined;
11843
- }, {
11844
- noHistory: true
11845
- });
11846
- },
11847
- onEmbed: function onEmbed() {
11848
- setContextWithProduce(function (draftCtx) {
11849
- insertDuneChart(draftCtx, context.showDunePreview.url);
11850
- draftCtx.showDunePreview = undefined;
11851
- }, {
11852
- noHistory: true
11853
- });
11854
- }
11855
- })))));
11438
+ }, formula.count, ": ", calInfo.count)), !!calInfo.numberC && !!calInfo.sum && (/*#__PURE__*/React.createElement("div", null, formula.sum, ": ", calInfo.sum)), !!calInfo.numberC && !!calInfo.average && (/*#__PURE__*/React.createElement("div", null, formula.average, ": ", calInfo.average)), !!calInfo.numberC && !!calInfo.max && (/*#__PURE__*/React.createElement("div", null, formula.max, ": ", calInfo.max)), !!calInfo.numberC && !!calInfo.min && (/*#__PURE__*/React.createElement("div", null, formula.min, ": ", calInfo.min)))))));
11856
11439
  });
11857
11440
 
11858
11441
  export { Workbook };