@club-employes/utopia 4.217.0 → 4.218.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.
@@ -27,7 +27,7 @@ declare const _default: DefineComponent<InputTextProps, {}, {}, {}, {}, Componen
27
27
  required: boolean;
28
28
  disabled: boolean;
29
29
  iconPosition: "left" | "right";
30
- modelValue: string;
30
+ modelValue: string | number;
31
31
  placeholder: string;
32
32
  state: "default" | "error" | "valid" | "incomplete" | "completed";
33
33
  readonly: boolean;
@@ -1,5 +1,5 @@
1
1
  export interface InputTextProps {
2
- modelValue?: string;
2
+ modelValue?: string | number | undefined;
3
3
  label?: string;
4
4
  placeholder?: string;
5
5
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
@@ -21,11 +21,11 @@ declare const _default: DefineComponent<DatePickerProps, {
21
21
  language: "fr" | "en";
22
22
  format: string;
23
23
  clearable: boolean;
24
+ enableTime: boolean;
24
25
  teleport: boolean;
25
26
  dday: boolean;
26
27
  use24HourFormat: boolean;
27
28
  enableMinutes: boolean;
28
- enableTime: boolean;
29
29
  allowKeyboardInput: boolean;
30
30
  activationType: string;
31
31
  defaultDateOffsetHours: number;
@@ -2,6 +2,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
2
2
  type __VLS_Props = {
3
3
  formattedDraftDateDisplay: string;
4
4
  enableTime: boolean;
5
+ language: string;
5
6
  };
6
7
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
7
8
  clear: () => any;
@@ -30,9 +30,9 @@ declare const _default: DefineComponent<DropDownProps, {}, {}, {}, {}, Component
30
30
  options: DropDownOption[];
31
31
  clearable: boolean;
32
32
  maxHeight: string;
33
+ maxVisibleChips: number;
33
34
  compact: boolean;
34
35
  chipsPosition: "inside" | "outside";
35
- maxVisibleChips: number;
36
36
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
37
37
  triggerRef: HTMLButtonElement;
38
38
  chipsScrollRef: HTMLDivElement;
@@ -64,7 +64,7 @@ declare const _default: DefineComponent<DropDownProps, {}, {}, {}, {}, Component
64
64
  required: boolean;
65
65
  disabled: boolean;
66
66
  iconPosition: "left" | "right";
67
- modelValue: string;
67
+ modelValue: string | number;
68
68
  placeholder: string;
69
69
  state: "default" | "error" | "valid" | "incomplete" | "completed";
70
70
  readonly: boolean;
@@ -100,7 +100,7 @@ declare const _default: DefineComponent<DropDownProps, {}, {}, {}, {}, Component
100
100
  required: boolean;
101
101
  disabled: boolean;
102
102
  iconPosition: "left" | "right";
103
- modelValue: string;
103
+ modelValue: string | number;
104
104
  placeholder: string;
105
105
  state: "default" | "error" | "valid" | "incomplete" | "completed";
106
106
  readonly: boolean;
@@ -62,7 +62,7 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
62
62
  required: boolean;
63
63
  disabled: boolean;
64
64
  iconPosition: "left" | "right";
65
- modelValue: string;
65
+ modelValue: string | number;
66
66
  placeholder: string;
67
67
  state: "default" | "error" | "valid" | "incomplete" | "completed";
68
68
  readonly: boolean;
@@ -98,7 +98,7 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
98
98
  required: boolean;
99
99
  disabled: boolean;
100
100
  iconPosition: "left" | "right";
101
- modelValue: string;
101
+ modelValue: string | number;
102
102
  placeholder: string;
103
103
  state: "default" | "error" | "valid" | "incomplete" | "completed";
104
104
  readonly: boolean;
@@ -137,9 +137,9 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
137
137
  options: DropDownOption[];
138
138
  clearable: boolean;
139
139
  maxHeight: string;
140
+ maxVisibleChips: number;
140
141
  compact: boolean;
141
142
  chipsPosition: "inside" | "outside";
142
- maxVisibleChips: number;
143
143
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
144
144
  triggerRef: HTMLButtonElement;
145
145
  chipsScrollRef: HTMLDivElement;
@@ -171,7 +171,7 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
171
171
  required: boolean;
172
172
  disabled: boolean;
173
173
  iconPosition: "left" | "right";
174
- modelValue: string;
174
+ modelValue: string | number;
175
175
  placeholder: string;
176
176
  state: "default" | "error" | "valid" | "incomplete" | "completed";
177
177
  readonly: boolean;
@@ -207,7 +207,7 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
207
207
  required: boolean;
208
208
  disabled: boolean;
209
209
  iconPosition: "left" | "right";
210
- modelValue: string;
210
+ modelValue: string | number;
211
211
  placeholder: string;
212
212
  state: "default" | "error" | "valid" | "incomplete" | "completed";
213
213
  readonly: boolean;
@@ -246,9 +246,9 @@ declare const _default: DefineComponent<InputPhoneProps, {}, {}, {}, {}, Compone
246
246
  options: DropDownOption[];
247
247
  clearable: boolean;
248
248
  maxHeight: string;
249
+ maxVisibleChips: number;
249
250
  compact: boolean;
250
251
  chipsPosition: "inside" | "outside";
251
- maxVisibleChips: number;
252
252
  }> | null;
253
253
  }, HTMLDivElement>;
