@spicainternational/ngx-sds-components 6.0.1 → 6.0.6

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 (28) hide show
  1. package/README.md +5 -1
  2. package/esm2020/src/lib/modal/dialog/dialog.component.mjs +1 -1
  3. package/esm2020/src/lib/modal/modal.component.mjs +20 -3
  4. package/esm2020/src/lib/modal/modal.module.mjs +5 -1
  5. package/esm2020/src/lib/navigation/navigation-group/navigation-group.component.mjs +8 -3
  6. package/esm2020/src/lib/navigation/navigation-route-link/navigation-route-link.component.mjs +3 -3
  7. package/esm2020/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.mjs +16 -3
  8. package/esm2020/src/lib/navigation/navigation.module.mjs +2 -2
  9. package/esm2020/src/lib/navigation/utils/navigation.utils.mjs +4 -0
  10. package/esm2020/src/lib/pane/pane.component.mjs +1 -1
  11. package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +24 -3
  12. package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
  13. package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs +27 -6
  14. package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -1
  15. package/fesm2015/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -1
  16. package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +24 -3
  17. package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
  18. package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs +27 -6
  19. package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -1
  20. package/fesm2020/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/src/lib/modal/modal.component.d.ts +13 -1
  23. package/src/lib/modal/modal.module.d.ts +3 -2
  24. package/src/lib/navigation/navigation-group/navigation-group.component.d.ts +2 -1
  25. package/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.d.ts +5 -1
  26. package/src/lib/navigation/utils/navigation.utils.d.ts +1 -0
  27. package/esm2020/src/lib/navigation/pipes/index.mjs +0 -2
  28. package/src/lib/navigation/pipes/index.d.ts +0 -1
@@ -5,6 +5,8 @@ import { CommonModule } from '@angular/common';
5
5
  import { faXmark } from '@fortawesome/pro-regular-svg-icons';
6
6
  import * as i2 from '@angular/cdk/a11y';
7
7
  import { A11yModule } from '@angular/cdk/a11y';
8
+ import * as i3 from '@angular/cdk/drag-drop';
9
+ import { DragDropModule } from '@angular/cdk/drag-drop';
8
10
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
9
11
 
10
12
  class SdsModalComponent {
@@ -17,6 +19,18 @@ class SdsModalComponent {
17
19
  this.autoFocusCloseButton = false;
18
20
  this.isScrollable = true;
19
21
  this.closeOnEscape = false;
22
+ /**
23
+ * Allow the modal to be draggable by the user. Default is false.
24
+ *
25
+ * @memberof SdsModalComponent
26
+ */
27
+ this.isDraggable = false;
28
+ /**
29
+ * Constrain modal to the viewport. Default is true.
30
+ *
31
+ * @memberof SdsModalComponent
32
+ */
33
+ this.isDragConstrained = true;
20
34
  /**
21
35
  * @deprecated Use isOpenChange instead
22
36
  */
@@ -80,10 +94,10 @@ class SdsModalComponent {
80
94
  }
81
95
  }
82
96
  SdsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
83
- SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", size: "size", modalDialogId: "modalDialogId", showCloseButton: "showCloseButton", autoFocusCloseButton: "autoFocusCloseButton", translations: "translations", isScrollable: "isScrollable", closeOnEscape: "closeOnEscape", isOpen: "isOpen" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose", closeClick: "closeClick", closeEscapeKeypress: "closeEscapeKeypress", isOpenChange: "isOpenChange" }, queries: [{ propertyName: "headerContent", first: true, predicate: ["header"], descendants: true }], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "_closeButton", first: true, predicate: ["closeButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #modal class=\"modal\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div class=\"modal-content\">\r\n\r\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal .modal-header button.btn-close{font-size:.75em}.modal .modal-header button.btn-close:hover{background-color:var(--bs-gray-200)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}@media (min-width: 820px){.modal-820{max-width:820px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
97
+ SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", size: "size", modalDialogId: "modalDialogId", showCloseButton: "showCloseButton", autoFocusCloseButton: "autoFocusCloseButton", translations: "translations", isScrollable: "isScrollable", closeOnEscape: "closeOnEscape", isDraggable: "isDraggable", isDragConstrained: "isDragConstrained", isOpen: "isOpen" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose", closeClick: "closeClick", closeEscapeKeypress: "closeEscapeKeypress", isOpenChange: "isOpenChange" }, queries: [{ propertyName: "headerContent", first: true, predicate: ["header"], descendants: true }], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "_closeButton", first: true, predicate: ["closeButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #modal class=\"modal modal-backdrop\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div \r\n class=\"modal-content\" \r\n cdkDrag [cdkDragDisabled]=\"!isDraggable\" [cdkDragBoundary]=\"isDragConstrained ? '.modal-backdrop' : ''\"\r\n >\r\n\r\n <div *ngIf=\"isDraggable\" class=\"modal-drag-handle\" cdkDragHandle></div>\r\n\r\n <div \r\n *ngIf=\"showHeader && headerContent\" \r\n class=\"modal-header\" \r\n >\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal .modal-drag-handle{cursor:move;position:absolute;width:100%;height:1rem}.modal .modal-header button.btn-close{font-size:.75em}.modal .modal-header button.btn-close:hover{background-color:var(--bs-gray-200)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}@media (min-width: 820px){.modal-820{max-width:820px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }] });
84
98
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalComponent, decorators: [{
85
99
  type: Component,
86
- args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div class=\"modal-content\">\r\n\r\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal .modal-header button.btn-close{font-size:.75em}.modal .modal-header button.btn-close:hover{background-color:var(--bs-gray-200)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}@media (min-width: 820px){.modal-820{max-width:820px}}\n"] }]
100
+ args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal modal-backdrop\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div \r\n class=\"modal-content\" \r\n cdkDrag [cdkDragDisabled]=\"!isDraggable\" [cdkDragBoundary]=\"isDragConstrained ? '.modal-backdrop' : ''\"\r\n >\r\n\r\n <div *ngIf=\"isDraggable\" class=\"modal-drag-handle\" cdkDragHandle></div>\r\n\r\n <div \r\n *ngIf=\"showHeader && headerContent\" \r\n class=\"modal-header\" \r\n >\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal .modal-drag-handle{cursor:move;position:absolute;width:100%;height:1rem}.modal .modal-header button.btn-close{font-size:.75em}.modal .modal-header button.btn-close:hover{background-color:var(--bs-gray-200)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}@media (min-width: 820px){.modal-820{max-width:820px}}\n"] }]
87
101
  }], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
