@fileverse-dev/fortune-react 1.0.2-mod-67-patch-4 → 1.0.2-mod-71

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
@@ -2,9 +2,10 @@ import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fix
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';
5
- import { LucideIcon, TextField, Button as Button$1, cn, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Select as Select$1, SelectTrigger, SelectValue, SelectContent, SelectItem as SelectItem$1, Tooltip, RadioGroup, RadioGroupItem, Label } from '@fileverse/ui';
5
+ import { Tooltip, LucideIcon, TextField, Button as Button$1, cn, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Select as Select$1, SelectTrigger, SelectValue, SelectContent, SelectItem as SelectItem$1, Popover, PopoverTrigger, PopoverContent, RadioGroup, RadioGroupItem, Label } from '@fileverse/ui';
6
6
  import regeneratorRuntime from 'regenerator-runtime';
7
7
  import Tippy from '@tippyjs/react';
8
+ export * from '@fileverse-dev/formulajs/crypto-constants';
8
9
 
9
10
  function _arrayLikeToArray(r, a) {
10
11
  (null == a || a > r.length) && (a = r.length);
@@ -853,7 +854,9 @@ var FormulaSearch = function FormulaSearch(props) {
853
854
  style: {
854
855
  width: "20px"
855
856
  }
856
- })), v.API_KEY && (/*#__PURE__*/React.createElement("div", {
857
+ })), v.API_KEY && (/*#__PURE__*/React.createElement(Tooltip, {
858
+ text: localStorage.getItem(v.API_KEY) ? "API Key added" : "API Key required"
859
+ }, /*#__PURE__*/React.createElement("div", {
857
860
  style: {
858
861
  borderRadius: "4px",
859
862
  backgroundColor: "".concat(localStorage.getItem(v.API_KEY) ? "#177E23" : "#e8ebec"),
@@ -868,7 +871,7 @@ var FormulaSearch = function FormulaSearch(props) {
868
871
  width: "12px",
869
872
  height: "12px"
870
873
  }
871
- }))))), /*#__PURE__*/React.createElement("div", {
874
+ })))))), /*#__PURE__*/React.createElement("div", {
872
875
  className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm color-text-secondary"
873
876
  }, v.d));
874
877
  }), /*#__PURE__*/React.createElement("hr", {
@@ -1917,6 +1920,7 @@ var SearchReplace = function SearchReplace(_ref) {
1917
1920
  var _tableContainerRef$cu;
1918
1921
  if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
1919
1922
  var _tableContainerRef$cu2;
1923
+ e.preventDefault();
1920
1924
  e.stopPropagation();
1921
1925
  (_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
1922
1926
  }
@@ -1925,13 +1929,17 @@ var SearchReplace = function SearchReplace(_ref) {
1925
1929
  e.preventDefault();
1926
1930
  e.stopPropagation();
1927
1931
  if (tableContainerRef.current) {
1928
- tableContainerRef.current.scrollTop += e.deltaY;
1932
+ var delta = e.deltaY;
1933
+ var currentScroll = tableContainerRef.current.scrollTop;
1934
+ tableContainerRef.current.scrollTop = currentScroll + delta;
1929
1935
  }
1930
1936
  },
1931
1937
  onTouchStart: function onTouchStart(e) {
1938
+ e.preventDefault();
1932
1939
  e.stopPropagation();
1933
1940
  },
1934
1941
  onTouchMove: function onTouchMove(e) {
1942
+ e.preventDefault();
1935
1943
  e.stopPropagation();
1936
1944
  },
1937
1945
  tabIndex: 0
@@ -3706,11 +3714,8 @@ var IframeBoxs = function IframeBoxs() {
3706
3714
  });
3707
3715
  })), /*#__PURE__*/React.createElement("div", {
3708
3716
  className: "luckysheet-modal-dialog-controll"
3709
- }, /*#__PURE__*/React.createElement("span", {
3710
- className: "luckysheet-modal-controll-btn luckysheet-modal-controll-del",
3711
- role: "button",
3712
- tabIndex: 0,
3713
- title: "Delete",
3717
+ }, /*#__PURE__*/React.createElement(IconButton, {
3718
+ icon: "Trash2",
3714
3719
  onClick: function onClick() {
3715
3720
  setContext(function (ctx) {
3716
3721
  var currentSheet = ctx.luckysheetfile.find(function (sheet) {
@@ -3724,8 +3729,10 @@ var IframeBoxs = function IframeBoxs() {
3724
3729
  }
3725
3730
  ctx.activeIframe = undefined;
3726
3731
  });
3727
- }
3728
- }, "DELETE")))));
3732
+ },
3733
+ variant: "ghost",
3734
+ className: "fortune-iframe-boxes-delete-button"
3735
+ })))));
3729
3736
  }));
