Skip to content

Commit 4969fe9

Browse files
Merge pull request #36 from webdevnerdstuff/dev
Dev
2 parents dc81e26 + 678b2f8 commit 4969fe9

22 files changed

+2464
-2104
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Change Log
22
All notable changes to the "vuetify-drilldown-table" plugin will be documented in this file.
33

4+
## v1.0.0-beta-4
5+
06-22-23
6+
[main] (@webdevnerdstuff)
7+
* Added match column widths functionality
8+
* Updating Playground examples
9+
* Update documentation
10+
* Cleaning up
11+
412
## v1.0.0-beta-3
513
06-20-23
614
[main] (@webdevnerdstuff)

dist/plugin/composables/helpers.d.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Column, Props } from '../../types';
1+
import { Column, UseGetSortDirection, UseConvertToUnit } from '../../types';
22
/**
33
* Get's the sort direction for a column
44
*/
5-
export declare function useGetSortDirection(sortBy: Props['sortBy'], id: string): string | boolean | void;
5+
export declare const useGetSortDirection: UseGetSortDirection;
66
/**
77
* Converts a string to a number with a unit.
88
*/
9-
export declare function useConvertToUnit(str: string | number, unit?: string): string | void;
9+
export declare const useConvertToUnit: UseConvertToUnit;
1010
/**
1111
* Render the cell item
1212
*/
@@ -20,7 +20,3 @@ export declare function useRenderCell(column: Column): unknown;
2020
* Deep merge objects.
2121
*/
2222
export declare function useMergeDeep(target: object | object[], ...sources: object[]): object;
23-
/**
24-
* Debugging Log Helper
25-
*/
26-
export declare function useLogHelper(options: any): void;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
import { UseSetLoadedDrilldown } from '../../types';
1+
import { UseGetHeaderColumnWidths, UseSetLoadedDrilldown } from '../../types';
2+
export declare const useGetHeaderColumnWidths: UseGetHeaderColumnWidths;
23
export declare const useSetLoadedDrilldown: UseSetLoadedDrilldown;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* ? Vuetify Helpers
3+
* ? Credits:
4+
* https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/util/helpers.ts
5+
* http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621
6+
*
7+
*/
8+
export declare function getNestedValue(obj: object, path: any, fallback?: string): any;
9+
export declare function getObjectValueByPath(obj: object, path: string, fallback?: string): any;
10+
export declare function useGetPropertyFromItem(item: any, property: any, fallback?: string): any;

