@dso-toolkit/core 55.0.0 → 56.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +31 -88
- package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-accordion.cjs.entry.js +197 -107
- package/dist/cjs/dso-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-alert_5.cjs.entry.js +721 -0
- package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js +143 -0
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-expandable.cjs.entry.js +16 -35
- package/dist/cjs/dso-expandable.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +110 -0
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/accordion/accordion.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/accordion.js +9 -254
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +31 -31
- package/dist/collection/components/accordion/components/accordion-section.interfaces.js.map +1 -1
- package/dist/collection/components/accordion/components/accordion-section.js +69 -127
- package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
- package/dist/collection/components/annotation-button/annotation-button.css +1003 -0
- package/dist/collection/components/annotation-button/annotation-button.js +48 -7
- package/dist/collection/components/annotation-button/annotation-button.js.map +1 -1
- package/dist/collection/components/annotation-output/annotation-output.css +2 -2
- package/dist/collection/components/annotation-output/annotation-output.js +32 -64
- package/dist/collection/components/annotation-output/annotation-output.js.map +1 -1
- package/dist/collection/components/document-component/document-component-heading.js +30 -0
- package/dist/collection/components/document-component/document-component-heading.js.map +1 -0
- package/dist/collection/components/document-component/document-component.css +135 -0
- package/dist/collection/components/document-component/document-component.demo.js +112 -0
- package/dist/collection/components/document-component/document-component.demo.js.map +1 -0
- package/dist/collection/components/document-component/document-component.js +414 -0
- package/dist/collection/components/document-component/document-component.js.map +1 -0
- package/dist/collection/components/document-component/document-component.types.js +2 -0
- package/dist/collection/components/document-component/document-component.types.js.map +1 -0
- package/dist/collection/components/expandable/expandable.js +27 -93
- package/dist/collection/components/expandable/expandable.js.map +1 -1
- package/dist/collection/components/label/label.js +42 -33
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +9 -1
- package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content.css +49 -1
- package/dist/collection/components/ozon-content/ozon-content.js +1 -1
- package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/{esm/dso-alert.entry.js → components/alert.js} +33 -9
- package/dist/components/alert.js.map +1 -0
- package/dist/components/annotation-button.js +46 -0
- package/dist/components/annotation-button.js.map +1 -0
- package/dist/components/annotation-output.js +60 -0
- package/dist/components/annotation-output.js.map +1 -0
- package/dist/{esm/dso-badge.entry.js → components/badge.js} +26 -9
- package/dist/components/badge.js.map +1 -0
- package/dist/components/document-component.js +163 -0
- package/dist/components/document-component.js.map +1 -0
- package/dist/components/dso-accordion-section.js +36 -95
- package/dist/components/dso-accordion-section.js.map +1 -1
- package/dist/components/dso-accordion.js +199 -113
- package/dist/components/dso-accordion.js.map +1 -1
- package/dist/components/dso-alert.js +1 -50
- package/dist/components/dso-alert.js.map +1 -1
- package/dist/components/dso-annotation-button.js +1 -40
- package/dist/components/dso-annotation-button.js.map +1 -1
- package/dist/components/dso-annotation-output.js +1 -71
- package/dist/components/dso-annotation-output.js.map +1 -1
- package/dist/components/dso-autosuggest.js +1 -1
- package/dist/components/dso-badge.js +1 -32
- package/dist/components/dso-badge.js.map +1 -1
- package/dist/components/dso-document-component.d.ts +11 -0
- package/dist/components/dso-document-component.js +8 -0
- package/dist/components/dso-document-component.js.map +1 -0
- package/dist/components/dso-header.js +1 -1
- package/dist/components/dso-image-overlay.js +1 -1
- package/dist/components/dso-label.js +1 -161
- package/dist/components/dso-label.js.map +1 -1
- package/dist/components/dso-ozon-content.js +1 -544
- package/dist/components/dso-ozon-content.js.map +1 -1
- package/dist/components/dso-slide-toggle.js +1 -52
- package/dist/components/dso-slide-toggle.js.map +1 -1
- package/dist/components/dso-table.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/dsot-document-component-demo.d.ts +11 -0
- package/dist/components/dsot-document-component-demo.js +202 -0
- package/dist/components/dsot-document-component-demo.js.map +1 -0
- package/dist/components/expandable.js +18 -39
- package/dist/components/expandable.js.map +1 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +61 -185
- package/dist/components/index2.js.map +1 -1
- package/dist/{esm/dso-label.entry.js → components/label.js} +82 -41
- package/dist/components/label.js.map +1 -0
- package/dist/{esm/dso-ozon-content.entry.js → components/ozon-content.js} +43 -14
- package/dist/components/ozon-content.js.map +1 -0
- package/dist/components/scrollable.js +1 -1
- package/dist/{esm/dso-slide-toggle.entry.js → components/slide-toggle.js} +31 -10
- package/dist/{dso-toolkit/p-b1627d68.entry.js.map → components/slide-toggle.js.map} +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/p-021589dc.entry.js +2 -0
- package/dist/dso-toolkit/p-021589dc.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-12c3fc19.entry.js → p-05ea1fba.entry.js} +2 -2
- package/dist/dso-toolkit/{p-657c43f4.entry.js → p-0e5a93c3.entry.js} +2 -2
- package/dist/dso-toolkit/p-14453f73.entry.js +2 -0
- package/dist/dso-toolkit/p-14453f73.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-63ce173c.entry.js → p-168750a2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-904a2caf.entry.js → p-29752a45.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9c2d4a91.entry.js → p-29b741cb.entry.js} +2 -2
- package/dist/dso-toolkit/{p-fdf8bd94.entry.js → p-3c554a18.entry.js} +2 -2
- package/dist/dso-toolkit/{p-d4f8e1e0.entry.js → p-3fa7489e.entry.js} +2 -2
- package/dist/dso-toolkit/{p-fa6d8d5a.entry.js → p-422bcf93.entry.js} +2 -2
- package/dist/dso-toolkit/p-42d3c595.entry.js +2 -0
- package/dist/dso-toolkit/{p-1d3ed808.entry.js.map → p-42d3c595.entry.js.map} +1 -1
- package/dist/dso-toolkit/p-5265e22b.entry.js +2 -0
- package/dist/dso-toolkit/p-56d87a53.entry.js +2 -0
- package/dist/dso-toolkit/p-56d87a53.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-71143eef.entry.js → p-6050e8e6.entry.js} +2 -2
- package/dist/dso-toolkit/{p-5040a304.entry.js → p-674e2406.entry.js} +2 -2
- package/dist/dso-toolkit/{p-2bd5d2a2.entry.js → p-68e9f61b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-f70d6a66.entry.js → p-818d032e.entry.js} +2 -2
- package/dist/dso-toolkit/{p-a4e3638a.entry.js → p-83cdfde8.entry.js} +2 -2
- package/dist/dso-toolkit/p-88f4366e.entry.js +2 -0
- package/dist/dso-toolkit/p-88f4366e.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-8f166691.entry.js → p-909ccf98.entry.js} +2 -2
- package/dist/dso-toolkit/{p-58bed94b.entry.js → p-9b587a94.entry.js} +2 -2
- package/dist/dso-toolkit/p-9c0477fc.entry.js +2 -0
- package/dist/dso-toolkit/{p-56069350.entry.js.map → p-9c0477fc.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-79767cc1.entry.js → p-9f2bb98b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-6e0b67c9.entry.js → p-9fee52e5.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9b14a015.entry.js → p-a616ab8a.entry.js} +2 -2
- package/dist/dso-toolkit/{p-ef23bffb.entry.js → p-b627d9ac.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9d64a2f4.entry.js → p-b67631ef.entry.js} +2 -2
- package/dist/dso-toolkit/{p-0653b5d2.entry.js → p-bcae3f55.entry.js} +2 -2
- package/dist/dso-toolkit/{p-b1b53cb3.entry.js → p-bf203ab8.entry.js} +2 -2
- package/dist/dso-toolkit/{p-ee2771d4.entry.js → p-c8165a50.entry.js} +2 -2
- package/dist/dso-toolkit/{p-26cdce1c.js → p-ce928197.js} +2 -2
- package/dist/dso-toolkit/{p-601b4ce0.entry.js → p-cfd6f4ef.entry.js} +2 -2
- package/dist/dso-toolkit/{p-b6f1ae13.entry.js → p-d3f69d06.entry.js} +2 -2
- package/dist/dso-toolkit/{p-554e7d6a.entry.js → p-d4320890.entry.js} +2 -2
- package/dist/dso-toolkit/{p-554e7d6a.entry.js.map → p-d4320890.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-3ab9390b.entry.js → p-d8c137b5.entry.js} +2 -2
- package/dist/dso-toolkit/p-debbe184.entry.js +2 -0
- package/dist/dso-toolkit/{p-c3178955.entry.js.map → p-debbe184.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-7098eb9d.entry.js → p-f56c1b28.entry.js} +2 -2
- package/dist/dso-toolkit/p-f56c1b28.entry.js.map +1 -0
- package/dist/dso-toolkit/p-fafa5ea1.entry.js +2 -0
- package/dist/dso-toolkit/p-fafa5ea1.entry.js.map +1 -0
- package/dist/esm/dso-accordion-section.entry.js +32 -89
- package/dist/esm/dso-accordion-section.entry.js.map +1 -1
- package/dist/esm/dso-accordion.entry.js +198 -108
- package/dist/esm/dso-accordion.entry.js.map +1 -1
- package/dist/esm/dso-action-list-item.entry.js +1 -1
- package/dist/esm/dso-action-list.entry.js +1 -1
- package/dist/esm/dso-alert_5.entry.js +713 -0
- package/dist/esm/dso-alert_5.entry.js.map +1 -0
- package/dist/esm/dso-annotation-output_3.entry.js +137 -0
- package/dist/esm/dso-annotation-output_3.entry.js.map +1 -0
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +1 -1
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +1 -1
- package/dist/esm/dso-expandable.entry.js +17 -36
- package/dist/esm/dso-expandable.entry.js.map +1 -1
- package/dist/esm/dso-header.entry.js +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +1 -1
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +1 -1
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js +1 -1
- package/dist/esm/dso-table.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +3 -3
- 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 +2 -2
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +106 -0
- package/dist/esm/dsot-document-component-demo.entry.js.map +1 -0
- package/dist/esm/{index-898d8443.js → index-367cff36.js} +2 -2
- package/dist/esm/{index-898d8443.js.map → index-367cff36.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/accordion/accordion.d.ts +6 -39
- package/dist/types/components/accordion/accordion.interfaces.d.ts +2 -18
- package/dist/types/components/accordion/components/accordion-section.d.ts +15 -19
- package/dist/types/components/accordion/components/accordion-section.interfaces.d.ts +22 -0
- package/dist/types/components/annotation-button/annotation-button.d.ts +15 -4
- package/dist/types/components/annotation-output/annotation-output.d.ts +7 -5
- package/dist/types/components/document-component/document-component-heading.d.ts +7 -0
- package/dist/types/components/document-component/document-component.d.ts +84 -0
- package/dist/types/components/document-component/document-component.demo.d.ts +40 -0
- package/dist/types/components/document-component/document-component.types.d.ts +8 -0
- package/dist/types/components/expandable/expandable.d.ts +5 -12
- package/dist/types/components/label/label.d.ts +9 -9
- package/dist/types/components.d.ts +235 -127
- package/package.json +2 -2
- package/dist/cjs/annotation.service-60e6b0f1.js +0 -23
- package/dist/cjs/annotation.service-60e6b0f1.js.map +0 -1
- package/dist/cjs/dso-alert.cjs.entry.js +0 -34
- package/dist/cjs/dso-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-annotation-button.cjs.entry.js +0 -27
- package/dist/cjs/dso-annotation-button.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-annotation-output.cjs.entry.js +0 -44
- package/dist/cjs/dso-annotation-output.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-badge.cjs.entry.js +0 -23
- package/dist/cjs/dso-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-expandable-heading.cjs.entry.js +0 -54
- package/dist/cjs/dso-expandable-heading.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-label.cjs.entry.js +0 -130
- package/dist/cjs/dso-label.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +0 -532
- package/dist/cjs/dso-ozon-content.cjs.entry.js.map +0 -1
- package/dist/cjs/dso-slide-toggle.cjs.entry.js +0 -39
- package/dist/cjs/dso-slide-toggle.cjs.entry.js.map +0 -1
- package/dist/cjs/index-a189d603.js +0 -198
- package/dist/cjs/index-a189d603.js.map +0 -1
- package/dist/collection/components/annotation-output/annotation-output.interfaces.js +0 -2
- package/dist/collection/components/annotation-output/annotation-output.interfaces.js.map +0 -1
- package/dist/collection/components/expandable/expandable.functions.js +0 -4
- package/dist/collection/components/expandable/expandable.functions.js.map +0 -1
- package/dist/collection/components/expandable-heading/expandable-heading.css +0 -200
- package/dist/collection/components/expandable-heading/expandable-heading.interfaces.js +0 -2
- package/dist/collection/components/expandable-heading/expandable-heading.interfaces.js.map +0 -1
- package/dist/collection/components/expandable-heading/expandable-heading.js +0 -163
- package/dist/collection/components/expandable-heading/expandable-heading.js.map +0 -1
- package/dist/collection/components/expandable-heading/heading.js +0 -17
- package/dist/collection/components/expandable-heading/heading.js.map +0 -1
- package/dist/collection/services/annotation.service.js +0 -17
- package/dist/collection/services/annotation.service.js.map +0 -1
- package/dist/components/annotation.service.js +0 -21
- package/dist/components/annotation.service.js.map +0 -1
- package/dist/components/dso-expandable-heading.d.ts +0 -11
- package/dist/components/dso-expandable-heading.js +0 -86
- package/dist/components/dso-expandable-heading.js.map +0 -1
- package/dist/components/index3.js +0 -72
- package/dist/components/index3.js.map +0 -1
- package/dist/dso-toolkit/p-0c762ac9.entry.js +0 -2
- package/dist/dso-toolkit/p-0c762ac9.entry.js.map +0 -1
- package/dist/dso-toolkit/p-0ffae824.entry.js +0 -2
- package/dist/dso-toolkit/p-0ffae824.entry.js.map +0 -1
- package/dist/dso-toolkit/p-1d3ed808.entry.js +0 -2
- package/dist/dso-toolkit/p-26713aef.js +0 -2
- package/dist/dso-toolkit/p-26713aef.js.map +0 -1
- package/dist/dso-toolkit/p-52f2be73.entry.js +0 -2
- package/dist/dso-toolkit/p-52f2be73.entry.js.map +0 -1
- package/dist/dso-toolkit/p-56069350.entry.js +0 -2
- package/dist/dso-toolkit/p-59ff4e19.entry.js +0 -2
- package/dist/dso-toolkit/p-59ff4e19.entry.js.map +0 -1
- package/dist/dso-toolkit/p-7098eb9d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-835a599b.entry.js +0 -2
- package/dist/dso-toolkit/p-91453b47.entry.js +0 -2
- package/dist/dso-toolkit/p-91453b47.entry.js.map +0 -1
- package/dist/dso-toolkit/p-9eccd618.js +0 -2
- package/dist/dso-toolkit/p-9eccd618.js.map +0 -1
- package/dist/dso-toolkit/p-b1627d68.entry.js +0 -2
- package/dist/dso-toolkit/p-c3178955.entry.js +0 -2
- package/dist/dso-toolkit/p-c464da66.entry.js +0 -2
- package/dist/dso-toolkit/p-c464da66.entry.js.map +0 -1
- package/dist/dso-toolkit/p-c4e1c7cb.entry.js +0 -2
- package/dist/dso-toolkit/p-c4e1c7cb.entry.js.map +0 -1
- package/dist/dso-toolkit/p-dd9e9c47.entry.js +0 -2
- package/dist/dso-toolkit/p-dd9e9c47.entry.js.map +0 -1
- package/dist/dso-toolkit/p-de310a49.entry.js +0 -2
- package/dist/dso-toolkit/p-de310a49.entry.js.map +0 -1
- package/dist/esm/annotation.service-cd25eba0.js +0 -21
- package/dist/esm/annotation.service-cd25eba0.js.map +0 -1
- package/dist/esm/dso-alert.entry.js.map +0 -1
- package/dist/esm/dso-annotation-button.entry.js +0 -23
- package/dist/esm/dso-annotation-button.entry.js.map +0 -1
- package/dist/esm/dso-annotation-output.entry.js +0 -40
- package/dist/esm/dso-annotation-output.entry.js.map +0 -1
- package/dist/esm/dso-badge.entry.js.map +0 -1
- package/dist/esm/dso-expandable-heading.entry.js +0 -50
- package/dist/esm/dso-expandable-heading.entry.js.map +0 -1
- package/dist/esm/dso-label.entry.js.map +0 -1
- package/dist/esm/dso-ozon-content.entry.js.map +0 -1
- package/dist/esm/dso-slide-toggle.entry.js.map +0 -1
- package/dist/esm/index-b57dbe04.js +0 -196
- package/dist/esm/index-b57dbe04.js.map +0 -1
- package/dist/types/components/annotation-output/annotation-output.interfaces.d.ts +0 -4
- package/dist/types/components/expandable/expandable.functions.d.ts +0 -1
- package/dist/types/components/expandable-heading/expandable-heading.d.ts +0 -33
- package/dist/types/components/expandable-heading/expandable-heading.interfaces.d.ts +0 -6
- package/dist/types/components/expandable-heading/heading.d.ts +0 -9
- package/dist/types/services/annotation.service.d.ts +0 -10
- /package/dist/dso-toolkit/{p-12c3fc19.entry.js.map → p-05ea1fba.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-657c43f4.entry.js.map → p-0e5a93c3.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-63ce173c.entry.js.map → p-168750a2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-904a2caf.entry.js.map → p-29752a45.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9c2d4a91.entry.js.map → p-29b741cb.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-fdf8bd94.entry.js.map → p-3c554a18.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-d4f8e1e0.entry.js.map → p-3fa7489e.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-fa6d8d5a.entry.js.map → p-422bcf93.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-835a599b.entry.js.map → p-5265e22b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-71143eef.entry.js.map → p-6050e8e6.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-5040a304.entry.js.map → p-674e2406.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-2bd5d2a2.entry.js.map → p-68e9f61b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f70d6a66.entry.js.map → p-818d032e.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-a4e3638a.entry.js.map → p-83cdfde8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-8f166691.entry.js.map → p-909ccf98.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-58bed94b.entry.js.map → p-9b587a94.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-79767cc1.entry.js.map → p-9f2bb98b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-6e0b67c9.entry.js.map → p-9fee52e5.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9b14a015.entry.js.map → p-a616ab8a.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-ef23bffb.entry.js.map → p-b627d9ac.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9d64a2f4.entry.js.map → p-b67631ef.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-0653b5d2.entry.js.map → p-bcae3f55.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-b1b53cb3.entry.js.map → p-bf203ab8.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-ee2771d4.entry.js.map → p-c8165a50.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-26cdce1c.js.map → p-ce928197.js.map} +0 -0
- /package/dist/dso-toolkit/{p-601b4ce0.entry.js.map → p-cfd6f4ef.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-b6f1ae13.entry.js.map → p-d3f69d06.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-3ab9390b.entry.js.map → p-d8c137b5.entry.js.map} +0 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { h, Fragment } from "@stencil/core";
|
|
2
|
+
import { Heading } from "./document-component-heading";
|
|
3
|
+
const wijzigActieLabels = {
|
|
4
|
+
nieuweContainer: "Toegevoegd",
|
|
5
|
+
verwijder: "Verwijderd",
|
|
6
|
+
verwijderContainer: "Verwijderd",
|
|
7
|
+
voegtoe: "Toegevoegd",
|
|
8
|
+
};
|
|
9
|
+
export class DocumentComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.handleHeadingClick = (e) => {
|
|
12
|
+
if (this.type !== "LID") {
|
|
13
|
+
this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
this.heading = "h2";
|
|
17
|
+
this.label = undefined;
|
|
18
|
+
this.nummer = undefined;
|
|
19
|
+
this.opschrift = undefined;
|
|
20
|
+
this.inhoud = undefined;
|
|
21
|
+
this.open = false;
|
|
22
|
+
this.filtered = false;
|
|
23
|
+
this.notApplicable = false;
|
|
24
|
+
this.genesteOntwerpInformatie = false;
|
|
25
|
+
this.bevatOntwerpInformatie = false;
|
|
26
|
+
this.annotated = false;
|
|
27
|
+
this.gereserveerd = false;
|
|
28
|
+
this.vervallen = false;
|
|
29
|
+
this.openAnnotation = false;
|
|
30
|
+
this.alternativeTitle = undefined;
|
|
31
|
+
this.type = undefined;
|
|
32
|
+
this.wijzigactie = undefined;
|
|
33
|
+
}
|
|
34
|
+
get wijzigactieLabel() {
|
|
35
|
+
return this.wijzigactie && wijzigActieLabels[this.wijzigactie];
|
|
36
|
+
}
|
|
37
|
+
suffix() {
|
|
38
|
+
if (this.vervallen) {
|
|
39
|
+
return "vervallen";
|
|
40
|
+
}
|
|
41
|
+
if (this.gereserveerd) {
|
|
42
|
+
return "gereserveerd";
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const suffix = this.suffix();
|
|
48
|
+
return (h(Fragment, null, h("div", { class: "heading-container" }, this.wijzigactie && h("span", { class: "wijzigactie-label" }, this.wijzigactieLabel, ":"), h("div", { class: "heading" }, h(Heading, { heading: this.heading, class: "heading-element", onClick: this.handleHeadingClick }, this.type !== "LID" && (h("button", { type: "button", class: "toggle-button" }, h("dso-icon", { icon: this.open ? "chevron-down" : "chevron-right" }))), h("div", { class: "title" }, this.notApplicable && h("span", { class: "not-applicable" }, "Niet van toepassing:"), this.label || this.nummer || this.opschrift ? (h(Fragment, null, this.label && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.label, inline: true }))), this.nummer && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.nummer, inline: true }))), this.opschrift && (h(Fragment, null, " ", h("dso-ozon-content", { content: this.opschrift, inline: true }))))) : (this.alternativeTitle), suffix && h("span", null, " - [", suffix, "]"))), this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (h(Fragment, null, h("dso-badge", { status: "warning", "aria-describedby": "nested-draft-description" }, "!"), h("dso-tooltip", { id: "nested-draft-description" }, "Er is een ontwerp beschikbaar."))), (this.bevatOntwerpInformatie || this.annotated) && (h("div", { class: "addons" }, this.bevatOntwerpInformatie && (h("dso-label", { status: "warning", compact: true }, "Ontwerp")), this.annotated && (h("dso-annotation-button", { identifier: "expandable", open: this.openAnnotation, onDsoClick: (e) => this.dsoAnnotationToggle.emit({ originalEvent: e }) })))))), h("slot", { name: "annotation" }), this.open && (this.inhoud || this.gereserveerd) && (h("div", { class: "content" }, this.gereserveerd && (h("dso-alert", { status: "info" }, "Dit onderdeel is gereserveerd voor toekomstige toevoeging.")), h("dso-ozon-content", { content: this.inhoud }))), h("slot", null)));
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "dso-document-component"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get originalStyleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["document-component.scss"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get styleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["document-component.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get properties() {
|
|
63
|
+
return {
|
|
64
|
+
"heading": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "\"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
|
|
69
|
+
"resolved": "\"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "The heading element to use."
|
|
77
|
+
},
|
|
78
|
+
"attribute": "heading",
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"defaultValue": "\"h2\""
|
|
81
|
+
},
|
|
82
|
+
"label": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string | undefined",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "The Label XML."
|
|
95
|
+
},
|
|
96
|
+
"attribute": "label",
|
|
97
|
+
"reflect": false
|
|
98
|
+
},
|
|
99
|
+
"nummer": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string | undefined",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "The Nummer XML."
|
|
112
|
+
},
|
|
113
|
+
"attribute": "nummer",
|
|
114
|
+
"reflect": false
|
|
115
|
+
},
|
|
116
|
+
"opschrift": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string",
|
|
121
|
+
"resolved": "string | undefined",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": true,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": "The Opschrift XML."
|
|
129
|
+
},
|
|
130
|
+
"attribute": "opschrift",
|
|
131
|
+
"reflect": false
|
|
132
|
+
},
|
|
133
|
+
"inhoud": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "string",
|
|
138
|
+
"resolved": "string | undefined",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": true,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": "The Inhoud XML."
|
|
146
|
+
},
|
|
147
|
+
"attribute": "inhoud",
|
|
148
|
+
"reflect": false
|
|
149
|
+
},
|
|
150
|
+
"open": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "boolean",
|
|
155
|
+
"resolved": "boolean",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "This boolean attribute indicates whether the children are visible."
|
|
163
|
+
},
|
|
164
|
+
"attribute": "open",
|
|
165
|
+
"reflect": true,
|
|
166
|
+
"defaultValue": "false"
|
|
167
|
+
},
|
|
168
|
+
"filtered": {
|
|
169
|
+
"type": "boolean",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "boolean",
|
|
173
|
+
"resolved": "boolean",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": "Marks this Document Component as belonging to an active filter."
|
|
181
|
+
},
|
|
182
|
+
"attribute": "filtered",
|
|
183
|
+
"reflect": true,
|
|
184
|
+
"defaultValue": "false"
|
|
185
|
+
},
|
|
186
|
+
"notApplicable": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"mutable": false,
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "boolean",
|
|
191
|
+
"resolved": "boolean",
|
|
192
|
+
"references": {}
|
|
193
|
+
},
|
|
194
|
+
"required": false,
|
|
195
|
+
"optional": false,
|
|
196
|
+
"docs": {
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": "Marks this Document Component as not-applicable."
|
|
199
|
+
},
|
|
200
|
+
"attribute": "not-applicable",
|
|
201
|
+
"reflect": true,
|
|
202
|
+
"defaultValue": "false"
|
|
203
|
+
},
|
|
204
|
+
"genesteOntwerpInformatie": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"mutable": false,
|
|
207
|
+
"complexType": {
|
|
208
|
+
"original": "boolean",
|
|
209
|
+
"resolved": "boolean",
|
|
210
|
+
"references": {}
|
|
211
|
+
},
|
|
212
|
+
"required": false,
|
|
213
|
+
"optional": false,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": "When a child Document Component has a status \"Draft\"."
|
|
217
|
+
},
|
|
218
|
+
"attribute": "geneste-ontwerp-informatie",
|
|
219
|
+
"reflect": true,
|
|
220
|
+
"defaultValue": "false"
|
|
221
|
+
},
|
|
222
|
+
"bevatOntwerpInformatie": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "boolean",
|
|
227
|
+
"resolved": "boolean",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Marks as draft."
|
|
235
|
+
},
|
|
236
|
+
"attribute": "bevat-ontwerp-informatie",
|
|
237
|
+
"reflect": true,
|
|
238
|
+
"defaultValue": "false"
|
|
239
|
+
},
|
|
240
|
+
"annotated": {
|
|
241
|
+
"type": "boolean",
|
|
242
|
+
"mutable": false,
|
|
243
|
+
"complexType": {
|
|
244
|
+
"original": "boolean",
|
|
245
|
+
"resolved": "boolean",
|
|
246
|
+
"references": {}
|
|
247
|
+
},
|
|
248
|
+
"required": false,
|
|
249
|
+
"optional": false,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": "Enables annotations."
|
|
253
|
+
},
|
|
254
|
+
"attribute": "annotated",
|
|
255
|
+
"reflect": true,
|
|
256
|
+
"defaultValue": "false"
|
|
257
|
+
},
|
|
258
|
+
"gereserveerd": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "boolean",
|
|
263
|
+
"resolved": "boolean",
|
|
264
|
+
"references": {}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": "Marks Document Component as reserved."
|
|
271
|
+
},
|
|
272
|
+
"attribute": "gereserveerd",
|
|
273
|
+
"reflect": false,
|
|
274
|
+
"defaultValue": "false"
|
|
275
|
+
},
|
|
276
|
+
"vervallen": {
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"mutable": false,
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "boolean",
|
|
281
|
+
"resolved": "boolean",
|
|
282
|
+
"references": {}
|
|
283
|
+
},
|
|
284
|
+
"required": false,
|
|
285
|
+
"optional": false,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": "Marks the Document Component as expired."
|
|
289
|
+
},
|
|
290
|
+
"attribute": "vervallen",
|
|
291
|
+
"reflect": false,
|
|
292
|
+
"defaultValue": "false"
|
|
293
|
+
},
|
|
294
|
+
"openAnnotation": {
|
|
295
|
+
"type": "boolean",
|
|
296
|
+
"mutable": false,
|
|
297
|
+
"complexType": {
|
|
298
|
+
"original": "boolean",
|
|
299
|
+
"resolved": "boolean",
|
|
300
|
+
"references": {}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": false,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "When the Annotation Output is opened, set this to true."
|
|
307
|
+
},
|
|
308
|
+
"attribute": "open-annotation",
|
|
309
|
+
"reflect": false,
|
|
310
|
+
"defaultValue": "false"
|
|
311
|
+
},
|
|
312
|
+
"alternativeTitle": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "string",
|
|
317
|
+
"resolved": "string | undefined",
|
|
318
|
+
"references": {}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": true,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "An alternative title to show when there is nothing to create a title."
|
|
325
|
+
},
|
|
326
|
+
"attribute": "alternative-title",
|
|
327
|
+
"reflect": false
|
|
328
|
+
},
|
|
329
|
+
"type": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "string",
|
|
334
|
+
"resolved": "string | undefined",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": true,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": "Type of Document Component."
|
|
342
|
+
},
|
|
343
|
+
"attribute": "type",
|
|
344
|
+
"reflect": true
|
|
345
|
+
},
|
|
346
|
+
"wijzigactie": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"mutable": false,
|
|
349
|
+
"complexType": {
|
|
350
|
+
"original": "DocumentComponentWijzigactie",
|
|
351
|
+
"resolved": "\"nieuweContainer\" | \"verwijder\" | \"verwijderContainer\" | \"voegtoe\" | undefined",
|
|
352
|
+
"references": {
|
|
353
|
+
"DocumentComponentWijzigactie": {
|
|
354
|
+
"location": "import",
|
|
355
|
+
"path": "./document-component.types"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": false,
|
|
360
|
+
"optional": true,
|
|
361
|
+
"docs": {
|
|
362
|
+
"tags": [],
|
|
363
|
+
"text": "The wijzigactie as in STOP."
|
|
364
|
+
},
|
|
365
|
+
"attribute": "wijzigactie",
|
|
366
|
+
"reflect": true
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
static get events() {
|
|
371
|
+
return [{
|
|
372
|
+
"method": "dsoOpenToggle",
|
|
373
|
+
"name": "dsoOpenToggle",
|
|
374
|
+
"bubbles": false,
|
|
375
|
+
"cancelable": true,
|
|
376
|
+
"composed": true,
|
|
377
|
+
"docs": {
|
|
378
|
+
"tags": [],
|
|
379
|
+
"text": "Emitted when the user activates the toggle."
|
|
380
|
+
},
|
|
381
|
+
"complexType": {
|
|
382
|
+
"original": "DocumentComponentOpenToggleEvent",
|
|
383
|
+
"resolved": "DocumentComponentOpenToggleEvent",
|
|
384
|
+
"references": {
|
|
385
|
+
"DocumentComponentOpenToggleEvent": {
|
|
386
|
+
"location": "import",
|
|
387
|
+
"path": "./document-component.types"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}, {
|
|
392
|
+
"method": "dsoAnnotationToggle",
|
|
393
|
+
"name": "dsoAnnotationToggle",
|
|
394
|
+
"bubbles": false,
|
|
395
|
+
"cancelable": true,
|
|
396
|
+
"composed": true,
|
|
397
|
+
"docs": {
|
|
398
|
+
"tags": [],
|
|
399
|
+
"text": "Emitted when the user activates the annotation button."
|
|
400
|
+
},
|
|
401
|
+
"complexType": {
|
|
402
|
+
"original": "DocumentComponentToggleAnnotationEvent",
|
|
403
|
+
"resolved": "DocumentComponentToggleAnnotationEvent",
|
|
404
|
+
"references": {
|
|
405
|
+
"DocumentComponentToggleAnnotationEvent": {
|
|
406
|
+
"location": "import",
|
|
407
|
+
"path": "./document-component.types"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}];
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
//# sourceMappingURL=document-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-component.js","sourceRoot":"","sources":["../../../src/components/document-component/document-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,KAAK,EAAgB,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMtG,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,MAAM,iBAAiB,GAA8D;EACnF,eAAe,EAAE,YAAY;EAC7B,SAAS,EAAE,YAAY;EACvB,kBAAkB,EAAE,YAAY;EAChC,OAAO,EAAE,YAAY;CACtB,CAAC;AAOF,MAAM,OAAO,iBAAiB;;IAuHpB,uBAAkB,GAAG,CAAC,CAAa,EAAE,EAAE;MAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;OACjE;IACH,CAAC,CAAC;mBAtH0C,IAAI;;;;;gBA8BzC,KAAK;oBAMD,KAAK;yBAMA,KAAK;oCAMM,KAAK;kCAMP,KAAK;qBAMlB,KAAK;wBAMF,KAAK;qBAMR,KAAK;0BAMA,KAAK;;;;;EAgCtB,IAAY,gBAAgB;IAC1B,OAAO,IAAI,CAAC,WAAW,IAAI,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;EACjE,CAAC;EAQO,MAAM;IACZ,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Event, EventEmitter, Fragment, Prop } from \"@stencil/core\";\r\nimport {\r\n DocumentComponentOpenToggleEvent,\r\n DocumentComponentToggleAnnotationEvent,\r\n DocumentComponentWijzigactie,\r\n} from \"./document-component.types\";\r\nimport { Heading } from \"./document-component-heading\";\r\n\r\nconst wijzigActieLabels: { [wijzigActie in DocumentComponentWijzigactie]: string } = {\r\n nieuweContainer: \"Toegevoegd\",\r\n verwijder: \"Verwijderd\",\r\n verwijderContainer: \"Verwijderd\",\r\n voegtoe: \"Toegevoegd\",\r\n};\r\n\r\n@Component({\r\n tag: \"dso-document-component\",\r\n styleUrl: \"document-component.scss\",\r\n shadow: true,\r\n})\r\nexport class DocumentComponent implements ComponentInterface {\r\n /**\r\n * The heading element to use.\r\n */\r\n @Prop()\r\n heading: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" = \"h2\";\r\n\r\n /**\r\n * The Label XML.\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The Nummer XML.\r\n */\r\n @Prop()\r\n nummer?: string;\r\n\r\n /**\r\n * The Opschrift XML.\r\n */\r\n @Prop()\r\n opschrift?: string;\r\n\r\n /**\r\n * The Inhoud XML.\r\n */\r\n @Prop()\r\n inhoud?: string;\r\n\r\n /**\r\n * This boolean attribute indicates whether the children are visible.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Marks this Document Component as belonging to an active filter.\r\n */\r\n @Prop({ reflect: true })\r\n filtered = false;\r\n\r\n /**\r\n * Marks this Document Component as not-applicable.\r\n */\r\n @Prop({ reflect: true })\r\n notApplicable = false;\r\n\r\n /**\r\n * When a child Document Component has a status \"Draft\".\r\n */\r\n @Prop({ reflect: true })\r\n genesteOntwerpInformatie = false;\r\n\r\n /**\r\n * Marks as draft.\r\n */\r\n @Prop({ reflect: true })\r\n bevatOntwerpInformatie = false;\r\n\r\n /**\r\n * Enables annotations.\r\n */\r\n @Prop({ reflect: true })\r\n annotated = false;\r\n\r\n /**\r\n * Marks Document Component as reserved.\r\n */\r\n @Prop()\r\n gereserveerd = false;\r\n\r\n /**\r\n * Marks the Document Component as expired.\r\n */\r\n @Prop()\r\n vervallen = false;\r\n\r\n /**\r\n * When the Annotation Output is opened, set this to true.\r\n */\r\n @Prop()\r\n openAnnotation = false;\r\n\r\n /**\r\n * An alternative title to show when there is nothing to create a title.\r\n */\r\n @Prop()\r\n alternativeTitle?: string;\r\n\r\n /**\r\n * Type of Document Component.\r\n */\r\n @Prop({ reflect: true })\r\n type?: string;\r\n\r\n /**\r\n * The wijzigactie as in STOP.\r\n */\r\n @Prop({ reflect: true })\r\n wijzigactie?: DocumentComponentWijzigactie;\r\n\r\n /**\r\n * Emitted when the user activates the toggle.\r\n */\r\n @Event({ bubbles: false })\r\n dsoOpenToggle!: EventEmitter<DocumentComponentOpenToggleEvent>;\r\n\r\n /**\r\n * Emitted when the user activates the annotation button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnnotationToggle!: EventEmitter<DocumentComponentToggleAnnotationEvent>;\r\n\r\n private get wijzigactieLabel(): string | undefined {\r\n return this.wijzigactie && wijzigActieLabels[this.wijzigactie];\r\n }\r\n\r\n private handleHeadingClick = (e: MouseEvent) => {\r\n if (this.type !== \"LID\") {\r\n this.dsoOpenToggle.emit({ originalEvent: e, open: !this.open });\r\n }\r\n };\r\n\r\n private suffix(): string | undefined {\r\n if (this.vervallen) {\r\n return \"vervallen\";\r\n }\r\n\r\n if (this.gereserveerd) {\r\n return \"gereserveerd\";\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n render() {\r\n const suffix = this.suffix();\r\n\r\n return (\r\n <>\r\n <div class=\"heading-container\">\r\n {this.wijzigactie && <span class=\"wijzigactie-label\">{this.wijzigactieLabel}:</span>}\r\n <div class=\"heading\">\r\n <Heading heading={this.heading} class=\"heading-element\" onClick={this.handleHeadingClick}>\r\n {this.type !== \"LID\" && (\r\n <button type=\"button\" class=\"toggle-button\">\r\n <dso-icon icon={this.open ? \"chevron-down\" : \"chevron-right\"}></dso-icon>\r\n </button>\r\n )}\r\n <div class=\"title\">\r\n {this.notApplicable && <span class=\"not-applicable\">Niet van toepassing:</span>}\r\n {this.label || this.nummer || this.opschrift ? (\r\n <>\r\n {this.label && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.label} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {this.nummer && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.nummer} inline></dso-ozon-content>\r\n </>\r\n )}\r\n {this.opschrift && (\r\n <>\r\n {\" \"}\r\n <dso-ozon-content content={this.opschrift} inline></dso-ozon-content>\r\n </>\r\n )}\r\n </>\r\n ) : (\r\n this.alternativeTitle\r\n )}\r\n {suffix && <span> - [{suffix}]</span>}\r\n </div>\r\n </Heading>\r\n {this.genesteOntwerpInformatie && !this.open && !this.bevatOntwerpInformatie && (\r\n <>\r\n <dso-badge status=\"warning\" aria-describedby=\"nested-draft-description\">\r\n !\r\n </dso-badge>\r\n <dso-tooltip id=\"nested-draft-description\">Er is een ontwerp beschikbaar.</dso-tooltip>\r\n </>\r\n )}\r\n {(this.bevatOntwerpInformatie || this.annotated) && (\r\n <div class=\"addons\">\r\n {this.bevatOntwerpInformatie && (\r\n <dso-label status=\"warning\" compact>\r\n Ontwerp\r\n </dso-label>\r\n )}\r\n {this.annotated && (\r\n <dso-annotation-button\r\n identifier=\"expandable\"\r\n open={this.openAnnotation}\r\n onDsoClick={(e) => this.dsoAnnotationToggle.emit({ originalEvent: e })}\r\n ></dso-annotation-button>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n <slot name=\"annotation\" />\r\n {this.open && (this.inhoud || this.gereserveerd) && (\r\n <div class=\"content\">\r\n {this.gereserveerd && (\r\n <dso-alert status=\"info\">Dit onderdeel is gereserveerd voor toekomstige toevoeging.</dso-alert>\r\n )}\r\n <dso-ozon-content content={this.inhoud}></dso-ozon-content>\r\n </div>\r\n )}\r\n <slot />\r\n </>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-component.types.js","sourceRoot":"","sources":["../../../src/components/document-component/document-component.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface DocumentComponentOpenToggleEvent {\r\n originalEvent: Event;\r\n open: boolean;\r\n}\r\n\r\nexport interface DocumentComponentToggleAnnotationEvent {\r\n originalEvent: Event;\r\n}\r\n\r\nexport type DocumentComponentWijzigactie = \"voegtoe\" | \"verwijder\" | \"nieuweContainer\" | \"verwijderContainer\";\r\n"]}
|
|
@@ -26,32 +26,15 @@ export class Expandable {
|
|
|
26
26
|
this.host.removeAttribute("style");
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
async _getAnimeInstance() {
|
|
33
|
-
return this.animeInstance;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
async _getBodyHeight() {
|
|
39
|
-
return this.bodyHeight;
|
|
40
|
-
}
|
|
41
|
-
componentWillLoad() {
|
|
29
|
+
componentDidLoad() {
|
|
42
30
|
if (this.enableAnimation) {
|
|
43
31
|
this.prepareAnimationResizeObserver();
|
|
44
32
|
}
|
|
45
|
-
}
|
|
46
|
-
componentDidLoad() {
|
|
47
33
|
this.activateObserver();
|
|
48
34
|
}
|
|
49
35
|
activateObserver() {
|
|
50
36
|
var _a;
|
|
51
|
-
|
|
52
|
-
if (bodyContentElement) {
|
|
53
|
-
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(bodyContentElement);
|
|
54
|
-
}
|
|
37
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.host);
|
|
55
38
|
}
|
|
56
39
|
disconnectedCallback() {
|
|
57
40
|
var _a;
|
|
@@ -61,7 +44,7 @@ export class Expandable {
|
|
|
61
44
|
return (h(Host, { "aria-hidden": this.open ? "false" : "true", class: clsx({
|
|
62
45
|
"dso-animate-ready": this.enableAnimation && this.animationReady,
|
|
63
46
|
"dso-hide": !this.enableAnimation && !this.open,
|
|
64
|
-
}) }, h("slot",
|
|
47
|
+
}) }, h("slot", null)));
|
|
65
48
|
}
|
|
66
49
|
prepareAnimationResizeObserver() {
|
|
67
50
|
this.resizeObserver = new ResizeObserver(debounce(([entry]) => {
|
|
@@ -86,24 +69,23 @@ export class Expandable {
|
|
|
86
69
|
autoplay: false,
|
|
87
70
|
direction: "normal",
|
|
88
71
|
begin: () => {
|
|
89
|
-
if (this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.host.style.bottom = "";
|
|
94
|
-
}
|
|
72
|
+
if (this.open) {
|
|
73
|
+
this.host.style.visibility = "";
|
|
74
|
+
this.host.style.position = "";
|
|
75
|
+
this.host.style.bottom = "";
|
|
95
76
|
}
|
|
96
77
|
},
|
|
97
78
|
complete: () => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.host.style.bottom = "100%";
|
|
104
|
-
}
|
|
79
|
+
this.host.style.height = "";
|
|
80
|
+
if (!this.open) {
|
|
81
|
+
this.host.style.visibility = "hidden";
|
|
82
|
+
this.host.style.position = "absolute";
|
|
83
|
+
this.host.style.bottom = "100%";
|
|
105
84
|
}
|
|
106
85
|
},
|
|
86
|
+
changeComplete: () => {
|
|
87
|
+
this.dsoExpandableAnimationEnd.emit({ bodyHeight: this.bodyHeight });
|
|
88
|
+
},
|
|
107
89
|
});
|
|
108
90
|
if (!this.open) {
|
|
109
91
|
this.animeInstance.reverse();
|
|
@@ -113,7 +95,6 @@ export class Expandable {
|
|
|
113
95
|
this.host.style.height = "";
|
|
114
96
|
}
|
|
115
97
|
this.animationReady = !!this.animeInstance;
|
|
116
|
-
this._animationInstantiated.emit();
|
|
117
98
|
}
|
|
118
99
|
activateAnimation() {
|
|
119
100
|
if (this.animeInstance) {
|
|
@@ -207,73 +188,26 @@ export class Expandable {
|
|
|
207
188
|
}
|
|
208
189
|
static get events() {
|
|
209
190
|
return [{
|
|
210
|
-
"method": "
|
|
211
|
-
"name": "
|
|
212
|
-
"bubbles":
|
|
191
|
+
"method": "dsoExpandableAnimationEnd",
|
|
192
|
+
"name": "dsoExpandableAnimationEnd",
|
|
193
|
+
"bubbles": false,
|
|
213
194
|
"cancelable": true,
|
|
214
195
|
"composed": true,
|
|
215
196
|
"docs": {
|
|
216
|
-
"tags": [
|
|
217
|
-
|
|
218
|
-
"text": undefined
|
|
219
|
-
}],
|
|
220
|
-
"text": ""
|
|
221
|
-
},
|
|
222
|
-
"complexType": {
|
|
223
|
-
"original": "void",
|
|
224
|
-
"resolved": "void",
|
|
225
|
-
"references": {}
|
|
226
|
-
}
|
|
227
|
-
}];
|
|
228
|
-
}
|
|
229
|
-
static get methods() {
|
|
230
|
-
return {
|
|
231
|
-
"_getAnimeInstance": {
|
|
232
|
-
"complexType": {
|
|
233
|
-
"signature": "() => Promise<AnimeInstance | undefined>",
|
|
234
|
-
"parameters": [],
|
|
235
|
-
"references": {
|
|
236
|
-
"Promise": {
|
|
237
|
-
"location": "global"
|
|
238
|
-
},
|
|
239
|
-
"anime": {
|
|
240
|
-
"location": "global"
|
|
241
|
-
},
|
|
242
|
-
"AnimeInstance": {
|
|
243
|
-
"location": "import",
|
|
244
|
-
"path": "animejs"
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
"return": "Promise<AnimeInstance | undefined>"
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": "Fired when the animation ends. Only when `enableAnimation = true`."
|
|
248
199
|
},
|
|
249
|
-
"docs": {
|
|
250
|
-
"text": "",
|
|
251
|
-
"tags": [{
|
|
252
|
-
"name": "internal",
|
|
253
|
-
"text": undefined
|
|
254
|
-
}]
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"_getBodyHeight": {
|
|
258
200
|
"complexType": {
|
|
259
|
-
"
|
|
260
|
-
"
|
|
201
|
+
"original": "ExpandableAnimationEndEvent",
|
|
202
|
+
"resolved": "ExpandableAnimationEndEvent",
|
|
261
203
|
"references": {
|
|
262
|
-
"
|
|
263
|
-
"location": "
|
|
204
|
+
"ExpandableAnimationEndEvent": {
|
|
205
|
+
"location": "local",
|
|
206
|
+
"path": "/usr/src/app/packages/core/src/components/expandable/expandable.tsx"
|
|
264
207
|
}
|
|
265
|
-
}
|
|
266
|
-
"return": "Promise<number | undefined>"
|
|
267
|
-
},
|
|
268
|
-
"docs": {
|
|
269
|
-
"text": "",
|
|
270
|
-
"tags": [{
|
|
271
|
-
"name": "internal",
|
|
272
|
-
"text": undefined
|
|
273
|
-
}]
|
|
208
|
+
}
|
|
274
209
|
}
|
|
275
|
-
}
|
|
276
|
-
};
|
|
210
|
+
}];
|
|
277
211
|
}
|
|
278
212
|
static get elementRef() { return "host"; }
|
|
279
213
|
static get watchers() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandable.js","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"expandable.js","sourceRoot":"","sources":["../../../src/components/expandable/expandable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n h,\r\n Host,\r\n Prop,\r\n State,\r\n Watch,\r\n} from \"@stencil/core\";\r\nimport anime, { AnimeInstance } from \"animejs\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nexport interface ExpandableAnimationEndEvent {\r\n bodyHeight: number | undefined;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-expandable\",\r\n styleUrl: \"expandable.scss\",\r\n shadow: true,\r\n})\r\nexport class Expandable implements ComponentInterface {\r\n private resizeObserver?: ResizeObserver;\r\n\r\n private bodyHeight?: number;\r\n\r\n private animeInstance?: AnimeInstance;\r\n\r\n @Element()\r\n host!: HTMLDsoExpandableElement;\r\n\r\n /**\r\n * Set to `true` to expand the content.\r\n */\r\n @Prop({ reflect: true })\r\n open?: boolean;\r\n\r\n /**\r\n * Set to `true` to show the content animated.\r\n */\r\n @Prop()\r\n enableAnimation = false;\r\n\r\n /**\r\n * When enableAnimation is set to `true`, this property specifies the height of this element at which the animation will expand from / collapse to\r\n */\r\n @Prop()\r\n minimumHeight?: number;\r\n\r\n @State()\r\n animationReady = false;\r\n\r\n @Watch(\"open\")\r\n toggleOpen() {\r\n if (this.enableAnimation) {\r\n this.activateAnimation();\r\n }\r\n }\r\n\r\n @Watch(\"enableAnimation\")\r\n toggleEnableAnimation(enableAnimation: boolean) {\r\n if (enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n this.activateObserver();\r\n } else {\r\n this.resizeObserver?.disconnect();\r\n delete this.animeInstance;\r\n this.host.removeAttribute(\"style\");\r\n }\r\n }\r\n\r\n /**\r\n * Fired when the animation ends. Only when `enableAnimation = true`.\r\n */\r\n @Event({ bubbles: false })\r\n dsoExpandableAnimationEnd!: EventEmitter<ExpandableAnimationEndEvent>;\r\n\r\n componentDidLoad(): void {\r\n if (this.enableAnimation) {\r\n this.prepareAnimationResizeObserver();\r\n }\r\n\r\n this.activateObserver();\r\n }\r\n\r\n private activateObserver() {\r\n this.resizeObserver?.observe(this.host);\r\n }\r\n\r\n disconnectedCallback() {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n aria-hidden={this.open ? \"false\" : \"true\"}\r\n class={clsx({\r\n \"dso-animate-ready\": this.enableAnimation && this.animationReady,\r\n \"dso-hide\": !this.enableAnimation && !this.open,\r\n })}\r\n >\r\n <slot />\r\n </Host>\r\n );\r\n }\r\n\r\n private prepareAnimationResizeObserver(): void {\r\n this.resizeObserver = new ResizeObserver(\r\n debounce(([entry]) => {\r\n if (!entry) {\r\n throw new Error(\"No entry found\");\r\n }\r\n\r\n // entry.contentRect does not include padding, so we use getBoundingClientRect.\r\n const height = entry.target.getBoundingClientRect().height;\r\n\r\n if (this.bodyHeight !== height) {\r\n this.bodyHeight = height;\r\n }\r\n\r\n this.instantiateAnimation();\r\n }, 150)\r\n );\r\n }\r\n\r\n private instantiateAnimation(): void {\r\n this.animeInstance = anime({\r\n targets: this.host,\r\n height: this.minimumHeight ?? 0,\r\n easing: \"cubicBezier(0.4, 0, 0.2, 1)\",\r\n duration: 260,\r\n autoplay: false,\r\n direction: \"normal\",\r\n begin: () => {\r\n if (this.open) {\r\n this.host.style.visibility = \"\";\r\n this.host.style.position = \"\";\r\n this.host.style.bottom = \"\";\r\n }\r\n },\r\n complete: () => {\r\n this.host.style.height = \"\";\r\n\r\n if (!this.open) {\r\n this.host.style.visibility = \"hidden\";\r\n this.host.style.position = \"absolute\";\r\n this.host.style.bottom = \"100%\";\r\n }\r\n },\r\n changeComplete: () => {\r\n this.dsoExpandableAnimationEnd.emit({ bodyHeight: this.bodyHeight });\r\n },\r\n });\r\n\r\n if (!this.open) {\r\n this.animeInstance.reverse();\r\n this.animeInstance.play();\r\n }\r\n\r\n if (this.host) {\r\n this.host.style.height = \"\";\r\n }\r\n\r\n this.animationReady = !!this.animeInstance;\r\n }\r\n\r\n private activateAnimation(): void {\r\n if (this.animeInstance) {\r\n if (this.animeInstance.progress > 0 && this.animeInstance.progress < 100) {\r\n this.animeInstance.reverse();\r\n } else {\r\n if (this.open) {\r\n this.animeInstance.direction = \"reverse\";\r\n this.animeInstance.play();\r\n } else {\r\n this.animeInstance.direction = \"normal\";\r\n this.animeInstance.play();\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"]}
|