@everymatrix/bonus-pagination-limits 1.44.0 → 1.45.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.
- package/dist/bonus-pagination-limits/bonus-pagination-limits.esm.js +1 -1
- package/dist/bonus-pagination-limits/p-46dba813.entry.js +1 -0
- package/dist/bonus-pagination-limits/p-6d7f3710.js +2 -0
- package/dist/bonus-pagination-limits/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-pagination-limits.cjs.entry.js +60 -67
- package/dist/cjs/bonus-pagination-limits.cjs.js +16 -10
- package/dist/cjs/index-e51ca584.js +1163 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/bonus-pagination-limits/bonus-pagination-limits.js +152 -153
- package/dist/collection/components/bonus-pagination-limits/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +29 -29
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-pagination-limits.entry.js +60 -67
- package/dist/esm/bonus-pagination-limits.js +13 -10
- package/dist/esm/index-e8c7dbc4.js +1136 -0
- package/dist/esm/loader.js +6 -12
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-pagination-limits/.stencil/packages/stencil/bonus-pagination-limits/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-pagination-limits/.stencil/packages/stencil/bonus-pagination-limits/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/bonus-pagination-limits/bonus-pagination-limits.d.ts +22 -22
- package/dist/types/components/bonus-pagination-limits/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +6 -6
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +9 -2
- package/dist/bonus-pagination-limits/p-3dce25c5.js +0 -1
- package/dist/bonus-pagination-limits/p-d1bfd361.entry.js +0 -1
- package/dist/cjs/index-b47e4aa8.js +0 -1127
- package/dist/components/bonus-pagination-limits.d.ts +0 -11
- package/dist/components/bonus-pagination-limits.js +0 -107
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-689c38fd.js +0 -1101
- 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/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/bonus-pagination-limits/.stencil/packages/bonus-pagination-limits/stencil.config.d.ts +0 -2
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,20 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e51ca584.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
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(() => {
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
17
11
|
return index.bootstrapLazy([["bonus-pagination-limits.cjs",[[0,"bonus-pagination-limits",{"language":[513],"translationUrl":[513,"translation-url"],"pageLimitOptions":[513,"page-limit-options"],"limit":[1538],"pageLimits":[32]}]]]], options);
|
|
18
|
-
});
|
|
19
12
|
};
|
|
20
13
|
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
21
15
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"
|
|
3
|
+
"components/bonus-pagination-limits/bonus-pagination-limits.js"
|
|
4
4
|
],
|
|
5
5
|
"compiler": {
|
|
6
6
|
"name": "@stencil/core",
|
|
7
|
-
"version": "
|
|
8
|
-
"typescriptVersion": "
|
|
7
|
+
"version": "4.20.0",
|
|
8
|
+
"typescriptVersion": "5.5.3"
|
|
9
9
|
},
|
|
10
10
|
"collections": [],
|
|
11
11
|
"bundles": []
|
|
@@ -1,160 +1,159 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { translate, TRANSLATIONS } from "../../utils/locale.utils";
|
|
3
3
|
export class BonusPaginationLimits {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Translation via url
|
|
11
|
-
*/
|
|
12
|
-
this.translationUrl = '';
|
|
13
|
-
/**
|
|
14
|
-
* Default limit for per page, default: 10
|
|
15
|
-
*/
|
|
16
|
-
this.limit = 10;
|
|
17
|
-
this.pageLimits = [10, 25, 50];
|
|
18
|
-
}
|
|
19
|
-
onPageLimitClicked(pageLimit) {
|
|
20
|
-
this.limit = pageLimit;
|
|
21
|
-
this.pageLimitChanged.emit({ limit: this.limit });
|
|
22
|
-
}
|
|
23
|
-
componentWillLoad() {
|
|
24
|
-
if (!this.pageLimitOptions) {
|
|
25
|
-
return;
|
|
4
|
+
constructor() {
|
|
5
|
+
this.language = 'en';
|
|
6
|
+
this.translationUrl = '';
|
|
7
|
+
this.pageLimitOptions = undefined;
|
|
8
|
+
this.limit = 10;
|
|
9
|
+
this.pageLimits = [10, 25, 50];
|
|
26
10
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
32
|
-
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
33
|
-
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
34
|
-
// (as part of the example so far, this would be 5)
|
|
35
|
-
if (!this.pageLimits.includes(this.limit)) {
|
|
36
|
-
this.limit = this.pageLimits[0];
|
|
37
|
-
}
|
|
11
|
+
onPageLimitClicked(pageLimit) {
|
|
12
|
+
this.limit = pageLimit;
|
|
13
|
+
this.pageLimitChanged.emit({ limit: this.limit });
|
|
38
14
|
}
|
|
39
|
-
|
|
40
|
-
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
if (!this.pageLimitOptions) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
21
|
+
return parseInt(item);
|
|
22
|
+
});
|
|
23
|
+
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
24
|
+
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
25
|
+
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
26
|
+
// (as part of the example so far, this would be 5)
|
|
27
|
+
if (!this.pageLimits.includes(this.limit)) {
|
|
28
|
+
this.limit = this.pageLimits[0];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
console.error('Error when parse PageLimitOptions', e);
|
|
33
|
+
}
|
|
41
34
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
35
|
+
renderStylingWrapper() {
|
|
36
|
+
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return h("div", { key: '57f5e61ee287f72d0427a2e4f646e37c6b9358b9', class: 'PaginationWrapper' }, h("span", { key: '5f82b19fcf269086659b3faa475d9967b2af57fa', class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), h("ul", { key: '559c2d5378a352691583567579a8e681d092ddd3', class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
40
|
+
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
41
|
+
this.onPageLimitClicked(pageLimit);
|
|
42
|
+
} }, pageLimit));
|
|
43
|
+
})), h("general-styling-wrapper", { key: 'a8b9632e7421318e330f33b9c1cc9eb7121e35e9', targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "bonus-pagination-limits"; }
|
|
46
|
+
static get originalStyleUrls() {
|
|
47
|
+
return {
|
|
48
|
+
"$": ["bonus-pagination-limits.scss"]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static get styleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["bonus-pagination-limits.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get properties() {
|
|
57
|
+
return {
|
|
58
|
+
"language": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "Language of the widget"
|
|
71
|
+
},
|
|
72
|
+
"attribute": "language",
|
|
73
|
+
"reflect": true,
|
|
74
|
+
"defaultValue": "'en'"
|
|
75
|
+
},
|
|
76
|
+
"translationUrl": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "string",
|
|
81
|
+
"resolved": "string",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "Translation via url"
|
|
89
|
+
},
|
|
90
|
+
"attribute": "translation-url",
|
|
91
|
+
"reflect": true,
|
|
92
|
+
"defaultValue": "''"
|
|
93
|
+
},
|
|
94
|
+
"pageLimitOptions": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "string",
|
|
99
|
+
"resolved": "string",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "Limits list string split with coma,default: `10,25,50`;"
|
|
107
|
+
},
|
|
108
|
+
"attribute": "page-limit-options",
|
|
109
|
+
"reflect": true
|
|
110
|
+
},
|
|
111
|
+
"limit": {
|
|
112
|
+
"type": "number",
|
|
113
|
+
"mutable": true,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "number",
|
|
116
|
+
"resolved": "number",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Default limit for per page, default: 10"
|
|
124
|
+
},
|
|
125
|
+
"attribute": "limit",
|
|
126
|
+
"reflect": true,
|
|
127
|
+
"defaultValue": "10"
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
static get states() {
|
|
132
|
+
return {
|
|
133
|
+
"pageLimits": {}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get events() {
|
|
137
|
+
return [{
|
|
138
|
+
"method": "pageLimitChanged",
|
|
139
|
+
"name": "pageLimitChanged",
|
|
140
|
+
"bubbles": true,
|
|
141
|
+
"cancelable": true,
|
|
142
|
+
"composed": true,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "Object",
|
|
149
|
+
"resolved": "Object",
|
|
150
|
+
"references": {
|
|
151
|
+
"Object": {
|
|
152
|
+
"location": "global",
|
|
153
|
+
"id": "global::Object"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}];
|
|
135
158
|
}
|
|
136
|
-
}; }
|
|
137
|
-
static get states() { return {
|
|
138
|
-
"pageLimits": {}
|
|
139
|
-
}; }
|
|
140
|
-
static get events() { return [{
|
|
141
|
-
"method": "pageLimitChanged",
|
|
142
|
-
"name": "pageLimitChanged",
|
|
143
|
-
"bubbles": true,
|
|
144
|
-
"cancelable": true,
|
|
145
|
-
"composed": true,
|
|
146
|
-
"docs": {
|
|
147
|
-
"tags": [],
|
|
148
|
-
"text": ""
|
|
149
|
-
},
|
|
150
|
-
"complexType": {
|
|
151
|
-
"original": "Object",
|
|
152
|
-
"resolved": "Object",
|
|
153
|
-
"references": {
|
|
154
|
-
"Object": {
|
|
155
|
-
"location": "global"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}]; }
|
|
160
159
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BonusPaginationLimits } from './bonus-pagination-limits';
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
3
3
|
export const TRANSLATIONS = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
en: {
|
|
5
|
+
"pageLimitLabel": 'Show',
|
|
6
|
+
},
|
|
7
|
+
hu: {
|
|
8
|
+
"pageLimitLabel": 'Show',
|
|
9
|
+
},
|
|
10
|
+
hr: {
|
|
11
|
+
"pageLimitLabel": 'Show',
|
|
12
|
+
},
|
|
13
|
+
"pt-br": {
|
|
14
|
+
"pageLimitLabel": 'Show',
|
|
15
|
+
},
|
|
16
|
+
"es-mx": {
|
|
17
|
+
"pageLimitLabel": 'Show',
|
|
18
|
+
}
|
|
19
19
|
};
|
|
20
20
|
export const translate = (key, customLang) => {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const lang = customLang;
|
|
22
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
23
23
|
};
|
|
24
24
|
export const getTranslations = (url) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
fetch(url)
|
|
28
|
+
.then((res) => res.json())
|
|
29
|
+
.then((data) => {
|
|
30
|
+
Object.keys(data).forEach((item) => {
|
|
31
|
+
for (let key in data[item]) {
|
|
32
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
resolve(true);
|
|
36
|
+
});
|
|
36
37
|
});
|
|
37
|
-
});
|
|
38
38
|
};
|
|
@@ -1,84 +1,77 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-e8c7dbc4.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
en: {
|
|
7
|
+
"pageLimitLabel": 'Show',
|
|
8
|
+
},
|
|
9
|
+
hu: {
|
|
10
|
+
"pageLimitLabel": 'Show',
|
|
11
|
+
},
|
|
12
|
+
hr: {
|
|
13
|
+
"pageLimitLabel": 'Show',
|
|
14
|
+
},
|
|
15
|
+
"pt-br": {
|
|
16
|
+
"pageLimitLabel": 'Show',
|
|
17
|
+
},
|
|
18
|
+
"es-mx": {
|
|
19
|
+
"pageLimitLabel": 'Show',
|
|
20
|
+
}
|
|
21
21
|
};
|
|
22
22
|
const translate = (key, customLang) => {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const lang = customLang;
|
|
24
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
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}";
|
|
28
|
+
const BonusPaginationLimitsStyle0 = bonusPaginationLimitsCss;
|
|
28
29
|
|
|
29
30
|
const BonusPaginationLimits = class {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
constructor(hostRef) {
|
|
32
|
+
registerInstance(this, hostRef);
|
|
33
|
+
this.pageLimitChanged = createEvent(this, "pageLimitChanged", 7);
|
|
34
|
+
this.language = 'en';
|
|
35
|
+
this.translationUrl = '';
|
|
36
|
+
this.pageLimitOptions = undefined;
|
|
37
|
+
this.limit = 10;
|
|
38
|
+
this.pageLimits = [10, 25, 50];
|
|
39
|
+
}
|
|
40
|
+
onPageLimitClicked(pageLimit) {
|
|
41
|
+
this.limit = pageLimit;
|
|
42
|
+
this.pageLimitChanged.emit({ limit: this.limit });
|
|
43
|
+
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
if (!this.pageLimitOptions) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
50
|
+
return parseInt(item);
|
|
51
|
+
});
|
|
52
|
+
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
53
|
+
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
54
|
+
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
55
|
+
// (as part of the example so far, this would be 5)
|
|
56
|
+
if (!this.pageLimits.includes(this.limit)) {
|
|
57
|
+
this.limit = this.pageLimits[0];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
console.error('Error when parse PageLimitOptions', e);
|
|
62
|
+
}
|
|
54
63
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return parseInt(item);
|
|
58
|
-
});
|
|
59
|
-
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
60
|
-
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
61
|
-
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
62
|
-
// (as part of the example so far, this would be 5)
|
|
63
|
-
if (!this.pageLimits.includes(this.limit)) {
|
|
64
|
-
this.limit = this.pageLimits[0];
|
|
65
|
-
}
|
|
64
|
+
renderStylingWrapper() {
|
|
65
|
+
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
render() {
|
|
68
|
+
return h("div", { key: '57f5e61ee287f72d0427a2e4f646e37c6b9358b9', class: 'PaginationWrapper' }, h("span", { key: '5f82b19fcf269086659b3faa475d9967b2af57fa', class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), h("ul", { key: '559c2d5378a352691583567579a8e681d092ddd3', class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
69
|
+
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
70
|
+
this.onPageLimitClicked(pageLimit);
|
|
71
|
+
} }, pageLimit));
|
|
72
|
+
})), h("general-styling-wrapper", { key: 'a8b9632e7421318e330f33b9c1cc9eb7121e35e9', targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
69
73
|
}
|
|
70
|
-
}
|
|
71
|
-
renderStylingWrapper() {
|
|
72
|
-
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
73
|
-
}
|
|
74
|
-
render() {
|
|
75
|
-
return h("div", { class: 'PaginationWrapper' }, h("span", { class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
76
|
-
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
77
|
-
this.onPageLimitClicked(pageLimit);
|
|
78
|
-
} }, pageLimit));
|
|
79
|
-
})), h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
80
|
-
}
|
|
81
74
|
};
|
|
82
|
-
BonusPaginationLimits.style =
|
|
75
|
+
BonusPaginationLimits.style = BonusPaginationLimitsStyle0;
|
|
83
76
|
|
|
84
77
|
export { BonusPaginationLimits as bonus_pagination_limits };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e8c7dbc4.js';
|
|
2
|
+
export { s as setNonce } from './index-e8c7dbc4.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
2
4
|
|
|
3
5
|
/*
|
|
4
|
-
Stencil Client Patch Browser
|
|
6
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
const importMeta = import.meta.url;
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== "") {
|
|
12
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return promiseResolve(opts);
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
patchBrowser().then(options => {
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
16
19
|
return bootstrapLazy([["bonus-pagination-limits",[[0,"bonus-pagination-limits",{"language":[513],"translationUrl":[513,"translation-url"],"pageLimitOptions":[513,"page-limit-options"],"limit":[1538],"pageLimits":[32]}]]]], options);
|
|
17
20
|
});
|