88
102
  type: ContentChild,
89
103
  args: ['header']
@@ -107,6 +121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
107
121
  type: Input
108
122
  }], closeOnEscape: [{
109
123
  type: Input
124
+ }], isDraggable: [{
125
+ type: Input
126
+ }], isDragConstrained: [{
127
+ type: Input
110
128
  }], modalOpen: [{
111
129
  type: Output
112
130
  }], modalClose: [{
@@ -231,7 +249,7 @@ class SdsDialogComponent {
231
249
  }
232
250
  }
233
251
  SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
234
- SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", primaryButtonText: "primaryButtonText", primaryButtonClass: "primaryButtonClass", primaryButtonType: "primaryButtonType", primaryButtonId: "primaryButtonId", primaryButtonDisabled: "primaryButtonDisabled", secondaryButtonText: "secondaryButtonText", secondaryButtonClass: "secondaryButtonClass", secondaryButtonType: "secondaryButtonType", secondaryButtonId: "secondaryButtonId", secondaryButtonDisabled: "secondaryButtonDisabled", closeOnEscape: "closeOnEscape", showHeader: "showHeader", showCloseButton: "showCloseButton", showPrimaryButton: "showPrimaryButton", showSecondaryButton: "showSecondaryButton", autofocusElement: "autofocusElement", modalDialogId: "modalDialogId", isOpen: "isOpen" }, outputs: { dialogOpen: "dialogOpen", dialogClose: "dialogClose", isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }, { propertyName: "_content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }, { propertyName: "_primaryButton", first: true, predicate: ["primaryButton"], descendants: true, read: ElementRef }, { propertyName: "_secondaryButton", first: true, predicate: ["secondaryButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [modalDialogId]=\"modalDialogId\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n [autoFocusCloseButton]=\"autofocusElement === 'close'\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n (closeClick)=\"onCloseClick()\"\r\n (closeEscapeKeypress)=\"onCloseEscapeKeypress()\"\r\n (modalClose)=\"onModalClose()\"\r\n (modalOpen)=\"onModalOpen()\"\r\n [(isOpen)]=\"isOpen\"\r\n>\r\n\r\n <div #content [attr.tabindex]=\"autofocusElement === 'content' ? 0 : undefined\" >\r\n <ng-content></ng-content>\r\n </div>\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n #secondaryButton\r\n *ngIf=\"showSecondaryButton\"\r\n [attr.id]=\"secondaryButtonId\"\r\n [disabled]=\"secondaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n #primaryButton\r\n *ngIf=\"showPrimaryButton\"\r\n [attr.id]=\"primaryButtonId\"\r\n [disabled]=\"primaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SdsModalComponent, selector: "sds-modal", inputs: ["modalTitle", "showHeader", "showFooter", "size", "modalDialogId", "showCloseButton", "autoFocusCloseButton", "translations", "isScrollable", "closeOnEscape", "isOpen"], outputs: ["modalOpen", "modalClose", "closeClick", "closeEscapeKeypress", "isOpenChange"] }] });
252
+ SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", primaryButtonText: "primaryButtonText", primaryButtonClass: "primaryButtonClass", primaryButtonType: "primaryButtonType", primaryButtonId: "primaryButtonId", primaryButtonDisabled: "primaryButtonDisabled", secondaryButtonText: "secondaryButtonText", secondaryButtonClass: "secondaryButtonClass", secondaryButtonType: "secondaryButtonType", secondaryButtonId: "secondaryButtonId", secondaryButtonDisabled: "secondaryButtonDisabled", closeOnEscape: "closeOnEscape", showHeader: "showHeader", showCloseButton: "showCloseButton", showPrimaryButton: "showPrimaryButton", showSecondaryButton: "showSecondaryButton", autofocusElement: "autofocusElement", modalDialogId: "modalDialogId", isOpen: "isOpen" }, outputs: { dialogOpen: "dialogOpen", dialogClose: "dialogClose", isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }, { propertyName: "_content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }, { propertyName: "_primaryButton", first: true, predicate: ["primaryButton"], descendants: true, read: ElementRef }, { propertyName: "_secondaryButton", first: true, predicate: ["secondaryButton"], descendants: true, read: ElementRef }], ngImport: i0, template: "<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [modalDialogId]=\"modalDialogId\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n [autoFocusCloseButton]=\"autofocusElement === 'close'\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n (closeClick)=\"onCloseClick()\"\r\n (closeEscapeKeypress)=\"onCloseEscapeKeypress()\"\r\n (modalClose)=\"onModalClose()\"\r\n (modalOpen)=\"onModalOpen()\"\r\n [(isOpen)]=\"isOpen\"\r\n>\r\n\r\n <div #content [attr.tabindex]=\"autofocusElement === 'content' ? 0 : undefined\" >\r\n <ng-content></ng-content>\r\n </div>\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n #secondaryButton\r\n *ngIf=\"showSecondaryButton\"\r\n [attr.id]=\"secondaryButtonId\"\r\n [disabled]=\"secondaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n #primaryButton\r\n *ngIf=\"showPrimaryButton\"\r\n [attr.id]=\"primaryButtonId\"\r\n [disabled]=\"primaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SdsModalComponent, selector: "sds-modal", inputs: ["modalTitle", "showHeader", "showFooter", "size", "modalDialogId", "showCloseButton", "autoFocusCloseButton", "translations", "isScrollable", "closeOnEscape", "isDraggable", "isDragConstrained", "isOpen"], outputs: ["modalOpen", "modalClose", "closeClick", "closeEscapeKeypress", "isOpenChange"] }] });
235
253
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDialogComponent, decorators: [{
236
254
  type: Component,
237
255
  args: [{ selector: 'sds-dialog', template: "<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [modalDialogId]=\"modalDialogId\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n [autoFocusCloseButton]=\"autofocusElement === 'close'\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n (closeClick)=\"onCloseClick()\"\r\n (closeEscapeKeypress)=\"onCloseEscapeKeypress()\"\r\n (modalClose)=\"onModalClose()\"\r\n (modalOpen)=\"onModalOpen()\"\r\n [(isOpen)]=\"isOpen\"\r\n>\r\n\r\n <div #content [attr.tabindex]=\"autofocusElement === 'content' ? 0 : undefined\" >\r\n <ng-content></ng-content>\r\n </div>\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n #secondaryButton\r\n *ngIf=\"showSecondaryButton\"\r\n [attr.id]=\"secondaryButtonId\"\r\n [disabled]=\"secondaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n #primaryButton\r\n *ngIf=\"showPrimaryButton\"\r\n [attr.id]=\"primaryButtonId\"\r\n [disabled]=\"primaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n" }]
@@ -307,10 +325,12 @@ SdsModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
307
325
  SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent,
308
326
  SdsDialogComponent], imports: [CommonModule,
309
327
  A11yModule,
328
+ DragDropModule,
310
329
  FontAwesomeModule], exports: [SdsModalComponent,
311
330
  SdsDialogComponent] });
