@progress/kendo-angular-spreadsheet 14.2.0-develop.1 → 14.2.0-develop.11
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/common/error-handling.service.d.ts +37 -0
- package/esm2020/common/error-handling.service.mjs +74 -0
- package/esm2020/localization/messages.mjs +35 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/spreadsheet.component.mjs +127 -46
- package/esm2020/tools/align/align-tool.directive.mjs +1 -1
- package/esm2020/tools/align/horizontal-align-tool.directive.mjs +3 -1
- package/esm2020/tools/align/vertical-align-tool.directive.mjs +3 -1
- package/esm2020/tools/load-file.component.mjs +1 -1
- package/esm2020/tools/shared/constants.mjs +11 -11
- package/esm2020/tools/tables/merge-tool.directive.mjs +1 -1
- package/fesm2015/progress-kendo-angular-spreadsheet.mjs +246 -66
- package/fesm2020/progress-kendo-angular-spreadsheet.mjs +244 -66
- package/localization/messages.d.ts +69 -1
- package/package.json +14 -14
- package/schematics/ngAdd/index.js +1 -1
- package/spreadsheet.component.d.ts +4 -1
- package/tools/shared/constants.d.ts +2 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
|
+
import { DialogService } from '@progress/kendo-angular-dialog';
|
|
7
|
+
import { ViewContainerRef } from '@angular/core';
|
|
8
|
+
import { Range, Sheet, SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
9
|
+
import { Subject } from 'rxjs';
|
|
10
|
+
import { SheetsChanges } from './sheet-changes';
|
|
11
|
+
import { SheetInfo } from '../models';
|
|
12
|
+
import { SpreadsheetService } from './spreadsheet.service';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export declare class ErrorHandlingService {
|
|
18
|
+
private spreadsheetService;
|
|
19
|
+
private localization;
|
|
20
|
+
private dialogService;
|
|
21
|
+
spreadsheet: SpreadsheetWidget;
|
|
22
|
+
sheetsChanged: Subject<SheetsChanges>;
|
|
23
|
+
activeSheetChanged: Subject<Sheet>;
|
|
24
|
+
selectionChanged: Subject<Range>;
|
|
25
|
+
dialogContainer: ViewContainerRef;
|
|
26
|
+
constructor(spreadsheetService: SpreadsheetService, localization: LocalizationService, dialogService: DialogService);
|
|
27
|
+
set currentActiveSheet(value: string);
|
|
28
|
+
get currentActiveSheet(): string;
|
|
29
|
+
get activeSheet(): string;
|
|
30
|
+
private _currentActiveSheet;
|
|
31
|
+
notifySheetsChange(actionType: string, sheetInfo?: SheetInfo): void;
|
|
32
|
+
handleErrorMessage(messageData: any): void;
|
|
33
|
+
private openDialog;
|
|
34
|
+
private messageFor;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlingService, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorHandlingService>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
6
|
+
import { DialogService } from '@progress/kendo-angular-dialog';
|
|
7
|
+
import { Injectable } from '@angular/core';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { SpreadsheetService } from './spreadsheet.service';
|
|
10
|
+
import { take } from 'rxjs/operators';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "./spreadsheet.service";
|
|
13
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
14
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
export class ErrorHandlingService {
|
|
19
|
+
constructor(spreadsheetService, localization, dialogService) {
|
|
20
|
+
this.spreadsheetService = spreadsheetService;
|
|
21
|
+
this.localization = localization;
|
|
22
|
+
this.dialogService = dialogService;
|
|
23
|
+
this.sheetsChanged = new Subject();
|
|
24
|
+
this.activeSheetChanged = new Subject();
|
|
25
|
+
this.selectionChanged = new Subject();
|
|
26
|
+
}
|
|
27
|
+
set currentActiveSheet(value) {
|
|
28
|
+
this._currentActiveSheet = value;
|
|
29
|
+
}
|
|
30
|
+
get currentActiveSheet() {
|
|
31
|
+
return this._currentActiveSheet;
|
|
32
|
+
}
|
|
33
|
+
get activeSheet() {
|
|
34
|
+
return this.spreadsheet.activeSheet()?.name();
|
|
35
|
+
}
|
|
36
|
+
notifySheetsChange(actionType, sheetInfo) {
|
|
37
|
+
const sheets = this.spreadsheet.sheets();
|
|
38
|
+
this.sheetsChanged.next({ sheets, sheet: sheetInfo, actionType });
|
|
39
|
+
}
|
|
40
|
+
handleErrorMessage(messageData) {
|
|
41
|
+
this.openDialog(messageData);
|
|
42
|
+
}
|
|
43
|
+
openDialog(messageData) {
|
|
44
|
+
const dialogSettings = {
|
|
45
|
+
appendTo: this.spreadsheetService.dialogContainer,
|
|
46
|
+
title: this.messageFor('dialogError'),
|
|
47
|
+
content: this.messageFor(messageData.name),
|
|
48
|
+
actions: [{
|
|
49
|
+
text: this.messageFor('dialogOk'),
|
|
50
|
+
themeColor: 'primary'
|
|
51
|
+
}],
|
|
52
|
+
width: 400,
|
|
53
|
+
actionsLayout: 'start'
|
|
54
|
+
};
|
|
55
|
+
const dialog = this.dialogService.open(dialogSettings);
|
|
56
|
+
const dialogInstance = dialog.dialog?.instance;
|
|
57
|
+
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
|
58
|
+
if (event.text === this.messageFor('dialogOk')) {
|
|
59
|
+
messageData.close();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
dialogInstance.close.pipe(take(1)).subscribe(() => {
|
|
63
|
+
messageData.close();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
messageFor(text) {
|
|
67
|
+
return this.localization.get(text);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
ErrorHandlingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ErrorHandlingService, deps: [{ token: i1.SpreadsheetService }, { token: i2.LocalizationService }, { token: i3.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
71
|
+
ErrorHandlingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ErrorHandlingService });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ErrorHandlingService, decorators: [{
|
|
73
|
+
type: Injectable
|
|
74
|
+
}], ctorParameters: function () { return [{ type: i1.SpreadsheetService }, { type: i2.LocalizationService }, { type: i3.DialogService }]; } });
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class MessagesDirective extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
MessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
MessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: MessagesDirective, selector: "[kendoSpreadsheetMessages]", inputs: { home: "home", file: "file", insert: "insert", formatTab: "formatTab", saveFile: "saveFile", loadFile: "loadFile", bold: "bold", italic: "italic", underline: "underline", format: "format", fontFamily: "fontFamily", fontSize: "fontSize", undo: "undo", redo: "redo", background: "background", color: "color", gridLines: "gridLines", addColumnLeft: "addColumnLeft", addColumnRight: "addColumnRight", addRowBelow: "addRowBelow", addRowAbove: "addRowAbove", deleteColumn: "deleteColumn", deleteRow: "deleteRow", wrap: "wrap", align: "align", alignHorizontal: "alignHorizontal", alignVertical: "alignVertical", dialogApply: "dialogApply", dialogCancel: "dialogCancel", dialogDelete: "dialogDelete", dialogRename: "dialogRename", dialogInsert: "dialogInsert", dialogRemoveLink: "dialogRemoveLink", delete: "delete", rename: "rename", nameBox: "nameBox", addSheet: "addSheet", sheetsMenu: "sheetsMenu", view: "view", merge: "merge", insertLink: "insertLink", increaseDecimal: "increaseDecimal", decreaseDecimal: "decreaseDecimal", increaseFontSize: "increaseFontSize", decreaseFontSize: "decreaseFontSize" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
MessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: MessagesDirective, selector: "[kendoSpreadsheetMessages]", inputs: { home: "home", file: "file", insert: "insert", formatTab: "formatTab", saveFile: "saveFile", loadFile: "loadFile", bold: "bold", italic: "italic", underline: "underline", format: "format", fontFamily: "fontFamily", fontSize: "fontSize", undo: "undo", redo: "redo", background: "background", color: "color", gridLines: "gridLines", addColumnLeft: "addColumnLeft", addColumnRight: "addColumnRight", addRowBelow: "addRowBelow", addRowAbove: "addRowAbove", deleteColumn: "deleteColumn", deleteRow: "deleteRow", wrap: "wrap", align: "align", alignHorizontal: "alignHorizontal", alignVertical: "alignVertical", alignLeft: "alignLeft", alignCenter: "alignCenter", alignRight: "alignRight", alignJustify: "alignJustify", alignTop: "alignTop", alignMiddle: "alignMiddle", alignBottom: "alignBottom", dialogApply: "dialogApply", dialogCancel: "dialogCancel", dialogDelete: "dialogDelete", dialogRename: "dialogRename", dialogInsert: "dialogInsert", dialogRemoveLink: "dialogRemoveLink", delete: "delete", rename: "rename", nameBox: "nameBox", addSheet: "addSheet", sheetsMenu: "sheetsMenu", view: "view", merge: "merge", mergeHorizontally: "mergeHorizontally", mergeVertically: "mergeVertically", mergeAll: "mergeAll", unmerge: "unmerge", insertLink: "insertLink", increaseDecimal: "increaseDecimal", decreaseDecimal: "decreaseDecimal", increaseFontSize: "increaseFontSize", decreaseFontSize: "decreaseFontSize", openUnsupported: "openUnsupported", modifyMerged: "modifyMerged", cannotModifyDisabled: "cannotModifyDisabled", dialogOk: "dialogOk", dialogError: "dialogError", duplicateSheetName: "duplicateSheetName" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
@@ -71,6 +71,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
71
71
|
type: Input
|
|
72
72
|
}], alignVertical: [{
|
|
73
73
|
type: Input
|
|
74
|
+
}], alignLeft: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], alignCenter: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], alignRight: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], alignJustify: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], alignTop: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], alignMiddle: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], alignBottom: [{
|
|
87
|
+
type: Input
|
|
74
88
|
}], dialogApply: [{
|
|
75
89
|
type: Input
|
|
76
90
|
}], dialogCancel: [{
|
|
@@ -97,6 +111,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
97
111
|
type: Input
|
|
98
112
|
}], merge: [{
|
|
99
113
|
type: Input
|
|
114
|
+
}], mergeHorizontally: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], mergeVertically: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], mergeAll: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], unmerge: [{
|
|
121
|
+
type: Input
|
|
100
122
|
}], insertLink: [{
|
|
101
123
|
type: Input
|
|
102
124
|
}], increaseDecimal: [{
|
|
@@ -107,4 +129,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
107
129
|
type: Input
|
|
108
130
|
}], decreaseFontSize: [{
|
|
109
131
|
type: Input
|
|
132
|
+
}], openUnsupported: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], modifyMerged: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], cannotModifyDisabled: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], dialogOk: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], dialogError: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], duplicateSheetName: [{
|
|
143
|
+
type: Input
|
|
110
144
|
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-spreadsheet',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '14.2.0-develop.
|
|
12
|
+
publishDate: 1701258362,
|
|
13
|
+
version: '14.2.0-develop.11',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
|
15
15
|
};
|
|
@@ -18,60 +18,63 @@ import { PopupService } from '@progress/kendo-angular-popup';
|
|
|
18
18
|
import { FormulaInputDirective } from './action-bar/formula-input.directive';
|
|
19
19
|
import { take } from 'rxjs/operators';
|
|
20
20
|
import { getSheetActions } from './sheets-bar/utils';
|
|
21
|
+
import { ErrorHandlingService } from './common/error-handling.service';
|
|
21
22
|
import * as i0 from "@angular/core";
|
|
22
23
|
import * as i1 from "@progress/kendo-angular-intl";
|
|
23
24
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
24
25
|
import * as i3 from "./common/spreadsheet.service";
|
|
25
26
|
import * as i4 from "./tools/tools.service";
|
|
26
|
-
import * as i5 from "
|
|
27
|
-
import * as i6 from "@progress/kendo-angular-
|
|
28
|
-
import * as i7 from "
|
|
29
|
-
import * as i8 from "./tools/
|
|
30
|
-
import * as i9 from "./tools/font-
|
|
31
|
-
import * as i10 from "./tools/
|
|
32
|
-
import * as i11 from "./tools/colorpicker/spreadsheet-
|
|
33
|
-
import * as i12 from "./
|
|
34
|
-
import * as i13 from "
|
|
35
|
-
import * as i14 from "
|
|
36
|
-
import * as i15 from "
|
|
37
|
-
import * as i16 from "
|
|
38
|
-
import * as i17 from "./
|
|
39
|
-
import * as i18 from "
|
|
40
|
-
import * as i19 from "
|
|
41
|
-
import * as i20 from "./tools/
|
|
42
|
-
import * as i21 from "./tools/history/
|
|
43
|
-
import * as i22 from "./tools/
|
|
44
|
-
import * as i23 from "./tools/font-size/
|
|
45
|
-
import * as i24 from "./tools/
|
|
46
|
-
import * as i25 from "./tools/typographical-emphasis/
|
|
47
|
-
import * as i26 from "./tools/typographical-emphasis/
|
|
48
|
-
import * as i27 from "./tools/
|
|
49
|
-
import * as i28 from "./tools/align/
|
|
50
|
-
import * as i29 from "./tools/
|
|
51
|
-
import * as i30 from "./tools/
|
|
52
|
-
import * as i31 from "./tools/
|
|
53
|
-
import * as i32 from "./tools/
|
|
54
|
-
import * as i33 from "./tools/tables/add-column-
|
|
55
|
-
import * as i34 from "./tools/tables/add-
|
|
56
|
-
import * as i35 from "./tools/tables/add-row-
|
|
57
|
-
import * as i36 from "./tools/tables/
|
|
58
|
-
import * as i37 from "./tools/tables/delete-
|
|
59
|
-
import * as i38 from "./tools/
|
|
60
|
-
import * as i39 from "./tools/
|
|
61
|
-
import * as i40 from "./tools/
|
|
62
|
-
import * as i41 from "./tools/
|
|
63
|
-
import * as i42 from "./
|
|
27
|
+
import * as i5 from "./common/error-handling.service";
|
|
28
|
+
import * as i6 from "@progress/kendo-angular-menu";
|
|
29
|
+
import * as i7 from "@progress/kendo-angular-toolbar";
|
|
30
|
+
import * as i8 from "./tools/load-file.component";
|
|
31
|
+
import * as i9 from "./tools/font-family/spreadsheet-fontfamily-tool.component";
|
|
32
|
+
import * as i10 from "./tools/font-size/spreadsheet-fontsize-tool.component";
|
|
33
|
+
import * as i11 from "./tools/colorpicker/spreadsheet-forecolor.component";
|
|
34
|
+
import * as i12 from "./tools/colorpicker/spreadsheet-backcolor.component";
|
|
35
|
+
import * as i13 from "./action-bar/namebox.component";
|
|
36
|
+
import * as i14 from "@progress/kendo-angular-icons";
|
|
37
|
+
import * as i15 from "./sheets-bar/sheets-bar.component";
|
|
38
|
+
import * as i16 from "@progress/kendo-angular-common";
|
|
39
|
+
import * as i17 from "./localization/localized-messages.directive";
|
|
40
|
+
import * as i18 from "./common/main-menu.directive";
|
|
41
|
+
import * as i19 from "@angular/common";
|
|
42
|
+
import * as i20 from "./tools/save-file-tool.directive";
|
|
43
|
+
import * as i21 from "./tools/history/undo-tool";
|
|
44
|
+
import * as i22 from "./tools/history/redo-tool";
|
|
45
|
+
import * as i23 from "./tools/font-size/increase-font-tool.directive";
|
|
46
|
+
import * as i24 from "./tools/font-size/decrease-font-tool.directive";
|
|
47
|
+
import * as i25 from "./tools/typographical-emphasis/bold-tool.directive";
|
|
48
|
+
import * as i26 from "./tools/typographical-emphasis/italic-tool.directive";
|
|
49
|
+
import * as i27 from "./tools/typographical-emphasis/underline-tool.directive";
|
|
50
|
+
import * as i28 from "./tools/align/horizontal-align-tool.directive";
|
|
51
|
+
import * as i29 from "./tools/align/vertical-align-tool.directive";
|
|
52
|
+
import * as i30 from "./tools/text-wrap-tool.directive";
|
|
53
|
+
import * as i31 from "./tools/format-tool.directive";
|
|
54
|
+
import * as i32 from "./tools/insert/insert-link-tool.directive";
|
|
55
|
+
import * as i33 from "./tools/tables/add-column-left-button.directive";
|
|
56
|
+
import * as i34 from "./tools/tables/add-column-right-button.directive";
|
|
57
|
+
import * as i35 from "./tools/tables/add-row-below-button.directive";
|
|
58
|
+
import * as i36 from "./tools/tables/add-row-above-button.directive";
|
|
59
|
+
import * as i37 from "./tools/tables/delete-column-button.directive";
|
|
60
|
+
import * as i38 from "./tools/tables/delete-row-button.directive";
|
|
61
|
+
import * as i39 from "./tools/decrease-decimal-tool.directive";
|
|
62
|
+
import * as i40 from "./tools/increase-decimal-tool.directive";
|
|
63
|
+
import * as i41 from "./tools/tables/merge-tool.directive";
|
|
64
|
+
import * as i42 from "./tools/gridlines-tool.directive";
|
|
65
|
+
import * as i43 from "./action-bar/formula-input.directive";
|
|
64
66
|
/**
|
|
65
67
|
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
|
66
68
|
*/
|
|
67
69
|
export class SpreadsheetComponent {
|
|
68
|
-
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService) {
|
|
70
|
+
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService) {
|
|
69
71
|
this.ngZone = ngZone;
|
|
70
72
|
this.intl = intl;
|
|
71
73
|
this.host = host;
|
|
72
74
|
this.localization = localization;
|
|
73
75
|
this.spreadsheetService = spreadsheetService;
|
|
74
76
|
this.toolsService = toolsService;
|
|
77
|
+
this.errorService = errorService;
|
|
75
78
|
this.hostClass = true;
|
|
76
79
|
this.role = 'application';
|
|
77
80
|
/**
|
|
@@ -177,6 +180,11 @@ export class SpreadsheetComponent {
|
|
|
177
180
|
this.sheets = mapToSheetDescriptor(this.spreadsheetService.spreadsheet.sheets());
|
|
178
181
|
}
|
|
179
182
|
};
|
|
183
|
+
this.onMessage = (e) => {
|
|
184
|
+
this.ngZone.run(() => {
|
|
185
|
+
this.errorService.handleErrorMessage(e);
|
|
186
|
+
});
|
|
187
|
+
};
|
|
180
188
|
const isValid = validatePackage(packageMetadata);
|
|
181
189
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
182
190
|
ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
@@ -268,6 +276,7 @@ export class SpreadsheetComponent {
|
|
|
268
276
|
spreadsheet.bind('excelImport', this.onExcelImport);
|
|
269
277
|
spreadsheet.bind('excelExport', this.onExcelExport);
|
|
270
278
|
spreadsheet.view.bind('update', this.updateState);
|
|
279
|
+
spreadsheet.view.bind('message', this.onMessage);
|
|
271
280
|
const sheet = spreadsheet.activeSheet();
|
|
272
281
|
if (sheet) {
|
|
273
282
|
this.updateState({ range: sheet.range(sheet.activeCell()) });
|
|
@@ -361,7 +370,7 @@ export class SpreadsheetComponent {
|
|
|
361
370
|
};
|
|
362
371
|
}
|
|
363
372
|
}
|
|
364
|
-
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
373
|
+
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }, { token: i5.ErrorHandlingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
365
374
|
SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetComponent, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", activeSheet: "activeSheet", sheets: "sheets", columns: "columns", columnWidth: "columnWidth", defaultCellStyle: "defaultCellStyle", headerHeight: "headerHeight", headerWidth: "headerWidth", rowHeight: "rowHeight", rows: "rows", images: "images", excel: "excel" }, outputs: { change: "change", formatChange: "formatChange", selectionChange: "selectionChange", excelExport: "excelExport", excelImport: "excelImport", activeSheetChange: "activeSheetChange" }, host: { properties: { "class.k-spreadsheet": "this.hostClass", "attr.role": "this.role" } }, providers: [
|
|
366
375
|
SpreadsheetLocalizationService,
|
|
367
376
|
{
|
|
@@ -373,7 +382,8 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
373
382
|
useValue: 'kendo.spreadsheet'
|
|
374
383
|
},
|
|
375
384
|
SpreadsheetToolsService,
|
|
376
|
-
PopupService
|
|
385
|
+
PopupService,
|
|
386
|
+
ErrorHandlingService
|
|
377
387
|
], viewQueries: [{ propertyName: "formulaBarInputRef", first: true, predicate: ["formulaBar"], descendants: true, read: FormulaInputDirective }, { propertyName: "formulaCellInputRef", first: true, predicate: ["formulaCell"], descendants: true, read: FormulaInputDirective }, { propertyName: "nameBoxRef", first: true, predicate: ["nameBox"], descendants: true }, { propertyName: "dialogContainer", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }], exportAs: ["kendo-spreadsheet"], usesOnChanges: true, ngImport: i0, template: `
|
|
378
388
|
<ng-container
|
|
379
389
|
kendoSpreadsheetLocalizedMessages
|
|
@@ -433,8 +443,30 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
433
443
|
alignHorizontal="Align horizontally"
|
|
434
444
|
i18n-alignVertical="kendo.spreadsheet.alignVertical|The title of the Text Align Vertical tool."
|
|
435
445
|
alignVertical="Align vertically"
|
|
446
|
+
i18n-alignLeft="kendo.spreadsheet.alignLeft|The title of the Text Align Left tool."
|
|
447
|
+
alignLeft="Align Left"
|
|
448
|
+
i18n-alignCenter="kendo.spreadsheet.alignCenter|The title of the Text Align Center tool."
|
|
449
|
+
alignCenter="Align Center"
|
|
450
|
+
i18n-alignRight="kendo.spreadsheet.alignRight|The title of the Text Align Right tool."
|
|
451
|
+
alignRight="Align Right"
|
|
452
|
+
i18n-alignJustify="kendo.spreadsheet.alignJustify|The title of the Text Align Justify tool."
|
|
453
|
+
alignJustify="Align Justify"
|
|
454
|
+
i18n-alignTop="kendo.spreadsheet.alignTop|The title of the Text Align Top tool."
|
|
455
|
+
alignTop="Align Top"
|
|
456
|
+
i18n-alignMiddle="kendo.spreadsheet.alignMiddle|The title of the Text Align Middle tool."
|
|
457
|
+
alignMiddle="Align Middle"
|
|
458
|
+
i18n-alignBottom="kendo.spreadsheet.alignBottom|The title of the Text Align Bottom tool."
|
|
459
|
+
alignBottom="Align Bottom"
|
|
436
460
|
i18n-merge="kendo.spreadsheet.merge|The title of the Cells Merge tool."
|
|
437
461
|
merge="Merge"
|
|
462
|
+
i18n-mergeAll="kendo.spreadsheet.mergeAll|The title of the Merge all tool."
|
|
463
|
+
mergeAll="Merge all"
|
|
464
|
+
i18n-mergeHorizontally="kendo.spreadsheet.mergeHorizontally|The title of the Merge horizontally tool."
|
|
465
|
+
mergeHorizontally="Merge horizontally"
|
|
466
|
+
i18n-mergeVertically="kendo.spreadsheet.mergeVertically|The title of the Merge vertically tool."
|
|
467
|
+
mergeVertically="Merge vertically"
|
|
468
|
+
i18n-unmerge="kendo.spreadsheet.unmerge|The title of the Unmerge tool."
|
|
469
|
+
unmerge="Unmerge"
|
|
438
470
|
i18n-insertLink="kendo.spreadsheet.insertLink|The title of the tool that inserts a link."
|
|
439
471
|
insertLink="Insert link"
|
|
440
472
|
i18n-decreaseDecimal="kendo.spreadsheet.decreaseDecimal|The title of the tool that decreases decimals."
|
|
@@ -466,7 +498,20 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
466
498
|
i18n-addSheet="kendo.spreadsheet.addSheet|The title of the Add new sheet button."
|
|
467
499
|
addSheet="Add New Sheet"
|
|
468
500
|
i18n-sheetsMenu="kendo.spreadsheet.sheetsMenu|The title of the Sheets menu button."
|
|
469
|
-
sheetsMenu="All Sheets"
|
|
501
|
+
sheetsMenu="All Sheets"
|
|
502
|
+
i18n-openUnsupported="kendo.spreadsheet.openUnsupported|The content of the dialog that warns about an unsupported file type."
|
|
503
|
+
openUnsupported="Unsupported format. Please select an .xlsx file."
|
|
504
|
+
i18n-modifyMerged="kendo.spreadsheet.modifyMerged|The content of the dialog that warns about modifying a merged cell."
|
|
505
|
+
modifyMerged="Cannot change part of a merged cell."
|
|
506
|
+
i18n-cannotModifyDisabled="kendo.spreadsheet.cannotModifyDisabled|The content of the dialog that warns about modifying a disabled cell."
|
|
507
|
+
cannotModifyDisabled="Cannot modify disabled cells."
|
|
508
|
+
i18n-dialogOk="kendo.spreadsheet.dialogOk|The text of the **OK** dialog button."
|
|
509
|
+
dialogOk="OK"
|
|
510
|
+
i18n-dialogError="kendo.spreadsheet.dialogError|The title of an error dialog."
|
|
511
|
+
dialogError="Error"
|
|
512
|
+
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
|
513
|
+
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
|
514
|
+
>
|
|
470
515
|
</ng-container>
|
|
471
516
|
<div class="k-spreadsheet-header">
|
|
472
517
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
|
@@ -566,7 +611,7 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
566
611
|
<ng-container #dialogContainer></ng-container>
|
|
567
612
|
|
|
568
613
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
569
|
-
`, isInline: true, components: [{ type:
|
|
614
|
+
`, isInline: true, components: [{ type: i6.MenuComponent, selector: "kendo-menu", inputs: ["menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }, { type: i6.MenuItemComponent, selector: "kendo-menu-item", inputs: ["text", "url", "disabled", "cssClass", "cssStyle", "icon", "svgIcon", "data", "separator"] }, { type: i7.ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "tabindex", "size", "tabIndex"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { type: i8.SpreadsheetLoadFileComponent, selector: "kendo-spreadsheet-load-file-tool" }, { type: i7.ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { type: i7.ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: ["disabled", "selection", "width", "look"], exportAs: ["kendoToolBarButtonGroup"] }, { type: i7.ToolBarSeparatorComponent, selector: "kendo-toolbar-separator", exportAs: ["kendoToolBarSeparator"] }, { type: i9.SpreadsheetFontFamilyComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontFamily]" }, { type: i10.SpreadsheetFontSizeComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontSize]" }, { type: i11.SpreadsheetForeColorComponent, selector: "kendo-spreadsheet-forecolor-tool" }, { type: i12.SpreadsheetBackColorComponent, selector: "kendo-spreadsheet-backcolor-tool" }, { type: i7.ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: ["arrowIcon", "title", "showText", "showIcon", "text", "icon", "svgIcon", "iconClass", "imageUrl", "popupSettings", "look", "primary", "fillMode", "themeColor", "buttonClass", "textField", "disabled", "data"], outputs: ["itemClick", "open", "close"], exportAs: ["kendoToolBarDropDownButton"] }, { type: i13.NameBoxComponent, selector: "[kendoSpreadsheetNameBox]", inputs: ["data", "spreadsheetWidget"] }, { type: i14.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i15.SheetsBarComponent, selector: "[kendoSpreadsheetSheetsBar]", inputs: ["sheets", "sheetDescriptors"] }, { type: i16.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: i17.LocalizedMessagesDirective, selector: "[kendoSpreadsheetLocalizedMessages]" }, { type: i18.MainMenuDirective, selector: "[kendoSpreadsheetMenu]" }, { type: i19.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i19.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i20.SpreadsheetSaveFileDirective, selector: "[kendoSpreadsheetSaveFile]" }, { type: i21.SpreadsheetUndoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUndo]" }, { type: i22.SpreadsheetRedoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetRedo]" }, { type: i23.SpreadsheetIncreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]" }, { type: i24.SpreadsheetDecreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]" }, { type: i25.SpreadsheetBoldDirective, selector: "kendo-toolbar-button[kendoSpreadsheetBold]" }, { type: i26.SpreadsheetItalicDirective, selector: "kendo-toolbar-button[kendoSpreadsheetItalic]" }, { type: i27.SpreadsheetUnderlineDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUnderline]" }, { type: i28.SpreadsheetHorizontalTextAlignDirective, selector: "[kendoSpreadsheetHorizontalTextAlign]" }, { type: i29.SpreadsheetVerticalTextAlignDirective, selector: "[kendoSpreadsheetVerticalTextAlign]" }, { type: i30.SpreadsheetTextWrapDirective, selector: "kendo-toolbar-button[kendoSpreadsheetTextWrap]" }, { type: i31.SpreadsheetFormatDirective, selector: "[kendoSpreadsheetFormat]" }, { type: i32.SpreadsheetInsertLinkDirective, selector: "kendo-toolbar-button[kendoSpreadsheetInsertLink]" }, { type: i33.SpreadsheetAddColumnLeftButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnLeftButton]" }, { type: i34.SpreadsheetAddColumnRightButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnRightButton]" }, { type: i35.SpreadsheetAddRowBelowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowBelowButton]" }, { type: i36.SpreadsheetAddRowAboveButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowAboveButton]" }, { type: i37.SpreadsheetDeleteColumnButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteColumnButton]" }, { type: i38.SpreadsheetDeleteRowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteRowButton]" }, { type: i39.SpreadsheetDecreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]" }, { type: i40.SpreadsheetIncreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]" }, { type: i41.SpreadsheetMergeDirective, selector: "[kendoSpreadsheetMerge]" }, { type: i42.SpreadsheetGridLinesDirective, selector: "kendo-toolbar-button[kendoSpreadsheetGridLines]" }, { type: i43.FormulaInputDirective, selector: "[kendoSpreadsheetFormulaInput]" }] });
|
|
570
615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, decorators: [{
|
|
571
616
|
type: Component,
|
|
572
617
|
args: [{
|
|
@@ -583,7 +628,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
583
628
|
useValue: 'kendo.spreadsheet'
|
|
584
629
|
},
|
|
585
630
|
SpreadsheetToolsService,
|
|
586
|
-
PopupService
|
|
631
|
+
PopupService,
|
|
632
|
+
ErrorHandlingService
|
|
587
633
|
],
|
|
588
634
|
template: `
|
|
589
635
|
<ng-container
|
|
@@ -644,8 +690,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
644
690
|
alignHorizontal="Align horizontally"
|
|
645
691
|
i18n-alignVertical="kendo.spreadsheet.alignVertical|The title of the Text Align Vertical tool."
|
|
646
692
|
alignVertical="Align vertically"
|
|
693
|
+
i18n-alignLeft="kendo.spreadsheet.alignLeft|The title of the Text Align Left tool."
|
|
694
|
+
alignLeft="Align Left"
|
|
695
|
+
i18n-alignCenter="kendo.spreadsheet.alignCenter|The title of the Text Align Center tool."
|
|
696
|
+
alignCenter="Align Center"
|
|
697
|
+
i18n-alignRight="kendo.spreadsheet.alignRight|The title of the Text Align Right tool."
|
|
698
|
+
alignRight="Align Right"
|
|
699
|
+
i18n-alignJustify="kendo.spreadsheet.alignJustify|The title of the Text Align Justify tool."
|
|
700
|
+
alignJustify="Align Justify"
|
|
701
|
+
i18n-alignTop="kendo.spreadsheet.alignTop|The title of the Text Align Top tool."
|
|
702
|
+
alignTop="Align Top"
|
|
703
|
+
i18n-alignMiddle="kendo.spreadsheet.alignMiddle|The title of the Text Align Middle tool."
|
|
704
|
+
alignMiddle="Align Middle"
|
|
705
|
+
i18n-alignBottom="kendo.spreadsheet.alignBottom|The title of the Text Align Bottom tool."
|
|
706
|
+
alignBottom="Align Bottom"
|
|
647
707
|
i18n-merge="kendo.spreadsheet.merge|The title of the Cells Merge tool."
|
|
648
708
|
merge="Merge"
|
|
709
|
+
i18n-mergeAll="kendo.spreadsheet.mergeAll|The title of the Merge all tool."
|
|
710
|
+
mergeAll="Merge all"
|
|
711
|
+
i18n-mergeHorizontally="kendo.spreadsheet.mergeHorizontally|The title of the Merge horizontally tool."
|
|
712
|
+
mergeHorizontally="Merge horizontally"
|
|
713
|
+
i18n-mergeVertically="kendo.spreadsheet.mergeVertically|The title of the Merge vertically tool."
|
|
714
|
+
mergeVertically="Merge vertically"
|
|
715
|
+
i18n-unmerge="kendo.spreadsheet.unmerge|The title of the Unmerge tool."
|
|
716
|
+
unmerge="Unmerge"
|
|
649
717
|
i18n-insertLink="kendo.spreadsheet.insertLink|The title of the tool that inserts a link."
|
|
650
718
|
insertLink="Insert link"
|
|
651
719
|
i18n-decreaseDecimal="kendo.spreadsheet.decreaseDecimal|The title of the tool that decreases decimals."
|
|
@@ -677,7 +745,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
677
745
|
i18n-addSheet="kendo.spreadsheet.addSheet|The title of the Add new sheet button."
|
|
678
746
|
addSheet="Add New Sheet"
|
|
679
747
|
i18n-sheetsMenu="kendo.spreadsheet.sheetsMenu|The title of the Sheets menu button."
|
|
680
|
-
sheetsMenu="All Sheets"
|
|
748
|
+
sheetsMenu="All Sheets"
|
|
749
|
+
i18n-openUnsupported="kendo.spreadsheet.openUnsupported|The content of the dialog that warns about an unsupported file type."
|
|
750
|
+
openUnsupported="Unsupported format. Please select an .xlsx file."
|
|
751
|
+
i18n-modifyMerged="kendo.spreadsheet.modifyMerged|The content of the dialog that warns about modifying a merged cell."
|
|
752
|
+
modifyMerged="Cannot change part of a merged cell."
|
|
753
|
+
i18n-cannotModifyDisabled="kendo.spreadsheet.cannotModifyDisabled|The content of the dialog that warns about modifying a disabled cell."
|
|
754
|
+
cannotModifyDisabled="Cannot modify disabled cells."
|
|
755
|
+
i18n-dialogOk="kendo.spreadsheet.dialogOk|The text of the **OK** dialog button."
|
|
756
|
+
dialogOk="OK"
|
|
757
|
+
i18n-dialogError="kendo.spreadsheet.dialogError|The title of an error dialog."
|
|
758
|
+
dialogError="Error"
|
|
759
|
+
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
|
760
|
+
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
|
761
|
+
>
|
|
681
762
|
</ng-container>
|
|
682
763
|
<div class="k-spreadsheet-header">
|
|
683
764
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
|
@@ -779,7 +860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
779
860
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
780
861
|
`,
|
|
781
862
|
}]
|
|
782
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; }, propDecorators: { formulaBarInputRef: [{
|
|
863
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }, { type: i5.ErrorHandlingService }]; }, propDecorators: { formulaBarInputRef: [{
|
|
783
864
|
type: ViewChild,
|
|
784
865
|
args: ['formulaBar', { read: FormulaInputDirective }]
|
|
785
866
|
}], formulaCellInputRef: [{
|
|
@@ -29,7 +29,7 @@ export class SpreadsheetTextAlignDirective {
|
|
|
29
29
|
host.icon = commandIcons[this.commandName];
|
|
30
30
|
host.arrowIcon = true;
|
|
31
31
|
host.fillMode = 'flat';
|
|
32
|
-
host.data =
|
|
32
|
+
host.data = ALIGNS.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
|
33
33
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
|
34
34
|
host.title = localization.get(this.commandName);
|
|
35
35
|
host.textField = 'textKey';
|
|
@@ -29,7 +29,9 @@ export class SpreadsheetHorizontalTextAlignDirective {
|
|
|
29
29
|
host.icon = commandIcons[this.commandName];
|
|
30
30
|
host.arrowIcon = true;
|
|
31
31
|
host.fillMode = 'flat';
|
|
32
|
-
host.data = ALIGNS
|
|
32
|
+
host.data = ALIGNS
|
|
33
|
+
.filter(value => value.commandName === 'textAlign')
|
|
34
|
+
.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
|
33
35
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
|
34
36
|
host.title = localization.get(this.commandName);
|
|
35
37
|
host.textField = 'textKey';
|
|
@@ -29,7 +29,9 @@ export class SpreadsheetVerticalTextAlignDirective {
|
|
|
29
29
|
host.icon = commandIcons[this.commandName];
|
|
30
30
|
host.arrowIcon = true;
|
|
31
31
|
host.fillMode = 'flat';
|
|
32
|
-
host.data = ALIGNS
|
|
32
|
+
host.data = ALIGNS
|
|
33
|
+
.filter(value => value.commandName === 'verticalAlign')
|
|
34
|
+
.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
|
33
35
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
|
34
36
|
host.title = localization.get(this.commandName);
|
|
35
37
|
host.textField = 'textKey';
|
|
@@ -29,7 +29,7 @@ export class SpreadsheetLoadFileComponent extends ToolBarToolComponent {
|
|
|
29
29
|
this.onFileSelect = (e) => {
|
|
30
30
|
const file = e.target.files[0];
|
|
31
31
|
if (file) {
|
|
32
|
-
this.spreadsheetService.spreadsheet.
|
|
32
|
+
this.spreadsheetService.spreadsheet.executeCommand({ command: 'OpenCommand', options: { file } });
|
|
33
33
|
e.target.value = null;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
@@ -47,22 +47,22 @@ export const FORMATS = [
|
|
|
47
47
|
* @hidden
|
|
48
48
|
*/
|
|
49
49
|
export const ALIGNS = [
|
|
50
|
-
{ icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '' },
|
|
51
|
-
{ icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '' },
|
|
52
|
-
{ icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '' },
|
|
53
|
-
{ icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '' },
|
|
54
|
-
{ icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '' },
|
|
55
|
-
{ icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '' },
|
|
56
|
-
{ icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '' }
|
|
50
|
+
{ icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '', commandId: 'alignLeft' },
|
|
51
|
+
{ icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '', commandId: 'alignCenter' },
|
|
52
|
+
{ icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '', commandId: 'alignRight' },
|
|
53
|
+
{ icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '', commandId: 'alignJustify' },
|
|
54
|
+
{ icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '', commandId: 'alignTop' },
|
|
55
|
+
{ icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '', commandId: 'alignMiddle' },
|
|
56
|
+
{ icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '', commandId: 'alignBottom' }
|
|
57
57
|
];
|
|
58
58
|
/**
|
|
59
59
|
* @hidden
|
|
60
60
|
*/
|
|
61
61
|
export const MERGE = [
|
|
62
|
-
{ icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false },
|
|
63
|
-
{ icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false },
|
|
64
|
-
{ icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false },
|
|
65
|
-
{ icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false }
|
|
62
|
+
{ icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false, commandId: 'mergeAll' },
|
|
63
|
+
{ icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false, commandId: 'mergeHorizontally' },
|
|
64
|
+
{ icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false, commandId: 'mergeVertically' },
|
|
65
|
+
{ icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false, commandId: 'unmerge' }
|
|
66
66
|
];
|
|
67
67
|
/**
|
|
68
68
|
* @hidden
|
|
@@ -26,7 +26,7 @@ export class SpreadsheetMergeDirective {
|
|
|
26
26
|
host.icon = commandIcons[this.commandName];
|
|
27
27
|
host.arrowIcon = true;
|
|
28
28
|
host.fillMode = 'flat';
|
|
29
|
-
host.data =
|
|
29
|
+
host.data = MERGE.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
|
30
30
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
|
31
31
|
host.title = localization.get(this.commandName);
|
|
32
32
|
host.textField = 'textKey';
|