@progress/kendo-angular-spreadsheet 14.1.1-develop.8 → 14.2.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.
Files changed (42) hide show
  1. package/common/error-handling.service.d.ts +37 -0
  2. package/esm2020/common/error-handling.service.mjs +74 -0
  3. package/esm2020/localization/messages.mjs +55 -1
  4. package/esm2020/package-metadata.mjs +2 -2
  5. package/esm2020/sheets-bar/action-dialog.component.mjs +8 -7
  6. package/esm2020/spreadsheet.component.mjs +208 -44
  7. package/esm2020/spreadsheet.module.mjs +48 -10
  8. package/esm2020/tools/{align-tool.directive.mjs → align/align-tool.directive.mjs} +9 -9
  9. package/esm2020/tools/align/horizontal-align-tool.directive.mjs +60 -0
  10. package/esm2020/tools/align/vertical-align-tool.directive.mjs +60 -0
  11. package/esm2020/tools/decrease-decimal-tool.directive.mjs +40 -0
  12. package/esm2020/tools/font-family/font-family-dropdownlist.component.mjs +0 -2
  13. package/esm2020/tools/font-size/decrease-font-tool.directive.mjs +50 -0
  14. package/esm2020/tools/font-size/increase-font-tool.directive.mjs +50 -0
  15. package/esm2020/tools/increase-decimal-tool.directive.mjs +40 -0
  16. package/esm2020/tools/index.mjs +8 -1
  17. package/esm2020/tools/insert/insert-link-dialog.component.mjs +49 -0
  18. package/esm2020/tools/insert/insert-link-tool.directive.mjs +91 -0
  19. package/esm2020/tools/load-file.component.mjs +1 -1
  20. package/esm2020/tools/shared/command-icons.mjs +17 -3
  21. package/esm2020/tools/shared/constants.mjs +11 -11
  22. package/esm2020/tools/tables/merge-tool.directive.mjs +1 -1
  23. package/fesm2015/progress-kendo-angular-spreadsheet.mjs +722 -83
  24. package/fesm2020/progress-kendo-angular-spreadsheet.mjs +719 -83
  25. package/localization/messages.d.ts +109 -1
  26. package/models/main-menu-item.d.ts +1 -1
  27. package/package.json +14 -14
  28. package/schematics/ngAdd/index.js +1 -1
  29. package/spreadsheet.component.d.ts +4 -1
  30. package/spreadsheet.module.d.ts +23 -15
  31. package/tools/{align-tool.directive.d.ts → align/align-tool.directive.d.ts} +3 -3
  32. package/tools/align/horizontal-align-tool.directive.d.ts +25 -0
  33. package/tools/align/vertical-align-tool.directive.d.ts +25 -0
  34. package/tools/decrease-decimal-tool.directive.d.ts +19 -0
  35. package/tools/font-size/decrease-font-tool.directive.d.ts +22 -0
  36. package/tools/font-size/increase-font-tool.directive.d.ts +22 -0
  37. package/tools/increase-decimal-tool.directive.d.ts +19 -0
  38. package/tools/index.d.ts +8 -1
  39. package/tools/insert/insert-link-dialog.component.d.ts +18 -0
  40. package/tools/insert/insert-link-tool.directive.d.ts +26 -0
  41. package/tools/shared/commands.d.ts +1 -1
  42. package/tools/shared/constants.d.ts +2 -0
@@ -3,18 +3,18 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Directive } from '@angular/core';
6
- import { SpreadsheetLocalizationService } from '../localization/spreadsheet-localization.service';
7
- import { SpreadsheetService } from '../common/spreadsheet.service';
8
- import { commandIcons, commandSVGIcons } from './shared/command-icons';
9
- import { ALIGNS } from './shared/constants';
6
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
7
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
8
+ import { commandIcons, commandSVGIcons } from '../shared/command-icons';
9
+ import { ALIGNS } from '../shared/constants';
10
10
  import { ToolBarDropDownButtonComponent } from '@progress/kendo-angular-toolbar';
