@unsource/ui 2.8.16 → 2.8.18
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/module.json +1 -1
- package/dist/runtime/components/UnChips.vue +1 -1
- package/dist/runtime/composables/fetch.js +5 -5
- package/dist/runtime/composables/global.d.ts +3 -0
- package/dist/runtime/composables/global.js +5 -2
- package/dist/runtime/composables/services.js +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -38,5 +38,5 @@ const { variant = "danger", mini = false, customClass = {} } = defineProps({
|
|
|
38
38
|
customClass: { type: Object, required: false }
|
|
39
39
|
});
|
|
40
40
|
defineEmits(["prependClick", "iconClick"]);
|
|
41
|
-
const classVariant = computed(() => variants?.[variant]);
|
|
41
|
+
const classVariant = computed(() => variants?.[variant] || variant);
|
|
42
42
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useModuleConfig, useToken } from "./reuseable.js";
|
|
2
|
-
import { _get, _set, useNuxtApp, isArray } from "#imports";
|
|
2
|
+
import { _get, _set, useNuxtApp, isArray, isPlainObject } from "#imports";
|
|
3
3
|
const setHeaders = (config) => {
|
|
4
4
|
const token = useToken();
|
|
5
5
|
_set(config, ["headers", "Authorization"], _get(config, ["headers", "Authorization"], token.value || ""));
|
|
@@ -8,11 +8,11 @@ const setHeaders = (config) => {
|
|
|
8
8
|
};
|
|
9
9
|
const errorHandler = (error, config) => {
|
|
10
10
|
if ("data" in error) {
|
|
11
|
-
let msg = "";
|
|
12
|
-
if ("errors" in error.data && isArray(error.data.errors)) {
|
|
13
|
-
msg = error?.data?.errors?.map?.((e) => e.field + ":" + e.message).join(" , ");
|
|
14
|
-
}
|
|
15
11
|
if (!config?.headers?.["no-error"]) {
|
|
12
|
+
let msg = "";
|
|
13
|
+
if (isPlainObject(error.data) && "errors" in error.data && isArray(error.data.errors)) {
|
|
14
|
+
msg = error?.data?.errors?.map?.((e) => e.field + ":" + e.message).join(" , ");
|
|
15
|
+
}
|
|
16
16
|
const { $toast } = useNuxtApp();
|
|
17
17
|
$toast?.error(msg || JSON.stringify(error?.data));
|
|
18
18
|
}
|
|
@@ -383,7 +383,10 @@ export const variants = {
|
|
|
383
383
|
"primary-fill": "border-primary-500 bg-primary-500 text-white",
|
|
384
384
|
"primary-border": "border-primary-500 bg-primary-500/10 text-primary-500",
|
|
385
385
|
"primary-flat": "border-transparent bg-white text-primary-500",
|
|
386
|
-
"secondary": "border-transparent bg-
|
|
386
|
+
"secondary": "border-transparent bg-secondary-500/10 text-secondary-500",
|
|
387
387
|
"secondary-fill": "border-secondary-500 bg-secondary-500 text-white",
|
|
388
|
-
"secondary-flat": "border-transparent bg-white text-secondary-500"
|
|
388
|
+
"secondary-flat": "border-transparent bg-white text-secondary-500",
|
|
389
|
+
"disable": "border-transparent bg-disable/10 text-disable",
|
|
390
|
+
"disable-fill": "border-disable bg-disable text-white",
|
|
391
|
+
"disable-flat": "border-transparent bg-white text-disable"
|
|
389
392
|
};
|
|
@@ -172,13 +172,13 @@ export const verifyPayment = async (txId = "") => {
|
|
|
172
172
|
return {
|
|
173
173
|
trx: result,
|
|
174
174
|
status: true,
|
|
175
|
-
message: "\
|
|
175
|
+
message: "\u062A\u0631\u0627\u06A9\u0646\u0634 \u0645\u0648\u0641\u0642"
|
|
176
176
|
};
|
|
177
177
|
} else {
|
|
178
178
|
return {
|
|
179
179
|
trx: result,
|
|
180
180
|
status: false,
|
|
181
|
-
message: "\u062A\u0631\u0627\u06A9\u0646\u0634 \u0646\u0627\u0645\u0648\u0641\u0642
|
|
181
|
+
message: "\u062A\u0631\u0627\u06A9\u0646\u0634 \u0646\u0627\u0645\u0648\u0641\u0642"
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
} else {
|