@dso-toolkit/core 40.1.0 → 41.0.0
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/dso-pagination.cjs.entry.js +7 -7
- package/dist/collection/components/pagination/pagination.js +7 -7
- package/dist/custom-elements/index.js +7 -7
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-b1dc8d76.entry.js +1 -0
- package/dist/esm/dso-pagination.entry.js +7 -7
- package/dist/types/components/pagination/pagination.interfaces.d.ts +2 -0
- package/package.json +1 -1
- package/dist/dso-toolkit/p-4a41728e.entry.js +0 -1
|
@@ -16,11 +16,11 @@ let Pagination = class {
|
|
|
16
16
|
this.formatHref = (page) => '#' + page;
|
|
17
17
|
}
|
|
18
18
|
clickHandler(e, page) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
this.selectPage.emit({
|
|
20
|
+
originalEvent: e,
|
|
21
|
+
page,
|
|
22
|
+
isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
|
|
23
|
+
});
|
|
24
24
|
}
|
|
25
25
|
;
|
|
26
26
|
render() {
|
|
@@ -28,9 +28,9 @@ let Pagination = class {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
const pages = Array.from({ length: this.totalPages }, (_value, i) => i + 1);
|
|
31
|
-
return (index.h("ul", { class: "pagination" }, index.h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, index.h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.clickHandler(e, pages[
|
|
31
|
+
return (index.h("ul", { class: "pagination" }, index.h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, index.h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage - 2]) }, index.h("dso-icon", { icon: "chevron-left" }))), pages.map(page => (index.h("li", { key: page, class: this.currentPage === page ? 'active' : undefined }, this.currentPage === page
|
|
32
32
|
? (index.h("span", { "aria-current": "page" }, page))
|
|
33
|
-
: (index.h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), index.h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, index.h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.clickHandler(e, pages[
|
|
33
|
+
: (index.h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), index.h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, index.h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage]) }, index.h("dso-icon", { icon: "chevron-right" })))));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
Pagination.style = paginationCss;
|
|
@@ -7,11 +7,11 @@ export class Pagination {
|
|
|
7
7
|
this.formatHref = (page) => '#' + page;
|
|
8
8
|
}
|
|
9
9
|
clickHandler(e, page) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
this.selectPage.emit({
|
|
11
|
+
originalEvent: e,
|
|
12
|
+
page,
|
|
13
|
+
isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
|
|
14
|
+
});
|
|
15
15
|
}
|
|
16
16
|
;
|
|
17
17
|
render() {
|
|
@@ -21,13 +21,13 @@ export class Pagination {
|
|
|
21
21
|
const pages = Array.from({ length: this.totalPages }, (_value, i) => i + 1);
|
|
22
22
|
return (h("ul", { class: "pagination" },
|
|
23
23
|
h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined },
|
|
24
|
-
h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.clickHandler(e, pages[
|
|
24
|
+
h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage - 2]) },
|
|
25
25
|
h("dso-icon", { icon: "chevron-left" }))),
|
|
26
26
|
pages.map(page => (h("li", { key: page, class: this.currentPage === page ? 'active' : undefined }, this.currentPage === page
|
|
27
27
|
? (h("span", { "aria-current": "page" }, page))
|
|
28
28
|
: (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))),
|
|
29
29
|
h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined },
|
|
30
|
-
h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.clickHandler(e, pages[
|
|
30
|
+
h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage]) },
|
|
31
31
|
h("dso-icon", { icon: "chevron-right" })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "dso-pagination"; }
|
|
@@ -3905,11 +3905,11 @@ let Pagination = class extends HTMLElement {
|
|
|
3905
3905
|
this.formatHref = (page) => '#' + page;
|
|
3906
3906
|
}
|
|
3907
3907
|
clickHandler(e, page) {
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3908
|
+
this.selectPage.emit({
|
|
3909
|
+
originalEvent: e,
|
|
3910
|
+
page,
|
|
3911
|
+
isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
|
|
3912
|
+
});
|
|
3913
3913
|
}
|
|
3914
3914
|
;
|
|
3915
3915
|
render() {
|
|
@@ -3917,9 +3917,9 @@ let Pagination = class extends HTMLElement {
|
|
|
3917
3917
|
return null;
|
|
3918
3918
|
}
|
|
3919
3919
|
const pages = Array.from({ length: this.totalPages }, (_value, i) => i + 1);
|
|
3920
|
-
return (h("ul", { class: "pagination" }, h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.clickHandler(e, pages[
|
|
3920
|
+
return (h("ul", { class: "pagination" }, h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage - 2]) }, h("dso-icon", { icon: "chevron-left" }))), pages.map(page => (h("li", { key: page, class: this.currentPage === page ? 'active' : undefined }, this.currentPage === page
|
|
3921
3921
|
? (h("span", { "aria-current": "page" }, page))
|
|
3922
|
-
: (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.clickHandler(e, pages[
|
|
3922
|
+
: (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage]) }, h("dso-icon", { icon: "chevron-right" })))));
|
|
3923
3923
|
}
|
|
3924
3924
|
static get style() { return paginationCss; }
|
|
3925
3925
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-c62606a3.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-202bd676",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-3ad06d9d",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-09b53589",[[1,"dso-header",{loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],mainMenu:[16],useDropDownMenu:[1,"use-drop-down-menu"],isLoggedIn:[4,"is-logged-in"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-14fc5767",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-e01b1657",[[1,"dso-tree-view",{collection:[16]}]]],["p-2f64bded",[[6,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32]},[[4,"click","onDocumentClick"]]]]],["p-0777c1c4",[[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],visible:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-e1496a15",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]}]]],["p-076400f4",[[1,"dso-image-overlay",{active:[32],focused:[32]}]]],["p-5e614420",[[1,"dso-label",{compact:[4],removable:[4],status:[1],hover:[32]}]]],["p-60679db4",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-c62606a3.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-202bd676",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-3ad06d9d",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-09b53589",[[1,"dso-header",{loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],mainMenu:[16],useDropDownMenu:[1,"use-drop-down-menu"],isLoggedIn:[4,"is-logged-in"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-14fc5767",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-e01b1657",[[1,"dso-tree-view",{collection:[16]}]]],["p-2f64bded",[[6,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32]},[[4,"click","onDocumentClick"]]]]],["p-0777c1c4",[[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],visible:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-e1496a15",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]}]]],["p-076400f4",[[1,"dso-image-overlay",{active:[32],focused:[32]}]]],["p-5e614420",[[1,"dso-label",{compact:[4],removable:[4],status:[1],hover:[32]}]]],["p-60679db4",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32]}]]],["p-b1dc8d76",[[1,"dso-pagination",{totalPages:[2,"total-pages"],currentPage:[2,"current-page"],formatHref:[16]}]]],["p-7f41f2a1",[[1,"dso-viewer-grid",{filterpanelOpen:[516,"filterpanel-open"],overlayOpen:[516,"overlay-open"],initialMainSize:[1,"initial-main-size"],mainSize:[32]}]]],["p-ea14647b",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-5a56d726",[[1,"dso-attachments-counter",{count:[2]}]]],["p-7796687c",[[1,"dso-badge",{status:[1]}]]],["p-d0d279cc",[[1,"dso-banner",{status:[1]}]]],["p-1e92e29d",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-f1026921",[[6,"dso-ozon-content",{content:[1],inline:[516],deleted:[516],interactive:[516],state:[32]}]]],["p-3cb44a36",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-02272301",[[1,"dso-responsive-element",{sizeAlias:[32],sizeWidth:[32]}]]],["p-49938275",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4]}]]],["p-37e12c3c",[[1,"dso-tooltip",{descriptive:[516],position:[1],strategy:[1],for:[1],noArrow:[4,"no-arrow"],stateless:[4],small:[4],active:[1540],hidden:[32],activate:[64],deactivate:[64]},[[0,"click","listenClick"]]]]],["p-b86128b3",[[1,"dso-progress-indicator",{label:[1],size:[1],block:[4]}]]],["p-daf049bd",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1]}]]],["p-336bf5b9",[[6,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32],toggleInfo:[64]}],[1,"dso-info",{fixed:[516],active:[516]}]]],["p-c0b7f435",[[1,"dso-icon",{icon:[1]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as a}from"./p-c62606a3.js";let n=class{constructor(a){i(this,a),this.selectPage=t(this,"selectPage",7),this.formatHref=i=>"#"+i}clickHandler(i,t){this.selectPage.emit({originalEvent:i,page:t,isModifiedEvent:0!==i.button||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey})}render(){if(!this.totalPages)return null;const i=Array.from({length:this.totalPages},((i,t)=>t+1));return a("ul",{class:"pagination"},a("li",{class:this.currentPage===i[0]?"dso-page-hidden":void 0},a("a",{href:this.formatHref(i[0]),"aria-label":"Vorige",onClick:t=>this.currentPage&&this.clickHandler(t,i[this.currentPage-2])},a("dso-icon",{icon:"chevron-left"}))),i.map((i=>a("li",{key:i,class:this.currentPage===i?"active":void 0},this.currentPage===i?a("span",{"aria-current":"page"},i):a("a",{href:this.formatHref(i),onClick:t=>this.clickHandler(t,i)},i)))),a("li",{class:this.currentPage===i[i.length-1]?"dso-page-hidden":void 0},a("a",{href:this.formatHref(i[i.length-1]),"aria-label":"Volgende",onClick:t=>this.currentPage&&this.clickHandler(t,i[this.currentPage])},a("dso-icon",{icon:"chevron-right"}))))}};n.style=':host{display:block}*,*::after,*::before{box-sizing:border-box}.pagination{text-align:center}.pagination>li{display:inline-block;font-weight:bold;line-height:28px;text-align:center;vertical-align:middle}.pagination>li>a,.pagination>li>span{align-items:center;color:#39870c;display:flex;height:32px;justify-content:center;position:relative;width:32px}.pagination>li>a:active,.pagination>li>span:active{background-color:#ebf3e6}.pagination>li>span{border:2px solid transparent;border-radius:50%}.pagination>li a{line-height:32px;text-decoration:none}.pagination>li a:hover,.pagination>li a:focus{text-decoration:none}.pagination>li a:hover::after,.pagination>li a:focus::after{border-bottom-color:#39870c}.pagination>li a::after{border-bottom:3px solid transparent;bottom:0;content:"";display:inline-block;left:0;position:absolute;width:100%}.pagination>li.active span{background-color:#39870c;color:#fff}.pagination>li+li{margin-left:8px}.dso-page-hidden{visibility:hidden}';export{n as dso_pagination}
|
|
@@ -12,11 +12,11 @@ let Pagination = class {
|
|
|
12
12
|
this.formatHref = (page) => '#' + page;
|
|
13
13
|
}
|
|
14
14
|
clickHandler(e, page) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
this.selectPage.emit({
|
|
16
|
+
originalEvent: e,
|
|
17
|
+
page,
|
|
18
|
+
isModifiedEvent: e.button !== 0 || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey,
|
|
19
|
+
});
|
|
20
20
|
}
|
|
21
21
|
;
|
|
22
22
|
render() {
|
|
@@ -24,9 +24,9 @@ let Pagination = class {
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
const pages = Array.from({ length: this.totalPages }, (_value, i) => i + 1);
|
|
27
|
-
return (h("ul", { class: "pagination" }, h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.clickHandler(e, pages[
|
|
27
|
+
return (h("ul", { class: "pagination" }, h("li", { class: this.currentPage === pages[0] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[0]), "aria-label": "Vorige", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage - 2]) }, h("dso-icon", { icon: "chevron-left" }))), pages.map(page => (h("li", { key: page, class: this.currentPage === page ? 'active' : undefined }, this.currentPage === page
|
|
28
28
|
? (h("span", { "aria-current": "page" }, page))
|
|
29
|
-
: (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.clickHandler(e, pages[
|
|
29
|
+
: (h("a", { href: this.formatHref(page), onClick: e => this.clickHandler(e, page) }, page))))), h("li", { class: this.currentPage === pages[pages.length - 1] ? 'dso-page-hidden' : undefined }, h("a", { href: this.formatHref(pages[pages.length - 1]), "aria-label": "Volgende", onClick: e => this.currentPage && this.clickHandler(e, pages[this.currentPage]) }, h("dso-icon", { icon: "chevron-right" })))));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
Pagination.style = paginationCss;
|
|
@@ -3,4 +3,6 @@ export interface PaginationSelectPageEvent {
|
|
|
3
3
|
page: number;
|
|
4
4
|
/** The original pointer event */
|
|
5
5
|
originalEvent: MouseEvent;
|
|
6
|
+
/** True when user selected the page holding Ctrl, Alt or other modifiers. Can be used to determine navigation. */
|
|
7
|
+
isModifiedEvent: boolean;
|
|
6
8
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as a,h as t}from"./p-c62606a3.js";let n=class{constructor(t){i(this,t),this.selectPage=a(this,"selectPage",7),this.formatHref=i=>"#"+i}clickHandler(i,a){0!==i.button||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||(i.preventDefault(),this.selectPage.emit({originalEvent:i,page:a}))}render(){if(!this.totalPages)return null;const i=Array.from({length:this.totalPages},((i,a)=>a+1));return t("ul",{class:"pagination"},t("li",{class:this.currentPage===i[0]?"dso-page-hidden":void 0},t("a",{href:this.formatHref(i[0]),"aria-label":"Vorige",onClick:a=>this.clickHandler(a,i[0])},t("dso-icon",{icon:"chevron-left"}))),i.map((i=>t("li",{key:i,class:this.currentPage===i?"active":void 0},this.currentPage===i?t("span",{"aria-current":"page"},i):t("a",{href:this.formatHref(i),onClick:a=>this.clickHandler(a,i)},i)))),t("li",{class:this.currentPage===i[i.length-1]?"dso-page-hidden":void 0},t("a",{href:this.formatHref(i[i.length-1]),"aria-label":"Volgende",onClick:a=>this.clickHandler(a,i[i.length-1])},t("dso-icon",{icon:"chevron-right"}))))}};n.style=':host{display:block}*,*::after,*::before{box-sizing:border-box}.pagination{text-align:center}.pagination>li{display:inline-block;font-weight:bold;line-height:28px;text-align:center;vertical-align:middle}.pagination>li>a,.pagination>li>span{align-items:center;color:#39870c;display:flex;height:32px;justify-content:center;position:relative;width:32px}.pagination>li>a:active,.pagination>li>span:active{background-color:#ebf3e6}.pagination>li>span{border:2px solid transparent;border-radius:50%}.pagination>li a{line-height:32px;text-decoration:none}.pagination>li a:hover,.pagination>li a:focus{text-decoration:none}.pagination>li a:hover::after,.pagination>li a:focus::after{border-bottom-color:#39870c}.pagination>li a::after{border-bottom:3px solid transparent;bottom:0;content:"";display:inline-block;left:0;position:absolute;width:100%}.pagination>li.active span{background-color:#39870c;color:#fff}.pagination>li+li{margin-left:8px}.dso-page-hidden{visibility:hidden}';export{n as dso_pagination}
|