@mk-kit/ui 0.47.0 → 0.48.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/README.md +12 -5
- package/fesm2022/mk-kit-ui-locales-de.mjs +494 -0
- package/fesm2022/mk-kit-ui-locales-de.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-locales-es.mjs +494 -0
- package/fesm2022/mk-kit-ui-locales-es.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-locales-fr.mjs +495 -0
- package/fesm2022/mk-kit-ui-locales-fr.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-locales-uk.mjs +503 -0
- package/fesm2022/mk-kit-ui-locales-uk.mjs.map +1 -0
- package/package.json +17 -1
- package/types/mk-kit-ui-locales-de.d.ts +40 -0
- package/types/mk-kit-ui-locales-es.d.ts +40 -0
- package/types/mk-kit-ui-locales-fr.d.ts +41 -0
- package/types/mk-kit-ui-locales-uk.d.ts +42 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mk-kit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -128,10 +128,26 @@
|
|
|
128
128
|
"types": "./types/mk-kit-ui-layout.d.ts",
|
|
129
129
|
"default": "./fesm2022/mk-kit-ui-layout.mjs"
|
|
130
130
|
},
|
|
131
|
+
"./locales/de": {
|
|
132
|
+
"types": "./types/mk-kit-ui-locales-de.d.ts",
|
|
133
|
+
"default": "./fesm2022/mk-kit-ui-locales-de.mjs"
|
|
134
|
+
},
|
|
135
|
+
"./locales/es": {
|
|
136
|
+
"types": "./types/mk-kit-ui-locales-es.d.ts",
|
|
137
|
+
"default": "./fesm2022/mk-kit-ui-locales-es.mjs"
|
|
138
|
+
},
|
|
139
|
+
"./locales/fr": {
|
|
140
|
+
"types": "./types/mk-kit-ui-locales-fr.d.ts",
|
|
141
|
+
"default": "./fesm2022/mk-kit-ui-locales-fr.mjs"
|
|
142
|
+
},
|
|
131
143
|
"./locales/pl": {
|
|
132
144
|
"types": "./types/mk-kit-ui-locales-pl.d.ts",
|
|
133
145
|
"default": "./fesm2022/mk-kit-ui-locales-pl.mjs"
|
|
134
146
|
},
|
|
147
|
+
"./locales/uk": {
|
|
148
|
+
"types": "./types/mk-kit-ui-locales-uk.d.ts",
|
|
149
|
+
"default": "./fesm2022/mk-kit-ui-locales-uk.mjs"
|
|
150
|
+
},
|
|
135
151
|
"./media": {
|
|
136
152
|
"types": "./types/mk-kit-ui-media.d.ts",
|
|
137
153
|
"default": "./fesm2022/mk-kit-ui-media.mjs"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { MkBlockEditorStrings, MkDateNames, MkI18nStrings, MkValidationStrings, MkI18nOverrides } from '@mk-kit/ui/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Picks the German plural form for a count — CLDR's `de` rules for integers:
|
|
6
|
+
* `one` for 1, `other` for everything else.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* mkPluralDe(1, 'Ergebnis', 'Ergebnisse'); // 'Ergebnis'
|
|
10
|
+
* mkPluralDe(3, 'Ergebnis', 'Ergebnisse'); // 'Ergebnisse'
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare function mkPluralDe(count: number, one: string, other: string): string;
|
|
14
|
+
/** German month and weekday names (Sunday-first, as in `Intl`). */
|
|
15
|
+
declare const MK_DE_DATE_NAMES: MkDateNames;
|
|
16
|
+
/** German validation messages rendered by `mk-form-field`. */
|
|
17
|
+
declare const MK_DE_VALIDATION: MkValidationStrings;
|
|
18
|
+
/** German strings of the block editor's chrome. */
|
|
19
|
+
declare const MK_DE_BLOCK_EDITOR: MkBlockEditorStrings;
|
|
20
|
+
/**
|
|
21
|
+
* The complete German string map — every key of {@link MkI18nStrings},
|
|
22
|
+
* `locale: 'de-DE'` and `currency: 'EUR'` for the formatting pipes.
|
|
23
|
+
* Provide it whole with {@link provideMkI18nDe}, or pass it as the base of
|
|
24
|
+
* `provideMkI18n(overrides, MK_DE_I18N)`.
|
|
25
|
+
*/
|
|
26
|
+
declare const MK_DE_I18N: MkI18nStrings;
|
|
27
|
+
/**
|
|
28
|
+
* Provides the German strings — {@link MK_DE_I18N} with any `overrides`
|
|
29
|
+
* merged on top (deep for `dateNames`, `blockEditor` and `validation`, like
|
|
30
|
+
* `provideMkI18n`).
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* bootstrapApplication(App, {
|
|
34
|
+
* providers: [provideMkI18nDe({ noData: 'Nichts zu sehen' })],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function provideMkI18nDe(overrides?: MkI18nOverrides): Provider;
|
|
39
|
+
|
|
40
|
+
export { MK_DE_BLOCK_EDITOR, MK_DE_DATE_NAMES, MK_DE_I18N, MK_DE_VALIDATION, mkPluralDe, provideMkI18nDe };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { MkBlockEditorStrings, MkDateNames, MkI18nStrings, MkValidationStrings, MkI18nOverrides } from '@mk-kit/ui/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Picks the Spanish plural form for a count — CLDR's `es` rules for integers:
|
|
6
|
+
* `one` for 1, `other` for everything else.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* mkPluralEs(1, 'resultado', 'resultados'); // 'resultado'
|
|
10
|
+
* mkPluralEs(3, 'resultado', 'resultados'); // 'resultados'
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare function mkPluralEs(count: number, one: string, other: string): string;
|
|
14
|
+
/** Spanish month and weekday names (Sunday-first, lowercase as in `Intl`). */
|
|
15
|
+
declare const MK_ES_DATE_NAMES: MkDateNames;
|
|
16
|
+
/** Spanish validation messages rendered by `mk-form-field`. */
|
|
17
|
+
declare const MK_ES_VALIDATION: MkValidationStrings;
|
|
18
|
+
/** Spanish strings of the block editor's chrome. */
|
|
19
|
+
declare const MK_ES_BLOCK_EDITOR: MkBlockEditorStrings;
|
|
20
|
+
/**
|
|
21
|
+
* The complete Spanish string map — every key of {@link MkI18nStrings},
|
|
22
|
+
* `locale: 'es-ES'` and `currency: 'EUR'` for the formatting pipes.
|
|
23
|
+
* Provide it whole with {@link provideMkI18nEs}, or pass it as the base of
|
|
24
|
+
* `provideMkI18n(overrides, MK_ES_I18N)`.
|
|
25
|
+
*/
|
|
26
|
+
declare const MK_ES_I18N: MkI18nStrings;
|
|
27
|
+
/**
|
|
28
|
+
* Provides the Spanish strings — {@link MK_ES_I18N} with any `overrides`
|
|
29
|
+
* merged on top (deep for `dateNames`, `blockEditor` and `validation`, like
|
|
30
|
+
* `provideMkI18n`).
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* bootstrapApplication(App, {
|
|
34
|
+
* providers: [provideMkI18nEs({ noData: 'No hay nada aquí' })],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function provideMkI18nEs(overrides?: MkI18nOverrides): Provider;
|
|
39
|
+
|
|
40
|
+
export { MK_ES_BLOCK_EDITOR, MK_ES_DATE_NAMES, MK_ES_I18N, MK_ES_VALIDATION, mkPluralEs, provideMkI18nEs };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { MkBlockEditorStrings, MkDateNames, MkI18nStrings, MkValidationStrings, MkI18nOverrides } from '@mk-kit/ui/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Picks the French plural form for a count — CLDR's `fr` rules for integers:
|
|
6
|
+
* `one` for 0 and 1, `other` for everything else.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* mkPluralFr(1, 'résultat', 'résultats'); // 'résultat'
|
|
10
|
+
* mkPluralFr(0, 'résultat', 'résultats'); // 'résultat'
|
|
11
|
+
* mkPluralFr(3, 'résultat', 'résultats'); // 'résultats'
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare function mkPluralFr(count: number, one: string, other: string): string;
|
|
15
|
+
/** French month and weekday names (Sunday-first, lowercase as in `Intl`). */
|
|
16
|
+
declare const MK_FR_DATE_NAMES: MkDateNames;
|
|
17
|
+
/** French validation messages rendered by `mk-form-field`. */
|
|
18
|
+
declare const MK_FR_VALIDATION: MkValidationStrings;
|
|
19
|
+
/** French strings of the block editor's chrome. */
|
|
20
|
+
declare const MK_FR_BLOCK_EDITOR: MkBlockEditorStrings;
|
|
21
|
+
/**
|
|
22
|
+
* The complete French string map — every key of {@link MkI18nStrings},
|
|
23
|
+
* `locale: 'fr-FR'` and `currency: 'EUR'` for the formatting pipes.
|
|
24
|
+
* Provide it whole with {@link provideMkI18nFr}, or pass it as the base of
|
|
25
|
+
* `provideMkI18n(overrides, MK_FR_I18N)`.
|
|
26
|
+
*/
|
|
27
|
+
declare const MK_FR_I18N: MkI18nStrings;
|
|
28
|
+
/**
|
|
29
|
+
* Provides the French strings — {@link MK_FR_I18N} with any `overrides`
|
|
30
|
+
* merged on top (deep for `dateNames`, `blockEditor` and `validation`, like
|
|
31
|
+
* `provideMkI18n`).
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* bootstrapApplication(App, {
|
|
35
|
+
* providers: [provideMkI18nFr({ noData: 'Rien à afficher ici' })],
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function provideMkI18nFr(overrides?: MkI18nOverrides): Provider;
|
|
40
|
+
|
|
41
|
+
export { MK_FR_BLOCK_EDITOR, MK_FR_DATE_NAMES, MK_FR_I18N, MK_FR_VALIDATION, mkPluralFr, provideMkI18nFr };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { MkBlockEditorStrings, MkDateNames, MkI18nStrings, MkValidationStrings, MkI18nOverrides } from '@mk-kit/ui/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Picks the Ukrainian plural form for a count — CLDR's `uk` rules for
|
|
6
|
+
* integers: `one` when the number ends in 1 (but not 11), `few` when it ends
|
|
7
|
+
* in 2–4 (but not 12–14), `many` otherwise.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* mkPluralUk(1, 'результат', 'результати', 'результатів'); // 'результат'
|
|
11
|
+
* mkPluralUk(3, 'результат', 'результати', 'результатів'); // 'результати'
|
|
12
|
+
* mkPluralUk(11, 'результат', 'результати', 'результатів'); // 'результатів'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare function mkPluralUk(count: number, one: string, few: string, many: string): string;
|
|
16
|
+
/** Ukrainian month and weekday names (Sunday-first, lowercase as in `Intl`). */
|
|
17
|
+
declare const MK_UK_DATE_NAMES: MkDateNames;
|
|
18
|
+
/** Ukrainian validation messages rendered by `mk-form-field`. */
|
|
19
|
+
declare const MK_UK_VALIDATION: MkValidationStrings;
|
|
20
|
+
/** Ukrainian strings of the block editor's chrome. */
|
|
21
|
+
declare const MK_UK_BLOCK_EDITOR: MkBlockEditorStrings;
|
|
22
|
+
/**
|
|
23
|
+
* The complete Ukrainian string map — every key of {@link MkI18nStrings},
|
|
24
|
+
* `locale: 'uk-UA'` and `currency: 'UAH'` for the formatting pipes.
|
|
25
|
+
* Provide it whole with {@link provideMkI18nUk}, or pass it as the base of
|
|
26
|
+
* `provideMkI18n(overrides, MK_UK_I18N)`.
|
|
27
|
+
*/
|
|
28
|
+
declare const MK_UK_I18N: MkI18nStrings;
|
|
29
|
+
/**
|
|
30
|
+
* Provides the Ukrainian strings — {@link MK_UK_I18N} with any `overrides`
|
|
31
|
+
* merged on top (deep for `dateNames`, `blockEditor` and `validation`, like
|
|
32
|
+
* `provideMkI18n`).
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* bootstrapApplication(App, {
|
|
36
|
+
* providers: [provideMkI18nUk({ noData: 'Тут нічого немає' })],
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare function provideMkI18nUk(overrides?: MkI18nOverrides): Provider;
|
|
41
|
+
|
|
42
|
+
export { MK_UK_BLOCK_EDITOR, MK_UK_DATE_NAMES, MK_UK_I18N, MK_UK_VALIDATION, mkPluralUk, provideMkI18nUk };
|