3730
3737
  };
3731
3738
 
@@ -4504,45 +4511,11 @@ var Combo = function Combo(_ref) {
4504
4511
  _useState2 = _slicedToArray(_useState, 2),
4505
4512
  open = _useState2[0],
4506
4513
  setOpen = _useState2[1];
4507
- var _useState3 = useState({
4508
- left: 0
4509
- }),
4510
- _useState4 = _slicedToArray(_useState3, 2),
4511
- popupPosition = _useState4[0],
4512
- setPopupPosition = _useState4[1];
4513
- var popupRef = useRef(null);
4514
4514
  var buttonRef = useRef(null);
4515
4515
  var isLucideIcon = useMemo(function () {
4516
4516
  return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
4517
4517
  }, [iconId]);
4518
- useOutsideClick(popupRef, function () {
4519
- setOpen(false);
4520
- });
4521
- useLayoutEffect(function () {
4522
- if (!popupRef.current) {
4523
- return;
4524
- }
4525
- if (!open) {
4526
- setPopupPosition({
4527
- left: 0
4528
- });
4529
- }
4530
- var winW = window.innerWidth;
4531
- var rect = popupRef.current.getBoundingClientRect();
4532
- var menuW = rect.width;
4533
- var left = rect.left;
4534
- if (left + menuW > winW) {
4535
- setPopupPosition({
4536
- left: -rect.width + buttonRef.current.clientWidth
4537
- });
4538
- }
4539
- }, [open]);
4540
- return /*#__PURE__*/React.createElement("div", {
4541
- className: "fortune-toobar-combo-container fortune-toolbar-item"
4542
- }, /*#__PURE__*/React.createElement("div", {
4543
- ref: buttonRef,
4544
- className: "fortune-toolbar-combo"
4545
- }, !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
4518
+ var trigger = !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
4546
4519
  text: tooltip,
4547
4520
  placement: "bottom"
4548
4521
  }, /*#__PURE__*/React.createElement("div", {
@@ -4551,8 +4524,6 @@ var Combo = function Combo(_ref) {
4551
4524
  if (_onClick) {
4552
4525
  _onClick(e);
4553
4526
  if (!showArrow) setOpen(!open);
4554
- } else {
4555
- setOpen(!open);
4556
4527
  }
4557
4528
  },
4558
4529
  tabIndex: 0,
@@ -4573,23 +4544,23 @@ var Combo = function Combo(_ref) {
4573
4544
  onClick: function onClick() {
4574
4545
  return setOpen(!open);
4575
4546
  },
4576
- className: showArrow ? "fortune-toolbar-combo-button show-arrow" : ""
4577
- }))), showArrow && (/*#__PURE__*/React.createElement("div", {
4578
- className: "fortune-toolbar-combo-arrow",
4579
- onClick: function onClick() {
4580
- return setOpen(!open);
4581
- },
4582
- tabIndex: 0,
4583
- role: "button",
4584
- style: style
4585
- }, /*#__PURE__*/React.createElement(LucideIcon, {
4586
- name: "ChevronDown",
4587
- width: 14,
4588
- height: 14
4589
- })))), open && (/*#__PURE__*/React.createElement("div", {
4590
- ref: popupRef,
4591
- className: "fortune-toolbar-combo-popup",
4592
- style: popupPosition
4547
+ className: "fortune-toolbar-combo-button"
4548
+ })));
4549
+ return /*#__PURE__*/React.createElement("div", {
4550
+ ref: buttonRef
4551
+ }, /*#__PURE__*/React.createElement(Popover, {
4552
+ open: open,
4553
+ onOpenChange: setOpen
4554
+ }, /*#__PURE__*/React.createElement(PopoverTrigger, {
4555
+ asChild: true
4556
+ }, /*#__PURE__*/React.createElement("div", {
4557
+ className: "flex items-center"
4558
+ }, trigger)), /*#__PURE__*/React.createElement(PopoverContent, {
4559
+ align: "start",
4560
+ side: "bottom",
4561
+ sideOffset: 4,
4562
+ alignOffset: -16,
4563
+ className: "fortune-toolbar-combo-popup border-none"
4593
4564
  }, children === null || children === void 0 ? void 0 : children(setOpen))));
4594
4565
  };
4595
4566
 
