@dso-toolkit/angular 57.0.0 → 58.0.1

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.
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ChangeDetectionStrategy, EventEmitter, Output, inject, ViewContainerRef, Input, TemplateRef, Injectable, NgModule } from '@angular/core';
3
+ import { Component, ChangeDetectionStrategy, EventEmitter, Output, NgModule } from '@angular/core';
4
4
  import { fromEvent } from 'rxjs';
5
5
  import { defineCustomElement as defineCustomElement$1 } from '@dso-toolkit/core/dist/components/dso-accordion.js';
6
6
  import { defineCustomElement as defineCustomElement$2 } from '@dso-toolkit/core/dist/components/dso-accordion-section.js';
@@ -46,11 +46,6 @@ import { defineCustomElement as defineCustomElement$F } from '@dso-toolkit/core/
46
46
  import { defineCustomElement as defineCustomElement$G } from '@dso-toolkit/core/dist/components/dso-tree-view.js';
47
47
  import { defineCustomElement as defineCustomElement$H } from '@dso-toolkit/core/dist/components/dso-viewer-grid.js';
48
48
  import { defineCustomElement as defineCustomElement$I } from '@dso-toolkit/core/dist/components/dsot-document-component-demo.js';
49
- import { Dialog, DialogModule } from '@angular/cdk/dialog';
50
- import * as i1 from '@angular/common';
51
- import { CommonModule } from '@angular/common';
52
- import * as i2 from '@angular/cdk/portal';
53
- import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
54
49
 
55
50
  /* eslint-disable */
56
51
  /* tslint:disable */
@@ -1016,12 +1011,12 @@ let DsoModal = class DsoModal {
1016
1011
  proxyOutputs(this, this.el, ['dsoClose']);
1017
1012
  }
