@fileverse-dev/fortune-react 1.2.99 → 1.3.0

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.
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import "./index.css";
3
3
  import "./formating.css";
4
4
  declare const ConditionRules: React.FC<{
5
- type?: string;
6
5
  context?: any;
7
6
  }>;
8
7
  export default ConditionRules;
@@ -11,9 +11,7 @@ import { injectDatepickerStyles } from "../../utils/datepickerStyles";
11
11
  import "./formating.css";
12
12
  injectDatepickerStyles();
13
13
  var ConditionRules = function ConditionRules(_a) {
14
- var rulesType = _a.type,
15
- context = _a.context;
16
- console.log("rulesType", rulesType);
14
+ var context = _a.context;
17
15
  var _b = useState("greaterThan"),
18
16
  type = _b[0],
19
17
  setType = _b[1];
@@ -120,7 +120,7 @@ var ConditionalFormat = function ConditionalFormat(_a) {
120
120
  onClick: function onClick() {
121
121
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
122
122
  showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
123
- type: v.text
123
+ context: context
124
124
  }), undefined, conditionformat["conditionformat_".concat(v.text)]);
125
125
  },
126
126
  tabIndex: 0
@@ -167,7 +167,7 @@ var ConditionalFormat = function ConditionalFormat(_a) {
167
167
  onClick: function onClick() {
168
168
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
169
169
  showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
170
- type: v.text
170
+ context: context
171
171
  }), undefined, conditionformat["conditionformat_".concat(v.text)]);
172
172
  },
173
173
  tabIndex: 0
@@ -9,43 +9,6 @@
9
9
  overflow: auto;
10
10
  }
11
11
 
12
- /* BEM selectors for testing and styling */
13
- .fortune-dialog__header {
14
- /* header container */
15
- }
16
-
17
- .fortune-dialog__heading {
18
- /* dialog title */
19
- }
20
-
21
- .fortune-dialog__para {
22
- /* dialog body content */
23
- }
24
-
25
- .fortune-dialog__icon {
26
- /* icon in header (e.g. close) */
27
- }
28
-
29
- .fortune-dialog__icon--close {
30
- /* close button icon */
31
- }
32
-
33
- .fortune-dialog__actions {
34
- /* footer action container */
35
- }
36
-
37
- .fortune-dialog__cta {
38
- /* primary/secondary action button */
39
- }
40
-
41
- .fortune-dialog__cta--cancel {
42
- /* cancel button */
43
- }
44
-
45
- .fortune-dialog__cta--confirm {
46
- /* confirm/ok button */
47
- }
48
-
49
12
  .fortune-dialog-box-button-container {
50
13
  display: flex;
51
14
  align-items: center;
@@ -105,6 +105,7 @@ export var useSmoothScroll = function useSmoothScroll(scrollContainerRef) {
105
105
  autoScrollAnimationId = requestAnimationFrame(autoScroll);
106
106
  }
107
107
  function onMouseDown(e) {
108
+ if (context.luckysheetCellUpdate.length > 0) return;
108
109
  if (e.button !== 0) return;
109
110
  var target = e.target;
110
111
  if (target.tagName === "INPUT" || target.tagName === "BUTTON" || target.tagName === "SELECT" || target.tagName === "TEXTAREA" || target.closest("button") || target.closest("input")) {
@@ -367,5 +368,5 @@ export var useSmoothScroll = function useSmoothScroll(scrollContainerRef) {
367
368
  if (!scrollContainerEl || !horizontalScrollbarEl || !verticalScrollbarEl) return function () {};
368
369
  var unmountScrollEventHandlers = mountScrollEventHandlers(scrollContainerEl, horizontalScrollbarEl, verticalScrollbarEl);
369
370
  return unmountScrollEventHandlers;
370
- }, [context.zoomRatio]);
371
+ }, [context.zoomRatio, context.luckysheetCellUpdate]);
371
372
  };
@@ -1199,7 +1199,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
1199
1199
  getShowDialog: () => typeof useDialog;
1200
1200
  getSplitColComponent: () => import("react").FC<{}>;
1201
1201
  getConditionalFormatComponent: () => import("react").FC<{
1202
- type?: string | undefined;
1203
1202
  context?: any;
1204
1203
  }>;
1205
1204
  };
@@ -1206,7 +1206,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
1206
1206
  getShowDialog: () => typeof import("../../hooks/useDialog").useDialog;
1207
1207
  getSplitColComponent: () => React.FC<{}>;
1208
1208
  getConditionalFormatComponent: () => React.FC<{
1209
- type?: string | undefined;
1210
1209
  context?: any;
1211
1210
  }>;
1212
1211
  }>>;
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import "./index.css";
3
3
  import "./formating.css";
