@taiga-ui/kit 2.95.0 → 2.97.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-files.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.js +6 -6
- package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.min.js.map +1 -1
- package/esm2015/components/input-files/input-files.component.js +2 -2
- package/esm2015/utils/files/format-size.js +7 -7
- package/esm5/components/input-files/input-files.component.js +2 -2
- package/esm5/utils/files/format-size.js +7 -7
- package/fesm2015/taiga-ui-kit-components-input-files.js +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-files.js +6 -6
- package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-files.js +1 -1
- package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-utils-files.js +6 -6
- package/fesm5/taiga-ui-kit-utils-files.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { round } from '@taiga-ui/cdk';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var BYTES_PER_KIB = 1024;
|
|
4
|
+
var BYTES_PER_MIB = 1024 * BYTES_PER_KIB;
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated: use {@link tuiFormatSize} instead
|
|
7
7
|
*/
|
|
@@ -10,13 +10,13 @@ function formatSize(units, size) {
|
|
|
10
10
|
if (size === undefined) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
|
-
if (size <
|
|
13
|
+
if (size < BYTES_PER_KIB) {
|
|
14
14
|
return size + " " + units[0];
|
|
15
15
|
}
|
|
16
|
-
if (size <
|
|
17
|
-
return (size /
|
|
16
|
+
if (size < BYTES_PER_MIB) {
|
|
17
|
+
return (size / BYTES_PER_KIB).toFixed(0) + " " + units[1];
|
|
18
18
|
}
|
|
19
|
-
return round(size /
|
|
19
|
+
return round(size / BYTES_PER_MIB, 2).toLocaleString("ru-RU") + " " + units[2];
|
|
20
20
|
}
|
|
21
21
|
var tuiFormatSize = formatSize;
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils-files.js","sources":["ng://@taiga-ui/kit/utils/files/format-size.ts","ng://@taiga-ui/kit/utils/files/get-accept-array.ts","ng://@taiga-ui/kit/utils/files/taiga-ui-kit-utils-files.ts"],"sourcesContent":["import {round} from '@taiga-ui/cdk';\n\nconst
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils-files.js","sources":["ng://@taiga-ui/kit/utils/files/format-size.ts","ng://@taiga-ui/kit/utils/files/get-accept-array.ts","ng://@taiga-ui/kit/utils/files/taiga-ui-kit-utils-files.ts"],"sourcesContent":["import {round} from '@taiga-ui/cdk';\n\nconst BYTES_PER_KIB = 1024;\nconst BYTES_PER_MIB = 1024 * BYTES_PER_KIB;\n\n/**\n * @deprecated: use {@link tuiFormatSize} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function formatSize(\n units: [string, string, string],\n size?: number,\n): string | null {\n if (size === undefined) {\n return null;\n }\n\n if (size < BYTES_PER_KIB) {\n return `${size} ${units[0]}`;\n }\n\n if (size < BYTES_PER_MIB) {\n return `${(size / BYTES_PER_KIB).toFixed(0)} ${units[1]}`;\n }\n\n return `${round(size / BYTES_PER_MIB, 2).toLocaleString(`ru-RU`)} ${units[2]}`;\n}\n\nexport const tuiFormatSize = formatSize;\n","/**\n * @deprecated: use {@link tuiGetAcceptArray} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getAcceptArray(accept: string): readonly string[] {\n return accept\n .toLowerCase()\n .split(`,`)\n .map(format => format.trim());\n}\n\nexport const tuiGetAcceptArray = getAcceptArray;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA,IAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,IAAM,aAAa,GAAG,IAAI,GAAG,aAAa,CAAC;AAE3C;;;AAGA;SACgB,UAAU,CACtB,KAA+B,EAC/B,IAAa;IAEb,IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,OAAO,IAAI,CAAC;KACf;IAED,IAAI,IAAI,GAAG,aAAa,EAAE;QACtB,OAAU,IAAI,SAAI,KAAK,CAAC,CAAC,CAAG,CAAC;KAChC;IAED,IAAI,IAAI,GAAG,aAAa,EAAE;QACtB,OAAU,CAAC,IAAI,GAAG,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,SAAI,KAAK,CAAC,CAAC,CAAG,CAAC;KAC7D;IAED,OAAU,KAAK,CAAC,IAAI,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,SAAI,KAAK,CAAC,CAAC,CAAG,CAAC;AACnF,CAAC;IAEY,aAAa,GAAG;;AC5B7B;;;AAGA;SACgB,cAAc,CAAC,MAAc;IACzC,OAAO,MAAM;SACR,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,IAAI,EAAE,GAAA,CAAC,CAAC;AACtC,CAAC;IAEY,iBAAiB,GAAG;;ACXjC;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.97.0",
|
|
4
4
|
"description": "Taiga UI Angular main components kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@angular/router": ">=9.0.0",
|
|
25
25
|
"@ng-web-apis/common": ">=1.12.1 < 2",
|
|
26
26
|
"@ng-web-apis/mutation-observer": ">=1.1.0 < 2",
|
|
27
|
-
"@taiga-ui/cdk": ">=2.
|
|
28
|
-
"@taiga-ui/core": ">=2.
|
|
29
|
-
"@taiga-ui/i18n": ">=2.
|
|
27
|
+
"@taiga-ui/cdk": ">=2.97.0",
|
|
28
|
+
"@taiga-ui/core": ">=2.97.0",
|
|
29
|
+
"@taiga-ui/i18n": ">=2.97.0",
|
|
30
30
|
"@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
|
|
31
31
|
"rxjs": ">=6.0.0"
|
|
32
32
|
},
|