@everymatrix/lottery-pagination 1.77.25 → 1.77.27
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/cjs/index.cjs.js +1 -1
- package/dist/cjs/{lottery-pagination-04abe239.js → lottery-pagination-62d935fb.js} +1 -1
- package/dist/cjs/lottery-pagination.cjs.entry.js +1 -1
- package/dist/collection/components/lottery-pagination/lottery-pagination.css +24 -22
- package/dist/esm/index.js +1 -1
- package/dist/esm/{lottery-pagination-1e4d4ea1.js → lottery-pagination-40c75053.js} +1 -1
- package/dist/esm/lottery-pagination.entry.js +1 -1
- package/dist/lottery-pagination/index.esm.js +1 -1
- package/dist/lottery-pagination/{lottery-pagination-1e4d4ea1.js → lottery-pagination-40c75053.js} +1 -1
- package/dist/lottery-pagination/lottery-pagination.entry.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -123,7 +123,7 @@ const getTranslations = (data) => {
|
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
const lotteryPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-
|
|
126
|
+
const lotteryPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--color-typography, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-150, #6f6f6f);border-radius:5px;background:var(--emw--color-gray-150, #6f6f6f);color:var(--emw--color-typography-inverse, #fff);font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004d4a);border-color:var(--emw--color-primary-variant, #004d4a)}button:disabled{background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography-inverse, #fff);cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}}";
|
|
127
127
|
const LotteryPaginationStyle0 = lotteryPaginationCss;
|
|
128
128
|
|
|
129
129
|
const LotteryPagination = class {
|
|
@@ -12,14 +12,16 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.LeftItems button:not(:first-child),
|
|
15
|
+
.LeftItems button:not(:first-child),
|
|
16
|
+
.RightItems button:not(:last-child) {
|
|
16
17
|
margin: 0 10px;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
.LeftItems button,
|
|
20
|
+
.LeftItems button,
|
|
21
|
+
.RightItems button {
|
|
20
22
|
padding: 0;
|
|
21
|
-
background-color: var(--emw--color-
|
|
22
|
-
border-color: var(--emw--color-
|
|
23
|
+
background-color: var(--emw--color-primary, #009993);
|
|
24
|
+
border-color: var(--emw--color-primary, #009993);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
.PaginationArea {
|
|
@@ -42,15 +44,15 @@
|
|
|
42
44
|
justify-content: center;
|
|
43
45
|
align-items: center;
|
|
44
46
|
background-color: transparent;
|
|
45
|
-
color: var(--emw--
|
|
47
|
+
color: var(--emw--color-typography, #000);
|
|
46
48
|
cursor: pointer;
|
|
47
49
|
pointer-events: all;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.PaginationItem.ActiveItem button {
|
|
51
|
-
background: var(--emw--color-
|
|
52
|
-
border-color: var(--emw--color-
|
|
53
|
-
color: var(--emw--color-
|
|
53
|
+
background: var(--emw--color-primary, #009993);
|
|
54
|
+
border-color: var(--emw--color-primary, #009993);
|
|
55
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.PaginationItem.ActiveItem button:disabled {
|
|
@@ -60,19 +62,19 @@
|
|
|
60
62
|
|
|
61
63
|
.PaginationItem button:hover,
|
|
62
64
|
.PaginationItem button:active {
|
|
63
|
-
background: var(--emw--color-
|
|
64
|
-
border-color: var(--emw--color-
|
|
65
|
-
color: var(--emw--color-
|
|
65
|
+
background: var(--emw--color-primary, #009993);
|
|
66
|
+
border-color: var(--emw--color-primary, #009993);
|
|
67
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
66
68
|
opacity: 0.8;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
button {
|
|
70
72
|
width: 100px;
|
|
71
73
|
height: 32px;
|
|
72
|
-
border: 1px solid var(--emw--color-gray-
|
|
74
|
+
border: 1px solid var(--emw--color-gray-150, #6f6f6f);
|
|
73
75
|
border-radius: 5px;
|
|
74
|
-
background: var(--emw--color-gray-
|
|
75
|
-
color: var(--emw--color-
|
|
76
|
+
background: var(--emw--color-gray-150, #6f6f6f);
|
|
77
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
76
78
|
font-size: 14px;
|
|
77
79
|
font: inherit;
|
|
78
80
|
cursor: pointer;
|
|
@@ -84,14 +86,14 @@ button {
|
|
|
84
86
|
|
|
85
87
|
button:hover,
|
|
86
88
|
button:active {
|
|
87
|
-
background: var(--emw--color-primary-variant, #
|
|
88
|
-
border-color: var(--emw--color-primary-variant, #
|
|
89
|
+
background: var(--emw--color-primary-variant, #004d4a);
|
|
90
|
+
border-color: var(--emw--color-primary-variant, #004d4a);
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
button:disabled {
|
|
92
|
-
background-color: var(--emw--color-
|
|
93
|
-
border-color: var(--emw--color-
|
|
94
|
-
color: var(--emw--color-
|
|
94
|
+
background-color: var(--emw--color-background-tertiary, #ccc);
|
|
95
|
+
border-color: var(--emw--color-background-tertiary, #ccc);
|
|
96
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
95
97
|
cursor: not-allowed;
|
|
96
98
|
}
|
|
97
99
|
|
|
@@ -129,8 +131,8 @@ button:disabled {
|
|
|
129
131
|
opacity: 1;
|
|
130
132
|
}
|
|
131
133
|
.paginationItem.activeItem button:hover {
|
|
132
|
-
background: var(--emw--color-
|
|
133
|
-
border-color: var(--emw--color-
|
|
134
|
-
color: var(--emw--color-
|
|
134
|
+
background: var(--emw--color-primary, #009993);
|
|
135
|
+
border-color: var(--emw--color-primary, #009993);
|
|
136
|
+
color: var(--emw--color-typography-inverse, #fff);
|
|
135
137
|
}
|
|
136
138
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as LotteryPagination } from './lottery-pagination-
|
|
1
|
+
export { L as LotteryPagination } from './lottery-pagination-40c75053.js';
|
|
2
2
|
import './index-95386fc2.js';
|
|
@@ -121,7 +121,7 @@ const getTranslations = (data) => {
|
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
const lotteryPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-
|
|
124
|
+
const lotteryPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--color-typography, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-150, #6f6f6f);border-radius:5px;background:var(--emw--color-gray-150, #6f6f6f);color:var(--emw--color-typography-inverse, #fff);font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004d4a);border-color:var(--emw--color-primary-variant, #004d4a)}button:disabled{background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography-inverse, #fff);cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}}";
|
|
125
125
|
const LotteryPaginationStyle0 = lotteryPaginationCss;
|
|
126
126
|
|
|
127
127
|
const LotteryPagination = class {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as lottery_pagination } from './lottery-pagination-
|
|
1
|
+
export { L as lottery_pagination } from './lottery-pagination-40c75053.js';
|
|
2
2
|
import './index-95386fc2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as LotteryPagination}from"./lottery-pagination-
|
|
1
|
+
export{L as LotteryPagination}from"./lottery-pagination-40c75053.js";import"./index-95386fc2.js";
|
package/dist/lottery-pagination/{lottery-pagination-1e4d4ea1.js → lottery-pagination-40c75053.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s}from"./index-95386fc2.js";function a(t,i){if(t){const s=document.createElement("style");s.innerHTML=i,t.appendChild(s)}}function e(t,i){const s=new URL(i);fetch(s.href).then((t=>t.text())).then((i=>{const s=document.createElement("style");s.innerHTML=i,t&&t.appendChild(s)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i){if(window.emMessageBus){const s=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{s.innerHTML=i,t&&t.appendChild(s)}))}}const n=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),r={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},h=(t,i)=>r[void 0!==i&&i in r?i:"en"][t],l=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!=i&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&e(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((i=>{for(let s in t[i])r[i][s]=t[i][s]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&e(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(n(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},h("firstPage",this.language)),s("span",{class:"NavigationIcon"})),a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})));n(this.userAgent)&&(a=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let e=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},h("lastPage",this.language)),s("span",{class:"NavigationIcon"})),o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&e);return n(this.userAgent)&&(o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&o)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-
|
|
1
|
+
import{r as t,c as i,h as s}from"./index-95386fc2.js";function a(t,i){if(t){const s=document.createElement("style");s.innerHTML=i,t.appendChild(s)}}function e(t,i){const s=new URL(i);fetch(s.href).then((t=>t.text())).then((i=>{const s=document.createElement("style");s.innerHTML=i,t&&t.appendChild(s)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i){if(window.emMessageBus){const s=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{s.innerHTML=i,t&&t.appendChild(s)}))}}const n=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),r={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},h=(t,i)=>r[void 0!==i&&i in r?i:"en"][t],l=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!=i&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&e(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((i=>{for(let s in t[i])r[i][s]=t[i][s]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&e(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(n(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},h("firstPage",this.language)),s("span",{class:"NavigationIcon"})),a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})));n(this.userAgent)&&(a=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let e=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},h("lastPage",this.language)),s("span",{class:"NavigationIcon"})),o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&e);return n(this.userAgent)&&(o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&o)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--color-typography, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-150, #6f6f6f);border-radius:5px;background:var(--emw--color-gray-150, #6f6f6f);color:var(--emw--color-typography-inverse, #fff);font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004d4a);border-color:var(--emw--color-primary-variant, #004d4a)}button:disabled{background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography-inverse, #fff);cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}}';export{l as L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as lottery_pagination}from"./lottery-pagination-
|
|
1
|
+
export{L as lottery_pagination}from"./lottery-pagination-40c75053.js";import"./index-95386fc2.js";
|