@taiga-ui/core 2.49.1 → 2.50.1

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 (157) hide show
  1. package/bundles/taiga-ui-core-components-data-list.umd.js +2 -1
  2. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-data-list.umd.min.js +1 -1
  4. package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-core-components-dialog.umd.js +3 -2
  6. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
  8. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +5 -4
  10. package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -1
  12. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-hints-host.umd.js +5 -5
  14. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -1
  16. package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +18 -19
  18. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -1
  20. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-root.umd.js +1 -1
  22. package/bundles/taiga-ui-core-components-root.umd.min.js +1 -1
  23. package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  27. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  28. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  29. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  30. package/bundles/taiga-ui-core-tokens.umd.js +2 -2
  31. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  32. package/bundles/taiga-ui-core-tokens.umd.min.js +1 -1
  33. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  34. package/bundles/taiga-ui-core-utils-format.umd.js +1 -0
  35. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  36. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  37. package/bundles/taiga-ui-core-utils-mask.umd.js +3 -1
  38. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-core-utils-mobile.umd.js +18 -0
  41. package/bundles/taiga-ui-core-utils-mobile.umd.js.map +1 -0
  42. package/bundles/taiga-ui-core-utils-mobile.umd.min.js +2 -0
  43. package/bundles/taiga-ui-core-utils-mobile.umd.min.js.map +1 -0
  44. package/bundles/taiga-ui-core-utils.umd.js +12 -4
  45. package/bundles/taiga-ui-core-utils.umd.js.map +1 -1
  46. package/bundles/taiga-ui-core-utils.umd.min.js +1 -1
  47. package/components/data-list/data-list.component.d.ts +1 -1
  48. package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
  49. package/components/dialog/dialog.component.d.ts +2 -2
  50. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  51. package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
  52. package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
  53. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  54. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +6 -6
  55. package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
  56. package/components/scrollbar/scrollbar.component.d.ts +1 -1
  57. package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
  58. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  59. package/constants/version.d.ts +1 -1
  60. package/esm2015/components/data-list/data-list.component.js +3 -3
  61. package/esm2015/components/dialog/dialog.component.js +2 -2
  62. package/esm2015/components/dialog/dialog.providers.js +4 -3
  63. package/esm2015/components/dropdown-box/dropdown-box.component.js +7 -6
  64. package/esm2015/components/hints-host/hint-box/hint-box.component.js +3 -2
  65. package/esm2015/components/primitive-textfield/primitive-textfield.module.js +2 -4
  66. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +17 -19
  67. package/esm2015/components/root/root.component.js +1 -1
  68. package/esm2015/components/scrollbar/scrollbar.component.js +4 -4
  69. package/esm2015/constants/version.js +2 -2
  70. package/esm2015/interfaces/number-format-settings.js +1 -1
  71. package/esm2015/tokens/is-mobile-resolution.js +4 -3
  72. package/esm2015/types/dialog-size.js +1 -1
  73. package/esm2015/utils/format/format-number.js +2 -1
  74. package/esm2015/utils/index.js +2 -1
  75. package/esm2015/utils/mask/create-number-mask.js +4 -2
  76. package/esm2015/utils/mobile/index.js +2 -0
  77. package/esm2015/utils/mobile/is-mobile.js +4 -0
  78. package/esm2015/utils/mobile/taiga-ui-core-utils-mobile.js +5 -0
  79. package/esm5/components/data-list/data-list.component.js +3 -2
  80. package/esm5/components/dialog/dialog.component.js +2 -2
  81. package/esm5/components/dialog/dialog.providers.js +4 -3
  82. package/esm5/components/dropdown-box/dropdown-box.component.js +7 -6
  83. package/esm5/components/hints-host/hint-box/hint-box.component.js +3 -2
  84. package/esm5/components/primitive-textfield/primitive-textfield.module.js +2 -4
  85. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +17 -19
  86. package/esm5/components/root/root.component.js +1 -1
  87. package/esm5/components/scrollbar/scrollbar.component.js +4 -4
  88. package/esm5/constants/version.js +2 -2
  89. package/esm5/interfaces/number-format-settings.js +1 -1
  90. package/esm5/tokens/is-mobile-resolution.js +4 -3
  91. package/esm5/types/dialog-size.js +1 -1
  92. package/esm5/utils/format/format-number.js +2 -1
  93. package/esm5/utils/index.js +2 -1
  94. package/esm5/utils/mask/create-number-mask.js +4 -2
  95. package/esm5/utils/mobile/index.js +2 -0
  96. package/esm5/utils/mobile/is-mobile.js +6 -0
  97. package/esm5/utils/mobile/taiga-ui-core-utils-mobile.js +5 -0
  98. package/fesm2015/taiga-ui-core-components-data-list.js +2 -2
  99. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  100. package/fesm2015/taiga-ui-core-components-dialog.js +4 -3
  101. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  102. package/fesm2015/taiga-ui-core-components-dropdown-box.js +6 -5
  103. package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
  104. package/fesm2015/taiga-ui-core-components-hints-host.js +2 -1
  105. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  106. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +17 -19
  107. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  108. package/fesm2015/taiga-ui-core-components-root.js +1 -1
  109. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  110. package/fesm2015/taiga-ui-core-constants.js +1 -1
  111. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  112. package/fesm2015/taiga-ui-core-tokens.js +3 -3
  113. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  114. package/fesm2015/taiga-ui-core-utils-format.js +1 -0
  115. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  116. package/fesm2015/taiga-ui-core-utils-mask.js +3 -1
  117. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  118. package/fesm2015/taiga-ui-core-utils-mobile.js +10 -0
  119. package/fesm2015/taiga-ui-core-utils-mobile.js.map +1 -0
  120. package/fesm2015/taiga-ui-core-utils.js +1 -0
  121. package/fesm2015/taiga-ui-core-utils.js.map +1 -1
  122. package/fesm5/taiga-ui-core-components-data-list.js +2 -1
  123. package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
  124. package/fesm5/taiga-ui-core-components-dialog.js +4 -3
  125. package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
  126. package/fesm5/taiga-ui-core-components-dropdown-box.js +6 -5
  127. package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
  128. package/fesm5/taiga-ui-core-components-hints-host.js +2 -1
  129. package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
  130. package/fesm5/taiga-ui-core-components-primitive-textfield.js +17 -19
  131. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  132. package/fesm5/taiga-ui-core-components-root.js +1 -1
  133. package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
  134. package/fesm5/taiga-ui-core-constants.js +1 -1
  135. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  136. package/fesm5/taiga-ui-core-tokens.js +3 -3
  137. package/fesm5/taiga-ui-core-tokens.js.map +1 -1
  138. package/fesm5/taiga-ui-core-utils-format.js +1 -0
  139. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  140. package/fesm5/taiga-ui-core-utils-mask.js +3 -1
  141. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  142. package/fesm5/taiga-ui-core-utils-mobile.js +12 -0
  143. package/fesm5/taiga-ui-core-utils-mobile.js.map +1 -0
  144. package/fesm5/taiga-ui-core-utils.js +1 -0
  145. package/fesm5/taiga-ui-core-utils.js.map +1 -1
  146. package/package.json +4 -4
  147. package/styles/theme/wrapper/base.less +1 -1
  148. package/styles/theme/wrapper/icon.less +20 -0
  149. package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
  150. package/types/dialog-size.d.ts +1 -1
  151. package/utils/index.d.ts +1 -0
  152. package/utils/mobile/index.d.ts +1 -0
  153. package/utils/mobile/is-mobile.d.ts +2 -0
  154. package/utils/mobile/package.json +13 -0
  155. package/utils/mobile/taiga-ui-core-utils-mobile.d.ts +4 -0
  156. package/utils/mobile/taiga-ui-core-utils-mobile.metadata.json +1 -0
  157. package/utils/taiga-ui-core-utils.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: readonly string[] = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.49.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAAsB,CAAC,GAAG,EAAE,GAAG;;ICElD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,uBAAuB,GAAG,YAAY;IACtC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICP/B,OAAO,GAAG;;ACAvB;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-constants.js","sources":["ng://@taiga-ui/core/constants/absolute-box-sizes.ts","ng://@taiga-ui/core/constants/decimal-symbols.ts","ng://@taiga-ui/core/constants/default-icons-path.ts","ng://@taiga-ui/core/constants/default-marker-handler.ts","ng://@taiga-ui/core/constants/editing-keys.ts","ng://@taiga-ui/core/constants/events.ts","ng://@taiga-ui/core/constants/mask-caret-trap.ts","ng://@taiga-ui/core/constants/media.ts","ng://@taiga-ui/core/constants/regexp.ts","ng://@taiga-ui/core/constants/version.ts","ng://@taiga-ui/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["export const DEFAULT_MARGIN = 4;\nexport const DEFAULT_MIN_HEIGHT = 80;\nexport const DEFAULT_MAX_HEIGHT = 400;\nexport const DEFAULT_MAX_WIDTH = 600;\n","export const TUI_DECIMAL_SYMBOLS: readonly string[] = [',', '.'];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes('.svg#') ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","export const tuiEditingKeys: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = 'tui-expand-loaded';\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = 'tui-scrollable';\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = 'tui-icon-error';\n","export const MASK_CARET_TRAP = '[]';\n","/**\n * Media constants are exact the same as css media breakpoints\n * @deprecated use TUI_MEDIA token\n */\nexport const MEDIA = {\n mobile: 320,\n tablet: 600,\n desktopSmall: 1024,\n desktopLarge: 1280,\n};\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","export const VERSION = '2.50.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAAa,cAAc,GAAG,EAAE;IACnB,kBAAkB,GAAG,GAAG;IACxB,kBAAkB,GAAG,IAAI;IACzB,iBAAiB,GAAG;;ICHpB,mBAAmB,GAAsB,CAAC,GAAG,EAAE,GAAG;;ICElD,kBAAkB,GAA6B,UAAA,IAAI;IAC5D,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,MAAI,IAAM;AAA1C;;ICAS,0BAA0B,GAAqB,cAAM,OAAA,WAAW;;ICHhE,cAAc,GAAsB;IAC7C,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;;;ACTV;;;;IAIa,iBAAiB,GAAG,oBAAoB;AAErD;;;IAGa,oBAAoB,GAAG,uBAAuB;AAE3D;;;;IAIa,cAAc,GAAG,iBAAiB;AAE/C;;;IAGa,cAAc,GAAG;;ICpBjB,eAAe,GAAG;;ACA/B;;;;IAIa,KAAK,GAAG;IACjB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;;;ICRT,gBAAgB,GAAG,KAAK;IACxB,oBAAoB,GAAG,KAAK;IAC5B,qBAAqB,GAAG,OAAO;IAC/B,yBAAyB,GAAG,MAAM;IAClC,uBAAuB,GAAG,YAAY;IACtC,gCAAgC,GAAG,mCAAmC;IACtE,gBAAgB,GAAG,QAAQ;IAC3B,4BAA4B,GAAG;;ICP/B,OAAO,GAAG;;ACAvB;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { InjectionToken, inject, isDevMode, NgZone } from '@angular/core';
