@spicainternational/ngx-sds-components 6.16.1 → 6.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@ class SdsModalComponent {
18
18
  this.showCloseButton = true;
19
19
  this.autoFocusCloseButton = false;
20
20
  this.isScrollable = true;
21
+ this.isVerticallyCentered = true;
21
22
  this.closeOnEscape = false;
22
23
  this.downSizing = 'discrete';
23
24
  /**
@@ -95,10 +96,10 @@ class SdsModalComponent {
95
96
  }
96
97
  }
97
98
  SdsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- 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", downSizing: "downSizing", 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 \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\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}}@media (min-width: 576px){.modal-dialog.downsize-continuous{width:calc(90vw - 2rem)}.modal-dialog.downsize-continuous.modal-md{max-width:var(--bs-breakpoint-sm)}.modal-dialog.downsize-continuous.modal-lg{max-width:var(--bs-breakpoint-md)}.modal-dialog.downsize-continuous.modal-xl{max-width:var(--bs-breakpoint-lg)}.modal-dialog.downsize-continuous.modal-xxl{max-width:var(--bs-breakpoint-xl)}}\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"] }] });
99
+ 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", isVerticallyCentered: "isVerticallyCentered", closeOnEscape: "closeOnEscape", downSizing: "downSizing", 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 \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\r\n [class.modal-dialog-centered] = \"isVerticallyCentered\"\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}}@media (min-width: 576px){.modal-dialog.downsize-continuous{width:calc(90vw - 2rem)}.modal-dialog.downsize-continuous.modal-md{max-width:var(--bs-breakpoint-sm)}.modal-dialog.downsize-continuous.modal-lg{max-width:var(--bs-breakpoint-md)}.modal-dialog.downsize-continuous.modal-xl{max-width:var(--bs-breakpoint-lg)}.modal-dialog.downsize-continuous.modal-xxl{max-width:var(--bs-breakpoint-xl)}}\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"] }] });
99
100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsModalComponent, decorators: [{
100
101
  type: Component,
101
- args: [{ selector: 'sds-modal', template: "<div \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\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}}@media (min-width: 576px){.modal-dialog.downsize-continuous{width:calc(90vw - 2rem)}.modal-dialog.downsize-continuous.modal-md{max-width:var(--bs-breakpoint-sm)}.modal-dialog.downsize-continuous.modal-lg{max-width:var(--bs-breakpoint-md)}.modal-dialog.downsize-continuous.modal-xl{max-width:var(--bs-breakpoint-lg)}.modal-dialog.downsize-continuous.modal-xxl{max-width:var(--bs-breakpoint-xl)}}\n"] }]
102
+ args: [{ selector: 'sds-modal', template: "<div \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\r\n [class.modal-dialog-centered] = \"isVerticallyCentered\"\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}}@media (min-width: 576px){.modal-dialog.downsize-continuous{width:calc(90vw - 2rem)}.modal-dialog.downsize-continuous.modal-md{max-width:var(--bs-breakpoint-sm)}.modal-dialog.downsize-continuous.modal-lg{max-width:var(--bs-breakpoint-md)}.modal-dialog.downsize-continuous.modal-xl{max-width:var(--bs-breakpoint-lg)}.modal-dialog.downsize-continuous.modal-xxl{max-width:var(--bs-breakpoint-xl)}}\n"] }]
102
103
  }], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
103
104
  type: ContentChild,
104
105
  args: ['header']
@@ -120,6 +121,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
120
121
  type: Input
121
122
  }], isScrollable: [{
122
123
  type: Input
124
+ }], isVerticallyCentered: [{
125
+ type: Input
123
126
  }], closeOnEscape: [{
124
127
  type: Input
125
128
  }], downSizing: [{
@@ -260,7 +263,7 @@ class SdsDialogComponent {
260
263
  }
261
264
  }
262
265
  SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
263
- SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", dialogTitle: "dialogTitle", 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", primaryButtonClick: "primaryButtonClick", secondaryButtonClick: "secondaryButtonClick" }, 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]=\"dialogTitle || 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", "downSizing", "isDraggable", "isDragConstrained", "isOpen"], outputs: ["modalOpen", "modalClose", "closeClick", "closeEscapeKeypress", "isOpenChange"] }] });
266
+ SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", dialogTitle: "dialogTitle", 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", primaryButtonClick: "primaryButtonClick", secondaryButtonClick: "secondaryButtonClick" }, 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]=\"dialogTitle || 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", "isVerticallyCentered", "closeOnEscape", "downSizing", "isDraggable", "isDragConstrained", "isOpen"], outputs: ["modalOpen", "modalClose", "closeClick", "closeEscapeKeypress", "isOpenChange"] }] });
264
267
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDialogComponent, decorators: [{
265
268
  type: Component,
266
269
  args: [{ selector: 'sds-dialog', template: "<sds-modal\r\n #modal\r\n [modalTitle]=\"dialogTitle || 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" }]
@@ -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' | 'xxl' = '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 @Input() public downSizing: 'discrete' | 'continuous' = 'discrete';\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 \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\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 /**\r\n * @deprecated Use dialogTitle instead\r\n */\r\n @Input() public title: string = '';\r\n @Input() public dialogTitle: string = '';\r\n \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 @Output() public primaryButtonClick: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public secondaryButtonClick: EventEmitter<void> = new EventEmitter<void>();\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.secondaryButtonClick.emit();\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.primaryButtonClick.emit();\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]=\"dialogTitle || 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;AAsD1B,IAAA,WAAA,GAAA;QArDwB,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,GAA8C,IAAI,CAAC;AAEvD,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;AAEtB,QAAA,IAAU,CAAA,UAAA,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,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;;;;"}
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' | 'xxl' = '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 isVerticallyCentered = true;\r\n @Input() public closeOnEscape = false;\r\n\r\n @Input() public downSizing: 'discrete' | 'continuous' = 'discrete';\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 \r\n #modal \r\n class=\"modal modal-backdrop\" \r\n (keydown)=\"onKeydown($event)\" \r\n [cdkTrapFocus]=\"isOpen\" \r\n [cdkTrapFocusAutoCapture]=\"true\" \r\n >\r\n <div\r\n class=\"modal-dialog\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [class.downsize-continuous] = \"downSizing === 'continuous'\"\r\n [class.modal-dialog-centered] = \"isVerticallyCentered\"\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 /**\r\n * @deprecated Use dialogTitle instead\r\n */\r\n @Input() public title: string = '';\r\n @Input() public dialogTitle: string = '';\r\n \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 @Output() public primaryButtonClick: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public secondaryButtonClick: EventEmitter<void> = new EventEmitter<void>();\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.secondaryButtonClick.emit();\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.primaryButtonClick.emit();\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]=\"dialogTitle || 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;AAuD1B,IAAA,WAAA,GAAA;QAtDwB,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,GAA8C,IAAI,CAAC;AAEvD,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,IAAoB,CAAA,oBAAA,GAAG,IAAI,CAAC;AAC5B,QAAA,IAAa,CA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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;;;;"}
@@ -183,6 +183,10 @@ class SdsDatePickerComponent {
183
183
  this.selectedDate = new Date();
184
184
  this.selectedDateChange = new EventEmitter();
185
185
  this.selectedDateStartChange = new EventEmitter();
186
+ // format function for displaying date when single date is selected
187
+ this.singleDayFormatFn = undefined;
188
+ // format function for displaying each date when date range is selected
189
+ this.dateRangeFormatFn = undefined;
186
190
  this.selectedDateEndChange = new EventEmitter();
187
191
  this.periodChange = new EventEmitter();
188
192
  this.disabled = false;
@@ -746,19 +750,33 @@ class SdsDatePickerComponent {
746
750
  return;
747
751
  }
748
752
  // RESOLVE PERIOD
749
- // full month
750
- if (isSameDay(dateFrom, startOfMonth(dateFrom)) &&
751
- isSameDay(dateTo, endOfMonth(dateTo)) &&
752
- isSameMonth(dateFrom, dateTo)) {
753
- this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, 'month');
754
- // one day
755
- }
756
- else if (isSameDay(dateFrom, dateTo)) {
757
- this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, 'day-long');
753
+ // one day
754
+ if (isSameDay(dateFrom, dateTo)) {
755
+ if (typeof this.singleDayFormatFn !== 'undefined') {
756
+ this.selectedDateRangeTextSegment1 = this.singleDayFormatFn(dateFrom);
757
+ }
758
+ else {
759
+ this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, 'day-long');
760
+ }
758
761
  }
