@club-employes/utopia 4.160.0 → 4.162.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.
@@ -12,5 +12,5 @@ export interface IconProps {
12
12
  /** Texte alternatif pour l'accessibilité */
13
13
  alt?: string;
14
14
  /** Classes CSS personnalisées */
15
- class?: string;
15
+ class?: string | Array<string | Object>;
16
16
  }
@@ -26,5 +26,4 @@ export type IconSize = 'extra-small' | 'small' | 'medium' | 'large';
26
26
  export type IconColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'neutral' | 'current';
27
27
  export type Currency = '€' | '£';
28
28
  export { FavoriteToggle, type FavoriteToggleProps } from './FavoriteToggle';
29
- export { WarningBlock, type WarningBlockProps } from './WarningBlock';
30
29
  export { CopyCode, type CopyCodeProps } from './CopyCode';
@@ -0,0 +1,10 @@
1
+ import { SingleOptionProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<SingleOptionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
4
+ "update:modelValue": (value: string | number) => any;
5
+ }, string, PublicProps, Readonly<SingleOptionProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
8
+ optionTextRef: HTMLParagraphElement;
9
+ }, any>;
10
+ export default _default;
@@ -1,10 +1,12 @@
1
+ export interface SingleOptionProps {
2
+ label: string;
3
+ value: string | number;
4
+ disabled?: boolean;
5
+ selected?: boolean;
6
+ }
1
7
  export interface OptionSelectProps {
2
- modelValue: string | number | null;
3
8
  label?: string;
4
9
  tooltip?: string;
5
- options: {
6
- label: string;
7
- value: string | number;
8
- disabled?: boolean;
9
- }[];
10
+ modelValue: string | number | null;
11
+ options: SingleOptionProps[];
10
12
  }
@@ -3,14 +3,14 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  declare const _default: DefineComponent<FilterGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
4
4
  "update:filters": (value: Filter[]) => any;
5
5
  "reset-filters": () => any;
