@dso-toolkit/core 101.0.0 → 101.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/bundle/dso-document-component.js +1 -1
  2. package/dist/bundle/dso-ozon-content.js +1 -1
  3. package/dist/bundle/dsot-document-component-demo.js +3 -3
  4. package/dist/bundle/{p-Dv0849Rl.js → p-BF2e1Voi.js} +8 -6
  5. package/dist/bundle/{p-D3aWEfZN.js → p-CuUQy5lD.js} +11 -2
  6. package/dist/cjs/dso-alert_7.cjs.entry.js +11 -2
  7. package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +7 -5
  8. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1 -1
  9. package/dist/collection/components/document-component/document-component.js +8 -6
  10. package/dist/collection/components/document-component-demo/document-component.demo.js +2 -2
  11. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +12 -2
  12. package/dist/collection/components/ozon-content/ozon-content.js +1 -1
  13. package/dist/components/document-component.js +1 -1
  14. package/dist/components/dsot-document-component-demo.js +1 -1
  15. package/dist/components/ozon-content.js +1 -1
  16. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  17. package/dist/dso-toolkit/p-58c0e2ef.entry.js +1 -0
  18. package/dist/dso-toolkit/{p-37c83fa7.entry.js → p-83ab25e2.entry.js} +1 -1
  19. package/dist/dso-toolkit/p-bc3eb1dd.entry.js +1 -0
  20. package/dist/esm/dso-alert_7.entry.js +11 -2
  21. package/dist/esm/dso-annotation-locatie_2.entry.js +7 -5
  22. package/dist/esm/dsot-document-component-demo.entry.js +1 -1
  23. package/dist/types/components/document-component/document-component.d.ts +1 -1
  24. package/dist/types/components/document-component-demo/document-component.demo.d.ts +2 -1
  25. package/dist/types/components/ozon-content/nodes/ext-ref.node.d.ts +1 -1
  26. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +9 -1
  27. package/dist/types/components.d.ts +2 -2
  28. package/package.json +3 -3
  29. package/dist/dso-toolkit/p-b27d50c9.entry.js +0 -1
  30. package/dist/dso-toolkit/p-de86de0a.entry.js +0 -1
@@ -811,7 +811,7 @@ class OzonContentExtRefNode {
811
811
  constructor() {
812
812
  this.name = ["ExtRef", "ExtIoRef"];
813
813
  }
814
- render(node, { mapNodeToJsx, urlResolver }) {
814
+ render(node, { mapNodeToJsx, emitClick, urlResolver }) {
815
815
  const className = kebabCase(node.tagName);
816
816
  const ref = node.getAttribute("ref");
817
817
  const name = node.tagName === "ExtRef" ? "ExtRef" : "ExtIoRef";
@@ -819,7 +819,16 @@ class OzonContentExtRefNode {
819
819
  return mapNodeToJsx(node.childNodes);
820
820
  }
821
821
  const href = urlResolver ? urlResolver(name, "ref", ref, node) : ref;
822
- return (h("a", { target: "_blank", rel: "noopener noreferrer", href: href ?? undefined, class: className, title: "Opent andere website in nieuw tabblad" }, h("span", null, mapNodeToJsx(node.childNodes)), h("dso-icon", { icon: "external-link" })));
822
+ const handleExtRefClick = (event) => {
823
+ emitClick({
824
+ type: name,
825
+ node,
826
+ originalEvent: event,
827
+ isModifiedEvent: isModifiedEvent(event),
828
+ href: href ?? undefined,
829
+ });
830
+ };
831
+ return (h("a", { target: "_blank", rel: "noopener noreferrer", href: href ?? undefined, class: className, title: "Opent andere website in nieuw tabblad", onClick: handleExtRefClick }, h("span", null, mapNodeToJsx(node.childNodes)), h("dso-icon", { icon: "external-link" })));
823
832
  }
824
833
  }
825
834
 
@@ -154,7 +154,9 @@ const DocumentComponent = class {
154
154
  });
