@taiga-ui/cdk 3.52.0 → 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 +4 -6
- package/schematics/ng-update/interfaces/html-comment.d.ts +5 -0
- package/schematics/ng-update/interfaces/index.d.ts +14 -0
- package/schematics/ng-update/interfaces/index.js +17 -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/interfaces/{replaceable-attribute-value.d.ts → replacement-attribute-value.d.ts} +1 -1
- package/schematics/ng-update/interfaces/{replaceable-attribute.d.ts → replacement-attribute.d.ts} +1 -1
- package/schematics/ng-update/interfaces/{replacement-const.d.ts → replacement-identifier.d.ts} +1 -1
- package/schematics/ng-update/interfaces/replacement-service.d.ts +2 -2
- package/schematics/ng-update/interfaces/{replaceable-tag.d.ts → replacement-tag.d.ts} +1 -1
- package/schematics/ng-update/interfaces/{type-to-rename.d.ts → replacement-type.d.ts} +1 -1
- package/schematics/ng-update/interfaces/replacement-type.js +2 -0
- package/schematics/ng-update/steps/icons/replace-imports.d.ts +2 -2
- package/schematics/ng-update/steps/rename-types.d.ts +2 -2
- package/schematics/ng-update/steps/replace-identifier.d.ts +3 -3
- package/schematics/ng-update/steps/replace-identifier.js +5 -5
- package/schematics/ng-update/utils/templates/index.d.ts +6 -0
- package/schematics/ng-update/utils/templates/index.js +9 -0
- package/schematics/ng-update/utils/templates/remove-inputs.d.ts +2 -2
- package/schematics/ng-update/utils/templates/remove-inputs.js +2 -2
- package/schematics/ng-update/utils/templates/replace-attr-values.d.ts +3 -3
- package/schematics/ng-update/utils/templates/replace-attr-values.js +2 -2
- 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/utils/templates/replace-attrs.d.ts +10 -0
- package/schematics/ng-update/utils/templates/replace-attrs.js +20 -0
- package/schematics/ng-update/utils/templates/replace-tags.d.ts +3 -3
- package/schematics/ng-update/utils/templates/replace-tags.js +2 -2
- package/schematics/ng-update/utils/templates/template-comments.d.ts +10 -0
- package/schematics/ng-update/utils/templates/template-comments.js +20 -0
- package/schematics/ng-update/v3/constants/constants.d.ts +2 -2
- package/schematics/ng-update/v3/constants/deprecated-functions.d.ts +2 -2
- package/schematics/ng-update/v3/constants/templates.d.ts +8 -8
- package/schematics/ng-update/v3/constants/types.d.ts +2 -2
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v3/steps/migrate-templates.js +11 -16
- package/schematics/ng-update/v3-30/constants/constants.d.ts +2 -2
- package/schematics/ng-update/v3-35/constants/constants.d.ts +2 -2
- package/schematics/ng-update/v4/index.js +7 -6
- 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/attrs-to-replace.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +47 -0
- package/schematics/ng-update/v4/steps/constants/html-comments.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/html-comments.js +10 -0
- package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +44 -0
- package/schematics/ng-update/v4/steps/constants/index.d.ts +6 -0
- package/schematics/ng-update/v4/steps/constants/index.js +9 -0
- package/schematics/ng-update/v4/steps/constants/inputs-to-remove.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +8 -0
- package/schematics/ng-update/v4/steps/constants/tags-to-replace.d.ts +2 -0
- package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +7 -0
- package/schematics/ng-update/v4/steps/index.d.ts +3 -0
- package/schematics/ng-update/v4/steps/index.js +6 -0
- package/schematics/ng-update/v4/steps/migrate-templates.d.ts +3 -0
- package/schematics/ng-update/v4/steps/migrate-templates.js +49 -0
- package/schematics/ng-update/v4/steps/templates/index.d.ts +2 -0
- package/schematics/ng-update/v4/steps/templates/index.js +5 -0
- package/schematics/ng-update/v4/steps/templates/migrate-badge.d.ts +8 -0
- package/schematics/ng-update/v4/steps/templates/migrate-badge.js +29 -0
- package/schematics/ng-update/v4/steps/templates/toggles/common.d.ts +10 -0
- package/schematics/ng-update/v4/steps/templates/toggles/common.js +40 -0
- package/schematics/ng-update/v4/steps/templates/toggles/index.d.ts +3 -0
- package/schematics/ng-update/v4/steps/templates/toggles/index.js +6 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.d.ts +8 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.js +25 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-radio.d.ts +8 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-radio.js +25 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-toggle.d.ts +8 -0
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-toggle.js +25 -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/v4/steps/replace-thumbnail-card.d.ts +0 -4
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.js +0 -86
- /package/schematics/ng-update/interfaces/{replaceable-attribute-value.js → html-comment.js} +0 -0
- /package/schematics/ng-update/interfaces/{replaceable-attribute.js → replacement-attribute-to-directive.js} +0 -0
- /package/schematics/ng-update/interfaces/{replaceable-tag.js → replacement-attribute-value.js} +0 -0
- /package/schematics/ng-update/interfaces/{replacement-const.js → replacement-attribute.js} +0 -0
- /package/schematics/ng-update/interfaces/{type-to-rename.js → replacement-identifier.js} +0 -0
- /package/schematics/ng-update/{v3/interfaces/attribute-to-directive.js → interfaces/replacement-tag.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
|
-
"@
|
19
|
-
"@ng-web-apis/
|
20
|
-
"@ng-web-apis/
|
21
|
-
"@ng-web-apis/resize-observer": "3.0.5",
|
22
|
-
"@schematics/angular": "12.2.18",
|
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",
|
23
21
|
"@tinkoff/ng-event-plugins": "3.1.0",
|
24
22
|
"@tinkoff/ng-polymorpheus": "4.2.0",
|
25
23
|
"tslib": "2.6.2"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export * from './asset';
|
2
|
+
export * from './html-comment';
|
3
|
+
export * from './migration-warning';
|
4
|
+
export * from './removable-input';
|
5
|
+
export * from './removed-module';
|
6
|
+
export * from './replacement-attribute';
|
7
|
+
export * from './replacement-attribute-to-directive';
|
8
|
+
export * from './replacement-attribute-value';
|
9
|
+
export * from './replacement-enum';
|
10
|
+
export * from './replacement-identifier';
|
11
|
+
export * from './replacement-service';
|
12
|
+
export * from './replacement-tag';
|
13
|
+
export * from './replacement-type';
|
14
|
+
export * from './template-resource';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./asset"), exports);
|
5
|
+
tslib_1.__exportStar(require("./html-comment"), exports);
|
6
|
+
tslib_1.__exportStar(require("./migration-warning"), exports);
|
7
|
+
tslib_1.__exportStar(require("./removable-input"), exports);
|
8
|
+
tslib_1.__exportStar(require("./removed-module"), exports);
|
9
|
+
tslib_1.__exportStar(require("./replacement-attribute"), exports);
|
10
|
+
tslib_1.__exportStar(require("./replacement-attribute-to-directive"), exports);
|
11
|
+
tslib_1.__exportStar(require("./replacement-attribute-value"), exports);
|
12
|
+
tslib_1.__exportStar(require("./replacement-enum"), exports);
|
13
|
+
tslib_1.__exportStar(require("./replacement-identifier"), exports);
|
14
|
+
tslib_1.__exportStar(require("./replacement-service"), exports);
|
15
|
+
tslib_1.__exportStar(require("./replacement-tag"), exports);
|
16
|
+
tslib_1.__exportStar(require("./replacement-type"), exports);
|
17
|
+
tslib_1.__exportStar(require("./template-resource"), exports);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export interface ReplacementService extends
|
1
|
+
import { ReplacementIdentifier } from './replacement-identifier';
|
2
|
+
export interface ReplacementService extends ReplacementIdentifier {
|
3
3
|
readonly replaceMethods?: Array<{
|
4
4
|
from: string;
|
5
5
|
to: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TuiSchema } from '../../../ng-add/schema';
|
2
|
-
import {
|
3
|
-
export declare function replaceImports(replaceable:
|
2
|
+
import { ReplacementIdentifier } from '../../interfaces/replacement-identifier';
|
3
|
+
export declare function replaceImports(replaceable: ReplacementIdentifier[], options: TuiSchema): void;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TuiSchema } from '../../ng-add/schema';
|
2
|
-
import {
|
3
|
-
export declare function renameTypes(options: TuiSchema, types: readonly
|
2
|
+
import { ReplacementType } from '../interfaces/replacement-type';
|
3
|
+
export declare function renameTypes(options: TuiSchema, types: readonly ReplacementType[]): void;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TuiSchema } from '../../ng-add/schema';
|
2
|
-
import {
|
3
|
-
export declare function
|
4
|
-
export declare function replaceIdentifier({ from, to }:
|
2
|
+
import { ReplacementIdentifier } from '../interfaces/replacement-identifier';
|
3
|
+
export declare function replaceIdentifiers(options: TuiSchema, constants: readonly ReplacementIdentifier[]): void;
|
4
|
+
export declare function replaceIdentifier({ from, to }: ReplacementIdentifier): void;
|
@@ -1,19 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.replaceIdentifier = exports.
|
3
|
+
exports.replaceIdentifier = exports.replaceIdentifiers = void 0;
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
5
5
|
const add_unique_import_1 = require("../../utils/add-unique-import");
|
6
6
|
const colored_log_1 = require("../../utils/colored-log");
|
7
7
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
8
8
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
9
|
-
function
|
9
|
+
function replaceIdentifiers(options, constants) {
|
10
10
|
!options[`skip-logs`] &&
|
11
|
-
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing
|
11
|
+
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing identifiers...`);
|
12
12
|
constants.forEach(constToReplace => replaceIdentifier(constToReplace));
|
13
13
|
!options[`skip-logs`] &&
|
14
|
-
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL}
|
14
|
+
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} identifiers replaced \n`);
|
15
15
|
}
|
16
|
-
exports.
|
16
|
+
exports.replaceIdentifiers = replaceIdentifiers;
|
17
17
|
function replaceIdentifier({ from, to }) {
|
18
18
|
const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
|
19
19
|
references.forEach(ref => {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
tslib_1.__exportStar(require("./remove-inputs"), exports);
|
5
|
+
tslib_1.__exportStar(require("./replace-attr-values"), exports);
|
6
|
+
tslib_1.__exportStar(require("./replace-attrs"), exports);
|
7
|
+
tslib_1.__exportStar(require("./replace-tag"), exports);
|
8
|
+
tslib_1.__exportStar(require("./replace-tags"), exports);
|
9
|
+
tslib_1.__exportStar(require("./template-comments"), exports);
|
@@ -2,9 +2,9 @@ import { UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
2
|
import { DevkitFileSystem } from 'ng-morph';
|
3
3
|
import { RemovableInput } from '../../interfaces/removable-input';
|
4
4
|
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
-
export declare function removeInputs({ resource, recorder, fileSystem,
|
5
|
+
export declare function removeInputs({ resource, recorder, fileSystem, data, }: {
|
6
6
|
fileSystem: DevkitFileSystem;
|
7
7
|
recorder: UpdateRecorder;
|
8
|
-
|
8
|
+
data: readonly RemovableInput[];
|
9
9
|
resource: TemplateResource;
|
10
10
|
}): void;
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeInputs = void 0;
|
4
4
|
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
5
5
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
|
-
function removeInputs({ resource, recorder, fileSystem,
|
6
|
+
function removeInputs({ resource, recorder, fileSystem, data, }) {
|
7
7
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
8
8
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
9
|
-
|
9
|
+
data.forEach(({ inputName, tags }) => {
|
10
10
|
const offsets = [
|
11
11
|
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, inputName, tags),
|
12
12
|
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, `[${inputName}]`, tags),
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
2
|
import { DevkitFileSystem } from 'ng-morph';
|
3
|
-
import {
|
3
|
+
import { ReplacementAttributeValue } from '../../interfaces/replacement-attribute-value';
|
4
4
|
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
-
export declare function replaceAttrValues({ resource, recorder, fileSystem,
|
5
|
+
export declare function replaceAttrValues({ resource, recorder, fileSystem, data, }: {
|
6
6
|
fileSystem: DevkitFileSystem;
|
7
7
|
recorder: UpdateRecorder;
|
8
|
-
|
8
|
+
data: ReplacementAttributeValue[];
|
9
9
|
resource: TemplateResource;
|
10
10
|
}): void;
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.replaceAttrValues = void 0;
|
4
4
|
const elements_1 = require("../../../utils/templates/elements");
|
5
5
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
|
-
function replaceAttrValues({ resource, recorder, fileSystem,
|
6
|
+
function replaceAttrValues({ resource, recorder, fileSystem, data, }) {
|
7
7
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
8
8
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
9
|
-
|
9
|
+
data.forEach(({ attrNames, values, withTagNames }) => {
|
10
10
|
const elements = [
|
11
11
|
...elements_1.findElementsWithAttributeOnTag(template, attrNames, withTagNames),
|
12
12
|
];
|
@@ -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;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
|
+
import { DevkitFileSystem } from 'ng-morph';
|
3
|
+
import { ReplacementAttribute } from '../../interfaces/replacement-attribute';
|
4
|
+
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
+
export declare function replaceAttrs({ resource, recorder, fileSystem, data, }: {
|
6
|
+
fileSystem: DevkitFileSystem;
|
7
|
+
recorder: UpdateRecorder;
|
8
|
+
resource: TemplateResource;
|
9
|
+
data: readonly ReplacementAttribute[];
|
10
|
+
}): void;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.replaceAttrs = void 0;
|
4
|
+
const elements_1 = require("../../../utils/templates/elements");
|
5
|
+
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
|
+
function replaceAttrs({ resource, recorder, fileSystem, data, }) {
|
7
|
+
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
8
|
+
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
9
|
+
data.forEach(({ from, to }) => {
|
10
|
+
const offsets = [
|
11
|
+
...elements_1.findAttributeOnElementWithTag(template, from.attrName, from.withTagNames || [], from.filterFn),
|
12
|
+
...elements_1.findAttributeOnElementWithAttrs(template, from.attrName, from.withAttrsNames || [], from.filterFn),
|
13
|
+
];
|
14
|
+
offsets.forEach(offset => {
|
15
|
+
recorder.remove(offset + templateOffset, from.attrName.length);
|
16
|
+
recorder.insertRight(offset + templateOffset, to.attrName);
|
17
|
+
});
|
18
|
+
});
|
19
|
+
}
|
20
|
+
exports.replaceAttrs = replaceAttrs;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
2
|
import { DevkitFileSystem } from 'ng-morph';
|
3
|
-
import {
|
3
|
+
import { ReplacementTag } from '../../interfaces/replacement-tag';
|
4
4
|
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
-
export declare function replaceTags({ resource, recorder, fileSystem,
|
5
|
+
export declare function replaceTags({ resource, recorder, fileSystem, data, }: {
|
6
6
|
fileSystem: DevkitFileSystem;
|
7
7
|
recorder: UpdateRecorder;
|
8
|
-
|
8
|
+
data: readonly ReplacementTag[];
|
9
9
|
resource: TemplateResource;
|
10
10
|
}): void;
|
@@ -4,10 +4,10 @@ exports.replaceTags = void 0;
|
|
4
4
|
const elements_1 = require("../../../utils/templates/elements");
|
5
5
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
6
|
const replace_tag_1 = require("./replace-tag");
|
7
|
-
function replaceTags({ resource, recorder, fileSystem,
|
7
|
+
function replaceTags({ resource, recorder, fileSystem, data, }) {
|
8
8
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
9
9
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
10
|
-
|
10
|
+
data.forEach(({ from, to, addAttributes }) => {
|
11
11
|
const elements = elements_1.findElementsByTagName(template, from);
|
12
12
|
elements.forEach(({ sourceCodeLocation }) => {
|
13
13
|
if (sourceCodeLocation) {
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
|
+
import { DevkitFileSystem } from 'ng-morph';
|
3
|
+
import { TemplateResource } from '../../interfaces';
|
4
|
+
import { HtmlComment } from '../../interfaces';
|
5
|
+
export declare function addHTMLCommentTags({ resource, recorder, fileSystem, data, }: {
|
6
|
+
fileSystem: DevkitFileSystem;
|
7
|
+
recorder: UpdateRecorder;
|
8
|
+
data: readonly HtmlComment[];
|
9
|
+
resource: TemplateResource;
|
10
|
+
}): void;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addHTMLCommentTags = void 0;
|
4
|
+
const insert_todo_1 = require("../../../utils/insert-todo");
|
5
|
+
const elements_1 = require("../../../utils/templates/elements");
|
6
|
+
const template_resource_1 = require("../../../utils/templates/template-resource");
|
7
|
+
function addHTMLCommentTags({ resource, recorder, fileSystem, data, }) {
|
8
|
+
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
9
|
+
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
10
|
+
data.forEach(({ comment, tag, withAttrs }) => {
|
11
|
+
const elementStartOffsets = [
|
12
|
+
...elements_1.findElementsWithAttributeOnTag(template, withAttrs, [tag]),
|
13
|
+
...elements_1.findElementsWithAttributeOnTag(template, withAttrs.map(attr => `[${attr}]`), [tag]),
|
14
|
+
].map(({ sourceCodeLocation }) => ((sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startOffset) || 0) + templateOffset);
|
15
|
+
elementStartOffsets.forEach(offset => {
|
16
|
+
recorder.insertRight(offset, `<!-- ${insert_todo_1.TODO_MARK} ${comment} -->\n`);
|
17
|
+
});
|
18
|
+
});
|
19
|
+
}
|
20
|
+
exports.addHTMLCommentTags = addHTMLCommentTags;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const CONSTANTS_TO_REPLACE:
|
1
|
+
import { ReplacementIdentifier } from '../../interfaces/replacement-identifier';
|
2
|
+
export declare const CONSTANTS_TO_REPLACE: ReplacementIdentifier[];
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const DEPRECATED_FUNCTIONS: readonly
|
1
|
+
import { ReplacementType } from '../../interfaces/replacement-type';
|
2
|
+
export declare const DEPRECATED_FUNCTIONS: readonly ReplacementType[];
|
@@ -1,12 +1,12 @@
|
|
1
|
+
import { ReplacementAttributeToDirective } from '../../interfaces';
|
1
2
|
import { RemovableInput } from '../../interfaces/removable-input';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
|
6
|
-
export declare const ATTRS_TO_REPLACE: ReplaceableAttribute[];
|
3
|
+
import { ReplacementAttribute } from '../../interfaces/replacement-attribute';
|
4
|
+
import { ReplacementAttributeValue } from '../../interfaces/replacement-attribute-value';
|
5
|
+
import { ReplacementTag } from '../../interfaces/replacement-tag';
|
6
|
+
export declare const ATTRS_TO_REPLACE: ReplacementAttribute[];
|
7
7
|
export declare const INPUTS_TO_REMOVE: RemovableInput[];
|
8
|
-
export declare const TAGS_TO_REPLACE:
|
9
|
-
export declare const ATTR_TO_DIRECTIVE:
|
8
|
+
export declare const TAGS_TO_REPLACE: ReplacementTag[];
|
9
|
+
export declare const ATTR_TO_DIRECTIVE: ReplacementAttributeToDirective[];
|
10
10
|
/**
|
11
11
|
* @example `<div [someDirective]="true" />` => `<div someDirective />`
|
12
12
|
*
|
@@ -54,4 +54,4 @@ export declare const TEMPLATE_COMMENTS: readonly [{
|
|
54
54
|
readonly withAttr: "lastIndex";
|
55
55
|
readonly comment: "Use property [length] instead. See example: https://taiga-ui.dev/components/preview";
|
56
56
|
}];
|
57
|
-
export declare const REPLACE_ATTR_VALUE:
|
57
|
+
export declare const REPLACE_ATTR_VALUE: ReplacementAttributeValue[];
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const TYPES_TO_RENAME: readonly
|
1
|
+
import { ReplacementType } from '../../interfaces/replacement-type';
|
2
|
+
export declare const TYPES_TO_RENAME: readonly ReplacementType[];
|
@@ -55,7 +55,7 @@ function main(options) {
|
|
55
55
|
replace_deep_import_1.replaceDeepImports(options);
|
56
56
|
replace_enums_1.replaceEnums(options, enums_1.ENUMS_TO_REPLACE);
|
57
57
|
rename_types_1.renameTypes(options, types_1.TYPES_TO_RENAME);
|
58
|
-
replace_identifier_1.
|
58
|
+
replace_identifier_1.replaceIdentifiers(options, constants_1.CONSTANTS_TO_REPLACE);
|
59
59
|
replace_services_1.replaceServices(options, services_1.SERVICES_TO_REPLACE);
|
60
60
|
replace_styles_1.replaceStyles();
|
61
61
|
show_warnings_1.showWarnings(context, warnings_1.MIGRATION_WARNINGS);
|