@@ -5467,7 +5438,6 @@ var DuneChartsInputModal = function DuneChartsInputModal(_ref) {
5467
5438
  var isOpen = _ref.isOpen,
5468
5439
  onClose = _ref.onClose,
5469
5440
  onSubmit = _ref.onSubmit,
5470
- icon = _ref.icon,
5471
5441
  _ref$submitText = _ref.submitText,
5472
5442
  submitText = _ref$submitText === void 0 ? "Submit" : _ref$submitText,
5473
5443
  _ref$placeholder = _ref.placeholder,
@@ -5509,6 +5479,8 @@ var DuneChartsInputModal = function DuneChartsInputModal(_ref) {
5509
5479
  e.stopPropagation();
5510
5480
  if (e.key === "Enter") {
5511
5481
  handleSubmit();
5482
+ } else if (e.key === "Escape") {
5483
+ onClose();
5512
5484
  }
5513
5485
  };
5514
5486
  return /*#__PURE__*/React.createElement("div", {
@@ -5525,8 +5497,8 @@ var DuneChartsInputModal = function DuneChartsInputModal(_ref) {
5525
5497
  onKeyDown: handleKeyDown
5526
5498
  }, /*#__PURE__*/React.createElement("div", {
5527
5499
  className: "modal-header"
5528
- }, /*#__PURE__*/React.createElement(SVGIcon, {
5529
- name: icon
5500
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
5501
+ name: "DuneChart"
5530
5502
  }), /*#__PURE__*/React.createElement("input", {
5531
5503
  ref: inputRef,
5532
5504
  className: "modal-input",
@@ -5871,46 +5843,18 @@ var Toolbar = function Toolbar(_ref) {
5871
5843
  if (value === "fmtOtherSelf") {
5872
5844
  return /*#__PURE__*/React.createElement(Option, {
5873
5845
  key: value,
5874
- onMouseEnter: function onMouseEnter(e) {
5875
- return showSubMenu(e, "more-format");
5876
- },
5877
- onMouseLeave: function onMouseLeave(e) {
5878
- return hideSubMenu(e, "more-format");
5879
- }
5880
- }, /*#__PURE__*/React.createElement("div", {
5881
- className: "fortune-toolbar-menu-line"
5882
- }, /*#__PURE__*/React.createElement("div", null, text), /*#__PURE__*/React.createElement(SVGIcon, {
5883
- name: "rightArrow",
5884
- width: 16,
5885
- height: 16
5886
- })), /*#__PURE__*/React.createElement("div", {
5887
- className: "more-format toolbar-item-sub-menu fortune-toolbar-select",
5888
- style: {
5889
- display: "none",
5890
- width: 150,
5891
- bottom: 10,
5892
- top: undefined
5893
- }
5894
- }, [{
5895
- text: toolbarFormat.moreCurrency,
5896
- onclick: function onclick() {
5846
+ onClick: function onClick() {
5897
5847
  showDialog(/*#__PURE__*/React.createElement(FormatSearch, {
5898
5848
  onCancel: hideDialog,
5899
5849
  type: "currency"
5900
5850
  }), undefined, "Currency Format");
5901
5851
  setOpen(false);
5902
5852
  }
5903
- }].map(function (v) {
5904
- return /*#__PURE__*/React.createElement("div", {
5905
- className: "set-background-item fortune-toolbar-select-option",
5906
- key: v.text,
5907
- onClick: function onClick() {
5908
- v.onclick();
5909
- setOpen(false);
5910
- },
5911
- tabIndex: 0
5912
- }, v.text);
5913
- })));
5853
+ }, /*#__PURE__*/React.createElement("div", {
5854
+ className: "fortune-toolbar-menu-line"
5855
+ }, /*#__PURE__*/React.createElement("div", null, text), /*#__PURE__*/React.createElement("div", {
5856
+ className: "fortune-toolbar-subtext"
5857
+ }, example)));
5914
5858
  }
5915
5859
  return /*#__PURE__*/React.createElement(Option, {
5916
5860
  key: value,
@@ -6886,27 +6830,7 @@ var Toolbar = function Toolbar(_ref) {
6886
6830
  onClose: onMoreToolbarItemsClose
6887
6831
  }, moreToolbarItems))), /*#__PURE__*/React.createElement("div", {
6888
6832
  className: "fortune-toolbar-right"
6889
- }, settings.customToolbarItems.filter(function (n) {
6890
- return n.key === "templates";
6891
- }).map(function (n) {
6892
- return /*#__PURE__*/React.createElement(CustomButton, {
6893
- tooltip: n.tooltip,
6894
- onClick: n.onClick,
6895
- key: n.key,
6896
- icon: n.icon,
6897
- iconName: n.iconName
6898
- }, n.children);
6899
- }), settings.customToolbarItems.filter(function (n) {
6900
- return n.key !== "templates" && n.key !== "import-export";
6901
- }).map(function (n) {
6902
- return /*#__PURE__*/React.createElement(CustomButton, {
6903
- tooltip: n.tooltip,
6904
- onClick: n.onClick,
6905
- key: n.key,
6906
- icon: n.icon,
6907
- iconName: n.iconName
6908
- }, n.children);
6909
- }), settings.customToolbarItems.length > 0 && (/*#__PURE__*/React.createElement(Button, {
6833
+ }, settings.customToolbarItems.length > 0 && (/*#__PURE__*/React.createElement(Button, {
6910
6834
  iconId: "dune",
6911
6835
  tooltip: "Insert Dune Chart",
6912
6836
  key: "dune-charts",
@@ -6918,7 +6842,17 @@ var Toolbar = function Toolbar(_ref) {
6918
6842
  backgroundColor: "#F4603E2E",
6919
6843
  borderRadius: "8px"
6920
6844
  }
6921
- })), showDuneModal && (/*#__PURE__*/React.createElement(DuneChartsInputModal, {
6845
+ })), settings.customToolbarItems.filter(function (n) {
6846
+ return n.key !== "import-export";
6847
+ }).map(function (n) {
6848
+ return /*#__PURE__*/React.createElement(CustomButton, {
6849
+ tooltip: n.tooltip,
6850
+ onClick: n.onClick,
6851
+ key: n.key,
6852
+ icon: n.icon,
6853
+ iconName: n.iconName
6854
+ }, n.children);
6855
+ }), showDuneModal && (/*#__PURE__*/React.createElement(DuneChartsInputModal, {
6922
6856
  isOpen: showDuneModal,
6923
6857
  onSubmit: function onSubmit(url) {
6924
6858
  setContext(function (draftCtx) {
@@ -6929,7 +6863,6 @@ var Toolbar = function Toolbar(_ref) {
6929
6863
  onClose: function onClose() {
6930
6864
  return setShowDuneModal(false);
6931
6865
  },
6932
- icon: "dune-logo",
6933
6866
  placeholder: "Add Dune chart link to embed",
6934
6867
  submitText: "Embed Dune chart"
6935
6868
  }))));
@@ -7810,12 +7743,8 @@ var ContextMenu = function ContextMenu() {
7810
7743
  className: "context-item"
7811
7744
  }, /*#__PURE__*/React.createElement(SVGIcon, {
7812
7745
  name: "split-flv",
7813
- width: 17,
7814
- height: 17,
7815
- style: {
7816
- marginTop: "4px",
7817
- marginRight: "8px"
7818
- }
7746
+ width: 18,
7747
+ height: 18
7819
7748
  }), "Split text to columns"));
7820
7749
  }
7821
7750
  if (name === "freeze-row") {
@@ -7837,15 +7766,9 @@ var ContextMenu = function ContextMenu() {
7837
7766
  }
7838
7767
  }, /*#__PURE__*/React.createElement("div", {
7839
7768
  className: "context-item"
7840
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7841
- name: "freeze-flv",
7842
- width: 16,
7843
- height: 16,
7844
- style: {
7845
- marginTop: "4px",
7846
- marginRight: "4px"
7847
- }
7848
- }), isFrozen ? "Unfreeze row" : "Freeze to current row"));
7769
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7770
+ name: "Snowflake"
7771
+ }), /*#__PURE__*/React.createElement("p", null, isFrozen ? "Unfreeze row" : "Freeze upto current row")));
7849
7772
  }
