@concord-consortium/lara-interactive-api 1.13.0-pre.2 → 1.14.0-pre.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.
- package/api.d.ts +4 -1
- package/focus-protocol.spec.d.ts +1 -0
- package/index-bundle.d.ts +22 -3
- package/index.js +3873 -3860
- package/metadata-types.d.ts +7 -0
- 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, ICustomMessage, IJobInfo } 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, IJobInfo, IFocusEnterMessage, FocusExitMode } from "./types";
|
|
2
2
|
import { PubSubChannel } from "./pubsub";
|
|
3
3
|
export { PubSubChannel };
|
|
4
4
|
export declare const getInitInteractiveMessage: <InteractiveState = {}, AuthoredState = {}, GlobalInteractiveState = {}>() => Promise<IInitInteractive<InteractiveState, AuthoredState, GlobalInteractiveState> | null>;
|
|
@@ -69,6 +69,9 @@ export declare const getGlobalInteractiveState: <GlobalInteractiveState>() => Gl
|
|
|
69
69
|
export declare const setGlobalInteractiveState: <GlobalInteractiveState>(newGlobalState: GlobalInteractiveState | null) => void;
|
|
70
70
|
export declare const addCustomMessageListener: (callback: ICustomMessageHandler, handles?: ICustomMessagesHandledMap | undefined) => void;
|
|
71
71
|
export declare const removeCustomMessageListener: () => boolean;
|
|
72
|
+
export declare const addFocusEnterListener: (callback: (mode: IFocusEnterMessage["mode"]) => void) => void;
|
|
73
|
+
export declare const removeFocusEnterListener: () => boolean;
|
|
74
|
+
export declare const sendFocusExit: (mode: FocusExitMode) => void;
|
|
72
75
|
export declare const addDecorateContentListener: (callback: ITextDecorationHandler) => void;
|
|
73
76
|
export declare const removeDecorateContentListener: () => void;
|
|
74
77
|
export declare const addGetReportItemAnswerListener: <InteractiveState, AuthoredState>(callback: IGetReportItemAnswerHandler<InteractiveState, AuthoredState>) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index-bundle.d.ts
CHANGED
|
@@ -168,8 +168,8 @@ interface ICustomReportFieldsInteractiveState {
|
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
declare type IRuntimeClientMessage = "interactiveState" | "height" | "hint" | "getAttachmentUrl" | "getAuthInfo" | "supportedFeatures" | "navigation" | "getFirebaseJWT" | "authoredState" | "authoringCustomReportFields" | "runtimeCustomReportValues" | "showModal" | "closeModal" | "getLibraryInteractiveList" | "getInteractiveSnapshot" | "addLinkedInteractiveStateListener" | "removeLinkedInteractiveStateListener" | "decoratedContentEvent" | "setDirtyState" | "customMessage" | "createChannel" | "publish" | "subscribe" | "unsubscribe" | "createJob" | "cancelJob";
|
|
172
|
-
declare type IRuntimeServerMessage = "attachmentUrl" | "authInfo" | "getInteractiveState" | "initInteractive" | "firebaseJWT" | "closedModal" | "customMessage" | "libraryInteractiveList" | "interactiveSnapshot" | "contextMembership" | "linkedInteractiveState" | "decorateContent" | "pubSubMessage" | "pubSubChannelInfo" | "jobCreated" | "jobInfo";
|
|
171
|
+
declare type IRuntimeClientMessage = "interactiveState" | "height" | "hint" | "getAttachmentUrl" | "getAuthInfo" | "supportedFeatures" | "navigation" | "getFirebaseJWT" | "authoredState" | "authoringCustomReportFields" | "runtimeCustomReportValues" | "showModal" | "closeModal" | "getLibraryInteractiveList" | "getInteractiveSnapshot" | "addLinkedInteractiveStateListener" | "removeLinkedInteractiveStateListener" | "decoratedContentEvent" | "setDirtyState" | "customMessage" | "createChannel" | "publish" | "subscribe" | "unsubscribe" | "createJob" | "cancelJob" | "focusExit";
|
|
172
|
+
declare type IRuntimeServerMessage = "attachmentUrl" | "authInfo" | "getInteractiveState" | "initInteractive" | "firebaseJWT" | "closedModal" | "customMessage" | "libraryInteractiveList" | "interactiveSnapshot" | "contextMembership" | "linkedInteractiveState" | "decorateContent" | "pubSubMessage" | "pubSubChannelInfo" | "jobCreated" | "jobInfo" | "focusEnter";
|
|
173
173
|
declare type IAuthoringClientMessage = "getInteractiveList" | "setLinkedInteractives" | "getFirebaseJWT";
|
|
174
174
|
declare type IAuthoringServerMessage = "interactiveList" | "firebaseJWT";
|
|
175
175
|
declare type IReportItemClientMessage = "reportItemAnswer" | "reportItemClientReady";
|
|
@@ -192,6 +192,14 @@ interface IContextMembership {
|
|
|
192
192
|
}
|
|
193
193
|
declare type ICustomMessageOptions = Record<string, any>;
|
|
194
194
|
declare type ICustomMessagesHandledMap = Record<string, boolean | ICustomMessageOptions>;
|
|
195
|
+
declare type FocusEnterMode = "forward" | "reverse" | "restore";
|
|
196
|
+
declare type FocusExitMode = "forward" | "reverse" | "escape";
|
|
197
|
+
interface IFocusEnterMessage {
|
|
198
|
+
mode: FocusEnterMode;
|
|
199
|
+
}
|
|
200
|
+
interface IFocusExitMessage {
|
|
201
|
+
mode: FocusExitMode;
|
|
202
|
+
}
|
|
195
203
|
interface ISupportedFeatures {
|
|
196
204
|
aspectRatio?: number;
|
|
197
205
|
authoredState?: boolean;
|
|
@@ -199,6 +207,7 @@ interface ISupportedFeatures {
|
|
|
199
207
|
customMessages?: {
|
|
200
208
|
handles?: ICustomMessagesHandledMap;
|
|
201
209
|
};
|
|
210
|
+
focusProtocol?: boolean;
|
|
202
211
|
}
|
|
203
212
|
interface ISupportedFeaturesRequest {
|
|
204
213
|
apiVersion: 1;
|
|
@@ -581,6 +590,13 @@ interface IAuthoringMultipleChoiceChoiceMetadata {
|
|
|
581
590
|
interface IAuthoringMultipleChoiceMetadata extends IAuthoringMetadataBase {
|
|
582
591
|
questionType: "multiple_choice";
|
|
583
592
|
choices: IAuthoringMultipleChoiceChoiceMetadata[];
|
|
593
|
+
/**
|
|
594
|
+
* Whether the question accepts multiple simultaneous answers. When omitted, consumers should
|
|
595
|
+
* treat it as undefined (not false) — single-answer behavior is the legacy default but is not
|
|
596
|
+
* implied by absence. LARA surfaces this verbatim as `multiple_answers` on the report-service
|
|
597
|
+
* structure document.
|
|
598
|
+
*/
|
|
599
|
+
multipleAnswers?: boolean;
|
|
584
600
|
}
|
|
585
601
|
interface IAuthoringImageQuestionMetadata extends IAuthoringMetadataBase {
|
|
586
602
|
questionType: "image_question";
|
|
@@ -752,6 +768,9 @@ declare const getGlobalInteractiveState: <GlobalInteractiveState>() => GlobalInt
|
|
|
752
768
|
declare const setGlobalInteractiveState: <GlobalInteractiveState>(newGlobalState: GlobalInteractiveState | null) => void;
|
|
753
769
|
declare const addCustomMessageListener: (callback: ICustomMessageHandler, handles?: ICustomMessagesHandledMap | undefined) => void;
|
|
754
770
|
declare const removeCustomMessageListener: () => boolean;
|
|
771
|
+
declare const addFocusEnterListener: (callback: (mode: IFocusEnterMessage["mode"]) => void) => void;
|
|
772
|
+
declare const removeFocusEnterListener: () => boolean;
|
|
773
|
+
declare const sendFocusExit: (mode: FocusExitMode) => void;
|
|
755
774
|
declare const addDecorateContentListener: (callback: ITextDecorationHandler) => void;
|
|
756
775
|
declare const removeDecorateContentListener: () => void;
|
|
757
776
|
declare const addGetReportItemAnswerListener: <InteractiveState, AuthoredState>(callback: IGetReportItemAnswerHandler<InteractiveState, AuthoredState>) => void;
|
|
@@ -850,4 +869,4 @@ interface IUseAccessibilityProps {
|
|
|
850
869
|
}
|
|
851
870
|
declare const useAccessibility: (props?: IUseAccessibilityProps | undefined) => IAccessibilitySettings;
|
|
852
871
|
|
|
853
|
-
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DefaultAccessibilitySettings, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAccessibilitySettings, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICancelJobRequest, ICloseModal, IContextMember, IContextMembership, ICreateJobRequest, ICreateJobResponse, 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, IJobExecutor, IJobInfo, IJobInfoMessage, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, IMediaLibrary, IMediaLibraryItem, IMediaLibraryItemType, INavigationOptions, IOpaqueObjectStorageConfig, IPortalClaims, IPubSubChannelInfo, IPubSubCreateChannel, IPubSubMessage, IPubSubPublish, IPubSubSubscribe, IPubSubUnsubscribe, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetDirtyStateRequest, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseAccessibilityProps, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, PubSubChannel, PubSubChannelInfoHandler, PubSubMessageHandler, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addJobUpdateListener, addLinkedInteractiveStateListener, cancelJob, closeModal, createJob, createPubSubChannel, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getJobs, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeJobUpdateListener, removeLinkedInteractiveStateListener, sendCustomMessage, sendReportItemAnswer, setAuthoredState, setDirtyState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useJobs, useReportItem, writeAttachment };
|
|
872
|
+
export { AttachmentInfoMap, ChoiceId, Client, ClientMessage, DefaultAccessibilitySettings, DeprecatedRuntimeClientMessage, DeprecatedRuntimeServerMessage, FocusEnterMode, FocusExitMode, GetAttachmentUrlParams, GlobalIFrameSaverClientMessage, GlobalIFrameSaverServerMessage, IAccessibilitySettings, IAddLinkedInteractiveStateListenerOptions, IAddLinkedInteractiveStateListenerRequest, IAttachmentInfo, IAttachmentUrlRequest, IAttachmentUrlResponse, IAuthInfo, IAuthoringClientMessage, IAuthoringCustomReportField, IAuthoringCustomReportFields, IAuthoringImageQuestionMetadata, IAuthoringInitInteractive, IAuthoringInteractiveMetadata, IAuthoringMetadata, IAuthoringMetadataBase, IAuthoringMultipleChoiceChoiceMetadata, IAuthoringMultipleChoiceMetadata, IAuthoringOpenResponseMetadata, IAuthoringServerMessage, IBaseShowModal, ICancelJobRequest, ICloseModal, IContextMember, IContextMembership, ICreateJobRequest, ICreateJobResponse, ICustomMessage, ICustomMessageHandler, ICustomMessageOptions, ICustomMessagesHandledMap, ICustomReportFieldsAuthoredState, ICustomReportFieldsAuthoredStateField, ICustomReportFieldsInteractiveState, IDataset, IDecoratedContentEvent, IFocusEnterMessage, IFocusExitMessage, IGetAuthInfoRequest, IGetAuthInfoResponse, IGetFirebaseJwtRequest, IGetFirebaseJwtResponse, IGetInteractiveListOptions, IGetInteractiveListRequest, IGetInteractiveListResponse, IGetInteractiveSnapshotOptions, IGetInteractiveSnapshotRequest, IGetInteractiveSnapshotResponse, IGetInteractiveState, IGetLibraryInteractiveListOptions, IGetLibraryInteractiveListRequest, IGetLibraryInteractiveListResponse, IGetReportItemAnswer, IGetReportItemAnswerHandler, IHintRequest, IHostFeatureSupport, IHostFeatures, IHostModalSupport, IInitInteractive, IInteractiveListResponseItem, IInteractiveStateProps, IInteractiveStateWithDataset, IJobExecutor, IJobInfo, IJobInfoMessage, IJwtClaims, IJwtResponse, ILibraryInteractiveListResponseItem, ILinkedInteractive, ILinkedInteractiveStateResponse, IMediaLibrary, IMediaLibraryItem, IMediaLibraryItemType, INavigationOptions, IOpaqueObjectStorageConfig, IPortalClaims, IPubSubChannelInfo, IPubSubCreateChannel, IPubSubMessage, IPubSubPublish, IPubSubSubscribe, IPubSubUnsubscribe, IRemoveLinkedInteractiveStateListenerRequest, IReportInitInteractive, IReportItemAnswer, IReportItemAnswerItem, IReportItemAnswerItemAnswerText, IReportItemAnswerItemAttachment, IReportItemAnswerItemHtml, IReportItemAnswerItemLinks, IReportItemAnswerItemScore, IReportItemClientMessage, IReportItemHandlerMetadata, IReportItemInitInteractive, IReportItemServerMessage, IRuntimeClientMessage, IRuntimeCustomReportValues, IRuntimeImageQuestionMetadata, IRuntimeInitInteractive, IRuntimeInteractiveMetadata, IRuntimeMetadata, IRuntimeMetadataBase, IRuntimeMultipleChoiceMetadata, IRuntimeOpenResponseMetadata, IRuntimeServerMessage, ISetDirtyStateRequest, ISetLinkedInteractives, IShowAlert, IShowDialog, IShowLightbox, IShowModal, ISupportedFeatures, ISupportedFeaturesRequest, ITextDecorationHandler, ITextDecorationHandlerInfo, ITextDecorationInfo, IThemeInfo, IUseAccessibilityProps, IUseReportItemOptions, IWriteAttachmentRequest, IframePhoneServerMessage, InitInteractiveMode, InteractiveItemId, LoggerClientMessage, ModalType, OnUnloadFunction, PubSubChannel, PubSubChannelInfoHandler, PubSubMessageHandler, ReadAttachmentParams, ReportItemsType, ServerMessage, WriteAttachmentParams, addAuthoredStateListener, addCustomMessageListener, addDecorateContentListener, addFocusEnterListener, addGetReportItemAnswerListener, addGlobalInteractiveStateListener, addInteractiveStateListener, addJobUpdateListener, addLinkedInteractiveStateListener, cancelJob, closeModal, createJob, createPubSubChannel, flushStateUpdates, getAttachmentUrl, getAuthInfo, getAuthoredState, getClient, getFirebaseJwt, getGlobalInteractiveState, getInitInteractiveMessage, getInteractiveList, getInteractiveSnapshot, getInteractiveState, getJobs, getLibraryInteractiveList, getMode, inIframe, log, notifyReportItemClientReady, postDecoratedContentEvent, readAttachment, removeAuthoredStateListener, removeCustomMessageListener, removeDecorateContentListener, removeFocusEnterListener, removeGetReportItemAnswerListener, removeGlobalInteractiveStateListener, removeInteractiveStateListener, removeJobUpdateListener, removeLinkedInteractiveStateListener, sendCustomMessage, sendFocusExit, sendReportItemAnswer, setAuthoredState, setDirtyState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useJobs, useReportItem, writeAttachment };
|