6
- "remove:chip": (value: {
6
+ "remove-chip": (value: {
7
7
  filter: string;
8
8
  label: string;
9
9
  }) => any;
10
10
  }, string, PublicProps, Readonly<FilterGroupProps> & Readonly<{
11
11
  "onUpdate:filters"?: ((value: Filter[]) => any) | undefined;
12
12
  "onReset-filters"?: (() => any) | undefined;
13
- "onRemove:chip"?: ((value: {
13
+ "onRemove-chip"?: ((value: {
14
14
  filter: string;
15
15
  label: string;
16
16
  }) => any) | undefined;
@@ -7,23 +7,84 @@ type __VLS_Props = {
7
7
  items: MenuSectionItem[];
8
8
  activeLabel?: string;
9
9
  settingsLabel?: string;
10
- duplicateLabel?: string;
11
10
  deleteLabel?: string;
12
11
  toggleLabel?: string;
13
12
  itemsLabel?: string;
13
+ editIcon?: string;
14
+ deleteIcon?: string;
15
+ editTooltip?: string;
16
+ deleteTooltip?: string;
14
17
  };
15
- declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
- [x: string]: any;
17
- } & {
18
- [x: string]: any;
18
+ type Id = string | number;
19
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
20
+ "update:modelValue": (value: boolean) => any;
21
+ delete: (section: {
22
+ id: string;
23
+ title: string;
24
+ active: boolean;
25
+ items: MenuSectionItem[];
26
+ }) => any;
27
+ settings: (section: {
28
+ id: string;
29
+ title: string;
30
+ active: boolean;
31
+ items: MenuSectionItem[];
32
+ }) => any;
33
+ "add-item": (section: {
34
+ id: string;
35
+ title: string;
36
+ active: boolean;
37
+ items: MenuSectionItem[];
38
+ }) => any;
39
+ "item-settings": (item: MenuSectionItem) => any;
40
+ "item-delete": (item: MenuSectionItem) => any;
41
+ "update:item-active": (payload: {
42
+ id: Id;
43
+ value: boolean;
44
+ item: MenuSectionItem;
45
+ }) => any;
46
+ "reorder-items": (payload: {
47
+ order: Id[];
48
+ }) => any;
19
49
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
20
- [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
50
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
51
+ onDelete?: ((section: {
52
+ id: string;
53
+ title: string;
54
+ active: boolean;
55
+ items: MenuSectionItem[];
56
+ }) => any) | undefined;
57
+ onSettings?: ((section: {
58
+ id: string;
59
+ title: string;
60
+ active: boolean;
61
+ items: MenuSectionItem[];
62
+ }) => any) | undefined;
63
+ "onAdd-item"?: ((section: {
64
+ id: string;
65
+ title: string;
66
+ active: boolean;
67
+ items: MenuSectionItem[];
68
+ }) => any) | undefined;
69
+ "onItem-settings"?: ((item: MenuSectionItem) => any) | undefined;
70
+ "onItem-delete"?: ((item: MenuSectionItem) => any) | undefined;
71
+ "onUpdate:item-active"?: ((payload: {
72
+ id: Id;
73
+ value: boolean;
74
+ item: MenuSectionItem;
75
+ }) => any) | undefined;
76
+ "onReorder-items"?: ((payload: {
77
+ order: Id[];
78
+ }) => any) | undefined;
21
79
  }>, {
22
80
  activeLabel: string;
23
81
  settingsLabel: string;
24
- duplicateLabel: string;
25
82
  deleteLabel: string;
26
83
  toggleLabel: string;
27
84
  itemsLabel: string;
85
+ editIcon: string;
86
+ deleteIcon: string;
87
+ editTooltip: string;
88
+ deleteTooltip: string;
28
89
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
29
90
  export default _default;
@@ -1,4 +1,4 @@
1
- import { ProductSummaryProps, ProductSummaryVariant } from './types';
1
+ import { ProductSummaryProps } from './types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  import { OptionSelectProps } from '../..';
4
4
  declare const _default: DefineComponent<ProductSummaryProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -12,7 +12,6 @@ declare const _default: DefineComponent<ProductSummaryProps, {}, {}, {}, {}, Com
12
12
  outOfStock: boolean;
13
13
  outOfStockChipLabel: string;
14
14
  outOfStockDescription: string;
15
- variants: ProductSummaryVariant[];
16
15
  additionalInfo: {
17
16
  icon: string;
18
17
  label: string;
@@ -1,13 +1,4 @@
1
1
  import { OptionSelectProps } from '../../molecules/OptionSelect';
2
- import { WarningBlockProps } from '../../atoms/WarningBlock';
3
- export interface ProductSummaryVariant {
4
- label: string;
5
- value: string | null;
6
- options: {
7
- label: string;
8
- value: string;
9
- }[];
10
- }
11
2
  export interface ProductSummaryPrice {
12
3
  label: string;
13
4
  totalLabel: string;
@@ -26,21 +17,25 @@ export interface ProductSummaryQuantity {
26
17
  }
27
18
  export interface ProductSummaryButton {
28
19
  label: string;
29
- icon: string;
30
- disabled: boolean;
20
+ icon?: string;
21
+ disabled?: boolean;
31
22
  }
32
23
  export interface ProductSummaryProps {
33
- title: string;
34
- discount?: string;
24
+ titles: {
25
+ label: string;
26
+ discount?: string;
27
+ }[];
35
28
  type?: string;
36
29
  brand?: string;
37
30
  address?: string;
38
31
  outOfStock?: boolean;
39
32
  outOfStockChipLabel?: string;
40
33
  outOfStockDescription?: string;
41
- warning?: WarningBlockProps;
34
+ tips?: {
35
+ title: string;
36
+ content: string;
37
+ };
42
38
  options?: OptionSelectProps[];
43
- variants?: ProductSummaryVariant[];
44
39
  code?: string;
45
40
  price?: ProductSummaryPrice;
46
41
  quantity?: ProductSummaryQuantity;
@@ -58,6 +58,7 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
58
58
  activatedColumns: string[];
59
59
  totalRecords: number;
60
60
  sortMode: "single" | "multiple";
61
+ removableSort: boolean;
61
62
  rowHover: boolean;
62
63
  editMode: "cell" | "row";
63
64
  scrollable: boolean;
@@ -6,9 +6,9 @@ type __VLS_Props = {
6
6
  language?: 'fr' | 'en';
7
7
  };
8
8
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
9
- "update:modelValue": (val: [number, number]) => any;
9
+ "update:modelValue": (val: [number, number] | null) => any;
10
10
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- "onUpdate:modelValue"?: ((val: [number, number]) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((val: [number, number] | null) => any) | undefined;
12
12
  }>, {
13
13
  modelValue: [number, number] | null;
14
14
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -39,8 +39,20 @@ export interface ColumnType {
39
39
  contentType: CellContentType;
40
40
  filterType?: CellFilterType;
41
41
  field?: string | ((item: string) => string | number | boolean | null | undefined);
42
- sortField?: string | ((item: string) => string | number | boolean | null | undefined);
43
- filterField?: string | ((item: string) => string | number | boolean | null | undefined);
42
+ /**
43
+ * Champ(s) utilisés pour le tri (backend / requestData.sort).
44
+ * - `string` : tri sur un seul champ.
45
+ * - `string[]` : tri sur plusieurs champs avec le même ordre (ex. colonne "Nom" = firstName + lastName).
46
+ * - `undefined` : utilise le champ d'affichage de la colonne (field ou columnKey).
47
+ */
48
+ sortField?: string | string[] | ((item: string) => string | number | boolean | null | undefined);
49
+ /**
50
+ * Champ(s) utilisés pour le filtre (backend / requestData.filters).
51
+ * - `string` : filtre sur un seul champ.
52
+ * - `string[]` : filtre sur plusieurs champs (ex. colonne "Nom" = firstName + lastName).
53
+ * - `undefined` : utilise le champ d'affichage de la colonne (field ou columnKey).
54
+ */
55
+ filterField?: string | string[] | ((item: string) => string | number | boolean | null | undefined);
44
56
  format?: (value: string | number | boolean | null | undefined) => string | number | boolean | null | undefined;
45
57
  order?: number;
46
58
  /**
@@ -417,11 +429,15 @@ export interface TextImageContentType {
417
429
  height?: string;
418
430
  };
419
431
  title: {
420
- key?: string;
432
+ key?: string | string[];
421
433
  size?: TextSize;
422
434
  weight?: TextWeight;
423
435
  color?: string;
424
- format?: (value: string | number | boolean | null | undefined) => string | number | boolean | null | undefined;
436
+ /**
437
+ * Reçoit une valeur si key est string, ou un argument par clé si key est string[] (dans le même ordre).
438
+ * Ex. key: ['name', 'lastName'] → format(name, lastName) => `${name} Qte: (${String(lastName).toUpperCase()})`
439
+ */
440
+ format?: (...values: (string | number | boolean | null | undefined)[]) => string | number | boolean | null | undefined;
425
441
  icon?: {
426
442
  key?: string;
427
443
  size?: IconSize;
@@ -431,11 +447,12 @@ export interface TextImageContentType {
431
447
  };
432
448
  };
433
449
  subtitle?: {
434
- key?: string;
450
+ key?: string | string[];
435
451
  size?: TextSize;
436
452
  weight?: TextWeight;
437
453
  color?: string;
438
- format?: (value: string | number | boolean | null | undefined) => string | number | boolean | null | undefined;
454
+ /** Une valeur si key est string, plusieurs arguments si key est string[]. */
455
+ format?: (...values: (string | number | boolean | null | undefined)[]) => string | number | boolean | null | undefined;
439
456
  icon?: {
440
457
  key?: string;
441
458
  size?: IconSize;
@@ -445,11 +462,12 @@ export interface TextImageContentType {
445
462
  };
446
463
  };
447
464
  supportingText?: {
448
- key?: string;
465
+ key?: string | string[];
449
466
  size?: TextSize;
450
467
  weight?: TextWeight;
451
468
  color?: string;
452
- format?: (value: string) => string | number | boolean | null | undefined;
469
+ /** Une valeur si key est string, plusieurs arguments si key est string[]. */
470
+ format?: (...values: (string | number | boolean | null | undefined)[]) => string | number | boolean | null | undefined;
453
471
  icon?: {
454
472
  key?: string;
455
473
  size?: IconSize;
@@ -575,7 +593,7 @@ export interface ToggleContentType {
575
593
  size?: 'small' | 'medium' | 'large';
576
594
  options?: DropDownOption[];
577
595
  }
578
- export type MatchMode = 'contains' | 'equals' | 'notEquals' | 'startsWith' | 'endsWith' | 'contains' | 'notContains' | 'between' | 'notBetween' | 'in' | 'notIn' | 'any' | 'none' | 'all' | 'not';
596
+ export type MatchMode = 'contains' | 'equals' | 'notEquals' | 'startsWith' | 'endsWith' | 'contains' | 'notContains' | 'between' | 'notBetween' | 'in' | 'notIn' | 'any' | 'none' | 'all' | 'not' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual';
579
597
  /**
580
598
  * Type pour représenter un tri (single ou multi-sort)
581
599
  */
@@ -8,4 +8,4 @@ export interface UseTableFiltersReturn {
8
8
  }
9
9
  export declare function useTableFilters(initialFilters: Record<string, any>, columns: MaybeRefOrGetter<ColumnType[]>, emit: (value: Record<string, any>) => void, translations: {
10
10
  filter: Record<string, string>;
11
- }, isColumnFilterable: (col: ColumnType) => boolean): UseTableFiltersReturn;
11
+ }, isColumnFilterable: (col: ColumnType) => boolean, getColumnFilterKey?: (col: ColumnType) => string): UseTableFiltersReturn;
@@ -1,10 +1,7 @@
1
1
  import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
2
- import { TableRequestData, SortConfig } from '../components/organisms/Table/types';
2
+ import { TableRequestData, SortConfig, ColumnType } from '../components/organisms/Table/types';
3
3
  export interface UseTableRequestDataOptions {
4
- localColumns: Ref<Array<{
5
- columnKey: string;
6
- order?: number;
7
- }>>;
4
+ localColumns: Ref<ColumnType[]>;
8
5
  allFilters: Ref<Record<string, any>>;
9
6
  currentSort: Ref<SortConfig[]>;
10
7
  internalCurrentPage: Ref<number>;
@@ -14,6 +11,12 @@ export interface UseTableRequestDataOptions {
14
11
  totalRecords?: number;
15
12
  totalPages?: number;
16
13
  }>;
14
+ /**
15
+ * Doit être la même fonction que Table.getColumnFilterField.
16
+ * Permet de savoir quelle colonne correspond à une clé de allFilters et d'étendre
17
+ * filterField string[] en plusieurs entrées dans requestData.filters (comme sortField pour le tri).
18
+ */
19
+ getColumnFilterKey?: (col: ColumnType) => string;
17
20
  }
18
21
  export interface UseTableRequestDataReturn {
19
22
  requestData: ComputedRef<TableRequestData>;
@@ -5,4 +5,11 @@ export interface UseTableSortReturn {
5
5
  currentSort: Ref<SortConfig[]>;
6
6
  handleSortChange: (event: DataTableSortEvent) => void;
7
7
  }
8
- export declare function useTableSort(emit: (value: DataTableSortEvent) => void): UseTableSortReturn;
8
+ export interface UseTableSortOptions {
9
+ /**
10
+ * Résout le champ de colonne (envoyé par PrimeVue) en une ou plusieurs clés de tri.
11
+ * Permet d'appliquer le même ordre à plusieurs champs (ex. colonne "Nom" → ['firstName', 'lastName']).
12
+ */
13
+ resolveSortFields?: (columnField: string) => string[];
14
+ }
15
+ export declare function useTableSort(emit: (value: DataTableSortEvent) => void, options?: UseTableSortOptions): UseTableSortReturn;
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2026-02-16T16:00:34.357Z",
2
+ "generated": "2026-02-18T09:09:34.197Z",
3
3
  "count": 1239,
4
4
  "icons": [
5
5
  "Accessibility",
package/dist/index.d.ts CHANGED
@@ -24,7 +24,6 @@ export type { StepperProps } from './components/atoms/Stepper/types';
24
24
  export type { SwitchProps } from './components/atoms/Switch/types';
25
25
  export type { TextAreaProps } from './components/atoms/TextArea/types';
26
26
  export type { TipsProps } from './components/atoms/Tips/types';
27
- export type { WarningBlockProps } from './components/atoms/WarningBlock/types';
28
27
  export type { CopyCodeProps } from './components/atoms/CopyCode/types';
29
28
  export type { BottomSheetChangeReason, BottomSheetProps } from './components/molecules/BottomSheet/types';
30
29
  export type { CounterButtonsProps } from './components/molecules/CounterButtons/types';
@@ -60,7 +59,7 @@ export type { MenuSectionItem } from './components/organisms/MenuSection/types';
60
59
  export type { MyEditorProps } from './components/organisms/MyEditor/types';
61
60
  export type { PageNavigationProps } from './components/organisms/PageNavigation/types';
62
61
  export type { ProductCardProps } from './components/organisms/ProductCard/types';
63
- export type { ProductSummaryProps, ProductSummaryPrice, ProductSummaryQuantity, ProductSummaryButton, ProductSummaryVariant } from './components/organisms/ProductSummary/types';
62
+ export type { ProductSummaryProps, ProductSummaryPrice, ProductSummaryQuantity, ProductSummaryButton } from './components/organisms/ProductSummary/types';
64
63
  export { CellContentType, CellFilterType } from './components/organisms/Table';
65
64
  export type { CellContent, CellProps, ColumnOrder, ColumnType, MatchMode, SortConfig, TableProps, TableRequestData, TableEmptyStateProps } from './components/organisms/Table/types';
66
65
  export type { TransactionProps } from './components/organisms/Transaction/types';