@dso-toolkit/core 67.0.0-ghi-2365.2 → 67.1.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 +5 -3
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-alert_6.cjs.entry.js +19 -3
- package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +31 -9
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-document-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-document-card.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +3 -3
- package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +8 -3
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +14 -0
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +39 -8
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/document-card/document-card.css +2 -1
- package/dist/collection/components/document-component/document-component-heading.js +15 -6
- package/dist/collection/components/document-component/document-component-heading.js.map +1 -1
- package/dist/collection/components/document-component/document-component.css +55 -7
- package/dist/collection/components/document-component/document-component.js +99 -2
- 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/document-component-demo/document-component.demo.js +52 -3
- package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -1
- package/dist/collection/components/header/header.css +10 -143
- package/dist/collection/components/header/header.js +3 -3
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/panel/panel.i18n.js +13 -0
- package/dist/collection/components/panel/panel.i18n.js.map +1 -0
- package/dist/collection/components/panel/panel.js +29 -1
- package/dist/collection/components/panel/panel.js.map +1 -1
- package/dist/components/document-component.js +35 -10
- package/dist/components/document-component.js.map +1 -1
- package/dist/components/dso-accordion-section.js +20 -11
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-document-card.js +1 -1
- package/dist/components/dso-document-card.js.map +1 -1
- package/dist/components/dso-header.js +4 -5
- package/dist/components/dso-header.js.map +1 -1
- package/dist/components/dsot-document-component-demo.js +9 -3
- package/dist/components/dsot-document-component-demo.js.map +1 -1
- package/dist/components/panel.js +21 -2
- package/dist/components/panel.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-39d0a5be.entry.js +2 -0
- package/dist/dso-toolkit/p-39d0a5be.entry.js.map +1 -0
- package/dist/dso-toolkit/p-3e9082b8.entry.js +2 -0
- package/dist/dso-toolkit/p-3e9082b8.entry.js.map +1 -0
- package/dist/dso-toolkit/p-758523a5.entry.js +2 -0
- package/dist/dso-toolkit/p-758523a5.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-e05b8f92.entry.js → p-a83d9abb.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e05b8f92.entry.js.map → p-a83d9abb.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-c64628c7.entry.js +2 -0
- package/dist/dso-toolkit/p-c64628c7.entry.js.map +1 -0
- package/dist/dso-toolkit/p-fbfe9a96.entry.js +2 -0
- package/dist/dso-toolkit/p-fbfe9a96.entry.js.map +1 -0
- package/dist/esm/dso-accordion-section.entry.js +5 -3
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-alert_6.entry.js +19 -3
- package/dist/esm/dso-alert_6.entry.js.map +1 -1
- package/dist/esm/dso-annotation-locatie_2.entry.js +31 -9
- package/dist/esm/dso-annotation-locatie_2.entry.js.map +1 -1
- package/dist/esm/dso-document-card.entry.js +1 -1
- package/dist/esm/dso-document-card.entry.js.map +1 -1
- package/dist/esm/dso-header.entry.js +3 -3
- package/dist/esm/dso-header.entry.js.map +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +8 -3
- package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/components/accordion-section.d.ts +7 -2
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +1 -0
- package/dist/types/components/document-component/document-component-heading.d.ts +3 -0
- package/dist/types/components/document-component/document-component.d.ts +18 -1
- package/dist/types/components/document-component/document-component.models.d.ts +7 -0
- package/dist/types/components/document-component-demo/document-component.demo.d.ts +11 -1
- package/dist/types/components/panel/panel.d.ts +6 -0
- package/dist/types/components/panel/panel.i18n.d.ts +2 -0
- package/dist/types/components.d.ts +66 -8
- package/package.json +3 -3
- package/dist/dso-toolkit/p-76dfbee3.entry.js +0 -2
- package/dist/dso-toolkit/p-76dfbee3.entry.js.map +0 -1
- package/dist/dso-toolkit/p-abe7047e.entry.js +0 -2
- package/dist/dso-toolkit/p-abe7047e.entry.js.map +0 -1
- package/dist/dso-toolkit/p-bc0a6bac.entry.js +0 -2
- package/dist/dso-toolkit/p-bc0a6bac.entry.js.map +0 -1
- package/dist/dso-toolkit/p-e665556c.entry.js +0 -2
- package/dist/dso-toolkit/p-e665556c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-e70cf422.entry.js +0 -2
- package/dist/dso-toolkit/p-e70cf422.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-component.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,M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r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentWijzigactie,\r\n DocumentComponentInputType,\r\n DocumentComponentMarkFunction,\r\n DocumentComponentMarkItemHighlightEvent,\r\n DocumentComponentRecursiveToggleEvent,\r\n DocumentComponentRecursiveToggleState,\r\n} from \"./document-component.models\";\r\nimport { OzonContentAnchorClickEvent } from \"../ozon-content/ozon-content.interfaces\";\r\nimport { Heading } from \"./document-component-heading\";\r\n\r\nimport { DsoOzonContentCustomEvent } from \"../../components\";\r\n\r\nconst wijzigactieLabels: { [wijzigactie in DocumentComponentWijzigactie]: string } = {\r\n nieuweContainer: \"Toegevoegd\",\r\n verwijder: \"Verwijderd\",\r\n verwijderContainer: \"Verwijderd\",\r\n voegtoe: \"Toegevoegd\",\r\n};\r\n\r\n/**\r\n * @part _annotation-container - private part, do not touch.\r\n * @part _children-container - private part, do not touch.\r\n * @part _content - private part, do not touch.\r\n * @part _heading-container - private part, do not touch.\r\n */\r\n@Component({\r\n tag: \"dso-document-component\",\r\n styleUrl: \"document-component.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentComponent implements ComponentInterface {\r\n /**\r\n * The heading element to use.\r\n */\r\n @Prop()\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h2\";\r\n\r\n /**\r\n * The Label XML.\r\n */\r\n @Prop()\r\n label?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: DocumentComponentInputType;\r\n\r\n /**\r\n * This boolean attribute indicates whether the children are visible.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Marks this Document Component as belonging to an active filter.\r\n */\r\n @Prop({ reflect: true })\r\n filtered = false;\r\n\r\n /**\r\n * Marks this Document Component as not-applicable.\r\n */\r\n @Prop({ reflect: true })\r\n notApplicable = false;\r\n\r\n /**\r\n * When a child Document Component has a status \"Draft\".\r\n */\r\n @Prop({ reflect: true })\r\n genesteOntwerpInformatie = false;\r\n\r\n /**\r\n * Marks as draft.\r\n */\r\n @Prop({ reflect: true })\r\n bevatOntwerpInformatie = false;\r\n\r\n /**\r\n * Enables annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotated = false;\r\n\r\n /**\r\n * Marks Document Component as reserved.\r\n */\r\n @Prop()\r\n gereserveerd = false;\r\n\r\n /**\r\n * Marks the Document Component as expired.\r\n */\r\n @Prop()\r\n vervallen = false;\r\n\r\n /**\r\n * When the Annotation is opened, set this to true.\r\n */\r\n @Prop({ reflect: true })\r\n openAnnotation = false;\r\n\r\n /**\r\n * An alternative title to show when there is nothing to create a title.\r\n */\r\n @Prop()\r\n alternativeTitle?: string;\r\n\r\n /**\r\n * Type of Document Component.\r\n */\r\n @Prop({ reflect: true })\r\n type?: string;\r\n\r\n /**\r\n * The wijzigactie as in STOP.\r\n */\r\n @Prop({ reflect: true })\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: DocumentComponentMarkFunction;\r\n\r\n /**\r\n * Shows the recursive toggle button. When the user activates this button the event `dsoRecursiveToggle` is emitted.\r\n */\r\n @Prop()\r\n recursiveToggle: DocumentComponentRecursiveToggleState;\r\n\r\n /**\r\n * Emitted when the user activates the recursive toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRecursiveToggle!: EventEmitter<DocumentComponentRecursiveToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoOpenToggle!: EventEmitter<DocumentComponentOpenToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user actives intRef or intIoRef anchors in Ozon Content\r\n */\r\n @Event({ bubbles: false })\r\n dsoOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the annotation button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnnotationToggle!: EventEmitter<DocumentComponentToggleAnnotationEvent>;\r\n\r\n /**\r\n * Emitted each time a marked item gets highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoMarkItemHighlight!: EventEmitter<DocumentComponentMarkItemHighlightEvent>;\r\n\r\n private get wijzigactieLabel(): string | undefined {\r\n return this.wijzigactie && wijzigactieLabels[this.wijzigactie];\r\n }\r\n\r\n private handleHeadingClick = (e: MouseEvent) => {\r\n if (this.type !== \"LID\") {\r\n this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });\r\n }\r\n };\r\n\r\n private suffix(): string | undefined {\r\n if (this.vervallen) {\r\n return \"vervallen\";\r\n }\r\n\r\n if (this.gereserveerd) {\r\n return \"gereserveerd\";\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private handleOzonContentAnchorClick = (e: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>) => {\r\n this.dsoOzonContentAnchorClick.emit({ originalEvent: e, ozonContentAnchorClick: e.detail });\r\n };\r\n\r\n private handleRecursiveToggleClick = (e: MouseEvent) => {\r\n this.dsoRecursiveToggle.emit({\r\n originalEvent: e,\r\n current: this.recursiveToggle,\r\n next: this.recursiveToggle !== true,\r\n });\r\n };\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n const collapsible = !!(\r\n (this.label || this.nummer || this.opschrift || this.alternativeTitle) &&\r\n this.type !== \"LID\"\r\n );\r\n const showHeading = !!(\r\n this.wijzigactie ||\r\n collapsible ||\r\n this.label ||\r\n this.nummer ||\r\n this.opschrift ||\r\n this.alternativeTitle ||\r\n this.bevatOntwerpInformatie ||\r\n this.annotated\r\n );\r\n\r\n return (\r\n <Host not-collapsible={!collapsible}>\r\n {showHeading && (\r\n <div class=\"heading-container\" part=\"_heading-container\">\r\n {this.wijzigactie && <span class=\"editaction-label\">{this.wijzigactieLabel}:</span>}\r\n <div class=\"heading\">\r\n <Heading heading={this.heading} class=\"heading-element\" onClick={this.handleHeadingClick}>\r\n {collapsible && (\r\n <button\r\n type=\"button\"\r\n class=\"toggle-button\"\r\n aria-describedby=\"heading-title\"\r\n aria-expanded={this.open.toString()}\r\n >\r\n <dso-icon icon={this.open ? \"chevron-down\" : \"chevron-right\"}></dso-icon>\r\n <span class=\"sr-only\">{this.open ? \"Invouwen\" : \"Uitvouwen\"}</span>\r\n </button>\r\n )}\r\n <div id=\"heading-title\">\r\n {this.notApplicable && <span class=\"sr-only\">Niet van toepassing:</span>}\r\n {this.label || this.nummer || this.opschrift ? (\r\n <>\r\n {this.label && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.label}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"label\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"label\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.nummer && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.nummer}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"nummer\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"nummer\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.opschrift && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.opschrift}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"opschrift\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"opschrift\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n ) : (\r\n this.alternativeTitle\r\n )}\r\n {suffix && <span> - [{suffix}]</span>}\r\n </div>\r\n </Heading>\r\n {this.recursiveToggle !== undefined && this.open && (\r\n <button\r\n type=\"button\"\r\n class=\"recursive-toggle\"\r\n title={this.recursiveToggle === true ? \"Verberg alles\" : \"Toon alles\"}\r\n onClick={this.handleRecursiveToggleClick}\r\n >\r\n <dso-icon icon={this.recursiveToggle === true ? \"eye\" : \"eye-slash\"} />\r\n </button>\r\n )}\r\n {this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (\r\n <>\r\n <dso-badge status=\"warning\" aria-describedby=\"nested-draft-description\">\r\n !\r\n </dso-badge>\r\n <dso-tooltip id=\"nested-draft-description\">Er is een ontwerp beschikbaar.</dso-tooltip>\r\n </>\r\n )}\r\n {(this.bevatOntwerpInformatie || this.annotated) && (\r\n <div class=\"addons\">\r\n {this.bevatOntwerpInformatie && (\r\n <dso-label status=\"warning\" compact>\r\n Ontwerp\r\n </dso-label>\r\n )}\r\n {this.annotated && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n aria-controls={this.openAnnotation ? \"annotations\" : undefined}\r\n aria-expanded={this.openAnnotation.toString()}\r\n onClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n >\r\n <dso-icon icon=\"label\"></dso-icon>\r\n <span class=\"sr-only\">Toelichting bekijken</span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n {this.openAnnotation && (\r\n <div class=\"annotation-container\" part=\"_annotation-container\">\r\n <dso-panel id=\"annotations\" onDsoCloseClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}>\r\n <h2 slot=\"heading\">Kenmerken en kaart</h2>\r\n <slot name=\"annotations\" />\r\n </dso-panel>\r\n </div>\r\n )}\r\n {this.open && (this.inhoud || this.gereserveerd || this.vervallen) && (\r\n <div class=\"content\" part=\"_content\">\r\n {this.gereserveerd && (\r\n <dso-alert status=\"info\">Dit onderdeel is gereserveerd voor toekomstige toevoeging.</dso-alert>\r\n )}\r\n {this.vervallen && <dso-alert status=\"info\">Dit onderdeel is vervallen.</dso-alert>}\r\n {this.inhoud && (\r\n <dso-ozon-content\r\n content={this.inhoud}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"inhoud\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"inhoud\" })\r\n }\r\n />\r\n )}\r\n </div>\r\n )}\r\n <div class=\"children-container\" part=\"_children-container\">\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"document-component.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAiBhE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIvD,MAAM,iBAAiB,GAA8D;IACnF,eAAe,EAAE,YAAY;IAC7B,SAAS,EAAE,YAAY;IACvB,kBAAkB,EAAE,YAAY;IAChC,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF;;;;;GAKG;AAMH,MAAM,OAAO,iBAAiB;;QA6KpB,uBAAkB,GAAG,CAAC,CAAa,EAAE,EAAE;YAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;gBACtC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, Host } from \"@stencil/core\";\r\n\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentWijzigactie,\r\n DocumentComponentAnnotationsWijzigactie,\r\n DocumentComponentInputType,\r\n DocumentComponentMarkFunction,\r\n DocumentComponentMarkItemHighlightEvent,\r\n DocumentComponentRecursiveToggleEvent,\r\n DocumentComponentRecursiveToggleState,\r\n DocumentComponentMode,\r\n DocumentComponentTableOfContentsClickEvent,\r\n} from \"./document-component.models\";\r\nimport { OzonContentAnchorClickEvent } from \"../ozon-content/ozon-content.interfaces\";\r\nimport { Heading } from \"./document-component-heading\";\r\n\r\nimport { DsoOzonContentCustomEvent } from \"../../components\";\r\n\r\nconst wijzigactieLabels: { [wijzigactie in DocumentComponentWijzigactie]: string } = {\r\n nieuweContainer: \"Toegevoegd\",\r\n verwijder: \"Verwijderd\",\r\n verwijderContainer: \"Verwijderd\",\r\n voegtoe: \"Toegevoegd\",\r\n};\r\n\r\n/**\r\n * @part _annotation-container - private part, do not touch.\r\n * @part _children-container - private part, do not touch.\r\n * @part _content - private part, do not touch.\r\n * @part _heading-container - private part, do not touch.\r\n */\r\n@Component({\r\n tag: \"dso-document-component\",\r\n styleUrl: \"document-component.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentComponent implements ComponentInterface {\r\n /**\r\n * The heading element to use.\r\n */\r\n @Prop()\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h2\";\r\n\r\n /**\r\n * The Label XML.\r\n */\r\n @Prop()\r\n label?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: DocumentComponentInputType;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: DocumentComponentInputType;\r\n\r\n /**\r\n * This boolean attribute indicates whether the children are visible.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Marks this Document Component as belonging to an active filter.\r\n */\r\n @Prop({ reflect: true })\r\n filtered = false;\r\n\r\n /**\r\n * Marks this Document Component as not-applicable.\r\n */\r\n @Prop({ reflect: true })\r\n notApplicable = false;\r\n\r\n /**\r\n * When a child Document Component has a status \"Draft\".\r\n */\r\n @Prop({ reflect: true })\r\n genesteOntwerpInformatie = false;\r\n\r\n /**\r\n * Marks as draft.\r\n */\r\n @Prop({ reflect: true })\r\n bevatOntwerpInformatie = false;\r\n\r\n /**\r\n * Enables annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotated = false;\r\n\r\n /**\r\n * Marks Document Component as reserved.\r\n */\r\n @Prop()\r\n gereserveerd = false;\r\n\r\n /**\r\n * Marks the Document Component as expired.\r\n */\r\n @Prop()\r\n vervallen = false;\r\n\r\n /**\r\n * When the Annotation is opened, set this to true.\r\n */\r\n @Prop({ reflect: true })\r\n openAnnotation = false;\r\n\r\n /**\r\n * An alternative title to show when there is nothing to create a title.\r\n */\r\n @Prop()\r\n alternativeTitle?: string;\r\n\r\n /**\r\n * Type of Document Component.\r\n */\r\n @Prop({ reflect: true })\r\n type?: string;\r\n\r\n /**\r\n * The wijzigactie as in STOP.\r\n */\r\n @Prop({ reflect: true })\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n\r\n /**\r\n * The wijzigactie for all annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotationsWijzigactie?: DocumentComponentAnnotationsWijzigactie;\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: DocumentComponentMarkFunction;\r\n\r\n /**\r\n * Shows the recursive toggle button. When the user activates this button the event `dsoRecursiveToggle` is emitted.\r\n */\r\n @Prop()\r\n recursiveToggle: DocumentComponentRecursiveToggleState;\r\n\r\n /**\r\n * The mode of the Document Component. One of \"document\" or \"table-of-contents\". Defaults to \"document\"\r\n */\r\n @Prop({ reflect: true })\r\n mode: DocumentComponentMode = \"document\";\r\n\r\n /**\r\n * The URL to which the Heading links (only in mode=\"table-of-contents\").\r\n */\r\n @Prop({ reflect: true })\r\n href?: string;\r\n\r\n /**\r\n * Emitted when the user activates the recursive toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRecursiveToggle!: EventEmitter<DocumentComponentRecursiveToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoOpenToggle!: EventEmitter<DocumentComponentOpenToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user clicks the heading in mode=\"table-of-contents\".\r\n */\r\n @Event({ bubbles: false })\r\n dsoTableOfContentsClick!: EventEmitter<DocumentComponentTableOfContentsClickEvent>;\r\n\r\n /**\r\n * Emitted when the user actives intRef or intIoRef anchors in Ozon Content\r\n */\r\n @Event({ bubbles: false })\r\n dsoOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the annotation button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnnotationToggle!: EventEmitter<DocumentComponentToggleAnnotationEvent>;\r\n\r\n /**\r\n * Emitted each time a marked item gets highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoMarkItemHighlight!: EventEmitter<DocumentComponentMarkItemHighlightEvent>;\r\n\r\n private get wijzigactieLabel(): string | undefined {\r\n return this.wijzigactie && wijzigactieLabels[this.wijzigactie];\r\n }\r\n\r\n private handleHeadingClick = (e: MouseEvent) => {\r\n if (this.mode === \"table-of-contents\") {\r\n this.dsoTableOfContentsClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n } else if (this.type !== \"LID\") {\r\n this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });\r\n }\r\n };\r\n\r\n private suffix(): string | undefined {\r\n if (this.vervallen) {\r\n return \"vervallen\";\r\n }\r\n\r\n if (this.gereserveerd) {\r\n return \"gereserveerd\";\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private handleOzonContentAnchorClick = (e: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>) => {\r\n this.dsoOzonContentAnchorClick.emit({ originalEvent: e, ozonContentAnchorClick: e.detail });\r\n };\r\n\r\n private handleRecursiveToggleClick = (e: MouseEvent) => {\r\n this.dsoRecursiveToggle.emit({\r\n originalEvent: e,\r\n current: this.recursiveToggle,\r\n next: this.recursiveToggle !== true,\r\n });\r\n };\r\n\r\n private showOntwerpBadge(): boolean {\r\n return (\r\n this.genesteOntwerpInformatie &&\r\n !this.bevatOntwerpInformatie &&\r\n ((!this.open && this.mode === \"document\") || this.mode === \"table-of-contents\")\r\n );\r\n }\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n const collapsible = !!(\r\n (this.label || this.nummer || this.opschrift || this.alternativeTitle) &&\r\n this.type !== \"LID\"\r\n );\r\n\r\n const showHeading = !!(\r\n this.wijzigactie ||\r\n collapsible ||\r\n this.label ||\r\n this.nummer ||\r\n this.opschrift ||\r\n this.alternativeTitle ||\r\n this.bevatOntwerpInformatie ||\r\n this.annotated\r\n );\r\n\r\n return (\r\n <Host not-collapsible={!collapsible}>\r\n {showHeading && (\r\n <div class=\"heading-container\" part=\"_heading-container\">\r\n {this.wijzigactie && <span class=\"editaction-label\">{this.wijzigactieLabel}:</span>}\r\n <div class=\"heading\">\r\n <Heading\r\n heading={this.heading}\r\n class=\"heading-element\"\r\n onClick={this.handleHeadingClick}\r\n mode={this.mode}\r\n href={this.href}\r\n >\r\n {collapsible && this.mode === \"document\" && (\r\n <button\r\n type=\"button\"\r\n class=\"toggle-button\"\r\n aria-describedby=\"heading-title\"\r\n aria-expanded={this.open.toString()}\r\n >\r\n <dso-icon icon={this.open ? \"chevron-down\" : \"chevron-right\"}></dso-icon>\r\n <span class=\"sr-only\">{this.open ? \"Invouwen\" : \"Uitvouwen\"}</span>\r\n </button>\r\n )}\r\n <span id=\"heading-title\">\r\n {this.notApplicable && <span class=\"sr-only\">Niet van toepassing:</span>}\r\n {this.label || this.nummer || this.opschrift ? (\r\n <>\r\n {this.label && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.label}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"label\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"label\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.nummer && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.nummer}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"nummer\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"nummer\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n {this.opschrift && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content\r\n content={this.opschrift}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"opschrift\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"opschrift\" })\r\n }\r\n inline\r\n ></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n ) : (\r\n this.alternativeTitle\r\n )}\r\n {suffix && <span> - [{suffix}]</span>}\r\n </span>\r\n </Heading>\r\n {this.recursiveToggle !== undefined && this.open && this.mode === \"document\" && (\r\n <button\r\n type=\"button\"\r\n class=\"recursive-toggle\"\r\n title={this.recursiveToggle === true ? \"Verberg alles\" : \"Toon alles\"}\r\n onClick={this.handleRecursiveToggleClick}\r\n >\r\n <dso-icon icon={this.recursiveToggle === true ? \"eye\" : \"eye-slash\"} />\r\n </button>\r\n )}\r\n {this.showOntwerpBadge() && (\r\n <>\r\n <dso-badge status=\"warning\" aria-describedby=\"nested-draft-description\">\r\n !\r\n </dso-badge>\r\n <dso-tooltip id=\"nested-draft-description\">Er is een ontwerp beschikbaar.</dso-tooltip>\r\n </>\r\n )}\r\n {(this.bevatOntwerpInformatie || this.annotated) && (\r\n <div class=\"addons\">\r\n {this.bevatOntwerpInformatie && (\r\n <dso-label status=\"warning\" compact>\r\n Ontwerp\r\n </dso-label>\r\n )}\r\n {this.annotated && this.mode === \"document\" && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary\"\r\n aria-controls={this.openAnnotation ? \"annotations\" : undefined}\r\n aria-expanded={this.openAnnotation.toString()}\r\n onClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n >\r\n <dso-icon icon=\"label\"></dso-icon>\r\n <span class=\"sr-only\">\r\n Kenmerken en kaartgegevens {this.openAnnotation ? \"verbergen\" : \"tonen\"}\r\n </span>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n )}\r\n {this.openAnnotation && (\r\n <div class=\"annotation-container\" part=\"_annotation-container\">\r\n <dso-panel\r\n id=\"annotations\"\r\n onDsoCloseClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n closeButtonLabel=\"Kenmerken en kaartgegevens verbergen\"\r\n >\r\n <h2 slot=\"heading\">Kenmerken en kaart</h2>\r\n <slot name=\"annotations\" />\r\n </dso-panel>\r\n </div>\r\n )}\r\n {this.open && (this.inhoud || this.gereserveerd || this.vervallen) && this.mode === \"document\" && (\r\n <div class=\"content\" part=\"_content\">\r\n {this.gereserveerd && (\r\n <dso-alert status=\"info\">Dit onderdeel is gereserveerd voor toekomstige toevoeging.</dso-alert>\r\n )}\r\n {this.vervallen && <dso-alert status=\"info\">Dit onderdeel is vervallen.</dso-alert>}\r\n {this.inhoud && (\r\n <dso-ozon-content\r\n content={this.inhoud}\r\n onDsoAnchorClick={this.handleOzonContentAnchorClick}\r\n mark={this.mark && ((text) => this.mark?.(text, \"inhoud\"))}\r\n onDsoOzonContentMarkItemHighlight={(e) =>\r\n this.dsoMarkItemHighlight.emit({ ...e.detail, source: \"inhoud\" })\r\n }\r\n />\r\n )}\r\n </div>\r\n )}\r\n <div class=\"children-container\" part=\"_children-container\">\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-component.models.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component.models.ts"],"names":[],"mappings":"","sourcesContent":["import { DsoOzonContentCustomEvent } from \"../../components\";\r\nimport { OzonContentAnchorClickEvent, OzonContentText } from \"../ozon-content/ozon-content.interfaces\";\r\n\r\nexport interface DocumentComponentOpenToggleEvent {\r\n originalEvent: Event;\r\n open: boolean;\r\n}\r\n\r\nexport interface DocumentComponentToggleAnnotationEvent {\r\n originalEvent: Event;\r\n}\r\n\r\nexport type DocumentComponentWijzigactie = \"voegtoe\" | \"verwijder\" | \"nieuweContainer\" | \"verwijderContainer\";\r\n\r\nexport interface DocumentComponentOzonContentAnchorClickEvent {\r\n originalEvent: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>;\r\n ozonContentAnchorClick: OzonContentAnchorClickEvent;\r\n}\r\n\r\nexport type DocumentComponentInputType = XMLDocument | string;\r\n\r\nexport type DocumentComponentSource = \"label\" | \"nummer\" | \"opschrift\" | \"inhoud\";\r\n\r\nexport type DocumentComponentMarkFunction = (text: string, source: DocumentComponentSource) => OzonContentText[];\r\n\r\nexport interface DocumentComponentMarkItemHighlightEvent {\r\n source: DocumentComponentSource;\r\n text: string;\r\n elementRef: HTMLElement;\r\n}\r\n\r\nexport type DocumentComponentRecursiveToggleState = undefined | boolean | \"indeterminate\";\r\n\r\nexport interface DocumentComponentRecursiveToggleEvent {\r\n originalEvent: MouseEvent;\r\n current: DocumentComponentRecursiveToggleState;\r\n next: boolean;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"document-component.models.js","sourceRoot":"","sources":["../../../../src/components/document-component/document-component.models.ts"],"names":[],"mappings":"","sourcesContent":["import { DsoOzonContentCustomEvent } from \"../../components\";\r\nimport { OzonContentAnchorClickEvent, OzonContentText } from \"../ozon-content/ozon-content.interfaces\";\r\n\r\nexport interface DocumentComponentOpenToggleEvent {\r\n originalEvent: Event;\r\n open: boolean;\r\n}\r\n\r\nexport interface DocumentComponentToggleAnnotationEvent {\r\n originalEvent: Event;\r\n}\r\n\r\nexport type DocumentComponentWijzigactie = \"voegtoe\" | \"verwijder\" | \"nieuweContainer\" | \"verwijderContainer\";\r\n\r\nexport type DocumentComponentAnnotationsWijzigactie = \"voegtoe\" | \"verwijder\";\r\n\r\nexport interface DocumentComponentOzonContentAnchorClickEvent {\r\n originalEvent: DsoOzonContentCustomEvent<OzonContentAnchorClickEvent>;\r\n ozonContentAnchorClick: OzonContentAnchorClickEvent;\r\n}\r\n\r\nexport type DocumentComponentInputType = XMLDocument | string;\r\n\r\nexport type DocumentComponentSource = \"label\" | \"nummer\" | \"opschrift\" | \"inhoud\";\r\n\r\nexport type DocumentComponentMarkFunction = (text: string, source: DocumentComponentSource) => OzonContentText[];\r\n\r\nexport interface DocumentComponentMarkItemHighlightEvent {\r\n source: DocumentComponentSource;\r\n text: string;\r\n elementRef: HTMLElement;\r\n}\r\n\r\nexport type DocumentComponentRecursiveToggleState = undefined | boolean | \"indeterminate\";\r\n\r\nexport interface DocumentComponentRecursiveToggleEvent {\r\n originalEvent: MouseEvent;\r\n current: DocumentComponentRecursiveToggleState;\r\n next: boolean;\r\n}\r\n\r\nexport type DocumentComponentMode = \"document\" | \"table-of-contents\";\r\n\r\nexport interface DocumentComponentTableOfContentsClickEvent {\r\n originalEvent: MouseEvent;\r\n /** True when user clicked the document component heading while holding Ctrl, Alt or other modifiers, or when the document component heading is right-clicked. Can be used to determine navigation. */\r\n isModifiedEvent: boolean;\r\n}\r\n"]}
|
|
@@ -14,14 +14,14 @@ export class DocumentComponentDemo {
|
|
|
14
14
|
};
|
|
15
15
|
this.DocumentComponent = ({ path }) => {
|
|
16
16
|
const documentComponent = path.at(-1);
|
|
17
|
-
if (!documentComponent) {
|
|
17
|
+
if (!documentComponent || (this.mode === "table-of-contents" && documentComponent.type === "LID")) {
|
|
18
18
|
return h(Fragment, null);
|
|
19
19
|
}
|
|
20
20
|
const { DocumentComponent } = this;
|
|
21
21
|
const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);
|
|
22
22
|
return (h("dso-document-component", { annotated: this.isAnnotated(documentComponent), bevatOntwerpInformatie: !!documentComponent.bevatOntwerpInformatie, filtered: this.isOpen(documentComponent)
|
|
23
23
|
? this.isFiltered(documentComponent)
|
|
24
|
-
: this.hasFilteredChildren(documentComponent), genesteOntwerpInformatie: this.hasNestedDraft(documentComponent), gereserveerd: documentComponent.gereserveerd, heading: "h2", inhoud: documentComponent.inhoud, label: documentComponent.labelXml, openAnnotation: this.isOpenedAnnotation(documentComponent), notApplicable: this.isNotApplicable(documentComponent) || path.some((p) => this.isNotApplicable(p)), nummer: documentComponent.nummerXml, onDsoAnnotationToggle: () => this.handleAnnotationToggle(documentComponent), onDsoOpenToggle: () => this.handleOpenToggle(documentComponent), onDsoOzonContentAnchorClick: (e) => this.handleOzonContentAnchorClick(e), open: this.isOpen(documentComponent), opschrift: documentComponent.opschrift, type: documentComponent.type, vervallen: documentComponent.vervallen, wijzigactie: documentComponent.wijzigactie, recursiveToggle: this.recursiveToggleState(documentComponent), onDsoRecursiveToggle: (e) => this.handleRecursiveToggle(documentComponent, e.detail) }, this.isOpenedAnnotation(documentComponent) && (h("div", { slot: "annotations" }, h("dso-annotation-locatie", { active: this.isCheckedSlideToggle(documentComponent), "gewijzigde-locatie": true, locatieNoemer: "Winkelgebied", onDsoActiveChange: () => this.handleSelectableChange(documentComponent) }, h("span", { class: "symboolcode", slot: "symbool", "data-symboolcode": "vszt030" })))), this.showContent(documentComponent) && (embeddedDocuments === null || embeddedDocuments === void 0 ? void 0 : embeddedDocuments.documentComponents.length) && (h("ul", { class: "dso-document-component-list" }, embeddedDocuments.documentComponents.map((d) => (h("li", { key: d.documentTechnischId }, h(DocumentComponent, { path: [...path, d] }))))))));
|
|
24
|
+
: this.hasFilteredChildren(documentComponent), genesteOntwerpInformatie: this.hasNestedDraft(documentComponent), gereserveerd: documentComponent.gereserveerd, heading: "h2", inhoud: documentComponent.inhoud, label: documentComponent.labelXml, openAnnotation: this.isOpenedAnnotation(documentComponent), notApplicable: this.isNotApplicable(documentComponent) || path.some((p) => this.isNotApplicable(p)), nummer: documentComponent.nummerXml, onDsoAnnotationToggle: () => this.handleAnnotationToggle(documentComponent), onDsoOpenToggle: () => this.handleOpenToggle(documentComponent), onDsoOzonContentAnchorClick: (e) => this.handleOzonContentAnchorClick(e), open: this.isOpen(documentComponent), opschrift: documentComponent.opschrift, type: documentComponent.type, vervallen: documentComponent.vervallen, wijzigactie: documentComponent.wijzigactie, recursiveToggle: this.recursiveToggleState(documentComponent), onDsoRecursiveToggle: (e) => this.handleRecursiveToggle(documentComponent, e.detail), mode: this.mode, href: this.mode === "table-of-contents" ? "/document/" + documentComponent.documentTechnischId : undefined, onDsoTableOfContentsClick: (e) => this.handleTableOfContentsClick(e) }, this.isOpenedAnnotation(documentComponent) && (h("div", { slot: "annotations" }, h("dso-annotation-locatie", { active: this.isCheckedSlideToggle(documentComponent), "gewijzigde-locatie": true, locatieNoemer: "Winkelgebied", onDsoActiveChange: () => this.handleSelectableChange(documentComponent) }, h("span", { class: "symboolcode", slot: "symbool", "data-symboolcode": "vszt030" })))), this.showContent(documentComponent) && (embeddedDocuments === null || embeddedDocuments === void 0 ? void 0 : embeddedDocuments.documentComponents.length) && (h("ul", { class: "dso-document-component-list" }, embeddedDocuments.documentComponents.map((d) => (h("li", { key: d.documentTechnischId }, h(DocumentComponent, { path: [...path, d] }))))))));
|
|
25
25
|
};
|
|
26
26
|
this.MenuButton = ({ documentComponent }) => {
|
|
27
27
|
const { labelXml, nummerXml, type } = documentComponent;
|
|
@@ -30,6 +30,7 @@ export class DocumentComponentDemo {
|
|
|
30
30
|
this.showCanvas = false;
|
|
31
31
|
this.jsonFile = undefined;
|
|
32
32
|
this.openDefault = false;
|
|
33
|
+
this.mode = "document";
|
|
33
34
|
this.response = undefined;
|
|
34
35
|
this.document = undefined;
|
|
35
36
|
this.openOrClosed = [];
|
|
@@ -121,6 +122,9 @@ export class DocumentComponentDemo {
|
|
|
121
122
|
handleOzonContentAnchorClick(e) {
|
|
122
123
|
this.dsotOzonContentAnchorClick.emit(e.detail);
|
|
123
124
|
}
|
|
125
|
+
handleTableOfContentsClick(e) {
|
|
126
|
+
this.dsotTableOfContentsClick.emit(e.detail);
|
|
127
|
+
}
|
|
124
128
|
isCheckedSlideToggle(documentComponent) {
|
|
125
129
|
return this.activeAnnotationSelectables.includes(documentComponent);
|
|
126
130
|
}
|
|
@@ -170,7 +174,7 @@ export class DocumentComponentDemo {
|
|
|
170
174
|
render() {
|
|
171
175
|
var _a, _b;
|
|
172
176
|
const { DocumentComponent, MenuButton } = this;
|
|
173
|
-
return (h("dso-responsive-element", { key: '
|
|
177
|
+
return (h("dso-responsive-element", { key: 'e8d87d6fb258291450ee5b9ccc781b3bc7ae0d48', class: "dso-document-components" }, h("div", { key: '5338abe33e005cbea80c416c518ebae99b793531', class: "dso-navbar" }, h("ul", { key: 'c5de257adb65448d9ed791571308c5ab27ccc0d0', class: "dso-nav dso-nav-sub" }, (_b = (_a = this.getEmbeddedDocumentComponents(this.response)) === null || _a === void 0 ? void 0 : _a.documentComponents) === null || _b === void 0 ? void 0 : _b.map((d) => (h("li", { class: this.document === d ? "dso-active" : undefined }, h(MenuButton, { documentComponent: d })))))), this.document && h(DocumentComponent, { key: '625663d2be822cea4d3b2d8ab32ec365daa53430', path: [this.document] })));
|
|
174
178
|
}
|
|
175
179
|
static get is() { return "dsot-document-component-demo"; }
|
|
176
180
|
static get encapsulation() { return "scoped"; }
|
|
@@ -238,6 +242,30 @@ export class DocumentComponentDemo {
|
|
|
238
242
|
"attribute": "open-default",
|
|
239
243
|
"reflect": false,
|
|
240
244
|
"defaultValue": "false"
|
|
245
|
+
},
|
|
246
|
+
"mode": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"mutable": false,
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "DocumentComponentMode",
|
|
251
|
+
"resolved": "\"document\" | \"table-of-contents\"",
|
|
252
|
+
"references": {
|
|
253
|
+
"DocumentComponentMode": {
|
|
254
|
+
"location": "import",
|
|
255
|
+
"path": "../document-component/document-component.models",
|
|
256
|
+
"id": "src/components/document-component/document-component.models.ts::DocumentComponentMode"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": false,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [],
|
|
264
|
+
"text": "The mode of the Document Component. One of \"document\" or \"table-of-contents\". Defaults to \"document\""
|
|
265
|
+
},
|
|
266
|
+
"attribute": "mode",
|
|
267
|
+
"reflect": true,
|
|
268
|
+
"defaultValue": "\"document\""
|
|
241
269
|
}
|
|
242
270
|
};
|
|
243
271
|
}
|
|
@@ -274,6 +302,27 @@ export class DocumentComponentDemo {
|
|
|
274
302
|
}
|
|
275
303
|
}
|
|
276
304
|
}
|
|
305
|
+
}, {
|
|
306
|
+
"method": "dsotTableOfContentsClick",
|
|
307
|
+
"name": "dsotTableOfContentsClick",
|
|
308
|
+
"bubbles": false,
|
|
309
|
+
"cancelable": true,
|
|
310
|
+
"composed": true,
|
|
311
|
+
"docs": {
|
|
312
|
+
"tags": [],
|
|
313
|
+
"text": "To demo user interacting the heading in mode=\"table-of-contents\"."
|
|
314
|
+
},
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "DocumentComponentTableOfContentsClickEvent",
|
|
317
|
+
"resolved": "DocumentComponentTableOfContentsClickEvent",
|
|
318
|
+
"references": {
|
|
319
|
+
"DocumentComponentTableOfContentsClickEvent": {
|
|
320
|
+
"location": "import",
|
|
321
|
+
"path": "../document-component/document-component.models",
|
|
322
|
+
"id": "src/components/document-component/document-component.models.ts::DocumentComponentTableOfContentsClickEvent"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
277
326
|
}];
|
|
278
327
|
}
|
|
279
328
|
static get watchers() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-component.demo.js","sourceRoot":"","sources":["../../../../src/components/document-component-demo/document-component.demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,eAAe,CAAC;AAmCnC,MAAM,OAAO,qBAAqB;;QAyNxB,0BAAqB,GAAG,CAC9B,iBAAoC,EACpC,MAA6C,EAC7C,EAAE;YACF,MAAM,iBAAiB,GAAG,IAAI,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,CAAC;YAChF,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YAED,KAAK,MAAM,CAAC,IAAI,iBAAiB,CAAC,kBAAkB,EAAE,CAAC;gBACrD,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CA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CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACjF,UAAI,KAAK,EAAE,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;oBACvD,EAAC,UAAU,IAAC,iBAAiB,EAAE,CAAC,GAAI,CACjC,CACN,CAAC,CACC,CACD;YACL,IAAI,CAAC,QAAQ,IAAI,EAAC,iBAAiB,qDAAC,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAI,CACvC,CAC1B,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BF","sourcesContent":["import { h, Component, ComponentInterface, State, Prop, Watch, Event, EventEmitter, Fragment } from \"@stencil/core\";\r\nimport sampleSize from \"lodash.samplesize\";\r\nimport random from \"lodash.random\";\r\n\r\nimport {\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentRecursiveToggleEvent,\r\n DocumentComponentWijzigactie,\r\n} from \"../document-component/document-component.models\";\r\nimport { DsoDocumentComponentCustomEvent } from \"../../components\";\r\n\r\ninterface DocumentEmbedded {\r\n _embedded?: {\r\n ontwerpTekststructuurDocumentComponenten?: DocumentComponent[];\r\n tekststructuurDocumentComponenten?: DocumentComponent[];\r\n };\r\n}\r\n\r\ninterface DocumentComponent extends DocumentEmbedded {\r\n documentTechnischId: string;\r\n type?: string;\r\n labelXml?: string;\r\n nummerXml?: string;\r\n volgordeNummer: number;\r\n opschrift?: string;\r\n inhoud?: string;\r\n gereserveerd?: boolean;\r\n vervallen?: boolean;\r\n bevatOntwerpInformatie?: boolean;\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n}\r\n\r\n@Component({\r\n tag: \"dsot-document-component-demo\",\r\n scoped: true, // scoped because we are immitating the usage of <dso-document-component> in a page\r\n styleUrl: \"document-component.demo.scss\",\r\n})\r\nexport class DocumentComponentDemo implements ComponentInterface {\r\n /**\r\n * Show canvas to where Document Component extends.\r\n */\r\n @Prop({ reflect: true })\r\n showCanvas = false;\r\n\r\n /**\r\n * Name of the file to load.\r\n */\r\n @Prop()\r\n jsonFile?: string;\r\n\r\n /**\r\n * The default state for all Document Components.\r\n */\r\n @Prop()\r\n openDefault = false;\r\n\r\n /**\r\n * To demo user interacting with IntRef or IntIoRef elements.\r\n */\r\n @Event()\r\n dsotOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n @State()\r\n response?: DocumentEmbedded;\r\n\r\n @State()\r\n document?: DocumentComponent;\r\n\r\n @State()\r\n openOrClosed: DocumentComponent[] = [];\r\n\r\n @State()\r\n openedAnnotation: DocumentComponent[] = [];\r\n\r\n @State()\r\n filtered: DocumentComponent[] = [];\r\n\r\n @State()\r\n notApplicable: DocumentComponent[] = [];\r\n\r\n @State()\r\n activeAnnotationSelectables: DocumentComponent[] = [];\r\n\r\n @Watch(\"jsonFile\")\r\n async jsonFileWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n @Watch(\"openDefault\")\r\n async openDefaultWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n async componentDidLoad(): Promise<void> {\r\n await this.loadData();\r\n }\r\n\r\n private getEmbeddedDocumentComponents(documentEmbedded: DocumentEmbedded | undefined) {\r\n if (documentEmbedded?._embedded?.ontwerpTekststructuurDocumentComponenten) {\r\n return {\r\n documentComponents: documentEmbedded._embedded.ontwerpTekststructuurDocumentComponenten,\r\n ontwerp: true,\r\n };\r\n }\r\n\r\n if (documentEmbedded?._embedded?.tekststructuurDocumentComponenten) {\r\n return {\r\n documentComponents: documentEmbedded._embedded.tekststructuurDocumentComponenten,\r\n ontwerp: false,\r\n };\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private concatEmbeddedDocumentComponents(documentComponent: DocumentComponent): DocumentComponent[] {\r\n const embeddedDocuments = [...(this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents ?? [])];\r\n\r\n for (const d of embeddedDocuments) {\r\n embeddedDocuments.push(...this.concatEmbeddedDocumentComponents(d));\r\n }\r\n\r\n return embeddedDocuments;\r\n }\r\n\r\n private selectRandomDocumentComponents(\r\n documentComponent: DocumentComponent,\r\n exclude: DocumentComponent[] = [],\r\n ): DocumentComponent[] {\r\n const documentComponents = this.concatEmbeddedDocumentComponents(documentComponent).filter(\r\n (d) => !exclude.includes(d),\r\n );\r\n const size = random(0, Math.floor(documentComponents.length / 10));\r\n\r\n return sampleSize(documentComponents, size);\r\n }\r\n\r\n private async loadData() {\r\n if (!this.jsonFile) {\r\n this.response = undefined;\r\n this.document = undefined;\r\n\r\n return;\r\n }\r\n\r\n this.response = await fetch(this.jsonFile).then((r) => r.json());\r\n this.document = this.getEmbeddedDocumentComponents(this.response)?.documentComponents[0];\r\n\r\n if (this.document?.type === \"LICHAAM\") {\r\n this.notApplicable = this.selectRandomDocumentComponents(this.document);\r\n this.filtered = this.selectRandomDocumentComponents(this.document, this.notApplicable);\r\n } else {\r\n this.notApplicable = [];\r\n this.filtered = [];\r\n }\r\n }\r\n\r\n private handleOpenToggle(documentComponent: DocumentComponent, force?: boolean) {\r\n const isOpenOrClosed = typeof force === \"boolean\" ? force : this.openOrClosed.includes(documentComponent);\r\n\r\n if (isOpenOrClosed && this.openOrClosed.includes(documentComponent)) {\r\n this.openOrClosed = this.openOrClosed.filter((d) => d !== documentComponent);\r\n } else if (!isOpenOrClosed && !this.openOrClosed.includes(documentComponent)) {\r\n this.openOrClosed = [...this.openOrClosed, documentComponent];\r\n }\r\n }\r\n\r\n private handleAnnotationToggle(documentComponent: DocumentComponent) {\r\n this.openedAnnotation = this.isOpenedAnnotation(documentComponent)\r\n ? this.openedAnnotation.filter((d) => d !== documentComponent)\r\n : [...this.openedAnnotation, documentComponent];\r\n\r\n if (!this.isOpen(documentComponent)) {\r\n this.openOrClosed = [...this.openOrClosed, documentComponent];\r\n }\r\n }\r\n\r\n private handleSelectableChange(documentComponent: DocumentComponent) {\r\n this.activeAnnotationSelectables = this.isCheckedSlideToggle(documentComponent)\r\n ? this.activeAnnotationSelectables.filter((d) => d !== documentComponent)\r\n : [...this.activeAnnotationSelectables, documentComponent];\r\n }\r\n\r\n private handleOzonContentAnchorClick(\r\n e: DsoDocumentComponentCustomEvent<DocumentComponentOzonContentAnchorClickEvent>,\r\n ) {\r\n this.dsotOzonContentAnchorClick.emit(e.detail);\r\n }\r\n\r\n private isCheckedSlideToggle(documentComponent: DocumentComponent) {\r\n return this.activeAnnotationSelectables.includes(documentComponent);\r\n }\r\n\r\n private hasFilteredChildren(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.filtered.includes(documentComponent) ||\r\n (this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.some((d) =>\r\n this.hasFilteredChildren(d),\r\n ) ??\r\n false)\r\n );\r\n }\r\n\r\n private isOpen(documentComponent: DocumentComponent): boolean {\r\n return documentComponent.type === \"LID\" || this.openDefault\r\n ? !this.openOrClosed.includes(documentComponent)\r\n : this.openOrClosed.includes(documentComponent);\r\n }\r\n\r\n private isOpenedAnnotation(documentComponent: DocumentComponent): boolean {\r\n return this.openedAnnotation.includes(documentComponent);\r\n }\r\n\r\n private isFiltered(documentComponent: DocumentComponent): boolean {\r\n return this.filtered.includes(documentComponent);\r\n }\r\n\r\n private isNotApplicable(documentComponent: DocumentComponent): boolean {\r\n return this.notApplicable.includes(documentComponent);\r\n }\r\n\r\n private hasNestedDraft(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.some(\r\n (d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d),\r\n ) ?? false\r\n );\r\n }\r\n\r\n private showContent(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.isOpen(documentComponent) &&\r\n !!(this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.length || documentComponent.inhoud)\r\n );\r\n }\r\n\r\n private recursiveToggleState(documentComponent: DocumentComponent): undefined | boolean | \"indeterminate\" {\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n\r\n if (\r\n !embeddedDocuments ||\r\n embeddedDocuments.documentComponents.length <= 1 ||\r\n !embeddedDocuments.documentComponents.some((d) => d.type === \"ARTIKEL\")\r\n ) {\r\n return undefined;\r\n }\r\n\r\n return embeddedDocuments.documentComponents.every((d) => this.isOpen(d));\r\n }\r\n\r\n private handleRecursiveToggle = (\r\n documentComponent: DocumentComponent,\r\n detail: DocumentComponentRecursiveToggleEvent,\r\n ) => {\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n if (!embeddedDocuments) {\r\n return;\r\n }\r\n\r\n for (const d of embeddedDocuments.documentComponents) {\r\n this.handleOpenToggle(d, detail.next);\r\n }\r\n };\r\n\r\n private isAnnotated(documentComponent: DocumentComponent): boolean {\r\n return (\r\n documentComponent.type === \"DIVISIE\" ||\r\n documentComponent.type === \"DIVISIETEKST\" ||\r\n documentComponent.type === \"ARTIKEL\" ||\r\n documentComponent.type === \"LID\"\r\n );\r\n }\r\n\r\n private DocumentComponent = ({ path }: DocumentComponentProps) => {\r\n const documentComponent = path.at(-1);\r\n if (!documentComponent) {\r\n return <Fragment />;\r\n }\r\n\r\n const { DocumentComponent } = this;\r\n\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n\r\n return (\r\n <dso-document-component\r\n annotated={this.isAnnotated(documentComponent)}\r\n bevatOntwerpInformatie={!!documentComponent.bevatOntwerpInformatie}\r\n filtered={\r\n this.isOpen(documentComponent)\r\n ? this.isFiltered(documentComponent)\r\n : this.hasFilteredChildren(documentComponent)\r\n }\r\n genesteOntwerpInformatie={this.hasNestedDraft(documentComponent)}\r\n gereserveerd={documentComponent.gereserveerd}\r\n heading=\"h2\"\r\n inhoud={documentComponent.inhoud}\r\n label={documentComponent.labelXml}\r\n openAnnotation={this.isOpenedAnnotation(documentComponent)}\r\n notApplicable={this.isNotApplicable(documentComponent) || path.some((p) => this.isNotApplicable(p))}\r\n nummer={documentComponent.nummerXml}\r\n onDsoAnnotationToggle={() => this.handleAnnotationToggle(documentComponent)}\r\n onDsoOpenToggle={() => this.handleOpenToggle(documentComponent)}\r\n onDsoOzonContentAnchorClick={(e) => this.handleOzonContentAnchorClick(e)}\r\n open={this.isOpen(documentComponent)}\r\n opschrift={documentComponent.opschrift}\r\n type={documentComponent.type}\r\n vervallen={documentComponent.vervallen}\r\n wijzigactie={documentComponent.wijzigactie}\r\n recursiveToggle={this.recursiveToggleState(documentComponent)}\r\n onDsoRecursiveToggle={(e) => this.handleRecursiveToggle(documentComponent, e.detail)}\r\n >\r\n {this.isOpenedAnnotation(documentComponent) && (\r\n <div slot=\"annotations\">\r\n <dso-annotation-locatie\r\n active={this.isCheckedSlideToggle(documentComponent)}\r\n gewijzigde-locatie\r\n locatieNoemer={\"Winkelgebied\"}\r\n onDsoActiveChange={() => this.handleSelectableChange(documentComponent)}\r\n >\r\n <span class=\"symboolcode\" slot=\"symbool\" data-symboolcode=\"vszt030\"></span>\r\n </dso-annotation-locatie>\r\n </div>\r\n )}\r\n {this.showContent(documentComponent) && embeddedDocuments?.documentComponents.length && (\r\n <ul class=\"dso-document-component-list\">\r\n {embeddedDocuments.documentComponents.map((d) => (\r\n <li key={d.documentTechnischId}>\r\n <DocumentComponent path={[...path, d]} />\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n </dso-document-component>\r\n );\r\n };\r\n\r\n render() {\r\n const { DocumentComponent, MenuButton } = this;\r\n\r\n return (\r\n <dso-responsive-element class=\"dso-document-components\">\r\n <div class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-sub\">\r\n {this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((d) => (\r\n <li class={this.document === d ? \"dso-active\" : undefined}>\r\n <MenuButton documentComponent={d} />\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n {this.document && <DocumentComponent path={[this.document]} />}\r\n </dso-responsive-element>\r\n );\r\n }\r\n\r\n private MenuButton = ({ documentComponent }: MenuItemProps) => {\r\n const { labelXml, nummerXml, type } = documentComponent;\r\n\r\n return (\r\n <button type=\"button\" onClick={() => (this.document = documentComponent)}>\r\n {!labelXml && !nummerXml ? (\r\n <span>\r\n <i>{type}</i>\r\n </span>\r\n ) : (\r\n <>\r\n {labelXml && (\r\n <>\r\n <dso-ozon-content content={labelXml} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {nummerXml && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={nummerXml} inline></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n )}\r\n </button>\r\n );\r\n };\r\n}\r\n\r\ninterface MenuItemProps {\r\n documentComponent: DocumentComponent;\r\n}\r\n\r\ninterface DocumentComponentProps {\r\n path: DocumentComponent[];\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"document-component.demo.js","sourceRoot":"","sources":["../../../../src/components/document-component-demo/document-component.demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,eAAe,CAAC;AAsCnC,MAAM,OAAO,qBAAqB;;QAyOxB,0BAAqB,GAAG,CAC9B,iBAAoC,EACpC,MAA6C,EAC7C,EAAE;YACF,MAAM,iBAAiB,GAAG,IAAI,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,CAAC;YAChF,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YAED,KAAK,MAAM,CAAC,IAAI,iBAAiB,CAAC,kBAAkB,EAAE,CAAC;gBACrD,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,IA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;QACtD,OAAO,CACL,iBAAiB,CAAC,IAAI,KAAK,SAAS;YACpC,iBAAiB,CAAC,IAAI,KAAK,cAAc;YACzC,iBAAiB,CAAC,IAAI,KAAK,SAAS;YACpC,iBAAiB,CAAC,IAAI,KAAK,KAAK,CACjC,CAAC;IACJ,CAAC;IAoED,MAAM;;QACJ,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE/C,OAAO,CACL,+EAAwB,KAAK,EAAC,yBAAyB;YACrD,4DAAK,KAAK,EAAC,YAAY;gBACrB,2DAAI,KAAK,EAAC,qBAAqB,IAC5B,MAAA,MAAA,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,QAAQ,CAAC,0CAAE,kBAAkB,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACjF,UAAI,KAAK,EAAE,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;oBACvD,EAAC,UAAU,IAAC,iBAAiB,EAAE,CAAC,GAAI,CACjC,CACN,CAAC,CACC,CACD;YACL,IAAI,CAAC,QAAQ,IAAI,EAAC,iBAAiB,qDAAC,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAI,CACvC,CAC1B,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BF","sourcesContent":["import { h, Component, ComponentInterface, State, Prop, Watch, Event, EventEmitter, Fragment } from \"@stencil/core\";\r\nimport sampleSize from \"lodash.samplesize\";\r\nimport random from \"lodash.random\";\r\n\r\nimport {\r\n DocumentComponentMode,\r\n DocumentComponentOzonContentAnchorClickEvent,\r\n DocumentComponentRecursiveToggleEvent,\r\n DocumentComponentTableOfContentsClickEvent,\r\n DocumentComponentWijzigactie,\r\n} from \"../document-component/document-component.models\";\r\nimport { DsoDocumentComponentCustomEvent } from \"../../components\";\r\n\r\ninterface DocumentEmbedded {\r\n _embedded?: {\r\n ontwerpTekststructuurDocumentComponenten?: DocumentComponent[];\r\n tekststructuurDocumentComponenten?: DocumentComponent[];\r\n };\r\n}\r\n\r\ninterface DocumentComponent extends DocumentEmbedded {\r\n documentTechnischId: string;\r\n type?: string;\r\n labelXml?: string;\r\n nummerXml?: string;\r\n volgordeNummer: number;\r\n opschrift?: string;\r\n inhoud?: string;\r\n gereserveerd?: boolean;\r\n vervallen?: boolean;\r\n bevatOntwerpInformatie?: boolean;\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n mode: DocumentComponentMode;\r\n}\r\n\r\n@Component({\r\n tag: \"dsot-document-component-demo\",\r\n scoped: true, // scoped because we are immitating the usage of <dso-document-component> in a page\r\n styleUrl: \"document-component.demo.scss\",\r\n})\r\nexport class DocumentComponentDemo implements ComponentInterface {\r\n /**\r\n * Show canvas to where Document Component extends.\r\n */\r\n @Prop({ reflect: true })\r\n showCanvas = false;\r\n\r\n /**\r\n * Name of the file to load.\r\n */\r\n @Prop()\r\n jsonFile?: string;\r\n\r\n /**\r\n * The default state for all Document Components.\r\n */\r\n @Prop()\r\n openDefault = false;\r\n\r\n /**\r\n * The mode of the Document Component. One of \"document\" or \"table-of-contents\". Defaults to \"document\"\r\n */\r\n @Prop({ reflect: true })\r\n mode: DocumentComponentMode = \"document\";\r\n\r\n /**\r\n * To demo user interacting with IntRef or IntIoRef elements.\r\n */\r\n @Event()\r\n dsotOzonContentAnchorClick!: EventEmitter<DocumentComponentOzonContentAnchorClickEvent>;\r\n\r\n /**\r\n * To demo user interacting the heading in mode=\"table-of-contents\".\r\n */\r\n @Event({ bubbles: false })\r\n dsotTableOfContentsClick!: EventEmitter<DocumentComponentTableOfContentsClickEvent>;\r\n\r\n @State()\r\n response?: DocumentEmbedded;\r\n\r\n @State()\r\n document?: DocumentComponent;\r\n\r\n @State()\r\n openOrClosed: DocumentComponent[] = [];\r\n\r\n @State()\r\n openedAnnotation: DocumentComponent[] = [];\r\n\r\n @State()\r\n filtered: DocumentComponent[] = [];\r\n\r\n @State()\r\n notApplicable: DocumentComponent[] = [];\r\n\r\n @State()\r\n activeAnnotationSelectables: DocumentComponent[] = [];\r\n\r\n @Watch(\"jsonFile\")\r\n async jsonFileWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n @Watch(\"openDefault\")\r\n async openDefaultWatcher() {\r\n this.openOrClosed = [];\r\n\r\n await this.loadData();\r\n }\r\n\r\n async componentDidLoad(): Promise<void> {\r\n await this.loadData();\r\n }\r\n\r\n private getEmbeddedDocumentComponents(documentEmbedded: DocumentEmbedded | undefined) {\r\n if (documentEmbedded?._embedded?.ontwerpTekststructuurDocumentComponenten) {\r\n return {\r\n documentComponents: documentEmbedded._embedded.ontwerpTekststructuurDocumentComponenten,\r\n ontwerp: true,\r\n };\r\n }\r\n\r\n if (documentEmbedded?._embedded?.tekststructuurDocumentComponenten) {\r\n return {\r\n documentComponents: documentEmbedded._embedded.tekststructuurDocumentComponenten,\r\n ontwerp: false,\r\n };\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private concatEmbeddedDocumentComponents(documentComponent: DocumentComponent): DocumentComponent[] {\r\n const embeddedDocuments = [...(this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents ?? [])];\r\n\r\n for (const d of embeddedDocuments) {\r\n embeddedDocuments.push(...this.concatEmbeddedDocumentComponents(d));\r\n }\r\n\r\n return embeddedDocuments;\r\n }\r\n\r\n private selectRandomDocumentComponents(\r\n documentComponent: DocumentComponent,\r\n exclude: DocumentComponent[] = [],\r\n ): DocumentComponent[] {\r\n const documentComponents = this.concatEmbeddedDocumentComponents(documentComponent).filter(\r\n (d) => !exclude.includes(d),\r\n );\r\n const size = random(0, Math.floor(documentComponents.length / 10));\r\n\r\n return sampleSize(documentComponents, size);\r\n }\r\n\r\n private async loadData() {\r\n if (!this.jsonFile) {\r\n this.response = undefined;\r\n this.document = undefined;\r\n\r\n return;\r\n }\r\n\r\n this.response = await fetch(this.jsonFile).then((r) => r.json());\r\n this.document = this.getEmbeddedDocumentComponents(this.response)?.documentComponents[0];\r\n\r\n if (this.document?.type === \"LICHAAM\") {\r\n this.notApplicable = this.selectRandomDocumentComponents(this.document);\r\n this.filtered = this.selectRandomDocumentComponents(this.document, this.notApplicable);\r\n } else {\r\n this.notApplicable = [];\r\n this.filtered = [];\r\n }\r\n }\r\n\r\n private handleOpenToggle(documentComponent: DocumentComponent, force?: boolean) {\r\n const isOpenOrClosed = typeof force === \"boolean\" ? force : this.openOrClosed.includes(documentComponent);\r\n\r\n if (isOpenOrClosed && this.openOrClosed.includes(documentComponent)) {\r\n this.openOrClosed = this.openOrClosed.filter((d) => d !== documentComponent);\r\n } else if (!isOpenOrClosed && !this.openOrClosed.includes(documentComponent)) {\r\n this.openOrClosed = [...this.openOrClosed, documentComponent];\r\n }\r\n }\r\n\r\n private handleAnnotationToggle(documentComponent: DocumentComponent) {\r\n this.openedAnnotation = this.isOpenedAnnotation(documentComponent)\r\n ? this.openedAnnotation.filter((d) => d !== documentComponent)\r\n : [...this.openedAnnotation, documentComponent];\r\n\r\n if (!this.isOpen(documentComponent)) {\r\n this.openOrClosed = [...this.openOrClosed, documentComponent];\r\n }\r\n }\r\n\r\n private handleSelectableChange(documentComponent: DocumentComponent) {\r\n this.activeAnnotationSelectables = this.isCheckedSlideToggle(documentComponent)\r\n ? this.activeAnnotationSelectables.filter((d) => d !== documentComponent)\r\n : [...this.activeAnnotationSelectables, documentComponent];\r\n }\r\n\r\n private handleOzonContentAnchorClick(\r\n e: DsoDocumentComponentCustomEvent<DocumentComponentOzonContentAnchorClickEvent>,\r\n ) {\r\n this.dsotOzonContentAnchorClick.emit(e.detail);\r\n }\r\n\r\n private handleTableOfContentsClick(e: DsoDocumentComponentCustomEvent<DocumentComponentTableOfContentsClickEvent>) {\r\n this.dsotTableOfContentsClick.emit(e.detail);\r\n }\r\n\r\n private isCheckedSlideToggle(documentComponent: DocumentComponent) {\r\n return this.activeAnnotationSelectables.includes(documentComponent);\r\n }\r\n\r\n private hasFilteredChildren(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.filtered.includes(documentComponent) ||\r\n (this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.some((d) =>\r\n this.hasFilteredChildren(d),\r\n ) ??\r\n false)\r\n );\r\n }\r\n\r\n private isOpen(documentComponent: DocumentComponent): boolean {\r\n return documentComponent.type === \"LID\" || this.openDefault\r\n ? !this.openOrClosed.includes(documentComponent)\r\n : this.openOrClosed.includes(documentComponent);\r\n }\r\n\r\n private isOpenedAnnotation(documentComponent: DocumentComponent): boolean {\r\n return this.openedAnnotation.includes(documentComponent);\r\n }\r\n\r\n private isFiltered(documentComponent: DocumentComponent): boolean {\r\n return this.filtered.includes(documentComponent);\r\n }\r\n\r\n private isNotApplicable(documentComponent: DocumentComponent): boolean {\r\n return this.notApplicable.includes(documentComponent);\r\n }\r\n\r\n private hasNestedDraft(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.some(\r\n (d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d),\r\n ) ?? false\r\n );\r\n }\r\n\r\n private showContent(documentComponent: DocumentComponent): boolean {\r\n return (\r\n this.isOpen(documentComponent) &&\r\n !!(this.getEmbeddedDocumentComponents(documentComponent)?.documentComponents.length || documentComponent.inhoud)\r\n );\r\n }\r\n\r\n private recursiveToggleState(documentComponent: DocumentComponent): undefined | boolean | \"indeterminate\" {\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n\r\n if (\r\n !embeddedDocuments ||\r\n embeddedDocuments.documentComponents.length <= 1 ||\r\n !embeddedDocuments.documentComponents.some((d) => d.type === \"ARTIKEL\")\r\n ) {\r\n return undefined;\r\n }\r\n\r\n return embeddedDocuments.documentComponents.every((d) => this.isOpen(d));\r\n }\r\n\r\n private handleRecursiveToggle = (\r\n documentComponent: DocumentComponent,\r\n detail: DocumentComponentRecursiveToggleEvent,\r\n ) => {\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n if (!embeddedDocuments) {\r\n return;\r\n }\r\n\r\n for (const d of embeddedDocuments.documentComponents) {\r\n this.handleOpenToggle(d, detail.next);\r\n }\r\n };\r\n\r\n private isAnnotated(documentComponent: DocumentComponent): boolean {\r\n return (\r\n documentComponent.type === \"DIVISIE\" ||\r\n documentComponent.type === \"DIVISIETEKST\" ||\r\n documentComponent.type === \"ARTIKEL\" ||\r\n documentComponent.type === \"LID\"\r\n );\r\n }\r\n\r\n private DocumentComponent = ({ path }: DocumentComponentProps) => {\r\n const documentComponent = path.at(-1);\r\n if (!documentComponent || (this.mode === \"table-of-contents\" && documentComponent.type === \"LID\")) {\r\n return <Fragment />;\r\n }\r\n\r\n const { DocumentComponent } = this;\r\n\r\n const embeddedDocuments = this.getEmbeddedDocumentComponents(documentComponent);\r\n\r\n return (\r\n <dso-document-component\r\n annotated={this.isAnnotated(documentComponent)}\r\n bevatOntwerpInformatie={!!documentComponent.bevatOntwerpInformatie}\r\n filtered={\r\n this.isOpen(documentComponent)\r\n ? this.isFiltered(documentComponent)\r\n : this.hasFilteredChildren(documentComponent)\r\n }\r\n genesteOntwerpInformatie={this.hasNestedDraft(documentComponent)}\r\n gereserveerd={documentComponent.gereserveerd}\r\n heading=\"h2\"\r\n inhoud={documentComponent.inhoud}\r\n label={documentComponent.labelXml}\r\n openAnnotation={this.isOpenedAnnotation(documentComponent)}\r\n notApplicable={this.isNotApplicable(documentComponent) || path.some((p) => this.isNotApplicable(p))}\r\n nummer={documentComponent.nummerXml}\r\n onDsoAnnotationToggle={() => this.handleAnnotationToggle(documentComponent)}\r\n onDsoOpenToggle={() => this.handleOpenToggle(documentComponent)}\r\n onDsoOzonContentAnchorClick={(e) => this.handleOzonContentAnchorClick(e)}\r\n open={this.isOpen(documentComponent)}\r\n opschrift={documentComponent.opschrift}\r\n type={documentComponent.type}\r\n vervallen={documentComponent.vervallen}\r\n wijzigactie={documentComponent.wijzigactie}\r\n recursiveToggle={this.recursiveToggleState(documentComponent)}\r\n onDsoRecursiveToggle={(e) => this.handleRecursiveToggle(documentComponent, e.detail)}\r\n mode={this.mode}\r\n href={this.mode === \"table-of-contents\" ? \"/document/\" + documentComponent.documentTechnischId : undefined}\r\n onDsoTableOfContentsClick={(e) => this.handleTableOfContentsClick(e)}\r\n >\r\n {this.isOpenedAnnotation(documentComponent) && (\r\n <div slot=\"annotations\">\r\n <dso-annotation-locatie\r\n active={this.isCheckedSlideToggle(documentComponent)}\r\n gewijzigde-locatie\r\n locatieNoemer={\"Winkelgebied\"}\r\n onDsoActiveChange={() => this.handleSelectableChange(documentComponent)}\r\n >\r\n <span class=\"symboolcode\" slot=\"symbool\" data-symboolcode=\"vszt030\"></span>\r\n </dso-annotation-locatie>\r\n </div>\r\n )}\r\n {this.showContent(documentComponent) && embeddedDocuments?.documentComponents.length && (\r\n <ul class=\"dso-document-component-list\">\r\n {embeddedDocuments.documentComponents.map((d) => (\r\n <li key={d.documentTechnischId}>\r\n <DocumentComponent path={[...path, d]} />\r\n </li>\r\n ))}\r\n </ul>\r\n )}\r\n </dso-document-component>\r\n );\r\n };\r\n\r\n render() {\r\n const { DocumentComponent, MenuButton } = this;\r\n\r\n return (\r\n <dso-responsive-element class=\"dso-document-components\">\r\n <div class=\"dso-navbar\">\r\n <ul class=\"dso-nav dso-nav-sub\">\r\n {this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((d) => (\r\n <li class={this.document === d ? \"dso-active\" : undefined}>\r\n <MenuButton documentComponent={d} />\r\n </li>\r\n ))}\r\n </ul>\r\n </div>\r\n {this.document && <DocumentComponent path={[this.document]} />}\r\n </dso-responsive-element>\r\n );\r\n }\r\n\r\n private MenuButton = ({ documentComponent }: MenuItemProps) => {\r\n const { labelXml, nummerXml, type } = documentComponent;\r\n\r\n return (\r\n <button type=\"button\" onClick={() => (this.document = documentComponent)}>\r\n {!labelXml && !nummerXml ? (\r\n <span>\r\n <i>{type}</i>\r\n </span>\r\n ) : (\r\n <>\r\n {labelXml && (\r\n <>\r\n <dso-ozon-content content={labelXml} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {nummerXml && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={nummerXml} inline></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n )}\r\n </button>\r\n );\r\n };\r\n}\r\n\r\ninterface MenuItemProps {\r\n documentComponent: DocumentComponent;\r\n}\r\n\r\ninterface DocumentComponentProps {\r\n path: DocumentComponent[];\r\n}\r\n"]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
*,
|
|
2
|
-
*::after,
|
|
3
|
-
*::before {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
:host {
|
|
8
2
|
display: block;
|
|
9
3
|
}
|
|
@@ -44,25 +38,10 @@
|
|
|
44
38
|
.dso-header-session .login .dso-tertiary,
|
|
45
39
|
.dso-header-session .logout .dso-tertiary,
|
|
46
40
|
.dso-header-session .help .dso-tertiary {
|
|
47
|
-
display: flex;
|
|
48
|
-
gap: 0.5rem;
|
|
49
41
|
cursor: pointer;
|
|
50
|
-
border: 0;
|
|
51
|
-
background-color: transparent;
|
|
52
|
-
padding-inline-start: 0;
|
|
53
|
-
outline-offset: 2px;
|
|
54
42
|
font-family: Asap, sans-serif;
|
|
55
|
-
color: #39870c;
|
|
56
|
-
font-size: 1rem;
|
|
57
43
|
font-weight: 600;
|
|
58
44
|
line-height: 1.5;
|
|
59
|
-
text-decoration: none;
|
|
60
|
-
}
|
|
61
|
-
.dso-header-session .profile .dso-tertiary:hover,
|
|
62
|
-
.dso-header-session .login .dso-tertiary:hover,
|
|
63
|
-
.dso-header-session .logout .dso-tertiary:hover,
|
|
64
|
-
.dso-header-session .help .dso-tertiary:hover {
|
|
65
|
-
text-decoration: underline;
|
|
66
45
|
}
|
|
67
46
|
.dso-header-session .profile {
|
|
68
47
|
margin-inline-start: 8px;
|
|
@@ -81,118 +60,21 @@
|
|
|
81
60
|
.dso-navbar {
|
|
82
61
|
flex-basis: 100%;
|
|
83
62
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
dso-dropdown-menu > .dso-primary,
|
|
87
|
-
dso-dropdown-menu > .dso-secondary,
|
|
88
|
-
dso-dropdown-menu > .dso-tertiary {
|
|
89
|
-
position: relative;
|
|
90
|
-
}
|
|
91
|
-
dso-dropdown-menu > button:not(.dso-primary):not(.dso-secondary):not(.dso-tertiary)::after,
|
|
92
|
-
dso-dropdown-menu > .dso-primary::after,
|
|
93
|
-
dso-dropdown-menu > .dso-secondary::after,
|
|
94
|
-
dso-dropdown-menu > .dso-tertiary::after {
|
|
95
|
-
content: "";
|
|
96
|
-
display: inline-block;
|
|
97
|
-
}
|
|
98
|
-
dso-dropdown-menu > .dso-primary::after,
|
|
99
|
-
dso-dropdown-menu > .dso-secondary::after {
|
|
100
|
-
margin-inline-start: 8px;
|
|
101
|
-
}
|
|
102
|
-
dso-dropdown-menu .dso-group-label {
|
|
103
|
-
color: #999;
|
|
104
|
-
font-size: 0.875em;
|
|
105
|
-
font-weight: 400;
|
|
106
|
-
margin: 0;
|
|
107
|
-
padding-block: 4px 2px;
|
|
108
|
-
padding-inline: 20px;
|
|
109
|
-
text-transform: uppercase;
|
|
110
|
-
}
|
|
111
|
-
dso-dropdown-menu ul {
|
|
112
|
-
margin: 0;
|
|
113
|
-
padding: 0;
|
|
114
|
-
}
|
|
115
|
-
dso-dropdown-menu ul:not(:last-child) {
|
|
116
|
-
border-block-end: 1px solid #e5e5e5;
|
|
117
|
-
margin-block-end: 11px;
|
|
118
|
-
padding-block-end: 11px;
|
|
119
|
-
}
|
|
120
|
-
dso-dropdown-menu .dso-dropdown-options {
|
|
121
|
-
background-clip: padding-box;
|
|
122
|
-
background-color: #fff;
|
|
123
|
-
border-radius: 4px;
|
|
124
|
-
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
125
|
-
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4);
|
|
126
|
-
font-size: 1rem;
|
|
127
|
-
min-inline-size: 160px;
|
|
128
|
-
padding-block: 5px;
|
|
129
|
-
padding-inline: 0;
|
|
130
|
-
z-index: 220;
|
|
131
|
-
}
|
|
132
|
-
dso-dropdown-menu .dso-dropdown-options li {
|
|
133
|
-
list-style: none;
|
|
134
|
-
}
|
|
135
|
-
dso-dropdown-menu .dso-dropdown-options li a:visited {
|
|
136
|
-
color: #191919;
|
|
137
|
-
}
|
|
138
|
-
dso-dropdown-menu .dso-dropdown-options li a,
|
|
139
|
-
dso-dropdown-menu .dso-dropdown-options li button {
|
|
140
|
-
text-decoration: none;
|
|
141
|
-
}
|
|
142
|
-
dso-dropdown-menu .dso-dropdown-options li a:hover, dso-dropdown-menu .dso-dropdown-options li a:focus-visible, dso-dropdown-menu .dso-dropdown-options li a:active,
|
|
143
|
-
dso-dropdown-menu .dso-dropdown-options li button:hover,
|
|
144
|
-
dso-dropdown-menu .dso-dropdown-options li button:focus-visible,
|
|
145
|
-
dso-dropdown-menu .dso-dropdown-options li button:active {
|
|
146
|
-
text-decoration: underline;
|
|
147
|
-
}
|
|
148
|
-
dso-dropdown-menu .dso-dropdown-options li a,
|
|
149
|
-
dso-dropdown-menu .dso-dropdown-options li button {
|
|
150
|
-
clear: both;
|
|
151
|
-
color: #191919;
|
|
152
|
-
display: block;
|
|
153
|
-
font-weight: 400;
|
|
154
|
-
line-height: 1.5;
|
|
155
|
-
padding-block: 3px;
|
|
156
|
-
padding-inline: 20px;
|
|
157
|
-
text-decoration: none;
|
|
158
|
-
white-space: nowrap;
|
|
159
|
-
}
|
|
160
|
-
dso-dropdown-menu .dso-dropdown-options li a:hover, dso-dropdown-menu .dso-dropdown-options li a:focus,
|
|
161
|
-
dso-dropdown-menu .dso-dropdown-options li button:hover,
|
|
162
|
-
dso-dropdown-menu .dso-dropdown-options li button:focus {
|
|
163
|
-
background-color: #39870c;
|
|
164
|
-
border-color: #39870c;
|
|
165
|
-
color: #fff;
|
|
166
|
-
text-decoration: none;
|
|
167
|
-
}
|
|
168
|
-
dso-dropdown-menu .dso-dropdown-options li button {
|
|
169
|
-
background-color: transparent;
|
|
170
|
-
border: 0;
|
|
171
|
-
border-radius: 0;
|
|
172
|
-
text-align: inherit;
|
|
173
|
-
inline-size: 100%;
|
|
63
|
+
.dso-navbar .dso-dropdown-options {
|
|
64
|
+
border-block-start: 1px solid #ccc;
|
|
174
65
|
}
|
|
66
|
+
|
|
175
67
|
dso-dropdown-menu button {
|
|
68
|
+
align-items: center;
|
|
176
69
|
background-color: transparent;
|
|
177
70
|
border: 0;
|
|
178
71
|
display: flex;
|
|
179
72
|
font-family: Asap, sans-serif;
|
|
180
|
-
|
|
181
|
-
position: relative;
|
|
182
|
-
}
|
|
183
|
-
dso-dropdown-menu button dso-icon {
|
|
184
|
-
inline-size: 24px;
|
|
185
|
-
block-size: 24px;
|
|
186
|
-
margin-inline-start: 8px;
|
|
187
|
-
padding-block-start: 2px;
|
|
188
|
-
}
|
|
189
|
-
dso-dropdown-menu button[aria-expanded=true] dso-icon {
|
|
190
|
-
transform: rotate(180deg);
|
|
73
|
+
padding-inline-end: 32px;
|
|
191
74
|
}
|
|
192
75
|
dso-dropdown-menu .dso-dropdown-options {
|
|
193
76
|
border: 0;
|
|
194
77
|
border-radius: 0;
|
|
195
|
-
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4);
|
|
196
78
|
}
|
|
197
79
|
@media screen and (min-width: 768px) {
|
|
198
80
|
dso-dropdown-menu .dso-dropdown-options {
|
|
@@ -204,23 +86,15 @@ dso-dropdown-menu .dso-dropdown-options {
|
|
|
204
86
|
inline-size: 100%;
|
|
205
87
|
}
|
|
206
88
|
}
|
|
207
|
-
dso-dropdown-menu .dso-dropdown-options ul {
|
|
208
|
-
margin: 0;
|
|
209
|
-
padding: 0;
|
|
210
|
-
list-style: none;
|
|
211
|
-
}
|
|
212
89
|
dso-dropdown-menu .dso-dropdown-options ul li a,
|
|
213
90
|
dso-dropdown-menu .dso-dropdown-options ul li button {
|
|
214
|
-
display: block;
|
|
215
|
-
padding: 16px;
|
|
216
91
|
color: #275937;
|
|
217
92
|
font-size: 1.25rem;
|
|
93
|
+
padding: 16px;
|
|
218
94
|
white-space: pre-wrap;
|
|
219
|
-
text-decoration: none;
|
|
220
95
|
}
|
|
221
|
-
dso-dropdown-menu .dso-dropdown-options ul li a:focus
|
|
222
|
-
dso-dropdown-menu .dso-dropdown-options ul li button:focus
|
|
223
|
-
background-color: #39870c;
|
|
96
|
+
dso-dropdown-menu .dso-dropdown-options ul li a:focus,
|
|
97
|
+
dso-dropdown-menu .dso-dropdown-options ul li button:focus {
|
|
224
98
|
color: #fff;
|
|
225
99
|
}
|
|
226
100
|
dso-dropdown-menu .dso-dropdown-options ul li a:hover,
|
|
@@ -229,13 +103,6 @@ dso-dropdown-menu .dso-dropdown-options ul li button:hover {
|
|
|
229
103
|
color: #275937;
|
|
230
104
|
text-decoration: underline;
|
|
231
105
|
}
|
|
232
|
-
dso-dropdown-menu .dso-dropdown-options ul li button {
|
|
233
|
-
inline-size: 100%;
|
|
234
|
-
text-align: start;
|
|
235
|
-
}
|
|
236
|
-
dso-dropdown-menu .dso-dropdown-options ul li button dso-icon {
|
|
237
|
-
margin-inline-start: 8px;
|
|
238
|
-
}
|
|
239
106
|
dso-dropdown-menu .dso-dropdown-options ul li.dso-active a {
|
|
240
107
|
font-weight: 600;
|
|
241
108
|
}
|
|
@@ -254,7 +121,6 @@ dso-dropdown-menu .dso-dropdown-options ul li + li {
|
|
|
254
121
|
.dropdown dso-dropdown-menu .dso-dropdown-options {
|
|
255
122
|
inset-inline-end: 0;
|
|
256
123
|
inset-block-start: 100%;
|
|
257
|
-
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.4);
|
|
258
124
|
}
|
|
259
125
|
.dropdown dso-dropdown-menu > button {
|
|
260
126
|
color: #39870c;
|
|
@@ -325,8 +191,9 @@ dso-dropdown-menu .dso-dropdown-options ul li + li {
|
|
|
325
191
|
margin-block-start: 8px;
|
|
326
192
|
padding-block: 16px;
|
|
327
193
|
padding-inline: 0;
|
|
328
|
-
align-items:
|
|
194
|
+
align-items: center;
|
|
329
195
|
color: #275937;
|
|
196
|
+
padding-inline-end: 32px;
|
|
330
197
|
}
|
|
331
198
|
.dso-nav.dso-nav-main dso-dropdown-menu button:hover, .dso-nav.dso-nav-main dso-dropdown-menu button:active {
|
|
332
199
|
cursor: pointer;
|
|
@@ -117,16 +117,16 @@ export class Header {
|
|
|
117
117
|
["use-drop-down"]: this.showDropDown,
|
|
118
118
|
}), ref: (element) => (this.wrapper = element) }, h("div", { class: "logo-container" }, h("slot", { name: "logo" })), this.showDropDown &&
|
|
119
119
|
this.mainMenu &&
|
|
120
|
-
(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, this.text("menu"))
|
|
120
|
+
(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, this.text("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 }) }, this.text("userHome")))), 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 }) }, this.text("login"))) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, this.text("login"))))), this.authStatus === "loggedIn" && (h("li", null, this.logoutUrl ? (h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, this.text("logout"))) : (h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, this.text("logout"))))), 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, this.text("help")), h("dso-icon", { icon: "help" }))) : (h("button", { type: "button", class: "dso-tertiary", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, this.text("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 }) }, this.text("login"))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "login") }, this.text("login"))))), 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 }) }, this.text("logout"))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "logout") }, this.text("logout"))))), 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, this.text("help")), h("dso-icon", { icon: "help" }))) : (h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "help") }, h("span", null, this.text("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 &&
|
|
121
121
|
this.mainMenu
|
|
122
122
|
.filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)
|
|
123
|
-
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { placement: "bottom" }, h("button", { type: "button", slot: "toggle" }, h("span", null, this.text("overflowMenu"))
|
|
123
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { placement: "bottom" }, h("button", { type: "button", slot: "toggle" }, h("span", null, this.text("overflowMenu"))), h("div", { class: "dso-dropdown-options" }, h("ul", null, this.mainMenu &&
|
|
124
124
|
this.mainMenu
|
|
125
125
|
.filter((_, index) => this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems)
|
|
126
126
|
.map(this.MenuItem)))))), this.userHomeUrl && (h("li", { class: clsx("menu-user-home", { "dso-active": this.userHomeActive }) }, h("a", { href: this.userHomeUrl, "aria-current": this.userHomeActive ? "page" : undefined, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, h("dso-icon", { icon: "user-line" }), this.text("userHome"))))))))))));
|
|
127
127
|
}
|
|
128
128
|
static get is() { return "dso-header"; }
|
|
129
|
-
static get encapsulation() { return "
|
|
129
|
+
static get encapsulation() { return "scoped"; }
|
|
130
130
|
static get originalStyleUrls() {
|
|
131
131
|
return {
|
|
132
132
|
"$": ["header.scss"]
|