@progress/kendo-angular-spreadsheet 14.1.0-develop.7 → 14.1.0-develop.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/spreadsheet.service.d.ts +2 -1
- package/esm2020/common/spreadsheet.service.mjs +1 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/spreadsheet.component.mjs +4 -1
- package/esm2020/tools/shared/command-icons.mjs +9 -9
- package/esm2020/tools/tables/merge-tool.directive.mjs +9 -8
- package/fesm2015/progress-kendo-angular-spreadsheet.mjs +25 -20
- package/fesm2020/progress-kendo-angular-spreadsheet.mjs +25 -20
- package/package.json +13 -13
- package/schematics/ngAdd/index.js +1 -1
- package/tools/tables/merge-tool.directive.d.ts +2 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ViewContainerRef } from '@angular/core';
|
|
6
|
-
import { Sheet, SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
6
|
+
import { Range, Sheet, SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import { SheetsChanges } from './sheet-changes';
|
|
9
9
|
import { SheetInfo } from '../models';
|
|
@@ -15,6 +15,7 @@ export declare class SpreadsheetService {
|
|
|
15
15
|
spreadsheet: SpreadsheetWidget;
|
|
16
16
|
sheetsChanged: Subject<SheetsChanges>;
|
|
17
17
|
activeSheetChanged: Subject<Sheet>;
|
|
18
|
+
selectionChanged: Subject<Range>;
|
|
18
19
|
dialogContainer: ViewContainerRef;
|
|
19
20
|
constructor();
|
|
20
21
|
set currentActiveSheet(value: string);
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-spreadsheet',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '14.1.0-develop.
|
|
12
|
+
publishDate: 1699372593,
|
|
13
|
+
version: '14.1.0-develop.8',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
|
15
15
|
};
|
|
@@ -146,7 +146,10 @@ export class SpreadsheetComponent {
|
|
|
146
146
|
*/
|
|
147
147
|
this.showLicenseWatermark = false;
|
|
148
148
|
this.onChange = (e) => hasObservers(this.change) && this.change.emit(e);
|
|
149
|
-
this.onSelectionChange = (e) =>
|
|
149
|
+
this.onSelectionChange = (e) => {
|
|
150
|
+
hasObservers(this.selectionChange) && this.selectionChange.emit(e);
|
|
151
|
+
this.spreadsheetService.selectionChanged.next(e.range);
|
|
152
|
+
};
|
|
150
153
|
this.onChangeFormat = (e) => hasObservers(this.formatChange) && this.formatChange.emit(e);
|
|
151
154
|
this.onExcelExport = (e) => hasObservers(this.excelExport) && this.excelExport.emit(e);
|
|
152
155
|
this.onExcelImport = (e) => hasObservers(this.excelImport) && this.excelImport.emit(e);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, boldIcon, dropletIcon, foregroundColorIcon, italicIcon, tableColumnDeleteIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowDeleteIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, underlineIcon, arrowRotateCcwIcon, arrowRotateCwIcon, bordersNoneIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, textWrapIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeHorizontallyIcon,
|
|
5
|
+
import { alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, boldIcon, dropletIcon, foregroundColorIcon, italicIcon, tableColumnDeleteIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowDeleteIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, underlineIcon, arrowRotateCcwIcon, arrowRotateCwIcon, bordersNoneIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, textWrapIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeHorizontallyIcon, cellsMergeIcon, cellsMergeVerticallyIcon, tableUnmergeIcon } from '@progress/kendo-svg-icons';
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
@@ -35,11 +35,11 @@ export const commandIcons = {
|
|
|
35
35
|
format: 'custom-format',
|
|
36
36
|
fontSize: 'font-size',
|
|
37
37
|
fontFamily: 'font-family',
|
|
38
|
-
merge: 'cells-merge
|
|
39
|
-
mergeAll: '
|
|
38
|
+
merge: 'cells-merge',
|
|
39
|
+
mergeAll: 'cells-merge',
|
|
40
40
|
mergeHorizontally: 'cells-merge-horizontally',
|
|
41
|
-
mergeVertically: '
|
|
42
|
-
unmerge: '
|
|
41
|
+
mergeVertically: 'cells-merge-vertically',
|
|
42
|
+
unmerge: 'table-unmerge'
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
45
|
* @hidden
|
|
@@ -73,9 +73,9 @@ export const commandSVGIcons = {
|
|
|
73
73
|
format: customFormatIcon,
|
|
74
74
|
fontSize: fontSizeIcon,
|
|
75
75
|
fontFamily: fontFamilyIcon,
|
|
76
|
-
merge:
|
|
77
|
-
mergeAll:
|
|
76
|
+
merge: cellsMergeIcon,
|
|
77
|
+
mergeAll: cellsMergeIcon,
|
|
78
78
|
mergeHorizontally: cellsMergeHorizontallyIcon,
|
|
79
|
-
mergeVertically:
|
|
80
|
-
unmerge:
|
|
79
|
+
mergeVertically: cellsMergeVerticallyIcon,
|
|
80
|
+
unmerge: tableUnmergeIcon
|
|
81
81
|
};
|
|
@@ -34,27 +34,28 @@ export class SpreadsheetMergeDirective {
|
|
|
34
34
|
ngOnInit() {
|
|
35
35
|
this.subs.add(this.host.open.subscribe(() => {
|
|
36
36
|
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
|
37
|
+
const isMergedCellWithinRange = this.hasMergedCells(sheet);
|
|
37
38
|
const unmergeItem = this.host.data.find(i => i.commandName === 'unmerge');
|
|
38
|
-
|
|
39
|
-
unmergeItem.disabled = !isCellMerged;
|
|
39
|
+
unmergeItem.disabled = !isMergedCellWithinRange;
|
|
40
40
|
}));
|
|
41
|
+
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.selectedRange = range));
|
|
41
42
|
}
|
|
42
43
|
ngOnDestroy() {
|
|
43
44
|
this.subs.unsubscribe();
|
|
44
45
|
}
|
|
45
46
|
onItemClick(item) {
|
|
47
|
+
if (item.disabled) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
46
50
|
const value = item.value || null;
|
|
47
51
|
const options = {
|
|
48
52
|
command: 'MergeCellCommand', options: { property: item.commandName, value }
|
|
49
53
|
};
|
|
50
54
|
this.spreadsheetService.spreadsheet.executeCommand(options);
|
|
51
55
|
}
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const startCol = cell.topLeft.col;
|
|
56
|
-
const endCol = cell.bottomRight.col;
|
|
57
|
-
return (startRow !== endRow) || (startCol !== endCol);
|
|
56
|
+
hasMergedCells(sheet) {
|
|
57
|
+
const range = sheet._ref(this.selectedRange);
|
|
58
|
+
return sheet._getMergedCells(range).hasMerged;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
SpreadsheetMergeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetMergeDirective, deps: [{ token: i1.ToolBarDropDownButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -8,7 +8,7 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
8
8
|
import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
9
9
|
import * as i1$5 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, cellsMergeHorizontallyIcon,
|
|
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, plusIcon, menuIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, eyeIcon } from '@progress/kendo-svg-icons';
|
|
12
12
|
import * as i1 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';
|
|
@@ -46,8 +46,8 @@ const packageMetadata = {
|
|
|
46
46
|
name: '@progress/kendo-angular-spreadsheet',
|
|
47
47
|
productName: 'Kendo UI for Angular',
|
|
48
48
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
49
|
-
publishDate:
|
|
50
|
-
version: '14.1.0-develop.
|
|
49
|
+
publishDate: 1699372593,
|
|
50
|
+
version: '14.1.0-develop.8',
|
|
51
51
|
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',
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -162,6 +162,7 @@ class SpreadsheetService {
|
|
|
162
162
|
constructor() {
|
|
163
163
|
this.sheetsChanged = new Subject();
|
|
164
164
|
this.activeSheetChanged = new Subject();
|
|
165
|
+
this.selectionChanged = new Subject();
|
|
165
166
|
spreadsheetCounter++;
|
|
166
167
|
}
|
|
167
168
|
set currentActiveSheet(value) {
|
|
@@ -467,11 +468,11 @@ const commandIcons = {
|
|
|
467
468
|
format: 'custom-format',
|
|
468
469
|
fontSize: 'font-size',
|
|
469
470
|
fontFamily: 'font-family',
|
|
470
|
-
merge: 'cells-merge
|
|
471
|
-
mergeAll: '
|
|
471
|
+
merge: 'cells-merge',
|
|
472
|
+
mergeAll: 'cells-merge',
|
|
472
473
|
mergeHorizontally: 'cells-merge-horizontally',
|
|
473
|
-
mergeVertically: '
|
|
474
|
-
unmerge: '
|
|
474
|
+
mergeVertically: 'cells-merge-vertically',
|
|
475
|
+
unmerge: 'table-unmerge'
|
|
475
476
|
};
|
|
476
477
|
/**
|
|
477
478
|
* @hidden
|
|
@@ -505,11 +506,11 @@ const commandSVGIcons = {
|
|
|
505
506
|
format: customFormatIcon,
|
|
506
507
|
fontSize: fontSizeIcon,
|
|
507
508
|
fontFamily: fontFamilyIcon,
|
|
508
|
-
merge:
|
|
509
|
-
mergeAll:
|
|
509
|
+
merge: cellsMergeIcon,
|
|
510
|
+
mergeAll: cellsMergeIcon,
|
|
510
511
|
mergeHorizontally: cellsMergeHorizontallyIcon,
|
|
511
|
-
mergeVertically:
|
|
512
|
-
unmerge:
|
|
512
|
+
mergeVertically: cellsMergeVerticallyIcon,
|
|
513
|
+
unmerge: tableUnmergeIcon
|
|
513
514
|
};
|
|
514
515
|
|
|
515
516
|
/**
|
|
@@ -2559,27 +2560,28 @@ class SpreadsheetMergeDirective {
|
|
|
2559
2560
|
ngOnInit() {
|
|
2560
2561
|
this.subs.add(this.host.open.subscribe(() => {
|
|
2561
2562
|
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
|
2563
|
+
const isMergedCellWithinRange = this.hasMergedCells(sheet);
|
|
2562
2564
|
const unmergeItem = this.host.data.find(i => i.commandName === 'unmerge');
|
|
2563
|
-
|
|
2564
|
-
unmergeItem.disabled = !isCellMerged;
|
|
2565
|
+
unmergeItem.disabled = !isMergedCellWithinRange;
|
|
2565
2566
|
}));
|
|
2567
|
+
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.selectedRange = range));
|
|
2566
2568
|
}
|
|
2567
2569
|
ngOnDestroy() {
|
|
2568
2570
|
this.subs.unsubscribe();
|
|
2569
2571
|
}
|
|
2570
2572
|
onItemClick(item) {
|
|
2573
|
+
if (item.disabled) {
|
|
2574
|
+
return;
|
|
2575
|
+
}
|
|
2571
2576
|
const value = item.value || null;
|
|
2572
2577
|
const options = {
|
|
2573
2578
|
command: 'MergeCellCommand', options: { property: item.commandName, value }
|
|
2574
2579
|
};
|
|
2575
2580
|
this.spreadsheetService.spreadsheet.executeCommand(options);
|
|
2576
2581
|
}
|
|
2577
|
-
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2580
|
-
const startCol = cell.topLeft.col;
|
|
2581
|
-
const endCol = cell.bottomRight.col;
|
|
2582
|
-
return (startRow !== endRow) || (startCol !== endCol);
|
|
2582
|
+
hasMergedCells(sheet) {
|
|
2583
|
+
const range = sheet._ref(this.selectedRange);
|
|
2584
|
+
return sheet._getMergedCells(range).hasMerged;
|
|
2583
2585
|
}
|
|
2584
2586
|
}
|
|
2585
2587
|
SpreadsheetMergeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetMergeDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2714,7 +2716,10 @@ class SpreadsheetComponent {
|
|
|
2714
2716
|
*/
|
|
2715
2717
|
this.showLicenseWatermark = false;
|
|
2716
2718
|
this.onChange = (e) => hasObservers(this.change) && this.change.emit(e);
|
|
2717
|
-
this.onSelectionChange = (e) =>
|
|
2719
|
+
this.onSelectionChange = (e) => {
|
|
2720
|
+
hasObservers(this.selectionChange) && this.selectionChange.emit(e);
|
|
2721
|
+
this.spreadsheetService.selectionChanged.next(e.range);
|
|
2722
|
+
};
|
|
2718
2723
|
this.onChangeFormat = (e) => hasObservers(this.formatChange) && this.formatChange.emit(e);
|
|
2719
2724
|
this.onExcelExport = (e) => hasObservers(this.excelExport) && this.excelExport.emit(e);
|
|
2720
2725
|
this.onExcelImport = (e) => hasObservers(this.excelImport) && this.excelImport.emit(e);
|
|
@@ -8,7 +8,7 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
8
8
|
import { SpreadsheetWidget } from '@progress/kendo-spreadsheet-common';
|
|
9
9
|
import * as i1$5 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, cellsMergeHorizontallyIcon,
|
|
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, plusIcon, menuIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, eyeIcon } from '@progress/kendo-svg-icons';
|
|
12
12
|
import { Subject, Subscription } from 'rxjs';
|
|
13
13
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
14
14
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
@@ -46,8 +46,8 @@ const packageMetadata = {
|
|
|
46
46
|
name: '@progress/kendo-angular-spreadsheet',
|
|
47
47
|
productName: 'Kendo UI for Angular',
|
|
48
48
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
49
|
-
publishDate:
|
|
50
|
-
version: '14.1.0-develop.
|
|
49
|
+
publishDate: 1699372593,
|
|
50
|
+
version: '14.1.0-develop.8',
|
|
51
51
|
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',
|
|
52
52
|
};
|
|
53
53
|
|
|
@@ -59,6 +59,7 @@ class SpreadsheetService {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
this.sheetsChanged = new Subject();
|
|
61
61
|
this.activeSheetChanged = new Subject();
|
|
62
|
+
this.selectionChanged = new Subject();
|
|
62
63
|
spreadsheetCounter++;
|
|
63
64
|
}
|
|
64
65
|
set currentActiveSheet(value) {
|
|
@@ -460,11 +461,11 @@ const commandIcons = {
|
|
|
460
461
|
format: 'custom-format',
|
|
461
462
|
fontSize: 'font-size',
|
|
462
463
|
fontFamily: 'font-family',
|
|
463
|
-
merge: 'cells-merge
|
|
464
|
-
mergeAll: '
|
|
464
|
+
merge: 'cells-merge',
|
|
465
|
+
mergeAll: 'cells-merge',
|
|
465
466
|
mergeHorizontally: 'cells-merge-horizontally',
|
|
466
|
-
mergeVertically: '
|
|
467
|
-
unmerge: '
|
|
467
|
+
mergeVertically: 'cells-merge-vertically',
|
|
468
|
+
unmerge: 'table-unmerge'
|
|
468
469
|
};
|
|
469
470
|
/**
|
|
470
471
|
* @hidden
|
|
@@ -498,11 +499,11 @@ const commandSVGIcons = {
|
|
|
498
499
|
format: customFormatIcon,
|
|
499
500
|
fontSize: fontSizeIcon,
|
|
500
501
|
fontFamily: fontFamilyIcon,
|
|
501
|
-
merge:
|
|
502
|
-
mergeAll:
|
|
502
|
+
merge: cellsMergeIcon,
|
|
503
|
+
mergeAll: cellsMergeIcon,
|
|
503
504
|
mergeHorizontally: cellsMergeHorizontallyIcon,
|
|
504
|
-
mergeVertically:
|
|
505
|
-
unmerge:
|
|
505
|
+
mergeVertically: cellsMergeVerticallyIcon,
|
|
506
|
+
unmerge: tableUnmergeIcon
|
|
506
507
|
};
|
|
507
508
|
|
|
508
509
|
/**
|
|
@@ -2548,27 +2549,28 @@ class SpreadsheetMergeDirective {
|
|
|
2548
2549
|
ngOnInit() {
|
|
2549
2550
|
this.subs.add(this.host.open.subscribe(() => {
|
|
2550
2551
|
const sheet = this.spreadsheetService.spreadsheet.activeSheet();
|
|
2552
|
+
const isMergedCellWithinRange = this.hasMergedCells(sheet);
|
|
2551
2553
|
const unmergeItem = this.host.data.find(i => i.commandName === 'unmerge');
|
|
2552
|
-
|
|
2553
|
-
unmergeItem.disabled = !isCellMerged;
|
|
2554
|
+
unmergeItem.disabled = !isMergedCellWithinRange;
|
|
2554
2555
|
}));
|
|
2556
|
+
this.subs.add(this.spreadsheetService.selectionChanged.subscribe(range => this.selectedRange = range));
|
|
2555
2557
|
}
|
|
2556
2558
|
ngOnDestroy() {
|
|
2557
2559
|
this.subs.unsubscribe();
|
|
2558
2560
|
}
|
|
2559
2561
|
onItemClick(item) {
|
|
2562
|
+
if (item.disabled) {
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2560
2565
|
const value = item.value || null;
|
|
2561
2566
|
const options = {
|
|
2562
2567
|
command: 'MergeCellCommand', options: { property: item.commandName, value }
|
|
2563
2568
|
};
|
|
2564
2569
|
this.spreadsheetService.spreadsheet.executeCommand(options);
|
|
2565
2570
|
}
|
|
2566
|
-
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2569
|
-
const startCol = cell.topLeft.col;
|
|
2570
|
-
const endCol = cell.bottomRight.col;
|
|
2571
|
-
return (startRow !== endRow) || (startCol !== endCol);
|
|
2571
|
+
hasMergedCells(sheet) {
|
|
2572
|
+
const range = sheet._ref(this.selectedRange);
|
|
2573
|
+
return sheet._getMergedCells(range).hasMerged;
|
|
2572
2574
|
}
|
|
2573
2575
|
}
|
|
2574
2576
|
SpreadsheetMergeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetMergeDirective, deps: [{ token: i1$2.ToolBarDropDownButtonComponent }, { token: SpreadsheetLocalizationService }, { token: SpreadsheetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2703,7 +2705,10 @@ class SpreadsheetComponent {
|
|
|
2703
2705
|
*/
|
|
2704
2706
|
this.showLicenseWatermark = false;
|
|
2705
2707
|
this.onChange = (e) => hasObservers(this.change) && this.change.emit(e);
|
|
2706
|
-
this.onSelectionChange = (e) =>
|
|
2708
|
+
this.onSelectionChange = (e) => {
|
|
2709
|
+
hasObservers(this.selectionChange) && this.selectionChange.emit(e);
|
|
2710
|
+
this.spreadsheetService.selectionChanged.next(e.range);
|
|
2711
|
+
};
|
|
2707
2712
|
this.onChangeFormat = (e) => hasObservers(this.formatChange) && this.formatChange.emit(e);
|
|
2708
2713
|
this.onExcelExport = (e) => hasObservers(this.excelExport) && this.excelExport.emit(e);
|
|
2709
2714
|
this.onExcelImport = (e) => hasObservers(this.excelImport) && this.excelImport.emit(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-spreadsheet",
|
|
3
|
-
"version": "14.1.0-develop.
|
|
3
|
+
"version": "14.1.0-develop.8",
|
|
4
4
|
"description": "A Spreadsheet Component for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
"@angular/core": "13 - 17",
|
|
24
24
|
"@angular/platform-browser": "13 - 17",
|
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
|
26
|
-
"@progress/kendo-angular-buttons": "14.1.0-develop.
|
|
27
|
-
"@progress/kendo-angular-common": "14.1.0-develop.
|
|
28
|
-
"@progress/kendo-angular-dialog": "14.1.0-develop.
|
|
29
|
-
"@progress/kendo-angular-dropdowns": "14.1.0-develop.
|
|
30
|
-
"@progress/kendo-angular-icons": "14.1.0-develop.
|
|
31
|
-
"@progress/kendo-angular-l10n": "14.1.0-develop.
|
|
32
|
-
"@progress/kendo-angular-layout": "14.1.0-develop.
|
|
33
|
-
"@progress/kendo-angular-menu": "14.1.0-develop.
|
|
34
|
-
"@progress/kendo-angular-popup": "14.1.0-develop.
|
|
35
|
-
"@progress/kendo-angular-toolbar": "14.1.0-develop.
|
|
36
|
-
"@progress/kendo-angular-intl": "14.1.0-develop.
|
|
26
|
+
"@progress/kendo-angular-buttons": "14.1.0-develop.8",
|
|
27
|
+
"@progress/kendo-angular-common": "14.1.0-develop.8",
|
|
28
|
+
"@progress/kendo-angular-dialog": "14.1.0-develop.8",
|
|
29
|
+
"@progress/kendo-angular-dropdowns": "14.1.0-develop.8",
|
|
30
|
+
"@progress/kendo-angular-icons": "14.1.0-develop.8",
|
|
31
|
+
"@progress/kendo-angular-l10n": "14.1.0-develop.8",
|
|
32
|
+
"@progress/kendo-angular-layout": "14.1.0-develop.8",
|
|
33
|
+
"@progress/kendo-angular-menu": "14.1.0-develop.8",
|
|
34
|
+
"@progress/kendo-angular-popup": "14.1.0-develop.8",
|
|
35
|
+
"@progress/kendo-angular-toolbar": "14.1.0-develop.8",
|
|
36
|
+
"@progress/kendo-angular-intl": "14.1.0-develop.8",
|
|
37
37
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"tslib": "^2.3.1",
|
|
41
|
-
"@progress/kendo-angular-schematics": "14.1.0-develop.
|
|
41
|
+
"@progress/kendo-angular-schematics": "14.1.0-develop.8",
|
|
42
42
|
"@progress/jszip-esm": "^1.0.3",
|
|
43
43
|
"@progress/kendo-common": "^0.2.2",
|
|
44
44
|
"@progress/kendo-date-math": "^1.5.10",
|
|
@@ -6,7 +6,7 @@ function default_1(options) {
|
|
|
6
6
|
// Peer dependency of icons
|
|
7
7
|
'@progress/kendo-svg-icons': '^2.0.0',
|
|
8
8
|
// peer dep of the dropdowns
|
|
9
|
-
'@progress/kendo-angular-treeview': '14.1.0-develop.
|
|
9
|
+
'@progress/kendo-angular-treeview': '14.1.0-develop.8'
|
|
10
10
|
} });
|
|
11
11
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
12
12
|
}
|
|
@@ -14,11 +14,12 @@ export declare class SpreadsheetMergeDirective {
|
|
|
14
14
|
private spreadsheetService;
|
|
15
15
|
private commandName;
|
|
16
16
|
private subs;
|
|
17
|
+
private selectedRange;
|
|
17
18
|
constructor(host: ToolBarDropDownButtonComponent, localization: SpreadsheetLocalizationService, spreadsheetService: SpreadsheetService);
|
|
18
19
|
ngOnInit(): void;
|
|
19
20
|
ngOnDestroy(): void;
|
|
20
21
|
onItemClick(item: any): void;
|
|
21
|
-
private
|
|
22
|
+
private hasMergedCells;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpreadsheetMergeDirective, never>;
|
|
23
24
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SpreadsheetMergeDirective, "[kendoSpreadsheetMerge]", never, {}, {}, never>;
|
|
24
25
|
}
|