@inappstory/react-sdk 1.7.6 → 1.7.7

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.
@@ -10479,7 +10479,7 @@ class GameClientConfig {
10479
10479
  value: void 0
10480
10480
  });
10481
10481
  const storyManagerConfig = this.storyManager.config;
10482
- const sdkVersion = "1.7.6";
10482
+ const sdkVersion = "1.7.7";
10483
10483
  const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
10484
10484
  const session = this.storyManager.rootStore.sessionStore.session;
10485
10485
  this.sessionId = session.id;
@@ -15575,8 +15575,8 @@ let IamMessage = (() => {
15575
15575
  return Math.trunc(this.timeSinceLastShow / 1000) <= this._frequencyLimit;
15576
15576
  }
15577
15577
  get withinDisplayTimeRange() {
15578
- return ((!this._displayFrom || Date.now() >= this._displayFrom) &&
15579
- (!this._displayTo || Date.now() <= this._displayTo));
15578
+ const now = Math.trunc(Date.now() / 1000);
15579
+ return (!this._displayFrom || now >= this._displayFrom) && (!this._displayTo || now <= this._displayTo);
15580
15580
  }
15581
15581
  get isOnceOpened() {
15582
15582
  return this._isOnceOpened;
@@ -17000,7 +17000,7 @@ let IamReaderViewModel = (() => {
17000
17000
  });
17001
17001
  return messages;
17002
17002
  }
17003
- async showMessageById(messageId, options) {
17003
+ async showMessageById(messageId, options = {}) {
17004
17004
  const config = await this.storyManager.waitForConfig();
17005
17005
  if (config.anonymous)
17006
17006
  throw new IamMessageAnonymousOpen(messageId);
@@ -17009,7 +17009,7 @@ let IamReaderViewModel = (() => {
17009
17009
  await this.open(message);
17010
17010
  return message;
17011
17011
  }
17012
- async showMessageByEvent(eventName, options) {
17012
+ async showMessageByEvent(eventName, options = {}) {
17013
17013
  const config = await this.storyManager.waitForConfig();
17014
17014
  if (config.anonymous)
17015
17015
  throw new IamMessageAnonymousOpen(eventName);
@@ -20284,7 +20284,7 @@ class UgcEditorStore {
20284
20284
  const session = await this.storyManager.rootStore.sessionStore.open();
20285
20285
  const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
20286
20286
  const storyManagerConfig = this.storyManager.config;
20287
- const sdkVersion = "1.7.6";
20287
+ const sdkVersion = "1.7.7";
20288
20288
  this._config = {
20289
20289
  sessionId: session.id,
20290
20290
  apiKey: storyManagerConfig.apiKey,
@@ -20716,11 +20716,11 @@ class StoryManager extends TypedEventEmitter {
20716
20716
  return this._userAgent;
20717
20717
  }
20718
20718
  get sdkVersionName() {
20719
- const sdkVersionName = "1.7.6";
20719
+ const sdkVersionName = "1.7.7";
20720
20720
  return sdkVersionName || "0.0.0";
20721
20721
  }
20722
20722
  get sdkVersionCode() {
20723
- const sdkVersionCode = 10706;
20723
+ const sdkVersionCode = 10707;
20724
20724
  return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
20725
20725
  }
20726
20726
  get lang() {
@@ -20777,7 +20777,7 @@ class StoryManager extends TypedEventEmitter {
20777
20777
  this.rootStore.storyManagerConfigStore.setConfig(configDto);
20778
20778
  }
20779
20779
  setUserAgent(userAgent) {
20780
- const sdkVersionCode = 10706;
20780
+ const sdkVersionCode = 10707;
20781
20781
  const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
20782
20782
  // According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
20783
20783
  this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;