quasar-ui-danx 0.4.9 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +6509 -6230
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +7 -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 +8 -3
- 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/FieldLabel.vue +18 -15
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +1 -0
- package/src/components/ActionTable/Form/Fields/LabelValueBlock.vue +44 -15
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +1 -1
- package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +12 -13
- package/src/components/ActionTable/Form/Fields/NumberField.vue +40 -55
- package/src/components/ActionTable/Form/Fields/SelectField.vue +4 -3
- package/src/components/ActionTable/Form/Fields/TextField.vue +31 -12
- package/src/components/ActionTable/Form/RenderedForm.vue +11 -10
- 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/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/config/index.ts +2 -1
- package/src/helpers/FileUpload.ts +59 -8
- package/src/helpers/actions.ts +27 -27
- package/src/helpers/download.ts +8 -2
- package/src/helpers/formats.ts +79 -9
- 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 +11 -0
- package/src/index.ts +1 -0
- package/src/styles/danx.scss +5 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/quasar-reset.scss +2 -0
- package/src/styles/themes/danx/action-table.scss +24 -13
- package/src/styles/themes/danx/forms.scss +1 -19
- package/src/types/actions.d.ts +13 -4
- package/src/types/controls.d.ts +4 -4
- package/src/types/fields.d.ts +10 -9
- package/src/types/files.d.ts +10 -5
- 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,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ShallowReactive, shallowReactive } from "vue";
|
2
2
|
import { TypedObject } from "../types";
|
3
3
|
|
4
4
|
const store = new Map<string, any>();
|
@@ -6,27 +6,25 @@ const store = new Map<string, any>();
|
|
6
6
|
/**
|
7
7
|
* Store an object in the object store via type + id
|
8
8
|
* Returns the stored object that should be used instead of the passed object as the returned object is shared across the system
|
9
|
-
*
|
10
|
-
* @param {TypedObject} newObject
|
11
|
-
* @returns {TypedObject}
|
12
9
|
*/
|
13
|
-
export function storeObject<T extends TypedObject>(newObject: T):
|
10
|
+
export function storeObject<T extends TypedObject>(newObject: T): ShallowReactive<T> {
|
14
11
|
const id = newObject.id || newObject.name;
|
15
12
|
const type = newObject.__type;
|
16
|
-
if (!id || !type) return
|
13
|
+
if (!id || !type) return shallowReactive(newObject);
|
14
|
+
|
15
|
+
if (!newObject.__timestamp) {
|
16
|
+
newObject.__timestamp = newObject.updated_at || 0;
|
17
|
+
}
|
17
18
|
|
18
19
|
const objectKey = `${type}:${id}`;
|
19
20
|
|
20
|
-
|
21
|
+
// Retrieve the existing object if it already exists in the store
|
22
|
+
const oldObject = store.get(objectKey);
|
21
23
|
|
22
|
-
//
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
// If the old object is newer, do not store the new object, just return the old
|
27
|
-
if (oldTimestamp && newTimestamp && newTimestamp < oldTimestamp) {
|
28
|
-
return oldObject;
|
29
|
-
}
|
24
|
+
// If an old object exists, and it is newer than the new object, do not store the new object, just return the old
|
25
|
+
// @ts-expect-error __timestamp is guaranteed to be set in this case on both old and new
|
26
|
+
if (oldObject && newObject.__timestamp <= oldObject.__timestamp) {
|
27
|
+
return oldObject;
|
30
28
|
}
|
31
29
|
|
32
30
|
// Recursively store all the children of the object as well
|
@@ -41,12 +39,11 @@ export function storeObject<T extends TypedObject>(newObject: T): UnwrapNestedRe
|
|
41
39
|
|
42
40
|
// Update the old object with the new object properties
|
43
41
|
if (oldObject) {
|
44
|
-
// If the new object is newer, apply all properties from the new object to the old object
|
45
42
|
Object.assign(oldObject, newObject);
|
46
43
|
return oldObject;
|
47
44
|
}
|
48
45
|
|
49
|
-
const reactiveObject =
|
46
|
+
const reactiveObject = shallowReactive(newObject);
|
50
47
|
store.set(objectKey, reactiveObject);
|
51
48
|
return reactiveObject;
|
52
49
|
}
|
package/src/helpers/request.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Ref } from "vue";
|
2
2
|
import { danxOptions } from "../config";
|
3
3
|
import { HttpResponse, RequestApi } from "../types";
|
4
|
+
import { sleep } from "./utils";
|
4
5
|
|
5
6
|
/**
|
6
7
|
* A simple request helper that wraps the fetch API
|
@@ -70,6 +71,17 @@ export const request: RequestApi = {
|
|
70
71
|
|
71
72
|
return result;
|
72
73
|
},
|
74
|
+
|
75
|
+
async poll(url: string, options, interval, fnUntil) {
|
76
|
+
let response;
|
77
|
+
do {
|
78
|
+
response = await request.call(url, options);
|
79
|
+
await sleep(interval);
|
80
|
+
} while (!fnUntil(response));
|
81
|
+
|
82
|
+
return response;
|
83
|
+
},
|
84
|
+
|
73
85
|
async get(url, options) {
|
74
86
|
return await request.call(url, {
|
75
87
|
method: "get",
|
@@ -1,60 +1,68 @@
|
|
1
1
|
import { computed, Ref, ref } from "vue";
|
2
|
-
import {
|
2
|
+
import { FileUploadOptions, UploadedFile } from "../types";
|
3
|
+
import { FileUpload } from "./FileUpload";
|
4
|
+
import { FlashMessages } from "./FlashMessages";
|
3
5
|
|
4
|
-
|
5
|
-
file: UploadedFile;
|
6
|
-
uploadedFile: UploadedFile;
|
7
|
-
}
|
6
|
+
type FileUploadCallback = ((file: UploadedFile | null) => void) | null;
|
8
7
|
|
9
8
|
export function useSingleFileUpload(options: FileUploadOptions | null = null) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
9
|
+
const uploadedFile: Ref<UploadedFile | null | undefined> = ref(null);
|
10
|
+
const onCompleteCb: Ref<FileUploadCallback> = ref(null);
|
11
|
+
const onFileChangeCb: Ref<FileUploadCallback> = ref(null);
|
12
|
+
|
13
|
+
const onFileSelected = (e: any) => {
|
14
|
+
uploadedFile.value = null;
|
15
|
+
new FileUpload(e.target?.files[0], options)
|
16
|
+
.prepare()
|
17
|
+
.onProgress(({ file }) => {
|
18
|
+
if (file) {
|
19
|
+
uploadedFile.value = file;
|
20
|
+
onFileChangeCb.value && onFileChangeCb.value(uploadedFile.value);
|
21
|
+
}
|
22
|
+
})
|
23
|
+
.onComplete(({ uploadedFile: completedFile }) => {
|
24
|
+
if (completedFile) {
|
25
|
+
uploadedFile.value = completedFile;
|
26
|
+
onCompleteCb.value && onCompleteCb.value(uploadedFile.value);
|
27
|
+
onFileChangeCb.value && onFileChangeCb.value(uploadedFile.value);
|
28
|
+
}
|
29
|
+
})
|
30
|
+
.onError(({ file, error }) => {
|
31
|
+
console.error("Failed to upload", file, error);
|
32
|
+
FlashMessages.error(`Failed to upload ${file.name}: ${error}`);
|
33
|
+
})
|
34
|
+
.upload();
|
35
|
+
};
|
36
|
+
|
37
|
+
const onDrop = (e: InputEvent) => {
|
38
|
+
onFileSelected({ target: { files: e.dataTransfer?.files } });
|
39
|
+
};
|
40
|
+
|
41
|
+
const isFileUploaded = computed(() => {
|
42
|
+
return uploadedFile.value && uploadedFile.value.url;
|
43
|
+
});
|
44
|
+
|
45
|
+
const onFileChange = (cb: FileUploadCallback) => {
|
46
|
+
onFileChangeCb.value = cb;
|
47
|
+
};
|
48
|
+
|
49
|
+
const onComplete = (cb: FileUploadCallback) => {
|
50
|
+
onCompleteCb.value = cb;
|
51
|
+
};
|
52
|
+
|
53
|
+
const clearUploadedFile = () => {
|
54
|
+
uploadedFile.value = null;
|
55
|
+
onFileChangeCb.value && onFileChangeCb.value(uploadedFile.value);
|
56
|
+
onCompleteCb.value && onCompleteCb.value(uploadedFile.value);
|
57
|
+
};
|
58
|
+
|
59
|
+
return {
|
60
|
+
isFileUploaded,
|
61
|
+
clearUploadedFile,
|
62
|
+
onComplete,
|
63
|
+
onFileChange,
|
64
|
+
onDrop,
|
65
|
+
onFileSelected,
|
66
|
+
uploadedFile
|
67
|
+
};
|
60
68
|
}
|
package/src/helpers/utils.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import { Ref, watch } from "vue";
|
2
2
|
|
3
|
+
export { useDebounceFn } from "@vueuse/core";
|
4
|
+
|
3
5
|
/**
|
4
6
|
* Sleep function to be used in conjunction with async await:
|
5
7
|
*
|
@@ -9,6 +11,15 @@ export function sleep(delay: number) {
|
|
9
11
|
return new Promise((resolve) => setTimeout(resolve, delay));
|
10
12
|
}
|
11
13
|
|
14
|
+
/**
|
15
|
+
* Poll a callback function until the result is true
|
16
|
+
*/
|
17
|
+
export async function pollUntil(callback: () => any, interval = 1000) {
|
18
|
+
while (!(await callback())) {
|
19
|
+
await sleep(interval);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
12
23
|
/**
|
13
24
|
* Wait for a ref to have a value and then resolve the promise
|
14
25
|
*/
|
package/src/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./vue-plugin";
|
package/src/styles/index.scss
CHANGED
@@ -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
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.dx-field-label {
|
2
|
-
@apply text-xs
|
2
|
+
@apply text-xs mb-1.5 flex items-center space-x-1;
|
3
3
|
|
4
4
|
.dx-field-required {
|
5
5
|
@apply text-red-900 ml-0.5 bottom-1 relative;
|
@@ -10,22 +10,4 @@
|
|
10
10
|
.q-field__label {
|
11
11
|
@apply text-sm text-gray-700;
|
12
12
|
}
|
13
|
-
|
14
|
-
&.dx-number-field {
|
15
|
-
&.dx-prepend-label {
|
16
|
-
@apply text-xs text-black font-normal;
|
17
|
-
}
|
18
|
-
|
19
|
-
&.dx-no-prepend-label {
|
20
|
-
@apply w-32;
|
21
|
-
|
22
|
-
.q-field__native {
|
23
|
-
@apply bg-white text-right;
|
24
|
-
}
|
25
|
-
|
26
|
-
.q-field__prepend {
|
27
|
-
padding: 0;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
13
|
}
|
package/src/types/actions.d.ts
CHANGED
@@ -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/fields.d.ts
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
import { QInputProps } from "quasar";
|
2
|
-
import { FormField } from "./forms";
|
3
2
|
|
4
3
|
export interface TextFieldProps {
|
5
|
-
modelValue?: string
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
modelValue?: string | number;
|
5
|
+
type?: QInputProps["type"];
|
6
|
+
label?: string;
|
7
|
+
required?: boolean;
|
8
|
+
requiredLabel?: string;
|
9
|
+
prependLabel?: boolean;
|
10
|
+
placeholder?: string;
|
11
|
+
labelClass?: string | object;
|
12
|
+
inputClass?: string | object;
|
13
|
+
allowOverMax?: boolean;
|
13
14
|
maxLength?: number;
|
14
15
|
autogrow?: boolean;
|
15
16
|
noLabel?: boolean;
|
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/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