@nettyapps/ntyux 21.0.26 → 21.0.28
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.
|
@@ -18,7 +18,7 @@ import { MAT_DIALOG_DATA, MatDialog, MatDialogConfig, MatDialogModule } from '@a
|
|
|
18
18
|
import * as i1 from '@angular/common';
|
|
19
19
|
import { CommonModule, Location, TitleCasePipe } from '@angular/common';
|
|
20
20
|
import * as i3 from '@ngx-translate/core';
|
|
21
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
21
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
22
22
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
23
23
|
import { AlertService, CommonService, AuthenticationService, NettyMenuService, CredentialsService, NettyImageService } from '@nettyapps/ntybase';
|
|
24
24
|
import * as i5 from '@angular/router';
|
|
@@ -1079,6 +1079,25 @@ class ColorPalette {
|
|
|
1079
1079
|
this.themeService.setTheme(theme.type);
|
|
1080
1080
|
}
|
|
1081
1081
|
}, ...(ngDevMode ? [{ debugName: "updateThemeClass" }] : []));
|
|
1082
|
+
loadCustomThemes(customThemes = [], defaultTheme = 'deep-blue') {
|
|
1083
|
+
if (!customThemes || customThemes.length === 0) {
|
|
1084
|
+
customThemes = [
|
|
1085
|
+
{ id: 'deep-blue', primary: '#1976D2', displayName: 'Deep Blue', type: 'light' },
|
|
1086
|
+
{ id: 'green', primary: '#00796B', displayName: 'Green', type: 'light' },
|
|
1087
|
+
{ id: 'orange', primary: '#E65100', displayName: 'Orange', type: 'light' },
|
|
1088
|
+
{ id: 'purple', primary: '#6200EE', displayName: 'Purple', type: 'light' },
|
|
1089
|
+
{ id: 'red', primary: '#C2185B', displayName: 'Red', type: 'light' },
|
|
1090
|
+
{ id: 'gray', primary: '#555', displayName: 'Gray', type: 'light' },
|
|
1091
|
+
{ id: 'netty', primary: 'rgb(0 103 126)', displayName: 'Netty', type: 'dark' },
|
|
1092
|
+
];
|
|
1093
|
+
}
|
|
1094
|
+
this.setThemes(customThemes);
|
|
1095
|
+
// Default theme
|
|
1096
|
+
if (!defaultTheme || defaultTheme.length === 0) {
|
|
1097
|
+
defaultTheme = 'deep-blue';
|
|
1098
|
+
}
|
|
1099
|
+
this.setTheme(defaultTheme);
|
|
1100
|
+
}
|
|
1082
1101
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ColorPalette, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1083
1102
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ColorPalette, providedIn: 'root' });
|
|
1084
1103
|
}
|
|
@@ -1155,13 +1174,26 @@ class NettyUXFilterCard extends UiBase {
|
|
|
1155
1174
|
onExport = output();
|
|
1156
1175
|
onReset = output();
|
|
1157
1176
|
onApply = output();
|
|
1177
|
+
resetButtonLabel = input("", ...(ngDevMode ? [{ debugName: "resetButtonLabel" }] : []));
|
|
1178
|
+
applyButtonLabel = input("", ...(ngDevMode ? [{ debugName: "applyButtonLabel" }] : []));
|
|
1179
|
+
exportButtonLabel = input("", ...(ngDevMode ? [{ debugName: "exportButtonLabel" }] : []));
|
|
1180
|
+
translateService = inject(TranslateService);
|
|
1181
|
+
getResetButtonLabel() {
|
|
1182
|
+
return this.resetButtonLabel() || this.translateService.instant("@resetButtonLabel");
|
|
1183
|
+
}
|
|
1184
|
+
getApplyButtonLabel() {
|
|
1185
|
+
return this.applyButtonLabel() || this.translateService.instant("@applyButtonLabel");
|
|
1186
|
+
}
|
|
1187
|
+
getExportButtonLabel() {
|
|
1188
|
+
return this.exportButtonLabel() || this.translateService.instant("@exportButtonLabel");
|
|
1189
|
+
}
|
|
1158
1190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyUXFilterCard, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1159
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NettyUXFilterCard, isStandalone: true, selector: "ntyux-filter-card", inputs: { Title: { classPropertyName: "Title", publicName: "Title", isSignal: true, isRequired: false, transformFunction: null }, SubTitle: { classPropertyName: "SubTitle", publicName: "SubTitle", isSignal: true, isRequired: false, transformFunction: null }, isExportVisible: { classPropertyName: "isExportVisible", publicName: "isExportVisible", isSignal: true, isRequired: false, transformFunction: null }, isFormValid: { classPropertyName: "isFormValid", publicName: "isFormValid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onExport: "onExport", onReset: "onReset", onApply: "onApply" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"filter-card\" apperance=\"outlined\">\n <mat-card-title>{{Title()}}</mat-card-title>\n <mat-card-subtitle>{{SubTitle()}}</mat-card-subtitle>\n <mat-card-content>\n <ng-content>\n No content provided\n </ng-content>\n </mat-card-content>\n <mat-card-actions class=\"mat-card-actions\">\n <button matButton=\"outlined\" (click)=\"onReset.emit()\">
|
|
1191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NettyUXFilterCard, isStandalone: true, selector: "ntyux-filter-card", inputs: { Title: { classPropertyName: "Title", publicName: "Title", isSignal: true, isRequired: false, transformFunction: null }, SubTitle: { classPropertyName: "SubTitle", publicName: "SubTitle", isSignal: true, isRequired: false, transformFunction: null }, isExportVisible: { classPropertyName: "isExportVisible", publicName: "isExportVisible", isSignal: true, isRequired: false, transformFunction: null }, isFormValid: { classPropertyName: "isFormValid", publicName: "isFormValid", isSignal: true, isRequired: false, transformFunction: null }, resetButtonLabel: { classPropertyName: "resetButtonLabel", publicName: "resetButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, applyButtonLabel: { classPropertyName: "applyButtonLabel", publicName: "applyButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, exportButtonLabel: { classPropertyName: "exportButtonLabel", publicName: "exportButtonLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onExport: "onExport", onReset: "onReset", onApply: "onApply" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"filter-card\" apperance=\"outlined\">\n <mat-card-title>{{Title()}}</mat-card-title>\n <mat-card-subtitle>{{SubTitle()}}</mat-card-subtitle>\n <mat-card-content>\n <ng-content>\n No content provided\n </ng-content>\n </mat-card-content>\n <mat-card-actions class=\"mat-card-actions\">\n <button matButton=\"outlined\" (click)=\"onReset.emit()\">{{getResetButtonLabel()}}</button>\n @if (isExportVisible()) {\n <button matButton=\"outlined\" [disabled]=\"!isFormValid()\"\n (click)=\"onExport.emit()\">{{getExportButtonLabel()}}</button>\n }\n <button matButton=\"filled\" [disabled]=\"!isFormValid()\"\n (click)=\"onApply.emit()\">{{getApplyButtonLabel()}}</button>\n </mat-card-actions>\n</mat-card>", styles: [".filter-card{padding:1rem 1rem 0}.mat-card-actions{justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1$2.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i1$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: FormsModule }] });
|
|
1160
1192
|
}
|
|
1161
1193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyUXFilterCard, decorators: [{
|
|
1162
1194
|
type: Component,
|
|
1163
|
-
args: [{ selector: 'ntyux-filter-card',
|
|
1164
|
-
}], propDecorators: { Title: [{ type: i0.Input, args: [{ isSignal: true, alias: "Title", required: false }] }], SubTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "SubTitle", required: false }] }], isExportVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isExportVisible", required: false }] }], isFormValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFormValid", required: false }] }], onExport: [{ type: i0.Output, args: ["onExport"] }], onReset: [{ type: i0.Output, args: ["onReset"] }], onApply: [{ type: i0.Output, args: ["onApply"] }] } });
|
|
1195
|
+
args: [{ selector: 'ntyux-filter-card', imports: [MatCardModule, MatButtonModule, FormsModule], template: "<mat-card class=\"filter-card\" apperance=\"outlined\">\n <mat-card-title>{{Title()}}</mat-card-title>\n <mat-card-subtitle>{{SubTitle()}}</mat-card-subtitle>\n <mat-card-content>\n <ng-content>\n No content provided\n </ng-content>\n </mat-card-content>\n <mat-card-actions class=\"mat-card-actions\">\n <button matButton=\"outlined\" (click)=\"onReset.emit()\">{{getResetButtonLabel()}}</button>\n @if (isExportVisible()) {\n <button matButton=\"outlined\" [disabled]=\"!isFormValid()\"\n (click)=\"onExport.emit()\">{{getExportButtonLabel()}}</button>\n }\n <button matButton=\"filled\" [disabled]=\"!isFormValid()\"\n (click)=\"onApply.emit()\">{{getApplyButtonLabel()}}</button>\n </mat-card-actions>\n</mat-card>", styles: [".filter-card{padding:1rem 1rem 0}.mat-card-actions{justify-content:flex-end}\n"] }]
|
|
1196
|
+
}], propDecorators: { Title: [{ type: i0.Input, args: [{ isSignal: true, alias: "Title", required: false }] }], SubTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "SubTitle", required: false }] }], isExportVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isExportVisible", required: false }] }], isFormValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFormValid", required: false }] }], onExport: [{ type: i0.Output, args: ["onExport"] }], onReset: [{ type: i0.Output, args: ["onReset"] }], onApply: [{ type: i0.Output, args: ["onApply"] }], resetButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetButtonLabel", required: false }] }], applyButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonLabel", required: false }] }], exportButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButtonLabel", required: false }] }] } });
|
|
1165
1197
|
|
|
1166
1198
|
class NtySidenavResizableDirective {
|
|
1167
1199
|
el = inject(ElementRef);
|