@dso-toolkit/core 90.1.0 → 90.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/dso-accordion-section.js +3 -3
- package/dist/bundle/dso-advanced-select.js +4 -4
- package/dist/bundle/dso-annotation-activiteit.js +3 -3
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +3 -3
- package/dist/bundle/dso-annotation-kaart.js +1 -1
- package/dist/bundle/dso-annotation-locatie.js +1 -1
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +3 -3
- package/dist/bundle/dso-autosuggest.js +2 -2
- package/dist/bundle/dso-badge.js +1 -1
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-info-button.js +1 -1
- package/dist/bundle/dso-label.js +1 -1
- package/dist/bundle/dso-legend-item.js +3 -3
- package/dist/bundle/dso-legend.js +1 -1
- package/dist/bundle/dso-list-button.js +3 -3
- package/dist/bundle/dso-map-base-layers.js +3 -3
- package/dist/bundle/dso-map-controls.js +1 -1
- package/dist/bundle/dso-map-layer-object.js +6 -4
- package/dist/bundle/dso-map-layer.js +7 -6
- package/dist/bundle/dso-map-message.js +2 -2
- package/dist/bundle/dso-map-overlays.js +4 -4
- package/dist/bundle/dso-mark-bar.js +1 -1
- package/dist/bundle/dso-modal.js +2 -2
- package/dist/bundle/dso-onboarding-tip.js +1 -1
- package/dist/bundle/dso-ozon-content-toggletip.js +1 -1
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-pagination.js +1 -1
- package/dist/bundle/dso-panel.js +1 -1
- package/dist/bundle/dso-plekinfo-card.js +2 -10
- package/dist/bundle/dso-progress-indicator.js +1 -1
- package/dist/bundle/dso-project-item.js +3 -3
- package/dist/bundle/dso-responsive-element.js +1 -1
- package/dist/bundle/dso-scrollable.js +1 -1
- package/dist/bundle/dso-segmented-button.js +1 -1
- package/dist/bundle/dso-selectable.js +1 -1
- package/dist/bundle/dso-skiplink.js +1 -1
- package/dist/bundle/dso-slide-toggle.js +1 -1
- package/dist/bundle/dso-survey-rating.js +3 -3
- package/dist/bundle/dso-table.js +1 -1
- package/dist/bundle/dso-tabs.js +1 -1
- package/dist/bundle/dso-tijdreis-banner.js +1 -1
- package/dist/bundle/dso-toggletip.js +4 -4
- package/dist/bundle/dso-tooltip.js +1 -1
- package/dist/bundle/dso-tree-view.js +2 -2
- package/dist/bundle/dso-viewer-grid.js +1 -1
- package/dist/bundle/dsot-document-component-demo.js +19 -18
- package/dist/bundle/{p-ChGqsk4J.js → p-B09PltTN.js} +1 -1
- package/dist/bundle/{p-BA6Zh1WC.js → p-BNIsduz8.js} +3 -3
- package/dist/bundle/{p-rZqcedsG.js → p-BmmH_eu_.js} +37 -15
- package/dist/bundle/{p-l1oPLtTA.js → p-BtoSFmxi.js} +2 -3
- package/dist/bundle/{p-DBac7-7I.js → p-CIaQxmqO.js} +1 -1
- package/dist/bundle/{p-Chf3HmLn.js → p-CVb-Vo71.js} +1 -1
- package/dist/bundle/{p-DLUMPN56.js → p-Cv4NtJR0.js} +1 -1
- package/dist/bundle/{p-D9E0ZanO.js → p-CxUu0O7_.js} +2 -2
- package/dist/bundle/{p-Bq2niFBm.js → p-DU-jWPQj.js} +1 -1
- package/dist/bundle/p-DVa4-JLn.js +16 -0
- package/dist/bundle/{p--n40ToSQ.js → p-DfR9IgAn.js} +3 -3
- package/dist/bundle/{p-CWFylPeK.js → p-S5dgiDyu.js} +2 -2
- package/dist/bundle/{p-BhAymLK3.js → p-YQatg-S9.js} +5 -14
- package/dist/bundle/{p-BzzKsKZJ.js → p-jCIJm9RS.js} +1 -1
- package/dist/bundle/{p-DAOlzH7s.js → p-nkfcrXkM.js} +1 -1
- package/dist/bundle/{p-D0_f_ziF.js → p-ntyBxyGu.js} +1 -1
- package/dist/cjs/dso-alert_7.cjs.entry.js +16 -25
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +29 -7
- package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-label_3.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-layer-object.cjs.entry.js +3 -2
- package/dist/cjs/dso-map-layer.cjs.entry.js +3 -2
- package/dist/cjs/dso-map-message.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-mark-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +1 -1
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js +1 -1
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js +2 -10
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-project-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +2 -2
- package/dist/cjs/dso-segmented-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-skiplink.cjs.entry.js +1 -1
- package/dist/cjs/dso-survey-rating.cjs.entry.js +2 -2
- package/dist/cjs/dso-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dso-tijdreis-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +7 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/wrap-wijzigactie.functional-component-BNrVU6nv.js +18 -0
- package/dist/collection/components/document-component/document-component.js +31 -9
- package/dist/collection/components/document-component-demo/document-component.demo.js +7 -6
- package/dist/collection/components/map-layer/components/map-layer-object.css +99 -15
- package/dist/collection/components/map-layer/components/map-layer-object.js +29 -1
- package/dist/collection/components/map-layer/map-layer.css +90 -10
- package/dist/collection/components/map-layer/map-layer.js +31 -21
- package/dist/collection/components/map-message/map-message.js +2 -2
- package/dist/collection/components/map-overlays/map-overlays.js +1 -1
- package/dist/collection/components/mark-bar/mark-bar.js +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.js +1 -1
- package/dist/collection/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.css +4 -9
- package/dist/collection/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.js +1 -1
- package/dist/collection/components/ozon-content/nodes/al.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/begrip.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/begrippenlijst.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/kop.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/lijst.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js +1 -1
- package/dist/collection/components/ozon-content/ozon-content.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/plekinfo-card/plekinfo-card.js +7 -15
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/project-item/project-item.js +1 -1
- package/dist/collection/components/responsive-element/responsive-element.js +1 -1
- package/dist/collection/components/scrollable/scrollable.js +2 -2
- package/dist/collection/components/segmented-button/segmented-button.js +2 -2
- package/dist/collection/components/selectable/selectable.js +1 -1
- package/dist/collection/components/skiplink/skiplink.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js +1 -1
- package/dist/collection/components/survey-rating/survey-rating.js +2 -2
- package/dist/collection/components/table/table.js +2 -3
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tijdreis-banner/tijdreis-banner.js +1 -1
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/collection/functional-components/wrap-wijzigactie/wrap-wijzigactie.functional-component.js +13 -0
- package/dist/components/document-component.js +1 -1
- package/dist/components/dso-map-layer-object.js +1 -1
- package/dist/components/dso-map-layer.js +1 -1
- package/dist/components/dso-map-message.js +1 -1
- package/dist/components/dso-map-overlays.js +1 -1
- package/dist/components/dso-mark-bar.js +1 -1
- package/dist/components/dso-modal.js +1 -1
- package/dist/components/dso-onboarding-tip.js +1 -1
- package/dist/components/dso-plekinfo-card.js +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-segmented-button.js +1 -1
- package/dist/components/dso-skiplink.js +1 -1
- package/dist/components/dso-survey-rating.js +1 -1
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tijdreis-banner.js +1 -1
- package/dist/components/dso-toggletip.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dsot-document-component-demo.js +1 -1
- package/dist/components/ozon-content-toggletip.js +1 -1
- package/dist/components/ozon-content.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/progress-indicator.js +1 -1
- package/dist/components/responsive-element.js +1 -1
- package/dist/components/scrollable.js +1 -1
- package/dist/components/selectable.js +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/wrap-wijzigactie.functional-component.js +1 -0
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-05e7c356.entry.js +1 -0
- package/dist/dso-toolkit/{p-7c6e1f22.entry.js → p-0bbe5de0.entry.js} +1 -1
- package/dist/dso-toolkit/{p-d8a6007b.entry.js → p-0d296ef0.entry.js} +1 -1
- package/dist/dso-toolkit/p-1db16e23.entry.js +1 -0
- package/dist/dso-toolkit/{p-d831c95a.entry.js → p-2c4eb07e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-046d345e.entry.js → p-2d950317.entry.js} +1 -1
- package/dist/dso-toolkit/{p-810c1d07.entry.js → p-3290cf30.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a25435fc.entry.js → p-35c8afb5.entry.js} +1 -1
- package/dist/dso-toolkit/{p-df8e58cb.entry.js → p-36e813f9.entry.js} +1 -1
- package/dist/dso-toolkit/{p-39663446.entry.js → p-453c359e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4cdcaba3.entry.js → p-4c305060.entry.js} +1 -1
- package/dist/dso-toolkit/p-55a2d0ce.entry.js +1 -0
- package/dist/dso-toolkit/{p-f4fc6fe4.entry.js → p-747e0b01.entry.js} +1 -1
- package/dist/dso-toolkit/{p-9b29129c.entry.js → p-7b2ac6ae.entry.js} +1 -1
- package/dist/dso-toolkit/{p-644d47f9.entry.js → p-7c74a079.entry.js} +1 -1
- package/dist/dso-toolkit/p-Dmt6eQ2x.js +1 -0
- package/dist/dso-toolkit/p-a2bbe083.entry.js +1 -0
- package/dist/dso-toolkit/{p-cfcc5b29.entry.js → p-a90e1620.entry.js} +1 -1
- package/dist/dso-toolkit/{p-679ddcde.entry.js → p-ac6825b5.entry.js} +1 -1
- package/dist/dso-toolkit/{p-be08cb19.entry.js → p-c52616a2.entry.js} +1 -1
- package/dist/dso-toolkit/p-c5766326.entry.js +1 -0
- package/dist/dso-toolkit/{p-fc2b2c86.entry.js → p-d819289c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a3175e48.entry.js → p-e1dca044.entry.js} +1 -1
- package/dist/dso-toolkit/p-e47f6979.entry.js +1 -0
- package/dist/dso-toolkit/p-ec04f087.entry.js +1 -0
- package/dist/dso-toolkit/{p-94924839.entry.js → p-f09a941a.entry.js} +1 -1
- package/dist/dso-toolkit/p-f5348bf8.entry.js +1 -0
- package/dist/esm/dso-alert_7.entry.js +7 -16
- package/dist/esm/dso-annotation-locatie_2.entry.js +29 -7
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-label_3.entry.js +1 -1
- package/dist/esm/dso-map-layer-object.entry.js +3 -2
- package/dist/esm/dso-map-layer.entry.js +4 -3
- package/dist/esm/dso-map-message.entry.js +2 -2
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-mark-bar.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-onboarding-tip.entry.js +1 -1
- package/dist/esm/dso-plekinfo-card.entry.js +2 -10
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-project-item.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js +2 -2
- package/dist/esm/dso-segmented-button.entry.js +1 -1
- package/dist/esm/dso-skiplink.entry.js +1 -1
- package/dist/esm/dso-survey-rating.entry.js +2 -2
- package/dist/esm/dso-tabs.entry.js +1 -1
- package/dist/esm/dso-tijdreis-banner.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +7 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/wrap-wijzigactie.functional-component-DDktk4pu.js +16 -0
- package/dist/types/components/document-component/document-component.d.ts +4 -2
- package/dist/types/components/document-component/document-component.interfaces.d.ts +3 -0
- package/dist/types/components/map-layer/components/map-layer-object.d.ts +6 -0
- package/dist/types/components/map-layer/map-layer.d.ts +7 -4
- package/dist/types/components/ozon-content/nodes/table.node/table-cell.d.ts +2 -2
- package/dist/types/components/plekinfo-card/plekinfo-card.d.ts +3 -2
- package/dist/types/components/plekinfo-card/plekinfo-card.interfaces.d.ts +0 -1
- package/dist/types/components/segmented-button/segmented-button.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +0 -1
- package/dist/types/components.d.ts +29 -18
- package/dist/types/functional-components/wrap-wijzigactie/wrap-wijzigactie.functional-component.d.ts +7 -0
- package/package.json +3 -3
- package/dist/collection/components/ozon-content/functional-components/wrap-wijzigactie.functional-component.js +0 -10
- package/dist/dso-toolkit/p-00e1ac4c.entry.js +0 -1
- package/dist/dso-toolkit/p-028df884.entry.js +0 -1
- package/dist/dso-toolkit/p-41769318.entry.js +0 -1
- package/dist/dso-toolkit/p-43fb6780.entry.js +0 -1
- package/dist/dso-toolkit/p-49845201.entry.js +0 -1
- package/dist/dso-toolkit/p-7e82657e.entry.js +0 -1
- package/dist/dso-toolkit/p-82ec94ae.entry.js +0 -1
- package/dist/dso-toolkit/p-e0a6d9da.entry.js +0 -1
- package/dist/types/components/ozon-content/functional-components/wrap-wijzigactie.functional-component.d.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,Fragment as n,proxyCustomElement as i,HTMLElement as t,createEvent as a,transformTag as o}from"@stencil/core/internal/client";import{c as s}from"./clsx.js";import{d as l}from"./index2.js";const r=["search","map","document"],d={map:"Kaart",document:"Document",search:"Zoeken"},c={small:"smal",medium:"middel",large:"breed"},p=({className:n,onClick:i,label:t,icon:a})=>e("dso-icon-button",{variant:"map",class:n,onDsoClick:i,icon:a,label:t}),m=({shrink:n,expand:i,size:t,panelLabel:a,placement:o})=>{const s=[];return"small"!==t&&s.push(e(p,{onClick:n,label:a+" smaller maken",icon:"right"===o?"chevron-right":"chevron-left",className:"shrink"})),"large"!==t&&s.push(e(p,{onClick:i,label:a+" breder maken",icon:"right"===o?"chevron-left":"chevron-right",className:"expand"})),e("div",{class:"sizing-buttons"},e("span",{class:"sr-only","aria-live":"polite","aria-atomic":"true"},"Breedte ",a.toLocaleLowerCase(),": ",c[t]),s)},b=({tabView:n,panelSize:i,shrinkDocumentPanel:t,expandDocumentPanel:a,dsoDocumentPanelSizeChangeAnimationEnd:o})=>e("div",{class:"dso-document-panel",onTransitionEnd:e=>{"flex-basis"===e.propertyName&&o.emit({currentSize:i})}},!n&&e(m,{panelLabel:"Documentpaneel",size:i,expand:a,shrink:t,placement:"right"}),e("div",{class:"content"},e("slot",{name:"document-panel"}))),h=({open:i,title:t,ref:a,dsoCloseFilterPanel:o})=>e("dialog",{class:"filter-panel",ref:a,inert:!i},i&&e(n,null,t&&e("h3",null,t),e("dso-icon-button",{class:"dso-close",icon:"cross",variant:"tertiary",label:"Sluiten",onDsoClick:o}),e("slot",{name:"filter-panel"}))),v=({tabView:n,mainSize:i,documentPanelOpen:t,mainPanelExpanded:a,mainPanelHidden:o,toggleMainPanel:l,dsoMainSizeChangeAnimationEnd:r})=>e("div",{class:s("dso-main-panel",{compact:!n&&t&&!a,contracted:!n&&!t&&!a,expanded:!n&&t&&a,collapsed:o}),onTransitionEnd:e=>{"flex-basis"===e.propertyName&&r.emit({currentSize:i})}},!n&&t&&e("div",{class:"toggle-button"},e("dso-icon-button",{variant:"map",label:"Zoeken paneel "+(o?"tonen":"verbergen"),icon:o?"chevron-right":"chevron-left",onDsoClick:l})),e("div",{class:s("content",{invisible:o})},e("slot",{name:"main"}))),x=({ref:n,dsoCloseOverlay:i})=>e("dialog",{class:"overlay",ref:n,onCancel:e=>{e.preventDefault(),i(e)}},e("dso-icon-button",{class:"overlay-close-button",icon:"cross",variant:"tertiary",label:"Sluiten",onDsoClick:i}),e("slot",{name:"overlay"})),u=new ResizeObserver(l((([e])=>{const n=e?.target.getRootNode();n instanceof ShadowRoot&&function(e){return"DSO-VIEWER-GRID"===e.tagName}(n.host)&&n.host._checkMainPanelVisibility()}),50)),f=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsoCloseOverlay=a(this,"dsoCloseOverlay",7),this.dsoCloseFilterPanel=a(this,"dsoCloseFilterPanel",7),this.dsoActiveTabSwitch=a(this,"dsoActiveTabSwitch",7),this.dsoMainSizeChangeAnimationEnd=a(this,"dsoMainSizeChangeAnimationEnd",7),this.dsoDocumentPanelSizeChange=a(this,"dsoDocumentPanelSizeChange",7),this.dsoDocumentPanelSizeChangeAnimationEnd=a(this,"dsoDocumentPanelSizeChangeAnimationEnd",7),this.dsoMainPanelToggle=a(this,"dsoMainPanelToggle",7),this.mediaCondition="(min-width: 808px)",this.filterPanelOpen=!1,this.overlayOpen=!1,this.documentPanelOpen=!1,this.mainSize="large",this.documentPanelSize="large",this.mainPanelExpanded=!1,this.mainPanelHidden=!1,this.tabView=window.innerWidth<808,this.switchActiveTab=e=>{this.dsoActiveTabSwitch.emit({tab:e})},this.shrinkDocumentPanel=()=>{this.dsoDocumentPanelSizeChange.emit({currentSize:this.documentPanelSize,nextSize:"large"===this.documentPanelSize?"medium":"small"})},this.expandDocumentPanel=()=>{this.dsoDocumentPanelSizeChange.emit({currentSize:this.documentPanelSize,nextSize:"small"===this.documentPanelSize?"medium":"large"})},this.toggleMainPanel=()=>{this.mapElement instanceof HTMLDivElement&&this.mapElement.clientWidth<=520&&(this.mainSize="small"),this.dsoMainPanelToggle.emit({hide:!this.mainPanelHidden})},this.changeListener=e=>this.tabView=!e.matches}get filterPanelSlot(){return this.host.querySelector("[slot='filter-panel']")}get overlaySlot(){return this.host.querySelector("[slot='overlay']")}documentPanelOpenWatcher(e){e&&this._checkMainPanelVisibility()}filterPanelOpenWatcher(e){this.filterPanelSlot||console.warn("slot 'filter-panel' has not been set"),e?this.filterPanel?.show():this.filterPanel?.close()}overlayOpenWatcher(e){this.overlaySlot||console.warn("slot 'overlay' has not been set"),e?this.overlay?.showModal():this.overlay?.close()}async _checkMainPanelVisibility(){this.documentPanelOpen&&!this.mainPanelHidden&&this.mapElement instanceof HTMLDivElement&&(this.mapElement.clientWidth<=520&&!this.mainPanelExpanded||this.mapElement.clientWidth<=80&&this.mainPanelExpanded)&&this.dsoMainPanelToggle.emit({hide:!0})}connectedCallback(){window.matchMedia(this.mediaCondition).addEventListener("change",this.changeListener)}componentDidLoad(){this.filterPanelOpen&&this.filterPanelSlot&&this.filterPanel?.show(),this.overlayOpen&&this.overlaySlot&&this.overlay?.showModal(),this.mapElement instanceof HTMLDivElement&&u.observe(this.mapElement)}disconnectedCallback(){window.matchMedia(this.mediaCondition).removeEventListener("change",this.changeListener),this.mapElement&&u.unobserve(this.mapElement)}render(){return e(n,{key:"9042248a270d8153398fcb1ba448b6dfcbd8a471"},e("slot",{key:"96c891828fdb065f3abecbaff992ff2bb82a1da4",name:"top-bar"}),e("div",{key:"7c8fab55ec4c5c92c6cf4f0e3d43ccc986bf13d7",class:"viewer-grid-columns"},this.tabView&&e("nav",{key:"ad7bdb989e343e1dec3e758a1b1a8c766e731307",class:"dso-navbar"},e("ul",{key:"beb1aee315a73a08db19d6dcfd5572d47d804fd5",class:"dso-nav dso-nav-sub"},r.map((n=>e("li",{key:n,class:s({"dso-active":this.activeTab===n})},e("button",{type:"button",class:"dso-tertiary",onClick:()=>this.switchActiveTab(n)},d[n])))))),(!this.tabView||this.tabView&&"search"===this.activeTab)&&e(v,{key:"9ee7c72e89b646e278ac54363fa229b963291b09",tabView:this.tabView,mainSize:this.mainSize,documentPanelOpen:this.documentPanelOpen,mainPanelExpanded:this.mainPanelExpanded,mainPanelHidden:this.mainPanelHidden,toggleMainPanel:this.toggleMainPanel,dsoMainSizeChangeAnimationEnd:this.dsoMainSizeChangeAnimationEnd}),(!this.tabView||this.tabView&&"search"===this.activeTab)&&e(h,{key:"37814740acd838e859c93ad164f0a6b5bbc90c49",open:this.filterPanelOpen,title:this.filterPanelTitle,ref:e=>this.filterPanel=e,dsoCloseFilterPanel:e=>this.dsoCloseFilterPanel.emit({originalEvent:e})}),(!this.tabView||this.tabView&&"map"===this.activeTab)&&e("div",{key:"1092b80f15e27fb3672dad273184d7ca0c2a0c1e",class:"map",ref:e=>this.mapElement=e},e("slot",{key:"1764940c1d5887f011ccd8b445261ff322872d4f",name:"map"})),(!this.tabView&&this.documentPanelOpen||this.tabView&&"document"===this.activeTab)&&e(b,{key:"1470ba06e095d4e9118807d3c3324fa8bcddaaef",tabView:this.tabView,panelSize:this.documentPanelSize,shrinkDocumentPanel:this.shrinkDocumentPanel,expandDocumentPanel:this.expandDocumentPanel,dsoDocumentPanelSizeChangeAnimationEnd:this.dsoDocumentPanelSizeChangeAnimationEnd}),e(x,{key:"a1f4c22148fdc70a61fe7ebab5fa1c273adc8e66",ref:e=>this.overlay=e,dsoCloseOverlay:e=>this.dsoCloseOverlay.emit({originalEvent:e})})))}get host(){return this}static get watchers(){return{documentPanelOpen:[{documentPanelOpenWatcher:0}],filterPanelOpen:[{filterPanelOpenWatcher:0}],overlayOpen:[{overlayOpenWatcher:0}]}}static get style(){return"*, *::after, *::before { box-sizing: border-box; } :host .overlay { block-size: calc(100% - 32px); margin-block: 16px; margin-inline: auto 16px; } :host .dso-main-panel { transition: min-inline-size 200ms ease-in, margin-inline-start 200ms ease-in; } button { -webkit-appearance: button; color: inherit; cursor: pointer; font: inherit; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; overflow: visible; text-transform: none; } button[disabled] { cursor: default; } button::-moz-focus-inner { border: 0; padding: 0; } .sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: rect(0 0 0 0); } .overlay-close-button { position: absolute; line-height: 1; inset-block-start: 8px; inset-inline-end: 16px; } .content.invisible { visibility: hidden; } .viewer-grid-columns { position: relative; } .dso-main-panel .content, .dso-document-panel .content { block-size: 100%; padding-block: 0; padding-inline: 16px; } .dso-main-panel { background-color: #fff; flex-shrink: 0; flex-grow: 0; position: relative; transition: flex-basis 200ms ease-in, max-inline-size 200ms ease-in, min-inline-size 200ms ease-in; z-index: 100; } .dso-main-panel.compact.collapsed, .dso-main-panel.expanded.collapsed { inset-inline-start: -432px; } .dso-main-panel.compact, .dso-main-panel.contracted { flex-shrink: unset; flex-grow: unset; position: absolute; transition: none; } .dso-main-panel.expanded.collapsed { position: absolute; block-size: 100%; } .dso-main-panel .sizing-buttons, .dso-main-panel .toggle-button { inset-inline-start: calc(100% + 1px); transition: inset-inline-start 200ms ease-in; padding-block: 0 8px; padding-inline: 0 4px; } .dso-main-panel .toggle-button { --_dt-icon-button-border-start-start-radius: 0; --_dt-icon-button-border-end-start-radius: 0; } .dso-document-panel { background-color: #fff; flex-shrink: 0; flex-grow: 0; position: relative; transition: flex-basis 200ms ease-in, max-inline-size 200ms ease-in, min-inline-size 200ms ease-in; z-index: 100; } .dso-document-panel .sizing-buttons { inset-block-start: auto; inset-block-end: 16px; inset-inline-end: calc(100% + 1px); transition: inset-inline-end 200ms ease-in; padding-block: 0 8px; padding-inline: 4px 0; } .dso-document-panel .sizing-buttons .shrink, .dso-document-panel .sizing-buttons .expand { --_dt-icon-button-map-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 4px 0px; --_dt-icon-button-border-start-end-radius: 0; --_dt-icon-button-border-end-end-radius: 0; } .sizing-buttons, .toggle-button { overflow-x: hidden; position: absolute; inset-block-start: 16px; inline-size: 44px; z-index: -1; } .map { block-size: 100%; inline-size: 100%; overflow: hidden; position: relative; } .filter-panel, .overlay { background-color: #fff; border: 0; block-size: 100%; margin-block: 0; max-block-size: 100vh; overflow-y: auto; z-index: 101; } .filter-panel { display: block; position: absolute; padding-block: 8px; padding-inline: 16px; inset-block-start: 0; block-size: 100%; inset-inline-start: -380px; inline-size: 100%; transition: inset-inline-start 200ms ease-in; } @media screen and (max-width: 768px) { .filter-panel { inline-size: 100vw; } .filter-panel::before { display: none !important; } } @media screen and (min-width: 992px) { .filter-panel { max-inline-size: 380px; } } .filter-panel[open] { inset-inline-start: 0; box-shadow: none; border-inline-end: 1px solid #e5e5e5; } .filter-panel h3 { color: #275937; } .filter-panel .dso-close { --_dso-icon-button-tertiary-color: #191919; position: absolute; inset-block-start: 20px; inset-inline-end: 20px; } .overlay { padding-block: 40px 8px; padding-inline: 16px; inset-inline-end: 0; inline-size: 624px; } .overlay::backdrop { background-color: rgba(0, 0, 0, 0.5); } @media screen and (max-width: 624px) { .overlay { inline-size: 100vw; } } @media screen and (min-width: 808px) { :host([main-size=small]) .dso-main-panel, :host([document-panel-size=small]) .dso-document-panel { flex-basis: 375px; min-inline-size: 0; max-inline-size: 375px; } } @media screen and (min-width: 808px) and (max-width: 375px) { :host([main-size=small]) .dso-main-panel, :host([document-panel-size=small]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 0; transition: none; } } @media screen and (min-width: 808px) { :host([main-size=medium]) .dso-main-panel, :host([document-panel-size=medium]) .dso-document-panel { flex-basis: 624px; min-inline-size: 375px; max-inline-size: 624px; } } @media screen and (min-width: 808px) and (max-width: 624px) { :host([main-size=medium]) .dso-main-panel, :host([document-panel-size=medium]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 375px; transition: none; } } @media screen and (min-width: 808px) { :host([main-size=large]) .dso-main-panel, :host([document-panel-size=large]) .dso-document-panel { flex-basis: 60%; min-inline-size: 768px; max-inline-size: 1024px; } } @media screen and (min-width: 808px) and (max-width: 768px) { :host([main-size=large]) .dso-main-panel, :host([document-panel-size=large]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 768px; transition: none; } } @media screen and (min-width: 808px) { :host { display: flex; flex-direction: column; block-size: 100vh; overflow: clip; position: relative; } :host .dso-main-panel.compact, :host .dso-main-panel.expanded { flex-basis: unset; min-inline-size: unset; max-inline-size: unset; inline-size: 440px; } :host .viewer-grid-columns { display: flex; overflow: hidden; flex-grow: 1; } .dso-main-panel, .dso-document-panel { box-shadow: 2px 0 8px 0 rgba(0, 0, 0, 0.4); } .dso-main-panel .content, .dso-document-panel .content { overflow-y: auto; } .filter-panel { margin-inline: 0 auto; inline-size: calc(100vw - 40px); } .filter-panel[open] { border-inline-end: 1px solid #e5e5e5; } .overlay { box-shadow: -2px 0 5px #666; margin-inline: auto 0; } } @media screen and (min-width: 808px) and (max-width: 1031.99px) { :host([filter-panel-open]) .dso-main-panel { margin-inline-start: 380px; max-inline-size: calc(100vw - 380px); } .filter-panel { inline-size: 380px; inset-inline-start: -380px; } } @media screen and (max-width: 807.99px) { .dso-navbar { min-block-size: 32px; } .dso-navbar .dso-navbar-header { float: inline-start; } .dso-navbar .dso-navbar-toggle { border-radius: 4px; min-inline-size: auto; padding-block: 5px; padding-inline: 0; } .dso-navbar .dso-navbar-toggle dso-icon { margin-inline-start: 8px; margin-inline-end: 8px; } } @media screen and (max-width: 807.99px) and (min-width: 992px) { .dso-navbar .dso-navbar-toggle { display: none; } } @media screen and (max-width: 807.99px) { .dso-navbar.dso-has-navbar-extension .dso-nav > li:last-child { margin-inline-end: 8rem; } .dso-nav { list-style: none; margin-block-end: 0; padding-inline-start: 0; } .dso-nav > li > button { border: 0; background-color: transparent; } .dso-nav > li > a, .dso-nav > li > button { display: block; } .dso-nav > li > a, .dso-nav > li > a:hover, .dso-nav > li > a:focus, .dso-nav > li > a:visited, .dso-nav > li > button, .dso-nav > li > button:hover, .dso-nav > li > button:focus, .dso-nav > li > button:visited { color: #275937; } .dso-nav > li.dso-active > a, .dso-nav > li.dso-active > button, .dso-nav > li.is-active > a, .dso-nav > li.is-active > button { border-block-end: 4px solid #8b4a6a; font-weight: bold; } .dso-nav.dso-nav-main > li { display: inline-block; } .dso-nav.dso-nav-main > li > a, .dso-nav.dso-nav-main > li > button { text-decoration: none; } .dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus-visible, .dso-nav.dso-nav-main > li > a:active, .dso-nav.dso-nav-main > li > button:hover, .dso-nav.dso-nav-main > li > button:focus-visible, .dso-nav.dso-nav-main > li > button:active { text-decoration: underline; } .dso-nav.dso-nav-main > li > a, .dso-nav.dso-nav-main > li > button { font-size: 1.25em; line-height: 1; margin-block-start: 8px; padding-block: 8px 7px; padding-inline: 16px; } .dso-nav.dso-nav-sub > li { display: inline-block; } .dso-nav.dso-nav-sub > li > a, .dso-nav.dso-nav-sub > li > button { text-decoration: none; } .dso-nav.dso-nav-sub > li > a:hover, .dso-nav.dso-nav-sub > li > a:focus-visible, .dso-nav.dso-nav-sub > li > a:active, .dso-nav.dso-nav-sub > li > button:hover, .dso-nav.dso-nav-sub > li > button:focus-visible, .dso-nav.dso-nav-sub > li > button:active { text-decoration: underline; } .dso-nav.dso-nav-sub > li > a, .dso-nav.dso-nav-sub > li > button { font-size: 1rem; margin-block-start: 4px; padding-block: 4px 3px; padding-inline: 8px; } .dso-navbar { padding-inline: 16px; } .dso-nav { border-block-end: 1px solid #ccc; display: flex; gap: 16px; margin-block-start: 0; inline-size: calc(100vw - 32px); } .dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: start; user-select: none; vertical-align: middle; background-clip: padding-box; } .dso-tertiary:focus, .dso-tertiary:focus-visible { outline-offset: 2px; } .dso-tertiary:active { outline: 0; } .dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: start; user-select: none; vertical-align: middle; background-clip: padding-box; } .dso-tertiary:focus, .dso-tertiary:focus-visible { outline-offset: 2px; } .dso-tertiary:active { outline: 0; } .dso-tertiary { background-color: var(--_dso-button-tertiary-background-color, ); border-color: var(--_dso-button-tertiary-border-color, ); color: var(--_dso-button-tertiary-color, #39870c); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: auto; padding-block: 11px; padding-inline: 15px; } .dso-tertiary:hover { background-color: var(--_dso-button-tertiary-hover-background-color, ); border-color: var(--_dso-button-tertiary-hover-border-color, ); color: var(--_dso-button-tertiary-hover-color, #275937); } .dso-tertiary:active { background-color: var(--_dso-button-tertiary-active-background-color, ); border-color: var(--_dso-button-tertiary-active-border-color, ); color: var(--_dso-button-tertiary-active-color, #173521); } .dso-tertiary[disabled], .dso-tertiary[disabled]:hover { background-color: var(--_dso-button-tertiary-disabled-background-color, ); border-color: var(--_dso-button-tertiary-disabled-border-color, ); color: var(--_dso-button-tertiary-disabled-color, #afcf9d); } .dso-tertiary.dso-small { line-height: 1rem; } .dso-tertiary.dso-small dso-icon, .dso-tertiary.dso-small.extern::after, .dso-tertiary.dso-small.download::after, .dso-tertiary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } .dso-tertiary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small { line-height: 1rem; } .dso-tertiary.dso-extra-small dso-icon, .dso-tertiary.dso-extra-small.extern::after, .dso-tertiary.dso-extra-small.download::after, .dso-tertiary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } .dso-tertiary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small { padding-block: 9px; } .dso-tertiary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } .dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } .dso-tertiary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } .dso-tertiary { border: 0; line-height: 1; padding: 0; background-color: transparent; } .dso-tertiary[disabled].dso-spinner-left, .dso-tertiary[disabled].dso-spinner-right { color: #39870c; } .dso-tertiary:not([disabled]):hover { text-decoration: underline; text-underline-position: under; } .dso-tertiary.dso-align { line-height: calc(1.5em - 1px); padding-block: 11px; padding-inline: 0; position: relative; } .dso-tertiary.dso-truncate { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dso-tertiary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-end: 8px; } .dso-tertiary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-start: 8px; } .dso-tertiary dso-icon + span:not(.sr-only), .dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; } .dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only), .dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only), .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left], .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] { margin-inline-start: 0; } .dso-tertiary dso-icon, .dso-tertiary span { vertical-align: middle; } .dso-tertiary { font-weight: 300; } .filter-panel, .overlay { margin-inline: 0; max-inline-size: 100vw; inset-block-start: 0; inline-size: 100vw; } .filter-panel { inset-inline-start: -100vw; } } @media screen and (min-width: 992px) { :host([filter-panel-open]) .dso-main-panel { margin-inline-start: 380px; } }"}},[257,"dso-viewer-grid",{filterPanelTitle:[513,"filter-panel-title"],filterPanelOpen:[516,"filter-panel-open"],overlayOpen:[516,"overlay-open"],documentPanelOpen:[516,"document-panel-open"],mainSize:[513,"main-size"],activeTab:[1,"active-tab"],documentPanelSize:[513,"document-panel-size"],mainPanelExpanded:[4,"main-panel-expanded"],mainPanelHidden:[4,"main-panel-hidden"],tabView:[32],_checkMainPanelVisibility:[64]},void 0,{documentPanelOpen:[{documentPanelOpenWatcher:0}],filterPanelOpen:[{filterPanelOpenWatcher:0}],overlayOpen:[{overlayOpenWatcher:0}]}]),g=f,y=function(){"undefined"!=typeof customElements&&["dso-viewer-grid"].forEach((e=>{"dso-viewer-grid"===e&&(customElements.get(o(e))||customElements.define(o(e),f))}))};export{g as DsoViewerGrid,y as defineCustomElement}
|
|
1
|
+
import{h as e,Fragment as n,proxyCustomElement as i,HTMLElement as t,createEvent as a,transformTag as o}from"@stencil/core/internal/client";import{c as s}from"./clsx.js";import{d as l}from"./index2.js";const r=["search","map","document"],d={map:"Kaart",document:"Document",search:"Zoeken"},c={small:"smal",medium:"middel",large:"breed"},p=({className:n,onClick:i,label:t,icon:a})=>e("dso-icon-button",{variant:"map",class:n,onDsoClick:i,icon:a,label:t}),m=({shrink:n,expand:i,size:t,panelLabel:a,placement:o})=>{const s=[];return"small"!==t&&s.push(e(p,{onClick:n,label:a+" smaller maken",icon:"right"===o?"chevron-right":"chevron-left",className:"shrink"})),"large"!==t&&s.push(e(p,{onClick:i,label:a+" breder maken",icon:"right"===o?"chevron-left":"chevron-right",className:"expand"})),e("div",{class:"sizing-buttons"},e("span",{class:"sr-only","aria-live":"polite","aria-atomic":"true"},"Breedte ",a.toLocaleLowerCase(),": ",c[t]),s)},b=({tabView:n,panelSize:i,shrinkDocumentPanel:t,expandDocumentPanel:a,dsoDocumentPanelSizeChangeAnimationEnd:o})=>e("div",{class:"dso-document-panel",onTransitionEnd:e=>{"flex-basis"===e.propertyName&&o.emit({currentSize:i})}},!n&&e(m,{panelLabel:"Documentpaneel",size:i,expand:a,shrink:t,placement:"right"}),e("div",{class:"content"},e("slot",{name:"document-panel"}))),h=({open:i,title:t,ref:a,dsoCloseFilterPanel:o})=>e("dialog",{class:"filter-panel",ref:a,inert:!i},i&&e(n,null,t&&e("h3",null,t),e("dso-icon-button",{class:"dso-close",icon:"cross",variant:"tertiary",label:"Sluiten",onDsoClick:o}),e("slot",{name:"filter-panel"}))),v=({tabView:n,mainSize:i,documentPanelOpen:t,mainPanelExpanded:a,mainPanelHidden:o,toggleMainPanel:l,dsoMainSizeChangeAnimationEnd:r})=>e("div",{class:s("dso-main-panel",{compact:!n&&t&&!a,contracted:!n&&!t&&!a,expanded:!n&&t&&a,collapsed:o}),onTransitionEnd:e=>{"flex-basis"===e.propertyName&&r.emit({currentSize:i})}},!n&&t&&e("div",{class:"toggle-button"},e("dso-icon-button",{variant:"map",label:"Zoeken paneel "+(o?"tonen":"verbergen"),icon:o?"chevron-right":"chevron-left",onDsoClick:l})),e("div",{class:s("content",{invisible:o})},e("slot",{name:"main"}))),x=({ref:n,dsoCloseOverlay:i})=>e("dialog",{class:"overlay",ref:n,onCancel:e=>{e.preventDefault(),i(e)}},e("dso-icon-button",{class:"overlay-close-button",icon:"cross",variant:"tertiary",label:"Sluiten",onDsoClick:i}),e("slot",{name:"overlay"})),u=new ResizeObserver(l((([e])=>{const n=e?.target.getRootNode();n instanceof ShadowRoot&&function(e){return"DSO-VIEWER-GRID"===e.tagName}(n.host)&&n.host._checkMainPanelVisibility()}),50)),g=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsoCloseOverlay=a(this,"dsoCloseOverlay",7),this.dsoCloseFilterPanel=a(this,"dsoCloseFilterPanel",7),this.dsoActiveTabSwitch=a(this,"dsoActiveTabSwitch",7),this.dsoMainSizeChangeAnimationEnd=a(this,"dsoMainSizeChangeAnimationEnd",7),this.dsoDocumentPanelSizeChange=a(this,"dsoDocumentPanelSizeChange",7),this.dsoDocumentPanelSizeChangeAnimationEnd=a(this,"dsoDocumentPanelSizeChangeAnimationEnd",7),this.dsoMainPanelToggle=a(this,"dsoMainPanelToggle",7),this.mediaCondition="(min-width: 808px)",this.filterPanelOpen=!1,this.overlayOpen=!1,this.documentPanelOpen=!1,this.mainSize="large",this.documentPanelSize="large",this.mainPanelExpanded=!1,this.mainPanelHidden=!1,this.tabView=window.innerWidth<808,this.switchActiveTab=e=>{this.dsoActiveTabSwitch.emit({tab:e})},this.shrinkDocumentPanel=()=>{this.dsoDocumentPanelSizeChange.emit({currentSize:this.documentPanelSize,nextSize:"large"===this.documentPanelSize?"medium":"small"})},this.expandDocumentPanel=()=>{this.dsoDocumentPanelSizeChange.emit({currentSize:this.documentPanelSize,nextSize:"small"===this.documentPanelSize?"medium":"large"})},this.toggleMainPanel=()=>{this.mapElement instanceof HTMLDivElement&&this.mapElement.clientWidth<=520&&(this.mainSize="small"),this.dsoMainPanelToggle.emit({hide:!this.mainPanelHidden})},this.changeListener=e=>this.tabView=!e.matches}get filterPanelSlot(){return this.host.querySelector("[slot='filter-panel']")}get overlaySlot(){return this.host.querySelector("[slot='overlay']")}documentPanelOpenWatcher(e){e&&this._checkMainPanelVisibility()}filterPanelOpenWatcher(e){this.filterPanelSlot||console.warn("slot 'filter-panel' has not been set"),e?this.filterPanel?.show():this.filterPanel?.close()}overlayOpenWatcher(e){this.overlaySlot||console.warn("slot 'overlay' has not been set"),e?this.overlay?.showModal():this.overlay?.close()}async _checkMainPanelVisibility(){this.documentPanelOpen&&!this.mainPanelHidden&&this.mapElement instanceof HTMLDivElement&&(this.mapElement.clientWidth<=520&&!this.mainPanelExpanded||this.mapElement.clientWidth<=80&&this.mainPanelExpanded)&&this.dsoMainPanelToggle.emit({hide:!0})}connectedCallback(){window.matchMedia(this.mediaCondition).addEventListener("change",this.changeListener)}componentDidLoad(){this.filterPanelOpen&&this.filterPanelSlot&&this.filterPanel?.show(),this.overlayOpen&&this.overlaySlot&&this.overlay?.showModal(),this.mapElement instanceof HTMLDivElement&&u.observe(this.mapElement)}disconnectedCallback(){window.matchMedia(this.mediaCondition).removeEventListener("change",this.changeListener),this.mapElement&&u.unobserve(this.mapElement)}render(){return e(n,{key:"06fb7880f5116450d6b14d8487bac63c94345922"},e("slot",{key:"eb9893063f36b291d765a0b7ade2de7303dfc0f2",name:"top-bar"}),e("div",{key:"021c89577aed0b6fe33a225c801a790b67a45161",class:"viewer-grid-columns"},this.tabView&&e("nav",{key:"87ceaa1f12b58c564c125a8709635144aac9c31e",class:"dso-navbar"},e("ul",{key:"bcad835f8f77c617058b0994b33a9c6c98201a51",class:"dso-nav dso-nav-sub"},r.map((n=>e("li",{key:n,class:s({"dso-active":this.activeTab===n})},e("button",{type:"button",class:"dso-tertiary",onClick:()=>this.switchActiveTab(n)},d[n])))))),(!this.tabView||this.tabView&&"search"===this.activeTab)&&e(v,{key:"f4ac0d91a990acb68fde9057d69a824ab62c42b1",tabView:this.tabView,mainSize:this.mainSize,documentPanelOpen:this.documentPanelOpen,mainPanelExpanded:this.mainPanelExpanded,mainPanelHidden:this.mainPanelHidden,toggleMainPanel:this.toggleMainPanel,dsoMainSizeChangeAnimationEnd:this.dsoMainSizeChangeAnimationEnd}),(!this.tabView||this.tabView&&"search"===this.activeTab)&&e(h,{key:"f62670f4abba9bf22963afba2548a97593bf2129",open:this.filterPanelOpen,title:this.filterPanelTitle,ref:e=>this.filterPanel=e,dsoCloseFilterPanel:e=>this.dsoCloseFilterPanel.emit({originalEvent:e})}),(!this.tabView||this.tabView&&"map"===this.activeTab)&&e("div",{key:"e04bad7ba3c8f93ec354d23d48652cbca6be1956",class:"map",ref:e=>this.mapElement=e},e("slot",{key:"6d901b85ce9f9eae56fbabff84ac15a100283055",name:"map"})),(!this.tabView&&this.documentPanelOpen||this.tabView&&"document"===this.activeTab)&&e(b,{key:"04ed6978e33e29dd4ce394e1ce3e673fe5a1ddd3",tabView:this.tabView,panelSize:this.documentPanelSize,shrinkDocumentPanel:this.shrinkDocumentPanel,expandDocumentPanel:this.expandDocumentPanel,dsoDocumentPanelSizeChangeAnimationEnd:this.dsoDocumentPanelSizeChangeAnimationEnd}),e(x,{key:"ba22e04eb7a2be5c51477556a708dd65a57ea339",ref:e=>this.overlay=e,dsoCloseOverlay:e=>this.dsoCloseOverlay.emit({originalEvent:e})})))}get host(){return this}static get watchers(){return{documentPanelOpen:[{documentPanelOpenWatcher:0}],filterPanelOpen:[{filterPanelOpenWatcher:0}],overlayOpen:[{overlayOpenWatcher:0}]}}static get style(){return"*, *::after, *::before { box-sizing: border-box; } :host .overlay { block-size: calc(100% - 32px); margin-block: 16px; margin-inline: auto 16px; } :host .dso-main-panel { transition: min-inline-size 200ms ease-in, margin-inline-start 200ms ease-in; } button { -webkit-appearance: button; color: inherit; cursor: pointer; font: inherit; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; overflow: visible; text-transform: none; } button[disabled] { cursor: default; } button::-moz-focus-inner { border: 0; padding: 0; } .sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: rect(0 0 0 0); } .overlay-close-button { position: absolute; line-height: 1; inset-block-start: 8px; inset-inline-end: 16px; } .content.invisible { visibility: hidden; } .viewer-grid-columns { position: relative; } .dso-main-panel .content, .dso-document-panel .content { block-size: 100%; padding-block: 0; padding-inline: 16px; } .dso-main-panel { background-color: #fff; flex-shrink: 0; flex-grow: 0; position: relative; transition: flex-basis 200ms ease-in, max-inline-size 200ms ease-in, min-inline-size 200ms ease-in; z-index: 100; } .dso-main-panel.compact.collapsed, .dso-main-panel.expanded.collapsed { inset-inline-start: -432px; } .dso-main-panel.compact, .dso-main-panel.contracted { flex-shrink: unset; flex-grow: unset; position: absolute; transition: none; } .dso-main-panel.expanded.collapsed { position: absolute; block-size: 100%; } .dso-main-panel .sizing-buttons, .dso-main-panel .toggle-button { inset-inline-start: calc(100% + 1px); transition: inset-inline-start 200ms ease-in; padding-block: 0 8px; padding-inline: 0 4px; } .dso-main-panel .toggle-button { --_dt-icon-button-border-start-start-radius: 0; --_dt-icon-button-border-end-start-radius: 0; } .dso-document-panel { background-color: #fff; flex-shrink: 0; flex-grow: 0; position: relative; transition: flex-basis 200ms ease-in, max-inline-size 200ms ease-in, min-inline-size 200ms ease-in; z-index: 100; } .dso-document-panel .sizing-buttons { inset-block-start: auto; inset-block-end: 16px; inset-inline-end: calc(100% + 1px); transition: inset-inline-end 200ms ease-in; padding-block: 0 8px; padding-inline: 4px 0; } .dso-document-panel .sizing-buttons .shrink, .dso-document-panel .sizing-buttons .expand { --_dt-icon-button-map-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 4px 0px; --_dt-icon-button-border-start-end-radius: 0; --_dt-icon-button-border-end-end-radius: 0; } .sizing-buttons, .toggle-button { overflow-x: hidden; position: absolute; inset-block-start: 16px; inline-size: 44px; z-index: -1; } .map { block-size: 100%; inline-size: 100%; overflow: hidden; position: relative; } .filter-panel, .overlay { background-color: #fff; border: 0; block-size: 100%; margin-block: 0; max-block-size: 100vh; overflow-y: auto; z-index: 101; } .filter-panel { display: block; position: absolute; padding-block: 8px; padding-inline: 16px; inset-block-start: 0; block-size: 100%; inset-inline-start: -380px; inline-size: 100%; transition: inset-inline-start 200ms ease-in; } @media screen and (max-width: 768px) { .filter-panel { inline-size: 100vw; } .filter-panel::before { display: none !important; } } @media screen and (min-width: 992px) { .filter-panel { max-inline-size: 380px; } } .filter-panel[open] { inset-inline-start: 0; box-shadow: none; border-inline-end: 1px solid #e5e5e5; } .filter-panel h3 { color: #275937; } .filter-panel .dso-close { --_dso-icon-button-tertiary-color: #191919; position: absolute; inset-block-start: 20px; inset-inline-end: 20px; } .overlay { padding-block: 40px 8px; padding-inline: 16px; inset-inline-end: 0; inline-size: 624px; } .overlay::backdrop { background-color: rgba(0, 0, 0, 0.5); } @media screen and (max-width: 624px) { .overlay { inline-size: 100vw; } } @media screen and (min-width: 808px) { :host([main-size=small]) .dso-main-panel, :host([document-panel-size=small]) .dso-document-panel { flex-basis: 375px; min-inline-size: 0; max-inline-size: 375px; } } @media screen and (min-width: 808px) and (max-width: 375px) { :host([main-size=small]) .dso-main-panel, :host([document-panel-size=small]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 0; transition: none; } } @media screen and (min-width: 808px) { :host([main-size=medium]) .dso-main-panel, :host([document-panel-size=medium]) .dso-document-panel { flex-basis: 624px; min-inline-size: 375px; max-inline-size: 624px; } } @media screen and (min-width: 808px) and (max-width: 624px) { :host([main-size=medium]) .dso-main-panel, :host([document-panel-size=medium]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 375px; transition: none; } } @media screen and (min-width: 808px) { :host([main-size=large]) .dso-main-panel, :host([document-panel-size=large]) .dso-document-panel { flex-basis: 60%; min-inline-size: 768px; max-inline-size: 1024px; } } @media screen and (min-width: 808px) and (max-width: 768px) { :host([main-size=large]) .dso-main-panel, :host([document-panel-size=large]) .dso-document-panel { flex-basis: 100vw; max-inline-size: 100vw; min-inline-size: 768px; transition: none; } } @media screen and (min-width: 808px) { :host { display: flex; flex-direction: column; block-size: 100vh; overflow: clip; position: relative; } :host .dso-main-panel.compact, :host .dso-main-panel.expanded { flex-basis: unset; min-inline-size: unset; max-inline-size: unset; inline-size: 440px; } :host .viewer-grid-columns { display: flex; overflow: hidden; flex-grow: 1; } .dso-main-panel, .dso-document-panel { box-shadow: 2px 0 8px 0 rgba(0, 0, 0, 0.4); } .dso-main-panel .content, .dso-document-panel .content { overflow-y: auto; } .filter-panel { margin-inline: 0 auto; inline-size: calc(100vw - 40px); } .filter-panel[open] { border-inline-end: 1px solid #e5e5e5; } .overlay { box-shadow: -2px 0 5px #666; margin-inline: auto 0; } } @media screen and (min-width: 808px) and (max-width: 1031.99px) { :host([filter-panel-open]) .dso-main-panel { margin-inline-start: 380px; max-inline-size: calc(100vw - 380px); } .filter-panel { inline-size: 380px; inset-inline-start: -380px; } } @media screen and (max-width: 807.99px) { .dso-navbar { min-block-size: 32px; } .dso-navbar .dso-navbar-header { float: inline-start; } .dso-navbar .dso-navbar-toggle { border-radius: 4px; min-inline-size: auto; padding-block: 5px; padding-inline: 0; } .dso-navbar .dso-navbar-toggle dso-icon { margin-inline-start: 8px; margin-inline-end: 8px; } } @media screen and (max-width: 807.99px) and (min-width: 992px) { .dso-navbar .dso-navbar-toggle { display: none; } } @media screen and (max-width: 807.99px) { .dso-navbar.dso-has-navbar-extension .dso-nav > li:last-child { margin-inline-end: 8rem; } .dso-nav { list-style: none; margin-block-end: 0; padding-inline-start: 0; } .dso-nav > li > button { border: 0; background-color: transparent; } .dso-nav > li > a, .dso-nav > li > button { display: block; } .dso-nav > li > a, .dso-nav > li > a:hover, .dso-nav > li > a:focus, .dso-nav > li > a:visited, .dso-nav > li > button, .dso-nav > li > button:hover, .dso-nav > li > button:focus, .dso-nav > li > button:visited { color: #275937; } .dso-nav > li.dso-active > a, .dso-nav > li.dso-active > button, .dso-nav > li.is-active > a, .dso-nav > li.is-active > button { border-block-end: 4px solid #8b4a6a; font-weight: bold; } .dso-nav.dso-nav-main > li { display: inline-block; } .dso-nav.dso-nav-main > li > a, .dso-nav.dso-nav-main > li > button { text-decoration: none; } .dso-nav.dso-nav-main > li > a:hover, .dso-nav.dso-nav-main > li > a:focus-visible, .dso-nav.dso-nav-main > li > a:active, .dso-nav.dso-nav-main > li > button:hover, .dso-nav.dso-nav-main > li > button:focus-visible, .dso-nav.dso-nav-main > li > button:active { text-decoration: underline; } .dso-nav.dso-nav-main > li > a, .dso-nav.dso-nav-main > li > button { font-size: 1.25em; line-height: 1; margin-block-start: 8px; padding-block: 8px 7px; padding-inline: 16px; } .dso-nav.dso-nav-sub > li { display: inline-block; } .dso-nav.dso-nav-sub > li > a, .dso-nav.dso-nav-sub > li > button { text-decoration: none; } .dso-nav.dso-nav-sub > li > a:hover, .dso-nav.dso-nav-sub > li > a:focus-visible, .dso-nav.dso-nav-sub > li > a:active, .dso-nav.dso-nav-sub > li > button:hover, .dso-nav.dso-nav-sub > li > button:focus-visible, .dso-nav.dso-nav-sub > li > button:active { text-decoration: underline; } .dso-nav.dso-nav-sub > li > a, .dso-nav.dso-nav-sub > li > button { font-size: 1rem; margin-block-start: 4px; padding-block: 4px 3px; padding-inline: 8px; } .dso-navbar { padding-inline: 16px; } .dso-nav { border-block-end: 1px solid #ccc; display: flex; gap: 16px; margin-block-start: 0; inline-size: calc(100vw - 32px); } .dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: start; user-select: none; vertical-align: middle; background-clip: padding-box; } .dso-tertiary:focus, .dso-tertiary:focus-visible { outline-offset: 2px; } .dso-tertiary:active { outline: 0; } .dso-tertiary { display: inline-block; font-size: 1em; font-weight: 500; margin-block-end: 0; text-decoration: none; touch-action: manipulation; text-align: start; user-select: none; vertical-align: middle; background-clip: padding-box; } .dso-tertiary:focus, .dso-tertiary:focus-visible { outline-offset: 2px; } .dso-tertiary:active { outline: 0; } .dso-tertiary { background-color: var(--_dso-button-tertiary-background-color, ); border-color: var(--_dso-button-tertiary-border-color, ); color: var(--_dso-button-tertiary-color, #39870c); border-width: 1px; border-style: solid; border-radius: 4px; line-height: 1.5; min-inline-size: auto; padding-block: 11px; padding-inline: 15px; } .dso-tertiary:hover { background-color: var(--_dso-button-tertiary-hover-background-color, ); border-color: var(--_dso-button-tertiary-hover-border-color, ); color: var(--_dso-button-tertiary-hover-color, #275937); } .dso-tertiary:active { background-color: var(--_dso-button-tertiary-active-background-color, ); border-color: var(--_dso-button-tertiary-active-border-color, ); color: var(--_dso-button-tertiary-active-color, #173521); } .dso-tertiary[disabled], .dso-tertiary[disabled]:hover { background-color: var(--_dso-button-tertiary-disabled-background-color, ); border-color: var(--_dso-button-tertiary-disabled-border-color, ); color: var(--_dso-button-tertiary-disabled-color, #afcf9d); } .dso-tertiary.dso-small { line-height: 1rem; } .dso-tertiary.dso-small dso-icon, .dso-tertiary.dso-small.extern::after, .dso-tertiary.dso-small.download::after, .dso-tertiary.dso-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } .dso-tertiary.dso-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small { line-height: 1rem; } .dso-tertiary.dso-extra-small dso-icon, .dso-tertiary.dso-extra-small.extern::after, .dso-tertiary.dso-extra-small.download::after, .dso-tertiary.dso-extra-small.dso-spinner::before { margin-block-end: -4px; margin-block-start: -4px; } .dso-tertiary.dso-extra-small.dso-spinner-left::before { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small.dso-spinner-right::after { block-size: 16px; inline-size: 16px; } .dso-tertiary.dso-extra-small { padding-block: 9px; } .dso-tertiary dso-icon:has(+ span:not(.sr-only)) { margin-inline-start: -8px; } .dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; margin-inline-end: -8px; } .dso-tertiary dso-icon + span:not(.sr-only) { margin-inline-start: 8px; } .dso-tertiary { border: 0; line-height: 1; padding: 0; background-color: transparent; } .dso-tertiary[disabled].dso-spinner-left, .dso-tertiary[disabled].dso-spinner-right { color: #39870c; } .dso-tertiary:not([disabled]):hover { text-decoration: underline; text-underline-position: under; } .dso-tertiary.dso-align { line-height: calc(1.5em - 1px); padding-block: 11px; padding-inline: 0; position: relative; } .dso-tertiary.dso-truncate { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dso-tertiary.dso-spinner-left::before { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-end: 8px; } .dso-tertiary.dso-spinner-right::after { background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 42.4; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 42.4; %7D 50%25 %7B stroke-dashoffset: 10.4; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 42.4; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='1.6' stroke-linecap='butt' cx='12' cy='12' r='7.2'%3E%3C/circle%3E%3C/svg%3E\"); background-repeat: no-repeat; content: \"\"; display: inline-block; block-size: 24px; vertical-align: middle; inline-size: 24px; margin-inline-start: 8px; } .dso-tertiary dso-icon + span:not(.sr-only), .dso-tertiary span:not(.sr-only) + dso-icon { margin-inline-start: 8px; } .dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only), .dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only), .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left], .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] { margin-inline-start: 0; } .dso-tertiary dso-icon, .dso-tertiary span { vertical-align: middle; } .dso-tertiary { font-weight: 300; } .filter-panel, .overlay { margin-inline: 0; max-inline-size: 100vw; inset-block-start: 0; inline-size: 100vw; } .filter-panel { inset-inline-start: -100vw; } } @media screen and (min-width: 992px) { :host([filter-panel-open]) .dso-main-panel { margin-inline-start: 380px; } }"}},[257,"dso-viewer-grid",{filterPanelTitle:[513,"filter-panel-title"],filterPanelOpen:[516,"filter-panel-open"],overlayOpen:[516,"overlay-open"],documentPanelOpen:[516,"document-panel-open"],mainSize:[513,"main-size"],activeTab:[1,"active-tab"],documentPanelSize:[513,"document-panel-size"],mainPanelExpanded:[4,"main-panel-expanded"],mainPanelHidden:[4,"main-panel-hidden"],tabView:[32],_checkMainPanelVisibility:[64]},void 0,{documentPanelOpen:[{documentPanelOpenWatcher:0}],filterPanelOpen:[{filterPanelOpenWatcher:0}],overlayOpen:[{overlayOpenWatcher:0}]}]),f=g,y=function(){"undefined"!=typeof customElements&&["dso-viewer-grid"].forEach((e=>{"dso-viewer-grid"===e&&(customElements.get(o(e))||customElements.define(o(e),g))}))};export{f as DsoViewerGrid,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,h as o,Fragment as r,transformTag as s}from"@stencil/core/internal/client";import{g as i,c,d as a}from"./ozon-content.js";import{d as u}from"./alert.js";import{d as f}from"./annotation-locatie.js";import{d as l}from"./badge.js";import{d}from"./document-component.js";import{d as h}from"./icon.js";import{d as m}from"./icon-button.js";import{d as p}from"./image-overlay.js";import{d as b}from"./label.js";import{d as v}from"./ozon-content-toggletip.js";import{d as g}from"./panel.js";import{d as y}from"./renvooi.js";import{d as j}from"./responsive-element.js";import{d as k}from"./scrollable.js";import{d as C}from"./slide-toggle.js";import{d as E}from"./table.js";import{d as w}from"./tooltip.js";var D,A,O,z,S=i(function(){if(A)return D;A=1;var t=1/0,e=9007199254740991,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=/^(?:0|[1-9]\d*)$/,c=parseFloat,a=parseInt,u=Object.prototype.toString,f=Math.floor,l=Math.min,d=Math.random;function h(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(e){return e?(e=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(h(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=h(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var i=r.test(t);return i||s.test(t)?a(t.slice(2),i?2:8):o.test(t)?NaN:+t}(e))===t||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}return D=function(t,n,o){if(o&&"boolean"!=typeof o&&function(t,n,o){if(!h(o))return!1;var r=typeof n;return!!("number"==r?function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(t){var e=h(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(o)&&function(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<n}(n,o.length):"string"==r&&n in o)&&function(t,e){return t===e||t!=t&&e!=e}(o[n],t)}(t,n,o)&&(n=o=void 0),void 0===o&&("boolean"==typeof n?(o=n,n=void 0):"boolean"==typeof t&&(o=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=m(t),void 0===n?(n=t,t=0):n=m(n)),t>n){var r=t;t=n,n=r}if(o||t%1||n%1){var s=d();return l(t+s*(n-t+c("1e-"+((s+"").length-1))),n)}return function(t,e){return t+f(d()*(e-t+1))}(t,n)}}()),T=i(function(){if(z)return O;z=1;var t=1/0,e=9007199254740991,n="[object Map]",o="[object Promise]",r="[object Set]",s="[object WeakMap]",i="[object DataView]",a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,l=/^\[object .+?Constructor\]$/,d=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,m="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",b="\\u20d0-\\u20f0",v="\\ufe0e\\ufe0f",g="["+m+"]",y="["+p+b+"]",j="\\ud83c[\\udffb-\\udfff]",k="[^"+m+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",D="(?:"+y+"|"+j+")?",A="["+v+"]?",S=A+D+"(?:"+w+"(?:"+[k,C,E].join("|")+")"+A+D+")*",T=RegExp(j+"(?="+j+")|(?:"+[k+y+"?",y,C,E,g].join("|")+")"+S,"g"),$=RegExp("["+w+m+p+b+v+"]"),F=parseInt,I="object"==typeof self&&self&&self.Object===Object&&self,x="object"==typeof c&&c&&c.Object===Object&&c||I||Function("return this")();function M(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n}function N(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var R=Function.prototype,W=Object.prototype,B=x["__core-js_shared__"],L=function(){var t=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),V=R.toString,K=W.hasOwnProperty,P=W.toString,G=RegExp("^"+V.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=x.Symbol,H=U?U.iterator:void 0,_=W.propertyIsEnumerable,q=Math.floor,J=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),Q=Math.random,X=at(x,"DataView"),Y=at(x,"Map"),Z=at(x,"Promise"),tt=at(x,"Set"),et=at(x,"WeakMap"),nt=lt(X),ot=lt(Y),rt=lt(Z),st=lt(tt),it=lt(et);function ct(t,e){return t+q(Q()*(e-t+1))}function at(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){if(!pt(t)||function(t){return!!L&&L in t}(t))return!1;var e=mt(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?G:l;return e.test(lt(t))}(n)?n:void 0}var ut=function(t){return P.call(t)};function ft(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||h.test(t))&&t>-1&&t%1==0&&t<n}function lt(t){if(null!=t){try{return V.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(X&&ut(new X(new ArrayBuffer(1)))!=i||Y&&ut(new Y)!=n||Z&&ut(Z.resolve())!=o||tt&&ut(new tt)!=r||et&&ut(new et)!=s)&&(ut=function(t){var e=P.call(t),c="[object Object]"==e?t.constructor:void 0,a=c?lt(c):void 0;if(a)switch(a){case nt:return i;case ot:return n;case rt:return o;case st:return r;case it:return s}return e});var dt=Array.isArray;function ht(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!mt(t)}function mt(t){var e=pt(t)?P.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function pt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function bt(t){return!!t&&"object"==typeof t}function vt(t){return t?function(t,e){return function(t,e){for(var n=-1,o=t?t.length:0,r=Array(o);++n<o;)r[n]=e(t[n]);return r}(e,(function(e){return t[e]}))}(t,function(t){return ht(t)?function(t){var e=dt(t)||function(t){return function(t){return bt(t)&&ht(t)}(t)&&K.call(t,"callee")&&(!_.call(t,"callee")||"[object Arguments]"==P.call(t))}(t)?function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}(t.length,String):[],n=e.length,o=!!n;for(var r in t)!K.call(t,r)||o&&("length"==r||ft(r,n))||e.push(r);return e}(t):function(t){if(!function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||W)}(t))return J(t);var e=[];for(var n in Object(t))K.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}(t)):[]}return O=function(e,o,s){var i=-1,c=function(t){if(!t)return[];if(ht(t))return function(t){return"string"==typeof t||!dt(t)&&bt(t)&&"[object String]"==P.call(t)}(t)?function(t){return function(t){return $.test(t)}(t)?function(t){return t.match(T)||[]}(t):function(t){return t.split("")}(t)}(t):function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}(t);if(H&&t[H])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[H]());var e=ut(t);return(e==n?M:e==r?N:vt)(t)}(e),l=c.length,h=l-1;for(o=(s?function(t,e,n){if(!pt(n))return!1;var o=typeof e;return!!("number"==o?ht(n)&&ft(e,n.length):"string"==o&&e in n)&&function(t,e){return t===e||t!=t&&e!=e}(n[e],t)}(e,o,s):void 0===o)?1:function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),t=t>=0?t:0),t}(function(e){var n=function(e){return e?(e=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||bt(t)&&"[object Symbol]"==P.call(t)}(t))return NaN;if(pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=f.test(t);return n||d.test(t)?F(t.slice(2),n?2:8):u.test(t)?NaN:+t}(e))===t||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}(e),o=n%1;return n==n?o?n-o:n:0}(o),0,l);++i<o;){var m=ct(i,h),p=c[m];c[m]=c[i],c[i]=p}return c.length=o,c}}());const $=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.dsotOzonContentClick=n(this,"dsotOzonContentClick",7),this.dsotTableOfContentsClick=n(this,"dsotTableOfContentsClick",3),this.showCanvas=!1,this.showBesluitversie=!1,this.openDefault=!1,this.mode="document",this.openOrClosed=[],this.openedAnnotation=[],this.filtered=[],this.notApplicable=[],this.activeAnnotationSelectables=[],this.handleRecursiveToggle=(t,e)=>{const n=this.getEmbeddedDocumentComponents(t);if(n)for(const t of n.documentComponents)this.handleOpenToggle(t,e.next)},this.DocumentComponent=({path:t})=>{const e=t.at(-1);if(!e||"table-of-contents"===this.mode&&"LID"===e.type)return o(r,null);const{DocumentComponent:n}=this,s=this.getEmbeddedDocumentComponents(e);let i,c,a,u,f;return this.hasNestedDraft(e)&&(this.showBesluitversie?(i="B",c="primary",a="Dit is een besluitversie."):(i="!",c="warning",a="Er zijn onderliggende onderdelen die veranderen binnen dit ontwerp.")),e.bevatOntwerpInformatie&&(this.showBesluitversie?(u="Besluitversie",f="primary"):(u="Ontwerp",f="warning")),o("dso-document-component",{annotated:this.isAnnotated(e),filtered:this.isOpen(e)?this.isFiltered(e):this.hasFilteredChildren(e),gereserveerd:e.gereserveerd,heading:"h2",kop:e.kop,inhoud:e.inhoud,openAnnotation:this.isOpenedAnnotation(e),notApplicable:this.isNotApplicable(e)||t.some((t=>this.isNotApplicable(t))),onDsoAnnotationToggle:()=>this.handleAnnotationToggle(e),onDsoOpenToggle:()=>this.handleOpenToggle(e),open:this.isOpen(e),type:e.type,vervallen:e.vervallen,wijzigactie:e.wijzigactie,recursiveToggle:this.recursiveToggleState(e),onDsoRecursiveToggle:t=>this.handleRecursiveToggle(e,t.detail),mode:this.mode,href:"table-of-contents"===this.mode?"/document/"+e.documentTechnischId:void 0,onDsoTableOfContentsClick:t=>this.handleTableOfContentsClick(t),onDsoOzonContentClick:t=>this.handleOzonContentClick(t),ozonContentUrlResolver:this.ozonContentUrlResolver,ozonContentBegripResolver:this.ozonContentBegripResolver,badge:i,badgeStatus:c,badgeTooltip:a,label:u,labelStatus:f},this.isOpenedAnnotation(e)&&o("div",{slot:"annotations"},o("dso-annotation-locatie",{active:this.isCheckedSlideToggle(e),"gewijzigde-locatie":!0,locatieNoemer:"Winkelgebied",onDsoActiveChange:()=>this.handleSelectableChange(e)},o("span",{class:"symboolcode",slot:"symbool","data-symboolcode":"vszt030"}))),this.showContent(e)&&s?.documentComponents.length&&o("ul",{class:"dso-document-component-list"},s.documentComponents.map((e=>o("li",{key:e.documentTechnischId},o(n,{path:[...t,e]}))))))},this.MenuButton=({documentComponent:t})=>{const{type:e}=t;return o("button",{type:"button",onClick:()=>this.document=t},o("span",null,o("i",null,e)))}}async jsonFileWatcher(){this.openOrClosed=[],await this.loadData()}async openDefaultWatcher(){this.openOrClosed=[],await this.loadData()}async componentDidLoad(){await this.loadData()}getEmbeddedDocumentComponents(t){return t?._embedded?.ontwerpDocumentComponenten?{documentComponents:t._embedded.ontwerpDocumentComponenten,ontwerp:!0}:t?._embedded?.documentComponenten?{documentComponents:t._embedded.documentComponenten,ontwerp:!1}:void 0}concatEmbeddedDocumentComponents(t){const e=[...this.getEmbeddedDocumentComponents(t)?.documentComponents??[]];for(const t of e)e.push(...this.concatEmbeddedDocumentComponents(t));return e}selectRandomDocumentComponents(t,e=[]){const n=this.concatEmbeddedDocumentComponents(t).filter((t=>!e.includes(t))),o=S(0,Math.floor(n.length/10));return T(n,o)}async loadData(){if(!this.jsonFile)return this.response=void 0,void(this.document=void 0);this.response=await fetch(this.jsonFile).then((t=>t.json())),this.document=this.getEmbeddedDocumentComponents(this.response)?.documentComponents[0],"LICHAAM"===this.document?.type?(this.notApplicable=this.selectRandomDocumentComponents(this.document),this.filtered=this.selectRandomDocumentComponents(this.document,this.notApplicable)):(this.notApplicable=[],this.filtered=[])}handleOpenToggle(t,e){const n="boolean"==typeof e?e:this.openOrClosed.includes(t);n&&this.openOrClosed.includes(t)?this.openOrClosed=this.openOrClosed.filter((e=>e!==t)):n||this.openOrClosed.includes(t)||(this.openOrClosed=[...this.openOrClosed,t])}handleAnnotationToggle(t){this.openedAnnotation=this.isOpenedAnnotation(t)?this.openedAnnotation.filter((e=>e!==t)):[...this.openedAnnotation,t],this.isOpen(t)||(this.openOrClosed=[...this.openOrClosed,t])}handleSelectableChange(t){this.activeAnnotationSelectables=this.isCheckedSlideToggle(t)?this.activeAnnotationSelectables.filter((e=>e!==t)):[...this.activeAnnotationSelectables,t]}handleOzonContentClick(t){this.dsotOzonContentClick.emit(t.detail)}handleTableOfContentsClick(t){this.dsotTableOfContentsClick.emit(t.detail)}isCheckedSlideToggle(t){return this.activeAnnotationSelectables.includes(t)}hasFilteredChildren(t){return this.filtered.includes(t)||(this.getEmbeddedDocumentComponents(t)?.documentComponents.some((t=>this.hasFilteredChildren(t)))??!1)}isOpen(t){return"LID"===t.type||this.openDefault?!this.openOrClosed.includes(t):this.openOrClosed.includes(t)}isOpenedAnnotation(t){return this.openedAnnotation.includes(t)}isFiltered(t){return this.filtered.includes(t)}isNotApplicable(t){return this.notApplicable.includes(t)}hasNestedDraft(t){return this.getEmbeddedDocumentComponents(t)?.documentComponents.some((t=>!!t.bevatOntwerpInformatie||this.hasNestedDraft(t)))??!1}showContent(t){return this.isOpen(t)&&!(!this.getEmbeddedDocumentComponents(t)?.documentComponents.length&&!t.inhoud)}recursiveToggleState(t){const e=this.getEmbeddedDocumentComponents(t);if(e&&!(e.documentComponents.length<=1)&&e.documentComponents.some((t=>"ARTIKEL"===t.type)))return e.documentComponents.every((t=>this.isOpen(t)))}isAnnotated(t){return"DIVISIE"===t.type||"DIVISIETEKST"===t.type||"ARTIKEL"===t.type||"LID"===t.type}render(){const{DocumentComponent:t,MenuButton:e}=this;return o("dso-responsive-element",{key:"8b44ff48fb7765722cb2aed05ef33b01fa894c5e",class:"dso-document-components"},o("div",{key:"3c21c41664841413f5cdbc4e5d6fecd89f984ded",class:"dso-navbar"},o("ul",{key:"d472b6e3fb32b57796520370a6cc5243d7ffe84c",class:"dso-nav dso-nav-sub"},this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((t=>o("li",{class:this.document===t?"dso-active":void 0},o(e,{documentComponent:t})))))),this.document&&o(t,{key:"a42283aeb135b57c722e3b7ace64c4029c55369d",path:[this.document]}))}static get watchers(){return{jsonFile:[{jsonFileWatcher:0}],openDefault:[{openDefaultWatcher:0}]}}static get style(){return".sc-dsot-document-component-demo-h{display:block;margin-block:0;margin-inline:8px;border-inline-start:1px dashed transparent;border-inline-end:1px dashed transparent}[show-canvas].sc-dsot-document-component-demo-h{border-inline-start:1px dashed pink;border-inline-end:1px dashed pink}"}},[2,"dsot-document-component-demo",{showCanvas:[516,"show-canvas"],showBesluitversie:[4,"show-besluitversie"],jsonFile:[1,"json-file"],openDefault:[4,"open-default"],mode:[513],ozonContentUrlResolver:[16],ozonContentBegripResolver:[16],response:[32],document:[32],openOrClosed:[32],openedAnnotation:[32],filtered:[32],notApplicable:[32],activeAnnotationSelectables:[32]},void 0,{jsonFile:[{jsonFileWatcher:0}],openDefault:[{openDefaultWatcher:0}]}]),F=$,I=function(){"undefined"!=typeof customElements&&["dsot-document-component-demo","dso-alert","dso-annotation-locatie","dso-badge","dso-document-component","dso-icon","dso-icon-button","dso-image-overlay","dso-label","dso-ozon-content","dso-ozon-content-toggletip","dso-panel","dso-renvooi","dso-responsive-element","dso-scrollable","dso-slide-toggle","dso-table","dso-tooltip"].forEach((t=>{switch(t){case"dsot-document-component-demo":customElements.get(s(t))||customElements.define(s(t),$);break;case"dso-alert":customElements.get(s(t))||u();break;case"dso-annotation-locatie":customElements.get(s(t))||f();break;case"dso-badge":customElements.get(s(t))||l();break;case"dso-document-component":customElements.get(s(t))||d();break;case"dso-icon":customElements.get(s(t))||h();break;case"dso-icon-button":customElements.get(s(t))||m();break;case"dso-image-overlay":customElements.get(s(t))||p();break;case"dso-label":customElements.get(s(t))||b();break;case"dso-ozon-content":customElements.get(s(t))||a();break;case"dso-ozon-content-toggletip":customElements.get(s(t))||v();break;case"dso-panel":customElements.get(s(t))||g();break;case"dso-renvooi":customElements.get(s(t))||y();break;case"dso-responsive-element":customElements.get(s(t))||j();break;case"dso-scrollable":customElements.get(s(t))||k();break;case"dso-slide-toggle":customElements.get(s(t))||C();break;case"dso-table":customElements.get(s(t))||E();break;case"dso-tooltip":customElements.get(s(t))||w()}}))};export{F as DsotDocumentComponentDemo,I as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as n,h as o,Fragment as r,transformTag as s}from"@stencil/core/internal/client";import{g as i,c as a,d as c}from"./ozon-content.js";import{d as u}from"./alert.js";import{d}from"./annotation-locatie.js";import{d as l}from"./badge.js";import{d as f}from"./document-component.js";import{d as h}from"./icon.js";import{d as m}from"./icon-button.js";import{d as p}from"./image-overlay.js";import{d as b}from"./label.js";import{d as v}from"./ozon-content-toggletip.js";import{d as g}from"./panel.js";import{d as y}from"./renvooi.js";import{d as j}from"./responsive-element.js";import{d as k}from"./scrollable.js";import{d as C}from"./slide-toggle.js";import{d as E}from"./table.js";import{d as w}from"./tooltip.js";var D,A,O,z,S=i(function(){if(A)return D;A=1;var t=1/0,e=9007199254740991,n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=/^(?:0|[1-9]\d*)$/,a=parseFloat,c=parseInt,u=Object.prototype.toString,d=Math.floor,l=Math.min,f=Math.random;function h(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(e){return e?(e=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(h(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=h(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var i=r.test(t);return i||s.test(t)?c(t.slice(2),i?2:8):o.test(t)?NaN:+t}(e))===t||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}return D=function(t,n,o){if(o&&"boolean"!=typeof o&&function(t,n,o){if(!h(o))return!1;var r=typeof n;return!!("number"==r?function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(t){var e=h(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(o)&&function(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<n}(n,o.length):"string"==r&&n in o)&&function(t,e){return t===e||t!=t&&e!=e}(o[n],t)}(t,n,o)&&(n=o=void 0),void 0===o&&("boolean"==typeof n?(o=n,n=void 0):"boolean"==typeof t&&(o=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=m(t),void 0===n?(n=t,t=0):n=m(n)),t>n){var r=t;t=n,n=r}if(o||t%1||n%1){var s=f();return l(t+s*(n-t+a("1e-"+((s+"").length-1))),n)}return function(t,e){return t+d(f()*(e-t+1))}(t,n)}}()),T=i(function(){if(z)return O;z=1;var t=1/0,e=9007199254740991,n="[object Map]",o="[object Promise]",r="[object Set]",s="[object WeakMap]",i="[object DataView]",c=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,l=/^\[object .+?Constructor\]$/,f=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,m="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",b="\\u20d0-\\u20f0",v="\\ufe0e\\ufe0f",g="["+m+"]",y="["+p+b+"]",j="\\ud83c[\\udffb-\\udfff]",k="[^"+m+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",D="(?:"+y+"|"+j+")?",A="["+v+"]?",S=A+D+"(?:"+w+"(?:"+[k,C,E].join("|")+")"+A+D+")*",T=RegExp(j+"(?="+j+")|(?:"+[k+y+"?",y,C,E,g].join("|")+")"+S,"g"),$=RegExp("["+w+m+p+b+v+"]"),F=parseInt,I="object"==typeof self&&self&&self.Object===Object&&self,x="object"==typeof a&&a&&a.Object===Object&&a||I||Function("return this")();function M(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n}function N(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var R=Function.prototype,W=Object.prototype,B=x["__core-js_shared__"],L=function(){var t=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),V=R.toString,K=W.hasOwnProperty,P=W.toString,G=RegExp("^"+V.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=x.Symbol,H=U?U.iterator:void 0,_=W.propertyIsEnumerable,q=Math.floor,J=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),Q=Math.random,X=ct(x,"DataView"),Y=ct(x,"Map"),Z=ct(x,"Promise"),tt=ct(x,"Set"),et=ct(x,"WeakMap"),nt=lt(X),ot=lt(Y),rt=lt(Z),st=lt(tt),it=lt(et);function at(t,e){return t+q(Q()*(e-t+1))}function ct(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){if(!pt(t)||function(t){return!!L&&L in t}(t))return!1;var e=mt(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?G:l;return e.test(lt(t))}(n)?n:void 0}var ut=function(t){return P.call(t)};function dt(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||h.test(t))&&t>-1&&t%1==0&&t<n}function lt(t){if(null!=t){try{return V.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(X&&ut(new X(new ArrayBuffer(1)))!=i||Y&&ut(new Y)!=n||Z&&ut(Z.resolve())!=o||tt&&ut(new tt)!=r||et&&ut(new et)!=s)&&(ut=function(t){var e=P.call(t),a="[object Object]"==e?t.constructor:void 0,c=a?lt(a):void 0;if(c)switch(c){case nt:return i;case ot:return n;case rt:return o;case st:return r;case it:return s}return e});var ft=Array.isArray;function ht(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!mt(t)}function mt(t){var e=pt(t)?P.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function pt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function bt(t){return!!t&&"object"==typeof t}function vt(t){return t?function(t,e){return function(t,e){for(var n=-1,o=t?t.length:0,r=Array(o);++n<o;)r[n]=e(t[n]);return r}(e,(function(e){return t[e]}))}(t,function(t){return ht(t)?function(t){var e=ft(t)||function(t){return function(t){return bt(t)&&ht(t)}(t)&&K.call(t,"callee")&&(!_.call(t,"callee")||"[object Arguments]"==P.call(t))}(t)?function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}(t.length,String):[],n=e.length,o=!!n;for(var r in t)!K.call(t,r)||o&&("length"==r||dt(r,n))||e.push(r);return e}(t):function(t){if(!function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||W)}(t))return J(t);var e=[];for(var n in Object(t))K.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}(t)):[]}return O=function(e,o,s){var i=-1,a=function(t){if(!t)return[];if(ht(t))return function(t){return"string"==typeof t||!ft(t)&&bt(t)&&"[object String]"==P.call(t)}(t)?function(t){return function(t){return $.test(t)}(t)?function(t){return t.match(T)||[]}(t):function(t){return t.split("")}(t)}(t):function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}(t);if(H&&t[H])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[H]());var e=ut(t);return(e==n?M:e==r?N:vt)(t)}(e),l=a.length,h=l-1;for(o=(s?function(t,e,n){if(!pt(n))return!1;var o=typeof e;return!!("number"==o?ht(n)&&dt(e,n.length):"string"==o&&e in n)&&function(t,e){return t===e||t!=t&&e!=e}(n[e],t)}(e,o,s):void 0===o)?1:function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),t=t>=0?t:0),t}(function(e){var n=function(e){return e?(e=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||bt(t)&&"[object Symbol]"==P.call(t)}(t))return NaN;if(pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=d.test(t);return n||f.test(t)?F(t.slice(2),n?2:8):u.test(t)?NaN:+t}(e))===t||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}(e),o=n%1;return n==n?o?n-o:n:0}(o),0,l);++i<o;){var m=at(i,h),p=a[m];a[m]=a[i],a[i]=p}return a.length=o,a}}());const $=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.dsotOzonContentClick=n(this,"dsotOzonContentClick",7),this.dsotTableOfContentsClick=n(this,"dsotTableOfContentsClick",3),this.showCanvas=!1,this.showBesluitversie=!1,this.openDefault=!1,this.mode="document",this.openOrClosed=[],this.openedAnnotation=[],this.filtered=[],this.notApplicable=[],this.activeAnnotationSelectables=[],this.handleRecursiveToggle=(t,e)=>{const n=this.getEmbeddedDocumentComponents(t);if(n)for(const t of n.documentComponents)this.handleOpenToggle(t,e.next)},this.DocumentComponent=({path:t})=>{const e=t.at(-1);if(!e||"table-of-contents"===this.mode&&"LID"===e.type)return o(r,null);const{DocumentComponent:n}=this,s=this.getEmbeddedDocumentComponents(e);let i,a,c,u,d;return this.hasNestedDraft(e)&&(this.showBesluitversie?(i="B",a="primary",c="Dit is een besluitversie."):(i="!",a="warning",c="Er zijn onderliggende onderdelen die veranderen binnen dit ontwerp.")),e.bevatOntwerpInformatie&&(this.showBesluitversie?(u="Besluitversie",d="primary"):(u="Ontwerp",d="warning")),o("dso-document-component",{annotated:this.isAnnotated(e),filtered:this.isOpen(e)?this.isFiltered(e):this.hasFilteredChildren(e),gereserveerd:e.gereserveerd,heading:"h2",kop:e.kop,inhoud:e.inhoud,openAnnotation:this.isOpenedAnnotation(e),notApplicable:this.isNotApplicable(e)||t.some((t=>this.isNotApplicable(t))),onDsoAnnotationToggle:t=>this.handleAnnotationToggle(e,t.detail),onDsoOpenToggle:()=>this.handleOpenToggle(e),open:this.isOpen(e),type:e.type,vervallen:e.vervallen,wijzigactie:e.wijzigactie,recursiveToggle:this.recursiveToggleState(e),onDsoRecursiveToggle:t=>this.handleRecursiveToggle(e,t.detail),mode:this.mode,href:"table-of-contents"===this.mode?"/document/"+e.documentTechnischId:void 0,onDsoTableOfContentsClick:t=>this.handleTableOfContentsClick(t),onDsoOzonContentClick:t=>this.handleOzonContentClick(t),ozonContentUrlResolver:this.ozonContentUrlResolver,ozonContentBegripResolver:this.ozonContentBegripResolver,badge:i,badgeStatus:a,badgeTooltip:c,label:u,labelStatus:d},this.isOpenedAnnotation(e)&&o("div",{slot:"annotations"},o("dso-annotation-locatie",{active:this.isCheckedSlideToggle(e),"gewijzigde-locatie":!0,locatieNoemer:"Winkelgebied",onDsoActiveChange:()=>this.handleSelectableChange(e)},o("span",{class:"symboolcode",slot:"symbool","data-symboolcode":"vszt030"}))),this.showContent(e)&&s?.documentComponents.length&&o("ul",{class:"dso-document-component-list"},s.documentComponents.map((e=>o("li",{key:e.documentTechnischId},o(n,{path:[...t,e]}))))))},this.MenuButton=({documentComponent:t})=>{const{type:e}=t;return o("button",{type:"button",onClick:()=>this.document=t},o("span",null,o("i",null,e)))}}async jsonFileWatcher(){this.openOrClosed=[],await this.loadData()}async openDefaultWatcher(){this.openOrClosed=[],await this.loadData()}async componentDidLoad(){await this.loadData()}getEmbeddedDocumentComponents(t){return t?._embedded?.ontwerpDocumentComponenten?{documentComponents:t._embedded.ontwerpDocumentComponenten,ontwerp:!0}:t?._embedded?.documentComponenten?{documentComponents:t._embedded.documentComponenten,ontwerp:!1}:void 0}concatEmbeddedDocumentComponents(t){const e=[...this.getEmbeddedDocumentComponents(t)?.documentComponents??[]];for(const t of e)e.push(...this.concatEmbeddedDocumentComponents(t));return e}selectRandomDocumentComponents(t,e=[]){const n=this.concatEmbeddedDocumentComponents(t).filter((t=>!e.includes(t))),o=S(0,Math.floor(n.length/10));return T(n,o)}async loadData(){if(!this.jsonFile)return this.response=void 0,void(this.document=void 0);this.response=await fetch(this.jsonFile).then((t=>t.json())),this.document=this.getEmbeddedDocumentComponents(this.response)?.documentComponents[0],"LICHAAM"===this.document?.type?(this.notApplicable=this.selectRandomDocumentComponents(this.document),this.filtered=this.selectRandomDocumentComponents(this.document,this.notApplicable)):(this.notApplicable=[],this.filtered=[])}handleOpenToggle(t,e){const n="boolean"==typeof e?e:this.openOrClosed.includes(t);n&&this.openOrClosed.includes(t)?this.openOrClosed=this.openOrClosed.filter((e=>e!==t)):n||this.openOrClosed.includes(t)||(this.openOrClosed=[...this.openOrClosed,t])}handleAnnotationToggle(t,e){this.openedAnnotation=this.isOpenedAnnotation(t)&&!e.next?this.openedAnnotation.filter((e=>e!==t)):[...this.openedAnnotation,t],this.isOpen(t)||(this.openOrClosed=[...this.openOrClosed,t])}handleSelectableChange(t){this.activeAnnotationSelectables=this.isCheckedSlideToggle(t)?this.activeAnnotationSelectables.filter((e=>e!==t)):[...this.activeAnnotationSelectables,t]}handleOzonContentClick(t){this.dsotOzonContentClick.emit(t.detail)}handleTableOfContentsClick(t){this.dsotTableOfContentsClick.emit(t.detail)}isCheckedSlideToggle(t){return this.activeAnnotationSelectables.includes(t)}hasFilteredChildren(t){return this.filtered.includes(t)||(this.getEmbeddedDocumentComponents(t)?.documentComponents.some((t=>this.hasFilteredChildren(t)))??!1)}isOpen(t){return"LID"===t.type||this.openDefault?!this.openOrClosed.includes(t):this.openOrClosed.includes(t)}isOpenedAnnotation(t){return this.openedAnnotation.includes(t)}isFiltered(t){return this.filtered.includes(t)}isNotApplicable(t){return this.notApplicable.includes(t)}hasNestedDraft(t){return this.getEmbeddedDocumentComponents(t)?.documentComponents.some((t=>!!t.bevatOntwerpInformatie||this.hasNestedDraft(t)))??!1}showContent(t){return this.isOpen(t)&&!(!this.getEmbeddedDocumentComponents(t)?.documentComponents.length&&!t.inhoud)}recursiveToggleState(t){const e=this.getEmbeddedDocumentComponents(t);if(e&&!(e.documentComponents.length<=1)&&e.documentComponents.some((t=>"ARTIKEL"===t.type)))return e.documentComponents.every((t=>this.isOpen(t)))}isAnnotated(t){return"DIVISIE"===t.type||"DIVISIETEKST"===t.type||"ARTIKEL"===t.type||"LID"===t.type}render(){const{DocumentComponent:t,MenuButton:e}=this;return o("dso-responsive-element",{key:"d1937ffbb63cdc56a53879d54060786eaaa8fb17",class:"dso-document-components"},o("div",{key:"83911e6a6d08925bddcab009736a8fd6d6ef4810",class:"dso-navbar"},o("ul",{key:"e5cc14968a0f91ba52cc466eb45224a5e1229a2e",class:"dso-nav dso-nav-sub"},this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((t=>o("li",{class:this.document===t?"dso-active":void 0},o(e,{documentComponent:t})))))),this.document&&o(t,{key:"82f1e4a26dcf02c40b08c46dc03bbb4aa4c99d7a",path:[this.document]}))}static get watchers(){return{jsonFile:[{jsonFileWatcher:0}],openDefault:[{openDefaultWatcher:0}]}}static get style(){return".sc-dsot-document-component-demo-h{display:block;margin-block:0;margin-inline:8px;border-inline-start:1px dashed transparent;border-inline-end:1px dashed transparent}[show-canvas].sc-dsot-document-component-demo-h{border-inline-start:1px dashed pink;border-inline-end:1px dashed pink}"}},[2,"dsot-document-component-demo",{showCanvas:[516,"show-canvas"],showBesluitversie:[4,"show-besluitversie"],jsonFile:[1,"json-file"],openDefault:[4,"open-default"],mode:[513],ozonContentUrlResolver:[16],ozonContentBegripResolver:[16],response:[32],document:[32],openOrClosed:[32],openedAnnotation:[32],filtered:[32],notApplicable:[32],activeAnnotationSelectables:[32]},void 0,{jsonFile:[{jsonFileWatcher:0}],openDefault:[{openDefaultWatcher:0}]}]),F=$,I=function(){"undefined"!=typeof customElements&&["dsot-document-component-demo","dso-alert","dso-annotation-locatie","dso-badge","dso-document-component","dso-icon","dso-icon-button","dso-image-overlay","dso-label","dso-ozon-content","dso-ozon-content-toggletip","dso-panel","dso-renvooi","dso-responsive-element","dso-scrollable","dso-slide-toggle","dso-table","dso-tooltip"].forEach((t=>{switch(t){case"dsot-document-component-demo":customElements.get(s(t))||customElements.define(s(t),$);break;case"dso-alert":customElements.get(s(t))||u();break;case"dso-annotation-locatie":customElements.get(s(t))||d();break;case"dso-badge":customElements.get(s(t))||l();break;case"dso-document-component":customElements.get(s(t))||f();break;case"dso-icon":customElements.get(s(t))||h();break;case"dso-icon-button":customElements.get(s(t))||m();break;case"dso-image-overlay":customElements.get(s(t))||p();break;case"dso-label":customElements.get(s(t))||b();break;case"dso-ozon-content":customElements.get(s(t))||c();break;case"dso-ozon-content-toggletip":customElements.get(s(t))||v();break;case"dso-panel":customElements.get(s(t))||g();break;case"dso-renvooi":customElements.get(s(t))||y();break;case"dso-responsive-element":customElements.get(s(t))||j();break;case"dso-scrollable":customElements.get(s(t))||k();break;case"dso-slide-toggle":customElements.get(s(t))||C();break;case"dso-table":customElements.get(s(t))||E();break;case"dso-tooltip":customElements.get(s(t))||w()}}))};export{F as DsotDocumentComponentDemo,I as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as o,h as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as o,h as e,Fragment as i,transformTag as n}from"@stencil/core/internal/client";import{p as s,T as r}from"./tooltip.functional-component.js";import{d as l}from"./icon.js";const a=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.active=!1,this.toggle=()=>{this.active=!this.active},this.keyDownHandler=t=>{switch(t.key){case"Escape":case" ":case"Enter":return void this.toggle();default:return}}}handleWindowClick(t){if(!this.active)return;const e=t.composedPath(),i=e.includes(this.host),n=this.tooltip&&e.includes(this.tooltip);i||n||this.toggle(),n&&e.some((t=>t instanceof o&&"BUTTON"===t.tagName))&&this.toggle()}componentDidRender(){!this.cleanUp&&this.active&&this.container&&this.tooltip&&this.tooltipArrow&&(this.cleanUp=s({referenceElement:this.container,tipRef:this.tooltip,tipArrowRef:this.tooltipArrow,placementTip:"top"})),this.cleanUp&&this.tooltip&&(this.active?this.tooltip?.showPopover():(this.tooltip?.hidePopover(),this.cleanupTooltip()))}disconnectedCallback(){this.cleanupTooltip()}cleanupTooltip(){this.cleanUp?.(),this.cleanUp=void 0}render(){return e(i,{key:"8fcf09bafea0c5063a216b5fc062ffe851a9221f"},e("span",{key:"b01a1be6bfb5d46eb2560ff4388e88dafe685137",class:"toggletip-button",role:"button",tabindex:0,onClick:this.toggle,onKeyDown:this.keyDownHandler,ref:t=>this.container=t},this.icon&&e(i,{key:"c4dcac1d94dcd0fc138db4602d8cec7340b5076f"},e("span",{key:"e2bc7ba3fe07a594579b609d62f0fdef490401b4",class:"toggletip-label"},e("slot",{key:"836eb4e41db00abfe22640ef008a7faf642f0866",name:"label"})),"",e("dso-icon",{key:"2064a11231188c72dd1794a3054dd300d7116044",icon:this.icon})),!this.icon&&e("slot",{key:"1bb82554c188416f5d8d012659f4adecce66995d",name:"label"})),e(r,{key:"f46fcc6671d46b0bfd62bfdcb78e2e909c34d7e6",visible:!0,onAfterHidden:()=>{},tipElementRef:t=>this.tooltip=t,tipArrowElementRef:t=>this.tooltipArrow=t},e("slot",{key:"0dd70e1864d5c19fd840871a2bb05b76551ea4b4"})))}get host(){return this}static get style(){return"*,*::after,*::before{box-sizing:border-box}.dso-tooltip{--_dso-alert-success-border-color:initial;--_dso-alert-error-border-color:initial;--_dso-alert-info-border-color:initial;--_dso-alert-warning-border-color:initial;background-color:#fff;color:#191919;border-radius:4px;overflow:unset;margin:0;border:0;padding:0;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));opacity:0;visibility:hidden;transition:opacity 0.15s;max-inline-size:480px}.dso-tooltip.visible{opacity:1;visibility:visible}.dso-tooltip .tooltip-inner{--_dt-span-role-paragraph-margin-block:8px;--_dso-alert-success-border-color:initial;--_dso-alert-error-border-color:initial;--_dso-alert-info-border-color:initial;--_dso-alert-warning-border-color:initial;background-color:#fff;color:#191919;font-family:Asap, sans-serif;font-size:1rem;font-weight:normal;padding-block:8px;padding-inline:16px;border-radius:4px;line-height:1.5}.dso-tooltip .tooltip-arrow{position:absolute;background-color:#fff;border-start-start-radius:4px;block-size:10px;inline-size:10px;pointer-events:none;z-index:-1}:host{display:inline;--_dt-rich-content-margin-block:8px}::slotted(:not([slot=label])){cursor:default !important}.toggletip-button{display:inline-block;font-size:1em;font-weight:500;margin-block-end:0;text-decoration:none;touch-action:manipulation;text-align:start;user-select:none;vertical-align:middle;background-clip:padding-box}.toggletip-button:focus,.toggletip-button:focus-visible{outline-offset:2px}.toggletip-button:active{outline:0}.toggletip-button{border:0;color:var(--_dso-ozon-content-toggletip-color, #2b5780);line-height:1;padding:0;background-color:transparent;cursor:pointer;vertical-align:baseline;display:inline;overflow-wrap:break-word;user-select:text;white-space:nowrap}.toggletip-button,.toggletip-button:hover,.toggletip-button:focus-visible,.toggletip-button:active{text-decoration-line:var(--_dso-ozon-content-toggletip-text-decoration, underline);text-decoration-style:dotted;text-underline-offset:15%}.toggletip-button .toggletip-label{white-space:normal}.toggletip-button dso-icon{margin-inline-start:4px}"}},[257,"dso-ozon-content-toggletip",{icon:[513],active:[32]},[[8,"click","handleWindowClick"]]]);function c(){"undefined"!=typeof customElements&&["dso-ozon-content-toggletip","dso-icon"].forEach((t=>{switch(t){case"dso-ozon-content-toggletip":customElements.get(n(t))||customElements.define(n(t),a);break;case"dso-icon":customElements.get(n(t))||l()}}))}export{c as d,a as o}
|