quasar-ui-danx 0.3.10 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +599 -593
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +5 -5
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ActionTable/ActionMenu.vue +7 -7
- package/src/components/ActionTable/ActionTable.vue +33 -29
- package/src/components/ActionTable/ActionTableColumn.vue +37 -15
- package/src/components/ActionTable/ActionTableHeaderColumn.vue +9 -9
- package/src/components/ActionTable/Columns/ColumnListItem.vue +33 -10
- package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +23 -19
- package/src/components/ActionTable/Columns/TitleColumnFormat.vue +5 -3
- package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +24 -22
- package/src/components/ActionTable/EmptyTableState.vue +4 -2
- package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +9 -9
- package/src/components/ActionTable/Filters/FilterFieldItem.vue +7 -5
- package/src/components/ActionTable/Filters/FilterFieldList.vue +21 -21
- package/src/components/ActionTable/Filters/FilterListToggle.vue +13 -10
- package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +14 -7
- package/src/components/ActionTable/Filters/FilterableField.vue +75 -70
- package/src/components/ActionTable/Form/Fields/BooleanField.vue +9 -9
- package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/DateField.vue +4 -4
- package/src/components/ActionTable/Form/Fields/DateRangeField.vue +9 -9
- package/src/components/ActionTable/Form/Fields/DateTimeField.vue +13 -10
- package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +36 -14
- package/src/components/ActionTable/Form/Fields/EditableDiv.vue +3 -3
- package/src/components/ActionTable/Form/Fields/FieldLabel.vue +2 -2
- package/src/components/ActionTable/Form/Fields/FileUploadButton.vue +23 -20
- package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +10 -10
- package/src/components/ActionTable/Form/Fields/IntegerField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/LabeledInput.vue +20 -17
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +35 -35
- package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +15 -15
- package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +4 -4
- package/src/components/ActionTable/Form/Fields/NumberField.vue +11 -11
- package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +11 -11
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +38 -33
- package/src/components/ActionTable/Form/Fields/SelectField.vue +37 -35
- package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +19 -15
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +29 -28
- package/src/components/ActionTable/Form/Fields/TextField.vue +22 -22
- package/src/components/ActionTable/Form/Fields/WysiwygField.vue +13 -13
- package/src/components/ActionTable/Form/RenderedForm.vue +5 -1
- package/src/components/ActionTable/TableSummaryRow.vue +15 -15
- package/src/components/AuditHistory/AuditHistoryItem.vue +12 -6
- package/src/components/AuditHistory/AuditHistoryItemValue.vue +6 -6
- package/src/components/DragAndDrop/HandleDraggable.vue +21 -21
- package/src/components/DragAndDrop/ListItemDraggable.vue +19 -15
- package/src/components/PanelsDrawer/PanelsDrawer.vue +18 -11
- package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +9 -5
- package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +18 -13
- package/src/components/Utility/Buttons/ExportButton.vue +5 -1
- package/src/components/Utility/Buttons/RefreshButton.vue +2 -2
- package/src/components/Utility/Controls/PreviousNextControls.vue +8 -8
- package/src/components/Utility/Dialogs/ConfirmDialog.vue +32 -29
- package/src/components/Utility/Dialogs/FullScreenDialog.vue +12 -9
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +30 -26
- package/src/components/Utility/Dialogs/InfoDialog.vue +25 -22
- package/src/components/Utility/Dialogs/InputDialog.vue +7 -7
- package/src/components/Utility/Files/FilePreview.vue +64 -47
- package/src/components/Utility/Files/SvgImg.vue +7 -4
- package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +11 -3
- package/src/components/Utility/Layouts/CollapsableSidebar.vue +15 -15
- package/src/components/Utility/Layouts/ContentDrawer.vue +8 -8
- package/src/components/Utility/Popovers/InteractiveTooltip.vue +7 -7
- package/src/components/Utility/Popovers/PopoverMenu.vue +21 -21
- package/src/components/Utility/Tabs/BadgeTab.vue +9 -7
- package/src/components/Utility/Tools/ActionVnode.vue +5 -5
- package/src/components/Utility/Tools/RenderComponent.vue +11 -9
- package/src/components/Utility/Transitions/StaggeredListTransition.vue +7 -7
- package/src/config/index.ts +7 -4
- package/src/helpers/FileUpload.ts +1 -1
- package/src/helpers/FlashMessages.ts +5 -5
- package/src/vendor/tinymce-config.ts +0 -1
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<PopoverMenu
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
class="px-2 flex action-button"
|
4
|
+
:items="activeActions"
|
5
|
+
:disabled="!hasTarget"
|
6
|
+
:tooltip="!hasTarget ? tooltip : null"
|
7
|
+
:loading="isSaving || loading"
|
8
|
+
:loading-component="loadingComponent"
|
9
|
+
@action-item="onAction"
|
10
10
|
/>
|
11
11
|
</template>
|
12
12
|
<script setup>
|
@@ -2,20 +2,20 @@
|
|
2
2
|
<div class="overflow-hidden w-full">
|
3
3
|
<ActionVnode />
|
4
4
|
<QTable
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
5
|
+
ref="actionTable"
|
6
|
+
:selected="selectedRows"
|
7
|
+
:pagination="quasarPagination"
|
8
|
+
:columns="columns"
|
9
|
+
:loading="isLoadingList"
|
10
|
+
:rows="pagedItems?.data || []"
|
11
|
+
:binary-state-sort="false"
|
12
|
+
selection="multiple"
|
13
|
+
:rows-per-page-options="rowsPerPageOptions"
|
14
|
+
class="sticky-column sticky-header w-full h-full !border-0"
|
15
|
+
color="blue-600"
|
16
|
+
@update:selected="$emit('update:selected-rows', $event)"
|
17
|
+
@update:pagination="() => {}"
|
18
|
+
@request="$emit('update:quasar-pagination', {...$event.pagination, __sort: mapSortBy($event.pagination, columns)})"
|
19
19
|
>
|
20
20
|
<template #no-data>
|
21
21
|
<slot name="empty">
|
@@ -24,30 +24,34 @@
|
|
24
24
|
</template>
|
25
25
|
<template #top-row>
|
26
26
|
<TableSummaryRow
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
:label="label"
|
28
|
+
:item-count="summary?.count || 0"
|
29
|
+
:selected-count="selectedRows.length"
|
30
|
+
:loading="isLoadingSummary"
|
31
|
+
:summary="summary"
|
32
|
+
:columns="columns"
|
33
|
+
@clear="$emit('update:selected-rows', [])"
|
34
34
|
/>
|
35
35
|
</template>
|
36
36
|
<template #header-cell="rowProps">
|
37
37
|
<ActionTableHeaderColumn
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
v-model="columnSettings"
|
39
|
+
:row-props="rowProps"
|
40
|
+
:name="name"
|
41
|
+
@update:model-value="onUpdateColumnSettings"
|
42
42
|
/>
|
43
43
|
</template>
|
44
44
|
<template #body-cell="rowProps">
|
45
45
|
<ActionTableColumn
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
:key="rowProps.key"
|
47
|
+
:row-props="rowProps"
|
48
|
+
:settings="columnSettings[rowProps.col.name]"
|
49
49
|
>
|
50
|
-
<slot
|
50
|
+
<slot
|
51
|
+
:column-name="rowProps.col.name"
|
52
|
+
:row="rowProps.row"
|
53
|
+
:value="rowProps.value"
|
54
|
+
/>
|
51
55
|
</ActionTableColumn>
|
52
56
|
</template>
|
53
57
|
</QTable>
|
@@ -1,30 +1,52 @@
|
|
1
1
|
<template>
|
2
|
-
<QTd
|
2
|
+
<QTd
|
3
|
+
:key="rowProps.key"
|
4
|
+
:props="rowProps"
|
5
|
+
:style="columnStyle"
|
6
|
+
>
|
3
7
|
<div :style="columnStyle">
|
4
8
|
<div
|
5
|
-
|
6
|
-
|
9
|
+
class="flex items-center flex-nowrap"
|
10
|
+
:class="columnClass"
|
7
11
|
>
|
8
12
|
<div class="flex-grow overflow-hidden">
|
9
13
|
<a
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
v-if="column.onClick"
|
15
|
+
:class="column.innerClass"
|
16
|
+
@click="column.onClick(row)"
|
13
17
|
>
|
14
|
-
<RenderVnode
|
18
|
+
<RenderVnode
|
19
|
+
v-if="column.vnode"
|
20
|
+
:vnode="column.vnode(row)"
|
21
|
+
/>
|
15
22
|
<slot v-else>{{ value }}</slot>
|
16
23
|
</a>
|
17
|
-
<div
|
18
|
-
|
19
|
-
|
24
|
+
<div
|
25
|
+
v-else
|
26
|
+
:class="column.innerClass"
|
27
|
+
>
|
28
|
+
<RenderVnode
|
29
|
+
v-if="column.vnode"
|
30
|
+
:vnode="column.vnode(row)"
|
31
|
+
/>
|
32
|
+
<slot v-else>
|
33
|
+
{{ value }}
|
34
|
+
</slot>
|
20
35
|
</div>
|
21
|
-
<TitleColumnFormat
|
36
|
+
<TitleColumnFormat
|
37
|
+
v-if="column.titleColumns"
|
38
|
+
:row="row"
|
39
|
+
:columns="column.titleColumns()"
|
40
|
+
/>
|
22
41
|
</div>
|
23
|
-
<div
|
42
|
+
<div
|
43
|
+
v-if="column.actionMenu"
|
44
|
+
class="flex flex-shrink-0 pl-2"
|
45
|
+
>
|
24
46
|
<ActionMenu
|
25
|
-
|
26
|
-
|
27
|
-
|
47
|
+
:actions="column.actionMenu"
|
48
|
+
:target="row"
|
49
|
+
:loading="isSaving"
|
28
50
|
/>
|
29
51
|
</div>
|
30
52
|
</div>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<template>
|
2
2
|
<QTh
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
:key="rowProps.key"
|
4
|
+
:props="rowProps"
|
5
|
+
:data-drop-zone="isResizeable && `resize-column-` + column.name"
|
6
|
+
:class="isResizeable && cls['handle-drop-zone']"
|
7
|
+
:style="columnStyle"
|
8
8
|
>
|
9
9
|
{{ column.label }}
|
10
10
|
<HandleDraggable
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
v-if="isResizeable"
|
12
|
+
:drop-zone="`resize-column-` + column.name"
|
13
|
+
:class="cls['resize-handle']"
|
14
|
+
@resize="onResizeColumn"
|
15
15
|
>
|
16
16
|
<RowResizeIcon class="w-4 text-gray-600" />
|
17
17
|
</HandleDraggable>
|
@@ -1,19 +1,42 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
|
-
|
4
|
-
|
3
|
+
class="flex items-center w-full"
|
4
|
+
:class="{'cursor-not-allowed': locked}"
|
5
5
|
>
|
6
|
-
<a
|
6
|
+
<a
|
7
|
+
v-if="locked"
|
8
|
+
class="text-zinc-800 cursor-not-allowed"
|
9
|
+
>
|
7
10
|
<LockedIcon class="w-4" />
|
8
11
|
</a>
|
9
|
-
<div class="font-semibold text-sm ml-5 py-3 flex-grow">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
<div class="font-semibold text-sm ml-5 py-3 flex-grow">
|
13
|
+
{{ column.label }}
|
14
|
+
</div>
|
15
|
+
<div
|
16
|
+
v-if="!locked"
|
17
|
+
class="flex items-center"
|
18
|
+
>
|
19
|
+
<a
|
20
|
+
class="py-2 px-1"
|
21
|
+
@click="$emit('visible', !visible)"
|
22
|
+
>
|
23
|
+
<VisibleIcon
|
24
|
+
v-if="visible"
|
25
|
+
class="w-4"
|
26
|
+
/>
|
27
|
+
<HiddenIcon
|
28
|
+
v-else
|
29
|
+
class="w-4 text-zinc-800"
|
30
|
+
/>
|
14
31
|
</a>
|
15
|
-
<a
|
16
|
-
|
32
|
+
<a
|
33
|
+
class="py-2 px-1"
|
34
|
+
@click="$emit('is-title', !isTitle)"
|
35
|
+
>
|
36
|
+
<IsTitleIcon
|
37
|
+
class="w-4"
|
38
|
+
:class="isTitle ? '' : 'text-gray-400'"
|
39
|
+
/>
|
17
40
|
<QTooltip>
|
18
41
|
<template v-if="!isTitle">Add to priority list</template>
|
19
42
|
<template v-else>Remove from priority list</template>
|
@@ -1,35 +1,39 @@
|
|
1
1
|
<template>
|
2
2
|
<InfoDialog
|
3
|
-
|
4
|
-
|
3
|
+
title="Column Settings"
|
4
|
+
@close="$emit('close')"
|
5
5
|
>
|
6
6
|
<div class="mb-4 text-sm">
|
7
7
|
Customize columns by visibility, order, or priority (maximum 3 additional).
|
8
8
|
</div>
|
9
9
|
<ColumnListItem
|
10
|
-
|
11
|
-
|
10
|
+
v-for="column in lockedColumns"
|
11
|
+
:key="column.name"
|
12
|
+
locked
|
13
|
+
visible
|
14
|
+
:column="column"
|
15
|
+
class="px-2.5 border border-gray-200 bg-white rounded-t-lg"
|
12
16
|
/>
|
13
17
|
<ListTransition
|
14
|
-
|
15
|
-
|
18
|
+
name="fade-down-list"
|
19
|
+
data-drop-zone="column-list"
|
16
20
|
>
|
17
21
|
<ListItemDraggable
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
v-for="(column, index) in sortableColumns"
|
23
|
+
:key="column.name"
|
24
|
+
:list-items="sortableColumns"
|
25
|
+
drop-zone="column-list"
|
26
|
+
class="px-2 border border-gray-200 bg-white"
|
27
|
+
:class="{'rounded-b-lg': index === sortableColumns.length - 1}"
|
28
|
+
show-handle
|
29
|
+
@update:list-items="$emit('update:sortable-columns', $event)"
|
26
30
|
>
|
27
31
|
<ColumnListItem
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
32
|
+
:column="column"
|
33
|
+
:visible="isVisible(column)"
|
34
|
+
:is-title="isTitleColumn(column)"
|
35
|
+
@visible="onVisibilityChange(column, $event)"
|
36
|
+
@is-title="onTitleColumnChange(column, $event)"
|
33
37
|
/>
|
34
38
|
</ListItemDraggable>
|
35
39
|
</ListTransition>
|
@@ -1,9 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
3
|
<div
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
v-for="column in columns"
|
5
|
+
:key="column.name"
|
6
|
+
class="overflow-hidden overflow-ellipsis text-xs text-gray-400"
|
7
|
+
>
|
8
|
+
{{ format(row[column.name], column.format) }}
|
7
9
|
</div>
|
8
10
|
</div>
|
9
11
|
</template>
|
@@ -1,43 +1,45 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="flex items-center flex-nowrap">
|
3
3
|
<div
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
v-for="category in categories"
|
5
|
+
:key="category"
|
6
|
+
:class="getCategoryClass(category)"
|
7
7
|
>
|
8
8
|
<QCheckbox
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
toggle-indeterminate
|
10
|
+
size="20px"
|
11
|
+
:model-value="getCategoryCheckboxState(category)"
|
12
|
+
class="mr-2 cb-white-border"
|
13
|
+
@click="toggleColumns(columnsInCategory(category), !categoryHasVisibleColumns(category))"
|
14
14
|
/>
|
15
15
|
<div>
|
16
16
|
{{ category }}
|
17
17
|
</div>
|
18
18
|
<CaretDownIcon
|
19
|
-
|
20
|
-
|
19
|
+
class="ml-2 w-5 transition-all"
|
20
|
+
:class="{'rotate-180' : isShowingColumnToggle === category}"
|
21
21
|
/>
|
22
22
|
<QMenu
|
23
|
-
|
23
|
+
@update:model-value="isShowingColumnToggle = $event ? category : ''"
|
24
24
|
>
|
25
25
|
<QList>
|
26
26
|
<div
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
v-for="column in columnsInCategory(category)"
|
28
|
+
:key="column"
|
29
|
+
class="flex items-center flex-nowrap px-2 py-3 cursor-pointer"
|
30
|
+
@click="toggleColumn(column.name)"
|
31
31
|
>
|
32
32
|
<QCheckbox
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
:model-value="!hiddenColumnNames.includes(column.name)"
|
34
|
+
class="mr-3 cb-white-border"
|
35
|
+
size="20px"
|
36
|
+
:color="column.required ? 'gray-400': 'blue-600'"
|
37
|
+
:disable="column.required"
|
38
|
+
@click="toggleColumn(column.name)"
|
39
39
|
/>
|
40
|
-
<div class="text-xs">
|
40
|
+
<div class="text-xs">
|
41
|
+
{{ column.label }}
|
42
|
+
</div>
|
41
43
|
</div>
|
42
44
|
</QList>
|
43
45
|
</QMenu>
|
@@ -1,12 +1,14 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="flex items-center justify-center text-sm py-14 w-full">
|
3
3
|
<div v-if="loading">
|
4
|
-
<slot name="loading">
|
4
|
+
<slot name="loading">
|
5
|
+
{{ loadingText }}
|
5
6
|
<QSpinnerBall class="w-4 ml-2" />
|
6
7
|
</slot>
|
7
8
|
</div>
|
8
9
|
<div v-if="saving">
|
9
|
-
<slot name="saving">
|
10
|
+
<slot name="saving">
|
11
|
+
{{ savingText }}
|
10
12
|
<QSpinnerBall class="w-4 ml-2" />
|
11
13
|
</slot>
|
12
14
|
</div>
|
@@ -1,16 +1,16 @@
|
|
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="name"
|
8
|
+
@update:collapse="$emit('update:show-filters', !$event)"
|
9
9
|
>
|
10
10
|
<FilterFieldList
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
:filter="filter"
|
12
|
+
:filter-fields="filterFields"
|
13
|
+
@update:filter="$emit('update:filter', $event)"
|
14
14
|
/>
|
15
15
|
</CollapsableSidebar>
|
16
16
|
</template>
|
@@ -2,12 +2,14 @@
|
|
2
2
|
<QExpansionItem>
|
3
3
|
<template #header>
|
4
4
|
<div class="flex items-center flex-nowrap flex-grow">
|
5
|
-
<div class="whitespace-nowrap flex-grow text-left text-sm font-bold">
|
5
|
+
<div class="whitespace-nowrap flex-grow text-left text-sm font-bold">
|
6
|
+
{{ name }}
|
7
|
+
</div>
|
6
8
|
<QBadge
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
:label="count"
|
10
|
+
rounded
|
11
|
+
class="ml-2 transition-all"
|
12
|
+
:class="{'bg-gray-400': !count, 'bg-blue-600': count}"
|
11
13
|
/>
|
12
14
|
</div>
|
13
15
|
</template>
|
@@ -2,40 +2,40 @@
|
|
2
2
|
<QList>
|
3
3
|
<div class="px-4 py-2 max-w-full">
|
4
4
|
<template
|
5
|
-
|
6
|
-
|
5
|
+
v-for="(group, index) in filterFields"
|
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
|
<FilterFieldItem
|
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
|
</FilterFieldItem>
|
35
35
|
|
36
36
|
<QSeparator
|
37
|
-
|
38
|
-
|
37
|
+
v-if="index < (filterFields.length - 1)"
|
38
|
+
class="my-2"
|
39
39
|
/>
|
40
40
|
</template>
|
41
41
|
</div>
|
@@ -1,24 +1,27 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
2
|
+
<div
|
3
|
+
class="flex items-center transition-all"
|
4
|
+
:class="{'w-72': showFilters, 'w-[6.5rem]': !showFilters}"
|
5
|
+
>
|
3
6
|
<div class="flex-grow">
|
4
7
|
<QBtn
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
class="btn-blue-highlight border-blue-700"
|
9
|
+
:class="{'highlighted': showFilters}"
|
10
|
+
@click="$emit('update:show-filters', !showFilters)"
|
8
11
|
>
|
9
12
|
<FilterIcon class="w-5 mr-2" />
|
10
13
|
<QBadge
|
11
|
-
|
12
|
-
|
14
|
+
:label="'' + activeCount"
|
15
|
+
rounded
|
13
16
|
|
14
|
-
|
17
|
+
:color="activeCount > 0 ? 'blue-600' : 'gray-400'"
|
15
18
|
/>
|
16
19
|
</QBtn>
|
17
20
|
</div>
|
18
21
|
<a
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
v-if="activeCount > 0 && showFilters"
|
23
|
+
class="text-blue-600 hover:text-blue-500 text-sm ml-4"
|
24
|
+
@click="$emit('update:filter', {})"
|
22
25
|
>Clear All</a>
|
23
26
|
</div>
|
24
27
|
</template>
|
@@ -1,19 +1,26 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="w-full flex justify-end items-center flex-nowrap border-b">
|
3
3
|
<FilterListToggle
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
:show-filters="showFilters"
|
5
|
+
:filter="filter"
|
6
|
+
class="border-r p-4 flex-shrink-0"
|
7
|
+
@update:show-filters="onFilter"
|
8
|
+
@update:filter="$emit('update:filter', $event)"
|
9
9
|
/>
|
10
10
|
|
11
11
|
<div class="flex-grow">
|
12
12
|
<slot />
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<div
|
16
|
-
|
15
|
+
<div
|
16
|
+
v-if="$slots['right-side']"
|
17
|
+
class="flex justify-end items-stretch flex-nowrap p-4"
|
18
|
+
>
|
19
|
+
<QSeparator
|
20
|
+
v-if="$slots['default']"
|
21
|
+
vertical
|
22
|
+
class="mx-4 h-10 self-center"
|
23
|
+
/>
|
17
24
|
<slot name="right-side" />
|
18
25
|
</div>
|
19
26
|
</div>
|