312
331
  SdsModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalModule, imports: [CommonModule,
313
332
  A11yModule,
333
+ DragDropModule,
314
334
  FontAwesomeModule] });
315
335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalModule, decorators: [{
316
336
  type: NgModule,
@@ -321,6 +341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
321
341
  imports: [
322
342
  CommonModule,
323
343
  A11yModule,
344
+ DragDropModule,
324
345
  FontAwesomeModule
325
346
  ],
326
347
  exports: [
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n OnChanges,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\nimport { ModalTranslations } from './modal.model';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit, OnChanges {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' | '820' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public autoFocusCloseButton: boolean = false;\r\n\r\n @Input() public translations: ModalTranslations;\r\n @Input() public isScrollable = true;\r\n @Input() public closeOnEscape = false;\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public closeEscapeKeypress: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n // public isOpen: boolean = false;\r\n @Input() public isOpen: boolean = false;\r\n @Output() public isOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n @ViewChild('closeButton', { static: false }) private _closeButton: ElementRef | undefined;\r\n \r\n\r\n constructor() {\r\n this.translations = {\r\n close: undefined\r\n }\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['isOpen']) {\r\n if (this.isOpen) {\r\n this.open();\r\n } else {\r\n this.close();\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.isOpen = true;\r\n if(this.autoFocusCloseButton)\r\n this._closeButton?.nativeElement.focus();\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.isOpen = false;\r\n this.modalClose.emit();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n\r\n onKeydown(event: KeyboardEvent){\r\n if (\r\n event.code === 'Escape' &&\r\n this.closeOnEscape && \r\n this._modal != undefined && \r\n this._modal.nativeElement.style.display === 'block'){\r\n // console.log(`${this.constructor.name} got event: ${event.code}`);\r\n this.closeEscapeKeypress.emit();\r\n this.close();\r\n }\r\n }\r\n}\r\n","<div #modal class=\"modal\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div class=\"modal-content\">\r\n\r\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { SdsModalComponent } from '../modal.component';\r\nimport { ButtonType } from './dialog.types';\r\n\r\ntype modalButton = 'primary' | 'secondary' | 'close';\r\n\r\n@Component({\r\n selector: 'sds-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.scss'],\r\n})\r\nexport class SdsDialogComponent implements OnInit {\r\n @Input() public title: string = '';\r\n @Input() public closeText?: string = 'close';\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n\r\n @Input() public primaryButtonText: string = 'Ok';\r\n @Input() public primaryButtonClass: string = 'btn-primary';\r\n @Input() public primaryButtonType: ButtonType = 'button';\r\n @Input() public primaryButtonId?: string;\r\n @Input() public primaryButtonDisabled: boolean = false;\r\n \r\n @Input() public secondaryButtonText: string = 'Cancel'; \r\n @Input() public secondaryButtonClass: string = 'btn-secondary';\r\n @Input() public secondaryButtonType: ButtonType = 'button';\r\n @Input() public secondaryButtonId?: string;\r\n @Input() public secondaryButtonDisabled: boolean = false;\r\n\r\n @Input() public closeOnEscape: boolean = true;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public showPrimaryButton: boolean = true;\r\n @Input() public showSecondaryButton: boolean = true;\r\n @Input() public autofocusElement: 'primary' | 'secondary' | 'close' | 'content' = 'primary';\r\n\r\n @Input() public modalDialogId?: string;\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public dialogOpen: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public dialogClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n\r\n @Input() public isOpen: boolean = false;\r\n @Output() public isOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\r\n @ViewChild('content', { read: ElementRef, static: true }) private _content?: ElementRef;\r\n @ViewChild('primaryButton', { read: ElementRef, static: false }) private _primaryButton?: ElementRef;\r\n @ViewChild('secondaryButton', { read: ElementRef, static: false }) private _secondaryButton?: ElementRef;\r\n\r\n private _callback?: Function;\r\n private _callbackData: any;\r\n\r\n // public isOpen: boolean = false;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {\r\n if (this.autofocusElement == 'primary' && !this.showPrimaryButton) {\r\n this.autofocusElement = 'secondary';\r\n }\r\n if (this.autofocusElement == 'secondary' && !this.showSecondaryButton) {\r\n this.autofocusElement = 'close';\r\n }\r\n if (this.autofocusElement == 'close' && !this.showCloseButton) {\r\n this.autofocusElement = 'content';\r\n }\r\n }\r\n\r\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\r\n this._callback = callback;\r\n this._callbackData = data;\r\n\r\n if (this._modal != undefined) {\r\n this.isOpen = true;\r\n // this._modal.open();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n private close(): void {\r\n if (this._modal != undefined) {\r\n this.isOpen = false;\r\n // this._modal.close();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n public onSecondaryClick(): void {\r\n if (this._callback) {\r\n this._callback('secondary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onPrimaryClick(): void {\r\n if (this._callback) {\r\n this._callback('primary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseClick(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseEscapeKeypress(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onModalClose(): void {\r\n this.dialogClose.emit();\r\n }\r\n\r\n public onModalOpen(): void {\r\n this.dialogOpen.emit();\r\n switch (this.autofocusElement) {\r\n case 'primary':\r\n this._primaryButton?.nativeElement.focus();\r\n break;\r\n case 'secondary':\r\n this._secondaryButton?.nativeElement.focus();\r\n break;\r\n case 'content':\r\n this._content?.nativeElement.focus();\r\n break;\r\n default:\r\n break;\r\n }\r\n } \r\n\r\n}\r\n\r\n\r\n\r\n","<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [modalDialogId]=\"modalDialogId\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n [autoFocusCloseButton]=\"autofocusElement === 'close'\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n (closeClick)=\"onCloseClick()\"\r\n (closeEscapeKeypress)=\"onCloseEscapeKeypress()\"\r\n (modalClose)=\"onModalClose()\"\r\n (modalOpen)=\"onModalOpen()\"\r\n [(isOpen)]=\"isOpen\"\r\n>\r\n\r\n <div #content [attr.tabindex]=\"autofocusElement === 'content' ? 0 : undefined\" >\r\n <ng-content></ng-content>\r\n </div>\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n #secondaryButton\r\n *ngIf=\"showSecondaryButton\"\r\n [attr.id]=\"secondaryButtonId\"\r\n [disabled]=\"secondaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n #primaryButton\r\n *ngIf=\"showPrimaryButton\"\r\n [attr.id]=\"primaryButtonId\"\r\n [disabled]=\"primaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsModalComponent } from './modal.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { SdsDialogComponent } from './dialog/dialog.component';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\n\r\n\r\nconst components = [\r\n SdsModalComponent,\r\n SdsDialogComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n A11yModule,\r\n FontAwesomeModule\r\n ],\r\n exports: [\r\n ...components\r\n]\r\n})\r\nexport class SdsModalModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.SdsModalComponent"],"mappings":";;;;;;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EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAjBvB,iBAAiB;AACjB,QAAA,kBAAkB,aAQlB,YAAY;QACZ,UAAU;AACV,QAAA,iBAAiB,aAXjB,iBAAiB;QACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAgBT,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YARvB,YAAY;QACZ,UAAU;QACV,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAMR,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,UAAU;wBACV,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACA,CAAA;;;ACzBD;;AAEG;;;;"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n OnChanges,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\nimport { ModalTranslations } from './modal.model';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit, OnChanges {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' | '820' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public autoFocusCloseButton: boolean = false;\r\n\r\n @Input() public translations: ModalTranslations;\r\n @Input() public isScrollable = true;\r\n @Input() public closeOnEscape = false;\r\n\r\n /**\r\n * Allow the modal to be draggable by the user. Default is false.\r\n *\r\n * @memberof SdsModalComponent\r\n */\r\n @Input() public isDraggable = false;\r\n\r\n /**\r\n * Constrain modal to the viewport. Default is true.\r\n *\r\n * @memberof SdsModalComponent\r\n */\r\n @Input() public isDragConstrained = true;\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public closeEscapeKeypress: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n // public isOpen: boolean = false;\r\n @Input() public isOpen: boolean = false;\r\n @Output() public isOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n @ViewChild('closeButton', { static: false }) private _closeButton: ElementRef | undefined;\r\n \r\n\r\n constructor() {\r\n this.translations = {\r\n close: undefined\r\n }\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['isOpen']) {\r\n if (this.isOpen) {\r\n this.open();\r\n } else {\r\n this.close();\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.isOpen = true;\r\n if(this.autoFocusCloseButton)\r\n this._closeButton?.nativeElement.focus();\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.isOpen = false;\r\n this.modalClose.emit();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n\r\n onKeydown(event: KeyboardEvent){\r\n if (\r\n event.code === 'Escape' &&\r\n this.closeOnEscape && \r\n this._modal != undefined && \r\n this._modal.nativeElement.style.display === 'block'){\r\n // console.log(`${this.constructor.name} got event: ${event.code}`);\r\n this.closeEscapeKeypress.emit();\r\n this.close();\r\n }\r\n }\r\n}\r\n","<div #modal class=\"modal modal-backdrop\" (keydown)=\"onKeydown($event)\" [cdkTrapFocus]=\"isOpen\" [cdkTrapFocusAutoCapture]=\"true\" >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [attr.id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div \r\n class=\"modal-content\" \r\n cdkDrag [cdkDragDisabled]=\"!isDraggable\" [cdkDragBoundary]=\"isDragConstrained ? '.modal-backdrop' : ''\"\r\n >\r\n\r\n <div *ngIf=\"isDraggable\" class=\"modal-drag-handle\" cdkDragHandle></div>\r\n\r\n <div \r\n *ngIf=\"showHeader && headerContent\" \r\n class=\"modal-header\" \r\n >\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div \r\n *ngIf=\"showHeader && !headerContent\" \r\n class=\"modal-header\"\r\n >\r\n\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n #closeButton\r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close sds-fs-75\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div \r\n class=\"modal-body\"\r\n [class.pt-0]=\"showHeader\"\r\n [class.pb-0]=\"showFooter\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { SdsModalComponent } from '../modal.component';\r\nimport { ButtonType } from './dialog.types';\r\n\r\ntype modalButton = 'primary' | 'secondary' | 'close';\r\n\r\n@Component({\r\n selector: 'sds-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.scss'],\r\n})\r\nexport class SdsDialogComponent implements OnInit {\r\n @Input() public title: string = '';\r\n @Input() public closeText?: string = 'close';\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n\r\n @Input() public primaryButtonText: string = 'Ok';\r\n @Input() public primaryButtonClass: string = 'btn-primary';\r\n @Input() public primaryButtonType: ButtonType = 'button';\r\n @Input() public primaryButtonId?: string;\r\n @Input() public primaryButtonDisabled: boolean = false;\r\n \r\n @Input() public secondaryButtonText: string = 'Cancel'; \r\n @Input() public secondaryButtonClass: string = 'btn-secondary';\r\n @Input() public secondaryButtonType: ButtonType = 'button';\r\n @Input() public secondaryButtonId?: string;\r\n @Input() public secondaryButtonDisabled: boolean = false;\r\n\r\n @Input() public closeOnEscape: boolean = true;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public showPrimaryButton: boolean = true;\r\n @Input() public showSecondaryButton: boolean = true;\r\n @Input() public autofocusElement: 'primary' | 'secondary' | 'close' | 'content' = 'primary';\r\n\r\n @Input() public modalDialogId?: string;\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public dialogOpen: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n /**\r\n * @deprecated Use isOpenChange instead\r\n */\r\n @Output() public dialogClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n\r\n @Input() public isOpen: boolean = false;\r\n @Output() public isOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\r\n @ViewChild('content', { read: ElementRef, static: true }) private _content?: ElementRef;\r\n @ViewChild('primaryButton', { read: ElementRef, static: false }) private _primaryButton?: ElementRef;\r\n @ViewChild('secondaryButton', { read: ElementRef, static: false }) private _secondaryButton?: ElementRef;\r\n\r\n private _callback?: Function;\r\n private _callbackData: any;\r\n\r\n // public isOpen: boolean = false;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {\r\n if (this.autofocusElement == 'primary' && !this.showPrimaryButton) {\r\n this.autofocusElement = 'secondary';\r\n }\r\n if (this.autofocusElement == 'secondary' && !this.showSecondaryButton) {\r\n this.autofocusElement = 'close';\r\n }\r\n if (this.autofocusElement == 'close' && !this.showCloseButton) {\r\n this.autofocusElement = 'content';\r\n }\r\n }\r\n\r\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\r\n this._callback = callback;\r\n this._callbackData = data;\r\n\r\n if (this._modal != undefined) {\r\n this.isOpen = true;\r\n // this._modal.open();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n private close(): void {\r\n if (this._modal != undefined) {\r\n this.isOpen = false;\r\n // this._modal.close();\r\n\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n\r\n public onSecondaryClick(): void {\r\n if (this._callback) {\r\n this._callback('secondary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onPrimaryClick(): void {\r\n if (this._callback) {\r\n this._callback('primary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseClick(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseEscapeKeypress(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onModalClose(): void {\r\n this.dialogClose.emit();\r\n }\r\n\r\n public onModalOpen(): void {\r\n this.dialogOpen.emit();\r\n switch (this.autofocusElement) {\r\n case 'primary':\r\n this._primaryButton?.nativeElement.focus();\r\n break;\r\n case 'secondary':\r\n this._secondaryButton?.nativeElement.focus();\r\n break;\r\n case 'content':\r\n this._content?.nativeElement.focus();\r\n break;\r\n default:\r\n break;\r\n }\r\n } \r\n\r\n}\r\n\r\n\r\n\r\n","<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [modalDialogId]=\"modalDialogId\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n [autoFocusCloseButton]=\"autofocusElement === 'close'\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n (closeClick)=\"onCloseClick()\"\r\n (closeEscapeKeypress)=\"onCloseEscapeKeypress()\"\r\n (modalClose)=\"onModalClose()\"\r\n (modalOpen)=\"onModalOpen()\"\r\n [(isOpen)]=\"isOpen\"\r\n>\r\n\r\n <div #content [attr.tabindex]=\"autofocusElement === 'content' ? 0 : undefined\" >\r\n <ng-content></ng-content>\r\n </div>\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n #secondaryButton\r\n *ngIf=\"showSecondaryButton\"\r\n [attr.id]=\"secondaryButtonId\"\r\n [disabled]=\"secondaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n #primaryButton\r\n *ngIf=\"showPrimaryButton\"\r\n [attr.id]=\"primaryButtonId\"\r\n [disabled]=\"primaryButtonDisabled\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsModalComponent } from './modal.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { SdsDialogComponent } from './dialog/dialog.component';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule} from '@angular/cdk/drag-drop';\r\n\r\nconst components = [\r\n SdsModalComponent,\r\n SdsDialogComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n A11yModule,\r\n DragDropModule,\r\n FontAwesomeModule\r\n ],\r\n exports: [\r\n ...components\r\n]\r\n})\r\nexport class SdsModalModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.SdsModalComponent"],"mappings":";;;;;;;;;;;MAoBa,iBAAiB,CAAA;AAoD1B,IAAA,WAAA,GAAA;QAnDwB,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAGjE,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAA,IAAA,GAAsC,IAAI,CAAC;AAE/C,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAChC,QAAA,IAAoB,CAAA,oBAAA,GAAY,KAAK,CAAC;AAGtC,QAAA,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;AACpB,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;AAEtC;;;;AAIG;AACa,Q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,EAAE,CAAA;;;AE9CrE,MAAM,UAAU,GAAG;IACf,iBAAiB;IACjB,kBAAkB;CACrB,CAAC;MAgBW,cAAc,CAAA;;4GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAlBvB,iBAAiB;AACjB,QAAA,kBAAkB,aAQlB,YAAY;QACZ,UAAU;QACV,cAAc;AACd,QAAA,iBAAiB,aAZjB,iBAAiB;QACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAiBT,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YATvB,YAAY;QACZ,UAAU;QACV,cAAc;QACd,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAMR,cAAc,EAAA,UAAA,EAAA,CAAA;kBAd1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,UAAU;wBACV,cAAc;wBACd,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACA,CAAA;;;AC1BD;;AAEG;;;;"}
@@ -56,10 +56,10 @@ class SdsNavigationRouteLinkComponent {
56
56
  ngOnInit() { }
57
57
  }
58
58
  SdsNavigationRouteLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationRouteLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
- SdsNavigationRouteLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationRouteLinkComponent, selector: "sds-navigation-route-link", inputs: { link: "link", text: "text", additionalInfo: "additionalInfo" }, ngImport: i0, template: "<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"link\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge badge-pill badge-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
59
+ SdsNavigationRouteLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationRouteLinkComponent, selector: "sds-navigation-route-link", inputs: { link: "link", text: "text", additionalInfo: "additionalInfo" }, ngImport: i0, template: "<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"link\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
60
60
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationRouteLinkComponent, decorators: [{
61
61
  type: Component,
62
- args: [{ selector: 'sds-navigation-route-link', template: "<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"link\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge badge-pill badge-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>" }]
62
+ args: [{ selector: 'sds-navigation-route-link', template: "<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"link\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge rounded-pill bg-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>" }]
63
63
  }], ctorParameters: function () { return []; }, propDecorators: { link: [{
64
64
  type: Input
65
65
  }], text: [{
@@ -68,6 +68,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
68
68
  type: Input
69
69
  }] } });
70
70
 
71
+ function removeQueryParams(url) {
72
+ return url.split('?')[0];
73
+ }
74
+
71
75
  class NavigationRouteActivePipe {
72
76
  transform(currentUrl, ...args) {
73
77
  if (!currentUrl || (currentUrl === null || currentUrl === void 0 ? void 0 : currentUrl.length) === 0) {
@@ -118,6 +122,7 @@ class SdsNavigationGroupComponent {
118
122
  this.icon = '';
119
123
  this.defaultRouterLink = '';
120
124
  this.reverse = false;
125
+ this.ignoreQueryParamsInActiveRoute = false;
121
126
  this.routerLinkComponents = new QueryList();
122
127
  this.active = false;
123
128
  this.faAngleUpRegular = faAngleUp;
@@ -131,7 +136,8 @@ class SdsNavigationGroupComponent {
131
136
  ngOnInit() {
132
137
  this._router.events.pipe(filter((event) => event instanceof NavigationStart), takeUntil(this._unsubscribe)).subscribe((event) => {
133
138
  if (event instanceof NavigationStart) {
134
- const route = event.url.split('/').filter(item => item.length > 0);
139
+ const activeRoute = this.ignoreQueryParamsInActiveRoute ? removeQueryParams(event.url) : event.url;
140
+ const route = activeRoute.split('/').filter(item => item.length > 0);
135
141
  this.currentUrl = route;
136
142
  }
137
143
  });
@@ -142,7 +148,7 @@ class SdsNavigationGroupComponent {
142
148
  }
143
149
  }
144
150
  SdsNavigationGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationGroupComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
145
- SdsNavigationGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationGroupComponent, selector: "sds-navigation-group", inputs: { navigationGroupNestedRoutes: "navigationGroupNestedRoutes", text: "text", icon: "icon", defaultRouterLink: "defaultRouterLink", reverse: "reverse" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], ngImport: i0, template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a \r\n class=\"w-100 sds-navigation-item-content\"\r\n style=\"cursor: pointer\"\r\n [routerLink]=\"[defaultRouterLink]\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "pipe", type: NavigationRouteActivePipe, name: "navigationRouteActive" }] });
151
+ SdsNavigationGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationGroupComponent, selector: "sds-navigation-group", inputs: { navigationGroupNestedRoutes: "navigationGroupNestedRoutes", text: "text", icon: "icon", defaultRouterLink: "defaultRouterLink", reverse: "reverse", ignoreQueryParamsInActiveRoute: "ignoreQueryParamsInActiveRoute" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], ngImport: i0, template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a \r\n class=\"w-100 sds-navigation-item-content\"\r\n style=\"cursor: pointer\"\r\n [routerLink]=\"[defaultRouterLink]\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "pipe", type: NavigationRouteActivePipe, name: "navigationRouteActive" }] });
146
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationGroupComponent, decorators: [{
147
153
  type: Component,
148
154
  args: [{ selector: 'sds-navigation-group', template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a \r\n class=\"w-100 sds-navigation-item-content\"\r\n style=\"cursor: pointer\"\r\n [routerLink]=\"[defaultRouterLink]\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n" }]
@@ -156,6 +162,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
156
162
  type: Input
157
163
  }], reverse: [{
158
164
  type: Input
165
+ }], ignoreQueryParamsInActiveRoute: [{
166
+ type: Input
159
167
  }], routerLinkComponents: [{
160
168
  type: ContentChildren,
161
169
  args: [SdsNavigationRouteLinkComponent]
@@ -217,8 +225,11 @@ class SdsNavigationUserProfileComponent {
217
225
  this.showProfile = true;
218
226
  this.signOutText = 'Sign out';
219
227
  this.profileText = 'Profile';
228
+ this.showNotificationBadge = false;
229
+ this.newNotificationsText = 'New Notifications';
220
230
  this.profileClick = new EventEmitter();
221
231
  this.signOutClick = new EventEmitter();
232
+ this.notificationBadgeClick = new EventEmitter();
222
233
  this.showOptions = false;
223
234
  }
224
235
  ngOnInit() { }
@@ -230,12 +241,16 @@ class SdsNavigationUserProfileComponent {
230
241
  this.showOptions = false;
231
242
  this.signOutClick.emit();
232
243
  }
244
+ onNotificationBadgeClick(event) {
245
+ event.stopPropagation();
246
+ this.notificationBadgeClick.emit();
247
+ }
233
248
  }
234
249
  SdsNavigationUserProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationUserProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
235
- SdsNavigationUserProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationUserProfileComponent, selector: "sds-navigation-user-profile", inputs: { name: "name", id: "id", email: "email", showSignOut: "showSignOut", showProfile: "showProfile", signOutText: "signOutText", profileText: "profileText" }, outputs: { profileClick: "profileClick", signOutClick: "signOutClick" }, ngImport: i0, template: "<div class=\"d-flex flex-row align-items-center gap-2 sds-navigation-user-profile-container\"\r\n (click)=\"showOptions = !showOptions\">\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"> \r\n </sds-avatar>\r\n \r\n <span class=\"truncate-two-lines\">\r\n {{name}}\r\n </span> \r\n\r\n</div> \r\n\r\n<dx-popover\r\n target=\".sds-navigation-user-profile-container\"\r\n minWidth=\"12.5rem\"\r\n [wrapperAttr]=\"{ class: 'sds-navigation-user-profile-popover' }\"\r\n [(visible)]=\"showOptions\"\r\n >\r\n\r\n <div class=\"border-bottom\">\r\n <div class=\"d-flex flex-row gap-3 align-items-center p-2 mb-1\">\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"\r\n [size]=\"3\"> \r\n </sds-avatar>\r\n \r\n <div class=\"me-2\">\r\n <h5 class=\"m-0\">\r\n {{name}}\r\n </h5>\r\n <span class=\"font-size-3\">{{email}}</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n\r\n <ul class=\"list-unstyled sds-navigation-user-profile-actions mb-0 mt-2\">\r\n <li *ngIf=\"showProfile\">\r\n <a \r\n class=\"d-block text-black\"\r\n (click)=\"onProfileClick()\" \r\n >\r\n {{profileText}}\r\n </a>\r\n </li>\r\n\r\n <li>\r\n <a \r\n *ngIf=\"showSignOut\"\r\n class=\"d-block text-black\"\r\n (click)=\"onSignOutClick()\" \r\n >\r\n {{signOutText}}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n</dx-popover>", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-actions li{margin-bottom:.25rem}.sds-navigation-user-profile-actions li a{-webkit-user-select:none;user-select:none;text-decoration:none;padding:.5rem 1rem;width:100%;border-radius:4px}.sds-navigation-user-profile-actions li a:hover{background-color:var(--bs-gray-200);cursor:pointer}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:.5rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SdsAvatarComponent, selector: "sds-avatar", inputs: ["text", "colorKey", "pictureUri", "showHint", "borderStyle", "borderColor", "initialsText", "cursor", "size"] }, { kind: "component", type: i3$1.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
250
+ SdsNavigationUserProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsNavigationUserProfileComponent, selector: "sds-navigation-user-profile", inputs: { name: "name", id: "id", email: "email", showSignOut: "showSignOut", showProfile: "showProfile", signOutText: "signOutText", profileText: "profileText", showNotificationBadge: "showNotificationBadge", newNotificationsText: "newNotificationsText" }, outputs: { profileClick: "profileClick", signOutClick: "signOutClick", notificationBadgeClick: "notificationBadgeClick" }, ngImport: i0, template: "<div class=\"d-flex flex-row align-items-center gap-2 sds-navigation-user-profile-container user-select-none\"\r\n (click)=\"showOptions = !showOptions\">\r\n\r\n <div class=\"position-relative\">\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"> \r\n </sds-avatar>\r\n\r\n <span \r\n *ngIf=\"showNotificationBadge\"\r\n class=\"position-absolute notification-badge translate-middle bg-danger border border-light rounded-circle\"\r\n (click)=\"onNotificationBadgeClick($event)\">\r\n <span class=\"visually-hidden\">{{newNotificationsText}}</span>\r\n </span>\r\n </div>\r\n\r\n \r\n <span class=\"truncate-two-lines\">\r\n {{name}}\r\n </span> \r\n\r\n</div> \r\n\r\n<dx-popover\r\n target=\".sds-navigation-user-profile-container\"\r\n minWidth=\"12.5rem\"\r\n [wrapperAttr]=\"{ class: 'sds-navigation-user-profile-popover' }\"\r\n [(visible)]=\"showOptions\"\r\n >\r\n\r\n <div class=\"border-bottom\">\r\n <div class=\"d-flex flex-row gap-3 align-items-center p-2 mb-1 px-3\">\r\n\r\n <div class=\"me-2\">\r\n <h5 class=\"m-0\">\r\n {{name}}\r\n </h5>\r\n <span class=\"font-size-3\">{{email}}</span>\r\n </div>\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"\r\n [size]=\"3\"> \r\n </sds-avatar>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n\r\n <ul class=\"list-unstyled sds-navigation-user-profile-actions mb-0 mt-2\">\r\n <li *ngIf=\"showProfile\">\r\n <a \r\n class=\"d-block text-black\"\r\n (click)=\"onProfileClick()\" \r\n >\r\n {{profileText}}\r\n </a>\r\n </li>\r\n\r\n <li>\r\n <a \r\n *ngIf=\"showSignOut\"\r\n class=\"d-block text-black\"\r\n (click)=\"onSignOutClick()\" \r\n >\r\n {{signOutText}}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n</dx-popover>", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-container .notification-badge{top:15%;left:100%;padding:.4rem}.sds-navigation-user-profile-actions li{margin-bottom:.25rem}.sds-navigation-user-profile-actions li a{-webkit-user-select:none;user-select:none;text-decoration:none;padding:.5rem 1rem;width:100%;border-radius:4px}.sds-navigation-user-profile-actions li a:hover{background-color:var(--bs-gray-200);cursor:pointer}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:.5rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.SdsAvatarComponent, selector: "sds-avatar", inputs: ["text", "colorKey", "pictureUri", "showHint", "borderStyle", "borderColor", "initialsText", "cursor", "size"] }, { kind: "component", type: i3$1.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
236
251
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsNavigationUserProfileComponent, decorators: [{
237
252
  type: Component,
238
- args: [{ selector: 'sds-navigation-user-profile', template: "<div class=\"d-flex flex-row align-items-center gap-2 sds-navigation-user-profile-container\"\r\n (click)=\"showOptions = !showOptions\">\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"> \r\n </sds-avatar>\r\n \r\n <span class=\"truncate-two-lines\">\r\n {{name}}\r\n </span> \r\n\r\n</div> \r\n\r\n<dx-popover\r\n target=\".sds-navigation-user-profile-container\"\r\n minWidth=\"12.5rem\"\r\n [wrapperAttr]=\"{ class: 'sds-navigation-user-profile-popover' }\"\r\n [(visible)]=\"showOptions\"\r\n >\r\n\r\n <div class=\"border-bottom\">\r\n <div class=\"d-flex flex-row gap-3 align-items-center p-2 mb-1\">\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"\r\n [size]=\"3\"> \r\n </sds-avatar>\r\n \r\n <div class=\"me-2\">\r\n <h5 class=\"m-0\">\r\n {{name}}\r\n </h5>\r\n <span class=\"font-size-3\">{{email}}</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n\r\n <ul class=\"list-unstyled sds-navigation-user-profile-actions mb-0 mt-2\">\r\n <li *ngIf=\"showProfile\">\r\n <a \r\n class=\"d-block text-black\"\r\n (click)=\"onProfileClick()\" \r\n >\r\n {{profileText}}\r\n </a>\r\n </li>\r\n\r\n <li>\r\n <a \r\n *ngIf=\"showSignOut\"\r\n class=\"d-block text-black\"\r\n (click)=\"onSignOutClick()\" \r\n >\r\n {{signOutText}}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n</dx-popover>", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-actions li{margin-bottom:.25rem}.sds-navigation-user-profile-actions li a{-webkit-user-select:none;user-select:none;text-decoration:none;padding:.5rem 1rem;width:100%;border-radius:4px}.sds-navigation-user-profile-actions li a:hover{background-color:var(--bs-gray-200);cursor:pointer}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:.5rem;font-size:1rem}\n"] }]
253
+ args: [{ selector: 'sds-navigation-user-profile', template: "<div class=\"d-flex flex-row align-items-center gap-2 sds-navigation-user-profile-container user-select-none\"\r\n (click)=\"showOptions = !showOptions\">\r\n\r\n <div class=\"position-relative\">\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"> \r\n </sds-avatar>\r\n\r\n <span \r\n *ngIf=\"showNotificationBadge\"\r\n class=\"position-absolute notification-badge translate-middle bg-danger border border-light rounded-circle\"\r\n (click)=\"onNotificationBadgeClick($event)\">\r\n <span class=\"visually-hidden\">{{newNotificationsText}}</span>\r\n </span>\r\n </div>\r\n\r\n \r\n <span class=\"truncate-two-lines\">\r\n {{name}}\r\n </span> \r\n\r\n</div> \r\n\r\n<dx-popover\r\n target=\".sds-navigation-user-profile-container\"\r\n minWidth=\"12.5rem\"\r\n [wrapperAttr]=\"{ class: 'sds-navigation-user-profile-popover' }\"\r\n [(visible)]=\"showOptions\"\r\n >\r\n\r\n <div class=\"border-bottom\">\r\n <div class=\"d-flex flex-row gap-3 align-items-center p-2 mb-1 px-3\">\r\n\r\n <div class=\"me-2\">\r\n <h5 class=\"m-0\">\r\n {{name}}\r\n </h5>\r\n <span class=\"font-size-3\">{{email}}</span>\r\n </div>\r\n\r\n <sds-avatar\r\n [text]=\"name\"\r\n [colorKey]=\"id\"\r\n [size]=\"3\"> \r\n </sds-avatar>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n\r\n <ul class=\"list-unstyled sds-navigation-user-profile-actions mb-0 mt-2\">\r\n <li *ngIf=\"showProfile\">\r\n <a \r\n class=\"d-block text-black\"\r\n (click)=\"onProfileClick()\" \r\n >\r\n {{profileText}}\r\n </a>\r\n </li>\r\n\r\n <li>\r\n <a \r\n *ngIf=\"showSignOut\"\r\n class=\"d-block text-black\"\r\n (click)=\"onSignOutClick()\" \r\n >\r\n {{signOutText}}\r\n </a>\r\n </li>\r\n </ul>\r\n\r\n</dx-popover>", styles: [".sds-navigation-user-profile-container{padding:.8rem;cursor:pointer}.sds-navigation-user-profile-container .notification-badge{top:15%;left:100%;padding:.4rem}.sds-navigation-user-profile-actions li{margin-bottom:.25rem}.sds-navigation-user-profile-actions li a{-webkit-user-select:none;user-select:none;text-decoration:none;padding:.5rem 1rem;width:100%;border-radius:4px}.sds-navigation-user-profile-actions li a:hover{background-color:var(--bs-gray-200);cursor:pointer}.truncate-two-lines{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}::ng-deep .sds-navigation-user-profile-popover .dx-popup-content{padding:.5rem;font-size:1rem}\n"] }]
239
254
  }], ctorParameters: function () { return []; }, propDecorators: { name: [{
240
255
  type: Input
241
256
  }], id: [{
@@ -250,10 +265,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
250
265
  type: Input
251
266
  }], profileText: [{
252
267
  type: Input
268
+ }], showNotificationBadge: [{
269
+ type: Input
270
+ }], newNotificationsText: [{
271
+ type: Input
253
272
  }], profileClick: [{
254
273
  type: Output
255
274
  }], signOutClick: [{
256
275
  type: Output
276
+ }], notificationBadgeClick: [{
277
+ type: Output
257
278
  }] } });
258
279
 
259
280
  class SdsProductHomeComponent {