@everymatrix/general-tutorial-slider 1.16.1

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.
Files changed (47) hide show
  1. package/dist/cjs/general-tutorial-slider.cjs.entry.js +332 -0
  2. package/dist/cjs/general-tutorial-slider.cjs.js +19 -0
  3. package/dist/cjs/index-18ec3908.js +1282 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.css +168 -0
  8. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.js +526 -0
  9. package/dist/collection/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +28 -0
  11. package/dist/collection/utils/utils.js +39 -0
  12. package/dist/components/general-tutorial-slider.d.ts +11 -0
  13. package/dist/components/general-tutorial-slider.js +365 -0
  14. package/dist/components/index.d.ts +26 -0
  15. package/dist/components/index.js +1 -0
  16. package/dist/esm/general-tutorial-slider.entry.js +328 -0
  17. package/dist/esm/general-tutorial-slider.js +17 -0
  18. package/dist/esm/index-a2165162.js +1256 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/loader.js +17 -0
  21. package/dist/esm/polyfills/core-js.js +11 -0
  22. package/dist/esm/polyfills/css-shim.js +1 -0
  23. package/dist/esm/polyfills/dom.js +79 -0
  24. package/dist/esm/polyfills/es5-html-element.js +1 -0
  25. package/dist/esm/polyfills/index.js +34 -0
  26. package/dist/esm/polyfills/system.js +6 -0
  27. package/dist/general-tutorial-slider/general-tutorial-slider.esm.js +1 -0
  28. package/dist/general-tutorial-slider/index.esm.js +0 -0
  29. package/dist/general-tutorial-slider/p-a878ee14.js +1 -0
  30. package/dist/general-tutorial-slider/p-b0314d40.entry.js +1 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/stencil.config.js +22 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-tutorial-slider/.stencil/packages/general-tutorial-slider/stencil.config.d.ts +2 -0
  35. package/dist/types/components/general-tutorial-slider/general-tutorial-slider.d.ts +90 -0
  36. package/dist/types/components.d.ts +141 -0
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  39. package/dist/types/utils/locale.utils.d.ts +1 -0
  40. package/dist/types/utils/utils.d.ts +9 -0
  41. package/loader/cdn.js +3 -0
  42. package/loader/index.cjs.js +3 -0
  43. package/loader/index.d.ts +12 -0
  44. package/loader/index.es2017.js +3 -0
  45. package/loader/index.js +4 -0
  46. package/loader/package.json +10 -0
  47. package/package.json +19 -0
