@inappstory/react-sdk 1.9.5 → 1.9.6

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.
@@ -20,8 +20,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_mobx_react_lite_9dacf130__ from "mobx-reac
20
20
  import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7dac9eee__ from "react-dom";
21
21
  import * as __WEBPACK_EXTERNAL_MODULE_lit__ from "lit";
22
22
  import * as __WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__ from "lit/decorators.js";
23
- import * as __WEBPACK_EXTERNAL_MODULE_lit_static_html_js_21a342d6__ from "lit/static-html.js";
24
23
  import * as __WEBPACK_EXTERNAL_MODULE_lit_directives_style_map_js_4fbc7c29__ from "lit/directives/style-map.js";
24
+ import * as __WEBPACK_EXTERNAL_MODULE_lit_static_html_js_21a342d6__ from "lit/static-html.js";
25
25
  import * as __WEBPACK_EXTERNAL_MODULE_lit_directives_class_map_js_2f88e643__ from "lit/directives/class-map.js";
26
26
  import * as __WEBPACK_EXTERNAL_MODULE_lit_directives_unsafe_html_js_56553e3e__ from "lit/directives/unsafe-html.js";
27
27
  /******/ var __webpack_modules__ = ({
@@ -3688,6 +3688,12 @@ class IamAppearanceCommonOptions {
3688
3688
  writable: true,
3689
3689
  value: {}
3690
3690
  });
3691
+ Object.defineProperty(this, "zIndex", {
3692
+ enumerable: true,
3693
+ configurable: true,
3694
+ writable: true,
3695
+ value: void 0
3696
+ });
3691
3697
  this.background = this.mapBackgroundDtoToModel(optionsDto.background);
3692
3698
  this.cardAppearance = (_a = optionsDto.card_appearance) !== null && _a !== void 0 ? _a : {};
3693
3699
  }
@@ -10543,7 +10549,7 @@ class GameClientConfig {
10543
10549
  value: void 0
10544
10550
  });
10545
10551
  const storyManagerConfig = this.storyManager.config;
10546
- const sdkVersion = "1.9.5";
10552
+ const sdkVersion = "1.9.6";
10547
10553
  const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
10548
10554
  const session = this.storyManager.rootStore.sessionStore.session;
10549
10555
  this.sessionId = session.id;