155
155
  break;
156
156
  case "IntRef":
157
- this.dsoOzonContentClick.emit({ originalEvent: event, ozonContentClick: event.detail });
157
+ case "ExtRef":
158
+ case "ExtIoRef":
159
+ this.dsoOzonContentClick.emit({ originalEvent: event, ozonContentClick: detail });
158
160
  break;
159
161
  default:
160
162
  return;
@@ -251,17 +253,17 @@ const DocumentComponent = class {
251
253
  this.alternativeTitle ||
252
254
  this.label ||
253
255
  this.annotated);
254
- return (h(Host, { key: 'c6d360312cae20fec1f668dbd12f246f96626891', "not-collapsible": !collapsible }, showHeading && (h("div", { key: '1a7c2f8d878a5c4e4b6beaff100b51895cfcb2ae', class: "heading-container", part: "_heading-container" }, this.wijzigactie && h("span", { key: '57afe76e091e2fe450154ffa9910b39e0eb727ab', class: "editaction-label" }, this.wijzigactieLabel, ":"), h("div", { key: '56c7aa014beded2d859a76b82c0bd837e14a2638', class: "heading" }, h(Heading, { key: '83291762e558deeb851a400462a1a58236cf3d03', headingLevel: this.headingLevel, class: "heading-element", onClick: this.alternativeTitle ? this.handleHeadingClick : undefined, mode: this.mode, href: this.href }, collapsible && this.mode === "document" && (h("dso-icon-button", { key: '15a5ede0cdc580dd06933598e1b1dc398bac54c2', label: this.open ? "Invouwen" : "Uitvouwen", class: "toggle-button", expanded: this.open, icon: this.open ? "chevron-down" : "chevron-right", variant: "tertiary", onDsoClick: (e) => this.handleHeadingClick(e.detail.originalEvent) })), h("div", { key: 'c2890a5f8eb472964eaa7c2357f6a9d4f4a24a53' }, this.notApplicable && h("span", { key: '51c58015b062dfd30dc2c861f0ca3b643853972f', class: "sr-only" }, "Niet van toepassing:"), this._kop ? (h("dso-ozon-content", { class: "kop", content: this._kop, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "kop")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "kop" }), inline: true, urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })) : (h("span", { class: "alternative-title" }, (!this.mark && this.alternativeTitle) ||
255
- (this.mark && this.alternativeTitle && (h(MarkText, { mark: this.mark && ((text) => this.mark?.(text, "alternativeTitle")), text: this.alternativeTitle, emitMarkItemHighlight: (text, elementRef) => this.dsoMarkItemHighlight.emit({ text, elementRef, source: "alternativeTitle" }) }))))), h(AantekenStatus, { key: 'c416dab7dd9703dbae2bf1fb1893316d1f7b702c', gereserveerd: this._gereserveerd, vervallen: this._vervallen }))), this.recursiveToggle !== undefined && this.open && this.mode === "document" && (h("dso-icon-button", { key: '9516065912c88183853dae03c5746929a994eeea', label: this.recursiveToggle === true ? "Verberg onderliggende artikelen" : "Toon onderliggende artikelen", class: "recursive-toggle", expanded: this.recursiveToggle === true, icon: this.recursiveToggle === true ? "eye" : "eye-slash", variant: "tertiary", onDsoClick: (e) => this.handleRecursiveToggleClick(e.detail.originalEvent) })), this.showBadge() && (h(Fragment, { key: '7d4c5a451377f4315b6b1f1539d3fe5cf7373dc7' }, h("dso-badge", { key: '942f0faa769251b3956350389d6191b3527eb897', status: this.badgeStatus, label: this.badgeTooltip ? "Toon toelichting" : undefined }, this.badge, this.badgeTooltip && h("div", { key: 'fd9cc5197bc9c11016567362780bb92315600ee5', slot: "toggletip" }, this.badgeTooltip)))), (this.label || this.annotated) && (h("div", { key: '074d8a89800ab706f584b96fb38e0666c3dc8c70', class: "addons" }, this.label && (h("dso-label", { key: '6ea565e6ff7896ae012f531a4b8e1df176cb28d3', status: this.labelStatus, compact: true }, this.label)), this.annotated && this.mode === "document" && (h("dso-icon-button", { key: '292a3d01cb2289518cfc8f14d3ae4f54c1f8232f', label: `Kenmerken en kaartgegevens ${this.openAnnotation ? "verbergen" : "tonen"}`, icon: "label", expanded: this.openAnnotation, variant: "tertiary", onDsoClick: (e) => this.dsoAnnotationToggle.emit({
256
+ return (h(Host, { key: '4be20ab7aee103b4fa74716e330d8f3bb303a7a2', "not-collapsible": !collapsible }, showHeading && (h("div", { key: 'ad0bb0c895f034617dcebb0b7a5e169e275933cd', class: "heading-container", part: "_heading-container" }, this.wijzigactie && h("span", { key: '019af6b3cd888664dcb3a61c56ef370aac23e6b9', class: "editaction-label" }, this.wijzigactieLabel, ":"), h("div", { key: '3332aa7cd5bc63f595efaf28f8e85c47223b9388', class: "heading" }, h(Heading, { key: '4a9eb6dcafff4f27dc54adb9e25f256d93807a19', headingLevel: this.headingLevel, class: "heading-element", onClick: this.alternativeTitle ? this.handleHeadingClick : undefined, mode: this.mode, href: this.href }, collapsible && this.mode === "document" && (h("dso-icon-button", { key: '99d66b2be1f939c7351ce161855476b2603d64c1', label: this.open ? "Invouwen" : "Uitvouwen", class: "toggle-button", expanded: this.open, icon: this.open ? "chevron-down" : "chevron-right", variant: "tertiary", onDsoClick: (e) => this.handleHeadingClick(e.detail.originalEvent) })), h("div", { key: 'ae0f71c453c4b355e019f26c887dac9c2bf28e21' }, this.notApplicable && h("span", { key: 'dc88588bf92a9a427aef1b0357e1cc5dd6b81fb6', class: "sr-only" }, "Niet van toepassing:"), this._kop ? (h("dso-ozon-content", { class: "kop", content: this._kop, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "kop")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "kop" }), inline: true, urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })) : (h("span", { class: "alternative-title" }, (!this.mark && this.alternativeTitle) ||
257
+ (this.mark && this.alternativeTitle && (h(MarkText, { mark: this.mark && ((text) => this.mark?.(text, "alternativeTitle")), text: this.alternativeTitle, emitMarkItemHighlight: (text, elementRef) => this.dsoMarkItemHighlight.emit({ text, elementRef, source: "alternativeTitle" }) }))))), h(AantekenStatus, { key: 'c8c11b3cb466776aa48f83c6fb7465cee27d0998', gereserveerd: this._gereserveerd, vervallen: this._vervallen }))), this.recursiveToggle !== undefined && this.open && this.mode === "document" && (h("dso-icon-button", { key: '64c3a71fad6bbbe6189201864b824266b5a1576b', label: this.recursiveToggle === true ? "Verberg onderliggende artikelen" : "Toon onderliggende artikelen", class: "recursive-toggle", expanded: this.recursiveToggle === true, icon: this.recursiveToggle === true ? "eye" : "eye-slash", variant: "tertiary", onDsoClick: (e) => this.handleRecursiveToggleClick(e.detail.originalEvent) })), this.showBadge() && (h(Fragment, { key: 'c9636820ae958525d71476f9de0419c000635535' }, h("dso-badge", { key: '3c700b6a68b9b658804ade20c189ed20f8356a54', status: this.badgeStatus, label: this.badgeTooltip ? "Toon toelichting" : undefined }, this.badge, this.badgeTooltip && h("div", { key: '7a1356ab6bbe892c09a194434d9b87090c275461', slot: "toggletip" }, this.badgeTooltip)))), (this.label || this.annotated) && (h("div", { key: '15039b5537c26a4821f8cfb193fce8c576e05687', class: "addons" }, this.label && (h("dso-label", { key: '1c04e2cb9d47a420a352f1d230440886360f8228', status: this.labelStatus, compact: true }, this.label)), this.annotated && this.mode === "document" && (h("dso-icon-button", { key: 'e91a3f5347d50a2fc1b5c9e16978dccb92188180', label: `Kenmerken en kaartgegevens ${this.openAnnotation ? "verbergen" : "tonen"}`, icon: "label", expanded: this.openAnnotation, variant: "tertiary", onDsoClick: (e) => this.dsoAnnotationToggle.emit({
256
258
  current: this.openAnnotation,
257
259
  next: !this.openAnnotation,
258
260
  scrollRef: this.host,
259
261
  originalEvent: e.detail.originalEvent,
260
- }) }))))))), this.openAnnotation && (h("div", { key: 'c6783e23c5b0d92a75f0daeeff3f17fc86e273a0', class: "annotation-container", part: "_annotation-container", role: "dialog", "aria-labelledby": "annotations-heading" }, h("dso-panel", { key: '0dc23e49986b9f6ef10df289daeb960e3308cf1d', id: "annotations", onDsoCloseClick: (e) => this.dsoAnnotationToggle.emit({
262
+ }) }))))))), this.openAnnotation && (h("div", { key: '38471391f4abddc9ac61665449e58e32fb8a349d', class: "annotation-container", part: "_annotation-container", role: "dialog", "aria-labelledby": "annotations-heading" }, h("dso-panel", { key: 'fe3aa98ca07fe542470d00c97114ae049fc7505a', id: "annotations", onDsoCloseClick: (e) => this.dsoAnnotationToggle.emit({
261
263
  current: true,
262
264
  next: false,
263
265
  originalEvent: e,
264
- }), closeButtonLabel: "Kenmerken en kaartgegevens verbergen" }, h("h2", { key: 'c6aa4ffa7bedad876bc336bf06b05b0868e5288f', id: "annotations-heading", slot: "heading" }, "Kenmerken en kaart"), h("slot", { key: '42d7d144687ed698bd9d2cd8c6e0148157820cc4', name: "annotations" })))), this.open && (this._inhoud || this._gereserveerd || this._vervallen) && this.mode === "document" && (h("div", { key: '813ec0cfe9dab1d1b4181f7b577e05daec98a7de', class: "content", part: "_content" }, h(AantekenAlert, { key: 'bc0af71076866d282259efc251dcccd973b23cbb', gereserveerd: this._gereserveerd, vervallen: this._vervallen }), this._inhoud && (h("dso-ozon-content", { key: '5a5a5858a0017bd0634fb2dc8ddc924bbe713c53', content: this._inhoud, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "inhoud")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "inhoud" }), urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })))), h("div", { key: '3a6fc06676c63b331328540161d509a7b830c6c1', class: "children-container", part: "_children-container" }, h("slot", { key: 'edf04d48a076d5f2e3a85e8f8847581637138636' }))));
266
+ }), closeButtonLabel: "Kenmerken en kaartgegevens verbergen" }, h("h2", { key: 'abd850d5dc9968e99eddd82dd83d910a6a5d9c4c', id: "annotations-heading", slot: "heading" }, "Kenmerken en kaart"), h("slot", { key: '1fa41e97bcf08136c9bf04d45ceb17bc4890e011', name: "annotations" })))), this.open && (this._inhoud || this._gereserveerd || this._vervallen) && this.mode === "document" && (h("div", { key: '0724d483c74eb4d9a5bf98df1334a43c226dcf55', class: "content", part: "_content" }, h(AantekenAlert, { key: 'a0aa3ed13249655d663eb00e8fe4251c6beaefd4', gereserveerd: this._gereserveerd, vervallen: this._vervallen }), this._inhoud && (h("dso-ozon-content", { key: '9c66a737d583952bcf446069e946eb80d5874e5e', content: this._inhoud, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "inhoud")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "inhoud" }), urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })))), h("div", { key: 'f35afe9004c21d7a273b981473ff2503b2d4c42d', class: "children-container", part: "_children-container" }, h("slot", { key: '701ae6f0277914e8580c0591a73812c46dbd2f33' }))));
265
267
  }
