herum-shared 1.0.13 → 1.0.14-ofir-beta-6

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.
@@ -148,6 +148,7 @@ declare const defaultAuthorizationObject: {
148
148
  questionGrade(): BackendMicroResourceAuthorization;
149
149
  areAnswersCorrect(): BackendMicroResourceAuthorization;
150
150
  answerNotes(): BackendMicroResourceAuthorization;
151
+ fileSubmissionNote(): BackendMicroResourceAuthorization;
151
152
  isCorrect(): BackendMicroResourceAuthorization;
152
153
  answerNote(): BackendMicroResourceAuthorization;
153
154
  matchingSourceIndex(): BackendMicroResourceAuthorization;
@@ -312,6 +313,7 @@ declare const regexExpressions: {
312
313
  phoneNumberTenDigits: RegExp;
313
314
  trailingSlashes: RegExp;
314
315
  leadingAndTrailingSlashes: RegExp;
316
+ uriSchemePrefix: RegExp;
315
317
  };
316
318
 
317
319
  declare const resourceFileTypes: {
@@ -1,13 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit } from '@angular/core';
3
2
  import { MatDialogRef } from '@angular/material/dialog';
4
3
  import { DialogConfig } from 'herum-types/Dialogs';
5
4
  import { EnvironmentConfig } from 'herum-shared/environment';
6
- import { FileData } from 'herum-types/Shared';
7
- import * as i3 from '@angular/common';
8
- import * as i4 from 'herum-shared/atoms';
9
- import * as i5 from 'herum-shared/pipes';
10
- import * as i6 from 'herum-shared/molecules';
5
+ import * as i2 from '@angular/common';
6
+ import * as i3 from 'herum-shared/atoms';
7
+ import * as i4 from 'herum-shared/pipes';
8
+ import * as i5 from 'herum-shared/molecules';
11
9
 
12
10
  declare class InsuranceDialogComponent {
13
11
  dialogRef: MatDialogRef<InsuranceDialogComponent>;
@@ -22,21 +20,10 @@ declare class InsuranceDialogComponent {
22
20
  static ɵcmp: i0.ɵɵComponentDeclaration<InsuranceDialogComponent, "app-insurance-dialog", never, {}, {}, never, never, false, never>;
23
21
  }
24
22
 
25
- declare class HerumFilesViewerDialogComponent implements OnInit {
26
- private dialogRef;
27
- data: any;
28
- fileData: FileData;
29
- constructor(dialogRef: MatDialogRef<FileData>, data: any);
30
- ngOnInit(): void;
31
- _downloadFile(): void;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<HerumFilesViewerDialogComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<HerumFilesViewerDialogComponent, "herum-files-viewer-dialog", never, {}, {}, never, never, false, never>;
34
- }
35
-
36
23
  declare class DialogsModule {
37
24
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogsModule, never>;
38
- static ɵmod: i0.ɵɵNgModuleDeclaration<DialogsModule, [typeof InsuranceDialogComponent, typeof HerumFilesViewerDialogComponent], [typeof i3.CommonModule, typeof i4.AtomsModule, typeof i5.PipesModule, typeof i6.MoleculesModule], [typeof InsuranceDialogComponent, typeof HerumFilesViewerDialogComponent]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DialogsModule, [typeof InsuranceDialogComponent], [typeof i2.CommonModule, typeof i3.AtomsModule, typeof i4.PipesModule, typeof i5.MoleculesModule], [typeof InsuranceDialogComponent]>;
39
26
  static ɵinj: i0.ɵɵInjectorDeclaration<DialogsModule>;
40
27
  }
41
28
 
42
- export { DialogsModule, HerumFilesViewerDialogComponent, InsuranceDialogComponent };
29
+ export { DialogsModule, InsuranceDialogComponent };
@@ -34,7 +34,7 @@ const openClose = trigger('openClose', [
34
34
  ]);
35
35
 
36
36
  /**
37
- * @file Automatically generated by barrelsby.
37
+ * @file Automatically generated by generate-barrels.js.
38
38
  */
39
39
 
40
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"herum-shared-animations.mjs","sources":["../../../projects/herum-shared/animations/open-close.ts","../../../projects/herum-shared/animations/index.ts","../../../projects/herum-shared/animations/herum-shared-animations.ts"],"sourcesContent":["import { trigger, state, style, animate, transition } from '@angular/animations'; \r\n \r\nexport const openClose = trigger('openClose', [ \r\n state('openUp', style({ \r\n opacity: 1, \r\n transform: 'translateY(-100%)' \r\n })), \r\n \r\n state('openDown', style({ \r\n opacity: 1 \r\n })), \r\n \r\n state('closeDown', style({ \r\n top: 0, \r\n transform: 'translateY(-100%)', \r\n opacity: 0, \r\n height: '0px' ,\r\n })), \r\n \r\n state('closeUp', style({ \r\n opacity: 0, \r\n height: '0px' ,\r\n padding:0\r\n })), \r\n \r\n transition('openUp => closeDown', [ \r\n animate('350ms ease-in') \r\n ]), \r\n \r\n transition('closeDown => openUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('openDown => closeUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('closeUp => openDown', [ \r\n animate('350ms ease-in') \r\n ]) \r\n])","/**\r\n * @file Automatically generated by barrelsby.\r\n */\r\n\r\nexport * from \"./open-close\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEO,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE;AAC1C,IAAA,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;AAClB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE;AACd,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC;AACpB,QAAA,OAAO,EAAE;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC;AACrB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,SAAS,EAAE,mBAAmB;AAC9B,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AAChB,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;AACnB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,OAAO,EAAC;AACX,KAAA,CAAC,CAAC;IAEH,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B;AACJ,CAAA;;ACxCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"herum-shared-animations.mjs","sources":["../../../projects/herum-shared/animations/open-close.ts","../../../projects/herum-shared/animations/index.ts","../../../projects/herum-shared/animations/herum-shared-animations.ts"],"sourcesContent":["import { trigger, state, style, animate, transition } from '@angular/animations'; \r\n \r\nexport const openClose = trigger('openClose', [ \r\n state('openUp', style({ \r\n opacity: 1, \r\n transform: 'translateY(-100%)' \r\n })), \r\n \r\n state('openDown', style({ \r\n opacity: 1 \r\n })), \r\n \r\n state('closeDown', style({ \r\n top: 0, \r\n transform: 'translateY(-100%)', \r\n opacity: 0, \r\n height: '0px' ,\r\n })), \r\n \r\n state('closeUp', style({ \r\n opacity: 0, \r\n height: '0px' ,\r\n padding:0\r\n })), \r\n \r\n transition('openUp => closeDown', [ \r\n animate('350ms ease-in') \r\n ]), \r\n \r\n transition('closeDown => openUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('openDown => closeUp', [ \r\n animate('350ms ease-out') \r\n ]), \r\n \r\n transition('closeUp => openDown', [ \r\n animate('350ms ease-in') \r\n ]) \r\n])","/**\r\n * @file Automatically generated by generate-barrels.js.\r\n */\r\n\r\nexport * from \"./open-close\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEO,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE;AAC1C,IAAA,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;AAClB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE;AACd,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC;AACpB,QAAA,OAAO,EAAE;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC;AACrB,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,SAAS,EAAE,mBAAmB;AAC9B,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AAChB,KAAA,CAAC,CAAC;AAEH,IAAA,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;AACnB,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,OAAO,EAAC;AACX,KAAA,CAAC,CAAC;IAEH,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,gBAAgB;KAC3B,CAAC;IAEF,UAAU,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CAAC,eAAe;KAC1B;AACJ,CAAA;;ACxCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -213,6 +213,13 @@ const defaultAuthorizationObject = {
213
213
  ...closeStatus
214
214
  });
215
215
  },
216
+ fileSubmissionNote() {
217
+ return cloneDeep({
218
+ propertyPath: `ResourceSubscriptions[${resourceIdPlaceholder}].FileSubmissions.TeacherFeedbacks[]`,
219
+ authorizationType: MicroResourceAuthorizationType.view,
220
+ ...closeStatus
221
+ });
222
+ },
216
223
  isCorrect() {
217
224
  return cloneDeep({
218
225
  propertyPath: `[${resourceIdPlaceholder}]${correctAnswerPropertyPath}`,
@@ -245,7 +252,12 @@ function getResourceDefaultAuthorizations() {
245
252
  return [defaultAuthorizationObject.view()];
246
253
  }
247
254
  function getPublishAuthorization() {
248
- return [defaultAuthorizationObject.resourceGrade(), defaultAuthorizationObject.questionGrade(), defaultAuthorizationObject.areAnswersCorrect(), defaultAuthorizationObject.answerNotes(), defaultAuthorizationObject.isCorrect(), defaultAuthorizationObject.answerNote(), defaultAuthorizationObject.matchingSourceIndex()];
255
+ return [defaultAuthorizationObject.resourceGrade(), defaultAuthorizationObject.questionGrade(),
256
+ defaultAuthorizationObject.areAnswersCorrect(), defaultAuthorizationObject.answerNotes(),
257
+ defaultAuthorizationObject.isCorrect(), defaultAuthorizationObject.answerNote(),
258
+ defaultAuthorizationObject.matchingSourceIndex(),
259
+ defaultAuthorizationObject.fileSubmissionNote()
260
+ ];
249
261
  }
250
262
  function getMediaDefaultAuthorizations() {
251
263
  return [defaultAuthorizationObject.view(), defaultAuthorizationObject.edit()];
@@ -518,7 +530,8 @@ const regexExpressions = {
518
530
  removeSpacesRegex: /\s+/g,
519
531
  phoneNumberTenDigits: /^\d{10}$/,
520
532
  trailingSlashes: /\/+$/g,
521
- leadingAndTrailingSlashes: /^\/+|\/+$/g
533
+ leadingAndTrailingSlashes: /^\/+|\/+$/g,
534
+ uriSchemePrefix: /^[a-zA-Z][a-zA-Z\d+\-.]*:/
522
535
  };
523
536
 
524
537
  const resourceFileTypes = {