@everymatrix/player-elevate-points-history 1.31.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.
Files changed (100) hide show
  1. package/dist/assets/back.svg +3 -0
  2. package/dist/assets/menu.svg +5 -0
  3. package/dist/cjs/bonus-pagination-limits_6.cjs.entry.js +1115 -0
  4. package/dist/cjs/index-974f5239.js +1686 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/loader.cjs.js +21 -0
  7. package/dist/cjs/player-elevate-card-items-67656c5f.js +2477 -0
  8. package/dist/cjs/player-elevate-card.cjs.entry.js +77 -0
  9. package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +84 -0
  10. package/dist/cjs/player-elevate-points-history.cjs.js +19 -0
  11. package/dist/collection/collection-manifest.json +40 -0
  12. package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.css +174 -0
  13. package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +395 -0
  14. package/dist/collection/index.js +1 -0
  15. package/dist/collection/renders/renderTabs.js +11 -0
  16. package/dist/collection/renders/renderTopBar.js +12 -0
  17. package/dist/collection/renders/renderWallets.js +44 -0
  18. package/dist/collection/static/back.svg +3 -0
  19. package/dist/collection/static/menu.svg +5 -0
  20. package/dist/collection/utils/business.js +17 -0
  21. package/dist/collection/utils/fetch.js +17 -0
  22. package/dist/collection/utils/translation.js +35 -0
  23. package/dist/collection/utils/types.js +6 -0
  24. package/dist/collection/utils/util.js +16 -0
  25. package/dist/components/bonus-pagination-limits.js +6 -0
  26. package/dist/components/bonus-pagination-limits2.js +111 -0
  27. package/dist/components/bonus-pagination-nav.js +6 -0
  28. package/dist/components/bonus-pagination-nav2.js +219 -0
  29. package/dist/components/general-styling-wrapper.js +6 -0
  30. package/dist/components/general-styling-wrapper2.js +104 -0
  31. package/dist/components/index.d.ts +26 -0
  32. package/dist/components/index.js +1 -0
  33. package/dist/components/player-elevate-card-data.js +6 -0
  34. package/dist/components/player-elevate-card-data2.js +625 -0
  35. package/dist/components/player-elevate-card-items.js +2250 -0
  36. package/dist/components/player-elevate-card.js +119 -0
  37. package/dist/components/player-elevate-loyaltycard.js +125 -0
  38. package/dist/components/player-elevate-pointcard.js +6 -0
  39. package/dist/components/player-elevate-pointcard2.js +125 -0
  40. package/dist/components/player-elevate-points-history.d.ts +11 -0
  41. package/dist/components/player-elevate-points-history.js +363 -0
  42. package/dist/esm/bonus-pagination-limits_6.entry.js +1106 -0
  43. package/dist/esm/index-18159ab2.js +1657 -0
  44. package/dist/esm/index.js +1 -0
  45. package/dist/esm/loader.js +17 -0
  46. package/dist/esm/player-elevate-card-items-96ed621b.js +2464 -0
  47. package/dist/esm/player-elevate-card.entry.js +73 -0
  48. package/dist/esm/player-elevate-loyaltycard.entry.js +80 -0
  49. package/dist/esm/player-elevate-points-history.js +17 -0
  50. package/dist/esm/polyfills/core-js.js +11 -0
  51. package/dist/esm/polyfills/css-shim.js +1 -0
  52. package/dist/esm/polyfills/dom.js +79 -0
  53. package/dist/esm/polyfills/es5-html-element.js +1 -0
  54. package/dist/esm/polyfills/index.js +34 -0
  55. package/dist/esm/polyfills/system.js +6 -0
  56. package/dist/index.cjs.js +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/player-elevate-points-history/index.esm.js +0 -0
  59. package/dist/player-elevate-points-history/p-3073cebd.js +1 -0
  60. package/dist/player-elevate-points-history/p-50a08f34.entry.js +1 -0
  61. package/dist/player-elevate-points-history/p-a937ac54.js +1 -0
  62. package/dist/player-elevate-points-history/p-b0fd409d.entry.js +1 -0
  63. package/dist/player-elevate-points-history/p-e44be562.entry.js +1 -0
  64. package/dist/player-elevate-points-history/player-elevate-points-history.esm.js +1 -0
  65. package/dist/static/button-default.svg +42 -0
  66. package/dist/static/button-disabled.svg +4 -0
  67. package/dist/static/button-hover.svg +4 -0
  68. package/dist/static/button-level.svg +27 -0
  69. package/dist/static/button-pressed.svg +18 -0
  70. package/dist/static/button-redeem.svg +36 -0
  71. package/dist/static/card-ground-over.png +0 -0
  72. package/dist/static/card-ground-over.svg +903 -0
  73. package/dist/static/card-ground.png +0 -0
  74. package/dist/static/card-ground.svg +34 -0
  75. package/dist/static/info.svg +4 -0
  76. package/dist/static/level-badge.png +0 -0
  77. package/dist/static/level-percent.svg +80 -0
  78. package/dist/static/tips-info.svg +21 -0
  79. package/dist/static/user.svg +3 -0
  80. package/dist/stencil.config.js +31 -0
  81. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/player-elevate-points-history/.stencil/packages/player-elevate-points-history/stencil.config.d.ts +2 -0
  82. package/dist/types/components/player-elevate-points-history/player-elevate-points-history.d.ts +66 -0
  83. package/dist/types/components.d.ts +126 -0
  84. package/dist/types/index.d.ts +1 -0
  85. package/dist/types/renders/renderTabs.d.ts +3 -0
  86. package/dist/types/renders/renderTopBar.d.ts +3 -0
  87. package/dist/types/renders/renderWallets.d.ts +3 -0
  88. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  89. package/dist/types/utils/business.d.ts +2 -0
  90. package/dist/types/utils/fetch.d.ts +2 -0
  91. package/dist/types/utils/translation.d.ts +35 -0
  92. package/dist/types/utils/types.d.ts +41 -0
  93. package/dist/types/utils/util.d.ts +1 -0
  94. package/loader/cdn.js +3 -0
  95. package/loader/index.cjs.js +3 -0
  96. package/loader/index.d.ts +12 -0
  97. package/loader/index.es2017.js +3 -0
  98. package/loader/index.js +4 -0
  99. package/loader/package.json +10 -0
  100. package/package.json +31 -0