266
268
  get host() { return getElement(this); }
267
269
  };
@@ -1852,7 +1852,7 @@ const DocumentComponentDemo = class {
1852
1852
  }
1853
1853
  render() {
1854
1854
  const { DocumentComponent, MenuButton } = this;
1855
- return (h("dso-responsive-element", { key: 'dd6c3e855d2304deff0ce4e45a75d7364b69d7e8', class: "dso-document-components" }, h("div", { key: '29d05577d45f45295999ab045b32379637e2e4c6', class: "dso-navbar" }, h("ul", { key: 'c76a943913b4bde6c547d455c00e3e517f9e7eaa', class: "dso-nav dso-nav-sub" }, this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((d) => (h("li", { class: this.document === d ? "dso-active" : undefined }, h(MenuButton, { documentComponent: d })))))), this.document && h(DocumentComponent, { key: 'b0799337f9b5559d0e712cb8154a1a61234ddd20', path: [this.document] })));
1855
+ return (h("dso-responsive-element", { key: '325c3f0c6cae4feecaf9e01fe74fc602a653f137', class: "dso-document-components" }, h("div", { key: 'df6ff8a61e2fefc28b9dace9ea88fcc2b6f0009e', class: "dso-navbar" }, h("ul", { key: '6b44f5260a57c2a296068aa9d122c31e3d8d6502', class: "dso-nav dso-nav-sub" }, this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((d) => (h("li", { class: this.document === d ? "dso-active" : undefined }, h(MenuButton, { documentComponent: d })))))), this.document && h(DocumentComponent, { key: 'fd300e2da9b2e29b46e29c3108e78f609e8b4e40', path: [this.document] })));
1856
1856
  }
