@annoto/widget-api 1.15.0 → 2.10.0-alpha.0

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 (116) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/CONTRIBUTING.md +11 -0
  3. package/ISSUE_TEMPLATE.md +63 -0
  4. package/NOTICE +13 -0
  5. package/README.md +1 -1
  6. package/dist/{api → build_esm/api}/device-detector.d.ts +5 -1
  7. package/dist/build_esm/api/device-detector.d.ts.map +1 -0
  8. package/dist/build_esm/api/device-detector.js +2 -0
  9. package/dist/build_esm/api/device-detector.js.map +1 -0
  10. package/dist/build_esm/api/index.d.ts +40 -0
  11. package/dist/build_esm/api/index.d.ts.map +1 -0
  12. package/dist/{api → build_esm/api}/index.js +1 -1
  13. package/dist/build_esm/api/index.js.map +1 -0
  14. package/dist/build_esm/api/metadata.d.ts +45 -0
  15. package/dist/build_esm/api/metadata.d.ts.map +1 -0
  16. package/dist/build_esm/api/metadata.js +2 -0
  17. package/dist/build_esm/api/metadata.js.map +1 -0
  18. package/dist/{config → build_esm/config}/backend.d.ts +1 -0
  19. package/dist/build_esm/config/backend.d.ts.map +1 -0
  20. package/dist/build_esm/config/backend.js +2 -0
  21. package/dist/build_esm/config/backend.js.map +1 -0
  22. package/dist/build_esm/config/features.d.ts +46 -0
  23. package/dist/build_esm/config/features.d.ts.map +1 -0
  24. package/dist/build_esm/config/features.js +2 -0
  25. package/dist/build_esm/config/features.js.map +1 -0
  26. package/dist/build_esm/config/group-details.d.ts +28 -0
  27. package/dist/build_esm/config/group-details.d.ts.map +1 -0
  28. package/dist/build_esm/config/group-details.js +2 -0
  29. package/dist/build_esm/config/group-details.js.map +1 -0
  30. package/dist/build_esm/config/hooks.d.ts +71 -0
  31. package/dist/build_esm/config/hooks.d.ts.map +1 -0
  32. package/dist/build_esm/config/hooks.js +2 -0
  33. package/dist/build_esm/config/hooks.js.map +1 -0
  34. package/dist/build_esm/config/index.d.ts +88 -0
  35. package/dist/build_esm/config/index.d.ts.map +1 -0
  36. package/dist/{config → build_esm/config}/index.js +7 -5
  37. package/dist/build_esm/config/index.js.map +1 -0
  38. package/dist/{config → build_esm/config}/launch-source.d.ts +2 -1
  39. package/dist/build_esm/config/launch-source.d.ts.map +1 -0
  40. package/dist/build_esm/config/launch-source.js +2 -0
  41. package/dist/build_esm/config/launch-source.js.map +1 -0
  42. package/dist/build_esm/config/media-details.d.ts +28 -0
  43. package/dist/build_esm/config/media-details.d.ts.map +1 -0
  44. package/dist/build_esm/config/media-details.js +2 -0
  45. package/dist/build_esm/config/media-details.js.map +1 -0
  46. package/dist/build_esm/config/timeline.d.ts +30 -0
  47. package/dist/build_esm/config/timeline.d.ts.map +1 -0
  48. package/dist/build_esm/config/timeline.js +2 -0
  49. package/dist/build_esm/config/timeline.js.map +1 -0
  50. package/dist/build_esm/config/ux.d.ts +153 -0
  51. package/dist/build_esm/config/ux.d.ts.map +1 -0
  52. package/dist/build_esm/config/ux.js +2 -0
  53. package/dist/build_esm/config/ux.js.map +1 -0
  54. package/dist/build_esm/config/widget.d.ts +70 -0
  55. package/dist/build_esm/config/widget.d.ts.map +1 -0
  56. package/dist/build_esm/config/widget.js +2 -0
  57. package/dist/build_esm/config/widget.js.map +1 -0
  58. package/dist/{events → build_esm/events}/index.d.ts +1 -0
  59. package/dist/build_esm/events/index.d.ts.map +1 -0
  60. package/dist/{events → build_esm/events}/index.js +1 -0
  61. package/dist/build_esm/events/index.js.map +1 -0
  62. package/dist/{events → build_esm/events}/my-activity.d.ts +1 -0
  63. package/dist/build_esm/events/my-activity.d.ts.map +1 -0
  64. package/dist/build_esm/events/my-activity.js +2 -0
  65. package/dist/build_esm/events/my-activity.js.map +1 -0
  66. package/dist/{events → build_esm/events}/stats-event.d.ts +1 -0
  67. package/dist/build_esm/events/stats-event.d.ts.map +1 -0
  68. package/dist/{events → build_esm/events}/stats-event.js +1 -0
  69. package/dist/build_esm/events/stats-event.js.map +1 -0
  70. package/dist/{events → build_esm/events}/ux-event.d.ts +1 -0
  71. package/dist/build_esm/events/ux-event.d.ts.map +1 -0
  72. package/dist/build_esm/events/ux-event.js +2 -0
  73. package/dist/build_esm/events/ux-event.js.map +1 -0
  74. package/dist/{events → build_esm/events}/video-benchmark-event.d.ts +1 -0
  75. package/dist/build_esm/events/video-benchmark-event.d.ts.map +1 -0
  76. package/dist/build_esm/events/video-benchmark-event.js +2 -0
  77. package/dist/build_esm/events/video-benchmark-event.js.map +1 -0
  78. package/dist/{index.d.ts → build_esm/index.d.ts} +6 -5
  79. package/dist/build_esm/index.d.ts.map +1 -0
  80. package/dist/{index.js → build_esm/index.js} +1 -0
  81. package/dist/build_esm/index.js.map +1 -0
  82. package/dist/{player-adapter → build_esm/player-adapter}/controls-descriptor.d.ts +21 -1
  83. package/dist/build_esm/player-adapter/controls-descriptor.d.ts.map +1 -0
  84. package/dist/{player-adapter → build_esm/player-adapter}/controls-descriptor.js +1 -0
  85. package/dist/build_esm/player-adapter/controls-descriptor.js.map +1 -0
  86. package/dist/{player-adapter → build_esm/player-adapter}/index.d.ts +7 -6
  87. package/dist/build_esm/player-adapter/index.d.ts.map +1 -0
  88. package/dist/{player-adapter → build_esm/player-adapter}/index.js +1 -0
  89. package/dist/build_esm/player-adapter/index.js.map +1 -0
  90. package/dist/tsconfig.module.tsbuildinfo +1 -0
  91. package/dist/tsconfig.tsbuildinfo +1 -0
  92. package/package.json +16 -24
  93. package/dist/api/device-detector.js +0 -1
  94. package/dist/api/index.d.ts +0 -21
  95. package/dist/api/metadata.d.ts +0 -44
  96. package/dist/api/metadata.js +0 -1
  97. package/dist/api/origin-provider.d.ts +0 -15
  98. package/dist/api/origin-provider.js +0 -1
  99. package/dist/config/align.d.ts +0 -18
  100. package/dist/config/align.js +0 -1
  101. package/dist/config/backend.js +0 -1
  102. package/dist/config/features.d.ts +0 -26
  103. package/dist/config/features.js +0 -1
  104. package/dist/config/index.d.ts +0 -102
  105. package/dist/config/launch-source.js +0 -1
  106. package/dist/config/media-details.d.ts +0 -46
  107. package/dist/config/media-details.js +0 -1
  108. package/dist/config/thread.d.ts +0 -12
  109. package/dist/config/thread.js +0 -1
  110. package/dist/config/ux.d.ts +0 -142
  111. package/dist/config/ux.js +0 -1
  112. package/dist/config/widget.d.ts +0 -71
  113. package/dist/config/widget.js +0 -1
  114. package/dist/events/my-activity.js +0 -1
  115. package/dist/events/ux-event.js +0 -1
  116. package/dist/events/video-benchmark-event.js +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [2.10.0-alpha.0](https://bitbucket.org/annototeam/annoto/compare/v2.9.1...v2.10.0-alpha.0) (2021-12-08)
7
+
8
+
9
+ ### Features
10
+
11
+ * new in context remote configurations ([4c178b9](https://bitbucket.org/annototeam/annoto/commits/4c178b99ed740cc573434ab2b81e7b7ab788fc0e)), closes [#94](https://bitbucket.org/annototeam/annoto/issue/94)
@@ -0,0 +1,11 @@
1
+ # Contributing
2
+
3
+ We very much appreciate your wanting to contribute to Annoto projects, but we need to add you to the contributors list first.
4
+
5
+ Before we can accept a Pull Request from you, please sign [our CLA](https://docs.google.com/forms/d/e/1FAIpQLSf2jn5cqBr2_ovLOGt3ars537Tu5s6TZ013QU6IJ-MsnEYuKg/viewform).
6
+
7
+ Note that the CLA agreement is not a transfer of copyright ownership, it is simply is a license agreement for contributions. You also do not change your rights to use your own contributions for any other purpose.
8
+
9
+ This is part of the legal framework of the open-source ecosystem that adds some red tape, but protects both the contributor and the company / foundation behind the project. It also gives us the option to relicense the code with a more permissive license in the future.
10
+
11
+
@@ -0,0 +1,63 @@
1
+ <!--
2
+ BUGS: Please use this template.
3
+
4
+
5
+ The HTML comments below are for your reference, and are not displayed
6
+ when your issue is submitted, feel free to leave them.
7
+
8
+ Choose one of the two headings, delete the other.
9
+ -->
10
+ **I'm submitting a bug report**
11
+ **I'm submitting a feature request**
12
+
13
+ * **Framework Version:**
14
+ major.minor.patch-pre
15
+
16
+ **Please tell us about your environment:**
17
+ * **Operating System:**
18
+ OSX 10.x|Linux (distro)|Windows [7|8|8.1|10]
19
+
20
+ * **Node Version:**
21
+ 6.2.0
22
+ <!--
23
+ Minimum supported Node version is latest Node 4.x LTS
24
+ run `node -v`
25
+ -->
26
+
27
+ * **NPM Version:**
28
+ 3.8.9
29
+ <!--
30
+ Minimum supported NPM version is 3.x
31
+ run `npm -v`
32
+ -->
33
+
34
+ * **Webpack AND Version**
35
+ webpack 2.1.0-beta.17
36
+ <!--
37
+ run `webpack --help | grep webpack`
38
+ -->
39
+
40
+ * **Browser:**
41
+ all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView
42
+
43
+ * **Language:**
44
+ all | TypeScript X.X | ESNext
45
+
46
+
47
+ **Current behavior:**
48
+
49
+
50
+ **Expected/desired behavior:**
51
+ <!--
52
+ If the current behavior is a bug, please provide the steps to reproduce and, if possible, a minimal demo of the
53
+ problem along with a runnable gist, if possible.
54
+ To create a runnable gist, go to https://gist.run/?id=7542e061bc940cde506b&sha=6821c521a6c7bae6f59a36fb8628ecd1032b2d10
55
+ Then click "Fork to Public Gist".
56
+ Create your gist, then finally click "Update Gist." Include a link to the gist.run below.
57
+ -->
58
+
59
+
60
+ * **What is the expected behavior?**
61
+
62
+
63
+ * **What is the motivation / use case for changing the behavior?**
package/NOTICE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2021 Annoto Ltd support@annoto.net
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this work except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Overview
2
2
 
3
- Annoto Widget API Typings
3
+ Annoto Widget API Typings.
@@ -1,4 +1,7 @@
1
- export interface DeviceDetectorApi {
1
+ /**
2
+ * @internal
3
+ */
4
+ export interface IDeviceDetectorApi {
2
5
  isSmallScreen(): boolean;
3
6
  isPhone(): boolean;
4
7
  isTablet(): boolean;
@@ -6,3 +9,4 @@ export interface DeviceDetectorApi {
6
9
  isLandscape?(): boolean;
7
10
  detect?(): void;
8
11
  }
12
+ //# sourceMappingURL=device-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-detector.d.ts","sourceRoot":"","sources":["../../../lib/api/device-detector.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,aAAa,IAAI,OAAO,CAAC;IACzB,OAAO,IAAI,OAAO,CAAC;IACnB,QAAQ,IAAI,OAAO,CAAC;IACpB,SAAS,IAAI,OAAO,CAAC;IACrB,WAAW,CAAC,IAAI,OAAO,CAAC;IACxB,MAAM,CAAC,IAAI,IAAI,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=device-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-detector.js","sourceRoot":"","sources":["../../../lib/api/device-detector.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @module Api
3
+ */
4
+ import { IConfig } from '../config';
5
+ import { IMetadata } from './metadata';
6
+ export * from './metadata';
7
+ export * from './device-detector';
8
+ export interface IAnnotoApi {
9
+ /**
10
+ * Single Sign On (SSO) user authentication
11
+ * @param token
12
+ */
13
+ auth(token: string): Promise<void>;
14
+ /**
15
+ * Load new application configuration
16
+ * @param config
17
+ */
18
+ load(config: IConfig): Promise<void>;
19
+ /**
20
+ * Destroy single or all the widgets
21
+ * @param index if provided destroy specific widget
22
+ */
23
+ destroy(index?: number): Promise<void>;
24
+ /**
25
+ * Logout current user
26
+ */
27
+ logout(): Promise<void>;
28
+ /**
29
+ * Show single or all the widgets
30
+ * @param index if provided show specific widget
31
+ */
32
+ show(index?: number): Promise<void>;
33
+ /**
34
+ * Hide single or all the widgets
35
+ * @param index if provided hide specific widget
36
+ */
37
+ hide(index?: number): Promise<void>;
38
+ getMetadata(): IMetadata;
39
+ }
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/api/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAElC,MAAM,WAAW,UAAU;IACvB;;;OAGG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC;;;OAGG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,WAAW,IAAI,SAAS,CAAC;CAC5B"}
@@ -2,5 +2,5 @@
2
2
  * @module Api
3
3
  */
4
4
  export * from './metadata';
5
- export * from './origin-provider';
6
5
  export * from './device-detector';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/api/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,45 @@
1
+ interface IContentCountersBase {
2
+ rootCount?: number;
3
+ count?: number;
4
+ emotions?: any;
5
+ }
6
+ export interface IContentCounters extends IContentCountersBase {
7
+ emotions?: {
8
+ [key: string]: number;
9
+ };
10
+ }
11
+ export interface ICommentsCounters extends IContentCounters {
12
+ rootCountDiff?: number;
13
+ countDiff?: number;
14
+ }
15
+ export interface IVisibleEmotionData {
16
+ vn: number;
17
+ cn: number;
18
+ rcn: number;
19
+ tvn: number;
20
+ }
21
+ export interface IVisibleCountersData extends IContentCountersBase {
22
+ emotions?: {
23
+ [key: string]: IVisibleEmotionData;
24
+ };
25
+ }
26
+ export interface IThreadMetrics {
27
+ emotionsCount?: number;
28
+ emotionsVotes?: {
29
+ [key: string]: number;
30
+ };
31
+ rating?: number;
32
+ ratingDiff?: number;
33
+ live?: boolean;
34
+ pbResolution?: number;
35
+ createdAt?: Date;
36
+ updatedAt?: Date;
37
+ }
38
+ export interface IMetadata {
39
+ thread: IThreadMetrics;
40
+ comments: ICommentsCounters;
41
+ notes?: IContentCounters;
42
+ visible?: IVisibleCountersData;
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../lib/api/metadata.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC1D,QAAQ,CAAC,EAAE;QACP,CAAC,GAAG,EAAC,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACL;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,QAAQ,CAAC,EAAE;QACP,CAAC,GAAG,EAAC,MAAM,GAAG,mBAAmB,CAAC;KACrC,CAAC;CACL;AAED,MAAM,WAAW,cAAc;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE;QACZ,CAAC,GAAG,EAAC,MAAM,GAAG,MAAM,CAAC;KACxB,CAAA;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../lib/api/metadata.ts"],"names":[],"mappings":""}
@@ -8,3 +8,4 @@ export interface IWidgetBackendOptions {
8
8
  authUrl?: string;
9
9
  insightsUrl?: string;
10
10
  }
11
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../lib/config/backend.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../../lib/config/backend.ts"],"names":[],"mappings":""}
@@ -0,0 +1,46 @@
1
+ export interface IFeatures {
2
+ comments?: ICommentsFeature;
3
+ notes?: INotesFeature;
4
+ voting?: IVotingFeature;
5
+ timeline?: ITimelineFeature;
6
+ /**
7
+ * @internal
8
+ */
9
+ cta?: IFeatureBase;
10
+ /**
11
+ * @internal
12
+ */
13
+ stats?: IFeatureBase;
14
+ }
15
+ export interface IFeatureBase {
16
+ enabled: boolean;
17
+ }
18
+ /**
19
+ * Collaborative public comments
20
+ */
21
+ export interface ICommentsFeature extends IFeatureBase {
22
+ /**
23
+ * * if set to true comments are loaded in read only
24
+ */
25
+ readonly?: boolean;
26
+ }
27
+ /**
28
+ * Private notes
29
+ */
30
+ export interface INotesFeature extends IFeatureBase {
31
+ /**
32
+ * If set to true, private notes are loaded in read only
33
+ */
34
+ readonly?: boolean;
35
+ }
36
+ /**
37
+ * Vote directly on threads via button on the timeline
38
+ */
39
+ export interface IVotingFeature extends IFeatureBase {
40
+ }
41
+ /**
42
+ * Interactive Video timeline
43
+ */
44
+ export interface ITimelineFeature extends IFeatureBase {
45
+ }
46
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../lib/config/features.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IAClD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,YAAY;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,YAAY;CAAI;AAExD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY;CAAI"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../lib/config/features.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Course/group details
3
+ * If provided the discussions on the media will be categorized by groups
4
+ * allowing private discussions per group for same media
5
+ */
6
+ export interface IGroupDetails {
7
+ /**
8
+ * Unique group identifier
9
+ */
10
+ id: string | number;
11
+ /**
12
+ * Group title
13
+ */
14
+ title: string;
15
+ /**
16
+ * Group description
17
+ */
18
+ description?: string;
19
+ /**
20
+ * Group thumbnail
21
+ */
22
+ thumbnails?: IGroupThumbnails;
23
+ }
24
+ export interface IGroupThumbnails {
25
+ default: string;
26
+ mobile?: string;
27
+ }
28
+ //# sourceMappingURL=group-details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-details.d.ts","sourceRoot":"","sources":["../../../lib/config/group-details.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=group-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-details.js","sourceRoot":"","sources":["../../../lib/config/group-details.ts"],"names":[],"mappings":""}
@@ -0,0 +1,71 @@
1
+ import { IMediaDetails } from './media-details';
2
+ /**
3
+ * Callback hooks for triggering actions such as auth and getting info
4
+ */
5
+ export interface IHooks {
6
+ /**
7
+ * Callback that allows to enrich details about the played media.
8
+ * If provided the function is called by the widget to obtain additional details about the media.
9
+ * @param details media details obtained from the player
10
+ * @returns additional details about the played media, such as title
11
+ */
12
+ mediaDetails?(params: {
13
+ widgetIndex: number;
14
+ mediaSrc: string;
15
+ details?: IMediaDetails;
16
+ }): IMediaDetails | Promise<IMediaDetails>;
17
+ /**
18
+ * For SSO enabled integrations only.
19
+ * If Provided, Will be called when user triggers Authentication.
20
+ * If not provided a message in the form is shown.
21
+ * @returns {Promise<void> | void} If possible the promise should reslove/reject when the auth flow is finished.
22
+ */
23
+ ssoAuthRequestHandle?(): Promise<void> | void;
24
+ /**
25
+ * For SSO enabled integrations only.
26
+ * If Provided, Will be called when user triggers Logout action and "Logout" option will appear in the drawer menu.
27
+ * @returns {Promise<void> | void} If possible the promise should reslove/reject when the logout flow is finished.
28
+ */
29
+ logoutRequestHandle?(): Promise<void> | void;
30
+ /**
31
+ * Url to the video page.
32
+ * Useful if Annoto is embedded inside iframe for example.
33
+ * default: window.location.href is used.
34
+ */
35
+ getPageUrl?(): string;
36
+ /**
37
+ * Url to the video page and specific playback time of currentTime.
38
+ * If provided will be used by annoto for email notifications, in the dashboard, etc.
39
+ * @param currentTime current playback time of the player in seconds
40
+ * @param mediaSrc the media source of the player
41
+ */
42
+ getMediaDeepLinkUrl?(params: {
43
+ widgetIndex: number;
44
+ currentTime: number;
45
+ mediaSrc: string;
46
+ }): string;
47
+ /**
48
+ * @internal
49
+ * If people and presence are enabled for the site, this api can be implemented to add invites to one on one meetings
50
+ * @param params
51
+ */
52
+ getOneOnOneSessionInvite?(params: IOneOnOneSessionInviteParams): Promise<IOneOnOneSessionInviteResult> | IOneOnOneSessionInviteResult;
53
+ }
54
+ /**
55
+ * @internal
56
+ */
57
+ export interface IOneOnOneSessionInviteParams {
58
+ authorId: string;
59
+ invitedUserId: string;
60
+ }
61
+ /**
62
+ * @internal
63
+ */
64
+ export interface IOneOnOneSessionInviteResult {
65
+ inviteUrl: string;
66
+ inviteUrlText?: string;
67
+ title?: string;
68
+ message?: string;
69
+ inviteButton?: string;
70
+ }
71
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../lib/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,MAAM;IACnB;;;;;OAKG;IACH,YAAY,CAAC,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,aAAa,CAAC;KAAE,GAAG,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACnI;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9C;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7C;;;;OAIG;IACH,UAAU,CAAC,IAAI,MAAM,CAAC;IACtB;;;;;OAKG;IACH,mBAAmB,CAAC,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;KAAE,GAAG,MAAM,CAAC;IACtG;;;;OAIG;IACH,wBAAwB,CAAC,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAAC,4BAA4B,CAAC,GAAG,4BAA4B,CAAC;CACzI;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACzB;AACD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../lib/config/hooks.ts"],"names":[],"mappings":""}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @module Config
3
+ */
4
+ import { IWidgetBackendOptions } from './backend';
5
+ import { IFeatures } from './features';
6
+ import { IGroupDetails } from './group-details';
7
+ import { IHooks } from './hooks';
8
+ import { ILaunchSourceConfig } from './launch-source';
9
+ import { IUx } from './ux';
10
+ import { IWidgetConfig } from './widget';
11
+ export * from './backend';
12
+ export * from './features';
13
+ export * from './group-details';
14
+ export * from './hooks';
15
+ export * from './launch-source';
16
+ export * from './media-details';
17
+ export * from './timeline';
18
+ export * from './ux';
19
+ export * from './widget';
20
+ export interface IConfig<F = IFeatures> {
21
+ /**
22
+ * The client ID key provided by Annoto
23
+ * @remarks
24
+ * If not set, the widget will load in demo mode
25
+ */
26
+ clientId?: string;
27
+ /**
28
+ * Widget configuration settings.
29
+ * @remarks
30
+ * only single widget is supported. the array is for future use.
31
+ */
32
+ widgets: IWidgetConfig<F>[];
33
+ /**
34
+ * Course/group details
35
+ * If provided the discussions on the media will be categorized by groups
36
+ * allowing private discussions per group for same media
37
+ */
38
+ group?: IGroupDetails;
39
+ /**
40
+ * Enable/disable and configure features
41
+ * Modifying the features will override the backend configured features.
42
+ * @remarks
43
+ * If Feature is not enabled on backend it cannot be enabled via this api.
44
+ */
45
+ features?: F;
46
+ /**
47
+ * Configuration options that affect the user experience
48
+ */
49
+ ux?: IUx;
50
+ /**
51
+ * Callback hooks for triggering actions such as auth and getting info
52
+ */
53
+ hooks?: IHooks;
54
+ /**
55
+ * If set to true, the widget will load in demo mode
56
+ */
57
+ demoMode?: boolean;
58
+ /**
59
+ * @internal
60
+ * Demo discussion for the demo mode
61
+ */
62
+ demoDiscussion?: string;
63
+ /**
64
+ * Language code in IETF BCP 47 or ISO/IEC 15897.
65
+ * @default 'en'
66
+ */
67
+ locale?: string;
68
+ /**
69
+ * Launch source credentials for widget integration via proxy domain
70
+ * For example LTI
71
+ */
72
+ launchSource?: ILaunchSourceConfig;
73
+ /**
74
+ * Set the zIndex to appropriate value to make the app visible and not iterfer with other elements.
75
+ * @default 100
76
+ */
77
+ zIndex?: number;
78
+ /**
79
+ * same as zIndex, only for when the player is in fullscreen.
80
+ * @default 100
81
+ */
82
+ fsZIndex?: number;
83
+ /**
84
+ * setup the backend endpoints to override the default
85
+ */
86
+ backend?: IWidgetBackendOptions;
87
+ }
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AAEzB,MAAM,WAAW,OAAO,CAAC,CAAC,GAAG,SAAS;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb;;OAEG;IACH,EAAE,CAAC,EAAE,GAAG,CAAC;IACT;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACnC"}
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * @module Config
3
3
  */
4
- export * from './media-details';
4
+ export * from './backend';
5
5
  export * from './features';
6
+ export * from './group-details';
7
+ export * from './hooks';
8
+ export * from './launch-source';
9
+ export * from './media-details';
10
+ export * from './timeline';
6
11
  export * from './ux';
7
12
  export * from './widget';
8
- export * from './thread';
9
- export * from './align';
10
- export * from './backend';
11
- export * from './launch-source';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC"}
@@ -2,8 +2,9 @@
2
2
  * Launch source credentials for widget integration via proxy domain
3
3
  * For example LTI
4
4
  */
5
- export interface LaunchSourceConfig {
5
+ export interface ILaunchSourceConfig {
6
6
  accessToken?: string;
7
7
  consumerKey?: string;
8
8
  origin?: string;
9
9
  }
10
+ //# sourceMappingURL=launch-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launch-source.d.ts","sourceRoot":"","sources":["../../../lib/config/launch-source.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=launch-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launch-source.js","sourceRoot":"","sources":["../../../lib/config/launch-source.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ export interface IMediaDetails {
2
+ /**
3
+ * Media Title
4
+ */
5
+ title: string;
6
+ /**
7
+ * If provided will be used as the media identifier instead of obtaining it from the player
8
+ * Can be any unique id string
9
+ */
10
+ id?: string;
11
+ /**
12
+ * Media description
13
+ */
14
+ description?: string;
15
+ /**
16
+ * Media thumbnail
17
+ */
18
+ thumbnails?: IMediaThumbnails;
19
+ /**
20
+ * author name of the media
21
+ */
22
+ authorName?: string;
23
+ }
24
+ export interface IMediaThumbnails {
25
+ default: string;
26
+ mobile?: string;
27
+ }
28
+ //# sourceMappingURL=media-details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-details.d.ts","sourceRoot":"","sources":["../../../lib/config/media-details.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=media-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-details.js","sourceRoot":"","sources":["../../../lib/config/media-details.ts"],"names":[],"mappings":""}