@mk-kit/ui 0.46.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.
@@ -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 };