@inappstory/react-sdk 1.11.3 → 1.11.4
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
CHANGED
|
@@ -2503,6 +2503,8 @@ function replaceAll(val, match, replacement) {
|
|
|
2503
2503
|
|
|
2504
2504
|
const INTERNAL_FONT_FAMILY_NAMES = ["InternalPrimaryFont", "InternalSecondaryFont"];
|
|
2505
2505
|
function applyInternalFontFamilyPrefix(text, prefix) {
|
|
2506
|
+
if (!prefix)
|
|
2507
|
+
return text;
|
|
2506
2508
|
let result = text;
|
|
2507
2509
|
for (const name of INTERNAL_FONT_FAMILY_NAMES) {
|
|
2508
2510
|
result = replaceAll(result, name, `${prefix}${name}`);
|
|
@@ -3397,7 +3399,7 @@ class Session {
|
|
|
3397
3399
|
this.previewAspectRatio = sessionDto.preview_aspect_ratio;
|
|
3398
3400
|
this.share = sessionDto.share;
|
|
3399
3401
|
this.resources = this.getResources(sessionDto);
|
|
3400
|
-
this.fontsResources = this.
|
|
3402
|
+
this.fontsResources = this.applyFontPrefix(this.resources.filter(resource => resource.type === "font-face"));
|
|
3401
3403
|
this._textPlaceholders = this.mapTextPlaceholders(sessionDto.placeholders);
|
|
3402
3404
|
this._imagePlaceholders = this.mapImagePlaceholders(sessionDto.image_placeholders);
|
|
3403
3405
|
this.isAllowStatisticV2 = Boolean(sessionDto.is_allow_statistic_v2);
|
|
@@ -3408,9 +3410,9 @@ class Session {
|
|
|
3408
3410
|
getAllFontFamilies() {
|
|
3409
3411
|
return [...new Set(this.fontsResources.map(fontResource => fontResource.family))];
|
|
3410
3412
|
}
|
|
3411
|
-
|
|
3413
|
+
applyFontPrefix(fontsResources) {
|
|
3412
3414
|
return fontsResources.map(fontResource => {
|
|
3413
|
-
return Object.assign(Object.assign({}, fontResource), { family: `${this.storyManager.config.
|
|
3415
|
+
return Object.assign(Object.assign({}, fontResource), { family: `${this.storyManager.config.fontPrefix}${fontResource.family}` });
|
|
3414
3416
|
});
|
|
3415
3417
|
}
|
|
3416
3418
|
getResources(sessionDto) {
|
|
@@ -4414,7 +4416,13 @@ let StorySlide = (() => {
|
|
|
4414
4416
|
}
|
|
4415
4417
|
constructor(storySlideDto) {
|
|
4416
4418
|
var _b, _c;
|
|
4417
|
-
|
|
4419
|
+
Object.defineProperty(this, "_rawHtml", {
|
|
4420
|
+
enumerable: true,
|
|
4421
|
+
configurable: true,
|
|
4422
|
+
writable: true,
|
|
4423
|
+
value: (storySlide_runInitializers(this, _instanceExtraInitializers), "")
|
|
4424
|
+
});
|
|
4425
|
+
_StorySlide__html_accessor_storage.set(this, storySlide_runInitializers(this, __html_initializers, ""));
|
|
4418
4426
|
Object.defineProperty(this, "index", {
|
|
4419
4427
|
enumerable: true,
|
|
4420
4428
|
configurable: true,
|
|
@@ -4476,7 +4484,8 @@ let StorySlide = (() => {
|
|
|
4476
4484
|
rangeEnd: resource.range_end,
|
|
4477
4485
|
contentType: resource.content_type
|
|
4478
4486
|
}))) !== null && _c !== void 0 ? _c : [];
|
|
4479
|
-
this.
|
|
4487
|
+
this._rawHtml = this.replaceSlideNonce(storySlideDto.html);
|
|
4488
|
+
this._html = this._rawHtml;
|
|
4480
4489
|
}
|
|
4481
4490
|
static createEmpty() {
|
|
4482
4491
|
return new _a({
|
|
@@ -4490,11 +4499,12 @@ let StorySlide = (() => {
|
|
|
4490
4499
|
html: ""
|
|
4491
4500
|
});
|
|
4492
4501
|
}
|
|
4493
|
-
|
|
4494
|
-
this.
|
|
4502
|
+
applyFontPrefix(prefix) {
|
|
4503
|
+
this._rawHtml = applyInternalFontFamilyPrefix(this._rawHtml, prefix);
|
|
4504
|
+
this._html = this._rawHtml;
|
|
4495
4505
|
}
|
|
4496
4506
|
updatePlaceholders(placeholders) {
|
|
4497
|
-
let slideHtml = this.
|
|
4507
|
+
let slideHtml = this._rawHtml;
|
|
4498
4508
|
for (const placeholder of placeholders)
|
|
4499
4509
|
slideHtml = replaceAll(slideHtml, `%${placeholder.key}%`, placeholder.value);
|
|
4500
4510
|
this._html = slideHtml;
|
|
@@ -4627,7 +4637,7 @@ var story_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet)
|
|
|
4627
4637
|
|
|
4628
4638
|
|
|
4629
4639
|
let Story = (() => {
|
|
4630
|
-
var _a, _Story__slidesLoaded_accessor_storage, _Story__error_accessor_storage, _Story__context_accessor_storage, _Story__like_accessor_storage, _Story__favorite_accessor_storage, _Story__shareUrl_accessor_storage, _Story__slides_accessor_storage, _Story__isOpened_accessor_storage, _Story__canBeShown_accessor_storage;
|
|
4640
|
+
var _a, _Story__slidesLoaded_accessor_storage, _Story__error_accessor_storage, _Story__context_accessor_storage, _Story__like_accessor_storage, _Story__favorite_accessor_storage, _Story__shareUrl_accessor_storage, _Story__slides_accessor_storage, _Story__isOpened_accessor_storage, _Story__canBeShown_accessor_storage, _Story__title_accessor_storage;
|
|
4631
4641
|
let _instanceExtraInitializers = [];
|
|
4632
4642
|
let __slidesLoaded_decorators;
|
|
4633
4643
|
let __slidesLoaded_initializers = [];
|
|
@@ -4656,6 +4666,9 @@ let Story = (() => {
|
|
|
4656
4666
|
let __canBeShown_decorators;
|
|
4657
4667
|
let __canBeShown_initializers = [];
|
|
4658
4668
|
let __canBeShown_extraInitializers = [];
|
|
4669
|
+
let __title_decorators;
|
|
4670
|
+
let __title_initializers = [];
|
|
4671
|
+
let __title_extraInitializers = [];
|
|
4659
4672
|
let _setSlides_decorators;
|
|
4660
4673
|
let _setCanBeShown_decorators;
|
|
4661
4674
|
return _a = class Story {
|
|
@@ -4677,6 +4690,8 @@ let Story = (() => {
|
|
|
4677
4690
|
set _isOpened(value) { story_classPrivateFieldSet(this, _Story__isOpened_accessor_storage, value, "f"); }
|
|
4678
4691
|
get _canBeShown() { return story_classPrivateFieldGet(this, _Story__canBeShown_accessor_storage, "f"); }
|
|
4679
4692
|
set _canBeShown(value) { story_classPrivateFieldSet(this, _Story__canBeShown_accessor_storage, value, "f"); }
|
|
4693
|
+
get _title() { return story_classPrivateFieldGet(this, _Story__title_accessor_storage, "f"); }
|
|
4694
|
+
set _title(value) { story_classPrivateFieldSet(this, _Story__title_accessor_storage, value, "f"); }
|
|
4680
4695
|
constructor(storyDto) {
|
|
4681
4696
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
4682
4697
|
Object.defineProperty(this, "id", {
|
|
@@ -4808,7 +4823,7 @@ let Story = (() => {
|
|
|
4808
4823
|
writable: true,
|
|
4809
4824
|
value: {}
|
|
4810
4825
|
});
|
|
4811
|
-
Object.defineProperty(this, "
|
|
4826
|
+
Object.defineProperty(this, "_rawTitle", {
|
|
4812
4827
|
enumerable: true,
|
|
4813
4828
|
configurable: true,
|
|
4814
4829
|
writable: true,
|
|
@@ -4853,10 +4868,12 @@ let Story = (() => {
|
|
|
4853
4868
|
_Story__slides_accessor_storage.set(this, (story_runInitializers(this, __shareUrl_extraInitializers), story_runInitializers(this, __slides_initializers, [])));
|
|
4854
4869
|
_Story__isOpened_accessor_storage.set(this, (story_runInitializers(this, __slides_extraInitializers), story_runInitializers(this, __isOpened_initializers, false)));
|
|
4855
4870
|
_Story__canBeShown_accessor_storage.set(this, (story_runInitializers(this, __isOpened_extraInitializers), story_runInitializers(this, __canBeShown_initializers, false)));
|
|
4856
|
-
story_runInitializers(this, __canBeShown_extraInitializers);
|
|
4871
|
+
_Story__title_accessor_storage.set(this, (story_runInitializers(this, __canBeShown_extraInitializers), story_runInitializers(this, __title_initializers, void 0)));
|
|
4872
|
+
story_runInitializers(this, __title_extraInitializers);
|
|
4857
4873
|
this.id = storyDto.id;
|
|
4858
4874
|
this._context = new StoryContext(this.id, { style: "", widgetsData: {} });
|
|
4859
|
-
this.
|
|
4875
|
+
this._rawTitle = (_b = storyDto.title) !== null && _b !== void 0 ? _b : "";
|
|
4876
|
+
this._title = this._rawTitle;
|
|
4860
4877
|
this._isOpened = (_c = storyDto.is_opened) !== null && _c !== void 0 ? _c : false;
|
|
4861
4878
|
this.statTitle = (_d = storyDto.stat_title) !== null && _d !== void 0 ? _d : "";
|
|
4862
4879
|
this.titleColor = (_e = storyDto.title_color) !== null && _e !== void 0 ? _e : "";
|
|
@@ -4974,9 +4991,9 @@ let Story = (() => {
|
|
|
4974
4991
|
setShareUrl(shareUrl) {
|
|
4975
4992
|
this._shareUrl = shareUrl;
|
|
4976
4993
|
}
|
|
4977
|
-
|
|
4994
|
+
applyFontPrefix(prefix) {
|
|
4978
4995
|
for (const slide of this.slides)
|
|
4979
|
-
slide.
|
|
4996
|
+
slide.applyFontPrefix(prefix);
|
|
4980
4997
|
}
|
|
4981
4998
|
updatePlaceholders(placeholders) {
|
|
4982
4999
|
if (!this.needPlaceholders)
|
|
@@ -4989,7 +5006,7 @@ let Story = (() => {
|
|
|
4989
5006
|
slide.updatePlaceholders(placeholders);
|
|
4990
5007
|
}
|
|
4991
5008
|
updateTitlePlaceholders(placeholders) {
|
|
4992
|
-
let title = this.
|
|
5009
|
+
let title = this._rawTitle;
|
|
4993
5010
|
for (const placeholder of placeholders)
|
|
4994
5011
|
title = replaceAll(title, `%${placeholder.key}%`, placeholder.value);
|
|
4995
5012
|
this._title = title;
|
|
@@ -5007,6 +5024,7 @@ let Story = (() => {
|
|
|
5007
5024
|
_Story__slides_accessor_storage = new WeakMap(),
|
|
5008
5025
|
_Story__isOpened_accessor_storage = new WeakMap(),
|
|
5009
5026
|
_Story__canBeShown_accessor_storage = new WeakMap(),
|
|
5027
|
+
_Story__title_accessor_storage = new WeakMap(),
|
|
5010
5028
|
(() => {
|
|
5011
5029
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
5012
5030
|
__slidesLoaded_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
@@ -5018,6 +5036,7 @@ let Story = (() => {
|
|
|
5018
5036
|
__slides_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
5019
5037
|
__isOpened_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
5020
5038
|
__canBeShown_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
5039
|
+
__title_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
5021
5040
|
_setSlides_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_action__];
|
|
5022
5041
|
_setCanBeShown_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_action__];
|
|
5023
5042
|
story_esDecorate(_a, null, __slidesLoaded_decorators, { kind: "accessor", name: "_slidesLoaded", static: false, private: false, access: { has: obj => "_slidesLoaded" in obj, get: obj => obj._slidesLoaded, set: (obj, value) => { obj._slidesLoaded = value; } }, metadata: _metadata }, __slidesLoaded_initializers, __slidesLoaded_extraInitializers);
|
|
@@ -5029,6 +5048,7 @@ let Story = (() => {
|
|
|
5029
5048
|
story_esDecorate(_a, null, __slides_decorators, { kind: "accessor", name: "_slides", static: false, private: false, access: { has: obj => "_slides" in obj, get: obj => obj._slides, set: (obj, value) => { obj._slides = value; } }, metadata: _metadata }, __slides_initializers, __slides_extraInitializers);
|
|
5030
5049
|
story_esDecorate(_a, null, __isOpened_decorators, { kind: "accessor", name: "_isOpened", static: false, private: false, access: { has: obj => "_isOpened" in obj, get: obj => obj._isOpened, set: (obj, value) => { obj._isOpened = value; } }, metadata: _metadata }, __isOpened_initializers, __isOpened_extraInitializers);
|
|
5031
5050
|
story_esDecorate(_a, null, __canBeShown_decorators, { kind: "accessor", name: "_canBeShown", static: false, private: false, access: { has: obj => "_canBeShown" in obj, get: obj => obj._canBeShown, set: (obj, value) => { obj._canBeShown = value; } }, metadata: _metadata }, __canBeShown_initializers, __canBeShown_extraInitializers);
|
|
5051
|
+
story_esDecorate(_a, null, __title_decorators, { kind: "accessor", name: "_title", static: false, private: false, access: { has: obj => "_title" in obj, get: obj => obj._title, set: (obj, value) => { obj._title = value; } }, metadata: _metadata }, __title_initializers, __title_extraInitializers);
|
|
5032
5052
|
story_esDecorate(_a, null, _setSlides_decorators, { kind: "method", name: "setSlides", static: false, private: false, access: { has: obj => "setSlides" in obj, get: obj => obj.setSlides }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
5033
5053
|
story_esDecorate(_a, null, _setCanBeShown_decorators, { kind: "method", name: "setCanBeShown", static: false, private: false, access: { has: obj => "setCanBeShown" in obj, get: obj => obj.setCanBeShown }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
5034
5054
|
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -9855,7 +9875,7 @@ class GameClientConfig {
|
|
|
9855
9875
|
value: void 0
|
|
9856
9876
|
});
|
|
9857
9877
|
const storyManagerConfig = this.storyManager.config;
|
|
9858
|
-
const sdkVersion = "1.11.
|
|
9878
|
+
const sdkVersion = "1.11.4";
|
|
9859
9879
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
9860
9880
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
9861
9881
|
this.sessionId = session.id;
|
|
@@ -14430,7 +14450,7 @@ let StoryManagerConfig = (() => {
|
|
|
14430
14450
|
enumerable: true,
|
|
14431
14451
|
configurable: true,
|
|
14432
14452
|
writable: true,
|
|
14433
|
-
value: "
|
|
14453
|
+
value: ""
|
|
14434
14454
|
});
|
|
14435
14455
|
this.update(configDto);
|
|
14436
14456
|
this._isInited = true;
|
|
@@ -14474,7 +14494,7 @@ let StoryManagerConfig = (() => {
|
|
|
14474
14494
|
get anonymous() {
|
|
14475
14495
|
return this._anonymous;
|
|
14476
14496
|
}
|
|
14477
|
-
get
|
|
14497
|
+
get fontPrefix() {
|
|
14478
14498
|
return this._fontsPrefix;
|
|
14479
14499
|
}
|
|
14480
14500
|
get options() {
|
|
@@ -14568,7 +14588,7 @@ let StoryManagerConfig = (() => {
|
|
|
14568
14588
|
}
|
|
14569
14589
|
update(configDto) {
|
|
14570
14590
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
14571
|
-
this._fontsPrefix = (_b = configDto.
|
|
14591
|
+
this._fontsPrefix = (_b = configDto.fontPrefix) !== null && _b !== void 0 ? _b : "";
|
|
14572
14592
|
this._appPackageId = (_c = configDto.appPackageId) !== null && _c !== void 0 ? _c : "";
|
|
14573
14593
|
this._disableDeviceId = Boolean(configDto.disableDeviceId);
|
|
14574
14594
|
this.setOptions(configDto.options);
|
|
@@ -14687,8 +14707,8 @@ class NullStoryManagerConfig {
|
|
|
14687
14707
|
get anonymous() {
|
|
14688
14708
|
return false;
|
|
14689
14709
|
}
|
|
14690
|
-
get
|
|
14691
|
-
return "
|
|
14710
|
+
get fontPrefix() {
|
|
14711
|
+
return "";
|
|
14692
14712
|
}
|
|
14693
14713
|
get options() {
|
|
14694
14714
|
return {};
|
|
@@ -15481,13 +15501,6 @@ class IamAppearanceOptionsFactory {
|
|
|
15481
15501
|
|
|
15482
15502
|
|
|
15483
15503
|
;// ../core/src/domain/inAppMessaging/models/messageSlide/iamMessageSlide.ts
|
|
15484
|
-
var iamMessageSlide_runInitializers = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) {
|
|
15485
|
-
var useValue = arguments.length > 2;
|
|
15486
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
15487
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
15488
|
-
}
|
|
15489
|
-
return useValue ? value : void 0;
|
|
15490
|
-
};
|
|
15491
15504
|
var iamMessageSlide_esDecorate = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
15492
15505
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
15493
15506
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
@@ -15515,6 +15528,13 @@ var iamMessageSlide_esDecorate = (undefined && undefined.__esDecorate) || functi
|
|
|
15515
15528
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
15516
15529
|
done = true;
|
|
15517
15530
|
};
|
|
15531
|
+
var iamMessageSlide_runInitializers = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) {
|
|
15532
|
+
var useValue = arguments.length > 2;
|
|
15533
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
15534
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
15535
|
+
}
|
|
15536
|
+
return useValue ? value : void 0;
|
|
15537
|
+
};
|
|
15518
15538
|
var iamMessageSlide_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15519
15539
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15520
15540
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -15530,11 +15550,9 @@ var iamMessageSlide_classPrivateFieldSet = (undefined && undefined.__classPrivat
|
|
|
15530
15550
|
|
|
15531
15551
|
let IamMessageSlide = (() => {
|
|
15532
15552
|
var _a, _IamMessageSlide__html_accessor_storage;
|
|
15533
|
-
let _instanceExtraInitializers = [];
|
|
15534
15553
|
let __html_decorators;
|
|
15535
15554
|
let __html_initializers = [];
|
|
15536
15555
|
let __html_extraInitializers = [];
|
|
15537
|
-
let _get_html_decorators;
|
|
15538
15556
|
return _a = class IamMessageSlide {
|
|
15539
15557
|
get _html() { return iamMessageSlide_classPrivateFieldGet(this, _IamMessageSlide__html_accessor_storage, "f"); }
|
|
15540
15558
|
set _html(value) { iamMessageSlide_classPrivateFieldSet(this, _IamMessageSlide__html_accessor_storage, value, "f"); }
|
|
@@ -15543,7 +15561,7 @@ let IamMessageSlide = (() => {
|
|
|
15543
15561
|
enumerable: true,
|
|
15544
15562
|
configurable: true,
|
|
15545
15563
|
writable: true,
|
|
15546
|
-
value:
|
|
15564
|
+
value: message
|
|
15547
15565
|
});
|
|
15548
15566
|
_IamMessageSlide__html_accessor_storage.set(this, iamMessageSlide_runInitializers(this, __html_initializers, ""));
|
|
15549
15567
|
Object.defineProperty(this, "_payload", {
|
|
@@ -15552,6 +15570,12 @@ let IamMessageSlide = (() => {
|
|
|
15552
15570
|
writable: true,
|
|
15553
15571
|
value: iamMessageSlide_runInitializers(this, __html_extraInitializers)
|
|
15554
15572
|
});
|
|
15573
|
+
Object.defineProperty(this, "_rawHtml", {
|
|
15574
|
+
enumerable: true,
|
|
15575
|
+
configurable: true,
|
|
15576
|
+
writable: true,
|
|
15577
|
+
value: ""
|
|
15578
|
+
});
|
|
15555
15579
|
}
|
|
15556
15580
|
get html() {
|
|
15557
15581
|
return this._html;
|
|
@@ -15561,32 +15585,32 @@ let IamMessageSlide = (() => {
|
|
|
15561
15585
|
}
|
|
15562
15586
|
updateByDto(messageSlideDto) {
|
|
15563
15587
|
var _b;
|
|
15564
|
-
this.
|
|
15588
|
+
this._rawHtml = this.getSlideHtml(messageSlideDto);
|
|
15589
|
+
this._html = this._rawHtml;
|
|
15565
15590
|
this._payload = (_b = messageSlideDto.event_payload) === null || _b === void 0 ? void 0 : _b.payload;
|
|
15566
15591
|
}
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
slideHtml = replaceAll(slideHtml, `{{nonce}}`, (_b = getNonce()) !== null && _b !== void 0 ? _b : "");
|
|
15571
|
-
return slideHtml;
|
|
15572
|
-
}
|
|
15573
|
-
applyFontsPrefix(prefix) {
|
|
15574
|
-
this._html = applyInternalFontFamilyPrefix(this._html, prefix);
|
|
15592
|
+
applyFontPrefix(prefix) {
|
|
15593
|
+
this._rawHtml = applyInternalFontFamilyPrefix(this._rawHtml, prefix);
|
|
15594
|
+
this._html = this._rawHtml;
|
|
15575
15595
|
}
|
|
15576
15596
|
updatePlaceholders(placeholders) {
|
|
15577
|
-
let slideHtml = this.
|
|
15597
|
+
let slideHtml = this._rawHtml;
|
|
15578
15598
|
for (const placeholder of placeholders)
|
|
15579
15599
|
slideHtml = replaceAll(slideHtml, `%${placeholder.key}%`, placeholder.value);
|
|
15580
15600
|
this._html = slideHtml;
|
|
15581
15601
|
}
|
|
15602
|
+
getSlideHtml(messageSlideDto) {
|
|
15603
|
+
var _b;
|
|
15604
|
+
let slideHtml = messageSlideDto.html;
|
|
15605
|
+
slideHtml = replaceAll(slideHtml, `{{nonce}}`, (_b = getNonce()) !== null && _b !== void 0 ? _b : "");
|
|
15606
|
+
return slideHtml;
|
|
15607
|
+
}
|
|
15582
15608
|
},
|
|
15583
15609
|
_IamMessageSlide__html_accessor_storage = new WeakMap(),
|
|
15584
15610
|
(() => {
|
|
15585
15611
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
15586
15612
|
__html_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_observable__];
|
|
15587
|
-
_get_html_decorators = [__WEBPACK_EXTERNAL_MODULE_mobx_computed__];
|
|
15588
15613
|
iamMessageSlide_esDecorate(_a, null, __html_decorators, { kind: "accessor", name: "_html", static: false, private: false, access: { has: obj => "_html" in obj, get: obj => obj._html, set: (obj, value) => { obj._html = value; } }, metadata: _metadata }, __html_initializers, __html_extraInitializers);
|
|
15589
|
-
iamMessageSlide_esDecorate(_a, null, _get_html_decorators, { kind: "getter", name: "html", static: false, private: false, access: { has: obj => "html" in obj, get: obj => obj.html }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
15590
15614
|
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
15591
15615
|
})(),
|
|
15592
15616
|
_a;
|
|
@@ -15964,9 +15988,9 @@ let IamMessage = (() => {
|
|
|
15964
15988
|
this._openTime = Date.now();
|
|
15965
15989
|
return this._iterationId;
|
|
15966
15990
|
}
|
|
15967
|
-
|
|
15991
|
+
applyFontPrefix(prefix) {
|
|
15968
15992
|
for (const slide of this._slides)
|
|
15969
|
-
slide.
|
|
15993
|
+
slide.applyFontPrefix(prefix);
|
|
15970
15994
|
}
|
|
15971
15995
|
updatePlaceholders(placeholders) {
|
|
15972
15996
|
for (const slide of this._slides)
|
|
@@ -16809,7 +16833,6 @@ let IamReaderViewModel = (() => {
|
|
|
16809
16833
|
this.emitCloseEvent(activeMessage);
|
|
16810
16834
|
}
|
|
16811
16835
|
async open(message, appearance) {
|
|
16812
|
-
message.applyFontsPrefix(this.storyManager.config.fontsPrefix);
|
|
16813
16836
|
message.updatePlaceholders(this.storyManager.rootStore.placeholderStore.placeholders);
|
|
16814
16837
|
if ((appearance === null || appearance === void 0 ? void 0 : appearance.zIndex) !== undefined) {
|
|
16815
16838
|
message.appearanceOptions.zIndex = appearance.zIndex;
|
|
@@ -20191,7 +20214,7 @@ let IamStore = (() => {
|
|
|
20191
20214
|
messageIds
|
|
20192
20215
|
});
|
|
20193
20216
|
if (!this.iamCSS && messageContextDto.style) {
|
|
20194
|
-
this.iamCSS = applyInternalFontFamilyPrefix(messageContextDto.style, this.rootStore.storyManagerConfigStore.config.
|
|
20217
|
+
this.iamCSS = applyInternalFontFamilyPrefix(messageContextDto.style, this.rootStore.storyManagerConfigStore.config.fontPrefix);
|
|
20195
20218
|
}
|
|
20196
20219
|
messageContextDto.style = this.iamCSS;
|
|
20197
20220
|
return messageContextDto;
|
|
@@ -20208,6 +20231,7 @@ let IamStore = (() => {
|
|
|
20208
20231
|
createMessageByDto(messageDto, messageContext) {
|
|
20209
20232
|
const message = IamMessage.createByDto(messageDto);
|
|
20210
20233
|
const context = new IamMessageContext(messageDto.id, messageContext);
|
|
20234
|
+
message.applyFontPrefix(this.rootStore.storyManagerConfigStore.config.fontPrefix);
|
|
20211
20235
|
message.setContext(context);
|
|
20212
20236
|
if (!this._messages.has(message.id.toString()))
|
|
20213
20237
|
this._messages.set(message.id.toString(), message);
|
|
@@ -20484,7 +20508,7 @@ let StoryStore = (() => {
|
|
|
20484
20508
|
if (storiesById.has(storyDto.id))
|
|
20485
20509
|
return storiesById.get(storyDto.id);
|
|
20486
20510
|
const story = new Story(storyDto);
|
|
20487
|
-
story.
|
|
20511
|
+
story.applyFontPrefix(this.storyManager.config.fontPrefix);
|
|
20488
20512
|
story.updatePlaceholders(this.rootStore.placeholderStore.placeholders);
|
|
20489
20513
|
storiesById.set(storyDto.id, story);
|
|
20490
20514
|
return story;
|
|
@@ -20568,7 +20592,7 @@ let StoryStore = (() => {
|
|
|
20568
20592
|
story.setContext(storyContext);
|
|
20569
20593
|
const storyDto = await this.storiesApi.fetchStorySlides({ id: story.id, feedSlug });
|
|
20570
20594
|
story.setSlides((_b = storyDto.slides) !== null && _b !== void 0 ? _b : []);
|
|
20571
|
-
story.
|
|
20595
|
+
story.applyFontPrefix(this.storyManager.config.fontPrefix);
|
|
20572
20596
|
story.updatePlaceholders(this.rootStore.placeholderStore.placeholders);
|
|
20573
20597
|
await sleep(startAt);
|
|
20574
20598
|
story.setCanBeShown(true);
|
|
@@ -20582,7 +20606,7 @@ let StoryStore = (() => {
|
|
|
20582
20606
|
const storyDto = await this.storiesApi.fetchStory({ id: storyId, feedSlug, fetchShareUrl, once });
|
|
20583
20607
|
const story = this.addStoryByDto(storyDto);
|
|
20584
20608
|
story.setSlides((_b = storyDto.slides) !== null && _b !== void 0 ? _b : []);
|
|
20585
|
-
story.
|
|
20609
|
+
story.applyFontPrefix(this.storyManager.config.fontPrefix);
|
|
20586
20610
|
story.updatePlaceholders(this.rootStore.placeholderStore.placeholders);
|
|
20587
20611
|
return story;
|
|
20588
20612
|
}
|
|
@@ -20590,7 +20614,7 @@ let StoryStore = (() => {
|
|
|
20590
20614
|
if (this.storyCSS)
|
|
20591
20615
|
return;
|
|
20592
20616
|
this.storyCSS = await this.storiesApi.fetchStoryCSS();
|
|
20593
|
-
this.storyCSS = applyInternalFontFamilyPrefix(this.storyCSS, this.storyManager.config.
|
|
20617
|
+
this.storyCSS = applyInternalFontFamilyPrefix(this.storyCSS, this.storyManager.config.fontPrefix);
|
|
20594
20618
|
}
|
|
20595
20619
|
async fetchStoryContext({ id, feedSlug }) {
|
|
20596
20620
|
const storyContextDto = await this.storiesApi.fetchStoryContext({
|
|
@@ -20975,7 +20999,7 @@ class UgcEditorStore {
|
|
|
20975
20999
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
20976
21000
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
20977
21001
|
const storyManagerConfig = this.storyManager.config;
|
|
20978
|
-
const sdkVersion = "1.11.
|
|
21002
|
+
const sdkVersion = "1.11.4";
|
|
20979
21003
|
this._config = {
|
|
20980
21004
|
sessionId: session.id,
|
|
20981
21005
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -21435,11 +21459,11 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21435
21459
|
return deviceDescriptor.deviceId;
|
|
21436
21460
|
}
|
|
21437
21461
|
get sdkVersionName() {
|
|
21438
|
-
const sdkVersionName = "1.11.
|
|
21462
|
+
const sdkVersionName = "1.11.4";
|
|
21439
21463
|
return sdkVersionName || "0.0.0";
|
|
21440
21464
|
}
|
|
21441
21465
|
get sdkVersionCode() {
|
|
21442
|
-
const sdkVersionCode =
|
|
21466
|
+
const sdkVersionCode = 11104;
|
|
21443
21467
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21444
21468
|
}
|
|
21445
21469
|
get lang() {
|
|
@@ -21503,7 +21527,7 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21503
21527
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
21504
21528
|
}
|
|
21505
21529
|
setUserAgent(userAgent) {
|
|
21506
|
-
const sdkVersionCode =
|
|
21530
|
+
const sdkVersionCode = 11104;
|
|
21507
21531
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21508
21532
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
21509
21533
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|
|
@@ -29557,7 +29581,7 @@ const StoryListWrapper = __WEBPACK_EXTERNAL_MODULE_react_forwardRef__((props, re
|
|
|
29557
29581
|
: favoriteCardOptions.gap,
|
|
29558
29582
|
"--storiesListCardUgcMaskColor": props.sliderOptions.ugcCard.mask.color,
|
|
29559
29583
|
"--storiesListCardUgcMaskLinearGradient": composeCardMaskLinearGradient(props.sliderOptions.ugcCard.mask),
|
|
29560
|
-
"--storiesListItemTitleFontFamily": `${storyManager.config.
|
|
29584
|
+
"--storiesListItemTitleFontFamily": `${storyManager.config.fontPrefix}InternalPrimaryFont`,
|
|
29561
29585
|
"--storiesListItemTitleFont": cardOptions.title.font,
|
|
29562
29586
|
"--storiesListItemTitlePadding": isNumeric(cardOptions.title.padding.toString())
|
|
29563
29587
|
? cardOptions.title.padding + "px"
|