762
+ // date range
759
763
  else {
760
- this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, isSameYear(dateFrom, today) ? 'day-short' : 'day');
761
- this.selectedDateRangeTextSegment2 = this.formatDate(dateTo, isSameYear(dateTo, today) ? 'day-short' : 'day');
764
+ // date range - use provided dateRange format function (if defined)
765
+ if (typeof this.dateRangeFormatFn !== 'undefined') {
766
+ this.selectedDateRangeTextSegment1 = this.dateRangeFormatFn(dateFrom);
767
+ this.selectedDateRangeTextSegment2 = this.dateRangeFormatFn(dateTo);
768
+ }
769
+ // full month
770
+ else if (isSameDay(dateFrom, startOfMonth(dateFrom)) &&
771
+ isSameDay(dateTo, endOfMonth(dateTo)) &&
772
+ isSameMonth(dateFrom, dateTo)) {
773
+ this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, 'month');
774
+ }
775
+ // date range - use default date format function
776
+ else {
777
+ this.selectedDateRangeTextSegment1 = this.formatDate(dateFrom, isSameYear(dateFrom, today) ? 'day-short' : 'day');
778
+ this.selectedDateRangeTextSegment2 = this.formatDate(dateTo, isSameYear(dateTo, today) ? 'day-short' : 'day');
779
+ }
762
780
  }
763
781
  if (this.style == 'compact' && this.selectedDateRange && this.selectedDateRange != this.customDateRange) {
764
782
  if (this.compactStyleDisplay == 'predefinedRange') {
@@ -831,7 +849,7 @@ class SdsDatePickerComponent {
831
849
  }
832
850
  }
833
851
  SdsDatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDatePickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SdsDatePickerService }], target: i0.ɵɵFactoryTarget.Component });
