@dso-toolkit/core 62.0.0 → 62.2.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-accordion-section.cjs.entry.js +39 -27
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-alert_5.cjs.entry.js +16 -7
- package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +8 -8
- package/dist/cjs/dso-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js +4 -0
- package/dist/cjs/dso-expandable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +4 -2
- package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-logo.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +32 -49
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +129 -9
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/date-picker/date-utils.js +8 -8
- package/dist/collection/components/date-picker/date-utils.js.map +1 -1
- package/dist/collection/components/document-component/document-component.js +36 -12
- package/dist/collection/components/document-component/document-component.js.map +1 -1
- package/dist/collection/components/document-component/document-component.models.js.map +1 -1
- package/dist/collection/components/expandable/expandable.js +25 -1
- package/dist/collection/components/expandable/expandable.js.map +1 -1
- package/dist/collection/components/header/header.css +20 -38
- package/dist/collection/components/header/header.interfaces.js.map +1 -1
- package/dist/collection/components/header/header.js +40 -3
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/highlight-box/highlight-box.css +1 -0
- package/dist/collection/components/logo/logo.js +1 -1
- package/dist/collection/components/logo/logo.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +15 -5
- package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content.interfaces.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content.js +11 -6
- package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
- package/dist/collection/components/viewer-grid/components/document-panel.js +2 -2
- package/dist/collection/components/viewer-grid/components/document-panel.js.map +1 -1
- package/dist/collection/components/viewer-grid/components/main-panel.js +4 -3
- package/dist/collection/components/viewer-grid/components/main-panel.js.map +1 -1
- package/dist/collection/components/viewer-grid/components/sizing-buttons.js +4 -0
- package/dist/collection/components/viewer-grid/components/sizing-buttons.js.map +1 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +2 -97
- package/dist/collection/components/viewer-grid/viewer-grid.js +3 -9
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/components/attachments-counter.js +41 -0
- package/dist/components/attachments-counter.js.map +1 -0
- package/dist/components/document-component.js.map +1 -1
- package/dist/components/dso-accordion-section.js +50 -31
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-attachments-counter.js +1 -37
- package/dist/components/dso-attachments-counter.js.map +1 -1
- package/dist/components/dso-date-picker.js +8 -8
- package/dist/components/dso-date-picker.js.map +1 -1
- package/dist/components/dso-header.js +6 -2
- package/dist/components/dso-header.js.map +1 -1
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-highlight-box.js.map +1 -1
- package/dist/components/dso-logo.js.map +1 -1
- package/dist/components/dso-viewer-grid.js +32 -49
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/expandable.js +4 -0
- package/dist/components/expandable.js.map +1 -1
- package/dist/components/ozon-content.js +16 -7
- package/dist/components/ozon-content.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-000f7731.entry.js +2 -0
- package/dist/dso-toolkit/p-000f7731.entry.js.map +1 -0
- package/dist/dso-toolkit/p-18152675.entry.js +2 -0
- package/dist/dso-toolkit/p-18152675.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-432df09a.entry.js → p-2719a53a.entry.js} +2 -2
- package/dist/dso-toolkit/p-2719a53a.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-7d90b3b2.entry.js → p-4239e3d6.entry.js} +2 -2
- package/dist/dso-toolkit/p-4239e3d6.entry.js.map +1 -0
- package/dist/dso-toolkit/p-47e77e24.entry.js.map +1 -1
- package/dist/dso-toolkit/p-4e04b39f.entry.js +2 -0
- package/dist/dso-toolkit/p-4e04b39f.entry.js.map +1 -0
- package/dist/dso-toolkit/p-6dfe9062.entry.js.map +1 -1
- package/dist/dso-toolkit/p-753b5aa8.entry.js +2 -0
- package/dist/dso-toolkit/p-753b5aa8.entry.js.map +1 -0
- package/dist/dso-toolkit/p-7edafced.entry.js +2 -0
- package/dist/dso-toolkit/p-7edafced.entry.js.map +1 -0
- package/dist/esm/dso-accordion-section.entry.js +40 -28
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-alert_5.entry.js +16 -7
- package/dist/esm/dso-alert_5.entry.js.map +1 -1
- package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
- package/dist/esm/dso-date-picker.entry.js +8 -8
- package/dist/esm/dso-date-picker.entry.js.map +1 -1
- package/dist/esm/dso-expandable.entry.js +4 -0
- package/dist/esm/dso-expandable.entry.js.map +1 -1
- package/dist/esm/dso-header.entry.js +4 -2
- package/dist/esm/dso-header.entry.js.map +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js.map +1 -1
- package/dist/esm/dso-logo.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +32 -49
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/components/accordion-section.d.ts +15 -1
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +11 -1
- package/dist/types/components/document-component/document-component.d.ts +5 -5
- package/dist/types/components/document-component/document-component.models.d.ts +1 -0
- package/dist/types/components/expandable/expandable.d.ts +7 -1
- package/dist/types/components/header/header.d.ts +12 -1
- package/dist/types/components/header/header.interfaces.d.ts +1 -1
- package/dist/types/components/logo/logo.d.ts +1 -1
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +4 -2
- package/dist/types/components/ozon-content/ozon-content.d.ts +2 -2
- package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +1 -0
- package/dist/types/components/viewer-grid/components/main-panel.d.ts +0 -1
- package/dist/types/components/viewer-grid/components/sizing-buttons.d.ts +10 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +0 -2
- package/dist/types/components.d.ts +61 -25
- package/package.json +2 -2
- package/dist/collection/components/accordion/components/handles/element.handle.js +0 -8
- package/dist/collection/components/accordion/components/handles/element.handle.js.map +0 -1
- package/dist/collection/components/accordion/components/handles/heading.handle.js +0 -15
- package/dist/collection/components/accordion/components/handles/heading.handle.js.map +0 -1
- package/dist/collection/components/accordion/components/handles/icon.handle.js +0 -14
- package/dist/collection/components/accordion/components/handles/icon.handle.js.map +0 -1
- package/dist/collection/components/accordion/components/handles/index.js +0 -5
- package/dist/collection/components/accordion/components/handles/index.js.map +0 -1
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js +0 -19
- package/dist/collection/components/accordion/components/handles/state-icon.handle.js.map +0 -1
- package/dist/dso-toolkit/p-04662263.entry.js +0 -2
- package/dist/dso-toolkit/p-04662263.entry.js.map +0 -1
- package/dist/dso-toolkit/p-432df09a.entry.js.map +0 -1
- package/dist/dso-toolkit/p-6b42f0cc.entry.js +0 -2
- package/dist/dso-toolkit/p-6b42f0cc.entry.js.map +0 -1
- package/dist/dso-toolkit/p-7d90b3b2.entry.js.map +0 -1
- package/dist/dso-toolkit/p-a7186c03.entry.js +0 -2
- package/dist/dso-toolkit/p-a7186c03.entry.js.map +0 -1
- package/dist/dso-toolkit/p-c47aea93.entry.js +0 -2
- package/dist/dso-toolkit/p-c47aea93.entry.js.map +0 -1
- package/dist/dso-toolkit/p-dbea5bbd.entry.js +0 -2
- package/dist/dso-toolkit/p-dbea5bbd.entry.js.map +0 -1
- package/dist/types/components/accordion/components/handles/element.handle.d.ts +0 -6
- package/dist/types/components/accordion/components/handles/heading.handle.d.ts +0 -6
- package/dist/types/components/accordion/components/handles/icon.handle.d.ts +0 -7
- package/dist/types/components/accordion/components/handles/index.d.ts +0 -4
- package/dist/types/components/accordion/components/handles/state-icon.handle.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable.js","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAwB,MAAM,SAAS,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"expandable.js","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAwB,MAAM,SAAS,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n h,\r\n Host,\r\n Prop,\r\n State,\r\n Watch,\r\n} from \"@stencil/core\";\r\nimport anime, { AnimeInstance } from \"animejs\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nexport interface ExpandableAnimationStartEvent {}\r\n\r\nexport interface ExpandableAnimationEndEvent {\r\n bodyHeight: number | undefined;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-expandable\",\r\n styleUrl: \"expandable.scss\",\r\n shadow: true,\r\n})\r\nexport class Expandable implements ComponentInterface {\r\n private resizeObserver?: ResizeObserver;\r\n\r\n private bodyHeight?: number;\r\n\r\n private animeInstance?: AnimeInstance;\r\n\r\n @Element()\r\n host!: HTMLDsoExpandableElement;\r\n\r\n /**\r\n * Set to `true` to expand the content.\r\n */\r\n @Prop({ reflect: true })\r\n open?: boolean;\r\n\r\n /**\r\n * Set to `true` to show the content animated.\r\n */\r\n @Prop()\r\n enableAnimation = false;\r\n\r\n /**\r\n * When enableAnimation is set to `true`, this property specifies the height of this element at which the animation will expand from / collapse to\r\n */\r\n @Prop()\r\n minimumHeight?: number;\r\n\r\n @State()\r\n animationReady = false;\r\n\r\n @Watch(\"open\")\r\n toggleOpen() {\r\n if (this.enableAnimation) {\r\n this.activateAnimation();\r\n }\r\n }\r\n\r\n @Watch(\"enableAnimation\")\r\n toggleEnableAnimation(enableAnimation: boolean) {\r\n if (enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n this.activateObserver();\r\n } else {\r\n this.resizeObserver?.disconnect();\r\n delete this.animeInstance;\r\n this.host.removeAttribute(\"style\");\r\n }\r\n }\r\n\r\n /**\r\n * Fired before expanding.\r\n */\r\n @Event({ bubbles: false })\r\n dsoExpandableAnimationStart!: EventEmitter<ExpandableAnimationStartEvent>;\r\n\r\n /**\r\n * Fired after expanding.\r\n */\r\n @Event({ bubbles: false })\r\n dsoExpandableAnimationEnd!: EventEmitter<ExpandableAnimationEndEvent>;\r\n\r\n componentDidLoad(): void {\r\n if (this.enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n }\r\n\r\n this.activateObserver();\r\n }\r\n\r\n private activateObserver() {\r\n this.resizeObserver?.observe(this.host);\r\n }\r\n\r\n disconnectedCallback() {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n aria-hidden={this.open ? \"false\" : \"true\"}\r\n class={clsx({\r\n \"dso-animate-ready\": this.enableAnimation && this.animationReady,\r\n \"dso-hide\": !this.enableAnimation && !this.open,\r\n })}\r\n >\r\n <slot />\r\n </Host>\r\n );\r\n }\r\n\r\n private prepareAnimationResizeObserver(): void {\r\n this.resizeObserver = new ResizeObserver(\r\n debounce(([entry]) => {\r\n if (!entry) {\r\n throw new Error(\"No entry found\");\r\n }\r\n\r\n // entry.contentRect does not include padding, so we use getBoundingClientRect.\r\n const height = entry.target.getBoundingClientRect().height;\r\n\r\n if (this.bodyHeight !== height) {\r\n this.bodyHeight = height;\r\n }\r\n\r\n this.instantiateAnimation();\r\n }, 150)\r\n );\r\n }\r\n\r\n private instantiateAnimation(): void {\r\n this.animeInstance = anime({\r\n targets: this.host,\r\n height: this.minimumHeight ?? 0,\r\n easing: \"cubicBezier(0.4, 0, 0.2, 1)\",\r\n duration: 260,\r\n autoplay: false,\r\n direction: \"normal\",\r\n changeBegin: () => {\r\n this.dsoExpandableAnimationStart.emit({});\r\n },\r\n begin: () => {\r\n if (this.open) {\r\n this.host.style.visibility = \"\";\r\n this.host.style.position = \"\";\r\n this.host.style.bottom = \"\";\r\n }\r\n },\r\n complete: () => {\r\n this.host.style.height = \"\";\r\n\r\n if (!this.open) {\r\n this.host.style.visibility = \"hidden\";\r\n this.host.style.position = \"absolute\";\r\n this.host.style.bottom = \"100%\";\r\n }\r\n },\r\n changeComplete: () => {\r\n this.dsoExpandableAnimationEnd.emit({ bodyHeight: this.bodyHeight });\r\n },\r\n });\r\n\r\n if (!this.open) {\r\n this.animeInstance.reverse();\r\n this.animeInstance.play();\r\n }\r\n\r\n if (this.host) {\r\n this.host.style.height = \"\";\r\n }\r\n\r\n this.animationReady = !!this.animeInstance;\r\n }\r\n\r\n private activateAnimation(): void {\r\n if (this.animeInstance) {\r\n if (this.animeInstance.progress > 0 && this.animeInstance.progress < 100) {\r\n this.animeInstance.reverse();\r\n } else {\r\n if (this.open) {\r\n this.animeInstance.direction = \"reverse\";\r\n this.animeInstance.play();\r\n } else {\r\n this.animeInstance.direction = \"normal\";\r\n this.animeInstance.play();\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -29,50 +29,32 @@
|
|
|
29
29
|
padding-top: 16px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.login .dso-tertiary,
|
|
33
|
-
.logout .dso-tertiary {
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
font-family: Asap, sans-serif;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
vertical-align: text-bottom;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.profile a,
|
|
41
|
-
.logout a,
|
|
42
|
-
.login a {
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
color: #39870c;
|
|
45
|
-
font-weight: 600;
|
|
46
|
-
}
|
|
47
|
-
.profile a:hover, .profile a:focus,
|
|
48
|
-
.logout a:hover,
|
|
49
|
-
.logout a:focus,
|
|
50
|
-
.login a:hover,
|
|
51
|
-
.login a:focus {
|
|
52
|
-
text-decoration: none;
|
|
53
|
-
}
|
|
54
|
-
.profile a:active,
|
|
55
|
-
.logout a:active,
|
|
56
|
-
.login a:active {
|
|
57
|
-
text-decoration: underline;
|
|
58
|
-
}
|
|
59
|
-
.profile a:focus,
|
|
60
|
-
.logout a:focus,
|
|
61
|
-
.login a:focus {
|
|
62
|
-
color: #fff;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
32
|
.dso-header-session {
|
|
66
33
|
display: flex;
|
|
34
|
+
align-items: center;
|
|
67
35
|
margin-left: auto;
|
|
68
36
|
}
|
|
69
|
-
.dso-header-session .profile
|
|
37
|
+
.dso-header-session .profile .dso-tertiary,
|
|
38
|
+
.dso-header-session .login .dso-tertiary,
|
|
39
|
+
.dso-header-session .logout .dso-tertiary,
|
|
40
|
+
.dso-header-session .help .dso-tertiary {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
font-family: Asap, sans-serif;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 1.5;
|
|
45
|
+
}
|
|
46
|
+
.dso-header-session .profile {
|
|
70
47
|
margin-left: 8px;
|
|
71
48
|
}
|
|
72
|
-
.dso-header-session .profile + .logout
|
|
49
|
+
.dso-header-session .profile + .logout,
|
|
50
|
+
.dso-header-session .profile ~ .help {
|
|
73
51
|
border-left: 3px solid #ccc;
|
|
74
|
-
margin-left:
|
|
75
|
-
padding-left:
|
|
52
|
+
margin-left: 8px;
|
|
53
|
+
padding-left: 8px;
|
|
54
|
+
}
|
|
55
|
+
.dso-header-session .help a,
|
|
56
|
+
.dso-header-session .help button {
|
|
57
|
+
display: flex;
|
|
76
58
|
}
|
|
77
59
|
|
|
78
60
|
.dso-navbar {
|
|
@@ -83,7 +65,7 @@
|
|
|
83
65
|
}
|
|
84
66
|
|
|
85
67
|
dso-dropdown-menu button {
|
|
86
|
-
align-items:
|
|
68
|
+
align-items: center;
|
|
87
69
|
background-color: transparent;
|
|
88
70
|
border: 0;
|
|
89
71
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.interfaces.js","sourceRoot":"","sources":["../../../src/components/header/header.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface HeaderMenuItem {\r\n label: string;\r\n url: string;\r\n active?: boolean;\r\n}\r\n\r\nexport type HeaderNavigationType = \"menuItem\" | \"profile\" | \"logout\" | \"login\" | \"userHome\";\r\n\r\nexport interface HeaderClickEvent {\r\n originalEvent: MouseEvent;\r\n type: HeaderNavigationType;\r\n /** True when user selected the page holding Ctrl, Alt or other modifiers. Can be used to determine navigation. */\r\n isModifiedEvent: boolean;\r\n /** Url of the selected item. */\r\n url?: string;\r\n}\r\n\r\nexport interface HeaderClickMenuItemEvent extends HeaderClickEvent {\r\n menuItem: HeaderMenuItem;\r\n}\r\n\r\nexport type HeaderEvent = HeaderClickEvent | HeaderClickMenuItemEvent;\r\n"]}
|
|
1
|
+
{"version":3,"file":"header.interfaces.js","sourceRoot":"","sources":["../../../src/components/header/header.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface HeaderMenuItem {\r\n label: string;\r\n url: string;\r\n active?: boolean;\r\n}\r\n\r\nexport type HeaderNavigationType = \"menuItem\" | \"profile\" | \"logout\" | \"login\" | \"userHome\" | \"help\";\r\n\r\nexport interface HeaderClickEvent {\r\n originalEvent: MouseEvent;\r\n type: HeaderNavigationType;\r\n /** True when user selected the page holding Ctrl, Alt or other modifiers. Can be used to determine navigation. */\r\n isModifiedEvent: boolean;\r\n /** Url of the selected item. */\r\n url?: string;\r\n}\r\n\r\nexport interface HeaderClickMenuItemEvent extends HeaderClickEvent {\r\n menuItem: HeaderMenuItem;\r\n}\r\n\r\nexport type HeaderEvent = HeaderClickEvent | HeaderClickMenuItemEvent;\r\n"]}
|
|
@@ -23,6 +23,8 @@ export class Header {
|
|
|
23
23
|
this.authStatus = "none";
|
|
24
24
|
this.loginUrl = undefined;
|
|
25
25
|
this.logoutUrl = undefined;
|
|
26
|
+
this.showHelp = false;
|
|
27
|
+
this.helpUrl = undefined;
|
|
26
28
|
this.userProfileName = undefined;
|
|
27
29
|
this.userProfileUrl = undefined;
|
|
28
30
|
this.userHomeUrl = undefined;
|
|
@@ -112,7 +114,7 @@ export class Header {
|
|
|
112
114
|
["use-drop-down"]: this.showDropDown,
|
|
113
115
|
}), ref: (element) => (this.wrapper = element) }, h("div", { class: "logo-container" }, h("slot", { name: "logo" })), this.showDropDown &&
|
|
114
116
|
this.mainMenu &&
|
|
115
|
-
(this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== "none") && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right", strategy: "absolute", dropdownOptionsOffset: this.dropdownOptionsOffset, ref: (element) => (this.dropdownElement = element) }, h("button", { type: "button", slot: "toggle" }, h("span", null, "Menu")), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (h("li", null, h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, "Mijn Omgevingsloket"))), this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("li", null, h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName, h("span", { class: "profile-label" }, " - Mijn profiel")))), this.authStatus === "loggedOut" && (h("li", null, this.loginUrl ? (h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (h("li", null, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen"))))))))), !this.showDropDown && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("div", { class: "profile" }, h("
|
|
117
|
+
(this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== "none") && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right", strategy: "absolute", dropdownOptionsOffset: this.dropdownOptionsOffset, ref: (element) => (this.dropdownElement = element) }, h("button", { type: "button", slot: "toggle" }, h("span", null, "Menu")), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (h("li", null, h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, "Mijn Omgevingsloket"))), this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("li", null, h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName, h("span", { class: "profile-label" }, " - Mijn profiel")))), this.authStatus === "loggedOut" && (h("li", null, this.loginUrl ? (h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (h("li", null, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen")))), this.showHelp && (h("li", null, this.helpUrl ? (h("a", { href: this.helpUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help", { url: this.helpUrl }) }, h("span", null, "Help"), h("dso-icon", { icon: "help" }))) : (h("button", { type: "button", class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, "Help"), h("dso-icon", { icon: "help" })))))))))), !this.showDropDown && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (h("div", { class: "profile" }, h("a", { href: this.userProfileUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName))), this.authStatus === "loggedOut" && (h("div", { class: "login" }, this.loginUrl ? (h("a", { href: this.loginUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (h("div", { class: "logout" }, this.logoutUrl ? (h("a", { href: this.logoutUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen")))), this.showHelp && (h("div", { class: "help" }, this.helpUrl ? (h("a", { href: this.helpUrl, class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help", { url: this.helpUrl }) }, h("span", null, "Help"), h("dso-icon", { icon: "help" }))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, "Help"), h("dso-icon", { icon: "help" })))))), ((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (h("nav", { class: "dso-navbar" }, h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu &&
|
|
116
118
|
this.mainMenu
|
|
117
119
|
.filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)
|
|
118
120
|
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { placement: "bottom" }, h("button", { type: "button", slot: "toggle" }, h("span", null, "Meer")), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu &&
|
|
@@ -204,7 +206,7 @@ export class Header {
|
|
|
204
206
|
"optional": true,
|
|
205
207
|
"docs": {
|
|
206
208
|
"tags": [],
|
|
207
|
-
"text": "When the `authStatus` is `loggedOut` a loginUrl can be provided
|
|
209
|
+
"text": "When the `authStatus` is `loggedOut` a loginUrl can be provided.\r\nThe login button will then render as an anchor."
|
|
208
210
|
},
|
|
209
211
|
"attribute": "login-url",
|
|
210
212
|
"reflect": false
|
|
@@ -221,11 +223,46 @@ export class Header {
|
|
|
221
223
|
"optional": true,
|
|
222
224
|
"docs": {
|
|
223
225
|
"tags": [],
|
|
224
|
-
"text": "The URL to open when the user activates \"logout\"."
|
|
226
|
+
"text": "The URL to open when the user activates \"logout\".\r\nIf no URL is specified, a button element is used instead."
|
|
225
227
|
},
|
|
226
228
|
"attribute": "logout-url",
|
|
227
229
|
"reflect": false
|
|
228
230
|
},
|
|
231
|
+
"showHelp": {
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "boolean | undefined",
|
|
236
|
+
"resolved": "boolean | undefined",
|
|
237
|
+
"references": {}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": true,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": "Show a help-button or link in the header"
|
|
244
|
+
},
|
|
245
|
+
"attribute": "show-help",
|
|
246
|
+
"reflect": false,
|
|
247
|
+
"defaultValue": "false"
|
|
248
|
+
},
|
|
249
|
+
"helpUrl": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"mutable": false,
|
|
252
|
+
"complexType": {
|
|
253
|
+
"original": "string",
|
|
254
|
+
"resolved": "string | undefined",
|
|
255
|
+
"references": {}
|
|
256
|
+
},
|
|
257
|
+
"required": false,
|
|
258
|
+
"optional": true,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "The URL to open when the user activates \"help\".\r\nIf no URL is specified, a button element is used instead."
|
|
262
|
+
},
|
|
263
|
+
"attribute": "help-url",
|
|
264
|
+
"reflect": false
|
|
265
|
+
},
|
|
229
266
|
"userProfileName": {
|
|
230
267
|
"type": "string",
|
|
231
268
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEz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OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;kBAE3E,gBAAU,IAAI,EAAC,WAAW,GAAY;wCAEpC,CACD,CACN,CACE,CACD,CACP,CACA,CACJ,CACG,CACL,CACJ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Fragment, h, Prop, State, Watch } from \"@stencil/core\";\r\n\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { HeaderMenuItem, HeaderNavigationType, HeaderEvent } from \"./header.interfaces\";\r\n\r\nconst minDesktopViewportWidth = 992;\r\n\r\n@Component({\r\n tag: \"dso-header\",\r\n styleUrl: \"header.scss\",\r\n scoped: true,\r\n})\r\nexport class Header {\r\n private clickHandler(\r\n e: MouseEvent,\r\n type: HeaderNavigationType,\r\n options?: { menuItem?: HeaderMenuItem; url?: string }\r\n ) {\r\n this.dsoHeaderClick.emit({\r\n originalEvent: e,\r\n isModifiedEvent: isModifiedEvent(e),\r\n type,\r\n menuItem: options?.menuItem,\r\n url: options?.url ?? options?.menuItem?.url,\r\n });\r\n }\r\n\r\n private dropdownElement?: HTMLElement;\r\n\r\n @Element()\r\n host!: HTMLDsoHeaderElement;\r\n\r\n /**\r\n * The main menu items.\r\n */\r\n @Prop()\r\n mainMenu?: HeaderMenuItem[] = [];\r\n\r\n /**\r\n * Either have the dropdown menu appear automatically or always.\r\n */\r\n @Prop()\r\n useDropDownMenu: \"always\" | \"auto\" = \"auto\";\r\n\r\n /**\r\n * Used to show the login/logout option. 'none' renders nothing.\r\n */\r\n @Prop()\r\n authStatus: \"none\" | \"loggedIn\" | \"loggedOut\" = \"none\";\r\n\r\n /**\r\n * When the `authStatus` is `loggedOut` a loginUrl can be provided, the login button will render as an anchor.\r\n */\r\n @Prop()\r\n loginUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"logout\".\r\n */\r\n @Prop()\r\n logoutUrl?: string;\r\n\r\n /**\r\n * The name to show when the user is logged in.\r\n */\r\n @Prop()\r\n userProfileName?: string;\r\n\r\n /**\r\n * The URL to open when the user activates the profile url.\r\n */\r\n @Prop()\r\n userProfileUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeUrl?: string;\r\n\r\n /**\r\n * Set this to true when the user is at \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeActive?: boolean;\r\n\r\n @State()\r\n showDropDown?: boolean;\r\n\r\n @State()\r\n overflowMenuItems = 0;\r\n\r\n @State()\r\n dropdownOptionsOffset = 0;\r\n\r\n /**\r\n * Emitted when something in the header is selected.\r\n *\r\n * `event.detail.type` indicates the functionality the user pressed. eg. `'login'` or `'menuItem'`\r\n */\r\n @Event()\r\n dsoHeaderClick!: EventEmitter<HeaderEvent>;\r\n\r\n @Watch(\"useDropDownMenu\")\r\n setShowDropDown(value: \"always\" | \"auto\") {\r\n if (value === \"auto\") {\r\n this.setDropDownMenu();\r\n\r\n return;\r\n }\r\n\r\n this.showDropDown = value === \"always\";\r\n }\r\n\r\n private wrapper: HTMLDivElement | undefined;\r\n\r\n private nav: HTMLUListElement | undefined;\r\n\r\n private shrinkMenuToFit() {\r\n if (!this.wrapper || !this.nav) {\r\n return;\r\n }\r\n\r\n if (this.wrapper.clientWidth >= this.nav.clientWidth) {\r\n return;\r\n }\r\n\r\n if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {\r\n return;\r\n }\r\n\r\n this.overflowMenuItems++;\r\n }\r\n\r\n componentDidRender() {\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n\r\n return;\r\n }\r\n\r\n window.setTimeout(() => this.shrinkMenuToFit(), 0);\r\n }\r\n\r\n componentDidLoad() {\r\n this.setShowDropDown(this.useDropDownMenu);\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }\r\n\r\n private setOverflowMenu() {\r\n if (this.showDropDown) {\r\n return;\r\n }\r\n\r\n if (this.overflowMenuItems !== 0) {\r\n this.overflowMenuItems = 0;\r\n return;\r\n }\r\n\r\n this.shrinkMenuToFit();\r\n }\r\n\r\n private setDropDownMenu() {\r\n if (this.useDropDownMenu !== \"auto\") {\r\n return;\r\n }\r\n\r\n this.showDropDown = window.innerWidth < minDesktopViewportWidth;\r\n }\r\n\r\n private calculateDropdownOptionsOffset() {\r\n if (!this.dropdownElement) {\r\n return 0;\r\n }\r\n\r\n return (\r\n this.host.clientHeight -\r\n (this.dropdownElement?.getBoundingClientRect().bottom - this.host.getBoundingClientRect().top)\r\n );\r\n }\r\n\r\n private onWindowResize = debounce(() => {\r\n this.dropdownElement?.removeAttribute(\"open\");\r\n this.dropdownElement?.removeAttribute(\"tabindex\");\r\n\r\n this.setDropDownMenu();\r\n this.setOverflowMenu();\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }, 100);\r\n\r\n connectedCallback() {\r\n window.addEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n private MenuItem = (item: HeaderMenuItem) => {\r\n return (\r\n <li class={item.active ? \"dso-active\" : undefined}>\r\n <a\r\n href={item.url}\r\n aria-current={item.active ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"menuItem\", { menuItem: item })}\r\n >\r\n {item.label}\r\n </a>\r\n </li>\r\n );\r\n };\r\n\r\n render() {\r\n // Prevent 'flickering' when useDropDownMenu = 'always'\r\n if (this.showDropDown === undefined) {\r\n return;\r\n }\r\n\r\n return (\r\n <>\r\n <div\r\n class={clsx(\"dso-header\", {\r\n [\"use-drop-down\"]: this.showDropDown,\r\n })}\r\n ref={(element) => (this.wrapper = element)}\r\n >\r\n <div class=\"logo-container\">\r\n <slot name=\"logo\" />\r\n </div>\r\n {this.showDropDown &&\r\n this.mainMenu &&\r\n (this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== \"none\") && (\r\n <div class=\"dropdown\">\r\n <dso-dropdown-menu\r\n dropdown-align=\"right\"\r\n strategy=\"absolute\"\r\n dropdownOptionsOffset={this.dropdownOptionsOffset}\r\n ref={(element) => (this.dropdownElement = element)}\r\n >\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>Menu</span>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu.map(this.MenuItem)}\r\n {this.userHomeUrl && (\r\n <li>\r\n <a\r\n href={this.userHomeUrl}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n Mijn Omgevingsloket\r\n </a>\r\n </li>\r\n )}\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <li>\r\n <a\r\n href={this.userProfileUrl}\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n <span class=\"profile-label\"> - Mijn profiel</span>\r\n </a>\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <li>\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n Inloggen\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n Inloggen\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <li>\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n Uitloggen\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n Uitloggen\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </div>\r\n )}\r\n {!this.showDropDown && (\r\n <>\r\n <div class=\"dso-header-session\">\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <div class=\"profile\">\r\n <span class=\"profile-label\">Welkom:</span>\r\n <a\r\n href={this.userProfileUrl}\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n </a>\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <div class=\"login\">\r\n {this.loginUrl ? (\r\n <a href={this.loginUrl} onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}>\r\n Inloggen\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n Inloggen\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <div class=\"logout\">\r\n {this.logoutUrl ? (\r\n <a href={this.logoutUrl} onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}>\r\n Uitloggen\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n Uitloggen\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (\r\n <nav class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-main\" ref={(element) => (this.nav = element)}>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)\r\n .map(this.MenuItem)}\r\n {this.overflowMenuItems > 0 && (\r\n <li>\r\n <dso-dropdown-menu placement=\"bottom\">\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>Meer</span>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter(\r\n (_, index) =>\r\n this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems\r\n )\r\n .map(this.MenuItem)}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </li>\r\n )}\r\n {this.userHomeUrl && (\r\n <li class={clsx(\"menu-user-home\", { \"dso-active\": this.userHomeActive })}>\r\n <a\r\n href={this.userHomeUrl}\r\n aria-current={this.userHomeActive ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n <dso-icon icon=\"user-line\"></dso-icon>\r\n Mijn Omgevingsloket\r\n </a>\r\n </li>\r\n )}\r\n </ul>\r\n </nav>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzG,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAOpC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CAAC;kBAE3E,gBAAU,IAAI,EAAC,WAAW,GAAY;wCAEpC,CACD,CACN,CACE,CACD,CACP,CACA,CACJ,CACG,CACL,CACJ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Fragment, h, Prop, State, Watch } from \"@stencil/core\";\r\n\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { HeaderMenuItem, HeaderNavigationType, HeaderEvent } from \"./header.interfaces\";\r\n\r\nconst minDesktopViewportWidth = 992;\r\n\r\n@Component({\r\n tag: \"dso-header\",\r\n styleUrl: \"header.scss\",\r\n scoped: true,\r\n})\r\nexport class Header {\r\n private clickHandler(\r\n e: MouseEvent,\r\n type: HeaderNavigationType,\r\n options?: { menuItem?: HeaderMenuItem; url?: string }\r\n ) {\r\n this.dsoHeaderClick.emit({\r\n originalEvent: e,\r\n isModifiedEvent: isModifiedEvent(e),\r\n type,\r\n menuItem: options?.menuItem,\r\n url: options?.url ?? options?.menuItem?.url,\r\n });\r\n }\r\n\r\n private dropdownElement?: HTMLElement;\r\n\r\n @Element()\r\n host!: HTMLDsoHeaderElement;\r\n\r\n /**\r\n * The main menu items.\r\n */\r\n @Prop()\r\n mainMenu?: HeaderMenuItem[] = [];\r\n\r\n /**\r\n * Either have the dropdown menu appear automatically or always.\r\n */\r\n @Prop()\r\n useDropDownMenu: \"always\" | \"auto\" = \"auto\";\r\n\r\n /**\r\n * Used to show the login/logout option. 'none' renders nothing.\r\n */\r\n @Prop()\r\n authStatus: \"none\" | \"loggedIn\" | \"loggedOut\" = \"none\";\r\n\r\n /**\r\n * When the `authStatus` is `loggedOut` a loginUrl can be provided.\r\n * The login button will then render as an anchor.\r\n */\r\n @Prop()\r\n loginUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"logout\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n logoutUrl?: string;\r\n\r\n /**\r\n * Show a help-button or link in the header\r\n */\r\n @Prop()\r\n showHelp? = false;\r\n\r\n /**\r\n * The URL to open when the user activates \"help\".\r\n * If no URL is specified, a button element is used instead.\r\n */\r\n @Prop()\r\n helpUrl?: string;\r\n\r\n /**\r\n * The name to show when the user is logged in.\r\n */\r\n @Prop()\r\n userProfileName?: string;\r\n\r\n /**\r\n * The URL to open when the user activates the profile url.\r\n */\r\n @Prop()\r\n userProfileUrl?: string;\r\n\r\n /**\r\n * The URL to open when the user activates \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeUrl?: string;\r\n\r\n /**\r\n * Set this to true when the user is at \"Mijn Omgevingsloket\".\r\n */\r\n @Prop()\r\n userHomeActive?: boolean;\r\n\r\n @State()\r\n showDropDown?: boolean;\r\n\r\n @State()\r\n overflowMenuItems = 0;\r\n\r\n @State()\r\n dropdownOptionsOffset = 0;\r\n\r\n /**\r\n * Emitted when something in the header is selected.\r\n *\r\n * `event.detail.type` indicates the functionality the user pressed. eg. `'login'` or `'menuItem'`\r\n */\r\n @Event()\r\n dsoHeaderClick!: EventEmitter<HeaderEvent>;\r\n\r\n @Watch(\"useDropDownMenu\")\r\n setShowDropDown(value: \"always\" | \"auto\") {\r\n if (value === \"auto\") {\r\n this.setDropDownMenu();\r\n\r\n return;\r\n }\r\n\r\n this.showDropDown = value === \"always\";\r\n }\r\n\r\n private wrapper: HTMLDivElement | undefined;\r\n\r\n private nav: HTMLUListElement | undefined;\r\n\r\n private shrinkMenuToFit() {\r\n if (!this.wrapper || !this.nav) {\r\n return;\r\n }\r\n\r\n if (this.wrapper.clientWidth >= this.nav.clientWidth) {\r\n return;\r\n }\r\n\r\n if (this.mainMenu && this.overflowMenuItems >= this.mainMenu.length) {\r\n return;\r\n }\r\n\r\n this.overflowMenuItems++;\r\n }\r\n\r\n componentDidRender() {\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n\r\n return;\r\n }\r\n\r\n window.setTimeout(() => this.shrinkMenuToFit(), 0);\r\n }\r\n\r\n componentDidLoad() {\r\n this.setShowDropDown(this.useDropDownMenu);\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }\r\n\r\n private setOverflowMenu() {\r\n if (this.showDropDown) {\r\n return;\r\n }\r\n\r\n if (this.overflowMenuItems !== 0) {\r\n this.overflowMenuItems = 0;\r\n return;\r\n }\r\n\r\n this.shrinkMenuToFit();\r\n }\r\n\r\n private setDropDownMenu() {\r\n if (this.useDropDownMenu !== \"auto\") {\r\n return;\r\n }\r\n\r\n this.showDropDown = window.innerWidth < minDesktopViewportWidth;\r\n }\r\n\r\n private calculateDropdownOptionsOffset() {\r\n if (!this.dropdownElement) {\r\n return 0;\r\n }\r\n\r\n return (\r\n this.host.clientHeight -\r\n (this.dropdownElement?.getBoundingClientRect().bottom - this.host.getBoundingClientRect().top)\r\n );\r\n }\r\n\r\n private onWindowResize = debounce(() => {\r\n this.dropdownElement?.removeAttribute(\"open\");\r\n this.dropdownElement?.removeAttribute(\"tabindex\");\r\n\r\n this.setDropDownMenu();\r\n this.setOverflowMenu();\r\n\r\n if (this.showDropDown) {\r\n this.dropdownOptionsOffset = this.calculateDropdownOptionsOffset();\r\n }\r\n }, 100);\r\n\r\n connectedCallback() {\r\n window.addEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener(\"resize\", this.onWindowResize);\r\n }\r\n\r\n private MenuItem = (item: HeaderMenuItem) => {\r\n return (\r\n <li class={item.active ? \"dso-active\" : undefined}>\r\n <a\r\n href={item.url}\r\n aria-current={item.active ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"menuItem\", { menuItem: item })}\r\n >\r\n {item.label}\r\n </a>\r\n </li>\r\n );\r\n };\r\n\r\n render() {\r\n // Prevent 'flickering' when useDropDownMenu = 'always'\r\n if (this.showDropDown === undefined) {\r\n return;\r\n }\r\n\r\n return (\r\n <>\r\n <div\r\n class={clsx(\"dso-header\", {\r\n [\"use-drop-down\"]: this.showDropDown,\r\n })}\r\n ref={(element) => (this.wrapper = element)}\r\n >\r\n <div class=\"logo-container\">\r\n <slot name=\"logo\" />\r\n </div>\r\n {this.showDropDown &&\r\n this.mainMenu &&\r\n (this.mainMenu.length > 0 || this.userHomeUrl || this.authStatus !== \"none\") && (\r\n <div class=\"dropdown\">\r\n <dso-dropdown-menu\r\n dropdown-align=\"right\"\r\n strategy=\"absolute\"\r\n dropdownOptionsOffset={this.dropdownOptionsOffset}\r\n ref={(element) => (this.dropdownElement = element)}\r\n >\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>Menu</span>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu.map(this.MenuItem)}\r\n {this.userHomeUrl && (\r\n <li>\r\n <a\r\n href={this.userHomeUrl}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n Mijn Omgevingsloket\r\n </a>\r\n </li>\r\n )}\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <li>\r\n <a\r\n href={this.userProfileUrl}\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n <span class=\"profile-label\"> - Mijn profiel</span>\r\n </a>\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <li>\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n Inloggen\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n Inloggen\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <li>\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n Uitloggen\r\n </a>\r\n ) : (\r\n <button type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n Uitloggen\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n {this.showHelp && (\r\n <li>\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>Help</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button type=\"button\" class=\"dso-tertiary\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>Help</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </li>\r\n )}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </div>\r\n )}\r\n {!this.showDropDown && (\r\n <>\r\n <div class=\"dso-header-session\">\r\n {this.userProfileUrl && this.userProfileName && this.authStatus === \"loggedIn\" && (\r\n <div class=\"profile\">\r\n <a\r\n href={this.userProfileUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"profile\", { url: this.userProfileUrl })}\r\n >\r\n {this.userProfileName}\r\n </a>\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedOut\" && (\r\n <div class=\"login\">\r\n {this.loginUrl ? (\r\n <a\r\n href={this.loginUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"login\", { url: this.loginUrl })}\r\n >\r\n Inloggen\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"login\")}>\r\n Inloggen\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.authStatus === \"loggedIn\" && (\r\n <div class=\"logout\">\r\n {this.logoutUrl ? (\r\n <a\r\n href={this.logoutUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"logout\", { url: this.logoutUrl })}\r\n >\r\n Uitloggen\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"logout\")}>\r\n Uitloggen\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {this.showHelp && (\r\n <div class=\"help\">\r\n {this.helpUrl ? (\r\n <a\r\n href={this.helpUrl}\r\n class=\"dso-tertiary\"\r\n onClick={(e) => this.clickHandler(e, \"help\", { url: this.helpUrl })}\r\n >\r\n <span>Help</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </a>\r\n ) : (\r\n <button class=\"dso-tertiary\" type=\"button\" onClick={(e) => this.clickHandler(e, \"help\")}>\r\n <span>Help</span>\r\n <dso-icon icon=\"help\"></dso-icon>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n {((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (\r\n <nav class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-main\" ref={(element) => (this.nav = element)}>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)\r\n .map(this.MenuItem)}\r\n {this.overflowMenuItems > 0 && (\r\n <li>\r\n <dso-dropdown-menu placement=\"bottom\">\r\n <button type=\"button\" slot=\"toggle\">\r\n <span>Meer</span>\r\n </button>\r\n <div class=\"dso-dropdown-options\">\r\n <ul>\r\n {this.mainMenu &&\r\n this.mainMenu\r\n .filter(\r\n (_, index) =>\r\n this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems\r\n )\r\n .map(this.MenuItem)}\r\n </ul>\r\n </div>\r\n </dso-dropdown-menu>\r\n </li>\r\n )}\r\n {this.userHomeUrl && (\r\n <li class={clsx(\"menu-user-home\", { \"dso-active\": this.userHomeActive })}>\r\n <a\r\n href={this.userHomeUrl}\r\n aria-current={this.userHomeActive ? \"page\" : undefined}\r\n onClick={(e) => this.clickHandler(e, \"userHome\", { url: this.userHomeUrl })}\r\n >\r\n <dso-icon icon=\"user-line\"></dso-icon>\r\n Mijn Omgevingsloket\r\n </a>\r\n </li>\r\n )}\r\n </ul>\r\n </nav>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -50,7 +50,7 @@ export class Logo {
|
|
|
50
50
|
"optional": true,
|
|
51
51
|
"docs": {
|
|
52
52
|
"tags": [],
|
|
53
|
-
"text": "The ribbon contains the text for a possible 'sticker' on top of the logo.\r\nUsed to clarify
|
|
53
|
+
"text": "The ribbon contains the text for a possible 'sticker' on top of the logo.\r\nUsed to clarify the (non-production) server environment (\"int\", \"kta\", \"pfm\", \"pre\", or \"dmo\")"
|
|
54
54
|
},
|
|
55
55
|
"attribute": "ribbon",
|
|
56
56
|
"reflect": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/components/logo/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7E,MAAM,OAAO,IAAI;;;;;EAgBf,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,kBAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;MAC9G,WAAK,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,4CAA4C,GAAG;QACrE,YAAM,KAAK,EAAC,QAAQ,EAAC,CAAC,EAAC,0CAA0C,GAAG;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,uCAAuC,GAAG,CAC5D;MAEN,WAAK,KAAK,EAAC,eAAe;QACxB,YAAM,KAAK,EAAC,yBAAyB,gBAAiB;QACtD,YAAM,KAAK,EAAC,qBAAqB,YAAa,CAC1C;MAEL,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,KAAK,CAAQ;MAC1D,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,MAAM,CAAO,CACvD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Host, Prop, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-logo\",\r\n styleUrl: \"logo.scss\",\r\n shadow: true,\r\n})\r\nexport class Logo implements ComponentInterface {\r\n /**\r\n * The label clarifies the service within the Omgevingsloket, shown\r\n * as a subtitle (and on smaller screens as the main wordmark itself).\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The ribbon contains the text for a possible 'sticker' on top of the logo.\r\n * Used to clarify
|
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/components/logo/logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7E,MAAM,OAAO,IAAI;;;;;EAgBf,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,kBAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;MAC9G,WAAK,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,4CAA4C,GAAG;QACrE,YAAM,KAAK,EAAC,QAAQ,EAAC,CAAC,EAAC,0CAA0C,GAAG;QACpE,YAAM,KAAK,EAAC,OAAO,EAAC,CAAC,EAAC,uCAAuC,GAAG,CAC5D;MAEN,WAAK,KAAK,EAAC,eAAe;QACxB,YAAM,KAAK,EAAC,yBAAyB,gBAAiB;QACtD,YAAM,KAAK,EAAC,qBAAqB,YAAa,CAC1C;MAEL,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,KAAK,CAAQ;MAC1D,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,MAAM,CAAO,CACvD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Host, Prop, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"dso-logo\",\r\n styleUrl: \"logo.scss\",\r\n shadow: true,\r\n})\r\nexport class Logo implements ComponentInterface {\r\n /**\r\n * The label clarifies the service within the Omgevingsloket, shown\r\n * as a subtitle (and on smaller screens as the main wordmark itself).\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The ribbon contains the text for a possible 'sticker' on top of the logo.\r\n * Used to clarify the (non-production) server environment (\"int\", \"kta\", \"pfm\", \"pre\", or \"dmo\")\r\n *\r\n */\r\n @Prop()\r\n ribbon?: string;\r\n\r\n render() {\r\n return (\r\n <Host aria-label={[\"Omgevingsloket\", this.label, this.ribbon && `(${this.ribbon})`].filter((s) => !!s).join(\" \")}>\r\n <svg fill=\"none\" viewBox=\"0 0 48 48\" height=\"100%\" class=\"logo-target\">\r\n <path class=\"outer\" d=\"M26 0a24 24 0 1 0 0 47.9A24 24 0 0 0 24 0Z\" />\r\n <path class=\"middle\" d=\"M24 8A16 16 0 0 0 8 24 16 16 0 1 0 24 8Z\" />\r\n <path class=\"inner\" d=\"M24 32a8 8 0 0 0 0-16 8 8 0 0 0 0 16Z\" />\r\n </svg>\r\n\r\n <div class=\"logo-wordmark\">\r\n <span class=\"logo-wordmark-omgevings\">Omgevings</span>\r\n <span class=\"logo-wordmark-loket\">loket</span>\r\n </div>\r\n\r\n {this.label && <span class=\"logo-label\">{this.label}</span>}\r\n {this.ribbon && <div class=\"logo-ribbon\">{this.ribbon}</div>}\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -46,7 +46,6 @@ export class Mapper {
|
|
|
46
46
|
return t;
|
|
47
47
|
}, []);
|
|
48
48
|
this.fallbackNode = new OzonContentFallbackNode();
|
|
49
|
-
this.domParser = new DOMParser();
|
|
50
49
|
}
|
|
51
50
|
findMapper(name) {
|
|
52
51
|
var _a;
|
|
@@ -85,21 +84,32 @@ export class Mapper {
|
|
|
85
84
|
path,
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
|
-
transform(
|
|
89
|
-
if (!
|
|
87
|
+
transform(input, context) {
|
|
88
|
+
if (!input) {
|
|
90
89
|
return h(Fragment, null);
|
|
91
90
|
}
|
|
92
|
-
const document = this.
|
|
91
|
+
const document = this.inputToXmlDocument(input);
|
|
93
92
|
if (document.querySelector("parsererror")) {
|
|
94
93
|
console.error({
|
|
95
94
|
message: "[DSO Toolkit: Ozon Content Mapper] Unable to parse XML",
|
|
96
95
|
context,
|
|
97
|
-
|
|
96
|
+
input,
|
|
98
97
|
document,
|
|
99
98
|
});
|
|
100
99
|
return h(Fragment, null);
|
|
101
100
|
}
|
|
102
101
|
return this.mapNodeToJsx(document.getRootNode(), context, []);
|
|
103
102
|
}
|
|
103
|
+
inputToXmlDocument(input) {
|
|
104
|
+
var _a;
|
|
105
|
+
if (input instanceof XMLDocument) {
|
|
106
|
+
return input;
|
|
107
|
+
}
|
|
108
|
+
if (typeof input === "string") {
|
|
109
|
+
(_a = this.domParser) !== null && _a !== void 0 ? _a : (this.domParser = new DOMParser());
|
|
110
|
+
return this.domParser.parseFromString(input, "text/xml");
|
|
111
|
+
}
|
|
112
|
+
return document.implementation.createDocument(null, null);
|
|
113
|
+
}
|
|
104
114
|
}
|
|
105
115
|
//# sourceMappingURL=ozon-content-mapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ozon-content-mapper.js","sourceRoot":"","sources":["../../../src/components/ozon-content/ozon-content-mapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAO,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAA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,IAAI,KAAK,YAAY,WAAW,EAAE;MAChC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;MAC7B,MAAA,IAAI,CAAC,SAAS,oCAAd,IAAI,CAAC,SAAS,GAAK,IAAI,SAAS,EAAE,EAAC;MAEnC,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;KAC1D;IAED,OAAO,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAC5D,CAAC;CACF","sourcesContent":["import { Fragment, h, JSX } from \"@stencil/core\";\r\n\r\nimport { getNodeName } from \"./get-node-name.function\";\r\nimport { OzonContentAlNode } from \"./nodes/al.node\";\r\nimport { OzonContentBronNode } from \"./nodes/bron.node\";\r\nimport { OzonContentDocumentNode } from \"./nodes/document.node\";\r\nimport { OzonContentExtRefNode } from \"./nodes/ext-ref.node\";\r\nimport { OzonContentFallbackNode } from \"./nodes/fallback.node\";\r\nimport { OzonContentFiguurNode } from \"./nodes/figuur.node\";\r\nimport { OzonContentInhoudNode } from \"./nodes/inhoud.node\";\r\nimport { OzonContentInlineTekstAfbeeldingNode } from \"./nodes/inline-tekst-afbeelding.node\";\r\nimport { OzonContentInlineNodes } from \"./nodes/inline.nodes\";\r\nimport { OzonContentIntIoRefNode } from \"./nodes/int-io-ref.node\";\r\nimport { OzonContentIntRefNode } from \"./nodes/int-ref.node\";\r\nimport { OzonContentLijstNode } from \"./nodes/lijst.node\";\r\nimport { OzonContentNieuweTekstNode } from \"./nodes/nieuwe-tekst.node\";\r\nimport { OzonContentNootNode } from \"./nodes/noot.node\";\r\nimport { OzonContentOpschriftNode } from \"./nodes/opschrift.node\";\r\nimport { OzonContentTableNode } from \"./nodes/table.node\";\r\nimport { OzonContentTextNode } from \"./nodes/text.node\";\r\nimport { OzonContentVerwijderdeTekstNode } from \"./nodes/verwijderde-tekst.node\";\r\nimport { OzonContentContext } from \"./ozon-content-context.interface\";\r\nimport { OzonContentNode } from \"./ozon-content-node.interface\";\r\nimport { OzonContentInputType } from \"./ozon-content.interfaces\";\r\n\r\nexport class Mapper {\r\n private mappers: OzonContentNode[] = [\r\n new OzonContentTextNode(),\r\n new OzonContentDocumentNode(),\r\n new OzonContentInhoudNode(),\r\n new OzonContentOpschriftNode(),\r\n new OzonContentIntRefNode(),\r\n new OzonContentExtRefNode(),\r\n new OzonContentAlNode(),\r\n new OzonContentInlineNodes(),\r\n new OzonContentInlineTekstAfbeeldingNode(),\r\n new OzonContentNootNode(),\r\n new OzonContentTableNode(),\r\n new OzonContentIntIoRefNode(),\r\n new OzonContentFiguurNode(),\r\n new OzonContentLijstNode(),\r\n new OzonContentBronNode(),\r\n new OzonContentNieuweTekstNode(),\r\n new OzonContentVerwijderdeTekstNode(),\r\n ];\r\n\r\n private skip = this.mappers.reduce<string[]>((t, m) => {\r\n if (m.handles) {\r\n t.push(...m.handles);\r\n }\r\n\r\n return t;\r\n }, []);\r\n\r\n private fallbackNode = new OzonContentFallbackNode();\r\n\r\n private domParser?: DOMParser;\r\n\r\n private findMapper(name: string): OzonContentNode | undefined {\r\n if (this.skip.includes(name)) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n this.mappers.find((m) => {\r\n if (Array.isArray(m.name)) {\r\n return m.name.includes(name);\r\n }\r\n\r\n return m.name === name;\r\n }) ?? this.fallbackNode\r\n );\r\n }\r\n\r\n mapNodeToJsx(node: Node | Node[] | NodeList, context: OzonContentContext, path: Node[]): JSX.Element {\r\n if (node instanceof NodeList) {\r\n return <Fragment>{Array.from(node).map((n) => this.mapNodeToJsx(n, context, path))}</Fragment>;\r\n }\r\n\r\n if (Array.isArray(node)) {\r\n return <Fragment>{node.map((n) => this.mapNodeToJsx(n, context, path))}</Fragment>;\r\n }\r\n\r\n const nodeName = getNodeName(node);\r\n const mapper = this.findMapper(nodeName);\r\n if (!mapper) {\r\n return <Fragment />;\r\n }\r\n\r\n const identity = mapper.identify?.(node);\r\n\r\n const state = identity ? context.state[identity] : undefined;\r\n const setState = identity ? (s: unknown) => context.setState({ ...context.state, [identity]: s }) : undefined;\r\n\r\n return mapper.render(node, {\r\n inline: context.inline,\r\n mapNodeToJsx: (n) => this.mapNodeToJsx(n, context, [...path, node]),\r\n emitAnchorClick: context.emitAnchorClick,\r\n setState,\r\n state,\r\n path,\r\n });\r\n }\r\n\r\n transform(input: OzonContentInputType | undefined, context: OzonContentContext): JSX.Element {\r\n if (!input) {\r\n return <Fragment />;\r\n }\r\n\r\n const document = this.inputToXmlDocument(input);\r\n if (document.querySelector(\"parsererror\")) {\r\n console.error({\r\n message: \"[DSO Toolkit: Ozon Content Mapper] Unable to parse XML\",\r\n context,\r\n input,\r\n document,\r\n });\r\n\r\n return <Fragment />;\r\n }\r\n\r\n return this.mapNodeToJsx(document.getRootNode(), context, []);\r\n }\r\n\r\n private inputToXmlDocument(input: OzonContentInputType): XMLDocument {\r\n if (input instanceof XMLDocument) {\r\n return input;\r\n }\r\n\r\n if (typeof input === \"string\") {\r\n this.domParser ??= new DOMParser();\r\n\r\n return this.domParser.parseFromString(input, \"text/xml\");\r\n }\r\n\r\n return document.implementation.createDocument(null, null);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ozon-content.interfaces.js","sourceRoot":"","sources":["../../../src/components/ozon-content/ozon-content.interfaces.ts"],"names":[],"mappings":"AAAA,iCAAiC","sourcesContent":["// Sync interfaces with readme.md\r\n\r\nexport interface OzonContentAnchorClickEvent {\r\n /** Node type, eg: `IntRef` or `IntIoRef` */\r\n node: string;\r\n href: string;\r\n documentComponent: string;\r\n originalEvent: MouseEvent;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ozon-content.interfaces.js","sourceRoot":"","sources":["../../../src/components/ozon-content/ozon-content.interfaces.ts"],"names":[],"mappings":"AAAA,iCAAiC","sourcesContent":["// Sync interfaces with readme.md\r\n\r\nexport interface OzonContentAnchorClickEvent {\r\n /** Node type, eg: `IntRef` or `IntIoRef` */\r\n node: string;\r\n href: string;\r\n documentComponent: string;\r\n originalEvent: MouseEvent;\r\n}\r\n\r\nexport type OzonContentInputType = XMLDocument | string;\r\n"]}
|
|
@@ -11,14 +11,13 @@ export class OzonContent {
|
|
|
11
11
|
this.state = {};
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
var _a;
|
|
15
14
|
const context = {
|
|
16
15
|
state: this.state,
|
|
17
16
|
inline: this.inline,
|
|
18
17
|
setState: (state) => (this.state = state),
|
|
19
18
|
emitAnchorClick: this.dsoAnchorClick.emit,
|
|
20
19
|
};
|
|
21
|
-
const transformed = mapper.transform(
|
|
20
|
+
const transformed = mapper.transform(this.content, context);
|
|
22
21
|
return h(Fragment, null, transformed);
|
|
23
22
|
}
|
|
24
23
|
static get is() { return "dso-ozon-content"; }
|
|
@@ -39,12 +38,18 @@ export class OzonContent {
|
|
|
39
38
|
"type": "string",
|
|
40
39
|
"mutable": false,
|
|
41
40
|
"complexType": {
|
|
42
|
-
"original": "
|
|
43
|
-
"resolved": "string | undefined",
|
|
44
|
-
"references": {
|
|
41
|
+
"original": "OzonContentInputType",
|
|
42
|
+
"resolved": "XMLDocument | string | undefined",
|
|
43
|
+
"references": {
|
|
44
|
+
"OzonContentInputType": {
|
|
45
|
+
"location": "import",
|
|
46
|
+
"path": "./ozon-content.interfaces",
|
|
47
|
+
"id": "src/components/ozon-content/ozon-content.interfaces.ts::OzonContentInputType"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
45
50
|
},
|
|
46
51
|
"required": false,
|
|
47
|
-
"optional":
|
|
52
|
+
"optional": true,
|
|
48
53
|
"docs": {
|
|
49
54
|
"tags": [],
|
|
50
55
|
"text": "The XML to be rendered."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ozon-content.js","sourceRoot":"","sources":["../../../src/components/ozon-content/ozon-content.tsx"],"names":[],"mappings":"AAAA,OAAO,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n h,\r\n Component,\r\n ComponentInterface,\r\n Event,\r\n EventEmitter,\r\n Prop,\r\n State,\r\n Fragment,\r\n JSX,\r\n Watch,\r\n} from \"@stencil/core\";\r\n\r\nimport { Mapper } from \"./ozon-content-mapper\";\r\nimport { OzonContentContext } from \"./ozon-content-context.interface\";\r\nimport { OzonContentAnchorClickEvent, OzonContentInputType } from \"./ozon-content.interfaces\";\r\nimport { OzonContentNodeState } from \"./ozon-content-node-state.interface\";\r\n\r\nconst mapper = new Mapper();\r\n\r\n@Component({\r\n tag: \"dso-ozon-content\",\r\n styleUrl: \"ozon-content.scss\",\r\n shadow: true,\r\n})\r\nexport class OzonContent implements ComponentInterface {\r\n /**\r\n * The XML to be rendered.\r\n */\r\n @Prop()\r\n content?: OzonContentInputType;\r\n\r\n /**\r\n * Setting this property creates dso-ozon-content as inline element instead of a block element.\r\n */\r\n @Prop({ reflect: true })\r\n inline = false;\r\n\r\n /**\r\n * Emitted when `<a>` is clicked.\r\n */\r\n @Event()\r\n dsoAnchorClick!: EventEmitter<OzonContentAnchorClickEvent>;\r\n\r\n @Watch(\"content\")\r\n contentWatcher() {\r\n this.state = {};\r\n }\r\n\r\n @State()\r\n state: OzonContentNodeState = {};\r\n\r\n render(): JSX.Element {\r\n const context: OzonContentContext = {\r\n state: this.state,\r\n inline: this.inline,\r\n setState: (state) => (this.state = state),\r\n emitAnchorClick: this.dsoAnchorClick.emit,\r\n };\r\n\r\n const transformed = mapper.transform(this.content, context);\r\n\r\n return <Fragment>{transformed}</Fragment>;\r\n }\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { SizingButtons } from "./sizing-buttons";
|
|
3
3
|
export const DocumentPanel = ({ tabView, panelSize, shrinkDocumentPanel, expandDocumentPanel, dsoDocumentPanelSizeChangeAnimationEnd, }) => (h("div", { class: "dso-document-panel", onTransitionEnd: (e) => {
|
|
4
4
|
if (e.propertyName === "flex-basis") {
|
|
5
5
|
dsoDocumentPanelSizeChangeAnimationEnd.emit({ currentSize: panelSize });
|
|
6
6
|
}
|
|
7
|
-
} }, !tabView && (h(
|
|
7
|
+
} }, !tabView && (h(SizingButtons, { panelLabel: "Documentpaneel", size: panelSize, expand: expandDocumentPanel, shrink: shrinkDocumentPanel })), h("div", { class: "content" }, h("slot", { name: "document-panel" }))));
|
|
8
8
|
//# sourceMappingURL=document-panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-panel.js","sourceRoot":"","sources":["../../../../src/components/viewer-grid/components/document-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"document-panel.js","sourceRoot":"","sources":["../../../../src/components/viewer-grid/components/document-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,CAAC,EAAE,MAAM,eAAe,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUjD,MAAM,CAAC,MAAM,aAAa,GAAsD,CAAC,EAC/E,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,sCAAsC,GACvC,EAAE,EAAE,CAAC,CACJ,WACE,KAAK,EAAC,oBAAoB,EAC1B,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE;IACrB,IAAI,CAAC,CAAC,YAAY,KAAK,YAAY,EAAE;MACnC,sCAAsC,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;KACzE;EACH,CAAC;EAEA,CAAC,OAAO,IAAI,CACX,EAAC,aAAa,IACZ,UAAU,EAAC,gBAAgB,EAC3B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,mBAAmB,GAC3B,CACH;EACD,WAAK,KAAK,EAAC,SAAS;IAClB,YAAM,IAAI,EAAC,gBAAgB,GAAG,CAC1B,CACF,CACP,CAAC","sourcesContent":["import { EventEmitter, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { ViewerGridPanelSize, ViewerGridChangeSizeAnimationEndEvent } from \"../viewer-grid.interfaces\";\r\nimport { SizingButtons } from \"./sizing-buttons\";\r\n\r\nexport interface ViewerGridDocumentPanelProps {\r\n tabView: boolean;\r\n panelSize: ViewerGridPanelSize;\r\n shrinkDocumentPanel: () => void;\r\n expandDocumentPanel: () => void;\r\n dsoDocumentPanelSizeChangeAnimationEnd: EventEmitter<ViewerGridChangeSizeAnimationEndEvent>;\r\n}\r\n\r\nexport const DocumentPanel: FunctionalComponent<ViewerGridDocumentPanelProps> = ({\r\n tabView,\r\n panelSize,\r\n shrinkDocumentPanel,\r\n expandDocumentPanel,\r\n dsoDocumentPanelSizeChangeAnimationEnd,\r\n}) => (\r\n <div\r\n class=\"dso-document-panel\"\r\n onTransitionEnd={(e) => {\r\n if (e.propertyName === \"flex-basis\") {\r\n dsoDocumentPanelSizeChangeAnimationEnd.emit({ currentSize: panelSize });\r\n }\r\n }}\r\n >\r\n {!tabView && (\r\n <SizingButtons\r\n panelLabel=\"Documentpaneel\"\r\n size={panelSize}\r\n expand={expandDocumentPanel}\r\n shrink={shrinkDocumentPanel}\r\n />\r\n )}\r\n <div class=\"content\">\r\n <slot name=\"document-panel\" />\r\n </div>\r\n </div>\r\n);\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import {
|
|
4
|
-
export const MainPanel = ({ mode, tabView, mainSize, documentPanelOpen, mainPanelExpanded, mainPanelHidden, shrinkMain, expandMain,
|
|
3
|
+
import { SizingButtons } from "./sizing-buttons";
|
|
4
|
+
export const MainPanel = ({ mode, tabView, mainSize, documentPanelOpen, mainPanelExpanded, mainPanelHidden, shrinkMain, expandMain, toggleMainPanel, dsoMainSizeChangeAnimationEnd, }) => (h("div", { class: clsx("dso-main-panel", {
|
|
5
5
|
compact: !tabView && documentPanelOpen && !mainPanelExpanded,
|
|
6
6
|
expanded: !tabView && documentPanelOpen && mainPanelExpanded,
|
|
7
7
|
collapsed: mainPanelHidden,
|
|
@@ -10,5 +10,6 @@ export const MainPanel = ({ mode, tabView, mainSize, documentPanelOpen, mainPane
|
|
|
10
10
|
dsoMainSizeChangeAnimationEnd.emit({ currentSize: mainSize });
|
|
11
11
|
}
|
|
12
12
|
} }, !tabView &&
|
|
13
|
-
(
|
|
13
|
+
(((mode === "vrk" || (documentPanelOpen && !mainPanelExpanded)) && (h(SizingButtons, { panelLabel: mode === "vdk" ? "Zoeken paneel" : "Hoofdpaneel", size: mainSize, expand: expandMain, shrink: shrinkMain }))) ||
|
|
14
|
+
(mode === "vdk" && documentPanelOpen && (h("div", { class: "toggle-button" }, h("button", { type: "button", onClick: toggleMainPanel }, h("span", { class: "sr-only" }, mode === "vdk" ? "Zoeken paneel" : "Hoofdpaneel", " ", mainPanelHidden ? "Tonen" : "Verbergen"), h("dso-icon", { icon: mainPanelHidden ? "chevron-right" : "chevron-left" })))))), h("div", { class: clsx("content", { invisible: mainPanelHidden }) }, h("slot", { name: "main" }))));
|
|
14
15
|
//# sourceMappingURL=main-panel.js.map
|