@posiwise/common-services 0.1.87 → 0.1.89
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/posiwise-common-services.mjs +268 -226
- package/fesm2022/posiwise-common-services.mjs.map +1 -1
- package/lib/common-services.interface.d.ts +5 -0
- package/lib/user.service.d.ts +15 -1
- package/package.json +8 -10
- package/esm2022/index.mjs +0 -47
- package/esm2022/lib/ab-test.service.mjs +0 -55
- package/esm2022/lib/ahoy.service.mjs +0 -93
- package/esm2022/lib/auth.service.mjs +0 -322
- package/esm2022/lib/base-http.service.mjs +0 -98
- package/esm2022/lib/brain-api-http.service.mjs +0 -26
- package/esm2022/lib/brain.service.mjs +0 -21
- package/esm2022/lib/common-services.interface.mjs +0 -2
- package/esm2022/lib/common-services.module.mjs +0 -23
- package/esm2022/lib/common.service.mjs +0 -134
- package/esm2022/lib/custom-preloading.service.mjs +0 -38
- package/esm2022/lib/dashboard.service.mjs +0 -21
- package/esm2022/lib/data.service.mjs +0 -21
- package/esm2022/lib/date-formatter.service.mjs +0 -82
- package/esm2022/lib/effects/user.effects.mjs +0 -27
- package/esm2022/lib/form-helper.service.mjs +0 -27
- package/esm2022/lib/geo.service.mjs +0 -40
- package/esm2022/lib/google-analytics.service.mjs +0 -121
- package/esm2022/lib/group.service.mjs +0 -122
- package/esm2022/lib/hopscotch.service.mjs +0 -48
- package/esm2022/lib/integrations-api-http.service.mjs +0 -28
- package/esm2022/lib/link-loader.service.mjs +0 -50
- package/esm2022/lib/local-storage.service.mjs +0 -32
- package/esm2022/lib/logo-caching.service.mjs +0 -65
- package/esm2022/lib/mailbox.service.mjs +0 -66
- package/esm2022/lib/main-api-http.service.mjs +0 -26
- package/esm2022/lib/notification.service.mjs +0 -70
- package/esm2022/lib/number-picker.service.mjs +0 -43
- package/esm2022/lib/permission.service.mjs +0 -252
- package/esm2022/lib/primeNgHelper.mjs +0 -18
- package/esm2022/lib/product.service.mjs +0 -78
- package/esm2022/lib/profile.service.mjs +0 -64
- package/esm2022/lib/qualification.service.mjs +0 -29
- package/esm2022/lib/script-loader.service.mjs +0 -79
- package/esm2022/lib/secure-token-storage.service.mjs +0 -264
- package/esm2022/lib/sentry.service.mjs +0 -384
- package/esm2022/lib/seo.service.mjs +0 -43
- package/esm2022/lib/socket.service.mjs +0 -29
- package/esm2022/lib/subscription.service.mjs +0 -129
- package/esm2022/lib/tag.service.mjs +0 -101
- package/esm2022/lib/tips.service.mjs +0 -38
- package/esm2022/lib/toast.service.mjs +0 -85
- package/esm2022/lib/user.service.mjs +0 -115
- package/esm2022/lib/validation.service.mjs +0 -36
- package/esm2022/lib/window.service.mjs +0 -20
- package/esm2022/posiwise-common-services.mjs +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Inject, Injectable, isDevMode, inject, NgModule, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/router';
|
|
4
4
|
import { NavigationEnd } from '@angular/router';
|
|
5
5
|
import * as i1 from '@posiwise/app-config-service';
|
|
@@ -8,28 +8,28 @@ import { DOCUMENT, CommonModule } from '@angular/common';
|
|
|
8
8
|
import * as i1$2 from '@angular/common/http';
|
|
9
9
|
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
|
10
10
|
import { throwError, of, BehaviorSubject, tap, timer } from 'rxjs';
|
|
11
|
-
import { catchError, switchMap, map, mergeMap, tap as tap$1, distinctUntilChanged } from 'rxjs/operators';
|
|
11
|
+
import { catchError, take, switchMap, map, mergeMap, tap as tap$1, distinctUntilChanged } from 'rxjs/operators';
|
|
12
12
|
import { HelperService } from '@posiwise/helper-service';
|
|
13
13
|
import * as i1$1 from 'ngx-toastr';
|
|
14
|
-
import { getUser,
|
|
14
|
+
import { getUser, SetUser, UserActionTypes, appReducers } from '@posiwise/app-store';
|
|
15
15
|
import * as i1$3 from '@ngrx/effects';
|
|
16
16
|
import { Actions, createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
17
17
|
import * as i2 from '@ngrx/store';
|
|
18
18
|
import { StoreModule } from '@ngrx/store';
|
|
19
|
-
import { INTEGRATIONS_API_PREFIX, MAIN_API_PREFIX, USER_PATH, TOKEN_HEADER_KEY, NEWSLETTER_CONFIRMATION_PATH, NEWSLETTER_UNSUBSCRIBE_PATH, CAPTCHA_VALIDATION_PATH, SOCIAL_LOGIN_PATH, TOKEN_KEY, PERMISSION_NAMES, ADMIN_SUB_MENU_WHITELIST, AB_TEST_ACTIONS, GEO_PATH,
|
|
19
|
+
import { INTEGRATIONS_API_PREFIX, MAIN_API_PREFIX, PROJECT_PATH, USER_PATH, TOKEN_HEADER_KEY, NEWSLETTER_CONFIRMATION_PATH, NEWSLETTER_UNSUBSCRIBE_PATH, CAPTCHA_VALIDATION_PATH, SOCIAL_LOGIN_PATH, TOKEN_KEY, PERMISSION_NAMES, ADMIN_SUB_MENU_WHITELIST, AB_TEST_ACTIONS, GEO_PATH, PRODUCT_PATH, CONTACT_US_PATH, INCIDENTS_PATH, INCIDENTS_PATH_ADMIN, NEWSLETTERS_PATH, NEWSLETTER_SUBSCRIPTION_PATH, ADMIN_FAQS_PATH, FAQS_PATH, ORGANIZATIONS_PATH, GLOBAL_SUBSCRIPTION_CONFIGS_PATH, GLOBAL_CONFIGS_PATH, USER_LOGIN_NOTIFICATION, FEEDBACK_QUESTIONS_PATH, USER_FEEDBACKS_PATH, CUSTOMER_SUPPORT_PATH, ADMIN_TAG_PATH, ADMIN_TAG_CATEGORIES_PATH, ADMIN_PATH, QUALIFICATIONS_PATH, SOCKET_TYPE, BRAIN_API_PREFIX } from '@posiwise/common-utilities';
|
|
20
20
|
import swal from 'sweetalert2';
|
|
21
|
+
import moment from 'moment';
|
|
21
22
|
import * as i1$4 from '@angular/platform-browser';
|
|
22
23
|
import cloneDeep from 'lodash/cloneDeep';
|
|
23
24
|
import pickBy from 'lodash/pickBy';
|
|
24
25
|
import * as i2$1 from 'ngx-cookie';
|
|
25
26
|
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
|
26
27
|
import isNumber from 'lodash/isNumber';
|
|
27
|
-
import moment from 'moment';
|
|
28
28
|
import { NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
|
|
29
29
|
import { webSocket } from 'rxjs/webSocket';
|
|
30
30
|
import { StatusCodes } from 'http-status-codes';
|
|
31
31
|
import { fromError } from 'stacktrace-js';
|
|
32
|
-
import { createErrorHandler, init,
|
|
32
|
+
import { createErrorHandler, init, withScope, captureException } from '@sentry/angular';
|
|
33
33
|
|
|
34
34
|
class ScriptLoaderService {
|
|
35
35
|
constructor(document) {
|
|
@@ -94,10 +94,10 @@ class ScriptLoaderService {
|
|
|
94
94
|
style.href = styleUrl;
|
|
95
95
|
head.appendChild(style);
|
|
96
96
|
}
|
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
98
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScriptLoaderService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
98
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScriptLoaderService, providedIn: 'root' }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScriptLoaderService, decorators: [{
|
|
101
101
|
type: Injectable,
|
|
102
102
|
args: [{
|
|
103
103
|
providedIn: 'root'
|
|
@@ -213,10 +213,10 @@ class GoogleAnalyticsService {
|
|
|
213
213
|
this.subscription.unsubscribe();
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
217
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GoogleAnalyticsService, deps: [{ token: i3.Router }, { token: ScriptLoaderService }, { token: i1.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
217
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GoogleAnalyticsService }); }
|
|
218
218
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
|
|
220
220
|
type: Injectable
|
|
221
221
|
}], ctorParameters: () => [{ type: i3.Router }, { type: ScriptLoaderService }, { type: i1.AppConfigService }] });
|
|
222
222
|
|
|
@@ -290,10 +290,10 @@ class CustomToastService {
|
|
|
290
290
|
this.error(message);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
294
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomToastService, deps: [{ token: i1$1.ToastrService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
294
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomToastService, providedIn: 'root' }); }
|
|
295
295
|
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomToastService, decorators: [{
|
|
297
297
|
type: Injectable,
|
|
298
298
|
args: [{
|
|
299
299
|
providedIn: 'root'
|
|
@@ -384,10 +384,10 @@ class BaseHttpService {
|
|
|
384
384
|
this.toast.showToast(error);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
388
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BaseHttpService, deps: [{ token: i1$2.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
388
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BaseHttpService }); }
|
|
389
389
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BaseHttpService, decorators: [{
|
|
391
391
|
type: Injectable
|
|
392
392
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i0.Injector }] });
|
|
393
393
|
|
|
@@ -402,10 +402,10 @@ class IntegrationsApiHttpService extends BaseHttpService {
|
|
|
402
402
|
: config?.['links']?.integrations_api;
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
406
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
405
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IntegrationsApiHttpService, deps: [{ token: i1$2.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
406
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IntegrationsApiHttpService, providedIn: 'root' }); }
|
|
407
407
|
}
|
|
408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IntegrationsApiHttpService, decorators: [{
|
|
409
409
|
type: Injectable,
|
|
410
410
|
args: [{
|
|
411
411
|
providedIn: 'root'
|
|
@@ -431,10 +431,10 @@ class LocalStorage {
|
|
|
431
431
|
getItem(key) {
|
|
432
432
|
return localStorage.getItem(key);
|
|
433
433
|
}
|
|
434
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
435
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LocalStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
435
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LocalStorage, providedIn: 'root' }); }
|
|
436
436
|
}
|
|
437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LocalStorage, decorators: [{
|
|
438
438
|
type: Injectable,
|
|
439
439
|
args: [{
|
|
440
440
|
providedIn: 'root'
|
|
@@ -450,10 +450,10 @@ class MainApiHttpService extends BaseHttpService {
|
|
|
450
450
|
this.baseUrl = isDevMode() ? MAIN_API_PREFIX : config?.['links']?.main_api;
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
454
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
453
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MainApiHttpService, deps: [{ token: i1$2.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
454
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MainApiHttpService, providedIn: 'root' }); }
|
|
455
455
|
}
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MainApiHttpService, decorators: [{
|
|
457
457
|
type: Injectable,
|
|
458
458
|
args: [{
|
|
459
459
|
providedIn: 'root'
|
|
@@ -707,10 +707,10 @@ class SecureTokenStorageService {
|
|
|
707
707
|
this.phonegapTokenSubject.next(phonegapToken);
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
711
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
710
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecureTokenStorageService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
711
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecureTokenStorageService, providedIn: 'root' }); }
|
|
712
712
|
}
|
|
713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecureTokenStorageService, decorators: [{
|
|
714
714
|
type: Injectable,
|
|
715
715
|
args: [{
|
|
716
716
|
providedIn: 'root'
|
|
@@ -720,12 +720,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
720
720
|
args: [DOCUMENT]
|
|
721
721
|
}] }] });
|
|
722
722
|
|
|
723
|
+
class ProfileService {
|
|
724
|
+
constructor(api) {
|
|
725
|
+
this.api = api;
|
|
726
|
+
this.endpoint = PROJECT_PATH;
|
|
727
|
+
}
|
|
728
|
+
updateUserProfile(user) {
|
|
729
|
+
const formData = new FormData();
|
|
730
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
731
|
+
for (const key in user) {
|
|
732
|
+
if (key in user) {
|
|
733
|
+
formData.append(key, user[key]);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return this.api.put('/user', formData);
|
|
737
|
+
}
|
|
738
|
+
getUserProfile(slug) {
|
|
739
|
+
return this.api.get(`/users/${slug}/profile/`);
|
|
740
|
+
}
|
|
741
|
+
getUserObject(objectType, slug) {
|
|
742
|
+
return this.api.get(`/users/${slug}/get_object?object=${objectType}`);
|
|
743
|
+
}
|
|
744
|
+
getProjects(slug) {
|
|
745
|
+
return this.api.get(`/users/${slug}/projects`);
|
|
746
|
+
}
|
|
747
|
+
addProjects(data) {
|
|
748
|
+
return this.api.post(this.endpoint, data);
|
|
749
|
+
}
|
|
750
|
+
updateProjects(id, data) {
|
|
751
|
+
return this.api.put(`${this.endpoint}${id}`, data);
|
|
752
|
+
}
|
|
753
|
+
deleteProject(id) {
|
|
754
|
+
return this.api.delete(`${this.endpoint}/${id}`);
|
|
755
|
+
}
|
|
756
|
+
addProjectPictures(data) {
|
|
757
|
+
return this.api.uploadWithData('/project_pictures', data);
|
|
758
|
+
}
|
|
759
|
+
getProjectPictures(slug) {
|
|
760
|
+
return this.api.get(`/users/${slug}/project_pictures`);
|
|
761
|
+
}
|
|
762
|
+
deletePicture(projectId) {
|
|
763
|
+
return this.api.delete(`/project_pictures/${projectId}`);
|
|
764
|
+
}
|
|
765
|
+
// Recommendations
|
|
766
|
+
postProjectRecommendation(data) {
|
|
767
|
+
return this.api.post(`/project_recommendations`, data);
|
|
768
|
+
}
|
|
769
|
+
postLinks(data) {
|
|
770
|
+
return this.api.post('/user_links', data);
|
|
771
|
+
}
|
|
772
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProfileService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
773
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
|
|
774
|
+
}
|
|
775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProfileService, decorators: [{
|
|
776
|
+
type: Injectable,
|
|
777
|
+
args: [{
|
|
778
|
+
providedIn: 'root'
|
|
779
|
+
}]
|
|
780
|
+
}], ctorParameters: () => [{ type: MainApiHttpService }] });
|
|
781
|
+
|
|
723
782
|
class UserService {
|
|
724
|
-
constructor(api, store, router) {
|
|
783
|
+
constructor(api, store, router, appConfigService, profileService, toast) {
|
|
725
784
|
this.api = api;
|
|
726
785
|
this.store = store;
|
|
727
786
|
this.router = router;
|
|
787
|
+
this.appConfigService = appConfigService;
|
|
788
|
+
this.profileService = profileService;
|
|
789
|
+
this.toast = toast;
|
|
728
790
|
this.endpoint = USER_PATH;
|
|
791
|
+
this.isTosModalOpen = false;
|
|
729
792
|
}
|
|
730
793
|
getUserState() {
|
|
731
794
|
return this.store.select(getUser);
|
|
@@ -736,8 +799,81 @@ class UserService {
|
|
|
736
799
|
if (data?.auth?.should_enforce_2fa) {
|
|
737
800
|
this.router.navigate(['settings/security']);
|
|
738
801
|
}
|
|
802
|
+
this.checkAndHandleTosAcceptance(data);
|
|
739
803
|
}));
|
|
740
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
* Ensure the current user has accepted the latest Terms of Service for this domain.
|
|
807
|
+
* If the domain has a newer TOS version than the user's accepted timestamp, a blocking
|
|
808
|
+
* SweetAlert2 modal is shown that forces the user to accept before continuing.
|
|
809
|
+
*/
|
|
810
|
+
checkAndHandleTosAcceptance(user) {
|
|
811
|
+
if (!user || this.isTosModalOpen) {
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
this.appConfigService.appConfig$.pipe(take(1)).subscribe(config => {
|
|
815
|
+
const tosUpdatedAt = config?.['tos_updated_at'];
|
|
816
|
+
if (!tosUpdatedAt) {
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
const userAcceptedAt = user.tos_accepted_at;
|
|
820
|
+
// If user has already accepted a TOS version that is newer or equal, nothing to do
|
|
821
|
+
if (userAcceptedAt && !moment(userAcceptedAt).isBefore(moment(tosUpdatedAt))) {
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
this.isTosModalOpen = true;
|
|
825
|
+
const mainTosId = config?.['main_tos_id'] ?? null;
|
|
826
|
+
const tosUrl = mainTosId ? `/privacy-and-tos/${mainTosId}` : '/privacy-and-tos';
|
|
827
|
+
swal.fire({
|
|
828
|
+
icon: 'info',
|
|
829
|
+
title: 'Accept Terms of Service',
|
|
830
|
+
html: `By clicking continue, you agree to the terms of our <a href="${tosUrl}" target="_blank" rel="noopener noreferrer">Privacy Policy and Platform Agreement</a>.`,
|
|
831
|
+
confirmButtonText: 'Accept and Continue',
|
|
832
|
+
allowOutsideClick: false,
|
|
833
|
+
allowEscapeKey: false,
|
|
834
|
+
showCancelButton: false,
|
|
835
|
+
reverseButtons: false,
|
|
836
|
+
focusConfirm: true
|
|
837
|
+
}).then(result => {
|
|
838
|
+
if (!result.isConfirmed) {
|
|
839
|
+
// Modal cannot really be dismissed without confirmation due to config above,
|
|
840
|
+
// but guard just in case.
|
|
841
|
+
this.isTosModalOpen = false;
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
// Match the backend ISO 8601 format (e.g. 2025-12-15T10:27:11.250Z)
|
|
845
|
+
const nowUtc = new Date().toISOString();
|
|
846
|
+
this.profileService.updateUserProfile({ tos_accepted_at: nowUtc }).subscribe({
|
|
847
|
+
next: () => {
|
|
848
|
+
const updatedUser = {
|
|
849
|
+
...user,
|
|
850
|
+
tos_accepted_at: nowUtc
|
|
851
|
+
};
|
|
852
|
+
this.store.dispatch(new SetUser(updatedUser));
|
|
853
|
+
this.toast.success('Terms of Service accepted');
|
|
854
|
+
this.isTosModalOpen = false;
|
|
855
|
+
},
|
|
856
|
+
error: err => {
|
|
857
|
+
this.handleTosAcceptanceError(err, user);
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
});
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
handleTosAcceptanceError(err, user) {
|
|
864
|
+
const message = HelperService.getErrorMessage(err?.error ?? err);
|
|
865
|
+
swal.fire({
|
|
866
|
+
icon: 'error',
|
|
867
|
+
title: 'Unable to record acceptance',
|
|
868
|
+
text: message,
|
|
869
|
+
confirmButtonText: 'Try again',
|
|
870
|
+
allowOutsideClick: false,
|
|
871
|
+
allowEscapeKey: false
|
|
872
|
+
}).then(() => {
|
|
873
|
+
this.isTosModalOpen = false;
|
|
874
|
+
this.checkAndHandleTosAcceptance(user);
|
|
875
|
+
});
|
|
876
|
+
}
|
|
741
877
|
followUser(id) {
|
|
742
878
|
return this.api.post(`${this.endpoint}/toggle_relationship/${id}`);
|
|
743
879
|
}
|
|
@@ -813,15 +949,15 @@ class UserService {
|
|
|
813
949
|
refreshUserApiTokens() {
|
|
814
950
|
return this.api.get(`${this.endpoint}/refresh_user_api_tokens`);
|
|
815
951
|
}
|
|
816
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
817
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
952
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserService, deps: [{ token: MainApiHttpService }, { token: i2.Store }, { token: i3.Router }, { token: i1.AppConfigService }, { token: ProfileService }, { token: CustomToastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
953
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserService, providedIn: 'root' }); }
|
|
818
954
|
}
|
|
819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserService, decorators: [{
|
|
820
956
|
type: Injectable,
|
|
821
957
|
args: [{
|
|
822
958
|
providedIn: 'root'
|
|
823
959
|
}]
|
|
824
|
-
}], ctorParameters: () => [{ type: MainApiHttpService }, { type: i2.Store }, { type: i3.Router }] });
|
|
960
|
+
}], ctorParameters: () => [{ type: MainApiHttpService }, { type: i2.Store }, { type: i3.Router }, { type: i1.AppConfigService }, { type: ProfileService }, { type: CustomToastService }] });
|
|
825
961
|
|
|
826
962
|
class AuthService {
|
|
827
963
|
constructor(localStorage, secureTokenStorage, router, http, userService, toastr, appConfigService, integrationsApi, document) {
|
|
@@ -1111,10 +1247,10 @@ class AuthService {
|
|
|
1111
1247
|
}
|
|
1112
1248
|
});
|
|
1113
1249
|
}
|
|
1114
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1115
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService, deps: [{ token: LocalStorage }, { token: SecureTokenStorageService }, { token: i3.Router }, { token: MainApiHttpService }, { token: UserService }, { token: CustomToastService }, { token: i1.AppConfigService }, { token: IntegrationsApiHttpService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1251
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService }); }
|
|
1116
1252
|
}
|
|
1117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService, decorators: [{
|
|
1118
1254
|
type: Injectable
|
|
1119
1255
|
}], ctorParameters: () => [{ type: LocalStorage }, { type: SecureTokenStorageService }, { type: i3.Router }, { type: MainApiHttpService }, { type: UserService }, { type: CustomToastService }, { type: i1.AppConfigService }, { type: IntegrationsApiHttpService }, { type: Document, decorators: [{
|
|
1120
1256
|
type: Inject,
|
|
@@ -1134,19 +1270,19 @@ class UserEffects {
|
|
|
1134
1270
|
)));
|
|
1135
1271
|
});
|
|
1136
1272
|
}
|
|
1137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1138
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserEffects, deps: [{ token: UserService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1274
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserEffects }); }
|
|
1139
1275
|
}
|
|
1140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserEffects, decorators: [{
|
|
1141
1277
|
type: Injectable
|
|
1142
1278
|
}], ctorParameters: () => [{ type: UserService }] });
|
|
1143
1279
|
|
|
1144
1280
|
class CommonServicesModule {
|
|
1145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1146
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1147
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1281
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1282
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: CommonServicesModule, imports: [CommonModule, i1$3.EffectsRootModule, i2.StoreRootModule] }); }
|
|
1283
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonServicesModule, providers: [AuthService], imports: [CommonModule, EffectsModule.forRoot([UserEffects]), StoreModule.forRoot(appReducers)] }); }
|
|
1148
1284
|
}
|
|
1149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonServicesModule, decorators: [{
|
|
1150
1286
|
type: NgModule,
|
|
1151
1287
|
args: [{
|
|
1152
1288
|
imports: [CommonModule, EffectsModule.forRoot([UserEffects]), StoreModule.forRoot(appReducers)],
|
|
@@ -1183,10 +1319,10 @@ class SeoService {
|
|
|
1183
1319
|
this.meta.updateTag({ name: 'twitter:description', content: description });
|
|
1184
1320
|
this.meta.updateTag({ name: 'twitter:card', content: 'summary' });
|
|
1185
1321
|
}
|
|
1186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1187
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1322
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SeoService, deps: [{ token: i1$4.Meta }, { token: i1$4.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1323
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SeoService, providedIn: 'root' }); }
|
|
1188
1324
|
}
|
|
1189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SeoService, decorators: [{
|
|
1190
1326
|
type: Injectable,
|
|
1191
1327
|
args: [{
|
|
1192
1328
|
providedIn: 'root'
|
|
@@ -1428,10 +1564,10 @@ class PermissionService {
|
|
|
1428
1564
|
getCurrentProduct() {
|
|
1429
1565
|
return JSON.parse(localStorage.getItem('product'));
|
|
1430
1566
|
}
|
|
1431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1432
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PermissionService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1568
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PermissionService, providedIn: 'root' }); }
|
|
1433
1569
|
}
|
|
1434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PermissionService, decorators: [{
|
|
1435
1571
|
type: Injectable,
|
|
1436
1572
|
args: [{
|
|
1437
1573
|
providedIn: 'root'
|
|
@@ -1472,10 +1608,10 @@ class LinkService {
|
|
|
1472
1608
|
window.console.error('Error within linkService : ', e);
|
|
1473
1609
|
}
|
|
1474
1610
|
}
|
|
1475
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1476
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LinkService, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1612
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LinkService, providedIn: 'root' }); }
|
|
1477
1613
|
}
|
|
1478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LinkService, decorators: [{
|
|
1479
1615
|
type: Injectable,
|
|
1480
1616
|
args: [{
|
|
1481
1617
|
providedIn: 'root'
|
|
@@ -1505,10 +1641,10 @@ class CustomPreloadingStrategy {
|
|
|
1505
1641
|
const ret = routeData.preload && this.permission.isGranted(routeData.permission);
|
|
1506
1642
|
return ret;
|
|
1507
1643
|
}
|
|
1508
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1509
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1644
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomPreloadingStrategy, deps: [{ token: PermissionService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1645
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomPreloadingStrategy, providedIn: 'root' }); }
|
|
1510
1646
|
}
|
|
1511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomPreloadingStrategy, decorators: [{
|
|
1512
1648
|
type: Injectable,
|
|
1513
1649
|
args: [{
|
|
1514
1650
|
providedIn: 'root'
|
|
@@ -1553,10 +1689,10 @@ class AbTestService {
|
|
|
1553
1689
|
console.log(typeof service);
|
|
1554
1690
|
return service ? this.injector.get(service) : this.injector.get(MainApiHttpService); // fallback to Core Microservice
|
|
1555
1691
|
}
|
|
1556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1557
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1692
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbTestService, deps: [{ token: i0.Injector }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1693
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbTestService, providedIn: 'root' }); }
|
|
1558
1694
|
}
|
|
1559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbTestService, decorators: [{
|
|
1560
1696
|
type: Injectable,
|
|
1561
1697
|
args: [{
|
|
1562
1698
|
providedIn: 'root'
|
|
@@ -1584,75 +1720,16 @@ class GeoService {
|
|
|
1584
1720
|
return this.cookieService.putObject('location_from_ip', data);
|
|
1585
1721
|
}));
|
|
1586
1722
|
}
|
|
1587
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1588
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GeoService, deps: [{ token: MainApiHttpService }, { token: i2$1.CookieService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1724
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GeoService, providedIn: 'root' }); }
|
|
1589
1725
|
}
|
|
1590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GeoService, decorators: [{
|
|
1591
1727
|
type: Injectable,
|
|
1592
1728
|
args: [{
|
|
1593
1729
|
providedIn: 'root'
|
|
1594
1730
|
}]
|
|
1595
1731
|
}], ctorParameters: () => [{ type: MainApiHttpService }, { type: i2$1.CookieService }] });
|
|
1596
1732
|
|
|
1597
|
-
class ProfileService {
|
|
1598
|
-
constructor(api) {
|
|
1599
|
-
this.api = api;
|
|
1600
|
-
this.endpoint = PROJECT_PATH;
|
|
1601
|
-
}
|
|
1602
|
-
updateUserProfile(user) {
|
|
1603
|
-
const formData = new FormData();
|
|
1604
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
1605
|
-
for (const key in user) {
|
|
1606
|
-
if (key in user) {
|
|
1607
|
-
formData.append(key, user[key]);
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
return this.api.put('/user', formData);
|
|
1611
|
-
}
|
|
1612
|
-
getUserProfile(slug) {
|
|
1613
|
-
return this.api.get(`/users/${slug}/profile/`);
|
|
1614
|
-
}
|
|
1615
|
-
getUserObject(objectType, slug) {
|
|
1616
|
-
return this.api.get(`/users/${slug}/get_object?object=${objectType}`);
|
|
1617
|
-
}
|
|
1618
|
-
getProjects(slug) {
|
|
1619
|
-
return this.api.get(`/users/${slug}/projects`);
|
|
1620
|
-
}
|
|
1621
|
-
addProjects(data) {
|
|
1622
|
-
return this.api.post(this.endpoint, data);
|
|
1623
|
-
}
|
|
1624
|
-
updateProjects(id, data) {
|
|
1625
|
-
return this.api.put(`${this.endpoint}${id}`, data);
|
|
1626
|
-
}
|
|
1627
|
-
deleteProject(id) {
|
|
1628
|
-
return this.api.delete(`${this.endpoint}/${id}`);
|
|
1629
|
-
}
|
|
1630
|
-
addProjectPictures(data) {
|
|
1631
|
-
return this.api.uploadWithData('/project_pictures', data);
|
|
1632
|
-
}
|
|
1633
|
-
getProjectPictures(slug) {
|
|
1634
|
-
return this.api.get(`/users/${slug}/project_pictures`);
|
|
1635
|
-
}
|
|
1636
|
-
deletePicture(projectId) {
|
|
1637
|
-
return this.api.delete(`/project_pictures/${projectId}`);
|
|
1638
|
-
}
|
|
1639
|
-
// Recommendations
|
|
1640
|
-
postProjectRecommendation(data) {
|
|
1641
|
-
return this.api.post(`/project_recommendations`, data);
|
|
1642
|
-
}
|
|
1643
|
-
postLinks(data) {
|
|
1644
|
-
return this.api.post('/user_links', data);
|
|
1645
|
-
}
|
|
1646
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ProfileService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1647
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ProfileService, providedIn: 'root' }); }
|
|
1648
|
-
}
|
|
1649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ProfileService, decorators: [{
|
|
1650
|
-
type: Injectable,
|
|
1651
|
-
args: [{
|
|
1652
|
-
providedIn: 'root'
|
|
1653
|
-
}]
|
|
1654
|
-
}], ctorParameters: () => [{ type: MainApiHttpService }] });
|
|
1655
|
-
|
|
1656
1733
|
class SubscriptionService {
|
|
1657
1734
|
constructor(api) {
|
|
1658
1735
|
this.api = api;
|
|
@@ -1770,10 +1847,10 @@ class SubscriptionService {
|
|
|
1770
1847
|
...HelperService.getPagingParams(paging)
|
|
1771
1848
|
});
|
|
1772
1849
|
}
|
|
1773
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1774
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1850
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SubscriptionService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1851
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SubscriptionService }); }
|
|
1775
1852
|
}
|
|
1776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SubscriptionService, decorators: [{
|
|
1777
1854
|
type: Injectable
|
|
1778
1855
|
}], ctorParameters: () => [{ type: MainApiHttpService }] });
|
|
1779
1856
|
|
|
@@ -1839,10 +1916,10 @@ class ProductService {
|
|
|
1839
1916
|
getAvailableStripeProrationBehaviors() {
|
|
1840
1917
|
return this.api.get(`admin/product/available_stripe_proration_behaviors`);
|
|
1841
1918
|
}
|
|
1842
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1843
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1919
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProductService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1920
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProductService, providedIn: 'root' }); }
|
|
1844
1921
|
}
|
|
1845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ProductService, decorators: [{
|
|
1846
1923
|
type: Injectable,
|
|
1847
1924
|
args: [{
|
|
1848
1925
|
providedIn: 'root'
|
|
@@ -1876,10 +1953,10 @@ class ValidationService {
|
|
|
1876
1953
|
return valid ? null : error;
|
|
1877
1954
|
};
|
|
1878
1955
|
}
|
|
1879
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1880
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1956
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1957
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ValidationService }); }
|
|
1881
1958
|
}
|
|
1882
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ValidationService, decorators: [{
|
|
1883
1960
|
type: Injectable
|
|
1884
1961
|
}] });
|
|
1885
1962
|
|
|
@@ -1984,10 +2061,10 @@ class AhoyService {
|
|
|
1984
2061
|
this.toast.showToast(error);
|
|
1985
2062
|
}
|
|
1986
2063
|
}
|
|
1987
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1988
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2064
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AhoyService, deps: [{ token: i1$2.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2065
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AhoyService, providedIn: 'root' }); }
|
|
1989
2066
|
}
|
|
1990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AhoyService, decorators: [{
|
|
1991
2068
|
type: Injectable,
|
|
1992
2069
|
args: [{
|
|
1993
2070
|
providedIn: 'root'
|
|
@@ -2112,10 +2189,10 @@ class CommonService {
|
|
|
2112
2189
|
}
|
|
2113
2190
|
return this.api.post(`${CUSTOMER_SUPPORT_PATH}`, formData);
|
|
2114
2191
|
}
|
|
2115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2116
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2193
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonService, providedIn: 'root' }); }
|
|
2117
2194
|
}
|
|
2118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CommonService, decorators: [{
|
|
2119
2196
|
type: Injectable,
|
|
2120
2197
|
args: [{
|
|
2121
2198
|
providedIn: 'root'
|
|
@@ -2189,10 +2266,10 @@ class NgbDateCustomParserFormatter extends NgbDateParserFormatter {
|
|
|
2189
2266
|
day: Number(date.substring(8, 10))
|
|
2190
2267
|
};
|
|
2191
2268
|
}
|
|
2192
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2193
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgbDateCustomParserFormatter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2270
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgbDateCustomParserFormatter, providedIn: 'root' }); }
|
|
2194
2271
|
}
|
|
2195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgbDateCustomParserFormatter, decorators: [{
|
|
2196
2273
|
type: Injectable,
|
|
2197
2274
|
args: [{
|
|
2198
2275
|
providedIn: 'root'
|
|
@@ -2302,10 +2379,10 @@ class TagService {
|
|
|
2302
2379
|
addTagCategoryById(data, subscription_id) {
|
|
2303
2380
|
return this.api.post(this.ADMIN_TAG_CATEGORIES_PATH, { ...data, subscription_id });
|
|
2304
2381
|
}
|
|
2305
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2306
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TagService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2383
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TagService, providedIn: 'root' }); }
|
|
2307
2384
|
}
|
|
2308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TagService, decorators: [{
|
|
2309
2386
|
type: Injectable,
|
|
2310
2387
|
args: [{
|
|
2311
2388
|
providedIn: 'root'
|
|
@@ -2335,10 +2412,10 @@ class TipsService {
|
|
|
2335
2412
|
addUserTips(data, subscription_id) {
|
|
2336
2413
|
return this.api.post(`/users/user_tips`, { ...data, subscription_id });
|
|
2337
2414
|
}
|
|
2338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2339
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2415
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TipsService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2416
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TipsService, providedIn: 'root' }); }
|
|
2340
2417
|
}
|
|
2341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TipsService, decorators: [{
|
|
2342
2419
|
type: Injectable,
|
|
2343
2420
|
args: [{
|
|
2344
2421
|
providedIn: 'root'
|
|
@@ -2353,10 +2430,10 @@ class WindowService {
|
|
|
2353
2430
|
replaceUrl(url) {
|
|
2354
2431
|
window.location.href = url;
|
|
2355
2432
|
}
|
|
2356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2357
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2433
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WindowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2434
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WindowService, providedIn: 'root' }); }
|
|
2358
2435
|
}
|
|
2359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WindowService, decorators: [{
|
|
2360
2437
|
type: Injectable,
|
|
2361
2438
|
args: [{
|
|
2362
2439
|
providedIn: 'root'
|
|
@@ -2469,10 +2546,10 @@ class GroupService {
|
|
|
2469
2546
|
deleteCommunicationFiles(id) {
|
|
2470
2547
|
return this.api.delete(`/group_communication_files/${id}`);
|
|
2471
2548
|
}
|
|
2472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2473
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GroupService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2550
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GroupService, providedIn: 'root' }); }
|
|
2474
2551
|
}
|
|
2475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GroupService, decorators: [{
|
|
2476
2553
|
type: Injectable,
|
|
2477
2554
|
args: [{
|
|
2478
2555
|
providedIn: 'root'
|
|
@@ -2493,10 +2570,10 @@ class QualificationService {
|
|
|
2493
2570
|
deleteQualifications(id) {
|
|
2494
2571
|
return this.api.delete(`${this.endPoint}/${id}`);
|
|
2495
2572
|
}
|
|
2496
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2497
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2573
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: QualificationService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2574
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: QualificationService, providedIn: 'root' }); }
|
|
2498
2575
|
}
|
|
2499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: QualificationService, decorators: [{
|
|
2500
2577
|
type: Injectable,
|
|
2501
2578
|
args: [{
|
|
2502
2579
|
providedIn: 'root'
|
|
@@ -2510,10 +2587,10 @@ class DashboardService {
|
|
|
2510
2587
|
search(keyword, subscriptionId) {
|
|
2511
2588
|
return this.api.get(`/search/global_search?search_term=${keyword}&subscription_id=${subscriptionId}`);
|
|
2512
2589
|
}
|
|
2513
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2514
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2591
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, providedIn: 'root' }); }
|
|
2515
2592
|
}
|
|
2516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, decorators: [{
|
|
2517
2594
|
type: Injectable,
|
|
2518
2595
|
args: [{
|
|
2519
2596
|
providedIn: 'root'
|
|
@@ -2569,10 +2646,10 @@ class MailBoxService {
|
|
|
2569
2646
|
getRecipient(params = {}) {
|
|
2570
2647
|
return this.http.getWithParams(`${this.endpoint}available_recipients`, params);
|
|
2571
2648
|
}
|
|
2572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2573
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MailBoxService, deps: [{ token: MainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2650
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MailBoxService, providedIn: 'root' }); }
|
|
2574
2651
|
}
|
|
2575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MailBoxService, decorators: [{
|
|
2576
2653
|
type: Injectable,
|
|
2577
2654
|
args: [{
|
|
2578
2655
|
providedIn: 'root'
|
|
@@ -2590,10 +2667,10 @@ class WebsocketService {
|
|
|
2590
2667
|
this.webSocket$ = this.webSocketSubject.asObservable().pipe(distinctUntilChanged());
|
|
2591
2668
|
});
|
|
2592
2669
|
}
|
|
2593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2594
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WebsocketService, deps: [{ token: i1.AppConfigService }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2671
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WebsocketService, providedIn: 'root' }); }
|
|
2595
2672
|
}
|
|
2596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WebsocketService, decorators: [{
|
|
2597
2674
|
type: Injectable,
|
|
2598
2675
|
args: [{
|
|
2599
2676
|
providedIn: 'root'
|
|
@@ -2649,10 +2726,10 @@ class NotificationService {
|
|
|
2649
2726
|
return null;
|
|
2650
2727
|
}));
|
|
2651
2728
|
}
|
|
2652
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2653
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NotificationService, deps: [{ token: MainApiHttpService }, { token: CustomToastService }, { token: WebsocketService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2730
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
|
|
2654
2731
|
}
|
|
2655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NotificationService, decorators: [{
|
|
2656
2733
|
type: Injectable,
|
|
2657
2734
|
args: [{
|
|
2658
2735
|
providedIn: 'root'
|
|
@@ -2667,10 +2744,10 @@ class DataService {
|
|
|
2667
2744
|
changeMessage(message) {
|
|
2668
2745
|
this.messageSource.next(message);
|
|
2669
2746
|
}
|
|
2670
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2671
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2747
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2748
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataService, providedIn: 'root' }); }
|
|
2672
2749
|
}
|
|
2673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataService, decorators: [{
|
|
2674
2751
|
type: Injectable,
|
|
2675
2752
|
args: [{
|
|
2676
2753
|
providedIn: 'root'
|
|
@@ -2708,10 +2785,10 @@ class NumberPickerService {
|
|
|
2708
2785
|
*/
|
|
2709
2786
|
this.value = null;
|
|
2710
2787
|
}
|
|
2711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2712
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2788
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NumberPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2789
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NumberPickerService, providedIn: 'root' }); }
|
|
2713
2790
|
}
|
|
2714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NumberPickerService, decorators: [{
|
|
2715
2792
|
type: Injectable,
|
|
2716
2793
|
args: [{
|
|
2717
2794
|
providedIn: 'root'
|
|
@@ -2750,15 +2827,11 @@ class SentryErrorHandler {
|
|
|
2750
2827
|
const environment = window.location.host?.includes('dev') || window.location.host?.includes('localhost')
|
|
2751
2828
|
? 'development'
|
|
2752
2829
|
: 'production';
|
|
2753
|
-
const ignoredPaths = [''];
|
|
2754
|
-
const healthCheckPaths = ['/ping'];
|
|
2755
|
-
const onePercentIgnoredPaths = [''];
|
|
2756
|
-
const fivePercentIgnoredPaths = [''];
|
|
2757
2830
|
const config = {
|
|
2758
2831
|
dsn: null,
|
|
2759
|
-
|
|
2760
|
-
//
|
|
2761
|
-
|
|
2832
|
+
// NOTE: We intentionally do not enable Performance Tracing here.
|
|
2833
|
+
// The previous integration (`BrowserTracing` + `routingInstrumentation`) was part of
|
|
2834
|
+
// the legacy `@sentry/angular-ivy` API and isn't available in `@sentry/angular` v10.
|
|
2762
2835
|
beforeSend(event, hint) {
|
|
2763
2836
|
// Check if the event is of type CloseEvent and ignore it
|
|
2764
2837
|
if (event?.exception?.values) {
|
|
@@ -2836,37 +2909,6 @@ class SentryErrorHandler {
|
|
|
2836
2909
|
return event;
|
|
2837
2910
|
},
|
|
2838
2911
|
denyUrls: [/drift.*\.js/i, /analytics.*\.js/i, /polyfills.*\.js/i, /vendor.*\.js/i],
|
|
2839
|
-
integrations: [
|
|
2840
|
-
// Registers and configures the Tracing integration,
|
|
2841
|
-
// which automatically instruments your application to monitor its
|
|
2842
|
-
// performance, including custom Angular routing instrumentation
|
|
2843
|
-
new BrowserTracing({
|
|
2844
|
-
routingInstrumentation: routingInstrumentation
|
|
2845
|
-
})
|
|
2846
|
-
],
|
|
2847
|
-
tracesSampler: samplingContext => {
|
|
2848
|
-
// Examine provided context data (including parent decision, if any) along
|
|
2849
|
-
// with anything in the global namespace to compute the sample rate or
|
|
2850
|
-
// sampling decision for this transaction
|
|
2851
|
-
const pathname = samplingContext.location.pathname;
|
|
2852
|
-
if (ignoredPaths.includes(pathname)) {
|
|
2853
|
-
return 0;
|
|
2854
|
-
}
|
|
2855
|
-
else if (healthCheckPaths.includes(pathname)) {
|
|
2856
|
-
// very low rate as these are extremely frequent and pretty useless
|
|
2857
|
-
return 0.001;
|
|
2858
|
-
}
|
|
2859
|
-
else if (onePercentIgnoredPaths.includes(pathname)) {
|
|
2860
|
-
return 0.01;
|
|
2861
|
-
}
|
|
2862
|
-
else if (fivePercentIgnoredPaths.includes(pathname)) {
|
|
2863
|
-
return 0.05;
|
|
2864
|
-
}
|
|
2865
|
-
else {
|
|
2866
|
-
// Default sample rate
|
|
2867
|
-
return 0.1;
|
|
2868
|
-
}
|
|
2869
|
-
},
|
|
2870
2912
|
environment,
|
|
2871
2913
|
// We ignore Server Errors. We have to define here since Angular
|
|
2872
2914
|
// http client uses setTimeout to detect http call progress.
|
|
@@ -3084,10 +3126,10 @@ class SentryErrorHandler {
|
|
|
3084
3126
|
console.error(error, e);
|
|
3085
3127
|
}
|
|
3086
3128
|
}
|
|
3087
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3088
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SentryErrorHandler, deps: [{ token: i1.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3130
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SentryErrorHandler, providedIn: 'root' }); }
|
|
3089
3131
|
}
|
|
3090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SentryErrorHandler, decorators: [{
|
|
3091
3133
|
type: Injectable,
|
|
3092
3134
|
args: [{
|
|
3093
3135
|
providedIn: 'root'
|
|
@@ -3147,10 +3189,10 @@ class LogoCacheService {
|
|
|
3147
3189
|
this.cache = JSON.parse(cacheData);
|
|
3148
3190
|
}
|
|
3149
3191
|
}
|
|
3150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3151
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LogoCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3193
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LogoCacheService, providedIn: 'root' }); }
|
|
3152
3194
|
}
|
|
3153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LogoCacheService, decorators: [{
|
|
3154
3196
|
type: Injectable,
|
|
3155
3197
|
args: [{
|
|
3156
3198
|
providedIn: 'root'
|
|
@@ -3189,10 +3231,10 @@ class HopscotchService {
|
|
|
3189
3231
|
window?.hopscotch?.endTour();
|
|
3190
3232
|
}
|
|
3191
3233
|
}
|
|
3192
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3193
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HopscotchService, deps: [{ token: ScriptLoaderService }, { token: TipsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3235
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HopscotchService, providedIn: 'root' }); }
|
|
3194
3236
|
}
|
|
3195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HopscotchService, decorators: [{
|
|
3196
3238
|
type: Injectable,
|
|
3197
3239
|
args: [{
|
|
3198
3240
|
providedIn: 'root'
|
|
@@ -3208,10 +3250,10 @@ class BrainApiHttpService extends BaseHttpService {
|
|
|
3208
3250
|
this.baseUrl = isDevMode() ? BRAIN_API_PREFIX : config?.['links']['brain_api'] ?? '';
|
|
3209
3251
|
});
|
|
3210
3252
|
}
|
|
3211
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3212
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiHttpService, deps: [{ token: i1$2.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3254
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiHttpService, providedIn: 'root' }); }
|
|
3213
3255
|
}
|
|
3214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiHttpService, decorators: [{
|
|
3215
3257
|
type: Injectable,
|
|
3216
3258
|
args: [{
|
|
3217
3259
|
providedIn: 'root'
|
|
@@ -3225,10 +3267,10 @@ class BrainApiService {
|
|
|
3225
3267
|
invokeModel(payload) {
|
|
3226
3268
|
return this.api.post('/bedrock/invoke', payload);
|
|
3227
3269
|
}
|
|
3228
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3229
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3270
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiService, deps: [{ token: BrainApiHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3271
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiService, providedIn: 'root' }); }
|
|
3230
3272
|
}
|
|
3231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BrainApiService, decorators: [{
|
|
3232
3274
|
type: Injectable,
|
|
3233
3275
|
args: [{
|
|
3234
3276
|
providedIn: 'root'
|