cmat 0.0.39 → 0.0.41

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.
@@ -97,7 +97,7 @@ class CmatDrawerComponent {
97
97
  // Coerce the value to a boolean
98
98
  this.fixed = coerceBooleanProperty(changes['fixed'].currentValue);
99
99
  // Execute the observable
100
- this.fixedChanged.next(this.fixed);
100
+ this.fixedChanged.emit(this.fixed);
101
101
  }
102
102
  // Mode
103
103
  if ('mode' in changes) {
@@ -120,7 +120,7 @@ class CmatDrawerComponent {
120
120
  }
121
121
  }
122
122
  // Execute the observable
123
- this.modeChanged.next(currentMode);
123
+ this.modeChanged.emit(currentMode);
124
124
  // Enable the animations after a delay
125
125
  // The delay must be bigger than the current transition-duration
126
126
  // to make sure nothing will be animated while the mode is changing
@@ -138,7 +138,7 @@ class CmatDrawerComponent {
138
138
  // Position
139
139
  if ('position' in changes) {
140
140
  // Execute the observable
141
- this.positionChanged.next(this.position);
141
+ this.positionChanged.emit(this.position);
142
142
  }
143
143
  // Transparent overlay
144
144
  if ('transparentOverlay' in changes) {
@@ -294,7 +294,7 @@ class CmatDrawerComponent {
294
294
  }
295
295
  }
296
296
  // Execute the observable
297
- this.openedChanged.next(open);
297
+ this.openedChanged.emit(open);
298
298
  }
