@taiga-ui/legacy 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b
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/README.md +1 -1
- package/classes/abstract-textfield-host.d.ts +1 -1
- package/components/arrow/arrow.options.d.ts +1 -3
- package/components/arrow/arrow.providers.d.ts +1 -6
- package/components/dialog/dialog.component.d.ts +3 -4
- package/components/dialog/dialog.directive.d.ts +4 -3
- package/components/dialog/dialog.interfaces.d.ts +3 -4
- package/components/dialog/dialog.service.d.ts +5 -2
- package/components/dialog/dialog.tokens.d.ts +1 -3
- package/components/index.d.ts +1 -6
- package/components/input/input.module.d.ts +4 -4
- package/components/input-date-range/input-date-range.component.d.ts +1 -2
- package/components/input-date-range/input-date-range.module.d.ts +8 -9
- package/components/input-date-time/input-date-time.component.d.ts +1 -2
- package/components/input-date-time/input-date-time.module.d.ts +6 -6
- package/components/input-month-range/input-month-range.module.d.ts +3 -3
- package/components/input-number/input-number.component.d.ts +1 -2
- package/components/input-number/input-number.module.d.ts +5 -5
- package/components/input-number/input-number.options.d.ts +1 -7
- package/components/input-range/input-range.module.d.ts +4 -4
- package/components/mobile-dialog/index.d.ts +3 -0
- package/components/mobile-dialog/mobile-dialog.component.d.ts +10 -0
- package/components/mobile-dialog/mobile-dialog.options.d.ts +10 -0
- package/components/mobile-dialog/mobile-dialog.service.d.ts +14 -0
- package/components/pdf-viewer/pdf-viewer.component.d.ts +2 -2
- package/components/pdf-viewer/pdf-viewer.directive.d.ts +4 -3
- package/components/pdf-viewer/pdf-viewer.options.d.ts +1 -3
- package/components/pdf-viewer/pdf-viewer.service.d.ts +7 -3
- package/components/primitive-textfield/primitive-textfield-options.d.ts +2 -2
- package/components/primitive-textfield/primitive-textfield.module.d.ts +5 -5
- package/components/select/select.module.d.ts +8 -8
- package/components/select/select.options.d.ts +1 -7
- package/components/select-option/select-option.module.d.ts +3 -3
- package/directives/textfield-controller/textfield.options.d.ts +1 -3
- package/fesm2022/taiga-ui-legacy-classes.mjs +1 -3
- package/fesm2022/taiga-ui-legacy-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs +4 -17
- package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs +28 -21
- package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +31 -41
- package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +26 -32
- package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +9 -9
- package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs +26 -41
- package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs +11 -11
- package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-input.mjs +6 -5
- package/fesm2022/taiga-ui-legacy-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +62 -0
- package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -0
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +27 -21
- package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +16 -16
- package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs +6 -6
- package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components-select.mjs +27 -35
- package/fesm2022/taiga-ui-legacy-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-components.mjs +1 -6
- package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -1
- package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +3 -7
- package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +0 -1
- package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-legacy-utils.mjs +1 -7
- package/fesm2022/taiga-ui-legacy-utils.mjs.map +1 -1
- package/package.json +12 -29
- package/utils/icons-path-factory.d.ts +1 -1
- package/utils/index.d.ts +0 -1
- package/components/input-slider/index.d.ts +0 -2
- package/components/input-slider/input-slider.component.d.ts +0 -42
- package/components/input-slider/input-slider.module.d.ts +0 -18
- package/components/input-tag/index.d.ts +0 -3
- package/components/input-tag/input-tag.component.d.ts +0 -103
- package/components/input-tag/input-tag.module.d.ts +0 -22
- package/components/input-tag/input-tag.options.d.ts +0 -27
- package/components/multi-select/hide-selected.pipe.d.ts +0 -11
- package/components/multi-select/index.d.ts +0 -10
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +0 -23
- package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -8
- package/components/multi-select/multi-select.component.d.ts +0 -71
- package/components/multi-select/multi-select.directive.d.ts +0 -14
- package/components/multi-select/multi-select.module.d.ts +0 -31
- package/components/multi-select/multi-select.options.d.ts +0 -14
- package/components/multi-select/native-multi-select/native-multi-select-group.component.d.ts +0 -9
- package/components/multi-select/native-multi-select/native-multi-select.component.d.ts +0 -8
- package/components/multi-select/native-multi-select/native-multi-select.d.ts +0 -11
- package/components/multi-select-option/index.d.ts +0 -2
- package/components/multi-select-option/multi-select-option.component.d.ts +0 -9
- package/components/multi-select-option/multi-select-option.module.d.ts +0 -9
- package/components/tag/index.d.ts +0 -3
- package/components/tag/tag.component.d.ts +0 -44
- package/components/tag/tag.module.d.ts +0 -16
- package/components/tag/tag.options.d.ts +0 -27
- package/components/textarea/index.d.ts +0 -3
- package/components/textarea/textarea.component.d.ts +0 -54
- package/components/textarea/textarea.directive.d.ts +0 -12
- package/components/textarea/textarea.module.d.ts +0 -21
- package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +0 -199
- package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +0 -524
- package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs +0 -47
- package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +0 -690
- package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-tag.mjs +0 -225
- package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +0 -1
- package/fesm2022/taiga-ui-legacy-components-textarea.mjs +0 -262
- package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +0 -1
- package/utils/is-apple.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-directives-unfinished-validator.mjs","sources":["../../../projects/legacy/directives/unfinished-validator/unfinished.validator.ts","../../../projects/legacy/directives/unfinished-validator/unfinished-validator.directive.ts","../../../projects/legacy/directives/unfinished-validator/taiga-ui-legacy-directives-unfinished-validator.ts"],"sourcesContent":["import {type AbstractControl, type ValidatorFn} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {tuiIsHTMLElement, tuiIsInput} from '@taiga-ui/cdk/utils/dom';\nimport {type TuiFocusableElementAccessor} from '@taiga-ui/legacy/tokens';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport function tuiCreateUnfinishedValidator(\n nativeInputGetter: () => TuiFocusableElementAccessor,\n message: PolymorpheusContent,\n): ValidatorFn {\n return ({\n value,\n }: AbstractControl): {unfinished: TuiValidationError | string} | null => {\n const nativeInput = nativeInputGetter();\n\n return value === null &&\n nativeInput &&\n tuiIsHTMLElement(nativeInput.nativeFocusableElement) &&\n tuiIsInput(nativeInput.nativeFocusableElement) &&\n nativeInput.nativeFocusableElement.value !== ''\n ? {unfinished: new TuiValidationError(message)}\n : null;\n };\n}\n","import {Directive, inject, INJECTOR, Input} from '@angular/core';\nimport {NG_VALIDATORS, type Validator} from '@angular/forms';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/legacy/tokens';\n\nimport {tuiCreateUnfinishedValidator} from './unfinished.validator';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-directives-unfinished-validator.mjs","sources":["../../../projects/legacy/directives/unfinished-validator/unfinished.validator.ts","../../../projects/legacy/directives/unfinished-validator/unfinished-validator.directive.ts","../../../projects/legacy/directives/unfinished-validator/taiga-ui-legacy-directives-unfinished-validator.ts"],"sourcesContent":["import {type AbstractControl, type ValidatorFn} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {tuiIsHTMLElement, tuiIsInput} from '@taiga-ui/cdk/utils/dom';\nimport {type TuiFocusableElementAccessor} from '@taiga-ui/legacy/tokens';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport function tuiCreateUnfinishedValidator(\n nativeInputGetter: () => TuiFocusableElementAccessor,\n message: PolymorpheusContent,\n): ValidatorFn {\n return ({\n value,\n }: AbstractControl): {unfinished: TuiValidationError | string} | null => {\n const nativeInput = nativeInputGetter();\n\n return value === null &&\n nativeInput &&\n tuiIsHTMLElement(nativeInput.nativeFocusableElement) &&\n tuiIsInput(nativeInput.nativeFocusableElement) &&\n nativeInput.nativeFocusableElement.value !== ''\n ? {unfinished: new TuiValidationError(message)}\n : null;\n };\n}\n","import {Directive, inject, INJECTOR, Input} from '@angular/core';\nimport {NG_VALIDATORS, type Validator} from '@angular/forms';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/legacy/tokens';\n\nimport {tuiCreateUnfinishedValidator} from './unfinished.validator';\n\n@Directive({\n selector: '[tuiUnfinishedValidator]',\n providers: [tuiProvide(NG_VALIDATORS, TuiUnfinishedValidator, true)],\n})\nexport class TuiUnfinishedValidator implements Validator {\n private readonly default = inject(TUI_DEFAULT_ERROR_MESSAGE);\n private readonly injector = inject(INJECTOR);\n\n @Input()\n public tuiUnfinishedValidator = '';\n\n public readonly validate = tuiCreateUnfinishedValidator(\n () => this.injector.get(TUI_FOCUSABLE_ITEM_ACCESSOR),\n () => this.tuiUnfinishedValidator || this.default(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAMgB,SAAA,4BAA4B,CACxC,iBAAoD,EACpD,OAA4B,EAAA;AAE5B,IAAA,OAAO,CAAC,EACJ,KAAK,GACS,KAAsD;AACpE,QAAA,MAAM,WAAW,GAAG,iBAAiB,EAAE;QAEvC,OAAO,KAAK,KAAK,IAAI;YACjB,WAAW;AACX,YAAA,gBAAgB,CAAC,WAAW,CAAC,sBAAsB,CAAC;AACpD,YAAA,UAAU,CAAC,WAAW,CAAC,sBAAsB,CAAC;AAC9C,YAAA,WAAW,CAAC,sBAAsB,CAAC,KAAK,KAAK;cAC3C,EAAC,UAAU,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC;cAC5C,IAAI;AAC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**
|
|
@@ -165,11 +164,6 @@ function tuiIconsPathFactory(staticPath) {
|
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated: drop in v5.0
|
|
170
|
-
*/
|
|
171
|
-
const tuiIsApple = isApple;
|
|
172
|
-
|
|
173
167
|
/**
|
|
174
168
|
* @deprecated: drop in v5.0
|
|
175
169
|
*/
|
|
@@ -264,5 +258,5 @@ const FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({
|
|
|
264
258
|
* Generated bundle index. Do not edit.
|
|
265
259
|
*/
|
|
266
260
|
|
|
267
|
-
export { DEFAULT_ICONS_PATH, FIXED_DROPDOWN_CONTROLLER_PROVIDER, TUI_CACHE_BUSTING_PAYLOAD, TUI_DATE_MODE_MASKITO_ADAPTER, tuiCapitalizeFirstLetter, tuiFormatPhone, tuiGetBorder, tuiGetMaxAllowedPhoneLength, tuiGetSafeAreaSize, tuiIconsPathFactory,
|
|
261
|
+
export { DEFAULT_ICONS_PATH, FIXED_DROPDOWN_CONTROLLER_PROVIDER, TUI_CACHE_BUSTING_PAYLOAD, TUI_DATE_MODE_MASKITO_ADAPTER, tuiCapitalizeFirstLetter, tuiFormatPhone, tuiGetBorder, tuiGetMaxAllowedPhoneLength, tuiGetSafeAreaSize, tuiIconsPathFactory, tuiIsPresumedHTMLString, tuiIsoToCountryCode, tuiNotKzRegion, tuiProcessIcon };
|
|
268
262
|
//# sourceMappingURL=taiga-ui-legacy-utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-legacy-utils.mjs","sources":["../../../projects/legacy/utils/capitalize-first-letter.ts","../../../projects/legacy/utils/date-mode-maskito-adapter.ts","../../../projects/legacy/utils/format-phone.ts","../../../projects/legacy/utils/get-border.ts","../../../projects/legacy/utils/get-max-allowed-phone-length.ts","../../../projects/legacy/utils/get-safe-area-size.ts","../../../projects/legacy/utils/icons-path-factory.ts","../../../projects/legacy/utils/is-apple.ts","../../../projects/legacy/utils/is-presumed-html-string.ts","../../../projects/legacy/utils/iso-to-country-code.ts","../../../projects/legacy/utils/not-kz-region.ts","../../../projects/legacy/utils/process-icon.ts","../../../projects/legacy/utils/specific-dropdown-controllers.ts","../../../projects/legacy/utils/taiga-ui-legacy-utils.ts"],"sourcesContent":["/**\n * @deprecated: drop in v5.0\n */\nexport function tuiCapitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","import {type MaskitoDateMode} from '@maskito/kit';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_DATE_MODE_MASKITO_ADAPTER: Record<TuiDateMode, MaskitoDateMode> = {\n DMY: 'dd/mm/yyyy',\n MDY: 'mm/dd/yyyy',\n YMD: 'yyyy/mm/dd',\n};\n","import {CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\n/**\n * @deprecated: drop in v5.0\n * Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead!\n * @example\n * import {maskitoTransform} from '@maskito/core';\n *\n * const mask = {\n * mask: ['+', '1', ' ', /\\d/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/],\n * };\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @example\n * import {maskitoTransform} from '@maskito/core';\n * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * const options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});\n *\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>\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 tuiFormatPhone(\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.replaceAll(/[()]/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 (const mask of splitPhoneMask) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (mask === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += mask;\n }\n }\n\n return result;\n}\n","import {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\n/**\n * @deprecated: drop in v5.0\n */\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner = false,\n hasTooltip = false,\n hasContent = false,\n size: TuiSizeL | TuiSizeS = 'm',\n): number {\n const offset = size === 's' ? 0 : 0.25;\n let border = 0;\n\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n\n return border;\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\n/**\n * @deprecated: drop in v5.0\n * use `validatePhoneNumberLength` from `libphonenumber-js` instead\n * ```\n * npm i libphonenumber-js\n * ```\n *\n * ```ts\n * import {validatePhoneNumberLength} from 'libphonenumber-js';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const validationError = validatePhoneNumberLength(\n * '+7 777 777-7777',\n * 'KZ'\n * ) // undefined | 'INVALID_COUNTRY' | 'NOT_A_NUMBER' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_LENGTH';\n *\n * validatePhoneNumberLength('+7777777', 'KZ'); // 'TOO_SHORT'\n * validatePhoneNumberLength('+7 777 777-7777', 'KZ'); // undefined\n * validatePhoneNumberLength('+77777777777', 'KZ'); // undefined\n * validatePhoneNumberLength('+777777777777777777', 'KZ'); // 'TOO_LONG'\n * ```\n */\nexport function tuiGetMaxAllowedPhoneLength(\n countries: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): number {\n return countries[isoCode].replaceAll(/[()\\- ]/g, '').length;\n}\n","/**\n * @deprecated: drop in v5.0\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function tuiGetSafeAreaSize(): number {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n\n const div = document.createElement('div');\n\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","import {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}` as const;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = (name) =>\n name.includes('.svg#') ? name : `#${name}`;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIconsPathFactory(staticPath: string): TuiStringHandler<string> {\n const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;\n\n return (name) => {\n if (name.startsWith('tuiIcon')) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n\n return DEFAULT_ICONS_PATH(name);\n };\n}\n","import {isApple} from '@ng-web-apis/platform';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const tuiIsApple = isApple;\n","/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith('<') && trimmed.endsWith('>');\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\nconst MASK_AFTER_CODE_REGEXP = /\\(#+\\)|[#\\- ]/g;\n\n/**\n * @deprecated: drop in v5.0\n * Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\nexport function tuiIsoToCountryCode(\n countriesMasks: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): string {\n return countriesMasks[isoCode].replaceAll(MASK_AFTER_CODE_REGEXP, '');\n}\n","/**\n * @deprecated: drop in v5.0\n * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const countryIsoCode = maskitoGetCountryFromNumber(\n * '+7 777 777-7777',\n * metadata\n * );\n *\n * countryIsoCode !== 'KZ'\n * ```\n */\nexport function tuiNotKzRegion(value: string): boolean {\n const region = Number(value.slice(1, 4));\n\n return region < 600 || region > 799;\n}\n","const WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '<svg';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiProcessIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf('>')));\n\n if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf('\"', widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf('\"', heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes('%') ||\n heightString.includes('%') ||\n widthString.includes('em') ||\n heightString.includes('em')\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n","import {tuiDropdownOptionsProvider} from '@taiga-ui/core/directives/dropdown';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({\n limitWidth: 'fixed',\n align: 'right',\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;AAEG;AACG,SAAU,wBAAwB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;AAC9D;;ACFA;;AAEG;AACU,MAAA,6BAA6B,GAAyC;AAC/E,IAAA,GAAG,EAAE,YAAY;AACj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Z,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CACxC;AAED,IAAA,IACI,CAAC,YAAY;AACb,QAAA,CAAC,WAAW;AACZ,QAAA,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,QAAA,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC1B,QAAA,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC1B,QAAA,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B;QACE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAY,SAAA,EAAA,IAAI,CAAG,CAAA,CAAA,CAAC;;IAGlD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC;IAEzC,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,kEAAA,EACjB,KAAK,GAAG,EACZ,CAAA,YAAA,EACI,MAAM,GAAG,EACb,CAAA,oCAAA,EAAuC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAA,UAAA,EAAa,CAAC,KAAK,GAAG,CAAC,CACzE,KAAA,EAAA,CAAC,MAAM,GAAG,CACd,CAAA,EAAA,EAAK,GAAG,CAAA,gBAAA,CAAkB;AAC9B;;ACtDA;;AAEG;AACI,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AACzE,IAAA,UAAU,EAAE,OAAO;AACnB,IAAA,KAAK,EAAE,OAAO;AACjB,CAAA;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-legacy-utils.mjs","sources":["../../../projects/legacy/utils/capitalize-first-letter.ts","../../../projects/legacy/utils/date-mode-maskito-adapter.ts","../../../projects/legacy/utils/format-phone.ts","../../../projects/legacy/utils/get-border.ts","../../../projects/legacy/utils/get-max-allowed-phone-length.ts","../../../projects/legacy/utils/get-safe-area-size.ts","../../../projects/legacy/utils/icons-path-factory.ts","../../../projects/legacy/utils/is-presumed-html-string.ts","../../../projects/legacy/utils/iso-to-country-code.ts","../../../projects/legacy/utils/not-kz-region.ts","../../../projects/legacy/utils/process-icon.ts","../../../projects/legacy/utils/specific-dropdown-controllers.ts","../../../projects/legacy/utils/taiga-ui-legacy-utils.ts"],"sourcesContent":["/**\n * @deprecated: drop in v5.0\n */\nexport function tuiCapitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","import {type MaskitoDateMode} from '@maskito/kit';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_DATE_MODE_MASKITO_ADAPTER: Record<TuiDateMode, MaskitoDateMode> = {\n DMY: 'dd/mm/yyyy',\n MDY: 'mm/dd/yyyy',\n YMD: 'yyyy/mm/dd',\n};\n","import {CHAR_PLUS} from '@taiga-ui/cdk/constants';\n\n/**\n * @deprecated: drop in v5.0\n * Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead!\n * @example\n * import {maskitoTransform} from '@maskito/core';\n *\n * const mask = {\n * mask: ['+', '1', ' ', /\\d/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/],\n * };\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @example\n * import {maskitoTransform} from '@maskito/core';\n * import {maskitoPhoneOptionsGenerator} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/min/metadata';\n *\n * const options = maskitoPhoneOptionsGenerator({countryIsoCode: 'US', metadata});\n *\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>\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 tuiFormatPhone(\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.replaceAll(/[()]/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 (const mask of splitPhoneMask) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (mask === '#') {\n result += splitValue[0] || '';\n splitValue.splice(0, 1);\n } else {\n result += mask;\n }\n }\n\n return result;\n}\n","import {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\n/**\n * @deprecated: drop in v5.0\n */\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner = false,\n hasTooltip = false,\n hasContent = false,\n size: TuiSizeL | TuiSizeS = 'm',\n): number {\n const offset = size === 's' ? 0 : 0.25;\n let border = 0;\n\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n\n return border;\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\n/**\n * @deprecated: drop in v5.0\n * use `validatePhoneNumberLength` from `libphonenumber-js` instead\n * ```\n * npm i libphonenumber-js\n * ```\n *\n * ```ts\n * import {validatePhoneNumberLength} from 'libphonenumber-js';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const validationError = validatePhoneNumberLength(\n * '+7 777 777-7777',\n * 'KZ'\n * ) // undefined | 'INVALID_COUNTRY' | 'NOT_A_NUMBER' | 'TOO_SHORT' | 'TOO_LONG' | 'INVALID_LENGTH';\n *\n * validatePhoneNumberLength('+7777777', 'KZ'); // 'TOO_SHORT'\n * validatePhoneNumberLength('+7 777 777-7777', 'KZ'); // undefined\n * validatePhoneNumberLength('+77777777777', 'KZ'); // undefined\n * validatePhoneNumberLength('+777777777777777777', 'KZ'); // 'TOO_LONG'\n * ```\n */\nexport function tuiGetMaxAllowedPhoneLength(\n countries: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): number {\n return countries[isoCode].replaceAll(/[()\\- ]/g, '').length;\n}\n","/**\n * @deprecated: drop in v5.0\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function tuiGetSafeAreaSize(): number {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n\n const div = document.createElement('div');\n\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","import {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}` as const;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = (name) =>\n name.includes('.svg#') ? name : `#${name}`;\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIconsPathFactory(staticPath: string): TuiStringHandler<string> {\n const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;\n\n return (name) => {\n if (name.startsWith('tuiIcon')) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n\n return DEFAULT_ICONS_PATH(name);\n };\n}\n","/**\n * @deprecated: drop in v5.0\n */\nexport function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith('<') && trimmed.endsWith('>');\n}\n","import {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\n\nconst MASK_AFTER_CODE_REGEXP = /\\(#+\\)|[#\\- ]/g;\n\n/**\n * @deprecated: drop in v5.0\n * Use `getCountryCallingCode` from `libphonenumber-js/core` instead\n * ```ts\n * import {getCountryCallingCode} from 'libphonenumber-js/core';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * getCountryCallingCode('US', metadata) // 1\n * getCountryCallingCode('GB', metadata) // 44\n * ```\n */\nexport function tuiIsoToCountryCode(\n countriesMasks: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): string {\n return countriesMasks[isoCode].replaceAll(MASK_AFTER_CODE_REGEXP, '');\n}\n","/**\n * @deprecated: drop in v5.0\n * use `maskitoGetCountryFromNumber` from `@maskito/phone` instead\n * ```\n * npm i @maskito/phone\n * ```\n *\n * ```ts\n * import {maskitoGetCountryFromNumber} from '@maskito/phone';\n * import metadata from 'libphonenumber-js/max/metadata';\n *\n * const countryIsoCode = maskitoGetCountryFromNumber(\n * '+7 777 777-7777',\n * metadata\n * );\n *\n * countryIsoCode !== 'KZ'\n * ```\n */\nexport function tuiNotKzRegion(value: string): boolean {\n const region = Number(value.slice(1, 4));\n\n return region < 600 || region > 799;\n}\n","const WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '<svg';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport function tuiProcessIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf('>')));\n\n if (!attributes?.includes(WIDTH_SEARCH) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf('\"', widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf('\"', heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes('%') ||\n heightString.includes('%') ||\n widthString.includes('em') ||\n heightString.includes('em')\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n","import {tuiDropdownOptionsProvider} from '@taiga-ui/core/directives/dropdown';\n\n/**\n * @deprecated: drop in v5.0\n */\nexport const FIXED_DROPDOWN_CONTROLLER_PROVIDER = tuiDropdownOptionsProvider({\n limitWidth: 'fixed',\n align: 'right',\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG;AACG,SAAU,wBAAwB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;AAC9D;;ACFA;;AAEG;AACU,MAAA,6BAA6B,GAAyC;AAC/E,IAAA,GAAG,EAAE,YAAY;AACjB,IAAA,GAAG,EAAE,YAAY;AACjB,IAAA,GAAG,EAAE,YAAY;;;ACPrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,GAAG,CAAC;AACzB,QAAA,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC1B,QAAA,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC1B,QAAA,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B;QACE,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAY,SAAA,EAAA,IAAI,CAAG,CAAA,CAAA,CAAC;;IAGlD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC;IAEzC,OAAO,CAAA,OAAA,EAAU,IAAI,CAAA,kEAAA,EACjB,KAAK,GAAG,EACZ,CAAA,YAAA,EACI,MAAM,GAAG,EACb,CAAA,oCAAA,EAAuC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAA,UAAA,EAAa,CAAC,KAAK,GAAG,CAAC,CACzE,KAAA,EAAA,CAAC,MAAM,GAAG,CACd,CAAA,EAAA,EAAK,GAAG,CAAA,gBAAA,CAAkB;AAC9B;;ACtDA;;AAEG;AACI,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AACzE,IAAA,UAAU,EAAE,OAAO;AACnB,IAAA,KAAK,EAAE,OAAO;AACjB,CAAA;;ACRD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/legacy",
|
|
3
|
-
"version": "4.52.0-canary.
|
|
3
|
+
"version": "4.52.0-canary.ec0802b",
|
|
4
4
|
"description": "Legacy Taiga UI entities from the previous major release to simplify migration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legacy",
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"outdated"
|
|
9
9
|
],
|
|
10
10
|
"homepage": "https://github.com/taiga-family/taiga-ui",
|
|
11
|
-
"repository":
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/taiga-family/taiga-ui"
|
|
14
|
+
},
|
|
12
15
|
"license": "Apache-2.0",
|
|
13
16
|
"exports": {
|
|
14
17
|
"./styles/*": "./styles/*",
|
|
@@ -43,14 +46,14 @@
|
|
|
43
46
|
"types": "./components/arrow/index.d.ts",
|
|
44
47
|
"default": "./fesm2022/taiga-ui-legacy-components-arrow.mjs"
|
|
45
48
|
},
|
|
46
|
-
"./components/input": {
|
|
47
|
-
"types": "./components/input/index.d.ts",
|
|
48
|
-
"default": "./fesm2022/taiga-ui-legacy-components-input.mjs"
|
|
49
|
-
},
|
|
50
49
|
"./components/dialog": {
|
|
51
50
|
"types": "./components/dialog/index.d.ts",
|
|
52
51
|
"default": "./fesm2022/taiga-ui-legacy-components-dialog.mjs"
|
|
53
52
|
},
|
|
53
|
+
"./components/input": {
|
|
54
|
+
"types": "./components/input/index.d.ts",
|
|
55
|
+
"default": "./fesm2022/taiga-ui-legacy-components-input.mjs"
|
|
56
|
+
},
|
|
54
57
|
"./components/input-date-range": {
|
|
55
58
|
"types": "./components/input-date-range/index.d.ts",
|
|
56
59
|
"default": "./fesm2022/taiga-ui-legacy-components-input-date-range.mjs"
|
|
@@ -71,21 +74,9 @@
|
|
|
71
74
|
"types": "./components/input-range/index.d.ts",
|
|
72
75
|
"default": "./fesm2022/taiga-ui-legacy-components-input-range.mjs"
|
|
73
76
|
},
|
|
74
|
-
"./components/
|
|
75
|
-
"types": "./components/
|
|
76
|
-
"default": "./fesm2022/taiga-ui-legacy-components-
|
|
77
|
-
},
|
|
78
|
-
"./components/input-tag": {
|
|
79
|
-
"types": "./components/input-tag/index.d.ts",
|
|
80
|
-
"default": "./fesm2022/taiga-ui-legacy-components-input-tag.mjs"
|
|
81
|
-
},
|
|
82
|
-
"./components/multi-select": {
|
|
83
|
-
"types": "./components/multi-select/index.d.ts",
|
|
84
|
-
"default": "./fesm2022/taiga-ui-legacy-components-multi-select.mjs"
|
|
85
|
-
},
|
|
86
|
-
"./components/multi-select-option": {
|
|
87
|
-
"types": "./components/multi-select-option/index.d.ts",
|
|
88
|
-
"default": "./fesm2022/taiga-ui-legacy-components-multi-select-option.mjs"
|
|
77
|
+
"./components/mobile-dialog": {
|
|
78
|
+
"types": "./components/mobile-dialog/index.d.ts",
|
|
79
|
+
"default": "./fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs"
|
|
89
80
|
},
|
|
90
81
|
"./components/pdf-viewer": {
|
|
91
82
|
"types": "./components/pdf-viewer/index.d.ts",
|
|
@@ -103,14 +94,6 @@
|
|
|
103
94
|
"types": "./components/select-option/index.d.ts",
|
|
104
95
|
"default": "./fesm2022/taiga-ui-legacy-components-select-option.mjs"
|
|
105
96
|
},
|
|
106
|
-
"./components/tag": {
|
|
107
|
-
"types": "./components/tag/index.d.ts",
|
|
108
|
-
"default": "./fesm2022/taiga-ui-legacy-components-tag.mjs"
|
|
109
|
-
},
|
|
110
|
-
"./components/textarea": {
|
|
111
|
-
"types": "./components/textarea/index.d.ts",
|
|
112
|
-
"default": "./fesm2022/taiga-ui-legacy-components-textarea.mjs"
|
|
113
|
-
},
|
|
114
97
|
"./components/tooltip": {
|
|
115
98
|
"types": "./components/tooltip/index.d.ts",
|
|
116
99
|
"default": "./fesm2022/taiga-ui-legacy-components-tooltip.mjs"
|
|
@@ -2,7 +2,7 @@ import { type TuiStringHandler } from '@taiga-ui/cdk/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated: drop in v5.0
|
|
4
4
|
*/
|
|
5
|
-
export declare const TUI_CACHE_BUSTING_PAYLOAD: "?v=4.52.0-canary.
|
|
5
|
+
export declare const TUI_CACHE_BUSTING_PAYLOAD: "?v=4.52.0-canary.ec0802b";
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated: drop in v5.0
|
|
8
8
|
*/
|
package/utils/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './get-border';
|
|
|
5
5
|
export * from './get-max-allowed-phone-length';
|
|
6
6
|
export * from './get-safe-area-size';
|
|
7
7
|
export * from './icons-path-factory';
|
|
8
|
-
export * from './is-apple';
|
|
9
8
|
export * from './is-presumed-html-string';
|
|
10
9
|
export * from './iso-to-country-code';
|
|
11
10
|
export * from './not-kz-region';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type TuiContext } from '@taiga-ui/cdk/types';
|
|
2
|
-
import { type TuiKeySteps } from '@taiga-ui/kit/components/slider';
|
|
3
|
-
import { AbstractTuiControl } from '@taiga-ui/legacy/classes';
|
|
4
|
-
import { type TuiFocusableElementAccessor, type TuiNativeFocusableElement } from '@taiga-ui/legacy/tokens';
|
|
5
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* TODO(v5): delete it
|
|
9
|
-
* @deprecated use new version of {@link https://taiga-ui.dev/components/input-slider TuiInputSlider} (from @taiga-ui/kit) instead
|
|
10
|
-
*/
|
|
11
|
-
export declare class TuiInputSliderComponent extends AbstractTuiControl<number> implements TuiFocusableElementAccessor {
|
|
12
|
-
private readonly inputNumberRef?;
|
|
13
|
-
private readonly sliderRef?;
|
|
14
|
-
protected textfieldValue: number;
|
|
15
|
-
protected readonly controller: import("@taiga-ui/legacy/directives").TuiTextfieldController;
|
|
16
|
-
min: number;
|
|
17
|
-
max: number;
|
|
18
|
-
quantum: number;
|
|
19
|
-
steps: number;
|
|
20
|
-
segments: number[] | number;
|
|
21
|
-
keySteps: TuiKeySteps | null;
|
|
22
|
-
valueContent: PolymorpheusContent<TuiContext<number>>;
|
|
23
|
-
get nativeFocusableElement(): TuiNativeFocusableElement | null;
|
|
24
|
-
get focused(): boolean;
|
|
25
|
-
writeValue(value: number | null): void;
|
|
26
|
-
protected get prefix(): string;
|
|
27
|
-
protected get postfix(): string;
|
|
28
|
-
protected get computedSteps(): number;
|
|
29
|
-
protected get precision(): number;
|
|
30
|
-
protected get showValueContent(): boolean;
|
|
31
|
-
protected get step(): number;
|
|
32
|
-
protected computeKeySteps(keySteps: TuiKeySteps | null, min: number, max: number): TuiKeySteps;
|
|
33
|
-
protected focusTextInput(): void;
|
|
34
|
-
protected safelyUpdateValue(value: number | null): void;
|
|
35
|
-
protected onVerticalArrowKeyDown(coefficient: number): void;
|
|
36
|
-
protected onSliderChange(newValue: number): void;
|
|
37
|
-
protected onFocused(focused: boolean): void;
|
|
38
|
-
protected getFallbackValue(): number;
|
|
39
|
-
private valueGuard;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputSliderComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputSliderComponent, "tui-input-slider", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "quantum": { "alias": "quantum"; "required": false; }; "steps": { "alias": "steps"; "required": false; }; "segments": { "alias": "segments"; "required": false; }; "keySteps": { "alias": "keySteps"; "required": false; }; "valueContent": { "alias": "valueContent"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
42
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./input-slider.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "@angular/forms";
|
|
5
|
-
import * as i4 from "@taiga-ui/polymorpheus";
|
|
6
|
-
import * as i5 from "@taiga-ui/legacy/components/input-number";
|
|
7
|
-
import * as i6 from "@taiga-ui/core/directives/number-format";
|
|
8
|
-
import * as i7 from "@taiga-ui/legacy/directives";
|
|
9
|
-
import * as i8 from "@taiga-ui/kit/components/slider";
|
|
10
|
-
/**
|
|
11
|
-
* TODO(v5): delete it
|
|
12
|
-
* @deprecated use new version of {@link https://taiga-ui.dev/components/input-slider TuiInputSlider} (from @taiga-ui/kit) instead
|
|
13
|
-
*/
|
|
14
|
-
export declare class TuiInputSliderModule {
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputSliderModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiInputSliderModule, [typeof i1.TuiInputSliderComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PolymorpheusOutlet, typeof i4.PolymorpheusTemplate, typeof i5.TuiInputNumberModule, typeof i6.TuiNumberFormat, typeof i7.TuiTextfieldControllerModule, typeof i8.TuiSliderComponent, typeof i8.TuiSliderThumbLabel, typeof i8.TuiSliderKeyStepsBase, typeof i8.TuiSliderKeySteps, typeof i8.TuiSliderReadonly], [typeof i1.TuiInputSliderComponent, typeof i8.TuiSliderComponent, typeof i8.TuiSliderThumbLabel, typeof i8.TuiSliderKeyStepsBase, typeof i8.TuiSliderKeySteps, typeof i8.TuiSliderReadonly]>;
|
|
17
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<TuiInputSliderModule>;
|
|
18
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
-
import { type TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
3
|
-
import { type TuiBooleanHandler, type TuiContext } from '@taiga-ui/cdk/types';
|
|
4
|
-
import { type TuiDataListHost } from '@taiga-ui/core/components/data-list';
|
|
5
|
-
import { TuiHintOptionsDirective } from '@taiga-ui/core/directives/hint';
|
|
6
|
-
import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
|
|
7
|
-
import { AbstractTuiMultipleControl, type TuiStringifiableItem } from '@taiga-ui/legacy/classes';
|
|
8
|
-
import { type TuiFocusableElementAccessor } from '@taiga-ui/legacy/tokens';
|
|
9
|
-
import { type TuiStatus } from '@taiga-ui/legacy/utils';
|
|
10
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "@taiga-ui/core/directives/dropdown";
|
|
13
|
-
/**
|
|
14
|
-
* TODO(v5): delete it
|
|
15
|
-
* @deprecated use {@link https://taiga-ui.dev/components/input-chip TuiInputChip} instead
|
|
16
|
-
*/
|
|
17
|
-
export declare class TuiInputTagComponent extends AbstractTuiMultipleControl<string> implements TuiFocusableElementAccessor, TuiDataListHost<string> {
|
|
18
|
-
private readonly dropdown?;
|
|
19
|
-
private readonly focusableElement?;
|
|
20
|
-
private readonly tagsContainer?;
|
|
21
|
-
private readonly tags;
|
|
22
|
-
private readonly cleanerSvg?;
|
|
23
|
-
private readonly scrollBar?;
|
|
24
|
-
private readonly el;
|
|
25
|
-
private readonly options;
|
|
26
|
-
protected readonly datalist?: TemplateRef<TuiContext<TuiActiveZone>>;
|
|
27
|
-
protected readonly valueContent?: unknown;
|
|
28
|
-
protected readonly errorIconTemplate?: TemplateRef<Record<string, unknown>>;
|
|
29
|
-
protected readonly textfieldOptions: import("@taiga-ui/core/components/textfield").TuiTextfieldOptions;
|
|
30
|
-
protected readonly hintOptions: TuiHintOptionsDirective | null;
|
|
31
|
-
protected readonly controller: import("@taiga-ui/legacy/directives").TuiTextfieldController;
|
|
32
|
-
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
33
|
-
protected status: TuiStatus;
|
|
34
|
-
protected open: boolean;
|
|
35
|
-
separator: RegExp | string;
|
|
36
|
-
search: string | null;
|
|
37
|
-
editable: boolean;
|
|
38
|
-
tagValidator: TuiBooleanHandler<string> | TuiBooleanHandler<TuiStringifiableItem<unknown> | string>;
|
|
39
|
-
rows: number;
|
|
40
|
-
inputHidden: boolean;
|
|
41
|
-
uniqueTags: boolean;
|
|
42
|
-
autoColor: boolean;
|
|
43
|
-
maxLength: number | null;
|
|
44
|
-
placeholder: string;
|
|
45
|
-
removable: boolean;
|
|
46
|
-
disabledItemHandler: TuiBooleanHandler<TuiStringifiableItem<any> | string>;
|
|
47
|
-
readonly searchChange: EventEmitter<string>;
|
|
48
|
-
pseudoOpen: import("@angular/core").WritableSignal<boolean>;
|
|
49
|
-
set pseudoFocusedSetter(value: boolean | null);
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated hack
|
|
52
|
-
*/
|
|
53
|
-
set setPseudoOpen(value: boolean);
|
|
54
|
-
get labelOutside(): boolean;
|
|
55
|
-
get size(): TuiSizeL | TuiSizeS;
|
|
56
|
-
get nativeFocusableElement(): HTMLInputElement | null;
|
|
57
|
-
get hasValue(): boolean;
|
|
58
|
-
get hasExampleText(): boolean;
|
|
59
|
-
get hasPlaceholder(): boolean;
|
|
60
|
-
get focused(): boolean;
|
|
61
|
-
get tagsEmpty(): boolean;
|
|
62
|
-
onTagEdited(value: string, index: number): void;
|
|
63
|
-
handleOption(item: string): void;
|
|
64
|
-
setDisabledState(): void;
|
|
65
|
-
protected get iconStart(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>>;
|
|
66
|
-
protected get appearance(): string;
|
|
67
|
-
protected get expandable(): boolean;
|
|
68
|
-
protected get icon(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>>;
|
|
69
|
-
protected get iconCleaner(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeS>>;
|
|
70
|
-
protected get hasCleaner(): boolean;
|
|
71
|
-
protected get hasNativeValue(): boolean;
|
|
72
|
-
protected get placeholderRaised(): boolean;
|
|
73
|
-
protected get hasRightIcons(): boolean;
|
|
74
|
-
protected get showHint(): boolean;
|
|
75
|
-
protected get canOpen(): boolean;
|
|
76
|
-
protected get computeMaxHeight(): number | null;
|
|
77
|
-
protected onFocusInOut(): void;
|
|
78
|
-
protected detectRetargetFromLabel(event: Event): void;
|
|
79
|
-
protected getLeftContent(tag: string): PolymorpheusContent;
|
|
80
|
-
protected onCleanerClick(): void;
|
|
81
|
-
protected onActiveZone(active: boolean): void;
|
|
82
|
-
protected onMouseDown(event: MouseEvent): void;
|
|
83
|
-
protected onFieldKeyDownBackspace(event: Event): void;
|
|
84
|
-
protected onFieldKeyDownArrowLeft(event: Event): void;
|
|
85
|
-
protected onFieldKeyDownEnter(): void;
|
|
86
|
-
protected onTagKeyDownArrowLeft(currentIndex: number): void;
|
|
87
|
-
protected onTagKeyDownArrowRight(currentIndex: number): void;
|
|
88
|
-
protected onInput(value: string): void;
|
|
89
|
-
protected onPaste(event: Event): void;
|
|
90
|
-
protected onDrop({ dataTransfer }: DragEvent): void;
|
|
91
|
-
protected trackByFn(_: number, tag: string): string;
|
|
92
|
-
private get lineHeight();
|
|
93
|
-
private scrollTo;
|
|
94
|
-
private filterValue;
|
|
95
|
-
private onScrollKeyDown;
|
|
96
|
-
private updateSearch;
|
|
97
|
-
private addTag;
|
|
98
|
-
private deleteLastEnabledItem;
|
|
99
|
-
private focusInput;
|
|
100
|
-
private clippedValue;
|
|
101
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputTagComponent, never>;
|
|
102
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputTagComponent, "tui-input-tag", never, { "separator": { "alias": "separator"; "required": false; }; "search": { "alias": "search"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "tagValidator": { "alias": "tagValidator"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "inputHidden": { "alias": "inputHidden"; "required": false; }; "uniqueTags": { "alias": "uniqueTags"; "required": false; }; "autoColor": { "alias": "autoColor"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; }; "pseudoFocusedSetter": { "alias": "pseudoFocused"; "required": false; }; "setPseudoOpen": { "alias": "pseudoOpen"; "required": false; }; }, { "searchChange": "searchChange"; }, ["datalist", "valueContent"], ["*", "tuiContent", "select"], false, [{ directive: typeof i1.TuiDropdownFixed; inputs: {}; outputs: {}; }]>;
|
|
103
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./input-tag.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "@angular/forms";
|
|
5
|
-
import * as i4 from "@taiga-ui/polymorpheus";
|
|
6
|
-
import * as i5 from "@taiga-ui/cdk/directives/hovered";
|
|
7
|
-
import * as i6 from "@taiga-ui/core/components/scrollbar";
|
|
8
|
-
import * as i7 from "@taiga-ui/legacy/components/tooltip";
|
|
9
|
-
import * as i8 from "@taiga-ui/legacy/components/tag";
|
|
10
|
-
import * as i9 from "@taiga-ui/legacy/directives";
|
|
11
|
-
import * as i10 from "@taiga-ui/core/directives/appearance";
|
|
12
|
-
import * as i11 from "@taiga-ui/core/components/icon";
|
|
13
|
-
import * as i12 from "@taiga-ui/core/directives/dropdown";
|
|
14
|
-
/**
|
|
15
|
-
* TODO(v5): delete it
|
|
16
|
-
* @deprecated use {@link https://taiga-ui.dev/components/input-chip TuiInputChip} instead
|
|
17
|
-
*/
|
|
18
|
-
export declare class TuiInputTagModule {
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputTagModule, never>;
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TuiInputTagModule, [typeof i1.TuiInputTagComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PolymorpheusOutlet, typeof i4.PolymorpheusTemplate, typeof i5.TuiHovered, typeof i6.TuiScrollbar, typeof i7.TuiTooltipModule, typeof i8.TuiTagModule, typeof i9.TuiWrapperModule, typeof i9.TuiLegacyDropdownOpenMonitorDirective, typeof i10.TuiAppearance, typeof i11.TuiIcon, typeof i12.TuiDropdownOptionsDirective, typeof i12.TuiDropdownDriverDirective, typeof i12.TuiDropdownDirective, typeof i12.TuiDropdownComponent, typeof i12.TuiDropdownOpen, typeof i12.TuiDropdownOpenLegacy, typeof i12.TuiDropdownManual, typeof i12.TuiDropdownHover, typeof i12.TuiDropdownContent, typeof i12.TuiDropdownContext, typeof i12.TuiDropdownPosition, typeof i12.TuiDropdownPositionSided, typeof i12.TuiDropdownSelection], [typeof i1.TuiInputTagComponent, typeof i12.TuiDropdownOptionsDirective, typeof i12.TuiDropdownDriverDirective, typeof i12.TuiDropdownDirective, typeof i12.TuiDropdownComponent, typeof i12.TuiDropdownOpen, typeof i12.TuiDropdownOpenLegacy, typeof i12.TuiDropdownManual, typeof i12.TuiDropdownHover, typeof i12.TuiDropdownContent, typeof i12.TuiDropdownContext, typeof i12.TuiDropdownPosition, typeof i12.TuiDropdownPositionSided, typeof i12.TuiDropdownSelection]>;
|
|
21
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<TuiInputTagModule>;
|
|
22
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
|
-
import { type TuiStatus } from '@taiga-ui/legacy/utils';
|
|
3
|
-
/**
|
|
4
|
-
* TODO(v5): delete it
|
|
5
|
-
* @deprecated use {@link https://taiga-ui.dev/components/input-chip TuiInputChip} instead
|
|
6
|
-
*/
|
|
7
|
-
export interface TuiInputTagOptions {
|
|
8
|
-
readonly autoColor: boolean;
|
|
9
|
-
readonly separator: RegExp | string;
|
|
10
|
-
readonly tagStatus: TuiStatus;
|
|
11
|
-
readonly uniqueTags: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* TODO(v5): delete it
|
|
15
|
-
* @deprecated use {@link https://taiga-ui.dev/components/input-chip TuiInputChip} instead
|
|
16
|
-
*/
|
|
17
|
-
export declare const TUI_INPUT_TAG_DEFAULT_OPTIONS: TuiInputTagOptions;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated: drop in v5.0
|
|
20
|
-
* Default parameters for InputTag component
|
|
21
|
-
*/
|
|
22
|
-
export declare const TUI_INPUT_TAG_OPTIONS: InjectionToken<TuiInputTagOptions>;
|
|
23
|
-
/**
|
|
24
|
-
* TODO(v5): delete it
|
|
25
|
-
* @deprecated use {@link https://taiga-ui.dev/components/input-chip TuiInputChip} instead
|
|
26
|
-
*/
|
|
27
|
-
export declare function tuiInputTagOptionsProvider(options: Partial<TuiInputTagOptions>): Provider;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiHideSelectedPipe implements PipeTransform {
|
|
4
|
-
private readonly component;
|
|
5
|
-
transform<T>(items: readonly T[] | null): readonly T[] | null;
|
|
6
|
-
transform<T>(items: ReadonlyArray<readonly T[]> | null): ReadonlyArray<readonly T[]> | null;
|
|
7
|
-
private filter2d;
|
|
8
|
-
private filter;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiHideSelectedPipe, never>;
|
|
10
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiHideSelectedPipe, "tuiHideSelected", false>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './hide-selected.pipe';
|
|
2
|
-
export * from './multi-select.component';
|
|
3
|
-
export * from './multi-select.directive';
|
|
4
|
-
export * from './multi-select.module';
|
|
5
|
-
export * from './multi-select.options';
|
|
6
|
-
export * from './multi-select-group/multi-select-group.component';
|
|
7
|
-
export * from './multi-select-group/multi-select-group.directive';
|
|
8
|
-
export * from './native-multi-select/native-multi-select';
|
|
9
|
-
export * from './native-multi-select/native-multi-select.component';
|
|
10
|
-
export * from './native-multi-select/native-multi-select-group.component';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type Observable } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiMultiSelectGroupComponent<T> {
|
|
4
|
-
private readonly options;
|
|
5
|
-
private readonly host;
|
|
6
|
-
private readonly control;
|
|
7
|
-
protected readonly multiSelectTexts: import("@angular/core").Signal<{
|
|
8
|
-
all: string;
|
|
9
|
-
none: string;
|
|
10
|
-
}>;
|
|
11
|
-
label: string;
|
|
12
|
-
protected get empty$(): Observable<boolean>;
|
|
13
|
-
protected get disabled$(): Observable<boolean>;
|
|
14
|
-
protected get value$(): Observable<boolean | null>;
|
|
15
|
-
protected onClick(checked: boolean | null): void;
|
|
16
|
-
private get items$();
|
|
17
|
-
private get valueChanges$();
|
|
18
|
-
private get values();
|
|
19
|
-
private get matcher();
|
|
20
|
-
private filter;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMultiSelectGroupComponent<any>, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiMultiSelectGroupComponent<any>, "tui-opt-group[tuiMultiSelectGroup]", never, { "label": { "alias": "label"; "required": false; }; }, {}, ["options"], ["*"], false, never>;
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TuiMultiSelectOptionComponent } from '@taiga-ui/legacy/components/multi-select-option';
|
|
2
|
-
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const TUI_MULTI_SELECT_OPTION: PolymorpheusComponent<TuiMultiSelectOptionComponent<any[]>>;
|
|
5
|
-
export declare class TuiMultiSelectGroupDirective {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMultiSelectGroupDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiMultiSelectGroupDirective, "[tuiMultiSelectGroup]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { type TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
3
|
-
import { type TuiBooleanHandler, type TuiContext, type TuiMapper, type TuiStringHandler } from '@taiga-ui/cdk/types';
|
|
4
|
-
import { type TuiDataListHost } from '@taiga-ui/core/components/data-list';
|
|
5
|
-
import { type TuiSizeL, type TuiSizeM, type TuiSizeS } from '@taiga-ui/core/types';
|
|
6
|
-
import { type TuiItemsHandlers } from '@taiga-ui/kit/tokens';
|
|
7
|
-
import { AbstractTuiMultipleControl, TuiStringifiableItem } from '@taiga-ui/legacy/classes';
|
|
8
|
-
import { TuiInputTagComponent } from '@taiga-ui/legacy/components/input-tag';
|
|
9
|
-
import { type TuiFocusableElementAccessor } from '@taiga-ui/legacy/tokens';
|
|
10
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
11
|
-
import { type TuiMultiSelectOptions } from './multi-select.options';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "@taiga-ui/core/directives/dropdown";
|
|
14
|
-
export declare class TuiMultiSelectComponent<T> extends AbstractTuiMultipleControl<T> implements TuiFocusableElementAccessor, TuiDataListHost<T> {
|
|
15
|
-
private readonly accessor?;
|
|
16
|
-
private readonly nativeSelect?;
|
|
17
|
-
private readonly dropdown?;
|
|
18
|
-
private readonly input?;
|
|
19
|
-
private readonly arrowMode;
|
|
20
|
-
private readonly itemsHandlers;
|
|
21
|
-
private readonly options;
|
|
22
|
-
private readonly inputTagOptions;
|
|
23
|
-
protected readonly datalist: PolymorpheusContent<TuiContext<TuiActiveZone>>;
|
|
24
|
-
protected open: boolean;
|
|
25
|
-
protected readonly controller: import("@taiga-ui/legacy/directives").TuiTextfieldController;
|
|
26
|
-
protected readonly isMobile: boolean;
|
|
27
|
-
stringify: TuiItemsHandlers<T>['stringify'];
|
|
28
|
-
identityMatcher: TuiItemsHandlers<T>['identityMatcher'];
|
|
29
|
-
search: string | null;
|
|
30
|
-
placeholder: string;
|
|
31
|
-
editable: boolean;
|
|
32
|
-
disabledItemHandler: TuiItemsHandlers<T>['disabledItemHandler'];
|
|
33
|
-
valueContent: TuiMultiSelectOptions<T>['valueContent'];
|
|
34
|
-
tagValidator: TuiBooleanHandler<T>;
|
|
35
|
-
rows: TuiMultiSelectOptions<T>['rows'];
|
|
36
|
-
autoColor: boolean;
|
|
37
|
-
readonly searchChange: EventEmitter<string | null>;
|
|
38
|
-
get size(): TuiSizeL | TuiSizeS;
|
|
39
|
-
get nativeFocusableElement(): HTMLInputElement | null;
|
|
40
|
-
get focused(): boolean;
|
|
41
|
-
onValueChange(value: readonly T[]): void;
|
|
42
|
-
onSearch(search: string | null): void;
|
|
43
|
-
setDisabledState(): void;
|
|
44
|
-
handleOption(option: T): void;
|
|
45
|
-
protected get arrow(): PolymorpheusContent<TuiContext<TuiSizeL | TuiSizeM | TuiSizeS>>;
|
|
46
|
-
protected get nativeDropdownMode(): boolean;
|
|
47
|
-
protected get computedValue(): readonly T[];
|
|
48
|
-
protected get searchOrSpace(): string;
|
|
49
|
-
protected get searchString(): string;
|
|
50
|
-
protected get computedGroup(): boolean;
|
|
51
|
-
protected getStringifier(stringify: TuiStringHandler<T>): TuiStringHandler<TuiContext<T>>;
|
|
52
|
-
protected readonly valueMapper: TuiMapper<[
|
|
53
|
-
readonly T[],
|
|
54
|
-
TuiStringHandler<T>,
|
|
55
|
-
boolean?
|
|
56
|
-
], ReadonlyArray<TuiStringifiableItem<T>>>;
|
|
57
|
-
protected readonly disabledItemHandlerWrapper: TuiMapper<[
|
|
58
|
-
TuiBooleanHandler<T>
|
|
59
|
-
], TuiBooleanHandler<TuiStringifiableItem<T> | string>>;
|
|
60
|
-
protected onSpace(event: Event): void;
|
|
61
|
-
protected onEnter(event: Event): void;
|
|
62
|
-
protected onKeyDown(event: KeyboardEvent): void;
|
|
63
|
-
protected onPaste(event: Event): void;
|
|
64
|
-
protected onClick({ nativeFocusableElement }: TuiInputTagComponent): void;
|
|
65
|
-
protected onInput(value: ReadonlyArray<TuiStringifiableItem<T>>): void;
|
|
66
|
-
protected onActiveZone(active: boolean): void;
|
|
67
|
-
private filterValue;
|
|
68
|
-
private updateSearch;
|
|
69
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMultiSelectComponent<any>, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiMultiSelectComponent<any>, "tui-multi-select", never, { "stringify": { "alias": "stringify"; "required": false; }; "identityMatcher": { "alias": "identityMatcher"; "required": false; }; "search": { "alias": "search"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "disabledItemHandler": { "alias": "disabledItemHandler"; "required": false; }; "valueContent": { "alias": "valueContent"; "required": false; }; "tagValidator": { "alias": "tagValidator"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "autoColor": { "alias": "autoColor"; "required": false; }; }, { "searchChange": "searchChange"; }, ["accessor", "nativeSelect", "datalist"], ["*", "select"], false, [{ directive: typeof i1.TuiDropdownFixed; inputs: {}; outputs: {}; }]>;
|
|
71
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type TuiBooleanHandler } from '@taiga-ui/cdk/types';
|
|
2
|
-
import { type TuiItemsHandlers } from '@taiga-ui/kit/tokens';
|
|
3
|
-
import { AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
|
|
4
|
-
import { type TuiMultiSelectComponent } from './multi-select.component';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TuiMultiSelectDirective<T = string> extends AbstractTuiTextfieldHost<TuiMultiSelectComponent<T>> {
|
|
7
|
-
get readOnly(): boolean;
|
|
8
|
-
get stringify(): TuiItemsHandlers<T>['stringify'];
|
|
9
|
-
disableItemHandler: TuiBooleanHandler<T>;
|
|
10
|
-
onValueChange(): void;
|
|
11
|
-
onSelectionChange(value: T[]): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMultiSelectDirective<any>, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiMultiSelectDirective<any>, "tui-multi-select", never, {}, {}, never, never, false, never>;
|
|
14
|
-
}
|