@lenne.tech/ng-base 14.6.0 → 14.8.1
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/base-components/base-components.module.d.ts +5 -4
- package/base-components/components/delete-account/delete-account.component.d.ts +15 -0
- package/base-components/public-api.d.ts +1 -0
- package/base-prototype/pages/forgot-password/forgot-password.component.d.ts +3 -2
- package/esm2020/base-components/base-components.module.mjs +5 -1
- package/esm2020/base-components/components/change-password/change-password.component.mjs +3 -3
- package/esm2020/base-components/components/delete-account/delete-account.component.mjs +56 -0
- package/esm2020/base-components/public-api.mjs +2 -1
- package/esm2020/base-prototype/pages/forgot-password/forgot-password.component.mjs +12 -5
- package/esm2020/shared/services/graphql.service.mjs +5 -10
- package/esm2020/shared/services/user.service.mjs +14 -1
- package/fesm2015/lenne.tech-ng-base-base-components.mjs +56 -3
- package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs +10 -3
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-shared.mjs +17 -9
- package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-components.mjs +56 -3
- package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs +10 -3
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-shared.mjs +17 -9
- package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/shared/services/user.service.d.ts +6 -0
|
@@ -1763,12 +1763,62 @@ class ChangePasswordComponent {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
ChangePasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1$1.FormsService }, { token: i1$1.UserService }, { token: i1$1.AuthService }, { token: i1$1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1766
|
-
ChangePasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ChangePasswordComponent, selector: "base-change-password", ngImport: i0, template: "<form [formGroup]=\"form\">\n <base-input\n [id]=\"'password'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton"], outputs: ["enter"] }] });
|
|
1766
|
+
ChangePasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ChangePasswordComponent, selector: "base-change-password", ngImport: i0, template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'password'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required", "eyeButton"], outputs: ["enter"] }] });
|
|
1767
1767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ChangePasswordComponent, decorators: [{
|
|
1768
1768
|
type: Component,
|
|
1769
|
-
args: [{ selector: 'base-change-password', template: "<form [formGroup]=\"form\">\n <base-input\n [id]=\"'password'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n" }]
|
|
1769
|
+
args: [{ selector: 'base-change-password', template: "<h3>Passwort \u00E4ndern</h3>\n\n<form [formGroup]=\"form\">\n <base-input\n [id]=\"'password'\"\n [label]=\"'Passwort'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('password')\"\n [tabIndex]=\"1\"\n [eyeButton]=\"true\"\n ></base-input>\n <base-input\n [id]=\"'password-confirm'\"\n [label]=\"'Passwort best\u00E4tigen'\"\n [required]=\"true\"\n [type]=\"'password'\"\n [control]=\"form.get('passwordConfirm')\"\n [tabIndex]=\"2\"\n [eyeButton]=\"true\"\n ></base-input>\n\n <div class=\"d-flex justify-content-end\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"submit()\" *ngIf=\"!loading\">Passwort \u00E4ndern</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</form>\n" }]
|
|
1770
1770
|
}], ctorParameters: function () { return [{ type: i1$1.FormsService }, { type: i1$1.UserService }, { type: i1$1.AuthService }, { type: i1$1.ToastService }]; } });
|
|
1771
1771
|
|
|
1772
|
+
class DeleteAccountComponent {
|
|
1773
|
+
constructor(userService, authService, toastService, router) {
|
|
1774
|
+
this.userService = userService;
|
|
1775
|
+
this.authService = authService;
|
|
1776
|
+
this.toastService = toastService;
|
|
1777
|
+
this.router = router;
|
|
1778
|
+
this.description = 'Mit dem Löschen Deines Kontos werden alle persönlichen Daten sofort gelöscht und sind nicht wiederherstellbar.';
|
|
1779
|
+
this.loading = false;
|
|
1780
|
+
}
|
|
1781
|
+
deleteAccount() {
|
|
1782
|
+
this.loading = true;
|
|
1783
|
+
if (!confirm('Willst Du wirklich ein Konto unwiderruflich löschen?')) {
|
|
1784
|
+
this.loading = false;
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
this.userService.delete(this.authService.currentUser.id).subscribe({
|
|
1788
|
+
next: (response) => {
|
|
1789
|
+
if (response) {
|
|
1790
|
+
this.toastService.show({
|
|
1791
|
+
id: 'delete-user-success',
|
|
1792
|
+
title: 'Erfolgreich',
|
|
1793
|
+
description: 'Dein Konto wurde erfolgreich gelöscht.',
|
|
1794
|
+
type: ToastType.SUCCESS,
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
this.authService.logout();
|
|
1798
|
+
this.router.navigate(['/']);
|
|
1799
|
+
this.loading = false;
|
|
1800
|
+
},
|
|
1801
|
+
error: (error) => {
|
|
1802
|
+
this.loading = false;
|
|
1803
|
+
this.toastService.show({
|
|
1804
|
+
id: 'delete-user-error',
|
|
1805
|
+
title: 'Fehlgeschlagen',
|
|
1806
|
+
description: 'Konto löschen ist fehlgeschlagen, bitte versuche es später erneut.',
|
|
1807
|
+
type: ToastType.ERROR,
|
|
1808
|
+
});
|
|
1809
|
+
},
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
DeleteAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DeleteAccountComponent, deps: [{ token: i1$1.UserService }, { token: i1$1.AuthService }, { token: i1$1.ToastService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1814
|
+
DeleteAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: DeleteAccountComponent, selector: "base-delete-account", inputs: { description: "description" }, ngImport: i0, template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\" *ngIf=\"!loading\">Konto l\u00F6schen</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: DeleteAccountComponent, decorators: [{
|
|
1816
|
+
type: Component,
|
|
1817
|
+
args: [{ selector: 'base-delete-account', template: "<div>\n <h3>Konto l\u00F6schen</h3>\n\n <p>{{ description }}</p>\n\n <div class=\"d-flex justify-content-end mt-3\">\n <div>\n <button class=\"btn btn-primary\" (click)=\"deleteAccount()\" *ngIf=\"!loading\">Konto l\u00F6schen</button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n Loading...\n </button>\n </div>\n </div>\n</div>\n" }]
|
|
1818
|
+
}], ctorParameters: function () { return [{ type: i1$1.UserService }, { type: i1$1.AuthService }, { type: i1$1.ToastService }, { type: i2$1.Router }]; }, propDecorators: { description: [{
|
|
1819
|
+
type: Input
|
|
1820
|
+
}] } });
|
|
1821
|
+
|
|
1772
1822
|
class BackButtonDirective {
|
|
1773
1823
|
constructor(navigation) {
|
|
1774
1824
|
this.navigation = navigation;
|
|
@@ -1813,6 +1863,7 @@ const elements = [
|
|
|
1813
1863
|
UploadImageComponent,
|
|
1814
1864
|
RefenceInputComponent,
|
|
1815
1865
|
ChangePasswordComponent,
|
|
1866
|
+
DeleteAccountComponent,
|
|
1816
1867
|
// Pipes
|
|
1817
1868
|
EllipsesPipe,
|
|
1818
1869
|
];
|
|
@@ -1840,6 +1891,7 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
|
|
|
1840
1891
|
UploadImageComponent,
|
|
1841
1892
|
RefenceInputComponent,
|
|
1842
1893
|
ChangePasswordComponent,
|
|
1894
|
+
DeleteAccountComponent,
|
|
1843
1895
|
// Pipes
|
|
1844
1896
|
EllipsesPipe], imports: [FormsModule, ReactiveFormsModule, CommonModule], exports: [
|
|
1845
1897
|
// Directives
|
|
@@ -1862,6 +1914,7 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
|
|
|
1862
1914
|
UploadImageComponent,
|
|
1863
1915
|
RefenceInputComponent,
|
|
1864
1916
|
ChangePasswordComponent,
|
|
1917
|
+
DeleteAccountComponent,
|
|
1865
1918
|
// Pipes
|
|
1866
1919
|
EllipsesPipe] });
|
|
1867
1920
|
BaseComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseComponentsModule, imports: [imports] });
|
|
@@ -1882,5 +1935,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
1882
1935
|
* Generated bundle index. Do not edit.
|
|
1883
1936
|
*/
|
|
1884
1937
|
|
|
1885
|
-
export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, EllipsesPipe, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
|
|
1938
|
+
export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, DeleteAccountComponent, EllipsesPipe, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
|
|
1886
1939
|
//# sourceMappingURL=lenne.tech-ng-base-base-components.mjs.map
|