@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
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface BonusPaginationLimits extends Components.BonusPaginationLimits, HTMLElement {}
|
|
4
|
-
export const BonusPaginationLimits: {
|
|
5
|
-
prototype: BonusPaginationLimits;
|
|
6
|
-
new (): BonusPaginationLimits;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
5
|
-
const TRANSLATIONS = {
|
|
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
|
-
};
|
|
22
|
-
const translate = (key, customLang) => {
|
|
23
|
-
const lang = customLang;
|
|
24
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
25
|
-
};
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
const BonusPaginationLimits$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
30
|
-
constructor() {
|
|
31
|
-
super();
|
|
32
|
-
this.__registerHost();
|
|
33
|
-
this.pageLimitChanged = createEvent(this, "pageLimitChanged", 7);
|
|
34
|
-
/**
|
|
35
|
-
* Language of the widget
|
|
36
|
-
*/
|
|
37
|
-
this.language = 'en';
|
|
38
|
-
/**
|
|
39
|
-
* Translation via url
|
|
40
|
-
*/
|
|
41
|
-
this.translationUrl = '';
|
|
42
|
-
/**
|
|
43
|
-
* Default limit for per page, default: 10
|
|
44
|
-
*/
|
|
45
|
-
this.limit = 10;
|
|
46
|
-
this.pageLimits = [10, 25, 50];
|
|
47
|
-
}
|
|
48
|
-
onPageLimitClicked(pageLimit) {
|
|
49
|
-
this.limit = pageLimit;
|
|
50
|
-
this.pageLimitChanged.emit({ limit: this.limit });
|
|
51
|
-
}
|
|
52
|
-
componentWillLoad() {
|
|
53
|
-
if (!this.pageLimitOptions) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
58
|
-
return parseInt(item);
|
|
59
|
-
});
|
|
60
|
-
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
61
|
-
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
62
|
-
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
63
|
-
// (as part of the example so far, this would be 5)
|
|
64
|
-
if (!this.pageLimits.includes(this.limit)) {
|
|
65
|
-
this.limit = this.pageLimits[0];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
console.error('Error when parse PageLimitOptions', e);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
renderStylingWrapper() {
|
|
73
|
-
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
74
|
-
}
|
|
75
|
-
render() {
|
|
76
|
-
return h("div", { class: 'PaginationWrapper' }, h("span", { class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
77
|
-
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
78
|
-
this.onPageLimitClicked(pageLimit);
|
|
79
|
-
} }, pageLimit));
|
|
80
|
-
})), h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
81
|
-
}
|
|
82
|
-
static get style() { return bonusPaginationLimitsCss; }
|
|
83
|
-
}, [0, "bonus-pagination-limits", {
|
|
84
|
-
"language": [513],
|
|
85
|
-
"translationUrl": [513, "translation-url"],
|
|
86
|
-
"pageLimitOptions": [513, "page-limit-options"],
|
|
87
|
-
"limit": [1538],
|
|
88
|
-
"pageLimits": [32]
|
|
89
|
-
}]);
|
|
90
|
-
function defineCustomElement$1() {
|
|
91
|
-
if (typeof customElements === "undefined") {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const components = ["bonus-pagination-limits"];
|
|
95
|
-
components.forEach(tagName => { switch (tagName) {
|
|
96
|
-
case "bonus-pagination-limits":
|
|
97
|
-
if (!customElements.get(tagName)) {
|
|
98
|
-
customElements.define(tagName, BonusPaginationLimits$1);
|
|
99
|
-
}
|
|
100
|
-
break;
|
|
101
|
-
} });
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const BonusPaginationLimits = BonusPaginationLimits$1;
|
|
105
|
-
const defineCustomElement = defineCustomElement$1;
|
|
106
|
-
|
|
107
|
-
export { BonusPaginationLimits, defineCustomElement };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* BonusPaginationLimits 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';
|
package/dist/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|