@taiga-ui/cdk 4.52.0-canary.0ec45da → 4.52.0-canary.1aa6034

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 (112) hide show
  1. package/constants/version.d.ts +1 -1
  2. package/constants/version.js +1 -1
  3. package/directives/index.d.ts +0 -1
  4. package/fesm2022/taiga-ui-cdk-constants.mjs +1 -1
  5. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  6. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +0 -1
  7. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-cdk-directives-animated.mjs +0 -2
  9. package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +0 -1
  11. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +0 -1
  13. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-cdk-directives-control.mjs +0 -1
  15. package/fesm2022/taiga-ui-cdk-directives-control.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +0 -1
  17. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +0 -1
  19. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-cdk-directives-element.mjs +0 -1
  21. package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +0 -1
  23. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +1 -4
  25. package/fesm2022/taiga-ui-cdk-directives-font-size.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +0 -1
  27. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +0 -1
  29. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-cdk-directives-item.mjs +0 -1
  31. package/fesm2022/taiga-ui-cdk-directives-item.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-cdk-directives-let.mjs +0 -1
  33. package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-cdk-directives-media.mjs +0 -1
  35. package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +0 -1
  37. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +0 -1
  39. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-cdk-directives-pan.mjs +0 -1
  41. package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-cdk-directives-platform.mjs +0 -1
  43. package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +0 -1
  45. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +0 -2
  47. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +0 -1
  49. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +0 -1
  51. package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-cdk-directives-validator.mjs +0 -1
  53. package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +0 -1
  55. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +0 -1
  57. package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +0 -1
  59. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-cdk-directives.mjs +0 -1
  61. package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +0 -1
  63. package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +0 -1
  65. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +0 -1
  67. package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +0 -1
  69. package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +0 -1
  71. package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +0 -1
  73. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +0 -1
  75. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +0 -1
  77. package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +0 -1
  79. package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-cdk-services.mjs +3 -43
  81. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-cdk-utils-color.mjs +1 -1
  83. package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +0 -1
  85. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  86. package/package.json +5 -6
  87. package/schematics/migrate-tui-let/index.js +1 -1
  88. package/schematics/migrate-tui-let/index.js.map +1 -1
  89. package/schematics/ng-add/constants/versions.d.ts +1 -1
  90. package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +1 -1
  91. package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js.map +1 -1
  92. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +1 -1
  93. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js.map +1 -1
  94. package/schematics/ng-update/v5/index.js +3 -0
  95. package/schematics/ng-update/v5/index.js.map +1 -1
  96. package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.d.ts +2 -0
  97. package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js +22 -0
  98. package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js.map +1 -0
  99. package/schematics/ng-update/v5/steps/migrate-templates.js +2 -0
  100. package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -1
  101. package/schematics/ng-update/v5/steps/templates/migrate-input-year.d.ts +8 -0
  102. package/schematics/ng-update/v5/steps/templates/migrate-input-year.js +52 -0
  103. package/schematics/ng-update/v5/steps/templates/migrate-input-year.js.map +1 -0
  104. package/schematics/utils/run-migration.d.ts +14 -0
  105. package/schematics/utils/run-migration.js +26 -0
  106. package/schematics/utils/run-migration.js.map +1 -0
  107. package/services/index.d.ts +0 -1
  108. package/directives/popover/index.d.ts +0 -1
  109. package/directives/popover/popover.directive.d.ts +0 -14
  110. package/fesm2022/taiga-ui-cdk-directives-popover.mjs +0 -32
  111. package/fesm2022/taiga-ui-cdk-directives-popover.mjs.map +0 -1
  112. package/services/popover.service.d.ts +0 -25
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IDENTIFIERS_TO_REPLACE = void 0;
4
+ exports.IDENTIFIERS_TO_REPLACE = [
5
+ {
6
+ from: {
7
+ name: 'TuiInputYearModule',
8
+ moduleSpecifier: '@taiga-ui/legacy',
9
+ },
10
+ to: [
11
+ {
12
+ name: 'TuiInputYear',
13
+ moduleSpecifier: '@taiga-ui/kit',
14
+ },
15
+ {
16
+ name: 'TuiTextfield',
17
+ moduleSpecifier: '@taiga-ui/core',
18
+ },
19
+ ],
20
+ },
21
+ ];
22
+ //# sourceMappingURL=identifiers-to-replace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifiers-to-replace.js","sourceRoot":"","sources":["../../../../../../../projects/cdk/schematics/ng-update/v5/steps/constants/identifiers-to-replace.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAiC;IAChE;QACI,IAAI,EAAE;YACF,IAAI,EAAE,oBAAoB;YAC1B,eAAe,EAAE,kBAAkB;SACtC;QACD,EAAE,EAAE;YACA;gBACI,IAAI,EAAE,cAAc;gBACpB,eAAe,EAAE,eAAe;aACnC;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,eAAe,EAAE,gBAAgB;aACpC;SACJ;KACJ;CACJ,CAAC"}
@@ -10,6 +10,7 @@ const get_component_templates_1 = require("../../../utils/templates/get-componen
10
10
  const template_resource_1 = require("../../../utils/templates/template-resource");
11
11
  const templates_1 = require("../../utils/templates");
12
12
  const html_comments_1 = require("./constants/html-comments");
13
+ const migrate_input_year_1 = require("./templates/migrate-input-year");
13
14
  function getAction({ action, requiredData, }) {
14
15
  return ({ resource, fileSystem, recorder, }) => action({ resource, fileSystem, recorder, data: requiredData });
15
16
  }
@@ -19,6 +20,7 @@ function migrateTemplates(fileSystem, options) {
19
20
  const componentWithTemplatesPaths = (0, get_component_templates_1.getComponentTemplates)(constants_1.ALL_TS_FILES);
20
21
  const actions = [
21
22
  getAction({ action: templates_1.addHTMLCommentTags, requiredData: html_comments_1.HTML_COMMENTS }),
23
+ migrate_input_year_1.migrateInputYear,
22
24
  ];
23
25
  const progressLog = (0, progress_1.setupProgressLogger)({
24
26
  total: componentWithTemplatesPaths.length,
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-templates.js","sourceRoot":"","sources":["../../../../../../projects/cdk/schematics/ng-update/v5/steps/migrate-templates.ts"],"names":[],"mappings":";;AAoBA,8BA0BC;AAED,4CAgCC;AAhFD,uCAQkB;AAElB,kDAAgD;AAEhD,8FAA6E;AAC7E,sDAA4D;AAC5D,8FAAuF;AACvF,kFAAuF;AAEvF,qDAAyD;AACzD,6DAAwD;AAExD,SAAgB,SAAS,CAAI,EACzB,MAAM,EACN,YAAY,GAcf;IACG,OAAO,CAAC,EACJ,QAAQ,EACR,UAAU,EACV,QAAQ,GAKX,EAAE,EAAE,CAAC,MAAM,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAC,CAAC,CAAC;AACvE,CAAC;AAED,SAAgB,gBAAgB,CAAC,UAA4B,EAAE,OAAkB;IAC7E,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,kBAAO,EAAC,GAAG,2BAAgB,GAAG,yBAAc,yBAAyB,CAAC,CAAC;IAE3E,MAAM,2BAA2B,GAAG,IAAA,+CAAqB,EAAC,wBAAY,CAAC,CAAC;IAExE,MAAM,OAAO,GAAG;QACZ,SAAS,CAAC,EAAC,MAAM,EAAE,8BAAkB,EAAE,YAAY,EAAE,6BAAa,EAAC,CAAC;KAC9D,CAAC;IAEX,MAAM,WAAW,GAAG,IAAA,8BAAmB,EAAC;QACpC,KAAK,EAAE,2BAA2B,CAAC,MAAM;KAC5C,CAAC,CAAC;IAEH,2BAA2B,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7C,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,IAAA,+CAA2B,EAAC,QAAQ,CAAC,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEvC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;YACpC,MAAM,YAAY,GAAG,WAAW,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAExD,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAChE,MAAM,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,WAAW,EAAE,CAAC;IAEzB,IAAA,+CAAgB,EAAC,OAAO,CAAC,CAAC;IAE1B,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,qBAAU,EAAC,GAAG,2BAAgB,GAAG,yBAAc,wBAAwB,CAAC,CAAC;AACjF,CAAC"}
1
+ {"version":3,"file":"migrate-templates.js","sourceRoot":"","sources":["../../../../../../projects/cdk/schematics/ng-update/v5/steps/migrate-templates.ts"],"names":[],"mappings":";;AAqBA,8BA0BC;AAED,4CAiCC;AAlFD,uCAQkB;AAElB,kDAAgD;AAEhD,8FAA6E;AAC7E,sDAA4D;AAC5D,8FAAuF;AACvF,kFAAuF;AAEvF,qDAAyD;AACzD,6DAAwD;AACxD,uEAAgE;AAEhE,SAAgB,SAAS,CAAI,EACzB,MAAM,EACN,YAAY,GAcf;IACG,OAAO,CAAC,EACJ,QAAQ,EACR,UAAU,EACV,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AAC,OAAO,CAAC,CAAC;IAE1B,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,qBAAU,EAAC,GAAG,2BAAgB,GAAG,yBAAc,wBAAwB,CAAC,CAAC;AACjF,CAAC"}
@@ -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/template-resource';
4
+ export declare function migrateInputYear({ resource, recorder, fileSystem, }: {
5
+ fileSystem: DevkitFileSystem;
6
+ recorder: UpdateRecorder;
7
+ resource: TemplateResource;
8
+ }): void;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateInputYear = migrateInputYear;
4
+ const elements_1 = require("../../../../utils/templates/elements");
5
+ const template_resource_1 = require("../../../../utils/templates/template-resource");
6
+ const replace_tag_1 = require("../../../utils/templates/replace-tag");
7
+ function migrateInputYear({ resource, recorder, fileSystem, }) {
8
+ const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
9
+ const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
10
+ const elements = (0, elements_1.findElementsByTagName)(template, 'tui-input-year');
11
+ elements.forEach((element) => {
12
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13
+ const sourceCodeLocation = element.sourceCodeLocation;
14
+ (0, replace_tag_1.replaceTag)(recorder, sourceCodeLocation, 'tui-input-year', 'tui-textfield', templateOffset);
15
+ const attrs = [...element.attrs].filter((attr) => /formcontrol|ngmodel|min|max/.exec(attr.name.toLocaleLowerCase()));
16
+ for (const attr of attrs) {
17
+ const { startOffset = 0, endOffset = 0 } = (_c = (_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[attr.name]) !== null && _c !== void 0 ? _c : {};
18
+ recorder.remove(templateOffset + startOffset, endOffset - startOffset);
19
+ }
20
+ const labelIndex = element.childNodes.findIndex((node) => node.nodeName === '#text' && (node === null || node === void 0 ? void 0 : node.value.trim()));
21
+ if (labelIndex !== -1) {
22
+ const labelNode = element.childNodes[labelIndex];
23
+ const labelTextStart = ((_e = (_d = labelNode === null || labelNode === void 0 ? void 0 : labelNode.sourceCodeLocation) === null || _d === void 0 ? void 0 : _d.startOffset) !== null && _e !== void 0 ? _e : 0) + templateOffset;
24
+ const labelTextEnd = ((_g = (_f = labelNode === null || labelNode === void 0 ? void 0 : labelNode.sourceCodeLocation) === null || _f === void 0 ? void 0 : _f.endOffset) !== null && _g !== void 0 ? _g : 0) + templateOffset;
25
+ recorder.insertRight(labelTextStart, '\n<label tuiLabel>');
26
+ recorder.insertRight(labelTextEnd, '</label>\n');
27
+ }
28
+ const calendarInsertOffset = ((_j = (_h = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.endTag) === null || _h === void 0 ? void 0 : _h.startOffset) !== null && _j !== void 0 ? _j : 0) + templateOffset;
29
+ const inputs = element.childNodes.filter((node) => node.nodeName === 'input');
30
+ const migrationAttrs = attrs.reduce((result, attr) => {
31
+ const name = attr.name
32
+ .replace(/ngmodel/i, 'ngModel')
33
+ .replace(/formcontrol/i, 'formControl')
34
+ .replace(/formcontrolname/i, 'formControlName');
35
+ return `${result} ${name}="${attr.value}"`;
36
+ }, '');
37
+ recorder.insertRight(calendarInsertOffset, !inputs.length
38
+ ? `\n<input tuiInputYear${migrationAttrs} />\n<tui-calendar-year *tuiDropdown />\n`
39
+ : '\n<tui-calendar-year *tuiDropdown />\n');
40
+ for (const input of inputs) {
41
+ input.attrs.forEach((attr) => {
42
+ var _a, _b, _c;
43
+ if (/^tuiTextfield$|^tuiTextfieldLegacy$/i.exec(attr.name)) {
44
+ const { startOffset = 0, endOffset = 0 } = (_c = (_b = (_a = input.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[attr.name]) !== null && _c !== void 0 ? _c : {};
45
+ recorder.remove(templateOffset + startOffset, endOffset - startOffset);
46
+ recorder.insertRight(templateOffset + startOffset, `tuiInputYear${migrationAttrs}`);
47
+ }
48
+ });
49
+ }
50
+ });
51
+ }
52
+ //# sourceMappingURL=migrate-input-year.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-input-year.js","sourceRoot":"","sources":["../../../../../../../projects/cdk/schematics/ng-update/v5/steps/templates/migrate-input-year.ts"],"names":[],"mappings":";;AAkBA,4CA6FC;AA3GD,mEAA2E;AAC3E,qFAGuD;AAEvD,sEAAgE;AAQhE,SAAgB,gBAAgB,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,UAAU,GAKb;IACG,MAAM,QAAQ,GAAG,IAAA,mDAA+B,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACvE,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,IAAA,gCAAqB,EAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAEnE,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAgB,EAAE,EAAE;;QAClC,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QAEtD,IAAA,wBAAU,EACN,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,cAAc,CACjB,CAAC;QAEF,MAAM,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CACpE,CAAC;QAEF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,MAAM,EAAC,WAAW,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAClC,MAAA,MAAA,MAAA,OAAO,CAAC,kBAAkB,0CAAE,KAAK,0CAAG,IAAI,CAAC,I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AE;YACjD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI;iBACjB,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC;iBAC9B,OAAO,CAAC,cAAc,EAAE,aAAa,CAAC;iBACtC,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;YAEpD,OAAO,GAAG,MAAM,IAAI,IAAI,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC;QAC/C,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,QAAQ,CAAC,WAAW,CAChB,oBAAoB,EACpB,CAAC,MAAM,CAAC,MAAM;YACV,CAAC,CAAC,wBAAwB,cAAc,2CAA2C;YACnF,CAAC,CAAC,wCAAwC,CACjD,CAAC;QAEF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;;gBACzB,IAAI,sCAAsC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACzD,MAAM,EAAC,WAAW,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAClC,MAAA,MAAA,MAAA,KAAK,CAAC,kBAAkB,0CAAE,KAAK,0CAAG,IAAI,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;oBAEvD,QAAQ,CAAC,MAAM,CACX,cAAc,GAAG,WAAW,EAC5B,SAAS,GAAG,WAAW,CAC1B,CAAC;oBAEF,QAAQ,CAAC,WAAW,CAChB,cAAc,GAAG,WAAW,EAC5B,eAAe,cAAc,EAAE,CAClC,CAAC;gBACN,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ interface Input {
2
+ collection: string;
3
+ component?: string;
4
+ template?: string;
5
+ packageJson?: string;
6
+ schematicName?: string;
7
+ }
8
+ interface Output {
9
+ component: string;
10
+ template?: string;
11
+ packageJson?: string;
12
+ }
13
+ export declare function runMigration(options: Input): Promise<Output>;
14
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runMigration = runMigration;
4
+ const tslib_1 = require("tslib");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const testing_1 = require("@angular-devkit/schematics/testing");
7
+ const ng_morph_1 = require("ng-morph");
8
+ function runMigration(options) {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ const { collection, component = '', template = '', packageJson = '{}', schematicName = 'updateToV5', } = options;
11
+ const host = new testing_1.UnitTestTree(new schematics_1.HostTree());
12
+ const runner = new testing_1.SchematicTestRunner('schematics', collection);
13
+ (0, ng_morph_1.setActiveProject)((0, ng_morph_1.createProject)(host));
14
+ host.create('test/app/test.ts', component);
15
+ host.create('test/app/test.html', template);
16
+ host.create('package.json', packageJson);
17
+ yield runner.runSchematic(schematicName, { 'skip-logs': true }, host);
18
+ (0, ng_morph_1.saveActiveProject)();
19
+ return {
20
+ component: host.readContent('test/app/test.ts'),
21
+ template: host.readContent('test/app/test.html'),
22
+ packageJson: host.readContent('package.json'),
23
+ };
24
+ });
25
+ }
26
+ //# sourceMappingURL=run-migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-migration.js","sourceRoot":"","sources":["../../../../projects/cdk/schematics/utils/run-migration.ts"],"names":[],"mappings":";;AAkBA,oCA2BC;;AA7CD,2DAAoD;AACpD,gEAAqF;AACrF,uCAA4E;AAgB5E,SAAsB,YAAY,CAAC,OAAc;;QAC7C,MAAM,EACF,UAAU,EACV,SAAS,GAAG,EAAE,EACd,QAAQ,GAAG,EAAE,EACb,WAAW,GAAG,IAAI,EAClB,aAAa,GAAG,YAAY,GAC/B,GAAG,OAAO,CAAC;QAEZ,MAAM,IAAI,GAAG,IAAI,sBAAY,CAAC,IAAI,qBAAQ,EAAE,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAEjE,IAAA,2BAAgB,EAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QAEzC,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,EAAE,IAAI,CAAC,CAAC;QAEpE,IAAA,4BAAiB,GAAE,CAAC;QAEpB,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;YAC/C,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC;YAChD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;SAChD,CAAC;IACN,CAAC;CAAA"}
@@ -1,4 +1,3 @@
1
1
  export * from './id.service';
2
- export * from './popover.service';
3
2
  export * from './scroll.service';
4
3
  export * from './theme-color.service';
@@ -1 +0,0 @@
1
- export * from './popover.directive';
@@ -1,14 +0,0 @@
1
- import { type OnChanges } from '@angular/core';
2
- import { type TuiPopover } from '@taiga-ui/cdk/services';
3
- import { PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
4
- import * as i0 from "@angular/core";
5
- export declare abstract class TuiPopoverDirective<T> extends PolymorpheusTemplate<TuiPopover<T, void>> implements OnChanges {
6
- private readonly service;
7
- private readonly open$;
8
- options: Partial<T>;
9
- open: boolean;
10
- readonly openChange: import("rxjs").Observable<boolean>;
11
- ngOnChanges(): void;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiPopoverDirective<any>, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiPopoverDirective<any>, never, never, {}, {}, never, never, true, never>;
14
- }
@@ -1,32 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Directive } from '@angular/core';
3
- import { tuiIfMap } from '@taiga-ui/cdk/observables';
4
- import { TuiPopoverService } from '@taiga-ui/cdk/services';
5
- import { PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
6
- import { Subject, distinctUntilChanged, ignoreElements, endWith, share } from 'rxjs';
7
-
8
- class TuiPopoverDirective extends PolymorpheusTemplate {
9
- constructor() {
10
- super(...arguments);
11
- this.service = inject((TuiPopoverService));
12
- this.open$ = new Subject();
13
- this.options = {};
14
- this.open = false;
15
- this.openChange = this.open$.pipe(distinctUntilChanged(), tuiIfMap(() => this.service.open(this, this.options).pipe(ignoreElements(), endWith(false))), share());
16
- }
17
- ngOnChanges() {
18
- this.open$.next(this.open);
19
- }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopoverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
21
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiPopoverDirective, isStandalone: true, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopoverDirective, decorators: [{
24
- type: Directive
25
- }] });
26
-
27
- /**
28
- * Generated bundle index. Do not edit.
29
- */
30
-
31
- export { TuiPopoverDirective };
32
- //# sourceMappingURL=taiga-ui-cdk-directives-popover.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-popover.mjs","sources":["../../../projects/cdk/directives/popover/popover.directive.ts","../../../projects/cdk/directives/popover/taiga-ui-cdk-directives-popover.ts"],"sourcesContent":["import {Directive, inject, type OnChanges} from '@angular/core';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover, TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, endWith, ignoreElements, share, Subject} from 'rxjs';\n\n@Directive()\nexport abstract class TuiPopoverDirective<T>\n extends PolymorpheusTemplate<TuiPopover<T, void>>\n implements OnChanges\n{\n private readonly service = inject(TuiPopoverService<T>);\n private readonly open$ = new Subject<boolean>();\n\n public options: Partial<T> = {};\n public open = false;\n\n public readonly openChange = this.open$.pipe(\n distinctUntilChanged(),\n tuiIfMap(() =>\n this.service.open(this, this.options).pipe(ignoreElements(), endWith(false)),\n ),\n share(),\n );\n\n public ngOnChanges(): void {\n this.open$.next(this.open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOM,MAAgB,mBAClB,SAAQ,oBAAyC,CAAA;AAFrD,IAAA,WAAA,GAAA;;AAKqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,iBAAoB,EAAC;AACtC,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,OAAO,EAAW;QAExC,IAAO,CAAA,OAAA,GAAe,EAAE;QACxB,IAAI,CAAA,IAAA,GAAG,KAAK;AAEH,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CACxC,oBAAoB,EAAE,EACtB,QAAQ,CAAC,MACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC/E,EACD,KAAK,EAAE,CACV;AAKJ;IAHU,WAAW,GAAA;QACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;;+GAnBZ,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACND;;AAEG;;;;"}
@@ -1,25 +0,0 @@
1
- import { type Provider, type ProviderToken, type Type } from '@angular/core';
2
- import { type TuiContext } from '@taiga-ui/cdk/types';
3
- import { PolymorpheusComponent, type PolymorpheusContent } from '@taiga-ui/polymorpheus';
4
- import { type BehaviorSubject, Observable, type Observer } from 'rxjs';
5
- import * as i0 from "@angular/core";
6
- export interface TuiPopoverContext<O> extends TuiContext<Observer<O>> {
7
- readonly component: PolymorpheusComponent<any>;
8
- readonly createdAt: number;
9
- readonly id: string;
10
- readonly completeWith: (value: O) => void;
11
- }
12
- export type TuiPopover<T, O> = T & TuiPopoverContext<O> & {
13
- content: PolymorpheusContent<T & TuiPopoverContext<O>>;
14
- };
15
- export declare abstract class TuiPopoverService<T, K = void> {
16
- protected readonly options: T;
17
- private readonly component;
18
- private readonly id;
19
- protected readonly items$: BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>;
20
- constructor(items: ProviderToken<BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>>, component: Type<any>, options?: T);
21
- open<G = void>(content: PolymorpheusContent<T & TuiPopoverContext<K extends void ? G : K>>, options?: Partial<T>): Observable<K extends void ? G : K>;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiPopoverService<any, any>, never>;
23
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiPopoverService<any, any>>;
24
- }
25
- export declare function tuiAsPopover(popover: Type<TuiPopoverService<any>>): Provider;