1857
1857
  static get watchers() { return {
1858
1858
  "jsonFile": [{
@@ -142,7 +142,7 @@ export declare class DocumentComponent implements ComponentInterface {
142
142
  */
143
143
  dsoTableOfContentsClick: EventEmitter<DocumentComponentTableOfContentsClickEvent>;
144
144
  /**
145
- * Emitted when the user interacts with IntRef in Ozon Content
145
+ * Emitted when the user interacts with IntRef, ExtRef or ExtIoRef in Ozon Content
146
146
  */
147
147
  dsoOzonContentClick: EventEmitter<DocumentComponentOzonContentClickEvent>;
148
148
  /**
@@ -49,7 +49,8 @@ export declare class DocumentComponentDemo implements ComponentInterface {
49
49
  */
50
50
  ozonContentBegripResolver?: OzonContentBegripResolver;
51
51
  /**
52
- * To demo the user interacting with Kop, IntRef or the Kenmerken en kaart button of IntIoRef in Ozon Content
52
+ * To demo the user interacting with Kop, IntRef, ExtRef, ExtIoRef or the Kenmerken en kaart button of IntIoRef in
53
+ * Ozon Content
53
54
  */
54
55
  dsotOzonContentClick: EventEmitter<DocumentComponentOzonContentClickEvent>;
55
56
  /**
@@ -2,5 +2,5 @@ import { OzonContentNodeContext } from "../ozon-content-node-context.interface";
2
2
  import { OzonContentNode } from "../ozon-content-node.interface";
3
3
  export declare class OzonContentExtRefNode implements OzonContentNode {
4
4
  name: string[];
5
- render(node: Element, { mapNodeToJsx, urlResolver }: OzonContentNodeContext): any;
5
+ render(node: Element, { mapNodeToJsx, emitClick, urlResolver }: OzonContentNodeContext): any;
6
6
  }
@@ -8,7 +8,15 @@ export type OzonContentClickIntIoRefEvent = OzonContentClickBaseEvent<"IntIoRef"
8
8
  export type OzonContentClickIntRefEvent = OzonContentClickBaseEvent<"IntRef"> & {
9
9
  isModifiedEvent: boolean;
10
10
  };
11
- export type OzonContentClickEvent = OzonContentClickKopEvent | OzonContentClickIntRefEvent | OzonContentClickIntIoRefEvent;
11
+ export type OzonContentClickExtRefEvent = OzonContentClickBaseEvent<"ExtRef"> & {
12
+ isModifiedEvent: boolean;
13
+ href: string | undefined;
14
+ };
15
+ export type OzonContentClickExtIoRefEvent = OzonContentClickBaseEvent<"ExtIoRef"> & {
16
+ isModifiedEvent: boolean;
17
+ href: string | undefined;
18
+ };
19
+ export type OzonContentClickEvent = OzonContentClickKopEvent | OzonContentClickIntRefEvent | OzonContentClickIntIoRefEvent | OzonContentClickExtRefEvent | OzonContentClickExtIoRefEvent;
12
20
  export type OzonContentInputType = XMLDocument | string;
13
21
  export interface OzonContentMarkItemHighlightEvent {
14
22
  text: string;
@@ -3542,7 +3542,7 @@ declare namespace LocalJSX {
3542
3542
  */
3543
3543
  "onDsoOpenToggle"?: (event: DsoDocumentComponentCustomEvent<DocumentComponentOpenToggleEvent>) => void;
3544
3544
  /**
3545
- * Emitted when the user interacts with IntRef in Ozon Content
3545
+ * Emitted when the user interacts with IntRef, ExtRef or ExtIoRef in Ozon Content
3546
3546
  */
3547
3547
  "onDsoOzonContentClick"?: (event: DsoDocumentComponentCustomEvent<DocumentComponentOzonContentClickEvent>) => void;
3548
3548
  /**
@@ -4696,7 +4696,7 @@ declare namespace LocalJSX {
4696
4696
  */
4697
4697
  "mode"?: DocumentComponentMode;
4698
4698
  /**
4699
- * To demo the user interacting with Kop, IntRef or the Kenmerken en kaart button of IntIoRef in Ozon Content
4699
+ * To demo the user interacting with Kop, IntRef, ExtRef, ExtIoRef or the Kenmerken en kaart button of IntIoRef in Ozon Content
4700
4700
  */
4701
4701
  "onDsotOzonContentClick"?: (event: DsotDocumentComponentDemoCustomEvent<DocumentComponentOzonContentClickEvent>) => void;
4702
4702
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "101.0.0",
3
+ "version": "101.1.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/components/index.js",
@@ -19,7 +19,7 @@
19
19
  "@stencil/core": "4.44.2",
20
20
  "@stencil/store": "^2.2.4",
21
21
  "clsx": "^2.1.1",
22
- "dso-toolkit": "101.0.0",
22
+ "dso-toolkit": "101.1.0",
23
23
  "escape-string-regexp": "^5.0.0",
24
24
  "focus-trap": "^8.2.2",
25
25
  "i18next": "^26.4.2",
@@ -51,7 +51,7 @@
51
51
  "typescript": "~5.9.3"
52
52
  },
53
53
  "peerDependencies": {
54
- "dso-toolkit": "101.0.0"
54
+ "dso-toolkit": "101.1.0"
55
55
  },
56
56
  "nx": {
57
57
  "includedScripts": []