@selfeesas/shared-components 0.3.8 → 0.3.9

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.
@@ -24,10 +24,9 @@ declare const __VLS_component_3: DefineComponent<CustomTableProps, {}, {}, {}, {
24
24
  filter: string;
25
25
  loading: boolean;
26
26
  rowKey: string;
27
- isAffaire: boolean;
28
27
  services: CustomTableServices;
29
28
  conditionals: CustomTableConditionals;
30
- showActionsColumn: boolean;
29
+ actions: TableAction[] | ((row: any) => TableAction[]);
31
30
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
32
31
 
33
32
  declare type __VLS_Props = CheckboxFilterProps & {
@@ -89,18 +88,6 @@ declare function __VLS_template_3(): {
89
88
  col: any;
90
89
  value: any;
91
90
  }): any;
92
- 'cell-append'?(_: {
93
- row: any;
94
- col: any;
95
- }): any;
96
- actions?(_: {
97
- row: any;
98
- handleMove: () => void | undefined;
99
- handleArchive: () => void;
100
- handleUnarchive: () => void;
101
- handleEdit: () => void | undefined;
102
- handleCancel: () => void | undefined;
103
- }): any;
104
91
  expanded?(_: {
105
92
  row: any;
106
93
  }): any;
@@ -220,11 +207,6 @@ export declare const CustomTable: __VLS_WithTemplateSlots_3<typeof __VLS_compone
220
207
 
221
208
  declare interface CustomTableConditionals {
222
209
  shouldShowExpandButton?: (row: any) => boolean;
223
- shouldShowMoveButton?: (rowKey: string) => boolean;
224
- shouldShowArchiveButton?: (row: any) => boolean;
225
- shouldShowUnarchiveButton?: (row: any) => boolean;
226
- shouldShowCancelButton?: (row: any, rowKey: string) => boolean;
227
- isCancelButtonDisabled?: (row: any) => boolean;
228
210
  }
229
211
 
230
212
  declare interface CustomTableProps {
@@ -234,16 +216,10 @@ declare interface CustomTableProps {
234
216
  pagination: Pagination;
235
217
  loading?: boolean;
236
218
  onRequest?: (props: TableRequestProps) => void;
237
- onEdit?: (row: any) => void;
238
- onCancel?: (row: any) => void;
239
- onMove?: (row: any) => void;
240
219
  rowKey?: string;
241
- onArchive?: (row: any) => void;
242
- onUnarchive?: (row: any) => void;
243
- isAffaire?: boolean;
244
220
  services?: CustomTableServices;
245
221
  conditionals?: CustomTableConditionals;
246
- showActionsColumn?: boolean;
222
+ actions?: TableAction[] | ((row: any) => TableAction[]);
247
223
  }
248
224
 
249
225
  declare interface CustomTableServices {
@@ -453,6 +429,24 @@ export declare interface Store {
453
429
  [key: string]: any;
454
430
  }
455
431
 
432
+ declare interface TableAction {
433
+ id: string;
434
+ label?: string;
435
+ icon?: string;
436
+ color?: string;
437
+ size?: string;
438
+ class?: string;
439
+ disabled?: boolean | ((row: any) => boolean);
440
+ visible?: boolean | ((row: any) => boolean);
441
+ handler: (row: any) => void;
442
+ isButton?: boolean;
443
+ buttonProps?: Record<string, any>;
444
+ position?: "row" | "cell" | "both";
445
+ columnName?: string;
446
+ testId?: string | ((row: any) => string);
447
+ isCancel?: boolean;
448
+ }
449
+
456
450
  declare interface TableColumn {
457
451
  name: string;
458
452
  label: string;