vueless 0.0.688 → 0.0.690
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/package.json
CHANGED
|
@@ -104,11 +104,11 @@ export default /*tw*/ {
|
|
|
104
104
|
},
|
|
105
105
|
rangeInputFirst: {
|
|
106
106
|
base: "{UInput} {>rangeInput}",
|
|
107
|
-
wrapper: "rounded-r-none",
|
|
107
|
+
wrapper: "!rounded-r-none",
|
|
108
108
|
},
|
|
109
109
|
rangeInputLast: {
|
|
110
110
|
base: "{UInput} {>rangeInput}",
|
|
111
|
-
wrapper: "rounded-l-none",
|
|
111
|
+
wrapper: "!rounded-l-none",
|
|
112
112
|
},
|
|
113
113
|
rangeInputError: "text-xs font-normal leading-none mt-2 text-center text-red-500",
|
|
114
114
|
datepickerCalendar: {
|
|
@@ -53,20 +53,20 @@ export function useUserFormat(
|
|
|
53
53
|
const fromTitle = from ? formatDate(from, fromFormat, userFormatLocale.value) : "";
|
|
54
54
|
const toTitle = to ? formatDate(to, userDateFormat, userFormatLocale.value) : "";
|
|
55
55
|
|
|
56
|
-
title = `${fromTitle} – ${toTitle}`;
|
|
56
|
+
title = `${fromTitle.trim()} – ${toTitle.trim()}`;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (isPeriod.value.month) {
|
|
60
|
-
title = formatDate(from, "F Y",
|
|
60
|
+
title = formatDate(from, "F Y", userFormatLocale.value);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
if (isPeriod.value.quarter || isPeriod.value.year) {
|
|
64
64
|
const fromFormat = userDateFormat.replace(/[Yy]/g, "");
|
|
65
65
|
|
|
66
|
-
const fromTitle = from ? formatDate(from, fromFormat,
|
|
67
|
-
const toTitle = to ? formatDate(to, userDateFormat,
|
|
66
|
+
const fromTitle = from ? formatDate(from, fromFormat, userFormatLocale.value) : "";
|
|
67
|
+
const toTitle = to ? formatDate(to, userDateFormat, userFormatLocale.value) : "";
|
|
68
68
|
|
|
69
|
-
title = `${fromTitle} – ${toTitle}`;
|
|
69
|
+
title = `${fromTitle.trim()} – ${toTitle.trim()}`;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return title;
|
|
@@ -16,7 +16,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
16
16
|
|
|
17
17
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
18
|
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
19
|
-
resources: () =>
|
|
19
|
+
resources: () => "",
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const error = ref(false);
|
|
@@ -46,15 +46,15 @@ const barStyle = computed(() => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
const resourceNamesArray = computed(() => {
|
|
49
|
-
if (!props.resources) {
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
49
|
return Array.isArray(props.resources)
|
|
54
50
|
? props.resources.map(getRequestWithoutQuery)
|
|
55
51
|
: [getRequestWithoutQuery(props.resources)];
|
|
56
52
|
});
|
|
57
53
|
|
|
54
|
+
const isPropsLoading = computed(
|
|
55
|
+
() => requestQueue.value.includes(INFINITY_LOADING) && props.loading,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
58
|
watch(() => requestQueue.value.length, onChangeRequestsQueue);
|
|
59
59
|
|
|
60
60
|
onMounted(() => {
|
|
@@ -98,7 +98,7 @@ function setLoaderOffHandler(event: CustomEvent<{ resource: string }>) {
|
|
|
98
98
|
|
|
99
99
|
function onChangeRequestsQueue() {
|
|
100
100
|
const isActiveRequests =
|
|
101
|
-
|
|
101
|
+
isPropsLoading.value ||
|
|
102
102
|
resourceNamesArray.value.some((resource: string) => {
|
|
103
103
|
return requestQueue.value.includes(resource);
|
|
104
104
|
});
|
|
@@ -3,7 +3,6 @@ import { inject, readonly, ref } from "vue";
|
|
|
3
3
|
import type { Ref } from "vue";
|
|
4
4
|
|
|
5
5
|
import { getRequestWithoutQuery } from "./utilLoaderProgress.ts";
|
|
6
|
-
import { INFINITY_LOADING } from "./constants.ts";
|
|
7
6
|
|
|
8
7
|
export const LoaderProgressSymbol = Symbol.for("vueless:loader-progress");
|
|
9
8
|
|
|
@@ -51,9 +50,7 @@ function removeRequestUrl(url: string | string[]): void {
|
|
|
51
50
|
if (Array.isArray(url)) {
|
|
52
51
|
url.map(getRequestWithoutQuery).forEach(removeRequestUrl);
|
|
53
52
|
} else {
|
|
54
|
-
requestQueue.value = requestQueue.value.filter(
|
|
55
|
-
(item) => item !== getRequestWithoutQuery(url) && item !== INFINITY_LOADING,
|
|
56
|
-
);
|
|
53
|
+
requestQueue.value = requestQueue.value.filter((item) => item !== getRequestWithoutQuery(url));
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
|