@taiga-ui/cdk 4.0.0-rc.1 → 4.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/constants/used-icons.d.ts +1 -1
  2. package/constants/version.d.ts +1 -1
  3. package/constants/version.js +1 -1
  4. package/esm2022/constants/used-icons.mjs +2 -2
  5. package/esm2022/constants/version.mjs +2 -2
  6. package/fesm2022/taiga-ui-cdk-constants.mjs +2 -2
  7. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/schematics/migration.json +3 -3
  10. package/schematics/ng-add/constants/modules.d.ts +0 -1
  11. package/schematics/ng-add/constants/modules.js +1 -11
  12. package/schematics/ng-add/constants/versions.d.ts +0 -1
  13. package/schematics/ng-add/constants/versions.js +1 -2
  14. package/schematics/ng-add/index.js +0 -6
  15. package/schematics/ng-add/schema.d.ts +0 -1
  16. package/schematics/ng-add/schema.json +0 -27
  17. package/schematics/ng-add/steps/add-taiga-modules.js +4 -19
  18. package/schematics/ng-update/interfaces/replacement-type.d.ts +1 -0
  19. package/schematics/ng-update/steps/rename-types.js +5 -5
  20. package/schematics/ng-update/v4/index.js +2 -0
  21. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +1 -1
  22. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +705 -6
  23. package/schematics/ng-update/v4/steps/constants/modules-to-remove.js +4 -0
  24. package/schematics/ng-update/v4/steps/constants/types.d.ts +2 -0
  25. package/schematics/ng-update/v4/steps/constants/types.js +11 -0
  26. package/schematics/ng-update/v4/steps/migrate-option-providers.js +4 -1
  27. package/schematics/ng-update/v4/steps/migrate-templates.js +2 -0
  28. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.d.ts +8 -0
  29. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +29 -0
  30. package/schematics/utils/templates/elements.d.ts +5 -0
  31. package/schematics/utils/templates/elements.js +11 -1
@@ -4,4 +4,4 @@
4
4
  *
5
5
  * Array of icons used in taiga-ui components
6
6
  */