11
11
  import { Subscription } from 'rxjs';
12
- import { SpreadsheetToolsService } from './tools.service';
12
+ import { SpreadsheetToolsService } from '../tools.service';
13
13
  import * as i0 from "@angular/core";
14
14
  import * as i1 from "@progress/kendo-angular-toolbar";
15
- import * as i2 from "../localization/spreadsheet-localization.service";
16
- import * as i3 from "../common/spreadsheet.service";
17
- import * as i4 from "./tools.service";
15
+ import * as i2 from "../../localization/spreadsheet-localization.service";
16
+ import * as i3 from "../../common/spreadsheet.service";
17
+ import * as i4 from "../tools.service";
18
18
  /**
19
19
  * @hidden
20
20
  */
@@ -29,7 +29,7 @@ export class SpreadsheetTextAlignDirective {
29
29
  host.icon = commandIcons[this.commandName];
30
30
  host.arrowIcon = true;
31
31
  host.fillMode = 'flat';
32
- host.data = [...ALIGNS];
32
+ host.data = ALIGNS.map(item => ({ ...item, textKey: localization.get(item.commandId) }));
33
33
  this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
34
34
  host.title = localization.get(this.commandName);
35
35
  host.textField = 'textKey';
@@ -0,0 +1,60 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
7
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
8
+ import { commandIcons, commandSVGIcons } from '../shared/command-icons';
9
+ import { ALIGNS } from '../shared/constants';
10
+ import { ToolBarDropDownButtonComponent } from '@progress/kendo-angular-toolbar';
11
+ import { Subscription } from 'rxjs';
12
+ import { SpreadsheetToolsService } from '../tools.service';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "@progress/kendo-angular-toolbar";
15
+ import * as i2 from "../../localization/spreadsheet-localization.service";
16
+ import * as i3 from "../../common/spreadsheet.service";
17
+ import * as i4 from "../tools.service";
18
+ /**
19
+ * @hidden
20
+ */
21
+ export class SpreadsheetHorizontalTextAlignDirective {
22
+ constructor(host, localization, spreadsheetService, toolsService) {
23
+ this.host = host;
24
+ this.spreadsheetService = spreadsheetService;
25
+ this.toolsService = toolsService;
26
+ this.commandName = 'alignHorizontal';
27
+ this.subs = new Subscription();
28
+ host.svgIcon = commandSVGIcons[this.commandName];
29
+ host.icon = commandIcons[this.commandName];
30
+ host.arrowIcon = true;
31
+ host.fillMode = 'flat';
32
+ host.data = ALIGNS
33
+ .filter(value => value.commandName === 'textAlign')
34
+ .map(item => ({ ...item, textKey: localization.get(item.commandId) }));
35
+ this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
36
+ host.title = localization.get(this.commandName);
37
+ host.textField = 'textKey';
38
+ }
39
+ ngOnInit() {
40
+ this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[i.commandName] ? 'k-selected' : '')));
41
+ }
42
+ ngOnDestroy() {
43
+ this.subs.unsubscribe();
44
+ }
45
+ onItemClick(item) {
46
+ const value = item.value || null;
47
+ const options = {
48
+ command: 'PropertyChangeCommand', options: { property: item.commandName, value }
49
+ };
50
+ this.spreadsheetService.spreadsheet.executeCommand(options);
51
+ }
52
+ }
53
+ SpreadsheetHorizontalTextAlignDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetHorizontalTextAlignDirective, deps: [{ token: i1.ToolBarDropDownButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
54
+ SpreadsheetHorizontalTextAlignDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetHorizontalTextAlignDirective, selector: "[kendoSpreadsheetHorizontalTextAlign]", ngImport: i0 });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetHorizontalTextAlignDirective, decorators: [{
56
+ type: Directive,
57
+ args: [{
58
+ selector: '[kendoSpreadsheetHorizontalTextAlign]',
59
+ }]
60
+ }], ctorParameters: function () { return [{ type: i1.ToolBarDropDownButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -0,0 +1,60 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
7
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
8
+ import { commandIcons, commandSVGIcons } from '../shared/command-icons';
9
+ import { ALIGNS } from '../shared/constants';
10
+ import { ToolBarDropDownButtonComponent } from '@progress/kendo-angular-toolbar';
11
+ import { Subscription } from 'rxjs';
12
+ import { SpreadsheetToolsService } from '../tools.service';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "@progress/kendo-angular-toolbar";
15
+ import * as i2 from "../../localization/spreadsheet-localization.service";
16
+ import * as i3 from "../../common/spreadsheet.service";
17
+ import * as i4 from "../tools.service";
18
+ /**
19
+ * @hidden
20
+ */
21
+ export class SpreadsheetVerticalTextAlignDirective {
22
+ constructor(host, localization, spreadsheetService, toolsService) {
23
+ this.host = host;
24
+ this.spreadsheetService = spreadsheetService;
25
+ this.toolsService = toolsService;
26
+ this.commandName = 'alignVertical';
27
+ this.subs = new Subscription();
28
+ host.svgIcon = commandSVGIcons[this.commandName];
29
+ host.icon = commandIcons[this.commandName];
30
+ host.arrowIcon = true;
31
+ host.fillMode = 'flat';
32
+ host.data = ALIGNS
33
+ .filter(value => value.commandName === 'verticalAlign')
34
+ .map(item => ({ ...item, textKey: localization.get(item.commandId) }));
35
+ this.subs.add(host.itemClick.subscribe((e) => this.onItemClick(e)));
36
+ host.title = localization.get(this.commandName);
37
+ host.textField = 'textKey';
38
+ }
39
+ ngOnInit() {
40
+ this.subs.add(this.toolsService.stateChange.subscribe(state => this.host.data.forEach(i => i.cssClass = i.value === state[i.commandName] ? 'k-selected' : '')));
41
+ }
42
+ ngOnDestroy() {
43
+ this.subs.unsubscribe();
44
+ }
45
+ onItemClick(item) {
46
+ const value = item.value || null;
47
+ const options = {
48
+ command: 'PropertyChangeCommand', options: { property: item.commandName, value }
49
+ };
50
+ this.spreadsheetService.spreadsheet.executeCommand(options);
51
+ }
52
+ }
53
+ SpreadsheetVerticalTextAlignDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetVerticalTextAlignDirective, deps: [{ token: i1.ToolBarDropDownButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
54
+ SpreadsheetVerticalTextAlignDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetVerticalTextAlignDirective, selector: "[kendoSpreadsheetVerticalTextAlign]", ngImport: i0 });
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetVerticalTextAlignDirective, decorators: [{
56
+ type: Directive,
57
+ args: [{
58
+ selector: '[kendoSpreadsheetVerticalTextAlign]',
59
+ }]
60
+ }], ctorParameters: function () { return [{ type: i1.ToolBarDropDownButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -0,0 +1,40 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { SpreadsheetLocalizationService } from '../localization/spreadsheet-localization.service';
8
+ import { SpreadsheetService } from '../common/spreadsheet.service';
9
+ import { SpreadsheetToolsService } from './tools.service';
10
+ import { SpreadsheetCommandButton } from './shared/spreadsheet-command-button';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@progress/kendo-angular-toolbar";
13
+ import * as i2 from "../localization/spreadsheet-localization.service";
14
+ import * as i3 from "../common/spreadsheet.service";
15
+ import * as i4 from "./tools.service";
16
+ /**
17
+ * @hidden
18
+ */
19
+ export class SpreadsheetDecreaseDecimalDirective extends SpreadsheetCommandButton {
20
+ constructor(button, localization, spreadsheetService, toolsService) {
21
+ super('decreaseDecimal', button, localization, spreadsheetService, toolsService, {
22
+ command: 'AdjustDecimalsCommand'
23
+ });
24
+ }
25
+ clickHandler() {
26
+ const options = {
27
+ command: 'AdjustDecimalsCommand',
28
+ options: { value: -1 }
29
+ };
30
+ this.spreadsheetService.spreadsheet.executeCommand(options);
31
+ }
32
+ }
33
+ SpreadsheetDecreaseDecimalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetDecreaseDecimalDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
+ SpreadsheetDecreaseDecimalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetDecreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]", usesInheritance: true, ngImport: i0 });
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetDecreaseDecimalDirective, decorators: [{
36
+ type: Directive,
37
+ args: [{
38
+ selector: 'kendo-toolbar-button[kendoSpreadsheetDecreaseDecimal]'
39
+ }]
40
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -18,7 +18,6 @@ FontFamilyDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
18
18
  #element
19
19
  [data]="data"
20
20
  [(value)]="value"
21
- [attr.title]="title"
22
21
  [tabindex]="tabindex"
23
22
  (valueChange)="onValueChange($event)"
24
23
  [leftRightArrowsNavigation]="false"
@@ -40,7 +39,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
40
39
  #element
41
40
  [data]="data"
42
41
  [(value)]="value"
43
- [attr.title]="title"
44
42
  [tabindex]="tabindex"
45
43
  (valueChange)="onValueChange($event)"
46
44
  [leftRightArrowsNavigation]="false"
@@ -0,0 +1,50 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
8
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
9
+ import { SpreadsheetToolsService } from '../tools.service';
10
+ import { SpreadsheetCommandButton } from '../shared/spreadsheet-command-button';
11
+ import { DEFAULT_FONT_VALUES } from '../shared/constants';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "@progress/kendo-angular-toolbar";
14
+ import * as i2 from "../../localization/spreadsheet-localization.service";
15
+ import * as i3 from "../../common/spreadsheet.service";
16
+ import * as i4 from "../tools.service";
17
+ /**
18
+ * @hidden
19
+ */
20
+ export class SpreadsheetDecreaseFontSizeDirective extends SpreadsheetCommandButton {
21
+ constructor(button, localization, spreadsheetService, toolsService) {
22
+ super('decreaseFontSize', button, localization, spreadsheetService, toolsService, {
23
+ command: 'PropertyChangeCommand',
24
+ options: { property: 'fontSize' }
25
+ });
26
+ this.value = DEFAULT_FONT_VALUES.fontSize;
27
+ }
28
+ clickHandler() {
29
+ const newValue = this.value - 1;
30
+ const options = {
31
+ command: 'PropertyChangeCommand',
32
+ options: { property: 'fontSize', value: newValue || null }
33
+ };
34
+ this.spreadsheetService.spreadsheet.executeCommand(options);
35
+ }
36
+ ngAfterViewInit() {
37
+ this.value = this.toolsService.toolsState['fontSize'];
38
+ this.subs.add(this.toolsService.stateChange.subscribe(state => {
39
+ this.value = state['fontSize'];
40
+ }));
41
+ }
42
+ }
43
+ SpreadsheetDecreaseFontSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetDecreaseFontSizeDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
44
+ SpreadsheetDecreaseFontSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetDecreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]", usesInheritance: true, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetDecreaseFontSizeDirective, decorators: [{
46
+ type: Directive,
47
+ args: [{
48
+ selector: 'kendo-toolbar-button[kendoSpreadsheetDecreaseFontSize]'
49
+ }]
50
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -0,0 +1,50 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
8
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
9
+ import { SpreadsheetToolsService } from '../tools.service';
10
+ import { SpreadsheetCommandButton } from '../shared/spreadsheet-command-button';
11
+ import { DEFAULT_FONT_VALUES } from '../shared/constants';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "@progress/kendo-angular-toolbar";
14
+ import * as i2 from "../../localization/spreadsheet-localization.service";
15
+ import * as i3 from "../../common/spreadsheet.service";
16
+ import * as i4 from "../tools.service";
17
+ /**
18
+ * @hidden
19
+ */
20
+ export class SpreadsheetIncreaseFontSizeDirective extends SpreadsheetCommandButton {
21
+ constructor(button, localization, spreadsheetService, toolsService) {
22
+ super('increaseFontSize', button, localization, spreadsheetService, toolsService, {
23
+ command: 'PropertyChangeCommand',
24
+ options: { property: 'fontSize' }
25
+ });
26
+ this.value = DEFAULT_FONT_VALUES.fontSize;
27
+ }
28
+ clickHandler() {
29
+ const newValue = this.value + 1;
30
+ const options = {
31
+ command: 'PropertyChangeCommand',
32
+ options: { property: 'fontSize', value: newValue || null }
33
+ };
34
+ this.spreadsheetService.spreadsheet.executeCommand(options);
35
+ }
36
+ ngAfterViewInit() {
37
+ this.value = this.toolsService.toolsState['fontSize'];
38
+ this.subs.add(this.toolsService.stateChange.subscribe(state => {
39
+ this.value = state['fontSize'];
40
+ }));
41
+ }
42
+ }
43
+ SpreadsheetIncreaseFontSizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetIncreaseFontSizeDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
44
+ SpreadsheetIncreaseFontSizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetIncreaseFontSizeDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]", usesInheritance: true, ngImport: i0 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetIncreaseFontSizeDirective, decorators: [{
46
+ type: Directive,
47
+ args: [{
48
+ selector: 'kendo-toolbar-button[kendoSpreadsheetIncreaseFontSize]'
49
+ }]
50
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -0,0 +1,40 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { SpreadsheetLocalizationService } from '../localization/spreadsheet-localization.service';
8
+ import { SpreadsheetService } from '../common/spreadsheet.service';
9
+ import { SpreadsheetToolsService } from './tools.service';
10
+ import { SpreadsheetCommandButton } from './shared/spreadsheet-command-button';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@progress/kendo-angular-toolbar";
13
+ import * as i2 from "../localization/spreadsheet-localization.service";
14
+ import * as i3 from "../common/spreadsheet.service";
15
+ import * as i4 from "./tools.service";
16
+ /**
17
+ * @hidden
18
+ */
19
+ export class SpreadsheetIncreaseDecimalDirective extends SpreadsheetCommandButton {
20
+ constructor(button, localization, spreadsheetService, toolsService) {
21
+ super('increaseDecimal', button, localization, spreadsheetService, toolsService, {
22
+ command: 'AdjustDecimalsCommand'
23
+ });
24
+ }
25
+ clickHandler() {
26
+ const options = {
27
+ command: 'AdjustDecimalsCommand',
28
+ options: { value: 1 }
29
+ };
30
+ this.spreadsheetService.spreadsheet.executeCommand(options);
31
+ }
32
+ }
33
+ SpreadsheetIncreaseDecimalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetIncreaseDecimalDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }], target: i0.ɵɵFactoryTarget.Directive });
34
+ SpreadsheetIncreaseDecimalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetIncreaseDecimalDirective, selector: "kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]", usesInheritance: true, ngImport: i0 });
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetIncreaseDecimalDirective, decorators: [{
36
+ type: Directive,
37
+ args: [{
38
+ selector: 'kendo-toolbar-button[kendoSpreadsheetIncreaseDecimal]'
39
+ }]
40
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }]; } });
@@ -11,10 +11,17 @@ export { SpreadsheetUndoDirective } from './history/undo-tool';
11
11
  export { SpreadsheetBoldDirective } from './typographical-emphasis/bold-tool.directive';
