@fileverse-dev/fortune-react 1.2.69 → 1.2.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.
@@ -547,7 +547,8 @@ var ConditionRules = function ConditionRules(_a) {
547
547
  className: cn("fortune-toolbar-combo-button !min-w-fit !px-0", {}),
548
548
  style: {
549
549
  width: 30,
550
- height: 30
550
+ height: 30,
551
+ backgroundColor: strikethrough ? "hsl(var(--color-bg-default-selected))" : ""
551
552
  }
552
553
  }, /*#__PURE__*/React.createElement(LucideIcon, {
553
554
  name: "Strikethrough",
@@ -17,12 +17,21 @@ var RangeDialog = function RangeDialog() {
17
17
  rangeTxt2 = _c[0],
18
18
  setRangeTxt2 = _c[1];
19
19
  var close = useCallback(function () {
20
- var _a;
20
+ var _a, _b, _c;
21
21
  setContext(function (ctx) {
22
22
  ctx.rangeDialog.show = false;
23
23
  ctx.rangeDialog.singleSelect = false;
24
24
  });
25
25
  (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
26
+ if (!context.rangeDialog) return;
27
+ var rangeDialogType = context.rangeDialog.type;
28
+ if (rangeDialogType.indexOf("between") >= 0) {
29
+ (_b = document.getElementById("conditional-format-button")) === null || _b === void 0 ? void 0 : _b.click();
30
+ return;
31
+ }
32
+ if (rangeDialogType.indexOf("conditionRules") >= 0) {
33
+ (_c = document.getElementById("conditional-format-button")) === null || _c === void 0 ? void 0 : _c.click();
34
+ }
26
35
  }, [setContext, showDialog, context]);
27
36
  useEffect(function () {
28
37
  setRangeTxt2(getDisplayedRangeTxt(context));
@@ -556,7 +556,8 @@ var ConditionRules = function ConditionRules(_a) {
556
556
  className: (0, _ui.cn)("fortune-toolbar-combo-button !min-w-fit !px-0", {}),
557
557
  style: {
558
558
  width: 30,
559
- height: 30
559
+ height: 30,
560
+ backgroundColor: strikethrough ? "hsl(var(--color-bg-default-selected))" : ""
560
561
  }
561
562
  }, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
562
563
  name: "Strikethrough",
@@ -26,12 +26,21 @@ var RangeDialog = function RangeDialog() {
26
26
  rangeTxt2 = _c[0],
27
27
  setRangeTxt2 = _c[1];
28
28
  var close = (0, _react.useCallback)(function () {
29
- var _a;
29
+ var _a, _b, _c;
30
30
  setContext(function (ctx) {
31
31
  ctx.rangeDialog.show = false;
32
32
  ctx.rangeDialog.singleSelect = false;
33
33
  });
34
34
  (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
35
+ if (!context.rangeDialog) return;
36
+ var rangeDialogType = context.rangeDialog.type;
37
+ if (rangeDialogType.indexOf("between") >= 0) {
38
+ (_b = document.getElementById("conditional-format-button")) === null || _b === void 0 ? void 0 : _b.click();
39
+ return;
40
+ }
41
+ if (rangeDialogType.indexOf("conditionRules") >= 0) {
42
+ (_c = document.getElementById("conditional-format-button")) === null || _c === void 0 ? void 0 : _c.click();
43
+ }
35
44
  }, [setContext, showDialog, context]);
36
45
  (0, _react.useEffect)(function () {
37
46
  setRangeTxt2((0, _getDisplayedRangeTxt.getDisplayedRangeTxt)(context));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.69",
3
+ "version": "1.2.71",
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.2.69",
19
+ "@fileverse-dev/fortune-core": "1.2.70",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",