@inappstory/react-sdk 1.9.0 → 1.9.2
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/dist/index.esm.mjs +77 -44
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/types/storyManager.d.ts +6 -0
- package/package.json +2 -2
package/dist/index.esm.mjs
CHANGED
|
@@ -8649,11 +8649,13 @@ let StoryPauseManager = (() => {
|
|
|
8649
8649
|
}
|
|
8650
8650
|
pauseSystem(source) {
|
|
8651
8651
|
this._systemPause.pause(source);
|
|
8652
|
+
this.ctx.notifyPauseStateChange();
|
|
8652
8653
|
}
|
|
8653
8654
|
resumeSystem(source) {
|
|
8654
8655
|
if (!this._systemPause.isPaused)
|
|
8655
8656
|
return;
|
|
8656
8657
|
this._systemPause.resume(source);
|
|
8658
|
+
this.ctx.notifyPauseStateChange();
|
|
8657
8659
|
}
|
|
8658
8660
|
resumeAll() {
|
|
8659
8661
|
if (this.isPaused) {
|
|
@@ -10155,9 +10157,9 @@ let StoryViewModel = (() => {
|
|
|
10155
10157
|
this.isStarted = false;
|
|
10156
10158
|
this.slideApiHandlers.clearNarrativeSessionDataCache();
|
|
10157
10159
|
this.resumeAll();
|
|
10158
|
-
await this.activeSlide.stop({ prepareForRestart: 1 /* ON_SLIDE_STOP_PREPARE_FOR_RESTART.PREPARE */ });
|
|
10159
10160
|
document.removeEventListener("visibilitychange", this.handleVisibilityChange);
|
|
10160
10161
|
document.removeEventListener("keydown", this.handleKeydown);
|
|
10162
|
+
await this.activeSlide.stop({ prepareForRestart: 1 /* ON_SLIDE_STOP_PREPARE_FOR_RESTART.PREPARE */ });
|
|
10161
10163
|
});
|
|
10162
10164
|
}
|
|
10163
10165
|
canGoNext() {
|
|
@@ -10273,8 +10275,8 @@ let StoryViewModel = (() => {
|
|
|
10273
10275
|
this.resumeAll();
|
|
10274
10276
|
if (!((_b = this.storyManager.config.cache) === null || _b === void 0 ? void 0 : _b.prefetch))
|
|
10275
10277
|
await this.preloadActiveSlide(ACTIVE_SLIDE_PRELOAD_PRIORITY);
|
|
10276
|
-
await activeSlide.init();
|
|
10277
10278
|
await (lastSlide === null || lastSlide === void 0 ? void 0 : lastSlide.stop({ prepareForRestart: 2 /* ON_SLIDE_STOP_PREPARE_FOR_RESTART.NOT_PREPARE */ }));
|
|
10279
|
+
await activeSlide.init();
|
|
10278
10280
|
await activeSlide.start();
|
|
10279
10281
|
this._activeSlideStartTime = Date.now();
|
|
10280
10282
|
}
|
|
@@ -10471,7 +10473,7 @@ class GameClientConfig {
|
|
|
10471
10473
|
value: void 0
|
|
10472
10474
|
});
|
|
10473
10475
|
const storyManagerConfig = this.storyManager.config;
|
|
10474
|
-
const sdkVersion = "1.9.
|
|
10476
|
+
const sdkVersion = "1.9.2";
|
|
10475
10477
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
10476
10478
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
10477
10479
|
this.sessionId = session.id;
|
|
@@ -21036,7 +21038,7 @@ class UgcEditorStore {
|
|
|
21036
21038
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
21037
21039
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
21038
21040
|
const storyManagerConfig = this.storyManager.config;
|
|
21039
|
-
const sdkVersion = "1.9.
|
|
21041
|
+
const sdkVersion = "1.9.2";
|
|
21040
21042
|
this._config = {
|
|
21041
21043
|
sessionId: session.id,
|
|
21042
21044
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -21503,12 +21505,15 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21503
21505
|
get userAgent() {
|
|
21504
21506
|
return this._userAgent;
|
|
21505
21507
|
}
|
|
21508
|
+
get deviceId() {
|
|
21509
|
+
return deviceDescriptor.deviceId;
|
|
21510
|
+
}
|
|
21506
21511
|
get sdkVersionName() {
|
|
21507
|
-
const sdkVersionName = "1.9.
|
|
21512
|
+
const sdkVersionName = "1.9.2";
|
|
21508
21513
|
return sdkVersionName || "0.0.0";
|
|
21509
21514
|
}
|
|
21510
21515
|
get sdkVersionCode() {
|
|
21511
|
-
const sdkVersionCode =
|
|
21516
|
+
const sdkVersionCode = 10902;
|
|
21512
21517
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21513
21518
|
}
|
|
21514
21519
|
get lang() {
|
|
@@ -21572,7 +21577,7 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21572
21577
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
21573
21578
|
}
|
|
21574
21579
|
setUserAgent(userAgent) {
|
|
21575
|
-
const sdkVersionCode =
|
|
21580
|
+
const sdkVersionCode = 10902;
|
|
21576
21581
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21577
21582
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
21578
21583
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|
|
@@ -22692,6 +22697,20 @@ var socialSharePanelBody_module_update = injectStylesIntoStyleTag_default()(soci
|
|
|
22692
22697
|
|
|
22693
22698
|
|
|
22694
22699
|
/* harmony default export */ const SocialSharePanelBody_socialSharePanelBody_module = (socialSharePanelBody_module/* default */.A.locals || {});
|
|
22700
|
+
;// CONCATENATED MODULE: ./src/UI/SharePanel/SocialSharePanelBody/Favicon.tsx
|
|
22701
|
+
|
|
22702
|
+
|
|
22703
|
+
|
|
22704
|
+
const fallbackSvg = ((0,jsx_runtime_namespaceObject.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "60", height: "60", viewBox: "0 0 24 24", stroke: "white", fill: "black", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round", children: [(0,jsx_runtime_namespaceObject.jsx)("circle", { cx: "12", cy: "12", r: "10" }), (0,jsx_runtime_namespaceObject.jsx)("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" }), (0,jsx_runtime_namespaceObject.jsx)("path", { d: "M4 8h16" }), (0,jsx_runtime_namespaceObject.jsx)("path", { d: "M4 16h16" })] }));
|
|
22705
|
+
const faviconApiUrl = "https://favicon.inappstory.ru";
|
|
22706
|
+
const Favicon = (props) => {
|
|
22707
|
+
var _a, _b;
|
|
22708
|
+
const [failed, setFailed] = (0,external_react_namespaceObject.useState)(false);
|
|
22709
|
+
const favicon = (_a = props.sharePanelOptions.title) === null || _a === void 0 ? void 0 : _a.favicon;
|
|
22710
|
+
return (props.shareDomain &&
|
|
22711
|
+
(favicon === null || favicon === void 0 ? void 0 : favicon.display) && ((0,jsx_runtime_namespaceObject.jsx)("div", { className: SharePanel_sharePanel_module["share-url-favicon"], style: { background: favicon.background }, children: !failed ? ((0,jsx_runtime_namespaceObject.jsx)("img", { src: `${(_b = props.faviconApiUrl) !== null && _b !== void 0 ? _b : faviconApiUrl}?sz=64&domain_url=${props.shareDomain}`, onError: () => setFailed(true), alt: "favicon" })) : (fallbackSvg) })));
|
|
22712
|
+
};
|
|
22713
|
+
|
|
22695
22714
|
;// CONCATENATED MODULE: ./src/UI/SharePanel/SocialSharePanelBody/SocialSharePanelBody.tsx
|
|
22696
22715
|
var SocialSharePanelBody_rest = (undefined && undefined.__rest) || function (s, e) {
|
|
22697
22716
|
var t = {};
|
|
@@ -22708,9 +22727,9 @@ var SocialSharePanelBody_rest = (undefined && undefined.__rest) || function (s,
|
|
|
22708
22727
|
|
|
22709
22728
|
|
|
22710
22729
|
|
|
22711
|
-
|
|
22730
|
+
|
|
22712
22731
|
const SocialSharePanelBody = (_a) => {
|
|
22713
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
22732
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22714
22733
|
var { shareLink, sharePanelOptions, onShareComplete } = _a, props = SocialSharePanelBody_rest(_a, ["shareLink", "sharePanelOptions", "onShareComplete"]);
|
|
22715
22734
|
const getShareUrlDomain = () => {
|
|
22716
22735
|
try {
|
|
@@ -22756,18 +22775,17 @@ const SocialSharePanelBody = (_a) => {
|
|
|
22756
22775
|
text: getEncodedShareText()
|
|
22757
22776
|
});
|
|
22758
22777
|
};
|
|
22759
|
-
const favicon = (_b = sharePanelOptions.title) === null || _b === void 0 ? void 0 : _b.favicon;
|
|
22760
22778
|
const textStyles = sharePanelOptions.text;
|
|
22761
|
-
return ((0,jsx_runtime_namespaceObject.jsxs)("div", { className: SharePanel_sharePanel_module["share-panel__body"], children: [(0,jsx_runtime_namespaceObject.jsxs)("div", { className: `${SharePanel_sharePanel_module["share-panel-row"]} ${SharePanel_sharePanel_module["title-row"]}`, children: [
|
|
22779
|
+
return ((0,jsx_runtime_namespaceObject.jsxs)("div", { className: SharePanel_sharePanel_module["share-panel__body"], children: [(0,jsx_runtime_namespaceObject.jsxs)("div", { className: `${SharePanel_sharePanel_module["share-panel-row"]} ${SharePanel_sharePanel_module["title-row"]}`, children: [(0,jsx_runtime_namespaceObject.jsx)(Favicon, { shareDomain: getShareUrlDomain(), sharePanelOptions: sharePanelOptions, faviconApiUrl: props.faviconApiUrl }), (0,jsx_runtime_namespaceObject.jsx)("span", { className: SharePanel_sharePanel_module["title"], dir: props.dir, style: textStyles, children: (_c = (_b = sharePanelOptions.title) === null || _b === void 0 ? void 0 : _b.getValue) === null || _c === void 0 ? void 0 : _c.call(_b, { url: shareLink, text: getEncodedShareText() }) })] }), (0,jsx_runtime_namespaceObject.jsx)("div", { className: SharePanel_sharePanel_module["share-panel-separator"], style: { background: (_d = sharePanelOptions.divider) === null || _d === void 0 ? void 0 : _d.background } }), (0,jsx_runtime_namespaceObject.jsx)("div", { className: `${SharePanel_sharePanel_module["share-panel-row"]} ${SocialSharePanelBody_socialSharePanelBody_module["social-list"]}`, children: (_e = sharePanelOptions.targets) === null || _e === void 0 ? void 0 : _e.map((target, index) => {
|
|
22762
22780
|
var _a, _b, _c;
|
|
22763
22781
|
const socialTargetParams = (_a = sharePanelOptions.targetParams) === null || _a === void 0 ? void 0 : _a[target];
|
|
22764
22782
|
const iconSvg = (_c = (_b = socialTargetParams === null || socialTargetParams === void 0 ? void 0 : socialTargetParams.icon) === null || _b === void 0 ? void 0 : _b.svgSrc.baseState) !== null && _c !== void 0 ? _c : "<svg></svg>";
|
|
22765
22783
|
return ((0,jsx_runtime_namespaceObject.jsx)("div", { className: SocialSharePanelBody_socialSharePanelBody_module["social-list__item"], children: (0,jsx_runtime_namespaceObject.jsxs)("a", { href: getUrlByTarget(target), onClick: () => openWindow(getUrlByTarget(target), "newwindow", "width=650,height=570"), target: "_blank", rel: "noopener noreferrer", className: `${SharePanel_sharePanel_module["share-item"]} ${SocialSharePanelBody_socialSharePanelBody_module["share-item"]}`, children: [(0,jsx_runtime_namespaceObject.jsx)("div", { dangerouslySetInnerHTML: {
|
|
22766
22784
|
__html: iconSvg
|
|
22767
22785
|
} }), (0,jsx_runtime_namespaceObject.jsx)("span", { className: SharePanel_sharePanel_module["share-item-title"], style: textStyles, children: socialTargetParams === null || socialTargetParams === void 0 ? void 0 : socialTargetParams.label })] }) }, index));
|
|
22768
|
-
}) }), (0,jsx_runtime_namespaceObject.jsx)("div", { className: SharePanel_sharePanel_module["share-panel-separator"], style: { background: (
|
|
22769
|
-
__html: (
|
|
22770
|
-
} }), (0,jsx_runtime_namespaceObject.jsx)("span", { className: SharePanel_sharePanel_module["share-item-title"], style: textStyles, children: (
|
|
22786
|
+
}) }), (0,jsx_runtime_namespaceObject.jsx)("div", { className: SharePanel_sharePanel_module["share-panel-separator"], style: { background: (_f = sharePanelOptions.divider) === null || _f === void 0 ? void 0 : _f.background } }), (0,jsx_runtime_namespaceObject.jsx)("div", { className: SharePanel_sharePanel_module["share-panel-row"], children: (0,jsx_runtime_namespaceObject.jsxs)("a", { className: `${SharePanel_sharePanel_module["share-item"]} ${SocialSharePanelBody_socialSharePanelBody_module["share-item"]}`, onClick: onCopyClick, children: [(0,jsx_runtime_namespaceObject.jsx)("div", { dangerouslySetInnerHTML: {
|
|
22787
|
+
__html: (_j = (_h = (_g = sharePanelOptions.copyButton) === null || _g === void 0 ? void 0 : _g.svgSrc) === null || _h === void 0 ? void 0 : _h.baseState) !== null && _j !== void 0 ? _j : ""
|
|
22788
|
+
} }), (0,jsx_runtime_namespaceObject.jsx)("span", { className: SharePanel_sharePanel_module["share-item-title"], style: textStyles, children: (_k = sharePanelOptions.copyButton) === null || _k === void 0 ? void 0 : _k.label })] }) })] }));
|
|
22771
22789
|
};
|
|
22772
22790
|
|
|
22773
22791
|
;// CONCATENATED MODULE: ./src/UI/SharePanel/SocialSharePanelBody/index.ts
|
|
@@ -25595,17 +25613,15 @@ class StorySlidesContainer extends HTMLElement {
|
|
|
25595
25613
|
this.styleElement = style;
|
|
25596
25614
|
this.mountPoint.prepend(style);
|
|
25597
25615
|
}
|
|
25598
|
-
|
|
25599
|
-
|
|
25600
|
-
|
|
25601
|
-
|
|
25602
|
-
|
|
25603
|
-
|
|
25604
|
-
|
|
25605
|
-
this.mountPoint.addEventListener("click", this.handleClick);
|
|
25606
|
-
});
|
|
25616
|
+
attach(story) {
|
|
25617
|
+
/** React uses its own virtual DOM and can reuse or move nodes without actually removing them from the DOM. So connectedCallback and disconnectedCallback are not always called.React uses its own virtual DOM and can reuse or move nodes without actually removing them from the DOM. So connectedCallback and disconnectedCallback are not always called. */
|
|
25618
|
+
if (!this.mountPoint)
|
|
25619
|
+
throw new Error("[IAS]: Mount point was undefined");
|
|
25620
|
+
this.story = story;
|
|
25621
|
+
this.story.attachRoot(this.mountPoint);
|
|
25622
|
+
this.mountPoint.addEventListener("click", this.handleClick);
|
|
25607
25623
|
}
|
|
25608
|
-
|
|
25624
|
+
detach() {
|
|
25609
25625
|
var _a, _b;
|
|
25610
25626
|
/** React uses its own virtual DOM and can reuse or move nodes without actually removing them from the DOM. So connectedCallback and disconnectedCallback are not always called. */
|
|
25611
25627
|
(_a = this.story) === null || _a === void 0 ? void 0 : _a.detachRoot();
|
|
@@ -25638,29 +25654,31 @@ var StorySlidesRenderer_rest = (undefined && undefined.__rest) || function (s, e
|
|
|
25638
25654
|
|
|
25639
25655
|
|
|
25640
25656
|
|
|
25641
|
-
const StorySlidesRenderer = (0,external_mobx_react_lite_namespaceObject.observer)((_a) => {
|
|
25657
|
+
const StorySlidesRenderer = (0,external_mobx_react_lite_namespaceObject.observer)((0,external_react_namespaceObject.forwardRef)((_a, ref) => {
|
|
25642
25658
|
var { className, story, preventNavigation, isActiveStory } = _a, props = StorySlidesRenderer_rest(_a, ["className", "story", "preventNavigation", "isActiveStory"]);
|
|
25643
25659
|
const storySlidesRef = (0,external_react_namespaceObject.useRef)(null);
|
|
25644
|
-
(0,external_react_namespaceObject.
|
|
25645
|
-
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
|
|
25649
|
-
|
|
25650
|
-
|
|
25651
|
-
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25655
|
-
|
|
25660
|
+
(0,external_react_namespaceObject.useImperativeHandle)(ref, () => {
|
|
25661
|
+
return {
|
|
25662
|
+
setStyle: (style) => {
|
|
25663
|
+
var _a;
|
|
25664
|
+
(_a = storySlidesRef.current) === null || _a === void 0 ? void 0 : _a.setStyle(style);
|
|
25665
|
+
},
|
|
25666
|
+
attach: (story) => {
|
|
25667
|
+
var _a;
|
|
25668
|
+
(_a = storySlidesRef.current) === null || _a === void 0 ? void 0 : _a.attach(story);
|
|
25669
|
+
},
|
|
25670
|
+
detach: () => {
|
|
25671
|
+
var _a;
|
|
25672
|
+
(_a = storySlidesRef.current) === null || _a === void 0 ? void 0 : _a.detach();
|
|
25673
|
+
}
|
|
25656
25674
|
};
|
|
25657
|
-
}, [
|
|
25675
|
+
}, [ref, storySlidesRef]);
|
|
25658
25676
|
const bottomOffset = !props.isDesktopGeometry ? `${story.actionPanel.height}px` : "0px";
|
|
25659
25677
|
// Bug with attributes in React 19. Explicit cast to string required
|
|
25660
25678
|
return ((0,jsx_runtime_namespaceObject.jsx)("story-slides-container", { ref: storySlidesRef, style: {
|
|
25661
25679
|
bottom: bottomOffset
|
|
25662
25680
|
}, class: className, dir: story.dir, "prevent-navigation": preventNavigation.toString(), "is-active-story": isActiveStory.toString() }));
|
|
25663
|
-
});
|
|
25681
|
+
}));
|
|
25664
25682
|
|
|
25665
25683
|
;// CONCATENATED MODULE: ./src/StoryReader/Story/Story.tsx
|
|
25666
25684
|
var Story_rest = (undefined && undefined.__rest) || function (s, e) {
|
|
@@ -25692,6 +25710,7 @@ const Story_Story = (0,external_mobx_react_lite_namespaceObject.observer)((_a) =
|
|
|
25692
25710
|
var { story, geometry, className } = _a, props = Story_rest(_a, ["story", "geometry", "className"]);
|
|
25693
25711
|
const { storyReaderOptions, commonOptions, goodsWidgetOptions } = useIASContainer();
|
|
25694
25712
|
const storyRef = (0,external_react_namespaceObject.useRef)(null);
|
|
25713
|
+
const slideRef = (0,external_react_namespaceObject.useRef)(null);
|
|
25695
25714
|
const isActiveStory = story === props.activeStory;
|
|
25696
25715
|
const isDesktopGeometry = geometry instanceof DesktopStoryGeometry;
|
|
25697
25716
|
const useModernLayout = storyReaderOptions.layout === StoryReaderLayout.Modern;
|
|
@@ -25704,6 +25723,20 @@ const Story_Story = (0,external_mobx_react_lite_namespaceObject.observer)((_a) =
|
|
|
25704
25723
|
story.actionPanel.setOptions(commonOptions);
|
|
25705
25724
|
story.actionPanel.setActionPanelHeight(bottomOffset);
|
|
25706
25725
|
}, [story, commonOptions, storyReaderOptions.actionPanelBottomOffset, isDesktopGeometry]);
|
|
25726
|
+
(0,external_react_namespaceObject.useLayoutEffect)(() => {
|
|
25727
|
+
if (!slideRef.current)
|
|
25728
|
+
return;
|
|
25729
|
+
slideRef.current.setStyle(story.context.style);
|
|
25730
|
+
}, [story.context.style]);
|
|
25731
|
+
(0,external_react_namespaceObject.useLayoutEffect)(() => {
|
|
25732
|
+
if (!slideRef.current)
|
|
25733
|
+
return;
|
|
25734
|
+
const storySlides = slideRef.current;
|
|
25735
|
+
storySlides.attach(story);
|
|
25736
|
+
return () => {
|
|
25737
|
+
storySlides.detach();
|
|
25738
|
+
};
|
|
25739
|
+
}, [story]);
|
|
25707
25740
|
const handleReloadStory = async () => {
|
|
25708
25741
|
const storyError = Boolean(story.error);
|
|
25709
25742
|
try {
|
|
@@ -25722,7 +25755,7 @@ const Story_Story = (0,external_mobx_react_lite_namespaceObject.observer)((_a) =
|
|
|
25722
25755
|
story.sharePanel.completeNativeSharing({ result: false });
|
|
25723
25756
|
}, onTouchStart: () => {
|
|
25724
25757
|
story.sharePanel.completeNativeSharing({ result: false });
|
|
25725
|
-
}, "data-testid": "story", children: [isDesktopGeometry && useModernLayout && story.isSlideRendered && (0,jsx_runtime_namespaceObject.jsx)(StoryBackdrop, { hidden: isActiveStory }), story.canBeShown && story.isSlideRendered && ((0,jsx_runtime_namespaceObject.jsx)(StoryHeader, { hidden: shouldHideHeader, story: story, onClose: props.onClose, isDesktopGeometry: isDesktopGeometry })), (0,jsx_runtime_namespaceObject.jsx)(StorySlidesRenderer, { className: Story_story_module["story-slides"], story: story, preventNavigation: useModernLayout && isDesktopGeometry, isActiveStory: isActiveStory, isDesktopGeometry: isDesktopGeometry }), story.actionPanel.needShown && story.isSlideRendered && ((0,jsx_runtime_namespaceObject.jsx)(StoryActionPanel, { dir: story.dir, isDesktopGeometry: isDesktopGeometry, hidden: shouldHideActionPanel, actionPanel: story.actionPanel, commonOptions: commonOptions, storyReaderOptions: storyReaderOptions })), props.activeStory === story && ((0,jsx_runtime_namespaceObject.jsx)(GoodsWidgetViewer, { story: story, goodsWidgetOptions: goodsWidgetOptions })), props.activeStory === story && ((0,jsx_runtime_namespaceObject.jsx)(TextInputModal, { story: story, storyRef: storyRef, storyGeometry: geometry })), story.sharePanel.isOpened && ((0,jsx_runtime_namespaceObject.jsx)(SharePanel, { dir: story.dir, className: Story_story_module["share-panel-wrapper"], shareText: story.sharePanel.params.text, shareType: story.sharePanel.params.type, shareLink: story.sharePanel.params.link, onShareCompelete: (result) => story.sharePanel.handleShareComplete(story.sharePanel.params.id, result), sharePanelOptions: storyReaderOptions.sharePanel })), (0,jsx_runtime_namespaceObject.jsx)(Loader, { needShowErrorScreen: story.needShowErrorScreen, needShowLoaderScreen: story.needShowLoaderScreen, onReload: handleReloadStory })] }));
|
|
25758
|
+
}, "data-testid": "story", children: [isDesktopGeometry && useModernLayout && story.isSlideRendered && (0,jsx_runtime_namespaceObject.jsx)(StoryBackdrop, { hidden: isActiveStory }), story.canBeShown && story.isSlideRendered && ((0,jsx_runtime_namespaceObject.jsx)(StoryHeader, { hidden: shouldHideHeader, story: story, onClose: props.onClose, isDesktopGeometry: isDesktopGeometry })), (0,jsx_runtime_namespaceObject.jsx)(StorySlidesRenderer, { className: Story_story_module["story-slides"], story: story, ref: slideRef, preventNavigation: useModernLayout && isDesktopGeometry, isActiveStory: isActiveStory, isDesktopGeometry: isDesktopGeometry }), story.actionPanel.needShown && story.isSlideRendered && ((0,jsx_runtime_namespaceObject.jsx)(StoryActionPanel, { dir: story.dir, isDesktopGeometry: isDesktopGeometry, hidden: shouldHideActionPanel, actionPanel: story.actionPanel, commonOptions: commonOptions, storyReaderOptions: storyReaderOptions })), props.activeStory === story && ((0,jsx_runtime_namespaceObject.jsx)(GoodsWidgetViewer, { story: story, goodsWidgetOptions: goodsWidgetOptions })), props.activeStory === story && ((0,jsx_runtime_namespaceObject.jsx)(TextInputModal, { story: story, storyRef: storyRef, storyGeometry: geometry })), story.sharePanel.isOpened && ((0,jsx_runtime_namespaceObject.jsx)(SharePanel, { dir: story.dir, className: Story_story_module["share-panel-wrapper"], shareText: story.sharePanel.params.text, shareType: story.sharePanel.params.type, shareLink: story.sharePanel.params.link, onShareCompelete: (result) => story.sharePanel.handleShareComplete(story.sharePanel.params.id, result), sharePanelOptions: storyReaderOptions.sharePanel })), (0,jsx_runtime_namespaceObject.jsx)(Loader, { needShowErrorScreen: story.needShowErrorScreen, needShowLoaderScreen: story.needShowLoaderScreen, onReload: handleReloadStory })] }));
|
|
25726
25759
|
});
|
|
25727
25760
|
|
|
25728
25761
|
;// CONCATENATED MODULE: ./src/StoryReader/Story/index.ts
|
|
@@ -29604,16 +29637,16 @@ const BaseStoryList = (0,external_mobx_react_lite_namespaceObject.observer)((0,e
|
|
|
29604
29637
|
|
|
29605
29638
|
|
|
29606
29639
|
const StoryList = (0,external_mobx_react_lite_namespaceObject.observer)((0,external_react_namespaceObject.forwardRef)((props, ref) => {
|
|
29607
|
-
var _a
|
|
29640
|
+
var _a;
|
|
29608
29641
|
const { storyManager } = useIASContainer();
|
|
29609
|
-
const feedSlug =
|
|
29642
|
+
const feedSlug = props.feedSlug || "default";
|
|
29610
29643
|
const listType = StoryFeedType.DEFAULT;
|
|
29611
29644
|
const { storyListViewModel, storyListOptions } = useStoryListViewModel(Object.assign(Object.assign({}, props), { storyManager,
|
|
29612
29645
|
feedSlug,
|
|
29613
29646
|
listType, hasFavorite: Boolean(props.hasFavorite), isFavorite: false }));
|
|
29614
|
-
if (!storyListViewModel || !((
|
|
29647
|
+
if (!storyListViewModel || !((_a = storyListViewModel.session) === null || _a === void 0 ? void 0 : _a.id))
|
|
29615
29648
|
return null;
|
|
29616
|
-
return ((0,jsx_runtime_namespaceObject.jsx)(BaseStoryList, Object.assign({}, props, { dir: storyListViewModel.dir, storyManager: storyManager, feedSlug:
|
|
29649
|
+
return ((0,jsx_runtime_namespaceObject.jsx)(BaseStoryList, Object.assign({}, props, { dir: storyListViewModel.dir, storyManager: storyManager, feedSlug: props.feedSlug || "default", listType: StoryFeedType.DEFAULT, storyListViewModel: storyListViewModel, storyListOptions: storyListOptions, onStoryCardClick: props.onStoryCardClick, onFavoriteCardClick: () => {
|
|
29617
29650
|
var _a;
|
|
29618
29651
|
storyManager.emit("clickOnFavoriteCell", { feed: feedSlug });
|
|
29619
29652
|
(_a = props.onFavoriteCardClick) === null || _a === void 0 ? void 0 : _a.call(props);
|