@taiga-ui/cdk 3.53.0 → 3.54.0-canary.c32771f
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/bundles/taiga-ui-cdk-components-alert-host.umd.js +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +3 -3
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +4 -16
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +1 -4
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +1 -2
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-replace.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-replace.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +6 -2
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/constants/used-icons.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +2 -2
- package/esm2015/constants/used-icons.js +3 -3
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/auto-focus/autofocus.options.js +1 -2
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +3 -4
- package/esm2015/directives/autofilled/autofilled.module.js +2 -2
- package/esm2015/directives/focus-trap/focus-trap.directive.js +2 -5
- package/esm2015/directives/media/media.directive.js +2 -3
- package/esm2015/pipes/filter/filter.module.js +2 -2
- package/esm2015/pipes/keys/keys.module.js +2 -2
- package/esm2015/pipes/mapper/mapper.module.js +2 -2
- package/esm2015/pipes/replace/replace.module.js +2 -2
- package/esm2015/utils/focus/is-native-focused-in.js +4 -2
- package/esm2015/utils/focus/is-native-focused.js +4 -2
- package/fesm2015/taiga-ui-cdk-components-alert-host.js +2 -2
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +3 -3
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +2 -3
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +1 -4
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-media.js +1 -2
- package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-keys.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-keys.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-replace.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-replace.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +6 -2
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/package.json +68 -68
- package/schematics/ng-add/steps/add-taiga-modules.js +1 -1
- package/schematics/ng-update/steps/replace-identifier.js +1 -1
- package/schematics/ng-update/v3/steps/migrate-progress.js +6 -8
- package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +6 -6
- package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +4 -4
- package/schematics/ng-update/v3-40/index.js +2 -3
- package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +7 -0
- package/schematics/ng-update/v4/steps/constants/html-comments.js +10 -0
- package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +4 -0
- package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +1 -0
- package/schematics/ng-update/v4/steps/migrate-templates.js +1 -0
- package/schematics/ng-update/v4/steps/templates/index.d.ts +1 -0
- package/schematics/ng-update/v4/steps/templates/index.js +1 -0
- package/schematics/ng-update/v4/steps/templates/migrate-avatar.d.ts +8 -0
- package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +75 -0
- package/schematics/ng-update/v4/steps/utils/replace-substrings.js +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["../../../projects/cdk/directives/auto-focus/handlers/abstract.handler.ts","../../../projects/cdk/directives/auto-focus/handlers/default.handler.ts","../../../projects/cdk/directives/auto-focus/handlers/ios.handler.ts","../../../projects/cdk/directives/auto-focus/autofocus.options.ts","../../../projects/cdk/directives/auto-focus/autofocus.directive.ts","../../../projects/cdk/directives/auto-focus/autofocus.module.ts","../../../projects/cdk/directives/auto-focus/handlers/sync.handler.ts","../../../projects/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport type {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly focusable: TuiFocusableElementAccessor | null,\n protected readonly el: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return this.focusable?.nativeFocusableElement || this.el.nativeElement;\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches(`input, textarea, [contenteditable]`);\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = `.ng-animating`;\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(focusable, el);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus({preventScroll: true}));\n } else {\n this.element.focus({preventScroll: true});\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {tuiIsPresent, tuiPx} from '@taiga-ui/cdk/utils';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TEXTFIELD_ATTRS = [\n `type`,\n `inputMode`,\n `autocomplete`,\n `accept`,\n `min`,\n `max`,\n `step`,\n `pattern`,\n `size`,\n `maxlength`,\n] as const;\n\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(NgZone) private readonly zone: NgZone,\n @Inject(WINDOW) private readonly win: Window,\n ) {\n super(focusable, el);\n this.patchCssStyles();\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.zone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus({preventScroll: true});\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLInputElement = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n\n const blurHandler = (): void => fakeInput.focus({preventScroll: true});\n const focusHandler = (): void => {\n clearTimeout(fakeFocusTimeoutId);\n\n fakeFocusTimeoutId = this.win.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n\n fakeInput.removeEventListener(`blur`, blurHandler);\n fakeInput.removeEventListener(`focus`, focusHandler);\n\n elementFocusTimeoutId = this.win.setTimeout(() => {\n this.element.focus({preventScroll: false});\n fakeInput.remove();\n }, duration);\n });\n };\n\n fakeInput.addEventListener(`blur`, blurHandler, {once: true});\n fakeInput.addEventListener(`focus`, focusHandler);\n\n if (this.insideDialog()) {\n this.win.document.body.appendChild(fakeInput);\n } else {\n this.element.parentElement?.appendChild(fakeInput);\n }\n\n fakeInput.focus({preventScroll: true});\n }\n\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n *\n * required note:\n * [fakeInput.readOnly = true] ~\n * don't use {readOnly: true} value, it's doesn't work for emulate autofill\n *\n * [fakeInput.style.opacity = 0] ~\n * don't use {opacity: 0}, sometimes it's doesn't work for emulate real input\n *\n * [fakeInput.style.fontSize = 16px] ~\n * disable possible auto zoom\n *\n * [fakeInput.style.top/left] ~\n * emulate position cursor before focus to real textfield element\n */\n private makeFakeInput(): HTMLInputElement {\n const fakeInput: HTMLInputElement = this.renderer.createElement(`input`);\n const rect: DOMRect = this.element.getBoundingClientRect();\n\n this.patchFakeInputFromFocusableElement(fakeInput);\n\n fakeInput.style.height = tuiPx(rect.height);\n fakeInput.style.width = tuiPx(rect.width / 2);\n fakeInput.style.position = `fixed`;\n fakeInput.style.zIndex = `-99999999`;\n fakeInput.style.caretColor = `transparent`;\n fakeInput.style.border = `none`;\n fakeInput.style.outline = `none`;\n fakeInput.style.color = `transparent`;\n fakeInput.style.background = `transparent`;\n fakeInput.style.cursor = `none`;\n fakeInput.style.fontSize = tuiPx(16);\n fakeInput.style.top = tuiPx(rect.top);\n fakeInput.style.left = tuiPx(rect.left);\n\n return fakeInput;\n }\n\n private getDurationTimeBeforeFocus(): number {\n return (\n parseFloat(\n this.win\n .getComputedStyle(this.element)\n .getPropertyValue(`--tui-duration`),\n ) || 0\n );\n }\n\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n private insideDialog(): boolean {\n return !!this.element.closest(`tui-dialog`);\n }\n\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n private patchCssStyles(): void {\n const doc = this.win.document;\n\n for (const element of [doc.documentElement, doc.body]) {\n element.style.setProperty(`overflow`, `auto`);\n element.style.setProperty(`height`, `100%`);\n }\n }\n\n /**\n * @note:\n * inherit basic attributes values from real input\n * for help iOS detect what do you want see on keyboard,\n * for example [inputMode=numeric, autocomplete=cc-number]\n */\n private patchFakeInputFromFocusableElement(fakeInput: HTMLInputElement): void {\n TEXTFIELD_ATTRS.forEach(attr => {\n const value = this.element.getAttribute(attr);\n\n if (tuiIsPresent(value)) {\n fakeInput.setAttribute(attr, value);\n }\n });\n }\n}\n","import {\n ElementRef,\n InjectionToken,\n NgZone,\n Optional,\n Provider,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\n// eslint-disable-next-line import/no-cycle\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport interface TuiAutofocusOptions {\n readonly delay: number;\n}\n\nexport const TUI_AUTOFOCUS_DEFAULT_OPTIONS: TuiAutofocusOptions = {\n delay: NaN, // NaN = no delay/sync\n};\n\nexport const TUI_AUTOFOCUS_OPTIONS = tuiCreateToken(TUI_AUTOFOCUS_DEFAULT_OPTIONS);\n\nexport function tuiAutoFocusOptionsProvider(\n options: Partial<TuiAutofocusOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_AUTOFOCUS_OPTIONS,\n options,\n TUI_AUTOFOCUS_DEFAULT_OPTIONS,\n );\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n `[TUI_AUTOFOCUS_HANDLER]`,\n);\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n useFactory: (\n focusable: TuiFocusableElementAccessor | null,\n el: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n zone: NgZone,\n win: Window,\n isIos: boolean,\n ) =>\n isIos\n ? new TuiIosAutofocusHandler(focusable, el, renderer, zone, win)\n : new TuiDefaultAutofocusHandler(focusable, el, animationFrame$),\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n WINDOW,\n TUI_IS_IOS,\n ],\n },\n TuiDestroyService,\n];\n","import {AfterViewInit, Directive, Inject, Input, Self} from '@angular/core';\nimport {tuiCoerceBooleanProperty} from '@taiga-ui/cdk/coercion';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {timer} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_OPTIONS,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n TuiAutofocusOptions,\n} from './autofocus.options';\n\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input('tuiAutoFocus')\n autoFocus: boolean | '' = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER)\n private readonly handler: TuiAutofocusHandler,\n @Inject(TUI_AUTOFOCUS_OPTIONS)\n private readonly options: TuiAutofocusOptions,\n @Self()\n @Inject(TuiDestroyService)\n private readonly destroy$: TuiDestroyService,\n ) {}\n\n ngAfterViewInit(): void {\n if (tuiCoerceBooleanProperty(this.autoFocus)) {\n this.focus();\n }\n }\n\n focus(): void {\n if (Number.isNaN(this.options.delay)) {\n void Promise.resolve().then(() => this.handler.setFocus());\n } else {\n timer(this.options.delay)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.handler.setFocus());\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n@Directive()\nexport class TuiSynchronousAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n ) {\n super(focusable, el);\n }\n\n setFocus(): void {\n this.element.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MASsB,2BAA2B,CAAA;IAC7C,WACuB,CAAA,SAA6C,EAC7C,EAA2B,EAAA;QAD3B,IAAS,CAAA,SAAA,GAAT,SAAS,CAAoC;QAC7C,IAAE,CAAA,EAAA,GAAF,EAAE,CAAyB;KAC9C;AAEJ,IAAA,IAAc,OAAO,GAAA;;AACjB,QAAA,OAAO,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,SAAS,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,sBAAsB,KAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;KAC1E;AAED,IAAA,IAAc,kBAAkB,GAAA;QAC5B,OAAO,IAAI,C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A,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHZ,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAC1B,qBAAqB,CAAA,EAAA,CAAA,CAAA;iHAEtB,kBAAkB,EAAA,CAAA,CAAA;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACAK,MAAO,8BAA+B,SAAQ,2BAA2B,CAAA;IAC3E,WAII,CAAA,SAA6C,EACzB,EAA2B,EAAA;AAE/C,QAAA,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;KACxB;IAED,QAAQ,GAAA;QACJ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;KAC7C;;4HAbQ,8BAA8B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAI3B,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAE3B,UAAU,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;gHANb,8BAA8B,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,SAAS;;0BAGD,QAAQ;;0BACR,IAAI;;0BACJ,MAAM;2BAAC,2BAA2B,CAAA;;0BAElC,MAAM;2BAAC,UAAU,CAAA;;;ACb1B;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["../../../projects/cdk/directives/auto-focus/handlers/abstract.handler.ts","../../../projects/cdk/directives/auto-focus/handlers/default.handler.ts","../../../projects/cdk/directives/auto-focus/handlers/ios.handler.ts","../../../projects/cdk/directives/auto-focus/autofocus.options.ts","../../../projects/cdk/directives/auto-focus/autofocus.directive.ts","../../../projects/cdk/directives/auto-focus/autofocus.module.ts","../../../projects/cdk/directives/auto-focus/handlers/sync.handler.ts","../../../projects/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport type {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly focusable: TuiFocusableElementAccessor | null,\n protected readonly el: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return this.focusable?.nativeFocusableElement || this.el.nativeElement;\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches(`input, textarea, [contenteditable]`);\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = `.ng-animating`;\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(focusable, el);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus({preventScroll: true}));\n } else {\n this.element.focus({preventScroll: true});\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {tuiIsPresent, tuiPx} from '@taiga-ui/cdk/utils';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TEXTFIELD_ATTRS = [\n `type`,\n `inputMode`,\n `autocomplete`,\n `accept`,\n `min`,\n `max`,\n `step`,\n `pattern`,\n `size`,\n `maxlength`,\n] as const;\n\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(NgZone) private readonly zone: NgZone,\n @Inject(WINDOW) private readonly win: Window,\n ) {\n super(focusable, el);\n this.patchCssStyles();\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.zone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus({preventScroll: true});\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLInputElement = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n\n const blurHandler = (): void => fakeInput.focus({preventScroll: true});\n const focusHandler = (): void => {\n clearTimeout(fakeFocusTimeoutId);\n\n fakeFocusTimeoutId = this.win.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n\n fakeInput.removeEventListener(`blur`, blurHandler);\n fakeInput.removeEventListener(`focus`, focusHandler);\n\n elementFocusTimeoutId = this.win.setTimeout(() => {\n this.element.focus({preventScroll: false});\n fakeInput.remove();\n }, duration);\n });\n };\n\n fakeInput.addEventListener(`blur`, blurHandler, {once: true});\n fakeInput.addEventListener(`focus`, focusHandler);\n\n if (this.insideDialog()) {\n this.win.document.body.appendChild(fakeInput);\n } else {\n this.element.parentElement?.appendChild(fakeInput);\n }\n\n fakeInput.focus({preventScroll: true});\n }\n\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n *\n * required note:\n * [fakeInput.readOnly = true] ~\n * don't use {readOnly: true} value, it's doesn't work for emulate autofill\n *\n * [fakeInput.style.opacity = 0] ~\n * don't use {opacity: 0}, sometimes it's doesn't work for emulate real input\n *\n * [fakeInput.style.fontSize = 16px] ~\n * disable possible auto zoom\n *\n * [fakeInput.style.top/left] ~\n * emulate position cursor before focus to real textfield element\n */\n private makeFakeInput(): HTMLInputElement {\n const fakeInput: HTMLInputElement = this.renderer.createElement(`input`);\n const rect: DOMRect = this.element.getBoundingClientRect();\n\n this.patchFakeInputFromFocusableElement(fakeInput);\n\n fakeInput.style.height = tuiPx(rect.height);\n fakeInput.style.width = tuiPx(rect.width / 2);\n fakeInput.style.position = `fixed`;\n fakeInput.style.zIndex = `-99999999`;\n fakeInput.style.caretColor = `transparent`;\n fakeInput.style.border = `none`;\n fakeInput.style.outline = `none`;\n fakeInput.style.color = `transparent`;\n fakeInput.style.background = `transparent`;\n fakeInput.style.cursor = `none`;\n fakeInput.style.fontSize = tuiPx(16);\n fakeInput.style.top = tuiPx(rect.top);\n fakeInput.style.left = tuiPx(rect.left);\n\n return fakeInput;\n }\n\n private getDurationTimeBeforeFocus(): number {\n return (\n parseFloat(\n this.win\n .getComputedStyle(this.element)\n .getPropertyValue(`--tui-duration`),\n ) || 0\n );\n }\n\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n private insideDialog(): boolean {\n return !!this.element.closest(`tui-dialog`);\n }\n\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n private patchCssStyles(): void {\n [this.win.document.documentElement, this.win.document.body].forEach(element => {\n element.style.setProperty(`overflow`, `auto`);\n element.style.setProperty(`height`, `100%`);\n });\n }\n\n /**\n * @note:\n * inherit basic attributes values from real input\n * for help iOS detect what do you want see on keyboard,\n * for example [inputMode=numeric, autocomplete=cc-number]\n */\n private patchFakeInputFromFocusableElement(fakeInput: HTMLInputElement): void {\n TEXTFIELD_ATTRS.forEach(attr => {\n const value = this.element.getAttribute(attr);\n\n if (tuiIsPresent(value)) {\n fakeInput.setAttribute(attr, value);\n }\n });\n }\n}\n","import {\n ElementRef,\n InjectionToken,\n NgZone,\n Optional,\n Provider,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport interface TuiAutofocusOptions {\n readonly delay: number;\n}\n\nexport const TUI_AUTOFOCUS_DEFAULT_OPTIONS: TuiAutofocusOptions = {\n delay: NaN, // NaN = no delay/sync\n};\n\nexport const TUI_AUTOFOCUS_OPTIONS = tuiCreateToken(TUI_AUTOFOCUS_DEFAULT_OPTIONS);\n\nexport function tuiAutoFocusOptionsProvider(\n options: Partial<TuiAutofocusOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_AUTOFOCUS_OPTIONS,\n options,\n TUI_AUTOFOCUS_DEFAULT_OPTIONS,\n );\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n `[TUI_AUTOFOCUS_HANDLER]`,\n);\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n useFactory: (\n focusable: TuiFocusableElementAccessor | null,\n el: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n zone: NgZone,\n win: Window,\n isIos: boolean,\n ) =>\n isIos\n ? new TuiIosAutofocusHandler(focusable, el, renderer, zone, win)\n : new TuiDefaultAutofocusHandler(focusable, el, animationFrame$),\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n WINDOW,\n TUI_IS_IOS,\n ],\n },\n TuiDestroyService,\n];\n","import {AfterViewInit, Directive, Inject, Input, Self} from '@angular/core';\nimport {tuiCoerceBooleanProperty} from '@taiga-ui/cdk/coercion';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {timer} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_OPTIONS,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n TuiAutofocusOptions,\n} from './autofocus.options';\n\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input('tuiAutoFocus')\n autoFocus: boolean | '' = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER)\n private readonly handler: TuiAutofocusHandler,\n @Inject(TUI_AUTOFOCUS_OPTIONS)\n private readonly options: TuiAutofocusOptions,\n @Self()\n @Inject(TuiDestroyService)\n private readonly destroy$: TuiDestroyService,\n ) {}\n\n ngAfterViewInit(): void {\n if (tuiCoerceBooleanProperty(this.autoFocus)) {\n this.focus();\n }\n }\n\n focus(): void {\n if (Number.isNaN(this.options.delay)) {\n void Promise.resolve().then(() => this.handler.setFocus());\n } else {\n timer(this.options.delay)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.handler.setFocus());\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n@Directive()\nexport class TuiSynchronousAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n focusable: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n ) {\n super(focusable, el);\n }\n\n setFocus(): void {\n this.element.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MASsB,2BAA2B,CAAA;IAC7C,WACuB,CAAA,SAA6C,EAC7C,EAA2B,EAAA;QAD3B,IAAS,CAAA,SAAA,GAAT,SAAS,CAAoC;QAC7C,IAAE,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,CAAA,CAAA;4FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,SAAS;;0BAGD,QAAQ;;0BACR,IAAI;;0BACJ,MAAM;2BAAC,2BAA2B,CAAA;;0BAElC,MAAM;2BAAC,UAAU,CAAA;;;ACb1B;;AAEG;;;;"}
|
@@ -64,8 +64,8 @@ TuiAutofilledModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
64
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiAutofilledModule, decorators: [{
|
65
65
|
type: NgModule,
|
66
66
|
args: [{
|
67
|
-
exports: [TuiAutofilledDirective],
|
68
67
|
declarations: [TuiAutofilledDirective, TuiAutofilledStyleComponent],
|
68
|
+
exports: [TuiAutofilledDirective],
|
69
69
|
}]
|
70
70
|
}] });
|
71
71
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["../../../projects/cdk/directives/autofilled/autofilled-style.component.ts","../../../projects/cdk/directives/autofilled/autofilled.directive.ts","../../../projects/cdk/directives/autofilled/autofilled.module.ts","../../../projects/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n host: {\n class: 'tui-autofilled-styles',\n },\n template: '',\n styleUrls: ['./autofilled.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiAutofilledStyleComponent {}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Output,\n} from '@angular/core';\nimport {TuiDirectiveStylesService} from '@taiga-ui/cdk/services';\n\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@Directive({\n selector: '[tuiAutofilledChange]',\n host: {class: 'tui-autofill'},\n})\nexport class TuiAutofilledDirective {\n @HostBinding('class._autofilled')\n autofilled = false;\n\n @Output()\n readonly tuiAutofilledChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiAutofilledStyleComponent);\n }\n\n @HostListener('transitionstart', ['$event'])\n transitionStartHandler({propertyName, target}: TransitionEvent): void {\n const matchedAutofill =\n propertyName.includes('box-shadow') && (target as Element)?.matches('input');\n\n if (matchedAutofill) {\n this.autofilled = !this.autofilled;\n this.tuiAutofilledChange.emit(this.autofilled);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutofilledDirective} from './autofilled.directive';\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@NgModule({\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["../../../projects/cdk/directives/autofilled/autofilled-style.component.ts","../../../projects/cdk/directives/autofilled/autofilled.directive.ts","../../../projects/cdk/directives/autofilled/autofilled.module.ts","../../../projects/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n host: {\n class: 'tui-autofilled-styles',\n },\n template: '',\n styleUrls: ['./autofilled.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiAutofilledStyleComponent {}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Output,\n} from '@angular/core';\nimport {TuiDirectiveStylesService} from '@taiga-ui/cdk/services';\n\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@Directive({\n selector: '[tuiAutofilledChange]',\n host: {class: 'tui-autofill'},\n})\nexport class TuiAutofilledDirective {\n @HostBinding('class._autofilled')\n autofilled = false;\n\n @Output()\n readonly tuiAutofilledChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiAutofilledStyleComponent);\n }\n\n @HostListener('transitionstart', ['$event'])\n transitionStartHandler({propertyName, target}: TransitionEvent): void {\n const matchedAutofill =\n propertyName.includes('box-shadow') && (target as Element)?.matches('input');\n\n if (matchedAutofill) {\n this.autofilled = !this.autofilled;\n this.tuiAutofilledChange.emit(this.autofilled);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutofilledDirective} from './autofilled.directive';\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@NgModule({\n declarations: [TuiAutofilledDirective, TuiAutofilledStyleComponent],\n exports: [TuiAutofilledDirective],\n})\nexport class TuiAutofilledModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,2BAA2B,CAAA;;yHAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,2BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,2BAA2B,uGAL1B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4FAKH,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,uBAAuB;AACjC,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;oBACZ,SAAS,EAAE,CAAC,yBAAyB,CAAC;oBACtC,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,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AA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;AAChC,iBAAA,CAAA;;0BASQ,MAAM;2BAAC,yBAAyB,CAAA;4CANrC,UAAU,EAAA,CAAA;sBADT,WAAW;uBAAC,mBAAmB,CAAA;gBAIvB,mBAAmB,EAAA,CAAA;sBAD3B,MAAM;gBAUP,sBAAsB,EAAA,CAAA;sBADrB,YAAY;uBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MCpBlC,mBAAmB,CAAA;;iHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAHb,YAAA,EAAA,CAAA,sBAAsB,EAAE,2BAA2B,aACxD,sBAAsB,CAAA,EAAA,CAAA,CAAA;kHAEvB,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;oBACnE,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACpC,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
@@ -15,10 +15,7 @@ class TuiFocusTrapDirective {
|
|
15
15
|
* but it might cause ExpressionChanged error due to potential HostBinding.
|
16
16
|
* Microtask keeps it in the same frame but allows change detection to run
|
17
17
|
*/
|
18
|
-
|
19
|
-
Promise.resolve().then(() => {
|
20
|
-
this.el.nativeElement.focus();
|
21
|
-
});
|
18
|
+
void Promise.resolve().then(() => this.el.nativeElement.focus());
|
22
19
|
}
|
23
20
|
onBlur() {
|
24
21
|
this.renderer.removeAttribute(this.el.nativeElement, 'tabIndex');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["../../../projects/cdk/directives/focus-trap/focus-trap.directive.ts","../../../projects/cdk/directives/focus-trap/focus-trap.module.ts","../../../projects/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {tuiContainsOrAfter, tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n tuiBlurNativeFocused,\n tuiGetClosestFocusable,\n tuiGetNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n },\n})\nexport class TuiFocusTrapDirective implements OnDestroy {\n private readonly activeElement = tuiGetNativeFocused(this.doc);\n\n constructor(\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n /**\n * This would cause currently focused element to lose focus,\n * but it might cause ExpressionChanged error due to potential HostBinding.\n * Microtask keeps it in the same frame but allows change detection to run\n */\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["../../../projects/cdk/directives/focus-trap/focus-trap.directive.ts","../../../projects/cdk/directives/focus-trap/focus-trap.module.ts","../../../projects/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {tuiContainsOrAfter, tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n tuiBlurNativeFocused,\n tuiGetClosestFocusable,\n tuiGetNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n },\n})\nexport class TuiFocusTrapDirective implements OnDestroy {\n private readonly activeElement = tuiGetNativeFocused(this.doc);\n\n constructor(\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n /**\n * This would cause currently focused element to lose focus,\n * but it might cause ExpressionChanged error due to potential HostBinding.\n * Microtask keeps it in the same frame but allows change detection to run\n */\n void Promise.resolve().then(() => this.el.nativeElement.focus());\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.renderer.removeAttribute(this.el.nativeElement, 'tabIndex');\n }\n\n @HostListener('window:focusin.silent', ['$event.target'])\n onFocusIn(node: Node): void {\n const {nativeElement} = this.el;\n\n if (tuiContainsOrAfter(nativeElement, node)) {\n return;\n }\n\n const focusable = tuiGetClosestFocusable({\n initial: nativeElement,\n root: nativeElement,\n });\n\n if (focusable) {\n focusable.focus();\n }\n }\n\n ngOnDestroy(): void {\n tuiBlurNativeFocused(this.doc);\n\n /**\n * HostListeners are triggered even after ngOnDestroy\n * {@link https://github.com/angular/angular/issues/38100}\n * so we need to delay it but stay in the same sync cycle,\n * therefore using Promise instead of setTimeout\n */\n // eslint-disable-next-line\n Promise.resolve().then(() => {\n if (tuiIsHTMLElement(this.activeElement)) {\n this.activeElement.focus();\n }\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusTrapDirective} from './focus-trap.directive';\n\n@NgModule({\n declarations: [TuiFocusTrapDirective],\n exports: [TuiFocusTrapDirective],\n})\nexport class TuiFocusTrapModule {}\n","/**\n * Gener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AAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHZ,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAC1B,qBAAqB,CAAA,EAAA,CAAA,CAAA;iHAEtB,kBAAkB,EAAA,CAAA,CAAA;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -26,8 +26,7 @@ class TuiMediaDirective {
|
|
26
26
|
this.el.nativeElement.pause();
|
27
27
|
}
|
28
28
|
else {
|
29
|
-
|
30
|
-
this.el.nativeElement.play();
|
29
|
+
void this.el.nativeElement.play();
|
31
30
|
this.updatePlaybackRate(this.playbackRate);
|
32
31
|
}
|
33
32
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/media.module.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n volume = 1;\n\n @Input('playbackRate')\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLMediaElement>,\n ) {}\n\n @Input()\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.el.nativeElement.currentTime = currentTime;\n }\n }\n\n get currentTime(): number {\n return this.el.nativeElement.currentTime;\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.el.nativeElement.pause();\n } else {\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/media.module.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n volume = 1;\n\n @Input('playbackRate')\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLMediaElement>,\n ) {}\n\n @Input()\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.el.nativeElement.currentTime = currentTime;\n }\n }\n\n get currentTime(): number {\n return this.el.nativeElement.currentTime;\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.el.nativeElement.pause();\n } else {\n void this.el.nativeElement.play();\n this.updatePlaybackRate(this.playbackRate);\n }\n }\n\n get paused(): boolean {\n return this.el.nativeElement.paused;\n }\n\n // @bad TODO: Make sure no other events can affect this like network issues etc.\n @HostListener('ended', ['true'])\n @HostListener('pause', ['true'])\n @HostListener('play', ['false'])\n onPausedChange(paused: boolean): void {\n this.pausedChange.emit(paused);\n this.updatePlaybackRate(this.playbackRate);\n }\n\n @HostListener('volumechange')\n onVolumeChange(): void {\n this.volume = this.el.nativeElement.volume;\n this.volumeChange.emit(this.volume);\n }\n\n @HostListener('timeupdate')\n @HostListener('seeking')\n @HostListener('seeked')\n onCurrentTimeChange(): void {\n this.currentTimeChange.emit(this.currentTime);\n }\n\n @HostListener('durationchange')\n changeDetectionTrigger(): void {\n // @bad TODO: consider if other events need to trigger CD\n }\n\n private updatePlaybackRate(playbackRate: number): void {\n this.playbackRate = playbackRate;\n this.el.nativeElement.playbackRate = this.playbackRate;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMediaDirective} from './media.directive';\n\n@NgModule({\n declarations: [TuiMediaDirective],\n exports: [TuiMediaDirective],\n})\nexport class TuiMediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,iBAAiB,CAAA;AAqB1B,IAAA,WAAA,CAEqB,EAAgC,EAAA;QAAhC,IAAE,CAAA,EAAA,GAAF,EAAE,CAA8B;QAtB7C,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;QAIzB,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;AAQF,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,YAAY,EAAU,CAAC;AAG/C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAW,CAAC;AAG3C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;KAK/C;IAjBJ,IACI,kBAAkB,CAAC,YAAoB,EAAA;AACvC,QAAA,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;KACzC;IAgBD,IACI,WAAW,CAAC,WAAmB,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE;YACjD,IAAI,CAAC,EAA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
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiFilterPipeModule, decorators: [{
|
22
22
|
type: NgModule,
|
23
23
|
args: [{
|
24
|
-
exports: [TuiFilterPipe],
|
25
24
|
declarations: [TuiFilterPipe],
|
25
|
+
exports: [TuiFilterPipe],
|
26
26
|
}]
|
27
27
|
}] });
|
28
28
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-filter.js","sources":["../../../projects/cdk/pipes/filter/filter.pipe.ts","../../../projects/cdk/pipes/filter/filter.module.ts","../../../projects/cdk/pipes/filter/taiga-ui-cdk-pipes-filter.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMatcher, TuiTypedMatcher} from '@taiga-ui/cdk/types';\n\n@Pipe({name: `tuiFilter`})\nexport class TuiFilterPipe implements PipeTransform {\n /**\n * Filters an array through a matcher function using additional arguments\n *\n * @param items array\n * @param matcher method for filtering\n * @param args arbitrary number of additional arguments\n */\n transform<T>(items: readonly T[], matcher: TuiMatcher<T>, ...args: any[]): T[];\n transform<T, U extends unknown[]>(\n items: readonly T[],\n matcher: TuiTypedMatcher<[T, ...U]>,\n ...args: U\n ): T[] {\n return items.filter(item => matcher(item, ...args));\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFilterPipe} from './filter.pipe';\n\n@NgModule({\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes-filter.js","sources":["../../../projects/cdk/pipes/filter/filter.pipe.ts","../../../projects/cdk/pipes/filter/filter.module.ts","../../../projects/cdk/pipes/filter/taiga-ui-cdk-pipes-filter.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMatcher, TuiTypedMatcher} from '@taiga-ui/cdk/types';\n\n@Pipe({name: `tuiFilter`})\nexport class TuiFilterPipe implements PipeTransform {\n /**\n * Filters an array through a matcher function using additional arguments\n *\n * @param items array\n * @param matcher method for filtering\n * @param args arbitrary number of additional arguments\n */\n transform<T>(items: readonly T[], matcher: TuiMatcher<T>, ...args: any[]): T[];\n transform<T, U extends unknown[]>(\n items: readonly T[],\n matcher: TuiTypedMatcher<[T, ...U]>,\n ...args: U\n ): T[] {\n return items.filter(item => matcher(item, ...args));\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFilterPipe} from './filter.pipe';\n\n@NgModule({\n declarations: [TuiFilterPipe],\n exports: [TuiFilterPipe],\n})\nexport class TuiFilterPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAIa,aAAa,CAAA;AAStB,IAAA,SAAS,CACL,KAAmB,EACnB,OAAmC,EACnC,GAAG,IAAO,EAAA;AAEV,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;KACvD;;2GAfQ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;yGAAb,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,IAAI;mBAAC,EAAC,IAAI,EAAE,CAAA,SAAA,CAAW,EAAC,CAAA;;;MCKZ,mBAAmB,CAAA;;iHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHb,aAAa,CAAA,EAAA,OAAA,EAAA,CAClB,aAAa,CAAA,EAAA,CAAA,CAAA;kHAEd,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,CAAC,aAAa,CAAC;AAC3B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -21,8 +21,8 @@ TuiKeysPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
21
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiKeysPipeModule, decorators: [{
|
22
22
|
type: NgModule,
|
23
23
|
args: [{
|
24
|
-
exports: [TuiKeysPipe],
|
25
24
|
declarations: [TuiKeysPipe],
|
25
|
+
exports: [TuiKeysPipe],
|
26
26
|
}]
|
27
27
|
}] });
|
28
28
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-keys.js","sources":["../../../projects/cdk/pipes/keys/keys.pipe.ts","../../../projects/cdk/pipes/keys/keys.module.ts","../../../projects/cdk/pipes/keys/taiga-ui-cdk-pipes-keys.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiKeys`})\nexport class TuiKeysPipe implements PipeTransform {\n transform(object: Record<any, any>): string[] {\n return Object.keys(object);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiKeysPipe} from './keys.pipe';\n\n@NgModule({\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes-keys.js","sources":["../../../projects/cdk/pipes/keys/keys.pipe.ts","../../../projects/cdk/pipes/keys/keys.module.ts","../../../projects/cdk/pipes/keys/taiga-ui-cdk-pipes-keys.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiKeys`})\nexport class TuiKeysPipe implements PipeTransform {\n transform(object: Record<any, any>): string[] {\n return Object.keys(object);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiKeysPipe} from './keys.pipe';\n\n@NgModule({\n declarations: [TuiKeysPipe],\n exports: [TuiKeysPipe],\n})\nexport class TuiKeysPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,WAAW,CAAA;AACpB,IAAA,SAAS,CAAC,MAAwB,EAAA;AAC9B,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC9B;;yGAHQ,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,CAAA,OAAA,CAAS,EAAC,CAAA;;;MCMV,iBAAiB,CAAA;;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAjB,iBAAiB,EAAA,YAAA,EAAA,CAHX,WAAW,CAAA,EAAA,OAAA,EAAA,CAChB,WAAW,CAAA,EAAA,CAAA,CAAA;gHAEZ,iBAAiB,EAAA,CAAA,CAAA;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,WAAW,CAAC;oBAC3B,OAAO,EAAE,CAAC,WAAW,CAAC;AACzB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -21,8 +21,8 @@ TuiMapperPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
21
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMapperPipeModule, decorators: [{
|
22
22
|
type: NgModule,
|
23
23
|
args: [{
|
24
|
-
exports: [TuiMapperPipe],
|
25
24
|
declarations: [TuiMapperPipe],
|
25
|
+
exports: [TuiMapperPipe],
|
26
26
|
}]
|
27
27
|
}] });
|
28
28
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-mapper.js","sources":["../../../projects/cdk/pipes/mapper/mapper.pipe.ts","../../../projects/cdk/pipes/mapper/mapper.module.ts","../../../projects/cdk/pipes/mapper/taiga-ui-cdk-pipes-mapper.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMapper, TuiTypedMapper} from '@taiga-ui/cdk/types';\n\n@Pipe({name: `tuiMapper`})\nexport class TuiMapperPipe implements PipeTransform {\n /**\n * Maps object to an arbitrary result through a mapper function\n *\n * @param value an item to transform\n * @param mapper a mapping function\n * @param args arbitrary number of additional arguments\n */\n transform<T, G>(value: T, mapper: TuiMapper<T, G>, ...args: any[]): G;\n transform<T extends unknown[], U, G>(\n value: U,\n mapper: TuiTypedMapper<[U, ...T], G>,\n ...args: T\n ): G {\n return mapper(value, ...args);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMapperPipe} from './mapper.pipe';\n\n@NgModule({\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes-mapper.js","sources":["../../../projects/cdk/pipes/mapper/mapper.pipe.ts","../../../projects/cdk/pipes/mapper/mapper.module.ts","../../../projects/cdk/pipes/mapper/taiga-ui-cdk-pipes-mapper.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMapper, TuiTypedMapper} from '@taiga-ui/cdk/types';\n\n@Pipe({name: `tuiMapper`})\nexport class TuiMapperPipe implements PipeTransform {\n /**\n * Maps object to an arbitrary result through a mapper function\n *\n * @param value an item to transform\n * @param mapper a mapping function\n * @param args arbitrary number of additional arguments\n */\n transform<T, G>(value: T, mapper: TuiMapper<T, G>, ...args: any[]): G;\n transform<T extends unknown[], U, G>(\n value: U,\n mapper: TuiTypedMapper<[U, ...T], G>,\n ...args: T\n ): G {\n return mapper(value, ...args);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMapperPipe} from './mapper.pipe';\n\n@NgModule({\n declarations: [TuiMapperPipe],\n exports: [TuiMapperPipe],\n})\nexport class TuiMapperPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAIa,aAAa,CAAA;AAStB,IAAA,SAAS,CACL,KAAQ,EACR,MAAoC,EACpC,GAAG,IAAO,EAAA;AAEV,QAAA,OAAO,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;KACjC;;2GAfQ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;yGAAb,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,IAAI;mBAAC,EAAC,IAAI,EAAE,CAAA,SAAA,CAAW,EAAC,CAAA;;;MCKZ,mBAAmB,CAAA;;iHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHb,aAAa,CAAA,EAAA,OAAA,EAAA,CAClB,aAAa,CAAA,EAAA,CAAA,CAAA;kHAEd,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,CAAC,aAAa,CAAC;AAC3B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -24,8 +24,8 @@ TuiReplacePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiReplacePipeModule, decorators: [{
|
25
25
|
type: NgModule,
|
26
26
|
args: [{
|
27
|
-
exports: [TuiReplacePipe],
|
28
27
|
declarations: [TuiReplacePipe],
|
28
|
+
exports: [TuiReplacePipe],
|
29
29
|
}]
|
30
30
|
}] });
|
31
31
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-replace.js","sources":["../../../projects/cdk/pipes/replace/replace.pipe.ts","../../../projects/cdk/pipes/replace/replace.module.ts","../../../projects/cdk/pipes/replace/taiga-ui-cdk-pipes-replace.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiReplace`})\nexport class TuiReplacePipe implements PipeTransform {\n transform(\n value: string | null | undefined,\n search: RegExp | string,\n replaceValue: string | ((substring: string, ...args: any[]) => string),\n ): string {\n return (\n value?.replace(\n search,\n // TS bug: https://github.com/microsoft/TypeScript/issues/22378\n replaceValue as unknown as string,\n ) ?? ``\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiReplacePipe} from './replace.pipe';\n\n@NgModule({\n
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes-replace.js","sources":["../../../projects/cdk/pipes/replace/replace.pipe.ts","../../../projects/cdk/pipes/replace/replace.module.ts","../../../projects/cdk/pipes/replace/taiga-ui-cdk-pipes-replace.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiReplace`})\nexport class TuiReplacePipe implements PipeTransform {\n transform(\n value: string | null | undefined,\n search: RegExp | string,\n replaceValue: string | ((substring: string, ...args: any[]) => string),\n ): string {\n return (\n value?.replace(\n search,\n // TS bug: https://github.com/microsoft/TypeScript/issues/22378\n replaceValue as unknown as string,\n ) ?? ``\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiReplacePipe} from './replace.pipe';\n\n@NgModule({\n declarations: [TuiReplacePipe],\n exports: [TuiReplacePipe],\n})\nexport class TuiReplacePipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,cAAc,CAAA;AACvB,IAAA,SAAS,CACL,KAAgC,EAChC,MAAuB,EACvB,YAAsE,EAAA;;QAEtE,QACI,CAAA,EAAA,GAAA,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,OAAO,CACV,MAAM;;AAEN,QAAA,YAAiC,CACpC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAE,CAAA,EACT;KACL;;4GAbQ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;0GAAd,cAAc,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,CAAA,UAAA,CAAY,EAAC,CAAA;;;MCMb,oBAAoB,CAAA;;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,YAAA,EAAA,CAHd,cAAc,CAAA,EAAA,OAAA,EAAA,CACnB,cAAc,CAAA,EAAA,CAAA,CAAA;mHAEf,oBAAoB,EAAA,CAAA,CAAA;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,cAAc,CAAC;oBAC9B,OAAO,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -96,7 +96,9 @@ function tuiGetClosestFocusable({ initial, root, previous = false, keyboard = tr
|
|
96
96
|
* @return true if focused
|
97
97
|
*/
|
98
98
|
function tuiIsNativeFocused(node) {
|
99
|
-
return !!(node === null || node === void 0 ? void 0 : node.ownerDocument) &&
|
99
|
+
return (!!(node === null || node === void 0 ? void 0 : node.ownerDocument) &&
|
100
|
+
tuiGetNativeFocused(node.ownerDocument) === node &&
|
101
|
+
node.ownerDocument.hasFocus());
|
100
102
|
}
|
101
103
|
|
102
104
|
/**
|
@@ -111,7 +113,9 @@ function tuiIsNativeFocusedIn(node) {
|
|
111
113
|
return false;
|
112
114
|
}
|
113
115
|
const nativeFocused = tuiGetNativeFocused(node.ownerDocument);
|
114
|
-
return nativeFocused !== null &&
|
116
|
+
return (nativeFocused !== null &&
|
117
|
+
node.contains(nativeFocused) &&
|
118
|
+
node.ownerDocument.hasFocus());
|
115
119
|
}
|
116
120
|
|
117
121
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["../../../projects/cdk/utils/focus/get-native-focused.ts","../../../projects/cdk/utils/focus/blur-native-focused.ts","../../../projects/cdk/utils/focus/is-native-keyboard-focusable.ts","../../../projects/cdk/utils/focus/is-native-mouse-focusable.ts","../../../projects/cdk/utils/focus/get-closest-focusable.ts","../../../projects/cdk/utils/focus/is-native-focused.ts","../../../projects/cdk/utils/focus/is-native-focused-in.ts","../../../projects/cdk/utils/focus/move-focus.ts","../../../projects/cdk/utils/focus/set-native-mouse-focused.ts","../../../projects/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function tuiGetNativeFocused({activeElement}: Document): Element | null {\n if (!activeElement?.shadowRoot) {\n return activeElement;\n }\n\n let element = activeElement.shadowRoot.activeElement;\n\n while (element?.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","import {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function tuiBlurNativeFocused(doc: Document): void {\n const activeElement = tuiGetNativeFocused(doc);\n\n if (tuiIsHTMLElement(activeElement)) {\n activeElement.blur();\n }\n}\n","import {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\n/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function tuiIsNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute(`disabled`) || element.getAttribute(`tabIndex`) === `-1`) {\n return false;\n }\n\n if (\n (tuiIsHTMLElement(element) && element.isContentEditable) ||\n element.getAttribute(`tabIndex`) === `0`\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case `BUTTON`:\n case `SELECT`:\n case `TEXTAREA`:\n return true;\n case `VIDEO`:\n case `AUDIO`:\n return element.hasAttribute(`controls`);\n case `INPUT`:\n return element.getAttribute(`type`) !== `hidden`;\n case `A`:\n case `LINK`:\n return element.hasAttribute(`href`);\n default:\n return false;\n }\n}\n","import {tuiIsNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function tuiIsNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute(`disabled`) &&\n (element.getAttribute(`tabIndex`) === `-1` ||\n tuiIsNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {tuiIsNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {tuiIsNativeMouseFocusable} from './is-native-mouse-focusable';\n\nexport interface TuiGetClosestFocusableOptions {\n /**\n * @description:\n * current HTML element\n */\n initial: Element;\n\n /**\n * @description:\n * determine if only keyboard focus is of interest\n */\n keyboard?: boolean;\n\n /**\n * @description:\n * should it look backwards instead (find item that will be focused with Shift + Tab)\n */\n previous?: boolean;\n\n /**\n * @description:\n * top Node limiting the search area\n */\n root: Node;\n}\n\n/**\n * @description:\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n */\nexport function tuiGetClosestFocusable({\n initial,\n root,\n previous = false,\n keyboard = true,\n}: TuiGetClosestFocusableOptions): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? tuiIsNativeKeyboardFocusable : tuiIsNativeMouseFocusable;\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = initial;\n\n while (previous ? treeWalker.previousNode() : treeWalker.nextNode()) {\n if (tuiIsHTMLElement(treeWalker.currentNode)) {\n initial = treeWalker.currentNode;\n }\n\n if (tuiIsHTMLElement(initial) && check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n","import {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function tuiIsNativeFocused(node: Node | null): boolean {\n return !!node?.ownerDocument && tuiGetNativeFocused(node.ownerDocument) === node;\n}\n","import {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function tuiIsNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = tuiGetNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {tuiIsNativeFocused} from './is-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function tuiMoveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n elements[currentIndex].focus();\n\n if (tuiIsNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function tuiSetNativeMouseFocused(\n element: Element & HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === `function`) {\n element.dispatchEvent(new Event(`mousedown`, {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent(`Event`);\n\n event.initEvent(`mousedown`, true, true);\n element.dispatchEvent(event);\n }\n\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;AAIG;AACa,SAAA,mBAAmB,CAAC,EAAC,aAAa,EAAW,EAAA;IACzD,IAAI,EAAC,aAAa,KAAb,IAAA,IAAA,aAAa,uBAAb,aAAa,CAAE,UAAU,CAAA,EAAE;AAC5B,QAAA,OAAO,aAAa,CAAC;AACxB,KAAA;AAED,IAAA,IAAI,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;AAErD,IAAA,OAAO,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAE;AACxB,QAAA,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;AAC9C,KAAA;AAED,IAAA,OAAO,OAAO,CAAC;AACnB;;ACbA;;AAEG;AACG,SAAU,oBAAoB,CAAC,GAAa,EAAA;AAC9C,IAAA,MAAM,aAAa,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;AAE/C,IAAA,IAAI,gBAAgB,CAAC,aAAa,CAAC,EAAE;QACjC,aAAa,CAAC,IAAI,EAAE,CAAC;AACxB,KAAA;AACL;;ACXA;;;;;AAKG;AACG,SAAU,4BAA4B,CAAC,OAAgB,EAA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AAClC,KAAA;AAAM,SAAA;QACH,OAAO,CAAC,IAAI,EAAE,CAAC;AAClB,KAAA;AACL;;AC9BA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["../../../projects/cdk/utils/focus/get-native-focused.ts","../../../projects/cdk/utils/focus/blur-native-focused.ts","../../../projects/cdk/utils/focus/is-native-keyboard-focusable.ts","../../../projects/cdk/utils/focus/is-native-mouse-focusable.ts","../../../projects/cdk/utils/focus/get-closest-focusable.ts","../../../projects/cdk/utils/focus/is-native-focused.ts","../../../projects/cdk/utils/focus/is-native-focused-in.ts","../../../projects/cdk/utils/focus/move-focus.ts","../../../projects/cdk/utils/focus/set-native-mouse-focused.ts","../../../projects/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function tuiGetNativeFocused({activeElement}: Document): Element | null {\n if (!activeElement?.shadowRoot) {\n return activeElement;\n }\n\n let element = activeElement.shadowRoot.activeElement;\n\n while (element?.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","import {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function tuiBlurNativeFocused(doc: Document): void {\n const activeElement = tuiGetNativeFocused(doc);\n\n if (tuiIsHTMLElement(activeElement)) {\n activeElement.blur();\n }\n}\n","import {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\n/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function tuiIsNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute(`disabled`) || element.getAttribute(`tabIndex`) === `-1`) {\n return false;\n }\n\n if (\n (tuiIsHTMLElement(element) && element.isContentEditable) ||\n element.getAttribute(`tabIndex`) === `0`\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case `BUTTON`:\n case `SELECT`:\n case `TEXTAREA`:\n return true;\n case `VIDEO`:\n case `AUDIO`:\n return element.hasAttribute(`controls`);\n case `INPUT`:\n return element.getAttribute(`type`) !== `hidden`;\n case `A`:\n case `LINK`:\n return element.hasAttribute(`href`);\n default:\n return false;\n }\n}\n","import {tuiIsNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function tuiIsNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute(`disabled`) &&\n (element.getAttribute(`tabIndex`) === `-1` ||\n tuiIsNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {tuiIsNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {tuiIsNativeMouseFocusable} from './is-native-mouse-focusable';\n\nexport interface TuiGetClosestFocusableOptions {\n /**\n * @description:\n * current HTML element\n */\n initial: Element;\n\n /**\n * @description:\n * determine if only keyboard focus is of interest\n */\n keyboard?: boolean;\n\n /**\n * @description:\n * should it look backwards instead (find item that will be focused with Shift + Tab)\n */\n previous?: boolean;\n\n /**\n * @description:\n * top Node limiting the search area\n */\n root: Node;\n}\n\n/**\n * @description:\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n */\nexport function tuiGetClosestFocusable({\n initial,\n root,\n previous = false,\n keyboard = true,\n}: TuiGetClosestFocusableOptions): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? tuiIsNativeKeyboardFocusable : tuiIsNativeMouseFocusable;\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n );\n\n treeWalker.currentNode = initial;\n\n while (previous ? treeWalker.previousNode() : treeWalker.nextNode()) {\n if (tuiIsHTMLElement(treeWalker.currentNode)) {\n initial = treeWalker.currentNode;\n }\n\n if (tuiIsHTMLElement(initial) && check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n","import {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function tuiIsNativeFocused(node: Node | null): boolean {\n return (\n !!node?.ownerDocument &&\n tuiGetNativeFocused(node.ownerDocument) === node &&\n node.ownerDocument.hasFocus()\n );\n}\n","import {tuiGetNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function tuiIsNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = tuiGetNativeFocused(node.ownerDocument);\n\n return (\n nativeFocused !== null &&\n node.contains(nativeFocused) &&\n node.ownerDocument.hasFocus()\n );\n}\n","import {tuiIsNativeFocused} from './is-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function tuiMoveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n elements[currentIndex].focus();\n\n if (tuiIsNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function tuiSetNativeMouseFocused(\n element: Element & HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === `function`) {\n element.dispatchEvent(new Event(`mousedown`, {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent(`Event`);\n\n event.initEvent(`mousedown`, true, true);\n element.dispatchEvent(event);\n }\n\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;AAIG;AACa,SAAA,mBAAmB,CAAC,EAAC,aAAa,EAAW,EAAA;IACzD,IAAI,EAAC,aAAa,KAAb,IAAA,IAAA,aAAa,uBAAb,aAAa,CAAE,UAAU,CAAA,EAAE;AAC5B,QAAA,OAAO,aAAa,CAAC;AACxB,KAAA;AAED,IAAA,IAAI,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;AAErD,IAAA,OAAO,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAE;AACxB,QAAA,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;AAC9C,KAAA;AAED,IAAA,OAAO,OAAO,CAAC;AACnB;;ACbA;;AAEG;AACG,SAAU,oBAAoB,CAAC,GAAa,EAAA;AAC9C,IAAA,MAAM,aAAa,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;AAE/C,IAAA,IAAI,gBAAgB,CAAC,aAAa,CAAC,EAAE;QACjC,aAAa,CAAC,IAAI,EAAE,CAAC;AACxB,KAAA;AACL;;ACXA;;;;;AAKG;AACG,SAAU,4BAA4B,CAAC,OAAgB,EAAA;AACzD,IAAA,IAAI,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,CAAA,QAAA,CAAU,CAAC,KAAK,IAAI,EAAE;AAC/E,QAAA,OAAO,KAAK,CAAC;AAChB,KAAA;IAED,IACI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,iBAAiB;AACvD,QAAA,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,GAAG,EAC1C;AACE,Q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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
2
|
+
"name": "@taiga-ui/cdk",
|
3
|
+
"version": "3.54.0-canary.c32771f",
|
4
|
+
"description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
|
5
|
+
"keywords": [
|
6
|
+
"angular",
|
7
|
+
"cdk",
|
8
|
+
"component",
|
9
|
+
"development",
|
10
|
+
"kit",
|
11
|
+
"service",
|
12
|
+
"directive"
|
13
|
+
],
|
14
|
+
"homepage": "https://github.com/taiga-family/taiga-ui",
|
15
|
+
"repository": "https://github.com/taiga-family/taiga-ui",
|
16
|
+
"license": "Apache-2.0",
|
17
|
+
"dependencies": {
|
18
|
+
"@ng-web-apis/common": "3.0.6",
|
19
|
+
"@ng-web-apis/mutation-observer": "3.0.6",
|
20
|
+
"@ng-web-apis/resize-observer": "3.0.6",
|
21
|
+
"@tinkoff/ng-event-plugins": "3.1.0",
|
22
|
+
"@tinkoff/ng-polymorpheus": "4.2.0",
|
23
|
+
"tslib": "2.6.2"
|
24
|
+
},
|
25
|
+
"peerDependencies": {
|
26
|
+
"@angular/animations": ">=12.0.0",
|
27
|
+
"@angular/common": ">=12.0.0",
|
28
|
+
"@angular/core": ">=12.0.0",
|
29
|
+
"@angular/forms": ">=12.0.0",
|
30
|
+
"rxjs": ">=6.0.0"
|
31
|
+
},
|
32
|
+
"optionalDependencies": {
|
33
|
+
"ng-morph": "4.0.0",
|
34
|
+
"parse5": "6.0.1"
|
35
|
+
},
|
36
|
+
"ng-update": {
|
37
|
+
"migrations": "./schematics/migration.json",
|
38
|
+
"packageGroup": [
|
39
|
+
"@taiga-ui/i18n",
|
40
|
+
"@taiga-ui/cdk",
|
41
|
+
"@taiga-ui/core",
|
42
|
+
"@taiga-ui/kit",
|
43
|
+
"@taiga-ui/styles",
|
44
|
+
"@taiga-ui/testing",
|
45
|
+
"@taiga-ui/addon-doc",
|
46
|
+
"@taiga-ui/addon-charts",
|
47
|
+
"@taiga-ui/addon-commerce",
|
48
|
+
"@taiga-ui/icons",
|
49
|
+
"@taiga-ui/addon-preview",
|
50
|
+
"@taiga-ui/addon-tablebars",
|
51
|
+
"@taiga-ui/addon-table",
|
52
|
+
"@taiga-ui/addon-mobile",
|
53
|
+
"@taiga-ui/layout",
|
54
|
+
"@taiga-ui/proprietary-banking",
|
55
|
+
"@taiga-ui/proprietary-core",
|
56
|
+
"@taiga-ui/proprietary-icons",
|
57
|
+
"@taiga-ui/proprietary-navigation",
|
58
|
+
"@taiga-ui/proprietary-tds-icons",
|
59
|
+
"@taiga-ui/proprietary-tds-palette"
|
60
|
+
]
|
61
|
+
},
|
62
|
+
"schematics": "./schematics/collection.json",
|
63
|
+
"main": "bundles/taiga-ui-cdk.umd.js",
|
64
|
+
"module": "fesm2015/taiga-ui-cdk.js",
|
65
|
+
"es2015": "fesm2015/taiga-ui-cdk.js",
|
66
|
+
"esm2015": "esm2015/taiga-ui-cdk.js",
|
67
|
+
"fesm2015": "fesm2015/taiga-ui-cdk.js",
|
68
|
+
"typings": "taiga-ui-cdk.d.ts",
|
69
|
+
"sideEffects": false
|
70
70
|
}
|
@@ -22,7 +22,7 @@ function addTaigaModules(options) {
|
|
22
22
|
return;
|
23
23
|
}
|
24
24
|
const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, `build`);
|
25
|
-
const mainFilePath = buildOptions.main;
|
25
|
+
const mainFilePath = (buildOptions.main || buildOptions.browser);
|
26
26
|
if (!mainFilePath) {
|
27
27
|
context.logger.error(`[ERROR]: Could not find the project main file`);
|
28
28
|
return;
|
@@ -9,7 +9,7 @@ const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
9
9
|
function replaceIdentifiers(options, constants) {
|
10
10
|
!options[`skip-logs`] &&
|
11
11
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing identifiers...`);
|
12
|
-
constants.forEach(
|
12
|
+
constants.forEach(replaceIdentifier);
|
13
13
|
!options[`skip-logs`] &&
|
14
14
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} identifiers replaced \n`);
|
15
15
|
}
|