herum-shared 0.1.49 → 0.1.51
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/constants/index.d.ts +2 -0
- package/environment/index.d.ts +1 -0
- package/fesm2022/herum-shared-atoms.mjs +1 -1
- package/fesm2022/herum-shared-atoms.mjs.map +1 -1
- package/fesm2022/herum-shared-constants.mjs +3 -1
- package/fesm2022/herum-shared-constants.mjs.map +1 -1
- package/fesm2022/herum-shared-molecules.mjs +80 -42
- package/fesm2022/herum-shared-molecules.mjs.map +1 -1
- package/fesm2022/herum-shared-services.mjs +30 -9
- package/fesm2022/herum-shared-services.mjs.map +1 -1
- package/fesm2022/herum-shared-testsObjects.mjs +3 -2
- package/fesm2022/herum-shared-testsObjects.mjs.map +1 -1
- package/fesm2022/herum-shared-utils.mjs +9 -1
- package/fesm2022/herum-shared-utils.mjs.map +1 -1
- package/fesm2022/herum-shared.mjs +283 -260
- package/fesm2022/herum-shared.mjs.map +1 -1
- package/index.d.ts +25 -17
- package/molecules/index.d.ts +12 -4
- package/package.json +1 -1
- package/services/index.d.ts +2 -0
- package/utils/index.d.ts +2 -1
package/index.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ type EnvironmentConfig = {
|
|
|
123
123
|
siteServerPath: string;
|
|
124
124
|
filesDisplayServerPath?: string;
|
|
125
125
|
s3ServerPath: string;
|
|
126
|
+
bucketPlaceholderKey: string;
|
|
126
127
|
userAction: string;
|
|
127
128
|
lessonSocketBackend: string;
|
|
128
129
|
keyboardEventsLocalSocketPath: string;
|
|
@@ -548,7 +549,7 @@ declare class HerumQuizComponent implements OnChanges {
|
|
|
548
549
|
onGradeUpdate: EventEmitter<any>;
|
|
549
550
|
isCurrentQuestionValid: boolean;
|
|
550
551
|
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
551
|
-
ngOnChanges(
|
|
552
|
+
ngOnChanges(): void;
|
|
552
553
|
get currentQuestionIndex(): number;
|
|
553
554
|
get currentQuestionValidation(): boolean;
|
|
554
555
|
get nextButtonText(): "התחל מבחן" | "חזרה למסך סיכום" | "סיים מבחן" | "הגשת מבחן" | "ניסיון חוזר" | "לשאלה הבאה";
|
|
@@ -617,17 +618,16 @@ declare class QuizOneAnswerQuestionComponent implements OnChanges {
|
|
|
617
618
|
name: string;
|
|
618
619
|
}[];
|
|
619
620
|
selectedAnswer: FormControl;
|
|
621
|
+
destroySubject$: Subject<null>;
|
|
620
622
|
answerNotes: string[];
|
|
621
623
|
correctAnswer: IdentifiedEntity;
|
|
622
624
|
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
623
625
|
ngOnChanges(changes: SimpleChanges): void;
|
|
624
|
-
private get isRadioBlocked();
|
|
625
626
|
private getAnswerNotes;
|
|
626
627
|
private convertToOptions;
|
|
627
|
-
private getChosenAnswerId;
|
|
628
628
|
private isCheckedAnswerCorrect;
|
|
629
|
-
|
|
630
|
-
|
|
629
|
+
ngOnInit(): void;
|
|
630
|
+
ngOnDestroy(): void;
|
|
631
631
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuizOneAnswerQuestionComponent, never>;
|
|
632
632
|
static ɵcmp: i0.ɵɵComponentDeclaration<QuizOneAnswerQuestionComponent, "quiz-one-answer-question", never, { "instructionTitle": { "alias": "instructionTitle"; "required": false; }; "question": { "alias": "question"; "required": false; }; "userAnswers": { "alias": "userAnswers"; "required": false; }; "quizData": { "alias": "quizData"; "required": false; }; "areAnswersRevealed": { "alias": "areAnswersRevealed"; "required": false; }; "areAnswersBlocked": { "alias": "areAnswersBlocked"; "required": false; }; "isCheckingMode": { "alias": "isCheckingMode"; "required": false; }; }, { "onAnswersChange": "onAnswersChange"; }, never, never, false, never>;
|
|
633
633
|
}
|
|
@@ -681,8 +681,6 @@ declare class QuizMultiAnswerQuestionComponent {
|
|
|
681
681
|
answerTypeAttributes: string[];
|
|
682
682
|
constructor(fb: FormBuilder);
|
|
683
683
|
ngOnChanges(changes: SimpleChanges): void;
|
|
684
|
-
private initQuestionFormControls;
|
|
685
|
-
private syncQuestionFormControls;
|
|
686
684
|
private setAnswerTypeAttributes;
|
|
687
685
|
_onAnswerClicked(index: number): void;
|
|
688
686
|
_isAnswerChecked(answerId: string): boolean;
|
|
@@ -690,10 +688,8 @@ declare class QuizMultiAnswerQuestionComponent {
|
|
|
690
688
|
private iAnswerCorrect;
|
|
691
689
|
_onAnswersChange(answer: Answer, isChosen: boolean): void;
|
|
692
690
|
private getFormControlValue;
|
|
693
|
-
private toIsChosen;
|
|
694
691
|
get controlNamePrefix(): string;
|
|
695
692
|
get isBlocked(): boolean;
|
|
696
|
-
get questionAnswers(): Answer[];
|
|
697
693
|
ngOnDestroy(): void;
|
|
698
694
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuizMultiAnswerQuestionComponent, never>;
|
|
699
695
|
static ɵcmp: i0.ɵɵComponentDeclaration<QuizMultiAnswerQuestionComponent, "quiz-multi-answer-question", never, { "question": { "alias": "question"; "required": false; }; "quizData": { "alias": "quizData"; "required": false; }; "userAnswers": { "alias": "userAnswers"; "required": false; }; "isCheckingMode": { "alias": "isCheckingMode"; "required": false; }; "areAnswersRevealed": { "alias": "areAnswersRevealed"; "required": false; }; "areAnswersBlocked": { "alias": "areAnswersBlocked"; "required": false; }; "correctAnswerCount": { "alias": "correctAnswerCount"; "required": false; }; }, { "onAnswersChange": "onAnswersChange"; "onValidationChange": "onValidationChange"; }, never, never, false, never>;
|
|
@@ -1113,9 +1109,9 @@ declare class QuizOpenAnswerQuestionComponent {
|
|
|
1113
1109
|
areAnswersBlocked: boolean;
|
|
1114
1110
|
isCheckingMode: boolean;
|
|
1115
1111
|
selectedTextChange: TextChange;
|
|
1116
|
-
|
|
1112
|
+
answerChange: EventEmitter<string>;
|
|
1117
1113
|
notesChange: EventEmitter<TextChange[]>;
|
|
1118
|
-
|
|
1114
|
+
freeTextControl: FormControl<string>;
|
|
1119
1115
|
notes: TextChange[];
|
|
1120
1116
|
destroySubject$: Subject<null>;
|
|
1121
1117
|
constructor(answerNotesToTextChangesPipe: AnswerNotesToTextChangesPipe$1);
|
|
@@ -1124,7 +1120,7 @@ declare class QuizOpenAnswerQuestionComponent {
|
|
|
1124
1120
|
_notesChange(notes: TextChange[]): void;
|
|
1125
1121
|
ngOnDestroy(): void;
|
|
1126
1122
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuizOpenAnswerQuestionComponent, never>;
|
|
1127
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<QuizOpenAnswerQuestionComponent, "quiz-open-answer-question", never, { "previewMode": { "alias": "previewMode"; "required": false; }; "question": { "alias": "question"; "required": false; }; "userQuestion": { "alias": "userQuestion"; "required": false; }; "areAnswersRevealed": { "alias": "areAnswersRevealed"; "required": false; }; "areAnswersBlocked": { "alias": "areAnswersBlocked"; "required": false; }; "isCheckingMode": { "alias": "isCheckingMode"; "required": false; }; "selectedTextChange": { "alias": "selectedTextChange"; "required": false; }; }, { "
|
|
1123
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QuizOpenAnswerQuestionComponent, "quiz-open-answer-question", never, { "previewMode": { "alias": "previewMode"; "required": false; }; "question": { "alias": "question"; "required": false; }; "userQuestion": { "alias": "userQuestion"; "required": false; }; "areAnswersRevealed": { "alias": "areAnswersRevealed"; "required": false; }; "areAnswersBlocked": { "alias": "areAnswersBlocked"; "required": false; }; "isCheckingMode": { "alias": "isCheckingMode"; "required": false; }; "selectedTextChange": { "alias": "selectedTextChange"; "required": false; }; }, { "answerChange": "answerChange"; "notesChange": "notesChange"; }, never, never, false, never>;
|
|
1128
1124
|
}
|
|
1129
1125
|
|
|
1130
1126
|
declare class HerumHighlightDirective {
|
|
@@ -1984,7 +1980,7 @@ declare class UserProfileImageComponent {
|
|
|
1984
1980
|
user: User | UserPreview;
|
|
1985
1981
|
isLoadingUser: boolean;
|
|
1986
1982
|
isUserClickAble: boolean;
|
|
1987
|
-
userClicked: EventEmitter<
|
|
1983
|
+
userClicked: EventEmitter<User | UserPreview>;
|
|
1988
1984
|
imagePath: string;
|
|
1989
1985
|
isLoadingImage: boolean;
|
|
1990
1986
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -2282,6 +2278,7 @@ declare class HerumDateTimePickerComponent {
|
|
|
2282
2278
|
|
|
2283
2279
|
declare class HerumDropZoneComponent {
|
|
2284
2280
|
private environmentConfig;
|
|
2281
|
+
private utilsService;
|
|
2285
2282
|
selectedFiles: File[];
|
|
2286
2283
|
placeholder: string;
|
|
2287
2284
|
numberOfAllowedFiles: number;
|
|
@@ -2313,7 +2310,7 @@ declare class HerumDropZoneComponent {
|
|
|
2313
2310
|
condition: () => boolean;
|
|
2314
2311
|
message: string;
|
|
2315
2312
|
}[];
|
|
2316
|
-
constructor(environmentConfig: EnvironmentConfig$1);
|
|
2313
|
+
constructor(environmentConfig: EnvironmentConfig$1, utilsService: UtilsService$1);
|
|
2317
2314
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2318
2315
|
_onRemoveFile(index: number, event: MouseEvent): void;
|
|
2319
2316
|
_onRemoveImage(): void;
|
|
@@ -2345,17 +2342,24 @@ declare class HerumExpendablePanelComponent {
|
|
|
2345
2342
|
}
|
|
2346
2343
|
|
|
2347
2344
|
declare class HerumFilesViewerComponent {
|
|
2348
|
-
private
|
|
2345
|
+
private utilsService;
|
|
2346
|
+
private static readonly imageExtensions;
|
|
2347
|
+
private static readonly videoExtensions;
|
|
2348
|
+
private static readonly audioExtensions;
|
|
2349
2349
|
fileData: FileData;
|
|
2350
2350
|
showDeleteFileButton: boolean;
|
|
2351
2351
|
downloadFile: EventEmitter<FileData>;
|
|
2352
2352
|
deleteFile: EventEmitter<FileData>;
|
|
2353
2353
|
srcPath: string;
|
|
2354
2354
|
fileType: string;
|
|
2355
|
-
constructor(
|
|
2355
|
+
constructor(utilsService: UtilsService$1);
|
|
2356
2356
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2357
2357
|
_onDeleteFile(): void;
|
|
2358
2358
|
_downloadFile(): void;
|
|
2359
|
+
private resolveRemoteSourcePath;
|
|
2360
|
+
private resolveFileType;
|
|
2361
|
+
private resolveFileTypeFromMime;
|
|
2362
|
+
private resolveFileTypeFromExtension;
|
|
2359
2363
|
static ɵfac: i0.ɵɵFactoryDeclaration<HerumFilesViewerComponent, never>;
|
|
2360
2364
|
static ɵcmp: i0.ɵɵComponentDeclaration<HerumFilesViewerComponent, "herum-files-viewer", never, { "fileData": { "alias": "fileData"; "required": false; }; "showDeleteFileButton": { "alias": "showDeleteFileButton"; "required": false; }; }, { "downloadFile": "downloadFile"; "deleteFile": "deleteFile"; }, never, never, false, never>;
|
|
2361
2365
|
}
|
|
@@ -2404,7 +2408,7 @@ declare class HerumMultiProgressBarComponent implements OnInit {
|
|
|
2404
2408
|
}[];
|
|
2405
2409
|
constructor();
|
|
2406
2410
|
ngOnInit(): void;
|
|
2407
|
-
getBorderRadius(sectionIndex: number, progressBarIndex: number): "none" | "
|
|
2411
|
+
getBorderRadius(sectionIndex: number, progressBarIndex: number): "none" | "both" | "left" | "right";
|
|
2408
2412
|
static ɵfac: i0.ɵɵFactoryDeclaration<HerumMultiProgressBarComponent, never>;
|
|
2409
2413
|
static ɵcmp: i0.ɵɵComponentDeclaration<HerumMultiProgressBarComponent, "herum-multi-progress-bar", never, { "progressBarsSections": { "alias": "progressBarsSections"; "required": false; }; }, {}, never, never, false, never>;
|
|
2410
2414
|
}
|
|
@@ -3061,6 +3065,8 @@ declare class UtilsService {
|
|
|
3061
3065
|
getUrlFromFileData(fileData: Partial<FileData>): string;
|
|
3062
3066
|
fetchFiles(fileId: string, resourceType: string, bucket?: string): Promise<Response>;
|
|
3063
3067
|
initAudioFile(fileId: string, bucketName?: string, signal?: AbortSignal): Promise<File>;
|
|
3068
|
+
private joinUrlParts;
|
|
3069
|
+
private trimSlashes;
|
|
3064
3070
|
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
|
|
3065
3071
|
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
|
|
3066
3072
|
}
|
|
@@ -3423,6 +3429,8 @@ declare const regexExpressions: {
|
|
|
3423
3429
|
chromeVersionRegex: RegExp;
|
|
3424
3430
|
removeSpacesRegex: RegExp;
|
|
3425
3431
|
phoneNumberTenDigits: RegExp;
|
|
3432
|
+
trailingSlashes: RegExp;
|
|
3433
|
+
leadingAndTrailingSlashes: RegExp;
|
|
3426
3434
|
};
|
|
3427
3435
|
|
|
3428
3436
|
declare const resourceFileTypes: {
|
package/molecules/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
|
6
6
|
import * as i40 from 'herum-shared/atoms';
|
|
7
7
|
import { HerumInputFieldComponent } from 'herum-shared/atoms';
|
|
8
8
|
import { DisplayIdentifiedEntity, IdentifiedEntity, FileData, TreeNodeAssignmentsData, NodeMenuItem, SystemTreeNodeData, Step, KeyValue, ProgressOverView } from 'herum-types/Shared';
|
|
9
|
-
import { CommonGraphqlRequestsService } from 'herum-shared/services';
|
|
9
|
+
import { CommonGraphqlRequestsService, UtilsService } from 'herum-shared/services';
|
|
10
10
|
import * as i36 from '@angular/material/datepicker';
|
|
11
11
|
import { DateRange } from '@angular/material/datepicker';
|
|
12
12
|
import { EnvironmentConfig } from 'herum-shared/environment';
|
|
@@ -221,6 +221,7 @@ declare class HerumDateTimePickerComponent {
|
|
|
221
221
|
|
|
222
222
|
declare class HerumDropZoneComponent {
|
|
223
223
|
private environmentConfig;
|
|
224
|
+
private utilsService;
|
|
224
225
|
selectedFiles: File[];
|
|
225
226
|
placeholder: string;
|
|
226
227
|
numberOfAllowedFiles: number;
|
|
@@ -252,7 +253,7 @@ declare class HerumDropZoneComponent {
|
|
|
252
253
|
condition: () => boolean;
|
|
253
254
|
message: string;
|
|
254
255
|
}[];
|
|
255
|
-
constructor(environmentConfig: EnvironmentConfig);
|
|
256
|
+
constructor(environmentConfig: EnvironmentConfig, utilsService: UtilsService);
|
|
256
257
|
ngOnChanges(changes: SimpleChanges): void;
|
|
257
258
|
_onRemoveFile(index: number, event: MouseEvent): void;
|
|
258
259
|
_onRemoveImage(): void;
|
|
@@ -284,17 +285,24 @@ declare class HerumExpendablePanelComponent {
|
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
declare class HerumFilesViewerComponent {
|
|
287
|
-
private
|
|
288
|
+
private utilsService;
|
|
289
|
+
private static readonly imageExtensions;
|
|
290
|
+
private static readonly videoExtensions;
|
|
291
|
+
private static readonly audioExtensions;
|
|
288
292
|
fileData: FileData;
|
|
289
293
|
showDeleteFileButton: boolean;
|
|
290
294
|
downloadFile: EventEmitter<FileData>;
|
|
291
295
|
deleteFile: EventEmitter<FileData>;
|
|
292
296
|
srcPath: string;
|
|
293
297
|
fileType: string;
|
|
294
|
-
constructor(
|
|
298
|
+
constructor(utilsService: UtilsService);
|
|
295
299
|
ngOnChanges(changes: SimpleChanges): void;
|
|
296
300
|
_onDeleteFile(): void;
|
|
297
301
|
_downloadFile(): void;
|
|
302
|
+
private resolveRemoteSourcePath;
|
|
303
|
+
private resolveFileType;
|
|
304
|
+
private resolveFileTypeFromMime;
|
|
305
|
+
private resolveFileTypeFromExtension;
|
|
298
306
|
static ɵfac: i0.ɵɵFactoryDeclaration<HerumFilesViewerComponent, never>;
|
|
299
307
|
static ɵcmp: i0.ɵɵComponentDeclaration<HerumFilesViewerComponent, "herum-files-viewer", never, { "fileData": { "alias": "fileData"; "required": false; }; "showDeleteFileButton": { "alias": "showDeleteFileButton"; "required": false; }; }, { "downloadFile": "downloadFile"; "deleteFile": "deleteFile"; }, never, never, false, never>;
|
|
300
308
|
}
|
package/package.json
CHANGED
package/services/index.d.ts
CHANGED
|
@@ -210,6 +210,8 @@ declare class UtilsService {
|
|
|
210
210
|
getUrlFromFileData(fileData: Partial<FileData>): string;
|
|
211
211
|
fetchFiles(fileId: string, resourceType: string, bucket?: string): Promise<Response>;
|
|
212
212
|
initAudioFile(fileId: string, bucketName?: string, signal?: AbortSignal): Promise<File>;
|
|
213
|
+
private joinUrlParts;
|
|
214
|
+
private trimSlashes;
|
|
213
215
|
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsService, never>;
|
|
214
216
|
static ɵprov: i0.ɵɵInjectableDeclaration<UtilsService>;
|
|
215
217
|
}
|
package/utils/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { CollectionSubscription, ResourceSubscription } from 'herum-types/User';
|
|
|
9
9
|
declare const flatten: <T>(arr: T[][]) => T[];
|
|
10
10
|
declare const findKeyByValue: (array: {}[], value: any) => string;
|
|
11
11
|
declare const parseToIdentifiedEntitiesArray: (array: string[]) => IdentifiedEntity[];
|
|
12
|
+
declare const shuffleArray: <T>(items: T[]) => T[];
|
|
12
13
|
|
|
13
14
|
declare const getAssignmentStateDisplayName: (state: any) => "שיבוץ זמני" | "אכ\"א" | "אג\"ת";
|
|
14
15
|
|
|
@@ -91,5 +92,5 @@ declare const getDropdownAnimationStates: (isDropdownOpen: boolean, dropDownDire
|
|
|
91
92
|
declare const getSubscriptionWithLastActivityTime: (subscriptions: CollectionSubscription[] | ResourceSubscription[]) => CollectionSubscription;
|
|
92
93
|
declare const getLastSubscriptionByField: (subscriptions: CollectionSubscription[] | ResourceSubscription[], field: string) => CollectionSubscription;
|
|
93
94
|
|
|
94
|
-
export { buildPath, bytesToMegabytes, camelCaseToPascalCase, capitalizeWord, convertDependentMetadataToHeaders, convertHeightToPixels, convertToDate, downloadFile, findKeyByValue, flatten, generateNewTimeStamp, getAssignmentStateDisplayName, getBrowserVersion, getChromeVersion, getDeserializedFile, getDifferencesInLists, getDifferencesInObjects, getDropdownAnimationStates, getEntitiesLayoutProperties, getHierarchyPartIfExist, getLastSubscriptionByField, getMicroResourceTextualTimeString, getSubscriptionWithLastActivityTime, getTimeAsAgo, getVersionPathParameter, isTruncatedTitleElement, parseToIdentifiedEntitiesArray, remainJustWantedValueInDictionary, removeCommonItemsInObjectsFields, removeCommonObjectsBetweenArrays, removeDuplicatesBetweenArrays, removeUnwantedProperties, replaceInterpolateKeysWithObjectProperties, setElementsGridStyle, setHeaders, setNavFlexLayout, setNavFlexLayoutStyle, toFirstCapitalLetter, toFirstLowerCaseLetter, toHash, updateFullYear };
|
|
95
|
+
export { buildPath, bytesToMegabytes, camelCaseToPascalCase, capitalizeWord, convertDependentMetadataToHeaders, convertHeightToPixels, convertToDate, downloadFile, findKeyByValue, flatten, generateNewTimeStamp, getAssignmentStateDisplayName, getBrowserVersion, getChromeVersion, getDeserializedFile, getDifferencesInLists, getDifferencesInObjects, getDropdownAnimationStates, getEntitiesLayoutProperties, getHierarchyPartIfExist, getLastSubscriptionByField, getMicroResourceTextualTimeString, getSubscriptionWithLastActivityTime, getTimeAsAgo, getVersionPathParameter, isTruncatedTitleElement, parseToIdentifiedEntitiesArray, remainJustWantedValueInDictionary, removeCommonItemsInObjectsFields, removeCommonObjectsBetweenArrays, removeDuplicatesBetweenArrays, removeUnwantedProperties, replaceInterpolateKeysWithObjectProperties, setElementsGridStyle, setHeaders, setNavFlexLayout, setNavFlexLayoutStyle, shuffleArray, toFirstCapitalLetter, toFirstLowerCaseLetter, toHash, updateFullYear };
|
|
95
96
|
export type { ListsDiffs };
|