@cute-widgets/base 20.0.5 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/fesm2022/cute-widgets-base-abstract.mjs +15 -15
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-alert.mjs +10 -10
- package/fesm2022/cute-widgets-base-alert.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-autocomplete.mjs +14 -14
- package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-badge.mjs +46 -14
- package/fesm2022/cute-widgets-base-badge.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs +11 -11
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button-toggle.mjs +29 -12
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button.mjs +20 -20
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-card.mjs +40 -40
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-checkbox.mjs +28 -28
- package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-chips.mjs +49 -49
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-collapse.mjs +14 -14
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-datetime.mjs +11 -11
- package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +21 -21
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-error.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-line.mjs +7 -7
- package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-nav.mjs +30 -28
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-observers.mjs +16 -16
- package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-option.mjs +10 -10
- package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-pipes.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-ripple.mjs +3 -3
- package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-theming.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-utils.mjs +3 -3
- package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs +36 -36
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-datepicker.mjs +100 -99
- package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs +31 -31
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-divider.mjs +7 -7
- package/fesm2022/cute-widgets-base-divider.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-expansion.mjs +27 -27
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-form-field.mjs +28 -28
- package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-grid-list.mjs +22 -22
- package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-icon.mjs +10 -10
- package/fesm2022/cute-widgets-base-icon.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-input.mjs +7 -7
- package/fesm2022/cute-widgets-base-input.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout-container.mjs +10 -10
- package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout-stack.mjs +13 -13
- package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout.mjs +23 -23
- package/fesm2022/cute-widgets-base-layout.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-list.mjs +56 -56
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-menu.mjs +579 -364
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-navbar.mjs +27 -27
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-paginator.mjs +11 -11
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-progress.mjs +10 -10
- package/fesm2022/cute-widgets-base-progress.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-radio.mjs +11 -11
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-select.mjs +11 -11
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sidenav.mjs +26 -26
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-slider.mjs +10 -10
- package/fesm2022/cute-widgets-base-slider.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-snack-bar.mjs +28 -28
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sort.mjs +13 -13
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-spinner.mjs +8 -8
- package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-stepper.mjs +40 -40
- package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +58 -66
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tabs.mjs +16 -16
- package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-timepicker.mjs +34 -63
- package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-toolbar.mjs +13 -13
- package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tooltip.mjs +10 -10
- package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tree.mjs +25 -25
- package/fesm2022/cute-widgets-base-tree.mjs.map +1 -1
- package/fesm2022/cute-widgets-base.mjs +4 -4
- package/package.json +118 -118
- package/{abstract/index.d.ts → types/cute-widgets-base-abstract.d.ts} +1 -1
- package/{autocomplete/index.d.ts → types/cute-widgets-base-autocomplete.d.ts} +2 -2
- package/{badge/index.d.ts → types/cute-widgets-base-badge.d.ts} +6 -5
- package/{bottom-sheet/index.d.ts → types/cute-widgets-base-bottom-sheet.d.ts} +1 -1
- package/{button-toggle/index.d.ts → types/cute-widgets-base-button-toggle.d.ts} +7 -1
- package/{button/index.d.ts → types/cute-widgets-base-button.d.ts} +1 -1
- package/{checkbox/index.d.ts → types/cute-widgets-base-checkbox.d.ts} +1 -1
- package/{chips/index.d.ts → types/cute-widgets-base-chips.d.ts} +1 -1
- package/{core/nav/index.d.ts → types/cute-widgets-base-core-nav.d.ts} +2 -1
- package/{core/observers/index.d.ts → types/cute-widgets-base-core-observers.d.ts} +1 -1
- package/{core/option/index.d.ts → types/cute-widgets-base-core-option.d.ts} +1 -1
- package/{datepicker/index.d.ts → types/cute-widgets-base-datepicker.d.ts} +2 -2
- package/{expansion/index.d.ts → types/cute-widgets-base-expansion.d.ts} +4 -14
- package/{form-field/index.d.ts → types/cute-widgets-base-form-field.d.ts} +1 -1
- package/{icon/index.d.ts → types/cute-widgets-base-icon.d.ts} +1 -1
- package/{input/index.d.ts → types/cute-widgets-base-input.d.ts} +1 -1
- package/{menu/index.d.ts → types/cute-widgets-base-menu.d.ts} +202 -121
- package/{progress/index.d.ts → types/cute-widgets-base-progress.d.ts} +1 -1
- package/{radio/index.d.ts → types/cute-widgets-base-radio.d.ts} +2 -2
- package/{sidenav/index.d.ts → types/cute-widgets-base-sidenav.d.ts} +1 -1
- package/{snack-bar/index.d.ts → types/cute-widgets-base-snack-bar.d.ts} +1 -1
- package/{sort/index.d.ts → types/cute-widgets-base-sort.d.ts} +1 -1
- package/{table/index.d.ts → types/cute-widgets-base-table.d.ts} +1 -1
- package/{tree/index.d.ts → types/cute-widgets-base-tree.d.ts} +2 -2
- /package/{alert/index.d.ts → types/cute-widgets-base-alert.d.ts} +0 -0
- /package/{card/index.d.ts → types/cute-widgets-base-card.d.ts} +0 -0
- /package/{collapse/index.d.ts → types/cute-widgets-base-collapse.d.ts} +0 -0
- /package/{core/animation/index.d.ts → types/cute-widgets-base-core-animation.d.ts} +0 -0
- /package/{core/datetime/index.d.ts → types/cute-widgets-base-core-datetime.d.ts} +0 -0
- /package/{core/directives/index.d.ts → types/cute-widgets-base-core-directives.d.ts} +0 -0
- /package/{core/error/index.d.ts → types/cute-widgets-base-core-error.d.ts} +0 -0
- /package/{core/interfaces/index.d.ts → types/cute-widgets-base-core-interfaces.d.ts} +0 -0
- /package/{core/layout/index.d.ts → types/cute-widgets-base-core-layout.d.ts} +0 -0
- /package/{core/line/index.d.ts → types/cute-widgets-base-core-line.d.ts} +0 -0
- /package/{core/pipes/index.d.ts → types/cute-widgets-base-core-pipes.d.ts} +0 -0
- /package/{core/ripple/index.d.ts → types/cute-widgets-base-core-ripple.d.ts} +0 -0
- /package/{core/testing/index.d.ts → types/cute-widgets-base-core-testing.d.ts} +0 -0
- /package/{core/theming/index.d.ts → types/cute-widgets-base-core-theming.d.ts} +0 -0
- /package/{core/types/index.d.ts → types/cute-widgets-base-core-types.d.ts} +0 -0
- /package/{core/utils/index.d.ts → types/cute-widgets-base-core-utils.d.ts} +0 -0
- /package/{core/index.d.ts → types/cute-widgets-base-core.d.ts} +0 -0
- /package/{dialog/index.d.ts → types/cute-widgets-base-dialog.d.ts} +0 -0
- /package/{divider/index.d.ts → types/cute-widgets-base-divider.d.ts} +0 -0
- /package/{grid-list/index.d.ts → types/cute-widgets-base-grid-list.d.ts} +0 -0
- /package/{layout/container/index.d.ts → types/cute-widgets-base-layout-container.d.ts} +0 -0
- /package/{layout/stack/index.d.ts → types/cute-widgets-base-layout-stack.d.ts} +0 -0
- /package/{layout/index.d.ts → types/cute-widgets-base-layout.d.ts} +0 -0
- /package/{list/index.d.ts → types/cute-widgets-base-list.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/cute-widgets-base-navbar.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/cute-widgets-base-paginator.d.ts} +0 -0
- /package/{select/index.d.ts → types/cute-widgets-base-select.d.ts} +0 -0
- /package/{slider/index.d.ts → types/cute-widgets-base-slider.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/cute-widgets-base-spinner.d.ts} +0 -0
- /package/{stepper/index.d.ts → types/cute-widgets-base-stepper.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/cute-widgets-base-tabs.d.ts} +0 -0
- /package/{timepicker/index.d.ts → types/cute-widgets-base-timepicker.d.ts} +0 -0
- /package/{toolbar/index.d.ts → types/cute-widgets-base-toolbar.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/cute-widgets-base-tooltip.d.ts} +0 -0
- /package/{index.d.ts → types/cute-widgets-base.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cute-widgets-base-core-directives.mjs","sources":["../../../../projects/cute-widgets/base/core/directives/src/disable-context-menu.ts","../../../../projects/cute-widgets/base/core/directives/src/click-outside.ts","../../../../projects/cute-widgets/base/core/directives/src/copy-to-clipboard.ts","../../../../projects/cute-widgets/base/core/directives/src/time-ago.ts","../../../../projects/cute-widgets/base/core/directives/src/svg-symbol.ts","../../../../projects/cute-widgets/base/core/directives/src/icon-link.ts","../../../../projects/cute-widgets/base/core/directives/src/focus-initial.ts","../../../../projects/cute-widgets/base/core/directives/cute-widgets-base-core-directives.ts"],"sourcesContent":["/**\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, HostListener } from '@angular/core';\r\n\r\n/**\r\n * Allows users to disable the context menu that appears when they right-click\r\n */\r\n@Directive({\r\n selector: '[cuteDisableContextMenu]',\r\n standalone: true,\r\n})\r\nexport class CuteDisableContextMenu {\r\n @HostListener('contextmenu', ['$event'])\r\n onContextMenu(event: Event): void {\r\n event.preventDefault();\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, Output, EventEmitter, HostListener, inject} from '@angular/core';\r\n\r\n/**\r\n * Tracks a click outside the target element.\r\n * @example\r\n * <div (cuteClickOutside)=\"closeDropdown()\">\r\n * <button (click)=\"toggleDropdown()\">Toggle Dropdown</button>\r\n * <div *ngIf=\"dropdownOpen\" class=\"dropdown\">\r\n * Dropdown content\r\n * </div>\r\n * </div>\r\n */\r\n@Directive({\r\n selector: '[cuteClickOutside]'\r\n})\r\nexport class CuteClickOutside {\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Emitted when the user clicks on a document outside the parent element. */\r\n @Output() cuteClickOutside = new EventEmitter<MouseEvent>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('window:click', ['$event'])\r\n onClick(event: MouseEvent): void {\r\n if (!this._elementRef.nativeElement.contains(event.target)) {\r\n this.cuteClickOutside.emit(event);\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 {Directive, Input, ElementRef, HostListener, inject, Output, EventEmitter} from '@angular/core';\r\n\r\n/**\r\n * Allows users to copy a text to _system_ clipboard using the `Clipboard API`. The Clipboard API allows users to\r\n * programmatically read and write text and other kinds of data to and from the system clipboard in _secure contexts_.\r\n *\r\n * @example\r\n * ```HTML\r\n * <button [cuteCopyToClipboard]=\"'Text to copy'\"> Copy to Clipboard </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[cuteCopyToClipboard]',\r\n standalone: true,\r\n})\r\nexport class CuteCopyToClipboard {\r\n private el = inject(ElementRef);\r\n\r\n /** Text to copy to clipboard when the user clicks on the element that directive belongs to */\r\n @Input(\"cuteCopyToClipboard\") data?: string | ClipboardItem | ClipboardItems | (() => string|ClipboardItem|ClipboardItems);\r\n\r\n /** Emits when some text is copied to the clipboard. The emitted value indicates whether copying was successful. */\r\n @Output() cuteCopyToClipboardCopied = new EventEmitter<boolean>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('click')\r\n onClick() {\r\n if (this.data) {\r\n if (window.isSecureContext) {\r\n try {\r\n let dataToWrite;\r\n if (this.data instanceof Function) {\r\n dataToWrite = this.data()\r\n } else {\r\n dataToWrite = this.data;\r\n }\r\n if (typeof dataToWrite === \"string\") {\r\n navigator.clipboard\r\n .writeText(dataToWrite)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n } else {\r\n let items: ClipboardItems;\r\n if (dataToWrite instanceof ClipboardItem) {\r\n items = [dataToWrite];\r\n } else {\r\n items = dataToWrite;\r\n }\r\n navigator.clipboard\r\n .write(items)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n }\r\n } catch (err: any) {\r\n console.error(err.message);\r\n }\r\n } else {\r\n console.error(\"The Clipboard API is available only in secure contexts (HTTPS)\");\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n } else {\r\n this.cuteCopyToClipboardCopied.next(false);\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 {Directive, Input, ElementRef, Renderer2, OnChanges, SimpleChanges, inject} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteTimeAgo]',\r\n standalone: true,\r\n})\r\nexport class CuteTimeAgo implements OnChanges {\r\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private renderer = inject(Renderer2);\r\n\r\n @Input() cuteTimeAgo?: Date;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes[\"cuteTimeAgo\"]) {\r\n this.updateTimeAgo();\r\n }\r\n }\r\n\r\n private updateTimeAgo(): void {\r\n if (this.cuteTimeAgo instanceof Date) {\r\n const timeDifference = Date.now() - this.cuteTimeAgo.getTime();\r\n const secondsAgo = Math.floor(timeDifference / 1000);\r\n\r\n let text: string;\r\n\r\n if (secondsAgo < 60) {\r\n text = 'just now';\r\n } else if (secondsAgo < 3600) {\r\n const minutes = Math.floor(secondsAgo / 60);\r\n text = `${minutes} minute${minutes > 1 ? 's' : ''} ago`;\r\n } else if (secondsAgo < 86400) {\r\n const hours = Math.floor(secondsAgo / 3600);\r\n text = `${hours} hour${hours > 1 ? 's' : ''} ago`;\r\n } else {\r\n const days = Math.floor(secondsAgo / 86400);\r\n text = `${days} day${days > 1 ? 's' : ''} ago`;\r\n }\r\n\r\n this.renderer.setProperty(this.el.nativeElement, 'textContent', text);\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 {Directive, ElementRef, inject, Input, OnInit, SecurityContext} from \"@angular/core\";\r\nimport {DomSanitizer} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Appends `<use href=[symbolPath]>` as a child element of the SVG.\r\n * @example\r\n * ```html\r\n * <svg width=\"1em\" height=\"1em\" [cuteSvgSymbol]=\"BOOTSTRAP_ICONS+'#collection'\"></svg>\r\n * ```\r\n */\r\n@Directive({\r\n selector: 'svg[cuteSvgSymbol]',\r\n host: {\r\n '[attr.cuteSvgSymbol]': 'null',\r\n 'ngSkipHydration': 'true',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSvgSymbol implements OnInit {\r\n private _elementRef = inject<ElementRef<SVGElement>>(ElementRef);\r\n private _sanitizer = inject(DomSanitizer);\r\n\r\n /** Path to SVG **symbol** element including its `id` prefixed with **#**. */\r\n @Input({alias: \"cuteSvgSymbol\", required: true}) svgSymbol: string|null = null ;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit() {\r\n const url = this._sanitizer.sanitize(SecurityContext.URL, this.svgSymbol);\r\n if (url) {\r\n this._elementRef.nativeElement.innerHTML = `<use href=\"${url}\"></use>`;\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\nimport {booleanAttribute, Directive, HostAttributeToken, inject, Input} from \"@angular/core\";\r\n\r\n/**\r\n * The icon link helper directive modifies the default link styles to enhance their appearance and\r\n * quickly align any pairing of icon and text.\r\n */\r\n@Directive({\r\n selector: 'a[cuteIconLink]',\r\n exportAs: 'cuteIconLink',\r\n host: {\r\n 'class': 'icon-link',\r\n '[class.icon-link-hover]': 'hovered',\r\n //'[style.cursor]': 'noHRef ? \"pointer\" : undefined',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteIconLink /* extends ... */ {\r\n\r\n protected noHRef: boolean = false;\r\n\r\n /** Whether to move the icon to the right on hover. */\r\n @Input({transform: booleanAttribute})\r\n hovered: boolean = false;\r\n\r\n constructor() {\r\n const href = inject(new HostAttributeToken(\"href\"), {optional: true});\r\n this.noHRef = !href;\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 {Directive} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteFocusInitial]',\r\n standalone: true,\r\n host: {\r\n '[attr.cdkFocusInitial]': 'true',\r\n }\r\n})\r\nexport class CuteFocusInitial {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAOG;AAGH;;AAEG;MAKU,sBAAsB,CAAA;AAEjC,IAAA,aAAa,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;IACxB;+GAJW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJl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,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;AALxB,EAAA,CAAA,wBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,oBAAkB,UAAA,EAAA,CAAA;kBAV1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,WAAW;AACpB,wBAAA,yBAAyB,EAAE,SAAS;;AAErC,qBAAA;AACD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAME,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;;;AC9BtC;;;;;;;AAOG;MAUU,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,wBAAwB,EAAE,MAAM;AACjC;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cute-widgets-base-core-directives.mjs","sources":["../../../../projects/cute-widgets/base/core/directives/src/disable-context-menu.ts","../../../../projects/cute-widgets/base/core/directives/src/click-outside.ts","../../../../projects/cute-widgets/base/core/directives/src/copy-to-clipboard.ts","../../../../projects/cute-widgets/base/core/directives/src/time-ago.ts","../../../../projects/cute-widgets/base/core/directives/src/svg-symbol.ts","../../../../projects/cute-widgets/base/core/directives/src/icon-link.ts","../../../../projects/cute-widgets/base/core/directives/src/focus-initial.ts","../../../../projects/cute-widgets/base/core/directives/cute-widgets-base-core-directives.ts"],"sourcesContent":["/**\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, HostListener } from '@angular/core';\r\n\r\n/**\r\n * Allows users to disable the context menu that appears when they right-click\r\n */\r\n@Directive({\r\n selector: '[cuteDisableContextMenu]',\r\n standalone: true,\r\n})\r\nexport class CuteDisableContextMenu {\r\n @HostListener('contextmenu', ['$event'])\r\n onContextMenu(event: Event): void {\r\n event.preventDefault();\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, Output, EventEmitter, HostListener, inject} from '@angular/core';\r\n\r\n/**\r\n * Tracks a click outside the target element.\r\n * @example\r\n * <div (cuteClickOutside)=\"closeDropdown()\">\r\n * <button (click)=\"toggleDropdown()\">Toggle Dropdown</button>\r\n * <div *ngIf=\"dropdownOpen\" class=\"dropdown\">\r\n * Dropdown content\r\n * </div>\r\n * </div>\r\n */\r\n@Directive({\r\n selector: '[cuteClickOutside]'\r\n})\r\nexport class CuteClickOutside {\r\n private _elementRef = inject(ElementRef);\r\n\r\n /** Emitted when the user clicks on a document outside the parent element. */\r\n @Output() cuteClickOutside = new EventEmitter<MouseEvent>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('window:click', ['$event'])\r\n onClick(event: MouseEvent): void {\r\n if (!this._elementRef.nativeElement.contains(event.target)) {\r\n this.cuteClickOutside.emit(event);\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 {Directive, Input, ElementRef, HostListener, inject, Output, EventEmitter} from '@angular/core';\r\n\r\n/**\r\n * Allows users to copy a text to _system_ clipboard using the `Clipboard API`. The Clipboard API allows users to\r\n * programmatically read and write text and other kinds of data to and from the system clipboard in _secure contexts_.\r\n *\r\n * @example\r\n * ```HTML\r\n * <button [cuteCopyToClipboard]=\"'Text to copy'\"> Copy to Clipboard </button>\r\n * ```\r\n */\r\n@Directive({\r\n selector: '[cuteCopyToClipboard]',\r\n standalone: true,\r\n})\r\nexport class CuteCopyToClipboard {\r\n private el = inject(ElementRef);\r\n\r\n /** Text to copy to clipboard when the user clicks on the element that directive belongs to */\r\n @Input(\"cuteCopyToClipboard\") data?: string | ClipboardItem | ClipboardItems | (() => string|ClipboardItem|ClipboardItems);\r\n\r\n /** Emits when some text is copied to the clipboard. The emitted value indicates whether copying was successful. */\r\n @Output() cuteCopyToClipboardCopied = new EventEmitter<boolean>();\r\n\r\n constructor() {}\r\n\r\n @HostListener('click')\r\n onClick() {\r\n if (this.data) {\r\n if (window.isSecureContext) {\r\n try {\r\n let dataToWrite;\r\n if (this.data instanceof Function) {\r\n dataToWrite = this.data()\r\n } else {\r\n dataToWrite = this.data;\r\n }\r\n if (typeof dataToWrite === \"string\") {\r\n navigator.clipboard\r\n .writeText(dataToWrite)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n } else {\r\n let items: ClipboardItems;\r\n if (dataToWrite instanceof ClipboardItem) {\r\n items = [dataToWrite];\r\n } else {\r\n items = dataToWrite;\r\n }\r\n navigator.clipboard\r\n .write(items)\r\n .then(() => this.cuteCopyToClipboardCopied.next(true))\r\n .catch(() => {\r\n this.cuteCopyToClipboardCopied.next(false);\r\n });\r\n }\r\n } catch (err: any) {\r\n console.error(err.message);\r\n }\r\n } else {\r\n console.error(\"The Clipboard API is available only in secure contexts (HTTPS)\");\r\n this.cuteCopyToClipboardCopied.next(false);\r\n }\r\n } else {\r\n this.cuteCopyToClipboardCopied.next(false);\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 {Directive, Input, ElementRef, Renderer2, OnChanges, SimpleChanges, inject} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteTimeAgo]',\r\n standalone: true,\r\n})\r\nexport class CuteTimeAgo implements OnChanges {\r\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private renderer = inject(Renderer2);\r\n\r\n @Input() cuteTimeAgo?: Date;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes[\"cuteTimeAgo\"]) {\r\n this.updateTimeAgo();\r\n }\r\n }\r\n\r\n private updateTimeAgo(): void {\r\n if (this.cuteTimeAgo instanceof Date) {\r\n const timeDifference = Date.now() - this.cuteTimeAgo.getTime();\r\n const secondsAgo = Math.floor(timeDifference / 1000);\r\n\r\n let text: string;\r\n\r\n if (secondsAgo < 60) {\r\n text = 'just now';\r\n } else if (secondsAgo < 3600) {\r\n const minutes = Math.floor(secondsAgo / 60);\r\n text = `${minutes} minute${minutes > 1 ? 's' : ''} ago`;\r\n } else if (secondsAgo < 86400) {\r\n const hours = Math.floor(secondsAgo / 3600);\r\n text = `${hours} hour${hours > 1 ? 's' : ''} ago`;\r\n } else {\r\n const days = Math.floor(secondsAgo / 86400);\r\n text = `${days} day${days > 1 ? 's' : ''} ago`;\r\n }\r\n\r\n this.renderer.setProperty(this.el.nativeElement, 'textContent', text);\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 {Directive, ElementRef, inject, Input, OnInit, SecurityContext} from \"@angular/core\";\r\nimport {DomSanitizer} from \"@angular/platform-browser\";\r\n\r\n/**\r\n * Appends `<use href=[symbolPath]>` as a child element of the SVG.\r\n * @example\r\n * ```html\r\n * <svg width=\"1em\" height=\"1em\" [cuteSvgSymbol]=\"BOOTSTRAP_ICONS+'#collection'\"></svg>\r\n * ```\r\n */\r\n@Directive({\r\n selector: 'svg[cuteSvgSymbol]',\r\n host: {\r\n '[attr.cuteSvgSymbol]': 'null',\r\n 'ngSkipHydration': 'true',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSvgSymbol implements OnInit {\r\n private _elementRef = inject<ElementRef<SVGElement>>(ElementRef);\r\n private _sanitizer = inject(DomSanitizer);\r\n\r\n /** Path to SVG **symbol** element including its `id` prefixed with **#**. */\r\n @Input({alias: \"cuteSvgSymbol\", required: true}) svgSymbol: string|null = null ;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit() {\r\n const url = this._sanitizer.sanitize(SecurityContext.URL, this.svgSymbol);\r\n if (url) {\r\n this._elementRef.nativeElement.innerHTML = `<use href=\"${url}\"></use>`;\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\nimport {booleanAttribute, Directive, HostAttributeToken, inject, Input} from \"@angular/core\";\r\n\r\n/**\r\n * The icon link helper directive modifies the default link styles to enhance their appearance and\r\n * quickly align any pairing of icon and text.\r\n */\r\n@Directive({\r\n selector: 'a[cuteIconLink]',\r\n exportAs: 'cuteIconLink',\r\n host: {\r\n 'class': 'icon-link',\r\n '[class.icon-link-hover]': 'hovered',\r\n //'[style.cursor]': 'noHRef ? \"pointer\" : undefined',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteIconLink /* extends ... */ {\r\n\r\n protected noHRef: boolean = false;\r\n\r\n /** Whether to move the icon to the right on hover. */\r\n @Input({transform: booleanAttribute})\r\n hovered: boolean = false;\r\n\r\n constructor() {\r\n const href = inject(new HostAttributeToken(\"href\"), {optional: true});\r\n this.noHRef = !href;\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 {Directive} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cuteFocusInitial]',\r\n standalone: true,\r\n host: {\r\n '[attr.cdkFocusInitial]': 'true',\r\n }\r\n})\r\nexport class CuteFocusInitial {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAOG;AAGH;;AAEG;MAKU,sBAAsB,CAAA;AAEjC,IAAA,aAAa,CAAC,KAAY,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE;IACxB;8GAJW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJ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A,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;AALxB,EAAA,CAAA,wBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,oBAAkB,UAAA,EAAA,CAAA;kBAV1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,WAAW;AACpB,wBAAA,yBAAyB,EAAE,SAAS;;AAErC,qBAAA;AACD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAME,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;;;AC9BtC;;;;;;;AAOG;MAUU,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,wBAAwB,EAAE,MAAM;AACjC;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -17,10 +17,10 @@ class ShowOnDirtyErrorStateMatcher {
|
|
|
17
17
|
isErrorState(control, form) {
|
|
18
18
|
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ShowOnDirtyErrorStateMatcher }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
|
|
24
24
|
type: Injectable
|
|
25
25
|
}] });
|
|
26
26
|
/** Provider that defines how form controls behave in regard to displaying error messages. */
|
|
@@ -28,10 +28,10 @@ class ErrorStateMatcher {
|
|
|
28
28
|
isErrorState(control, form) {
|
|
29
29
|
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
32
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' }); }
|
|
33
33
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ErrorStateMatcher, decorators: [{
|
|
35
35
|
type: Injectable,
|
|
36
36
|
args: [{ providedIn: 'root' }]
|
|
37
37
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cute-widgets-base-core-error.mjs","sources":["../../../../projects/cute-widgets/base/core/error/src/error-options.ts","../../../../projects/cute-widgets/base/core/error/src/error-state.ts","../../../../projects/cute-widgets/base/core/error/cute-widgets-base-core-error.ts"],"sourcesContent":["/**\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 {Injectable} from '@angular/core';\r\nimport {FormGroupDirective, NgForm, AbstractControl} from '@angular/forms';\r\n\r\n/** Error state matcher that matches when a control is invalid and dirty. */\r\n@Injectable()\r\nexport class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.dirty || (form && form.submitted)));\r\n }\r\n}\r\n\r\n/** Provider that defines how form controls behave in regard to displaying error messages. */\r\n@Injectable({providedIn: 'root'})\r\nexport class ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.touched || (form && form.submitted)));\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 {AbstractControl, FormGroupDirective, NgControl, NgForm} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {ErrorStateMatcher} from './error-options';\r\nimport {AbstractConstructor, Constructor} from '@cute-widgets/base/core/types';\r\n\r\n/** @docs-private */\r\nexport interface CanUpdateErrorState {\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState(): void;\r\n /** Whether the component is in an error state. */\r\n errorState: boolean;\r\n /** An object used to control the error state of the component. */\r\n errorStateMatcher: ErrorStateMatcher;\r\n}\r\n\r\ntype CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &\r\n AbstractConstructor<CanUpdateErrorState>;\r\n\r\n/** @docs-private */\r\nexport interface HasErrorState {\r\n _parentFormGroup: FormGroupDirective;\r\n _parentForm: NgForm;\r\n _defaultErrorStateMatcher: ErrorStateMatcher;\r\n\r\n // These properties are defined as per the `CuteFormFieldControl` interface. Since\r\n // this mixin is commonly used with custom form-field controls, we respect the\r\n // properties (also with the public name they need according to `CuteFormFieldControl`).\r\n ngControl: NgControl;\r\n stateChanges: Subject<void>;\r\n}\r\n\r\n/**\r\n * Class that tracks the error state of a component.\r\n * @docs-private\r\n */\r\nexport class _ErrorStateTracker {\r\n /** Whether the tracker is currently in an error state. */\r\n errorState = false;\r\n\r\n /** User-defined matcher for the error state. */\r\n matcher!: ErrorStateMatcher;\r\n\r\n constructor(\r\n private _defaultMatcher: ErrorStateMatcher | null,\r\n public ngControl: NgControl | null,\r\n private _parentFormGroup: FormGroupDirective | null,\r\n private _parentForm: NgForm | null,\r\n private _stateChanges: Subject<void>,\r\n ) {}\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n const oldState = this.errorState;\r\n const parent = this._parentFormGroup || this._parentForm;\r\n const matcher = this.matcher || this._defaultMatcher;\r\n const control = this.ngControl ? (this.ngControl.control as AbstractControl) : null;\r\n // Note: the null check here shouldn't be necessary, but there's an internal\r\n // test that appears to pass an object whose `isErrorState` isn't a function.\r\n const newState =\r\n typeof matcher?.isErrorState === 'function' ? matcher.isErrorState(control, parent) : false;\r\n\r\n if (newState !== oldState) {\r\n this.errorState = newState;\r\n this._stateChanges.next();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Mixin to augment a directive with updateErrorState method.\r\n * For component with `errorState` and need to update `errorState`.\r\n */\r\nexport function mixinErrorState<T extends AbstractConstructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T;\r\nexport function mixinErrorState<T extends Constructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T {\r\n return class extends base {\r\n private _tracker: _ErrorStateTracker | undefined;\r\n\r\n /** Whether the component is in an error state. */\r\n get errorState() {\r\n return this._getTracker().errorState;\r\n }\r\n set errorState(value: boolean) {\r\n this._getTracker().errorState = value;\r\n }\r\n\r\n /** An object used to control the error state of the component. */\r\n get errorStateMatcher() {\r\n return this._getTracker().matcher;\r\n }\r\n set errorStateMatcher(value: ErrorStateMatcher) {\r\n this._getTracker().matcher = value;\r\n }\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n this._getTracker().updateErrorState();\r\n }\r\n\r\n private _getTracker() {\r\n if (!this._tracker) {\r\n this._tracker = new _ErrorStateTracker(\r\n this._defaultErrorStateMatcher,\r\n this.ngControl,\r\n this._parentFormGroup,\r\n this._parentForm,\r\n this.stateChanges,\r\n );\r\n }\r\n\r\n return this._tracker;\r\n }\r\n\r\n constructor(...args: any[]) {\r\n super(...args);\r\n }\r\n };\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;AAUG;AAIH;MAEa,4BAA4B,CAAA;IACrC,YAAY,CAAC,OAA+B,EAAE,IAAwC,EAAA;QAClF,OAAO,CAAC,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACxF
|
|
1
|
+
{"version":3,"file":"cute-widgets-base-core-error.mjs","sources":["../../../../projects/cute-widgets/base/core/error/src/error-options.ts","../../../../projects/cute-widgets/base/core/error/src/error-state.ts","../../../../projects/cute-widgets/base/core/error/cute-widgets-base-core-error.ts"],"sourcesContent":["/**\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 {Injectable} from '@angular/core';\r\nimport {FormGroupDirective, NgForm, AbstractControl} from '@angular/forms';\r\n\r\n/** Error state matcher that matches when a control is invalid and dirty. */\r\n@Injectable()\r\nexport class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.dirty || (form && form.submitted)));\r\n }\r\n}\r\n\r\n/** Provider that defines how form controls behave in regard to displaying error messages. */\r\n@Injectable({providedIn: 'root'})\r\nexport class ErrorStateMatcher {\r\n isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && (control.touched || (form && form.submitted)));\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 {AbstractControl, FormGroupDirective, NgControl, NgForm} from '@angular/forms';\r\nimport {Subject} from 'rxjs';\r\nimport {ErrorStateMatcher} from './error-options';\r\nimport {AbstractConstructor, Constructor} from '@cute-widgets/base/core/types';\r\n\r\n/** @docs-private */\r\nexport interface CanUpdateErrorState {\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState(): void;\r\n /** Whether the component is in an error state. */\r\n errorState: boolean;\r\n /** An object used to control the error state of the component. */\r\n errorStateMatcher: ErrorStateMatcher;\r\n}\r\n\r\ntype CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &\r\n AbstractConstructor<CanUpdateErrorState>;\r\n\r\n/** @docs-private */\r\nexport interface HasErrorState {\r\n _parentFormGroup: FormGroupDirective;\r\n _parentForm: NgForm;\r\n _defaultErrorStateMatcher: ErrorStateMatcher;\r\n\r\n // These properties are defined as per the `CuteFormFieldControl` interface. Since\r\n // this mixin is commonly used with custom form-field controls, we respect the\r\n // properties (also with the public name they need according to `CuteFormFieldControl`).\r\n ngControl: NgControl;\r\n stateChanges: Subject<void>;\r\n}\r\n\r\n/**\r\n * Class that tracks the error state of a component.\r\n * @docs-private\r\n */\r\nexport class _ErrorStateTracker {\r\n /** Whether the tracker is currently in an error state. */\r\n errorState = false;\r\n\r\n /** User-defined matcher for the error state. */\r\n matcher!: ErrorStateMatcher;\r\n\r\n constructor(\r\n private _defaultMatcher: ErrorStateMatcher | null,\r\n public ngControl: NgControl | null,\r\n private _parentFormGroup: FormGroupDirective | null,\r\n private _parentForm: NgForm | null,\r\n private _stateChanges: Subject<void>,\r\n ) {}\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n const oldState = this.errorState;\r\n const parent = this._parentFormGroup || this._parentForm;\r\n const matcher = this.matcher || this._defaultMatcher;\r\n const control = this.ngControl ? (this.ngControl.control as AbstractControl) : null;\r\n // Note: the null check here shouldn't be necessary, but there's an internal\r\n // test that appears to pass an object whose `isErrorState` isn't a function.\r\n const newState =\r\n typeof matcher?.isErrorState === 'function' ? matcher.isErrorState(control, parent) : false;\r\n\r\n if (newState !== oldState) {\r\n this.errorState = newState;\r\n this._stateChanges.next();\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Mixin to augment a directive with updateErrorState method.\r\n * For component with `errorState` and need to update `errorState`.\r\n */\r\nexport function mixinErrorState<T extends AbstractConstructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T;\r\nexport function mixinErrorState<T extends Constructor<HasErrorState>>(\r\n base: T,\r\n): CanUpdateErrorStateCtor & T {\r\n return class extends base {\r\n private _tracker: _ErrorStateTracker | undefined;\r\n\r\n /** Whether the component is in an error state. */\r\n get errorState() {\r\n return this._getTracker().errorState;\r\n }\r\n set errorState(value: boolean) {\r\n this._getTracker().errorState = value;\r\n }\r\n\r\n /** An object used to control the error state of the component. */\r\n get errorStateMatcher() {\r\n return this._getTracker().matcher;\r\n }\r\n set errorStateMatcher(value: ErrorStateMatcher) {\r\n this._getTracker().matcher = value;\r\n }\r\n\r\n /** Updates the error state based on the provided error state matcher. */\r\n updateErrorState() {\r\n this._getTracker().updateErrorState();\r\n }\r\n\r\n private _getTracker() {\r\n if (!this._tracker) {\r\n this._tracker = new _ErrorStateTracker(\r\n this._defaultErrorStateMatcher,\r\n this.ngControl,\r\n this._parentFormGroup,\r\n this._parentForm,\r\n this.stateChanges,\r\n );\r\n }\r\n\r\n return this._tracker;\r\n }\r\n\r\n constructor(...args: any[]) {\r\n super(...args);\r\n }\r\n };\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;AAUG;AAIH;MAEa,4BAA4B,CAAA;IACrC,YAAY,CAAC,OAA+B,EAAE,IAAwC,EAAA;QAClF,OAAO,CAAC,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACxF;8GAHS,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5B,4BAA4B,EAAA,CAAA,CAAA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AG,IAAW,EAAA;AACtB,YAAA,KAAK,CAAC,GAAG,IAAI,CAAC;QAClB;KACH;AACL;;ACnIA;;AAEG;;;;"}
|
|
@@ -20,10 +20,10 @@ import { CommonModule } from '@angular/common';
|
|
|
20
20
|
* counted by checking the query list's length.
|
|
21
21
|
*/
|
|
22
22
|
class CuteLine {
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteLine, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: CuteLine, isStandalone: true, selector: "[cute-line], [cuteLine]", host: { classAttribute: "cute-line" }, ngImport: i0 }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteLine, decorators: [{
|
|
27
27
|
type: Directive,
|
|
28
28
|
args: [{
|
|
29
29
|
selector: '[cute-line], [cuteLine]',
|
|
@@ -66,11 +66,11 @@ const TYPES = [
|
|
|
66
66
|
CuteLine
|
|
67
67
|
];
|
|
68
68
|
class CuteLineModule {
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
71
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
70
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: CuteLineModule, imports: [CommonModule, CuteLine], exports: [CuteLine] }); }
|
|
71
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteLineModule, imports: [CommonModule] }); }
|
|
72
72
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteLineModule, decorators: [{
|
|
74
74
|
type: NgModule,
|
|
75
75
|
args: [{
|
|
76
76
|
imports: [CommonModule, ...TYPES],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cute-widgets-base-core-line.mjs","sources":["../../../../projects/cute-widgets/base/core/line/src/line.ts","../../../../projects/cute-widgets/base/core/line/src/line.module.ts","../../../../projects/cute-widgets/base/core/line/cute-widgets-base-core-line.ts"],"sourcesContent":["/**\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;AAUG;AAIH;;;;AAIG;MAMU,QAAQ,CAAA
|
|
1
|
+
{"version":3,"file":"cute-widgets-base-core-line.mjs","sources":["../../../../projects/cute-widgets/base/core/line/src/line.ts","../../../../projects/cute-widgets/base/core/line/src/line.module.ts","../../../../projects/cute-widgets/base/core/line/cute-widgets-base-core-line.ts"],"sourcesContent":["/**\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;AAUG;AAIH;;;;AAIG;MAMU,QAAQ,CAAA;8GAAR,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE,EAAC,OAAO,EAAE,WAAW,EAAC;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AAGD;;AAEG;AACG,SAAU,QAAQ,CACtB,KAAyB,EACzB,OAAgC,EAChC,MAAM,GAAG,MAAM,EAAA;;;AAIf,IAAA,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAC,MAAM,EAAC,KAAI;QAC1D,QAAQ,CAAC,OAAO,EAAE,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,EAAE,KAAK,CAAC;QAC5C,QAAQ,CAAC,OAAO,EAAE,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,EAAE,KAAK,CAAC;QAC5C,QAAQ,CAAC,OAAO,EAAE,CAAA,EAAG,MAAM,CAAA,WAAA,CAAa,EAAE,KAAK,CAAC;QAEhD,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,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EAAE,KAAK;AACd,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -29,9 +29,11 @@ class CuteNavLink extends CuteFocusableControl {
|
|
|
29
29
|
this._document = inject(DOCUMENT);
|
|
30
30
|
this._ngZone = inject(NgZone);
|
|
31
31
|
this.nav = inject(CUTE_NAV, { optional: true });
|
|
32
|
+
this._isAnchor = false;
|
|
32
33
|
this.toThemeColor = toThemeColor;
|
|
33
34
|
/** Whether the link is active. */
|
|
34
35
|
this.active = false;
|
|
36
|
+
this._isAnchor = (this._nativeElement.tagName == "A");
|
|
35
37
|
this._focusMonitor.monitor(this._elementRef)
|
|
36
38
|
.pipe(takeUntilDestroyed())
|
|
37
39
|
.subscribe(origin => {
|
|
@@ -97,10 +99,10 @@ class CuteNavLink extends CuteFocusableControl {
|
|
|
97
99
|
this.role = "tab";
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
103
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.0", type: CuteNavLink, isStandalone: true, selector: "a[cute-nav-link], a[cuteNavLink],\n button[cute-nav-link], button[cuteNavLink]\n ", inputs: { active: ["active", "active", booleanAttribute], ariaControls: ["aria-controls", "ariaControls"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.active": "active", "class.disabled": "disabled", "attr.disabled": "_isAnchor && disabled ? true : null", "attr.aria-disabled": "disabled", "attr.aria-current": "active ? \"page\" : null", "attr.aria-selected": "active || null", "aria-controls": "ariaControls || getAriaControls()", "attr.id": "id || null", "attr.role": "role || null", "attr.tabindex": "active && !disabled ? 0 : -1", "style.--bs-btn-border-radius": "0", "style.--bs-navbar-active-color": "nav && !nav.isTab() ? \"var(\"+(color ? \"--bs-\"+toThemeColor(color)+\"-text-emphasis\" : \"--bs-emphasis-color\")+\")\" : undefined" }, classAttribute: "cute-nav-link nav-link" }, exportAs: ["cuteNavLink"], usesInheritance: true, ngImport: i0 }); }
|
|
102
104
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavLink, decorators: [{
|
|
104
106
|
type: Directive,
|
|
105
107
|
args: [{
|
|
106
108
|
selector: `a[cute-nav-link], a[cuteNavLink],
|
|
@@ -112,7 +114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
112
114
|
//'[class]': 'color ? "link-"+toThemeColor(color) : undefined',
|
|
113
115
|
'[class.active]': 'active',
|
|
114
116
|
'[class.disabled]': 'disabled',
|
|
115
|
-
'[disabled]': 'disabled',
|
|
117
|
+
'[attr.disabled]': '_isAnchor && disabled ? true : null',
|
|
116
118
|
'[attr.aria-disabled]': 'disabled',
|
|
117
119
|
'[attr.aria-current]': 'active ? "page" : null',
|
|
118
120
|
'[attr.aria-selected]': 'active || null',
|
|
@@ -121,7 +123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
121
123
|
'[attr.role]': 'role || null',
|
|
122
124
|
'[attr.tabindex]': 'active && !disabled ? 0 : -1',
|
|
123
125
|
'[style.--bs-btn-border-radius]': '0', // bootstrap's tab-link already stylized with radius of top angles
|
|
124
|
-
'[style.--bs-navbar-active-color]': '!nav.isTab() ? "var("+(color ? "--bs-"+toThemeColor(color)+"-text-emphasis" : "--bs-emphasis-color")+")" : undefined',
|
|
126
|
+
'[style.--bs-navbar-active-color]': 'nav && !nav.isTab() ? "var("+(color ? "--bs-"+toThemeColor(color)+"-text-emphasis" : "--bs-emphasis-color")+")" : undefined',
|
|
125
127
|
'(click)': 'onClick($event)',
|
|
126
128
|
//'(touchstart)': 'onTouchStart($event)',
|
|
127
129
|
},
|
|
@@ -150,10 +152,10 @@ class CuteNavContent /* extends ... */ {
|
|
|
150
152
|
constructor() {
|
|
151
153
|
this.template = inject(TemplateRef);
|
|
152
154
|
}
|
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
154
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavContent /* extends ... */, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
156
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: CuteNavContent /* extends ... */, isStandalone: true, selector: "ng-template[cuteNavContent], ng-template[cute-nav-content]", exportAs: ["cuteNavContent"], ngImport: i0 }); }
|
|
155
157
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavContent /* extends ... */, decorators: [{
|
|
157
159
|
type: Directive,
|
|
158
160
|
args: [{
|
|
159
161
|
selector: 'ng-template[cuteNavContent], ng-template[cute-nav-content]',
|
|
@@ -227,8 +229,8 @@ class CuteNavItem extends CuteLayoutControl {
|
|
|
227
229
|
this._contentPortal = new TemplatePortal(contentTemplate, this._viewContainerRef);
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
231
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "
|
|
232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
233
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.0", type: CuteNavItem, isStandalone: true, selector: "cute-nav-item, [cute-nav-item], [cuteNavItem]", inputs: { preserveTabContent: ["preserveTabContent", "preserveTabContent", booleanAttribute] }, host: { properties: { "attr.role": "role || null" }, classAttribute: "cute-nav-item nav-item" }, providers: [{ provide: CUTE_NAV_ITEM, useExisting: CuteNavItem }], queries: [{ propertyName: "navLink", first: true, predicate: CuteNavLink, descendants: true }, { propertyName: "_navContent", first: true, predicate: CuteNavContent, descendants: true, static: true }], viewQueries: [{ propertyName: "_staticContentTemplate", first: true, predicate: ["staticContent"], descendants: true, read: TemplateRef, static: true }], exportAs: ["cuteNavItem"], usesInheritance: true, ngImport: i0, template: `
|
|
232
234
|
<ng-content select="[cute-nav-link], [cuteNavLink]"></ng-content>
|
|
233
235
|
<ng-content select="[cute-nav-content], [cuteNavContent]"></ng-content>
|
|
234
236
|
<ng-template #staticContent>
|
|
@@ -236,7 +238,7 @@ class CuteNavItem extends CuteLayoutControl {
|
|
|
236
238
|
</ng-template>
|
|
237
239
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
238
240
|
}
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavItem, decorators: [{
|
|
240
242
|
type: Component,
|
|
241
243
|
args: [{
|
|
242
244
|
selector: 'cute-nav-item, [cute-nav-item], [cuteNavItem]',
|
|
@@ -592,10 +594,10 @@ class CuteNav extends CuteLayoutControl {
|
|
|
592
594
|
super.ngOnDestroy();
|
|
593
595
|
this._keyManager?.destroy();
|
|
594
596
|
}
|
|
595
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
596
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
597
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNav, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
598
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.0", type: CuteNav, isStandalone: true, selector: "[cute-nav], [cuteNav]", inputs: { navStyle: ["cuteNav", "navStyle"], orientation: "orientation", alignment: "alignment", stretchItems: "stretchItems", preserveTabContent: ["preserveTabContent", "preserveTabContent", booleanAttribute], animation: ["animation", "animation", booleanAttribute], autoSelect: ["autoSelect", "autoSelect", booleanAttribute], selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute] }, outputs: { selectedIndexChange: "selectedIndexChange", selectedLinkChange: "selectedLinkChange", selectedLinkChanging: "selectedLinkChanging", focusChange: "focusChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class.nav-tabs": "isTab()", "class.nav-pills": "navStyle==\"pills\"", "class.nav-underline": "navStyle==\"underline\"", "class.nav-fill": "stretchItems==\"fill\"", "class.nav-justified": "stretchItems==\"justified\"", "attr.aria-orientation": "orientation", "attr.role": "role || null", "class": "this.classBinding" }, classAttribute: "cute-nav nav" }, providers: [{ provide: CUTE_NAV, useExisting: CuteNav }], queries: [{ propertyName: "navItems", predicate: CuteNavItem, descendants: true }, { propertyName: "navLinks", predicate: CuteNavLink, descendants: true }], exportAs: ["cuteNav"], usesInheritance: true, ngImport: i0 }); }
|
|
597
599
|
}
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNav, decorators: [{
|
|
599
601
|
type: Directive,
|
|
600
602
|
args: [{
|
|
601
603
|
selector: '[cute-nav], [cuteNav]',
|
|
@@ -686,10 +688,10 @@ class CuteNavPaneOutlet extends CdkPortalOutlet {
|
|
|
686
688
|
}
|
|
687
689
|
});
|
|
688
690
|
}
|
|
689
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
690
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
691
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavPaneOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
692
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: CuteNavPaneOutlet, isStandalone: true, selector: "[cuteNavPaneOutlet]", inputs: { portal: ["cuteNavPaneOutlet", "portal"] }, exportAs: ["cuteNavPaneOutlet"], usesInheritance: true, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 }); }
|
|
691
693
|
}
|
|
692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavPaneOutlet, decorators: [{
|
|
693
695
|
type: Directive,
|
|
694
696
|
args: [{
|
|
695
697
|
selector: '[cuteNavPaneOutlet]',
|
|
@@ -739,17 +741,17 @@ class CuteNavPane extends CuteLayoutControl {
|
|
|
739
741
|
this._subs.unsubscribe();
|
|
740
742
|
}
|
|
741
743
|
}
|
|
742
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
743
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
744
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavPane, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
745
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.0", type: CuteNavPane, isStandalone: true, selector: "[cute-nav-pane], [cuteNavPane]", inputs: { index: ["index", "index", numberAttribute], item: "item" }, outputs: { hide: "hide", show: "show" }, host: { attributes: { "role": "tabpanel" }, properties: { "class.fade": "item?.nav?.animation", "class.active": "_active", "class.show": "_show", "attr.tabindex": "0", "attr.aria-labelledby": "ariaLabelledby || null" }, classAttribute: "cute-nav-pane tab-pane" }, exportAs: ["cuteNavPane"], usesInheritance: true, ngImport: i0 }); }
|
|
744
746
|
}
|
|
745
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavPane, decorators: [{
|
|
746
748
|
type: Directive,
|
|
747
749
|
args: [{
|
|
748
750
|
selector: '[cute-nav-pane], [cuteNavPane]',
|
|
749
751
|
exportAs: 'cuteNavPane',
|
|
750
752
|
host: {
|
|
751
753
|
'class': 'cute-nav-pane tab-pane',
|
|
752
|
-
'[class.fade]': 'item
|
|
754
|
+
'[class.fade]': 'item?.nav?.animation',
|
|
753
755
|
'[class.active]': '_active',
|
|
754
756
|
'[class.show]': '_show',
|
|
755
757
|
'[attr.tabindex]': '0', //'_active ? 0 : -1',
|
|
@@ -780,8 +782,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
780
782
|
class CuteNavOutlet /*implements AfterViewChecked*/ {
|
|
781
783
|
get nav() { return this._nav; }
|
|
782
784
|
set nav(value) { this._nav = value; }
|
|
783
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
784
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
785
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavOutlet /*implements AfterViewChecked*/, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: CuteNavOutlet /*implements AfterViewChecked*/, isStandalone: true, selector: "cute-nav-outlet", inputs: { nav: ["for", "nav"] }, host: { classAttribute: "cute-nav-outlet tab-content" }, exportAs: ["cuteNavOutlet"], ngImport: i0, template: `
|
|
785
787
|
@for (item of nav?.navItems; track item.id; let i=$index) {
|
|
786
788
|
<div cute-nav-pane
|
|
787
789
|
[index]="i"
|
|
@@ -793,7 +795,7 @@ class CuteNavOutlet /*implements AfterViewChecked*/ {
|
|
|
793
795
|
}
|
|
794
796
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: CuteNavPane, selector: "[cute-nav-pane], [cuteNavPane]", inputs: ["index", "item"], outputs: ["hide", "show"], exportAs: ["cuteNavPane"] }, { kind: "directive", type: CuteNavPaneOutlet, selector: "[cuteNavPaneOutlet]", inputs: ["cuteNavPaneOutlet"], exportAs: ["cuteNavPaneOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
795
797
|
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavOutlet /*implements AfterViewChecked*/, decorators: [{
|
|
797
799
|
type: Component,
|
|
798
800
|
args: [{ selector: 'cute-nav-outlet', exportAs: 'cuteNavOutlet', template: `
|
|
799
801
|
@for (item of nav?.navItems; track item.id; let i=$index) {
|
|
@@ -830,8 +832,8 @@ const TYPES = [
|
|
|
830
832
|
CuteNavPane,
|
|
831
833
|
];
|
|
832
834
|
class CuteNavModule {
|
|
833
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
834
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
835
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
836
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: CuteNavModule, imports: [CommonModule, CuteNav,
|
|
835
837
|
CuteNavItem,
|
|
836
838
|
CuteNavLink,
|
|
837
839
|
CuteNavOutlet,
|
|
@@ -842,9 +844,9 @@ class CuteNavModule {
|
|
|
842
844
|
CuteNavOutlet,
|
|
843
845
|
CuteNavContent,
|
|
844
846
|
CuteNavPane] }); }
|
|
845
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
847
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavModule, imports: [CommonModule, CuteNavOutlet] }); }
|
|
846
848
|
}
|
|
847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteNavModule, decorators: [{
|
|
848
850
|
type: NgModule,
|
|
849
851
|
args: [{
|
|
850
852
|
declarations: [],
|