quasar-ui-danx 0.4.10 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +12389 -7677
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +137 -7
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/index.d.ts +7 -0
- package/index.ts +1 -0
- package/package.json +10 -4
- package/src/components/ActionTable/ActionMenu.vue +26 -31
- package/src/components/ActionTable/ActionTable.vue +4 -1
- package/src/components/ActionTable/Columns/ActionTableColumn.vue +14 -6
- package/src/components/ActionTable/Columns/ActionTableHeaderColumn.vue +63 -42
- package/src/components/ActionTable/Form/ActionForm.vue +55 -0
- package/src/components/ActionTable/Form/Fields/EditOnClickTextField.vue +11 -5
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +1 -0
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +1 -1
- package/src/components/ActionTable/Form/Fields/NumberField.vue +0 -1
- package/src/components/ActionTable/Form/RenderedForm.vue +57 -50
- package/src/components/ActionTable/Form/index.ts +1 -0
- package/src/components/ActionTable/Layouts/ActionTableLayout.vue +3 -3
- package/src/components/ActionTable/TableSummaryRow.vue +48 -37
- package/src/components/ActionTable/Toolbars/ActionToolbar.vue +2 -2
- package/src/components/ActionTable/listControls.ts +3 -2
- package/src/components/PanelsDrawer/PanelsDrawer.vue +15 -5
- package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +3 -1
- package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +17 -4
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +30 -5
- package/src/components/Utility/Files/FilePreview.vue +72 -12
- package/src/components/Utility/Popovers/PopoverMenu.vue +34 -29
- package/src/components/Utility/Tools/RenderVnode.vue +5 -1
- package/src/config/index.ts +2 -1
- package/src/helpers/FileUpload.ts +59 -8
- package/src/helpers/actions.ts +27 -27
- package/src/helpers/date.ts +2 -2
- package/src/helpers/download.ts +8 -2
- package/src/helpers/formats.ts +52 -5
- package/src/helpers/multiFileUpload.ts +6 -4
- package/src/helpers/objectStore.ts +14 -17
- package/src/helpers/request.ts +12 -0
- package/src/helpers/singleFileUpload.ts +63 -55
- package/src/helpers/utils.ts +12 -3
- package/src/index.ts +1 -0
- package/src/styles/danx.scss +5 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/themes/danx/action-table.scss +24 -13
- package/src/types/actions.d.ts +16 -7
- package/src/types/controls.d.ts +4 -4
- package/src/types/files.d.ts +10 -5
- package/src/types/forms.d.ts +19 -1
- package/src/types/index.d.ts +0 -1
- package/src/types/requests.d.ts +2 -0
- package/src/types/tables.d.ts +28 -22
- package/src/{vue-plugin.js → vue-plugin.ts} +5 -4
- package/tsconfig.json +1 -0
- package/types/index.d.ts +2 -0
@@ -1,19 +1,30 @@
|
|
1
|
+
.dx-action-table {
|
2
|
+
.dx-column-shrink {
|
3
|
+
width: 1px;
|
4
|
+
}
|
5
|
+
|
6
|
+
// Make sure the checkbox column is left aligned and always the same size
|
7
|
+
thead > tr:first-child > th:first-child, tbody > tr:not(.dx-table-summary-tr) > td:first-child {
|
8
|
+
@apply text-left w-[1px] pl-4;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
1
12
|
.dx-table-summary-tr {
|
2
|
-
|
13
|
+
@apply bg-gray-100;
|
3
14
|
|
4
|
-
|
5
|
-
|
6
|
-
|
15
|
+
&.has-selection {
|
16
|
+
@apply bg-blue-600 text-white;
|
17
|
+
}
|
7
18
|
|
8
|
-
|
9
|
-
|
10
|
-
|
19
|
+
&.is-loading {
|
20
|
+
@apply opacity-50;
|
21
|
+
}
|
11
22
|
|
12
|
-
|
13
|
-
|
23
|
+
.dx-table-summary-td {
|
24
|
+
@apply font-bold bg-gray-100 pl-5;
|
14
25
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
26
|
+
&.has-selection {
|
27
|
+
@apply bg-blue-600 text-white pl-4;
|
28
|
+
}
|
29
|
+
}
|
19
30
|
}
|
package/src/types/actions.d.ts
CHANGED
@@ -6,9 +6,9 @@ export interface ActionPanel {
|
|
6
6
|
label: string;
|
7
7
|
category?: string;
|
8
8
|
class?: string | object;
|
9
|
-
enabled?: boolean | (() => boolean);
|
10
|
-
tabVnode?: (activePanel: string | number) => VNode | any;
|
11
|
-
vnode: (
|
9
|
+
enabled?: boolean | ((activeItem: ActionTargetItem) => boolean);
|
10
|
+
tabVnode?: (activeItem: ActionTargetItem | null | undefined, activePanel: string | number) => VNode | any;
|
11
|
+
vnode: (activeItem: ActionTargetItem | null | undefined) => VNode | any;
|
12
12
|
}
|
13
13
|
|
14
14
|
export interface ActionTargetItem extends TypedObject {
|
@@ -18,17 +18,17 @@ export interface ActionTargetItem extends TypedObject {
|
|
18
18
|
export type ActionTarget = ActionTargetItem[] | ActionTargetItem | null;
|
19
19
|
|
20
20
|
export interface ActionOptions {
|
21
|
-
name
|
21
|
+
name: string;
|
22
22
|
alias?: string;
|
23
23
|
label?: string;
|
24
|
+
icon?: string | object;
|
25
|
+
iconClass?: string | object;
|
24
26
|
menu?: boolean;
|
25
27
|
batch?: boolean;
|
26
28
|
category?: string;
|
27
29
|
class?: string;
|
28
30
|
debounce?: number;
|
29
|
-
isApplying?: boolean;
|
30
31
|
optimistic?: boolean | ((action: ActionOptions, target: ActionTargetItem | null, input: any) => void);
|
31
|
-
trigger?: (target?: ActionTarget, input?: any) => Promise<any>;
|
32
32
|
vnode?: ((target: ActionTarget) => VNode) | any;
|
33
33
|
enabled?: (target: object) => boolean;
|
34
34
|
batchEnabled?: (targets: object[]) => boolean;
|
@@ -39,5 +39,14 @@ export interface ActionOptions {
|
|
39
39
|
onBatchSuccess?: (result: any, targets: ActionTargetItem[], input: any) => any;
|
40
40
|
onError?: (result: any, targets: ActionTarget, input: any) => any;
|
41
41
|
onFinish?: (result: any, targets: ActionTarget, input: any) => any;
|
42
|
-
|
42
|
+
}
|
43
|
+
|
44
|
+
export interface ActionOptionsPartial extends ActionOptions {
|
45
|
+
name?: string;
|
46
|
+
}
|
47
|
+
|
48
|
+
export interface ResourceAction extends ActionOptions {
|
49
|
+
isApplying: boolean;
|
50
|
+
trigger: (target?: ActionTarget, input?: any) => Promise<any>;
|
51
|
+
__type: string;
|
43
52
|
}
|
package/src/types/controls.d.ts
CHANGED
@@ -25,17 +25,17 @@ export interface FilterGroup {
|
|
25
25
|
export interface ListControlsRoutes {
|
26
26
|
list(pager?: ListControlsPagination): Promise<ActionTargetItem[]>;
|
27
27
|
|
28
|
-
summary?(filter?: ListControlsFilter): Promise<
|
28
|
+
summary?(filter?: ListControlsFilter): Promise<AnyObject>;
|
29
29
|
|
30
30
|
details?(target: ActionTargetItem): Promise<ActionTargetItem>;
|
31
31
|
|
32
32
|
more?(pager: ListControlsPagination): Promise<ActionTargetItem[]>;
|
33
33
|
|
34
|
-
fieldOptions?(filter?: AnyObject): Promise<
|
34
|
+
fieldOptions?(filter?: AnyObject): Promise<AnyObject>;
|
35
35
|
|
36
|
-
applyAction?(action: string, target: ActionTargetItem | null, data
|
36
|
+
applyAction?(action: string, target: ActionTargetItem | null, data?: object): Promise<AnyObject>;
|
37
37
|
|
38
|
-
batchAction?(action: string, targets: ActionTargetItem[], data: object): Promise<
|
38
|
+
batchAction?(action: string, targets: ActionTargetItem[], data: object): Promise<AnyObject>;
|
39
39
|
|
40
40
|
export?(filter?: ListControlsFilter, name?: string): Promise<void>;
|
41
41
|
}
|
package/src/types/files.d.ts
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
import { AnyObject, TypedObject } from "src/types/shared";
|
2
|
+
|
1
3
|
export interface FileUploadOptions {
|
2
4
|
directory?: string,
|
3
5
|
createPresignedUpload?: ((path: string, name: string, mime?: string) => Promise<UploadedFile>) | null;
|
4
6
|
completePresignedUpload?: ((fileId: string) => Promise<UploadedFile>) | null;
|
7
|
+
refreshFile?: ((fileId: string) => Promise<UploadedFile>) | null;
|
5
8
|
}
|
6
9
|
|
7
10
|
export interface XHRFileUpload {
|
@@ -12,11 +15,12 @@ export interface XHRFileUpload {
|
|
12
15
|
body?: FormData | UploadedFile | string;
|
13
16
|
}
|
14
17
|
|
15
|
-
export interface UploadedFile {
|
16
|
-
id: string
|
18
|
+
export interface UploadedFile extends TypedObject {
|
19
|
+
id: string;
|
17
20
|
resource_id?: string;
|
18
|
-
name: string
|
19
|
-
|
21
|
+
name: string;
|
22
|
+
filename?: string;
|
23
|
+
size: number;
|
20
24
|
type: string;
|
21
25
|
mimeType?: string;
|
22
26
|
mime?: string;
|
@@ -27,6 +31,7 @@ export interface UploadedFile {
|
|
27
31
|
thumb?: UploadedFile;
|
28
32
|
optimized?: UploadedFile;
|
29
33
|
transcodes?: UploadedFile[];
|
34
|
+
meta?: AnyObject;
|
30
35
|
}
|
31
36
|
|
32
37
|
export interface FileUploadCompleteCallbackParams {
|
@@ -44,7 +49,7 @@ export interface FileUploadProgressCallbackParams {
|
|
44
49
|
}
|
45
50
|
|
46
51
|
export interface FileUploadErrorCallbackParams {
|
47
|
-
e: InputEvent;
|
52
|
+
e: InputEvent | ProgressEvent;
|
48
53
|
file: UploadedFile;
|
49
54
|
error: any;
|
50
55
|
}
|
package/src/types/forms.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { VNode } from "vue";
|
2
|
+
import { AnyObject } from "./shared";
|
2
3
|
|
3
4
|
export interface FormFieldOption {
|
4
5
|
value: string;
|
@@ -11,7 +12,8 @@ export interface FormField {
|
|
11
12
|
name: string;
|
12
13
|
label: string;
|
13
14
|
placeholder?: string;
|
14
|
-
|
15
|
+
enabled?: boolean | ((input: AnyObject) => boolean);
|
16
|
+
vnode?: ((field: FormFieldOption, input?: AnyObject) => VNode | any);
|
15
17
|
component?: any;
|
16
18
|
clearable?: boolean;
|
17
19
|
required?: boolean;
|
@@ -35,3 +37,19 @@ export interface FormFieldValue {
|
|
35
37
|
value: any,
|
36
38
|
variation?: string
|
37
39
|
}
|
40
|
+
|
41
|
+
export interface RenderedFormProps {
|
42
|
+
values?: FormFieldValue[] | object | null;
|
43
|
+
form: Form;
|
44
|
+
noLabel?: boolean;
|
45
|
+
showName?: boolean;
|
46
|
+
disable?: boolean;
|
47
|
+
readonly?: boolean;
|
48
|
+
saving?: boolean;
|
49
|
+
clearable?: boolean;
|
50
|
+
emptyValue?: string | number | boolean;
|
51
|
+
canModifyVariations?: boolean;
|
52
|
+
fieldClass?: string;
|
53
|
+
savingClass?: string;
|
54
|
+
savedAt?: string;
|
55
|
+
}
|
package/src/types/index.d.ts
CHANGED
package/src/types/requests.d.ts
CHANGED
@@ -10,6 +10,8 @@ export interface RequestApi {
|
|
10
10
|
get(url: string, options?: RequestCallOptions): Promise<any>;
|
11
11
|
|
12
12
|
post(url: string, data?: object, options?: RequestCallOptions): Promise<any>;
|
13
|
+
|
14
|
+
poll(url: string, options?: RequestCallOptions, interval: number, fnUntil: (response) => boolean): Promise<any>;
|
13
15
|
}
|
14
16
|
|
15
17
|
export interface HttpResponse {
|
package/src/types/tables.d.ts
CHANGED
@@ -2,26 +2,32 @@ import { VNode } from "vue";
|
|
2
2
|
import { ActionOptions } from "./actions";
|
3
3
|
|
4
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
5
|
+
actionMenu?: ActionOptions[];
|
6
|
+
align?: string;
|
7
|
+
category?: string;
|
8
|
+
class?: string | object;
|
9
|
+
field?: string;
|
10
|
+
format?: (value: any, options: any) => any;
|
11
|
+
hideContent?: boolean;
|
12
|
+
shrink?: boolean;
|
13
|
+
headerClass?: string | object;
|
14
|
+
summaryClass?: string | object;
|
15
|
+
columnClass?: string | object;
|
16
|
+
innerClass?: string | object;
|
17
|
+
style?: string | object;
|
18
|
+
headerStyle?: string | object;
|
19
|
+
isSavingRow?: boolean | (() => boolean);
|
20
|
+
label: string;
|
21
|
+
width?: number;
|
22
|
+
maxWidth?: number;
|
23
|
+
minWidth?: number;
|
24
|
+
name: string;
|
25
|
+
onClick?: (target: any) => void;
|
26
|
+
required?: boolean;
|
27
|
+
resizeable?: boolean;
|
28
|
+
sortable?: boolean;
|
29
|
+
sortBy?: string;
|
30
|
+
sortByExpression?: string;
|
31
|
+
titleColumns?: () => string[];
|
32
|
+
vnode?: (row?) => VNode | any;
|
27
33
|
}
|
@@ -3,15 +3,16 @@ export * from "./helpers";
|
|
3
3
|
export * from "./components";
|
4
4
|
export * from "./svg";
|
5
5
|
|
6
|
+
// eslint-disable-next-line import/extensions
|
6
7
|
import packageJson from "../package.json";
|
7
8
|
|
8
9
|
const { version } = packageJson;
|
9
10
|
|
10
|
-
function install(
|
11
|
-
|
11
|
+
function install() {
|
12
|
+
console.log(`Installing Danx UI ${version}... Nothing to do really.`);
|
12
13
|
}
|
13
14
|
|
14
15
|
export {
|
15
|
-
|
16
|
-
|
16
|
+
version,
|
17
|
+
install
|
17
18
|
};
|
package/tsconfig.json
CHANGED
@@ -25,6 +25,7 @@
|
|
25
25
|
"forceConsistentCasingInFileNames": true,
|
26
26
|
// Resolve modules using Node.js style
|
27
27
|
"moduleResolution": "node",
|
28
|
+
"resolveJsonModule": true,
|
28
29
|
// Allow default imports from modules with no default export
|
29
30
|
"allowSyntheticDefaultImports": true,
|
30
31
|
// Enables experimental support for decorators
|
package/types/index.d.ts
CHANGED