@progress/kendo-angular-spreadsheet 14.0.0-develop.4 → 14.0.0-develop.6
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/action-bar/formula-input.directive.d.ts +1 -1
- package/common/spreadsheet.service.d.ts +1 -0
- package/esm2020/action-bar/formula-input.directive.mjs +4 -4
- package/esm2020/common/spreadsheet.service.mjs +3 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/sheets-bar/sheets-bar.component.mjs +57 -96
- package/esm2020/spreadsheet.component.mjs +10 -14
- package/esm2020/spreadsheet.module.mjs +2 -5
- package/esm2020/tools/index.mjs +1 -1
- package/esm2020/tools/load-file.component.mjs +3 -0
- package/fesm2015/progress-kendo-angular-spreadsheet.mjs +81 -169
- package/fesm2020/progress-kendo-angular-spreadsheet.mjs +81 -170
- package/models/sheet-info.d.ts +0 -1
- package/package.json +13 -13
- package/schematics/ngAdd/index.js +1 -1
- package/sheets-bar/sheets-bar.component.d.ts +7 -12
- package/spreadsheet.component.d.ts +6 -16
- package/spreadsheet.module.d.ts +14 -15
- package/tools/index.d.ts +1 -1
- package/tools/load-file.component.d.ts +3 -0
- package/esm2020/sheets-bar/spreadsheet-tabstrip.directive.mjs +0 -59
- package/sheets-bar/spreadsheet-tabstrip.directive.d.ts +0 -22
|
@@ -21,6 +21,7 @@ export declare class SpreadsheetService {
|
|
|
21
21
|
get currentActiveSheet(): string;
|
|
22
22
|
get activeSheet(): string;
|
|
23
23
|
get formulaListId(): string;
|
|
24
|
+
get tablistId(): string;
|
|
24
25
|
private _currentActiveSheet;
|
|
25
26
|
notifySheetsChange(actionType: string, sheetInfo?: SheetInfo): void;
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpreadsheetService, never>;
|
|
@@ -19,7 +19,7 @@ export class FormulaInputDirective {
|
|
|
19
19
|
this.spreadsheetService = spreadsheetService;
|
|
20
20
|
this.hostClasses = true;
|
|
21
21
|
this.ariaHasPopup = 'menu';
|
|
22
|
-
this.ariaExpanded =
|
|
22
|
+
this.ariaExpanded = 'false';
|
|
23
23
|
this.focusedItem = () => this.list?.element.nativeElement.querySelector('.k-focus');
|
|
24
24
|
this.unfocus = () => {
|
|
25
25
|
const focused = this.focusedItem();
|
|
@@ -46,7 +46,7 @@ export class FormulaInputDirective {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
get ariaControls() {
|
|
49
|
-
return this.ariaExpanded ? this.spreadsheetService.formulaListId : null;
|
|
49
|
+
return this.ariaExpanded === 'true' ? this.spreadsheetService.formulaListId : null;
|
|
50
50
|
}
|
|
51
51
|
get listElement() {
|
|
52
52
|
return this.list?.element.nativeElement.firstElementChild;
|
|
@@ -103,12 +103,12 @@ export class FormulaInputDirective {
|
|
|
103
103
|
this.list = list;
|
|
104
104
|
list.data = this.data;
|
|
105
105
|
list.itemClick = this.handler;
|
|
106
|
-
this.ariaExpanded = true;
|
|
106
|
+
this.ariaExpanded = 'true';
|
|
107
107
|
},
|
|
108
108
|
close: () => {
|
|
109
109
|
this.popupRef && this.popupRef.close();
|
|
110
110
|
this.popupRef = null;
|
|
111
|
-
this.ariaExpanded =
|
|
111
|
+
this.ariaExpanded = 'false';
|
|
112
112
|
},
|
|
113
113
|
position: () => {
|
|
114
114
|
// contentKey++;
|
|
@@ -27,6 +27,9 @@ export class SpreadsheetService {
|
|
|
27
27
|
get formulaListId() {
|
|
28
28
|
return `k-spreadsheet-${spreadsheetCounter}-formula-list`;
|
|
29
29
|
}
|
|
30
|
+
get tablistId() {
|
|
31
|
+
return `k-spreadsheet-${spreadsheetCounter}-tablist`;
|
|
32
|
+
}
|
|
30
33
|
notifySheetsChange(actionType, sheetInfo) {
|
|
31
34
|
const sheets = this.spreadsheet.sheets();
|
|
32
35
|
this.sheetsChanged.next({ sheets, sheet: sheetInfo, actionType });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-spreadsheet',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '14.0.0-develop.
|
|
12
|
+
publishDate: 1696405867,
|
|
13
|
+
version: '14.0.0-develop.6',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
|
15
15
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, HostBinding,
|
|
5
|
+
import { Component, ElementRef, HostBinding, Input, NgZone, QueryList, Renderer2, ViewChild, ViewChildren } from '@angular/core';
|
|
6
6
|
import { caretAltDownIcon, menuIcon, plusIcon, caretAltLeftIcon, caretAltRightIcon, eyeIcon } from '@progress/kendo-svg-icons';
|
|
7
7
|
import { SpreadsheetService } from '../common/spreadsheet.service';
|
|
8
8
|
import { ButtonComponent, DropDownButtonComponent } from '@progress/kendo-angular-buttons';
|
|
@@ -21,8 +21,7 @@ import * as i3 from "@progress/kendo-angular-dialog";
|
|
|
21
21
|
import * as i4 from "@progress/kendo-angular-buttons";
|
|
22
22
|
import * as i5 from "@progress/kendo-angular-layout";
|
|
23
23
|
import * as i6 from "@progress/kendo-angular-common";
|
|
24
|
-
import * as i7 from "
|
|
25
|
-
import * as i8 from "@angular/common";
|
|
24
|
+
import * as i7 from "@angular/common";
|
|
26
25
|
/**
|
|
27
26
|
* @hidden
|
|
28
27
|
*/
|
|
@@ -43,7 +42,6 @@ export class SheetsBarComponent {
|
|
|
43
42
|
this.selected = false;
|
|
44
43
|
this.openedDdb = null;
|
|
45
44
|
this.eyeIcon = eyeIcon;
|
|
46
|
-
this.focusedEl = null;
|
|
47
45
|
this.onAddClick = () => {
|
|
48
46
|
if (this.spreadsheetService.spreadsheet) {
|
|
49
47
|
this.spreadsheetService.spreadsheet.view.sheetsbar.onAddSelect();
|
|
@@ -52,9 +50,16 @@ export class SheetsBarComponent {
|
|
|
52
50
|
};
|
|
53
51
|
this.actionsCallback = {
|
|
54
52
|
copy: (sheetInfo) => {
|
|
55
|
-
|
|
53
|
+
let copies = 0;
|
|
54
|
+
const regex = this.getCopyRegex(sheetInfo.text);
|
|
55
|
+
this.sheets.forEach(sheet => {
|
|
56
|
+
const isPresent = regex.test(sheet.text);
|
|
57
|
+
if (isPresent) {
|
|
58
|
+
copies += 1;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
56
61
|
const sheetToCopy = this.spreadsheetService.spreadsheet.sheets().find(s => s.name() === sheetInfo.text);
|
|
57
|
-
const newName = `${
|
|
62
|
+
const newName = `${sheetInfo.text} (${copies + 1})`;
|
|
58
63
|
this.spreadsheetService.spreadsheet.insertSheet({ data: { ...sheetToCopy.toJSON(), name: newName }, index: sheetInfo.index + 1 });
|
|
59
64
|
this.selectSheet(newName);
|
|
60
65
|
},
|
|
@@ -67,44 +72,30 @@ export class SheetsBarComponent {
|
|
|
67
72
|
}
|
|
68
73
|
};
|
|
69
74
|
}
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
onFocus() {
|
|
74
|
-
this.renderer.setAttribute(this.element.nativeElement, 'tabindex', '-1');
|
|
75
|
-
this.addButton.focus();
|
|
76
|
-
this.focusedEl = this.addButton;
|
|
77
|
-
}
|
|
78
75
|
get activeSheet() {
|
|
79
76
|
return this.spreadsheetService.spreadsheet?.activeSheet()?.name();
|
|
80
77
|
}
|
|
81
78
|
get sheetsMenuList() {
|
|
82
79
|
return this.sheets?.map(sheet => ({ text: sheet.text, icon: 'eye', svgIcon: this.eyeIcon }));
|
|
83
80
|
}
|
|
81
|
+
get tablistId() {
|
|
82
|
+
return this.spreadsheetService.tablistId;
|
|
83
|
+
}
|
|
84
84
|
ngAfterViewInit() {
|
|
85
85
|
if (!isDocumentAvailable() || !this.element.nativeElement) {
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
const prevBtn = this.element.nativeElement.querySelector('.k-tabstrip-prev');
|
|
89
89
|
const nextBtn = this.element.nativeElement.querySelector('.k-tabstrip-next');
|
|
90
|
+
const tablist = this.element.nativeElement.querySelector('.k-tabstrip-items');
|
|
90
91
|
this.renderer.addClass(prevBtn, 'k-order-1');
|
|
91
92
|
this.renderer.addClass(nextBtn, 'k-order-2');
|
|
92
|
-
this.renderer.setAttribute(
|
|
93
|
-
this.
|
|
93
|
+
this.renderer.setAttribute(tablist, 'id', this.tablistId);
|
|
94
|
+
this.tabListSub = this.renderer.listen(tablist, 'keydown', this.onTabListKeyDown.bind(this));
|
|
94
95
|
}
|
|
95
96
|
ngOnDestroy() {
|
|
96
|
-
if (this.
|
|
97
|
-
this.
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
onTabStripNavigationEnd(ev) {
|
|
101
|
-
if (ev === 'last') {
|
|
102
|
-
this.addButton.focus();
|
|
103
|
-
this.focusedEl = this.addButton;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.menuButton.focus();
|
|
107
|
-
this.focusedEl = this.menuButton;
|
|
97
|
+
if (this.tabListSub) {
|
|
98
|
+
this.tabListSub();
|
|
108
99
|
}
|
|
109
100
|
}
|
|
110
101
|
onTabSelect(ev) {
|
|
@@ -120,6 +111,8 @@ export class SheetsBarComponent {
|
|
|
120
111
|
}
|
|
121
112
|
onClose() {
|
|
122
113
|
this.openedDdb = null;
|
|
114
|
+
const activeTabIdx = this.sheets.findIndex(sheet => sheet.active);
|
|
115
|
+
this.tabstrip.selectTab(activeTabIdx);
|
|
123
116
|
}
|
|
124
117
|
onActionClick(dataItem, sheet) {
|
|
125
118
|
if (dataItem.disabled) {
|
|
@@ -171,6 +164,11 @@ export class SheetsBarComponent {
|
|
|
171
164
|
commandName: dataItem.commandName
|
|
172
165
|
});
|
|
173
166
|
}
|
|
167
|
+
getCopyRegex(sheetName) {
|
|
168
|
+
const newName = sheetName.replaceAll('(', '\\(').replaceAll(')', '\\)');
|
|
169
|
+
const st = `(${newName})\\s?\\(`;
|
|
170
|
+
return new RegExp(st, 's');
|
|
171
|
+
}
|
|
174
172
|
selectSheet(sheetName) {
|
|
175
173
|
const spreadsheetSheet = this.spreadsheetService.spreadsheet.sheets().find(s => s.name() === sheetName);
|
|
176
174
|
this.spreadsheetService.spreadsheet.activeSheet(spreadsheetSheet);
|
|
@@ -178,6 +176,21 @@ export class SheetsBarComponent {
|
|
|
178
176
|
this.spreadsheetService.activeSheetChanged.next(spreadsheetSheet);
|
|
179
177
|
this.notifySheetsChange();
|
|
180
178
|
}
|
|
179
|
+
onTabListKeyDown(ev) {
|
|
180
|
+
const buttonEl = ev.target.querySelector('.k-dropdown-button');
|
|
181
|
+
const index = Array.from(this.actionDdbRefs).findIndex(el => el.nativeElement === buttonEl);
|
|
182
|
+
const ddb = Array.from(this.actionDdbs)[index];
|
|
183
|
+
if (!ddb) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const altKey = ev.altKey;
|
|
187
|
+
const arrowDown = ev.keyCode === Keys.ArrowDown;
|
|
188
|
+
const shouldOpenDdb = altKey && arrowDown && !ddb.isOpen;
|
|
189
|
+
if (shouldOpenDdb) {
|
|
190
|
+
ev.preventDefault();
|
|
191
|
+
ddb.togglePopupVisibility();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
181
194
|
notifySheetsChange() {
|
|
182
195
|
this.ngZone.run(() => {
|
|
183
196
|
const newSheets = this.spreadsheetService.spreadsheet.sheets();
|
|
@@ -194,60 +207,9 @@ export class SheetsBarComponent {
|
|
|
194
207
|
}));
|
|
195
208
|
});
|
|
196
209
|
}
|
|
197
|
-
onHostKeyDown(ev) {
|
|
198
|
-
const activeSheetIndex = this.sheets.find(s => s.name === this.activeSheet).index;
|
|
199
|
-
switch (ev.keyCode) {
|
|
200
|
-
case Keys.ArrowRight:
|
|
201
|
-
this.focusNext(activeSheetIndex);
|
|
202
|
-
break;
|
|
203
|
-
case Keys.ArrowLeft:
|
|
204
|
-
this.focusPrev(activeSheetIndex);
|
|
205
|
-
break;
|
|
206
|
-
case Keys.Tab:
|
|
207
|
-
this.resetNavigation();
|
|
208
|
-
break;
|
|
209
|
-
default:
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
focusNext(sheetIndex) {
|
|
214
|
-
switch (this.focusedEl) {
|
|
215
|
-
case this.addButton:
|
|
216
|
-
this.menuButton.focus();
|
|
217
|
-
this.focusedEl = this.menuButton;
|
|
218
|
-
break;
|
|
219
|
-
case this.menuButton:
|
|
220
|
-
this.tabstrip.selectTab(sheetIndex);
|
|
221
|
-
this.focusedEl = this.tabstrip;
|
|
222
|
-
break;
|
|
223
|
-
default:
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
focusPrev(sheetIndex) {
|
|
228
|
-
switch (this.focusedEl) {
|
|
229
|
-
case this.addButton:
|
|
230
|
-
this.tabstrip.selectTab(sheetIndex);
|
|
231
|
-
this.focusedEl = this.tabstrip;
|
|
232
|
-
break;
|
|
233
|
-
case this.menuButton:
|
|
234
|
-
this.addButton.focus();
|
|
235
|
-
this.focusedEl = this.addButton;
|
|
236
|
-
break;
|
|
237
|
-
default:
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
resetNavigation() {
|
|
242
|
-
if (this.focusedEl !== this.tabstrip) {
|
|
243
|
-
this.focusedEl.blur();
|
|
244
|
-
}
|
|
245
|
-
this.focusedEl = null;
|
|
246
|
-
this.renderer.setAttribute(this.element.nativeElement, 'tabindex', '0');
|
|
247
|
-
}
|
|
248
210
|
}
|
|
249
211
|
SheetsBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SheetsBarComponent, deps: [{ token: i1.SpreadsheetService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.SpreadsheetLocalizationService }, { token: i3.DialogService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
250
|
-
SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SheetsBarComponent, selector: "[kendoSpreadsheetSheetsBar]", inputs: { sheets: "sheets", sheetDescriptors: "sheetDescriptors" }, host: {
|
|
212
|
+
SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SheetsBarComponent, 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 }], ngImport: i0, template: `
|
|
251
213
|
<button kendoButton #addButton
|
|
252
214
|
[title]="messageFor('addSheet')"
|
|
253
215
|
type="button"
|
|
@@ -256,7 +218,7 @@ SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
256
218
|
icon="plus"
|
|
257
219
|
[svgIcon]="plusIcon"
|
|
258
220
|
[kendoEventsOutsideAngular]="{click: onAddClick}"
|
|
259
|
-
[
|
|
221
|
+
[attr.aria-controls]="tablistId">
|
|
260
222
|
</button>
|
|
261
223
|
<kendo-dropdownbutton #menuButton
|
|
262
224
|
fillMode="flat"
|
|
@@ -266,16 +228,14 @@ SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
266
228
|
[data]="sheetsMenuList"
|
|
267
229
|
(itemClick)="onMenuItemClick($event)"
|
|
268
230
|
(open)="onOpen(menuButton)"
|
|
269
|
-
[buttonAttributes]="{title: messageFor('sheetsMenu')}"
|
|
270
|
-
[tabIndex]="-1">
|
|
231
|
+
[buttonAttributes]="{title: messageFor('sheetsMenu'), ariaControls: tablistId}">
|
|
271
232
|
</kendo-dropdownbutton>
|
|
272
|
-
<kendo-tabstrip #tabstrip
|
|
233
|
+
<kendo-tabstrip #tabstrip
|
|
273
234
|
[tabPosition]="'bottom'"
|
|
274
235
|
[showContentArea]="false"
|
|
275
236
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
|
276
237
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
|
277
|
-
(tabSelect)="onTabSelect($event)"
|
|
278
|
-
(navigationEnd)="onTabStripNavigationEnd($event)">
|
|
238
|
+
(tabSelect)="onTabSelect($event)">
|
|
279
239
|
<kendo-tabstrip-tab *ngFor="let sheet of sheets"
|
|
280
240
|
[title]="sheet.text"
|
|
281
241
|
[selected]="sheet.text === activeSheet">
|
|
@@ -296,7 +256,7 @@ SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
296
256
|
</ng-template>
|
|
297
257
|
</kendo-tabstrip-tab>
|
|
298
258
|
</kendo-tabstrip>
|
|
299
|
-
`, isInline: true, components: [{ type: i4.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"] }, { type: i4.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { type: i5.TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { type: i5.TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }], directives: [{ type: i6.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.
|
|
259
|
+
`, isInline: true, components: [{ type: i4.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"] }, { type: i4.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { type: i5.TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { type: i5.TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }], directives: [{ type: i6.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.TabTemplateDirective, selector: "[kendoTabTemplate]" }] });
|
|
300
260
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SheetsBarComponent, decorators: [{
|
|
301
261
|
type: Component,
|
|
302
262
|
args: [{
|
|
@@ -310,7 +270,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
310
270
|
icon="plus"
|
|
311
271
|
[svgIcon]="plusIcon"
|
|
312
272
|
[kendoEventsOutsideAngular]="{click: onAddClick}"
|
|
313
|
-
[
|
|
273
|
+
[attr.aria-controls]="tablistId">
|
|
314
274
|
</button>
|
|
315
275
|
<kendo-dropdownbutton #menuButton
|
|
316
276
|
fillMode="flat"
|
|
@@ -320,16 +280,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
320
280
|
[data]="sheetsMenuList"
|
|
321
281
|
(itemClick)="onMenuItemClick($event)"
|
|
322
282
|
(open)="onOpen(menuButton)"
|
|
323
|
-
[buttonAttributes]="{title: messageFor('sheetsMenu')}"
|
|
324
|
-
[tabIndex]="-1">
|
|
283
|
+
[buttonAttributes]="{title: messageFor('sheetsMenu'), ariaControls: tablistId}">
|
|
325
284
|
</kendo-dropdownbutton>
|
|
326
|
-
<kendo-tabstrip #tabstrip
|
|
285
|
+
<kendo-tabstrip #tabstrip
|
|
327
286
|
[tabPosition]="'bottom'"
|
|
328
287
|
[showContentArea]="false"
|
|
329
288
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
|
330
289
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
|
331
|
-
(tabSelect)="onTabSelect($event)"
|
|
332
|
-
(navigationEnd)="onTabStripNavigationEnd($event)">
|
|
290
|
+
(tabSelect)="onTabSelect($event)">
|
|
333
291
|
<kendo-tabstrip-tab *ngFor="let sheet of sheets"
|
|
334
292
|
[title]="sheet.text"
|
|
335
293
|
[selected]="sheet.text === activeSheet">
|
|
@@ -359,9 +317,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
359
317
|
type: Input
|
|
360
318
|
}], sheetDescriptors: [{
|
|
361
319
|
type: Input
|
|
362
|
-
}], onFocus: [{
|
|
363
|
-
type: HostListener,
|
|
364
|
-
args: ['focus']
|
|
365
320
|
}], addButton: [{
|
|
366
321
|
type: ViewChild,
|
|
367
322
|
args: ['addButton']
|
|
@@ -371,4 +326,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
371
326
|
}], tabstrip: [{
|
|
372
327
|
type: ViewChild,
|
|
373
328
|
args: ['tabstrip']
|
|
329
|
+
}], actionDdbs: [{
|
|
330
|
+
type: ViewChildren,
|
|
331
|
+
args: ['sheetDdb']
|
|
332
|
+
}], actionDdbRefs: [{
|
|
333
|
+
type: ViewChildren,
|
|
334
|
+
args: ['sheetDdb', { read: ElementRef }]
|
|
374
335
|
}] } });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output,
|
|
5
|
+
import { Component, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output, ViewChild, ViewContainerRef } from '@angular/core';
|
|
6
6
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
7
7
|
import { packageMetadata } from './package-metadata';
|
|
8
8
|
import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
@@ -58,14 +58,13 @@ import * as i35 from "./action-bar/formula-input.directive";
|
|
|
58
58
|
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
|
59
59
|
*/
|
|
60
60
|
export class SpreadsheetComponent {
|
|
61
|
-
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService
|
|
61
|
+
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService) {
|
|
62
62
|
this.ngZone = ngZone;
|
|
63
63
|
this.intl = intl;
|
|
64
64
|
this.host = host;
|
|
65
65
|
this.localization = localization;
|
|
66
66
|
this.spreadsheetService = spreadsheetService;
|
|
67
67
|
this.toolsService = toolsService;
|
|
68
|
-
this.renderer = renderer;
|
|
69
68
|
this.hostClass = true;
|
|
70
69
|
this.role = 'application';
|
|
71
70
|
/**
|
|
@@ -82,13 +81,13 @@ export class SpreadsheetComponent {
|
|
|
82
81
|
/**
|
|
83
82
|
* The initial column width in pixels.
|
|
84
83
|
*
|
|
85
|
-
* @default
|
|
84
|
+
* @default 100
|
|
86
85
|
*/
|
|
87
86
|
this.columnWidth = 100;
|
|
88
87
|
/**
|
|
89
88
|
* The height of the header row in pixels.
|
|
90
89
|
*
|
|
91
|
-
* @default
|
|
90
|
+
* @default 30
|
|
92
91
|
*/
|
|
93
92
|
this.headerHeight = 30;
|
|
94
93
|
/**
|
|
@@ -96,11 +95,11 @@ export class SpreadsheetComponent {
|
|
|
96
95
|
*
|
|
97
96
|
* @default 32
|
|
98
97
|
*/
|
|
99
|
-
this.headerWidth =
|
|
98
|
+
this.headerWidth = 32;
|
|
100
99
|
/**
|
|
101
100
|
* The initial row height in pixels.
|
|
102
101
|
*
|
|
103
|
-
* @default
|
|
102
|
+
* @default 30
|
|
104
103
|
*/
|
|
105
104
|
this.rowHeight = 30;
|
|
106
105
|
/**
|
|
@@ -328,9 +327,8 @@ export class SpreadsheetComponent {
|
|
|
328
327
|
defaultCellStyle: this.defaultCellStyle,
|
|
329
328
|
excel: this.excel,
|
|
330
329
|
headerHeight: this.headerHeight,
|
|
331
|
-
headerWidth: this.
|
|
330
|
+
headerWidth: this.headerWidth,
|
|
332
331
|
images: this.images,
|
|
333
|
-
names: this.names,
|
|
334
332
|
rowHeight: this.rowHeight,
|
|
335
333
|
rows: this.rows,
|
|
336
334
|
formulaBarInputRef: { current: this.formulaBarInputRef.current },
|
|
@@ -339,8 +337,8 @@ export class SpreadsheetComponent {
|
|
|
339
337
|
};
|
|
340
338
|
}
|
|
341
339
|
}
|
|
342
|
-
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }
|
|
343
|
-
SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetComponent, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", activeSheet: "activeSheet", sheets: "sheets", columns: "columns", columnWidth: "columnWidth", defaultCellStyle: "defaultCellStyle", headerHeight: "headerHeight", headerWidth: "headerWidth", rowHeight: "rowHeight", rows: "rows",
|
|
340
|
+
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
+
SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetComponent, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", activeSheet: "activeSheet", sheets: "sheets", columns: "columns", columnWidth: "columnWidth", defaultCellStyle: "defaultCellStyle", headerHeight: "headerHeight", headerWidth: "headerWidth", rowHeight: "rowHeight", rows: "rows", images: "images", excel: "excel" }, outputs: { change: "change", formatChange: "formatChange", selectionChange: "selectionChange", excelExport: "excelExport", excelImport: "excelImport", activeSheetChange: "activeSheetChange" }, host: { properties: { "class.k-spreadsheet": "this.hostClass", "attr.role": "this.role" } }, providers: [
|
|
344
342
|
SpreadsheetLocalizationService,
|
|
345
343
|
{
|
|
346
344
|
provide: LocalizationService,
|
|
@@ -671,7 +669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
671
669
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
672
670
|
`,
|
|
673
671
|
}]
|
|
674
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }
|
|
672
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; }, propDecorators: { formulaBarInputRef: [{
|
|
675
673
|
type: ViewChild,
|
|
676
674
|
args: ['formulaBar', { read: FormulaInputDirective }]
|
|
677
675
|
}], formulaCellInputRef: [{
|
|
@@ -711,8 +709,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
711
709
|
type: Input
|
|
712
710
|
}], rows: [{
|
|
713
711
|
type: Input
|
|
714
|
-
}], names: [{
|
|
715
|
-
type: Input
|
|
716
712
|
}], images: [{
|
|
717
713
|
type: Input
|
|
718
714
|
}], excel: [{
|
|
@@ -50,7 +50,6 @@ import { DialogContentComponent } from './tools/shared/dialog-content.component'
|
|
|
50
50
|
import { MenuModule } from '@progress/kendo-angular-menu';
|
|
51
51
|
import { MainMenuDirective } from './common/main-menu.directive';
|
|
52
52
|
import { ActionDialogComponent } from './sheets-bar/action-dialog.component';
|
|
53
|
-
import { SpreadsheetTabStripDirective } from './sheets-bar/spreadsheet-tabstrip.directive';
|
|
54
53
|
import * as i0 from "@angular/core";
|
|
55
54
|
const DIRECTIVES = [
|
|
56
55
|
SpreadsheetComponent,
|
|
@@ -86,8 +85,7 @@ const DIRECTIVES = [
|
|
|
86
85
|
FontSizeDropDownListComponent,
|
|
87
86
|
DialogContentComponent,
|
|
88
87
|
MainMenuDirective,
|
|
89
|
-
ActionDialogComponent
|
|
90
|
-
SpreadsheetTabStripDirective
|
|
88
|
+
ActionDialogComponent
|
|
91
89
|
];
|
|
92
90
|
const EXPORTS = [
|
|
93
91
|
SpreadsheetComponent,
|
|
@@ -154,8 +152,7 @@ SpreadsheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
154
152
|
FontSizeDropDownListComponent,
|
|
155
153
|
DialogContentComponent,
|
|
156
154
|
MainMenuDirective,
|
|
157
|
-
ActionDialogComponent,
|
|
158
|
-
SpreadsheetTabStripDirective], imports: [CommonModule,
|
|
155
|
+
ActionDialogComponent], imports: [CommonModule,
|
|
159
156
|
ButtonsModule,
|
|
160
157
|
ComboBoxModule,
|
|
161
158
|
DropDownListModule,
|
package/esm2020/tools/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export { SpreadsheetUndoDirective } from './history/undo-tool';
|
|
|
11
11
|
export { SpreadsheetBoldDirective } from './typographical-emphasis/bold-tool.directive';
|
|
12
12
|
export { SpreadsheetItalicDirective } from './typographical-emphasis/italic-tool.directive';
|
|
13
13
|
export { SpreadsheetUnderlineDirective } from './typographical-emphasis/underline-tool.directive';
|
|
14
|
-
export { SpreadsheetTextAlignDirective
|
|
14
|
+
export { SpreadsheetTextAlignDirective } from './align-tool.directive';
|
|
15
15
|
export { SpreadsheetFormatDirective } from './format-tool.directive';
|
|
16
16
|
export { SpreadsheetGridLinesDirective } from './gridlines-tool.directive';
|
|
17
17
|
export { SpreadsheetLoadFileComponent } from './load-file.component';
|
|
@@ -14,6 +14,9 @@ import * as i2 from "../common/spreadsheet.service";
|
|
|
14
14
|
import * as i3 from "@progress/kendo-angular-buttons";
|
|
15
15
|
import * as i4 from "@progress/kendo-angular-icons";
|
|
16
16
|
import * as i5 from "@progress/kendo-angular-toolbar";
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
17
20
|
export class SpreadsheetLoadFileComponent extends ToolBarToolComponent {
|
|
18
21
|
constructor(localization, spreadsheetService, toolbar) {
|
|
19
22
|
super();
|