quasar-ui-danx 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +7234 -6741
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +11 -5
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/src/components/ActionTable/ActionTable.vue +31 -43
- package/src/components/ActionTable/Columns/ActionTableColumn.vue +19 -18
- package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +15 -14
- package/src/components/ActionTable/Filters/{FilterFieldList.vue → FilterList.vue} +26 -26
- package/src/components/ActionTable/Filters/FilterableField.vue +28 -31
- package/src/components/ActionTable/Filters/index.ts +2 -2
- package/src/components/ActionTable/Form/Fields/EditOnClickTextField.vue +71 -0
- package/src/components/ActionTable/Form/Fields/FieldLabel.vue +8 -13
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +34 -33
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +48 -44
- package/src/components/ActionTable/Form/Fields/NumberField.vue +60 -59
- package/src/components/ActionTable/Form/Fields/SelectField.vue +124 -138
- package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +28 -33
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +15 -15
- package/src/components/ActionTable/Form/Fields/SliderNumberField.vue +45 -0
- package/src/components/ActionTable/Form/Fields/TextField.vue +47 -66
- package/src/components/ActionTable/Form/Fields/index.ts +2 -0
- package/src/components/ActionTable/Form/RenderedForm.vue +50 -13
- package/src/components/ActionTable/Form/Utilities/MaxLengthCounter.vue +17 -0
- package/src/components/ActionTable/Form/Utilities/index.ts +1 -0
- package/src/components/ActionTable/Form/index.ts +1 -0
- package/src/components/ActionTable/Layouts/ActionTableLayout.vue +22 -16
- package/src/components/ActionTable/Toolbars/ActionToolbar.vue +11 -11
- package/src/components/ActionTable/listControls.ts +104 -166
- package/src/components/ActionTable/listHelpers.ts +2 -3
- package/src/components/ActionTable/tableColumns.ts +53 -77
- package/src/components/AuditHistory/AuditHistoryItemValue.vue +26 -26
- package/src/components/PanelsDrawer/PanelsDrawer.vue +17 -4
- package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +6 -11
- package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +20 -20
- package/src/components/Utility/Dialogs/ConfirmActionDialog.vue +39 -0
- package/src/components/Utility/Dialogs/ConfirmDialog.vue +57 -117
- package/src/components/Utility/Dialogs/DialogLayout.vue +77 -0
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +42 -36
- package/src/components/Utility/Dialogs/InfoDialog.vue +40 -80
- package/src/components/Utility/Dialogs/index.ts +1 -0
- package/src/components/Utility/Files/FilePreview.vue +76 -73
- package/src/components/Utility/Layouts/ContentDrawer.vue +24 -31
- package/src/components/Utility/Tools/ActionVnode.vue +3 -3
- package/src/components/Utility/Tools/RenderVnode.vue +20 -11
- package/src/components/Utility/Transitions/MaxHeightTransition.vue +26 -0
- package/src/components/Utility/Transitions/index.ts +1 -0
- package/src/config/index.ts +36 -31
- package/src/helpers/FileUpload.ts +295 -297
- package/src/helpers/FlashMessages.ts +80 -71
- package/src/helpers/actions.ts +102 -82
- package/src/helpers/download.ts +189 -189
- package/src/helpers/downloadPdf.ts +55 -52
- package/src/helpers/formats.ts +151 -109
- package/src/helpers/index.ts +2 -0
- package/src/helpers/multiFileUpload.ts +72 -58
- package/src/helpers/objectStore.ts +52 -0
- package/src/helpers/request.ts +70 -51
- package/src/helpers/routes.ts +29 -0
- package/src/helpers/storage.ts +7 -3
- package/src/helpers/utils.ts +47 -29
- package/src/styles/quasar-reset.scss +94 -68
- package/src/styles/themes/danx/dialogs.scss +47 -0
- package/src/styles/themes/danx/forms.scss +18 -0
- package/src/styles/themes/danx/index.scss +4 -0
- package/src/types/actions.d.ts +43 -0
- package/src/types/config.d.ts +15 -0
- package/src/types/controls.d.ts +99 -0
- package/src/types/dialogs.d.ts +32 -0
- package/src/types/fields.d.ts +20 -0
- package/src/types/files.d.ts +54 -0
- package/src/types/formats.d.ts +4 -0
- package/src/{components/ActionTable/Form/form.d.ts → types/forms.d.ts} +6 -0
- package/src/types/index.d.ts +12 -0
- package/src/types/requests.d.ts +13 -0
- package/src/types/shared.d.ts +15 -0
- package/src/types/tables.d.ts +27 -0
- package/types/index.d.ts +1 -1
- /package/src/components/ActionTable/Filters/{FilterFieldItem.vue → FilterItem.vue} +0 -0
@@ -0,0 +1,99 @@
|
|
1
|
+
import { ComputedRef, Ref, ShallowRef } from "vue";
|
2
|
+
import { ActionTargetItem } from "./actions";
|
3
|
+
import { LabelValueItem } from "./shared";
|
4
|
+
|
5
|
+
export interface ListControlsFilter {
|
6
|
+
[key: string]: object | object[] | null | undefined | string | number | boolean;
|
7
|
+
}
|
8
|
+
|
9
|
+
export interface FilterableField {
|
10
|
+
name: string;
|
11
|
+
label: string;
|
12
|
+
type: string;
|
13
|
+
options?: string[] | number[] | LabelValueItem[];
|
14
|
+
inline?: boolean;
|
15
|
+
}
|
16
|
+
|
17
|
+
export interface FilterGroup {
|
18
|
+
name?: string;
|
19
|
+
flat?: boolean;
|
20
|
+
fields: FilterableField[];
|
21
|
+
}
|
22
|
+
|
23
|
+
export interface ListControlsRoutes {
|
24
|
+
list: (pager: object) => Promise<ActionTargetItem[]>;
|
25
|
+
details?: (item: object) => Promise<ActionTargetItem> | null;
|
26
|
+
summary?: (filter: object | null) => Promise<object> | null;
|
27
|
+
fieldOptions?: (filter: object | null) => Promise<object> | null;
|
28
|
+
more?: (pager: object) => Promise<ActionTargetItem[]> | null;
|
29
|
+
export: (filter?: ListControlsFilter) => Promise<void>;
|
30
|
+
}
|
31
|
+
|
32
|
+
export interface ListControlsOptions {
|
33
|
+
label?: string,
|
34
|
+
routes: ListControlsRoutes;
|
35
|
+
urlPattern?: RegExp | null;
|
36
|
+
filterDefaults?: Record<string, object>;
|
37
|
+
refreshFilters?: boolean;
|
38
|
+
}
|
39
|
+
|
40
|
+
export interface ListControlsPagination {
|
41
|
+
__sort?: object[] | null;
|
42
|
+
sortBy?: string | null;
|
43
|
+
descending?: boolean;
|
44
|
+
page?: number;
|
45
|
+
rowsNumber?: number;
|
46
|
+
rowsPerPage?: number;
|
47
|
+
}
|
48
|
+
|
49
|
+
export interface PagedItems {
|
50
|
+
data: ActionTargetItem[] | undefined;
|
51
|
+
meta: {
|
52
|
+
total: number;
|
53
|
+
last_page?: number;
|
54
|
+
} | undefined;
|
55
|
+
}
|
56
|
+
|
57
|
+
export interface ActionController {
|
58
|
+
name: string;
|
59
|
+
label: string;
|
60
|
+
pagedItems: Ref<PagedItems | null>;
|
61
|
+
activeFilter: Ref<ListControlsFilter>;
|
62
|
+
globalFilter: Ref<ListControlsFilter>;
|
63
|
+
filterActiveCount: ComputedRef<number>;
|
64
|
+
showFilters: Ref<boolean>;
|
65
|
+
summary: ShallowRef<object | null>;
|
66
|
+
selectedRows: ShallowRef<ActionTargetItem[]>;
|
67
|
+
isLoadingList: Ref<boolean>;
|
68
|
+
isLoadingFilters: Ref<boolean>;
|
69
|
+
isLoadingSummary: Ref<boolean>;
|
70
|
+
pager: ComputedRef<{
|
71
|
+
perPage: number;
|
72
|
+
page: number;
|
73
|
+
filter: ListControlsFilter;
|
74
|
+
sort: object[] | undefined;
|
75
|
+
}>;
|
76
|
+
pagination: ShallowRef<ListControlsPagination>;
|
77
|
+
activeItem: ShallowRef<ActionTargetItem | null>;
|
78
|
+
activePanel: ShallowRef<string | null>;
|
79
|
+
|
80
|
+
// Actions
|
81
|
+
initialize: () => void;
|
82
|
+
resetPaging: () => void;
|
83
|
+
setPagination: (updated: ListControlsPagination) => void;
|
84
|
+
setSelectedRows: (selection: ActionTargetItem[]) => void;
|
85
|
+
clearSelectedRows: () => void;
|
86
|
+
loadList: (filter?: ListControlsFilter) => Promise<void>;
|
87
|
+
loadSummary: (filter?: ListControlsFilter) => Promise<void>;
|
88
|
+
loadListAndSummary: (filter?: ListControlsFilter) => Promise<void>;
|
89
|
+
loadMore: (index: number, perPage?: number) => Promise<boolean>;
|
90
|
+
getActiveItemDetails: () => Promise<void>;
|
91
|
+
refreshAll: () => Promise<void[]>;
|
92
|
+
exportList: (filter?: ListControlsFilter) => Promise<void>;
|
93
|
+
setActiveItem: (item: ActionTargetItem | null) => void;
|
94
|
+
getNextItem: (offset: number) => Promise<void>;
|
95
|
+
activatePanel: (item: ActionTargetItem | null, panel: string) => void;
|
96
|
+
setActiveFilter: (filter?: ListControlsFilter) => void;
|
97
|
+
applyFilterFromUrl: (url: string, filters?: Ref<FilterGroup[]> | null) => void;
|
98
|
+
getFieldOptions: (field: string) => any[];
|
99
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ActionTargetItem } from "./actions";
|
2
|
+
|
3
|
+
export interface DialogLayoutProps {
|
4
|
+
modelValue?: string | boolean | object;
|
5
|
+
title?: string;
|
6
|
+
titleClass?: string;
|
7
|
+
subtitle?: string;
|
8
|
+
content?: string;
|
9
|
+
backdropDismiss?: boolean;
|
10
|
+
maximized?: boolean;
|
11
|
+
fullWidth?: boolean;
|
12
|
+
fullHeight?: boolean;
|
13
|
+
contentClass?: string;
|
14
|
+
}
|
15
|
+
|
16
|
+
export interface ConfirmDialogProps extends DialogLayoutProps {
|
17
|
+
disabled?: boolean;
|
18
|
+
isSaving?: boolean;
|
19
|
+
closeOnConfirm?: boolean;
|
20
|
+
hideConfirm?: boolean;
|
21
|
+
confirmText?: string;
|
22
|
+
cancelText?: string;
|
23
|
+
confirmClass?: string;
|
24
|
+
contentClass?: string;
|
25
|
+
}
|
26
|
+
|
27
|
+
export interface ConfirmActionDialogProps extends ConfirmDialogProps {
|
28
|
+
action: string,
|
29
|
+
label?: string,
|
30
|
+
target: ActionTargetItem | ActionTargetItem[]
|
31
|
+
message?: string,
|
32
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { QInputProps } from "quasar";
|
2
|
+
import { FormField } from "./forms";
|
3
|
+
|
4
|
+
export interface TextFieldProps {
|
5
|
+
modelValue?: string,
|
6
|
+
field?: FormField,
|
7
|
+
type?: QInputProps["type"],
|
8
|
+
label?: string,
|
9
|
+
labelClass?: string,
|
10
|
+
parentClass?: string,
|
11
|
+
inputClass?: string,
|
12
|
+
allowOverMax?: boolean,
|
13
|
+
maxLength?: number;
|
14
|
+
autogrow?: boolean;
|
15
|
+
noLabel?: boolean;
|
16
|
+
showName?: boolean;
|
17
|
+
disabled?: boolean;
|
18
|
+
readonly?: boolean;
|
19
|
+
debounce?: string | number;
|
20
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
export interface FileUploadOptions {
|
2
|
+
directory?: string,
|
3
|
+
createPresignedUpload?: ((path: string, name: string, mime?: string) => Promise<UploadedFile>) | null;
|
4
|
+
completePresignedUpload?: ((fileId: string) => Promise<UploadedFile>) | null;
|
5
|
+
}
|
6
|
+
|
7
|
+
export interface XHRFileUpload {
|
8
|
+
file: UploadedFile;
|
9
|
+
xhr?: XMLHttpRequest | null;
|
10
|
+
formData: FormData;
|
11
|
+
isComplete: boolean;
|
12
|
+
body?: FormData | UploadedFile | string;
|
13
|
+
}
|
14
|
+
|
15
|
+
export interface UploadedFile {
|
16
|
+
id: string,
|
17
|
+
resource_id?: string;
|
18
|
+
name: string,
|
19
|
+
size: number,
|
20
|
+
type: string;
|
21
|
+
mimeType?: string;
|
22
|
+
mime?: string;
|
23
|
+
progress?: number;
|
24
|
+
location?: string;
|
25
|
+
blobUrl?: string;
|
26
|
+
url?: string;
|
27
|
+
}
|
28
|
+
|
29
|
+
export interface FileUploadCompleteCallbackParams {
|
30
|
+
file?: UploadedFile | null;
|
31
|
+
uploadedFile?: UploadedFile | null;
|
32
|
+
}
|
33
|
+
|
34
|
+
export interface FileUploadAllCompleteCallbackParams {
|
35
|
+
files: XHRFileUpload[];
|
36
|
+
}
|
37
|
+
|
38
|
+
export interface FileUploadProgressCallbackParams {
|
39
|
+
file?: UploadedFile | null;
|
40
|
+
progress: number;
|
41
|
+
}
|
42
|
+
|
43
|
+
export interface FileUploadErrorCallbackParams {
|
44
|
+
e: InputEvent;
|
45
|
+
file: UploadedFile;
|
46
|
+
error: any;
|
47
|
+
}
|
48
|
+
|
49
|
+
export type FileUploadCompleteCallback = (params: FileUploadCompleteCallbackParams) => void
|
50
|
+
export type FileUploadAllCompleteCallback = (params: FileUploadAllCompleteCallbackParams) => void
|
51
|
+
export type FileUploadProgressCallback = (params: FileUploadProgressCallbackParams) => void
|
52
|
+
export type FileUploadErrorCallback = (params: FileUploadErrorCallbackParams) => void
|
53
|
+
export type OnFilesChangeCallback = (files: UploadedFile[]) => void;
|
54
|
+
export type VoidCallback = () => void;
|
@@ -10,10 +10,16 @@ export interface FormField {
|
|
10
10
|
type?: string;
|
11
11
|
name: string;
|
12
12
|
label: string;
|
13
|
+
placeholder?: string;
|
13
14
|
vnode?: ((props) => VNode | any);
|
14
15
|
component?: any;
|
16
|
+
clearable?: boolean;
|
15
17
|
required?: boolean;
|
16
18
|
required_group?: string;
|
19
|
+
toggleIndeterminate?: boolean;
|
20
|
+
inline?: boolean;
|
21
|
+
maxLength?: number;
|
22
|
+
minLength?: number;
|
17
23
|
options?: FormFieldOption[];
|
18
24
|
}
|
19
25
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export * from "./actions";
|
2
|
+
export * from "./config";
|
3
|
+
export * from "./controls";
|
4
|
+
export * from "./dialogs";
|
5
|
+
export * from "./fields";
|
6
|
+
export * from "./files";
|
7
|
+
export * from "./formats";
|
8
|
+
export * from "./forms";
|
9
|
+
export * from "./requests";
|
10
|
+
export * from "./shared";
|
11
|
+
export * from "./tables";
|
12
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export type AnyObject = { [key: string]: any };
|
2
|
+
|
3
|
+
export interface TypedObject {
|
4
|
+
id?: string | number;
|
5
|
+
name?: string;
|
6
|
+
__type: string;
|
7
|
+
__timestamp?: number;
|
8
|
+
|
9
|
+
[key: string]: TypedObject[] | any;
|
10
|
+
}
|
11
|
+
|
12
|
+
export interface LabelValueItem {
|
13
|
+
label: string;
|
14
|
+
value: string | number | boolean;
|
15
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { VNode } from "vue";
|
2
|
+
import { ActionOptions } from "./actions";
|
3
|
+
|
4
|
+
export interface TableColumn {
|
5
|
+
actionMenu?: ActionOptions[],
|
6
|
+
align?: string,
|
7
|
+
category?: string,
|
8
|
+
class?: string | object,
|
9
|
+
field?: string,
|
10
|
+
format?: (value: any, options: any) => any,
|
11
|
+
innerClass?: string | object,
|
12
|
+
style?: string | object,
|
13
|
+
headerStyle?: string | object,
|
14
|
+
isSavingRow?: boolean | (() => boolean),
|
15
|
+
label: string,
|
16
|
+
maxWidth?: number,
|
17
|
+
minWidth?: number,
|
18
|
+
name: string,
|
19
|
+
onClick?: (target: any) => void,
|
20
|
+
required?: boolean,
|
21
|
+
resizeable?: boolean,
|
22
|
+
sortable?: boolean,
|
23
|
+
sortBy?: string,
|
24
|
+
sortByExpression?: string,
|
25
|
+
titleColumns?: () => string[],
|
26
|
+
vnode?: () => VNode | any,
|
27
|
+
}
|
package/types/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "../src/
|
1
|
+
export * from "../src/types";
|
File without changes
|