7850
7773
  if (name === "freeze-column") {
7851
7774
  var _freezeState = getFreezeState(context);
@@ -7867,15 +7790,9 @@ var ContextMenu = function ContextMenu() {
7867
7790
  }
7868
7791
  }, /*#__PURE__*/React.createElement("div", {
7869
7792
  className: "context-item"
7870
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7871
- name: "freeze-flv",
7872
- width: 18,
7873
- height: 18,
7874
- style: {
7875
- marginTop: "4px",
7876
- marginRight: "4px"
7877
- }
7878
- }), /*#__PURE__*/React.createElement("p", null, _isFrozen ? "Unfreeze column" : "Freeze to current column")));
7793
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7794
+ name: "Snowflake"
7795
+ }), /*#__PURE__*/React.createElement("p", null, _isFrozen ? "Unfreeze column" : "Freeze upto current column")));
7879
7796
  }
7880
7797
  if (name === "comment") {
7881
7798
  return /*#__PURE__*/React.createElement(Menu, {
@@ -7888,14 +7805,8 @@ var ContextMenu = function ContextMenu() {
7888
7805
  }
7889
7806
  }, /*#__PURE__*/React.createElement("div", {
7890
7807
  className: "context-item"
7891
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7892
- name: "comment-flv",
7893
- width: 18,
7894
- height: 18,
7895
- style: {
7896
- marginTop: "4px",
7897
- marginRight: "8px"
7898
- }
7808
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7809
+ name: "MessageSquarePlus"
7899
7810
  }), /*#__PURE__*/React.createElement("p", null, "Comment")));
