spiderly 19.0.1 → 19.0.3
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/fesm2022/spiderly.mjs +4382 -0
- package/fesm2022/spiderly.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/auth/login/login.component.d.ts +35 -0
- package/lib/components/auth/partials/auth.component.d.ts +21 -0
- package/lib/components/auth/partials/login-verification.component.d.ts +18 -0
- package/lib/components/auth/partials/registration-verification.component.d.ts +17 -0
- package/lib/components/auth/partials/verification-wrapper.component.d.ts +31 -0
- package/lib/components/auth/registration/registration.component.d.ts +34 -0
- package/lib/components/base-details/role-base-details.component.d.ts +50 -0
- package/lib/components/base-form/base-form copy.d.ts +54 -0
- package/lib/components/card-skeleton/card-skeleton.component.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +9 -0
- package/lib/components/index-card/index-card.component.d.ts +22 -0
- package/lib/components/info-card/info-card.component.d.ts +11 -0
- package/lib/components/layout/layout-base.component.d.ts +37 -0
- package/lib/components/layout/sidebar/menuitem.component.d.ts +43 -0
- package/lib/components/layout/sidebar/sidebar-menu.component.d.ts +23 -0
- package/lib/components/layout/sidebar/sidebar-menu.service.d.ts +12 -0
- package/lib/components/layout/sidebar/sidebar.component.d.ts +11 -0
- package/lib/components/layout/topbar/topbar.component.d.ts +45 -0
- package/lib/components/not-found/not-found.component.d.ts +9 -0
- package/lib/components/required/required.component.d.ts +6 -0
- package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +17 -0
- package/lib/components/spiderly-buttons/return-button/return-button.component.d.ts +10 -0
- package/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.d.ts +6 -0
- package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +27 -0
- package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts +8 -0
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +157 -0
- package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +11 -0
- package/lib/components/spiderly-form-control/spiderly-form-control.d.ts +37 -0
- package/lib/components/spiderly-panels/panel-body/panel-body.component.d.ts +9 -0
- package/lib/components/spiderly-panels/panel-footer/panel-footer.component.d.ts +8 -0
- package/lib/components/spiderly-panels/panel-header/panel-header.component.d.ts +29 -0
- package/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.d.ts +10 -0
- package/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.d.ts +25 -0
- package/lib/components/spiderly-panels/spiderly-panels.module.d.ts +14 -0
- package/lib/controls/base-autocomplete-control.d.ts +9 -0
- package/lib/controls/base-control.d.ts +23 -0
- package/lib/controls/base-dropdown-control.d.ts +18 -0
- package/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.d.ts +18 -0
- package/lib/controls/spiderly-calendar/spiderly-calendar.component.d.ts +13 -0
- package/lib/controls/spiderly-checkbox/spiderly-checkbox.component.d.ts +14 -0
- package/lib/controls/spiderly-colorpick/spiderly-colorpick.component.d.ts +11 -0
- package/lib/controls/spiderly-controls.module.d.ts +22 -0
- package/lib/controls/spiderly-dropdown/spiderly-dropdown.component.d.ts +14 -0
- package/lib/controls/spiderly-editor/spiderly-editor.component.d.ts +16 -0
- package/lib/controls/spiderly-file/spiderly-file.component.d.ts +36 -0
- package/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.d.ts +13 -0
- package/lib/controls/spiderly-multiselect/spiderly-multiselect.component.d.ts +11 -0
- package/lib/controls/spiderly-number/spiderly-number.component.d.ts +15 -0
- package/lib/controls/spiderly-password/spiderly-password.component.d.ts +12 -0
- package/lib/controls/spiderly-textarea/spiderly-textarea.component.d.ts +11 -0
- package/lib/controls/spiderly-textbox/spiderly-textbox.component.d.ts +15 -0
- package/lib/entities/base-entity.d.ts +14 -0
- package/lib/entities/codebook.d.ts +9 -0
- package/lib/entities/init-company-auth-dialog-details.d.ts +9 -0
- package/lib/entities/init-top-bar-data.d.ts +16 -0
- package/lib/entities/is-authorized-for-save-event.d.ts +9 -0
- package/lib/entities/last-menu-icon-index-clicked.d.ts +7 -0
- package/lib/entities/lazy-load-selected-ids-result.d.ts +9 -0
- package/{src/lib/entities/menuchangeevent.ts → lib/entities/menuchangeevent.d.ts} +4 -4
- package/lib/entities/mime-type.d.ts +11 -0
- package/lib/entities/namebook.d.ts +9 -0
- package/lib/entities/primeng-option.d.ts +9 -0
- package/lib/entities/security-entities.d.ts +211 -0
- package/lib/entities/simple-save-result.d.ts +7 -0
- package/lib/entities/spiderly-button.d.ts +13 -0
- package/{src/lib/entities/table-filter-context.ts → lib/entities/table-filter-context.d.ts} +5 -6
- package/lib/entities/table-filter-sort-meta.d.ts +4 -0
- package/{src/lib/entities/table-filter.ts → lib/entities/table-filter.d.ts} +23 -48
- package/lib/entities/table-response.d.ts +4 -0
- package/lib/enums/security-enums.d.ts +22 -0
- package/lib/enums/verification-type-codes.d.ts +4 -0
- package/lib/guards/auth.guard.d.ts +15 -0
- package/lib/guards/not-auth.guard.d.ts +12 -0
- package/lib/handlers/spiderly-error-handler.d.ts +14 -0
- package/lib/handlers/spiderly-transloco-fallback-strategy.d.ts +13 -0
- package/lib/interceptors/http-loading.interceptor.d.ts +2 -0
- package/lib/interceptors/json-parser.interceptor.d.ts +2 -0
- package/lib/interceptors/jwt.interceptor.d.ts +2 -0
- package/lib/interceptors/unauthorized.interceptor.d.ts +2 -0
- package/lib/modules/core.module.d.ts +2 -0
- package/lib/modules/spiderly-transloco.module.d.ts +15 -0
- package/lib/services/api.service.security.d.ts +35 -0
- package/lib/services/app-initializer.d.ts +4 -0
- package/lib/services/app-layout-base.service.d.ts +60 -0
- package/lib/services/auth-base.service.d.ts +55 -0
- package/lib/services/base-form.service.d.ts +27 -0
- package/lib/services/config-base.service.d.ts +24 -0
- package/lib/services/helper-functions.d.ts +37 -0
- package/lib/services/spiderly-message.service.d.ts +17 -0
- package/lib/services/spiderly-transloco-loader.d.ts +10 -0
- package/lib/services/translate-labels-abstract.service.d.ts +7 -0
- package/lib/services/validator-abstract.service.d.ts +13 -0
- package/package.json +66 -55
- package/{src/public-api.ts → public-api.d.ts} +90 -103
- package/{src/lib → styles}/styles/shared.scss +3 -6
- package/eslint.config.js +0 -32
- package/ng-package.json +0 -10
- package/src/lib/components/auth/login/login.component.html +0 -25
- package/src/lib/components/auth/login/login.component.ts +0 -77
- package/src/lib/components/auth/partials/auth.component.html +0 -29
- package/src/lib/components/auth/partials/auth.component.ts +0 -60
- package/src/lib/components/auth/partials/login-verification.component.html +0 -2
- package/src/lib/components/auth/partials/login-verification.component.ts +0 -41
- package/src/lib/components/auth/partials/registration-verification.component.html +0 -1
- package/src/lib/components/auth/partials/registration-verification.component.ts +0 -41
- package/src/lib/components/auth/partials/verification-wrapper.component.html +0 -39
- package/src/lib/components/auth/partials/verification-wrapper.component.ts +0 -68
- package/src/lib/components/auth/registration/registration.component.html +0 -31
- package/src/lib/components/auth/registration/registration.component.ts +0 -77
- package/src/lib/components/base-details/role-base-details.component.html +0 -33
- package/src/lib/components/base-details/role-base-details.component.ts +0 -194
- package/src/lib/components/base-form/base-form copy.ts +0 -356
- package/src/lib/components/card-skeleton/card-skeleton.component.html +0 -8
- package/src/lib/components/card-skeleton/card-skeleton.component.ts +0 -21
- package/src/lib/components/footer/app.footer.component.ts +0 -17
- package/src/lib/components/footer/footer.component.html +0 -3
- package/src/lib/components/footer/footer.component.ts +0 -17
- package/src/lib/components/index-card/index-card.component.html +0 -15
- package/src/lib/components/index-card/index-card.component.ts +0 -48
- package/src/lib/components/info-card/info-card.component.html +0 -18
- package/src/lib/components/info-card/info-card.component.ts +0 -29
- package/src/lib/components/layout/layout-base.component.ts +0 -140
- package/src/lib/components/layout/sidebar/menuitem.component.html +0 -40
- package/src/lib/components/layout/sidebar/menuitem.component.ts +0 -179
- package/src/lib/components/layout/sidebar/sidebar-menu.component.html +0 -6
- package/src/lib/components/layout/sidebar/sidebar-menu.component.ts +0 -44
- package/src/lib/components/layout/sidebar/sidebar-menu.service.ts +0 -22
- package/src/lib/components/layout/sidebar/sidebar.component.html +0 -1
- package/src/lib/components/layout/sidebar/sidebar.component.ts +0 -20
- package/src/lib/components/layout/topbar/topbar.component.html +0 -64
- package/src/lib/components/layout/topbar/topbar.component.ts +0 -137
- package/src/lib/components/not-found/not-found.component.html +0 -27
- package/src/lib/components/not-found/not-found.component.ts +0 -22
- package/src/lib/components/required/required.component.html +0 -1
- package/src/lib/components/required/required.component.ts +0 -13
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.html +0 -5
- package/src/lib/components/spiderly-buttons/google-button/google-button.component.ts +0 -53
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.html +0 -3
- package/src/lib/components/spiderly-buttons/return-button/return-button.component.ts +0 -35
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.html +0 -14
- package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.ts +0 -27
- package/src/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.ts +0 -61
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.html +0 -15
- package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.ts +0 -24
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.html +0 -93
- package/src/lib/components/spiderly-data-table/spiderly-data-table.component.ts +0 -614
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.html +0 -17
- package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.ts +0 -39
- package/src/lib/components/spiderly-form-control/spiderly-form-control.ts +0 -60
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.html +0 -8
- package/src/lib/components/spiderly-panels/panel-body/panel-body.component.ts +0 -16
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.html +0 -8
- package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.ts +0 -15
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.html +0 -25
- package/src/lib/components/spiderly-panels/panel-header/panel-header.component.ts +0 -69
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.html +0 -7
- package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.ts +0 -17
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.html +0 -40
- package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.ts +0 -42
- package/src/lib/components/spiderly-panels/spiderly-panels.module.ts +0 -32
- package/src/lib/controls/base-autocomplete-control.ts +0 -17
- package/src/lib/controls/base-control.ts +0 -60
- package/src/lib/controls/base-dropdown-control.ts +0 -37
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.html +0 -36
- package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.ts +0 -56
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.html +0 -21
- package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.ts +0 -37
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.html +0 -16
- package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.ts +0 -38
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.html +0 -33
- package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.ts +0 -40
- package/src/lib/controls/spiderly-controls.module.ts +0 -61
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.html +0 -27
- package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.ts +0 -39
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.html +0 -22
- package/src/lib/controls/spiderly-editor/spiderly-editor.component.ts +0 -58
- package/src/lib/controls/spiderly-file/spiderly-file.component.html +0 -54
- package/src/lib/controls/spiderly-file/spiderly-file.component.ts +0 -123
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.html +0 -30
- package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.ts +0 -38
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.html +0 -23
- package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.ts +0 -32
- package/src/lib/controls/spiderly-number/spiderly-number.component.html +0 -19
- package/src/lib/controls/spiderly-number/spiderly-number.component.ts +0 -37
- package/src/lib/controls/spiderly-password/spiderly-password.component.html +0 -17
- package/src/lib/controls/spiderly-password/spiderly-password.component.ts +0 -34
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.html +0 -18
- package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.ts +0 -32
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.html +0 -23
- package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.ts +0 -41
- package/src/lib/entities/base-entity.ts +0 -25
- package/src/lib/entities/codebook.ts +0 -23
- package/src/lib/entities/init-company-auth-dialog-details.ts +0 -22
- package/src/lib/entities/init-top-bar-data.ts +0 -35
- package/src/lib/entities/is-authorized-for-save-event.ts +0 -22
- package/src/lib/entities/last-menu-icon-index-clicked.ts +0 -18
- package/src/lib/entities/lazy-load-selected-ids-result.ts +0 -22
- package/src/lib/entities/mime-type.ts +0 -15
- package/src/lib/entities/namebook.ts +0 -22
- package/src/lib/entities/primeng-option.ts +0 -23
- package/src/lib/entities/readonly-object.ts +0 -1
- package/src/lib/entities/security-entities.ts +0 -548
- package/src/lib/entities/simple-save-result.ts +0 -19
- package/src/lib/entities/spiderly-button.ts +0 -30
- package/src/lib/entities/table-filter-sort-meta.ts +0 -5
- package/src/lib/entities/table-response.ts +0 -5
- package/src/lib/enums/security-enums.ts +0 -28
- package/src/lib/enums/verification-type-codes.ts +0 -5
- package/src/lib/guards/auth.guard.ts +0 -39
- package/src/lib/guards/not-auth.guard.ts +0 -32
- package/src/lib/handlers/spiderly-error-handler.ts +0 -32
- package/src/lib/handlers/spiderly-transloco-fallback-strategy.ts +0 -25
- package/src/lib/interceptors/http-loading.interceptor.ts +0 -21
- package/src/lib/interceptors/json-parser.interceptor.ts +0 -44
- package/src/lib/interceptors/jwt.interceptor.ts +0 -18
- package/src/lib/interceptors/unauthorized.interceptor.ts +0 -77
- package/src/lib/modules/core.module.ts +0 -22
- package/src/lib/modules/primeng.module.ts +0 -122
- package/src/lib/modules/spiderly-transloco.module.ts +0 -50
- package/src/lib/services/api.service.security.ts +0 -120
- package/src/lib/services/app-initializer.ts +0 -9
- package/src/lib/services/app-layout-base.service.ts +0 -184
- package/src/lib/services/auth-base.service.ts +0 -271
- package/src/lib/services/base-form.service.ts +0 -178
- package/src/lib/services/config-base.service.ts +0 -36
- package/src/lib/services/helper-functions.ts +0 -288
- package/src/lib/services/spiderly-message.service.ts +0 -66
- package/src/lib/services/spiderly-transloco-loader.ts +0 -15
- package/src/lib/services/translate-labels-abstract.service.ts +0 -13
- package/src/lib/services/validator-abstract.service.ts +0 -63
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/lib → styles}/components/spiderly-data-table/spiderly-data-table.component.scss +0 -0
- /package/{src/lib → styles}/components/spiderly-panels/panel-footer/panel-footer.component.scss +0 -0
- /package/{src/lib → styles}/components/spiderly-panels/spiderly-panel/spiderly-panel.component.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_config.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_content.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_footer.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_main.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_menu.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_mixins.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_preloading.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_responsive.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_spiderly-controls.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_topbar.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_typography.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_utils.scss +0 -0
- /package/{src/lib → styles}/styles/layout/_variables.scss +0 -0
- /package/{src/lib → styles}/styles/layout/layout.scss +0 -0
- /package/{src/lib → styles}/styles/styles.scss +0 -0
package/eslint.config.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
const tseslint = require("typescript-eslint");
|
|
3
|
-
const rootConfig = require("../../eslint.config.js");
|
|
4
|
-
|
|
5
|
-
module.exports = tseslint.config(
|
|
6
|
-
...rootConfig,
|
|
7
|
-
{
|
|
8
|
-
files: ["**/*.ts"],
|
|
9
|
-
rules: {
|
|
10
|
-
"@angular-eslint/directive-selector": [
|
|
11
|
-
"error",
|
|
12
|
-
{
|
|
13
|
-
type: "attribute",
|
|
14
|
-
prefix: "lib",
|
|
15
|
-
style: "camelCase",
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
"@angular-eslint/component-selector": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
type: "element",
|
|
22
|
-
prefix: "lib",
|
|
23
|
-
style: "kebab-case",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
files: ["**/*.html"],
|
|
30
|
-
rules: {},
|
|
31
|
-
}
|
|
32
|
-
);
|
package/ng-package.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
@if (loginFormGroup != null) {
|
|
3
|
-
@if (showEmailSentDialog == false) {
|
|
4
|
-
<auth (onCompanyNameChange)="companyNameChange($event)">
|
|
5
|
-
<form [formGroup]="formGroup" style="margin-bottom: 16px;"> <!-- FT: We are not loading anything from the server here so we don't need defer block -->
|
|
6
|
-
<div class="col-12" style="padding-left: 0; padding-right: 0; margin-bottom: 32px;">
|
|
7
|
-
<spiderly-textbox [control]="control('email', loginFormGroup)"></spiderly-textbox>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div style="display: flex; flex-direction: column; gap: 16px;">
|
|
11
|
-
<spiderly-button [label]="t('Login')" (onClick)="sendLoginVerificationEmail()" [outlined]="true" [style]="{width: '100%'}"></spiderly-button>
|
|
12
|
-
<!-- TODO FT: Add possibility to change this name from the specific project -->
|
|
13
|
-
<spiderly-button *ngIf="usersCanRegister" [label]="t('NewToJoinNow', {companyName: companyName})" routerLink="/registration" [style]="{width: '100%'}"></spiderly-button>
|
|
14
|
-
</div>
|
|
15
|
-
</form>
|
|
16
|
-
</auth>
|
|
17
|
-
}
|
|
18
|
-
@else {
|
|
19
|
-
<login-verification [email]="loginFormGroup.controls.email.getRawValue()"></login-verification>
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
@else {
|
|
23
|
-
<!-- TODO FT: Add skeleton -->
|
|
24
|
-
}
|
|
25
|
-
</ng-container>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
2
|
-
import { ChangeDetectorRef, Component, KeyValueDiffers, OnInit } from '@angular/core';
|
|
3
|
-
import { HttpClient } from '@angular/common/http';
|
|
4
|
-
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
5
|
-
import { BaseFormCopy } from '../../base-form/base-form copy';
|
|
6
|
-
import { Login } from '../../../entities/security-entities';
|
|
7
|
-
import { SpiderlyFormGroup } from '../../spiderly-form-control/spiderly-form-control';
|
|
8
|
-
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
9
|
-
import { BaseFormService } from '../../../services/base-form.service';
|
|
10
|
-
import { AuthBaseService } from '../../../services/auth-base.service';
|
|
11
|
-
import { ConfigBaseService } from '../../../services/config-base.service';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
14
|
-
import { AuthComponent } from '../partials/auth.component';
|
|
15
|
-
import { PrimengModule } from '../../../modules/primeng.module';
|
|
16
|
-
import { SpiderlyControlsModule } from '../../../controls/spiderly-controls.module';
|
|
17
|
-
import { LoginVerificationComponent } from '../partials/login-verification.component';
|
|
18
|
-
|
|
19
|
-
@Component({
|
|
20
|
-
selector: 'app-login',
|
|
21
|
-
templateUrl: './login.component.html',
|
|
22
|
-
imports: [
|
|
23
|
-
CommonModule,
|
|
24
|
-
ReactiveFormsModule,
|
|
25
|
-
AuthComponent,
|
|
26
|
-
PrimengModule,
|
|
27
|
-
SpiderlyControlsModule,
|
|
28
|
-
LoginVerificationComponent,
|
|
29
|
-
TranslocoDirective,
|
|
30
|
-
]
|
|
31
|
-
})
|
|
32
|
-
export class LoginComponent extends BaseFormCopy implements OnInit {
|
|
33
|
-
loginFormGroup = new SpiderlyFormGroup<Login>({});
|
|
34
|
-
|
|
35
|
-
companyName: string;
|
|
36
|
-
showEmailSentDialog: boolean = false;
|
|
37
|
-
usersCanRegister: boolean = this.config.usersCanRegister;
|
|
38
|
-
|
|
39
|
-
constructor(
|
|
40
|
-
protected override differs: KeyValueDiffers,
|
|
41
|
-
protected override http: HttpClient,
|
|
42
|
-
protected override messageService: SpiderlyMessageService,
|
|
43
|
-
protected override changeDetectorRef: ChangeDetectorRef,
|
|
44
|
-
protected override router: Router,
|
|
45
|
-
protected override route: ActivatedRoute,
|
|
46
|
-
protected override translocoService: TranslocoService,
|
|
47
|
-
protected override baseFormService: BaseFormService,
|
|
48
|
-
private authService: AuthBaseService,
|
|
49
|
-
private config: ConfigBaseService
|
|
50
|
-
) {
|
|
51
|
-
super(differs, http, messageService, changeDetectorRef, router, route, translocoService, baseFormService);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
override ngOnInit(){
|
|
55
|
-
this.initLoginFormGroup(new Login({}));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
initLoginFormGroup(model: Login){
|
|
59
|
-
this.initFormGroup(this.loginFormGroup, this.formGroup, model, model.typeName, []);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
companyNameChange(companyName: string){
|
|
63
|
-
this.companyName = companyName;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
sendLoginVerificationEmail() {
|
|
67
|
-
let isFormGroupValid: boolean = this.baseFormService.checkFormGroupValidity(this.loginFormGroup);
|
|
68
|
-
|
|
69
|
-
if (isFormGroupValid == false)
|
|
70
|
-
return;
|
|
71
|
-
|
|
72
|
-
this.authService.sendLoginVerificationEmail(this.loginFormGroup.getRawValue()).subscribe(()=>{
|
|
73
|
-
this.showEmailSentDialog = true;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
<div class="flex min-h-screen overflow-hidden" style="padding: 20px;">
|
|
3
|
-
<div class="flex flex-column w-full">
|
|
4
|
-
<div class="w-full sm:w-30rem" style="margin: auto; border-radius:50px; padding:0.3rem; background: linear-gradient(180deg, var(--p-primary-color) 10%, rgba(33, 150, 243, 0) 30%);">
|
|
5
|
-
<div class="surface-card py-6 px-5 sm:px-6" style="border-radius:45px;">
|
|
6
|
-
<div class="text-center" style="margin-bottom: 38px;">
|
|
7
|
-
<img *ngIf="image != null" [src]="image" alt="{{companyName}} Logo" title="{{companyName}} Logo" height="60">
|
|
8
|
-
<i *ngIf="image == null" class="pi pi-spin pi-spinner primary-color" style="font-size: 2rem"></i>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<ng-content></ng-content>
|
|
12
|
-
|
|
13
|
-
<div *ngIf="hasGoogleAuth && showGoogleAuth">
|
|
14
|
-
<div style="display: flex; align-items: center; gap: 7px; justify-content: center; margin-bottom: 16px;">
|
|
15
|
-
<div class="separator"></div>
|
|
16
|
-
<div>{{t('or')}}</div>
|
|
17
|
-
<div class="separator"></div>
|
|
18
|
-
</div>
|
|
19
|
-
<div>
|
|
20
|
-
<!-- https://code-maze.com/how-to-sign-in-with-google-angular-aspnet-webapi/ -->
|
|
21
|
-
<google-button (loginWithGoogle)="onGoogleSignIn($event)"></google-button>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</ng-container>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
|
2
|
-
import { CommonModule } from "@angular/common";
|
|
3
|
-
import { Subscription } from "rxjs";
|
|
4
|
-
import { TranslocoDirective } from "@jsverse/transloco";
|
|
5
|
-
import { GoogleButtonComponent } from "../../spiderly-buttons/google-button/google-button.component";
|
|
6
|
-
import { ConfigBaseService } from "../../../services/config-base.service";
|
|
7
|
-
import { AuthBaseService } from "../../../services/auth-base.service";
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'auth',
|
|
11
|
-
templateUrl: './auth.component.html',
|
|
12
|
-
styles: [],
|
|
13
|
-
imports: [
|
|
14
|
-
CommonModule,
|
|
15
|
-
GoogleButtonComponent,
|
|
16
|
-
TranslocoDirective,
|
|
17
|
-
]
|
|
18
|
-
})
|
|
19
|
-
export class AuthComponent {
|
|
20
|
-
private initCompanyAuthDialogDetailsSubscription: Subscription | null = null;
|
|
21
|
-
|
|
22
|
-
@Output() onCompanyNameChange: EventEmitter<string> = new EventEmitter();
|
|
23
|
-
@Input() showGoogleAuth: boolean = true;
|
|
24
|
-
|
|
25
|
-
hasGoogleAuth: boolean = this.config.googleAuth;
|
|
26
|
-
companyName: string;
|
|
27
|
-
image: string;
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
private config: ConfigBaseService,
|
|
31
|
-
private authService: AuthBaseService,
|
|
32
|
-
) {
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngOnInit(){
|
|
37
|
-
this.initCompanyDetails();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
initCompanyDetails() {
|
|
41
|
-
this.initCompanyAuthDialogDetailsSubscription = this.authService.initCompanyAuthDialogDetails().subscribe(initCompanyAuthDialogDetails => {
|
|
42
|
-
if (initCompanyAuthDialogDetails != null) {
|
|
43
|
-
this.image = initCompanyAuthDialogDetails.image;
|
|
44
|
-
this.companyName = initCompanyAuthDialogDetails.companyName;
|
|
45
|
-
this.onCompanyNameChange.next(this.companyName);
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
onGoogleSignIn(googleWrapper: any){
|
|
51
|
-
googleWrapper.click();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
ngOnDestroy(): void {
|
|
55
|
-
if (this.initCompanyAuthDialogDetailsSubscription) {
|
|
56
|
-
this.initCompanyAuthDialogDetailsSubscription.unsubscribe();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { VerificationWrapperComponent } from './verification-wrapper.component';
|
|
3
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
4
|
-
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
5
|
-
import { AuthBaseService } from '../../../services/auth-base.service';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'login-verification',
|
|
9
|
-
templateUrl: './login-verification.component.html',
|
|
10
|
-
imports: [
|
|
11
|
-
VerificationWrapperComponent
|
|
12
|
-
]
|
|
13
|
-
})
|
|
14
|
-
export class LoginVerificationComponent implements OnInit {
|
|
15
|
-
@Input() email: string;
|
|
16
|
-
@Input() userId: number;
|
|
17
|
-
|
|
18
|
-
constructor(
|
|
19
|
-
private authService: AuthBaseService,
|
|
20
|
-
private messageService: SpiderlyMessageService,
|
|
21
|
-
private translocoService: TranslocoService,
|
|
22
|
-
) {
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
ngOnInit(){
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
resendVerificationToken(){
|
|
29
|
-
this.authService.sendLoginVerificationEmail({email: this.email}).subscribe(() => {
|
|
30
|
-
this.messageService.successMessage(this.translocoService.translate('SuccessfullySentVerificationCode'));
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
onCodeSubmit(event: string){
|
|
35
|
-
this.authService.login({email: this.email, verificationCode: event}).subscribe(() => {
|
|
36
|
-
this.messageService.successMessage(this.translocoService.translate('YouHaveSuccessfullyVerifiedYourAccount'));
|
|
37
|
-
this.authService.navigateToDashboard();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<verification-wrapper [email]="email" (onResendVerificationToken)="resendVerificationToken()" (onCodeSubmit)="onCodeSubmit($event)"></verification-wrapper>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { VerificationWrapperComponent } from './verification-wrapper.component';
|
|
3
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
4
|
-
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
5
|
-
import { AuthBaseService } from '../../../services/auth-base.service';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'registration-verification',
|
|
9
|
-
templateUrl: './registration-verification.component.html',
|
|
10
|
-
imports: [
|
|
11
|
-
VerificationWrapperComponent
|
|
12
|
-
]
|
|
13
|
-
})
|
|
14
|
-
export class RegistrationVerificationComponent implements OnInit {
|
|
15
|
-
@Input() email: string;
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
-
private authService: AuthBaseService,
|
|
19
|
-
private messageService: SpiderlyMessageService,
|
|
20
|
-
private translocoService: TranslocoService,
|
|
21
|
-
) {
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
ngOnInit(){
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
resendVerificationToken(){
|
|
28
|
-
this.authService.sendRegistrationVerificationEmail({email: this.email}).subscribe(() => {
|
|
29
|
-
this.messageService.successMessage(this.translocoService.translate('SuccessfullySentVerificationCode'));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
onCodeSubmit(event: string){
|
|
34
|
-
this.authService.register({email: this.email, verificationCode: event}).subscribe(() => {
|
|
35
|
-
this.messageService.successMessage(this.translocoService.translate('YouHaveSuccessfullyVerifiedYourAccount'));
|
|
36
|
-
this.authService.navigateToDashboard();
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
<div class="min-h-screen" style="display: flex; justify-content: center; align-items: center;">
|
|
3
|
-
<div class="dialog" style="padding: 0px;">
|
|
4
|
-
@if (verificationTokenRequestFormGroup != null) {
|
|
5
|
-
<spiderly-panel>
|
|
6
|
-
<panel-header [title]="t('AccountVerificationHeader')" [showBigTitle]="true" icon="pi pi-envelope"></panel-header>
|
|
7
|
-
|
|
8
|
-
<panel-body>
|
|
9
|
-
<form class="grid">
|
|
10
|
-
<div class="col-12">
|
|
11
|
-
<div class="header">{{t('AccountVerificationTitle')}}</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="col-12">
|
|
14
|
-
{{t('AccountVerificationDescription', {email: email})}}
|
|
15
|
-
</div>
|
|
16
|
-
<div class="col-12">
|
|
17
|
-
<spiderly-textbox [control]="control('verificationCode', verificationTokenRequestFormGroup)"></spiderly-textbox>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="col-12">
|
|
20
|
-
<spiderly-button (onClick)="codeSubmit()" [label]="t('Submit')" icon="pi pi-verified"></spiderly-button>
|
|
21
|
-
</div>
|
|
22
|
-
</form>
|
|
23
|
-
</panel-body>
|
|
24
|
-
|
|
25
|
-
<panel-footer>
|
|
26
|
-
<a pButton class="p-button-link" [label]="t('GoToGmail')" icon="pi pi-external-link" href="https://mail.google.com/mail/u/" target="_blank" rel="noopener noreferrer"></a>
|
|
27
|
-
<a pButton class="p-button-link" [label]="t('GoToYahoo')" icon="pi pi-external-link" href="https://mail.yahoo.com/d/folders/1/" target="_blank" rel="noopener noreferrer"></a>
|
|
28
|
-
</panel-footer>
|
|
29
|
-
<panel-footer>
|
|
30
|
-
<div>{{t('ResendVerificationCodeFirstPart')}} <a class="link" (click)="resendVerificationToken()">{{t('ResendVerificationCodeLinkSecondPart')}}</a></div>
|
|
31
|
-
</panel-footer>
|
|
32
|
-
</spiderly-panel>
|
|
33
|
-
}
|
|
34
|
-
@else {
|
|
35
|
-
<!-- TODO FT: Add skeleton -->
|
|
36
|
-
}
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</ng-container>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, EventEmitter, Input, KeyValueDiffers, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
|
-
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { BaseFormCopy } from '../../base-form/base-form copy';
|
|
8
|
-
import { BaseFormService } from '../../../services/base-form.service';
|
|
9
|
-
import { SpiderlyFormGroup } from '../../spiderly-form-control/spiderly-form-control';
|
|
10
|
-
import { SpiderlyControlsModule } from '../../../controls/spiderly-controls.module';
|
|
11
|
-
import { VerificationTokenRequest } from '../../../entities/security-entities';
|
|
12
|
-
import { PrimengModule } from '../../../modules/primeng.module';
|
|
13
|
-
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'verification-wrapper',
|
|
17
|
-
templateUrl: './verification-wrapper.component.html',
|
|
18
|
-
imports: [
|
|
19
|
-
CommonModule,
|
|
20
|
-
PrimengModule,
|
|
21
|
-
FormsModule,
|
|
22
|
-
ReactiveFormsModule,
|
|
23
|
-
SpiderlyControlsModule,
|
|
24
|
-
TranslocoDirective,
|
|
25
|
-
]
|
|
26
|
-
})
|
|
27
|
-
export class VerificationWrapperComponent extends BaseFormCopy implements OnInit {
|
|
28
|
-
verificationTokenRequestFormGroup = new SpiderlyFormGroup<VerificationTokenRequest>({});
|
|
29
|
-
|
|
30
|
-
@Input() email: string;
|
|
31
|
-
@Output() onResendVerificationToken: EventEmitter<any> = new EventEmitter();
|
|
32
|
-
@Output() onCodeSubmit: EventEmitter<string> = new EventEmitter();
|
|
33
|
-
|
|
34
|
-
constructor(
|
|
35
|
-
protected override differs: KeyValueDiffers,
|
|
36
|
-
protected override http: HttpClient,
|
|
37
|
-
protected override messageService: SpiderlyMessageService,
|
|
38
|
-
protected override changeDetectorRef: ChangeDetectorRef,
|
|
39
|
-
protected override router: Router,
|
|
40
|
-
protected override route: ActivatedRoute,
|
|
41
|
-
protected override translocoService: TranslocoService,
|
|
42
|
-
protected override baseFormService: BaseFormService,
|
|
43
|
-
) {
|
|
44
|
-
super(differs, http, messageService, changeDetectorRef, router, route, translocoService, baseFormService);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
override ngOnInit(){
|
|
48
|
-
this.initVerificationTokenRequestFormGroup(new VerificationTokenRequest({email: this.email}));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
initVerificationTokenRequestFormGroup(model: VerificationTokenRequest){
|
|
52
|
-
this.initFormGroup(this.verificationTokenRequestFormGroup, this.formGroup, model, model.typeName, []);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
codeSubmit(){
|
|
56
|
-
let isValid: boolean = this.baseFormService.checkFormGroupValidity(this.verificationTokenRequestFormGroup);
|
|
57
|
-
|
|
58
|
-
if(isValid){
|
|
59
|
-
this.onCodeSubmit.next(this.verificationTokenRequestFormGroup.controls.verificationCode.getRawValue());
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
resendVerificationToken(){
|
|
64
|
-
this.onResendVerificationToken.next(null);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
@if (registrationFormGroup != null) {
|
|
3
|
-
@if (showEmailSentDialog == false) {
|
|
4
|
-
<auth (onCompanyNameChange)="companyNameChange($event)">
|
|
5
|
-
<form [formGroup]="formGroup" style="margin-bottom: 16px;"> <!-- FT: We are not loading anything from the server here so we don't need defer block -->
|
|
6
|
-
<div class="col-12" style="padding-left: 0; padding-right: 0;">
|
|
7
|
-
<spiderly-textbox [control]="control('email', registrationFormGroup)"></spiderly-textbox>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="mb-4 gap-5">
|
|
11
|
-
<div class="text-center" style="font-size: smaller;">
|
|
12
|
-
{{t('AgreementsOnRegister')}} <b routerLink="/user-agreement" class="primary-color cursor-pointer">{{t('UserAgreement')}}</b> {{t('and')}} <b routerLink="/privacy-policy" class="primary-color cursor-pointer">{{t('PrivacyPolicy')}}</b>.
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div style="display: flex; flex-direction: column; gap: 16px;">
|
|
17
|
-
<spiderly-button [label]="t('AgreeAndJoin')" (onClick)="sendRegistrationVerificationEmail()" [outlined]="true" [style]="{width: '100%'}"></spiderly-button>
|
|
18
|
-
<!-- TODO FT: Add possibility to change this name from the specific project -->
|
|
19
|
-
<spiderly-button [label]="t('AlreadyHasAccount', {companyName: companyName})" routerLink="/login" [style]="{width: '100%'}"></spiderly-button>
|
|
20
|
-
</div>
|
|
21
|
-
</form>
|
|
22
|
-
</auth>
|
|
23
|
-
}
|
|
24
|
-
@else {
|
|
25
|
-
<registration-verification [email]="registrationFormGroup.controls.email.getRawValue()"></registration-verification>
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
@else {
|
|
29
|
-
<!-- TODO FT: Add skeleton -->
|
|
30
|
-
}
|
|
31
|
-
</ng-container>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
2
|
-
import { ChangeDetectorRef, Component, KeyValueDiffers, OnInit } from '@angular/core';
|
|
3
|
-
import { HttpClient } from '@angular/common/http';
|
|
4
|
-
import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
|
|
5
|
-
import { LayoutBaseService } from '../../../services/app-layout-base.service';
|
|
6
|
-
import { AuthBaseService } from '../../../services/auth-base.service';
|
|
7
|
-
import { BaseFormCopy } from '../../base-form/base-form copy';
|
|
8
|
-
import { SpiderlyFormGroup } from '../../spiderly-form-control/spiderly-form-control';
|
|
9
|
-
import { Registration } from '../../../entities/security-entities';
|
|
10
|
-
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
11
|
-
import { BaseFormService } from '../../../services/base-form.service';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
14
|
-
import { AuthComponent } from '../partials/auth.component';
|
|
15
|
-
import { PrimengModule } from '../../../modules/primeng.module';
|
|
16
|
-
import { SpiderlyControlsModule } from '../../../controls/spiderly-controls.module';
|
|
17
|
-
import { RegistrationVerificationComponent } from '../partials/registration-verification.component';
|
|
18
|
-
|
|
19
|
-
@Component({
|
|
20
|
-
selector: 'app-registration',
|
|
21
|
-
templateUrl: './registration.component.html',
|
|
22
|
-
imports: [
|
|
23
|
-
CommonModule,
|
|
24
|
-
ReactiveFormsModule,
|
|
25
|
-
AuthComponent,
|
|
26
|
-
PrimengModule,
|
|
27
|
-
SpiderlyControlsModule,
|
|
28
|
-
RegistrationVerificationComponent,
|
|
29
|
-
TranslocoDirective,
|
|
30
|
-
]
|
|
31
|
-
})
|
|
32
|
-
export class RegistrationComponent extends BaseFormCopy implements OnInit {
|
|
33
|
-
registrationFormGroup = new SpiderlyFormGroup<Registration>({});
|
|
34
|
-
|
|
35
|
-
companyName: string;
|
|
36
|
-
showEmailSentDialog: boolean = false;
|
|
37
|
-
|
|
38
|
-
constructor(
|
|
39
|
-
protected override differs: KeyValueDiffers,
|
|
40
|
-
protected override http: HttpClient,
|
|
41
|
-
protected override messageService: SpiderlyMessageService,
|
|
42
|
-
protected override changeDetectorRef: ChangeDetectorRef,
|
|
43
|
-
protected override router: Router,
|
|
44
|
-
protected override route: ActivatedRoute,
|
|
45
|
-
protected override translocoService: TranslocoService,
|
|
46
|
-
protected override baseFormService: BaseFormService,
|
|
47
|
-
public layoutService: LayoutBaseService,
|
|
48
|
-
private authService: AuthBaseService,
|
|
49
|
-
) {
|
|
50
|
-
super(differs, http, messageService, changeDetectorRef, router, route, translocoService, baseFormService);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
override ngOnInit(){
|
|
54
|
-
this.initRegistrationFormGroup(new Registration({}));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
initRegistrationFormGroup(model: Registration){
|
|
58
|
-
this.initFormGroup(this.registrationFormGroup, this.formGroup, model, model.typeName, []);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
companyNameChange(companyName: string){
|
|
62
|
-
this.companyName = companyName;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
sendRegistrationVerificationEmail() {
|
|
66
|
-
let isFormGroupValid: boolean = this.baseFormService.checkFormGroupValidity(this.registrationFormGroup);
|
|
67
|
-
|
|
68
|
-
if (isFormGroupValid == false)
|
|
69
|
-
return;
|
|
70
|
-
|
|
71
|
-
// const returnUrl = this.route.snapshot.queryParams['returnUrl'] || '';
|
|
72
|
-
this.authService.sendRegistrationVerificationEmail(this.registrationFormGroup.getRawValue()).subscribe(() => {
|
|
73
|
-
this.showEmailSentDialog = true;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<ng-container *transloco="let t">
|
|
2
|
-
<spiderly-panel>
|
|
3
|
-
<panel-header></panel-header>
|
|
4
|
-
|
|
5
|
-
<panel-body>
|
|
6
|
-
<form *ngIf="loading === false" class="grid"> <!-- FT: Don't put @deffer it's not working as expected -->
|
|
7
|
-
<div class="col-12">
|
|
8
|
-
<spiderly-textbox [control]="control('name', roleFormGroup)"></spiderly-textbox>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="col-12">
|
|
11
|
-
<spiderly-textarea [control]="control('description', roleFormGroup)"></spiderly-textarea>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="col-12">
|
|
14
|
-
<spiderly-multiautocomplete [control]="selectedUsersForRole" [options]="usersForRoleOptions" (onTextInput)="searchUsersForRole($event)" [label]="t('Users')"></spiderly-multiautocomplete>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="col-12">
|
|
17
|
-
<spiderly-multiselect [control]="selectedPermissionsForRole" [options]="permissionsForRoleOptions" [label]="t('Permissions')"></spiderly-multiselect>
|
|
18
|
-
</div>
|
|
19
|
-
</form>
|
|
20
|
-
|
|
21
|
-
<card-skeleton *ngIf="loading === true" [height]="502"></card-skeleton>
|
|
22
|
-
|
|
23
|
-
</panel-body>
|
|
24
|
-
|
|
25
|
-
<panel-footer>
|
|
26
|
-
<spiderly-button [disabled]="!isAuthorizedForSave" (onClick)="save()" [label]="t('Save')" icon="pi pi-save"></spiderly-button>
|
|
27
|
-
@for (button of additionalButtons; track button.label) {
|
|
28
|
-
<spiderly-button (onClick)="button.onClick()" [disabled]="button.disabled" [label]="button.label" [icon]="button.icon"></spiderly-button>
|
|
29
|
-
}
|
|
30
|
-
<return-button></return-button>
|
|
31
|
-
</panel-footer>
|
|
32
|
-
</spiderly-panel>
|
|
33
|
-
</ng-container>
|