4
4
  declare const ConditionRules: React.FC<{
5
- type?: string;
6
5
  context?: any;
7
6
  }>;
8
7
  export default ConditionRules;
@@ -20,9 +20,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
20
20
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
21
  (0, _datepickerStyles.injectDatepickerStyles)();
22
22
  var ConditionRules = function ConditionRules(_a) {
23
- var rulesType = _a.type,
24
- context = _a.context;
25
- console.log("rulesType", rulesType);
23
+ var context = _a.context;
26
24
  var _b = (0, _react.useState)("greaterThan"),
27
25
  type = _b[0],
28
26
  setType = _b[1];
@@ -129,7 +129,7 @@ var ConditionalFormat = function ConditionalFormat(_a) {
129
129
  onClick: function onClick() {
130
130
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
131
131
  showDialog(/*#__PURE__*/_react.default.createElement(_ConditionRules.default, {
132
- type: v.text
132
+ context: context
133
133
  }), undefined, conditionformat["conditionformat_".concat(v.text)]);
134
134
  },
135
135
  tabIndex: 0
@@ -176,7 +176,7 @@ var ConditionalFormat = function ConditionalFormat(_a) {
176
176
  onClick: function onClick() {
177
177
  setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
178
178
  showDialog(/*#__PURE__*/_react.default.createElement(_ConditionRules.default, {
179
- type: v.text
179
+ context: context
180
180
  }), undefined, conditionformat["conditionformat_".concat(v.text)]);
181
181
  },
182
182
  tabIndex: 0
@@ -9,43 +9,6 @@
9
9
  overflow: auto;
10
10
  }
11
11
 
12
- /* BEM selectors for testing and styling */
13
- .fortune-dialog__header {
14
- /* header container */
15
- }
16
-
17
- .fortune-dialog__heading {
18
- /* dialog title */
19
- }
20
-
21
- .fortune-dialog__para {
22
- /* dialog body content */
23
- }
24
-
25
- .fortune-dialog__icon {
26
- /* icon in header (e.g. close) */
27
- }
28
-
29
- .fortune-dialog__icon--close {
30
- /* close button icon */
31
- }
32
-
33
- .fortune-dialog__actions {
34
- /* footer action container */
35
- }
36
-
37
- .fortune-dialog__cta {
38
- /* primary/secondary action button */
39
- }
40
-
41
- .fortune-dialog__cta--cancel {
42
- /* cancel button */
43
- }
44
-
45
- .fortune-dialog__cta--confirm {
46
- /* confirm/ok button */
47
- }
48
-
49
12
  .fortune-dialog-box-button-container {
50
13
  display: flex;
51
14
  align-items: center;
@@ -112,6 +112,7 @@ var useSmoothScroll = exports.useSmoothScroll = function useSmoothScroll(scrollC
112
112
  autoScrollAnimationId = requestAnimationFrame(autoScroll);
113
113
  }
114
114
  function onMouseDown(e) {
115
+ if (context.luckysheetCellUpdate.length > 0) return;
115
116
  if (e.button !== 0) return;
116
117
  var target = e.target;
117
118
  if (target.tagName === "INPUT" || target.tagName === "BUTTON" || target.tagName === "SELECT" || target.tagName === "TEXTAREA" || target.closest("button") || target.closest("input")) {
@@ -374,5 +375,5 @@ var useSmoothScroll = exports.useSmoothScroll = function useSmoothScroll(scrollC
374
375
  if (!scrollContainerEl || !horizontalScrollbarEl || !verticalScrollbarEl) return function () {};
375
376
  var unmountScrollEventHandlers = mountScrollEventHandlers(scrollContainerEl, horizontalScrollbarEl, verticalScrollbarEl);
376
377
  return unmountScrollEventHandlers;
377
- }, [context.zoomRatio]);
378
+ }, [context.zoomRatio, context.luckysheetCellUpdate]);
378
379
  };
@@ -1199,7 +1199,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
1199
1199
  getShowDialog: () => typeof useDialog;
1200
1200
  getSplitColComponent: () => import("react").FC<{}>;
1201
1201
  getConditionalFormatComponent: () => import("react").FC<{
1202
- type?: string | undefined;
1203
1202
  context?: any;
1204
1203
  }>;
1205
1204
  };
@@ -1206,7 +1206,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
1206
1206
  getShowDialog: () => typeof import("../../hooks/useDialog").useDialog;
1207
1207
  getSplitColComponent: () => React.FC<{}>;
1208
1208
  getConditionalFormatComponent: () => React.FC<{
1209
- type?: string | undefined;
1210
1209
  context?: any;
1211
1210
  }>;
1212
1211
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.99",
3
+ "version": "1.3.0",
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.99",
19
+ "@fileverse-dev/fortune-core": "1.3.0",
20
20
  "@fileverse/ui": "5.0.0",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",