7900
7811
  }
7901
7812
  if (name === "dataVerification") {
@@ -7910,13 +7821,8 @@ var ContextMenu = function ContextMenu() {
7910
7821
  }
7911
7822
  }, /*#__PURE__*/React.createElement("div", {
7912
7823
  className: "context-item"
7913
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7914
- name: "dataVerification",
7915
- width: 20,
7916
- height: 20,
7917
- style: {
7918
- marginRight: "7px"
7919
- }
7824
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7825
+ name: "ShieldCheck"
7920
7826
  }), /*#__PURE__*/React.createElement("p", null, "Data Verification")));
7921
7827
  }
7922
7828
  if (name === "searchReplace") {
@@ -7932,13 +7838,8 @@ var ContextMenu = function ContextMenu() {
7932
7838
  }
7933
7839
  }, /*#__PURE__*/React.createElement("div", {
7934
7840
  className: "context-item"
7935
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7936
- name: "search",
7937
- width: 20,
7938
- height: 20,
7939
- style: {
7940
- marginRight: "7px"
7941
- }
7841
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7842
+ name: "Search"
7942
7843
  }), /*#__PURE__*/React.createElement("p", null, "Find and Replace")));
7943
7844
  }
7944
7845
  if (name === "copy") {
@@ -7958,14 +7859,8 @@ var ContextMenu = function ContextMenu() {
7958
7859
  }
7959
7860
  }, /*#__PURE__*/React.createElement("div", {
7960
7861
  className: "context-item"
7961
- }, /*#__PURE__*/React.createElement(SVGIcon, {
7962
- name: "copy-flv",
7963
- width: 21,
7964
- height: 21,
7965
- style: {
7966
- marginTop: "4px",
7967
- marginRight: "4px"
7968
- }
7862
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7863
+ name: "Copy"
7969
7864
  }), /*#__PURE__*/React.createElement("p", null, rightclick.copy)));
7970
7865
  }
7971
7866
  if (name === "cut") {
@@ -7998,13 +7893,8 @@ var ContextMenu = function ContextMenu() {
7998
7893
  }
7999
7894
  }, /*#__PURE__*/React.createElement("div", {
8000
7895
  className: "context-item"
8001
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8002
- name: "cut-flv",
8003
- width: 17,
8004
- height: 17,
8005
- style: {
8006
- marginRight: "8px"
8007
- }
7896
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7897
+ name: "Scissors"
8008
7898
  }), /*#__PURE__*/React.createElement("p", null, "Cut")));
8009
7899
  }
8010
7900
  if (name === "paste" && regeneratorRuntime) {
@@ -8036,13 +7926,8 @@ var ContextMenu = function ContextMenu() {
8036
7926
  }()
8037
7927
  }, /*#__PURE__*/React.createElement("div", {
8038
7928
  className: "context-item"
8039
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8040
- name: "paste-flv",
8041
- width: 17,
8042
- height: 17,
8043
- style: {
8044
- marginRight: "8px"
8045
- }
7929
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7930
+ name: "Clipboard"
8046
7931
  }), /*#__PURE__*/React.createElement("p", null, rightclick.paste)));
8047
7932
  }
8048
7933
  if (name === "insert-column") {
@@ -8074,10 +7959,10 @@ var ContextMenu = function ContextMenu() {
8074
7959
  insertRowColOp: insertRowColOp
8075
7960
  });
8076
7961
  }
8077
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SVGIcon, {
8078
- name: "insert-flv",
8079
- width: 18,
8080
- height: 18
7962
+ }, /*#__PURE__*/React.createElement("div", {
7963
+ className: "context-item"
7964
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
7965
+ name: "Plus"
8081
7966
  }), /*#__PURE__*/React.createElement("div", null, "Insert column to the left")));
8082
7967
  });
8083
7968
  }
@@ -8110,10 +7995,10 @@ var ContextMenu = function ContextMenu() {
8110
7995
  insertRowColOp: insertRowColOp
8111
7996
  });
8112
7997
  }
8113
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SVGIcon, {
8114
- name: "insert-flv",
8115
- width: 18,
8116
- height: 18
7998
+ }, /*#__PURE__*/React.createElement("div", {
7999
+ className: "context-item"
8000
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8001
+ name: "Plus"
8117
8002
  }), /*#__PURE__*/React.createElement("div", null, "Insert row below")));
8118
8003
  });
8119
8004
  }
@@ -8160,13 +8045,8 @@ var ContextMenu = function ContextMenu() {
8160
8045
  }
