@winchsa/ui 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/forms/DatePicker.vue +1 -1
- package/dist/components/forms/DatePickerRange.vue +0 -2
- package/dist/components/table/EditableDataTable.vue.d.ts +1 -0
- package/dist/components/table/EditableDataTableRow.vue +1 -0
- package/dist/components/table/FilterGenerator.vue +0 -1
- package/dist/composables/useTableFilters.js +2 -1
- package/dist/composables/useTableFilters.mjs +2 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ const { t, locale } = useI18n();
|
|
|
11
11
|
const { current } = useTheme();
|
|
12
12
|
const props = defineProps({
|
|
13
13
|
modelValue: { type: [String, Date], required: false, default: "" },
|
|
14
|
-
format: { type: String, required: false, default: "
|
|
14
|
+
format: { type: String, required: false, default: "DD-MM-YYYY" },
|
|
15
15
|
displayFormat: { type: String, required: false },
|
|
16
16
|
label: { type: String, required: false },
|
|
17
17
|
forcedLabel: { type: String, required: false },
|
|
@@ -92,7 +92,6 @@ const label = (type) => {
|
|
|
92
92
|
:error-messages="fromErrorMessages"
|
|
93
93
|
:min-date="fromMinDate"
|
|
94
94
|
:max-date="maxFromDate"
|
|
95
|
-
format="DD-MM-YYYY"
|
|
96
95
|
display-format="DD/MM/YYYY"
|
|
97
96
|
:label="props.label"
|
|
98
97
|
:forced-label="label('from')"
|
|
@@ -116,7 +115,6 @@ const label = (type) => {
|
|
|
116
115
|
:min-date="from || toMinDate"
|
|
117
116
|
:max-date="maxToDate"
|
|
118
117
|
:disabled="disableFrom"
|
|
119
|
-
format="DD-MM-YYYY"
|
|
120
118
|
display-format="DD/MM/YYYY"
|
|
121
119
|
:label="props.label"
|
|
122
120
|
:forced-label="label('to')"
|
|
@@ -47,6 +47,7 @@ declare const headers: import("vue").ComputedRef<{
|
|
|
47
47
|
groupValues?: string;
|
|
48
48
|
options?: Record<string, unknown>[] | import("../../types").OptionItem[] | import("vue").Ref<import("../../types").OptionItem[]>;
|
|
49
49
|
disableIfEmpty?: boolean;
|
|
50
|
+
maxDate?: Date | null;
|
|
50
51
|
}[]>;
|
|
51
52
|
declare const moduleIdentifier: import("vue").ComputedRef<string>;
|
|
52
53
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
@@ -63,7 +63,8 @@ function useTableFilters({
|
|
|
63
63
|
const filterType = currentFilter?.type ?? "text";
|
|
64
64
|
if ((filterType === "autocomplete" || filterType === "autocompleteGroups" || filterType === "select") && !currentFilter?.multiple) {
|
|
65
65
|
if (typeof filterValue === "object") {
|
|
66
|
-
|
|
66
|
+
const value = Array.isArray(filterValue) ? filterValue[0] : filterValue;
|
|
67
|
+
queryParams[filterKey] = value[currentFilter?.trackBy || "id"];
|
|
67
68
|
} else {
|
|
68
69
|
queryParams[filterKey] = filterValue;
|
|
69
70
|
}
|
|
@@ -57,7 +57,8 @@ export function useTableFilters({ formFilters, syncFiltersWithUrl }) {
|
|
|
57
57
|
const filterType = currentFilter?.type ?? "text";
|
|
58
58
|
if ((filterType === "autocomplete" || filterType === "autocompleteGroups" || filterType === "select") && !currentFilter?.multiple) {
|
|
59
59
|
if (typeof filterValue === "object") {
|
|
60
|
-
|
|
60
|
+
const value = Array.isArray(filterValue) ? filterValue[0] : filterValue;
|
|
61
|
+
queryParams[filterKey] = value[currentFilter?.trackBy || "id"];
|
|
61
62
|
} else {
|
|
62
63
|
queryParams[filterKey] = filterValue;
|
|
63
64
|
}
|
package/dist/types.d.ts
CHANGED