@taiga-ui/cdk 3.51.0-canary.2b8d4a0 → 3.51.0-canary.6291033
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.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +2 -2
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/components/alert-host/alert-host.component.d.ts +2 -2
- package/constants/used-icons.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +1 -1
- package/esm2015/constants/used-icons.js +2 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/pipes/filter/filter.pipe.js +1 -1
- package/esm2015/pipes/mapper/mapper.pipe.js +1 -1
- package/esm2015/types/mapper.js +1 -1
- package/esm2015/types/matcher.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +2 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
- package/package.json +5 -5
- package/pipes/filter/filter.pipe.d.ts +1 -1
- package/pipes/mapper/mapper.pipe.d.ts +1 -1
- package/schematics/index.d.ts +0 -1
- package/schematics/index.js +0 -1
- package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.d.ts +1 -1
- package/schematics/ng-update/steps/rename-types.js +1 -1
- package/schematics/ng-update/steps/replace-enums.js +2 -2
- package/schematics/ng-update/steps/{replace-const.d.ts → replace-identifier.d.ts} +1 -1
- package/schematics/ng-update/steps/{replace-const.js → replace-identifier.js} +4 -4
- package/schematics/ng-update/steps/replace-services.js +1 -1
- package/schematics/ng-update/utils/templates/remove-inputs.d.ts +10 -0
- package/schematics/ng-update/utils/templates/remove-inputs.js +19 -0
- package/schematics/ng-update/utils/templates/replace-attr-values.d.ts +1 -1
- package/schematics/ng-update/utils/templates/replace-tags.d.ts +10 -0
- package/schematics/ng-update/utils/templates/replace-tags.js +19 -0
- package/schematics/ng-update/v3/constants/templates.d.ts +3 -3
- package/schematics/ng-update/v3/index.d.ts +0 -1
- package/schematics/ng-update/v3/index.js +3 -15
- package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +1 -1
- package/schematics/ng-update/v3/steps/migrate-templates.js +9 -26
- package/schematics/ng-update/v3/steps/miscellaneous.js +1 -1
- package/schematics/ng-update/v3-40/index.js +1 -1
- package/schematics/ng-update/v4/index.js +15 -3
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.d.ts +3 -2
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.js +62 -34
- package/schematics/ng-update/v4/steps/restore-tui-mapper.d.ts +1 -2
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js +23 -67
- package/schematics/ng-update/v4/steps/restore-tui-matcher.d.ts +1 -2
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js +23 -67
- package/schematics/utils/add-import-to-component.js +2 -2
- package/types/mapper.d.ts +2 -1
- package/types/matcher.d.ts +3 -2
- /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.d.ts +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/removable-input.js +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.d.ts +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-attribute-value.js +0 -0
- /package/schematics/ng-update/{v3/interfaces → interfaces}/replaceable-tag.js +0 -0
- /package/schematics/{utils → ng-update/utils/templates}/replace-tag.d.ts +0 -0
- /package/schematics/{utils → ng-update/utils/templates}/replace-tag.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-components-alert-host.js","sources":["../../../projects/cdk/components/alert-host/alert-host.component.ts","../../../projects/cdk/components/alert-host/alert-host.template.html","../../../projects/cdk/components/alert-host/alert-host.module.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n INJECTOR,\n Injector,\n OnInit,\n Self,\n TrackByFunction,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk/constants';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {TUI_ALERTS} from '@taiga-ui/cdk/tokens';\nimport {TuiDialog,
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-components-alert-host.js","sources":["../../../projects/cdk/components/alert-host/alert-host.component.ts","../../../projects/cdk/components/alert-host/alert-host.template.html","../../../projects/cdk/components/alert-host/alert-host.module.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n INJECTOR,\n Injector,\n OnInit,\n Self,\n TrackByFunction,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_PARENT_ANIMATION} from '@taiga-ui/cdk/constants';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {TUI_ALERTS} from '@taiga-ui/cdk/tokens';\nimport {TuiDialog, TuiTypedMapper} from '@taiga-ui/cdk/types';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-alert-host',\n templateUrl: './alert-host.template.html',\n styleUrls: ['./alert-host.style.less'],\n // So that we do not force OnPush on custom alerts\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [TUI_PARENT_ANIMATION],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiAlertHostComponent<T extends TuiDialog<unknown, unknown>>\n implements OnInit\n{\n alerts: ReadonlyArray<readonly T[]> = [];\n\n constructor(\n @Inject(TUI_ALERTS) private readonly allAlerts: Array<Observable<readonly T[]>>,\n @Inject(INJECTOR) private readonly injector: Injector,\n @Self() @Inject(TuiDestroyService) private readonly destroy$: Observable<void>,\n @Inject(ChangeDetectorRef) private readonly cdr: ChangeDetectorRef,\n ) {}\n\n readonly trackBy: TrackByFunction<readonly T[]> = (index: number) => index;\n\n ngOnInit(): void {\n // Due to this view being parallel to app content, `markForCheck` from `async` pipe\n // can happen after view was checked, so calling `detectChanges` instead\n combineLatest(this.allAlerts)\n .pipe(takeUntil(this.destroy$))\n .subscribe(alerts => {\n this.alerts = alerts;\n this.cdr.detectChanges();\n });\n }\n\n readonly mapper: TuiTypedMapper<[unknown], Injector> = useValue =>\n Injector.create({\n providers: [\n {\n provide: POLYMORPHEUS_CONTEXT,\n useValue,\n },\n ],\n parent: this.injector,\n });\n}\n","<div\n *ngFor=\"let alert of alerts; trackBy: trackBy\"\n class=\"t-wrapper\"\n @tuiParentAnimation\n>\n <ng-container\n *ngFor=\"let item of alert\"\n [ngComponentOutlet]=\"item.component.component\"\n [ngComponentOutletInjector]=\"item | tuiMapper: mapper\"\n ></ng-container>\n</div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk/pipes';\n\nimport {TuiAlertHostComponent} from './alert-host.component';\n\n@NgModule({\n imports: [CommonModule, TuiMapperPipeModule],\n declarations: [TuiAlertHostComponent],\n exports: [TuiAlertHostComponent],\n})\nexport class TuiAlertHostModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA+Ba,qBAAqB,CAAA;AAK9B,IAAA,WAAA,CACyC,SAA0C,EAC5C,QAAkB,EACD,QAA0B,EAClC,GAAsB,EAAA;QAH7B,IAAS,CAAA,SAAA,GAAT,SAAS,CAAiC;QAC5C,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QACD,IAAQ,CAAA,Q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A,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,iBAHZ,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAD1B,YAAY,EAAE,mBAAmB,aAEjC,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEtB,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAJlB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAInC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;oBAC5C,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;;;"}
|
@@ -58,7 +58,7 @@ const CHAR_CURRENCY_SIGN = `\u00A4`;
|
|
58
58
|
const CHAR_ZERO_WIDTH_SPACE = `\u200B`;
|
59
59
|
|
60
60
|
const TUI_USED_ICONS = [
|
61
|
-
`
|
61
|
+
`tuiIconMirMono`,
|
62
62
|
`tuiIconVisaMono`,
|
63
63
|
`tuiIconElectronMono`,
|
64
64
|
`tuiIconMastercard`,
|
@@ -123,7 +123,7 @@ const TUI_USED_ICONS = [
|
|
123
123
|
`tuiIconCalendarLarge`,
|
124
124
|
];
|
125
125
|
|
126
|
-
const TUI_VERSION = `3.
|
126
|
+
const TUI_VERSION = `3.51.0`;
|
127
127
|
|
128
128
|
export { ALWAYS_FALSE_HANDLER, ALWAYS_TRUE_HANDLER, CHAR_BULLET, CHAR_CURRENCY_SIGN, CHAR_ELLIPSIS, CHAR_EM_DASH, CHAR_EN_DASH, CHAR_HYPHEN, CHAR_LAQUO, CHAR_MINUS, CHAR_NO_BREAK_SPACE, CHAR_PLUS, CHAR_RAQUO, CHAR_ZERO_WIDTH_SPACE, CHROMIUM_EDGE_START_VERSION, EMPTY_ARRAY, EMPTY_CLIENT_RECT, EMPTY_FUNCTION, EMPTY_QUERY, POLLING_TIME, TUI_DEFAULT_IDENTITY_MATCHER, TUI_DEFAULT_MATCHER, TUI_DEFAULT_STRINGIFY, TUI_PARENT_ANIMATION, TUI_PARENT_STOP, TUI_STRICT_MATCHER, TUI_USED_ICONS, TUI_VERSION, svgNodeFilter };
|
129
129
|
//# sourceMappingURL=taiga-ui-cdk-constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-constants.js","sources":["../../../projects/cdk/constants/always-false-handler.ts","../../../projects/cdk/constants/always-true-handler.ts","../../../projects/cdk/constants/browser.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/stringify.ts","../../../projects/cdk/constants/matcher.ts","../../../projects/cdk/constants/parent-animation.ts","../../../projects/cdk/constants/polling-time.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/used-icons.ts","../../../projects/cdk/constants/version.ts"],"sourcesContent":["/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_FALSE_HANDLER = (): false => false;\n","/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_TRUE_HANDLER = (): true => true;\n","/**\n * @deprecated\n * TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n */\nexport const CHROMIUM_EDGE_START_VERSION = 79;\n","import {QueryList} from '@angular/core';\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON() {\n return rect;\n },\n};\n","import {TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Default method to turn arbitrary object into string\n */\nexport const TUI_DEFAULT_STRINGIFY: TuiStringHandler<unknown> = item => String(item);\n","import {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nimport {TUI_DEFAULT_STRINGIFY} from './stringify';\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n","import {animateChild, query, transition, trigger} from '@angular/animations';\n\n/**\n * Add to enable child :leave animation (fixes https://github.com/angular/angular/issues/15753)\n */\nexport const TUI_PARENT_ANIMATION = trigger(`tuiParentAnimation`, [\n transition(`:leave`, [query(`:scope > *`, [animateChild()], {optional: true})]),\n]);\n\n/**\n * Add on parent to stop initial :enter animation for children\n */\nexport const TUI_PARENT_STOP = trigger(`tuiParentStop`, [transition(`:enter`, [])]);\n","export const POLLING_TIME = 1000 / 15;\n","// Filtering SVGElements for TreeWalker\n// Filter must be a function in IE, other modern browsers are compliant to this format\nexport const svgNodeFilter: NodeFilter = ((node: Node) =>\n `ownerSVGElement` in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT) as any;\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = `\\u00A0`;\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = `\\u2013`;\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = `\\u2014`;\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = `\\u00AB`;\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = `\\u00BB`;\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = `\\u002D`;\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = `\\u2212`;\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = `\\u002B`;\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = `\\u2022`;\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = `\\u2026`;\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = `\\u00A4`;\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = `\\u200B`;\n","/**\n * @description:\n * AUTOGENERATED\n *\n * Array of icons used in taiga-ui components\n */\nexport const TUI_USED_ICONS = [\n `tuiIconMir`,\n `tuiIconVisaMono`,\n `tuiIconElectronMono`,\n `tuiIconMastercard`,\n `tuiIconMaestro`,\n `tuiIconAmex`,\n `tuiIconDinersClub`,\n `tuiIconDiscover`,\n `tuiIconHumo`,\n `tuiIconJCB`,\n `tuiIconRuPay`,\n `tuiIconUnionPay`,\n `tuiIconUzcard`,\n `tuiIconVerve`,\n `tuiIconLink`,\n `tuiIconSearch`,\n `tuiIconSun`,\n `tuiIconMoon`,\n `tuiIconCode`,\n `tuiIconMenuLarge`,\n `tuiIconRotate`,\n `tuiIconArrowLeft`,\n `tuiIconArrowRight`,\n `tuiIconPlus`,\n `tuiIconMinus`,\n `tuiIconMinimize`,\n `tuiIconEye`,\n `tuiIconEyeOff`,\n `tuiIconDrag`,\n `tuiIconSortAscending`,\n `tuiIconSortDescending`,\n `tuiIconSortOff`,\n `tuiIconCheck`,\n `tuiIconCheckLarge`,\n `tuiIconMinusLarge`,\n `tuiIconChevronUp`,\n `tuiIconHelpCircle`,\n `tuiIconClose`,\n `tuiIconAlertCircle`,\n `tuiIconChevronRight`,\n `tuiIconInfo`,\n `tuiIconCheckCircle`,\n `tuiIconXCircle`,\n `tuiIconChevronLeft`,\n `tuiIconStarLarge`,\n `tuiIconChevronDown`,\n `tuiIconChevronDownLarge`,\n `tuiIconFileLarge`,\n `tuiIconTrashLarge`,\n `tuiIconAlertCircleLarge`,\n `tuiIconCheckCircleLarge`,\n `tuiIconCopy`,\n `tuiIconCopyLarge`,\n `tuiIconEyeOffLarge`,\n `tuiIconEyeLarge`,\n `tuiIconClock`,\n `tuiIconClockLarge`,\n `tuiIconToggleOff`,\n `tuiIconToggleOffLarge`,\n `tuiIconToggleOn`,\n `tuiIconToggleOnLarge`,\n `tuiIconCalendar`,\n `tuiIconCalendarLarge`,\n] as const;\n","export const TUI_VERSION = `3.50.0`;\n"],"names":[],"mappings":";;;MAIa,oBAAoB,GAAG,MAAa;;MCApC,mBAAmB,GAAG,MAAY;;ACAxC,MAAM,2BAA2B,GAAG;;ACG9B,MAAA,WAAW,GAAG,IAAI,SAAS,GAAQ;AACzC,MAAM,WAAW,GAAO,GAAG;MACrB,cAAc,GAA6B,MAAK,IAAI;AAEjE,MAAM,IAAI,GAAG;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,CAAC,EAAE,CAAC;AACJ,IAAA,CAAC,EAAE,CAAC;CACE,CAAC;AAEE,MAAA,iBAAiB,GACvB,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,KACP,MAAM,GAAA;AACF,QAAA,OAAO,IAAI,CAAC;AAChB,KAAC;;ACrBE,MAAM,qBAAqB,GAA8B,IAAI,IAAI,MAAM,CAAC,IAAI;;ACK5E,MAAM,mBAAmB,GAAG,CAC/B,IAAO,EACP,MAAc,EACd,SAAA,GAAmC,qBAAqB,KAC9C,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ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AoB,kBAAA,CAAA;IACpB,CAAgB,cAAA,CAAA;IAChB,CAAoB,kBAAA,CAAA;IACpB,CAAkB,gBAAA,CAAA;IAClB,CAAoB,kBAAA,CAAA;IACpB,CAAyB,uBAAA,CAAA;IACzB,CAAkB,gBAAA,CAAA;IAClB,CAAmB,iBAAA,CAAA;IACnB,CAAyB,uBAAA,CAAA;IACzB,CAAyB,uBAAA,CAAA;IACzB,CAAa,WAAA,CAAA;IACb,CAAkB,gBAAA,CAAA;IAClB,CAAoB,kBAAA,CAAA;IACpB,CAAiB,eAAA,CAAA;IACjB,CAAc,YAAA,CAAA;IACd,CAAmB,iBAAA,CAAA;IACnB,CAAkB,gBAAA,CAAA;IAClB,CAAuB,qBAAA,CAAA;IACvB,CAAiB,eAAA,CAAA;IACjB,CAAsB,oBAAA,CAAA;IACtB,CAAiB,eAAA,CAAA;IACjB,CAAsB,oBAAA,CAAA;;;ACrEnB,MAAM,WAAW,GAAG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-constants.js","sources":["../../../projects/cdk/constants/always-false-handler.ts","../../../projects/cdk/constants/always-true-handler.ts","../../../projects/cdk/constants/browser.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/stringify.ts","../../../projects/cdk/constants/matcher.ts","../../../projects/cdk/constants/parent-animation.ts","../../../projects/cdk/constants/polling-time.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/used-icons.ts","../../../projects/cdk/constants/version.ts"],"sourcesContent":["/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_FALSE_HANDLER = (): false => false;\n","/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_TRUE_HANDLER = (): true => true;\n","/**\n * @deprecated\n * TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n */\nexport const CHROMIUM_EDGE_START_VERSION = 79;\n","import {QueryList} from '@angular/core';\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON() {\n return rect;\n },\n};\n","import {TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Default method to turn arbitrary object into string\n */\nexport const TUI_DEFAULT_STRINGIFY: TuiStringHandler<unknown> = item => String(item);\n","import {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nimport {TUI_DEFAULT_STRINGIFY} from './stringify';\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n","import {animateChild, query, transition, trigger} from '@angular/animations';\n\n/**\n * Add to enable child :leave animation (fixes https://github.com/angular/angular/issues/15753)\n */\nexport const TUI_PARENT_ANIMATION = trigger(`tuiParentAnimation`, [\n transition(`:leave`, [query(`:scope > *`, [animateChild()], {optional: true})]),\n]);\n\n/**\n * Add on parent to stop initial :enter animation for children\n */\nexport const TUI_PARENT_STOP = trigger(`tuiParentStop`, [transition(`:enter`, [])]);\n","export const POLLING_TIME = 1000 / 15;\n","// Filtering SVGElements for TreeWalker\n// Filter must be a function in IE, other modern browsers are compliant to this format\nexport const svgNodeFilter: NodeFilter = ((node: Node) =>\n `ownerSVGElement` in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT) as any;\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = `\\u00A0`;\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = `\\u2013`;\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = `\\u2014`;\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = `\\u00AB`;\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = `\\u00BB`;\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = `\\u002D`;\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = `\\u2212`;\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = `\\u002B`;\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = `\\u2022`;\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = `\\u2026`;\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = `\\u00A4`;\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = `\\u200B`;\n","/**\n * @description:\n * AUTOGENERATED\n *\n * Array of icons used in taiga-ui components\n */\nexport const TUI_USED_ICONS = [\n `tuiIconMirMono`,\n `tuiIconVisaMono`,\n `tuiIconElectronMono`,\n `tuiIconMastercard`,\n `tuiIconMaestro`,\n `tuiIconAmex`,\n `tuiIconDinersClub`,\n `tuiIconDiscover`,\n `tuiIconHumo`,\n `tuiIconJCB`,\n `tuiIconRuPay`,\n `tuiIconUnionPay`,\n `tuiIconUzcard`,\n `tuiIconVerve`,\n `tuiIconLink`,\n `tuiIconSearch`,\n `tuiIconSun`,\n `tuiIconMoon`,\n `tuiIconCode`,\n `tuiIconMenuLarge`,\n `tuiIconRotate`,\n `tuiIconArrowLeft`,\n `tuiIconArrowRight`,\n `tuiIconPlus`,\n `tuiIconMinus`,\n `tuiIconMinimize`,\n `tuiIconEye`,\n `tuiIconEyeOff`,\n `tuiIconDrag`,\n `tuiIconSortAscending`,\n `tuiIconSortDescending`,\n `tuiIconSortOff`,\n `tuiIconCheck`,\n `tuiIconCheckLarge`,\n `tuiIconMinusLarge`,\n `tuiIconChevronUp`,\n `tuiIconHelpCircle`,\n `tuiIconClose`,\n `tuiIconAlertCircle`,\n `tuiIconChevronRight`,\n `tuiIconInfo`,\n `tuiIconCheckCircle`,\n `tuiIconXCircle`,\n `tuiIconChevronLeft`,\n `tuiIconStarLarge`,\n `tuiIconChevronDown`,\n `tuiIconChevronDownLarge`,\n `tuiIconFileLarge`,\n `tuiIconTrashLarge`,\n `tuiIconAlertCircleLarge`,\n `tuiIconCheckCircleLarge`,\n `tuiIconCopy`,\n `tuiIconCopyLarge`,\n `tuiIconEyeOffLarge`,\n `tuiIconEyeLarge`,\n `tuiIconClock`,\n `tuiIconClockLarge`,\n `tuiIconToggleOff`,\n `tuiIconToggleOffLarge`,\n `tuiIconToggleOn`,\n `tuiIconToggleOnLarge`,\n `tuiIconCalendar`,\n `tuiIconCalendarLarge`,\n] as const;\n","export const TUI_VERSION = `3.51.0`;\n"],"names":[],"mappings":";;;MAIa,oBAAoB,GAAG,MAAa;;MCApC,mBAAmB,GAAG,MAAY;;ACAxC,MAAM,2BAA2B,GAAG;;ACG9B,MAAA,WAAW,GAAG,IAAI,SAAS,GAAQ;AACzC,MAAM,WAAW,GAAO,GAAG;MACrB,cAAc,GAA6B,MAAK,IAAI;AAEjE,MAAM,IAAI,GAAG;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,CAAC,EAAE,CAAC;AACJ,IAAA,CAAC,EAAE,CAAC;CACE,CAAC;AAEE,MAAA,iBAAiB,GACvB,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,KACP,MAAM,GAAA;AACF,QAAA,OAAO,IAAI,CAAC;AAChB,KAAC;;ACrBE,MAAM,qBAAqB,GAA8B,IAAI,IAAI,MAAM,CAAC,IAAI;;ACK5E,M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ClB,CAAmB,iBAAA,CAAA;IACnB,CAAc,YAAA,CAAA;IACd,CAAoB,kBAAA,CAAA;IACpB,CAAqB,mBAAA,CAAA;IACrB,CAAa,WAAA,CAAA;IACb,CAAoB,kBAAA,CAAA;IACpB,CAAgB,cAAA,CAAA;IAChB,CAAoB,kBAAA,CAAA;IACpB,CAAkB,gBAAA,CAAA;IAClB,CAAoB,kBAAA,CAAA;IACpB,CAAyB,uBAAA,CAAA;IACzB,CAAkB,gBAAA,CAAA;IAClB,CAAmB,iBAAA,CAAA;IACnB,CAAyB,uBAAA,CAAA;IACzB,CAAyB,uBAAA,CAAA;IACzB,CAAa,WAAA,CAAA;IACb,CAAkB,gBAAA,CAAA;IAClB,CAAoB,kBAAA,CAAA;IACpB,CAAiB,eAAA,CAAA;IACjB,CAAc,YAAA,CAAA;IACd,CAAmB,iBAAA,CAAA;IACnB,CAAkB,gBAAA,CAAA;IAClB,CAAuB,qBAAA,CAAA;IACvB,CAAiB,eAAA,CAAA;IACjB,CAAsB,oBAAA,CAAA;IACtB,CAAiB,eAAA,CAAA;IACjB,CAAsB,oBAAA,CAAA;;;ACrEnB,MAAM,WAAW,GAAG;;;;"}
|
@@ -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"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMatcher} 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, U extends unknown[]>(\n items: readonly T[],\n matcher:
|
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"],"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 exports: [TuiFilterPipe],\n declarations: [TuiFilterPipe],\n})\nexport class TuiFilterPipeModule {}\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,CAFb,aAAa,CAAA,EAAA,OAAA,EAAA,CADlB,aAAa,CAAA,EAAA,CAAA,CAAA;kHAGd,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;AAChC,iBAAA,CAAA;;;;;"}
|
@@ -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"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {TuiMapper} 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 extends unknown[], U, G>(\n value: U,\n mapper:
|
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"],"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 exports: [TuiMapperPipe],\n declarations: [TuiMapperPipe],\n})\nexport class TuiMapperPipeModule {}\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,CAFb,aAAa,CAAA,EAAA,OAAA,EAAA,CADlB,aAAa,CAAA,EAAA,CAAA,CAAA;kHAGd,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;AAChC,iBAAA,CAAA;;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@taiga-ui/cdk",
|
3
|
-
"version": "3.51.0-canary.
|
3
|
+
"version": "3.51.0-canary.6291033",
|
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,9 +15,9 @@
|
|
15
15
|
"repository": "https://github.com/taiga-family/taiga-ui",
|
16
16
|
"license": "Apache-2.0",
|
17
17
|
"dependencies": {
|
18
|
-
"@ng-web-apis/common": "3.0.
|
19
|
-
"@ng-web-apis/mutation-observer": "3.0.
|
20
|
-
"@ng-web-apis/resize-observer": "3.0.
|
18
|
+
"@ng-web-apis/common": "3.0.5",
|
19
|
+
"@ng-web-apis/mutation-observer": "3.0.5",
|
20
|
+
"@ng-web-apis/resize-observer": "3.0.5",
|
21
21
|
"@tinkoff/ng-event-plugins": "3.1.0",
|
22
22
|
"@tinkoff/ng-polymorpheus": "4.2.0",
|
23
23
|
"tslib": "2.6.2"
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"rxjs": ">=6.0.0"
|
31
31
|
},
|
32
32
|
"optionalDependencies": {
|
33
|
-
"ng-morph": "
|
33
|
+
"ng-morph": "4.0.0",
|
34
34
|
"parse5": "6.0.1"
|
35
35
|
},
|
36
36
|
"ng-update": {
|
@@ -2,7 +2,7 @@ import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { TuiMatcher } from '@taiga-ui/cdk/types';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class TuiFilterPipe implements PipeTransform {
|
5
|
-
transform<T
|
5
|
+
transform<T>(items: readonly T[], matcher: TuiMatcher<T>, ...args: any[]): T[];
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFilterPipe, never>;
|
7
7
|
static ɵpipe: i0.ɵɵPipeDeclaration<TuiFilterPipe, "tuiFilter">;
|
8
8
|
}
|
@@ -2,7 +2,7 @@ import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { TuiMapper } from '@taiga-ui/cdk/types';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class TuiMapperPipe implements PipeTransform {
|
5
|
-
transform<T
|
5
|
+
transform<T, G>(value: T, mapper: TuiMapper<T, G>, ...args: any[]): G;
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMapperPipe, never>;
|
7
7
|
static ɵpipe: i0.ɵɵPipeDeclaration<TuiMapperPipe, "tuiMapper">;
|
8
8
|
}
|
package/schematics/index.d.ts
CHANGED
package/schematics/index.js
CHANGED
@@ -27,4 +27,3 @@ tslib_1.__exportStar(require("./utils/is-ci"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./utils/progress"), exports);
|
28
28
|
tslib_1.__exportStar(require("./utils/project-root"), exports);
|
29
29
|
tslib_1.__exportStar(require("./utils/push-to-array-property"), exports);
|
30
|
-
tslib_1.__exportStar(require("./utils/replace-tag"), exports);
|
@@ -23,7 +23,7 @@ function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
|
|
23
23
|
if (ng_morph_1.Node.isImportSpecifier(parent)) {
|
24
24
|
processImport(parent, from, to);
|
25
25
|
}
|
26
|
-
else if (ng_morph_1.Node.
|
26
|
+
else if (ng_morph_1.Node.isTypeReference(parent)) {
|
27
27
|
const targetType = preserveGenerics && to ? addGeneric(to, parent.getTypeArguments()) : to;
|
28
28
|
parent.replaceWithText(targetType || `any`);
|
29
29
|
}
|
@@ -25,7 +25,7 @@ function replaceEnumWithString(enumName, replaceValues, keepAsType = true) {
|
|
25
25
|
import_manipulations_1.removeImport(parent);
|
26
26
|
continue;
|
27
27
|
}
|
28
|
-
if (ng_morph_1.Node.
|
28
|
+
if (ng_morph_1.Node.isTypeReference(parent) && !keepAsType) {
|
29
29
|
const declaration = parent.getParent();
|
30
30
|
(_a = declaration.removeType) === null || _a === void 0 ? void 0 : _a.call(declaration);
|
31
31
|
continue;
|
@@ -43,5 +43,5 @@ function containTypeRef(node) {
|
|
43
43
|
return node
|
44
44
|
.getNameNode()
|
45
45
|
.findReferencesAsNodes()
|
46
|
-
.some(ref => ng_morph_1.Node.
|
46
|
+
.some(ref => ng_morph_1.Node.isTypeReference(ref.getParent()));
|
47
47
|
}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TuiSchema } from '../../ng-add/schema';
|
2
2
|
import { ReplacementConst } from '../interfaces/replacement-const';
|
3
3
|
export declare function replaceConstants(options: TuiSchema, constants: readonly ReplacementConst[]): void;
|
4
|
-
export declare function
|
4
|
+
export declare function replaceIdentifier({ from, to }: ReplacementConst): void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.replaceIdentifier = exports.replaceConstants = 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");
|
@@ -9,12 +9,12 @@ const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
9
9
|
function replaceConstants(options, constants) {
|
10
10
|
!options[`skip-logs`] &&
|
11
11
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing constants...`);
|
12
|
-
constants.forEach(constToReplace =>
|
12
|
+
constants.forEach(constToReplace => replaceIdentifier(constToReplace));
|
13
13
|
!options[`skip-logs`] &&
|
14
14
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} constants replaced \n`);
|
15
15
|
}
|
16
16
|
exports.replaceConstants = replaceConstants;
|
17
|
-
function
|
17
|
+
function replaceIdentifier({ from, to }) {
|
18
18
|
const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
|
19
19
|
references.forEach(ref => {
|
20
20
|
if (ref.wasForgotten()) {
|
@@ -30,4 +30,4 @@ function replaceConst({ from, to }) {
|
|
30
30
|
}
|
31
31
|
});
|
32
32
|
}
|
33
|
-
exports.
|
33
|
+
exports.replaceIdentifier = replaceIdentifier;
|
@@ -28,7 +28,7 @@ function replaceService({ from, to, replaceMethods }, options) {
|
|
28
28
|
add_unique_import_1.addUniqueImport(parent.getSourceFile().getFilePath(), to.namedImport || to.name, to.moduleSpecifier);
|
29
29
|
return;
|
30
30
|
}
|
31
|
-
if (ng_morph_1.Node.
|
31
|
+
if (ng_morph_1.Node.isTypeReference(parent) && (replaceMethods === null || replaceMethods === void 0 ? void 0 : replaceMethods.length)) {
|
32
32
|
replaceProperties(parent, replaceMethods);
|
33
33
|
}
|
34
34
|
ref.replaceWithText(to.name);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
|
+
import { DevkitFileSystem } from 'ng-morph';
|
3
|
+
import { RemovableInput } from '../../interfaces/removable-input';
|
4
|
+
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
+
export declare function removeInputs({ resource, recorder, fileSystem, replaceableItems, }: {
|
6
|
+
fileSystem: DevkitFileSystem;
|
7
|
+
recorder: UpdateRecorder;
|
8
|
+
replaceableItems: RemovableInput[];
|
9
|
+
resource: TemplateResource;
|
10
|
+
}): void;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.removeInputs = void 0;
|
4
|
+
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
5
|
+
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
|
+
function removeInputs({ resource, recorder, fileSystem, replaceableItems, }) {
|
7
|
+
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
8
|
+
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
9
|
+
replaceableItems.forEach(({ inputName, tags }) => {
|
10
|
+
const offsets = [
|
11
|
+
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, inputName, tags),
|
12
|
+
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, `[${inputName}]`, tags),
|
13
|
+
];
|
14
|
+
offsets.forEach(([start, end]) => {
|
15
|
+
recorder.remove(start + templateOffset, end - start);
|
16
|
+
});
|
17
|
+
});
|
18
|
+
}
|
19
|
+
exports.removeInputs = removeInputs;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
2
|
import { DevkitFileSystem } from 'ng-morph';
|
3
|
+
import { ReplaceableAttributeValue } from '../../interfaces/replaceable-attribute-value';
|
3
4
|
import { TemplateResource } from '../../interfaces/template-resource';
|
4
|
-
import { ReplaceableAttributeValue } from '../../v3/interfaces/replaceable-attribute-value';
|
5
5
|
export declare function replaceAttrValues({ resource, recorder, fileSystem, replaceableItems, }: {
|
6
6
|
fileSystem: DevkitFileSystem;
|
7
7
|
recorder: UpdateRecorder;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { UpdateRecorder } from '@angular-devkit/schematics';
|
2
|
+
import { DevkitFileSystem } from 'ng-morph';
|
3
|
+
import { ReplaceableTag } from '../../interfaces/replaceable-tag';
|
4
|
+
import { TemplateResource } from '../../interfaces/template-resource';
|
5
|
+
export declare function replaceTags({ resource, recorder, fileSystem, replaceableItems, }: {
|
6
|
+
fileSystem: DevkitFileSystem;
|
7
|
+
recorder: UpdateRecorder;
|
8
|
+
replaceableItems: ReplaceableTag[];
|
9
|
+
resource: TemplateResource;
|
10
|
+
}): void;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.replaceTags = void 0;
|
4
|
+
const elements_1 = require("../../../utils/templates/elements");
|
5
|
+
const template_resource_1 = require("../../../utils/templates/template-resource");
|
6
|
+
const replace_tag_1 = require("./replace-tag");
|
7
|
+
function replaceTags({ resource, recorder, fileSystem, replaceableItems, }) {
|
8
|
+
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
9
|
+
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
10
|
+
replaceableItems.forEach(({ from, to, addAttributes }) => {
|
11
|
+
const elements = elements_1.findElementsByTagName(template, from);
|
12
|
+
elements.forEach(({ sourceCodeLocation }) => {
|
13
|
+
if (sourceCodeLocation) {
|
14
|
+
replace_tag_1.replaceTag(recorder, sourceCodeLocation, from, to, templateOffset, addAttributes);
|
15
|
+
}
|
16
|
+
});
|
17
|
+
});
|
18
|
+
}
|
19
|
+
exports.replaceTags = replaceTags;
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { RemovableInput } from '../../interfaces/removable-input';
|
1
2
|
import { ReplaceableAttribute } from '../../interfaces/replaceable-attribute';
|
3
|
+
import { ReplaceableAttributeValue } from '../../interfaces/replaceable-attribute-value';
|
4
|
+
import { ReplaceableTag } from '../../interfaces/replaceable-tag';
|
2
5
|
import { AttributeToDirective } from '../interfaces/attribute-to-directive';
|
3
|
-
import { RemovableInput } from '../interfaces/removable-input';
|
4
|
-
import { ReplaceableAttributeValue } from '../interfaces/replaceable-attribute-value';
|
5
|
-
import { ReplaceableTag } from '../interfaces/replaceable-tag';
|
6
6
|
export declare const ATTRS_TO_REPLACE: ReplaceableAttribute[];
|
7
7
|
export declare const INPUTS_TO_REMOVE: RemovableInput[];
|
8
8
|
export declare const TAGS_TO_REPLACE: ReplaceableTag[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.updateToV3 = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
6
6
|
const ng_morph_1 = require("ng-morph");
|
@@ -12,13 +12,12 @@ const colored_log_1 = require("../../utils/colored-log");
|
|
12
12
|
const get_execution_time_1 = require("../../utils/get-execution-time");
|
13
13
|
const remove_module_1 = require("../steps/remove-module");
|
14
14
|
const rename_types_1 = require("../steps/rename-types");
|
15
|
-
const replace_const_1 = require("../steps/replace-const");
|
16
15
|
const replace_deep_import_1 = require("../steps/replace-deep-import");
|
17
16
|
const replace_enums_1 = require("../steps/replace-enums");
|
17
|
+
const replace_identifier_1 = require("../steps/replace-identifier");
|
18
18
|
const replace_services_1 = require("../steps/replace-services");
|
19
19
|
const show_warnings_1 = require("../steps/show-warnings");
|
20
20
|
const get_file_system_1 = require("../utils/get-file-system");
|
21
|
-
const migrate_expand_templates_1 = require("../v3-5/steps/migrate-expand-templates");
|
22
21
|
const constants_1 = require("./constants/constants");
|
23
22
|
const enums_1 = require("./constants/enums");
|
24
23
|
const modules_1 = require("./constants/modules");
|
@@ -50,24 +49,13 @@ function updateToV3(options) {
|
|
50
49
|
]);
|
51
50
|
}
|
52
51
|
exports.updateToV3 = updateToV3;
|
53
|
-
function updateToV3_5(options) {
|
54
|
-
return (tree, _) => {
|
55
|
-
const fileSystem = get_file_system_1.getFileSystem(tree);
|
56
|
-
migrate_expand_templates_1.migrateExpandTemplates(fileSystem, options);
|
57
|
-
fileSystem.commitEdits();
|
58
|
-
ng_morph_1.saveActiveProject();
|
59
|
-
!options[`skip-logs`] &&
|
60
|
-
colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
|
61
|
-
};
|
62
|
-
}
|
63
|
-
exports.updateToV3_5 = updateToV3_5;
|
64
52
|
function main(options) {
|
65
53
|
return (tree, context) => {
|
66
54
|
const fileSystem = get_file_system_1.getFileSystem(tree);
|
67
55
|
replace_deep_import_1.replaceDeepImports(options);
|
68
56
|
replace_enums_1.replaceEnums(options, enums_1.ENUMS_TO_REPLACE);
|
69
57
|
rename_types_1.renameTypes(options, types_1.TYPES_TO_RENAME);
|
70
|
-
|
58
|
+
replace_identifier_1.replaceConstants(options, constants_1.CONSTANTS_TO_REPLACE);
|
71
59
|
replace_services_1.replaceServices(options, services_1.SERVICES_TO_REPLACE);
|
72
60
|
replace_styles_1.replaceStyles();
|
73
61
|
show_warnings_1.showWarnings(context, warnings_1.MIGRATION_WARNINGS);
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.migratePolymorpheus = void 0;
|
4
|
-
const replace_tag_1 = require("../../../utils/replace-tag");
|
5
4
|
const elements_1 = require("../../../utils/templates/elements");
|
6
5
|
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
7
6
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
7
|
+
const replace_tag_1 = require("../../utils/templates/replace-tag");
|
8
8
|
function migratePolymorpheus({ resource, fileSystem, recorder, }) {
|
9
9
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
10
10
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
@@ -9,12 +9,14 @@ const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
9
9
|
const colored_log_1 = require("../../../utils/colored-log");
|
10
10
|
const insert_todo_1 = require("../../../utils/insert-todo");
|
11
11
|
const progress_1 = require("../../../utils/progress");
|
12
|
-
const replace_tag_1 = require("../../../utils/replace-tag");
|
13
12
|
const elements_1 = require("../../../utils/templates/elements");
|
14
13
|
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
15
14
|
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
16
15
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
16
|
+
const remove_inputs_1 = require("../../utils/templates/remove-inputs");
|
17
17
|
const replace_attr_values_1 = require("../../utils/templates/replace-attr-values");
|
18
|
+
const replace_tag_1 = require("../../utils/templates/replace-tag");
|
19
|
+
const replace_tags_1 = require("../../utils/templates/replace-tags");
|
18
20
|
const templates_1 = require("../constants/templates");
|
19
21
|
const migrate_polymorpheus_1 = require("./migrate-polymorpheus");
|
20
22
|
const migrate_textfield_controller_1 = require("./migrate-textfield-controller");
|
@@ -23,7 +25,7 @@ function migrateTemplates(fileSystem, options) {
|
|
23
25
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating templates...`);
|
24
26
|
const componentWithTemplatesPaths = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
25
27
|
const actions = [
|
26
|
-
|
28
|
+
replaceV3Tags,
|
27
29
|
replaceAttrs,
|
28
30
|
replaceAttrsByDirective,
|
29
31
|
replaceBreadcrumbs,
|
@@ -31,7 +33,7 @@ function migrateTemplates(fileSystem, options) {
|
|
31
33
|
addHTMLCommentTags,
|
32
34
|
addEditorProviders,
|
33
35
|
migrateTuiHideSelectedPipe,
|
34
|
-
|
36
|
+
removeV3Inputs,
|
35
37
|
migrate_polymorpheus_1.migratePolymorpheus,
|
36
38
|
migrate_textfield_controller_1.migrateTextfieldController,
|
37
39
|
replaceInputValues,
|
@@ -81,17 +83,8 @@ function replaceAttrs({ resource, recorder, fileSystem, }) {
|
|
81
83
|
});
|
82
84
|
});
|
83
85
|
}
|
84
|
-
function
|
85
|
-
|
86
|
-
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
87
|
-
templates_1.TAGS_TO_REPLACE.forEach(({ from, to, addAttributes }) => {
|
88
|
-
const elements = elements_1.findElementsByTagName(template, from);
|
89
|
-
elements.forEach(({ sourceCodeLocation }) => {
|
90
|
-
if (sourceCodeLocation) {
|
91
|
-
replace_tag_1.replaceTag(recorder, sourceCodeLocation, from, to, templateOffset, addAttributes);
|
92
|
-
}
|
93
|
-
});
|
94
|
-
});
|
86
|
+
function replaceV3Tags({ resource, recorder, fileSystem, }) {
|
87
|
+
replace_tags_1.replaceTags({ resource, recorder, fileSystem, replaceableItems: templates_1.TAGS_TO_REPLACE });
|
95
88
|
}
|
96
89
|
function addHTMLCommentTags({ resource, recorder, fileSystem, }) {
|
97
90
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
@@ -224,16 +217,6 @@ function replaceInputValues({ resource, recorder, fileSystem, }) {
|
|
224
217
|
replaceableItems: templates_1.REPLACE_ATTR_VALUE,
|
225
218
|
});
|
226
219
|
}
|
227
|
-
function
|
228
|
-
|
229
|
-
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
230
|
-
templates_1.INPUTS_TO_REMOVE.forEach(({ inputName, tags }) => {
|
231
|
-
const offsets = [
|
232
|
-
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, inputName, tags),
|
233
|
-
...ng_component_input_manipulations_1.getInputPropertyOffsets(template, `[${inputName}]`, tags),
|
234
|
-
];
|
235
|
-
offsets.forEach(([start, end]) => {
|
236
|
-
recorder.remove(start + templateOffset, end - start);
|
237
|
-
});
|
238
|
-
});
|
220
|
+
function removeV3Inputs({ resource, fileSystem, recorder, }) {
|
221
|
+
remove_inputs_1.removeInputs({ resource, recorder, fileSystem, replaceableItems: templates_1.INPUTS_TO_REMOVE });
|
239
222
|
}
|
@@ -37,7 +37,7 @@ function addWarningToMethod(className, method, message) {
|
|
37
37
|
const references = get_named_import_references_1.getNamedImportReferences(className);
|
38
38
|
references.forEach(ref => {
|
39
39
|
const parent = ref.getParent();
|
40
|
-
if (ng_morph_1.Node.
|
40
|
+
if (ng_morph_1.Node.isTypeReference(parent)) {
|
41
41
|
checkMethod(parent, method, message);
|
42
42
|
}
|
43
43
|
});
|
@@ -5,12 +5,12 @@ const ng_morph_1 = require("ng-morph");
|
|
5
5
|
const constants_1 = require("../../constants");
|
6
6
|
const colored_log_1 = require("../../utils/colored-log");
|
7
7
|
const project_root_1 = require("../../utils/project-root");
|
8
|
-
const replace_tag_1 = require("../../utils/replace-tag");
|
9
8
|
const elements_1 = require("../../utils/templates/elements");
|
10
9
|
const get_component_templates_1 = require("../../utils/templates/get-component-templates");
|
11
10
|
const template_resource_1 = require("../../utils/templates/template-resource");
|
12
11
|
const get_file_system_1 = require("../utils/get-file-system");
|
13
12
|
const replace_text_1 = require("../utils/replace-text");
|
13
|
+
const replace_tag_1 = require("../utils/templates/replace-tag");
|
14
14
|
function updateToV3_40(options) {
|
15
15
|
return (tree, _) => {
|
16
16
|
const fileSystem = get_file_system_1.getFileSystem(tree);
|
@@ -2,10 +2,13 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.updateToV4 = void 0;
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
5
|
+
const ng_morph_1 = require("ng-morph");
|
5
6
|
const perf_hooks_1 = require("perf_hooks");
|
7
|
+
const constants_1 = require("../../constants");
|
6
8
|
const versions_1 = require("../../ng-add/constants/versions");
|
7
9
|
const colored_log_1 = require("../../utils/colored-log");
|
8
10
|
const get_execution_time_1 = require("../../utils/get-execution-time");
|
11
|
+
const project_root_1 = require("../../utils/project-root");
|
9
12
|
const replace_thumbnail_card_1 = require("./steps/replace-thumbnail-card");
|
10
13
|
const restore_tui_mapper_1 = require("./steps/restore-tui-mapper");
|
11
14
|
const restore_tui_matcher_1 = require("./steps/restore-tui-matcher");
|
@@ -14,9 +17,7 @@ function updateToV4(options) {
|
|
14
17
|
!options[`skip-logs`] &&
|
15
18
|
colored_log_1.titleLog(`\n\n${colored_log_1.START_SYMBOL} Your packages will be updated to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
|
16
19
|
return schematics_1.chain([
|
17
|
-
|
18
|
-
restore_tui_mapper_1.restoreTuiMapper(options),
|
19
|
-
restore_tui_matcher_1.restoreTuiMatcher(options),
|
20
|
+
main(options),
|
20
21
|
() => {
|
21
22
|
const executionTime = get_execution_time_1.getExecutionTime(t0, perf_hooks_1.performance.now());
|
22
23
|
!options[`skip-logs`] &&
|
@@ -25,3 +26,14 @@ function updateToV4(options) {
|
|
25
26
|
]);
|
26
27
|
}
|
27
28
|
exports.updateToV4 = updateToV4;
|
29
|
+
function main(options) {
|
30
|
+
return (tree, _context) => {
|
31
|
+
const project = ng_morph_1.createProject(tree, project_root_1.projectRoot(), constants_1.ALL_FILES);
|
32
|
+
const fileSystem = project.getFileSystem().fs;
|
33
|
+
replace_thumbnail_card_1.replaceThumbnailCard(options, fileSystem);
|
34
|
+
restore_tui_mapper_1.restoreTuiMapper(options);
|
35
|
+
restore_tui_matcher_1.restoreTuiMatcher(options);
|
36
|
+
fileSystem.commitEdits();
|
37
|
+
ng_morph_1.saveActiveProject();
|
38
|
+
};
|
39
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { DevkitFileSystem } from 'ng-morph';
|
2
2
|
import { TuiSchema } from '../../../ng-add/schema';
|
3
|
-
export declare function replaceThumbnailCard(options: TuiSchema):
|
3
|
+
export declare function replaceThumbnailCard(options: TuiSchema, fileSystem: DevkitFileSystem): void;
|
4
|
+
export declare function replaceReferenceTypes(options: TuiSchema): void;
|