@progress/kendo-angular-excel-export 4.0.3 → 5.0.0-next.202203101813
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/bundles/kendo-angular-excel-export.umd.js +5 -0
- package/{dist/es2015/columns → columns}/column-base.d.ts +4 -1
- package/{dist/es2015/columns → columns}/column-group.component.d.ts +3 -0
- package/{dist/es2015/columns → columns}/column.component.d.ts +3 -0
- package/{dist/es2015/columns → columns}/footer-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-footer-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-header-column-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-header-template.directive.d.ts +3 -0
- package/esm2015/columns/column-base.js +41 -0
- package/esm2015/columns/column-group.component.js +43 -0
- package/esm2015/columns/column.component.js +68 -0
- package/esm2015/columns/footer-template.directive.js +26 -0
- package/esm2015/columns/group-footer-template.directive.js +26 -0
- package/esm2015/columns/group-header-column-template.directive.js +25 -0
- package/esm2015/columns/group-header-template.directive.js +26 -0
- package/{dist/es → esm2015}/excel-export-data.js +1 -0
- package/{dist/es2015 → esm2015}/excel-export.component.js +54 -69
- package/{dist/es2015 → esm2015}/excel-export.module.js +25 -10
- package/{dist/es2015/excel-export-data.js → esm2015/kendo-angular-excel-export.js} +4 -0
- package/{dist/es2015 → esm2015}/main.js +1 -0
- package/{dist/es2015 → esm2015}/ooxml/cell-options.interface.js +1 -0
- package/{dist/es2015 → esm2015}/ooxml/exporter-columns.js +2 -7
- package/{dist/es2015 → esm2015}/ooxml/workbook.js +0 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015/excel-export-data.d.ts → excel-export-data.d.ts} +0 -0
- package/{dist/es2015/excel-export.component.d.ts → excel-export.component.d.ts} +3 -0
- package/{dist/es2015/excel-export.module.d.ts → excel-export.module.d.ts} +11 -0
- package/fesm2015/kendo-angular-excel-export.js +606 -0
- package/{dist/es2015/index.d.ts → kendo-angular-excel-export.d.ts} +1 -1
- package/{dist/es2015/main.d.ts → main.d.ts} +1 -0
- package/{dist/es2015/ooxml → ooxml}/cell-options.interface.d.ts +0 -0
- package/{dist/es2015/ooxml → ooxml}/exporter-columns.d.ts +0 -0
- package/{dist/es2015/ooxml → ooxml}/workbook.d.ts +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +30 -88
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/dist/cdn/js/kendo-angular-excel-export.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/columns/column-base.js +0 -50
- package/dist/es/columns/column-group.component.js +0 -36
- package/dist/es/columns/column.component.js +0 -74
- package/dist/es/columns/footer-template.directive.js +0 -25
- package/dist/es/columns/group-footer-template.directive.js +0 -25
- package/dist/es/columns/group-header-column-template.directive.js +0 -24
- package/dist/es/columns/group-header-template.directive.js +0 -25
- package/dist/es/excel-export.component.js +0 -170
- package/dist/es/excel-export.module.js +0 -65
- package/dist/es/index.js +0 -9
- package/dist/es/main.js +0 -14
- package/dist/es/ooxml/cell-options.interface.js +0 -4
- package/dist/es/ooxml/exporter-columns.js +0 -126
- package/dist/es/ooxml/workbook.js +0 -45
- package/dist/es/package-metadata.js +0 -15
- package/dist/es2015/columns/column-base.js +0 -44
- package/dist/es2015/columns/column-group.component.js +0 -32
- package/dist/es2015/columns/column.component.js +0 -71
- package/dist/es2015/columns/footer-template.directive.js +0 -24
- package/dist/es2015/columns/group-footer-template.directive.js +0 -24
- package/dist/es2015/columns/group-header-column-template.directive.js +0 -23
- package/dist/es2015/columns/group-header-template.directive.js +0 -24
- package/dist/es2015/index.js +0 -9
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/fesm2015/index.js +0 -585
- package/dist/fesm5/index.js +0 -606
- package/dist/npm/columns/column-base.js +0 -52
- package/dist/npm/columns/column-group.component.js +0 -38
- package/dist/npm/columns/column.component.js +0 -76
- package/dist/npm/columns/footer-template.directive.js +0 -27
- package/dist/npm/columns/group-footer-template.directive.js +0 -27
- package/dist/npm/columns/group-header-column-template.directive.js +0 -26
- package/dist/npm/columns/group-header-template.directive.js +0 -27
- package/dist/npm/excel-export-data.js +0 -6
- package/dist/npm/excel-export.component.js +0 -172
- package/dist/npm/excel-export.module.js +0 -67
- package/dist/npm/index.js +0 -13
- package/dist/npm/main.js +0 -25
- package/dist/npm/ooxml/cell-options.interface.js +0 -6
- package/dist/npm/ooxml/exporter-columns.js +0 -131
- package/dist/npm/ooxml/workbook.js +0 -47
- package/dist/npm/package-metadata.js +0 -17
- package/dist/systemjs/kendo-angular-excel-export.js +0 -5
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var group_header_template_directive_1 = require("./group-header-template.directive");
|
|
10
|
-
var group_header_column_template_directive_1 = require("./group-header-column-template.directive");
|
|
11
|
-
var group_footer_template_directive_1 = require("./group-footer-template.directive");
|
|
12
|
-
var footer_template_directive_1 = require("./footer-template.directive");
|
|
13
|
-
var column_base_1 = require("./column-base");
|
|
14
|
-
/**
|
|
15
|
-
* Represents the columns of the Kendo UI Excel Export component for Angular.
|
|
16
|
-
*/
|
|
17
|
-
var ColumnComponent = /** @class */ (function (_super) {
|
|
18
|
-
tslib_1.__extends(ColumnComponent, _super);
|
|
19
|
-
function ColumnComponent(parent) {
|
|
20
|
-
return _super.call(this, parent) || this;
|
|
21
|
-
}
|
|
22
|
-
ColumnComponent_1 = ColumnComponent;
|
|
23
|
-
var ColumnComponent_1;
|
|
24
|
-
tslib_1.__decorate([
|
|
25
|
-
core_1.Input(),
|
|
26
|
-
tslib_1.__metadata("design:type", String)
|
|
27
|
-
], ColumnComponent.prototype, "field", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
core_1.Input(),
|
|
30
|
-
tslib_1.__metadata("design:type", Object)
|
|
31
|
-
], ColumnComponent.prototype, "cellOptions", void 0);
|
|
32
|
-
tslib_1.__decorate([
|
|
33
|
-
core_1.Input(),
|
|
34
|
-
tslib_1.__metadata("design:type", Object)
|
|
35
|
-
], ColumnComponent.prototype, "groupHeaderCellOptions", void 0);
|
|
36
|
-
tslib_1.__decorate([
|
|
37
|
-
core_1.Input(),
|
|
38
|
-
tslib_1.__metadata("design:type", Object)
|
|
39
|
-
], ColumnComponent.prototype, "groupFooterCellOptions", void 0);
|
|
40
|
-
tslib_1.__decorate([
|
|
41
|
-
core_1.Input(),
|
|
42
|
-
tslib_1.__metadata("design:type", Object)
|
|
43
|
-
], ColumnComponent.prototype, "footerCellOptions", void 0);
|
|
44
|
-
tslib_1.__decorate([
|
|
45
|
-
core_1.ContentChild(group_header_template_directive_1.GroupHeaderTemplateDirective, { static: false }),
|
|
46
|
-
tslib_1.__metadata("design:type", group_header_template_directive_1.GroupHeaderTemplateDirective)
|
|
47
|
-
], ColumnComponent.prototype, "groupHeaderTemplate", void 0);
|
|
48
|
-
tslib_1.__decorate([
|
|
49
|
-
core_1.ContentChild(group_header_column_template_directive_1.GroupHeaderColumnTemplateDirective, { static: false }),
|
|
50
|
-
tslib_1.__metadata("design:type", group_header_column_template_directive_1.GroupHeaderColumnTemplateDirective)
|
|
51
|
-
], ColumnComponent.prototype, "groupHeaderColumnTemplate", void 0);
|
|
52
|
-
tslib_1.__decorate([
|
|
53
|
-
core_1.ContentChild(group_footer_template_directive_1.GroupFooterTemplateDirective, { static: false }),
|
|
54
|
-
tslib_1.__metadata("design:type", group_footer_template_directive_1.GroupFooterTemplateDirective)
|
|
55
|
-
], ColumnComponent.prototype, "groupFooterTemplate", void 0);
|
|
56
|
-
tslib_1.__decorate([
|
|
57
|
-
core_1.ContentChild(footer_template_directive_1.FooterTemplateDirective, { static: false }),
|
|
58
|
-
tslib_1.__metadata("design:type", footer_template_directive_1.FooterTemplateDirective)
|
|
59
|
-
], ColumnComponent.prototype, "footerTemplate", void 0);
|
|
60
|
-
ColumnComponent = ColumnComponent_1 = tslib_1.__decorate([
|
|
61
|
-
core_1.Component({
|
|
62
|
-
providers: [
|
|
63
|
-
{
|
|
64
|
-
provide: column_base_1.ColumnBase,
|
|
65
|
-
useExisting: core_1.forwardRef(function () { return ColumnComponent_1; }) // tslint:disable-line:no-forward-ref
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
selector: 'kendo-excelexport-column',
|
|
69
|
-
template: ""
|
|
70
|
-
}),
|
|
71
|
-
tslib_1.__param(0, core_1.SkipSelf()), tslib_1.__param(0, core_1.Host()), tslib_1.__param(0, core_1.Optional()),
|
|
72
|
-
tslib_1.__metadata("design:paramtypes", [column_base_1.ColumnBase])
|
|
73
|
-
], ColumnComponent);
|
|
74
|
-
return ColumnComponent;
|
|
75
|
-
}(column_base_1.ColumnBase));
|
|
76
|
-
exports.ColumnComponent = ColumnComponent;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the footer cell template of the Excel Export column component
|
|
11
|
-
* ([see example]({% slug columns_excel-export %}#toc-footer-template)).
|
|
12
|
-
* Enables you to customize the footer cell of the column.
|
|
13
|
-
*/
|
|
14
|
-
var FooterTemplateDirective = /** @class */ (function () {
|
|
15
|
-
function FooterTemplateDirective(templateRef) {
|
|
16
|
-
this.templateRef = templateRef;
|
|
17
|
-
}
|
|
18
|
-
FooterTemplateDirective = tslib_1.__decorate([
|
|
19
|
-
core_1.Directive({
|
|
20
|
-
selector: '[kendoExcelExportFooterTemplate]'
|
|
21
|
-
}),
|
|
22
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
23
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
24
|
-
], FooterTemplateDirective);
|
|
25
|
-
return FooterTemplateDirective;
|
|
26
|
-
}());
|
|
27
|
-
exports.FooterTemplateDirective = FooterTemplateDirective;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the group footer cell template of the Excel Export column component
|
|
11
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-footer-template)).
|
|
12
|
-
* Enables you to customize the group footer cell of the column.
|
|
13
|
-
*/
|
|
14
|
-
var GroupFooterTemplateDirective = /** @class */ (function () {
|
|
15
|
-
function GroupFooterTemplateDirective(templateRef) {
|
|
16
|
-
this.templateRef = templateRef;
|
|
17
|
-
}
|
|
18
|
-
GroupFooterTemplateDirective = tslib_1.__decorate([
|
|
19
|
-
core_1.Directive({
|
|
20
|
-
selector: '[kendoExcelExportGroupFooterTemplate]'
|
|
21
|
-
}),
|
|
22
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
23
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
24
|
-
], GroupFooterTemplateDirective);
|
|
25
|
-
return GroupFooterTemplateDirective;
|
|
26
|
-
}());
|
|
27
|
-
exports.GroupFooterTemplateDirective = GroupFooterTemplateDirective;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the group header column template of the Excel Export column component
|
|
11
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-header-column-template)).
|
|
12
|
-
*/
|
|
13
|
-
var GroupHeaderColumnTemplateDirective = /** @class */ (function () {
|
|
14
|
-
function GroupHeaderColumnTemplateDirective(templateRef) {
|
|
15
|
-
this.templateRef = templateRef;
|
|
16
|
-
}
|
|
17
|
-
GroupHeaderColumnTemplateDirective = tslib_1.__decorate([
|
|
18
|
-
core_1.Directive({
|
|
19
|
-
selector: '[kendoExcelExportGroupHeaderColumnTemplate]'
|
|
20
|
-
}),
|
|
21
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
22
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
23
|
-
], GroupHeaderColumnTemplateDirective);
|
|
24
|
-
return GroupHeaderColumnTemplateDirective;
|
|
25
|
-
}());
|
|
26
|
-
exports.GroupHeaderColumnTemplateDirective = GroupHeaderColumnTemplateDirective;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the group header cell template of the Excel Export column component
|
|
11
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-header-template)).
|
|
12
|
-
* Enables you to customize the content of the group header item.
|
|
13
|
-
*/
|
|
14
|
-
var GroupHeaderTemplateDirective = /** @class */ (function () {
|
|
15
|
-
function GroupHeaderTemplateDirective(templateRef) {
|
|
16
|
-
this.templateRef = templateRef;
|
|
17
|
-
}
|
|
18
|
-
GroupHeaderTemplateDirective = tslib_1.__decorate([
|
|
19
|
-
core_1.Directive({
|
|
20
|
-
selector: '[kendoExcelExportGroupHeaderTemplate]'
|
|
21
|
-
}),
|
|
22
|
-
tslib_1.__param(0, core_1.Optional()),
|
|
23
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
24
|
-
], GroupHeaderTemplateDirective);
|
|
25
|
-
return GroupHeaderTemplateDirective;
|
|
26
|
-
}());
|
|
27
|
-
exports.GroupHeaderTemplateDirective = GroupHeaderTemplateDirective;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
// tslint:disable:max-line-length
|
|
9
|
-
var core_1 = require("@angular/core");
|
|
10
|
-
var kendo_file_saver_1 = require("@progress/kendo-file-saver");
|
|
11
|
-
var workbook_1 = require("./ooxml/workbook");
|
|
12
|
-
var column_base_1 = require("./columns/column-base");
|
|
13
|
-
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
14
|
-
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
15
|
-
var package_metadata_1 = require("./package-metadata");
|
|
16
|
-
/**
|
|
17
|
-
* Represents the [Kendo UI Excel Export component for Angular]({% slug overview_excelexport %}).
|
|
18
|
-
* Configures the settings for the Excel export of the Kendo UI Grid.
|
|
19
|
-
*/
|
|
20
|
-
var ExcelExportComponent = /** @class */ (function () {
|
|
21
|
-
function ExcelExportComponent(localization, zone) {
|
|
22
|
-
this.localization = localization;
|
|
23
|
-
this.zone = zone;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the name of the file that is exported to Excel.
|
|
26
|
-
* @default "Export.xlsx"
|
|
27
|
-
*/
|
|
28
|
-
this.fileName = 'Export.xlsx';
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
this.columns = new core_1.QueryList();
|
|
33
|
-
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
34
|
-
this.saveFile = this.saveFile.bind(this);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Saves the data to Excel.
|
|
38
|
-
*
|
|
39
|
-
* @param exportData - An optional parameter. Can be the data that will be exported or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}).
|
|
40
|
-
*/
|
|
41
|
-
ExcelExportComponent.prototype.save = function (exportData) {
|
|
42
|
-
this.toDataURL(exportData).then(this.saveFile);
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Based on the specified columns and data, returns
|
|
46
|
-
* [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %})
|
|
47
|
-
* ([see example]({% slug customrowsandcells_excelexport %})).
|
|
48
|
-
*
|
|
49
|
-
* @param exportData - The optional data to be exported.
|
|
50
|
-
* @returns {WorkbookOptions} - The workbook options.
|
|
51
|
-
*/
|
|
52
|
-
ExcelExportComponent.prototype.workbookOptions = function (exportData) {
|
|
53
|
-
var currentData = this.getExportData(exportData);
|
|
54
|
-
var options = workbook_1.workbookOptions({
|
|
55
|
-
columns: this.columns,
|
|
56
|
-
data: currentData.data,
|
|
57
|
-
group: currentData.group,
|
|
58
|
-
filterable: this.filterable,
|
|
59
|
-
creator: this.creator,
|
|
60
|
-
date: this.date,
|
|
61
|
-
rtl: this.localization.rtl,
|
|
62
|
-
paddingCellOptions: this.paddingCellOptions,
|
|
63
|
-
headerPaddingCellOptions: this.headerPaddingCellOptions,
|
|
64
|
-
collapsible: this.collapsible
|
|
65
|
-
});
|
|
66
|
-
return options;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Returns a promise which will be resolved with the file data URI
|
|
70
|
-
* ([see example]({% slug filesaving_excelexport %})).
|
|
71
|
-
*
|
|
72
|
-
* @param exportData - The optional data or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}) that will be used to generate the data URI.
|
|
73
|
-
* @returns {Promise<string>} - The promise that will be resolved by the file data URI.
|
|
74
|
-
*/
|
|
75
|
-
ExcelExportComponent.prototype.toDataURL = function (exportData) {
|
|
76
|
-
var options = workbook_1.isWorkbookOptions(exportData) ?
|
|
77
|
-
exportData :
|
|
78
|
-
this.workbookOptions(exportData);
|
|
79
|
-
return this.zone.runOutsideAngular(function () { return workbook_1.toDataURL(options); });
|
|
80
|
-
};
|
|
81
|
-
ExcelExportComponent.prototype.getExportData = function (exportData) {
|
|
82
|
-
var result;
|
|
83
|
-
if (exportData) {
|
|
84
|
-
if (Array.isArray(exportData)) {
|
|
85
|
-
result = {
|
|
86
|
-
data: exportData
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
result = exportData;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
result = {
|
|
95
|
-
data: this.data,
|
|
96
|
-
group: this.group
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
return result;
|
|
100
|
-
};
|
|
101
|
-
ExcelExportComponent.prototype.saveFile = function (dataURL) {
|
|
102
|
-
kendo_file_saver_1.saveAs(dataURL, this.fileName, {
|
|
103
|
-
forceProxy: this.forceProxy,
|
|
104
|
-
proxyURL: this.proxyURL
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
tslib_1.__decorate([
|
|
108
|
-
core_1.Input(),
|
|
109
|
-
tslib_1.__metadata("design:type", String)
|
|
110
|
-
], ExcelExportComponent.prototype, "fileName", void 0);
|
|
111
|
-
tslib_1.__decorate([
|
|
112
|
-
core_1.Input(),
|
|
113
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
114
|
-
], ExcelExportComponent.prototype, "filterable", void 0);
|
|
115
|
-
tslib_1.__decorate([
|
|
116
|
-
core_1.Input(),
|
|
117
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
118
|
-
], ExcelExportComponent.prototype, "collapsible", void 0);
|
|
119
|
-
tslib_1.__decorate([
|
|
120
|
-
core_1.Input(),
|
|
121
|
-
tslib_1.__metadata("design:type", String)
|
|
122
|
-
], ExcelExportComponent.prototype, "creator", void 0);
|
|
123
|
-
tslib_1.__decorate([
|
|
124
|
-
core_1.Input(),
|
|
125
|
-
tslib_1.__metadata("design:type", Date)
|
|
126
|
-
], ExcelExportComponent.prototype, "date", void 0);
|
|
127
|
-
tslib_1.__decorate([
|
|
128
|
-
core_1.Input(),
|
|
129
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
130
|
-
], ExcelExportComponent.prototype, "forceProxy", void 0);
|
|
131
|
-
tslib_1.__decorate([
|
|
132
|
-
core_1.Input(),
|
|
133
|
-
tslib_1.__metadata("design:type", String)
|
|
134
|
-
], ExcelExportComponent.prototype, "proxyURL", void 0);
|
|
135
|
-
tslib_1.__decorate([
|
|
136
|
-
core_1.Input(),
|
|
137
|
-
tslib_1.__metadata("design:type", Array)
|
|
138
|
-
], ExcelExportComponent.prototype, "data", void 0);
|
|
139
|
-
tslib_1.__decorate([
|
|
140
|
-
core_1.Input(),
|
|
141
|
-
tslib_1.__metadata("design:type", Array)
|
|
142
|
-
], ExcelExportComponent.prototype, "group", void 0);
|
|
143
|
-
tslib_1.__decorate([
|
|
144
|
-
core_1.Input(),
|
|
145
|
-
tslib_1.__metadata("design:type", Object)
|
|
146
|
-
], ExcelExportComponent.prototype, "paddingCellOptions", void 0);
|
|
147
|
-
tslib_1.__decorate([
|
|
148
|
-
core_1.Input(),
|
|
149
|
-
tslib_1.__metadata("design:type", Object)
|
|
150
|
-
], ExcelExportComponent.prototype, "headerPaddingCellOptions", void 0);
|
|
151
|
-
tslib_1.__decorate([
|
|
152
|
-
core_1.ContentChildren(column_base_1.ColumnBase, { descendants: true }),
|
|
153
|
-
tslib_1.__metadata("design:type", core_1.QueryList)
|
|
154
|
-
], ExcelExportComponent.prototype, "columns", void 0);
|
|
155
|
-
ExcelExportComponent = tslib_1.__decorate([
|
|
156
|
-
core_1.Component({
|
|
157
|
-
exportAs: 'kendoExcelExport',
|
|
158
|
-
selector: 'kendo-excelexport',
|
|
159
|
-
providers: [
|
|
160
|
-
kendo_angular_l10n_1.LocalizationService,
|
|
161
|
-
{
|
|
162
|
-
provide: kendo_angular_l10n_1.L10N_PREFIX,
|
|
163
|
-
useValue: 'kendo.excelexport'
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
template: ""
|
|
167
|
-
}),
|
|
168
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService, core_1.NgZone])
|
|
169
|
-
], ExcelExportComponent);
|
|
170
|
-
return ExcelExportComponent;
|
|
171
|
-
}());
|
|
172
|
-
exports.ExcelExportComponent = ExcelExportComponent;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var excel_export_component_1 = require("./excel-export.component");
|
|
10
|
-
var column_component_1 = require("./columns/column.component");
|
|
11
|
-
var column_group_component_1 = require("./columns/column-group.component");
|
|
12
|
-
var footer_template_directive_1 = require("./columns/footer-template.directive");
|
|
13
|
-
var group_footer_template_directive_1 = require("./columns/group-footer-template.directive");
|
|
14
|
-
var group_header_template_directive_1 = require("./columns/group-header-template.directive");
|
|
15
|
-
var group_header_column_template_directive_1 = require("./columns/group-header-column-template.directive");
|
|
16
|
-
var declarations = [
|
|
17
|
-
excel_export_component_1.ExcelExportComponent,
|
|
18
|
-
column_component_1.ColumnComponent,
|
|
19
|
-
column_group_component_1.ColumnGroupComponent,
|
|
20
|
-
footer_template_directive_1.FooterTemplateDirective,
|
|
21
|
-
group_footer_template_directive_1.GroupFooterTemplateDirective,
|
|
22
|
-
group_header_template_directive_1.GroupHeaderTemplateDirective,
|
|
23
|
-
group_header_column_template_directive_1.GroupHeaderColumnTemplateDirective
|
|
24
|
-
];
|
|
25
|
-
/**
|
|
26
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
27
|
-
* definition for the Excel Export component.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
*
|
|
31
|
-
* ```ts-no-run
|
|
32
|
-
* // Import the ExcelExportModule module
|
|
33
|
-
* import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
|
|
34
|
-
*
|
|
35
|
-
* // The browser platform with a compiler
|
|
36
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
37
|
-
*
|
|
38
|
-
* import { NgModule } from '@angular/core';
|
|
39
|
-
*
|
|
40
|
-
* // Import the app component
|
|
41
|
-
* import { AppComponent } from './app.component';
|
|
42
|
-
*
|
|
43
|
-
* // Define the app module
|
|
44
|
-
* _@NgModule({
|
|
45
|
-
* declarations: [AppComponent], // declare app component
|
|
46
|
-
* imports: [BrowserModule, ExcelExportModule], // import ExcelExportModule module
|
|
47
|
-
* bootstrap: [AppComponent]
|
|
48
|
-
* })
|
|
49
|
-
* export class AppModule {}
|
|
50
|
-
*
|
|
51
|
-
* // Compile and launch the module
|
|
52
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
53
|
-
*
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
var ExcelExportModule = /** @class */ (function () {
|
|
57
|
-
function ExcelExportModule() {
|
|
58
|
-
}
|
|
59
|
-
ExcelExportModule = tslib_1.__decorate([
|
|
60
|
-
core_1.NgModule({
|
|
61
|
-
declarations: [declarations],
|
|
62
|
-
exports: [declarations]
|
|
63
|
-
})
|
|
64
|
-
], ExcelExportModule);
|
|
65
|
-
return ExcelExportModule;
|
|
66
|
-
}());
|
|
67
|
-
exports.ExcelExportModule = ExcelExportModule;
|
package/dist/npm/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
/**
|
|
7
|
-
* Generated bundle index. Do not edit.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
var tslib_1 = require("tslib");
|
|
11
|
-
tslib_1.__exportStar(require("./main"), exports);
|
|
12
|
-
var group_header_column_template_directive_1 = require("./columns/group-header-column-template.directive");
|
|
13
|
-
exports.GroupHeaderColumnTemplateDirective = group_header_column_template_directive_1.GroupHeaderColumnTemplateDirective
|
package/dist/npm/main.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var excel_export_component_1 = require("./excel-export.component");
|
|
9
|
-
exports.ExcelExportComponent = excel_export_component_1.ExcelExportComponent;
|
|
10
|
-
var excel_export_module_1 = require("./excel-export.module");
|
|
11
|
-
exports.ExcelExportModule = excel_export_module_1.ExcelExportModule;
|
|
12
|
-
var column_base_1 = require("./columns/column-base");
|
|
13
|
-
exports.ColumnBase = column_base_1.ColumnBase;
|
|
14
|
-
var column_component_1 = require("./columns/column.component");
|
|
15
|
-
exports.ColumnComponent = column_component_1.ColumnComponent;
|
|
16
|
-
var column_group_component_1 = require("./columns/column-group.component");
|
|
17
|
-
exports.ColumnGroupComponent = column_group_component_1.ColumnGroupComponent;
|
|
18
|
-
var footer_template_directive_1 = require("./columns/footer-template.directive");
|
|
19
|
-
exports.FooterTemplateDirective = footer_template_directive_1.FooterTemplateDirective;
|
|
20
|
-
var group_footer_template_directive_1 = require("./columns/group-footer-template.directive");
|
|
21
|
-
exports.GroupFooterTemplateDirective = group_footer_template_directive_1.GroupFooterTemplateDirective;
|
|
22
|
-
var group_header_template_directive_1 = require("./columns/group-header-template.directive");
|
|
23
|
-
exports.GroupHeaderTemplateDirective = group_header_template_directive_1.GroupHeaderTemplateDirective;
|
|
24
|
-
tslib_1.__exportStar(require("./ooxml/workbook"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("@progress/kendo-ooxml"), exports);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/* tslint:disable align */
|
|
8
|
-
/* tslint:disable:no-use-before-declare */
|
|
9
|
-
var compileTemplate = function (templateRef, context, updateContext) {
|
|
10
|
-
var embeddedView = templateRef.createEmbeddedView(context);
|
|
11
|
-
var result = function (data) {
|
|
12
|
-
updateContext(context, data);
|
|
13
|
-
embeddedView.detectChanges();
|
|
14
|
-
return embeddedView.rootNodes.reduce(function (content, rootNode) {
|
|
15
|
-
return content + rootNode.textContent;
|
|
16
|
-
}, '').trim();
|
|
17
|
-
};
|
|
18
|
-
result.destroy = function () {
|
|
19
|
-
embeddedView.destroy();
|
|
20
|
-
embeddedView = null;
|
|
21
|
-
};
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
var ɵ0 = compileTemplate;
|
|
25
|
-
exports.ɵ0 = ɵ0;
|
|
26
|
-
var updateGroupHeaderContext = function (context, data) {
|
|
27
|
-
context.$implicit = context.group = data;
|
|
28
|
-
context.field = data.field;
|
|
29
|
-
context.value = data.value;
|
|
30
|
-
context.aggregates = data.aggregates;
|
|
31
|
-
};
|
|
32
|
-
var ɵ1 = updateGroupHeaderContext;
|
|
33
|
-
exports.ɵ1 = ɵ1;
|
|
34
|
-
var updateGroupFooterContext = function (context, data) {
|
|
35
|
-
context.group = data.group;
|
|
36
|
-
context.$implicit = context.aggregates = data;
|
|
37
|
-
};
|
|
38
|
-
var ɵ2 = updateGroupFooterContext;
|
|
39
|
-
exports.ɵ2 = ɵ2;
|
|
40
|
-
var updateFooterContext = function (context, data) {
|
|
41
|
-
context.aggregates = data.aggregates;
|
|
42
|
-
};
|
|
43
|
-
var ɵ3 = updateFooterContext;
|
|
44
|
-
exports.ɵ3 = ɵ3;
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
exports.toExporterColumns = function (sourceColumns) {
|
|
49
|
-
var exporterColumns = [];
|
|
50
|
-
var columnIndex = 0;
|
|
51
|
-
var addColumns = function (columns, result, level) {
|
|
52
|
-
columns.forEach(function (column) {
|
|
53
|
-
if (column.level === level) {
|
|
54
|
-
var exporterColumn = new ExporterColumn(column, columnIndex);
|
|
55
|
-
result.push(exporterColumn);
|
|
56
|
-
if (column.children && column.children.some(function (c) { return c !== column; })) {
|
|
57
|
-
var children = exporterColumn.columns = [];
|
|
58
|
-
addColumns(column.children, children, level + 1);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
columnIndex++;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
addColumns(sourceColumns, exporterColumns, 0);
|
|
67
|
-
return exporterColumns;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
exports.destroyColumns = function (columns) {
|
|
73
|
-
if (columns) {
|
|
74
|
-
columns.forEach(function (column) {
|
|
75
|
-
column.destroy();
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @hidden
|
|
81
|
-
*/
|
|
82
|
-
var ExporterColumn = /** @class */ (function () {
|
|
83
|
-
function ExporterColumn(column, columnIndex) {
|
|
84
|
-
this.title = column.title;
|
|
85
|
-
this.field = column.field;
|
|
86
|
-
this.hidden = column.hidden;
|
|
87
|
-
this.locked = column.locked;
|
|
88
|
-
this.width = column.width;
|
|
89
|
-
this.headerCellOptions = column.headerCellOptions;
|
|
90
|
-
this.cellOptions = column.cellOptions;
|
|
91
|
-
this.groupHeaderCellOptions = column.groupHeaderCellOptions;
|
|
92
|
-
this.groupFooterCellOptions = column.groupFooterCellOptions;
|
|
93
|
-
this.footerCellOptions = column.footerCellOptions;
|
|
94
|
-
if (column.footerTemplate) {
|
|
95
|
-
this.footerTemplate = compileTemplate(column.footerTemplate.templateRef, {
|
|
96
|
-
$implicit: column,
|
|
97
|
-
column: column,
|
|
98
|
-
columnIndex: columnIndex
|
|
99
|
-
}, updateFooterContext);
|
|
100
|
-
}
|
|
101
|
-
if (column.groupFooterTemplate) {
|
|
102
|
-
this.groupFooterTemplate = compileTemplate(column.groupFooterTemplate.templateRef, {
|
|
103
|
-
column: column,
|
|
104
|
-
field: column.field
|
|
105
|
-
}, updateGroupFooterContext);
|
|
106
|
-
}
|
|
107
|
-
if (column.groupHeaderTemplate) {
|
|
108
|
-
this.groupHeaderTemplate = compileTemplate(column.groupHeaderTemplate.templateRef, {}, updateGroupHeaderContext);
|
|
109
|
-
}
|
|
110
|
-
if (column.groupHeaderColumnTemplate) {
|
|
111
|
-
this.groupHeaderColumnTemplate = compileTemplate(column.groupHeaderColumnTemplate.templateRef, {}, updateGroupHeaderContext);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
ExporterColumn.prototype.destroy = function () {
|
|
115
|
-
if (this.footerTemplate) {
|
|
116
|
-
this.footerTemplate.destroy();
|
|
117
|
-
}
|
|
118
|
-
if (this.groupFooterTemplate) {
|
|
119
|
-
this.groupFooterTemplate.destroy();
|
|
120
|
-
}
|
|
121
|
-
if (this.groupHeaderTemplate) {
|
|
122
|
-
this.groupHeaderTemplate.destroy();
|
|
123
|
-
}
|
|
124
|
-
if (this.groupHeaderColumnTemplate) {
|
|
125
|
-
this.groupHeaderColumnTemplate.destroy();
|
|
126
|
-
}
|
|
127
|
-
exports.destroyColumns(this.columns);
|
|
128
|
-
};
|
|
129
|
-
return ExporterColumn;
|
|
130
|
-
}());
|
|
131
|
-
exports.ExporterColumn = ExporterColumn;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var kendo_ooxml_1 = require("@progress/kendo-ooxml");
|
|
8
|
-
var exporter_columns_1 = require("./exporter-columns");
|
|
9
|
-
var kendo_intl_1 = require("@telerik/kendo-intl");
|
|
10
|
-
kendo_ooxml_1.IntlService.register({ toString: kendo_intl_1.toString });
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
exports.workbookOptions = function (options) {
|
|
16
|
-
var columns = exporter_columns_1.toExporterColumns(options.columns);
|
|
17
|
-
var exporter = new kendo_ooxml_1.ExcelExporter({
|
|
18
|
-
columns: columns,
|
|
19
|
-
data: options.data,
|
|
20
|
-
filterable: options.filterable,
|
|
21
|
-
groups: options.group,
|
|
22
|
-
paddingCellOptions: options.paddingCellOptions,
|
|
23
|
-
headerPaddingCellOptions: options.headerPaddingCellOptions,
|
|
24
|
-
collapsible: options.collapsible,
|
|
25
|
-
hierarchy: options.hierarchy,
|
|
26
|
-
aggregates: options.aggregates
|
|
27
|
-
});
|
|
28
|
-
var result = exporter.workbook();
|
|
29
|
-
result.creator = options.creator;
|
|
30
|
-
result.date = options.date;
|
|
31
|
-
result.rtl = options.rtl;
|
|
32
|
-
exporter_columns_1.destroyColumns(columns);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
exports.toDataURL = function (options) {
|
|
39
|
-
var workbook = new kendo_ooxml_1.Workbook(options);
|
|
40
|
-
return workbook.toDataURL();
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
exports.isWorkbookOptions = function (value) {
|
|
46
|
-
return value && value.sheets;
|
|
47
|
-
};
|