@taiga-ui/core 5.21.0 → 5.22.0
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.
- package/components/input/input.directive.d.ts +1 -1
- package/components/radio/radio.component.d.ts +1 -0
- package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -0
- package/components/textfield/textfield-multi/textfield-multi.component.d.ts +1 -1
- package/fesm2022/taiga-ui-core-components-button.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-cell.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-checkbox.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-data-list.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-input.mjs +2 -5
- package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-link.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-notification.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-radio.mjs +5 -4
- package/fesm2022/taiga-ui-core-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-slider.mjs +7 -5
- package/fesm2022/taiga-ui-core-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-group.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-icons.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +6 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-alert.mjs +3 -3
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +2 -2
- package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs +5 -3
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-modal.mjs +3 -3
- package/fesm2022/taiga-ui-core-tokens.mjs +9 -0
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +7 -2
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/package.json +24 -24
- package/pipes/format-number/format-number.pipe.d.ts +6 -0
- package/portals/dropdown/dropdown-hover.directive.d.ts +1 -1
- package/tokens/number-format.d.ts +43 -15
- package/utils/format/format-number.d.ts +2 -0
- package/utils/format/get-fractional-part-padded.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/breakpoint.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/textfield.ts","../../../projects/core/tokens/timeline-support.ts","../../../projects/core/tokens/validation-errors.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1)},\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1280,\n desktopLarge: Infinity,\n }),\n});\n","import {computed, inject, InjectionToken, type Signal} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiWindowSize} from '@taiga-ui/cdk/utils/dom';\n\nimport {TUI_MEDIA, type TuiMedia} from './media';\n\nexport type TuiBreakpointMediaKey = keyof Omit<TuiMedia, 'tablet'>;\n\nexport const TUI_BREAKPOINT = new InjectionToken<Signal<TuiBreakpointMediaKey>>(\n ngDevMode ? 'TUI_BREAKPOINT' : '',\n {\n factory: () => {\n const size = tuiWindowSize(inject(WA_WINDOW));\n const media = inject(TUI_MEDIA);\n const sorted: number[] = Object.values(media).sort((a, b) => a - b);\n\n const invert: Record<number, TuiBreakpointMediaKey> = Object.keys(\n media,\n ).reduce(\n (ret, key) => ({\n ...ret,\n [media[key as TuiBreakpointMediaKey]]: key,\n }),\n {},\n );\n\n return computed(() => {\n const {width} = size();\n const key = sorted.find((size) => size > width);\n const index = key || sorted[sorted.length - 1] || 0;\n\n return invert[index] ?? 'desktopLarge';\n });\n },\n },\n);\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);\n","import {inject, InjectionToken, signal, type WritableSignal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\n\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {factory: () => TUI_DARK_MODE_DEFAULT_KEY},\n);\n\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(saved ? saved === 'true' : media.matches);\n // Raw setter that does not persist — used for machine-driven changes.\n const set = result.set.bind(result);\n\n // Persist an explicit choice and pin it, even when the value is\n // unchanged (e.g. picking dark while the system is already dark).\n const pin = (value: boolean): void => {\n storage?.setItem(key, String(value));\n set(value);\n };\n\n // Follow the system theme while it has not been pinned (storage empty).\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => set(media.matches));\n\n return Object.assign(result, {\n set: pin,\n update: (updater: (value: boolean) => boolean) => pin(updater(result())),\n reset: () => {\n storage?.removeItem(key);\n set(media.matches);\n },\n });\n },\n});\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'dd/mm/yyyy',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Signal<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_DATE_FORMAT)},\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n useFactory: (): Signal<TuiDateFormatSettings> => {\n const parent = inject(TUI_DATE_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'back' word\n */\nexport const TUI_BACK_WORD = new InjectionToken(ngDevMode ? 'TUI_BACK_WORD' : '', {\n factory: tuiExtractI18n('back'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {factory: tuiExtractI18n('nothingFoundMessage')},\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {factory: tuiExtractI18n('defaultErrorMessage')},\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {factory: tuiExtractI18n('shortWeekDays')},\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\n\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {factory: () => ({})},\n);\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-z]+\\./i, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.match(/@([^.]*)\\./)?.[1] || icon || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon.replace(/@[a-z]+\\./i, '');\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n readonly negativePattern: 'minusFirst' | 'prefixFirst';\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: Number.NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n negativePattern: 'prefixFirst',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Signal<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT)},\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n useFactory: (): Signal<TuiNumberFormatSettings> => {\n const parent = inject(TUI_NUMBER_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken, type Signal} from '@angular/core';\n\nexport const TUI_TEXTFIELD_VALUE = new InjectionToken<Signal<string>>(\n ngDevMode ? 'TUI_TEXTFIELD_VALUE' : '',\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WA_CSS} from '@ng-web-apis/common';\n\nexport const TUI_TIMELINE_SUPPORT = new InjectionToken<boolean>(\n ngDevMode ? 'TUI_TIMELINE_SUPPORT' : '',\n {factory: () => inject(WA_CSS)?.supports('animation-timeline', '--name')},\n);\n","import {InjectionToken, type Provider, type Signal} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\ntype ValidationValue = Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>;\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<ValidationValue>(\n ngDevMode ? 'TUI_VALIDATION_ERRORS' : '',\n {factory: () => ({})},\n);\n\nexport const tuiValidationErrorsProvider = (\n valueOrFactory: ValidationValue | (() => ValidationValue),\n): Provider => tuiProvideOptions(TUI_VALIDATION_ERRORS, valueOrFactory, {});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACI,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC,EAAC,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAC;;ACPlD,MAAM,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBAAiB,GAAG,EAAE,EAAE;AAClF,IAAA,OAAO,EA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CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC;YACL,CAAC;SACJ;IACL,CAAC;AACJ,CAAA;AAGC,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC;AAC7C;;AC1CA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/breakpoint.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/textfield.ts","../../../projects/core/tokens/timeline-support.ts","../../../projects/core/tokens/validation-errors.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1)},\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1280,\n desktopLarge: Infinity,\n }),\n});\n","import {computed, inject, InjectionToken, type Signal} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiWindowSize} from '@taiga-ui/cdk/utils/dom';\n\nimport {TUI_MEDIA, type TuiMedia} from './media';\n\nexport type TuiBreakpointMediaKey = keyof Omit<TuiMedia, 'tablet'>;\n\nexport const TUI_BREAKPOINT = new InjectionToken<Signal<TuiBreakpointMediaKey>>(\n ngDevMode ? 'TUI_BREAKPOINT' : '',\n {\n factory: () => {\n const size = tuiWindowSize(inject(WA_WINDOW));\n const media = inject(TUI_MEDIA);\n const sorted: number[] = Object.values(media).sort((a, b) => a - b);\n\n const invert: Record<number, TuiBreakpointMediaKey> = Object.keys(\n media,\n ).reduce(\n (ret, key) => ({\n ...ret,\n [media[key as TuiBreakpointMediaKey]]: key,\n }),\n {},\n );\n\n return computed(() => {\n const {width} = size();\n const key = sorted.find((size) => size > width);\n const index = key || sorted[sorted.length - 1] || 0;\n\n return invert[index] ?? 'desktopLarge';\n });\n },\n },\n);\n","import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const [TUI_COMMON_ICONS, tuiCommonIconsProvider] = tuiCreateOptions(COMMON_ICONS);\n","import {inject, InjectionToken, signal, type WritableSignal} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\n\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {factory: () => TUI_DARK_MODE_DEFAULT_KEY},\n);\n\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(saved ? saved === 'true' : media.matches);\n // Raw setter that does not persist — used for machine-driven changes.\n const set = result.set.bind(result);\n\n // Persist an explicit choice and pin it, even when the value is\n // unchanged (e.g. picking dark while the system is already dark).\n const pin = (value: boolean): void => {\n storage?.setItem(key, String(value));\n set(value);\n };\n\n // Follow the system theme while it has not been pinned (storage empty).\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => set(media.matches));\n\n return Object.assign(result, {\n set: pin,\n update: (updater: (value: boolean) => boolean) => pin(updater(result())),\n reset: () => {\n storage?.removeItem(key);\n set(media.matches);\n },\n });\n },\n});\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'dd/mm/yyyy',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Signal<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_DATE_FORMAT)},\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n useFactory: (): Signal<TuiDateFormatSettings> => {\n const parent = inject(TUI_DATE_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_DATE_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'back' word\n */\nexport const TUI_BACK_WORD = new InjectionToken(ngDevMode ? 'TUI_BACK_WORD' : '', {\n factory: tuiExtractI18n('back'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {factory: tuiExtractI18n('nothingFoundMessage')},\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {factory: tuiExtractI18n('defaultErrorMessage')},\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {factory: tuiExtractI18n('shortWeekDays')},\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\n\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {factory: () => ({})},\n);\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-z]+\\./i, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.match(/@([^.]*)\\./)?.[1] || icon || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon.replace(/@[a-z]+\\./i, '');\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {\n computed,\n inject,\n InjectionToken,\n type Provider,\n type Signal,\n signal,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\n\nexport type TuiDecimalMode =\n /**\n * @deprecated use `TuiNumberFormatSettings[minimumFractionDigits]` instead\n */\n | 'always' // TODO(v6): delete\n | 'not-zero'\n | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * TODO(v6): use `MaskitoNumberParams` from `@maskito/kit`\n * ```ts\n * export interface TuiNumberFormatSettings extends Pick<\n * Required<MaskitoNumberParams>,\n * | 'decimalSeparator'\n * | 'maximumFractionDigits'\n * | 'minimumFractionDigits'\n * | 'minusSign'\n * | 'negativePattern'\n * | 'thousandSeparator'\n * | 'thousandSeparatorPattern'\n * > {...}\n * ```\n * It's a temporary workaround to preserve backward compatibility\n * while avoiding the need to add @maskito/kit as a peer-dependency of @taiga-ui/core.\n */\ninterface MaskitoNumberParams {\n decimalSeparator: string;\n thousandSeparator: string;\n thousandSeparatorPattern?(digits: string): readonly string[];\n minusSign?: string;\n negativePattern?: 'minusFirst' | 'prefixFirst';\n maximumFractionDigits?: number;\n minimumFractionDigits?: number;\n}\n\n/**\n * Formatting configuration for displayed numbers\n * TODO(v6): move TuiNumberFormatSettings (and its dependants) to `@taiga-ui/kit`\n */\nexport interface TuiNumberFormatSettings extends MaskitoNumberParams {\n /**\n * @deprecated use `maximumFractionDigits` instead\n */\n readonly precision: number;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\n/**\n * TODO(v6): add required props\n * ```ts\n * minusSign: CHAR_MINUS,\n * maximumFractionDigits: Number.NaN,\n * minimumFractionDigits: 0,\n * ```\n */\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: Number.NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n negativePattern: 'prefixFirst',\n thousandSeparatorPattern: (digits) => digits.match(/\\d{1,3}(?=(?:\\d{3})*$)/g) ?? [],\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Signal<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {factory: () => signal(TUI_DEFAULT_NUMBER_FORMAT)},\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n useFactory: (): Signal<TuiNumberFormatSettings> => {\n const parent = inject(TUI_NUMBER_FORMAT, {optional: true, skipSelf: true});\n\n return computed(() => ({\n ...(parent?.() || TUI_DEFAULT_NUMBER_FORMAT),\n ...options,\n }));\n },\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken, type Signal} from '@angular/core';\n\nexport const TUI_TEXTFIELD_VALUE = new InjectionToken<Signal<string>>(\n ngDevMode ? 'TUI_TEXTFIELD_VALUE' : '',\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WA_CSS} from '@ng-web-apis/common';\n\nexport const TUI_TIMELINE_SUPPORT = new InjectionToken<boolean>(\n ngDevMode ? 'TUI_TIMELINE_SUPPORT' : '',\n {factory: () => inject(WA_CSS)?.supports('animation-timeline', '--name')},\n);\n","import {InjectionToken, type Provider, type Signal} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\ntype ValidationValue = Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>;\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<ValidationValue>(\n ngDevMode ? 'TUI_VALIDATION_ERRORS' : '',\n {factory: () => ({})},\n);\n\nexport const tuiValidationErrorsProvider = (\n valueOrFactory: ValidationValue | (() => ValidationValue),\n): Provider => tuiProvideOptions(TUI_VALIDATION_ERRORS, valueOrFactory, {});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACI,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,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ACP,KAAK,EAAE,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP;gBAED,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC;YACL,CAAC;SACJ;IACL,CAAC;AACJ,CAAA;AAGC,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC;AAC7C;;AC1CA;;AAEG;;;;"}
|
|
@@ -29,6 +29,9 @@ function tuiNumberToStringWithoutExp(value) {
|
|
|
29
29
|
* @return the fractional part of number
|
|
30
30
|
*/
|
|
31
31
|
function tuiGetFractionPartPadded(value, precision) {
|
|
32
|
+
if (typeof value !== 'number') {
|
|
33
|
+
return '';
|
|
34
|
+
}
|
|
32
35
|
const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');
|
|
33
36
|
return tuiIsNumber(precision)
|
|
34
37
|
? fractionPartPadded.slice(0, Math.max(0, precision))
|
|
@@ -36,6 +39,8 @@ function tuiGetFractionPartPadded(value, precision) {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
/**
|
|
42
|
+
* @deprecated Use `import {tuiFormatNumber} from '@taiga-ui/kit'`
|
|
43
|
+
* TODO(v6): delete
|
|
39
44
|
* Formats number adding a thousand separators and correct decimal separator
|
|
40
45
|
* padding decimal part with zeroes to given length
|
|
41
46
|
*
|
|
@@ -44,7 +49,7 @@ function tuiGetFractionPartPadded(value, precision) {
|
|
|
44
49
|
* @return the formatted string
|
|
45
50
|
*/
|
|
46
51
|
function tuiFormatNumber(value, settings = {}) {
|
|
47
|
-
const { precision, decimalSeparator, thousandSeparator, decimalMode, rounding } = {
|
|
52
|
+
const { precision, decimalSeparator, thousandSeparator, decimalMode, rounding, minusSign = CHAR_HYPHEN, } = {
|
|
48
53
|
...TUI_DEFAULT_NUMBER_FORMAT,
|
|
49
54
|
decimalMode: 'always',
|
|
50
55
|
precision: Infinity,
|
|
@@ -67,7 +72,7 @@ function tuiFormatNumber(value, settings = {}) {
|
|
|
67
72
|
}
|
|
68
73
|
}
|
|
69
74
|
const remainder = integerPartString.length % 3;
|
|
70
|
-
const sign = value < 0 ?
|
|
75
|
+
const sign = value < 0 ? minusSign : '';
|
|
71
76
|
let result = `${sign}${integerPartString.charAt(0)}`;
|
|
72
77
|
for (let i = 1; i < integerPartString.length; i++) {
|
|
73
78
|
if (i % 3 === remainder && integerPartString.length > 3) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\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 tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\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 {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {tuiNumberToStringWithoutExp} 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 tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk/constants';\nimport {tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\n\nimport {tuiGetFractionPartPadded} 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 settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {precision
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-format.mjs","sources":["../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\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 tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split('e-');\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 {tuiIsNumber} from '@taiga-ui/cdk/utils/miscellaneous';\n\nimport {tuiNumberToStringWithoutExp} 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 tuiGetFractionPartPadded(\n value: bigint | number | null,\n precision?: number | null,\n): string {\n if (typeof value !== 'number') {\n return '';\n }\n\n const [, fractionPartPadded = ''] = tuiNumberToStringWithoutExp(value).split('.');\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk/constants';\nimport {tuiRoundWith} from '@taiga-ui/cdk/utils/math';\nimport {\n TUI_DEFAULT_NUMBER_FORMAT,\n type TuiNumberFormatSettings,\n} from '@taiga-ui/core/tokens';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * @deprecated Use `import {tuiFormatNumber} from '@taiga-ui/kit'`\n * TODO(v6): delete\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 settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {\n precision,\n decimalSeparator,\n thousandSeparator,\n decimalMode,\n rounding,\n minusSign = CHAR_HYPHEN,\n } = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n decimalMode: 'always',\n precision: Infinity,\n ...settings,\n };\n\n const rounded = Number.isFinite(precision)\n ? tuiRoundWith({value, precision, method: rounding})\n : value;\n\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, precision);\n const hasFraction = Number(fractionPartPadded) > 0;\n\n if (Number.isFinite(precision)) {\n if (decimalMode === 'always' || (hasFraction && decimalMode === 'pad')) {\n const zeroPaddingSize = Math.max(precision - fractionPartPadded.length, 0);\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 ? minusSign : '';\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\n ? `${result}${decimalSeparator}${fractionPartPadded}`\n : result;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AACG,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AACnC,IAAA,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;IACvD,IAAI,eAAe,GAAG,aAAa;IAEnC,IAAI,OAAO,EAAE;AACT,QAAA,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE;AAC5D,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC,CAAC;AAErE,QAAA,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;IAClD;AAEA,IAAA,OAAO,eAAe;AAC1B;;ACfA;;;;;;AAMG;AACG,SAAU,wBAAwB,CACpC,KAA6B,EAC7B,SAAyB,EAAA;AAEzB,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC3B,QAAA,OAAO,EAAE;IACb;AAEA,IAAA,MAAM,GAAG,kBAAkB,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IAEjF,OAAO,WAAW,CAAC,SAAS;AACxB,UAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC;UAClD,kBAAkB;AAC5B;;ACfA;;;;;;;;;AASG;SACa,eAAe,CAC3B,KAAa,EACb,WAA6C,EA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AC,GAAG,SAAS,GAAG,EAAE;AACvC,IAAA,IAAI,MAAM,GAAG,CAAA,EAAG,IAAI,CAAA,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA,CAAE;AAEpD,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,QAAA,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YACrD,MAAM,IAAI,iBAAiB;QAC/B;AAEA,QAAA,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;IACzC;AAEA,IAAA,OAAO;AACH,UAAE,CAAA,EAAG,MAAM,GAAG,gBAAgB,CAAA,EAAG,kBAAkB,CAAA;UACjD,MAAM;AAChB;;ACvEA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.0",
|
|
4
4
|
"description": "Core library for creating Angular components and applications using Taiga UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@ng-web-apis/intersection-observer": "^5.3.0",
|
|
42
42
|
"@ng-web-apis/mutation-observer": "^5.3.0",
|
|
43
43
|
"@ng-web-apis/platform": "^5.3.0",
|
|
44
|
-
"@taiga-ui/cdk": "5.
|
|
44
|
+
"@taiga-ui/cdk": "5.22.0",
|
|
45
45
|
"@taiga-ui/event-plugins": "^5.0.0",
|
|
46
|
-
"@taiga-ui/i18n": "5.
|
|
46
|
+
"@taiga-ui/i18n": "5.22.0",
|
|
47
47
|
"@taiga-ui/polymorpheus": "^5.0.1",
|
|
48
|
-
"@taiga-ui/styles": "5.
|
|
48
|
+
"@taiga-ui/styles": "5.22.0",
|
|
49
49
|
"rxjs": ">=7.0.0"
|
|
50
50
|
},
|
|
51
51
|
"schematics": "./schematics/collection.json",
|
|
@@ -63,10 +63,6 @@
|
|
|
63
63
|
"types": "./classes/index.d.ts",
|
|
64
64
|
"default": "./fesm2022/taiga-ui-core-classes.mjs"
|
|
65
65
|
},
|
|
66
|
-
"./pipes": {
|
|
67
|
-
"types": "./pipes/index.d.ts",
|
|
68
|
-
"default": "./fesm2022/taiga-ui-core-pipes.mjs"
|
|
69
|
-
},
|
|
70
66
|
"./components": {
|
|
71
67
|
"types": "./components/index.d.ts",
|
|
72
68
|
"default": "./fesm2022/taiga-ui-core-components.mjs"
|
|
@@ -75,6 +71,10 @@
|
|
|
75
71
|
"types": "./directives/index.d.ts",
|
|
76
72
|
"default": "./fesm2022/taiga-ui-core-directives.mjs"
|
|
77
73
|
},
|
|
74
|
+
"./pipes": {
|
|
75
|
+
"types": "./pipes/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/taiga-ui-core-pipes.mjs"
|
|
77
|
+
},
|
|
78
78
|
"./portals": {
|
|
79
79
|
"types": "./portals/index.d.ts",
|
|
80
80
|
"default": "./fesm2022/taiga-ui-core-portals.mjs"
|
|
@@ -95,18 +95,10 @@
|
|
|
95
95
|
"types": "./utils/index.d.ts",
|
|
96
96
|
"default": "./fesm2022/taiga-ui-core-utils.mjs"
|
|
97
97
|
},
|
|
98
|
-
"./pipes/format-number": {
|
|
99
|
-
"types": "./pipes/format-number/index.d.ts",
|
|
100
|
-
"default": "./fesm2022/taiga-ui-core-pipes-format-number.mjs"
|
|
101
|
-
},
|
|
102
98
|
"./components/button": {
|
|
103
99
|
"types": "./components/button/index.d.ts",
|
|
104
100
|
"default": "./fesm2022/taiga-ui-core-components-button.mjs"
|
|
105
101
|
},
|
|
106
|
-
"./pipes/filter-by-input": {
|
|
107
|
-
"types": "./pipes/filter-by-input/index.d.ts",
|
|
108
|
-
"default": "./fesm2022/taiga-ui-core-pipes-filter-by-input.mjs"
|
|
109
|
-
},
|
|
110
102
|
"./components/calendar": {
|
|
111
103
|
"types": "./components/calendar/index.d.ts",
|
|
112
104
|
"default": "./fesm2022/taiga-ui-core-components-calendar.mjs"
|
|
@@ -151,14 +143,14 @@
|
|
|
151
143
|
"types": "./components/link/index.d.ts",
|
|
152
144
|
"default": "./fesm2022/taiga-ui-core-components-link.mjs"
|
|
153
145
|
},
|
|
154
|
-
"./components/loader": {
|
|
155
|
-
"types": "./components/loader/index.d.ts",
|
|
156
|
-
"default": "./fesm2022/taiga-ui-core-components-loader.mjs"
|
|
157
|
-
},
|
|
158
146
|
"./components/notification": {
|
|
159
147
|
"types": "./components/notification/index.d.ts",
|
|
160
148
|
"default": "./fesm2022/taiga-ui-core-components-notification.mjs"
|
|
161
149
|
},
|
|
150
|
+
"./components/loader": {
|
|
151
|
+
"types": "./components/loader/index.d.ts",
|
|
152
|
+
"default": "./fesm2022/taiga-ui-core-components-loader.mjs"
|
|
153
|
+
},
|
|
162
154
|
"./components/radio": {
|
|
163
155
|
"types": "./components/radio/index.d.ts",
|
|
164
156
|
"default": "./fesm2022/taiga-ui-core-components-radio.mjs"
|
|
@@ -195,14 +187,14 @@
|
|
|
195
187
|
"types": "./directives/button-x/index.d.ts",
|
|
196
188
|
"default": "./fesm2022/taiga-ui-core-directives-button-x.mjs"
|
|
197
189
|
},
|
|
198
|
-
"./directives/group": {
|
|
199
|
-
"types": "./directives/group/index.d.ts",
|
|
200
|
-
"default": "./fesm2022/taiga-ui-core-directives-group.mjs"
|
|
201
|
-
},
|
|
202
190
|
"./directives/date-format": {
|
|
203
191
|
"types": "./directives/date-format/index.d.ts",
|
|
204
192
|
"default": "./fesm2022/taiga-ui-core-directives-date-format.mjs"
|
|
205
193
|
},
|
|
194
|
+
"./directives/group": {
|
|
195
|
+
"types": "./directives/group/index.d.ts",
|
|
196
|
+
"default": "./fesm2022/taiga-ui-core-directives-group.mjs"
|
|
197
|
+
},
|
|
206
198
|
"./directives/icons": {
|
|
207
199
|
"types": "./directives/icons/index.d.ts",
|
|
208
200
|
"default": "./fesm2022/taiga-ui-core-directives-icons.mjs"
|
|
@@ -215,6 +207,14 @@
|
|
|
215
207
|
"types": "./directives/number-format/index.d.ts",
|
|
216
208
|
"default": "./fesm2022/taiga-ui-core-directives-number-format.mjs"
|
|
217
209
|
},
|
|
210
|
+
"./pipes/filter-by-input": {
|
|
211
|
+
"types": "./pipes/filter-by-input/index.d.ts",
|
|
212
|
+
"default": "./fesm2022/taiga-ui-core-pipes-filter-by-input.mjs"
|
|
213
|
+
},
|
|
214
|
+
"./pipes/format-number": {
|
|
215
|
+
"types": "./pipes/format-number/index.d.ts",
|
|
216
|
+
"default": "./fesm2022/taiga-ui-core-pipes-format-number.mjs"
|
|
217
|
+
},
|
|
218
218
|
"./portals/alert": {
|
|
219
219
|
"types": "./portals/alert/index.d.ts",
|
|
220
220
|
"default": "./fesm2022/taiga-ui-core-portals-alert.mjs"
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { type PipeTransform } from '@angular/core';
|
|
2
2
|
import { type TuiNumberFormatSettings } from '@taiga-ui/core/tokens';
|
|
3
|
+
import { tuiFormatNumber } from '@taiga-ui/core/utils/format';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use import {TuiFormatNumberPipe} from '@taiga-ui/kit'
|
|
7
|
+
*/
|
|
4
8
|
export declare class TuiFormatNumberPipe implements PipeTransform {
|
|
5
9
|
private readonly format;
|
|
6
10
|
private readonly value;
|
|
7
11
|
private readonly settings;
|
|
8
12
|
private readonly formatted;
|
|
13
|
+
protected formatter: typeof tuiFormatNumber;
|
|
9
14
|
/**
|
|
15
|
+
* @deprecated use import {TuiFormatNumberPipe} from '@taiga-ui/kit'
|
|
10
16
|
* Formats number adding a thousand separators and correct decimal separator
|
|
11
17
|
* padding decimal part with zeroes to given length
|
|
12
18
|
* @param value number
|
|
@@ -3,10 +3,10 @@ import { TuiDriver } from '@taiga-ui/core/classes';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TuiDropdownHover extends TuiDriver {
|
|
5
5
|
private readonly dropdownHost;
|
|
6
|
+
private readonly directive;
|
|
6
7
|
private readonly el;
|
|
7
8
|
private readonly doc;
|
|
8
9
|
private readonly options;
|
|
9
|
-
private readonly activeZone;
|
|
10
10
|
private readonly open;
|
|
11
11
|
private readonly stream$;
|
|
12
12
|
readonly hovered: Signal<boolean>;
|
|
@@ -1,39 +1,67 @@
|
|
|
1
1
|
import { InjectionToken, type Provider, type Signal } from '@angular/core';
|
|
2
2
|
import { type TuiRounding } from '@taiga-ui/cdk/types';
|
|
3
|
-
export type TuiDecimalMode =
|
|
3
|
+
export type TuiDecimalMode =
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated use `TuiNumberFormatSettings[minimumFractionDigits]` instead
|
|
6
|
+
*/
|
|
7
|
+
'always' | 'not-zero' | 'pad';
|
|
4
8
|
export type TuiDecimalSymbol = ',' | '.';
|
|
9
|
+
/**
|
|
10
|
+
* TODO(v6): use `MaskitoNumberParams` from `@maskito/kit`
|
|
11
|
+
* ```ts
|
|
12
|
+
* export interface TuiNumberFormatSettings extends Pick<
|
|
13
|
+
* Required<MaskitoNumberParams>,
|
|
14
|
+
* | 'decimalSeparator'
|
|
15
|
+
* | 'maximumFractionDigits'
|
|
16
|
+
* | 'minimumFractionDigits'
|
|
17
|
+
* | 'minusSign'
|
|
18
|
+
* | 'negativePattern'
|
|
19
|
+
* | 'thousandSeparator'
|
|
20
|
+
* | 'thousandSeparatorPattern'
|
|
21
|
+
* > {...}
|
|
22
|
+
* ```
|
|
23
|
+
* It's a temporary workaround to preserve backward compatibility
|
|
24
|
+
* while avoiding the need to add @maskito/kit as a peer-dependency of @taiga-ui/core.
|
|
25
|
+
*/
|
|
26
|
+
interface MaskitoNumberParams {
|
|
27
|
+
decimalSeparator: string;
|
|
28
|
+
thousandSeparator: string;
|
|
29
|
+
thousandSeparatorPattern?(digits: string): readonly string[];
|
|
30
|
+
minusSign?: string;
|
|
31
|
+
negativePattern?: 'minusFirst' | 'prefixFirst';
|
|
32
|
+
maximumFractionDigits?: number;
|
|
33
|
+
minimumFractionDigits?: number;
|
|
34
|
+
}
|
|
5
35
|
/**
|
|
6
36
|
* Formatting configuration for displayed numbers
|
|
37
|
+
* TODO(v6): move TuiNumberFormatSettings (and its dependants) to `@taiga-ui/kit`
|
|
7
38
|
*/
|
|
8
|
-
export interface TuiNumberFormatSettings {
|
|
39
|
+
export interface TuiNumberFormatSettings extends MaskitoNumberParams {
|
|
9
40
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @note Use `Infinity` to keep untouched.
|
|
41
|
+
* @deprecated use `maximumFractionDigits` instead
|
|
12
42
|
*/
|
|
13
43
|
readonly precision: number;
|
|
14
|
-
/**
|
|
15
|
-
* Separator between the integer and the decimal part.
|
|
16
|
-
* @example 0,42 (',' by default)
|
|
17
|
-
*/
|
|
18
|
-
readonly decimalSeparator: TuiDecimalSymbol;
|
|
19
44
|
/**
|
|
20
45
|
* Rounding method.
|
|
21
46
|
*/
|
|
22
47
|
readonly rounding: TuiRounding;
|
|
23
|
-
/**
|
|
24
|
-
* Separator between thousands.
|
|
25
|
-
* @example 360 000 (' ' by default)
|
|
26
|
-
*/
|
|
27
|
-
readonly thousandSeparator: string;
|
|
28
48
|
/**
|
|
29
49
|
* Decimal part display mode. ('pad' by default)
|
|
30
50
|
*/
|
|
31
51
|
readonly decimalMode: TuiDecimalMode;
|
|
32
|
-
readonly negativePattern: 'minusFirst' | 'prefixFirst';
|
|
33
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* TODO(v6): add required props
|
|
55
|
+
* ```ts
|
|
56
|
+
* minusSign: CHAR_MINUS,
|
|
57
|
+
* maximumFractionDigits: Number.NaN,
|
|
58
|
+
* minimumFractionDigits: 0,
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
34
61
|
export declare const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings;
|
|
35
62
|
/**
|
|
36
63
|
* Formatting configuration for displayed numbers
|
|
37
64
|
*/
|
|
38
65
|
export declare const TUI_NUMBER_FORMAT: InjectionToken<Signal<TuiNumberFormatSettings>>;
|
|
39
66
|
export declare function tuiNumberFormatProvider(options: Partial<TuiNumberFormatSettings>): Provider;
|
|
67
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type TuiNumberFormatSettings } from '@taiga-ui/core/tokens';
|
|
2
2
|
/**
|
|
3
|
+
* @deprecated Use `import {tuiFormatNumber} from '@taiga-ui/kit'`
|
|
4
|
+
* TODO(v6): delete
|
|
3
5
|
* Formats number adding a thousand separators and correct decimal separator
|
|
4
6
|
* padding decimal part with zeroes to given length
|
|
5
7
|
*
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param precision number of digits of decimal part, null to keep untouched
|
|
6
6
|
* @return the fractional part of number
|
|
7
7
|
*/
|
|
8
|
-
export declare function tuiGetFractionPartPadded(value: number, precision?: number | null): string;
|
|
8
|
+
export declare function tuiGetFractionPartPadded(value: bigint | number | null, precision?: number | null): string;
|