@@ -0,0 +1,111 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './general-styling-wrapper2.js';
3
+
4
+ const DEFAULT_LANGUAGE = 'en';
5
+ const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
6
+ const TRANSLATIONS = {
7
+ en: {
8
+ "pageLimitLabel": 'Show',
9
+ },
10
+ hu: {
11
+ "pageLimitLabel": 'Show',
12
+ },
13
+ hr: {
14
+ "pageLimitLabel": 'Show',
15
+ },
16
+ "pt-br": {
17
+ "pageLimitLabel": 'Show',
18
+ },
19
+ "es-mx": {
20
+ "pageLimitLabel": 'Show',
21
+ }
22
+ };
23
+ const translate = (key, customLang) => {
24
+ const lang = customLang;
25
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
26
+ };
27
+
28
+ const bonusPaginationLimitsCss = ":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";
29
+
30
+ const BonusPaginationLimits = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
31
+ constructor() {
32
+ super();
33
+ this.__registerHost();
34
+ this.pageLimitChanged = createEvent(this, "pageLimitChanged", 7);
35
+ /**
36
+ * Language of the widget
37
+ */
38
+ this.language = 'en';
39
+ /**
40
+ * Translation via url
41
+ */
42
+ this.translationUrl = '';
43
+ /**
44
+ * Default limit for per page, default: 10
45
+ */
46
+ this.limit = 10;
47
+ this.pageLimits = [10, 25, 50];
48
+ }
49
+ onPageLimitClicked(pageLimit) {
50
+ this.limit = pageLimit;
51
+ this.pageLimitChanged.emit({ limit: this.limit });
52
+ }
53
+ componentWillLoad() {
54
+ if (!this.pageLimitOptions) {
55
+ return;
56
+ }
57
+ try {
58
+ this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
59
+ return parseInt(item);
60
+ });
61
+ // if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
62
+ // and the value for the custom set limit (e.g. 8) isn't part of the provided array,
63
+ // then ignore the set the custom set limit and make the limit equal to the first value of the array
64
+ // (as part of the example so far, this would be 5)
65
+ if (!this.pageLimits.includes(this.limit)) {
66
+ this.limit = this.pageLimits[0];
67
+ }
68
+ }
69
+ catch (e) {
70
+ console.error('Error when parse PageLimitOptions', e);
71
+ }
72
+ }
73
+ renderStylingWrapper() {
74
+ return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
75
+ }
76
+ render() {
77
+ return h("div", { class: 'PaginationWrapper' }, h("span", { class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
78
+ return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
79
+ this.onPageLimitClicked(pageLimit);
80
+ } }, pageLimit));
81
+ })), h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
82
+ }
83
+ static get style() { return bonusPaginationLimitsCss; }
84
+ }, [0, "bonus-pagination-limits", {
85
+ "language": [513],
86
+ "translationUrl": [513, "translation-url"],
87
+ "pageLimitOptions": [513, "page-limit-options"],
88
+ "limit": [1538],
89
+ "pageLimits": [32]
90
+ }]);
91
+ function defineCustomElement() {
92
+ if (typeof customElements === "undefined") {
93
+ return;
94
+ }
95
+ const components = ["bonus-pagination-limits", "general-styling-wrapper"];
96
+ components.forEach(tagName => { switch (tagName) {
97
+ case "bonus-pagination-limits":
98
+ if (!customElements.get(tagName)) {
99
+ customElements.define(tagName, BonusPaginationLimits);
100
+ }
101
+ break;
102
+ case "general-styling-wrapper":
103
+ if (!customElements.get(tagName)) {
104
+ defineCustomElement$1();
105
+ }
106
+ break;
107
+ } });
108
+ }
109
+ defineCustomElement();
110
+
111
+ export { BonusPaginationLimits as B, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { B as BonusPaginationNav$1, d as defineCustomElement$1 } from './bonus-pagination-nav2.js';
2
+
3
+ const BonusPaginationNav = BonusPaginationNav$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { BonusPaginationNav, defineCustomElement };
@@ -0,0 +1,219 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './general-styling-wrapper2.js';
3
+
4
+ const DEFAULT_LANGUAGE = 'en';
5
+ const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
6
+ const TRANSLATIONS = {
7
+ "en": {
8
+ "firstPage": '|<',
9
+ "lastPage": '>|',
10
+ "prePage": '<',
11
+ "nextPage": '>',
12
+ "pageOfTotal": '{start}-{end} of {total}',
13
+ },
14
+ "hu": {
15
+ "firstPage": 'First',
16
+ "lastPage": 'Last',
17
+ "prePage": '<',
18
+ "nextPage": '>',
19
+ "pageOfTotal": '{start}-{end} of {total}',
20
+ },
21
+ "hr": {
22
+ "firstPage": 'First',
23
+ "lastPage": 'Last',
24
+ "prePage": '<',
25
+ "nextPage": '>',
26
+ "pageOfTotal": '{start}-{end} of {total}',
27
+ },
28
+ "pt-br": {
29
+ "firstPage": 'First',
30
+ "lastPage": 'Last',
31
+ "prePage": '<',
32
+ "nextPage": '>',
33
+ "pageOfTotal": '{start}-{end} of {total}',
34
+ },
35
+ "es-mx": {
36
+ "firstPage": 'First',
37
+ "lastPage": 'Last',
38
+ "prePage": '<',
39
+ "nextPage": '>',
40
+ "pageOfTotal": '{start}-{end} of {total}',
41
+ }
42
+ };
43
+ const translate = (key, customLang, values) => {
44
+ const lang = customLang;
45
+ let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
46
+ if (values !== undefined) {
47
+ for (const [key, value] of Object.entries(values.values)) {
48
+ const regex = new RegExp(`{${key}}`, 'g');
49
+ translation = translation.replace(regex, value);
50
+ }
51
+ }
52
+ return translation;
53
+ };
54
+
55
+ const bonusPaginationNavCss = ":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";
56
+
57
+ const BonusPaginationNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
58
+ constructor() {
59
+ super();
60
+ this.__registerHost();
61
+ this.reloadPageEmitter = createEvent(this, "reloadPageByType", 7);
62
+ /**
63
+ * The received length of dataset
64
+ */
65
+ this.total = 1;
66
+ /**
67
+ * The received limit for the number of pages
68
+ */
69
+ this.limit = 10;
70
+ /**
71
+ * The offset of dataset
72
+ */
73
+ this.offset = 0;
74
+ /**
75
+ * The table id, use to identify which table listen the page change message
76
+ * when there is more than 1 table on same page
77
+ */
78
+ this.tableId = 'default';
79
+ /**
80
+ * Language
81
+ */
82
+ this.language = 'en';
83
+ /**
84
+ * Translation via url
85
+ */
86
+ this.translationUrl = '';
87
+ /**
88
+ * Customize pagination: Activate pagination arrows
89
+ */
90
+ this.arrowsActive = true;
91
+ /**
92
+ * Customize pagination: Activate pagination secondary arrows
93
+ */
94
+ this.secondaryArrowsActive = true;
95
+ /**
96
+ * Customize pagination: Activate pagination numbered navigation
97
+ */
98
+ this.displayPageNumbers = true;
99
+ this.endPageIndex = 0;
100
+ this.currentPage = 1;
101
+ }
102
+ pageLimitChangedHandler(event) {
103
+ this.limit = event.detail.limit ? event.detail.limit : this.limit;
104
+ //reset offset = 0, this.currentPage = 1 when page limit changed
105
+ this.currentPage = 1;
106
+ this.offset = 0;
107
+ this.updatePageStatus();
108
+ if (event.type == 'pageLimitChanged') {
109
+ this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
110
+ }
111
+ }
112
+ goTo(step) {
113
+ if (step == '...' || step == 0 || step > this.endPageIndex + 1) {
114
+ return;
115
+ }
116
+ this.currentPage = step;
117
+ let offset = (this.currentPage - 1) * this.limit;
118
+ this.reloadPageEmitter.emit({ offset, limit: this.limit, tableId: this.tableId });
119
+ }
120
+ renderPageList() {
121
+ return h("ul", { class: 'PaginationArea' }, this.pagesArray.map((page) => {
122
+ return (h("li", { class: `PageItem ${this.currentPage == page ? 'Active' : ''}`, onClick: () => {
123
+ this.goTo(page);
124
+ } }, page));
125
+ }));
126
+ }
127
+ renderStylingWrapper() {
128
+ return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
129
+ }
130
+ updatePageStatus() {
131
+ this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
132
+ this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
133
+ this.pagesArray = [];
134
+ if (this.endPageIndex < 5) {
135
+ this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
136
+ }
137
+ else {
138
+ /**
139
+ * Construct numbered navigation area based on current page position
140
+ */
141
+ if (this.currentPage == 1 || this.currentPage == 2) {
142
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
143
+ this.pagesArray.push('...');
144
+ }
145
+ else if (this.currentPage >= 3 && ((this.endPageIndex - this.currentPage) >= 2)) {
146
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
147
+ this.pagesArray.push('...');
148
+ this.pagesArray.unshift('...');
149
+ }
150
+ else if ((this.endPageIndex - this.currentPage) < 3) {
151
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endPageIndex - 2 + i);
152
+ this.pagesArray.unshift('...');
153
+ }
154
+ }
155
+ }
156
+ componentWillRender() {
157
+ this.currentPage = Math.floor(this.offset / this.limit) + 1;
158
+ this.updatePageStatus();
159
+ }
160
+ render() {
161
+ const startOffset = (this.currentPage - 1) * this.limit + 1;
162
+ const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
163
+ return h("div", { class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && h("span", { class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
164
+ values: {
165
+ start: startOffset,
166
+ end: endOffset,
167
+ total: this.total
168
+ }
169
+ })), h("div", { class: 'PageNavigation' }, this.arrowsActive &&
170
+ h("div", { class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
171
+ this.goTo(1);
172
+ } }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
173
+ h("span", { class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
174
+ this.goTo(this.currentPage - 1);
175
+ } }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
176
+ h("span", { class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
177
+ this.goTo(this.currentPage + 1);
178
+ } }, translate('nextPage', this.language)), this.arrowsActive &&
179
+ h("div", { class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
180
+ this.goTo(this.endPageIndex + 1);
181
+ } }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
182
+ }
183
+ static get style() { return bonusPaginationNavCss; }
184
+ }, [0, "bonus-pagination-nav", {
185
+ "total": [1538],
186
+ "limit": [1538],
187
+ "offset": [1538],
188
+ "tableId": [1537, "table-id"],
189
+ "language": [1537],
190
+ "translationUrl": [513, "translation-url"],
191
+ "arrowsActive": [1540, "arrows-active"],
192
+ "secondaryArrowsActive": [1540, "secondary-arrows-active"],
193
+ "displayPageNumbers": [1540, "display-page-numbers"],
194
+ "displayRangeOfTotal": [1540, "display-range-of-total"],
195
+ "endPageIndex": [32],
196
+ "pagesArray": [32],
197
+ "currentPage": [32]
198
+ }, [[8, "paginationReset", "pageLimitChangedHandler"], [8, "pageLimitChanged", "pageLimitChangedHandler"]]]);
199
+ function defineCustomElement() {
200
+ if (typeof customElements === "undefined") {
201
+ return;
202
+ }
203
+ const components = ["bonus-pagination-nav", "general-styling-wrapper"];
204
+ components.forEach(tagName => { switch (tagName) {
205
+ case "bonus-pagination-nav":
206
+ if (!customElements.get(tagName)) {
207
+ customElements.define(tagName, BonusPaginationNav);
208
+ }
209
+ break;
210
+ case "general-styling-wrapper":
211
+ if (!customElements.get(tagName)) {
212
+ defineCustomElement$1();
213
+ }
214
+ break;
215
+ } });
216
+ }
217
+ defineCustomElement();
218
+
219
+ export { BonusPaginationNav as B, defineCustomElement as d };
@@ -0,0 +1,6 @@
1
+ import { G as GeneralStylingWrapper$1, d as defineCustomElement$1 } from './general-styling-wrapper2.js';
2
+
3
+ const GeneralStylingWrapper = GeneralStylingWrapper$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { GeneralStylingWrapper, defineCustomElement };
@@ -0,0 +1,104 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ const mergeTranslations = (url, target) => {
4
+ return new Promise((resolve) => {
5
+ fetch(url)
6
+ .then((res) => res.json())
7
+ .then((data) => {
8
+ Object.keys(data).forEach((item) => {
9
+ target[item] = target[item] ? target[item] : {};
10
+ for (let key in data[item]) {
11
+ target[item][key] = data[item][key];
12
+ }
13
+ });
14
+ resolve(true);
15
+ });
16
+ });
17
+ };
18
+
19
+ const generalStylingWrapperCss = ":host{display:block}";
20
+
21
+ const GeneralStylingWrapper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ /**
26
+ * Client custom styling via inline styles
27
+ */
28
+ this.clientStyling = '';
29
+ /**
30
+ * Client custom styling via url
31
+ */
32
+ this.clientStylingUrl = '';
33
+ /**
34
+ * Translation via url
35
+ */
36
+ this.translationUrl = '';
37
+ this.stylingAppends = false;
38
+ this.setClientStyling = () => {
39
+ let sheet = document.createElement('style');
40
+ sheet.innerHTML = this.clientStyling;
41
+ this.el.prepend(sheet);
42
+ };
43
+ this.setClientStylingURL = () => {
44
+ let url = new URL(this.clientStylingUrl);
45
+ let cssFile = document.createElement('style');
46
+ fetch(url.href)
47
+ .then((res) => res.text())
48
+ .then((data) => {
49
+ cssFile.innerHTML = data;
50
+ setTimeout(() => {
51
+ this.el.prepend(cssFile);
52
+ }, 1);
53
+ })
54
+ .catch((err) => {
55
+ console.log('error ', err);
56
+ });
57
+ };
58
+ }
59
+ componentDidRender() {
60
+ // start custom styling area
61
+ if (!this.stylingAppends) {
62
+ if (this.clientStyling)
63
+ this.setClientStyling();
64
+ if (this.clientStylingUrl)
65
+ this.setClientStylingURL();
66
+ this.stylingAppends = true;
67
+ }
68
+ // end custom styling area
69
+ }
70
+ async componentWillLoad() {
71
+ const promises = [];
72
+ if (this.translationUrl) {
73
+ const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
74
+ promises.push(translationPromise);
75
+ }
76
+ return await Promise.all(promises);
77
+ }
78
+ render() {
79
+ return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
80
+ }
81
+ get el() { return this; }
82
+ static get style() { return generalStylingWrapperCss; }
83
+ }, [4, "general-styling-wrapper", {
84
+ "clientStyling": [1, "client-styling"],
85
+ "clientStylingUrl": [1, "client-styling-url"],
86
+ "translationUrl": [1, "translation-url"],
87
+ "targetTranslations": [16]
88
+ }]);
89
+ function defineCustomElement() {
90
+ if (typeof customElements === "undefined") {
91
+ return;
92
+ }
93
+ const components = ["general-styling-wrapper"];
94
+ components.forEach(tagName => { switch (tagName) {
95
+ case "general-styling-wrapper":
96
+ if (!customElements.get(tagName)) {
97
+ customElements.define(tagName, GeneralStylingWrapper);
98
+ }
99
+ break;
100
+ } });
101
+ }
102
+ defineCustomElement();
103
+
104
+ export { GeneralStylingWrapper as G, defineCustomElement as d };
@@ -0,0 +1,26 @@
1
+ /* PlayerElevatePointsHistory 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';
@@ -0,0 +1,6 @@
1
+ import { P as PlayerElevateCardData$1, d as defineCustomElement$1 } from './player-elevate-card-data2.js';
2
+
3
+ const PlayerElevateCardData = PlayerElevateCardData$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { PlayerElevateCardData, defineCustomElement };