@@ -17167,7 +17173,7 @@ let IamReaderViewModel = (() => {
17167
17173
  this.throwIfAborted(options.signal);
17168
17174
  const message = await this.iamDisplayService.getMessageById(messageId, options);
17169
17175
  this.throwIfAborted(options.signal);
17170
- await this.open(message);
17176
+ await this.open(message, options.appearance);
17171
17177
  return message;
17172
17178
  }
17173
17179
  async showMessageByEvent(eventName, options = {}) {
@@ -17177,7 +17183,7 @@ let IamReaderViewModel = (() => {
17177
17183
  this.throwIfAborted(options.signal);
17178
17184
  const message = await this.iamDisplayService.getMessageByEvent(eventName, options);
17179
17185
  this.throwIfAborted(options.signal);
17180
- await this.open(message);
17186
+ await this.open(message, options.appearance);
17181
17187
  return message;
17182
17188
  }
17183
17189
  async forceClose() {
@@ -17195,8 +17201,11 @@ let IamReaderViewModel = (() => {
17195
17201
  return;
17196
17202
  this.forceClose();
17197
17203
  }
17198
- async open(message) {
17204
+ async open(message, appearance) {
17199
17205
  message.updatePlaceholders(this.storyManager.rootStore.placeholderStore.placeholders);
17206
+ if ((appearance === null || appearance === void 0 ? void 0 : appearance.zIndex) !== undefined) {
17207
+ message.appearanceOptions.zIndex = appearance.zIndex;
17208
+ }
17200
17209
  this.touchController.init(document.body);
17201
17210
  this.setActiveMessage(message);
17202
17211
  this.visibilityObserver.subscribe();
@@ -20895,7 +20904,7 @@ class UgcEditorStore {
20895
20904
  const session = await this.storyManager.rootStore.sessionStore.open();
20896
20905
  const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
20897
20906
  const storyManagerConfig = this.storyManager.config;
20898
- const sdkVersion = "1.9.5";
20907
+ const sdkVersion = "1.9.6";
20899
20908
  this._config = {
20900
20909
  sessionId: session.id,
20901
20910
  apiKey: storyManagerConfig.apiKey,
@@ -21366,11 +21375,11 @@ class StoryManager extends TypedEventEmitter {
21366
21375
  return deviceDescriptor.deviceId;
21367
21376
  }
21368
21377
  get sdkVersionName() {
21369
- const sdkVersionName = "1.9.5";
21378
+ const sdkVersionName = "1.9.6";
21370
21379
  return sdkVersionName || "0.0.0";
21371
21380
  }
21372
21381
  get sdkVersionCode() {
21373
- const sdkVersionCode = 10905;
21382
+ const sdkVersionCode = 10906;
21374
21383
  return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
21375
21384
  }
21376
21385
  get lang() {
@@ -21434,7 +21443,7 @@ class StoryManager extends TypedEventEmitter {
21434
21443
  this.rootStore.storyManagerConfigStore.setConfig(configDto);
21435
21444
  }
21436
21445
  setUserAgent(userAgent) {
21437
- const sdkVersionCode = 10905;
21446
+ const sdkVersionCode = 10906;
21438
21447
  const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
21439
21448
  // According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
21440
21449
  this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
@@ -26993,6 +27002,12 @@ var decorators_js_x = (y) => {
26993
27002
  }
26994
27003
  var decorators_js_y = (x) => (() => (x))
26995
27004
  const decorators_js_namespaceObject = decorators_js_x({ ["property"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.property), ["query"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.query), ["state"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_decorators_js_226d44c5__.state) });
27005
+ ;// CONCATENATED MODULE: external "lit/directives/style-map.js"
27006
+ var style_map_js_x = (y) => {
27007
+ var x = {}; __webpack_require__.d(x, y); return x
27008
+ }
27009
+ var style_map_js_y = (x) => (() => (x))
27010
+ const style_map_js_namespaceObject = style_map_js_x({ ["styleMap"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_directives_style_map_js_4fbc7c29__.styleMap) });
26996
27011
  ;// CONCATENATED MODULE: ./src/InAppMessaging/controllers/viewportController.ts
26997
27012
  class ViewportController {
26998
27013
  constructor(host) {
@@ -27056,12 +27071,6 @@ const messageViewsByType = {
27056
27071
 
27057
27072
  const bottomSheetStyles = (0,external_lit_namespaceObject.css) `.bottom-sheet{position:fixed;inset:0;left:0;bottom:0;right:0;z-index:999}.bottom-sheet__backdrop{position:fixed;inset:0;left:0;bottom:0;right:0;z-index:-1;background-color:rgba(0,0,0,var(--backdrop-opacity,.5));opacity:0;transition:opacity 225ms cubic-bezier(.4,0,.2,1);pointer-events:none}.bottom-sheet__backdrop--visible{animation:fade-in .3s forwards}.bottom-sheet__backdrop--hidden{animation:fade-out .3s forwards}.bottom-sheet__box{position:absolute;left:0;right:0;bottom:0;will-change:transform;border-top-left-radius:var(--slide-border-top-left-radius,0);border-top-right-radius:var(--slide-border-top-right-radius,0);background-color:transparent;transition:opacity .3s ease,transform .3s ease;transform:translate3d(0,120%,0);pointer-events:all;overflow:hidden}.bottom-sheet__box-wrapper{position:absolute;inset:0;pointer-events:none}.bottom-sheet__box-wrapper.bottom-sheet__box-wrapper--desktop-mode{position:absolute;bottom:0;left:50%;transform:translate3d(-50%,0,0)}.bottom-sheet__box.bottom-sheet__box--open{opacity:1;transform:translate3d(0,0,0)}.bottom-sheet__backdrop.bottom-sheet__backdrop--open{opacity:1;pointer-events:all}.bottom-sheet__header .grab-handler-area{position:absolute;left:50%;transform:translate3d(-50%,0,0);padding:0 32px 16px;z-index:10000;cursor:grab;user-select:none}.bottom-sheet__header .grab-handler{margin-top:8px;width:32px;height:4px;background-color:#00000080;border-radius:var(--grab-handler-border-radius)}`;
27058
27073
 
27059
- ;// CONCATENATED MODULE: external "lit/directives/style-map.js"
27060
- var style_map_js_x = (y) => {
27061
- var x = {}; __webpack_require__.d(x, y); return x
27062
- }
27063
- var style_map_js_y = (x) => (() => (x))
27064
- const style_map_js_namespaceObject = style_map_js_x({ ["styleMap"]: () => (__WEBPACK_EXTERNAL_MODULE_lit_directives_style_map_js_4fbc7c29__.styleMap) });
27065
27074
  ;// CONCATENATED MODULE: external "lit/directives/class-map.js"
27066
27075
  var class_map_js_x = (y) => {
27067
27076
  var x = {}; __webpack_require__.d(x, y); return x
@@ -27338,6 +27347,7 @@ let BottomSheet = (() => {
27338
27347
  }, 50);
27339
27348
  }
27340
27349
  render() {
27350
+ var _a;
27341
27351
  if (this.isClosed)
27342
27352
  return external_lit_namespaceObject.nothing;
27343
27353
  const bottomSheetBoxStyle = {
@@ -27357,7 +27367,10 @@ let BottomSheet = (() => {
27357
27367
  height: `${this.appearanceOptions.closeButton.height}px`,
27358
27368
  marginTop: `${this.appearanceOptions.closeButton.marginTop}px`
27359
27369
  };
27360
- return (0,external_lit_namespaceObject.html) `<div id="bottom-sheet" class="bottom-sheet"><div id="bottom-sheet__backdrop" style="${(0,style_map_js_namespaceObject.styleMap)({
27370
+ const bottomSheetStyle = {
27371
+ zIndex: (_a = this.appearanceOptions.zIndex) !== null && _a !== void 0 ? _a : 999
27372
+ };
27373
+ return (0,external_lit_namespaceObject.html) `<div id="bottom-sheet" class="bottom-sheet" style="${(0,style_map_js_namespaceObject.styleMap)(bottomSheetStyle)}"><div id="bottom-sheet__backdrop" style="${(0,style_map_js_namespaceObject.styleMap)({
27361
27374
  "--backdrop-opacity": this.appearanceOptions.backdrop.opacity
27362
27375
  })}" @click="${this.close}" class="bottom-sheet__backdrop ${(0,class_map_js_namespaceObject.classMap)({
27363
27376
  "bottom-sheet__backdrop--open": this.isVisible
@@ -27739,6 +27752,7 @@ let Modal_Modal = (() => {
27739
27752
  return "fadeOut";
27740
27753
  }
27741
27754
  render() {
27755
+ var _a;
27742
27756
  const borderRadius = this.fullscreen ? 0 : this.appearanceOptions.borderRadius;
27743
27757
  const modalBoxContentStyle = {
27744
27758
  background: this.appearanceOptions.background,
@@ -27754,7 +27768,10 @@ let Modal_Modal = (() => {
27754
27768
  ? this.getEnterModalAnimationCSSClass(animationType)
27755
27769
  : this.getOutModalAnimationCSSClass(animationType);
27756
27770
  const backdropAnimationClass = this.getBackdropAnimationCSSClass(this.isVisible);
27757
- return (0,external_lit_namespaceObject.html) `<div class="modal"><div id="modal__backdrop" style="${(0,style_map_js_namespaceObject.styleMap)({
27771
+ const modalStyle = {
27772
+ zIndex: (_a = this.appearanceOptions.zIndex) !== null && _a !== void 0 ? _a : 1000
27773
+ };
27774
+ return (0,external_lit_namespaceObject.html) `<div class="modal" style="${(0,style_map_js_namespaceObject.styleMap)(modalStyle)}"><div id="modal__backdrop" style="${(0,style_map_js_namespaceObject.styleMap)({
27758
27775
  "--backdrop-opacity": this.appearanceOptions instanceof IamModalAppearanceOptions
27759
27776
  ? this.appearanceOptions.backdrop.opacity
27760
27777
  : undefined
@@ -28585,6 +28602,7 @@ var InAppMessagingReader_classPrivateFieldSet = (undefined && undefined.__classP
28585
28602
 
28586
28603
 
28587
28604
 
28605
+
28588
28606
  let InAppMessagingReader = (() => {
28589
28607
  var _InAppMessagingReader_options_accessor_storage, _InAppMessagingReader_desktopMode_accessor_storage, _InAppMessagingReader_dir_accessor_storage, _InAppMessagingReader_viewModel_accessor_storage, _InAppMessagingReader_open_accessor_storage;
28590
28608
  let _classDecorators = [safeCustomElement("iam-reader"), mobxObserver];
@@ -28695,7 +28713,7 @@ let InAppMessagingReader = (() => {
28695
28713
  }
28696
28714
  }
28697
28715
  render() {
28698
- var _a, _b;
28716
+ var _a, _b, _c;
28699
28717
  const message = (_a = this.viewModel) === null || _a === void 0 ? void 0 : _a.activeMessage;
28700
28718
  const touchController = (_b = this.viewModel) === null || _b === void 0 ? void 0 : _b.touchController;
28701
28719
  if (!(message === null || message === void 0 ? void 0 : message.context))
@@ -28703,7 +28721,10 @@ let InAppMessagingReader = (() => {
28703
28721
  const type = message.type;
28704
28722
  const messageGeometry = this.createMessageGeometry(type, message.appearanceOptions);
28705
28723
  const slideGeometry = this.createSlideGeometry(messageGeometry);
28706
- return (0,external_lit_namespaceObject.html) `<message-view-factory type="${type}" @closed="${this.handleClosed}" .disableClose="${message.disableClose}" .appearanceOptions="${message.appearanceOptions}" .geometry="${messageGeometry}" .open="${this.open}" .dir="${this.dir}" .desktopMode="${this.desktopMode}" .touchController="${touchController}"><message-slide .message="${message}" .styleContext="${message.context.style}" .geometry="${slideGeometry}"></message-slide><iam-loader .background="${"transparent"}" .needShowErrorScreen="${message.needShowErrorScreen}" .needShowLoaderScreen="${message.needShowLoaderScreen}" @reload="${this.handleReloadMessage}"></iam-loader></message-view-factory>`;
28724
+ const containerStyle = {
28725
+ zIndex: (_c = message.appearanceOptions.zIndex) !== null && _c !== void 0 ? _c : 1000
28726
+ };
28727
+ return (0,external_lit_namespaceObject.html) `<div class="iam-container" style="${(0,style_map_js_namespaceObject.styleMap)(containerStyle)}"><message-view-factory type="${type}" @closed="${this.handleClosed}" .disableClose="${message.disableClose}" .appearanceOptions="${message.appearanceOptions}" .geometry="${messageGeometry}" .open="${this.open}" .dir="${this.dir}" .desktopMode="${this.desktopMode}" .touchController="${touchController}"><message-slide .message="${message}" .styleContext="${message.context.style}" .geometry="${slideGeometry}"></message-slide><iam-loader .background="${"transparent"}" .needShowErrorScreen="${message.needShowErrorScreen}" .needShowLoaderScreen="${message.needShowLoaderScreen}" @reload="${this.handleReloadMessage}"></iam-loader></message-view-factory></div>`;
28707
28728
  }
28708
28729
  };
28709
28730
  _InAppMessagingReader_options_accessor_storage = new WeakMap();