ode-ngjs-front 1.1.3-feat-produit.202203141630 → 1.1.3-feat-produit.202204051449

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.
Files changed (47) hide show
  1. package/dist/ts/directives/business/media/recorder.directive.d.ts +26 -16
  2. package/dist/ts/directives/business/media/recorder.directive.d.ts.map +1 -1
  3. package/dist/ts/directives/business/portal/portal.directive.d.ts +3 -4
  4. package/dist/ts/directives/business/portal/portal.directive.d.ts.map +1 -1
  5. package/dist/ts/directives/components/navigation/custom-guard.directive.d.ts +14 -0
  6. package/dist/ts/directives/components/navigation/custom-guard.directive.d.ts.map +1 -0
  7. package/dist/ts/directives/components/navigation/dirty-guard.directive.d.ts +14 -0
  8. package/dist/ts/directives/components/navigation/dirty-guard.directive.d.ts.map +1 -0
  9. package/dist/ts/directives/components/navigation/document-guard.directive.d.ts +17 -0
  10. package/dist/ts/directives/components/navigation/document-guard.directive.d.ts.map +1 -0
  11. package/dist/ts/directives/components/navigation/genericGuardDirective.d.ts +10 -0
  12. package/dist/ts/directives/components/navigation/genericGuardDirective.d.ts.map +1 -0
  13. package/dist/ts/directives/components/navigation/guard-ignore-template.directive.d.ts +1 -0
  14. package/dist/ts/directives/components/navigation/guard-ignore-template.directive.d.ts.map +1 -0
  15. package/dist/ts/directives/components/navigation/guard-root.directive.d.ts +37 -0
  16. package/dist/ts/directives/components/navigation/guard-root.directive.d.ts.map +1 -0
  17. package/dist/ts/directives/components/navigation/guard-trigger-template.directive.d.ts +1 -0
  18. package/dist/ts/directives/components/navigation/guard-trigger-template.directive.d.ts.map +1 -0
  19. package/dist/ts/directives/components/navigation/input-guard.directive.d.ts +14 -0
  20. package/dist/ts/directives/components/navigation/input-guard.directive.d.ts.map +1 -0
  21. package/dist/ts/directives/components/navigation/navigation-trigger.directive.d.ts +27 -0
  22. package/dist/ts/directives/components/navigation/navigation-trigger.directive.d.ts.map +1 -0
  23. package/dist/ts/directives/components/navigation/reset-guard.directive.d.ts +16 -0
  24. package/dist/ts/directives/components/navigation/reset-guard.directive.d.ts.map +1 -0
  25. package/dist/ts/directives/index.d.ts +7 -0
  26. package/dist/ts/directives/index.d.ts.map +1 -1
  27. package/dist/ts/modules/ui.module.d.ts.map +1 -1
  28. package/dist/ts/services/index.d.ts +2 -0
  29. package/dist/ts/services/index.d.ts.map +1 -1
  30. package/dist/ts/services/video-event-tracker.service.d.ts +17 -0
  31. package/dist/ts/services/video-event-tracker.service.d.ts.map +1 -0
  32. package/dist/ts/services/video-upload.service.d.ts +47 -0
  33. package/dist/ts/services/video-upload.service.d.ts.map +1 -0
  34. package/dist/ts/utils/browser-info.d.ts +19 -0
  35. package/dist/ts/utils/browser-info.d.ts.map +1 -0
  36. package/dist/ts/utils/index.d.ts +2 -0
  37. package/dist/ts/utils/index.d.ts.map +1 -1
  38. package/dist/ts/utils/interfaces.d.ts +20 -0
  39. package/dist/ts/utils/interfaces.d.ts.map +1 -0
  40. package/dist/ts/utils/navigation-guard.d.ts +85 -0
  41. package/dist/ts/utils/navigation-guard.d.ts.map +1 -0
  42. package/dist/ts/utils/{audio-recorder.d.ts → recorder-audio.d.ts} +6 -5
  43. package/dist/ts/utils/recorder-audio.d.ts.map +1 -0
  44. package/dist/ts/utils/recorder-video.d.ts +53 -0
  45. package/dist/ts/utils/recorder-video.d.ts.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/ts/utils/audio-recorder.d.ts.map +0 -1
@@ -1,27 +1,26 @@
1
1
  import { IAttributes, IController, IDirective, IScope } from "angular";
2
2
  import { NgHelperService } from "../../..";
3
- interface IAnyRecorder {
4
- isCompatible(): boolean;
5
- title: string;
6
- status: string;
7
- permission: string;
8
- elapsedTime: number;
9
- state(callback: Function): void;
10
- pause(): void;
11
- play(): void;
12
- suspend(): void;
13
- record(): void;
14
- flush(): void;
15
- save(): void;
16
- }
3
+ import { VideoEventTrackerService, VideoUploadService } from "../../../services";
4
+ import { IAnyRecorder, RecorderState } from "../../../utils";
5
+ import { IObjectGuardDelegate } from "../../../utils/navigation-guard";
17
6
  declare type RecorderType = "audio" | "video";
