@taiga-ui/legacy 4.52.0-canary.24b31eb → 4.52.0-canary.2fa3dd5

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 (121) hide show
  1. package/README.md +1 -1
  2. package/classes/abstract-textfield-host.d.ts +1 -1
  3. package/components/arrow/arrow.options.d.ts +1 -3
  4. package/components/arrow/arrow.providers.d.ts +1 -6
  5. package/components/dialog/dialog.component.d.ts +5 -6
  6. package/components/dialog/dialog.directive.d.ts +4 -3
  7. package/components/dialog/dialog.interfaces.d.ts +3 -4
  8. package/components/dialog/dialog.service.d.ts +5 -2
  9. package/components/dialog/dialog.tokens.d.ts +1 -3
  10. package/components/index.d.ts +2 -1
  11. package/components/input/input.module.d.ts +4 -4
  12. package/components/input-date-range/input-date-range.component.d.ts +1 -2
  13. package/components/input-date-range/input-date-range.module.d.ts +8 -9
  14. package/components/input-date-time/input-date-time.component.d.ts +5 -5
  15. package/components/input-date-time/input-date-time.module.d.ts +6 -6
  16. package/components/input-month-range/input-month-range.module.d.ts +3 -3
  17. package/components/input-number/input-number.component.d.ts +1 -2
  18. package/components/input-number/input-number.module.d.ts +5 -5
  19. package/components/input-number/input-number.options.d.ts +1 -7
  20. package/components/input-range/input-range.component.d.ts +1 -1
  21. package/components/input-range/input-range.module.d.ts +4 -4
  22. package/components/input-tag/input-tag.module.d.ts +8 -8
  23. package/components/input-tag/input-tag.options.d.ts +1 -7
  24. package/components/mobile-dialog/index.d.ts +3 -0
  25. package/components/mobile-dialog/mobile-dialog.component.d.ts +10 -0
  26. package/components/mobile-dialog/mobile-dialog.options.d.ts +10 -0
  27. package/components/mobile-dialog/mobile-dialog.service.d.ts +14 -0
  28. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
  29. package/components/multi-select/multi-select.module.d.ts +11 -12
  30. package/components/multi-select/multi-select.options.d.ts +1 -3
  31. package/components/pdf-viewer/index.d.ts +4 -0
  32. package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
  33. package/components/pdf-viewer/pdf-viewer.directive.d.ts +8 -0
  34. package/components/pdf-viewer/pdf-viewer.options.d.ts +11 -0
  35. package/components/pdf-viewer/pdf-viewer.service.d.ts +17 -0
  36. package/components/primitive-textfield/primitive-textfield-options.d.ts +2 -2
  37. package/components/primitive-textfield/primitive-textfield.module.d.ts +5 -5
  38. package/components/select/select.module.d.ts +8 -8
  39. package/components/select/select.options.d.ts +1 -7
  40. package/components/select-option/select-option.module.d.ts +3 -3
  41. package/components/tag/tag.module.d.ts +4 -4
  42. package/components/tag/tag.options.d.ts +1 -7
  43. package/components/textarea/textarea.module.d.ts +7 -7
  44. package/directives/textfield-controller/textfield.options.d.ts +1 -3
  45. package/fesm2022/taiga-ui-legacy-classes.mjs +1 -3
  46. package/fesm2022/taiga-ui-legacy-classes.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-legacy-components-arrow.mjs +4 -17
  48. package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-legacy-components-dialog.mjs +32 -26
  50. package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +33 -43
  52. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +30 -36
  54. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +10 -10
  56. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +26 -41
  58. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +12 -12
  60. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +27 -35
  63. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-legacy-components-input.mjs +7 -6
  65. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +62 -0
  67. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -0
  68. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +33 -41
  70. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +88 -0
  72. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -0
  73. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +16 -16
  74. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-legacy-components-select-option.mjs +6 -6
  76. package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-legacy-components-select.mjs +29 -37
  78. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-legacy-components-tag.mjs +13 -22
  80. package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +24 -24
  82. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-legacy-components.mjs +2 -1
  84. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -1
  86. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +3 -7
  88. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +1 -3
  90. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-legacy-utils.mjs +1 -7
  92. package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-legacy.mjs +0 -1
  94. package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
  95. package/index.d.ts +0 -1
  96. package/package.json +13 -22
  97. package/utils/icons-path-factory.d.ts +1 -1
  98. package/utils/index.d.ts +0 -1
  99. package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
  100. package/components/combo-box/combo-box.component.d.ts +0 -52
  101. package/components/combo-box/combo-box.directive.d.ts +0 -13
  102. package/components/combo-box/combo-box.module.d.ts +0 -20
  103. package/components/combo-box/index.d.ts +0 -4
  104. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -299
  105. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
  106. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs +0 -59
  107. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs.map +0 -1
  108. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -50
  109. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs.map +0 -1
  110. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs +0 -80
  111. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs.map +0 -1
  112. package/fesm2022/taiga-ui-legacy-pipes.mjs +0 -8
  113. package/fesm2022/taiga-ui-legacy-pipes.mjs.map +0 -1
  114. package/pipes/format-phone/format-phone.pipe.d.ts +0 -37
  115. package/pipes/format-phone/index.d.ts +0 -1
  116. package/pipes/index.d.ts +0 -3
  117. package/pipes/iso-to-country-code/index.d.ts +0 -1
  118. package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +0 -30
  119. package/pipes/to-country-code/index.d.ts +0 -1
  120. package/pipes/to-country-code/to-country-code.pipe.d.ts +0 -38
  121. package/utils/is-apple.d.ts +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-format-phone.mjs","sources":["../../../projects/legacy/pipes/format-phone/format-phone.pipe.ts","../../../projects/legacy/pipes/format-phone/taiga-ui-legacy-pipes-format-phone.ts"],"sourcesContent":["/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_PLUS} from '@taiga-ui/cdk/constants';\nimport {tuiFormatPhone} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n */\n@Pipe({\n standalone: true,\n name: 'tuiFormatPhone',\n})\nexport class TuiFormatPhonePipe implements PipeTransform {\n /**\n * Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!\n * ```ts\n * import {maskitoTransform} from '@maskito/core';\n * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * @Component({\n * standalone: true,\n * imports: [MaskitoPipe],\n * template: `\n * Phone: {{'12125552368' | maskito: options}}\n * <!-- Phone: +1 (212) 555-2368 -->\n * `,\n * })\n * export class YourComponent {\n * options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});\n * }\n * ```\n * ___\n * @deprecated Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!\n * Formats phone number string of +7XXXXXXXXXX format with adding separator symbols\n * @param value\n * @param countryCode\n * @param phoneMask\n * @return formatted phone number string +7(XXX)XXX-XX-XX\n */\n public transform(\n value: string,\n countryCode = `${CHAR_PLUS}7`,\n phoneMask = '(###) ###-##-##',\n ): string {\n ngDevMode &&\n console.assert(\n value !== undefined,\n 'Undefined was passed to tuiFormatPhone pipe',\n );\n\n return tuiFormatPhone(value, countryCode, phoneMask);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AAKA;;AAEG;MAKU,kBAAkB,CAAA;AAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;IACI,SAAS,CACZ,KAAa,EACb,WAAW,GAAG,CAAG,EAAA,SAAS,CAAG,CAAA,CAAA,EAC7B,SAAS,GAAG,iBAAiB,EAAA;QAE7B,SAAS;YACL,OAAO,CAAC,MAAM,CACV,KAAK,KAAK,SAAS,EACnB,6CAA6C,CAChD;QAEL,OAAO,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC;;+GAvC/C,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1,50 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Pipe } from '@angular/core';
3
- import { TUI_COUNTRIES_MASKS } from '@taiga-ui/legacy/tokens';
4
- import { tuiIsoToCountryCode } from '@taiga-ui/legacy/utils';
5
-
6
- /**
7
- * @deprecated: drop in v5.0
8
- * Use `getCountryCallingCode` from `libphonenumber-js/core` instead
9
- * ```ts
10
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
11
- * import metadata from 'libphonenumber-js/max/metadata';
12
- *
13
- * getCountryCallingCode('US', metadata) // 1
14
- * getCountryCallingCode('GB', metadata) // 44
15
- * ```
16
- */
17
- class TuiIsoToCountryCodePipe {
18
- constructor() {
19
- this.countriesMasks = inject(TUI_COUNTRIES_MASKS);
20
- }
21
- /**
22
- * @deprecated Use `getCountryCallingCode` from `libphonenumber-js/core` instead
23
- * ```ts
24
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
25
- * import metadata from 'libphonenumber-js/max/metadata';
26
- *
27
- * getCountryCallingCode('US', metadata) // 1
28
- * getCountryCallingCode('GB', metadata) // 44
29
- * ```
30
- */
31
- transform(isoCode) {
32
- return tuiIsoToCountryCode(this.countriesMasks, isoCode);
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
35
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, isStandalone: true, name: "tuiIsoToCountryCode" }); }
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIsoToCountryCodePipe, decorators: [{
38
- type: Pipe,
39
- args: [{
40
- standalone: true,
41
- name: 'tuiIsoToCountryCode',
42
- }]
43
- }] });
44
-
45
- /**
46
- * Generated bundle index. Do not edit.
47
- */
48
-
49
- export { TuiIsoToCountryCodePipe };
50
- //# sourceMappingURL=taiga-ui-legacy-pipes-iso-to-country-code.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-iso-to-country-code.mjs","sources":["../../../projects/legacy/pipes/iso-to-country-code/iso-to-country-code.pipe.ts","../../../projects/legacy/pipes/iso-to-country-code/taiga-ui-legacy-pipes-iso-to-country-code.ts"],"sourcesContent":["import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/legacy/tokens';\nimport {tuiIsoToCountryCode} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n * Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\n@Pipe({\n standalone: true,\n name: 'tuiIsoToCountryCode',\n})\nexport class TuiIsoToCountryCodePipe implements PipeTransform {\n private readonly countriesMasks = inject(TUI_COUNTRIES_MASKS);\n\n /**\n * @deprecated Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\n public transform(isoCode: TuiCountryIsoCode): string {\n return tuiIsoToCountryCode(this.countriesMasks, isoCode);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;AAUG;MAKU,uBAAuB,CAAA;AAJpC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAehE;AAbG;;;;;;;;;AASG;AACI,IAAA,SAAS,CAAC,OAA0B,EAAA;QACvC,OAAO,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;;+GAdnD,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,qBAAqB;AAC9B,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,80 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Pipe } from '@angular/core';
3
- import { CHAR_PLUS } from '@taiga-ui/cdk/constants';
4
- import { TUI_COUNTRIES_MASKS } from '@taiga-ui/legacy/tokens';
5
- import { tuiGetMaxAllowedPhoneLength, tuiIsoToCountryCode, tuiNotKzRegion } from '@taiga-ui/legacy/utils';
6
-
7
- /**
8
- * @deprecated: drop in v5.0
9
- * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
10
- * ```
11
- * npm i @maskito/phone
12
- * ```
13
- *
14
- * ```ts
15
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
16
- * import metadata from 'libphonenumber-js/min/metadata';
17
- *
18
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
19
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
20
- * ```
21
- */
22
- class TuiToCountryCodePipe {
23
- constructor() {
24
- this.countriesMasks = inject(TUI_COUNTRIES_MASKS);
25
- }
26
- /**
27
- * @deprecated use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
28
- * ```
29
- * npm i @maskito/phone
30
- * ```
31
- *
32
- * ```ts
33
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
34
- * import metadata from 'libphonenumber-js/min/metadata';
35
- *
36
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
37
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
38
- * ```
39
- */
40
- transform(value, countries) {
41
- return countries.find((countryIsoCode) => {
42
- const ruCodeTest = countryIsoCode === 'RU' &&
43
- /^[78]/.test(value) &&
44
- /^(?!880[1-9 ])/.test(value) &&
45
- value.length + 1 ===
46
- tuiGetMaxAllowedPhoneLength(this.countriesMasks, 'RU');
47
- const matched = ruCodeTest ||
48
- (value.startsWith(tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(CHAR_PLUS, '')) &&
49
- value.length + 1 ===
50
- tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));
51
- if (matched) {
52
- switch (countryIsoCode) {
53
- case 'KZ':
54
- return !tuiNotKzRegion(value);
55
- case 'RU':
56
- return tuiNotKzRegion(value);
57
- default:
58
- return true;
59
- }
60
- }
61
- return false;
62
- });
63
- }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
65
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, isStandalone: true, name: "tuiToCountryCode" }); }
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToCountryCodePipe, decorators: [{
68
- type: Pipe,
69
- args: [{
70
- standalone: true,
71
- name: 'tuiToCountryCode',
72
- }]
73
- }] });
74
-
75
- /**
76
- * Generated bundle index. Do not edit.
77
- */
78
-
79
- export { TuiToCountryCodePipe };
80
- //# sourceMappingURL=taiga-ui-legacy-pipes-to-country-code.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes-to-country-code.mjs","sources":["../../../projects/legacy/pipes/to-country-code/to-country-code.pipe.ts","../../../projects/legacy/pipes/to-country-code/taiga-ui-legacy-pipes-to-country-code.ts"],"sourcesContent":["import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {CHAR_PLUS} from '@taiga-ui/cdk/constants';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/legacy/tokens';\nimport {\n tuiGetMaxAllowedPhoneLength,\n tuiIsoToCountryCode,\n tuiNotKzRegion,\n} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0\n * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'\n * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'\n * ```\n */\n@Pipe({\n standalone: true,\n name: 'tuiToCountryCode',\n})\nexport class TuiToCountryCodePipe implements PipeTransform {\n private readonly countriesMasks = inject(TUI_COUNTRIES_MASKS);\n\n /**\n * @deprecated use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'\n * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'\n * ```\n */\n public transform(\n value: string,\n countries: readonly TuiCountryIsoCode[],\n ): TuiCountryIsoCode | undefined {\n return countries.find((countryIsoCode) => {\n const ruCodeTest =\n countryIsoCode === 'RU' &&\n /^[78]/.test(value) &&\n /^(?!880[1-9 ])/.test(value) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, 'RU');\n\n const matched =\n ruCodeTest ||\n (value.startsWith(\n tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(\n CHAR_PLUS,\n '',\n ),\n ) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));\n\n if (matched) {\n switch (countryIsoCode) {\n case 'KZ':\n return !tuiNotKzRegion(value);\n case 'RU':\n return tuiNotKzRegion(value);\n default:\n return true;\n }\n }\n\n return false;\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAUA;;;;;;;;;;;;;;AAcG;MAKU,oBAAoB,CAAA;AAJjC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAqDhE;AAnDG;;;;;;;;;;;;;AAaG;IACI,SAAS,CACZ,KAAa,EACb,SAAuC,EAAA;AAEvC,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,cAAc,KAAI;AACrC,YAAA,MAAM,UAAU,GACZ,cAAc,KAAK,IAAI;AACvB,gBAAA,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACnB,gBAAA,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B,KAAK,CAAC,MAAM,GAAG,CAAC;AACZ,oBAAA,2BAA2B,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC;YAE9D,MAAM,OAAO,GACT,UAAU;AACV,iBAAC,KAAK,CAAC,UAAU,CACb,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,OAAO,CAC5D,SAAS,EACT,EAAE,CACL,CACJ;oBACG,KAAK,CAAC,MAAM,GAAG,CAAC;wBACZ,2BAA2B,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;YAE7E,IAAI,OAAO,EAAE;gBACT,QAAQ,cAAc;AAClB,oBAAA,KAAK,IAAI;AACL,wBAAA,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;AACjC,oBAAA,KAAK,IAAI;AACL,wBAAA,OAAO,cAAc,CAAC,KAAK,CAAC;AAChC,oBAAA;AACI,wBAAA,OAAO,IAAI;;;AAIvB,YAAA,OAAO,KAAK;AAChB,SAAC,CAAC;;+GApDG,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,kBAAA,EAAA,CAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,kBAAkB;AAC3B,iBAAA;;;AC5BD;;AAEG;;;;"}
@@ -1,8 +0,0 @@
1
- export * from '@taiga-ui/legacy/pipes/format-phone';
2
- export * from '@taiga-ui/legacy/pipes/iso-to-country-code';
3
- export * from '@taiga-ui/legacy/pipes/to-country-code';
4
-
5
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- //# sourceMappingURL=taiga-ui-legacy-pipes.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-pipes.mjs","sources":["../../../projects/legacy/pipes/taiga-ui-legacy-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;AAEG"}
@@ -1,37 +0,0 @@
1
- import { type PipeTransform } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * @deprecated: drop in v5.0
5
- */
6
- export declare class TuiFormatPhonePipe implements PipeTransform {
7
- /**
8
- * Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
9
- * ```ts
10
- * import {maskitoTransform} from '@maskito/core';
11
- * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';
12
- * import metadata from 'libphonenumber-js/min/metadata';
13
- *
14
- * @Component({
15
- * standalone: true,
16
- * imports: [MaskitoPipe],
17
- * template: `
18
- * Phone: {{'12125552368' | maskito: options}}
19
- * <!-- Phone: +1 (212) 555-2368 -->
20
- * `,
21
- * })
22
- * export class YourComponent {
23
- * options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});
24
- * }
25
- * ```
26
- * ___
27
- * @deprecated Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
28
- * Formats phone number string of +7XXXXXXXXXX format with adding separator symbols
29
- * @param value
30
- * @param countryCode
31
- * @param phoneMask
32
- * @return formatted phone number string +7(XXX)XXX-XX-XX
33
- */
34
- transform(value: string, countryCode?: string, phoneMask?: string): string;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiFormatPhonePipe, never>;
36
- static ɵpipe: i0.ɵɵPipeDeclaration<TuiFormatPhonePipe, "tuiFormatPhone", true>;
37
- }
@@ -1 +0,0 @@
1
- export * from './format-phone.pipe';
package/pipes/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from '@taiga-ui/legacy/pipes/format-phone';
2
- export * from '@taiga-ui/legacy/pipes/iso-to-country-code';
3
- export * from '@taiga-ui/legacy/pipes/to-country-code';
@@ -1 +0,0 @@
1
- export * from './iso-to-country-code.pipe';
@@ -1,30 +0,0 @@
1
- import { type PipeTransform } from '@angular/core';
2
- import { type TuiCountryIsoCode } from '@taiga-ui/i18n/types';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * @deprecated: drop in v5.0
6
- * Use `getCountryCallingCode` from `libphonenumber-js/core` instead
7
- * ```ts
8
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
9
- * import metadata from 'libphonenumber-js/max/metadata';
10
- *
11
- * getCountryCallingCode('US', metadata) // 1
12
- * getCountryCallingCode('GB', metadata) // 44
13
- * ```
14
- */
15
- export declare class TuiIsoToCountryCodePipe implements PipeTransform {
16
- private readonly countriesMasks;
17
- /**
18
- * @deprecated Use `getCountryCallingCode` from `libphonenumber-js/core` instead
19
- * ```ts
20
- * import {getCountryCallingCode} from 'libphonenumber-js/core';
21
- * import metadata from 'libphonenumber-js/max/metadata';
22
- *
23
- * getCountryCallingCode('US', metadata) // 1
24
- * getCountryCallingCode('GB', metadata) // 44
25
- * ```
26
- */
27
- transform(isoCode: TuiCountryIsoCode): string;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiIsoToCountryCodePipe, never>;
29
- static ɵpipe: i0.ɵɵPipeDeclaration<TuiIsoToCountryCodePipe, "tuiIsoToCountryCode", true>;
30
- }
@@ -1 +0,0 @@
1
- export * from './to-country-code.pipe';
@@ -1,38 +0,0 @@
1
- import { type PipeTransform } from '@angular/core';
2
- import { type TuiCountryIsoCode } from '@taiga-ui/i18n/types';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * @deprecated: drop in v5.0
6
- * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
7
- * ```
8
- * npm i @maskito/phone
9
- * ```
10
- *
11
- * ```ts
12
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
13
- * import metadata from 'libphonenumber-js/min/metadata';
14
- *
15
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
16
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
17
- * ```
18
- */
19
- export declare class TuiToCountryCodePipe implements PipeTransform {
20
- private readonly countriesMasks;
21
- /**
22
- * @deprecated use `maskitoGetCountryFromNumber` from `@maskito/phone` instead
23
- * ```
24
- * npm i @maskito/phone
25
- * ```
26
- *
27
- * ```ts
28
- * import {maskitoGetCountryFromNumber} from '@maskito/phone';
29
- * import metadata from 'libphonenumber-js/min/metadata';
30
- *
31
- * maskitoGetCountryFromNumber('+1 (212) 555-2368', metadata); // 'US'
32
- * maskitoGetCountryFromNumber('+12125552368', metadata); // 'US'
33
- * ```
34
- */
35
- transform(value: string, countries: readonly TuiCountryIsoCode[]): TuiCountryIsoCode | undefined;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiToCountryCodePipe, never>;
37
- static ɵpipe: i0.ɵɵPipeDeclaration<TuiToCountryCodePipe, "tuiToCountryCode", true>;
38
- }
@@ -1,5 +0,0 @@
1
- import { isApple } from '@ng-web-apis/platform';
2
- /**
3
- * @deprecated: drop in v5.0
4
- */
5
- export declare const tuiIsApple: typeof isApple;