@concord-consortium/lara-interactive-api 1.5.0 → 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 +9 -0
- package/index-bundle.d.ts +10 -0
- package/index.js +7 -1
- package/package.json +1 -1
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;
|
|
@@ -525,6 +526,9 @@ declare const removeGetReportItemAnswerListener: () => void;
|
|
|
525
526
|
declare const setSupportedFeatures: (features: ISupportedFeatures) => void;
|
|
526
527
|
declare const setHeight: (height: number | string) => void;
|
|
527
528
|
declare const postDecoratedContentEvent: (msg: IDecoratedContentEvent) => void;
|
|
529
|
+
/**
|
|
530
|
+
* Providing empty string or null disables hint.
|
|
531
|
+
*/
|
|
528
532
|
declare const setHint: (hint: string | null) => void;
|
|
529
533
|
declare const setNavigation: (options: INavigationOptions) => void;
|
|
530
534
|
declare const getAuthInfo: () => Promise<IAuthInfo>;
|
|
@@ -536,6 +540,12 @@ declare const addAuthoredStateListener: <AuthoredState>(listener: (authoredState
|
|
|
536
540
|
declare const removeAuthoredStateListener: <AuthoredState>(listener: (authoredState: AuthoredState) => void) => void;
|
|
537
541
|
declare const addGlobalInteractiveStateListener: <GlobalInteractiveState>(listener: (globalInteractiveState: GlobalInteractiveState) => void) => void;
|
|
538
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
|
+
*/
|
|
539
549
|
declare const addLinkedInteractiveStateListener: <LinkedInteractiveState>(listener: (linkedIntState: LinkedInteractiveState | undefined) => void, options: IAddLinkedInteractiveStateListenerOptions) => void;
|
|
540
550
|
declare const removeLinkedInteractiveStateListener: <InteractiveState>(listener: (intState: InteractiveState | null) => void) => void;
|
|
541
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)();
|