quasar-ui-danx 0.4.4 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +5823 -5792
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +7 -11
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ActionTable/ActionTable.vue +2 -2
- package/src/components/ActionTable/Form/Fields/SelectField.vue +7 -0
- package/src/components/ActionTable/Form/Fields/TextField.vue +10 -18
- package/src/components/ActionTable/Layouts/ActionTableLayout.vue +1 -0
- package/src/components/ActionTable/TableSummaryRow.vue +56 -52
- package/src/components/ActionTable/listControls.ts +67 -41
- package/src/helpers/app.ts +20 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/request.ts +72 -26
- package/src/helpers/routes.ts +8 -8
- package/src/styles/quasar-reset.scss +1 -1
- package/src/types/controls.d.ts +25 -8
- package/src/types/requests.d.ts +21 -1
- package/tsconfig.json +0 -1
package/src/types/controls.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ComputedRef, Ref, ShallowRef } from "vue";
|
2
|
+
import { Router } from "vue-router";
|
2
3
|
import { ActionTargetItem } from "./actions";
|
3
|
-
import { LabelValueItem } from "./shared";
|
4
|
+
import { AnyObject, LabelValueItem } from "./shared";
|
4
5
|
|
5
6
|
export interface ListControlsFilter {
|
6
7
|
[key: string]: object | object[] | null | undefined | string | number | boolean;
|
@@ -20,13 +21,23 @@ export interface FilterGroup {
|
|
20
21
|
fields: FilterableField[];
|
21
22
|
}
|
22
23
|
|
24
|
+
|
23
25
|
export interface ListControlsRoutes {
|
24
|
-
list
|
25
|
-
|
26
|
-
summary
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
list(pager?: ListControlsPagination): Promise<ActionTargetItem[]>;
|
27
|
+
|
28
|
+
summary?(filter?: ListControlsFilter): Promise<object>;
|
29
|
+
|
30
|
+
details?(target: ActionTargetItem): Promise<ActionTargetItem>;
|
31
|
+
|
32
|
+
more?(pager: ListControlsPagination): Promise<ActionTargetItem[]>;
|
33
|
+
|
34
|
+
fieldOptions?(filter?: AnyObject): Promise<object>;
|
35
|
+
|
36
|
+
applyAction?(action: string, target: ActionTargetItem | null, data: object): Promise<object>;
|
37
|
+
|
38
|
+
batchAction?(action: string, targets: ActionTargetItem[], data: object): Promise<object>;
|
39
|
+
|
40
|
+
export?(filter?: ListControlsFilter, name?: string): Promise<void>;
|
30
41
|
}
|
31
42
|
|
32
43
|
export interface ListControlsOptions {
|
@@ -44,6 +55,8 @@ export interface ListControlsPagination {
|
|
44
55
|
page?: number;
|
45
56
|
rowsNumber?: number;
|
46
57
|
rowsPerPage?: number;
|
58
|
+
perPage?: number;
|
59
|
+
filter?: ListControlsFilter;
|
47
60
|
}
|
48
61
|
|
49
62
|
export interface PagedItems {
|
@@ -54,6 +67,10 @@ export interface PagedItems {
|
|
54
67
|
} | undefined;
|
55
68
|
}
|
56
69
|
|
70
|
+
export interface ListControlsInitializeOptions {
|
71
|
+
vueRouter?: Router;
|
72
|
+
}
|
73
|
+
|
57
74
|
export interface ActionController {
|
58
75
|
name: string;
|
59
76
|
label: string;
|
@@ -78,7 +95,7 @@ export interface ActionController {
|
|
78
95
|
activePanel: ShallowRef<string | null>;
|
79
96
|
|
80
97
|
// Actions
|
81
|
-
initialize: () => void;
|
98
|
+
initialize: (options: ListControlsInitializeOptions) => void;
|
82
99
|
resetPaging: () => void;
|
83
100
|
setPagination: (updated: ListControlsPagination) => void;
|
84
101
|
setSelectedRows: (selection: ActionTargetItem[]) => void;
|
package/src/types/requests.d.ts
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
import { AnyObject } from "src/types/shared";
|
2
|
+
|
3
|
+
export interface RequestApi {
|
4
|
+
abortControllers: { [key: string]: { abort: AbortController, timestamp: number } };
|
5
|
+
|
6
|
+
url(url: string): string;
|
7
|
+
|
8
|
+
call(url: string, options?: RequestCallOptions): Promise<any>;
|
9
|
+
|
10
|
+
get(url: string, options?: RequestCallOptions): Promise<any>;
|
11
|
+
|
12
|
+
post(url: string, data?: object, options?: RequestCallOptions): Promise<any>;
|
13
|
+
}
|
14
|
+
|
1
15
|
export interface HttpResponse {
|
2
16
|
headers: any;
|
3
17
|
data?: any;
|
@@ -8,6 +22,12 @@ export interface HttpResponse {
|
|
8
22
|
|
9
23
|
export interface RequestOptions {
|
10
24
|
baseUrl?: string;
|
11
|
-
headers?:
|
25
|
+
headers?: AnyObject;
|
12
26
|
onUnauthorized?: (response) => object;
|
27
|
+
onAppVersionMismatch?: (version) => void;
|
13
28
|
}
|
29
|
+
|
30
|
+
export interface RequestCallOptions extends RequestInit {
|
31
|
+
abortOn?: string;
|
32
|
+
}
|
33
|
+
|