@club-employes/utopia 4.332.0 → 4.334.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/dist/components/molecules/OptionSelect/OptionSelect.d.ts +1 -0
- package/dist/components/molecules/OptionSelect/types.d.ts +1 -0
- package/dist/components/organisms/Table/Table.d.ts +0 -1
- package/dist/components/organisms/Table/types.d.ts +9 -3
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useTableTranslations.d.ts +2 -2
- package/dist/composables/useUtopiaLocale.d.ts +24 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7060 -6849
- package/dist/utopia.css +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ declare const _default: DefineComponent<OptionSelectProps, {}, {}, {}, {}, Compo
|
|
|
6
6
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
8
|
required: boolean;
|
|
9
|
+
placeholder: string;
|
|
9
10
|
outOfStockLabel: string;
|
|
10
11
|
displayMode: "dropdown" | "button";
|
|
11
12
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -398,9 +398,15 @@ export interface TableProps<T = Record<string, any>> {
|
|
|
398
398
|
activatedColumns?: string[];
|
|
399
399
|
rows?: number;
|
|
400
400
|
/**
|
|
401
|
-
* Langue d’affichage (
|
|
402
|
-
*
|
|
403
|
-
*
|
|
401
|
+
* Langue d’affichage (libellés du footer/pagination + menu de filtre **PrimeVue**
|
|
402
|
+
* `noFilter`, `Apply`, modes de correspondance, etc. via `PrimeVue.config.locale`).
|
|
403
|
+
*
|
|
404
|
+
* Si non précisé, le composant lit le locale global Utopia défini via
|
|
405
|
+
* `setUtopiaLocale(...)` côté host (réactif). En l'absence de locale global,
|
|
406
|
+
* fallback sur `'fr'`.
|
|
407
|
+
*
|
|
408
|
+
* Valeurs supportées : `'fr' | 'en'`.
|
|
409
|
+
* @default undefined (fallback global Utopia, puis `'fr'`)
|
|
404
410
|
*/
|
|
405
411
|
language?: string;
|
|
406
412
|
/**
|
|
@@ -7,6 +7,7 @@ export { useCurrency } from './useCurrency';
|
|
|
7
7
|
export { useCurrencyFormat, type UseCurrencyFormatOptions, type UseCurrencyFormatReturn } from './useCurrencyFormat';
|
|
8
8
|
export { useProgressBar, type UseProgressBarOptions, type UseProgressBarReturn } from './useProgressBar';
|
|
9
9
|
export { useTableTranslations, type TableLanguage } from './useTableTranslations';
|
|
10
|
+
export { getUtopiaLocale, setUtopiaLocale, useUtopiaLocale } from './useUtopiaLocale';
|
|
10
11
|
export { useTableSelection, type SelectionMode, type TableSelectAllScope, type UseTableSelectionCallbacks, type UseTableSelectionOptions, type UseTableSelectionReturn } from './useTableSelection';
|
|
11
12
|
export { useTablePagination, type UseTablePaginationOptions, type UseTablePaginationReturn } from './useTablePagination';
|
|
12
13
|
export { useTableSort, type UseTableSortReturn } from './useTableSort';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
2
|
export type TableLanguage = 'fr' | 'en';
|
|
3
3
|
interface TableTranslations {
|
|
4
4
|
goToPageLabel: string;
|
|
@@ -23,5 +23,5 @@ interface TableTranslations {
|
|
|
23
23
|
editModeLabelOn: string;
|
|
24
24
|
editModeLabelOff: string;
|
|
25
25
|
}
|
|
26
|
-
export declare function useTableTranslations(language: TableLanguage |
|
|
26
|
+
export declare function useTableTranslations(language: MaybeRefOrGetter<TableLanguage | string>): ComputedRef<TableTranslations>;
|
|
27
27
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { TableLanguage } from './useTableTranslations';
|
|
3
|
+
/**
|
|
4
|
+
* Retourne le `Ref` réactif du locale Utopia global.
|
|
5
|
+
* Lecture-seule recommandée — pour modifier la valeur, utiliser {@link setUtopiaLocale}.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getUtopiaLocale(): Ref<TableLanguage>;
|
|
8
|
+
/**
|
|
9
|
+
* Branche le locale Utopia global sur une source.
|
|
10
|
+
*
|
|
11
|
+
* Accepte :
|
|
12
|
+
* - une valeur statique (`'fr'` | `'en'`) → set ponctuel
|
|
13
|
+
* - un `Ref`, `ComputedRef`, ou `WritableComputedRef` (ex. `i18n.global.locale`) → watcher automatique
|
|
14
|
+
* qui propage les changements à tous les `<Table>` montés.
|
|
15
|
+
* - un getter `() => string` → idem.
|
|
16
|
+
*
|
|
17
|
+
* Les valeurs non supportées (autre que `'en'`) sont normalisées sur `'fr'`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function setUtopiaLocale(locale: MaybeRefOrGetter<string>): void;
|
|
20
|
+
/**
|
|
21
|
+
* Sucre pour les composants : retourne le `Ref` réactif du locale Utopia global.
|
|
22
|
+
* Équivalent à {@link getUtopiaLocale}.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useUtopiaLocale(): Ref<TableLanguage>;
|
package/dist/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export type { CartPreviewProps, CartPreviewItemProps, CartPreviewPrice, CartPrev
|
|
|
100
100
|
export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
|
|
101
101
|
export { gifteoDark, gifteoLight } from './themes/gifteo';
|
|
102
102
|
export type { LoaderProps } from './components/templates/Loader/types';
|
|
103
|
-
export { getActiveTheme, initializeTheme, isValidThemeName, unlockBrand, useBreakpoints, useCurrency, useFavicon, useScrollShadows, useTheme, usePrimeVueTableLocale } from './composables';
|
|
103
|
+
export { getActiveTheme, initializeTheme, isValidThemeName, unlockBrand, useBreakpoints, useCurrency, useFavicon, useScrollShadows, useTheme, usePrimeVueTableLocale, getUtopiaLocale, setUtopiaLocale, useUtopiaLocale } from './composables';
|
|
104
104
|
export type { PrimeVueTableLanguage } from './composables/usePrimeVueTableLocale';
|
|
105
105
|
export { applyPrimeVueTableLocalePatch, PRIMEVUE_TABLE_LOCALE_EN, PRIMEVUE_TABLE_LOCALE_FR, type PrimeVueTableLocalePatch } from './locales/primeVueTableLocale';
|
|
106
106
|
export type { ThemeName } from './composables/initializeTheme';
|