@concord-consortium/lara-interactive-api 1.11.0-pre.0 → 1.12.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 CHANGED
@@ -120,3 +120,4 @@ export declare const sendReportItemAnswer: (request: Omit<IReportItemAnswer, "re
120
120
  export declare const setOnUnload: (onUnload?: OnUnloadFunction<{}> | undefined) => void;
121
121
  export declare const sendCustomMessage: (customMessage: ICustomMessage) => void;
122
122
  export declare const createPubSubChannel: (channelId: string, channelInfo?: any) => PubSubChannel;
123
+ export declare const setDirtyState: (isDirty: boolean) => void;
package/index-bundle.d.ts CHANGED
@@ -168,7 +168,7 @@ 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" | "customMessage" | "createChannel" | "publish" | "subscribe" | "unsubscribe";
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";
172
172
  declare type IRuntimeServerMessage = "attachmentUrl" | "authInfo" | "getInteractiveState" | "initInteractive" | "firebaseJWT" | "closedModal" | "customMessage" | "libraryInteractiveList" | "interactiveSnapshot" | "contextMembership" | "linkedInteractiveState" | "decorateContent" | "pubSubMessage" | "pubSubChannelInfo";
173
173
  declare type IAuthoringClientMessage = "getInteractiveList" | "setLinkedInteractives" | "getFirebaseJWT";
174
174
  declare type IAuthoringServerMessage = "interactiveList" | "firebaseJWT";
@@ -281,6 +281,9 @@ interface ISetLinkedInteractives {
281
281
  linkedInteractives?: ILinkedInteractive[];
282
282
  linkedState?: InteractiveItemId;
283
283
  }
284
+ interface ISetDirtyStateRequest {
285
+ isDirty: boolean;
286
+ }
284
287
  interface IBaseRequestResponse {
285
288
  requestId: number;
286
289
  }
@@ -507,11 +510,10 @@ interface IPubSubMessage {
507
510
  interface IPubSubChannelInfo {
508
511
  channelId: string;
509
512
  channelInfo: any;
510
- publisherId: string;
511
513
  timestamp: number;
512
514
  }
513
515
  declare type PubSubMessageHandler = (message: any, publisherId: string) => void;
514
- declare type PubSubChannelInfoHandler = (channelInfo: any, publisherId: string) => void;
516
+ declare type PubSubChannelInfoHandler = (channelInfo: any) => void;
515
517
 
516
518
  declare type ChoiceId = string;
517
519
  interface IAuthoringMetadataBase {
@@ -761,6 +763,7 @@ declare const sendReportItemAnswer: (request: Omit<IReportItemAnswer, "requestId
761
763
  declare const setOnUnload: (onUnload?: OnUnloadFunction<{}> | undefined) => void;
762
764
  declare const sendCustomMessage: (customMessage: ICustomMessage) => void;
763
765
  declare const createPubSubChannel: (channelId: string, channelInfo?: any) => PubSubChannel;
766
+ declare const setDirtyState: (isDirty: boolean) => void;
764
767
 
765
768
  declare type UpdateFunc<S> = (prevState: S | null) => S;
766
769
  declare const useInteractiveState: <InteractiveState>() => {
@@ -792,4 +795,4 @@ interface IUseAccessibilityProps {
792
795
  }
793
796
  declare const useAccessibility: (props?: IUseAccessibilityProps | undefined) => IAccessibilitySettings;
794
797
 
795
- 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, 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, 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, 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, addLinkedInteractiveStateListener, closeModal, createPubSubChannel, 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, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
798
+ 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, 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, 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, addLinkedInteractiveStateListener, closeModal, createPubSubChannel, 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, setDirtyState, setGlobalInteractiveState, setHeight, setHint, setInteractiveState, setInteractiveStateTimeout, setLinkedInteractives, setNavigation, setOnUnload, setSupportedFeatures, showModal, useAccessibility, useAuthoredState, useAutoSetHeight, useCustomMessages, useDecorateContent, useGlobalInteractiveState, useInitMessage, useInteractiveState, useReportItem, writeAttachment };
package/index.js CHANGED
@@ -2286,39 +2286,109 @@ __webpack_require__.r(__webpack_exports__);
2286
2286
  /* harmony import */ var _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url-alphabet/index.js */ "./node_modules/nanoid/url-alphabet/index.js");
2287
2287
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlAlphabet", function() { return _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__["urlAlphabet"]; });
2288
2288
 
2289
+ // This file replaces `index.js` in bundlers like webpack or Rollup,
2290
+ // according to `browser` config in `package.json`.
2291
+
2292
+
2293
+
2294
+ if (true) {
2295
+ // All bundlers will remove this block in the production bundle.
2296
+ if (
2297
+ typeof navigator !== 'undefined' &&
2298
+ navigator.product === 'ReactNative' &&
2299
+ typeof crypto === 'undefined'
2300
+ ) {
2301
+ throw new Error(
2302
+ 'React Native does not have a built-in secure random generator. ' +
2303
+ 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
2304
+ 'For secure IDs, import `react-native-get-random-values` ' +
2305
+ 'before Nano ID.'
2306
+ )
2307
+ }
2308
+ if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
2309
+ throw new Error(
2310
+ 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
2311
+ ' before importing Nano ID to fix IE 11 support'
2312
+ )
2313
+ }
2314
+ if (typeof crypto === 'undefined') {
2315
+ throw new Error(
2316
+ 'Your browser does not have secure random generator. ' +
2317
+ 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
2318
+ )
2319
+ }
2320
+ }
2289
2321
 
2290
2322
  let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
2291
- let customRandom = (alphabet, defaultSize, getRandom) => {
2323
+
2324
+ let customRandom = (alphabet, size, getRandom) => {
2325
+ // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
2326
+ // values closer to the alphabet size. The bitmask calculates the closest
2327
+ // `2^31 - 1` number, which exceeds the alphabet size.
2328
+ // For example, the bitmask for the alphabet size 30 is 31 (00011111).
2329
+ // `Math.clz32` is not used, because it is not available in browsers.
2292
2330
  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
2293
- let step = -~((1.6 * mask * defaultSize) / alphabet.length)
2294
- return (size = defaultSize) => {
2331
+ // Though, the bitmask solution is not perfect since the bytes exceeding
2332
+ // the alphabet size are refused. Therefore, to reliably generate the ID,
2333
+ // the random bytes redundancy has to be satisfied.
2334
+
2335
+ // Note: every hardware random generator call is performance expensive,
2336
+ // because the system call for entropy collection takes a lot of time.
2337
+ // So, to avoid additional system calls, extra bytes are requested in advance.
2338
+
2339
+ // Next, a step determines how many random bytes to generate.
2340
+ // The number of random bytes gets decided upon the ID size, mask,
2341
+ // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
2342
+ // according to benchmarks).
2343
+
2344
+ // `-~f => Math.ceil(f)` if f is a float
2345
+ // `-~i => i + 1` if i is an integer
2346
+ let step = -~((1.6 * mask * size) / alphabet.length)
2347
+
2348
+ return () => {
2295
2349
  let id = ''
2296
2350
  while (true) {
2297
2351
  let bytes = getRandom(step)
2298
- let j = step | 0
2352
+ // A compact alternative for `for (var i = 0; i < step; i++)`.
2353
+ let j = step
2299
2354
  while (j--) {
2355
+ // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
2300
2356
  id += alphabet[bytes[j] & mask] || ''
2301
2357
  if (id.length === size) return id
2302
2358
  }
2303
2359
  }
2304
2360
  }
2305
2361
  }
2306
- let customAlphabet = (alphabet, size = 21) =>
2307
- customRandom(alphabet, size, random)
2308
- let nanoid = (size = 21) =>
2309
- crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
2310
- byte &= 63
2362
+
2363
+ let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
2364
+
2365
+ let nanoid = (size = 21) => {
2366
+ let id = ''
2367
+ let bytes = crypto.getRandomValues(new Uint8Array(size))
2368
+
2369
+ // A compact alternative for `for (var i = 0; i < step; i++)`.
2370
+ while (size--) {
2371
+ // It is incorrect to use bytes exceeding the alphabet size.
2372
+ // The following mask reduces the random byte in the 0-255 value
2373
+ // range to the 0-63 value range. Therefore, adding hacks, such
2374
+ // as empty string fallback or magic numbers, is unneccessary because
2375
+ // the bitmask trims bytes down to the alphabet size.
2376
+ let byte = bytes[size] & 63
2311
2377
  if (byte < 36) {
2378
+ // `0-9a-z`
2312
2379
  id += byte.toString(36)
2313
2380
  } else if (byte < 62) {
2381
+ // `A-Z`
2314
2382
  id += (byte - 26).toString(36).toUpperCase()
2315
- } else if (byte > 62) {
2316
- id += '-'
2317
- } else {
2383
+ } else if (byte < 63) {
2318
2384
  id += '_'
2385
+ } else {
2386
+ id += '-'
2319
2387
  }
2320
- return id
2321
- }, '')
2388
+ }
2389
+ return id
2390
+ }
2391
+
2322
2392
 
2323
2393
 
2324
2394
 
@@ -2334,8 +2404,11 @@ let nanoid = (size = 21) =>
2334
2404
  "use strict";
2335
2405
  __webpack_require__.r(__webpack_exports__);
2336
2406
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlAlphabet", function() { return urlAlphabet; });
2407
+ // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
2408
+ // optimize the gzip compression for this alphabet.
2337
2409
  let urlAlphabet =
2338
- 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
2410
+ 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'
2411
+
2339
2412
 
2340
2413
 
2341
2414
 
@@ -4689,7 +4762,7 @@ var __rest = (this && this.__rest) || function (s, e) {
4689
4762
  return t;
4690
4763
  };
4691
4764
  Object.defineProperty(exports, "__esModule", { value: true });
4692
- exports.createPubSubChannel = exports.sendCustomMessage = exports.setOnUnload = exports.sendReportItemAnswer = exports.getAttachmentUrl = exports.readAttachment = exports.writeAttachment = exports.getLibraryInteractiveList = exports.getInteractiveSnapshot = exports.setLinkedInteractives = exports.getInteractiveList = exports.closeModal = exports.showModal = exports.removeLinkedInteractiveStateListener = exports.addLinkedInteractiveStateListener = exports.removeGlobalInteractiveStateListener = exports.addGlobalInteractiveStateListener = exports.removeAuthoredStateListener = exports.addAuthoredStateListener = exports.removeInteractiveStateListener = exports.addInteractiveStateListener = exports.log = exports.getFirebaseJwt = exports.getAuthInfo = exports.setNavigation = exports.setHint = exports.postDecoratedContentEvent = exports.setHeight = exports.setSupportedFeatures = exports.notifyReportItemClientReady = exports.removeGetReportItemAnswerListener = exports.addGetReportItemAnswerListener = exports.removeDecorateContentListener = exports.addDecorateContentListener = exports.removeCustomMessageListener = exports.addCustomMessageListener = exports.setGlobalInteractiveState = exports.getGlobalInteractiveState = exports.setAuthoredState = exports.getAuthoredState = exports.flushStateUpdates = exports.setInteractiveState = exports.setInteractiveStateTimeout = exports.getInteractiveState = exports.getMode = exports.getInitInteractiveMessage = exports.PubSubChannel = void 0;
4765
+ exports.setDirtyState = exports.createPubSubChannel = exports.sendCustomMessage = exports.setOnUnload = exports.sendReportItemAnswer = exports.getAttachmentUrl = exports.readAttachment = exports.writeAttachment = exports.getLibraryInteractiveList = exports.getInteractiveSnapshot = exports.setLinkedInteractives = exports.getInteractiveList = exports.closeModal = exports.showModal = exports.removeLinkedInteractiveStateListener = exports.addLinkedInteractiveStateListener = exports.removeGlobalInteractiveStateListener = exports.addGlobalInteractiveStateListener = exports.removeAuthoredStateListener = exports.addAuthoredStateListener = exports.removeInteractiveStateListener = exports.addInteractiveStateListener = exports.log = exports.getFirebaseJwt = exports.getAuthInfo = exports.setNavigation = exports.setHint = exports.postDecoratedContentEvent = exports.setHeight = exports.setSupportedFeatures = exports.notifyReportItemClientReady = exports.removeGetReportItemAnswerListener = exports.addGetReportItemAnswerListener = exports.removeDecorateContentListener = exports.addDecorateContentListener = exports.removeCustomMessageListener = exports.addCustomMessageListener = exports.setGlobalInteractiveState = exports.getGlobalInteractiveState = exports.setAuthoredState = exports.getAuthoredState = exports.flushStateUpdates = exports.setInteractiveState = exports.setInteractiveStateTimeout = exports.getInteractiveState = exports.getMode = exports.getInitInteractiveMessage = exports.PubSubChannel = void 0;
4693
4766
  var client_1 = __webpack_require__(/*! ./client */ "./src/interactive-api-client/client.ts");
4694
4767
  var uuid_1 = __webpack_require__(/*! uuid */ "./node_modules/uuid/dist/esm-browser/index.js");
4695
4768
  var pubsub_1 = __webpack_require__(/*! ./pubsub */ "./src/interactive-api-client/pubsub.ts");
@@ -5203,6 +5276,11 @@ var createPubSubChannel = function (channelId, channelInfo) {
5203
5276
  return (0, client_1.getClient)().createPubSubChannel(channelId, channelInfo);
5204
5277
  };
5205
5278
  exports.createPubSubChannel = createPubSubChannel;
5279
+ var setDirtyState = function (isDirty) {
5280
+ var request = { isDirty: isDirty };
5281
+ (0, client_1.getClient)().post("setDirtyState", request);
5282
+ };
5283
+ exports.setDirtyState = setDirtyState;
5206
5284
 
5207
5285
 
5208
5286
  /***/ }),
