@taiga-ui/cdk 3.52.0-canary.ca866a4 → 3.53.0-canary.0974e5c
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 +1 -1
- package/bundles/taiga-ui-cdk-constants.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-for-async.umd.js +6 -1
- package/bundles/taiga-ui-cdk-directives-for-async.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/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/directives/for-async/for-async.directive.d.ts +4 -0
- package/directives/for-async/for-async.module.d.ts +2 -1
- package/esm2015/components/alert-host/alert-host.component.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/autofilled/autofilled.module.js +2 -2
- package/esm2015/directives/for-async/for-async.directive.js +5 -1
- package/esm2015/directives/for-async/for-async.module.js +3 -2
- 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/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 +1 -1
- package/fesm2015/taiga-ui-cdk-constants.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-for-async.js +6 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.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/package.json +1 -3
- package/schematics/ng-update/interfaces/index.d.ts +1 -0
- package/schematics/ng-update/interfaces/index.js +1 -0
- package/schematics/ng-update/{v3/interfaces/attribute-to-directive.d.ts → interfaces/replacement-attribute-to-directive.d.ts} +1 -1
- package/schematics/ng-update/utils/templates/replace-attrs-by-directives.d.ts +7 -0
- package/schematics/ng-update/utils/templates/replace-attrs-by-directives.js +18 -0
- package/schematics/ng-update/v3/constants/templates.d.ts +2 -2
- package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +40 -0
- package/schematics/ng-update/v4/steps/constants/index.d.ts +1 -0
- package/schematics/ng-update/v4/steps/constants/index.js +1 -0
- package/schematics/ng-update/v4/steps/migrate-templates.js +5 -0
- package/schematics/utils/add-import-to-closest-module.js +11 -1
- package/schematics/utils/angular/is-standalone-component.d.ts +2 -0
- package/schematics/utils/angular/is-standalone-component.js +22 -0
- /package/schematics/ng-update/{v3/interfaces/attribute-to-directive.js → interfaces/replacement-attribute-to-directive.js} +0 -0
@@ -3,6 +3,10 @@ import { ViewContainerRef, TemplateRef, Directive, Inject, Input, NgModule } fro
|
|
3
3
|
import { Subject, from, of } from 'rxjs';
|
4
4
|
import { concatMap, delay, takeUntil } from 'rxjs/operators';
|
5
5
|
|
6
|
+
/**
|
7
|
+
* @deprecated:
|
8
|
+
* remove in v4.0
|
9
|
+
*/
|
6
10
|
class TuiForAsyncDirective {
|
7
11
|
constructor(view, template) {
|
8
12
|
this.view = view;
|
@@ -57,7 +61,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
57
61
|
}] } });
|
58
62
|
|
59
63
|
/**
|
60
|
-
* @
|
64
|
+
* @deprecated:
|
65
|
+
* remove in v4.0
|
61
66
|
*/
|
62
67
|
class TuiForAsyncModule {
|
63
68
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-for-async.js","sources":["../../../projects/cdk/directives/for-async/for-async.directive.ts","../../../projects/cdk/directives/for-async/for-async.module.ts","../../../projects/cdk/directives/for-async/taiga-ui-cdk-directives-for-async.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {from, of, Subject} from 'rxjs';\nimport {concatMap, delay, takeUntil} from 'rxjs/operators';\n\n@Directive({selector: '[tuiForAsync][tuiForAsyncOf]'})\nexport class TuiForAsyncDirective<T extends readonly any[]>\n implements OnChanges, OnDestroy\n{\n private readonly destroy$ = new Subject<void>();\n\n @Input()\n tuiForAsyncOf: T | null | undefined;\n\n @Input()\n tuiForAsyncTimeout = 10;\n\n constructor(\n @Inject(ViewContainerRef) private readonly view: ViewContainerRef,\n @Inject(TemplateRef) private readonly template: TemplateRef<unknown>,\n ) {}\n\n ngOnChanges(): void {\n this.clearViewForOldNodes();\n this.createAsyncViewForNewNodes();\n }\n\n ngOnDestroy(): void {\n this.clearViewForOldNodes();\n this.destroy$.complete();\n }\n\n private createAsyncViewForNewNodes(): void {\n from(this.iterableValues)\n .pipe(\n concatMap(entry =>\n this.tuiForAsyncTimeout > 0\n ? of(entry).pipe(delay(this.tuiForAsyncTimeout))\n : of(entry),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe(([index, item]) => this.createEmbeddedView(item, index));\n }\n\n private get iterableValues(): IterableIterator<[number, T]> {\n return (this.tuiForAsyncOf ?? []).entries();\n }\n\n private createEmbeddedView<T>(item: T, index: number): void {\n this.view\n .createEmbeddedView(this.template, {$implicit: item, index}, index)\n .detectChanges();\n }\n\n private clearViewForOldNodes(): void {\n this.destroy$.next();\n this.view.clear();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiForAsyncDirective} from './for-async.directive';\n\n/**\n * @
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-for-async.js","sources":["../../../projects/cdk/directives/for-async/for-async.directive.ts","../../../projects/cdk/directives/for-async/for-async.module.ts","../../../projects/cdk/directives/for-async/taiga-ui-cdk-directives-for-async.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {from, of, Subject} from 'rxjs';\nimport {concatMap, delay, takeUntil} from 'rxjs/operators';\n\n/**\n * @deprecated:\n * remove in v4.0\n */\n@Directive({selector: '[tuiForAsync][tuiForAsyncOf]'})\nexport class TuiForAsyncDirective<T extends readonly any[]>\n implements OnChanges, OnDestroy\n{\n private readonly destroy$ = new Subject<void>();\n\n @Input()\n tuiForAsyncOf: T | null | undefined;\n\n @Input()\n tuiForAsyncTimeout = 10;\n\n constructor(\n @Inject(ViewContainerRef) private readonly view: ViewContainerRef,\n @Inject(TemplateRef) private readonly template: TemplateRef<unknown>,\n ) {}\n\n ngOnChanges(): void {\n this.clearViewForOldNodes();\n this.createAsyncViewForNewNodes();\n }\n\n ngOnDestroy(): void {\n this.clearViewForOldNodes();\n this.destroy$.complete();\n }\n\n private createAsyncViewForNewNodes(): void {\n from(this.iterableValues)\n .pipe(\n concatMap(entry =>\n this.tuiForAsyncTimeout > 0\n ? of(entry).pipe(delay(this.tuiForAsyncTimeout))\n : of(entry),\n ),\n takeUntil(this.destroy$),\n )\n .subscribe(([index, item]) => this.createEmbeddedView(item, index));\n }\n\n private get iterableValues(): IterableIterator<[number, T]> {\n return (this.tuiForAsyncOf ?? []).entries();\n }\n\n private createEmbeddedView<T>(item: T, index: number): void {\n this.view\n .createEmbeddedView(this.template, {$implicit: item, index}, index)\n .detectChanges();\n }\n\n private clearViewForOldNodes(): void {\n this.destroy$.next();\n this.view.clear();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiForAsyncDirective} from './for-async.directive';\n\n/**\n * @deprecated:\n * remove in v4.0\n */\n@NgModule({\n declarations: [TuiForAsyncDirective],\n exports: [TuiForAsyncDirective],\n})\nexport class TuiForAsyncModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
@@ -21,8 +21,8 @@ TuiFilterPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
21
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;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@taiga-ui/cdk",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.53.0-canary.0974e5c",
|
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",
|
@@ -15,11 +15,9 @@
|
|
15
15
|
"repository": "https://github.com/taiga-family/taiga-ui",
|
16
16
|
"license": "Apache-2.0",
|
17
17
|
"dependencies": {
|
18
|
-
"@angular-devkit/schematics": "12.2.18",
|
19
18
|
"@ng-web-apis/common": "3.0.6",
|
20
19
|
"@ng-web-apis/mutation-observer": "3.0.6",
|
21
20
|
"@ng-web-apis/resize-observer": "3.0.6",
|
22
|
-
"@schematics/angular": "12.2.18",
|
23
21
|
"@tinkoff/ng-event-plugins": "3.1.0",
|
24
22
|
"@tinkoff/ng-polymorpheus": "4.2.0",
|
25
23
|
"tslib": "2.6.2"
|
@@ -4,6 +4,7 @@ export * from './migration-warning';
|
|
4
4
|
export * from './removable-input';
|
5
5
|
export * from './removed-module';
|
6
6
|
export * from './replacement-attribute';
|
7
|
+
export * from './replacement-attribute-to-directive';
|
7
8
|
export * from './replacement-attribute-value';
|
8
9
|
export * from './replacement-enum';
|
9
10
|
export * from './replacement-identifier';
|
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./migration-warning"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./removable-input"), exports);
|
8
8
|
tslib_1.__exportStar(require("./removed-module"), exports);
|
9
9
|
tslib_1.__exportStar(require("./replacement-attribute"), exports);
|
10
|
+
tslib_1.__exportStar(require("./replacement-attribute-to-directive"), exports);
|
10
11
|
tslib_1.__exportStar(require("./replacement-attribute-value"), exports);
|
11
12
|
tslib_1.__exportStar(require("./replacement-enum"), exports);
|
12
13
|
tslib_1.__exportStar(require("./replacement-identifier"), exports);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { DevkitFileSystem } from 'ng-morph';
|
2
|
+
import { ReplacementAttributeToDirective, TemplateResource } from '../../interfaces';
|
3
|
+
export declare function replaceAttrsByDirective({ resource, fileSystem, data, }: {
|
4
|
+
fileSystem: DevkitFileSystem;
|
5
|
+
resource: TemplateResource;
|
6
|
+
data: ReplacementAttributeToDirective[];
|
7
|
+
}): void;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.replaceAttrsByDirective = void 0;
|
4
|
+
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
5
|
+
function replaceAttrsByDirective({ resource, fileSystem, data, }) {
|
6
|
+
data.forEach(({ componentSelector, directiveModule, directive, inputProperty, filterFn }) => {
|
7
|
+
ng_component_input_manipulations_1.replaceInputPropertyByDirective({
|
8
|
+
componentSelector,
|
9
|
+
directiveModule,
|
10
|
+
directive,
|
11
|
+
inputProperty,
|
12
|
+
fileSystem,
|
13
|
+
templateResource: resource,
|
14
|
+
filterFn,
|
15
|
+
});
|
16
|
+
});
|
17
|
+
}
|
18
|
+
exports.replaceAttrsByDirective = replaceAttrsByDirective;
|
@@ -1,12 +1,12 @@
|
|
1
|
+
import { ReplacementAttributeToDirective } from '../../interfaces';
|
1
2
|
import { RemovableInput } from '../../interfaces/removable-input';
|
2
3
|
import { ReplacementAttribute } from '../../interfaces/replacement-attribute';
|
3
4
|
import { ReplacementAttributeValue } from '../../interfaces/replacement-attribute-value';
|
4
5
|
import { ReplacementTag } from '../../interfaces/replacement-tag';
|
5
|
-
import { AttributeToDirective } from '../interfaces/attribute-to-directive';
|
6
6
|
export declare const ATTRS_TO_REPLACE: ReplacementAttribute[];
|
7
7
|
export declare const INPUTS_TO_REMOVE: RemovableInput[];
|
8
8
|
export declare const TAGS_TO_REPLACE: ReplacementTag[];
|
9
|
-
export declare const ATTR_TO_DIRECTIVE:
|
9
|
+
export declare const ATTR_TO_DIRECTIVE: ReplacementAttributeToDirective[];
|
10
10
|
/**
|
11
11
|
* @example `<div [someDirective]="true" />` => `<div someDirective />`
|
12
12
|
*
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ATTRS_TO_DIRECTIVE_REPLACE = void 0;
|
4
|
+
exports.ATTRS_TO_DIRECTIVE_REPLACE = [
|
5
|
+
{
|
6
|
+
componentSelector: [
|
7
|
+
`tui-primitive-textfield`,
|
8
|
+
`tui-input-number`,
|
9
|
+
`tui-input-slider`,
|
10
|
+
],
|
11
|
+
inputProperty: `prefix`,
|
12
|
+
directive: `tuiTextfieldPrefix`,
|
13
|
+
directiveModule: {
|
14
|
+
name: `TuiTextfieldControllerModule`,
|
15
|
+
moduleSpecifier: `@taiga-ui/core`,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
componentSelector: [
|
20
|
+
`tui-primitive-textfield`,
|
21
|
+
`tui-input-number`,
|
22
|
+
`tui-input-slider`,
|
23
|
+
],
|
24
|
+
inputProperty: `postfix`,
|
25
|
+
directive: `tuiTextfieldPostfix`,
|
26
|
+
directiveModule: {
|
27
|
+
name: `TuiTextfieldControllerModule`,
|
28
|
+
moduleSpecifier: `@taiga-ui/core`,
|
29
|
+
},
|
30
|
+
},
|
31
|
+
{
|
32
|
+
componentSelector: [`tui-primitive-textfield`],
|
33
|
+
inputProperty: `filler`,
|
34
|
+
directive: `tuiTextfieldFiller`,
|
35
|
+
directiveModule: {
|
36
|
+
name: `TuiTextfieldControllerModule`,
|
37
|
+
moduleSpecifier: `@taiga-ui/core`,
|
38
|
+
},
|
39
|
+
},
|
40
|
+
];
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./attr-to-directive-replace"), exports);
|
4
5
|
tslib_1.__exportStar(require("./attrs-to-replace"), exports);
|
5
6
|
tslib_1.__exportStar(require("./html-comments"), exports);
|
6
7
|
tslib_1.__exportStar(require("./identifiers-to-replace"), exports);
|
@@ -7,6 +7,7 @@ const progress_1 = require("../../../utils/progress");
|
|
7
7
|
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
8
8
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
9
9
|
const templates_1 = require("../../utils/templates");
|
10
|
+
const replace_attrs_by_directives_1 = require("../../utils/templates/replace-attrs-by-directives");
|
10
11
|
const constants_2 = require("./constants");
|
11
12
|
const templates_2 = require("./templates");
|
12
13
|
function migrateTemplates(fileSystem, options) {
|
@@ -15,6 +16,10 @@ function migrateTemplates(fileSystem, options) {
|
|
15
16
|
const componentWithTemplatesPaths = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
16
17
|
const actions = [
|
17
18
|
getAction({ action: templates_1.addHTMLCommentTags, requiredData: constants_2.HTML_COMMENTS }),
|
19
|
+
getAction({
|
20
|
+
action: replace_attrs_by_directives_1.replaceAttrsByDirective,
|
21
|
+
requiredData: constants_2.ATTRS_TO_DIRECTIVE_REPLACE,
|
22
|
+
}),
|
18
23
|
getAction({ action: templates_1.replaceTags, requiredData: constants_2.TAGS_TO_REPLACE }),
|
19
24
|
getAction({ action: templates_1.replaceAttrs, requiredData: constants_2.ATTRS_TO_REPLACE }),
|
20
25
|
getAction({ action: templates_1.removeInputs, requiredData: constants_2.INPUTS_TO_REMOVE }),
|
@@ -2,12 +2,22 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.addImportToClosestModule = void 0;
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
5
|
+
const add_import_to_component_1 = require("../utils/add-import-to-component");
|
5
6
|
const add_unique_import_1 = require("./add-unique-import");
|
7
|
+
const is_standalone_component_1 = require("./angular/is-standalone-component");
|
6
8
|
const ng_component_1 = require("./angular/ng-component");
|
7
9
|
const ng_module_1 = require("./angular/ng-module");
|
8
10
|
function addImportToClosestModule(componentPath, moduleName, moduleSpecifier) {
|
9
11
|
const [ngComponent] = ng_component_1.getNgComponents(componentPath);
|
10
|
-
|
12
|
+
if (!ngComponent) {
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
if (is_standalone_component_1.isStandaloneComponent(ngComponent)) {
|
16
|
+
add_import_to_component_1.addImportToComponent(ngComponent, moduleName, { unique: true });
|
17
|
+
add_unique_import_1.addUniqueImport(ngComponent.getSourceFile().getFilePath(), moduleName, moduleSpecifier);
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
const ngModule = ng_module_1.findNgModule(ngComponent);
|
11
21
|
if (ngModule) {
|
12
22
|
ng_morph_1.addImportToNgModule(ngModule, moduleName, {
|
13
23
|
unique: true,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isStandaloneComponent = void 0;
|
4
|
+
const ng_morph_1 = require("ng-morph");
|
5
|
+
// TODO: add to ng-morph
|
6
|
+
function isStandaloneComponent(component) {
|
7
|
+
var _a;
|
8
|
+
const decorator = component.getDecorator(`Component`);
|
9
|
+
if (!decorator) {
|
10
|
+
return false;
|
11
|
+
}
|
12
|
+
const [metadata] = decorator.getArguments();
|
13
|
+
if (!ng_morph_1.Node.isObjectLiteralExpression(metadata)) {
|
14
|
+
return false;
|
15
|
+
}
|
16
|
+
const property = metadata.getProperty(`standalone`);
|
17
|
+
if (!ng_morph_1.Node.isPropertyAssignment(property)) {
|
18
|
+
return false;
|
19
|
+
}
|
20
|
+
return ((_a = property.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText()) === `true`;
|
21
|
+
}
|
22
|
+
exports.isStandaloneComponent = isStandaloneComponent;
|