@concord-consortium/lara-interactive-api 1.7.2 → 1.8.0-pre.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 +2 -1
- package/index-bundle.d.ts +3 -2
- package/index.js +2588 -2584
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInitInteractive, INavigationOptions, IAuthInfo, ISupportedFeatures, IShowModal, ICloseModal, IGetInteractiveListOptions, IGetInteractiveListResponse, ISetLinkedInteractives, IGetLibraryInteractiveListRequest, IJwtResponse, ICustomMessageHandler, ICustomMessagesHandledMap, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotResponse, IAddLinkedInteractiveStateListenerOptions, IDecoratedContentEvent, ITextDecorationHandler, WriteAttachmentParams, ReadAttachmentParams, GetAttachmentUrlParams, IGetReportItemAnswerHandler, IReportItemAnswer, OnUnloadFunction, IReportItemHandlerMetadata } from "./types";
|
|
1
|
+
import { IInitInteractive, INavigationOptions, IAuthInfo, ISupportedFeatures, IShowModal, ICloseModal, IGetInteractiveListOptions, IGetInteractiveListResponse, ISetLinkedInteractives, IGetLibraryInteractiveListRequest, IJwtResponse, ICustomMessageHandler, ICustomMessagesHandledMap, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotResponse, IAddLinkedInteractiveStateListenerOptions, IDecoratedContentEvent, ITextDecorationHandler, WriteAttachmentParams, ReadAttachmentParams, GetAttachmentUrlParams, IGetReportItemAnswerHandler, IReportItemAnswer, OnUnloadFunction, IReportItemHandlerMetadata, ICustomMessage } from "./types";
|
|
2
2
|
export declare const getInitInteractiveMessage: <InteractiveState = {}, AuthoredState = {}, GlobalInteractiveState = {}>() => Promise<IInitInteractive<InteractiveState, AuthoredState, GlobalInteractiveState> | null>;
|
|
3
3
|
export declare const getMode: () => Promise<"runtime" | "authoring" | "report" | "reportItem" | undefined>;
|
|
4
4
|
export declare const getInteractiveState: <InteractiveState>() => InteractiveState | null;
|
|
@@ -116,3 +116,4 @@ export declare const readAttachment: (params: ReadAttachmentParams) => Promise<R
|
|
|
116
116
|
export declare const getAttachmentUrl: (params: GetAttachmentUrlParams) => Promise<string>;
|
|
117
117
|
export declare const sendReportItemAnswer: (request: Omit<IReportItemAnswer, "requestId">) => void;
|
|
118
118
|
export declare const setOnUnload: (onUnload?: OnUnloadFunction<{}> | undefined) => void;
|
|
119
|
+
export declare const sendCustomMessage: (customMessage: ICustomMessage) => void;
|
package/index-bundle.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ interface ICustomReportFieldsInteractiveState {
|
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
declare type IRuntimeClientMessage = "interactiveState" | "height" | "hint" | "getAttachmentUrl" | "getAuthInfo" | "supportedFeatures" | "navigation" | "getFirebaseJWT" | "authoredState" | "authoringCustomReportFields" | "runtimeCustomReportValues" | "showModal" | "closeModal" | "getLibraryInteractiveList" | "getInteractiveSnapshot" | "addLinkedInteractiveStateListener" | "removeLinkedInteractiveStateListener" | "decoratedContentEvent";
|
|
160
|
+
declare type IRuntimeClientMessage = "interactiveState" | "height" | "hint" | "getAttachmentUrl" | "getAuthInfo" | "supportedFeatures" | "navigation" | "getFirebaseJWT" | "authoredState" | "authoringCustomReportFields" | "runtimeCustomReportValues" | "showModal" | "closeModal" | "getLibraryInteractiveList" | "getInteractiveSnapshot" | "addLinkedInteractiveStateListener" | "removeLinkedInteractiveStateListener" | "decoratedContentEvent" | "customMessage";
|
|
161
161
|
declare type IRuntimeServerMessage = "attachmentUrl" | "authInfo" | "getInteractiveState" | "initInteractive" | "firebaseJWT" | "closedModal" | "customMessage" | "libraryInteractiveList" | "interactiveSnapshot" | "contextMembership" | "linkedInteractiveState" | "decorateContent";
|
|
162
162
|
declare type IAuthoringClientMessage = "getInteractiveList" | "setLinkedInteractives" | "getFirebaseJWT";
|
|
163
163
|
declare type IAuthoringServerMessage = "interactiveList" | "firebaseJWT";
|
|
@@ -620,6 +620,7 @@ declare const readAttachment: (params: ReadAttachmentParams) => Promise<Response
|
|
|
620
620
|
declare const getAttachmentUrl: (params: GetAttachmentUrlParams) => Promise<string>;
|
|
621
621
|
declare const sendReportItemAnswer: (request: Omit<IReportItemAnswer, "requestId">) => void;
|
|
622
622
|
declare const setOnUnload: (onUnload?: OnUnloadFunction<{}> | undefined) => void;
|
|
623
|
+
declare const sendCustomMessage: (customMessage: ICustomMessage) => void;
|
|
623
624
|
|
|
624
625
|
declare type UpdateFunc<S> = (prevState: S | null) => S;
|
|
625
626
|
declare const useInteractiveState: <InteractiveState>() => {
|
|
@@ -689,4 +690,4 @@ declare class Client {
|
|
|
689
690
|
private connect;
|
|
690
691
|
}
|
|
691
692
|
|
|
692
|
-
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICloseModal, IContextMember, IContextMembership, ICustomMessage, ICustomMessageHandler, ICustomMessageOptions, ICustomMessagesHandledMap, ICustomReportFieldsAuthoredState, ICustomReportFieldsAuthoredStateField, ICustomReportFieldsInteractiveState, IDataset, IDecoratedContentEvent, IGetAuthInfoRequest, IGetAuthInfoResponse, IGetFirebaseJwtRequest, IGetFirebaseJwtResponse, IGetInteractiveListOptions, IGetInteractiveListRequest, IGetInteractiveListResponse, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotRequest, IGetInteractiveSnapshotResponse, IGetInteractiveState, IGetLibraryInteractiveListOptions, IGetLibraryInteractiveListRequest, IGetLibraryInteractiveListResponse, IGetReportItemAnswer, IGetReportItemAnswerHandler, IHintRequest, IHostFeatureSupport, IHostFeatures, IHostModalSupport, IInitInteractive, IInteractiveListResponseItem, IInteractiveStateProps, IInteractiveStateWithDataset, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, INavigationOptions, IPortalClaims, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addLinkedInteractiveStateListener, closeModal, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeLinkedInteractiveStateListener, sendReportItemAnswer, setAuthoredState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
|
|
693
|
+
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICloseModal, IContextMember, IContextMembership, ICustomMessage, ICustomMessageHandler, ICustomMessageOptions, ICustomMessagesHandledMap, ICustomReportFieldsAuthoredState, ICustomReportFieldsAuthoredStateField, ICustomReportFieldsInteractiveState, IDataset, IDecoratedContentEvent, IGetAuthInfoRequest, IGetAuthInfoResponse, IGetFirebaseJwtRequest, IGetFirebaseJwtResponse, IGetInteractiveListOptions, IGetInteractiveListRequest, IGetInteractiveListResponse, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotRequest, IGetInteractiveSnapshotResponse, IGetInteractiveState, IGetLibraryInteractiveListOptions, IGetLibraryInteractiveListRequest, IGetLibraryInteractiveListResponse, IGetReportItemAnswer, IGetReportItemAnswerHandler, IHintRequest, IHostFeatureSupport, IHostFeatures, IHostModalSupport, IInitInteractive, IInteractiveListResponseItem, IInteractiveStateProps, IInteractiveStateWithDataset, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, INavigationOptions, IPortalClaims, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addLinkedInteractiveStateListener, closeModal, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeLinkedInteractiveStateListener, sendCustomMessage, sendReportItemAnswer, setAuthoredState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
|