@posiwise/shared-components 0.0.5 → 0.0.6
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/esm2020/index.mjs +2 -1
- package/esm2020/lib/password-validation/password-validation.component.mjs +52 -0
- package/esm2020/lib/shared-components.module.mjs +30 -6
- package/fesm2015/shared-components.mjs +79 -7
- package/fesm2015/shared-components.mjs.map +1 -1
- package/fesm2020/shared-components.mjs +79 -7
- package/fesm2020/shared-components.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/password-validation/password-validation.component.d.ts +16 -0
- package/lib/shared-components.module.d.ts +5 -1
- package/package.json +8 -2
package/esm2020/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './lib/shared-components.module';
|
|
2
2
|
export * from './lib/ab-test/ab-test-container/ab-test-container.component';
|
|
3
3
|
export * from './lib/ab-test/ab-alternative/ab-alternative.component';
|
|
4
|
-
|
|
4
|
+
export * from './lib/password-validation/password-validation.component';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL3NoYXJlZC1jb21wb25lbnRzL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsNkRBQTZELENBQUM7QUFDNUUsY0FBYyx1REFBdUQsQ0FBQztBQUN0RSxjQUFjLHlEQUF5RCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvc2hhcmVkLWNvbXBvbmVudHMubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2FiLXRlc3QvYWItdGVzdC1jb250YWluZXIvYWItdGVzdC1jb250YWluZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2FiLXRlc3QvYWItYWx0ZXJuYXRpdmUvYWItYWx0ZXJuYXRpdmUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3Bhc3N3b3JkLXZhbGlkYXRpb24vcGFzc3dvcmQtdmFsaWRhdGlvbi5jb21wb25lbnQnO1xuIl19
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Component, EventEmitter, Injector, Output, TemplateRef, ViewChild } from '@angular/core';
|
|
2
|
+
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
+
import { StatusCodes } from 'http-status-codes';
|
|
4
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@ng-bootstrap/ng-bootstrap";
|
|
7
|
+
import * as i2 from "@angular/forms";
|
|
8
|
+
import * as i3 from "@posiwise//directives";
|
|
9
|
+
import * as i4 from "@ngneat/transloco";
|
|
10
|
+
export class PasswordValidationComponent extends AppBaseComponent {
|
|
11
|
+
constructor(injector, modal) {
|
|
12
|
+
super(injector);
|
|
13
|
+
this.modal = modal;
|
|
14
|
+
this.successEvent = new EventEmitter();
|
|
15
|
+
}
|
|
16
|
+
open() {
|
|
17
|
+
this.modal.open(this.content, { centered: true, windowClass: 'modal-holder' });
|
|
18
|
+
}
|
|
19
|
+
validatePassword() {
|
|
20
|
+
if (this.password) {
|
|
21
|
+
this.buttonBusy = true;
|
|
22
|
+
this.userService
|
|
23
|
+
.checkPassword({ password: this.password })
|
|
24
|
+
.subscribe(data => {
|
|
25
|
+
if (data && data?.status === StatusCodes.OK) {
|
|
26
|
+
this.successEvent.emit(true);
|
|
27
|
+
this.modal.dismissAll();
|
|
28
|
+
this.password = null;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.successEvent.emit(false);
|
|
32
|
+
this.password = null;
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
.add(() => {
|
|
36
|
+
this.buttonBusy = false;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
PasswordValidationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, deps: [{ token: i0.Injector }, { token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
+
PasswordValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PasswordValidationComponent, selector: "pw-password-validation", outputs: { successEvent: "successEvent" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "pipe", type: i4.TranslocoPipe, name: "transloco" }] });
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, decorators: [{
|
|
44
|
+
type: Component,
|
|
45
|
+
args: [{ selector: 'pw-password-validation', template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
46
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.NgbModal }]; }, propDecorators: { content: [{
|
|
47
|
+
type: ViewChild,
|
|
48
|
+
args: ['content', { static: true }]
|
|
49
|
+
}], successEvent: [{
|
|
50
|
+
type: Output
|
|
51
|
+
}] } });
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3dvcmQtdmFsaWRhdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8u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vd0NsYXNzOiAnbW9kYWwtaG9sZGVyJyB9KTtcbiAgICB9XG5cbiAgICB2YWxpZGF0ZVBhc3N3b3JkKCkge1xuICAgICAgICBpZiAodGhpcy5wYXNzd29yZCkge1xuICAgICAgICAgICAgdGhpcy5idXR0b25CdXN5ID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMudXNlclNlcnZpY2VcbiAgICAgICAgICAgICAgICAuY2hlY2tQYXNzd29yZCh7IHBhc3N3b3JkOiB0aGlzLnBhc3N3b3JkIH0pXG4gICAgICAgICAgICAgICAgLnN1YnNjcmliZShkYXRhID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YT8uc3RhdHVzID09PSBTdGF0dXNDb2Rlcy5PSykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zdWNjZXNzRXZlbnQuZW1pdCh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubW9kYWwuZGlzbWlzc0FsbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXNzd29yZCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN1Y2Nlc3NFdmVudC5lbWl0KGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGFzc3dvcmQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuYWRkKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5idXR0b25CdXN5ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iLCI8bmctdGVtcGxhdGUgI2NvbnRlbnRcbiAgbGV0LW1vZGFsPlxuICA8ZGl2IGNsYXNzPVwibW9kYWwtaGVhZGVyXCI+XG4gICAgPGg1IGNsYXNzPVwibW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cmQoKVwiPlxuICAgICAgICAgIHt7ICdCdXR0b24uQ29uZmlybScgfCB0cmFuc2xvY28gfX1cbiAgICAgICAgPC9idXR0b24+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { AbTestContainerComponent } from './ab-test/ab-test-container/ab-test-container.component';
|
|
3
3
|
import { AbAlternativeComponent } from './ab-test/ab-alternative/ab-alternative.component';
|
|
4
|
+
import { PasswordValidationComponent } from './password-validation/password-validation.component';
|
|
5
|
+
import { DirectivesModule } from '@posiwise//directives';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import { CoreTranslocoModule } from "core-transloco";
|
|
4
8
|
import * as i0 from "@angular/core";
|
|
5
9
|
export class SharedComponentsModule {
|
|
6
10
|
}
|
|
7
11
|
SharedComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
-
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
9
|
-
|
|
12
|
+
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
13
|
+
AbAlternativeComponent,
|
|
14
|
+
PasswordValidationComponent], imports: [FormsModule,
|
|
15
|
+
DirectivesModule,
|
|
16
|
+
CoreTranslocoModule], exports: [AbTestContainerComponent,
|
|
17
|
+
AbAlternativeComponent,
|
|
18
|
+
PasswordValidationComponent] });
|
|
19
|
+
SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, imports: [FormsModule,
|
|
20
|
+
DirectivesModule,
|
|
21
|
+
CoreTranslocoModule] });
|
|
10
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, decorators: [{
|
|
11
23
|
type: NgModule,
|
|
12
24
|
args: [{
|
|
13
|
-
declarations: [
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
declarations: [
|
|
26
|
+
AbTestContainerComponent,
|
|
27
|
+
AbAlternativeComponent,
|
|
28
|
+
PasswordValidationComponent
|
|
29
|
+
],
|
|
30
|
+
imports: [
|
|
31
|
+
FormsModule,
|
|
32
|
+
DirectivesModule,
|
|
33
|
+
CoreTranslocoModule
|
|
34
|
+
],
|
|
35
|
+
exports: [
|
|
36
|
+
AbTestContainerComponent,
|
|
37
|
+
AbAlternativeComponent,
|
|
38
|
+
PasswordValidationComponent
|
|
39
|
+
]
|
|
16
40
|
}]
|
|
17
41
|
}] });
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLWNvbXBvbmVudHMubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9zaGFyZWQtY29tcG9uZW50cy9zcmMvbGliL3NoYXJlZC1jb21wb25lbnRzLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHlEQUF5RCxDQUFDO0FBQ25HLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLG1EQUFtRCxDQUFDO0FBQzNGLE9BQU8sRUFBRSwyQkFBMkIsRUF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hdGl2ZUNvbXBvbmVudCB9IGZyb20gJy4vYWItdGVzdC9hYi1hbHRlcm5hdGl2ZS9hYi1hbHRlcm5hdGl2ZS5jb21wb25lbnQnO1xuaW1wb3J0IHsgUGFzc3dvcmRWYWxpZGF0aW9uQ29tcG9uZW50IH0gZnJvbSAnLi9wYXNzd29yZC12YWxpZGF0aW9uL3Bhc3N3b3JkLXZhbGlkYXRpb24uY29tcG9uZW50JztcbmltcG9ydCB7IERpcmVjdGl2ZXNNb2R1bGUgfSBmcm9tICdAcG9zaXdpc2UvL2RpcmVjdGl2ZXMnO1xuXG5pbXBvcnQgeyBGb3Jtc01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2Zvcm1zJztcbmltcG9ydCB7IENvcmVUcmFuc2xvY29Nb2R1bGUgfSBmcm9tIFwiY29yZS10cmFuc2xvY29cIjtcblxuQE5nTW9kdWxlKHtcbiAgICBkZWNsYXJhdGlvbnM6IFtcbiAgICAgIEFiVGVzdENvbnRhaW5lckNvbXBvbmVudCxcbiAgICAgIEFiQWx0ZXJuYXRpdmVDb21wb25lbnQsXG4gICAgICBQYXNzd29yZFZhbGlkYXRpb25Db21wb25lbnRcbiAgICBdLFxuICAgIGltcG9ydHM6IFtcbiAgICAgIEZvcm1zTW9kdWxlLFxuICAgICAgRGlyZWN0aXZlc01vZHVsZSxcbiAgICAgIENvcmVUcmFuc2xvY29Nb2R1bGVcbiAgICBdLFxuICAgIGV4cG9ydHM6IFtcbiAgICAgIEFiVGVzdENvbnRhaW5lckNvbXBvbmVudCxcbiAgICAgIEFiQWx0ZXJuYXRpdmVDb21wb25lbnQsXG4gICAgICBQYXNzd29yZFZhbGlkYXRpb25Db21wb25lbnRcbiAgICBdXG59KVxuZXhwb3J0IGNsYXNzIFNoYXJlZENvbXBvbmVudHNNb2R1bGUge31cbiJdfQ==
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, Input, EventEmitter, ViewChild, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { AB_TEST_ACTIONS } from '@posiwise/common-utilities';
|
|
4
4
|
import * as i1 from '@posiwise/common-services';
|
|
5
|
+
import { StatusCodes } from 'http-status-codes';
|
|
6
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
7
|
+
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
|
|
8
|
+
import * as i2 from '@angular/forms';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import * as i3 from '@posiwise//directives';
|
|
11
|
+
import { DirectivesModule } from '@posiwise//directives';
|
|
12
|
+
import * as i4 from '@ngneat/transloco';
|
|
13
|
+
import { CoreTranslocoModule } from 'core-transloco';
|
|
5
14
|
|
|
6
15
|
class AbTestContainerComponent {
|
|
7
16
|
constructor(service) {
|
|
@@ -66,17 +75,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
66
75
|
type: Input
|
|
67
76
|
}] } });
|
|
68
77
|
|
|
78
|
+
class PasswordValidationComponent extends AppBaseComponent {
|
|
79
|
+
constructor(injector, modal) {
|
|
80
|
+
super(injector);
|
|
81
|
+
this.modal = modal;
|
|
82
|
+
this.successEvent = new EventEmitter();
|
|
83
|
+
}
|
|
84
|
+
open() {
|
|
85
|
+
this.modal.open(this.content, { centered: true, windowClass: 'modal-holder' });
|
|
86
|
+
}
|
|
87
|
+
validatePassword() {
|
|
88
|
+
if (this.password) {
|
|
89
|
+
this.buttonBusy = true;
|
|
90
|
+
this.userService
|
|
91
|
+
.checkPassword({ password: this.password })
|
|
92
|
+
.subscribe(data => {
|
|
93
|
+
if (data && (data === null || data === void 0 ? void 0 : data.status) === StatusCodes.OK) {
|
|
94
|
+
this.successEvent.emit(true);
|
|
95
|
+
this.modal.dismissAll();
|
|
96
|
+
this.password = null;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.successEvent.emit(false);
|
|
100
|
+
this.password = null;
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.add(() => {
|
|
104
|
+
this.buttonBusy = false;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
PasswordValidationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, deps: [{ token: i0.Injector }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
PasswordValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PasswordValidationComponent, selector: "pw-password-validation", outputs: { successEvent: "successEvent" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "pipe", type: i4.TranslocoPipe, name: "transloco" }] });
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, decorators: [{
|
|
112
|
+
type: Component,
|
|
113
|
+
args: [{ selector: 'pw-password-validation', template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
114
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.NgbModal }]; }, propDecorators: { content: [{
|
|
115
|
+
type: ViewChild,
|
|
116
|
+
args: ['content', { static: true }]
|
|
117
|
+
}], successEvent: [{
|
|
118
|
+
type: Output
|
|
119
|
+
}] } });
|
|
120
|
+
|
|
69
121
|
class SharedComponentsModule {
|
|
70
122
|
}
|
|
71
123
|
SharedComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
72
|
-
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
73
|
-
|
|
124
|
+
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
125
|
+
AbAlternativeComponent,
|
|
126
|
+
PasswordValidationComponent], imports: [FormsModule,
|
|
127
|
+
DirectivesModule,
|
|
128
|
+
CoreTranslocoModule], exports: [AbTestContainerComponent,
|
|
129
|
+
AbAlternativeComponent,
|
|
130
|
+
PasswordValidationComponent] });
|
|
131
|
+
SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, imports: [FormsModule,
|
|
132
|
+
DirectivesModule,
|
|
133
|
+
CoreTranslocoModule] });
|
|
74
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, decorators: [{
|
|
75
135
|
type: NgModule,
|
|
76
136
|
args: [{
|
|
77
|
-
declarations: [
|
|
78
|
-
|
|
79
|
-
|
|
137
|
+
declarations: [
|
|
138
|
+
AbTestContainerComponent,
|
|
139
|
+
AbAlternativeComponent,
|
|
140
|
+
PasswordValidationComponent
|
|
141
|
+
],
|
|
142
|
+
imports: [
|
|
143
|
+
FormsModule,
|
|
144
|
+
DirectivesModule,
|
|
145
|
+
CoreTranslocoModule
|
|
146
|
+
],
|
|
147
|
+
exports: [
|
|
148
|
+
AbTestContainerComponent,
|
|
149
|
+
AbAlternativeComponent,
|
|
150
|
+
PasswordValidationComponent
|
|
151
|
+
]
|
|
80
152
|
}]
|
|
81
153
|
}] });
|
|
82
154
|
|
|
@@ -84,5 +156,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
84
156
|
* Generated bundle index. Do not edit.
|
|
85
157
|
*/
|
|
86
158
|
|
|
87
|
-
export { AbAlternativeComponent, AbTestContainerComponent, SharedComponentsModule };
|
|
159
|
+
export { AbAlternativeComponent, AbTestContainerComponent, PasswordValidationComponent, SharedComponentsModule };
|
|
88
160
|
//# sourceMappingURL=shared-components.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-components.mjs","sources":["../../../../libs/shared-components/src/lib/ab-test/ab-test-container/ab-test-container.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.html","../../../../libs/shared-components/src/lib/shared-components.module.ts","../../../../libs/shared-components/src/shared-components.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\n\nimport { AB_TEST_ACTIONS } from '@posiwise/common-utilities';\nimport { Experiment } from '../ab-test.interface';\nimport { AbTestService } from '@posiwise/common-services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'pw-ab-test-container',\n template: '<ng-content></ng-content>'\n})\nexport class AbTestContainerComponent implements OnInit {\n @Input()\n experimentName: string;\n\n @Input()\n serviceName: string;\n\n data: Experiment;\n\n /**\n * Specifies boolean to show the experiment as fallback\n */\n showDefaultExperiment = false;\n\n constructor(private service: AbTestService) {}\n\n ngOnInit(): void {\n this.getExperiment();\n }\n\n private getExperiment() {\n this.service\n .getExperiment(this.experimentName, AB_TEST_ACTIONS.START, this.serviceName)\n .subscribe({\n next: (response: Experiment) => {\n this.showDefaultExperiment = false;\n this.data = response || ({} as Experiment);\n },\n error: () => {\n // in case the api for experiment fails, we show the default experiment\n this.showDefaultExperiment = true;\n }\n });\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { AbTestContainerComponent } from '../ab-test-container/ab-test-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ab-alternative',\n templateUrl: './ab-alternative.component.html'\n})\nexport class AbAlternativeComponent {\n @Input()\n name: string;\n\n /**\n * Specficies AbTestContainerComponent instance template reference\n */\n @Input()\n ref: AbTestContainerComponent;\n\n /**\n * If the getExperiment call fails, it can be set to show the experiment\n * as fallback\n */\n @Input()\n default = false;\n}\n","<!-- renders the template for the started experiment.\nin case of error, render the template marked as default=true -->\n<ng-template [ngIf]=\"\n ref?.data?.alternative === name || (default === true && ref.showDefaultExperiment === true)\n \">\n <ng-content></ng-content>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { AbTestContainerComponent } from './ab-test/ab-test-container/ab-test-container.component';\nimport { AbAlternativeComponent } from './ab-test/ab-alternative/ab-alternative.component';\n\n@NgModule({\n declarations: [AbTestContainerComponent, AbAlternativeComponent],\n imports: [],\n exports: [AbTestContainerComponent, AbAlternativeComponent]\n})\nexport class SharedComponentsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,wBAAwB,CAAA;AAcjC,IAAA,WAAA,CAAoB,OAAsB,EAAA;AAAtB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAe;AAL1C;;AAEG;AACH,QAAA,IAAqB,CAAA,qBAAA,GAAG,KAAK,CAAC;KAEgB;IAE9C,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAEO,aAAa,GAAA;AACjB,QAAA,IAAI,CAAC,OAAO;AACP,aAAA,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;AAC3E,aAAA,SAAS,CAAC;AACP,YAAA,IAAI,EAAE,CAAC,QAAoB,KAAI;AAC3B,gBAAA,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC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EAAA,QAAA,EAAA,+SAAA,EAAA,CAAA;8BAK1B,IAAI,EAAA,CAAA;sBADH,KAAK;gBAON,GAAG,EAAA,CAAA;sBADF,KAAK;gBAQN,OAAO,EAAA,CAAA;sBADN,KAAK;;;MEdG,sBAAsB,CAAA;;mHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAJhB,wBAAwB,EAAE,sBAAsB,CAErD,EAAA,OAAA,EAAA,CAAA,wBAAwB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;oHAEjD,sBAAsB,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;AAChE,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;iBAC9D,CAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shared-components.mjs","sources":["../../../../libs/shared-components/src/lib/ab-test/ab-test-container/ab-test-container.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.html","../../../../libs/shared-components/src/lib/password-validation/password-validation.component.ts","../../../../libs/shared-components/src/lib/password-validation/password-validation.component.html","../../../../libs/shared-components/src/lib/shared-components.module.ts","../../../../libs/shared-components/src/shared-components.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\n\nimport { AB_TEST_ACTIONS } from '@posiwise/common-utilities';\nimport { Experiment } from '../ab-test.interface';\nimport { AbTestService } from '@posiwise/common-services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'pw-ab-test-container',\n template: '<ng-content></ng-content>'\n})\nexport class AbTestContainerComponent implements OnInit {\n @Input()\n experimentName: string;\n\n @Input()\n serviceName: string;\n\n data: Experiment;\n\n /**\n * Specifies boolean to show the experiment as fallback\n */\n showDefaultExperiment = false;\n\n constructor(private service: AbTestService) {}\n\n ngOnInit(): void {\n this.getExperiment();\n }\n\n private getExperiment() {\n this.service\n .getExperiment(this.experimentName, AB_TEST_ACTIONS.START, this.serviceName)\n .subscribe({\n next: (response: Experiment) => {\n this.showDefaultExperiment = false;\n this.data = response || ({} as Experiment);\n },\n error: () => {\n // in case the api for experiment fails, we show the default experiment\n this.showDefaultExperiment = true;\n }\n });\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { AbTestContainerComponent } from '../ab-test-container/ab-test-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ab-alternative',\n templateUrl: './ab-alternative.component.html'\n})\nexport class AbAlternativeComponent {\n @Input()\n name: string;\n\n /**\n * Specficies AbTestContainerComponent instance template reference\n */\n @Input()\n ref: AbTestContainerComponent;\n\n /**\n * If the getExperiment call fails, it can be set to show the experiment\n * as fallback\n */\n @Input()\n default = false;\n}\n","<!-- renders the template for the started experiment.\nin case of error, render the template marked as default=true -->\n<ng-template [ngIf]=\"\n ref?.data?.alternative === name || (default === true && ref.showDefaultExperiment === true)\n \">\n <ng-content></ng-content>\n</ng-template>\n","import { Component, EventEmitter, Injector, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { StatusCodes } from 'http-status-codes';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\n\n@Component({\n selector: 'pw-password-validation',\n templateUrl: './password-validation.component.html'\n})\nexport class PasswordValidationComponent extends AppBaseComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<any>;\n\n @Output()\n successEvent: EventEmitter<boolean> = new EventEmitter();\n\n password: string;\n\n buttonBusy: boolean;\n\n constructor(injector: Injector, private modal: NgbModal) {\n super(injector);\n }\n\n open() {\n this.modal.open(this.content, { centered: true, windowClass: 'modal-holder' });\n }\n\n validatePassword() {\n if (this.password) {\n this.buttonBusy = true;\n this.userService\n .checkPassword({ password: this.password })\n .subscribe(data => {\n if (data && data?.status === StatusCodes.OK) {\n this.successEvent.emit(true);\n this.modal.dismissAll();\n this.password = null;\n } else {\n this.successEvent.emit(false);\n this.password = null;\n }\n })\n .add(() => {\n this.buttonBusy = false;\n });\n }\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { AbTestContainerComponent } from './ab-test/ab-test-container/ab-test-container.component';\nimport { AbAlternativeComponent } from './ab-test/ab-alternative/ab-alternative.component';\nimport { PasswordValidationComponent } from './password-validation/password-validation.component';\nimport { DirectivesModule } from '@posiwise//directives';\n\nimport { FormsModule } from '@angular/forms';\nimport { CoreTranslocoModule } from \"core-transloco\";\n\n@NgModule({\n declarations: [\n AbTestContainerComponent,\n AbAlternativeComponent,\n PasswordValidationComponent\n ],\n imports: [\n FormsModule,\n DirectivesModule,\n CoreTranslocoModule\n ],\n exports: [\n AbTestContainerComponent,\n AbAlternativeComponent,\n PasswordValidationComponent\n ]\n})\nexport class SharedComponentsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;MAWa,wBAAwB,CAAA;AAcjC,IAAA,WAAA,CAAoB,OAAsB,EAAA;AAAtB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAe;AAL1C;;AAEG;AACH,QAAA,IAAqB,CAAA,qBAAA,GAAG,KAAK,CAAC;KAEgB;IAE9C,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAEO,aAAa,GAAA;AACjB,QAAA,IAAI,CAAC,OAAO;AACP,aAAA,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;AAC3E,aAAA,SAAS,CAAC;AACP,YAAA,IAAI,EAAE,CAAC,QAAoB,KAAI;AAC3B,gBAAA,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;AACnC,gBAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAK,EAAiB,CAAC;aAC9C;YACD,KAAK,EAAE,MAAK;;AAER,gBAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;aACrC;AACJ,SAAA,CAAC,CAAC;KACV;;qHAjCQ,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,sIAFvB,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A,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAf7B,wBAAwB;QACxB,sBAAsB;AACtB,QAAA,2BAA2B,aAG3B,WAAW;QACX,gBAAgB;AAChB,QAAA,mBAAmB,aAGnB,wBAAwB;QACxB,sBAAsB;QACtB,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAGpB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAV7B,WAAW;QACX,gBAAgB;QAChB,mBAAmB,CAAA,EAAA,CAAA,CAAA;2FAQZ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAjBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sBAAsB;wBACtB,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,WAAW;wBACX,gBAAgB;wBAChB,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sBAAsB;wBACtB,2BAA2B;AAC5B,qBAAA;iBACJ,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, Input, EventEmitter, ViewChild, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { AB_TEST_ACTIONS } from '@posiwise/common-utilities';
|
|
4
4
|
import * as i1 from '@posiwise/common-services';
|
|
5
|
+
import * as i1$1 from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
+
import { StatusCodes } from 'http-status-codes';
|
|
7
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
8
|
+
import * as i2 from '@angular/forms';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import * as i3 from '@posiwise//directives';
|
|
11
|
+
import { DirectivesModule } from '@posiwise//directives';
|
|
12
|
+
import * as i4 from '@ngneat/transloco';
|
|
13
|
+
import { CoreTranslocoModule } from 'core-transloco';
|
|
5
14
|
|
|
6
15
|
class AbTestContainerComponent {
|
|
7
16
|
constructor(service) {
|
|
@@ -66,17 +75,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
66
75
|
type: Input
|
|
67
76
|
}] } });
|
|
68
77
|
|
|
78
|
+
class PasswordValidationComponent extends AppBaseComponent {
|
|
79
|
+
constructor(injector, modal) {
|
|
80
|
+
super(injector);
|
|
81
|
+
this.modal = modal;
|
|
82
|
+
this.successEvent = new EventEmitter();
|
|
83
|
+
}
|
|
84
|
+
open() {
|
|
85
|
+
this.modal.open(this.content, { centered: true, windowClass: 'modal-holder' });
|
|
86
|
+
}
|
|
87
|
+
validatePassword() {
|
|
88
|
+
if (this.password) {
|
|
89
|
+
this.buttonBusy = true;
|
|
90
|
+
this.userService
|
|
91
|
+
.checkPassword({ password: this.password })
|
|
92
|
+
.subscribe(data => {
|
|
93
|
+
if (data && data?.status === StatusCodes.OK) {
|
|
94
|
+
this.successEvent.emit(true);
|
|
95
|
+
this.modal.dismissAll();
|
|
96
|
+
this.password = null;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.successEvent.emit(false);
|
|
100
|
+
this.password = null;
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.add(() => {
|
|
104
|
+
this.buttonBusy = false;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
PasswordValidationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, deps: [{ token: i0.Injector }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
PasswordValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PasswordValidationComponent, selector: "pw-password-validation", outputs: { successEvent: "successEvent" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "pipe", type: i4.TranslocoPipe, name: "transloco" }] });
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PasswordValidationComponent, decorators: [{
|
|
112
|
+
type: Component,
|
|
113
|
+
args: [{ selector: 'pw-password-validation', template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
114
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.NgbModal }]; }, propDecorators: { content: [{
|
|
115
|
+
type: ViewChild,
|
|
116
|
+
args: ['content', { static: true }]
|
|
117
|
+
}], successEvent: [{
|
|
118
|
+
type: Output
|
|
119
|
+
}] } });
|
|
120
|
+
|
|
69
121
|
class SharedComponentsModule {
|
|
70
122
|
}
|
|
71
123
|
SharedComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
72
|
-
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
73
|
-
|
|
124
|
+
SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, declarations: [AbTestContainerComponent,
|
|
125
|
+
AbAlternativeComponent,
|
|
126
|
+
PasswordValidationComponent], imports: [FormsModule,
|
|
127
|
+
DirectivesModule,
|
|
128
|
+
CoreTranslocoModule], exports: [AbTestContainerComponent,
|
|
129
|
+
AbAlternativeComponent,
|
|
130
|
+
PasswordValidationComponent] });
|
|
131
|
+
SharedComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, imports: [FormsModule,
|
|
132
|
+
DirectivesModule,
|
|
133
|
+
CoreTranslocoModule] });
|
|
74
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: SharedComponentsModule, decorators: [{
|
|
75
135
|
type: NgModule,
|
|
76
136
|
args: [{
|
|
77
|
-
declarations: [
|
|
78
|
-
|
|
79
|
-
|
|
137
|
+
declarations: [
|
|
138
|
+
AbTestContainerComponent,
|
|
139
|
+
AbAlternativeComponent,
|
|
140
|
+
PasswordValidationComponent
|
|
141
|
+
],
|
|
142
|
+
imports: [
|
|
143
|
+
FormsModule,
|
|
144
|
+
DirectivesModule,
|
|
145
|
+
CoreTranslocoModule
|
|
146
|
+
],
|
|
147
|
+
exports: [
|
|
148
|
+
AbTestContainerComponent,
|
|
149
|
+
AbAlternativeComponent,
|
|
150
|
+
PasswordValidationComponent
|
|
151
|
+
]
|
|
80
152
|
}]
|
|
81
153
|
}] });
|
|
82
154
|
|
|
@@ -84,5 +156,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
84
156
|
* Generated bundle index. Do not edit.
|
|
85
157
|
*/
|
|
86
158
|
|
|
87
|
-
export { AbAlternativeComponent, AbTestContainerComponent, SharedComponentsModule };
|
|
159
|
+
export { AbAlternativeComponent, AbTestContainerComponent, PasswordValidationComponent, SharedComponentsModule };
|
|
88
160
|
//# sourceMappingURL=shared-components.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-components.mjs","sources":["../../../../libs/shared-components/src/lib/ab-test/ab-test-container/ab-test-container.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.html","../../../../libs/shared-components/src/lib/shared-components.module.ts","../../../../libs/shared-components/src/shared-components.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\n\nimport { AB_TEST_ACTIONS } from '@posiwise/common-utilities';\nimport { Experiment } from '../ab-test.interface';\nimport { AbTestService } from '@posiwise/common-services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'pw-ab-test-container',\n template: '<ng-content></ng-content>'\n})\nexport class AbTestContainerComponent implements OnInit {\n @Input()\n experimentName: string;\n\n @Input()\n serviceName: string;\n\n data: Experiment;\n\n /**\n * Specifies boolean to show the experiment as fallback\n */\n showDefaultExperiment = false;\n\n constructor(private service: AbTestService) {}\n\n ngOnInit(): void {\n this.getExperiment();\n }\n\n private getExperiment() {\n this.service\n .getExperiment(this.experimentName, AB_TEST_ACTIONS.START, this.serviceName)\n .subscribe({\n next: (response: Experiment) => {\n this.showDefaultExperiment = false;\n this.data = response || ({} as Experiment);\n },\n error: () => {\n // in case the api for experiment fails, we show the default experiment\n this.showDefaultExperiment = true;\n }\n });\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { AbTestContainerComponent } from '../ab-test-container/ab-test-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ab-alternative',\n templateUrl: './ab-alternative.component.html'\n})\nexport class AbAlternativeComponent {\n @Input()\n name: string;\n\n /**\n * Specficies AbTestContainerComponent instance template reference\n */\n @Input()\n ref: AbTestContainerComponent;\n\n /**\n * If the getExperiment call fails, it can be set to show the experiment\n * as fallback\n */\n @Input()\n default = false;\n}\n","<!-- renders the template for the started experiment.\nin case of error, render the template marked as default=true -->\n<ng-template [ngIf]=\"\n ref?.data?.alternative === name || (default === true && ref.showDefaultExperiment === true)\n \">\n <ng-content></ng-content>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { AbTestContainerComponent } from './ab-test/ab-test-container/ab-test-container.component';\nimport { AbAlternativeComponent } from './ab-test/ab-alternative/ab-alternative.component';\n\n@NgModule({\n declarations: [AbTestContainerComponent, AbAlternativeComponent],\n imports: [],\n exports: [AbTestContainerComponent, AbAlternativeComponent]\n})\nexport class SharedComponentsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,wBAAwB,CAAA;AAcjC,IAAA,WAAA,CAAoB,OAAsB,EAAA;QAAtB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAe;AAL1C;;AAEG;QACH,IAAqB,CAAA,qBAAA,GAAG,KAAK,CAAC;KAEgB;IAE9C,QAAQ,GAAA;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAEO,aAAa,GAAA;AACjB,QAAA,IAAI,CAAC,OAAO;AACP,aAAA,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;AAC3E,aAAA,SAAS,CAAC;AACP,YAAA,IAAI,EAAE,CAAC,QAAoB,KAAI;AAC3B,gBAAA,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;AACnC,gBAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,IAAK,EAAiB,CAAC;aAC9C;YACD,KAAK,EAAE,MAAK;;AAER,gBAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;aACrC;AACJ,SAAA,CAAC,CAAC;KACV;;qHAjCQ,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA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AAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAJhB,wBAAwB,EAAE,sBAAsB,CAErD,EAAA,OAAA,EAAA,CAAA,wBAAwB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;oHAEjD,sBAAsB,EAAA,CAAA,CAAA;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;AAChE,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;AAC9D,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shared-components.mjs","sources":["../../../../libs/shared-components/src/lib/ab-test/ab-test-container/ab-test-container.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.ts","../../../../libs/shared-components/src/lib/ab-test/ab-alternative/ab-alternative.component.html","../../../../libs/shared-components/src/lib/password-validation/password-validation.component.ts","../../../../libs/shared-components/src/lib/password-validation/password-validation.component.html","../../../../libs/shared-components/src/lib/shared-components.module.ts","../../../../libs/shared-components/src/shared-components.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\n\nimport { AB_TEST_ACTIONS } from '@posiwise/common-utilities';\nimport { Experiment } from '../ab-test.interface';\nimport { AbTestService } from '@posiwise/common-services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'pw-ab-test-container',\n template: '<ng-content></ng-content>'\n})\nexport class AbTestContainerComponent implements OnInit {\n @Input()\n experimentName: string;\n\n @Input()\n serviceName: string;\n\n data: Experiment;\n\n /**\n * Specifies boolean to show the experiment as fallback\n */\n showDefaultExperiment = false;\n\n constructor(private service: AbTestService) {}\n\n ngOnInit(): void {\n this.getExperiment();\n }\n\n private getExperiment() {\n this.service\n .getExperiment(this.experimentName, AB_TEST_ACTIONS.START, this.serviceName)\n .subscribe({\n next: (response: Experiment) => {\n this.showDefaultExperiment = false;\n this.data = response || ({} as Experiment);\n },\n error: () => {\n // in case the api for experiment fails, we show the default experiment\n this.showDefaultExperiment = true;\n }\n });\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { AbTestContainerComponent } from '../ab-test-container/ab-test-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ab-alternative',\n templateUrl: './ab-alternative.component.html'\n})\nexport class AbAlternativeComponent {\n @Input()\n name: string;\n\n /**\n * Specficies AbTestContainerComponent instance template reference\n */\n @Input()\n ref: AbTestContainerComponent;\n\n /**\n * If the getExperiment call fails, it can be set to show the experiment\n * as fallback\n */\n @Input()\n default = false;\n}\n","<!-- renders the template for the started experiment.\nin case of error, render the template marked as default=true -->\n<ng-template [ngIf]=\"\n ref?.data?.alternative === name || (default === true && ref.showDefaultExperiment === true)\n \">\n <ng-content></ng-content>\n</ng-template>\n","import { Component, EventEmitter, Injector, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { StatusCodes } from 'http-status-codes';\n\nimport { AppBaseComponent } from '@posiwise/app-base-component';\n\n@Component({\n selector: 'pw-password-validation',\n templateUrl: './password-validation.component.html'\n})\nexport class PasswordValidationComponent extends AppBaseComponent {\n @ViewChild('content', { static: true }) content: TemplateRef<any>;\n\n @Output()\n successEvent: EventEmitter<boolean> = new EventEmitter();\n\n password: string;\n\n buttonBusy: boolean;\n\n constructor(injector: Injector, private modal: NgbModal) {\n super(injector);\n }\n\n open() {\n this.modal.open(this.content, { centered: true, windowClass: 'modal-holder' });\n }\n\n validatePassword() {\n if (this.password) {\n this.buttonBusy = true;\n this.userService\n .checkPassword({ password: this.password })\n .subscribe(data => {\n if (data && data?.status === StatusCodes.OK) {\n this.successEvent.emit(true);\n this.modal.dismissAll();\n this.password = null;\n } else {\n this.successEvent.emit(false);\n this.password = null;\n }\n })\n .add(() => {\n this.buttonBusy = false;\n });\n }\n }\n}\n","<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Confirm</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <strong class=\"p3\">{{ 'User.Account.Message.EnterPassword' | transloco }}</strong>\n <div>\n <ng-content></ng-content>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <input type=\"password\"\n #passwordRef\n [(ngModel)]=\"password\"\n class=\"form-control\"\n placeholder=\"Current Password\" />\n </div>\n </div>\n <div class=\"row mt-2\">\n <div class=\"col-12\">\n <button [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary float-end\"\n type=\"button\"\n (click)=\"validatePassword()\">\n {{ 'Button.Confirm' | transloco }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { AbTestContainerComponent } from './ab-test/ab-test-container/ab-test-container.component';\nimport { AbAlternativeComponent } from './ab-test/ab-alternative/ab-alternative.component';\nimport { PasswordValidationComponent } from './password-validation/password-validation.component';\nimport { DirectivesModule } from '@posiwise//directives';\n\nimport { FormsModule } from '@angular/forms';\nimport { CoreTranslocoModule } from \"core-transloco\";\n\n@NgModule({\n declarations: [\n AbTestContainerComponent,\n AbAlternativeComponent,\n PasswordValidationComponent\n ],\n imports: [\n FormsModule,\n DirectivesModule,\n CoreTranslocoModule\n ],\n exports: [\n AbTestContainerComponent,\n AbAlternativeComponent,\n PasswordValidationComponent\n ]\n})\nexport class SharedComponentsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;MAWa,wBAAwB,CAAA;AAcjC,IAAA,WAAA,CAAoB,OAAsB,EAAA;QAAtB,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AA,sBAAsB,YAV7B,WAAW;QACX,gBAAgB;QAChB,mBAAmB,CAAA,EAAA,CAAA,CAAA;2FAQZ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAjBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sBAAsB;wBACtB,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,WAAW;wBACX,gBAAgB;wBAChB,mBAAmB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sBAAsB;wBACtB,2BAA2B;AAC5B,qBAAA;AACJ,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './lib/shared-components.module';
|
|
2
2
|
export * from './lib/ab-test/ab-test-container/ab-test-container.component';
|
|
3
3
|
export * from './lib/ab-test/ab-alternative/ab-alternative.component';
|
|
4
|
+
export * from './lib/password-validation/password-validation.component';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter, Injector, TemplateRef } from '@angular/core';
|
|
2
|
+
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PasswordValidationComponent extends AppBaseComponent {
|
|
6
|
+
private modal;
|
|
7
|
+
content: TemplateRef<any>;
|
|
8
|
+
successEvent: EventEmitter<boolean>;
|
|
9
|
+
password: string;
|
|
10
|
+
buttonBusy: boolean;
|
|
11
|
+
constructor(injector: Injector, modal: NgbModal);
|
|
12
|
+
open(): void;
|
|
13
|
+
validatePassword(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidationComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordValidationComponent, "pw-password-validation", never, {}, { "successEvent": "successEvent"; }, never, ["*"], false, never>;
|
|
16
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./ab-test/ab-test-container/ab-test-container.component";
|
|
3
3
|
import * as i2 from "./ab-test/ab-alternative/ab-alternative.component";
|
|
4
|
+
import * as i3 from "./password-validation/password-validation.component";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@posiwise//directives";
|
|
7
|
+
import * as i6 from "core-transloco";
|
|
4
8
|
export declare class SharedComponentsModule {
|
|
5
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof i1.AbTestContainerComponent, typeof i2.AbAlternativeComponent],
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof i1.AbTestContainerComponent, typeof i2.AbAlternativeComponent, typeof i3.PasswordValidationComponent], [typeof i4.FormsModule, typeof i5.DirectivesModule, typeof i6.CoreTranslocoModule], [typeof i1.AbTestContainerComponent, typeof i2.AbAlternativeComponent, typeof i3.PasswordValidationComponent]>;
|
|
7
11
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
|
|
8
12
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posiwise/shared-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "15.2.5",
|
|
6
6
|
"@angular/core": "15.2.5",
|
|
7
|
-
"@
|
|
7
|
+
"@ngneat/transloco": "^4.2.6",
|
|
8
|
+
"@ngneat/transloco-keys-manager": "^3.7.0",
|
|
9
|
+
"@posiwise/common-services": "^0.0.49",
|
|
10
|
+
"@posiwise/app-base-component": "^0.0.8",
|
|
11
|
+
"@posiwise/directives": "^0.0.1",
|
|
12
|
+
"@posiwise/core-transloco": "^0.0.1",
|
|
13
|
+
"core-transloco": "0.0.1"
|
|
8
14
|
},
|
|
9
15
|
"dependencies": {
|
|
10
16
|
"tslib": "^2.3.0"
|