generated from VNG-Realisatie/VNG-R-Respec-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
snapshot.html
574 lines (515 loc) · 22.5 KB
/
snapshot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
<!DOCTYPE html><html lang="nl"><head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta name="generator" content="ReSpec 35.1.1">
<style>
dfn{cursor:pointer}
.dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px}
.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
.dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;border-bottom-color:var(--indextable-hover-bg,#fff);top:0}
.dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1;border-bottom-color:var(--indextable-hover-bg,#a2a9b1)}
.dfn-panel *{margin:0}
.dfn-panel b{display:block;color:#000;color:var(--text,#000);margin-top:.25em}
.dfn-panel ul a[href]{color:#333;color:var(--text,#333)}
.dfn-panel>div{display:flex}
.dfn-panel a.self-link{font-weight:700;margin-right:auto}
.dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c}
.dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940}
.dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
.dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important}
.dfn-panel a[href]:hover{border-bottom-width:1px}
.dfn-panel ul{padding:0}
.dfn-panel li{margin-left:1em}
.dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}
</style>
<script>document.title = respecConfig.title</script>
<title>Normafwijking</title>
<title>Model Normafwijking</title>
<link rel="shortcut icon" type="image/x-icon" href="https://vng-realisatie.github.io/VNG-R-Respec-Organization-configurations/media/logo-VNG-Realisatie.ico">
<style>
.figure img, .sidefigure img, figure img,
.figure object, .sidefigure object, figure object {
max-width: none !important;
}
</style>
<style id="respec-mainstyle">
@keyframes pop{
0%{transform:scale(1,1)}
25%{transform:scale(1.25,1.25);opacity:.75}
100%{transform:scale(1,1)}
}
a.internalDFN{color:inherit;border-bottom:1px solid #99c;text-decoration:none}
a.externalDFN{color:inherit;border-bottom:1px dotted #ccc;text-decoration:none}
a.bibref{text-decoration:none}
.respec-offending-element:target{animation:pop .25s ease-in-out 0s 1}
.respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline}
@supports not (text-decoration:red wavy underline){
.respec-offending-element:not(pre){display:inline-block}
.respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x}
}
#references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
cite .bibref{font-style:normal}
a[href].orcid{padding-left:4px;padding-right:4px}
a[href].orcid>svg{margin-bottom:-2px}
ol.tof,ul.tof{list-style:none outside none}
.caption{margin-top:.5em;font-style:italic}
#issue-summary>ul{column-count:2}
#issue-summary li{list-style:none;display:inline-block}
details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top}
details.respec-tests-details>*{padding-right:2em}
details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em}
details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em}
details.respec-tests-details>ul{width:100%;margin-top:-.3em}
details.respec-tests-details>li{padding-left:1em}
.self-link:hover{opacity:1;text-decoration:none;background-color:transparent}
aside.example .marker>a.self-link{color:inherit}
.header-wrapper{display:flex;align-items:baseline;position:relative;left:-.5em}
:is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-.7em;font-size:1rem;opacity:.5}
:is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)}
:is(h2,h3)+a.self-link{top:-.2em}
:is(h4,h5,h6)+a.self-link::before{color:#000}
@media (max-width:767px){
dd{margin-left:0}
}
@media print{
.removeOnSave{display:none}
}
</style>
<style id="respec-nlgov">
img.license{float:left;padding-right:5px}
</style>
<style>
ul.index{columns:30ch;column-gap:1.5em}
ul.index li{list-style:inherit}
ul.index li span{color:inherit;cursor:pointer;white-space:normal}
#index-defined-here ul.index li{font-size:.9rem}
ul.index code{color:inherit}
#index-defined-here .print-only{display:none}
@media print{
#index-defined-here .print-only{display:initial}
}
</style>
<meta name="description" content="Hier komt de samenvatting van het document.">
<style>
.sidelabel {
position: fixed;
-webkit-transform-origin: top right;
right: 100%;
top: 0;
-webkit-transform: rotate(-90deg);
padding: 4px 50px 4px 10px;
color: white;
white-space: nowrap;
z-index: 1;
background-color: #DC7633;
}
</style>
<script type="text/javascript">
/* Any custom mermaid.js scripts will go here. */
</script>
<style>
/* Any custom mermaid.js scripts will go here. */
}
</style>
<script id="initialUserConfig" type="application/json">{
"nl_organisationName": "VNG Realisatie",
"nl_organisationStylesURL": "https://gitdocumentatie.logius.nl/publicatie/respec/style/",
"nl_organisationPublishURL": "https://vng-realisatie.github.io/publicatie",
"logos": [
{
"src": "https://vng-realisatie.github.io/VNG-R-Respec-Organization-configurations/media/logo-VNG-Realisatie.jpg",
"alt": "VNG-Realisatie",
"id": "VNG-Realisatie",
"height": 77,
"url": "https://www.vng.nl"
}
],
"postProcess": [
null
],
"pubDomain": "cim",
"latestVersion": [
"nl_organisationPublishURL",
"pubDomain",
"/",
"shortName"
],
"thisVersion": [
"nl_organisationPublishURL",
"pubDomain",
"/",
"shortName",
"/",
"publishVersion"
],
"prevVersion": [
"nl_organisationPublishURL",
"pubDomain",
"/",
"shortName",
"/",
"previousPublishVersion"
],
"useLogo": true,
"useLabel": true,
"license": "eupl",
"addSectionLinks": true,
"localizationStrings": {
"nl": {
"cv": "Consultatieversie",
"vv": "Versie ter vaststelling",
"ig": "In Gebruik versie",
"io": "In Ontwikkeling versie",
"im": "Informatiemodel",
"hl": "Handleiding",
"st": "Standaard"
}
},
"sotdText": {
"nl": {
"sotd": "Status van dit document",
"cv": "Dit is een door het TO goedgekeurde consultatieversie. Commentaar over dit document kan gestuurd worden naar ",
"vv": "Dit is een definitief concept van de nieuwe versie van dit document. Wijzigingen naar aanleiding van consultaties zijn doorgevoerd.",
"ig": "Dit document is 'In Gebruik'.",
"io": "Dit document is nog 'In Ontwikkeling'."
}
},
"labelColor": {
"ig": "#A569BD",
"io": "#DC7633"
},
"licenses": {
"cc0": {
"name": "Creative Commons 0 Public Domain Dedication",
"short": "CC0",
"url": "https://creativecommons.org/publicdomain/zero/1.0/",
"image": "https://gitdocumentatie.logius.nl/publicatie/respec/media/logos/cc-zero.svg"
},
"cc-by": {
"name": "Creative Commons Attribution 4.0 International Public License",
"short": "CC-BY",
"url": "https://creativecommons.org/licenses/by/4.0/legalcode",
"image": "https://gitdocumentatie.logius.nl/publicatie/respec/media/logos/cc-by.svg"
},
"cc-by-nd": {
"name": "Creative Commons Naamsvermelding-GeenAfgeleideWerken 4.0 Internationaal",
"short": "CC-BY-ND",
"url": "https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl",
"image": "https://gitdocumentatie.logius.nl/publicatie/respec/media/logos/cc-by-nd.svg"
},
"eupl": {
"name": "EUROPEAN UNION PUBLIC LICENCE v. 1.2",
"short": "EUPL",
"url": "https://eupl.eu/",
"image": "https://eupl.eu/eu.png"
}
},
"localBiblio": {
"MIM": {
"href": "https://docs.geostandaarden.nl/mim/mim/",
"publisher": "Geonovum",
"title": "MIM - Metamodel Informatie Modellering",
"date": "Oktober 2023",
"rawDate": "2023"
},
"SemVer": {
"href": "https://semver.org/lang/nl/",
"title": "Semantisch Versioneren 2.0.0",
"date": "December 19, 2023",
"rawDate": "2023"
}
},
"shortName": "OntInk",
"specType": "im",
"specStatus": "IO",
"publishDate": "2024-07-01",
"publishVersion": "1.0.0",
"title": "Normafwijking",
"editors": [
{
"name": "Jan Brinkkemper",
"company": "VNG Realisatie",
"companyURL": "https://vng.nl/artikelen/vng-realisatie"
}
],
"github": "https://github.com/VNG-Realisatie/Ontologie-Inkomen",
"alternateFormats": [
{
"label": "pdf",
"uri": "Ontologie-Inkomen.pdf"
}
]
}</script>
<link rel="stylesheet" href="https://gitdocumentatie.logius.nl/publicatie/respec/style/base.css"></head>
<body class="h-entry toc-inline"><div class="head">
<a class="logo" href="https://www.vng.nl"><img alt="VNG-Realisatie" height="77" id="VNG-Realisatie" src="https://vng-realisatie.github.io/VNG-R-Respec-Organization-configurations/media/logo-VNG-Realisatie.jpg">
</a> <h1 id="title" class="title">Normafwijking</h1>
<h2>
VNG Realisatie Informatiemodel<br>
In Ontwikkeling versie
<time class="dt-published" datetime="2024-07-01">01 juli 2024</time>
</h2>
<dl>
<dt>Deze versie:</dt><dd class="status">
<a class="u-url status" href="https://vng-realisatie.github.io/publicatie/cim/ontink/1.0.0">https://vng-realisatie.github.io/publicatie/cim/ontink/1.0.0</a>
</dd>
<dt>Laatst gepubliceerde versie:</dt><dd>
<a href="https://vng-realisatie.github.io/publicatie/cim/ontink">https://vng-realisatie.github.io/publicatie/cim/ontink</a>
</dd>
<dt>Laatste werkversie:</dt><dd><a href="https://vng-realisatie.github.io/Ontologie-Inkomen/">https://vng-realisatie.github.io/Ontologie-Inkomen/</a></dd>
<dt>Redacteur:</dt>
<dd class="editor p-author h-card vcard">
<span class="p-name fn">Jan Brinkkemper</span> (<a class="p-org org h-org" href="https://vng.nl/artikelen/vng-realisatie">VNG Realisatie</a>)
</dd>
<dt>Doe mee:</dt><dd>
<a href="https://github.com/VNG-Realisatie/Ontologie-Inkomen/">GitHub VNG-Realisatie/Ontologie-Inkomen</a>
</dd><dd>
<a href="https://github.com/VNG-Realisatie/Ontologie-Inkomen/issues/">Dien een melding in</a>
</dd><dd>
<a href="https://github.com/VNG-Realisatie/Ontologie-Inkomen/commits/">Revisiehistorie</a>
</dd><dd>
<a href="https://github.com/VNG-Realisatie/Ontologie-Inkomen/pulls/">Pull requests</a>
</dd>
</dl>
<p>
Dit document is ook beschikbaar in dit niet-normatieve formaat:
<a rel="alternate" href="Ontologie-Inkomen.pdf">pdf</a>
</p>
<p class="copyright">
Dit document valt onder de volgende licentie:
<a rel="license" href="https://eupl.eu/" class="subfoot"><img class="license" src="https://eupl.eu/eu.png" alt="Logo EUROPEAN UNION PUBLIC LICENCE v. 1.2"><br> EUROPEAN UNION PUBLIC LICENCE v. 1.2</a>
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory"><h2>Samenvatting</h2><p>Hier komt de samenvatting van het document.</p>
</section>
<section id="sotd" class="introductory"><h2>Status van dit document</h2><p>Dit document is nog 'In Ontwikkeling'.</p></section><nav id="toc"><h2 class="introductory" id="inhoudsopgave">Inhoudsopgave</h2><ol class="toc"><li class="tocline"><a class="tocxref" href="#abstract">Samenvatting</a></li><li class="tocline"><a class="tocxref" href="#sotd">Status van dit document</a></li><li class="tocline"><a class="tocxref" href="#cat"><bdi class="secno">1. </bdi>Gegevensdefinitie</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#ontologie-inkomen"><bdi class="secno">1.1 </bdi>Ontologie Inkomen</a></li></ol></li><li class="tocline"><a class="tocxref" href="#conformance"><bdi class="secno">2. </bdi>Conformiteit</a></li><li class="tocline"><a class="tocxref" href="#index"><bdi class="secno">A. </bdi>Index</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#index-defined-here"><bdi class="secno">A.1 </bdi>Begrippen gedefinieerd door deze specificatie</a></li><li class="tocline"><a class="tocxref" href="#index-defined-elsewhere"><bdi class="secno">A.2 </bdi>Begrippen gedefinieerd door verwijzing</a></li></ol></li></ol></nav>
<section id="cat"> <div class="header-wrapper"><h2 id="x1-gegevensdefinitie"><bdi class="secno">1. </bdi>Gegevensdefinitie</h2><a class="self-link" href="#cat" aria-label="Permalink for Section 1."></a></div>
<p><b>Deze tekst is normatief.</b>
</p>
<div class="imageinfo overview"><img src="Images/EAID_BE10B4D8_2FFE_4813_9FE9_E95C01985270.png" usemap="#imagemap-EAID_BE10B4D8_2FFE_4813_9FE9_E95C01985270" alt="Diagram: Normafwijking - overzicht"><map name="imagemap-EAID_BE10B4D8_2FFE_4813_9FE9_E95C01985270"><area shape="rect" alt="Normafwijking" coords="813,68,1081,279" href="#global_class_Normafwijking_Normafwijking"><area shape="rect" alt="Maatregel op uitkering" coords="41,506,356,646" href="#global_class_Normafwijking_Maatregelopuitkering"><area shape="rect" alt="Boete" coords="614,304,843,461" href="#global_class_Normafwijking_Boete"><area shape="rect" alt="Afwijkende maatregel" coords="761,498,1060,655" href="#global_class_Normafwijking_Afwijkendemaatregel"><area shape="rect" alt="Maatregel" coords="83,75,313,250" href="#global_class_Normafwijking_Maatregel"></map><p><b>Normafwijking - overzicht</b>
</p><p></p>
<p></p>
</div>
<section id="ontologie-inkomen">
<div class="header-wrapper"><h3 id="x1-1-ontologie-inkomen"><bdi class="secno">1.1 </bdi>Ontologie Inkomen</h3><a class="self-link" href="#ontologie-inkomen" aria-label="Permalink for Section 1.1"></a></div>
<ul>
<li><a class="link" href="https://vng-gbi.github.io/levenssituatie/">Model Levenssituatie</a></li>
<li><a class="link" href="https://vng-gbi.github.io/Vermogen/">Model Vermogen</a></li>
<li><a class="link" href="https://vng-gbi.github.io/levenssituatie/">Model Normafwijking</a></li>
</ul>
</section>
</section>
<section id="conformance"><div class="header-wrapper"><h2 id="x2-conformiteit"><bdi class="secno">2. </bdi>Conformiteit</h2><a class="self-link" href="#conformance" aria-label="Permalink for Section 2."></a></div><p>Naast onderdelen die als niet normatief gemarkeerd zijn, zijn ook alle diagrammen, voorbeelden, en noten in dit document niet normatief. Verder is alles in dit document normatief.</p></section>
<section id="tof"></section>
<section id="index" class="appendix"><div class="header-wrapper"><h2 id="a-index"><bdi class="secno">A. </bdi>Index</h2><a class="self-link" href="#index" aria-label="Permalink for Appendix A."></a></div><section id="index-defined-here">
<div class="header-wrapper"><h3 id="a-1-begrippen-gedefinieerd-door-deze-specificatie"><bdi class="secno">A.1 </bdi>Begrippen gedefinieerd door deze specificatie</h3><a class="self-link" href="#index-defined-here" aria-label="Permalink for Appendix A.1"></a></div>
<ul class="index">
</ul>
</section><section id="index-defined-elsewhere">
<div class="header-wrapper"><h3 id="a-2-begrippen-gedefinieerd-door-verwijzing"><bdi class="secno">A.2 </bdi>Begrippen gedefinieerd door verwijzing</h3><a class="self-link" href="#index-defined-elsewhere" aria-label="Permalink for Appendix A.2"></a></div>
<ul class="index">
</ul>
</section></section>
<p role="navigation" id="back-to-top">
<a href="#title"><abbr title="Back to Top">↑</abbr></a>
</p><script id="respec-dfn-panel">(() => {
// @ts-check
if (document.respec) {
document.respec.ready.then(setupPanel);
} else {
setupPanel();
}
function setupPanel() {
const listener = panelListener();
document.body.addEventListener("keydown", listener);
document.body.addEventListener("click", listener);
}
function panelListener() {
/** @type {HTMLElement} */
let panel = null;
return event => {
const { target, type } = event;
if (!(target instanceof HTMLElement)) return;
// For keys, we only care about Enter key to activate the panel
// otherwise it's activated via a click.
if (type === "keydown" && event.key !== "Enter") return;
const action = deriveAction(event);
switch (action) {
case "show": {
hidePanel(panel);
/** @type {HTMLElement} */
const dfn = target.closest("dfn, .index-term");
panel = document.getElementById(`dfn-panel-for-${dfn.id}`);
const coords = deriveCoordinates(event);
displayPanel(dfn, panel, coords);
break;
}
case "dock": {
panel.style.left = null;
panel.style.top = null;
panel.classList.add("docked");
break;
}
case "hide": {
hidePanel(panel);
panel = null;
break;
}
}
};
}
/**
* @param {MouseEvent|KeyboardEvent} event
*/
function deriveCoordinates(event) {
const target = /** @type HTMLElement */ (event.target);
// We prevent synthetic AT clicks from putting
// the dialog in a weird place. The AT events sometimes
// lack coordinates, so they have clientX/Y = 0
const rect = target.getBoundingClientRect();
if (
event instanceof MouseEvent &&
event.clientX >= rect.left &&
event.clientY >= rect.top
) {
// The event probably happened inside the bounding rect...
return { x: event.clientX, y: event.clientY };
}
// Offset to the middle of the element
const x = rect.x + rect.width / 2;
// Placed at the bottom of the element
const y = rect.y + rect.height;
return { x, y };
}
/**
* @param {Event} event
*/
function deriveAction(event) {
const target = /** @type {HTMLElement} */ (event.target);
const hitALink = !!target.closest("a");
if (target.closest("dfn:not([data-cite]), .index-term")) {
return hitALink ? "none" : "show";
}
if (target.closest(".dfn-panel")) {
if (hitALink) {
return target.classList.contains("self-link") ? "hide" : "dock";
}
const panel = target.closest(".dfn-panel");
return panel.classList.contains("docked") ? "hide" : "none";
}
if (document.querySelector(".dfn-panel:not([hidden])")) {
return "hide";
}
return "none";
}
/**
* @param {HTMLElement} dfn
* @param {HTMLElement} panel
* @param {{ x: number, y: number }} clickPosition
*/
function displayPanel(dfn, panel, { x, y }) {
panel.hidden = false;
// distance (px) between edge of panel and the pointing triangle (caret)
const MARGIN = 20;
const dfnRects = dfn.getClientRects();
// Find the `top` offset when the `dfn` can be spread across multiple lines
let closestTop = 0;
let minDiff = Infinity;
for (const rect of dfnRects) {
const { top, bottom } = rect;
const diffFromClickY = Math.abs((top + bottom) / 2 - y);
if (diffFromClickY < minDiff) {
minDiff = diffFromClickY;
closestTop = top;
}
}
const top = window.scrollY + closestTop + dfnRects[0].height;
const left = x - MARGIN;
panel.style.left = `${left}px`;
panel.style.top = `${top}px`;
// Find if the panel is flowing out of the window
const panelRect = panel.getBoundingClientRect();
const SCREEN_WIDTH = Math.min(window.innerWidth, window.screen.width);
if (panelRect.right > SCREEN_WIDTH) {
const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);
const newCaretOffset = left - newLeft;
panel.style.left = `${newLeft}px`;
/** @type {HTMLElement} */
const caret = panel.querySelector(".caret");
caret.style.left = `${newCaretOffset}px`;
}
// As it's a dialog, we trap focus.
// TODO: when <dialog> becomes a implemented, we should really
// use that.
trapFocus(panel, dfn);
}
/**
* @param {HTMLElement} panel
* @param {HTMLElement} dfn
* @returns
*/
function trapFocus(panel, dfn) {
/** @type NodeListOf<HTMLAnchorElement> elements */
const anchors = panel.querySelectorAll("a[href]");
// No need to trap focus
if (!anchors.length) return;
// Move focus to first anchor element
const first = anchors.item(0);
first.focus();
const trapListener = createTrapListener(anchors, panel, dfn);
panel.addEventListener("keydown", trapListener);
// Hiding the panel releases the trap
const mo = new MutationObserver(records => {
const [record] = records;
const target = /** @type HTMLElement */ (record.target);
if (target.hidden) {
panel.removeEventListener("keydown", trapListener);
mo.disconnect();
}
});
mo.observe(panel, { attributes: true, attributeFilter: ["hidden"] });
}
/**
*
* @param {NodeListOf<HTMLAnchorElement>} anchors
* @param {HTMLElement} panel
* @param {HTMLElement} dfn
* @returns
*/
function createTrapListener(anchors, panel, dfn) {
const lastIndex = anchors.length - 1;
let currentIndex = 0;
return event => {
switch (event.key) {
// Hitting "Tab" traps us in a nice loop around elements.
case "Tab": {
event.preventDefault();
currentIndex += event.shiftKey ? -1 : +1;
if (currentIndex < 0) {
currentIndex = lastIndex;
} else if (currentIndex > lastIndex) {
currentIndex = 0;
}
anchors.item(currentIndex).focus();
break;
}
// Hitting "Enter" on an anchor releases the trap.
case "Enter":
hidePanel(panel);
break;
// Hitting "Escape" returns focus to dfn.
case "Escape":
hidePanel(panel);
dfn.focus();
return;
}
};
}
/** @param {HTMLElement} panel */
function hidePanel(panel) {
if (!panel) return;
panel.hidden = true;
panel.classList.remove("docked");
}
})()</script><div class="sidelabel">VNG Realisatie Informatiemodel - In Ontwikkeling versie</div><script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script></body></html>