verben-authentication-ui 0.0.3 → 0.0.5
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/esm2022/lib/components/forgot-password/ForgotPasswordData.mjs +2 -0
- package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +66 -0
- package/esm2022/lib/components/forgot-password/forgot-password.module.mjs +34 -0
- package/esm2022/lib/components/otp-input/otp-input.component.mjs +6 -3
- package/esm2022/lib/components/reset-password/reset-password.component.mjs +15 -8
- package/esm2022/lib/components/sign-in/sign-in.component.mjs +42 -4
- package/esm2022/lib/components/sign-up/sign-up.component.mjs +49 -7
- package/esm2022/lib/components/sso/base-table-style.mjs +53 -0
- package/esm2022/lib/components/sso/helper.mjs +14 -0
- package/esm2022/lib/components/sso/sso-form/sso-form.component.mjs +102 -0
- package/esm2022/lib/components/sso/sso.columns.mjs +29 -0
- package/esm2022/lib/components/sso/sso.component.mjs +202 -0
- package/esm2022/lib/components/sso/sso.module.mjs +63 -0
- package/esm2022/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.mjs +34 -4
- package/esm2022/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.mjs +6 -3
- package/esm2022/lib/components/user-request/user-request.component.mjs +23 -11
- package/esm2022/lib/components/user-request-approval/access-request.columns.mjs +24 -0
- package/esm2022/lib/components/user-request-approval/base-table-style.mjs +53 -0
- package/esm2022/lib/components/user-request-approval/helper.mjs +33 -0
- package/esm2022/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.mjs +26 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.component.mjs +247 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.module.mjs +77 -0
- package/esm2022/lib/components/user-request-approval/user-request-approval.service.mjs +50 -0
- package/esm2022/lib/components/user-request-approval/user-request-form/user-request-form.component.mjs +57 -0
- package/esm2022/lib/models/ErrorResponse.mjs +11 -0
- package/esm2022/lib/models/UserRequest.mjs +2 -0
- package/esm2022/lib/models/base.mjs +2 -0
- package/esm2022/lib/models/object-state.mjs +8 -0
- package/esm2022/lib/models/sign-up.mjs +1 -1
- package/esm2022/lib/models/single-sign-on.mjs +2 -0
- package/esm2022/lib/models/user-access-request-status.mjs +7 -0
- package/esm2022/lib/models/user-access-request.mjs +2 -0
- package/esm2022/lib/models/user.mjs +2 -0
- package/esm2022/lib/services/environment.service.mjs +26 -0
- package/esm2022/lib/services/http-web-request.service.mjs +85 -0
- package/esm2022/public-api.mjs +10 -1
- package/fesm2022/verben-authentication-ui.mjs +1370 -44
- package/fesm2022/verben-authentication-ui.mjs.map +1 -1
- package/lib/components/forgot-password/ForgotPasswordData.d.ts +3 -0
- package/lib/components/forgot-password/forgot-password.component.d.ts +21 -0
- package/lib/components/forgot-password/forgot-password.module.d.ts +10 -0
- package/lib/components/otp-input/otp-input.component.d.ts +2 -1
- package/lib/components/reset-password/reset-password.component.d.ts +5 -2
- package/lib/components/sign-in/sign-in.component.d.ts +13 -1
- package/lib/components/sign-up/sign-up.component.d.ts +13 -2
- package/lib/components/sso/base-table-style.d.ts +1 -0
- package/lib/components/sso/helper.d.ts +2 -0
- package/lib/components/sso/sso-form/sso-form.component.d.ts +24 -0
- package/lib/components/sso/sso.columns.d.ts +3 -0
- package/lib/components/sso/sso.component.d.ts +50 -0
- package/lib/components/sso/sso.module.d.ts +11 -0
- package/lib/components/two-factor-auth-otp/two-factor-auth-otp.component.d.ts +12 -2
- package/lib/components/two-factor-auth-setup/two-factor-auth-setup.component.d.ts +2 -1
- package/lib/components/user-request/user-request.component.d.ts +5 -10
- package/lib/components/user-request-approval/access-request.columns.d.ts +3 -0
- package/lib/components/user-request-approval/base-table-style.d.ts +1 -0
- package/lib/components/user-request-approval/helper.d.ts +6 -0
- package/lib/components/user-request-approval/user-access-request-status-badge/user-access-request-status-badge.component.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.component.d.ts +57 -0
- package/lib/components/user-request-approval/user-request-approval.module.d.ts +12 -0
- package/lib/components/user-request-approval/user-request-approval.service.d.ts +18 -0
- package/lib/components/user-request-approval/user-request-form/user-request-form.component.d.ts +20 -0
- package/lib/models/ErrorResponse.d.ts +6 -0
- package/lib/models/UserRequest.d.ts +9 -0
- package/lib/models/base.d.ts +10 -0
- package/lib/models/object-state.d.ts +6 -0
- package/lib/models/sign-up.d.ts +1 -0
- package/lib/models/single-sign-on.d.ts +7 -0
- package/lib/models/user-access-request-status.d.ts +5 -0
- package/lib/models/user-access-request.d.ts +7 -0
- package/lib/models/user.d.ts +18 -0
- package/lib/services/environment.service.d.ts +14 -0
- package/lib/services/http-web-request.service.d.ts +17 -0
- package/package.json +2 -2
- package/public-api.d.ts +9 -0
|
@@ -1,16 +1,133 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
2
|
+
import { InjectionToken, Injectable, Inject, EventEmitter, Component, Input, Output, NgModule, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
5
6
|
import * as i2 from 'verben-ng-ui';
|
|
6
|
-
import { VerbenaInputModule, VerbenaButtonModule, SvgModule } from 'verben-ng-ui';
|
|
7
|
+
import { VerbenaInputModule, VerbenaButtonModule, SvgModule, DataFilterType, DataViewModule, TableFilterModule, SortTableModule, DataExportModule, VisibleColumnModule, CardDataViewModule, VerbenaTextareaModule, DataTableModule, CardModule, VerbenaBadgeModule, DropDownModule } from 'verben-ng-ui';
|
|
7
8
|
import * as i2$1 from '@angular/common';
|
|
8
9
|
import { CommonModule } from '@angular/common';
|
|
9
10
|
import * as i4 from '@angular/router';
|
|
10
11
|
import { RouterLink } from '@angular/router';
|
|
11
12
|
|
|
13
|
+
class ErrorResponse {
|
|
14
|
+
ErrorMsg;
|
|
15
|
+
StatusCode;
|
|
16
|
+
FullLog;
|
|
17
|
+
constructor(ErrorMsg, StatusCode, FullLog) {
|
|
18
|
+
this.ErrorMsg = ErrorMsg;
|
|
19
|
+
this.StatusCode = StatusCode;
|
|
20
|
+
this.FullLog = FullLog;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// In your library's services/environment.service.ts
|
|
25
|
+
// import { ENVIRONMENT } from '../models/ENVIRONMENT_TOKEN';
|
|
26
|
+
const ENVIRONMENT = new InjectionToken('environment');
|
|
27
|
+
class EnvironmentService {
|
|
28
|
+
env;
|
|
29
|
+
constructor(env) {
|
|
30
|
+
this.env = env;
|
|
31
|
+
}
|
|
32
|
+
get environment() {
|
|
33
|
+
return this.env;
|
|
34
|
+
}
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: EnvironmentService, deps: [{ token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{
|
|
41
|
+
providedIn: 'root',
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
44
|
+
type: Inject,
|
|
45
|
+
args: [ENVIRONMENT]
|
|
46
|
+
}] }] });
|
|
47
|
+
|
|
48
|
+
class HttpWebRequestService {
|
|
49
|
+
http;
|
|
50
|
+
envSvc;
|
|
51
|
+
isProd = false;
|
|
52
|
+
constructor(http, envSvc) {
|
|
53
|
+
this.http = http;
|
|
54
|
+
this.envSvc = envSvc;
|
|
55
|
+
this.isProd = this.envSvc.environment.production;
|
|
56
|
+
}
|
|
57
|
+
get(url, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
58
|
+
const URL = baseUrl + `/${url}`;
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
this.http
|
|
61
|
+
.get(URL, {
|
|
62
|
+
headers: {
|
|
63
|
+
'Content-Type': 'application/json',
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
.subscribe({
|
|
67
|
+
next: (data) => resolve(data),
|
|
68
|
+
error: (err) => resolve(new ErrorResponse(err.error
|
|
69
|
+
? err.error.ErrorMsg
|
|
70
|
+
? err.error.ErrorMsg
|
|
71
|
+
: err.error.errors
|
|
72
|
+
? err.error.errors.values.toString()
|
|
73
|
+
: ''
|
|
74
|
+
: err.status + ' ' + err.statusText)),
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
post(url, body, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
79
|
+
return new Promise((resolve, reject) => {
|
|
80
|
+
this.http
|
|
81
|
+
.post(baseUrl + '/' + url, JSON.stringify(body), {
|
|
82
|
+
headers: {
|
|
83
|
+
'Content-Type': 'application/json',
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
.subscribe({
|
|
87
|
+
next: (data) => resolve(data),
|
|
88
|
+
error: (err) => resolve(new ErrorResponse(err.error
|
|
89
|
+
? err.error.ErrorMsg
|
|
90
|
+
? err.error.ErrorMsg
|
|
91
|
+
: err.error.errors
|
|
92
|
+
? err.error.errors.values.toString()
|
|
93
|
+
: ''
|
|
94
|
+
: err.status + ' ' + err.statusText)),
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
postFile(url, formData, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
this.http.post(baseUrl + '/' + url, formData).subscribe({
|
|
101
|
+
next: (data) => resolve(data),
|
|
102
|
+
error: (err) => resolve(new ErrorResponse(err.error
|
|
103
|
+
? err.error.ErrorMsg
|
|
104
|
+
? err.error.ErrorMsg
|
|
105
|
+
: err.error.errors
|
|
106
|
+
? err.error.errors.values.toString()
|
|
107
|
+
: ''
|
|
108
|
+
: err.status + ' ' + err.statusText)),
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
put(url, body, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
113
|
+
return this.http.put(baseUrl + '/' + url, body);
|
|
114
|
+
}
|
|
115
|
+
delete(url, baseUrl = this.envSvc.environment.AuthenticationAPI) {
|
|
116
|
+
return this.http.delete(baseUrl + '/' + url);
|
|
117
|
+
}
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: HttpWebRequestService, deps: [{ token: i1.HttpClient }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
119
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: HttpWebRequestService, providedIn: 'root' });
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: HttpWebRequestService, decorators: [{
|
|
122
|
+
type: Injectable,
|
|
123
|
+
args: [{
|
|
124
|
+
providedIn: 'root',
|
|
125
|
+
}]
|
|
126
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: EnvironmentService }] });
|
|
127
|
+
|
|
12
128
|
class ResetPasswordComponent {
|
|
13
129
|
fb;
|
|
130
|
+
req;
|
|
14
131
|
title = 'Reset Password';
|
|
15
132
|
subTitle = 'Create a New Password';
|
|
16
133
|
buttonCaption = 'Submit';
|
|
@@ -18,9 +135,11 @@ class ResetPasswordComponent {
|
|
|
18
135
|
buttonBackgroundColor;
|
|
19
136
|
showOldPassword = false;
|
|
20
137
|
onSubmit = new EventEmitter();
|
|
138
|
+
onSubmitResponseEnd = new EventEmitter();
|
|
21
139
|
resetPasswordForm;
|
|
22
|
-
constructor(fb) {
|
|
140
|
+
constructor(fb, req) {
|
|
23
141
|
this.fb = fb;
|
|
142
|
+
this.req = req;
|
|
24
143
|
this.resetPasswordForm = this.fb.group({
|
|
25
144
|
OldPassword: new FormControl(null, this.oldPasswordValidator.bind(this)),
|
|
26
145
|
Password: new FormControl(null, Validators.required),
|
|
@@ -59,14 +178,15 @@ class ResetPasswordComponent {
|
|
|
59
178
|
ConfirmPassword: this.resetPasswordForm.controls['ConfirmPassword'].value,
|
|
60
179
|
};
|
|
61
180
|
this.onSubmit.emit(data);
|
|
181
|
+
this.onSubmitResponseEnd.emit('');
|
|
62
182
|
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ResetPasswordComponent, selector: "verben-reset-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor", showOldPassword: "showOldPassword" }, outputs: { onSubmit: "onSubmit" }, ngImport: i0, template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"ConfirmPassword\"
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ResetPasswordComponent, selector: "verben-reset-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor", showOldPassword: "showOldPassword" }, outputs: { onSubmit: "onSubmit", onSubmitResponseEnd: "onSubmitResponseEnd" }, ngImport: i0, template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
65
185
|
}
|
|
66
186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ResetPasswordComponent, decorators: [{
|
|
67
187
|
type: Component,
|
|
68
|
-
args: [{ selector: 'verben-reset-password', template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input borderRadius=\"12px\" formControlName=\"ConfirmPassword\"
|
|
69
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { title: [{
|
|
188
|
+
args: [{ selector: 'verben-reset-password', template: "<div [formGroup]=\"this.resetPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div *ngIf=\"showOldPassword\" class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Old Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"OldPassword\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">New Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Password\" type=\"password\"></verbena-input>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Confirm Password</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"ConfirmPassword\"\n type=\"password\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"] }]
|
|
189
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: HttpWebRequestService }], propDecorators: { title: [{
|
|
70
190
|
type: Input
|
|
71
191
|
}], subTitle: [{
|
|
72
192
|
type: Input
|
|
@@ -80,6 +200,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
80
200
|
type: Input
|
|
81
201
|
}], onSubmit: [{
|
|
82
202
|
type: Output
|
|
203
|
+
}], onSubmitResponseEnd: [{
|
|
204
|
+
type: Output
|
|
83
205
|
}] } });
|
|
84
206
|
|
|
85
207
|
class ResetPasswordModule {
|
|
@@ -110,6 +232,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
110
232
|
}]
|
|
111
233
|
}] });
|
|
112
234
|
|
|
235
|
+
var ObjectState;
|
|
236
|
+
(function (ObjectState) {
|
|
237
|
+
ObjectState["New"] = "New";
|
|
238
|
+
ObjectState["Changed"] = "Changed";
|
|
239
|
+
ObjectState["Unchanged"] = "Unchanged";
|
|
240
|
+
ObjectState["Removed"] = "Removed";
|
|
241
|
+
})(ObjectState || (ObjectState = {}));
|
|
242
|
+
|
|
113
243
|
class UserRequestComponent {
|
|
114
244
|
fb;
|
|
115
245
|
width = '500px';
|
|
@@ -137,16 +267,17 @@ class UserRequestComponent {
|
|
|
137
267
|
formSubmit = new EventEmitter();
|
|
138
268
|
googleClick = new EventEmitter();
|
|
139
269
|
appleClick = new EventEmitter();
|
|
270
|
+
onSubmitResponseEnd = new EventEmitter();
|
|
140
271
|
userRequestForm;
|
|
141
272
|
constructor(fb) {
|
|
142
273
|
this.fb = fb;
|
|
143
274
|
this.userRequestForm = this.fb.group({
|
|
144
275
|
FirstName: [null, [Validators.required]],
|
|
145
276
|
LastName: [null, [Validators.required]],
|
|
146
|
-
|
|
277
|
+
Email: [null, [Validators.required, Validators.email]],
|
|
147
278
|
Password: [null, [Validators.required, Validators.minLength(8)]],
|
|
148
279
|
ConfirmPassword: [null, [Validators.required]],
|
|
149
|
-
Terms: [
|
|
280
|
+
Terms: [false, Validators.requiredTrue]
|
|
150
281
|
}, { validators: this.passwordMatchValidator });
|
|
151
282
|
}
|
|
152
283
|
passwordMatchValidator(control) {
|
|
@@ -178,26 +309,34 @@ class UserRequestComponent {
|
|
|
178
309
|
handleAppleAuth() {
|
|
179
310
|
this.appleClick.emit();
|
|
180
311
|
}
|
|
181
|
-
submitForm() {
|
|
312
|
+
async submitForm() {
|
|
182
313
|
if (!this.checkForm()) {
|
|
183
314
|
return;
|
|
184
315
|
}
|
|
185
|
-
|
|
316
|
+
const payload = {
|
|
186
317
|
FirstName: this.userRequestForm.controls["FirstName"].value,
|
|
187
318
|
LastName: this.userRequestForm.controls["LastName"].value,
|
|
188
|
-
|
|
319
|
+
Email: this.userRequestForm.controls["Email"].value,
|
|
189
320
|
Password: this.userRequestForm.controls["Password"].value,
|
|
190
321
|
ConfirmPassword: this.userRequestForm.controls["ConfirmPassword"].value,
|
|
191
|
-
Terms: this.userRequestForm.controls["
|
|
192
|
-
|
|
322
|
+
Terms: this.userRequestForm.controls["Terms"].value,
|
|
323
|
+
UpdatedAt: new Date(),
|
|
324
|
+
CreatedAt: new Date(),
|
|
325
|
+
Id: "",
|
|
326
|
+
State: ObjectState.New,
|
|
327
|
+
Tenant: "",
|
|
328
|
+
id: ""
|
|
329
|
+
};
|
|
330
|
+
this.formSubmit.emit(payload);
|
|
331
|
+
this.onSubmitResponseEnd.emit("");
|
|
193
332
|
}
|
|
194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UserRequestComponent, selector: "lib-user-request", inputs: { width: "width", headingTitle: "headingTitle", headingClass: "headingClass", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", text: "text", color: "color", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"
|
|
333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
334
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UserRequestComponent, selector: "lib-user-request", inputs: { width: "width", headingTitle: "headingTitle", headingClass: "headingClass", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", pd: "pd", text: "text", color: "color", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnBgColor: "btnBgColor", btnWidth: "btnWidth", btnPd: "btnPd", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", appleClick: "appleClick", onSubmitResponseEnd: "onSubmitResponseEnd" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <p class=\"text-[#666666] text-sm\">\n <input formControlName=\"Terms\" class=\"accent\" type=\"checkbox\" />\n By creating an account, I agree to our<br />\n <a [attr.href]=\"termsLink\" class=\"text-black text-sm font-[500] underline\"\n >Terms of use</a\n >\n and\n <a [attr.href]=\"privacyLink\" class=\"text-black font-[500] text-sm underline\"\n >Privacy Policy\n </a>\n <p *ngIf=\"userRequestForm.controls['Terms'].invalid && userRequestForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n \n <verbena-button\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"submitForm()\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
196
335
|
}
|
|
197
336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestComponent, decorators: [{
|
|
198
337
|
type: Component,
|
|
199
|
-
args: [{ selector: 'lib-user-request', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"
|
|
200
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { width: [{
|
|
338
|
+
args: [{ selector: 'lib-user-request', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{ headingClass }}\">\n {{ headingTitle }}\n </h2>\n\n <form\n [formGroup]=\"userRequestForm\"\n (ngSubmit)=\"submitForm()\"\n class=\"flex flex-col gap-5 mt-3\"\n >\n <verbena-input\n [label]=\"'First Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"FirstName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last Name'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"LastName\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'E-mail Address'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [customErrorMessages]=\"{\n required: 'Email address is required',\n email: 'Email address must be valid'\n }\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n formControlName=\"Password\"\n [required]=\"true\"\n [type]=\"'password'\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"'#666'\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"ConfirmPassword\"\n [showBorder]=\"true\"\n [bgColor]=\"'white'\"\n [minLength]=\"userRequestForm.controls['Password'].value?.length\"\n [border]=\"'1px solid #66666659'\"\n [borderRadius]=\"'12px'\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [customErrorMessages]=\"{\n minLength:'Confirm Password must match password',\n required: 'Confirm Password is required and must match password',\n password: 'Password does not match',\n }\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n\n <p class=\"text-[#666666] text-sm\">\n <input formControlName=\"Terms\" class=\"accent\" type=\"checkbox\" />\n By creating an account, I agree to our<br />\n <a [attr.href]=\"termsLink\" class=\"text-black text-sm font-[500] underline\"\n >Terms of use</a\n >\n and\n <a [attr.href]=\"privacyLink\" class=\"text-black font-[500] text-sm underline\"\n >Privacy Policy\n </a>\n <p *ngIf=\"userRequestForm.controls['Terms'].invalid && userRequestForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n \n <verbena-button\n [disable]=\"!this.checkForm()\"\n [text]=\"text\"\n [bgColor]=\"btnBgColor\"\n [textColor]=\"color\"\n [buttonClass]=\"'cursor-not-allowed'\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [pd]=\"btnPd\"\n (click)=\"submitForm()\"\n [ngClass]=\"{\n 'cursor-not-allowed':!checkForm()\n }\"\n [width]=\"btnWidth\"\n buttonClass=\"font-medium text-[22px] leading-[33px]\"\n ></verbena-button>\n <div class=\"flex justify-center items-center OR\">\n <span></span>\n OR\n <span></span>\n </div>\n\n <verbena-button\n svg=\"google-logo\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n (click)=\"handleGoogleAuth()\"\n text=\"Continue with Google\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n ></verbena-button>\n\n <verbena-button\n svg=\"apple-logo\"\n (click)=\"handleAppleAuth()\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with Apple\"\n bgColor=\"white\"\n textColor=\"black\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333] mt-2\"\n ></verbena-button>\n </form>\n</section>\n", styles: [".flex{display:flex}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.justify-center{justify-content:center}.h-full{height:100%}.text-center{text-align:center}.underline{text-decoration:underline}.gap-5{gap:20px}.mt-4{margin-top:1rem}.space-y-4>:not([hidden])~:not([hidden]){margin-top:1rem}.gap-1>:not([hidden])~:not([hidden]){gap:.25rem}.pt-3{padding-top:.75rem}.mt-5{margin-top:1.25rem}.border{border-width:1px}.rounded-xl{border-radius:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.flex-col{flex-direction:column}.object-cover{object-fit:cover}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed!important}.accent{accent-color:#000}.OR{color:#666;gap:6px}.OR span{width:150px;border-top:2px solid #6666663d;display:block}\n"] }]
|
|
339
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { width: [{
|
|
201
340
|
type: Input
|
|
202
341
|
}], headingTitle: [{
|
|
203
342
|
type: Input
|
|
@@ -245,6 +384,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
245
384
|
type: Output
|
|
246
385
|
}], appleClick: [{
|
|
247
386
|
type: Output
|
|
387
|
+
}], onSubmitResponseEnd: [{
|
|
388
|
+
type: Output
|
|
248
389
|
}] } });
|
|
249
390
|
|
|
250
391
|
class UserRequestModule {
|
|
@@ -485,9 +626,21 @@ class SignUpComponent {
|
|
|
485
626
|
border = '1px solid #66666680';
|
|
486
627
|
borderRadius = '24px';
|
|
487
628
|
height = 'auto';
|
|
488
|
-
priColor = '#FFE681';
|
|
489
629
|
textColor = '#333';
|
|
490
630
|
disabled = false;
|
|
631
|
+
// button styles
|
|
632
|
+
btnClass = '';
|
|
633
|
+
btnBgColor = '#FFE681';
|
|
634
|
+
btnColor = '';
|
|
635
|
+
btnBorder = '';
|
|
636
|
+
btnBorderRadius = '24px';
|
|
637
|
+
btnPd = '';
|
|
638
|
+
btnText = 'Create account';
|
|
639
|
+
//inputStyles
|
|
640
|
+
inputLabelColor = '';
|
|
641
|
+
inputBgColor = 'transparent';
|
|
642
|
+
inputBorder = '1px solid #66666659';
|
|
643
|
+
inputBorderRadius = '12px';
|
|
491
644
|
// links
|
|
492
645
|
termsLink = '';
|
|
493
646
|
privacyLink = '';
|
|
@@ -509,9 +662,18 @@ class SignUpComponent {
|
|
|
509
662
|
Validators.required,
|
|
510
663
|
Validators.minLength(8),
|
|
511
664
|
]),
|
|
665
|
+
Confirmpassword: new FormControl(null, [
|
|
666
|
+
Validators.required,
|
|
667
|
+
Validators.minLength(8),
|
|
668
|
+
]),
|
|
512
669
|
Terms: new FormControl(false, [Validators.requiredTrue]),
|
|
513
|
-
});
|
|
670
|
+
}, { validators: this.passwordMatchValidator });
|
|
514
671
|
}
|
|
672
|
+
passwordMatchValidator = (group) => {
|
|
673
|
+
const password = group.get('Password')?.value;
|
|
674
|
+
const confirmPassword = group.get('Confirmpassword')?.value;
|
|
675
|
+
return password === confirmPassword ? null : { passwordMismatch: true };
|
|
676
|
+
};
|
|
515
677
|
checkForm() {
|
|
516
678
|
return this.signUpForm.valid;
|
|
517
679
|
}
|
|
@@ -524,6 +686,7 @@ class SignUpComponent {
|
|
|
524
686
|
Lastname: this.signUpForm.controls['Lastname'].value,
|
|
525
687
|
Email: this.signUpForm.controls['Email'].value,
|
|
526
688
|
Password: this.signUpForm.controls['Password'].value,
|
|
689
|
+
Confirmpassword: this.signUpForm.controls['Confirmpassword'].value,
|
|
527
690
|
Terms: this.signUpForm.controls['Terms'].value,
|
|
528
691
|
};
|
|
529
692
|
this.formSubmit.emit(data);
|
|
@@ -548,13 +711,13 @@ class SignUpComponent {
|
|
|
548
711
|
'padding': this.pd
|
|
549
712
|
};
|
|
550
713
|
}
|
|
551
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignUpComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SignUpComponent, selector: "verben-sign-up", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", height: "height",
|
|
714
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignUpComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
715
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SignUpComponent, selector: "verben-sign-up", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", headlingClass: "headlingClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", height: "height", textColor: "textColor", disabled: "disabled", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsLink: "termsLink", privacyLink: "privacyLink", routerLink: "routerLink" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", outputs: ["googleClick", "appleClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
553
716
|
}
|
|
554
717
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignUpComponent, decorators: [{
|
|
555
718
|
type: Component,
|
|
556
|
-
args: [{ selector: 'verben-sign-up', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"
|
|
557
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { headlingText: [{
|
|
719
|
+
args: [{ selector: 'verben-sign-up', template: "<section [ngStyle]=\"styles\" class=\"{{ customClass }}\">\n <h2 class=\"{{headlingClass}}\">\n {{headlingText}}\n </h2>\n <form [formGroup]=\"signUpForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\">\n <verbena-input\n [label]=\"'First name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Firstname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'First name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Last name'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'text'\"\n formControlName=\"Lastname\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n [customErrorMessages]=\"{required:'Last name is required'}\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Confirm Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Confirmpassword\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"false\"\n [errorBorderColor]=\"'red'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <span *ngIf=\"signUpForm.hasError('passwordMismatch') && signUpForm.get('Confirmpassword')?.dirty\"> \n <small class=\"error-text\">Passwords do not match.</small>\n </span>\n </div>\n <div> \n <div class=\"checkBoxWrapper\">\n <input type=\"checkbox\" id=\"terms\" formControlName=\"Terms\" class=\"checBoxInput\" />\n <label for=\"terms\" \n class=\"break-all font-normal leading-6\"\n >By creating an account, I agree to our <a [attr.href]=\"termsLink\">Terms of use</a> and\n <a [attr.href]=\"privacyLink\">Privacy Policy</a></label\n >\n </div>\n <p *ngIf=\"signUpForm.controls['Terms'].invalid && signUpForm.controls['Terms'].touched\">\n <small class=\"error-text\">Please agree to the terms of use and privacy policy.</small>\n </p>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\"\n [disabled]=\"!this.checkForm()\"\n [ngStyle]=\"{'margin-top':'10px'}\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n <p>\n Already have an account?\n <a [routerLink]=\"routerLink\" class=\"\">Log in</a>\n </p>\n </form>\n </section>\n \n", styles: ["a{text-decoration:underline;cursor:pointer}input[type=checkbox]:checked{accent-color:#111}.flexWrapper{display:flex;flex-direction:column;gap:10px}.checkBoxWrapper{display:flex;align-items:start;gap:2px}.checBoxInput{margin-top:6px}.bigcheckboxWrapper{margin-top:.5rem;margin-bottom:1.5rem}.error-text{color:red}.disable-btn{cursor:not-allowed}\n"] }]
|
|
720
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { headlingText: [{
|
|
558
721
|
type: Input
|
|
559
722
|
}], width: [{
|
|
560
723
|
type: Input
|
|
@@ -578,12 +741,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
578
741
|
type: Input
|
|
579
742
|
}], height: [{
|
|
580
743
|
type: Input
|
|
581
|
-
}], priColor: [{
|
|
582
|
-
type: Input
|
|
583
744
|
}], textColor: [{
|
|
584
745
|
type: Input
|
|
585
746
|
}], disabled: [{
|
|
586
747
|
type: Input
|
|
748
|
+
}], btnClass: [{
|
|
749
|
+
type: Input
|
|
750
|
+
}], btnBgColor: [{
|
|
751
|
+
type: Input
|
|
752
|
+
}], btnColor: [{
|
|
753
|
+
type: Input
|
|
754
|
+
}], btnBorder: [{
|
|
755
|
+
type: Input
|
|
756
|
+
}], btnBorderRadius: [{
|
|
757
|
+
type: Input
|
|
758
|
+
}], btnPd: [{
|
|
759
|
+
type: Input
|
|
760
|
+
}], btnText: [{
|
|
761
|
+
type: Input
|
|
762
|
+
}], inputLabelColor: [{
|
|
763
|
+
type: Input
|
|
764
|
+
}], inputBgColor: [{
|
|
765
|
+
type: Input
|
|
766
|
+
}], inputBorder: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], inputBorderRadius: [{
|
|
769
|
+
type: Input
|
|
587
770
|
}], termsLink: [{
|
|
588
771
|
type: Input
|
|
589
772
|
}], privacyLink: [{
|
|
@@ -642,7 +825,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
642
825
|
|
|
643
826
|
class SignInComponent {
|
|
644
827
|
fb;
|
|
645
|
-
headlingText = '
|
|
828
|
+
headlingText = 'Sign in';
|
|
646
829
|
width = '';
|
|
647
830
|
maxWidth = '';
|
|
648
831
|
margin = '';
|
|
@@ -657,6 +840,20 @@ class SignInComponent {
|
|
|
657
840
|
routerLink = '';
|
|
658
841
|
forgetPasswordClass = '';
|
|
659
842
|
headlingClass = '';
|
|
843
|
+
// button styles
|
|
844
|
+
btnClass = '';
|
|
845
|
+
btnBgColor = '#FFE681';
|
|
846
|
+
btnColor = '';
|
|
847
|
+
btnBorder = '';
|
|
848
|
+
btnBorderRadius = '24px';
|
|
849
|
+
btnPd = '';
|
|
850
|
+
btnText = 'Log in';
|
|
851
|
+
//inputStyles
|
|
852
|
+
inputLabelColor = '';
|
|
853
|
+
inputBgColor = 'transparent';
|
|
854
|
+
inputBorder = '1px solid #66666659';
|
|
855
|
+
inputBorderRadius = '12px';
|
|
856
|
+
termsErrorText = 'Please agree to the terms of use and privacy policy.';
|
|
660
857
|
formSubmit = new EventEmitter();
|
|
661
858
|
googleClick = new EventEmitter();
|
|
662
859
|
appleClick = new EventEmitter();
|
|
@@ -707,13 +904,13 @@ class SignInComponent {
|
|
|
707
904
|
'padding': this.pd
|
|
708
905
|
};
|
|
709
906
|
}
|
|
710
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignInComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
711
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SignInComponent, selector: "verben-sign-in", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", routerLink: "routerLink", forgetPasswordClass: "forgetPasswordClass", headlingClass: "headlingClass" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"
|
|
907
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignInComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
908
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SignInComponent, selector: "verben-sign-in", inputs: { headlingText: "headlingText", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", customClass: "customClass", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", routerLink: "routerLink", forgetPasswordClass: "forgetPasswordClass", headlingClass: "headlingClass", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText", inputLabelColor: "inputLabelColor", inputBgColor: "inputBgColor", inputBorder: "inputBorder", inputBorderRadius: "inputBorderRadius", termsErrorText: "termsErrorText" }, outputs: { formSubmit: "formSubmit", googleClick: "googleClick", appleClick: "appleClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"routerLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.pwdWrapper{display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: OAuthComponent, selector: "verben-o-auth", outputs: ["googleClick", "appleClick"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
712
909
|
}
|
|
713
910
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SignInComponent, decorators: [{
|
|
714
911
|
type: Component,
|
|
715
|
-
args: [{ selector: 'verben-sign-in', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"
|
|
716
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { headlingText: [{
|
|
912
|
+
args: [{ selector: 'verben-sign-in', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h2 class=\"{{headlingClass}}\">{{headlingText}}</h2>\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"submit()\" class=\"flexWrapper\"> \n <verbena-input\n [label]=\"'Email'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'email'\"\n formControlName=\"Email\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div> \n <verbena-input\n [label]=\"'Password'\"\n [labelColor]=\"inputLabelColor\"\n [placeHolder]=\"''\"\n [required]=\"true\"\n [type]=\"'password'\"\n formControlName=\"Password\"\n [showBorder]=\"true\"\n [bgColor]=\"inputBgColor\"\n [border]=\"inputBorder\"\n [borderRadius]=\"inputBorderRadius\"\n [showErrorMessage]=\"true\"\n [errorMessageColor]=\"'red'\"\n [errorBorderColor]=\"'red'\"\n [errorPosition]=\"'bottom'\"\n class=\"outline-none focus-none\"\n ></verbena-input>\n <div class=\"pwdWrapper\"> \n <p clas=\"mb-0\"> <a [routerLink]=\"routerLink\" class=\"{{forgetPasswordClass}}\">Forgot password</a></p>\n </div>\n </div>\n\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n type=\"submit\" \n [disabled]=\"!this.checkForm()\"\n ></lib-button>\n <verben-o-auth \n (googleClick)=\"handleGoogleAuth()\"\n (appleClick)=\"handleAppleAuth()\"\n ></verben-o-auth>\n </form>\n </section>\n ", styles: ["a{text-decoration:underline}.flexWrapper{display:flex;flex-direction:column;gap:20px;margin-top:12px}.pwdWrapper{display:flex;justify-content:flex-end}\n"] }]
|
|
913
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { headlingText: [{
|
|
717
914
|
type: Input
|
|
718
915
|
}], width: [{
|
|
719
916
|
type: Input
|
|
@@ -743,6 +940,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
743
940
|
type: Input
|
|
744
941
|
}], headlingClass: [{
|
|
745
942
|
type: Input
|
|
943
|
+
}], btnClass: [{
|
|
944
|
+
type: Input
|
|
945
|
+
}], btnBgColor: [{
|
|
946
|
+
type: Input
|
|
947
|
+
}], btnColor: [{
|
|
948
|
+
type: Input
|
|
949
|
+
}], btnBorder: [{
|
|
950
|
+
type: Input
|
|
951
|
+
}], btnBorderRadius: [{
|
|
952
|
+
type: Input
|
|
953
|
+
}], btnPd: [{
|
|
954
|
+
type: Input
|
|
955
|
+
}], btnText: [{
|
|
956
|
+
type: Input
|
|
957
|
+
}], inputLabelColor: [{
|
|
958
|
+
type: Input
|
|
959
|
+
}], inputBgColor: [{
|
|
960
|
+
type: Input
|
|
961
|
+
}], inputBorder: [{
|
|
962
|
+
type: Input
|
|
963
|
+
}], inputBorderRadius: [{
|
|
964
|
+
type: Input
|
|
965
|
+
}], termsErrorText: [{
|
|
966
|
+
type: Input
|
|
746
967
|
}], formSubmit: [{
|
|
747
968
|
type: Output
|
|
748
969
|
}], googleClick: [{
|
|
@@ -768,6 +989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
768
989
|
class OtpInputComponent {
|
|
769
990
|
fb;
|
|
770
991
|
length = 6;
|
|
992
|
+
otpClass = '';
|
|
771
993
|
otpChange = new EventEmitter();
|
|
772
994
|
otpForm;
|
|
773
995
|
constructor(fb) {
|
|
@@ -816,13 +1038,15 @@ class OtpInputComponent {
|
|
|
816
1038
|
const otp = this.otpArray.value.join('');
|
|
817
1039
|
this.otpChange.emit(otp);
|
|
818
1040
|
}
|
|
819
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: OtpInputComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
820
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: OtpInputComponent, selector: "verben-otp-input", inputs: { length: "length" }, outputs: { otpChange: "otpChange" }, ngImport: i0, template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
|
|
1041
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: OtpInputComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1042
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: OtpInputComponent, selector: "verben-otp-input", inputs: { length: "length", otpClass: "otpClass" }, outputs: { otpChange: "otpChange" }, ngImport: i0, template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
|
|
821
1043
|
}
|
|
822
1044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: OtpInputComponent, decorators: [{
|
|
823
1045
|
type: Component,
|
|
824
|
-
args: [{ selector: 'verben-otp-input', template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"] }]
|
|
825
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { length: [{
|
|
1046
|
+
args: [{ selector: 'verben-otp-input', template: "<form [formGroup]=\"otpForm\" >\n <div formArrayName=\"otpArray\" class=\"otp-container\">\n <input\n *ngFor=\"let control of otpArray.controls; let i = index\"\n [id]=\"'otp-input-' + i\"\n class=\"otp-input {{otpClass}}\"\n maxlength=\"1\"\n (input)=\"handleInput($event, i)\"\n (keydown)=\"handleKeydown($event, i)\"\n [formControlName]=\"i\"\n type=\"text\"\n />\n </div>\n</form>\n", styles: [".otp-container{display:flex;gap:15px}.otp-input{width:50px;height:46px;text-align:center;font-size:1.5rem;border:1px solid #66666658;border-radius:12px}.otp-input:focus{border-color:#ffe681;outline:none}\n"] }]
|
|
1047
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { length: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}], otpClass: [{
|
|
826
1050
|
type: Input
|
|
827
1051
|
}], otpChange: [{
|
|
828
1052
|
type: Output
|
|
@@ -832,6 +1056,7 @@ class TwoFactorAuthOtpComponent {
|
|
|
832
1056
|
fb;
|
|
833
1057
|
customClass = '';
|
|
834
1058
|
headlingClass = '';
|
|
1059
|
+
headlingText = 'Two Factor Authentication';
|
|
835
1060
|
paragraphClass = '';
|
|
836
1061
|
resendClass = '';
|
|
837
1062
|
width = '';
|
|
@@ -844,6 +1069,15 @@ class TwoFactorAuthOtpComponent {
|
|
|
844
1069
|
borderRadius = '24px';
|
|
845
1070
|
textColor = '#333';
|
|
846
1071
|
height = 'auto';
|
|
1072
|
+
length = 6;
|
|
1073
|
+
otpClass = '';
|
|
1074
|
+
btnClass = '';
|
|
1075
|
+
btnBgColor = '#FFE681';
|
|
1076
|
+
btnColor = '';
|
|
1077
|
+
btnBorder = '';
|
|
1078
|
+
btnBorderRadius = '24px';
|
|
1079
|
+
btnPd = '';
|
|
1080
|
+
btnText = 'Submit';
|
|
847
1081
|
otpValue = '';
|
|
848
1082
|
otpForm;
|
|
849
1083
|
buttonClick = new EventEmitter();
|
|
@@ -859,7 +1093,7 @@ class TwoFactorAuthOtpComponent {
|
|
|
859
1093
|
onOtpChange(value) {
|
|
860
1094
|
this.otpForm.get('otpValue')?.setValue(value);
|
|
861
1095
|
}
|
|
862
|
-
|
|
1096
|
+
submitData() {
|
|
863
1097
|
if (this.otpForm.valid) {
|
|
864
1098
|
this.buttonClick.emit(this.otpForm.get('otpValue')?.value);
|
|
865
1099
|
}
|
|
@@ -881,16 +1115,18 @@ class TwoFactorAuthOtpComponent {
|
|
|
881
1115
|
'padding': this.pd
|
|
882
1116
|
};
|
|
883
1117
|
}
|
|
884
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TwoFactorAuthOtpComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
885
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: TwoFactorAuthOtpComponent, selector: "verben-auth-otp", inputs: { customClass: "customClass", headlingClass: "headlingClass", paragraphClass: "paragraphClass", resendClass: "resendClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { buttonClick: "buttonClick", resend: "resend" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">
|
|
1118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TwoFactorAuthOtpComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: TwoFactorAuthOtpComponent, selector: "verben-auth-otp", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", resendClass: "resendClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height", length: "length", otpClass: "otpClass", btnClass: "btnClass", btnBgColor: "btnBgColor", btnColor: "btnColor", btnBorder: "btnBorder", btnBorderRadius: "btnBorderRadius", btnPd: "btnPd", btnText: "btnText" }, outputs: { buttonClick: "buttonClick", resend: "resend" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to your phone number</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["text", "color", "border", "borderRadius", "bgColor", "width", "pd", "buttonClass", "disabled"], outputs: ["buttonClick"] }, { kind: "component", type: OtpInputComponent, selector: "verben-otp-input", inputs: ["length", "otpClass"], outputs: ["otpChange"] }] });
|
|
886
1120
|
}
|
|
887
1121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TwoFactorAuthOtpComponent, decorators: [{
|
|
888
1122
|
type: Component,
|
|
889
|
-
args: [{ selector: 'verben-auth-otp', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">
|
|
890
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { customClass: [{
|
|
1123
|
+
args: [{ selector: 'verben-auth-otp', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"otpWrapper\"> \n <p class=\"{{paragraphClass}}\">Enter the {{length}} digit code sent to your phone number</p>\n <verben-otp-input \n [length]=\"length\" \n (otpChange)=\"onOtpChange($event)\"\n [otpClass]=\"otpClass\"\n ></verben-otp-input>\n </div>\n <lib-button \n [buttonClass]=\"btnClass\"\n [color]=\"btnColor\"\n [border]=\"btnBorder\"\n [borderRadius]=\"btnBorderRadius\"\n [bgColor]=\"btnBgColor\"\n [pd]=\"btnPd\"\n [text]=\"btnText\" \n (buttonClick)=\"submitData()\"\n [disabled]=\"!otpForm.valid\"\n ></lib-button>\n <p class=\"resendWrapper\">\n Didn\u2019t get a code?\n <a class=\"{{resendClass}}\" (click)=\"resendOtp()\">Resend</a>\n </p>\n \n</section>", styles: [".otpWrapper{margin-bottom:20px;margin-top:15px}.resendWrapper{margin-top:10px;margin-bottom:0!important}\n"] }]
|
|
1124
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { customClass: [{
|
|
891
1125
|
type: Input
|
|
892
1126
|
}], headlingClass: [{
|
|
893
1127
|
type: Input
|
|
1128
|
+
}], headlingText: [{
|
|
1129
|
+
type: Input
|
|
894
1130
|
}], paragraphClass: [{
|
|
895
1131
|
type: Input
|
|
896
1132
|
}], resendClass: [{
|
|
@@ -915,6 +1151,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
915
1151
|
type: Input
|
|
916
1152
|
}], height: [{
|
|
917
1153
|
type: Input
|
|
1154
|
+
}], length: [{
|
|
1155
|
+
type: Input
|
|
1156
|
+
}], otpClass: [{
|
|
1157
|
+
type: Input
|
|
1158
|
+
}], btnClass: [{
|
|
1159
|
+
type: Input
|
|
1160
|
+
}], btnBgColor: [{
|
|
1161
|
+
type: Input
|
|
1162
|
+
}], btnColor: [{
|
|
1163
|
+
type: Input
|
|
1164
|
+
}], btnBorder: [{
|
|
1165
|
+
type: Input
|
|
1166
|
+
}], btnBorderRadius: [{
|
|
1167
|
+
type: Input
|
|
1168
|
+
}], btnPd: [{
|
|
1169
|
+
type: Input
|
|
1170
|
+
}], btnText: [{
|
|
1171
|
+
type: Input
|
|
918
1172
|
}], buttonClick: [{
|
|
919
1173
|
type: Output
|
|
920
1174
|
}], resend: [{
|
|
@@ -952,6 +1206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
952
1206
|
class TwoFactorAuthSetupComponent {
|
|
953
1207
|
customClass = '';
|
|
954
1208
|
headlingClass = '';
|
|
1209
|
+
headlingText = 'Set Up Two Factor Authentication';
|
|
955
1210
|
paragraphClass = '';
|
|
956
1211
|
buttonClass = '';
|
|
957
1212
|
width = '';
|
|
@@ -991,15 +1246,17 @@ class TwoFactorAuthSetupComponent {
|
|
|
991
1246
|
};
|
|
992
1247
|
}
|
|
993
1248
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TwoFactorAuthSetupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
994
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: TwoFactorAuthSetupComponent, selector: "verben-two-factor-auth-setup", inputs: { customClass: "customClass", headlingClass: "headlingClass", paragraphClass: "paragraphClass", buttonClass: "buttonClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { smsClick: "smsClick", mailClick: "mailClick", skipClick: "skipClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">
|
|
1249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: TwoFactorAuthSetupComponent, selector: "verben-two-factor-auth-setup", inputs: { customClass: "customClass", headlingClass: "headlingClass", headlingText: "headlingText", paragraphClass: "paragraphClass", buttonClass: "buttonClass", width: "width", maxWidth: "maxWidth", margin: "margin", pd: "pd", bgColor: "bgColor", boxShadow: "boxShadow", border: "border", borderRadius: "borderRadius", textColor: "textColor", height: "height" }, outputs: { smsClick: "smsClick", mailClick: "mailClick", skipClick: "skipClick" }, ngImport: i0, template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div>\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }] });
|
|
995
1250
|
}
|
|
996
1251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TwoFactorAuthSetupComponent, decorators: [{
|
|
997
1252
|
type: Component,
|
|
998
|
-
args: [{ selector: 'verben-two-factor-auth-setup', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">
|
|
1253
|
+
args: [{ selector: 'verben-two-factor-auth-setup', template: "<section\n[ngStyle]=\"styles\"\nclass=\"{{ customClass }}\"\n>\n <h3 class=\"{{headlingClass}}\">{{headlingText}}</h3>\n <div class=\"setUpBtnWrapper\">\n <verbena-button\n svg=\"2fa-mail\"\n [svgHeight]=\"16\"\n [svgWidth]=\"20\"\n text=\"Continue with Mail\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n buttonClass=\"font-normal text-[24px] leading-[29.05px] text-[#333]\"\n (click)=\"continueWithMail()\"\n ></verbena-button>\n <verbena-button\n svg=\"2fa-sms\"\n [svgHeight]=\"24\"\n [svgWidth]=\"24\"\n text=\"Continue with SMS\"\n bgColor=\"white\"\n textColor=\"#333333\"\n border=\"1px solid #333\"\n borderRadius=\"40px\"\n pd=\"10px 20px\"\n width=\"100%\"\n svgPosition=\"left\"\n (click)=\"continueWithSMS()\"\n ></verbena-button>\n <div class=\"iconWrapper\" (click)=\"handleSkip()\"> \n <p class=\"{{paragraphClass}}\">Skip for now</p>\n <verben-svg \n icon=\"skip-forward\"\n [height]=\"24\"\n [width]=\"24\"\n />\n </div>\n</div>\n</section>", styles: [".setUpBtnWrapper{display:flex;flex-direction:column;gap:12px;margin-top:40px}.iconWrapper{display:flex;cursor:pointer;align-items:center;justify-content:end;gap:12px;margin-bottom:50px}.custom-button{font-weight:500}\n"] }]
|
|
999
1254
|
}], propDecorators: { customClass: [{
|
|
1000
1255
|
type: Input
|
|
1001
1256
|
}], headlingClass: [{
|
|
1002
1257
|
type: Input
|
|
1258
|
+
}], headlingText: [{
|
|
1259
|
+
type: Input
|
|
1003
1260
|
}], paragraphClass: [{
|
|
1004
1261
|
type: Input
|
|
1005
1262
|
}], buttonClass: [{
|
|
@@ -1125,6 +1382,1075 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1125
1382
|
}]
|
|
1126
1383
|
}] });
|
|
1127
1384
|
|
|
1385
|
+
class ForgotPasswordComponent {
|
|
1386
|
+
fb;
|
|
1387
|
+
title = 'Forgot Password';
|
|
1388
|
+
subTitle = 'Enter the e-mail you used during registration';
|
|
1389
|
+
buttonCaption = 'Submit';
|
|
1390
|
+
buttonTextColor;
|
|
1391
|
+
buttonBackgroundColor;
|
|
1392
|
+
onSubmit = new EventEmitter();
|
|
1393
|
+
forgotPasswordForm;
|
|
1394
|
+
constructor(fb) {
|
|
1395
|
+
this.fb = fb;
|
|
1396
|
+
this.forgotPasswordForm = this.fb.group({
|
|
1397
|
+
Email: new FormControl(null, [
|
|
1398
|
+
Validators.required,
|
|
1399
|
+
this.emailValidator.bind(this),
|
|
1400
|
+
]),
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
isValidEmail(mail) {
|
|
1404
|
+
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
1405
|
+
return emailPattern.test(mail);
|
|
1406
|
+
}
|
|
1407
|
+
emailValidator(control) {
|
|
1408
|
+
const value = control.value;
|
|
1409
|
+
if (this.isValidEmail(value) == false) {
|
|
1410
|
+
return { customValidation: true };
|
|
1411
|
+
}
|
|
1412
|
+
return null;
|
|
1413
|
+
}
|
|
1414
|
+
checkForm() {
|
|
1415
|
+
return this.forgotPasswordForm.valid;
|
|
1416
|
+
}
|
|
1417
|
+
submit() {
|
|
1418
|
+
if (!this.checkForm()) {
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
var data = {
|
|
1422
|
+
Email: this.forgotPasswordForm.controls['Email'].value,
|
|
1423
|
+
};
|
|
1424
|
+
this.onSubmit.emit(data);
|
|
1425
|
+
}
|
|
1426
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1427
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ForgotPasswordComponent, selector: "verben-forgot-password", inputs: { title: "title", subTitle: "subTitle", buttonCaption: "buttonCaption", buttonTextColor: "buttonTextColor", buttonBackgroundColor: "buttonBackgroundColor" }, outputs: { onSubmit: "onSubmit" }, ngImport: i0, template: "<div [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"], dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }] });
|
|
1428
|
+
}
|
|
1429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
1430
|
+
type: Component,
|
|
1431
|
+
args: [{ selector: 'verben-forgot-password', template: "<div [formGroup]=\"this.forgotPasswordForm\" class=\"reset-password-container flex flex-col\">\n <div class=\"reset-password-header flex flex-col\">\n <div class=\"reset-password-title\">{{title}}</div>\n <div class=\"reset-password-subtitle\">{{subTitle}}</div>\n </div>\n <div class=\"form-field flex flex-col\">\n <div class=\"form-field-caption\">Email</div>\n <verbena-input bgColor=\"white\" borderRadius=\"12px\" formControlName=\"Email\" type=\"email\"></verbena-input>\n </div>\n <verbena-button fontWeight=\"700\" (click)=\"submit()\" [text]=\"buttonCaption\" width=\"100%\" [textColor]=\"buttonTextColor\"\n [bgColor]=\"buttonBackgroundColor\" borderRadius=\"25px\" [disable]=\"!this.checkForm()\"></verbena-button>\n\n</div>\n", styles: ["*{font-family:sans-serif;font-size:16px}.flex{display:flex}.flex-col{flex-direction:column}.font-bold{font-weight:700}.justify-center{justify-content:center}.justify-end{justify-content:end}.align-items-center{align-items:center}.grid{display:grid}.verben-error-message{font-size:.8rem;color:red}.verben-input{border:1px solid #cbd5e1;outline:none;border-radius:5px;color:#334155;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,outline-color .2s}.verben-input::placeholder{color:#64748b}.verben-input:hover{border:1px solid #697e97}.verben-input.disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input:disabled{opacity:1;background-color:light-dark(rgba(239,239,239,.3),rgba(59,59,59,.3));pointer-events:none;color:#64748b}.verben-input.focused{border-color:#3b82f6;outline:none}.verben-input:focus{border-color:#3b82f6;outline:none}.verben-input.ng-invalid{border-color:red}.verben-button{padding:8px 15px;border-radius:4px;border:none;text-align:center}.verben-button.primary{background-color:#ffe681}.verben-button.secondary{background-color:#d9d9d940}.reset-password-container{gap:25px;padding:50px;border:1px solid rgba(102,102,102,.5);box-shadow:4px 4px 4px #00000040;border-radius:24px}.reset-password-title{font-size:30px;font-weight:700}.reset-password-subtitle{font-size:14px;font-weight:500;color:#666}.form-field{gap:5px}.form-field-caption{color:#666}\n"] }]
|
|
1432
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { title: [{
|
|
1433
|
+
type: Input
|
|
1434
|
+
}], subTitle: [{
|
|
1435
|
+
type: Input
|
|
1436
|
+
}], buttonCaption: [{
|
|
1437
|
+
type: Input
|
|
1438
|
+
}], buttonTextColor: [{
|
|
1439
|
+
type: Input
|
|
1440
|
+
}], buttonBackgroundColor: [{
|
|
1441
|
+
type: Input
|
|
1442
|
+
}], onSubmit: [{
|
|
1443
|
+
type: Output
|
|
1444
|
+
}] } });
|
|
1445
|
+
|
|
1446
|
+
class ForgotPasswordModule {
|
|
1447
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1448
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordModule, declarations: [ForgotPasswordComponent], imports: [FormsModule,
|
|
1449
|
+
ReactiveFormsModule,
|
|
1450
|
+
VerbenaInputModule,
|
|
1451
|
+
VerbenaButtonModule,
|
|
1452
|
+
CommonModule], exports: [ForgotPasswordComponent] });
|
|
1453
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordModule, imports: [FormsModule,
|
|
1454
|
+
ReactiveFormsModule,
|
|
1455
|
+
VerbenaInputModule,
|
|
1456
|
+
VerbenaButtonModule,
|
|
1457
|
+
CommonModule] });
|
|
1458
|
+
}
|
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ForgotPasswordModule, decorators: [{
|
|
1460
|
+
type: NgModule,
|
|
1461
|
+
args: [{
|
|
1462
|
+
declarations: [ForgotPasswordComponent],
|
|
1463
|
+
imports: [
|
|
1464
|
+
FormsModule,
|
|
1465
|
+
ReactiveFormsModule,
|
|
1466
|
+
VerbenaInputModule,
|
|
1467
|
+
VerbenaButtonModule,
|
|
1468
|
+
CommonModule,
|
|
1469
|
+
],
|
|
1470
|
+
exports: [ForgotPasswordComponent],
|
|
1471
|
+
}]
|
|
1472
|
+
}] });
|
|
1473
|
+
|
|
1474
|
+
const columns$1 = [
|
|
1475
|
+
{
|
|
1476
|
+
id: 'createdAt',
|
|
1477
|
+
header: 'Created',
|
|
1478
|
+
accessorKey: 'CreatedAt',
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
id: 'name',
|
|
1482
|
+
header: 'Name',
|
|
1483
|
+
accessorKey: 'Name',
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
id: 'description',
|
|
1487
|
+
header: 'Description',
|
|
1488
|
+
accessorKey: 'Description',
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
id: 'link',
|
|
1492
|
+
header: 'Link',
|
|
1493
|
+
accessorKey: 'Link',
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
id: 'logo',
|
|
1497
|
+
header: 'Logo',
|
|
1498
|
+
accessorKey: 'Logo',
|
|
1499
|
+
},
|
|
1500
|
+
{ id: 'actions', header: 'Actions', accessorKey: 'Name' },
|
|
1501
|
+
];
|
|
1502
|
+
|
|
1503
|
+
const mockData$1 = new Array(10).fill(1).map((id, i) => ({
|
|
1504
|
+
Name: `Name ${id + i}`,
|
|
1505
|
+
Id: id,
|
|
1506
|
+
id: id.toString(),
|
|
1507
|
+
Description: `Sign in option ${id + i}`,
|
|
1508
|
+
Logo: `./assets/images/test-logo.png`,
|
|
1509
|
+
Link: `Link ${id + i}`,
|
|
1510
|
+
CreatedAt: new Date(),
|
|
1511
|
+
UpdatedAt: new Date(),
|
|
1512
|
+
State: ObjectState.New,
|
|
1513
|
+
Tenant: `Tenant ${id + i}`,
|
|
1514
|
+
}));
|
|
1515
|
+
|
|
1516
|
+
const baseStyle$1 = {
|
|
1517
|
+
width: '100%',
|
|
1518
|
+
fontFamily: '"Fraunces", serif',
|
|
1519
|
+
fontSize: '125%',
|
|
1520
|
+
whiteSpace: 'nowrap',
|
|
1521
|
+
margin: '0',
|
|
1522
|
+
border: '1px solid #D4A007',
|
|
1523
|
+
borderRadius: '16px',
|
|
1524
|
+
borderCollapse: 'separate',
|
|
1525
|
+
borderSpacing: '0',
|
|
1526
|
+
tableLayout: 'fixed',
|
|
1527
|
+
overflow: 'hidden',
|
|
1528
|
+
rows: {
|
|
1529
|
+
even: {
|
|
1530
|
+
backgroundColor: '#FDFDFD',
|
|
1531
|
+
},
|
|
1532
|
+
odd: {
|
|
1533
|
+
backgroundColor: '#F1F4FB',
|
|
1534
|
+
},
|
|
1535
|
+
height: '68px',
|
|
1536
|
+
},
|
|
1537
|
+
cells: {
|
|
1538
|
+
padding: '0.5rem 1rem',
|
|
1539
|
+
},
|
|
1540
|
+
header: {
|
|
1541
|
+
stickyTop: true,
|
|
1542
|
+
zIndex: 2,
|
|
1543
|
+
backgroundColor: '#EFF2FB',
|
|
1544
|
+
fontWeight: 'bold',
|
|
1545
|
+
textAlign: 'left',
|
|
1546
|
+
padding: '12px 16px',
|
|
1547
|
+
height: '40px',
|
|
1548
|
+
},
|
|
1549
|
+
footer: {
|
|
1550
|
+
stickyBottom: true,
|
|
1551
|
+
zIndex: 2,
|
|
1552
|
+
padding: '3px',
|
|
1553
|
+
},
|
|
1554
|
+
// body: {
|
|
1555
|
+
// background: '#fff',
|
|
1556
|
+
// padding: '4px 5px',
|
|
1557
|
+
// textAlign: 'center',
|
|
1558
|
+
// },
|
|
1559
|
+
// firstColumn: {
|
|
1560
|
+
// stickyLeft: true,
|
|
1561
|
+
// zIndex: 1,
|
|
1562
|
+
// },
|
|
1563
|
+
lastColumn: {
|
|
1564
|
+
stickyRight: true,
|
|
1565
|
+
zIndex: 1,
|
|
1566
|
+
},
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
class SsoFormComponent {
|
|
1570
|
+
fb;
|
|
1571
|
+
isUploading = false;
|
|
1572
|
+
uploadedFileName = null;
|
|
1573
|
+
fileUploadError = null;
|
|
1574
|
+
videoElement;
|
|
1575
|
+
stream;
|
|
1576
|
+
startWebcam(e) {
|
|
1577
|
+
e.stopPropagation();
|
|
1578
|
+
navigator.mediaDevices.getUserMedia({ video: true })
|
|
1579
|
+
.then((stream) => {
|
|
1580
|
+
this.stream = stream;
|
|
1581
|
+
this.videoElement.nativeElement.srcObject = stream;
|
|
1582
|
+
})
|
|
1583
|
+
.catch(error => {
|
|
1584
|
+
console.error('Error accessing webcam:', error);
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
set currentData(value) {
|
|
1588
|
+
if (value?.data) {
|
|
1589
|
+
this.form.patchValue({
|
|
1590
|
+
Description: value.data.Description || '',
|
|
1591
|
+
Name: value.data.Name || '',
|
|
1592
|
+
Link: value.data.Link || '',
|
|
1593
|
+
Logo: value.data.Logo || '',
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
else {
|
|
1597
|
+
this.form.reset();
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
switchView = new EventEmitter();
|
|
1601
|
+
form;
|
|
1602
|
+
constructor(fb) {
|
|
1603
|
+
this.fb = fb;
|
|
1604
|
+
this.form = this.fb.group({
|
|
1605
|
+
Description: [''],
|
|
1606
|
+
Name: [''],
|
|
1607
|
+
Link: [''],
|
|
1608
|
+
Logo: [''],
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
ngOnInit() { }
|
|
1612
|
+
onSave() {
|
|
1613
|
+
if (this.form.valid) {
|
|
1614
|
+
// Emit save event with form value
|
|
1615
|
+
console.log('Form saved:', this.form.value);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
onDelete() {
|
|
1619
|
+
// Emit delete event
|
|
1620
|
+
console.log('Delete requested');
|
|
1621
|
+
}
|
|
1622
|
+
onFileSelected(event) {
|
|
1623
|
+
const input = event.target || this.form.controls["Logo"].value;
|
|
1624
|
+
if (input.files && input.files.length > 0) {
|
|
1625
|
+
const file = input.files[0];
|
|
1626
|
+
this.fileUploadError = null;
|
|
1627
|
+
if (!file) {
|
|
1628
|
+
this.isUploading = true;
|
|
1629
|
+
}
|
|
1630
|
+
if (file.size > 5000000) {
|
|
1631
|
+
this.fileUploadError = 'File size exceeds 5MB limit.';
|
|
1632
|
+
this.uploadedFileName = null;
|
|
1633
|
+
this.isUploading = false; // Reset isUploading state
|
|
1634
|
+
}
|
|
1635
|
+
else {
|
|
1636
|
+
this.uploadedFileName = file.name;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
this.isUploading = false;
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
removeFile() {
|
|
1644
|
+
this.uploadedFileName = null;
|
|
1645
|
+
this.fileUploadError = null;
|
|
1646
|
+
const fileInput = document.getElementById('attachment');
|
|
1647
|
+
if (fileInput) {
|
|
1648
|
+
fileInput.value = '';
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1652
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SsoFormComponent, selector: "lib-sso-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["video"], descendants: true, static: true }], ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n ✕\n </button>\n </div>\n <input\nclass=\"sr-only\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n [ngModel]=\"currentData?.data.Logo\"\n (change)=\"onFileSelected($event)\"\n [value]=\"form.controls['Logo'].value\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex w-6 h-6 rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"w-4\"/>\n</span>\n<span class=\"bg-primary flex w-6 h-6 rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"w-3\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [".link::placeholder{color:red}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }] });
|
|
1653
|
+
}
|
|
1654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoFormComponent, decorators: [{
|
|
1655
|
+
type: Component,
|
|
1656
|
+
args: [{ selector: 'lib-sso-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name:\"\n formControlName=\"Name\"\n />\n <verbena-input\n label=\"Description:\"\n name=\"Description\"\n formControlName=\"Description\"\n />\n <verbena-input\n label=\"Link:\"\n name=\"Link\"\n formControlName=\"Link\"\n/>\n<span class=\"block my-2 \">Logo</span>\n<label [style.background-color]=\"'#f9f9f9'\" class=\"border cursor-pointer border-secondary-200 rounded-md w-full px-4 py-2 flex justify-between\">\n <span *ngIf=\"!uploadedFileName\">{{isUploading?\"uploading...\":\"Upload a photo\"}}</span>\n <span *ngIf=\"fileUploadError\" class=\"error\">{{ fileUploadError }}</span>\n <div *ngIf=\"uploadedFileName\" class=\"flex items-center text-sm gap-2 border border-primary rounded-lg px-3 \">\n <span>{{ uploadedFileName }}</span>\n <button\n [style.color]=\"'black'\"\n type=\"button\"\n (click)=\"removeFile()\"\n >\n ✕\n </button>\n </div>\n <input\nclass=\"sr-only\"\n[type]=\"'file'\"\n label=\"Logo:\"\n name=\"Logo\"\n accept=\"image/png\"\n formControlName=\"Logo\"\n [ngModel]=\"currentData?.data.Logo\"\n (change)=\"onFileSelected($event)\"\n [value]=\"form.controls['Logo'].value\"\n formControlName=\"Logo\"\n/>\n<span class=\"flex gap-2\">\n<span class=\"bg-primary flex w-6 h-6 rounded-md justify-center items-center\">\n <img src=\"./assets/icons/cam.png\" class=\"w-4\"/>\n</span>\n<span class=\"bg-primary flex w-6 h-6 rounded-md justify-center items-center\">\n <img src=\"./assets/icons/file.png\" class=\"w-3\"/>\n</span>\n</span>\n</label>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n [bgColor]=\"'#999999'\"\n [textColor]=\"'#404040'\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Save\"\n bgColor=\"#28a745\"\n textColor=\"#404040\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n [bgColor]=\"'#FFE681'\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [".link::placeholder{color:red}\n"] }]
|
|
1657
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { videoElement: [{
|
|
1658
|
+
type: ViewChild,
|
|
1659
|
+
args: ['video', { static: true }]
|
|
1660
|
+
}], currentData: [{
|
|
1661
|
+
type: Input
|
|
1662
|
+
}], switchView: [{
|
|
1663
|
+
type: Output
|
|
1664
|
+
}] } });
|
|
1665
|
+
|
|
1666
|
+
class SsoComponent {
|
|
1667
|
+
cardDataView;
|
|
1668
|
+
dataView;
|
|
1669
|
+
columns = columns$1;
|
|
1670
|
+
data = mockData$1;
|
|
1671
|
+
styles = baseStyle$1;
|
|
1672
|
+
currentData = null;
|
|
1673
|
+
isGridView = true;
|
|
1674
|
+
selected = null;
|
|
1675
|
+
cardData = mockData$1.map(({ Name, Description, Link, Logo }) => ({
|
|
1676
|
+
selected: false,
|
|
1677
|
+
title: Name,
|
|
1678
|
+
data: { Name, Description, Link, Logo },
|
|
1679
|
+
body: [
|
|
1680
|
+
// { title: 'Name', value: Name??'' },
|
|
1681
|
+
{ title: 'Description', value: Description ?? '' },
|
|
1682
|
+
// { title: 'Logo', value: Logo ?? '' },
|
|
1683
|
+
// { title: 'Link', value: Link ?? '' },
|
|
1684
|
+
],
|
|
1685
|
+
children: [],
|
|
1686
|
+
}));
|
|
1687
|
+
openDetailView(name) {
|
|
1688
|
+
const cardItem = this.getCardDataByMailAddress(name);
|
|
1689
|
+
if (cardItem && this.cardDataView) {
|
|
1690
|
+
this.dataView.toggleView();
|
|
1691
|
+
this.cardData.forEach((item) => {
|
|
1692
|
+
item.selected = false;
|
|
1693
|
+
if (item.children) {
|
|
1694
|
+
item.children.forEach((child) => (child.selected = false));
|
|
1695
|
+
}
|
|
1696
|
+
});
|
|
1697
|
+
cardItem.selected = true;
|
|
1698
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
getCardDataByMailAddress(name) {
|
|
1702
|
+
return this.cardData.find(({ data }) => data.Name === name);
|
|
1703
|
+
}
|
|
1704
|
+
onViewChange(isGridView) {
|
|
1705
|
+
this.isGridView = isGridView;
|
|
1706
|
+
// Reset selection when switching views
|
|
1707
|
+
if (this.currentData) {
|
|
1708
|
+
this.cardDataView?.clearData();
|
|
1709
|
+
this.currentData = null;
|
|
1710
|
+
}
|
|
1711
|
+
console.log('SELECTED', this.selected);
|
|
1712
|
+
if (this.selected) {
|
|
1713
|
+
this.cardDataView.onItemClick(this.selected);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
openFormView(index) {
|
|
1717
|
+
const item = this.cardData[index];
|
|
1718
|
+
console.log('ITEM = ', item);
|
|
1719
|
+
}
|
|
1720
|
+
handleExport(exportedData) {
|
|
1721
|
+
console.log('Exported data:', exportedData);
|
|
1722
|
+
this.downloadCSV(exportedData);
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
*
|
|
1726
|
+
* @param data Simple csv export for testing
|
|
1727
|
+
*/
|
|
1728
|
+
downloadCSV(data) {
|
|
1729
|
+
const headers = Object.keys(data[0]);
|
|
1730
|
+
const csvContent = [
|
|
1731
|
+
headers.join(','),
|
|
1732
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
1733
|
+
].join('\n');
|
|
1734
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
1735
|
+
const link = document.createElement('a');
|
|
1736
|
+
if (link.download !== undefined) {
|
|
1737
|
+
const url = URL.createObjectURL(blob);
|
|
1738
|
+
link.setAttribute('href', url);
|
|
1739
|
+
link.setAttribute('download', 'export.csv');
|
|
1740
|
+
link.style.visibility = 'hidden';
|
|
1741
|
+
document.body.appendChild(link);
|
|
1742
|
+
link.click();
|
|
1743
|
+
document.body.removeChild(link);
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
onSelectionChange(selectedRows) {
|
|
1747
|
+
console.log('Selection changed:', selectedRows);
|
|
1748
|
+
// Handle the selection change
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Copied over from card view doc until I understand usage
|
|
1752
|
+
*/
|
|
1753
|
+
selectedColumnCount = 0;
|
|
1754
|
+
selectedFilterTableCount = 0;
|
|
1755
|
+
isOPen = true;
|
|
1756
|
+
selectedSortCount = 0;
|
|
1757
|
+
showColumn = false;
|
|
1758
|
+
showSort = false;
|
|
1759
|
+
selectedAll = false;
|
|
1760
|
+
visibleColumns = columns$1.map((col) => ({
|
|
1761
|
+
checked: false,
|
|
1762
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
1763
|
+
type: DataFilterType.Bool,
|
|
1764
|
+
}));
|
|
1765
|
+
filterArray = [
|
|
1766
|
+
{
|
|
1767
|
+
name: 'Name',
|
|
1768
|
+
type: DataFilterType.String,
|
|
1769
|
+
checked: false,
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
name: 'Description',
|
|
1773
|
+
type: DataFilterType.String,
|
|
1774
|
+
checked: false,
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
name: 'Logo',
|
|
1778
|
+
type: DataFilterType.String,
|
|
1779
|
+
checked: false,
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
name: 'Link',
|
|
1783
|
+
type: DataFilterType.String,
|
|
1784
|
+
checked: false,
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
name: 'CreatedAt',
|
|
1788
|
+
type: DataFilterType.Date,
|
|
1789
|
+
checked: false,
|
|
1790
|
+
},
|
|
1791
|
+
];
|
|
1792
|
+
sortOptions = [
|
|
1793
|
+
{
|
|
1794
|
+
name: 'Name',
|
|
1795
|
+
type: DataFilterType.String,
|
|
1796
|
+
checked: false,
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
name: 'Description',
|
|
1800
|
+
type: DataFilterType.String,
|
|
1801
|
+
checked: false,
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: 'Link',
|
|
1805
|
+
type: DataFilterType.String,
|
|
1806
|
+
checked: false,
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
name: 'Logo',
|
|
1810
|
+
type: DataFilterType.String,
|
|
1811
|
+
checked: false,
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
name: 'CreatedAt',
|
|
1815
|
+
type: DataFilterType.Date,
|
|
1816
|
+
checked: false,
|
|
1817
|
+
},
|
|
1818
|
+
];
|
|
1819
|
+
clearData() {
|
|
1820
|
+
this.currentData = {};
|
|
1821
|
+
}
|
|
1822
|
+
loadMore() {
|
|
1823
|
+
this.cardData = this.cardData.concat(this.cardData);
|
|
1824
|
+
}
|
|
1825
|
+
onColumnChange(event) {
|
|
1826
|
+
this.showColumn = event;
|
|
1827
|
+
}
|
|
1828
|
+
onSortChange(event) {
|
|
1829
|
+
this.showSort = event;
|
|
1830
|
+
console.log(event);
|
|
1831
|
+
}
|
|
1832
|
+
onColumnsUpdated(updatedColumns) {
|
|
1833
|
+
this.onColumnChange(false);
|
|
1834
|
+
console.log(updatedColumns);
|
|
1835
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
1836
|
+
}
|
|
1837
|
+
onSortUpdated(updatedSorts) {
|
|
1838
|
+
this.onSortChange(false);
|
|
1839
|
+
this.selectedSortCount = updatedSorts.length;
|
|
1840
|
+
console.log(updatedSorts);
|
|
1841
|
+
}
|
|
1842
|
+
onStateChange(event) {
|
|
1843
|
+
console.log(`State changed for ${event.key}:`, event.value);
|
|
1844
|
+
}
|
|
1845
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1846
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.9", type: SsoComponent, selector: "lib-sso", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div grid-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"w-10\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div list-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\"> \n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ ciItem.value }}</span>\n </div>\n <img class=\"w-12\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "gridIcon", "listIcon", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "exportTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected"], outputs: ["viewChange", "stateChange"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: SsoFormComponent, selector: "lib-sso-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
|
|
1847
|
+
}
|
|
1848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoComponent, decorators: [{
|
|
1849
|
+
type: Component,
|
|
1850
|
+
args: [{ selector: 'lib-sso', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div grid-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"columns\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"logo\">\n <ng-template #cell let-value>\n <img class=\"w-10\" [src]=\"value\"/>\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex space-x-8\" style=\"display: flex; gap: 24px\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#3479E9\"\n fill=\"white\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n stroke=\"#E20000\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div list-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"Link\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"Link\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex\">\n <span class=\"font-bold text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"flex items-center justify-between gap-2\"> \n <div>\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black text-xs font-semibold\">{{ ciItem.value }}</span>\n </div>\n <img class=\"w-12\" [alt]=\"ciItem.title\" [src]=\"item.data.Logo\"/>\n </div>\n }\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-sso-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-sso-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [".flex{display:flex}.w-full{width:100%}.bg-secondary-200{background-color:#e8eaf1}.flex-col{flex-direction:column}.items-center{align-items:center}.bg-primary{background-color:#d4a007}.border-primary{border:1px solid #d4a007}.rounded-lg{border-radius:20px}.w-3{width:6px}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.bg-secondary-100{background-color:#8080800e}.bg-secondary{background-color:#e8eaf1}.p-2{padding:6px}\n"] }]
|
|
1851
|
+
}], propDecorators: { cardDataView: [{
|
|
1852
|
+
type: ViewChild,
|
|
1853
|
+
args: ['vdcv']
|
|
1854
|
+
}], dataView: [{
|
|
1855
|
+
type: ViewChild,
|
|
1856
|
+
args: ['vdv']
|
|
1857
|
+
}] } });
|
|
1858
|
+
|
|
1859
|
+
class SsoModule {
|
|
1860
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1861
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: SsoModule, declarations: [SsoComponent, SsoFormComponent], imports: [CommonModule,
|
|
1862
|
+
FormsModule,
|
|
1863
|
+
ReactiveFormsModule,
|
|
1864
|
+
DataViewModule,
|
|
1865
|
+
TableFilterModule,
|
|
1866
|
+
SortTableModule,
|
|
1867
|
+
DataExportModule,
|
|
1868
|
+
VisibleColumnModule,
|
|
1869
|
+
VerbenaButtonModule,
|
|
1870
|
+
CardDataViewModule,
|
|
1871
|
+
VerbenaInputModule,
|
|
1872
|
+
SvgModule,
|
|
1873
|
+
VerbenaTextareaModule,
|
|
1874
|
+
DataTableModule], exports: [SsoComponent] });
|
|
1875
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoModule, imports: [CommonModule,
|
|
1876
|
+
FormsModule,
|
|
1877
|
+
ReactiveFormsModule,
|
|
1878
|
+
DataViewModule,
|
|
1879
|
+
TableFilterModule,
|
|
1880
|
+
SortTableModule,
|
|
1881
|
+
DataExportModule,
|
|
1882
|
+
VisibleColumnModule,
|
|
1883
|
+
VerbenaButtonModule,
|
|
1884
|
+
CardDataViewModule,
|
|
1885
|
+
VerbenaInputModule,
|
|
1886
|
+
SvgModule,
|
|
1887
|
+
VerbenaTextareaModule,
|
|
1888
|
+
DataTableModule] });
|
|
1889
|
+
}
|
|
1890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SsoModule, decorators: [{
|
|
1891
|
+
type: NgModule,
|
|
1892
|
+
args: [{
|
|
1893
|
+
declarations: [SsoComponent, SsoFormComponent],
|
|
1894
|
+
imports: [
|
|
1895
|
+
CommonModule,
|
|
1896
|
+
FormsModule,
|
|
1897
|
+
ReactiveFormsModule,
|
|
1898
|
+
DataViewModule,
|
|
1899
|
+
TableFilterModule,
|
|
1900
|
+
SortTableModule,
|
|
1901
|
+
DataExportModule,
|
|
1902
|
+
VisibleColumnModule,
|
|
1903
|
+
VerbenaButtonModule,
|
|
1904
|
+
CardDataViewModule,
|
|
1905
|
+
VerbenaInputModule,
|
|
1906
|
+
SvgModule,
|
|
1907
|
+
VerbenaTextareaModule,
|
|
1908
|
+
DataTableModule,
|
|
1909
|
+
],
|
|
1910
|
+
exports: [SsoComponent],
|
|
1911
|
+
}]
|
|
1912
|
+
}] });
|
|
1913
|
+
|
|
1914
|
+
const columns = [
|
|
1915
|
+
{
|
|
1916
|
+
id: 'createdAt',
|
|
1917
|
+
header: 'Created',
|
|
1918
|
+
accessorKey: 'CreatedAt',
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
id: 'user',
|
|
1922
|
+
header: 'Name',
|
|
1923
|
+
accessorKey: 'Name',
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
id: 'mail',
|
|
1927
|
+
header: 'E-Mail',
|
|
1928
|
+
accessorKey: 'MailAddress',
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
id: 'phone',
|
|
1932
|
+
header: 'Phone Number',
|
|
1933
|
+
accessorKey: 'PhoneNumber',
|
|
1934
|
+
},
|
|
1935
|
+
{ id: 'actions', header: 'Actions', accessorKey: 'MailAddress' },
|
|
1936
|
+
];
|
|
1937
|
+
|
|
1938
|
+
var UserAccessRequestStatus;
|
|
1939
|
+
(function (UserAccessRequestStatus) {
|
|
1940
|
+
UserAccessRequestStatus[UserAccessRequestStatus["Pending"] = 0] = "Pending";
|
|
1941
|
+
UserAccessRequestStatus[UserAccessRequestStatus["Approved"] = 1] = "Approved";
|
|
1942
|
+
UserAccessRequestStatus[UserAccessRequestStatus["Declined"] = 2] = "Declined";
|
|
1943
|
+
})(UserAccessRequestStatus || (UserAccessRequestStatus = {}));
|
|
1944
|
+
|
|
1945
|
+
const roles = [
|
|
1946
|
+
{ id: 'admin', name: 'Admin' },
|
|
1947
|
+
{ id: 'manager', name: 'Manager' },
|
|
1948
|
+
{ id: 'staff', name: 'Staff' },
|
|
1949
|
+
];
|
|
1950
|
+
const mockData = new Array(10)
|
|
1951
|
+
.fill(1)
|
|
1952
|
+
.map((id, i) => ({
|
|
1953
|
+
Name: `User ${id + i}`,
|
|
1954
|
+
Id: id + i,
|
|
1955
|
+
id: (id + i).toString(),
|
|
1956
|
+
MailAddress: `user${id + i}@mail.com`,
|
|
1957
|
+
PhoneNumber: `+23480000000${id + i}`,
|
|
1958
|
+
Status: randomEnum$1(UserAccessRequestStatus),
|
|
1959
|
+
RoleID: roles[Math.floor(Math.random() * roles.length)].id,
|
|
1960
|
+
Password: '1234567',
|
|
1961
|
+
ExpireOn: new Date(),
|
|
1962
|
+
IsSeeded: false,
|
|
1963
|
+
OTPExpireOn: new Date(),
|
|
1964
|
+
Tenants: [],
|
|
1965
|
+
CreatedAt: new Date(),
|
|
1966
|
+
UpdatedAt: new Date(),
|
|
1967
|
+
State: ObjectState.New,
|
|
1968
|
+
Tenant: `Tenant${id + i}`,
|
|
1969
|
+
}));
|
|
1970
|
+
function randomEnum$1(anEnum) {
|
|
1971
|
+
const enumValues = Object.values(anEnum);
|
|
1972
|
+
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
1973
|
+
return enumValues[randomIndex];
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
const baseStyle = {
|
|
1977
|
+
width: '100%',
|
|
1978
|
+
fontFamily: '"Fraunces", serif',
|
|
1979
|
+
fontSize: '125%',
|
|
1980
|
+
whiteSpace: 'nowrap',
|
|
1981
|
+
margin: '0',
|
|
1982
|
+
border: '1px solid #D4A007',
|
|
1983
|
+
borderRadius: '16px',
|
|
1984
|
+
borderCollapse: 'separate',
|
|
1985
|
+
borderSpacing: '0',
|
|
1986
|
+
tableLayout: 'fixed',
|
|
1987
|
+
overflow: 'hidden',
|
|
1988
|
+
rows: {
|
|
1989
|
+
even: {
|
|
1990
|
+
backgroundColor: '#FDFDFD',
|
|
1991
|
+
},
|
|
1992
|
+
odd: {
|
|
1993
|
+
backgroundColor: '#F1F4FB',
|
|
1994
|
+
},
|
|
1995
|
+
height: '68px',
|
|
1996
|
+
},
|
|
1997
|
+
cells: {
|
|
1998
|
+
padding: '0.5rem 1rem',
|
|
1999
|
+
},
|
|
2000
|
+
header: {
|
|
2001
|
+
// stickyTop: true,
|
|
2002
|
+
// zIndex: 2,
|
|
2003
|
+
backgroundColor: '#EFF2FB',
|
|
2004
|
+
fontWeight: 'bold',
|
|
2005
|
+
textAlign: 'left',
|
|
2006
|
+
padding: '12px 16px',
|
|
2007
|
+
height: '40px',
|
|
2008
|
+
},
|
|
2009
|
+
footer: {
|
|
2010
|
+
// stickyBottom: true,
|
|
2011
|
+
// zIndex: 2,
|
|
2012
|
+
padding: '3px',
|
|
2013
|
+
},
|
|
2014
|
+
// body: {
|
|
2015
|
+
// background: '#fff',
|
|
2016
|
+
// padding: '4px 5px',
|
|
2017
|
+
// textAlign: 'center',
|
|
2018
|
+
// },
|
|
2019
|
+
// firstColumn: {
|
|
2020
|
+
// stickyLeft: true,
|
|
2021
|
+
// zIndex: 1,
|
|
2022
|
+
// },
|
|
2023
|
+
lastColumn: {
|
|
2024
|
+
// stickyRight: true,
|
|
2025
|
+
// zIndex: 1,
|
|
2026
|
+
},
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
const SERVICE_CONFIG = new InjectionToken('ServiceConfig');
|
|
2030
|
+
class UserRequestApprovalService {
|
|
2031
|
+
// protected readonly baseUrl: string;
|
|
2032
|
+
resourceEndpoint;
|
|
2033
|
+
roles = [
|
|
2034
|
+
{ id: 'admin', name: 'Admin' },
|
|
2035
|
+
{ id: 'manager', name: 'Manager' },
|
|
2036
|
+
{ id: 'staff', name: 'Staff' },
|
|
2037
|
+
];
|
|
2038
|
+
constructor() {
|
|
2039
|
+
// this.baseUrl = environment.serviceUrl;
|
|
2040
|
+
// this.resourceEndpoint = config.resourceEndpoint;
|
|
2041
|
+
this.resourceEndpoint = '';
|
|
2042
|
+
}
|
|
2043
|
+
getMockUserRequests() {
|
|
2044
|
+
return new Array(10).fill(1).map((id, i) => ({
|
|
2045
|
+
Name: `User ${id + i}`,
|
|
2046
|
+
Id: id + i,
|
|
2047
|
+
id: (id + i).toString(),
|
|
2048
|
+
MailAddress: `user${id + i}@mail.com`,
|
|
2049
|
+
PhoneNumber: `+23480000000${id + i}`,
|
|
2050
|
+
Status: randomEnum(UserAccessRequestStatus),
|
|
2051
|
+
RoleID: this.roles[Math.floor(Math.random() * this.roles.length)].id,
|
|
2052
|
+
Password: '1234567',
|
|
2053
|
+
ExpireOn: new Date(),
|
|
2054
|
+
IsSeeded: false,
|
|
2055
|
+
OTPExpireOn: new Date(),
|
|
2056
|
+
Tenants: [],
|
|
2057
|
+
CreatedAt: new Date(),
|
|
2058
|
+
UpdatedAt: new Date(),
|
|
2059
|
+
State: ObjectState.New,
|
|
2060
|
+
Tenant: `Tenant${id + i}`,
|
|
2061
|
+
}));
|
|
2062
|
+
}
|
|
2063
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestApprovalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2064
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestApprovalService });
|
|
2065
|
+
}
|
|
2066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestApprovalService, decorators: [{
|
|
2067
|
+
type: Injectable
|
|
2068
|
+
}], ctorParameters: () => [] });
|
|
2069
|
+
function randomEnum(anEnum) {
|
|
2070
|
+
const enumValues = Object.values(anEnum);
|
|
2071
|
+
const randomIndex = Math.floor(Math.random() * enumValues.length);
|
|
2072
|
+
return enumValues[randomIndex];
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
class UserRequestFormComponent {
|
|
2076
|
+
fb;
|
|
2077
|
+
set currentData(value) {
|
|
2078
|
+
if (value?.data) {
|
|
2079
|
+
this.form.patchValue({
|
|
2080
|
+
MailAddress: value.data.MailAddress || '',
|
|
2081
|
+
Name: value.data.Name || '',
|
|
2082
|
+
PhoneNumber: value.data.PhoneNumber || '',
|
|
2083
|
+
});
|
|
2084
|
+
}
|
|
2085
|
+
else {
|
|
2086
|
+
this.form.reset();
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
switchView = new EventEmitter();
|
|
2090
|
+
form;
|
|
2091
|
+
roles = [
|
|
2092
|
+
{ id: 'admin', name: 'Admin' },
|
|
2093
|
+
{ id: 'manager', name: 'Manager' },
|
|
2094
|
+
{ id: 'staff', name: 'Staff' },
|
|
2095
|
+
];
|
|
2096
|
+
constructor(fb) {
|
|
2097
|
+
this.fb = fb;
|
|
2098
|
+
this.form = this.fb.group({
|
|
2099
|
+
MailAddress: ['', { readonly: true }],
|
|
2100
|
+
Name: ['', { readonly: true }],
|
|
2101
|
+
PhoneNumber: ['', { readonly: true }],
|
|
2102
|
+
RoleId: [''],
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2105
|
+
ngOnInit() { }
|
|
2106
|
+
onSave() {
|
|
2107
|
+
if (this.form.valid) {
|
|
2108
|
+
// Emit save event with form value
|
|
2109
|
+
console.log('Form saved:', this.form.value);
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
onDelete() {
|
|
2113
|
+
// Emit delete event
|
|
2114
|
+
console.log('Delete requested');
|
|
2115
|
+
}
|
|
2116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestFormComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: { currentData: "currentData" }, outputs: { switchView: "switchView" }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.VerbenaInputComponent, selector: "verbena-input", inputs: ["label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "inputWrapperClass", "customErrorMessages"], outputs: ["valueChange"] }, { kind: "component", type: i2.VerbenaButtonComponent, selector: "verbena-button", inputs: ["text", "icon", "svgPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "styleType", "svg", "svgWidth", "svgHeight", "svgColor", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i2.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
|
|
2118
|
+
}
|
|
2119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestFormComponent, decorators: [{
|
|
2120
|
+
type: Component,
|
|
2121
|
+
args: [{ selector: 'lib-user-request-form', template: "<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n>\n <verbena-input\n name=\"MailAddress\"\n label=\"Mail Address:\"\n formControlName=\"MailAddress\"\n />\n <verbena-input label=\"Name:\" name=\"Name\" type=\"text\" formControlName=\"Name\" />\n <verbena-input\n label=\"Phone Number:\"\n name=\"PhoneNumber\"\n type=\"tel\"\n formControlName=\"PhoneNumber\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"role\">Role</label>\n\n <verben-drop-down\n label=\"Role\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [filter]=\"true\"\n [showClear]=\"true\"\n placeholder=\"\"\n [(options)]=\"roles\"\n id=\"role\"\n optionLabel=\"name\"\n optionValue=\"id\"\n formControlName=\"RoleId\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div\n class=\"flex justify-between bottom-8 left-0 right-0 px-3 pb-2 absolute\"\n style=\"\n display: flex;\n justify-content: space-between;\n position: absolute;\n padding: 8px 12px;\n right: 0;\n left: 0;\n bottom: 32;\n \"\n >\n <!-- <verbena-button\n text=\"Delete\"\n class=\"bg-secondary-200 text-[black]\"\n (click)=\"onDelete()\"\n />\n <verbena-button\n text=\"Save\"\n class=\"bg-primary text-[black]\"\n (click)=\"onSave()\"\n />\n\n <verbena-button\n text=\"Secondary Button\"\n styleType=\"secondary\"\n ></verbena-button> -->\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Reject\"\n styleType=\"danger\"\n borderRadius=\"10px\"\n ></verbena-button>\n <verbena-button\n (click)=\"switchView.emit()\"\n text=\"Switch To Table\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n text=\"Approve\"\n bgColor=\"#28a745\"\n textColor=\"white\"\n border=\"1px solid #28a745\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n</form>\n" }]
|
|
2122
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { currentData: [{
|
|
2123
|
+
type: Input
|
|
2124
|
+
}], switchView: [{
|
|
2125
|
+
type: Output
|
|
2126
|
+
}] } });
|
|
2127
|
+
|
|
2128
|
+
class UserAccessRequestStatusBadgeComponent {
|
|
2129
|
+
status = UserAccessRequestStatus.Pending;
|
|
2130
|
+
badgeConfig() {
|
|
2131
|
+
switch (this.status) {
|
|
2132
|
+
case UserAccessRequestStatus.Approved:
|
|
2133
|
+
return { bgColor: '#CAE1CC', textColor: '#4ABB54', label: 'Approved' };
|
|
2134
|
+
case UserAccessRequestStatus.Declined:
|
|
2135
|
+
return { bgColor: '#FFDFDF', textColor: '#EB5757', label: 'Rejected' };
|
|
2136
|
+
default:
|
|
2137
|
+
return { bgColor: '#827C7C', textColor: '#C3C3C3', label: 'Pending' };
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: { status: "status" }, ngImport: i0, template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n", styles: [""], dependencies: [{ kind: "component", type: i2.VerbenaBadgeComponent, selector: "verbena-badge", inputs: ["text", "bgColor", "textColor", "borderRadius", "pd", "fontSize", "width", "height"] }] });
|
|
2142
|
+
}
|
|
2143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserAccessRequestStatusBadgeComponent, decorators: [{
|
|
2144
|
+
type: Component,
|
|
2145
|
+
args: [{ selector: 'lib-user-access-request-status-badge', template: "<verbena-badge\n borderRadius=\"9px\"\n [bgColor]=\"badgeConfig().bgColor\"\n [textColor]=\"badgeConfig().textColor\"\n [text]=\"badgeConfig().label\"\n></verbena-badge>\n" }]
|
|
2146
|
+
}], propDecorators: { status: [{
|
|
2147
|
+
type: Input
|
|
2148
|
+
}] } });
|
|
2149
|
+
|
|
2150
|
+
class UserRequestApprovalComponent {
|
|
2151
|
+
cdr;
|
|
2152
|
+
service;
|
|
2153
|
+
cardDataView;
|
|
2154
|
+
dataView;
|
|
2155
|
+
columns = [
|
|
2156
|
+
{
|
|
2157
|
+
id: 'createdAt',
|
|
2158
|
+
header: 'Created',
|
|
2159
|
+
accessorKey: 'CreatedAt',
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
id: 'user',
|
|
2163
|
+
header: 'Name',
|
|
2164
|
+
accessorKey: 'Name',
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
id: 'mail',
|
|
2168
|
+
header: 'E-Mail',
|
|
2169
|
+
accessorKey: 'MailAddress',
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
id: 'phone',
|
|
2173
|
+
header: 'Phone Number',
|
|
2174
|
+
accessorKey: 'PhoneNumber',
|
|
2175
|
+
},
|
|
2176
|
+
{ id: 'actions', header: 'Actions', accessorKey: 'MailAddress' },
|
|
2177
|
+
];
|
|
2178
|
+
// visibleColumnDef: WritableSignal<ColumnDefinition<UserAccessRequest>[]> =
|
|
2179
|
+
// signal(columns);
|
|
2180
|
+
visibleColumnDef = this.columns;
|
|
2181
|
+
data = [];
|
|
2182
|
+
styles = baseStyle;
|
|
2183
|
+
currentData = null;
|
|
2184
|
+
isGridView = true;
|
|
2185
|
+
selected = null;
|
|
2186
|
+
cardData = mockData.map(({ Name, MailAddress, PhoneNumber, RoleID, Status }) => ({
|
|
2187
|
+
selected: false,
|
|
2188
|
+
title: Name,
|
|
2189
|
+
data: {
|
|
2190
|
+
Name,
|
|
2191
|
+
MailAddress,
|
|
2192
|
+
PhoneNumber,
|
|
2193
|
+
RoleID,
|
|
2194
|
+
Status,
|
|
2195
|
+
},
|
|
2196
|
+
body: [
|
|
2197
|
+
{ title: 'Name', value: Name },
|
|
2198
|
+
{ title: 'E-Mail Address', value: MailAddress },
|
|
2199
|
+
{ title: 'Phone Number', value: PhoneNumber ?? '' },
|
|
2200
|
+
],
|
|
2201
|
+
children: [],
|
|
2202
|
+
}));
|
|
2203
|
+
constructor(cdr, service) {
|
|
2204
|
+
this.cdr = cdr;
|
|
2205
|
+
this.service = service;
|
|
2206
|
+
}
|
|
2207
|
+
ngOnInit() {
|
|
2208
|
+
this.data = this.service.getMockUserRequests();
|
|
2209
|
+
}
|
|
2210
|
+
openDetailView(mailAddress) {
|
|
2211
|
+
const cardItem = this.getCardDataByMailAddress(mailAddress);
|
|
2212
|
+
if (cardItem && this.cardDataView) {
|
|
2213
|
+
this.dataView.toggleView();
|
|
2214
|
+
// First reset all selections
|
|
2215
|
+
this.cardData.forEach((item) => {
|
|
2216
|
+
item.selected = false;
|
|
2217
|
+
if (item.children) {
|
|
2218
|
+
item.children.forEach((child) => (child.selected = false));
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
// Set the selected item
|
|
2222
|
+
cardItem.selected = true;
|
|
2223
|
+
this.currentData = this.cardDataView.onItemClick(cardItem);
|
|
2224
|
+
// Force change detection if needed
|
|
2225
|
+
// this.changeDetectorRef.detectChanges();
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
getCardDataByMailAddress(mailAddress) {
|
|
2229
|
+
return this.cardData.find(({ data }) => data.MailAddress === mailAddress);
|
|
2230
|
+
}
|
|
2231
|
+
onViewChange(isGridView) {
|
|
2232
|
+
this.isGridView = isGridView;
|
|
2233
|
+
// Reset selection when switching views
|
|
2234
|
+
if (this.currentData) {
|
|
2235
|
+
this.cardDataView?.clearData();
|
|
2236
|
+
this.currentData = null;
|
|
2237
|
+
}
|
|
2238
|
+
console.log('SELECTED', this.selected);
|
|
2239
|
+
if (this.selected) {
|
|
2240
|
+
this.cardDataView.onItemClick(this.selected);
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
openFormView(index) {
|
|
2244
|
+
const item = this.cardData[index];
|
|
2245
|
+
console.log('ITEM = ', item);
|
|
2246
|
+
}
|
|
2247
|
+
handleExport(exportedData) {
|
|
2248
|
+
console.log('Exported data:', exportedData);
|
|
2249
|
+
this.downloadCSV(exportedData);
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
*
|
|
2253
|
+
* @param data Simple csv export for testing
|
|
2254
|
+
*/
|
|
2255
|
+
downloadCSV(data) {
|
|
2256
|
+
const headers = Object.keys(data[0]);
|
|
2257
|
+
const csvContent = [
|
|
2258
|
+
headers.join(','),
|
|
2259
|
+
...data.map((row) => headers.map((header) => row[header]).join(',')),
|
|
2260
|
+
].join('\n');
|
|
2261
|
+
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
|
2262
|
+
const link = document.createElement('a');
|
|
2263
|
+
if (link.download !== undefined) {
|
|
2264
|
+
const url = URL.createObjectURL(blob);
|
|
2265
|
+
link.setAttribute('href', url);
|
|
2266
|
+
link.setAttribute('download', 'export.csv');
|
|
2267
|
+
link.style.visibility = 'hidden';
|
|
2268
|
+
document.body.appendChild(link);
|
|
2269
|
+
link.click();
|
|
2270
|
+
document.body.removeChild(link);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
onSelectionChange(selectedRows) {
|
|
2274
|
+
console.log('Selection changed:', selectedRows);
|
|
2275
|
+
// Handle the selection change
|
|
2276
|
+
}
|
|
2277
|
+
/**
|
|
2278
|
+
* Copied over from card view doc until I understand usage
|
|
2279
|
+
*/
|
|
2280
|
+
selectedColumnCount = 0;
|
|
2281
|
+
selectedFilterTableCount = 0;
|
|
2282
|
+
isOPen = true;
|
|
2283
|
+
selectedSortCount = 0;
|
|
2284
|
+
showColumn = false;
|
|
2285
|
+
showSort = false;
|
|
2286
|
+
selectedAll = false;
|
|
2287
|
+
visibleColumns = columns.map((col) => ({
|
|
2288
|
+
checked: true,
|
|
2289
|
+
name: typeof col.header === 'string' ? col.header : col.id,
|
|
2290
|
+
type: DataFilterType.Bool,
|
|
2291
|
+
}));
|
|
2292
|
+
filterArray = [
|
|
2293
|
+
{
|
|
2294
|
+
name: 'Name',
|
|
2295
|
+
type: DataFilterType.String,
|
|
2296
|
+
checked: false,
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
name: 'MailAddress',
|
|
2300
|
+
type: DataFilterType.String,
|
|
2301
|
+
checked: false,
|
|
2302
|
+
},
|
|
2303
|
+
{
|
|
2304
|
+
name: 'PhoneNumber',
|
|
2305
|
+
type: DataFilterType.String,
|
|
2306
|
+
checked: false,
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
name: 'CreatedAt',
|
|
2310
|
+
type: DataFilterType.Date,
|
|
2311
|
+
checked: false,
|
|
2312
|
+
},
|
|
2313
|
+
];
|
|
2314
|
+
sortOptions = [
|
|
2315
|
+
{
|
|
2316
|
+
name: 'Name',
|
|
2317
|
+
type: DataFilterType.String,
|
|
2318
|
+
checked: false,
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
name: 'MailAddress',
|
|
2322
|
+
type: DataFilterType.String,
|
|
2323
|
+
checked: false,
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
name: 'PhoneNumber',
|
|
2327
|
+
type: DataFilterType.String,
|
|
2328
|
+
checked: false,
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
name: 'CreatedAt',
|
|
2332
|
+
type: DataFilterType.Date,
|
|
2333
|
+
checked: false,
|
|
2334
|
+
},
|
|
2335
|
+
];
|
|
2336
|
+
clearData() {
|
|
2337
|
+
this.currentData = {};
|
|
2338
|
+
}
|
|
2339
|
+
loadMore() {
|
|
2340
|
+
this.cardData = this.cardData.concat(this.cardData);
|
|
2341
|
+
}
|
|
2342
|
+
onColumnChange(event) {
|
|
2343
|
+
this.showColumn = event;
|
|
2344
|
+
}
|
|
2345
|
+
onSortChange(event) {
|
|
2346
|
+
this.showSort = event;
|
|
2347
|
+
console.log(event);
|
|
2348
|
+
}
|
|
2349
|
+
onColumnsUpdated(updatedColumns) {
|
|
2350
|
+
console.log(updatedColumns);
|
|
2351
|
+
const updatedColumnDef = [];
|
|
2352
|
+
updatedColumns.forEach((col) => {
|
|
2353
|
+
const matchingCol = this.columns.find((column) => column.header === col.name || column.id === col.name);
|
|
2354
|
+
if (matchingCol) {
|
|
2355
|
+
updatedColumnDef.push(matchingCol);
|
|
2356
|
+
}
|
|
2357
|
+
});
|
|
2358
|
+
console.log(updatedColumnDef);
|
|
2359
|
+
this.visibleColumnDef = [...updatedColumnDef];
|
|
2360
|
+
this.cdr.markForCheck();
|
|
2361
|
+
this.onColumnChange(false);
|
|
2362
|
+
this.selectedColumnCount = updatedColumns.length;
|
|
2363
|
+
}
|
|
2364
|
+
onSortUpdated(updatedSorts) {
|
|
2365
|
+
this.onSortChange(false);
|
|
2366
|
+
this.selectedSortCount = updatedSorts.length;
|
|
2367
|
+
console.log(updatedSorts);
|
|
2368
|
+
}
|
|
2369
|
+
onStateChange(event) {
|
|
2370
|
+
console.log(`State changed for ${event.key}:`, event.value);
|
|
2371
|
+
}
|
|
2372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestApprovalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UserRequestApprovalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: UserRequestApprovalComponent, selector: "lib-user-request-approval", viewQueries: [{ propertyName: "cardDataView", first: true, predicate: ["vdcv"], descendants: true }, { propertyName: "dataView", first: true, predicate: ["vdv"], descendants: true }], ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div grid-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div list-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4\">\n <div class=\"space-y-1\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"space-y-1\">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n </p>\n <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowDelete", "selectionChange"] }, { kind: "directive", type: i2.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i2.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "size"] }, { kind: "component", type: i2.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "gridIcon", "listIcon", "viewState", "searchTemplate", "columnTemplate", "filterTemplate", "sortTemplate", "exportTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "showColumnChild", "showSortChild", "showFilterChild", "showExportChild", "create", "showSelected"], outputs: ["viewChange", "stateChange"] }, { kind: "component", type: i2.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "onItemClick", "onCardChildClick"], outputs: ["loadMoreClick"] }, { kind: "component", type: i2.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "dataId"] }, { kind: "component", type: i2.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i2.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i2.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i2.SortTableComponent, selector: "verben-sort-table", inputs: ["enableDragAndDrop", "sortOptions", "resetText", "displayedOptions", "propertyText", "showMoreText", "sortButtonText", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "containerHeight"], outputs: ["selectedOptions"] }, { kind: "component", type: i2.VisibleColumnComponent, selector: "verben-visible-column", inputs: ["columns", "items", "enableDragAndDrop", "displayedColumns", "showMore", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth"], outputs: ["columnsUpdated"] }, { kind: "component", type: i2.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "tooltip"], outputs: ["filtersApplied"] }, { kind: "component", type: i2.DataExportComponent, selector: "lib-data-export", inputs: ["data"], outputs: ["exportDataEvent"] }, { kind: "component", type: UserRequestFormComponent, selector: "lib-user-request-form", inputs: ["currentData"], outputs: ["switchView"] }, { kind: "component", type: UserAccessRequestStatusBadgeComponent, selector: "lib-user-access-request-status-badge", inputs: ["status"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
|
|
2374
|
+
}
|
|
2375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: UserRequestApprovalComponent, decorators: [{
|
|
2376
|
+
type: Component,
|
|
2377
|
+
args: [{ selector: 'lib-user-request-approval', template: "<div class=\"space-y-8\">\n <verben-data-view\n #vdv\n [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: false\n }\"\n [buttonClass]=\"'my-custom-button-class'\"\n [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\"\n [selectedColumnCount]=\"0\"\n [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\"\n (viewChange)=\"onViewChange($event)\"\n (stateChange)=\"onStateChange($event)\"\n >\n <div grid-content>\n <lib-data-table\n [data]=\"data\"\n [columns]=\"visibleColumnDef\"\n [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-container libColumn=\"createdAt\">\n <ng-template #cell let-value>\n {{ value | date }}\n </ng-template>\n </ng-container>\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-value let-deleteRow let-rowIndex>\n <div class=\"flex gap-6\">\n <verben-svg\n (click)=\"openDetailView(value)\"\n icon=\"edit\"\n [width]=\"15\"\n [height]=\"15\"\n class=\"cursor-pointer\"\n ></verben-svg>\n <!-- <button (click)=\"openDetailView(value)\">Open</button>\n <button (click)=\"selected = cardData[rowIndex]; vdv.toggleView()\">\n Switch\n </button> -->\n <verben-svg\n icon=\"delete\"\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"deleteRow()\"\n class=\"cursor-pointer\"\n ></verben-svg>\n </div>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n <div list-content>\n <verben-card-data-view\n borderRadius=\"12px\"\n (loadMoreClick)=\"loadMore()\"\n #vdcv\n dataId=\"MailAddress\"\n border=\"5px\"\n [cardDataList]=\"cardData\"\n rbgColor=\"#f5f6f9\"\n mg=\"20px\"\n >\n <verben-left-card-data-view class=\"\">\n <verben-left-card-data\n #vlcd\n [parent]=\"vdcv\"\n dataId=\"MailAddress\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\"\n [cardDataList]=\"cardData\"\n >\n <ng-template #card let-item>\n <div (click)=\"currentData = vdcv.onItemClick(item)\" class=\"flex\">\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n (click)=\"vlcd.showChildren(item)\"\n [ngClass]=\"vlcd.showToggle(item) ? 'visible' : 'invisible'\"\n class=\"items-center flex pr-1 cursor-pointer\"\n [icon]=\"item.isChildrenExpanded ? 'minus' : 'plus'\"\n />\n <div\n (click)=\"currentData = vdcv.onItemClick(item)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\"\n >\n <div\n class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\"\n [ngClass]=\"\n item.selected ? 'bg-primary' : 'bg-secondary-200'\n \"\n ></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4\">\n <div class=\"space-y-1\">\n <span class=\"font-semibold text-[#404040]\">{{\n item.title\n }}</span>\n <p class=\"flex items-center\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Phone Number:</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\">{{\n item.data.PhoneNumber\n }}</span>\n </p>\n </div>\n\n <div class=\"space-y-1\">\n <p class=\"grid\">\n <label for=\"phone\" class=\"text-[10px] font-light\"\n >Role</label\n >\n <span id=\"phone\" class=\"text-sm font-medium\"\n >Manager</span\n >\n </p>\n <lib-user-access-request-status-badge\n [status]=\"item.data.Status\"\n ></lib-user-access-request-status-badge>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n ></lib-user-request-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"float-right\">\n <div class=\"flex gap-2\">\n <span class=\"paginator-text\"\n >{{ cardData.length }} records loaded</span\n >\n <button (click)=\"loadMore()\" class=\"load-more\">Load more</button>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <verben-visible-column\n (columnsUpdated)=\"onColumnsUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n [columns]=\"visibleColumns\"\n [displayedColumns]=\"5\"\n ></verben-visible-column>\n </div>\n <div filter-content>\n <verben-table-filter\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"420px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"\n ></verben-table-filter>\n </div>\n <div sort-content>\n <verben-sort-table\n (selectedOptions)=\"onSortUpdated($event)\"\n [border]=\"'1px solid rgba(212, 160, 7, 1)'\"\n borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\"\n bgColor=\"white\"\n width=\"400px\"\n textColor=\"black\"\n pd=\"1rem\"\n primaryColor=\"#FFE681\"\n secondaryColor=\"#3479E9\"\n tertiaryColor=\"#404040\"\n [enableDragAndDrop]=\"true\"\n [sortOptions]=\"sortOptions\"\n ></verben-sort-table>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n</div>\n" }]
|
|
2378
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: UserRequestApprovalService }], propDecorators: { cardDataView: [{
|
|
2379
|
+
type: ViewChild,
|
|
2380
|
+
args: ['vdcv']
|
|
2381
|
+
}], dataView: [{
|
|
2382
|
+
type: ViewChild,
|
|
2383
|
+
args: ['vdv']
|
|
2384
|
+
}] } });
|
|
2385
|
+
|
|
2386
|
+
class LibUserRequestApprovalModule {
|
|
2387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LibUserRequestApprovalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2388
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.9", ngImport: i0, type: LibUserRequestApprovalModule, declarations: [UserRequestApprovalComponent,
|
|
2389
|
+
UserRequestFormComponent,
|
|
2390
|
+
UserAccessRequestStatusBadgeComponent], imports: [CommonModule,
|
|
2391
|
+
DataTableModule,
|
|
2392
|
+
CardModule,
|
|
2393
|
+
SvgModule,
|
|
2394
|
+
DataViewModule,
|
|
2395
|
+
CardDataViewModule,
|
|
2396
|
+
SortTableModule,
|
|
2397
|
+
VisibleColumnModule,
|
|
2398
|
+
TableFilterModule,
|
|
2399
|
+
DataExportModule,
|
|
2400
|
+
FormsModule,
|
|
2401
|
+
ReactiveFormsModule,
|
|
2402
|
+
VerbenaInputModule,
|
|
2403
|
+
VerbenaButtonModule,
|
|
2404
|
+
VerbenaBadgeModule,
|
|
2405
|
+
DropDownModule], exports: [UserRequestApprovalComponent] });
|
|
2406
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LibUserRequestApprovalModule, providers: [UserRequestApprovalService], imports: [CommonModule,
|
|
2407
|
+
DataTableModule,
|
|
2408
|
+
CardModule,
|
|
2409
|
+
SvgModule,
|
|
2410
|
+
DataViewModule,
|
|
2411
|
+
CardDataViewModule,
|
|
2412
|
+
SortTableModule,
|
|
2413
|
+
VisibleColumnModule,
|
|
2414
|
+
TableFilterModule,
|
|
2415
|
+
DataExportModule,
|
|
2416
|
+
FormsModule,
|
|
2417
|
+
ReactiveFormsModule,
|
|
2418
|
+
VerbenaInputModule,
|
|
2419
|
+
VerbenaButtonModule,
|
|
2420
|
+
VerbenaBadgeModule,
|
|
2421
|
+
DropDownModule] });
|
|
2422
|
+
}
|
|
2423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: LibUserRequestApprovalModule, decorators: [{
|
|
2424
|
+
type: NgModule,
|
|
2425
|
+
args: [{
|
|
2426
|
+
declarations: [
|
|
2427
|
+
UserRequestApprovalComponent,
|
|
2428
|
+
UserRequestFormComponent,
|
|
2429
|
+
UserAccessRequestStatusBadgeComponent,
|
|
2430
|
+
],
|
|
2431
|
+
imports: [
|
|
2432
|
+
CommonModule,
|
|
2433
|
+
DataTableModule,
|
|
2434
|
+
CardModule,
|
|
2435
|
+
SvgModule,
|
|
2436
|
+
DataViewModule,
|
|
2437
|
+
CardDataViewModule,
|
|
2438
|
+
SortTableModule,
|
|
2439
|
+
VisibleColumnModule,
|
|
2440
|
+
TableFilterModule,
|
|
2441
|
+
DataExportModule,
|
|
2442
|
+
FormsModule,
|
|
2443
|
+
ReactiveFormsModule,
|
|
2444
|
+
VerbenaInputModule,
|
|
2445
|
+
VerbenaButtonModule,
|
|
2446
|
+
VerbenaBadgeModule,
|
|
2447
|
+
DropDownModule,
|
|
2448
|
+
],
|
|
2449
|
+
providers: [UserRequestApprovalService],
|
|
2450
|
+
exports: [UserRequestApprovalComponent],
|
|
2451
|
+
}]
|
|
2452
|
+
}] });
|
|
2453
|
+
|
|
1128
2454
|
/*
|
|
1129
2455
|
* Public API Surface of verben-ng-ui
|
|
1130
2456
|
*/
|
|
@@ -1136,5 +2462,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1136
2462
|
* Generated bundle index. Do not edit.
|
|
1137
2463
|
*/
|
|
1138
2464
|
|
|
1139
|
-
export { MailComponent, MailModule, MailValidationComponent, MailValidationModule, ResetPasswordComponent, ResetPasswordModule, SignInComponent, SignInModule, SignUpComponent, SignUpModule, TwoFactorAuthOtpComponent, TwoFactorAuthOtpModule, TwoFactorAuthSetupComponent, TwoFactorAuthSetupModule, UserRequestComponent, UserRequestModule };
|
|
2465
|
+
export { ForgotPasswordComponent, ForgotPasswordModule, LibUserRequestApprovalModule, MailComponent, MailModule, MailValidationComponent, MailValidationModule, ResetPasswordComponent, ResetPasswordModule, SERVICE_CONFIG, SignInComponent, SignInModule, SignUpComponent, SignUpModule, SsoComponent, SsoModule, TwoFactorAuthOtpComponent, TwoFactorAuthOtpModule, TwoFactorAuthSetupComponent, TwoFactorAuthSetupModule, UserRequestApprovalComponent, UserRequestApprovalService, UserRequestComponent, UserRequestModule };
|
|
1140
2466
|
//# sourceMappingURL=verben-authentication-ui.mjs.map
|