@concord-consortium/lara-interactive-api 1.4.0-pre.3 → 1.5.1

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/api.d.ts CHANGED
@@ -74,6 +74,9 @@ export declare const removeGetReportItemAnswerListener: () => void;
74
74
  export declare const setSupportedFeatures: (features: ISupportedFeatures) => void;
75
75
  export declare const setHeight: (height: number | string) => void;
76
76
  export declare const postDecoratedContentEvent: (msg: IDecoratedContentEvent) => void;
77
+ /**
78
+ * Providing empty string or null disables hint.
79
+ */
77
80
  export declare const setHint: (hint: string | null) => void;
78
81
  export declare const setNavigation: (options: INavigationOptions) => void;
79
82
  export declare const getAuthInfo: () => Promise<IAuthInfo>;
@@ -85,6 +88,12 @@ export declare const addAuthoredStateListener: <AuthoredState>(listener: (author
85
88
  export declare const removeAuthoredStateListener: <AuthoredState>(listener: (authoredState: AuthoredState) => void) => void;
86
89
  export declare const addGlobalInteractiveStateListener: <GlobalInteractiveState>(listener: (globalInteractiveState: GlobalInteractiveState) => void) => void;
87
90
  export declare const removeGlobalInteractiveStateListener: <GlobalInteractiveState>(listener: (globalInteractiveState: GlobalInteractiveState) => void) => void;
91
+ /**
92
+ * The listener should be called immediately after it is added with any state of the linked
93
+ * interactive that the host currently knows about. This first call might not happen
94
+ * synchronously it could be slightly delayed. And then the listener should be called again
95
+ * whenever the state of the linked interactive changes.
96
+ */
88
97
  export declare const addLinkedInteractiveStateListener: <LinkedInteractiveState>(listener: (linkedIntState: LinkedInteractiveState | undefined) => void, options: IAddLinkedInteractiveStateListenerOptions) => void;
89
98
  export declare const removeLinkedInteractiveStateListener: <InteractiveState>(listener: (intState: InteractiveState | null) => void) => void;
90
99
  /**
package/index-bundle.d.ts CHANGED
@@ -111,6 +111,7 @@ interface IAuthoringInitInteractive<AuthoredState = {}> {
111
111
  interface IReportInitInteractive<InteractiveState = {}, AuthoredState = {}> {
112
112
  version: 1;
113
113
  mode: "report";
114
+ view?: "standalone";
114
115
  hostFeatures: IHostFeatures;
115
116
  authoredState: AuthoredState;
116
117
  interactiveState: InteractiveState;
@@ -273,6 +274,7 @@ interface IAttachmentUrlRequest extends IBaseRequestResponse {
273
274
  interactiveId?: string;
274
275
  contentType?: string;
275
276
  expiresIn?: number;
277
+ platformUserId?: string;
276
278
  }
277
279
  interface IWriteAttachmentRequest extends IAttachmentUrlRequest {
278
280
  content: any;
@@ -524,6 +526,9 @@ declare const removeGetReportItemAnswerListener: () => void;
524
526
  declare const setSupportedFeatures: (features: ISupportedFeatures) => void;
525
527
  declare const setHeight: (height: number | string) => void;
526
528
  declare const postDecoratedContentEvent: (msg: IDecoratedContentEvent) => void;
529
+ /**
530
+ * Providing empty string or null disables hint.
531
+ */
527
532
  declare const setHint: (hint: string | null) => void;
528
533
  declare const setNavigation: (options: INavigationOptions) => void;
529
534
  declare const getAuthInfo: () => Promise<IAuthInfo>;
@@ -535,6 +540,12 @@ declare const addAuthoredStateListener: <AuthoredState>(listener: (authoredState
535
540
  declare const removeAuthoredStateListener: <AuthoredState>(listener: (authoredState: AuthoredState) => void) => void;
536
541
  declare const addGlobalInteractiveStateListener: <GlobalInteractiveState>(listener: (globalInteractiveState: GlobalInteractiveState) => void) => void;
537
542
  declare const removeGlobalInteractiveStateListener: <GlobalInteractiveState>(listener: (globalInteractiveState: GlobalInteractiveState) => void) => void;
543
+ /**
544
+ * The listener should be called immediately after it is added with any state of the linked
545
+ * interactive that the host currently knows about. This first call might not happen
546
+ * synchronously it could be slightly delayed. And then the listener should be called again
547
+ * whenever the state of the linked interactive changes.
548
+ */
538
549
  declare const addLinkedInteractiveStateListener: <LinkedInteractiveState>(listener: (linkedIntState: LinkedInteractiveState | undefined) => void, options: IAddLinkedInteractiveStateListenerOptions) => void;
539
550
  declare const removeLinkedInteractiveStateListener: <InteractiveState>(listener: (intState: InteractiveState | null) => void) => void;
540
551
  /**
package/index.js CHANGED
@@ -4265,7 +4265,7 @@ var postDecoratedContentEvent = function (msg) {
4265
4265
  (0, client_1.getClient)().post("decoratedContentEvent", msg);
4266
4266
  };
4267
4267
  exports.postDecoratedContentEvent = postDecoratedContentEvent;
4268
- /*
4268
+ /**
4269
4269
  * Providing empty string or null disables hint.
4270
4270
  */
4271
4271
  var setHint = function (hint) {
@@ -4364,6 +4364,12 @@ var removeGlobalInteractiveStateListener = function (listener) {
4364
4364
  exports.removeGlobalInteractiveStateListener = removeGlobalInteractiveStateListener;
4365
4365
  // Mapping between external listener and internal listener, so it's possible to remove linkedInteractiveState listeners.
4366
4366
  var _linkedInteractiveStateListeners = new Map();
4367
+ /**
4368
+ * The listener should be called immediately after it is added with any state of the linked
4369
+ * interactive that the host currently knows about. This first call might not happen
4370
+ * synchronously it could be slightly delayed. And then the listener should be called again
4371
+ * whenever the state of the linked interactive changes.
4372
+ */
4367
4373
  var addLinkedInteractiveStateListener = function (listener, options) {
4368
4374
  var client = (0, client_1.getClient)();
4369
4375
  var listenerId = (0, uuid_1.v4)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concord-consortium/lara-interactive-api",
3
- "version": "1.4.0-pre.3",
3
+ "version": "1.5.1",
4
4
  "description": "LARA Interactive API client and types",
5
5
  "main": "./index.js",
6
6
  "types": "./index-bundle.d.ts",