@indigina/ui-kit 1.1.474 → 1.1.476
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.
|
@@ -11611,7 +11611,7 @@ class KitGridCellService {
|
|
|
11611
11611
|
}
|
|
11612
11612
|
createCellValue(columnType, columnField, dataItem, translationMap = {}, defaultValue = '') {
|
|
11613
11613
|
const value = this.getCellValue(dataItem, columnField);
|
|
11614
|
-
if (columnField in translationMap && value) {
|
|
11614
|
+
if (columnField in translationMap && value != null && value !== '') {
|
|
11615
11615
|
return this.translateService.instant(translationMap[columnField](value)) ?? defaultValue;
|
|
11616
11616
|
}
|
|
11617
11617
|
switch (columnType) {
|
|
@@ -11898,12 +11898,7 @@ class KitGridExportComponent {
|
|
|
11898
11898
|
const rootElement = 'Rows';
|
|
11899
11899
|
const content = rows.map(row => {
|
|
11900
11900
|
const cells = columns.map(column => {
|
|
11901
|
-
const title = this.translateService.instant(column.title)
|
|
11902
|
-
.replaceAll(' ', '')
|
|
11903
|
-
.replaceAll('/', '-')
|
|
11904
|
-
.replaceAll('\'', '')
|
|
11905
|
-
.replaceAll('(', '_')
|
|
11906
|
-
.replaceAll(')', '_');
|
|
11901
|
+
const title = this.getValidXmlElementName(this.translateService.instant(column.title));
|
|
11907
11902
|
const value = this.gridCellService.createCellValue(column.type, column.field, row, this.translationMap());
|
|
11908
11903
|
if (value) {
|
|
11909
11904
|
return this.wrapWithElement(value, title, 2, false, true);
|
|
@@ -11929,6 +11924,17 @@ class KitGridExportComponent {
|
|
|
11929
11924
|
.replace(/"/g, '"')
|
|
11930
11925
|
.replace(/'/g, ''');
|
|
11931
11926
|
}
|
|
11927
|
+
getValidXmlElementName(title) {
|
|
11928
|
+
return title
|
|
11929
|
+
.trim()
|
|
11930
|
+
.replaceAll(' ', '')
|
|
11931
|
+
.replaceAll('/', '-')
|
|
11932
|
+
.replaceAll('\\', '-')
|
|
11933
|
+
.replaceAll('(', '_')
|
|
11934
|
+
.replaceAll(')', '_')
|
|
11935
|
+
.replaceAll('\'', '')
|
|
11936
|
+
.replace(/[^A-Za-z0-9_.-]/g, '');
|
|
11937
|
+
}
|
|
11932
11938
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11933
11939
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: KitGridExportComponent, isStandalone: true, selector: "kit-grid-export", inputs: { getExportedData: { classPropertyName: "getExportedData", publicName: "getExportedData", isSignal: true, isRequired: true, transformFunction: null }, translationMap: { classPropertyName: "translationMap", publicName: "translationMap", isSignal: true, isRequired: true, transformFunction: null }, exportedFileName: { classPropertyName: "exportedFileName", publicName: "exportedFileName", isSignal: true, isRequired: true, transformFunction: null }, drawPdf: { classPropertyName: "drawPdf", publicName: "drawPdf", isSignal: true, isRequired: true, transformFunction: null }, gridHasData: { classPropertyName: "gridHasData", publicName: "gridHasData", isSignal: true, isRequired: true, transformFunction: null }, visibleColumns: { classPropertyName: "visibleColumns", publicName: "visibleColumns", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }, { propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"kit-grid-export\">\n <kit-button #toggleButton\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.export.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [disabled]=\"!gridHasData() || isGridExporting()\"\n [icon]=\"kitSvgIcon.DOWNLOAD\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [active]=\"popup.isPopupOpen\"\n (clicked)=\"onPopupToggle()\" />\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-grid-export-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\">\n</kit-popup>\n\n<ng-template #content>\n <span class=\"kit-grid-export-popup-label\">{{ \"kit.export.exportTableData\" | translate }}</span>\n <kit-radio-button [type]=\"kitRadioButtonType.ICON_LIST\"\n [items]=\"gridExportOptions\" \n (changed)=\"onExport($event)\"/>\n</ng-template>\n", styles: ["::ng-deep .kit-grid-export-popup{width:220px}::ng-deep .kit-grid-export-popup-label{font-size:14px;font-weight:500;margin-bottom:20px;display:block}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitRadioButtonComponent, selector: "kit-radio-button", inputs: ["items", "label", "name", "readonly", "disabled", "type"], outputs: ["disabledChange", "changed"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible"] }, { kind: "pipe", type: i1$e.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11934
11940
|
}
|