dso-toolkit 34.2.1 → 35.0.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/library/@dso-toolkit/core/cjs/dso-autosuggest.cjs.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-image-overlay.cjs.entry.js +62 -0
- package/dist/library/@dso-toolkit/core/cjs/dso-ozon-content.cjs.entry.js +281 -423
- package/dist/library/@dso-toolkit/core/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/cjs/dso-viewer-grid.cjs.entry.js +5 -711
- package/dist/library/@dso-toolkit/core/cjs/focus-trap.esm-8d3e3fb6.js +712 -0
- package/dist/library/@dso-toolkit/core/cjs/loader.cjs.js +1 -1
- package/dist/library/@dso-toolkit/core/collection/collection-manifest.json +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/autosuggest/autosuggest.js +6 -2
- package/dist/library/@dso-toolkit/core/collection/components/highlight-box/highlight-box.template.js +4 -1
- package/dist/library/@dso-toolkit/core/collection/components/image-overlay/image-overlay.css +263 -0
- package/dist/library/@dso-toolkit/core/collection/components/image-overlay/image-overlay.js +72 -0
- package/dist/library/@dso-toolkit/core/collection/components/image-overlay/image-overlay.stories.js +11 -0
- package/dist/library/@dso-toolkit/core/collection/components/image-overlay/image-overlay.template.js +7 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/al.node.js +13 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/document.node.js +9 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/ext-ref.node.js +15 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/fallback.node.js +10 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/illustratie.node.js +13 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/inhoud.node.js +14 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/inline.nodes.js +21 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/int-ref.node.js +26 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/noot.node.js +27 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js +39 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js +2 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/index.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/table-cell.js +25 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/table-colgroup.js +4 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/table-rows.js +5 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/table.node/table.node.js +32 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/nodes/text.node.js +9 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content-context.interface.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content-mapper.js +76 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content-node-context.interface.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content-node-state.interface.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content-node.interface.js +1 -0
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.css +15 -7
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.js +21 -33
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.css +30 -2
- package/dist/library/@dso-toolkit/core/collection/components/viewer-grid/viewer-grid.stories.js +28 -4
- package/dist/library/@dso-toolkit/core/custom-elements/index.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/custom-elements/index.js +3022 -3103
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/library/@dso-toolkit/core/dso-toolkit/{p-de3ab027.entry.js → p-225bbb28.entry.js} +1 -5
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-44905fb1.js +5 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-c6f467b3.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-f193c258.entry.js +1 -0
- package/dist/library/@dso-toolkit/core/esm/dso-autosuggest.entry.js +5 -1
- package/dist/library/@dso-toolkit/core/esm/dso-image-overlay.entry.js +58 -0
- package/dist/library/@dso-toolkit/core/esm/dso-ozon-content.entry.js +282 -424
- package/dist/library/@dso-toolkit/core/esm/dso-toolkit.js +1 -1
- package/dist/library/@dso-toolkit/core/esm/dso-viewer-grid.entry.js +3 -709
- package/dist/library/@dso-toolkit/core/esm/focus-trap.esm-299989f2.js +710 -0
- package/dist/library/@dso-toolkit/core/esm/loader.js +1 -1
- package/dist/library/@dso-toolkit/core/types/components/autosuggest/autosuggest.d.ts +15 -1
- package/dist/library/@dso-toolkit/core/types/components/image-overlay/image-overlay.d.ts +15 -0
- package/dist/library/@dso-toolkit/core/types/components/image-overlay/image-overlay.stories.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/image-overlay/image-overlay.template.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/al.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/document.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/ext-ref.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/fallback.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/illustratie.node.d.ts +5 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/inhoud.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/inline.nodes.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/int-ref.node.d.ts +6 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/noot.node.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/colspec/colspec-mapper.d.ts +2 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/colspec/colspec.interface.d.ts +10 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/index.d.ts +1 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/table-cell.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/table-colgroup.d.ts +5 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/table-rows.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/table.node/table.node.d.ts +7 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/nodes/text.node.d.ts +5 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content-context.interface.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content-mapper.d.ts +12 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content-node-context.interface.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content-node-state.interface.d.ts +3 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content-node.interface.d.ts +8 -0
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.d.ts +8 -10
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -2
- package/dist/library/@dso-toolkit/core/types/components.d.ts +19 -6
- package/dist/library/components/detail/form--autocomplete.html +1 -1
- package/dist/library/components/detail/form--form-horizontal.html +1 -1
- package/dist/library/components/detail/form--form-vertical.html +1 -1
- package/dist/library/components/detail/form--multi-page.html +1 -1
- package/dist/library/components/detail/form--sections.html +1 -1
- package/dist/library/components/detail/form--simple-form.html +1 -1
- package/dist/library/components/detail/form--single-page.html +1 -1
- package/dist/library/components/detail/form.html +1 -1
- package/dist/library/styles/dso.css +204 -465
- package/dist/toolkit/core/dso-toolkit.css +1 -1
- package/dist/toolkit/core/dso-toolkit.esm.js +1 -1
- package/dist/toolkit/core/{p-de3ab027.entry.js → p-225bbb28.entry.js} +1 -5
- package/dist/toolkit/core/p-44905fb1.js +5 -0
- package/dist/toolkit/core/p-c6f467b3.entry.js +1 -0
- package/dist/toolkit/core/p-f193c258.entry.js +1 -0
- package/dist/toolkit/styles/dso.css +204 -465
- package/hydrate/index.js +3102 -3174
- package/libs/@dso-toolkit/css/src/components/list/list.scss +8 -0
- package/libs/@dso-toolkit/css/src/components/tile-grid/tile-grid.scss +3 -0
- package/libs/@dso-toolkit/css/src/dso.scss +1 -0
- package/libs/@dso-toolkit/css/src/global/global.scss +5 -0
- package/libs/@dso-toolkit/sources/src/components/autosuggest/autosuggest.demo.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/autosuggest/autosuggest.models.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/highlight-box/highlight-box.models.ts +2 -2
- package/libs/@dso-toolkit/sources/src/components/image/image.models.ts +2 -0
- package/libs/@dso-toolkit/sources/src/components/image-overlay/image-overlay.args.ts +29 -0
- package/libs/@dso-toolkit/sources/src/components/image-overlay/image-overlay.content.ts +24 -0
- package/libs/@dso-toolkit/sources/src/components/image-overlay/image-overlay.models.ts +5 -0
- package/libs/@dso-toolkit/sources/src/components/image-overlay/image-overlay.stories.ts +26 -0
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.args.ts +7 -6
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.content.ts +768 -319
- package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.stories.ts +24 -48
- package/libs/@dso-toolkit/sources/src/components/row-equal-heights/row-equal-heights.args.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/row-equal-heights/row-equal-heights.content.ts +119 -0
- package/libs/@dso-toolkit/sources/src/components/row-equal-heights/row-equal-heights.models.ts +3 -0
- package/libs/@dso-toolkit/sources/src/components/row-equal-heights/row-equal-heights.stories.ts +56 -0
- package/libs/@dso-toolkit/sources/src/components/tile/tile.args.ts +13 -1
- package/libs/@dso-toolkit/sources/src/components/tile/tile.models.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/tile/tile.scss +37 -7
- package/libs/@dso-toolkit/sources/src/components/tile/tile.stories.ts +11 -1
- package/libs/@dso-toolkit/sources/src/components/tile-grid/tile-grid.args.ts +7 -0
- package/libs/@dso-toolkit/sources/src/components/tile-grid/tile-grid.content.ts +139 -0
- package/libs/@dso-toolkit/sources/src/components/tile-grid/tile-grid.models.ts +3 -0
- package/libs/@dso-toolkit/sources/src/components/tile-grid/tile-grid.scss +6 -0
- package/libs/@dso-toolkit/sources/src/components/tile-grid/tile-grid.stories.ts +36 -0
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.args.ts +25 -6
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.content.ts +1 -0
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.models.ts +9 -2
- package/libs/@dso-toolkit/sources/src/components/viewer-grid/viewer-grid.stories.ts +35 -24
- package/libs/@dso-toolkit/sources/src/components.scss +1 -0
- package/libs/@dso-toolkit/sources/src/index.ts +6 -0
- package/libs/@dso-toolkit/sources/src/styling/global/blockquote.scss +12 -0
- package/libs/@dso-toolkit/sources/src/styling/global/del.scss +3 -0
- package/libs/@dso-toolkit/sources/src/styling/global/headings.scss +30 -2
- package/libs/@dso-toolkit/sources/src/styling/global/ins.scss +4 -0
- package/libs/@dso-toolkit/sources/src/styling/global/p.scss +3 -0
- package/libs/@dso-toolkit/sources/src/styling/global/utilities.scss +32 -0
- package/libs/@dso-toolkit/sources/src/styling/grid/grid.scss +4 -0
- package/libs/@dso-toolkit/sources/src/styling/mixins/center-block.scss +5 -0
- package/{src/styles/components/_equal-heights.scss → libs/@dso-toolkit/sources/src/styling/mixins/equal-heights.scss} +1 -1
- package/libs/@dso-toolkit/sources/src/styling/mixins.scss +2 -0
- package/libs/@dso-toolkit/sources/src/styling/variables/colors.scss +4 -0
- package/libs/@dso-toolkit/sources/src/styling/variables/typography.scss +1 -1
- package/libs/@dso-toolkit/sources/storybook-assets/images/canvas-home_iplo-min.png +0 -0
- package/libs/@dso-toolkit/sources/storybook-assets/images/houtkachel-of-open-haard-infographic.jpg +0 -0
- package/libs/@dso-toolkit/sources/storybook-assets/images/icon-tree.png +0 -0
- package/libs/@dso-toolkit/sources/storybook-assets/images/klimaatambities_agv_infographic_002_1.jpg +0 -0
- package/libs/@dso-toolkit/sources/storybook-assets/images/schakeldag-8-maart-2022-schakeljournaal-ads.jpg +0 -0
- package/libs/_bootstrap.scss +2 -2
- package/libs/bootstrap/_variables.scss +3 -3
- package/package.json +2 -2
- package/src/styles/components/_jumbotron.scss +1 -2
- package/src/styles/components/_modal.scss +1 -1
- package/src/styles/components/_panel.scss +1 -1
- package/src/styles/dso.scss +3 -3
- package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.transformer.js +0 -105
- package/dist/library/@dso-toolkit/core/dso-toolkit/p-20856f91.entry.js +0 -1
- package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.transformer.d.ts +0 -15
- package/dist/toolkit/core/p-20856f91.entry.js +0 -1
- package/libs/bootstrap/_type.scss +0 -233
- package/libs/bootstrap/_utilities.scss +0 -55
- package/src/styles/components/_rich-content.scss +0 -56
- package/src/styles/mixins/_typography.scss +0 -56
|
@@ -4,43 +4,54 @@ import {
|
|
|
4
4
|
StorybookParameters,
|
|
5
5
|
} from "../../stories-helpers";
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ViewerGridArgs,
|
|
11
|
-
} from "./viewer-grid.args";
|
|
12
|
-
import { ViewerGridDemoProperties } from "./viewer-grid.models";
|
|
7
|
+
import { ViewerGridWithSearchResultsArgs, viewerGridWithSearchResultsArgTypes, viewerGridWithSearchResultsDemoArgsMapper, viewerGridWithTilesArgTypes, viewerGridWithTilesDemoArgsMapper } from "./viewer-grid.args";
|
|
8
|
+
|
|
9
|
+
import { ViewerGridWithSearchResultsProperties, ViewerGridWithTilesProperties } from "./viewer-grid.models";
|
|
13
10
|
|
|
14
11
|
export interface ViewerGridParameters<TemplateFnReturnType> {
|
|
15
|
-
|
|
16
|
-
viewerGridDemoProperties:
|
|
12
|
+
viewerGridWithSearchResultsDemoTemplate: (
|
|
13
|
+
viewerGridDemoProperties: ViewerGridWithSearchResultsProperties
|
|
14
|
+
) => TemplateFnReturnType;
|
|
15
|
+
viewerGridWithTilesDemoTemplate: (
|
|
16
|
+
tilesGridDemoProperties: ViewerGridWithTilesProperties
|
|
17
17
|
) => TemplateFnReturnType;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function storiesOfViewerGrid<TemplateFnReturnType>(
|
|
21
21
|
{ module: mainModule, storiesOf, readme }: StorybookParameters,
|
|
22
|
-
{ viewerGridDemoTemplate }: ViewerGridParameters<TemplateFnReturnType>
|
|
22
|
+
{ viewerGridWithSearchResultsDemoTemplate: viewerGridDemoTemplate, viewerGridWithTilesDemoTemplate }: ViewerGridParameters<TemplateFnReturnType>
|
|
23
23
|
) {
|
|
24
|
-
const template = bindTemplate(
|
|
25
|
-
viewerGridDemoArgsMapper,
|
|
26
|
-
viewerGridDemoTemplate
|
|
27
|
-
);
|
|
28
|
-
|
|
29
24
|
const stories = storiesOf("Viewer Grid", mainModule).addParameters({
|
|
30
25
|
layout: "fullscreen",
|
|
31
26
|
docs: {
|
|
32
27
|
page: readme,
|
|
33
28
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
filterpanelOpen: false,
|
|
38
|
-
overlayOpen: false,
|
|
39
|
-
noOverlay: false,
|
|
40
|
-
documentHeaderFeaturesOpen: true,
|
|
41
|
-
}),
|
|
42
|
-
argTypes: viewerGridArgTypes,
|
|
29
|
+
controls: {
|
|
30
|
+
hideNoControlsWarning: true
|
|
31
|
+
}
|
|
43
32
|
});
|
|
44
33
|
|
|
45
|
-
stories.add(
|
|
34
|
+
stories.add(
|
|
35
|
+
"with search results",
|
|
36
|
+
bindTemplate(viewerGridWithSearchResultsDemoArgsMapper, viewerGridDemoTemplate),
|
|
37
|
+
{
|
|
38
|
+
argTypes: viewerGridWithSearchResultsArgTypes,
|
|
39
|
+
args: componentArgs<
|
|
40
|
+
Pick<ViewerGridWithSearchResultsArgs, "filterpanelOpen" | "overlayOpen" | "noOverlay" | "documentHeaderFeaturesOpen">
|
|
41
|
+
>({
|
|
42
|
+
filterpanelOpen: false,
|
|
43
|
+
overlayOpen: false,
|
|
44
|
+
noOverlay: false,
|
|
45
|
+
documentHeaderFeaturesOpen: true,
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
stories.add(
|
|
51
|
+
"with tiles",
|
|
52
|
+
bindTemplate(viewerGridWithTilesDemoArgsMapper, viewerGridWithTilesDemoTemplate),
|
|
53
|
+
{
|
|
54
|
+
argTypes: viewerGridWithTilesArgTypes
|
|
55
|
+
}
|
|
56
|
+
);
|
|
46
57
|
}
|
|
@@ -22,5 +22,6 @@
|
|
|
22
22
|
@import "components/progress-indicator/progress-indicator";
|
|
23
23
|
@import "components/selectable/selectable";
|
|
24
24
|
@import "components/tile/tile";
|
|
25
|
+
@import "components/tile-grid/tile-grid";
|
|
25
26
|
@import "components/tooltip/tooltip";
|
|
26
27
|
@import "components/whitebox/whitebox";
|
|
@@ -50,6 +50,8 @@ export * from './components/icon/icon.models';
|
|
|
50
50
|
export * from './components/icon/icon.stories';
|
|
51
51
|
export * from './components/image/image.models';
|
|
52
52
|
export * from './components/image/image.stories';
|
|
53
|
+
export * from './components/image-overlay/image-overlay.models';
|
|
54
|
+
export * from './components/image-overlay/image-overlay.stories';
|
|
53
55
|
export * from './components/info-button/info-button.models';
|
|
54
56
|
export * from './components/info-button/info-button.stories';
|
|
55
57
|
export * from './components/info/info.models';
|
|
@@ -77,12 +79,16 @@ export * from './components/progress-bar/progress-bar.models';
|
|
|
77
79
|
export * from './components/progress-bar/progress-bar.stories';
|
|
78
80
|
export * from './components/progress-indicator/progress-indicator.models';
|
|
79
81
|
export * from './components/progress-indicator/progress-indicator.stories';
|
|
82
|
+
export * from './components/row-equal-heights/row-equal-heights.models';
|
|
83
|
+
export * from './components/row-equal-heights/row-equal-heights.stories';
|
|
80
84
|
export * from './components/selectable/selectable.models';
|
|
81
85
|
export * from './components/selectable/selectable.stories';
|
|
82
86
|
export * from './components/shopping-cart/shopping-cart.models';
|
|
83
87
|
export * from './components/shopping-cart/shopping-cart.stories';
|
|
84
88
|
export * from './components/tile/tile.models';
|
|
85
89
|
export * from './components/tile/tile.stories';
|
|
90
|
+
export * from './components/tile-grid/tile-grid.models';
|
|
91
|
+
export * from './components/tile-grid/tile-grid.stories';
|
|
86
92
|
export * from './components/toggletip/toggletip.models';
|
|
87
93
|
export * from './components/toggletip/toggletip.stories';
|
|
88
94
|
export * from './components/tooltip/tooltip.models';
|
|
@@ -4,19 +4,35 @@ h2,
|
|
|
4
4
|
.h2,
|
|
5
5
|
h3,
|
|
6
6
|
.h3 {
|
|
7
|
+
margin-bottom: $dso-vertical-spacing-medium;
|
|
7
8
|
margin-top: $line-height-computed;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
h1,
|
|
12
|
+
.h1 {
|
|
13
|
+
line-height: $dso-font-line-height-h1;
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
h1 {
|
|
11
17
|
@include h1();
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
h2,
|
|
21
|
+
.h2 {
|
|
22
|
+
line-height: $dso-font-line-height-h2;
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
h2 {
|
|
15
26
|
color: $bosgroen;
|
|
16
27
|
font-size: $dso-font-size-h2;
|
|
17
28
|
font-weight: 700;
|
|
18
29
|
}
|
|
19
30
|
|
|
31
|
+
h3,
|
|
32
|
+
.h3 {
|
|
33
|
+
line-height: $dso-font-line-height-h3;
|
|
34
|
+
}
|
|
35
|
+
|
|
20
36
|
h3 {
|
|
21
37
|
@include h3();
|
|
22
38
|
}
|
|
@@ -27,21 +43,33 @@ h5,
|
|
|
27
43
|
.h5,
|
|
28
44
|
h6,
|
|
29
45
|
.h6 {
|
|
46
|
+
margin-bottom: $dso-vertical-spacing-medium;
|
|
30
47
|
margin-top: ($line-height-computed * 0.5);
|
|
31
48
|
}
|
|
32
49
|
|
|
50
|
+
h4,
|
|
51
|
+
.h4 {
|
|
52
|
+
line-height: $dso-font-line-height-h4;
|
|
53
|
+
}
|
|
54
|
+
|
|
33
55
|
h4 {
|
|
34
56
|
color: $bosgroen;
|
|
35
57
|
font-size: $dso-font-size-h4;
|
|
36
58
|
font-weight: 600;
|
|
37
59
|
}
|
|
38
60
|
|
|
61
|
+
h5,
|
|
62
|
+
.h5 {
|
|
63
|
+
line-height: $dso-font-line-height-h5;
|
|
64
|
+
}
|
|
65
|
+
|
|
39
66
|
h5 {
|
|
40
67
|
color: $grijs-90;
|
|
41
68
|
font-size: $dso-font-size-h5;
|
|
42
69
|
font-weight: 600;
|
|
43
70
|
}
|
|
44
71
|
|
|
45
|
-
|
|
46
|
-
|
|
72
|
+
h6,
|
|
73
|
+
.h6 {
|
|
74
|
+
line-height: $dso-font-line-height-h6;
|
|
47
75
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.text-right {
|
|
2
|
+
text-align: right;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.text-center {
|
|
6
|
+
text-align: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.text-muted {
|
|
10
|
+
color: $text-muted;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.list-unstyled {
|
|
14
|
+
@include list-unstyled();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.caption {
|
|
18
|
+
font-style: italic;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
small,
|
|
22
|
+
.small {
|
|
23
|
+
font-size: $font-size-small;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.hidden {
|
|
27
|
+
display: none !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.center-block {
|
|
31
|
+
@include center-block();
|
|
32
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
@import "mixins/anchor-clean";
|
|
2
2
|
@import "mixins/anchor-reverse";
|
|
3
3
|
@import "mixins/box-sizing";
|
|
4
|
+
@import "mixins/center-block";
|
|
4
5
|
@import "mixins/clearfix";
|
|
6
|
+
@import "mixins/equal-heights";
|
|
5
7
|
@import "mixins/form-control";
|
|
6
8
|
@import "mixins/full-width-row";
|
|
7
9
|
@import "mixins/grid";
|
|
Binary file
|
package/libs/@dso-toolkit/sources/storybook-assets/images/houtkachel-of-open-haard-infographic.jpg
ADDED
|
Binary file
|
|
Binary file
|
package/libs/@dso-toolkit/sources/storybook-assets/images/klimaatambities_agv_infographic_002_1.jpg
ADDED
|
Binary file
|
|
Binary file
|
package/libs/_bootstrap.scss
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
// Core CSS
|
|
56
56
|
@import "bootstrap/scaffolding";
|
|
57
|
-
@import "bootstrap/type";
|
|
57
|
+
// @import "bootstrap/type"; -> Moved to @dso-toolkit/sources
|
|
58
58
|
@import "bootstrap/code";
|
|
59
59
|
// @import "bootstrap/grid"; -> Moved to @dso-toolkit/styling
|
|
60
60
|
@import "bootstrap/forms";
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
// @import "bootstrap/carousel"; -> Deleted
|
|
82
82
|
|
|
83
83
|
// Utility classes
|
|
84
|
-
@import "bootstrap/utilities";
|
|
84
|
+
// @import "bootstrap/utilities"; -> Moved to @dso-toolkit/sources/src/styling/global/utilities
|
|
85
85
|
@import "bootstrap/responsive-utilities";
|
|
@@ -524,11 +524,11 @@ $abbr-border-color: $gray-light !default;
|
|
|
524
524
|
//** Headings small color
|
|
525
525
|
$headings-small-color: $gray-light !default;
|
|
526
526
|
//** Blockquote small color
|
|
527
|
-
$blockquote-small-color: $gray-light !default;
|
|
527
|
+
// $blockquote-small-color: $gray-light !default; -> Deleted
|
|
528
528
|
//** Blockquote font size
|
|
529
|
-
$blockquote-font-size: ($font-size-base * 1.25) !default;
|
|
529
|
+
// $blockquote-font-size: ($font-size-base * 1.25) !default; -> Moved to @dso-toolkit/sources/src/styling/variables/typography
|
|
530
530
|
//** Blockquote border color
|
|
531
|
-
$blockquote-border-color: $gray-lighter !default;
|
|
531
|
+
// $blockquote-border-color: $gray-lighter !default; -> Moved to @dso-toolkit/sources/src/styling/variables/colors
|
|
532
532
|
//** Page header border color
|
|
533
533
|
$page-header-border-color: $gray-lighter !default;
|
|
534
534
|
//** Width of horizontal description list titles
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dso-toolkit",
|
|
3
3
|
"description": "DSO Toolkit and Component Library",
|
|
4
4
|
"license": "SEE LICENSE IN DISCLAIMER.txt",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "35.0.0",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "gulp",
|
|
8
8
|
"build": "gulp build",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@babel/core": "^7.15.8",
|
|
22
22
|
"@babel/preset-env": "^7.15.8",
|
|
23
|
-
"@dso-toolkit/core": "
|
|
23
|
+
"@dso-toolkit/core": "35.0.0",
|
|
24
24
|
"@dso-toolkit/css": "0.0.0",
|
|
25
25
|
"@dso-toolkit/sources": "0.0.0",
|
|
26
26
|
"@frctl/fractal": "1.5.11",
|
package/src/styles/dso.scss
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// @import "mixins/full-width-row"; -> Moved to @dso-toolkit/sources
|
|
5
5
|
@import "mixins/grid";
|
|
6
6
|
// @import "mixins/tables"; -> Moved to @dso-toolkit/styling
|
|
7
|
-
@import "mixins/typography";
|
|
7
|
+
// @import "mixins/typography"; -> Moved to @dso-toolkit/sources
|
|
8
8
|
|
|
9
9
|
// @import "icons/di"; -> Moved to @dso-toolkit/styling
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// @import "components/definition-list"; // -> Moved to @dso-toolkit/styling
|
|
24
24
|
// @import "components/description"; -> Moved to @dso-toolkit/styling
|
|
25
25
|
// @import "components/dropdown"; -> Moved to @dso-toolkit/sources/src/components/dropdown-menu
|
|
26
|
-
@import "components/equal-heights";
|
|
26
|
+
// @import "components/equal-heights"; -> Moved to @dso-toolkit/sources/src/styling/grid/
|
|
27
27
|
// @import "components/footer"; -> Moved to @dso-toolkit/sources/src/styling
|
|
28
28
|
// @import "components/footnotes"; -> Moved to @dso-toolkit/styling
|
|
29
29
|
@import "components/form";
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
@import "components/panel";
|
|
46
46
|
// @import "components/progress-bar"; -> Moved to @dso-toolkit/styling
|
|
47
47
|
// @import "components/progress-indicator"; -> Moved to @dso-toolkit/sources
|
|
48
|
-
@import "components/rich-content";
|
|
48
|
+
// @import "components/rich-content"; -> Moved to @dso-toolkit/sources/src/styling/global/headings
|
|
49
49
|
@import "components/search-bar";
|
|
50
50
|
// @import "components/selectable"; // -> Moved to @dso-toolkit/styling
|
|
51
51
|
// @import "components/shopping-cart"; -> Moved to @dso-toolkit/css/src/components/shopping-cart
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import isURL from 'validator/es/lib/isURL';
|
|
2
|
-
function transformDescriptionNote(body) {
|
|
3
|
-
body.querySelectorAll('div.noot').forEach((nootElement, index) => {
|
|
4
|
-
const contentElement = nootElement.nextElementSibling;
|
|
5
|
-
if (!(contentElement instanceof HTMLDivElement && contentElement.classList.value === 'noot_popup')) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
const nootAnchorElement = nootElement.querySelector('a');
|
|
9
|
-
if (!(nootAnchorElement instanceof HTMLAnchorElement)) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const contentAlElement = contentElement.querySelector(':scope > .od-Al');
|
|
13
|
-
if (!(contentAlElement instanceof HTMLDivElement && contentAlElement.classList.value === 'od-Al')) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
nootElement.replaceWith(...Array.from(nootElement.childNodes));
|
|
17
|
-
const contentWrapper = document.createElement('div');
|
|
18
|
-
contentWrapper.replaceChildren(...Array.from(contentAlElement.childNodes));
|
|
19
|
-
contentAlElement.replaceChildren(contentWrapper);
|
|
20
|
-
contentElement.replaceWith(contentAlElement);
|
|
21
|
-
const supElement = document.createElement('sup');
|
|
22
|
-
supElement.replaceChildren(...Array.from(nootAnchorElement.childNodes));
|
|
23
|
-
nootAnchorElement.replaceChildren(supElement);
|
|
24
|
-
const id = (index + 1).toString(10);
|
|
25
|
-
const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
|
|
26
|
-
nootAnchorElement.setAttribute('href', `#${termId}`);
|
|
27
|
-
nootAnchorElement.setAttribute('id', termId);
|
|
28
|
-
nootAnchorElement.setAttribute('aria-controls', contentId);
|
|
29
|
-
nootAnchorElement.setAttribute('aria-expanded', 'false');
|
|
30
|
-
contentAlElement === null || contentAlElement === void 0 ? void 0 : contentAlElement.setAttribute('id', contentId);
|
|
31
|
-
});
|
|
32
|
-
return body;
|
|
33
|
-
}
|
|
34
|
-
function transformDocumentComponent(body) {
|
|
35
|
-
body.querySelectorAll('span[data-verwijst-naar-documentcomponent]').forEach(e => {
|
|
36
|
-
const a = document.createElement('a');
|
|
37
|
-
a.href = `#${e.getAttribute('data-verwijst-naar-documentcomponent')}`;
|
|
38
|
-
a.replaceChildren(...Array.from(e.childNodes));
|
|
39
|
-
e.replaceWith(a);
|
|
40
|
-
});
|
|
41
|
-
return body;
|
|
42
|
-
}
|
|
43
|
-
const transformers = [transformDescriptionNote, transformDocumentComponent];
|
|
44
|
-
export class OzonContentTransformer {
|
|
45
|
-
constructor(anchorClick) {
|
|
46
|
-
this.anchorClick = anchorClick;
|
|
47
|
-
this.domParser = new DOMParser();
|
|
48
|
-
this.eventHandlers = [this.handleValidUrls, this.handleDescriptionNoteClick, this.handleContentAnchor];
|
|
49
|
-
}
|
|
50
|
-
setContent(content) {
|
|
51
|
-
this.content = transformers.reduce((c, t) => t(c), this.domParser.parseFromString(content, 'text/html').body).children;
|
|
52
|
-
}
|
|
53
|
-
handleClickEvent(event) {
|
|
54
|
-
this.eventHandlers.some(h => h.bind(this)(event.composedPath(), event));
|
|
55
|
-
}
|
|
56
|
-
handleDescriptionNoteClick(composedPath, event) {
|
|
57
|
-
var _a;
|
|
58
|
-
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
59
|
-
if (containerIndex === -1) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
const anchorElement = (_a = composedPath
|
|
63
|
-
.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.find((e) => e instanceof HTMLAnchorElement && e.classList.contains('noot'));
|
|
64
|
-
if (!anchorElement) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
event.preventDefault();
|
|
68
|
-
const open = anchorElement.classList.contains('dso-open');
|
|
69
|
-
if (open) {
|
|
70
|
-
anchorElement.classList.remove('dso-open');
|
|
71
|
-
anchorElement.setAttribute('aria-expanded', 'false');
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
anchorElement.classList.add('dso-open');
|
|
75
|
-
anchorElement.setAttribute('aria-expanded', 'true');
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
handleContentAnchor(composedPath, event) {
|
|
80
|
-
if (composedPath.some(e => e instanceof HTMLAnchorElement)) {
|
|
81
|
-
event.preventDefault();
|
|
82
|
-
const anchor = composedPath.find((e) => e instanceof HTMLAnchorElement);
|
|
83
|
-
const href = anchor.href;
|
|
84
|
-
this.anchorClick.emit({
|
|
85
|
-
href,
|
|
86
|
-
documentComponent: href.substr(href.indexOf('#') + 1),
|
|
87
|
-
originalEvent: event
|
|
88
|
-
});
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
handleValidUrls(composedPath) {
|
|
94
|
-
var _a;
|
|
95
|
-
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
96
|
-
if (containerIndex === -1) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
// require_tld: false is needed to allow http://localhost
|
|
100
|
-
return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => { var _a; return e instanceof HTMLAnchorElement && isURL((_a = e.getAttribute('href')) !== null && _a !== void 0 ? _a : '', { require_tld: false, require_protocol: true }); });
|
|
101
|
-
}
|
|
102
|
-
isHostElement(value) {
|
|
103
|
-
return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as n,h as o}from"./p-dad72605.js";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(t){if(!("string"==typeof t||t instanceof String)){var n=r(t);throw null===t?n="null":"object"===n&&(n=t.constructor.name),new TypeError("Expected a string but received a ".concat(n))}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1},l="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",u="(".concat(l,"[.]){3}").concat(l),d=new RegExp("^".concat(u,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(u,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(u,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(u,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(u,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(u,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(u,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(u,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function f(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e(t),!(n=String(n)))return f(t,4)||f(t,6);if("4"===n){if(!d.test(t))return!1;var o=t.split(".").sort((function(t,n){return t-n}));return o[3]<=255}return"6"===n&&!!c.test(t)}function p(t,n){(null==n||n>t.length)&&(n=t.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=t[o];return r}var h={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},m=/^\[([^\]]+)\](?::([0-9]+))?$/;function v(t,n){for(var o=0;o<n.length;o++){var r=n[o];if(t===r||"[object RegExp]"===Object.prototype.toString.call(r)&&r.test(t))return!0}return!1}function y(t,n){if(e(t),!t||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((n=i(n,h)).validate_length&&t.length>=2083)return!1;if(!n.allow_fragments&&t.includes("#"))return!1;if(!n.allow_query_components&&(t.includes("?")||t.includes("&")))return!1;var o,r,l,u,d,s,c,y,g,b;if(c=t.split("#"),t=c.shift(),c=t.split("?"),t=c.shift(),(c=t.split("://")).length>1){if(o=c.shift().toLowerCase(),n.require_valid_protocol&&-1===n.protocols.indexOf(o))return!1}else{if(n.require_protocol)return!1;if("//"===t.substr(0,2)){if(!n.allow_protocol_relative_urls)return!1;c[0]=t.substr(2)}}if(""===(t=c.join("://")))return!1;if(c=t.split("/"),""===(t=c.shift())&&!n.require_host)return!0;if((c=t.split("@")).length>1){if(n.disallow_auth)return!1;if(""===c[0])return!1;if((r=c.shift()).indexOf(":")>=0&&r.split(":").length>2)return!1;var A=(g=r.split(":"),b=2,function(t){if(Array.isArray(t))return t}(g)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var o=[],r=!0,e=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(t){e=!0,i=t}finally{try{r||null==l.return||l.return()}finally{if(e)throw i}}return o}}(g,b)||function(t,n){if(t){if("string"==typeof t)return p(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?p(t,n):void 0}}(g,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());if(""===A[0]&&""===A[1])return!1}s=null,y=null;var _=(u=c.join("@")).match(m);if(_?(l="",y=_[1],s=_[2]||null):(l=(c=u.split(":")).shift(),c.length&&(s=c.join(":"))),null!==s&&s.length>0){if(d=parseInt(s,10),!/^[0-9]+$/.test(s)||d<=0||d>65535)return!1}else if(n.require_port)return!1;return n.host_whitelist?v(l,n.host_whitelist):!!(f(l)||function(t,n){e(t),(n=i(n,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1)),!0===n.allow_wildcard&&0===t.indexOf("*.")&&(t=t.substring(2));var o=t.split("."),r=o[o.length-1];if(n.require_tld){if(o.length<2)return!1;if(!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(r))return!1;if(/\s/.test(r))return!1}return!(!n.allow_numeric_tld&&/^\d+$/.test(r))&&o.every((function(t){return!(t.length>63||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(t)||/[\uff01-\uff5e]/.test(t)||/^-|-$/.test(t)||!n.allow_underscores&&/_/.test(t))}))}(l,n)||y&&f(y,6))&&(l=l||y,!n.host_blacklist||!v(l,n.host_blacklist))}const g=[function(t){return t.querySelectorAll("div.noot").forEach(((t,n)=>{const o=t.nextElementSibling;if(!(o instanceof HTMLDivElement&&"noot_popup"===o.classList.value))return;const r=t.querySelector("a");if(!(r instanceof HTMLAnchorElement))return;const e=o.querySelector(":scope > .od-Al");if(!(e instanceof HTMLDivElement&&"od-Al"===e.classList.value))return;t.replaceWith(...Array.from(t.childNodes));const i=document.createElement("div");i.replaceChildren(...Array.from(e.childNodes)),e.replaceChildren(i),o.replaceWith(e);const a=document.createElement("sup");a.replaceChildren(...Array.from(r.childNodes)),r.replaceChildren(a);const l=(n+1).toString(10),[u,d]=[`dso-ozon-term-${l}`,`dso-ozon-content-${l}`];r.setAttribute("href",`#${u}`),r.setAttribute("id",u),r.setAttribute("aria-controls",d),r.setAttribute("aria-expanded","false"),null==e||e.setAttribute("id",d)})),t},function(t){return t.querySelectorAll("span[data-verwijst-naar-documentcomponent]").forEach((t=>{const n=document.createElement("a");n.href=`#${t.getAttribute("data-verwijst-naar-documentcomponent")}`,n.replaceChildren(...Array.from(t.childNodes)),t.replaceWith(n)})),t}];class b{constructor(t){this.anchorClick=t,this.domParser=new DOMParser,this.eventHandlers=[this.handleValidUrls,this.handleDescriptionNoteClick,this.handleContentAnchor]}setContent(t){this.content=g.reduce(((t,n)=>n(t)),this.domParser.parseFromString(t,"text/html").body).children}handleClickEvent(t){this.eventHandlers.some((n=>n.bind(this)(t.composedPath(),t)))}handleDescriptionNoteClick(t,n){var o;const r=t.findIndex(this.isHostElement);if(-1===r)return!1;const e=null===(o=t.slice(0,r))||void 0===o?void 0:o.find((t=>t instanceof HTMLAnchorElement&&t.classList.contains("noot")));return!!e&&(n.preventDefault(),e.classList.contains("dso-open")?(e.classList.remove("dso-open"),e.setAttribute("aria-expanded","false")):(e.classList.add("dso-open"),e.setAttribute("aria-expanded","true")),!0)}handleContentAnchor(t,n){if(t.some((t=>t instanceof HTMLAnchorElement))){n.preventDefault();const o=t.find((t=>t instanceof HTMLAnchorElement)).href;return this.anchorClick.emit({href:o,documentComponent:o.substr(o.indexOf("#")+1),originalEvent:n}),!0}return!1}handleValidUrls(t){var n;const o=t.findIndex(this.isHostElement);return-1!==o&&(null===(n=t.slice(0,o))||void 0===n?void 0:n.some((t=>{var n;return t instanceof HTMLAnchorElement&&y(null!==(n=t.getAttribute("href"))&&void 0!==n?n:"",{require_tld:!1,require_protocol:!0})})))}isHostElement(t){return t instanceof HTMLElement&&"DSO-OZON-CONTENT"===t.tagName}}let A=class{constructor(o){t(this,o),this.anchorClick=n(this,"anchorClick",7)}handleClick(t){this.transformer.handleClickEvent(t)}componentWillLoad(){this.transformer=new b(this.anchorClick)}componentWillRender(){this.transformer.setContent(this.content)}render(){return o("div",{class:"dso-rich-content",ref:t=>this.container=t})}componentDidRender(){var t;const n=this.transformer.content;this.container&&n?this.container.replaceChildren(...Array.from(n)):null===(t=this.container)||void 0===t||t.replaceChildren()}};A.style='dso-ozon-content{display:block}.noot{text-decoration:none}.noot:not(.dso-open)+.od-Al{display:none}.noot.dso-open+.od-Al{display:block}.noot+.od-Al{margin:4px 0;padding:8px 32px 8px 8px;position:relative}.noot+.od-Al>a{display:block;height:24px;position:absolute;right:0;text-align:center;top:0;width:24px}.noot+.od-Al>a::before{background:var(--dso-icon, var(--di-times-zwart)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:"";display:block}.noot+.od-Al{background-color:#ebf3e6}.od-Term{font-weight:700}.od-Definitie,.od-Tussenkop{font-style:italic}.od-Inhoud,.od-Inhoud>.od-Lijst,.od-IntIoRef,.od-Lidnr,.od-LiNr,.od-Opschrift,.od-Tussenkop{display:inline}.od-Al,.od-Lijstaanhef{margin-bottom:0.75em}.od-IntIoRef{border-bottom:1px dotted}.od-LiNummer{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur img{margin-left:25px;max-width:100%;height:auto}.od-Figuur .od-Bijschrift{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel thead{font-weight:600}.od-Kadertekst{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}';export{A as dso_ozon_content}
|
package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.transformer.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { ContentAnchor } from './ozon-content.interfaces';
|
|
3
|
-
export declare class OzonContentTransformer {
|
|
4
|
-
private anchorClick;
|
|
5
|
-
private domParser;
|
|
6
|
-
constructor(anchorClick: EventEmitter<ContentAnchor>);
|
|
7
|
-
content?: HTMLCollection;
|
|
8
|
-
setContent(content: string): void;
|
|
9
|
-
handleClickEvent(event: PointerEvent): void;
|
|
10
|
-
private handleDescriptionNoteClick;
|
|
11
|
-
private handleContentAnchor;
|
|
12
|
-
private handleValidUrls;
|
|
13
|
-
private eventHandlers;
|
|
14
|
-
private isHostElement;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as n,h as o}from"./p-dad72605.js";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function e(t){if(!("string"==typeof t||t instanceof String)){var n=r(t);throw null===t?n="null":"object"===n&&(n=t.constructor.name),new TypeError("Expected a string but received a ".concat(n))}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1},l="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",u="(".concat(l,"[.]){3}").concat(l),d=new RegExp("^".concat(u,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(u,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(u,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(u,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(u,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(u,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(u,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(u,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function f(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e(t),!(n=String(n)))return f(t,4)||f(t,6);if("4"===n){if(!d.test(t))return!1;var o=t.split(".").sort((function(t,n){return t-n}));return o[3]<=255}return"6"===n&&!!c.test(t)}function p(t,n){(null==n||n>t.length)&&(n=t.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=t[o];return r}var h={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},m=/^\[([^\]]+)\](?::([0-9]+))?$/;function v(t,n){for(var o=0;o<n.length;o++){var r=n[o];if(t===r||"[object RegExp]"===Object.prototype.toString.call(r)&&r.test(t))return!0}return!1}function y(t,n){if(e(t),!t||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((n=i(n,h)).validate_length&&t.length>=2083)return!1;if(!n.allow_fragments&&t.includes("#"))return!1;if(!n.allow_query_components&&(t.includes("?")||t.includes("&")))return!1;var o,r,l,u,d,s,c,y,g,b;if(c=t.split("#"),t=c.shift(),c=t.split("?"),t=c.shift(),(c=t.split("://")).length>1){if(o=c.shift().toLowerCase(),n.require_valid_protocol&&-1===n.protocols.indexOf(o))return!1}else{if(n.require_protocol)return!1;if("//"===t.substr(0,2)){if(!n.allow_protocol_relative_urls)return!1;c[0]=t.substr(2)}}if(""===(t=c.join("://")))return!1;if(c=t.split("/"),""===(t=c.shift())&&!n.require_host)return!0;if((c=t.split("@")).length>1){if(n.disallow_auth)return!1;if(""===c[0])return!1;if((r=c.shift()).indexOf(":")>=0&&r.split(":").length>2)return!1;var A=(g=r.split(":"),b=2,function(t){if(Array.isArray(t))return t}(g)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var o=[],r=!0,e=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(t){e=!0,i=t}finally{try{r||null==l.return||l.return()}finally{if(e)throw i}}return o}}(g,b)||function(t,n){if(t){if("string"==typeof t)return p(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?p(t,n):void 0}}(g,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());if(""===A[0]&&""===A[1])return!1}s=null,y=null;var _=(u=c.join("@")).match(m);if(_?(l="",y=_[1],s=_[2]||null):(l=(c=u.split(":")).shift(),c.length&&(s=c.join(":"))),null!==s&&s.length>0){if(d=parseInt(s,10),!/^[0-9]+$/.test(s)||d<=0||d>65535)return!1}else if(n.require_port)return!1;return n.host_whitelist?v(l,n.host_whitelist):!!(f(l)||function(t,n){e(t),(n=i(n,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1)),!0===n.allow_wildcard&&0===t.indexOf("*.")&&(t=t.substring(2));var o=t.split("."),r=o[o.length-1];if(n.require_tld){if(o.length<2)return!1;if(!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(r))return!1;if(/\s/.test(r))return!1}return!(!n.allow_numeric_tld&&/^\d+$/.test(r))&&o.every((function(t){return!(t.length>63||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(t)||/[\uff01-\uff5e]/.test(t)||/^-|-$/.test(t)||!n.allow_underscores&&/_/.test(t))}))}(l,n)||y&&f(y,6))&&(l=l||y,!n.host_blacklist||!v(l,n.host_blacklist))}const g=[function(t){return t.querySelectorAll("div.noot").forEach(((t,n)=>{const o=t.nextElementSibling;if(!(o instanceof HTMLDivElement&&"noot_popup"===o.classList.value))return;const r=t.querySelector("a");if(!(r instanceof HTMLAnchorElement))return;const e=o.querySelector(":scope > .od-Al");if(!(e instanceof HTMLDivElement&&"od-Al"===e.classList.value))return;t.replaceWith(...Array.from(t.childNodes));const i=document.createElement("div");i.replaceChildren(...Array.from(e.childNodes)),e.replaceChildren(i),o.replaceWith(e);const a=document.createElement("sup");a.replaceChildren(...Array.from(r.childNodes)),r.replaceChildren(a);const l=(n+1).toString(10),[u,d]=[`dso-ozon-term-${l}`,`dso-ozon-content-${l}`];r.setAttribute("href",`#${u}`),r.setAttribute("id",u),r.setAttribute("aria-controls",d),r.setAttribute("aria-expanded","false"),null==e||e.setAttribute("id",d)})),t},function(t){return t.querySelectorAll("span[data-verwijst-naar-documentcomponent]").forEach((t=>{const n=document.createElement("a");n.href=`#${t.getAttribute("data-verwijst-naar-documentcomponent")}`,n.replaceChildren(...Array.from(t.childNodes)),t.replaceWith(n)})),t}];class b{constructor(t){this.anchorClick=t,this.domParser=new DOMParser,this.eventHandlers=[this.handleValidUrls,this.handleDescriptionNoteClick,this.handleContentAnchor]}setContent(t){this.content=g.reduce(((t,n)=>n(t)),this.domParser.parseFromString(t,"text/html").body).children}handleClickEvent(t){this.eventHandlers.some((n=>n.bind(this)(t.composedPath(),t)))}handleDescriptionNoteClick(t,n){var o;const r=t.findIndex(this.isHostElement);if(-1===r)return!1;const e=null===(o=t.slice(0,r))||void 0===o?void 0:o.find((t=>t instanceof HTMLAnchorElement&&t.classList.contains("noot")));return!!e&&(n.preventDefault(),e.classList.contains("dso-open")?(e.classList.remove("dso-open"),e.setAttribute("aria-expanded","false")):(e.classList.add("dso-open"),e.setAttribute("aria-expanded","true")),!0)}handleContentAnchor(t,n){if(t.some((t=>t instanceof HTMLAnchorElement))){n.preventDefault();const o=t.find((t=>t instanceof HTMLAnchorElement)).href;return this.anchorClick.emit({href:o,documentComponent:o.substr(o.indexOf("#")+1),originalEvent:n}),!0}return!1}handleValidUrls(t){var n;const o=t.findIndex(this.isHostElement);return-1!==o&&(null===(n=t.slice(0,o))||void 0===n?void 0:n.some((t=>{var n;return t instanceof HTMLAnchorElement&&y(null!==(n=t.getAttribute("href"))&&void 0!==n?n:"",{require_tld:!1,require_protocol:!0})})))}isHostElement(t){return t instanceof HTMLElement&&"DSO-OZON-CONTENT"===t.tagName}}let A=class{constructor(o){t(this,o),this.anchorClick=n(this,"anchorClick",7)}handleClick(t){this.transformer.handleClickEvent(t)}componentWillLoad(){this.transformer=new b(this.anchorClick)}componentWillRender(){this.transformer.setContent(this.content)}render(){return o("div",{class:"dso-rich-content",ref:t=>this.container=t})}componentDidRender(){var t;const n=this.transformer.content;this.container&&n?this.container.replaceChildren(...Array.from(n)):null===(t=this.container)||void 0===t||t.replaceChildren()}};A.style='dso-ozon-content{display:block}.noot{text-decoration:none}.noot:not(.dso-open)+.od-Al{display:none}.noot.dso-open+.od-Al{display:block}.noot+.od-Al{margin:4px 0;padding:8px 32px 8px 8px;position:relative}.noot+.od-Al>a{display:block;height:24px;position:absolute;right:0;text-align:center;top:0;width:24px}.noot+.od-Al>a::before{background:var(--dso-icon, var(--di-times-zwart)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:"";display:block}.noot+.od-Al{background-color:#ebf3e6}.od-Term{font-weight:700}.od-Definitie,.od-Tussenkop{font-style:italic}.od-Inhoud,.od-Inhoud>.od-Lijst,.od-IntIoRef,.od-Lidnr,.od-LiNr,.od-Opschrift,.od-Tussenkop{display:inline}.od-Al,.od-Lijstaanhef{margin-bottom:0.75em}.od-IntIoRef{border-bottom:1px dotted}.od-LiNummer{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur img{margin-left:25px;max-width:100%;height:auto}.od-Figuur .od-Bijschrift{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel thead{font-weight:600}.od-Kadertekst{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}';export{A as dso_ozon_content}
|