8161
8046
  }, /*#__PURE__*/React.createElement("div", {
8162
8047
  className: "context-item"
8163
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8164
- name: "delete-flv",
8165
- width: 18,
8166
- height: 18,
8167
- style: {
8168
- marginRight: "8px"
8169
- }
8048
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8049
+ name: "Trash2"
8170
8050
  }), /*#__PURE__*/React.createElement("div", null, rightclick.deleteSelected, rightclick.column))));
8171
8051
  }
8172
8052
  if (name === "cell-delete-column") {
@@ -8212,13 +8092,8 @@ var ContextMenu = function ContextMenu() {
8212
8092
  }
8213
8093
  }, /*#__PURE__*/React.createElement("div", {
8214
8094
  className: "context-item"
8215
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8216
- name: "delete-flv",
8217
- width: 18,
8218
- height: 18,
8219
- style: {
8220
- marginRight: "8px"
8221
- }
8095
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8096
+ name: "Trash2"
8222
8097
  }), /*#__PURE__*/React.createElement("div", null, rightclick.deleteSelected, rightclick.column))));
8223
8098
  }
8224
8099
  if (name === "delete-row") {
@@ -8263,13 +8138,8 @@ var ContextMenu = function ContextMenu() {
8263
8138
  }
8264
8139
  }, /*#__PURE__*/React.createElement("div", {
8265
8140
  className: "context-item"
8266
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8267
- name: "delete-flv",
8268
- width: 18,
8269
- height: 18,
8270
- style: {
8271
- marginRight: "8px"
8272
- }
8141
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8142
+ name: "Trash2"
8273
8143
  }), /*#__PURE__*/React.createElement("div", null, rightclick.deleteSelected, rightclick.row))));
8274
8144
  }
8275
8145
  if (name === "cell-delete-row") {
@@ -8314,13 +8184,8 @@ var ContextMenu = function ContextMenu() {
8314
8184
  }
8315
8185
  }, /*#__PURE__*/React.createElement("div", {
8316
8186
  className: "context-item"
8317
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8318
- name: "delete-flv",
8319
- width: 18,
8320
- height: 18,
8321
- style: {
8322
- marginRight: "8px"
8323
- }
8187
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8188
+ name: "Trash2"
8324
8189
  }), /*#__PURE__*/React.createElement("div", null, rightclick.deleteSelected, rightclick.row))));
8325
8190
  }
8326
8191
  if (name === "hide-row") {
@@ -8343,13 +8208,8 @@ var ContextMenu = function ContextMenu() {
8343
8208
  }
8344
8209
  }, /*#__PURE__*/React.createElement("div", {
8345
8210
  className: "context-item"
8346
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8347
- name: "hide-flv",
8348
- width: 18,
8349
- height: 18,
8350
- style: {
8351
- marginRight: "8px"
8352
- }
8211
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8212
+ name: "EyeOff"
8353
8213
  }), /*#__PURE__*/React.createElement("div", null, rightclick[item] + rightclick.row)));
8354
8214
  });
8355
8215
  }
@@ -8373,13 +8233,8 @@ var ContextMenu = function ContextMenu() {
8373
8233
  }
8374
8234
  }, /*#__PURE__*/React.createElement("div", {
8375
8235
  className: "context-item"
8376
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8377
- name: "hide-flv",
8378
- width: 18,
8379
- height: 18,
8380
- style: {
8381
- marginRight: "8px"
8382
- }
8236
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8237
+ name: "EyeOff"
8383
8238
  }), /*#__PURE__*/React.createElement("div", null, rightclick[item] + rightclick.column)));
8384
8239
  });
8385
8240
  }
@@ -8417,11 +8272,8 @@ var ContextMenu = function ContextMenu() {
8417
8272
  className: "context-item"
8418
8273
  }, /*#__PURE__*/React.createElement(SVGIcon, {
8419
8274
  name: "resize-flv",
8420
- width: 18,
8421
- height: 18,
8422
- style: {
8423
- marginRight: "8px"
8424
- }
8275
+ width: 16,
8276
+ height: 16
8425
8277
  }), /*#__PURE__*/React.createElement("div", null, "Resize row height", /*#__PURE__*/React.createElement("input", {
8426
8278
  onClick: function onClick(e) {
8427
8279
  return e.stopPropagation();
@@ -8457,11 +8309,8 @@ var ContextMenu = function ContextMenu() {
8457
8309
  className: "context-item"
8458
8310
  }, /*#__PURE__*/React.createElement(SVGIcon, {
8459
8311
  name: "resize-flv",
8460
- width: 18,
8461
- height: 18,
8462
- style: {
8463
- marginRight: "8px"
8464
- }
8312
+ width: 16,
8313
+ height: 16
8465
8314
  }), /*#__PURE__*/React.createElement("div", null, "Resize column width")))) : null;
8466
8315
  }
