@dso-toolkit/core 62.12.1 → 62.14.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-advanced-select.cjs.entry.js +98 -0
- package/dist/cjs/dso-advanced-select.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-alert_7.cjs.entry.js +1 -1
- package/dist/cjs/dso-alert_7.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-input-range.cjs.entry.js +39 -0
- package/dist/cjs/dso-input-range.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
- package/dist/cjs/dso-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/advanced-select/advanced-select.css +206 -0
- package/dist/collection/components/advanced-select/advanced-select.js +220 -0
- package/dist/collection/components/advanced-select/advanced-select.js.map +1 -0
- package/dist/collection/components/advanced-select/advanced-select.models.js +2 -0
- package/dist/collection/components/advanced-select/advanced-select.models.js.map +1 -0
- package/dist/collection/components/input-range/input-range.css +74 -0
- package/dist/collection/components/input-range/input-range.interfaces.js +2 -0
- package/dist/collection/components/input-range/input-range.interfaces.js.map +1 -0
- package/dist/collection/components/input-range/input-range.js +186 -0
- package/dist/collection/components/input-range/input-range.js.map +1 -0
- package/dist/collection/components/pagination/pagination.css +3 -2
- package/dist/collection/components/scrollable/scrollable.css +1 -0
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/toggletip/toggletip.js +9 -3
- package/dist/collection/components/toggletip/toggletip.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.js +9 -3
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/dso-advanced-select.d.ts +11 -0
- package/dist/components/dso-advanced-select.js +129 -0
- package/dist/components/dso-advanced-select.js.map +1 -0
- package/dist/components/dso-input-range.d.ts +11 -0
- package/dist/components/dso-input-range.js +61 -0
- package/dist/components/dso-input-range.js.map +1 -0
- package/dist/components/dso-pagination.js +1 -1
- package/dist/components/dso-pagination.js.map +1 -1
- package/dist/components/dso-toggletip.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/scrollable.js +1 -1
- package/dist/components/scrollable.js.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/{p-2862c19a.entry.js → p-0ebbcbef.entry.js} +2 -2
- package/dist/dso-toolkit/{p-2862c19a.entry.js.map → p-0ebbcbef.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-1a85e2f8.entry.js +2 -0
- package/dist/dso-toolkit/{p-6d602847.entry.js.map → p-1a85e2f8.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-43511221.entry.js.map +1 -1
- package/dist/dso-toolkit/p-b0116121.entry.js.map +1 -1
- package/dist/dso-toolkit/p-e0f9a16f.entry.js +2 -0
- package/dist/dso-toolkit/p-e0f9a16f.entry.js.map +1 -0
- package/dist/dso-toolkit/p-e32f287e.entry.js +2 -0
- package/dist/dso-toolkit/p-e32f287e.entry.js.map +1 -0
- package/dist/dso-toolkit/p-f3facab4.entry.js +2 -0
- package/dist/dso-toolkit/p-f3facab4.entry.js.map +1 -0
- package/dist/esm/dso-advanced-select.entry.js +94 -0
- package/dist/esm/dso-advanced-select.entry.js.map +1 -0
- package/dist/esm/dso-alert_7.entry.js +1 -1
- package/dist/esm/dso-alert_7.entry.js.map +1 -1
- package/dist/esm/dso-input-range.entry.js +35 -0
- package/dist/esm/dso-input-range.entry.js.map +1 -0
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-pagination.entry.js.map +1 -1
- package/dist/esm/dso-scrollable.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js.map +1 -1
- package/dist/esm/dso-toggletip.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/advanced-select/advanced-select.d.ts +40 -0
- package/dist/types/components/advanced-select/advanced-select.models.d.ts +26 -0
- package/dist/types/components/input-range/input-range.d.ts +38 -0
- package/dist/types/components/input-range/input-range.interfaces.d.ts +7 -0
- package/dist/types/components/toggletip/toggletip.d.ts +2 -1
- package/dist/types/components/tooltip/tooltip.d.ts +2 -1
- package/dist/types/components.d.ts +157 -4
- package/package.json +2 -2
- package/dist/dso-toolkit/p-1180ebe3.entry.js +0 -2
- package/dist/dso-toolkit/p-1180ebe3.entry.js.map +0 -1
- package/dist/dso-toolkit/p-6d602847.entry.js +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Placement } from "@popperjs/core";
|
|
1
2
|
export declare class Tooltip {
|
|
2
3
|
#private;
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ export declare class Tooltip {
|
|
|
7
8
|
/**
|
|
8
9
|
* Set position of tooltip relative to target
|
|
9
10
|
*/
|
|
10
|
-
position:
|
|
11
|
+
position: Placement;
|
|
11
12
|
/**
|
|
12
13
|
* Set position strategy of tooltip
|
|
13
14
|
*/
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AccordionInternalState, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
9
9
|
import { AccordionHeading, AccordionSectionAnimationEndEvent, AccordionSectionAnimationStartEvent, AccordionSectionState, AccordionSectionToggleClickEvent } from "./components/accordion/components/accordion-section.interfaces";
|
|
10
|
+
import { AdvancedSelectChangeEvent, AdvancedSelectOption, AdvancedSelectOptionOrGroup, AdvancedSelectRedirectEvent } from "./components/advanced-select/advanced-select.models";
|
|
10
11
|
import { AnnotationButtonClickEvent } from "./components/annotation-button/annotation-button";
|
|
11
12
|
import { AnnotationOutputCloseEvent } from "./components/annotation-output/annotation-output";
|
|
12
13
|
import { Suggestion } from "./components/autosuggest/autosuggest.interfaces";
|
|
@@ -19,6 +20,7 @@ import { Placement } from "@popperjs/core";
|
|
|
19
20
|
import { ExpandableAnimationEndEvent, ExpandableAnimationStartEvent } from "./components/expandable/expandable";
|
|
20
21
|
import { HeaderEvent, HeaderMenuItem } from "./components/header/header.interfaces";
|
|
21
22
|
import { InfoButtonToggleEvent } from "./components/info-button/info-button.interfaces";
|
|
23
|
+
import { InputRangeChangeEvent } from "./components/input-range/input-range.interfaces";
|
|
22
24
|
import { ListButtonChangeEvent, ListButtonSelectedEvent } from "./components/list-button/list-button.interfaces";
|
|
23
25
|
import { BaseLayer, BaseLayerChangeEvent } from "./components/map-base-layers/map-base-layers.interfaces";
|
|
24
26
|
import { MapControlsToggleEvent } from "./components/map-controls/map-controls.interfaces";
|
|
@@ -35,6 +37,7 @@ import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-
|
|
|
35
37
|
import { ViewerGridActiveTabSwitchEvent, ViewerGridChangeSizeAnimationEndEvent, ViewerGridChangeSizeEvent, ViewerGridCloseOverlayEvent, ViewerGridFilterpanelApplyEvent, ViewerGridFilterpanelCancelEvent, ViewerGridMainExpandEvent, ViewerGridMainToggleEvent, ViewerGridMode, ViewerGridPanelSize, ViewerGridVdkTab, ViewerGridVrkTab } from "./components/viewer-grid/viewer-grid.interfaces";
|
|
36
38
|
export { AccordionInternalState, AccordionVariant } from "./components/accordion/accordion.interfaces";
|
|
37
39
|
export { AccordionHeading, AccordionSectionAnimationEndEvent, AccordionSectionAnimationStartEvent, AccordionSectionState, AccordionSectionToggleClickEvent } from "./components/accordion/components/accordion-section.interfaces";
|
|
40
|
+
export { AdvancedSelectChangeEvent, AdvancedSelectOption, AdvancedSelectOptionOrGroup, AdvancedSelectRedirectEvent } from "./components/advanced-select/advanced-select.models";
|
|
38
41
|
export { AnnotationButtonClickEvent } from "./components/annotation-button/annotation-button";
|
|
39
42
|
export { AnnotationOutputCloseEvent } from "./components/annotation-output/annotation-output";
|
|
40
43
|
export { Suggestion } from "./components/autosuggest/autosuggest.interfaces";
|
|
@@ -47,6 +50,7 @@ export { Placement } from "@popperjs/core";
|
|
|
47
50
|
export { ExpandableAnimationEndEvent, ExpandableAnimationStartEvent } from "./components/expandable/expandable";
|
|
48
51
|
export { HeaderEvent, HeaderMenuItem } from "./components/header/header.interfaces";
|
|
49
52
|
export { InfoButtonToggleEvent } from "./components/info-button/info-button.interfaces";
|
|
53
|
+
export { InputRangeChangeEvent } from "./components/input-range/input-range.interfaces";
|
|
50
54
|
export { ListButtonChangeEvent, ListButtonSelectedEvent } from "./components/list-button/list-button.interfaces";
|
|
51
55
|
export { BaseLayer, BaseLayerChangeEvent } from "./components/map-base-layers/map-base-layers.interfaces";
|
|
52
56
|
export { MapControlsToggleEvent } from "./components/map-controls/map-controls.interfaces";
|
|
@@ -143,6 +147,20 @@ export namespace Components {
|
|
|
143
147
|
*/
|
|
144
148
|
"warning": boolean;
|
|
145
149
|
}
|
|
150
|
+
interface DsoAdvancedSelect {
|
|
151
|
+
/**
|
|
152
|
+
* The active option. By object reference.
|
|
153
|
+
*/
|
|
154
|
+
"active"?: AdvancedSelectOption<never>;
|
|
155
|
+
/**
|
|
156
|
+
* An extra text for the active option. Only visible in the list of options.
|
|
157
|
+
*/
|
|
158
|
+
"activeHint"?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The options to display in the select.
|
|
161
|
+
*/
|
|
162
|
+
"options": AdvancedSelectOptionOrGroup<never>[];
|
|
163
|
+
}
|
|
146
164
|
interface DsoAlert {
|
|
147
165
|
/**
|
|
148
166
|
* Whether or not to show the role attribute with value "alert". To control the tooltip add the `role-alert` attribute.
|
|
@@ -594,6 +612,36 @@ export namespace Components {
|
|
|
594
612
|
*/
|
|
595
613
|
"setFocus": () => Promise<void>;
|
|
596
614
|
}
|
|
615
|
+
interface DsoInputRange {
|
|
616
|
+
/**
|
|
617
|
+
* The description of the range.
|
|
618
|
+
*/
|
|
619
|
+
"description"?: string;
|
|
620
|
+
/**
|
|
621
|
+
* The label of the range.
|
|
622
|
+
*/
|
|
623
|
+
"label"?: string;
|
|
624
|
+
/**
|
|
625
|
+
* The maximum value of the range.
|
|
626
|
+
*/
|
|
627
|
+
"max"?: number;
|
|
628
|
+
/**
|
|
629
|
+
* The minimum value of the range.
|
|
630
|
+
*/
|
|
631
|
+
"min"?: number;
|
|
632
|
+
/**
|
|
633
|
+
* The step to increment the value by.
|
|
634
|
+
*/
|
|
635
|
+
"step"?: number;
|
|
636
|
+
/**
|
|
637
|
+
* The unit of the range.
|
|
638
|
+
*/
|
|
639
|
+
"unit": string;
|
|
640
|
+
/**
|
|
641
|
+
* The value of the range.
|
|
642
|
+
*/
|
|
643
|
+
"value"?: number;
|
|
644
|
+
}
|
|
597
645
|
interface DsoLabel {
|
|
598
646
|
"_truncateLabel": () => Promise<void>;
|
|
599
647
|
/**
|
|
@@ -900,7 +948,7 @@ export namespace Components {
|
|
|
900
948
|
/**
|
|
901
949
|
* Toggletip position.
|
|
902
950
|
*/
|
|
903
|
-
"position":
|
|
951
|
+
"position": Placement;
|
|
904
952
|
/**
|
|
905
953
|
* Set to true for secondary Toggletip.
|
|
906
954
|
*/
|
|
@@ -934,7 +982,7 @@ export namespace Components {
|
|
|
934
982
|
/**
|
|
935
983
|
* Set position of tooltip relative to target
|
|
936
984
|
*/
|
|
937
|
-
"position":
|
|
985
|
+
"position": Placement;
|
|
938
986
|
/**
|
|
939
987
|
* Defines if the tooltip has a smaller max-width
|
|
940
988
|
*/
|
|
@@ -1018,6 +1066,10 @@ export interface DsoAccordionSectionCustomEvent<T> extends CustomEvent<T> {
|
|
|
1018
1066
|
detail: T;
|
|
1019
1067
|
target: HTMLDsoAccordionSectionElement;
|
|
1020
1068
|
}
|
|
1069
|
+
export interface DsoAdvancedSelectCustomEvent<T> extends CustomEvent<T> {
|
|
1070
|
+
detail: T;
|
|
1071
|
+
target: HTMLDsoAdvancedSelectElement;
|
|
1072
|
+
}
|
|
1021
1073
|
export interface DsoAnnotationButtonCustomEvent<T> extends CustomEvent<T> {
|
|
1022
1074
|
detail: T;
|
|
1023
1075
|
target: HTMLDsoAnnotationButtonElement;
|
|
@@ -1062,6 +1114,10 @@ export interface DsoInfoButtonCustomEvent<T> extends CustomEvent<T> {
|
|
|
1062
1114
|
detail: T;
|
|
1063
1115
|
target: HTMLDsoInfoButtonElement;
|
|
1064
1116
|
}
|
|
1117
|
+
export interface DsoInputRangeCustomEvent<T> extends CustomEvent<T> {
|
|
1118
|
+
detail: T;
|
|
1119
|
+
target: HTMLDsoInputRangeElement;
|
|
1120
|
+
}
|
|
1065
1121
|
export interface DsoLabelCustomEvent<T> extends CustomEvent<T> {
|
|
1066
1122
|
detail: T;
|
|
1067
1123
|
target: HTMLDsoLabelElement;
|
|
@@ -1164,6 +1220,24 @@ declare global {
|
|
|
1164
1220
|
prototype: HTMLDsoActionListItemElement;
|
|
1165
1221
|
new (): HTMLDsoActionListItemElement;
|
|
1166
1222
|
};
|
|
1223
|
+
interface HTMLDsoAdvancedSelectElementEventMap {
|
|
1224
|
+
"dsoChange": AdvancedSelectChangeEvent<never>;
|
|
1225
|
+
"dsoRedirect": AdvancedSelectRedirectEvent;
|
|
1226
|
+
}
|
|
1227
|
+
interface HTMLDsoAdvancedSelectElement extends Components.DsoAdvancedSelect, HTMLStencilElement {
|
|
1228
|
+
addEventListener<K extends keyof HTMLDsoAdvancedSelectElementEventMap>(type: K, listener: (this: HTMLDsoAdvancedSelectElement, ev: DsoAdvancedSelectCustomEvent<HTMLDsoAdvancedSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1229
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1230
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1231
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1232
|
+
removeEventListener<K extends keyof HTMLDsoAdvancedSelectElementEventMap>(type: K, listener: (this: HTMLDsoAdvancedSelectElement, ev: DsoAdvancedSelectCustomEvent<HTMLDsoAdvancedSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1233
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1234
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1235
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1236
|
+
}
|
|
1237
|
+
var HTMLDsoAdvancedSelectElement: {
|
|
1238
|
+
prototype: HTMLDsoAdvancedSelectElement;
|
|
1239
|
+
new (): HTMLDsoAdvancedSelectElement;
|
|
1240
|
+
};
|
|
1167
1241
|
interface HTMLDsoAlertElement extends Components.DsoAlert, HTMLStencilElement {
|
|
1168
1242
|
}
|
|
1169
1243
|
var HTMLDsoAlertElement: {
|
|
@@ -1426,6 +1500,23 @@ declare global {
|
|
|
1426
1500
|
prototype: HTMLDsoInfoButtonElement;
|
|
1427
1501
|
new (): HTMLDsoInfoButtonElement;
|
|
1428
1502
|
};
|
|
1503
|
+
interface HTMLDsoInputRangeElementEventMap {
|
|
1504
|
+
"dsoChange": InputRangeChangeEvent;
|
|
1505
|
+
}
|
|
1506
|
+
interface HTMLDsoInputRangeElement extends Components.DsoInputRange, HTMLStencilElement {
|
|
1507
|
+
addEventListener<K extends keyof HTMLDsoInputRangeElementEventMap>(type: K, listener: (this: HTMLDsoInputRangeElement, ev: DsoInputRangeCustomEvent<HTMLDsoInputRangeElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1508
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1509
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1510
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1511
|
+
removeEventListener<K extends keyof HTMLDsoInputRangeElementEventMap>(type: K, listener: (this: HTMLDsoInputRangeElement, ev: DsoInputRangeCustomEvent<HTMLDsoInputRangeElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1512
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1513
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1514
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1515
|
+
}
|
|
1516
|
+
var HTMLDsoInputRangeElement: {
|
|
1517
|
+
prototype: HTMLDsoInputRangeElement;
|
|
1518
|
+
new (): HTMLDsoInputRangeElement;
|
|
1519
|
+
};
|
|
1429
1520
|
interface HTMLDsoLabelElementEventMap {
|
|
1430
1521
|
"dsoRemoveClick": MouseEvent;
|
|
1431
1522
|
}
|
|
@@ -1757,6 +1848,7 @@ declare global {
|
|
|
1757
1848
|
"dso-accordion-section": HTMLDsoAccordionSectionElement;
|
|
1758
1849
|
"dso-action-list": HTMLDsoActionListElement;
|
|
1759
1850
|
"dso-action-list-item": HTMLDsoActionListItemElement;
|
|
1851
|
+
"dso-advanced-select": HTMLDsoAdvancedSelectElement;
|
|
1760
1852
|
"dso-alert": HTMLDsoAlertElement;
|
|
1761
1853
|
"dso-annotation-button": HTMLDsoAnnotationButtonElement;
|
|
1762
1854
|
"dso-annotation-output": HTMLDsoAnnotationOutputElement;
|
|
@@ -1778,6 +1870,7 @@ declare global {
|
|
|
1778
1870
|
"dso-image-overlay": HTMLDsoImageOverlayElement;
|
|
1779
1871
|
"dso-info": HTMLDsoInfoElement;
|
|
1780
1872
|
"dso-info-button": HTMLDsoInfoButtonElement;
|
|
1873
|
+
"dso-input-range": HTMLDsoInputRangeElement;
|
|
1781
1874
|
"dso-label": HTMLDsoLabelElement;
|
|
1782
1875
|
"dso-list-button": HTMLDsoListButtonElement;
|
|
1783
1876
|
"dso-logo": HTMLDsoLogoElement;
|
|
@@ -1891,6 +1984,28 @@ declare namespace LocalJSX {
|
|
|
1891
1984
|
*/
|
|
1892
1985
|
"warning"?: boolean;
|
|
1893
1986
|
}
|
|
1987
|
+
interface DsoAdvancedSelect {
|
|
1988
|
+
/**
|
|
1989
|
+
* The active option. By object reference.
|
|
1990
|
+
*/
|
|
1991
|
+
"active"?: AdvancedSelectOption<never>;
|
|
1992
|
+
/**
|
|
1993
|
+
* An extra text for the active option. Only visible in the list of options.
|
|
1994
|
+
*/
|
|
1995
|
+
"activeHint"?: string;
|
|
1996
|
+
/**
|
|
1997
|
+
* Emitted when user selects an option
|
|
1998
|
+
*/
|
|
1999
|
+
"onDsoChange"?: (event: DsoAdvancedSelectCustomEvent<AdvancedSelectChangeEvent<never>>) => void;
|
|
2000
|
+
/**
|
|
2001
|
+
* Emitted when user activates a group redirect link.
|
|
2002
|
+
*/
|
|
2003
|
+
"onDsoRedirect"?: (event: DsoAdvancedSelectCustomEvent<AdvancedSelectRedirectEvent>) => void;
|
|
2004
|
+
/**
|
|
2005
|
+
* The options to display in the select.
|
|
2006
|
+
*/
|
|
2007
|
+
"options"?: AdvancedSelectOptionOrGroup<never>[];
|
|
2008
|
+
}
|
|
1894
2009
|
interface DsoAlert {
|
|
1895
2010
|
/**
|
|
1896
2011
|
* Whether or not to show the role attribute with value "alert". To control the tooltip add the `role-alert` attribute.
|
|
@@ -2430,6 +2545,40 @@ declare namespace LocalJSX {
|
|
|
2430
2545
|
*/
|
|
2431
2546
|
"secondary"?: boolean;
|
|
2432
2547
|
}
|
|
2548
|
+
interface DsoInputRange {
|
|
2549
|
+
/**
|
|
2550
|
+
* The description of the range.
|
|
2551
|
+
*/
|
|
2552
|
+
"description"?: string;
|
|
2553
|
+
/**
|
|
2554
|
+
* The label of the range.
|
|
2555
|
+
*/
|
|
2556
|
+
"label"?: string;
|
|
2557
|
+
/**
|
|
2558
|
+
* The maximum value of the range.
|
|
2559
|
+
*/
|
|
2560
|
+
"max"?: number;
|
|
2561
|
+
/**
|
|
2562
|
+
* The minimum value of the range.
|
|
2563
|
+
*/
|
|
2564
|
+
"min"?: number;
|
|
2565
|
+
/**
|
|
2566
|
+
* Emitted when the value has changed.
|
|
2567
|
+
*/
|
|
2568
|
+
"onDsoChange"?: (event: DsoInputRangeCustomEvent<InputRangeChangeEvent>) => void;
|
|
2569
|
+
/**
|
|
2570
|
+
* The step to increment the value by.
|
|
2571
|
+
*/
|
|
2572
|
+
"step"?: number;
|
|
2573
|
+
/**
|
|
2574
|
+
* The unit of the range.
|
|
2575
|
+
*/
|
|
2576
|
+
"unit"?: string;
|
|
2577
|
+
/**
|
|
2578
|
+
* The value of the range.
|
|
2579
|
+
*/
|
|
2580
|
+
"value"?: number;
|
|
2581
|
+
}
|
|
2433
2582
|
interface DsoLabel {
|
|
2434
2583
|
/**
|
|
2435
2584
|
* For compact Label
|
|
@@ -2796,7 +2945,7 @@ declare namespace LocalJSX {
|
|
|
2796
2945
|
/**
|
|
2797
2946
|
* Toggletip position.
|
|
2798
2947
|
*/
|
|
2799
|
-
"position"?:
|
|
2948
|
+
"position"?: Placement;
|
|
2800
2949
|
/**
|
|
2801
2950
|
* Set to true for secondary Toggletip.
|
|
2802
2951
|
*/
|
|
@@ -2822,7 +2971,7 @@ declare namespace LocalJSX {
|
|
|
2822
2971
|
/**
|
|
2823
2972
|
* Set position of tooltip relative to target
|
|
2824
2973
|
*/
|
|
2825
|
-
"position"?:
|
|
2974
|
+
"position"?: Placement;
|
|
2826
2975
|
/**
|
|
2827
2976
|
* Defines if the tooltip has a smaller max-width
|
|
2828
2977
|
*/
|
|
@@ -2955,6 +3104,7 @@ declare namespace LocalJSX {
|
|
|
2955
3104
|
"dso-accordion-section": DsoAccordionSection;
|
|
2956
3105
|
"dso-action-list": DsoActionList;
|
|
2957
3106
|
"dso-action-list-item": DsoActionListItem;
|
|
3107
|
+
"dso-advanced-select": DsoAdvancedSelect;
|
|
2958
3108
|
"dso-alert": DsoAlert;
|
|
2959
3109
|
"dso-annotation-button": DsoAnnotationButton;
|
|
2960
3110
|
"dso-annotation-output": DsoAnnotationOutput;
|
|
@@ -2976,6 +3126,7 @@ declare namespace LocalJSX {
|
|
|
2976
3126
|
"dso-image-overlay": DsoImageOverlay;
|
|
2977
3127
|
"dso-info": DsoInfo;
|
|
2978
3128
|
"dso-info-button": DsoInfoButton;
|
|
3129
|
+
"dso-input-range": DsoInputRange;
|
|
2979
3130
|
"dso-label": DsoLabel;
|
|
2980
3131
|
"dso-list-button": DsoListButton;
|
|
2981
3132
|
"dso-logo": DsoLogo;
|
|
@@ -3008,6 +3159,7 @@ declare module "@stencil/core" {
|
|
|
3008
3159
|
"dso-accordion-section": LocalJSX.DsoAccordionSection & JSXBase.HTMLAttributes<HTMLDsoAccordionSectionElement>;
|
|
3009
3160
|
"dso-action-list": LocalJSX.DsoActionList & JSXBase.HTMLAttributes<HTMLDsoActionListElement>;
|
|
3010
3161
|
"dso-action-list-item": LocalJSX.DsoActionListItem & JSXBase.HTMLAttributes<HTMLDsoActionListItemElement>;
|
|
3162
|
+
"dso-advanced-select": LocalJSX.DsoAdvancedSelect & JSXBase.HTMLAttributes<HTMLDsoAdvancedSelectElement>;
|
|
3011
3163
|
"dso-alert": LocalJSX.DsoAlert & JSXBase.HTMLAttributes<HTMLDsoAlertElement>;
|
|
3012
3164
|
"dso-annotation-button": LocalJSX.DsoAnnotationButton & JSXBase.HTMLAttributes<HTMLDsoAnnotationButtonElement>;
|
|
3013
3165
|
"dso-annotation-output": LocalJSX.DsoAnnotationOutput & JSXBase.HTMLAttributes<HTMLDsoAnnotationOutputElement>;
|
|
@@ -3029,6 +3181,7 @@ declare module "@stencil/core" {
|
|
|
3029
3181
|
"dso-image-overlay": LocalJSX.DsoImageOverlay & JSXBase.HTMLAttributes<HTMLDsoImageOverlayElement>;
|
|
3030
3182
|
"dso-info": LocalJSX.DsoInfo & JSXBase.HTMLAttributes<HTMLDsoInfoElement>;
|
|
3031
3183
|
"dso-info-button": LocalJSX.DsoInfoButton & JSXBase.HTMLAttributes<HTMLDsoInfoButtonElement>;
|
|
3184
|
+
"dso-input-range": LocalJSX.DsoInputRange & JSXBase.HTMLAttributes<HTMLDsoInputRangeElement>;
|
|
3032
3185
|
"dso-label": LocalJSX.DsoLabel & JSXBase.HTMLAttributes<HTMLDsoLabelElement>;
|
|
3033
3186
|
"dso-list-button": LocalJSX.DsoListButton & JSXBase.HTMLAttributes<HTMLDsoListButtonElement>;
|
|
3034
3187
|
"dso-logo": LocalJSX.DsoLogo & JSXBase.HTMLAttributes<HTMLDsoLogoElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dso-toolkit/core",
|
|
3
|
-
"version": "62.
|
|
3
|
+
"version": "62.14.0",
|
|
4
4
|
"description": "DSO Toolkit Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/components/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/animejs": "^3.1.12",
|
|
26
26
|
"animejs": "3.2.1",
|
|
27
27
|
"clsx": "^2.0.0",
|
|
28
|
-
"dso-toolkit": "^62.
|
|
28
|
+
"dso-toolkit": "^62.14.0",
|
|
29
29
|
"escape-string-regexp": "^5.0.0",
|
|
30
30
|
"focus-trap": "^7.5.4",
|
|
31
31
|
"popper-max-size-modifier": "^0.2.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as r,a as s}from"./p-4592810d.js";import{c as i}from"./p-c87b4d11.js";import{d as e}from"./p-94f26620.js";const n=':host{display:block;height:100%;overflow-y:hidden}*,*::after,*::before{box-sizing:border-box}.dso-shadow-container{height:100%;max-height:inherit;min-height:inherit;position:relative}.dso-shadow-container .dso-scroll-container{height:100%;max-height:inherit;min-height:inherit;overflow-y:auto}.dso-shadow-container .dso-scroll-container::before,.dso-shadow-container .dso-scroll-container::after{background-repeat:no-repeat;background-size:100% 24px;content:"";display:block;height:24px;left:0;opacity:0;overflow:visible;position:absolute;transition:opacity 150ms ease-in-out;width:100%;pointer-events:none}.dso-shadow-container .dso-scroll-container::before{background-image:linear-gradient(to top, rgba(183, 183, 183, 0), rgba(183, 183, 183, 0.7));top:0}.dso-shadow-container .dso-scroll-container::after{background-image:linear-gradient(to bottom, rgba(183, 183, 183, 0), rgba(183, 183, 183, 0.7));bottom:0}.dso-shadow-container .dso-scroll-container.dso-scroll-bottom::before{opacity:1}.dso-shadow-container .dso-scroll-container.dso-scroll-top::after{opacity:1}.dso-shadow-container .dso-scroll-container.dso-scroll-middle::before,.dso-shadow-container .dso-scroll-container.dso-scroll-middle::after{opacity:1}';const a=new ResizeObserver(e((o=>o.forEach((o=>{var t;return(t=l(o))===null||t===void 0?void 0:t._setScrollState()}))),50));function l({target:o}){if(o.parentNode instanceof ShadowRoot&&c(o.parentNode.host)){return o.parentNode.host}if(o.parentElement&&c(o.parentElement)){return o.parentElement}return undefined}function c(o){return o.tagName==="DSO-SCROLLABLE"}const d=class{constructor(r){o(this,r);this.dsoScrollEnd=t(this,"dsoScrollEnd",7);this.mutationObserver=new MutationObserver((o=>o.forEach((({target:o})=>{var t;const r=(t=o.parentElement)===null||t===void 0?void 0:t.closest("dso-scrollable");if(r!==this.host){return}this._setScrollState()}))));this.scrollPosition="noScroll"}async _setScrollState(){const o=this.getScrollPosition();if(this.scrollPosition!==o){this.scrollPosition=o;if(this.scrollPosition==="top"||this.scrollPosition==="bottom"){this.dsoScrollEnd.emit({scrollEnd:this.scrollPosition})}}}get slottedElements(){return Array.from(this.host.children)}getScrollPosition(){if(!this.scrollContainerDiv){return"noScroll"}const{scrollHeight:o,clientHeight:t,scrollTop:r}=this.scrollContainerDiv;if(o<=t){return"noScroll"}if(r===0){return"top"}if(o-r-t<1){return"bottom"}if(r>0){return"middle"}return"noScroll"}componentDidLoad(){this.mutationObserver.observe(this.host,{characterData:true,attributes:false,childList:false,subtree:true});if(this.shadowContainerDiv instanceof HTMLDivElement){a.observe(this.shadowContainerDiv)}this.slottedElements.forEach((o=>a.observe(o)))}disconnectedCallback(){if(this.shadowContainerDiv instanceof HTMLDivElement){a.unobserve(this.shadowContainerDiv)}this.mutationObserver.disconnect();this.slottedElements.forEach((o=>a.unobserve(o)))}render(){return r("div",{ref:o=>this.shadowContainerDiv=o,class:"dso-shadow-container"},r("div",{ref:o=>this.scrollContainerDiv=o,class:i("dso-scroll-container",{[`dso-scroll-${this.scrollPosition}`]:this.scrollPosition!=="noScroll"}),onScroll:()=>this._setScrollState()},r("slot",null)))}get host(){return s(this)}};d.style=n;export{d as dso_scrollable};
|
|
2
|
-
//# sourceMappingURL=p-1180ebe3.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["scrollableCss","resizeObserver","ResizeObserver","debounce","entries","forEach","entry","_a","getScrollableComponentFromResizeObserverEntry","_setScrollState","target","parentNode","ShadowRoot","isDsoScrollableComponent","host","parentElement","undefined","element","tagName","Scrollable","this","mutationObserver","MutationObserver","closest","scrollPosition","getScrollPosition","dsoScrollEnd","emit","scrollEnd","slottedElements","Array","from","children","scrollContainerDiv","scrollHeight","clientHeight","scrollTop","componentDidLoad","observe","characterData","attributes","childList","subtree","shadowContainerDiv","HTMLDivElement","disconnectedCallback","unobserve","disconnect","render","h","ref","el","class","clsx","onScroll"],"sources":["src/components/scrollable/scrollable.scss?tag=dso-scrollable&encapsulation=shadow","src/components/scrollable/scrollable.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n\r\n:host {\r\n display: block;\r\n height: 100%;\r\n overflow-y: hidden;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-shadow-container {\r\n height: 100%;\r\n max-height: inherit;\r\n min-height: inherit;\r\n position: relative;\r\n\r\n .dso-scroll-container {\r\n height: 100%;\r\n max-height: inherit;\r\n min-height: inherit;\r\n overflow-y: auto;\r\n\r\n &::before,\r\n &::after {\r\n background-repeat: no-repeat;\r\n background-size: 100% units.$u3;\r\n content: \"\";\r\n display: block;\r\n height: units.$u3;\r\n left: 0;\r\n opacity: 0;\r\n overflow: visible;\r\n position: absolute;\r\n transition: opacity 150ms ease-in-out;\r\n width: 100%;\r\n pointer-events: none;\r\n }\r\n\r\n &::before {\r\n background-image: linear-gradient(to top, rgba(183, 183, 183, 0), rgba(183, 183, 183, 0.7));\r\n top: 0;\r\n }\r\n\r\n &::after {\r\n background-image: linear-gradient(to bottom, rgba(183, 183, 183, 0), rgba(183, 183, 183, 0.7));\r\n bottom: 0;\r\n }\r\n\r\n &.dso-scroll-bottom {\r\n &::before {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n &.dso-scroll-top {\r\n &::after {\r\n opacity: 1;\r\n }\r\n }\r\n\r\n &.dso-scroll-middle {\r\n &::before,\r\n &::after {\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n}\r\n","import { Component, Element, Event, EventEmitter, h, Method, State } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { DsoScrollEndEvent, ScrollPosition } from \"./scrollable.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce(\r\n (entries: ResizeObserverEntry[]) =>\r\n entries.forEach((entry) => getScrollableComponentFromResizeObserverEntry(entry)?._setScrollState()),\r\n 50,\r\n ),\r\n);\r\n\r\nfunction getScrollableComponentFromResizeObserverEntry({\r\n target,\r\n}: ResizeObserverEntry): HTMLDsoScrollableElement | undefined {\r\n if (target.parentNode instanceof ShadowRoot && isDsoScrollableComponent(target.parentNode.host)) {\r\n return target.parentNode.host;\r\n }\r\n\r\n if (target.parentElement && isDsoScrollableComponent(target.parentElement)) {\r\n return target.parentElement;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction isDsoScrollableComponent(element: Element): element is HTMLDsoScrollableElement {\r\n return element.tagName === \"DSO-SCROLLABLE\";\r\n}\r\n\r\n@Component({\r\n tag: \"dso-scrollable\",\r\n styleUrl: \"scrollable.scss\",\r\n shadow: true,\r\n})\r\nexport class Scrollable {\r\n // One MutationObserver per instance because of https://github.com/whatwg/dom/issues/126\r\n private mutationObserver = new MutationObserver((entries) =>\r\n entries.forEach(({ target }) => {\r\n const element = target.parentElement?.closest(\"dso-scrollable\");\r\n if (element !== this.host) {\r\n return;\r\n }\r\n\r\n this._setScrollState();\r\n }),\r\n );\r\n\r\n private scrollContainerDiv?: HTMLDivElement;\r\n\r\n private shadowContainerDiv?: HTMLDivElement;\r\n\r\n @Element()\r\n host!: HTMLDsoScrollableElement;\r\n\r\n /**\r\n * Event emitted when the scrollbar has reached top or bottom.\r\n */\r\n @Event()\r\n dsoScrollEnd!: EventEmitter<DsoScrollEndEvent>;\r\n\r\n @State()\r\n scrollPosition: ScrollPosition = \"noScroll\";\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _setScrollState() {\r\n const scrollPosition = this.getScrollPosition();\r\n if (this.scrollPosition !== scrollPosition) {\r\n this.scrollPosition = scrollPosition;\r\n\r\n if (this.scrollPosition === \"top\" || this.scrollPosition === \"bottom\") {\r\n this.dsoScrollEnd.emit({ scrollEnd: this.scrollPosition });\r\n }\r\n }\r\n }\r\n\r\n private get slottedElements() {\r\n return Array.from(this.host.children);\r\n }\r\n\r\n private getScrollPosition(): ScrollPosition {\r\n if (!this.scrollContainerDiv) {\r\n return \"noScroll\";\r\n }\r\n\r\n const { scrollHeight, clientHeight, scrollTop } = this.scrollContainerDiv;\r\n\r\n if (scrollHeight <= clientHeight) {\r\n return \"noScroll\";\r\n }\r\n\r\n if (scrollTop === 0) {\r\n return \"top\";\r\n }\r\n\r\n if (scrollHeight - scrollTop - clientHeight < 1) {\r\n return \"bottom\";\r\n }\r\n\r\n if (scrollTop > 0) {\r\n return \"middle\";\r\n }\r\n\r\n return \"noScroll\";\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n attributes: false,\r\n childList: false,\r\n subtree: true,\r\n });\r\n\r\n if (this.shadowContainerDiv instanceof HTMLDivElement) {\r\n resizeObserver.observe(this.shadowContainerDiv);\r\n }\r\n\r\n this.slottedElements.forEach((element) => resizeObserver.observe(element));\r\n }\r\n\r\n disconnectedCallback(): void {\r\n if (this.shadowContainerDiv instanceof HTMLDivElement) {\r\n resizeObserver.unobserve(this.shadowContainerDiv);\r\n }\r\n\r\n this.mutationObserver.disconnect();\r\n\r\n this.slottedElements.forEach((element) => resizeObserver.unobserve(element));\r\n }\r\n\r\n render() {\r\n return (\r\n <div ref={(el) => (this.shadowContainerDiv = el)} class=\"dso-shadow-container\">\r\n <div\r\n ref={(el) => (this.scrollContainerDiv = el)}\r\n class={clsx(\"dso-scroll-container\", {\r\n [`dso-scroll-${this.scrollPosition}`]: this.scrollPosition !== \"noScroll\",\r\n })}\r\n onScroll={() => this._setScrollState()}\r\n >\r\n <slot></slot>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"mappings":"iIAAA,MAAMA,EAAgB,ksCCMtB,MAAMC,EAAiB,IAAIC,eACzBC,GACGC,GACCA,EAAQC,SAASC,IAAK,IAAAC,EAAK,OAAAA,EAAAC,EAA8CF,MAAM,MAAAC,SAAA,SAAAA,EAAEE,iBAAiB,KACpG,KAIJ,SAASD,GAA8CE,OACrDA,IAEA,GAAIA,EAAOC,sBAAsBC,YAAcC,EAAyBH,EAAOC,WAAWG,MAAO,CAC/F,OAAOJ,EAAOC,WAAWG,I,CAG3B,GAAIJ,EAAOK,eAAiBF,EAAyBH,EAAOK,eAAgB,CAC1E,OAAOL,EAAOK,a,CAGhB,OAAOC,SACT,CAEA,SAASH,EAAyBI,GAChC,OAAOA,EAAQC,UAAY,gBAC7B,C,MAOaC,EAAU,M,oEAEbC,KAAAC,iBAAmB,IAAIC,kBAAkBlB,GAC/CA,EAAQC,SAAQ,EAAGK,a,MACjB,MAAMO,GAAUV,EAAAG,EAAOK,iBAAa,MAAAR,SAAA,SAAAA,EAAEgB,QAAQ,kBAC9C,GAAIN,IAAYG,KAAKN,KAAM,CACzB,M,CAGFM,KAAKX,iBAAiB,M,oBAkBO,U,CAMjC,qBAAMA,GACJ,MAAMe,EAAiBJ,KAAKK,oBAC5B,GAAIL,KAAKI,iBAAmBA,EAAgB,CAC1CJ,KAAKI,eAAiBA,EAEtB,GAAIJ,KAAKI,iBAAmB,OAASJ,KAAKI,iBAAmB,SAAU,CACrEJ,KAAKM,aAAaC,KAAK,CAAEC,UAAWR,KAAKI,gB,GAK/C,mBAAYK,GACV,OAAOC,MAAMC,KAAKX,KAAKN,KAAKkB,S,CAGtB,iBAAAP,GACN,IAAKL,KAAKa,mBAAoB,CAC5B,MAAO,U,CAGT,MAAMC,aAAEA,EAAYC,aAAEA,EAAYC,UAAEA,GAAchB,KAAKa,mBAEvD,GAAIC,GAAgBC,EAAc,CAChC,MAAO,U,CAGT,GAAIC,IAAc,EAAG,CACnB,MAAO,K,CAGT,GAAIF,EAAeE,EAAYD,EAAe,EAAG,CAC/C,MAAO,Q,CAGT,GAAIC,EAAY,EAAG,CACjB,MAAO,Q,CAGT,MAAO,U,CAGT,gBAAAC,GACEjB,KAAKC,iBAAiBiB,QAAQlB,KAAKN,KAAM,CACvCyB,cAAe,KACfC,WAAY,MACZC,UAAW,MACXC,QAAS,OAGX,GAAItB,KAAKuB,8BAA8BC,eAAgB,CACrD3C,EAAeqC,QAAQlB,KAAKuB,mB,CAG9BvB,KAAKS,gBAAgBxB,SAASY,GAAYhB,EAAeqC,QAAQrB,I,CAGnE,oBAAA4B,GACE,GAAIzB,KAAKuB,8BAA8BC,eAAgB,CACrD3C,EAAe6C,UAAU1B,KAAKuB,mB,CAGhCvB,KAAKC,iBAAiB0B,aAEtB3B,KAAKS,gBAAgBxB,SAASY,GAAYhB,EAAe6C,UAAU7B,I,CAGrE,MAAA+B,GACE,OACEC,EAAA,OAAKC,IAAMC,GAAQ/B,KAAKuB,mBAAqBQ,EAAKC,MAAM,wBACtDH,EAAA,OACEC,IAAMC,GAAQ/B,KAAKa,mBAAqBkB,EACxCC,MAAOC,EAAK,uBAAwB,CAClC,CAAC,cAAcjC,KAAKI,kBAAmBJ,KAAKI,iBAAmB,aAEjE8B,SAAU,IAAMlC,KAAKX,mBAErBwC,EAAA,c"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as n,F as e,a}from"./p-4592810d.js";import{i as o}from"./p-17e4b846.js";const s=':host{display:block}*,*::after,*::before{box-sizing:border-box}.pagination{padding-inline-start:initial;text-align:center}.pagination>li{display:inline-block;font-weight:bold;line-height:calc(2rem - 4px);text-align:center;vertical-align:middle}.pagination>li>a,.pagination>li>span{align-items:center;color:#39870c;display:flex;height:2rem;justify-content:center;position:relative;width:2rem}.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:2rem;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}';const r=class{constructor(n){i(this,n);this.dsoSelectPage=t(this,"dsoSelectPage",7);this.sizePositionsMap={small:7,medium:9,large:11};this.availablePositions=undefined;this.totalPages=undefined;this.currentPage=undefined;this.formatHref=i=>"#"+i}sizeChangeHandler(i){this.availablePositions=this.getAvailablePositions(this.sizePositionsMap[i.detail])}clickHandler(i,t){this.dsoSelectPage.emit({originalEvent:i,page:t,isModifiedEvent:o(i)})}componentDidLoad(){var i;(i=this.responsiveElement)===null||i===void 0?void 0:i.getSize().then((i=>this.availablePositions=this.getAvailablePositions(this.sizePositionsMap[i])))}render(){var i,t,a;if(!this.totalPages){return null}if(this.availablePositions===undefined){return n("dso-responsive-element",{ref:i=>this.responsiveElement=i})}const o=this.availablePositions;const s=(i=this.currentPage)!==null&&i!==void 0?i:0;const r=this.getPages(s,this.availablePositions,this.totalPages);return n("dso-responsive-element",{ref:i=>this.responsiveElement=i},n("ul",{class:"pagination"},n("li",{class:s<=1||s>this.totalPages?"dso-page-hidden":undefined},n("a",{href:this.formatHref((t=r[r.indexOf(s)-1])!==null&&t!==void 0?t:1),"aria-label":"Vorige",onClick:i=>{var t;return s&&this.clickHandler(i,(t=r[r.indexOf(s)-1])!==null&&t!==void 0?t:1)}},n("dso-icon",{icon:"chevron-left"}))),r.map((i=>n(e,null,this.showEllipsisBeforeLast(r,i,o)&&n("li",null,n("span",null,"...")),n("li",{key:i,class:s===i?"active":undefined},s===i?n("span",{"aria-current":"page"},i):n("a",{href:this.formatHref(i),onClick:t=>this.clickHandler(t,i)},i)),this.showEllipsisAfterFirst(r,i,o)&&n("li",null,n("span",null,"..."))))),n("li",{class:s<1||s>=this.totalPages?"dso-page-hidden":undefined},n("a",{href:this.formatHref((a=r[r.indexOf(s)+1])!==null&&a!==void 0?a:this.totalPages),"aria-label":"Volgende",onClick:i=>{var t;return s&&this.totalPages&&this.clickHandler(i,(t=r[r.indexOf(s)+1])!==null&&t!==void 0?t:this.totalPages)}},n("dso-icon",{icon:"chevron-right"})))))}getAvailablePositions(i){if(i%2===0){return i-1}if(i<=3){return 3}return i}getPages(i,t,n){if(n+2<=t){return Array.from({length:n},((i,t)=>t+1))}if(t===3){return[i]}if(t===5){return[1,i,n]}return[1,...this.getPageRange(i,t,n),n]}getPageRange(i,t,n){const e=[];const a=Math.floor(t/2);if(i<=a){for(let i=2;i<=t-4;i++){e.push(i)}}if(i>=a&&i<=n-a){if(a===1){if(i>n-2){e.push(n-2)}e.push(i);if(i<3){e.push(3)}}if(a>1){const t=a-3;for(let o=Math.min(i-t,n-a);o<=Math.max(i+t,a);o++){if(o>2&&o<n-1){e.push(o)}}}}if(i>n-a){for(let i=n-(t-5);i<=n-1;i++){e.push(i)}}return e.filter(((i,t,n)=>n.indexOf(i)===t))}showEllipsisAfterFirst(i,t,n){const e=i[i.length-1];if(!e){throw new Error("No totalPages")}return i.indexOf(t)===0&&e>n-2&&!i.some((i=>i===2))&&n>=7}showEllipsisBeforeLast(i,t,n){const e=i[i.length-1];if(!e){throw new Error("No totalPages")}return i.indexOf(t)===i.length-1&&e>n-2&&!i.some((i=>i===e-1))&&n>=7}get host(){return a(this)}};r.style=s;export{r as dso_pagination};
|
|
2
|
-
//# sourceMappingURL=p-6d602847.entry.js.map
|