254
254
  export default _default;
@@ -172,7 +172,7 @@ declare function __VLS_template(): {
172
172
  required: boolean;
173
173
  disabled: boolean;
174
174
  iconPosition: "left" | "right";
175
- modelValue: string;
175
+ modelValue: string | number;
176
176
  placeholder: string;
177
177
  state: "default" | "error" | "valid" | "incomplete" | "completed";
178
178
  readonly: boolean;
@@ -208,7 +208,7 @@ declare function __VLS_template(): {
208
208
  required: boolean;
209
209
  disabled: boolean;
210
210
  iconPosition: "left" | "right";
211
- modelValue: string;
211
+ modelValue: string | number;
212
212
  placeholder: string;
213
213
  state: "default" | "error" | "valid" | "incomplete" | "completed";
214
214
  readonly: boolean;
@@ -280,7 +280,7 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
280
280
  required: boolean;
281
281
  disabled: boolean;
282
282
  iconPosition: "left" | "right";
283
- modelValue: string;
283
+ modelValue: string | number;
284
284
  placeholder: string;
285
285
  state: "default" | "error" | "valid" | "incomplete" | "completed";
286
286
  readonly: boolean;
@@ -316,7 +316,7 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
316
316
  required: boolean;
317
317
  disabled: boolean;
318
318
  iconPosition: "left" | "right";
319
- modelValue: string;
319
+ modelValue: string | number;
320
320
  placeholder: string;
321
321
  state: "default" | "error" | "valid" | "incomplete" | "completed";
322
322
  readonly: boolean;
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  /** Affiche l'input/dropdown de recherche (contenu FilterCell). Contrôlé par table.searchable && column.searchable */
8
8
  searchable: boolean;
9
9
  filters: Record<string, any>;
10
+ language: string;
10
11
  };
11
12
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
12
13
  "apply-filter": (val: Record<string, any>) => any;
@@ -1,4 +1,4 @@
1
1
  export { default as Table } from './Table';
2
2
  export { default as TableEmptyState } from './TableEmptyState';
3
- export type { TableProps, ColumnType, CellProps, CellEditorProps, CellContent, MatchMode, TableRequestData, SortConfig, ColumnOrder, ErrorType, ValidationValue, TableRowData, TextImageContentType, TagContentType, PriceContentType, DateContentType, DateRangeContentType, DropdownContentType, ProgressBarContentType, ActionsContentType, ActionContentType, ToggleContentType, TableEmptyStateProps } from './types';
3
+ export type { TableProps, ColumnType, CellProps, CellEditorProps, CellContent, MatchMode, TableRequestData, SortConfig, ColumnOrder, ErrorType, ValidationValue, TableRowData, TextImageContentType, TagContentType, PriceContentType, DateContentType, DateRangeContentType, DropdownContentType, ProgressBarContentType, ActionsContentType, ActionContentType, ToggleContentType, TableEmptyStateProps, FilterContent, TextFilterContentType, SelectFilterContentType, DateFilterContentType, DateRangeFilterContentType, RangeFilterContentType, HourFilterContentType } from './types';
4
4
  export { CellContentType, CellFilterType } from './types';
@@ -3,6 +3,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  type __VLS_Props = {
4
4
  column: ColumnType;
5
5
  modelValue: Date | string | null | undefined;
6
+ language: 'fr' | 'en';
6
7
  };
7
8
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
8
9
  "update:modelValue": (value: string) => any;
@@ -3,6 +3,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  type __VLS_Props = {
4
4
  column: ColumnType;
5
5
  modelValue: (string | null)[] | null;
6
+ language: 'fr' | 'en';
6
7
  };
7
8
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
8
9
  "update:modelValue": (val: (string | null)[] | null) => any;
@@ -2,8 +2,11 @@ import { IconSize } from '../../atoms/Icon/types';
2
2
  import { TextSize, TextWeight } from '../../atoms/Text/types';
3
3
  import { DropDownOption } from '../../molecules/DropDown/types';
4
4
  import { DataTableFilterMeta } from 'primevue/datatable';
5
- import { ButtonVariant, ButtonSize } from '../../atoms/Button/types';
5
+ import { ButtonSize, ButtonAspect, ButtonColor } from '../../atoms/Button/types';
6
+ import { Currency } from '../../atoms';
6
7
  import { ChipSize, ChipVariant } from '../../atoms/Chip/types';
8
+ /** Clé d’injection pour que les cellules éditeur déclenchent update:columnData au Enter. */
9
+ export declare const TABLE_REQUEST_CELL_EDIT_COMPLETE: symbol;
7
10
  export type ColumnFilterMatchModeOptions = Record<string, string>;
8
11
  export declare enum CellFilterType {
9
12
  TEXT = "text",
@@ -14,7 +17,8 @@ export declare enum CellFilterType {
14
17
  SELECT = "select",
15
18
  EMAIL = "email",
16
19
  NUMBER = "number",
17
- BUDGET = "budget",
20
+ /** Filtre plage numérique (min–max). Préférer RANGE. */
21
+ RANGE = "range",
18
22
  HOUR = "hour"
19
23
  }
20
24
  export declare enum CellContentType {
@@ -29,15 +33,65 @@ export declare enum CellContentType {
29
33
  TOGGLE = "toggle",
30
34
  PROGRESS_BAR = "progressBar",
31
35
  ACTIONS = "actions",
32
- CUSTOM = "custom",
33
- BUDGET = "budget"
36
+ CUSTOM = "custom"
34
37
  }
35
38
  export type CellContent = TextImageContentType | DateContentType | DateRangeContentType | PriceContentType | TagContentType | DropdownContentType | ProgressBarContentType | ActionsContentType | ToggleContentType;
39
+ export interface TextFilterContentType {
40
+ placeholder?: string;
41
+ /** Type d'input HTML (ex. 'text', 'number'). Déduit du filterType si non fourni. */
42
+ type?: 'text' | 'number';
43
+ /** Délai en ms avant d'appliquer le filtre (debounce). Override du défaut (ex. 300). 0 = pas de debounce. */
44
+ inputTimeoutMs?: number;
45
+ }
46
+ export interface SelectFilterContentType {
47
+ options?: DropDownOption[];
48
+ placeholder?: string;
49
+ searchable?: boolean;
50
+ clearable?: boolean;
51
+ maxHeight?: string;
52
+ /** Nombre de chips visibles en multi-select (défaut 2). */
53
+ maxVisibleChips?: number;
54
+ }
55
+ export interface DateFilterContentType {
56
+ enableTime?: boolean;
57
+ placeholder?: string;
58
+ /** Date minimale sélectionnable (ISO string ou Date). */
59
+ minDate?: string | Date;
60
+ /** Date maximale sélectionnable (ISO string ou Date). */
61
+ maxDate?: string | Date;
62
+ }
63
+ export interface DateRangeFilterContentType {
64
+ /** Label du DropFilter (ex. "Période") */
65
+ title?: string;
66
+ fromLabel?: string;
67
+ toLabel?: string;
68
+ }
69
+ export interface RangeFilterContentType {
70
+ /** Label du DropFilter (ex. "Valeurs", "Budget") */
71
+ title?: string;
72
+ rangeTitle?: string;
73
+ minLabel?: string;
74
+ maxLabel?: string;
75
+ min?: number;
76
+ max?: number;
77
+ /** Devise pour FilterPrice (ex. '€', '£'). Défaut '€'. */
78
+ currency?: Currency;
79
+ }
80
+ export interface HourFilterContentType {
81
+ placeholder?: string;
82
+ /** Longueur max de l'input (ex. 5 pour "HH:mm"). Défaut 5. */
83
+ maxlength?: number;
84
+ /** Délai en ms avant d'appliquer le filtre (debounce). Override du défaut. 0 = pas de debounce. */
85
+ inputTimeoutMs?: number;
86
+ }
87
+ export type FilterContent = TextFilterContentType | SelectFilterContentType | DateFilterContentType | DateRangeFilterContentType | RangeFilterContentType | HourFilterContentType;
36
88
  export interface ColumnType {
37
89
  columnKey: string;
38
90
  label: string;
39
91
  content: CellContent;
40
92
  contentType: CellContentType;
93
+ /** Config du filtre (FilterCell.vue). Dépend de filterType. À utiliser au lieu de content dans les cellules de filtre. */
94
+ filterContent?: FilterContent;
41
95
  filterType?: CellFilterType;
42
96
  field?: string | ((item: string) => string | number | boolean | null | undefined);
43
97
  /**
@@ -536,11 +590,12 @@ export interface PriceContentType {
536
590
  size?: TextSize;
537
591
  weight?: TextWeight;
538
592
  color?: string;
539
- /** Labels pour le filtre Budget quand filterType === BUDGET */
540
- budgetTitle?: string;
541
- budgetMinLabel?: string;
542
- budgetMaxLabel?: string;
543
- budgetMax?: number;
593
+ /** Labels pour le filtre Range (fallback si filterContent non défini) */
594
+ title?: string;
595
+ rangeTitle?: string;
596
+ rangeMinLabel?: string;
597
+ rangeMaxLabel?: string;
598
+ rangeMax?: number;
544
599
  }
545
600
  export interface DateContentType {
546
601
  key: string;
@@ -593,11 +648,12 @@ export interface ProgressBarContentType {
593
648
  hideMax?: boolean;
594
649
  showPercentage?: boolean;
595
650
  loading?: boolean;
596
- /** Labels pour le filtre Budget quand filterType === BUDGET */
597
- budgetTitle?: string;
598
- budgetMinLabel?: string;
599
- budgetMaxLabel?: string;
600
- budgetMax?: number;
651
+ /** Labels pour le filtre Range (fallback si filterContent non défini) */
652
+ title?: string;
653
+ rangeTitle?: string;
654
+ rangeMinLabel?: string;
655
+ rangeMaxLabel?: string;
656
+ rangeMax?: number;
601
657
  }
602
658
  export interface ActionsContentType {
603
659
  key: string;
@@ -606,9 +662,9 @@ export interface ActionsContentType {
606
662
  export interface ActionContentType {
607
663
  key: string;
608
664
  icon?: string;
609
- color?: string;
610
665
  size?: ButtonSize;
611
- variant?: ButtonVariant;
666
+ color?: ButtonColor;
667
+ aspect?: ButtonAspect;
612
668
  disabled?: boolean;
613
669
  loading?: boolean;
614
670
  actionName?: string;
package/dist/index.d.ts CHANGED
@@ -73,7 +73,7 @@ export type { PageNavigationProps } from './components/organisms/PageNavigation/
73
73
  export type { ProductCardProps } from './components/organisms/ProductCard/types';
74
74
  export type { ProductSummaryProps, ProductSummaryTitles, ProductSummaryPrice, ProductSummaryAmount, ProductSummaryQuantity, ProductSummarySubvention, ProductSummaryButton, ProductSummaryTips, ProductSummaryValidity, ProductSummaryAdditionalInfo } from './components/organisms/ProductSummary/types';
75
75
  export { CellContentType, CellFilterType } from './components/organisms/Table';
76
- export type { CellContent, CellProps, ColumnOrder, ColumnType, MatchMode, SortConfig, TableProps, TableRequestData, TableEmptyStateProps } from './components/organisms/Table/types';
76
+ export type { CellContent, CellProps, ColumnOrder, ColumnType, MatchMode, SortConfig, TableProps, TableRequestData, TableEmptyStateProps, FilterContent, TextFilterContentType, SelectFilterContentType, DateFilterContentType, DateRangeFilterContentType, RangeFilterContentType, HourFilterContentType } from './components/organisms/Table/types';
77
77
  export type { TransactionProps } from './components/organisms/Transaction/types';
78
78
  export type { CarousselProps } from './components/organisms/Caroussel/types';
79
79
  export type { MetricCardProps, MetricCardGroupProps } from './components/organisms';