2
2
  import { extractI18n } from '@taiga-ui/i18n';
3
- import { iconsPathFactory } from '@taiga-ui/core/utils';
3
+ import { iconsPathFactory, tuiIsMobile } from '@taiga-ui/core/utils';
4
4
  import { WINDOW } from '@ng-web-apis/common';
5
5
  import { typedFromEvent, tuiZoneOptimized, CHAR_NO_BREAK_SPACE, TUI_SANITIZER as TUI_SANITIZER$1 } from '@taiga-ui/cdk';
6
6
  import { share, startWith, map, distinctUntilChanged } from 'rxjs/operators';
@@ -78,8 +78,8 @@ var TUI_MEDIA = new InjectionToken('Token for media constant', {
78
78
  var TUI_IS_MOBILE_RES = new InjectionToken('Mobile resolution stream for private providers', {
79
79
  factory: function () {
80
80
  var windowRef = inject(WINDOW);
81
- var mobile = inject(TUI_MEDIA).mobile;
82
- return typedFromEvent(windowRef, 'resize').pipe(share(), startWith(null), map(function () { return windowRef.innerWidth < mobile; }), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));
81
+ var media = inject(TUI_MEDIA);
82
+ return typedFromEvent(windowRef, 'resize').pipe(share(), startWith(null), map(function () { return tuiIsMobile(windowRef, media); }), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));
83
83
  },
84
84
  });
