quasar-ui-danx 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +5 -0
- package/dist/index.min.css +5 -0
- package/dist/index.rtl.css +5 -0
- package/dist/index.rtl.min.css +5 -0
- package/package.json +6 -1
- package/src/components/ActionTable/ActionTable.vue +49 -41
- package/src/components/ActionTable/BatchActionMenu.vue +20 -20
- package/src/components/ActionTable/EmptyTableState.vue +5 -5
- package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +11 -11
- package/src/components/ActionTable/Filters/FilterGroupItem.vue +7 -7
- package/src/components/ActionTable/Filters/FilterGroupList.vue +29 -29
- package/src/components/ActionTable/Filters/FilterListToggle.vue +15 -15
- package/src/components/ActionTable/Filters/FilterableField.vue +82 -80
- package/src/components/ActionTable/Filters/index.ts +5 -0
- package/src/components/ActionTable/Form/Fields/BooleanField.vue +13 -13
- package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +11 -11
- package/src/components/ActionTable/Form/Fields/DateField.vue +13 -13
- package/src/components/ActionTable/Form/Fields/DateRangeField.vue +25 -25
- package/src/components/ActionTable/Form/Fields/DateTimeField.vue +21 -21
- package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +23 -23
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +31 -31
- package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +19 -19
- package/src/components/ActionTable/Form/Fields/IntegerField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/LabelValueBlock.vue +22 -0
- package/src/components/ActionTable/Form/Fields/LabeledInput.vue +19 -19
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +40 -40
- package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +23 -23
- package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +10 -10
- package/src/components/ActionTable/Form/Fields/NumberField.vue +29 -29
- package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +33 -33
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +36 -36
- package/src/components/ActionTable/Form/Fields/SelectField.vue +66 -66
- package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +23 -23
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +32 -32
- package/src/components/ActionTable/Form/Fields/TextField.vue +36 -36
- package/src/components/ActionTable/Form/Fields/WysiwygField.vue +16 -16
- package/src/components/ActionTable/Form/Fields/index.ts +23 -23
- package/src/components/ActionTable/Form/RenderedForm.vue +27 -25
- package/src/components/ActionTable/Form/index.ts +2 -0
- package/src/components/ActionTable/TableSummaryRow.vue +33 -33
- package/src/components/ActionTable/index.ts +8 -13
- package/src/components/ActionTable/listActions.ts +340 -339
- package/src/components/ActionTable/listHelpers.ts +74 -0
- package/src/components/ActionTable/tableColumns.ts +56 -56
- package/src/components/DragAndDrop/HandleDraggable.vue +29 -29
- package/src/components/DragAndDrop/ListItemDraggable.vue +10 -10
- package/src/components/DragAndDrop/index.ts +0 -1
- package/src/components/DragAndDrop/listDragAndDrop.ts +1 -1
- package/src/components/Utility/CollapsableSidebar.vue +35 -35
- package/src/components/Utility/ContentDrawer.vue +20 -20
- package/src/components/Utility/Dialogs/ConfirmDialog.vue +55 -55
- package/src/components/Utility/Dialogs/FullScreenDialog.vue +18 -18
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +105 -0
- package/src/components/Utility/Dialogs/InfoDialog.vue +10 -10
- package/src/components/Utility/Dialogs/InputDialog.vue +13 -13
- package/src/components/Utility/ImagePreview.vue +192 -0
- package/src/components/Utility/Popover/PopoverMenu.vue +64 -0
- package/src/components/Utility/Transitions/StaggeredListTransition.vue +15 -15
- package/src/components/Utility/index.ts +11 -9
- package/src/components/index.ts +1 -1
- package/src/helpers/FileUpload.ts +274 -273
- package/src/helpers/compatibility.ts +45 -45
- package/src/helpers/date.ts +2 -2
- package/src/helpers/download.ts +166 -158
- package/src/helpers/downloadPdf.ts +48 -48
- package/src/helpers/files.ts +42 -42
- package/src/helpers/index.ts +2 -0
- package/src/helpers/multiFileUpload.ts +56 -56
- package/src/helpers/singleFileUpload.ts +49 -49
- package/src/index.esm.js +3 -4
- package/src/svg/FilterIcon.svg +7 -0
- package/src/svg/ImageIcon.svg +30 -0
- package/src/svg/PdfIcon.svg +21 -0
- package/src/svg/PercentIcon.svg +13 -0
- package/src/svg/TrashIcon.svg +15 -0
- package/src/svg/XIcon.svg +18 -0
- package/src/svg/index.ts +8 -0
- package/src/vendor/tinymce-config.ts +1 -0
- package/src/vue-plugin.js +7 -4
- package/tsconfig.json +18 -14
- package/src/components/ActionTable/tableHelpers.ts +0 -83
- package/src/components/DragAndDrop/Icons/index.ts +0 -2
- /package/src/{components/DragAndDrop/Icons → svg}/DragHandleDotsIcon.svg +0 -0
- /package/src/{components/DragAndDrop/Icons → svg}/DragHandleIcon.svg +0 -0
package/dist/index.css
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "quasar-ui-danx",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.13",
|
4
4
|
"author": "Dan <dan@flytedesk.com>",
|
5
5
|
"description": "DanX Vue / Quasar component library",
|
6
6
|
"license": "MIT",
|
@@ -62,7 +62,12 @@
|
|
62
62
|
"last 4 iOS versions"
|
63
63
|
],
|
64
64
|
"dependencies": {
|
65
|
+
"@heroicons/vue": "v1",
|
66
|
+
"@tinymce/tinymce-vue": "^5.1.1",
|
65
67
|
"@vueuse/core": "^10.7.2",
|
68
|
+
"exifreader": "^4.21.1",
|
69
|
+
"gsap": "^3.12.5",
|
70
|
+
"luxon": "^3.4.4",
|
66
71
|
"tailwindcss": "^3.4.1"
|
67
72
|
}
|
68
73
|
}
|
@@ -1,19 +1,18 @@
|
|
1
|
-
<!--suppress VueUnrecognizedSlot -->
|
2
1
|
<template>
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
<q-table
|
3
|
+
ref="actionTable"
|
4
|
+
:selected="selectedRows"
|
5
|
+
:pagination="quasarPagination"
|
6
|
+
:columns="columns"
|
7
|
+
:loading="isLoadingList"
|
8
|
+
:rows="pagedItems?.data || []"
|
9
|
+
selection="multiple"
|
10
|
+
:rows-per-page-options="rowsPerPageOptions"
|
11
|
+
class="sticky-column sticky-header w-full !border-0"
|
12
|
+
color="blue-base"
|
13
|
+
@update:selected="$emit('update:selected-rows', $event)"
|
14
|
+
@update:pagination="() => {}"
|
15
|
+
@request="$emit('update:quasar-pagination', $event.pagination)"
|
17
16
|
>
|
18
17
|
<template #no-data>
|
19
18
|
<slot name="empty">
|
@@ -22,38 +21,38 @@
|
|
22
21
|
</template>
|
23
22
|
<template #top-row>
|
24
23
|
<TableSummaryRow
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
:label="label"
|
25
|
+
:item-count="summary?.count || 0"
|
26
|
+
:selected-count="selectedRows.length"
|
27
|
+
:loading="isLoadingSummary"
|
28
|
+
:summary="summary"
|
29
|
+
:columns="columns"
|
30
|
+
@clear="$emit('update:selected-rows', [])"
|
32
31
|
/>
|
33
32
|
</template>
|
34
33
|
<template #header-cell="rowProps">
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
<q-th
|
35
|
+
:key="rowProps.key"
|
36
|
+
:props="rowProps"
|
37
|
+
:data-drop-zone="`resize-column-` + rowProps.col.name"
|
39
38
|
>
|
40
39
|
{{ rowProps.col.label }}
|
41
40
|
<HandleDraggable
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
v-if="rowProps.col.resizeable"
|
42
|
+
:drop-zone="`resize-column-` + rowProps.col.name"
|
43
|
+
class="resize-handle"
|
44
|
+
@resize="rowProps.col.onResize"
|
46
45
|
>
|
47
46
|
<RowResizeIcon class="w-4 text-neutral-base" />
|
48
47
|
</HandleDraggable>
|
49
|
-
</
|
48
|
+
</q-th>
|
50
49
|
</template>
|
51
50
|
<template #body-cell="rowProps">
|
52
|
-
<
|
51
|
+
<q-td :key="rowProps.key" :props="rowProps">
|
53
52
|
<template v-if="rowProps.col.component">
|
54
53
|
<RenderComponentColumn
|
55
|
-
|
56
|
-
|
54
|
+
:row-props="rowProps"
|
55
|
+
@action="$emit('action', $event)"
|
57
56
|
/>
|
58
57
|
</template>
|
59
58
|
<template v-else-if="rowProps.col.fieldList">
|
@@ -71,18 +70,23 @@
|
|
71
70
|
{{ rowProps.value }}
|
72
71
|
</slot>
|
73
72
|
</template>
|
74
|
-
</
|
73
|
+
</q-td>
|
75
74
|
</template>
|
76
|
-
</
|
75
|
+
</q-table>
|
77
76
|
</template>
|
78
77
|
|
79
78
|
<script setup>
|
80
|
-
import {
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
import {
|
80
|
+
EmptyTableState,
|
81
|
+
HandleDraggable,
|
82
|
+
registerStickyScrolling,
|
83
|
+
RenderComponentColumn,
|
84
|
+
TableSummaryRow
|
85
|
+
} from '@ui/components';
|
86
|
+
import { DragHandleIcon as RowResizeIcon } from '@ui/svg';
|
87
|
+
import { ref } from 'vue';
|
84
88
|
|
85
|
-
defineEmits([
|
89
|
+
defineEmits(['action', 'filter', 'update:quasar-pagination', 'update:selected-rows']);
|
86
90
|
defineProps({
|
87
91
|
label: {
|
88
92
|
type: String,
|
@@ -109,6 +113,10 @@ defineProps({
|
|
109
113
|
columns: {
|
110
114
|
type: Array,
|
111
115
|
required: true
|
116
|
+
},
|
117
|
+
rowsPerPageOptions: {
|
118
|
+
type: Array,
|
119
|
+
default: () => [10, 25, 50, 100]
|
112
120
|
}
|
113
121
|
});
|
114
122
|
const actionTable = ref(null);
|
@@ -1,31 +1,31 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
3
|
<PopoverMenu
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
class="bg-neutral-plus-6 px-4 h-full flex"
|
5
|
+
:items="items"
|
6
|
+
:disabled="selectedRows.length === 0"
|
7
|
+
@action="onAction"
|
8
8
|
/>
|
9
|
-
<
|
9
|
+
<q-tooltip v-if="selectedRows.length === 0">
|
10
10
|
Batch actions require a selection
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
</q-tooltip>
|
12
|
+
<slot>
|
13
|
+
<Component
|
14
|
+
:is="activeComponent.is"
|
15
|
+
v-if="activeComponent"
|
16
|
+
v-bind="activeComponent.props"
|
17
|
+
:is-saving="isSaving"
|
18
|
+
@close="activeAction = false"
|
19
|
+
@confirm="onConfirmAction"
|
20
|
+
/>
|
21
|
+
</slot>
|
22
22
|
</div>
|
23
23
|
</template>
|
24
24
|
<script setup>
|
25
|
-
import PopoverMenu from
|
26
|
-
import { computed, ref } from
|
25
|
+
import PopoverMenu from '@ui/components/Utility/Popover/PopoverMenu';
|
26
|
+
import { computed, ref } from 'vue';
|
27
27
|
|
28
|
-
const emit = defineEmits([
|
28
|
+
const emit = defineEmits(['action']);
|
29
29
|
const props = defineProps({
|
30
30
|
items: {
|
31
31
|
type: Array,
|
@@ -48,7 +48,7 @@ const activeComponent = computed(() => (props.items.find(i => i.action === activ
|
|
48
48
|
|
49
49
|
function onAction(action) {
|
50
50
|
activeAction.value = action;
|
51
|
-
emit(
|
51
|
+
emit('action', action);
|
52
52
|
}
|
53
53
|
async function onConfirmAction(input) {
|
54
54
|
const result = await props.applyBatchAction(input || activeComponent.value.input());
|
@@ -2,12 +2,12 @@
|
|
2
2
|
<div class="flex items-center justify-center text-sm py-14 w-full">
|
3
3
|
<div v-if="loading">
|
4
4
|
<slot name="loading">{{ loadingText }}
|
5
|
-
<
|
5
|
+
<q-spinner-ball class="w-4 ml-2" />
|
6
6
|
</slot>
|
7
7
|
</div>
|
8
8
|
<div v-if="saving">
|
9
9
|
<slot name="saving">{{ savingText }}
|
10
|
-
<
|
10
|
+
<q-spinner-ball class="w-4 ml-2" />
|
11
11
|
</slot>
|
12
12
|
</div>
|
13
13
|
<slot>{{ text }}</slot>
|
@@ -19,15 +19,15 @@ defineProps({
|
|
19
19
|
saving: Boolean,
|
20
20
|
text: {
|
21
21
|
type: String,
|
22
|
-
default:
|
22
|
+
default: 'No records found'
|
23
23
|
},
|
24
24
|
loadingText: {
|
25
25
|
type: String,
|
26
|
-
default:
|
26
|
+
default: 'Loading...'
|
27
27
|
},
|
28
28
|
savingText: {
|
29
29
|
type: String,
|
30
|
-
default:
|
30
|
+
default: 'Saving...'
|
31
31
|
}
|
32
32
|
});
|
33
33
|
</script>
|
@@ -1,23 +1,23 @@
|
|
1
1
|
<template>
|
2
2
|
<CollapsableSidebar
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
:collapse="!showFilters"
|
4
|
+
disabled
|
5
|
+
min-width="0"
|
6
|
+
max-width="18rem"
|
7
|
+
name="admin-ads"
|
8
|
+
@update:collapse="$emit('update:show-filters', !$event)"
|
9
9
|
>
|
10
10
|
<FilterGroupList
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
:filter="filter"
|
12
|
+
:filter-groups="filterGroups"
|
13
|
+
@update:filter="$emit('update:filter', $event)"
|
14
14
|
/>
|
15
15
|
</CollapsableSidebar>
|
16
16
|
</template>
|
17
17
|
<script setup>
|
18
|
-
import { CollapsableSidebar, FilterGroupList } from
|
18
|
+
import { CollapsableSidebar, FilterGroupList } from '@ui/components';
|
19
19
|
|
20
|
-
defineEmits([
|
20
|
+
defineEmits(['update:filter', 'update:show-filters']);
|
21
21
|
defineProps({
|
22
22
|
name: {
|
23
23
|
type: String,
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<q-expansion-item>
|
3
3
|
<template #header>
|
4
4
|
<div class="flex items-center flex-nowrap flex-grow">
|
5
5
|
<div class="whitespace-nowrap flex-grow text-left text-sm font-bold">{{ name }}</div>
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
<q-badge
|
7
|
+
:label="count"
|
8
|
+
rounded
|
9
|
+
class="ml-2 transition-all"
|
10
|
+
:class="{'bg-gray-base': !count, 'bg-blue-base': count}"
|
11
11
|
/>
|
12
12
|
</div>
|
13
13
|
</template>
|
14
14
|
<slot />
|
15
|
-
</
|
15
|
+
</q-expansion-item>
|
16
16
|
</template>
|
17
17
|
<script setup>
|
18
18
|
defineProps({
|
@@ -1,52 +1,52 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<q-list>
|
3
3
|
<div class="px-4 py-2 max-w-full">
|
4
4
|
<template
|
5
|
-
|
6
|
-
|
5
|
+
v-for="(group, index) in filterGroups"
|
6
|
+
:key="'group-' + group.name"
|
7
7
|
>
|
8
8
|
<template v-if="group.flat">
|
9
9
|
<FilterableField
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
v-for="field in group.fields"
|
11
|
+
:key="'field-' + field.name"
|
12
|
+
:model-value="field.calcValue ? field.calcValue(filter) : filter[field.name]"
|
13
|
+
:field="field"
|
14
|
+
:loading="loading"
|
15
|
+
class="mb-4"
|
16
|
+
@update:model-value="updateFilter(field, $event)"
|
17
17
|
/>
|
18
18
|
</template>
|
19
19
|
|
20
20
|
<FilterGroupItem
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
v-else
|
22
|
+
:name="group.name"
|
23
|
+
:count="activeCountByGroup[group.name]"
|
24
24
|
>
|
25
25
|
<FilterableField
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
v-for="field in group.fields"
|
27
|
+
:key="'field-' + field.name"
|
28
|
+
:model-value="field.calcValue ? field.calcValue(filter) : filter[field.name]"
|
29
|
+
:field="field"
|
30
|
+
:loading="loading"
|
31
|
+
class="mb-4"
|
32
|
+
@update:model-value="updateFilter(field, $event)"
|
33
33
|
/>
|
34
34
|
</FilterGroupItem>
|
35
35
|
|
36
|
-
<
|
37
|
-
|
38
|
-
|
36
|
+
<q-separator
|
37
|
+
v-if="index < (filterGroups.length - 1)"
|
38
|
+
class="my-2"
|
39
39
|
/>
|
40
40
|
</template>
|
41
41
|
</div>
|
42
|
-
|
42
|
+
</q-list>
|
43
43
|
</template>
|
44
44
|
<script setup>
|
45
|
-
import
|
46
|
-
import
|
47
|
-
import
|
45
|
+
import { computed } from 'vue';
|
46
|
+
import FilterableField from './FilterableField';
|
47
|
+
import FilterGroupItem from './FilterGroupItem';
|
48
48
|
|
49
|
-
const emit = defineEmits([
|
49
|
+
const emit = defineEmits(['update:filter']);
|
50
50
|
const props = defineProps({
|
51
51
|
filterGroups: {
|
52
52
|
type: Array,
|
@@ -71,6 +71,6 @@ function updateFilter(field, value) {
|
|
71
71
|
if (field.filterBy) {
|
72
72
|
fieldFilter = field.filterBy(value);
|
73
73
|
}
|
74
|
-
emit(
|
74
|
+
emit('update:filter', { ...props.filter, ...fieldFilter });
|
75
75
|
}
|
76
76
|
</script>
|
@@ -1,31 +1,31 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="flex items-center" :class="{'w-72': showFilters}">
|
3
3
|
<div class="flex-grow">
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
<q-btn
|
5
|
+
class="btn-blue-highlight"
|
6
|
+
:class="{'highlighted': showFilters}"
|
7
|
+
@click="$emit('update:show-filters', !showFilters)"
|
8
8
|
>
|
9
9
|
<FilterIcon class="w-5 mr-2" />
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
<q-badge
|
11
|
+
:label="'' + activeCount"
|
12
|
+
rounded
|
13
|
+
:color="activeCount > 0 ? 'blue-base' : 'gray-base'"
|
14
14
|
/>
|
15
|
-
|
15
|
+
</q-btn>
|
16
16
|
</div>
|
17
17
|
<a
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
v-if="activeCount > 0"
|
19
|
+
class="text-blue-base hover:text-blue-plus-1 text-sm ml-4"
|
20
|
+
@click="$emit('update:filter', {})"
|
21
21
|
>Clear All</a>
|
22
22
|
</div>
|
23
23
|
</template>
|
24
24
|
<script setup>
|
25
|
-
import { FilterIcon } from
|
26
|
-
import { computed } from
|
25
|
+
import { FilterIcon } from '@ui/svg';
|
26
|
+
import { computed } from 'vue';
|
27
27
|
|
28
|
-
defineEmits([
|
28
|
+
defineEmits(['update:show-filters', 'update:filter']);
|
29
29
|
const props = defineProps({
|
30
30
|
filter: {
|
31
31
|
type: Object,
|