@@ -5904,7 +5982,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
5904
5982
  /*! exports provided: name, version, description, main, types, repository, author, license, bugs, homepage, dependencies, peerDependencies, default */
5905
5983
  /***/ (function(module) {
5906
5984
 
5907
- module.exports = JSON.parse("{\"name\":\"@concord-consortium/lara-interactive-api\",\"version\":\"1.11.0-pre.0\",\"description\":\"LARA Interactive API client and types\",\"main\":\"./index.js\",\"types\":\"./index-bundle.d.ts\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/concord-consortium/lara.git\"},\"author\":\"Concord Consortium\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/concord-consortium/lara/issues\"},\"homepage\":\"https://github.com/concord-consortium/lara/tree/master/lara-typescript/src/interactive-api-client#readme\",\"dependencies\":{\"iframe-phone\":\"^1.3.1\",\"nanoid\":\"^3.3.7\"},\"peerDependencies\":{\"react\":\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}");
5985
+ module.exports = JSON.parse("{\"name\":\"@concord-consortium/lara-interactive-api\",\"version\":\"1.12.0-pre.1\",\"description\":\"LARA Interactive API client and types\",\"main\":\"./index.js\",\"types\":\"./index-bundle.d.ts\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/concord-consortium/lara.git\"},\"author\":\"Concord Consortium\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/concord-consortium/lara/issues\"},\"homepage\":\"https://github.com/concord-consortium/lara/tree/master/lara-typescript/src/interactive-api-client#readme\",\"dependencies\":{\"iframe-phone\":\"^1.3.1\",\"nanoid\":\"^3.3.7\"},\"peerDependencies\":{\"react\":\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}");
5908
5986
 
5909
5987
  /***/ }),
5910
5988
 
@@ -5994,7 +6072,7 @@ var PubSubChannel = /** @class */ (function () {
5994
6072
  if (content.channelId === _this.channelId) {
5995
6073
  _this.subscriptions.forEach(function (subscription) {
5996
6074
  if (subscription.channelInfoHandler) {
5997
- subscription.channelInfoHandler(content.channelInfo, content.publisherId);
6075
+ subscription.channelInfoHandler(content.channelInfo);
5998
6076
  }
5999
6077
  });
6000
6078
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concord-consortium/lara-interactive-api",
3
- "version": "1.11.0-pre.0",
3
+ "version": "1.12.0-pre.1",
4
4
  "description": "LARA Interactive API client and types",
5
5
  "main": "./index.js",
6
6
  "types": "./index-bundle.d.ts",