85
85
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-tokens.js","sources":["ng://@taiga-ui/core/tokens/animations-duration.ts","ng://@taiga-ui/core/tokens/animation-options.ts","ng://@taiga-ui/core/tokens/assert-enabled.ts","ng://@taiga-ui/core/tokens/data-list-accessor.ts","ng://@taiga-ui/core/tokens/data-list-host.ts","ng://@taiga-ui/core/tokens/document-or-shadow-root.ts","ng://@taiga-ui/core/tokens/dropdown-directive.ts","ng://@taiga-ui/core/tokens/element-ref.ts","ng://@taiga-ui/core/tokens/first-day-of-week.ts","ng://@taiga-ui/core/tokens/i18n.ts","ng://@taiga-ui/core/tokens/icon-place.ts","ng://@taiga-ui/core/tokens/icons.ts","ng://@taiga-ui/core/tokens/icons-path.ts","ng://@taiga-ui/core/tokens/media.ts","ng://@taiga-ui/core/tokens/is-mobile-resolution.ts","ng://@taiga-ui/core/tokens/mode.ts","ng://@taiga-ui/core/tokens/notification-options.ts","ng://@taiga-ui/core/tokens/number-format.ts","ng://@taiga-ui/core/tokens/option-content.ts","ng://@taiga-ui/core/tokens/ordered-short-week-days.ts","ng://@taiga-ui/core/tokens/sanitizer.ts","ng://@taiga-ui/core/tokens/scroll-ref.ts","ng://@taiga-ui/core/tokens/svg-content-processor.ts","ng://@taiga-ui/core/tokens/svg-src-processor.ts","ng://@taiga-ui/core/tokens/textfield-appearance.ts","ng://@taiga-ui/core/tokens/textfield-host.ts","ng://@taiga-ui/core/tokens/theme.ts","ng://@taiga-ui/core/tokens/value-accessor.ts","ng://@taiga-ui/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nexport const TUI_ANIMATIONS_DURATION = new InjectionToken<number>(\n 'Duration of all Taiga UI animations in ms',\n {\n factory: () => 300,\n },\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\nexport const TUI_ANIMATION_OPTIONS = new InjectionToken<AnimationOptions>(\n 'Options for Taiga UI animations',\n {\n factory: () => ({\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n }),\n },\n);\n","import {InjectionToken, isDevMode} from '@angular/core';\n\nexport const TUI_ASSERT_ENABLED = new InjectionToken(\n 'Flag to enable assertions across Taiga UI',\n {\n factory: () => isDevMode(),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n 'Accessor for options',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n 'DataList controller',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n 'Document or ShadowRoot',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DROPDOWN_DIRECTIVE = new InjectionToken<TuiDropdown>(\n 'Directive controlling TuiDropdownBoxComponent',\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(\n 'ElementRef when you cannot use @Input for single time injection',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk';\n\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<TuiDayOfWeek>(\n 'The first day of the week index',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\n\nexport const TUI_MONTHS = new InjectionToken('Localized months names', {\n factory: extractI18n('months'),\n});\n\nexport const TUI_CLOSE_WORD = new InjectionToken(`i18n 'close' word`, {\n factory: extractI18n('close'),\n});\n\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n `i18n 'Nothing found' message`,\n {\n factory: extractI18n('nothingFoundMessage'),\n },\n);\n\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(`i18n of error message`, {\n factory: extractI18n('defaultErrorMessage'),\n});\n\nexport const TUI_SPIN_TEXTS = new InjectionToken('spin i18n texts', {\n factory: extractI18n('spinTexts'),\n});\n\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken('calendars i18n texts', {\n factory: extractI18n('shortWeekDays'),\n});\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS_PLACE: InjectionToken<string> = new InjectionToken<string>(\n 'Recommended paths to icons from documentation guide',\n {\n factory: () => 'assets/taiga-ui/icons',\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS = new InjectionToken<Record<string, string>>(\n 'A key/value dictionary of icon names and src to be defined with TuiSvgService',\n {\n factory: () => ({}),\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {iconsPathFactory} from '@taiga-ui/core/utils';\n\nimport {TUI_ICONS_PLACE} from './icon-place';\n\nexport const TUI_ICONS_PATH: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'A handler to retrieve USE id for icon by name',\n {factory: () => iconsPathFactory(inject(TUI_ICONS_PLACE))},\n );\n","import {InjectionToken} from '@angular/core';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>('Token for media constant', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {inject, InjectionToken, NgZone} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiZoneOptimized, typedFromEvent} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, share, startWith} from 'rxjs/operators';\n\nimport {TUI_MEDIA} from './media';\n\nexport const TUI_IS_MOBILE_RES = new InjectionToken<Observable<boolean>>(\n 'Mobile resolution stream for private providers',\n {\n factory: () => {\n const windowRef = inject(WINDOW);\n const {mobile} = inject(TUI_MEDIA);\n\n return typedFromEvent(windowRef, 'resize').pipe(\n share(),\n startWith(null),\n map(() => windowRef.innerWidth < mobile),\n distinctUntilChanged(),\n tuiZoneOptimized(inject(NgZone)),\n );\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(\n 'Mode stream for private providers',\n );\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\n\nexport interface TuiNotificationDefaultOptions\n extends Omit<TuiAlertOptions<unknown>, 'data'> {\n readonly defaultAutoCloseTime: number;\n}\n\n/**\n * @deprecated: remove in v3.0, use TuiNotificationDefaultOptions\n */\nexport type NotificationTokenOptions = TuiNotificationDefaultOptions;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: true,\n label: '',\n status: TuiNotification.Info,\n hasIcon: true,\n hasCloseButton: true,\n defaultAutoCloseTime: 3000,\n};\n\nexport const TUI_NOTIFICATION_OPTIONS = new InjectionToken<TuiNotificationDefaultOptions>(\n 'Default parameters for notification alert component',\n {\n factory: () => TUI_NOTIFICATION_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_NOTIFICATION_OPTIONS,\n useValue: {...TUI_NOTIFICATION_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_NUMBER_FORMAT = new InjectionToken<TuiNumberFormatSettings>(\n 'Formatting configuration for displayed numbers',\n {\n factory: () => ({\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n }),\n },\n);\n","import {InjectionToken, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>>\n>('Content for tuiOption component');\n","import {inject, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK, TUI_SHORT_WEEK_DAYS} from './index';\n\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\n// TODO: 3.0 Remove export in ivy compilation\nexport const convertToSundayFirstWeekFormat = (\n weekDaysNames: WEEK_DAYS_NAMES,\n): WEEK_DAYS_NAMES => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = new InjectionToken<\n Observable<WEEK_DAYS_NAMES>\n>('Ordered calendars i18n texts', {\n factory: () => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n },\n});\n","import {TUI_SANITIZER as TOKEN} from '@taiga-ui/cdk';\n\nexport const TUI_SANITIZER = TOKEN;\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken<ElementRef<HTMLElement>>(\n 'Scrollable container',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {svgLinearGradientProcessor} from '@taiga-ui/cdk/utils/svg';\n\nexport const TUI_SVG_CONTENT_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'Transform function the contents of the loaded svg file',\n {factory: () => svgLinearGradientProcessor},\n );\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\nexport const TUI_SVG_SRC_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>('Source path processor for svg', {\n factory: () => identity,\n });\n","import {InjectionToken} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\nexport const TUI_TEXTFIELD_APPEARANCE = new InjectionToken<string>(\n 'Appearance for inputs',\n {\n factory: () => TuiAppearance.Textfield,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n 'An interface to communicate with textfield based controls',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken<string>('Theme name', {\n factory: () => 'Taiga',\n});\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n 'Buffer token to pass NG_VALUE_ACCESSOR to a different Injector',\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TOKEN"],"mappings":";;;;;;;;;;IAEa,uBAAuB,GAAG,IAAI,cAAc,CACrD,2CAA2C,EAC3C;IACI,OAAO,EAAE,cAAM,OAAA,GAAG,GAAA;CACrB;;ICDQ,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE,cAAM,QAAC;QACZ,MAAM,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,uBAAuB,CAAC;SAC5C;KACJ,IAAC;CACL;;ICXQ,kBAAkB,GAAG,IAAI,cAAc,CAChD,2CAA2C,EAC3C;IACI,OAAO,EAAE,cAAM,OAAA,SAAS,EAAE,GAAA;CAC7B;;ICHQ,sBAAsB,GAAG,IAAI,cAAc,CACpD,sBAAsB;;ICDb,kBAAkB,GAAG,IAAI,cAAc,CAChD,qBAAqB;;ICFZ,2BAA2B,GAAG,IAAI,cAAc,CACzD,wBAAwB;;ICAf,sBAAsB,GAAG,IAAI,cAAc,CACpD,+CAA+C;;ICFtC,eAAe,GAAG,IAAI,cAAc,CAC7C,iEAAiE;;ICAxD,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE,cAAM,wBAAmB;CACrC;;ICJQ,UAAU,GAAG,IAAI,cAAc,CAAC,wBAAwB,EAAE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AAI,cAAc,CAE3D,8BAA8B,EAAE;IAC9B,OAAO,EAAE;QACL,IAAM,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAE1D,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CACnC,GAAG,CAAC,8BAA8B,CAAC,EACnC,GAAG,CACC,UAAA,QAAQ;YACJ,OAAA,SACO,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,EACnC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,CACzB;SAAA,CAC3B,CACJ,CAAC;KACL;CACJ;;ICnCY,aAAa,GAAGA;;ICAhB,cAAc,GAAG,IAAI,cAAc,CAC5C,sBAAsB;;ICCb,yBAAyB,GAClC,IAAI,cAAc,CACd,wDAAwD,EACxD,EAAC,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA,EAAC;;ICHtC,qBAAqB,GAC9B,IAAI,cAAc,CAA2B,+BAA+B,EAAE;IAC1E,OAAO,EAAE,cAAM,OAAA,QAAQ,GAAA;CAC1B;;ICJQ,wBAAwB,GAAG,IAAI,cAAc,CACtD,uBAAuB,EACvB;IACI,OAAO,EAAE,cAAM,qCAAuB;CACzC;;ICJQ,kBAAkB,GAAG,IAAI,cAAc,CAChD,2DAA2D;;ICFlD,SAAS,GAAG,IAAI,cAAc,CAAS,YAAY,EAAE;IAC9D,OAAO,EAAE,cAAM,OAAA,OAAO,GAAA;CACzB;;ICDY,kBAAkB,GAAG,IAAI,cAAc,CAChD,gEAAgE;;ACJpE;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-tokens.js","sources":["ng://@taiga-ui/core/tokens/animations-duration.ts","ng://@taiga-ui/core/tokens/animation-options.ts","ng://@taiga-ui/core/tokens/assert-enabled.ts","ng://@taiga-ui/core/tokens/data-list-accessor.ts","ng://@taiga-ui/core/tokens/data-list-host.ts","ng://@taiga-ui/core/tokens/document-or-shadow-root.ts","ng://@taiga-ui/core/tokens/dropdown-directive.ts","ng://@taiga-ui/core/tokens/element-ref.ts","ng://@taiga-ui/core/tokens/first-day-of-week.ts","ng://@taiga-ui/core/tokens/i18n.ts","ng://@taiga-ui/core/tokens/icon-place.ts","ng://@taiga-ui/core/tokens/icons.ts","ng://@taiga-ui/core/tokens/icons-path.ts","ng://@taiga-ui/core/tokens/media.ts","ng://@taiga-ui/core/tokens/is-mobile-resolution.ts","ng://@taiga-ui/core/tokens/mode.ts","ng://@taiga-ui/core/tokens/notification-options.ts","ng://@taiga-ui/core/tokens/number-format.ts","ng://@taiga-ui/core/tokens/option-content.ts","ng://@taiga-ui/core/tokens/ordered-short-week-days.ts","ng://@taiga-ui/core/tokens/sanitizer.ts","ng://@taiga-ui/core/tokens/scroll-ref.ts","ng://@taiga-ui/core/tokens/svg-content-processor.ts","ng://@taiga-ui/core/tokens/svg-src-processor.ts","ng://@taiga-ui/core/tokens/textfield-appearance.ts","ng://@taiga-ui/core/tokens/textfield-host.ts","ng://@taiga-ui/core/tokens/theme.ts","ng://@taiga-ui/core/tokens/value-accessor.ts","ng://@taiga-ui/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\n\nexport const TUI_ANIMATIONS_DURATION = new InjectionToken<number>(\n 'Duration of all Taiga UI animations in ms',\n {\n factory: () => 300,\n },\n);\n","import {AnimationOptions} from '@angular/animations';\nimport {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_ANIMATIONS_DURATION} from './animations-duration';\n\nexport const TUI_ANIMATION_OPTIONS = new InjectionToken<AnimationOptions>(\n 'Options for Taiga UI animations',\n {\n factory: () => ({\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION),\n },\n }),\n },\n);\n","import {InjectionToken, isDevMode} from '@angular/core';\n\nexport const TUI_ASSERT_ENABLED = new InjectionToken(\n 'Flag to enable assertions across Taiga UI',\n {\n factory: () => isDevMode(),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_ACCESSOR = new InjectionToken<TuiDataListAccessor>(\n 'Accessor for options',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DATA_LIST_HOST = new InjectionToken<TuiDataListHost<unknown>>(\n 'DataList controller',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken<DocumentOrShadowRoot>(\n 'Document or ShadowRoot',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDropdown} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DROPDOWN_DIRECTIVE = new InjectionToken<TuiDropdown>(\n 'Directive controlling TuiDropdownBoxComponent',\n);\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_ELEMENT_REF = new InjectionToken<ElementRef>(\n 'ElementRef when you cannot use @Input for single time injection',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk';\n\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<TuiDayOfWeek>(\n 'The first day of the week index',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {extractI18n} from '@taiga-ui/i18n';\n\nexport const TUI_MONTHS = new InjectionToken('Localized months names', {\n factory: extractI18n('months'),\n});\n\nexport const TUI_CLOSE_WORD = new InjectionToken(`i18n 'close' word`, {\n factory: extractI18n('close'),\n});\n\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n `i18n 'Nothing found' message`,\n {\n factory: extractI18n('nothingFoundMessage'),\n },\n);\n\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(`i18n of error message`, {\n factory: extractI18n('defaultErrorMessage'),\n});\n\nexport const TUI_SPIN_TEXTS = new InjectionToken('spin i18n texts', {\n factory: extractI18n('spinTexts'),\n});\n\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken('calendars i18n texts', {\n factory: extractI18n('shortWeekDays'),\n});\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS_PLACE: InjectionToken<string> = new InjectionToken<string>(\n 'Recommended paths to icons from documentation guide',\n {\n factory: () => 'assets/taiga-ui/icons',\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICONS = new InjectionToken<Record<string, string>>(\n 'A key/value dictionary of icon names and src to be defined with TuiSvgService',\n {\n factory: () => ({}),\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {iconsPathFactory} from '@taiga-ui/core/utils';\n\nimport {TUI_ICONS_PLACE} from './icon-place';\n\nexport const TUI_ICONS_PATH: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'A handler to retrieve USE id for icon by name',\n {factory: () => iconsPathFactory(inject(TUI_ICONS_PLACE))},\n );\n","import {InjectionToken} from '@angular/core';\nimport {TuiMedia} from '@taiga-ui/core/interfaces';\n\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>('Token for media constant', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {inject, InjectionToken, NgZone} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiZoneOptimized, typedFromEvent} from '@taiga-ui/cdk';\nimport {tuiIsMobile} from '@taiga-ui/core/utils';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, share, startWith} from 'rxjs/operators';\n\nimport {TUI_MEDIA} from './media';\n\nexport const TUI_IS_MOBILE_RES = new InjectionToken<Observable<boolean>>(\n 'Mobile resolution stream for private providers',\n {\n factory: () => {\n const windowRef = inject(WINDOW);\n const media = inject(TUI_MEDIA);\n\n return typedFromEvent(windowRef, 'resize').pipe(\n share(),\n startWith(null),\n map(() => tuiIsMobile(windowRef, media)),\n distinctUntilChanged(),\n tuiZoneOptimized(inject(NgZone)),\n );\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MODE: InjectionToken<Observable<TuiBrightness | null>> =\n new InjectionToken<Observable<TuiBrightness | null>>(\n 'Mode stream for private providers',\n );\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\n\nexport interface TuiNotificationDefaultOptions\n extends Omit<TuiAlertOptions<unknown>, 'data'> {\n readonly defaultAutoCloseTime: number;\n}\n\n/**\n * @deprecated: remove in v3.0, use TuiNotificationDefaultOptions\n */\nexport type NotificationTokenOptions = TuiNotificationDefaultOptions;\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationDefaultOptions = {\n autoClose: true,\n label: '',\n status: TuiNotification.Info,\n hasIcon: true,\n hasCloseButton: true,\n defaultAutoCloseTime: 3000,\n};\n\nexport const TUI_NOTIFICATION_OPTIONS = new InjectionToken<TuiNotificationDefaultOptions>(\n 'Default parameters for notification alert component',\n {\n factory: () => TUI_NOTIFICATION_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiNotificationOptionsProvider(\n options: Partial<TuiNotificationDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_NOTIFICATION_OPTIONS,\n useValue: {...TUI_NOTIFICATION_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_NUMBER_FORMAT = new InjectionToken<TuiNumberFormatSettings>(\n 'Formatting configuration for displayed numbers',\n {\n factory: () => ({\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n }),\n },\n);\n","import {InjectionToken, TemplateRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_OPTION_CONTENT = new InjectionToken<\n PolymorpheusContent<TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>>\n>('Content for tuiOption component');\n","import {inject, InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TUI_FIRST_DAY_OF_WEEK, TUI_SHORT_WEEK_DAYS} from './index';\n\nexport type WEEK_DAYS_NAMES = [string, string, string, string, string, string, string];\n\n// TODO: 3.0 Remove export in ivy compilation\nexport const convertToSundayFirstWeekFormat = (\n weekDaysNames: WEEK_DAYS_NAMES,\n): WEEK_DAYS_NAMES => {\n const sundayIndex = weekDaysNames.length - 1;\n\n return [\n weekDaysNames[sundayIndex],\n ...weekDaysNames.slice(0, sundayIndex),\n ] as WEEK_DAYS_NAMES;\n};\n\nexport const TUI_ORDERED_SHORT_WEEK_DAYS = new InjectionToken<\n Observable<WEEK_DAYS_NAMES>\n>('Ordered calendars i18n texts', {\n factory: () => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n\n return inject(TUI_SHORT_WEEK_DAYS).pipe(\n map(convertToSundayFirstWeekFormat),\n map(\n weekDays =>\n [\n ...weekDays.slice(firstDayOfWeekIndex),\n ...weekDays.slice(0, firstDayOfWeekIndex),\n ] as WEEK_DAYS_NAMES,\n ),\n );\n },\n});\n","import {TUI_SANITIZER as TOKEN} from '@taiga-ui/cdk';\n\nexport const TUI_SANITIZER = TOKEN;\n","import {ElementRef, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken<ElementRef<HTMLElement>>(\n 'Scrollable container',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {svgLinearGradientProcessor} from '@taiga-ui/cdk/utils/svg';\n\nexport const TUI_SVG_CONTENT_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>(\n 'Transform function the contents of the loaded svg file',\n {factory: () => svgLinearGradientProcessor},\n );\n","import {InjectionToken} from '@angular/core';\nimport {TuiStringHandler} from '@taiga-ui/cdk';\nimport {identity} from 'rxjs';\n\nexport const TUI_SVG_SRC_PROCESSOR: InjectionToken<TuiStringHandler<string>> =\n new InjectionToken<TuiStringHandler<string>>('Source path processor for svg', {\n factory: () => identity,\n });\n","import {InjectionToken} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\n\nexport const TUI_TEXTFIELD_APPEARANCE = new InjectionToken<string>(\n 'Appearance for inputs',\n {\n factory: () => TuiAppearance.Textfield,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiTextfieldHost} from '@taiga-ui/core/interfaces';\n\nexport const TUI_TEXTFIELD_HOST = new InjectionToken<TuiTextfieldHost>(\n 'An interface to communicate with textfield based controls',\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken<string>('Theme name', {\n factory: () => 'Taiga',\n});\n","import {InjectionToken} from '@angular/core';\nimport {ControlValueAccessor} from '@angular/forms';\n\nexport const TUI_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>(\n 'Buffer token to pass NG_VALUE_ACCESSOR to a different Injector',\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TOKEN"],"mappings":";;;;;;;;;;IAEa,uBAAuB,GAAG,IAAI,cAAc,CACrD,2CAA2C,EAC3C;IACI,OAAO,EAAE,cAAM,OAAA,GAAG,GAAA;CACrB;;ICDQ,qBAAqB,GAAG,IAAI,cAAc,CACnD,iCAAiC,EACjC;IACI,OAAO,EAAE,cAAM,QAAC;QACZ,MAAM,EAAE;YACJ,QAAQ,EAAE,MAAM,CAAC,uBAAuB,CAAC;SAC5C;KACJ,IAAC;CACL;;ICXQ,kBAAkB,GAAG,IAAI,cAAc,CAChD,2CAA2C,EAC3C;IACI,OAAO,EAAE,cAA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IAAI,cAAc,CAChD,2DAA2D;;ICFlD,SAAS,GAAG,IAAI,cAAc,CAAS,YAAY,EAAE;IAC9D,OAAO,EAAE,cAAM,OAAA,OAAO,GAAA;CACzB;;ICDY,kBAAkB,GAAG,IAAI,cAAc,CAChD,gEAAgE;;ACJpE;;;;;;"}
@@ -48,6 +48,7 @@ function getFractionPartPadded(value, precision) {
48
48
  : fractionPartPadded;
49
49
  }
