@fileverse-dev/fortune-react 1.2.1 → 1.2.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.
@@ -23,7 +23,6 @@ var RangeDialog = function RangeDialog() {
23
23
  ctx.rangeDialog.show = false;
24
24
  ctx.rangeDialog.singleSelect = false;
25
25
  });
26
- console.log("rangeDialogType");
27
26
  (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
28
27
  if (!context.rangeDialog) return;
29
28
  var rangeDialogType = context.rangeDialog.type;
@@ -39,7 +38,6 @@ var RangeDialog = function RangeDialog() {
39
38
  type: rulesType
40
39
  }), undefined, locale(context).conditionformat["conditionformat_".concat(rulesType)]);
41
40
  }
42
- console.log("rangeDialogType", rangeDialogType);
43
41
  }, [setContext, showDialog, context]);
44
42
  useEffect(function () {
45
43
  setRangeTxt2(getDisplayedRangeTxt(context));
@@ -195,6 +195,15 @@ var ColumnHeader = function ColumnHeader() {
195
195
  useEffect(function () {
196
196
  containerRef.current.scrollLeft = context.scrollLeft;
197
197
  }, [context.scrollLeft]);
198
+ var _h = useState(0),
199
+ hovered = _h[0],
200
+ setHovered = _h[1];
201
+ var onMouseMoveHideRight = useCallback(function () {
202
+ setHovered(-21);
203
+ }, []);
204
+ var onMouseLeaveHideRight = useCallback(function () {
205
+ setHovered(0);
206
+ }, []);
198
207
  return /*#__PURE__*/React.createElement("div", {
199
208
  ref: containerRef,
200
209
  className: "fortune-col-header",
@@ -238,10 +247,12 @@ var ColumnHeader = function ColumnHeader() {
238
247
  }))));
239
248
  }), hiddenPointers.map(function (item) {
240
249
  return /*#__PURE__*/React.createElement("div", {
241
- className: "flex gap-4 cursor-pointer hide-btn align-center",
250
+ onMouseEnter: onMouseMoveHideRight,
251
+ onMouseLeave: onMouseLeaveHideRight,
252
+ className: "flex gap-4 cursor-pointer hide-btn-right align-center",
242
253
  style: {
243
254
  height: context.columnHeaderHeight - 12,
244
- left: "".concat(item.left + 6, "px")
255
+ left: "".concat(item.left + 8 + hovered, "px")
245
256
  },
246
257
  onClick: function onClick(e) {
247
258
  return showColumn(e, item);
@@ -206,9 +206,9 @@ var RowHeader = function RowHeader() {
206
206
  onContextMenu: onContextMenu
207
207
  }, hiddenPointers.map(function (item) {
208
208
  return /*#__PURE__*/React.createElement("div", {
209
- className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row hide-btn",
209
+ className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row",
210
210
  style: {
211
- top: "".concat(item.top - 16, "px"),
211
+ top: "".concat(item.top - 15, "px"),
212
212
  zIndex: 100
213
213
  },
214
214
  onClick: function onClick(e) {
@@ -1013,16 +1013,42 @@
1013
1013
  }
1014
1014
 
1015
1015
  .hide-btn {
1016
- padding-top: 1px;
1016
+ padding-left: 2px;
1017
+ padding-top: 2px;
1017
1018
  position: absolute;
1018
1019
  right: 5;
1019
1020
  top: 5px;
1020
1021
  z-index: 200;
1021
- width: 9px;
1022
1022
  }
1023
1023
 
1024
1024
  .hide-btn:hover {
1025
- border: 1px solid #0188fb;
1025
+ padding-left: 1px;
1026
+ padding-top: 1px;
1027
+ width: 28px;
1028
+ border: 1px solid black;
1029
+ background-color: rgba(255, 255, 255, 1);
1030
+ border-radius: var(--border-radius-sm, 4px);
1031
+ }
1032
+
1033
+ .hide-btn-right {
1034
+ padding-right: 3px;
1035
+ padding-top: 2px;
1036
+ position: absolute;
1037
+ right: 5;
1038
+ top: 5px;
1039
+ z-index: 200;
1040
+ margin-right: 20px;
1041
+ }
1042
+
1043
+ .hide-btn-right:hover {
1044
+ padding-right: 2px;
1045
+ padding-top: 1px;
1046
+ z-index: 198;
1047
+ justify-content: end;
1048
+ width: 30px;
1049
+ border: 1px solid black;
1050
+ background-color: rgba(255, 255, 255, 1);
1051
+ border-radius: var(--border-radius-sm, 4px);
1026
1052
  }
1027
1053
 
1028
1054
  .rotate-row-icon {
@@ -1031,6 +1057,13 @@
1031
1057
 
1032
1058
  .hide-btn-row {
1033
1059
  position: absolute;
1034
- left: 4px;
1060
+ left: 4px;
1035
1061
  z-index: 200;
1062
+ width: 15px;
1063
+ }
1064
+
1065
+ .hide-btn-row:hover {
1066
+ background-color: white;
1067
+ border: 1px solid black;
1068
+ border-radius: 4px;
1036
1069
  }
@@ -32,7 +32,6 @@ var RangeDialog = function RangeDialog() {
32
32
  ctx.rangeDialog.show = false;
33
33
  ctx.rangeDialog.singleSelect = false;
34
34
  });
35
- console.log("rangeDialogType");
36
35
  (_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
37
36
  if (!context.rangeDialog) return;
38
37
  var rangeDialogType = context.rangeDialog.type;
@@ -48,7 +47,6 @@ var RangeDialog = function RangeDialog() {
48
47
  type: rulesType
49
48
  }), undefined, (0, _fortuneCore.locale)(context).conditionformat["conditionformat_".concat(rulesType)]);
50
49
  }
51
- console.log("rangeDialogType", rangeDialogType);
52
50
  }, [setContext, showDialog, context]);
53
51
  (0, _react.useEffect)(function () {
54
52
  setRangeTxt2((0, _getDisplayedRangeTxt.getDisplayedRangeTxt)(context));
@@ -204,6 +204,15 @@ var ColumnHeader = function ColumnHeader() {
204
204
  (0, _react.useEffect)(function () {
205
205
  containerRef.current.scrollLeft = context.scrollLeft;
206
206
  }, [context.scrollLeft]);
207
+ var _h = (0, _react.useState)(0),
208
+ hovered = _h[0],
209
+ setHovered = _h[1];
210
+ var onMouseMoveHideRight = (0, _react.useCallback)(function () {
211
+ setHovered(-21);
212
+ }, []);
213
+ var onMouseLeaveHideRight = (0, _react.useCallback)(function () {
214
+ setHovered(0);
215
+ }, []);
207
216
  return /*#__PURE__*/_react.default.createElement("div", {
208
217
  ref: containerRef,
209
218
  className: "fortune-col-header",
@@ -247,10 +256,12 @@ var ColumnHeader = function ColumnHeader() {
247
256
  }))));
248
257
  }), hiddenPointers.map(function (item) {
249
258
  return /*#__PURE__*/_react.default.createElement("div", {
250
- className: "flex gap-4 cursor-pointer hide-btn align-center",
259
+ onMouseEnter: onMouseMoveHideRight,
260
+ onMouseLeave: onMouseLeaveHideRight,
261
+ className: "flex gap-4 cursor-pointer hide-btn-right align-center",
251
262
  style: {
252
263
  height: context.columnHeaderHeight - 12,
253
- left: "".concat(item.left + 6, "px")
264
+ left: "".concat(item.left + 8 + hovered, "px")
254
265
  },
255
266
  onClick: function onClick(e) {
256
267
  return showColumn(e, item);
@@ -215,9 +215,9 @@ var RowHeader = function RowHeader() {
215
215
  onContextMenu: onContextMenu
216
216
  }, hiddenPointers.map(function (item) {
217
217
  return /*#__PURE__*/_react.default.createElement("div", {
218
- className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row hide-btn",
218
+ className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row",
219
219
  style: {
220
- top: "".concat(item.top - 16, "px"),
220
+ top: "".concat(item.top - 15, "px"),
221
221
  zIndex: 100
222
222
  },
223
223
  onClick: function onClick(e) {
@@ -1013,16 +1013,42 @@
1013
1013
  }
1014
1014
 
1015
1015
  .hide-btn {
1016
- padding-top: 1px;
1016
+ padding-left: 2px;
1017
+ padding-top: 2px;
1017
1018
  position: absolute;
1018
1019
  right: 5;
1019
1020
  top: 5px;
1020
1021
  z-index: 200;
1021
- width: 9px;
1022
1022
  }
1023
1023
 
1024
1024
  .hide-btn:hover {
1025
- border: 1px solid #0188fb;
1025
+ padding-left: 1px;
1026
+ padding-top: 1px;
1027
+ width: 28px;
1028
+ border: 1px solid black;
1029
+ background-color: rgba(255, 255, 255, 1);
1030
+ border-radius: var(--border-radius-sm, 4px);
1031
+ }
1032
+
1033
+ .hide-btn-right {
1034
+ padding-right: 3px;
1035
+ padding-top: 2px;
1036
+ position: absolute;
1037
+ right: 5;
1038
+ top: 5px;
1039
+ z-index: 200;
1040
+ margin-right: 20px;
1041
+ }
1042
+
1043
+ .hide-btn-right:hover {
1044
+ padding-right: 2px;
1045
+ padding-top: 1px;
1046
+ z-index: 198;
1047
+ justify-content: end;
1048
+ width: 30px;
1049
+ border: 1px solid black;
1050
+ background-color: rgba(255, 255, 255, 1);
1051
+ border-radius: var(--border-radius-sm, 4px);
1026
1052
  }
1027
1053
 
1028
1054
  .rotate-row-icon {
@@ -1031,6 +1057,13 @@
1031
1057
 
1032
1058
  .hide-btn-row {
1033
1059
  position: absolute;
1034
- left: 4px;
1060
+ left: 4px;
1035
1061
  z-index: 200;
1062
+ width: 15px;
1063
+ }
1064
+
1065
+ .hide-btn-row:hover {
1066
+ background-color: white;
1067
+ border: 1px solid black;
1068
+ border-radius: 4px;
1036
1069
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.1",
3
+ "version": "1.2.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.2.1",
19
+ "@fileverse-dev/fortune-core": "1.2.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",