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
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
2
|
-
import { ErrorHandler, Injectable } from '@angular/core';
|
|
3
|
-
import { SpiderlyMessageService } from '../services/spiderly-message.service';
|
|
4
|
-
import { HttpErrorResponse } from '@angular/common/http';
|
|
5
|
-
import { ConfigBaseService } from '../services/config-base.service';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class SpiderlyErrorHandler implements ErrorHandler {
|
|
11
|
-
constructor(
|
|
12
|
-
private messageService: SpiderlyMessageService,
|
|
13
|
-
private translocoService: TranslocoService,
|
|
14
|
-
private config: ConfigBaseService,
|
|
15
|
-
) {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
handleError(error: any): void {
|
|
20
|
-
if(this.config.production == false){
|
|
21
|
-
console.error(error);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if(error instanceof HttpErrorResponse == false){
|
|
25
|
-
this.messageService.errorMessage(
|
|
26
|
-
this.translocoService.translate('UnexpectedErrorDetails'),
|
|
27
|
-
this.translocoService.translate('UnexpectedErrorTitle'),
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { TranslocoFallbackStrategy, TranslocoService } from '@jsverse/transloco';
|
|
3
|
-
|
|
4
|
-
import { HashMap, TranslocoMissingHandler, TranslocoMissingHandlerData } from "@jsverse/transloco";
|
|
5
|
-
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root'
|
|
8
|
-
})
|
|
9
|
-
export class SpiderlyTranslocoFallbackStrategy implements TranslocoFallbackStrategy {
|
|
10
|
-
getNextLangs(failedLang: string): string[] {
|
|
11
|
-
return ['sr-Latn-RS.generated'];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class SpiderlyTranslocoMissingHandler implements TranslocoMissingHandler {
|
|
17
|
-
constructor(private translocoService: TranslocoService) {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
handle(key: string, data: TranslocoMissingHandlerData, params?: HashMap) {
|
|
22
|
-
return this.translocoService.translate(key, params, `${this.translocoService.getActiveLang()}.generated`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { HttpEvent, HttpInterceptorFn } from "@angular/common/http";
|
|
2
|
-
import { inject } from "@angular/core";
|
|
3
|
-
import { NgxSpinnerService } from "ngx-spinner";
|
|
4
|
-
import { Observable, finalize } from "rxjs";
|
|
5
|
-
|
|
6
|
-
export const httpLoadingInterceptor: HttpInterceptorFn = (req, next) => {
|
|
7
|
-
const spinner = inject(NgxSpinnerService);
|
|
8
|
-
|
|
9
|
-
const shouldSkipSpinner = req.params.has('X-Skip-Spinner'); // Using this for multiautocomplete, autocomplete, dropdown, table etc...
|
|
10
|
-
|
|
11
|
-
if (!shouldSkipSpinner)
|
|
12
|
-
spinner.show();
|
|
13
|
-
|
|
14
|
-
return next(req).pipe(
|
|
15
|
-
finalize(() => {
|
|
16
|
-
if (!shouldSkipSpinner){
|
|
17
|
-
spinner.hide();
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
) as Observable<HttpEvent<any>>;
|
|
21
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { HttpEvent, HttpResponse, HttpInterceptorFn } from '@angular/common/http';
|
|
2
|
-
import { tap } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
export const jsonHttpInterceptor: HttpInterceptorFn = (req, next) => {
|
|
5
|
-
const dateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
|
|
6
|
-
|
|
7
|
-
const convertDates = (
|
|
8
|
-
object: unknown,
|
|
9
|
-
parent?: Record<string, unknown> | unknown[],
|
|
10
|
-
key?: number | string,
|
|
11
|
-
) => {
|
|
12
|
-
if (object === null) return;
|
|
13
|
-
|
|
14
|
-
if (typeof object === 'string') {
|
|
15
|
-
if (dateRegex.test(object)) {
|
|
16
|
-
/**
|
|
17
|
-
* @see https://stackoverflow.com/a/54733846/1306679
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
parent[key] = new Date(object);
|
|
21
|
-
}
|
|
22
|
-
} else if (Array.isArray(object)) {
|
|
23
|
-
for (let i = 0; i < object.length; i++)
|
|
24
|
-
convertDates(object[i], object, i);
|
|
25
|
-
} else {
|
|
26
|
-
for (const key of Object.keys(object as Record<string, unknown>)) {
|
|
27
|
-
convertDates(
|
|
28
|
-
(object as Record<string, unknown>)[key],
|
|
29
|
-
object as Record<string, unknown>,
|
|
30
|
-
key,
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return next(req)
|
|
37
|
-
.pipe(
|
|
38
|
-
tap((event: HttpEvent<any>) => {
|
|
39
|
-
if (event instanceof HttpResponse) {
|
|
40
|
-
convertDates(event.body);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
));
|
|
44
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { inject } from '@angular/core';
|
|
2
|
-
import { HttpInterceptorFn } from '@angular/common/http';
|
|
3
|
-
import { ConfigBaseService } from '../services/config-base.service';
|
|
4
|
-
|
|
5
|
-
export const jwtInterceptor: HttpInterceptorFn = (req, next) => {
|
|
6
|
-
const config = inject(ConfigBaseService);
|
|
7
|
-
|
|
8
|
-
const accessToken = localStorage.getItem('access_token');
|
|
9
|
-
const isApiUrl = req.url.startsWith(config.apiUrl);
|
|
10
|
-
|
|
11
|
-
if (accessToken && isApiUrl) {
|
|
12
|
-
req = req.clone({
|
|
13
|
-
setHeaders: { Authorization: `Bearer ${accessToken}` },
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return next(req);
|
|
18
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { inject } from '@angular/core';
|
|
2
|
-
import { HttpRequest, HttpErrorResponse, HttpInterceptorFn } from '@angular/common/http';
|
|
3
|
-
import { Observable, of, throwError } from 'rxjs';
|
|
4
|
-
import { catchError } from 'rxjs/operators';
|
|
5
|
-
import { SpiderlyMessageService } from '../services/spiderly-message.service';
|
|
6
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
7
|
-
import { ConfigBaseService } from '../services/config-base.service';
|
|
8
|
-
|
|
9
|
-
export const unauthorizedInterceptor: HttpInterceptorFn = (req, next) => {
|
|
10
|
-
const messageService = inject(SpiderlyMessageService);
|
|
11
|
-
const translocoService = inject(TranslocoService);
|
|
12
|
-
const config = inject(ConfigBaseService);
|
|
13
|
-
|
|
14
|
-
const handleAuthError = (err: HttpErrorResponse, request: HttpRequest<any>): Observable<any> => {
|
|
15
|
-
if (!config.production) {
|
|
16
|
-
console.error(err);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let errorResponse = err.error;
|
|
20
|
-
|
|
21
|
-
if (request.responseType != 'json')
|
|
22
|
-
errorResponse= JSON.parse(err.error);
|
|
23
|
-
|
|
24
|
-
if (err.status == 0) {
|
|
25
|
-
messageService.warningMessageWithTimeout( // FT: Had problem when the server is shut down, and try to refresh token, warning message didn't appear
|
|
26
|
-
translocoService.translate('ServerLostConnectionDetails'),
|
|
27
|
-
translocoService.translate('ServerLostConnectionTitle'),
|
|
28
|
-
);
|
|
29
|
-
return of(err.message);
|
|
30
|
-
}
|
|
31
|
-
else if (err.status == 403) {
|
|
32
|
-
messageService.warningMessage(
|
|
33
|
-
translocoService.translate('PermissionErrorDetails'),
|
|
34
|
-
translocoService.translate('PermissionErrorTitle'),
|
|
35
|
-
);
|
|
36
|
-
return of(err.message);
|
|
37
|
-
}
|
|
38
|
-
else if (err.status == 404) {
|
|
39
|
-
messageService.warningMessage(
|
|
40
|
-
translocoService.translate('NotFoundDetails'),
|
|
41
|
-
translocoService.translate('NotFoundTitle'),
|
|
42
|
-
);
|
|
43
|
-
return of(err.message);
|
|
44
|
-
}
|
|
45
|
-
else if (err.status == 400 || err.status == 401) {
|
|
46
|
-
messageService.warningMessage(
|
|
47
|
-
errorResponse.message ?? translocoService.translate('BadRequestDetails'),
|
|
48
|
-
translocoService.translate('Warning'),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
if(err.status == 401) {
|
|
52
|
-
// authService.logout();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return of(err.message);
|
|
56
|
-
}
|
|
57
|
-
else if (err.status == 419) { // FT: We don't want to show error message to the user, we just log him out.
|
|
58
|
-
return of(err.message);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
messageService.errorMessage(
|
|
62
|
-
errorResponse.message,
|
|
63
|
-
translocoService.translate('UnexpectedErrorTitle'),
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
return of(err.message);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return throwError(err);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return next(req).pipe(
|
|
73
|
-
catchError((err) => {
|
|
74
|
-
return handleAuthError(err, req);
|
|
75
|
-
})
|
|
76
|
-
);
|
|
77
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, makeEnvironmentProviders, APP_INITIALIZER, ErrorHandler } from "@angular/core";
|
|
2
|
-
import { MessageService, ConfirmationService } from "primeng/api";
|
|
3
|
-
import { authInitializer } from "../services/app-initializer";
|
|
4
|
-
import { AuthBaseService } from "../services/auth-base.service";
|
|
5
|
-
import { SpiderlyErrorHandler } from "../handlers/spiderly-error-handler";
|
|
6
|
-
|
|
7
|
-
export function provideSpiderlyCore(): EnvironmentProviders {
|
|
8
|
-
return makeEnvironmentProviders([
|
|
9
|
-
MessageService,
|
|
10
|
-
ConfirmationService,
|
|
11
|
-
{
|
|
12
|
-
provide: APP_INITIALIZER,
|
|
13
|
-
useFactory: authInitializer,
|
|
14
|
-
multi: true,
|
|
15
|
-
deps: [AuthBaseService],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
provide: ErrorHandler,
|
|
19
|
-
useClass: SpiderlyErrorHandler,
|
|
20
|
-
},
|
|
21
|
-
]);
|
|
22
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { ButtonModule } from 'primeng/button';
|
|
3
|
-
import { CheckboxModule } from 'primeng/checkbox';
|
|
4
|
-
import { DialogModule } from 'primeng/dialog';
|
|
5
|
-
import { SelectModule } from 'primeng/select';
|
|
6
|
-
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
7
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
8
|
-
import { TextareaModule } from 'primeng/textarea';
|
|
9
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
10
|
-
import { PasswordModule } from 'primeng/password';
|
|
11
|
-
import { TableModule } from 'primeng/table';
|
|
12
|
-
import { ToastModule } from 'primeng/toast';
|
|
13
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
14
|
-
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
15
|
-
import { SidebarModule } from 'primeng/sidebar';
|
|
16
|
-
import { BadgeModule } from 'primeng/badge';
|
|
17
|
-
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
18
|
-
import { RippleModule } from 'primeng/ripple';
|
|
19
|
-
import { DialogService } from 'primeng/dynamicdialog';
|
|
20
|
-
import { PanelModule } from 'primeng/panel';
|
|
21
|
-
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
22
|
-
import { AvatarModule } from 'primeng/avatar';
|
|
23
|
-
import { AvatarGroupModule } from 'primeng/avatargroup';
|
|
24
|
-
import { ProgressBarModule } from 'primeng/progressbar';
|
|
25
|
-
import { DividerModule } from 'primeng/divider';
|
|
26
|
-
import { InputNumberModule } from 'primeng/inputnumber';
|
|
27
|
-
import { OverlayPanelModule } from 'primeng/overlaypanel';
|
|
28
|
-
import { MenuModule } from 'primeng/menu';
|
|
29
|
-
import { PaginatorModule } from 'primeng/paginator';
|
|
30
|
-
import { EditorModule } from 'primeng/editor';
|
|
31
|
-
import { InputGroupModule } from 'primeng/inputgroup';
|
|
32
|
-
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
33
|
-
import { TimelineModule } from 'primeng/timeline';
|
|
34
|
-
import { CardModule } from 'primeng/card';
|
|
35
|
-
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
36
|
-
import { FileUploadModule } from 'primeng/fileupload';
|
|
37
|
-
import { DataViewModule } from 'primeng/dataview';
|
|
38
|
-
import { DatePickerModule } from 'primeng/datepicker';
|
|
39
|
-
|
|
40
|
-
@NgModule({
|
|
41
|
-
imports: [
|
|
42
|
-
TableModule,
|
|
43
|
-
ButtonModule,
|
|
44
|
-
MultiSelectModule,
|
|
45
|
-
InputTextModule,
|
|
46
|
-
TextareaModule,
|
|
47
|
-
SelectModule,
|
|
48
|
-
TooltipModule,
|
|
49
|
-
InputSwitchModule,
|
|
50
|
-
DialogModule,
|
|
51
|
-
DatePickerModule,
|
|
52
|
-
CheckboxModule,
|
|
53
|
-
PasswordModule,
|
|
54
|
-
ToastModule,
|
|
55
|
-
ConfirmDialogModule,
|
|
56
|
-
SidebarModule,
|
|
57
|
-
BadgeModule,
|
|
58
|
-
RadioButtonModule,
|
|
59
|
-
RippleModule,
|
|
60
|
-
PanelModule,
|
|
61
|
-
AutoCompleteModule,
|
|
62
|
-
AvatarModule,
|
|
63
|
-
AvatarGroupModule,
|
|
64
|
-
ProgressBarModule,
|
|
65
|
-
DividerModule,
|
|
66
|
-
InputNumberModule,
|
|
67
|
-
OverlayPanelModule,
|
|
68
|
-
MenuModule,
|
|
69
|
-
PaginatorModule,
|
|
70
|
-
EditorModule,
|
|
71
|
-
InputGroupModule,
|
|
72
|
-
InputGroupAddonModule,
|
|
73
|
-
TimelineModule,
|
|
74
|
-
CardModule,
|
|
75
|
-
ColorPickerModule,
|
|
76
|
-
FileUploadModule,
|
|
77
|
-
DataViewModule,
|
|
78
|
-
],
|
|
79
|
-
exports: [
|
|
80
|
-
TableModule,
|
|
81
|
-
ButtonModule,
|
|
82
|
-
MultiSelectModule,
|
|
83
|
-
InputTextModule,
|
|
84
|
-
TextareaModule,
|
|
85
|
-
SelectModule,
|
|
86
|
-
TooltipModule,
|
|
87
|
-
InputSwitchModule,
|
|
88
|
-
DialogModule,
|
|
89
|
-
DatePickerModule,
|
|
90
|
-
CheckboxModule,
|
|
91
|
-
PasswordModule,
|
|
92
|
-
ToastModule,
|
|
93
|
-
ConfirmDialogModule,
|
|
94
|
-
SidebarModule,
|
|
95
|
-
BadgeModule,
|
|
96
|
-
RadioButtonModule,
|
|
97
|
-
RippleModule,
|
|
98
|
-
PanelModule,
|
|
99
|
-
AutoCompleteModule,
|
|
100
|
-
AvatarModule,
|
|
101
|
-
AvatarGroupModule,
|
|
102
|
-
ProgressBarModule,
|
|
103
|
-
DividerModule,
|
|
104
|
-
InputNumberModule,
|
|
105
|
-
OverlayPanelModule,
|
|
106
|
-
MenuModule,
|
|
107
|
-
PaginatorModule,
|
|
108
|
-
EditorModule,
|
|
109
|
-
InputGroupModule,
|
|
110
|
-
InputGroupAddonModule,
|
|
111
|
-
TimelineModule,
|
|
112
|
-
CardModule,
|
|
113
|
-
ColorPickerModule,
|
|
114
|
-
FileUploadModule,
|
|
115
|
-
DataViewModule
|
|
116
|
-
],
|
|
117
|
-
declarations: [],
|
|
118
|
-
providers: [
|
|
119
|
-
DialogService,
|
|
120
|
-
],
|
|
121
|
-
})
|
|
122
|
-
export class PrimengModule {}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { provideTransloco, TranslocoModule } from '@jsverse/transloco';
|
|
2
|
-
import { EnvironmentProviders, importProvidersFrom, ModuleWithProviders, NgModule } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
import { SpiderlyTranslocoLoader } from '../services/spiderly-transloco-loader';
|
|
5
|
-
import { provideTranslocoPreloadLangs } from '@jsverse/transloco-preload-langs';
|
|
6
|
-
|
|
7
|
-
export function provideSpiderlyTransloco(config?: SpiderlyTranslocoConfig): EnvironmentProviders {
|
|
8
|
-
return importProvidersFrom(
|
|
9
|
-
SpiderlyTranslocoModule.forRoot(config)
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [TranslocoModule],
|
|
15
|
-
exports: [TranslocoModule],
|
|
16
|
-
})
|
|
17
|
-
export class SpiderlyTranslocoModule {
|
|
18
|
-
|
|
19
|
-
static forRoot(config?: SpiderlyTranslocoConfig): ModuleWithProviders<SpiderlyTranslocoModule> {
|
|
20
|
-
return {
|
|
21
|
-
ngModule: SpiderlyTranslocoModule,
|
|
22
|
-
providers: [
|
|
23
|
-
provideTranslocoPreloadLangs(['sr-Latn-RS']),
|
|
24
|
-
provideTransloco({
|
|
25
|
-
config: {
|
|
26
|
-
availableLangs: config?.availableLangs ?? [
|
|
27
|
-
'en', 'en.generated',
|
|
28
|
-
'sr-Latn-RS', 'sr-Latn-RS.generated',
|
|
29
|
-
],
|
|
30
|
-
defaultLang: config?.defaultLang ?? 'en',
|
|
31
|
-
fallbackLang: config?.fallbackLang ?? 'en.generated',
|
|
32
|
-
missingHandler: {
|
|
33
|
-
useFallbackTranslation: true,
|
|
34
|
-
logMissingKey: false,
|
|
35
|
-
},
|
|
36
|
-
reRenderOnLangChange: true,
|
|
37
|
-
},
|
|
38
|
-
loader: SpiderlyTranslocoLoader
|
|
39
|
-
}),
|
|
40
|
-
],
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface SpiderlyTranslocoConfig {
|
|
47
|
-
availableLangs: string[];
|
|
48
|
-
defaultLang: string;
|
|
49
|
-
fallbackLang: string;
|
|
50
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { Namebook } from '../entities/namebook';
|
|
5
|
-
import { TableFilter } from '../entities/table-filter';
|
|
6
|
-
import { Login, Registration, RegistrationVerificationResult, RefreshTokenRequest, AuthResult, Role, User, ExternalProvider, VerificationTokenRequest, RoleSaveBody, RoleMainUIForm } from '../entities/security-entities';
|
|
7
|
-
import { ConfigBaseService } from './config-base.service';
|
|
8
|
-
import { TableResponse } from '../entities/table-response';
|
|
9
|
-
|
|
10
|
-
@Injectable({
|
|
11
|
-
providedIn: 'root'
|
|
12
|
-
})
|
|
13
|
-
export class ApiSecurityService {
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
protected http: HttpClient,
|
|
17
|
-
protected config: ConfigBaseService
|
|
18
|
-
) {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//#region Authentication
|
|
23
|
-
|
|
24
|
-
register = (request: VerificationTokenRequest): Observable<AuthResult> => {
|
|
25
|
-
return this.http.post<AuthResult>(`${this.config.apiUrl}/Security/Register`, request, this.config.httpOptions);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
sendRegistrationVerificationEmail = (registrationDTO: Registration): Observable<RegistrationVerificationResult> => {
|
|
29
|
-
return this.http.post<RegistrationVerificationResult>(`${this.config.apiUrl}/Security/SendRegistrationVerificationEmail`, registrationDTO, this.config.httpOptions);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
login = (request: VerificationTokenRequest): Observable<AuthResult> => {
|
|
33
|
-
return this.http.post<AuthResult>(`${this.config.apiUrl}/Security/Login`, request, this.config.httpOptions);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
loginExternal = (externalProviderDTO: ExternalProvider): Observable<AuthResult> => {
|
|
37
|
-
return this.http.post<AuthResult>(`${this.config.apiUrl}/Security/LoginExternal`, externalProviderDTO, this.config.httpOptions);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
sendLoginVerificationEmail = (loginDTO: Login): Observable<any> => {
|
|
41
|
-
return this.http.post<any>(`${this.config.apiUrl}/Security/SendLoginVerificationEmail`, loginDTO, this.config.httpOptions);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
logout = (browserId: string): Observable<any> => {
|
|
46
|
-
return this.http.get<any>(`${this.config.apiUrl}/Security/Logout?browserId=${browserId}`);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
refreshToken = (request: RefreshTokenRequest): Observable<AuthResult> => {
|
|
50
|
-
return this.http.post<AuthResult>(`${this.config.apiUrl}/Security/RefreshToken`, request, this.config.httpOptions);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
|
|
55
|
-
//#region User
|
|
56
|
-
|
|
57
|
-
getCurrentUser = (): Observable<User> => {
|
|
58
|
-
return this.http.get<User>(`${this.config.apiUrl}/Security/GetCurrentUser`, this.config.httpSkipSpinnerOptions);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
getCurrentUserPermissionCodes = (): Observable<string[]> => {
|
|
62
|
-
return this.http.get<string[]>(`${this.config.apiUrl}/Security/GetCurrentUserPermissionCodes`, this.config.httpSkipSpinnerOptions);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
|
|
67
|
-
//#region Role
|
|
68
|
-
|
|
69
|
-
getRoleTableData = (dto: TableFilter): Observable<TableResponse> => {
|
|
70
|
-
return this.http.post<TableResponse>(`${this.config.apiUrl}/Security/GetRoleTableData`, dto, this.config.httpSkipSpinnerOptions);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
exportRoleTableDataToExcel = (dto: TableFilter): Observable<any> => {
|
|
74
|
-
return this.http.post<any>(`${this.config.apiUrl}/Security/ExportRoleTableDataToExcel`, dto, this.config.httpOptions);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
deleteRole = (id: number): Observable<any> => {
|
|
78
|
-
return this.http.delete<any>(`${this.config.apiUrl}/Security/DeleteRole?id=${id}`);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
getRoleMainUIFormDTO = (id: number): Observable<RoleMainUIForm> => {
|
|
82
|
-
return this.http.get<RoleMainUIForm>(`${this.config.apiUrl}/Security/GetRoleMainUIFormDTO?id=${id}`);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
getRole = (id: number): Observable<Role> => {
|
|
86
|
-
return this.http.get<Role>(`${this.config.apiUrl}/Security/GetRole?id=${id}`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
saveRole = (dto: RoleSaveBody): Observable<Role> => {
|
|
90
|
-
return this.http.put<Role>(`${this.config.apiUrl}/Security/SaveRole`, dto, this.config.httpOptions);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
getUsersNamebookListForRole = (roleId: number): Observable<Namebook[]> => {
|
|
94
|
-
return this.http.get<Namebook[]>(`${this.config.apiUrl}/Security/GetUsersNamebookListForRole?roleId=${roleId}`, this.config.httpSkipSpinnerOptions);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
getPermissionsDropdownListForRole = (): Observable<Namebook[]> => {
|
|
98
|
-
return this.http.get<Namebook[]>(`${this.config.apiUrl}/Security/GetPermissionsDropdownListForRole`, this.config.httpSkipSpinnerOptions);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
getPermissionsNamebookListForRole = (roleId: number): Observable<Namebook[]> => {
|
|
102
|
-
return this.http.get<Namebook[]>(`${this.config.apiUrl}/Security/GetPermissionsNamebookListForRole?roleId=${roleId}`, this.config.httpSkipSpinnerOptions);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
getUsersAutocompleteListForRole = (limit: number, query: string): Observable<Namebook[]> => {
|
|
106
|
-
return this.http.get<Namebook[]>(`${this.config.apiUrl}/Security/GetUsersAutocompleteListForRole?limit=${limit}&query=${query}`, this.config.httpSkipSpinnerOptions);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
|
|
111
|
-
//#region Notification
|
|
112
|
-
|
|
113
|
-
getUnreadNotificationsCountForCurrentUser = (): Observable<number> => {
|
|
114
|
-
return this.http.get<number>(`${this.config.apiUrl}/Notification/GetUnreadNotificationsCountForCurrentUser`, this.config.httpSkipSpinnerOptions);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
//#endregion
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { AuthBaseService } from './auth-base.service';
|
|
3
|
-
import { AuthResult } from '../entities/security-entities';
|
|
4
|
-
|
|
5
|
-
export function authInitializer(authService: AuthBaseService): () => Observable<AuthResult> {
|
|
6
|
-
return () => {
|
|
7
|
-
return authService.refreshToken();
|
|
8
|
-
};
|
|
9
|
-
}
|