@odx/angular 13.1.1 → 13.1.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @odx/angular
2
2
 
3
+ ## 13.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - ded480f: Fix: reset max-height/max-width before position computation to detect overflow correctly
8
+
9
+ ## 13.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 82aee2e: Fix: sync ngx-mask state on programmatic input update
14
+
3
15
  ## 13.1.1
4
16
 
5
17
  ### Patch Changes
@@ -24,6 +24,8 @@ async function computeOverlayPosition(referenceElement, overlayElement, contentE
24
24
  const arrowSize = options.showArrow ? arrowElement.offsetWidth : 0;
25
25
  const arrowMiddleware = options.showArrow ? [arrow({ element: arrowElement, padding: 8 })] : [];
26
26
  const flipMiddleWare = enableFallback ? [flip({ fallbackAxisSideDirection })] : [];
27
+ contentElement.style?.setProperty?.(`${variablePrefix}-max-height`, null);
28
+ contentElement.style?.setProperty?.(`${variablePrefix}-max-width`, null);
27
29
  return computePosition(referenceElement, overlayElement, {
28
30
  strategy,
29
31
  placement: position,
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-connected-overlay.mjs","sources":["../../../../libs/angular/cdk/connected-overlay/src/lib/helpers/compute-overlay-position.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-options.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-ref.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.html","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.service.ts","../../../../libs/angular/cdk/connected-overlay/src/odx-angular-cdk-connected-overlay.ts"],"sourcesContent":["import { ComputePositionReturn, VirtualElement, arrow, computePosition, flip, hide, shift, size, offset as withOffset } from '@floating-ui/dom';\nimport { applyStyles, getOppositeSide, getSide, px } from '@odx/angular/utils';\nimport { ConnectedOverlayOptions } from '../models';\n\n/**\n * Computes the position of an overlay element relative to a reference element.\n *\n * @param referenceElement - The reference element to position the overlay relative to.\n * @param overlayElement - The overlay element to be positioned.\n * @param contentElement - The content element within the overlay.\n * @param arrowElement - The arrow element within the overlay.\n * @param options - The options for positioning the overlay.\n * @returns A promise that resolves to the computed position of the overlay.\n */\nexport async function computeOverlayPosition(\n referenceElement: VirtualElement,\n overlayElement: HTMLElement,\n contentElement: HTMLElement,\n arrowElement: HTMLElement,\n options: ConnectedOverlayOptions,\n): Promise<ComputePositionReturn> {\n const variablePrefix = '--odx-cdk-connected-overlay';\n const { position, offset, outerPadding, matchReferenceWidth, enableFallback, fallbackAxisSideDirection, strategy, minHeight } = options;\n const arrowSize = options.showArrow ? arrowElement.offsetWidth : 0;\n const arrowMiddleware = options.showArrow ? [arrow({ element: arrowElement, padding: 8 })] : [];\n const flipMiddleWare = enableFallback ? [flip({ fallbackAxisSideDirection })] : [];\n return computePosition(referenceElement, overlayElement, {\n strategy,\n placement: position,\n middleware: [\n withOffset(Math.max(offset, arrowSize + offset)),\n shift({ padding: outerPadding }),\n ...flipMiddleWare,\n size({\n padding: outerPadding,\n apply: ({ availableHeight, availableWidth, rects }) => {\n contentElement.style.setProperty?.(`${variablePrefix}-min-height`, minHeight ? px(Math.min(availableHeight, minHeight)) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-min-width`, matchReferenceWidth ? px(rects.reference.width) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-max-height`, px(availableHeight));\n contentElement.style.setProperty?.(`${variablePrefix}-max-width`, px(matchReferenceWidth ? rects.reference.width : availableWidth));\n },\n }),\n ...arrowMiddleware,\n hide({ rootBoundary: 'viewport' }),\n ],\n }).then((result) => {\n overlayElement.style.setProperty?.(`${variablePrefix}-position-x`, px(result.x));\n overlayElement.style.setProperty?.(`${variablePrefix}-position-y`, px(result.y));\n if (options.hiddenClass) {\n overlayElement.classList.toggle(options.hiddenClass, !!result.middlewareData.hide?.referenceHidden);\n }\n if (options.showArrow) {\n const overlaySide = getSide(result.placement);\n const arrowSide = getOppositeSide(result.placement);\n applyStyles(arrowElement, {\n display: null,\n top: px(result.middlewareData.arrow?.y),\n left: px(result.middlewareData.arrow?.x),\n [arrowSide]: px(-arrowSize / 2),\n [overlaySide]: null,\n });\n } else {\n applyStyles(arrowElement, { display: 'none' });\n }\n\n return result;\n });\n}\n","import { Strategy } from '@floating-ui/dom';\nimport { DynamicContent } from '@odx/angular/cdk/dynamic-view';\nimport { Position } from '@odx/angular/utils';\n\nexport interface ConnectedOverlayOptions {\n content?: DynamicContent | null;\n context?: Record<string, unknown>;\n containerClass?: string | null;\n hiddenClass: string | null;\n enableFallback: boolean;\n fallbackAxisSideDirection: 'start' | 'end';\n matchReferenceWidth: boolean;\n minHeight?: number | null;\n offset: number;\n outerPadding: number;\n position: Position;\n strategy: Strategy;\n showArrow?: boolean;\n updateOnAnimationFrame?: boolean;\n nonInteractive?: boolean;\n hooks?: {\n beforeOpen?: () => void;\n afterOpen?: () => void;\n beforeClose?: () => void;\n afterClose?: () => void;\n };\n}\n\nexport const DefaultConnectedOverlayOptions: ConnectedOverlayOptions = {\n hiddenClass: 'is-hidden',\n enableFallback: false,\n fallbackAxisSideDirection: 'start',\n matchReferenceWidth: false,\n offset: 8,\n outerPadding: 12,\n position: Position.BOTTOM,\n strategy: 'fixed',\n};\n","import { DynamicViewRef } from '@odx/angular/cdk/dynamic-view';\nimport { waitForAnimations } from '@odx/angular/utils';\nimport { EMPTY, Observable } from 'rxjs';\nimport { ConnectedOverlayComponent } from '../connected-overlay.component';\nimport { ConnectedOverlayOptions } from './connected-overlay-options';\n\n/**\n * A reference to a connected overlay created by the `ConnectedOverlayService`. This class provides methods to interact\n * with the overlay, such as updating its options or closing it. It encapsulates the `DynamicViewRef` for the overlay's instance,\n * allowing for direct manipulation of the overlay's state and behavior.\n *\n * This example demonstrates how to use a `ConnectedOverlayRef` to update and close a connected overlay in response\n * to user interactions.\n *\n * @example\n * ```ts\n * class MyComponent {\n * private overlayRef?: ConnectedOverlayRef;\n *\n * constructor(private overlayService: ConnectedOverlayService) {}\n *\n * openOverlay() {\n * this.overlayRef = this.overlayService.createOverlay(this.someElementRef.nativeElement, { position: 'bottom' });\n * }\n *\n * updateOverlayPosition() {\n * if (this.overlayRef) {\n * this.overlayRef.update({ position: 'top' });\n * }\n * }\n *\n * closeOverlay() {\n * this.overlayRef?.close();\n * }\n * }\n * ```\n *\n * In this example, `MyComponent` uses the `ConnectedOverlayService` to create an overlay. It stores a reference to\n * the created overlay in `overlayRef`, allowing it to update the overlay's position or close it when necessary.\n */\nexport class ConnectedOverlayRef {\n public readonly element = this.dynamicViewRef.getElement();\n\n /**\n * An Observable that emits when the overlay is closed.\n *\n * @emits {void} - Emits when the overlay is closed.\n *\n */\n public readonly onClose$: Observable<void> = this.dynamicViewRef.getContext().closed ?? EMPTY;\n\n constructor(private readonly dynamicViewRef: DynamicViewRef<typeof ConnectedOverlayComponent>) {}\n\n /**\n * Updates the connected overlay with new options.\n *\n * @param options {Partial<ConnectedOverlayOptions>} - The new options to be applied to the connected overlay.\n */\n public update(options: Partial<ConnectedOverlayOptions>): void {\n this.dynamicViewRef.update({ options: options as ConnectedOverlayOptions });\n }\n\n /**\n * Closes the connected overlay.\n *\n * @returns {void}\n */\n public async close(force = false) {\n const hiddenClass = force ? 'force-hidden' : this.dynamicViewRef.getContext().options?.hiddenClass || 'is-hidden';\n this.element?.classList.add(hiddenClass);\n await waitForAnimations(this.element);\n this.dynamicViewRef.destroy();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { VirtualElement, autoUpdate } from '@floating-ui/dom';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgChanges, Side, deferFn, getSide, hasChanged, injectElement, isPresent } from '@odx/angular/utils';\nimport { Subject } from 'rxjs';\nimport { computeOverlayPosition } from './helpers';\nimport { ConnectedOverlayOptions, DefaultConnectedOverlayOptions } from './models';\n\n@CSSComponent('cdk-connected-overlay')\n@Component({\n standalone: true,\n selector: 'odx-connected-overlay[popover=\"manual\"]',\n imports: [CoreModule, DynamicViewDirective],\n templateUrl: 'connected-overlay.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConnectedOverlayComponent implements OnInit, OnChanges, OnDestroy {\n private readonly zone = inject(NgZone);\n private positionUpdater: (() => void) | null = null;\n\n protected readonly injector = inject(Injector);\n protected overlaySide?: Side;\n\n @ViewChild('content', { static: true })\n protected contentElement!: ElementRef<HTMLElement>;\n\n @ViewChild('arrow', { static: true })\n protected arrowElement!: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @Input()\n public referenceElement!: VirtualElement;\n\n @Input()\n public options: ConnectedOverlayOptions = DefaultConnectedOverlayOptions;\n\n @Output()\n public closed = new Subject<void>();\n\n public ngOnInit(): void {\n this.options.hooks?.beforeOpen?.();\n deferFn(() => {\n this.element.nativeElement?.isConnected && this.element.nativeElement?.showPopover?.();\n this.options.hooks?.afterOpen?.();\n });\n }\n\n public ngOnChanges(changes: NgChanges<ConnectedOverlayComponent>): void {\n if (hasChanged(changes, ['options'], false)) {\n this.overlaySide = getSide(this.options.position);\n this.element.nativeElement.classList.toggle('odx-cdk-connected-overlay--non-interactive', this.options.nonInteractive ?? false);\n }\n if (hasChanged(changes, ['referenceElement', 'options'], false)) {\n this.stopPositionUpdater();\n this.startPositionUpdater();\n }\n }\n\n public ngOnDestroy(): void {\n this.options.hooks?.beforeClose?.();\n this.stopPositionUpdater();\n this.element.nativeElement?.hidePopover?.();\n this.closed.next();\n this.options.hooks?.afterClose?.();\n }\n\n private startPositionUpdater(): void {\n this.positionUpdater = this.zone.runOutsideAngular(() =>\n autoUpdate(this.referenceElement, this.element.nativeElement, () => this.updatePosition(), {\n elementResize: isPresent(window.ResizeObserver),\n animationFrame: this.options.updateOnAnimationFrame,\n }),\n );\n }\n\n private stopPositionUpdater(): void {\n this.positionUpdater?.();\n this.positionUpdater = null;\n }\n\n private async updatePosition(): Promise<void> {\n return computeOverlayPosition(\n this.referenceElement,\n this.element.nativeElement,\n this.contentElement.nativeElement,\n this.arrowElement.nativeElement,\n this.options,\n ).then(({ placement }) => {\n this.overlaySide = getSide(placement);\n });\n }\n}\n","<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\" />\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { VirtualElement } from '@floating-ui/dom';\nimport { DynamicViewRenderingOptions, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { ConnectedOverlayComponent } from './connected-overlay.component';\nimport { ConnectedOverlayOptions, ConnectedOverlayRef, DefaultConnectedOverlayOptions } from './models';\n\n/**\n * Service for creating and managing connected overlays. These overlays are UI elements such as popovers, tooltips,\n * or dropdown menus that are positioned relative to a reference element in the DOM. This service leverages the `DynamicViewService`\n * for dynamic component rendering and provides a streamlined API for creating overlays with custom positioning and options.\n *\n * Use the `ConnectedOverlayService` to dynamically create an overlay next to a specific element in your Angular application.\n * This example demonstrates creating a connected overlay next to a button element when the button is clicked.\n *\n * @example\n * ```ts\n * import { Component, ElementRef, ViewChild } from '@angular/core';\n * import { ConnectedOverlayService, ConnectedOverlayOptions } from '@odx/angular/cdk/connected-overlay';\n *\n * @Component({\n * selector: 'app-example',\n * template: `<button #triggerElement>Click me</button>`,\n * })\n * class AppComponent {\n * @ViewChild('triggerElement') triggerElementRef!: ElementRef;\n *\n * constructor(private connectedOverlayService: ConnectedOverlayService) {}\n *\n * showOverlay(): void {\n * const options: Partial<ConnectedOverlayOptions> = {\n * position: 'bottom-start',\n * showArrow: true,\n * content: 'Hello, world!',\n * };\n *\n * this.connectedOverlayService.createOverlay(this.triggerElementRef.nativeElement, options);\n * }\n * }\n * ```\n *\n * This service simplifies the process of creating dynamic, positionally aware overlays that enhance the interactivity\n * and visual appeal of Angular applications.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConnectedOverlayService {\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * Creates a connected overlay.\n * @param referenceElement - The reference element to which the overlay will be connected.\n * @param options - Optional configuration for the connected overlay.\n * @param renderingOptions - Optional rendering options for the connected overlay.\n * @returns {ConnectedOverlayRef} The created Connected Overlay reference instance.\n */\n public createOverlay(\n referenceElement: VirtualElement,\n options?: Partial<ConnectedOverlayOptions>,\n renderingOptions?: Partial<DynamicViewRenderingOptions>,\n ): ConnectedOverlayRef {\n const dynamicViewRef = this.dynamicViewService.createView(ConnectedOverlayComponent, {\n ...renderingOptions,\n context: { options: deepmerge(DefaultConnectedOverlayOptions, options) as ConnectedOverlayOptions, referenceElement },\n });\n\n return new ConnectedOverlayRef(dynamicViewRef);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["offset","withOffset"],"mappings":";;;;;;;;;;AAIA;;;;;;;;;AASG;AACI,eAAe,sBAAsB,CAC1C,gBAAgC,EAChC,cAA2B,EAC3B,cAA2B,EAC3B,YAAyB,EACzB,OAAgC,EAAA;IAEhC,MAAM,cAAc,GAAG,6BAA6B;AACpD,IAAA,MAAM,EAAE,QAAQ,UAAEA,QAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO;AACvI,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,WAAW,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nC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC5ClC;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-connected-overlay.mjs","sources":["../../../../libs/angular/cdk/connected-overlay/src/lib/helpers/compute-overlay-position.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-options.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-ref.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.html","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.service.ts","../../../../libs/angular/cdk/connected-overlay/src/odx-angular-cdk-connected-overlay.ts"],"sourcesContent":["import { ComputePositionReturn, VirtualElement, arrow, computePosition, flip, hide, shift, size, offset as withOffset } from '@floating-ui/dom';\nimport { applyStyles, getOppositeSide, getSide, px } from '@odx/angular/utils';\nimport { ConnectedOverlayOptions } from '../models';\n\n/**\n * Computes the position of an overlay element relative to a reference element.\n *\n * @param referenceElement - The reference element to position the overlay relative to.\n * @param overlayElement - The overlay element to be positioned.\n * @param contentElement - The content element within the overlay.\n * @param arrowElement - The arrow element within the overlay.\n * @param options - The options for positioning the overlay.\n * @returns A promise that resolves to the computed position of the overlay.\n */\nexport async function computeOverlayPosition(\n referenceElement: VirtualElement,\n overlayElement: HTMLElement,\n contentElement: HTMLElement,\n arrowElement: HTMLElement,\n options: ConnectedOverlayOptions,\n): Promise<ComputePositionReturn> {\n const variablePrefix = '--odx-cdk-connected-overlay';\n const { position, offset, outerPadding, matchReferenceWidth, enableFallback, fallbackAxisSideDirection, strategy, minHeight } = options;\n const arrowSize = options.showArrow ? arrowElement.offsetWidth : 0;\n const arrowMiddleware = options.showArrow ? [arrow({ element: arrowElement, padding: 8 })] : [];\n const flipMiddleWare = enableFallback ? [flip({ fallbackAxisSideDirection })] : [];\n contentElement.style?.setProperty?.(`${variablePrefix}-max-height`, null);\n contentElement.style?.setProperty?.(`${variablePrefix}-max-width`, null);\n return computePosition(referenceElement, overlayElement, {\n strategy,\n placement: position,\n middleware: [\n withOffset(Math.max(offset, arrowSize + offset)),\n shift({ padding: outerPadding }),\n ...flipMiddleWare,\n size({\n padding: outerPadding,\n apply: ({ availableHeight, availableWidth, rects }) => {\n contentElement.style.setProperty?.(`${variablePrefix}-min-height`, minHeight ? px(Math.min(availableHeight, minHeight)) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-min-width`, matchReferenceWidth ? px(rects.reference.width) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-max-height`, px(availableHeight));\n contentElement.style.setProperty?.(`${variablePrefix}-max-width`, px(matchReferenceWidth ? rects.reference.width : availableWidth));\n },\n }),\n ...arrowMiddleware,\n hide({ rootBoundary: 'viewport' }),\n ],\n }).then((result) => {\n overlayElement.style.setProperty?.(`${variablePrefix}-position-x`, px(result.x));\n overlayElement.style.setProperty?.(`${variablePrefix}-position-y`, px(result.y));\n if (options.hiddenClass) {\n overlayElement.classList.toggle(options.hiddenClass, !!result.middlewareData.hide?.referenceHidden);\n }\n if (options.showArrow) {\n const overlaySide = getSide(result.placement);\n const arrowSide = getOppositeSide(result.placement);\n applyStyles(arrowElement, {\n display: null,\n top: px(result.middlewareData.arrow?.y),\n left: px(result.middlewareData.arrow?.x),\n [arrowSide]: px(-arrowSize / 2),\n [overlaySide]: null,\n });\n } else {\n applyStyles(arrowElement, { display: 'none' });\n }\n\n return result;\n });\n}\n","import { Strategy } from '@floating-ui/dom';\nimport { DynamicContent } from '@odx/angular/cdk/dynamic-view';\nimport { Position } from '@odx/angular/utils';\n\nexport interface ConnectedOverlayOptions {\n content?: DynamicContent | null;\n context?: Record<string, unknown>;\n containerClass?: string | null;\n hiddenClass: string | null;\n enableFallback: boolean;\n fallbackAxisSideDirection: 'start' | 'end';\n matchReferenceWidth: boolean;\n minHeight?: number | null;\n offset: number;\n outerPadding: number;\n position: Position;\n strategy: Strategy;\n showArrow?: boolean;\n updateOnAnimationFrame?: boolean;\n nonInteractive?: boolean;\n hooks?: {\n beforeOpen?: () => void;\n afterOpen?: () => void;\n beforeClose?: () => void;\n afterClose?: () => void;\n };\n}\n\nexport const DefaultConnectedOverlayOptions: ConnectedOverlayOptions = {\n hiddenClass: 'is-hidden',\n enableFallback: false,\n fallbackAxisSideDirection: 'start',\n matchReferenceWidth: false,\n offset: 8,\n outerPadding: 12,\n position: Position.BOTTOM,\n strategy: 'fixed',\n};\n","import { DynamicViewRef } from '@odx/angular/cdk/dynamic-view';\nimport { waitForAnimations } from '@odx/angular/utils';\nimport { EMPTY, Observable } from 'rxjs';\nimport { ConnectedOverlayComponent } from '../connected-overlay.component';\nimport { ConnectedOverlayOptions } from './connected-overlay-options';\n\n/**\n * A reference to a connected overlay created by the `ConnectedOverlayService`. This class provides methods to interact\n * with the overlay, such as updating its options or closing it. It encapsulates the `DynamicViewRef` for the overlay's instance,\n * allowing for direct manipulation of the overlay's state and behavior.\n *\n * This example demonstrates how to use a `ConnectedOverlayRef` to update and close a connected overlay in response\n * to user interactions.\n *\n * @example\n * ```ts\n * class MyComponent {\n * private overlayRef?: ConnectedOverlayRef;\n *\n * constructor(private overlayService: ConnectedOverlayService) {}\n *\n * openOverlay() {\n * this.overlayRef = this.overlayService.createOverlay(this.someElementRef.nativeElement, { position: 'bottom' });\n * }\n *\n * updateOverlayPosition() {\n * if (this.overlayRef) {\n * this.overlayRef.update({ position: 'top' });\n * }\n * }\n *\n * closeOverlay() {\n * this.overlayRef?.close();\n * }\n * }\n * ```\n *\n * In this example, `MyComponent` uses the `ConnectedOverlayService` to create an overlay. It stores a reference to\n * the created overlay in `overlayRef`, allowing it to update the overlay's position or close it when necessary.\n */\nexport class ConnectedOverlayRef {\n public readonly element = this.dynamicViewRef.getElement();\n\n /**\n * An Observable that emits when the overlay is closed.\n *\n * @emits {void} - Emits when the overlay is closed.\n *\n */\n public readonly onClose$: Observable<void> = this.dynamicViewRef.getContext().closed ?? EMPTY;\n\n constructor(private readonly dynamicViewRef: DynamicViewRef<typeof ConnectedOverlayComponent>) {}\n\n /**\n * Updates the connected overlay with new options.\n *\n * @param options {Partial<ConnectedOverlayOptions>} - The new options to be applied to the connected overlay.\n */\n public update(options: Partial<ConnectedOverlayOptions>): void {\n this.dynamicViewRef.update({ options: options as ConnectedOverlayOptions });\n }\n\n /**\n * Closes the connected overlay.\n *\n * @returns {void}\n */\n public async close(force = false) {\n const hiddenClass = force ? 'force-hidden' : this.dynamicViewRef.getContext().options?.hiddenClass || 'is-hidden';\n this.element?.classList.add(hiddenClass);\n await waitForAnimations(this.element);\n this.dynamicViewRef.destroy();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { VirtualElement, autoUpdate } from '@floating-ui/dom';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgChanges, Side, deferFn, getSide, hasChanged, injectElement, isPresent } from '@odx/angular/utils';\nimport { Subject } from 'rxjs';\nimport { computeOverlayPosition } from './helpers';\nimport { ConnectedOverlayOptions, DefaultConnectedOverlayOptions } from './models';\n\n@CSSComponent('cdk-connected-overlay')\n@Component({\n standalone: true,\n selector: 'odx-connected-overlay[popover=\"manual\"]',\n imports: [CoreModule, DynamicViewDirective],\n templateUrl: 'connected-overlay.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConnectedOverlayComponent implements OnInit, OnChanges, OnDestroy {\n private readonly zone = inject(NgZone);\n private positionUpdater: (() => void) | null = null;\n\n protected readonly injector = inject(Injector);\n protected overlaySide?: Side;\n\n @ViewChild('content', { static: true })\n protected contentElement!: ElementRef<HTMLElement>;\n\n @ViewChild('arrow', { static: true })\n protected arrowElement!: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @Input()\n public referenceElement!: VirtualElement;\n\n @Input()\n public options: ConnectedOverlayOptions = DefaultConnectedOverlayOptions;\n\n @Output()\n public closed = new Subject<void>();\n\n public ngOnInit(): void {\n this.options.hooks?.beforeOpen?.();\n deferFn(() => {\n this.element.nativeElement?.isConnected && this.element.nativeElement?.showPopover?.();\n this.options.hooks?.afterOpen?.();\n });\n }\n\n public ngOnChanges(changes: NgChanges<ConnectedOverlayComponent>): void {\n if (hasChanged(changes, ['options'], false)) {\n this.overlaySide = getSide(this.options.position);\n this.element.nativeElement.classList.toggle('odx-cdk-connected-overlay--non-interactive', this.options.nonInteractive ?? false);\n }\n if (hasChanged(changes, ['referenceElement', 'options'], false)) {\n this.stopPositionUpdater();\n this.startPositionUpdater();\n }\n }\n\n public ngOnDestroy(): void {\n this.options.hooks?.beforeClose?.();\n this.stopPositionUpdater();\n this.element.nativeElement?.hidePopover?.();\n this.closed.next();\n this.options.hooks?.afterClose?.();\n }\n\n private startPositionUpdater(): void {\n this.positionUpdater = this.zone.runOutsideAngular(() =>\n autoUpdate(this.referenceElement, this.element.nativeElement, () => this.updatePosition(), {\n elementResize: isPresent(window.ResizeObserver),\n animationFrame: this.options.updateOnAnimationFrame,\n }),\n );\n }\n\n private stopPositionUpdater(): void {\n this.positionUpdater?.();\n this.positionUpdater = null;\n }\n\n private async updatePosition(): Promise<void> {\n return computeOverlayPosition(\n this.referenceElement,\n this.element.nativeElement,\n this.contentElement.nativeElement,\n this.arrowElement.nativeElement,\n this.options,\n ).then(({ placement }) => {\n this.overlaySide = getSide(placement);\n });\n }\n}\n","<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\" />\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { VirtualElement } from '@floating-ui/dom';\nimport { DynamicViewRenderingOptions, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { ConnectedOverlayComponent } from './connected-overlay.component';\nimport { ConnectedOverlayOptions, ConnectedOverlayRef, DefaultConnectedOverlayOptions } from './models';\n\n/**\n * Service for creating and managing connected overlays. These overlays are UI elements such as popovers, tooltips,\n * or dropdown menus that are positioned relative to a reference element in the DOM. This service leverages the `DynamicViewService`\n * for dynamic component rendering and provides a streamlined API for creating overlays with custom positioning and options.\n *\n * Use the `ConnectedOverlayService` to dynamically create an overlay next to a specific element in your Angular application.\n * This example demonstrates creating a connected overlay next to a button element when the button is clicked.\n *\n * @example\n * ```ts\n * import { Component, ElementRef, ViewChild } from '@angular/core';\n * import { ConnectedOverlayService, ConnectedOverlayOptions } from '@odx/angular/cdk/connected-overlay';\n *\n * @Component({\n * selector: 'app-example',\n * template: `<button #triggerElement>Click me</button>`,\n * })\n * class AppComponent {\n * @ViewChild('triggerElement') triggerElementRef!: ElementRef;\n *\n * constructor(private connectedOverlayService: ConnectedOverlayService) {}\n *\n * showOverlay(): void {\n * const options: Partial<ConnectedOverlayOptions> = {\n * position: 'bottom-start',\n * showArrow: true,\n * content: 'Hello, world!',\n * };\n *\n * this.connectedOverlayService.createOverlay(this.triggerElementRef.nativeElement, options);\n * }\n * }\n * ```\n *\n * This service simplifies the process of creating dynamic, positionally aware overlays that enhance the interactivity\n * and visual appeal of Angular applications.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConnectedOverlayService {\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * Creates a connected overlay.\n * @param referenceElement - The reference element to which the overlay will be connected.\n * @param options - Optional configuration for the connected overlay.\n * @param renderingOptions - Optional rendering options for the connected overlay.\n * @returns {ConnectedOverlayRef} The created Connected Overlay reference instance.\n */\n public createOverlay(\n referenceElement: VirtualElement,\n options?: Partial<ConnectedOverlayOptions>,\n renderingOptions?: Partial<DynamicViewRenderingOptions>,\n ): ConnectedOverlayRef {\n const dynamicViewRef = this.dynamicViewService.createView(ConnectedOverlayComponent, {\n ...renderingOptions,\n context: { options: deepmerge(DefaultConnectedOverlayOptions, options) as ConnectedOverlayOptions, referenceElement },\n });\n\n return new ConnectedOverlayRef(dynamicViewRef);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["offset","withOffset"],"mappings":";;;;;;;;;;AAIA;;;;;;;;;AASG;AACI,eAAe,sBAAsB,CAC1C,gBAAgC,EAChC,cAA2B,EAC3B,cAA2B,EAC3B,YAAyB,EACzB,OAAgC,EAAA;IAEhC,MAAM,cAAc,GAAG,6BAA6B;AACpD,IAAA,MAAM,EAAE,QAAQ,UAAEA,QAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO;AACvI,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,WAAW,GAAG,CAAC;IAClE,MAAM,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE;AAC/F,IAAA,MAAM,cAAc,GAAG,cAAc,GAAG,CAAC,IAAI,CAAC,EAAE,yBAAyB,EAAE,CAAC,CAAC,GAAG,EAAE;AAClF,IAAA,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,CAAA,EAAG,cAAc,CAAA,WAAA,CAAa,EAAE,IAAI,CAAC;AACzE,IAAA,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,CAAA,EAAG,cAAc,CAAA,UAAA,CAAY,EAAE,IAAI,CAAC;AACxE,IAAA,OAAO,eAAe,CAAC,gBAAgB,EAAE,cAAc,EAAE;QACvD,QAAQ;AACR,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,UAAU,EAAE;YACVC,MAAU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U,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAqBjE,IAAA;AAnBC;;;;;;AAMG;AACI,IAAA,aAAa,CAClB,gBAAgC,EAChC,OAA0C,EAC1C,gBAAuD,EAAA;QAEvD,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,yBAAyB,EAAE;AACnF,YAAA,GAAG,gBAAgB;AACnB,YAAA,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,8BAA8B,EAAE,OAAO,CAA4B,EAAE,gBAAgB,EAAE;AACtH,SAAA,CAAC;AAEF,QAAA,OAAO,IAAI,mBAAmB,CAAC,cAAc,CAAC;IAChD;+GArBW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC5ClC;;AAEG;;;;"}
@@ -248,7 +248,9 @@ let DatepickerComponent = class DatepickerComponent extends CustomFormControl {
248
248
  if (!this.dateField)
249
249
  return;
250
250
  const dateFormat = getDateInputFormat(this.config);
251
- this.dateField.nativeElementValue = date ? format(date, dateFormat) : '';
251
+ const value = date ? format(date, dateFormat) : '';
252
+ this.dateField.ngxMaskDirective.writeValue(value);
253
+ this.dateField.nativeElementValue = value;
252
254
  }
253
255
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
254
256
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DatepickerComponent, isStandalone: true, selector: "odx-datepicker", inputs: { filterFn: { classPropertyName: "filterFn", publicName: "filterFn", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, dropdownPosition: { classPropertyName: "dropdownPosition", publicName: "dropdownPosition", isSignal: false, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "keydown.alt.ArrowDown": "openDatepicker($event)" } }, queries: [{ propertyName: "dateField", first: true, predicate: DatepickerInputControlDirective, descendants: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownDirective, descendants: true }, { propertyName: "dropdownTriggerElement", first: true, predicate: ["dropdownTrigger"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"input[odxDatepickerControl]\" />\n\n<odx-action-group class=\"odx-datepicker__trigger-wrapper\">\n @if (clearable() && value) {\n <button odxButton class=\"odx-datepicker__clear\" (click)=\"reset()\" size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"core::close\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-datepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"core::calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value || today\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedDateChange)=\"selectDate($event)\"\n />\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: CalendarComponent, selector: "odx-calendar", inputs: ["selectedDate", "selectedDateRange", "minDate", "maxDate", "filterFn"], outputs: ["selectedDateChange", "selectedDateRangeChange"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i2$1.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["size", "name", "set", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-datepicker.mjs","sources":["../../../../libs/angular/components/datepicker/src/lib/directives/datepicker-input-control.directive.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.html","../../../../libs/angular/components/datepicker/src/lib/validators/filter.validator.ts","../../../../libs/angular/components/datepicker/src/lib/validators/minmax.validator.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.module.ts","../../../../libs/angular/components/datepicker/src/odx-angular-components-datepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * A directive to enhance an input element as part of a datepicker control. It applies date input formatting,\n * mask handling, and emits focus events. This directive integrates with ngx-mask to handle input masking and\n * ensures that the input complies with the date format specified in the datepicker configuration.\n * Extends the `InputControlDirective` to provide input control functionality.\n * Has host directive `WithTabIndex` to manage the tabindex attribute of the input element.\n *\n * @see {InputControlDirective}\n * @see {WithTabIndex}\n */\n@CSSComponent('datepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDatepickerControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DatepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input field receives focus or loses focus, indicating the focus state.\n *\n * @emits {boolean} - Indicates whether the input field is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Gets the current value of the input field as a `Date` object, based on the date format from the datepicker\n * configuration.\n *\n * @returns {Date | null} - The current value of the input field as a `Date` object, or `null` if the value is invalid.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Computes the placeholder text for the input based on the date format from\n * the datepicker configuration.\n *\n * @returns {string} - The placeholder text, typically the date format in uppercase.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, DateFilter } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { distinctUntilChanged } from 'rxjs';\nimport { DatepickerInputControlDirective } from './directives';\n\n/**\n * Represents a datepicker component for selecting a date.\n * Extends the `CustomFormControl` class and implements the `AfterViewInit` interface.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('datepicker')\n@Component({\n selector: 'odx-datepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DatepickerComponent extends CustomFormControl<Date | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Gets a value indicating whether the datepicker is currently open.\n *\n * @returns {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents the current date.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * The filter function used to determine if a date should be included or excluded in the datepicker.\n * If set to `null`, no filtering will be applied.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Excludes mondays from the datepicker.\n * const filterFn: DateFilter = (date) => date.getDay() !== 1;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The minimum selectable date for the datepicker.\n * If set to null, there is no minimum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The maximum selectable date for the datepicker.\n * If set to null, there is no maximum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * The position of the dropdown relative to the input field.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date when it changes.\n *\n * @emits {Date}\n */\n @Output()\n public selectedChange = new EventEmitter<Date>();\n\n /**\n * The dropdown directive used in the datepicker component.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * The dropdown trigger element used in the datepicker component.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * The date field input control directive used in the datepicker component.\n *\n * @type {DatepickerInputControlDirective | undefined}\n */\n @ContentChild(DatepickerInputControlDirective)\n public dateField?: DatepickerInputControlDirective;\n\n constructor() {\n super(null);\n detectControllerChanges(this).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n\n deferFn(() => {\n if (!this.value) return;\n this.updateDateField(startOfDay(this.value));\n });\n }\n\n /**\n * Selects a date.\n *\n * @param {Date | null} value - The date value to be selected.\n */\n public selectDate(value: Date | null): void {\n if (!value) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n\n this.dropdown.close();\n }\n\n /**\n * Resets the datepicker's value to null.\n */\n public reset(): void {\n this.updateInternalValue(null);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {Date | null} value - The new value.\n */\n public override writeValue(value: Date | null): void {\n super.writeValue(value);\n this.updateDateField(value);\n }\n\n /**\n * Opens the datepicker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDatepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected updateInternalValue(value: Date | null): void {\n this.updateValue(value);\n this.updateDateField(value);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.dateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.dateField?.valueChange$.pipe(distinctUntilChanged(), this.takeUntilDestroyed()).subscribe(() => {\n if (!this.dateField?.valueAsDate) return;\n this.updateValue(this.dateField?.valueAsDate);\n });\n }\n\n protected handleDateFieldFocus(): void {\n this.dateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateDateField(date: Date | null): void {\n if (!this.dateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n this.dateField.nativeElementValue = date ? format(date, dateFormat) : '';\n }\n}\n","<ng-content select=\"input[odxDatepickerControl]\" />\n\n<odx-action-group class=\"odx-datepicker__trigger-wrapper\">\n @if (clearable() && value) {\n <button odxButton class=\"odx-datepicker__clear\" (click)=\"reset()\" size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"core::close\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-datepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"core::calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value || today\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedDateChange)=\"selectDate($event)\"\n />\n</ng-template>\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { DateFilter } from '@odx/angular/components/calendar';\n/**\n * A validation directive to be used with date picker controls that have filtering capabilities.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[filterFn]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerFilterValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerFilterValidator implements Validator {\n private onChange?: () => void;\n public filterFn = input<DateFilter | null>(null);\n\n constructor() {\n effect(() => {\n this.filterFn();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n const filterFn = this.filterFn();\n\n if (!controlValue || !filterFn) {\n return null;\n }\n\n return filterFn(controlValue) ? { filter: true } : null;\n }\n}\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { isAfter, isBefore, startOfDay } from 'date-fns';\n\n/**\n * A validation directive to be used with date picker controls that have minimum and maximum date constraints.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[minDate], odx-datepicker[maxDate]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerMinMaxValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerMinMaxValidator implements Validator {\n private onChange?: () => void;\n public minDate = input<Date | null>(null);\n public maxDate = input<Date | null>(null);\n\n constructor() {\n effect(() => {\n this.minDate();\n this.maxDate();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n if (!controlValue) {\n return null;\n }\n const givenDate = startOfDay(controlValue);\n const min = this.minDate() ? startOfDay(this.minDate() as Date) : null;\n const max = this.maxDate() ? startOfDay(this.maxDate() as Date) : null;\n if (min && isBefore(givenDate, min)) {\n return { minDate: true };\n }\n if (max && isAfter(givenDate, max)) {\n return { maxDate: true };\n }\n return null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DatepickerComponent } from './datepicker.component';\nimport { DatepickerInputControlDirective } from './directives';\nimport { DatepickerFilterValidator } from './validators/filter.validator';\nimport { DatepickerMinMaxValidator } from './validators/minmax.validator';\n\nconst modules = [DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":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EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kDAAkD;AAC5D,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC;AACxD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;ACVD,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,yBAAyB,CAAC;MAM/G,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANZ,mBAAmB,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAI/G,UAAU,EAJL,mBAAmB,EAAE,+BAA+B,EAAE,yBAAyB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA;gHAM9G,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAIxB,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-datepicker.mjs","sources":["../../../../libs/angular/components/datepicker/src/lib/directives/datepicker-input-control.directive.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.html","../../../../libs/angular/components/datepicker/src/lib/validators/filter.validator.ts","../../../../libs/angular/components/datepicker/src/lib/validators/minmax.validator.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.module.ts","../../../../libs/angular/components/datepicker/src/odx-angular-components-datepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * A directive to enhance an input element as part of a datepicker control. It applies date input formatting,\n * mask handling, and emits focus events. This directive integrates with ngx-mask to handle input masking and\n * ensures that the input complies with the date format specified in the datepicker configuration.\n * Extends the `InputControlDirective` to provide input control functionality.\n * Has host directive `WithTabIndex` to manage the tabindex attribute of the input element.\n *\n * @see {InputControlDirective}\n * @see {WithTabIndex}\n */\n@CSSComponent('datepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDatepickerControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DatepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input field receives focus or loses focus, indicating the focus state.\n *\n * @emits {boolean} - Indicates whether the input field is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Gets the current value of the input field as a `Date` object, based on the date format from the datepicker\n * configuration.\n *\n * @returns {Date | null} - The current value of the input field as a `Date` object, or `null` if the value is invalid.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Computes the placeholder text for the input based on the date format from\n * the datepicker configuration.\n *\n * @returns {string} - The placeholder text, typically the date format in uppercase.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, DateFilter } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { distinctUntilChanged } from 'rxjs';\nimport { DatepickerInputControlDirective } from './directives';\n\n/**\n * Represents a datepicker component for selecting a date.\n * Extends the `CustomFormControl` class and implements the `AfterViewInit` interface.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('datepicker')\n@Component({\n selector: 'odx-datepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class DatepickerComponent extends CustomFormControl<Date | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Gets a value indicating whether the datepicker is currently open.\n *\n * @returns {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents the current date.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * The filter function used to determine if a date should be included or excluded in the datepicker.\n * If set to `null`, no filtering will be applied.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Excludes mondays from the datepicker.\n * const filterFn: DateFilter = (date) => date.getDay() !== 1;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The minimum selectable date for the datepicker.\n * If set to null, there is no minimum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The maximum selectable date for the datepicker.\n * If set to null, there is no maximum date restriction.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * The position of the dropdown relative to the input field.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date when it changes.\n *\n * @emits {Date}\n */\n @Output()\n public selectedChange = new EventEmitter<Date>();\n\n /**\n * The dropdown directive used in the datepicker component.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * The dropdown trigger element used in the datepicker component.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * The date field input control directive used in the datepicker component.\n *\n * @type {DatepickerInputControlDirective | undefined}\n */\n @ContentChild(DatepickerInputControlDirective)\n public dateField?: DatepickerInputControlDirective;\n\n constructor() {\n super(null);\n detectControllerChanges(this).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n\n deferFn(() => {\n if (!this.value) return;\n this.updateDateField(startOfDay(this.value));\n });\n }\n\n /**\n * Selects a date.\n *\n * @param {Date | null} value - The date value to be selected.\n */\n public selectDate(value: Date | null): void {\n if (!value) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n\n this.dropdown.close();\n }\n\n /**\n * Resets the datepicker's value to null.\n */\n public reset(): void {\n this.updateInternalValue(null);\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {Date | null} value - The new value.\n */\n public override writeValue(value: Date | null): void {\n super.writeValue(value);\n this.updateDateField(value);\n }\n\n /**\n * Opens the datepicker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDatepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected updateInternalValue(value: Date | null): void {\n this.updateValue(value);\n this.updateDateField(value);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.dateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.dateField?.valueChange$.pipe(distinctUntilChanged(), this.takeUntilDestroyed()).subscribe(() => {\n if (!this.dateField?.valueAsDate) return;\n this.updateValue(this.dateField?.valueAsDate);\n });\n }\n\n protected handleDateFieldFocus(): void {\n this.dateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateDateField(date: Date | null): void {\n if (!this.dateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n const value = date ? format(date, dateFormat) : '';\n this.dateField.ngxMaskDirective.writeValue(value);\n this.dateField.nativeElementValue = value;\n }\n}\n","<ng-content select=\"input[odxDatepickerControl]\" />\n\n<odx-action-group class=\"odx-datepicker__trigger-wrapper\">\n @if (clearable() && value) {\n <button odxButton class=\"odx-datepicker__clear\" (click)=\"reset()\" size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"core::close\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-datepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"core::calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value || today\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedDateChange)=\"selectDate($event)\"\n />\n</ng-template>\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { DateFilter } from '@odx/angular/components/calendar';\n/**\n * A validation directive to be used with date picker controls that have filtering capabilities.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[filterFn]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerFilterValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerFilterValidator implements Validator {\n private onChange?: () => void;\n public filterFn = input<DateFilter | null>(null);\n\n constructor() {\n effect(() => {\n this.filterFn();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n const filterFn = this.filterFn();\n\n if (!controlValue || !filterFn) {\n return null;\n }\n\n return filterFn(controlValue) ? { filter: true } : null;\n }\n}\n","import { Directive, effect, forwardRef, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { isAfter, isBefore, startOfDay } from 'date-fns';\n\n/**\n * A validation directive to be used with date picker controls that have minimum and maximum date constraints.\n */\n@Directive({\n standalone: true,\n selector: 'odx-datepicker[minDate], odx-datepicker[maxDate]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DatepickerMinMaxValidator),\n multi: true,\n },\n ],\n})\nexport class DatepickerMinMaxValidator implements Validator {\n private onChange?: () => void;\n public minDate = input<Date | null>(null);\n public maxDate = input<Date | null>(null);\n\n constructor() {\n effect(() => {\n this.minDate();\n this.maxDate();\n this.onChange?.();\n });\n }\n\n public registerOnValidatorChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public validate(control: AbstractControl): ValidationErrors | null {\n const controlValue = control.value as Date | null;\n if (!controlValue) {\n return null;\n }\n const givenDate = startOfDay(controlValue);\n const min = this.minDate() ? startOfDay(this.minDate() as Date) : null;\n const max = this.maxDate() ? startOfDay(this.maxDate() as Date) : null;\n if (min && isBefore(givenDate, min)) {\n return { minDate: true };\n }\n if (max && isAfter(givenDate, max)) {\n return { maxDate: true };\n }\n return null;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DatepickerComponent } from './datepicker.component';\nimport { DatepickerInputControlDirective } from './directives';\nimport { DatepickerFilterValidator } from './validators/filter.validator';\nimport { DatepickerMinMaxValidator } from './validators/minmax.validator';\n\nconst modules = [DatepickerComponent, DatepickerInputControlDirective, DatepickerMinMaxValidator, DatepickerFilterValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;AASG;AAYI,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,qBAAqB,CAAA;AAAnE,IAAA,WAAA,GAAA;;AACc,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;QAChD,IAAA,CAAA,MAAM,GAAG,gBAAgB,EAAE;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3D;;;;AAIG;AAEI,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAW;AA+B7C,IAAA;AA7BC;;;;;AAKG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,uBAAuB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC;IACtE;AAEA;;;;;AAKG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE;IACtD;IAGU,aAAa,GAAA;AACrB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB;IAGU,cAAc,GAAA;AACtB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B;+GAzCW,+BAA+B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,+BAA+B,8SAH/B,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC,EAAE,UAA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;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -281,15 +281,19 @@ let DaterangepickerComponent = class DaterangepickerComponent extends CustomForm
281
281
  if (!this.startDateField)
282
282
  return;
283
283
  const dateFormat = getDateInputFormat(this.config);
284
- this.startDateField.nativeElementValue = date ? format(date, dateFormat) : '';
285
- this.updateWidth(this.startDateField, this.startDateMirror, date ? format(date, dateFormat) : '');
284
+ const value = date ? format(date, dateFormat) : '';
285
+ this.startDateField.ngxMaskDirective.writeValue(value);
286
+ this.startDateField.nativeElementValue = value;
287
+ this.updateWidth(this.startDateField, this.startDateMirror, value);
286
288
  }
287
289
  updateEndDateField(date) {
288
290
  if (!this.endDateField)
289
291
  return;
290
292
  const dateFormat = getDateInputFormat(this.config);
291
- this.endDateField.nativeElementValue = date ? format(date, dateFormat) : '';
292
- this.updateWidth(this.endDateField, this.endDateMirror, date ? format(date, dateFormat) : '');
293
+ const value = date ? format(date, dateFormat) : '';
294
+ this.endDateField.ngxMaskDirective.writeValue(value);
295
+ this.endDateField.nativeElementValue = value;
296
+ this.updateWidth(this.endDateField, this.endDateMirror, value);
293
297
  }
294
298
  updateInputFields() {
295
299
  deferFn(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-daterangepicker.mjs","sources":["../../../../libs/angular/components/daterangepicker/src/lib/directives/daterangepicker-input-control.directive.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.html","../../../../libs/angular/components/daterangepicker/src/lib/range.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/required.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.module.ts","../../../../libs/angular/components/daterangepicker/src/odx-angular-components-daterangepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * Enhances an input element to support date range picking, applying an input mask for date formatting\n * and managing focus events. This directive is typically used within a date range picker to provide\n * consistent and configurable input behavior. Extends the `InputControlDirective` to provide form control.\n * Has host directive `WithTabIndex` to manage the tab index attribute of the input element.\n *\n * @see {InputControlDirective}\n */\n@CSSComponent('daterangepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDaterangepickerControl],input[odxDaterangepickerStartDateControl], input[odxDaterangepickerEndDateControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DaterangepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input gains or loses focus, facilitating external event handling.\n *\n * @emits {boolean} - Indicates whether the input is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Converts the current input value to a Date object based on the configuration's date format.\n *\n * @returns {Date | null} The parsed date object or null if the input does not represent a valid date.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Provides the placeholder text for the input, typically the date format in uppercase.\n *\n * @returns {string} The placeholder text for the input.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, CalendarSelectionMode, DateFilter, DateRange, provideCalendarConfig } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { DaterangepickerInputControlDirective } from './directives';\n\n/**\n * A component for selecting a date range, integrated with dropdowns and input fields for start and end dates.\n * It supports custom configurations for minimum, maximum dates, and date filters. The component also handles\n * the dropdown's behavior for date selection and applies date formats automatically based on configuration.\n * The component extends the `CustomFormControl` class to provide form control functionality.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('daterangepicker')\n@Component({\n selector: 'odx-daterangepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './daterangepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n provideCalendarConfig({\n selectionMode: CalendarSelectionMode.DateRange,\n }),\n ],\n})\nexport class DaterangepickerComponent extends CustomFormControl<DateRange | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the dropdown part of the date range picker is open.\n *\n * @type {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents today's date, used for default selections and validations.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * A function that defines additional rules for disabled dates within the picker.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Disables all Wednesdays in the picker.\n * const filterFn: DateFilter = (date: Date) => date.getDay() !== 3;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The earliest date that can be selected in the picker.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The latest date that can be selected in the picker.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * Position of the dropdown relative to the input fields.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date range when it changes.\n *\n * @emits {DateRange}\n */\n @Output()\n public selectedChange = new EventEmitter<DateRange>();\n\n /**\n * Directive managing the dropdown functionality.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * Reference to the element triggering the dropdown.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * Query list of the input controls within the date range picker.\n *\n * @type {QueryList<DaterangepickerInputControlDirective>}\n */\n @ContentChildren(DaterangepickerInputControlDirective)\n public dateFields!: QueryList<DaterangepickerInputControlDirective>;\n\n /**\n * Reference to the element mirroring the start date input field.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('startDateMirror', { read: ElementRef, static: true })\n public startDateMirror!: ElementRef<HTMLElement>;\n\n /**\n * Reference to the element mirroring the end date input field.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('endDateMirror', { read: ElementRef, static: true })\n public endDateMirror!: ElementRef<HTMLElement>;\n\n /**\n * The input control for the start date.\n *\n * @type {DaterangepickerInputControlDirective | undefined}\n */\n public get startDateField(): DaterangepickerInputControlDirective | undefined {\n const [startDate, _endDate] = this.dateFields;\n return startDate;\n }\n\n /**\n * The input control for the end date.\n *\n * @type {DaterangepickerInputControlDirective | undefined}\n */\n public get endDateField(): DaterangepickerInputControlDirective | undefined {\n const [_startDate, endDate] = this.dateFields;\n return endDate;\n }\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.updateWidth(this.startDateField, this.startDateMirror);\n this.updateWidth(this.endDateField, this.endDateMirror);\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n this.updateInputFields();\n }\n\n /**\n * Selects a date range, updates the form value, and emits the selected range.\n *\n * @param {DateRange | null} value - The date range to select.\n */\n public selectDateRange(value: DateRange | null): void {\n if (!value || !value.start || !value.end) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n this.dropdown.close();\n }\n\n /**\n * Resets the daterangepicker's value to an empty date range (both start and end as null).\n */\n public reset(): void {\n this.updateInternalValue({ start: null, end: null });\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {DateRange | null} value - The new date range value.\n */\n public override writeValue(value: DateRange | null): void {\n super.writeValue(value);\n this.updateInputFields();\n }\n\n /**\n * Opens the date range picker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDaterangepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected isEmpty(value: DateRange | null): boolean {\n return !value || !value.start || !value.end;\n }\n\n protected updateInternalValue(value: DateRange): void {\n this.updateValue(value);\n this.updateStartDateField(value.start);\n this.updateEndDateField(value.end);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.startDateField?.ngxMaskDirective, getDateInputMask(this.config));\n initNgxMask(this.endDateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.startDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {\n this.updateWidth(this.startDateField, this.startDateMirror, value);\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n });\n this.endDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {\n this.updateWidth(this.endDateField, this.endDateMirror, value);\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n });\n }\n\n protected updateWidth(target: DaterangepickerInputControlDirective | undefined, source: ElementRef<HTMLElement>, value = ''): void {\n const compensationPx = 2;\n source.nativeElement.textContent = value || target?.placeholder || null;\n if (target) {\n deferFn(() => (target.element.nativeElement.style.width = `${source.nativeElement.offsetWidth + compensationPx}px`));\n }\n }\n\n protected handleDateFieldFocus(): void {\n this.startDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n this.endDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateStartDateField(date: Date | null): void {\n if (!this.startDateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n this.startDateField.nativeElementValue = date ? format(date, dateFormat) : '';\n this.updateWidth(this.startDateField, this.startDateMirror, date ? format(date, dateFormat) : '');\n }\n\n private updateEndDateField(date: Date | null): void {\n if (!this.endDateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n this.endDateField.nativeElementValue = date ? format(date, dateFormat) : '';\n this.updateWidth(this.endDateField, this.endDateMirror, date ? format(date, dateFormat) : '');\n }\n\n private updateInputFields(): void {\n deferFn(() => {\n if (this.value === null) return this.reset();\n if (!this.value || !this.value.start || !this.value.end) return;\n this.updateStartDateField(startOfDay(this.value.start));\n this.updateEndDateField(startOfDay(this.value.end));\n });\n }\n}\n","<span #startDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerStartDateControl]\" />\n<span role=\"none\" class=\"odx-daterangepicker__separator\">–</span>\n<span #endDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerEndDateControl]\" />\n\n<odx-action-group class=\"odx-daterangepicker__trigger-wrapper\">\n @if (clearable() && !isEmpty(value)) {\n <button class=\"odx-daterangepicker__clear\" (click)=\"reset()\" odxButton size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"core::close\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-daterangepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"core::calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"today\"\n [selectedDateRange]=\"value\"\n (selectedDateRangeChange)=\"selectDateRange($event)\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n />\n</ng-template>\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange, validateDaterange } from '@odx/angular/components/calendar';\n\n/**\n * A validation directive to be used with date range picker controls. This validator ensures that the date range\n * selected is valid, meaning the start date must occur on or before the end date. If the date range is invalid,\n * this validator will provide a validation error that can be used to display an appropriate message or to style\n * the form control.\n *\n * The validator is designed to be used with form controls that manage `DateRange` objects in Angular forms.\n */\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[formControlName], odx-daterangepicker[formControl], odx-daterangepicker[ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRangeValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRangeValidator {\n /**\n * Performs the validation check on the form control's value.\n *\n * @param {FormControl<DateRange | null>} control - The form control instance associated with the date range input.\n * @returns {ValidationErrors | null} An object expressing validation errors if the range is invalid,\n * or null if the range is valid. The object returned in case of a validation error is `{ invalidRange: true }`.\n */\n public validate({ value }: FormControl<DateRange | null>) {\n const valuesArePresent = value && value.start && value.end;\n\n const isValidRange = value && value.start && value.end && validateDaterange(value.start, value.end);\n\n return (\n valuesArePresent &&\n !isValidRange && {\n invalidRange: true,\n }\n );\n }\n}\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange } from '@odx/angular/components/calendar';\n\n/**\n * A validation directive to ensure that both start and end dates are provided for a date range picker.\n * This validator is essential for forms where the date range is a required field. It checks that both the\n * start and end date values exist in the date range object. If one or both dates are missing, it flags the\n * form control as having a validation error.\n */\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[required][formControlName], odx-daterangepicker[required][formControl], odx-daterangepicker[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRequiredValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRequiredValidator {\n /**\n * Validates the form control associated with the date range input.\n * Checks if both start and end dates are present. If either is missing, it returns a validation error.\n *\n * @param {FormControl<DateRange | null>} control - The form control instance that contains the date range value.\n * @returns {ValidationErrors | null} An object expressing validation errors if the range is incomplete,\n * or null if the range is fully specified. If validation fails, the object returned is `{ required: true }`.\n */\n public validate({ value }: FormControl<DateRange | null>) {\n const isValid = value && value.start && value.end;\n\n return (\n !isValid && {\n required: true,\n }\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DaterangepickerComponent } from './daterangepicker.component';\nimport { DaterangepickerInputControlDirective } from './directives';\nimport { DaterangepickerRangeValidator } from './range.validator';\nimport { DaterangepickerRequiredValidator } from './required.validator';\n\nconst modules = [DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DaterangepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;AAOG;AAYI,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,qBAAqB,CAAA;AAAxE,IAAA,WAAA,GAAA;;AACc,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;QAChD,IAAA,CAAA,MAAM,GAAG,gBAAgB,EAAE;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3D;;;;AAIG;AAEI,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAW;AA6B7C,IAAA;AA3BC;;;;AAIG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,uBAAuB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC;IACtE;AAEA;;;;AAIG;AACH,IAAA,IAAW,WAAW,GAAA;QACpB,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE;IACtD;IAGU,aAAa,GAAA;AACrB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;I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A,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-daterangepicker.mjs","sources":["../../../../libs/angular/components/daterangepicker/src/lib/directives/daterangepicker-input-control.directive.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.component.html","../../../../libs/angular/components/daterangepicker/src/lib/range.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/required.validator.ts","../../../../libs/angular/components/daterangepicker/src/lib/daterangepicker.module.ts","../../../../libs/angular/components/daterangepicker/src/odx-angular-components-daterangepicker.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputValueAsDate, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgxMaskDirective, provideNgxMask } from 'ngx-mask';\n\n/**\n * Enhances an input element to support date range picking, applying an input mask for date formatting\n * and managing focus events. This directive is typically used within a date range picker to provide\n * consistent and configurable input behavior. Extends the `InputControlDirective` to provide form control.\n * Has host directive `WithTabIndex` to manage the tab index attribute of the input element.\n *\n * @see {InputControlDirective}\n */\n@CSSComponent('daterangepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDaterangepickerControl],input[odxDaterangepickerStartDateControl], input[odxDaterangepickerEndDateControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask({ validation: false, leadZeroDateTime: true })],\n hostDirectives: [WithTabIndex, NgxMaskDirective],\n})\nexport class DaterangepickerInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly config = injectDateConfig();\n public readonly ngxMaskDirective = inject(NgxMaskDirective);\n\n /**\n * Emits an event when the input gains or loses focus, facilitating external event handling.\n *\n * @emits {boolean} - Indicates whether the input is focused.\n */\n @Output()\n public focused = new EventEmitter<boolean>();\n\n /**\n * Converts the current input value to a Date object based on the configuration's date format.\n *\n * @returns {Date | null} The parsed date object or null if the input does not represent a valid date.\n */\n public get valueAsDate(): Date | null {\n return getDateInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n /**\n * Provides the placeholder text for the input, typically the date format in uppercase.\n *\n * @returns {string} The placeholder text for the input.\n */\n public get placeholder(): string {\n return getDateInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focusin')\n protected handleFocusIn(): void {\n this.focused.emit(true);\n }\n\n @HostListener('focusout')\n protected handleFocusOut(): void {\n this.focused.emit(false);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostListener,\n input,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { getDateInputFormat, getDateInputMask, initNgxMask, injectDateConfig } from '@odx/angular/cdk/date-input';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, CalendarSelectionMode, DateFilter, DateRange, provideCalendarConfig } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, Position, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { DaterangepickerInputControlDirective } from './directives';\n\n/**\n * A component for selecting a date range, integrated with dropdowns and input fields for start and end dates.\n * It supports custom configurations for minimum, maximum dates, and date filters. The component also handles\n * the dropdown's behavior for date selection and applies date formats automatically based on configuration.\n * The component extends the `CustomFormControl` class to provide form control functionality.\n *\n * @see {CustomFormControl}\n */\n@CSSComponent('daterangepicker')\n@Component({\n selector: 'odx-daterangepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './daterangepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n provideCalendarConfig({\n selectionMode: CalendarSelectionMode.DateRange,\n }),\n ],\n})\nexport class DaterangepickerComponent extends CustomFormControl<DateRange | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly config = injectDateConfig();\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the dropdown part of the date range picker is open.\n *\n * @type {boolean}\n */\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n /**\n * Represents today's date, used for default selections and validations.\n *\n * @type {Date}\n */\n public today = new Date();\n\n /**\n * A function that defines additional rules for disabled dates within the picker.\n *\n * @type {DateFilter | null}\n * @default null\n *\n * @example\n * ```ts\n * // Disables all Wednesdays in the picker.\n * const filterFn: DateFilter = (date: Date) => date.getDay() !== 3;\n * ```\n */\n @Input()\n public filterFn: DateFilter | null = null;\n\n /**\n * The earliest date that can be selected in the picker.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public minDate: Date | null = null;\n\n /**\n * The latest date that can be selected in the picker.\n *\n * @type {Date | null}\n * @default null\n */\n @Input()\n public maxDate: Date | null = null;\n\n /**\n * Position of the dropdown relative to the input fields.\n *\n * @type {Position}\n * @default Position.BOTTOM\n */\n @Input()\n public dropdownPosition: Position = 'bottom';\n\n /**\n * When set to true, the select will display a reset button.\n *\n * @type {boolean}\n * @default false\n */\n public clearable = input(false, { transform: booleanAttribute });\n\n /**\n * Emits the selected date range when it changes.\n *\n * @emits {DateRange}\n */\n @Output()\n public selectedChange = new EventEmitter<DateRange>();\n\n /**\n * Directive managing the dropdown functionality.\n *\n * @type {DropdownDirective}\n */\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n /**\n * Reference to the element triggering the dropdown.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n /**\n * Query list of the input controls within the date range picker.\n *\n * @type {QueryList<DaterangepickerInputControlDirective>}\n */\n @ContentChildren(DaterangepickerInputControlDirective)\n public dateFields!: QueryList<DaterangepickerInputControlDirective>;\n\n /**\n * Reference to the element mirroring the start date input field.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('startDateMirror', { read: ElementRef, static: true })\n public startDateMirror!: ElementRef<HTMLElement>;\n\n /**\n * Reference to the element mirroring the end date input field.\n *\n * @type {ElementRef<HTMLElement>}\n */\n @ViewChild('endDateMirror', { read: ElementRef, static: true })\n public endDateMirror!: ElementRef<HTMLElement>;\n\n /**\n * The input control for the start date.\n *\n * @type {DaterangepickerInputControlDirective | undefined}\n */\n public get startDateField(): DaterangepickerInputControlDirective | undefined {\n const [startDate, _endDate] = this.dateFields;\n return startDate;\n }\n\n /**\n * The input control for the end date.\n *\n * @type {DaterangepickerInputControlDirective | undefined}\n */\n public get endDateField(): DaterangepickerInputControlDirective | undefined {\n const [_startDate, endDate] = this.dateFields;\n return endDate;\n }\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.updateWidth(this.startDateField, this.startDateMirror);\n this.updateWidth(this.endDateField, this.endDateMirror);\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n this.updateInputFields();\n }\n\n /**\n * Selects a date range, updates the form value, and emits the selected range.\n *\n * @param {DateRange | null} value - The date range to select.\n */\n public selectDateRange(value: DateRange | null): void {\n if (!value || !value.start || !value.end) return;\n\n this.updateInternalValue(value);\n\n this.selectedChange.emit(value);\n this.dropdown.close();\n }\n\n /**\n * Resets the daterangepicker's value to an empty date range (both start and end as null).\n */\n public reset(): void {\n this.updateInternalValue({ start: null, end: null });\n }\n\n /**\n * @internal\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n * @param {DateRange | null} value - The new date range value.\n */\n public override writeValue(value: DateRange | null): void {\n super.writeValue(value);\n this.updateInputFields();\n }\n\n /**\n * Opens the date range picker dropdown.\n *\n * @param {KeyboardEvent} event\n */\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n public openDaterangepicker(event?: KeyboardEvent) {\n event?.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n protected isEmpty(value: DateRange | null): boolean {\n return !value || !value.start || !value.end;\n }\n\n protected updateInternalValue(value: DateRange): void {\n this.updateValue(value);\n this.updateStartDateField(value.start);\n this.updateEndDateField(value.end);\n }\n\n protected handleDateFieldChanges(): void {\n initNgxMask(this.startDateField?.ngxMaskDirective, getDateInputMask(this.config));\n initNgxMask(this.endDateField?.ngxMaskDirective, getDateInputMask(this.config));\n this.startDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {\n this.updateWidth(this.startDateField, this.startDateMirror, value);\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n });\n this.endDateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe((value) => {\n this.updateWidth(this.endDateField, this.endDateMirror, value);\n this.updateValue({ start: this.startDateField?.valueAsDate ?? null, end: this.endDateField?.valueAsDate ?? null });\n });\n }\n\n protected updateWidth(target: DaterangepickerInputControlDirective | undefined, source: ElementRef<HTMLElement>, value = ''): void {\n const compensationPx = 2;\n source.nativeElement.textContent = value || target?.placeholder || null;\n if (target) {\n deferFn(() => (target.element.nativeElement.style.width = `${source.nativeElement.offsetWidth + compensationPx}px`));\n }\n }\n\n protected handleDateFieldFocus(): void {\n this.startDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n this.endDateField?.focused.pipe(this.takeUntilDestroyed()).subscribe((isFocused) => {\n if (!isFocused) {\n this.onTouched();\n }\n if (this.isOpen) {\n this.dropdown.close();\n }\n });\n }\n\n private updateStartDateField(date: Date | null): void {\n if (!this.startDateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n const value = date ? format(date, dateFormat) : '';\n this.startDateField.ngxMaskDirective.writeValue(value);\n this.startDateField.nativeElementValue = value;\n this.updateWidth(this.startDateField, this.startDateMirror, value);\n }\n\n private updateEndDateField(date: Date | null): void {\n if (!this.endDateField) return;\n\n const dateFormat = getDateInputFormat(this.config);\n const value = date ? format(date, dateFormat) : '';\n this.endDateField.ngxMaskDirective.writeValue(value);\n this.endDateField.nativeElementValue = value;\n this.updateWidth(this.endDateField, this.endDateMirror, value);\n }\n\n private updateInputFields(): void {\n deferFn(() => {\n if (this.value === null) return this.reset();\n if (!this.value || !this.value.start || !this.value.end) return;\n this.updateStartDateField(startOfDay(this.value.start));\n this.updateEndDateField(startOfDay(this.value.end));\n });\n }\n}\n","<span #startDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerStartDateControl]\" />\n<span role=\"none\" class=\"odx-daterangepicker__separator\">–</span>\n<span #endDateMirror role=\"none\" class=\"odx-daterangepicker__mirror\"></span>\n<ng-content select=\"input[odxDaterangepickerEndDateControl]\" />\n\n<odx-action-group class=\"odx-daterangepicker__trigger-wrapper\">\n @if (clearable() && !isEmpty(value)) {\n <button class=\"odx-daterangepicker__clear\" (click)=\"reset()\" odxButton size=\"small\" aria-label=\"Reset time\">\n <odx-icon name=\"core::close\" />\n </button>\n }\n <button\n #dropdownTrigger\n odxButton\n size=\"small\"\n variant=\"ghost\"\n class=\"odx-daterangepicker__trigger\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: dropdownPosition }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n (odxDropdownBeforeClose)=\"onTouched()\"\n >\n <odx-icon name=\"core::calendar\" />\n </button>\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"today\"\n [selectedDateRange]=\"value\"\n (selectedDateRangeChange)=\"selectDateRange($event)\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n />\n</ng-template>\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange, validateDaterange } from '@odx/angular/components/calendar';\n\n/**\n * A validation directive to be used with date range picker controls. This validator ensures that the date range\n * selected is valid, meaning the start date must occur on or before the end date. If the date range is invalid,\n * this validator will provide a validation error that can be used to display an appropriate message or to style\n * the form control.\n *\n * The validator is designed to be used with form controls that manage `DateRange` objects in Angular forms.\n */\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[formControlName], odx-daterangepicker[formControl], odx-daterangepicker[ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRangeValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRangeValidator {\n /**\n * Performs the validation check on the form control's value.\n *\n * @param {FormControl<DateRange | null>} control - The form control instance associated with the date range input.\n * @returns {ValidationErrors | null} An object expressing validation errors if the range is invalid,\n * or null if the range is valid. The object returned in case of a validation error is `{ invalidRange: true }`.\n */\n public validate({ value }: FormControl<DateRange | null>) {\n const valuesArePresent = value && value.start && value.end;\n\n const isValidRange = value && value.start && value.end && validateDaterange(value.start, value.end);\n\n return (\n valuesArePresent &&\n !isValidRange && {\n invalidRange: true,\n }\n );\n }\n}\n","import { Directive, forwardRef } from '@angular/core';\nimport { FormControl, NG_VALIDATORS } from '@angular/forms';\nimport { DateRange } from '@odx/angular/components/calendar';\n\n/**\n * A validation directive to ensure that both start and end dates are provided for a date range picker.\n * This validator is essential for forms where the date range is a required field. It checks that both the\n * start and end date values exist in the date range object. If one or both dates are missing, it flags the\n * form control as having a validation error.\n */\n@Directive({\n standalone: true,\n selector: 'odx-daterangepicker[required][formControlName], odx-daterangepicker[required][formControl], odx-daterangepicker[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DaterangepickerRequiredValidator),\n multi: true,\n },\n ],\n})\nexport class DaterangepickerRequiredValidator {\n /**\n * Validates the form control associated with the date range input.\n * Checks if both start and end dates are present. If either is missing, it returns a validation error.\n *\n * @param {FormControl<DateRange | null>} control - The form control instance that contains the date range value.\n * @returns {ValidationErrors | null} An object expressing validation errors if the range is incomplete,\n * or null if the range is fully specified. If validation fails, the object returned is `{ required: true }`.\n */\n public validate({ value }: FormControl<DateRange | null>) {\n const isValid = value && value.start && value.end;\n\n return (\n !isValid && {\n required: true,\n }\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DaterangepickerComponent } from './daterangepicker.component';\nimport { DaterangepickerInputControlDirective } from './directives';\nimport { DaterangepickerRangeValidator } from './range.validator';\nimport { DaterangepickerRequiredValidator } from './required.validator';\n\nconst modules = [DaterangepickerComponent, DaterangepickerInputControlDirective, DaterangepickerRangeValidator, DaterangepickerRequiredValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DaterangepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;AAOG;AAYI,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,qBAAqB,CAAA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iBAAA;;;ACbD,MAAM,OAAO,GAAG,CAAC,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAAC;MAMpI,qBAAqB,CAAA;+GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YANjB,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAAA,EAAA,OAAA,EAAA,CAIpI,UAAU,EAJL,wBAAwB,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,gCAAgC,CAAA,EAAA,CAAA,CAAA;gHAMnI,qBAAqB,EAAA,OAAA,EAAA,CANjB,wBAAwB,EAI7B,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/angular",
3
- "version": "13.1.1",
3
+ "version": "13.1.3",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {