@leankylin-sheet/core 1.2.7 → 1.2.10
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 +8 -3
- package/dist/index.js +8 -3
- package/dist/settings.d.ts +3 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -65643,6 +65643,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
65643
65643
|
|
|
65644
65644
|
var defaultSettings = {
|
|
65645
65645
|
fxContainer: undefined,
|
|
65646
|
+
disabledKeyboardCodes: [],
|
|
65646
65647
|
Footer: undefined,
|
|
65647
65648
|
blank: {
|
|
65648
65649
|
width: 16,
|
|
@@ -65666,8 +65667,12 @@ var defaultSettings = {
|
|
|
65666
65667
|
defaultRowHeight: 19,
|
|
65667
65668
|
defaultFontSize: 10,
|
|
65668
65669
|
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
|
-
|
|
65670
|
+
cellContextMenu: function cellContextMenu() {
|
|
65671
|
+
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"];
|
|
65672
|
+
},
|
|
65673
|
+
cellCustomContextMenu: function cellCustomContextMenu() {
|
|
65674
|
+
return [];
|
|
65675
|
+
},
|
|
65671
65676
|
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
65677
|
sheetTabContextMenu: ["delete", "copy", "rename", "color", "hide", "|", "move"],
|
|
65673
65678
|
filterContextMenu: ["sort-by-asc", "sort-by-desc", "|", "filter-by-color", "|", "filter-by-value"],
|
|
@@ -66480,7 +66485,7 @@ function handleContextMenu(ctx, settings, e, workbookContainer, container, area)
|
|
|
66480
66485
|
if (!flowdata) return;
|
|
66481
66486
|
var workbookRect = workbookContainer.getBoundingClientRect();
|
|
66482
66487
|
var cellContextMenu = settings.cellContextMenu;
|
|
66483
|
-
if (_.isEmpty(cellContextMenu)) {
|
|
66488
|
+
if (cellContextMenu && _.isEmpty(cellContextMenu())) {
|
|
66484
66489
|
return;
|
|
66485
66490
|
}
|
|
66486
66491
|
var x = e.pageX - workbookRect.left;
|
package/dist/index.js
CHANGED
|
@@ -65653,6 +65653,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
65653
65653
|
|
|
65654
65654
|
var defaultSettings = {
|
|
65655
65655
|
fxContainer: undefined,
|
|
65656
|
+
disabledKeyboardCodes: [],
|
|
65656
65657
|
Footer: undefined,
|
|
65657
65658
|
blank: {
|
|
65658
65659
|
width: 16,
|
|
@@ -65676,8 +65677,12 @@ var defaultSettings = {
|
|
|
65676
65677
|
defaultRowHeight: 19,
|
|
65677
65678
|
defaultFontSize: 10,
|
|
65678
65679
|
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
|
-
|
|
65680
|
+
cellContextMenu: function cellContextMenu() {
|
|
65681
|
+
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"];
|
|
65682
|
+
},
|
|
65683
|
+
cellCustomContextMenu: function cellCustomContextMenu() {
|
|
65684
|
+
return [];
|
|
65685
|
+
},
|
|
65681
65686
|
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
65687
|
sheetTabContextMenu: ["delete", "copy", "rename", "color", "hide", "|", "move"],
|
|
65683
65688
|
filterContextMenu: ["sort-by-asc", "sort-by-desc", "|", "filter-by-color", "|", "filter-by-value"],
|
|
@@ -66490,7 +66495,7 @@ function handleContextMenu(ctx, settings, e, workbookContainer, container, area)
|
|
|
66490
66495
|
if (!flowdata) return;
|
|
66491
66496
|
var workbookRect = workbookContainer.getBoundingClientRect();
|
|
66492
66497
|
var cellContextMenu = settings.cellContextMenu;
|
|
66493
|
-
if (___default['default'].isEmpty(cellContextMenu)) {
|
|
66498
|
+
if (cellContextMenu && ___default['default'].isEmpty(cellContextMenu())) {
|
|
66494
66499
|
return;
|
|
66495
66500
|
}
|
|
66496
66501
|
var x = e.pageX - workbookRect.left;
|
package/dist/settings.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export type Hooks = {
|
|
|
59
59
|
};
|
|
60
60
|
export type Settings = {
|
|
61
61
|
fxContainer?: any;
|
|
62
|
+
disabledKeyboardCodes?: string[];
|
|
62
63
|
blank?: {
|
|
63
64
|
width: number;
|
|
64
65
|
height: number;
|
|
@@ -82,9 +83,9 @@ export type Settings = {
|
|
|
82
83
|
defaultRowHeight?: number;
|
|
83
84
|
defaultFontSize?: number;
|
|
84
85
|
toolbarItems?: string[];
|
|
85
|
-
cellContextMenu?: string[];
|
|
86
|
+
cellContextMenu?: () => string[];
|
|
86
87
|
headerContextMenu?: string[];
|
|
87
|
-
cellCustomContextMenu: {
|
|
88
|
+
cellCustomContextMenu: () => {
|
|
88
89
|
key: string;
|
|
89
90
|
element: any;
|
|
90
91
|
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.10",
|
|
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.10",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|