@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 { Subject, Subscription } from 'rxjs';
|
13
13
|
import * as i2 from '@progress/kendo-angular-l10n';
|
14
14
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
@@ -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 i7$1 from '@progress/kendo-angular-menu';
|
27
|
+
import { MenusModule } from '@progress/kendo-angular-menu';
|
28
|
+
import * as i2$1 from '@progress/kendo-angular-label';
|
29
|
+
import { LabelModule } from '@progress/kendo-angular-label';
|
30
|
+
import * as i5 from '@progress/kendo-angular-inputs';
|
31
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
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
|
|
@@ -59,6 +59,7 @@ let spreadsheetCounter = 0;
|
|
59
59
|
class SpreadsheetService {
|
60
60
|
constructor() {
|
61
61
|
this.sheetsChanged = new Subject();
|
62
|
+
this.onSheetsBarFocus = new Subject();
|
62
63
|
this.activeSheetChanged = new Subject();
|
63
64
|
this.selectionChanged = new Subject();
|
64
65
|
spreadsheetCounter++;
|
@@ -188,10 +189,15 @@ const mapToSheetDescriptor = (sheetsArray) => {
|
|
188
189
|
name: sheet.name(),
|
189
190
|
rows: sheet._rows,
|
190
191
|
selection: sheet.selection(),
|
191
|
-
showGridLines: sheet.showGridLines
|
192
|
+
showGridLines: sheet.showGridLines,
|
193
|
+
state: sheet.state()
|
192
194
|
};
|
193
195
|
});
|
194
196
|
};
|
197
|
+
/**
|
198
|
+
* @hidden
|
199
|
+
*/
|
200
|
+
const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|
195
201
|
|
196
202
|
/**
|
197
203
|
* @hidden
|
@@ -209,10 +215,12 @@ class FormulaListComponent {
|
|
209
215
|
}
|
210
216
|
}
|
211
217
|
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 });
|
212
|
-
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: `
|
218
|
+
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: `
|
213
219
|
<ul #ulRef
|
214
220
|
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
215
221
|
role="menu"
|
222
|
+
[style.overflowY]="'auto'"
|
223
|
+
[style.maxHeight]="maxHeight"
|
216
224
|
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
217
225
|
<li *ngFor="let item of data"
|
218
226
|
(click)="itemClick(item.text)"
|
@@ -234,6 +242,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
234
242
|
<ul #ulRef
|
235
243
|
class="k-spreadsheet-formula-list k-list-ul k-list-md k-group k-reset"
|
236
244
|
role="menu"
|
245
|
+
[style.overflowY]="'auto'"
|
246
|
+
[style.maxHeight]="maxHeight"
|
237
247
|
[kendoEventsOutsideAngular]="{mousedown: handleMouseDown}">
|
238
248
|
<li *ngFor="let item of data"
|
239
249
|
(click)="itemClick(item.text)"
|
@@ -251,6 +261,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
251
261
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SpreadsheetService }]; }, propDecorators: { id: [{
|
252
262
|
type: HostBinding,
|
253
263
|
args: ['attr.id']
|
264
|
+
}], maxHeight: [{
|
265
|
+
type: Input
|
254
266
|
}], data: [{
|
255
267
|
type: Input
|
256
268
|
}], itemClick: [{
|
@@ -292,6 +304,23 @@ class FormulaInputDirective {
|
|
292
304
|
}
|
293
305
|
if (next) {
|
294
306
|
next.classList.add('k-focus');
|
307
|
+
const { offsetTop, offsetHeight, parentElement } = next;
|
308
|
+
if (dir > 0) {
|
309
|
+
if (offsetTop + offsetHeight >= parentElement.offsetHeight + parentElement.scrollTop) {
|
310
|
+
parentElement.scrollTop = Math.min(parentElement.scrollTop + offsetHeight, parentElement.scrollHeight - parentElement.offsetHeight);
|
311
|
+
}
|
312
|
+
if (next === items[0]) {
|
313
|
+
next.scrollIntoView();
|
314
|
+
}
|
315
|
+
}
|
316
|
+
else {
|
317
|
+
if (offsetTop <= parentElement.scrollTop) {
|
318
|
+
parentElement.scrollTop = Math.max(parentElement.scrollTop - offsetHeight, 0);
|
319
|
+
}
|
320
|
+
if (next === items[items.length - 1]) {
|
321
|
+
next.scrollIntoView();
|
322
|
+
}
|
323
|
+
}
|
295
324
|
}
|
296
325
|
};
|
297
326
|
}
|
@@ -356,6 +385,7 @@ class FormulaInputDirective {
|
|
356
385
|
this.list = list;
|
357
386
|
list.data = this.data;
|
358
387
|
list.itemClick = this.handler;
|
388
|
+
list.maxHeight = this.formulaListMaxHeight;
|
359
389
|
this.ariaExpanded = 'true';
|
360
390
|
},
|
361
391
|
close: () => {
|
@@ -374,7 +404,7 @@ class FormulaInputDirective {
|
|
374
404
|
}
|
375
405
|
}
|
376
406
|
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 });
|
377
|
-
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 });
|
407
|
+
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 });
|
378
408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FormulaInputDirective, decorators: [{
|
379
409
|
type: Directive,
|
380
410
|
args: [{
|
@@ -398,46 +428,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
398
428
|
}], ariaControls: [{
|
399
429
|
type: HostBinding,
|
400
430
|
args: ['attr.aria-controls']
|
431
|
+
}], formulaListMaxHeight: [{
|
432
|
+
type: Input
|
401
433
|
}] } });
|
402
434
|
|
403
435
|
/**
|
404
436
|
* @hidden
|
405
437
|
*/
|
406
|
-
const getSheetActions = (
|
438
|
+
const getSheetActions = (items, item) => {
|
439
|
+
const visibleItems = items.filter(item => item.state === 'visible');
|
440
|
+
const itemIndex = item ? visibleItems.findIndex(i => i === item) : 0;
|
407
441
|
return [{
|
408
|
-
|
442
|
+
messageKey: 'sheetDelete',
|
409
443
|
icon: 'trash',
|
410
444
|
svgIcon: trashIcon,
|
411
445
|
commandName: 'delete',
|
412
446
|
dialogButton: 'dialogDelete',
|
413
|
-
disabled:
|
414
|
-
},
|
415
|
-
|
416
|
-
text: 'Duplicate',
|
447
|
+
disabled: visibleItems.length === 1
|
448
|
+
}, {
|
449
|
+
messageKey: 'sheetDuplicate',
|
417
450
|
icon: 'copy',
|
418
451
|
svgIcon: copyIcon,
|
419
452
|
commandName: 'copy'
|
420
|
-
},
|
421
|
-
|
422
|
-
text: 'Rename',
|
453
|
+
}, {
|
454
|
+
messageKey: 'sheetRename',
|
423
455
|
icon: 'pencil',
|
424
456
|
svgIcon: pencilIcon,
|
425
457
|
commandName: 'rename',
|
426
458
|
dialogButton: 'dialogRename'
|
427
|
-
},
|
428
|
-
|
429
|
-
|
459
|
+
}, {
|
460
|
+
messageKey: 'sheetHide',
|
461
|
+
icon: 'eye-slash',
|
462
|
+
svgIcon: eyeSlashIcon,
|
463
|
+
commandName: 'hide',
|
464
|
+
disabled: visibleItems.length === 1
|
465
|
+
}, {
|
466
|
+
messageKey: 'sheetMoveRight',
|
430
467
|
icon: 'arrow-right',
|
431
468
|
svgIcon: arrowRightIcon,
|
432
469
|
commandName: 'move',
|
433
|
-
disabled:
|
434
|
-
},
|
435
|
-
|
436
|
-
text: 'Move Left',
|
470
|
+
disabled: visibleItems.length === 1 || itemIndex === visibleItems.length - 1
|
471
|
+
}, {
|
472
|
+
messageKey: 'sheetMoveLeft',
|
437
473
|
icon: 'arrow-left',
|
438
474
|
svgIcon: arrowLeftIcon,
|
439
475
|
commandName: 'move',
|
440
|
-
disabled:
|
476
|
+
disabled: visibleItems.length === 1 || itemIndex === 0
|
441
477
|
}];
|
442
478
|
};
|
443
479
|
|
@@ -470,10 +506,22 @@ class ErrorHandlingService {
|
|
470
506
|
this.openDialog(messageData);
|
471
507
|
}
|
472
508
|
openDialog(messageData) {
|
509
|
+
let dialogContent;
|
510
|
+
if (messageData.name === 'message') {
|
511
|
+
const localizationMsg = this.messageFor('invalidNameError');
|
512
|
+
let inputValue = messageData.text.split(' ').pop();
|
513
|
+
if (messageData.text.startsWith('Parse')) {
|
514
|
+
inputValue = inputValue.substring(0, inputValue.length - 1);
|
515
|
+
}
|
516
|
+
dialogContent = replaceMessagePlaceholder(localizationMsg, 'inputValue', inputValue);
|
517
|
+
}
|
518
|
+
else {
|
519
|
+
dialogContent = this.messageFor(messageData.name);
|
520
|
+
}
|
473
521
|
const dialogSettings = {
|
474
522
|
appendTo: this.spreadsheetService.dialogContainer,
|
475
523
|
title: this.messageFor('dialogError'),
|
476
|
-
content:
|
524
|
+
content: dialogContent,
|
477
525
|
actions: [{
|
478
526
|
text: this.messageFor('dialogOk'),
|
479
527
|
themeColor: 'primary'
|
@@ -545,7 +593,14 @@ const commandIcons = {
|
|
545
593
|
increaseFontSize: 'font-grow',
|
546
594
|
decreaseFontSize: 'font-shrink',
|
547
595
|
increaseDecimal: 'decimal-increase',
|
548
|
-
decreaseDecimal: 'decimal-decrease'
|
596
|
+
decreaseDecimal: 'decimal-decrease',
|
597
|
+
copy: 'copy',
|
598
|
+
cut: 'cut',
|
599
|
+
paste: 'clipboard',
|
600
|
+
hideRow: 'eye-slash',
|
601
|
+
unhideRow: 'eye',
|
602
|
+
hideColumn: 'eye-slash',
|
603
|
+
unhideColumn: 'eye'
|
549
604
|
};
|
550
605
|
/**
|
551
606
|
* @hidden
|
@@ -590,9 +645,56 @@ const commandSVGIcons = {
|
|
590
645
|
increaseFontSize: fontGrowIcon,
|
591
646
|
decreaseFontSize: fontShrinkIcon,
|
592
647
|
decreaseDecimal: decimalDecreaseIcon,
|
593
|
-
increaseDecimal: decimalIncreaseIcon
|
648
|
+
increaseDecimal: decimalIncreaseIcon,
|
649
|
+
copy: copyIcon,
|
650
|
+
cut: cutIcon,
|
651
|
+
paste: clipboardIcon,
|
652
|
+
hideRow: eyeSlashIcon,
|
653
|
+
unhideRow: eyeIcon,
|
654
|
+
hideColumn: eyeSlashIcon,
|
655
|
+
unhideColumn: eyeIcon
|
594
656
|
};
|
595
657
|
|
658
|
+
/**
|
659
|
+
* @hidden
|
660
|
+
*/
|
661
|
+
class InsertLinkDialogComponent extends DialogContentBase {
|
662
|
+
constructor(dialog) {
|
663
|
+
super(dialog);
|
664
|
+
this.dialog = dialog;
|
665
|
+
this.urlLink = '';
|
666
|
+
}
|
667
|
+
setData(args) {
|
668
|
+
this.urlLink = args.link;
|
669
|
+
}
|
670
|
+
}
|
671
|
+
InsertLinkDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, deps: [{ token: i1$1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
672
|
+
InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InsertLinkDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
673
|
+
<form class="k-form k-form-md" method="dialog">
|
674
|
+
<div class="k-form-field">
|
675
|
+
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
676
|
+
<kendo-textbox #textbox
|
677
|
+
[(value)]="urlLink">
|
678
|
+
</kendo-textbox>
|
679
|
+
</div>
|
680
|
+
</form>
|
681
|
+
`, isInline: true, 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"] }] });
|
682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
|
683
|
+
type: Component,
|
684
|
+
args: [{
|
685
|
+
template: `
|
686
|
+
<form class="k-form k-form-md" method="dialog">
|
687
|
+
<div class="k-form-field">
|
688
|
+
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
689
|
+
<kendo-textbox #textbox
|
690
|
+
[(value)]="urlLink">
|
691
|
+
</kendo-textbox>
|
692
|
+
</div>
|
693
|
+
</form>
|
694
|
+
`
|
695
|
+
}]
|
696
|
+
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
697
|
+
|
596
698
|
/**
|
597
699
|
* @hidden
|
598
700
|
*/
|
@@ -1686,7 +1788,7 @@ ActionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
1686
1788
|
</div>
|
1687
1789
|
</div>
|
1688
1790
|
</form>
|
1689
|
-
`, 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"] }] });
|
1791
|
+
`, 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"] }] });
|
1690
1792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ActionDialogComponent, decorators: [{
|
1691
1793
|
type: Component,
|
1692
1794
|
args: [{
|
@@ -1724,14 +1826,23 @@ class SheetsBarComponent {
|
|
1724
1826
|
this.dialogService = dialogService;
|
1725
1827
|
this.ngZone = ngZone;
|
1726
1828
|
this.hostClasses = true;
|
1829
|
+
this.subs = new Subscription();
|
1727
1830
|
this.plusIcon = plusIcon;
|
1728
1831
|
this.menuIcon = menuIcon;
|
1729
1832
|
this.caretAltDownIcon = caretAltDownIcon;
|
1730
1833
|
this.caretAltLeftIcon = caretAltLeftIcon;
|
1731
1834
|
this.caretAltRightIcon = caretAltRightIcon;
|
1732
1835
|
this.selected = false;
|
1836
|
+
this.sheetsMenuList = [];
|
1733
1837
|
this.openedDdb = null;
|
1734
|
-
this.
|
1838
|
+
this.hiddenStateIcons = {
|
1839
|
+
hidden: 'eye-slash',
|
1840
|
+
visible: 'eye'
|
1841
|
+
};
|
1842
|
+
this.hiddenStateSVGIcons = {
|
1843
|
+
hidden: eyeSlashIcon,
|
1844
|
+
visible: eyeIcon
|
1845
|
+
};
|
1735
1846
|
this.onAddClick = () => {
|
1736
1847
|
if (this.spreadsheetService.spreadsheet) {
|
1737
1848
|
this.spreadsheetService.spreadsheet.view.sheetsbar.onAddSelect();
|
@@ -1753,21 +1864,54 @@ class SheetsBarComponent {
|
|
1753
1864
|
this.spreadsheetService.spreadsheet.insertSheet({ data: { ...sheetToCopy.toJSON(), name: newName }, index: sheetInfo.index + 1 });
|
1754
1865
|
this.selectSheet(newName);
|
1755
1866
|
},
|
1756
|
-
move: (sheetInfo,
|
1757
|
-
const
|
1758
|
-
|
1867
|
+
move: (sheetInfo, itemKey) => {
|
1868
|
+
const isMoveRight = itemKey === 'sheetMoveRight';
|
1869
|
+
let oldIndex = -1;
|
1870
|
+
let newIndex = -1;
|
1871
|
+
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
1872
|
+
if (isMoveRight) {
|
1873
|
+
for (let i = 0; i < sheets.length; i++) {
|
1874
|
+
if (sheets[i].name() === sheetInfo.text) {
|
1875
|
+
oldIndex = i;
|
1876
|
+
}
|
1877
|
+
if (oldIndex > -1 && i > oldIndex && sheets[i]._state() === 'visible') {
|
1878
|
+
newIndex = i;
|
1879
|
+
break;
|
1880
|
+
}
|
1881
|
+
}
|
1882
|
+
}
|
1883
|
+
else {
|
1884
|
+
for (let i = sheets.length - 1; i >= 0; i--) {
|
1885
|
+
if (sheets[i].name() === sheetInfo.text) {
|
1886
|
+
oldIndex = i;
|
1887
|
+
}
|
1888
|
+
if (oldIndex > -1 && (i < oldIndex) && sheets[i]._state() === 'visible') {
|
1889
|
+
newIndex = i;
|
1890
|
+
break;
|
1891
|
+
}
|
1892
|
+
}
|
1893
|
+
}
|
1759
1894
|
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
1760
1895
|
sheetsBar.onSheetReorderEnd({ oldIndex, newIndex });
|
1896
|
+
this.selectSheet(sheetInfo.text);
|
1897
|
+
this.notifySheetsChange();
|
1898
|
+
},
|
1899
|
+
hide: (sheet) => {
|
1900
|
+
sheet.state = 'hidden';
|
1901
|
+
const sheets = this.spreadsheetService.spreadsheet.sheets();
|
1902
|
+
const sheetIndex = sheets.findIndex(s => s.name() === sheet.text);
|
1903
|
+
sheets[sheetIndex]._state('hidden');
|
1904
|
+
const newSelectedIndex = sheetIndex < sheets.length - 1 ? sheetIndex + 1 : 0;
|
1905
|
+
const sheetToSelect = sheets[newSelectedIndex].name();
|
1906
|
+
this.selectSheet(sheetToSelect);
|
1761
1907
|
this.notifySheetsChange();
|
1762
1908
|
}
|
1763
1909
|
};
|
1910
|
+
this.subs.add(spreadsheetService.onSheetsBarFocus.subscribe(() => ngZone.run(() => this.tabstrip.selectTab(this.sheets.findIndex(sh => sh.text === spreadsheetService.currentActiveSheet)))));
|
1764
1911
|
}
|
1765
1912
|
get activeSheet() {
|
1766
1913
|
return this.spreadsheetService.spreadsheet?.activeSheet()?.name();
|
1767
1914
|
}
|
1768
|
-
get sheetsMenuList() {
|
1769
|
-
return this.sheets?.map(sheet => ({ text: sheet.text, icon: 'eye', svgIcon: this.eyeIcon }));
|
1770
|
-
}
|
1771
1915
|
get tablistId() {
|
1772
1916
|
return this.spreadsheetService.tablistId;
|
1773
1917
|
}
|
@@ -1783,10 +1927,26 @@ class SheetsBarComponent {
|
|
1783
1927
|
this.renderer.setAttribute(tablist, 'id', this.tablistId);
|
1784
1928
|
this.tabListSub = this.renderer.listen(tablist, 'keydown', this.onTabListKeyDown.bind(this));
|
1785
1929
|
}
|
1930
|
+
ngOnChanges(changes) {
|
1931
|
+
if (changes['sheets']) {
|
1932
|
+
this.sheetsMenuList = this.sheets?.map(sheet => ({
|
1933
|
+
text: sheet.text,
|
1934
|
+
icon: this.hiddenStateIcons[sheet.state],
|
1935
|
+
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
1936
|
+
}));
|
1937
|
+
this.sheets = changes['sheets'].currentValue?.map((sheet, _, items) => ({
|
1938
|
+
...sheet,
|
1939
|
+
sheetActions: getSheetActions(items, sheet)
|
1940
|
+
.map(item => ({ ...item, text: this.messageFor(item.messageKey) }))
|
1941
|
+
}));
|
1942
|
+
}
|
1943
|
+
;
|
1944
|
+
}
|
1786
1945
|
ngOnDestroy() {
|
1787
1946
|
if (this.tabListSub) {
|
1788
1947
|
this.tabListSub();
|
1789
1948
|
}
|
1949
|
+
this.subs.unsubscribe();
|
1790
1950
|
}
|
1791
1951
|
onTabSelect(ev) {
|
1792
1952
|
if (ev.title !== this.activeSheet) {
|
@@ -1812,11 +1972,13 @@ class SheetsBarComponent {
|
|
1812
1972
|
this.openDialog(dataItem, sheet);
|
1813
1973
|
}
|
1814
1974
|
else {
|
1815
|
-
this.actionsCallback[dataItem.commandName](sheet, dataItem.
|
1975
|
+
this.actionsCallback[dataItem.commandName](sheet, dataItem.messageKey);
|
1816
1976
|
}
|
1817
1977
|
}
|
1818
1978
|
onMenuItemClick(item) {
|
1819
1979
|
const sheet = this.sheets.find(s => s.text === item.text);
|
1980
|
+
sheet.state = 'visible';
|
1981
|
+
this.spreadsheetService.spreadsheet.sheets().find(sh => sh.name() === sheet.text)._state('visible');
|
1820
1982
|
this.selectSheet(sheet.text);
|
1821
1983
|
}
|
1822
1984
|
messageFor(key) {
|
@@ -1843,7 +2005,9 @@ class SheetsBarComponent {
|
|
1843
2005
|
if (event.text === this.messageFor(dataItem.dialogButton)) {
|
1844
2006
|
const sheetsBar = this.spreadsheetService.spreadsheet.view.sheetsbar;
|
1845
2007
|
if (sheetsBar) {
|
1846
|
-
|
2008
|
+
const allSheets = this.spreadsheetService.spreadsheet.sheets();
|
2009
|
+
const sheetIndex = allSheets.findIndex(s => s.name() === sheet.text);
|
2010
|
+
dataItem.commandName === 'delete' ? sheetsBar.onSheetRemove(sheet.text) : sheetsBar.onSheetRename(dialogContent.value, sheetIndex);
|
1847
2011
|
this.notifySheetsChange();
|
1848
2012
|
}
|
1849
2013
|
}
|
@@ -1885,21 +2049,29 @@ class SheetsBarComponent {
|
|
1885
2049
|
this.ngZone.run(() => {
|
1886
2050
|
const newSheets = this.spreadsheetService.spreadsheet.sheets();
|
1887
2051
|
const sheetDesc = mapToSheetDescriptor(newSheets);
|
1888
|
-
this.sheets = sheetDesc
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
2052
|
+
this.sheets = sheetDesc
|
2053
|
+
.flatMap((item, index, items) => item.state === 'visible' ? [{
|
2054
|
+
...item,
|
2055
|
+
inEdit: false,
|
2056
|
+
first: index === 0,
|
2057
|
+
last: index === items.length - 1,
|
2058
|
+
text: item.name,
|
2059
|
+
active: (item.name === this.activeSheet) || items.length === 1,
|
2060
|
+
index,
|
2061
|
+
sheetActions: getSheetActions(items, item)
|
2062
|
+
.map(item => ({ ...item, text: this.messageFor(item.messageKey) }))
|
2063
|
+
}] : []);
|
2064
|
+
this.sheetsMenuList = this.sheets?.map(sheet => ({
|
2065
|
+
text: sheet.text,
|
2066
|
+
icon: this.hiddenStateIcons[sheet.state],
|
2067
|
+
svgIcon: this.hiddenStateSVGIcons[sheet.state]
|
1897
2068
|
}));
|
1898
2069
|
});
|
2070
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.spreadsheetService.spreadsheet.view.clipboard.focus());
|
1899
2071
|
}
|
1900
2072
|
}
|
1901
2073
|
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 });
|
1902
|
-
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: `
|
2074
|
+
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: `
|
1903
2075
|
<button kendoButton #addButton
|
1904
2076
|
[title]="messageFor('addSheet')"
|
1905
2077
|
type="button"
|
@@ -1927,27 +2099,30 @@ SheetsBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
1927
2099
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1928
2100
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
1929
2101
|
(tabSelect)="onTabSelect($event)">
|
1930
|
-
<
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
<
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
2102
|
+
<ng-container *ngFor="let sheet of sheets">
|
2103
|
+
<kendo-tabstrip-tab
|
2104
|
+
*ngIf="sheet.state === 'visible'"
|
2105
|
+
[title]="sheet.text"
|
2106
|
+
[selected]="sheet.text === activeSheet">
|
2107
|
+
<ng-template kendoTabTemplate>
|
2108
|
+
<span class="k-link">{{sheet.text}}</span>
|
2109
|
+
<kendo-dropdownbutton #sheetDdb
|
2110
|
+
fillMode="flat"
|
2111
|
+
icon="caret-alt-down"
|
2112
|
+
[svgIcon]="caretAltDownIcon"
|
2113
|
+
buttonClass="k-menu-button"
|
2114
|
+
[data]="sheet.sheetActions"
|
2115
|
+
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
2116
|
+
(open)="onOpen(sheetDdb)"
|
2117
|
+
(close)="onClose()"
|
2118
|
+
(click)="$event.stopPropagation()"
|
2119
|
+
(itemClick)="onActionClick($event, sheet)">
|
2120
|
+
</kendo-dropdownbutton>
|
2121
|
+
</ng-template>
|
2122
|
+
</kendo-tabstrip-tab>
|
2123
|
+
</ng-container>
|
1949
2124
|
</kendo-tabstrip>
|
1950
|
-
`, 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]" }] });
|
2125
|
+
`, 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]" }] });
|
1951
2126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SheetsBarComponent, decorators: [{
|
1952
2127
|
type: Component,
|
1953
2128
|
args: [{
|
@@ -1980,25 +2155,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
1980
2155
|
[scrollable]="{prevButtonIcon: 'caret-alt-left', prevSVGButtonIcon: caretAltLeftIcon, nextButtonIcon: 'caret-alt-right', nextSVGButtonIcon: caretAltRightIcon}"
|
1981
2156
|
class="k-spreadsheet-sheets k-overflow-hidden"
|
1982
2157
|
(tabSelect)="onTabSelect($event)">
|
1983
|
-
<
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
<
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1996
|
-
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2158
|
+
<ng-container *ngFor="let sheet of sheets">
|
2159
|
+
<kendo-tabstrip-tab
|
2160
|
+
*ngIf="sheet.state === 'visible'"
|
2161
|
+
[title]="sheet.text"
|
2162
|
+
[selected]="sheet.text === activeSheet">
|
2163
|
+
<ng-template kendoTabTemplate>
|
2164
|
+
<span class="k-link">{{sheet.text}}</span>
|
2165
|
+
<kendo-dropdownbutton #sheetDdb
|
2166
|
+
fillMode="flat"
|
2167
|
+
icon="caret-alt-down"
|
2168
|
+
[svgIcon]="caretAltDownIcon"
|
2169
|
+
buttonClass="k-menu-button"
|
2170
|
+
[data]="sheet.sheetActions"
|
2171
|
+
[buttonAttributes]="{'aria-hidden': 'true', 'tabindex': '-1', role: 'presentation'}"
|
2172
|
+
(open)="onOpen(sheetDdb)"
|
2173
|
+
(close)="onClose()"
|
2174
|
+
(click)="$event.stopPropagation()"
|
2175
|
+
(itemClick)="onActionClick($event, sheet)">
|
2176
|
+
</kendo-dropdownbutton>
|
2177
|
+
</ng-template>
|
2178
|
+
</kendo-tabstrip-tab>
|
2179
|
+
</ng-container>
|
2002
2180
|
</kendo-tabstrip>
|
2003
2181
|
`
|
2004
2182
|
}]
|
@@ -2032,7 +2210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2032
2210
|
class MessagesDirective extends ComponentMessages {
|
2033
2211
|
}
|
2034
2212
|
MessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
2035
|
-
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 });
|
2213
|
+
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 });
|
2036
2214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessagesDirective, decorators: [{
|
2037
2215
|
type: Directive,
|
2038
2216
|
args: [{
|
@@ -2164,6 +2342,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2164
2342
|
type: Input
|
2165
2343
|
}], duplicateSheetName: [{
|
2166
2344
|
type: Input
|
2345
|
+
}], copy: [{
|
2346
|
+
type: Input
|
2347
|
+
}], cut: [{
|
2348
|
+
type: Input
|
2349
|
+
}], paste: [{
|
2350
|
+
type: Input
|
2351
|
+
}], hideRow: [{
|
2352
|
+
type: Input
|
2353
|
+
}], unhideRow: [{
|
2354
|
+
type: Input
|
2355
|
+
}], hideColumn: [{
|
2356
|
+
type: Input
|
2357
|
+
}], unhideColumn: [{
|
2358
|
+
type: Input
|
2359
|
+
}], sheetDelete: [{
|
2360
|
+
type: Input
|
2361
|
+
}], sheetRename: [{
|
2362
|
+
type: Input
|
2363
|
+
}], sheetHide: [{
|
2364
|
+
type: Input
|
2365
|
+
}], sheetDuplicate: [{
|
2366
|
+
type: Input
|
2367
|
+
}], sheetMoveLeft: [{
|
2368
|
+
type: Input
|
2369
|
+
}], sheetMoveRight: [{
|
2370
|
+
type: Input
|
2371
|
+
}], invalidNameError: [{
|
2372
|
+
type: Input
|
2167
2373
|
}] } });
|
2168
2374
|
|
2169
2375
|
/**
|
@@ -2513,9 +2719,7 @@ class SpreadsheetHorizontalTextAlignDirective {
|
|
2513
2719
|
host.icon = commandIcons[this.commandName];
|
2514
2720
|
host.arrowIcon = true;
|
2515
2721
|
host.fillMode = 'flat';
|
2516
|
-
host.data = ALIGNS
|
2517
|
-
.filter(value => value.commandName === 'textAlign')
|
2518
|
-
.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
2722
|
+
host.data = ALIGNS.flatMap(item => item.commandName === 'textAlign' ? [{ ...item, textKey: localization.get(item.commandId) }] : []);
|
2519
2723
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
2520
2724
|
host.title = localization.get(this.commandName);
|
2521
2725
|
host.textField = 'textKey';
|
@@ -2557,9 +2761,7 @@ class SpreadsheetVerticalTextAlignDirective {
|
|
2557
2761
|
host.icon = commandIcons[this.commandName];
|
2558
2762
|
host.arrowIcon = true;
|
2559
2763
|
host.fillMode = 'flat';
|
2560
|
-
host.data = ALIGNS
|
2561
|
-
.filter(value => value.commandName === 'verticalAlign')
|
2562
|
-
.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
|
2764
|
+
host.data = ALIGNS.flatMap(item => item.commandName === 'verticalAlign' ? [{ ...item, textKey: localization.get(item.commandId) }] : []);
|
2563
2765
|
this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
|
2564
2766
|
host.title = localization.get(this.commandName);
|
2565
2767
|
host.textField = 'textKey';
|
@@ -2665,46 +2867,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
2665
2867
|
}]
|
2666
2868
|
}], ctorParameters: function () { return [{ type: i1$2.ToolBarDropDownButtonComponent }, { type: SpreadsheetLocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }]; } });
|
2667
2869
|
|
2668
|
-
/**
|
2669
|
-
* @hidden
|
2670
|
-
*/
|
2671
|
-
class InsertLinkDialogComponent extends DialogContentBase {
|
2672
|
-
constructor(dialog) {
|
2673
|
-
super(dialog);
|
2674
|
-
this.dialog = dialog;
|
2675
|
-
this.urlLink = '';
|
2676
|
-
}
|
2677
|
-
setData(args) {
|
2678
|
-
this.urlLink = args.link;
|
2679
|
-
}
|
2680
|
-
}
|
2681
|
-
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 });
|
2682
|
-
InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InsertLinkDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
2683
|
-
<form class="k-form k-form-md" method="dialog">
|
2684
|
-
<div class="k-form-field">
|
2685
|
-
<kendo-label [for]="textbox" text="URL"></kendo-label>
|
2686
|
-
<kendo-textbox #textbox
|
2687
|
-
[(value)]="urlLink">
|
2688
|
-
</kendo-textbox>
|
2689
|
-
</div>
|
2690
|
-
</form>
|
2691
|
-
`, 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"] }] });
|
2692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
|
2693
|
-
type: Component,
|
2694
|
-
args: [{
|
2695
|
-
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
|
-
`
|
2705
|
-
}]
|
2706
|
-
}], ctorParameters: function () { return [{ type: i1$1.DialogRef }]; } });
|
2707
|
-
|
2708
2870
|
/**
|
2709
2871
|
* @hidden
|
2710
2872
|
*/
|
@@ -2714,7 +2876,10 @@ class SpreadsheetInsertLinkDirective extends SpreadsheetCommandButton {
|
|
2714
2876
|
command: 'HyperlinkCommand'
|
2715
2877
|
});
|
2716
2878
|
this.dialogService = dialogService;
|
2717
|
-
spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range);
|
2879
|
+
this.subs.add(spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
2880
|
+
}
|
2881
|
+
ngOnDestroy() {
|
2882
|
+
this.subs.unsubscribe();
|
2718
2883
|
}
|
2719
2884
|
clickHandler() {
|
2720
2885
|
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
@@ -3047,7 +3212,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3047
3212
|
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
3048
3213
|
*/
|
3049
3214
|
class SpreadsheetComponent {
|
3050
|
-
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService) {
|
3215
|
+
constructor(ngZone, intl, host, localization, spreadsheetService, toolsService, errorService, dialogService) {
|
3051
3216
|
this.ngZone = ngZone;
|
3052
3217
|
this.intl = intl;
|
3053
3218
|
this.host = host;
|
@@ -3055,6 +3220,7 @@ class SpreadsheetComponent {
|
|
3055
3220
|
this.spreadsheetService = spreadsheetService;
|
3056
3221
|
this.toolsService = toolsService;
|
3057
3222
|
this.errorService = errorService;
|
3223
|
+
this.dialogService = dialogService;
|
3058
3224
|
this.hostClass = true;
|
3059
3225
|
this.role = 'application';
|
3060
3226
|
/**
|
@@ -3062,6 +3228,13 @@ class SpreadsheetComponent {
|
|
3062
3228
|
* @default false
|
3063
3229
|
*/
|
3064
3230
|
this.overflow = false;
|
3231
|
+
/**
|
3232
|
+
* Sets the height of the formula list container.
|
3233
|
+
* Accepts same values as the CSS [`style.height`](https://developer.mozilla.org/en-US/docs/Web/CSS/height) property.
|
3234
|
+
*
|
3235
|
+
* @default '300px'
|
3236
|
+
*/
|
3237
|
+
this.formulaListMaxHeight = '300px';
|
3065
3238
|
/**
|
3066
3239
|
* The number of columns in the document.
|
3067
3240
|
*
|
@@ -3130,10 +3303,19 @@ class SpreadsheetComponent {
|
|
3130
3303
|
this.formulaFxIcon = formulaFxIcon;
|
3131
3304
|
this.folderOpenIcon = folderOpenIcon;
|
3132
3305
|
this.downloadIcon = downloadIcon;
|
3306
|
+
this.showLicenseWatermark = false;
|
3307
|
+
this.contextMenuItems = [];
|
3308
|
+
this.subs = new Subscription();
|
3133
3309
|
/**
|
3134
3310
|
* @hidden
|
3135
3311
|
*/
|
3136
|
-
this.
|
3312
|
+
this.onKeyDown = (e) => {
|
3313
|
+
const isCtrl = e.ctrlKey || e.metaKey;
|
3314
|
+
const shift = e.shiftKey;
|
3315
|
+
if (isCtrl && shift && e.keyCode === Keys.KeyS) {
|
3316
|
+
this.spreadsheetService.onSheetsBarFocus.next();
|
3317
|
+
}
|
3318
|
+
};
|
3137
3319
|
this.onChange = (e) => {
|
3138
3320
|
hasObservers(this.change) && this.change.emit(e);
|
3139
3321
|
this.spreadsheetService.selectionChanged.next(e.range);
|
@@ -3227,13 +3409,13 @@ class SpreadsheetComponent {
|
|
3227
3409
|
set sheets(value) {
|
3228
3410
|
const items = value.map((item, index, items) => ({
|
3229
3411
|
...item,
|
3412
|
+
state: item.state || 'visible',
|
3230
3413
|
inEdit: false,
|
3231
3414
|
first: index === 0,
|
3232
3415
|
last: index === items.length - 1,
|
3233
3416
|
text: item.name,
|
3234
3417
|
active: (item.name === this.activeSheet) || items.length === 1,
|
3235
|
-
index
|
3236
|
-
sheetActions: getSheetActions(index, items)
|
3418
|
+
index
|
3237
3419
|
}));
|
3238
3420
|
this._sheetsInfo = items;
|
3239
3421
|
}
|
@@ -3255,8 +3437,10 @@ class SpreadsheetComponent {
|
|
3255
3437
|
spreadsheet.bind('changeFormat', this.onChangeFormat);
|
3256
3438
|
spreadsheet.bind('excelImport', this.onExcelImport);
|
3257
3439
|
spreadsheet.bind('excelExport', this.onExcelExport);
|
3440
|
+
spreadsheet.bind('keydown', this.onKeyDown);
|
3258
3441
|
spreadsheet.view.bind('update', this.updateState);
|
3259
3442
|
spreadsheet.view.bind('message', this.onMessage);
|
3443
|
+
spreadsheet.bind('contextmenu', this.onContextMenu.bind(this));
|
3260
3444
|
const sheet = spreadsheet.activeSheet();
|
3261
3445
|
if (sheet) {
|
3262
3446
|
this.updateState({ range: sheet.range(sheet.activeCell()) });
|
@@ -3265,12 +3449,19 @@ class SpreadsheetComponent {
|
|
3265
3449
|
if (!this.sheetsInfo) {
|
3266
3450
|
this.ngZone.run(() => {
|
3267
3451
|
const defaultSheetDescriptors = mapToSheetDescriptor([spreadsheet?.activeSheet()]);
|
3268
|
-
this._sheetsInfo = [{
|
3452
|
+
this._sheetsInfo = [{
|
3453
|
+
text: this.spreadsheetService.currentActiveSheet,
|
3454
|
+
first: true, last: true,
|
3455
|
+
state: 'visible',
|
3456
|
+
...defaultSheetDescriptors,
|
3457
|
+
sheetActions: getSheetActions(defaultSheetDescriptors).map(item => ({ ...item, text: this.messageFor(item.messageKey) }))
|
3458
|
+
}];
|
3269
3459
|
});
|
3270
3460
|
}
|
3271
3461
|
});
|
3272
|
-
this.spreadsheetService.sheetsChanged.subscribe(this.onSheetsChanged.bind(this));
|
3273
|
-
this.spreadsheetService.activeSheetChanged.subscribe(this.onActiveSheetChanged.bind(this));
|
3462
|
+
this.subs.add(this.spreadsheetService.sheetsChanged.subscribe(this.onSheetsChanged.bind(this)));
|
3463
|
+
this.subs.add(this.spreadsheetService.activeSheetChanged.subscribe(this.onActiveSheetChanged.bind(this)));
|
3464
|
+
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range));
|
3274
3465
|
this.spreadsheetService.dialogContainer = this.dialogContainer;
|
3275
3466
|
});
|
3276
3467
|
}
|
@@ -3294,6 +3485,85 @@ class SpreadsheetComponent {
|
|
3294
3485
|
this.spreadsheetWidget.fromJSON(newOptions);
|
3295
3486
|
}
|
3296
3487
|
}
|
3488
|
+
ngOnDestroy() {
|
3489
|
+
this.subs.unsubscribe();
|
3490
|
+
}
|
3491
|
+
/**
|
3492
|
+
* @hidden
|
3493
|
+
*/
|
3494
|
+
onContextMenu(e) {
|
3495
|
+
if (e.targetType === 'topcorner') {
|
3496
|
+
return;
|
3497
|
+
}
|
3498
|
+
const selection = this.spreadsheetWidget.activeSheet().select();
|
3499
|
+
const { topLeft, bottomRight } = selection;
|
3500
|
+
const isRange = e.targetType === 'cell' && (topLeft.row !== bottomRight.row || topLeft.col !== bottomRight.col);
|
3501
|
+
const targetType = isRange ? 'range' : e.targetType;
|
3502
|
+
this.contextMenuItems = this.contextMenuItemsForTarget(targetType, e.showUnhide, e.showUnmerge);
|
3503
|
+
this.contextMenu.show({ top: e.originalEvent.pageY, left: e.originalEvent.pageX });
|
3504
|
+
}
|
3505
|
+
/**
|
3506
|
+
* @hidden
|
3507
|
+
*/
|
3508
|
+
onContextMenuSelect(e) {
|
3509
|
+
let command;
|
3510
|
+
switch (e.item.id) {
|
3511
|
+
case 'cut':
|
3512
|
+
command = { command: 'ToolbarCutCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3513
|
+
break;
|
3514
|
+
case 'copy':
|
3515
|
+
command = { command: 'ToolbarCopyCommand', options: { workbook: this.spreadsheetWidget.workbook } };
|
3516
|
+
break;
|
3517
|
+
case 'unmerge':
|
3518
|
+
command = { command: 'MergeCellCommand', options: { value: 'unmerge' } };
|
3519
|
+
break;
|
3520
|
+
case 'mergeAll':
|
3521
|
+
command = { command: 'MergeCellCommand', options: { value: 'cells' } };
|
3522
|
+
break;
|
3523
|
+
case 'mergeHorizontally':
|
3524
|
+
command = { command: 'MergeCellCommand', options: { value: 'horizontally' } };
|
3525
|
+
break;
|
3526
|
+
case 'mergeVertically':
|
3527
|
+
command = { command: 'MergeCellCommand', options: { value: 'vertically' } };
|
3528
|
+
break;
|
3529
|
+
case 'hideRow':
|
3530
|
+
command = { command: 'HideLineCommand', options: { axis: 'row' } };
|
3531
|
+
break;
|
3532
|
+
case 'hideColumn':
|
3533
|
+
command = { command: 'HideLineCommand', options: { axis: 'column' } };
|
3534
|
+
break;
|
3535
|
+
case 'unhideRow':
|
3536
|
+
command = { command: 'UnHideLineCommand', options: { axis: 'row' } };
|
3537
|
+
break;
|
3538
|
+
case 'unhideColumn':
|
3539
|
+
command = { command: 'UnHideLineCommand', options: { axis: 'column' } };
|
3540
|
+
break;
|
3541
|
+
case 'deleteRow':
|
3542
|
+
command = { command: 'DeleteRowCommand' };
|
3543
|
+
break;
|
3544
|
+
case 'deleteColumn':
|
3545
|
+
command = { command: 'DeleteColumnCommand' };
|
3546
|
+
break;
|
3547
|
+
case 'insertLink':
|
3548
|
+
this.openLinkDialog();
|
3549
|
+
break;
|
3550
|
+
case 'addRowAbove':
|
3551
|
+
command = { command: 'AddRowCommand', options: { value: 'above' } };
|
3552
|
+
break;
|
3553
|
+
case 'addRowBelow':
|
3554
|
+
command = { command: 'AddRowCommand', options: { value: 'below' } };
|
3555
|
+
break;
|
3556
|
+
case 'addColumnLeft':
|
3557
|
+
command = { command: 'AddColumnCommand', options: { value: 'left' } };
|
3558
|
+
break;
|
3559
|
+
case 'addColumnRight':
|
3560
|
+
command = { command: 'AddColumnCommand', options: { value: 'right' } };
|
3561
|
+
break;
|
3562
|
+
}
|
3563
|
+
if (command) {
|
3564
|
+
this.spreadsheetWidget.executeCommand(command);
|
3565
|
+
}
|
3566
|
+
}
|
3297
3567
|
/**
|
3298
3568
|
* @hidden
|
3299
3569
|
*/
|
@@ -3349,9 +3619,163 @@ class SpreadsheetComponent {
|
|
3349
3619
|
nameBoxRef: { current: this.nameBoxRef.current }
|
3350
3620
|
};
|
3351
3621
|
}
|
3622
|
+
contextMenuItemsForTarget(target, unhide, unmerge) {
|
3623
|
+
const commonItems = [{
|
3624
|
+
text: this.messageFor('copy'),
|
3625
|
+
icon: commandIcons.copy,
|
3626
|
+
svgIcon: commandSVGIcons.copy,
|
3627
|
+
id: 'copy'
|
3628
|
+
}, {
|
3629
|
+
text: this.messageFor('cut'),
|
3630
|
+
icon: commandIcons.cut,
|
3631
|
+
svgIcon: commandSVGIcons.cut,
|
3632
|
+
id: 'cut'
|
3633
|
+
}, {
|
3634
|
+
text: this.messageFor('paste'),
|
3635
|
+
icon: commandIcons.paste,
|
3636
|
+
svgIcon: commandSVGIcons.paste,
|
3637
|
+
id: 'paste',
|
3638
|
+
disabled: true
|
3639
|
+
}, {
|
3640
|
+
separator: true
|
3641
|
+
}, {
|
3642
|
+
text: this.messageFor('mergeAll'),
|
3643
|
+
icon: commandIcons.mergeAll,
|
3644
|
+
svgIcon: commandSVGIcons.mergeAll,
|
3645
|
+
id: 'mergeAll',
|
3646
|
+
}, {
|
3647
|
+
text: this.messageFor('mergeHorizontally'),
|
3648
|
+
icon: commandIcons.mergeHorizontally,
|
3649
|
+
svgIcon: commandSVGIcons.mergeHorizontally,
|
3650
|
+
id: 'mergeHorizontally',
|
3651
|
+
}, {
|
3652
|
+
text: this.messageFor('mergeVertically'),
|
3653
|
+
icon: commandIcons.mergeVertically,
|
3654
|
+
svgIcon: commandSVGIcons.mergeVertically,
|
3655
|
+
id: 'mergeVertically',
|
3656
|
+
}, {
|
3657
|
+
text: this.messageFor('unmerge'),
|
3658
|
+
icon: commandIcons.unmerge,
|
3659
|
+
svgIcon: commandSVGIcons.unmerge,
|
3660
|
+
id: 'unmerge',
|
3661
|
+
disabled: !unmerge
|
3662
|
+
}, {
|
3663
|
+
separator: true
|
3664
|
+
}, {
|
3665
|
+
text: this.messageFor('insertLink'),
|
3666
|
+
icon: commandIcons.insertLink,
|
3667
|
+
svgIcon: commandSVGIcons.insertLink,
|
3668
|
+
id: 'insertLink'
|
3669
|
+
}];
|
3670
|
+
if (target === 'rowheader') {
|
3671
|
+
commonItems.push({
|
3672
|
+
separator: true
|
3673
|
+
}, {
|
3674
|
+
text: this.messageFor('addRowAbove'),
|
3675
|
+
icon: commandIcons.addRowAbove,
|
3676
|
+
svgIcon: commandSVGIcons.addRowAbove,
|
3677
|
+
id: 'addRowAbove',
|
3678
|
+
}, {
|
3679
|
+
text: this.messageFor('addRowBelow'),
|
3680
|
+
icon: commandIcons.addRowBelow,
|
3681
|
+
svgIcon: commandSVGIcons.addRowBelow,
|
3682
|
+
id: 'addRowBelow',
|
3683
|
+
}, {
|
3684
|
+
text: this.messageFor('deleteRow'),
|
3685
|
+
icon: commandIcons.deleteRow,
|
3686
|
+
svgIcon: commandSVGIcons.deleteRow,
|
3687
|
+
id: 'deleteRow',
|
3688
|
+
}, {
|
3689
|
+
text: this.messageFor('hideRow'),
|
3690
|
+
icon: commandIcons.hideRow,
|
3691
|
+
svgIcon: commandSVGIcons.hideRow,
|
3692
|
+
id: 'hideRow',
|
3693
|
+
}, {
|
3694
|
+
text: this.messageFor('unhideRow'),
|
3695
|
+
icon: commandIcons.unhideRow,
|
3696
|
+
svgIcon: commandSVGIcons.unhideRow,
|
3697
|
+
id: 'unhideRow',
|
3698
|
+
disabled: !unhide
|
3699
|
+
});
|
3700
|
+
}
|
3701
|
+
if (target === 'columnheader') {
|
3702
|
+
commonItems.push({
|
3703
|
+
separator: true
|
3704
|
+
}, {
|
3705
|
+
text: this.messageFor('addColumnLeft'),
|
3706
|
+
icon: commandIcons.addColumnLeft,
|
3707
|
+
svgIcon: commandSVGIcons.addColumnLeft,
|
3708
|
+
id: 'addColumnLeft',
|
3709
|
+
}, {
|
3710
|
+
text: this.messageFor('addColumnRight'),
|
3711
|
+
icon: commandIcons.addColumnRight,
|
3712
|
+
svgIcon: commandSVGIcons.addColumnRight,
|
3713
|
+
id: 'addColumnRight',
|
3714
|
+
}, {
|
3715
|
+
text: this.messageFor('deleteColumn'),
|
3716
|
+
icon: commandIcons.deleteColumn,
|
3717
|
+
svgIcon: commandSVGIcons.deleteColumn,
|
3718
|
+
id: 'deleteColumn',
|
3719
|
+
}, {
|
3720
|
+
text: this.messageFor('hideColumn'),
|
3721
|
+
icon: commandIcons.hideColumn,
|
3722
|
+
svgIcon: commandSVGIcons.hideColumn,
|
3723
|
+
id: 'hideColumn',
|
3724
|
+
}, {
|
3725
|
+
text: this.messageFor('unhideColumn'),
|
3726
|
+
icon: commandIcons.unhideColumn,
|
3727
|
+
svgIcon: commandSVGIcons.unhideColumn,
|
3728
|
+
id: 'unhideColumn',
|
3729
|
+
disabled: !unhide
|
3730
|
+
});
|
3731
|
+
}
|
3732
|
+
return commonItems;
|
3733
|
+
}
|
3734
|
+
openLinkDialog() {
|
3735
|
+
const hasLink = isPresent(this.currentRange?.link());
|
3736
|
+
const dialogSettings = {
|
3737
|
+
appendTo: this.spreadsheetService.dialogContainer,
|
3738
|
+
title: this.localization.get('insertLink'),
|
3739
|
+
content: InsertLinkDialogComponent,
|
3740
|
+
actions: [{
|
3741
|
+
text: this.localization.get('dialogInsert'),
|
3742
|
+
themeColor: 'primary'
|
3743
|
+
}, {
|
3744
|
+
text: this.localization.get('dialogCancel')
|
3745
|
+
},
|
3746
|
+
'spacer', {
|
3747
|
+
text: this.localization.get('dialogRemoveLink'),
|
3748
|
+
themeColor: 'primary',
|
3749
|
+
fillMode: 'clear',
|
3750
|
+
cssClass: hasLink ? '' : 'k-disabled'
|
3751
|
+
}],
|
3752
|
+
actionsLayout: 'start',
|
3753
|
+
width: 400,
|
3754
|
+
autoFocusedElement: '.k-textbox > .k-input-inner'
|
3755
|
+
};
|
3756
|
+
const dialog = this.dialogService.open(dialogSettings);
|
3757
|
+
const dialogInstance = dialog.dialog.instance;
|
3758
|
+
const dialogContent = dialog.content.instance;
|
3759
|
+
if (hasLink) {
|
3760
|
+
dialogContent.setData({ link: this.currentRange?.link() });
|
3761
|
+
}
|
3762
|
+
dialogInstance.action.pipe(take(1)).subscribe((event) => {
|
3763
|
+
if (event.text === this.localization.get('dialogCancel')) {
|
3764
|
+
return;
|
3765
|
+
}
|
3766
|
+
let link = null;
|
3767
|
+
if (event.text === this.localization.get('dialogInsert')) {
|
3768
|
+
link = dialogContent.urlLink || null;
|
3769
|
+
}
|
3770
|
+
this.spreadsheetService.spreadsheet.executeCommand({
|
3771
|
+
command: 'HyperlinkCommand',
|
3772
|
+
options: { link }
|
3773
|
+
});
|
3774
|
+
});
|
3775
|
+
}
|
3352
3776
|
}
|
3353
|
-
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 });
|
3354
|
-
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: [
|
3777
|
+
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 });
|
3778
|
+
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: [
|
3355
3779
|
SpreadsheetLocalizationService,
|
3356
3780
|
{
|
3357
3781
|
provide: LocalizationService,
|
@@ -3364,7 +3788,7 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3364
3788
|
SpreadsheetToolsService,
|
3365
3789
|
PopupService,
|
3366
3790
|
ErrorHandlingService
|
3367
|
-
], 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: `
|
3791
|
+
], 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: `
|
3368
3792
|
<ng-container
|
3369
3793
|
kendoSpreadsheetLocalizedMessages
|
3370
3794
|
i18n-background="kendo.spreadsheet.background|The title of the tool that changes the text background color."
|
@@ -3493,7 +3917,34 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3493
3917
|
dialogError="Error"
|
3494
3918
|
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
3495
3919
|
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
3496
|
-
|
3920
|
+
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
3921
|
+
copy="Copy"
|
3922
|
+
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
3923
|
+
cut="Cut"
|
3924
|
+
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
3925
|
+
paste="Paste (use Ctrl/⌘ + V)"
|
3926
|
+
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
3927
|
+
hideRow="Hide"
|
3928
|
+
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
3929
|
+
unhideRow="Unhide"
|
3930
|
+
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
3931
|
+
hideColumn="Hide"
|
3932
|
+
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
3933
|
+
unhideColumn="Unhide"
|
3934
|
+
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
3935
|
+
sheetDelete="Delete"
|
3936
|
+
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
3937
|
+
sheetRename="Rename"
|
3938
|
+
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
3939
|
+
sheetDuplicate="Duplicate"
|
3940
|
+
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
3941
|
+
sheetHide="Hide"
|
3942
|
+
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
3943
|
+
sheetMoveLeft="Move Left"
|
3944
|
+
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
3945
|
+
sheetMoveRight="Move Right"
|
3946
|
+
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
3947
|
+
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
3497
3948
|
</ng-container>
|
3498
3949
|
<div class="k-spreadsheet-header">
|
3499
3950
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
@@ -3574,7 +4025,11 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3574
4025
|
[svgIcon]="formulaFxIcon">
|
3575
4026
|
</kendo-icon-wrapper>
|
3576
4027
|
<span class="k-separator k-separator-vertical"></span>
|
3577
|
-
<div
|
4028
|
+
<div
|
4029
|
+
#formulaBar
|
4030
|
+
kendoSpreadsheetFormulaInput
|
4031
|
+
[formulaListMaxHeight]="formulaListMaxHeight"
|
4032
|
+
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
3578
4033
|
</div>
|
3579
4034
|
</div>
|
3580
4035
|
<div class="k-spreadsheet-view">
|
@@ -3592,8 +4047,13 @@ SpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
3592
4047
|
</div>
|
3593
4048
|
<ng-container #dialogContainer></ng-container>
|
3594
4049
|
|
4050
|
+
<kendo-contextmenu
|
4051
|
+
#contextMenu
|
4052
|
+
[items]="contextMenuItems"
|
4053
|
+
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4054
|
+
|
3595
4055
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
3596
|
-
`, isInline: true, components: [{ type:
|
4056
|
+
`, 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"] }] });
|
3597
4057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetComponent, decorators: [{
|
3598
4058
|
type: Component,
|
3599
4059
|
args: [{
|
@@ -3742,7 +4202,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3742
4202
|
dialogError="Error"
|
3743
4203
|
i18n-duplicateSheetName="kendo.spreadsheet.duplicateSheetName|The content of the dialog that warns about duplicated sheet name."
|
3744
4204
|
duplicateSheetName="There is an existing sheet with this name. Please enter another name."
|
3745
|
-
|
4205
|
+
i18n-copy="kendo.spreadsheet.copy|The Copy command text."
|
4206
|
+
copy="Copy"
|
4207
|
+
i18n-cut="kendo.spreadsheet.cut|The Cut command text."
|
4208
|
+
cut="Cut"
|
4209
|
+
i18n-paste="kendo.spreadsheet.paste|The Paste command text."
|
4210
|
+
paste="Paste (use Ctrl/⌘ + V)"
|
4211
|
+
i18n-hideRow="kendo.spreadsheet.hideRow|The Hide row command text."
|
4212
|
+
hideRow="Hide"
|
4213
|
+
i18n-unhideRow="kendo.spreadsheet.unhideRow|The Unhide row command text."
|
4214
|
+
unhideRow="Unhide"
|
4215
|
+
i18n-hideColumn="kendo.spreadsheet.hideColumn|The Hide column command text."
|
4216
|
+
hideColumn="Hide"
|
4217
|
+
i18n-unhideColumn="kendo.spreadsheet.unhideColumn|The Unhide column command text."
|
4218
|
+
unhideColumn="Unhide"
|
4219
|
+
i18n-sheetDelete="kendo.spreadsheet.sheetDelete|The text of the Sheet menu Delete option."
|
4220
|
+
sheetDelete="Delete"
|
4221
|
+
i18n-sheetRename="kendo.spreadsheet.sheetRename|The text of the Sheet menu Rename option."
|
4222
|
+
sheetRename="Rename"
|
4223
|
+
i18n-sheetDuplicate="kendo.spreadsheet.sheetDuplicate|The text of the Sheet menu Duplicate option."
|
4224
|
+
sheetDuplicate="Duplicate"
|
4225
|
+
i18n-sheetHide="kendo.spreadsheet.sheetHide|The text of the Sheet menu Hide option."
|
4226
|
+
sheetHide="Hide"
|
4227
|
+
i18n-sheetMoveLeft="kendo.spreadsheet.sheetMoveLeft|The text of the Sheet menu Move Left option."
|
4228
|
+
sheetMoveLeft="Move Left"
|
4229
|
+
i18n-sheetMoveRight="kendo.spreadsheet.sheetMoveRight|The text of the Sheet menu Move Right option."
|
4230
|
+
sheetMoveRight="Move Right"
|
4231
|
+
i18n-invalidNameError="kendo.spreadsheet.invalidNameError|The content of the dialog that warns about invalid name input."
|
4232
|
+
invalidNameError="{{ 'Invalid name: {inputValue}' }}">
|
3746
4233
|
</ng-container>
|
3747
4234
|
<div class="k-spreadsheet-header">
|
3748
4235
|
<kendo-menu kendoSpreadsheetMenu (select)="onMenuItemSelect($event)">
|
@@ -3823,7 +4310,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3823
4310
|
[svgIcon]="formulaFxIcon">
|
3824
4311
|
</kendo-icon-wrapper>
|
3825
4312
|
<span class="k-separator k-separator-vertical"></span>
|
3826
|
-
<div
|
4313
|
+
<div
|
4314
|
+
#formulaBar
|
4315
|
+
kendoSpreadsheetFormulaInput
|
4316
|
+
[formulaListMaxHeight]="formulaListMaxHeight"
|
4317
|
+
class="k-textbox k-input k-input-md k-input-flat k-rounded-md"></div>
|
3827
4318
|
</div>
|
3828
4319
|
</div>
|
3829
4320
|
<div class="k-spreadsheet-view">
|
@@ -3841,10 +4332,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3841
4332
|
</div>
|
3842
4333
|
<ng-container #dialogContainer></ng-container>
|
3843
4334
|
|
4335
|
+
<kendo-contextmenu
|
4336
|
+
#contextMenu
|
4337
|
+
[items]="contextMenuItems"
|
4338
|
+
(select)="onContextMenuSelect($event)"></kendo-contextmenu>
|
4339
|
+
|
3844
4340
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
3845
4341
|
`,
|
3846
4342
|
}]
|
3847
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$4.IntlService }, { type: i0.ElementRef }, { type: i2.LocalizationService }, { type: SpreadsheetService }, { type: SpreadsheetToolsService }, { type: ErrorHandlingService }]; }, propDecorators: { formulaBarInputRef: [{
|
4343
|
+
}], 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: [{
|
3848
4344
|
type: ViewChild,
|
3849
4345
|
args: ['formulaBar', { read: FormulaInputDirective }]
|
3850
4346
|
}], formulaCellInputRef: [{
|
@@ -3856,6 +4352,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3856
4352
|
}], dialogContainer: [{
|
3857
4353
|
type: ViewChild,
|
3858
4354
|
args: ['dialogContainer', { read: ViewContainerRef }]
|
4355
|
+
}], contextMenu: [{
|
4356
|
+
type: ViewChild,
|
4357
|
+
args: ['contextMenu']
|
3859
4358
|
}], hostClass: [{
|
3860
4359
|
type: HostBinding,
|
3861
4360
|
args: ['class.k-spreadsheet']
|
@@ -3866,6 +4365,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
3866
4365
|
type: Input
|
3867
4366
|
}], overflow: [{
|
3868
4367
|
type: Input
|
4368
|
+
}], formulaListMaxHeight: [{
|
4369
|
+
type: Input
|
3869
4370
|
}], activeSheet: [{
|
3870
4371
|
type: Input
|
3871
4372
|
}], sheets: [{
|
@@ -4113,7 +4614,7 @@ SpreadsheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
4113
4614
|
EventsModule,
|
4114
4615
|
IconsModule,
|
4115
4616
|
IntlModule,
|
4116
|
-
|
4617
|
+
MenusModule,
|
4117
4618
|
PopupModule,
|
4118
4619
|
TabStripModule,
|
4119
4620
|
ToolBarModule,
|
@@ -4159,7 +4660,7 @@ SpreadsheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
4159
4660
|
EventsModule,
|
4160
4661
|
IconsModule,
|
4161
4662
|
IntlModule,
|
4162
|
-
|
4663
|
+
MenusModule,
|
4163
4664
|
PopupModule,
|
4164
4665
|
TabStripModule,
|
4165
4666
|
ToolBarModule,
|
@@ -4181,7 +4682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
4181
4682
|
EventsModule,
|
4182
4683
|
IconsModule,
|
4183
4684
|
IntlModule,
|
4184
|
-
|
4685
|
+
MenusModule,
|
4185
4686
|
PopupModule,
|
4186
4687
|
TabStripModule,
|
4187
4688
|
ToolBarModule,
|