50
50
 
51
+ // TODO: refactor later to `formatNumber(value: number, options: Partial<AllTheStuff>)`
51
52
  /**
52
53
  * Formats number adding a thousand separators and correct decimal separator
53
54
  * padding decimal part with zeroes to given length
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-format.js","sources":["ng://@taiga-ui/core/utils/format/capitalize.ts","ng://@taiga-ui/core/utils/format/capitalize-first-letter.ts","ng://@taiga-ui/core/utils/format/number-to-string-without-exp.ts","ng://@taiga-ui/core/utils/format/get-fractional-part-padded.ts","ng://@taiga-ui/core/utils/format/format-number.ts","ng://@taiga-ui/core/utils/format/format-phone.ts","ng://@taiga-ui/core/utils/format/other-decimal-symbol.ts","ng://@taiga-ui/core/utils/format/pluralize.ts","ng://@taiga-ui/core/utils/format/pluralize-to-icu.ts","ng://@taiga-ui/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","export function capitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function numberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split('.');\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');\n\n return typeof precision === 'number'\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN, CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n * @param decimalSeparator separator between the integer and the decimal part\n * @param thousandSeparator separator between thousands\n * @param zeroPadding enable zeros at the end of decimal part\n * @return the formatted string\n */\nexport function formatNumber(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = ',',\n thousandSeparator: string = CHAR_NO_BREAK_SPACE,\n zeroPadding: boolean = true,\n): string {\n const integerPartString = String(Math.floor(Math.abs(value)));\n\n let fractionPartPadded = getFractionPartPadded(value, decimalLimit);\n\n if (decimalLimit !== null) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\nexport function formatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return '';\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, '');\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, '');\n }\n\n const splitPhoneMask = phoneMask.split('');\n const splitValue = value.slice(countryCode.length).split('');\n\n result += ' ';\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (let i = 0; i < splitPhoneMask.length; i++) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (splitPhoneMask[i] === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += splitPhoneMask[i];\n }\n }\n\n return result;\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === '.' ? ',' : '.';\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n/**\n * Selects the correct plural form to display.\n *\n * @param value the input number\n * @param args an array of three plural forms, e.g. ['год', 'года', 'лет']\n * @deprecated This implementation targets Russian.\n * Use https://angular.io/api/common/NgPlural for your implementations.\n */\nexport function pluralize(value: number, [one, few, many]: TuiPluralize): string {\n const ten = value % 10;\n const hundred = value % 100;\n\n // 1, 21, 101, 121, но не 11, 111, 211...\n if (ten === 1 && hundred !== 11) {\n return one;\n }\n\n // 2, 3, 4, 22, 33, 44, 152, 163, 174, но не 12, 13, 14, 112, 213, 314...\n if (ten >= 2 && ten <= 4 && (hundred < 10 || hundred >= 20)) {\n return few;\n }\n\n return many;\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n// TODO: 3.0 remove in 3.0\n\n/**\n * Temporary util for mapping TuiPluralize array to ICU format\n */\nexport function tuiPluralizeToICU(pluralize: TuiPluralize): Record<string, string> {\n return {\n one: pluralize[0],\n few: pluralize[1],\n many: pluralize[2],\n other: pluralize[2],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;SAOgB,UAAU,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;AAClF;;SCTgB,qBAAqB,CAAC,KAAa;IAC/C,OAAO,KAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAG,CAAC;AAC/D;;ACFA;;;;;;SAMgB,wBAAwB,CAAC,KAAa;IAClD,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAA,yCAAiD,EAAhD,kBAAU,EAAE,eAAoC,CAAC;IAExD,IAAI,eAAe,GAAG,aAAa,CAAC;IAEpC,IAAI,OAAO,EAAE;QACH,IAAA,qCAA0C,EAAvC,sBAAuC,CAAC;QACjD,IAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,KAAI,CAAC,CAAC,CAAC;QAEtE,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;KAClD;IAED,OAAO,eAAe,CAAC;AAC3B;;AClBA;;;;;;;SAOgB,qBAAqB,CAAC,KAAa,EAAE,SAAyB;IACpE,IAAA,0DAAwE,EAArE,UAAuB,EAAvB,4CAAqE,CAAC;IAE/E,OAAO,OAAO,S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I,EAAE,CAAC;YAC9B,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAC3B;aAAM;YACH,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;SAC/B;KACJ;IAED,OAAO,MAAM,CAAC;AAClB;;SCjDgB,kBAAkB,CAAC,MAAwB;IACvD,OAAO,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACtC;;ACFA;;;;;;;;SAQgB,SAAS,CAAC,KAAa,EAAE,EAA8B;QAA9B,kBAA8B,EAA7B,WAAG,EAAE,WAAG,EAAE,YAAI;IACpD,IAAM,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC;IACvB,IAAM,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC;;IAG5B,IAAI,GAAG,KAAK,CAAC,IAAI,OAAO,KAAK,EAAE,EAAE;QAC7B,OAAO,GAAG,CAAC;KACd;;IAGD,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,OAAO,GAAG,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,EAAE;QACzD,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB;;ACvBA;AAEA;;;SAGgB,iBAAiB,CAAC,SAAuB;IACrD,OAAO;QACH,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAClB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;KACtB,CAAC;AACN;;ACdA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-format.js","sources":["ng://@taiga-ui/core/utils/format/capitalize.ts","ng://@taiga-ui/core/utils/format/capitalize-first-letter.ts","ng://@taiga-ui/core/utils/format/number-to-string-without-exp.ts","ng://@taiga-ui/core/utils/format/get-fractional-part-padded.ts","ng://@taiga-ui/core/utils/format/format-number.ts","ng://@taiga-ui/core/utils/format/format-phone.ts","ng://@taiga-ui/core/utils/format/other-decimal-symbol.ts","ng://@taiga-ui/core/utils/format/pluralize.ts","ng://@taiga-ui/core/utils/format/pluralize-to-icu.ts","ng://@taiga-ui/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\nexport function capitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","export function capitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function numberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split('.');\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {numberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function getFractionPartPadded(value: number, precision?: number | null): string {\n const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');\n\n return typeof precision === 'number'\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN, CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\n\nimport {getFractionPartPadded} from './get-fractional-part-padded';\n\n// TODO: refactor later to `formatNumber(value: number, options: Partial<AllTheStuff>)`\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param decimalLimit number of digits of decimal part, null to keep untouched\n * @param decimalSeparator separator between the integer and the decimal part\n * @param thousandSeparator separator between thousands\n * @param zeroPadding enable zeros at the end of decimal part\n * @return the formatted string\n */\nexport function formatNumber(\n value: number,\n decimalLimit: number | null = null,\n decimalSeparator: string = ',',\n thousandSeparator: string = CHAR_NO_BREAK_SPACE,\n zeroPadding: boolean = true,\n): string {\n const integerPartString = String(Math.floor(Math.abs(value)));\n\n let fractionPartPadded = getFractionPartPadded(value, decimalLimit);\n\n if (decimalLimit !== null) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = '0'.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, '');\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : '';\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\nexport function formatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return '';\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, '');\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, '');\n }\n\n const splitPhoneMask = phoneMask.split('');\n const splitValue = value.slice(countryCode.length).split('');\n\n result += ' ';\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (let i = 0; i < splitPhoneMask.length; i++) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (splitPhoneMask[i] === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += splitPhoneMask[i];\n }\n }\n\n return result;\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function otherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === '.' ? ',' : '.';\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n/**\n * Selects the correct plural form to display.\n *\n * @param value the input number\n * @param args an array of three plural forms, e.g. ['год', 'года', 'лет']\n * @deprecated This implementation targets Russian.\n * Use https://angular.io/api/common/NgPlural for your implementations.\n */\nexport function pluralize(value: number, [one, few, many]: TuiPluralize): string {\n const ten = value % 10;\n const hundred = value % 100;\n\n // 1, 21, 101, 121, но не 11, 111, 211...\n if (ten === 1 && hundred !== 11) {\n return one;\n }\n\n // 2, 3, 4, 22, 33, 44, 152, 163, 174, но не 12, 13, 14, 112, 213, 314...\n if (ten >= 2 && ten <= 4 && (hundred < 10 || hundred >= 20)) {\n return few;\n }\n\n return many;\n}\n","import {TuiPluralize} from '@taiga-ui/core/types';\n\n// TODO: 3.0 remove in 3.0\n\n/**\n * Temporary util for mapping TuiPluralize array to ICU format\n */\nexport function tuiPluralizeToICU(pluralize: TuiPluralize): Record<string, string> {\n return {\n one: pluralize[0],\n few: pluralize[1],\n many: pluralize[2],\n other: pluralize[2],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;SAOgB,UAAU,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,WAAW,EAAE,GAAA,CAAC,CAAC;AAClF;;SCTgB,qBAAqB,CAAC,KAAa;IAC/C,OAAO,KAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,C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D,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,OAAO,GAAG,EAAE,IAAI,OAAO,IAAI,EAAE,CAAC,EAAE;QACzD,OAAO,GAAG,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAChB;;ACvBA;AAEA;;;SAGgB,iBAAiB,CAAC,SAAuB;IACrD,OAAO;QACH,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAClB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;KACtB,CAAC;AACN;;ACdA;;;;;;"}
@@ -240,7 +240,9 @@ function convertToMask(strNumber) {
240
240
  }
241
241
  function addThousandsSeparator(strNumber, thousandSymbol) {
242
242
  return strNumber.length > 3
243
- ? strNumber.replace(/\B(?=(\d{3})+(?!\d))/g, thousandSymbol)
243
+ ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
244
+ // eslint-disable-next-line unicorn/no-unsafe-regex
245
+ strNumber.replace(/\B(?=(\d{3})+(?!\d))/g, thousandSymbol)
244
246
  : strNumber;
245
247
  }
246
248
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["ng://@taiga-ui/core/utils/mask/create-auto-corrected-money-pipe.ts","ng://@taiga-ui/core/utils/mask/create-correction-mask.ts","ng://@taiga-ui/core/utils/mask/create-number-mask.ts","ng://@taiga-ui/core/utils/mask/enable-auto-correct-decimal-symbol.ts","ng://@taiga-ui/core/utils/mask/masked-money-value-is-empty.ts","ng://@taiga-ui/core/utils/mask/masked-number-string-to-number.ts","ng://@taiga-ui/core/utils/mask/taiga-ui-core-utils-mask.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n getDocumentOrShadowRoot,\n isNativeFocused,\n isSafari,\n tuiAssert,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = ',',\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener('beforeinput', () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && isNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== getDocumentOrShadowRoot(nativeInput) &&\n isNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === '' || !decimalLimit) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + '0'.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = ',',\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = '',\n current: string,\n previousCaret: number,\n decimalSymbol: string = ',',\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, '');\n const currentWithoutTail = current.replace(tailRegex, '');\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === '0' ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = '',\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = 'Correction function must return single char or null';\n\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split('').reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {otherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = ',',\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n tuiAssert.assert(Number.isInteger(integerLimit));\n tuiAssert.assert(integerLimit >= 0);\n\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join('');\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join('')\n .split(decimalSymbol)\n .join('');\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue[0] === CHAR_HYPHEN || rawValue[0] === CHAR_EN_DASH) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return ['0', decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, 'g')) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, '');\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [''];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, '')\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ''),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== otherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < decimalLimit - fractionCapped.length; i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === '0';\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<string | RegExp>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<string | RegExp> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n } else if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(otherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<string | RegExp> {\n return strNumber\n .split('')\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\nexport function maskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case '':\n case CHAR_HYPHEN:\n case ',':\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function maskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join('').split(decimalsSymbol).join('.'),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;SAGgB,gCAAgC,CAC5C,YAAwB,EACxB,aAAqC,EACrC,cAA4C,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAa;IALb,6BAAA,EAAA,gBAAwB;IACxB,8BAAA,EAAA,mBAAqC;IACrC,+BAAA,EAAA,oCAA4C;IAG5C,sBAAA,EAAA,aAAa;IAEb,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IACjD,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;;IAGpC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IACvB,IAAM,OAAO,GAAG,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AAG;YAClB,OAAO,IAAI,CAAC;QAChB;YACI,OAAO,KAAK,CAAC;KACpB;AACL;;SCVgB,0BAA0B,CACtC,KAAa,EACb,cAAgC,EAChC,cAAsB;IAEtB,OAAO,UAAU,CACb,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CACvE,CAAC;AACN;;ACVA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["ng://@taiga-ui/core/utils/mask/create-auto-corrected-money-pipe.ts","ng://@taiga-ui/core/utils/mask/create-correction-mask.ts","ng://@taiga-ui/core/utils/mask/create-number-mask.ts","ng://@taiga-ui/core/utils/mask/enable-auto-correct-decimal-symbol.ts","ng://@taiga-ui/core/utils/mask/masked-money-value-is-empty.ts","ng://@taiga-ui/core/utils/mask/masked-number-string-to-number.ts","ng://@taiga-ui/core/utils/mask/taiga-ui-core-utils-mask.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n getDocumentOrShadowRoot,\n isNativeFocused,\n isSafari,\n tuiAssert,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = ',',\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && isSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener('beforeinput', () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && isNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== getDocumentOrShadowRoot(nativeInput) &&\n isNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === '' || !decimalLimit) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + '0'.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = ',',\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = '',\n current: string,\n previousCaret: number,\n decimalSymbol: string = ',',\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, '');\n const currentWithoutTail = current.replace(tailRegex, '');\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === '0' ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = '',\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = 'Correction function must return single char or null';\n\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split('').reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {otherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = ',',\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n tuiAssert.assert(Number.isInteger(decimalLimit));\n tuiAssert.assert(decimalLimit >= 0);\n tuiAssert.assert(Number.isInteger(integerLimit));\n tuiAssert.assert(integerLimit >= 0);\n\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join('');\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join('')\n .split(decimalSymbol)\n .join('');\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue[0] === CHAR_HYPHEN || rawValue[0] === CHAR_EN_DASH) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return ['0', decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, 'g')) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, '');\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [''];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, '')\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ''),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== otherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < decimalLimit - fractionCapped.length; i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === '0';\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<string | RegExp>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<string | RegExp> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n } else if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(otherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<string | RegExp> {\n return strNumber\n .split('')\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.\n // eslint-disable-next-line unicorn/no-unsafe-regex\n strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\nexport function maskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case '':\n case CHAR_HYPHEN:\n case ',':\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function maskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join('').split(decimalsSymbol).join('.'),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;SAGgB,gCAAgC,CAC5C,YAAwB,EACxB,aAAqC,EACrC,cAA4C,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAa;IALb,6BAAA,EAAA,gBAAwB;IACxB,8BAAA,EAAA,mBAAqC;IACrC,+BAAA,EAAA,oCAA4C;IAG5C,sBAAA,EAAA,aAAa;IAEb,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IACjD,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;;IAGpC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IACvB,IAAM,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC;IAElE,IAAI,WAAW,IAAI,OAAO,EAAE;QACxB,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE;YACxC,aAAa,GAAG,WAAW,CAAC,cAAc,IAAI,CAAC,CAAC;SACnD,CAAC,CAAC;KACN;IAED,OAAO,UAAC,cAAc,EAAE,MAAM;;QAE1B,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,aAAa,EAAE;YACrE,OAAO,WAAW,CAAC;SACtB;;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
3
+ var mobile = _b.mobile;
4
+ return innerWidth <= mobile;
5
+ }
6
+
7
+ /**
8
+ * Generated bundle index. Do not edit.
9
+ */
10
+
11
+ export { tuiIsMobile };
12
+ //# sourceMappingURL=taiga-ui-core-utils-mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-utils-mobile.js","sources":["ng://@taiga-ui/core/utils/mobile/is-mobile.ts","ng://@taiga-ui/core/utils/mobile/taiga-ui-core-utils-mobile.ts"],"sourcesContent":["import {TuiMedia} from '@taiga-ui/core/interfaces';\n\nexport function tuiIsMobile({innerWidth}: Window, {mobile}: TuiMedia): boolean {\n return innerWidth <= mobile;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAEgB,WAAW,CAAC,EAAoB,EAAE,EAAkB;QAAvC,0BAAU;QAAY,kBAAM;IACrD,OAAO,UAAU,IAAI,MAAM,CAAC;AAChC;;ACJA;;;;;;"}
@@ -2,6 +2,7 @@ export * from '@taiga-ui/core/utils/dom';
2
2
  export * from '@taiga-ui/core/utils/format';
3
3
  export * from '@taiga-ui/core/utils/mask';
4
4
  export * from '@taiga-ui/core/utils/miscellaneous';
5
+ export * from '@taiga-ui/core/utils/mobile';
5
6
  export * from '@taiga-ui/core/utils/polyfills';
6
7
 
7
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils.js","sources":["ng://@taiga-ui/core/utils/taiga-ui-core-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils.js","sources":["ng://@taiga-ui/core/utils/taiga-ui-core-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/core",
3
- "version": "2.49.1",
3
+ "version": "2.50.1",
4
4
  "description": "Core library for creating Angular components and applications using Taiga UI",
5
5
  "keywords": [
6
6
  "angular",
@@ -15,7 +15,7 @@
15
15
  "repository": "https://github.com/tinkoff/taiga-ui",
16
16
  "license": "Apache-2.0",
17
17
  "dependencies": {
18
- "@taiga-ui/i18n": "^2.49.1",
18
+ "@taiga-ui/i18n": "^2.50.1",
19
19
  "tslib": "^1.10.0"
20
20
  },
21
21
  "peerDependencies": {
@@ -27,8 +27,8 @@
27
27
  "@angular/router": ">=9.0.0",
28
28
  "@ng-web-apis/common": ">=1.12.1 < 2",
29
29
  "@ng-web-apis/mutation-observer": ">=1.1.0",
30
- "@taiga-ui/cdk": ">=2.49.1",
31
- "@taiga-ui/i18n": ">=2.49.1",
30
+ "@taiga-ui/cdk": ">=2.50.1",
31
+ "@taiga-ui/i18n": ">=2.50.1",
32
32
  "@tinkoff/ng-event-plugins": ">=2.3.2",
33
33
  "@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
34
34
  "rxjs": ">=6.0.0"
@@ -3,7 +3,7 @@
3
3
  /* stylelint-disable order/order */
4
4
  tui-wrapper,
5
5
  [tuiWrapper] {
6
- .transition(~'color, background');
6
+ .transition(~'color, background, opacity');
7
7
  position: relative;
8
8
  display: block;
9
9
  height: 100%;
@@ -13,11 +13,31 @@ tui-wrapper[data-appearance='icon'],
13
13
  .wrapper-focus({
14
14
  --tui-focus: var(--tui-base-01);
15
15
  });
16
+
17
+ .wrapper-hover({
18
+ color: var(--tui-text-01-night);
19
+ opacity: 1;
20
+ });
21
+
22
+ .wrapper-active({
23
+ color: var(--tui-text-01-night);
24
+ opacity: 1;
25
+ });
16
26
  }
17
27
 
18
28
  &[data-mode='onLight'] {
19
29
  color: var(--tui-text-01);
20
30
  opacity: var(--tui-disabled-opacity);
31
+
32
+ .wrapper-hover({
33
+ color: var(--tui-text-01);
34
+ opacity: 1;
35
+ });
36
+
37
+ .wrapper-active({
38
+ color: var(--tui-text-01);
39
+ opacity: 1;
40
+ });
21
41
  }
22
42
 
23
43
  .wrapper-hover({
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"TUI_ANIMATION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":41},"arguments":["Options for Taiga UI animations",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./animation-options"}]},"TUI_ANIMATIONS_DURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":43},"arguments":["Duration of all Taiga UI animations in ms",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./animations-duration"}]},"TUI_ASSERT_ENABLED":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":38},"arguments":["Flag to enable assertions across Taiga UI",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./assert-enabled"}]},"TUI_DATA_LIST_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":42},"arguments":["Accessor for options"]},"TUI_DATA_LIST_HOST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["DataList controller"]},"TUI_DOCUMENT_OR_SHADOW_ROOT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":47},"arguments":["Document or ShadowRoot"]},"TUI_DROPDOWN_DIRECTIVE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":42},"arguments":["Directive controlling TuiDropdownBoxComponent"]},"TUI_ELEMENT_REF":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":35},"arguments":["ElementRef when you cannot use @Input for single time injection"]},"TUI_FIRST_DAY_OF_WEEK":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":41},"arguments":["The first day of the week index",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./first-day-of-week"}]},"TUI_MONTHS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":30},"arguments":["Localized months names",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":4,"character":13},"arguments":["months"]}}]},"TUI_CLOSE_WORD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":34},"arguments":["i18n 'close' word",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":8,"character":13},"arguments":["close"]}}]},"TUI_NOTHING_FOUND_MESSAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":11,"character":45},"arguments":["i18n 'Nothing found' message",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":14,"character":17},"arguments":["nothingFoundMessage"]}}]},"TUI_DEFAULT_ERROR_MESSAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":18,"character":45},"arguments":["i18n of error message",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":19,"character":13},"arguments":["defaultErrorMessage"]}}]},"TUI_SPIN_TEXTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":22,"character":34},"arguments":["spin i18n texts",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":23,"character":13},"arguments":["spinTexts"]}}]},"TUI_SHORT_WEEK_DAYS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":26,"character":39},"arguments":["calendars i18n texts",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":27,"character":13},"arguments":["shortWeekDays"]}}]},"TUI_ICONS_PLACE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":59},"arguments":["Recommended paths to icons from documentation guide",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./icon-place"}]},"TUI_ICONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":29},"arguments":["A key/value dictionary of icon names and src to be defined with TuiSvgService",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./icons"}]},"TUI_ICONS_PATH":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":8},"arguments":["A handler to retrieve USE id for icon by name",{"__symbolic":"error","message":"Lambda not supported","line":9,"character":18,"module":"./icons-path"}]},"TUI_IS_MOBILE_RES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":8,"character":37},"arguments":["Mobile resolution stream for private providers",{"__symbolic":"error","message":"Lambda not supported","line":11,"character":17,"module":"./is-mobile-resolution"}]},"TUI_MEDIA":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":29},"arguments":["Token for media constant",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./media"}]},"TUI_MODE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Mode stream for private providers"]},"TuiNotificationDefaultOptions":{"__symbolic":"interface"},"NotificationTokenOptions":{"__symbolic":"interface"},"TUI_NOTIFICATION_DEFAULT_OPTIONS":{"autoClose":true,"label":"","status":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@taiga-ui/core/enums","name":"TuiNotification","line":18,"character":12},"member":"Info"},"hasIcon":true,"hasCloseButton":true,"defaultAutoCloseTime":3000},"TUI_NOTIFICATION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":24,"character":44},"arguments":["Default parameters for notification alert component",{"__symbolic":"error","message":"Lambda not supported","line":27,"character":17,"module":"./notification-options"}]},"tuiNotificationOptionsProvider":{"__symbolic":"function","parameters":["options"],"value":{"provide":{"__symbolic":"reference","name":"TUI_NOTIFICATION_OPTIONS"},"useValue":{}}},"TUI_NUMBER_FORMAT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":37},"arguments":["Formatting configuration for displayed numbers",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":17,"module":"./number-format"}]},"TUI_OPTION_CONTENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":38},"arguments":["Content for tuiOption component"]},"WEEK_DAYS_NAMES":{"__symbolic":"interface"},"convertToSundayFirstWeekFormat":{"__symbolic":"error","message":"Lambda not supported","line":9,"character":46,"module":"./ordered-short-week-days"},"TUI_ORDERED_SHORT_WEEK_DAYS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":20,"character":47},"arguments":["Ordered calendars i18n texts",{"__symbolic":"error","message":"Lambda not supported","line":23,"character":13,"module":"./ordered-short-week-days"}]},"TUI_SCROLL_REF":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":34},"arguments":["Scrollable container"]},"TUI_SVG_CONTENT_PROCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Transform function the contents of the loaded svg file",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":18,"module":"./svg-content-processor"}]},"TUI_SVG_SRC_PROCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Source path processor for svg",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./svg-src-processor"}]},"TUI_TEXTFIELD_APPEARANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":44},"arguments":["Appearance for inputs",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./textfield-appearance"}]},"TUI_TEXTFIELD_HOST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["An interface to communicate with textfield based controls"]},"TUI_THEME":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":29},"arguments":["Theme name",{"__symbolic":"error","message":"Lambda not supported","line":3,"character":13,"module":"./theme"}]},"TUI_VALUE_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["Buffer token to pass NG_VALUE_ACCESSOR to a different Injector"]}},"origins":{"TUI_ANIMATION_OPTIONS":"./animation-options","TUI_ANIMATIONS_DURATION":"./animations-duration","TUI_ASSERT_ENABLED":"./assert-enabled","TUI_DATA_LIST_ACCESSOR":"./data-list-accessor","TUI_DATA_LIST_HOST":"./data-list-host","TUI_DOCUMENT_OR_SHADOW_ROOT":"./document-or-shadow-root","TUI_DROPDOWN_DIRECTIVE":"./dropdown-directive","TUI_ELEMENT_REF":"./element-ref","TUI_FIRST_DAY_OF_WEEK":"./first-day-of-week","TUI_MONTHS":"./i18n","TUI_CLOSE_WORD":"./i18n","TUI_NOTHING_FOUND_MESSAGE":"./i18n","TUI_DEFAULT_ERROR_MESSAGE":"./i18n","TUI_SPIN_TEXTS":"./i18n","TUI_SHORT_WEEK_DAYS":"./i18n","TUI_ICONS_PLACE":"./icon-place","TUI_ICONS":"./icons","TUI_ICONS_PATH":"./icons-path","TUI_IS_MOBILE_RES":"./is-mobile-resolution","TUI_MEDIA":"./media","TUI_MODE":"./mode","TuiNotificationDefaultOptions":"./notification-options","NotificationTokenOptions":"./notification-options","TUI_NOTIFICATION_DEFAULT_OPTIONS":"./notification-options","TUI_NOTIFICATION_OPTIONS":"./notification-options","tuiNotificationOptionsProvider":"./notification-options","TUI_NUMBER_FORMAT":"./number-format","TUI_OPTION_CONTENT":"./option-content","WEEK_DAYS_NAMES":"./ordered-short-week-days","convertToSundayFirstWeekFormat":"./ordered-short-week-days","TUI_ORDERED_SHORT_WEEK_DAYS":"./ordered-short-week-days","TUI_SANITIZER":"@taiga-ui/cdk","TUI_SCROLL_REF":"./scroll-ref","TUI_SVG_CONTENT_PROCESSOR":"./svg-content-processor","TUI_SVG_SRC_PROCESSOR":"./svg-src-processor","TUI_TEXTFIELD_APPEARANCE":"./textfield-appearance","TUI_TEXTFIELD_HOST":"./textfield-host","TUI_THEME":"./theme","TUI_VALUE_ACCESSOR":"./value-accessor"},"importAs":"@taiga-ui/core/tokens"}
1
+ {"__symbolic":"module","version":4,"metadata":{"TUI_ANIMATION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":41},"arguments":["Options for Taiga UI animations",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./animation-options"}]},"TUI_ANIMATIONS_DURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":43},"arguments":["Duration of all Taiga UI animations in ms",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./animations-duration"}]},"TUI_ASSERT_ENABLED":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":38},"arguments":["Flag to enable assertions across Taiga UI",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./assert-enabled"}]},"TUI_DATA_LIST_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":42},"arguments":["Accessor for options"]},"TUI_DATA_LIST_HOST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["DataList controller"]},"TUI_DOCUMENT_OR_SHADOW_ROOT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":47},"arguments":["Document or ShadowRoot"]},"TUI_DROPDOWN_DIRECTIVE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":42},"arguments":["Directive controlling TuiDropdownBoxComponent"]},"TUI_ELEMENT_REF":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":35},"arguments":["ElementRef when you cannot use @Input for single time injection"]},"TUI_FIRST_DAY_OF_WEEK":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":41},"arguments":["The first day of the week index",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./first-day-of-week"}]},"TUI_MONTHS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":30},"arguments":["Localized months names",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":4,"character":13},"arguments":["months"]}}]},"TUI_CLOSE_WORD":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":34},"arguments":["i18n 'close' word",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":8,"character":13},"arguments":["close"]}}]},"TUI_NOTHING_FOUND_MESSAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":11,"character":45},"arguments":["i18n 'Nothing found' message",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":14,"character":17},"arguments":["nothingFoundMessage"]}}]},"TUI_DEFAULT_ERROR_MESSAGE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":18,"character":45},"arguments":["i18n of error message",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":19,"character":13},"arguments":["defaultErrorMessage"]}}]},"TUI_SPIN_TEXTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":22,"character":34},"arguments":["spin i18n texts",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":23,"character":13},"arguments":["spinTexts"]}}]},"TUI_SHORT_WEEK_DAYS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":26,"character":39},"arguments":["calendars i18n texts",{"factory":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/i18n","name":"extractI18n","line":27,"character":13},"arguments":["shortWeekDays"]}}]},"TUI_ICONS_PLACE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":59},"arguments":["Recommended paths to icons from documentation guide",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./icon-place"}]},"TUI_ICONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":29},"arguments":["A key/value dictionary of icon names and src to be defined with TuiSvgService",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":17,"module":"./icons"}]},"TUI_ICONS_PATH":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":8},"arguments":["A handler to retrieve USE id for icon by name",{"__symbolic":"error","message":"Lambda not supported","line":9,"character":18,"module":"./icons-path"}]},"TUI_IS_MOBILE_RES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":37},"arguments":["Mobile resolution stream for private providers",{"__symbolic":"error","message":"Lambda not supported","line":12,"character":17,"module":"./is-mobile-resolution"}]},"TUI_MEDIA":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":29},"arguments":["Token for media constant",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./media"}]},"TUI_MODE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Mode stream for private providers"]},"TuiNotificationDefaultOptions":{"__symbolic":"interface"},"NotificationTokenOptions":{"__symbolic":"interface"},"TUI_NOTIFICATION_DEFAULT_OPTIONS":{"autoClose":true,"label":"","status":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@taiga-ui/core/enums","name":"TuiNotification","line":18,"character":12},"member":"Info"},"hasIcon":true,"hasCloseButton":true,"defaultAutoCloseTime":3000},"TUI_NOTIFICATION_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":24,"character":44},"arguments":["Default parameters for notification alert component",{"__symbolic":"error","message":"Lambda not supported","line":27,"character":17,"module":"./notification-options"}]},"tuiNotificationOptionsProvider":{"__symbolic":"function","parameters":["options"],"value":{"provide":{"__symbolic":"reference","name":"TUI_NOTIFICATION_OPTIONS"},"useValue":{}}},"TUI_NUMBER_FORMAT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":37},"arguments":["Formatting configuration for displayed numbers",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":17,"module":"./number-format"}]},"TUI_OPTION_CONTENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":38},"arguments":["Content for tuiOption component"]},"WEEK_DAYS_NAMES":{"__symbolic":"interface"},"convertToSundayFirstWeekFormat":{"__symbolic":"error","message":"Lambda not supported","line":9,"character":46,"module":"./ordered-short-week-days"},"TUI_ORDERED_SHORT_WEEK_DAYS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":20,"character":47},"arguments":["Ordered calendars i18n texts",{"__symbolic":"error","message":"Lambda not supported","line":23,"character":13,"module":"./ordered-short-week-days"}]},"TUI_SCROLL_REF":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":34},"arguments":["Scrollable container"]},"TUI_SVG_CONTENT_PROCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Transform function the contents of the loaded svg file",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":18,"module":"./svg-content-processor"}]},"TUI_SVG_SRC_PROCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":8},"arguments":["Source path processor for svg",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./svg-src-processor"}]},"TUI_TEXTFIELD_APPEARANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":44},"arguments":["Appearance for inputs",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":17,"module":"./textfield-appearance"}]},"TUI_TEXTFIELD_HOST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["An interface to communicate with textfield based controls"]},"TUI_THEME":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":29},"arguments":["Theme name",{"__symbolic":"error","message":"Lambda not supported","line":3,"character":13,"module":"./theme"}]},"TUI_VALUE_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":38},"arguments":["Buffer token to pass NG_VALUE_ACCESSOR to a different Injector"]}},"origins":{"TUI_ANIMATION_OPTIONS":"./animation-options","TUI_ANIMATIONS_DURATION":"./animations-duration","TUI_ASSERT_ENABLED":"./assert-enabled","TUI_DATA_LIST_ACCESSOR":"./data-list-accessor","TUI_DATA_LIST_HOST":"./data-list-host","TUI_DOCUMENT_OR_SHADOW_ROOT":"./document-or-shadow-root","TUI_DROPDOWN_DIRECTIVE":"./dropdown-directive","TUI_ELEMENT_REF":"./element-ref","TUI_FIRST_DAY_OF_WEEK":"./first-day-of-week","TUI_MONTHS":"./i18n","TUI_CLOSE_WORD":"./i18n","TUI_NOTHING_FOUND_MESSAGE":"./i18n","TUI_DEFAULT_ERROR_MESSAGE":"./i18n","TUI_SPIN_TEXTS":"./i18n","TUI_SHORT_WEEK_DAYS":"./i18n","TUI_ICONS_PLACE":"./icon-place","TUI_ICONS":"./icons","TUI_ICONS_PATH":"./icons-path","TUI_IS_MOBILE_RES":"./is-mobile-resolution","TUI_MEDIA":"./media","TUI_MODE":"./mode","TuiNotificationDefaultOptions":"./notification-options","NotificationTokenOptions":"./notification-options","TUI_NOTIFICATION_DEFAULT_OPTIONS":"./notification-options","TUI_NOTIFICATION_OPTIONS":"./notification-options","tuiNotificationOptionsProvider":"./notification-options","TUI_NUMBER_FORMAT":"./number-format","TUI_OPTION_CONTENT":"./option-content","WEEK_DAYS_NAMES":"./ordered-short-week-days","convertToSundayFirstWeekFormat":"./ordered-short-week-days","TUI_ORDERED_SHORT_WEEK_DAYS":"./ordered-short-week-days","TUI_SANITIZER":"@taiga-ui/cdk","TUI_SCROLL_REF":"./scroll-ref","TUI_SVG_CONTENT_PROCESSOR":"./svg-content-processor","TUI_SVG_SRC_PROCESSOR":"./svg-src-processor","TUI_TEXTFIELD_APPEARANCE":"./textfield-appearance","TUI_TEXTFIELD_HOST":"./textfield-host","TUI_THEME":"./theme","TUI_VALUE_ACCESSOR":"./value-accessor"},"importAs":"@taiga-ui/core/tokens"}
@@ -1,2 +1,2 @@
1
1
  import { TuiSizeL, TuiSizeS } from './size';
