@progress/kendo-angular-spreadsheet 17.0.0-develop.4 → 17.0.0-develop.41
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/README.md +30 -19
- package/action-bar/formula-input.directive.d.ts +1 -1
- package/action-bar/list.component.d.ts +5 -4
- package/action-bar/namebox.component.d.ts +1 -1
- package/{esm2020 → esm2022}/action-bar/formula-input.directive.mjs +63 -54
- package/{esm2020 → esm2022}/action-bar/list.component.mjs +21 -16
- package/{esm2020 → esm2022}/action-bar/namebox.component.mjs +20 -12
- package/{esm2020 → esm2022}/common/error-handling.service.mjs +12 -6
- package/{esm2020 → esm2022}/common/main-menu.directive.mjs +5 -3
- package/{esm2020 → esm2022}/common/spreadsheet.service.mjs +10 -7
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +7 -6
- package/esm2022/localization/messages.mjs +494 -0
- package/{esm2020 → esm2022}/localization/spreadsheet-localization.service.mjs +3 -3
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/sheets-bar/action-dialog.component.mjs +8 -4
- package/{esm2020 → esm2022}/sheets-bar/sheets-bar.component.mjs +138 -116
- package/{esm2020 → esm2022}/spreadsheet.component.mjs +236 -194
- package/{esm2020 → esm2022}/spreadsheet.module.mjs +4 -4
- package/{esm2020 → esm2022}/tools/align/align-tool.directive.mjs +8 -5
- package/{esm2020 → esm2022}/tools/align/horizontal-align-tool.directive.mjs +8 -5
- package/{esm2020 → esm2022}/tools/align/vertical-align-tool.directive.mjs +8 -5
- package/{esm2020 → esm2022}/tools/colorpicker/spreadsheet-backcolor.component.mjs +32 -28
- package/{esm2020 → esm2022}/tools/colorpicker/spreadsheet-forecolor.component.mjs +32 -28
- package/{esm2020 → esm2022}/tools/decrease-decimal-tool.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/font-family/font-family-dropdownlist.component.mjs +6 -4
- package/{esm2020 → esm2022}/tools/font-family/spreadsheet-fontfamily-tool.component.mjs +4 -4
- package/{esm2020 → esm2022}/tools/font-size/decrease-font-tool.directive.mjs +4 -3
- package/{esm2020 → esm2022}/tools/font-size/font-size-dropdownlist.component.mjs +6 -4
- package/{esm2020 → esm2022}/tools/font-size/increase-font-tool.directive.mjs +4 -3
- package/{esm2020 → esm2022}/tools/font-size/spreadsheet-fontsize-tool.component.mjs +4 -4
- package/{esm2020 → esm2022}/tools/format-tool.directive.mjs +19 -16
- package/{esm2020 → esm2022}/tools/gridlines-tool.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/history/redo-tool.mjs +3 -3
- package/{esm2020 → esm2022}/tools/history/undo-tool.mjs +3 -3
- package/{esm2020 → esm2022}/tools/increase-decimal-tool.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/insert/insert-link-dialog.component.mjs +7 -5
- package/{esm2020 → esm2022}/tools/insert/insert-link-tool.directive.mjs +5 -3
- package/{esm2020 → esm2022}/tools/load-file.component.mjs +27 -28
- package/{esm2020 → esm2022}/tools/save-file-tool.directive.mjs +7 -4
- package/{esm2020 → esm2022}/tools/shared/dialog-content.component.mjs +10 -5
- package/{esm2020 → esm2022}/tools/shared/spreadsheet-command-base.mjs +9 -4
- package/{esm2020 → esm2022}/tools/shared/spreadsheet-command-button.mjs +6 -0
- package/{esm2020 → esm2022}/tools/shared/spreadsheet-dropdown-tools-base.mjs +25 -18
- package/{esm2020 → esm2022}/tools/shared/spreadsheet-dropdownlist.base.mjs +12 -8
- package/{esm2020 → esm2022}/tools/tables/add-column-left-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/add-column-right-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/add-row-above-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/add-row-below-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/delete-column-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/delete-row-button.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/tables/merge-tool.directive.mjs +8 -5
- package/{esm2020 → esm2022}/tools/text-wrap-tool.directive.mjs +3 -3
- package/esm2022/tools/tools.service.mjs +61 -0
- package/{esm2020 → esm2022}/tools/typographical-emphasis/bold-tool.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/typographical-emphasis/italic-tool.directive.mjs +3 -3
- package/{esm2020 → esm2022}/tools/typographical-emphasis/underline-tool.directive.mjs +3 -3
- package/{fesm2020 → fesm2022}/progress-kendo-angular-spreadsheet.mjs +1194 -709
- package/localization/messages.d.ts +1 -1
- package/models/sheet-info.d.ts +2 -2
- package/package.json +26 -32
- package/schematics/ngAdd/index.js +2 -2
- package/sheets-bar/sheets-bar.component.d.ts +1 -1
- package/spreadsheet.component.d.ts +1 -1
- package/tools/load-file.component.d.ts +0 -3
- package/tools/shared/commands.d.ts +1 -1
- package/tools/shared/spreadsheet-dropdown-tools-base.d.ts +1 -3
- package/tools/shared/spreadsheet-dropdownlist.base.d.ts +1 -1
- package/esm2020/localization/messages.mjs +0 -175
- package/esm2020/tools/tools.service.mjs +0 -60
- package/fesm2015/progress-kendo-angular-spreadsheet.mjs +0 -4580
- /package/{esm2020 → esm2022}/common/sheet-changes.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/events.mjs +0 -0
- /package/{esm2020 → esm2022}/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/main-menu-item.mjs +0 -0
- /package/{esm2020 → esm2022}/models/sheet-info.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-spreadsheet.mjs +0 -0
- /package/{esm2020 → esm2022}/sheets-bar/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/index.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/shared/command-icons.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/shared/commands.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/shared/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/tables/index.mjs +0 -0
- /package/{esm2020 → esm2022}/tools/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
@@ -1,4580 +0,0 @@
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
5
|
-
import * as i0 from '@angular/core';
|
6
|
-
import { Injectable, EventEmitter, Output, Inject, Optional, Component, HostBinding, Input, Directive, ElementRef, ViewChild, ViewChildren, HostListener, InjectionToken, forwardRef, ViewContainerRef, NgModule } from '@angular/core';
|
7
|
-
import { NgFor, NgIf, NgStyle, NgSwitch, NgSwitchCase } from '@angular/common';
|
8
|
-
import { Subject, Subscription } from 'rxjs';
|
9
|
-
import { take, map } from 'rxjs/operators';
|
10
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
11
|
-
import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
12
|
-
import * as i1$3 from '@progress/kendo-angular-intl';
|
13
|
-
import { localeData } from '@progress/kendo-angular-intl';
|
14
|
-
import { formulaFxIcon, trashIcon, copyIcon, pencilIcon, eyeSlashIcon, arrowRightIcon, arrowLeftIcon, alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, dropletIcon, boldIcon, foregroundColorIcon, italicIcon, arrowRotateCwIcon, underlineIcon, arrowRotateCcwIcon, textWrapIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, tableRowDeleteIcon, tableColumnDeleteIcon, bordersNoneIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeIcon, cellsMergeHorizontallyIcon, cellsMergeVerticallyIcon, tableUnmergeIcon, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, decimalIncreaseIcon, cutIcon, clipboardIcon, eyeIcon, plusIcon, menuIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
|
15
|
-
import * as i2 from '@progress/kendo-angular-l10n';
|
16
|
-
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
17
|
-
import * as i1 from '@progress/kendo-angular-popup';
|
18
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
19
|
-
import { MenuComponent, MenuItemComponent, ContextMenuComponent } from '@progress/kendo-angular-menu';
|
20
|
-
import { EventsOutsideAngularDirective, isDocumentAvailable, isPresent, Keys, hasObservers, shouldShowValidationUI, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
21
|
-
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
22
|
-
import * as i1$2 from '@progress/kendo-angular-toolbar';
|
23
|
-
import { ToolBarToolComponent, ToolBarComponent, ToolBarButtonComponent, ToolBarButtonGroupComponent, ToolBarSeparatorComponent, ToolBarDropDownButtonComponent } from '@progress/kendo-angular-toolbar';
|
24
|
-
import * as i1$1 from '@progress/kendo-angular-dialog';
|
25
|
-
import { DialogContentBase, DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
|
26
|
-
import { TextBoxComponent, ColorPickerComponent } from '@progress/kendo-angular-inputs';
|
27
|
-
import { LabelComponent } from '@progress/kendo-angular-label';
|
28
|
-
import { ButtonComponent, DropDownButtonComponent } from '@progress/kendo-angular-buttons';
|
29
|
-
import { TabStripComponent, TabStripTabComponent, TabTemplateDirective } from '@progress/kendo-angular-layout';
|
30
|
-
import { ComboBoxComponent, DropDownListComponent, ItemTemplateDirective } from '@progress/kendo-angular-dropdowns';
|
31
|
-
import { saveAs } from '@progress/kendo-file-saver';
|
32
|
-
import { Workbook } from '@progress/kendo-ooxml';
|
33
|
-
|
34
|
-
/**
|
35
|
-
* @hidden
|
36
|
-
*/
|
37
|
-
const packageMetadata = {
|
38
|
-
name: '@progress/kendo-angular-spreadsheet',
|
39
|
-
productName: 'Kendo UI for Angular',
|
40
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
41
|
-
publishDate: 1728985215,
|
42
|
-
version: '17.0.0-develop.4',
|
43
|
-
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',
|
44
|
-
};
|
45
|
-
|
46
|
-
let spreadsheetCounter = 0;
|
47
|
-
/**
|
48
|
-
* @hidden
|
49
|
-
*/
|
50
|
-
class SpreadsheetService {
|
51
|
-
constructor() {
|
52
|
-
this.sheetsChanged = new Subject();
|
53
|
-
this.onSheetsBarFocus = new Subject();
|
54
|
-
this.activeSheetChanged = new Subject();
|
55
|
-
this.selectionChanged = new Subject();
|
56
|
-
spreadsheetCounter++;
|
57
|
-
}
|
58
|
-
set currentActiveSheet(value) {
|
59
|
-
this._currentActiveSheet = value;
|
60
|
-
}
|
61
|
-
get currentActiveSheet() {
|
62
|
-
return this._currentActiveSheet;
|
63
|
-
}
|
64
|
-
get activeSheet() {
|
65
|
-
var _a;
|
66
|
-
return (_a = this.spreadsheet.activeSheet()) === null || _a === void 0 ? void 0 : _a.name();
|
67
|
-
}
|
68
|
-
get formulaListId() {
|
69
|
-
return `k-spreadsheet-${spreadsheetCounter}-formula-list`;
|
70
|
-
}
|
71
|
-
get tablistId() {
|
72
|
-
return `k-spreadsheet-${spreadsheetCounter}-tablist`;
|
73
|
-
}
|
74
|
-
notifySheetsChange(actionType, sheetInfo) {
|
75
|
-
const sheets = this.spreadsheet.sheets();
|
76
|
-
this.sheetsChanged.next({ sheets, sheet: sheetInfo, actionType });
|
77
|
-
}
|
78
|
-
}
|
79
|
-
SpreadsheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
80
|
-
SpreadsheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetService });
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetService, decorators: [{
|
82
|
-
type: Injectable
|
83
|
-
}], ctorParameters: function () { return []; } });
|
84
|
-
|
85
|
-
/**
|
86
|
-
* @hidden
|
87
|
-
*/
|
88
|
-
class SpreadsheetToolsService {
|
89
|
-
constructor(ngZone) {
|
90
|
-
this.ngZone = ngZone;
|
91
|
-
this.stateChange = new EventEmitter();
|
92
|
-
this.toolsFunctions = [
|
93
|
-
'bold',
|
94
|
-
'italic',
|
95
|
-
'underline',
|
96
|
-
'fontFamily',
|
97
|
-
'fontSize',
|
98
|
-
'color',
|
99
|
-
'background',
|
100
|
-
'textAlign',
|
101
|
-
'verticalAlign',
|
102
|
-
'wrap',
|
103
|
-
'gridLines',
|
104
|
-
'format'
|
105
|
-
];
|
106
|
-
this._toolsState = {};
|
107
|
-
this.updateTools = (e) => {
|
108
|
-
this.ngZone.run(() => {
|
109
|
-
const state = {};
|
110
|
-
this.toolsFunctions.forEach(tool => {
|
111
|
-
if (typeof e.range[tool] === 'function') {
|
112
|
-
state[tool] = e.range[tool]();
|
113
|
-
}
|
114
|
-
else if (tool === 'gridLines') {
|
115
|
-
state[tool] = e.range.sheet().showGridLines();
|
116
|
-
}
|
117
|
-
});
|
118
|
-
if (this.toolsFunctions.some(k => state[k] !== this.toolsState[k])) {
|
119
|
-
this.toolsState = state;
|
120
|
-
this.stateChange.emit(state);
|
121
|
-
}
|
122
|
-
});
|
123
|
-
};
|
124
|
-
}
|
125
|
-
set toolsState(state) {
|
126
|
-
this._toolsState = state;
|
127
|
-
}
|
128
|
-
get toolsState() {
|
129
|
-
return this._toolsState;
|
130
|
-
}
|
131
|
-
}
|
132
|
-
SpreadsheetToolsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetToolsService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
133
|
-
SpreadsheetToolsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetToolsService });
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetToolsService, decorators: [{
|
135
|
-
type: Injectable
|
136
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { stateChange: [{
|
137
|
-
type: Output
|
138
|
-
}] } });
|
139
|
-
|
140
|
-
/**
|
141
|
-
* @hidden
|
142
|
-
*/
|
143
|
-
class SpreadsheetLocalizationService extends LocalizationService {
|
144
|
-
constructor(prefix, messageService, _rtl) {
|
145
|
-
super(prefix, messageService, _rtl);
|
146
|
-
}
|
147
|
-
}
|
148
|
-
SpreadsheetLocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetLocalizationService, deps: [{ token: L10N_PREFIX }, { token: i2.MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
149
|
-
SpreadsheetLocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetLocalizationService });
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetLocalizationService, decorators: [{
|
151
|
-
type: Injectable
|
152
|
-
}], ctorParameters: function () {
|
153
|
-
return [{ type: undefined, decorators: [{
|
154
|
-
type: Inject,
|
155
|
-
args: [L10N_PREFIX]
|
156
|
-
}] }, { type: i2.MessageService, decorators: [{
|
157
|
-
type: Optional
|
158
|
-
}] }, { type: undefined, decorators: [{
|
159
|
-
type: Optional
|
160
|
-
}, {
|
161
|
-
type: Inject,
|
162
|
-
args: [RTL]
|
163
|
-
}] }];
|
164
|
-
} });
|
165
|
-
|
166
|
-
/**
|
167
|
-
* @hidden
|
168
|
-
*/
|
169
|
-
const mapToSheetDescriptor = (sheetsArray) => {
|
170
|
-
return sheetsArray.map((sheet) => {
|
171
|
-
return {
|
172
|
-
activeCell: sheet.activeCell(),
|
173
|
-
columns: sheet._columns,
|
174
|
-
defaultCellStyle: sheet._defaultCellStyle,
|
175
|
-
drawings: sheet._drawings,
|
176
|
-
frozenColumns: sheet.frozenColumns,
|
177
|
-
frozenRows: sheet.frozenRows,
|
178
|
-
hyperlinks: sheet._hyperlinks,
|
179
|
-
mergedCells: sheet.mergedCells,
|
180
|
-
name: sheet.name(),
|
181
|
-
rows: sheet._rows,
|
182
|
-
selection: sheet.selection(),
|
183
|
-
showGridLines: sheet.showGridLines,
|
184
|
-
state: sheet.state()
|
185
|
-
};
|
186
|
-
});
|
187
|
-
};
|
188
|
-
/**
|
189
|
-
* @hidden
|
190
|
-
*/
|
191
|
-
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
192
|
-
|
193
|
-
/**
|
194
|
-
* @hidden
|
195
|
-
*/
|
196
|
-
class FormulaListComponent {
|
197
|
-
constructor(element, spreadsheetService) {
|
198
|
-
this.element = element;
|
199
|
-
this.spreadsheetService = spreadsheetService;
|
200
|
-
this.id = this.spreadsheetService.formulaListId;
|
201
|
-
this.data = [];
|
202
|
-
this.formulaFxIcon = formulaFxIcon;
|
203
|
-
this.handleMouseDown = (ev) => {
|
204
|
-
ev.preventDefault();
|
205
|
-
};
|
206
|
-
}
|
207
|
-
}
|
208
|
-
FormulaListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormulaListComponent, deps: [{ token: i0.ElementRef }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Component });
|
209
|
-
FormulaListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FormulaListComponent, isStandalone: true, selector: "kendo-spreadsheet-formula-list", inputs: { maxHeight: "maxHeight", data: "data", itemClick: "itemClick" }, host: { properties: { "attr.id": "this.id" } }, ngImport: i0, template: `
|
210
|
-
<ul #ulRef
|
211
|
-
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
212
|
-
role="menu"
|
213
|
-
[style.overflowY]="'auto'"
|
214
|
-
[style.maxHeight]="maxHeight"
|
215
|
-
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
216
|
-
<li *ngFor="let item of data"
|
217
|
-
(click)="itemClick(item.text)"
|
218
|
-
class="k-list-item"
|
219
|
-
role="menuitem">
|
220
|
-
<kendo-icon-wrapper
|
221
|
-
[svgIcon]="formulaFxIcon"
|
222
|
-
name="formula-fx"
|
223
|
-
></kendo-icon-wrapper>
|
224
|
-
<span className="k-list-item-text">{{item.text}}</span>
|
225
|
-
</li>
|
226
|
-
</ul>
|
227
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormulaListComponent, decorators: [{
|
229
|
-
type: Component,
|
230
|
-
args: [{
|
231
|
-
selector: 'kendo-spreadsheet-formula-list',
|
232
|
-
template: `
|
233
|
-
<ul #ulRef
|
234
|
-
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
235
|
-
role="menu"
|
236
|
-
[style.overflowY]="'auto'"
|
237
|
-
[style.maxHeight]="maxHeight"
|
238
|
-
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
239
|
-
<li *ngFor="let item of data"
|
240
|
-
(click)="itemClick(item.text)"
|
241
|
-
class="k-list-item"
|
242
|
-
role="menuitem">
|
243
|
-
<kendo-icon-wrapper
|
244
|
-
[svgIcon]="formulaFxIcon"
|
245
|
-
name="formula-fx"
|
246
|
-
></kendo-icon-wrapper>
|
247
|
-
<span className="k-list-item-text">{{item.text}}</span>
|
248
|
-
</li>
|
249
|
-
</ul>
|
250
|
-
`,
|
251
|
-
standalone: true,
|
252
|
-
imports: [EventsOutsideAngularDirective, NgFor, IconWrapperComponent]
|
253
|
-
}]
|
254
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SpreadsheetService }]; }, propDecorators: { id: [{
|
255
|
-
type: HostBinding,
|
256
|
-
args: ['attr.id']
|
257
|
-
}], maxHeight: [{
|
258
|
-
type: Input
|
259
|
-
}], data: [{
|
260
|
-
type: Input
|
261
|
-
}], itemClick: [{
|
262
|
-
type: Input
|
263
|
-
}] } });
|
264
|
-
|
265
|
-
/**
|
266
|
-
* @hidden
|
267
|
-
*/
|
268
|
-
class FormulaInputDirective {
|
269
|
-
constructor(element, popupService, spreadsheetService, localization) {
|
270
|
-
this.element = element;
|
271
|
-
this.popupService = popupService;
|
272
|
-
this.spreadsheetService = spreadsheetService;
|
273
|
-
this.localization = localization;
|
274
|
-
this.hostClasses = true;
|
275
|
-
this.role = 'combobox';
|
276
|
-
this.ariaHasPopup = 'menu';
|
277
|
-
this.ariaExpanded = 'false';
|
278
|
-
this.focusedItem = () => { var _a; return (_a = this.list) === null || _a === void 0 ? void 0 : _a.element.nativeElement.querySelector('.k-focus'); };
|
279
|
-
this.unfocus = () => {
|
280
|
-
const focused = this.focusedItem();
|
281
|
-
if (focused) {
|
282
|
-
focused.classList.remove('k-focus');
|
283
|
-
}
|
284
|
-
};
|
285
|
-
this.focusNext = (dir) => {
|
286
|
-
var _a;
|
287
|
-
const element = (_a = this.list) === null || _a === void 0 ? void 0 : _a.element.nativeElement.firstElementChild;
|
288
|
-
const items = Array.from((element && element.children) || []);
|
289
|
-
const focused = this.focusedItem();
|
290
|
-
let next;
|
291
|
-
if (focused) {
|
292
|
-
const index = items.indexOf(focused);
|
293
|
-
focused.classList.remove('k-focus');
|
294
|
-
next = items[index + dir] ? items[index + dir] : (dir === 1 ? items[0] : items[items.length - 1]);
|
295
|
-
}
|
296
|
-
else {
|
297
|
-
next = (dir === 1 ? items[0] : items[items.length - 1]);
|
298
|
-
}
|
299
|
-
if (next) {
|
300
|
-
next.classList.add('k-focus');
|
301
|
-
const { offsetTop, offsetHeight, parentElement } = next;
|
302
|
-
if (dir > 0) {
|
303
|
-
if (offsetTop + offsetHeight >= parentElement.offsetHeight + parentElement.scrollTop) {
|
304
|
-
parentElement.scrollTop = Math.min(parentElement.scrollTop + offsetHeight, parentElement.scrollHeight - parentElement.offsetHeight);
|
305
|
-
}
|
306
|
-
if (next === items[0]) {
|
307
|
-
next.scrollIntoView();
|
308
|
-
}
|
309
|
-
}
|
310
|
-
else {
|
311
|
-
if (offsetTop <= parentElement.scrollTop) {
|
312
|
-
parentElement.scrollTop = Math.max(parentElement.scrollTop - offsetHeight, 0);
|
313
|
-
}
|
314
|
-
if (next === items[items.length - 1]) {
|
315
|
-
next.scrollIntoView();
|
316
|
-
}
|
317
|
-
}
|
318
|
-
}
|
319
|
-
};
|
320
|
-
}
|
321
|
-
get title() {
|
322
|
-
return this.localization.get('formulaInput');
|
323
|
-
}
|
324
|
-
get ariaControls() {
|
325
|
-
return this.ariaExpanded === 'true' ? this.spreadsheetService.formulaListId : null;
|
326
|
-
}
|
327
|
-
get listElement() {
|
328
|
-
var _a;
|
329
|
-
return (_a = this.list) === null || _a === void 0 ? void 0 : _a.element.nativeElement.firstElementChild;
|
330
|
-
}
|
331
|
-
get current() {
|
332
|
-
var _a;
|
333
|
-
return {
|
334
|
-
element: this.element.nativeElement,
|
335
|
-
list: {
|
336
|
-
element: (_a = this.list) === null || _a === void 0 ? void 0 : _a.element.nativeElement,
|
337
|
-
data: (d) => {
|
338
|
-
if (d) {
|
339
|
-
this.data = d;
|
340
|
-
this.list && (this.list.data = d);
|
341
|
-
}
|
342
|
-
else {
|
343
|
-
return this.data;
|
344
|
-
}
|
345
|
-
},
|
346
|
-
itemClick: (handler) => {
|
347
|
-
this.handler = handler;
|
348
|
-
},
|
349
|
-
value: () => { return {}; },
|
350
|
-
focus: () => {
|
351
|
-
var _a;
|
352
|
-
const items = Array.from(((_a = this.listElement) === null || _a === void 0 ? void 0 : _a.children) || []);
|
353
|
-
return items.indexOf(this.focusedItem());
|
354
|
-
},
|
355
|
-
focusNext: () => this.focusNext(1),
|
356
|
-
focusPrev: () => this.focusNext(-1),
|
357
|
-
focusFirst: () => {
|
358
|
-
const list = this.listElement;
|
359
|
-
if (list && list.children.item(0)) {
|
360
|
-
this.unfocus();
|
361
|
-
list.children.item(0).classList.add('k-focus');
|
362
|
-
}
|
363
|
-
},
|
364
|
-
focusLast: () => {
|
365
|
-
const list = this.listElement;
|
366
|
-
if (list && list.children.length) {
|
367
|
-
this.unfocus();
|
368
|
-
list.children.item(list.children.length - 1).classList.add('k-focus');
|
369
|
-
}
|
370
|
-
},
|
371
|
-
},
|
372
|
-
popup: {
|
373
|
-
open: () => {
|
374
|
-
this.popupRef && this.popupRef.close();
|
375
|
-
this.popupRef = null;
|
376
|
-
this.popupRef = this.popupService.open({
|
377
|
-
anchor: this.element,
|
378
|
-
content: FormulaListComponent,
|
379
|
-
animate: { direction: 'down', duration: 100 }
|
380
|
-
});
|
381
|
-
const list = this.popupRef.content.instance;
|
382
|
-
this.list = list;
|
383
|
-
list.data = this.data;
|
384
|
-
list.itemClick = this.handler;
|
385
|
-
list.maxHeight = this.formulaListMaxHeight;
|
386
|
-
this.ariaExpanded = 'true';
|
387
|
-
},
|
388
|
-
close: () => {
|
389
|
-
this.popupRef && this.popupRef.close();
|
390
|
-
this.popupRef = null;
|
391
|
-
this.ariaExpanded = 'false';
|
392
|
-
},
|
393
|
-
position: () => {
|
394
|
-
// contentKey++;
|
395
|
-
},
|
396
|
-
visible: () => {
|
397
|
-
return this.popupRef;
|
398
|
-
}
|
399
|
-
}
|
400
|
-
};
|
401
|
-
}
|
402
|
-
}
|
403
|
-
FormulaInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormulaInputDirective, deps: [{ token: i0.ElementRef }, { token: i1.PopupService }, { token: SpreadsheetService }, { token: SpreadsheetLocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
404
|
-
FormulaInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FormulaInputDirective, isStandalone: true, selector: "[kendoSpreadsheetFormulaInput]", inputs: { formulaListMaxHeight: "formulaListMaxHeight" }, host: { properties: { "class.k-spreadsheet-formula-input": "this.hostClasses", "attr.title": "this.title", "attr.role": "this.role", "attr.aria-haspopup": "this.ariaHasPopup", "attr.aria-expanded": "this.ariaExpanded", "attr.aria-controls": "this.ariaControls" } }, ngImport: i0 });
|
405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormulaInputDirective, decorators: [{
|
406
|
-
type: Directive,
|
407
|
-
args: [{
|
408
|
-
selector: '[kendoSpreadsheetFormulaInput]',
|
409
|
-
standalone: true
|
410
|
-
}]
|
411
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PopupService }, { type: SpreadsheetService }, { type: SpreadsheetLocalizationService }]; }, propDecorators: { hostClasses: [{
|
412
|
-
type: HostBinding,
|
413
|
-
args: ['class.k-spreadsheet-formula-input']
|
414
|
-
}], title: [{
|
415
|
-
type: HostBinding,
|
416
|
-
args: ['attr.title']
|
417
|
-
}], role: [{
|
418
|
-
type: HostBinding,
|
419
|
-
args: ['attr.role']
|
420
|
-
}], ariaHasPopup: [{
|
421
|
-
type: HostBinding,
|
422
|
-
args: ['attr.aria-haspopup']
|
423
|
-
}], ariaExpanded: [{
|
424
|
-
type: HostBinding,
|
425
|
-
args: ['attr.aria-expanded']
|
426
|
-
}], ariaControls: [{
|
427
|
-
type: HostBinding,
|
428
|
-
args: ['attr.aria-controls']
|
429
|
-
}], formulaListMaxHeight: [{
|
430
|
-
type: Input
|
431
|
-
}] } });
|
432
|
-
|
433
|
-
/**
|
434
|
-
* @hidden
|
435
|
-
*/
|
436
|
-
const getSheetActions = (items, item) => {
|
437
|
-
const visibleItems = items.filter(item => item.state === 'visible');
|
438
|
-
const itemIndex = item ? visibleItems.findIndex(i => i === item) : 0;
|
439
|
-
return [{
|
440
|
-
messageKey: 'sheetDelete',
|
441
|
-
icon: 'trash',
|
442
|
-
svgIcon: trashIcon,
|
443
|
-
commandName: 'delete',
|
444
|
-
dialogButton: 'dialogDelete',
|
445
|
-
disabled: visibleItems.length === 1
|
446
|
-
}, {
|
447
|
-
messageKey: 'sheetDuplicate',
|
448
|
-
icon: 'copy',
|
449
|
-
svgIcon: copyIcon,
|
450
|
-
commandName: 'copy'
|
451
|
-
}, {
|
452
|
-
messageKey: 'sheetRename',
|
453
|
-
icon: 'pencil',
|
454
|
-
svgIcon: pencilIcon,
|
455
|
-
commandName: 'rename',
|
456
|
-
dialogButton: 'dialogRename'
|
457
|
-
}, {
|
458
|
-
messageKey: 'sheetHide',
|
459
|
-
icon: 'eye-slash',
|
460
|
-
svgIcon: eyeSlashIcon,
|
461
|
-
commandName: 'hide',
|
462
|
-
disabled: visibleItems.length === 1
|
463
|
-
}, {
|
464
|
-
messageKey: 'sheetMoveRight',
|
465
|
-
icon: 'arrow-right',
|
466
|
-
svgIcon: arrowRightIcon,
|
467
|
-
commandName: 'move',
|
468
|
-
disabled: visibleItems.length === 1 || itemIndex === visibleItems.length - 1
|
469
|
-
}, {
|
470
|
-
messageKey: 'sheetMoveLeft',
|
471
|
-
icon: 'arrow-left',
|
472
|
-
svgIcon: arrowLeftIcon,
|
473
|
-
commandName: 'move',
|
474
|
-
disabled: visibleItems.length === 1 || itemIndex === 0
|
475
|
-
}];
|
476
|
-
};
|
477
|
-
|
478
|
-
/**
|
479
|
-
* @hidden
|
480
|
-
*/
|
481
|
-
class ErrorHandlingService {
|
482
|
-
constructor(spreadsheetService, localization, dialogService) {
|
483
|
-
this.spreadsheetService = spreadsheetService;
|
484
|
-
this.localization = localization;
|
485
|
-
this.dialogService = dialogService;
|
486
|
-
this.sheetsChanged = new Subject();
|
487
|
-
this.activeSheetChanged = new Subject();
|
488
|
-
this.selectionChanged = new Subject();
|
489
|
-
}
|
490
|
-
set currentActiveSheet(value) {
|
491
|
-
this._currentActiveSheet = value;
|
492
|
-
}
|
493
|
-
get currentActiveSheet() {
|
494
|
-
return this._currentActiveSheet;
|
495
|
-
}
|
496
|
-
get activeSheet() {
|
497
|
-
var _a;
|
498
|
-
return (_a = this.spreadsheet.activeSheet()) === null || _a === void 0 ? void 0 : _a.name();
|
499
|
-
}
|
500
|
-
notifySheetsChange(actionType, sheetInfo) {
|
501
|
-
const sheets = this.spreadsheet.sheets();
|
502
|
-
this.sheetsChanged.next({ sheets, sheet: sheetInfo, actionType });
|
503
|
-
}
|
504
|
-
handleErrorMessage(messageData) {
|
505
|
-
this.openDialog(messageData);
|
506
|
-
}
|
507
|
-
openDialog(messageData) {
|
508
|
-
var _a;
|
509
|
-
let dialogContent;
|
510
|
-
if (messageData.name === 'message') {
|
511
|
-
const localizationMsg = this.messageFor('invalidNameError');
|
512
|
-
let inputValue = messageData.text.split(' ').pop();
|
513
|
-
if (messageData.text.startsWith('Parse')) {
|
514
|
-
inputValue = inputValue.substring(0, inputValue.length - 1);
|
515
|
-
}
|
516
|
-
dialogContent = replaceMessagePlaceholder(localizationMsg, 'inputValue', inputValue);
|
517
|
-
}
|
518
|
-
else {
|
519
|
-
dialogContent = this.messageFor(messageData.name);
|
520
|
-
}
|
521
|
-
const dialogSettings = {
|
522
|
-
appendTo: this.spreadsheetService.dialogContainer,
|
523
|
-
title: this.messageFor('dialogError'),
|
524
|
-
content: dialogContent,
|
525
|
-
actions: [{
|
526
|
-
text: this.messageFor('dialogOk'),
|
527
|
-
themeColor: 'primary'
|
528
|
-
}],
|
529
|
-
width: 400,
|
530
|
-
actionsLayout: 'start'
|
531
|
-
};
|
532
|
-
const dialog = this.dialogService.open(dialogSettings);
|
533
|
-
const dialogInstance = (_a = dialog.dialog) === null || _a === void 0 ? void 0 : _a.instance;
|
534
|
-
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
535
|
-
if (event.text === this.messageFor('dialogOk')) {
|
536
|
-
messageData.close();
|
537
|
-
}
|
538
|
-
});
|
539
|
-
dialogInstance.close.pipe(take(1)).subscribe(() => {
|
540
|
-
messageData.close();
|
541
|
-
});
|
542
|
-
}
|
543
|
-
messageFor(text) {
|
544
|
-
return this.localization.get(text);
|
545
|
-
}
|
546
|
-
}
|
547
|
-
ErrorHandlingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ErrorHandlingService, deps: [{ token: SpreadsheetService }, { token: i2.LocalizationService }, { token: i1$1.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
548
|
-
ErrorHandlingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ErrorHandlingService });
|
549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ErrorHandlingService, decorators: [{
|
550
|
-
type: Injectable
|
551
|
-
}], ctorParameters: function () { return [{ type: SpreadsheetService }, { type: i2.LocalizationService }, { type: i1$1.DialogService }]; } });
|
552
|
-
|
553
|
-
/**
|
554
|
-
* @hidden
|
555
|
-
*/
|
556
|
-
const commandIcons = {
|
557
|
-
alignCenter: 'align-center',
|
558
|
-
alignJustify: 'align-justify',
|
559
|
-
alignLeft: 'align-left',
|
560
|
-
alignRight: 'align-right',
|
561
|
-
alignTop: 'align-top',
|
562
|
-
alignMiddle: 'align-middle',
|
563
|
-
alignBottom: 'align-bottom',
|
564
|
-
align: 'align-left',
|
565
|
-
alignHorizontal: 'align-left',
|
566
|
-
alignVertical: 'align-middle',
|
567
|
-
background: 'droplet',
|
568
|
-
bold: 'bold',
|
569
|
-
color: 'foreground-color',
|
570
|
-
italic: 'italic',
|
571
|
-
redo: 'arrow-rotate-cw',
|
572
|
-
underline: 'underline',
|
573
|
-
undo: 'arrow-rotate-ccw',
|
574
|
-
wrap: 'text-wrap',
|
575
|
-
addColumnLeft: 'table-column-insert-left',
|
576
|
-
addColumnRight: 'table-column-insert-right',
|
577
|
-
addRowAbove: 'table-row-insert-above',
|
578
|
-
addRowBelow: 'table-row-insert-below',
|
579
|
-
deleteRow: 'table-row-delete',
|
580
|
-
deleteColumn: 'table-column-delete',
|
581
|
-
gridLines: 'borders-none',
|
582
|
-
folderOpen: 'folder-open',
|
583
|
-
download: 'download',
|
584
|
-
format: 'custom-format',
|
585
|
-
fontSize: 'font-size',
|
586
|
-
fontFamily: 'font-family',
|
587
|
-
merge: 'cells-merge',
|
588
|
-
mergeAll: 'cells-merge',
|
589
|
-
mergeHorizontally: 'cells-merge-horizontally',
|
590
|
-
mergeVertically: 'cells-merge-vertically',
|
591
|
-
unmerge: 'table-unmerge',
|
592
|
-
insertLink: 'hyperlink',
|
593
|
-
increaseFontSize: 'font-grow',
|
594
|
-
decreaseFontSize: 'font-shrink',
|
595
|
-
increaseDecimal: 'decimal-increase',
|
596
|
-
decreaseDecimal: 'decimal-decrease',
|
597
|
-
copy: 'copy',
|
598
|
-
cut: 'cut',
|
599
|
-
paste: 'clipboard',
|
600
|
-
hideRow: 'eye-slash',
|
601
|
-
unhideRow: 'eye',
|
602
|
-
hideColumn: 'eye-slash',
|
603
|
-
unhideColumn: 'eye'
|
604
|
-
};
|
605
|
-
/**
|
606
|
-
* @hidden
|
607
|
-
*/
|
608
|
-
const commandSVGIcons = {
|
609
|
-
alignCenter: alignCenterIcon,
|
610
|
-
alignJustify: alignJustifyIcon,
|
611
|
-
alignLeft: alignLeftIcon,
|
612
|
-
alignRight: alignRightIcon,
|
613
|
-
alignTop: alignTopIcon,
|
614
|
-
alignMiddle: alignMiddleIcon,
|
615
|
-
alignBottom: alignBottomIcon,
|
616
|
-
align: alignLeftIcon,
|
617
|
-
alignHorizontal: alignLeftIcon,
|
618
|
-
alignVertical: alignMiddleIcon,
|
619
|
-
background: dropletIcon,
|
620
|
-
bold: boldIcon,
|
621
|
-
color: foregroundColorIcon,
|
622
|
-
italic: italicIcon,
|
623
|
-
redo: arrowRotateCwIcon,
|
624
|
-
underline: underlineIcon,
|
625
|
-
undo: arrowRotateCcwIcon,
|
626
|
-
wrap: textWrapIcon,
|
627
|
-
addColumnLeft: tableColumnInsertLeftIcon,
|
628
|
-
addColumnRight: tableColumnInsertRightIcon,
|
629
|
-
addRowAbove: tableRowInsertAboveIcon,
|
630
|
-
addRowBelow: tableRowInsertBelowIcon,
|
631
|
-
deleteRow: tableRowDeleteIcon,
|
632
|
-
deleteColumn: tableColumnDeleteIcon,
|
633
|
-
gridLines: bordersNoneIcon,
|
634
|
-
folderOpen: folderOpenIcon,
|
635
|
-
download: downloadIcon,
|
636
|
-
format: customFormatIcon,
|
637
|
-
fontSize: fontSizeIcon,
|
638
|
-
fontFamily: fontFamilyIcon,
|
639
|
-
merge: cellsMergeIcon,
|
640
|
-
mergeAll: cellsMergeIcon,
|
641
|
-
mergeHorizontally: cellsMergeHorizontallyIcon,
|
642
|
-
mergeVertically: cellsMergeVerticallyIcon,
|
643
|
-
unmerge: tableUnmergeIcon,
|
644
|
-
insertLink: linkIcon,
|
645
|
-
increaseFontSize: fontGrowIcon,
|
646
|
-
decreaseFontSize: fontShrinkIcon,
|
647
|
-
decreaseDecimal: decimalDecreaseIcon,
|
648
|
-
increaseDecimal: decimalIncreaseIcon,
|
649
|
-
copy: copyIcon,
|
650
|
-
cut: cutIcon,
|
651
|
-
paste: clipboardIcon,
|
652
|
-
hideRow: eyeSlashIcon,
|
653
|
-
unhideRow: eyeIcon,
|
654
|
-
hideColumn: eyeSlashIcon,
|
655
|
-
unhideColumn: eyeIcon
|
656
|
-
};
|
657
|
-
|
658
|
-
/**
|
659
|
-
* @hidden
|
660
|
-
*/
|
661
|
-
class InsertLinkDialogComponent extends DialogContentBase {
|
662
|
-
constructor(dialog) {
|
663
|
-
super(dialog);
|
664
|
-
this.dialog = dialog;
|
665
|
-
this.urlLink = '';
|
666
|
-
}
|
667
|
-
setData(args) {
|
668
|
-
this.urlLink = args.link;
|
669
|
-
}
|
670
|
-
}
|
671
|
-
InsertLinkDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InsertLinkDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
672
|
-
InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InsertLinkDialogComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
673
|
-
<form class="k-form k-form-md" method="dialog">
|
674
|
-
<div class="k-form-field">
|
675
|
-
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
676
|
-
<kendo-textbox #textbox
|
677
|
-
[(value)]="urlLink">
|
678
|
-
</kendo-textbox>
|
679
|
-
</div>
|
680
|
-
</form>
|
681
|
-
`, isInline: true, dependencies: [{ kind: "component", type: LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
|
682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
|
683
|
-
type: Component,
|
684
|
-
args: [{
|
685
|
-
template: `
|
686
|
-
<form class="k-form k-form-md" method="dialog">
|
687
|
-
<div class="k-form-field">
|
688
|
-
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
689
|
-
<kendo-textbox #textbox
|
690
|
-
[(value)]="urlLink">
|
691
|
-
</kendo-textbox>
|
692
|
-
</div>
|
693
|
-
</form>
|
694
|
-
`,
|
695
|
-
standalone: true,
|
696
|
-
imports: [LabelComponent, TextBoxComponent]
|
697
|
-
}]
|
698
|
-
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
699
|
-
|
700
|
-
/**
|
701
|
-
* @hidden
|
702
|
-
*/
|
703
|
-
class ActionDialogComponent extends DialogContentBase {
|
704
|
-
constructor(dialog) {
|
705
|
-
super(dialog);
|
706
|
-
this.dialog = dialog;
|
707
|
-
}
|
708
|
-
setData(args) {
|
709
|
-
this.value = args.value;
|
710
|
-
this.tabindex = args.tabindex;
|
711
|
-
this.commandName = args.commandName;
|
712
|
-
}
|
713
|
-
}
|
714
|
-
ActionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
715
|
-
ActionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ActionDialogComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
716
|
-
<ng-container *ngIf="commandName === 'delete'">
|
717
|
-
<p>The deleted sheet data will be lost.</p>
|
718
|
-
<p>Are you sure you want to proceed?</p>
|
719
|
-
</ng-container>
|
720
|
-
|
721
|
-
<form class="k-form k-form-md" *ngIf="commandName === 'rename'" method="dialog">
|
722
|
-
<div class="k-form-field">
|
723
|
-
<kendo-label [for]="textbox" text="Rename sheet"></kendo-label>
|
724
|
-
<div class="k-form-field-wrap">
|
725
|
-
<kendo-textbox #textbox
|
726
|
-
autocomplete="off"
|
727
|
-
placeholder="Sheet name"
|
728
|
-
[(value)]="value">
|
729
|
-
</kendo-textbox>
|
730
|
-
</div>
|
731
|
-
</div>
|
732
|
-
</form>
|
733
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionDialogComponent, decorators: [{
|
735
|
-
type: Component,
|
736
|
-
args: [{
|
737
|
-
template: `
|
738
|
-
<ng-container *ngIf="commandName === 'delete'">
|
739
|
-
<p>The deleted sheet data will be lost.</p>
|
740
|
-
<p>Are you sure you want to proceed?</p>
|
741
|
-
</ng-container>
|
742
|
-
|
743
|
-
<form class="k-form k-form-md" *ngIf="commandName === 'rename'" method="dialog">
|
744
|
-
<div class="k-form-field">
|
745
|
-
<kendo-label [for]="textbox" text="Rename sheet"></kendo-label>
|
746
|
-
<div class="k-form-field-wrap">
|
747
|
-
<kendo-textbox #textbox
|
748
|
-
autocomplete="off"
|
749
|
-
placeholder="Sheet name"
|
750
|
-
[(value)]="value">
|
751
|
-
</kendo-textbox>
|
752
|
-
</div>
|
753
|
-
</div>
|
754
|
-
</form>
|
755
|
-
`,
|
756
|
-
standalone: true,
|
757
|
-
imports: [NgIf, LabelComponent, TextBoxComponent]
|
758
|
-
}]
|
759
|
-
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
760
|
-
|
761
|
-
/**
|
762
|
-
* @hidden
|
763
|
-
*/
|
764
|
-
class SheetsBarComponent {
|
765
|
-
constructor(spreadsheetService, element, renderer, localization, dialogService, ngZone) {
|
766
|
-
this.spreadsheetService = spreadsheetService;
|
767
|
-
this.element = element;
|
768
|
-
this.renderer = renderer;
|
769
|
-
this.localization = localization;
|
770
|
-
this.dialogService = dialogService;
|
771
|
-
this.ngZone = ngZone;
|
772
|
-
this.hostClasses = true;
|
773
|
-
this.subs = new Subscription();
|
774
|
-
this.plusIcon = plusIcon;
|
775
|
-
this.menuIcon = menuIcon;
|
776
|
-
this.caretAltDownIcon = caretAltDownIcon;
|
777
|
-
this.caretAltLeftIcon = caretAltLeftIcon;
|
778
|
-
this.caretAltRightIcon = caretAltRightIcon;
|
779
|
-
this.selected = false;
|
780
|
-
this.sheetsMenuList = [];
|
781
|
-
this.openedDdb = null;
|
782
|
-
this.hiddenStateIcons = {
|
783
|
-
hidden: 'eye-slash',
|
784
|
-
visible: 'eye'
|
785
|
-
};
|
786
|
-
this.hiddenStateSVGIcons = {
|
787
|
-
hidden: eyeSlashIcon,
|
788
|
-
visible: eyeIcon
|
789
|
-
};
|
790
|
-
this.onAddClick = () => {
|
791
|
-
if (this.spreadsheetService.spreadsheet) {
|
792
|
-
this.spreadsheetService.spreadsheet.view.sheetsbar.onAddSelect();
|
793
|
-
this.notifySheetsChange();
|
794
|
-
}
|
795
|
-
};
|
796
|
-
this.actionsCallback = {
|
797
|
-
copy: (sheetInfo) => {
|
798
|
-
let copies = 0;
|
799
|
-
const regex = this.getCopyRegex(sheetInfo.text);
|
800
|
-
this.sheets.forEach(sheet => {
|
801
|
-
const isPresent = regex.test(sheet.text);
|
802
|
-
if (isPresent) {
|
803
|
-
copies += 1;
|
804
|
-
}
|
805
|
-
});
|
806
|
-
const sheetToCopy = this.spreadsheetService.spreadsheet.sheets().find(s => s.name() === sheetInfo.text);
|
807
|
-
const newName = `${sheetInfo.text} (${copies + 1})`;
|
808
|
-
this.spreadsheetService.spreadsheet.insertSheet({ data: Object.assign(Object.assign({}, sheetToCopy.toJSON()), { name: newName }), index: sheetInfo.index + 1 });
|
809
|
-
this.selectSheet(newName);
|
810
|
-
},
|
811
|
-
move: (sheetInfo, itemKey) => {
|
812
|
-
const isMoveRight = itemKey === 'sheetMoveRight';
|
813
|
-
let oldIndex = -1;
|
814
|
-
let newIndex = -1;
|
815
|
-
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
816
|
-
if (isMoveRight) {
|
817
|
-
for (let i = 0; i < sheets.length; i++) {
|
818
|
-
if (sheets[i].name() === sheetInfo.text) {
|
819
|
-
oldIndex = i;
|
820
|
-
}
|
821
|
-
if (oldIndex > -1 && i > oldIndex && sheets[i]._state() === 'visible') {
|
822
|
-
newIndex = i;
|
823
|
-
break;
|
824
|
-
}
|
825
|
-
}
|
826
|
-
}
|
827
|
-
else {
|
828
|
-
for (let i = sheets.length - 1; i >= 0; i--) {
|
829
|
-
if (sheets[i].name() === sheetInfo.text) {
|
830
|
-
oldIndex = i;
|
831
|
-
}
|
832
|
-
if (oldIndex > -1 && (i < oldIndex) && sheets[i]._state() === 'visible') {
|
833
|
-
newIndex = i;
|
834
|
-
break;
|
835
|
-
}
|
836
|
-
}
|
837
|
-
}
|
838
|
-
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
839
|
-
sheetsBar.onSheetReorderEnd({ oldIndex, newIndex });
|
840
|
-
this.selectSheet(sheetInfo.text);
|
841
|
-
this.notifySheetsChange();
|
842
|
-
},
|
843
|
-
hide: (sheet) => {
|
844
|
-
sheet.state = 'hidden';
|
845
|
-
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
846
|
-
const sheetIndex = sheets.findIndex(s => s.name() === sheet.text);
|
847
|
-
sheets[sheetIndex]._state('hidden');
|
848
|
-
const newSelectedIndex = sheetIndex < sheets.length - 1 ? sheetIndex + 1 : 0;
|
849
|
-
const sheetToSelect = sheets[newSelectedIndex].name();
|
850
|
-
this.selectSheet(sheetToSelect);
|
851
|
-
this.notifySheetsChange();
|
852
|
-
}
|
853
|
-
};
|
854
|
-
this.subs.add(spreadsheetService.onSheetsBarFocus.subscribe(() => ngZone.run(() => this.tabstrip.selectTab(this.sheets.findIndex(sh => sh.text === spreadsheetService.currentActiveSheet)))));
|
855
|
-
}
|
856
|
-
get activeSheet() {
|
857
|
-
var _a, _b;
|
858
|
-
return (_b = (_a = this.spreadsheetService.spreadsheet) === null || _a === void 0 ? void 0 : _a.activeSheet()) === null || _b === void 0 ? void 0 : _b.name();
|
859
|
-
}
|
860
|
-
get tablistId() {
|
861
|
-
return this.spreadsheetService.tablistId;
|
862
|
-
}
|
863
|
-
ngAfterViewInit() {
|
864
|
-
if (!isDocumentAvailable() || !this.element.nativeElement) {
|
865
|
-
return;
|
866
|
-
}
|
867
|
-
const prevBtn = this.element.nativeElement.querySelector('.k-tabstrip-prev');
|
868
|
-
const nextBtn = this.element.nativeElement.querySelector('.k-tabstrip-next');
|
869
|
-
const tablist = this.element.nativeElement.querySelector('.k-tabstrip-items');
|
870
|
-
this.renderer.addClass(prevBtn, 'k-order-1');
|
871
|
-
this.renderer.addClass(nextBtn, 'k-order-2');
|
872
|
-
this.renderer.setAttribute(tablist, 'id', this.tablistId);
|
873
|
-
this.tabListSub = this.renderer.listen(tablist, 'keydown', this.onTabListKeyDown.bind(this));
|
874
|
-
}
|
875
|
-
ngOnChanges(changes) {
|
876
|
-
var _a, _b;
|
877
|
-
if (changes['sheets']) {
|
878
|
-
this.sheetsMenuList = (_a = this.sheets) === null || _a === void 0 ? void 0 : _a.map(sheet => ({
|
879
|
-
text: sheet.text,
|
880
|
-
icon: this.hiddenStateIcons[sheet.state],
|
881
|
-
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
882
|
-
}));
|
883
|
-
this.sheets = (_b = changes['sheets'].currentValue) === null || _b === void 0 ? void 0 : _b.map((sheet, _, items) => (Object.assign(Object.assign({}, sheet), { sheetActions: getSheetActions(items, sheet)
|
884
|
-
.map(item => (Object.assign(Object.assign({}, item), { text: this.messageFor(item.messageKey) }))) })));
|
885
|
-
}
|
886
|
-
}
|
887
|
-
ngOnDestroy() {
|
888
|
-
if (this.tabListSub) {
|
889
|
-
this.tabListSub();
|
890
|
-
}
|
891
|
-
this.subs.unsubscribe();
|
892
|
-
}
|
893
|
-
onTabSelect(ev) {
|
894
|
-
if (ev.title !== this.activeSheet) {
|
895
|
-
this.selectSheet(ev.title);
|
896
|
-
}
|
897
|
-
}
|
898
|
-
onOpen(ddb) {
|
899
|
-
if (isPresent(this.openedDdb) && this.openedDdb !== ddb) {
|
900
|
-
this.openedDdb.toggle(false);
|
901
|
-
}
|
902
|
-
this.openedDdb = ddb;
|
903
|
-
}
|
904
|
-
onClose() {
|
905
|
-
this.openedDdb = null;
|
906
|
-
const activeTabIdx = this.sheets.findIndex(sheet => sheet.active);
|
907
|
-
this.tabstrip.selectTab(activeTabIdx);
|
908
|
-
}
|
909
|
-
onActionClick(dataItem, sheet) {
|
910
|
-
if (dataItem.disabled) {
|
911
|
-
return;
|
912
|
-
}
|
913
|
-
if (dataItem.commandName === 'delete' || dataItem.commandName === 'rename') {
|
914
|
-
this.openDialog(dataItem, sheet);
|
915
|
-
}
|
916
|
-
else {
|
917
|
-
this.actionsCallback[dataItem.commandName](sheet, dataItem.messageKey);
|
918
|
-
}
|
919
|
-
}
|
920
|
-
onMenuItemClick(item) {
|
921
|
-
const sheet = this.sheets.find(s => s.text === item.text);
|
922
|
-
sheet.state = 'visible';
|
923
|
-
this.spreadsheetService.spreadsheet.sheets().find(sh => sh.name() === sheet.text)._state('visible');
|
924
|
-
this.selectSheet(sheet.text);
|
925
|
-
}
|
926
|
-
messageFor(key) {
|
927
|
-
return this.localization.get(key);
|
928
|
-
}
|
929
|
-
openDialog(dataItem, sheet) {
|
930
|
-
const dialogSettings = {
|
931
|
-
appendTo: this.spreadsheetService.dialogContainer,
|
932
|
-
title: this.messageFor(dataItem.commandName),
|
933
|
-
content: ActionDialogComponent,
|
934
|
-
actions: [{
|
935
|
-
text: this.messageFor(dataItem.dialogButton),
|
936
|
-
themeColor: 'primary'
|
937
|
-
}, {
|
938
|
-
text: this.messageFor('dialogCancel')
|
939
|
-
}],
|
940
|
-
actionsLayout: 'stretched',
|
941
|
-
autoFocusedElement: '.k-textbox .k-input-inner, .k-button-solid-primary'
|
942
|
-
};
|
943
|
-
const dialog = this.dialogService.open(dialogSettings);
|
944
|
-
const dialogInstance = dialog.dialog.instance;
|
945
|
-
const dialogContent = dialog.content.instance;
|
946
|
-
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
947
|
-
if (event.text === this.messageFor(dataItem.dialogButton)) {
|
948
|
-
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
949
|
-
if (sheetsBar) {
|
950
|
-
const allSheets = this.spreadsheetService.spreadsheet.sheets();
|
951
|
-
const sheetIndex = allSheets.findIndex(s => s.name() === sheet.text);
|
952
|
-
dataItem.commandName === 'delete' ? sheetsBar.onSheetRemove(sheet.text) : sheetsBar.onSheetRename(dialogContent.value, sheetIndex);
|
953
|
-
this.notifySheetsChange();
|
954
|
-
}
|
955
|
-
}
|
956
|
-
});
|
957
|
-
dialogContent.setData({
|
958
|
-
value: sheet.text,
|
959
|
-
tabindex: -1,
|
960
|
-
commandName: dataItem.commandName
|
961
|
-
});
|
962
|
-
}
|
963
|
-
getCopyRegex(sheetName) {
|
964
|
-
const newName = sheetName.replaceAll('(', '\\(').replaceAll(')', '\\)');
|
965
|
-
const st = `(${newName})\\s?\\(`;
|
966
|
-
return new RegExp(st, 's');
|
967
|
-
}
|
968
|
-
selectSheet(sheetName) {
|
969
|
-
const spreadsheetSheet = this.spreadsheetService.spreadsheet.sheets().find(s => s.name() === sheetName);
|
970
|
-
this.spreadsheetService.spreadsheet.activeSheet(spreadsheetSheet);
|
971
|
-
this.spreadsheetService.currentActiveSheet = sheetName;
|
972
|
-
this.spreadsheetService.activeSheetChanged.next(spreadsheetSheet);
|
973
|
-
this.notifySheetsChange();
|
974
|
-
}
|
975
|
-
onTabListKeyDown(ev) {
|
976
|
-
const buttonEl = ev.target.querySelector('.k-dropdown-button');
|
977
|
-
const index = Array.from(this.actionDdbRefs).findIndex(el => el.nativeElement === buttonEl);
|
978
|
-
const ddb = Array.from(this.actionDdbs)[index];
|
979
|
-
if (!ddb) {
|
980
|
-
return;
|
981
|
-
}
|
982
|
-
const altKey = ev.altKey;
|
983
|
-
const arrowDown = ev.keyCode === Keys.ArrowDown;
|
984
|
-
const shouldOpenDdb = altKey && arrowDown && !ddb.isOpen;
|
985
|
-
if (shouldOpenDdb) {
|
986
|
-
ev.preventDefault();
|
987
|
-
ddb.togglePopupVisibility();
|
988
|
-
}
|
989
|
-
}
|
990
|
-
notifySheetsChange() {
|
991
|
-
this.ngZone.run(() => {
|
992
|
-
var _a;
|
993
|
-
const newSheets = this.spreadsheetService.spreadsheet.sheets();
|
994
|
-
const sheetDesc = mapToSheetDescriptor(newSheets);
|
995
|
-
this.sheets = sheetDesc
|
996
|
-
.flatMap((item, index, items) => item.state === 'visible' ? [Object.assign(Object.assign({}, item), { inEdit: false, first: index === 0, last: index === items.length - 1, text: item.name, active: (item.name === this.activeSheet) || items.length === 1, index, sheetActions: getSheetActions(items, item)
|
997
|
-
.map(item => (Object.assign(Object.assign({}, item), { text: this.messageFor(item.messageKey) }))) })] : []);
|
998
|
-
this.sheetsMenuList = (_a = this.sheets) === null || _a === void 0 ? void 0 : _a.map(sheet => ({
|
999
|
-
text: sheet.text,
|
1000
|
-
icon: this.hiddenStateIcons[sheet.state],
|
1001
|
-
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
1002
|
-
}));
|
1003
|
-
});
|
1004
|
-
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.spreadsheetService.spreadsheet.view.clipboard.focus());
|
1005
|
-
}
|
1006
|
-
}
|
1007
|
-
SheetsBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SheetsBarComponent, deps: [{ token: SpreadsheetService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SpreadsheetLocalizationService }, { token: i1$1.DialogService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
1008
|
-
SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SheetsBarComponent, isStandalone: true, selector: "[kendoSpreadsheetSheetsBar]", inputs: { sheets: "sheets", sheetDescriptors: "sheetDescriptors" }, host: { properties: { "class.k-spreadsheet-sheets-bar": "this.hostClasses" } }, viewQueries: [{ propertyName: "addButton", first: true, predicate: ["addButton"], descendants: true }, { propertyName: "menuButton", first: true, predicate: ["menuButton"], descendants: true }, { propertyName: "tabstrip", first: true, predicate: ["tabstrip"], descendants: true }, { propertyName: "actionDdbs", predicate: ["sheetDdb"], descendants: true }, { propertyName: "actionDdbRefs", predicate: ["sheetDdb"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
|
1009
|
-
<button kendoButton #addButton
|
1010
|
-
[title]="messageFor('addSheet')"
|
1011
|
-
type="button"
|
1012
|
-
fillMode="flat"
|
1013
|
-
class="k-spreadsheet-sheet-add"
|
1014
|
-
icon="plus"
|
1015
|
-
[svgIcon]="plusIcon"
|
1016
|
-
[kendoEventsOutsideAngular]="{click: onAddClick}"
|
1017
|
-
[attr.aria-controls]="tablistId">
|
1018
|
-
</button>
|
1019
|
-
<kendo-dropdownbutton #menuButton
|
1020
|
-
fillMode="flat"
|
1021
|
-
buttonClass="k-spreadsheet-sheets-menu"
|
1022
|
-
icon="menu"
|
1023
|
-
[svgIcon]="menuIcon"
|
1024
|
-
[data]="sheetsMenuList"
|
1025
|
-
(itemClick)="onMenuItemClick($event)"
|
1026
|
-
(open)="onOpen(menuButton)"
|
1027
|
-
[buttonAttributes]="{title: messageFor('sheetsMenu')}"
|
1028
|
-
[attr.aria-controls]="tablistId">
|
1029
|
-
</kendo-dropdownbutton>
|
1030
|
-
<kendo-tabstrip #tabstrip
|
1031
|
-
[tabPosition]="'bottom'"
|
1032
|
-
[showContentArea]="false"
|
1033
|
-
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1034
|
-
class="k-spreadsheet-sheets k-overflow-hidden"
|
1035
|
-
(tabSelect)="onTabSelect($event)">
|
1036
|
-
<ng-container *ngFor="let sheet of sheets">
|
1037
|
-
<kendo-tabstrip-tab
|
1038
|
-
*ngIf="sheet.state === 'visible'"
|
1039
|
-
[title]="sheet.text"
|
1040
|
-
[selected]="sheet.text === activeSheet">
|
1041
|
-
<ng-template kendoTabTemplate>
|
1042
|
-
<span class="k-link">{{sheet.text}}</span>
|
1043
|
-
<kendo-dropdownbutton #sheetDdb
|
1044
|
-
fillMode="flat"
|
1045
|
-
icon="caret-alt-down"
|
1046
|
-
[svgIcon]="caretAltDownIcon"
|
1047
|
-
buttonClass="k-menu-button"
|
1048
|
-
[data]="sheet.sheetActions"
|
1049
|
-
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
1050
|
-
(open)="onOpen(sheetDdb)"
|
1051
|
-
(close)="onClose()"
|
1052
|
-
(click)="$event.stopPropagation()"
|
1053
|
-
(itemClick)="onActionClick($event, sheet)">
|
1054
|
-
</kendo-dropdownbutton>
|
1055
|
-
</ng-template>
|
1056
|
-
</kendo-tabstrip-tab>
|
1057
|
-
</ng-container>
|
1058
|
-
</kendo-tabstrip>
|
1059
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabTemplateDirective, selector: "[kendoTabTemplate]" }] });
|
1060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SheetsBarComponent, decorators: [{
|
1061
|
-
type: Component,
|
1062
|
-
args: [{
|
1063
|
-
selector: '[kendoSpreadsheetSheetsBar]',
|
1064
|
-
template: `
|
1065
|
-
<button kendoButton #addButton
|
1066
|
-
[title]="messageFor('addSheet')"
|
1067
|
-
type="button"
|
1068
|
-
fillMode="flat"
|
1069
|
-
class="k-spreadsheet-sheet-add"
|
1070
|
-
icon="plus"
|
1071
|
-
[svgIcon]="plusIcon"
|
1072
|
-
[kendoEventsOutsideAngular]="{click: onAddClick}"
|
1073
|
-
[attr.aria-controls]="tablistId">
|
1074
|
-
</button>
|
1075
|
-
<kendo-dropdownbutton #menuButton
|
1076
|
-
fillMode="flat"
|
1077
|
-
buttonClass="k-spreadsheet-sheets-menu"
|
1078
|
-
icon="menu"
|
1079
|
-
[svgIcon]="menuIcon"
|
1080
|
-
[data]="sheetsMenuList"
|
1081
|
-
(itemClick)="onMenuItemClick($event)"
|
1082
|
-
(open)="onOpen(menuButton)"
|
1083
|
-
[buttonAttributes]="{title: messageFor('sheetsMenu')}"
|
1084
|
-
[attr.aria-controls]="tablistId">
|
1085
|
-
</kendo-dropdownbutton>
|
1086
|
-
<kendo-tabstrip #tabstrip
|
1087
|
-
[tabPosition]="'bottom'"
|
1088
|
-
[showContentArea]="false"
|
1089
|
-
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1090
|
-
class="k-spreadsheet-sheets k-overflow-hidden"
|
1091
|
-
(tabSelect)="onTabSelect($event)">
|
1092
|
-
<ng-container *ngFor="let sheet of sheets">
|
1093
|
-
<kendo-tabstrip-tab
|
1094
|
-
*ngIf="sheet.state === 'visible'"
|
1095
|
-
[title]="sheet.text"
|
1096
|
-
[selected]="sheet.text === activeSheet">
|
1097
|
-
<ng-template kendoTabTemplate>
|
1098
|
-
<span class="k-link">{{sheet.text}}</span>
|
1099
|
-
<kendo-dropdownbutton #sheetDdb
|
1100
|
-
fillMode="flat"
|
1101
|
-
icon="caret-alt-down"
|
1102
|
-
[svgIcon]="caretAltDownIcon"
|
1103
|
-
buttonClass="k-menu-button"
|
1104
|
-
[data]="sheet.sheetActions"
|
1105
|
-
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
1106
|
-
(open)="onOpen(sheetDdb)"
|
1107
|
-
(close)="onClose()"
|
1108
|
-
(click)="$event.stopPropagation()"
|
1109
|
-
(itemClick)="onActionClick($event, sheet)">
|
1110
|
-
</kendo-dropdownbutton>
|
1111
|
-
</ng-template>
|
1112
|
-
</kendo-tabstrip-tab>
|
1113
|
-
</ng-container>
|
1114
|
-
</kendo-tabstrip>
|
1115
|
-
`,
|
1116
|
-
standalone: true,
|
1117
|
-
imports: [ButtonComponent, EventsOutsideAngularDirective, DropDownButtonComponent, TabStripComponent, NgFor, NgIf, TabStripTabComponent, TabTemplateDirective]
|
1118
|
-
}]
|
1119
|
-
}], ctorParameters: function () { return [{ type: SpreadsheetService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SpreadsheetLocalizationService }, { type: i1$1.DialogService }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
1120
|
-
type: HostBinding,
|
1121
|
-
args: ['class.k-spreadsheet-sheets-bar']
|
1122
|
-
}], sheets: [{
|
1123
|
-
type: Input
|
1124
|
-
}], sheetDescriptors: [{
|
1125
|
-
type: Input
|
1126
|
-
}], addButton: [{
|
1127
|
-
type: ViewChild,
|
1128
|
-
args: ['addButton']
|
1129
|
-
}], menuButton: [{
|
1130
|
-
type: ViewChild,
|
1131
|
-
args: ['menuButton']
|
1132
|
-
}], tabstrip: [{
|
1133
|
-
type: ViewChild,
|
1134
|
-
args: ['tabstrip']
|
1135
|
-
}], actionDdbs: [{
|
1136
|
-
type: ViewChildren,
|
1137
|
-
args: ['sheetDdb']
|
1138
|
-
}], actionDdbRefs: [{
|
1139
|
-
type: ViewChildren,
|
1140
|
-
args: ['sheetDdb', { read: ElementRef }]
|
1141
|
-
}] } });
|
1142
|
-
|
1143
|
-
/**
|
1144
|
-
* @hidden
|
1145
|
-
*/
|
1146
|
-
class NameBoxComponent {
|
1147
|
-
constructor(ngZone, host, localization, renderer) {
|
1148
|
-
this.ngZone = ngZone;
|
1149
|
-
this.host = host;
|
1150
|
-
this.localization = localization;
|
1151
|
-
this.renderer = renderer;
|
1152
|
-
this.hostClass = true;
|
1153
|
-
this.valueNormalizer = (text) => text.pipe(map((content) => ({ name: content })));
|
1154
|
-
}
|
1155
|
-
keyDownHandler() {
|
1156
|
-
const editor = this.spreadsheetWidget.view.nameEditor;
|
1157
|
-
if (editor) {
|
1158
|
-
const name = this.inputElement.value;
|
1159
|
-
editor.trigger('enter', { value: name });
|
1160
|
-
}
|
1161
|
-
}
|
1162
|
-
ngAfterViewInit() {
|
1163
|
-
this.renderer.setAttribute(this.inputElement, 'title', this.title);
|
1164
|
-
this.renderer.setAttribute(this.inputElement, 'aria-label', this.title);
|
1165
|
-
}
|
1166
|
-
get inputElement() {
|
1167
|
-
return this.host.nativeElement.querySelector('.k-input-inner');
|
1168
|
-
}
|
1169
|
-
get current() {
|
1170
|
-
return {
|
1171
|
-
value: (val) => {
|
1172
|
-
if (val === undefined) {
|
1173
|
-
const item = this.combobox && this.combobox.value;
|
1174
|
-
return item ? (item.name || item) : item;
|
1175
|
-
}
|
1176
|
-
else {
|
1177
|
-
this.ngZone.run(() => {
|
1178
|
-
this.value = { name: val } || null;
|
1179
|
-
});
|
1180
|
-
}
|
1181
|
-
}
|
1182
|
-
};
|
1183
|
-
}
|
1184
|
-
get title() {
|
1185
|
-
return this.localization.get('nameBox');
|
1186
|
-
}
|
1187
|
-
onSelectionChange(value) {
|
1188
|
-
const editor = this.spreadsheetWidget.view.nameEditor;
|
1189
|
-
if (editor && value) {
|
1190
|
-
const name = value.name;
|
1191
|
-
if (name !== this.value.name) {
|
1192
|
-
editor.trigger('select', { name });
|
1193
|
-
this.value = { name };
|
1194
|
-
}
|
1195
|
-
}
|
1196
|
-
}
|
1197
|
-
onOpen() {
|
1198
|
-
const editor = this.spreadsheetWidget.view.nameEditor;
|
1199
|
-
if (editor) {
|
1200
|
-
this.data = editor.readData();
|
1201
|
-
}
|
1202
|
-
}
|
1203
|
-
}
|
1204
|
-
NameBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NameBoxComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: SpreadsheetLocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
1205
|
-
NameBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NameBoxComponent, isStandalone: true, selector: "[kendoSpreadsheetNameBox]", inputs: { data: "data", spreadsheetWidget: "spreadsheetWidget" }, host: { listeners: { "keydown.enter": "keyDownHandler()" }, properties: { "class.k-spreadsheet-name-editor": "this.hostClass" } }, viewQueries: [{ propertyName: "combobox", first: true, predicate: ["combobox"], descendants: true }], ngImport: i0, template: `
|
1206
|
-
<kendo-combobox #combobox
|
1207
|
-
[popupSettings]="{popupClass: 'k-spreadsheet-names-popup'}"
|
1208
|
-
fillMode="flat"
|
1209
|
-
[clearButton]="false"
|
1210
|
-
textField="name"
|
1211
|
-
valueField="name"
|
1212
|
-
[data]="data"
|
1213
|
-
[allowCustom]="true"
|
1214
|
-
(selectionChange)="onSelectionChange($event)"
|
1215
|
-
[value]="value"
|
1216
|
-
(open)="onOpen()"
|
1217
|
-
[valueNormalizer]="valueNormalizer"
|
1218
|
-
[attr.title]="title"
|
1219
|
-
></kendo-combobox>
|
1220
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }] });
|
1221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NameBoxComponent, decorators: [{
|
1222
|
-
type: Component,
|
1223
|
-
args: [{
|
1224
|
-
selector: '[kendoSpreadsheetNameBox]',
|
1225
|
-
template: `
|
1226
|
-
<kendo-combobox #combobox
|
1227
|
-
[popupSettings]="{popupClass: 'k-spreadsheet-names-popup'}"
|
1228
|
-
fillMode="flat"
|
1229
|
-
[clearButton]="false"
|
1230
|
-
textField="name"
|
1231
|
-
valueField="name"
|
1232
|
-
[data]="data"
|
1233
|
-
[allowCustom]="true"
|
1234
|
-
(selectionChange)="onSelectionChange($event)"
|
1235
|
-
[value]="value"
|
1236
|
-
(open)="onOpen()"
|
1237
|
-
[valueNormalizer]="valueNormalizer"
|
1238
|
-
[attr.title]="title"
|
1239
|
-
></kendo-combobox>
|
1240
|
-
`,
|
1241
|
-
standalone: true,
|
1242
|
-
imports: [ComboBoxComponent]
|
1243
|
-
}]
|
1244
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: SpreadsheetLocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
|
1245
|
-
type: HostBinding,
|
1246
|
-
args: ['class.k-spreadsheet-name-editor']
|
1247
|
-
}], keyDownHandler: [{
|
1248
|
-
type: HostListener,
|
1249
|
-
args: ['keydown.enter']
|
1250
|
-
}], combobox: [{
|
1251
|
-
type: ViewChild,
|
1252
|
-
args: ['combobox']
|
1253
|
-
}], data: [{
|
1254
|
-
type: Input
|
1255
|
-
}], spreadsheetWidget: [{
|
1256
|
-
type: Input
|
1257
|
-
}] } });
|
1258
|
-
|
1259
|
-
const DEFAULT_FONT_FAMILY = 'Arial';
|
1260
|
-
const DEFAULT_FONT_SIZE = 12;
|
1261
|
-
/**
|
1262
|
-
* @hidden
|
1263
|
-
*/
|
1264
|
-
const DEFAULT_FONT_VALUES = {
|
1265
|
-
fontSize: DEFAULT_FONT_SIZE,
|
1266
|
-
fontFamily: DEFAULT_FONT_FAMILY
|
1267
|
-
};
|
1268
|
-
/**
|
1269
|
-
* @hidden
|
1270
|
-
*/
|
1271
|
-
const FONT_FAMILIES = ['Arial', 'Courier New', 'Georgia', 'Times New Roman', 'Trebuchet MS', 'Verdana'];
|
1272
|
-
/**
|
1273
|
-
* @hidden
|
1274
|
-
*/
|
1275
|
-
const FONT_SIZES = [8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
|
1276
|
-
/**
|
1277
|
-
* @hidden
|
1278
|
-
*/
|
1279
|
-
const FONT_DATA = {
|
1280
|
-
fontFamily: FONT_FAMILIES,
|
1281
|
-
fontSize: FONT_SIZES
|
1282
|
-
};
|
1283
|
-
/**
|
1284
|
-
* @hidden
|
1285
|
-
*/
|
1286
|
-
const FORMATS = [
|
1287
|
-
{ text: 'Automatic', value: null },
|
1288
|
-
{ text: 'Text', value: '@' },
|
1289
|
-
{ text: 'Number', value: '#,0.00' },
|
1290
|
-
{ text: 'Percent', value: '0.00%' },
|
1291
|
-
{ text: 'Financial', value: '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)' },
|
1292
|
-
{ text: 'Currency', value: '$#,##0.00;[Red]$#,##0.00' },
|
1293
|
-
{ text: 'Date', value: 'm/d/yyyy' },
|
1294
|
-
{ text: 'Time', value: 'h:mm:ss AM/PM' },
|
1295
|
-
{ text: 'Date time', value: 'm/d/yyyy h:mm' },
|
1296
|
-
{ text: 'Duration', value: '[h]:mm:ss' }
|
1297
|
-
];
|
1298
|
-
/**
|
1299
|
-
* @hidden
|
1300
|
-
*/
|
1301
|
-
const ALIGNS = [
|
1302
|
-
{ icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '', commandId: 'alignLeft' },
|
1303
|
-
{ icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '', commandId: 'alignCenter' },
|
1304
|
-
{ icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '', commandId: 'alignRight' },
|
1305
|
-
{ icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '', commandId: 'alignJustify' },
|
1306
|
-
{ icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '', commandId: 'alignTop' },
|
1307
|
-
{ icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '', commandId: 'alignMiddle' },
|
1308
|
-
{ icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '', commandId: 'alignBottom' }
|
1309
|
-
];
|
1310
|
-
/**
|
1311
|
-
* @hidden
|
1312
|
-
*/
|
1313
|
-
const MERGE = [
|
1314
|
-
{ icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false, commandId: 'mergeAll' },
|
1315
|
-
{ icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false, commandId: 'mergeHorizontally' },
|
1316
|
-
{ icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false, commandId: 'mergeVertically' },
|
1317
|
-
{ icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false, commandId: 'unmerge' }
|
1318
|
-
];
|
1319
|
-
/**
|
1320
|
-
* @hidden
|
1321
|
-
*/
|
1322
|
-
const MY_TOKEN = new InjectionToken('COMMAND_TOKEN');
|
1323
|
-
|
1324
|
-
/**
|
1325
|
-
* @hidden
|
1326
|
-
*/
|
1327
|
-
class SpreadsheetCommandBaseDirective {
|
1328
|
-
constructor(command, button, localization, spreadsheetService, toolsService) {
|
1329
|
-
this.command = command;
|
1330
|
-
this.button = button;
|
1331
|
-
this.localization = localization;
|
1332
|
-
this.spreadsheetService = spreadsheetService;
|
1333
|
-
this.toolsService = toolsService;
|
1334
|
-
this.subs = new Subscription();
|
1335
|
-
const text = this.localization.get(this.command);
|
1336
|
-
if (text) {
|
1337
|
-
this.button.showText = 'overflow';
|
1338
|
-
this.button.showIcon = 'both';
|
1339
|
-
this.button.text = text;
|
1340
|
-
}
|
1341
|
-
if (!this.button.toolbarOptions.icon) {
|
1342
|
-
this.button.icon = commandIcons[this.command];
|
1343
|
-
}
|
1344
|
-
if (!this.button.toolbarOptions.svgIcon) {
|
1345
|
-
this.button.svgIcon = commandSVGIcons[this.command];
|
1346
|
-
}
|
1347
|
-
this.button.title = text;
|
1348
|
-
this.button.fillMode = 'flat';
|
1349
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => {
|
1350
|
-
this.toolsService.ngZone.onStable.pipe(take(1)).subscribe(() => this.button.selected = state[command]);
|
1351
|
-
}));
|
1352
|
-
}
|
1353
|
-
ngOnInit() {
|
1354
|
-
this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
|
1355
|
-
this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
|
1356
|
-
}
|
1357
|
-
ngOnDestroy() {
|
1358
|
-
this.subs.unsubscribe();
|
1359
|
-
}
|
1360
|
-
clickHandler() { }
|
1361
|
-
pointerdownHandler(_event) { }
|
1362
|
-
}
|
1363
|
-
SpreadsheetCommandBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetCommandBaseDirective, deps: [{ token: MY_TOKEN }, { token: i1$2.ToolBarButtonComponent }, { token: i2.LocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1364
|
-
SpreadsheetCommandBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetCommandBaseDirective, selector: "[kendoSpreadsheetCommandBase]", ngImport: i0 });
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetCommandBaseDirective, decorators: [{
|
1366
|
-
type: Directive,
|
1367
|
-
args: [{
|
1368
|
-
selector: '[kendoSpreadsheetCommandBase]'
|
1369
|
-
}]
|
1370
|
-
}], ctorParameters: function () {
|
1371
|
-
return [{ type: undefined, decorators: [{
|
1372
|
-
type: Inject,
|
1373
|
-
args: [MY_TOKEN]
|
1374
|
-
}] }, { type: i1$2.ToolBarButtonComponent }, { type: i2.LocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }];
|
1375
|
-
} });
|
1376
|
-
|
1377
|
-
/**
|
1378
|
-
* @hidden
|
1379
|
-
*/
|
1380
|
-
class SpreadsheetCommandButton extends SpreadsheetCommandBaseDirective {
|
1381
|
-
constructor(command, button, localization, spreadsheetService, toolsService, commandOptions) {
|
1382
|
-
super(command, button, localization, spreadsheetService, toolsService);
|
1383
|
-
this.command = command;
|
1384
|
-
this.button = button;
|
1385
|
-
this.localization = localization;
|
1386
|
-
this.spreadsheetService = spreadsheetService;
|
1387
|
-
this.toolsService = toolsService;
|
1388
|
-
this.commandOptions = commandOptions;
|
1389
|
-
}
|
1390
|
-
clickHandler() {
|
1391
|
-
if (this.commandOptions.command === 'PropertyChangeCommand') {
|
1392
|
-
this.commandOptions.options.value = !this.toolsService.toolsState[this.command];
|
1393
|
-
}
|
1394
|
-
this.spreadsheetService.spreadsheet.executeCommand(this.commandOptions);
|
1395
|
-
}
|
1396
|
-
}
|
1397
|
-
|
1398
|
-
/**
|
1399
|
-
* @hidden
|
1400
|
-
*/
|
1401
|
-
class SpreadsheetGridLinesDirective extends SpreadsheetCommandButton {
|
1402
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1403
|
-
super('gridLines', button, localization, spreadsheetService, toolsService, {
|
1404
|
-
command: 'GridLinesChangeCommand',
|
1405
|
-
options: { property: 'gridLines',
|
1406
|
-
value: !button.selected
|
1407
|
-
}
|
1408
|
-
});
|
1409
|
-
}
|
1410
|
-
clickHandler() {
|
1411
|
-
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
1412
|
-
if (sheet) {
|
1413
|
-
const value = !sheet.showGridLines();
|
1414
|
-
const options = {
|
1415
|
-
command: 'GridLinesChangeCommand', options: { property: 'gridLines', value }
|
1416
|
-
};
|
1417
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1418
|
-
}
|
1419
|
-
}
|
1420
|
-
}
|
1421
|
-
SpreadsheetGridLinesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetGridLinesDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1422
|
-
SpreadsheetGridLinesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetGridLinesDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetGridLines]", usesInheritance: true, ngImport: i0 });
|
1423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetGridLinesDirective, decorators: [{
|
1424
|
-
type: Directive,
|
1425
|
-
args: [{
|
1426
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetGridLines]',
|
1427
|
-
standalone: true
|
1428
|
-
}]
|
1429
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1430
|
-
|
1431
|
-
/**
|
1432
|
-
* @hidden
|
1433
|
-
*/
|
1434
|
-
class SpreadsheetMergeDirective {
|
1435
|
-
constructor(host, localization, spreadsheetService) {
|
1436
|
-
this.host = host;
|
1437
|
-
this.spreadsheetService = spreadsheetService;
|
1438
|
-
this.commandName = 'merge';
|
1439
|
-
this.subs = new Subscription();
|
1440
|
-
host.svgIcon = commandSVGIcons[this.commandName];
|
1441
|
-
host.icon = commandIcons[this.commandName];
|
1442
|
-
host.arrowIcon = true;
|
1443
|
-
host.fillMode = 'flat';
|
1444
|
-
host.data = MERGE.map(item => (Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })));
|
1445
|
-
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
1446
|
-
host.title = localization.get(this.commandName);
|
1447
|
-
host.textField = 'textKey';
|
1448
|
-
}
|
1449
|
-
ngOnInit() {
|
1450
|
-
this.subs.add(this.host.open.subscribe(() => {
|
1451
|
-
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
1452
|
-
const isMergedCellWithinRange = this.hasMergedCells(sheet);
|
1453
|
-
const unmergeItem = this.host.data.find(i => i.commandName === 'unmerge');
|
1454
|
-
unmergeItem.disabled = !isMergedCellWithinRange;
|
1455
|
-
}));
|
1456
|
-
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.selectedRange = range));
|
1457
|
-
}
|
1458
|
-
ngOnDestroy() {
|
1459
|
-
this.subs.unsubscribe();
|
1460
|
-
}
|
1461
|
-
onItemClick(item) {
|
1462
|
-
if (item.disabled) {
|
1463
|
-
return;
|
1464
|
-
}
|
1465
|
-
const value = item.value || null;
|
1466
|
-
const options = {
|
1467
|
-
command: 'MergeCellCommand', options: { property: item.commandName, value }
|
1468
|
-
};
|
1469
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1470
|
-
}
|
1471
|
-
hasMergedCells(sheet) {
|
1472
|
-
const range = sheet._ref(this.selectedRange);
|
1473
|
-
return sheet._getMergedCells(range).hasMerged;
|
1474
|
-
}
|
1475
|
-
}
|
1476
|
-
SpreadsheetMergeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetMergeDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
1477
|
-
SpreadsheetMergeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetMergeDirective, isStandalone: true, selector: "[kendoSpreadsheetMerge]", ngImport: i0 });
|
1478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetMergeDirective, decorators: [{
|
1479
|
-
type: Directive,
|
1480
|
-
args: [{
|
1481
|
-
selector: '[kendoSpreadsheetMerge]',
|
1482
|
-
standalone: true
|
1483
|
-
}]
|
1484
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }]; } });
|
1485
|
-
|
1486
|
-
/**
|
1487
|
-
* @hidden
|
1488
|
-
*/
|
1489
|
-
class SpreadsheetIncreaseDecimalDirective extends SpreadsheetCommandButton {
|
1490
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1491
|
-
super('increaseDecimal', button, localization, spreadsheetService, toolsService, {
|
1492
|
-
command: 'AdjustDecimalsCommand'
|
1493
|
-
});
|
1494
|
-
}
|
1495
|
-
clickHandler() {
|
1496
|
-
const options = {
|
1497
|
-
command: 'AdjustDecimalsCommand',
|
1498
|
-
options: { value: 1 }
|
1499
|
-
};
|
1500
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1501
|
-
}
|
1502
|
-
}
|
1503
|
-
SpreadsheetIncreaseDecimalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetIncreaseDecimalDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1504
|
-
SpreadsheetIncreaseDecimalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetIncreaseDecimalDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]", usesInheritance: true, ngImport: i0 });
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetIncreaseDecimalDirective, decorators: [{
|
1506
|
-
type: Directive,
|
1507
|
-
args: [{
|
1508
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]',
|
1509
|
-
standalone: true
|
1510
|
-
}]
|
1511
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1512
|
-
|
1513
|
-
/**
|
1514
|
-
* @hidden
|
1515
|
-
*/
|
1516
|
-
class SpreadsheetDecreaseDecimalDirective extends SpreadsheetCommandButton {
|
1517
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1518
|
-
super('decreaseDecimal', button, localization, spreadsheetService, toolsService, {
|
1519
|
-
command: 'AdjustDecimalsCommand'
|
1520
|
-
});
|
1521
|
-
}
|
1522
|
-
clickHandler() {
|
1523
|
-
const options = {
|
1524
|
-
command: 'AdjustDecimalsCommand',
|
1525
|
-
options: { value: -1 }
|
1526
|
-
};
|
1527
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1528
|
-
}
|
1529
|
-
}
|
1530
|
-
SpreadsheetDecreaseDecimalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDecreaseDecimalDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1531
|
-
SpreadsheetDecreaseDecimalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetDecreaseDecimalDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]", usesInheritance: true, ngImport: i0 });
|
1532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDecreaseDecimalDirective, decorators: [{
|
1533
|
-
type: Directive,
|
1534
|
-
args: [{
|
1535
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]',
|
1536
|
-
standalone: true
|
1537
|
-
}]
|
1538
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1539
|
-
|
1540
|
-
/**
|
1541
|
-
* @hidden
|
1542
|
-
*/
|
1543
|
-
class SpreadsheetDeleteRowButtonDirective extends SpreadsheetCommandButton {
|
1544
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1545
|
-
super('deleteRow', button, localization, spreadsheetService, toolsService, {
|
1546
|
-
command: 'DeleteRowCommand',
|
1547
|
-
options: { property: 'deleteRow' }
|
1548
|
-
});
|
1549
|
-
}
|
1550
|
-
}
|
1551
|
-
SpreadsheetDeleteRowButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDeleteRowButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1552
|
-
SpreadsheetDeleteRowButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetDeleteRowButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteRowButton]", usesInheritance: true, ngImport: i0 });
|
1553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDeleteRowButtonDirective, decorators: [{
|
1554
|
-
type: Directive,
|
1555
|
-
args: [{
|
1556
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetDeleteRowButton]',
|
1557
|
-
standalone: true
|
1558
|
-
}]
|
1559
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1560
|
-
|
1561
|
-
/**
|
1562
|
-
* @hidden
|
1563
|
-
*/
|
1564
|
-
class SpreadsheetDeleteColumnButtonDirective extends SpreadsheetCommandButton {
|
1565
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1566
|
-
super('deleteColumn', button, localization, spreadsheetService, toolsService, {
|
1567
|
-
command: 'DeleteColumnCommand',
|
1568
|
-
options: { property: 'deleteColumn' }
|
1569
|
-
});
|
1570
|
-
}
|
1571
|
-
}
|
1572
|
-
SpreadsheetDeleteColumnButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDeleteColumnButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1573
|
-
SpreadsheetDeleteColumnButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetDeleteColumnButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteColumnButton]", usesInheritance: true, ngImport: i0 });
|
1574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDeleteColumnButtonDirective, decorators: [{
|
1575
|
-
type: Directive,
|
1576
|
-
args: [{
|
1577
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetDeleteColumnButton]',
|
1578
|
-
standalone: true
|
1579
|
-
}]
|
1580
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1581
|
-
|
1582
|
-
/**
|
1583
|
-
* @hidden
|
1584
|
-
*/
|
1585
|
-
class SpreadsheetAddRowAboveButtonDirective extends SpreadsheetCommandButton {
|
1586
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1587
|
-
super('addRowAbove', button, localization, spreadsheetService, toolsService, {
|
1588
|
-
command: 'AddRowCommand',
|
1589
|
-
options: { property: 'addRowAbove',
|
1590
|
-
value: 'above'
|
1591
|
-
}
|
1592
|
-
});
|
1593
|
-
}
|
1594
|
-
}
|
1595
|
-
SpreadsheetAddRowAboveButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddRowAboveButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1596
|
-
SpreadsheetAddRowAboveButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetAddRowAboveButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowAboveButton]", usesInheritance: true, ngImport: i0 });
|
1597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddRowAboveButtonDirective, decorators: [{
|
1598
|
-
type: Directive,
|
1599
|
-
args: [{
|
1600
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetAddRowAboveButton]',
|
1601
|
-
standalone: true
|
1602
|
-
}]
|
1603
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1604
|
-
|
1605
|
-
/**
|
1606
|
-
* @hidden
|
1607
|
-
*/
|
1608
|
-
class SpreadsheetAddRowBelowButtonDirective extends SpreadsheetCommandButton {
|
1609
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1610
|
-
super('addRowBelow', button, localization, spreadsheetService, toolsService, {
|
1611
|
-
command: 'AddRowCommand',
|
1612
|
-
options: { property: 'addRowBelow',
|
1613
|
-
value: 'below'
|
1614
|
-
}
|
1615
|
-
});
|
1616
|
-
}
|
1617
|
-
}
|
1618
|
-
SpreadsheetAddRowBelowButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddRowBelowButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1619
|
-
SpreadsheetAddRowBelowButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetAddRowBelowButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowBelowButton]", usesInheritance: true, ngImport: i0 });
|
1620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddRowBelowButtonDirective, decorators: [{
|
1621
|
-
type: Directive,
|
1622
|
-
args: [{
|
1623
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetAddRowBelowButton]',
|
1624
|
-
standalone: true
|
1625
|
-
}]
|
1626
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1627
|
-
|
1628
|
-
/**
|
1629
|
-
* @hidden
|
1630
|
-
*/
|
1631
|
-
class SpreadsheetAddColumnRightButtonDirective extends SpreadsheetCommandButton {
|
1632
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1633
|
-
super('addColumnRight', button, localization, spreadsheetService, toolsService, {
|
1634
|
-
command: 'AddColumnCommand',
|
1635
|
-
options: { property: 'addColumnRight',
|
1636
|
-
value: 'right'
|
1637
|
-
}
|
1638
|
-
});
|
1639
|
-
}
|
1640
|
-
}
|
1641
|
-
SpreadsheetAddColumnRightButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddColumnRightButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1642
|
-
SpreadsheetAddColumnRightButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetAddColumnRightButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnRightButton]", usesInheritance: true, ngImport: i0 });
|
1643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddColumnRightButtonDirective, decorators: [{
|
1644
|
-
type: Directive,
|
1645
|
-
args: [{
|
1646
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetAddColumnRightButton]',
|
1647
|
-
standalone: true
|
1648
|
-
}]
|
1649
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1650
|
-
|
1651
|
-
/**
|
1652
|
-
* @hidden
|
1653
|
-
*/
|
1654
|
-
class SpreadsheetAddColumnLeftButtonDirective extends SpreadsheetCommandButton {
|
1655
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1656
|
-
super('addColumnLeft', button, localization, spreadsheetService, toolsService, {
|
1657
|
-
command: 'AddColumnCommand',
|
1658
|
-
options: { property: 'addColumnLeft',
|
1659
|
-
value: 'left'
|
1660
|
-
}
|
1661
|
-
});
|
1662
|
-
}
|
1663
|
-
}
|
1664
|
-
SpreadsheetAddColumnLeftButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddColumnLeftButtonDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1665
|
-
SpreadsheetAddColumnLeftButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetAddColumnLeftButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnLeftButton]", usesInheritance: true, ngImport: i0 });
|
1666
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetAddColumnLeftButtonDirective, decorators: [{
|
1667
|
-
type: Directive,
|
1668
|
-
args: [{
|
1669
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetAddColumnLeftButton]',
|
1670
|
-
standalone: true
|
1671
|
-
}]
|
1672
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1673
|
-
|
1674
|
-
/**
|
1675
|
-
* @hidden
|
1676
|
-
*/
|
1677
|
-
class SpreadsheetInsertLinkDirective extends SpreadsheetCommandButton {
|
1678
|
-
constructor(button, localization, spreadsheetService, toolsService, dialogService) {
|
1679
|
-
super('insertLink', button, localization, spreadsheetService, toolsService, {
|
1680
|
-
command: 'HyperlinkCommand'
|
1681
|
-
});
|
1682
|
-
this.dialogService = dialogService;
|
1683
|
-
this.subs.add(spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
1684
|
-
}
|
1685
|
-
ngOnDestroy() {
|
1686
|
-
this.subs.unsubscribe();
|
1687
|
-
}
|
1688
|
-
clickHandler() {
|
1689
|
-
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
1690
|
-
if (sheet) {
|
1691
|
-
this.openDialog();
|
1692
|
-
}
|
1693
|
-
}
|
1694
|
-
/**
|
1695
|
-
* @hidden
|
1696
|
-
*/
|
1697
|
-
openDialog() {
|
1698
|
-
var _a, _b;
|
1699
|
-
const hasLink = isPresent((_a = this.currentRange) === null || _a === void 0 ? void 0 : _a.link());
|
1700
|
-
const dialogSettings = {
|
1701
|
-
appendTo: this.spreadsheetService.dialogContainer,
|
1702
|
-
title: this.localization.get(this.command),
|
1703
|
-
content: InsertLinkDialogComponent,
|
1704
|
-
actions: [{
|
1705
|
-
text: this.localization.get('dialogInsert'),
|
1706
|
-
themeColor: 'primary'
|
1707
|
-
}, {
|
1708
|
-
text: this.localization.get('dialogCancel')
|
1709
|
-
},
|
1710
|
-
'spacer', {
|
1711
|
-
text: this.localization.get('dialogRemoveLink'),
|
1712
|
-
themeColor: 'primary',
|
1713
|
-
fillMode: 'clear',
|
1714
|
-
cssClass: hasLink ? '' : 'k-disabled'
|
1715
|
-
}],
|
1716
|
-
actionsLayout: 'start',
|
1717
|
-
width: 400,
|
1718
|
-
autoFocusedElement: '.k-textbox > .k-input-inner'
|
1719
|
-
};
|
1720
|
-
const dialog = this.dialogService.open(dialogSettings);
|
1721
|
-
const dialogInstance = dialog.dialog.instance;
|
1722
|
-
const dialogContent = dialog.content.instance;
|
1723
|
-
if (hasLink) {
|
1724
|
-
dialogContent.setData({ link: (_b = this.currentRange) === null || _b === void 0 ? void 0 : _b.link() });
|
1725
|
-
}
|
1726
|
-
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
1727
|
-
if (event.text === this.localization.get('dialogCancel')) {
|
1728
|
-
return;
|
1729
|
-
}
|
1730
|
-
let link = null;
|
1731
|
-
if (event.text === this.localization.get('dialogInsert')) {
|
1732
|
-
link = dialogContent.urlLink || null;
|
1733
|
-
}
|
1734
|
-
this.spreadsheetService.spreadsheet.executeCommand({
|
1735
|
-
command: 'HyperlinkCommand',
|
1736
|
-
options: { link }
|
1737
|
-
});
|
1738
|
-
});
|
1739
|
-
}
|
1740
|
-
}
|
1741
|
-
SpreadsheetInsertLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetInsertLinkDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: i1$1.DialogService }], target: i0.ɵɵFactoryTarget.Directive });
|
1742
|
-
SpreadsheetInsertLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetInsertLinkDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetInsertLink]", usesInheritance: true, ngImport: i0 });
|
1743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetInsertLinkDirective, decorators: [{
|
1744
|
-
type: Directive,
|
1745
|
-
args: [{
|
1746
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetInsertLink]',
|
1747
|
-
standalone: true
|
1748
|
-
}]
|
1749
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$1.DialogService }]; } });
|
1750
|
-
|
1751
|
-
/**
|
1752
|
-
* @hidden
|
1753
|
-
*/
|
1754
|
-
class SpreadsheetFormatDirective {
|
1755
|
-
constructor(host, localization, spreadsheetService, toolsService) {
|
1756
|
-
this.host = host;
|
1757
|
-
this.spreadsheetService = spreadsheetService;
|
1758
|
-
this.toolsService = toolsService;
|
1759
|
-
this.data = FORMATS;
|
1760
|
-
this.commandName = 'format';
|
1761
|
-
this.subs = new Subscription();
|
1762
|
-
/**
|
1763
|
-
* @hidden
|
1764
|
-
*/
|
1765
|
-
this.onItemClick = (item) => {
|
1766
|
-
const value = item.value || null;
|
1767
|
-
const options = {
|
1768
|
-
command: 'PropertyChangeCommand', options: { property: this.commandName, value }
|
1769
|
-
};
|
1770
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1771
|
-
};
|
1772
|
-
host.svgIcon = commandSVGIcons[this.commandName];
|
1773
|
-
host.icon = commandIcons[this.commandName];
|
1774
|
-
host.arrowIcon = true;
|
1775
|
-
host.fillMode = 'flat';
|
1776
|
-
host.data = this.data;
|
1777
|
-
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
1778
|
-
host.title = localization.get(this.commandName);
|
1779
|
-
}
|
1780
|
-
ngOnInit() {
|
1781
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[this.commandName] ? 'k-selected' : '')));
|
1782
|
-
}
|
1783
|
-
ngOnDestroy() {
|
1784
|
-
this.subs.unsubscribe();
|
1785
|
-
}
|
1786
|
-
}
|
1787
|
-
SpreadsheetFormatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFormatDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1788
|
-
SpreadsheetFormatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetFormatDirective, isStandalone: true, selector: "[kendoSpreadsheetFormat]", ngImport: i0 });
|
1789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFormatDirective, decorators: [{
|
1790
|
-
type: Directive,
|
1791
|
-
args: [{
|
1792
|
-
selector: '[kendoSpreadsheetFormat]',
|
1793
|
-
standalone: true
|
1794
|
-
}]
|
1795
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1796
|
-
|
1797
|
-
/**
|
1798
|
-
* @hidden
|
1799
|
-
*/
|
1800
|
-
class SpreadsheetTextWrapDirective extends SpreadsheetCommandButton {
|
1801
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
1802
|
-
super('wrap', button, localization, spreadsheetService, toolsService, {
|
1803
|
-
command: 'TextWrapCommand',
|
1804
|
-
options: { property: 'wrap',
|
1805
|
-
value: !button.selected
|
1806
|
-
}
|
1807
|
-
});
|
1808
|
-
}
|
1809
|
-
clickHandler() {
|
1810
|
-
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
1811
|
-
if (sheet) {
|
1812
|
-
const range = sheet.range(sheet.activeCell());
|
1813
|
-
const value = !range.wrap();
|
1814
|
-
const options = {
|
1815
|
-
command: 'TextWrapCommand', options: { property: 'wrap', value }
|
1816
|
-
};
|
1817
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1818
|
-
}
|
1819
|
-
}
|
1820
|
-
}
|
1821
|
-
SpreadsheetTextWrapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetTextWrapDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1822
|
-
SpreadsheetTextWrapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetTextWrapDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetTextWrap]", usesInheritance: true, ngImport: i0 });
|
1823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetTextWrapDirective, decorators: [{
|
1824
|
-
type: Directive,
|
1825
|
-
args: [{
|
1826
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetTextWrap]',
|
1827
|
-
standalone: true
|
1828
|
-
}]
|
1829
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1830
|
-
|
1831
|
-
/**
|
1832
|
-
* @hidden
|
1833
|
-
*/
|
1834
|
-
class SpreadsheetVerticalTextAlignDirective {
|
1835
|
-
constructor(host, localization, spreadsheetService, toolsService) {
|
1836
|
-
this.host = host;
|
1837
|
-
this.spreadsheetService = spreadsheetService;
|
1838
|
-
this.toolsService = toolsService;
|
1839
|
-
this.commandName = 'alignVertical';
|
1840
|
-
this.subs = new Subscription();
|
1841
|
-
host.svgIcon = commandSVGIcons[this.commandName];
|
1842
|
-
host.icon = commandIcons[this.commandName];
|
1843
|
-
host.arrowIcon = true;
|
1844
|
-
host.fillMode = 'flat';
|
1845
|
-
host.data = ALIGNS.flatMap(item => item.commandName === 'verticalAlign' ? [Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })] : []);
|
1846
|
-
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
1847
|
-
host.title = localization.get(this.commandName);
|
1848
|
-
host.textField = 'textKey';
|
1849
|
-
}
|
1850
|
-
ngOnInit() {
|
1851
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[i.commandName] ? 'k-selected' : '')));
|
1852
|
-
}
|
1853
|
-
ngOnDestroy() {
|
1854
|
-
this.subs.unsubscribe();
|
1855
|
-
}
|
1856
|
-
onItemClick(item) {
|
1857
|
-
const value = item.value || null;
|
1858
|
-
const options = {
|
1859
|
-
command: 'PropertyChangeCommand', options: { property: item.commandName, value }
|
1860
|
-
};
|
1861
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1862
|
-
}
|
1863
|
-
}
|
1864
|
-
SpreadsheetVerticalTextAlignDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetVerticalTextAlignDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1865
|
-
SpreadsheetVerticalTextAlignDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetVerticalTextAlignDirective, isStandalone: true, selector: "[kendoSpreadsheetVerticalTextAlign]", ngImport: i0 });
|
1866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetVerticalTextAlignDirective, decorators: [{
|
1867
|
-
type: Directive,
|
1868
|
-
args: [{
|
1869
|
-
selector: '[kendoSpreadsheetVerticalTextAlign]',
|
1870
|
-
standalone: true
|
1871
|
-
}]
|
1872
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1873
|
-
|
1874
|
-
/**
|
1875
|
-
* @hidden
|
1876
|
-
*/
|
1877
|
-
class SpreadsheetHorizontalTextAlignDirective {
|
1878
|
-
constructor(host, localization, spreadsheetService, toolsService) {
|
1879
|
-
this.host = host;
|
1880
|
-
this.spreadsheetService = spreadsheetService;
|
1881
|
-
this.toolsService = toolsService;
|
1882
|
-
this.commandName = 'alignHorizontal';
|
1883
|
-
this.subs = new Subscription();
|
1884
|
-
host.svgIcon = commandSVGIcons[this.commandName];
|
1885
|
-
host.icon = commandIcons[this.commandName];
|
1886
|
-
host.arrowIcon = true;
|
1887
|
-
host.fillMode = 'flat';
|
1888
|
-
host.data = ALIGNS.flatMap(item => item.commandName === 'textAlign' ? [Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })] : []);
|
1889
|
-
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
1890
|
-
host.title = localization.get(this.commandName);
|
1891
|
-
host.textField = 'textKey';
|
1892
|
-
}
|
1893
|
-
ngOnInit() {
|
1894
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[i.commandName] ? 'k-selected' : '')));
|
1895
|
-
}
|
1896
|
-
ngOnDestroy() {
|
1897
|
-
this.subs.unsubscribe();
|
1898
|
-
}
|
1899
|
-
onItemClick(item) {
|
1900
|
-
const value = item.value || null;
|
1901
|
-
const options = {
|
1902
|
-
command: 'PropertyChangeCommand', options: { property: item.commandName, value }
|
1903
|
-
};
|
1904
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
1905
|
-
}
|
1906
|
-
}
|
1907
|
-
SpreadsheetHorizontalTextAlignDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetHorizontalTextAlignDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
1908
|
-
SpreadsheetHorizontalTextAlignDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetHorizontalTextAlignDirective, isStandalone: true, selector: "[kendoSpreadsheetHorizontalTextAlign]", ngImport: i0 });
|
1909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetHorizontalTextAlignDirective, decorators: [{
|
1910
|
-
type: Directive,
|
1911
|
-
args: [{
|
1912
|
-
selector: '[kendoSpreadsheetHorizontalTextAlign]',
|
1913
|
-
standalone: true
|
1914
|
-
}]
|
1915
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
1916
|
-
|
1917
|
-
/**
|
1918
|
-
* @hidden
|
1919
|
-
*/
|
1920
|
-
function outerWidth(element) {
|
1921
|
-
let width = element.offsetWidth;
|
1922
|
-
const style = getComputedStyle(element);
|
1923
|
-
width += parseFloat(style.marginLeft) || 0 + parseFloat(style.marginRight) || 0;
|
1924
|
-
return width;
|
1925
|
-
}
|
1926
|
-
|
1927
|
-
/**
|
1928
|
-
* @hidden
|
1929
|
-
*/
|
1930
|
-
class DropDownListBase {
|
1931
|
-
constructor() {
|
1932
|
-
this.display = 'inline-flex';
|
1933
|
-
this.fillMode = 'flat';
|
1934
|
-
this.valueChange = new EventEmitter();
|
1935
|
-
}
|
1936
|
-
onValueChange(value) {
|
1937
|
-
this.valueChange.emit(value);
|
1938
|
-
}
|
1939
|
-
focus() {
|
1940
|
-
this.dropDownList.focus();
|
1941
|
-
}
|
1942
|
-
}
|
1943
|
-
DropDownListBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropDownListBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1944
|
-
DropDownListBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropDownListBase, selector: "kendo-spreadsheet-dropdownlist-base", inputs: { data: "data", value: "value", title: "title", tabindex: "tabindex" }, outputs: { valueChange: "valueChange" }, host: { properties: { "style.display": "this.display" } }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "dropDownList", first: true, predicate: ["element"], descendants: true, read: DropDownListComponent, static: true }], ngImport: i0 });
|
1945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropDownListBase, decorators: [{
|
1946
|
-
type: Directive,
|
1947
|
-
args: [{
|
1948
|
-
selector: 'kendo-spreadsheet-dropdownlist-base'
|
1949
|
-
}]
|
1950
|
-
}], propDecorators: { display: [{
|
1951
|
-
type: HostBinding,
|
1952
|
-
args: ['style.display']
|
1953
|
-
}], data: [{
|
1954
|
-
type: Input
|
1955
|
-
}], value: [{
|
1956
|
-
type: Input
|
1957
|
-
}], title: [{
|
1958
|
-
type: Input
|
1959
|
-
}], tabindex: [{
|
1960
|
-
type: Input
|
1961
|
-
}], valueChange: [{
|
1962
|
-
type: Output
|
1963
|
-
}], element: [{
|
1964
|
-
type: ViewChild,
|
1965
|
-
args: ['element', { static: true }]
|
1966
|
-
}], dropDownList: [{
|
1967
|
-
type: ViewChild,
|
1968
|
-
args: ['element', { read: DropDownListComponent, static: true }]
|
1969
|
-
}] } });
|
1970
|
-
|
1971
|
-
/**
|
1972
|
-
* @hidden
|
1973
|
-
*/
|
1974
|
-
class FontSizeDropDownListComponent extends DropDownListBase {
|
1975
|
-
}
|
1976
|
-
FontSizeDropDownListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FontSizeDropDownListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
1977
|
-
FontSizeDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FontSizeDropDownListComponent, isStandalone: true, selector: "kendo-spreadsheet-fontsize-dropdownlist", usesInheritance: true, ngImport: i0, template: `
|
1978
|
-
<kendo-dropdownlist
|
1979
|
-
#element
|
1980
|
-
[data]="data"
|
1981
|
-
[(value)]="value"
|
1982
|
-
[attr.title]="title"
|
1983
|
-
[tabindex]="tabindex"
|
1984
|
-
(valueChange)="onValueChange($event)"
|
1985
|
-
[leftRightArrowsNavigation]="false"
|
1986
|
-
[fillMode]="fillMode"></kendo-dropdownlist>
|
1987
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }] });
|
1988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FontSizeDropDownListComponent, decorators: [{
|
1989
|
-
type: Component,
|
1990
|
-
args: [{
|
1991
|
-
selector: 'kendo-spreadsheet-fontsize-dropdownlist',
|
1992
|
-
template: `
|
1993
|
-
<kendo-dropdownlist
|
1994
|
-
#element
|
1995
|
-
[data]="data"
|
1996
|
-
[(value)]="value"
|
1997
|
-
[attr.title]="title"
|
1998
|
-
[tabindex]="tabindex"
|
1999
|
-
(valueChange)="onValueChange($event)"
|
2000
|
-
[leftRightArrowsNavigation]="false"
|
2001
|
-
[fillMode]="fillMode"></kendo-dropdownlist>
|
2002
|
-
`,
|
2003
|
-
standalone: true,
|
2004
|
-
imports: [DropDownListComponent]
|
2005
|
-
}]
|
2006
|
-
}] });
|
2007
|
-
|
2008
|
-
/**
|
2009
|
-
* @hidden
|
2010
|
-
*/
|
2011
|
-
class FontFamilyDropDownListComponent extends DropDownListBase {
|
2012
|
-
}
|
2013
|
-
FontFamilyDropDownListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FontFamilyDropDownListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
2014
|
-
FontFamilyDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FontFamilyDropDownListComponent, isStandalone: true, selector: "kendo-spreadsheet-fontfamily-dropdownlist", usesInheritance: true, ngImport: i0, template: `
|
2015
|
-
<kendo-dropdownlist
|
2016
|
-
#element
|
2017
|
-
[data]="data"
|
2018
|
-
[(value)]="value"
|
2019
|
-
[tabindex]="tabindex"
|
2020
|
-
(valueChange)="onValueChange($event)"
|
2021
|
-
[leftRightArrowsNavigation]="false"
|
2022
|
-
[fillMode]="fillMode"
|
2023
|
-
[attr.title]="title">
|
2024
|
-
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
2025
|
-
<span [ngStyle]="{ 'font-family': dataItem }">
|
2026
|
-
{{ dataItem }}
|
2027
|
-
</span>
|
2028
|
-
</ng-template>
|
2029
|
-
</kendo-dropdownlist>
|
2030
|
-
`, isInline: true, dependencies: [{ kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
2031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FontFamilyDropDownListComponent, decorators: [{
|
2032
|
-
type: Component,
|
2033
|
-
args: [{
|
2034
|
-
selector: 'kendo-spreadsheet-fontfamily-dropdownlist',
|
2035
|
-
template: `
|
2036
|
-
<kendo-dropdownlist
|
2037
|
-
#element
|
2038
|
-
[data]="data"
|
2039
|
-
[(value)]="value"
|
2040
|
-
[tabindex]="tabindex"
|
2041
|
-
(valueChange)="onValueChange($event)"
|
2042
|
-
[leftRightArrowsNavigation]="false"
|
2043
|
-
[fillMode]="fillMode"
|
2044
|
-
[attr.title]="title">
|
2045
|
-
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
2046
|
-
<span [ngStyle]="{ 'font-family': dataItem }">
|
2047
|
-
{{ dataItem }}
|
2048
|
-
</span>
|
2049
|
-
</ng-template>
|
2050
|
-
</kendo-dropdownlist>
|
2051
|
-
`,
|
2052
|
-
standalone: true,
|
2053
|
-
imports: [DropDownListComponent, ItemTemplateDirective, NgStyle]
|
2054
|
-
}]
|
2055
|
-
}] });
|
2056
|
-
|
2057
|
-
/**
|
2058
|
-
* @hidden
|
2059
|
-
*/
|
2060
|
-
class DialogContentComponent extends DialogContentBase {
|
2061
|
-
constructor(dialog) {
|
2062
|
-
super(dialog);
|
2063
|
-
this.dialog = dialog;
|
2064
|
-
this.data = [];
|
2065
|
-
}
|
2066
|
-
setData(args) {
|
2067
|
-
this.data = args.data;
|
2068
|
-
this.value = args.value;
|
2069
|
-
this.tabindex = args.tabindex;
|
2070
|
-
this.componentType = args.componentType;
|
2071
|
-
}
|
2072
|
-
}
|
2073
|
-
DialogContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogContentComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
2074
|
-
DialogContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialogContentComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
2075
|
-
<div
|
2076
|
-
[ngSwitch]="componentType"
|
2077
|
-
class="k-d-flex k-align-items-center k-justify-content-center">
|
2078
|
-
<kendo-spreadsheet-fontfamily-dropdownlist
|
2079
|
-
*ngSwitchCase="'fontFamily'"
|
2080
|
-
[data]="data"
|
2081
|
-
[(value)]="value"
|
2082
|
-
[attr.title]="title"
|
2083
|
-
[tabindex]="tabindex"
|
2084
|
-
[style.width.em]="13"
|
2085
|
-
></kendo-spreadsheet-fontfamily-dropdownlist>
|
2086
|
-
<kendo-spreadsheet-fontsize-dropdownlist
|
2087
|
-
*ngSwitchCase="'fontSize'"
|
2088
|
-
[data]="data"
|
2089
|
-
[(value)]="value"
|
2090
|
-
[attr.title]="title"
|
2091
|
-
[tabindex]="tabindex"
|
2092
|
-
[style.width.em]="13"
|
2093
|
-
></kendo-spreadsheet-fontsize-dropdownlist>
|
2094
|
-
<kendo-colorpicker
|
2095
|
-
*ngSwitchCase="'color'"
|
2096
|
-
[attr.title]="title"
|
2097
|
-
[format]="'hex'"
|
2098
|
-
[(value)]="value"
|
2099
|
-
[tabindex]="tabindex"
|
2100
|
-
[clearButton]="false"
|
2101
|
-
fillMode="flat"
|
2102
|
-
></kendo-colorpicker>
|
2103
|
-
<kendo-colorpicker
|
2104
|
-
*ngSwitchCase="'background'"
|
2105
|
-
[attr.title]="title"
|
2106
|
-
[format]="'hex'"
|
2107
|
-
[(value)]="value"
|
2108
|
-
[tabindex]="tabindex"
|
2109
|
-
[clearButton]="false"
|
2110
|
-
fillMode="flat"
|
2111
|
-
></kendo-colorpicker>
|
2112
|
-
</div>
|
2113
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: FontFamilyDropDownListComponent, selector: "kendo-spreadsheet-fontfamily-dropdownlist" }, { kind: "component", type: FontSizeDropDownListComponent, selector: "kendo-spreadsheet-fontsize-dropdownlist" }, { kind: "component", type: ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "svgIcon", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "clearButtonClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }] });
|
2114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogContentComponent, decorators: [{
|
2115
|
-
type: Component,
|
2116
|
-
args: [{
|
2117
|
-
template: `
|
2118
|
-
<div
|
2119
|
-
[ngSwitch]="componentType"
|
2120
|
-
class="k-d-flex k-align-items-center k-justify-content-center">
|
2121
|
-
<kendo-spreadsheet-fontfamily-dropdownlist
|
2122
|
-
*ngSwitchCase="'fontFamily'"
|
2123
|
-
[data]="data"
|
2124
|
-
[(value)]="value"
|
2125
|
-
[attr.title]="title"
|
2126
|
-
[tabindex]="tabindex"
|
2127
|
-
[style.width.em]="13"
|
2128
|
-
></kendo-spreadsheet-fontfamily-dropdownlist>
|
2129
|
-
<kendo-spreadsheet-fontsize-dropdownlist
|
2130
|
-
*ngSwitchCase="'fontSize'"
|
2131
|
-
[data]="data"
|
2132
|
-
[(value)]="value"
|
2133
|
-
[attr.title]="title"
|
2134
|
-
[tabindex]="tabindex"
|
2135
|
-
[style.width.em]="13"
|
2136
|
-
></kendo-spreadsheet-fontsize-dropdownlist>
|
2137
|
-
<kendo-colorpicker
|
2138
|
-
*ngSwitchCase="'color'"
|
2139
|
-
[attr.title]="title"
|
2140
|
-
[format]="'hex'"
|
2141
|
-
[(value)]="value"
|
2142
|
-
[tabindex]="tabindex"
|
2143
|
-
[clearButton]="false"
|
2144
|
-
fillMode="flat"
|
2145
|
-
></kendo-colorpicker>
|
2146
|
-
<kendo-colorpicker
|
2147
|
-
*ngSwitchCase="'background'"
|
2148
|
-
[attr.title]="title"
|
2149
|
-
[format]="'hex'"
|
2150
|
-
[(value)]="value"
|
2151
|
-
[tabindex]="tabindex"
|
2152
|
-
[clearButton]="false"
|
2153
|
-
fillMode="flat"
|
2154
|
-
></kendo-colorpicker>
|
2155
|
-
</div>
|
2156
|
-
`,
|
2157
|
-
standalone: true,
|
2158
|
-
imports: [NgSwitch, NgSwitchCase, FontFamilyDropDownListComponent, FontSizeDropDownListComponent, ColorPickerComponent]
|
2159
|
-
}]
|
2160
|
-
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
2161
|
-
|
2162
|
-
/**
|
2163
|
-
* @hidden
|
2164
|
-
*/
|
2165
|
-
class SpreadsheetDropDownToolBase extends ToolBarToolComponent {
|
2166
|
-
constructor(command, dialogService, localization, spreadsheetService, toolsService, toolbar) {
|
2167
|
-
super();
|
2168
|
-
this.command = command;
|
2169
|
-
this.dialogService = dialogService;
|
2170
|
-
this.localization = localization;
|
2171
|
-
this.spreadsheetService = spreadsheetService;
|
2172
|
-
this.toolsService = toolsService;
|
2173
|
-
this.toolbar = toolbar;
|
2174
|
-
/**
|
2175
|
-
* Fires when the user updates the value of the drop-down list.
|
2176
|
-
*/
|
2177
|
-
this.valueChange = new EventEmitter();
|
2178
|
-
this.tabindex = -1;
|
2179
|
-
this.svgIcon = commandSVGIcons[this.command];
|
2180
|
-
this.icon = commandIcons[this.command];
|
2181
|
-
this.value = DEFAULT_FONT_VALUES[this.command];
|
2182
|
-
this.data = FONT_DATA[this.command];
|
2183
|
-
this.isBuiltInTool = true;
|
2184
|
-
}
|
2185
|
-
ngOnInit() {
|
2186
|
-
this.value = this.toolsService.toolsState[this.command];
|
2187
|
-
this.subs = this.toolsService.stateChange.subscribe(state => {
|
2188
|
-
this.value = state[this.command];
|
2189
|
-
});
|
2190
|
-
}
|
2191
|
-
ngOnDestroy() {
|
2192
|
-
if (this.subs) {
|
2193
|
-
this.subs.unsubscribe();
|
2194
|
-
}
|
2195
|
-
}
|
2196
|
-
/**
|
2197
|
-
* @hidden
|
2198
|
-
*/
|
2199
|
-
messageFor(key) {
|
2200
|
-
return this.localization.get(key);
|
2201
|
-
}
|
2202
|
-
/**
|
2203
|
-
* @hidden
|
2204
|
-
*/
|
2205
|
-
onValueChange(ev) {
|
2206
|
-
if (isPresent(ev)) {
|
2207
|
-
if (hasObservers(this.valueChange)) {
|
2208
|
-
this.valueChange.emit(ev);
|
2209
|
-
}
|
2210
|
-
const options = {
|
2211
|
-
command: 'PropertyChangeCommand',
|
2212
|
-
options: { property: this.command, value: ev || null }
|
2213
|
-
};
|
2214
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
2215
|
-
}
|
2216
|
-
}
|
2217
|
-
/**
|
2218
|
-
* @hidden
|
2219
|
-
*/
|
2220
|
-
get outerWidth() {
|
2221
|
-
if (this.element) {
|
2222
|
-
return outerWidth(this.element.nativeElement);
|
2223
|
-
}
|
2224
|
-
}
|
2225
|
-
/**
|
2226
|
-
* @hidden
|
2227
|
-
*/
|
2228
|
-
openDialog() {
|
2229
|
-
const dialogSettings = {
|
2230
|
-
appendTo: this.spreadsheetService.dialogContainer,
|
2231
|
-
title: this.messageFor(this.command),
|
2232
|
-
content: DialogContentComponent,
|
2233
|
-
actions: [{
|
2234
|
-
text: this.messageFor('dialogApply'),
|
2235
|
-
themeColor: 'primary'
|
2236
|
-
}, {
|
2237
|
-
text: this.messageFor('dialogCancel')
|
2238
|
-
}],
|
2239
|
-
actionsLayout: 'start',
|
2240
|
-
width: 400,
|
2241
|
-
autoFocusedElement: '.k-picker'
|
2242
|
-
};
|
2243
|
-
this.toolbar.toggle(false);
|
2244
|
-
const dialog = this.dialogService.open(dialogSettings);
|
2245
|
-
const dialogInstance = dialog.dialog.instance;
|
2246
|
-
const dialogContent = dialog.content.instance;
|
2247
|
-
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
2248
|
-
if (event.text === this.messageFor('dialogApply')) {
|
2249
|
-
const options = {
|
2250
|
-
command: 'PropertyChangeCommand',
|
2251
|
-
options: { property: this.command, value: dialogContent.value || null }
|
2252
|
-
};
|
2253
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
2254
|
-
}
|
2255
|
-
this.toolbar.toggle();
|
2256
|
-
});
|
2257
|
-
dialogInstance.close.pipe(take(1)).subscribe(() => {
|
2258
|
-
this.toolbar.toggle();
|
2259
|
-
});
|
2260
|
-
dialogContent.setData({
|
2261
|
-
data: this.data,
|
2262
|
-
value: this.value,
|
2263
|
-
tabindex: this.tabindex,
|
2264
|
-
componentType: this.command,
|
2265
|
-
title: this.localization.get(this.command)
|
2266
|
-
});
|
2267
|
-
}
|
2268
|
-
/**
|
2269
|
-
* @hidden
|
2270
|
-
*/
|
2271
|
-
focus(e) {
|
2272
|
-
this.tabindex = 0;
|
2273
|
-
if (e instanceof PointerEvent) {
|
2274
|
-
return;
|
2275
|
-
}
|
2276
|
-
if (this.overflows) {
|
2277
|
-
this.popupButton.nativeElement.focus();
|
2278
|
-
}
|
2279
|
-
else {
|
2280
|
-
this.dropDownListRef.focus();
|
2281
|
-
}
|
2282
|
-
}
|
2283
|
-
/**
|
2284
|
-
* @hidden
|
2285
|
-
*/
|
2286
|
-
canFocus() {
|
2287
|
-
return true;
|
2288
|
-
}
|
2289
|
-
/**
|
2290
|
-
* @hidden
|
2291
|
-
*/
|
2292
|
-
handleKey() {
|
2293
|
-
this.tabindex = -1;
|
2294
|
-
return false;
|
2295
|
-
}
|
2296
|
-
}
|
2297
|
-
SpreadsheetDropDownToolBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDropDownToolBase, deps: [{ token: MY_TOKEN }, { token: i1$1.DialogService }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: i1$2.ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2298
|
-
SpreadsheetDropDownToolBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetDropDownToolBase, selector: "ng-component", outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "element", first: true, predicate: ["element"], descendants: true, read: ElementRef }, { propertyName: "dropDownListRef", first: true, predicate: ["element"], descendants: true }, { propertyName: "popupButton", first: true, predicate: ["popupButton"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
2299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDropDownToolBase, decorators: [{
|
2300
|
-
type: Component,
|
2301
|
-
args: [{
|
2302
|
-
template: ``
|
2303
|
-
}]
|
2304
|
-
}], ctorParameters: function () {
|
2305
|
-
return [{ type: undefined, decorators: [{
|
2306
|
-
type: Inject,
|
2307
|
-
args: [MY_TOKEN]
|
2308
|
-
}] }, { type: i1$1.DialogService }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$2.ToolBarComponent }];
|
2309
|
-
}, propDecorators: { toolbarTemplate: [{
|
2310
|
-
type: ViewChild,
|
2311
|
-
args: ['toolbarTemplate', { static: true }]
|
2312
|
-
}], popupTemplate: [{
|
2313
|
-
type: ViewChild,
|
2314
|
-
args: ['popupTemplate', { static: true }]
|
2315
|
-
}], element: [{
|
2316
|
-
type: ViewChild,
|
2317
|
-
args: ['element', { read: ElementRef }]
|
2318
|
-
}], dropDownListRef: [{
|
2319
|
-
type: ViewChild,
|
2320
|
-
args: ['element']
|
2321
|
-
}], popupButton: [{
|
2322
|
-
type: ViewChild,
|
2323
|
-
args: ['popupButton', { read: ElementRef }]
|
2324
|
-
}], valueChange: [{
|
2325
|
-
type: Output
|
2326
|
-
}] } });
|
2327
|
-
|
2328
|
-
/**
|
2329
|
-
* A component which changes the background color of the text ([more information](ToDo).
|
2330
|
-
* @hidden
|
2331
|
-
*/
|
2332
|
-
class SpreadsheetBackColorComponent extends SpreadsheetDropDownToolBase {
|
2333
|
-
constructor(dialogService, localization, spreadsheetService, toolsService, toolbar) {
|
2334
|
-
super('background', dialogService, localization, spreadsheetService, toolsService, toolbar);
|
2335
|
-
}
|
2336
|
-
}
|
2337
|
-
SpreadsheetBackColorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetBackColorComponent, deps: [{ token: i1$1.DialogService }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2338
|
-
SpreadsheetBackColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetBackColorComponent, isStandalone: true, selector: "kendo-spreadsheet-backcolor-tool", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetBackColorComponent) }], usesInheritance: true, ngImport: i0, template: `
|
2339
|
-
<ng-template #toolbarTemplate>
|
2340
|
-
<kendo-colorpicker
|
2341
|
-
#element
|
2342
|
-
[attr.title]="messageFor(command)"
|
2343
|
-
[format]="'hex'"
|
2344
|
-
[(value)]="value"
|
2345
|
-
[tabindex]="tabindex"
|
2346
|
-
(valueChange)="onValueChange($event)"
|
2347
|
-
[clearButton]="false"
|
2348
|
-
fillMode="flat"
|
2349
|
-
[icon]="icon"
|
2350
|
-
[preview]="true"
|
2351
|
-
[svgIcon]="svgIcon"></kendo-colorpicker>
|
2352
|
-
</ng-template>
|
2353
|
-
<ng-template #popupTemplate>
|
2354
|
-
<div #popupButton
|
2355
|
-
[tabindex]="tabindex"
|
2356
|
-
role="menuitem"
|
2357
|
-
class="k-item k-menu-item"
|
2358
|
-
(click)="openDialog()">
|
2359
|
-
<span
|
2360
|
-
class="k-link k-menu-link">
|
2361
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2362
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2363
|
-
</span>
|
2364
|
-
</div>
|
2365
|
-
</ng-template>
|
2366
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "svgIcon", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "clearButtonClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetBackColorComponent, decorators: [{
|
2368
|
-
type: Component,
|
2369
|
-
args: [{
|
2370
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetBackColorComponent) }],
|
2371
|
-
selector: 'kendo-spreadsheet-backcolor-tool',
|
2372
|
-
template: `
|
2373
|
-
<ng-template #toolbarTemplate>
|
2374
|
-
<kendo-colorpicker
|
2375
|
-
#element
|
2376
|
-
[attr.title]="messageFor(command)"
|
2377
|
-
[format]="'hex'"
|
2378
|
-
[(value)]="value"
|
2379
|
-
[tabindex]="tabindex"
|
2380
|
-
(valueChange)="onValueChange($event)"
|
2381
|
-
[clearButton]="false"
|
2382
|
-
fillMode="flat"
|
2383
|
-
[icon]="icon"
|
2384
|
-
[preview]="true"
|
2385
|
-
[svgIcon]="svgIcon"></kendo-colorpicker>
|
2386
|
-
</ng-template>
|
2387
|
-
<ng-template #popupTemplate>
|
2388
|
-
<div #popupButton
|
2389
|
-
[tabindex]="tabindex"
|
2390
|
-
role="menuitem"
|
2391
|
-
class="k-item k-menu-item"
|
2392
|
-
(click)="openDialog()">
|
2393
|
-
<span
|
2394
|
-
class="k-link k-menu-link">
|
2395
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2396
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2397
|
-
</span>
|
2398
|
-
</div>
|
2399
|
-
</ng-template>
|
2400
|
-
`,
|
2401
|
-
standalone: true,
|
2402
|
-
imports: [ColorPickerComponent, IconWrapperComponent, NgIf]
|
2403
|
-
}]
|
2404
|
-
}], ctorParameters: function () {
|
2405
|
-
return [{ type: i1$1.DialogService }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$2.ToolBarComponent, decorators: [{
|
2406
|
-
type: Inject,
|
2407
|
-
args: [ToolBarComponent]
|
2408
|
-
}] }];
|
2409
|
-
} });
|
2410
|
-
|
2411
|
-
/**
|
2412
|
-
* A component which changes the color of the text ([more information](ToDo).
|
2413
|
-
* @hidden
|
2414
|
-
*/
|
2415
|
-
class SpreadsheetForeColorComponent extends SpreadsheetDropDownToolBase {
|
2416
|
-
constructor(dialogService, localization, spreadsheetService, toolsService, toolbar) {
|
2417
|
-
super('color', dialogService, localization, spreadsheetService, toolsService, toolbar);
|
2418
|
-
}
|
2419
|
-
}
|
2420
|
-
SpreadsheetForeColorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetForeColorComponent, deps: [{ token: i1$1.DialogService }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2421
|
-
SpreadsheetForeColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetForeColorComponent, isStandalone: true, selector: "kendo-spreadsheet-forecolor-tool", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetForeColorComponent) }], usesInheritance: true, ngImport: i0, template: `
|
2422
|
-
<ng-template #toolbarTemplate>
|
2423
|
-
<kendo-colorpicker
|
2424
|
-
#element
|
2425
|
-
[attr.title]="messageFor(command)"
|
2426
|
-
[format]="'hex'"
|
2427
|
-
[(value)]="value"
|
2428
|
-
[tabindex]="tabindex"
|
2429
|
-
(valueChange)="onValueChange($event)"
|
2430
|
-
[clearButton]="false"
|
2431
|
-
fillMode="flat"
|
2432
|
-
[icon]="icon"
|
2433
|
-
[svgIcon]="svgIcon"
|
2434
|
-
[preview]="true"></kendo-colorpicker>
|
2435
|
-
</ng-template>
|
2436
|
-
<ng-template #popupTemplate>
|
2437
|
-
<div #popupButton
|
2438
|
-
[tabindex]="tabindex"
|
2439
|
-
role="menuitem"
|
2440
|
-
class="k-item k-menu-item"
|
2441
|
-
(click)="openDialog()">
|
2442
|
-
<span
|
2443
|
-
class="k-link k-menu-link">
|
2444
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2445
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2446
|
-
</span>
|
2447
|
-
</div>
|
2448
|
-
</ng-template>
|
2449
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "svgIcon", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "clearButtonClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetForeColorComponent, decorators: [{
|
2451
|
-
type: Component,
|
2452
|
-
args: [{
|
2453
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetForeColorComponent) }],
|
2454
|
-
selector: 'kendo-spreadsheet-forecolor-tool',
|
2455
|
-
template: `
|
2456
|
-
<ng-template #toolbarTemplate>
|
2457
|
-
<kendo-colorpicker
|
2458
|
-
#element
|
2459
|
-
[attr.title]="messageFor(command)"
|
2460
|
-
[format]="'hex'"
|
2461
|
-
[(value)]="value"
|
2462
|
-
[tabindex]="tabindex"
|
2463
|
-
(valueChange)="onValueChange($event)"
|
2464
|
-
[clearButton]="false"
|
2465
|
-
fillMode="flat"
|
2466
|
-
[icon]="icon"
|
2467
|
-
[svgIcon]="svgIcon"
|
2468
|
-
[preview]="true"></kendo-colorpicker>
|
2469
|
-
</ng-template>
|
2470
|
-
<ng-template #popupTemplate>
|
2471
|
-
<div #popupButton
|
2472
|
-
[tabindex]="tabindex"
|
2473
|
-
role="menuitem"
|
2474
|
-
class="k-item k-menu-item"
|
2475
|
-
(click)="openDialog()">
|
2476
|
-
<span
|
2477
|
-
class="k-link k-menu-link">
|
2478
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2479
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2480
|
-
</span>
|
2481
|
-
</div>
|
2482
|
-
</ng-template>
|
2483
|
-
`,
|
2484
|
-
standalone: true,
|
2485
|
-
imports: [ColorPickerComponent, IconWrapperComponent, NgIf]
|
2486
|
-
}]
|
2487
|
-
}], ctorParameters: function () {
|
2488
|
-
return [{ type: i1$1.DialogService }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$2.ToolBarComponent, decorators: [{
|
2489
|
-
type: Inject,
|
2490
|
-
args: [ToolBarComponent]
|
2491
|
-
}] }];
|
2492
|
-
} });
|
2493
|
-
|
2494
|
-
/**
|
2495
|
-
* @hidden
|
2496
|
-
*/
|
2497
|
-
class SpreadsheetUnderlineDirective extends SpreadsheetCommandButton {
|
2498
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2499
|
-
super('underline', button, localization, spreadsheetService, toolsService, {
|
2500
|
-
command: 'PropertyChangeCommand',
|
2501
|
-
options: { property: 'underline',
|
2502
|
-
value: !button.selected
|
2503
|
-
}
|
2504
|
-
});
|
2505
|
-
}
|
2506
|
-
}
|
2507
|
-
SpreadsheetUnderlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetUnderlineDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2508
|
-
SpreadsheetUnderlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetUnderlineDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetUnderline]", usesInheritance: true, ngImport: i0 });
|
2509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetUnderlineDirective, decorators: [{
|
2510
|
-
type: Directive,
|
2511
|
-
args: [{
|
2512
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetUnderline]',
|
2513
|
-
standalone: true
|
2514
|
-
}]
|
2515
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2516
|
-
|
2517
|
-
/**
|
2518
|
-
* @hidden
|
2519
|
-
*/
|
2520
|
-
class SpreadsheetItalicDirective extends SpreadsheetCommandButton {
|
2521
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2522
|
-
super('italic', button, localization, spreadsheetService, toolsService, {
|
2523
|
-
command: 'PropertyChangeCommand',
|
2524
|
-
options: { property: 'italic',
|
2525
|
-
value: !button.selected
|
2526
|
-
}
|
2527
|
-
});
|
2528
|
-
}
|
2529
|
-
}
|
2530
|
-
SpreadsheetItalicDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetItalicDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2531
|
-
SpreadsheetItalicDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetItalicDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetItalic]", usesInheritance: true, ngImport: i0 });
|
2532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetItalicDirective, decorators: [{
|
2533
|
-
type: Directive,
|
2534
|
-
args: [{
|
2535
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetItalic]',
|
2536
|
-
standalone: true
|
2537
|
-
}]
|
2538
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2539
|
-
|
2540
|
-
/**
|
2541
|
-
* @hidden
|
2542
|
-
*/
|
2543
|
-
class SpreadsheetBoldDirective extends SpreadsheetCommandButton {
|
2544
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2545
|
-
super('bold', button, localization, spreadsheetService, toolsService, {
|
2546
|
-
command: 'PropertyChangeCommand',
|
2547
|
-
options: { property: 'bold',
|
2548
|
-
value: !button.selected
|
2549
|
-
}
|
2550
|
-
});
|
2551
|
-
}
|
2552
|
-
}
|
2553
|
-
SpreadsheetBoldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetBoldDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2554
|
-
SpreadsheetBoldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetBoldDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetBold]", usesInheritance: true, ngImport: i0 });
|
2555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetBoldDirective, decorators: [{
|
2556
|
-
type: Directive,
|
2557
|
-
args: [{
|
2558
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetBold]',
|
2559
|
-
standalone: true
|
2560
|
-
}]
|
2561
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2562
|
-
|
2563
|
-
/**
|
2564
|
-
* @hidden
|
2565
|
-
*/
|
2566
|
-
class SpreadsheetDecreaseFontSizeDirective extends SpreadsheetCommandButton {
|
2567
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2568
|
-
super('decreaseFontSize', button, localization, spreadsheetService, toolsService, {
|
2569
|
-
command: 'PropertyChangeCommand',
|
2570
|
-
options: { property: 'fontSize' }
|
2571
|
-
});
|
2572
|
-
this.value = DEFAULT_FONT_VALUES.fontSize;
|
2573
|
-
}
|
2574
|
-
clickHandler() {
|
2575
|
-
const newValue = this.value - 1;
|
2576
|
-
const options = {
|
2577
|
-
command: 'PropertyChangeCommand',
|
2578
|
-
options: { property: 'fontSize', value: newValue || null }
|
2579
|
-
};
|
2580
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
2581
|
-
}
|
2582
|
-
ngAfterViewInit() {
|
2583
|
-
this.value = this.toolsService.toolsState['fontSize'];
|
2584
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => {
|
2585
|
-
this.value = state['fontSize'];
|
2586
|
-
}));
|
2587
|
-
}
|
2588
|
-
}
|
2589
|
-
SpreadsheetDecreaseFontSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDecreaseFontSizeDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2590
|
-
SpreadsheetDecreaseFontSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetDecreaseFontSizeDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]", usesInheritance: true, ngImport: i0 });
|
2591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetDecreaseFontSizeDirective, decorators: [{
|
2592
|
-
type: Directive,
|
2593
|
-
args: [{
|
2594
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]',
|
2595
|
-
standalone: true
|
2596
|
-
}]
|
2597
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2598
|
-
|
2599
|
-
/**
|
2600
|
-
* @hidden
|
2601
|
-
*/
|
2602
|
-
class SpreadsheetIncreaseFontSizeDirective extends SpreadsheetCommandButton {
|
2603
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2604
|
-
super('increaseFontSize', button, localization, spreadsheetService, toolsService, {
|
2605
|
-
command: 'PropertyChangeCommand',
|
2606
|
-
options: { property: 'fontSize' }
|
2607
|
-
});
|
2608
|
-
this.value = DEFAULT_FONT_VALUES.fontSize;
|
2609
|
-
}
|
2610
|
-
clickHandler() {
|
2611
|
-
const newValue = this.value + 1;
|
2612
|
-
const options = {
|
2613
|
-
command: 'PropertyChangeCommand',
|
2614
|
-
options: { property: 'fontSize', value: newValue || null }
|
2615
|
-
};
|
2616
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
2617
|
-
}
|
2618
|
-
ngAfterViewInit() {
|
2619
|
-
this.value = this.toolsService.toolsState['fontSize'];
|
2620
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => {
|
2621
|
-
this.value = state['fontSize'];
|
2622
|
-
}));
|
2623
|
-
}
|
2624
|
-
}
|
2625
|
-
SpreadsheetIncreaseFontSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetIncreaseFontSizeDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2626
|
-
SpreadsheetIncreaseFontSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetIncreaseFontSizeDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]", usesInheritance: true, ngImport: i0 });
|
2627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetIncreaseFontSizeDirective, decorators: [{
|
2628
|
-
type: Directive,
|
2629
|
-
args: [{
|
2630
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]',
|
2631
|
-
standalone: true
|
2632
|
-
}]
|
2633
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2634
|
-
|
2635
|
-
/**
|
2636
|
-
* A component which configures an existing `DropDownListComponent` as a Spreadsheet tool
|
2637
|
-
* ([see example](ToDo).
|
2638
|
-
* The component associates a `kendo-toolbar-dropdownlist` with a Spreadsheet command that changes the font size of a content block and
|
2639
|
-
* automatically defines the options of the drop-down list and sets its values ([see example](ToDo).
|
2640
|
-
*
|
2641
|
-
* @hidden
|
2642
|
-
*/
|
2643
|
-
class SpreadsheetFontSizeComponent extends SpreadsheetDropDownToolBase {
|
2644
|
-
constructor(dialogService, localization, spreadsheetService, toolsService, toolbar) {
|
2645
|
-
super('fontSize', dialogService, localization, spreadsheetService, toolsService, toolbar);
|
2646
|
-
}
|
2647
|
-
}
|
2648
|
-
SpreadsheetFontSizeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFontSizeComponent, deps: [{ token: i1$1.DialogService }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2649
|
-
SpreadsheetFontSizeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetFontSizeComponent, isStandalone: true, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontSize]", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetFontSizeComponent) }], usesInheritance: true, ngImport: i0, template: `
|
2650
|
-
<ng-template #toolbarTemplate>
|
2651
|
-
<kendo-spreadsheet-fontsize-dropdownlist
|
2652
|
-
#element
|
2653
|
-
[data]="data"
|
2654
|
-
[(value)]="value"
|
2655
|
-
[title]="messageFor(command)"
|
2656
|
-
[tabindex]="tabindex"
|
2657
|
-
(valueChange)="onValueChange($event)"></kendo-spreadsheet-fontsize-dropdownlist>
|
2658
|
-
</ng-template>
|
2659
|
-
<ng-template #popupTemplate>
|
2660
|
-
<div #popupButton
|
2661
|
-
[tabindex]="tabindex"
|
2662
|
-
role="menuitem"
|
2663
|
-
class="k-item k-menu-item"
|
2664
|
-
(click)="openDialog()">
|
2665
|
-
<span
|
2666
|
-
class="k-link k-menu-link">
|
2667
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2668
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2669
|
-
</span>
|
2670
|
-
</div>
|
2671
|
-
</ng-template>
|
2672
|
-
`, isInline: true, dependencies: [{ kind: "component", type: FontSizeDropDownListComponent, selector: "kendo-spreadsheet-fontsize-dropdownlist" }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFontSizeComponent, decorators: [{
|
2674
|
-
type: Component,
|
2675
|
-
args: [{
|
2676
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetFontSizeComponent) }],
|
2677
|
-
selector: 'kendo-toolbar-dropdownlist[kendoSpreadsheetFontSize]',
|
2678
|
-
template: `
|
2679
|
-
<ng-template #toolbarTemplate>
|
2680
|
-
<kendo-spreadsheet-fontsize-dropdownlist
|
2681
|
-
#element
|
2682
|
-
[data]="data"
|
2683
|
-
[(value)]="value"
|
2684
|
-
[title]="messageFor(command)"
|
2685
|
-
[tabindex]="tabindex"
|
2686
|
-
(valueChange)="onValueChange($event)"></kendo-spreadsheet-fontsize-dropdownlist>
|
2687
|
-
</ng-template>
|
2688
|
-
<ng-template #popupTemplate>
|
2689
|
-
<div #popupButton
|
2690
|
-
[tabindex]="tabindex"
|
2691
|
-
role="menuitem"
|
2692
|
-
class="k-item k-menu-item"
|
2693
|
-
(click)="openDialog()">
|
2694
|
-
<span
|
2695
|
-
class="k-link k-menu-link">
|
2696
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2697
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2698
|
-
</span>
|
2699
|
-
</div>
|
2700
|
-
</ng-template>
|
2701
|
-
`,
|
2702
|
-
standalone: true,
|
2703
|
-
imports: [FontSizeDropDownListComponent, IconWrapperComponent, NgIf]
|
2704
|
-
}]
|
2705
|
-
}], ctorParameters: function () {
|
2706
|
-
return [{ type: i1$1.DialogService }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$2.ToolBarComponent, decorators: [{
|
2707
|
-
type: Inject,
|
2708
|
-
args: [ToolBarComponent]
|
2709
|
-
}] }];
|
2710
|
-
} });
|
2711
|
-
|
2712
|
-
/**
|
2713
|
-
* A component which configures an existing `DropDownListComponent` as a Spreadsheet tool
|
2714
|
-
* ([see example](ToDo).
|
2715
|
-
* The component associates a `kendo-toolbar-dropdownlist` with a Spreadsheet command that changes the font family of a content block and
|
2716
|
-
* automatically defines the options of the drop-down list and sets its values ([see example](ToDo).
|
2717
|
-
*
|
2718
|
-
* @hidden
|
2719
|
-
*/
|
2720
|
-
class SpreadsheetFontFamilyComponent extends SpreadsheetDropDownToolBase {
|
2721
|
-
constructor(dialogService, localization, spreadsheetService, toolsService, toolbar) {
|
2722
|
-
super('fontFamily', dialogService, localization, spreadsheetService, toolsService, toolbar);
|
2723
|
-
}
|
2724
|
-
}
|
2725
|
-
SpreadsheetFontFamilyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFontFamilyComponent, deps: [{ token: i1$1.DialogService }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2726
|
-
SpreadsheetFontFamilyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetFontFamilyComponent, isStandalone: true, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontFamily]", providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetFontFamilyComponent) }], usesInheritance: true, ngImport: i0, template: `
|
2727
|
-
<ng-template #toolbarTemplate>
|
2728
|
-
<kendo-spreadsheet-fontfamily-dropdownlist
|
2729
|
-
#element
|
2730
|
-
[data]="data"
|
2731
|
-
[(value)]="value"
|
2732
|
-
[title]="messageFor(command)"
|
2733
|
-
[tabindex]="tabindex"
|
2734
|
-
(valueChange)="onValueChange($event)"></kendo-spreadsheet-fontfamily-dropdownlist>
|
2735
|
-
</ng-template>
|
2736
|
-
<ng-template #popupTemplate>
|
2737
|
-
<div #popupButton
|
2738
|
-
[tabindex]="tabindex"
|
2739
|
-
role="menuitem"
|
2740
|
-
class="k-item k-menu-item"
|
2741
|
-
(click)="openDialog()">
|
2742
|
-
<span
|
2743
|
-
class="k-link k-menu-link">
|
2744
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2745
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2746
|
-
</span>
|
2747
|
-
</div>
|
2748
|
-
</ng-template>
|
2749
|
-
`, isInline: true, dependencies: [{ kind: "component", type: FontFamilyDropDownListComponent, selector: "kendo-spreadsheet-fontfamily-dropdownlist" }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetFontFamilyComponent, decorators: [{
|
2751
|
-
type: Component,
|
2752
|
-
args: [{
|
2753
|
-
providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => SpreadsheetFontFamilyComponent) }],
|
2754
|
-
selector: 'kendo-toolbar-dropdownlist[kendoSpreadsheetFontFamily]',
|
2755
|
-
template: `
|
2756
|
-
<ng-template #toolbarTemplate>
|
2757
|
-
<kendo-spreadsheet-fontfamily-dropdownlist
|
2758
|
-
#element
|
2759
|
-
[data]="data"
|
2760
|
-
[(value)]="value"
|
2761
|
-
[title]="messageFor(command)"
|
2762
|
-
[tabindex]="tabindex"
|
2763
|
-
(valueChange)="onValueChange($event)"></kendo-spreadsheet-fontfamily-dropdownlist>
|
2764
|
-
</ng-template>
|
2765
|
-
<ng-template #popupTemplate>
|
2766
|
-
<div #popupButton
|
2767
|
-
[tabindex]="tabindex"
|
2768
|
-
role="menuitem"
|
2769
|
-
class="k-item k-menu-item"
|
2770
|
-
(click)="openDialog()">
|
2771
|
-
<span
|
2772
|
-
class="k-link k-menu-link">
|
2773
|
-
<kendo-icon-wrapper [name]="icon" [svgIcon]="svgIcon"></kendo-icon-wrapper>
|
2774
|
-
<span *ngIf="messageFor(command)" class="k-menu-link-text">{{messageFor(command)}}</span>
|
2775
|
-
</span>
|
2776
|
-
</div>
|
2777
|
-
</ng-template>
|
2778
|
-
`,
|
2779
|
-
standalone: true,
|
2780
|
-
imports: [FontFamilyDropDownListComponent, IconWrapperComponent, NgIf]
|
2781
|
-
}]
|
2782
|
-
}], ctorParameters: function () {
|
2783
|
-
return [{ type: i1$1.DialogService }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: i1$2.ToolBarComponent, decorators: [{
|
2784
|
-
type: Inject,
|
2785
|
-
args: [ToolBarComponent]
|
2786
|
-
}] }];
|
2787
|
-
} });
|
2788
|
-
|
2789
|
-
/**
|
2790
|
-
* @hidden
|
2791
|
-
*/
|
2792
|
-
class SpreadsheetRedoDirective extends SpreadsheetCommandButton {
|
2793
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2794
|
-
super('redo', button, localization, spreadsheetService, toolsService, {
|
2795
|
-
options: { property: 'redo' }
|
2796
|
-
});
|
2797
|
-
}
|
2798
|
-
clickHandler() {
|
2799
|
-
this.spreadsheetService.spreadsheet.workbook.undoRedoStack['redo']();
|
2800
|
-
}
|
2801
|
-
}
|
2802
|
-
SpreadsheetRedoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetRedoDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2803
|
-
SpreadsheetRedoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetRedoDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetRedo]", usesInheritance: true, ngImport: i0 });
|
2804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetRedoDirective, decorators: [{
|
2805
|
-
type: Directive,
|
2806
|
-
args: [{
|
2807
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetRedo]',
|
2808
|
-
standalone: true
|
2809
|
-
}]
|
2810
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2811
|
-
|
2812
|
-
/**
|
2813
|
-
* @hidden
|
2814
|
-
*/
|
2815
|
-
class SpreadsheetUndoDirective extends SpreadsheetCommandButton {
|
2816
|
-
constructor(button, localization, spreadsheetService, toolsService) {
|
2817
|
-
super('undo', button, localization, spreadsheetService, toolsService, {
|
2818
|
-
options: { property: 'undo' }
|
2819
|
-
});
|
2820
|
-
}
|
2821
|
-
clickHandler() {
|
2822
|
-
this.spreadsheetService.spreadsheet.workbook.undoRedoStack['undo']();
|
2823
|
-
}
|
2824
|
-
}
|
2825
|
-
SpreadsheetUndoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetUndoDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
2826
|
-
SpreadsheetUndoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetUndoDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoSpreadsheetUndo]", usesInheritance: true, ngImport: i0 });
|
2827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetUndoDirective, decorators: [{
|
2828
|
-
type: Directive,
|
2829
|
-
args: [{
|
2830
|
-
selector: 'kendo-toolbar-button[kendoSpreadsheetUndo]',
|
2831
|
-
standalone: true
|
2832
|
-
}]
|
2833
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2834
|
-
|
2835
|
-
/**
|
2836
|
-
* @hidden
|
2837
|
-
*/
|
2838
|
-
class SpreadsheetSaveFileDirective {
|
2839
|
-
constructor(button, localization, spreadsheetService) {
|
2840
|
-
this.button = button;
|
2841
|
-
this.localization = localization;
|
2842
|
-
this.spreadsheetService = spreadsheetService;
|
2843
|
-
this.subs = new Subscription();
|
2844
|
-
}
|
2845
|
-
ngOnInit() {
|
2846
|
-
this.button.title = this.localization.get('saveFile');
|
2847
|
-
this.button.icon = commandIcons['download'];
|
2848
|
-
this.button.svgIcon = commandSVGIcons['download'];
|
2849
|
-
this.button.fillMode = 'flat';
|
2850
|
-
this.subs.add(this.button.click.subscribe(() => {
|
2851
|
-
const spreadsheet = this.spreadsheetService.spreadsheet;
|
2852
|
-
if (spreadsheet) {
|
2853
|
-
spreadsheet.saveAsExcel(Object.assign(Object.assign({}, spreadsheet.options.excel), { saveAs,
|
2854
|
-
Workbook }));
|
2855
|
-
}
|
2856
|
-
}));
|
2857
|
-
}
|
2858
|
-
ngOnDestroy() {
|
2859
|
-
this.subs.unsubscribe();
|
2860
|
-
}
|
2861
|
-
}
|
2862
|
-
SpreadsheetSaveFileDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetSaveFileDirective, deps: [{ token: i1$2.ToolBarButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
2863
|
-
SpreadsheetSaveFileDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetSaveFileDirective, isStandalone: true, selector: "[kendoSpreadsheetSaveFile]", ngImport: i0 });
|
2864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetSaveFileDirective, decorators: [{
|
2865
|
-
type: Directive,
|
2866
|
-
args: [{
|
2867
|
-
selector: '[kendoSpreadsheetSaveFile]',
|
2868
|
-
standalone: true
|
2869
|
-
}]
|
2870
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }]; } });
|
2871
|
-
|
2872
|
-
/**
|
2873
|
-
* @hidden
|
2874
|
-
*/
|
2875
|
-
class SpreadsheetLoadFileComponent extends ToolBarToolComponent {
|
2876
|
-
constructor(localization, spreadsheetService, toolbar) {
|
2877
|
-
super();
|
2878
|
-
this.localization = localization;
|
2879
|
-
this.spreadsheetService = spreadsheetService;
|
2880
|
-
this.toolbar = toolbar;
|
2881
|
-
this.icon = commandIcons['folderOpen'];
|
2882
|
-
this.svgIcon = commandSVGIcons['folderOpen'];
|
2883
|
-
this.tabindex = -1;
|
2884
|
-
this.onFileSelect = (e) => {
|
2885
|
-
const file = e.target.files[0];
|
2886
|
-
if (file) {
|
2887
|
-
this.spreadsheetService.spreadsheet.executeCommand({ command: 'OpenCommand', options: { file } });
|
2888
|
-
e.target.value = null;
|
2889
|
-
}
|
2890
|
-
};
|
2891
|
-
this.isBuiltInTool = true;
|
2892
|
-
}
|
2893
|
-
/**
|
2894
|
-
* @hidden
|
2895
|
-
*/
|
2896
|
-
messageFor(key) {
|
2897
|
-
return this.localization.get(key);
|
2898
|
-
}
|
2899
|
-
/**
|
2900
|
-
* @hidden
|
2901
|
-
*/
|
2902
|
-
canFocus() {
|
2903
|
-
return true;
|
2904
|
-
}
|
2905
|
-
/**
|
2906
|
-
* @hidden
|
2907
|
-
*/
|
2908
|
-
focus() {
|
2909
|
-
this.tabindex = 0;
|
2910
|
-
if (this.overflows) {
|
2911
|
-
this.overflowButtonElement.nativeElement.focus();
|
2912
|
-
}
|
2913
|
-
else {
|
2914
|
-
this.button.focus();
|
2915
|
-
}
|
2916
|
-
}
|
2917
|
-
/**
|
2918
|
-
* @hidden
|
2919
|
-
*/
|
2920
|
-
handleKey() {
|
2921
|
-
this.tabindex = -1;
|
2922
|
-
return false;
|
2923
|
-
}
|
2924
|
-
}
|
2925
|
-
SpreadsheetLoadFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetLoadFileComponent, deps: [{ token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
2926
|
-
SpreadsheetLoadFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetLoadFileComponent, isStandalone: true, selector: "kendo-spreadsheet-load-file-tool", providers: [
|
2927
|
-
{
|
2928
|
-
provide: ToolBarToolComponent,
|
2929
|
-
useExisting: forwardRef(() => SpreadsheetLoadFileComponent),
|
2930
|
-
},
|
2931
|
-
], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "button", first: true, predicate: ["button"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
2932
|
-
<ng-template #toolbarTemplate>
|
2933
|
-
<button
|
2934
|
-
#button
|
2935
|
-
type="button"
|
2936
|
-
kendoButton
|
2937
|
-
[title]="messageFor('loadFile')"
|
2938
|
-
fillMode="flat"
|
2939
|
-
[icon]="icon"
|
2940
|
-
[svgIcon]="svgIcon"
|
2941
|
-
(click)="fileSelectEl.click()"></button>
|
2942
|
-
<input
|
2943
|
-
#fileSelectEl
|
2944
|
-
type="file"
|
2945
|
-
(change)="onFileSelect($event)"
|
2946
|
-
[style.display]="'none'"
|
2947
|
-
aria-hidden="true"
|
2948
|
-
accept=".xlsx,.XLSX" />
|
2949
|
-
</ng-template>
|
2950
|
-
<ng-template #popupTemplate>
|
2951
|
-
<div
|
2952
|
-
#overflowButton
|
2953
|
-
tabindex="-1"
|
2954
|
-
role="menuitem"
|
2955
|
-
class="k-item k-menu-item"
|
2956
|
-
(click)="toolbar.toggle(false); popupFileSelectEl.click()">
|
2957
|
-
<span
|
2958
|
-
class="k-link k-menu-link">
|
2959
|
-
<kendo-icon-wrapper
|
2960
|
-
[name]="icon"
|
2961
|
-
[svgIcon]="svgIcon"
|
2962
|
-
></kendo-icon-wrapper>
|
2963
|
-
<span class="k-menu-link-text">{{messageFor('loadFile')}}</span>
|
2964
|
-
</span>
|
2965
|
-
<input
|
2966
|
-
#popupFileSelectEl
|
2967
|
-
type="file"
|
2968
|
-
(change)="onFileSelect($event)"
|
2969
|
-
[style.display]="'none'"
|
2970
|
-
aria-hidden="true"
|
2971
|
-
accept=".xlsx,.XLSX" />
|
2972
|
-
</div>
|
2973
|
-
</ng-template>
|
2974
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
2975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetLoadFileComponent, decorators: [{
|
2976
|
-
type: Component,
|
2977
|
-
args: [{
|
2978
|
-
selector: 'kendo-spreadsheet-load-file-tool',
|
2979
|
-
providers: [
|
2980
|
-
{
|
2981
|
-
provide: ToolBarToolComponent,
|
2982
|
-
useExisting: forwardRef(() => SpreadsheetLoadFileComponent),
|
2983
|
-
},
|
2984
|
-
],
|
2985
|
-
template: `
|
2986
|
-
<ng-template #toolbarTemplate>
|
2987
|
-
<button
|
2988
|
-
#button
|
2989
|
-
type="button"
|
2990
|
-
kendoButton
|
2991
|
-
[title]="messageFor('loadFile')"
|
2992
|
-
fillMode="flat"
|
2993
|
-
[icon]="icon"
|
2994
|
-
[svgIcon]="svgIcon"
|
2995
|
-
(click)="fileSelectEl.click()"></button>
|
2996
|
-
<input
|
2997
|
-
#fileSelectEl
|
2998
|
-
type="file"
|
2999
|
-
(change)="onFileSelect($event)"
|
3000
|
-
[style.display]="'none'"
|
3001
|
-
aria-hidden="true"
|
3002
|
-
accept=".xlsx,.XLSX" />
|
3003
|
-
</ng-template>
|
3004
|
-
<ng-template #popupTemplate>
|
3005
|
-
<div
|
3006
|
-
#overflowButton
|
3007
|
-
tabindex="-1"
|
3008
|
-
role="menuitem"
|
3009
|
-
class="k-item k-menu-item"
|
3010
|
-
(click)="toolbar.toggle(false); popupFileSelectEl.click()">
|
3011
|
-
<span
|
3012
|
-
class="k-link k-menu-link">
|
3013
|
-
<kendo-icon-wrapper
|
3014
|
-
[name]="icon"
|
3015
|
-
[svgIcon]="svgIcon"
|
3016
|
-
></kendo-icon-wrapper>
|
3017
|
-
<span class="k-menu-link-text">{{messageFor('loadFile')}}</span>
|
3018
|
-
</span>
|
3019
|
-
<input
|
3020
|
-
#popupFileSelectEl
|
3021
|
-
type="file"
|
3022
|
-
(change)="onFileSelect($event)"
|
3023
|
-
[style.display]="'none'"
|
3024
|
-
aria-hidden="true"
|
3025
|
-
accept=".xlsx,.XLSX" />
|
3026
|
-
</div>
|
3027
|
-
</ng-template>
|
3028
|
-
`,
|
3029
|
-
standalone: true,
|
3030
|
-
imports: [ButtonComponent, IconWrapperComponent]
|
3031
|
-
}]
|
3032
|
-
}], ctorParameters: function () {
|
3033
|
-
return [{ type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: i1$2.ToolBarComponent, decorators: [{
|
3034
|
-
type: Inject,
|
3035
|
-
args: [ToolBarComponent]
|
3036
|
-
}] }];
|
3037
|
-
}, propDecorators: { toolbarTemplate: [{
|
3038
|
-
type: ViewChild,
|
3039
|
-
args: ['toolbarTemplate', { static: true }]
|
3040
|
-
}], popupTemplate: [{
|
3041
|
-
type: ViewChild,
|
3042
|
-
args: ['popupTemplate', { static: true }]
|
3043
|
-
}], overflowButtonElement: [{
|
3044
|
-
type: ViewChild,
|
3045
|
-
args: ['overflowButton', { read: ElementRef, static: false }]
|
3046
|
-
}], button: [{
|
3047
|
-
type: ViewChild,
|
3048
|
-
args: ['button']
|
3049
|
-
}] } });
|
3050
|
-
|
3051
|
-
/**
|
3052
|
-
* @hidden
|
3053
|
-
*/
|
3054
|
-
class MainMenuDirective {
|
3055
|
-
constructor(host, renderer) {
|
3056
|
-
this.host = host;
|
3057
|
-
this.renderer = renderer;
|
3058
|
-
}
|
3059
|
-
ngAfterViewInit() {
|
3060
|
-
isDocumentAvailable() && this.renderer.addClass(this.host.nativeElement.firstElementChild, 'k-spreadsheet-menu');
|
3061
|
-
}
|
3062
|
-
}
|
3063
|
-
MainMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainMenuDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
3064
|
-
MainMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: MainMenuDirective, isStandalone: true, selector: "[kendoSpreadsheetMenu]", ngImport: i0 });
|
3065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainMenuDirective, decorators: [{
|
3066
|
-
type: Directive,
|
3067
|
-
args: [{
|
3068
|
-
selector: '[kendoSpreadsheetMenu]',
|
3069
|
-
standalone: true
|
3070
|
-
}]
|
3071
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
|
3072
|
-
|
3073
|
-
/**
|
3074
|
-
* @hidden
|
3075
|
-
*/
|
3076
|
-
class MessagesDirective extends ComponentMessages {
|
3077
|
-
}
|
3078
|
-
MessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessagesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
3079
|
-
MessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: MessagesDirective, isStandalone: true, 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", formulaInput: "formulaInput", 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", copy: "copy", cut: "cut", paste: "paste", hideRow: "hideRow", unhideRow: "unhideRow", hideColumn: "hideColumn", unhideColumn: "unhideColumn", sheetDelete: "sheetDelete", sheetRename: "sheetRename", sheetHide: "sheetHide", sheetDuplicate: "sheetDuplicate", sheetMoveLeft: "sheetMoveLeft", sheetMoveRight: "sheetMoveRight", invalidNameError: "invalidNameError" }, usesInheritance: true, ngImport: i0 });
|
3080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessagesDirective, decorators: [{
|
3081
|
-
type: Directive,
|
3082
|
-
args: [{
|
3083
|
-
selector: '[kendoSpreadsheetMessages]',
|
3084
|
-
standalone: true
|
3085
|
-
}]
|
3086
|
-
}], propDecorators: { home: [{
|
3087
|
-
type: Input
|
3088
|
-
}], file: [{
|
3089
|
-
type: Input
|
3090
|
-
}], insert: [{
|
3091
|
-
type: Input
|
3092
|
-
}], formatTab: [{
|
3093
|
-
type: Input
|
3094
|
-
}], saveFile: [{
|
3095
|
-
type: Input
|
3096
|
-
}], loadFile: [{
|
3097
|
-
type: Input
|
3098
|
-
}], bold: [{
|
3099
|
-
type: Input
|
3100
|
-
}], italic: [{
|
3101
|
-
type: Input
|
3102
|
-
}], underline: [{
|
3103
|
-
type: Input
|
3104
|
-
}], format: [{
|
3105
|
-
type: Input
|
3106
|
-
}], fontFamily: [{
|
3107
|
-
type: Input
|
3108
|
-
}], fontSize: [{
|
3109
|
-
type: Input
|
3110
|
-
}], undo: [{
|
3111
|
-
type: Input
|
3112
|
-
}], redo: [{
|
3113
|
-
type: Input
|
3114
|
-
}], background: [{
|
3115
|
-
type: Input
|
3116
|
-
}], color: [{
|
3117
|
-
type: Input
|
3118
|
-
}], gridLines: [{
|
3119
|
-
type: Input
|
3120
|
-
}], addColumnLeft: [{
|
3121
|
-
type: Input
|
3122
|
-
}], addColumnRight: [{
|
3123
|
-
type: Input
|
3124
|
-
}], addRowBelow: [{
|
3125
|
-
type: Input
|
3126
|
-
}], addRowAbove: [{
|
3127
|
-
type: Input
|
3128
|
-
}], deleteColumn: [{
|
3129
|
-
type: Input
|
3130
|
-
}], deleteRow: [{
|
3131
|
-
type: Input
|
3132
|
-
}], wrap: [{
|
3133
|
-
type: Input
|
3134
|
-
}], align: [{
|
3135
|
-
type: Input
|
3136
|
-
}], alignHorizontal: [{
|
3137
|
-
type: Input
|
3138
|
-
}], alignVertical: [{
|
3139
|
-
type: Input
|
3140
|
-
}], alignLeft: [{
|
3141
|
-
type: Input
|
3142
|
-
}], alignCenter: [{
|
3143
|
-
type: Input
|
3144
|
-
}], alignRight: [{
|
3145
|
-
type: Input
|
3146
|
-
}], alignJustify: [{
|
3147
|
-
type: Input
|
3148
|
-
}], alignTop: [{
|
3149
|
-
type: Input
|
3150
|
-
}], alignMiddle: [{
|
3151
|
-
type: Input
|
3152
|
-
}], alignBottom: [{
|
3153
|
-
type: Input
|
3154
|
-
}], dialogApply: [{
|
3155
|
-
type: Input
|
3156
|
-
}], dialogCancel: [{
|
3157
|
-
type: Input
|
3158
|
-
}], dialogDelete: [{
|
3159
|
-
type: Input
|
3160
|
-
}], dialogRename: [{
|
3161
|
-
type: Input
|
3162
|
-
}], dialogInsert: [{
|
3163
|
-
type: Input
|
3164
|
-
}], dialogRemoveLink: [{
|
3165
|
-
type: Input
|
3166
|
-
}], delete: [{
|
3167
|
-
type: Input
|
3168
|
-
}], rename: [{
|
3169
|
-
type: Input
|
3170
|
-
}], nameBox: [{
|
3171
|
-
type: Input
|
3172
|
-
}], formulaInput: [{
|
3173
|
-
type: Input
|
3174
|
-
}], addSheet: [{
|
3175
|
-
type: Input
|
3176
|
-
}], sheetsMenu: [{
|
3177
|
-
type: Input
|
3178
|
-
}], view: [{
|
3179
|
-
type: Input
|
3180
|
-
}], merge: [{
|
3181
|
-
type: Input
|
3182
|
-
}], mergeHorizontally: [{
|
3183
|
-
type: Input
|
3184
|
-
}], mergeVertically: [{
|
3185
|
-
type: Input
|
3186
|
-
}], mergeAll: [{
|
3187
|
-
type: Input
|
3188
|
-
}], unmerge: [{
|
3189
|
-
type: Input
|
3190
|
-
}], insertLink: [{
|
3191
|
-
type: Input
|
3192
|
-
}], increaseDecimal: [{
|
3193
|
-
type: Input
|
3194
|
-
}], decreaseDecimal: [{
|
3195
|
-
type: Input
|
3196
|
-
}], increaseFontSize: [{
|
3197
|
-
type: Input
|
3198
|
-
}], decreaseFontSize: [{
|
3199
|
-
type: Input
|
3200
|
-
}], openUnsupported: [{
|
3201
|
-
type: Input
|
3202
|
-
}], modifyMerged: [{
|
3203
|
-
type: Input
|
3204
|
-
}], cannotModifyDisabled: [{
|
3205
|
-
type: Input
|
3206
|
-
}], dialogOk: [{
|
3207
|
-
type: Input
|
3208
|
-
}], dialogError: [{
|
3209
|
-
type: Input
|
3210
|
-
}], duplicateSheetName: [{
|
3211
|
-
type: Input
|
3212
|
-
}], copy: [{
|
3213
|
-
type: Input
|
3214
|
-
}], cut: [{
|
3215
|
-
type: Input
|
3216
|
-
}], paste: [{
|
3217
|
-
type: Input
|
3218
|
-
}], hideRow: [{
|
3219
|
-
type: Input
|
3220
|
-
}], unhideRow: [{
|
3221
|
-
type: Input
|
3222
|
-
}], hideColumn: [{
|
3223
|
-
type: Input
|
3224
|
-
}], unhideColumn: [{
|
3225
|
-
type: Input
|
3226
|
-
}], sheetDelete: [{
|
3227
|
-
type: Input
|
3228
|
-
}], sheetRename: [{
|
3229
|
-
type: Input
|
3230
|
-
}], sheetHide: [{
|
3231
|
-
type: Input
|
3232
|
-
}], sheetDuplicate: [{
|
3233
|
-
type: Input
|
3234
|
-
}], sheetMoveLeft: [{
|
3235
|
-
type: Input
|
3236
|
-
}], sheetMoveRight: [{
|
3237
|
-
type: Input
|
3238
|
-
}], invalidNameError: [{
|
3239
|
-
type: Input
|
3240
|
-
}] } });
|
3241
|
-
|
3242
|
-
/**
|
3243
|
-
* @hidden
|
3244
|
-
*/
|
3245
|
-
class LocalizedMessagesDirective extends MessagesDirective {
|
3246
|
-
constructor(service) {
|
3247
|
-
super();
|
3248
|
-
this.service = service;
|
3249
|
-
}
|
3250
|
-
}
|
3251
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
3252
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoSpreadsheetLocalizedMessages]", providers: [{
|
3253
|
-
provide: MessagesDirective,
|
3254
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
3255
|
-
}], usesInheritance: true, ngImport: i0 });
|
3256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
3257
|
-
type: Directive,
|
3258
|
-
args: [{
|
3259
|
-
providers: [{
|
3260
|
-
provide: MessagesDirective,
|
3261
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
3262
|
-
}],
|
3263
|
-
selector: '[kendoSpreadsheetLocalizedMessages]',
|
3264
|
-
standalone: true
|
3265
|
-
}]
|
3266
|
-
}], ctorParameters: function () { return [{ type: i2.LocalizationService }]; } });
|
3267
|
-
|
3268
|
-
/**
|
3269
|
-
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
3270
|
-
*/
|
3271
|
-
class SpreadsheetComponent {
|
3272
|
-
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService, dialogService) {
|
3273
|
-
this.ngZone = ngZone;
|
3274
|
-
this.intl = intl;
|
3275
|
-
this.host = host;
|
3276
|
-
this.localization = localization;
|
3277
|
-
this.spreadsheetService = spreadsheetService;
|
3278
|
-
this.toolsService = toolsService;
|
3279
|
-
this.errorService = errorService;
|
3280
|
-
this.dialogService = dialogService;
|
3281
|
-
this.hostClass = true;
|
3282
|
-
this.role = 'application';
|
3283
|
-
/**
|
3284
|
-
* Sets the overflow option of the built-in Toolbar components.
|
3285
|
-
* @default false
|
3286
|
-
*/
|
3287
|
-
this.overflow = false;
|
3288
|
-
/**
|
3289
|
-
* Sets the height of the formula list container.
|
3290
|
-
* Accepts same values as the CSS [`style.height`](https://developer.mozilla.org/en-US/docs/Web/CSS/height) property.
|
3291
|
-
*
|
3292
|
-
* @default '300px'
|
3293
|
-
*/
|
3294
|
-
this.formulaListMaxHeight = '300px';
|
3295
|
-
/**
|
3296
|
-
* The number of columns in the document.
|
3297
|
-
*
|
3298
|
-
* @default 50
|
3299
|
-
*/
|
3300
|
-
this.columns = 50;
|
3301
|
-
/**
|
3302
|
-
* The initial column width in pixels.
|
3303
|
-
*
|
3304
|
-
* @default 100
|
3305
|
-
*/
|
3306
|
-
this.columnWidth = 100;
|
3307
|
-
/**
|
3308
|
-
* The height of the header row in pixels.
|
3309
|
-
*
|
3310
|
-
* @default 30
|
3311
|
-
*/
|
3312
|
-
this.headerHeight = 30;
|
3313
|
-
/**
|
3314
|
-
* The width of the header column in pixels.
|
3315
|
-
*
|
3316
|
-
* @default 32
|
3317
|
-
*/
|
3318
|
-
this.headerWidth = 32;
|
3319
|
-
/**
|
3320
|
-
* The initial row height in pixels.
|
3321
|
-
*
|
3322
|
-
* @default 30
|
3323
|
-
*/
|
3324
|
-
this.rowHeight = 30;
|
3325
|
-
/**
|
3326
|
-
* The number of rows in the document.
|
3327
|
-
*
|
3328
|
-
* @default 200
|
3329
|
-
*/
|
3330
|
-
this.rows = 200;
|
3331
|
-
/**
|
3332
|
-
* Fired when a value in the Spreadsheet is changed. Exposes the `SpreadsheetWidget` instance and the selected `Range` as event data.
|
3333
|
-
*/
|
3334
|
-
this.change = new EventEmitter();
|
3335
|
-
/**
|
3336
|
-
* Fired when the selected range format is changed from the UI. Exposes the `SpreadsheetWidget` instance and the selected `Range` as event data.
|
3337
|
-
*/
|
3338
|
-
this.formatChange = new EventEmitter();
|
3339
|
-
/**
|
3340
|
-
* Fired when the selection is changed by the end user. Exposes the `SpreadsheetWidget` instance and the selected `Range` as event data.
|
3341
|
-
*/
|
3342
|
-
this.selectionChange = new EventEmitter();
|
3343
|
-
/**
|
3344
|
-
* Fired when the end user clicks the Export to Excel toolbar button.
|
3345
|
-
* The event is preventable and exposes the `Workbook` object, a `preventDefault` method
|
3346
|
-
* (if invoked, the generated file will not be saved), and the SpreadsheetWidget instance.
|
3347
|
-
*/
|
3348
|
-
this.excelExport = new EventEmitter();
|
3349
|
-
/**
|
3350
|
-
* Fired when the end user clicks the Open toolbar button.
|
3351
|
-
* The event is preventable and exposes the selected `File` or `Blob`, a `preventDefault` method
|
3352
|
-
* (if invoked, the selected file will not be loaded), and the SpreadsheetWidget instance.
|
3353
|
-
*/
|
3354
|
-
this.excelImport = new EventEmitter();
|
3355
|
-
/**
|
3356
|
-
* Fired when the active sheet is about to change.
|
3357
|
-
* The event exposes the new active `Sheet` and the SpreadsheetWidget instance.
|
3358
|
-
*/
|
3359
|
-
this.activeSheetChange = new EventEmitter();
|
3360
|
-
this.formulaFxIcon = formulaFxIcon;
|
3361
|
-
this.folderOpenIcon = folderOpenIcon;
|
3362
|
-
this.downloadIcon = downloadIcon;
|
3363
|
-
this.showLicenseWatermark = false;
|
3364
|
-
this.contextMenuItems = [];
|
3365
|
-
this.subs = new Subscription();
|
3366
|
-
/**
|
3367
|
-
* @hidden
|
3368
|
-
*/
|
3369
|
-
this.onKeyDown = (e) => {
|
3370
|
-
const isCtrl = e.ctrlKey || e.metaKey;
|
3371
|
-
const shift = e.shiftKey;
|
3372
|
-
if (isCtrl && shift && e.keyCode === Keys.KeyS) {
|
3373
|
-
this.spreadsheetService.onSheetsBarFocus.next();
|
3374
|
-
}
|
3375
|
-
};
|
3376
|
-
this.onChange = (e) => {
|
3377
|
-
hasObservers(this.change) && this.change.emit(e);
|
3378
|
-
this.spreadsheetService.selectionChanged.next(e.range);
|
3379
|
-
};
|
3380
|
-
this.onSelectionChange = (e) => {
|
3381
|
-
hasObservers(this.selectionChange) && this.selectionChange.emit(e);
|
3382
|
-
this.spreadsheetService.selectionChanged.next(e.range);
|
3383
|
-
};
|
3384
|
-
this.onChangeFormat = (e) => {
|
3385
|
-
hasObservers(this.formatChange) && this.formatChange.emit(e);
|
3386
|
-
this.spreadsheetService.selectionChanged.next(e.range);
|
3387
|
-
};
|
3388
|
-
this.onExcelExport = (e) => hasObservers(this.excelExport) && this.excelExport.emit(e);
|
3389
|
-
this.onExcelImport = (e) => hasObservers(this.excelImport) && this.excelImport.emit(e);
|
3390
|
-
this.onActiveSheetChanged = (sheet) => {
|
3391
|
-
const eventArgs = { sender: this.spreadsheetService.spreadsheet, sheet };
|
3392
|
-
hasObservers(this.activeSheetChange) && this.activeSheetChange.emit(eventArgs);
|
3393
|
-
const range = sheet.range(sheet.activeCell());
|
3394
|
-
this.spreadsheetService.selectionChanged.next(range);
|
3395
|
-
};
|
3396
|
-
this.updateState = (e) => {
|
3397
|
-
var _a;
|
3398
|
-
this.toolsService.updateTools(e);
|
3399
|
-
if ((_a = e.reason) === null || _a === void 0 ? void 0 : _a.sheetSelection) {
|
3400
|
-
this.sheets = mapToSheetDescriptor(this.spreadsheetService.spreadsheet.sheets());
|
3401
|
-
}
|
3402
|
-
};
|
3403
|
-
this.onMessage = (e) => {
|
3404
|
-
this.ngZone.run(() => {
|
3405
|
-
this.errorService.handleErrorMessage(e);
|
3406
|
-
});
|
3407
|
-
};
|
3408
|
-
const isValid = validatePackage(packageMetadata);
|
3409
|
-
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
3410
|
-
ngZone.onStable.pipe(take(1)).subscribe(() => {
|
3411
|
-
if (!this.menuItems) {
|
3412
|
-
this._menuItems = [{
|
3413
|
-
id: 'file',
|
3414
|
-
text: this.messageFor('file')
|
3415
|
-
}, {
|
3416
|
-
id: 'home',
|
3417
|
-
text: this.messageFor('home'),
|
3418
|
-
active: true,
|
3419
|
-
cssClass: 'k-active'
|
3420
|
-
}, {
|
3421
|
-
id: 'insert',
|
3422
|
-
text: this.messageFor('insert')
|
3423
|
-
}, {
|
3424
|
-
id: 'format',
|
3425
|
-
text: this.messageFor('formatTab')
|
3426
|
-
}, {
|
3427
|
-
id: 'view',
|
3428
|
-
text: this.messageFor('view')
|
3429
|
-
}];
|
3430
|
-
}
|
3431
|
-
this.selectedMenuItem = this.menuItems[1];
|
3432
|
-
});
|
3433
|
-
}
|
3434
|
-
/**
|
3435
|
-
* The menu items configuration.
|
3436
|
-
*/
|
3437
|
-
set menuItems(items) {
|
3438
|
-
this._menuItems = [];
|
3439
|
-
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
3440
|
-
const normalizedItems = items.map(item => ({
|
3441
|
-
active: item.active,
|
3442
|
-
text: item.id === 'format' ? this.messageFor('formatTab') : this.messageFor(item.id),
|
3443
|
-
cssClass: item.active ? 'k-active' : null,
|
3444
|
-
id: item.id
|
3445
|
-
}));
|
3446
|
-
this._menuItems = normalizedItems;
|
3447
|
-
const activeItemIndex = this.menuItems.findIndex(item => item.active);
|
3448
|
-
this.selectedMenuItem = this.menuItems[activeItemIndex > -1 ? activeItemIndex : 0];
|
3449
|
-
});
|
3450
|
-
}
|
3451
|
-
get menuItems() {
|
3452
|
-
return this._menuItems;
|
3453
|
-
}
|
3454
|
-
/**
|
3455
|
-
* The name of the currently active sheet. Must match one of the sheet names.
|
3456
|
-
*/
|
3457
|
-
set activeSheet(value) {
|
3458
|
-
var _a, _b;
|
3459
|
-
this._activeSheet = value;
|
3460
|
-
(_b = (_a = this.spreadsheetService.spreadsheet) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.sheetsbar.onSheetSelect(this.activeSheet);
|
3461
|
-
}
|
3462
|
-
get activeSheet() {
|
3463
|
-
var _a, _b;
|
3464
|
-
return this._activeSheet || ((_b = (_a = this.spreadsheetService.spreadsheet) === null || _a === void 0 ? void 0 : _a.activeSheet()) === null || _b === void 0 ? void 0 : _b.name());
|
3465
|
-
}
|
3466
|
-
/**
|
3467
|
-
* An array which defines the document sheets and their content.
|
3468
|
-
*/
|
3469
|
-
set sheets(value) {
|
3470
|
-
const items = value.map((item, index, items) => (Object.assign(Object.assign({}, item), { state: item.state || 'visible', inEdit: false, first: index === 0, last: index === items.length - 1, text: item.name, active: (item.name === this.activeSheet) || items.length === 1, index })));
|
3471
|
-
this._sheetsInfo = items;
|
3472
|
-
}
|
3473
|
-
get sheetsInfo() {
|
3474
|
-
return this._sheetsInfo;
|
3475
|
-
}
|
3476
|
-
get spreadsheetWidget() {
|
3477
|
-
return this.spreadsheetService.spreadsheet;
|
3478
|
-
}
|
3479
|
-
ngAfterViewInit() {
|
3480
|
-
if (!isDocumentAvailable()) {
|
3481
|
-
return;
|
3482
|
-
}
|
3483
|
-
this.ngZone.runOutsideAngular(() => {
|
3484
|
-
setTimeout(() => {
|
3485
|
-
var _a;
|
3486
|
-
const spreadsheet = this.spreadsheetService.spreadsheet = new SpreadsheetWidget(this.host.nativeElement, this.options);
|
3487
|
-
spreadsheet.bind('select', this.onSelectionChange);
|
3488
|
-
spreadsheet.bind('change', this.onChange);
|
3489
|
-
spreadsheet.bind('changeFormat', this.onChangeFormat);
|
3490
|
-
spreadsheet.bind('excelImport', this.onExcelImport);
|
3491
|
-
spreadsheet.bind('excelExport', this.onExcelExport);
|
3492
|
-
spreadsheet.bind('keydown', this.onKeyDown);
|
3493
|
-
spreadsheet.view.bind('update', this.updateState);
|
3494
|
-
spreadsheet.view.bind('message', this.onMessage);
|
3495
|
-
spreadsheet.bind('contextmenu', this.onContextMenu.bind(this));
|
3496
|
-
const sheet = spreadsheet.activeSheet();
|
3497
|
-
if (sheet) {
|
3498
|
-
this.updateState({ range: sheet.range(sheet.activeCell()) });
|
3499
|
-
}
|
3500
|
-
this.updateActiveSheet(this.activeSheet || ((_a = spreadsheet === null || spreadsheet === void 0 ? void 0 : spreadsheet.activeSheet()) === null || _a === void 0 ? void 0 : _a.name()));
|
3501
|
-
if (!this.sheetsInfo) {
|
3502
|
-
this.ngZone.run(() => {
|
3503
|
-
const defaultSheetDescriptors = mapToSheetDescriptor([spreadsheet === null || spreadsheet === void 0 ? void 0 : spreadsheet.activeSheet()]);
|
3504
|
-
this._sheetsInfo = [Object.assign(Object.assign({ text: this.spreadsheetService.currentActiveSheet, first: true, last: true, state: 'visible' }, defaultSheetDescriptors), { sheetActions: getSheetActions(defaultSheetDescriptors).map(item => (Object.assign(Object.assign({}, item), { text: this.messageFor(item.messageKey) }))) })];
|
3505
|
-
});
|
3506
|
-
}
|
3507
|
-
});
|
3508
|
-
this.subs.add(this.spreadsheetService.sheetsChanged.subscribe(this.onSheetsChanged.bind(this)));
|
3509
|
-
this.subs.add(this.spreadsheetService.activeSheetChanged.subscribe(this.onActiveSheetChanged.bind(this)));
|
3510
|
-
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
3511
|
-
this.spreadsheetService.dialogContainer = this.dialogContainer;
|
3512
|
-
});
|
3513
|
-
}
|
3514
|
-
ngOnChanges(changes) {
|
3515
|
-
const dynamicOptions = [
|
3516
|
-
'columns',
|
3517
|
-
'columnWidth',
|
3518
|
-
'defaultCellStyle',
|
3519
|
-
'excel',
|
3520
|
-
'headerHeight',
|
3521
|
-
'headerWidth',
|
3522
|
-
'images',
|
3523
|
-
'names',
|
3524
|
-
'rowHeight',
|
3525
|
-
'rows'
|
3526
|
-
];
|
3527
|
-
const changedDynamicOptions = dynamicOptions.filter(o => isPresent(changes[o] && !changes[o].firstChange));
|
3528
|
-
if (this.spreadsheetWidget && changedDynamicOptions.length) {
|
3529
|
-
const newOptions = this.spreadsheetWidget.toJSON();
|
3530
|
-
changedDynamicOptions.forEach(o => newOptions[o] = changes[o].currentValue);
|
3531
|
-
this.spreadsheetWidget.fromJSON(newOptions);
|
3532
|
-
}
|
3533
|
-
}
|
3534
|
-
ngOnDestroy() {
|
3535
|
-
this.subs.unsubscribe();
|
3536
|
-
}
|
3537
|
-
/**
|
3538
|
-
* @hidden
|
3539
|
-
*/
|
3540
|
-
onContextMenu(e) {
|
3541
|
-
if (e.targetType === 'topcorner') {
|
3542
|
-
return;
|
3543
|
-
}
|
3544
|
-
const selection = this.spreadsheetWidget.activeSheet().select();
|
3545
|
-
const { topLeft, bottomRight } = selection;
|
3546
|
-
const isRange = e.targetType === 'cell' && (topLeft.row !== bottomRight.row || topLeft.col !== bottomRight.col);
|
3547
|
-
const targetType = isRange ? 'range' : e.targetType;
|
3548
|
-
this.contextMenuItems = this.contextMenuItemsForTarget(targetType, e.showUnhide, e.showUnmerge);
|
3549
|
-
this.contextMenu.show({ top: e.originalEvent.pageY, left: e.originalEvent.pageX });
|
3550
|
-
}
|
3551
|
-
/**
|
3552
|
-
* @hidden
|
3553
|
-
*/
|
3554
|
-
onContextMenuSelect(e) {
|
3555
|
-
let command;
|
3556
|
-
switch (e.item.id) {
|
3557
|
-
case 'cut':
|
3558
|
-
command = { command: 'ToolbarCutCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3559
|
-
break;
|
3560
|
-
case 'copy':
|
3561
|
-
command = { command: 'ToolbarCopyCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3562
|
-
break;
|
3563
|
-
case 'unmerge':
|
3564
|
-
command = { command: 'MergeCellCommand', options: { value: 'unmerge' } };
|
3565
|
-
break;
|
3566
|
-
case 'mergeAll':
|
3567
|
-
command = { command: 'MergeCellCommand', options: { value: 'cells' } };
|
3568
|
-
break;
|
3569
|
-
case 'mergeHorizontally':
|
3570
|
-
command = { command: 'MergeCellCommand', options: { value: 'horizontally' } };
|
3571
|
-
break;
|
3572
|
-
case 'mergeVertically':
|
3573
|
-
command = { command: 'MergeCellCommand', options: { value: 'vertically' } };
|
3574
|
-
break;
|
3575
|
-
case 'hideRow':
|
3576
|
-
command = { command: 'HideLineCommand', options: { axis: 'row' } };
|
3577
|
-
break;
|
3578
|
-
case 'hideColumn':
|
3579
|
-
command = { command: 'HideLineCommand', options: { axis: 'column' } };
|
3580
|
-
break;
|
3581
|
-
case 'unhideRow':
|
3582
|
-
command = { command: 'UnHideLineCommand', options: { axis: 'row' } };
|
3583
|
-
break;
|
3584
|
-
case 'unhideColumn':
|
3585
|
-
command = { command: 'UnHideLineCommand', options: { axis: 'column' } };
|
3586
|
-
break;
|
3587
|
-
case 'deleteRow':
|
3588
|
-
command = { command: 'DeleteRowCommand' };
|
3589
|
-
break;
|
3590
|
-
case 'deleteColumn':
|
3591
|
-
command = { command: 'DeleteColumnCommand' };
|
3592
|
-
break;
|
3593
|
-
case 'insertLink':
|
3594
|
-
this.openLinkDialog();
|
3595
|
-
break;
|
3596
|
-
case 'addRowAbove':
|
3597
|
-
command = { command: 'AddRowCommand', options: { value: 'above' } };
|
3598
|
-
break;
|
3599
|
-
case 'addRowBelow':
|
3600
|
-
command = { command: 'AddRowCommand', options: { value: 'below' } };
|
3601
|
-
break;
|
3602
|
-
case 'addColumnLeft':
|
3603
|
-
command = { command: 'AddColumnCommand', options: { value: 'left' } };
|
3604
|
-
break;
|
3605
|
-
case 'addColumnRight':
|
3606
|
-
command = { command: 'AddColumnCommand', options: { value: 'right' } };
|
3607
|
-
break;
|
3608
|
-
}
|
3609
|
-
if (command) {
|
3610
|
-
this.spreadsheetWidget.executeCommand(command);
|
3611
|
-
}
|
3612
|
-
}
|
3613
|
-
/**
|
3614
|
-
* @hidden
|
3615
|
-
*/
|
3616
|
-
messageFor(key) {
|
3617
|
-
return this.localization.get(key);
|
3618
|
-
}
|
3619
|
-
/**
|
3620
|
-
* @hidden
|
3621
|
-
*/
|
3622
|
-
onMenuItemSelect(e) {
|
3623
|
-
const selectedMenuItem = this.menuItems.find(item => item.text === e.item.text);
|
3624
|
-
const previousSelectedItem = this.menuItems.find(item => item.active);
|
3625
|
-
if (selectedMenuItem !== previousSelectedItem) {
|
3626
|
-
this._menuItems.forEach((item, idx) => {
|
3627
|
-
item.active = idx === +e.index;
|
3628
|
-
item.cssClass = idx === +e.index ? 'k-active' : null;
|
3629
|
-
});
|
3630
|
-
this.selectedMenuItem = this.menuItems.find(item => item.active);
|
3631
|
-
}
|
3632
|
-
}
|
3633
|
-
updateActiveSheet(name) {
|
3634
|
-
this.ngZone.run(() => this.spreadsheetService.currentActiveSheet = name);
|
3635
|
-
}
|
3636
|
-
onSheetsChanged(e) {
|
3637
|
-
this.ngZone.run(() => {
|
3638
|
-
this.sheets = mapToSheetDescriptor(e.sheets);
|
3639
|
-
this.updateActiveSheet(this.spreadsheetService.activeSheet);
|
3640
|
-
});
|
3641
|
-
}
|
3642
|
-
get options() {
|
3643
|
-
return Object.assign(Object.assign({ activeSheet: this.activeSheet }, {
|
3644
|
-
sheets: this.sheetsInfo && JSON.parse(JSON.stringify(this.sheetsInfo)),
|
3645
|
-
intl: {
|
3646
|
-
localeInfo: () => localeData(this.intl.localeId),
|
3647
|
-
parseDate: (value, fmt) => this.intl.parseDate(value, fmt),
|
3648
|
-
toString: (value, fmt) => this.intl.toString(value, fmt),
|
3649
|
-
format: (fmt, ...values) => this.intl.format(fmt, ...values)
|
3650
|
-
}
|
3651
|
-
}), { columns: this.columns, columnWidth: this.columnWidth, defaultCellStyle: this.defaultCellStyle, excel: this.excel, headerHeight: this.headerHeight, headerWidth: this.headerWidth, images: this.images, rowHeight: this.rowHeight, rows: this.rows, formulaBarInputRef: { current: this.formulaBarInputRef.current }, formulaCellInputRef: { current: this.formulaCellInputRef.current }, nameBoxRef: { current: this.nameBoxRef.current } });
|
3652
|
-
}
|
3653
|
-
contextMenuItemsForTarget(target, unhide, unmerge) {
|
3654
|
-
const commonItems = [{
|
3655
|
-
text: this.messageFor('copy'),
|
3656
|
-
icon: commandIcons.copy,
|
3657
|
-
svgIcon: commandSVGIcons.copy,
|
3658
|
-
id: 'copy'
|
3659
|
-
}, {
|
3660
|
-
text: this.messageFor('cut'),
|
3661
|
-
icon: commandIcons.cut,
|
3662
|
-
svgIcon: commandSVGIcons.cut,
|
3663
|
-
id: 'cut'
|
3664
|
-
}, {
|
3665
|
-
text: this.messageFor('paste'),
|
3666
|
-
icon: commandIcons.paste,
|
3667
|
-
svgIcon: commandSVGIcons.paste,
|
3668
|
-
id: 'paste',
|
3669
|
-
disabled: true
|
3670
|
-
}, {
|
3671
|
-
separator: true
|
3672
|
-
}, {
|
3673
|
-
text: this.messageFor('mergeAll'),
|
3674
|
-
icon: commandIcons.mergeAll,
|
3675
|
-
svgIcon: commandSVGIcons.mergeAll,
|
3676
|
-
id: 'mergeAll',
|
3677
|
-
}, {
|
3678
|
-
text: this.messageFor('mergeHorizontally'),
|
3679
|
-
icon: commandIcons.mergeHorizontally,
|
3680
|
-
svgIcon: commandSVGIcons.mergeHorizontally,
|
3681
|
-
id: 'mergeHorizontally',
|
3682
|
-
}, {
|
3683
|
-
text: this.messageFor('mergeVertically'),
|
3684
|
-
icon: commandIcons.mergeVertically,
|
3685
|
-
svgIcon: commandSVGIcons.mergeVertically,
|
3686
|
-
id: 'mergeVertically',
|
3687
|
-
}, {
|
3688
|
-
text: this.messageFor('unmerge'),
|
3689
|
-
icon: commandIcons.unmerge,
|
3690
|
-
svgIcon: commandSVGIcons.unmerge,
|
3691
|
-
id: 'unmerge',
|
3692
|
-
disabled: !unmerge
|
3693
|
-
}, {
|
3694
|
-
separator: true
|
3695
|
-
}, {
|
3696
|
-
text: this.messageFor('insertLink'),
|
3697
|
-
icon: commandIcons.insertLink,
|
3698
|
-
svgIcon: commandSVGIcons.insertLink,
|
3699
|
-
id: 'insertLink'
|
3700
|
-
}];
|
3701
|
-
if (target === 'rowheader') {
|
3702
|
-
commonItems.push({
|
3703
|
-
separator: true
|
3704
|
-
}, {
|
3705
|
-
text: this.messageFor('addRowAbove'),
|
3706
|
-
icon: commandIcons.addRowAbove,
|
3707
|
-
svgIcon: commandSVGIcons.addRowAbove,
|
3708
|
-
id: 'addRowAbove',
|
3709
|
-
}, {
|
3710
|
-
text: this.messageFor('addRowBelow'),
|
3711
|
-
icon: commandIcons.addRowBelow,
|
3712
|
-
svgIcon: commandSVGIcons.addRowBelow,
|
3713
|
-
id: 'addRowBelow',
|
3714
|
-
}, {
|
3715
|
-
text: this.messageFor('deleteRow'),
|
3716
|
-
icon: commandIcons.deleteRow,
|
3717
|
-
svgIcon: commandSVGIcons.deleteRow,
|
3718
|
-
id: 'deleteRow',
|
3719
|
-
}, {
|
3720
|
-
text: this.messageFor('hideRow'),
|
3721
|
-
icon: commandIcons.hideRow,
|
3722
|
-
svgIcon: commandSVGIcons.hideRow,
|
3723
|
-
id: 'hideRow',
|
3724
|
-
}, {
|
3725
|
-
text: this.messageFor('unhideRow'),
|
3726
|
-
icon: commandIcons.unhideRow,
|
3727
|
-
svgIcon: commandSVGIcons.unhideRow,
|
3728
|
-
id: 'unhideRow',
|
3729
|
-
disabled: !unhide
|
3730
|
-
});
|
3731
|
-
}
|
3732
|
-
if (target === 'columnheader') {
|
3733
|
-
commonItems.push({
|
3734
|
-
separator: true
|
3735
|
-
}, {
|
3736
|
-
text: this.messageFor('addColumnLeft'),
|
3737
|
-
icon: commandIcons.addColumnLeft,
|
3738
|
-
svgIcon: commandSVGIcons.addColumnLeft,
|
3739
|
-
id: 'addColumnLeft',
|
3740
|
-
}, {
|
3741
|
-
text: this.messageFor('addColumnRight'),
|
3742
|
-
icon: commandIcons.addColumnRight,
|
3743
|
-
svgIcon: commandSVGIcons.addColumnRight,
|
3744
|
-
id: 'addColumnRight',
|
3745
|
-
}, {
|
3746
|
-
text: this.messageFor('deleteColumn'),
|
3747
|
-
icon: commandIcons.deleteColumn,
|
3748
|
-
svgIcon: commandSVGIcons.deleteColumn,
|
3749
|
-
id: 'deleteColumn',
|
3750
|
-
}, {
|
3751
|
-
text: this.messageFor('hideColumn'),
|
3752
|
-
icon: commandIcons.hideColumn,
|
3753
|
-
svgIcon: commandSVGIcons.hideColumn,
|
3754
|
-
id: 'hideColumn',
|
3755
|
-
}, {
|
3756
|
-
text: this.messageFor('unhideColumn'),
|
3757
|
-
icon: commandIcons.unhideColumn,
|
3758
|
-
svgIcon: commandSVGIcons.unhideColumn,
|
3759
|
-
id: 'unhideColumn',
|
3760
|
-
disabled: !unhide
|
3761
|
-
});
|
3762
|
-
}
|
3763
|
-
return commonItems;
|
3764
|
-
}
|
3765
|
-
openLinkDialog() {
|
3766
|
-
var _a, _b;
|
3767
|
-
const hasLink = isPresent((_a = this.currentRange) === null || _a === void 0 ? void 0 : _a.link());
|
3768
|
-
const dialogSettings = {
|
3769
|
-
appendTo: this.spreadsheetService.dialogContainer,
|
3770
|
-
title: this.localization.get('insertLink'),
|
3771
|
-
content: InsertLinkDialogComponent,
|
3772
|
-
actions: [{
|
3773
|
-
text: this.localization.get('dialogInsert'),
|
3774
|
-
themeColor: 'primary'
|
3775
|
-
}, {
|
3776
|
-
text: this.localization.get('dialogCancel')
|
3777
|
-
},
|
3778
|
-
'spacer', {
|
3779
|
-
text: this.localization.get('dialogRemoveLink'),
|
3780
|
-
themeColor: 'primary',
|
3781
|
-
fillMode: 'clear',
|
3782
|
-
cssClass: hasLink ? '' : 'k-disabled'
|
3783
|
-
}],
|
3784
|
-
actionsLayout: 'start',
|
3785
|
-
width: 400,
|
3786
|
-
autoFocusedElement: '.k-textbox > .k-input-inner'
|
3787
|
-
};
|
3788
|
-
const dialog = this.dialogService.open(dialogSettings);
|
3789
|
-
const dialogInstance = dialog.dialog.instance;
|
3790
|
-
const dialogContent = dialog.content.instance;
|
3791
|
-
if (hasLink) {
|
3792
|
-
dialogContent.setData({ link: (_b = this.currentRange) === null || _b === void 0 ? void 0 : _b.link() });
|
3793
|
-
}
|
3794
|
-
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
3795
|
-
if (event.text === this.localization.get('dialogCancel')) {
|
3796
|
-
return;
|
3797
|
-
}
|
3798
|
-
let link = null;
|
3799
|
-
if (event.text === this.localization.get('dialogInsert')) {
|
3800
|
-
link = dialogContent.urlLink || null;
|
3801
|
-
}
|
3802
|
-
this.spreadsheetService.spreadsheet.executeCommand({
|
3803
|
-
command: 'HyperlinkCommand',
|
3804
|
-
options: { link }
|
3805
|
-
});
|
3806
|
-
});
|
3807
|
-
}
|
3808
|
-
}
|
3809
|
-
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1$3.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ErrorHandlingService }, { token: i1$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
3810
|
-
SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetComponent, isStandalone: true, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", formulaListMaxHeight: "formulaListMaxHeight", 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: [
|
3811
|
-
SpreadsheetLocalizationService,
|
3812
|
-
SpreadsheetService,
|
3813
|
-
{
|
3814
|
-
provide: LocalizationService,
|
3815
|
-
useExisting: SpreadsheetLocalizationService
|
3816
|
-
},
|
3817
|
-
{
|
3818
|
-
provide: L10N_PREFIX,
|
3819
|
-
useValue: 'kendo.spreadsheet'
|
3820
|
-
},
|
3821
|
-
SpreadsheetToolsService,
|
3822
|
-
PopupService,
|
3823
|
-
ErrorHandlingService
|
3824
|
-
], 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 }, { propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true }], exportAs: ["kendo-spreadsheet"], usesOnChanges: true, ngImport: i0, template: `
|
3825
|
-
<ng-container
|
3826
|
-
kendoSpreadsheetLocalizedMessages
|
3827
|
-
i18n-background="kendo.spreadsheet.background|The title of the tool that changes the text background color."
|
3828
|
-
background="Background color"
|
3829
|
-
i18n-color="kendo.spreadsheet.color|The title of the tool that changes the text font color."
|
3830
|
-
color="Font color"
|
3831
|
-
i18n-bold="kendo.spreadsheet.bold|The title of the Bold tool."
|
3832
|
-
bold="Bold"
|
3833
|
-
i18n-italic="kendo.spreadsheet.italic|The title of the Italic tool."
|
3834
|
-
italic="Italic"
|
3835
|
-
i18n-underline="kendo.spreadsheet.underline|The title of the Underline tool."
|
3836
|
-
underline="Underline"
|
3837
|
-
i18n-loadFile="kendo.spreadsheet.loadFile|The title of the Load File tool."
|
3838
|
-
loadFile="Open..."
|
3839
|
-
i18n-saveFile="kendo.spreadsheet.saveFile|The title of the Save File tool."
|
3840
|
-
saveFile="Export..."
|
3841
|
-
i18n-format="kendo.spreadsheet.format|The text of the Format tool."
|
3842
|
-
format="Custom format..."
|
3843
|
-
i18n-fontFamily="kendo.spreadsheet.fontFamily|The text of the Font Family tool."
|
3844
|
-
fontFamily="Font"
|
3845
|
-
i18n-fontSize="kendo.spreadsheet.fontSize|The text of the Font Size tool."
|
3846
|
-
fontSize="Font size"
|
3847
|
-
i18n-home="kendo.spreadsheet.home|The text of the Home toolbar tab."
|
3848
|
-
home="Home"
|
3849
|
-
i18n-file="kendo.spreadsheet.file|The text of the File toolbar tab."
|
3850
|
-
file="File"
|
3851
|
-
i18n-insert="kendo.spreadsheet.insert|The text of the Insert toolbar tab."
|
3852
|
-
insert="Insert"
|
3853
|
-
i18n-formatTab="kendo.spreadsheet.formatTab|The text of the Format toolbar tab."
|
3854
|
-
formatTab="Format"
|
3855
|
-
i18n-view="kendo.spreadsheet.view|The text of the View toolbar tab."
|
3856
|
-
view="View"
|
3857
|
-
i18n-undo="kendo.spreadsheet.undo|The title of the Undo tool."
|
3858
|
-
undo="Undo"
|
3859
|
-
i18n-redo="kendo.spreadsheet.redo|The title of the Redo tool."
|
3860
|
-
redo="Redo"
|
3861
|
-
i18n-gridLines="kendo.spreadsheet.gridLines|The title of the Grid Lines tool."
|
3862
|
-
gridLines="Toggle grid lines"
|
3863
|
-
i18n-addColumnLeft="kendo.spreadsheet.addColumnLeft|The title of the tool that adds new column before currently selected column."
|
3864
|
-
addColumnLeft="Add column left"
|
3865
|
-
i18n-addColumnRight="kendo.spreadsheet.addColumnRight|The title of the tool that adds new column after currently selected column."
|
3866
|
-
addColumnRight="Add column right"
|
3867
|
-
i18n-addRowBelow="kendo.spreadsheet.addRowBelow|The title of the tool that adds new row below currently selected row."
|
3868
|
-
addRowBelow="Add row below"
|
3869
|
-
i18n-addRowAbove="kendo.spreadsheet.addRowAbove|The title of the tool that adds new row above currently selected row."
|
3870
|
-
addRowAbove="Add row above"
|
3871
|
-
i18n-deleteColumn="kendo.spreadsheet.deleteColumn|The title of the tool that deletes a column."
|
3872
|
-
deleteColumn="Delete column"
|
3873
|
-
i18n-deleteRow="kendo.spreadsheet.deleteRow|The title of the tool that deletes a row."
|
3874
|
-
deleteRow="Delete row"
|
3875
|
-
i18n-wrap="kendo.spreadsheet.wrap|The title of the Text Wrap tool."
|
3876
|
-
wrap="Text wrap"
|
3877
|
-
i18n-align="kendo.spreadsheet.align|The title of the Text Align tool."
|
3878
|
-
align="Align"
|
3879
|
-
i18n-alignHorizontal="kendo.spreadsheet.alignHorizontal|The title of the Text Align Horizontal tool."
|
3880
|
-
alignHorizontal="Align horizontally"
|
3881
|
-
i18n-alignVertical="kendo.spreadsheet.alignVertical|The title of the Text Align Vertical tool."
|
3882
|
-
alignVertical="Align vertically"
|
3883
|
-
i18n-alignLeft="kendo.spreadsheet.alignLeft|The title of the Text Align Left tool."
|
3884
|
-
alignLeft="Align Left"
|
3885
|
-
i18n-alignCenter="kendo.spreadsheet.alignCenter|The title of the Text Align Center tool."
|
3886
|
-
alignCenter="Align Center"
|
3887
|
-
i18n-alignRight="kendo.spreadsheet.alignRight|The title of the Text Align Right tool."
|
3888
|
-
alignRight="Align Right"
|
3889
|
-
i18n-alignJustify="kendo.spreadsheet.alignJustify|The title of the Text Align Justify tool."
|
3890
|
-
alignJustify="Align Justify"
|
3891
|
-
i18n-alignTop="kendo.spreadsheet.alignTop|The title of the Text Align Top tool."
|
3892
|
-
alignTop="Align Top"
|
3893
|
-
i18n-alignMiddle="kendo.spreadsheet.alignMiddle|The title of the Text Align Middle tool."
|
3894
|
-
alignMiddle="Align Middle"
|
3895
|
-
i18n-alignBottom="kendo.spreadsheet.alignBottom|The title of the Text Align Bottom tool."
|
3896
|
-
alignBottom="Align Bottom"
|
3897
|
-
i18n-merge="kendo.spreadsheet.merge|The title of the Cells Merge tool."
|
3898
|
-
merge="Merge"
|
3899
|
-
i18n-mergeAll="kendo.spreadsheet.mergeAll|The title of the Merge all tool."
|
3900
|
-
mergeAll="Merge all"
|
3901
|
-
i18n-mergeHorizontally="kendo.spreadsheet.mergeHorizontally|The title of the Merge horizontally tool."
|
3902
|
-
mergeHorizontally="Merge horizontally"
|
3903
|
-
i18n-mergeVertically="kendo.spreadsheet.mergeVertically|The title of the Merge vertically tool."
|
3904
|
-
mergeVertically="Merge vertically"
|
3905
|
-
i18n-unmerge="kendo.spreadsheet.unmerge|The title of the Unmerge tool."
|
3906
|
-
unmerge="Unmerge"
|
3907
|
-
i18n-insertLink="kendo.spreadsheet.insertLink|The title of the tool that inserts a link."
|
3908
|
-
insertLink="Insert link"
|
3909
|
-
i18n-decreaseDecimal="kendo.spreadsheet.decreaseDecimal|The title of the tool that decreases decimals."
|
3910
|
-
decreaseDecimal="Decrease decimal"
|
3911
|
-
i18n-increaseDecimal="kendo.spreadsheet.increaseDecimal|The title of the tool that increases decimals."
|
3912
|
-
increaseDecimal="Increase decimal"
|
3913
|
-
i18n-increaseFontSize="kendo.spreadsheet.increaseFontSize|The title of the tool that increases the cell font size."
|
3914
|
-
increaseFontSize="Increase font size"
|
3915
|
-
i18n-decreaseFontSize="kendo.spreadsheet.decreaseFontSize|The title of the tool that decreases the cell font size."
|
3916
|
-
decreaseFontSize="Decrease font size"
|
3917
|
-
i18n-dialogApply="kendo.spreadsheet.dialogApply|The text of the **Apply** button in all Spreadsheet dialogs."
|
3918
|
-
dialogApply="Apply"
|
3919
|
-
i18n-dialogCancel="kendo.spreadsheet.dialogCancel|The text of the **Cancel** button in all Spreadsheet dialogs."
|
3920
|
-
dialogCancel="Cancel"
|
3921
|
-
i18n-dialogDelete="kendo.spreadsheet.dialogDelete|The text of the **Delete** button in the Delete sheet dialog."
|
3922
|
-
dialogDelete="Delete"
|
3923
|
-
i18n-dialogRename="kendo.spreadsheet.dialogRename|The text of the **Rename** button in the Rename sheet dialog."
|
3924
|
-
dialogRename="Rename"
|
3925
|
-
i18n-dialogInsert="kendo.spreadsheet.dialogInsert|The text of the **Insert** button in all Spreadsheet dialogs."
|
3926
|
-
dialogInsert="Insert"
|
3927
|
-
i18n-dialogRemoveLink="kendo.spreadsheet.dialogRemoveLink|The text of the **Remove link** button in the Link tool dialog."
|
3928
|
-
dialogRemoveLink="Remove link"
|
3929
|
-
i18n-rename="kendo.spreadsheet.rename|The title of the Rename sheet dialog."
|
3930
|
-
rename="Rename Sheet"
|
3931
|
-
i18n-delete="kendo.spreadsheet.delete|The title of the Delete sheet dialog."
|
3932
|
-
delete="Delete Sheet"
|
3933
|
-
i18n-nameBox="kendo.spreadsheet.nameBox|The title of the Name Box input."
|
3934
|
-
nameBox="Name Box"
|
3935
|
-
i18n-formulaInput="kendo.spreadsheet.formulaInput|The title of the Formula input."
|
3936
|
-
formulaInput="Formula Input"
|
3937
|
-
i18n-addSheet="kendo.spreadsheet.addSheet|The title of the Add new sheet button."
|
3938
|
-
addSheet="Add New Sheet"
|
3939
|
-
i18n-sheetsMenu="kendo.spreadsheet.sheetsMenu|The title of the Sheets menu button."
|
3940
|
-
sheetsMenu="All Sheets"
|
3941
|
-
i18n-openUnsupported="kendo.spreadsheet.openUnsupported|The content of the dialog that warns about an unsupported file type."
|
3942
|
-
openUnsupported="Unsupported format. Please select an .xlsx file."
|
3943
|
-
i18n-modifyMerged="kendo.spreadsheet.modifyMerged|The content of the dialog that warns about modifying a merged cell."
|
3944
|
-
modifyMerged="Cannot change part of a merged cell."
|
3945
|
-
i18n-cannotModifyDisabled="kendo.spreadsheet.cannotModifyDisabled|The content of the dialog that warns about modifying a disabled cell."
|
3946
|
-
cannotModifyDisabled="Cannot modify disabled cells."
|
3947
|
-
i18n-dialogOk="kendo.spreadsheet.dialogOk|The text of the **OK** dialog button."
|
3948
|
-
dialogOk="OK"
|
3949
|
-
i18n-dialogError="kendo.spreadsheet.dialogError|The title of an error dialog."
|
3950
|
-
dialogError="Error"
|
3951
|
-
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
3952
|
-
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
3953
|
-
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
3954
|
-
copy="Copy"
|
3955
|
-
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
3956
|
-
cut="Cut"
|
3957
|
-
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
3958
|
-
paste="Paste (use Ctrl/⌘ + V)"
|
3959
|
-
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
3960
|
-
hideRow="Hide"
|
3961
|
-
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
3962
|
-
unhideRow="Unhide"
|
3963
|
-
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
3964
|
-
hideColumn="Hide"
|
3965
|
-
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
3966
|
-
unhideColumn="Unhide"
|
3967
|
-
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
3968
|
-
sheetDelete="Delete"
|
3969
|
-
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
3970
|
-
sheetRename="Rename"
|
3971
|
-
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
3972
|
-
sheetDuplicate="Duplicate"
|
3973
|
-
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
3974
|
-
sheetHide="Hide"
|
3975
|
-
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
3976
|
-
sheetMoveLeft="Move Left"
|
3977
|
-
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
3978
|
-
sheetMoveRight="Move Right"
|
3979
|
-
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
3980
|
-
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
3981
|
-
</ng-container>
|
3982
|
-
<div class="k-spreadsheet-header">
|
3983
|
-
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
3984
|
-
<kendo-menu-item *ngFor="let item of menuItems" [text]="item.text" [cssClass]="item.cssClass"></kendo-menu-item>
|
3985
|
-
</kendo-menu>
|
3986
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'file'"
|
3987
|
-
[attr.aria-label]="messageFor('file')"
|
3988
|
-
class="k-spreadsheet-toolbar"
|
3989
|
-
[overflow]="overflow">
|
3990
|
-
<kendo-spreadsheet-load-file-tool></kendo-spreadsheet-load-file-tool>
|
3991
|
-
<kendo-toolbar-button kendoSpreadsheetSaveFile></kendo-toolbar-button>
|
3992
|
-
</kendo-toolbar>
|
3993
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'home'"
|
3994
|
-
[attr.aria-label]="messageFor('home')"
|
3995
|
-
class="k-spreadsheet-toolbar"
|
3996
|
-
[overflow]="overflow">
|
3997
|
-
<kendo-toolbar-buttongroup>
|
3998
|
-
<kendo-toolbar-button kendoSpreadsheetUndo></kendo-toolbar-button>
|
3999
|
-
<kendo-toolbar-button kendoSpreadsheetRedo></kendo-toolbar-button>
|
4000
|
-
</kendo-toolbar-buttongroup>
|
4001
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4002
|
-
<kendo-toolbar-dropdownlist kendoSpreadsheetFontFamily></kendo-toolbar-dropdownlist>
|
4003
|
-
<kendo-toolbar-dropdownlist kendoSpreadsheetFontSize></kendo-toolbar-dropdownlist>
|
4004
|
-
<kendo-toolbar-button kendoSpreadsheetIncreaseFontSize></kendo-toolbar-button>
|
4005
|
-
<kendo-toolbar-button kendoSpreadsheetDecreaseFontSize></kendo-toolbar-button>
|
4006
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4007
|
-
<kendo-toolbar-buttongroup>
|
4008
|
-
<kendo-toolbar-button kendoSpreadsheetBold></kendo-toolbar-button>
|
4009
|
-
<kendo-toolbar-button kendoSpreadsheetItalic></kendo-toolbar-button>
|
4010
|
-
<kendo-toolbar-button kendoSpreadsheetUnderline></kendo-toolbar-button>
|
4011
|
-
</kendo-toolbar-buttongroup>
|
4012
|
-
<kendo-spreadsheet-forecolor-tool></kendo-spreadsheet-forecolor-tool>
|
4013
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4014
|
-
<kendo-spreadsheet-backcolor-tool></kendo-spreadsheet-backcolor-tool>
|
4015
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4016
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetHorizontalTextAlign></kendo-toolbar-dropdownbutton>
|
4017
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetVerticalTextAlign></kendo-toolbar-dropdownbutton>
|
4018
|
-
<kendo-toolbar-button kendoSpreadsheetTextWrap></kendo-toolbar-button>
|
4019
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4020
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetFormat></kendo-toolbar-dropdownbutton>
|
4021
|
-
</kendo-toolbar>
|
4022
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'insert'"
|
4023
|
-
[attr.aria-label]="messageFor('insert')"
|
4024
|
-
class="k-spreadsheet-toolbar"
|
4025
|
-
[overflow]="overflow">
|
4026
|
-
<kendo-toolbar-button kendoSpreadsheetInsertLink></kendo-toolbar-button>
|
4027
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4028
|
-
<kendo-toolbar-button kendoSpreadsheetAddColumnLeftButton></kendo-toolbar-button>
|
4029
|
-
<kendo-toolbar-button kendoSpreadsheetAddColumnRightButton></kendo-toolbar-button>
|
4030
|
-
<kendo-toolbar-button kendoSpreadsheetAddRowBelowButton></kendo-toolbar-button>
|
4031
|
-
<kendo-toolbar-button kendoSpreadsheetAddRowAboveButton></kendo-toolbar-button>
|
4032
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4033
|
-
<kendo-toolbar-button kendoSpreadsheetDeleteColumnButton></kendo-toolbar-button>
|
4034
|
-
<kendo-toolbar-button kendoSpreadsheetDeleteRowButton></kendo-toolbar-button>
|
4035
|
-
</kendo-toolbar>
|
4036
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'format'"
|
4037
|
-
[attr.aria-label]="messageFor('formatTab')"
|
4038
|
-
class="k-spreadsheet-toolbar"
|
4039
|
-
[overflow]="overflow">
|
4040
|
-
<kendo-toolbar-button kendoSpreadsheetDecreaseDecimal></kendo-toolbar-button>
|
4041
|
-
<kendo-toolbar-button kendoSpreadsheetIncreaseDecimal></kendo-toolbar-button>
|
4042
|
-
</kendo-toolbar>
|
4043
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'view'"
|
4044
|
-
[attr.aria-label]="messageFor('view')"
|
4045
|
-
class="k-spreadsheet-toolbar"
|
4046
|
-
[overflow]="overflow">
|
4047
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetMerge></kendo-toolbar-dropdownbutton>
|
4048
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4049
|
-
<kendo-toolbar-button kendoSpreadsheetGridLines></kendo-toolbar-button>
|
4050
|
-
</kendo-toolbar>
|
4051
|
-
</div>
|
4052
|
-
<div class="k-spreadsheet-action-bar">
|
4053
|
-
<div #nameBox kendoSpreadsheetNameBox [spreadsheetWidget]="spreadsheetWidget"></div>
|
4054
|
-
<div class="k-spreadsheet-formula-bar">
|
4055
|
-
<span class="k-separator k-separator-vertical"></span>
|
4056
|
-
<kendo-icon-wrapper
|
4057
|
-
name="formula-fx"
|
4058
|
-
[svgIcon]="formulaFxIcon">
|
4059
|
-
</kendo-icon-wrapper>
|
4060
|
-
<span class="k-separator k-separator-vertical"></span>
|
4061
|
-
<div
|
4062
|
-
#formulaBar
|
4063
|
-
kendoSpreadsheetFormulaInput
|
4064
|
-
[formulaListMaxHeight]="formulaListMaxHeight"
|
4065
|
-
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
4066
|
-
</div>
|
4067
|
-
</div>
|
4068
|
-
<div class="k-spreadsheet-view">
|
4069
|
-
<div class="k-spreadsheet-fixed-container"></div>
|
4070
|
-
<div class="k-spreadsheet-scroller">
|
4071
|
-
<div class="k-spreadsheet-view-size"></div>
|
4072
|
-
</div>
|
4073
|
-
<div tabIndex="0" class="k-spreadsheet-clipboard" contentEditable="true"></div>
|
4074
|
-
<div #formulaCell kendoSpreadsheetFormulaInput class="k-spreadsheet-cell-editor" data-role="formulainput"></div>
|
4075
|
-
</div>
|
4076
|
-
<div class="k-spreadsheet-sheets-bar"
|
4077
|
-
kendoSpreadsheetSheetsBar
|
4078
|
-
[sheets]="sheetsInfo"
|
4079
|
-
[sheetDescriptors]="sheets">
|
4080
|
-
</div>
|
4081
|
-
<ng-container #dialogContainer></ng-container>
|
4082
|
-
|
4083
|
-
<kendo-contextmenu
|
4084
|
-
#contextMenu
|
4085
|
-
[items]="contextMenuItems"
|
4086
|
-
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4087
|
-
|
4088
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
4089
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoSpreadsheetLocalizedMessages]" }, { kind: "component", type: MenuComponent, selector: "kendo-menu", inputs: ["appendTo", "menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }, { kind: "directive", type: MainMenuDirective, selector: "[kendoSpreadsheetMenu]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MenuItemComponent, selector: "kendo-menu-item", inputs: ["text", "url", "disabled", "cssClass", "cssStyle", "icon", "svgIcon", "data", "separator"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "tabindex", "size", "tabIndex"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: SpreadsheetLoadFileComponent, selector: "kendo-spreadsheet-load-file-tool" }, { kind: "component", type: 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"] }, { kind: "directive", type: SpreadsheetSaveFileDirective, selector: "[kendoSpreadsheetSaveFile]" }, { kind: "component", type: ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: ["disabled", "selection", "width", "look"], exportAs: ["kendoToolBarButtonGroup"] }, { kind: "directive", type: SpreadsheetUndoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUndo]" }, { kind: "directive", type: SpreadsheetRedoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetRedo]" }, { kind: "component", type: ToolBarSeparatorComponent, selector: "kendo-toolbar-separator", exportAs: ["kendoToolBarSeparator"] }, { kind: "component", type: SpreadsheetFontFamilyComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontFamily]" }, { kind: "component", type: SpreadsheetFontSizeComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontSize]" }, { kind: "directive", type: SpreadsheetIncreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]" }, { kind: "directive", type: SpreadsheetDecreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]" }, { kind: "directive", type: SpreadsheetBoldDirective, selector: "kendo-toolbar-button[kendoSpreadsheetBold]" }, { kind: "directive", type: SpreadsheetItalicDirective, selector: "kendo-toolbar-button[kendoSpreadsheetItalic]" }, { kind: "directive", type: SpreadsheetUnderlineDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUnderline]" }, { kind: "component", type: SpreadsheetForeColorComponent, selector: "kendo-spreadsheet-forecolor-tool" }, { kind: "component", type: SpreadsheetBackColorComponent, selector: "kendo-spreadsheet-backcolor-tool" }, { kind: "component", type: 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"] }, { kind: "directive", type: SpreadsheetHorizontalTextAlignDirective, selector: "[kendoSpreadsheetHorizontalTextAlign]" }, { kind: "directive", type: SpreadsheetVerticalTextAlignDirective, selector: "[kendoSpreadsheetVerticalTextAlign]" }, { kind: "directive", type: SpreadsheetTextWrapDirective, selector: "kendo-toolbar-button[kendoSpreadsheetTextWrap]" }, { kind: "directive", type: SpreadsheetFormatDirective, selector: "[kendoSpreadsheetFormat]" }, { kind: "directive", type: SpreadsheetInsertLinkDirective, selector: "kendo-toolbar-button[kendoSpreadsheetInsertLink]" }, { kind: "directive", type: SpreadsheetAddColumnLeftButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnLeftButton]" }, { kind: "directive", type: SpreadsheetAddColumnRightButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnRightButton]" }, { kind: "directive", type: SpreadsheetAddRowBelowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowBelowButton]" }, { kind: "directive", type: SpreadsheetAddRowAboveButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowAboveButton]" }, { kind: "directive", type: SpreadsheetDeleteColumnButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteColumnButton]" }, { kind: "directive", type: SpreadsheetDeleteRowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteRowButton]" }, { kind: "directive", type: SpreadsheetDecreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]" }, { kind: "directive", type: SpreadsheetIncreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]" }, { kind: "directive", type: SpreadsheetMergeDirective, selector: "[kendoSpreadsheetMerge]" }, { kind: "directive", type: SpreadsheetGridLinesDirective, selector: "kendo-toolbar-button[kendoSpreadsheetGridLines]" }, { kind: "component", type: NameBoxComponent, selector: "[kendoSpreadsheetNameBox]", inputs: ["data", "spreadsheetWidget"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FormulaInputDirective, selector: "[kendoSpreadsheetFormulaInput]", inputs: ["formulaListMaxHeight"] }, { kind: "component", type: SheetsBarComponent, selector: "[kendoSpreadsheetSheetsBar]", inputs: ["sheets", "sheetDescriptors"] }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
|
4090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetComponent, decorators: [{
|
4091
|
-
type: Component,
|
4092
|
-
args: [{
|
4093
|
-
exportAs: 'kendo-spreadsheet',
|
4094
|
-
selector: 'kendo-spreadsheet',
|
4095
|
-
providers: [
|
4096
|
-
SpreadsheetLocalizationService,
|
4097
|
-
SpreadsheetService,
|
4098
|
-
{
|
4099
|
-
provide: LocalizationService,
|
4100
|
-
useExisting: SpreadsheetLocalizationService
|
4101
|
-
},
|
4102
|
-
{
|
4103
|
-
provide: L10N_PREFIX,
|
4104
|
-
useValue: 'kendo.spreadsheet'
|
4105
|
-
},
|
4106
|
-
SpreadsheetToolsService,
|
4107
|
-
PopupService,
|
4108
|
-
ErrorHandlingService
|
4109
|
-
],
|
4110
|
-
template: `
|
4111
|
-
<ng-container
|
4112
|
-
kendoSpreadsheetLocalizedMessages
|
4113
|
-
i18n-background="kendo.spreadsheet.background|The title of the tool that changes the text background color."
|
4114
|
-
background="Background color"
|
4115
|
-
i18n-color="kendo.spreadsheet.color|The title of the tool that changes the text font color."
|
4116
|
-
color="Font color"
|
4117
|
-
i18n-bold="kendo.spreadsheet.bold|The title of the Bold tool."
|
4118
|
-
bold="Bold"
|
4119
|
-
i18n-italic="kendo.spreadsheet.italic|The title of the Italic tool."
|
4120
|
-
italic="Italic"
|
4121
|
-
i18n-underline="kendo.spreadsheet.underline|The title of the Underline tool."
|
4122
|
-
underline="Underline"
|
4123
|
-
i18n-loadFile="kendo.spreadsheet.loadFile|The title of the Load File tool."
|
4124
|
-
loadFile="Open..."
|
4125
|
-
i18n-saveFile="kendo.spreadsheet.saveFile|The title of the Save File tool."
|
4126
|
-
saveFile="Export..."
|
4127
|
-
i18n-format="kendo.spreadsheet.format|The text of the Format tool."
|
4128
|
-
format="Custom format..."
|
4129
|
-
i18n-fontFamily="kendo.spreadsheet.fontFamily|The text of the Font Family tool."
|
4130
|
-
fontFamily="Font"
|
4131
|
-
i18n-fontSize="kendo.spreadsheet.fontSize|The text of the Font Size tool."
|
4132
|
-
fontSize="Font size"
|
4133
|
-
i18n-home="kendo.spreadsheet.home|The text of the Home toolbar tab."
|
4134
|
-
home="Home"
|
4135
|
-
i18n-file="kendo.spreadsheet.file|The text of the File toolbar tab."
|
4136
|
-
file="File"
|
4137
|
-
i18n-insert="kendo.spreadsheet.insert|The text of the Insert toolbar tab."
|
4138
|
-
insert="Insert"
|
4139
|
-
i18n-formatTab="kendo.spreadsheet.formatTab|The text of the Format toolbar tab."
|
4140
|
-
formatTab="Format"
|
4141
|
-
i18n-view="kendo.spreadsheet.view|The text of the View toolbar tab."
|
4142
|
-
view="View"
|
4143
|
-
i18n-undo="kendo.spreadsheet.undo|The title of the Undo tool."
|
4144
|
-
undo="Undo"
|
4145
|
-
i18n-redo="kendo.spreadsheet.redo|The title of the Redo tool."
|
4146
|
-
redo="Redo"
|
4147
|
-
i18n-gridLines="kendo.spreadsheet.gridLines|The title of the Grid Lines tool."
|
4148
|
-
gridLines="Toggle grid lines"
|
4149
|
-
i18n-addColumnLeft="kendo.spreadsheet.addColumnLeft|The title of the tool that adds new column before currently selected column."
|
4150
|
-
addColumnLeft="Add column left"
|
4151
|
-
i18n-addColumnRight="kendo.spreadsheet.addColumnRight|The title of the tool that adds new column after currently selected column."
|
4152
|
-
addColumnRight="Add column right"
|
4153
|
-
i18n-addRowBelow="kendo.spreadsheet.addRowBelow|The title of the tool that adds new row below currently selected row."
|
4154
|
-
addRowBelow="Add row below"
|
4155
|
-
i18n-addRowAbove="kendo.spreadsheet.addRowAbove|The title of the tool that adds new row above currently selected row."
|
4156
|
-
addRowAbove="Add row above"
|
4157
|
-
i18n-deleteColumn="kendo.spreadsheet.deleteColumn|The title of the tool that deletes a column."
|
4158
|
-
deleteColumn="Delete column"
|
4159
|
-
i18n-deleteRow="kendo.spreadsheet.deleteRow|The title of the tool that deletes a row."
|
4160
|
-
deleteRow="Delete row"
|
4161
|
-
i18n-wrap="kendo.spreadsheet.wrap|The title of the Text Wrap tool."
|
4162
|
-
wrap="Text wrap"
|
4163
|
-
i18n-align="kendo.spreadsheet.align|The title of the Text Align tool."
|
4164
|
-
align="Align"
|
4165
|
-
i18n-alignHorizontal="kendo.spreadsheet.alignHorizontal|The title of the Text Align Horizontal tool."
|
4166
|
-
alignHorizontal="Align horizontally"
|
4167
|
-
i18n-alignVertical="kendo.spreadsheet.alignVertical|The title of the Text Align Vertical tool."
|
4168
|
-
alignVertical="Align vertically"
|
4169
|
-
i18n-alignLeft="kendo.spreadsheet.alignLeft|The title of the Text Align Left tool."
|
4170
|
-
alignLeft="Align Left"
|
4171
|
-
i18n-alignCenter="kendo.spreadsheet.alignCenter|The title of the Text Align Center tool."
|
4172
|
-
alignCenter="Align Center"
|
4173
|
-
i18n-alignRight="kendo.spreadsheet.alignRight|The title of the Text Align Right tool."
|
4174
|
-
alignRight="Align Right"
|
4175
|
-
i18n-alignJustify="kendo.spreadsheet.alignJustify|The title of the Text Align Justify tool."
|
4176
|
-
alignJustify="Align Justify"
|
4177
|
-
i18n-alignTop="kendo.spreadsheet.alignTop|The title of the Text Align Top tool."
|
4178
|
-
alignTop="Align Top"
|
4179
|
-
i18n-alignMiddle="kendo.spreadsheet.alignMiddle|The title of the Text Align Middle tool."
|
4180
|
-
alignMiddle="Align Middle"
|
4181
|
-
i18n-alignBottom="kendo.spreadsheet.alignBottom|The title of the Text Align Bottom tool."
|
4182
|
-
alignBottom="Align Bottom"
|
4183
|
-
i18n-merge="kendo.spreadsheet.merge|The title of the Cells Merge tool."
|
4184
|
-
merge="Merge"
|
4185
|
-
i18n-mergeAll="kendo.spreadsheet.mergeAll|The title of the Merge all tool."
|
4186
|
-
mergeAll="Merge all"
|
4187
|
-
i18n-mergeHorizontally="kendo.spreadsheet.mergeHorizontally|The title of the Merge horizontally tool."
|
4188
|
-
mergeHorizontally="Merge horizontally"
|
4189
|
-
i18n-mergeVertically="kendo.spreadsheet.mergeVertically|The title of the Merge vertically tool."
|
4190
|
-
mergeVertically="Merge vertically"
|
4191
|
-
i18n-unmerge="kendo.spreadsheet.unmerge|The title of the Unmerge tool."
|
4192
|
-
unmerge="Unmerge"
|
4193
|
-
i18n-insertLink="kendo.spreadsheet.insertLink|The title of the tool that inserts a link."
|
4194
|
-
insertLink="Insert link"
|
4195
|
-
i18n-decreaseDecimal="kendo.spreadsheet.decreaseDecimal|The title of the tool that decreases decimals."
|
4196
|
-
decreaseDecimal="Decrease decimal"
|
4197
|
-
i18n-increaseDecimal="kendo.spreadsheet.increaseDecimal|The title of the tool that increases decimals."
|
4198
|
-
increaseDecimal="Increase decimal"
|
4199
|
-
i18n-increaseFontSize="kendo.spreadsheet.increaseFontSize|The title of the tool that increases the cell font size."
|
4200
|
-
increaseFontSize="Increase font size"
|
4201
|
-
i18n-decreaseFontSize="kendo.spreadsheet.decreaseFontSize|The title of the tool that decreases the cell font size."
|
4202
|
-
decreaseFontSize="Decrease font size"
|
4203
|
-
i18n-dialogApply="kendo.spreadsheet.dialogApply|The text of the **Apply** button in all Spreadsheet dialogs."
|
4204
|
-
dialogApply="Apply"
|
4205
|
-
i18n-dialogCancel="kendo.spreadsheet.dialogCancel|The text of the **Cancel** button in all Spreadsheet dialogs."
|
4206
|
-
dialogCancel="Cancel"
|
4207
|
-
i18n-dialogDelete="kendo.spreadsheet.dialogDelete|The text of the **Delete** button in the Delete sheet dialog."
|
4208
|
-
dialogDelete="Delete"
|
4209
|
-
i18n-dialogRename="kendo.spreadsheet.dialogRename|The text of the **Rename** button in the Rename sheet dialog."
|
4210
|
-
dialogRename="Rename"
|
4211
|
-
i18n-dialogInsert="kendo.spreadsheet.dialogInsert|The text of the **Insert** button in all Spreadsheet dialogs."
|
4212
|
-
dialogInsert="Insert"
|
4213
|
-
i18n-dialogRemoveLink="kendo.spreadsheet.dialogRemoveLink|The text of the **Remove link** button in the Link tool dialog."
|
4214
|
-
dialogRemoveLink="Remove link"
|
4215
|
-
i18n-rename="kendo.spreadsheet.rename|The title of the Rename sheet dialog."
|
4216
|
-
rename="Rename Sheet"
|
4217
|
-
i18n-delete="kendo.spreadsheet.delete|The title of the Delete sheet dialog."
|
4218
|
-
delete="Delete Sheet"
|
4219
|
-
i18n-nameBox="kendo.spreadsheet.nameBox|The title of the Name Box input."
|
4220
|
-
nameBox="Name Box"
|
4221
|
-
i18n-formulaInput="kendo.spreadsheet.formulaInput|The title of the Formula input."
|
4222
|
-
formulaInput="Formula Input"
|
4223
|
-
i18n-addSheet="kendo.spreadsheet.addSheet|The title of the Add new sheet button."
|
4224
|
-
addSheet="Add New Sheet"
|
4225
|
-
i18n-sheetsMenu="kendo.spreadsheet.sheetsMenu|The title of the Sheets menu button."
|
4226
|
-
sheetsMenu="All Sheets"
|
4227
|
-
i18n-openUnsupported="kendo.spreadsheet.openUnsupported|The content of the dialog that warns about an unsupported file type."
|
4228
|
-
openUnsupported="Unsupported format. Please select an .xlsx file."
|
4229
|
-
i18n-modifyMerged="kendo.spreadsheet.modifyMerged|The content of the dialog that warns about modifying a merged cell."
|
4230
|
-
modifyMerged="Cannot change part of a merged cell."
|
4231
|
-
i18n-cannotModifyDisabled="kendo.spreadsheet.cannotModifyDisabled|The content of the dialog that warns about modifying a disabled cell."
|
4232
|
-
cannotModifyDisabled="Cannot modify disabled cells."
|
4233
|
-
i18n-dialogOk="kendo.spreadsheet.dialogOk|The text of the **OK** dialog button."
|
4234
|
-
dialogOk="OK"
|
4235
|
-
i18n-dialogError="kendo.spreadsheet.dialogError|The title of an error dialog."
|
4236
|
-
dialogError="Error"
|
4237
|
-
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
4238
|
-
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
4239
|
-
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
4240
|
-
copy="Copy"
|
4241
|
-
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
4242
|
-
cut="Cut"
|
4243
|
-
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
4244
|
-
paste="Paste (use Ctrl/⌘ + V)"
|
4245
|
-
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
4246
|
-
hideRow="Hide"
|
4247
|
-
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
4248
|
-
unhideRow="Unhide"
|
4249
|
-
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
4250
|
-
hideColumn="Hide"
|
4251
|
-
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
4252
|
-
unhideColumn="Unhide"
|
4253
|
-
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
4254
|
-
sheetDelete="Delete"
|
4255
|
-
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
4256
|
-
sheetRename="Rename"
|
4257
|
-
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
4258
|
-
sheetDuplicate="Duplicate"
|
4259
|
-
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
4260
|
-
sheetHide="Hide"
|
4261
|
-
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
4262
|
-
sheetMoveLeft="Move Left"
|
4263
|
-
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
4264
|
-
sheetMoveRight="Move Right"
|
4265
|
-
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
4266
|
-
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
4267
|
-
</ng-container>
|
4268
|
-
<div class="k-spreadsheet-header">
|
4269
|
-
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
4270
|
-
<kendo-menu-item *ngFor="let item of menuItems" [text]="item.text" [cssClass]="item.cssClass"></kendo-menu-item>
|
4271
|
-
</kendo-menu>
|
4272
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'file'"
|
4273
|
-
[attr.aria-label]="messageFor('file')"
|
4274
|
-
class="k-spreadsheet-toolbar"
|
4275
|
-
[overflow]="overflow">
|
4276
|
-
<kendo-spreadsheet-load-file-tool></kendo-spreadsheet-load-file-tool>
|
4277
|
-
<kendo-toolbar-button kendoSpreadsheetSaveFile></kendo-toolbar-button>
|
4278
|
-
</kendo-toolbar>
|
4279
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'home'"
|
4280
|
-
[attr.aria-label]="messageFor('home')"
|
4281
|
-
class="k-spreadsheet-toolbar"
|
4282
|
-
[overflow]="overflow">
|
4283
|
-
<kendo-toolbar-buttongroup>
|
4284
|
-
<kendo-toolbar-button kendoSpreadsheetUndo></kendo-toolbar-button>
|
4285
|
-
<kendo-toolbar-button kendoSpreadsheetRedo></kendo-toolbar-button>
|
4286
|
-
</kendo-toolbar-buttongroup>
|
4287
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4288
|
-
<kendo-toolbar-dropdownlist kendoSpreadsheetFontFamily></kendo-toolbar-dropdownlist>
|
4289
|
-
<kendo-toolbar-dropdownlist kendoSpreadsheetFontSize></kendo-toolbar-dropdownlist>
|
4290
|
-
<kendo-toolbar-button kendoSpreadsheetIncreaseFontSize></kendo-toolbar-button>
|
4291
|
-
<kendo-toolbar-button kendoSpreadsheetDecreaseFontSize></kendo-toolbar-button>
|
4292
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4293
|
-
<kendo-toolbar-buttongroup>
|
4294
|
-
<kendo-toolbar-button kendoSpreadsheetBold></kendo-toolbar-button>
|
4295
|
-
<kendo-toolbar-button kendoSpreadsheetItalic></kendo-toolbar-button>
|
4296
|
-
<kendo-toolbar-button kendoSpreadsheetUnderline></kendo-toolbar-button>
|
4297
|
-
</kendo-toolbar-buttongroup>
|
4298
|
-
<kendo-spreadsheet-forecolor-tool></kendo-spreadsheet-forecolor-tool>
|
4299
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4300
|
-
<kendo-spreadsheet-backcolor-tool></kendo-spreadsheet-backcolor-tool>
|
4301
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4302
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetHorizontalTextAlign></kendo-toolbar-dropdownbutton>
|
4303
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetVerticalTextAlign></kendo-toolbar-dropdownbutton>
|
4304
|
-
<kendo-toolbar-button kendoSpreadsheetTextWrap></kendo-toolbar-button>
|
4305
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4306
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetFormat></kendo-toolbar-dropdownbutton>
|
4307
|
-
</kendo-toolbar>
|
4308
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'insert'"
|
4309
|
-
[attr.aria-label]="messageFor('insert')"
|
4310
|
-
class="k-spreadsheet-toolbar"
|
4311
|
-
[overflow]="overflow">
|
4312
|
-
<kendo-toolbar-button kendoSpreadsheetInsertLink></kendo-toolbar-button>
|
4313
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4314
|
-
<kendo-toolbar-button kendoSpreadsheetAddColumnLeftButton></kendo-toolbar-button>
|
4315
|
-
<kendo-toolbar-button kendoSpreadsheetAddColumnRightButton></kendo-toolbar-button>
|
4316
|
-
<kendo-toolbar-button kendoSpreadsheetAddRowBelowButton></kendo-toolbar-button>
|
4317
|
-
<kendo-toolbar-button kendoSpreadsheetAddRowAboveButton></kendo-toolbar-button>
|
4318
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4319
|
-
<kendo-toolbar-button kendoSpreadsheetDeleteColumnButton></kendo-toolbar-button>
|
4320
|
-
<kendo-toolbar-button kendoSpreadsheetDeleteRowButton></kendo-toolbar-button>
|
4321
|
-
</kendo-toolbar>
|
4322
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'format'"
|
4323
|
-
[attr.aria-label]="messageFor('formatTab')"
|
4324
|
-
class="k-spreadsheet-toolbar"
|
4325
|
-
[overflow]="overflow">
|
4326
|
-
<kendo-toolbar-button kendoSpreadsheetDecreaseDecimal></kendo-toolbar-button>
|
4327
|
-
<kendo-toolbar-button kendoSpreadsheetIncreaseDecimal></kendo-toolbar-button>
|
4328
|
-
</kendo-toolbar>
|
4329
|
-
<kendo-toolbar *ngIf="selectedMenuItem?.active && selectedMenuItem.id === 'view'"
|
4330
|
-
[attr.aria-label]="messageFor('view')"
|
4331
|
-
class="k-spreadsheet-toolbar"
|
4332
|
-
[overflow]="overflow">
|
4333
|
-
<kendo-toolbar-dropdownbutton kendoSpreadsheetMerge></kendo-toolbar-dropdownbutton>
|
4334
|
-
<kendo-toolbar-separator></kendo-toolbar-separator>
|
4335
|
-
<kendo-toolbar-button kendoSpreadsheetGridLines></kendo-toolbar-button>
|
4336
|
-
</kendo-toolbar>
|
4337
|
-
</div>
|
4338
|
-
<div class="k-spreadsheet-action-bar">
|
4339
|
-
<div #nameBox kendoSpreadsheetNameBox [spreadsheetWidget]="spreadsheetWidget"></div>
|
4340
|
-
<div class="k-spreadsheet-formula-bar">
|
4341
|
-
<span class="k-separator k-separator-vertical"></span>
|
4342
|
-
<kendo-icon-wrapper
|
4343
|
-
name="formula-fx"
|
4344
|
-
[svgIcon]="formulaFxIcon">
|
4345
|
-
</kendo-icon-wrapper>
|
4346
|
-
<span class="k-separator k-separator-vertical"></span>
|
4347
|
-
<div
|
4348
|
-
#formulaBar
|
4349
|
-
kendoSpreadsheetFormulaInput
|
4350
|
-
[formulaListMaxHeight]="formulaListMaxHeight"
|
4351
|
-
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
4352
|
-
</div>
|
4353
|
-
</div>
|
4354
|
-
<div class="k-spreadsheet-view">
|
4355
|
-
<div class="k-spreadsheet-fixed-container"></div>
|
4356
|
-
<div class="k-spreadsheet-scroller">
|
4357
|
-
<div class="k-spreadsheet-view-size"></div>
|
4358
|
-
</div>
|
4359
|
-
<div tabIndex="0" class="k-spreadsheet-clipboard" contentEditable="true"></div>
|
4360
|
-
<div #formulaCell kendoSpreadsheetFormulaInput class="k-spreadsheet-cell-editor" data-role="formulainput"></div>
|
4361
|
-
</div>
|
4362
|
-
<div class="k-spreadsheet-sheets-bar"
|
4363
|
-
kendoSpreadsheetSheetsBar
|
4364
|
-
[sheets]="sheetsInfo"
|
4365
|
-
[sheetDescriptors]="sheets">
|
4366
|
-
</div>
|
4367
|
-
<ng-container #dialogContainer></ng-container>
|
4368
|
-
|
4369
|
-
<kendo-contextmenu
|
4370
|
-
#contextMenu
|
4371
|
-
[items]="contextMenuItems"
|
4372
|
-
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4373
|
-
|
4374
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
4375
|
-
`,
|
4376
|
-
standalone: true,
|
4377
|
-
imports: [LocalizedMessagesDirective, MenuComponent, MainMenuDirective, NgFor, MenuItemComponent, NgIf, ToolBarComponent, SpreadsheetLoadFileComponent, ToolBarButtonComponent, SpreadsheetSaveFileDirective, ToolBarButtonGroupComponent, SpreadsheetUndoDirective, SpreadsheetRedoDirective, ToolBarSeparatorComponent, SpreadsheetFontFamilyComponent, SpreadsheetFontSizeComponent, SpreadsheetIncreaseFontSizeDirective, SpreadsheetDecreaseFontSizeDirective, SpreadsheetBoldDirective, SpreadsheetItalicDirective, SpreadsheetUnderlineDirective, SpreadsheetForeColorComponent, SpreadsheetBackColorComponent, ToolBarDropDownButtonComponent, SpreadsheetHorizontalTextAlignDirective, SpreadsheetVerticalTextAlignDirective, SpreadsheetTextWrapDirective, SpreadsheetFormatDirective, SpreadsheetInsertLinkDirective, SpreadsheetAddColumnLeftButtonDirective, SpreadsheetAddColumnRightButtonDirective, SpreadsheetAddRowBelowButtonDirective, SpreadsheetAddRowAboveButtonDirective, SpreadsheetDeleteColumnButtonDirective, SpreadsheetDeleteRowButtonDirective, SpreadsheetDecreaseDecimalDirective, SpreadsheetIncreaseDecimalDirective, SpreadsheetMergeDirective, SpreadsheetGridLinesDirective, NameBoxComponent, IconWrapperComponent, FormulaInputDirective, SheetsBarComponent, ContextMenuComponent, WatermarkOverlayComponent]
|
4378
|
-
}]
|
4379
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$3.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: ErrorHandlingService }, { type: i1$1.DialogService }]; }, propDecorators: { formulaBarInputRef: [{
|
4380
|
-
type: ViewChild,
|
4381
|
-
args: ['formulaBar', { read: FormulaInputDirective }]
|
4382
|
-
}], formulaCellInputRef: [{
|
4383
|
-
type: ViewChild,
|
4384
|
-
args: ['formulaCell', { read: FormulaInputDirective }]
|
4385
|
-
}], nameBoxRef: [{
|
4386
|
-
type: ViewChild,
|
4387
|
-
args: ['nameBox']
|
4388
|
-
}], dialogContainer: [{
|
4389
|
-
type: ViewChild,
|
4390
|
-
args: ['dialogContainer', { read: ViewContainerRef }]
|
4391
|
-
}], contextMenu: [{
|
4392
|
-
type: ViewChild,
|
4393
|
-
args: ['contextMenu']
|
4394
|
-
}], hostClass: [{
|
4395
|
-
type: HostBinding,
|
4396
|
-
args: ['class.k-spreadsheet']
|
4397
|
-
}], role: [{
|
4398
|
-
type: HostBinding,
|
4399
|
-
args: ['attr.role']
|
4400
|
-
}], menuItems: [{
|
4401
|
-
type: Input
|
4402
|
-
}], overflow: [{
|
4403
|
-
type: Input
|
4404
|
-
}], formulaListMaxHeight: [{
|
4405
|
-
type: Input
|
4406
|
-
}], activeSheet: [{
|
4407
|
-
type: Input
|
4408
|
-
}], sheets: [{
|
4409
|
-
type: Input
|
4410
|
-
}], columns: [{
|
4411
|
-
type: Input
|
4412
|
-
}], columnWidth: [{
|
4413
|
-
type: Input
|
4414
|
-
}], defaultCellStyle: [{
|
4415
|
-
type: Input
|
4416
|
-
}], headerHeight: [{
|
4417
|
-
type: Input
|
4418
|
-
}], headerWidth: [{
|
4419
|
-
type: Input
|
4420
|
-
}], rowHeight: [{
|
4421
|
-
type: Input
|
4422
|
-
}], rows: [{
|
4423
|
-
type: Input
|
4424
|
-
}], images: [{
|
4425
|
-
type: Input
|
4426
|
-
}], excel: [{
|
4427
|
-
type: Input
|
4428
|
-
}], change: [{
|
4429
|
-
type: Output
|
4430
|
-
}], formatChange: [{
|
4431
|
-
type: Output
|
4432
|
-
}], selectionChange: [{
|
4433
|
-
type: Output
|
4434
|
-
}], excelExport: [{
|
4435
|
-
type: Output
|
4436
|
-
}], excelImport: [{
|
4437
|
-
type: Output
|
4438
|
-
}], activeSheetChange: [{
|
4439
|
-
type: Output
|
4440
|
-
}] } });
|
4441
|
-
|
4442
|
-
/**
|
4443
|
-
* Custom component messages override default component messages.
|
4444
|
-
*/
|
4445
|
-
class CustomMessagesComponent extends MessagesDirective {
|
4446
|
-
constructor(service) {
|
4447
|
-
super();
|
4448
|
-
this.service = service;
|
4449
|
-
}
|
4450
|
-
get override() {
|
4451
|
-
return true;
|
4452
|
-
}
|
4453
|
-
}
|
4454
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
4455
|
-
CustomMessagesComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-spreadsheet-messages", providers: [
|
4456
|
-
{
|
4457
|
-
provide: MessagesDirective,
|
4458
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
4459
|
-
}
|
4460
|
-
], usesInheritance: true, ngImport: i0 });
|
4461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
4462
|
-
type: Directive,
|
4463
|
-
args: [{
|
4464
|
-
providers: [
|
4465
|
-
{
|
4466
|
-
provide: MessagesDirective,
|
4467
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
4468
|
-
}
|
4469
|
-
],
|
4470
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
4471
|
-
selector: 'kendo-spreadsheet-messages',
|
4472
|
-
standalone: true
|
4473
|
-
}]
|
4474
|
-
}], ctorParameters: function () { return [{ type: i2.LocalizationService }]; } });
|
4475
|
-
|
4476
|
-
/**
|
4477
|
-
* @hidden
|
4478
|
-
*/
|
4479
|
-
class SpreadsheetTextAlignDirective {
|
4480
|
-
constructor(host, localization, spreadsheetService, toolsService) {
|
4481
|
-
this.host = host;
|
4482
|
-
this.spreadsheetService = spreadsheetService;
|
4483
|
-
this.toolsService = toolsService;
|
4484
|
-
this.commandName = 'align';
|
4485
|
-
this.subs = new Subscription();
|
4486
|
-
host.svgIcon = commandSVGIcons[this.commandName];
|
4487
|
-
host.icon = commandIcons[this.commandName];
|
4488
|
-
host.arrowIcon = true;
|
4489
|
-
host.fillMode = 'flat';
|
4490
|
-
host.data = ALIGNS.map(item => (Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })));
|
4491
|
-
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
4492
|
-
host.title = localization.get(this.commandName);
|
4493
|
-
host.textField = 'textKey';
|
4494
|
-
}
|
4495
|
-
ngOnInit() {
|
4496
|
-
this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[i.commandName] ? 'k-selected' : '')));
|
4497
|
-
}
|
4498
|
-
ngOnDestroy() {
|
4499
|
-
this.subs.unsubscribe();
|
4500
|
-
}
|
4501
|
-
onItemClick(item) {
|
4502
|
-
const value = item.value || null;
|
4503
|
-
const options = {
|
4504
|
-
command: 'PropertyChangeCommand', options: { property: item.commandName, value }
|
4505
|
-
};
|
4506
|
-
this.spreadsheetService.spreadsheet.executeCommand(options);
|
4507
|
-
}
|
4508
|
-
}
|
4509
|
-
SpreadsheetTextAlignDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetTextAlignDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
|
4510
|
-
SpreadsheetTextAlignDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SpreadsheetTextAlignDirective, isStandalone: true, selector: "[kendoSpreadsheetTextAlign]", ngImport: i0 });
|
4511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetTextAlignDirective, decorators: [{
|
4512
|
-
type: Directive,
|
4513
|
-
args: [{
|
4514
|
-
selector: '[kendoSpreadsheetTextAlign]',
|
4515
|
-
standalone: true
|
4516
|
-
}]
|
4517
|
-
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
4518
|
-
|
4519
|
-
/**
|
4520
|
-
* Utility array that contains all `@progress/kendo-angular-spreadsheet` related components and directives.
|
4521
|
-
*/
|
4522
|
-
const KENDO_SPREADSHEET = [
|
4523
|
-
SpreadsheetComponent,
|
4524
|
-
CustomMessagesComponent,
|
4525
|
-
SpreadsheetBoldDirective,
|
4526
|
-
SpreadsheetItalicDirective,
|
4527
|
-
SpreadsheetUnderlineDirective,
|
4528
|
-
SpreadsheetLoadFileComponent,
|
4529
|
-
SpreadsheetSaveFileDirective,
|
4530
|
-
SpreadsheetFormatDirective,
|
4531
|
-
SpreadsheetUndoDirective,
|
4532
|
-
SpreadsheetRedoDirective,
|
4533
|
-
SpreadsheetFontFamilyComponent,
|
4534
|
-
SpreadsheetFontSizeComponent,
|
4535
|
-
SpreadsheetBackColorComponent,
|
4536
|
-
SpreadsheetForeColorComponent,
|
4537
|
-
SpreadsheetGridLinesDirective,
|
4538
|
-
SpreadsheetAddColumnLeftButtonDirective,
|
4539
|
-
SpreadsheetAddColumnRightButtonDirective,
|
4540
|
-
SpreadsheetAddRowAboveButtonDirective,
|
4541
|
-
SpreadsheetAddRowBelowButtonDirective,
|
4542
|
-
SpreadsheetDeleteColumnButtonDirective,
|
4543
|
-
SpreadsheetDeleteRowButtonDirective,
|
4544
|
-
SpreadsheetTextAlignDirective,
|
4545
|
-
SpreadsheetTextWrapDirective,
|
4546
|
-
SpreadsheetMergeDirective,
|
4547
|
-
SpreadsheetInsertLinkDirective,
|
4548
|
-
SpreadsheetIncreaseFontSizeDirective,
|
4549
|
-
SpreadsheetDecreaseFontSizeDirective,
|
4550
|
-
SpreadsheetIncreaseDecimalDirective,
|
4551
|
-
SpreadsheetDecreaseDecimalDirective,
|
4552
|
-
SpreadsheetHorizontalTextAlignDirective,
|
4553
|
-
SpreadsheetVerticalTextAlignDirective
|
4554
|
-
];
|
4555
|
-
|
4556
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
4557
|
-
/**
|
4558
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
4559
|
-
* definition for the Spreadsheet component.
|
4560
|
-
*/
|
4561
|
-
class SpreadsheetModule {
|
4562
|
-
}
|
4563
|
-
SpreadsheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
4564
|
-
SpreadsheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetModule, imports: [SpreadsheetComponent, CustomMessagesComponent, SpreadsheetBoldDirective, SpreadsheetItalicDirective, SpreadsheetUnderlineDirective, SpreadsheetLoadFileComponent, SpreadsheetSaveFileDirective, SpreadsheetFormatDirective, SpreadsheetUndoDirective, SpreadsheetRedoDirective, SpreadsheetFontFamilyComponent, SpreadsheetFontSizeComponent, SpreadsheetBackColorComponent, SpreadsheetForeColorComponent, SpreadsheetGridLinesDirective, SpreadsheetAddColumnLeftButtonDirective, SpreadsheetAddColumnRightButtonDirective, SpreadsheetAddRowAboveButtonDirective, SpreadsheetAddRowBelowButtonDirective, SpreadsheetDeleteColumnButtonDirective, SpreadsheetDeleteRowButtonDirective, SpreadsheetTextAlignDirective, SpreadsheetTextWrapDirective, SpreadsheetMergeDirective, SpreadsheetInsertLinkDirective, SpreadsheetIncreaseFontSizeDirective, SpreadsheetDecreaseFontSizeDirective, SpreadsheetIncreaseDecimalDirective, SpreadsheetDecreaseDecimalDirective, SpreadsheetHorizontalTextAlignDirective, SpreadsheetVerticalTextAlignDirective], exports: [SpreadsheetComponent, CustomMessagesComponent, SpreadsheetBoldDirective, SpreadsheetItalicDirective, SpreadsheetUnderlineDirective, SpreadsheetLoadFileComponent, SpreadsheetSaveFileDirective, SpreadsheetFormatDirective, SpreadsheetUndoDirective, SpreadsheetRedoDirective, SpreadsheetFontFamilyComponent, SpreadsheetFontSizeComponent, SpreadsheetBackColorComponent, SpreadsheetForeColorComponent, SpreadsheetGridLinesDirective, SpreadsheetAddColumnLeftButtonDirective, SpreadsheetAddColumnRightButtonDirective, SpreadsheetAddRowAboveButtonDirective, SpreadsheetAddRowBelowButtonDirective, SpreadsheetDeleteColumnButtonDirective, SpreadsheetDeleteRowButtonDirective, SpreadsheetTextAlignDirective, SpreadsheetTextWrapDirective, SpreadsheetMergeDirective, SpreadsheetInsertLinkDirective, SpreadsheetIncreaseFontSizeDirective, SpreadsheetDecreaseFontSizeDirective, SpreadsheetIncreaseDecimalDirective, SpreadsheetDecreaseDecimalDirective, SpreadsheetHorizontalTextAlignDirective, SpreadsheetVerticalTextAlignDirective] });
|
4565
|
-
SpreadsheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [SpreadsheetComponent, SpreadsheetLoadFileComponent, SpreadsheetFontFamilyComponent, SpreadsheetFontSizeComponent, SpreadsheetBackColorComponent, SpreadsheetForeColorComponent] });
|
4566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpreadsheetModule, decorators: [{
|
4567
|
-
type: NgModule,
|
4568
|
-
args: [{
|
4569
|
-
exports: [...KENDO_SPREADSHEET],
|
4570
|
-
imports: [...KENDO_SPREADSHEET],
|
4571
|
-
providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService]
|
4572
|
-
}]
|
4573
|
-
}] });
|
4574
|
-
|
4575
|
-
/**
|
4576
|
-
* Generated bundle index. Do not edit.
|
4577
|
-
*/
|
4578
|
-
|
4579
|
-
export { CustomMessagesComponent, FormulaInputDirective, FormulaListComponent, KENDO_SPREADSHEET, NameBoxComponent, SheetsBarComponent, SpreadsheetAddColumnLeftButtonDirective, SpreadsheetAddColumnRightButtonDirective, SpreadsheetAddRowAboveButtonDirective, SpreadsheetAddRowBelowButtonDirective, SpreadsheetBackColorComponent, SpreadsheetBoldDirective, SpreadsheetComponent, SpreadsheetDecreaseDecimalDirective, SpreadsheetDecreaseFontSizeDirective, SpreadsheetDeleteColumnButtonDirective, SpreadsheetDeleteRowButtonDirective, SpreadsheetFontFamilyComponent, SpreadsheetFontSizeComponent, SpreadsheetForeColorComponent, SpreadsheetFormatDirective, SpreadsheetGridLinesDirective, SpreadsheetHorizontalTextAlignDirective, SpreadsheetIncreaseDecimalDirective, SpreadsheetIncreaseFontSizeDirective, SpreadsheetInsertLinkDirective, SpreadsheetItalicDirective, SpreadsheetLoadFileComponent, SpreadsheetMergeDirective, SpreadsheetModule, SpreadsheetRedoDirective, SpreadsheetSaveFileDirective, SpreadsheetTextAlignDirective, SpreadsheetTextWrapDirective, SpreadsheetUnderlineDirective, SpreadsheetUndoDirective, SpreadsheetVerticalTextAlignDirective };
|
4580
|
-
|