299
299
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CmatDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
300
300
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CmatDrawerComponent, isStandalone: true, selector: "cmat-drawer", inputs: { fixed: "fixed", mode: "mode", name: "name", opened: "opened", position: "position", transparentOverlay: "transparentOverlay" }, outputs: { fixedChanged: "fixedChanged", modeChanged: "modeChanged", openedChanged: "openedChanged", positionChanged: "positionChanged" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" }, properties: { "class": "this.classList", "style": "this.styleList" } }, exportAs: ["cmatDrawer"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-drawer.mjs","sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html","../../../projects/cmat/components/drawer/cmat-components-drawer.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n /**\r\n * Register drawer component\r\n *\r\n * @param name\r\n * @param component\r\n */\r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n /**\r\n * Deregister drawer component\r\n *\r\n * @param name\r\n */\r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n /**\r\n * Get drawer component from the registry\r\n *\r\n * @param name\r\n */\r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer'\r\n})\r\nexport class CmatDrawerComponent implements OnChanges, OnInit, OnDestroy {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static ngAcceptInputType_fixed: BooleanInput;\r\n static ngAcceptInputType_opened: BooleanInput;\r\n static ngAcceptInputType_transparentOverlay: BooleanInput;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n @Input() fixed: boolean = false;\r\n @Input() mode: CmatDrawerMode = 'side';\r\n @Input() name: string = inject(CmatUtilsService).randomId();\r\n @Input() opened: boolean = false;\r\n @Input() position: CmatDrawerPosition = 'left';\r\n @Input() transparentOverlay: boolean = false;\r\n @Output() readonly fixedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly modeChanged: EventEmitter<CmatDrawerMode> = new EventEmitter<CmatDrawerMode>();\r\n @Output() readonly openedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly positionChanged: EventEmitter<CmatDrawerPosition> = new EventEmitter<CmatDrawerPosition>();\r\n\r\n private _animationBuilder = inject(AnimationBuilder);\r\n private _elementRef = inject(ElementRef);\r\n private _renderer2 = inject(Renderer2);\r\n private _cmatDrawerService = inject(CmatDrawerService); \r\n\r\n private _animationsEnabled: boolean = false;\r\n private _hovered: boolean = false;\r\n private _overlay: HTMLElement | null;\r\n private _player: AnimationPlayer;\r\n\r\n @HostBinding('class') get classList(): any {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n return {\r\n 'cmat-drawer-animations-enabled': this._animationsEnabled,\r\n 'cmat-drawer-fixed': this.fixed,\r\n 'cmat-drawer-hover': this._hovered,\r\n [`cmat-drawer-mode-${this.mode}`]: true,\r\n 'cmat-drawer-opened': this.opened,\r\n [`cmat-drawer-position-${this.position}`]: true\r\n };\r\n }\r\n\r\n @HostBinding('style') get styleList(): any {\r\n return {\r\n 'visibility': this.opened ? 'visible' : 'hidden'\r\n };\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseenter(): void {\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // Set the hovered\r\n this._hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseleave(): void {\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // Set the hovered\r\n this._hovered = false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Fixed\r\n if ('fixed' in changes) {\r\n // Coerce the value to a boolean\r\n this.fixed = coerceBooleanProperty(changes['fixed'].currentValue);\r\n\r\n // Execute the observable\r\n this.fixedChanged.next(this.fixed);\r\n }\r\n\r\n // Mode\r\n if ('mode' in changes) {\r\n // Get the previous and current values\r\n const previousMode = changes['mode'].previousValue;\r\n const currentMode = changes['mode'].currentValue;\r\n\r\n // Disable the animations\r\n this._disableAnimations();\r\n\r\n // If the mode changes: 'over -> side'\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n // Hide the overlay\r\n this._hideOverlay();\r\n }\r\n\r\n // If the mode changes: 'side -> over'\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n // If the drawer is opened\r\n if (this.opened) {\r\n // Show the overlay\r\n this._showOverlay();\r\n }\r\n }\r\n\r\n // Execute the observable\r\n this.modeChanged.next(currentMode);\r\n\r\n // Enable the animations after a delay\r\n // The delay must be bigger than the current transition-duration\r\n // to make sure nothing will be animated while the mode is changing\r\n setTimeout(() => {\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n\r\n // Opened\r\n if ('opened' in changes) {\r\n // Coerce the value to a boolean\r\n const open = coerceBooleanProperty(changes['opened'].currentValue);\r\n\r\n // Open/close the drawer\r\n this._toggleOpened(open);\r\n }\r\n\r\n // Position\r\n if ('position' in changes) {\r\n // Execute the observable\r\n this.positionChanged.next(this.position);\r\n }\r\n\r\n // Transparent overlay\r\n if ('transparentOverlay' in changes) {\r\n // Coerce the value to a boolean\r\n this.transparentOverlay = coerceBooleanProperty(changes['transparentOverlay'].currentValue);\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n // Register the drawer\r\n this._cmatDrawerService.registerComponent(this.name, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Deregister the drawer from the registry\r\n this._cmatDrawerService.deregisterComponent(this.name);\r\n }\r\n\r\n open(): void {\r\n // Return if the drawer has already opened\r\n if (this.opened) {\r\n return;\r\n }\r\n\r\n // Open the drawer\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n // Return if the drawer has already closed\r\n if (!this.opened) {\r\n return;\r\n }\r\n\r\n // Close the drawer\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened) {\r\n this.close();\r\n }\r\n else {\r\n this.open();\r\n }\r\n }\r\n\r\n /**\r\n * Enable the animations\r\n *\r\n * @private\r\n */\r\n private _enableAnimations(): void {\r\n // Return if the animations are already enabled\r\n if (this._animationsEnabled) {\r\n return;\r\n }\r\n\r\n // Enable the animations\r\n this._animationsEnabled = true;\r\n }\r\n\r\n /**\r\n * Disable the animations\r\n *\r\n * @private\r\n */\r\n private _disableAnimations(): void {\r\n // Return if the animations are already disabled\r\n if (!this._animationsEnabled) {\r\n return;\r\n }\r\n\r\n // Disable the animations\r\n this._animationsEnabled = false;\r\n }\r\n\r\n /**\r\n * Show the backdrop\r\n *\r\n * @private\r\n */\r\n private _showOverlay(): void {\r\n // Create the backdrop element\r\n this._overlay = this._renderer2.createElement('div');\r\n\r\n // Return if overlay couldn't be create for some reason\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n // Add a class to the backdrop element\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n\r\n // Add a class depending on the fixed option\r\n if (this.fixed) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n\r\n // Add a class depending on the transparentOverlay option\r\n if (this.transparentOverlay) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n\r\n // Append the backdrop to the parent of the drawer\r\n this._renderer2.appendChild(this._elementRef.nativeElement.parentElement, this._overlay);\r\n\r\n // Create the enter animation and attach it to the player\r\n this._player = this._animationBuilder.build([\r\n animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ opacity: 1 }))\r\n ]).create(this._overlay);\r\n\r\n // Once the animation is done...\r\n this._player.onDone(() => {\r\n\r\n // Destroy the player\r\n this._player.destroy();\r\n });\r\n\r\n // Play the animation\r\n this._player.play();\r\n\r\n // Add an event listener to the overlay\r\n this._overlay.addEventListener('click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n /**\r\n * Hide the backdrop\r\n *\r\n * @private\r\n */\r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n // Create the leave animation and attach it to the player\r\n this._player = this._animationBuilder.build([\r\n animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ opacity: 0 }))\r\n ]).create(this._overlay);\r\n\r\n // Play the animation\r\n this._player.play();\r\n\r\n // Once the animation is done...\r\n this._player.onDone(() => {\r\n\r\n // Destroy the player\r\n this._player.destroy();\r\n\r\n // If the backdrop still exists...\r\n if (this._overlay) {\r\n // Remove the backdrop\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Open/close the drawer\r\n *\r\n * @param open\r\n * @private\r\n */\r\n private _toggleOpened(open: boolean): void {\r\n // Set the opened\r\n this.opened = open;\r\n\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // If the mode is 'over'\r\n if (this.mode === 'over') {\r\n // If the drawer opens, show the overlay\r\n if (open) {\r\n this._showOverlay();\r\n }\r\n // Otherwise, close the overlay\r\n else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n // Execute the observable\r\n this.openedChanged.next(open);\r\n }\r\n}\r\n","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,kBAAkB,EAAA,CAAA;sBAA1B;gBACkB,YAAY,EAAA,CAAA;sBAA9B;gBACkB,WAAW,EAAA,CAAA;sBAA7B;gBACkB,aAAa,EAAA,CAAA;sBAA/B;gBACkB,eAAe,EAAA,CAAA;sBAAjC;gBAYyB,SAAS,EAAA,CAAA;sBAAlC,WAAW;uBAAC,OAAO;gBAYM,SAAS,EAAA,CAAA;sBAAlC,WAAW;uBAAC,OAAO;gBAOpB,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;gBAU1B,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;;;AEtE9B;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-drawer.mjs","sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html","../../../projects/cmat/components/drawer/cmat-components-drawer.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n /**\r\n * Register drawer component\r\n *\r\n * @param name\r\n * @param component\r\n */\r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n /**\r\n * Deregister drawer component\r\n *\r\n * @param name\r\n */\r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n /**\r\n * Get drawer component from the registry\r\n *\r\n * @param name\r\n */\r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, Renderer2, SimpleChanges, ViewEncapsulation, inject } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer'\r\n})\r\nexport class CmatDrawerComponent implements OnChanges, OnInit, OnDestroy {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static ngAcceptInputType_fixed: BooleanInput;\r\n static ngAcceptInputType_opened: BooleanInput;\r\n static ngAcceptInputType_transparentOverlay: BooleanInput;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n @Input() fixed: boolean = false;\r\n @Input() mode: CmatDrawerMode = 'side';\r\n @Input() name: string = inject(CmatUtilsService).randomId();\r\n @Input() opened: boolean = false;\r\n @Input() position: CmatDrawerPosition = 'left';\r\n @Input() transparentOverlay: boolean = false;\r\n @Output() readonly fixedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly modeChanged: EventEmitter<CmatDrawerMode> = new EventEmitter<CmatDrawerMode>();\r\n @Output() readonly openedChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n @Output() readonly positionChanged: EventEmitter<CmatDrawerPosition> = new EventEmitter<CmatDrawerPosition>();\r\n\r\n private _animationBuilder = inject(AnimationBuilder);\r\n private _elementRef = inject(ElementRef);\r\n private _renderer2 = inject(Renderer2);\r\n private _cmatDrawerService = inject(CmatDrawerService); \r\n\r\n private _animationsEnabled: boolean = false;\r\n private _hovered: boolean = false;\r\n private _overlay: HTMLElement | null;\r\n private _player: AnimationPlayer;\r\n\r\n @HostBinding('class') get classList(): any {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n return {\r\n 'cmat-drawer-animations-enabled': this._animationsEnabled,\r\n 'cmat-drawer-fixed': this.fixed,\r\n 'cmat-drawer-hover': this._hovered,\r\n [`cmat-drawer-mode-${this.mode}`]: true,\r\n 'cmat-drawer-opened': this.opened,\r\n [`cmat-drawer-position-${this.position}`]: true\r\n };\r\n }\r\n\r\n @HostBinding('style') get styleList(): any {\r\n return {\r\n 'visibility': this.opened ? 'visible' : 'hidden'\r\n };\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseenter(): void {\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // Set the hovered\r\n this._hovered = true;\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseleave(): void {\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // Set the hovered\r\n this._hovered = false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Fixed\r\n if ('fixed' in changes) {\r\n // Coerce the value to a boolean\r\n this.fixed = coerceBooleanProperty(changes['fixed'].currentValue);\r\n\r\n // Execute the observable\r\n this.fixedChanged.emit(this.fixed);\r\n }\r\n\r\n // Mode\r\n if ('mode' in changes) {\r\n // Get the previous and current values\r\n const previousMode = changes['mode'].previousValue;\r\n const currentMode = changes['mode'].currentValue;\r\n\r\n // Disable the animations\r\n this._disableAnimations();\r\n\r\n // If the mode changes: 'over -> side'\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n // Hide the overlay\r\n this._hideOverlay();\r\n }\r\n\r\n // If the mode changes: 'side -> over'\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n // If the drawer is opened\r\n if (this.opened) {\r\n // Show the overlay\r\n this._showOverlay();\r\n }\r\n }\r\n\r\n // Execute the observable\r\n this.modeChanged.emit(currentMode);\r\n\r\n // Enable the animations after a delay\r\n // The delay must be bigger than the current transition-duration\r\n // to make sure nothing will be animated while the mode is changing\r\n setTimeout(() => {\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n\r\n // Opened\r\n if ('opened' in changes) {\r\n // Coerce the value to a boolean\r\n const open = coerceBooleanProperty(changes['opened'].currentValue);\r\n\r\n // Open/close the drawer\r\n this._toggleOpened(open);\r\n }\r\n\r\n // Position\r\n if ('position' in changes) {\r\n // Execute the observable\r\n this.positionChanged.emit(this.position);\r\n }\r\n\r\n // Transparent overlay\r\n if ('transparentOverlay' in changes) {\r\n // Coerce the value to a boolean\r\n this.transparentOverlay = coerceBooleanProperty(changes['transparentOverlay'].currentValue);\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n // Register the drawer\r\n this._cmatDrawerService.registerComponent(this.name, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Deregister the drawer from the registry\r\n this._cmatDrawerService.deregisterComponent(this.name);\r\n }\r\n\r\n open(): void {\r\n // Return if the drawer has already opened\r\n if (this.opened) {\r\n return;\r\n }\r\n\r\n // Open the drawer\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n // Return if the drawer has already closed\r\n if (!this.opened) {\r\n return;\r\n }\r\n\r\n // Close the drawer\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened) {\r\n this.close();\r\n }\r\n else {\r\n this.open();\r\n }\r\n }\r\n\r\n /**\r\n * Enable the animations\r\n *\r\n * @private\r\n */\r\n private _enableAnimations(): void {\r\n // Return if the animations are already enabled\r\n if (this._animationsEnabled) {\r\n return;\r\n }\r\n\r\n // Enable the animations\r\n this._animationsEnabled = true;\r\n }\r\n\r\n /**\r\n * Disable the animations\r\n *\r\n * @private\r\n */\r\n private _disableAnimations(): void {\r\n // Return if the animations are already disabled\r\n if (!this._animationsEnabled) {\r\n return;\r\n }\r\n\r\n // Disable the animations\r\n this._animationsEnabled = false;\r\n }\r\n\r\n /**\r\n * Show the backdrop\r\n *\r\n * @private\r\n */\r\n private _showOverlay(): void {\r\n // Create the backdrop element\r\n this._overlay = this._renderer2.createElement('div');\r\n\r\n // Return if overlay couldn't be create for some reason\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n // Add a class to the backdrop element\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n\r\n // Add a class depending on the fixed option\r\n if (this.fixed) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n\r\n // Add a class depending on the transparentOverlay option\r\n if (this.transparentOverlay) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n\r\n // Append the backdrop to the parent of the drawer\r\n this._renderer2.appendChild(this._elementRef.nativeElement.parentElement, this._overlay);\r\n\r\n // Create the enter animation and attach it to the player\r\n this._player = this._animationBuilder.build([\r\n animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ opacity: 1 }))\r\n ]).create(this._overlay);\r\n\r\n // Once the animation is done...\r\n this._player.onDone(() => {\r\n\r\n // Destroy the player\r\n this._player.destroy();\r\n });\r\n\r\n // Play the animation\r\n this._player.play();\r\n\r\n // Add an event listener to the overlay\r\n this._overlay.addEventListener('click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n /**\r\n * Hide the backdrop\r\n *\r\n * @private\r\n */\r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n // Create the leave animation and attach it to the player\r\n this._player = this._animationBuilder.build([\r\n animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ opacity: 0 }))\r\n ]).create(this._overlay);\r\n\r\n // Play the animation\r\n this._player.play();\r\n\r\n // Once the animation is done...\r\n this._player.onDone(() => {\r\n\r\n // Destroy the player\r\n this._player.destroy();\r\n\r\n // If the backdrop still exists...\r\n if (this._overlay) {\r\n // Remove the backdrop\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Open/close the drawer\r\n *\r\n * @param open\r\n * @private\r\n */\r\n private _toggleOpened(open: boolean): void {\r\n // Set the opened\r\n this.opened = open;\r\n\r\n // Enable the animations\r\n this._enableAnimations();\r\n\r\n // If the mode is 'over'\r\n if (this.mode === 'over') {\r\n // If the drawer opens, show the overlay\r\n if (open) {\r\n this._showOverlay();\r\n }\r\n // Otherwise, close the overlay\r\n else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n // Execute the observable\r\n this.openedChanged.emit(open);\r\n }\r\n}\r\n","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAMa,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,kBAAkB,GAAqC,IAAI,GAAG,EAA+B;AA4BxG;AA3BG;;;;;AAKG;IACH,iBAAiB,CAAC,IAAY,EAAE,SAA8B,EAAA;QAC1D,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;;AAGhD;;;;AAIG;AACH,IAAA,mBAAmB,CAAC,IAAY,EAAA;AAC5B,QAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;;AAGxC;;;;AAIG;AACH,IAAA,YAAY,CAAC,IAAY,EAAA;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;;8GA3BnC,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAET,iBAAiB,EAAA,UA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AA,26DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDaO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;+BACI,aAAa,EAAA,aAAA,EAGR,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,YAAY,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,26DAAA,CAAA,EAAA;8BASb,KAAK,EAAA,CAAA;sBAAb;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,kBAAkB,EAAA,CAAA;sBAA1B;gBACkB,YAAY,EAAA,CAAA;sBAA9B;gBACkB,WAAW,EAAA,CAAA;sBAA7B;gBACkB,aAAa,EAAA,CAAA;sBAA/B;gBACkB,eAAe,EAAA,CAAA;sBAAjC;gBAYyB,SAAS,EAAA,CAAA;sBAAlC,WAAW;uBAAC,OAAO;gBAYM,SAAS,EAAA,CAAA;sBAAlC,WAAW;uBAAC,OAAO;gBAOpB,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;gBAU1B,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;;;AEtE9B;;AAEG;;;;"}
@@ -2237,12 +2237,12 @@ class CmatDatetimepickerComponent {
2237
2237
  /** The minimum selectable date. */
2238
2238
  // eslint-disable-next-line @typescript-eslint/member-ordering
2239
2239
  get minDate() {
2240
- return this.datetimepickerInput && this.datetimepickerInput.min;
2240
+ return this.datetimepickerInput?.min;
2241
2241
  }
2242
2242
  /** The maximum selectable date. */
2243
2243
  // eslint-disable-next-line @typescript-eslint/member-ordering
2244
2244
  get maxDate() {
2245
- return this.datetimepickerInput && this.datetimepickerInput.max;
2245
+ return this.datetimepickerInput?.max;
2246
2246
  }
2247
2247
  // eslint-disable-next-line @typescript-eslint/member-ordering
2248
2248
  get dateFilter() {