2
- export declare type TuiDialogSize = TuiSizeS | TuiSizeL | 'fullscreen' | 'page';
2
+ export declare type TuiDialogSize = TuiSizeS | TuiSizeL | 'fullscreen' | 'page' | 'auto';
package/utils/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from '@taiga-ui/core/utils/dom';
2
2
  export * from '@taiga-ui/core/utils/format';
3
3
  export * from '@taiga-ui/core/utils/mask';
4
4
  export * from '@taiga-ui/core/utils/miscellaneous';
5
+ export * from '@taiga-ui/core/utils/mobile';
5
6
  export * from '@taiga-ui/core/utils/polyfills';
@@ -0,0 +1 @@
1
+ export * from './is-mobile';
@@ -0,0 +1,2 @@
1
+ import { TuiMedia } from '@taiga-ui/core/interfaces';
2
+ export declare function tuiIsMobile({ innerWidth }: Window, { mobile }: TuiMedia): boolean;
@@ -0,0 +1,13 @@
1
+ {
2
+ "main": "../../bundles/taiga-ui-core-utils-mobile.umd.js",
3
+ "module": "../../fesm5/taiga-ui-core-utils-mobile.js",
4
+ "es2015": "../../fesm2015/taiga-ui-core-utils-mobile.js",
5
+ "esm5": "../../esm5/utils/mobile/taiga-ui-core-utils-mobile.js",
6
+ "esm2015": "../../esm2015/utils/mobile/taiga-ui-core-utils-mobile.js",
7
+ "fesm5": "../../fesm5/taiga-ui-core-utils-mobile.js",
8
+ "fesm2015": "../../fesm2015/taiga-ui-core-utils-mobile.js",
9
+ "typings": "taiga-ui-core-utils-mobile.d.ts",
10
+ "metadata": "taiga-ui-core-utils-mobile.metadata.json",
11
+ "sideEffects": false,
12
+ "name": "@taiga-ui/core/utils/mobile"
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"tuiIsMobile":{"__symbolic":"function","parameters":["innerWidth","mobile"],"value":{"__symbolic":"binop","operator":"<=","left":{"__symbolic":"reference","name":"innerWidth"},"right":{"__symbolic":"reference","name":"mobile"}}}},"origins":{"tuiIsMobile":"./is-mobile"},"importAs":"@taiga-ui/core/utils/mobile"}
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/core/utils/dom"},{"from":"@taiga-ui/core/utils/format"},{"from":"@taiga-ui/core/utils/mask"},{"from":"@taiga-ui/core/utils/miscellaneous"},{"from":"@taiga-ui/core/utils/polyfills"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/core/utils"}
1
+ {"__symbolic":"module","version":4,"exports":[{"from":"@taiga-ui/core/utils/dom"},{"from":"@taiga-ui/core/utils/format"},{"from":"@taiga-ui/core/utils/mask"},{"from":"@taiga-ui/core/utils/miscellaneous"},{"from":"@taiga-ui/core/utils/mobile"},{"from":"@taiga-ui/core/utils/polyfills"}],"metadata":{},"origins":{},"importAs":"@taiga-ui/core/utils"}