@@ -0,0 +1,365 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ const DEFAULT_LANGUAGE = 'en';
4
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
5
+ const TRANSLATIONS = {
6
+ en: {
7
+ error: 'Error',
8
+ noResults: 'Loading, please wait ...',
9
+ },
10
+ hu: {
11
+ error: 'Error',
12
+ noResults: 'Loading, please wait ...',
13
+ },
14
+ ro: {
15
+ error: 'Eroare',
16
+ noResults: 'Loading, please wait ...',
17
+ },
18
+ fr: {
19
+ error: 'Error',
20
+ noResults: 'Loading, please wait ...',
21
+ },
22
+ ar: {
23
+ error: 'خطأ',
24
+ noResults: 'Loading, please wait ...',
25
+ }
26
+ };
27
+ const translate = (key, customLang) => {
28
+ const lang = customLang;
29
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
30
+ };
31
+
32
+ /**
33
+ * @name isMobile
34
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
35
+ * @param {String} userAgent window.navigator.userAgent
36
+ * @returns {Boolean} true or false
37
+ */
38
+ const isMobile = (userAgent) => {
39
+ return !!(userAgent.toLowerCase().match(/android/i) ||
40
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
41
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
42
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
43
+ };
44
+ const getDevice = () => {
45
+ let userAgent = window.navigator.userAgent;
46
+ if (userAgent.toLowerCase().match(/android/i)) {
47
+ return 'Android';
48
+ }
49
+ if (userAgent.toLowerCase().match(/iphone/i)) {
50
+ return 'iPhone';
51
+ }
52
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
53
+ return 'iPad';
54
+ }
55
+ return 'PC';
56
+ };
57
+ const getDevicePlatform = () => {
58
+ const device = getDevice();
59
+ if (device) {
60
+ if (device === 'PC') {
61
+ return 'dk';
62
+ }
63
+ else if (device === 'iPad' || device === 'iPhone') {
64
+ return 'ios';
65
+ }
66
+ else {
67
+ return 'mtWeb';
68
+ }
69
+ }
70
+ };
71
+
72
+ const generalTutorialSliderCss = ":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background: var(--emfe-w-color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n\n .TutorialItems {\n height: inherit;\n }\n\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";
73
+
74
+ const GeneralTutorialSlider$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
75
+ constructor() {
76
+ super();
77
+ this.__registerHost();
78
+ this.__attachShadow();
79
+ /**
80
+ * Client custom styling via inline style
81
+ */
82
+ this.clientStyling = '';
83
+ /**
84
+ * Client custom styling via url
85
+ */
86
+ this.clientStylingUrl = '';
87
+ /**
88
+ * Language of the widget
89
+ */
90
+ this.language = 'en';
91
+ /**
92
+ * User roles
93
+ */
94
+ this.userRoles = 'everyone';
95
+ /**
96
+ * CMS Endpoint stage
97
+ */
98
+ this.cmsEnv = 'stage';
99
+ /**
100
+ * Show slider dots
101
+ */
102
+ this.showSliderDots = true;
103
+ /**
104
+ * Show slider navigate arrows
105
+ */
106
+ this.showSliderArrows = true;
107
+ /**
108
+ * Show slider navigate arrows on mobile
109
+ */
110
+ this.showSliderArrowsMobile = false;
111
+ /**
112
+ * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
113
+ */
114
+ this.enableAutoScroll = false;
115
+ /**
116
+ * Set interval period for slider
117
+ */
118
+ this.intervalPeriod = 5000;
119
+ /**
120
+ * Set the number of slides you wish to display.
121
+ */
122
+ this.scrollItems = 1;
123
+ /**
124
+ * Set the number of slides you wish to display.
125
+ */
126
+ this.itemsPerPage = 1;
127
+ this.hasErrors = false;
128
+ this.limitStylingAppends = false;
129
+ this.isLoading = true;
130
+ this.activeIndex = 0;
131
+ this.tutorialElementWidth = 0;
132
+ this.userAgent = window.navigator.userAgent;
133
+ this.isMobile = isMobile(this.userAgent);
134
+ this.allElementsWidth = 0;
135
+ this.xDown = null;
136
+ this.yDown = null;
137
+ this.resizeHandler = () => {
138
+ this.recalculateItemsPerPage();
139
+ };
140
+ this.orientationChangeHandler = () => {
141
+ setTimeout(() => {
142
+ this.recalculateItemsPerPage();
143
+ }, 10);
144
+ };
145
+ this.setClientStyling = () => {
146
+ let sheet = document.createElement('style');
147
+ sheet.innerHTML = this.clientStyling;
148
+ this.stylingContainer.prepend(sheet);
149
+ };
150
+ this.setClientStylingURL = () => {
151
+ let url = new URL(this.clientStylingUrl);
152
+ let cssFile = document.createElement('style');
153
+ fetch(url.href)
154
+ .then((res) => res.text())
155
+ .then((data) => {
156
+ cssFile.innerHTML = data;
157
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
158
+ })
159
+ .catch((err) => {
160
+ console.log('error ', err);
161
+ });
162
+ };
163
+ }
164
+ watchEndpoint(newValue, oldValue) {
165
+ if (newValue && newValue != oldValue && this.cmsEndpoint) {
166
+ this.getGeneralTutorialSlider().then((tutorialContent) => {
167
+ this.tutorialData = tutorialContent;
168
+ });
169
+ }
170
+ }
171
+ connectedCallback() {
172
+ window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
173
+ }
174
+ componentWillLoad() {
175
+ if (this.cmsEndpoint && this.language) {
176
+ return this.getGeneralTutorialSlider().then((tutorialContent) => {
177
+ this.tutorialData = tutorialContent;
178
+ });
179
+ }
180
+ }
181
+ componentDidLoad() {
182
+ window.addEventListener('resize', this.resizeHandler);
183
+ }
184
+ componentDidRender() {
185
+ this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
186
+ this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
187
+ this.recalculateItemsPerPage();
188
+ // start custom styling area
189
+ if (!this.limitStylingAppends && this.stylingContainer) {
190
+ if (this.clientStyling)
191
+ this.setClientStyling();
192
+ if (this.clientStylingUrl)
193
+ this.setClientStylingURL();
194
+ this.limitStylingAppends = true;
195
+ }
196
+ // end custom styling area
197
+ }
198
+ componentDidUpdate() {
199
+ this.recalculateItemsPerPage();
200
+ }
201
+ disconnectedCallback() {
202
+ this.el.removeEventListener('touchstart', this.handleTouchStart);
203
+ this.el.removeEventListener('touchmove', this.handleTouchMove);
204
+ window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
205
+ window.removeEventListener('resize', this.resizeHandler);
206
+ }
207
+ getGeneralTutorialSlider() {
208
+ let url = new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);
209
+ url.searchParams.append('env', this.cmsEnv);
210
+ url.searchParams.append('userRoles', this.userRoles);
211
+ url.searchParams.append('device', getDevicePlatform());
212
+ return new Promise((resolve, reject) => {
213
+ this.isLoading = true;
214
+ fetch(url.href)
215
+ .then((res) => res.json())
216
+ .then((tutorialContent) => {
217
+ resolve(tutorialContent);
218
+ }).catch((err) => {
219
+ console.error(err);
220
+ this.hasErrors = true;
221
+ reject(err);
222
+ }).finally(() => {
223
+ this.isLoading = false;
224
+ });
225
+ });
226
+ }
227
+ move(direction) {
228
+ this.setActive(this.activeIndex + direction);
229
+ }
230
+ ;
231
+ //calculate itemsperpage by tutorials length to avoid empty in the tutorials end
232
+ recalculateItemsPerPage() {
233
+ if (!this.tutorialsElement)
234
+ return;
235
+ this.tutorialElementWidth = this.tutorialsElement.clientWidth;
236
+ this.allElementsWidth = (this.tutorialData.length - 1) * this.tutorialElementWidth;
237
+ }
238
+ ;
239
+ goTo(index) {
240
+ let diff = this.activeIndex - index;
241
+ if (diff > 0) {
242
+ for (let i = 0; i < diff; i++) {
243
+ this.move(-1);
244
+ }
245
+ }
246
+ else {
247
+ for (let i = 0; i > diff; i--) {
248
+ this.move(1);
249
+ }
250
+ }
251
+ }
252
+ handleTouchStart(evt) {
253
+ const firstTouch = this.getTouches(evt)[0];
254
+ this.xDown = firstTouch.clientX;
255
+ this.yDown = firstTouch.clientY;
256
+ }
257
+ getTouches(evt) {
258
+ return evt.touches || evt.originalEvent.touches;
259
+ }
260
+ handleTouchMove(evt) {
261
+ if (!this.xDown || !this.yDown)
262
+ return;
263
+ let xUp = evt.touches[0].clientX;
264
+ let yUp = evt.touches[0].clientY;
265
+ let xDiff = this.xDown - xUp;
266
+ let yDiff = this.yDown - yUp;
267
+ if (Math.abs(xDiff) > Math.abs(yDiff)) {
268
+ if (xDiff > 0) {
269
+ this.move(1);
270
+ }
271
+ else {
272
+ this.move(-1);
273
+ }
274
+ }
275
+ this.xDown = null;
276
+ this.yDown = null;
277
+ }
278
+ ;
279
+ setActive(index) {
280
+ const maxLength = this.tutorialData.length;
281
+ if (index >= 0) {
282
+ if (index >= maxLength - 1) {
283
+ this.activeIndex = maxLength - 1;
284
+ }
285
+ else {
286
+ this.activeIndex = index;
287
+ }
288
+ }
289
+ else {
290
+ this.activeIndex = 0;
291
+ }
292
+ }
293
+ renderDots() {
294
+ const dots = [];
295
+ for (let index = 0; index < this.tutorialData.length / this.itemsPerPage; index++) {
296
+ dots.push(h("li", { class: index == this.activeIndex ? 'active' : 'default', onClick: () => { this.goTo(index); this.setActive(index); } }));
297
+ }
298
+ return dots;
299
+ }
300
+ render() {
301
+ const styles = {
302
+ transform: `translate(${(this.allElementsWidth / (this.tutorialData.length - 1) * this.activeIndex) * -1}px, 0px)`
303
+ };
304
+ const itemStyle = {
305
+ width: `${this.tutorialElementWidth / this.itemsPerPage}px`
306
+ };
307
+ if (this.hasErrors) {
308
+ return (h("div", { class: "GeneralTutorialSliderError" }, h("div", { class: "TitleError" }, translate('error', this.language))));
309
+ }
310
+ if (!this.isLoading) {
311
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "TutorialWrapper" }, h("div", { class: "TutorialContent", ref: (el) => this.slider = el }, ((this.showSliderArrows && !this.isMobile) ||
312
+ (this.showSliderArrowsMobile && this.isMobile)) &&
313
+ h("div", { class: this.activeIndex === 0 ? 'SliderNavButton DisabledArrow' : 'SliderNavButton', onClick: () => this.move(-1) }, h("svg", { fill: "none", stroke: "var(--emfe-w-color-secondary, #FD2839)", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))), h("main", null, h("div", { style: styles, ref: (el) => this.tutorialsElement = el, class: "TutorialItems" }, this.tutorialData.map((data) => {
314
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
315
+ return h("div", { class: "TutorialItem", style: itemStyle }, h("div", { class: "ItemTitle", innerHTML: data === null || data === void 0 ? void 0 : data.title }), ((_a = data === null || data === void 0 ? void 0 : data.media) === null || _a === void 0 ? void 0 : _a.images) ? (h("div", { class: "ItemImage" }, this.isMobile ? (h("img", { src: (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.media) === null || _b === void 0 ? void 0 : _b.images[0]) === null || _c === void 0 ? void 0 : _c.sources) === null || _d === void 0 ? void 0 : _d.find((source) => source.media === 'mobile')) === null || _e === void 0 ? void 0 : _e.src, alt: data === null || data === void 0 ? void 0 : data.slug })) : (h("img", { src: (_j = (_h = (_g = (_f = data === null || data === void 0 ? void 0 : data.media) === null || _f === void 0 ? void 0 : _f.images[0]) === null || _g === void 0 ? void 0 : _g.sources) === null || _h === void 0 ? void 0 : _h.find((source) => source.media === 'desktop')) === null || _j === void 0 ? void 0 : _j.src, alt: data === null || data === void 0 ? void 0 : data.slug })))) : ((_k = data === null || data === void 0 ? void 0 : data.media) === null || _k === void 0 ? void 0 : _k.video) ? (h("div", { class: "ItemImage" }, this.isMobile ? (h("video", { controls: true, loop: true, autoplay: true }, h("source", { src: (_p = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.media) === null || _l === void 0 ? void 0 : _l.video[0]) === null || _m === void 0 ? void 0 : _m.sources) === null || _o === void 0 ? void 0 : _o.find((source) => source.media === 'mobile')) === null || _p === void 0 ? void 0 : _p.src, type: "video/mp4" }))) : (h("video", { controls: true, loop: true, autoplay: true }, h("source", { src: (_t = (_s = (_r = (_q = data === null || data === void 0 ? void 0 : data.media) === null || _q === void 0 ? void 0 : _q.video[0]) === null || _r === void 0 ? void 0 : _r.sources) === null || _s === void 0 ? void 0 : _s.find((source) => source.media === 'desktop')) === null || _t === void 0 ? void 0 : _t.src, type: "video/mp4" }))))) : null, h("div", { class: "ItemDescription", innerHTML: data === null || data === void 0 ? void 0 : data.content }));
316
+ }))), ((this.showSliderArrows && !this.isMobile) ||
317
+ (this.showSliderArrowsMobile && this.isMobile)) &&
318
+ h("div", { class: this.activeIndex === this.tutorialData.length - 1 ? ' SliderNavButton DisabledArrow disabled' : 'SliderNavButton', onClick: () => this.move(1) }, h("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" }))), h("div", null)), this.showSliderDots &&
319
+ h("div", { class: "DotsWrapper" }, h("ul", { class: "Dots" }, this.renderDots())))));
320
+ }
321
+ }
322
+ get el() { return this; }
323
+ static get watchers() { return {
324
+ "cmsEndpoint": ["watchEndpoint"],
325
+ "language": ["watchEndpoint"]
326
+ }; }
327
+ static get style() { return generalTutorialSliderCss; }
328
+ }, [1, "general-tutorial-slider", {
329
+ "clientStyling": [513, "client-styling"],
330
+ "clientStylingUrl": [513, "client-styling-url"],
331
+ "language": [513],
332
+ "cmsEndpoint": [513, "cms-endpoint"],
333
+ "userRoles": [513, "user-roles"],
334
+ "cmsEnv": [513, "cms-env"],
335
+ "showSliderDots": [516, "show-slider-dots"],
336
+ "showSliderArrows": [516, "show-slider-arrows"],
337
+ "showSliderArrowsMobile": [516, "show-slider-arrows-mobile"],
338
+ "enableAutoScroll": [516, "enable-auto-scroll"],
339
+ "intervalPeriod": [514, "interval-period"],
340
+ "scrollItems": [520, "scroll-items"],
341
+ "itemsPerPage": [514, "items-per-page"],
342
+ "hasErrors": [32],
343
+ "limitStylingAppends": [32],
344
+ "isLoading": [32],
345
+ "activeIndex": [32],
346
+ "tutorialElementWidth": [32]
347
+ }]);
348
+ function defineCustomElement$1() {
349
+ if (typeof customElements === "undefined") {
350
+ return;
351
+ }
352
+ const components = ["general-tutorial-slider"];
353
+ components.forEach(tagName => { switch (tagName) {
354
+ case "general-tutorial-slider":
355
+ if (!customElements.get(tagName)) {
356
+ customElements.define(tagName, GeneralTutorialSlider$1);
357
+ }
358
+ break;
359
+ } });
360
+ }
361
+
362
+ const GeneralTutorialSlider = GeneralTutorialSlider$1;
363
+ const defineCustomElement = defineCustomElement$1;
364
+
365
+ export { GeneralTutorialSlider, defineCustomElement };
@@ -0,0 +1,26 @@
1
+ /* GeneralTutorialSlider custom elements */
2
+
3
+ import type { Components, JSX } from "../types/components";
4
+
5
+ /**
6
+ * Used to manually set the base path where assets can be found.
7
+ * If the script is used as "module", it's recommended to use "import.meta.url",
8
+ * such as "setAssetPath(import.meta.url)". Other options include
9
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
+ * But do note that this configuration depends on how your script is bundled, or lack of
12
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
13
+ * will have to ensure the static assets are copied to its build directory.
14
+ */
15
+ export declare const setAssetPath: (path: string) => void;
16
+
17
+ export interface SetPlatformOptions {
18
+ raf?: (c: FrameRequestCallback) => number;
19
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
20
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
21
+ }
22
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
23
+
24
+ export type { Components, JSX };
25
+
26
+ export * from '../types';
@@ -0,0 +1 @@
1
+ export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';