@everymatrix/bonus-pagination-nav 1.31.2 → 1.32.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/LICENSE +21 -0
- package/package.json +3 -2
- package/dist/bonus-pagination-nav/bonus-pagination-nav.esm.js +0 -1
- package/dist/bonus-pagination-nav/index.esm.js +0 -0
- package/dist/bonus-pagination-nav/p-06373b64.js +0 -1
- package/dist/bonus-pagination-nav/p-fc173a41.entry.js +0 -1
- package/dist/cjs/bonus-pagination-nav.cjs.entry.js +0 -188
- package/dist/cjs/bonus-pagination-nav.cjs.js +0 -19
- package/dist/cjs/index-fb15607a.js +0 -1189
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/collection/collection-manifest.json +0 -12
- package/dist/collection/components/bonus-pagination-nav/bonus-pagination-nav.css +0 -51
- package/dist/collection/components/bonus-pagination-nav/bonus-pagination-nav.js +0 -359
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/locale.utils.js +0 -65
- package/dist/components/bonus-pagination-nav.d.ts +0 -11
- package/dist/components/bonus-pagination-nav.js +0 -215
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/bonus-pagination-nav.entry.js +0 -184
- package/dist/esm/bonus-pagination-nav.js +0 -17
- package/dist/esm/index-7299a1fa.js +0 -1163
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stencil.config.js +0 -24
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/bonus-pagination-nav/.stencil/packages/bonus-pagination-nav/stencil.config.d.ts +0 -2
- package/dist/types/components/bonus-pagination-nav/bonus-pagination-nav.d.ts +0 -55
- package/dist/types/components.d.ts +0 -118
- package/dist/types/index.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/dist/types/utils/locale.utils.d.ts +0 -17
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
package/dist/cjs/index.cjs.js
DELETED
package/dist/cjs/loader.cjs.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-fb15607a.js');
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
9
|
-
*/
|
|
10
|
-
const patchEsm = () => {
|
|
11
|
-
return index.promiseResolve();
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const defineCustomElements = (win, options) => {
|
|
15
|
-
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
-
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["bonus-pagination-nav.cjs",[[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]]]]], options);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.PageNavigationWrapper {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
}
|
|
9
|
-
.PageNavigationWrapper .PageOfMessage {
|
|
10
|
-
margin: 5px;
|
|
11
|
-
padding: 5px 6px;
|
|
12
|
-
margin: 2px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.PageNavigation {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: row;
|
|
18
|
-
align-items: center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.PageNavigation .PageArrow {
|
|
22
|
-
color: var(--emfe-w-color-primary, #777676);
|
|
23
|
-
padding: 6px 5px;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
font-weight: bold;
|
|
26
|
-
width: 1.2rem;
|
|
27
|
-
text-align: center;
|
|
28
|
-
}
|
|
29
|
-
.PageNavigation .PageArrow.Disabled {
|
|
30
|
-
color: var(--emfe-w-color-gray-100, #e0e0e0);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ul.PaginationArea {
|
|
34
|
-
list-style: none;
|
|
35
|
-
padding: 0px;
|
|
36
|
-
margin: 0px;
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
ul.PaginationArea li.PageItem {
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: 5px 6px;
|
|
42
|
-
margin: 2px;
|
|
43
|
-
width: 0.9rem;
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
ul.PaginationArea li.PageItem.Active, ul.PaginationArea li.PageItem:hover {
|
|
47
|
-
font-weight: bold;
|
|
48
|
-
color: var(--emfe-w-color-primary, #f5f1f1);
|
|
49
|
-
background-color: var(--emfe-w-color-secondary, #8c8989);
|
|
50
|
-
border-radius: 0.3rem;
|
|
51
|
-
}
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import { Component, Event, h, Listen, Prop, State } from '@stencil/core';
|
|
2
|
-
import { translate, TRANSLATIONS } from "../../utils/locale.utils";
|
|
3
|
-
export class BonusPaginationNav {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* The received length of dataset
|
|
7
|
-
*/
|
|
8
|
-
this.total = 1;
|
|
9
|
-
/**
|
|
10
|
-
* The received limit for the number of pages
|
|
11
|
-
*/
|
|
12
|
-
this.limit = 10;
|
|
13
|
-
/**
|
|
14
|
-
* The offset of dataset
|
|
15
|
-
*/
|
|
16
|
-
this.offset = 0;
|
|
17
|
-
/**
|
|
18
|
-
* The table id, use to identify which table listen the page change message
|
|
19
|
-
* when there is more than 1 table on same page
|
|
20
|
-
*/
|
|
21
|
-
this.tableId = 'default';
|
|
22
|
-
/**
|
|
23
|
-
* Language
|
|
24
|
-
*/
|
|
25
|
-
this.language = 'en';
|
|
26
|
-
/**
|
|
27
|
-
* Translation via url
|
|
28
|
-
*/
|
|
29
|
-
this.translationUrl = '';
|
|
30
|
-
/**
|
|
31
|
-
* Customize pagination: Activate pagination arrows
|
|
32
|
-
*/
|
|
33
|
-
this.arrowsActive = true;
|
|
34
|
-
/**
|
|
35
|
-
* Customize pagination: Activate pagination secondary arrows
|
|
36
|
-
*/
|
|
37
|
-
this.secondaryArrowsActive = true;
|
|
38
|
-
/**
|
|
39
|
-
* Customize pagination: Activate pagination numbered navigation
|
|
40
|
-
*/
|
|
41
|
-
this.displayPageNumbers = true;
|
|
42
|
-
this.endPageIndex = 0;
|
|
43
|
-
this.currentPage = 1;
|
|
44
|
-
}
|
|
45
|
-
pageLimitChangedHandler(event) {
|
|
46
|
-
this.limit = event.detail.limit ? event.detail.limit : this.limit;
|
|
47
|
-
//reset offset = 0, this.currentPage = 1 when page limit changed
|
|
48
|
-
this.currentPage = 1;
|
|
49
|
-
this.offset = 0;
|
|
50
|
-
this.updatePageStatus();
|
|
51
|
-
if (event.type == 'pageLimitChanged') {
|
|
52
|
-
this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
goTo(step) {
|
|
56
|
-
if (step == '...' || step == 0 || step > this.endPageIndex + 1) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
this.currentPage = step;
|
|
60
|
-
let offset = (this.currentPage - 1) * this.limit;
|
|
61
|
-
this.reloadPageEmitter.emit({ offset, limit: this.limit, tableId: this.tableId });
|
|
62
|
-
}
|
|
63
|
-
renderPageList() {
|
|
64
|
-
return h("ul", { class: 'PaginationArea' }, this.pagesArray.map((page) => {
|
|
65
|
-
return (h("li", { class: `PageItem ${this.currentPage == page ? 'Active' : ''}`, onClick: () => {
|
|
66
|
-
this.goTo(page);
|
|
67
|
-
} }, page));
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
|
-
renderStylingWrapper() {
|
|
71
|
-
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
72
|
-
}
|
|
73
|
-
updatePageStatus() {
|
|
74
|
-
this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
|
|
75
|
-
this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
|
|
76
|
-
this.pagesArray = [];
|
|
77
|
-
if (this.endPageIndex < 5) {
|
|
78
|
-
this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
/**
|
|
82
|
-
* Construct numbered navigation area based on current page position
|
|
83
|
-
*/
|
|
84
|
-
if (this.currentPage == 1 || this.currentPage == 2) {
|
|
85
|
-
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
86
|
-
this.pagesArray.push('...');
|
|
87
|
-
}
|
|
88
|
-
else if (this.currentPage >= 3 && ((this.endPageIndex - this.currentPage) >= 2)) {
|
|
89
|
-
this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
|
|
90
|
-
this.pagesArray.push('...');
|
|
91
|
-
this.pagesArray.unshift('...');
|
|
92
|
-
}
|
|
93
|
-
else if ((this.endPageIndex - this.currentPage) < 3) {
|
|
94
|
-
this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endPageIndex - 2 + i);
|
|
95
|
-
this.pagesArray.unshift('...');
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
componentWillRender() {
|
|
100
|
-
this.currentPage = Math.floor(this.offset / this.limit) + 1;
|
|
101
|
-
this.updatePageStatus();
|
|
102
|
-
}
|
|
103
|
-
render() {
|
|
104
|
-
const startOffset = (this.currentPage - 1) * this.limit + 1;
|
|
105
|
-
const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
|
|
106
|
-
return h("div", { class: 'PageNavigationWrapper' },
|
|
107
|
-
this.displayRangeOfTotal && this.total > 0 && h("span", { class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
|
|
108
|
-
values: {
|
|
109
|
-
start: startOffset,
|
|
110
|
-
end: endOffset,
|
|
111
|
-
total: this.total
|
|
112
|
-
}
|
|
113
|
-
})),
|
|
114
|
-
h("div", { class: 'PageNavigation' },
|
|
115
|
-
this.arrowsActive &&
|
|
116
|
-
h("div", { class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
117
|
-
this.goTo(1);
|
|
118
|
-
} }, translate('firstPage', this.language)),
|
|
119
|
-
this.secondaryArrowsActive &&
|
|
120
|
-
h("span", { class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
121
|
-
this.goTo(this.currentPage - 1);
|
|
122
|
-
} }, translate('prePage', this.language)),
|
|
123
|
-
this.displayPageNumbers && this.renderPageList(),
|
|
124
|
-
this.secondaryArrowsActive &&
|
|
125
|
-
h("span", { class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
|
|
126
|
-
this.goTo(this.currentPage + 1);
|
|
127
|
-
} }, translate('nextPage', this.language)),
|
|
128
|
-
this.arrowsActive &&
|
|
129
|
-
h("div", { class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
130
|
-
this.goTo(this.endPageIndex + 1);
|
|
131
|
-
} },
|
|
132
|
-
" ",
|
|
133
|
-
translate('lastPage', this.language),
|
|
134
|
-
" "),
|
|
135
|
-
this.renderStylingWrapper()));
|
|
136
|
-
}
|
|
137
|
-
static get is() { return "bonus-pagination-nav"; }
|
|
138
|
-
static get originalStyleUrls() { return {
|
|
139
|
-
"$": ["bonus-pagination-nav.scss"]
|
|
140
|
-
}; }
|
|
141
|
-
static get styleUrls() { return {
|
|
142
|
-
"$": ["bonus-pagination-nav.css"]
|
|
143
|
-
}; }
|
|
144
|
-
static get properties() { return {
|
|
145
|
-
"total": {
|
|
146
|
-
"type": "number",
|
|
147
|
-
"mutable": true,
|
|
148
|
-
"complexType": {
|
|
149
|
-
"original": "number",
|
|
150
|
-
"resolved": "number",
|
|
151
|
-
"references": {}
|
|
152
|
-
},
|
|
153
|
-
"required": false,
|
|
154
|
-
"optional": false,
|
|
155
|
-
"docs": {
|
|
156
|
-
"tags": [],
|
|
157
|
-
"text": "The received length of dataset"
|
|
158
|
-
},
|
|
159
|
-
"attribute": "total",
|
|
160
|
-
"reflect": true,
|
|
161
|
-
"defaultValue": "1"
|
|
162
|
-
},
|
|
163
|
-
"limit": {
|
|
164
|
-
"type": "number",
|
|
165
|
-
"mutable": true,
|
|
166
|
-
"complexType": {
|
|
167
|
-
"original": "number",
|
|
168
|
-
"resolved": "number",
|
|
169
|
-
"references": {}
|
|
170
|
-
},
|
|
171
|
-
"required": false,
|
|
172
|
-
"optional": false,
|
|
173
|
-
"docs": {
|
|
174
|
-
"tags": [],
|
|
175
|
-
"text": "The received limit for the number of pages"
|
|
176
|
-
},
|
|
177
|
-
"attribute": "limit",
|
|
178
|
-
"reflect": true,
|
|
179
|
-
"defaultValue": "10"
|
|
180
|
-
},
|
|
181
|
-
"offset": {
|
|
182
|
-
"type": "number",
|
|
183
|
-
"mutable": true,
|
|
184
|
-
"complexType": {
|
|
185
|
-
"original": "number",
|
|
186
|
-
"resolved": "number",
|
|
187
|
-
"references": {}
|
|
188
|
-
},
|
|
189
|
-
"required": false,
|
|
190
|
-
"optional": false,
|
|
191
|
-
"docs": {
|
|
192
|
-
"tags": [],
|
|
193
|
-
"text": "The offset of dataset"
|
|
194
|
-
},
|
|
195
|
-
"attribute": "offset",
|
|
196
|
-
"reflect": true,
|
|
197
|
-
"defaultValue": "0"
|
|
198
|
-
},
|
|
199
|
-
"tableId": {
|
|
200
|
-
"type": "string",
|
|
201
|
-
"mutable": true,
|
|
202
|
-
"complexType": {
|
|
203
|
-
"original": "string",
|
|
204
|
-
"resolved": "string",
|
|
205
|
-
"references": {}
|
|
206
|
-
},
|
|
207
|
-
"required": false,
|
|
208
|
-
"optional": false,
|
|
209
|
-
"docs": {
|
|
210
|
-
"tags": [],
|
|
211
|
-
"text": "The table id, use to identify which table listen the page change message\nwhen there is more than 1 table on same page"
|
|
212
|
-
},
|
|
213
|
-
"attribute": "table-id",
|
|
214
|
-
"reflect": true,
|
|
215
|
-
"defaultValue": "'default'"
|
|
216
|
-
},
|
|
217
|
-
"language": {
|
|
218
|
-
"type": "string",
|
|
219
|
-
"mutable": true,
|
|
220
|
-
"complexType": {
|
|
221
|
-
"original": "string",
|
|
222
|
-
"resolved": "string",
|
|
223
|
-
"references": {}
|
|
224
|
-
},
|
|
225
|
-
"required": false,
|
|
226
|
-
"optional": false,
|
|
227
|
-
"docs": {
|
|
228
|
-
"tags": [],
|
|
229
|
-
"text": "Language"
|
|
230
|
-
},
|
|
231
|
-
"attribute": "language",
|
|
232
|
-
"reflect": true,
|
|
233
|
-
"defaultValue": "'en'"
|
|
234
|
-
},
|
|
235
|
-
"translationUrl": {
|
|
236
|
-
"type": "string",
|
|
237
|
-
"mutable": false,
|
|
238
|
-
"complexType": {
|
|
239
|
-
"original": "string",
|
|
240
|
-
"resolved": "string",
|
|
241
|
-
"references": {}
|
|
242
|
-
},
|
|
243
|
-
"required": false,
|
|
244
|
-
"optional": false,
|
|
245
|
-
"docs": {
|
|
246
|
-
"tags": [],
|
|
247
|
-
"text": "Translation via url"
|
|
248
|
-
},
|
|
249
|
-
"attribute": "translation-url",
|
|
250
|
-
"reflect": true,
|
|
251
|
-
"defaultValue": "''"
|
|
252
|
-
},
|
|
253
|
-
"arrowsActive": {
|
|
254
|
-
"type": "boolean",
|
|
255
|
-
"mutable": true,
|
|
256
|
-
"complexType": {
|
|
257
|
-
"original": "boolean",
|
|
258
|
-
"resolved": "boolean",
|
|
259
|
-
"references": {}
|
|
260
|
-
},
|
|
261
|
-
"required": false,
|
|
262
|
-
"optional": false,
|
|
263
|
-
"docs": {
|
|
264
|
-
"tags": [],
|
|
265
|
-
"text": "Customize pagination: Activate pagination arrows"
|
|
266
|
-
},
|
|
267
|
-
"attribute": "arrows-active",
|
|
268
|
-
"reflect": true,
|
|
269
|
-
"defaultValue": "true"
|
|
270
|
-
},
|
|
271
|
-
"secondaryArrowsActive": {
|
|
272
|
-
"type": "boolean",
|
|
273
|
-
"mutable": true,
|
|
274
|
-
"complexType": {
|
|
275
|
-
"original": "boolean",
|
|
276
|
-
"resolved": "boolean",
|
|
277
|
-
"references": {}
|
|
278
|
-
},
|
|
279
|
-
"required": false,
|
|
280
|
-
"optional": false,
|
|
281
|
-
"docs": {
|
|
282
|
-
"tags": [],
|
|
283
|
-
"text": "Customize pagination: Activate pagination secondary arrows"
|
|
284
|
-
},
|
|
285
|
-
"attribute": "secondary-arrows-active",
|
|
286
|
-
"reflect": true,
|
|
287
|
-
"defaultValue": "true"
|
|
288
|
-
},
|
|
289
|
-
"displayPageNumbers": {
|
|
290
|
-
"type": "boolean",
|
|
291
|
-
"mutable": true,
|
|
292
|
-
"complexType": {
|
|
293
|
-
"original": "boolean",
|
|
294
|
-
"resolved": "boolean",
|
|
295
|
-
"references": {}
|
|
296
|
-
},
|
|
297
|
-
"required": false,
|
|
298
|
-
"optional": false,
|
|
299
|
-
"docs": {
|
|
300
|
-
"tags": [],
|
|
301
|
-
"text": "Customize pagination: Activate pagination numbered navigation"
|
|
302
|
-
},
|
|
303
|
-
"attribute": "display-page-numbers",
|
|
304
|
-
"reflect": true,
|
|
305
|
-
"defaultValue": "true"
|
|
306
|
-
},
|
|
307
|
-
"displayRangeOfTotal": {
|
|
308
|
-
"type": "boolean",
|
|
309
|
-
"mutable": true,
|
|
310
|
-
"complexType": {
|
|
311
|
-
"original": "boolean",
|
|
312
|
-
"resolved": "boolean",
|
|
313
|
-
"references": {}
|
|
314
|
-
},
|
|
315
|
-
"required": false,
|
|
316
|
-
"optional": false,
|
|
317
|
-
"docs": {
|
|
318
|
-
"tags": [],
|
|
319
|
-
"text": "If show the page of message, eg: `1-20 of 100`"
|
|
320
|
-
},
|
|
321
|
-
"attribute": "display-range-of-total",
|
|
322
|
-
"reflect": true
|
|
323
|
-
}
|
|
324
|
-
}; }
|
|
325
|
-
static get states() { return {
|
|
326
|
-
"endPageIndex": {},
|
|
327
|
-
"pagesArray": {},
|
|
328
|
-
"currentPage": {}
|
|
329
|
-
}; }
|
|
330
|
-
static get events() { return [{
|
|
331
|
-
"method": "reloadPageEmitter",
|
|
332
|
-
"name": "reloadPageByType",
|
|
333
|
-
"bubbles": true,
|
|
334
|
-
"cancelable": true,
|
|
335
|
-
"composed": true,
|
|
336
|
-
"docs": {
|
|
337
|
-
"tags": [],
|
|
338
|
-
"text": ""
|
|
339
|
-
},
|
|
340
|
-
"complexType": {
|
|
341
|
-
"original": "any",
|
|
342
|
-
"resolved": "any",
|
|
343
|
-
"references": {}
|
|
344
|
-
}
|
|
345
|
-
}]; }
|
|
346
|
-
static get listeners() { return [{
|
|
347
|
-
"name": "paginationReset",
|
|
348
|
-
"method": "pageLimitChangedHandler",
|
|
349
|
-
"target": "window",
|
|
350
|
-
"capture": false,
|
|
351
|
-
"passive": false
|
|
352
|
-
}, {
|
|
353
|
-
"name": "pageLimitChanged",
|
|
354
|
-
"method": "pageLimitChangedHandler",
|
|
355
|
-
"target": "window",
|
|
356
|
-
"capture": false,
|
|
357
|
-
"passive": false
|
|
358
|
-
}]; }
|
|
359
|
-
}
|
package/dist/collection/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
3
|
-
export const TRANSLATIONS = {
|
|
4
|
-
"en": {
|
|
5
|
-
"firstPage": '|<',
|
|
6
|
-
"lastPage": '>|',
|
|
7
|
-
"prePage": '<',
|
|
8
|
-
"nextPage": '>',
|
|
9
|
-
"pageOfTotal": '{start}-{end} of {total}',
|
|
10
|
-
},
|
|
11
|
-
"hu": {
|
|
12
|
-
"firstPage": 'First',
|
|
13
|
-
"lastPage": 'Last',
|
|
14
|
-
"prePage": '<',
|
|
15
|
-
"nextPage": '>',
|
|
16
|
-
"pageOfTotal": '{start}-{end} of {total}',
|
|
17
|
-
},
|
|
18
|
-
"hr": {
|
|
19
|
-
"firstPage": 'First',
|
|
20
|
-
"lastPage": 'Last',
|
|
21
|
-
"prePage": '<',
|
|
22
|
-
"nextPage": '>',
|
|
23
|
-
"pageOfTotal": '{start}-{end} of {total}',
|
|
24
|
-
},
|
|
25
|
-
"pt-br": {
|
|
26
|
-
"firstPage": 'First',
|
|
27
|
-
"lastPage": 'Last',
|
|
28
|
-
"prePage": '<',
|
|
29
|
-
"nextPage": '>',
|
|
30
|
-
"pageOfTotal": '{start}-{end} of {total}',
|
|
31
|
-
},
|
|
32
|
-
"es-mx": {
|
|
33
|
-
"firstPage": 'First',
|
|
34
|
-
"lastPage": 'Last',
|
|
35
|
-
"prePage": '<',
|
|
36
|
-
"nextPage": '>',
|
|
37
|
-
"pageOfTotal": '{start}-{end} of {total}',
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export const translate = (key, customLang, values) => {
|
|
41
|
-
const lang = customLang;
|
|
42
|
-
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
43
|
-
if (values !== undefined) {
|
|
44
|
-
for (const [key, value] of Object.entries(values.values)) {
|
|
45
|
-
const regex = new RegExp(`{${key}}`, 'g');
|
|
46
|
-
translation = translation.replace(regex, value);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return translation;
|
|
50
|
-
};
|
|
51
|
-
export const getTranslations = (url) => {
|
|
52
|
-
// fetch url, get the data, replace the TRANSLATIONS content
|
|
53
|
-
return new Promise((resolve) => {
|
|
54
|
-
fetch(url)
|
|
55
|
-
.then((res) => res.json())
|
|
56
|
-
.then((data) => {
|
|
57
|
-
Object.keys(data).forEach((item) => {
|
|
58
|
-
for (let key in data[item]) {
|
|
59
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
resolve(true);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface BonusPaginationNav extends Components.BonusPaginationNav, HTMLElement {}
|
|
4
|
-
export const BonusPaginationNav: {
|
|
5
|
-
prototype: BonusPaginationNav;
|
|
6
|
-
new (): BonusPaginationNav;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|