@club-employes/utopia 4.331.0 → 4.333.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,8 @@
1
+ import { CartStepperProps, CartStepperStep } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<CartStepperProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
+ "step-click": (step: CartStepperStep) => any;
5
+ }, string, PublicProps, Readonly<CartStepperProps> & Readonly<{
6
+ "onStep-click"?: ((step: CartStepperStep) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as CartStepper } from './CartStepper';
2
+ export type { CartStepperProps, CartStepperStep } from './types';
@@ -0,0 +1,36 @@
1
+ import { IconName } from '../../atoms/Icon/types';
2
+ /**
3
+ * Étape unique du CartStepper.
4
+ */
5
+ export interface CartStepperStep {
6
+ /** Identifiant unique de l'étape — sert au matching avec currentStepKey et est renvoyé via step-click */
7
+ key: string;
8
+ /** Libellé affiché à droite de l'icône */
9
+ label: string;
10
+ /**
11
+ * Icône affichée pour cette étape lorsqu'elle est active ou déjà franchie.
12
+ * Cf. `IconName` (icônes locales ou `fa:solid:...` / `fa:regular:...`).
13
+ */
14
+ icon: IconName;
15
+ /**
16
+ * Variante d'icône pour l'état "à venir" (étape pas encore atteinte).
17
+ * Si omis, `icon` est réutilisé.
18
+ *
19
+ * Permet de matcher la convention Figma : icône pleine pour active/franchie,
20
+ * icône fine (regular) pour les étapes à venir.
21
+ */
22
+ iconUpcoming?: IconName;
23
+ }
24
+ export interface CartStepperProps {
25
+ /** Liste ordonnée des étapes. L'ordre du tableau définit la progression. */
26
+ steps: CartStepperStep[];
27
+ /**
28
+ * Clé de l'étape actuellement active.
29
+ * Les étapes situées avant celle-ci sont considérées comme franchies
30
+ * (rendues avec la même emphase que l'étape active).
31
+ *
32
+ * Si la clé ne correspond à aucune étape, toutes les étapes sont rendues
33
+ * comme "à venir".
34
+ */
35
+ currentStepKey: string;
36
+ }
@@ -64,5 +64,5 @@ export { TromboItem, TromboItemEmptyState } from './TromboItem';
64
64
  export type { TromboItemProps } from './TromboItem';
65
65
  export { CountryDropDown, countriesToDropDownOptions, countryDisplayName, countryLabelForCode, countryToDropDownOption, filterCountriesByCodes, orderedCountriesForPicker } from './CountryDropDown';
66
66
  export type { CountryDropDownBaseProps, CountryDropDownPassthroughProps, CountryDropDownProps } from './CountryDropDown';
67
- export { GrantSelect } from './GrantSelect';
68
- export type { GrantSelectProps } from './GrantSelect';
67
+ export { GrantSelect, type GrantSelectItemProps } from './GrantSelect';
68
+ export { CartStepper, type CartStepperProps, type CartStepperStep } from './CartStepper';
@@ -1,4 +1,4 @@
1
- import { OrderRecapProps } from './types';
1
+ import { OrderRecapProps, OrderRecapMessage } from './types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<OrderRecapProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
4
  confirm: () => any;
@@ -22,6 +22,12 @@ export interface OrderRecapConfirm {
22
22
  loading?: boolean;
23
23
  disabled?: boolean;
24
24
  }
25
+ export interface OrderRecapMessage {
26
+ type: 'danger' | 'e-cheque';
27
+ title: string;
28
+ description: string;
29
+ active: boolean;
30
+ }
25
31
  export interface OrderRecapProps {
26
32
  title: string;
27
33
  publicPriceLabel: string;
@@ -1 +1,2 @@
1
1
  export { default as ProductRecap } from './ProductRecap';
2
+ export type { ProductRecapProps } from './types';
@@ -28,7 +28,6 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
28
28
  data: any[];
29
29
  size: "small" | "large";
30
30
  loading: boolean;
31
- language: string;
32
31
  selection: any;
33
32
  selectionMode: "single" | "multiple";
34
33
  dataKey: string;
@@ -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 (ex. libellés internes). Pilote aussi les libellés **PrimeVue** du menu de filtre
402
- * DataTable (`noFilter`, `Apply`, modes de correspondance, etc.) via `PrimeVue.config.locale`.
403
- * @default 'fr'
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
  /**
@@ -28,7 +28,5 @@ export { CartPreview } from './CartPreview';
28
28
  export type { CartPreviewProps, CartPreviewItemProps, CartPreviewPrice, CartPreviewPriceLine } from './CartPreview';
29
29
  export { AddressForm } from './AddressForm';
30
30
  export type { AddressFormProps, AddressFormSchema, AddressFormRow, AddressFormFieldConfig, AddressFormFieldType, AddressFormSection } from './AddressForm';
31
- export { ProductRecap } from './ProductRecap';
32
- export type { ProductRecapProps } from './ProductRecap';
33
- export { OrderRecap } from './OrderRecap';
34
- export type { OrderRecapProps, OrderRecapMessage } from './OrderRecap';
31
+ export { ProductRecap, type ProductRecapProps } from './ProductRecap';
32
+ export { OrderRecap, type OrderRecapProps, type OrderRecapMessage } from './OrderRecap';
@@ -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 | ComputedRef<TableLanguage>): ComputedRef<TableTranslations>;
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
@@ -72,7 +72,8 @@ export { DownloadList } from './components/molecules/DownloadList';
72
72
  export type { DownloadListProps, DownloadListItem } from './components/molecules/DownloadList/types';
73
73
  export type { TromboItemProps } from './components/molecules/TromboItem/types';
74
74
  export type { CountryDropDownProps } from './components/molecules/CountryDropDown/types';
75
- export type { GrantSelectProps } from './components/molecules/GrantSelect/types';
75
+ export type { GrantSelectItemProps } from './components/molecules/GrantSelect/types';
76
+ export type { CartStepperProps, CartStepperStep } from './components/molecules/CartStepper/types';
76
77
  export { TromboItem, TromboItemEmptyState } from './components/molecules/TromboItem';
77
78
  export type { AuthLayoutProps } from './components/layouts/AuthLayout/types';
78
79
  export type { MfePageProps, ShyHeaderMode } from './components/layouts/MfePage/types';
@@ -99,7 +100,7 @@ export type { CartPreviewProps, CartPreviewItemProps, CartPreviewPrice, CartPrev
99
100
  export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
100
101
  export { gifteoDark, gifteoLight } from './themes/gifteo';
101
102
  export type { LoaderProps } from './components/templates/Loader/types';
102
- 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';
103
104
  export type { PrimeVueTableLanguage } from './composables/usePrimeVueTableLocale';
104
105
  export { applyPrimeVueTableLocalePatch, PRIMEVUE_TABLE_LOCALE_EN, PRIMEVUE_TABLE_LOCALE_FR, type PrimeVueTableLocalePatch } from './locales/primeVueTableLocale';
105
106
  export type { ThemeName } from './composables/initializeTheme';