@taiga-ui/kit 2.98.0 → 2.99.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/bundles/taiga-ui-kit-components-input-phone-international.umd.js +25 -516
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +275 -4
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js +339 -0
- package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.min.js +2 -0
- package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js +361 -0
- package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes-to-country-code.umd.min.js +2 -0
- package/bundles/taiga-ui-kit-pipes-to-country-code.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-pipes.umd.js +20 -4
- package/bundles/taiga-ui-kit-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +9 -4
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-phone.umd.js +27 -0
- package/bundles/taiga-ui-kit-utils-phone.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-utils-phone.umd.min.js +2 -0
- package/bundles/taiga-ui-kit-utils-phone.umd.min.js.map +1 -0
- package/bundles/taiga-ui-kit-utils.umd.js +12 -4
- package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.min.js +1 -1
- package/components/input-phone-international/index.d.ts +0 -4
- package/components/input-phone-international/input-phone-international.component.d.ts +7 -3
- package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
- package/{components/input-phone-international/const → constants}/countries.d.ts +1 -2
- package/constants/index.d.ts +2 -0
- package/constants/mask-after-code-regexp.d.ts +1 -0
- package/constants/taiga-ui-kit-constants.metadata.json +1 -1
- package/esm2015/components/input-phone-international/index.js +1 -4
- package/esm2015/components/input-phone-international/input-phone-international.component.js +24 -30
- package/esm2015/constants/countries.js +264 -0
- package/esm2015/constants/index.js +3 -1
- package/esm2015/constants/mask-after-code-regexp.js +2 -0
- package/esm2015/interfaces/country.js +1 -0
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/pipes/index.js +3 -1
- package/esm2015/pipes/iso-to-country-code/index.js +3 -0
- package/esm2015/pipes/iso-to-country-code/iso-to-country-code.module.js +13 -0
- package/esm2015/pipes/iso-to-country-code/iso-to-country-code.pipe.js +24 -0
- package/esm2015/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.js +5 -0
- package/esm2015/pipes/to-country-code/index.js +3 -0
- package/esm2015/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.js +5 -0
- package/esm2015/pipes/to-country-code/to-country-code.module.js +13 -0
- package/esm2015/pipes/to-country-code/to-country-code.pipe.js +47 -0
- package/esm2015/tokens/countries-masks.js +6 -0
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/phone/get-max-allowed-phone-length.js +4 -0
- package/esm2015/utils/phone/index.js +4 -0
- package/esm2015/utils/phone/iso-to-country-code.js +5 -0
- package/esm2015/utils/phone/not-kz-region.js +5 -0
- package/esm2015/utils/phone/taiga-ui-kit-utils-phone.js +5 -0
- package/esm5/components/input-phone-international/index.js +1 -4
- package/esm5/components/input-phone-international/input-phone-international.component.js +24 -31
- package/esm5/constants/countries.js +267 -0
- package/esm5/constants/index.js +3 -1
- package/esm5/constants/mask-after-code-regexp.js +2 -0
- package/esm5/interfaces/country.js +1 -0
- package/esm5/interfaces/index.js +1 -1
- package/esm5/pipes/index.js +3 -1
- package/esm5/pipes/iso-to-country-code/index.js +3 -0
- package/esm5/pipes/iso-to-country-code/iso-to-country-code.module.js +16 -0
- package/esm5/pipes/iso-to-country-code/iso-to-country-code.pipe.js +25 -0
- package/esm5/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.js +5 -0
- package/esm5/pipes/to-country-code/index.js +3 -0
- package/esm5/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.js +5 -0
- package/esm5/pipes/to-country-code/to-country-code.module.js +16 -0
- package/esm5/pipes/to-country-code/to-country-code.pipe.js +49 -0
- package/esm5/tokens/countries-masks.js +6 -0
- package/esm5/tokens/index.js +2 -1
- package/esm5/utils/index.js +2 -1
- package/esm5/utils/phone/get-max-allowed-phone-length.js +4 -0
- package/esm5/utils/phone/index.js +4 -0
- package/esm5/utils/phone/iso-to-country-code.js +5 -0
- package/esm5/utils/phone/not-kz-region.js +5 -0
- package/esm5/utils/phone/taiga-ui-kit-utils-phone.js +5 -0
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +26 -507
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +267 -1
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js +39 -0
- package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js.map +1 -0
- package/fesm2015/taiga-ui-kit-pipes-to-country-code.js +62 -0
- package/fesm2015/taiga-ui-kit-pipes-to-country-code.js.map +1 -0
- package/fesm2015/taiga-ui-kit-pipes.js +2 -0
- package/fesm2015/taiga-ui-kit-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +6 -1
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-phone.js +21 -0
- package/fesm2015/taiga-ui-kit-utils-phone.js.map +1 -0
- package/fesm2015/taiga-ui-kit-utils.js +1 -0
- package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-phone-international.js +27 -511
- package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm5/taiga-ui-kit-constants.js +270 -2
- package/fesm5/taiga-ui-kit-constants.js.map +1 -1
- package/fesm5/taiga-ui-kit-pipes-iso-to-country-code.js +43 -0
- package/fesm5/taiga-ui-kit-pipes-iso-to-country-code.js.map +1 -0
- package/fesm5/taiga-ui-kit-pipes-to-country-code.js +67 -0
- package/fesm5/taiga-ui-kit-pipes-to-country-code.js.map +1 -0
- package/fesm5/taiga-ui-kit-pipes.js +2 -0
- package/fesm5/taiga-ui-kit-pipes.js.map +1 -1
- package/fesm5/taiga-ui-kit-tokens.js +6 -1
- package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-phone.js +21 -0
- package/fesm5/taiga-ui-kit-utils-phone.js.map +1 -0
- package/fesm5/taiga-ui-kit-utils.js +1 -0
- package/fesm5/taiga-ui-kit-utils.js.map +1 -1
- package/interfaces/index.d.ts +1 -0
- package/interfaces/taiga-ui-kit-interfaces.metadata.json +1 -1
- package/package.json +4 -4
- package/pipes/index.d.ts +2 -0
- package/pipes/iso-to-country-code/index.d.ts +2 -0
- package/pipes/iso-to-country-code/iso-to-country-code.module.d.ts +2 -0
- package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +7 -0
- package/pipes/iso-to-country-code/package.json +13 -0
- package/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.d.ts +4 -0
- package/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.metadata.json +1 -0
- package/pipes/taiga-ui-kit-pipes.metadata.json +1 -1
- package/pipes/to-country-code/index.d.ts +2 -0
- package/pipes/to-country-code/package.json +13 -0
- package/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.d.ts +4 -0
- package/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.metadata.json +1 -0
- package/pipes/to-country-code/to-country-code.module.d.ts +2 -0
- package/pipes/to-country-code/to-country-code.pipe.d.ts +7 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/phone/get-max-allowed-phone-length.d.ts +2 -0
- package/utils/phone/index.d.ts +3 -0
- package/utils/phone/iso-to-country-code.d.ts +2 -0
- package/utils/phone/not-kz-region.d.ts +1 -0
- package/utils/phone/package.json +13 -0
- package/utils/phone/taiga-ui-kit-utils-phone.d.ts +4 -0
- package/utils/phone/taiga-ui-kit-utils-phone.metadata.json +1 -0
- package/utils/taiga-ui-kit-utils.metadata.json +1 -1
- package/components/input-phone-international/country-iso-code.d.ts +0 -207
- package/esm2015/components/input-phone-international/const/countries.js +0 -265
- package/esm2015/components/input-phone-international/country-iso-code.js +0 -209
- package/esm2015/components/input-phone-international/interfaces/country.js +0 -1
- package/esm2015/components/input-phone-international/tokens/countries-masks.js +0 -6
- package/esm5/components/input-phone-international/const/countries.js +0 -268
- package/esm5/components/input-phone-international/country-iso-code.js +0 -209
- package/esm5/components/input-phone-international/interfaces/country.js +0 -1
- package/esm5/components/input-phone-international/tokens/countries-masks.js +0 -6
- /package/{components/input-phone-international/interfaces → interfaces}/country.d.ts +0 -0
- /package/{components/input-phone-international/tokens → tokens}/countries-masks.d.ts +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __decorate, __param } from 'tslib';
|
|
2
|
+
import { Inject, Pipe, NgModule } from '@angular/core';
|
|
3
|
+
import { TUI_COUNTRIES_MASKS } from '@taiga-ui/kit/tokens';
|
|
4
|
+
import { tuiIsoToCountryCode } from '@taiga-ui/kit/utils';
|
|
5
|
+
|
|
6
|
+
// @dynamic
|
|
7
|
+
let TuiIsoToCountryCodePipe = class TuiIsoToCountryCodePipe {
|
|
8
|
+
constructor(countriesMasks) {
|
|
9
|
+
this.countriesMasks = countriesMasks;
|
|
10
|
+
}
|
|
11
|
+
transform(isoCode) {
|
|
12
|
+
return tuiIsoToCountryCode(this.countriesMasks, isoCode);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
TuiIsoToCountryCodePipe.ctorParameters = () => [
|
|
16
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_COUNTRIES_MASKS,] }] }
|
|
17
|
+
];
|
|
18
|
+
TuiIsoToCountryCodePipe = __decorate([
|
|
19
|
+
Pipe({
|
|
20
|
+
name: `tuiIsoToCountryCode`,
|
|
21
|
+
}),
|
|
22
|
+
__param(0, Inject(TUI_COUNTRIES_MASKS))
|
|
23
|
+
], TuiIsoToCountryCodePipe);
|
|
24
|
+
|
|
25
|
+
let TuiIsoToCountryCodeModule = class TuiIsoToCountryCodeModule {
|
|
26
|
+
};
|
|
27
|
+
TuiIsoToCountryCodeModule = __decorate([
|
|
28
|
+
NgModule({
|
|
29
|
+
declarations: [TuiIsoToCountryCodePipe],
|
|
30
|
+
exports: [TuiIsoToCountryCodePipe],
|
|
31
|
+
})
|
|
32
|
+
], TuiIsoToCountryCodeModule);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Generated bundle index. Do not edit.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
export { TuiIsoToCountryCodeModule, TuiIsoToCountryCodePipe };
|
|
39
|
+
//# sourceMappingURL=taiga-ui-kit-pipes-iso-to-country-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-pipes-iso-to-country-code.js","sources":["ng://@taiga-ui/kit/pipes/iso-to-country-code/iso-to-country-code.pipe.ts","ng://@taiga-ui/kit/pipes/iso-to-country-code/iso-to-country-code.module.ts","ng://@taiga-ui/kit/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.ts"],"sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/kit/tokens';\nimport {tuiIsoToCountryCode} from '@taiga-ui/kit/utils';\n\n// @dynamic\n@Pipe({\n name: `tuiIsoToCountryCode`,\n})\nexport class TuiIsoToCountryCodePipe implements PipeTransform {\n constructor(\n @Inject(TUI_COUNTRIES_MASKS)\n private readonly countriesMasks: Record<TuiCountryIsoCode, string>,\n ) {}\n\n transform(isoCode: TuiCountryIsoCode): string {\n return tuiIsoToCountryCode(this.countriesMasks, isoCode);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiIsoToCountryCodePipe} from './iso-to-country-code.pipe';\n\n@NgModule({\n declarations: [TuiIsoToCountryCodePipe],\n exports: [TuiIsoToCountryCodePipe],\n})\nexport class TuiIsoToCountryCodeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA;IAIa,uBAAuB,GAApC,MAAa,uBAAuB;IAChC,YAEqB,cAAiD;QAAjD,mBAAc,GAAd,cAAc,CAAmC;KAClE;IAEJ,SAAS,CAAC,OAA0B;QAChC,OAAO,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KAC5D;EACJ;;4CAPQ,MAAM,SAAC,mBAAmB;;AAFtB,uBAAuB;IAHnC,IAAI,CAAC;QACF,IAAI,EAAE,qBAAqB;KAC9B,CAAC;IAGO,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;GAFvB,uBAAuB,CASnC;;ICVY,yBAAyB,GAAtC,MAAa,yBAAyB;EAAG;AAA5B,yBAAyB;IAJrC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,yBAAyB,CAAG;;ACRzC;;;;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __decorate, __param } from 'tslib';
|
|
2
|
+
import { Inject, Pipe, NgModule } from '@angular/core';
|
|
3
|
+
import { CHAR_PLUS } from '@taiga-ui/cdk';
|
|
4
|
+
import { TuiCountryIsoCode } from '@taiga-ui/i18n';
|
|
5
|
+
import { TUI_COUNTRIES_MASKS } from '@taiga-ui/kit/tokens';
|
|
6
|
+
import { tuiGetMaxAllowedPhoneLength, tuiIsoToCountryCode, tuiNotKzRegion } from '@taiga-ui/kit/utils';
|
|
7
|
+
|
|
8
|
+
// @dynamic
|
|
9
|
+
let TuiToCountryCodePipe = class TuiToCountryCodePipe {
|
|
10
|
+
constructor(countriesMasks) {
|
|
11
|
+
this.countriesMasks = countriesMasks;
|
|
12
|
+
}
|
|
13
|
+
transform(value, countries) {
|
|
14
|
+
return countries.find(countryIsoCode => {
|
|
15
|
+
const ruCodeTest = countryIsoCode === TuiCountryIsoCode.RU &&
|
|
16
|
+
/^[78]/.test(value) &&
|
|
17
|
+
/^(?!880[1-9 ])/.test(value) &&
|
|
18
|
+
value.length + 1 ===
|
|
19
|
+
tuiGetMaxAllowedPhoneLength(this.countriesMasks, TuiCountryIsoCode.RU);
|
|
20
|
+
const matched = ruCodeTest ||
|
|
21
|
+
(value.startsWith(tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(CHAR_PLUS, ``)) &&
|
|
22
|
+
value.length + 1 ===
|
|
23
|
+
tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));
|
|
24
|
+
if (matched) {
|
|
25
|
+
switch (countryIsoCode) {
|
|
26
|
+
case TuiCountryIsoCode.RU:
|
|
27
|
+
return tuiNotKzRegion(value);
|
|
28
|
+
case TuiCountryIsoCode.KZ:
|
|
29
|
+
return !tuiNotKzRegion(value);
|
|
30
|
+
default:
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
TuiToCountryCodePipe.ctorParameters = () => [
|
|
39
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_COUNTRIES_MASKS,] }] }
|
|
40
|
+
];
|
|
41
|
+
TuiToCountryCodePipe = __decorate([
|
|
42
|
+
Pipe({
|
|
43
|
+
name: `tuiToCountryCode`,
|
|
44
|
+
}),
|
|
45
|
+
__param(0, Inject(TUI_COUNTRIES_MASKS))
|
|
46
|
+
], TuiToCountryCodePipe);
|
|
47
|
+
|
|
48
|
+
let TuiExtractCountryCodeModule = class TuiExtractCountryCodeModule {
|
|
49
|
+
};
|
|
50
|
+
TuiExtractCountryCodeModule = __decorate([
|
|
51
|
+
NgModule({
|
|
52
|
+
declarations: [TuiToCountryCodePipe],
|
|
53
|
+
exports: [TuiToCountryCodePipe],
|
|
54
|
+
})
|
|
55
|
+
], TuiExtractCountryCodeModule);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Generated bundle index. Do not edit.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
export { TuiExtractCountryCodeModule, TuiToCountryCodePipe };
|
|
62
|
+
//# sourceMappingURL=taiga-ui-kit-pipes-to-country-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-pipes-to-country-code.js","sources":["ng://@taiga-ui/kit/pipes/to-country-code/to-country-code.pipe.ts","ng://@taiga-ui/kit/pipes/to-country-code/to-country-code.module.ts","ng://@taiga-ui/kit/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.ts"],"sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {CHAR_PLUS} from '@taiga-ui/cdk';\nimport {TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {TUI_COUNTRIES_MASKS} from '@taiga-ui/kit/tokens';\nimport {\n tuiGetMaxAllowedPhoneLength,\n tuiIsoToCountryCode,\n tuiNotKzRegion,\n} from '@taiga-ui/kit/utils';\n\n// @dynamic\n@Pipe({\n name: `tuiToCountryCode`,\n})\nexport class TuiToCountryCodePipe implements PipeTransform {\n constructor(\n @Inject(TUI_COUNTRIES_MASKS)\n private readonly countriesMasks: Record<TuiCountryIsoCode, string>,\n ) {}\n\n transform(\n value: string,\n countries: readonly TuiCountryIsoCode[],\n ): TuiCountryIsoCode | undefined {\n return countries.find(countryIsoCode => {\n const ruCodeTest =\n countryIsoCode === TuiCountryIsoCode.RU &&\n /^[78]/.test(value) &&\n /^(?!880[1-9 ])/.test(value) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(\n this.countriesMasks,\n TuiCountryIsoCode.RU,\n );\n\n const matched =\n ruCodeTest ||\n (value.startsWith(\n tuiIsoToCountryCode(this.countriesMasks, countryIsoCode).replace(\n CHAR_PLUS,\n ``,\n ),\n ) &&\n value.length + 1 ===\n tuiGetMaxAllowedPhoneLength(this.countriesMasks, countryIsoCode));\n\n if (matched) {\n switch (countryIsoCode) {\n case TuiCountryIsoCode.RU:\n return tuiNotKzRegion(value);\n case TuiCountryIsoCode.KZ:\n return !tuiNotKzRegion(value);\n default:\n return true;\n }\n }\n\n return false;\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiToCountryCodePipe} from './to-country-code.pipe';\n\n@NgModule({\n declarations: [TuiToCountryCodePipe],\n exports: [TuiToCountryCodePipe],\n})\nexport class TuiExtractCountryCodeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;IAIa,oBAAoB,GAAjC,MAAa,oBAAoB;IAC7B,YAEqB,cAAiD;QAAjD,mBAAc,GAAd,cAAc,CAAmC;KAClE;IAEJ,SAAS,CACL,KAAa,EACb,SAAuC;QAEvC,OAAO,SAAS,CAAC,IAAI,CAAC,cAAc;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
|
1
1
|
export * from '@taiga-ui/kit/pipes/field-error';
|
|
2
2
|
export * from '@taiga-ui/kit/pipes/filter-by-input';
|
|
3
|
+
export * from '@taiga-ui/kit/pipes/iso-to-country-code';
|
|
3
4
|
export * from '@taiga-ui/kit/pipes/stringify';
|
|
4
5
|
export * from '@taiga-ui/kit/pipes/stringify-content';
|
|
6
|
+
export * from '@taiga-ui/kit/pipes/to-country-code';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-pipes.js","sources":["ng://@taiga-ui/kit/pipes/taiga-ui-kit-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-pipes.js","sources":["ng://@taiga-ui/kit/pipes/taiga-ui-kit-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { COUNTRIES_MASKS } from '@taiga-ui/kit/constants';
|
|
2
3
|
import { extractI18n } from '@taiga-ui/i18n';
|
|
3
4
|
import { TUI_DEFAULT_STRINGIFY, TUI_DEFAULT_IDENTITY_MATCHER, ALWAYS_FALSE_HANDLER } from '@taiga-ui/cdk';
|
|
4
5
|
|
|
5
6
|
const TUI_CALENDAR_DATA_STREAM = new InjectionToken(`Stream that emits calendar data change`);
|
|
6
7
|
|
|
8
|
+
const TUI_COUNTRIES_MASKS = new InjectionToken(`Countries masks`, {
|
|
9
|
+
factory: () => COUNTRIES_MASKS,
|
|
10
|
+
});
|
|
11
|
+
|
|
7
12
|
const TUI_DATE_VALUE_TRANSFORMER = new InjectionToken(`Control value transformer of TuiDay to custom value format for InputDate* components`);
|
|
8
13
|
const TUI_DATE_RANGE_VALUE_TRANSFORMER = new InjectionToken(`Control value transformer for InputDateRange component`);
|
|
9
14
|
const TUI_DATE_TIME_VALUE_TRANSFORMER = new InjectionToken(`Control value transformer for InputDateTime component`);
|
|
@@ -105,5 +110,5 @@ const TUI_VALIDATION_ERRORS = new InjectionToken(`Validation errors`, {
|
|
|
105
110
|
* Generated bundle index. Do not edit.
|
|
106
111
|
*/
|
|
107
112
|
|
|
108
|
-
export { TUI_CALENDAR_DATA_STREAM, TUI_CALENDAR_MONTHS, TUI_CANCEL_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS, TUI_COPY_TEXTS, TUI_COUNTRIES, TUI_DATE_RANGE_VALUE_TRANSFORMER, TUI_DATE_TEXTS, TUI_DATE_TIME_VALUE_TRANSFORMER, TUI_DATE_VALUE_TRANSFORMER, TUI_DEFAULT_ITEMS_HANDLERS, TUI_DIGITAL_INFORMATION_UNITS, TUI_DONE_WORD, TUI_FILE_TEXTS, TUI_FROM_TO_TEXTS, TUI_HIDE_TEXT, TUI_INPUT_FILE_TEXTS, TUI_ITEMS_HANDLERS, TUI_MOBILE_AWARE, TUI_MOBILE_CALENDAR, TUI_MONTH_FORMATTER, TUI_MORE_WORD, TUI_OTHER_DATE_TEXT, TUI_PAGINATION_TEXTS, TUI_PASSWORD_TEXTS, TUI_PLUS_MINUS_TEXTS, TUI_SHOW_ALL_TEXT, TUI_TAB_MARGIN, TUI_TAG_STATUS, TUI_TIME_TEXTS, TUI_VALIDATION_ERRORS, tuiItemsHandlersProvider };
|
|
113
|
+
export { TUI_CALENDAR_DATA_STREAM, TUI_CALENDAR_MONTHS, TUI_CANCEL_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS, TUI_COPY_TEXTS, TUI_COUNTRIES, TUI_COUNTRIES_MASKS, TUI_DATE_RANGE_VALUE_TRANSFORMER, TUI_DATE_TEXTS, TUI_DATE_TIME_VALUE_TRANSFORMER, TUI_DATE_VALUE_TRANSFORMER, TUI_DEFAULT_ITEMS_HANDLERS, TUI_DIGITAL_INFORMATION_UNITS, TUI_DONE_WORD, TUI_FILE_TEXTS, TUI_FROM_TO_TEXTS, TUI_HIDE_TEXT, TUI_INPUT_FILE_TEXTS, TUI_ITEMS_HANDLERS, TUI_MOBILE_AWARE, TUI_MOBILE_CALENDAR, TUI_MONTH_FORMATTER, TUI_MORE_WORD, TUI_OTHER_DATE_TEXT, TUI_PAGINATION_TEXTS, TUI_PASSWORD_TEXTS, TUI_PLUS_MINUS_TEXTS, TUI_SHOW_ALL_TEXT, TUI_TAB_MARGIN, TUI_TAG_STATUS, TUI_TIME_TEXTS, TUI_VALIDATION_ERRORS, tuiItemsHandlersProvider };
|
|
109
114
|
//# sourceMappingURL=taiga-ui-kit-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-tokens.js","sources":["ng://@taiga-ui/kit/tokens/calendar-data-stream.ts","ng://@taiga-ui/kit/tokens/date-inputs-value-transformers.ts","ng://@taiga-ui/kit/tokens/i18n.ts","ng://@taiga-ui/kit/tokens/items-handlers.ts","ng://@taiga-ui/kit/tokens/mobile-aware.ts","ng://@taiga-ui/kit/tokens/mobile-calendar.ts","ng://@taiga-ui/kit/tokens/month-formatter.ts","ng://@taiga-ui/kit/tokens/tab-margin.ts","ng://@taiga-ui/kit/tokens/tag-status.ts","ng://@taiga-ui/kit/tokens/validation-errors.ts","ng://@taiga-ui/kit/tokens/taiga-ui-kit-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nexport const TUI_CALENDAR_DATA_STREAM = new InjectionToken<\n Observable<TuiDay | TuiDayRange | null>\n>(`Stream that emits calendar data change`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiControlValueTransformer, TuiDay, TuiDayRange, TuiTime} from '@taiga-ui/cdk';\n\nexport const TUI_DATE_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<TuiDay | null>\n>(`Control value transformer of TuiDay to custom value format for InputDate* components`);\n\nexport const TUI_DATE_RANGE_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<TuiDayRange | null>\n>(`Control value transformer for InputDateRange component`);\n\nexport const TUI_DATE_TIME_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<[TuiDay | null, TuiTime | null]>\n>(`Control value transformer for InputDateTime component`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDateMode} from '@taiga-ui/cdk';\nimport {extractI18n, TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {Observable} from 'rxjs';\n\nexport const TUI_CANCEL_WORD = new InjectionToken(`i18n 'cancel' word`, {\n factory: extractI18n(`cancel`),\n});\n\nexport const TUI_DONE_WORD = new InjectionToken(`i18n 'done' word`, {\n factory: extractI18n(`done`),\n});\n\nexport const TUI_MORE_WORD = new InjectionToken(`i18n 'more' word`, {\n factory: extractI18n(`more`),\n});\n\nexport const TUI_HIDE_TEXT = new InjectionToken(`i18n 'hide' word`, {\n factory: extractI18n(`hide`),\n});\n\nexport const TUI_SHOW_ALL_TEXT = new InjectionToken(`i18n 'show all' word`, {\n factory: extractI18n(`showAll`),\n});\n\nexport const TUI_OTHER_DATE_TEXT = new InjectionToken(`i18n 'Other date' text`, {\n factory: extractI18n(`otherDate`),\n});\n\nexport const TUI_CHOOSE_DAY_OR_RANGE_TEXTS = new InjectionToken(\n `choose day or range i18n texts`,\n {\n factory: extractI18n(`mobileCalendarTexts`),\n },\n);\n\nexport const TUI_FROM_TO_TEXTS = new InjectionToken(`from and to i18n texts`, {\n factory: extractI18n(`range`),\n});\n\nexport const TUI_PLUS_MINUS_TEXTS = new InjectionToken(`plus and minus i18n texts`, {\n factory: extractI18n(`countTexts`),\n});\n\nexport const TUI_TIME_TEXTS = new InjectionToken(`time i18n texts`, {\n factory: extractI18n(`time`),\n});\n\nexport const TUI_DATE_TEXTS = new InjectionToken<Observable<Record<TuiDateMode, string>>>(\n `date format i18n texts`,\n {\n factory: extractI18n(`dateTexts`),\n },\n);\n\nexport const TUI_DIGITAL_INFORMATION_UNITS = new InjectionToken(\n `short bytes, kilobytes and megabytes i18n texts`,\n {\n factory: extractI18n(`digitalInformationUnits`),\n },\n);\n\nexport const TUI_COPY_TEXTS = new InjectionToken(`copy i18n texts`, {\n factory: extractI18n(`copyTexts`),\n});\n\nexport const TUI_PASSWORD_TEXTS = new InjectionToken(`password i18n texts`, {\n factory: extractI18n(`passwordTexts`),\n});\n\nexport const TUI_CALENDAR_MONTHS = new InjectionToken(`short calendar months i18n`, {\n factory: extractI18n(`shortCalendarMonths`),\n});\n\nexport const TUI_FILE_TEXTS = new InjectionToken(`file i18n texts`, {\n factory: extractI18n(`fileTexts`),\n});\n\nexport const TUI_PAGINATION_TEXTS = new InjectionToken(`pagination i18n texts`, {\n factory: extractI18n(`pagination`),\n});\n\nexport const TUI_INPUT_FILE_TEXTS = new InjectionToken(`tui-input-file i18n texts`, {\n factory: extractI18n(`inputFileTexts`),\n});\n\nexport const TUI_COUNTRIES: InjectionToken<\n Observable<Record<TuiCountryIsoCode, string>>\n> = new InjectionToken(`Localized countries names`, {\n factory: extractI18n(`countries`),\n});\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TuiBooleanHandler,\n TuiIdentityMatcher,\n TuiStringHandler,\n} from '@taiga-ui/cdk';\n\nexport interface TuiItemsHandlers<T> {\n readonly stringify: TuiStringHandler<T>;\n readonly identityMatcher: TuiIdentityMatcher<T>;\n readonly disabledItemHandler: TuiBooleanHandler<T>;\n}\n\nexport const TUI_DEFAULT_ITEMS_HANDLERS: TuiItemsHandlers<unknown> = {\n stringify: TUI_DEFAULT_STRINGIFY,\n identityMatcher: TUI_DEFAULT_IDENTITY_MATCHER,\n disabledItemHandler: ALWAYS_FALSE_HANDLER,\n};\n\nexport const TUI_ITEMS_HANDLERS = new InjectionToken<TuiItemsHandlers<unknown>>(\n `Default items handlers for components`,\n {\n factory: () => TUI_DEFAULT_ITEMS_HANDLERS,\n },\n);\n\nexport const tuiItemsHandlersProvider: <T>(\n options: Partial<TuiItemsHandlers<T>>,\n) => ValueProvider = <T>(options: Partial<TuiItemsHandlers<T>>) => ({\n provide: TUI_ITEMS_HANDLERS,\n useValue: {...TUI_DEFAULT_ITEMS_HANDLERS, ...options},\n});\n","import {InjectionToken} from '@angular/core';\n\n/** @deprecated use {@link TuiMobileTabsDirective} from @taiga-ui/addon-mobile */\nexport const TUI_MOBILE_AWARE = new InjectionToken<boolean>(\n `A flag enabling mobile-specific behavior for supporting components`,\n {\n factory: () => false,\n },\n);\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const TUI_MOBILE_CALENDAR = new InjectionToken<Type<unknown>>(\n `A component for mobile data picker`,\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiHandler, TuiMonth} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MONTH_FORMATTER = new InjectionToken<\n TuiHandler<TuiMonth | null, Observable<string>>\n>(`A function to get localized formatted month`);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_TAB_MARGIN = new InjectionToken<number>(`Margin between tabs`, {\n factory: () => 24,\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiStatus} from '@taiga-ui/kit/enums';\n\n// TODO: 3.0 use TUI_TAG_OPTIONS instead of it\nexport const TUI_TAG_STATUS = new InjectionToken<TuiStatus>(\n `Status for tags inside InputTag component`,\n {\n factory: () => TuiStatus.Primary,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<\n Record<string, Observable<PolymorpheusContent> | PolymorpheusContent>\n>(`Validation errors`, {\n factory: () => ({}),\n});\n","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;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAAwB,GAEhB,CAAI,OAAqC,MAAM;IAChE,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,kCAAM,0BAA0B,GAAK,OAAO,CAAC;CACxD;;AChCD;MACa,gBAAgB,GAAG,IAAI,cAAc,CAC9C,oEAAoE,EACpE;IACI,OAAO,EAAE,MAAM,KAAK;CACvB;;MCLQ,mBAAmB,GAAG,IAAI,cAAc,CACjD,oCAAoC;;MCC3B,mBAAmB,GAAG,IAAI,cAAc,CAEnD,6CAA6C;;MCJlC,cAAc,GAAG,IAAI,cAAc,CAAS,qBAAqB,EAAE;IAC5E,OAAO,EAAE,MAAM,EAAE;CACpB;;ACDD;MACa,cAAc,GAAG,IAAI,cAAc,CAC5C,2CAA2C,EAC3C;IACI,OAAO,EAAE;CACZ;;MCJQ,qBAAqB,GAAG,IAAI,cAAc,CAErD,mBAAmB,EAAE;IACnB,OAAO,EAAE,OAAO,EAAE,CAAC;CACtB;;ACRD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-tokens.js","sources":["ng://@taiga-ui/kit/tokens/calendar-data-stream.ts","ng://@taiga-ui/kit/tokens/countries-masks.ts","ng://@taiga-ui/kit/tokens/date-inputs-value-transformers.ts","ng://@taiga-ui/kit/tokens/i18n.ts","ng://@taiga-ui/kit/tokens/items-handlers.ts","ng://@taiga-ui/kit/tokens/mobile-aware.ts","ng://@taiga-ui/kit/tokens/mobile-calendar.ts","ng://@taiga-ui/kit/tokens/month-formatter.ts","ng://@taiga-ui/kit/tokens/tab-margin.ts","ng://@taiga-ui/kit/tokens/tag-status.ts","ng://@taiga-ui/kit/tokens/validation-errors.ts","ng://@taiga-ui/kit/tokens/taiga-ui-kit-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nexport const TUI_CALENDAR_DATA_STREAM = new InjectionToken<\n Observable<TuiDay | TuiDayRange | null>\n>(`Stream that emits calendar data change`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {COUNTRIES_MASKS} from '@taiga-ui/kit/constants';\n\nexport const TUI_COUNTRIES_MASKS: InjectionToken<Record<TuiCountryIsoCode, string>> =\n new InjectionToken<Record<TuiCountryIsoCode, string>>(`Countries masks`, {\n factory: () => COUNTRIES_MASKS,\n });\n","import {InjectionToken} from '@angular/core';\nimport {TuiControlValueTransformer, TuiDay, TuiDayRange, TuiTime} from '@taiga-ui/cdk';\n\nexport const TUI_DATE_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<TuiDay | null>\n>(`Control value transformer of TuiDay to custom value format for InputDate* components`);\n\nexport const TUI_DATE_RANGE_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<TuiDayRange | null>\n>(`Control value transformer for InputDateRange component`);\n\nexport const TUI_DATE_TIME_VALUE_TRANSFORMER = new InjectionToken<\n TuiControlValueTransformer<[TuiDay | null, TuiTime | null]>\n>(`Control value transformer for InputDateTime component`);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDateMode} from '@taiga-ui/cdk';\nimport {extractI18n, TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {Observable} from 'rxjs';\n\nexport const TUI_CANCEL_WORD = new InjectionToken(`i18n 'cancel' word`, {\n factory: extractI18n(`cancel`),\n});\n\nexport const TUI_DONE_WORD = new InjectionToken(`i18n 'done' word`, {\n factory: extractI18n(`done`),\n});\n\nexport const TUI_MORE_WORD = new InjectionToken(`i18n 'more' word`, {\n factory: extractI18n(`more`),\n});\n\nexport const TUI_HIDE_TEXT = new InjectionToken(`i18n 'hide' word`, {\n factory: extractI18n(`hide`),\n});\n\nexport const TUI_SHOW_ALL_TEXT = new InjectionToken(`i18n 'show all' word`, {\n factory: extractI18n(`showAll`),\n});\n\nexport const TUI_OTHER_DATE_TEXT = new InjectionToken(`i18n 'Other date' text`, {\n factory: extractI18n(`otherDate`),\n});\n\nexport const TUI_CHOOSE_DAY_OR_RANGE_TEXTS = new InjectionToken(\n `choose day or range i18n texts`,\n {\n factory: extractI18n(`mobileCalendarTexts`),\n },\n);\n\nexport const TUI_FROM_TO_TEXTS = new InjectionToken(`from and to i18n texts`, {\n factory: extractI18n(`range`),\n});\n\nexport const TUI_PLUS_MINUS_TEXTS = new InjectionToken(`plus and minus i18n texts`, {\n factory: extractI18n(`countTexts`),\n});\n\nexport const TUI_TIME_TEXTS = new InjectionToken(`time i18n texts`, {\n factory: extractI18n(`time`),\n});\n\nexport const TUI_DATE_TEXTS = new InjectionToken<Observable<Record<TuiDateMode, string>>>(\n `date format i18n texts`,\n {\n factory: extractI18n(`dateTexts`),\n },\n);\n\nexport const TUI_DIGITAL_INFORMATION_UNITS = new InjectionToken(\n `short bytes, kilobytes and megabytes i18n texts`,\n {\n factory: extractI18n(`digitalInformationUnits`),\n },\n);\n\nexport const TUI_COPY_TEXTS = new InjectionToken(`copy i18n texts`, {\n factory: extractI18n(`copyTexts`),\n});\n\nexport const TUI_PASSWORD_TEXTS = new InjectionToken(`password i18n texts`, {\n factory: extractI18n(`passwordTexts`),\n});\n\nexport const TUI_CALENDAR_MONTHS = new InjectionToken(`short calendar months i18n`, {\n factory: extractI18n(`shortCalendarMonths`),\n});\n\nexport const TUI_FILE_TEXTS = new InjectionToken(`file i18n texts`, {\n factory: extractI18n(`fileTexts`),\n});\n\nexport const TUI_PAGINATION_TEXTS = new InjectionToken(`pagination i18n texts`, {\n factory: extractI18n(`pagination`),\n});\n\nexport const TUI_INPUT_FILE_TEXTS = new InjectionToken(`tui-input-file i18n texts`, {\n factory: extractI18n(`inputFileTexts`),\n});\n\nexport const TUI_COUNTRIES: InjectionToken<\n Observable<Record<TuiCountryIsoCode, string>>\n> = new InjectionToken(`Localized countries names`, {\n factory: extractI18n(`countries`),\n});\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport {\n ALWAYS_FALSE_HANDLER,\n TUI_DEFAULT_IDENTITY_MATCHER,\n TUI_DEFAULT_STRINGIFY,\n TuiBooleanHandler,\n TuiIdentityMatcher,\n TuiStringHandler,\n} from '@taiga-ui/cdk';\n\nexport interface TuiItemsHandlers<T> {\n readonly stringify: TuiStringHandler<T>;\n readonly identityMatcher: TuiIdentityMatcher<T>;\n readonly disabledItemHandler: TuiBooleanHandler<T>;\n}\n\nexport const TUI_DEFAULT_ITEMS_HANDLERS: TuiItemsHandlers<unknown> = {\n stringify: TUI_DEFAULT_STRINGIFY,\n identityMatcher: TUI_DEFAULT_IDENTITY_MATCHER,\n disabledItemHandler: ALWAYS_FALSE_HANDLER,\n};\n\nexport const TUI_ITEMS_HANDLERS = new InjectionToken<TuiItemsHandlers<unknown>>(\n `Default items handlers for components`,\n {\n factory: () => TUI_DEFAULT_ITEMS_HANDLERS,\n },\n);\n\nexport const tuiItemsHandlersProvider: <T>(\n options: Partial<TuiItemsHandlers<T>>,\n) => ValueProvider = <T>(options: Partial<TuiItemsHandlers<T>>) => ({\n provide: TUI_ITEMS_HANDLERS,\n useValue: {...TUI_DEFAULT_ITEMS_HANDLERS, ...options},\n});\n","import {InjectionToken} from '@angular/core';\n\n/** @deprecated use {@link TuiMobileTabsDirective} from @taiga-ui/addon-mobile */\nexport const TUI_MOBILE_AWARE = new InjectionToken<boolean>(\n `A flag enabling mobile-specific behavior for supporting components`,\n {\n factory: () => false,\n },\n);\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const TUI_MOBILE_CALENDAR = new InjectionToken<Type<unknown>>(\n `A component for mobile data picker`,\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiHandler, TuiMonth} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nexport const TUI_MONTH_FORMATTER = new InjectionToken<\n TuiHandler<TuiMonth | null, Observable<string>>\n>(`A function to get localized formatted month`);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_TAB_MARGIN = new InjectionToken<number>(`Margin between tabs`, {\n factory: () => 24,\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiStatus} from '@taiga-ui/kit/enums';\n\n// TODO: 3.0 use TUI_TAG_OPTIONS instead of it\nexport const TUI_TAG_STATUS = new InjectionToken<TuiStatus>(\n `Status for tags inside InputTag component`,\n {\n factory: () => TuiStatus.Primary,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nexport const TUI_VALIDATION_ERRORS = new InjectionToken<\n Record<string, Observable<PolymorpheusContent> | PolymorpheusContent>\n>(`Validation errors`, {\n factory: () => ({}),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAIa,wBAAwB,GAAG,IAAI,cAAc,CAExD,wCAAwC;;MCF7B,mBAAmB,GAC5B,IAAI,cAAc,CAAoC,iBAAiB,EAAE;IACrE,OAAO,EAAE,MAAM,eAAe;CACjC;;MCJQ,0BAA0B,GAAG,IAAI,cAAc,CAE1D,sFAAsF,EAAE;MAE7E,gCAAgC,GAAG,IAAI,cAAc,CAEhE,wDAAwD,EAAE;MAE/C,+BAA+B,GAAG,IAAI,cAAc,CAE/D,uDAAuD;;MCR5C,eAAe,GAAG,IAAI,cAAc,CAAC,oBAAoB,EAAE;IACpE,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC;CACjC,EAAE;MAEU,aAAa,GAAG,IAAI,cAAc,CAAC,kBAAkB,EAAE;IAChE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC;CAC/B,EAAE;MAEU,aAAa,GAAG,IAAI,cAAc,CAAC,kBAAkB,EAAE;IAChE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC;CAC/B,EAAE;MAEU,aAAa,GAAG,IAAI,cAAc,CAAC,kBAAkB,EAAE;IAChE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC;CAC/B,EAAE;MAEU,iBAAiB,GAAG,IAAI,c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kit/constants';
|
|
2
|
+
|
|
3
|
+
function tuiGetMaxAllowedPhoneLength(countries, isoCode) {
|
|
4
|
+
return countries[isoCode].replace(/[()\- ]/g, ``).length;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function tuiIsoToCountryCode(countriesMasks, isoCode) {
|
|
8
|
+
return countriesMasks[isoCode].replace(MASK_AFTER_CODE_REGEXP, ``);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function tuiNotKzRegion(value) {
|
|
12
|
+
const region = Number(value.slice(1, 4));
|
|
13
|
+
return region < 600 || region > 799;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Generated bundle index. Do not edit.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export { tuiGetMaxAllowedPhoneLength, tuiIsoToCountryCode, tuiNotKzRegion };
|
|
21
|
+
//# sourceMappingURL=taiga-ui-kit-utils-phone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils-phone.js","sources":["ng://@taiga-ui/kit/utils/phone/get-max-allowed-phone-length.ts","ng://@taiga-ui/kit/utils/phone/iso-to-country-code.ts","ng://@taiga-ui/kit/utils/phone/not-kz-region.ts","ng://@taiga-ui/kit/utils/phone/taiga-ui-kit-utils-phone.ts"],"sourcesContent":["import {TuiCountryIsoCode} from '@taiga-ui/i18n';\n\nexport function tuiGetMaxAllowedPhoneLength(\n countries: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): number {\n return countries[isoCode].replace(/[()\\- ]/g, ``).length;\n}\n","import {TuiCountryIsoCode} from '@taiga-ui/i18n';\nimport {MASK_AFTER_CODE_REGEXP} from '@taiga-ui/kit/constants';\n\nexport function tuiIsoToCountryCode(\n countriesMasks: Record<TuiCountryIsoCode, string>,\n isoCode: TuiCountryIsoCode,\n): string {\n return countriesMasks[isoCode].replace(MASK_AFTER_CODE_REGEXP, ``);\n}\n","export function tuiNotKzRegion(value: string): boolean {\n const region = Number(value.slice(1, 4));\n\n return region < 600 || region > 799;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAEgB,2BAA2B,CACvC,SAA4C,EAC5C,OAA0B;IAE1B,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC;AAC7D;;SCJgB,mBAAmB,CAC/B,cAAiD,EACjD,OAA0B;IAE1B,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AACvE;;SCRgB,cAAc,CAAC,KAAa;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEzC,OAAO,MAAM,GAAG,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC;AACxC;;ACJA;;;;;;"}
|
|
@@ -4,6 +4,7 @@ export * from '@taiga-ui/kit/utils/format';
|
|
|
4
4
|
export * from '@taiga-ui/kit/utils/mask';
|
|
5
5
|
export * from '@taiga-ui/kit/utils/math';
|
|
6
6
|
export * from '@taiga-ui/kit/utils/miscellaneous';
|
|
7
|
+
export * from '@taiga-ui/kit/utils/phone';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils.js","sources":["ng://@taiga-ui/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils.js","sources":["ng://@taiga-ui/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;"}
|