@cute-widgets/base 20.0.2 → 20.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"cute-widgets-base-core.mjs","sources":["../../../../projects/cute-widgets/base/core/animation/src/animation.ts","../../../../projects/cute-widgets/base/core/layout/src/bs-breakpoints.ts","../../../../projects/cute-widgets/base/core/line/src/line.ts","../../../../projects/cute-widgets/base/core/line/src/line.module.ts","../../../../projects/cute-widgets/base/core/ripple/src/Ripple.ts","../../../../projects/cute-widgets/base/core/ripple/src/RippleManager.ts","../../../../projects/cute-widgets/base/core/ripple/src/ripple.directive.ts","../../../../projects/cute-widgets/base/core/interfaces/src/MenuItem.ts","../../../../projects/cute-widgets/base/core/interfaces/src/TreeNode.ts","../../../../projects/cute-widgets/base/core/types/src/MouseCursor.ts","../../../../projects/cute-widgets/base/core/types/src/RelativeSize.ts","../../../../projects/cute-widgets/base/core/utils/src/transition.ts","../../../../projects/cute-widgets/base/core/utils/src/token.ts","../../../../projects/cute-widgets/base/core/utils/src/export.ts","../../../../projects/cute-widgets/base/core/utils/src/IdGenerator.ts","../../../../projects/cute-widgets/base/core/utils/src/Scheduler.ts","../../../../projects/cute-widgets/base/core/datetime/src/date-adapter.ts","../../../../projects/cute-widgets/base/core/datetime/src/date-format.ts","../../../../projects/cute-widgets/base/core/datetime/src/native-date-adapter.ts","../../../../projects/cute-widgets/base/core/datetime/src/native-date-format.ts","../../../../projects/cute-widgets/base/core/datetime/src/datetime.module.ts","../../../../projects/cute-widgets/base/core/pipes/src/safe.pipe.ts","../../../../projects/cute-widgets/base/core/pipes/src/sanitize.pipe.ts","../../../../projects/cute-widgets/base/core/theming/src/ThemeColor.ts","../../../../projects/cute-widgets/base/core/theming/src/theme.service.ts","../../../../projects/cute-widgets/base/core/index.ts","../../../../projects/cute-widgets/base/core/cute-widgets-base-core.ts"],"sourcesContent":["import {MediaMatcher} from '@angular/cdk/layout';\r\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\r\n\r\n/** Object used to configure the animation in Angular Material. */\r\nexport interface AnimationsConfig {\r\n /** Whether all animations should be disabled. */\r\n animationsDisabled?: boolean;\r\n}\r\n\r\n/** Injection token used to configure the animations in CuteWidgets. */\r\nexport const CUTE_WIDGETS_ANIMATIONS = new InjectionToken<AnimationsConfig>('CUTE_WIDGETS_ANIMATIONS');\r\n\r\n/**\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n * @docs-private\r\n */\r\nexport class AnimationCurves {\r\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\r\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\r\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\r\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\r\n}\r\n\r\n/**\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n * @docs-private\r\n */\r\nexport class AnimationDurations {\r\n static COMPLEX = '375ms';\r\n static ENTERING = '225ms';\r\n static EXITING = '195ms';\r\n}\r\n\r\nlet reducedMotion: boolean | null = null;\r\n\r\n/**\r\n * Gets the configured animations state.\r\n * @docs-private\r\n */\r\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\r\n if (\r\n inject(CUTE_WIDGETS_ANIMATIONS, {optional: true})?.animationsDisabled ||\r\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\r\n ) {\r\n return 'di-disabled';\r\n }\r\n\r\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\r\n return reducedMotion ? 'reduced-motion' : 'enabled';\r\n}\r\n\r\n/**\r\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\r\n * @docs-private\r\n */\r\nexport function _animationsDisabled(): boolean {\r\n return _getAnimationsState() !== 'enabled';\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * Bootstrap media-queries, or `breakpoints`.\r\n * PascalCase is being used as Breakpoints is used like an enum.\r\n */\r\nexport const bsBreakpoints = {\r\n\r\n SmallAndDown: '(max-width: 575.98px)',\r\n MediumAndDown: '(max-width: 767.98px)',\r\n LargeAndDown: '(max-width: 991.98px)',\r\n XLargeAndDown: '(max-width: 1199.98px)',\r\n XXLargeAndDown: '(max-width: 1399.98px)',\r\n\r\n XSmall: '(max-width: 575.98px)',\r\n Small: '(min-width: 576px) and (max-width: 767.98px)',\r\n Medium: '(min-width: 768px) and (max-width: 991.98px)',\r\n Large: '(min-width: 992px) and (max-width: 1199.98px)',\r\n XLarge: '(min-width: 1200px) and (max-width: 1399.98px)',\r\n XXLarge: '(min-width: 1400px)',\r\n\r\n get grid(): {xs:number,sm:number,md:number,lg:number,xl:number,xxl:number} {\r\n return {xs:0, sm:576, md:768, lg: 992, xl: 1200, xxl: 1400};\r\n },\r\n\r\n get xs(): string {return this.XSmall},\r\n get sm(): string {return this.Small},\r\n get md(): string {return this.Medium},\r\n get lg(): string {return this.Large},\r\n get xl(): string {return this.XLarge},\r\n get xxl(): string {return this.XXLarge},\r\n\r\n /**\r\n * Gets the object's property name of the media-query by its value\r\n * @param query The media-query text\r\n * @returns The property name of the media-query or _undefined_ if it was not found\r\n */\r\n getQueryName(query: string): string | undefined {\r\n let res: string | undefined;\r\n if (query) {\r\n for (const key in this) {\r\n if ((this as any)[key] === query) {\r\n res = key;\r\n break;\r\n }\r\n }\r\n }\r\n return res;\r\n },\r\n /**\r\n * Gets the breakpoint label by Bootstrap's breakpoint abbreviation\r\n * @param code Bootstrap's breakpoint abbreviation\r\n * @returns More descriptive text of the abbreviation\r\n */\r\n getLabel(code: string): string {\r\n switch (code) {\r\n case \"xs\": return \"XSmall\";\r\n case \"sm\": return \"Small\";\r\n case \"md\": return \"Medium\";\r\n case \"lg\": return \"Large\";\r\n case \"xl\": return \"XLarge\";\r\n case \"xxl\": return \"XXLarge\";\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Directive, ElementRef, QueryList} from '@angular/core';\r\nimport {startWith} from 'rxjs/operators';\r\n\r\n/**\r\n * Shared directive to count lines inside a text area, such as a list item.\r\n * Line elements can be extracted with a @ContentChildren(CuteLine) query, then\r\n * counted by checking the query list's length.\r\n */\r\n@Directive({\r\n selector: '[cute-line], [cuteLine]',\r\n host: {'class': 'cute-line'},\r\n standalone: true,\r\n})\r\nexport class CuteLine {}\r\n\r\n/**\r\n * Helper that takes a query list of lines and sets the correct class on the host.\r\n */\r\nexport function setLines(\r\n lines: QueryList<unknown>,\r\n element: ElementRef<HTMLElement>,\r\n prefix = 'cute',\r\n) {\r\n // Note: doesn't need to unsubscribe, because `changes`\r\n // gets completed by Angular when the view is destroyed.\r\n lines.changes.pipe(startWith(lines)).subscribe(({length}) => {\r\n setClass(element, `${prefix}-2-line`, false);\r\n setClass(element, `${prefix}-3-line`, false);\r\n setClass(element, `${prefix}-multi-line`, false);\r\n\r\n if (length === 2 || length === 3) {\r\n setClass(element, `${prefix}-${length}-line`, true);\r\n } else if (length > 3) {\r\n setClass(element, `${prefix}-multi-line`, true);\r\n }\r\n });\r\n}\r\n\r\n/** Adds or removes a class from an element. */\r\nfunction setClass(element: ElementRef<HTMLElement>, className: string, isAdd: boolean): void {\r\n element.nativeElement.classList.toggle(className, isAdd);\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteLine} from \"./line\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteLine\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteLineModule {\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {computed, signal} from \"@angular/core\";\r\nimport {firstValueFrom, fromEvent} from \"rxjs\";\r\nimport {take} from \"rxjs/operators\";\r\n\r\nconst RIPPLE_CLASS_NAME = \"cute-ripple-element\";\r\n\r\nexport type RippleOptions = {centered?: boolean, color?: string|null, duration?: string|number};\r\n\r\nexport abstract class Ripple {\r\n private _active = signal<boolean>(false);\r\n private _disabled: boolean = false;\r\n private readonly _target: HTMLElement | undefined;\r\n\r\n protected constructor(target: HTMLElement) {\r\n this._target = target;\r\n }\r\n\r\n get disabled(): boolean {return this._disabled}\r\n set disabled(v: boolean) {this._disabled = v;}\r\n\r\n isActive = computed(() => this._active());\r\n\r\n stop(): void {\r\n if (this._target) {\r\n const existingRipple = this._target.getElementsByClassName(RIPPLE_CLASS_NAME)[0];\r\n if (existingRipple) {\r\n existingRipple.parentElement?.remove();\r\n }\r\n }\r\n this._active.set(false);\r\n }\r\n\r\n launch(event: MouseEvent, options?: RippleOptions): void {\r\n\r\n if (this.disabled) {\r\n return;\r\n }\r\n\r\n if (this.isActive()) {\r\n this.stop();\r\n }\r\n\r\n if (this._target && event) {\r\n const rect = this._target.getBoundingClientRect();\r\n\r\n const parent = document.createElement(\"div\");\r\n parent.style.position = \"absolute\";\r\n parent.style.top = \"0\";\r\n parent.style.right = \"0\";\r\n parent.style.bottom = \"0\";\r\n parent.style.left = \"0\";\r\n parent.style.overflow = \"hidden\";\r\n parent.style.borderRadius = \"inherit\";\r\n parent.style.transform = \"perspective(0)\";\r\n parent.ariaHidden = \"true\";\r\n parent.classList.add(\"cute-ripple\")\r\n\r\n const circle = document.createElement(\"span\");\r\n const diameter = Math.max(rect.width, rect.height);\r\n const radius = diameter/2;\r\n\r\n circle.style.width = circle.style.height = `${diameter}px`;\r\n if (options?.centered) {\r\n circle.style.left = `${rect.width / 2 - radius}px`;\r\n circle.style.top = `${rect.height / 2 - radius}px`;\r\n } else {\r\n circle.style.left = `${event.clientX - rect.left - radius}px`;\r\n circle.style.top = `${event.clientY - rect.top - radius}px`;\r\n }\r\n if (options?.color) {\r\n circle.style.setProperty(\"--cute-ripple-bg-color\", options.color);\r\n }\r\n if (options?.duration) {\r\n circle.style.setProperty(\"--cute-ripple-duration\", String(options.duration));\r\n }\r\n circle.classList.add(RIPPLE_CLASS_NAME);\r\n\r\n parent.appendChild(circle);\r\n this._target.appendChild(parent);\r\n\r\n this._active.set(true);\r\n\r\n Promise.any([\r\n firstValueFrom(fromEvent(circle, \"animationend\").pipe(take(1))),\r\n firstValueFrom(fromEvent(circle, \"animationcancel\").pipe(take(1))),\r\n //firstValueFrom(fromEvent(document, \"mouseup\").pipe(take(1))),\r\n ]).then(() => {\r\n circle.parentElement?.remove();\r\n this._active.set(false);\r\n })\r\n\r\n }\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Ripple} from \"./Ripple\";\r\n\r\nexport class RippleManager {\r\n private static readonly _ripples = new WeakMap<HTMLElement, Ripple>();\r\n\r\n\r\n static getInstance(target: HTMLElement): Ripple {\r\n return RippleManager.createRipple(target);\r\n }\r\n\r\n static createRipple(target: HTMLElement): Ripple {\r\n\r\n if (!target) {\r\n throw new Error(\"'target' is required when instantiating a Ripple object\")\r\n }\r\n let ripple = this._ripples.get(target);\r\n if (!ripple) {\r\n ripple = new RippleImpl(target);\r\n this._ripples.set(target, ripple);\r\n }\r\n return ripple;\r\n }\r\n\r\n static removeRipple(target: HTMLElement) {\r\n if (target) {\r\n let ripple = this._ripples.get(target);\r\n if (ripple) {\r\n ripple.stop();\r\n }\r\n this._ripples.delete(target);\r\n }\r\n }\r\n}\r\n\r\nclass RippleImpl extends Ripple {\r\n constructor(target: HTMLElement) {\r\n super(target);\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, HostListener, Input, OnDestroy} from \"@angular/core\";\r\nimport {Ripple, RippleOptions} from \"./Ripple\";\r\nimport {RippleManager} from \"./RippleManager\";\r\n\r\n@Directive({\r\n selector: '[cuteRipple]',\r\n exportAs: 'cuteRipple',\r\n host: {},\r\n standalone: true,\r\n})\r\nexport class CuteRipple /* extends ... */ implements OnDestroy {\r\n private readonly _ripple: Ripple | undefined;\r\n\r\n @Input(\"cuteRipple\")\r\n rippleOptions: RippleOptions | undefined;\r\n\r\n @HostListener(\"mousedown\", ['$event'])\r\n protected onMouseDown(event: MouseEvent) {\r\n if (this._ripple) {\r\n this._ripple.launch(event, this.rippleOptions);\r\n }\r\n }\r\n\r\n constructor(private _elemRef: ElementRef<HTMLElement>) {\r\n this._ripple = RippleManager.createRipple(_elemRef.nativeElement);\r\n }\r\n\r\n ngOnDestroy() {\r\n RippleManager.removeRipple(this._elemRef.nativeElement);\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {TreeNode} from \"./TreeNode\";\r\nimport {ToolbarItem} from \"./ToolbarItem\";\r\n\r\n/**\r\n * Menu Item interface is used for items in a drop-down or cascading menu\r\n */\r\nexport interface MenuItem<D=unknown> extends TreeNode<D> {\r\n /** An array of the submenu items. */\r\n children?: MenuItem<D>[];\r\n /** Whether an item is the default item. */\r\n default?: (()=>boolean)|boolean;\r\n /** Is item checked? Default is _false_. */\r\n checked?: (()=>boolean)|boolean;\r\n /** Item is clicked (selected or unselected). */\r\n clicked?: () => void;\r\n /** Toolbar's item definition. */\r\n toolBarItem?: ToolbarItem;\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {RichThemeColor} from \"@cute-widgets/base/core/theming\";\r\n\r\n/**\r\n * A structure that populates the properties for individual items in a TreeView control.\r\n */\r\nexport interface TreeNode<D=unknown> {\r\n /** Unique identifier */\r\n id?: string;\r\n /** Identifies the string label associated with the item. */\r\n label: string;\r\n /** Specifies whether the item has children. */\r\n hasChildren?: boolean;\r\n /** Children items. */\r\n children?: TreeNode<D>[];\r\n /** Item short description */\r\n microHelp?: string;\r\n /** Indicates the level of the item in the TreeView control. */\r\n level?: number;\r\n /** Any user-defined data. */\r\n data?: D;\r\n /** Router link. */\r\n routerLink?: string | string[];\r\n /** Identifies the picture displayed to the left of the item label. */\r\n icon?: string;\r\n /** Icon color. */\r\n iconColor?: string;\r\n /** Icon CSS class(es). */\r\n iconClass?: string | string[] | Record<string, boolean>;\r\n /** Identifies the state picture associated with the item. */\r\n stateIcon?: string;\r\n /** The badge text associated with the item. */\r\n badge?: string;\r\n /** Badge theme color. */\r\n badgeColor?: RichThemeColor;\r\n /** Is node enabled? Default is _true_. */\r\n enabled?: (()=>boolean)|boolean;\r\n /** Is node visible? Default is _true_. */\r\n visible?: (()=>boolean)|boolean;\r\n\r\n status?: {\r\n /** Specifies whether the node is expanded. */\r\n expanded?: boolean;\r\n /** Specifies whether the node has been populated with children. */\r\n populated?: boolean;\r\n /** Specifies whether the item has focus. */\r\n hasFocus?: boolean;\r\n /** Specifies whether the item is selected. */\r\n selection?: 'checked' | 'indeterminate' | 'unchecked';\r\n };\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type MouseGeneralCursor =\r\n | \"auto\"\r\n | \"default\"\r\n | \"none\";\r\n\r\nexport type MouseLinkAndStatusCursor =\r\n | \"context-menu\"\r\n | \"help\"\r\n | \"pointer\"\r\n | \"progress\"\r\n | \"wait\";\r\n\r\nexport type MouseSelectionCursor =\r\n | \"cell\"\r\n | \"crosshair\"\r\n | \"text\"\r\n | \"vertical-text\";\r\n\r\nexport type MouseDragAndDropCursor =\r\n | \"alias\"\r\n | \"copy\"\r\n | \"move\"\r\n | \"no-drop\"\r\n | \"not-allowed\"\r\n | \"grab\"\r\n | \"grabbing\";\r\n\r\nexport type MouseResizeAndScrollCursor =\r\n | \"all-scroll\"\r\n | \"col-resize\"\r\n | \"row-resize\"\r\n | \"n-resize\"\r\n | \"e-resize\"\r\n | \"s-resize\"\r\n | \"w-resize\"\r\n | \"ne-resize\"\r\n | \"nw-resize\"\r\n | \"se-resize\"\r\n | \"sw-resize\"\r\n | \"ew-resize\"\r\n | \"ns-resize\"\r\n | \"nesw-resize\"\r\n | \"nwse-resize\";\r\n\r\nexport type MouseZoomingCursor =\r\n | \"zoom-in\"\r\n | \"zoom-out\";\r\n\r\nexport type MouseCursor =\r\n | MouseGeneralCursor\r\n | MouseLinkAndStatusCursor\r\n | MouseSelectionCursor\r\n | MouseDragAndDropCursor\r\n | MouseResizeAndScrollCursor\r\n | MouseZoomingCursor;\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type RelativeSize3 = \"middle\"|\"large\"|\"small\";\r\nexport type RelativeSize5 = RelativeSize3 | (\"larger\"|\"smaller\");\r\nexport type RelativeSize7 = RelativeSize5 | (\"largest\"|\"smallest\");\r\nexport type RelativeSize = RelativeSize3;\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * Gets transition duration total value\r\n * @param element Source HTML element\r\n * @returns Duration with delay time in milliseconds\r\n */\r\nexport function getOverallTransitionDuration(element: HTMLElement): number {\r\n return getTransitionDelay(element) + getTransitionDuration(element);\r\n}\r\n\r\n/**\r\n * Gets transition duration value\r\n * @param element Source HTML element\r\n * @returns Duration time in milliseconds\r\n */\r\nexport function getTransitionDuration(element: HTMLElement): number {\r\n const {transitionDuration } = window.getComputedStyle(element);\r\n const durationInMilliseconds = transitionDuration.toLowerCase().endsWith(\"ms\");\r\n const transitionDurationMs = parseFloat(transitionDuration) * (durationInMilliseconds ? 1 : 1000);\r\n\r\n return (transitionDurationMs);\r\n}\r\n\r\n/**\r\n * Gets duration to wait before starting transition\r\n * @param element Source HTML element\r\n * @returns Delay time in milliseconds\r\n */\r\nexport function getTransitionDelay(element: HTMLElement): number {\r\n const { transitionDelay} = window.getComputedStyle(element);\r\n const delayInMilliseconds = transitionDelay.toLowerCase().endsWith(\"ms\");\r\n const transitionDelayMs = parseFloat(transitionDelay) * (delayInMilliseconds ? 1 : 1000);\r\n\r\n return (transitionDelayMs);\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {InjectionToken} from '@angular/core';\r\n\r\nexport function createValueToken<T>(value: T): InjectionToken<T> {\r\n return createFactoryToken(() => value);\r\n}\r\n\r\nexport function createFactoryToken<T>(factory: () => T): InjectionToken<T> {\r\n return new InjectionToken<T>(`createFactoryToken`, {factory});\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {ElementRef} from \"@angular/core\";\r\n\r\nexport type ExportOptions = {\r\n filename?: string;\r\n delimiter?: string;\r\n columns?: string[];\r\n}\r\n\r\n/**\r\n * Forcibly starts the process of downloading and saving the file.\r\n * @param blobData Data to save\r\n * @param filename File name to save. Default is `download`.\r\n */\r\nexport function saveAs(blobData: Blob, filename?: string) {\r\n const link = document.createElement(\"a\");\r\n link.href = URL.createObjectURL(blobData);\r\n link.download = filename || \"download\";\r\n link.click();\r\n URL.revokeObjectURL(link.href);\r\n}\r\n\r\n/**\r\n * Exports data from HTML table to MS Excel format text\r\n * @param tableIdOrElem HTML table's `id` value or `ElementRef` object\r\n * @param options Export options\r\n */\r\nexport function exportToExcel(tableIdOrElem: string|ElementRef, options: ExportOptions = {filename: 'records.xls'}) {\r\n let tableElem: HTMLElement|null;\r\n if (typeof tableIdOrElem===\"string\") {\r\n tableElem = document.getElementById(tableIdOrElem);\r\n } else {\r\n tableElem = tableIdOrElem.nativeElement;\r\n }\r\n if (tableElem && tableElem instanceof HTMLTableElement) {\r\n //const tableHTML = encodeURIComponent(tableElem.outerHTML.replace(/ or .*?>/g, '>'));\r\n const tableHTML = tableElem.outerHTML.replace(/ or .*?>/g, '>');\r\n const blobData = new Blob([tableHTML], {type: '{type: application/vnd.ms-excel'});\r\n saveAs(blobData, options?.filename);\r\n }\r\n}\r\n\r\n/**\r\n * Exports data from HTML table to CSV format text\r\n * @param tableIdOrElem HTML table's `id` value or `ElementRef` object\r\n * @param options Export options\r\n */\r\nexport function exportToCSV(tableIdOrElem: string|ElementRef, options: ExportOptions = {filename: 'records.csv'}) {\r\n let tableElem: HTMLElement|null;\r\n if (typeof tableIdOrElem===\"string\") {\r\n tableElem = document.getElementById(tableIdOrElem);\r\n } else {\r\n tableElem = tableIdOrElem.nativeElement;\r\n }\r\n if (tableElem && tableElem instanceof HTMLTableElement) {\r\n const rows = tableElem.querySelectorAll(\"tr\");\r\n let csv: string[] = [];\r\n let keys: number[] = [];\r\n\r\n if (rows.length > 0 && options && options.columns?.length) {\r\n const headers = rows[0].querySelectorAll<HTMLTableColElement>(\"th\");\r\n headers.forEach((header, key) => {\r\n if (options.columns!.findIndex((name) => {\r\n const loweredName = name.toLowerCase();\r\n return header.innerText.toLowerCase() == loweredName || header.classList.contains(\"cdk-column-\"+loweredName);\r\n }) >= 0) {\r\n keys.push(key);\r\n }\r\n });\r\n }\r\n\r\n const appendCells = (cells: HTMLTableColElement[] | NodeListOf<HTMLTableColElement>) => {\r\n const rowText = Array.from(cells).map(cell => cell.innerText);\r\n csv.push(rowText.join(options?.delimiter ?? \",\"));\r\n };\r\n\r\n if (keys.length > 0) {\r\n rows.forEach((row)=>{\r\n const allCells = row.querySelectorAll<HTMLTableColElement>(\"th,td\");\r\n let cells: HTMLTableColElement[] = [];\r\n allCells.forEach((cell, key)=>{\r\n if (keys.indexOf(key) >= 0) {cells.push(cell)}\r\n });\r\n appendCells(cells);\r\n });\r\n } else {\r\n rows.forEach((row)=> {\r\n appendCells( row.querySelectorAll<HTMLTableColElement>(\"th,td\") );\r\n });\r\n }\r\n const blobData = new Blob([csv.join(\"\\n\")], {type: \"text/csv;charset=utf-8;\"});\r\n saveAs(blobData, options?.filename);\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {APP_ID, inject, Injectable} from '@angular/core';\r\n\r\n/**\r\n * Keeps track of the ID count per prefix. This helps us make the IDs a bit more deterministic\r\n * like they were before the service was introduced. Note that ideally we wouldn't have to do\r\n * this, but there are some internal tests that rely on the IDs.\r\n */\r\nconst counters: Record<string, number> = {};\r\n\r\n/** Service that generates unique IDs for DOM nodes. */\r\n@Injectable({providedIn: 'root'})\r\nexport class IdGenerator {\r\n private _appId = inject(APP_ID);\r\n\r\n /**\r\n * Generates a unique ID with a specific prefix.\r\n * @param prefix Prefix to add to the ID.\r\n */\r\n getId(prefix: string): string {\r\n // Omit the app ID if it's the default `ng`. Since the vast majority of pages have one\r\n // Angular app on them, we can reduce the number of breakages by not adding it.\r\n if (this._appId !== 'ng') {\r\n prefix += this._appId;\r\n }\r\n\r\n if (!counters.hasOwnProperty(prefix)) {\r\n counters[prefix] = 0;\r\n }\r\n\r\n return `${prefix}${counters[prefix]++}`;\r\n }\r\n\r\n /**\r\n * Generates UUID (ver.4) string using simple algorithm based on random value only\r\n */\r\n getUUID(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, (c) => {\r\n const r: number = (Math.random() * 16) | 0,\r\n v: number = c == 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type TaskPriority = \"user-blocking\"|\"user-visible\"|\"background\";\r\n\r\n/**\r\n * A class with static methods specifically designed for scheduling tasks in the browser.\r\n */\r\nexport class Scheduler {\r\n\r\n /** Yielding to the main thread in the browser. */\r\n static async yield(): Promise<void> {\r\n const globalScheduler = (globalThis as any).scheduler;\r\n if (globalScheduler?.yield) {\r\n return globalScheduler.yield();\r\n }\r\n\r\n // Fall back to yielding with setTimeout.\r\n return new Promise(resolve => {\r\n setTimeout(resolve, 0);\r\n });\r\n }\r\n\r\n /**\r\n * Resolves a promise after the delay time in milliseconds\r\n * @param ms Number of milliseconds to wait\r\n *\r\n * @see {@link delay}\r\n */\r\n static async wait(ms: number): Promise<void> {\r\n const startNow = performance.now();\r\n while ((performance.now() - startNow) < ms) {\r\n await Scheduler.yield();\r\n }\r\n }\r\n\r\n /**\r\n * Adding a task to be scheduled according to their priority.\r\n * @param callback Function to run\r\n * @param options Scheduler options\r\n *\r\n * @see {@link async.post}\r\n */\r\n static async postTask(callback: Function, options?: {priority?: TaskPriority, signal?: any, delay?: number}): Promise<void> {\r\n const globalScheduler = (globalThis as any).scheduler;\r\n if (globalScheduler?.postTask) {\r\n return globalScheduler.postTask(callback, options);\r\n }\r\n return new Promise((resolve)=> {\r\n setTimeout(() => resolve(callback()), options?.delay ?? 0);\r\n });\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {inject, InjectionToken, LOCALE_ID} from '@angular/core';\r\nimport {Observable, Subject} from 'rxjs';\r\n\r\n/** InjectionToken for datepicker that can be used to override default locale code. */\r\nexport const CUTE_DATE_LOCALE = new InjectionToken<{}>('CUTE_DATE_LOCALE', {\r\n providedIn: 'root',\r\n factory: CUTE_DATE_LOCALE_FACTORY,\r\n});\r\n\r\n/**\r\n * @docs-private\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n */\r\nexport function CUTE_DATE_LOCALE_FACTORY(): {} {\r\n return inject(LOCALE_ID);\r\n}\r\n\r\nconst NOT_IMPLEMENTED = 'Method not implemented';\r\n\r\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\r\nexport abstract class DateAdapter<D, L = any> {\r\n /** The locale to use for all dates. */\r\n protected locale: L | undefined;\r\n protected readonly _localeChanges = new Subject<void>();\r\n\r\n /** A stream that emits when the locale changes. */\r\n readonly localeChanges: Observable<void> = this._localeChanges;\r\n\r\n /**\r\n * Gets the year component of the given date.\r\n * @param date The date to extract the year from.\r\n * @returns The year component.\r\n */\r\n abstract getYear(date: D): number;\r\n\r\n /**\r\n * Gets the month component of the given date.\r\n * @param date The date to extract the month from.\r\n * @returns The month component (0-indexed, 0 = January).\r\n */\r\n abstract getMonth(date: D): number;\r\n\r\n /**\r\n * Gets the date of the month component of the given date.\r\n * @param date The date to extract the date of the month from.\r\n * @returns The month component (1-indexed, 1 = first of month).\r\n */\r\n abstract getDate(date: D): number;\r\n\r\n /**\r\n * Gets the day of the week component of the given date.\r\n * @param date The date to extract the day of the week from.\r\n * @returns The month component (0-indexed, 0 = Sunday).\r\n */\r\n abstract getDayOfWeek(date: D): number;\r\n\r\n /**\r\n * Gets a list of names for the months.\r\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\r\n * @returns An ordered list of all month names, starting with January.\r\n */\r\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\r\n\r\n /**\r\n * Gets a list of names for the dates of the month.\r\n * @returns An ordered list of all date of the month names, starting with '1'.\r\n */\r\n abstract getDateNames(): string[];\r\n\r\n /**\r\n * Gets a list of names for the days of the week.\r\n * @param style The naming style (e.g., long = 'Sunday', short = 'Sun', narrow = 'S').\r\n * @returns An ordered list of all weekday names, starting with Sunday.\r\n */\r\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\r\n\r\n /**\r\n * Gets the name for the year of the given date.\r\n * @param date The date to get the year name for.\r\n * @returns The name of the given year (e.g. '2017').\r\n */\r\n abstract getYearName(date: D): string;\r\n\r\n /**\r\n * Gets the first day of the week.\r\n * @returns The first day of the week (0-indexed, 0 = Sunday).\r\n */\r\n abstract getFirstDayOfWeek(): number;\r\n\r\n /**\r\n * Gets the number of days in the month of the given date.\r\n * @param date The date whose month should be checked.\r\n * @returns The number of days in the month of the given date.\r\n */\r\n abstract getNumDaysInMonth(date: D): number;\r\n\r\n /**\r\n * Clones the given date.\r\n * @param date The date to clone\r\n * @returns A new date equal to the given date.\r\n */\r\n abstract clone(date: D): D;\r\n\r\n /**\r\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\r\n * month and date.\r\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\r\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\r\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\r\n * @returns The new date, or null if invalid.\r\n */\r\n abstract createDate(year: number, month: number, date: number): D;\r\n\r\n /**\r\n * Gets today's date.\r\n * @returns Today's date.\r\n */\r\n abstract today(): D;\r\n\r\n /**\r\n * Parses a date from a user-provided value.\r\n * @param value The value to parse.\r\n * @param parseFormat The expected format of the value being parsed\r\n * (type is implementation-dependent).\r\n * @returns The parsed date.\r\n */\r\n abstract parse(value: any, parseFormat: any): D | null;\r\n\r\n /**\r\n * Formats a date as a string according to the given format.\r\n * @param date The value to format.\r\n * @param displayFormat The format to use to display the date as a string.\r\n * @returns The formatted date string.\r\n */\r\n abstract format(date: D, displayFormat: any): string;\r\n\r\n /**\r\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\r\n * calendar for each year and then finding the closest date in the new month. For example when\r\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\r\n * @param date The date to add years to.\r\n * @param years The number of years to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of years added.\r\n */\r\n abstract addCalendarYears(date: D, years: number): D;\r\n\r\n /**\r\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\r\n * calendar for each month and then finding the closest date in the new month. For example when\r\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\r\n * @param date The date to add months to.\r\n * @param months The number of months to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of months added.\r\n */\r\n abstract addCalendarMonths(date: D, months: number): D;\r\n\r\n /**\r\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\r\n * calendar for each day.\r\n * @param date The date to add days to.\r\n * @param days The number of days to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of days added.\r\n */\r\n abstract addCalendarDays(date: D, days: number): D;\r\n\r\n /**\r\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\r\n * This method is used to generate date strings that are compatible with native HTML attributes\r\n * such as the `min` or `max` attribute of an `<input>`.\r\n * @param date The date to get the ISO date string for.\r\n * @returns The ISO date string date string.\r\n */\r\n abstract toIso8601(date: D): string;\r\n\r\n /**\r\n * Checks whether the given object is considered a date instance by this DateAdapter.\r\n * @param obj The object to check\r\n * @returns Whether the object is a date instance.\r\n */\r\n abstract isDateInstance(obj: any): boolean;\r\n\r\n /**\r\n * Checks whether the given date is valid.\r\n * @param date The date to check.\r\n * @returns Whether the date is valid.\r\n */\r\n abstract isValid(date: D): boolean;\r\n\r\n /**\r\n * Gets date instance that is not valid.\r\n * @returns An invalid date.\r\n */\r\n abstract invalid(): D;\r\n\r\n /**\r\n * Sets the time of one date to the time of another.\r\n * @param target Date whose time will be set.\r\n * @param hours New hours to set on the date object.\r\n * @param minutes New minutes to set on the date object.\r\n * @param seconds New seconds to set on the date object.\r\n */\r\n setTime(target: D, hours: number, minutes: number, seconds: number): D {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the hours component of the given date.\r\n * @param date The date to extract the hours from.\r\n */\r\n getHours(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the minutes component of the given date.\r\n * @param date The date to extract the minutes from.\r\n */\r\n getMinutes(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the seconds component of the given date.\r\n * @param date The date to extract the seconds from.\r\n */\r\n getSeconds(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Parses a date with a specific time from a user-provided value.\r\n * @param value The value to parse.\r\n * @param parseFormat The expected format of the value being parsed\r\n * (type is implementation-dependent).\r\n */\r\n parseTime(value: any, parseFormat: any): D | null {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Adds an amount of seconds to the specified date.\r\n * @param date Date to which to add the seconds.\r\n * @param amount Amount of seconds to add to the date.\r\n */\r\n addSeconds(date: D, amount: number): D {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Given a potential date object, returns that same date object if it is\r\n * a valid date, or `null` if it's not a valid date.\r\n * @param obj The object to check.\r\n * @returns A date or `null`.\r\n */\r\n getValidDateOrNull(obj: unknown): D | null {\r\n return this.isDateInstance(obj) && this.isValid(obj as D) ? (obj as D) : null;\r\n }\r\n\r\n /**\r\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\r\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\r\n * string). The default implementation does not allow any deserialization, it simply checks that\r\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\r\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\r\n * support passing values from your backend directly to these properties by overriding this method\r\n * to also deserialize the format used by your backend.\r\n * @param value The value to be deserialized into a date object.\r\n * @returns The deserialized date object, either a valid date, null if the value can be\r\n * deserialized into a null date (e.g. the empty string), or an invalid date.\r\n */\r\n deserialize(value: any): D | null {\r\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\r\n return value;\r\n }\r\n return this.invalid();\r\n }\r\n\r\n /**\r\n * Sets the locale used for all dates.\r\n * @param locale The new locale.\r\n */\r\n setLocale(locale: L) {\r\n this.locale = locale;\r\n this._localeChanges.next();\r\n }\r\n\r\n /**\r\n * Compares two dates.\r\n * @param first The first date to compare.\r\n * @param second The second date to compare.\r\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\r\n * a number greater than 0 if the first date is later.\r\n */\r\n compareDate(first: D, second: D): number {\r\n return (\r\n this.getYear(first) - this.getYear(second) ||\r\n this.getMonth(first) - this.getMonth(second) ||\r\n this.getDate(first) - this.getDate(second)\r\n );\r\n }\r\n\r\n /**\r\n * Compares the time values of two dates.\r\n * @param first First date to compare.\r\n * @param second Second date to compare.\r\n * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,\r\n * a number greater than 0 if the first time is later.\r\n */\r\n compareTime(first: D, second: D): number {\r\n return (\r\n this.getHours(first) - this.getHours(second) ||\r\n this.getMinutes(first) - this.getMinutes(second) ||\r\n this.getSeconds(first) - this.getSeconds(second)\r\n );\r\n }\r\n\r\n /**\r\n * Checks if two dates are equal.\r\n * @param first The first date to check.\r\n * @param second The second date to check.\r\n * @returns Whether the two dates are equal.\r\n * Null dates are considered equal to other null dates.\r\n */\r\n sameDate(first: D | null, second: D | null): boolean {\r\n if (first && second) {\r\n let firstValid = this.isValid(first);\r\n let secondValid = this.isValid(second);\r\n if (firstValid && secondValid) {\r\n return !this.compareDate(first, second);\r\n }\r\n return firstValid == secondValid;\r\n }\r\n return first == second;\r\n }\r\n\r\n /**\r\n * Checks if the times of two dates are equal.\r\n * @param first The first date to check.\r\n * @param second The second date to check.\r\n * @returns Whether the times of the two dates are equal.\r\n * Null dates are considered equal to other null dates.\r\n */\r\n sameTime(first: D | null, second: D | null): boolean {\r\n if (first && second) {\r\n const firstValid = this.isValid(first);\r\n const secondValid = this.isValid(second);\r\n if (firstValid && secondValid) {\r\n return !this.compareTime(first, second);\r\n }\r\n return firstValid == secondValid;\r\n }\r\n return first == second;\r\n }\r\n\r\n /**\r\n * Clamp the given date between min and max dates.\r\n * @param date The date to clamp.\r\n * @param min The minimum value to allow. If null or omitted, no min is enforced.\r\n * @param max The maximum value to allow. If null or omitted, no max is enforced.\r\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\r\n * otherwise `date`.\r\n */\r\n clampDate(date: D, min?: D | null, max?: D | null): D {\r\n if (min && this.compareDate(date, min) < 0) {\r\n return min;\r\n }\r\n if (max && this.compareDate(date, max) > 0) {\r\n return max;\r\n }\r\n return date;\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {InjectionToken} from '@angular/core';\r\n\r\nexport type CuteDateFormats = {\r\n parse: {\r\n dateInput: any;\r\n timeInput?: any;\r\n };\r\n display: {\r\n dateInput: any;\r\n monthLabel?: any;\r\n monthYearLabel: any;\r\n dateA11yLabel: any;\r\n monthYearA11yLabel: any;\r\n timeInput?: any;\r\n timeOptionLabel?: any;\r\n };\r\n};\r\n\r\nexport const CUTE_DATE_FORMATS = new InjectionToken<CuteDateFormats>('cute-date-formats');\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {inject, Injectable, isDevMode} from '@angular/core';\r\nimport {DateAdapter, CUTE_DATE_LOCALE} from './date-adapter';\r\n\r\n/**\r\n * Matches strings that have the form of a valid RFC 3339 string\r\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\r\n * because the regex will match strings and without of bounds month, date, etc.\r\n */\r\nconst ISO_8601_REGEX =\r\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\r\n\r\n/**\r\n * Matches a time string. Supported formats:\r\n * - {{hours}}:{{minutes}}\r\n * - {{hours}}:{{minutes}}:{{seconds}}\r\n * - {{hours}}:{{minutes}} AM/PM\r\n * - {{hours}}:{{minutes}}:{{seconds}} AM/PM\r\n * - {{hours}}.{{minutes}}\r\n * - {{hours}}.{{minutes}}.{{seconds}}\r\n * - {{hours}}.{{minutes}} AM/PM\r\n * - {{hours}}.{{minutes}}.{{seconds}} AM/PM\r\n */\r\nconst TIME_REGEX = /^(\\d?\\d)[:.](\\d?\\d)(?:[:.](\\d?\\d))?\\s*(AM|PM)?$/i;\r\n\r\n/** Creates an array and fills it with values. */\r\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\r\n const valuesArray = Array(length);\r\n for (let i = 0; i < length; i++) {\r\n valuesArray[i] = valueFunction(i);\r\n }\r\n return valuesArray;\r\n}\r\n\r\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\r\n@Injectable()\r\nexport class NativeDateAdapter extends DateAdapter<Date> {\r\n\r\n /** The injected locale. */\r\n private readonly _cuteDateLocale = inject(CUTE_DATE_LOCALE, {optional: true});\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n\r\n const cuteDateLocale = inject(CUTE_DATE_LOCALE, {optional: true});\r\n\r\n if (cuteDateLocale !== undefined) {\r\n this._cuteDateLocale = cuteDateLocale;\r\n }\r\n super.setLocale(this._cuteDateLocale);\r\n }\r\n\r\n getYear(date: Date): number { return date.getFullYear(); }\r\n getMonth(date: Date): number { return date.getMonth(); }\r\n getDate(date: Date): number { return date.getDate(); }\r\n getDayOfWeek(date: Date): number { return date.getDay(); }\r\n\r\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\r\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\r\n }\r\n\r\n getDateNames(): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\r\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\r\n }\r\n\r\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\r\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\r\n }\r\n\r\n getYearName(date: Date): string {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\r\n return this._format(dtf, date);\r\n }\r\n\r\n getFirstDayOfWeek(): number {\r\n // At the time of writing `Intl.Locale` isn't available\r\n // in the internal types, so we need to cast to `any`.\r\n if (typeof Intl !== 'undefined' && (Intl as any).Locale) {\r\n const locale = new (Intl as any).Locale(this.locale) as {\r\n getWeekInfo?: () => {firstDay: number};\r\n weekInfo?: {firstDay: number};\r\n };\r\n\r\n // Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.\r\n // Note that this isn't supported in all browsers, so we need to null check it.\r\n const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;\r\n\r\n // `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,\r\n // whereas our representation is 0 to 6 where 0 is Sunday, so we need to normalize it.\r\n return firstDay === 7 ? 0 : firstDay;\r\n }\r\n\r\n // Default to Sunday if the browser doesn't provide the week information.\r\n return 0;\r\n }\r\n\r\n getNumDaysInMonth(date: Date): number {\r\n return this.getDate(\r\n this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0),\r\n );\r\n }\r\n\r\n clone(date: Date): Date {\r\n return new Date(date.getTime());\r\n }\r\n\r\n createDate(year: number, month: number, date: number): Date {\r\n if (isDevMode()) {\r\n // Check for invalid month and date (except upper bound on date which we have to check after\r\n // creating the Date).\r\n if (month < 0 || month > 11) {\r\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\r\n }\r\n\r\n if (date < 1) {\r\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\r\n }\r\n }\r\n\r\n let result = this._createDateWithOverflow(year, month, date);\r\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\r\n if (result.getMonth() != month && isDevMode()) {\r\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n today(): Date {\r\n return new Date();\r\n }\r\n\r\n parse(value: any, parseFormat?: any): Date | null {\r\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\r\n // parameters.\r\n if (typeof value == 'number') {\r\n return new Date(value);\r\n }\r\n return value ? new Date(Date.parse(value)) : null;\r\n }\r\n\r\n format(date: Date, displayFormat: Object): string {\r\n if (!this.isValid(date)) {\r\n throw Error('NativeDateAdapter: Cannot format invalid date.');\r\n }\r\n\r\n const dtf = new Intl.DateTimeFormat(this.locale, {...displayFormat, timeZone: 'utc'});\r\n return this._format(dtf, date);\r\n }\r\n\r\n addCalendarYears(date: Date, years: number): Date {\r\n return this.addCalendarMonths(date, years * 12);\r\n }\r\n\r\n addCalendarMonths(date: Date, months: number): Date {\r\n let newDate = this._createDateWithOverflow(\r\n this.getYear(date),\r\n this.getMonth(date) + months,\r\n this.getDate(date),\r\n );\r\n\r\n // It's possible to wind up in the wrong month if the original month has more days than the new\r\n // month. In this case we want to go to the last day of the desired month.\r\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\r\n // guarantee this.\r\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\r\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\r\n }\r\n\r\n return newDate;\r\n }\r\n\r\n addCalendarDays(date: Date, days: number): Date {\r\n return this._createDateWithOverflow(\r\n this.getYear(date),\r\n this.getMonth(date),\r\n this.getDate(date) + days,\r\n );\r\n }\r\n\r\n toIso8601(date: Date): string {\r\n return [\r\n date.getUTCFullYear(),\r\n this._2digit(date.getUTCMonth() + 1),\r\n this._2digit(date.getUTCDate()),\r\n ].join('-');\r\n }\r\n\r\n /**\r\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\r\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\r\n * invalid date for all other values.\r\n */\r\n override deserialize(value: any): Date | null {\r\n if (typeof value === 'string') {\r\n if (!value) {\r\n return null;\r\n }\r\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\r\n // string is the right format first.\r\n if (ISO_8601_REGEX.test(value)) {\r\n let date = new Date(value);\r\n if (this.isValid(date)) {\r\n return date;\r\n }\r\n }\r\n }\r\n return super.deserialize(value);\r\n }\r\n\r\n isDateInstance(obj: any) {\r\n return obj instanceof Date;\r\n }\r\n\r\n isValid(date: Date) {\r\n return !isNaN(date.getTime());\r\n }\r\n\r\n invalid(): Date {\r\n return new Date(NaN);\r\n }\r\n\r\n override setTime(target: Date, hours: number, minutes: number, seconds: number): Date {\r\n if (isDevMode()) {\r\n if (!inRange(hours, 0, 23)) {\r\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\r\n }\r\n\r\n if (!inRange(minutes, 0, 59)) {\r\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\r\n }\r\n\r\n if (!inRange(seconds, 0, 59)) {\r\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\r\n }\r\n }\r\n\r\n const clone = this.clone(target);\r\n clone.setHours(hours, minutes, seconds, 0);\r\n return clone;\r\n }\r\n\r\n override getHours(date: Date): number {\r\n return date.getHours();\r\n }\r\n\r\n override getMinutes(date: Date): number {\r\n return date.getMinutes();\r\n }\r\n\r\n override getSeconds(date: Date): number {\r\n return date.getSeconds();\r\n }\r\n\r\n override parseTime(userValue: any, parseFormat?: any): Date | null {\r\n if (typeof userValue !== 'string') {\r\n return userValue instanceof Date ? new Date(userValue.getTime()) : null;\r\n }\r\n\r\n const value = userValue.trim();\r\n\r\n if (value.length === 0) {\r\n return null;\r\n }\r\n\r\n // Attempt to parse the value directly.\r\n let result = this._parseTimeString(value);\r\n\r\n // Some locales add extra characters around the time, but are otherwise parseable\r\n // (e.g. `00:05 ч.` in bg-BG). Try replacing all non-number and non-colon characters.\r\n if (result === null) {\r\n const withoutExtras = value.replace(/[^0-9:(AM|PM)]/gi, '').trim();\r\n\r\n if (withoutExtras.length > 0) {\r\n result = this._parseTimeString(withoutExtras);\r\n }\r\n }\r\n\r\n return result || this.invalid();\r\n }\r\n\r\n override addSeconds(date: Date, amount: number): Date {\r\n return new Date(date.getTime() + amount * 1000);\r\n }\r\n\r\n /** Creates a date but allows the month and date to overflow. */\r\n private _createDateWithOverflow(year: number, month: number, date: number) {\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this, we use `setFullYear` and `setHours` instead.\r\n const d = new Date();\r\n d.setFullYear(year, month, date);\r\n d.setHours(0, 0, 0, 0);\r\n return d;\r\n }\r\n\r\n /**\r\n * Pads a number to make it two digits.\r\n * @param n The number to pad.\r\n * @returns The padded number.\r\n */\r\n private _2digit(n: number) {\r\n return ('00' + n).slice(-2);\r\n }\r\n\r\n /**\r\n * When converting a Date object to string, javascript built-in functions may return wrong\r\n * results because it applies its internal DST rules. The DST rules around the world change\r\n * very frequently, and the current valid rule is not always valid in previous years though.\r\n * We work around this problem building a new Date object which has its internal UTC\r\n * representation with the local date and time.\r\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\r\n * timeZone set to 'utc' to work fine.\r\n * @param date Date from which we want to get the string representation according to dtf\r\n * @returns A Date object with its UTC representation based on the passed in date info\r\n */\r\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this, we use `setUTCFullYear` and `setUTCHours` instead.\r\n const d = new Date();\r\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\r\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\r\n return dtf.format(d);\r\n }\r\n\r\n /**\r\n * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.\r\n * @param value Time string to parse.\r\n */\r\n private _parseTimeString(value: string): Date | null {\r\n // Note: we can technically rely on the browser for the time parsing by generating\r\n // an ISO string and appending the string to the end of it. We don't do it, because\r\n // browsers aren't consistent in what they support. Some examples:\r\n // - Safari doesn't support AM/PM.\r\n // - Firefox produces a valid date object if the time string has overflows (e.g. 12:75) while\r\n // other browsers produce an invalid date.\r\n // - Safari doesn't allow padded numbers.\r\n const parsed = value.toUpperCase().match(TIME_REGEX);\r\n\r\n if (parsed) {\r\n let hours = parseInt(parsed[1]);\r\n const minutes = parseInt(parsed[2]);\r\n let seconds: number | undefined = parsed[3] == null ? undefined : parseInt(parsed[3]);\r\n const amPm = parsed[4] as 'AM' | 'PM' | undefined;\r\n\r\n if (hours === 12) {\r\n hours = amPm === 'AM' ? 0 : hours;\r\n } else if (amPm === 'PM') {\r\n hours += 12;\r\n }\r\n\r\n if (\r\n inRange(hours, 0, 23) &&\r\n inRange(minutes, 0, 59) &&\r\n (seconds == null || inRange(seconds, 0, 59))\r\n ) {\r\n return this.setTime(this.today(), hours, minutes, seconds || 0);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\n/** Checks whether a number is within a certain range. */\r\nfunction inRange(value: number, min: number, max: number): boolean {\r\n return !isNaN(value) && value >= min && value <= max;\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {CuteDateFormats} from './date-format';\r\n\r\nexport const CUTE_NATIVE_DATE_FORMATS: CuteDateFormats = {\r\n parse: {\r\n dateInput: null,\r\n timeInput: null,\r\n },\r\n display: {\r\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\r\n timeInput: {hour: 'numeric', minute: 'numeric'},\r\n monthYearLabel: {year: 'numeric', month: 'short'},\r\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\r\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\r\n timeOptionLabel: {hour: 'numeric', minute: 'numeric'},\r\n },\r\n};\r\n","import {NgModule, Provider} from '@angular/core';\r\nimport {DateAdapter} from \"./date-adapter\";\r\nimport {NativeDateAdapter} from \"./native-date-adapter\";\r\nimport {CUTE_NATIVE_DATE_FORMATS} from \"./native-date-format\";\r\nimport {CuteDateFormats, CUTE_DATE_FORMATS} from \"./date-format\";\r\n\r\n@NgModule({\r\n providers: [{provide: DateAdapter, useClass: NativeDateAdapter}],\r\n})\r\nexport class NativeDateModule {}\r\n\r\n@NgModule({\r\n providers: [provideNativeDateAdapter()],\r\n})\r\nexport class CuteNativeDateModule {}\r\n\r\nexport function provideNativeDateAdapter(\r\n formats: CuteDateFormats = CUTE_NATIVE_DATE_FORMATS,\r\n): Provider[] {\r\n return [\r\n {provide: DateAdapter, useClass: NativeDateAdapter},\r\n {provide: CUTE_DATE_FORMATS, useValue: formats},\r\n ];\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {inject, Pipe, PipeTransform} from '@angular/core';\r\nimport { DomSanitizer, SafeValue } from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Bypass security and trust the given value to be a safe resource.\r\n * > WARNING: calling this method with untrusted user data exposes your application to XSS security risks!\r\n * @example\r\n * ```html\r\n * <img [src]=\"item.source | safe:'url'\" alt=\"Item image\"/>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'safe'\r\n})\r\nexport class CuteSafePipe implements PipeTransform {\r\n protected sanitizer: DomSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: any, type: 'html'|'style'|'script'|'url'|'resourceUrl' = \"html\"): SafeValue {\r\n if (typeof value===\"string\") {\r\n switch (type.toLowerCase()) {\r\n case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);\r\n case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);\r\n case 'script': return this.sanitizer.bypassSecurityTrustScript(value);\r\n case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);\r\n case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);\r\n default: throw new Error(`Invalid safe type specified: ${type}`);\r\n }\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {inject, Pipe, PipeTransform, SecurityContext} from '@angular/core';\r\nimport {DomSanitizer, SafeValue} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Gets a safe value from either a known safe value or a value with unknown safety.\r\n *\r\n * @example\r\n * ```html\r\n * <div [innerHTML]=\"item.htmlContent | sanitize:'html'\"></div>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'sanitize'\r\n})\r\nexport class CuteSanitizePipe implements PipeTransform {\r\n protected sanitizer: DomSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: any, context: 'html'|'style'|'script'|'url'|'resourceUrl'|'none' = 'html'): SafeValue|null {\r\n if (typeof value===\"string\") {\r\n switch (context.toLowerCase()) {\r\n case 'html': return this.sanitizer.sanitize(SecurityContext.HTML, value);\r\n case 'style': return this.sanitizer.sanitize(SecurityContext.STYLE, value);\r\n case 'script': return this.sanitizer.sanitize(SecurityContext.SCRIPT, value);\r\n case 'url': return this.sanitizer.sanitize(SecurityContext.URL, value);\r\n case 'resourceUrl': return this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, value);\r\n case 'none': return this.sanitizer.sanitize(SecurityContext.NONE, value);\r\n default: throw new Error(`Invalid security context specified: ${context}`);\r\n }\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * `CuteWidgets` supports standard Bootstrap 5 theme colors - `ThemeColor` type. But to account\r\n * miscellaneous use cases of usage this colors in components CuteWidgets add extended definition of\r\n * latter - `RichThemeColor`. Rich color is the standard color name plus \"-emphasis\" or \"-contrast\" suffix at the end.\r\n * Depending on the context of applying color, the result CSS-class can be `.text-*`, `.text-bg-*` or ended with\r\n * `-emphasis` or `-subtle` suffixes.\r\n */\r\nimport {Directive, InjectionToken, Input, input} from \"@angular/core\";\r\n\r\n/** Bootstrap theme colors */\r\nconst Palette = [\"primary\",\"secondary\",\"success\",\"danger\",\"warning\",\"info\",\"light\",\"dark\",\"link\",\"tertiary\"] as const;\r\n\r\n/** Bootstrap’s base color palette. */\r\nexport type ThemeColor = typeof Palette[number];\r\n/** Rich color palette is based on the standard Bootstrap palette but has additional shades. */\r\nexport type RichThemeColor = ThemeColor | `${ThemeColor}-emphasis` | `${ThemeColor}-contrast`;\r\n\r\n/** Alias for `ThemeColor` type. */\r\nexport type ThemePalette = ThemeColor;\r\n/** Alias for `ThemeColor` type. */\r\nexport type RichThemePalette = RichThemeColor;\r\n\r\n/**\r\n * Whether a string is a valid theme color name\r\n * @param str Text case-sensitive value\r\n * @returns _true_ if `str` is a valid color name, otherwise _false_\r\n */\r\nexport function isThemeColor(str: string|undefined|null): str is ThemeColor {\r\n if (str) {\r\n return Palette.indexOf(str as any) !== -1;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Whether a string is a valid rich or base theme color name.\r\n * @param str Case-sensitive text value of the color name.\r\n * @returns _true_ if `str` is a valid rich color name, otherwise _false_.\r\n */\r\nexport function isRichThemeColor(str: string|undefined|null): str is RichThemeColor {\r\n if (str) {\r\n if (isExtendedColor(str)) {\r\n str = getBaseColor(str as RichThemeColor);\r\n }\r\n return isThemeColor(str);\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Transforms a string to `ThemeColor` type.\r\n * @param color Color value to transform\r\n * @returns _ThemeColor_'s value or _undefined_, if the `color` has an invalid value.\r\n */\r\nexport function toThemeColor(color: string|undefined|null): ThemeColor|undefined {\r\n if (typeof color===\"string\") {\r\n color = color.trim().toLowerCase();\r\n if (isExtendedColor(color)) {\r\n color = getBaseColor(color as RichThemeColor);\r\n }\r\n if (isThemeColor(color)) {\r\n return color;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * To `_RichThemeColor_` transformer function.\r\n * @param color Color value to transform into rich color type.\r\n * @returns _RichThemeColor_ value or _undefined_ if `color` is invalid.\r\n */\r\nexport function toRichThemeColor(color: string|undefined|null): RichThemeColor|undefined {\r\n if (typeof color===\"string\") {\r\n color = color.trim().toLowerCase();\r\n if (isRichThemeColor(color)) {\r\n return color;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.text-*` CSS class.\r\n * @param color Color palette to transform into CSS-class.\r\n */\r\nexport function toTextCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n // Bootstrap 5 has no \".text-tertiary-*\" classes, so we return following\r\n return \"text-body-tertiary\";\r\n }\r\n\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n if (richThemeColor.endsWith(\"-emphasis\")) {\r\n return `text-${themeColor}-emphasis`;\r\n }\r\n // contrast\r\n return `text-bg-${themeColor}`;\r\n }\r\n themeColor = richThemeColor as ThemeColor;\r\n return `text-${themeColor}`;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.bg-*` or `.text-bg-*` CSS class name.\r\n * @param color Value to transform into CSS-class.\r\n */\r\nexport function toBgCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n // Bootstrap 5 has no 'tertiary-subtle'/'bg-tertiary' classes, so we return following\r\n return \"bg-body-tertiary\";\r\n }\r\n\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n if (richThemeColor.endsWith(\"-emphasis\")) {\r\n return `bg-${themeColor}-subtle`;\r\n }\r\n // contrast\r\n return `text-bg-${themeColor}`;\r\n }\r\n\r\n themeColor = richThemeColor as ThemeColor;\r\n // Simple background\r\n return `bg-${themeColor}`;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Set a background color with contrasting foreground color.\r\n * @param color Color palette to transform into CSS-class.\r\n * @returns A valid Bootstrap's `.text-bg-*` CSS-class\r\n */\r\nexport function toTextBgCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n return \"text-body-tertiary\";\r\n }\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n } else {\r\n themeColor = richThemeColor as ThemeColor;\r\n }\r\n return \"text-bg-\"+themeColor;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.text-*` or `.text-bg-*` CSS class.\r\n * @param color Color value to transform into CSS-class.\r\n */\r\nexport function toColorCssClass(color: string|undefined|null): string {\r\n if (color) {\r\n if (color.endsWith(\"-contrast\")) {\r\n return toTextBgCssClass(color);\r\n }\r\n return toTextCssClass(color);\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Extracts `ThemeColor` from the `RichThemeColor`.\r\n * @param color Rich color\r\n * @returns Base theme color.\r\n * @internal\r\n */\r\nfunction getBaseColor(color: RichThemeColor): ThemeColor {\r\n let dashPos = color.indexOf(\"-\");\r\n if (dashPos >= 0) {\r\n return color.slice(0, dashPos) as ThemeColor;\r\n }\r\n return color as ThemeColor;\r\n}\r\n\r\n/** Whether the specified color is extended counterpart of the standard palette color. */\r\nfunction isExtendedColor(color: string): boolean {\r\n return color.endsWith(\"-emphasis\") || color.endsWith(\"-contrast\");\r\n}\r\n\r\n\r\nexport const CUTE_THEME_COLOR = new InjectionToken<CuteThemeColor>(\"CUTE_THEME_COLOR\");\r\n\r\n@Directive({\r\n selector: '[cuteThemeColor]',\r\n exportAs: 'cuteThemeColor',\r\n host: {},\r\n providers: [{provide: CUTE_THEME_COLOR, useExisting: CuteThemeColor}],\r\n})\r\nexport class CuteThemeColor /* extends ... */ {\r\n\r\n @Input(\"cuteThemeColor\")\r\n color: RichThemeColor | undefined;\r\n\r\n colorClass(): string {\r\n return toColorCssClass(this.color);\r\n }\r\n\r\n bgClass(): string {\r\n return toBgCssClass(this.color);\r\n }\r\n\r\n textBgClass(): string {\r\n return toTextBgCssClass(this.color);\r\n }\r\n\r\n}\r\n","import {DOCUMENT, inject, Injectable, OnDestroy} from '@angular/core';\r\nimport {fromEvent, Subject} from 'rxjs';\r\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\r\nimport {MediaMatcher} from '@angular/cdk/layout';\r\n\r\nconst PREFERS_COLOR_SCHEME = '(prefers-color-scheme: dark)';\r\nconst THEME_ATTR_NAME = \"data-bs-theme\";\r\n\r\nexport type CuteTheme = \"light\" | \"dark\" | \"auto\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CuteThemeService implements OnDestroy {\r\n private _document = inject(DOCUMENT);\r\n private _mediaQueryList: MediaQueryList;\r\n private _mediaChange = new Subject<MediaQueryListEvent>();\r\n\r\n /** Observable that can be used to receive `MediaMatcher`'s _change_ event. */\r\n readonly change = this._mediaChange.asObservable();\r\n\r\n constructor() {\r\n const mediaMatcher = inject(MediaMatcher);\r\n this._mediaQueryList = mediaMatcher.matchMedia(PREFERS_COLOR_SCHEME);\r\n\r\n fromEvent<MediaQueryListEvent>(this._mediaQueryList, \"change\")\r\n .pipe(takeUntilDestroyed())\r\n .subscribe(event => {\r\n const storedTheme = this.getStoredTheme();\r\n if (storedTheme !== 'light' && storedTheme !== 'dark') {\r\n this.setTheme( this.getPreferredTheme(), false );\r\n }\r\n this._mediaChange.next(event);\r\n });\r\n\r\n fromEvent(window, \"DOMContentLoaded\")\r\n .pipe(takeUntilDestroyed())\r\n .subscribe(() => {\r\n this.setTheme( this.getPreferredTheme() );\r\n });\r\n }\r\n\r\n private getStoredTheme(): CuteTheme|null {\r\n const theme = localStorage.getItem('theme');\r\n if (theme && [\"light\",\"dark\",\"auto\"].includes(theme)) {\r\n return theme as CuteTheme;\r\n }\r\n return null;\r\n }\r\n\r\n private setStoredTheme(theme: CuteTheme): void{\r\n return localStorage.setItem('theme', theme);\r\n }\r\n\r\n /** Returns the user's preferred color mode. */\r\n getPreferredTheme(): CuteTheme {\r\n const storedTheme = this.getStoredTheme();\r\n if (storedTheme) {\r\n return storedTheme;\r\n }\r\n\r\n return this.getCurrentTheme();\r\n }\r\n\r\n /** Returns the browser's color theme. */\r\n getCurrentTheme(): CuteTheme {\r\n return this._mediaQueryList.matches ? 'dark' : 'light';\r\n }\r\n\r\n /** Whether is the dark theme currently selected. */\r\n isDarkTheme(): boolean {\r\n return this.getTheme() == \"dark\";\r\n }\r\n\r\n /** Whether is the light theme currently selected. */\r\n isLightTheme(): boolean {\r\n return !this.isDarkTheme();\r\n }\r\n\r\n /** Returns the Bootstrap's color theme. */\r\n getTheme(): Omit<CuteTheme, \"auto\"> {\r\n const docElem = this._document.documentElement;\r\n let attrValue = docElem.getAttribute(THEME_ATTR_NAME);\r\n if (attrValue == null) {\r\n attrValue = this.getCurrentTheme();\r\n }\r\n return attrValue;\r\n }\r\n\r\n /**\r\n * Changes the default color mode (theme) of all pages in the website with the opportunity of auto-detection.\r\n * @param theme Desired color theme.\r\n * @param emitEvent Emulate event emitting. Default is _true_.\r\n */\r\n setTheme(theme: CuteTheme, emitEvent: boolean = true): void {\r\n const docElem = this._document.documentElement;\r\n let matches: boolean;\r\n if (theme === 'auto') {\r\n matches = this._mediaQueryList.matches;\r\n docElem.setAttribute(THEME_ATTR_NAME, (matches ? 'dark' : 'light'));\r\n } else {\r\n matches = (theme === \"dark\");\r\n docElem.setAttribute(THEME_ATTR_NAME, theme);\r\n }\r\n this.setStoredTheme(theme);\r\n if (emitEvent) {\r\n // dispatch artificial (not trusted) change event\r\n this._mediaQueryList.dispatchEvent( new MediaQueryListEvent(\"change\", {matches, media: this._mediaQueryList.media}) );\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._mediaChange.complete();\r\n }\r\n\r\n}\r\n","/*\r\n * Core API Surface of widgets\r\n */\r\nexport * from './animation';\r\nexport * from './layout';\r\nexport * from './line'\r\nexport * from './ripple';\r\nexport * from './interfaces';\r\nexport * from './types';\r\nexport * from './utils';\r\n//export * from './option';\r\nexport * from './datetime';\r\n//export * from './directives';\r\nexport * from './pipes';\r\nexport * from './theming';\r\n//export * from './event-plugins';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;MACa,uBAAuB,GAAG,IAAI,cAAc,CAAmB,yBAAyB;AAErG;;;;AAIG;MACU,eAAe,CAAA;aACnB,IAAA,CAAA,cAAc,GAAG,6BAA6B,CAAC;a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IAAI,CAAC,eAAe,CAAC,KAAK,EAAC,CAAC,CAAE;QACxH;IACF;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;IAC9B;+GApGW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,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,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACZD;;AAEG;AAaH;;ACfA;;AAEG;;;;"}
1
+ {"version":3,"file":"cute-widgets-base-core.mjs","sources":["../../../../projects/cute-widgets/base/core/animation/src/animation.ts","../../../../projects/cute-widgets/base/core/layout/src/bs-breakpoints.ts","../../../../projects/cute-widgets/base/core/line/src/line.ts","../../../../projects/cute-widgets/base/core/line/src/line.module.ts","../../../../projects/cute-widgets/base/core/ripple/src/Ripple.ts","../../../../projects/cute-widgets/base/core/ripple/src/RippleManager.ts","../../../../projects/cute-widgets/base/core/ripple/src/ripple.directive.ts","../../../../projects/cute-widgets/base/core/interfaces/src/MenuItem.ts","../../../../projects/cute-widgets/base/core/interfaces/src/TreeNode.ts","../../../../projects/cute-widgets/base/core/types/src/MouseCursor.ts","../../../../projects/cute-widgets/base/core/types/src/RelativeSize.ts","../../../../projects/cute-widgets/base/core/utils/src/transition.ts","../../../../projects/cute-widgets/base/core/utils/src/token.ts","../../../../projects/cute-widgets/base/core/utils/src/export.ts","../../../../projects/cute-widgets/base/core/utils/src/IdGenerator.ts","../../../../projects/cute-widgets/base/core/utils/src/Scheduler.ts","../../../../projects/cute-widgets/base/core/datetime/src/date-adapter.ts","../../../../projects/cute-widgets/base/core/datetime/src/date-format.ts","../../../../projects/cute-widgets/base/core/datetime/src/native-date-adapter.ts","../../../../projects/cute-widgets/base/core/datetime/src/native-date-format.ts","../../../../projects/cute-widgets/base/core/datetime/src/datetime.module.ts","../../../../projects/cute-widgets/base/core/pipes/src/safe.pipe.ts","../../../../projects/cute-widgets/base/core/pipes/src/sanitize.pipe.ts","../../../../projects/cute-widgets/base/core/theming/src/ThemeColor.ts","../../../../projects/cute-widgets/base/core/theming/src/theme.service.ts","../../../../projects/cute-widgets/base/core/index.ts","../../../../projects/cute-widgets/base/core/cute-widgets-base-core.ts"],"sourcesContent":["import {MediaMatcher} from '@angular/cdk/layout';\r\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\r\n\r\n/** Object used to configure the animation in Angular Material. */\r\nexport interface AnimationsConfig {\r\n /** Whether all animations should be disabled. */\r\n animationsDisabled?: boolean;\r\n}\r\n\r\n/** Injection token used to configure the animations in CuteWidgets. */\r\nexport const CUTE_WIDGETS_ANIMATIONS = new InjectionToken<AnimationsConfig>('CUTE_WIDGETS_ANIMATIONS');\r\n\r\n/**\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n * @docs-private\r\n */\r\nexport class AnimationCurves {\r\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\r\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\r\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\r\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\r\n}\r\n\r\n/**\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n * @docs-private\r\n */\r\nexport class AnimationDurations {\r\n static COMPLEX = '375ms';\r\n static ENTERING = '225ms';\r\n static EXITING = '195ms';\r\n}\r\n\r\nlet reducedMotion: boolean | null = null;\r\n\r\n/**\r\n * Gets the configured animations state.\r\n * @docs-private\r\n */\r\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\r\n if (\r\n inject(CUTE_WIDGETS_ANIMATIONS, {optional: true})?.animationsDisabled ||\r\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\r\n ) {\r\n return 'di-disabled';\r\n }\r\n\r\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\r\n return reducedMotion ? 'reduced-motion' : 'enabled';\r\n}\r\n\r\n/**\r\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\r\n * @docs-private\r\n */\r\nexport function _animationsDisabled(): boolean {\r\n return _getAnimationsState() !== 'enabled';\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * Bootstrap media-queries, or `breakpoints`.\r\n * PascalCase is being used as Breakpoints is used like an enum.\r\n */\r\nexport const bsBreakpoints = {\r\n\r\n SmallAndDown: '(max-width: 575.98px)',\r\n MediumAndDown: '(max-width: 767.98px)',\r\n LargeAndDown: '(max-width: 991.98px)',\r\n XLargeAndDown: '(max-width: 1199.98px)',\r\n XXLargeAndDown: '(max-width: 1399.98px)',\r\n\r\n XSmall: '(max-width: 575.98px)',\r\n Small: '(min-width: 576px) and (max-width: 767.98px)',\r\n Medium: '(min-width: 768px) and (max-width: 991.98px)',\r\n Large: '(min-width: 992px) and (max-width: 1199.98px)',\r\n XLarge: '(min-width: 1200px) and (max-width: 1399.98px)',\r\n XXLarge: '(min-width: 1400px)',\r\n\r\n get grid(): {xs:number,sm:number,md:number,lg:number,xl:number,xxl:number} {\r\n return {xs:0, sm:576, md:768, lg: 992, xl: 1200, xxl: 1400};\r\n },\r\n\r\n get xs(): string {return this.XSmall},\r\n get sm(): string {return this.Small},\r\n get md(): string {return this.Medium},\r\n get lg(): string {return this.Large},\r\n get xl(): string {return this.XLarge},\r\n get xxl(): string {return this.XXLarge},\r\n\r\n /**\r\n * Gets the object's property name of the media-query by its value\r\n * @param query The media-query text\r\n * @returns The property name of the media-query or _undefined_ if it was not found\r\n */\r\n getQueryName(query: string): string | undefined {\r\n let res: string | undefined;\r\n if (query) {\r\n for (const key in this) {\r\n if ((this as any)[key] === query) {\r\n res = key;\r\n break;\r\n }\r\n }\r\n }\r\n return res;\r\n },\r\n /**\r\n * Gets the breakpoint label by Bootstrap's breakpoint abbreviation\r\n * @param code Bootstrap's breakpoint abbreviation\r\n * @returns More descriptive text of the abbreviation\r\n */\r\n getLabel(code: string): string {\r\n switch (code) {\r\n case \"xs\": return \"XSmall\";\r\n case \"sm\": return \"Small\";\r\n case \"md\": return \"Medium\";\r\n case \"lg\": return \"Large\";\r\n case \"xl\": return \"XLarge\";\r\n case \"xxl\": return \"XXLarge\";\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Directive, ElementRef, QueryList} from '@angular/core';\r\nimport {startWith} from 'rxjs/operators';\r\n\r\n/**\r\n * Shared directive to count lines inside a text area, such as a list item.\r\n * Line elements can be extracted with a @ContentChildren(CuteLine) query, then\r\n * counted by checking the query list's length.\r\n */\r\n@Directive({\r\n selector: '[cute-line], [cuteLine]',\r\n host: {'class': 'cute-line'},\r\n standalone: true,\r\n})\r\nexport class CuteLine {}\r\n\r\n/**\r\n * Helper that takes a query list of lines and sets the correct class on the host.\r\n */\r\nexport function setLines(\r\n lines: QueryList<unknown>,\r\n element: ElementRef<HTMLElement>,\r\n prefix = 'cute',\r\n) {\r\n // Note: doesn't need to unsubscribe, because `changes`\r\n // gets completed by Angular when the view is destroyed.\r\n lines.changes.pipe(startWith(lines)).subscribe(({length}) => {\r\n setClass(element, `${prefix}-2-line`, false);\r\n setClass(element, `${prefix}-3-line`, false);\r\n setClass(element, `${prefix}-multi-line`, false);\r\n\r\n if (length === 2 || length === 3) {\r\n setClass(element, `${prefix}-${length}-line`, true);\r\n } else if (length > 3) {\r\n setClass(element, `${prefix}-multi-line`, true);\r\n }\r\n });\r\n}\r\n\r\n/** Adds or removes a class from an element. */\r\nfunction setClass(element: ElementRef<HTMLElement>, className: string, isAdd: boolean): void {\r\n element.nativeElement.classList.toggle(className, isAdd);\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteLine} from \"./line\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteLine\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteLineModule {\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {computed, signal} from \"@angular/core\";\r\nimport {firstValueFrom, fromEvent} from \"rxjs\";\r\nimport {take} from \"rxjs/operators\";\r\n\r\nconst RIPPLE_CLASS_NAME = \"cute-ripple-element\";\r\n\r\nexport type RippleOptions = {centered?: boolean, color?: string|null, duration?: string|number};\r\n\r\nexport abstract class Ripple {\r\n private _active = signal<boolean>(false);\r\n private _disabled: boolean = false;\r\n private readonly _target: HTMLElement | undefined;\r\n\r\n protected constructor(target: HTMLElement) {\r\n this._target = target;\r\n }\r\n\r\n get disabled(): boolean {return this._disabled}\r\n set disabled(v: boolean) {this._disabled = v;}\r\n\r\n isActive = computed(() => this._active());\r\n\r\n stop(): void {\r\n if (this._target) {\r\n const existingRipple = this._target.getElementsByClassName(RIPPLE_CLASS_NAME)[0];\r\n if (existingRipple) {\r\n existingRipple.parentElement?.remove();\r\n }\r\n }\r\n this._active.set(false);\r\n }\r\n\r\n launch(event: MouseEvent, options?: RippleOptions): void {\r\n\r\n if (this.disabled) {\r\n return;\r\n }\r\n\r\n if (this.isActive()) {\r\n this.stop();\r\n }\r\n\r\n if (this._target && event) {\r\n const rect = this._target.getBoundingClientRect();\r\n\r\n const parent = document.createElement(\"div\");\r\n parent.style.position = \"absolute\";\r\n parent.style.top = \"0\";\r\n parent.style.right = \"0\";\r\n parent.style.bottom = \"0\";\r\n parent.style.left = \"0\";\r\n parent.style.overflow = \"hidden\";\r\n parent.style.borderRadius = \"inherit\";\r\n parent.style.transform = \"perspective(0)\";\r\n parent.ariaHidden = \"true\";\r\n parent.classList.add(\"cute-ripple\")\r\n\r\n const circle = document.createElement(\"span\");\r\n const diameter = Math.max(rect.width, rect.height);\r\n const radius = diameter/2;\r\n\r\n circle.style.width = circle.style.height = `${diameter}px`;\r\n if (options?.centered) {\r\n circle.style.left = `${rect.width / 2 - radius}px`;\r\n circle.style.top = `${rect.height / 2 - radius}px`;\r\n } else {\r\n circle.style.left = `${event.clientX - rect.left - radius}px`;\r\n circle.style.top = `${event.clientY - rect.top - radius}px`;\r\n }\r\n if (options?.color) {\r\n circle.style.setProperty(\"--cute-ripple-bg-color\", options.color);\r\n }\r\n if (options?.duration) {\r\n circle.style.setProperty(\"--cute-ripple-duration\", String(options.duration));\r\n }\r\n circle.classList.add(RIPPLE_CLASS_NAME);\r\n\r\n parent.appendChild(circle);\r\n this._target.appendChild(parent);\r\n\r\n this._active.set(true);\r\n\r\n Promise.any([\r\n firstValueFrom(fromEvent(circle, \"animationend\").pipe(take(1))),\r\n firstValueFrom(fromEvent(circle, \"animationcancel\").pipe(take(1))),\r\n //firstValueFrom(fromEvent(document, \"mouseup\").pipe(take(1))),\r\n ]).then(() => {\r\n circle.parentElement?.remove();\r\n this._active.set(false);\r\n })\r\n\r\n }\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Ripple} from \"./Ripple\";\r\n\r\nexport class RippleManager {\r\n private static readonly _ripples = new WeakMap<HTMLElement, Ripple>();\r\n\r\n\r\n static getInstance(target: HTMLElement): Ripple {\r\n return RippleManager.createRipple(target);\r\n }\r\n\r\n static createRipple(target: HTMLElement): Ripple {\r\n\r\n if (!target) {\r\n throw new Error(\"'target' is required when instantiating a Ripple object\")\r\n }\r\n let ripple = this._ripples.get(target);\r\n if (!ripple) {\r\n ripple = new RippleImpl(target);\r\n this._ripples.set(target, ripple);\r\n }\r\n return ripple;\r\n }\r\n\r\n static removeRipple(target: HTMLElement) {\r\n if (target) {\r\n let ripple = this._ripples.get(target);\r\n if (ripple) {\r\n ripple.stop();\r\n }\r\n this._ripples.delete(target);\r\n }\r\n }\r\n}\r\n\r\nclass RippleImpl extends Ripple {\r\n constructor(target: HTMLElement) {\r\n super(target);\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {Directive, ElementRef, HostListener, Input, OnDestroy} from \"@angular/core\";\r\nimport {Ripple, RippleOptions} from \"./Ripple\";\r\nimport {RippleManager} from \"./RippleManager\";\r\n\r\n@Directive({\r\n selector: '[cuteRipple]',\r\n exportAs: 'cuteRipple',\r\n host: {},\r\n standalone: true,\r\n})\r\nexport class CuteRipple /* extends ... */ implements OnDestroy {\r\n private readonly _ripple: Ripple | undefined;\r\n\r\n @Input(\"cuteRipple\")\r\n rippleOptions: RippleOptions | undefined;\r\n\r\n @HostListener(\"mousedown\", ['$event'])\r\n protected onMouseDown(event: MouseEvent) {\r\n if (this._ripple) {\r\n this._ripple.launch(event, this.rippleOptions);\r\n }\r\n }\r\n\r\n constructor(private _elemRef: ElementRef<HTMLElement>) {\r\n this._ripple = RippleManager.createRipple(_elemRef.nativeElement);\r\n }\r\n\r\n ngOnDestroy() {\r\n RippleManager.removeRipple(this._elemRef.nativeElement);\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {TreeNode} from \"./TreeNode\";\r\nimport {ToolbarItem} from \"./ToolbarItem\";\r\n\r\n/**\r\n * Menu Item interface is used for items in a drop-down or cascading menu\r\n */\r\nexport interface MenuItem<D=unknown> extends TreeNode<D> {\r\n /** An array of the submenu items. */\r\n children?: MenuItem<D>[];\r\n /** Whether an item is the default item. */\r\n default?: (()=>boolean)|boolean;\r\n /** Is item checked? Default is _false_. */\r\n checked?: (()=>boolean)|boolean;\r\n /** Item is clicked (selected or unselected). */\r\n clicked?: () => void;\r\n /** Toolbar's item definition. */\r\n toolBarItem?: ToolbarItem;\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nimport {RichThemeColor} from \"@cute-widgets/base/core/theming\";\r\n\r\n/**\r\n * A structure that populates the properties for individual items in a TreeView control.\r\n */\r\nexport interface TreeNode<D=unknown> {\r\n /** Unique identifier */\r\n id?: string;\r\n /** Identifies the string label associated with the item. */\r\n label: string;\r\n /** Specifies whether the item has children. */\r\n hasChildren?: boolean;\r\n /** Children items. */\r\n children?: TreeNode<D>[];\r\n /** Item short description */\r\n microHelp?: string;\r\n /** Indicates the level of the item in the TreeView control. */\r\n level?: number;\r\n /** Any user-defined data. */\r\n data?: D;\r\n /** Router link. */\r\n routerLink?: string | string[];\r\n /** Identifies the picture displayed to the left of the item label. */\r\n icon?: string;\r\n /** Icon color. */\r\n iconColor?: string;\r\n /** Icon CSS class(es). */\r\n iconClass?: string | string[] | Record<string, boolean>;\r\n /** Identifies the state picture associated with the item. */\r\n stateIcon?: string;\r\n /** The badge text associated with the item. */\r\n badge?: string;\r\n /** Badge theme color. */\r\n badgeColor?: RichThemeColor;\r\n /** Is node enabled? Default is _true_. */\r\n enabled?: (()=>boolean)|boolean;\r\n /** Is node visible? Default is _true_. */\r\n visible?: (()=>boolean)|boolean;\r\n\r\n status?: {\r\n /** Specifies whether the node is expanded. */\r\n readonly expanded?: boolean;\r\n /** Specifies whether the node has been populated with children. */\r\n populated?: boolean;\r\n /** Specifies whether the item has focus. */\r\n hasFocus?: boolean;\r\n /** Specifies whether the item is selected. */\r\n selection?: 'checked' | 'indeterminate' | 'unchecked';\r\n };\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type MouseGeneralCursor =\r\n | \"auto\"\r\n | \"default\"\r\n | \"none\";\r\n\r\nexport type MouseLinkAndStatusCursor =\r\n | \"context-menu\"\r\n | \"help\"\r\n | \"pointer\"\r\n | \"progress\"\r\n | \"wait\";\r\n\r\nexport type MouseSelectionCursor =\r\n | \"cell\"\r\n | \"crosshair\"\r\n | \"text\"\r\n | \"vertical-text\";\r\n\r\nexport type MouseDragAndDropCursor =\r\n | \"alias\"\r\n | \"copy\"\r\n | \"move\"\r\n | \"no-drop\"\r\n | \"not-allowed\"\r\n | \"grab\"\r\n | \"grabbing\";\r\n\r\nexport type MouseResizeAndScrollCursor =\r\n | \"all-scroll\"\r\n | \"col-resize\"\r\n | \"row-resize\"\r\n | \"n-resize\"\r\n | \"e-resize\"\r\n | \"s-resize\"\r\n | \"w-resize\"\r\n | \"ne-resize\"\r\n | \"nw-resize\"\r\n | \"se-resize\"\r\n | \"sw-resize\"\r\n | \"ew-resize\"\r\n | \"ns-resize\"\r\n | \"nesw-resize\"\r\n | \"nwse-resize\";\r\n\r\nexport type MouseZoomingCursor =\r\n | \"zoom-in\"\r\n | \"zoom-out\";\r\n\r\nexport type MouseCursor =\r\n | MouseGeneralCursor\r\n | MouseLinkAndStatusCursor\r\n | MouseSelectionCursor\r\n | MouseDragAndDropCursor\r\n | MouseResizeAndScrollCursor\r\n | MouseZoomingCursor;\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type RelativeSize3 = \"middle\"|\"large\"|\"small\";\r\nexport type RelativeSize5 = RelativeSize3 | (\"larger\"|\"smaller\");\r\nexport type RelativeSize7 = RelativeSize5 | (\"largest\"|\"smallest\");\r\nexport type RelativeSize = RelativeSize3;\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * Gets transition duration total value\r\n * @param element Source HTML element\r\n * @returns Duration with delay time in milliseconds\r\n */\r\nexport function getOverallTransitionDuration(element: HTMLElement): number {\r\n return getTransitionDelay(element) + getTransitionDuration(element);\r\n}\r\n\r\n/**\r\n * Gets transition duration value\r\n * @param element Source HTML element\r\n * @returns Duration time in milliseconds\r\n */\r\nexport function getTransitionDuration(element: HTMLElement): number {\r\n const {transitionDuration } = window.getComputedStyle(element);\r\n const durationInMilliseconds = transitionDuration.toLowerCase().endsWith(\"ms\");\r\n const transitionDurationMs = parseFloat(transitionDuration) * (durationInMilliseconds ? 1 : 1000);\r\n\r\n return (transitionDurationMs);\r\n}\r\n\r\n/**\r\n * Gets duration to wait before starting transition\r\n * @param element Source HTML element\r\n * @returns Delay time in milliseconds\r\n */\r\nexport function getTransitionDelay(element: HTMLElement): number {\r\n const { transitionDelay} = window.getComputedStyle(element);\r\n const delayInMilliseconds = transitionDelay.toLowerCase().endsWith(\"ms\");\r\n const transitionDelayMs = parseFloat(transitionDelay) * (delayInMilliseconds ? 1 : 1000);\r\n\r\n return (transitionDelayMs);\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {InjectionToken} from '@angular/core';\r\n\r\nexport function createValueToken<T>(value: T): InjectionToken<T> {\r\n return createFactoryToken(() => value);\r\n}\r\n\r\nexport function createFactoryToken<T>(factory: () => T): InjectionToken<T> {\r\n return new InjectionToken<T>(`createFactoryToken`, {factory});\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {ElementRef} from \"@angular/core\";\r\n\r\nexport type ExportOptions = {\r\n filename?: string;\r\n delimiter?: string;\r\n columns?: string[];\r\n}\r\n\r\n/**\r\n * Forcibly starts the process of downloading and saving the file.\r\n * @param blobData Data to save\r\n * @param filename File name to save. Default is `download`.\r\n */\r\nexport function saveAs(blobData: Blob, filename?: string) {\r\n const link = document.createElement(\"a\");\r\n link.href = URL.createObjectURL(blobData);\r\n link.download = filename || \"download\";\r\n link.click();\r\n URL.revokeObjectURL(link.href);\r\n}\r\n\r\n/**\r\n * Exports data from HTML table to MS Excel format text\r\n * @param tableIdOrElem HTML table's `id` value or `ElementRef` object\r\n * @param options Export options\r\n */\r\nexport function exportToExcel(tableIdOrElem: string|ElementRef, options: ExportOptions = {filename: 'records.xls'}) {\r\n let tableElem: HTMLElement|null;\r\n if (typeof tableIdOrElem===\"string\") {\r\n tableElem = document.getElementById(tableIdOrElem);\r\n } else {\r\n tableElem = tableIdOrElem.nativeElement;\r\n }\r\n if (tableElem && tableElem instanceof HTMLTableElement) {\r\n //const tableHTML = encodeURIComponent(tableElem.outerHTML.replace(/ or .*?>/g, '>'));\r\n const tableHTML = tableElem.outerHTML.replace(/ or .*?>/g, '>');\r\n const blobData = new Blob([tableHTML], {type: '{type: application/vnd.ms-excel'});\r\n saveAs(blobData, options?.filename);\r\n }\r\n}\r\n\r\n/**\r\n * Exports data from HTML table to CSV format text\r\n * @param tableIdOrElem HTML table's `id` value or `ElementRef` object\r\n * @param options Export options\r\n */\r\nexport function exportToCSV(tableIdOrElem: string|ElementRef, options: ExportOptions = {filename: 'records.csv'}) {\r\n let tableElem: HTMLElement|null;\r\n if (typeof tableIdOrElem===\"string\") {\r\n tableElem = document.getElementById(tableIdOrElem);\r\n } else {\r\n tableElem = tableIdOrElem.nativeElement;\r\n }\r\n if (tableElem && tableElem instanceof HTMLTableElement) {\r\n const rows = tableElem.querySelectorAll(\"tr\");\r\n let csv: string[] = [];\r\n let keys: number[] = [];\r\n\r\n if (rows.length > 0 && options && options.columns?.length) {\r\n const headers = rows[0].querySelectorAll<HTMLTableColElement>(\"th\");\r\n headers.forEach((header, key) => {\r\n if (options.columns!.findIndex((name) => {\r\n const loweredName = name.toLowerCase();\r\n return header.innerText.toLowerCase() == loweredName || header.classList.contains(\"cdk-column-\"+loweredName);\r\n }) >= 0) {\r\n keys.push(key);\r\n }\r\n });\r\n }\r\n\r\n const appendCells = (cells: HTMLTableColElement[] | NodeListOf<HTMLTableColElement>) => {\r\n const rowText = Array.from(cells).map(cell => cell.innerText);\r\n csv.push(rowText.join(options?.delimiter ?? \",\"));\r\n };\r\n\r\n if (keys.length > 0) {\r\n rows.forEach((row)=>{\r\n const allCells = row.querySelectorAll<HTMLTableColElement>(\"th,td\");\r\n let cells: HTMLTableColElement[] = [];\r\n allCells.forEach((cell, key)=>{\r\n if (keys.indexOf(key) >= 0) {cells.push(cell)}\r\n });\r\n appendCells(cells);\r\n });\r\n } else {\r\n rows.forEach((row)=> {\r\n appendCells( row.querySelectorAll<HTMLTableColElement>(\"th,td\") );\r\n });\r\n }\r\n const blobData = new Blob([csv.join(\"\\n\")], {type: \"text/csv;charset=utf-8;\"});\r\n saveAs(blobData, options?.filename);\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {APP_ID, inject, Injectable} from '@angular/core';\r\n\r\n/**\r\n * Keeps track of the ID count per prefix. This helps us make the IDs a bit more deterministic\r\n * like they were before the service was introduced. Note that ideally we wouldn't have to do\r\n * this, but there are some internal tests that rely on the IDs.\r\n */\r\nconst counters: Record<string, number> = {};\r\n\r\n/** Service that generates unique IDs for DOM nodes. */\r\n@Injectable({providedIn: 'root'})\r\nexport class IdGenerator {\r\n private _appId = inject(APP_ID);\r\n\r\n /**\r\n * Generates a unique ID with a specific prefix.\r\n * @param prefix Prefix to add to the ID.\r\n */\r\n getId(prefix: string): string {\r\n // Omit the app ID if it's the default `ng`. Since the vast majority of pages have one\r\n // Angular app on them, we can reduce the number of breakages by not adding it.\r\n if (this._appId !== 'ng') {\r\n prefix += this._appId;\r\n }\r\n\r\n if (!counters.hasOwnProperty(prefix)) {\r\n counters[prefix] = 0;\r\n }\r\n\r\n return `${prefix}${counters[prefix]++}`;\r\n }\r\n\r\n /**\r\n * Generates UUID (ver.4) string using simple algorithm based on random value only\r\n */\r\n getUUID(): string {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, (c) => {\r\n const r: number = (Math.random() * 16) | 0,\r\n v: number = c == 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\nexport type TaskPriority = \"user-blocking\"|\"user-visible\"|\"background\";\r\n\r\n/**\r\n * A class with static methods specifically designed for scheduling tasks in the browser.\r\n */\r\nexport class Scheduler {\r\n\r\n /** Yielding to the main thread in the browser. */\r\n static async yield(): Promise<void> {\r\n const globalScheduler = (globalThis as any).scheduler;\r\n if (globalScheduler?.yield) {\r\n return globalScheduler.yield();\r\n }\r\n\r\n // Fall back to yielding with setTimeout.\r\n return new Promise(resolve => {\r\n setTimeout(resolve, 0);\r\n });\r\n }\r\n\r\n /**\r\n * Resolves a promise after the delay time in milliseconds\r\n * @param ms Number of milliseconds to wait\r\n *\r\n * @see {@link delay}\r\n */\r\n static async wait(ms: number): Promise<void> {\r\n const startNow = performance.now();\r\n while ((performance.now() - startNow) < ms) {\r\n await Scheduler.yield();\r\n }\r\n }\r\n\r\n /**\r\n * Adding a task to be scheduled according to their priority.\r\n * @param callback Function to run\r\n * @param options Scheduler options\r\n *\r\n * @see {@link async.post}\r\n */\r\n static async postTask(callback: Function, options?: {priority?: TaskPriority, signal?: any, delay?: number}): Promise<void> {\r\n const globalScheduler = (globalThis as any).scheduler;\r\n if (globalScheduler?.postTask) {\r\n return globalScheduler.postTask(callback, options);\r\n }\r\n return new Promise((resolve)=> {\r\n setTimeout(() => resolve(callback()), options?.delay ?? 0);\r\n });\r\n }\r\n\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {inject, InjectionToken, LOCALE_ID} from '@angular/core';\r\nimport {Observable, Subject} from 'rxjs';\r\n\r\n/** InjectionToken for datepicker that can be used to override default locale code. */\r\nexport const CUTE_DATE_LOCALE = new InjectionToken<{}>('CUTE_DATE_LOCALE', {\r\n providedIn: 'root',\r\n factory: CUTE_DATE_LOCALE_FACTORY,\r\n});\r\n\r\n/**\r\n * @docs-private\r\n * @deprecated No longer used, will be removed.\r\n * @breaking-change 21.0.0\r\n */\r\nexport function CUTE_DATE_LOCALE_FACTORY(): {} {\r\n return inject(LOCALE_ID);\r\n}\r\n\r\nconst NOT_IMPLEMENTED = 'Method not implemented';\r\n\r\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\r\nexport abstract class DateAdapter<D, L = any> {\r\n /** The locale to use for all dates. */\r\n protected locale: L | undefined;\r\n protected readonly _localeChanges = new Subject<void>();\r\n\r\n /** A stream that emits when the locale changes. */\r\n readonly localeChanges: Observable<void> = this._localeChanges;\r\n\r\n /**\r\n * Gets the year component of the given date.\r\n * @param date The date to extract the year from.\r\n * @returns The year component.\r\n */\r\n abstract getYear(date: D): number;\r\n\r\n /**\r\n * Gets the month component of the given date.\r\n * @param date The date to extract the month from.\r\n * @returns The month component (0-indexed, 0 = January).\r\n */\r\n abstract getMonth(date: D): number;\r\n\r\n /**\r\n * Gets the date of the month component of the given date.\r\n * @param date The date to extract the date of the month from.\r\n * @returns The month component (1-indexed, 1 = first of month).\r\n */\r\n abstract getDate(date: D): number;\r\n\r\n /**\r\n * Gets the day of the week component of the given date.\r\n * @param date The date to extract the day of the week from.\r\n * @returns The month component (0-indexed, 0 = Sunday).\r\n */\r\n abstract getDayOfWeek(date: D): number;\r\n\r\n /**\r\n * Gets a list of names for the months.\r\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\r\n * @returns An ordered list of all month names, starting with January.\r\n */\r\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\r\n\r\n /**\r\n * Gets a list of names for the dates of the month.\r\n * @returns An ordered list of all date of the month names, starting with '1'.\r\n */\r\n abstract getDateNames(): string[];\r\n\r\n /**\r\n * Gets a list of names for the days of the week.\r\n * @param style The naming style (e.g., long = 'Sunday', short = 'Sun', narrow = 'S').\r\n * @returns An ordered list of all weekday names, starting with Sunday.\r\n */\r\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\r\n\r\n /**\r\n * Gets the name for the year of the given date.\r\n * @param date The date to get the year name for.\r\n * @returns The name of the given year (e.g. '2017').\r\n */\r\n abstract getYearName(date: D): string;\r\n\r\n /**\r\n * Gets the first day of the week.\r\n * @returns The first day of the week (0-indexed, 0 = Sunday).\r\n */\r\n abstract getFirstDayOfWeek(): number;\r\n\r\n /**\r\n * Gets the number of days in the month of the given date.\r\n * @param date The date whose month should be checked.\r\n * @returns The number of days in the month of the given date.\r\n */\r\n abstract getNumDaysInMonth(date: D): number;\r\n\r\n /**\r\n * Clones the given date.\r\n * @param date The date to clone\r\n * @returns A new date equal to the given date.\r\n */\r\n abstract clone(date: D): D;\r\n\r\n /**\r\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\r\n * month and date.\r\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\r\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\r\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\r\n * @returns The new date, or null if invalid.\r\n */\r\n abstract createDate(year: number, month: number, date: number): D;\r\n\r\n /**\r\n * Gets today's date.\r\n * @returns Today's date.\r\n */\r\n abstract today(): D;\r\n\r\n /**\r\n * Parses a date from a user-provided value.\r\n * @param value The value to parse.\r\n * @param parseFormat The expected format of the value being parsed\r\n * (type is implementation-dependent).\r\n * @returns The parsed date.\r\n */\r\n abstract parse(value: any, parseFormat: any): D | null;\r\n\r\n /**\r\n * Formats a date as a string according to the given format.\r\n * @param date The value to format.\r\n * @param displayFormat The format to use to display the date as a string.\r\n * @returns The formatted date string.\r\n */\r\n abstract format(date: D, displayFormat: any): string;\r\n\r\n /**\r\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\r\n * calendar for each year and then finding the closest date in the new month. For example when\r\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\r\n * @param date The date to add years to.\r\n * @param years The number of years to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of years added.\r\n */\r\n abstract addCalendarYears(date: D, years: number): D;\r\n\r\n /**\r\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\r\n * calendar for each month and then finding the closest date in the new month. For example when\r\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\r\n * @param date The date to add months to.\r\n * @param months The number of months to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of months added.\r\n */\r\n abstract addCalendarMonths(date: D, months: number): D;\r\n\r\n /**\r\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\r\n * calendar for each day.\r\n * @param date The date to add days to.\r\n * @param days The number of days to add (maybe negative).\r\n * @returns A new date equal to the given one with the specified number of days added.\r\n */\r\n abstract addCalendarDays(date: D, days: number): D;\r\n\r\n /**\r\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\r\n * This method is used to generate date strings that are compatible with native HTML attributes\r\n * such as the `min` or `max` attribute of an `<input>`.\r\n * @param date The date to get the ISO date string for.\r\n * @returns The ISO date string date string.\r\n */\r\n abstract toIso8601(date: D): string;\r\n\r\n /**\r\n * Checks whether the given object is considered a date instance by this DateAdapter.\r\n * @param obj The object to check\r\n * @returns Whether the object is a date instance.\r\n */\r\n abstract isDateInstance(obj: any): boolean;\r\n\r\n /**\r\n * Checks whether the given date is valid.\r\n * @param date The date to check.\r\n * @returns Whether the date is valid.\r\n */\r\n abstract isValid(date: D): boolean;\r\n\r\n /**\r\n * Gets date instance that is not valid.\r\n * @returns An invalid date.\r\n */\r\n abstract invalid(): D;\r\n\r\n /**\r\n * Sets the time of one date to the time of another.\r\n * @param target Date whose time will be set.\r\n * @param hours New hours to set on the date object.\r\n * @param minutes New minutes to set on the date object.\r\n * @param seconds New seconds to set on the date object.\r\n */\r\n setTime(target: D, hours: number, minutes: number, seconds: number): D {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the hours component of the given date.\r\n * @param date The date to extract the hours from.\r\n */\r\n getHours(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the minutes component of the given date.\r\n * @param date The date to extract the minutes from.\r\n */\r\n getMinutes(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Gets the seconds component of the given date.\r\n * @param date The date to extract the seconds from.\r\n */\r\n getSeconds(date: D): number {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Parses a date with a specific time from a user-provided value.\r\n * @param value The value to parse.\r\n * @param parseFormat The expected format of the value being parsed\r\n * (type is implementation-dependent).\r\n */\r\n parseTime(value: any, parseFormat: any): D | null {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Adds an amount of seconds to the specified date.\r\n * @param date Date to which to add the seconds.\r\n * @param amount Amount of seconds to add to the date.\r\n */\r\n addSeconds(date: D, amount: number): D {\r\n throw new Error(NOT_IMPLEMENTED);\r\n }\r\n\r\n /**\r\n * Given a potential date object, returns that same date object if it is\r\n * a valid date, or `null` if it's not a valid date.\r\n * @param obj The object to check.\r\n * @returns A date or `null`.\r\n */\r\n getValidDateOrNull(obj: unknown): D | null {\r\n return this.isDateInstance(obj) && this.isValid(obj as D) ? (obj as D) : null;\r\n }\r\n\r\n /**\r\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\r\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\r\n * string). The default implementation does not allow any deserialization, it simply checks that\r\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\r\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\r\n * support passing values from your backend directly to these properties by overriding this method\r\n * to also deserialize the format used by your backend.\r\n * @param value The value to be deserialized into a date object.\r\n * @returns The deserialized date object, either a valid date, null if the value can be\r\n * deserialized into a null date (e.g. the empty string), or an invalid date.\r\n */\r\n deserialize(value: any): D | null {\r\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\r\n return value;\r\n }\r\n return this.invalid();\r\n }\r\n\r\n /**\r\n * Sets the locale used for all dates.\r\n * @param locale The new locale.\r\n */\r\n setLocale(locale: L) {\r\n this.locale = locale;\r\n this._localeChanges.next();\r\n }\r\n\r\n /**\r\n * Compares two dates.\r\n * @param first The first date to compare.\r\n * @param second The second date to compare.\r\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\r\n * a number greater than 0 if the first date is later.\r\n */\r\n compareDate(first: D, second: D): number {\r\n return (\r\n this.getYear(first) - this.getYear(second) ||\r\n this.getMonth(first) - this.getMonth(second) ||\r\n this.getDate(first) - this.getDate(second)\r\n );\r\n }\r\n\r\n /**\r\n * Compares the time values of two dates.\r\n * @param first First date to compare.\r\n * @param second Second date to compare.\r\n * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,\r\n * a number greater than 0 if the first time is later.\r\n */\r\n compareTime(first: D, second: D): number {\r\n return (\r\n this.getHours(first) - this.getHours(second) ||\r\n this.getMinutes(first) - this.getMinutes(second) ||\r\n this.getSeconds(first) - this.getSeconds(second)\r\n );\r\n }\r\n\r\n /**\r\n * Checks if two dates are equal.\r\n * @param first The first date to check.\r\n * @param second The second date to check.\r\n * @returns Whether the two dates are equal.\r\n * Null dates are considered equal to other null dates.\r\n */\r\n sameDate(first: D | null, second: D | null): boolean {\r\n if (first && second) {\r\n let firstValid = this.isValid(first);\r\n let secondValid = this.isValid(second);\r\n if (firstValid && secondValid) {\r\n return !this.compareDate(first, second);\r\n }\r\n return firstValid == secondValid;\r\n }\r\n return first == second;\r\n }\r\n\r\n /**\r\n * Checks if the times of two dates are equal.\r\n * @param first The first date to check.\r\n * @param second The second date to check.\r\n * @returns Whether the times of the two dates are equal.\r\n * Null dates are considered equal to other null dates.\r\n */\r\n sameTime(first: D | null, second: D | null): boolean {\r\n if (first && second) {\r\n const firstValid = this.isValid(first);\r\n const secondValid = this.isValid(second);\r\n if (firstValid && secondValid) {\r\n return !this.compareTime(first, second);\r\n }\r\n return firstValid == secondValid;\r\n }\r\n return first == second;\r\n }\r\n\r\n /**\r\n * Clamp the given date between min and max dates.\r\n * @param date The date to clamp.\r\n * @param min The minimum value to allow. If null or omitted, no min is enforced.\r\n * @param max The maximum value to allow. If null or omitted, no max is enforced.\r\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\r\n * otherwise `date`.\r\n */\r\n clampDate(date: D, min?: D | null, max?: D | null): D {\r\n if (min && this.compareDate(date, min) < 0) {\r\n return min;\r\n }\r\n if (max && this.compareDate(date, max) > 0) {\r\n return max;\r\n }\r\n return date;\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {InjectionToken} from '@angular/core';\r\n\r\nexport type CuteDateFormats = {\r\n parse: {\r\n dateInput: any;\r\n timeInput?: any;\r\n };\r\n display: {\r\n dateInput: any;\r\n monthLabel?: any;\r\n monthYearLabel: any;\r\n dateA11yLabel: any;\r\n monthYearA11yLabel: any;\r\n timeInput?: any;\r\n timeOptionLabel?: any;\r\n };\r\n};\r\n\r\nexport const CUTE_DATE_FORMATS = new InjectionToken<CuteDateFormats>('cute-date-formats');\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {inject, Injectable, isDevMode} from '@angular/core';\r\nimport {DateAdapter, CUTE_DATE_LOCALE} from './date-adapter';\r\n\r\n/**\r\n * Matches strings that have the form of a valid RFC 3339 string\r\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\r\n * because the regex will match strings and without of bounds month, date, etc.\r\n */\r\nconst ISO_8601_REGEX =\r\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\r\n\r\n/**\r\n * Matches a time string. Supported formats:\r\n * - {{hours}}:{{minutes}}\r\n * - {{hours}}:{{minutes}}:{{seconds}}\r\n * - {{hours}}:{{minutes}} AM/PM\r\n * - {{hours}}:{{minutes}}:{{seconds}} AM/PM\r\n * - {{hours}}.{{minutes}}\r\n * - {{hours}}.{{minutes}}.{{seconds}}\r\n * - {{hours}}.{{minutes}} AM/PM\r\n * - {{hours}}.{{minutes}}.{{seconds}} AM/PM\r\n */\r\nconst TIME_REGEX = /^(\\d?\\d)[:.](\\d?\\d)(?:[:.](\\d?\\d))?\\s*(AM|PM)?$/i;\r\n\r\n/** Creates an array and fills it with values. */\r\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\r\n const valuesArray = Array(length);\r\n for (let i = 0; i < length; i++) {\r\n valuesArray[i] = valueFunction(i);\r\n }\r\n return valuesArray;\r\n}\r\n\r\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\r\n@Injectable()\r\nexport class NativeDateAdapter extends DateAdapter<Date> {\r\n\r\n /** The injected locale. */\r\n private readonly _cuteDateLocale = inject(CUTE_DATE_LOCALE, {optional: true});\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n\r\n const cuteDateLocale = inject(CUTE_DATE_LOCALE, {optional: true});\r\n\r\n if (cuteDateLocale !== undefined) {\r\n this._cuteDateLocale = cuteDateLocale;\r\n }\r\n super.setLocale(this._cuteDateLocale);\r\n }\r\n\r\n getYear(date: Date): number { return date.getFullYear(); }\r\n getMonth(date: Date): number { return date.getMonth(); }\r\n getDate(date: Date): number { return date.getDate(); }\r\n getDayOfWeek(date: Date): number { return date.getDay(); }\r\n\r\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\r\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\r\n }\r\n\r\n getDateNames(): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\r\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\r\n }\r\n\r\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\r\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\r\n }\r\n\r\n getYearName(date: Date): string {\r\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\r\n return this._format(dtf, date);\r\n }\r\n\r\n getFirstDayOfWeek(): number {\r\n // At the time of writing `Intl.Locale` isn't available\r\n // in the internal types, so we need to cast to `any`.\r\n if (typeof Intl !== 'undefined' && (Intl as any).Locale) {\r\n const locale = new (Intl as any).Locale(this.locale) as {\r\n getWeekInfo?: () => {firstDay: number};\r\n weekInfo?: {firstDay: number};\r\n };\r\n\r\n // Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.\r\n // Note that this isn't supported in all browsers, so we need to null check it.\r\n const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;\r\n\r\n // `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,\r\n // whereas our representation is 0 to 6 where 0 is Sunday, so we need to normalize it.\r\n return firstDay === 7 ? 0 : firstDay;\r\n }\r\n\r\n // Default to Sunday if the browser doesn't provide the week information.\r\n return 0;\r\n }\r\n\r\n getNumDaysInMonth(date: Date): number {\r\n return this.getDate(\r\n this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0),\r\n );\r\n }\r\n\r\n clone(date: Date): Date {\r\n return new Date(date.getTime());\r\n }\r\n\r\n createDate(year: number, month: number, date: number): Date {\r\n if (isDevMode()) {\r\n // Check for invalid month and date (except upper bound on date which we have to check after\r\n // creating the Date).\r\n if (month < 0 || month > 11) {\r\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\r\n }\r\n\r\n if (date < 1) {\r\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\r\n }\r\n }\r\n\r\n let result = this._createDateWithOverflow(year, month, date);\r\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\r\n if (result.getMonth() != month && isDevMode()) {\r\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n today(): Date {\r\n return new Date();\r\n }\r\n\r\n parse(value: any, parseFormat?: any): Date | null {\r\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\r\n // parameters.\r\n if (typeof value == 'number') {\r\n return new Date(value);\r\n }\r\n return value ? new Date(Date.parse(value)) : null;\r\n }\r\n\r\n format(date: Date, displayFormat: Object): string {\r\n if (!this.isValid(date)) {\r\n throw Error('NativeDateAdapter: Cannot format invalid date.');\r\n }\r\n\r\n const dtf = new Intl.DateTimeFormat(this.locale, {...displayFormat, timeZone: 'utc'});\r\n return this._format(dtf, date);\r\n }\r\n\r\n addCalendarYears(date: Date, years: number): Date {\r\n return this.addCalendarMonths(date, years * 12);\r\n }\r\n\r\n addCalendarMonths(date: Date, months: number): Date {\r\n let newDate = this._createDateWithOverflow(\r\n this.getYear(date),\r\n this.getMonth(date) + months,\r\n this.getDate(date),\r\n );\r\n\r\n // It's possible to wind up in the wrong month if the original month has more days than the new\r\n // month. In this case we want to go to the last day of the desired month.\r\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\r\n // guarantee this.\r\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\r\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\r\n }\r\n\r\n return newDate;\r\n }\r\n\r\n addCalendarDays(date: Date, days: number): Date {\r\n return this._createDateWithOverflow(\r\n this.getYear(date),\r\n this.getMonth(date),\r\n this.getDate(date) + days,\r\n );\r\n }\r\n\r\n toIso8601(date: Date): string {\r\n return [\r\n date.getUTCFullYear(),\r\n this._2digit(date.getUTCMonth() + 1),\r\n this._2digit(date.getUTCDate()),\r\n ].join('-');\r\n }\r\n\r\n /**\r\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\r\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\r\n * invalid date for all other values.\r\n */\r\n override deserialize(value: any): Date | null {\r\n if (typeof value === 'string') {\r\n if (!value) {\r\n return null;\r\n }\r\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\r\n // string is the right format first.\r\n if (ISO_8601_REGEX.test(value)) {\r\n let date = new Date(value);\r\n if (this.isValid(date)) {\r\n return date;\r\n }\r\n }\r\n }\r\n return super.deserialize(value);\r\n }\r\n\r\n isDateInstance(obj: any) {\r\n return obj instanceof Date;\r\n }\r\n\r\n isValid(date: Date) {\r\n return !isNaN(date.getTime());\r\n }\r\n\r\n invalid(): Date {\r\n return new Date(NaN);\r\n }\r\n\r\n override setTime(target: Date, hours: number, minutes: number, seconds: number): Date {\r\n if (isDevMode()) {\r\n if (!inRange(hours, 0, 23)) {\r\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\r\n }\r\n\r\n if (!inRange(minutes, 0, 59)) {\r\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\r\n }\r\n\r\n if (!inRange(seconds, 0, 59)) {\r\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\r\n }\r\n }\r\n\r\n const clone = this.clone(target);\r\n clone.setHours(hours, minutes, seconds, 0);\r\n return clone;\r\n }\r\n\r\n override getHours(date: Date): number {\r\n return date.getHours();\r\n }\r\n\r\n override getMinutes(date: Date): number {\r\n return date.getMinutes();\r\n }\r\n\r\n override getSeconds(date: Date): number {\r\n return date.getSeconds();\r\n }\r\n\r\n override parseTime(userValue: any, parseFormat?: any): Date | null {\r\n if (typeof userValue !== 'string') {\r\n return userValue instanceof Date ? new Date(userValue.getTime()) : null;\r\n }\r\n\r\n const value = userValue.trim();\r\n\r\n if (value.length === 0) {\r\n return null;\r\n }\r\n\r\n // Attempt to parse the value directly.\r\n let result = this._parseTimeString(value);\r\n\r\n // Some locales add extra characters around the time, but are otherwise parseable\r\n // (e.g. `00:05 ч.` in bg-BG). Try replacing all non-number and non-colon characters.\r\n if (result === null) {\r\n const withoutExtras = value.replace(/[^0-9:(AM|PM)]/gi, '').trim();\r\n\r\n if (withoutExtras.length > 0) {\r\n result = this._parseTimeString(withoutExtras);\r\n }\r\n }\r\n\r\n return result || this.invalid();\r\n }\r\n\r\n override addSeconds(date: Date, amount: number): Date {\r\n return new Date(date.getTime() + amount * 1000);\r\n }\r\n\r\n /** Creates a date but allows the month and date to overflow. */\r\n private _createDateWithOverflow(year: number, month: number, date: number) {\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this, we use `setFullYear` and `setHours` instead.\r\n const d = new Date();\r\n d.setFullYear(year, month, date);\r\n d.setHours(0, 0, 0, 0);\r\n return d;\r\n }\r\n\r\n /**\r\n * Pads a number to make it two digits.\r\n * @param n The number to pad.\r\n * @returns The padded number.\r\n */\r\n private _2digit(n: number) {\r\n return ('00' + n).slice(-2);\r\n }\r\n\r\n /**\r\n * When converting a Date object to string, javascript built-in functions may return wrong\r\n * results because it applies its internal DST rules. The DST rules around the world change\r\n * very frequently, and the current valid rule is not always valid in previous years though.\r\n * We work around this problem building a new Date object which has its internal UTC\r\n * representation with the local date and time.\r\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\r\n * timeZone set to 'utc' to work fine.\r\n * @param date Date from which we want to get the string representation according to dtf\r\n * @returns A Date object with its UTC representation based on the passed in date info\r\n */\r\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\r\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\r\n // To work around this, we use `setUTCFullYear` and `setUTCHours` instead.\r\n const d = new Date();\r\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\r\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\r\n return dtf.format(d);\r\n }\r\n\r\n /**\r\n * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.\r\n * @param value Time string to parse.\r\n */\r\n private _parseTimeString(value: string): Date | null {\r\n // Note: we can technically rely on the browser for the time parsing by generating\r\n // an ISO string and appending the string to the end of it. We don't do it, because\r\n // browsers aren't consistent in what they support. Some examples:\r\n // - Safari doesn't support AM/PM.\r\n // - Firefox produces a valid date object if the time string has overflows (e.g. 12:75) while\r\n // other browsers produce an invalid date.\r\n // - Safari doesn't allow padded numbers.\r\n const parsed = value.toUpperCase().match(TIME_REGEX);\r\n\r\n if (parsed) {\r\n let hours = parseInt(parsed[1]);\r\n const minutes = parseInt(parsed[2]);\r\n let seconds: number | undefined = parsed[3] == null ? undefined : parseInt(parsed[3]);\r\n const amPm = parsed[4] as 'AM' | 'PM' | undefined;\r\n\r\n if (hours === 12) {\r\n hours = amPm === 'AM' ? 0 : hours;\r\n } else if (amPm === 'PM') {\r\n hours += 12;\r\n }\r\n\r\n if (\r\n inRange(hours, 0, 23) &&\r\n inRange(minutes, 0, 59) &&\r\n (seconds == null || inRange(seconds, 0, 59))\r\n ) {\r\n return this.setTime(this.today(), hours, minutes, seconds || 0);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\n/** Checks whether a number is within a certain range. */\r\nfunction inRange(value: number, min: number, max: number): boolean {\r\n return !isNaN(value) && value >= min && value <= max;\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {CuteDateFormats} from './date-format';\r\n\r\nexport const CUTE_NATIVE_DATE_FORMATS: CuteDateFormats = {\r\n parse: {\r\n dateInput: null,\r\n timeInput: null,\r\n },\r\n display: {\r\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\r\n timeInput: {hour: 'numeric', minute: 'numeric'},\r\n monthYearLabel: {year: 'numeric', month: 'short'},\r\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\r\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\r\n timeOptionLabel: {hour: 'numeric', minute: 'numeric'},\r\n },\r\n};\r\n","import {NgModule, Provider} from '@angular/core';\r\nimport {DateAdapter} from \"./date-adapter\";\r\nimport {NativeDateAdapter} from \"./native-date-adapter\";\r\nimport {CUTE_NATIVE_DATE_FORMATS} from \"./native-date-format\";\r\nimport {CuteDateFormats, CUTE_DATE_FORMATS} from \"./date-format\";\r\n\r\n@NgModule({\r\n providers: [{provide: DateAdapter, useClass: NativeDateAdapter}],\r\n})\r\nexport class NativeDateModule {}\r\n\r\n@NgModule({\r\n providers: [provideNativeDateAdapter()],\r\n})\r\nexport class CuteNativeDateModule {}\r\n\r\nexport function provideNativeDateAdapter(\r\n formats: CuteDateFormats = CUTE_NATIVE_DATE_FORMATS,\r\n): Provider[] {\r\n return [\r\n {provide: DateAdapter, useClass: NativeDateAdapter},\r\n {provide: CUTE_DATE_FORMATS, useValue: formats},\r\n ];\r\n}\r\n\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {inject, Pipe, PipeTransform} from '@angular/core';\r\nimport { DomSanitizer, SafeValue } from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Bypass security and trust the given value to be a safe resource.\r\n * > WARNING: calling this method with untrusted user data exposes your application to XSS security risks!\r\n * @example\r\n * ```html\r\n * <img [src]=\"item.source | safe:'url'\" alt=\"Item image\"/>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'safe'\r\n})\r\nexport class CuteSafePipe implements PipeTransform {\r\n protected sanitizer: DomSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: any, type: 'html'|'style'|'script'|'url'|'resourceUrl' = \"html\"): SafeValue {\r\n if (typeof value===\"string\") {\r\n switch (type.toLowerCase()) {\r\n case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);\r\n case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);\r\n case 'script': return this.sanitizer.bypassSecurityTrustScript(value);\r\n case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);\r\n case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);\r\n default: throw new Error(`Invalid safe type specified: ${type}`);\r\n }\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {inject, Pipe, PipeTransform, SecurityContext} from '@angular/core';\r\nimport {DomSanitizer, SafeValue} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Gets a safe value from either a known safe value or a value with unknown safety.\r\n *\r\n * @example\r\n * ```html\r\n * <div [innerHTML]=\"item.htmlContent | sanitize:'html'\"></div>\r\n * ```\r\n */\r\n@Pipe({\r\n name: 'sanitize'\r\n})\r\nexport class CuteSanitizePipe implements PipeTransform {\r\n protected sanitizer: DomSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: any, context: 'html'|'style'|'script'|'url'|'resourceUrl'|'none' = 'html'): SafeValue|null {\r\n if (typeof value===\"string\") {\r\n switch (context.toLowerCase()) {\r\n case 'html': return this.sanitizer.sanitize(SecurityContext.HTML, value);\r\n case 'style': return this.sanitizer.sanitize(SecurityContext.STYLE, value);\r\n case 'script': return this.sanitizer.sanitize(SecurityContext.SCRIPT, value);\r\n case 'url': return this.sanitizer.sanitize(SecurityContext.URL, value);\r\n case 'resourceUrl': return this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, value);\r\n case 'none': return this.sanitizer.sanitize(SecurityContext.NONE, value);\r\n default: throw new Error(`Invalid security context specified: ${context}`);\r\n }\r\n }\r\n return \"\";\r\n }\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\n\r\n/**\r\n * `CuteWidgets` supports standard Bootstrap 5 theme colors - `ThemeColor` type. But to account\r\n * miscellaneous use cases of usage this colors in components CuteWidgets add extended definition of\r\n * latter - `RichThemeColor`. Rich color is the standard color name plus \"-emphasis\" or \"-contrast\" suffix at the end.\r\n * Depending on the context of applying color, the result CSS-class can be `.text-*`, `.text-bg-*` or ended with\r\n * `-emphasis` or `-subtle` suffixes.\r\n */\r\nimport {Directive, InjectionToken, Input, input} from \"@angular/core\";\r\n\r\n/** Bootstrap theme colors */\r\nconst Palette = [\"primary\",\"secondary\",\"success\",\"danger\",\"warning\",\"info\",\"light\",\"dark\",\"link\",\"tertiary\"] as const;\r\n\r\n/** Bootstrap’s base color palette. */\r\nexport type ThemeColor = typeof Palette[number];\r\n/** Rich color palette is based on the standard Bootstrap palette but has additional shades. */\r\nexport type RichThemeColor = ThemeColor | `${ThemeColor}-emphasis` | `${ThemeColor}-contrast`;\r\n\r\n/** Alias for `ThemeColor` type. */\r\nexport type ThemePalette = ThemeColor;\r\n/** Alias for `ThemeColor` type. */\r\nexport type RichThemePalette = RichThemeColor;\r\n\r\n/**\r\n * Whether a string is a valid theme color name\r\n * @param str Text case-sensitive value\r\n * @returns _true_ if `str` is a valid color name, otherwise _false_\r\n */\r\nexport function isThemeColor(str: string|undefined|null): str is ThemeColor {\r\n if (str) {\r\n return Palette.indexOf(str as any) !== -1;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Whether a string is a valid rich or base theme color name.\r\n * @param str Case-sensitive text value of the color name.\r\n * @returns _true_ if `str` is a valid rich color name, otherwise _false_.\r\n */\r\nexport function isRichThemeColor(str: string|undefined|null): str is RichThemeColor {\r\n if (str) {\r\n if (isExtendedColor(str)) {\r\n str = getBaseColor(str as RichThemeColor);\r\n }\r\n return isThemeColor(str);\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Transforms a string to `ThemeColor` type.\r\n * @param color Color value to transform\r\n * @returns _ThemeColor_'s value or _undefined_, if the `color` has an invalid value.\r\n */\r\nexport function toThemeColor(color: string|undefined|null): ThemeColor|undefined {\r\n if (typeof color===\"string\") {\r\n color = color.trim().toLowerCase();\r\n if (isExtendedColor(color)) {\r\n color = getBaseColor(color as RichThemeColor);\r\n }\r\n if (isThemeColor(color)) {\r\n return color;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * To `_RichThemeColor_` transformer function.\r\n * @param color Color value to transform into rich color type.\r\n * @returns _RichThemeColor_ value or _undefined_ if `color` is invalid.\r\n */\r\nexport function toRichThemeColor(color: string|undefined|null): RichThemeColor|undefined {\r\n if (typeof color===\"string\") {\r\n color = color.trim().toLowerCase();\r\n if (isRichThemeColor(color)) {\r\n return color;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.text-*` CSS class.\r\n * @param color Color palette to transform into CSS-class.\r\n */\r\nexport function toTextCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n // Bootstrap 5 has no \".text-tertiary-*\" classes, so we return following\r\n return \"text-body-tertiary\";\r\n }\r\n\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n if (richThemeColor.endsWith(\"-emphasis\")) {\r\n return `text-${themeColor}-emphasis`;\r\n }\r\n // contrast\r\n return `text-bg-${themeColor}`;\r\n }\r\n themeColor = richThemeColor as ThemeColor;\r\n return `text-${themeColor}`;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.bg-*` or `.text-bg-*` CSS class name.\r\n * @param color Value to transform into CSS-class.\r\n */\r\nexport function toBgCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n // Bootstrap 5 has no 'tertiary-subtle'/'bg-tertiary' classes, so we return following\r\n return \"bg-body-tertiary\";\r\n }\r\n\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n if (richThemeColor.endsWith(\"-emphasis\")) {\r\n return `bg-${themeColor}-subtle`;\r\n }\r\n // contrast\r\n return `text-bg-${themeColor}`;\r\n }\r\n\r\n themeColor = richThemeColor as ThemeColor;\r\n // Simple background\r\n return `bg-${themeColor}`;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Set a background color with contrasting foreground color.\r\n * @param color Color palette to transform into CSS-class.\r\n * @returns A valid Bootstrap's `.text-bg-*` CSS-class\r\n */\r\nexport function toTextBgCssClass(color: string|undefined|null): string {\r\n const richThemeColor: RichThemeColor|undefined = toRichThemeColor(color);\r\n if (richThemeColor) {\r\n if (richThemeColor.startsWith(\"tertiary\")) {\r\n return \"text-body-tertiary\";\r\n }\r\n let themeColor: ThemeColor;\r\n if (isExtendedColor(richThemeColor)) {\r\n themeColor = getBaseColor(richThemeColor);\r\n } else {\r\n themeColor = richThemeColor as ThemeColor;\r\n }\r\n return \"text-bg-\"+themeColor;\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Returns a valid Bootstrap's `.text-*` or `.text-bg-*` CSS class.\r\n * @param color Color value to transform into CSS-class.\r\n */\r\nexport function toColorCssClass(color: string|undefined|null): string {\r\n if (color) {\r\n if (color.endsWith(\"-contrast\")) {\r\n return toTextBgCssClass(color);\r\n }\r\n return toTextCssClass(color);\r\n }\r\n return \"\";\r\n}\r\n\r\n/**\r\n * Extracts `ThemeColor` from the `RichThemeColor`.\r\n * @param color Rich color\r\n * @returns Base theme color.\r\n * @internal\r\n */\r\nfunction getBaseColor(color: RichThemeColor): ThemeColor {\r\n let dashPos = color.indexOf(\"-\");\r\n if (dashPos >= 0) {\r\n return color.slice(0, dashPos) as ThemeColor;\r\n }\r\n return color as ThemeColor;\r\n}\r\n\r\n/** Whether the specified color is extended counterpart of the standard palette color. */\r\nfunction isExtendedColor(color: string): boolean {\r\n return color.endsWith(\"-emphasis\") || color.endsWith(\"-contrast\");\r\n}\r\n\r\n\r\nexport const CUTE_THEME_COLOR = new InjectionToken<CuteThemeColor>(\"CUTE_THEME_COLOR\");\r\n\r\n@Directive({\r\n selector: '[cuteThemeColor]',\r\n exportAs: 'cuteThemeColor',\r\n host: {},\r\n providers: [{provide: CUTE_THEME_COLOR, useExisting: CuteThemeColor}],\r\n})\r\nexport class CuteThemeColor /* extends ... */ {\r\n\r\n @Input(\"cuteThemeColor\")\r\n color: RichThemeColor | undefined;\r\n\r\n colorClass(): string {\r\n return toColorCssClass(this.color);\r\n }\r\n\r\n bgClass(): string {\r\n return toBgCssClass(this.color);\r\n }\r\n\r\n textBgClass(): string {\r\n return toTextBgCssClass(this.color);\r\n }\r\n\r\n}\r\n","import {DOCUMENT, inject, Injectable, OnDestroy} from '@angular/core';\r\nimport {fromEvent, Subject} from 'rxjs';\r\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\r\nimport {MediaMatcher} from '@angular/cdk/layout';\r\n\r\nconst PREFERS_COLOR_SCHEME = '(prefers-color-scheme: dark)';\r\nconst THEME_ATTR_NAME = \"data-bs-theme\";\r\n\r\nexport type CuteTheme = \"light\" | \"dark\" | \"auto\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class CuteThemeService implements OnDestroy {\r\n private _document = inject(DOCUMENT);\r\n private _mediaQueryList: MediaQueryList;\r\n private _mediaChange = new Subject<MediaQueryListEvent>();\r\n\r\n /** Observable that can be used to receive `MediaMatcher`'s _change_ event. */\r\n readonly change = this._mediaChange.asObservable();\r\n\r\n constructor() {\r\n const mediaMatcher = inject(MediaMatcher);\r\n this._mediaQueryList = mediaMatcher.matchMedia(PREFERS_COLOR_SCHEME);\r\n\r\n fromEvent<MediaQueryListEvent>(this._mediaQueryList, \"change\")\r\n .pipe(takeUntilDestroyed())\r\n .subscribe(event => {\r\n const storedTheme = this.getStoredTheme();\r\n if (storedTheme !== 'light' && storedTheme !== 'dark') {\r\n this.setTheme( this.getPreferredTheme(), false );\r\n }\r\n this._mediaChange.next(event);\r\n });\r\n\r\n fromEvent(window, \"DOMContentLoaded\")\r\n .pipe(takeUntilDestroyed())\r\n .subscribe(() => {\r\n this.setTheme( this.getPreferredTheme() );\r\n });\r\n }\r\n\r\n private getStoredTheme(): CuteTheme|null {\r\n const theme = localStorage.getItem('theme');\r\n if (theme && [\"light\",\"dark\",\"auto\"].includes(theme)) {\r\n return theme as CuteTheme;\r\n }\r\n return null;\r\n }\r\n\r\n private setStoredTheme(theme: CuteTheme): void{\r\n return localStorage.setItem('theme', theme);\r\n }\r\n\r\n /** Returns the user's preferred color mode. */\r\n getPreferredTheme(): CuteTheme {\r\n const storedTheme = this.getStoredTheme();\r\n if (storedTheme) {\r\n return storedTheme;\r\n }\r\n\r\n return this.getCurrentTheme();\r\n }\r\n\r\n /** Returns the browser's color theme. */\r\n getCurrentTheme(): CuteTheme {\r\n return this._mediaQueryList.matches ? 'dark' : 'light';\r\n }\r\n\r\n /** Whether is the dark theme currently selected. */\r\n isDarkTheme(): boolean {\r\n return this.getTheme() == \"dark\";\r\n }\r\n\r\n /** Whether is the light theme currently selected. */\r\n isLightTheme(): boolean {\r\n return !this.isDarkTheme();\r\n }\r\n\r\n /** Returns the Bootstrap's color theme. */\r\n getTheme(): Omit<CuteTheme, \"auto\"> {\r\n const docElem = this._document.documentElement;\r\n let attrValue = docElem.getAttribute(THEME_ATTR_NAME);\r\n if (attrValue == null) {\r\n attrValue = this.getCurrentTheme();\r\n }\r\n return attrValue;\r\n }\r\n\r\n /**\r\n * Changes the default color mode (theme) of all pages in the website with the opportunity of auto-detection.\r\n * @param theme Desired color theme.\r\n * @param emitEvent Emulate event emitting. Default is _true_.\r\n */\r\n setTheme(theme: CuteTheme, emitEvent: boolean = true): void {\r\n const docElem = this._document.documentElement;\r\n let matches: boolean;\r\n if (theme === 'auto') {\r\n matches = this._mediaQueryList.matches;\r\n docElem.setAttribute(THEME_ATTR_NAME, (matches ? 'dark' : 'light'));\r\n } else {\r\n matches = (theme === \"dark\");\r\n docElem.setAttribute(THEME_ATTR_NAME, theme);\r\n }\r\n this.setStoredTheme(theme);\r\n if (emitEvent) {\r\n // dispatch artificial (not trusted) change event\r\n this._mediaQueryList.dispatchEvent( new MediaQueryListEvent(\"change\", {matches, media: this._mediaQueryList.media}) );\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this._mediaChange.complete();\r\n }\r\n\r\n}\r\n","/*\r\n * Core API Surface of widgets\r\n */\r\nexport * from './animation';\r\nexport * from './layout';\r\nexport * from './line'\r\nexport * from './ripple';\r\nexport * from './interfaces';\r\nexport * from './types';\r\nexport * from './utils';\r\n//export * from './option';\r\nexport * from './datetime';\r\n//export * from './directives';\r\nexport * from './pipes';\r\nexport * from './theming';\r\n//export * from './event-plugins';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;MACa,uBAAuB,GAAG,IAAI,cAAc,CAAmB,yBAAyB;AAErG;;;;AAIG;MACU,eAAe,CAAA;aACnB,IAAA,CAAA,cAAc,GAAG,6BAA6B,CAAC;aAC/C,IAAA,CAAA,kBAAkB,GAAG,6BAA6B,CAAC;aACnD,IAAA,CAAA,kBAAkB,GAAG,2BAA2B,CAAC;aACjD,IAAA,CAAA,WAAW,GAAG,6BAA6B,CAAC;;AAGrD;;;;AAIG;MACU,kBAAkB,CAAA;aACtB,IAAA,CAAA,OAAO,GAAG,OAAO,CAAC;aAClB,IAAA,CAAA,QAAQ,GAAG,OAAO,CAAC;aACnB,IAAA,CAAA,OAAO,GAAG,OAAO,CAAC;;AAG3B,IAAI,aAAa,GAAmB,IAAI;AAExC;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,uBAAuB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACrE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,aAAa;IACtB;AAEA,IAAA,aAAa,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;IACrF,OAAO,aAAa,GAAG,gBAAgB,GAAG,SAAS;AACrD;AAEA;;;AAGG;SACa,mBAAm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