dist/plugin/slots/HeadersSlot.vue.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { PropType as __PropType } from 'vue';
22
import { ColorsObject, Column, InternalDataTableHeader } from '../../types';
33
declare const _sfc_main: import("vue").DefineComponent<{
4+
columnWidths: {
5+
type: __PropType<number[] | undefined>;
6+
required: true;
7+
};
48
isTheadSlot: {
59
type: __PropType<boolean | undefined>;
610
required: false;
@@ -23,6 +27,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
2327
}>;
2428
required: true;
2529
};
30+
matchColumnWidths: {
31+
type: __PropType<boolean | undefined>;
32+
required: true;
33+
};
2634
selectStrategy: {
2735
type: __PropType<"page" | "all" | "single" | undefined>;
2836
required: true;
@@ -77,6 +85,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
7785
required: true;
7886
};
7987
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click:selectAll"[], "click:selectAll", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
88+
columnWidths: {
89+
type: __PropType<number[] | undefined>;
90+
required: true;
91+
};
8092
isTheadSlot: {
8193
type: __PropType<boolean | undefined>;
8294
required: false;
@@ -99,6 +111,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
99111
}>;
100112
required: true;
101113
};
114+
matchColumnWidths: {
115+
type: __PropType<boolean | undefined>;
116+
required: true;
117+
};
102118
selectStrategy: {
103119
type: __PropType<"page" | "all" | "single" | undefined>;
104120
required: true;

dist/plugin/utils/props.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export declare const AllProps: {
2929
readonly percentageChange: 25;
3030
readonly percentageDirection: "desc";
3131
};
32+
columnWidths: () => never[];
3233
density: string;
3334
drilldownKey: string;
3435
elevation: number;
@@ -52,10 +53,12 @@ export declare const AllProps: {
5253
loaderType: string;
5354
loading: boolean;
5455
loadingText: string;
56+
matchColumnWidths: boolean;
5557
multiSort: boolean;
5658
noDataText: string;
5759
noFilter: boolean;
5860
page: number;
61+
returnObject: boolean;
5962
search: string;
6063
searchDebounce: number;
6164
searchMaxWait: number;
@@ -72,6 +75,7 @@ export declare const AllProps: {
7275
readonly variant: "underlined";
7376
};
7477
selectStrategy: "page";
78+
separator: "default";
7579
server: boolean;
7680
showDrilldownWhenLoading: boolean;
7781
showExpand: boolean;

dist/scss/main.scss

+155
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:root {
2+
--vdt-border: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
3+
}
4+
15
%hover-children {
26
.v-table__wrapper {
37
table {
@@ -60,9 +64,160 @@
6064
}
6165
}
6266

67+
&--separator {
68+
&-horizontal {
69+
thead {
70+
tr {
71+
th {
72+
border-top: var(--vdt-border) !important;
73+
}
74+
}
75+
}
76+
77+
tbody {
78+
> tr {
79+
&:last-child {
80+
> th,
81+
> td {
82+
border-bottom: var(--vdt-border) !important;
83+
}
84+
}
85+
}
86+
}
87+
88+
tfoot {
89+
tr {
90+
> th,
91+
> td {
92+
border-top: 0 !important;
93+
border-bottom: var(--vdt-border);
94+
}
95+
}
96+
}
97+
}
98+
99+
&-vertical {
100+
thead {
101+
tr {
102+
th {
103+
border-bottom: 0 !important;
104+
border-top: var(--vdt-border) !important;
105+
106+
&:not(:last-child) {
107+
border-right: var(--vdt-border) !important;
108+
}
109+
110+
&:nth-last-child(2) {
111+
border-right: 0 !important;
112+
}
113+
}
114+
}
115+
}
116+
117+
tbody {
118+
> tr {
119+
> td {
120+
border-bottom: 0 !important;
121+
122+
&:not(:last-child) {
123+
border-right: var(--vdt-border) !important;
124+
}
125+
}
126+
127+
&:first-child {
128+
> td {
129+
border-top: var(--vdt-border) !important;
130+
}
131+
}
132+
133+
&:last-child {
134+
> td {
135+
border-bottom: var(--vdt-border) !important;
136+
}
137+
}
138+
}
139+
}
140+
141+
tfoot {
142+
tr {
143+
th {
144+
border-top: 0 !important;
145+
border-bottom: var(--vdt-border) !important;
146+
147+
&:not(:last-child) {
148+
border-right: var(--vdt-border) !important;
149+
}
150+
151+
&:nth-last-child(2) {
152+
border-right: 0 !important;
153+
}
154+
}
155+
}
156+
}
157+
}
158+
159+
&-cell {
160+
thead {
161+
tr {
162+
th {
163+
border-bottom: 0 !important;
164+
border-top: var(--vdt-border) !important;
165+
166+
&:not(:last-child) {
167+
border-right: var(--vdt-border) !important;
168+
}
169+
}
170+
}
171+
}
172+
173+
tbody {
174+
> tr {
175+
> td {
176+
177+
178+
&:not(:last-child) {
179+
border-right: var(--vdt-border) !important;
180+
}
181+
}
182+
183+
&:first-child {
184+
> td {
185+
border-top: var(--vdt-border) !important;
186+
}
187+
}
188+
189+
&:last-child {
190+
> td {
191+
border-bottom: var(--vdt-border) !important;
192+
}
193+
}
194+
}
195+
}
196+
197+
tfoot {
198+
> tr {
199+
th {
200+
border-top: 0 !important;
201+
border-bottom: var(--vdt-border) !important;
202+
203+
&:not(:last-child) {
204+
border-right: var(--vdt-border) !important;
205+
}
206+
}
207+
}
208+
}
209+
}
210+
}
211+
63212
tbody {
64213
height: 2px;
65214
min-height: 2px;
66215
position: relative;
67216
}
217+
218+
.v-data-table-footer {
219+
border-bottom: var(--vdt-border);
220+
padding-bottom: 4px;
221+
padding-top: 4px;
222+
}
68223
}

0 commit comments

Comments
 (0)