@davincihealthcare/elty-design-system-vue 1.50.0 → 1.51.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;
@@ -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
@@ -0,0 +1,54 @@
1
+ import { MobileTableFiltersStatus } from './ElMobileTable.vue';
2
+ import { DataControls, TableColumn } from './ElServerSideTable.vue';
3
+ import { ElResponsiveTableProps, ResponsiveTableColumn, ResponsiveDataRow } from './ElResponsiveTable.vue';
4
+
5
+ export type ResponsiveServerSideTableColumn = Pick<TableColumn, 'title'> & {
6
+ desktopBehaviour?: Pick<TableColumn, 'alignRight' | 'noSort'>;
7
+ filter?: ResponsiveTableColumn['filter'];
8
+ } & Pick<ResponsiveTableColumn, 'mobileBehaviour'>;
9
+ export type ResponsiveDataControls = Pick<DataControls, 'paginationStatus' | 'filterStatus' | 'triggeredEvent'> & ({
10
+ tableType: 'desktop';
11
+ sortStatus: DataControls['sortStatus'];
12
+ } | {
13
+ tableType: 'mobile';
14
+ mobileFiltersStatus: MobileTableFiltersStatus;
15
+ });
16
+ export type ElServerSideResponsiveTableDataController = (args: ResponsiveDataControls) => Promise<{
17
+ data: ResponsiveDataRow[];
18
+ totalRows: number;
19
+ }>;
20
+ export type ElServerSideResponsiveTableProps = Pick<ElResponsiveTableProps, 'mobileBehaviour' | 'desktopBehaviour' | 'sortBy' | 'color' | 'rowsSelectionMode' | 'rowsSelectionDisabled'> & {
21
+ columns: ResponsiveServerSideTableColumn[];
22
+ dataController: ElServerSideResponsiveTableDataController;
23
+ rowsPerPage?: number;
24
+ };
25
+ declare function __VLS_template(): {
26
+ mobile?(_: {}): any;
27
+ };
28
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<ElServerSideResponsiveTableProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ "rows-selected": (rows: ResponsiveDataRow[]) => void;
30
+ "mobile:bulk:click": (rows: ResponsiveDataRow[]) => void;
31
+ "mobile:destructive:click": (rows: ResponsiveDataRow[]) => void;
32
+ "mobile:selection:exit": () => void;
33
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ElServerSideResponsiveTableProps>>> & {
34
+ "onRows-selected"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
35
+ "onMobile:bulk:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
36
+ "onMobile:destructive:click"?: ((rows: ResponsiveDataRow[]) => any) | undefined;
37
+ "onMobile:selection:exit"?: (() => any) | undefined;
38
+ }, {}, {}>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
40
+ export default _default;
41
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
42
+ type __VLS_TypePropsToRuntimeProps<T> = {
43
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
44
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
45
+ } : {
46
+ type: import('vue').PropType<T[K]>;
47
+ required: true;
48
+ };
49
+ };
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davincihealthcare/elty-design-system-vue",
3
- "version": "1.50.0",
3
+ "version": "1.51.0",
4
4
  "license": "UNLICENSED",
5
5
  "main": "dist/index.umd.cjs",
6
6
  "types": "dist/index.d.ts",