@taiga-ui/cdk 3.34.0-dev.main-f9dbe75 → 3.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/abstract/dialog.directive.d.ts +4 -3
  2. package/bundles/taiga-ui-cdk-abstract.umd.js +6 -9
  3. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  4. package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
  5. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  6. package/bundles/taiga-ui-cdk-enums.umd.js +4 -0
  7. package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
  8. package/bundles/taiga-ui-cdk-observables.umd.js +2 -0
  9. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  10. package/constants/version.d.ts +1 -1
  11. package/constants/version.js +1 -1
  12. package/esm2015/abstract/dialog.directive.js +8 -7
  13. package/esm2015/constants/version.js +2 -2
  14. package/esm2015/enums/day-of-week.js +3 -1
  15. package/esm2015/enums/month-number.js +3 -1
  16. package/esm2015/observables/drag-and-drop-from.js +3 -1
  17. package/fesm2015/taiga-ui-cdk-abstract.js +5 -4
  18. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  19. package/fesm2015/taiga-ui-cdk-constants.js +1 -1
  20. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  21. package/fesm2015/taiga-ui-cdk-enums.js +4 -0
  22. package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
  23. package/fesm2015/taiga-ui-cdk-observables.js +2 -0
  24. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  25. package/package.json +1 -1
  26. package/schematics/migration.json +6 -1
  27. package/schematics/ng-update/v3-30/constants/icons.js +1 -1
  28. package/schematics/ng-update/v3-30/index.js +2 -2
  29. package/schematics/ng-update/v3-35/constants/constants.d.ts +2 -0
  30. package/schematics/ng-update/v3-35/constants/constants.js +8 -0
  31. package/schematics/ng-update/v3-35/constants/icons.d.ts +4 -0
  32. package/schematics/ng-update/v3-35/constants/icons.js +2357 -0
  33. package/schematics/ng-update/v3-35/index.d.ts +3 -0
  34. package/schematics/ng-update/v3-35/index.js +33 -0
  35. /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-imports.d.ts +0 -0
  36. /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-imports.js +0 -0
  37. /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-text.d.ts +0 -0
  38. /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-text.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-observables.js","sources":["../../../projects/cdk/observables/control-value.ts","../../../projects/cdk/observables/typed-from-event.ts","../../../projects/cdk/observables/mouse-drag-finish-from.ts","../../../projects/cdk/observables/drag-and-drop-from.ts","../../../projects/cdk/observables/is-alive.ts","../../../projects/cdk/observables/focus-visible-observable.ts","../../../projects/cdk/observables/if-map.ts","../../../projects/cdk/observables/is-observed.ts","../../../projects/cdk/observables/items-query-list-observable.ts","../../../projects/cdk/observables/must-be-present.ts","../../../projects/cdk/observables/pressed-observable.ts","../../../projects/cdk/observables/prevent-default.ts","../../../projects/cdk/observables/scroll-from.ts","../../../projects/cdk/observables/stop-propagation.ts","../../../projects/cdk/observables/watch.ts","../../../projects/cdk/observables/zone-free.ts","../../../projects/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n */\nexport function tuiControlValue<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function tuiTypedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n /**\n * @note:\n * in RxJS 7 type signature `TuiTypedEventTarget<E>` !== `HasEventTargetAddRemove<E>`\n */\n return fromEvent<E>(target as any, event, options) as unknown as Observable<E>;\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function tuiMouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(\n tuiTypedFromEvent(target, `mouseup`),\n tuiTypedFromEvent(target, `dragend`),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function tuiDragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n tuiTypedFromEvent(element, `mousedown`).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n tuiTypedFromEvent(ownerDocument, `mousemove`).pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(tuiIsPresent)),\n ).pipe(repeat());\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<unknown, boolean> {\n return pipe(\n switchMap(() => timer(lifespan).pipe(map(ALWAYS_FALSE_HANDLER), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsFalsy} from '@taiga-ui/cdk/utils';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n map,\n repeat,\n shareReplay,\n startWith,\n switchMap,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function tuiFocusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = tuiTypedFromEvent(element, `blur`);\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = tuiTypedFromEvent(ownerDocument, `mouseup`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = tuiTypedFromEvent(ownerDocument, `mousedown`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n tuiTypedFromEvent(element, `focus`).pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !tuiIsNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(tuiIsFalsy),\n ),\n ).pipe(\n switchMap(() =>\n elementBlur$.pipe(map(ALWAYS_FALSE_HANDLER), take(1), startWith(true)),\n ),\n distinctUntilChanged(),\n );\n}\n","import {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {EMPTY, Observable, OperatorFunction, pipe} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nexport function tuiIfMap<T, G>(\n project: (value: T) => Observable<G>,\n predicate: TuiBooleanHandler<T> = Boolean,\n): OperatorFunction<T, G> {\n return pipe(switchMap(value => (predicate(value) ? project(value) : EMPTY)));\n}\n","import {Observer, Subject} from 'rxjs';\n\n/* In RxJS 7 All subjects now have an observed property */\ntype SubjectRxJS7plus<T> = Subject<T> & {observed: boolean};\n\n/* In RxJS 8 `observers` will be removed */\ntype SubjectRxJS6<T> = Subject<T> & {observers: Array<Observer<T>>};\n\nexport function tuiIsObserved<T>(observable: Subject<T>): boolean {\n return `observed` in observable\n ? (observable as SubjectRxJS7plus<T>).observed\n : !!(observable as SubjectRxJS6<T>)?.observers?.length;\n}\n","import {QueryList} from '@angular/core';\nimport {tuiGetOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function tuiQueryListChanges<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n startWith(null),\n map(() => tuiGetOriginalArrayFromQueryList(queryList)),\n );\n}\n\n/**\n * @deprecated An alias, use {@link tuiQueryListChanges} instead\n */\nexport const tuiItemsQueryListObservable = tuiQueryListChanges;\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function tuiMustBePresent<T>(): OperatorFunction<T | null | undefined, T> {\n return map(value => {\n if (!tuiIsPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, map, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function tuiPressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return tuiTypedFromEvent(element, `mousedown`).pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMap(() =>\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n map(ALWAYS_FALSE_HANDLER),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiPreventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Normalizes scroll event in case element is `html` (document.documentElement)\n */\nexport function tuiScrollFrom(element: Element): Observable<Event> {\n return tuiTypedFromEvent(\n element === element.ownerDocument.documentElement\n ? element.ownerDocument\n : element,\n `scroll`,\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiStopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiWatch<T>(cdr: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => {\n cdr.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;AAEG;AACG,SAAU,eAAe,CAC3B,OAAmD,EAAA;AAEnD,IAAA,OAAO,IAAI,UAAU,CAAC,UAAU,IAAG;AAC/B,QAAA,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YACvB,MAAM,IAAI,wBAAwB,EAAE,CAAC;AACxC,SAAA;AAED,QAAA,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAC9E,KAAC,CAAC,CAAC;AACP;;ACkBM,SAAU,iBAAiB,CAC7B,MAA8B,EAC9B,KAAa,EACb,UAAmC,EAAE,EAAA;AAErC;;;AAGG;IACH,OAAO,SAAS,CAAI,MAAa,EAAE,KAAK,EAAE,OAAO,CAA6B,CAAC;AACnF;;ACzCA;;;AAGG;AACG,SAAU,sBAAsB,CAEpC,MAAwB,EAAA;AACtB,IAAA,OAAO,KAAK,CACR,iBAAiB,CAAC,MAAM,EAAE,CAAS,OAAA,CAAA,CAAC,EACpC,iBAAiB,CAAC,MAAM,EAAE,CAAS,OAAA,CAAA,CAAC,CACvC,CAAC;AACN;;ICRY,aAIX;AAJD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,YAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,YAAA,CAAA,YAAA,CAAA,WA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,UAAE,OAAO,EACb,CAAA,MAAA,CAAQ,CACX,CAAC;AACN;;SCXgB,kBAAkB,GAAA;AAC9B,IAAA,OAAO,GAAG,CAAC,CAAC,IAAG;QACX,CAAC,CAAC,eAAe,EAAE,CAAC;AACxB,KAAC,CAAC,CAAC;AACP;;ACHM,SAAU,QAAQ,CAAI,GAAsB,EAAA;IAC9C,OAAO,GAAG,CAAC,MAAK;QACZ,GAAG,CAAC,YAAY,EAAE,CAAC;AACvB,KAAC,CAAC,CAAC;AACP;;ACLM,SAAU,WAAW,CAAI,MAAc,EAAA;AACzC,IAAA,OAAO,MAAM,IACT,IAAI,UAAU,CAAC,UAAU,IACrB,MAAM,CAAC,SAAS,CAAC;AACb,QAAA,IAAI,EAAE,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvD,QAAA,KAAK,EAAE,CAAC,KAAc,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpE,QAAA,QAAQ,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC1D,KAAA,CAAC,CACL,CAAC;AACV,CAAC;AAEK,SAAU,WAAW,CAAI,MAAc,EAAA;IACzC,OAAO,MAAM,IACT,IAAI,UAAU,CAAC,UAAU,IACrB,MAAM,CAAC,iBAAiB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAC/D,CAAC;AACV,CAAC;AAEK,SAAU,gBAAgB,CAAI,MAAc,EAAA;AAC9C,IAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-observables.js","sources":["../../../projects/cdk/observables/control-value.ts","../../../projects/cdk/observables/typed-from-event.ts","../../../projects/cdk/observables/mouse-drag-finish-from.ts","../../../projects/cdk/observables/drag-and-drop-from.ts","../../../projects/cdk/observables/is-alive.ts","../../../projects/cdk/observables/focus-visible-observable.ts","../../../projects/cdk/observables/if-map.ts","../../../projects/cdk/observables/is-observed.ts","../../../projects/cdk/observables/items-query-list-observable.ts","../../../projects/cdk/observables/must-be-present.ts","../../../projects/cdk/observables/pressed-observable.ts","../../../projects/cdk/observables/prevent-default.ts","../../../projects/cdk/observables/scroll-from.ts","../../../projects/cdk/observables/stop-propagation.ts","../../../projects/cdk/observables/watch.ts","../../../projects/cdk/observables/zone-free.ts","../../../projects/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n */\nexport function tuiControlValue<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function tuiTypedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n /**\n * @note:\n * in RxJS 7 type signature `TuiTypedEventTarget<E>` !== `HasEventTargetAddRemove<E>`\n */\n return fromEvent<E>(target as any, event, options) as unknown as Observable<E>;\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function tuiMouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(\n tuiTypedFromEvent(target, `mouseup`),\n tuiTypedFromEvent(target, `dragend`),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nexport enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function tuiDragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n tuiTypedFromEvent(element, `mousedown`).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n tuiTypedFromEvent(ownerDocument, `mousemove`).pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(tuiIsPresent)),\n ).pipe(repeat());\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<unknown, boolean> {\n return pipe(\n switchMap(() => timer(lifespan).pipe(map(ALWAYS_FALSE_HANDLER), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsFalsy} from '@taiga-ui/cdk/utils';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n map,\n repeat,\n shareReplay,\n startWith,\n switchMap,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function tuiFocusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = tuiTypedFromEvent(element, `blur`);\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = tuiTypedFromEvent(ownerDocument, `mouseup`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = tuiTypedFromEvent(ownerDocument, `mousedown`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n tuiTypedFromEvent(element, `focus`).pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !tuiIsNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(tuiIsFalsy),\n ),\n ).pipe(\n switchMap(() =>\n elementBlur$.pipe(map(ALWAYS_FALSE_HANDLER), take(1), startWith(true)),\n ),\n distinctUntilChanged(),\n );\n}\n","import {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {EMPTY, Observable, OperatorFunction, pipe} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nexport function tuiIfMap<T, G>(\n project: (value: T) => Observable<G>,\n predicate: TuiBooleanHandler<T> = Boolean,\n): OperatorFunction<T, G> {\n return pipe(switchMap(value => (predicate(value) ? project(value) : EMPTY)));\n}\n","import {Observer, Subject} from 'rxjs';\n\n/* In RxJS 7 All subjects now have an observed property */\ntype SubjectRxJS7plus<T> = Subject<T> & {observed: boolean};\n\n/* In RxJS 8 `observers` will be removed */\ntype SubjectRxJS6<T> = Subject<T> & {observers: Array<Observer<T>>};\n\nexport function tuiIsObserved<T>(observable: Subject<T>): boolean {\n return `observed` in observable\n ? (observable as SubjectRxJS7plus<T>).observed\n : !!(observable as SubjectRxJS6<T>)?.observers?.length;\n}\n","import {QueryList} from '@angular/core';\nimport {tuiGetOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function tuiQueryListChanges<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n startWith(null),\n map(() => tuiGetOriginalArrayFromQueryList(queryList)),\n );\n}\n\n/**\n * @deprecated An alias, use {@link tuiQueryListChanges} instead\n */\nexport const tuiItemsQueryListObservable = tuiQueryListChanges;\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function tuiMustBePresent<T>(): OperatorFunction<T | null | undefined, T> {\n return map(value => {\n if (!tuiIsPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, map, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function tuiPressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return tuiTypedFromEvent(element, `mousedown`).pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMap(() =>\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n map(ALWAYS_FALSE_HANDLER),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiPreventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Normalizes scroll event in case element is `html` (document.documentElement)\n */\nexport function tuiScrollFrom(element: Element): Observable<Event> {\n return tuiTypedFromEvent(\n element === element.ownerDocument.documentElement\n ? element.ownerDocument\n : element,\n `scroll`,\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiStopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiWatch<T>(cdr: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => {\n cdr.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;AAEG;AACG,SAAU,eAAe,CAC3B,OAAmD,EAAA;AAEnD,IAAA,OA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AAC,UAAU,IACrB,MAAM,CAAC,SAAS,CAAC;AACb,QAAA,IAAI,EAAE,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvD,QAAA,KAAK,EAAE,CAAC,KAAc,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpE,QAAA,QAAQ,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC1D,KAAA,CAAC,CACL,CAAC;AACV,CAAC;AAEK,SAAU,WAAW,CAAI,MAAc,EAAA;IACzC,OAAO,MAAM,IACT,IAAI,UAAU,CAAC,UAAU,IACrB,MAAM,CAAC,iBAAiB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAC/D,CAAC;AACV,CAAC;AAEK,SAAU,gBAAgB,CAAI,MAAc,EAAA;AAC9C,IAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "3.34.0-dev.main-f9dbe75",
3
+ "version": "3.35.0",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -12,10 +12,15 @@
12
12
  "factory": "./ng-update/v3-5/index#updateToV3_5"
13
13
  },
14
14
  "updateToV3_30": {
15
- "description": "Proprietary icons migration",
15
+ "description": "Proprietary marker icons migration",
16
16
  "version": "3.30.0",
17
17
  "factory": "./ng-update/v3-30/index#updateToV3_30"
18
18
  },
19
+ "updateToV3_35": {
20
+ "description": "Proprietary all icons migration",
21
+ "version": "3.35.0",
22
+ "factory": "./ng-update/v3-35/index#updateToV3_35"
23
+ },
19
24
  "updateToV4": {
20
25
  "description": "Updates Taiga UI packages to v4",
21
26
  "version": "4.0.0",
@@ -990,4 +990,4 @@ exports.ICONS = [
990
990
  from: `tuiIconWorldMarker`,
991
991
  to: `tuiIconTdsGlobeMedium`,
992
992
  },
993
- ];
993
+ ].sort((prev, next) => next.from.length - prev.from.length);
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateToV3_30 = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const colored_log_1 = require("../../utils/colored-log");
6
+ const replace_imports_1 = require("../steps/icons/replace-imports");
7
+ const replace_text_1 = require("../steps/icons/replace-text");
6
8
  const get_file_system_1 = require("../utils/get-file-system");
7
9
  const constants_1 = require("./constants/constants");
8
10
  const icons_1 = require("./constants/icons");
9
- const replace_imports_1 = require("./steps/replace-imports");
10
- const replace_text_1 = require("./steps/replace-text");
11
11
  // eslint-disable-next-line @typescript-eslint/naming-convention
12
12
  function updateToV3_30(options) {
13
13
  return (tree, _) => {
@@ -0,0 +1,2 @@
1
+ import { ReplacementConst } from '../../interfaces/replacement-const';
2
+ export declare const ICONS_TS: ReplacementConst[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICONS_TS = void 0;
4
+ const icons_1 = require("./icons");
5
+ exports.ICONS_TS = icons_1.ICONS.map(({ from, to }) => ({
6
+ from: { name: from, moduleSpecifier: `@taiga-ui/proprietary-icons` },
7
+ to: { name: to, moduleSpecifier: `@taiga-ui/proprietary-tds-icons` },
8
+ }));
@@ -0,0 +1,4 @@
1
+ export declare const ICONS: Array<{
2
+ from: string;
3
+ to: string;
4
+ }>;