@dso-toolkit/core 43.0.0 → 44.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-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +14 -3
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +1 -1
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +46 -8
- package/dist/cjs/dso-info-button.cjs.entry.js +5 -1
- package/dist/cjs/dso-label.cjs.entry.js +16 -12
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +64 -37
- package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +3 -15
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +9 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/alert/alert.template.js +0 -14
- package/dist/collection/components/autosuggest/autosuggest.js +33 -4
- package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
- package/dist/collection/components/date-picker/date-picker.css +3 -3
- package/dist/collection/components/date-picker/date-picker.template.js +1 -16
- package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +22 -3
- package/dist/collection/components/header/header.css +3 -3
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +2 -2
- package/dist/collection/components/highlight-box/highlight-box.css +11 -6
- package/dist/collection/components/image-overlay/image-overlay.css +2 -2
- package/dist/collection/components/image-overlay/image-overlay.js +57 -11
- package/dist/collection/components/info-button/info-button.js +24 -2
- package/dist/collection/components/label/label.css +6 -2
- package/dist/collection/components/label/label.js +21 -14
- package/dist/collection/components/label/label.template.js +3 -3
- package/dist/collection/components/map-controls/map-controls.css +2 -2
- package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +2 -2
- package/dist/collection/components/ozon-content/nodes/figuur.node.js +22 -0
- package/dist/collection/components/ozon-content/nodes/{illustratie.node.js → inline-tekst-afbeelding.node.js} +2 -2
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +5 -3
- package/dist/collection/components/ozon-content/ozon-content.css +9 -8
- package/dist/collection/components/ozon-content/ozon-content.js +10 -5
- package/dist/collection/components/ozon-content/ozon-content.template.js +1 -1
- package/dist/collection/components/pagination/pagination.css +4 -4
- package/dist/collection/components/progress-bar/progress-bar.css +1 -1
- package/dist/collection/components/toggletip/toggletip.js +3 -15
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.css +16 -15
- package/dist/collection/components/viewer-grid/viewer-grid.js +10 -2
- package/dist/collection/components/viewer-grid/{templates/viewer-grid.template.js → viewer-grid.template.js} +0 -0
- package/dist/custom-elements/index.js +169 -93
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-0777c1c4.entry.js → p-363b56b1.entry.js} +1 -1
- package/dist/dso-toolkit/p-446dba5a.entry.js +1 -0
- package/dist/dso-toolkit/{p-3cb44a36.entry.js → p-6505be7d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-8e6ee9f0.entry.js → p-68d49733.entry.js} +1 -1
- package/dist/dso-toolkit/{p-1e92e29d.entry.js → p-7b716383.entry.js} +1 -1
- package/dist/dso-toolkit/p-7bfc5267.entry.js +1 -0
- package/dist/dso-toolkit/{p-63e0f10d.entry.js → p-80b5c915.entry.js} +1 -1
- package/dist/dso-toolkit/p-814d9d78.entry.js +1 -0
- package/dist/dso-toolkit/{p-1bd0e0c3.entry.js → p-ba835421.entry.js} +1 -1
- package/dist/dso-toolkit/p-bd1ee63c.entry.js +1 -0
- package/dist/dso-toolkit/p-bf4d6f63.entry.js +1 -0
- package/dist/dso-toolkit/p-cc45ecdf.entry.js +1 -0
- package/dist/dso-toolkit/{p-17e9802f.entry.js → p-d60876c2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a7bcd356.entry.js → p-d84c166c.entry.js} +1 -1
- package/dist/dso-toolkit/p-e98f049e.entry.js +1 -0
- package/dist/dso-toolkit/{p-553bd3aa.entry.js → p-f726111e.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +14 -3
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-header.entry.js +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +46 -8
- package/dist/esm/dso-info-button.entry.js +5 -1
- package/dist/esm/dso-label.entry.js +17 -13
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +64 -37
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +3 -15
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +9 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/alert/alert.template.d.ts +1 -2
- package/dist/types/components/autosuggest/autosuggest.d.ts +11 -1
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/types/components/date-picker/date-picker.template.d.ts +1 -4
- package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +1 -2
- package/dist/types/components/image-overlay/image-overlay.d.ts +5 -0
- package/dist/types/components/info-button/info-button.d.ts +2 -0
- package/dist/types/components/label/label.d.ts +2 -1
- package/dist/types/components/label/label.template.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/{illustratie.node.d.ts → figuur.node.d.ts} +1 -1
- package/dist/types/components/ozon-content/nodes/inline-tekst-afbeelding.node.d.ts +5 -0
- package/dist/types/components/ozon-content/ozon-content.d.ts +5 -1
- package/dist/types/components/toggletip/toggletip.d.ts +1 -3
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +4 -0
- package/dist/types/components/viewer-grid/{templates/viewer-grid.template.d.ts → viewer-grid.template.d.ts} +0 -0
- package/dist/types/components.d.ts +13 -4
- package/package.json +2 -16
- package/dist/collection/components/anchor/anchor.template.js +0 -17
- package/dist/collection/components/button/button.template.js +0 -48
- package/dist/collection/components/context/context.template.js +0 -42
- package/dist/collection/components/definition-list/definition-list.template.js +0 -36
- package/dist/collection/components/label/label.decorator.js +0 -6
- package/dist/collection/components/label-group/label-group.template.js +0 -7
- package/dist/collection/components/list/list.template.js +0 -44
- package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.js +0 -22
- package/dist/collection/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.js +0 -12
- package/dist/collection/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.js +0 -60
- package/dist/collection/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.js +0 -17
- package/dist/dso-toolkit/p-04b8814d.entry.js +0 -1
- package/dist/dso-toolkit/p-14fc5767.entry.js +0 -1
- package/dist/dso-toolkit/p-1d52d4f2.entry.js +0 -1
- package/dist/dso-toolkit/p-a5705dd1.entry.js +0 -1
- package/dist/dso-toolkit/p-aa098949.entry.js +0 -1
- package/dist/dso-toolkit/p-c282135e.entry.js +0 -1
- package/dist/dso-toolkit/p-daf049bd.entry.js +0 -1
- package/dist/types/components/anchor/anchor.template.d.ts +0 -2
- package/dist/types/components/button/button.template.d.ts +0 -2
- package/dist/types/components/context/context.template.d.ts +0 -3
- package/dist/types/components/definition-list/definition-list.template.d.ts +0 -3
- package/dist/types/components/label/label.decorator.d.ts +0 -3
- package/dist/types/components/label-group/label-group.template.d.ts +0 -2
- package/dist/types/components/list/list.template.d.ts +0 -3
- package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-header.example-template.d.ts +0 -2
- package/dist/types/components/viewer-grid/example-pages/viewer-grid-document-list.example-template.d.ts +0 -2
- package/dist/types/components/viewer-grid/example-pages/viewer-grid-filterblok.example-template.d.ts +0 -1
- package/dist/types/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.d.ts +0 -2
|
@@ -4,12 +4,17 @@ export declare class ImageOverlay implements ComponentInterface {
|
|
|
4
4
|
host: HTMLElement;
|
|
5
5
|
active: boolean;
|
|
6
6
|
focused: boolean;
|
|
7
|
+
zoomable: boolean;
|
|
7
8
|
buttonElement: HTMLButtonElement | undefined;
|
|
8
9
|
wrapperElement: HTMLDivElement | undefined;
|
|
9
10
|
trap: FocusTrap | undefined;
|
|
10
11
|
private mutationObserver?;
|
|
12
|
+
private resizeObserver?;
|
|
13
|
+
loadListener(event: Event): void;
|
|
11
14
|
componentDidLoad(): void;
|
|
12
15
|
disconnectedCallback(): void;
|
|
16
|
+
initZoomableImage(): void;
|
|
17
|
+
setZoomable(imageElement: HTMLImageElement): void;
|
|
13
18
|
render(): any;
|
|
14
19
|
componentDidRender(): void;
|
|
15
20
|
}
|
|
@@ -4,10 +4,12 @@ export interface InfoButtonToggleEvent {
|
|
|
4
4
|
active: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare class InfoButton {
|
|
7
|
+
private button?;
|
|
7
8
|
active?: boolean;
|
|
8
9
|
secondary?: boolean;
|
|
9
10
|
label: string;
|
|
10
11
|
toggle: EventEmitter<InfoButtonToggleEvent>;
|
|
12
|
+
setFocus(): Promise<void>;
|
|
11
13
|
private handleToggle;
|
|
12
14
|
render(): any;
|
|
13
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, ComponentInterface } from '../../stencil-public-runtime';
|
|
2
2
|
export declare class Label implements ComponentInterface {
|
|
3
|
-
private mutationObserver
|
|
3
|
+
private mutationObserver;
|
|
4
4
|
private resizeObserver;
|
|
5
5
|
private labelContent;
|
|
6
6
|
private keydownListenerActive;
|
|
@@ -14,6 +14,7 @@ export declare class Label implements ComponentInterface {
|
|
|
14
14
|
textHover?: boolean;
|
|
15
15
|
textFocus?: boolean;
|
|
16
16
|
truncatedContent?: string | null;
|
|
17
|
+
labelText?: string;
|
|
17
18
|
removeClick: EventEmitter<MouseEvent>;
|
|
18
19
|
watchTruncate(truncate: boolean): void;
|
|
19
20
|
watchTooltipActive(): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Label } from '@dso-toolkit/sources';
|
|
2
|
-
export declare function labelTemplate({ status, label,
|
|
2
|
+
export declare function labelTemplate({ status, label, removable, onRemoveClick, compact, truncate, symbol }: Label): import("lit-html").TemplateResult<1>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OzonContentNode } from '../ozon-content-node.interface';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class OzonContentFiguurNode implements OzonContentNode {
|
|
3
3
|
name: string[];
|
|
4
4
|
render(node: Element): any;
|
|
5
5
|
}
|
|
@@ -19,8 +19,12 @@ export declare class OzonContent implements ComponentInterface {
|
|
|
19
19
|
*
|
|
20
20
|
* **Do not** use this without an accessible companion element! `interactive` is only
|
|
21
21
|
* meant to ease the use of the companion element for mouse/touch users.
|
|
22
|
+
*
|
|
23
|
+
* * `true`: Interactive anchor-look-alike
|
|
24
|
+
* * `"sub"`: Interactive anchor-look-alike for sub navigation
|
|
25
|
+
* * `false | undefined`: Disabled
|
|
22
26
|
*/
|
|
23
|
-
interactive: boolean;
|
|
27
|
+
interactive: 'sub' | '' | boolean;
|
|
24
28
|
state: OzonContentNodeState;
|
|
25
29
|
anchorClick: EventEmitter<OzonContentAnchorClick>;
|
|
26
30
|
/**
|
|
@@ -5,9 +5,7 @@ export declare class Toggletip {
|
|
|
5
5
|
position: "top" | "right" | "bottom" | "left";
|
|
6
6
|
small?: boolean;
|
|
7
7
|
secondary?: boolean;
|
|
8
|
-
infoButton
|
|
9
|
-
button: HTMLButtonElement;
|
|
10
|
-
componentDidRender(): void;
|
|
8
|
+
infoButton?: HTMLDsoInfoButtonElement;
|
|
11
9
|
click: () => void;
|
|
12
10
|
open: () => void;
|
|
13
11
|
close: () => void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
import { FocusTrap } from "focus-trap";
|
|
3
3
|
export declare type MainSize = "small" | "medium" | "large";
|
|
4
|
+
export declare type LabelSizeMap = {
|
|
5
|
+
[key in MainSize]: string;
|
|
6
|
+
};
|
|
4
7
|
export interface ViewerGridChangeSizeEvent {
|
|
5
8
|
/**
|
|
6
9
|
* Indicates whether it's before or after the animation
|
|
@@ -13,6 +16,7 @@ export interface FilterpanelEvent {
|
|
|
13
16
|
originalEvent: MouseEvent;
|
|
14
17
|
}
|
|
15
18
|
export declare class ViewerGrid {
|
|
19
|
+
private sizeLabelMap;
|
|
16
20
|
filterpanelOpen: boolean;
|
|
17
21
|
overlayOpen: boolean;
|
|
18
22
|
/**
|
|
File without changes
|
|
@@ -35,6 +35,10 @@ export namespace Components {
|
|
|
35
35
|
* Shows progress indicator when fetching results.
|
|
36
36
|
*/
|
|
37
37
|
"loading": boolean;
|
|
38
|
+
/**
|
|
39
|
+
* To delay progress indicator showing (in ms).
|
|
40
|
+
*/
|
|
41
|
+
"loadingDelayed"?: number;
|
|
38
42
|
/**
|
|
39
43
|
* To override progress indicator's default loading label.
|
|
40
44
|
*/
|
|
@@ -166,6 +170,7 @@ export namespace Components {
|
|
|
166
170
|
"active"?: boolean;
|
|
167
171
|
"label": string;
|
|
168
172
|
"secondary"?: boolean;
|
|
173
|
+
"setFocus": () => Promise<void>;
|
|
169
174
|
}
|
|
170
175
|
interface DsoLabel {
|
|
171
176
|
"compact"?: boolean;
|
|
@@ -199,9 +204,9 @@ export namespace Components {
|
|
|
199
204
|
*/
|
|
200
205
|
"inline": boolean;
|
|
201
206
|
/**
|
|
202
|
-
* Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements. **Do not** use this without an accessible companion element! `interactive` is only meant to ease the use of the companion element for mouse/touch users.
|
|
207
|
+
* Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements. **Do not** use this without an accessible companion element! `interactive` is only meant to ease the use of the companion element for mouse/touch users. * `true`: Interactive anchor-look-alike * `"sub"`: Interactive anchor-look-alike for sub navigation * `false | undefined`: Disabled
|
|
203
208
|
*/
|
|
204
|
-
"interactive": boolean;
|
|
209
|
+
"interactive": 'sub' | '' | boolean;
|
|
205
210
|
}
|
|
206
211
|
interface DsoPagination {
|
|
207
212
|
/**
|
|
@@ -531,6 +536,10 @@ declare namespace LocalJSX {
|
|
|
531
536
|
* Shows progress indicator when fetching results.
|
|
532
537
|
*/
|
|
533
538
|
"loading"?: boolean;
|
|
539
|
+
/**
|
|
540
|
+
* To delay progress indicator showing (in ms).
|
|
541
|
+
*/
|
|
542
|
+
"loadingDelayed"?: number;
|
|
534
543
|
/**
|
|
535
544
|
* To override progress indicator's default loading label.
|
|
536
545
|
*/
|
|
@@ -726,9 +735,9 @@ declare namespace LocalJSX {
|
|
|
726
735
|
*/
|
|
727
736
|
"inline"?: boolean;
|
|
728
737
|
/**
|
|
729
|
-
* Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements. **Do not** use this without an accessible companion element! `interactive` is only meant to ease the use of the companion element for mouse/touch users.
|
|
738
|
+
* Visualize the component as interactive. This means that the component will emit `dsoClick` events when the user clicks non-interactive elements. **Do not** use this without an accessible companion element! `interactive` is only meant to ease the use of the companion element for mouse/touch users. * `true`: Interactive anchor-look-alike * `"sub"`: Interactive anchor-look-alike for sub navigation * `false | undefined`: Disabled
|
|
730
739
|
*/
|
|
731
|
-
"interactive"?: boolean;
|
|
740
|
+
"interactive"?: 'sub' | '' | boolean;
|
|
732
741
|
"onAnchorClick"?: (event: CustomEvent<OzonContentAnchorClick>) => void;
|
|
733
742
|
/**
|
|
734
743
|
* These events are only emitted when the component is `interactive`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dso-toolkit/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "44.0.0",
|
|
4
4
|
"description": "DSO Toolkit Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -17,13 +17,7 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"clear": "rimraf dist && rimraf loader",
|
|
19
19
|
"build": "stencil build",
|
|
20
|
-
"
|
|
21
|
-
"watch": "yarn clear && cross-env DSO_ENV=development yarn node scripts/watch.js",
|
|
22
|
-
"build-www": "cross-env DSO_ENV=production yarn bin_build-storybook --static-dir ./dist,../sources/storybook-assets --output-dir ./www",
|
|
23
|
-
"bin_stencil": "stencil",
|
|
24
|
-
"bin_start-storybook": "start-storybook",
|
|
25
|
-
"bin_cypress": "cypress",
|
|
26
|
-
"bin_build-storybook": "build-storybook"
|
|
20
|
+
"watch": "yarn clear && cross-env DSO_ENV=development yarn node scripts/watch.js"
|
|
27
21
|
},
|
|
28
22
|
"dependencies": {
|
|
29
23
|
"@popperjs/core": "^2.11.5",
|
|
@@ -40,19 +34,11 @@
|
|
|
40
34
|
"@dso-toolkit/sources": "0.0.0",
|
|
41
35
|
"@stencil/react-output-target": "^0.3.1",
|
|
42
36
|
"@stencil/sass": "1.5.2",
|
|
43
|
-
"@storybook/addon-a11y": "6.5.9",
|
|
44
|
-
"@storybook/addon-actions": "6.5.9",
|
|
45
|
-
"@storybook/addon-essentials": "6.5.9",
|
|
46
|
-
"@storybook/addons": "6.5.9",
|
|
47
|
-
"@storybook/builder-webpack5": "6.5.9",
|
|
48
|
-
"@storybook/manager-webpack5": "6.5.9",
|
|
49
|
-
"@storybook/web-components": "6.5.9",
|
|
50
37
|
"@types/concurrently": "^7.0.0",
|
|
51
38
|
"@types/debounce": "^1.2.1",
|
|
52
39
|
"@types/sass": "^1.43.1",
|
|
53
40
|
"@types/uuid": "^8.3.4",
|
|
54
41
|
"@types/validator": "^13.7.2",
|
|
55
|
-
"@whitespace/storybook-addon-html": "5.0.0",
|
|
56
42
|
"babel-loader": "^8.2.5",
|
|
57
43
|
"cheerio": "1.0.0-rc.10",
|
|
58
44
|
"concurrently": "^7.1.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
-
import { iconTemplate } from '../icon/icon.template';
|
|
4
|
-
export function anchorTemplate({ icon, iconMode, label, modifier, url }) {
|
|
5
|
-
return html `<a
|
|
6
|
-
href=${url}
|
|
7
|
-
class=${ifDefined(modifier)}
|
|
8
|
-
target=${ifDefined((modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern')) ? '_blank' : undefined)}
|
|
9
|
-
rel=${ifDefined((modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern')) ? 'noopener noreferrer' : undefined)}
|
|
10
|
-
>${icon && iconMode !== 'after'
|
|
11
|
-
? iconTemplate(icon)
|
|
12
|
-
: nothing}${label}${(modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern'))
|
|
13
|
-
? html `<span class="sr-only">(Opent andere website in nieuw tabblad)</span>`
|
|
14
|
-
: nothing}${icon && iconMode === 'after'
|
|
15
|
-
? iconTemplate(icon)
|
|
16
|
-
: nothing}</a>`;
|
|
17
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
-
import { iconTemplate } from '../icon/icon.template';
|
|
4
|
-
export function buttonTemplate(button) {
|
|
5
|
-
return 'url' in button
|
|
6
|
-
? anchorElement(button)
|
|
7
|
-
: buttonElement(button);
|
|
8
|
-
}
|
|
9
|
-
function anchorElement({ url, label, modifier, id, icon, iconMode }) {
|
|
10
|
-
return html `
|
|
11
|
-
<a
|
|
12
|
-
href=${url}
|
|
13
|
-
class=${ifDefined(modifier)}
|
|
14
|
-
?id=${id}
|
|
15
|
-
>
|
|
16
|
-
${icon && !iconMode
|
|
17
|
-
? iconTemplate(icon)
|
|
18
|
-
: nothing}<span class=${ifDefined(iconMode === 'only' ? 'sr-only' : undefined)}>${label}</span>${(modifier === null || modifier === void 0 ? void 0 : modifier.includes('extern'))
|
|
19
|
-
? html `<span class="sr-only">(Opent andere website in nieuw tabblad)</span>`
|
|
20
|
-
: nothing}${icon && iconMode
|
|
21
|
-
? iconTemplate(icon)
|
|
22
|
-
: nothing}
|
|
23
|
-
</a>
|
|
24
|
-
`;
|
|
25
|
-
}
|
|
26
|
-
function buttonElement({ variant, label, type, modifier, id, disabled, icon, iconMode, ariaDescribedby, ariaExpanded, ariaHaspopup, ariaRoledescription, onClick }) {
|
|
27
|
-
type !== null && type !== void 0 ? type : (type = 'button');
|
|
28
|
-
const className = variant ? `dso-${variant}` : modifier;
|
|
29
|
-
return html `
|
|
30
|
-
<button
|
|
31
|
-
type=${type}
|
|
32
|
-
id=${ifDefined(id)}
|
|
33
|
-
class=${ifDefined(className)}
|
|
34
|
-
?disabled=${disabled}
|
|
35
|
-
aria-describedby=${ifDefined(ariaDescribedby)}
|
|
36
|
-
aria-expanded=${ifDefined(ariaExpanded)}
|
|
37
|
-
aria-haspopup=${ifDefined(ariaHaspopup)}
|
|
38
|
-
aria-roledescription=${ifDefined(ariaRoledescription)}
|
|
39
|
-
@click=${ifDefined(onClick)}
|
|
40
|
-
>
|
|
41
|
-
${icon && !iconMode
|
|
42
|
-
? iconTemplate(icon)
|
|
43
|
-
: nothing}<span class=${ifDefined(iconMode === 'only' ? 'sr-only' : undefined)}>${label}</span>${icon && iconMode
|
|
44
|
-
? iconTemplate(icon)
|
|
45
|
-
: nothing}
|
|
46
|
-
</button>
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
function contextLabelTemplate(label, content, children) {
|
|
3
|
-
return html `
|
|
4
|
-
<div class="dso-context-wrapper">
|
|
5
|
-
<span class="dso-context-label">
|
|
6
|
-
${label}
|
|
7
|
-
</span>
|
|
8
|
-
<div class="dso-context-container">
|
|
9
|
-
${content}
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
${children}
|
|
13
|
-
`;
|
|
14
|
-
}
|
|
15
|
-
function contextFieldsetTemplate(label, content, children) {
|
|
16
|
-
return html `
|
|
17
|
-
<fieldset>
|
|
18
|
-
<legend class="sr-only">
|
|
19
|
-
${label}
|
|
20
|
-
</legend>
|
|
21
|
-
<div class="dso-context-wrapper">
|
|
22
|
-
<span class="dso-context-label" aria-hidden="true">
|
|
23
|
-
${label}
|
|
24
|
-
</span>
|
|
25
|
-
<div class="dso-context-container">
|
|
26
|
-
${content}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
${children}
|
|
30
|
-
</fieldset>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
export function contextTemplate({ label, type, content, children }) {
|
|
34
|
-
switch (type) {
|
|
35
|
-
case 'label':
|
|
36
|
-
return contextLabelTemplate(label, content, children);
|
|
37
|
-
case 'legend':
|
|
38
|
-
return contextFieldsetTemplate(label, content, children);
|
|
39
|
-
default:
|
|
40
|
-
throw new TypeError('type can only be label or legend');
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
-
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
4
|
-
import { listTemplate } from '../list/list.template';
|
|
5
|
-
function definitionTemplate({ term, descriptions }, useSrOnlyColon) {
|
|
6
|
-
return html `
|
|
7
|
-
<dt>
|
|
8
|
-
${term}${useSrOnlyColon
|
|
9
|
-
? html `<span class="sr-only">:</span>`
|
|
10
|
-
: ':'}
|
|
11
|
-
</dt>
|
|
12
|
-
${descriptions.map(description => html `
|
|
13
|
-
<dd>${definitionContentTemplate(description)}</dd>
|
|
14
|
-
`)}
|
|
15
|
-
`;
|
|
16
|
-
}
|
|
17
|
-
function definitionContentTemplate(description) {
|
|
18
|
-
if ('content' in description) {
|
|
19
|
-
if (typeof description.content === 'string') {
|
|
20
|
-
return unsafeHTML(description.content);
|
|
21
|
-
}
|
|
22
|
-
return description.content;
|
|
23
|
-
}
|
|
24
|
-
return listTemplate(description.list);
|
|
25
|
-
}
|
|
26
|
-
export function definitionListTemplate({ modifier, definitions, useSrOnlyColon }) {
|
|
27
|
-
return html `
|
|
28
|
-
<dl class=${ifDefined(modifier)}>
|
|
29
|
-
${definitions.map(definition => (modifier === null || modifier === void 0 ? void 0 : modifier.split(' ').includes('dso-columns'))
|
|
30
|
-
? html `
|
|
31
|
-
<div>${definitionTemplate(definition, useSrOnlyColon)}</div>
|
|
32
|
-
`
|
|
33
|
-
: definitionTemplate(definition, useSrOnlyColon))}
|
|
34
|
-
</dl>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Keep in sync with packages\css\src\components\list\list.template.ts (https://github.com/dso-toolkit/dso-toolkit/issues/1438)
|
|
2
|
-
import { Type } from '@dso-toolkit/sources';
|
|
3
|
-
import { html, nothing } from 'lit-html';
|
|
4
|
-
import { classMap } from 'lit-html/directives/class-map.js';
|
|
5
|
-
function ul(children, modifier) {
|
|
6
|
-
return html `
|
|
7
|
-
<ul class="${classMap({
|
|
8
|
-
'list-group': modifier === 'group',
|
|
9
|
-
'dso-columns-list': modifier === 'columns',
|
|
10
|
-
'dso-img-list': modifier === 'img-list'
|
|
11
|
-
})}">
|
|
12
|
-
${children}
|
|
13
|
-
</ul>
|
|
14
|
-
`;
|
|
15
|
-
}
|
|
16
|
-
function ol(children, modifier) {
|
|
17
|
-
return html `
|
|
18
|
-
<ol class="${classMap({
|
|
19
|
-
'list-group': modifier === 'group',
|
|
20
|
-
'dso-columns-list': modifier === 'columns',
|
|
21
|
-
'dso-img-list': modifier === 'img-list'
|
|
22
|
-
})}">
|
|
23
|
-
${children}
|
|
24
|
-
</ol>
|
|
25
|
-
`;
|
|
26
|
-
}
|
|
27
|
-
export function listTemplate({ type, items, modifier }) {
|
|
28
|
-
const children = html `
|
|
29
|
-
${items.map(item => html `
|
|
30
|
-
<li class="${classMap({ 'list-group-item': modifier === 'group' })}">
|
|
31
|
-
${modifier === 'img-list' ?
|
|
32
|
-
html `
|
|
33
|
-
<img src=${item.imgSrc} />
|
|
34
|
-
`
|
|
35
|
-
: nothing}
|
|
36
|
-
${item.text}
|
|
37
|
-
</li>
|
|
38
|
-
`)}
|
|
39
|
-
`;
|
|
40
|
-
if (type === Type.Ol) {
|
|
41
|
-
return ol(children, modifier);
|
|
42
|
-
}
|
|
43
|
-
return ul(children, modifier);
|
|
44
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AlertType } from "@dso-toolkit/sources";
|
|
2
|
-
import { documentHeaderTemplate } from '@dso-toolkit/css/src/components/document-header/document-header.template';
|
|
3
|
-
import { status, features, statusContent } from '@dso-toolkit/css/src/components/document-header/document-header.content';
|
|
4
|
-
import { alertTemplate } from '../../alert/alert.template';
|
|
5
|
-
import { viewerGridTemplate } from '../templates/viewer-grid.template';
|
|
6
|
-
export function viewerGridDocumentHeaderExampleTemplate({ documentHeaderFeaturesOpen, documentHeaderFeatureAction, documentHeaderStatusOpen }) {
|
|
7
|
-
return viewerGridTemplate({
|
|
8
|
-
main: documentHeaderTemplate({
|
|
9
|
-
title: 'Omgevingsplan gemeente Gouda',
|
|
10
|
-
type: 'Een omgevingsplan waar de omgeving mooier van wordt',
|
|
11
|
-
owner: 'Gemeente Gouda',
|
|
12
|
-
features,
|
|
13
|
-
featureAction: documentHeaderFeatureAction,
|
|
14
|
-
featuresOpen: documentHeaderFeaturesOpen,
|
|
15
|
-
statusContentOpen: documentHeaderStatusOpen,
|
|
16
|
-
status: status(documentHeaderFeaturesOpen, documentHeaderFeatureAction),
|
|
17
|
-
statusContent
|
|
18
|
-
}),
|
|
19
|
-
map: alertTemplate({ message: 'Dit is de kaart', status: AlertType.Info })
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AlertType } from "@dso-toolkit/sources";
|
|
2
|
-
import { documentListStatusDemoContentMapper } from '@dso-toolkit/css/src/components/document-list/document-list.mapper';
|
|
3
|
-
import { documentListTemplate } from '@dso-toolkit/css/src/components/document-list/document-list.template';
|
|
4
|
-
import { alertTemplate } from "../../alert/alert.template";
|
|
5
|
-
import { viewerGridTemplate } from '../templates/viewer-grid.template';
|
|
6
|
-
export function viewerGridDocumentListExampleTemplate(documentList) {
|
|
7
|
-
return viewerGridTemplate({
|
|
8
|
-
main: documentListTemplate({ items: documentList.items.map(item => (Object.assign(Object.assign({}, item), { status: documentListStatusDemoContentMapper(item.status) }))) }),
|
|
9
|
-
map: alertTemplate({ message: 'Dit is de kaart', status: AlertType.Info })
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { AlertType } from "@dso-toolkit/sources";
|
|
2
|
-
import { html } from "lit-html";
|
|
3
|
-
import { alertTemplate } from "../../alert/alert.template";
|
|
4
|
-
import { buttonTemplate } from "../../button/button.template";
|
|
5
|
-
import { contextTemplate } from "../../context/context.template";
|
|
6
|
-
import { labelGroupTemplate } from "../../label-group/label-group.template";
|
|
7
|
-
import { viewerGridTemplate } from "../templates/viewer-grid.template";
|
|
8
|
-
export function viewerGridFilterblokExampleTemplate() {
|
|
9
|
-
const activeFilters = [
|
|
10
|
-
{
|
|
11
|
-
label: "Geldend",
|
|
12
|
-
status: "bright",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: "Regels",
|
|
16
|
-
status: "bright",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "Tuin",
|
|
20
|
-
status: "bright",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: "Woongebied",
|
|
24
|
-
status: "bright",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "Geluidzone",
|
|
28
|
-
status: "bright",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "Thema: milieu algemeen",
|
|
32
|
-
status: "bright",
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
return viewerGridTemplate({
|
|
36
|
-
main: html `
|
|
37
|
-
<section class="dso-filterblok">
|
|
38
|
-
<div class="dso-highlight-box">
|
|
39
|
-
${contextTemplate({
|
|
40
|
-
type: "label",
|
|
41
|
-
label: html `<h3>Uw keuzes</h3>`,
|
|
42
|
-
content: buttonTemplate({
|
|
43
|
-
variant: "tertiary",
|
|
44
|
-
label: "Alle opties",
|
|
45
|
-
icon: {
|
|
46
|
-
icon: "pencil",
|
|
47
|
-
},
|
|
48
|
-
}),
|
|
49
|
-
children: html `
|
|
50
|
-
<p class="dso-filterblok-address">Achterwillenseweg 9a, Gouda</p>
|
|
51
|
-
${labelGroupTemplate({ labels: activeFilters })}
|
|
52
|
-
`,
|
|
53
|
-
})}
|
|
54
|
-
</div>
|
|
55
|
-
</section>
|
|
56
|
-
`,
|
|
57
|
-
map: alertTemplate({ message: 'Dit is de kaart', status: AlertType.Info })
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
;
|
package/dist/collection/components/viewer-grid/example-pages/viewer-grid-tiles.example-template.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AlertType } from "@dso-toolkit/sources";
|
|
2
|
-
import { html } from "lit-html";
|
|
3
|
-
import { alertTemplate } from "../../alert/alert.template";
|
|
4
|
-
import { tileGridTemplate } from "@dso-toolkit/css/src/components/tile-grid/tile-grid.template";
|
|
5
|
-
import { tileTemplate } from "@dso-toolkit/css/src/components/tile/tile.template";
|
|
6
|
-
import { viewerGridTemplate } from "../templates/viewer-grid.template";
|
|
7
|
-
export function viewerGridTilesExampleTemplate(tiles) {
|
|
8
|
-
return viewerGridTemplate({
|
|
9
|
-
main: html `
|
|
10
|
-
<h2>Thema's</h2>
|
|
11
|
-
<p>Bekijk regels en beleid rond een bepaald thema.</p>
|
|
12
|
-
${tileGridTemplate({ children: html `${tiles.map(tile => tileTemplate(tile))}` })}
|
|
13
|
-
`,
|
|
14
|
-
map: alertTemplate({ message: 'Dit is de kaart', status: AlertType.Info })
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as s,F as i,g as e}from"./p-c62606a3.js";import{c as l}from"./p-4070c1e5.js";let r=class{constructor(s){o(this,s),this.removeClick=t(this,"removeClick",7),this.resizeObserver=new ResizeObserver((()=>this.truncateLabel())),this.keydownListenerActive=!1,this.keyDownListener=o=>{"Escape"==o.key&&(this.textHover=!1,this.textFocus=!1)}}watchTruncate(o){o?this.startTruncate():this.stopTruncate()}watchTooltipActive(){this.keydownListenerActive||!this.textHover&&!this.textFocus||(document.addEventListener("keydown",this.keyDownListener),this.keydownListenerActive=!0),this.textHover||this.textFocus||(document.removeEventListener("keydown",this.keyDownListener),this.keydownListenerActive=!1)}truncateLabel(){setTimeout((()=>{var o;this.labelContent&&(this.truncatedContent=(o=this.labelContent).scrollWidth>o.clientWidth?this.host.innerText:void 0)}))}componentDidLoad(){this.truncate&&this.startTruncate()}disconnectedCallback(){this.stopTruncate()}startTruncate(){this.mutationObserver=new MutationObserver((()=>{this.truncateLabel()})),this.mutationObserver.observe(this.host,{attributes:!0,subtree:!0}),this.resizeObserver.observe(this.host),this.truncateLabel()}stopTruncate(){var o;document.removeEventListener("keydown",this.keyDownListener),null===(o=this.mutationObserver)||void 0===o||o.disconnect(),this.resizeObserver.unobserve(this.host),this.truncatedContent=void 0,this.keydownListenerActive=!1}render(){const o=this.status&&r.statusMap.get(this.status);return s(i,null,s("span",{id:"toggle-anchor",class:l("dso-label",{[`dso-label-${this.status}`]:this.status,"dso-compact":this.compact&&!this.removable,"dso-hover":this.removeHover||this.removeFocus})},s("slot",{name:"symbol"}),o&&s("span",{class:"sr-only"},o,": "),s("span",{class:l("dso-label-content",{"dso-truncate":!!this.truncate}),ref:o=>this.labelContent=o,tabindex:this.truncate&&this.truncatedContent?0:-1,onMouseEnter:()=>this.textHover=!0,onMouseLeave:()=>this.textHover=!1,onFocus:()=>this.textFocus=!0,onBlur:()=>this.textFocus=!1},s("slot",null)),this.removable&&s("button",{type:"button",onClick:o=>this.removeClick.emit(o),onMouseEnter:()=>this.removeHover=!0,onMouseLeave:()=>this.removeHover=!1,onFocus:()=>this.removeFocus=!0,onBlur:()=>this.removeFocus=!1},s("span",{class:"sr-only"},"Verwijder"),s("dso-icon",{icon:"times"}))),s("dso-tooltip",{stateless:!0,for:"toggle-anchor",active:!!this.truncatedContent&&(this.textHover||this.textFocus),position:"top"},this.truncatedContent))}get host(){return e(this)}static get watchers(){return{truncate:["watchTruncate"],textHover:["watchTooltipActive"],textFocus:["watchTooltipActive"]}}};r.statusMap=new Map([["info","Opmerking"],["success","Gelukt"],["warning","Waarschuwing"],["danger","Fout"]]),r.style=":host{display:inline-block;max-width:100%}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-label{background-color:#f2f2f2;border-radius:4px;color:#191919;display:inline-block;line-height:1.5}.dso-label:not(.dso-label-bright){padding:4px 8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:right;font-size:16px;margin-bottom:-4px;margin-left:8px;margin-right:-4px;margin-top:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label.dso-compact{border:0;padding:0 8px}.dso-label.dso-label-info{background-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;color:#191919}.dso-label.dso-label-danger{background-color:#ce3f51;color:#fff}.dso-label.dso-label-bright{background-color:#fff;color:#191919;border:1px solid #ccc;padding:3px 7px}.dso-label.dso-hover .dso-label-content{text-decoration:line-through}.dso-truncate.dso-label-content{display:inline-block;max-width:184px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}";export{r as dso_label}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,F as i,g as o}from"./p-c62606a3.js";let h=class{constructor(s){t(this,s),this.active=!1,this.label="Toelichting",this.position="right",this.click=()=>{this.active?this.close():this.open()},this.open=()=>{this.active=!0,this.host.addEventListener("keydown",this.keyDownListener),this.host.addEventListener("focusout",this.focusOutListener)},this.close=()=>{this.host.removeEventListener("focusout",this.focusOutListener),this.host.removeEventListener("keydown",this.keyDownListener),this.active=!1},this.focusOutListener=t=>{this.host.contains(t.relatedTarget)||this.close()},this.keyDownListener=t=>{t.defaultPrevented||"Escape"!=t.key||(this.close(),this.button.focus(),t.preventDefault())}}componentDidRender(){var t,s,i;const o=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("dso-info-button");if(!o)throw Error("dso-info-button not found");this.infoButton=o;const h=null===(i=null===(s=this.infoButton)||void 0===s?void 0:s.shadowRoot)||void 0===i?void 0:i.querySelector("button");if(!h)throw Error("button not found");this.button=h}render(){return s(i,null,s("dso-info-button",{id:"toggle",onClick:this.click,label:this.label,active:this.active,secondary:this.secondary}),s("dso-tooltip",{stateless:!0,descriptive:!0,for:"toggle",active:this.active,position:this.position,small:this.small},s("slot",null)))}get host(){return o(this)}};h.style="*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";export{h as dso_toggletip}
|