7
+ declare class VideoRecordGuardModel implements IObjectGuardDelegate {
8
+ hasRecorded: boolean;
9
+ guardObjectIsDirty(): boolean;
10
+ guardObjectReset(): void;
11
+ }
18
12
  export declare class Controller implements IController {
13
+ videoUploadService: VideoUploadService;
14
+ videoEventTrackerService: VideoEventTrackerService;
19
15
  private _recorder;
20
16
  isAudioCompatible: boolean;
21
17
  isVideoCompatible: boolean;
18
+ videoFactory: () => HTMLMediaElement;
19
+ videoDurationHandler: (event: Event) => void;
20
+ recorderStatus: (status: RecorderState) => void;
22
21
  setRecorder(type: RecorderType): IAnyRecorder;
23
22
  get recorder(): IAnyRecorder;
24
- get getPermission(): boolean;
23
+ get hasPermission(): boolean;
25
24
  get isIdle(): boolean;
26
25
  get isPreparing(): boolean;
27
26
  get isRecording(): boolean;
@@ -36,18 +35,29 @@ export declare class Controller implements IController {
36
35
  get showActionButtons(): boolean;
37
36
  get isAudio(): boolean;
38
37
  get isVideo(): boolean;
38
+ videoInputDevices?: MediaDeviceInfo[];
39
+ selectedVid?: MediaDeviceInfo;
40
+ /** Max video recording duration, in ms. */
41
+ get recordMaxTime(): number;
39
42
  switchAudioRecord(): void;
43
+ switchVideoRecord(): void;
40
44
  private trackEvent;
45
+ /** Format a duration in milliseconds as a human-readable string. */
46
+ msToTime: (s: number) => string;
41
47
  private pad2;
48
+ /** Format elapsedTime (in seconds) to a human-readable string. */
42
49
  time(): string;
43
50
  switchPlay(): void;
51
+ switchVideo(id: string): Promise<void>;
44
52
  saveRecord(): void;
45
53
  redo(): void;
46
54
  getSaveBtnClass(): "fas fa-spinner fa-spin" | "fas fa-save";
55
+ constructor(videoUploadService: VideoUploadService, videoEventTrackerService: VideoEventTrackerService);
47
56
  }
48
57
  interface Scope extends IScope {
49
58
  format?: string;
50
59
  onUpload?: Function;
60
+ recordGuard?: VideoRecordGuardModel;
51
61
  }
52
62
  declare class Directive implements IDirective<Scope, JQLite, IAttributes, IController[]> {
53
63
  private helperSvc;
@@ -58,7 +68,7 @@ declare class Directive implements IDirective<Scope, JQLite, IAttributes, IContr
58
68
  format: string;
59
69
  onUpload: string;
60
70
  };
61
- controller: (typeof Controller)[];
71
+ controller: (string | typeof Controller)[];
62
72
  controllerAs: string;
63
73
  require: string[];
64
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/business/media/recorder.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAG1D,UAAU,YAAY;IAClB,YAAY,IAAG,OAAO,CAAC;IACvB,KAAK,EAAC,MAAM,CAAC;IACb,MAAM,EAAC,MAAM,CAAC;IACd,UAAU,EAAC,MAAM,CAAC;IAClB,WAAW,EAAC,MAAM,CAAC;IACnB,KAAK,CAAC,QAAQ,EAAC,QAAQ,GAAE,IAAI,CAAC;IAC9B,KAAK,IAAG,IAAI,CAAC;IACb,IAAI,IAAG,IAAI,CAAC;IACZ,OAAO,IAAG,IAAI,CAAC;IACf,MAAM,IAAG,IAAI,CAAC;IACd,KAAK,IAAG,IAAI,CAAC;IACb,IAAI,IAAG,IAAI,CAAC;CACf;AAED,aAAK,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAGtC,qBAAa,UAAW,YAAW,WAAW;IAC1C,OAAO,CAAC,SAAS,CAA4C;IACtD,iBAAiB,EAAC,OAAO,CAAuE;IAChG,iBAAiB,EAAC,OAAO,CAA4C;IAE5E,WAAW,CAAE,IAAI,EAAC,YAAY,GAAG,YAAY;IAS7C,IAAI,QAAQ,IAAG,YAAY,CAE1B;IAED,IAAI,aAAa,YAAoD;IAErE,IAAI,MAAM,YAA2E;IACrF,IAAI,WAAW,YAAyD;IACxE,IAAI,WAAW,YAAyD;IACxE,IAAI,WAAW,YAAyD;IACxE,IAAI,QAAQ,YAAyD;IACrE,IAAI,SAAS,YAAyD;IACtE,IAAI,SAAS,YAAsD;IACnE,IAAI,UAAU,YAAyD;IACvE,IAAI,WAAW,YAAyD;IAExE,IAAI,QAAQ,YAA4E;IACxF,IAAI,YAAY,YAAqC;IAErD,IAAI,iBAAiB,YAAgF;IAErG,IAAI,OAAO,IAAG,OAAO,CAEpB;IACD,IAAI,OAAO,IAAG,OAAO,CAEpB;IAED,iBAAiB;IAkBjB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,IAAI;IAIZ,IAAI;IAOJ,UAAU;IAUV,UAAU;IAIV,IAAI;IAKJ,eAAe;CAOlB;AAED,UAAU,KAAM,SAAQ,MAAM;IAC1B,MAAM,CAAC,EAAC,MAAM,CAAC;IACf,QAAQ,CAAC,EAAC,QAAQ,CAAC;CACtB;AAGD,cAAM,SAAU,YAAW,UAAU,CAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC;IAErE,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAC,eAAe;IAErC,QAAQ,SAAQ;IACnB,QAAQ,MAAgD;IACrD,KAAK;;;MAGH;IACL,UAAU,wBAAgB;IAC1B,YAAY,SAAU;IACtB,OAAO,WAAmB;IAEvB;;;;;;;OAOG;IACH,IAAI,CAAC,KAAK,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,EAAE,IAAI,EAAC,WAAW,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,GAAG,IAAI;CAarF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAC,eAAe,aAEzD;yBAFe,gBAAgB"}
1
+ {"version":3,"file":"recorder.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/business/media/recorder.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,S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IScope } from "angular";
2
2
  import { App } from "ode-ts-client";
3
3
  import { TrackingService } from "../../../services";
4
4
  interface PortalScope extends IScope {
@@ -9,7 +9,6 @@ interface PortalScope extends IScope {
9
9
  showRgpd?: Boolean;
10
10
  }
11
11
  declare class Directive implements IDirective<PortalScope, JQLite, IAttributes, IController[]> {
12
- private $compile;
13
12
  private tracking;
14
13
  restrict: string;
15
14
  transclude: {
@@ -21,7 +20,7 @@ declare class Directive implements IDirective<PortalScope, JQLite, IAttributes,
21
20
  name: string;
22
21
  };
23
22
  link(scope: PortalScope, elem: JQLite, attrs: IAttributes): void;
24
- constructor($compile: ICompileService, tracking: TrackingService);
23
+ constructor(tracking: TrackingService);
25
24
  }
26
25
  /** The portal directive.
27
26
  *
@@ -30,7 +29,7 @@ declare class Directive implements IDirective<PortalScope, JQLite, IAttributes,
30
29
  * or
31
30
  * &lt;ode-portal template-url="/platform/assets/themes/...."></ode-portal&gt;
32
31
  */
33
- export declare function DirectiveFactory($compile: ICompileService, tracking: TrackingService): Directive;
32
+ export declare function DirectiveFactory(tracking: TrackingService): Directive;
34
33
  export declare namespace DirectiveFactory {
35
34
  var $inject: string[];
36
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"portal.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/business/portal/portal.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,GAAG,EAAc,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,UAAU,WAAY,SAAQ,MAAM;IACnC,GAAG,CAAC,EAAC,GAAG,CAAC;IACT,IAAI,EAAC,MAAM,CAAC;IAEZ,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,C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AC,WAAW;IAI7C,KAAK;;;MAGH;IAEF,IAAI,CAAC,KAAK,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW;gBA0B7C,QAAQ,EAAC,eAAe;CAGjC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAC,eAAe,aAExD;yBAFe,gBAAgB"}
@@ -0,0 +1,14 @@
1
+ import { IScope, IAttributes, INgModelController } from "angular";
2
+ import { ObjectGuard } from "../../../utils/navigation-guard";
3
+ import { GenericGuardDirective } from "./genericGuardDirective";
4
+ declare class Directive extends GenericGuardDirective {
5
+ protected guardFactory(scope: IScope, element: JQLite, attrs: IAttributes, ngModel: INgModelController): ObjectGuard;
6
+ }
7
+ /**
8
+ * Usage:
9
+ *
10
+ * &lt;div custom-guard="an expression returning an IObjectGuardDelegate instance">
11
+ */
12
+ export declare function DirectiveFactory(): Directive;
13
+ export {};
14
+ //# sourceMappingURL=custom-guard.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-guard.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/custom-guard.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAM,SAAU,SAAQ,qBAAqB;IACzC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;CASzG;AAED;;;;GAIG;AACF,wBAAgB,gBAAgB,cAEhC"}
@@ -0,0 +1,14 @@
1
+ import { IScope, IAttributes, INgModelController } from "angular";
2
+ import { InputGuard } from "../../../utils/navigation-guard";
3
+ import { GenericGuardDirective } from "./genericGuardDirective";
4
+ declare class Directive extends GenericGuardDirective {
5
+ protected guardFactory(scope: IScope, element: JQLite, attrs: IAttributes, ngModel: INgModelController): InputGuard<any>;
6
+ }
7
+ /**
8
+ * Usage: in a form
9
+ *
10
+ * &lt;input dirty-guard ng-model="myModel">
11
+ */
12
+ export declare function DirectiveFactory(): Directive;
13
+ export {};
14
+ //# sourceMappingURL=dirty-guard.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dirty-guard.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/dirty-guard.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAM,SAAU,SAAQ,qBAAqB;IACzC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;CAGzG;AAED;;;;GAIG;AACF,wBAAgB,gBAAgB,cAEhC"}
@@ -0,0 +1,17 @@
1
+ import { IScope, IAttributes, INgModelController } from "angular";
2
+ import { InputGuard } from "../../../utils/navigation-guard";
3
+ import { GenericGuardDirective } from "./genericGuardDirective";
4
+ declare type Element = {
5
+ _id?: string;
6
+ };
7
+ declare class Directive extends GenericGuardDirective {
8
+ protected guardFactory(scope: IScope, element: JQLite, attrs: IAttributes, ngModel: INgModelController): InputGuard<Element>;
9
+ }
10
+ /**
11
+ * Usage:
12
+ *
13
+ * &lt;input document-guard ng-model="myModel">
14
+ */
15
+ export declare function DirectiveFactory(): Directive;
16
+ export {};
17
+ //# sourceMappingURL=document-guard.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-guard.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/document-guard.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,aAAK,OAAO,GAAG;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,cAAM,SAAU,SAAQ,qBAAqB;IACzC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;CAazG;AAED;;;;GAIG;AACF,wBAAgB,gBAAgB,cAEhC"}
@@ -0,0 +1,10 @@
1
+ import { IAttributes, IController, IDirective, INgModelController, IScope } from "angular";
2
+ import { INavigationGuard } from "../../../utils/navigation-guard";
3
+ export declare abstract class GenericGuardDirective implements IDirective<IScope, JQLite, IAttributes, IController[]> {
4
+ require: string[];
5
+ restrict: string;
6
+ /** To be implemented by subclasses. */
7
+ protected abstract guardFactory(scope: IScope, element: JQLite, attrs: IAttributes, ngModel: INgModelController | null): INavigationGuard;
8
+ link(scope: IScope, element: JQLite, attrs: IAttributes, controllers?: IController[]): void;
9
+ }
10
+ //# sourceMappingURL=genericGuardDirective.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genericGuardDirective.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/genericGuardDirective.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAA0B,MAAM,iCAAiC,CAAC;AAG3F,8BAAsB,qBAAsB,YAAW,UAAU,CAAC,MAAM,EAAC,MAAM,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC;IACtG,OAAO,WAA+B;IACtC,QAAQ,SAAM;IAEd,uCAAuC;IACvC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW,EAAE,OAAO,EAAC,kBAAkB,GAAC,IAAI,GAAG,gBAAgB;IAEnI,IAAI,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,GAAG,IAAI;CAgC1F"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=guard-ignore-template.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-ignore-template.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/guard-ignore-template.directive.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import { IAttributes, IController, IDirective, IScope } from "angular";
2
+ import { INavigationGuard } from "../../../utils/navigation-guard";
3
+ export declare class Controller implements IController {
4
+ rootID: string;
5
+ registerGuard(guard: INavigationGuard): void;
6
+ unregisterGuard(guard: INavigationGuard): void;
7
+ reset(): void;
8
+ }
9
+ declare type Scope = IScope & {
10
+ "guardRoot": string;
11
+ };
12
+ declare class Directive implements IDirective<Scope, JQLite, IAttributes, IController[]> {
13
+ restrict: string;
14
+ scope: {
15
+ guardRoot: string;
16
+ };
17
+ controller: (typeof Controller)[];
18
+ require: string[];
19
+ link(scope: Scope, element: JQLite, attrs: IAttributes, controllers?: IController[]): void;
20
+ }
21
+ /**
22
+ * Usage:
23
+ *
24
+ * &lt;div navigation-trigger="doSomethingUsefulWhenNavigationConfirmed()"
25
+ *
26
+ * navigation-trigger-param="{onEvent:['click','focus'], confirmMessageKey:'my.msg.key', rootGuardId:'myGuardId'}"&gt;
27
+ *
28
+ * &lt;/div&gt;
29
+ *
30
+ * @param navigation-trigger-param [optional]
31
+ * @values onEvent to specify one or more event that effectively trigger the guard,
32
+ * Set confirmMessageKey to set a i18n for the confirm dialog message,
33
+ * Set rootGuardId to trigger only the guard with specified the ID (useful when nesting guards).
34
+ */
35
+ export declare function DirectiveFactory(): Directive;
36
+ export {};
37
+ //# sourceMappingURL=guard-root.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-root.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/guard-root.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAwD,gBAAgB,EAA0B,MAAM,iCAAiC,CAAC;AAEjJ,qBAAa,UAAW,YAAW,WAAW;IAC1C,MAAM,EAAE,MAAM,CAAM;IAEpB,aAAa,CAAC,KAAK,EAAE,gBAAgB;IAGrC,eAAe,CAAC,KAAK,EAAE,gBAAgB;IAGvC,KAAK;CAGR;AAED,aAAK,KAAK,GAAG,MAAM,GAAG;IAClB,WAAW,EAAE,MAAM,CAAA;CACtB,CAAA;AAGD,cAAM,SAAU,YAAW,UAAU,CAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC;IACzE,QAAQ,SAAO;IACf,KAAK;;MAEJ;IACD,UAAU,wBAAgB;IAC1B,OAAO,WAAiB;IAExB,IAAI,CAAC,KAAK,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,GAAG,IAAI;CAiBzF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,cAE/B"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=guard-trigger-template.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-trigger-template.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/guard-trigger-template.directive.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { IScope, IAttributes, INgModelController } from "angular";
2
+ import { InputGuard } from "../../../utils/navigation-guard";
3
+ import { GenericGuardDirective } from "./genericGuardDirective";
4
+ declare class Directive extends GenericGuardDirective {
5
+ protected guardFactory(scope: IScope, element: JQLite, attrs: IAttributes, ngModel: INgModelController): InputGuard<any>;
6
+ }
7
+ /**
8
+ * Usage:
9
+ *
10
+ * &lt;input input-guard ng-model="myModel">
11
+ */
12
+ export declare function DirectiveFactory(): Directive;
13
+ export {};
14
+ //# sourceMappingURL=input-guard.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-guard.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/input-guard.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAM,SAAU,SAAQ,qBAAqB;IACzC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;CAGzG;AAED;;;;GAIG;AACF,wBAAgB,gBAAgB,cAEhC"}
@@ -0,0 +1,27 @@
1
+ import { IAttributes, IController, IDirective, IScope } from "angular";
2
+ export interface INavigationTriggerParam {
3
+ onEvent?: string | Array<string>;
4
+ rootGuardId?: string;
5
+ guardMessageKey?: string;
6
+ }
7
+ declare class Directive implements IDirective<IScope, JQLite, IAttributes, IController[]> {
8
+ restrict: string;
9
+ link(scope: IScope, element: JQLite, attrs: IAttributes, controllers?: IController[]): void;
10
+ }
11
+ /**
12
+ * Usage:
13
+ *
14
+ * &lt;div navigation-trigger="doSomethingUsefulWhenNavigationConfirmed()"
15
+ *
16
+ * navigation-trigger-param="{onEvent:['click','focus'], confirmMessageKey:'my.msg.key', rootGuardId:'myGuardId'}"&gt;
17
+ *
18
+ * &lt;/div&gt;
19
+ *
20
+ * @param navigation-trigger-param [optional]
21
+ * @values onEvent to specify one or more event that effectively trigger the guard,
22
+ * Set confirmMessageKey to set a i18n for the confirm dialog message,
23
+ * Set rootGuardId to trigger only the guard with specified the ID (useful when nesting guards).
24
+ */
25
+ export declare function DirectiveFactory(): Directive;
26
+ export {};
27
+ //# sourceMappingURL=navigation-trigger.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-trigger.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/navigation-trigger.directive.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGhF,MAAM,WAAW,uBAAuB;IACpC,OAAO,CAAC,EAAC,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAC,MAAM,CAAC;IACpB,eAAe,CAAC,EAAC,MAAM,CAAC;CAC3B;AAGD,cAAM,SAAU,YAAW,UAAU,CAAC,MAAM,EAAC,MAAM,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC;IAC1E,QAAQ,SAAO;IACf,IAAI,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,GAAG,IAAI;CA6C1F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,cAE/B"}
@@ -0,0 +1,16 @@
1
+ import { IAttributes, IController, IDirective, IScope } from "angular";
2
+ declare class Directive implements IDirective<IScope, JQLite, IAttributes, IController[]> {
3
+ require: string;
4
+ restrict: string;
5
+ link(scope: IScope, element: JQLite, attrs: IAttributes, controllers?: IController[]): void;
6
+ }
7
+ /**
8
+ * Usage:
9
+ *
10
+ * &lt;div reset-guard="an expression returning a Promise"
11
+ *
12
+ * reset-guard-id="a guard root ID to reset"
13
+ */
14
+ export declare function DirectiveFactory(): Directive;
15
+ export {};
16
+ //# sourceMappingURL=reset-guard.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-guard.directive.d.ts","sourceRoot":"","sources":["../../../../../src/ts/directives/components/navigation/reset-guard.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAKvE,cAAM,SAAU,YAAW,UAAU,CAAC,MAAM,EAAC,MAAM,EAAC,WAAW,EAAC,WAAW,EAAE,CAAC;IAC1E,OAAO,SAAgB;IACvB,QAAQ,SAAM;IACjB,IAAI,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,WAAW,EAAE,WAAW,CAAC,EAAC,WAAW,EAAE,GAAG,IAAI;CA0CvF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,cAE/B"}
@@ -15,6 +15,13 @@ export * as I18nValue from './components/i18n/i18n-value.directive';
15
15
  export * as I18nTitle from './components/i18n/i18n-title.directive';
16
16
  export * as I18nPlaceholder from './components/i18n/i18n-placeholder.directive';
17
17
  export * as I18nFilter from './components/i18n/i18n.filter';
18
+ export * as NavigationTrigger from './components/navigation/navigation-trigger.directive';
19
+ export * as GuardRoot from './components/navigation/guard-root.directive';
20
+ export * as InputGuard from './components/navigation/input-guard.directive';
21
+ export * as DirtyGuard from './components/navigation/dirty-guard.directive';
22
+ export * as DocumentGuard from './components/navigation/document-guard.directive';
23
+ export * as CustomGuard from './components/navigation/custom-guard.directive';
24
+ export * as ResetGuard from './components/navigation/reset-guard.directive';
18
25
  export * as AppTitle from './components/app-title/app-title.directive';
19
26
  export * as Assistant from './components/pulsar/assistant.directive';
20
27
  export * as Pulsar from './components/pulsar/pulsar.directive';
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D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAC7D,OAAO,KAAK,OAAO,MAAM,sCAAsC,CAAC;AAChE,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ui.module.d.ts","sourceRoot":"","sources":["../../../src/ts/modules/ui.module.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAQ3C;;GAEG;AACF,wBAAgB,WAAW,IAAG,OAAO,CAqCpC"}
1
+ {"version":3,"file":"ui.module.d.ts","sourceRoot":"","sources":["../../../src/ts/modules/ui.module.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAQ3C;;GAEG;AACF,wBAAgB,WAAW,IAAG,OAAO,CA+CpC"}
@@ -8,4 +8,6 @@ export * from './quickstart.service';
8
8
  export * from './tracking.service';
9
9
  export * from './xiti.service';
10
10
  export * from './rich-content.service';
11
+ export * from './video-upload.service';
12
+ export * from './video-event-tracker.service';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/services/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/services/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { IVideoUploadResult } from "./video-upload.service";
2
+ /**
3
+ * This utility class allows sending usage data events to the server.
4
+ */
5
+ export declare class VideoEventTrackerService {
6
+ /**
7
+ * Generates a new FormData containing generic video tracking metadata :
8
+ * - device,
9
+ * - browser,
10
+ * - url,
11
+ * - app
12
+ * @returns FormData
13
+ */
14
+ static asFormData(): FormData;
15
+ generateSaveEvent(elapsedTime: number, saved: IVideoUploadResult): void;
16
+ }
17
+ //# sourceMappingURL=video-event-tracker.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-event-tracker.service.d.ts","sourceRoot":"","sources":["../../../src/ts/services/video-event-tracker.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAS5D;;GAEG;AACH,qBAAa,wBAAwB;IAIpC;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,IAAG,QAAQ;IAW5B,iBAAiB,CAAE,WAAW,EAAC,MAAM,EAAE,KAAK,EAAC,kBAAkB;CA2G/D"}
@@ -0,0 +1,47 @@
1
+ export interface IVideoUploader {
2
+ /** Accepted file extensions of videos UPLOADED to the server. */
3
+ readonly validExtensions: string[];
4
+ /** Maximum file weight, in Mbytes, of videos UPLOADED to the server. */
5
+ readonly maxWeight: number;
6
+ /** Maximum duration, in minutes, of videos RECORDED on a client software. */
7
+ readonly maxDuration: number;
8
+ /** Check if an extension is valid, whatever its case. */
9
+ checkValidExtension(ext: string): boolean;
10
+ /** Upload a video to the server. */
11
+ upload(file: Blob, filename: string, captation: boolean, duration?: string | number): Promise<IVideoUploadResult>;
12
+ }
13
+ export declare type IVideoUploadResult = {
14
+ /** Result of the upload+encode flow. */
15
+ state: "running" | "succeed" | "error";
16
+ /** ID of the video file. */
17
+ videoid?: string;
18
+ /** size of the encoded video, in bytes. */
19
+ videosize: number;
20
+ /** ID of the video document in Workspace. */
21
+ videoworkspaceid: string;
22
+ /** Error code (i18n key), when state==="error" */
23
+ code?: string;
24
+ };
25
+ /**
26
+ * This utility class allows uploading videos to the server, as documents.
27
+ * Each video can be either recorded (Blob) or chosen from the local storage (File).
28
+ * The server will process each uploaded video and convert them to a streamable format.
29
+ */
30
+ export declare class VideoUploadService implements IVideoUploader {
31
+ private _maxWeight;
32
+ private _maxDuration;
33
+ private _acceptVideoUploadExtensions;
34
+ private _initialized;
35
+ /** Valid extensions for an upload. */
36
+ get validExtensions(): string[];
37
+ /** Max weight for an upload, in Mbytes*/
38
+ get maxWeight(): number;
39
+ /** Max duration for a record, in minutes. */
40
+ get maxDuration(): number;
41
+ /** Awaits for loading the video public configuration. */
42
+ initialize(): Promise<void>;
43
+ private safeValueOf;
44
+ checkValidExtension(ext: string): boolean;
45
+ upload(file: Blob, filename: string, captation: boolean, duration?: string | number): Promise<IVideoUploadResult>;
46
+ }
47
+ //# sourceMappingURL=video-upload.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-upload.service.d.ts","sourceRoot":"","sources":["../../../src/ts/services/video-upload.service.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAE3B,iEAAiE;IACjE,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACnC,wEAAwE;IACxE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,C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owserInfo = {
2
+ name: 'MSIE' | 'Edge' | 'Chrome' | 'Safari' | 'Firefox' | 'Opera' | 'CriOS' | 'FxiOS' | 'unknown';
3
+ version: number;
4
+ };
5
+ export declare type OSInfo = {
6
+ name: string | undefined;
7
+ version: string | undefined;
8
+ };
9
+ export declare const devices: {
10
+ isIE: () => boolean;
11
+ isiOS: () => boolean;
12
+ isIphone: () => boolean;
13
+ isIpod: () => boolean;
14
+ isIpad: () => boolean;
15
+ getBrowserInfo(): BrowserInfo;
16
+ };
17
+ export declare type DEVICE_TYPE = 'Mobile' | 'Tablet' | 'Desktop';
18
+ export declare let deviceType: DEVICE_TYPE;
19
+ //# sourceMappingURL=browser-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-info.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/browser-info.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACtB,IAAI,EAAC,MAAM,GAAC,MAAM,GAAC,QAAQ,GAAC,QAAQ,GAAC,SAAS,GAAC,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,SAAS,CAAC;IACjF,OAAO,EAAC,MAAM,CAAC;CAClB,CAAA;AACD,oBAAY,MAAM,GAAG;IACjB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAA;AACD,eAAO,MAAM,OAAO;;;;;;sBAgBE,WAAW;CA+FhC,CAAC;AAEF,oBAAY,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,eAAO,IAAI,UAAU,EAAE,WAAW,CAAC"}
@@ -1,6 +1,8 @@
1
+ export * from './interfaces';
1
2
  export * from './shorts';
2
3
  export * from './ng-bootstrap';
3
4
  export * from "./localization";
4
5
  export * from "./TrackedScope";
6
+ export * from './browser-info';
5
7
  export { KnownWidget as TrackedActionFromWidget } from '../modules/widgets.module';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,20 @@
1
+ /** These statuses are sent to the callbacks registered with the state(cb) method. */
2
+ export declare type RecorderState = 'idle' | 'preparing' | 'recording' | 'suspended' | 'paused' | 'playing' | 'stopped' | 'uploading' | 'encoding' | 'saved';
3
+ export declare type RecorderPermission = 'idle' | 'granted' | 'denied';
4
+ /**
5
+ * Any recorder plugged to the recorder widget must implement this interface.
6
+ */
7
+ export interface IAnyRecorder {
8
+ title: string;
9
+ readonly state: RecorderState;
10
+ readonly permission: RecorderPermission;
11
+ elapsedTime: number;
12
+ status(callback: (state: RecorderState) => void): void;
13
+ pause(): void;
14
+ play(): void;
15
+ suspend(): Promise<void>;
16
+ record(): Promise<void>;
17
+ flush(): void;
18
+ save(): void;
19
+ }
20
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/interfaces.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,oBAAY,aAAa,GAAG,MAAM,GAAC,WAAW,GAAC,WAAW,GAAC,WAAW,GAAC,QAAQ,GAAC,SAAS,GAAC,SAAS,GAAC,WAAW,GAAC,UAAU,GAAC,OAAO,CAAC;AACnI,oBAAY,kBAAkB,GAAG,MAAM,GAAC,SAAS,GAAC,QAAQ,CAAC;AAC3D;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,EAAC,MAAM,CAAC;IACb,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,WAAW,EAAC,MAAM,CAAC;IACnB,MAAM,CAAC,QAAQ,EAAC,CAAC,KAAK,EAAC,aAAa,KAAG,IAAI,GAAE,IAAI,CAAC;IAClD,KAAK,IAAG,IAAI,CAAC;IACb,IAAI,IAAG,IAAI,CAAC;IACZ,OAAO,IAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,MAAM,IAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,IAAG,IAAI,CAAC;IACb,IAAI,IAAG,IAAI,CAAC;CACf"}
@@ -0,0 +1,85 @@
1
+ import { Subject, Subscription } from "rxjs";
2
+ export interface INavigationInfo {
3
+ accept(): void;
4
+ reject(): void;
5
+ confirmMessageKey?: string;
6
+ checkGuardId?: string | "*";
7
+ }
8
+ export interface INavigationListener {
9
+ onChange: Subject<INavigationInfo>;
10
+ start(): void;
11
+ stop(): void;
12
+ }
13
+ export interface INavigationGuard {
14
+ reset(): void;
15
+ canNavigate(): boolean;
16
+ onUserConfirmNavigate?(canNavigate: boolean): void;
17
+ }
18
+ export declare class NavigationGuardService {
19
+ debounceMs: number;
20
+ _lastTime: number | null;
21
+ _lastResponse: boolean | null;
22
+ _listeners: Map<INavigationListener, Subscription>;
23
+ _guards: Map<string, Set<INavigationGuard>>;
24
+ _id_counter: number;
25
+ onUserConfirmNavigate: ((canNavigate: boolean) => void)[];
26
+ generateID(): string;
27
+ _getGuardsMapByID(rootID: string): Set<INavigationGuard>;
28
+ registerGuard(rootID: string, guard: INavigationGuard): void;
29
+ unregisterGuard(rootID: string, guard: INavigationGuard): void;
30
+ unregisterRoot(rootID: string): void;
31
+ registerIndependantGuard(guard: INavigationGuard): string;
32
+ unregisterIndependantGuard(guardID: string): void;
33
+ registerListener(listener: INavigationListener): void;
34
+ unregisterListener(listener: INavigationListener): void;
35
+ tryNavigate(navigation: INavigationInfo): void;
36
+ reset(rootID: string): void;
37
+ resetAll(): void;
38
+ }
39
+ export declare const navigationGuardService: NavigationGuardService;
40
+ export declare class InputGuard<T> implements INavigationGuard {
41
+ private currentValue;
42
+ private resetter;
43
+ private comparator;
44
+ reference: T;
45
+ constructor(currentValue: () => T, resetter: () => T, comparator?: (a: T, b: T) => boolean);
46
+ unNaN(val: any): any;
47
+ reset(): void;
48
+ canNavigate(): boolean;
49
+ }
50
+ export interface IObjectGuardDelegate {
51
+ guardObjectIsDirty(): boolean;
52
+ guardObjectReset(): void;
53
+ guardOnUserConfirmNavigate?(canNavigate: boolean): void;
54
+ }
55
+ export declare class ObjectGuard implements INavigationGuard {
56
+ private currentValue;
57
+ constructor(currentValue: () => IObjectGuardDelegate);
58
+ reset(): void;
59
+ canNavigate(): boolean;
60
+ onUserConfirmNavigate(canNavigate: boolean): void;
61
+ }
62
+ export declare class AngularJSRouteChangeListener implements INavigationListener {
63
+ private $rootScope;
64
+ private static _instance;
65
+ private subscription;
66
+ onChange: Subject<INavigationInfo>;
67
+ constructor($rootScope: any);
68
+ start(): void;
69
+ stop(): void;
70
+ static getInstance($rootScope: any): AngularJSRouteChangeListener;
71
+ }
72
+ export declare class DOMRouteChangeListener implements INavigationListener {
73
+ private static _instance;
74
+ onChange: Subject<INavigationInfo>;
75
+ callback: (e: Event) => boolean;
76
+ start(): void;
77
+ stop(): void;
78
+ static getInstance(): DOMRouteChangeListener;
79
+ }
80
+ export declare class ManualChangeListener implements INavigationListener {
81
+ onChange: Subject<INavigationInfo>;
82
+ start(): void;
83
+ stop(): void;
84
+ }
85
+ //# sourceMappingURL=navigation-guard.d.ts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,EAAE,GAAG;CAMrC;AAED,qBAAa,sBAAuB,YAAW,mBAAmB;IAC9D,OAAO,CAAC,MAAM,CAAC,SAAS,CAAqC;IAC7D,QAAQ,2BAAkC;IAC1C,QAAQ,EAAC,CAAC,CAAC,EAAC,KAAK,KAAG,OAAO,CAc1B;IACD,KAAK;IAGL,IAAI;IAIJ,MAAM,CAAC,WAAW;CAMrB;AAmED,qBAAa,oBAAqB,YAAW,mBAAmB;IAC5D,QAAQ,2BAAkC;IAC1C,KAAK;IACL,IAAI;CAGP"}
@@ -1,3 +1,4 @@
1
+ import { RecorderPermission, RecorderState } from "./interfaces";
1
2
  /**
2
3
  * Utility class to record audio files, with no dependencies on angularJS.
3
4
  */
@@ -8,14 +9,14 @@ export declare var audio_recorder: {
8
9
  stop: () => void;
9
10
  flush: () => void;
10
11
  record: () => Promise<void>;
11
- suspend: () => void;
12
+ suspend: () => Promise<void>;
12
13
  pause: () => void;
13
14
  play: () => void;
14
- state: (callback: Function) => void;
15
+ status: (callback: Function) => void;
15
16
  title: string;
16
- status: string;
17
- permission: string;
17
+ state: RecorderState;
18
+ permission: RecorderPermission;
18
19
  save: () => void;
19
20
  mute: (mute: boolean) => void;
20
21
  };
21
- //# sourceMappingURL=audio-recorder.d.ts.map
22
+ //# sourceMappingURL=recorder-audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder-audio.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/recorder-audio.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA4BjE;;GAEG;AACH,eAAO,IAAI,cAAc;;;;;;;;;;uBAqPI,QAAQ;;;;;iBAYd,OAAO;CAS1B,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { IAnyRecorder, RecorderPermission, RecorderState } from "./interfaces";
2
+ import { VideoEventTrackerService, VideoUploadService } from "../services";
3
+ declare type FacingMode = 'user' | 'environment';
4
+ export declare class VideoRecorder implements IAnyRecorder {
5
+ private videoFactory;
6
+ private handleDuration;
7
+ private uploader;
8
+ private tracker;
9
+ private defaultDevice?;
10
+ private stream?;
11
+ private gumVideo?;
12
+ private mediaRecorder?;
13
+ private recordMimeType?;
14
+ private recorded?;
15
+ private _status;
16
+ constraints: MediaStreamConstraints;
17
+ title: string;
18
+ get permission(): RecorderPermission;
19
+ elapsedTime: number;
20
+ followers: Array<(state: RecorderState) => void>;
21
+ constructor(videoFactory: () => HTMLMediaElement, handleDuration: (event: Event) => void, uploader: VideoUploadService, tracker: VideoEventTrackerService, defaultDevice?: MediaDeviceInfo | undefined);
22
+ get state(): RecorderState;
23
+ status(callback: (state: RecorderState) => void): void;
24
+ private updateStatus;
25
+ static isCompatible(): boolean;
26
+ suspend(): Promise<void>;
27
+ flush(): void;
28
+ save(): void;
29
+ private bindPlayEvents;
30
+ private unbindPlayEvents;
31
+ private videoEndedHandler;
32
+ private unbindRecordEvent;
33
+ private bindRecordEvent;
34
+ private setCamera;
35
+ switchCamera(id: FacingMode | ConstrainDOMString): Promise<void>;
36
+ play(): void;
37
+ private preparePlay;
38
+ pause(): void;
39
+ private prepareRecord;
40
+ private stopStreaming;
41
+ startStreaming(notAllowedCb?: () => void): Promise<void>;
42
+ generateVideoId(): string;
43
+ resume(): void;
44
+ canStartRecording(): Promise<boolean>;
45
+ private findBestSupportedMimeType;
46
+ record(): Promise<void>;
47
+ stopRecording(preparePlay: boolean): Promise<void>;
48
+ turnOffCamera(): void;
49
+ getBuffer(): Blob;
50
+ clearBuffer(prepareRecord: boolean): void;
51
+ }
52
+ export {};
53
+ //# sourceMappingURL=recorder-video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder-video.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/recorder-video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG/E,OAAO,EAAU,wBAAwB,EAAE,kBAAk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,SAAS;IAUjB,YAAY,CAAE,EAAE,EAAC,UAAU,GAAC,kBAAkB;IAa9C,IAAI;IAUJ,OAAO,CAAC,WAAW;IAiBnB,KAAK;IASL,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,aAAa;IAgBf,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,IAAI;IAwCvC,eAAe;IAYf,MAAM;IAIA,iBAAiB;IAI9B,OAAO,CAAC,yBAAyB;IAkB3B,MAAM;IA2BL,aAAa,CAAC,WAAW,EAAE,OAAO,GAAE,OAAO,CAAC,IAAI,CAAC;IAejD,aAAa;IAUb,SAAS;IAIT,WAAW,CAAC,aAAa,EAAE,OAAO;CAI5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-ngjs-front",
3
- "version": "1.1.3-feat-produit.202203141630",
3
+ "version": "1.1.3-feat-produit.202204051449",
4
4
  "description": "Open Digital Education Frontend Framework",
5
5
  "main": "dist/ts/index.js",
6
6
  "types": "dist/ts/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"audio-recorder.d.ts","sourceRoot":"","sources":["../../../src/ts/utils/audio-recorder.ts"],"names":[],"mappings":"AAiCA;;GAEG;AACH,eAAO,IAAI,cAAc;;;;;;;;;;sBAoPG,QAAQ;;;;;iBAYb,OAAO;CAS1B,CAAC"}