@progress/kendo-angular-spreadsheet 14.2.1-develop.1 → 14.3.0-develop.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-bar/formula-input.directive.d.ts +2 -1
- package/action-bar/list.component.d.ts +2 -1
- package/common/spreadsheet.service.d.ts +1 -0
- package/esm2020/action-bar/formula-input.directive.mjs +22 -2
- package/esm2020/action-bar/list.component.mjs +7 -1
- package/esm2020/common/error-handling.service.mjs +14 -1
- package/esm2020/common/spreadsheet.service.mjs +1 -0
- package/esm2020/localization/messages.mjs +29 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/sheets-bar/action-dialog.component.mjs +1 -1
- package/esm2020/sheets-bar/sheets-bar.component.mjs +136 -59
- package/esm2020/sheets-bar/utils.mjs +22 -18
- package/esm2020/spreadsheet.component.mjs +397 -55
- package/esm2020/spreadsheet.module.mjs +4 -4
- package/esm2020/tools/align/horizontal-align-tool.directive.mjs +1 -3
- package/esm2020/tools/align/vertical-align-tool.directive.mjs +1 -3
- package/esm2020/tools/insert/insert-link-dialog.component.mjs +1 -1
- package/esm2020/tools/insert/insert-link-tool.directive.mjs +4 -1
- package/esm2020/tools/shared/command-icons.mjs +17 -3
- package/esm2020/utils.mjs +6 -1
- package/fesm2015/progress-kendo-angular-spreadsheet.mjs +644 -150
- package/fesm2020/progress-kendo-angular-spreadsheet.mjs +659 -158
- package/localization/messages.d.ts +64 -1
- package/models/sheet-info.d.ts +1 -0
- package/package.json +15 -15
- package/schematics/ngAdd/index.js +1 -1
- package/sheets-bar/sheets-bar.component.d.ts +6 -3
- package/sheets-bar/utils.d.ts +1 -1
- package/spreadsheet.component.d.ts +31 -5
- package/spreadsheet.module.d.ts +1 -1
- package/tools/insert/insert-link-tool.directive.d.ts +1 -0
- package/tools/shared/commands.d.ts +1 -1
- package/utils.d.ts +4 -0
@@ -8,7 +8,7 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
9
9
|
import * as i1$4 from '@progress/kendo-angular-intl';
|
10
10
|
import { localeData, IntlModule } from '@progress/kendo-angular-intl';
|
11
|
-
import { formulaFxIcon, trashIcon, copyIcon, pencilIcon, 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, plusIcon, menuIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon
|
11
|
+
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';
|
12
12
|
import * as i2 from '@progress/kendo-angular-l10n';
|
13
13
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
14
14
|
import * as i3 from '@progress/kendo-angular-common';
|
@@ -23,18 +23,18 @@ import { CommonModule } from '@angular/common';
|
|
23
23
|
import { take, map } from 'rxjs/operators';
|
24
24
|
import * as i1$1 from '@progress/kendo-angular-dialog';
|
25
25
|
import { DialogContentBase, DialogModule } from '@progress/kendo-angular-dialog';
|
26
|
-
import * as
|
27
|
-
import {
|
26
|
+
import * as i2$1 from '@progress/kendo-angular-label';
|
27
|
+
import { LabelModule } from '@progress/kendo-angular-label';
|
28
|
+
import * as i5 from '@progress/kendo-angular-inputs';
|
29
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
30
|
+
import * as i7$1 from '@progress/kendo-angular-menu';
|
31
|
+
import { MenusModule } from '@progress/kendo-angular-menu';
|
28
32
|
import * as i1$2 from '@progress/kendo-angular-toolbar';
|
29
33
|
import { ToolBarToolComponent, ToolBarComponent, ToolBarModule } from '@progress/kendo-angular-toolbar';
|
30
34
|
import * as i4 from '@progress/kendo-angular-buttons';
|
31
35
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
32
36
|
import * as i1$3 from '@progress/kendo-angular-dropdowns';
|
33
37
|
import { DropDownListComponent, ComboBoxModule, DropDownListModule } from '@progress/kendo-angular-dropdowns';
|
34
|
-
import * as i5 from '@progress/kendo-angular-inputs';
|
35
|
-
import { InputsModule } from '@progress/kendo-angular-inputs';
|
36
|
-
import * as i2$1 from '@progress/kendo-angular-label';
|
37
|
-
import { LabelModule } from '@progress/kendo-angular-label';
|
38
38
|
import * as i5$1 from '@progress/kendo-angular-layout';
|
39
39
|
import { TabStripModule } from '@progress/kendo-angular-layout';
|
40
40
|
import { saveAs } from '@progress/kendo-file-saver';
|
@@ -47,8 +47,8 @@ const packageMetadata = {
|
|
47
47
|
name: '@progress/kendo-angular-spreadsheet',
|
48
48
|
productName: 'Kendo UI for Angular',
|
49
49
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
50
|
-
publishDate:
|
51
|
-
version: '14.
|
50
|
+
publishDate: 1702298332,
|
51
|
+
version: '14.3.0-develop.10',
|
52
52
|
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',
|
53
53
|
};
|
54
54
|
|
@@ -150,10 +150,15 @@ const mapToSheetDescriptor = (sheetsArray) => {
|
|
150
150
|
name: sheet.name(),
|
151
151
|
rows: sheet._rows,
|
152
152
|
selection: sheet.selection(),
|
153
|
-
showGridLines: sheet.showGridLines
|
153
|
+
showGridLines: sheet.showGridLines,
|
154
|
+
state: sheet.state()
|
154
155
|
};
|
155
156
|
});
|
156
157
|
};
|
158
|
+
/**
|
159
|
+
* @hidden
|
160
|
+
*/
|
161
|
+
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
157
162
|
|
158
163
|
let spreadsheetCounter = 0;
|
159
164
|
/**
|
@@ -162,6 +167,7 @@ let spreadsheetCounter = 0;
|
|
162
167
|
class SpreadsheetService {
|
163
168
|
constructor() {
|
164
169
|
this.sheetsChanged = new Subject();
|
170
|
+
this.onSheetsBarFocus = new Subject();
|
165
171
|
this.activeSheetChanged = new Subject();
|
166
172
|
this.selectionChanged = new Subject();
|
167
173
|
spreadsheetCounter++;
|
@@ -212,10 +218,12 @@ class FormulaListComponent {
|
|
212
218
|
}
|
213
219
|
}
|
214
220
|
FormulaListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormulaListComponent, deps: [{ token: i0.ElementRef }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Component });
|
215
|
-
FormulaListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormulaListComponent, selector: "kendo-spreadsheet-formula-list", inputs: { data: "data", itemClick: "itemClick" }, host: { properties: { "attr.id": "this.id" } }, ngImport: i0, template: `
|
221
|
+
FormulaListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FormulaListComponent, selector: "kendo-spreadsheet-formula-list", inputs: { maxHeight: "maxHeight", data: "data", itemClick: "itemClick" }, host: { properties: { "attr.id": "this.id" } }, ngImport: i0, template: `
|
216
222
|
<ul #ulRef
|
217
223
|
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
218
224
|
role="menu"
|
225
|
+
[style.overflowY]="'auto'"
|
226
|
+
[style.maxHeight]="maxHeight"
|
219
227
|
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
220
228
|
<li *ngFor="let item of data"
|
221
229
|
(click)="itemClick(item.text)"
|
@@ -237,6 +245,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
237
245
|
<ul #ulRef
|
238
246
|
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
239
247
|
role="menu"
|
248
|
+
[style.overflowY]="'auto'"
|
249
|
+
[style.maxHeight]="maxHeight"
|
240
250
|
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
241
251
|
<li *ngFor="let item of data"
|
242
252
|
(click)="itemClick(item.text)"
|
@@ -254,6 +264,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
254
264
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SpreadsheetService }]; }, propDecorators: { id: [{
|
255
265
|
type: HostBinding,
|
256
266
|
args: ['attr.id']
|
267
|
+
}], maxHeight: [{
|
268
|
+
type: Input
|
257
269
|
}], data: [{
|
258
270
|
type: Input
|
259
271
|
}], itemClick: [{
|
@@ -296,6 +308,23 @@ class FormulaInputDirective {
|
|
296
308
|
}
|
297
309
|
if (next) {
|
298
310
|
next.classList.add('k-focus');
|
311
|
+
const { offsetTop, offsetHeight, parentElement } = next;
|
312
|
+
if (dir > 0) {
|
313
|
+
if (offsetTop + offsetHeight >= parentElement.offsetHeight + parentElement.scrollTop) {
|
314
|
+
parentElement.scrollTop = Math.min(parentElement.scrollTop + offsetHeight, parentElement.scrollHeight - parentElement.offsetHeight);
|
315
|
+
}
|
316
|
+
if (next === items[0]) {
|
317
|
+
next.scrollIntoView();
|
318
|
+
}
|
319
|
+
}
|
320
|
+
else {
|
321
|
+
if (offsetTop <= parentElement.scrollTop) {
|
322
|
+
parentElement.scrollTop = Math.max(parentElement.scrollTop - offsetHeight, 0);
|
323
|
+
}
|
324
|
+
if (next === items[items.length - 1]) {
|
325
|
+
next.scrollIntoView();
|
326
|
+
}
|
327
|
+
}
|
299
328
|
}
|
300
329
|
};
|
301
330
|
}
|
@@ -363,6 +392,7 @@ class FormulaInputDirective {
|
|
363
392
|
this.list = list;
|
364
393
|
list.data = this.data;
|
365
394
|
list.itemClick = this.handler;
|
395
|
+
list.maxHeight = this.formulaListMaxHeight;
|
366
396
|
this.ariaExpanded = 'true';
|
367
397
|
},
|
368
398
|
close: () => {
|
@@ -381,7 +411,7 @@ class FormulaInputDirective {
|
|
381
411
|
}
|
382
412
|
}
|
383
413
|
FormulaInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormulaInputDirective, deps: [{ token: i0.ElementRef }, { token: i1.PopupService }, { token: SpreadsheetService }, { token: SpreadsheetLocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
384
|
-
FormulaInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FormulaInputDirective, selector: "[kendoSpreadsheetFormulaInput]", 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 });
|
414
|
+
FormulaInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FormulaInputDirective, 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 });
|
385
415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormulaInputDirective, decorators: [{
|
386
416
|
type: Directive,
|
387
417
|
args: [{
|
@@ -405,46 +435,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
405
435
|
}], ariaControls: [{
|
406
436
|
type: HostBinding,
|
407
437
|
args: ['attr.aria-controls']
|
438
|
+
}], formulaListMaxHeight: [{
|
439
|
+
type: Input
|
408
440
|
}] } });
|
409
441
|
|
410
442
|
/**
|
411
443
|
* @hidden
|
412
444
|
*/
|
413
|
-
const getSheetActions = (
|
445
|
+
const getSheetActions = (items, item) => {
|
446
|
+
const visibleItems = items.filter(item => item.state === 'visible');
|
447
|
+
const itemIndex = item ? visibleItems.findIndex(i => i === item) : 0;
|
414
448
|
return [{
|
415
|
-
|
449
|
+
messageKey: 'sheetDelete',
|
416
450
|
icon: 'trash',
|
417
451
|
svgIcon: trashIcon,
|
418
452
|
commandName: 'delete',
|
419
453
|
dialogButton: 'dialogDelete',
|
420
|
-
disabled:
|
421
|
-
},
|
422
|
-
|
423
|
-
text: 'Duplicate',
|
454
|
+
disabled: visibleItems.length === 1
|
455
|
+
}, {
|
456
|
+
messageKey: 'sheetDuplicate',
|
424
457
|
icon: 'copy',
|
425
458
|
svgIcon: copyIcon,
|
426
459
|
commandName: 'copy'
|
427
|
-
},
|
428
|
-
|
429
|
-
text: 'Rename',
|
460
|
+
}, {
|
461
|
+
messageKey: 'sheetRename',
|
430
462
|
icon: 'pencil',
|
431
463
|
svgIcon: pencilIcon,
|
432
464
|
commandName: 'rename',
|
433
465
|
dialogButton: 'dialogRename'
|
434
|
-
},
|
435
|
-
|
436
|
-
|
466
|
+
}, {
|
467
|
+
messageKey: 'sheetHide',
|
468
|
+
icon: 'eye-slash',
|
469
|
+
svgIcon: eyeSlashIcon,
|
470
|
+
commandName: 'hide',
|
471
|
+
disabled: visibleItems.length === 1
|
472
|
+
}, {
|
473
|
+
messageKey: 'sheetMoveRight',
|
437
474
|
icon: 'arrow-right',
|
438
475
|
svgIcon: arrowRightIcon,
|
439
476
|
commandName: 'move',
|
440
|
-
disabled:
|
441
|
-
},
|
442
|
-
|
443
|
-
text: 'Move Left',
|
477
|
+
disabled: visibleItems.length === 1 || itemIndex === visibleItems.length - 1
|
478
|
+
}, {
|
479
|
+
messageKey: 'sheetMoveLeft',
|
444
480
|
icon: 'arrow-left',
|
445
481
|
svgIcon: arrowLeftIcon,
|
446
482
|
commandName: 'move',
|
447
|
-
disabled:
|
483
|
+
disabled: visibleItems.length === 1 || itemIndex === 0
|
448
484
|
}];
|
449
485
|
};
|
450
486
|
|
@@ -479,10 +515,22 @@ class ErrorHandlingService {
|
|
479
515
|
}
|
480
516
|
openDialog(messageData) {
|
481
517
|
var _a;
|
518
|
+
let dialogContent;
|
519
|
+
if (messageData.name === 'message') {
|
520
|
+
const localizationMsg = this.messageFor('invalidNameError');
|
521
|
+
let inputValue = messageData.text.split(' ').pop();
|
522
|
+
if (messageData.text.startsWith('Parse')) {
|
523
|
+
inputValue = inputValue.substring(0, inputValue.length - 1);
|
524
|
+
}
|
525
|
+
dialogContent = replaceMessagePlaceholder(localizationMsg, 'inputValue', inputValue);
|
526
|
+
}
|
527
|
+
else {
|
528
|
+
dialogContent = this.messageFor(messageData.name);
|
529
|
+
}
|
482
530
|
const dialogSettings = {
|
483
531
|
appendTo: this.spreadsheetService.dialogContainer,
|
484
532
|
title: this.messageFor('dialogError'),
|
485
|
-
content:
|
533
|
+
content: dialogContent,
|
486
534
|
actions: [{
|
487
535
|
text: this.messageFor('dialogOk'),
|
488
536
|
themeColor: 'primary'
|
@@ -554,7 +602,14 @@ const commandIcons = {
|
|
554
602
|
increaseFontSize: 'font-grow',
|
555
603
|
decreaseFontSize: 'font-shrink',
|
556
604
|
increaseDecimal: 'decimal-increase',
|
557
|
-
decreaseDecimal: 'decimal-decrease'
|
605
|
+
decreaseDecimal: 'decimal-decrease',
|
606
|
+
copy: 'copy',
|
607
|
+
cut: 'cut',
|
608
|
+
paste: 'clipboard',
|
609
|
+
hideRow: 'eye-slash',
|
610
|
+
unhideRow: 'eye',
|
611
|
+
hideColumn: 'eye-slash',
|
612
|
+
unhideColumn: 'eye'
|
558
613
|
};
|
559
614
|
/**
|
560
615
|
* @hidden
|
@@ -599,9 +654,56 @@ const commandSVGIcons = {
|
|
599
654
|
increaseFontSize: fontGrowIcon,
|
600
655
|
decreaseFontSize: fontShrinkIcon,
|
601
656
|
decreaseDecimal: decimalDecreaseIcon,
|
602
|
-
increaseDecimal: decimalIncreaseIcon
|
657
|
+
increaseDecimal: decimalIncreaseIcon,
|
658
|
+
copy: copyIcon,
|
659
|
+
cut: cutIcon,
|
660
|
+
paste: clipboardIcon,
|
661
|
+
hideRow: eyeSlashIcon,
|
662
|
+
unhideRow: eyeIcon,
|
663
|
+
hideColumn: eyeSlashIcon,
|
664
|
+
unhideColumn: eyeIcon
|
603
665
|
};
|
604
666
|
|
667
|
+
/**
|
668
|
+
* @hidden
|
669
|
+
*/
|
670
|
+
class InsertLinkDialogComponent extends DialogContentBase {
|
671
|
+
constructor(dialog) {
|
672
|
+
super(dialog);
|
673
|
+
this.dialog = dialog;
|
674
|
+
this.urlLink = '';
|
675
|
+
}
|
676
|
+
setData(args) {
|
677
|
+
this.urlLink = args.link;
|
678
|
+
}
|
679
|
+
}
|
680
|
+
InsertLinkDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
681
|
+
InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InsertLinkDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
682
|
+
<form class="k-form k-form-md" method="dialog">
|
683
|
+
<div class="k-form-field">
|
684
|
+
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
685
|
+
<kendo-textbox #textbox
|
686
|
+
[(value)]="urlLink">
|
687
|
+
</kendo-textbox>
|
688
|
+
</div>
|
689
|
+
</form>
|
690
|
+
`, isInline: true, components: [{ type: i2$1.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { type: i5.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"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
|
691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
|
692
|
+
type: Component,
|
693
|
+
args: [{
|
694
|
+
template: `
|
695
|
+
<form class="k-form k-form-md" method="dialog">
|
696
|
+
<div class="k-form-field">
|
697
|
+
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
698
|
+
<kendo-textbox #textbox
|
699
|
+
[(value)]="urlLink">
|
700
|
+
</kendo-textbox>
|
701
|
+
</div>
|
702
|
+
</form>
|
703
|
+
`
|
704
|
+
}]
|
705
|
+
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
706
|
+
|
605
707
|
/**
|
606
708
|
* @hidden
|
607
709
|
*/
|
@@ -1707,7 +1809,7 @@ ActionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
1707
1809
|
</div>
|
1708
1810
|
</div>
|
1709
1811
|
</form>
|
1710
|
-
`, isInline: true, components: [{ type: i2$1.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { type: i5.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
1812
|
+
`, isInline: true, components: [{ type: i2$1.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { type: i5.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"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
1711
1813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ActionDialogComponent, decorators: [{
|
1712
1814
|
type: Component,
|
1713
1815
|
args: [{
|
@@ -1745,14 +1847,23 @@ class SheetsBarComponent {
|
|
1745
1847
|
this.dialogService = dialogService;
|
1746
1848
|
this.ngZone = ngZone;
|
1747
1849
|
this.hostClasses = true;
|
1850
|
+
this.subs = new Subscription();
|
1748
1851
|
this.plusIcon = plusIcon;
|
1749
1852
|
this.menuIcon = menuIcon;
|
1750
1853
|
this.caretAltDownIcon = caretAltDownIcon;
|
1751
1854
|
this.caretAltLeftIcon = caretAltLeftIcon;
|
1752
1855
|
this.caretAltRightIcon = caretAltRightIcon;
|
1753
1856
|
this.selected = false;
|
1857
|
+
this.sheetsMenuList = [];
|
1754
1858
|
this.openedDdb = null;
|
1755
|
-
this.
|
1859
|
+
this.hiddenStateIcons = {
|
1860
|
+
hidden: 'eye-slash',
|
1861
|
+
visible: 'eye'
|
1862
|
+
};
|
1863
|
+
this.hiddenStateSVGIcons = {
|
1864
|
+
hidden: eyeSlashIcon,
|
1865
|
+
visible: eyeIcon
|
1866
|
+
};
|
1756
1867
|
this.onAddClick = () => {
|
1757
1868
|
if (this.spreadsheetService.spreadsheet) {
|
1758
1869
|
this.spreadsheetService.spreadsheet.view.sheetsbar.onAddSelect();
|
@@ -1774,23 +1885,55 @@ class SheetsBarComponent {
|
|
1774
1885
|
this.spreadsheetService.spreadsheet.insertSheet({ data: Object.assign(Object.assign({}, sheetToCopy.toJSON()), { name: newName }), index: sheetInfo.index + 1 });
|
1775
1886
|
this.selectSheet(newName);
|
1776
1887
|
},
|
1777
|
-
move: (sheetInfo,
|
1778
|
-
const
|
1779
|
-
|
1888
|
+
move: (sheetInfo, itemKey) => {
|
1889
|
+
const isMoveRight = itemKey === 'sheetMoveRight';
|
1890
|
+
let oldIndex = -1;
|
1891
|
+
let newIndex = -1;
|
1892
|
+
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
1893
|
+
if (isMoveRight) {
|
1894
|
+
for (let i = 0; i < sheets.length; i++) {
|
1895
|
+
if (sheets[i].name() === sheetInfo.text) {
|
1896
|
+
oldIndex = i;
|
1897
|
+
}
|
1898
|
+
if (oldIndex > -1 && i > oldIndex && sheets[i]._state() === 'visible') {
|
1899
|
+
newIndex = i;
|
1900
|
+
break;
|
1901
|
+
}
|
1902
|
+
}
|
1903
|
+
}
|
1904
|
+
else {
|
1905
|
+
for (let i = sheets.length - 1; i >= 0; i--) {
|
1906
|
+
if (sheets[i].name() === sheetInfo.text) {
|
1907
|
+
oldIndex = i;
|
1908
|
+
}
|
1909
|
+
if (oldIndex > -1 && (i < oldIndex) && sheets[i]._state() === 'visible') {
|
1910
|
+
newIndex = i;
|
1911
|
+
break;
|
1912
|
+
}
|
1913
|
+
}
|
1914
|
+
}
|
1780
1915
|
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
1781
1916
|
sheetsBar.onSheetReorderEnd({ oldIndex, newIndex });
|
1917
|
+
this.selectSheet(sheetInfo.text);
|
1918
|
+
this.notifySheetsChange();
|
1919
|
+
},
|
1920
|
+
hide: (sheet) => {
|
1921
|
+
sheet.state = 'hidden';
|
1922
|
+
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
1923
|
+
const sheetIndex = sheets.findIndex(s => s.name() === sheet.text);
|
1924
|
+
sheets[sheetIndex]._state('hidden');
|
1925
|
+
const newSelectedIndex = sheetIndex < sheets.length - 1 ? sheetIndex + 1 : 0;
|
1926
|
+
const sheetToSelect = sheets[newSelectedIndex].name();
|
1927
|
+
this.selectSheet(sheetToSelect);
|
1782
1928
|
this.notifySheetsChange();
|
1783
1929
|
}
|
1784
1930
|
};
|
1931
|
+
this.subs.add(spreadsheetService.onSheetsBarFocus.subscribe(() => ngZone.run(() => this.tabstrip.selectTab(this.sheets.findIndex(sh => sh.text === spreadsheetService.currentActiveSheet)))));
|
1785
1932
|
}
|
1786
1933
|
get activeSheet() {
|
1787
1934
|
var _a, _b;
|
1788
1935
|
return (_b = (_a = this.spreadsheetService.spreadsheet) === null || _a === void 0 ? void 0 : _a.activeSheet()) === null || _b === void 0 ? void 0 : _b.name();
|
1789
1936
|
}
|
1790
|
-
get sheetsMenuList() {
|
1791
|
-
var _a;
|
1792
|
-
return (_a = this.sheets) === null || _a === void 0 ? void 0 : _a.map(sheet => ({ text: sheet.text, icon: 'eye', svgIcon: this.eyeIcon }));
|
1793
|
-
}
|
1794
1937
|
get tablistId() {
|
1795
1938
|
return this.spreadsheetService.tablistId;
|
1796
1939
|
}
|
@@ -1806,10 +1949,24 @@ class SheetsBarComponent {
|
|
1806
1949
|
this.renderer.setAttribute(tablist, 'id', this.tablistId);
|
1807
1950
|
this.tabListSub = this.renderer.listen(tablist, 'keydown', this.onTabListKeyDown.bind(this));
|
1808
1951
|
}
|
1952
|
+
ngOnChanges(changes) {
|
1953
|
+
var _a, _b;
|
1954
|
+
if (changes['sheets']) {
|
1955
|
+
this.sheetsMenuList = (_a = this.sheets) === null || _a === void 0 ? void 0 : _a.map(sheet => ({
|
1956
|
+
text: sheet.text,
|
1957
|
+
icon: this.hiddenStateIcons[sheet.state],
|
1958
|
+
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
1959
|
+
}));
|
1960
|
+
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)
|
1961
|
+
.map(item => (Object.assign(Object.assign({}, item), { text: this.messageFor(item.messageKey) }))) })));
|
1962
|
+
}
|
1963
|
+
;
|
1964
|
+
}
|
1809
1965
|
ngOnDestroy() {
|
1810
1966
|
if (this.tabListSub) {
|
1811
1967
|
this.tabListSub();
|
1812
1968
|
}
|
1969
|
+
this.subs.unsubscribe();
|
1813
1970
|
}
|
1814
1971
|
onTabSelect(ev) {
|
1815
1972
|
if (ev.title !== this.activeSheet) {
|
@@ -1835,11 +1992,13 @@ class SheetsBarComponent {
|
|
1835
1992
|
this.openDialog(dataItem, sheet);
|
1836
1993
|
}
|
1837
1994
|
else {
|
1838
|
-
this.actionsCallback[dataItem.commandName](sheet, dataItem.
|
1995
|
+
this.actionsCallback[dataItem.commandName](sheet, dataItem.messageKey);
|
1839
1996
|
}
|
1840
1997
|
}
|
1841
1998
|
onMenuItemClick(item) {
|
1842
1999
|
const sheet = this.sheets.find(s => s.text === item.text);
|
2000
|
+
sheet.state = 'visible';
|
2001
|
+
this.spreadsheetService.spreadsheet.sheets().find(sh => sh.name() === sheet.text)._state('visible');
|
1843
2002
|
this.selectSheet(sheet.text);
|
1844
2003
|
}
|
1845
2004
|
messageFor(key) {
|
@@ -1866,7 +2025,9 @@ class SheetsBarComponent {
|
|
1866
2025
|
if (event.text === this.messageFor(dataItem.dialogButton)) {
|
1867
2026
|
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
1868
2027
|
if (sheetsBar) {
|
1869
|
-
|
2028
|
+
const allSheets = this.spreadsheetService.spreadsheet.sheets();
|
2029
|
+
const sheetIndex = allSheets.findIndex(s => s.name() === sheet.text);
|
2030
|
+
dataItem.commandName === 'delete' ? sheetsBar.onSheetRemove(sheet.text) : sheetsBar.onSheetRename(dialogContent.value, sheetIndex);
|
1870
2031
|
this.notifySheetsChange();
|
1871
2032
|
}
|
1872
2033
|
}
|
@@ -1906,14 +2067,23 @@ class SheetsBarComponent {
|
|
1906
2067
|
}
|
1907
2068
|
notifySheetsChange() {
|
1908
2069
|
this.ngZone.run(() => {
|
2070
|
+
var _a;
|
1909
2071
|
const newSheets = this.spreadsheetService.spreadsheet.sheets();
|
1910
2072
|
const sheetDesc = mapToSheetDescriptor(newSheets);
|
1911
|
-
this.sheets = sheetDesc
|
2073
|
+
this.sheets = sheetDesc
|
2074
|
+
.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)
|
2075
|
+
.map(item => (Object.assign(Object.assign({}, item), { text: this.messageFor(item.messageKey) }))) })] : []);
|
2076
|
+
this.sheetsMenuList = (_a = this.sheets) === null || _a === void 0 ? void 0 : _a.map(sheet => ({
|
2077
|
+
text: sheet.text,
|
2078
|
+
icon: this.hiddenStateIcons[sheet.state],
|
2079
|
+
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
2080
|
+
}));
|
1912
2081
|
});
|
2082
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.spreadsheetService.spreadsheet.view.clipboard.focus());
|
1913
2083
|
}
|
1914
2084
|
}
|
1915
2085
|
SheetsBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", 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 });
|
1916
|
-
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: `
|
2086
|
+
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 }], usesOnChanges: true, ngImport: i0, template: `
|
1917
2087
|
<button kendoButton #addButton
|
1918
2088
|
[title]="messageFor('addSheet')"
|
1919
2089
|
type="button"
|
@@ -1941,27 +2111,30 @@ SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
1941
2111
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1942
2112
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
1943
2113
|
(tabSelect)="onTabSelect($event)">
|
1944
|
-
<
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
<
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
2114
|
+
<ng-container *ngFor="let sheet of sheets">
|
2115
|
+
<kendo-tabstrip-tab
|
2116
|
+
*ngIf="sheet.state === 'visible'"
|
2117
|
+
[title]="sheet.text"
|
2118
|
+
[selected]="sheet.text === activeSheet">
|
2119
|
+
<ng-template kendoTabTemplate>
|
2120
|
+
<span class="k-link">{{sheet.text}}</span>
|
2121
|
+
<kendo-dropdownbutton #sheetDdb
|
2122
|
+
fillMode="flat"
|
2123
|
+
icon="caret-alt-down"
|
2124
|
+
[svgIcon]="caretAltDownIcon"
|
2125
|
+
buttonClass="k-menu-button"
|
2126
|
+
[data]="sheet.sheetActions"
|
2127
|
+
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
2128
|
+
(open)="onOpen(sheetDdb)"
|
2129
|
+
(close)="onClose()"
|
2130
|
+
(click)="$event.stopPropagation()"
|
2131
|
+
(itemClick)="onActionClick($event, sheet)">
|
2132
|
+
</kendo-dropdownbutton>
|
2133
|
+
</ng-template>
|
2134
|
+
</kendo-tabstrip-tab>
|
2135
|
+
</ng-container>
|
1963
2136
|
</kendo-tabstrip>
|
1964
|
-
`, 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$1.TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { type: i5$1.TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }], directives: [{ type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.TabTemplateDirective, selector: "[kendoTabTemplate]" }] });
|
2137
|
+
`, 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$1.TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { type: i5$1.TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }], directives: [{ type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.TabTemplateDirective, selector: "[kendoTabTemplate]" }] });
|
1965
2138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SheetsBarComponent, decorators: [{
|
1966
2139
|
type: Component,
|
1967
2140
|
args: [{
|
@@ -1994,25 +2167,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
1994
2167
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1995
2168
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
1996
2169
|
(tabSelect)="onTabSelect($event)">
|
1997
|
-
<
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
<
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2170
|
+
<ng-container *ngFor="let sheet of sheets">
|
2171
|
+
<kendo-tabstrip-tab
|
2172
|
+
*ngIf="sheet.state === 'visible'"
|
2173
|
+
[title]="sheet.text"
|
2174
|
+
[selected]="sheet.text === activeSheet">
|
2175
|
+
<ng-template kendoTabTemplate>
|
2176
|
+
<span class="k-link">{{sheet.text}}</span>
|
2177
|
+
<kendo-dropdownbutton #sheetDdb
|
2178
|
+
fillMode="flat"
|
2179
|
+
icon="caret-alt-down"
|
2180
|
+
[svgIcon]="caretAltDownIcon"
|
2181
|
+
buttonClass="k-menu-button"
|
2182
|
+
[data]="sheet.sheetActions"
|
2183
|
+
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
2184
|
+
(open)="onOpen(sheetDdb)"
|
2185
|
+
(close)="onClose()"
|
2186
|
+
(click)="$event.stopPropagation()"
|
2187
|
+
(itemClick)="onActionClick($event, sheet)">
|
2188
|
+
</kendo-dropdownbutton>
|
2189
|
+
</ng-template>
|
2190
|
+
</kendo-tabstrip-tab>
|
2191
|
+
</ng-container>
|
2016
2192
|
</kendo-tabstrip>
|
2017
2193
|
`
|
2018
2194
|
}]
|
@@ -2046,7 +2222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2046
2222
|
class MessagesDirective extends ComponentMessages {
|
2047
2223
|
}
|
2048
2224
|
MessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
2049
|
-
MessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: MessagesDirective, selector: "[kendoSpreadsheetMessages]", inputs: { home: "home", file: "file", insert: "insert", formatTab: "formatTab", saveFile: "saveFile", loadFile: "loadFile", bold: "bold", italic: "italic", underline: "underline", format: "format", fontFamily: "fontFamily", fontSize: "fontSize", undo: "undo", redo: "redo", background: "background", color: "color", gridLines: "gridLines", addColumnLeft: "addColumnLeft", addColumnRight: "addColumnRight", addRowBelow: "addRowBelow", addRowAbove: "addRowAbove", deleteColumn: "deleteColumn", deleteRow: "deleteRow", wrap: "wrap", align: "align", alignHorizontal: "alignHorizontal", alignVertical: "alignVertical", alignLeft: "alignLeft", alignCenter: "alignCenter", alignRight: "alignRight", alignJustify: "alignJustify", alignTop: "alignTop", alignMiddle: "alignMiddle", alignBottom: "alignBottom", dialogApply: "dialogApply", dialogCancel: "dialogCancel", dialogDelete: "dialogDelete", dialogRename: "dialogRename", dialogInsert: "dialogInsert", dialogRemoveLink: "dialogRemoveLink", delete: "delete", rename: "rename", nameBox: "nameBox", 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" }, usesInheritance: true, ngImport: i0 });
|
2225
|
+
MessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: MessagesDirective, selector: "[kendoSpreadsheetMessages]", inputs: { home: "home", file: "file", insert: "insert", formatTab: "formatTab", saveFile: "saveFile", loadFile: "loadFile", bold: "bold", italic: "italic", underline: "underline", format: "format", fontFamily: "fontFamily", fontSize: "fontSize", undo: "undo", redo: "redo", background: "background", color: "color", gridLines: "gridLines", addColumnLeft: "addColumnLeft", addColumnRight: "addColumnRight", addRowBelow: "addRowBelow", addRowAbove: "addRowAbove", deleteColumn: "deleteColumn", deleteRow: "deleteRow", wrap: "wrap", align: "align", alignHorizontal: "alignHorizontal", alignVertical: "alignVertical", alignLeft: "alignLeft", alignCenter: "alignCenter", alignRight: "alignRight", alignJustify: "alignJustify", alignTop: "alignTop", alignMiddle: "alignMiddle", alignBottom: "alignBottom", dialogApply: "dialogApply", dialogCancel: "dialogCancel", dialogDelete: "dialogDelete", dialogRename: "dialogRename", dialogInsert: "dialogInsert", dialogRemoveLink: "dialogRemoveLink", delete: "delete", rename: "rename", nameBox: "nameBox", 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 });
|
2050
2226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, decorators: [{
|
2051
2227
|
type: Directive,
|
2052
2228
|
args: [{
|
@@ -2178,6 +2354,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2178
2354
|
type: Input
|
2179
2355
|
}], duplicateSheetName: [{
|
2180
2356
|
type: Input
|
2357
|
+
}], copy: [{
|
2358
|
+
type: Input
|
2359
|
+
}], cut: [{
|
2360
|
+
type: Input
|
2361
|
+
}], paste: [{
|
2362
|
+
type: Input
|
2363
|
+
}], hideRow: [{
|
2364
|
+
type: Input
|
2365
|
+
}], unhideRow: [{
|
2366
|
+
type: Input
|
2367
|
+
}], hideColumn: [{
|
2368
|
+
type: Input
|
2369
|
+
}], unhideColumn: [{
|
2370
|
+
type: Input
|
2371
|
+
}], sheetDelete: [{
|
2372
|
+
type: Input
|
2373
|
+
}], sheetRename: [{
|
2374
|
+
type: Input
|
2375
|
+
}], sheetHide: [{
|
2376
|
+
type: Input
|
2377
|
+
}], sheetDuplicate: [{
|
2378
|
+
type: Input
|
2379
|
+
}], sheetMoveLeft: [{
|
2380
|
+
type: Input
|
2381
|
+
}], sheetMoveRight: [{
|
2382
|
+
type: Input
|
2383
|
+
}], invalidNameError: [{
|
2384
|
+
type: Input
|
2181
2385
|
}] } });
|
2182
2386
|
|
2183
2387
|
/**
|
@@ -2526,9 +2730,7 @@ class SpreadsheetHorizontalTextAlignDirective {
|
|
2526
2730
|
host.icon = commandIcons[this.commandName];
|
2527
2731
|
host.arrowIcon = true;
|
2528
2732
|
host.fillMode = 'flat';
|
2529
|
-
host.data = ALIGNS
|
2530
|
-
.filter(value => value.commandName === 'textAlign')
|
2531
|
-
.map(item => (Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })));
|
2733
|
+
host.data = ALIGNS.flatMap(item => item.commandName === 'textAlign' ? [Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })] : []);
|
2532
2734
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
2533
2735
|
host.title = localization.get(this.commandName);
|
2534
2736
|
host.textField = 'textKey';
|
@@ -2570,9 +2772,7 @@ class SpreadsheetVerticalTextAlignDirective {
|
|
2570
2772
|
host.icon = commandIcons[this.commandName];
|
2571
2773
|
host.arrowIcon = true;
|
2572
2774
|
host.fillMode = 'flat';
|
2573
|
-
host.data = ALIGNS
|
2574
|
-
.filter(value => value.commandName === 'verticalAlign')
|
2575
|
-
.map(item => (Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })));
|
2775
|
+
host.data = ALIGNS.flatMap(item => item.commandName === 'verticalAlign' ? [Object.assign(Object.assign({}, item), { textKey: localization.get(item.commandId) })] : []);
|
2576
2776
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
2577
2777
|
host.title = localization.get(this.commandName);
|
2578
2778
|
host.textField = 'textKey';
|
@@ -2678,46 +2878,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2678
2878
|
}]
|
2679
2879
|
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2680
2880
|
|
2681
|
-
/**
|
2682
|
-
* @hidden
|
2683
|
-
*/
|
2684
|
-
class InsertLinkDialogComponent extends DialogContentBase {
|
2685
|
-
constructor(dialog) {
|
2686
|
-
super(dialog);
|
2687
|
-
this.dialog = dialog;
|
2688
|
-
this.urlLink = '';
|
2689
|
-
}
|
2690
|
-
setData(args) {
|
2691
|
-
this.urlLink = args.link;
|
2692
|
-
}
|
2693
|
-
}
|
2694
|
-
InsertLinkDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
2695
|
-
InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InsertLinkDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
2696
|
-
<form class="k-form k-form-md" method="dialog">
|
2697
|
-
<div class="k-form-field">
|
2698
|
-
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
2699
|
-
<kendo-textbox #textbox
|
2700
|
-
[(value)]="urlLink">
|
2701
|
-
</kendo-textbox>
|
2702
|
-
</div>
|
2703
|
-
</form>
|
2704
|
-
`, isInline: true, components: [{ type: i2$1.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { type: i5.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
|
2705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
|
2706
|
-
type: Component,
|
2707
|
-
args: [{
|
2708
|
-
template: `
|
2709
|
-
<form class="k-form k-form-md" method="dialog">
|
2710
|
-
<div class="k-form-field">
|
2711
|
-
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
2712
|
-
<kendo-textbox #textbox
|
2713
|
-
[(value)]="urlLink">
|
2714
|
-
</kendo-textbox>
|
2715
|
-
</div>
|
2716
|
-
</form>
|
2717
|
-
`
|
2718
|
-
}]
|
2719
|
-
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
2720
|
-
|
2721
2881
|
/**
|
2722
2882
|
* @hidden
|
2723
2883
|
*/
|
@@ -2727,7 +2887,10 @@ class SpreadsheetInsertLinkDirective extends SpreadsheetCommandButton {
|
|
2727
2887
|
command: 'HyperlinkCommand'
|
2728
2888
|
});
|
2729
2889
|
this.dialogService = dialogService;
|
2730
|
-
spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range);
|
2890
|
+
this.subs.add(spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
2891
|
+
}
|
2892
|
+
ngOnDestroy() {
|
2893
|
+
this.subs.unsubscribe();
|
2731
2894
|
}
|
2732
2895
|
clickHandler() {
|
2733
2896
|
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
@@ -3061,7 +3224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3061
3224
|
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
3062
3225
|
*/
|
3063
3226
|
class SpreadsheetComponent {
|
3064
|
-
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService) {
|
3227
|
+
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService, dialogService) {
|
3065
3228
|
this.ngZone = ngZone;
|
3066
3229
|
this.intl = intl;
|
3067
3230
|
this.host = host;
|
@@ -3069,6 +3232,7 @@ class SpreadsheetComponent {
|
|
3069
3232
|
this.spreadsheetService = spreadsheetService;
|
3070
3233
|
this.toolsService = toolsService;
|
3071
3234
|
this.errorService = errorService;
|
3235
|
+
this.dialogService = dialogService;
|
3072
3236
|
this.hostClass = true;
|
3073
3237
|
this.role = 'application';
|
3074
3238
|
/**
|
@@ -3076,6 +3240,13 @@ class SpreadsheetComponent {
|
|
3076
3240
|
* @default false
|
3077
3241
|
*/
|
3078
3242
|
this.overflow = false;
|
3243
|
+
/**
|
3244
|
+
* Sets the height of the formula list container.
|
3245
|
+
* Accepts same values as the CSS [`style.height`](https://developer.mozilla.org/en-US/docs/Web/CSS/height) property.
|
3246
|
+
*
|
3247
|
+
* @default '300px'
|
3248
|
+
*/
|
3249
|
+
this.formulaListMaxHeight = '300px';
|
3079
3250
|
/**
|
3080
3251
|
* The number of columns in the document.
|
3081
3252
|
*
|
@@ -3144,10 +3315,19 @@ class SpreadsheetComponent {
|
|
3144
3315
|
this.formulaFxIcon = formulaFxIcon;
|
3145
3316
|
this.folderOpenIcon = folderOpenIcon;
|
3146
3317
|
this.downloadIcon = downloadIcon;
|
3318
|
+
this.showLicenseWatermark = false;
|
3319
|
+
this.contextMenuItems = [];
|
3320
|
+
this.subs = new Subscription();
|
3147
3321
|
/**
|
3148
3322
|
* @hidden
|
3149
3323
|
*/
|
3150
|
-
this.
|
3324
|
+
this.onKeyDown = (e) => {
|
3325
|
+
const isCtrl = e.ctrlKey || e.metaKey;
|
3326
|
+
const shift = e.shiftKey;
|
3327
|
+
if (isCtrl && shift && e.keyCode === Keys.KeyS) {
|
3328
|
+
this.spreadsheetService.onSheetsBarFocus.next();
|
3329
|
+
}
|
3330
|
+
};
|
3151
3331
|
this.onChange = (e) => {
|
3152
3332
|
hasObservers(this.change) && this.change.emit(e);
|
3153
3333
|
this.spreadsheetService.selectionChanged.next(e.range);
|
@@ -3242,7 +3422,7 @@ class SpreadsheetComponent {
|
|
3242
3422
|
* An array which defines the document sheets and their content.
|
3243
3423
|
*/
|
3244
3424
|
set sheets(value) {
|
3245
|
-
const items = value.map((item, index, items) => (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
|
3425
|
+
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 })));
|
3246
3426
|
this._sheetsInfo = items;
|
3247
3427
|
}
|
3248
3428
|
get sheetsInfo() {
|
@@ -3264,8 +3444,10 @@ class SpreadsheetComponent {
|
|
3264
3444
|
spreadsheet.bind('changeFormat', this.onChangeFormat);
|
3265
3445
|
spreadsheet.bind('excelImport', this.onExcelImport);
|
3266
3446
|
spreadsheet.bind('excelExport', this.onExcelExport);
|
3447
|
+
spreadsheet.bind('keydown', this.onKeyDown);
|
3267
3448
|
spreadsheet.view.bind('update', this.updateState);
|
3268
3449
|
spreadsheet.view.bind('message', this.onMessage);
|
3450
|
+
spreadsheet.bind('contextmenu', this.onContextMenu.bind(this));
|
3269
3451
|
const sheet = spreadsheet.activeSheet();
|
3270
3452
|
if (sheet) {
|
3271
3453
|
this.updateState({ range: sheet.range(sheet.activeCell()) });
|
@@ -3274,12 +3456,13 @@ class SpreadsheetComponent {
|
|
3274
3456
|
if (!this.sheetsInfo) {
|
3275
3457
|
this.ngZone.run(() => {
|
3276
3458
|
const defaultSheetDescriptors = mapToSheetDescriptor([spreadsheet === null || spreadsheet === void 0 ? void 0 : spreadsheet.activeSheet()]);
|
3277
|
-
this._sheetsInfo = [Object.assign(Object.assign({ text: this.spreadsheetService.currentActiveSheet, first: true, last: true }, defaultSheetDescriptors), { sheetActions: getSheetActions(
|
3459
|
+
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) }))) })];
|
3278
3460
|
});
|
3279
3461
|
}
|
3280
3462
|
});
|
3281
|
-
this.spreadsheetService.sheetsChanged.subscribe(this.onSheetsChanged.bind(this));
|
3282
|
-
this.spreadsheetService.activeSheetChanged.subscribe(this.onActiveSheetChanged.bind(this));
|
3463
|
+
this.subs.add(this.spreadsheetService.sheetsChanged.subscribe(this.onSheetsChanged.bind(this)));
|
3464
|
+
this.subs.add(this.spreadsheetService.activeSheetChanged.subscribe(this.onActiveSheetChanged.bind(this)));
|
3465
|
+
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
3283
3466
|
this.spreadsheetService.dialogContainer = this.dialogContainer;
|
3284
3467
|
});
|
3285
3468
|
}
|
@@ -3303,6 +3486,85 @@ class SpreadsheetComponent {
|
|
3303
3486
|
this.spreadsheetWidget.fromJSON(newOptions);
|
3304
3487
|
}
|
3305
3488
|
}
|
3489
|
+
ngOnDestroy() {
|
3490
|
+
this.subs.unsubscribe();
|
3491
|
+
}
|
3492
|
+
/**
|
3493
|
+
* @hidden
|
3494
|
+
*/
|
3495
|
+
onContextMenu(e) {
|
3496
|
+
if (e.targetType === 'topcorner') {
|
3497
|
+
return;
|
3498
|
+
}
|
3499
|
+
const selection = this.spreadsheetWidget.activeSheet().select();
|
3500
|
+
const { topLeft, bottomRight } = selection;
|
3501
|
+
const isRange = e.targetType === 'cell' && (topLeft.row !== bottomRight.row || topLeft.col !== bottomRight.col);
|
3502
|
+
const targetType = isRange ? 'range' : e.targetType;
|
3503
|
+
this.contextMenuItems = this.contextMenuItemsForTarget(targetType, e.showUnhide, e.showUnmerge);
|
3504
|
+
this.contextMenu.show({ top: e.originalEvent.pageY, left: e.originalEvent.pageX });
|
3505
|
+
}
|
3506
|
+
/**
|
3507
|
+
* @hidden
|
3508
|
+
*/
|
3509
|
+
onContextMenuSelect(e) {
|
3510
|
+
let command;
|
3511
|
+
switch (e.item.id) {
|
3512
|
+
case 'cut':
|
3513
|
+
command = { command: 'ToolbarCutCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3514
|
+
break;
|
3515
|
+
case 'copy':
|
3516
|
+
command = { command: 'ToolbarCopyCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3517
|
+
break;
|
3518
|
+
case 'unmerge':
|
3519
|
+
command = { command: 'MergeCellCommand', options: { value: 'unmerge' } };
|
3520
|
+
break;
|
3521
|
+
case 'mergeAll':
|
3522
|
+
command = { command: 'MergeCellCommand', options: { value: 'cells' } };
|
3523
|
+
break;
|
3524
|
+
case 'mergeHorizontally':
|
3525
|
+
command = { command: 'MergeCellCommand', options: { value: 'horizontally' } };
|
3526
|
+
break;
|
3527
|
+
case 'mergeVertically':
|
3528
|
+
command = { command: 'MergeCellCommand', options: { value: 'vertically' } };
|
3529
|
+
break;
|
3530
|
+
case 'hideRow':
|
3531
|
+
command = { command: 'HideLineCommand', options: { axis: 'row' } };
|
3532
|
+
break;
|
3533
|
+
case 'hideColumn':
|
3534
|
+
command = { command: 'HideLineCommand', options: { axis: 'column' } };
|
3535
|
+
break;
|
3536
|
+
case 'unhideRow':
|
3537
|
+
command = { command: 'UnHideLineCommand', options: { axis: 'row' } };
|
3538
|
+
break;
|
3539
|
+
case 'unhideColumn':
|
3540
|
+
command = { command: 'UnHideLineCommand', options: { axis: 'column' } };
|
3541
|
+
break;
|
3542
|
+
case 'deleteRow':
|
3543
|
+
command = { command: 'DeleteRowCommand' };
|
3544
|
+
break;
|
3545
|
+
case 'deleteColumn':
|
3546
|
+
command = { command: 'DeleteColumnCommand' };
|
3547
|
+
break;
|
3548
|
+
case 'insertLink':
|
3549
|
+
this.openLinkDialog();
|
3550
|
+
break;
|
3551
|
+
case 'addRowAbove':
|
3552
|
+
command = { command: 'AddRowCommand', options: { value: 'above' } };
|
3553
|
+
break;
|
3554
|
+
case 'addRowBelow':
|
3555
|
+
command = { command: 'AddRowCommand', options: { value: 'below' } };
|
3556
|
+
break;
|
3557
|
+
case 'addColumnLeft':
|
3558
|
+
command = { command: 'AddColumnCommand', options: { value: 'left' } };
|
3559
|
+
break;
|
3560
|
+
case 'addColumnRight':
|
3561
|
+
command = { command: 'AddColumnCommand', options: { value: 'right' } };
|
3562
|
+
break;
|
3563
|
+
}
|
3564
|
+
if (command) {
|
3565
|
+
this.spreadsheetWidget.executeCommand(command);
|
3566
|
+
}
|
3567
|
+
}
|
3306
3568
|
/**
|
3307
3569
|
* @hidden
|
3308
3570
|
*/
|
@@ -3343,9 +3605,164 @@ class SpreadsheetComponent {
|
|
3343
3605
|
}
|
3344
3606
|
}), { 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 } });
|
3345
3607
|
}
|
3608
|
+
contextMenuItemsForTarget(target, unhide, unmerge) {
|
3609
|
+
const commonItems = [{
|
3610
|
+
text: this.messageFor('copy'),
|
3611
|
+
icon: commandIcons.copy,
|
3612
|
+
svgIcon: commandSVGIcons.copy,
|
3613
|
+
id: 'copy'
|
3614
|
+
}, {
|
3615
|
+
text: this.messageFor('cut'),
|
3616
|
+
icon: commandIcons.cut,
|
3617
|
+
svgIcon: commandSVGIcons.cut,
|
3618
|
+
id: 'cut'
|
3619
|
+
}, {
|
3620
|
+
text: this.messageFor('paste'),
|
3621
|
+
icon: commandIcons.paste,
|
3622
|
+
svgIcon: commandSVGIcons.paste,
|
3623
|
+
id: 'paste',
|
3624
|
+
disabled: true
|
3625
|
+
}, {
|
3626
|
+
separator: true
|
3627
|
+
}, {
|
3628
|
+
text: this.messageFor('mergeAll'),
|
3629
|
+
icon: commandIcons.mergeAll,
|
3630
|
+
svgIcon: commandSVGIcons.mergeAll,
|
3631
|
+
id: 'mergeAll',
|
3632
|
+
}, {
|
3633
|
+
text: this.messageFor('mergeHorizontally'),
|
3634
|
+
icon: commandIcons.mergeHorizontally,
|
3635
|
+
svgIcon: commandSVGIcons.mergeHorizontally,
|
3636
|
+
id: 'mergeHorizontally',
|
3637
|
+
}, {
|
3638
|
+
text: this.messageFor('mergeVertically'),
|
3639
|
+
icon: commandIcons.mergeVertically,
|
3640
|
+
svgIcon: commandSVGIcons.mergeVertically,
|
3641
|
+
id: 'mergeVertically',
|
3642
|
+
}, {
|
3643
|
+
text: this.messageFor('unmerge'),
|
3644
|
+
icon: commandIcons.unmerge,
|
3645
|
+
svgIcon: commandSVGIcons.unmerge,
|
3646
|
+
id: 'unmerge',
|
3647
|
+
disabled: !unmerge
|
3648
|
+
}, {
|
3649
|
+
separator: true
|
3650
|
+
}, {
|
3651
|
+
text: this.messageFor('insertLink'),
|
3652
|
+
icon: commandIcons.insertLink,
|
3653
|
+
svgIcon: commandSVGIcons.insertLink,
|
3654
|
+
id: 'insertLink'
|
3655
|
+
}];
|
3656
|
+
if (target === 'rowheader') {
|
3657
|
+
commonItems.push({
|
3658
|
+
separator: true
|
3659
|
+
}, {
|
3660
|
+
text: this.messageFor('addRowAbove'),
|
3661
|
+
icon: commandIcons.addRowAbove,
|
3662
|
+
svgIcon: commandSVGIcons.addRowAbove,
|
3663
|
+
id: 'addRowAbove',
|
3664
|
+
}, {
|
3665
|
+
text: this.messageFor('addRowBelow'),
|
3666
|
+
icon: commandIcons.addRowBelow,
|
3667
|
+
svgIcon: commandSVGIcons.addRowBelow,
|
3668
|
+
id: 'addRowBelow',
|
3669
|
+
}, {
|
3670
|
+
text: this.messageFor('deleteRow'),
|
3671
|
+
icon: commandIcons.deleteRow,
|
3672
|
+
svgIcon: commandSVGIcons.deleteRow,
|
3673
|
+
id: 'deleteRow',
|
3674
|
+
}, {
|
3675
|
+
text: this.messageFor('hideRow'),
|
3676
|
+
icon: commandIcons.hideRow,
|
3677
|
+
svgIcon: commandSVGIcons.hideRow,
|
3678
|
+
id: 'hideRow',
|
3679
|
+
}, {
|
3680
|
+
text: this.messageFor('unhideRow'),
|
3681
|
+
icon: commandIcons.unhideRow,
|
3682
|
+
svgIcon: commandSVGIcons.unhideRow,
|
3683
|
+
id: 'unhideRow',
|
3684
|
+
disabled: !unhide
|
3685
|
+
});
|
3686
|
+
}
|
3687
|
+
if (target === 'columnheader') {
|
3688
|
+
commonItems.push({
|
3689
|
+
separator: true
|
3690
|
+
}, {
|
3691
|
+
text: this.messageFor('addColumnLeft'),
|
3692
|
+
icon: commandIcons.addColumnLeft,
|
3693
|
+
svgIcon: commandSVGIcons.addColumnLeft,
|
3694
|
+
id: 'addColumnLeft',
|
3695
|
+
}, {
|
3696
|
+
text: this.messageFor('addColumnRight'),
|
3697
|
+
icon: commandIcons.addColumnRight,
|
3698
|
+
svgIcon: commandSVGIcons.addColumnRight,
|
3699
|
+
id: 'addColumnRight',
|
3700
|
+
}, {
|
3701
|
+
text: this.messageFor('deleteColumn'),
|
3702
|
+
icon: commandIcons.deleteColumn,
|
3703
|
+
svgIcon: commandSVGIcons.deleteColumn,
|
3704
|
+
id: 'deleteColumn',
|
3705
|
+
}, {
|
3706
|
+
text: this.messageFor('hideColumn'),
|
3707
|
+
icon: commandIcons.hideColumn,
|
3708
|
+
svgIcon: commandSVGIcons.hideColumn,
|
3709
|
+
id: 'hideColumn',
|
3710
|
+
}, {
|
3711
|
+
text: this.messageFor('unhideColumn'),
|
3712
|
+
icon: commandIcons.unhideColumn,
|
3713
|
+
svgIcon: commandSVGIcons.unhideColumn,
|
3714
|
+
id: 'unhideColumn',
|
3715
|
+
disabled: !unhide
|
3716
|
+
});
|
3717
|
+
}
|
3718
|
+
return commonItems;
|
3719
|
+
}
|
3720
|
+
openLinkDialog() {
|
3721
|
+
var _a, _b;
|
3722
|
+
const hasLink = isPresent((_a = this.currentRange) === null || _a === void 0 ? void 0 : _a.link());
|
3723
|
+
const dialogSettings = {
|
3724
|
+
appendTo: this.spreadsheetService.dialogContainer,
|
3725
|
+
title: this.localization.get('insertLink'),
|
3726
|
+
content: InsertLinkDialogComponent,
|
3727
|
+
actions: [{
|
3728
|
+
text: this.localization.get('dialogInsert'),
|
3729
|
+
themeColor: 'primary'
|
3730
|
+
}, {
|
3731
|
+
text: this.localization.get('dialogCancel')
|
3732
|
+
},
|
3733
|
+
'spacer', {
|
3734
|
+
text: this.localization.get('dialogRemoveLink'),
|
3735
|
+
themeColor: 'primary',
|
3736
|
+
fillMode: 'clear',
|
3737
|
+
cssClass: hasLink ? '' : 'k-disabled'
|
3738
|
+
}],
|
3739
|
+
actionsLayout: 'start',
|
3740
|
+
width: 400,
|
3741
|
+
autoFocusedElement: '.k-textbox > .k-input-inner'
|
3742
|
+
};
|
3743
|
+
const dialog = this.dialogService.open(dialogSettings);
|
3744
|
+
const dialogInstance = dialog.dialog.instance;
|
3745
|
+
const dialogContent = dialog.content.instance;
|
3746
|
+
if (hasLink) {
|
3747
|
+
dialogContent.setData({ link: (_b = this.currentRange) === null || _b === void 0 ? void 0 : _b.link() });
|
3748
|
+
}
|
3749
|
+
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
3750
|
+
if (event.text === this.localization.get('dialogCancel')) {
|
3751
|
+
return;
|
3752
|
+
}
|
3753
|
+
let link = null;
|
3754
|
+
if (event.text === this.localization.get('dialogInsert')) {
|
3755
|
+
link = dialogContent.urlLink || null;
|
3756
|
+
}
|
3757
|
+
this.spreadsheetService.spreadsheet.executeCommand({
|
3758
|
+
command: 'HyperlinkCommand',
|
3759
|
+
options: { link }
|
3760
|
+
});
|
3761
|
+
});
|
3762
|
+
}
|
3346
3763
|
}
|
3347
|
-
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1$4.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ErrorHandlingService }], target: i0.ɵɵFactoryTarget.Component });
|
3348
|
-
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: [
|
3764
|
+
SpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1$4.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ErrorHandlingService }, { token: i1$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
3765
|
+
SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetComponent, 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: [
|
3349
3766
|
SpreadsheetLocalizationService,
|
3350
3767
|
{
|
3351
3768
|
provide: LocalizationService,
|
@@ -3358,7 +3775,7 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3358
3775
|
SpreadsheetToolsService,
|
3359
3776
|
PopupService,
|
3360
3777
|
ErrorHandlingService
|
3361
|
-
], viewQueries: [{ propertyName: "formulaBarInputRef", first: true, predicate: ["formulaBar"], descendants: true, read: FormulaInputDirective }, { propertyName: "formulaCellInputRef", first: true, predicate: ["formulaCell"], descendants: true, read: FormulaInputDirective }, { propertyName: "nameBoxRef", first: true, predicate: ["nameBox"], descendants: true }, { propertyName: "dialogContainer", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }], exportAs: ["kendo-spreadsheet"], usesOnChanges: true, ngImport: i0, template: `
|
3778
|
+
], 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: `
|
3362
3779
|
<ng-container
|
3363
3780
|
kendoSpreadsheetLocalizedMessages
|
3364
3781
|
i18n-background="kendo.spreadsheet.background|The title of the tool that changes the text background color."
|
@@ -3487,7 +3904,34 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3487
3904
|
dialogError="Error"
|
3488
3905
|
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
3489
3906
|
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
3490
|
-
|
3907
|
+
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
3908
|
+
copy="Copy"
|
3909
|
+
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
3910
|
+
cut="Cut"
|
3911
|
+
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
3912
|
+
paste="Paste (use Ctrl/⌘ + V)"
|
3913
|
+
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
3914
|
+
hideRow="Hide"
|
3915
|
+
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
3916
|
+
unhideRow="Unhide"
|
3917
|
+
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
3918
|
+
hideColumn="Hide"
|
3919
|
+
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
3920
|
+
unhideColumn="Unhide"
|
3921
|
+
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
3922
|
+
sheetDelete="Delete"
|
3923
|
+
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
3924
|
+
sheetRename="Rename"
|
3925
|
+
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
3926
|
+
sheetDuplicate="Duplicate"
|
3927
|
+
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
3928
|
+
sheetHide="Hide"
|
3929
|
+
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
3930
|
+
sheetMoveLeft="Move Left"
|
3931
|
+
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
3932
|
+
sheetMoveRight="Move Right"
|
3933
|
+
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
3934
|
+
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
3491
3935
|
</ng-container>
|
3492
3936
|
<div class="k-spreadsheet-header">
|
3493
3937
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
@@ -3568,7 +4012,11 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3568
4012
|
[svgIcon]="formulaFxIcon">
|
3569
4013
|
</kendo-icon-wrapper>
|
3570
4014
|
<span class="k-separator k-separator-vertical"></span>
|
3571
|
-
<div
|
4015
|
+
<div
|
4016
|
+
#formulaBar
|
4017
|
+
kendoSpreadsheetFormulaInput
|
4018
|
+
[formulaListMaxHeight]="formulaListMaxHeight"
|
4019
|
+
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
3572
4020
|
</div>
|
3573
4021
|
</div>
|
3574
4022
|
<div class="k-spreadsheet-view">
|
@@ -3586,8 +4034,13 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3586
4034
|
</div>
|
3587
4035
|
<ng-container #dialogContainer></ng-container>
|
3588
4036
|
|
4037
|
+
<kendo-contextmenu
|
4038
|
+
#contextMenu
|
4039
|
+
[items]="contextMenuItems"
|
4040
|
+
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4041
|
+
|
3589
4042
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
3590
|
-
`, isInline: true, components: [{ type:
|
4043
|
+
`, isInline: true, components: [{ type: i7$1.MenuComponent, selector: "kendo-menu", inputs: ["menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }, { type: i7$1.MenuItemComponent, selector: "kendo-menu-item", inputs: ["text", "url", "disabled", "cssClass", "cssStyle", "icon", "svgIcon", "data", "separator"] }, { type: i1$2.ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "tabindex", "size", "tabIndex"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { type: SpreadsheetLoadFileComponent, selector: "kendo-spreadsheet-load-file-tool" }, { type: i1$2.ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { type: i1$2.ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: ["disabled", "selection", "width", "look"], exportAs: ["kendoToolBarButtonGroup"] }, { type: i1$2.ToolBarSeparatorComponent, selector: "kendo-toolbar-separator", exportAs: ["kendoToolBarSeparator"] }, { type: SpreadsheetFontFamilyComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontFamily]" }, { type: SpreadsheetFontSizeComponent, selector: "kendo-toolbar-dropdownlist[kendoSpreadsheetFontSize]" }, { type: SpreadsheetForeColorComponent, selector: "kendo-spreadsheet-forecolor-tool" }, { type: SpreadsheetBackColorComponent, selector: "kendo-spreadsheet-backcolor-tool" }, { type: i1$2.ToolBarDropDownButtonComponent, selector: "kendo-toolbar-dropdownbutton", inputs: ["arrowIcon", "title", "showText", "showIcon", "text", "icon", "svgIcon", "iconClass", "imageUrl", "popupSettings", "look", "primary", "fillMode", "themeColor", "buttonClass", "textField", "disabled", "data"], outputs: ["itemClick", "open", "close"], exportAs: ["kendoToolBarDropDownButton"] }, { type: NameBoxComponent, selector: "[kendoSpreadsheetNameBox]", inputs: ["data", "spreadsheetWidget"] }, { type: i6.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: SheetsBarComponent, selector: "[kendoSpreadsheetSheetsBar]", inputs: ["sheets", "sheetDescriptors"] }, { type: i7$1.ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { type: i3.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoSpreadsheetLocalizedMessages]" }, { type: MainMenuDirective, selector: "[kendoSpreadsheetMenu]" }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SpreadsheetSaveFileDirective, selector: "[kendoSpreadsheetSaveFile]" }, { type: SpreadsheetUndoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUndo]" }, { type: SpreadsheetRedoDirective, selector: "kendo-toolbar-button[kendoSpreadsheetRedo]" }, { type: SpreadsheetIncreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]" }, { type: SpreadsheetDecreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]" }, { type: SpreadsheetBoldDirective, selector: "kendo-toolbar-button[kendoSpreadsheetBold]" }, { type: SpreadsheetItalicDirective, selector: "kendo-toolbar-button[kendoSpreadsheetItalic]" }, { type: SpreadsheetUnderlineDirective, selector: "kendo-toolbar-button[kendoSpreadsheetUnderline]" }, { type: SpreadsheetHorizontalTextAlignDirective, selector: "[kendoSpreadsheetHorizontalTextAlign]" }, { type: SpreadsheetVerticalTextAlignDirective, selector: "[kendoSpreadsheetVerticalTextAlign]" }, { type: SpreadsheetTextWrapDirective, selector: "kendo-toolbar-button[kendoSpreadsheetTextWrap]" }, { type: SpreadsheetFormatDirective, selector: "[kendoSpreadsheetFormat]" }, { type: SpreadsheetInsertLinkDirective, selector: "kendo-toolbar-button[kendoSpreadsheetInsertLink]" }, { type: SpreadsheetAddColumnLeftButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnLeftButton]" }, { type: SpreadsheetAddColumnRightButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddColumnRightButton]" }, { type: SpreadsheetAddRowBelowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowBelowButton]" }, { type: SpreadsheetAddRowAboveButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetAddRowAboveButton]" }, { type: SpreadsheetDeleteColumnButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteColumnButton]" }, { type: SpreadsheetDeleteRowButtonDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDeleteRowButton]" }, { type: SpreadsheetDecreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]" }, { type: SpreadsheetIncreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]" }, { type: SpreadsheetMergeDirective, selector: "[kendoSpreadsheetMerge]" }, { type: SpreadsheetGridLinesDirective, selector: "kendo-toolbar-button[kendoSpreadsheetGridLines]" }, { type: FormulaInputDirective, selector: "[kendoSpreadsheetFormulaInput]", inputs: ["formulaListMaxHeight"] }] });
|
3591
4044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, decorators: [{
|
3592
4045
|
type: Component,
|
3593
4046
|
args: [{
|
@@ -3736,7 +4189,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3736
4189
|
dialogError="Error"
|
3737
4190
|
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
3738
4191
|
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
3739
|
-
|
4192
|
+
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
4193
|
+
copy="Copy"
|
4194
|
+
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
4195
|
+
cut="Cut"
|
4196
|
+
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
4197
|
+
paste="Paste (use Ctrl/⌘ + V)"
|
4198
|
+
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
4199
|
+
hideRow="Hide"
|
4200
|
+
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
4201
|
+
unhideRow="Unhide"
|
4202
|
+
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
4203
|
+
hideColumn="Hide"
|
4204
|
+
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
4205
|
+
unhideColumn="Unhide"
|
4206
|
+
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
4207
|
+
sheetDelete="Delete"
|
4208
|
+
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
4209
|
+
sheetRename="Rename"
|
4210
|
+
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
4211
|
+
sheetDuplicate="Duplicate"
|
4212
|
+
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
4213
|
+
sheetHide="Hide"
|
4214
|
+
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
4215
|
+
sheetMoveLeft="Move Left"
|
4216
|
+
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
4217
|
+
sheetMoveRight="Move Right"
|
4218
|
+
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
4219
|
+
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
3740
4220
|
</ng-container>
|
3741
4221
|
<div class="k-spreadsheet-header">
|
3742
4222
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
@@ -3817,7 +4297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3817
4297
|
[svgIcon]="formulaFxIcon">
|
3818
4298
|
</kendo-icon-wrapper>
|
3819
4299
|
<span class="k-separator k-separator-vertical"></span>
|
3820
|
-
<div
|
4300
|
+
<div
|
4301
|
+
#formulaBar
|
4302
|
+
kendoSpreadsheetFormulaInput
|
4303
|
+
[formulaListMaxHeight]="formulaListMaxHeight"
|
4304
|
+
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
3821
4305
|
</div>
|
3822
4306
|
</div>
|
3823
4307
|
<div class="k-spreadsheet-view">
|
@@ -3835,10 +4319,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3835
4319
|
</div>
|
3836
4320
|
<ng-container #dialogContainer></ng-container>
|
3837
4321
|
|
4322
|
+
<kendo-contextmenu
|
4323
|
+
#contextMenu
|
4324
|
+
[items]="contextMenuItems"
|
4325
|
+
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4326
|
+
|
3838
4327
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
3839
4328
|
`,
|
3840
4329
|
}]
|
3841
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$4.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: ErrorHandlingService }]; }, propDecorators: { formulaBarInputRef: [{
|
4330
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$4.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: ErrorHandlingService }, { type: i1$1.DialogService }]; }, propDecorators: { formulaBarInputRef: [{
|
3842
4331
|
type: ViewChild,
|
3843
4332
|
args: ['formulaBar', { read: FormulaInputDirective }]
|
3844
4333
|
}], formulaCellInputRef: [{
|
@@ -3850,6 +4339,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3850
4339
|
}], dialogContainer: [{
|
3851
4340
|
type: ViewChild,
|
3852
4341
|
args: ['dialogContainer', { read: ViewContainerRef }]
|
4342
|
+
}], contextMenu: [{
|
4343
|
+
type: ViewChild,
|
4344
|
+
args: ['contextMenu']
|
3853
4345
|
}], hostClass: [{
|
3854
4346
|
type: HostBinding,
|
3855
4347
|
args: ['class.k-spreadsheet']
|
@@ -3860,6 +4352,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3860
4352
|
type: Input
|
3861
4353
|
}], overflow: [{
|
3862
4354
|
type: Input
|
4355
|
+
}], formulaListMaxHeight: [{
|
4356
|
+
type: Input
|
3863
4357
|
}], activeSheet: [{
|
3864
4358
|
type: Input
|
3865
4359
|
}], sheets: [{
|
@@ -4107,7 +4601,7 @@ SpreadsheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
4107
4601
|
EventsModule,
|
4108
4602
|
IconsModule,
|
4109
4603
|
IntlModule,
|
4110
|
-
|
4604
|
+
MenusModule,
|
4111
4605
|
PopupModule,
|
4112
4606
|
TabStripModule,
|
4113
4607
|
ToolBarModule,
|
@@ -4153,7 +4647,7 @@ SpreadsheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
4153
4647
|
EventsModule,
|
4154
4648
|
IconsModule,
|
4155
4649
|
IntlModule,
|
4156
|
-
|
4650
|
+
MenusModule,
|
4157
4651
|
PopupModule,
|
4158
4652
|
TabStripModule,
|
4159
4653
|
ToolBarModule,
|
@@ -4175,7 +4669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
4175
4669
|
EventsModule,
|
4176
4670
|
IconsModule,
|
4177
4671
|
IntlModule,
|
4178
|
-
|
4672
|
+
MenusModule,
|
4179
4673
|
PopupModule,
|
4180
4674
|
TabStripModule,
|
4181
4675
|
ToolBarModule,
|