@leankylin-sheet/core 1.2.7 → 1.2.9
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 +7 -3
- package/dist/index.js +7 -3
- package/dist/settings.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -65666,8 +65666,12 @@ var defaultSettings = {
|
|
|
65666
65666
|
defaultRowHeight: 19,
|
|
65667
65667
|
defaultFontSize: 10,
|
|
65668
65668
|
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "currency-format", "percentage-format", "number-decrease", "number-increase", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "freeze", "conditionFormat", "filter", "link", "image", "comment", "quick-formula", "dataVerification", "splitColumn", "locationCondition", "screenshot", "search"],
|
|
65669
|
-
cellContextMenu:
|
|
65670
|
-
|
|
65669
|
+
cellContextMenu: function cellContextMenu() {
|
|
65670
|
+
return ["copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA", "filter", "chart", "image", "link", "data", "cell-format"];
|
|
65671
|
+
},
|
|
65672
|
+
cellCustomContextMenu: function cellCustomContextMenu() {
|
|
65673
|
+
return [];
|
|
65674
|
+
},
|
|
65671
65675
|
headerContextMenu: ["copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA"],
|
|
65672
65676
|
sheetTabContextMenu: ["delete", "copy", "rename", "color", "hide", "|", "move"],
|
|
65673
65677
|
filterContextMenu: ["sort-by-asc", "sort-by-desc", "|", "filter-by-color", "|", "filter-by-value"],
|
|
@@ -66480,7 +66484,7 @@ function handleContextMenu(ctx, settings, e, workbookContainer, container, area)
|
|
|
66480
66484
|
if (!flowdata) return;
|
|
66481
66485
|
var workbookRect = workbookContainer.getBoundingClientRect();
|
|
66482
66486
|
var cellContextMenu = settings.cellContextMenu;
|
|
66483
|
-
if (_.isEmpty(cellContextMenu)) {
|
|
66487
|
+
if (cellContextMenu && _.isEmpty(cellContextMenu())) {
|
|
66484
66488
|
return;
|
|
66485
66489
|
}
|
|
66486
66490
|
var x = e.pageX - workbookRect.left;
|
package/dist/index.js
CHANGED
|
@@ -65676,8 +65676,12 @@ var defaultSettings = {
|
|
|
65676
65676
|
defaultRowHeight: 19,
|
|
65677
65677
|
defaultFontSize: 10,
|
|
65678
65678
|
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "currency-format", "percentage-format", "number-decrease", "number-increase", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "freeze", "conditionFormat", "filter", "link", "image", "comment", "quick-formula", "dataVerification", "splitColumn", "locationCondition", "screenshot", "search"],
|
|
65679
|
-
cellContextMenu:
|
|
65680
|
-
|
|
65679
|
+
cellContextMenu: function cellContextMenu() {
|
|
65680
|
+
return ["copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA", "filter", "chart", "image", "link", "data", "cell-format"];
|
|
65681
|
+
},
|
|
65682
|
+
cellCustomContextMenu: function cellCustomContextMenu() {
|
|
65683
|
+
return [];
|
|
65684
|
+
},
|
|
65681
65685
|
headerContextMenu: ["copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA"],
|
|
65682
65686
|
sheetTabContextMenu: ["delete", "copy", "rename", "color", "hide", "|", "move"],
|
|
65683
65687
|
filterContextMenu: ["sort-by-asc", "sort-by-desc", "|", "filter-by-color", "|", "filter-by-value"],
|
|
@@ -66490,7 +66494,7 @@ function handleContextMenu(ctx, settings, e, workbookContainer, container, area)
|
|
|
66490
66494
|
if (!flowdata) return;
|
|
66491
66495
|
var workbookRect = workbookContainer.getBoundingClientRect();
|
|
66492
66496
|
var cellContextMenu = settings.cellContextMenu;
|
|
66493
|
-
if (___default['default'].isEmpty(cellContextMenu)) {
|
|
66497
|
+
if (cellContextMenu && ___default['default'].isEmpty(cellContextMenu())) {
|
|
66494
66498
|
return;
|
|
66495
66499
|
}
|
|
66496
66500
|
var x = e.pageX - workbookRect.left;
|
package/dist/settings.d.ts
CHANGED
|
@@ -82,9 +82,9 @@ export type Settings = {
|
|
|
82
82
|
defaultRowHeight?: number;
|
|
83
83
|
defaultFontSize?: number;
|
|
84
84
|
toolbarItems?: string[];
|
|
85
|
-
cellContextMenu?: string[];
|
|
85
|
+
cellContextMenu?: () => string[];
|
|
86
86
|
headerContextMenu?: string[];
|
|
87
|
-
cellCustomContextMenu: {
|
|
87
|
+
cellCustomContextMenu: () => {
|
|
88
88
|
key: string;
|
|
89
89
|
element: any;
|
|
90
90
|
onClick: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "http://114.55.85.79:19999/leankylin-front/leankylin-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@leankylin-sheet/formula-parser": "^1.2.
|
|
13
|
+
"@leankylin-sheet/formula-parser": "^1.2.9",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|