@dso-toolkit/core 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.
Files changed (85) hide show
  1. package/dist/cjs/dso-autosuggest.cjs.entry.js +5 -1
  2. package/dist/cjs/dso-image-overlay.cjs.entry.js +62 -0
  3. package/dist/cjs/dso-ozon-content.cjs.entry.js +281 -423
  4. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  5. package/dist/cjs/dso-viewer-grid.cjs.entry.js +5 -711
  6. package/dist/cjs/focus-trap.esm-8d3e3fb6.js +712 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/autosuggest/autosuggest.js +6 -2
  10. package/dist/collection/components/highlight-box/highlight-box.template.js +4 -1
  11. package/dist/collection/components/image-overlay/image-overlay.css +263 -0
  12. package/dist/collection/components/image-overlay/image-overlay.js +72 -0
  13. package/dist/collection/components/image-overlay/image-overlay.template.js +7 -0
  14. package/dist/collection/components/ozon-content/nodes/al.node.js +13 -0
  15. package/dist/collection/components/ozon-content/nodes/document.node.js +9 -0
  16. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +15 -0
  17. package/dist/collection/components/ozon-content/nodes/fallback.node.js +10 -0
  18. package/dist/collection/components/ozon-content/nodes/illustratie.node.js +13 -0
  19. package/dist/collection/components/ozon-content/nodes/inhoud.node.js +14 -0
  20. package/dist/collection/components/ozon-content/nodes/inline.nodes.js +21 -0
  21. package/dist/collection/components/ozon-content/nodes/int-ref.node.js +26 -0
  22. package/dist/collection/components/ozon-content/nodes/noot.node.js +27 -0
  23. package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js +39 -0
  24. package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js +2 -0
  25. package/dist/collection/components/ozon-content/nodes/table.node/index.js +1 -0
  26. package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js +25 -0
  27. package/dist/collection/components/ozon-content/nodes/table.node/table-colgroup.js +4 -0
  28. package/dist/collection/components/ozon-content/nodes/table.node/table-rows.js +5 -0
  29. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +32 -0
  30. package/dist/collection/components/ozon-content/nodes/text.node.js +9 -0
  31. package/dist/collection/components/ozon-content/ozon-content-context.interface.js +1 -0
  32. package/dist/collection/components/ozon-content/ozon-content-mapper.js +76 -0
  33. package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js +1 -0
  34. package/dist/collection/components/ozon-content/ozon-content-node-state.interface.js +1 -0
  35. package/dist/collection/components/ozon-content/ozon-content-node.interface.js +1 -0
  36. package/dist/collection/components/ozon-content/ozon-content.css +15 -7
  37. package/dist/collection/components/ozon-content/ozon-content.js +21 -33
  38. package/dist/collection/components/viewer-grid/viewer-grid.css +30 -2
  39. package/dist/custom-elements/index.d.ts +6 -0
  40. package/dist/custom-elements/index.js +3022 -3103
  41. package/dist/dso-toolkit/dso-toolkit.css +1 -1
  42. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  43. package/dist/dso-toolkit/{p-de3ab027.entry.js → p-225bbb28.entry.js} +1 -5
  44. package/dist/dso-toolkit/p-44905fb1.js +5 -0
  45. package/dist/dso-toolkit/p-c6f467b3.entry.js +1 -0
  46. package/dist/dso-toolkit/p-f193c258.entry.js +1 -0
  47. package/dist/esm/dso-autosuggest.entry.js +5 -1
  48. package/dist/esm/dso-image-overlay.entry.js +58 -0
  49. package/dist/esm/dso-ozon-content.entry.js +282 -424
  50. package/dist/esm/dso-toolkit.js +1 -1
  51. package/dist/esm/dso-viewer-grid.entry.js +3 -709
  52. package/dist/esm/focus-trap.esm-299989f2.js +710 -0
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/types/components/autosuggest/autosuggest.d.ts +15 -1
  55. package/dist/types/components/image-overlay/image-overlay.d.ts +15 -0
  56. package/dist/types/components/image-overlay/image-overlay.template.d.ts +2 -0
  57. package/dist/types/components/ozon-content/nodes/al.node.d.ts +6 -0
  58. package/dist/types/components/ozon-content/nodes/document.node.d.ts +6 -0
  59. package/dist/types/components/ozon-content/nodes/ext-ref.node.d.ts +6 -0
  60. package/dist/types/components/ozon-content/nodes/fallback.node.d.ts +6 -0
  61. package/dist/types/components/ozon-content/nodes/illustratie.node.d.ts +5 -0
  62. package/dist/types/components/ozon-content/nodes/inhoud.node.d.ts +6 -0
  63. package/dist/types/components/ozon-content/nodes/inline.nodes.d.ts +6 -0
  64. package/dist/types/components/ozon-content/nodes/int-ref.node.d.ts +6 -0
  65. package/dist/types/components/ozon-content/nodes/noot.node.d.ts +8 -0
  66. package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec-mapper.d.ts +2 -0
  67. package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec.interface.d.ts +10 -0
  68. package/dist/types/components/ozon-content/nodes/table.node/index.d.ts +1 -0
  69. package/dist/types/components/ozon-content/nodes/table.node/table-cell.d.ts +8 -0
  70. package/dist/types/components/ozon-content/nodes/table.node/table-colgroup.d.ts +5 -0
  71. package/dist/types/components/ozon-content/nodes/table.node/table-rows.d.ts +8 -0
  72. package/dist/types/components/ozon-content/nodes/table.node/table.node.d.ts +7 -0
  73. package/dist/types/components/ozon-content/nodes/text.node.d.ts +5 -0
  74. package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +8 -0
  75. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +12 -0
  76. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +8 -0
  77. package/dist/types/components/ozon-content/ozon-content-node-state.interface.d.ts +3 -0
  78. package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +8 -0
  79. package/dist/types/components/ozon-content/ozon-content.d.ts +8 -10
  80. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -2
  81. package/dist/types/components.d.ts +19 -6
  82. package/package.json +2 -2
  83. package/dist/collection/components/ozon-content/ozon-content.transformer.js +0 -105
  84. package/dist/dso-toolkit/p-20856f91.entry.js +0 -1
  85. package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +0 -15
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]]], options);
13
+ return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"focused":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"mainSize":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[2,"dso-ozon-content",{"content":[1],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,11 +1,25 @@
1
1
  import { Event, EventEmitter, VNode } from "../../stencil-public-runtime";
2
2
  export interface Suggestion {
3
+ /**
4
+ * The text that will be displayed as the suggestion.
5
+ */
3
6
  value: string;
7
+ /**
8
+ * The type of suggestion.
9
+ */
4
10
  type?: string;
11
+ /**
12
+ * A reference to the original object that was used to create the suggestion.
13
+ */
14
+ item?: unknown;
5
15
  }
6
16
  export declare class Autosuggest {
7
17
  /**
8
- * The suggestions for the value of the slotted input element
18
+ * The suggestions for the value of the slotted input element. Optionally a
19
+ * Suggestion can have a `type` and `item`.
20
+ *
21
+ * The `type` is used to style the suggestion. `item` can be use to reference
22
+ * the original object that was used to create the suggestion.
9
23
  */
10
24
  readonly suggestions: Suggestion[];
11
25
  /**
@@ -0,0 +1,15 @@
1
+ import { ComponentInterface } from "../../stencil-public-runtime";
2
+ import { FocusTrap } from 'focus-trap';
3
+ export declare class ImageOverlay implements ComponentInterface {
4
+ host: HTMLElement;
5
+ active: boolean;
6
+ focused: boolean;
7
+ buttonElement: HTMLButtonElement | undefined;
8
+ wrapperElement: HTMLDivElement | undefined;
9
+ trap: FocusTrap | undefined;
10
+ private mutationObserver?;
11
+ componentDidLoad(): void;
12
+ disconnectedCallback(): void;
13
+ render(): any;
14
+ componentDidRender(): void;
15
+ }
@@ -0,0 +1,2 @@
1
+ import { ImageOverlay } from '@dso-toolkit/sources';
2
+ export declare function imageOverlayTemplate({ image }: ImageOverlay): import("lit-html").TemplateResult<1>;
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentAlNode implements OzonContentNode {
4
+ name: string;
5
+ render(node: Element, { mapNodeToJsx, path }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentDocumentNode implements OzonContentNode {
4
+ name: string;
5
+ render(node: Node, { mapNodeToJsx }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentExtRefNode implements OzonContentNode {
4
+ name: string[];
5
+ render(node: Element, { mapNodeToJsx }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentFallbackNode implements OzonContentNode {
4
+ name: string[];
5
+ render(node: Node, { mapNodeToJsx }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { OzonContentNode } from '../ozon-content-node.interface';
2
+ export declare class OzonContentIllustratieNode implements OzonContentNode {
3
+ name: string[];
4
+ render(node: Element): any;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentInhoudNode implements OzonContentNode {
4
+ name: string[];
5
+ render(node: Element, { mapNodeToJsx }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentInlineNodes implements OzonContentNode {
4
+ name: string[];
5
+ render(node: Element, { mapNodeToJsx }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentIntRefNode implements OzonContentNode {
4
+ name: string;
5
+ render(node: Element, { mapNodeToJsx, emitAnchorClick }: OzonContentNodeContext): any;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { OzonContentNodeContext } from '../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../ozon-content-node.interface';
3
+ export declare class OzonContentNootNode implements OzonContentNode {
4
+ name: string;
5
+ handles: string[];
6
+ identify(node: Element): string | undefined;
7
+ render(node: Element, { mapNodeToJsx, state: noteIsOpen, setState }: OzonContentNodeContext<boolean>): any;
8
+ }
@@ -0,0 +1,2 @@
1
+ import { Colspecs } from './colspec.interface';
2
+ export declare function mapColspecs(count: number, nodeList: NodeListOf<Element>): Colspecs;
@@ -0,0 +1,10 @@
1
+ export interface Colspecs {
2
+ totalWidth: number;
3
+ count: number;
4
+ columns: Colspec[];
5
+ }
6
+ export interface Colspec {
7
+ name: string;
8
+ number: number;
9
+ width: string | undefined;
10
+ }
@@ -0,0 +1 @@
1
+ export { OzonContentTableNode } from './table.node';
@@ -0,0 +1,8 @@
1
+ import { FunctionalComponent } from '../../../../stencil-public-runtime';
2
+ import { OzonContentNodeContext } from '../../ozon-content-node-context.interface';
3
+ import { Colspecs } from './colspec/colspec.interface';
4
+ export declare const Cell: FunctionalComponent<{
5
+ context: OzonContentNodeContext;
6
+ colspecs: Colspecs | undefined;
7
+ cell: Element;
8
+ }>;
@@ -0,0 +1,5 @@
1
+ import { FunctionalComponent } from '../../../../stencil-public-runtime';
2
+ import { Colspecs } from './colspec/colspec.interface';
3
+ export declare const Colgroup: FunctionalComponent<{
4
+ colspecs: Colspecs;
5
+ }>;
@@ -0,0 +1,8 @@
1
+ import { FunctionalComponent } from '../../../../stencil-public-runtime';
2
+ import { OzonContentNodeContext } from '../../ozon-content-node-context.interface';
3
+ import { Colspecs } from './colspec/colspec.interface';
4
+ export declare const Rows: FunctionalComponent<{
5
+ context: OzonContentNodeContext;
6
+ colspecs: Colspecs | undefined;
7
+ rows: Element[];
8
+ }>;
@@ -0,0 +1,7 @@
1
+ import { OzonContentNodeContext } from '../../ozon-content-node-context.interface';
2
+ import { OzonContentNode } from '../../ozon-content-node.interface';
3
+ export declare class OzonContentTableNode implements OzonContentNode {
4
+ name: string;
5
+ handles: string[];
6
+ render(node: Element, context: OzonContentNodeContext): any;
7
+ }
@@ -0,0 +1,5 @@
1
+ import { OzonContentNode } from '../ozon-content-node.interface';
2
+ export declare class OzonContentTextNode implements OzonContentNode {
3
+ name: string;
4
+ render(node: Node): any;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { OzonContentNodeState } from './ozon-content-node-state.interface';
3
+ import { OzonContentAnchorClick } from './ozon-content.interfaces';
4
+ export interface OzonContentContext {
5
+ state: OzonContentNodeState;
6
+ setState(state: OzonContentNodeState): void;
7
+ emitAnchorClick: EventEmitter<OzonContentAnchorClick>['emit'];
8
+ }
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { OzonContentContext } from './ozon-content-context.interface';
3
+ export declare class Mapper {
4
+ private cache;
5
+ private mappers;
6
+ private skip;
7
+ private fallbackNode;
8
+ private domParser;
9
+ private findMapper;
10
+ mapNodeToJsx(node: Node | Node[] | NodeList, context: OzonContentContext, path: Node[]): JSX.Element;
11
+ transform(xml: string, context: OzonContentContext): JSX.Element;
12
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface OzonContentNodeContext<T = unknown> {
3
+ path: Node[];
4
+ mapNodeToJsx(node: Node | Node[] | NodeList): JSX.Element;
5
+ emitAnchorClick(event: any): void;
6
+ state?: T;
7
+ setState?(state: T): void;
8
+ }
@@ -0,0 +1,3 @@
1
+ export interface OzonContentNodeState {
2
+ [nodeId: string]: unknown;
3
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { OzonContentNodeContext } from './ozon-content-node-context.interface';
3
+ export interface OzonContentNode<T = unknown> {
4
+ name: string | string[];
5
+ handles?: string[];
6
+ identify?(node: Node): string | undefined;
7
+ render(node: Node, context: OzonContentNodeContext<T>): JSX.Element;
8
+ }
@@ -1,13 +1,11 @@
1
+ /// <reference types="react" />
1
2
  import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
- import { ContentAnchor } from './ozon-content.interfaces';
3
+ import { OzonContentAnchorClick } from './ozon-content.interfaces';
4
+ import { OzonContentNodeState } from './ozon-content-node-state.interface';
3
5
  export declare class OzonContent implements ComponentInterface {
4
- content: string;
5
- anchorClick: EventEmitter<ContentAnchor>;
6
- handleClick(event: PointerEvent): void;
7
- private container?;
8
- private transformer;
9
- componentWillLoad(): void;
10
- componentWillRender(): void;
11
- render(): any;
12
- componentDidRender(): void;
6
+ content: string | undefined;
7
+ state: OzonContentNodeState;
8
+ anchorClick: EventEmitter<OzonContentAnchorClick>;
9
+ private mapper;
10
+ render(): JSX.Element;
13
11
  }
@@ -1,5 +1,5 @@
1
- export interface ContentAnchor {
1
+ export interface OzonContentAnchorClick {
2
2
  href: string;
3
3
  documentComponent: string;
4
- originalEvent: PointerEvent;
4
+ originalEvent: MouseEvent;
5
5
  }
@@ -11,7 +11,7 @@ import { HeaderMenuItem } from "./components/header/header";
11
11
  import { InfoButtonToggleEvent } from "./components/info-button/info-button";
12
12
  import { BaseLayer, BaseLayerChangeEvent } from "./components/map-base-layers/map-base-layers.interfaces";
13
13
  import { Overlay, OverlayChangeEvent } from "./components/map-overlays/map-overlays.interfaces";
14
- import { ContentAnchor } from "./components/ozon-content/ozon-content.interfaces";
14
+ import { OzonContentAnchorClick } from "./components/ozon-content/ozon-content.interfaces";
15
15
  import { SelectableChangeEvent } from "./components/selectable/selectable";
16
16
  import { TreeViewItem, TreeViewPointerEvent } from "./components/tree-view/tree-view.interfaces";
17
17
  import { FilterpanelEvent } from "./components/viewer-grid/viewer-grid";
@@ -35,7 +35,7 @@ export namespace Components {
35
35
  */
36
36
  "suggestOnFocus": boolean;
37
37
  /**
38
- * The suggestions for the value of the slotted input element
38
+ * The suggestions for the value of the slotted input element. Optionally a Suggestion can have a `type` and `item`. The `type` is used to style the suggestion. `item` can be use to reference the original object that was used to create the suggestion.
39
39
  */
40
40
  "suggestions": Suggestion[];
41
41
  }
@@ -137,6 +137,8 @@ export namespace Components {
137
137
  interface DsoIcon {
138
138
  "icon"?: string;
139
139
  }
140
+ interface DsoImageOverlay {
141
+ }
140
142
  interface DsoInfo {
141
143
  "active"?: boolean;
142
144
  "fixed"?: boolean;
@@ -162,7 +164,7 @@ export namespace Components {
162
164
  "overlays": Overlay[];
163
165
  }
164
166
  interface DsoOzonContent {
165
- "content": string;
167
+ "content": string | undefined;
166
168
  }
167
169
  interface DsoProgressBar {
168
170
  "max": number;
@@ -306,6 +308,12 @@ declare global {
306
308
  prototype: HTMLDsoIconElement;
307
309
  new (): HTMLDsoIconElement;
308
310
  };
311
+ interface HTMLDsoImageOverlayElement extends Components.DsoImageOverlay, HTMLStencilElement {
312
+ }
313
+ var HTMLDsoImageOverlayElement: {
314
+ prototype: HTMLDsoImageOverlayElement;
315
+ new (): HTMLDsoImageOverlayElement;
316
+ };
309
317
  interface HTMLDsoInfoElement extends Components.DsoInfo, HTMLStencilElement {
310
318
  }
311
319
  var HTMLDsoInfoElement: {
@@ -402,6 +410,7 @@ declare global {
402
410
  "dso-helpcenter-panel": HTMLDsoHelpcenterPanelElement;
403
411
  "dso-highlight-box": HTMLDsoHighlightBoxElement;
404
412
  "dso-icon": HTMLDsoIconElement;
413
+ "dso-image-overlay": HTMLDsoImageOverlayElement;
405
414
  "dso-info": HTMLDsoInfoElement;
406
415
  "dso-info-button": HTMLDsoInfoButtonElement;
407
416
  "dso-label": HTMLDsoLabelElement;
@@ -450,7 +459,7 @@ declare namespace LocalJSX {
450
459
  */
451
460
  "suggestOnFocus"?: boolean;
452
461
  /**
453
- * The suggestions for the value of the slotted input element
462
+ * The suggestions for the value of the slotted input element. Optionally a Suggestion can have a `type` and `item`. The `type` is used to style the suggestion. `item` can be use to reference the original object that was used to create the suggestion.
454
463
  */
455
464
  "suggestions"?: Suggestion[];
456
465
  }
@@ -560,6 +569,8 @@ declare namespace LocalJSX {
560
569
  interface DsoIcon {
561
570
  "icon"?: string;
562
571
  }
572
+ interface DsoImageOverlay {
573
+ }
563
574
  interface DsoInfo {
564
575
  "active"?: boolean;
565
576
  "fixed"?: boolean;
@@ -592,8 +603,8 @@ declare namespace LocalJSX {
592
603
  "overlays": Overlay[];
593
604
  }
594
605
  interface DsoOzonContent {
595
- "content": string;
596
- "onAnchorClick"?: (event: CustomEvent<ContentAnchor>) => void;
606
+ "content"?: string | undefined;
607
+ "onAnchorClick"?: (event: CustomEvent<OzonContentAnchorClick>) => void;
597
608
  }
598
609
  interface DsoProgressBar {
599
610
  "max"?: number;
@@ -688,6 +699,7 @@ declare namespace LocalJSX {
688
699
  "dso-helpcenter-panel": DsoHelpcenterPanel;
689
700
  "dso-highlight-box": DsoHighlightBox;
690
701
  "dso-icon": DsoIcon;
702
+ "dso-image-overlay": DsoImageOverlay;
691
703
  "dso-info": DsoInfo;
692
704
  "dso-info-button": DsoInfoButton;
693
705
  "dso-label": DsoLabel;
@@ -719,6 +731,7 @@ declare module "@stencil/core" {
719
731
  "dso-helpcenter-panel": LocalJSX.DsoHelpcenterPanel & JSXBase.HTMLAttributes<HTMLDsoHelpcenterPanelElement>;
720
732
  "dso-highlight-box": LocalJSX.DsoHighlightBox & JSXBase.HTMLAttributes<HTMLDsoHighlightBoxElement>;
721
733
  "dso-icon": LocalJSX.DsoIcon & JSXBase.HTMLAttributes<HTMLDsoIconElement>;
734
+ "dso-image-overlay": LocalJSX.DsoImageOverlay & JSXBase.HTMLAttributes<HTMLDsoImageOverlayElement>;
722
735
  "dso-info": LocalJSX.DsoInfo & JSXBase.HTMLAttributes<HTMLDsoInfoElement>;
723
736
  "dso-info-button": LocalJSX.DsoInfoButton & JSXBase.HTMLAttributes<HTMLDsoInfoButtonElement>;
724
737
  "dso-label": LocalJSX.DsoLabel & JSXBase.HTMLAttributes<HTMLDsoLabelElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "34.2.1",
3
+ "version": "35.0.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -19,7 +19,7 @@
19
19
  "build": "stencil build",
20
20
  "start": "yarn clear && cross-env DSO_ENV=development yarn node scripts/start.js",
21
21
  "watch": "yarn clear && cross-env DSO_ENV=development yarn node scripts/watch.js",
22
- "build-www": "cross-env DSO_ENV=production yarn bin_build-storybook --static-dir ./dist --output-dir ./www",
22
+ "build-www": "cross-env DSO_ENV=production yarn bin_build-storybook --static-dir ./dist,../sources/storybook-assets --output-dir ./www",
23
23
  "bin_stencil": "stencil",
24
24
  "bin_start-storybook": "start-storybook",
25
25
  "bin_cypress": "cypress",
@@ -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}
@@ -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
- }