7
- export declare const TUI_USED_ICONS: readonly ["@tui.mir", "@tui.visa", "@tui.electron", "@tui.mastercard", "@tui.maestro", "@tui.amex", "@tui.diners-club", "@tui.discover", "@tui.humo", "@tui.jcb", "@tui.ru-pay", "@tui.union-pay", "@tui.uzcard", "@tui.verve", "@tui.copy", "@tui.check", "@tui.link", "@tui.search", "@tui.sun", "@tui.moon", "@tui.code", "@tui.menu", "@tui.eye", "@tui.eye-off", "@tui.grip-vertical", "@tui.chevron-up", "@tui.chevron-down", "@tui.chevrons-up-down", "@tui.info", "@tui.circle-check", "@tui.circle-x", "@tui.circle-alert", "@tui.x", "@tui.circle-help", "@tui.chevron-right", "@tui.chevron-left", "@tui.calendar", "@tui.minus", "@tui.file", "@tui.trash", "@tui.star", "@tui.rotate-ccw-square", "@tui.arrow-left", "@tui.arrow-right", "@tui.plus", "@tui.minimize", "@tui.clock"];
7
+ export declare const TUI_USED_ICONS: readonly ["@tui.mir", "@tui.visa", "@tui.electron", "@tui.mastercard", "@tui.maestro", "@tui.amex", "@tui.diners-club", "@tui.discover", "@tui.humo", "@tui.jcb", "@tui.ru-pay", "@tui.union-pay", "@tui.uzcard", "@tui.verve", "@tui.copy", "@tui.check", "@tui.link", "@tui.search", "@tui.sun", "@tui.moon", "@tui.code", "@tui.menu", "@tui.eye", "@tui.eye-off", "@tui.grip-vertical", "@tui.chevron-up", "@tui.chevron-down", "@tui.chevrons-up-down", "@tui.info", "@tui.circle-check", "@tui.circle-x", "@tui.circle-alert", "@tui.circle-help", "@tui.x", "@tui.chevron-right", "@tui.chevron-left", "@tui.calendar", "@tui.minus", "@tui.file", "@tui.trash", "@tui.star", "@tui.rotate-ccw-square", "@tui.arrow-left", "@tui.arrow-right", "@tui.plus", "@tui.minimize", "@tui.clock"];
@@ -1 +1 @@
1
- export declare const TUI_VERSION = "4.0.0-rc.1";
1
+ export declare const TUI_VERSION = "4.0.0-rc.2";
@@ -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.0.0-rc.1';
4
+ exports.TUI_VERSION = '4.0.0-rc.2';
@@ -37,8 +37,8 @@ export const TUI_USED_ICONS = [
37
37
  '@tui.circle-check',
38
38
  '@tui.circle-x',
39
39
  '@tui.circle-alert',
40
- '@tui.x',
41
40
  '@tui.circle-help',
41
+ '@tui.x',
42
42
  '@tui.chevron-right',
43
43
  '@tui.chevron-left',
44
44
  '@tui.calendar',
@@ -53,4 +53,4 @@ export const TUI_USED_ICONS = [
53
53
  '@tui.minimize',
54
54
  '@tui.clock',
55
55
  ];
56
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlZC1pY29ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jb25zdGFudHMvdXNlZC1pY29ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRztJQUMxQixVQUFVO0lBQ1YsV0FBVztJQUNYLGVBQWU7SUFDZixpQkFBaUI7SUFDakIsY0FBYztJQUNkLFdBQVc7SUFDWCxrQkFBa0I7SUFDbEIsZUFBZTtJQUNmLFdBQVc7SUFDWCxVQUFVO0lBQ1YsYUFBYTtJQUNiLGdCQUFnQjtJQUNoQixhQUFhO0lBQ2IsWUFBWTtJQUNaLFdBQVc7SUFDWCxZQUFZO0lBQ1osV0FBVztJQUNYLGFBQWE7SUFDYixVQUFVO0lBQ1YsV0FBVztJQUNYLFdBQVc7SUFDWCxXQUFXO0lBQ1gsVUFBVTtJQUNWLGNBQWM7SUFDZCxvQkFBb0I7SUFDcEIsaUJBQWlCO0lBQ2pCLG1CQUFtQj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dXMnLFxuICAgICdAdHVpLm1pbmltaXplJyxcbiAgICAnQHR1aS5jbG9jaycsXG5dIGFzIGNvbnN0O1xuIl19
@@ -1,2 +1,2 @@
1
- export const TUI_VERSION = '4.0.0-rc.1';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jb25zdGFudHMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsWUFBWSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFRVSV9WRVJTSU9OID0gJzQuMC4wLXJjLjEnO1xuIl19
1
+ export const TUI_VERSION = '4.0.0-rc.2';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jb25zdGFudHMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsWUFBWSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFRVSV9WRVJTSU9OID0gJzQuMC4wLXJjLjInO1xuIl19
@@ -175,8 +175,8 @@ const TUI_USED_ICONS = [
175
175
  '@tui.circle-check',
176
176
  '@tui.circle-x',
177
177
  '@tui.circle-alert',
178
- '@tui.x',
179
178
  '@tui.circle-help',
179
+ '@tui.x',
180
180
  '@tui.chevron-right',
181
181
  '@tui.chevron-left',
182
182
  '@tui.calendar',
@@ -192,7 +192,7 @@ const TUI_USED_ICONS = [
192
192
  '@tui.clock',
193
193
  ];
194
194
 
195
- const TUI_VERSION = '4.0.0-rc.1';
195
+ const TUI_VERSION = '4.0.0-rc.2';
196
196
 
197
197
  /**
198
198
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../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 {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.copy',\n '@tui.check',\n '@tui.link',\n '@tui.search',\n '@tui.sun',\n '@tui.moon',\n '@tui.code',\n '@tui.menu',\n '@tui.eye',\n '@tui.eye-off',\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.x',\n '@tui.circle-help',\n '@tui.chevron-right',\n '@tui.chevron-left',\n '@tui.calendar',\n '@tui.minus',\n '@tui.file',\n '@tui.trash',\n '@tui.star',\n '@tui.rotate-ccw-square',\n '@tui.arrow-left',\n '@tui.arrow-right',\n '@tui.plus',\n '@tui.minimize',\n '@tui.clock',\n] as const;\n","export const TUI_VERSION = '4.0.0-rc.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA,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;;;;AAIG;AACU,MAAA,WAAW,GAAG,IAAI,SAAS,GAAQ;AACzC,MAAM,WAAW,GAAO,GAAG;MACrB,cAAc,GAA6B,MAAK,IAAI;AACpD,MAAA,iBAAiB,GAAY;AACtC,IAAA,GAAG,IAAI;AACP,IAAA,MAAM,EAAE,MAAM,IAAI;;;ACvBtB;;AAEG;AACH;MACa,iBAAiB,GAAG,MAAa,MAAM;AAEpD;;AAEG;AACH;MACa,gBAAgB,GAAG,MAAY;;ACR5C,SAAS,SAAS,CAAC,KAAc,EAAE,KAAc,EAAA;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AAC1F,CAAC;AAED;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAC/B,IAAO,EACP,MAAc,EACd,SAAA,GAAmC,MAAM,KAC/B,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM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X,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,aAAa;IACb,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;IACX,mBAAmB;IACnB,eAAe;IACf,mBAAmB;IACnB,QAAQ;IACR,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,WAAW;IACX,eAAe;IACf,YAAY;;;ACrDT,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../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 {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.copy',\n '@tui.check',\n '@tui.link',\n '@tui.search',\n '@tui.sun',\n '@tui.moon',\n '@tui.code',\n '@tui.menu',\n '@tui.eye',\n '@tui.eye-off',\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.chevron-left',\n '@tui.calendar',\n '@tui.minus',\n '@tui.file',\n '@tui.trash',\n '@tui.star',\n '@tui.rotate-ccw-square',\n '@tui.arrow-left',\n '@tui.arrow-right',\n '@tui.plus',\n '@tui.minimize',\n '@tui.clock',\n] as const;\n","export const TUI_VERSION = '4.0.0-rc.2';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA,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;;;;AAIG;AACU,MAAA,WAAW,GAAG,IAAI,SAAS,GAAQ;AACzC,MAAM,WAAW,GAAO,GAAG;MACrB,cAAc,GAA6B,MAAK,IAAI;AACpD,MAAA,iBAAiB,GAAY;AACtC,IAAA,GAAG,IAAI;AACP,IAAA,MAAM,EAAE,MAAM,IAAI;;;ACvBtB;;AAEG;AACH;MACa,iBAAiB,GAAG,MAAa,MAAM;AAEpD;;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C;;;;;;AAMG;AACI,MAAM,WAAW,GAAG,SAAS;AAEpC;;;;;AAKG;AACI,MAAM,UAAU,GAAG,SAAS;AAEnC;;AAEG;AACI,MAAM,SAAS,GAAG,SAAS;AAElC;;AAEG;AACI,MAAM,WAAW,GAAG,SAAS;AAEpC;;AAEG;AACI,MAAM,aAAa,GAAG,SAAS;AAEtC;;AAEG;AACI,MAAM,kBAAkB,GAAG,SAAS;AAE3C;;AAEG;AACI,MAAM,qBAAqB,GAAG;;ACzErC;;;;;AAKG;AACU,MAAA,cAAc,GAAG;IAC1B,UAAU;IACV,WAAW;IACX,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,aAAa;IACb,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;IACX,mBAAmB;IACnB,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;IACR,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,WAAW;IACX,eAAe;IACf,YAAY;;;ACrDT,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "4.0.0-rc.1",
3
+ "version": "4.0.0-rc.2",
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",
@@ -3,17 +3,17 @@
3
3
  "schematics": {
4
4
  "migrateCssVarsV4": {
5
5
  "description": "Migrate Taiga UI css variables",
6
- "version": "4.0.0",
6
+ "version": "4.0.0-rc.1",
7
7
  "factory": "./ng-update/v4/migrate-css-vars/index#migrateCssVars"
8
8
  },
9
9
  "migrateIconsV4": {
10
10
  "description": "Migrate Taiga UI icons to a new format",
11
- "version": "4.0.0",
11
+ "version": "4.0.0-rc.1",
12
12
  "factory": "./ng-update/v4/migrate-icons/index#migrateIcons"
13
13
  },
14
14
  "updateToV4": {
15
15
  "description": "Updates Taiga UI packages to v4",
16
- "version": "4.0.0",
16
+ "version": "4.0.0-rc.1",
17
17
  "factory": "./ng-update/v4/index#updateToV4"
18
18
  }
19
19
  }
@@ -7,4 +7,3 @@ export declare const BROWSER_ANIMATION_MODULE: {
7
7
  name: string;
8
8
  packageName: string;
9
9
  };
10
- export declare const SANITIZER_MODULES: readonly ImportingModule[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SANITIZER_MODULES = exports.BROWSER_ANIMATION_MODULE = exports.MAIN_MODULE = void 0;
3
+ exports.BROWSER_ANIMATION_MODULE = exports.MAIN_MODULE = void 0;
4
4
  exports.MAIN_MODULE = {
5
5
  name: 'TuiRoot',
6
6
  packageName: '@taiga-ui/core',
@@ -9,13 +9,3 @@ exports.BROWSER_ANIMATION_MODULE = {
9
9
  name: 'BrowserAnimationsModule',
10
10
  packageName: '@angular/platform-browser/animations',
11
11
  };
12
- exports.SANITIZER_MODULES = [
13
- {
14
- name: 'TUI_SANITIZER',
15
- packageName: '@taiga-ui/core',
16
- },
17
- {
18
- name: 'NgDompurifySanitizer',
19
- packageName: '@taiga-ui/dompurify',
20
- },
21
- ];
@@ -1,2 +1 @@
1
1
  export declare const TAIGA_VERSION: string;
2
- export declare const NG_DOMPURIFY_VERSION = "^4.1.0";
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NG_DOMPURIFY_VERSION = exports.TAIGA_VERSION = void 0;
3
+ exports.TAIGA_VERSION = void 0;
4
4
  const version_1 = require("../../../constants/version");
5
5
  exports.TAIGA_VERSION = `^${version_1.TUI_VERSION}`;
6
- exports.NG_DOMPURIFY_VERSION = '^4.1.0';
@@ -20,12 +20,6 @@ function addDependencies(tree, options) {
20
20
  version: versions_1.TAIGA_VERSION,
21
21
  });
22
22
  }
23
- if (options.addSanitizer) {
24
- (0, ng_morph_1.addPackageJsonDependency)(tree, {
25
- name: '@taiga-ui/dompurify',
26
- version: versions_1.NG_DOMPURIFY_VERSION,
27
- });
28
- }
29
23
  if (packages.includes('addon-table') || packages.includes('addon-mobile')) {
30
24
  addAngularCdkDep(tree);
31
25
  }
@@ -1,6 +1,5 @@
1
1
  export interface TuiSchema {
2
2
  readonly addGlobalStyles: boolean;
3
- readonly addSanitizer: boolean;
4
3
  readonly addons: readonly string[];
5
4
  readonly project: string;
6
5
  /**
@@ -20,33 +20,6 @@
20
20
  "type": "confirmation"
21
21
  }
22
22
  },
23
- "addDialogsModule": {
24
- "description": "Setting up dialog module",
25
- "type": "boolean",
26
- "default": true,
27
- "x-prompt": {
28
- "message": "Do you want to use Taiga UI dialogs?",
29
- "type": "confirmation"
30
- }
31
- },
32
- "addSanitizer": {
33
- "description": "Setting up TUI_SANITIZER",
34
- "type": "boolean",
35
- "default": true,
36
- "x-prompt": {
37
- "message": "Do you plan on using custom SVGs/icons or TUI editor? If `Yes` we will include ng-dompurify as sanitizer, read more: https://taiga-ui.dev/icons/bundled#sanitizer",
38
- "type": "confirmation"
39
- }
40
- },
41
- "addAlertModule": {
42
- "description": "Setting up alerts module",
43
- "type": "boolean",
44
- "default": true,
45
- "x-prompt": {
46
- "message": "Do you want to use Taiga UI alerts?",
47
- "type": "confirmation"
48
- }
49
- },
50
23
  "addons": {
51
24
  "description": "Setting up additional packages",
52
25
  "type": "array",
@@ -21,21 +21,6 @@ function addTuiModules({ mainClass, context, }) {
21
21
  });
22
22
  context.logger.info(`${modules.map(module => module.name)} was added to ${mainModulePath}`);
23
23
  }
24
- function addExtraTuiProvidersToRootComponent({ mainClass, options, standalone = false, }) {
25
- if (!options.addSanitizer) {
26
- return;
27
- }
28
- const provider = '{provide: TUI_SANITIZER, useClass: NgDompurifySanitizer}';
29
- if (standalone) {
30
- (0, ng_morph_1.addProviderToComponent)(mainClass, provider, { unique: true });
31
- }
32
- else {
33
- (0, ng_morph_1.addProviderToNgModule)(mainClass, provider, { unique: true });
34
- }
35
- modules_1.SANITIZER_MODULES.forEach(module => {
36
- (0, add_unique_import_1.addUniqueImport)(mainClass.getSourceFile().getFilePath(), module.name, module.packageName);
37
- });
38
- }
39
24
  function addTuiEntitiesToStandalone({ bootstrapFunction, options, context, }) {
40
25
  const [rootComponentIdentifier, bootstrapOptions = bootstrapFunction.addArgument('{providers}: []'),] = bootstrapFunction.getArguments();
41
26
  const mainClass = (0, get_component_from_identifier_1.getComponentFromIdentifier)(rootComponentIdentifier);
@@ -43,7 +28,6 @@ function addTuiEntitiesToStandalone({ bootstrapFunction, options, context, }) {
43
28
  if (mainClass) {
44
29
  addMainModuleToRootComponent({ mainClass, options, context });
45
30
  addRootTuiProvidersToBootstrapFn(optionsObject);
46
- addExtraTuiProvidersToRootComponent({ mainClass, options, standalone: true });
47
31
  }
48
32
  }
49
33
  function addRootTuiProvidersToBootstrapFn(bootstrapOptions) {
@@ -54,8 +38,9 @@ function addRootTuiProvidersToBootstrapFn(bootstrapOptions) {
54
38
  .find(el => ng_morph_1.Node.isCallExpression(el) &&
55
39
  el.getExpression().getText() === 'provideAnimations');
56
40
  (0, push_to_array_property_1.pushToObjectArrayProperty)(bootstrapOptions, 'providers', 'NG_EVENT_PLUGINS');
41
+ const modules = [];
57
42
  if (!provideAnimations) {
58
- [modules_1.MAIN_MODULE].push({
43
+ modules.push({
59
44
  name: 'provideAnimations',
60
45
  packageName: '@angular/platform-browser/animations',
61
46
  });
@@ -63,7 +48,8 @@ function addRootTuiProvidersToBootstrapFn(bootstrapOptions) {
63
48
  index: 0,
64
49
  });
65
50
  }
66
- [{ name: 'NG_EVENT_PLUGINS', packageName: '@taiga-ui/event-plugins' }].forEach(({ name, packageName }) => {
51
+ modules.push({ name: 'NG_EVENT_PLUGINS', packageName: '@taiga-ui/event-plugins' });
52
+ modules.forEach(({ name, packageName }) => {
67
53
  (0, add_unique_import_1.addUniqueImport)(bootstrapOptions.getSourceFile().getFilePath(), name, packageName);
68
54
  });
69
55
  }
@@ -112,7 +98,6 @@ function addTaigaModules(options) {
112
98
  else {
113
99
  const mainClass = (0, ng_morph_1.getMainModule)(mainFilePath);
114
100
  addTuiModules({ mainClass, options, context });
115
- addExtraTuiProvidersToRootComponent({ mainClass, options });
116
101
  }
117
102
  (0, ng_morph_1.saveActiveProject)();
118
103
  });
@@ -3,4 +3,5 @@ export interface ReplacementType {
3
3
  readonly moduleSpecifier?: string[] | string;
4
4
  readonly preserveGenerics?: boolean;
5
5
  readonly to?: string;
6
+ readonly removeImport?: boolean;
6
7
  }
@@ -5,7 +5,7 @@ const ng_morph_1 = require("ng-morph");
5
5
  const colored_log_1 = require("../../utils/colored-log");
6
6
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
7
7
  const import_manipulations_1 = require("../../utils/import-manipulations");
8
- function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
8
+ function renameType(from, to, moduleSpecifier, preserveGenerics = false, removeImport = false) {
9
9
  const references = (0, get_named_import_references_1.getNamedImportReferences)(from, moduleSpecifier);
10
10
  references.forEach(ref => {
11
11
  if (ref.wasForgotten()) {
@@ -13,7 +13,7 @@ function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
13
13
  }
14
14
  const parent = ref.getParent();
15
15
  if (ng_morph_1.Node.isImportSpecifier(parent)) {
16
- processImport(parent, from, to);
16
+ processImport(parent, from, to, removeImport);
17
17
  }
18
18
  else if (ng_morph_1.Node.isTypeReference(parent)) {
19
19
  const targetType = preserveGenerics && to ? addGeneric(to, parent.getTypeArguments()) : to;
@@ -21,10 +21,10 @@ function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
21
21
  }
22
22
  });
23
23
  }
24
- function processImport(node, from, to) {
24
+ function processImport(node, from, to, remove) {
25
25
  const filePath = node.getSourceFile().getFilePath();
26
26
  const targetImportAlreadyExists = Boolean((0, ng_morph_1.getImports)(filePath, { namedImports: to }).length);
27
- if (to && !targetImportAlreadyExists) {
27
+ if (to && !targetImportAlreadyExists && !remove) {
28
28
  (0, import_manipulations_1.renameImport)(node, removeGeneric(to), removeGeneric(from));
29
29
  }
30
30
  else {
@@ -42,7 +42,7 @@ function addGeneric(typeName, generics) {
42
42
  function renameTypes(options, types) {
43
43
  !options['skip-logs'] &&
44
44
  (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming types...`);
45
- types.forEach(({ from, to, moduleSpecifier, preserveGenerics }) => renameType(from, to, moduleSpecifier, preserveGenerics));
45
+ types.forEach(({ from, to, moduleSpecifier, preserveGenerics, removeImport }) => renameType(from, to, moduleSpecifier, preserveGenerics, removeImport));
46
46
  !options['skip-logs'] &&
47
47
  (0, colored_log_1.successLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} types renamed \n`);
48
48
  }
@@ -13,6 +13,7 @@ const get_file_system_1 = require("../utils/get-file-system");
13
13
  const enums_1 = require("../v4/steps/constants/enums");
14
14
  const steps_2 = require("./steps");
15
15
  const constants_1 = require("./steps/constants");
16
+ const types_1 = require("./steps/constants/types");
16
17
  const migrate_option_providers_1 = require("./steps/migrate-option-providers");
17
18
  const migrate_proprietary_1 = require("./steps/migrate-proprietary");
18
19
  const migrate_styles_1 = require("./steps/migrate-styles");
@@ -21,6 +22,7 @@ function main(options) {
21
22
  const fileSystem = (0, get_file_system_1.getFileSystem)(tree);
22
23
  (0, steps_1.replaceIdentifiers)(options, constants_1.IDENTIFIERS_TO_REPLACE);
23
24
  (0, steps_1.removeModules)(options, constants_1.MODULES_TO_REMOVE);
25
+ (0, steps_1.renameTypes)(options, types_1.TYPES_TO_RENAME);
24
26
  (0, steps_2.restoreTuiMapper)(options);
25
27
  (0, steps_2.restoreTuiMatcher)(options);
26
28
  (0, steps_2.migrateLegacyMask)(options);
@@ -54,7 +54,7 @@ exports.ATTRS_TO_DIRECTIVE_REPLACE = [
54
54
  inputProperty: 'showLoader',
55
55
  directive: 'loading',
56
56
  directiveModule: {
57
- name: 'TuiButtonLoadingComponent',
57
+ name: 'TuiButtonLoading',
58
58
  moduleSpecifier: '@taiga-ui/kit',
59
59
  },
60
60
  filterFn: el => (0, elements_1.hasElementAttribute)(el, 'tuiButton'),
@@ -369,7 +369,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
369
369
  },
370
370
  {
371
371
  from: { name: 'TuiSwipeActionsModule', moduleSpecifier: '@taiga-ui/experimental' },
372
- to: { name: 'TuiSwipeActionsComponent', moduleSpecifier: '@taiga-ui/addon-mobile' },
372
+ to: [
373
+ { name: 'TuiSwipeActions', moduleSpecifier: '@taiga-ui/addon-mobile' },
374
+ { name: 'TuiSwipeActionsAutoClose', moduleSpecifier: '@taiga-ui/addon-mobile' },
375
+ ],
373
376
  },
374
377
  {
375
378
  from: { name: 'TuiRadioModule', moduleSpecifier: '@taiga-ui/experimental' },
@@ -383,9 +386,13 @@ exports.IDENTIFIERS_TO_REPLACE = [
383
386
  from: { name: 'TuiToggleModule', moduleSpecifier: '@taiga-ui/experimental' },
384
387
  to: { name: 'TuiSwitch', moduleSpecifier: '@taiga-ui/kit' },
385
388
  },
389
+ {
390
+ from: { name: 'TuiToggleModule', moduleSpecifier: '@taiga-ui/kit' },
391
+ to: { name: 'TuiSwitch', moduleSpecifier: '@taiga-ui/kit' },
392
+ },
386
393
  {
387
394
  from: { name: 'TuiTextAreaModule', moduleSpecifier: '@taiga-ui/kit' },
388
- to: { name: 'TuiTextareaModule', moduleSpecifier: '@taiga-ui/kit' },
395
+ to: { name: 'TuiTextareaModule', moduleSpecifier: '@taiga-ui/legacy' },
389
396
  },
390
397
  {
391
398
  from: { name: 'TuiTextAreaDirective', moduleSpecifier: '@taiga-ui/kit' },
@@ -452,6 +459,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
452
459
  from: { name: 'TUI_SCROLL_REF', moduleSpecifier: '@taiga-ui/cdk' },
453
460
  to: { name: 'TUI_SCROLL_REF', moduleSpecifier: '@taiga-ui/core' },
454
461
  },
462
+ {
463
+ from: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/cdk' },
464
+ to: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/legacy' },
465
+ },
455
466
  {
456
467
  from: { name: 'TuiScrollbarModule', moduleSpecifier: '@taiga-ui/core' },
457
468
  to: { name: 'TuiScrollbarComponent', moduleSpecifier: '@taiga-ui/core' },
@@ -590,6 +601,10 @@ exports.IDENTIFIERS_TO_REPLACE = [
590
601
  from: { name: 'TuiHeaderModule', moduleSpecifier: '@taiga-ui/experimental' },
591
602
  to: { name: 'TuiHeader', moduleSpecifier: '@taiga-ui/layout' },
592
603
  },
604
+ {
605
+ from: { name: 'TuiBlockDetailsModule', moduleSpecifier: '@taiga-ui/layout' },
606
+ to: { name: 'TuiBlockDetails', moduleSpecifier: '@taiga-ui/layout' },
607
+ },
593
608
  {
594
609
  from: { name: 'TuiPinModule', moduleSpecifier: '@taiga-ui/experimental' },
595
610
  to: { name: 'TuiPinComponent', moduleSpecifier: '@taiga-ui/kit' },
@@ -616,7 +631,7 @@ exports.IDENTIFIERS_TO_REPLACE = [
616
631
  },
617
632
  {
618
633
  from: { name: 'TuiSvgModule', moduleSpecifier: '@taiga-ui/core' },
619
- to: { name: 'TuiSvgComponent', moduleSpecifier: '@taiga-ui/core' },
634
+ to: { name: 'TuiSvgComponent', moduleSpecifier: '@taiga-ui/legacy' },
620
635
  },
621
636
  {
622
637
  from: { name: 'TuiRootModule', moduleSpecifier: '@taiga-ui/core' },
@@ -671,17 +686,31 @@ exports.IDENTIFIERS_TO_REPLACE = [
671
686
  to: { name: 'TuiInteractiveState', moduleSpecifier: '@taiga-ui/core' },
672
687
  },
673
688
  {
674
- from: { name: 'TuiButtonModule', moduleSpecifier: '@taiga-ui/kit' },
689
+ from: { name: 'TuiButtonModule', moduleSpecifier: '@taiga-ui/core' },
675
690
  to: {
676
691
  name: 'TuiButton',
677
- moduleSpecifier: '@taiga-ui/kit',
692
+ moduleSpecifier: '@taiga-ui/core',
693
+ },
694
+ },
695
+ {
696
+ from: { name: 'TuiDialogModule', moduleSpecifier: '@taiga-ui/core' },
697
+ to: {
698
+ name: 'TuiDialog',
699
+ moduleSpecifier: '@taiga-ui/core',
700
+ },
701
+ },
702
+ {
703
+ from: { name: 'TuiAlertModule', moduleSpecifier: '@taiga-ui/core' },
704
+ to: {
705
+ name: 'TuiAlert',
706
+ moduleSpecifier: '@taiga-ui/core',
678
707
  },
679
708
  },
680
709
  {
681
710
  from: { name: 'TuiButtonModule', moduleSpecifier: '@taiga-ui/experimental' },
682
711
  to: {
683
712
  name: 'TuiButton',
684
- moduleSpecifier: '@taiga-ui/kit',
713
+ moduleSpecifier: '@taiga-ui/core',
685
714
  },
686
715
  },
687
716
  {
@@ -1136,6 +1165,26 @@ exports.IDENTIFIERS_TO_REPLACE = [
1136
1165
  moduleSpecifier: '@taiga-ui/layout',
1137
1166
  },
1138
1167
  },
1168
+ {
1169
+ from: {
1170
+ name: 'TuiAppearanceModule',
1171
+ moduleSpecifier: '@taiga-ui/experimental',
1172
+ },
1173
+ to: {
1174
+ name: 'TuiAppearance',
1175
+ moduleSpecifier: '@taiga-ui/core',
1176
+ },
1177
+ },
1178
+ {
1179
+ from: {
1180
+ name: 'TuiButtonCloseModule',
1181
+ moduleSpecifier: '@taiga-ui/experimental',
1182
+ },
1183
+ to: {
1184
+ name: 'TuiButtonClose',
1185
+ moduleSpecifier: '@taiga-ui/kit',
1186
+ },
1187
+ },
1139
1188
  {
1140
1189
  from: {
1141
1190
  name: 'TuiPreviewModule',
@@ -1524,4 +1573,654 @@ exports.IDENTIFIERS_TO_REPLACE = [
1524
1573
  moduleSpecifier: '@taiga-ui/core',
1525
1574
  },
1526
1575
  },
1576
+ {
1577
+ from: {
1578
+ name: 'TUI_ARROW_OPTIONS',
1579
+ moduleSpecifier: '@taiga-ui/kit',
1580
+ },
1581
+ to: {
1582
+ name: 'TUI_ARROW_OPTIONS',
1583
+ moduleSpecifier: '@taiga-ui/legacy',
1584
+ },
1585
+ },
1586
+ {
1587
+ from: {
1588
+ name: 'tuiArrowOptionsProvider',
1589
+ moduleSpecifier: '@taiga-ui/kit',
1590
+ },
1591
+ to: {
1592
+ name: 'tuiArrowOptionsProvider',
1593
+ moduleSpecifier: '@taiga-ui/legacy',
1594
+ },
1595
+ },
1596
+ {
1597
+ from: {
1598
+ name: 'TuiArrowOptions',
1599
+ moduleSpecifier: '@taiga-ui/kit',
1600
+ },
1601
+ to: {
1602
+ name: 'TuiArrowOptions',
1603
+ moduleSpecifier: '@taiga-ui/legacy',
1604
+ },
1605
+ },
1606
+ {
1607
+ from: {
1608
+ name: 'TuiComboBoxModule',
1609
+ moduleSpecifier: '@taiga-ui/kit',
1610
+ },
1611
+ to: {
1612
+ name: 'TuiComboBoxModule',
1613
+ moduleSpecifier: '@taiga-ui/legacy',
1614
+ },
1615
+ },
1616
+ {
1617
+ from: {
1618
+ name: 'TuiInputModule',
1619
+ moduleSpecifier: '@taiga-ui/kit',
1620
+ },
1621
+ to: {
1622
+ name: 'TuiInputModule',
1623
+ moduleSpecifier: '@taiga-ui/legacy',
1624
+ },
1625
+ },
1626
+ {
1627
+ from: {
1628
+ name: 'TuiInputCopyModule',
1629
+ moduleSpecifier: '@taiga-ui/kit',
1630
+ },
1631
+ to: {
1632
+ name: 'TuiInputCopyModule',
1633
+ moduleSpecifier: '@taiga-ui/legacy',
1634
+ },
1635
+ },
1636
+ {
1637
+ from: {
1638
+ name: 'TuiInputCopyOptions',
1639
+ moduleSpecifier: '@taiga-ui/kit',
1640
+ },
1641
+ to: {
1642
+ name: 'TuiInputCopyOptions',
1643
+ moduleSpecifier: '@taiga-ui/legacy',
1644
+ },
1645
+ },
1646
+ {
1647
+ from: {
1648
+ name: 'TUI_INPUT_COPY_DEFAULT_OPTIONS',
1649
+ moduleSpecifier: '@taiga-ui/kit',
1650
+ },
1651
+ to: {
1652
+ name: 'TUI_INPUT_COPY_DEFAULT_OPTIONS',
1653
+ moduleSpecifier: '@taiga-ui/legacy',
1654
+ },
1655
+ },
1656
+ {
1657
+ from: {
1658
+ name: 'TUI_INPUT_COPY_OPTIONS',
1659
+ moduleSpecifier: '@taiga-ui/kit',
1660
+ },
1661
+ to: {
1662
+ name: 'TUI_INPUT_COPY_OPTIONS',
1663
+ moduleSpecifier: '@taiga-ui/legacy',
1664
+ },
1665
+ },
1666
+ {
1667
+ from: {
1668
+ name: 'tuiInputCopyOptionsProvider',
1669
+ moduleSpecifier: '@taiga-ui/kit',
1670
+ },
1671
+ to: {
1672
+ name: 'tuiInputCopyOptionsProvider',
1673
+ moduleSpecifier: '@taiga-ui/legacy',
1674
+ },
1675
+ },
1676
+ {
1677
+ from: {
1678
+ name: 'TuiInputDateModule',
1679
+ moduleSpecifier: '@taiga-ui/kit',
1680
+ },
1681
+ to: {
1682
+ name: 'TuiInputDateModule',
1683
+ moduleSpecifier: '@taiga-ui/legacy',
1684
+ },
1685
+ },
1686
+ {
1687
+ from: {
1688
+ name: 'TuiInputDateMultiModule',
1689
+ moduleSpecifier: '@taiga-ui/kit',
1690
+ },
1691
+ to: {
1692
+ name: 'TuiInputDateMultiModule',
1693
+ moduleSpecifier: '@taiga-ui/legacy',
1694
+ },
1695
+ },
1696
+ {
1697
+ from: {
1698
+ name: 'TuiInputDateMultiModule',
1699
+ moduleSpecifier: '@taiga-ui/kit',
1700
+ },
1701
+ to: {
1702
+ name: 'TuiInputDateMultiModule',
1703
+ moduleSpecifier: '@taiga-ui/legacy',
1704
+ },
1705
+ },
1706
+ {
1707
+ from: {
1708
+ name: 'TuiInputDateRangeModule',
1709
+ moduleSpecifier: '@taiga-ui/kit',
1710
+ },
1711
+ to: {
1712
+ name: 'TuiInputDateRangeModule',
1713
+ moduleSpecifier: '@taiga-ui/legacy',
1714
+ },
1715
+ },
1716
+ {
1717
+ from: {
1718
+ name: 'TuiInputDateTimeModule',
1719
+ moduleSpecifier: '@taiga-ui/kit',
1720
+ },
1721
+ to: {
1722
+ name: 'TuiInputDateTimeModule',
1723
+ moduleSpecifier: '@taiga-ui/legacy',
1724
+ },
1725
+ },
1726
+ {
1727
+ from: {
1728
+ name: 'TuiInputMonthModule',
1729
+ moduleSpecifier: '@taiga-ui/kit',
1730
+ },
1731
+ to: {
1732
+ name: 'TuiInputMonthModule',
1733
+ moduleSpecifier: '@taiga-ui/legacy',
1734
+ },
1735
+ },
1736
+ {
1737
+ from: {
1738
+ name: 'TuiInputMonthRangeModule',
1739
+ moduleSpecifier: '@taiga-ui/kit',
1740
+ },
1741
+ to: {
1742
+ name: 'TuiInputMonthRangeModule',
1743
+ moduleSpecifier: '@taiga-ui/legacy',
1744
+ },
1745
+ },
1746
+ {
1747
+ from: {
1748
+ name: 'TuiInputNumberModule',
1749
+ moduleSpecifier: '@taiga-ui/kit',
1750
+ },
1751
+ to: {
1752
+ name: 'TuiInputNumberModule',
1753
+ moduleSpecifier: '@taiga-ui/legacy',
1754
+ },
1755
+ },
1756
+ {
1757
+ from: {
1758
+ name: 'TuiInputNumberOptions',
1759
+ moduleSpecifier: '@taiga-ui/kit',
1760
+ },
1761
+ to: {
1762
+ name: 'TuiInputNumberOptions',
1763
+ moduleSpecifier: '@taiga-ui/legacy',
1764
+ },
1765
+ },
1766
+ {
1767
+ from: {
1768
+ name: 'TUI_INPUT_NUMBER_DEFAULT_OPTIONS',
1769
+ moduleSpecifier: '@taiga-ui/kit',
1770
+ },
1771
+ to: {
1772
+ name: 'TUI_INPUT_NUMBER_DEFAULT_OPTIONS',
1773
+ moduleSpecifier: '@taiga-ui/legacy',
1774
+ },
1775
+ },
1776
+ {
1777
+ from: {
1778
+ name: 'TUI_INPUT_NUMBER_OPTIONS',
1779
+ moduleSpecifier: '@taiga-ui/kit',
1780
+ },
1781
+ to: {
1782
+ name: 'TUI_INPUT_NUMBER_OPTIONS',
1783
+ moduleSpecifier: '@taiga-ui/legacy',
1784
+ },
1785
+ },
1786
+ {
1787
+ from: {
1788
+ name: 'tuiInputNumberOptionsProvider',
1789
+ moduleSpecifier: '@taiga-ui/kit',
1790
+ },
1791
+ to: {
1792
+ name: 'tuiInputNumberOptionsProvider',
1793
+ moduleSpecifier: '@taiga-ui/legacy',
1794
+ },
1795
+ },
1796
+ {
1797
+ from: {
1798
+ name: 'TuiInputPasswordModule',
1799
+ moduleSpecifier: '@taiga-ui/kit',
1800
+ },
1801
+ to: {
1802
+ name: 'TuiInputPasswordModule',
1803
+ moduleSpecifier: '@taiga-ui/legacy',
1804
+ },
1805
+ },
1806
+ {
1807
+ from: {
1808
+ name: 'TuiInputPasswordOptions',
1809
+ moduleSpecifier: '@taiga-ui/kit',
1810
+ },
1811
+ to: {
1812
+ name: 'TuiInputPasswordOptions',
1813
+ moduleSpecifier: '@taiga-ui/legacy',
1814
+ },
1815
+ },
1816
+ {
1817
+ from: {
1818
+ name: 'TUI_INPUT_PASSWORD_DEFAULT_OPTIONS',
1819
+ moduleSpecifier: '@taiga-ui/kit',
1820
+ },
1821
+ to: {
1822
+ name: 'TUI_INPUT_PASSWORD_DEFAULT_OPTIONS',
1823
+ moduleSpecifier: '@taiga-ui/legacy',
1824
+ },
1825
+ },
1826
+ {
1827
+ from: {
1828
+ name: 'TUI_INPUT_PASSWORD_OPTIONS',
1829
+ moduleSpecifier: '@taiga-ui/kit',
1830
+ },
1831
+ to: {
1832
+ name: 'TUI_INPUT_PASSWORD_OPTIONS',
1833
+ moduleSpecifier: '@taiga-ui/legacy',
1834
+ },
1835
+ },
1836
+ {
1837
+ from: {
1838
+ name: 'tuiInputPasswordOptionsProvider',
1839
+ moduleSpecifier: '@taiga-ui/kit',
1840
+ },
1841
+ to: {
1842
+ name: 'tuiInputPasswordOptionsProvider',
1843
+ moduleSpecifier: '@taiga-ui/legacy',
1844
+ },
1845
+ },
1846
+ {
1847
+ from: {
1848
+ name: 'TuiInputPhoneModule',
1849
+ moduleSpecifier: '@taiga-ui/kit',
1850
+ },
1851
+ to: {
1852
+ name: 'TuiInputPhoneModule',
1853
+ moduleSpecifier: '@taiga-ui/legacy',
1854
+ },
1855
+ },
1856
+ {
1857
+ from: {
1858
+ name: 'TuiInputPhoneOptions',
1859
+ moduleSpecifier: '@taiga-ui/kit',
1860
+ },
1861
+ to: {
1862
+ name: 'TuiInputPhoneOptions',
1863
+ moduleSpecifier: '@taiga-ui/legacy',
1864
+ },
1865
+ },
1866
+ {
1867
+ from: {
1868
+ name: 'TUI_INPUT_PHONE_DEFAULT_OPTIONS',
1869
+ moduleSpecifier: '@taiga-ui/kit',
1870
+ },
1871
+ to: {
1872
+ name: 'TUI_INPUT_PHONE_DEFAULT_OPTIONS',
1873
+ moduleSpecifier: '@taiga-ui/legacy',
1874
+ },
1875
+ },
1876
+ {
1877
+ from: {
1878
+ name: 'TUI_INPUT_PHONE_OPTIONS',
1879
+ moduleSpecifier: '@taiga-ui/kit',
1880
+ },
1881
+ to: {
1882
+ name: 'TUI_INPUT_PHONE_OPTIONS',
1883
+ moduleSpecifier: '@taiga-ui/legacy',
1884
+ },
1885
+ },
1886
+ {
1887
+ from: {
1888
+ name: 'tuiInputPhoneOptionsProvider',
1889
+ moduleSpecifier: '@taiga-ui/kit',
1890
+ },
1891
+ to: {
1892
+ name: 'tuiInputPhoneOptionsProvider',
1893
+ moduleSpecifier: '@taiga-ui/legacy',
1894
+ },
1895
+ },
1896
+ {
1897
+ from: {
1898
+ name: 'TuiInputPhoneInternationalModule',
1899
+ moduleSpecifier: '@taiga-ui/kit',
1900
+ },
1901
+ to: {
1902
+ name: 'TuiInputPhoneInternationalComponent',
1903
+ moduleSpecifier: '@taiga-ui/legacy',
1904
+ },
1905
+ },
1906
+ {
1907
+ from: {
1908
+ name: 'TuiInputPhoneInternationalOptions',
1909
+ moduleSpecifier: '@taiga-ui/kit',
1910
+ },
1911
+ to: {
1912
+ name: 'TuiInputPhoneInternationalOptions',
1913
+ moduleSpecifier: '@taiga-ui/legacy',
1914
+ },
1915
+ },
1916
+ {
1917
+ from: {
1918
+ name: 'TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS',
1919
+ moduleSpecifier: '@taiga-ui/kit',
1920
+ },
1921
+ to: {
1922
+ name: 'TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS',
1923
+ moduleSpecifier: '@taiga-ui/legacy',
1924
+ },
1925
+ },
1926
+ {
1927
+ from: {
1928
+ name: 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS',
1929
+ moduleSpecifier: '@taiga-ui/kit',
1930
+ },
1931
+ to: {
1932
+ name: 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS',
1933
+ moduleSpecifier: '@taiga-ui/legacy',
1934
+ },
1935
+ },
1936
+ {
1937
+ from: {
1938
+ name: 'tuiInputPhoneInternationalOptionsProvider',
1939
+ moduleSpecifier: '@taiga-ui/kit',
1940
+ },
1941
+ to: {
1942
+ name: 'tuiInputPhoneInternationalOptionsProvider',
1943
+ moduleSpecifier: '@taiga-ui/legacy',
1944
+ },
1945
+ },
1946
+ {
1947
+ from: {
1948
+ name: 'TuiInputRangeModule',
1949
+ moduleSpecifier: '@taiga-ui/kit',
1950
+ },
1951
+ to: {
1952
+ name: 'TuiInputRangeModule',
1953
+ moduleSpecifier: '@taiga-ui/legacy',
1954
+ },
1955
+ },
1956
+ {
1957
+ from: {
1958
+ name: 'TuiInputSliderModule',
1959
+ moduleSpecifier: '@taiga-ui/kit',
1960
+ },
1961
+ to: {
1962
+ name: 'TuiInputSliderModule',
1963
+ moduleSpecifier: '@taiga-ui/legacy',
1964
+ },
1965
+ },
1966
+ {
1967
+ from: {
1968
+ name: 'TuiInputTagModule',
1969
+ moduleSpecifier: '@taiga-ui/kit',
1970
+ },
1971
+ to: {
1972
+ name: 'TuiInputTagModule',
1973
+ moduleSpecifier: '@taiga-ui/legacy',
1974
+ },
1975
+ },
1976
+ {
1977
+ from: {
1978
+ name: 'TuiInputTagOptions',
1979
+ moduleSpecifier: '@taiga-ui/kit',
1980
+ },
1981
+ to: {
1982
+ name: 'TuiInputTagOptions',
1983
+ moduleSpecifier: '@taiga-ui/legacy',
1984
+ },
1985
+ },
1986
+ {
1987
+ from: {
1988
+ name: 'TUI_INPUT_TAG_DEFAULT_OPTIONS',
1989
+ moduleSpecifier: '@taiga-ui/kit',
1990
+ },
1991
+ to: {
1992
+ name: 'TUI_INPUT_TAG_DEFAULT_OPTIONS',
1993
+ moduleSpecifier: '@taiga-ui/legacy',
1994
+ },
1995
+ },
1996
+ {
1997
+ from: {
1998
+ name: 'TUI_INPUT_TAG_OPTIONS',
1999
+ moduleSpecifier: '@taiga-ui/kit',
2000
+ },
2001
+ to: {
2002
+ name: 'TUI_INPUT_TAG_OPTIONS',
2003
+ moduleSpecifier: '@taiga-ui/legacy',
2004
+ },
2005
+ },
2006
+ {
2007
+ from: {
2008
+ name: 'tuiInputTagOptionsProvider',
2009
+ moduleSpecifier: '@taiga-ui/kit',
2010
+ },
2011
+ to: {
2012
+ name: 'tuiInputTagOptionsProvider',
2013
+ moduleSpecifier: '@taiga-ui/legacy',
2014
+ },
2015
+ },
2016
+ {
2017
+ from: {
2018
+ name: 'TuiInputTimeModule',
2019
+ moduleSpecifier: '@taiga-ui/kit',
2020
+ },
2021
+ to: {
2022
+ name: 'TuiInputTimeModule',
2023
+ moduleSpecifier: '@taiga-ui/legacy',
2024
+ },
2025
+ },
2026
+ {
2027
+ from: {
2028
+ name: 'TuiInputTimeOptions',
2029
+ moduleSpecifier: '@taiga-ui/kit',
2030
+ },
2031
+ to: {
2032
+ name: 'TuiInputTimeOptions',
2033
+ moduleSpecifier: '@taiga-ui/legacy',
2034
+ },
2035
+ },
2036
+ {
2037
+ from: {
2038
+ name: 'TuiTimeFormatParts',
2039
+ moduleSpecifier: '@taiga-ui/kit',
2040
+ },
2041
+ to: {
2042
+ name: 'TuiTimeFormatParts',
2043
+ moduleSpecifier: '@taiga-ui/legacy',
2044
+ },
2045
+ },
2046
+ {
2047
+ from: {
2048
+ name: 'MAX_TIME_VALUES',
2049
+ moduleSpecifier: '@taiga-ui/kit',
2050
+ },
2051
+ to: {
2052
+ name: 'MAX_TIME_VALUES',
2053
+ moduleSpecifier: '@taiga-ui/legacy',
2054
+ },
2055
+ },
2056
+ {
2057
+ from: {
2058
+ name: 'TUI_INPUT_TIME_DEFAULT_OPTIONS',
2059
+ moduleSpecifier: '@taiga-ui/kit',
2060
+ },
2061
+ to: {
2062
+ name: 'TUI_INPUT_TIME_DEFAULT_OPTIONS',
2063
+ moduleSpecifier: '@taiga-ui/legacy',
2064
+ },
2065
+ },
2066
+ {
2067
+ from: {
2068
+ name: 'TUI_INPUT_TIME_OPTIONS',
2069
+ moduleSpecifier: '@taiga-ui/kit',
2070
+ },
2071
+ to: {
2072
+ name: 'TUI_INPUT_TIME_OPTIONS',
2073
+ moduleSpecifier: '@taiga-ui/legacy',
2074
+ },
2075
+ },
2076
+ {
2077
+ from: {
2078
+ name: 'tuiInputTimeOptionsProvider',
2079
+ moduleSpecifier: '@taiga-ui/kit',
2080
+ },
2081
+ to: {
2082
+ name: 'tuiInputTimeOptionsProvider',
2083
+ moduleSpecifier: '@taiga-ui/legacy',
2084
+ },
2085
+ },
2086
+ {
2087
+ from: {
2088
+ name: 'TuiInputYearModule',
2089
+ moduleSpecifier: '@taiga-ui/kit',
2090
+ },
2091
+ to: {
2092
+ name: 'TuiInputYearModule',
2093
+ moduleSpecifier: '@taiga-ui/legacy',
2094
+ },
2095
+ },
2096
+ {
2097
+ from: {
2098
+ name: 'TuiMultiSelectModule',
2099
+ moduleSpecifier: '@taiga-ui/kit',
2100
+ },
2101
+ to: {
2102
+ name: 'TuiMultiSelectModule',
2103
+ moduleSpecifier: '@taiga-ui/legacy',
2104
+ },
2105
+ },
2106
+ {
2107
+ from: {
2108
+ name: 'TuiMultiSelectOptions',
2109
+ moduleSpecifier: '@taiga-ui/kit',
2110
+ },
2111
+ to: {
2112
+ name: 'TuiMultiSelectOptions',
2113
+ moduleSpecifier: '@taiga-ui/legacy',
2114
+ },
2115
+ },
2116
+ {
2117
+ from: {
2118
+ name: 'TUI_MULTI_SELECT_DEFAULT_OPTIONS',
2119
+ moduleSpecifier: '@taiga-ui/kit',
2120
+ },
2121
+ to: {
2122
+ name: 'TUI_MULTI_SELECT_DEFAULT_OPTIONS',
2123
+ moduleSpecifier: '@taiga-ui/legacy',
2124
+ },
2125
+ },
2126
+ {
2127
+ from: {
2128
+ name: 'TUI_MULTI_SELECT_OPTIONS',
2129
+ moduleSpecifier: '@taiga-ui/kit',
2130
+ },
2131
+ to: {
2132
+ name: 'TUI_MULTI_SELECT_OPTIONS',
2133
+ moduleSpecifier: '@taiga-ui/legacy',
2134
+ },
2135
+ },
2136
+ {
2137
+ from: {
2138
+ name: 'tuiMultiSelectOptionsProvider',
2139
+ moduleSpecifier: '@taiga-ui/kit',
2140
+ },
2141
+ to: {
2142
+ name: 'tuiMultiSelectOptionsProvider',
2143
+ moduleSpecifier: '@taiga-ui/legacy',
2144
+ },
2145
+ },
2146
+ {
2147
+ from: {
2148
+ name: 'TuiMultiSelectOptionModule',
2149
+ moduleSpecifier: '@taiga-ui/kit',
2150
+ },
2151
+ to: {
2152
+ name: 'TuiMultiSelectOptionModule',
2153
+ moduleSpecifier: '@taiga-ui/legacy',
2154
+ },
2155
+ },
2156
+ {
2157
+ from: {
2158
+ name: 'TuiSelectModule',
2159
+ moduleSpecifier: '@taiga-ui/kit',
2160
+ },
2161
+ to: {
2162
+ name: 'TuiSelectModule',
2163
+ moduleSpecifier: '@taiga-ui/legacy',
2164
+ },
2165
+ },
2166
+ {
2167
+ from: {
2168
+ name: 'TuiSelectOptions',
2169
+ moduleSpecifier: '@taiga-ui/kit',
2170
+ },
2171
+ to: {
2172
+ name: 'TuiSelectOptions',
2173
+ moduleSpecifier: '@taiga-ui/legacy',
2174
+ },
2175
+ },
2176
+ {
2177
+ from: {
2178
+ name: 'TUI_SELECT_DEFAULT_OPTIONS',
2179
+ moduleSpecifier: '@taiga-ui/kit',
2180
+ },
2181
+ to: {
2182
+ name: 'TUI_SELECT_DEFAULT_OPTIONS',
2183
+ moduleSpecifier: '@taiga-ui/legacy',
2184
+ },
2185
+ },
2186
+ {
2187
+ from: {
2188
+ name: 'TUI_SELECT_OPTIONS',
2189
+ moduleSpecifier: '@taiga-ui/kit',
2190
+ },
2191
+ to: {
2192
+ name: 'TUI_SELECT_OPTIONS',
2193
+ moduleSpecifier: '@taiga-ui/legacy',
2194
+ },
2195
+ },
2196
+ {
2197
+ from: {
2198
+ name: 'tuiSelectOptionsProvider',
2199
+ moduleSpecifier: '@taiga-ui/kit',
2200
+ },
2201
+ to: {
2202
+ name: 'tuiSelectOptionsProvider',
2203
+ moduleSpecifier: '@taiga-ui/legacy',
2204
+ },
2205
+ },
2206
+ {
2207
+ from: {
2208
+ name: 'TuiSelectOptionModule',
2209
+ moduleSpecifier: '@taiga-ui/kit',
2210
+ },
2211
+ to: {
2212
+ name: 'TuiSelectOptionModule',
2213
+ moduleSpecifier: '@taiga-ui/legacy',
2214
+ },
2215
+ },
2216
+ {
2217
+ from: {
2218
+ name: 'TuiTagModule',
2219
+ moduleSpecifier: '@taiga-ui/kit',
2220
+ },
2221
+ to: {
2222
+ name: 'TuiTagModule',
2223
+ moduleSpecifier: '@taiga-ui/legacy',
2224
+ },
2225
+ },
1527
2226
  ];
@@ -14,4 +14,8 @@ exports.MODULES_TO_REMOVE = [
14
14
  name: 'TuiFocusableModule',
15
15
  moduleSpecifier: '@taiga-ui/cdk',
16
16
  },
17
+ {
18
+ name: 'TuiOverscrollModule',
19
+ moduleSpecifier: '@taiga-ui/cdk',
20
+ },
17
21
  ];
@@ -0,0 +1,2 @@
1
+ import type { ReplacementType } from '../../../interfaces';
2
+ export declare const TYPES_TO_RENAME: readonly ReplacementType[];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TYPES_TO_RENAME = void 0;
4
+ exports.TYPES_TO_RENAME = [
5
+ {
6
+ from: 'TuiDocExample',
7
+ to: 'Record<string, string | Promise<unknown>>',
8
+ moduleSpecifier: ['@taiga-ui/addon-doc'],
9
+ removeImport: true,
10
+ },
11
+ ];
@@ -15,7 +15,10 @@ exports.migrateOptionProviders = migrateOptionProviders;
15
15
  function migrateInputNumberOptions(options) {
16
16
  !options['skip-logs'] &&
17
17
  (0, colored_log_1.infoLog)(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} tuiInputNumberOptionsProvider`);
18
- const references = (0, get_named_import_references_1.getNamedImportReferences)('tuiInputNumberOptionsProvider', '@taiga-ui/kit');
18
+ const references = [
19
+ ...(0, get_named_import_references_1.getNamedImportReferences)('tuiInputNumberOptionsProvider', '@taiga-ui/kit'),
20
+ ...(0, get_named_import_references_1.getNamedImportReferences)('tuiInputNumberOptionsProvider', '@taiga-ui/legacy'),
21
+ ];
19
22
  references.forEach(ref => {
20
23
  if (ref.wasForgotten()) {
21
24
  return;
@@ -10,6 +10,7 @@ const templates_1 = require("../../utils/templates");
10
10
  const replace_attrs_by_directives_1 = require("../../utils/templates/replace-attrs-by-directives");
11
11
  const constants_2 = require("./constants");
12
12
  const templates_2 = require("./templates");
13
+ const migrate_overscroll_1 = require("./templates/migrate-overscroll");
13
14
  function getAction({ action, requiredData, }) {
14
15
  return ({ resource, fileSystem, recorder, }) => action({ resource, fileSystem, recorder, data: requiredData });
15
16
  }
@@ -40,6 +41,7 @@ function migrateTemplates(fileSystem, options) {
40
41
  templates_2.migrateLabeled,
41
42
  templates_2.migrateProgressSegmented,
42
43
  templates_2.migrateThumbnailCard,
44
+ migrate_overscroll_1.migrateOverscroll,
43
45
  ];
44
46
  const progressLog = (0, progress_1.setupProgressLogger)({
45
47
  total: componentWithTemplatesPaths.length,
@@ -0,0 +1,8 @@
1
+ import type { UpdateRecorder } from '@angular-devkit/schematics';
2
+ import type { DevkitFileSystem } from 'ng-morph';
3
+ import type { TemplateResource } from '../../../interfaces';
4
+ export declare function migrateOverscroll({ resource, recorder, fileSystem, }: {
5
+ fileSystem: DevkitFileSystem;
6
+ recorder: UpdateRecorder;
7
+ resource: TemplateResource;
8
+ }): void;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateOverscroll = void 0;
4
+ const elements_1 = require("../../../../utils/templates/elements");
5
+ const template_resource_1 = require("../../../../utils/templates/template-resource");
6
+ const remove_attrs_1 = require("../utils/remove-attrs");
7
+ const overscrollAttrName = 'tuiOverscroll';
8
+ const overscrollAttrNameDict = {
9
+ [overscrollAttrName.toLowerCase()]: true,
10
+ [`[${overscrollAttrName.toLowerCase()}]`]: true,
11
+ };
12
+ function migrateOverscroll({ resource, recorder, fileSystem, }) {
13
+ const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
14
+ const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
15
+ const elements = (0, elements_1.findElementsWithDirective)(template, overscrollAttrName).filter(({ sourceCodeLocation }) => !!sourceCodeLocation);
16
+ if (!elements.length) {
17
+ return;
18
+ }
19
+ elements.forEach(({ attrs, sourceCodeLocation }) => {
20
+ const attrsToRemove = attrs.filter(({ name }) => overscrollAttrNameDict[name]);
21
+ (0, remove_attrs_1.removeAttrs)(attrsToRemove, sourceCodeLocation, recorder, templateOffset);
22
+ });
23
+ addTodo(recorder, elements[0].sourceCodeLocation, templateOffset);
24
+ }
25
+ exports.migrateOverscroll = migrateOverscroll;
26
+ function addTodo(recorder, sourceCodeLocation, templateOffset) {
27
+ var _a, _b;
28
+ recorder.insertRight(templateOffset + ((_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.startOffset) !== null && _b !== void 0 ? _b : 0), '<!-- Taiga migration TODO: use "overscroll-behavior" ccs property instead of "tuiOverscroll" directive -->\n');
29
+ }
@@ -3,6 +3,11 @@ export declare function findElementsByFn(nodes: ChildNode[], predicateFn: (el: E
3
3
  export declare function findElementsInTemplateByFn(html: string, predicateFn: (el: Element) => boolean): Element[];
4
4
  export declare function findElementsByTagName(html: string, tagName: string, filterFn?: (element: Element) => boolean): Element[];
5
5
  export declare function findElementsByTagNames(html: string, tagNames: string[]): Element[];
6
+ /**
7
+ * Parses a HTML fragment and traverses all AST nodes in order find elements that
8
+ * include the specified directive as attribute or input.
9
+ */
10
+ export declare function findElementsWithDirective(html: string, attributeName: string): Element[];
6
11
  /**
7
12
  * Parses a HTML fragment and traverses all AST nodes in order find elements that
8
13
  * include the specified attribute.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStartOffsetOfAttribute = exports.hasElementAttribute = exports.findAttributeOnElementWithAttrs = exports.findAttributeOnElementWithTag = exports.findElementsWithAttributeOnTag = exports.findElementsWithAttribute = exports.findElementsByTagNames = exports.findElementsByTagName = exports.findElementsInTemplateByFn = exports.findElementsByFn = void 0;
3
+ exports.getStartOffsetOfAttribute = exports.hasElementAttribute = exports.findAttributeOnElementWithAttrs = exports.findAttributeOnElementWithTag = exports.findElementsWithAttributeOnTag = exports.findElementsWithAttribute = exports.findElementsWithDirective = exports.findElementsByTagNames = exports.findElementsByTagName = exports.findElementsInTemplateByFn = exports.findElementsByFn = void 0;
4
4
  const parse5_1 = require("parse5");
5
5
  function findElementsByFn(nodes, predicateFn) {
6
6
  const elements = [];
@@ -38,6 +38,16 @@ function findElementsByTagNames(html, tagNames) {
38
38
  return findElementsInTemplateByFn(html, el => tagNames.includes(el.tagName));
39
39
  }
40
40
  exports.findElementsByTagNames = findElementsByTagNames;
41
+ /**
42
+ * Parses a HTML fragment and traverses all AST nodes in order find elements that
43
+ * include the specified directive as attribute or input.
44
+ */
45
+ function findElementsWithDirective(html, attributeName) {
46
+ const lowercasedAttrName = attributeName.toLowerCase();
47
+ const inputName = `[${lowercasedAttrName}]`;
48
+ return findElementsInTemplateByFn(html, el => { var _a; return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(({ name }) => name === lowercasedAttrName || name === inputName); });
49
+ }
50
+ exports.findElementsWithDirective = findElementsWithDirective;
41
51
  /**
42
52
  * Parses a HTML fragment and traverses all AST nodes in order find elements that
43
53
  * include the specified attribute.