834
- SdsDatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDatePickerComponent, selector: "sds-date-picker", inputs: { selectionKind: "selectionKind", dateRangeDefinitions: "dateRangeDefinitions", selectedDate: "selectedDate", selectedDateStart: "selectedDateStart", selectedDateEnd: "selectedDateEnd", minDate: "minDate", maxDate: "maxDate", locales: "locales", disabled: "disabled", validationError: "validationError", isValid: "isValid", disabledDates: "disabledDates", applyText: "applyText", cancelText: "cancelText", translations: "translations", firstDayOfWeek: "firstDayOfWeek", dateRangeDefinitionsWidth: "dateRangeDefinitionsWidth", showPreviousAndNextButtons: "showPreviousAndNextButtons", width: "width", dropdownWrapperClass: "dropdownWrapperClass", dropdownWrapperId: "dropdownWrapperId", getPreviousDateCallback: "getPreviousDateCallback", getNextDateCallback: "getNextDateCallback", getPreviousRangeCallback: "getPreviousRangeCallback", getNextRangeCallback: "getNextRangeCallback", useCustomDisplayContent: "useCustomDisplayContent", displayPredefinedDateRangeName: "displayPredefinedDateRangeName", style: "style", compactStyleDisplay: "compactStyleDisplay", dateInputDisplayFormat: "dateInputDisplayFormat" }, outputs: { selectedDateChange: "selectedDateChange", selectedDateStartChange: "selectedDateStartChange", selectedDateEndChange: "selectedDateEndChange", periodChange: "periodChange" }, queries: [{ propertyName: "displayContent", first: true, predicate: ["display"], descendants: true }], viewQueries: [{ propertyName: "singleDatePickerBox", first: true, predicate: ["singleDatePickerBox"], descendants: true }, { propertyName: "selectedDateStartBox", first: true, predicate: ["selectedDateStartBox"], descendants: true }, { propertyName: "selectedDateEndBox", first: true, predicate: ["selectedDateEndBox"], descendants: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "_selectedDateRangeButton", first: true, predicate: ["selectedDateRangeButton"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- <div id=\"datepickerbuttons\"> -->\r\n <div \r\n class=\"datepicker d-inline-flex bg-white sds-no-print\"\r\n role=\"group\"\r\n aria-label=\"Date picker\"\r\n [style.width]=\"width\"\r\n >\r\n \r\n <ng-container *ngIf=\"style == 'classic'\"> \r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n >\r\n <button\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n id=\"pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n type=\"button\"\r\n class=\"\r\n btn btn-white\r\n border\r\n rounded-start\r\n border-end\r\n p-0\r\n sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n [style.width]=\"dateRangeDefinitionsWidth\"\r\n (click)=\"toggleDateRangeSelectorVisibility()\"\r\n >\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"ps-2 ms-1 me-1 date-range-text text-truncate\">\r\n {{selectedDateRange.name}}\r\n </div>\r\n <button type=\"button\" class=\"btn btn-light date-range-dropdown-button sds-fw-400\">\r\n <span class=\"dropdown-toggle\"></span>\r\n </button>\r\n </div>\r\n \r\n </button>\r\n\r\n <dx-popover\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n target=\"#pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showPredefinedOptionsSelector\"\r\n [wrapperAttr]=\"{ class: 'sds-datepicker-ranges-popover' }\"\r\n [minWidth]=\"dateRangeDefinitionsWidth\"\r\n \r\n >\r\n <div *dxTemplate=\"let data of 'content'\">\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n </div>\r\n </ng-container>\r\n \r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border border-end-0 pe-2 sds-fw-400\"\r\n [class.rounded-start] = \"style == 'compact' || (!dateRangeDefinitions || dateRangeDefinitions.length === 0)\"\r\n [class.border-start-0] = \"style == 'classic' && dateRangeDefinitions.length > 0\"\r\n type=\"button\"\r\n [disabled]=\"isMinimumLimit || disabled\"\r\n (click)=\"goToPreviousDate()\"\r\n >\r\n <fa-icon [icon]=\"previousPeriodIcon\"></fa-icon>\r\n\r\n </button>\r\n\r\n <button\r\n #selectedDateRangeButton\r\n id=\"pickerDropdown{{ randomIdReference }}\"\r\n class=\"btn btn-white border-top border-bottom text-truncate px-0 selected-period sds-fw-400\"\r\n [class.rounded-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.border-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.rounded-end] = \"!showPreviousAndNextButtons\"\r\n [class.border-end] = \"!showPreviousAndNextButtons\"\r\n [disabled]=\"disabled\"\r\n type=\"button\"\r\n (click)=\"showDatepicker = !showDatepicker\"\r\n >\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeName}}</span>\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div> \r\n </button>\r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border rounded-end border-start-0 ps-2 sds-fw-400\"\r\n type=\"button\"\r\n [disabled]=\"isMaximumLimit || disabled\"\r\n (click)=\"goToNextDate()\"\r\n >\r\n <fa-icon [icon]=\"nextPeriodIcon\"></fa-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"sds-print-only h-100\">\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n<dx-popover\r\n target=\"#pickerDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDatepicker\"\r\n (onHiding)=\"onHiddenCalendarPopover()\"\r\n (onShowing)=\"onShowingCalendarPopover()\"\r\n class=\"m-0 p-0\"\r\n [wrapperAttr]=\"{ \r\n class: 'sds-datepicker-popover ' + dropdownWrapperClass,\r\n id: dropdownWrapperId\r\n }\"\r\n>\r\n <dxo-animation>\r\n <dxo-show\r\n type=\"pop\"\r\n [from]=\"{ scale: 0.9 }\"\r\n [to]=\"{ scale: 1 }\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n </dxo-animation>\r\n <div *dxTemplate=\"let data of 'content'\" (keydown)=\"onKeydown($event)\" tabindex=\"1\">\r\n <dx-scroll-view>\r\n <div class=\"d-flex flex-row\">\r\n\r\n <div \r\n *ngIf=\"style == 'compact' && dateRanges.length > 1\"\r\n class=\"d-flex flex-column p-3 bg-gray-100\"\r\n style=\"border-right: 1px solid var(--bs-gray-200)\"\r\n >\r\n <div class=\"px-3 py-2\">\r\n <label>Presets</label>\r\n </div>\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div id=\"datepickercomponent\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center px-4 py-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateStartBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateStart\"\r\n (onValueChanged)=\"onStartDateChange($event)\"\r\n (onFocusIn)=\"onStartDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center px-2\">\r\n <fa-icon [icon]=\"toIcon\"></fa-icon>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateEndBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"!selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateEnd\"\r\n (onValueChanged)=\"onEndDateChange($event)\"\r\n (onFocusIn)=\"onEndDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n </div>\r\n\r\n <div class=\"bg-white px-4 py-3\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'single'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center p-2 mb-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #singleDatePickerBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input datepicker-input-large\"\r\n [class.activeInput]=\"true\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"selectedDateInternal\"\r\n >\r\n </dx-date-box>\r\n <!-- (onValueChanged)=\" closeDatepickerPopup()\" -->\r\n </div>\r\n </div>\r\n\r\n <div \r\n class=\"d-flex justify-content-center align-items-center\" \r\n (click)=\"selectEndDate($event)\">\r\n\r\n <dx-calendar\r\n #calendar\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [disabledDates]=\"disabledDates\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"this.selectionKind == 'period' ? selectedDateCalendar : selectedDateInternal\"\r\n (onValueChanged)=\"onDateChange($event)\"\r\n [firstDayOfWeek]=\"firstDayOfWeek\"\r\n >\r\n <div\r\n *dxTemplate=\"let cellData of 'cell'\"\r\n [class]=\"'h-100 pt-1' + getCellCssClass(cellData.date)\"\r\n [style.line-height.px]=\"23\"\r\n \r\n >\r\n \r\n {{ cellData.text }}\r\n </div>\r\n </dx-calendar>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n class=\"d-flex justify-content-end align-items-center px-4 py-3\"\r\n >\r\n <button\r\n class=\"btn btn-secondary sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"showDatepicker = false\"\r\n type=\"button\"\r\n >\r\n {{ translations.cancel}}\r\n </button>\r\n <!-- (click)=\"closeDatepickerPopup()\" -->\r\n <button\r\n class=\"btn btn-primary ms-1 sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"applyPeriodPicker()\"\r\n type=\"button\"\r\n >\r\n {{ translations.apply}}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div> \r\n </dx-scroll-view>\r\n </div>\r\n </dx-popover>\r\n<!-- </div> -->\r\n\r\n", styles: ["#datepickercomponent .datepicker-input{width:125px}#datepickercomponent .datepicker-input-large{width:250px!important}#datepickercomponent .datepicker-input.activeInput{border-color:#2886b1!important;border-width:2px!important}#datepickercomponent ::ng-deep .dx-calendar-cell{padding:inherit!important}#datepickercomponent ::ng-deep .dx-calendar-cell.dx-calendar-other-month{opacity:.5!important}#datepickercomponent .timebox-fixed-width{width:80px}#datepickercomponent ::ng-deep .text-center .dx-texteditor-input{text-align:center!important}#datepickercomponent ::ng-deep .p-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}#datepickercomponent ::ng-deep .px-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}.datepicker{display:inline-flex}.datepicker .border,.datepicker .border-bottom,.datepicker .border-top,.datepicker .border-left,.datepicker .border-right{border-color:var(--bs-gray-400)!important}.datepicker>button{border-radius:0;border-left:none;border-right:none}.datepicker .preselect-options-fixed-width{width:150px}.datepicker .selected-period{flex:1 1 auto}.datepicker .date-range-dropdown-button{box-shadow:none!important;border:1px solid white;flex:0;padding-top:.3rem!important;padding-bottom:.3rem!important}.datepicker .date-range-text{flex:1;min-width:0;text-align:start}.predefined-date-range{cursor:pointer;font-size:1rem;line-height:1.5rem;min-width:10rem;border-radius:2px}.predefined-date-range:hover{background-color:#0000000a}.predefined-date-range:active{color:#fff;background-color:#3b8fc2}.predefined-date-range.selected:not(:active){background-color:#e6e6e6}::ng-deep .sds-datepicker-popover.dx-popover-wrapper .dx-popup-content{padding:0}::ng-deep .sds-datepicker-ranges-popover .dx-popup-content{padding:.25rem;font-size:1rem}::ng-deep .sds-datepicker-ranges-popover .dropdown-item:focus{outline:none}::ng-deep .sds-datepicker-ranges-popover .dropdown-item .selected{background-color:var(--bs-gray-300)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "component", type: i4.DxDateBoxComponent, selector: "dx-date-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "adaptivityEnabled", "applyButtonText", "applyValueMode", "buttons", "calendarOptions", "cancelButtonText", "dateOutOfRangeMessage", "dateSerializationFormat", "deferRendering", "disabled", "disabledDates", "displayFormat", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "interval", "invalidDateMessage", "isValid", "label", "labelMode", "max", "maxLength", "min", "name", "opened", "openOnFieldClick", "pickerType", "placeholder", "readOnly", "rtlEnabled", "showAnalogClock", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "todayButtonText", "type", "useMaskBehavior", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "adaptivityEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "calendarOptionsChange", "cancelButtonTextChange", "dateOutOfRangeMessageChange", "dateSerializationFormatChange", "deferRenderingChange", "disabledChange", "disabledDatesChange", "displayFormatChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "intervalChange", "invalidDateMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "maxLengthChange", "minChange", "nameChange", "openedChange", "openOnFieldClickChange", "pickerTypeChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showAnalogClockChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "todayButtonTextChange", "typeChange", "useMaskBehaviorChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i5.DxoAnimationComponent, selector: "dxo-animation", inputs: ["hide", "show", "duration", "easing", "enabled", "maxPointCountSupported", "complete", "delay", "direction", "from", "staggerDelay", "start", "to", "type"] }, { kind: "component", type: i5.DxoHideComponent, selector: "dxo-hide", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { kind: "component", type: i5.DxoShowComponent, selector: "dxo-show", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { kind: "directive", type: i6.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.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"] }, { kind: "component", type: i4.DxScrollViewComponent, selector: "dx-scroll-view", inputs: ["bounceEnabled", "direction", "disabled", "elementAttr", "height", "pulledDownText", "pullingDownText", "reachBottomText", "refreshingText", "rtlEnabled", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onPullDown", "onReachBottom", "onScroll", "onUpdated", "bounceEnabledChange", "directionChange", "disabledChange", "elementAttrChange", "heightChange", "pulledDownTextChange", "pullingDownTextChange", "reachBottomTextChange", "refreshingTextChange", "rtlEnabledChange", "scrollByContentChange", "scrollByThumbChange", "showScrollbarChange", "useNativeChange", "widthChange"] }, { kind: "component", type: i4.DxCalendarComponent, selector: "dx-calendar", inputs: ["accessKey", "activeStateEnabled", "cellTemplate", "dateSerializationFormat", "disabled", "disabledDates", "elementAttr", "firstDayOfWeek", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "isValid", "max", "maxZoomLevel", "min", "minZoomLevel", "name", "readOnly", "rtlEnabled", "showTodayButton", "showWeekNumbers", "tabIndex", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "visible", "weekNumberRule", "width", "zoomLevel"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "cellTemplateChange", "dateSerializationFormatChange", "disabledChange", "disabledDatesChange", "elementAttrChange", "firstDayOfWeekChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "isValidChange", "maxChange", "maxZoomLevelChange", "minChange", "minZoomLevelChange", "nameChange", "readOnlyChange", "rtlEnabledChange", "showTodayButtonChange", "showWeekNumbersChange", "tabIndexChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "visibleChange", "weekNumberRuleChange", "widthChange", "zoomLevelChange", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
852
+ SdsDatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsDatePickerComponent, selector: "sds-date-picker", inputs: { selectionKind: "selectionKind", dateRangeDefinitions: "dateRangeDefinitions", selectedDate: "selectedDate", selectedDateStart: "selectedDateStart", singleDayFormatFn: "singleDayFormatFn", dateRangeFormatFn: "dateRangeFormatFn", selectedDateEnd: "selectedDateEnd", minDate: "minDate", maxDate: "maxDate", locales: "locales", disabled: "disabled", validationError: "validationError", isValid: "isValid", disabledDates: "disabledDates", applyText: "applyText", cancelText: "cancelText", translations: "translations", firstDayOfWeek: "firstDayOfWeek", dateRangeDefinitionsWidth: "dateRangeDefinitionsWidth", showPreviousAndNextButtons: "showPreviousAndNextButtons", width: "width", dropdownWrapperClass: "dropdownWrapperClass", dropdownWrapperId: "dropdownWrapperId", getPreviousDateCallback: "getPreviousDateCallback", getNextDateCallback: "getNextDateCallback", getPreviousRangeCallback: "getPreviousRangeCallback", getNextRangeCallback: "getNextRangeCallback", useCustomDisplayContent: "useCustomDisplayContent", displayPredefinedDateRangeName: "displayPredefinedDateRangeName", style: "style", compactStyleDisplay: "compactStyleDisplay", dateInputDisplayFormat: "dateInputDisplayFormat" }, outputs: { selectedDateChange: "selectedDateChange", selectedDateStartChange: "selectedDateStartChange", selectedDateEndChange: "selectedDateEndChange", periodChange: "periodChange" }, queries: [{ propertyName: "displayContent", first: true, predicate: ["display"], descendants: true }], viewQueries: [{ propertyName: "singleDatePickerBox", first: true, predicate: ["singleDatePickerBox"], descendants: true }, { propertyName: "selectedDateStartBox", first: true, predicate: ["selectedDateStartBox"], descendants: true }, { propertyName: "selectedDateEndBox", first: true, predicate: ["selectedDateEndBox"], descendants: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "_selectedDateRangeButton", first: true, predicate: ["selectedDateRangeButton"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- <div id=\"datepickerbuttons\"> -->\r\n <div \r\n class=\"datepicker d-inline-flex bg-white sds-no-print\"\r\n role=\"group\"\r\n aria-label=\"Date picker\"\r\n [style.width]=\"width\"\r\n >\r\n \r\n <ng-container *ngIf=\"style == 'classic'\"> \r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n >\r\n <button\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n id=\"pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n type=\"button\"\r\n class=\"\r\n btn btn-white\r\n border\r\n rounded-start\r\n border-end\r\n p-0\r\n sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n [style.width]=\"dateRangeDefinitionsWidth\"\r\n (click)=\"toggleDateRangeSelectorVisibility()\"\r\n >\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"ps-2 ms-1 me-1 date-range-text text-truncate\">\r\n {{selectedDateRange.name}}\r\n </div>\r\n <button type=\"button\" class=\"btn btn-light date-range-dropdown-button sds-fw-400\">\r\n <span class=\"dropdown-toggle\"></span>\r\n </button>\r\n </div>\r\n \r\n </button>\r\n\r\n <dx-popover\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n target=\"#pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showPredefinedOptionsSelector\"\r\n [wrapperAttr]=\"{ class: 'sds-datepicker-ranges-popover' }\"\r\n [minWidth]=\"dateRangeDefinitionsWidth\"\r\n \r\n >\r\n <div *dxTemplate=\"let data of 'content'\">\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n </div>\r\n </ng-container>\r\n \r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border border-end-0 pe-2 sds-fw-400\"\r\n [class.rounded-start] = \"style == 'compact' || (!dateRangeDefinitions || dateRangeDefinitions.length === 0)\"\r\n [class.border-start-0] = \"style == 'classic' && dateRangeDefinitions.length > 0\"\r\n type=\"button\"\r\n [disabled]=\"isMinimumLimit || disabled\"\r\n (click)=\"goToPreviousDate()\"\r\n >\r\n <fa-icon [icon]=\"previousPeriodIcon\"></fa-icon>\r\n\r\n </button>\r\n\r\n <button\r\n #selectedDateRangeButton\r\n id=\"pickerDropdown{{ randomIdReference }}\"\r\n class=\"btn btn-white border-top border-bottom text-truncate px-0 selected-period sds-fw-400\"\r\n [class.rounded-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.border-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.rounded-end] = \"!showPreviousAndNextButtons\"\r\n [class.border-end] = \"!showPreviousAndNextButtons\"\r\n [disabled]=\"disabled\"\r\n type=\"button\"\r\n (click)=\"showDatepicker = !showDatepicker\"\r\n >\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeName}}</span>\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div> \r\n </button>\r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border rounded-end border-start-0 ps-2 sds-fw-400\"\r\n type=\"button\"\r\n [disabled]=\"isMaximumLimit || disabled\"\r\n (click)=\"goToNextDate()\"\r\n >\r\n <fa-icon [icon]=\"nextPeriodIcon\"></fa-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"sds-print-only h-100\">\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n<dx-popover\r\n target=\"#pickerDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDatepicker\"\r\n (onHiding)=\"onHiddenCalendarPopover()\"\r\n (onShowing)=\"onShowingCalendarPopover()\"\r\n class=\"m-0 p-0\"\r\n [wrapperAttr]=\"{ \r\n class: 'sds-datepicker-popover ' + dropdownWrapperClass,\r\n id: dropdownWrapperId\r\n }\"\r\n>\r\n <dxo-animation>\r\n <dxo-show\r\n type=\"pop\"\r\n [from]=\"{ scale: 0.9 }\"\r\n [to]=\"{ scale: 1 }\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n </dxo-animation>\r\n <div *dxTemplate=\"let data of 'content'\" (keydown)=\"onKeydown($event)\" tabindex=\"1\">\r\n <dx-scroll-view>\r\n <div class=\"d-flex flex-row\">\r\n\r\n <div \r\n *ngIf=\"style == 'compact' && dateRanges.length > 1\"\r\n class=\"d-flex flex-column p-3 bg-gray-100\"\r\n style=\"border-right: 1px solid var(--bs-gray-200)\"\r\n >\r\n <div class=\"px-3 py-2\">\r\n <label>Presets</label>\r\n </div>\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div id=\"datepickercomponent\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center px-4 py-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateStartBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateStart\"\r\n (onValueChanged)=\"onStartDateChange($event)\"\r\n (onFocusIn)=\"onStartDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center px-2\">\r\n <fa-icon [icon]=\"toIcon\"></fa-icon>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateEndBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"!selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateEnd\"\r\n (onValueChanged)=\"onEndDateChange($event)\"\r\n (onFocusIn)=\"onEndDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n </div>\r\n\r\n <div class=\"bg-white px-4 py-3\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'single'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center p-2 mb-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #singleDatePickerBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input datepicker-input-large\"\r\n [class.activeInput]=\"true\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"selectedDateInternal\"\r\n >\r\n </dx-date-box>\r\n <!-- (onValueChanged)=\" closeDatepickerPopup()\" -->\r\n </div>\r\n </div>\r\n\r\n <div \r\n class=\"d-flex justify-content-center align-items-center\" \r\n (click)=\"selectEndDate($event)\">\r\n\r\n <dx-calendar\r\n #calendar\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [disabledDates]=\"disabledDates\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"this.selectionKind == 'period' ? selectedDateCalendar : selectedDateInternal\"\r\n (onValueChanged)=\"onDateChange($event)\"\r\n [firstDayOfWeek]=\"firstDayOfWeek\"\r\n >\r\n <div\r\n *dxTemplate=\"let cellData of 'cell'\"\r\n [class]=\"'h-100 pt-1' + getCellCssClass(cellData.date)\"\r\n [style.line-height.px]=\"23\"\r\n \r\n >\r\n \r\n {{ cellData.text }}\r\n </div>\r\n </dx-calendar>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n class=\"d-flex justify-content-end align-items-center px-4 py-3\"\r\n >\r\n <button\r\n class=\"btn btn-secondary sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"showDatepicker = false\"\r\n type=\"button\"\r\n >\r\n {{ translations.cancel}}\r\n </button>\r\n <!-- (click)=\"closeDatepickerPopup()\" -->\r\n <button\r\n class=\"btn btn-primary ms-1 sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"applyPeriodPicker()\"\r\n type=\"button\"\r\n >\r\n {{ translations.apply}}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div> \r\n </dx-scroll-view>\r\n </div>\r\n </dx-popover>\r\n<!-- </div> -->\r\n\r\n", styles: ["#datepickercomponent .datepicker-input{width:125px}#datepickercomponent .datepicker-input-large{width:250px!important}#datepickercomponent .datepicker-input.activeInput{border-color:#2886b1!important;border-width:2px!important}#datepickercomponent ::ng-deep .dx-calendar-cell{padding:inherit!important}#datepickercomponent ::ng-deep .dx-calendar-cell.dx-calendar-other-month{opacity:.5!important}#datepickercomponent .timebox-fixed-width{width:80px}#datepickercomponent ::ng-deep .text-center .dx-texteditor-input{text-align:center!important}#datepickercomponent ::ng-deep .p-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}#datepickercomponent ::ng-deep .px-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}.datepicker{display:inline-flex}.datepicker .border,.datepicker .border-bottom,.datepicker .border-top,.datepicker .border-left,.datepicker .border-right{border-color:var(--bs-gray-400)!important}.datepicker>button{border-radius:0;border-left:none;border-right:none}.datepicker .preselect-options-fixed-width{width:150px}.datepicker .selected-period{flex:1 1 auto}.datepicker .date-range-dropdown-button{box-shadow:none!important;border:1px solid white;flex:0;padding-top:.3rem!important;padding-bottom:.3rem!important}.datepicker .date-range-text{flex:1;min-width:0;text-align:start}.predefined-date-range{cursor:pointer;font-size:1rem;line-height:1.5rem;min-width:10rem;border-radius:2px}.predefined-date-range:hover{background-color:#0000000a}.predefined-date-range:active{color:#fff;background-color:#3b8fc2}.predefined-date-range.selected:not(:active){background-color:#e6e6e6}::ng-deep .sds-datepicker-popover.dx-popover-wrapper .dx-popup-content{padding:0}::ng-deep .sds-datepicker-ranges-popover .dx-popup-content{padding:.25rem;font-size:1rem}::ng-deep .sds-datepicker-ranges-popover .dropdown-item:focus{outline:none}::ng-deep .sds-datepicker-ranges-popover .dropdown-item .selected{background-color:var(--bs-gray-300)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "component", type: i4.DxDateBoxComponent, selector: "dx-date-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "adaptivityEnabled", "applyButtonText", "applyValueMode", "buttons", "calendarOptions", "cancelButtonText", "dateOutOfRangeMessage", "dateSerializationFormat", "deferRendering", "disabled", "disabledDates", "displayFormat", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "interval", "invalidDateMessage", "isValid", "label", "labelMode", "max", "maxLength", "min", "name", "opened", "openOnFieldClick", "pickerType", "placeholder", "readOnly", "rtlEnabled", "showAnalogClock", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "todayButtonText", "type", "useMaskBehavior", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "adaptivityEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "calendarOptionsChange", "cancelButtonTextChange", "dateOutOfRangeMessageChange", "dateSerializationFormatChange", "deferRenderingChange", "disabledChange", "disabledDatesChange", "displayFormatChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "intervalChange", "invalidDateMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "maxLengthChange", "minChange", "nameChange", "openedChange", "openOnFieldClickChange", "pickerTypeChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showAnalogClockChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "todayButtonTextChange", "typeChange", "useMaskBehaviorChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i5.DxoAnimationComponent, selector: "dxo-animation", inputs: ["hide", "show", "duration", "easing", "enabled", "maxPointCountSupported", "complete", "delay", "direction", "from", "staggerDelay", "start", "to", "type"] }, { kind: "component", type: i5.DxoHideComponent, selector: "dxo-hide", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { kind: "component", type: i5.DxoShowComponent, selector: "dxo-show", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { kind: "directive", type: i6.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.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"] }, { kind: "component", type: i4.DxScrollViewComponent, selector: "dx-scroll-view", inputs: ["bounceEnabled", "direction", "disabled", "elementAttr", "height", "pulledDownText", "pullingDownText", "reachBottomText", "refreshingText", "rtlEnabled", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onPullDown", "onReachBottom", "onScroll", "onUpdated", "bounceEnabledChange", "directionChange", "disabledChange", "elementAttrChange", "heightChange", "pulledDownTextChange", "pullingDownTextChange", "reachBottomTextChange", "refreshingTextChange", "rtlEnabledChange", "scrollByContentChange", "scrollByThumbChange", "showScrollbarChange", "useNativeChange", "widthChange"] }, { kind: "component", type: i4.DxCalendarComponent, selector: "dx-calendar", inputs: ["accessKey", "activeStateEnabled", "cellTemplate", "dateSerializationFormat", "disabled", "disabledDates", "elementAttr", "firstDayOfWeek", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "isValid", "max", "maxZoomLevel", "min", "minZoomLevel", "name", "readOnly", "rtlEnabled", "showTodayButton", "showWeekNumbers", "tabIndex", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "visible", "weekNumberRule", "width", "zoomLevel"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "cellTemplateChange", "dateSerializationFormatChange", "disabledChange", "disabledDatesChange", "elementAttrChange", "firstDayOfWeekChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "isValidChange", "maxChange", "maxZoomLevelChange", "minChange", "minZoomLevelChange", "nameChange", "readOnlyChange", "rtlEnabledChange", "showTodayButtonChange", "showWeekNumbersChange", "tabIndexChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "visibleChange", "weekNumberRuleChange", "widthChange", "zoomLevelChange", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
835
853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsDatePickerComponent, decorators: [{
836
854
  type: Component,
837
855
  args: [{ selector: 'sds-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- <div id=\"datepickerbuttons\"> -->\r\n <div \r\n class=\"datepicker d-inline-flex bg-white sds-no-print\"\r\n role=\"group\"\r\n aria-label=\"Date picker\"\r\n [style.width]=\"width\"\r\n >\r\n \r\n <ng-container *ngIf=\"style == 'classic'\"> \r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n >\r\n <button\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n id=\"pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n type=\"button\"\r\n class=\"\r\n btn btn-white\r\n border\r\n rounded-start\r\n border-end\r\n p-0\r\n sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n [style.width]=\"dateRangeDefinitionsWidth\"\r\n (click)=\"toggleDateRangeSelectorVisibility()\"\r\n >\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"ps-2 ms-1 me-1 date-range-text text-truncate\">\r\n {{selectedDateRange.name}}\r\n </div>\r\n <button type=\"button\" class=\"btn btn-light date-range-dropdown-button sds-fw-400\">\r\n <span class=\"dropdown-toggle\"></span>\r\n </button>\r\n </div>\r\n \r\n </button>\r\n\r\n <dx-popover\r\n *ngIf=\"dateRangeDefinitions && dateRangeDefinitions.length > 0\"\r\n target=\"#pickerPredefinedRangeDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showPredefinedOptionsSelector\"\r\n [wrapperAttr]=\"{ class: 'sds-datepicker-ranges-popover' }\"\r\n [minWidth]=\"dateRangeDefinitionsWidth\"\r\n \r\n >\r\n <div *dxTemplate=\"let data of 'content'\">\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n </div>\r\n </ng-container>\r\n \r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border border-end-0 pe-2 sds-fw-400\"\r\n [class.rounded-start] = \"style == 'compact' || (!dateRangeDefinitions || dateRangeDefinitions.length === 0)\"\r\n [class.border-start-0] = \"style == 'classic' && dateRangeDefinitions.length > 0\"\r\n type=\"button\"\r\n [disabled]=\"isMinimumLimit || disabled\"\r\n (click)=\"goToPreviousDate()\"\r\n >\r\n <fa-icon [icon]=\"previousPeriodIcon\"></fa-icon>\r\n\r\n </button>\r\n\r\n <button\r\n #selectedDateRangeButton\r\n id=\"pickerDropdown{{ randomIdReference }}\"\r\n class=\"btn btn-white border-top border-bottom text-truncate px-0 selected-period sds-fw-400\"\r\n [class.rounded-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.border-start] = \"(!dateRangeDefinitions || dateRangeDefinitions.length === 0) && !showPreviousAndNextButtons\"\r\n [class.rounded-end] = \"!showPreviousAndNextButtons\"\r\n [class.border-end] = \"!showPreviousAndNextButtons\"\r\n [disabled]=\"disabled\"\r\n type=\"button\"\r\n (click)=\"showDatepicker = !showDatepicker\"\r\n >\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeName}}</span>\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div> \r\n </button>\r\n\r\n <button\r\n *ngIf=\"showPreviousAndNextButtons\"\r\n class=\"btn btn-white border rounded-end border-start-0 ps-2 sds-fw-400\"\r\n type=\"button\"\r\n [disabled]=\"isMaximumLimit || disabled\"\r\n (click)=\"goToNextDate()\"\r\n >\r\n <fa-icon [icon]=\"nextPeriodIcon\"></fa-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"sds-print-only h-100\">\r\n\r\n <ng-content *ngIf=\"useCustomDisplayContent\" select=\"display\"></ng-content>\r\n <div *ngIf=\"!useCustomDisplayContent\" \r\n class=\"d-flex justify-content-center align-items-center\">\r\n <!-- <div class=\"mx-1\">\r\n <fa-icon [icon]=\"calendarIcon\" size=\"sm\"></fa-icon>\r\n </div> -->\r\n <div class=\"mx-1 text-truncate\">\r\n <span>{{selectedDateRangeTextSegment1}}</span>\r\n <fa-icon\r\n *ngIf=\"selectedDateRangeTextSegment2\"\r\n class=\"mx-2\"\r\n [icon]=\"toIcon\"\r\n size=\"sm\"\r\n ></fa-icon>\r\n <span>{{selectedDateRangeTextSegment2}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n<dx-popover\r\n target=\"#pickerDropdown{{ randomIdReference }}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDatepicker\"\r\n (onHiding)=\"onHiddenCalendarPopover()\"\r\n (onShowing)=\"onShowingCalendarPopover()\"\r\n class=\"m-0 p-0\"\r\n [wrapperAttr]=\"{ \r\n class: 'sds-datepicker-popover ' + dropdownWrapperClass,\r\n id: dropdownWrapperId\r\n }\"\r\n>\r\n <dxo-animation>\r\n <dxo-show\r\n type=\"pop\"\r\n [from]=\"{ scale: 0.9 }\"\r\n [to]=\"{ scale: 1 }\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n </dxo-animation>\r\n <div *dxTemplate=\"let data of 'content'\" (keydown)=\"onKeydown($event)\" tabindex=\"1\">\r\n <dx-scroll-view>\r\n <div class=\"d-flex flex-row\">\r\n\r\n <div \r\n *ngIf=\"style == 'compact' && dateRanges.length > 1\"\r\n class=\"d-flex flex-column p-3 bg-gray-100\"\r\n style=\"border-right: 1px solid var(--bs-gray-200)\"\r\n >\r\n <div class=\"px-3 py-2\">\r\n <label>Presets</label>\r\n </div>\r\n <div *ngFor=\"let range of dateRanges\">\r\n <div\r\n class=\"predefined-date-range px-3 py-2 w-100\"\r\n [class.selected]=\"range === selectedDateRange\"\r\n (click)=\"changDateRange(range)\"\r\n > \r\n {{range.name}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div id=\"datepickercomponent\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center px-4 py-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateStartBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateStart\"\r\n (onValueChanged)=\"onStartDateChange($event)\"\r\n (onFocusIn)=\"onStartDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center px-2\">\r\n <fa-icon [icon]=\"toIcon\"></fa-icon>\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #selectedDateEndBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input\"\r\n [class.activeInput]=\"!selectedDateFocus\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"selectedDateEnd\"\r\n (onValueChanged)=\"onEndDateChange($event)\"\r\n (onFocusIn)=\"onEndDateFocus()\"\r\n >\r\n </dx-date-box>\r\n </div>\r\n </div>\r\n\r\n <div class=\"bg-white px-4 py-3\">\r\n <div\r\n *ngIf=\"this.selectionKind == 'single'\"\r\n id=\"date-inputs\"\r\n class=\"d-flex flex-wrap justify-content-center align-items-center p-2 mb-3\"\r\n >\r\n <div class=\"d-flex justify-content-center align-items-center\">\r\n <dx-date-box\r\n #singleDatePickerBox\r\n class=\"border p-1 m-0 text-center rounded datepicker-input datepicker-input-large\"\r\n [class.activeInput]=\"true\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [useMaskBehavior]=\"true\"\r\n [displayFormat]=\"dateInputDisplayFormat\"\r\n type=\"date\"\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"selectedDateInternal\"\r\n >\r\n </dx-date-box>\r\n <!-- (onValueChanged)=\" closeDatepickerPopup()\" -->\r\n </div>\r\n </div>\r\n\r\n <div \r\n class=\"d-flex justify-content-center align-items-center\" \r\n (click)=\"selectEndDate($event)\">\r\n\r\n <dx-calendar\r\n #calendar\r\n [min]=\"minDate || minDateDefault\"\r\n [max]=\"maxDate || maxDateDefault\"\r\n [disabledDates]=\"disabledDates\"\r\n [isValid]=\"isValid\"\r\n [validationError]=\"validationError\"\r\n [disabled]=\"disabled\"\r\n [value]=\"this.selectionKind == 'period' ? selectedDateCalendar : selectedDateInternal\"\r\n (onValueChanged)=\"onDateChange($event)\"\r\n [firstDayOfWeek]=\"firstDayOfWeek\"\r\n >\r\n <div\r\n *dxTemplate=\"let cellData of 'cell'\"\r\n [class]=\"'h-100 pt-1' + getCellCssClass(cellData.date)\"\r\n [style.line-height.px]=\"23\"\r\n \r\n >\r\n \r\n {{ cellData.text }}\r\n </div>\r\n </dx-calendar>\r\n </div>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"this.selectionKind == 'period'\"\r\n class=\"d-flex justify-content-end align-items-center px-4 py-3\"\r\n >\r\n <button\r\n class=\"btn btn-secondary sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"showDatepicker = false\"\r\n type=\"button\"\r\n >\r\n {{ translations.cancel}}\r\n </button>\r\n <!-- (click)=\"closeDatepickerPopup()\" -->\r\n <button\r\n class=\"btn btn-primary ms-1 sds-fw-400\"\r\n [disabled]=\"disabled\"\r\n (click)=\"applyPeriodPicker()\"\r\n type=\"button\"\r\n >\r\n {{ translations.apply}}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div> \r\n </dx-scroll-view>\r\n </div>\r\n </dx-popover>\r\n<!-- </div> -->\r\n\r\n", styles: ["#datepickercomponent .datepicker-input{width:125px}#datepickercomponent .datepicker-input-large{width:250px!important}#datepickercomponent .datepicker-input.activeInput{border-color:#2886b1!important;border-width:2px!important}#datepickercomponent ::ng-deep .dx-calendar-cell{padding:inherit!important}#datepickercomponent ::ng-deep .dx-calendar-cell.dx-calendar-other-month{opacity:.5!important}#datepickercomponent .timebox-fixed-width{width:80px}#datepickercomponent ::ng-deep .text-center .dx-texteditor-input{text-align:center!important}#datepickercomponent ::ng-deep .p-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .p-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}#datepickercomponent ::ng-deep .px-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .px-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .py-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pb-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pt-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pl-5 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-0 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-1 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-2 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-3 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-4 .dx-texteditor-input,#datepickercomponent ::ng-deep .pr-5 .dx-texteditor-input{min-height:inherit!important;padding:inherit!important}.datepicker{display:inline-flex}.datepicker .border,.datepicker .border-bottom,.datepicker .border-top,.datepicker .border-left,.datepicker .border-right{border-color:var(--bs-gray-400)!important}.datepicker>button{border-radius:0;border-left:none;border-right:none}.datepicker .preselect-options-fixed-width{width:150px}.datepicker .selected-period{flex:1 1 auto}.datepicker .date-range-dropdown-button{box-shadow:none!important;border:1px solid white;flex:0;padding-top:.3rem!important;padding-bottom:.3rem!important}.datepicker .date-range-text{flex:1;min-width:0;text-align:start}.predefined-date-range{cursor:pointer;font-size:1rem;line-height:1.5rem;min-width:10rem;border-radius:2px}.predefined-date-range:hover{background-color:#0000000a}.predefined-date-range:active{color:#fff;background-color:#3b8fc2}.predefined-date-range.selected:not(:active){background-color:#e6e6e6}::ng-deep .sds-datepicker-popover.dx-popover-wrapper .dx-popup-content{padding:0}::ng-deep .sds-datepicker-ranges-popover .dx-popup-content{padding:.25rem;font-size:1rem}::ng-deep .sds-datepicker-ranges-popover .dropdown-item:focus{outline:none}::ng-deep .sds-datepicker-ranges-popover .dropdown-item .selected{background-color:var(--bs-gray-300)}\n"] }]
@@ -850,6 +868,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
850
868
  type: Input
851
869
  }], selectedDateStartChange: [{
852
870
  type: Output
871
+ }], singleDayFormatFn: [{
872
+ type: Input
873
+ }], dateRangeFormatFn: [{
874
+ type: Input
853
875
  }], selectedDateEnd: [{
854
876
  type: Input
855
877
  }], selectedDateEndChange: [{