quasar-ui-danx 0.2.16 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +11 -11
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +2 -2
- 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 +4 -4
- package/src/components/ActionTable/ActionTable.vue +12 -12
- package/src/components/ActionTable/ActionTableColumn.vue +11 -11
- package/src/components/ActionTable/Columns/ColumnListItem.vue +2 -2
- package/src/components/ActionTable/Columns/ColumnSettingsDialog.vue +8 -8
- package/src/components/ActionTable/Columns/TitleColumnFormat.vue +1 -1
- package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +7 -7
- package/src/components/ActionTable/EmptyTableState.vue +4 -4
- package/src/components/ActionTable/Filters/CollapsableFiltersSidebar.vue +3 -3
- package/src/components/ActionTable/Filters/FilterFieldList.vue +6 -6
- package/src/components/ActionTable/Filters/FilterListToggle.vue +3 -3
- package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +3 -3
- package/src/components/ActionTable/Filters/FilterableField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/BooleanField.vue +4 -4
- package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/DateField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/DateRangeField.vue +13 -13
- package/src/components/ActionTable/Form/Fields/DateTimeField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/DateTimePicker.vue +6 -6
- 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 +15 -15
- package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +7 -7
- package/src/components/ActionTable/Form/Fields/IntegerField.vue +2 -2
- package/src/components/ActionTable/Form/Fields/LabeledInput.vue +2 -2
- package/src/components/ActionTable/Form/Fields/MultiFileField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +8 -8
- package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/NumberField.vue +20 -20
- package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +20 -20
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +8 -8
- package/src/components/ActionTable/Form/Fields/SelectField.vue +36 -36
- package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +9 -9
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +6 -6
- package/src/components/ActionTable/Form/Fields/TextField.vue +15 -15
- package/src/components/ActionTable/Form/Fields/WysiwygField.vue +4 -4
- package/src/components/ActionTable/Form/RenderedForm.vue +5 -5
- package/src/components/ActionTable/TableSummaryRow.vue +8 -8
- package/src/components/ActionTable/listControls.ts +5 -5
- package/src/components/ActionTable/listHelpers.ts +1 -1
- package/src/components/ActionTable/tableColumns.ts +24 -1
- package/src/components/AuditHistory/AuditHistoryItem.vue +4 -4
- package/src/components/AuditHistory/AuditHistoryItemValue.vue +10 -10
- package/src/components/DragAndDrop/HandleDraggable.vue +8 -8
- package/src/components/DragAndDrop/ListItemDraggable.vue +8 -8
- package/src/components/DragAndDrop/dragAndDrop.ts +219 -219
- package/src/components/DragAndDrop/listDragAndDrop.ts +4 -4
- package/src/components/PanelsDrawer/PanelsDrawer.vue +7 -7
- package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +1 -1
- package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +4 -4
- package/src/components/Utility/Buttons/ExportButton.vue +4 -4
- package/src/components/Utility/Buttons/RefreshButton.vue +2 -2
- package/src/components/Utility/Controls/PreviousNextControls.vue +2 -2
- package/src/components/Utility/Dialogs/ConfirmDialog.vue +14 -14
- package/src/components/Utility/Dialogs/FullScreenDialog.vue +8 -8
- package/src/components/Utility/Dialogs/FullscreenCarouselDialog.vue +11 -11
- package/src/components/Utility/Dialogs/InfoDialog.vue +12 -12
- package/src/components/Utility/Dialogs/InputDialog.vue +5 -5
- package/src/components/Utility/Files/FilePreview.vue +10 -10
- package/src/components/Utility/Formats/GpsCoordinatesFormat.vue +4 -4
- package/src/components/Utility/Formats/IconWithTextFormat.vue +2 -2
- package/src/components/Utility/Formats/LabelValueFormat.vue +2 -2
- package/src/components/Utility/Layouts/CollapsableSidebar.vue +15 -15
- package/src/components/Utility/Layouts/ContentDrawer.vue +6 -6
- package/src/components/Utility/Popovers/InteractiveTooltip.vue +4 -4
- package/src/components/Utility/Popovers/PopoverMenu.vue +49 -49
- package/src/components/Utility/Tabs/BadgeTab.vue +1 -1
- package/src/components/Utility/Tabs/IndicatorTab.vue +3 -3
- package/src/components/Utility/Tools/ActionVnode.vue +3 -3
- package/src/components/Utility/Tools/RenderComponent.vue +3 -3
- package/src/components/Utility/Transitions/StaggeredListTransition.vue +3 -3
- package/src/helpers/array.ts +16 -16
- package/src/helpers/storage.ts +5 -5
- package/src/helpers/utils.ts +1 -1
- package/src/index.common.js +1 -2
- package/src/index.esm.js +1 -1
- package/src/index.umd.js +2 -2
- package/src/svg/CaretDownIcon.svg +1 -1
- package/src/svg/DragHandleDotsIcon.svg +3 -3
- package/src/svg/DragHandleIcon.svg +3 -3
- package/src/svg/FilterIcon.svg +5 -5
- package/src/svg/ImageIcon.svg +27 -27
- package/src/svg/PdfIcon.svg +5 -5
- package/src/svg/SkipNextIcon.svg +3 -3
- package/src/svg/SkipPreviousIcon.svg +3 -3
- package/src/svg/TrashIcon.svg +12 -12
- package/src/svg/WarningIcon.svg +3 -3
- package/src/svg/XIcon.svg +15 -15
- package/src/vue-plugin.js +5 -5
package/package.json
CHANGED
@@ -10,8 +10,8 @@
|
|
10
10
|
/>
|
11
11
|
</template>
|
12
12
|
<script setup>
|
13
|
-
import { computed, ref } from
|
14
|
-
import { PopoverMenu } from
|
13
|
+
import { computed, ref } from "vue";
|
14
|
+
import { PopoverMenu } from "../Utility";
|
15
15
|
|
16
16
|
const props = defineProps({
|
17
17
|
actions: {
|
@@ -24,7 +24,7 @@ const props = defineProps({
|
|
24
24
|
},
|
25
25
|
tooltip: {
|
26
26
|
type: String,
|
27
|
-
default:
|
27
|
+
default: "First select records to perform a batch action"
|
28
28
|
},
|
29
29
|
loading: Boolean,
|
30
30
|
loadingComponent: {
|
@@ -46,7 +46,7 @@ const activeActions = computed(() => props.actions.filter(action => {
|
|
46
46
|
const isSaving = ref(false);
|
47
47
|
async function onAction(action) {
|
48
48
|
if (!action.trigger) {
|
49
|
-
throw new Error(
|
49
|
+
throw new Error("Action must have a trigger function! Make sure you are using useActions() or implement your own trigger function.");
|
50
50
|
}
|
51
51
|
isSaving.value = true;
|
52
52
|
await action.trigger(props.target);
|
@@ -8,7 +8,7 @@
|
|
8
8
|
:columns="columns"
|
9
9
|
:loading="isLoadingList"
|
10
10
|
:rows="pagedItems?.data || []"
|
11
|
-
binary-state-sort
|
11
|
+
:binary-state-sort="false"
|
12
12
|
selection="multiple"
|
13
13
|
:rows-per-page-options="rowsPerPageOptions"
|
14
14
|
class="sticky-column sticky-header w-full h-full !border-0"
|
@@ -64,18 +64,18 @@
|
|
64
64
|
</template>
|
65
65
|
|
66
66
|
<script setup>
|
67
|
-
import { QTable, QTh } from
|
68
|
-
import { ref } from
|
69
|
-
import { getItem, setItem } from
|
70
|
-
import { DragHandleIcon as RowResizeIcon } from
|
71
|
-
import { HandleDraggable } from
|
72
|
-
import { ActionVnode } from
|
73
|
-
import ActionTableColumn from
|
74
|
-
import EmptyTableState from
|
75
|
-
import { mapSortBy, registerStickyScrolling } from
|
76
|
-
import TableSummaryRow from
|
67
|
+
import { QTable, QTh } from "quasar";
|
68
|
+
import { ref } from "vue";
|
69
|
+
import { getItem, setItem } from "../../helpers";
|
70
|
+
import { DragHandleIcon as RowResizeIcon } from "../../svg";
|
71
|
+
import { HandleDraggable } from "../DragAndDrop";
|
72
|
+
import { ActionVnode } from "../Utility";
|
73
|
+
import ActionTableColumn from "./ActionTableColumn.vue";
|
74
|
+
import EmptyTableState from "./EmptyTableState.vue";
|
75
|
+
import { mapSortBy, registerStickyScrolling } from "./listHelpers";
|
76
|
+
import TableSummaryRow from "./TableSummaryRow.vue";
|
77
77
|
|
78
|
-
defineEmits([
|
78
|
+
defineEmits(["update:quasar-pagination", "update:selected-rows"]);
|
79
79
|
const props = defineProps({
|
80
80
|
name: {
|
81
81
|
type: String,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
class="flex items-center flex-nowrap"
|
6
6
|
:class="columnClass"
|
7
7
|
>
|
8
|
-
<div class="flex-grow">
|
8
|
+
<div class="flex-grow overflow-hidden">
|
9
9
|
<a
|
10
10
|
v-if="column.onClick"
|
11
11
|
@click="column.onClick(row)"
|
@@ -32,11 +32,11 @@
|
|
32
32
|
</QTd>
|
33
33
|
</template>
|
34
34
|
<script setup>
|
35
|
-
import { QTd } from
|
36
|
-
import { computed } from
|
37
|
-
import { RenderVnode } from
|
38
|
-
import ActionMenu from
|
39
|
-
import { TitleColumnFormat } from
|
35
|
+
import { QTd } from "quasar";
|
36
|
+
import { computed } from "vue";
|
37
|
+
import { RenderVnode } from "../Utility";
|
38
|
+
import ActionMenu from "./ActionMenu";
|
39
|
+
import { TitleColumnFormat } from "./Columns";
|
40
40
|
|
41
41
|
const props = defineProps({
|
42
42
|
rowProps: {
|
@@ -60,10 +60,10 @@ const columnStyle = computed(() => {
|
|
60
60
|
});
|
61
61
|
|
62
62
|
const columnClass = computed(() => ({
|
63
|
-
[column.value.class ||
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
[column.value.class || ""]: true,
|
64
|
+
"is-saving": isSaving.value,
|
65
|
+
"justify-end": column.value.align === "right",
|
66
|
+
"justify-center": column.value.align === "center",
|
67
|
+
"justify-start": column.value.align === "left"
|
68
68
|
}));
|
69
69
|
</script>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
|
-
|
4
|
-
|
3
|
+
class="flex items-center w-full"
|
4
|
+
:class="{'cursor-not-allowed': locked}"
|
5
5
|
>
|
6
6
|
<a v-if="locked" class="text-neutral-on-plus-3 cursor-not-allowed">
|
7
7
|
<LockedIcon class="w-4" />
|
@@ -36,13 +36,13 @@
|
|
36
36
|
</InfoDialog>
|
37
37
|
</template>
|
38
38
|
<script setup>
|
39
|
-
import { computed } from
|
40
|
-
import { FlashMessages, remove } from
|
41
|
-
import { ListItemDraggable } from
|
42
|
-
import { InfoDialog, ListTransition } from
|
43
|
-
import ColumnListItem from
|
39
|
+
import { computed } from "vue";
|
40
|
+
import { FlashMessages, remove } from "../../../helpers";
|
41
|
+
import { ListItemDraggable } from "../../DragAndDrop";
|
42
|
+
import { InfoDialog, ListTransition } from "../../Utility";
|
43
|
+
import ColumnListItem from "./ColumnListItem";
|
44
44
|
|
45
|
-
const emit = defineEmits([
|
45
|
+
const emit = defineEmits(["close", "update:hidden-column-names", "update:title-column-names", "update:sortable-columns"]);
|
46
46
|
const props = defineProps({
|
47
47
|
hiddenColumnNames: {
|
48
48
|
type: Array,
|
@@ -80,7 +80,7 @@ function onVisibilityChange(column, visible) {
|
|
80
80
|
} else {
|
81
81
|
hiddenColumnNames.push(column.name);
|
82
82
|
}
|
83
|
-
emit(
|
83
|
+
emit("update:hidden-column-names", [...new Set(hiddenColumnNames)]);
|
84
84
|
}
|
85
85
|
|
86
86
|
function isTitleColumn(column) {
|
@@ -97,6 +97,6 @@ function onTitleColumnChange(column, isTitle) {
|
|
97
97
|
} else {
|
98
98
|
titleColumnNames = remove(titleColumnNames, column.name);
|
99
99
|
}
|
100
|
-
emit(
|
100
|
+
emit("update:title-column-names", [...new Set(titleColumnNames)]);
|
101
101
|
}
|
102
102
|
</script>
|
@@ -46,11 +46,11 @@
|
|
46
46
|
</div>
|
47
47
|
</template>
|
48
48
|
<script setup>
|
49
|
-
import { computed, ref } from
|
50
|
-
import { remove } from
|
51
|
-
import { CaretDownIcon } from
|
49
|
+
import { computed, ref } from "vue";
|
50
|
+
import { remove } from "../../../helpers";
|
51
|
+
import { CaretDownIcon } from "../../../svg";
|
52
52
|
|
53
|
-
const emit = defineEmits([
|
53
|
+
const emit = defineEmits(["update:hidden-column-names"]);
|
54
54
|
const props = defineProps({
|
55
55
|
columns: {
|
56
56
|
type: Array,
|
@@ -62,7 +62,7 @@ const props = defineProps({
|
|
62
62
|
}
|
63
63
|
});
|
64
64
|
|
65
|
-
const isShowingColumnToggle = ref(
|
65
|
+
const isShowingColumnToggle = ref("");
|
66
66
|
const categories = computed(() => [...new Set(props.columns.map(c => c.category)).values()]);
|
67
67
|
|
68
68
|
/**
|
@@ -114,7 +114,7 @@ function toggleColumns(columns, showColumns) {
|
|
114
114
|
} else {
|
115
115
|
hiddenColumnNames = [...new Set([...hiddenColumnNames, ...columns.map(c => c.name)])];
|
116
116
|
}
|
117
|
-
emit(
|
117
|
+
emit("update:hidden-column-names", hiddenColumnNames);
|
118
118
|
}
|
119
119
|
|
120
120
|
/**
|
@@ -139,7 +139,7 @@ function toggleColumn(columnName, showColumn) {
|
|
139
139
|
hiddenColumnNames = [...new Set(hiddenColumnNames)];
|
140
140
|
}
|
141
141
|
|
142
|
-
emit(
|
142
|
+
emit("update:hidden-column-names", hiddenColumnNames);
|
143
143
|
}
|
144
144
|
</script>
|
145
145
|
<style
|
@@ -14,22 +14,22 @@
|
|
14
14
|
</div>
|
15
15
|
</template>
|
16
16
|
<script setup>
|
17
|
-
import { QSpinnerBall } from
|
17
|
+
import { QSpinnerBall } from "quasar";
|
18
18
|
|
19
19
|
defineProps({
|
20
20
|
loading: Boolean,
|
21
21
|
saving: Boolean,
|
22
22
|
text: {
|
23
23
|
type: String,
|
24
|
-
default:
|
24
|
+
default: "No records found"
|
25
25
|
},
|
26
26
|
loadingText: {
|
27
27
|
type: String,
|
28
|
-
default:
|
28
|
+
default: "Loading..."
|
29
29
|
},
|
30
30
|
savingText: {
|
31
31
|
type: String,
|
32
|
-
default:
|
32
|
+
default: "Saving..."
|
33
33
|
}
|
34
34
|
});
|
35
35
|
</script>
|
@@ -15,10 +15,10 @@
|
|
15
15
|
</CollapsableSidebar>
|
16
16
|
</template>
|
17
17
|
<script setup>
|
18
|
-
import { FilterFieldList } from
|
19
|
-
import { CollapsableSidebar } from
|
18
|
+
import { FilterFieldList } from ".";
|
19
|
+
import { CollapsableSidebar } from "../../Utility";
|
20
20
|
|
21
|
-
defineEmits([
|
21
|
+
defineEmits(["update:filter", "update:show-filters"]);
|
22
22
|
defineProps({
|
23
23
|
name: {
|
24
24
|
type: String,
|
@@ -39,14 +39,14 @@
|
|
39
39
|
/>
|
40
40
|
</template>
|
41
41
|
</div>
|
42
|
-
|
42
|
+
</QList>
|
43
43
|
</template>
|
44
44
|
<script setup>
|
45
|
-
import { computed } from
|
46
|
-
import FilterableField from
|
47
|
-
import FilterFieldItem from
|
45
|
+
import { computed } from "vue";
|
46
|
+
import FilterableField from "./FilterableField";
|
47
|
+
import FilterFieldItem from "./FilterFieldItem";
|
48
48
|
|
49
|
-
const emit = defineEmits([
|
49
|
+
const emit = defineEmits(["update:filter"]);
|
50
50
|
const props = defineProps({
|
51
51
|
filterFields: {
|
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>
|
@@ -22,10 +22,10 @@
|
|
22
22
|
</div>
|
23
23
|
</template>
|
24
24
|
<script setup>
|
25
|
-
import { computed } from
|
26
|
-
import { FilterIcon } from
|
25
|
+
import { computed } from "vue";
|
26
|
+
import { FilterIcon } from "../../../svg";
|
27
27
|
|
28
|
-
defineEmits([
|
28
|
+
defineEmits(["update:show-filters", "update:filter"]);
|
29
29
|
const props = defineProps({
|
30
30
|
filter: {
|
31
31
|
type: Object,
|
@@ -19,10 +19,10 @@
|
|
19
19
|
</div>
|
20
20
|
</template>
|
21
21
|
<script setup>
|
22
|
-
import { QSeparator } from
|
23
|
-
import { FilterListToggle } from
|
22
|
+
import { QSeparator } from "quasar";
|
23
|
+
import { FilterListToggle } from "../Filters";
|
24
24
|
|
25
|
-
defineEmits([
|
25
|
+
defineEmits(["update:show-filters", "update:filter"]);
|
26
26
|
defineProps({
|
27
27
|
filter: {
|
28
28
|
type: Object,
|
@@ -110,9 +110,9 @@ import {
|
|
110
110
|
NumberRangeField,
|
111
111
|
SelectField,
|
112
112
|
SelectWithChildrenField
|
113
|
-
} from
|
113
|
+
} from "../Form/Fields";
|
114
114
|
|
115
|
-
const emit = defineEmits([
|
115
|
+
const emit = defineEmits(["update:model-value"]);
|
116
116
|
const props = defineProps({
|
117
117
|
field: {
|
118
118
|
type: Object,
|
@@ -129,15 +129,15 @@ function onUpdate(val) {
|
|
129
129
|
let newVal = val || undefined;
|
130
130
|
|
131
131
|
switch (props.field.type) {
|
132
|
-
case
|
132
|
+
case "multi-select":
|
133
133
|
newVal = val.length > 0 ? val : undefined;
|
134
134
|
break;
|
135
|
-
case
|
136
|
-
case
|
135
|
+
case "single-select":
|
136
|
+
case "boolean":
|
137
137
|
newVal = val === null ? undefined : val;
|
138
138
|
break;
|
139
139
|
}
|
140
140
|
|
141
|
-
emit(
|
141
|
+
emit("update:model-value", newVal);
|
142
142
|
}
|
143
143
|
</script>
|
@@ -11,13 +11,13 @@
|
|
11
11
|
:show-name="showName"
|
12
12
|
:class="labelClass"
|
13
13
|
/>
|
14
|
-
|
14
|
+
</QToggle>
|
15
15
|
</template>
|
16
16
|
|
17
17
|
<script setup>
|
18
|
-
import FieldLabel from
|
18
|
+
import FieldLabel from "./FieldLabel";
|
19
19
|
|
20
|
-
defineEmits([
|
20
|
+
defineEmits(["update:model-value"]);
|
21
21
|
defineProps({
|
22
22
|
modelValue: {
|
23
23
|
type: [Boolean],
|
@@ -29,7 +29,7 @@ defineProps({
|
|
29
29
|
},
|
30
30
|
labelClass: {
|
31
31
|
type: String,
|
32
|
-
default:
|
32
|
+
default: "text-sm"
|
33
33
|
},
|
34
34
|
showName: Boolean,
|
35
35
|
toggleIndeterminate: Boolean
|
@@ -10,21 +10,21 @@
|
|
10
10
|
</template>
|
11
11
|
|
12
12
|
<script setup>
|
13
|
-
import LabeledInput from
|
13
|
+
import LabeledInput from "./LabeledInput";
|
14
14
|
|
15
|
-
defineEmits([
|
15
|
+
defineEmits(["update:model-value"]);
|
16
16
|
const props = defineProps({
|
17
17
|
name: {
|
18
18
|
type: String,
|
19
|
-
default:
|
19
|
+
default: "password_confirmation"
|
20
20
|
},
|
21
21
|
label: {
|
22
22
|
type: String,
|
23
|
-
default:
|
23
|
+
default: "Confirm Password"
|
24
24
|
},
|
25
25
|
placeholder: {
|
26
26
|
type: String,
|
27
|
-
default:
|
27
|
+
default: "Confirm Password"
|
28
28
|
},
|
29
29
|
modelValue: {
|
30
30
|
type: [String, Number],
|
@@ -36,13 +36,13 @@ const props = defineProps({
|
|
36
36
|
},
|
37
37
|
password: {
|
38
38
|
type: String,
|
39
|
-
default:
|
39
|
+
default: ""
|
40
40
|
},
|
41
41
|
disabled: Boolean
|
42
42
|
});
|
43
43
|
|
44
44
|
const rules = [
|
45
45
|
(val) =>
|
46
|
-
val === props.password ||
|
46
|
+
val === props.password || "The password and confirmation do not match"
|
47
47
|
];
|
48
48
|
</script>
|
@@ -27,11 +27,11 @@
|
|
27
27
|
</template>
|
28
28
|
|
29
29
|
<script setup>
|
30
|
-
import { CalendarIcon as DateIcon } from
|
31
|
-
import { computed, ref, watch } from
|
32
|
-
import { fDate, parseQDate } from
|
30
|
+
import { CalendarIcon as DateIcon } from "@heroicons/vue/outline";
|
31
|
+
import { computed, ref, watch } from "vue";
|
32
|
+
import { fDate, parseQDate } from "../../../../helpers";
|
33
33
|
|
34
|
-
const emit = defineEmits([
|
34
|
+
const emit = defineEmits(["update:model-value"]);
|
35
35
|
const props = defineProps({
|
36
36
|
modelValue: {
|
37
37
|
type: [String, Object],
|
@@ -45,7 +45,7 @@ const props = defineProps({
|
|
45
45
|
|
46
46
|
const formattedDate = computed(() => {
|
47
47
|
if (props.modelValue) {
|
48
|
-
return fDate(parseQDate(props.modelValue ||
|
48
|
+
return fDate(parseQDate(props.modelValue || "0000-00-00"));
|
49
49
|
}
|
50
50
|
return null;
|
51
51
|
});
|
@@ -54,6 +54,6 @@ const date = ref(props.modelValue);
|
|
54
54
|
watch(() => props.modelValue, val => date.value = val);
|
55
55
|
|
56
56
|
function onSave() {
|
57
|
-
emit(
|
57
|
+
emit("update:model-value", date.value);
|
58
58
|
}
|
59
59
|
</script>
|
@@ -38,11 +38,11 @@
|
|
38
38
|
</template>
|
39
39
|
|
40
40
|
<script setup>
|
41
|
-
import { CalendarIcon as DateIcon } from
|
42
|
-
import { computed, ref, watch } from
|
43
|
-
import { fDate, parseQDate, parseQDateTime } from
|
41
|
+
import { CalendarIcon as DateIcon } from "@heroicons/vue/outline";
|
42
|
+
import { computed, ref, watch } from "vue";
|
43
|
+
import { fDate, parseQDate, parseQDateTime } from "../../../../helpers";
|
44
44
|
|
45
|
-
const emit = defineEmits([
|
45
|
+
const emit = defineEmits(["update:model-value"]);
|
46
46
|
const props = defineProps({
|
47
47
|
modelValue: {
|
48
48
|
type: Object,
|
@@ -60,14 +60,14 @@ const formattedDates = computed(() => {
|
|
60
60
|
if (dateRangeValue.value) {
|
61
61
|
if (props.withTime) {
|
62
62
|
return {
|
63
|
-
from: fDate(parseQDateTime(dateRangeValue.value.from ||
|
64
|
-
to: fDate(parseQDateTime(dateRangeValue.value.to ||
|
63
|
+
from: fDate(parseQDateTime(dateRangeValue.value.from || "0000-00-00")),
|
64
|
+
to: fDate(parseQDateTime(dateRangeValue.value.to || "9999-12-31"))
|
65
65
|
};
|
66
66
|
}
|
67
67
|
|
68
68
|
return {
|
69
|
-
from: fDate(parseQDate(dateRangeValue.value.from ||
|
70
|
-
to: fDate(parseQDate(dateRangeValue.value.to ||
|
69
|
+
from: fDate(parseQDate(dateRangeValue.value.from || "0000-00-00")),
|
70
|
+
to: fDate(parseQDate(dateRangeValue.value.to || "9999-12-31"))
|
71
71
|
};
|
72
72
|
}
|
73
73
|
return {
|
@@ -89,7 +89,7 @@ function toQDateValue(val) {
|
|
89
89
|
const dateRangeValue = computed(() => {
|
90
90
|
let range;
|
91
91
|
|
92
|
-
if (typeof dateRange.value ===
|
92
|
+
if (typeof dateRange.value === "string") {
|
93
93
|
range = {
|
94
94
|
from: dateRange.value,
|
95
95
|
to: dateRange.value
|
@@ -101,15 +101,15 @@ const dateRangeValue = computed(() => {
|
|
101
101
|
};
|
102
102
|
}
|
103
103
|
|
104
|
-
if (range?.from && range?.to && props.withTime && !range.from.includes(
|
105
|
-
range.from +=
|
106
|
-
range.to +=
|
104
|
+
if (range?.from && range?.to && props.withTime && !range.from.includes("00:00:00")) {
|
105
|
+
range.from += " 00:00:00";
|
106
|
+
range.to += " 23:59:59";
|
107
107
|
}
|
108
108
|
|
109
109
|
return range;
|
110
110
|
});
|
111
111
|
|
112
112
|
function onSave() {
|
113
|
-
emit(
|
113
|
+
emit("update:model-value", dateRangeValue.value);
|
114
114
|
}
|
115
115
|
</script>
|
@@ -24,11 +24,11 @@
|
|
24
24
|
</template>
|
25
25
|
|
26
26
|
<script setup>
|
27
|
-
import { ref } from
|
28
|
-
import { fLocalizedDateTime } from
|
29
|
-
import DateTimePicker from
|
27
|
+
import { ref } from "vue";
|
28
|
+
import { fLocalizedDateTime } from "../../../../helpers";
|
29
|
+
import DateTimePicker from "./DateTimePicker";
|
30
30
|
|
31
|
-
const emit = defineEmits([
|
31
|
+
const emit = defineEmits(["update:model-value"]);
|
32
32
|
const props = defineProps({
|
33
33
|
modelValue: {
|
34
34
|
type: String,
|
@@ -36,7 +36,7 @@ const props = defineProps({
|
|
36
36
|
},
|
37
37
|
color: {
|
38
38
|
type: String,
|
39
|
-
default:
|
39
|
+
default: "blue-600"
|
40
40
|
}
|
41
41
|
});
|
42
42
|
|
@@ -44,7 +44,7 @@ const isShowing = ref(false);
|
|
44
44
|
const dateTime = ref(props.modelValue);
|
45
45
|
|
46
46
|
function onSave() {
|
47
|
-
emit(
|
47
|
+
emit("update:model-value", dateTime.value);
|
48
48
|
isShowing.value = false;
|
49
49
|
}
|
50
50
|
</script>
|
@@ -26,10 +26,10 @@
|
|
26
26
|
</QPopupProxy>
|
27
27
|
</template>
|
28
28
|
<script setup>
|
29
|
-
import { computed } from
|
30
|
-
import { dbDateTime, localizedDateTime, remoteDateTime } from
|
29
|
+
import { computed } from "vue";
|
30
|
+
import { dbDateTime, localizedDateTime, remoteDateTime } from "../../../../helpers";
|
31
31
|
|
32
|
-
const emit = defineEmits([
|
32
|
+
const emit = defineEmits(["update:modelValue", "save", "cancel", "clear"]);
|
33
33
|
const props = defineProps({
|
34
34
|
modelValue: {
|
35
35
|
type: String,
|
@@ -37,11 +37,11 @@ const props = defineProps({
|
|
37
37
|
},
|
38
38
|
mask: {
|
39
39
|
type: String,
|
40
|
-
default:
|
40
|
+
default: "YYYY-MM-DD HH:mm"
|
41
41
|
},
|
42
42
|
color: {
|
43
43
|
type: String,
|
44
|
-
default:
|
44
|
+
default: "blue-600"
|
45
45
|
},
|
46
46
|
nullable: Boolean
|
47
47
|
});
|
@@ -52,7 +52,7 @@ const dateTime = computed({
|
|
52
52
|
const newValue = value ? dbDateTime(remoteDateTime(value)) : null;
|
53
53
|
|
54
54
|
if (newValue || props.nullable) {
|
55
|
-
emit(
|
55
|
+
emit("update:modelValue", newValue);
|
56
56
|
}
|
57
57
|
}
|
58
58
|
});
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<div
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
contenteditable
|
4
|
+
class="inline-block hover:bg-blue-light focus:bg-blue-light transition duration-300 outline-none"
|
5
|
+
@input="onInput"
|
6
6
|
>
|
7
7
|
{{ text }}
|
8
8
|
</div>
|
@@ -5,8 +5,8 @@
|
|
5
5
|
<template v-if="showName">({{ field?.name }})</template>
|
6
6
|
</slot>
|
7
7
|
<span
|
8
|
-
|
9
|
-
|
8
|
+
v-if="requiredLabel"
|
9
|
+
class="text-red-dark ml-1 text-xs bottom-1 relative"
|
10
10
|
>{{ requiredLabel }}</span>
|
11
11
|
</span>
|
12
12
|
</template>
|