@everymatrix/general-stories 1.54.11 → 1.55.0
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/cjs/{general-stories-eec35bcb.js → general-stories-caa7546c.js} +14 -28
- package/dist/cjs/general-stories.cjs.entry.js +2 -2
- package/dist/cjs/general-stories.cjs.js +2 -2
- package/dist/cjs/{index-5e8dba8b.js → index-bfe9e0e7.js} +69 -172
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/general-stories/general-stories.css +5 -3
- package/dist/collection/components/general-stories/general-stories.js +12 -40
- package/dist/esm/{general-stories-b08533ff.js → general-stories-2b03e517.js} +14 -28
- package/dist/esm/general-stories.entry.js +2 -2
- package/dist/esm/general-stories.js +3 -3
- package/dist/esm/{index-3d519791.js → index-eb27780b.js} +69 -172
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/general-stories/general-stories.esm.js +1 -1
- package/dist/general-stories/index.esm.js +1 -1
- package/dist/general-stories/p-33a823ba.js +2 -0
- package/dist/general-stories/p-7421aeac.entry.js +1 -0
- package/dist/general-stories/p-8492d966.js +1 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-stories/p-75ff40bf.js +0 -1
- package/dist/general-stories/p-9be4d8b5.js +0 -2
- package/dist/general-stories/p-aec1e7bb.entry.js +0 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -3,35 +3,9 @@ import { getDevicePlatform } from "../../utils/utils";
|
|
|
3
3
|
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
4
4
|
export class GeneralStories {
|
|
5
5
|
constructor() {
|
|
6
|
-
/**
|
|
7
|
-
* Language of the widget
|
|
8
|
-
*/
|
|
9
|
-
this.language = 'en';
|
|
10
|
-
/**
|
|
11
|
-
* CMS Endpoint stage
|
|
12
|
-
*/
|
|
13
|
-
this.cmsEnv = 'stage';
|
|
14
|
-
/**
|
|
15
|
-
* Client custom styling via string
|
|
16
|
-
*/
|
|
17
|
-
this.clientStyling = '';
|
|
18
|
-
/**
|
|
19
|
-
* Client custom styling via url
|
|
20
|
-
*/
|
|
21
|
-
this.clientStylingUrl = '';
|
|
22
|
-
/**
|
|
23
|
-
* Translations via URL
|
|
24
|
-
*/
|
|
25
|
-
this.translationUrl = '';
|
|
26
|
-
/**
|
|
27
|
-
* Duration of progress bar
|
|
28
|
-
*/
|
|
29
|
-
this.progressBarDuration = 10;
|
|
30
6
|
this.hasErrors = false;
|
|
31
7
|
this.isLoading = true;
|
|
32
8
|
this.isSwipe = false;
|
|
33
|
-
this.currentStoryId = null;
|
|
34
|
-
this.progress = 0;
|
|
35
9
|
this.getStories = () => {
|
|
36
10
|
let url = new URL(`${this.cmsEndpoint}/${this.language}/stories`);
|
|
37
11
|
url.searchParams.append('env', this.cmsEnv);
|
|
@@ -127,6 +101,18 @@ export class GeneralStories {
|
|
|
127
101
|
const open = () => this.openFullScreenStory(props.id);
|
|
128
102
|
return (h("div", { class: `StoryThumbnailContainer ${props.viewed ? 'Viewed' : 'Highlighted'}`, onTouchStart: open }, h("img", { class: `StoryThumbnailImage ${props.viewed ? 'Viewed' : 'Highlighted'}`, src: props.icon, alt: "story-icon" })));
|
|
129
103
|
};
|
|
104
|
+
this.cmsEndpoint = undefined;
|
|
105
|
+
this.language = 'en';
|
|
106
|
+
this.cmsEnv = 'stage';
|
|
107
|
+
this.clientStyling = '';
|
|
108
|
+
this.clientStylingUrl = '';
|
|
109
|
+
this.translationUrl = '';
|
|
110
|
+
this.progressBarDuration = 10;
|
|
111
|
+
this.currentStory = undefined;
|
|
112
|
+
this.currentStoryId = null;
|
|
113
|
+
this.progress = 0;
|
|
114
|
+
this.touchPosStart = undefined;
|
|
115
|
+
this.touchPosEnd = undefined;
|
|
130
116
|
}
|
|
131
117
|
handleStylingUpdate() {
|
|
132
118
|
if (this.clientStyling)
|
|
@@ -232,8 +218,6 @@ export class GeneralStories {
|
|
|
232
218
|
"tags": [],
|
|
233
219
|
"text": "Endpoint URL for the source of data"
|
|
234
220
|
},
|
|
235
|
-
"getter": false,
|
|
236
|
-
"setter": false,
|
|
237
221
|
"attribute": "cms-endpoint",
|
|
238
222
|
"reflect": true
|
|
239
223
|
},
|
|
@@ -251,8 +235,6 @@ export class GeneralStories {
|
|
|
251
235
|
"tags": [],
|
|
252
236
|
"text": "Language of the widget"
|
|
253
237
|
},
|
|
254
|
-
"getter": false,
|
|
255
|
-
"setter": false,
|
|
256
238
|
"attribute": "language",
|
|
257
239
|
"reflect": true,
|
|
258
240
|
"defaultValue": "'en'"
|
|
@@ -271,8 +253,6 @@ export class GeneralStories {
|
|
|
271
253
|
"tags": [],
|
|
272
254
|
"text": "CMS Endpoint stage"
|
|
273
255
|
},
|
|
274
|
-
"getter": false,
|
|
275
|
-
"setter": false,
|
|
276
256
|
"attribute": "cms-env",
|
|
277
257
|
"reflect": true,
|
|
278
258
|
"defaultValue": "'stage'"
|
|
@@ -291,8 +271,6 @@ export class GeneralStories {
|
|
|
291
271
|
"tags": [],
|
|
292
272
|
"text": "Client custom styling via string"
|
|
293
273
|
},
|
|
294
|
-
"getter": false,
|
|
295
|
-
"setter": false,
|
|
296
274
|
"attribute": "client-styling",
|
|
297
275
|
"reflect": true,
|
|
298
276
|
"defaultValue": "''"
|
|
@@ -311,8 +289,6 @@ export class GeneralStories {
|
|
|
311
289
|
"tags": [],
|
|
312
290
|
"text": "Client custom styling via url"
|
|
313
291
|
},
|
|
314
|
-
"getter": false,
|
|
315
|
-
"setter": false,
|
|
316
292
|
"attribute": "client-styling-url",
|
|
317
293
|
"reflect": true,
|
|
318
294
|
"defaultValue": "''"
|
|
@@ -331,8 +307,6 @@ export class GeneralStories {
|
|
|
331
307
|
"tags": [],
|
|
332
308
|
"text": "Translations via URL"
|
|
333
309
|
},
|
|
334
|
-
"getter": false,
|
|
335
|
-
"setter": false,
|
|
336
310
|
"attribute": "translation-url",
|
|
337
311
|
"reflect": true,
|
|
338
312
|
"defaultValue": "''"
|
|
@@ -351,8 +325,6 @@ export class GeneralStories {
|
|
|
351
325
|
"tags": [],
|
|
352
326
|
"text": "Duration of progress bar"
|
|
353
327
|
},
|
|
354
|
-
"getter": false,
|
|
355
|
-
"setter": false,
|
|
356
328
|
"attribute": "progress-bar-duration",
|
|
357
329
|
"reflect": true,
|
|
358
330
|
"defaultValue": "10"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-eb27780b.js';
|
|
2
2
|
|
|
3
3
|
const getDevice = () => {
|
|
4
4
|
let userAgent = window.navigator.userAgent;
|
|
@@ -83,41 +83,15 @@ const translate = (key, customLang) => {
|
|
|
83
83
|
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
const generalStoriesCss = ".ImageContainer{display:flex;flex-direction:row;background-color:var(--emw--color-background, #0E1511);overflow:auto}.StoryThumbnailContainer{margin:5px;position:relative;display:inline-block;border-radius:50%}.StoryThumbnailContainer.Highlighted::before{content:\"\";position:absolute;border-radius:50%;background:linear-gradient(to bottom, var(--emw--color-primary, #22B04E), var(--emw--color-secondary, #E1A749));top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailContainer.Viewed::before{content:\"\";position:absolute;border-radius:50%;height:50px;width:50px;background:var(--emw--color-grey-150, #828282);top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailImage{height:50px;width:50px;border-radius:50%;position:relative;z-index:1}.StoryThumbnailImage.Highlighted,.StoryThumbnailImage.Viewed{border:2px solid var(--emw--color-white, #ffffff)}.FullScreenHeader{position:fixed;background:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));top:0px;width:100%;display:flex;flex-direction:column;padding:10px 0;z-index:5;height:30px}.FullScreenHeader .CloseStoryButton{position:absolute;right:0;width:20px;margin-right:20px;margin-top:8px;z-index:50}.FullScreenHeader .ProgressBarContainer{width:90%;height:2px;position:relative;top:0;background-color:var(--emw--color-grey-150, #828282);border-radius:10px;overflow:hidden;margin:0 auto}.FullScreenHeader .ProgressBarContainer .ProgressBar{height:100%;background:var(--emw--color-white, #ffffff);width:0%;transition:width 0.1s linear}.FullScreenStory{position:fixed;width:
|
|
86
|
+
const generalStoriesCss = ".ImageContainer{display:flex;flex-direction:row;background-color:var(--emw--color-background, #0E1511);overflow:auto}.StoryThumbnailContainer{margin:5px;position:relative;display:inline-block;border-radius:50%}.StoryThumbnailContainer.Highlighted::before{content:\"\";position:absolute;border-radius:50%;background:linear-gradient(to bottom, var(--emw--color-primary, #22B04E), var(--emw--color-secondary, #E1A749));top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailContainer.Viewed::before{content:\"\";position:absolute;border-radius:50%;height:50px;width:50px;background:var(--emw--color-grey-150, #828282);top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailImage{height:50px;width:50px;border-radius:50%;position:relative;z-index:1}.StoryThumbnailImage.Highlighted,.StoryThumbnailImage.Viewed{border:2px solid var(--emw--color-white, #ffffff)}.FullScreenHeader{position:fixed;top:0;background:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));top:0px;width:100%;display:flex;flex-direction:column;padding:10px 0;z-index:5;height:30px}.FullScreenHeader .CloseStoryButton{position:absolute;right:0;width:20px;margin-right:20px;margin-top:8px;z-index:50}.FullScreenHeader .ProgressBarContainer{width:90%;height:2px;position:relative;top:0;background-color:var(--emw--color-grey-150, #828282);border-radius:10px;overflow:hidden;margin:0 auto}.FullScreenHeader .ProgressBarContainer .ProgressBar{height:100%;background:var(--emw--color-white, #ffffff);width:0%;transition:width 0.1s linear}.FullScreenStory{position:fixed;top:0;width:100%;height:100%;background-color:var(--emw--color-grey-400, #24211f);display:flex;align-items:center;justify-content:center;overflow:hidden;z-index:300}.FullScreenStory video{height:100vh;width:100vw}.FullScreenStory img{width:100%;height:100%;object-fit:contain}.FullScreenStory .LoadMoreButtonBackground{width:100%;height:15%;background:linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));position:absolute;bottom:0;display:flex;justify-content:center}.FullScreenStory .LoadMoreButtonBackground .LoadMoreButton{width:auto;font-size:var(--emw--font-size-small, 14px);font-family:inherit;background-color:var(--emw--color-grey-50, #F9F8F8);box-shadow:0px 0px 7px 1px var(--emw--color-grey-400, #24211f);color:var(--emw--color-black, #000000);border-radius:50px;position:absolute;bottom:15px;padding:10px 20px}";
|
|
87
87
|
const GeneralStoriesStyle0 = generalStoriesCss;
|
|
88
88
|
|
|
89
89
|
const GeneralStories = class {
|
|
90
90
|
constructor(hostRef) {
|
|
91
91
|
registerInstance(this, hostRef);
|
|
92
|
-
/**
|
|
93
|
-
* Language of the widget
|
|
94
|
-
*/
|
|
95
|
-
this.language = 'en';
|
|
96
|
-
/**
|
|
97
|
-
* CMS Endpoint stage
|
|
98
|
-
*/
|
|
99
|
-
this.cmsEnv = 'stage';
|
|
100
|
-
/**
|
|
101
|
-
* Client custom styling via string
|
|
102
|
-
*/
|
|
103
|
-
this.clientStyling = '';
|
|
104
|
-
/**
|
|
105
|
-
* Client custom styling via url
|
|
106
|
-
*/
|
|
107
|
-
this.clientStylingUrl = '';
|
|
108
|
-
/**
|
|
109
|
-
* Translations via URL
|
|
110
|
-
*/
|
|
111
|
-
this.translationUrl = '';
|
|
112
|
-
/**
|
|
113
|
-
* Duration of progress bar
|
|
114
|
-
*/
|
|
115
|
-
this.progressBarDuration = 10;
|
|
116
92
|
this.hasErrors = false;
|
|
117
93
|
this.isLoading = true;
|
|
118
94
|
this.isSwipe = false;
|
|
119
|
-
this.currentStoryId = null;
|
|
120
|
-
this.progress = 0;
|
|
121
95
|
this.getStories = () => {
|
|
122
96
|
let url = new URL(`${this.cmsEndpoint}/${this.language}/stories`);
|
|
123
97
|
url.searchParams.append('env', this.cmsEnv);
|
|
@@ -213,6 +187,18 @@ const GeneralStories = class {
|
|
|
213
187
|
const open = () => this.openFullScreenStory(props.id);
|
|
214
188
|
return (h("div", { class: `StoryThumbnailContainer ${props.viewed ? 'Viewed' : 'Highlighted'}`, onTouchStart: open }, h("img", { class: `StoryThumbnailImage ${props.viewed ? 'Viewed' : 'Highlighted'}`, src: props.icon, alt: "story-icon" })));
|
|
215
189
|
};
|
|
190
|
+
this.cmsEndpoint = undefined;
|
|
191
|
+
this.language = 'en';
|
|
192
|
+
this.cmsEnv = 'stage';
|
|
193
|
+
this.clientStyling = '';
|
|
194
|
+
this.clientStylingUrl = '';
|
|
195
|
+
this.translationUrl = '';
|
|
196
|
+
this.progressBarDuration = 10;
|
|
197
|
+
this.currentStory = undefined;
|
|
198
|
+
this.currentStoryId = null;
|
|
199
|
+
this.progress = 0;
|
|
200
|
+
this.touchPosStart = undefined;
|
|
201
|
+
this.touchPosEnd = undefined;
|
|
216
202
|
}
|
|
217
203
|
handleStylingUpdate() {
|
|
218
204
|
if (this.clientStyling)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { G as general_stories } from './general-stories-
|
|
2
|
-
import './index-
|
|
1
|
+
export { G as general_stories } from './general-stories-2b03e517.js';
|
|
2
|
+
import './index-eb27780b.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-eb27780b.js';
|
|
2
|
+
export { s as setNonce } from './index-eb27780b.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|