1018
1013
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModal, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1019
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: DsoModal, selector: "dso-modal", inputs: { initialFocus: "initialFocus", modalTitle: "modalTitle", returnFocus: "returnFocus", role: "role", showCloseButton: "showCloseButton" }, outputs: { dsoClose: "dsoClose" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1014
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: DsoModal, selector: "dso-modal", inputs: { fullscreen: "fullscreen", modalTitle: "modalTitle", role: "role", showCloseButton: "showCloseButton" }, outputs: { dsoClose: "dsoClose" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1020
1015
  };
1021
1016
  DsoModal = __decorate([
1022
1017
  ProxyCmp({
1023
1018
  defineCustomElementFn: defineCustomElement$u,
1024
- inputs: ['initialFocus', 'modalTitle', 'returnFocus', 'role', 'showCloseButton']
1019
+ inputs: ['fullscreen', 'modalTitle', 'role', 'showCloseButton']
1025
1020
  })
1026
1021
  ], DsoModal);
1027
1022
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModal, decorators: [{
@@ -1031,7 +1026,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
1031
1026
  changeDetection: ChangeDetectionStrategy.OnPush,
1032
1027
  template: '<ng-content></ng-content>',
1033
1028
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1034
- inputs: ['initialFocus', 'modalTitle', 'returnFocus', 'role', 'showCloseButton'],
1029
+ inputs: ['fullscreen', 'modalTitle', 'role', 'showCloseButton'],
1035
1030
  }]
1036
1031
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { dsoClose: [{
1037
1032
  type: Output
@@ -1513,173 +1508,19 @@ const DIRECTIVES = [
1513
1508
  DsotDocumentComponentDemo
1514
1509
  ];
1515
1510
 
1516
- class DsoModalContainer {
1517
- viewContainerRef = inject(ViewContainerRef);
1518
- title;
1519
- options;
1520
- bodyPortalRef;
1521
- footerPortalRef;
1522
- dsoClose = new EventEmitter();
1523
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModalContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
1524
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: DsoModalContainer, selector: "dso-modal-container", inputs: { title: "title", options: "options", bodyPortalRef: "bodyPortalRef", footerPortalRef: "footerPortalRef" }, outputs: { dsoClose: "dsoClose" }, ngImport: i0, template: `
1525
- <dso-modal
1526
- [modalTitle]="title"
1527
- [role]="options?.role"
1528
- [showCloseButton]="options?.showCloseButton"
1529
- [initialFocus]="options?.initialFocus"
1530
- [returnFocus]="options?.returnFocus"
1531
- (dsoClose)="dsoClose.emit($event.detail)"
1532
- >
1533
- <div *ngIf="bodyPortalRef" slot="body"><ng-template [cdkPortalOutlet]="bodyPortalRef"></ng-template></div>
1534
- <div *ngIf="footerPortalRef" slot="footer"><ng-template [cdkPortalOutlet]="footerPortalRef"></ng-template></div>
1535
- </dso-modal>
1536
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: DsoModal, selector: "dso-modal", inputs: ["initialFocus", "modalTitle", "returnFocus", "role", "showCloseButton"], outputs: ["dsoClose"] }] });
1537
- }
1538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModalContainer, decorators: [{
1539
- type: Component,
1540
- args: [{
1541
- selector: "dso-modal-container",
1542
- template: `
1543
- <dso-modal
1544
- [modalTitle]="title"
1545
- [role]="options?.role"
1546
- [showCloseButton]="options?.showCloseButton"
1547
- [initialFocus]="options?.initialFocus"
1548
- [returnFocus]="options?.returnFocus"
1549
- (dsoClose)="dsoClose.emit($event.detail)"
1550
- >
1551
- <div *ngIf="bodyPortalRef" slot="body"><ng-template [cdkPortalOutlet]="bodyPortalRef"></ng-template></div>
1552
- <div *ngIf="footerPortalRef" slot="footer"><ng-template [cdkPortalOutlet]="footerPortalRef"></ng-template></div>
1553
- </dso-modal>
1554
- `,
1555
- }]
1556
- }], propDecorators: { title: [{
1557
- type: Input
1558
- }], options: [{
1559
- type: Input
1560
- }], bodyPortalRef: [{
1561
- type: Input
1562
- }], footerPortalRef: [{
1563
- type: Input
1564
- }], dsoClose: [{
1565
- type: Output
1566
- }] } });
1567
-
1568
- class DsoModalRef {
1569
- dialogRef;
1570
- constructor(dialogRef) {
1571
- this.dialogRef = dialogRef;
1572
- }
1573
- close() {
1574
- this.dialogRef.close();
1575
- }
1576
- onDsoClose() {
1577
- if (!this.dialogRef.componentInstance) {
1578
- throw Error("DsoModalRef dialogRef is not opened using a componentInstance");
1579
- }
1580
- return this.dialogRef.componentInstance.dsoClose;
1581
- }
1582
- }
1583
-
1584
- class DsoModalController {
1585
- cdkDialog = inject(Dialog);
1586
- open({ title, body, footer }, config) {
1587
- const dialogRef = this.cdkDialog.open(DsoModalContainer, { data: config?.data });
1588
- if (dialogRef.componentInstance) {
1589
- if (title) {
1590
- dialogRef.componentInstance.title = title;
1591
- }
1592
- if (config?.options) {
1593
- dialogRef.componentInstance.options = config.options;
1594
- }
1595
- const bodyPortal = body instanceof TemplateRef
1596
- ? new TemplatePortal(body, dialogRef.componentInstance.viewContainerRef)
1597
- : new ComponentPortal(body);
1598
- dialogRef.componentInstance.bodyPortalRef = bodyPortal;
1599
- if (footer) {
1600
- const footerPortal = footer instanceof TemplateRef
1601
- ? new TemplatePortal(footer, dialogRef.componentInstance.viewContainerRef)
1602
- : new ComponentPortal(footer);
1603
- dialogRef.componentInstance.footerPortalRef = footerPortal;
1604
- }
1605
- }
1606
- return new DsoModalRef(dialogRef);
1607
- }
1608
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModalController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1609
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModalController });
1610
- }
1611
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoModalController, decorators: [{
1612
- type: Injectable
1613
- }] });
1614
-
1615
1511
  class DsoToolkitModule {
1616
1512
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1617
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule, declarations: [DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo, DsoModalContainer], imports: [CommonModule, DialogModule], exports: [DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo] });
1618
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule, providers: [DsoModalController], imports: [CommonModule, DialogModule] });
1513
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule, declarations: [DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo], exports: [DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo] });
1514
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule });
1619
1515
  }
1620
1516
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: DsoToolkitModule, decorators: [{
1621
1517
  type: NgModule,
1622
1518
  args: [{
1623
- declarations: [...DIRECTIVES, DsoModalContainer],
1624
- imports: [CommonModule, DialogModule],
1625
- providers: [DsoModalController],
1519
+ declarations: [...DIRECTIVES],
1626
1520
  exports: [...DIRECTIVES],
1627
1521
  }]
1628
1522
  }] });
1629
1523
 
1630
- /** This component is used to demo the DsoModalController for angular */
1631
- class ModalControllerDemo {
1632
- controller = inject(DsoModalController);
1633
- modalRef;
1634
- body;
1635
- footer;
1636
- modalTitle;
1637
- showCloseButton = false;
1638
- dsoClose = new EventEmitter();
1639
- open() {
1640
- if (this.body) {
1641
- this.modalRef = this.controller.open({ body: this.body, footer: this.footer, title: this.modalTitle }, { options: { showCloseButton: this.showCloseButton } });
1642
- this.modalRef.onDsoClose().subscribe((e) => this.dsoClose.emit(e));
1643
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1644
- window["modalRef"] = { framework: "angular", ref: this.modalRef };
1645
- }
1646
- }
1647
- ngAfterViewInit() {
1648
- this.open();
1649
- }
1650
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ModalControllerDemo, deps: [], target: i0.ɵɵFactoryTarget.Component });
1651
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: ModalControllerDemo, selector: "modal-controller-demo", inputs: { body: "body", footer: "footer", modalTitle: "modalTitle", showCloseButton: "showCloseButton" }, outputs: { dsoClose: "dsoClose" }, ngImport: i0, template: ``, isInline: true });
1652
- }
1653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ModalControllerDemo, decorators: [{
1654
- type: Component,
1655
- args: [{
1656
- selector: "modal-controller-demo",
1657
- template: ``,
1658
- }]
1659
- }], propDecorators: { body: [{
1660
- type: Input
1661
- }], footer: [{
1662
- type: Input
1663
- }], modalTitle: [{
1664
- type: Input
1665
- }], showCloseButton: [{
1666
- type: Input
1667
- }], dsoClose: [{
1668
- type: Output
1669
- }] } });
1670
- /** This component is used to demo passing a Type<unknown> as the body for the DsoModalController for angular */
1671
- class ModalDemoContentComponent {
1672
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ModalDemoContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1673
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: ModalDemoContentComponent, selector: "modal-demo-content-component", ngImport: i0, template: `Dit is een voorbeeld van een Angular component wat wordt geinstantieerd als body`, isInline: true });
1674
- }
1675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ModalDemoContentComponent, decorators: [{
1676
- type: Component,
1677
- args: [{
1678
- selector: "modal-demo-content-component",
1679
- template: `Dit is een voorbeeld van een Angular component wat wordt geinstantieerd als body`,
1680
- }]
1681
- }] });
1682
-
1683
1524
  /*
1684
1525
  * Public API Surface of component-library
1685
1526
  */
@@ -1688,5 +1529,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
1688
1529
  * Generated bundle index. Do not edit.
1689
1530
  */
1690
1531
 
1691
- export { DIRECTIVES, DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoModalController, DsoModalRef, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoToolkitModule, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo, ModalControllerDemo, ModalDemoContentComponent };
1532
+ export { DIRECTIVES, DsoAccordion, DsoAccordionSection, DsoActionList, DsoActionListItem, DsoAlert, DsoAnnotationButton, DsoAnnotationOutput, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoCard, DsoCardContainer, DsoDatePicker, DsoDocumentComponent, DsoDropdownMenu, DsoExpandable, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoListButton, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoModal, DsoOzonContent, DsoPagination, DsoProgressBar, DsoProgressIndicator, DsoResponsiveElement, DsoScrollable, DsoSelectable, DsoSlideToggle, DsoTable, DsoToggletip, DsoToolkitModule, DsoTooltip, DsoTreeView, DsoViewerGrid, DsotDocumentComponentDemo };
1692
1533
  //# sourceMappingURL=dso-toolkit-angular.mjs.map