@fileverse-dev/fortune-react 1.1.99-patch-6 → 1.1.99-patch-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/es/components/ContextMenu/index.js +2 -2
  2. package/es/components/DataVerification/ColorPicker.js +7 -31
  3. package/es/components/DataVerification/DropdownList.js +1 -20
  4. package/es/components/DataVerification/DropdownOption.js +2 -5
  5. package/es/components/DataVerification/RangeDialog.js +5 -1
  6. package/es/components/DataVerification/index.css +1 -21
  7. package/es/components/DataVerification/index.js +5 -31
  8. package/es/components/SheetOverlay/ColumnHeader.js +5 -88
  9. package/es/components/SheetOverlay/FormulaHint/index.js +2 -13
  10. package/es/components/SheetOverlay/RowHeader.js +5 -82
  11. package/es/components/SheetOverlay/index.css +1 -24
  12. package/es/components/Toolbar/index.d.ts +1 -1
  13. package/es/components/Toolbar/index.js +19 -23
  14. package/es/components/Workbook/index.d.ts +1 -1
  15. package/es/components/Workbook/index.js +0 -5
  16. package/lib/components/ContextMenu/index.js +2 -2
  17. package/lib/components/DataVerification/ColorPicker.js +6 -30
  18. package/lib/components/DataVerification/DropdownList.js +1 -20
  19. package/lib/components/DataVerification/DropdownOption.js +2 -5
  20. package/lib/components/DataVerification/RangeDialog.js +5 -1
  21. package/lib/components/DataVerification/index.css +1 -21
  22. package/lib/components/DataVerification/index.js +5 -31
  23. package/lib/components/SheetOverlay/ColumnHeader.js +4 -86
  24. package/lib/components/SheetOverlay/FormulaHint/index.js +2 -13
  25. package/lib/components/SheetOverlay/RowHeader.js +4 -80
  26. package/lib/components/SheetOverlay/index.css +1 -24
  27. package/lib/components/Toolbar/index.d.ts +1 -1
  28. package/lib/components/Toolbar/index.js +19 -22
  29. package/lib/components/Workbook/index.d.ts +1 -1
  30. package/lib/components/Workbook/index.js +0 -5
  31. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Cell } from "@fileverse-dev/fortune-core";
3
3
  import "./index.css";
4
- export declare const getLucideIcon: (title: string) => "Ethereum" | "DollarSign" | "" | "ChevronDown" | "Undo" | "Redo" | "PaintRoller" | "Bold" | "Italic" | "Strikethrough" | "Underline" | "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownToLine" | "TextOverflow" | "WrapText" | "TextClip" | "Baseline" | "PaintBucket" | "Border" | "MergeHorizontal" | "Percent" | "DecimalsArrowLeft" | "DecimalsArrowRight" | "PaintbrushVertical" | "Filter" | "Link" | "MessageSquarePlus" | "Image" | "Sigma" | "ShieldCheck" | "Search" | "DuneChart" | "Ellipsis";
4
+ export declare const getLucideIcon: (title: string) => "Ethereum" | "DollarSign" | "" | "ChevronDown" | "Undo" | "Redo" | "Underline" | "Border" | "Filter" | "Link" | "Search" | "Percent" | "PaintRoller" | "Bold" | "Italic" | "Strikethrough" | "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownToLine" | "TextOverflow" | "WrapText" | "TextClip" | "Baseline" | "PaintBucket" | "MergeHorizontal" | "DecimalsArrowLeft" | "DecimalsArrowRight" | "PaintbrushVertical" | "MessageSquarePlus" | "Image" | "Sigma" | "ShieldCheck" | "DuneChart" | "Ellipsis";
5
5
  export declare const CurrencySelector: ({ cell, defaultTextFormat, toolTipText, }: {
6
6
  cell: Cell | null | undefined;
7
7
  defaultTextFormat: string;
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getLucideIcon = exports.default = exports.CurrencySelector = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _fortuneCore = require("@fileverse-dev/fortune-core");
10
+ var _api = require("@fileverse-dev/fortune-core/src/api");
10
11
  var _lodash = _interopRequireDefault(require("lodash"));
11
12
  var _ui = require("@fileverse/ui");
12
13
  var _dataVerificationPortal = _interopRequireDefault(require("./dataVerificationPortal"));
@@ -596,27 +597,6 @@ var Toolbar = function Toolbar(_a) {
596
597
  var _o = (0, _react.useState)(false),
597
598
  showDataValidation = _o[0],
598
599
  setShowDataValidation = _o[1];
599
- var dataVerificationClick = function dataVerificationClick() {
600
- var _a;
601
- var selection = _fortuneCore.api.getSelection(context);
602
- if (!selection) {
603
- setContext(function (ctx) {
604
- _fortuneCore.api.setSelection(ctx, [{
605
- row: [0, 0],
606
- column: [0, 0]
607
- }], {
608
- id: context.currentSheetId
609
- });
610
- });
611
- }
612
- (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
613
- setTimeout(function () {
614
- setShowDataValidation(true);
615
- }, 100);
616
- };
617
- (0, _react.useEffect)(function () {
618
- window.dataVerificationClick = dataVerificationClick;
619
- }, []);
620
600
  var getToolbarItem = (0, _react.useCallback)(function (name, i) {
621
601
  var _a, _b, _c, _d, _e, _f, _g;
622
602
  var tooltip = toolbar[name];
@@ -999,7 +979,24 @@ var Toolbar = function Toolbar(_a) {
999
979
  iconId: name,
1000
980
  tooltip: tooltip,
1001
981
  key: name,
1002
- onClick: dataVerificationClick
982
+ onClick: function onClick() {
983
+ var _a;
984
+ var selection = (0, _api.getSelection)(context);
985
+ if (!selection) {
986
+ setContext(function (ctx) {
987
+ (0, _api.setSelection)(ctx, [{
988
+ row: [0, 0],
989
+ column: [0, 0]
990
+ }], {
991
+ id: context.currentSheetId
992
+ });
993
+ });
994
+ }
995
+ (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
996
+ setTimeout(function () {
997
+ setShowDataValidation(true);
998
+ }, 100);
999
+ }
1003
1000
  }));
1004
1001
  }
1005
1002
  if (name === "locationCondition") {
@@ -57,7 +57,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
57
57
  getHtmlByRange: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => string | null;
58
58
  setSelection: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
59
59
  setCellValuesByRange: (data: any[][], range: import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
60
- setCellFormatByRange: (attr: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle, value: any, range: import("@fileverse-dev/fortune-core").Range | import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
60
+ setCellFormatByRange: (attr: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle, value: any, range: import("@fileverse-dev/fortune-core").SingleRange | import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
61
61
  mergeCells: (ranges: import("@fileverse-dev/fortune-core").Range, type: string, options?: api.CommonOptions) => void;
62
62
  cancelMerge: (ranges: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
63
63
  getAllSheets: () => SheetType[];
@@ -656,11 +656,6 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
656
656
  }
657
657
  });
658
658
  }
659
- setContextWithProduce(function (ctx) {
660
- if (ctx.luckysheet_selection_range) {
661
- ctx.luckysheet_selection_range = [];
662
- }
663
- });
664
659
  }, [context, setContextWithProduce]);
665
660
  var onMoreToolbarItemsClose = (0, _react.useCallback)(function () {
666
661
  setMoreToolbarItems(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.1.99-patch-6",
3
+ "version": "1.1.99-patch-2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.1.99-patch-6",
19
+ "@fileverse-dev/fortune-core": "1.1.99-patch-2",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",