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
@@ -1,95 +1,55 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
:no-backdrop-dismiss="!backdropDismiss"
|
7
|
-
:maximized="maximized"
|
8
|
-
@update:model-value="onClose"
|
2
|
+
<DialogLayout
|
3
|
+
class="dx-info-dialog"
|
4
|
+
v-bind="$props"
|
5
|
+
@close="onClose"
|
9
6
|
>
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
<template
|
8
|
+
v-if="$slots.title"
|
9
|
+
#title
|
10
|
+
>
|
11
|
+
<slot name="title" />
|
12
|
+
</template>
|
13
|
+
<template
|
14
|
+
v-if="$slots.subtitle"
|
15
|
+
#subtitle
|
16
|
+
>
|
17
|
+
<slot name="subtitle" />
|
18
|
+
</template>
|
19
|
+
<template #actions>
|
20
|
+
<div class="flex-grow">
|
21
|
+
<QBtn
|
22
|
+
:label="doneText"
|
23
|
+
class="dx-dialog-button dx-dialog-button-done"
|
24
|
+
:class="doneClass"
|
25
|
+
@click="onClose"
|
18
26
|
>
|
19
|
-
<slot name="
|
20
|
-
|
21
|
-
</slot>
|
22
|
-
</h3>
|
23
|
-
<div
|
24
|
-
v-if="subtitle"
|
25
|
-
class="mt-1 text-sm"
|
26
|
-
>
|
27
|
-
{{ subtitle }}
|
28
|
-
</div>
|
29
|
-
</QCardSection>
|
30
|
-
<QCardSection
|
31
|
-
v-if="content || $slots.default"
|
32
|
-
class="px-6 bg-gray-100 flex-grow max-h-full overflow-y-auto"
|
33
|
-
>
|
34
|
-
<slot>{{ content }}</slot>
|
35
|
-
</QCardSection>
|
36
|
-
<div
|
37
|
-
class="flex items-center justify-center px-6 py-4 border-t border-gray-300"
|
38
|
-
>
|
39
|
-
<div class="flex-grow text-right">
|
40
|
-
<QBtn
|
41
|
-
:label="doneText"
|
42
|
-
class="action-btn btn-white-gray"
|
43
|
-
@click="onClose"
|
44
|
-
>
|
45
|
-
<slot name="done-text" />
|
46
|
-
</QBtn>
|
47
|
-
</div>
|
27
|
+
<slot name="done-text" />
|
28
|
+
</QBtn>
|
48
29
|
</div>
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
>
|
53
|
-
<CloseIcon class="w-5" />
|
54
|
-
</a>
|
55
|
-
</QCard>
|
56
|
-
</QDialog>
|
30
|
+
<slot name="actions" />
|
31
|
+
</template>
|
32
|
+
</DialogLayout>
|
57
33
|
</template>
|
58
34
|
|
59
35
|
<script setup>
|
60
|
-
import
|
36
|
+
import DialogLayout from "./DialogLayout";
|
61
37
|
|
62
38
|
const emit = defineEmits(["update:model-value", "close"]);
|
63
39
|
defineProps({
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
subtitle: {
|
74
|
-
type: String,
|
75
|
-
default: ""
|
76
|
-
},
|
77
|
-
content: {
|
78
|
-
type: String,
|
79
|
-
default: ""
|
80
|
-
},
|
81
|
-
backdropDismiss: Boolean,
|
82
|
-
maximized: Boolean,
|
83
|
-
fullWidth: Boolean,
|
84
|
-
fullHeight: Boolean,
|
85
|
-
doneText: {
|
86
|
-
type: String,
|
87
|
-
default: "Done"
|
88
|
-
}
|
40
|
+
...DialogLayout.props,
|
41
|
+
doneClass: {
|
42
|
+
type: [String, Object],
|
43
|
+
default: ""
|
44
|
+
},
|
45
|
+
doneText: {
|
46
|
+
type: String,
|
47
|
+
default: "Done"
|
48
|
+
}
|
89
49
|
});
|
90
50
|
|
91
51
|
function onClose() {
|
92
|
-
|
93
|
-
|
52
|
+
emit("update:model-value", false);
|
53
|
+
emit("close");
|
94
54
|
}
|
95
55
|
</script>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
export { default as ConfirmActionDialog } from "./ConfirmActionDialog.vue";
|
1
2
|
export { default as ConfirmDialog } from "./ConfirmDialog.vue";
|
2
3
|
export { default as FullScreenCarouselDialog } from "./FullscreenCarouselDialog.vue";
|
3
4
|
export { default as FullScreenDialog } from "./FullScreenDialog.vue";
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</div>
|
28
28
|
<QImg
|
29
29
|
v-if="thumbUrl || isPreviewable"
|
30
|
-
fit="
|
30
|
+
:fit="imageFit"
|
31
31
|
class="non-selectable max-h-full max-w-full h-full"
|
32
32
|
:src="(thumbUrl || previewUrl) + '#t=0.1'"
|
33
33
|
preload="auto"
|
@@ -54,11 +54,11 @@
|
|
54
54
|
<slot name="action-button" />
|
55
55
|
</div>
|
56
56
|
<div
|
57
|
-
v-if="
|
57
|
+
v-if="file && file.progress !== undefined"
|
58
58
|
class="absolute-bottom w-full"
|
59
59
|
>
|
60
60
|
<QLinearProgress
|
61
|
-
:value="
|
61
|
+
:value="file.progress"
|
62
62
|
size="15px"
|
63
63
|
color="green-600"
|
64
64
|
stripe
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<QBtn
|
79
79
|
v-if="downloadable && computedImage?.url"
|
80
80
|
size="sm"
|
81
|
-
class="
|
81
|
+
class="dx-file-preview-download py-1 px-2 opacity-70 hover:opacity-100"
|
82
82
|
:class="downloadButtonClass"
|
83
83
|
@click.stop="download(computedImage.url)"
|
84
84
|
>
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<QBtn
|
89
89
|
v-if="removable"
|
90
90
|
size="sm"
|
91
|
-
class="bg-red-900 text-white
|
91
|
+
class="dx-file-preview-remove bg-red-900 text-white opacity-50 hover:opacity-100 py-1 px-2"
|
92
92
|
@click.stop="onRemove"
|
93
93
|
>
|
94
94
|
<div
|
@@ -107,106 +107,109 @@
|
|
107
107
|
<FullScreenCarouselDialog
|
108
108
|
v-if="showPreview && !disabled"
|
109
109
|
:files="relatedFiles || [computedImage]"
|
110
|
-
:default-slide="computedImage
|
110
|
+
:default-slide="computedImage?.id || ''"
|
111
111
|
@close="showPreview = false"
|
112
112
|
/>
|
113
113
|
</div>
|
114
114
|
</template>
|
115
115
|
|
116
|
-
<script setup>
|
116
|
+
<script setup lang="ts">
|
117
117
|
import { DocumentTextIcon as TextFileIcon, DownloadIcon, PlayIcon } from "@heroicons/vue/outline";
|
118
|
-
import {
|
118
|
+
import { UploadedFile } from "src/types";
|
119
|
+
import { computed, ComputedRef, ref } from "vue";
|
119
120
|
import { download } from "../../../helpers";
|
120
121
|
import { ImageIcon, PdfIcon, TrashIcon as RemoveIcon } from "../../../svg";
|
121
122
|
import { FullScreenCarouselDialog } from "../Dialogs";
|
122
123
|
|
124
|
+
export interface FilePreviewProps {
|
125
|
+
src?: string;
|
126
|
+
file?: UploadedFile;
|
127
|
+
relatedFiles?: UploadedFile[];
|
128
|
+
missingIcon?: any;
|
129
|
+
downloadButtonClass?: string;
|
130
|
+
imageFit?: "cover" | "contain" | "fill" | "none" | "scale-down";
|
131
|
+
downloadable?: boolean;
|
132
|
+
removable?: boolean;
|
133
|
+
disabled?: boolean;
|
134
|
+
square?: boolean;
|
135
|
+
}
|
136
|
+
|
123
137
|
const emit = defineEmits(["remove"]);
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
},
|
137
|
-
missingIcon: {
|
138
|
-
type: [Function, Object],
|
139
|
-
default: ImageIcon
|
140
|
-
},
|
141
|
-
downloadButtonClass: {
|
142
|
-
type: String,
|
143
|
-
default: "bg-blue-600 text-white"
|
144
|
-
},
|
145
|
-
downloadable: Boolean,
|
146
|
-
removable: Boolean,
|
147
|
-
disabled: Boolean,
|
148
|
-
square: Boolean
|
138
|
+
|
139
|
+
const props = withDefaults(defineProps<FilePreviewProps>(), {
|
140
|
+
src: "",
|
141
|
+
file: null,
|
142
|
+
relatedFiles: null,
|
143
|
+
missingIcon: ImageIcon,
|
144
|
+
downloadButtonClass: "bg-blue-600 text-white",
|
145
|
+
imageFit: "cover",
|
146
|
+
downloadable: false,
|
147
|
+
removable: false,
|
148
|
+
disabled: false,
|
149
|
+
square: false
|
149
150
|
});
|
150
151
|
|
151
152
|
const showPreview = ref(false);
|
152
|
-
const computedImage = computed(() => {
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
153
|
+
const computedImage: ComputedRef<UploadedFile | null> = computed(() => {
|
154
|
+
if (props.file) {
|
155
|
+
return props.file;
|
156
|
+
} else if (props.src) {
|
157
|
+
return {
|
158
|
+
id: props.src,
|
159
|
+
url: props.src,
|
160
|
+
type: "image/" + props.src.split(".").pop()?.toLowerCase(),
|
161
|
+
name: "",
|
162
|
+
size: 0
|
163
|
+
};
|
164
|
+
}
|
165
|
+
return null;
|
163
166
|
});
|
164
167
|
const mimeType = computed(
|
165
|
-
|
168
|
+
() => computedImage.value?.type || computedImage.value?.mime || ""
|
166
169
|
);
|
167
|
-
const isImage = computed(() => mimeType.value.match(/^image\//));
|
168
|
-
const isVideo = computed(() => mimeType.value.match(/^video\//));
|
169
|
-
const isPdf = computed(() => mimeType.value.match(/^application\/pdf/));
|
170
|
+
const isImage = computed(() => !!mimeType.value.match(/^image\//));
|
171
|
+
const isVideo = computed(() => !!mimeType.value.match(/^video\//));
|
172
|
+
const isPdf = computed(() => !!mimeType.value.match(/^application\/pdf/));
|
170
173
|
const previewUrl = computed(
|
171
|
-
|
174
|
+
() => computedImage.value?.transcodes?.compress?.url || computedImage.value?.blobUrl || computedImage.value?.url
|
172
175
|
);
|
173
176
|
const thumbUrl = computed(() => {
|
174
|
-
|
177
|
+
return computedImage.value?.transcodes?.thumb?.url;
|
175
178
|
});
|
176
179
|
const isPreviewable = computed(() => {
|
177
|
-
|
180
|
+
return !!thumbUrl.value || isVideo.value || isImage.value;
|
178
181
|
});
|
179
182
|
const isConfirmingRemove = ref(false);
|
180
183
|
function onRemove() {
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
184
|
+
if (!isConfirmingRemove.value) {
|
185
|
+
isConfirmingRemove.value = true;
|
186
|
+
setTimeout(() => {
|
187
|
+
isConfirmingRemove.value = false;
|
188
|
+
}, 2000);
|
189
|
+
} else {
|
190
|
+
emit("remove");
|
191
|
+
}
|
189
192
|
}
|
190
193
|
</script>
|
191
194
|
|
192
195
|
<style module="cls" lang="scss">
|
193
196
|
.action-button {
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
197
|
+
position: absolute;
|
198
|
+
bottom: 1.5em;
|
199
|
+
right: 1em;
|
200
|
+
z-index: 1;
|
198
201
|
}
|
199
202
|
|
200
203
|
.play-button {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
204
|
+
position: absolute;
|
205
|
+
top: 0;
|
206
|
+
left: 0;
|
207
|
+
display: flex;
|
208
|
+
justify-content: center;
|
209
|
+
align-items: center;
|
210
|
+
width: 100%;
|
211
|
+
height: 100%;
|
212
|
+
pointer-events: none;
|
213
|
+
@apply text-blue-200;
|
211
214
|
}
|
212
215
|
</style>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<QDialog
|
3
|
-
|
3
|
+
:model-value="show"
|
4
4
|
maximized
|
5
5
|
:position="position"
|
6
6
|
:seamless="seamless"
|
7
7
|
:class="{'hide-backdrop': !overlay}"
|
8
|
+
@hide="$emit('update:show', false)"
|
8
9
|
>
|
9
10
|
<div>
|
10
11
|
<div
|
@@ -21,45 +22,37 @@
|
|
21
22
|
</QDialog>
|
22
23
|
</template>
|
23
24
|
|
24
|
-
<script setup>
|
25
|
-
import {
|
25
|
+
<script setup lang="ts">
|
26
|
+
import { QDialogProps } from "quasar";
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
default: "bottom"
|
36
|
-
},
|
37
|
-
contentClass: {
|
38
|
-
type: String,
|
39
|
-
default: "py-8 px-12"
|
40
|
-
},
|
41
|
-
title: {
|
42
|
-
type: String,
|
43
|
-
default: "Edit"
|
44
|
-
}
|
45
|
-
});
|
28
|
+
export interface ContentDrawerProps {
|
29
|
+
show?: boolean,
|
30
|
+
overlay?: boolean,
|
31
|
+
position?: QDialogProps["position"],
|
32
|
+
seamless?: boolean,
|
33
|
+
contentClass?: string,
|
34
|
+
title?: string
|
35
|
+
}
|
46
36
|
|
47
|
-
|
48
|
-
|
49
|
-
|
37
|
+
defineEmits(["update:show"]);
|
38
|
+
withDefaults(defineProps<ContentDrawerProps>(), {
|
39
|
+
show: false,
|
40
|
+
position: "bottom",
|
41
|
+
contentClass: "py-8 px-12",
|
42
|
+
title: "Edit"
|
50
43
|
});
|
51
44
|
</script>
|
52
45
|
|
53
46
|
<style lang="scss" module="cls">
|
54
47
|
.dialog-title {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
48
|
+
@apply font-medium uppercase text-xs px-6 py-3 border-b rounded-t-md bg-slate-100 text-gray-500 border-gray-200;
|
49
|
+
font-family: "Roboto", sans-serif;
|
50
|
+
letter-spacing: 0.05em;
|
51
|
+
box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.25);
|
59
52
|
}
|
60
53
|
|
61
54
|
.dialog-content {
|
62
|
-
|
63
|
-
|
55
|
+
@apply bg-white;
|
56
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
|
64
57
|
}
|
65
58
|
</style>
|
@@ -16,8 +16,8 @@ import RenderVnode from "./RenderVnode";
|
|
16
16
|
|
17
17
|
const isSaving = ref(false);
|
18
18
|
async function onConfirm(input) {
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
isSaving.value = true;
|
20
|
+
await activeActionVnode.value.confirm(input);
|
21
|
+
isSaving.value = false;
|
22
22
|
}
|
23
23
|
</script>
|
@@ -2,20 +2,29 @@
|
|
2
2
|
import { isRef, isVNode } from "vue";
|
3
3
|
|
4
4
|
const RenderVnode = (props) => {
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
if (isVNode(props.vnode)) {
|
6
|
+
return props.vnode;
|
7
|
+
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
if (isRef(props.vnode)) {
|
10
|
+
return props.vnode.value;
|
11
|
+
}
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
if (typeof props.vnode === "function") {
|
14
|
+
return props.vnode(props.props);
|
15
|
+
}
|
16
16
|
|
17
|
-
|
17
|
+
return null;
|
18
|
+
};
|
19
|
+
RenderVnode.props = {
|
20
|
+
vnode: {
|
21
|
+
type: [Function, Object],
|
22
|
+
required: true
|
23
|
+
},
|
24
|
+
props: {
|
25
|
+
type: Object,
|
26
|
+
default: () => ({})
|
27
|
+
}
|
18
28
|
};
|
19
|
-
RenderVnode.props = { vnode: { type: [Function, Object], required: true } };
|
20
29
|
export default RenderVnode;
|
21
30
|
</script>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<template>
|
2
|
+
<Transition name="maxHeight">
|
3
|
+
<slot />
|
4
|
+
</Transition>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script setup lang="ts">
|
8
|
+
defineProps<{
|
9
|
+
maxHeight: string,
|
10
|
+
}>();
|
11
|
+
</script>
|
12
|
+
<style lang="scss">
|
13
|
+
.maxHeight-enter-active,
|
14
|
+
.maxHeight-leave-active {
|
15
|
+
transition: all .3s linear;
|
16
|
+
max-height: v-bind(maxHeight);
|
17
|
+
}
|
18
|
+
|
19
|
+
.maxHeight-enter-to, .maxHeight-leave-from {
|
20
|
+
max-height: v-bind(maxHeight);
|
21
|
+
}
|
22
|
+
|
23
|
+
.maxHeight-enter-from, .maxHeight-leave-to {
|
24
|
+
max-height: 0;
|
25
|
+
}
|
26
|
+
</style>
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export { default as ListTransition } from "./ListTransition.vue";
|
2
|
+
export { default as MaxHeightTransition } from "./MaxHeightTransition.vue";
|
2
3
|
export { default as SlideTransition } from "./SlideTransition.vue";
|
3
4
|
export { default as StaggeredListTransition } from "./StaggeredListTransition.vue";
|
package/src/config/index.ts
CHANGED
@@ -1,36 +1,41 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { FileUploadOptions } from "../helpers";
|
1
|
+
import { shallowRef } from "vue";
|
2
|
+
import { DanxOptions } from "../types";
|
4
3
|
|
5
|
-
export
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
flashMessages: {
|
24
|
-
default: {},
|
25
|
-
success: {},
|
26
|
-
warning: {},
|
27
|
-
error: {}
|
28
|
-
}
|
4
|
+
export const danxOptions = shallowRef<DanxOptions>({
|
5
|
+
tinyMceApiKey: "set-api-key-in-danx-options",
|
6
|
+
request: {
|
7
|
+
baseUrl: "",
|
8
|
+
headers: {},
|
9
|
+
onUnauthorized: undefined
|
10
|
+
},
|
11
|
+
fileUpload: {
|
12
|
+
directory: "file-upload",
|
13
|
+
createPresignedUpload: null,
|
14
|
+
completePresignedUpload: null
|
15
|
+
},
|
16
|
+
flashMessages: {
|
17
|
+
default: {},
|
18
|
+
success: {},
|
19
|
+
warning: {},
|
20
|
+
error: {}
|
21
|
+
}
|
29
22
|
});
|
30
23
|
|
31
24
|
export function configure(options: DanxOptions) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
danxOptions.value = {
|
26
|
+
...danxOptions.value,
|
27
|
+
...options,
|
28
|
+
fileUpload: {
|
29
|
+
...danxOptions.value.fileUpload,
|
30
|
+
...options.fileUpload
|
31
|
+
},
|
32
|
+
flashMessages: {
|
33
|
+
...danxOptions.value.flashMessages,
|
34
|
+
...options.flashMessages
|
35
|
+
},
|
36
|
+
request: {
|
37
|
+
...danxOptions.value.request,
|
38
|
+
...options.request
|
39
|
+
}
|
40
|
+
};
|
36
41
|
}
|