herum-shared 0.1.25
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/README.md +63 -0
- package/animations/index.d.ts +5 -0
- package/assets/feed/exercise/exerciseAchivment.svg +11 -0
- package/assets/feed/icons/active/audio.svg +5 -0
- package/assets/feed/icons/active/collection.svg +15 -0
- package/assets/feed/icons/active/exercise.svg +13 -0
- package/assets/feed/icons/active/generic-file.svg +8 -0
- package/assets/feed/icons/active/image.svg +11 -0
- package/assets/feed/icons/active/link.svg +6 -0
- package/assets/feed/icons/active/pdf.svg +14 -0
- package/assets/feed/icons/active/presentation.svg +11 -0
- package/assets/feed/icons/active/quiz.svg +17 -0
- package/assets/feed/icons/active/story.svg +7 -0
- package/assets/feed/icons/active/video.svg +11 -0
- package/assets/feed/icons/comment.svg +12 -0
- package/assets/feed/icons/error/audio.svg +5 -0
- package/assets/feed/icons/error/collection.svg +15 -0
- package/assets/feed/icons/error/exercise.svg +13 -0
- package/assets/feed/icons/error/generic-file.svg +8 -0
- package/assets/feed/icons/error/image.svg +11 -0
- package/assets/feed/icons/error/pdf.svg +14 -0
- package/assets/feed/icons/error/presentation.svg +11 -0
- package/assets/feed/icons/error/quiz.svg +17 -0
- package/assets/feed/icons/error/story.svg +7 -0
- package/assets/feed/icons/error/video.svg +11 -0
- package/assets/feed/icons/eye.svg +13 -0
- package/assets/feed/icons/garbage-secondary.svg +14 -0
- package/assets/feed/icons/garbage.svg +14 -0
- package/assets/feed/icons/green-x.svg +165 -0
- package/assets/feed/icons/hamburger.svg +2 -0
- package/assets/feed/icons/inactive/audio.svg +5 -0
- package/assets/feed/icons/inactive/exercise.svg +17 -0
- package/assets/feed/icons/inactive/link.svg +6 -0
- package/assets/feed/icons/inactive/pdf.svg +19 -0
- package/assets/feed/icons/inactive/presentation.svg +13 -0
- package/assets/feed/icons/inactive/quiz.svg +25 -0
- package/assets/feed/icons/inactive/story.svg +7 -0
- package/assets/feed/icons/inactive/video.svg +13 -0
- package/assets/feed/icons/status/Group 856.svg +11 -0
- package/assets/feed/icons/status/almostDone.svg +11 -0
- package/assets/feed/icons/status/done.svg +11 -0
- package/assets/feed/icons/status/inProgress.svg +13 -0
- package/assets/feed/icons/white-chevron.svg +3 -0
- package/assets/feed/icons/wide-mode.png +0 -0
- package/assets/feed/icons/wide-mode.svg +7 -0
- package/assets/feed/icons/wide-mode2.svg +8 -0
- package/assets/files-icons/.image.svg +11 -0
- package/assets/files-icons/.mp4.png +0 -0
- package/assets/files-icons/.mp4.svg +12 -0
- package/assets/files-icons/.pdf.png +0 -0
- package/assets/files-icons/.pdf.svg +16 -0
- package/assets/files-icons/.pptx.png +0 -0
- package/assets/files-icons/.pptx.svg +12 -0
- package/assets/files-icons/.video.svg +12 -0
- package/assets/files-icons/default-file.png +0 -0
- package/assets/files-icons/generic-file.svg +8 -0
- package/assets/files-icons/story.png +0 -0
- package/assets/files-icons/story.svg +3 -0
- package/assets/files-icons/upload-file.svg +4 -0
- package/assets/general/calendar.svg +12 -0
- package/assets/general/chevron.svg +3 -0
- package/assets/general/clock.svg +4 -0
- package/assets/general/closed-chevron.png +0 -0
- package/assets/general/college-calendar.svg +12 -0
- package/assets/general/comment-icon.svg +12 -0
- package/assets/general/dialogX.png +0 -0
- package/assets/general/errorOwl.png +0 -0
- package/assets/general/green-x.svg +4 -0
- package/assets/general/grey-chevron.svg +3 -0
- package/assets/general/keyboardLink.svg +15 -0
- package/assets/general/logo.png +0 -0
- package/assets/general/noCollectionsMessage.svg +59 -0
- package/assets/general/open-chevron.png +0 -0
- package/assets/general/owl-logo.svg +98 -0
- package/assets/general/secondary-x.svg +3 -0
- package/assets/general/user.svg +15 -0
- package/assets/general/white-chevron.svg +3 -0
- package/assets/quiz/greenHeaderArrow.svg +12 -0
- package/assets/quiz/greyHeaderArrow.svg +12 -0
- package/assets/quiz/happyOwl.svg +126 -0
- package/assets/quiz/sadOwl.svg +94 -0
- package/assets/quiz/skip.svg +5 -0
- package/assets/shared/atoms/inputs/herum-inputs.component.scss +56 -0
- package/assets/shared/atoms/selects/herum-selects.component.scss +141 -0
- package/assets/shared/atoms/uploadingStatuses/error.svg +8 -0
- package/assets/shared/atoms/uploadingStatuses/information.svg +6 -0
- package/assets/shared/atoms/uploadingStatuses/success.svg +9 -0
- package/assets/shared/audio-images/gray-pause.svg +4 -0
- package/assets/shared/audio-images/gray-play.svg +3 -0
- package/assets/shared/audio-images/next15.svg +7 -0
- package/assets/shared/audio-images/pause.svg +4 -0
- package/assets/shared/audio-images/play.svg +3 -0
- package/assets/shared/audio-images/previous15.svg +7 -0
- package/assets/shared/background/cubes.png +0 -0
- package/assets/shared/background/cubes.svg +1900 -0
- package/assets/shared/icons/V.svg +3 -0
- package/assets/shared/icons/X.svg +3 -0
- package/assets/shared/icons/active-clipboard.svg +7 -0
- package/assets/shared/icons/active-drag.svg +44 -0
- package/assets/shared/icons/active-upload.svg +3 -0
- package/assets/shared/icons/add.svg +3 -0
- package/assets/shared/icons/attachUsers.png +0 -0
- package/assets/shared/icons/big-no-result-owl.png +0 -0
- package/assets/shared/icons/bigV.svg +3 -0
- package/assets/shared/icons/celeb-owl.png +0 -0
- package/assets/shared/icons/clock.svg +3 -0
- package/assets/shared/icons/drag.svg +44 -0
- package/assets/shared/icons/edit.svg +3 -0
- package/assets/shared/icons/editCollection.png +0 -0
- package/assets/shared/icons/femaleAvatar.svg +80 -0
- package/assets/shared/icons/inactive-clipboard.svg +7 -0
- package/assets/shared/icons/input/X.png +0 -0
- package/assets/shared/icons/input/X.svg +3 -0
- package/assets/shared/icons/input/drag.svg +6 -0
- package/assets/shared/icons/input/green-search.png +0 -0
- package/assets/shared/icons/input/grey-search.png +0 -0
- package/assets/shared/icons/input/search.svg +4 -0
- package/assets/shared/icons/maleAvatar.svg +55 -0
- package/assets/shared/icons/no-result-owl.png +0 -0
- package/assets/shared/icons/resources.svg +6 -0
- package/assets/shared/icons/secondary-x.svg +3 -0
- package/assets/shared/icons/settings.png +0 -0
- package/assets/shared/icons/stepper/white-v.svg +3 -0
- package/assets/shared/icons/table/edit.svg +3 -0
- package/assets/shared/icons/target.png +0 -0
- package/assets/shared/icons/upload.png +0 -0
- package/assets/shared/icons/upload.svg +7 -0
- package/assets/shared/icons/user.svg +8 -0
- package/assets/shared/icons/video/Play.PNG +0 -0
- package/assets/shared/icons/video/back10.PNG +0 -0
- package/assets/shared/icons/video/back10.svg +7 -0
- package/assets/shared/icons/video/download.PNG +0 -0
- package/assets/shared/icons/video/download.svg +4 -0
- package/assets/shared/icons/video/fullScreen.PNG +0 -0
- package/assets/shared/icons/video/fullScreen.svg +7 -0
- package/assets/shared/icons/video/minimize.png +0 -0
- package/assets/shared/icons/video/mute.png +0 -0
- package/assets/shared/icons/video/mute.svg +7 -0
- package/assets/shared/icons/video/next10.PNG +0 -0
- package/assets/shared/icons/video/next10.svg +7 -0
- package/assets/shared/icons/video/pause.PNG +0 -0
- package/assets/shared/icons/video/pause.svg +5 -0
- package/assets/shared/icons/video/pictureInPicture.png +0 -0
- package/assets/shared/icons/video/pictureInPicture.svg +5 -0
- package/assets/shared/icons/video/pictureInPictureOff.svg +7 -0
- package/assets/shared/icons/video/play.svg +4 -0
- package/assets/shared/icons/video/primary-play.png +0 -0
- package/assets/shared/icons/video/primaryPlay.svg +22 -0
- package/assets/shared/icons/video/sound.svg +8 -0
- package/assets/shared/icons/video/speaker.PNG +0 -0
- package/assets/shared/trackChanges/edit.svg +11 -0
- package/assets/shared/trackChanges/message-plus.svg +14 -0
- package/assets/shared/trackChanges/show-comments.svg +5 -0
- package/assets/shared/trackChanges/text-reference.svg +3 -0
- package/assets/shared/trackChanges/trash.svg +9 -0
- package/atoms/index.d.ts +836 -0
- package/constants/index.d.ts +795 -0
- package/decorators/index.d.ts +3 -0
- package/dialogs/index.d.ts +41 -0
- package/directives/index.d.ts +55 -0
- package/environment/index.d.ts +129 -0
- package/errors/index.d.ts +26 -0
- package/fesm2022/herum-shared-animations.mjs +41 -0
- package/fesm2022/herum-shared-animations.mjs.map +1 -0
- package/fesm2022/herum-shared-atoms.mjs +2919 -0
- package/fesm2022/herum-shared-atoms.mjs.map +1 -0
- package/fesm2022/herum-shared-constants.mjs +711 -0
- package/fesm2022/herum-shared-constants.mjs.map +1 -0
- package/fesm2022/herum-shared-decorators.mjs +12 -0
- package/fesm2022/herum-shared-decorators.mjs.map +1 -0
- package/fesm2022/herum-shared-dialogs.mjs +113 -0
- package/fesm2022/herum-shared-dialogs.mjs.map +1 -0
- package/fesm2022/herum-shared-directives.mjs +226 -0
- package/fesm2022/herum-shared-directives.mjs.map +1 -0
- package/fesm2022/herum-shared-environment.mjs +10 -0
- package/fesm2022/herum-shared-environment.mjs.map +1 -0
- package/fesm2022/herum-shared-errors.mjs +71 -0
- package/fesm2022/herum-shared-errors.mjs.map +1 -0
- package/fesm2022/herum-shared-fetched-message.mjs +118 -0
- package/fesm2022/herum-shared-fetched-message.mjs.map +1 -0
- package/fesm2022/herum-shared-herum-types.mjs +106 -0
- package/fesm2022/herum-shared-herum-types.mjs.map +1 -0
- package/fesm2022/herum-shared-molecules.mjs +1530 -0
- package/fesm2022/herum-shared-molecules.mjs.map +1 -0
- package/fesm2022/herum-shared-mongo-molecules.mjs +269 -0
- package/fesm2022/herum-shared-mongo-molecules.mjs.map +1 -0
- package/fesm2022/herum-shared-mongo-services.mjs +441 -0
- package/fesm2022/herum-shared-mongo-services.mjs.map +1 -0
- package/fesm2022/herum-shared-mongo.mjs +729 -0
- package/fesm2022/herum-shared-mongo.mjs.map +1 -0
- package/fesm2022/herum-shared-objectsExample.mjs +190 -0
- package/fesm2022/herum-shared-objectsExample.mjs.map +1 -0
- package/fesm2022/herum-shared-pipes.mjs +406 -0
- package/fesm2022/herum-shared-pipes.mjs.map +1 -0
- package/fesm2022/herum-shared-services.mjs +1107 -0
- package/fesm2022/herum-shared-services.mjs.map +1 -0
- package/fesm2022/herum-shared-static-services.mjs +140 -0
- package/fesm2022/herum-shared-static-services.mjs.map +1 -0
- package/fesm2022/herum-shared-table.mjs +837 -0
- package/fesm2022/herum-shared-table.mjs.map +1 -0
- package/fesm2022/herum-shared-testsObjects.mjs +5722 -0
- package/fesm2022/herum-shared-testsObjects.mjs.map +1 -0
- package/fesm2022/herum-shared-tokens.mjs +13 -0
- package/fesm2022/herum-shared-tokens.mjs.map +1 -0
- package/fesm2022/herum-shared-utils.mjs +380 -0
- package/fesm2022/herum-shared-utils.mjs.map +1 -0
- package/fesm2022/herum-shared-validators.mjs +76 -0
- package/fesm2022/herum-shared-validators.mjs.map +1 -0
- package/fesm2022/herum-shared.mjs +11709 -0
- package/fesm2022/herum-shared.mjs.map +1 -0
- package/fetched-message/index.d.ts +49 -0
- package/herum-types/index.d.ts +198 -0
- package/index.d.ts +2946 -0
- package/molecules/index.d.ts +458 -0
- package/mongo/index.d.ts +175 -0
- package/mongo/molecules/index.d.ts +76 -0
- package/mongo/services/index.d.ts +98 -0
- package/objectsExample/index.d.ts +11 -0
- package/package.json +128 -0
- package/pipes/index.d.ts +93 -0
- package/services/index.d.ts +266 -0
- package/static-services/index.d.ts +25 -0
- package/styles/_mixin.scss +86 -0
- package/styles/collection-wizard-layout.component.scss +70 -0
- package/styles/dialogs.scss +49 -0
- package/styles/forms.scss +18 -0
- package/styles/overView.scss +115 -0
- package/styles/variables/_colors.college.scss +65 -0
- package/styles/variables/_colors.scss +161 -0
- package/styles/variables/_sizes.scss +73 -0
- package/styles/wizard-steps-layout.scss +21 -0
- package/table/index.d.ts +233 -0
- package/testsObjects/index.d.ts +91 -0
- package/tokens/index.d.ts +8 -0
- package/utils/index.d.ts +92 -0
- package/validators/index.d.ts +20 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { QueryList, ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
3
|
+
import { ToastsService, UploadsManagerService } from 'herum-shared/mongo/services';
|
|
4
|
+
import { Toast, ToastStatus, UploadProgressStatus, UploadProgressMetadata, UploadProgressType } from 'herum-shared/herum-types';
|
|
5
|
+
import { Subject, Observable } from 'rxjs';
|
|
6
|
+
import * as i3 from '@angular/common';
|
|
7
|
+
import * as i4 from 'herum-shared/pipes';
|
|
8
|
+
import * as i5 from 'herum-shared/atoms';
|
|
9
|
+
|
|
10
|
+
declare class HerumToastsComponent {
|
|
11
|
+
private toastsService;
|
|
12
|
+
private changeDetectorRef;
|
|
13
|
+
toastElements: QueryList<ElementRef>;
|
|
14
|
+
toasts: Toast[];
|
|
15
|
+
minimumOpacity: number;
|
|
16
|
+
transformDuration: number;
|
|
17
|
+
leavingDuration: number;
|
|
18
|
+
gap: number;
|
|
19
|
+
constructor(toastsService: ToastsService, changeDetectorRef: ChangeDetectorRef);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
handleNewToast(toast: Toast): void;
|
|
22
|
+
private reduceToastHeights;
|
|
23
|
+
_onHideToast(currentToast: Toast, lowToasts: boolean): void;
|
|
24
|
+
private removeToast;
|
|
25
|
+
private setToastLinearOpacity;
|
|
26
|
+
_toastStatusIcon(toastStatus: ToastStatus): string;
|
|
27
|
+
get successStatus(): any;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HerumToastsComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HerumToastsComponent, "herum-toasts", never, {}, {}, never, never, false, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class HerumUploadsManagerComponent {
|
|
33
|
+
private uploadsManagerService;
|
|
34
|
+
destroySubject$: Subject<null>;
|
|
35
|
+
isContainerOpen: boolean;
|
|
36
|
+
loadingStatus: UploadProgressStatus;
|
|
37
|
+
errorStatus: UploadProgressStatus;
|
|
38
|
+
successStatus: UploadProgressStatus;
|
|
39
|
+
uploadsProgressMetadata: UploadProgressMetadata[];
|
|
40
|
+
averageProgressSum: number;
|
|
41
|
+
hasUploadProgressFinished: boolean;
|
|
42
|
+
numberOfFailedLoaders: number;
|
|
43
|
+
successProgressBarColor: string;
|
|
44
|
+
progressBarColor: string;
|
|
45
|
+
showConfirmationNativeMessage(event: any): void;
|
|
46
|
+
constructor(uploadsManagerService: UploadsManagerService);
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
private setSuccessProgressBarColor;
|
|
49
|
+
private uploadsProgressMetadataSubscription;
|
|
50
|
+
_onRetryFailedUploads(): void;
|
|
51
|
+
_onRetryFailedUpload(uploadProgressId: string): void;
|
|
52
|
+
_onClose(): void;
|
|
53
|
+
_onToggleUploadsContainer(): void;
|
|
54
|
+
_isTruncatedTitleElement(element: HTMLElement): boolean;
|
|
55
|
+
_getUploadProgressDescription(uploadProgressMetadata: UploadProgressMetadata): string;
|
|
56
|
+
_isUploadProgressStatusError(uploadProgressStatus: UploadProgressStatus): boolean;
|
|
57
|
+
_getFileIcon(uploadProgressType: UploadProgressType): string;
|
|
58
|
+
_getUploadStatusIcon(uploadProgressType: UploadProgressType): string;
|
|
59
|
+
_trackByFn(index: number, uploadProgressMetadata: UploadProgressMetadata): any;
|
|
60
|
+
get containerTitle$(): Observable<string>;
|
|
61
|
+
calculateAverageProgressSum(uploadsProgressMetadata: UploadProgressMetadata[]): number;
|
|
62
|
+
calculateHasUploadProgressFinished(uploadsProgressMetadata: UploadProgressMetadata[]): boolean;
|
|
63
|
+
calculateNumberOfFailedLoaders(uploadsProgressMetadata: UploadProgressMetadata[]): number;
|
|
64
|
+
calculateProgressBarColor(uploadsProgressMetadata: UploadProgressMetadata[]): string;
|
|
65
|
+
ngOnDestroy(): void;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HerumUploadsManagerComponent, never>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HerumUploadsManagerComponent, "herum-uploads-manager", never, {}, {}, never, never, false, never>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class MongoMoleculesModule {
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MongoMoleculesModule, never>;
|
|
72
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MongoMoleculesModule, [typeof HerumToastsComponent, typeof HerumUploadsManagerComponent], [typeof i3.CommonModule, typeof i4.PipesModule, typeof i5.AtomsModule], [typeof HerumToastsComponent, typeof HerumUploadsManagerComponent]>;
|
|
73
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MongoMoleculesModule>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { HerumToastsComponent, HerumUploadsManagerComponent, MongoMoleculesModule };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { HttpRequest, HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { Subject, BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
+
import { FailedDependentsRequestsContext, CommonDependentsToast, ToastHttpResponseDependencies, ComplexObservableArrowFunctions, DependentMetadata, ObservableArrowFunction, Toast, ToastTemplate, ToastStatus, UploadProgressMetadata } from 'herum-shared/herum-types';
|
|
5
|
+
import { EnvironmentConfig } from 'herum-shared/environment';
|
|
6
|
+
import { UtilsService } from 'herum-shared/static-services';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
|
|
9
|
+
declare class ErrorsHandlerService {
|
|
10
|
+
private dialog;
|
|
11
|
+
private http;
|
|
12
|
+
private utilsService;
|
|
13
|
+
private environmentConfig;
|
|
14
|
+
isErrorPopupCurrentlyOpened: boolean;
|
|
15
|
+
failedReportUploadProgressRequests: HttpRequest<any>[];
|
|
16
|
+
failedDependentsRequestsContext: FailedDependentsRequestsContext;
|
|
17
|
+
dependentRequestId$: Subject<string>;
|
|
18
|
+
reportUploadProgressRequest$: Subject<string>;
|
|
19
|
+
commonDependentsErrorToast$: Subject<CommonDependentsToast>;
|
|
20
|
+
errorToast$: Subject<ToastHttpResponseDependencies>;
|
|
21
|
+
constructor(dialog: MatDialog, http: HttpClient, utilsService: UtilsService, environmentConfig: EnvironmentConfig);
|
|
22
|
+
handleError(errorStatus: number, errorData?: any): void;
|
|
23
|
+
setFailedReportUploadProgressRequests(failedReportUploadProgressRequest: HttpRequest<any>): void;
|
|
24
|
+
private handleUnauthorizedError;
|
|
25
|
+
private handleConflictError;
|
|
26
|
+
private handleForbiddenError;
|
|
27
|
+
private handleTimeoutError;
|
|
28
|
+
private handleInternalServerError;
|
|
29
|
+
private handleDependentRequestError;
|
|
30
|
+
private handleReportUploadProgressRequestError;
|
|
31
|
+
private isErrorToastNeeded;
|
|
32
|
+
private handleErrorToast;
|
|
33
|
+
setChainedFailedObservableFunctions(dependentId: string, error: HttpErrorResponse, failedComplexObservableArrowFunctions: ComplexObservableArrowFunctions, initialValue?: any): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsHandlerService, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorsHandlerService>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class DependentsService {
|
|
39
|
+
private errorsHandlerService;
|
|
40
|
+
dependentMetadata: DependentMetadata;
|
|
41
|
+
constructor(errorsHandlerService: ErrorsHandlerService);
|
|
42
|
+
chainObservableFunctions(complexFunctions: ComplexObservableArrowFunctions, initialValue?: any): any;
|
|
43
|
+
private setInitialObservable;
|
|
44
|
+
private handleInitialComplexFunction;
|
|
45
|
+
private handleInitialFunction;
|
|
46
|
+
private chainObservables;
|
|
47
|
+
private handleCurrentChainedComplexObservable;
|
|
48
|
+
handleCurrentChainedObservable(complexFunctions: ComplexObservableArrowFunctions, currentFunction: ObservableArrowFunction, result: any, functionsIndex: number): any;
|
|
49
|
+
private calculateNumberOfObservableFunctions;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DependentsService, never>;
|
|
51
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DependentsService>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare class ToastsService {
|
|
55
|
+
private errorsHandlerService;
|
|
56
|
+
private utilsService;
|
|
57
|
+
private environmentConfig;
|
|
58
|
+
toast$: BehaviorSubject<Toast>;
|
|
59
|
+
toastId: number;
|
|
60
|
+
toastsTemplates: {
|
|
61
|
+
[key: string]: ToastTemplate;
|
|
62
|
+
};
|
|
63
|
+
constructor(errorsHandlerService: ErrorsHandlerService, utilsService: UtilsService, environmentConfig: EnvironmentConfig);
|
|
64
|
+
createToastBasedOnHttpResponse(toastHttpResponseDependencies: ToastHttpResponseDependencies): void;
|
|
65
|
+
findErrorMessageByStatusCode(statusCode: string, mongoMethodDisplayedName: string): string;
|
|
66
|
+
showErrorToast(toastContextKey: string): void;
|
|
67
|
+
showSuccessToast(toastContextKey: string): void;
|
|
68
|
+
showInformationToast(toastContextKey: string): void;
|
|
69
|
+
showOnDemandToast(toastContextKey: string, status: ToastStatus, toastStorageKey?: string): void;
|
|
70
|
+
private hasToastAlreadyShownAndShouldShowOnce;
|
|
71
|
+
showToast(title: string, content: string, status: ToastStatus): void;
|
|
72
|
+
private setToastStatus;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastsService, never>;
|
|
74
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToastsService>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class UploadsManagerService {
|
|
78
|
+
private errorsHandlerService;
|
|
79
|
+
private dependentsService;
|
|
80
|
+
private http;
|
|
81
|
+
private toastsService;
|
|
82
|
+
uploadsManagerTitle$: BehaviorSubject<string>;
|
|
83
|
+
uploadsProgressMetadata$: BehaviorSubject<UploadProgressMetadata[]>;
|
|
84
|
+
constructor(errorsHandlerService: ErrorsHandlerService, dependentsService: DependentsService, http: HttpClient, toastsService: ToastsService);
|
|
85
|
+
private setSubscriptions;
|
|
86
|
+
private updateUploadProgressStatus;
|
|
87
|
+
retryFailedUploads(): Observable<any>[];
|
|
88
|
+
retryFailedUpload(uploadProgressId: string): Observable<any>;
|
|
89
|
+
private handleFailedDependentRequest;
|
|
90
|
+
private handleFailedReportUploadRequest;
|
|
91
|
+
addOrUpdateUploadProgressMetadata(uploadProgressMetadata: UploadProgressMetadata): void;
|
|
92
|
+
getUploadProgressById(uploadProgressId: string): UploadProgressMetadata;
|
|
93
|
+
createNewToastBasedOnHttpRequest(commonDependentsToast: CommonDependentsToast): void;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadsManagerService, never>;
|
|
95
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UploadsManagerService>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { DependentsService, ErrorsHandlerService, ToastsService, UploadsManagerService };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClosedList, User, PermissionTemplate } from 'herum-shared/herum-types';
|
|
2
|
+
|
|
3
|
+
declare const closedListExample: ClosedList;
|
|
4
|
+
|
|
5
|
+
declare const defaultUsers: User[];
|
|
6
|
+
|
|
7
|
+
declare const permissionsTemplatesExample: PermissionTemplate;
|
|
8
|
+
|
|
9
|
+
declare const selfIsTeacherExample: User;
|
|
10
|
+
|
|
11
|
+
export { closedListExample, defaultUsers, permissionsTemplatesExample, selfIsTeacherExample };
|
package/package.json
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "herum-shared",
|
|
3
|
+
"version": "0.1.25",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/animations": "^20.3.2",
|
|
6
|
+
"@angular/cdk": "^20.1.2",
|
|
7
|
+
"@angular/common": "^20.3.2",
|
|
8
|
+
"@angular/core": "^20.3.2",
|
|
9
|
+
"@angular/forms": "^20.3.2",
|
|
10
|
+
"@angular/material": "^20.1.2",
|
|
11
|
+
"@angular/platform-browser": "^20.3.2",
|
|
12
|
+
"@angular/router": "^20.3.2",
|
|
13
|
+
"ag-grid-angular": "^31.3.2",
|
|
14
|
+
"jssha": "^2.4.2",
|
|
15
|
+
"lodash": "^4.17.21",
|
|
16
|
+
"rxjs": "~7.5.1",
|
|
17
|
+
"lottie-web": "^5.13.0",
|
|
18
|
+
"angular-split": "^20.0.0",
|
|
19
|
+
"uuid": "^13.0.0"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"tslib": "^2.0.0"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"module": "fesm2022/herum-shared.mjs",
|
|
26
|
+
"typings": "index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
"./package.json": {
|
|
29
|
+
"default": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./index.d.ts",
|
|
33
|
+
"default": "./fesm2022/herum-shared.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./animations": {
|
|
36
|
+
"types": "./animations/index.d.ts",
|
|
37
|
+
"default": "./fesm2022/herum-shared-animations.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./atoms": {
|
|
40
|
+
"types": "./atoms/index.d.ts",
|
|
41
|
+
"default": "./fesm2022/herum-shared-atoms.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./constants": {
|
|
44
|
+
"types": "./constants/index.d.ts",
|
|
45
|
+
"default": "./fesm2022/herum-shared-constants.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./decorators": {
|
|
48
|
+
"types": "./decorators/index.d.ts",
|
|
49
|
+
"default": "./fesm2022/herum-shared-decorators.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./dialogs": {
|
|
52
|
+
"types": "./dialogs/index.d.ts",
|
|
53
|
+
"default": "./fesm2022/herum-shared-dialogs.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./directives": {
|
|
56
|
+
"types": "./directives/index.d.ts",
|
|
57
|
+
"default": "./fesm2022/herum-shared-directives.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./environment": {
|
|
60
|
+
"types": "./environment/index.d.ts",
|
|
61
|
+
"default": "./fesm2022/herum-shared-environment.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./errors": {
|
|
64
|
+
"types": "./errors/index.d.ts",
|
|
65
|
+
"default": "./fesm2022/herum-shared-errors.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./fetched-message": {
|
|
68
|
+
"types": "./fetched-message/index.d.ts",
|
|
69
|
+
"default": "./fesm2022/herum-shared-fetched-message.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./herum-types": {
|
|
72
|
+
"types": "./herum-types/index.d.ts",
|
|
73
|
+
"default": "./fesm2022/herum-shared-herum-types.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./molecules": {
|
|
76
|
+
"types": "./molecules/index.d.ts",
|
|
77
|
+
"default": "./fesm2022/herum-shared-molecules.mjs"
|
|
78
|
+
},
|
|
79
|
+
"./mongo": {
|
|
80
|
+
"types": "./mongo/index.d.ts",
|
|
81
|
+
"default": "./fesm2022/herum-shared-mongo.mjs"
|
|
82
|
+
},
|
|
83
|
+
"./mongo/molecules": {
|
|
84
|
+
"types": "./mongo/molecules/index.d.ts",
|
|
85
|
+
"default": "./fesm2022/herum-shared-mongo-molecules.mjs"
|
|
86
|
+
},
|
|
87
|
+
"./mongo/services": {
|
|
88
|
+
"types": "./mongo/services/index.d.ts",
|
|
89
|
+
"default": "./fesm2022/herum-shared-mongo-services.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./objectsExample": {
|
|
92
|
+
"types": "./objectsExample/index.d.ts",
|
|
93
|
+
"default": "./fesm2022/herum-shared-objectsExample.mjs"
|
|
94
|
+
},
|
|
95
|
+
"./pipes": {
|
|
96
|
+
"types": "./pipes/index.d.ts",
|
|
97
|
+
"default": "./fesm2022/herum-shared-pipes.mjs"
|
|
98
|
+
},
|
|
99
|
+
"./services": {
|
|
100
|
+
"types": "./services/index.d.ts",
|
|
101
|
+
"default": "./fesm2022/herum-shared-services.mjs"
|
|
102
|
+
},
|
|
103
|
+
"./static-services": {
|
|
104
|
+
"types": "./static-services/index.d.ts",
|
|
105
|
+
"default": "./fesm2022/herum-shared-static-services.mjs"
|
|
106
|
+
},
|
|
107
|
+
"./table": {
|
|
108
|
+
"types": "./table/index.d.ts",
|
|
109
|
+
"default": "./fesm2022/herum-shared-table.mjs"
|
|
110
|
+
},
|
|
111
|
+
"./testsObjects": {
|
|
112
|
+
"types": "./testsObjects/index.d.ts",
|
|
113
|
+
"default": "./fesm2022/herum-shared-testsObjects.mjs"
|
|
114
|
+
},
|
|
115
|
+
"./tokens": {
|
|
116
|
+
"types": "./tokens/index.d.ts",
|
|
117
|
+
"default": "./fesm2022/herum-shared-tokens.mjs"
|
|
118
|
+
},
|
|
119
|
+
"./utils": {
|
|
120
|
+
"types": "./utils/index.d.ts",
|
|
121
|
+
"default": "./fesm2022/herum-shared-utils.mjs"
|
|
122
|
+
},
|
|
123
|
+
"./validators": {
|
|
124
|
+
"types": "./validators/index.d.ts",
|
|
125
|
+
"default": "./fesm2022/herum-shared-validators.mjs"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
package/pipes/index.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { AnswerNote, TextChange, CollectionSubscription, CollectionBase, Collection, Resource, QuizData, ModifiedResource, ResourceSubscription, SignUpField, User } from 'herum-shared/herum-types';
|
|
4
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
5
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
6
|
+
|
|
7
|
+
declare class AnswerNotesToTextChangesPipe implements PipeTransform {
|
|
8
|
+
transform(answerNotes: AnswerNote[]): TextChange[];
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnswerNotesToTextChangesPipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AnswerNotesToTextChangesPipe, "answerNotesToTextChanges", false>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class CollectionSubscriptionToCollectionBasePipe implements PipeTransform {
|
|
14
|
+
transform(collectionSubscription: CollectionSubscription, ...args: unknown[]): CollectionBase;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionSubscriptionToCollectionBasePipe, never>;
|
|
16
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CollectionSubscriptionToCollectionBasePipe, "collectionSubscriptionToCollectionBase", false>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare class CollectionToCollectionBasePipe implements PipeTransform {
|
|
20
|
+
transform(collection: Collection, ...args: unknown[]): CollectionBase;
|
|
21
|
+
transformMulti(collections: Collection[]): CollectionBase[];
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionToCollectionBasePipe, never>;
|
|
23
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CollectionToCollectionBasePipe, "collectionToCollectionBase", false>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare class DisplayedSubmissionsCounterPipe implements PipeTransform {
|
|
27
|
+
transform(resource: Resource, quizData: QuizData, areAnswersBlocked?: boolean): number;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisplayedSubmissionsCounterPipe, never>;
|
|
29
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DisplayedSubmissionsCounterPipe, "displayedSubmissionsCounter", false>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class EllipsisPipe implements PipeTransform {
|
|
33
|
+
transform(value: string, element: HTMLElement, numberOfRows?: number): string;
|
|
34
|
+
private handleMultiRows;
|
|
35
|
+
private ellipsis;
|
|
36
|
+
private getElementWidth;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EllipsisPipe, never>;
|
|
38
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EllipsisPipe, "ellipsis", false>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class ResourceSubscriptionToResourcePipe implements PipeTransform {
|
|
42
|
+
transform(resourceSubscription: any, ...args: unknown[]): ModifiedResource;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSubscriptionToResourcePipe, never>;
|
|
44
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ResourceSubscriptionToResourcePipe, "resourceSubscriptionToResource", false>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class ResourceToResourceSubscriptionPipe implements PipeTransform {
|
|
48
|
+
transform(resource: ModifiedResource, ...args: unknown[]): ResourceSubscription;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceToResourceSubscriptionPipe, never>;
|
|
50
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ResourceToResourceSubscriptionPipe, "resourceToResourceSubscription", false>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class SafeHtmlPipe implements PipeTransform {
|
|
54
|
+
private sanitized;
|
|
55
|
+
constructor(sanitized: DomSanitizer);
|
|
56
|
+
transform(value: any): any;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
58
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare class SafePipe implements PipeTransform {
|
|
62
|
+
private sanitizer;
|
|
63
|
+
constructor(sanitizer: DomSanitizer);
|
|
64
|
+
transform(url: any): _angular_platform_browser.SafeResourceUrl;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafePipe, never>;
|
|
66
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe", false>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class StringArrayToSignUpFieldArrayPipe implements PipeTransform {
|
|
70
|
+
transform(fields: string[] | null | undefined): SignUpField[];
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StringArrayToSignUpFieldArrayPipe, never>;
|
|
72
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<StringArrayToSignUpFieldArrayPipe, "stringArrayToSignUpFieldArray", false>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class ToIntegerPipe implements PipeTransform {
|
|
76
|
+
transform(number: number): number;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToIntegerPipe, never>;
|
|
78
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ToIntegerPipe, "toInteger", false>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare class UserIdentifiedEntitiesToBackendModelsPipe implements PipeTransform {
|
|
82
|
+
transform(user: User): any;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserIdentifiedEntitiesToBackendModelsPipe, never>;
|
|
84
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<UserIdentifiedEntitiesToBackendModelsPipe, "userIdentifiedEntitiesToBackendModels", false>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare class PipesModule {
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PipesModule, never>;
|
|
89
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PipesModule, [typeof SafePipe, typeof CollectionSubscriptionToCollectionBasePipe, typeof CollectionToCollectionBasePipe, typeof SafeHtmlPipe, typeof ResourceSubscriptionToResourcePipe, typeof ResourceToResourceSubscriptionPipe, typeof EllipsisPipe, typeof UserIdentifiedEntitiesToBackendModelsPipe, typeof AnswerNotesToTextChangesPipe, typeof StringArrayToSignUpFieldArrayPipe, typeof ToIntegerPipe, typeof DisplayedSubmissionsCounterPipe], never, [typeof SafePipe, typeof CollectionSubscriptionToCollectionBasePipe, typeof CollectionToCollectionBasePipe, typeof SafeHtmlPipe, typeof ResourceSubscriptionToResourcePipe, typeof ResourceToResourceSubscriptionPipe, typeof EllipsisPipe, typeof UserIdentifiedEntitiesToBackendModelsPipe, typeof AnswerNotesToTextChangesPipe, typeof StringArrayToSignUpFieldArrayPipe, typeof ToIntegerPipe, typeof DisplayedSubmissionsCounterPipe]>;
|
|
90
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PipesModule>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { AnswerNotesToTextChangesPipe, CollectionSubscriptionToCollectionBasePipe, CollectionToCollectionBasePipe, DisplayedSubmissionsCounterPipe, EllipsisPipe, PipesModule, ResourceSubscriptionToResourcePipe, ResourceToResourceSubscriptionPipe, SafeHtmlPipe, SafePipe, StringArrayToSignUpFieldArrayPipe, ToIntegerPipe, UserIdentifiedEntitiesToBackendModelsPipe };
|