12
12
  export { SpreadsheetItalicDirective } from './typographical-emphasis/italic-tool.directive';
13
13
  export { SpreadsheetUnderlineDirective } from './typographical-emphasis/underline-tool.directive';
14
- export { SpreadsheetTextAlignDirective } from './align-tool.directive';
14
+ export { SpreadsheetTextAlignDirective } from './align/align-tool.directive';
15
15
  export { SpreadsheetFormatDirective } from './format-tool.directive';
16
16
  export { SpreadsheetGridLinesDirective } from './gridlines-tool.directive';
17
17
  export { SpreadsheetLoadFileComponent } from './load-file.component';
18
18
  export { SpreadsheetSaveFileDirective } from './save-file-tool.directive';
19
19
  export { SpreadsheetTextWrapDirective } from './text-wrap-tool.directive';
20
+ export { SpreadsheetInsertLinkDirective } from './insert/insert-link-tool.directive';
21
+ export { SpreadsheetIncreaseFontSizeDirective } from './font-size/increase-font-tool.directive';
22
+ export { SpreadsheetDecreaseFontSizeDirective } from './font-size/decrease-font-tool.directive';
23
+ export { SpreadsheetIncreaseDecimalDirective } from './increase-decimal-tool.directive';
24
+ export { SpreadsheetDecreaseDecimalDirective } from './decrease-decimal-tool.directive';
25
+ export { SpreadsheetHorizontalTextAlignDirective } from './align/horizontal-align-tool.directive';
26
+ export { SpreadsheetVerticalTextAlignDirective } from './align/vertical-align-tool.directive';
20
27
  export * from './tables';
