@taiga-ui/cdk 4.44.0 → 4.45.0-canary.5b72c24

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.
@@ -1 +1 @@
1
- export declare const TUI_VERSION = "4.44.0";
1
+ export declare const TUI_VERSION = "4.45.0-canary.5b72c24";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TUI_VERSION = void 0;
4
- exports.TUI_VERSION = '4.44.0';
4
+ exports.TUI_VERSION = '4.45.0-canary.5b72c24';
@@ -1,2 +1,2 @@
1
- export const TUI_VERSION = '4.44.0';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jb25zdGFudHMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsUUFBUSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFRVSV9WRVJTSU9OID0gJzQuNDQuMCc7XG4iXX0=
1
+ export const TUI_VERSION = '4.45.0-canary.5b72c24';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jb25zdGFudHMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgVFVJX1ZFUlNJT04gPSAnNC40NS4wLWNhbmFyeS41YjcyYzI0JztcbiJdfQ==
@@ -214,7 +214,7 @@ const TUI_USED_ICONS = [
214
214
  '@tui.move-up',
215
215
  ];
216
216
 
217
- const TUI_VERSION = '4.44.0';
217
+ const TUI_VERSION = '4.45.0-canary.5b72c24';
218
218
 
219
219
  /**
220
220
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../projects/cdk/constants/allow-signal-writes.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/handlers.ts","../../../projects/cdk/constants/matchers.ts","../../../projects/cdk/constants/regexp.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","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["import type {CreateEffectOptions} from '@angular/core';\nimport {VERSION} from '@angular/core';\n\nexport const TUI_ALLOW_SIGNAL_WRITES: CreateEffectOptions =\n parseInt(VERSION.major, 10) >= 19 ? {} : {allowSignalWrites: true};\n","import {QueryList} from '@angular/core';\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\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 = () => {};\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON: () => rect,\n};\n","/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const TUI_FALSE_HANDLER = (): false => false;\n\n/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const TUI_TRUE_HANDLER = (): true => true;\n","import type {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\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> = String,\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> = String,\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","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\n","export const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number> = {\n acceptNode(node: Node): number {\n return 'ownerSVGElement' in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT;\n },\n};\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 `&minus;`. 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 '@tui.mir',\n '@tui.visa',\n '@tui.electron',\n '@tui.mastercard',\n '@tui.maestro',\n '@tui.amex',\n '@tui.diners-club',\n '@tui.discover',\n '@tui.humo',\n '@tui.jcb',\n '@tui.ru-pay',\n '@tui.union-pay',\n '@tui.uzcard',\n '@tui.verve',\n '@tui.external-link',\n '@tui.a-large-small',\n '@tui.arrow-right-left',\n '@tui.search',\n '@tui.sun',\n '@tui.moon',\n '@tui.code',\n '@tui.menu',\n '@tui.copy',\n '@tui.check',\n '@tui.link',\n '@tui.languages',\n '@tui.shrink',\n '@tui.expand',\n '@tui.eye-off',\n '@tui.eye',\n '@tui.grip-vertical',\n '@tui.chevron-up',\n '@tui.chevron-down',\n '@tui.chevrons-up-down',\n '@tui.info',\n '@tui.circle-check',\n '@tui.circle-x',\n '@tui.circle-alert',\n '@tui.circle-help',\n '@tui.x',\n '@tui.chevron-right',\n '@tui.ellipsis',\n '@tui.chevron-left',\n '@tui.clock',\n '@tui.trash',\n '@tui.minus',\n '@tui.file',\n '@tui.calendar',\n '@tui.plus',\n '@tui.phone',\n '@tui.heart',\n '@tui.heart-filled',\n '@tui.star',\n '@tui.rotate-ccw-square',\n '@tui.arrow-left',\n '@tui.arrow-right',\n '@tui.minimize',\n '@tui.filter',\n '@tui.layout-grid',\n '@tui.move-up-right',\n '@tui.move-right',\n '@tui.move-down-right',\n '@tui.move-down',\n '@tui.move-down-left',\n '@tui.move-left',\n '@tui.move-up-left',\n '@tui.move-up',\n] as const;\n","export const TUI_VERSION = '4.44.0';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAGa,MAAA,uBAAuB,GAChC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAC,iBAAiB,EAAE,IAAI;;ACFrE,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;AAEX;;;;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BAAmB;IACnB,WAAW;IACX,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,mBAAmB;IACnB,cAAc;;;ACzEX,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../projects/cdk/constants/allow-signal-writes.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/handlers.ts","../../../projects/cdk/constants/matchers.ts","../../../projects/cdk/constants/regexp.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","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["import type {CreateEffectOptions} from '@angular/core';\nimport {VERSION} from '@angular/core';\n\nexport const TUI_ALLOW_SIGNAL_WRITES: CreateEffectOptions =\n parseInt(VERSION.major, 10) >= 19 ? {} : {allowSignalWrites: true};\n","import {QueryList} from '@angular/core';\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\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 = () => {};\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON: () => rect,\n};\n","/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const TUI_FALSE_HANDLER = (): false => false;\n\n/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const TUI_TRUE_HANDLER = (): true => true;\n","import type {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\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> = String,\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> = String,\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","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\n","export const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number> = {\n acceptNode(node: Node): number {\n return 'ownerSVGElement' in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT;\n },\n};\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 `&minus;`. 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 '@tui.mir',\n '@tui.visa',\n '@tui.electron',\n '@tui.mastercard',\n '@tui.maestro',\n '@tui.amex',\n '@tui.diners-club',\n '@tui.discover',\n '@tui.humo',\n '@tui.jcb',\n '@tui.ru-pay',\n '@tui.union-pay',\n '@tui.uzcard',\n '@tui.verve',\n '@tui.external-link',\n '@tui.a-large-small',\n '@tui.arrow-right-left',\n '@tui.search',\n '@tui.sun',\n '@tui.moon',\n '@tui.code',\n '@tui.menu',\n '@tui.copy',\n '@tui.check',\n '@tui.link',\n '@tui.languages',\n '@tui.shrink',\n '@tui.expand',\n '@tui.eye-off',\n '@tui.eye',\n '@tui.grip-vertical',\n '@tui.chevron-up',\n '@tui.chevron-down',\n '@tui.chevrons-up-down',\n '@tui.info',\n '@tui.circle-check',\n '@tui.circle-x',\n '@tui.circle-alert',\n '@tui.circle-help',\n '@tui.x',\n '@tui.chevron-right',\n '@tui.ellipsis',\n '@tui.chevron-left',\n '@tui.clock',\n '@tui.trash',\n '@tui.minus',\n '@tui.file',\n '@tui.calendar',\n '@tui.plus',\n '@tui.phone',\n '@tui.heart',\n '@tui.heart-filled',\n '@tui.star',\n '@tui.rotate-ccw-square',\n '@tui.arrow-left',\n '@tui.arrow-right',\n '@tui.minimize',\n '@tui.filter',\n '@tui.layout-grid',\n '@tui.move-up-right',\n '@tui.move-right',\n '@tui.move-down-right',\n '@tui.move-down',\n '@tui.move-down-left',\n '@tui.move-left',\n '@tui.move-up-left',\n '@tui.move-up',\n] as const;\n","export const TUI_VERSION = '4.45.0-canary.5b72c24';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAGa,MAAA,uBAAuB,GAChC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAC,iBAAiB,EAAE,IAAI;;ACFrE,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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IACX,eAAe;IACf,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,WAAW;IACX,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,mBAAmB;IACnB,cAAc;;;ACzEX,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "4.44.0",
3
+ "version": "4.45.0-canary.5b72c24",
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",
@@ -33,6 +33,12 @@
33
33
  "migrateTuiLet": {
34
34
  "description": "Migrate TuiLet directive to @let control flow",
35
35
  "factory": "./migrate-tui-let/index"
36
+ },
37
+ "updateToV5": {
38
+ "private": true,
39
+ "description": "Manually run migration to update Taiga to v5.x.x",
40
+ "factory": "./ng-update/v5/index#updateToV5",
41
+ "schema": "./ng-update/v5/schema.json"
36
42
  }
37
43
  }
38
44
  }
@@ -20,6 +20,11 @@
20
20
  "description": "Updates Taiga UI packages to v4",
21
21
  "version": "4.0.0",
22
22
  "factory": "./ng-update/v4/index#updateToV4"
23
+ },
24
+ "updateToV5": {
25
+ "description": "Updates Taiga UI packages to v5",
26
+ "version": "5.0.0",
27
+ "factory": "./ng-update/v5/index#updateToV5"
23
28
  }
24
29
  }
25
30
  }
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ import type { TuiSchema } from '../../ng-add/schema';
3
+ export declare function updateToV5(options: TuiSchema): Rule;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateToV5 = void 0;
4
+ const node_perf_hooks_1 = require("node:perf_hooks");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
7
+ const ng_morph_1 = require("ng-morph");
8
+ const versions_1 = require("../../ng-add/constants/versions");
9
+ const get_execution_time_1 = require("../../utils/get-execution-time");
10
+ const migrate_tokens_1 = require("./steps/migrate-tokens/migrate-tokens");
11
+ const update_tsconfig_1 = require("./steps/migrate-tokens/update-tsconfig");
12
+ function main(options) {
13
+ return (tree, context) => {
14
+ (0, migrate_tokens_1.migrateTokens)(tree, options);
15
+ (0, update_tsconfig_1.updateTsConfig)(tree, options);
16
+ context.addTask(new tasks_1.NodePackageInstallTask());
17
+ };
18
+ }
19
+ function updateToV5(options) {
20
+ const t0 = node_perf_hooks_1.performance.now();
21
+ !options['skip-logs'] &&
22
+ (0, ng_morph_1.titleLog)(`\n\n${ng_morph_1.START_SYMBOL} Your packages will be updated to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
23
+ return (0, schematics_1.chain)([
24
+ main(options),
25
+ () => {
26
+ const executionTime = (0, get_execution_time_1.getExecutionTime)(t0, node_perf_hooks_1.performance.now());
27
+ !options['skip-logs'] &&
28
+ (0, ng_morph_1.titleLog)(`${ng_morph_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${executionTime}. \n`);
29
+ },
30
+ ]);
31
+ }
32
+ exports.updateToV5 = updateToV5;
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "taiga-ui-ng-update-v5",
4
+ "title": "Taiga UI ng-update v5",
5
+ "type": "object",
6
+ "properties": {}
7
+ }
@@ -0,0 +1,13 @@
1
+ import type { Tree } from '@angular-devkit/schematics';
2
+ import type { TuiSchema } from '../../../../ng-add/schema';
3
+ /**
4
+ * Migrates Taiga UI token functions to Angular's InjectionToken
5
+ *
6
+ * This schematic:
7
+ * 1. Finds all references to `tuiCreateToken` and `tuiCreateTokenFromFactory`
8
+ * 2. Replaces them with equivalent `InjectionToken` implementations
9
+ * 3. Handles proper import management for `InjectionToken`
10
+ * 4. Preserves type parameters and factory functions
11
+ * 5. Adds descriptive error handling and logging
12
+ */
13
+ export declare function migrateTokens(tree: Tree, options: TuiSchema): void;
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateTokens = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const constants_1 = require("../../../../constants");
6
+ const get_named_import_references_1 = require("../../../../utils/get-named-import-references");
7
+ const import_manipulations_1 = require("../../../../utils/import-manipulations");
8
+ const insert_todo_1 = require("../../../../utils/insert-todo");
9
+ const TOKEN_FUNCTIONS = ['tuiCreateToken', 'tuiCreateTokenFromFactory'];
10
+ const ANGULAR_CORE = '@angular/core';
11
+ const INJECTION_TOKEN = 'InjectionToken';
12
+ /**
13
+ * Migrates Taiga UI token functions to Angular's InjectionToken
14
+ *
15
+ * This schematic:
16
+ * 1. Finds all references to `tuiCreateToken` and `tuiCreateTokenFromFactory`
17
+ * 2. Replaces them with equivalent `InjectionToken` implementations
18
+ * 3. Handles proper import management for `InjectionToken`
19
+ * 4. Preserves type parameters and factory functions
20
+ * 5. Adds descriptive error handling and logging
21
+ */
22
+ function migrateTokens(tree, options) {
23
+ if (!options['skip-logs']) {
24
+ (0, ng_morph_1.infoLog)('Starting token migration to InjectionToken...');
25
+ }
26
+ const project = (0, ng_morph_1.createProject)(tree, '/', constants_1.ALL_TS_FILES);
27
+ (0, ng_morph_1.setActiveProject)(project);
28
+ const allFiles = (0, ng_morph_1.getSourceFiles)();
29
+ if (!options['skip-logs']) {
30
+ (0, ng_morph_1.infoLog)(`Found ${allFiles.length} source files`);
31
+ }
32
+ TOKEN_FUNCTIONS.forEach((tokenFunction) => {
33
+ const references = (0, get_named_import_references_1.getNamedImportReferences)(tokenFunction, '@taiga-ui/cdk');
34
+ if (!options['skip-logs']) {
35
+ (0, ng_morph_1.infoLog)(`Found ${references.length} references for ${tokenFunction}`);
36
+ }
37
+ references.forEach((ref) => {
38
+ if (ref.wasForgotten()) {
39
+ return;
40
+ }
41
+ try {
42
+ const parent = ref.getParent();
43
+ const sourceFile = ref.getSourceFile();
44
+ if (ng_morph_1.Node.isImportSpecifier(parent)) {
45
+ (0, import_manipulations_1.removeImport)(parent);
46
+ return;
47
+ }
48
+ if (ng_morph_1.Node.isCallExpression(parent)) {
49
+ const declaration = parent.getFirstAncestorByKind(ng_morph_1.SyntaxKind.VariableDeclaration);
50
+ if (!declaration) {
51
+ if (!ref.wasForgotten()) {
52
+ (0, insert_todo_1.insertTodo)(ref, 'Could not find variable declaration');
53
+ }
54
+ return;
55
+ }
56
+ const constName = declaration.getName();
57
+ if (!constName) {
58
+ if (!ref.wasForgotten()) {
59
+ (0, insert_todo_1.insertTodo)(ref, 'Variable declaration has no name');
60
+ }
61
+ return;
62
+ }
63
+ const newExpression = createInjectionTokenExpression(parent, constName, tokenFunction);
64
+ parent.replaceWithText(newExpression);
65
+ // handle InjectionToken imports
66
+ let hasValueImport = false;
67
+ const coreImports = [];
68
+ sourceFile.getImportDeclarations().forEach((decl) => {
69
+ if (decl.getModuleSpecifierValue() !== ANGULAR_CORE) {
70
+ return;
71
+ }
72
+ coreImports.push(decl);
73
+ const namedImports = decl.getNamedImports();
74
+ const tokenImport = namedImports.find((i) => i.getName() === INJECTION_TOKEN);
75
+ if (!tokenImport) {
76
+ return;
77
+ }
78
+ // remove InjectionToken from type-only imports
79
+ if (tokenImport.isTypeOnly() || decl.isTypeOnly()) {
80
+ tokenImport.remove();
81
+ // remove the import declaration if it becomes empty
82
+ if (decl.getNamedImports().length === 0) {
83
+ decl.remove();
84
+ }
85
+ }
86
+ else {
87
+ hasValueImport = true;
88
+ }
89
+ });
90
+ // add InjectionToken as regular import if needed
91
+ if (!hasValueImport) {
92
+ sourceFile.addImportDeclaration({
93
+ moduleSpecifier: ANGULAR_CORE,
94
+ namedImports: [INJECTION_TOKEN],
95
+ isTypeOnly: false,
96
+ });
97
+ }
98
+ }
99
+ }
100
+ catch (error) {
101
+ const message = error instanceof Error ? error.message : String(error);
102
+ if (!options['skip-logs']) {
103
+ (0, ng_morph_1.infoLog)(`Error migrating token: ${message}`);
104
+ }
105
+ if (!ref.wasForgotten()) {
106
+ (0, insert_todo_1.insertTodo)(ref, `Migration failed: ${message}`);
107
+ }
108
+ }
109
+ });
110
+ });
111
+ (0, ng_morph_1.saveActiveProject)();
112
+ if (!options['skip-logs']) {
113
+ (0, ng_morph_1.titleLog)('Token migration completed!');
114
+ }
115
+ }
116
+ exports.migrateTokens = migrateTokens;
117
+ /**
118
+ * Creates InjectionToken expression to replace token functions
119
+ *
120
+ * This function:
121
+ * - Preserves type parameters (<T> syntax)
122
+ * - Converts token values to factory functions when needed
123
+ * - Adds ngDevMode checks for token descriptions
124
+ * - Handles different cases for tuiCreateToken vs tuiCreateTokenFromFactory
125
+ *
126
+ * Example conversions:
127
+ * tuiCreateToken('default') → new InjectionToken(..., { factory: () => 'default' })
128
+ * tuiCreateTokenFromFactory(() => value) → new InjectionToken(..., { factory: () => value })
129
+ */
130
+ function createInjectionTokenExpression(callExpression, constName, tokenFunction) {
131
+ const typeArgs = callExpression.getTypeArguments();
132
+ const typeArgsText = typeArgs.length
133
+ ? `<${typeArgs.map((t) => t.getText()).join(', ')}>`
134
+ : '';
135
+ const args = callExpression.getArguments();
136
+ const isFactory = tokenFunction === 'tuiCreateTokenFromFactory';
137
+ const tokenDescription = `ngDevMode ? '${constName}' : ''`;
138
+ if (args.length > 0 && args[0]) {
139
+ const argText = args[0].getText();
140
+ const isObjectOrArray = argText.startsWith('{') || argText.startsWith('[');
141
+ if (isFactory) {
142
+ return `new ${INJECTION_TOKEN}${typeArgsText}(${tokenDescription}, {
143
+ factory: ${argText}
144
+ })`;
145
+ }
146
+ const factoryContent = isObjectOrArray
147
+ ? `() => (${argText})`
148
+ : `() => ${argText}`;
149
+ return `new ${INJECTION_TOKEN}${typeArgsText}(${tokenDescription}, {
150
+ factory: ${factoryContent}
151
+ })`;
152
+ }
153
+ return `new ${INJECTION_TOKEN}${typeArgsText}(${tokenDescription})`;
154
+ }
@@ -0,0 +1,11 @@
1
+ import type { Tree } from '@angular-devkit/schematics';
2
+ import type { TuiSchema } from '../../../../ng-add/schema';
3
+ /**
4
+ * Updates tsconfig.json to include necessary type definitions
5
+ * - Adds `@taiga-ui/tsconfig` to typeRoots
6
+ * - Adds `node` and `ng-dev-mode` to types array
7
+ *
8
+ * This ensures proper type checking and IntelliSense for Taiga UI components
9
+ * and prevents common TypeScript errors related to custom types and ngDevMode.
10
+ */
11
+ export declare function updateTsConfig(tree: Tree, options: TuiSchema): void;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateTsConfig = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const TAIGA_TS_CONFIG_PATH = 'node_modules/@taiga-ui/tsconfig';
6
+ /**
7
+ * Updates tsconfig.json to include necessary type definitions
8
+ * - Adds `@taiga-ui/tsconfig` to typeRoots
9
+ * - Adds `node` and `ng-dev-mode` to types array
10
+ *
11
+ * This ensures proper type checking and IntelliSense for Taiga UI components
12
+ * and prevents common TypeScript errors related to custom types and ngDevMode.
13
+ */
14
+ function updateTsConfig(tree, options) {
15
+ const tsConfigPath = 'tsconfig.json';
16
+ if (!tree.exists(tsConfigPath)) {
17
+ if (!options['skip-logs']) {
18
+ (0, ng_morph_1.infoLog)(`Could not find ${tsConfigPath}, skipping tsconfig update.`);
19
+ }
20
+ return;
21
+ }
22
+ const content = tree.readText(tsConfigPath);
23
+ let tsConfig;
24
+ try {
25
+ tsConfig = JSON.parse(content);
26
+ }
27
+ catch (e) {
28
+ if (!options['skip-logs']) {
29
+ (0, ng_morph_1.infoLog)(`Error parsing ${tsConfigPath}: ${e instanceof Error ? e.message : e}. Skipping tsconfig update.`);
30
+ }
31
+ return;
32
+ }
33
+ if (!tsConfig.compilerOptions) {
34
+ tsConfig.compilerOptions = {};
35
+ }
36
+ // Track changes for logging
37
+ let changesMade = false;
38
+ const addedTypeRoots = [];
39
+ const addedTypes = [];
40
+ const typeRoots = tsConfig.compilerOptions.typeRoots || ['node_modules/@types'];
41
+ if (!typeRoots.includes(TAIGA_TS_CONFIG_PATH)) {
42
+ typeRoots.push(TAIGA_TS_CONFIG_PATH);
43
+ tsConfig.compilerOptions.typeRoots = typeRoots;
44
+ addedTypeRoots.push(TAIGA_TS_CONFIG_PATH);
45
+ changesMade = true;
46
+ }
47
+ const types = tsConfig.compilerOptions.types || [];
48
+ const requiredTypes = ['node', 'ng-dev-mode'];
49
+ const missingTypes = requiredTypes.filter((type) => !types.includes(type));
50
+ if (missingTypes.length > 0) {
51
+ missingTypes.forEach((type) => {
52
+ types.push(type);
53
+ addedTypes.push(type);
54
+ });
55
+ tsConfig.compilerOptions.types = types;
56
+ changesMade = true;
57
+ }
58
+ // Save changes if any modifications were made
59
+ if (changesMade) {
60
+ tree.overwrite(tsConfigPath, `${JSON.stringify(tsConfig, null, 2)}\n`);
61
+ if (!options['skip-logs']) {
62
+ if (addedTypeRoots.length > 0) {
63
+ (0, ng_morph_1.infoLog)(`Added to typeRoots: ${addedTypeRoots.join(', ')}`);
64
+ }
65
+ if (addedTypes.length > 0) {
66
+ (0, ng_morph_1.infoLog)(`Added to types: ${addedTypes.join(', ')}`);
67
+ }
68
+ (0, ng_morph_1.infoLog)(`Updated ${tsConfigPath} successfully`);
69
+ }
70
+ }
71
+ else if (!options['skip-logs']) {
72
+ (0, ng_morph_1.infoLog)(`No changes needed in ${tsConfigPath}, configuration already complete`);
73
+ }
74
+ }
75
+ exports.updateTsConfig = updateTsConfig;
@@ -0,0 +1 @@
1
+ export declare function runMigration(before: string): Promise<string>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runMigration = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const node_path_1 = require("node:path");
6
+ const schematics_1 = require("@angular-devkit/schematics");
7
+ const testing_1 = require("@angular-devkit/schematics/testing");
8
+ const ng_morph_1 = require("ng-morph");
9
+ const collectionPath = (0, node_path_1.join)(__dirname, '../../../../migration.json');
10
+ function runMigration(before) {
11
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+ const host = new testing_1.UnitTestTree(new schematics_1.HostTree());
13
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
14
+ (0, ng_morph_1.setActiveProject)((0, ng_morph_1.createProject)(host));
15
+ (0, ng_morph_1.createSourceFile)('test/app/tokens.ts', before);
16
+ (0, ng_morph_1.createSourceFile)('package.json', '{}');
17
+ (0, ng_morph_1.saveActiveProject)();
18
+ const tree = yield runner.runSchematic('updateToV5', { 'skip-logs': process.env['TUI_CI'] === 'true' }, host);
19
+ return tree.readContent('test/app/tokens.ts');
20
+ });
21
+ }
22
+ exports.runMigration = runMigration;