@taiga-ui/legacy 4.52.0-canary.e10b718 → 4.52.0-canary.eb5ffe3

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 (159) hide show
  1. package/components/dialog/dialog.component.d.ts +20 -0
  2. package/components/dialog/dialog.directive.d.ts +7 -0
  3. package/components/dialog/dialog.factory.d.ts +16 -0
  4. package/components/dialog/dialog.interfaces.d.ts +31 -0
  5. package/components/dialog/dialog.service.d.ts +7 -0
  6. package/components/dialog/dialog.tokens.d.ts +8 -0
  7. package/components/dialog/index.d.ts +6 -0
  8. package/components/index.d.ts +2 -9
  9. package/components/input/input.module.d.ts +1 -1
  10. package/components/input-date-range/input-date-range.module.d.ts +1 -1
  11. package/components/input-date-time/input-date-time.component.d.ts +4 -3
  12. package/components/input-date-time/input-date-time.module.d.ts +1 -1
  13. package/components/input-month-range/input-month-range.module.d.ts +1 -1
  14. package/components/input-range/input-range.component.d.ts +1 -1
  15. package/components/input-tag/input-tag.module.d.ts +1 -1
  16. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
  17. package/components/multi-select/multi-select.module.d.ts +1 -1
  18. package/components/pdf-viewer/index.d.ts +4 -0
  19. package/components/pdf-viewer/pdf-viewer.component.d.ts +12 -0
  20. package/components/pdf-viewer/pdf-viewer.directive.d.ts +7 -0
  21. package/components/pdf-viewer/pdf-viewer.options.d.ts +13 -0
  22. package/components/pdf-viewer/pdf-viewer.service.d.ts +13 -0
  23. package/components/select/select.module.d.ts +1 -1
  24. package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-legacy-components-dialog.mjs +129 -0
  26. package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -0
  27. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +5 -5
  28. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +6 -6
  30. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +2 -2
  32. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +3 -3
  34. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +7 -7
  36. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +3 -3
  38. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +5 -5
  40. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-legacy-components-input.mjs +4 -5
  42. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +9 -9
  45. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +82 -0
  47. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -0
  48. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +2 -2
  49. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-legacy-components-select.mjs +8 -9
  52. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +2 -2
  55. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-legacy-components.mjs +2 -9
  57. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +1 -2
  59. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-legacy.mjs +0 -2
  61. package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
  62. package/index.d.ts +0 -2
  63. package/package.json +8 -56
  64. package/utils/icons-path-factory.d.ts +1 -1
  65. package/components/color-selector/color-edit/color-edit.component.d.ts +0 -18
  66. package/components/color-selector/color-edit/color-edit.module.d.ts +0 -21
  67. package/components/color-selector/color-picker/color-picker.component.d.ts +0 -22
  68. package/components/color-selector/color-picker/color-picker.module.d.ts +0 -14
  69. package/components/color-selector/color-selector.component.d.ts +0 -47
  70. package/components/color-selector/color-selector.module.d.ts +0 -23
  71. package/components/color-selector/color-selector.options.d.ts +0 -25
  72. package/components/color-selector/flat-picker/flat-picker.component.d.ts +0 -12
  73. package/components/color-selector/flat-picker/flat-picker.module.d.ts +0 -12
  74. package/components/color-selector/index.d.ts +0 -16
  75. package/components/color-selector/linear-multi-picker/linear-multi-picker.component.d.ts +0 -17
  76. package/components/color-selector/linear-multi-picker/linear-multi-picker.module.d.ts +0 -12
  77. package/components/color-selector/linear-picker/linear-picker.component.d.ts +0 -10
  78. package/components/color-selector/linear-picker/linear-picker.module.d.ts +0 -12
  79. package/components/color-selector/palette/palette.component.d.ts +0 -10
  80. package/components/color-selector/palette/palette.module.d.ts +0 -13
  81. package/components/color-selector/services/picker.service.d.ts +0 -15
  82. package/components/combo-box/combo-box-strict.directive.d.ts +0 -12
  83. package/components/combo-box/combo-box.component.d.ts +0 -52
  84. package/components/combo-box/combo-box.directive.d.ts +0 -13
  85. package/components/combo-box/combo-box.module.d.ts +0 -20
  86. package/components/combo-box/index.d.ts +0 -4
  87. package/components/input-color/index.d.ts +0 -2
  88. package/components/input-color/input-color.component.d.ts +0 -30
  89. package/components/input-color/input-color.module.d.ts +0 -17
  90. package/components/input-date/index.d.ts +0 -3
  91. package/components/input-date/input-date.component.d.ts +0 -62
  92. package/components/input-date/input-date.directive.d.ts +0 -19
  93. package/components/input-date/input-date.module.d.ts +0 -24
  94. package/components/input-date/native-date/native-date.component.d.ts +0 -15
  95. package/components/input-phone/index.d.ts +0 -4
  96. package/components/input-phone/input-phone.component.d.ts +0 -52
  97. package/components/input-phone/input-phone.directive.d.ts +0 -16
  98. package/components/input-phone/input-phone.module.d.ts +0 -15
  99. package/components/input-phone/input-phone.options.d.ts +0 -22
  100. package/components/input-phone/utils/complete-phone-insertion-preprocessor.d.ts +0 -9
  101. package/components/input-phone/utils/create-phone-mask-expression.d.ts +0 -7
  102. package/components/input-phone/utils/index.d.ts +0 -2
  103. package/components/input-phone-international/index.d.ts +0 -3
  104. package/components/input-phone-international/input-phone-international.component.d.ts +0 -43
  105. package/components/input-phone-international/input-phone-international.options.d.ts +0 -25
  106. package/components/input-phone-international/utils/extract-value-from-event.d.ts +0 -4
  107. package/components/input-time/index.d.ts +0 -4
  108. package/components/input-time/input-time.component.d.ts +0 -62
  109. package/components/input-time/input-time.directive.d.ts +0 -17
  110. package/components/input-time/input-time.module.d.ts +0 -23
  111. package/components/input-time/input-time.options.d.ts +0 -42
  112. package/components/input-time/native-time/native-time.component.d.ts +0 -12
  113. package/components/input-year/index.d.ts +0 -3
  114. package/components/input-year/input-year.component.d.ts +0 -36
  115. package/components/input-year/input-year.directive.d.ts +0 -14
  116. package/components/input-year/input-year.module.d.ts +0 -18
  117. package/components/svg/content-processor.d.ts +0 -19
  118. package/components/svg/deprecated-icons.d.ts +0 -5
  119. package/components/svg/index.d.ts +0 -5
  120. package/components/svg/svg-options.d.ts +0 -50
  121. package/components/svg/svg.component.d.ts +0 -50
  122. package/components/svg/svg.service.d.ts +0 -21
  123. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs +0 -726
  124. package/fesm2022/taiga-ui-legacy-components-color-selector.mjs.map +0 -1
  125. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs +0 -300
  126. package/fesm2022/taiga-ui-legacy-components-combo-box.mjs.map +0 -1
  127. package/fesm2022/taiga-ui-legacy-components-input-color.mjs +0 -127
  128. package/fesm2022/taiga-ui-legacy-components-input-color.mjs.map +0 -1
  129. package/fesm2022/taiga-ui-legacy-components-input-date.mjs +0 -372
  130. package/fesm2022/taiga-ui-legacy-components-input-date.mjs.map +0 -1
  131. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs +0 -215
  132. package/fesm2022/taiga-ui-legacy-components-input-phone-international.mjs.map +0 -1
  133. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs +0 -373
  134. package/fesm2022/taiga-ui-legacy-components-input-phone.mjs.map +0 -1
  135. package/fesm2022/taiga-ui-legacy-components-input-time.mjs +0 -430
  136. package/fesm2022/taiga-ui-legacy-components-input-time.mjs.map +0 -1
  137. package/fesm2022/taiga-ui-legacy-components-input-year.mjs +0 -188
  138. package/fesm2022/taiga-ui-legacy-components-input-year.mjs.map +0 -1
  139. package/fesm2022/taiga-ui-legacy-components-svg.mjs +0 -387
  140. package/fesm2022/taiga-ui-legacy-components-svg.mjs.map +0 -1
  141. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs +0 -59
  142. package/fesm2022/taiga-ui-legacy-pipes-format-phone.mjs.map +0 -1
  143. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs +0 -50
  144. package/fesm2022/taiga-ui-legacy-pipes-iso-to-country-code.mjs.map +0 -1
  145. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs +0 -80
  146. package/fesm2022/taiga-ui-legacy-pipes-to-country-code.mjs.map +0 -1
  147. package/fesm2022/taiga-ui-legacy-pipes.mjs +0 -8
  148. package/fesm2022/taiga-ui-legacy-pipes.mjs.map +0 -1
  149. package/fesm2022/taiga-ui-legacy-services.mjs +0 -42
  150. package/fesm2022/taiga-ui-legacy-services.mjs.map +0 -1
  151. package/pipes/format-phone/format-phone.pipe.d.ts +0 -37
  152. package/pipes/format-phone/index.d.ts +0 -1
  153. package/pipes/index.d.ts +0 -3
  154. package/pipes/iso-to-country-code/index.d.ts +0 -1
  155. package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +0 -30
  156. package/pipes/to-country-code/index.d.ts +0 -1
  157. package/pipes/to-country-code/to-country-code.pipe.d.ts +0 -38
  158. package/services/index.d.ts +0 -1
  159. package/services/static-request.service.d.ts +0 -11
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-components-svg.mjs","sources":["../../../projects/legacy/components/svg/content-processor.ts","../../../projects/legacy/components/svg/deprecated-icons.ts","../../../projects/legacy/components/svg/svg.service.ts","../../../projects/legacy/components/svg/svg-options.ts","../../../projects/legacy/components/svg/svg.component.ts","../../../projects/legacy/components/svg/svg.template.html","../../../projects/legacy/components/svg/taiga-ui-legacy-components-svg.ts"],"sourcesContent":["import {type TuiSafeHtml} from '@taiga-ui/cdk/types';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\n\nfunction makeRandomSalt(): number {\n return Math.floor(Math.random() * Date.now());\n}\n\nfunction extractLinearGradientIdsFromSvg(svg: string): string[] {\n const ids = (svg.match(/url\\((\"?)('*)#(.*?)('*)\\)/g) ?? []).map((url) =>\n url.slice(4, url.length - 1).replaceAll(/['\"#]+/g, ''),\n );\n\n return Array.from(new Set(ids));\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n *\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nexport function tuiSvgLinearGradientProcessor(\n svg: TuiSafeHtml,\n salt: number | string = makeRandomSalt(),\n): TuiSafeHtml {\n if (tuiIsString(svg)) {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n\n return uniqueIds.reduce((newSvg, previousId) => {\n const newId = `id_${salt}_${previousId}`;\n\n return newSvg\n .replaceAll(`\"${previousId}\"`, `\"${newId}\"`)\n .replaceAll(`'${previousId}'`, `'${newId}'`)\n .replaceAll(`url('#${previousId}')`, `url('#${newId}')`)\n .replaceAll(`url(\"#${previousId}\")`, `url(\"#${newId}\")`)\n .replaceAll(`url(#${previousId})`, `url(#${newId})`);\n }, svg);\n }\n\n return svg;\n}\n","/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const TUI_DEPRECATED_ICONS: Record<string, string> = {\n tuiIconAttach: 'tuiIconPaperclip',\n tuiIconAttention: 'tuiIconAlertCircle',\n tuiIconBackCircle: 'tuiIconArrowLeftCircle',\n tuiIconCall: 'tuiIconPhone',\n tuiIconCallIn: 'tuiIconPhoneIncoming',\n tuiIconCallOut: 'tuiIconPhoneOutgoing',\n tuiIconCallTransfer: 'tuiIconPhoneForwarded',\n tuiIconCancel: 'tuiIconXCircle',\n tuiIconCancelCircle: 'tuiIconSlash',\n tuiIconCard: 'tuiIconCreditCard',\n tuiIconCards: 'tuiIconCreditCard',\n tuiIconChartBar: 'tuiIconBarChart',\n tuiIconChart: 'tuiIconBarChart',\n tuiIconCheckList: 'tuiIconClipboard',\n tuiIconCloseCircle: 'tuiIconXCircle',\n tuiIconCollapse: 'tuiIconMinimize',\n tuiIconComment: 'tuiIconMessageSquare',\n tuiIconCommentFw: 'tuiIconMessageForward',\n tuiIconCompany: 'tuiIconBriefcase',\n tuiIconDefaultDoc: 'tuiIconFile',\n tuiIconDesktop: 'tuiIconMonitor',\n tuiIconDesktopOff: 'tuiIconMonitorOff',\n tuiIconDislike: 'tuiIconThumbsDown',\n tuiIconDone: 'tuiIconCheckCircle',\n tuiIconDraft: 'tuiIconEdit2',\n tuiIconEyeOpen: 'tuiIconEye',\n tuiIconEyeClosed: 'tuiIconEyeOff',\n tuiIconExpand: 'tuiIconMaximize',\n tuiIconExternal: 'tuiIconExternalLink',\n tuiIconFrame: 'tuiIconLayout',\n tuiIconGeo: 'tuiIconMapPin',\n tuiIconHeartFilled: 'tuiIconHeart',\n tuiIconHide: 'tuiIconEyeOff',\n tuiIconImg: 'tuiIconImage',\n tuiIconInfoCircle: 'tuiIconInfo',\n tuiIconLike: 'tuiIconThumbsUp',\n tuiIconLockOpen: 'tuiIconUnlock',\n tuiIconMobile: 'tuiIconSmartphone',\n tuiIconMoreHor: 'tuiIconMoreHorizontal',\n tuiIconMoreVer: 'tuiIconMoreVertical',\n tuiIconMoreVert: 'tuiIconMoreVertical',\n tuiIconPicture: 'tuiIconImage',\n tuiIconPin: 'tuiIconMapPin',\n tuiIconPrint: 'tuiIconPrinter',\n tuiIconRefresh: 'tuiIconRefreshCw',\n tuiIconRemove: 'tuiIconX',\n tuiIconShow: 'tuiIconEye',\n tuiIconSound: 'tuiIconVolume',\n tuiIconSoundOff: 'tuiIconVolumeX',\n tuiIconStarFilled: 'tuiIconStar',\n tuiIconStop: 'tuiIconSquare',\n tuiIconStructure: 'tuiIconLayoutGrid',\n tuiIconTime: 'tuiIconClock',\n tuiIconTooltip: 'tuiIconHelpCircle',\n tuiIconViewList: 'tuiIconList',\n tuiIconWifiOn: 'tuiIconWifi',\n};\n","/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {inject, Injectable, SecurityContext} from '@angular/core';\nimport {DomSanitizer, type SafeHtml} from '@angular/platform-browser';\nimport {TUI_ICON_STARTS, TUI_SANITIZER} from '@taiga-ui/legacy/tokens';\nimport {tuiProcessIcon} from '@taiga-ui/legacy/utils';\nimport {BehaviorSubject} from 'rxjs';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * Service for reusing SVGs without inlining each instance\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiSvgService {\n private readonly tuiSanitizer = inject(TUI_SANITIZER, {optional: true});\n private readonly sanitizer = inject(DomSanitizer);\n private originals: Record<string, string> = {};\n\n public readonly items$ = new BehaviorSubject<Map<string, SafeHtml>>(new Map());\n\n constructor() {\n this.define(inject(TUI_ICON_STARTS));\n }\n\n public define(icons: Record<string, string>): void {\n const {value} = this.items$;\n\n Object.keys(icons).forEach((key) => {\n this.defineIcon(key, icons[key] ?? '', value);\n });\n\n this.items$.next(value);\n }\n\n public getOriginal(name: string): string | null {\n return this.originals[name] || null;\n }\n\n private defineIcon(name: string, src: string, map: Map<string, SafeHtml>): void {\n if (map.has(name)) {\n return;\n }\n\n const parsed = this.parseSrc(name, src);\n\n if (!parsed) {\n ngDevMode && console.assert(false, 'Unable to parse given SVG src');\n\n return;\n }\n\n map.set(name, parsed);\n this.originals = {\n ...this.originals,\n [name]: src,\n };\n }\n\n private parseSrc(name: string, src: string): SafeHtml {\n return this.sanitize(tuiProcessIcon(src, name));\n }\n\n private sanitize(src: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(\n (this.tuiSanitizer\n ? this.tuiSanitizer.sanitize(SecurityContext.HTML, src)\n : this.sanitizer.sanitize(SecurityContext.HTML, src)) || '',\n );\n }\n}\n","import {\n type FactoryProvider,\n InjectionToken,\n Optional,\n type Provider,\n SkipSelf,\n} from '@angular/core';\nimport {\n type TuiHandler,\n type TuiSafeHtml,\n type TuiStringHandler,\n} from '@taiga-ui/cdk/types';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiIconsPathFactory} from '@taiga-ui/legacy/utils';\nimport {identity} from 'rxjs';\n\nimport {tuiSvgLinearGradientProcessor} from './content-processor';\nimport {TUI_DEPRECATED_ICONS} from './deprecated-icons';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const TUI_DEFAULT_ICONS_PLACE = 'assets/taiga-ui/icons';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport interface TuiSvgOptions {\n readonly contentProcessor: TuiHandler<TuiSafeHtml, TuiSafeHtml>;\n readonly deprecated: TuiStringHandler<string>;\n readonly iconsPlace: string;\n readonly path: (name: string, baseHref?: string) => string;\n readonly srcProcessor: TuiHandler<TuiSafeHtml, TuiSafeHtml>;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport type TuiSvgInterceptorHandler =\n | ((src: TuiSafeHtml, options: TuiSvgOptions) => TuiSafeHtml)\n | ((src: TuiSafeHtml) => TuiSafeHtml);\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const TUI_SVG_DEFAULT_OPTIONS: TuiSvgOptions = {\n iconsPlace: TUI_DEFAULT_ICONS_PLACE,\n path: tuiIconsPathFactory(TUI_DEFAULT_ICONS_PLACE),\n srcProcessor: identity,\n contentProcessor: tuiSvgLinearGradientProcessor,\n deprecated: (src) => {\n const oldIcon = src.replace('Large', '').replace('Outline', '');\n const newIcon = TUI_DEPRECATED_ICONS[oldIcon];\n\n return newIcon\n ? `${oldIcon}/(Large|Outline) is deprecated, use ${newIcon}/(Large|Outline) instead`\n : '';\n },\n};\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const TUI_SVG_OPTIONS = new InjectionToken<TuiSvgOptions>(\n ngDevMode ? 'TUI_SVG_OPTIONS' : '',\n {\n factory: () => ({\n iconsPlace: TUI_DEFAULT_ICONS_PLACE,\n path: tuiIconsPathFactory(TUI_DEFAULT_ICONS_PLACE),\n deprecated: TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor: identity,\n contentProcessor: tuiSvgLinearGradientProcessor,\n }),\n },\n);\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const TUI_SVG_SRC_INTERCEPTORS = new InjectionToken<TuiSvgInterceptorHandler>(\n ngDevMode ? 'TUI_SVG_SRC_INTERCEPTORS' : '',\n);\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport function tuiSvgSrcInterceptors(interceptor: TuiSvgInterceptorHandler): Provider {\n return {\n provide: TUI_SVG_SRC_INTERCEPTORS,\n useValue: interceptor,\n multi: true,\n };\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport const tuiSvgOptionsProvider: (\n options: Partial<Omit<TuiSvgOptions, 'path'>> & {\n path?: TuiSvgOptions['path'] | string;\n },\n) => FactoryProvider = (options) => ({\n provide: TUI_SVG_OPTIONS,\n deps: [[new SkipSelf(), new Optional(), TUI_SVG_OPTIONS]],\n useFactory: (fallback: TuiSvgOptions | null): TuiSvgOptions => ({\n iconsPlace:\n options.iconsPlace ??\n fallback?.iconsPlace ??\n TUI_SVG_DEFAULT_OPTIONS.iconsPlace,\n path: tuiIsString(options.path)\n ? tuiIconsPathFactory(options.path)\n : (options.path ?? fallback?.path ?? TUI_SVG_DEFAULT_OPTIONS.path),\n deprecated:\n options.deprecated ??\n fallback?.deprecated ??\n TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor:\n options.srcProcessor ??\n fallback?.srcProcessor ??\n TUI_SVG_DEFAULT_OPTIONS.srcProcessor,\n contentProcessor:\n options.contentProcessor ??\n fallback?.contentProcessor ??\n TUI_SVG_DEFAULT_OPTIONS.contentProcessor,\n }),\n});\n","/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {AsyncPipe, DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n Input,\n SecurityContext,\n} from '@angular/core';\nimport {DomSanitizer, type SafeHtml} from '@angular/platform-browser';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {TUI_BASE_HREF} from '@taiga-ui/cdk/tokens';\nimport {type TuiSafeHtml} from '@taiga-ui/cdk/types';\nimport {tuiGetDocumentOrShadowRoot, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiStaticRequestService} from '@taiga-ui/legacy/services';\nimport {TUI_SANITIZER} from '@taiga-ui/legacy/tokens';\nimport {TUI_CACHE_BUSTING_PAYLOAD, tuiIsPresumedHTMLString} from '@taiga-ui/legacy/utils';\nimport {\n catchError,\n map,\n type Observable,\n of,\n ReplaySubject,\n startWith,\n switchMap,\n} from 'rxjs';\n\nimport {TuiSvgService} from './svg.service';\nimport {\n TUI_SVG_OPTIONS,\n TUI_SVG_SRC_INTERCEPTORS,\n type TuiSvgInterceptorHandler,\n type TuiSvgOptions,\n} from './svg-options';\n\nconst UNDEFINED_NAMED_ICON = 'Attempted to use undefined named icon';\nconst MISSING_EXTERNAL_ICON = 'External icon is missing on the given URL';\nconst FAILED_EXTERNAL_ICON = 'Failed to load external SVG';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\nexport interface TuiIconError {\n readonly icon: string;\n readonly message: string;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiIcon}\n * https://taiga-ui.dev/components/icon\n */\n@Component({\n selector: 'tui-svg',\n imports: [AsyncPipe],\n templateUrl: './svg.template.html',\n styleUrls: ['./svg.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiSvgComponent {\n private icon: TuiSafeHtml = '';\n private readonly doc = inject(DOCUMENT);\n private readonly win = inject(WA_WINDOW);\n private readonly options = inject(TUI_SVG_OPTIONS);\n private readonly tuiSanitizer = inject(TUI_SANITIZER, {optional: true});\n private readonly svgService = inject(TuiSvgService);\n private readonly staticRequestService = inject(TuiStaticRequestService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly el = tuiInjectElement();\n private readonly baseHref = inject(TUI_BASE_HREF);\n private readonly src$ = new ReplaySubject<void>(1);\n private readonly srcInterceptors = inject(TUI_SVG_SRC_INTERCEPTORS, {\n optional: true,\n }) as readonly TuiSvgInterceptorHandler[] | null;\n\n protected readonly innerHTML$: Observable<SafeHtml> = this.src$.pipe(\n switchMap(() => {\n if (tuiIsString(this.icon)) {\n return this.isExternal\n ? this.getExternalIcon(this.icon)\n : of(this.getSafeHtml(this.icon));\n }\n\n return of(this.icon);\n }),\n startWith(''),\n );\n\n @Input()\n public set src(src: TuiSafeHtml | null | undefined) {\n const deprecated = this.options.deprecated(String(src));\n\n ngDevMode && console.assert(!deprecated, deprecated);\n\n this.icon = (this.srcInterceptors ?? []).reduce(\n (newSrc, interceptor: TuiSvgInterceptorHandler) =>\n interceptor(newSrc, this.options),\n this.options.srcProcessor(src || ''),\n );\n\n this.src$.next();\n }\n\n public get src(): TuiSafeHtml {\n return this.icon;\n }\n\n public get use(): string {\n if (tuiIsString(this.icon)) {\n return this.icon.includes('.svg#')\n ? this.icon\n : this.resolveName(this.icon, this.options.path);\n }\n\n return '';\n }\n\n public get isInnerHTML(): boolean {\n return (\n !tuiIsString(this.icon) ||\n this.isSrc ||\n this.isExternal ||\n (this.isName && this.isShadowDOM)\n );\n }\n\n protected onError(message: string = MISSING_EXTERNAL_ICON): void {\n const {icon} = this;\n const event = new CustomEvent<TuiIconError>('tui-icon-error', {\n bubbles: true,\n detail: {\n message,\n icon: icon as string,\n },\n });\n\n ngDevMode && console.assert(false, message, icon);\n this.el.dispatchEvent(event);\n }\n\n private get isShadowDOM(): boolean {\n return tuiGetDocumentOrShadowRoot(this.el) !== this.doc;\n }\n\n private get isUse(): boolean {\n return this.use.replace(TUI_CACHE_BUSTING_PAYLOAD, '').includes('.svg#');\n }\n\n private get isExternal(): boolean {\n return (\n this.isUrl ||\n this.isCrossDomain ||\n (!this.isSrc && !this.svgService.getOriginal(String(this.icon)))\n );\n }\n\n private get isUrl(): boolean {\n return (\n tuiIsString(this.icon) &&\n this.icon.replace(TUI_CACHE_BUSTING_PAYLOAD, '').endsWith('.svg')\n );\n }\n\n private get isSrc(): boolean {\n return tuiIsString(this.icon) && tuiIsPresumedHTMLString(this.icon);\n }\n\n private get isName(): boolean {\n return !this.isUrl && !this.isUse && !this.isSrc;\n }\n\n private get isCrossDomain(): boolean {\n const {use, isUse, win} = this;\n\n return (\n isUse && use.startsWith('http') && !!win.origin && !use.startsWith(win.origin)\n );\n }\n\n @tuiPure\n private resolveName(name: string, iconsPath: TuiSvgOptions['path']): string {\n return iconsPath(name, this.baseHref);\n }\n\n private getSafeHtml(src: string): SafeHtml {\n return this.isSrc ? this.sanitize(src) : this.process(src);\n }\n\n private process(src: string): SafeHtml {\n const icon = this.svgService.getOriginal(src);\n\n if (this.isName && !icon && !!src) {\n this.onError(UNDEFINED_NAMED_ICON);\n }\n\n return this.sanitize(icon || '');\n }\n\n private sanitize(src: TuiSafeHtml): TuiSafeHtml {\n src = this.options.contentProcessor(src);\n\n return this.tuiSanitizer && tuiIsString(src)\n ? this.sanitizer.bypassSecurityTrustHtml(\n this.tuiSanitizer.sanitize(SecurityContext.HTML, src) || '',\n )\n : src;\n }\n\n private getExternalIcon(src: string): Observable<SafeHtml> {\n const url = src.includes('.svg') ? src : this.use;\n\n return this.staticRequestService.request(url).pipe(\n catchError(() => {\n this.onError(FAILED_EXTERNAL_ICON);\n\n return of('');\n }),\n map((response) =>\n this.sanitize(response.replace('<svg', '<svg focusable=\"false\"')),\n ),\n );\n }\n}\n","<div\n class=\"t-src\"\n [innerHTML]=\"innerHTML$ | async\"\n></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,SAAS,cAAc,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,C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AAA,EAAA,CAAA;;AErLvB;;AAEG;;;;"}
@@ -1,59 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe } from '@angular/core';
3
- import { CHAR_PLUS } from '@taiga-ui/cdk/constants';
4
- import { tuiFormatPhone } from '@taiga-ui/legacy/utils';
5
-
6
- /// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
7
- /**
8
- * @deprecated: drop in v5.0
9
- */
10
- class TuiFormatPhonePipe {
11
- /**
12
- * Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
13
- * ```ts
14
- * import {maskitoTransform} from '@maskito/core';
15
- * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';
16
- * import metadata from 'libphonenumber-js/min/metadata';
17
- *
18
- * @Component({
19
- * standalone: true,
20
- * imports: [MaskitoPipe],
21
- * template: `
22
- * Phone: {{'12125552368' | maskito: options}}
23
- * <!-- Phone: +1 (212) 555-2368 -->
24
- * `,
25
- * })
26
- * export class YourComponent {
27
- * options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});
28
- * }
29
- * ```
30
- * ___
31
- * @deprecated Use {@link https://maskito.dev/frameworks/angular#pipe MaskitoPipe} instead!
32
- * Formats phone number string of +7XXXXXXXXXX format with adding separator symbols
33
- * @param value
34
- * @param countryCode
35
- * @param phoneMask
36
- * @return formatted phone number string +7(XXX)XXX-XX-XX
37
- */
38
- transform(value, countryCode = `${CHAR_PLUS}7`, phoneMask = '(###) ###-##-##') {
39
- ngDevMode &&
40
- console.assert(value !== undefined, 'Undefined was passed to tuiFormatPhone pipe');
41
- return tuiFormatPhone(value, countryCode, phoneMask);
42
- }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
44
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, isStandalone: true, name: "tuiFormatPhone" }); }
45
- }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFormatPhonePipe, decorators: [{
47
- type: Pipe,
48
- args: [{
49
- standalone: true,
50
- name: 'tuiFormatPhone',
51
- }]
52
- }] });
53
-
54
- /**
55
- * Generated bundle index. Do not edit.
56
- */
57
-
58
- export { TuiFormatPhonePipe };
59
- //# sourceMappingURL=taiga-ui-legacy-pipes-format-phone.mjs.map
@@ -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,42 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
3
- import { switchMap, shareReplay } from 'rxjs';
4
- import { fromFetch } from 'rxjs/fetch';
5
-
6
- /**
7
- * @deprecated: drop in v5.0
8
- */
9
- class TuiStaticRequestService {
10
- constructor() {
11
- this.cache = new Map();
12
- }
13
- request(url) {
14
- const cache = this.cache.get(url);
15
- if (cache) {
16
- return cache;
17
- }
18
- const piped = fromFetch(url).pipe(switchMap(async (response) => {
19
- if (response.ok) {
20
- return response.text();
21
- }
22
- throw new Error(`Failed to load ${url} (${response.statusText})`);
23
- }), shareReplay({ bufferSize: 1, refCount: false }));
24
- this.cache.set(url, piped);
25
- return piped;
26
- }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStaticRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
28
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStaticRequestService, providedIn: 'root' }); }
29
- }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiStaticRequestService, decorators: [{
31
- type: Injectable,
32
- args: [{
33
- providedIn: 'root',
34
- }]
35
- }] });
36
-
37
- /**
38
- * Generated bundle index. Do not edit.
39
- */
40
-
41
- export { TuiStaticRequestService };
42
- //# sourceMappingURL=taiga-ui-legacy-services.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-services.mjs","sources":["../../../projects/legacy/services/static-request.service.ts","../../../projects/legacy/services/taiga-ui-legacy-services.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {type Observable, shareReplay, switchMap} from 'rxjs';\nimport {fromFetch} from 'rxjs/fetch';\n\n/**\n * @deprecated: drop in v5.0\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiStaticRequestService {\n private readonly cache = new Map<string, Observable<string>>();\n\n public request(url: string): Observable<string> {\n const cache = this.cache.get(url);\n\n if (cache) {\n return cache;\n }\n\n const piped = fromFetch(url).pipe(\n switchMap(async (response) => {\n if (response.ok) {\n return response.text();\n }\n\n throw new Error(`Failed to load ${url} (${response.statusText})`);\n }),\n shareReplay({bufferSize: 1, refCount: false}),\n );\n\n this.cache.set(url, piped);\n\n return piped;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;AAEG;MAIU,uBAAuB,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,GAAG,EAA8B;AAwBjE;AAtBU,IAAA,OAAO,CAAC,GAAW,EAAA;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;QAEjC,IAAI,KAAK,EAAE;AACP,YAAA,OAAO,KAAK;;AAGhB,QAAA,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAC7B,SAAS,CAAC,OAAO,QAAQ,KAAI;AACzB,YAAA,IAAI,QAAQ,CAAC,EAAE,EAAE;AACb,gBAAA,OAAO,QAAQ,CAAC,IAAI,EAAE;;YAG1B,MAAM,IAAI,KAAK,CAAC,CAAkB,eAAA,EAAA,GAAG,CAAK,EAAA,EAAA,QAAQ,CAAC,UAAU,CAAG,CAAA,CAAA,CAAC;AACrE,SAAC,CAAC,EACF,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAChD;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC;AAE1B,QAAA,OAAO,KAAK;;+GAvBP,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFpB,MAAM,EAAA,CAAA,CAAA;;4FAET,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACTD;;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 +0,0 @@
1
- export * from './static-request.service';
@@ -1,11 +0,0 @@
1
- import { type Observable } from 'rxjs';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * @deprecated: drop in v5.0
5
- */
6
- export declare class TuiStaticRequestService {
7
- private readonly cache;
8
- request(url: string): Observable<string>;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiStaticRequestService, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiStaticRequestService>;
11
- }