herum-shared 0.1.27 → 0.1.28
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/herum-shared-mongo-services.mjs +2 -2
- package/fesm2022/herum-shared-mongo-services.mjs.map +1 -1
- package/fesm2022/herum-shared-mongo.mjs +2 -2
- package/fesm2022/herum-shared-mongo.mjs.map +1 -1
- package/fesm2022/herum-shared-services.mjs +77 -8
- package/fesm2022/herum-shared-services.mjs.map +1 -1
- package/fesm2022/herum-shared-static-services.mjs +1 -69
- package/fesm2022/herum-shared-static-services.mjs.map +1 -1
- package/fesm2022/herum-shared-utils.mjs +34 -40
- package/fesm2022/herum-shared-utils.mjs.map +1 -1
- package/fesm2022/herum-shared.mjs +88 -149
- package/fesm2022/herum-shared.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/molecules/index.d.ts +1 -1
- package/mongo/index.d.ts +1 -1
- package/mongo/services/index.d.ts +1 -1
- package/package.json +1 -1
- package/services/index.d.ts +14 -3
- package/static-services/index.d.ts +1 -14
- package/utils/index.d.ts +2 -3
|
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { formatDate, DOCUMENT, CommonModule, DatePipe } from '@angular/common';
|
|
5
5
|
import { Subject, BehaviorSubject, forkJoin, EMPTY } from 'rxjs';
|
|
6
6
|
import { takeUntil, debounceTime, tap, shareReplay, map, switchMap, catchError } from 'rxjs/operators';
|
|
7
|
-
import { keyboardAsciiCodes, regexExpressions, svgsStrings, system, defaultGrade, defaultPlaceholder as defaultPlaceholder$1, types, formStatuses, startEndDateError, minDateError, formatError, timestampError, timePattern, dayInMilliSeconds, dateRangeTimeRangePlaceHolder, dateRangeTimeRangeWithoutSecondsPlaceHolder, dateRangePlaceHolder, dateTimePlaceHolder, dateTimeWithoutSecondsPlaceHolder, datePlaceHolder, timePlaceHolder, timeWithoutSecondsPlaceHolder, generalKeys, uploadsManagerKeys, skipToastHeader, assignmentMetadata, attributes, defaultAuthorizationObject, resourceIdPlaceholder, getPublishAuthorization,
|
|
7
|
+
import { keyboardAsciiCodes, regexExpressions, svgsStrings, system, defaultGrade, defaultPlaceholder as defaultPlaceholder$1, types, formStatuses, startEndDateError, minDateError, formatError, timestampError, timePattern, dayInMilliSeconds, dateRangeTimeRangePlaceHolder, dateRangeTimeRangeWithoutSecondsPlaceHolder, dateRangePlaceHolder, dateTimePlaceHolder, dateTimeWithoutSecondsPlaceHolder, datePlaceHolder, timePlaceHolder, timeWithoutSecondsPlaceHolder, generalKeys, uploadsManagerKeys, skipToastHeader, assignmentMetadata, attributes, defaultAuthorizationObject, resourceIdPlaceholder, getPublishAuthorization, getMongoMethodsDisplayedNamesMap, resourcesFilesSuffixes, calendarActiveColorCssVariable, calendarHoverColorCssVariable, calendarLibrarySelector, calendarLibraryBodyCellSelector, timerActiveColorCssVariable, timerHoverColorCssVariable, timerItemSizeColorCssVariable, anySubFileTypeWildCard, maleAvatarPath, femaleAvatarPath, signUpFormKeys, filesSuffixes, tableRowHeights, dialogsDescriptions, dialogsTitles, getToastsTemplates, toastStatuses, toastContext, toastStates, uploadStatuses } from 'herum-shared/constants';
|
|
8
8
|
import * as i1$2 from 'herum-shared/services';
|
|
9
9
|
import * as i2 from '@angular/cdk/bidi';
|
|
10
10
|
import * as i1$1 from '@angular/platform-browser';
|
|
@@ -26,7 +26,7 @@ import { HttpHeaders } from '@angular/common/http';
|
|
|
26
26
|
import lottie from 'lottie-web';
|
|
27
27
|
import * as i1$5 from 'herum-shared/herum-types';
|
|
28
28
|
import { QuizHeaderState, microResourceAuthorizationType, ResourceState, TimeUnit, Gender, StepStatus, TableActions } from 'herum-shared/herum-types';
|
|
29
|
-
import { isTruncatedTitleElement, convertToDate, updateFullYear, getDropdownAnimationStates, toHash, buildPath, setHeaders, remainJustWantedValueInDictionary,
|
|
29
|
+
import { isTruncatedTitleElement, convertToDate, updateFullYear, getDropdownAnimationStates, toHash, buildPath, setHeaders, remainJustWantedValueInDictionary, getVersionPathParameter, getAssignmentStateDisplayName, replaceInterpolateKeysWithObjectProperties, convertHeightToPixels } from 'herum-shared/utils';
|
|
30
30
|
import * as i1$8 from '@angular/cdk/clipboard';
|
|
31
31
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
32
32
|
import * as i4 from 'herum-shared/pipes';
|
|
@@ -43,8 +43,7 @@ import * as i1$7 from '@angular/material/core';
|
|
|
43
43
|
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
|
|
44
44
|
import { v4 } from 'uuid';
|
|
45
45
|
import { SYSTEM_TRACK_TEXT_CHANGES_SERVICE as SYSTEM_TRACK_TEXT_CHANGES_SERVICE$1, SYSTEM_AUDIO_VISUAL_CONFIGURATION as SYSTEM_AUDIO_VISUAL_CONFIGURATION$1 } from 'herum-shared/tokens';
|
|
46
|
-
import
|
|
47
|
-
import { StorageService as StorageService$1 } from 'herum-shared/static-services';
|
|
46
|
+
import { StorageService } from 'herum-shared/static-services';
|
|
48
47
|
import { selfIsTeacherExample, closedListExample, permissionsTemplatesExample } from 'herum-shared/objectsExample';
|
|
49
48
|
import * as i2$4 from '@angular/router';
|
|
50
49
|
import { cloneDeep } from 'lodash';
|
|
@@ -3737,7 +3736,7 @@ class AuthService {
|
|
|
3737
3736
|
this.router = router;
|
|
3738
3737
|
this.gql = gql;
|
|
3739
3738
|
this.environmentConfig = environmentConfig;
|
|
3740
|
-
let sessionId = StorageService
|
|
3739
|
+
let sessionId = StorageService.getItem(AuthStorageKey);
|
|
3741
3740
|
if (!sessionId)
|
|
3742
3741
|
return;
|
|
3743
3742
|
this.sessionId$.next(sessionId);
|
|
@@ -3763,7 +3762,7 @@ class AuthService {
|
|
|
3763
3762
|
this.router.navigate(['/login']);
|
|
3764
3763
|
}
|
|
3765
3764
|
clearSession() {
|
|
3766
|
-
StorageService
|
|
3765
|
+
StorageService.deleteAll();
|
|
3767
3766
|
this.sessionId$.next('');
|
|
3768
3767
|
}
|
|
3769
3768
|
isValidSessionId(sessionId) {
|
|
@@ -3810,7 +3809,7 @@ class AuthService {
|
|
|
3810
3809
|
}
|
|
3811
3810
|
updateSessionId(newValue) {
|
|
3812
3811
|
this.sessionId$.next(newValue);
|
|
3813
|
-
StorageService
|
|
3812
|
+
StorageService.setItem(AuthStorageKey, newValue);
|
|
3814
3813
|
}
|
|
3815
3814
|
generateStringForAuthenticationHash(personalId, militaryId) {
|
|
3816
3815
|
return personalId + militaryId;
|
|
@@ -4532,21 +4531,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
4532
4531
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
4533
4532
|
}] }] });
|
|
4534
4533
|
|
|
4535
|
-
class
|
|
4534
|
+
class UtilsService {
|
|
4536
4535
|
environmentConfig;
|
|
4537
4536
|
constructor(environmentConfig) {
|
|
4538
4537
|
this.environmentConfig = environmentConfig;
|
|
4539
4538
|
}
|
|
4539
|
+
getDisplayedNameForMongoMethodByUserActivity(urlRequest) {
|
|
4540
|
+
let mongoMethodDisplayedName;
|
|
4541
|
+
const mongoMethodsDisplayedNamesMap = getMongoMethodsDisplayedNamesMap(this.environmentConfig?.mongoUpdates, this.environmentConfig?.authenticationPaths);
|
|
4542
|
+
Object.entries(mongoMethodsDisplayedNamesMap).forEach(([mongoMethod, displayedName]) => {
|
|
4543
|
+
const urlParts = urlRequest?.split('/');
|
|
4544
|
+
const matchedMethod = urlParts?.find(urlPart => urlPart === mongoMethod);
|
|
4545
|
+
if (matchedMethod)
|
|
4546
|
+
mongoMethodDisplayedName = displayedName;
|
|
4547
|
+
});
|
|
4548
|
+
return mongoMethodDisplayedName;
|
|
4549
|
+
}
|
|
4550
|
+
getUrlFromFileData(fileData) {
|
|
4551
|
+
if (!fileData?.key || !fileData?.bucket)
|
|
4552
|
+
return;
|
|
4553
|
+
const fileDataKeyWithoutTrailingSlash = fileData.key.endsWith('/') ? fileData.key.slice(0, -1) : fileData.key;
|
|
4554
|
+
return buildPath([this.environmentConfig?.environment?.s3ServerPath + fileData.bucket, fileDataKeyWithoutTrailingSlash]);
|
|
4555
|
+
}
|
|
4556
|
+
fetchFiles(fileId, resourceType, bucket) {
|
|
4557
|
+
if (!fileId)
|
|
4558
|
+
return Promise.reject();
|
|
4559
|
+
const bucketPath = bucket ? bucket : this.environmentConfig?.buckets[resourceType];
|
|
4560
|
+
if (fileId && fileId[0] != '/' && bucketPath[bucketPath.length - 1] != '/')
|
|
4561
|
+
fileId = "/" + fileId;
|
|
4562
|
+
const path = this.environmentConfig?.environment?.s3ServerPath + bucketPath + fileId;
|
|
4563
|
+
return fetch(path);
|
|
4564
|
+
}
|
|
4565
|
+
async initAudioFile(fileId, bucketName, signal) {
|
|
4566
|
+
const audioBucketName = bucketName ? (bucketName + "/") : this.environmentConfig?.buckets.Audio;
|
|
4567
|
+
return fetch(this.environmentConfig?.environment?.s3ServerPath + audioBucketName + fileId, { signal: signal })
|
|
4568
|
+
.then(async (response) => {
|
|
4569
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
4570
|
+
if (arrayBuffer.byteLength === 0) {
|
|
4571
|
+
const blob = await response.blob();
|
|
4572
|
+
const reader = new FileReader();
|
|
4573
|
+
reader.onload = () => {
|
|
4574
|
+
const arrayBuffer = reader.result;
|
|
4575
|
+
const file = new File([arrayBuffer], fileId, {
|
|
4576
|
+
type: 'audio/mp3',
|
|
4577
|
+
});
|
|
4578
|
+
return file;
|
|
4579
|
+
};
|
|
4580
|
+
reader.readAsArrayBuffer(blob);
|
|
4581
|
+
}
|
|
4582
|
+
else {
|
|
4583
|
+
const file = new File([arrayBuffer], fileId, {
|
|
4584
|
+
type: 'audio/mpeg',
|
|
4585
|
+
});
|
|
4586
|
+
return file;
|
|
4587
|
+
}
|
|
4588
|
+
});
|
|
4589
|
+
}
|
|
4590
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4591
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
|
4592
|
+
}
|
|
4593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, decorators: [{
|
|
4594
|
+
type: Injectable,
|
|
4595
|
+
args: [{
|
|
4596
|
+
providedIn: 'root'
|
|
4597
|
+
}]
|
|
4598
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4599
|
+
type: Inject,
|
|
4600
|
+
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
4601
|
+
}] }] });
|
|
4602
|
+
|
|
4603
|
+
class ResourceDataBuilderService {
|
|
4604
|
+
utilsService;
|
|
4605
|
+
constructor(utilsService) {
|
|
4606
|
+
this.utilsService = utilsService;
|
|
4607
|
+
}
|
|
4540
4608
|
buildFilePath(resource) {
|
|
4541
|
-
return getUrlFromFileData(resource.resourceFile
|
|
4609
|
+
return this.utilsService.getUrlFromFileData(resource.resourceFile) + this.getVersionPathParameter(resource);
|
|
4542
4610
|
}
|
|
4543
4611
|
buildDirectoryPath(resource) {
|
|
4544
|
-
return getUrlFromFileData(resource.resourceFile
|
|
4612
|
+
return this.utilsService.getUrlFromFileData(resource.resourceFile) + resourcesFilesSuffixes[resource.resourceType] + this.getVersionPathParameter(resource);
|
|
4545
4613
|
}
|
|
4546
4614
|
getVersionPathParameter(resource) {
|
|
4547
4615
|
return getVersionPathParameter(new Date(resource.lastUpdateTime));
|
|
4548
4616
|
}
|
|
4549
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ResourceDataBuilderService, deps:
|
|
4617
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ResourceDataBuilderService, deps: [{ token: UtilsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4550
4618
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ResourceDataBuilderService, providedIn: 'root' });
|
|
4551
4619
|
}
|
|
4552
4620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ResourceDataBuilderService, decorators: [{
|
|
@@ -4554,7 +4622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
4554
4622
|
args: [{
|
|
4555
4623
|
providedIn: 'root'
|
|
4556
4624
|
}]
|
|
4557
|
-
}], ctorParameters: () => [{ type:
|
|
4625
|
+
}], ctorParameters: () => [{ type: UtilsService }] });
|
|
4558
4626
|
|
|
4559
4627
|
class SystemStylingService {
|
|
4560
4628
|
document;
|
|
@@ -4645,135 +4713,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
4645
4713
|
args: [SYSTEM_TRACK_TEXT_CHANGES_SERVICE$1]
|
|
4646
4714
|
}] }] });
|
|
4647
4715
|
|
|
4648
|
-
class StorageService {
|
|
4649
|
-
static cache = {};
|
|
4650
|
-
static getItem(key) {
|
|
4651
|
-
const cachedValue = StorageService.cache[key];
|
|
4652
|
-
if (cachedValue)
|
|
4653
|
-
return cachedValue;
|
|
4654
|
-
else {
|
|
4655
|
-
let value = StorageService.getCookie(key);
|
|
4656
|
-
if (!value)
|
|
4657
|
-
value = localStorage.getItem(key);
|
|
4658
|
-
StorageService.cache[key] = value;
|
|
4659
|
-
return value;
|
|
4660
|
-
}
|
|
4661
|
-
}
|
|
4662
|
-
static setItem(key, value) {
|
|
4663
|
-
let stringifyValue = value;
|
|
4664
|
-
if (typeof value != "string")
|
|
4665
|
-
stringifyValue = JSON.stringify(value);
|
|
4666
|
-
StorageService.cache[key] = stringifyValue;
|
|
4667
|
-
try {
|
|
4668
|
-
StorageService.setCookie(key, stringifyValue);
|
|
4669
|
-
}
|
|
4670
|
-
catch (error) {
|
|
4671
|
-
localStorage.setItem(key, stringifyValue);
|
|
4672
|
-
}
|
|
4673
|
-
}
|
|
4674
|
-
static removeItem(key) {
|
|
4675
|
-
StorageService.cache[key] = null;
|
|
4676
|
-
localStorage.removeItem(key);
|
|
4677
|
-
StorageService.deleteCookie(key);
|
|
4678
|
-
}
|
|
4679
|
-
static deleteAll() {
|
|
4680
|
-
StorageService.cache = {};
|
|
4681
|
-
const cookies = document.cookie.split(';');
|
|
4682
|
-
cookies.forEach((cookie) => {
|
|
4683
|
-
const equalsIndex = cookie.indexOf('=');
|
|
4684
|
-
const key = equalsIndex > -1 ? cookie.substring(0, equalsIndex) : cookie;
|
|
4685
|
-
this.deleteCookie(key);
|
|
4686
|
-
});
|
|
4687
|
-
}
|
|
4688
|
-
static deleteCookie(key) {
|
|
4689
|
-
document.cookie = key + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
|
4690
|
-
}
|
|
4691
|
-
static setCookie(cname, cvalue, exdays = 100) {
|
|
4692
|
-
StorageService.deleteCookie(cname);
|
|
4693
|
-
const date = new Date();
|
|
4694
|
-
date.setTime(date.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
|
4695
|
-
const expires = 'expires=' + date.toUTCString();
|
|
4696
|
-
document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';
|
|
4697
|
-
}
|
|
4698
|
-
static getCookie(cname) {
|
|
4699
|
-
const name = cname + '=';
|
|
4700
|
-
const ca = document.cookie.split(';');
|
|
4701
|
-
for (let i = 0; i < ca.length; i++) {
|
|
4702
|
-
let cookieChar = ca[i];
|
|
4703
|
-
while (cookieChar.charAt(0) === ' ') {
|
|
4704
|
-
cookieChar = cookieChar.substring(1);
|
|
4705
|
-
}
|
|
4706
|
-
if (cookieChar.indexOf(name) === 0) {
|
|
4707
|
-
return cookieChar.substring(name.length, cookieChar.length);
|
|
4708
|
-
}
|
|
4709
|
-
}
|
|
4710
|
-
return '';
|
|
4711
|
-
}
|
|
4712
|
-
}
|
|
4713
|
-
|
|
4714
|
-
class UtilsService {
|
|
4715
|
-
environmentConfig;
|
|
4716
|
-
constructor(environmentConfig) {
|
|
4717
|
-
this.environmentConfig = environmentConfig;
|
|
4718
|
-
}
|
|
4719
|
-
getDisplayedNameForMongoMethodByUserActivity(urlRequest) {
|
|
4720
|
-
let mongoMethodDisplayedName;
|
|
4721
|
-
const mongoMethodsDisplayedNamesMap = getMongoMethodsDisplayedNamesMap(this.environmentConfig?.mongoUpdates, this.environmentConfig?.authenticationPaths);
|
|
4722
|
-
Object.entries(mongoMethodsDisplayedNamesMap).forEach(([mongoMethod, displayedName]) => {
|
|
4723
|
-
const urlParts = urlRequest?.split('/');
|
|
4724
|
-
const matchedMethod = urlParts?.find(urlPart => urlPart === mongoMethod);
|
|
4725
|
-
if (matchedMethod)
|
|
4726
|
-
mongoMethodDisplayedName = displayedName;
|
|
4727
|
-
});
|
|
4728
|
-
return mongoMethodDisplayedName;
|
|
4729
|
-
}
|
|
4730
|
-
fetchFiles(fileId, resourceType, bucket) {
|
|
4731
|
-
if (!fileId)
|
|
4732
|
-
return Promise.reject();
|
|
4733
|
-
const bucketPath = bucket ? bucket : this.environmentConfig?.buckets[resourceType];
|
|
4734
|
-
if (fileId && fileId[0] != '/' && bucketPath[bucketPath.length - 1] != '/')
|
|
4735
|
-
fileId = "/" + fileId;
|
|
4736
|
-
const path = this.environmentConfig?.environment?.s3ServerPath + bucketPath + fileId;
|
|
4737
|
-
return fetch(path);
|
|
4738
|
-
}
|
|
4739
|
-
async initAudioFile(fileId, bucketName, signal) {
|
|
4740
|
-
const audioBucketName = bucketName ? (bucketName + "/") : this.environmentConfig?.buckets.Audio;
|
|
4741
|
-
return fetch(this.environmentConfig?.environment?.s3ServerPath + audioBucketName + fileId, { signal: signal })
|
|
4742
|
-
.then(async (response) => {
|
|
4743
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
4744
|
-
if (arrayBuffer.byteLength === 0) {
|
|
4745
|
-
const blob = await response.blob();
|
|
4746
|
-
const reader = new FileReader();
|
|
4747
|
-
reader.onload = () => {
|
|
4748
|
-
const arrayBuffer = reader.result;
|
|
4749
|
-
const file = new File([arrayBuffer], fileId, {
|
|
4750
|
-
type: 'audio/mp3',
|
|
4751
|
-
});
|
|
4752
|
-
return file;
|
|
4753
|
-
};
|
|
4754
|
-
reader.readAsArrayBuffer(blob);
|
|
4755
|
-
}
|
|
4756
|
-
else {
|
|
4757
|
-
const file = new File([arrayBuffer], fileId, {
|
|
4758
|
-
type: 'audio/mpeg',
|
|
4759
|
-
});
|
|
4760
|
-
return file;
|
|
4761
|
-
}
|
|
4762
|
-
});
|
|
4763
|
-
}
|
|
4764
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4765
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
|
4766
|
-
}
|
|
4767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UtilsService, decorators: [{
|
|
4768
|
-
type: Injectable,
|
|
4769
|
-
args: [{
|
|
4770
|
-
providedIn: 'root'
|
|
4771
|
-
}]
|
|
4772
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4773
|
-
type: Inject,
|
|
4774
|
-
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
4775
|
-
}] }] });
|
|
4776
|
-
|
|
4777
4716
|
class HerumSpinnerComponent {
|
|
4778
4717
|
size = 'default-size';
|
|
4779
4718
|
borderColor = 'default-border-color';
|
|
@@ -10913,9 +10852,9 @@ class FetchedMessageService {
|
|
|
10913
10852
|
this.setMessageKey(messageKey);
|
|
10914
10853
|
this.setRecipient(recipient);
|
|
10915
10854
|
const fetchedMessageHasShownStorageKey = messageKey.toUpperCase() + '_' + suffixStorageKey;
|
|
10916
|
-
if (condition && !StorageService
|
|
10855
|
+
if (condition && !StorageService.getItem(fetchedMessageHasShownStorageKey)) {
|
|
10917
10856
|
this.fetchedMessageData().subscribe((fetchedMessage) => this.dialog.open(FetchedMessageDialog, { data: { fetchedMessage, recipient: this.recipient } }));
|
|
10918
|
-
StorageService
|
|
10857
|
+
StorageService.setItem(fetchedMessageHasShownStorageKey, fetchedMessageHasShownStorageKey);
|
|
10919
10858
|
}
|
|
10920
10859
|
}
|
|
10921
10860
|
setMessageKey(messageKey) {
|
|
@@ -11067,7 +11006,7 @@ class ErrorsHandlerService {
|
|
|
11067
11006
|
else
|
|
11068
11007
|
this.failedDependentsRequestsContext[dependentId] = initialValue ? { error, failedComplexObservableArrowFunctions, initialValue } : { error, failedComplexObservableArrowFunctions };
|
|
11069
11008
|
}
|
|
11070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ErrorsHandlerService, deps: [{ token: i1$6.MatDialog }, { token: i1$3.HttpClient }, { token:
|
|
11009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ErrorsHandlerService, deps: [{ token: i1$6.MatDialog }, { token: i1$3.HttpClient }, { token: i1$2.UtilsService }, { token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11071
11010
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ErrorsHandlerService, providedIn: 'root' });
|
|
11072
11011
|
}
|
|
11073
11012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ErrorsHandlerService, decorators: [{
|
|
@@ -11075,7 +11014,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
11075
11014
|
args: [{
|
|
11076
11015
|
providedIn: 'root'
|
|
11077
11016
|
}]
|
|
11078
|
-
}], ctorParameters: () => [{ type: i1$6.MatDialog }, { type: i1$3.HttpClient }, { type:
|
|
11017
|
+
}], ctorParameters: () => [{ type: i1$6.MatDialog }, { type: i1$3.HttpClient }, { type: i1$2.UtilsService }, { type: undefined, decorators: [{
|
|
11079
11018
|
type: Inject,
|
|
11080
11019
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
11081
11020
|
}] }] });
|
|
@@ -11242,9 +11181,9 @@ class ToastsService {
|
|
|
11242
11181
|
hasToastAlreadyShownAndShouldShowOnce(toastStorageKey) {
|
|
11243
11182
|
if (!toastStorageKey)
|
|
11244
11183
|
return false;
|
|
11245
|
-
if (StorageService
|
|
11184
|
+
if (StorageService.getItem(toastStorageKey))
|
|
11246
11185
|
return true;
|
|
11247
|
-
StorageService
|
|
11186
|
+
StorageService.setItem(toastStorageKey, toastStorageKey);
|
|
11248
11187
|
return false;
|
|
11249
11188
|
}
|
|
11250
11189
|
showToast(title, content, status) {
|
|
@@ -11256,7 +11195,7 @@ class ToastsService {
|
|
|
11256
11195
|
if (statusCode >= 400 && statusCode < 599)
|
|
11257
11196
|
return toastStatuses.error;
|
|
11258
11197
|
}
|
|
11259
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ToastsService, deps: [{ token: ErrorsHandlerService }, { token:
|
|
11198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ToastsService, deps: [{ token: ErrorsHandlerService }, { token: i1$2.UtilsService }, { token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11260
11199
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ToastsService, providedIn: 'root' });
|
|
11261
11200
|
}
|
|
11262
11201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ToastsService, decorators: [{
|
|
@@ -11264,7 +11203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
11264
11203
|
args: [{
|
|
11265
11204
|
providedIn: 'root'
|
|
11266
11205
|
}]
|
|
11267
|
-
}], ctorParameters: () => [{ type: ErrorsHandlerService }, { type:
|
|
11206
|
+
}], ctorParameters: () => [{ type: ErrorsHandlerService }, { type: i1$2.UtilsService }, { type: undefined, decorators: [{
|
|
11268
11207
|
type: Inject,
|
|
11269
11208
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
11270
11209
|
}] }] });
|