@taiga-ui/kit 4.52.0-canary.a4e325d → 4.52.0-canary.e10b718
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/components/avatar/avatar.directive.d.ts +15 -0
- package/components/avatar/avatar.options.d.ts +1 -4
- package/components/avatar/index.d.ts +1 -1
- package/components/badge/badge.directive.d.ts +1 -1
- package/components/calendar-month/calendar-month.options.d.ts +1 -1
- package/components/checkbox/checkbox.component.d.ts +7 -18
- package/components/checkbox/checkbox.options.d.ts +5 -9
- package/components/files/file/file.options.d.ts +1 -1
- package/components/index.d.ts +0 -1
- package/components/input-chip/input-chip.options.d.ts +1 -1
- package/components/input-color/input-color.component.d.ts +2 -2
- package/components/input-color/input-color.options.d.ts +1 -1
- package/components/input-date/input-date.options.d.ts +1 -1
- package/components/input-number/input-number.options.d.ts +1 -1
- package/components/input-phone/input-phone.options.d.ts +1 -1
- package/components/input-time/input-time.options.d.ts +1 -1
- package/components/like/like.component.d.ts +4 -11
- package/components/like/like.options.d.ts +3 -4
- package/components/line-clamp/line-clamp.component.d.ts +6 -10
- package/components/pager/pager.component.d.ts +1 -1
- package/components/push/push.component.d.ts +1 -1
- package/components/radio/radio.component.d.ts +7 -8
- package/components/radio/radio.directive.d.ts +2 -2
- package/components/radio/radio.options.d.ts +2 -5
- package/components/segmented/segmented.component.d.ts +1 -3
- package/components/switch/switch.component.d.ts +7 -19
- package/components/switch/switch.options.d.ts +4 -8
- package/components/textarea/textarea.options.d.ts +1 -1
- package/directives/copy/copy.directive.d.ts +1 -2
- package/directives/copy/copy.options.d.ts +2 -2
- package/directives/highlight/highlight.directive.d.ts +1 -3
- package/directives/index.d.ts +0 -1
- package/directives/password/password.options.d.ts +1 -1
- package/directives/tooltip/tooltip.options.d.ts +1 -4
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +14 -15
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +74 -82
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +9 -8
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +6 -8
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +4 -6
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -19
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +19 -76
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +16 -9
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +8 -8
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +8 -9
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-drawer.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +26 -35
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +5 -14
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs +20 -17
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-color.mjs +9 -11
- package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +7 -8
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +13 -14
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +10 -11
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +19 -19
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +5 -8
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +6 -14
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +12 -13
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +16 -16
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +40 -33
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +29 -35
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +33 -31
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +11 -11
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +9 -9
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +9 -9
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +29 -31
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +24 -24
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +17 -17
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +5 -6
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +33 -38
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-select.mjs +13 -13
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +17 -17
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slides.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-stepper.mjs +11 -11
- package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +19 -65
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +20 -22
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +14 -15
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +31 -39
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +0 -1
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-copy.mjs +10 -11
- package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fade.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +6 -7
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +3 -3
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +6 -6
- package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
- package/package.json +5 -13
- package/styles/components/avatar.less +188 -0
- package/styles/components/block.less +1 -1
- package/styles/components/checkbox.less +13 -11
- package/styles/components/chip.less +1 -3
- package/styles/components/like.less +4 -9
- package/styles/components/pin.less +3 -6
- package/styles/components/switch.less +8 -8
- package/tokens/input-date-options.d.ts +1 -1
- package/components/avatar/avatar.component.d.ts +0 -15
- package/components/input-password/index.d.ts +0 -2
- package/components/input-password/input-password.component.d.ts +0 -16
- package/components/input-password/input-password.options.d.ts +0 -24
- package/directives/icon-badge/icon-badge.directive.d.ts +0 -9
- package/directives/icon-badge/index.d.ts +0 -1
- package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
- package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs +0 -47
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n standalone: true,\n selector: '[tuiHighlight]',\n providers: [ResizeObserverService],\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n})\nexport class TuiHighlight implements OnChanges {\n private readonly el = tuiInjectElement();\n private readonly renderer = inject(Renderer2);\n private readonly doc = inject(DOCUMENT);\n\n private readonly highlight: HTMLElement = this.setUpHighlight();\n private readonly treeWalker = this.doc.createTreeWalker(\n this.el,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n @Input()\n public tuiHighlight = '';\n\n @Input()\n public tuiHighlightColor = inject(TUI_HIGHLIGHT_OPTIONS).highlightColor;\n\n constructor() {\n inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.updateStyles());\n }\n\n public ngOnChanges(): void {\n this.updateStyles();\n }\n\n protected get match(): boolean {\n return this.indexOf(this.el.textContent) !== -1;\n }\n\n private updateStyles(): void {\n this.highlight.style.display = 'none';\n\n if (!this.match) {\n return;\n }\n\n this.treeWalker.currentNode = this.el;\n\n do {\n const index = this.indexOf(this.treeWalker.currentNode.nodeValue);\n\n if (index === -1) {\n continue;\n }\n\n const range = this.doc.createRange();\n\n range.setStart(this.treeWalker.currentNode, index);\n range.setEnd(this.treeWalker.currentNode, index + this.tuiHighlight.length);\n\n const hostRect = this.el.getBoundingClientRect();\n const {left, top, width, height} = range.getBoundingClientRect();\n const {style} = this.highlight;\n\n style.background = this.tuiHighlightColor;\n style.left = tuiPx(left - hostRect.left);\n style.top = tuiPx(top - hostRect.top);\n style.width = tuiPx(width);\n style.height = tuiPx(height);\n style.display = 'block';\n\n return;\n } while (this.treeWalker.nextNode());\n }\n\n private indexOf(source: string | null): number {\n return !source || !this.tuiHighlight\n ? -1\n : source.toLowerCase().indexOf(this.tuiHighlight.toLowerCase());\n }\n\n private setUpHighlight(): HTMLElement {\n const highlight = this.renderer.createElement('div');\n const {style} = highlight;\n\n style.background = this.tuiHighlightColor;\n style.zIndex = '-1';\n style.position = 'absolute';\n this.renderer.appendChild(this.el, highlight);\n\n return highlight;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CAAC;AACjF,IAAA,cAAc,EAAE,yCAAyC;AAC5D,CAAA;MAWY,YAAY,CAAA;AAkBrB,IAAA,WAAA,GAAA;QAjBiB,
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-highlight.mjs","sources":["../../../projects/kit/directives/highlight/highlight.directive.ts","../../../projects/kit/directives/highlight/taiga-ui-kit-directives-highlight.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, Input, type OnChanges, Renderer2} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const [TUI_HIGHLIGHT_OPTIONS, tuiHighlightOptionsProvider] = tuiCreateOptions({\n highlightColor: 'var(--tui-service-selection-background)',\n});\n\n@Directive({\n standalone: true,\n selector: '[tuiHighlight]',\n providers: [ResizeObserverService],\n host: {\n '[style.position]': '\"relative\"',\n '[style.zIndex]': '0',\n },\n})\nexport class TuiHighlight implements OnChanges {\n private readonly el = tuiInjectElement();\n private readonly renderer = inject(Renderer2);\n private readonly doc = inject(DOCUMENT);\n\n private readonly highlight: HTMLElement = this.setUpHighlight();\n private readonly treeWalker = this.doc.createTreeWalker(\n this.el,\n NodeFilter.SHOW_TEXT,\n svgNodeFilter,\n );\n\n @Input()\n public tuiHighlight = '';\n\n @Input()\n public tuiHighlightColor = inject(TUI_HIGHLIGHT_OPTIONS).highlightColor;\n\n constructor() {\n inject(ResizeObserverService, {self: true})\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.updateStyles());\n }\n\n public ngOnChanges(): void {\n this.updateStyles();\n }\n\n protected get match(): boolean {\n return this.indexOf(this.el.textContent) !== -1;\n }\n\n private updateStyles(): void {\n this.highlight.style.display = 'none';\n\n if (!this.match) {\n return;\n }\n\n this.treeWalker.currentNode = this.el;\n\n do {\n const index = this.indexOf(this.treeWalker.currentNode.nodeValue);\n\n if (index === -1) {\n continue;\n }\n\n const range = this.doc.createRange();\n\n range.setStart(this.treeWalker.currentNode, index);\n range.setEnd(this.treeWalker.currentNode, index + this.tuiHighlight.length);\n\n const hostRect = this.el.getBoundingClientRect();\n const {left, top, width, height} = range.getBoundingClientRect();\n const {style} = this.highlight;\n\n style.background = this.tuiHighlightColor;\n style.left = tuiPx(left - hostRect.left);\n style.top = tuiPx(top - hostRect.top);\n style.width = tuiPx(width);\n style.height = tuiPx(height);\n style.display = 'block';\n\n return;\n } while (this.treeWalker.nextNode());\n }\n\n private indexOf(source: string | null): number {\n return !source || !this.tuiHighlight\n ? -1\n : source.toLowerCase().indexOf(this.tuiHighlight.toLowerCase());\n }\n\n private setUpHighlight(): HTMLElement {\n const highlight = this.renderer.createElement('div');\n const {style} = highlight;\n\n style.background = this.tuiHighlightColor;\n style.zIndex = '-1';\n style.position = 'absolute';\n this.renderer.appendChild(this.el, highlight);\n\n return highlight;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MASa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CAAC;AACjF,IAAA,cAAc,EAAE,yCAAyC;AAC5D,CAAA;MAWY,YAAY,CAAA;AAkBrB,IAAA,WAAA,GAAA;QAjBiB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEtB,QAAA,IAAA,CAAA,SAAS,GAAgB,IAAI,CAAC,cAAc,EAAE;AAC9C,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,GA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,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,GAAA,EAAA,EAAA,EAAA,SAAA,EANV,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMzB,YAAY,EAAA,UAAA,EAAA,CAAA;kBATxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,qBAAqB,CAAC;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,gBAAgB,EAAE,GAAG;AACxB,qBAAA;AACJ,iBAAA;wDAcU,YAAY,EAAA,CAAA;sBADlB;gBAIM,iBAAiB,EAAA,CAAA;sBADvB;;;ACrCL;;AAEG;;;;"}
|
|
@@ -17,10 +17,10 @@ class TuiLazyLoadingService extends Observable {
|
|
|
17
17
|
next(src) {
|
|
18
18
|
this.src$.next(src);
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLazyLoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLazyLoadingService }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLazyLoadingService, decorators: [{
|
|
24
24
|
type: Injectable
|
|
25
25
|
}], ctorParameters: () => [] });
|
|
26
26
|
|
|
@@ -36,7 +36,6 @@ class TuiImgLazyLoading {
|
|
|
36
36
|
this.background = signal(this.isServer ? '' : 'var(--tui-background-neutral-2)');
|
|
37
37
|
this.animation = signal(this.isServer ? '' : 'tuiSkeletonVibe ease-in-out 1s infinite alternate');
|
|
38
38
|
this.$ = !this.supported &&
|
|
39
|
-
// eslint-disable-next-line @angular-eslint/no-uncalled-signals
|
|
40
39
|
this.loading$.pipe(takeUntilDestroyed()).subscribe((src) => this.src.set(src));
|
|
41
40
|
}
|
|
42
41
|
set srcSetter(src) {
|
|
@@ -51,10 +50,10 @@ class TuiImgLazyLoading {
|
|
|
51
50
|
this.background.set('');
|
|
52
51
|
this.animation.set('');
|
|
53
52
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
55
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiImgLazyLoading, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiImgLazyLoading, isStandalone: true, selector: "img[loading=\"lazy\"],img[tuiLoading=\"lazy\"]", inputs: { srcSetter: ["src", "srcSetter"] }, host: { listeners: { "load": "unset()", "error": "unset()" }, properties: { "style.animation": "animation()", "style.background": "background()", "attr.loading": "supported ? \"lazy\" : null", "attr.src": "src()" } }, providers: [TuiLazyLoadingService, IntersectionObserverService], ngImport: i0 }); }
|
|
56
55
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiImgLazyLoading, decorators: [{
|
|
58
57
|
type: Directive,
|
|
59
58
|
args: [{
|
|
60
59
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((entry) => !!entry[0]?.isIntersecting),\n map(() => src),\n take(1),\n ),\n ),\n tuiWatch(),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n\n public next(src: SafeResourceUrl | string): void {\n this.src$.next(src);\n }\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, Input, PLATFORM_ID, signal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n/**\n * @deprecated: Drop in v5.0\n */\n@Directive({\n standalone: true,\n selector: 'img[loading=\"lazy\"],img[tuiLoading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService],\n host: {\n '[style.animation]': 'animation()',\n '[style.background]': 'background()',\n '[attr.loading]': 'supported ? \"lazy\" : null',\n '[attr.src]': 'src()',\n '(load)': 'unset()',\n '(error)': 'unset()',\n },\n})\nexport class TuiImgLazyLoading {\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly loading$ = inject(TuiLazyLoadingService);\n protected readonly supported = 'loading' in tuiInjectElement<HTMLImageElement>();\n protected src = signal<SafeResourceUrl | string | null>(null);\n protected background = signal(this.isServer ? '' : 'var(--tui-background-neutral-2)');\n protected animation = signal(\n this.isServer ? '' : 'tuiSkeletonVibe ease-in-out 1s infinite alternate',\n );\n\n protected readonly $ =\n !this.supported &&\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((entry) => !!entry[0]?.isIntersecting),\n map(() => src),\n take(1),\n ),\n ),\n tuiWatch(),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n\n public next(src: SafeResourceUrl | string): void {\n this.src$.next(src);\n }\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Directive, inject, Input, PLATFORM_ID, signal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n/**\n * @deprecated: Drop in v5.0\n */\n@Directive({\n standalone: true,\n selector: 'img[loading=\"lazy\"],img[tuiLoading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService],\n host: {\n '[style.animation]': 'animation()',\n '[style.background]': 'background()',\n '[attr.loading]': 'supported ? \"lazy\" : null',\n '[attr.src]': 'src()',\n '(load)': 'unset()',\n '(error)': 'unset()',\n },\n})\nexport class TuiImgLazyLoading {\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly loading$ = inject(TuiLazyLoadingService);\n protected readonly supported = 'loading' in tuiInjectElement<HTMLImageElement>();\n protected src = signal<SafeResourceUrl | string | null>(null);\n protected background = signal(this.isServer ? '' : 'var(--tui-background-neutral-2)');\n protected animation = signal(\n this.isServer ? '' : 'tuiSkeletonVibe ease-in-out 1s infinite alternate',\n );\n\n protected readonly $ =\n !this.supported &&\n this.loading$.pipe(takeUntilDestroyed()).subscribe((src) => this.src.set(src));\n\n @Input('src')\n public set srcSetter(src: SafeResourceUrl | string) {\n if (this.supported) {\n this.src.set(src);\n } else {\n this.loading$.next(src);\n }\n }\n\n protected unset(): void {\n this.background.set('');\n this.animation.set('');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAOM,MAAO,qBAAsB,SAAQ,UAAoC,CAAA;AAc3E,IAAA,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A,cAAA,EAAA,6BAAA,EAAA,UAAA,EAAA,OAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAUtD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,4CAA4C;AACtD,oBAAA,SAAS,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;AAC/D,oBAAA,IAAI,EAAE;AACF,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,cAAc;AACpC,wBAAA,gBAAgB,EAAE,2BAA2B;AAC7C,wBAAA,YAAY,EAAE,OAAO;AACrB,wBAAA,QAAQ,EAAE,SAAS;AACnB,wBAAA,SAAS,EAAE,SAAS;AACvB,qBAAA;AACJ,iBAAA;8BAgBc,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;;;ACvChB;;AAEG;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, signal, computed, Directive } from '@angular/core';
|
|
3
3
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
-
import {
|
|
5
|
-
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
4
|
+
import { tuiIsString, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
5
|
import { TuiTextfieldComponent } from '@taiga-ui/core/components/textfield';
|
|
7
6
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
8
7
|
import { TUI_APPEARANCE_OPTIONS, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
|
|
9
8
|
import * as i2 from '@taiga-ui/core/directives/hint';
|
|
10
9
|
import { TuiHintDirective } from '@taiga-ui/core/directives/hint';
|
|
10
|
+
import { tuiIconStart } from '@taiga-ui/core/directives/icons';
|
|
11
11
|
import { TUI_PASSWORD_TEXTS } from '@taiga-ui/kit/tokens';
|
|
12
12
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
13
13
|
|
|
@@ -26,7 +26,7 @@ class TuiPassword {
|
|
|
26
26
|
});
|
|
27
27
|
this.textfield = inject(TuiTextfieldComponent);
|
|
28
28
|
this.hidden = signal(true);
|
|
29
|
-
this.icon =
|
|
29
|
+
this.icon = tuiIconStart(computed((size = this.textfield.options.size()) => {
|
|
30
30
|
const icon = this.hidden()
|
|
31
31
|
? this.options.icons.show
|
|
32
32
|
: this.options.icons.hide;
|
|
@@ -38,15 +38,15 @@ class TuiPassword {
|
|
|
38
38
|
this.hidden.set(!this.hidden());
|
|
39
39
|
this.textfield.input?.nativeElement.setAttribute('type', this.hidden() ? 'password' : 'text');
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiPassword, isStandalone: true, selector: "tui-icon[tuiPassword]", host: { listeners: { "click": "toggle()" }, properties: { "style.border": "textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null" }, styleAttribute: "cursor: pointer" }, providers: [
|
|
43
43
|
{
|
|
44
44
|
provide: TUI_APPEARANCE_OPTIONS,
|
|
45
45
|
useValue: { appearance: 'icon' },
|
|
46
46
|
},
|
|
47
47
|
], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance", "tuiHintContext", "tuiHintContext"] }], ngImport: i0 }); }
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPassword, decorators: [{
|
|
50
50
|
type: Directive,
|
|
51
51
|
args: [{
|
|
52
52
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\n\nimport {TUI_PASSWORD_OPTIONS} from './password.options';\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiPassword]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'toggle()',\n '[style.border]':\n 'textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null',\n },\n})\nexport class TuiPassword {\n private readonly options = inject(TUI_PASSWORD_OPTIONS);\n private readonly texts = toSignal(inject(TUI_PASSWORD_TEXTS), {\n initialValue: ['', ''] as const,\n });\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly hidden = signal(true);\n protected readonly icon = tuiIconStart(\n computed((size = this.textfield.options.size()) => {\n const icon = this.hidden()\n ? this.options.icons.show\n : this.options.icons.hide;\n\n return tuiIsString(icon) ? icon : icon(size);\n }),\n );\n\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'tuiHint',\n computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])),\n );\n\n protected toggle(): void {\n this.hidden.set(!this.hidden());\n this.textfield.input?.nativeElement.setAttribute(\n 'type',\n this.hidden() ? 'password' : 'text',\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,CAAC,oBAAoB,EAAE,0BAA0B,CAAC,GAC3D,gBAAgB,CAAqB;AACjC,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,IAAI,EAAE,UAAU;AACnB,KAAA;AACJ,CAAA;;MCoBQ,WAAW,CAAA;AAvBxB,IAAA,WAAA,GAAA;AAwBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACtC,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;AAC1D,YAAA,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,CAAU;AAClC,SAAA,CAAC;AAEiB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;AACrB,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAClC,QAAQ,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,KAAI;AAC9C,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM;AACpB,kBAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;kBACnB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI;AAE7B,YAAA,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SAC/C,CAAC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AA,gBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAeQ,WAAW,EAAA,UAAA,EAAA,CAAA;kBAvBvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,QAAQ,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC;AACjC,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;AAClD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,gBAAgB,EACZ,uEAAuE;AAC9E,qBAAA;AACJ,iBAAA;;;ACpCD;;AAEG;;;;"}
|
|
@@ -13,10 +13,10 @@ class TuiPresent {
|
|
|
13
13
|
onAnimation(visibility) {
|
|
14
14
|
this.visibility$.next(visibility);
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPresent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiPresent, isStandalone: true, selector: "[tuiPresentChange]", outputs: { tuiPresentChange: "tuiPresentChange" }, host: { listeners: { "animationcancel.self": "onAnimation(false)", "animationstart.self": "onAnimation(true)" }, properties: { "style.animation": "\"tuiPresent 1s infinite\"" } }, ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPresent, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-present.mjs","sources":["../../../projects/kit/directives/present/present.directive.ts","../../../projects/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {Directive, type OnDestroy, Output} from '@angular/core';\nimport {BehaviorSubject, distinctUntilChanged, skip} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiPresentChange]',\n host: {\n '[style.animation]': '\"tuiPresent 1s infinite\"',\n '(animationcancel.self)': 'onAnimation(false)',\n '(animationstart.self)': 'onAnimation(true)',\n },\n})\nexport class TuiPresent implements OnDestroy {\n private readonly visibility$ = new BehaviorSubject(false);\n\n @Output()\n public readonly tuiPresentChange = this.visibility$.pipe(\n distinctUntilChanged(),\n skip(1),\n );\n\n public ngOnDestroy(): void {\n this.visibility$.next(false);\n }\n\n protected onAnimation(visibility: boolean): void {\n this.visibility$.next(visibility);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAYa,UAAU,CAAA;AATvB,IAAA,WAAA,GAAA;AAUqB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC;AAGzC,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACpD,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,CACV;AASJ
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-present.mjs","sources":["../../../projects/kit/directives/present/present.directive.ts","../../../projects/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {Directive, type OnDestroy, Output} from '@angular/core';\nimport {BehaviorSubject, distinctUntilChanged, skip} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiPresentChange]',\n host: {\n '[style.animation]': '\"tuiPresent 1s infinite\"',\n '(animationcancel.self)': 'onAnimation(false)',\n '(animationstart.self)': 'onAnimation(true)',\n },\n})\nexport class TuiPresent implements OnDestroy {\n private readonly visibility$ = new BehaviorSubject(false);\n\n @Output()\n public readonly tuiPresentChange = this.visibility$.pipe(\n distinctUntilChanged(),\n skip(1),\n );\n\n public ngOnDestroy(): void {\n this.visibility$.next(false);\n }\n\n protected onAnimation(visibility: boolean): void {\n this.visibility$.next(visibility);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAYa,UAAU,CAAA;AATvB,IAAA,WAAA,GAAA;AAUqB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC;AAGzC,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACpD,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,CACV;AASJ;IAPU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGtB,IAAA,WAAW,CAAC,UAAmB,EAAA;AACrC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC;;+GAd5B,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBATtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACF,wBAAA,mBAAmB,EAAE,0BAA0B;AAC/C,wBAAA,wBAAwB,EAAE,oBAAoB;AAC9C,wBAAA,uBAAuB,EAAE,mBAAmB;AAC/C,qBAAA;AACJ,iBAAA;8BAKmB,gBAAgB,EAAA,CAAA;sBAD/B;;;ACfL;;AAEG;;;;"}
|
|
@@ -8,10 +8,10 @@ import { map } from 'rxjs';
|
|
|
8
8
|
|
|
9
9
|
const rowsInSvg = 3;
|
|
10
10
|
class TuiSensitiveStyles {
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSensitiveStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiSensitiveStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-sensitive-styles" }, ngImport: i0, template: '', isInline: true, styles: [".tui-sensitive{position:relative;line-height:1em;clip-path:inset(0 round .25rem)}.tui-sensitive:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";display:block!important;background:currentColor;border-radius:inherit;mask:url('data:image/svg+xml,<svg width=\"360\" height=\"72\" preserveAspectRatio=\"none\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><rect opacity=\"0.2\" width=\"24\" height=\"24\"/><rect opacity=\"0.2\" x=\"336\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.35\" x=\"120\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.35\" x=\"216\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"312\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.25\" x=\"144\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.25\" x=\"192\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"288\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"96\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"240\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.24\" x=\"72\" width=\"24\" height=\"24\"/><rect opacity=\"0.34\" x=\"264\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.2\" x=\"168\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.35\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.35\" x=\"336\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"120\" y=\"0\" width=\"24\" height=\"24\" /><rect opacity=\"0.3\" x=\"216\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"24\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"312\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"144\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"192\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.4\" x=\"48\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.4\" x=\"288\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.38\" x=\"96\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.21\" x=\"240\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.2\" x=\"72\" y=\"24\" width=\"24\" height=\"24\"/><rect opacity=\"0.2\" x=\"264\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.32\" x=\"168\" y=\"0\" width=\"24\" height=\"24\"/><rect opacity=\"0.35\" x=\"240\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.4\" x=\"72\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.21\" x=\"192\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"48\" y=\"48\" width=\"24\" height=\"24\"/> <rect opacity=\"0.34\" x=\"216\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.21\" x=\"24\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"168\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.32\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"264\" y=\"48\" width=\"24\" height=\"24\"/> <rect opacity=\"0.31\" x=\"288\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.3\" x=\"96\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.25\" x=\"312\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.28\" x=\"144\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.36\" x=\"336\" y=\"48\" width=\"24\" height=\"24\"/><rect opacity=\"0.21\" x=\"120\" y=\"48\" width=\"24\" height=\"24\"/></svg>') var(--t-offset, 0) 0 / auto var(--t-mask-height);margin:0!important}.tui-sensitive.tui-sensitive{-webkit-text-fill-color:transparent}span.tui-sensitive,a.tui-sensitive{display:inline-block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSensitiveStyles, decorators: [{
|
|
15
15
|
type: Component,
|
|
16
16
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
17
17
|
class: 'tui-sensitive-styles',
|
|
@@ -27,10 +27,10 @@ class TuiSensitive {
|
|
|
27
27
|
}), map(([rows, height]) => height * (rowsInSvg / rows)), tuiZonefull(), tuiWatch()));
|
|
28
28
|
this.tuiSensitive = false;
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
31
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSensitive, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
31
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSensitive, isStandalone: true, selector: "[tuiSensitive]", inputs: { tuiSensitive: "tuiSensitive" }, host: { properties: { "style.--t-offset.px": "offset", "style.--t-mask-height.px": "height()", "class.tui-sensitive": "tuiSensitive" } }, providers: [ResizeObserverService], ngImport: i0 }); }
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSensitive, decorators: [{
|
|
34
34
|
type: Directive,
|
|
35
35
|
args: [{
|
|
36
36
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-sensitive.mjs","sources":["../../../projects/kit/directives/sensitive/sensitive.directive.ts","../../../projects/kit/directives/sensitive/taiga-ui-kit-directives-sensitive.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiWatch, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {map} from 'rxjs';\n\nconst rowsInSvg = 3;\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./sensitive.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-sensitive-styles',\n },\n})\nclass TuiSensitiveStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSensitive]',\n providers: [ResizeObserverService],\n host: {\n '[style.--t-offset.px]': 'offset',\n '[style.--t-mask-height.px]': 'height()',\n '[class.tui-sensitive]': 'tuiSensitive',\n },\n})\nexport class TuiSensitive {\n protected readonly nothing = tuiWithStyles(TuiSensitiveStyles);\n protected readonly offset = Math.round(Math.random() * 10) * 10;\n\n protected readonly height = toSignal(\n inject(ResizeObserverService, {self: true}).pipe(\n map((entry): [number, number] => {\n const height = entry[0]?.contentRect.height ?? 0;\n\n return [Math.max(2, Math.floor(height / 16) + 1), height];\n }),\n map(([rows, height]) => height * (rowsInSvg / rows)),\n tuiZonefull(),\n tuiWatch(),\n ),\n );\n\n @Input()\n public tuiSensitive: boolean | null = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAcA,MAAM,SAAS,GAAG,CAAC;AAEnB,MAUM,kBAAkB,CAAA
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-sensitive.mjs","sources":["../../../projects/kit/directives/sensitive/sensitive.directive.ts","../../../projects/kit/directives/sensitive/taiga-ui-kit-directives-sensitive.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiWatch, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {map} from 'rxjs';\n\nconst rowsInSvg = 3;\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./sensitive.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-sensitive-styles',\n },\n})\nclass TuiSensitiveStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSensitive]',\n providers: [ResizeObserverService],\n host: {\n '[style.--t-offset.px]': 'offset',\n '[style.--t-mask-height.px]': 'height()',\n '[class.tui-sensitive]': 'tuiSensitive',\n },\n})\nexport class TuiSensitive {\n protected readonly nothing = tuiWithStyles(TuiSensitiveStyles);\n protected readonly offset = Math.round(Math.random() * 10) * 10;\n\n protected readonly height = toSignal(\n inject(ResizeObserverService, {self: true}).pipe(\n map((entry): [number, number] => {\n const height = entry[0]?.contentRect.height ?? 0;\n\n return [Math.max(2, Math.floor(height / 16) + 1), height];\n }),\n map(([rows, height]) => height * (rowsInSvg / rows)),\n tuiZonefull(),\n tuiWatch(),\n ),\n );\n\n @Input()\n public tuiSensitive: boolean | null = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAcA,MAAM,SAAS,GAAG,CAAC;AAEnB,MAUM,kBAAkB,CAAA;+GAAlB,kBAAk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ellaneous';
|
|
6
6
|
|
|
7
7
|
class TuiShimmerStyles {
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
9
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiShimmerStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiShimmerStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-shimmer-styles" }, ngImport: i0, template: '', isInline: true, styles: ["@keyframes tuiShimmer{0%{-webkit-mask-position:top left,-100rem;mask-position:top left,-100rem}to{-webkit-mask-position:top left,300rem;mask-position:top left,300rem}}[tuiShimmer]._shimmer{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(-70deg,transparent,rgba(0,0,0,.5),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(-70deg,transparent,rgba(0,0,0,.5),transparent);-webkit-mask-size:100%,6rem 100%;mask-size:100%,6rem 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-composite:source-out;mask-composite:subtract;animation:tuiShimmer 8s infinite linear;pointer-events:none;-webkit-user-select:none;user-select:none}[tuiShimmer]._disabled{animation:none;mask:none;opacity:var(--tui-disabled-opacity)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiShimmerStyles, decorators: [{
|
|
12
12
|
type: Component,
|
|
13
13
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
14
14
|
class: 'tui-shimmer-styles',
|
|
@@ -46,10 +46,10 @@ class TuiShimmer {
|
|
|
46
46
|
.catch(() => { });
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
50
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiShimmer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
50
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiShimmer, isStandalone: true, selector: "[tuiShimmer]", inputs: { shimmer: ["tuiShimmer", "shimmer"] }, host: { attributes: { "tuiShimmer": "" }, properties: { "class._shimmer": "shimmer", "class._disabled": "shimmer && disabled", "attr.inert": "shimmer || null" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
51
51
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiShimmer, decorators: [{
|
|
53
53
|
type: Directive,
|
|
54
54
|
args: [{
|
|
55
55
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-shimmer.mjs","sources":["../../../projects/kit/directives/shimmer/shimmer.directive.ts","../../../projects/kit/directives/shimmer/taiga-ui-kit-directives-shimmer.ts"],"sourcesContent":["import {isPlatformBrowser} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n PLATFORM_ID,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./shimmer.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-shimmer-styles',\n },\n})\nclass TuiShimmerStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiShimmer]',\n host: {\n tuiShimmer: '',\n '[class._shimmer]': 'shimmer',\n '[class._disabled]': 'shimmer && disabled',\n '[attr.inert]': 'shimmer || null',\n },\n})\nexport class TuiShimmer implements OnChanges {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly el = tuiInjectElement();\n private animation?: Animation;\n\n protected disabled = false;\n\n protected readonly nothing = tuiWithStyles(TuiShimmerStyles);\n\n @Input('tuiShimmer')\n public shimmer = false;\n\n public ngOnChanges(): void {\n if (!this.isBrowser) {\n return;\n }\n\n this.disabled = !parseFloat(\n getComputedStyle(this.el).getPropertyValue('--tui-duration'),\n );\n\n if (this.disabled) {\n return;\n }\n\n this.animation?.commitStyles();\n this.animation?.cancel();\n\n if (this.shimmer) {\n this.animation = this.el.animate(\n {opacity: [0.5, 0.25, 0.5, 0.5]},\n {duration: 1500, iterations: Infinity},\n );\n } else {\n this.animation = this.el.animate([{opacity: 0, offset: 0.5}, {opacity: 1}], {\n duration: 800,\n });\n\n this.animation.finished\n .then(() => {\n this.el.style.opacity = '';\n })\n .catch(() => {});\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAcA,MAUM,gBAAgB,CAAA
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-shimmer.mjs","sources":["../../../projects/kit/directives/shimmer/shimmer.directive.ts","../../../projects/kit/directives/shimmer/taiga-ui-kit-directives-shimmer.ts"],"sourcesContent":["import {isPlatformBrowser} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n PLATFORM_ID,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./shimmer.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-shimmer-styles',\n },\n})\nclass TuiShimmerStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiShimmer]',\n host: {\n tuiShimmer: '',\n '[class._shimmer]': 'shimmer',\n '[class._disabled]': 'shimmer && disabled',\n '[attr.inert]': 'shimmer || null',\n },\n})\nexport class TuiShimmer implements OnChanges {\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly el = tuiInjectElement();\n private animation?: Animation;\n\n protected disabled = false;\n\n protected readonly nothing = tuiWithStyles(TuiShimmerStyles);\n\n @Input('tuiShimmer')\n public shimmer = false;\n\n public ngOnChanges(): void {\n if (!this.isBrowser) {\n return;\n }\n\n this.disabled = !parseFloat(\n getComputedStyle(this.el).getPropertyValue('--tui-duration'),\n );\n\n if (this.disabled) {\n return;\n }\n\n this.animation?.commitStyles();\n this.animation?.cancel();\n\n if (this.shimmer) {\n this.animation = this.el.animate(\n {opacity: [0.5, 0.25, 0.5, 0.5]},\n {duration: 1500, iterations: Infinity},\n );\n } else {\n this.animation = this.el.animate([{opacity: 0, offset: 0.5}, {opacity: 1}], {\n duration: 800,\n });\n\n this.animation.finished\n .then(() => {\n this.el.style.opacity = '';\n })\n .catch(() => {});\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAcA,MAUM,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAA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UAAA,EAAA,CAAA;kBAVtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACF,wBAAA,UAAU,EAAE,EAAE;AACd,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,cAAc,EAAE,iBAAiB;AACpC,qBAAA;AACJ,iBAAA;8BAWU,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,YAAY;;;AC7CvB;;AAEG;;;;"}
|
|
@@ -9,10 +9,10 @@ import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
|
9
9
|
|
|
10
10
|
const FADE = [{ opacity: 0.06 }, { opacity: 1 }];
|
|
11
11
|
class TuiSkeletonStyles {
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSkeletonStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiSkeletonStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-skeleton-styles" }, ngImport: i0, template: '', isInline: true, styles: ["@keyframes tuiSkeleton{0%{opacity:.03}to{opacity:.06}}[tuiSkeleton]._skeleton{color:transparent;background:var(--tui-background-base)!important;box-shadow:none!important;filter:contrast(0) brightness(0);animation:tuiSkeleton ease-in-out calc(var(--tui-duration) * 4) infinite alternate;-webkit-user-select:none;user-select:none;pointer-events:none;opacity:.06}[tuiSkeleton]._skeleton[data-tui-skeleton]{background:transparent!important}[tuiSkeleton]._skeleton[data-tui-skeleton]:before{content:attr(data-tui-skeleton);background:var(--tui-background-base);font-size:smaller;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.25rem}[tuiTheme=dark] [tuiSkeleton]._skeleton,[tuiTheme=dark][tuiSkeleton]._skeleton{filter:contrast(0) brightness(0) invert(1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSkeletonStyles, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
18
18
|
class: 'tui-skeleton-styles',
|
|
@@ -43,13 +43,13 @@ class TuiSkeleton {
|
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
47
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
47
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSkeleton, isStandalone: true, selector: "[tuiSkeleton]", inputs: { tuiSkeleton: "tuiSkeleton" }, host: { attributes: { "tuiSkeleton": "" }, properties: { "class._skeleton": "tuiSkeleton", "attr.data-tui-skeleton": "getPlaceholder(tuiSkeleton)" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
48
48
|
}
|
|
49
49
|
__decorate([
|
|
50
50
|
tuiPure
|
|
51
51
|
], TuiSkeleton.prototype, "getPlaceholder", null);
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSkeleton, decorators: [{
|
|
53
53
|
type: Directive,
|
|
54
54
|
args: [{
|
|
55
55
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-skeleton.mjs","sources":["../../../projects/kit/directives/skeleton/skeleton.directive.ts","../../../projects/kit/directives/skeleton/taiga-ui-kit-directives-skeleton.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n type SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPure, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\n\nconst FADE = [{opacity: 0.06}, {opacity: 1}];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./skeleton.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-skeleton-styles',\n },\n})\nclass TuiSkeletonStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSkeleton]',\n host: {\n tuiSkeleton: '',\n '[class._skeleton]': 'tuiSkeleton',\n '[attr.data-tui-skeleton]': 'getPlaceholder(tuiSkeleton)',\n },\n})\nexport class TuiSkeleton implements OnChanges {\n private animation?: Animation;\n private readonly el = tuiInjectElement();\n private readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)) * 2;\n\n protected readonly nothing = tuiWithStyles(TuiSkeletonStyles);\n\n @Input()\n public tuiSkeleton: boolean | number | string = false;\n\n public ngOnChanges({tuiSkeleton}: SimpleChanges): void {\n this.animation?.cancel();\n\n if (!tuiSkeleton?.currentValue && !tuiSkeleton?.firstChange) {\n this.animation = this.el.animate?.(FADE, this.duration);\n }\n }\n\n @tuiPure\n protected getPlaceholder(value: boolean | number | string): string | null {\n switch (typeof value) {\n case 'number':\n return Array.from({length: value})\n .map(() => CHAR_NO_BREAK_SPACE.repeat(getLength()))\n .join(' ');\n case 'string':\n return value;\n default:\n return null;\n }\n }\n}\n\nfunction getLength(): number {\n return Math.floor(Math.random() * (15 - 5 + 1)) + 5;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgBA,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,OAAO,EAAE,CAAC,EAAC,CAAC;AAE5C,MAUM,iBAAiB,CAAA
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-skeleton.mjs","sources":["../../../projects/kit/directives/skeleton/skeleton.directive.ts","../../../projects/kit/directives/skeleton/taiga-ui-kit-directives-skeleton.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n type SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPure, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\n\nconst FADE = [{opacity: 0.06}, {opacity: 1}];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./skeleton.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-skeleton-styles',\n },\n})\nclass TuiSkeletonStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSkeleton]',\n host: {\n tuiSkeleton: '',\n '[class._skeleton]': 'tuiSkeleton',\n '[attr.data-tui-skeleton]': 'getPlaceholder(tuiSkeleton)',\n },\n})\nexport class TuiSkeleton implements OnChanges {\n private animation?: Animation;\n private readonly el = tuiInjectElement();\n private readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)) * 2;\n\n protected readonly nothing = tuiWithStyles(TuiSkeletonStyles);\n\n @Input()\n public tuiSkeleton: boolean | number | string = false;\n\n public ngOnChanges({tuiSkeleton}: SimpleChanges): void {\n this.animation?.cancel();\n\n if (!tuiSkeleton?.currentValue && !tuiSkeleton?.firstChange) {\n this.animation = this.el.animate?.(FADE, this.duration);\n }\n }\n\n @tuiPure\n protected getPlaceholder(value: boolean | number | string): string | null {\n switch (typeof value) {\n case 'number':\n return Array.from({length: value})\n .map(() => CHAR_NO_BREAK_SPACE.repeat(getLength()))\n .join(' ');\n case 'string':\n return value;\n default:\n return null;\n }\n }\n}\n\nfunction getLength(): number {\n return Math.floor(Math.random() * (15 - 5 + 1)) + 5;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgBA,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,OAAO,EAAE,CAAC,EAAC,CAAC;AAE5C,MAUM,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,yH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19,10 @@ const [TUI_TOOLTIP_OPTIONS, tuiTooltipOptionsProvider] = tuiCreateOptions({
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
class TuiTooltipStyles {
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTooltipStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiTooltipStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-tooltip" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiTooltip]{border-width:.125rem;border-radius:100%;cursor:pointer;pointer-events:auto;background-clip:content-box!important}[tuiTooltip] [tuiBlock],[tuiTooltip] [tuiCell][data-size=s],[tuiLabel][data-orientation=horizontal] [tuiTooltip],[tuiTooltip][data-size=s]{font-size:1.25rem}[tuiTitle] [tuiTooltip]{font-size:1rem;border:none}[tuiTooltip]:before{font-size:1rem}@media (hover: hover) and (pointer: fine){tui-textfield:hover [tuiTooltip][data-appearance=icon]:before,tui-textarea:hover [tuiTooltip][data-appearance=icon]:before,tui-primitive-textfield:hover [tuiTooltip][data-appearance=icon]:before,tui-input-tag:hover [tuiTooltip][data-appearance=icon]:before{color:var(--tui-text-secondary)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTooltipStyles, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
28
28
|
class: 'tui-tooltip',
|
|
@@ -52,8 +52,8 @@ class TuiTooltip {
|
|
|
52
52
|
this.driver.toggle();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
56
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
56
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiTooltip, isStandalone: true, selector: "tui-icon[tuiTooltip]", inputs: { size: "size" }, host: { attributes: { "tuiTooltip": "" }, listeners: { "click.prevent": "0", "mousedown": "onClick($event)" }, properties: { "attr.data-size": "size" } }, providers: [
|
|
57
57
|
tuiAppearanceOptionsProvider(TUI_TOOLTIP_OPTIONS),
|
|
58
58
|
{
|
|
59
59
|
provide: TUI_ICON_START,
|
|
@@ -61,7 +61,7 @@ class TuiTooltip {
|
|
|
61
61
|
},
|
|
62
62
|
], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiHintDescribe, inputs: ["tuiHintDescribe", "tuiTooltipDescribe"] }, { directive: i2.TuiHintDirective, inputs: ["tuiHint", "tuiTooltip", "tuiHintAppearance", "tuiHintAppearance", "tuiHintContext", "tuiHintContext"] }], ngImport: i0 }); }
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTooltip, decorators: [{
|
|
65
65
|
type: Directive,
|
|
66
66
|
args: [{
|
|
67
67
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-tooltip.mjs","sources":["../../../projects/kit/directives/tooltip/tooltip.options.ts","../../../projects/kit/directives/tooltip/tooltip.directive.ts","../../../projects/kit/directives/tooltip/taiga-ui-kit-directives-tooltip.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_TOOLTIP_OPTIONS, tuiTooltipOptionsProvider] = tuiCreateOptions({\n icon: '',\n appearance: 'icon',\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n type DoCheck,\n inject,\n Input,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearanceOptionsProvider,\n tuiAppearanceState,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_HINT_OPTIONS,\n TuiHintDescribe,\n TuiHintDirective,\n TuiHintHover,\n} from '@taiga-ui/core/directives/hint';\nimport {TUI_ICON_START} from '@taiga-ui/core/tokens';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {map} from 'rxjs';\n\nimport {TUI_TOOLTIP_OPTIONS} from './tooltip.options';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./tooltip.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-tooltip',\n },\n})\nclass TuiTooltipStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiTooltip]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_TOOLTIP_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () =>\n inject(TUI_TOOLTIP_OPTIONS).icon || inject(TUI_HINT_OPTIONS).icon,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDescribe,\n inputs: ['tuiHintDescribe: tuiTooltipDescribe'],\n },\n {\n directive: TuiHintDirective,\n inputs: ['tuiHint: tuiTooltip', 'tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n tuiTooltip: '',\n '[attr.data-size]': 'size',\n '(click.prevent)': '0',\n '(mousedown)': 'onClick($event)',\n },\n})\nexport class TuiTooltip implements DoCheck {\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly describe = inject(TuiHintDescribe);\n private readonly driver = inject(TuiHintHover);\n\n protected readonly nothing = tuiWithStyles(TuiTooltipStyles);\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n toSignal(\n inject(TuiHintHover).pipe(\n map((hover) => (hover ? 'hover' : null)),\n tuiWatch(),\n ),\n {initialValue: null},\n ),\n );\n\n @Input()\n public size: TuiSizeS = 'm';\n\n public ngDoCheck(): void {\n if (this.textfield?.id) {\n this.describe.tuiHintDescribe = this.textfield.id;\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n this.driver.toggle();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAEa,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,UAAU,EAAE,MAAM;AACrB,CAAA;;AC2BD,MAUM,gBAAgB,CAAA
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-tooltip.mjs","sources":["../../../projects/kit/directives/tooltip/tooltip.options.ts","../../../projects/kit/directives/tooltip/tooltip.directive.ts","../../../projects/kit/directives/tooltip/taiga-ui-kit-directives-tooltip.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport const [TUI_TOOLTIP_OPTIONS, tuiTooltipOptionsProvider] = tuiCreateOptions({\n icon: '',\n appearance: 'icon',\n});\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n type DoCheck,\n inject,\n Input,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearanceOptionsProvider,\n tuiAppearanceState,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_HINT_OPTIONS,\n TuiHintDescribe,\n TuiHintDirective,\n TuiHintHover,\n} from '@taiga-ui/core/directives/hint';\nimport {TUI_ICON_START} from '@taiga-ui/core/tokens';\nimport {type TuiSizeS} from '@taiga-ui/core/types';\nimport {map} from 'rxjs';\n\nimport {TUI_TOOLTIP_OPTIONS} from './tooltip.options';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./tooltip.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-tooltip',\n },\n})\nclass TuiTooltipStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiTooltip]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_TOOLTIP_OPTIONS),\n {\n provide: TUI_ICON_START,\n useFactory: () =>\n inject(TUI_TOOLTIP_OPTIONS).icon || inject(TUI_HINT_OPTIONS).icon,\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDescribe,\n inputs: ['tuiHintDescribe: tuiTooltipDescribe'],\n },\n {\n directive: TuiHintDirective,\n inputs: ['tuiHint: tuiTooltip', 'tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n tuiTooltip: '',\n '[attr.data-size]': 'size',\n '(click.prevent)': '0',\n '(mousedown)': 'onClick($event)',\n },\n})\nexport class TuiTooltip implements DoCheck {\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly describe = inject(TuiHintDescribe);\n private readonly driver = inject(TuiHintHover);\n\n protected readonly nothing = tuiWithStyles(TuiTooltipStyles);\n protected readonly state: Signal<unknown> = tuiAppearanceState(\n toSignal(\n inject(TuiHintHover).pipe(\n map((hover) => (hover ? 'hover' : null)),\n tuiWatch(),\n ),\n {initialValue: null},\n ),\n );\n\n @Input()\n public size: TuiSizeS = 'm';\n\n public ngDoCheck(): void {\n if (this.textfield?.id) {\n this.describe.tuiHintDescribe = this.textfield.id;\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n this.driver.toggle();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAEa,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,UAAU,EAAE,MAAM;AACrB,CAAA;;AC2BD,MAUM,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,iHARR,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,C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AAA,mBAAA,EAAA,mBAAA,EAAA,gBAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAmBQ,UAAU,EAAA,UAAA,EAAA,CAAA;kBA7BtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,SAAS,EAAE;wBACP,4BAA4B,CAAC,mBAAmB,CAAC;AACjD,wBAAA;AACI,4BAAA,OAAO,EAAE,cAAc;AACvB,4BAAA,UAAU,EAAE,MACR,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI;AACxE,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,eAAe;4BAC1B,MAAM,EAAE,CAAC,qCAAqC,CAAC;AAClD,yBAAA;AACD,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;AACzE,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,UAAU,EAAE,EAAE;AACd,wBAAA,kBAAkB,EAAE,MAAM;AAC1B,wBAAA,iBAAiB,EAAE,GAAG;AACtB,wBAAA,aAAa,EAAE,iBAAiB;AACnC,qBAAA;AACJ,iBAAA;8BAmBU,IAAI,EAAA,CAAA;sBADV;;;AC1FL;;AAEG;;;;"}
|
|
@@ -26,10 +26,10 @@ class TuiUnfinishedValidator {
|
|
|
26
26
|
this.tuiUnfinishedValidator = '';
|
|
27
27
|
this.validate = tuiCreateUnfinishedValidator(tuiInjectElement(), () => this.tuiUnfinishedValidator || this.message());
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
30
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiUnfinishedValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiUnfinishedValidator, isStandalone: true, selector: "input[tuiUnfinishedValidator]", inputs: { tuiUnfinishedValidator: "tuiUnfinishedValidator" }, providers: [tuiProvide(NG_VALIDATORS, TuiUnfinishedValidator, true)], ngImport: i0 }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiUnfinishedValidator, decorators: [{
|
|
33
33
|
type: Directive,
|
|
34
34
|
args: [{
|
|
35
35
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-unfinished-validator.mjs","sources":["../../../projects/kit/directives/unfinished-validator/unfinished.validator.ts","../../../projects/kit/directives/unfinished-validator/unfinished-validator.directive.ts","../../../projects/kit/directives/unfinished-validator/taiga-ui-kit-directives-unfinished-validator.ts"],"sourcesContent":["import {type AbstractControl, type ValidatorFn} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport function tuiCreateUnfinishedValidator(\n element: HTMLInputElement,\n message: PolymorpheusContent,\n): ValidatorFn {\n return ({\n value,\n }: AbstractControl): {tuiUnfinished: TuiValidationError | string} | null =>\n value === null && element.value !== ''\n ? {tuiUnfinished: new TuiValidationError(message)}\n : null;\n}\n","import {Directive, inject, Input, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {NG_VALIDATORS, type Validator} from '@angular/forms';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {isObservable} from 'rxjs';\n\nimport {tuiCreateUnfinishedValidator} from './unfinished.validator';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiUnfinishedValidator]',\n providers: [tuiProvide(NG_VALIDATORS, TuiUnfinishedValidator, true)],\n})\nexport class TuiUnfinishedValidator implements Validator {\n private readonly default = toSignal(inject(TUI_DEFAULT_ERROR_MESSAGE));\n private readonly error = inject(TUI_VALIDATION_ERRORS)['tuiUnfinished'];\n private readonly fallback = this.error ? signal(this.error) : this.default;\n private readonly message = isObservable(this.error)\n ? toSignal(this.error)\n : this.fallback;\n\n @Input()\n public tuiUnfinishedValidator = '';\n\n public readonly validate = tuiCreateUnfinishedValidator(\n tuiInjectElement<HTMLInputElement>(),\n () => this.tuiUnfinishedValidator || this.message(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-unfinished-validator.mjs","sources":["../../../projects/kit/directives/unfinished-validator/unfinished.validator.ts","../../../projects/kit/directives/unfinished-validator/unfinished-validator.directive.ts","../../../projects/kit/directives/unfinished-validator/taiga-ui-kit-directives-unfinished-validator.ts"],"sourcesContent":["import {type AbstractControl, type ValidatorFn} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport function tuiCreateUnfinishedValidator(\n element: HTMLInputElement,\n message: PolymorpheusContent,\n): ValidatorFn {\n return ({\n value,\n }: AbstractControl): {tuiUnfinished: TuiValidationError | string} | null =>\n value === null && element.value !== ''\n ? {tuiUnfinished: new TuiValidationError(message)}\n : null;\n}\n","import {Directive, inject, Input, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {NG_VALIDATORS, type Validator} from '@angular/forms';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {isObservable} from 'rxjs';\n\nimport {tuiCreateUnfinishedValidator} from './unfinished.validator';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiUnfinishedValidator]',\n providers: [tuiProvide(NG_VALIDATORS, TuiUnfinishedValidator, true)],\n})\nexport class TuiUnfinishedValidator implements Validator {\n private readonly default = toSignal(inject(TUI_DEFAULT_ERROR_MESSAGE));\n private readonly error = inject(TUI_VALIDATION_ERRORS)['tuiUnfinished'];\n private readonly fallback = this.error ? signal(this.error) : this.default;\n private readonly message = isObservable(this.error)\n ? toSignal(this.error)\n : this.fallback;\n\n @Input()\n public tuiUnfinishedValidator = '';\n\n public readonly validate = tuiCreateUnfinishedValidator(\n tuiInjectElement<HTMLInputElement>(),\n () => this.tuiUnfinishedValidator || this.message(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAIgB,SAAA,4BAA4B,CACxC,OAAyB,EACzB,OAA4B,EAAA;AAE5B,IAAA,OAAO,CAAC,EACJ,KAAK,GACS,KACd,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK;UAC9B,EAAC,aAAa,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC;UAC/C,IAAI;AAClB;;MCEa,sBAAsB,CAAA;AALnC,IAAA,WAAA,GAAA;QAMqB,IAAO,CAAA,OAAA,G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17,10 +17,10 @@ class TuiUnmaskHandler extends TuiValueTransformer {
|
|
|
17
17
|
toControlValue(value) {
|
|
18
18
|
return this.tuiUnmaskHandler(value);
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiUnmaskHandler, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiUnmaskHandler, isStandalone: true, selector: "[maskito][tuiUnmaskHandler]", inputs: { tuiUnmaskHandler: "tuiUnmaskHandler", maskito: "maskito" }, providers: [tuiProvide(TuiValueTransformer, TuiUnmaskHandler)], usesInheritance: true, ngImport: i0 }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiUnmaskHandler, decorators: [{
|
|
24
24
|
type: Directive,
|
|
25
25
|
args: [{
|
|
26
26
|
standalone: true,
|