@unsource/ui 2.7.14 → 2.7.16
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/UnCheckboxItem.d.vue.ts +1 -0
- package/dist/runtime/components/UnCheckboxItem.vue +3 -1
- package/dist/runtime/components/UnCheckboxItem.vue.d.ts +1 -0
- package/dist/runtime/components/UnMap.vue +3 -1
- package/dist/runtime/components/UnNormalInput.d.vue.ts +1 -1
- package/dist/runtime/components/UnNormalInput.vue.d.ts +1 -1
- package/dist/runtime/components/UnRadioItem.d.vue.ts +1 -0
- package/dist/runtime/components/UnRadioItem.vue +7 -4
- package/dist/runtime/components/UnRadioItem.vue.d.ts +1 -0
- package/dist/runtime/components/UnSelect.vue +3 -0
- package/dist/runtime/composables/global.d.ts +0 -2
- package/dist/runtime/composables/global.js +2 -4
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -10,6 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
item: CardItem;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
customClass?: CheckboxCustomClass;
|
|
13
|
+
disabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="px-4 py-3 flex items-center gap-2 transition duration-300 hover:bg-primary-100"
|
|
4
|
+
:class="{ 'opacity-50 grayscale': disabled, 'disable': disabled, 'selected': selected }"
|
|
4
5
|
@click="toggle"
|
|
5
6
|
>
|
|
6
7
|
<div
|
|
@@ -29,7 +30,8 @@ const emit = defineEmits(["input"]);
|
|
|
29
30
|
const { customClass = {} } = defineProps({
|
|
30
31
|
item: { type: Object, required: true },
|
|
31
32
|
selected: { type: Boolean, required: false },
|
|
32
|
-
customClass: { type: Object, required: false }
|
|
33
|
+
customClass: { type: Object, required: false },
|
|
34
|
+
disabled: { type: Boolean, required: false }
|
|
33
35
|
});
|
|
34
36
|
const toggle = () => {
|
|
35
37
|
emit("input");
|
|
@@ -10,6 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
item: CardItem;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
customClass?: CheckboxCustomClass;
|
|
13
|
+
disabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -60,7 +60,9 @@ import { Style, Icon, Stroke, Fill } from "ol/style";
|
|
|
60
60
|
import { Point, Circle as GeomCircle } from "ol/geom";
|
|
61
61
|
import { fromLonLat, transform } from "ol/proj";
|
|
62
62
|
import Big from "big.js";
|
|
63
|
-
import { computed,
|
|
63
|
+
import { computed, ref, useDevice, useGeolocation, watch } from "#imports";
|
|
64
|
+
const NESHAN_API_KEY = window.NESHAN_API_KEY;
|
|
65
|
+
const NESHAN_WEB_KEY = window.NESHAN_WEB_KEY;
|
|
64
66
|
const emit = defineEmits(["select-point"]);
|
|
65
67
|
const { points = [], readonly, marker } = defineProps({
|
|
66
68
|
points: { type: Array, required: false },
|
|
@@ -31,9 +31,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
31
31
|
password: boolean;
|
|
32
32
|
appendIcon: string;
|
|
33
33
|
label: string;
|
|
34
|
+
disabled: boolean;
|
|
34
35
|
inputType: string;
|
|
35
36
|
placeholder: string;
|
|
36
|
-
disabled: boolean;
|
|
37
37
|
focusable: boolean;
|
|
38
38
|
className: string;
|
|
39
39
|
valueClassName: string;
|
|
@@ -31,9 +31,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
31
31
|
password: boolean;
|
|
32
32
|
appendIcon: string;
|
|
33
33
|
label: string;
|
|
34
|
+
disabled: boolean;
|
|
34
35
|
inputType: string;
|
|
35
36
|
placeholder: string;
|
|
36
|
-
disabled: boolean;
|
|
37
37
|
focusable: boolean;
|
|
38
38
|
className: string;
|
|
39
39
|
valueClassName: string;
|
|
@@ -11,6 +11,7 @@ type __VLS_Props = {
|
|
|
11
11
|
item: CardItem;
|
|
12
12
|
selected?: boolean;
|
|
13
13
|
customClass?: RadioCustomClass;
|
|
14
|
+
disabled?: boolean;
|
|
14
15
|
};
|
|
15
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="px-4 py-3 flex flex-row items-center gap-3 transition duration-300 hover:bg-primary-500/10 border-0 min-w-fit"
|
|
3
|
+
class="select-none group px-4 py-3 flex flex-row items-center gap-3 transition duration-300 hover:bg-primary-500/10 border-0 min-w-fit"
|
|
4
|
+
:class="{ 'opacity-50 grayscale': disabled, 'disable': disabled, 'selected': selected }"
|
|
4
5
|
@click="toggle"
|
|
5
6
|
>
|
|
6
7
|
<div
|
|
7
8
|
name="radio"
|
|
8
9
|
:class="[customClass.radio, customClass[selected ? 'selected' : 'notSelected']?.radio]"
|
|
9
|
-
class="border-(1 solid primary) rounded-1/2 w-4 h-4 flex justify-center items-center"
|
|
10
|
+
class="group-[.disable]:border-secondary border-(1 solid primary) rounded-1/2 w-4 h-4 flex justify-center items-center"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
12
13
|
name="radioInside"
|
|
@@ -26,13 +27,15 @@
|
|
|
26
27
|
<script setup>
|
|
27
28
|
import { _mergeWith, merge } from "#imports";
|
|
28
29
|
const emit = defineEmits(["input"]);
|
|
29
|
-
const { customClass = {} } = defineProps({
|
|
30
|
+
const { customClass = {}, disabled } = defineProps({
|
|
30
31
|
value: { type: null, required: true },
|
|
31
32
|
item: { type: Object, required: true },
|
|
32
33
|
selected: { type: Boolean, required: false },
|
|
33
|
-
customClass: { type: Object, required: false }
|
|
34
|
+
customClass: { type: Object, required: false },
|
|
35
|
+
disabled: { type: Boolean, required: false }
|
|
34
36
|
});
|
|
35
37
|
const toggle = () => {
|
|
38
|
+
if (disabled) return;
|
|
36
39
|
emit("input");
|
|
37
40
|
};
|
|
38
41
|
</script>
|
|
@@ -11,6 +11,7 @@ type __VLS_Props = {
|
|
|
11
11
|
item: CardItem;
|
|
12
12
|
selected?: boolean;
|
|
13
13
|
customClass?: RadioCustomClass;
|
|
14
|
+
disabled?: boolean;
|
|
14
15
|
};
|
|
15
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
:class="[customClass.checkbox, customClass[value?.includes?.(Value(option)) ? 'selected' : 'notSelected']?.checkbox]"
|
|
77
77
|
:custom-class="customClass.checkboxItem"
|
|
78
78
|
:selected="value?.includes?.(Value(option))"
|
|
79
|
+
:disabled="option.disable"
|
|
79
80
|
@click="handleSelect(option)"
|
|
80
81
|
/>
|
|
81
82
|
<UnButton
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
:class="[customClass.radio, customClass[isEqual(Value(option), value) ? 'selected' : 'notSelected']?.radio]"
|
|
97
98
|
:custom-class="customClass.radioItem"
|
|
98
99
|
:selected="isEqual(Value(option), value)"
|
|
100
|
+
:disabled="option.disable"
|
|
99
101
|
class="!min-w-60"
|
|
100
102
|
@click="handleSelect(option)"
|
|
101
103
|
/>
|
|
@@ -150,6 +152,7 @@ const Label = (option) => typeof option === "string" ? { title: option } : optio
|
|
|
150
152
|
const Selected = computed(() => items.find((o) => isEqual(Value(o), value.value)));
|
|
151
153
|
const IsSelected = (v) => items.find((o) => isEqual(Value(o), v));
|
|
152
154
|
const handleSelect = (data) => {
|
|
155
|
+
if (data.disable) return;
|
|
153
156
|
if (!multi) {
|
|
154
157
|
value.value = Value(data);
|
|
155
158
|
close();
|
|
@@ -5,8 +5,6 @@ import Moment from 'jalali-moment';
|
|
|
5
5
|
import Ajv from 'ajv';
|
|
6
6
|
export declare const moment: typeof Moment;
|
|
7
7
|
export declare const ajv: Ajv;
|
|
8
|
-
export declare const NESHAN_API_KEY: any;
|
|
9
|
-
export declare const NESHAN_WEB_KEY: any;
|
|
10
8
|
export declare const logger: (...args: any) => void;
|
|
11
9
|
export declare const s2n: (string: string | number) => string;
|
|
12
10
|
export declare const sleep: (ms: any) => Promise<unknown>;
|
|
@@ -23,8 +23,6 @@ import Handlebars from "handlebars";
|
|
|
23
23
|
import Ajv from "ajv";
|
|
24
24
|
export const moment = Moment;
|
|
25
25
|
export const ajv = new Ajv();
|
|
26
|
-
export const NESHAN_API_KEY = window.NESHAN_API_KEY;
|
|
27
|
-
export const NESHAN_WEB_KEY = window.NESHAN_WEB_KEY;
|
|
28
26
|
export const logger = (...args) => console.log("logger=>>>", ...args);
|
|
29
27
|
export const s2n = (string) => (string + "").replace(/[^\d.]|\.\./g, "");
|
|
30
28
|
export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -331,7 +329,7 @@ export const formattedAddress = async ([lng, lat]) => {
|
|
|
331
329
|
{
|
|
332
330
|
method: "GET",
|
|
333
331
|
headers: {
|
|
334
|
-
"Api-Key": NESHAN_API_KEY
|
|
332
|
+
"Api-Key": window.NESHAN_API_KEY
|
|
335
333
|
}
|
|
336
334
|
}
|
|
337
335
|
);
|
|
@@ -343,7 +341,7 @@ export const geoCodingAddress = async (address, coords) => {
|
|
|
343
341
|
{
|
|
344
342
|
method: "GET",
|
|
345
343
|
headers: {
|
|
346
|
-
"Api-Key": NESHAN_API_KEY
|
|
344
|
+
"Api-Key": window.NESHAN_API_KEY
|
|
347
345
|
}
|
|
348
346
|
}
|
|
349
347
|
);
|