8467
8316
  if (name === "clear") {
@@ -8489,13 +8338,8 @@ var ContextMenu = function ContextMenu() {
8489
8338
  }
8490
8339
  }, /*#__PURE__*/React.createElement("div", {
8491
8340
  className: "context-item"
8492
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8493
- name: "clear-flv",
8494
- width: 17,
8495
- height: 17,
8496
- style: {
8497
- marginRight: "8px"
8498
- }
8341
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8342
+ name: "Eraser"
8499
8343
  }), /*#__PURE__*/React.createElement("p", null, rightclick.clearContent)));
8500
8344
  }
8501
8345
  if (name === "ascSort") {
@@ -8511,14 +8355,8 @@ var ContextMenu = function ContextMenu() {
8511
8355
  }
8512
8356
  }, /*#__PURE__*/React.createElement("div", {
8513
8357
  className: "context-item"
8514
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8515
- name: "asc-sort-flv",
8516
- width: 18,
8517
- height: 18,
8518
- style: {
8519
- marginTop: "4px",
8520
- marginRight: "8px"
8521
- }
8358
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8359
+ name: "ArrowDown01"
8522
8360
  }), /*#__PURE__*/React.createElement("p", null, "Ascending sort")));
8523
8361
  }
8524
8362
  if (name === "desSort") {
@@ -8534,14 +8372,8 @@ var ContextMenu = function ContextMenu() {
8534
8372
  }
8535
8373
  }, /*#__PURE__*/React.createElement("div", {
8536
8374
  className: "context-item"
8537
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8538
- name: "des-sort-flv",
8539
- width: 18,
8540
- height: 18,
8541
- style: {
8542
- marginTop: "4px",
8543
- marginRight: "8px"
8544
- }
8375
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8376
+ name: "ArrowDown10"
8545
8377
  }), /*#__PURE__*/React.createElement("p", null, "Descending sort")));
8546
8378
  }
8547
8379
  if (name === "sort") {
@@ -8575,13 +8407,8 @@ var ContextMenu = function ContextMenu() {
8575
8407
  style: {
8576
8408
  height: "40px"
8577
8409
  }
8578
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8579
- name: "sort-asc",
8580
- width: 24,
8581
- height: 18,
8582
- style: {
8583
- marginRight: "4px"
8584
- }
8410
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8411
+ name: "ArrowUp"
8585
8412
  }), /*#__PURE__*/React.createElement("p", null, sort.asc))), /*#__PURE__*/React.createElement(Menu, {
8586
8413
  onClick: function onClick() {
8587
8414
  setContext(function (draftCtx) {
@@ -8594,13 +8421,8 @@ var ContextMenu = function ContextMenu() {
8594
8421
  style: {
8595
8422
  height: "40px"
8596
8423
  }
8597
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8598
- name: "sort-desc",
8599
- width: 24,
8600
- height: 18,
8601
- style: {
8602
- marginRight: "4px"
8603
- }
8424
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8425
+ name: "ArrowDown"
8604
8426
  }), /*#__PURE__*/React.createElement("p", null, sort.desc))))),
8605
8427
  trigger: "mouseenter focus",
8606
8428
  hideOnClick: false
@@ -8608,16 +8430,12 @@ var ContextMenu = function ContextMenu() {
8608
8430
  className: "flex items-center justify-between w-full"
8609
8431
  }, /*#__PURE__*/React.createElement("div", {
8610
8432
  className: "context-item"
8611
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8612
- name: "sort-flv",
8613
- width: 18,
8614
- height: 18,
8615
- style: {
8616
- marginRight: "8px"
8617
- }
8618
- }), /*#__PURE__*/React.createElement("p", null, rightclick.sortSelection)), /*#__PURE__*/React.createElement(SVGIcon, {
8619
- name: "rightArrow",
8620
- width: 18
8433
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8434
+ name: "ArrowDownUp"
8435
+ }), /*#__PURE__*/React.createElement("p", null, rightclick.sortSelection)), /*#__PURE__*/React.createElement(LucideIcon, {
8436
+ name: "ChevronRight",
8437
+ width: 16,
8438
+ height: 16
8621
8439
  })))));
8622
8440
  }
