@porscheinformatik/clr-addons 21.11.2 → 21.12.0

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.
@@ -17889,14 +17889,17 @@ class ExportDatagridButtonComponent {
17889
17889
  this.datagrid = input(...(ngDevMode ? [undefined, { debugName: "datagrid" }] : /* istanbul ignore next */ []));
17890
17890
  this.datagridRef = input(...(ngDevMode ? [undefined, { debugName: "datagridRef" }] : /* istanbul ignore next */ []));
17891
17891
  this.exportTypesToShow = input(...(ngDevMode ? [undefined, { debugName: "exportTypesToShow" }] : /* istanbul ignore next */ []));
17892
+ this.customExportTypes = input(...(ngDevMode ? [undefined, { debugName: "customExportTypes" }] : /* istanbul ignore next */ []));
17892
17893
  this.isBackendExport = input(false, ...(ngDevMode ? [{ debugName: "isBackendExport" }] : /* istanbul ignore next */ []));
17893
17894
  this.exportTitlePrefix = input('export-datagrid', ...(ngDevMode ? [{ debugName: "exportTitlePrefix" }] : /* istanbul ignore next */ []));
17894
17895
  this.exportButtonPosition = input('right', ...(ngDevMode ? [{ debugName: "exportButtonPosition" }] : /* istanbul ignore next */ []));
17896
+ this.exportButtonSize = input('small', ...(ngDevMode ? [{ debugName: "exportButtonSize" }] : /* istanbul ignore next */ []));
17895
17897
  this.possibleExportTypes = signal([ExportTypeEnum.ALL], ...(ngDevMode ? [{ debugName: "possibleExportTypes" }] : /* istanbul ignore next */ []));
17896
17898
  this.exportButtonText = input('EXPORT', ...(ngDevMode ? [{ debugName: "exportButtonText" }] : /* istanbul ignore next */ []));
17897
17899
  this.destroy$ = new Subject();
17898
17900
  /* outputs */
17899
17901
  this.backendExport = new EventEmitter();
17902
+ this.customBackendExport = new EventEmitter();
17900
17903
  this.exportTypes = [
17901
17904
  { type: ExportTypeEnum.ALL, value: 'All entries' },
17902
17905
  { type: ExportTypeEnum.FILTERED, value: 'Filtered entries' },
@@ -17964,6 +17967,9 @@ class ExportDatagridButtonComponent {
17964
17967
  this.exportExcel(type);
17965
17968
  }
17966
17969
  }
17970
+ onCustomExport(exportId) {
17971
+ this.customBackendExport.emit(exportId);
17972
+ }
17967
17973
  /**
17968
17974
  * Updates the possible export types based on the current datagrid state and allowed export types.
17969
17975
  * @param type the export type to update
@@ -18014,12 +18020,14 @@ class ExportDatagridButtonComponent {
18014
18020
  return columnTitles;
18015
18021
  }
18016
18022
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ExportDatagridButtonComponent, deps: [{ token: ExportDatagridService }], target: i0.ɵɵFactoryTarget.Component }); }
18017
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: ExportDatagridButtonComponent, isStandalone: true, selector: "clr-export-datagrid-button", inputs: { datagrid: { classPropertyName: "datagrid", publicName: "datagrid", isSignal: true, isRequired: false, transformFunction: null }, datagridRef: { classPropertyName: "datagridRef", publicName: "datagridRef", isSignal: true, isRequired: false, transformFunction: null }, exportTypesToShow: { classPropertyName: "exportTypesToShow", publicName: "exportTypesToShow", isSignal: true, isRequired: false, transformFunction: null }, isBackendExport: { classPropertyName: "isBackendExport", publicName: "isBackendExport", isSignal: true, isRequired: false, transformFunction: null }, exportTitlePrefix: { classPropertyName: "exportTitlePrefix", publicName: "exportTitlePrefix", isSignal: true, isRequired: false, transformFunction: null }, exportButtonPosition: { classPropertyName: "exportButtonPosition", publicName: "exportButtonPosition", isSignal: true, isRequired: false, transformFunction: null }, exportButtonText: { classPropertyName: "exportButtonText", publicName: "exportButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backendExport: "backendExport" }, ngImport: i0, template: "<div\n [ngClass]=\"{\n 'export-btn-right': exportButtonPosition() === 'right',\n 'export-btn-left': exportButtonPosition() === 'left'\n }\"\n>\n <clr-dropdown>\n <button class=\"btn btn-sm btn-outline\" clrDropdownTrigger type=\"button\">\n {{ exportButtonText() }}\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n <clr-dropdown-menu *clrIfOpen clrPosition=\"bottom-right\">\n @for (exportType of exportTypesFiltered(); track exportType) {\n <button (click)=\"onExport(exportType.type)\" clrDropdownItem>\n {{ exportType.value }}\n </button>\n }\n </clr-dropdown-menu>\n </clr-dropdown>\n</div>\n", styles: [".export-btn-right{display:flex;justify-content:flex-end}.export-btn-left{display:flex;justify-content:flex-start}.custom-button-export{margin:0}\n"], dependencies: [{ kind: "ngmodule", type: ClarityModule }, { kind: "component", type: i2.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "directive", type: i2.CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: i2$3.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i2$3.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i2$3.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i2$3.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: i2$4.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
18023
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: ExportDatagridButtonComponent, isStandalone: true, selector: "clr-export-datagrid-button", inputs: { datagrid: { classPropertyName: "datagrid", publicName: "datagrid", isSignal: true, isRequired: false, transformFunction: null }, datagridRef: { classPropertyName: "datagridRef", publicName: "datagridRef", isSignal: true, isRequired: false, transformFunction: null }, exportTypesToShow: { classPropertyName: "exportTypesToShow", publicName: "exportTypesToShow", isSignal: true, isRequired: false, transformFunction: null }, customExportTypes: { classPropertyName: "customExportTypes", publicName: "customExportTypes", isSignal: true, isRequired: false, transformFunction: null }, isBackendExport: { classPropertyName: "isBackendExport", publicName: "isBackendExport", isSignal: true, isRequired: false, transformFunction: null }, exportTitlePrefix: { classPropertyName: "exportTitlePrefix", publicName: "exportTitlePrefix", isSignal: true, isRequired: false, transformFunction: null }, exportButtonPosition: { classPropertyName: "exportButtonPosition", publicName: "exportButtonPosition", isSignal: true, isRequired: false, transformFunction: null }, exportButtonSize: { classPropertyName: "exportButtonSize", publicName: "exportButtonSize", isSignal: true, isRequired: false, transformFunction: null }, exportButtonText: { classPropertyName: "exportButtonText", publicName: "exportButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backendExport: "backendExport", customBackendExport: "customBackendExport" }, ngImport: i0, template: "<div\n [ngClass]=\"{\n 'export-btn-right': exportButtonPosition() === 'right',\n 'export-btn-left': exportButtonPosition() === 'left',\n }\"\n>\n <clr-dropdown>\n <button\n class=\"btn btn-outline\"\n clrDropdownTrigger\n type=\"button\"\n [ngClass]=\"{\n 'btn-sm': exportButtonSize() === 'small',\n }\"\n >\n {{ exportButtonText() }}\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n <clr-dropdown-menu *clrIfOpen clrPosition=\"bottom-right\">\n @for (exportType of exportTypesFiltered(); track exportType) {\n <button (click)=\"onExport(exportType.type)\" clrDropdownItem>\n {{ exportType.value }}\n </button>\n }\n @if (customExportTypes()?.length) {\n <div class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n @for (customExportType of customExportTypes(); track customExportType.id) {\n <button (click)=\"onCustomExport(customExportType.id)\" clrDropdownItem>\n {{ customExportType.value ?? customExportType.id }}\n </button>\n }\n }\n </clr-dropdown-menu>\n </clr-dropdown>\n</div>\n", styles: [".export-btn-right{display:flex;justify-content:flex-end}.export-btn-left{display:flex;justify-content:flex-start}.custom-button-export{margin:0}\n"], dependencies: [{ kind: "ngmodule", type: ClarityModule }, { kind: "component", type: i2.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "directive", type: i2.CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: i2$3.ClrDropdown, selector: "clr-dropdown", inputs: ["clrCloseMenuOnItemClick"] }, { kind: "component", type: i2$3.ClrDropdownMenu, selector: "clr-dropdown-menu", inputs: ["clrPosition"] }, { kind: "directive", type: i2$3.ClrDropdownTrigger, selector: "[clrDropdownTrigger],[clrDropdownToggle]" }, { kind: "directive", type: i2$3.ClrDropdownItem, selector: "[clrDropdownItem]", inputs: ["clrDisabled", "id"] }, { kind: "directive", type: i2$4.ClrIfOpen, selector: "[clrIfOpen]", inputs: ["clrIfOpen"], outputs: ["clrIfOpenChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
18018
18024
  }
18019
18025
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ExportDatagridButtonComponent, decorators: [{
18020
18026
  type: Component,
18021
- args: [{ selector: 'clr-export-datagrid-button', standalone: true, imports: [ClarityModule, NgClass], template: "<div\n [ngClass]=\"{\n 'export-btn-right': exportButtonPosition() === 'right',\n 'export-btn-left': exportButtonPosition() === 'left'\n }\"\n>\n <clr-dropdown>\n <button class=\"btn btn-sm btn-outline\" clrDropdownTrigger type=\"button\">\n {{ exportButtonText() }}\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n <clr-dropdown-menu *clrIfOpen clrPosition=\"bottom-right\">\n @for (exportType of exportTypesFiltered(); track exportType) {\n <button (click)=\"onExport(exportType.type)\" clrDropdownItem>\n {{ exportType.value }}\n </button>\n }\n </clr-dropdown-menu>\n </clr-dropdown>\n</div>\n", styles: [".export-btn-right{display:flex;justify-content:flex-end}.export-btn-left{display:flex;justify-content:flex-start}.custom-button-export{margin:0}\n"] }]
18022
- }], ctorParameters: () => [{ type: ExportDatagridService }], propDecorators: { datagrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "datagrid", required: false }] }], datagridRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "datagridRef", required: false }] }], exportTypesToShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportTypesToShow", required: false }] }], isBackendExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "isBackendExport", required: false }] }], exportTitlePrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportTitlePrefix", required: false }] }], exportButtonPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonPosition", required: false }] }], exportButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonText", required: false }] }], backendExport: [{
18027
+ args: [{ selector: 'clr-export-datagrid-button', standalone: true, imports: [ClarityModule, NgClass], template: "<div\n [ngClass]=\"{\n 'export-btn-right': exportButtonPosition() === 'right',\n 'export-btn-left': exportButtonPosition() === 'left',\n }\"\n>\n <clr-dropdown>\n <button\n class=\"btn btn-outline\"\n clrDropdownTrigger\n type=\"button\"\n [ngClass]=\"{\n 'btn-sm': exportButtonSize() === 'small',\n }\"\n >\n {{ exportButtonText() }}\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n <clr-dropdown-menu *clrIfOpen clrPosition=\"bottom-right\">\n @for (exportType of exportTypesFiltered(); track exportType) {\n <button (click)=\"onExport(exportType.type)\" clrDropdownItem>\n {{ exportType.value }}\n </button>\n }\n @if (customExportTypes()?.length) {\n <div class=\"dropdown-divider\" role=\"separator\" aria-hidden=\"true\"></div>\n @for (customExportType of customExportTypes(); track customExportType.id) {\n <button (click)=\"onCustomExport(customExportType.id)\" clrDropdownItem>\n {{ customExportType.value ?? customExportType.id }}\n </button>\n }\n }\n </clr-dropdown-menu>\n </clr-dropdown>\n</div>\n", styles: [".export-btn-right{display:flex;justify-content:flex-end}.export-btn-left{display:flex;justify-content:flex-start}.custom-button-export{margin:0}\n"] }]
18028
+ }], ctorParameters: () => [{ type: ExportDatagridService }], propDecorators: { datagrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "datagrid", required: false }] }], datagridRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "datagridRef", required: false }] }], exportTypesToShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportTypesToShow", required: false }] }], customExportTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "customExportTypes", required: false }] }], isBackendExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "isBackendExport", required: false }] }], exportTitlePrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportTitlePrefix", required: false }] }], exportButtonPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonPosition", required: false }] }], exportButtonSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonSize", required: false }] }], exportButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonText", required: false }] }], backendExport: [{
18029
+ type: Output
18030
+ }], customBackendExport: [{
18023
18031
  type: Output
18024
18032
  }] } });
18025
18033