@@ -0,0 +1,49 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Component } from '@angular/core';
6
+ import { DialogRef, DialogContentBase } from '@progress/kendo-angular-dialog';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@progress/kendo-angular-dialog";
9
+ import * as i2 from "@progress/kendo-angular-label";
10
+ import * as i3 from "@progress/kendo-angular-inputs";
11
+ /**
12
+ * @hidden
13
+ */
14
+ export class InsertLinkDialogComponent extends DialogContentBase {
15
+ constructor(dialog) {
16
+ super(dialog);
17
+ this.dialog = dialog;
18
+ this.urlLink = '';
19
+ }
20
+ setData(args) {
21
+ this.urlLink = args.link;
22
+ }
23
+ }
24
+ InsertLinkDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, deps: [{ token: i1.DialogRef }], target: i0.ɵɵFactoryTarget.Component });
25
+ InsertLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: InsertLinkDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
26
+ <form class="k-form k-form-md" method="dialog">
27
+ <div class="k-form-field">
28
+ <kendo-label [for]="textbox" text="URL"></kendo-label>
29
+ <kendo-textbox #textbox
30
+ [(value)]="urlLink">
31
+ </kendo-textbox>
32
+ </div>
33
+ </form>
34
+ `, isInline: true, components: [{ type: i2.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }, { type: i3.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"] }] });
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: InsertLinkDialogComponent, decorators: [{
36
+ type: Component,
37
+ args: [{
38
+ template: `
39
+ <form class="k-form k-form-md" method="dialog">
40
+ <div class="k-form-field">
41
+ <kendo-label [for]="textbox" text="URL"></kendo-label>
42
+ <kendo-textbox #textbox
43
+ [(value)]="urlLink">
44
+ </kendo-textbox>
45
+ </div>
46
+ </form>
47
+ `
48
+ }]
49
+ }], ctorParameters: function () { return [{ type: i1.DialogRef }]; } });
@@ -0,0 +1,91 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { take } from 'rxjs/operators';
7
+ import { isPresent } from '@progress/kendo-angular-common';
8
+ import { DialogService } from '@progress/kendo-angular-dialog';
9
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
10
+ import { SpreadsheetLocalizationService } from '../../localization/spreadsheet-localization.service';
11
+ import { SpreadsheetService } from '../../common/spreadsheet.service';
12
+ import { SpreadsheetToolsService } from '../tools.service';
13
+ import { SpreadsheetCommandButton } from '../shared/spreadsheet-command-button';
14
+ import { InsertLinkDialogComponent } from './insert-link-dialog.component';
15
+ import * as i0 from "@angular/core";
16
+ import * as i1 from "@progress/kendo-angular-toolbar";
17
+ import * as i2 from "../../localization/spreadsheet-localization.service";
18
+ import * as i3 from "../../common/spreadsheet.service";
19
+ import * as i4 from "../tools.service";
20
+ import * as i5 from "@progress/kendo-angular-dialog";
21
+ /**
22
+ * @hidden
23
+ */
24
+ export class SpreadsheetInsertLinkDirective extends SpreadsheetCommandButton {
25
+ constructor(button, localization, spreadsheetService, toolsService, dialogService) {
26
+ super('insertLink', button, localization, spreadsheetService, toolsService, {
27
+ command: 'HyperlinkCommand'
28
+ });
29
+ this.dialogService = dialogService;
30
+ spreadsheetService.selectionChanged.subscribe(range => this.currentRange = range);
31
+ }
32
+ clickHandler() {
33
+ const sheet = this.spreadsheetService.spreadsheet.activeSheet();
34
+ if (sheet) {
35
+ this.openDialog();
36
+ }
37
+ }
38
+ /**
39
+ * @hidden
40
+ */
41
+ openDialog() {
42
+ const hasLink = isPresent(this.currentRange?.link());
43
+ const dialogSettings = {
44
+ appendTo: this.spreadsheetService.dialogContainer,
45
+ title: this.localization.get(this.command),
46
+ content: InsertLinkDialogComponent,
47
+ actions: [{
48
+ text: this.localization.get('dialogInsert'),
49
+ themeColor: 'primary'
50
+ }, {
51
+ text: this.localization.get('dialogCancel')
52
+ },
53
+ 'spacer', {
54
+ text: this.localization.get('dialogRemoveLink'),
55
+ themeColor: 'primary',
56
+ fillMode: 'clear',
57
+ cssClass: hasLink ? '' : 'k-disabled'
58
+ }],
59
+ actionsLayout: 'start',
60
+ width: 400,
61
+ autoFocusedElement: '.k-textbox > .k-input-inner'
62
+ };
63
+ const dialog = this.dialogService.open(dialogSettings);
64
+ const dialogInstance = dialog.dialog.instance;
65
+ const dialogContent = dialog.content.instance;
66
+ if (hasLink) {
67
+ dialogContent.setData({ link: this.currentRange?.link() });
68
+ }
69
+ dialogInstance.action.pipe(take(1)).subscribe((event) => {
70
+ if (event.text === this.localization.get('dialogCancel')) {
71
+ return;
72
+ }
73
+ let link = null;
74
+ if (event.text === this.localization.get('dialogInsert')) {
75
+ link = dialogContent.urlLink || null;
76
+ }
77
+ this.spreadsheetService.spreadsheet.executeCommand({
78
+ command: 'HyperlinkCommand',
79
+ options: { link }
80
+ });
81
+ });
82
+ }
83
+ }
84
+ SpreadsheetInsertLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetInsertLinkDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.SpreadsheetLocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }, { token: i5.DialogService }], target: i0.ɵɵFactoryTarget.Directive });
85
+ SpreadsheetInsertLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: SpreadsheetInsertLinkDirective, selector: "kendo-toolbar-button[kendoSpreadsheetInsertLink]", usesInheritance: true, ngImport: i0 });
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SpreadsheetInsertLinkDirective, decorators: [{
87
+ type: Directive,
88
+ args: [{
89
+ selector: 'kendo-toolbar-button[kendoSpreadsheetInsertLink]'
90
+ }]
91
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.SpreadsheetLocalizationService }, { type: i3.SpreadsheetService }, { type: i4.SpreadsheetToolsService }, { type: i5.DialogService }]; } });
@@ -29,7 +29,7 @@ export class SpreadsheetLoadFileComponent extends ToolBarToolComponent {
29
29
  this.onFileSelect = (e) => {
30
30
  const file = e.target.files[0];
31
31
  if (file) {
32
- this.spreadsheetService.spreadsheet.fromFile(file);
32
+ this.spreadsheetService.spreadsheet.executeCommand({ command: 'OpenCommand', options: { file } });
33
33
  e.target.value = null;
34
34
  }
35
35
  };
@@ -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, cellsMergeIcon, cellsMergeVerticallyIcon, tableUnmergeIcon } from '@progress/kendo-svg-icons';
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, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, decimalIncreaseIcon } from '@progress/kendo-svg-icons';
6
6
  /**
7
7
  * @hidden
8
8
  */
@@ -15,6 +15,8 @@ export const commandIcons = {
15
15
  alignMiddle: 'align-middle',
16
16
  alignBottom: 'align-bottom',
17
17
  align: 'align-left',
18
+ alignHorizontal: 'align-left',
19
+ alignVertical: 'align-middle',
18
20
  background: 'droplet',
19
21
  bold: 'bold',
20
22
  color: 'foreground-color',
@@ -39,7 +41,12 @@ export const commandIcons = {
39
41
  mergeAll: 'cells-merge',
40
42
  mergeHorizontally: 'cells-merge-horizontally',
41
43
  mergeVertically: 'cells-merge-vertically',
42
- unmerge: 'table-unmerge'
44
+ unmerge: 'table-unmerge',
45
+ insertLink: 'hyperlink',
46
+ increaseFontSize: 'font-grow',
47
+ decreaseFontSize: 'font-shrink',
48
+ increaseDecimal: 'decimal-increase',
49
+ decreaseDecimal: 'decimal-decrease'
43
50
  };
44
51
  /**
45
52
  * @hidden
@@ -53,6 +60,8 @@ export const commandSVGIcons = {
53
60
  alignMiddle: alignMiddleIcon,
54
61
  alignBottom: alignBottomIcon,
55
62
  align: alignLeftIcon,
63
+ alignHorizontal: alignLeftIcon,
64
+ alignVertical: alignMiddleIcon,
56
65
  background: dropletIcon,
57
66
  bold: boldIcon,
58
67
  color: foregroundColorIcon,
@@ -77,5 +86,10 @@ export const commandSVGIcons = {
77
86
  mergeAll: cellsMergeIcon,
78
87
  mergeHorizontally: cellsMergeHorizontallyIcon,
79
88
  mergeVertically: cellsMergeVerticallyIcon,
80
- unmerge: tableUnmergeIcon
89
+ unmerge: tableUnmergeIcon,
90
+ insertLink: linkIcon,
91
+ increaseFontSize: fontGrowIcon,
92
+ decreaseFontSize: fontShrinkIcon,
93
+ decreaseDecimal: decimalDecreaseIcon,
94
+ increaseDecimal: decimalIncreaseIcon
81
95
  };
@@ -47,22 +47,22 @@ export const FORMATS = [
47
47
  * @hidden
48
48
  */
49
49
  export const ALIGNS = [
50
- { icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '' },
51
- { icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '' },
52
- { icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '' },
53
- { icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '' },
54
- { icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '' },
55
- { icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '' },
56
- { icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '' }
50
+ { icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '', commandId: 'alignLeft' },
51
+ { icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '', commandId: 'alignCenter' },
52
+ { icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '', commandId: 'alignRight' },
53
+ { icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '', commandId: 'alignJustify' },
54
+ { icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '', commandId: 'alignTop' },
55
+ { icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '', commandId: 'alignMiddle' },
56
+ { icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '', commandId: 'alignBottom' }
57
57
  ];
58
58
  /**
59
59
  * @hidden
60
60
  */
61
61
  export const MERGE = [
62
- { icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false },
63
- { icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false },
64
- { icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false },
65
- { icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false }
62
+ { icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false, commandId: 'mergeAll' },
63
+ { icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false, commandId: 'mergeHorizontally' },
64
+ { icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false, commandId: 'mergeVertically' },
65
+ { icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false, commandId: 'unmerge' }
66
66
  ];
67
67
  /**
68
68
  * @hidden