8623
8441
  if (name === "filter") {
@@ -8651,13 +8469,8 @@ var ContextMenu = function ContextMenu() {
8651
8469
  style: {
8652
8470
  height: "40px"
8653
8471
  }
8654
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8655
- name: "filter",
8656
- width: 22,
8657
- height: 22,
8658
- style: {
8659
- marginRight: "4px"
8660
- }
8472
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8473
+ name: "Filter"
8661
8474
  }), /*#__PURE__*/React.createElement("p", null, filter.filter))), /*#__PURE__*/React.createElement(Menu, {
8662
8475
  onClick: function onClick() {
8663
8476
  setContext(function (draftCtx) {
@@ -8670,14 +8483,8 @@ var ContextMenu = function ContextMenu() {
8670
8483
  style: {
8671
8484
  height: "40px"
8672
8485
  }
8673
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8674
- name: "eraser",
8675
- width: 22,
8676
- height: 22,
8677
- style: {
8678
- marginRight: "4px",
8679
- marginLeft: "2px"
8680
- }
8486
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8487
+ name: "Eraser"
8681
8488
  }), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
8682
8489
  trigger: "mouseenter focus",
8683
8490
  hideOnClick: false
@@ -8685,17 +8492,12 @@ var ContextMenu = function ContextMenu() {
8685
8492
  className: "flex items-center justify-between w-full"
8686
8493
  }, /*#__PURE__*/React.createElement("div", {
8687
8494
  className: "context-item"
8688
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8689
- name: "filter",
8690
- width: 22,
8691
- height: 22,
8692
- style: {
8693
- marginRight: "4px",
8694
- marginTop: "2px"
8695
- }
8696
- }), /*#__PURE__*/React.createElement("p", null, rightclick.filterSelection)), /*#__PURE__*/React.createElement(SVGIcon, {
8697
- name: "rightArrow",
8698
- width: 18
8495
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8496
+ name: "Filter"
8497
+ }), /*#__PURE__*/React.createElement("p", null, rightclick.filterSelection)), /*#__PURE__*/React.createElement(LucideIcon, {
8498
+ name: "ChevronRight",
8499
+ width: 16,
8500
+ height: 16
8699
8501
  })))));
8700
8502
  }
8701
8503
  if (name === "image") {
@@ -8720,13 +8522,8 @@ var ContextMenu = function ContextMenu() {
8720
8522
  }
8721
8523
  }, /*#__PURE__*/React.createElement("div", {
8722
8524
  className: "context-item"
8723
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8724
- name: "link",
8725
- width: 20,
8726
- height: 20,
8727
- style: {
8728
- marginRight: "7px"
8729
- }
8525
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8526
+ name: "Link"
8730
8527
  }), /*#__PURE__*/React.createElement("p", null, rightclick.link)));
8731
8528
  }
8732
8529
  if (name === "conditionFormat") {
@@ -8757,16 +8554,11 @@ var ContextMenu = function ContextMenu() {
8757
8554
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
8758
8555
  className: "flex items-center justify-between w-full"
8759
8556
  }, /*#__PURE__*/React.createElement("div", {
8760
- className: "flex items-center gap-2"
8761
- }, /*#__PURE__*/React.createElement(SVGIcon, {
8762
- name: "conditionFormat",
8763
- width: 16,
8764
- height: 16,
8765
- style: {
8766
- marginRight: "2px"
8767
- }
8768
- }), /*#__PURE__*/React.createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/React.createElement(SVGIcon, {
8769
- name: "rightArrow",
8557
+ className: "flex items-center gap-2 context-item"
8558
+ }, /*#__PURE__*/React.createElement(LucideIcon, {
8559
+ name: "PaintbrushVertical"
8560
+ }), /*#__PURE__*/React.createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/React.createElement(LucideIcon, {
8561
+ name: "ChevronRight",
8770
8562
  width: 16,
8771
8563
  height: 16
8772
8564
  })))));
@@ -12083,13 +11875,14 @@ var DunePreview = function DunePreview(_ref) {
12083
11875
  }
12084
11876
  })), /*#__PURE__*/React.createElement("p", null, "Do you want to insert Dune chart?"), /*#__PURE__*/React.createElement("div", {
12085
11877
  className: "fortune-dune-preview-footer"
12086
- }, /*#__PURE__*/React.createElement(Button$1, {
12087
- variant: "ghost",
11878
+ }, /*#__PURE__*/React.createElement("button", {
11879
+ type: "button",
12088
11880
  onClick: onKeepAsLink,
12089
- className: "!w-fit px-0"
12090
- }, "Keep as Link"), /*#__PURE__*/React.createElement(Button$1, {
11881
+ className: "fortune-dune-preview-button"
11882
+ }, "Keep as Link"), /*#__PURE__*/React.createElement("button", {
11883
+ type: "button",
12091
11884
  onClick: onEmbed,
12092
- className: "!w-fit px-0"
11885
+ className: "fortune-dune-preview-button primary"
12093
11886
  }, "Embed")));
12094
11887
  };
12095
11888