@davincihealthcare/elty-design-system-vue 1.50.1 → 1.52.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.
@@ -8,60 +8,69 @@ export type MobileTableFiltersStatus = {
8
8
  freeSearch?: string;
9
9
  fromDate?: number;
10
10
  multiSelect: {
11
- mainText?: string[];
12
- secondaryRow?: string[];
13
- tertiaryRow?: string[];
14
- tags?: string[];
15
- time?: string[];
16
- amount?: string[];
17
- avatar?: string[];
11
+ mainText?: string;
12
+ secondaryRow?: string;
13
+ tertiaryRow?: string;
14
+ tags?: string;
15
+ time?: string;
16
+ amount?: string;
17
+ avatar?: string;
18
18
  };
19
19
  };
20
20
  export type MobileTableFilter = {
21
21
  freeSearch?: {
22
22
  placeholder?: string;
23
23
  filterOn: ('mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'tags' | 'time' | 'avatar')[];
24
+ initialValue?: string;
24
25
  };
25
26
  multiValue?: {
26
27
  mainText?: {
27
28
  enabled: boolean;
28
29
  label: string;
29
30
  selectOptions?: SelectOptions;
31
+ initialValue?: string;
30
32
  };
31
33
  secondaryRow?: {
32
34
  enabled: boolean;
33
35
  label: string;
34
36
  selectOptions?: SelectOptions;
37
+ initialValue?: string;
35
38
  };
36
39
  tertiaryRow?: {
37
40
  enabled: boolean;
38
41
  label: string;
39
42
  selectOptions?: SelectOptions;
43
+ initialValue?: string;
40
44
  };
41
45
  amount?: {
42
46
  enabled: boolean;
43
47
  label: string;
44
48
  selectOptions?: SelectOptions;
49
+ initialValue?: string;
45
50
  };
46
51
  tags?: {
47
52
  enabled: boolean;
48
53
  label: string;
49
54
  selectOptions?: SelectOptions;
55
+ initialValue?: string;
50
56
  };
51
57
  time?: {
52
58
  enabled: boolean;
53
59
  label: string;
54
60
  selectOptions?: SelectOptions;
61
+ initialValue?: string;
55
62
  };
56
63
  avatar?: {
57
64
  enabled: boolean;
58
65
  label: string;
59
66
  selectOptions?: SelectOptions;
67
+ initialValue?: string;
60
68
  };
61
69
  };
62
70
  dateRange?: {
63
71
  enabled: boolean;
64
72
  label: string;
73
+ initialValue?: number;
65
74
  };
66
75
  resetButton?: boolean;
67
76
  managed?: boolean;
@@ -96,6 +105,7 @@ export interface ElMobileTableProps {
96
105
  color: 'primary' | 'secondary';
97
106
  filters: MobileTableFilter;
98
107
  loading?: boolean;
108
+ preventDefaultItemClick?: boolean;
99
109
  selection?: {
100
110
  enabled: boolean;
101
111
  selectionMode?: 'single' | 'multiple';
@@ -130,6 +140,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
130
140
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
131
141
  "destructive:click": (selectedItems: MobileTableRow[]) => void;
132
142
  "bulk:click": (selectedItems: MobileTableRow[]) => void;
143
+ "item:click": (item: MobileTableRow) => void;
133
144
  "selection:exit": () => void;
134
145
  "rows-selected": (selectedItems: MobileTableRow[]) => void;
135
146
  "filters-updated": (filters: MobileTableFiltersStatus) => void;
@@ -137,6 +148,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
137
148
  "onRows-selected"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
138
149
  "onDestructive:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
139
150
  "onBulk:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined;
151
+ "onItem:click"?: ((item: MobileTableRow) => any) | undefined;
140
152
  "onSelection:exit"?: (() => any) | undefined;
141
153
  "onFilters-updated"?: ((filters: MobileTableFiltersStatus) => any) | undefined;
142
154
  }, {}, {}>;
@@ -1,3 +1,4 @@
1
+ import { ElInputSelect } from '..';
1
2
  import { DefaultCell } from './ElTableCell.vue';
2
3
  import { default as ElDropdown } from '../ElDropdown.vue';
3
4
  import { default as ElIconButton } from '../ElIconButton.vue';
@@ -42,8 +43,8 @@ export type ResponsiveActionDataCell = {
42
43
  iconButtons?: InstanceType<typeof ElIconButton>['$props'][];
43
44
  dropdown?: InstanceType<typeof ElDropdown>['$props'];
44
45
  mobileBehaviour?: {
45
- primary: number;
46
- secondary?: number;
46
+ primary: InstanceType<typeof ElButton>['$props'];
47
+ secondary?: InstanceType<typeof ElButton>['$props'];
47
48
  };
48
49
  };
49
50
  export type ResponsiveDataRow<T = any> = {
@@ -58,8 +59,15 @@ export type ResponsiveDataRow<T = any> = {
58
59
  export type ResponsiveTableColumn = {
59
60
  title: string;
60
61
  filter?: {
61
- type: FilterType;
62
- placeholder?: string;
62
+ type: Extract<FilterType, 'FREE_SEARCH'>;
63
+ initialValue?: string;
64
+ } | {
65
+ type: Extract<FilterType, 'DATE_RANGE'>;
66
+ initialValue?: number;
67
+ } | {
68
+ type: Extract<FilterType, 'MULTI_VALUE'>;
69
+ selectOptions: InstanceType<typeof ElInputSelect>['$props']['options'];
70
+ initialValue?: string;
63
71
  mobileBehaviour?: {
64
72
  /**
65
73
  * Used only if filter type === 'MULTI_VALUE' and column.mobileBehaviour.position is an array
@@ -101,7 +109,7 @@ export interface ElResponsiveTableProps {
101
109
  noFooter?: boolean;
102
110
  initialRows?: number;
103
111
  };
104
- mobileBehaviour?: {
112
+ mobileBehaviour?: Pick<ElMobileTableProps, 'preventDefaultItemClick'> & {
105
113
  selection?: Pick<NonNullable<ElMobileTableProps['selection']>, 'destructiveAction' | 'bulkActionButton' | 'selectedLabel' | 'cancelText'>;
106
114
  };
107
115
  }
@@ -116,11 +124,13 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
116
124
  "mobile:bulk:click": (rows: ResponsiveDataRow<any>[]) => void;
117
125
  "mobile:destructive:click": (rows: ResponsiveDataRow<any>[]) => void;
118
126
  "mobile:selection:exit": () => void;
127
+ "mobile:item:click": (row: ResponsiveDataRow<any>) => void;
119
128
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElResponsiveTableProps>>> & {
120
129
  "onRows-selected"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
121
130
  "onMobile:bulk:click"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
122
131
  "onMobile:destructive:click"?: ((rows: ResponsiveDataRow<any>[]) => any) | undefined;
123
132
  "onMobile:selection:exit"?: (() => any) | undefined;
133
+ "onMobile:item:click"?: ((row: ResponsiveDataRow<any>) => any) | undefined;
124
134
  }, {}, {}>, {
125
135
  mobile?(_: {}): any;
126
136
  }>;
@@ -5,7 +5,7 @@ export type MobileDataControls = Pick<DataControls, 'paginationStatus'> & {
5
5
  triggeredEvent: 'paginate' | 'filter' | 'firstLoad';
6
6
  filterStatus: MobileTableFiltersStatus;
7
7
  };
8
- export type ElServerSideMobileTableProps = Pick<ElMobileTableProps, 'selection' | 'color'> & {
8
+ export type ElServerSideMobileTableProps = Pick<ElMobileTableProps, 'selection' | 'color' | 'preventDefaultItemClick'> & {
9
9
  filters?: {
10
10
  freeSearch?: Omit<NonNullable<MobileTableFilter['freeSearch']>, 'filterOn'>;
11
11
  } & Pick<MobileTableFilter, 'dateRange' | 'multiValue' | 'resetButton'>;
@@ -23,10 +23,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
23
23
  "destructive:click": (rows: MobileTableRow[]) => void;
24
24
  "selection:exit": () => void;
25
25
  "rows-selected": (rows: MobileTableRow[]) => void;
26
+ "item:click": (row: MobileTableRow) => void;
26
27
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElServerSideMobileTableProps>>> & {
27
28
  "onRows-selected"?: ((rows: MobileTableRow[]) => any) | undefined;
28
29
  "onDestructive:click"?: ((rows: MobileTableRow[]) => any) | undefined;
29
30
  "onBulk:click"?: ((rows: MobileTableRow[]) => any) | undefined;
31
+ "onItem:click"?: ((row: MobileTableRow) => any) | undefined;
30
32
  "onSelection:exit"?: (() => any) | undefined;
31
33
  }, {}, {}>, {
32
34
  default?(_: {}): any;
@@ -1,23 +1,10 @@
1
1
  import { MobileTableFiltersStatus } from './ElMobileTable.vue';
2
- import { FilterType } from './commonTypes';
3
- import { default as ElInputSelect } from '../forms/ElInputSelect.vue';
4
2
  import { DataControls, TableColumn } from './ElServerSideTable.vue';
5
3
  import { ElResponsiveTableProps, ResponsiveTableColumn, ResponsiveDataRow } from './ElResponsiveTable.vue';
6
4
 
7
5
  export type ResponsiveServerSideTableColumn = Pick<TableColumn, 'title'> & {
8
6
  desktopBehaviour?: Pick<TableColumn, 'alignRight' | 'noSort'>;
9
- filter?: {
10
- type: Exclude<FilterType, 'MULTI_VALUE'>;
11
- placeholder?: string;
12
- } | {
13
- type: Extract<FilterType, 'MULTI_VALUE'>;
14
- selectOptions: InstanceType<typeof ElInputSelect>['$props']['options'];
15
- mobileBehaviour?: {
16
- position?: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'time' | 'tags' | 'avatar';
17
- };
18
- } | {
19
- type: 'RESET_FILTERS_BUTTON';
20
- };
7
+ filter?: ResponsiveTableColumn['filter'];
21
8
  } & Pick<ResponsiveTableColumn, 'mobileBehaviour'>;
22
9
  export type ResponsiveDataControls = Pick<DataControls, 'paginationStatus' | 'filterStatus' | 'triggeredEvent'> & ({
23
10
  tableType: 'desktop';
@@ -43,11 +30,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
43
30
  "mobile:bulk:click": (rows: ResponsiveDataRow[]) => void;
44
31
  "mobile:destructive:click": (rows: ResponsiveDataRow[]) => void;
45
32
  "mobile:selection:exit": () => void;
33
+ "mobile:item:click": (row: ResponsiveDataRow) => void;
46
34
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElServerSideResponsiveTableProps>>> & {
47
35
  "onRows-selected"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
48
36
  "onMobile:bulk:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
49
37
  "onMobile:destructive:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
50
38
  "onMobile:selection:exit"?: (() => any) | undefined;
39
+ "onMobile:item:click"?: ((row: ResponsiveDataRow) => any) | undefined;
51
40
  }, {}, {}>;
52
41
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
53
42
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davincihealthcare/elty-design-system-vue",
3
- "version": "1.50.1",
3
+ "version": "1.52.0",
4
4
  "license": "UNLICENSED",
5
5
  "main": "dist/index.umd.cjs",
6
6
  "types": "dist/index.d.ts",