@unsource/ui 2.0.8 → 2.0.11
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/.vscode/settings.json +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +7 -0
- package/dist/runtime/components/UnFormItem.vue +1 -1
- package/dist/runtime/components/UnIRDatePicker.vue +43 -22
- package/dist/runtime/components/UnMap.d.vue.ts +1 -1
- package/dist/runtime/components/UnMap.vue.d.ts +1 -1
- package/dist/runtime/composables/fetch.js +1 -1
- package/dist/runtime/composables/global.d.ts +12 -11
- package/dist/runtime/composables/global.js +4 -4
- package/package.json +4 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,6 +7,7 @@ const module = defineNuxtModule({
|
|
|
7
7
|
configKey: "unsourceUi"
|
|
8
8
|
},
|
|
9
9
|
moduleDependencies: {
|
|
10
|
+
"@nuxtjs/device": {},
|
|
10
11
|
"@unocss/nuxt": {
|
|
11
12
|
defaults: {
|
|
12
13
|
configFile: resolver.resolve("runtime/uno.config.{mjs,js,ts}")
|
|
@@ -65,6 +66,12 @@ const module = defineNuxtModule({
|
|
|
65
66
|
});
|
|
66
67
|
addImportsDir(resolver2.resolve("runtime/composables"));
|
|
67
68
|
addPlugin(resolver2.resolve("runtime/plugins/toast.client"));
|
|
69
|
+
_nuxt.options.build.transpile.push(
|
|
70
|
+
"jallali-moment",
|
|
71
|
+
"ajv",
|
|
72
|
+
"big.js",
|
|
73
|
+
"handlebars"
|
|
74
|
+
);
|
|
68
75
|
}
|
|
69
76
|
});
|
|
70
77
|
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<script setup>
|
|
115
115
|
import PN from "persian-number";
|
|
116
116
|
import { computed } from "#imports";
|
|
117
|
-
import UnLocationInput from "
|
|
117
|
+
import UnLocationInput from "./UnLocationInput.vue";
|
|
118
118
|
const emit = defineEmits(["update:modelValue"]);
|
|
119
119
|
const { item, options, required, isError } = defineProps({
|
|
120
120
|
item: { type: null, required: true },
|
|
@@ -1,36 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ClientOnly>
|
|
3
3
|
<div class="flex flex-col gap-1">
|
|
4
|
-
<p
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
<p
|
|
5
|
+
v-if="head"
|
|
6
|
+
class="text-(sm secondary-500) font-medium"
|
|
7
|
+
>
|
|
8
|
+
{{ head }}
|
|
9
|
+
</p>
|
|
10
|
+
<div
|
|
11
|
+
class="flex flex-col relative border-(1 solid) rounded-2xl h-12"
|
|
12
|
+
:class="[focused ? 'border-primary-500 bg-white' : 'bg-white border-white']"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
v-on-click-outside="() => focused = false"
|
|
16
|
+
class="flex p-3 rounded-full cursor-pointer h-full"
|
|
17
|
+
@click="click"
|
|
18
|
+
>
|
|
9
19
|
<p class="c-gray-400 text-base font-medium grow">
|
|
10
20
|
{{
|
|
11
21
|
value ? moment(value, format[type]).locale(locale).format(display[type]) : focused ? "" : placeholder
|
|
12
22
|
}}
|
|
13
23
|
</p>
|
|
14
|
-
<TheNuxtIcon
|
|
24
|
+
<TheNuxtIcon
|
|
25
|
+
name="solar:close-circle-bold-duotone"
|
|
26
|
+
class="text-5 c-gray-400"
|
|
27
|
+
@click.prevent.stop="emit('append')"
|
|
28
|
+
/>
|
|
15
29
|
</div>
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
<div
|
|
31
|
+
v-if="focused && focusable || value"
|
|
32
|
+
class="absolute top-0 right-0 transform -translate-y-1/2 -translate-x-1/6 px-2 bg-white z-2 "
|
|
33
|
+
>
|
|
34
|
+
<p class="text-(sm gray-900) font-extrabold">
|
|
35
|
+
{{ placeholder }}
|
|
36
|
+
</p>
|
|
19
37
|
</div>
|
|
20
38
|
<date-picker
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
v-model="value"
|
|
40
|
+
:editable="true"
|
|
41
|
+
:format="format[type]"
|
|
42
|
+
:display-format="display[type]"
|
|
43
|
+
:locale="locale"
|
|
44
|
+
view="day"
|
|
45
|
+
color="#7cb5f6"
|
|
46
|
+
:show="show"
|
|
47
|
+
:type="type"
|
|
48
|
+
custom-input="#my-custom-editable-input"
|
|
49
|
+
@close="show = false"
|
|
32
50
|
/>
|
|
33
|
-
<input
|
|
51
|
+
<input
|
|
52
|
+
id="my-custom-editable-input"
|
|
53
|
+
hidden
|
|
54
|
+
>
|
|
34
55
|
</div>
|
|
35
56
|
</div>
|
|
36
57
|
</ClientOnly>
|
|
@@ -39,7 +60,7 @@
|
|
|
39
60
|
<script setup>
|
|
40
61
|
import { vOnClickOutside } from "@vueuse/components";
|
|
41
62
|
import DatePicker from "vue3-persian-datetime-picker";
|
|
42
|
-
import moment from "
|
|
63
|
+
import { moment } from "#imports";
|
|
43
64
|
const format = {
|
|
44
65
|
datetime: "YYYY-MM-DDTHH:mm:ssZ",
|
|
45
66
|
time: "HH:mm",
|
|
@@ -10,7 +10,7 @@ type __VLS_ModelProps = {
|
|
|
10
10
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
12
12
|
Map: any;
|
|
13
|
-
getCenter: () =>
|
|
13
|
+
getCenter: () => import("ol/coordinate").Coordinate;
|
|
14
14
|
setCenter: (coords: Address) => void;
|
|
15
15
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,7 +10,7 @@ type __VLS_ModelProps = {
|
|
|
10
10
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
12
12
|
Map: any;
|
|
13
|
-
getCenter: () =>
|
|
13
|
+
getCenter: () => import("ol/coordinate").Coordinate;
|
|
14
14
|
setCenter: (coords: Address) => void;
|
|
15
15
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,7 +2,7 @@ import { useToken } from "./reuseable.js";
|
|
|
2
2
|
import { _get, _set, useNuxtApp, _takeRight } from "#imports";
|
|
3
3
|
const domain = location.hostname.split(".");
|
|
4
4
|
const tld = _takeRight(domain, 2).join(".");
|
|
5
|
-
export const BASE_URL = eval(process.env.BASE_URL);
|
|
5
|
+
export const BASE_URL = eval(process.env.BASE_URL) || "https://api.book.parand.app";
|
|
6
6
|
const setHeaders = (config) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
_set(config, ["headers", "Authorization"], _get(config, ["headers", "Authorization"], token.value || ""));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Moment from 'jalali-moment';
|
|
2
|
+
import Ajv from 'ajv';
|
|
2
3
|
import type { CoinGateway, DiscountCode, Form, Transaction, Wallet } from '../types/models.js';
|
|
3
4
|
import type { Address, MetaData, SocketJoinObject } from '../types/app.js';
|
|
4
5
|
import type { RemovableRef } from '@vueuse/core';
|
|
@@ -9,7 +10,7 @@ export declare const moment: typeof Moment;
|
|
|
9
10
|
export declare const s2n: (string: string | number) => string;
|
|
10
11
|
export declare const sleep: (ms: any) => Promise<unknown>;
|
|
11
12
|
export declare const geoLink: (location: Location, isIos?: boolean) => string;
|
|
12
|
-
export declare const ajv:
|
|
13
|
+
export declare const ajv: Ajv;
|
|
13
14
|
export declare const useComputedRoute: (route: any, key: any) => import("vue").WritableComputedRef<any, any>;
|
|
14
15
|
export declare const useComputedLodash: (value: any, keys: (string | number)[] | string) => import("vue").WritableComputedRef<any, any>;
|
|
15
16
|
export declare const KMapper: (num: any) => string;
|
|
@@ -19,23 +20,23 @@ export declare const copyData: (string: string) => Promise<void>;
|
|
|
19
20
|
export declare const mapper: (data: Record<string, any>, map: Record<string, any>, keys?: string[]) => Record<string, any>;
|
|
20
21
|
export declare const deg2rad: (deg: number) => number;
|
|
21
22
|
export declare const getDistanceFromLatLonInKm: (lat1: number, lon1: number, lat2: number, lon2: number) => number;
|
|
22
|
-
export declare const isoToNormal: (time: string) =>
|
|
23
|
-
export declare const isoToMonth: (time: string) =>
|
|
24
|
-
export declare const isoToDateTime: (time: string) =>
|
|
25
|
-
export declare const isoToHumanDateTime: (time: string) =>
|
|
26
|
-
export declare const isoToTime: (time: string) =>
|
|
27
|
-
export declare const isoToDate: (time: string) =>
|
|
28
|
-
export declare const isoToStandard: (time: string) =>
|
|
23
|
+
export declare const isoToNormal: (time: string) => string;
|
|
24
|
+
export declare const isoToMonth: (time: string) => string;
|
|
25
|
+
export declare const isoToDateTime: (time: string) => string;
|
|
26
|
+
export declare const isoToHumanDateTime: (time: string) => string;
|
|
27
|
+
export declare const isoToTime: (time: string) => string;
|
|
28
|
+
export declare const isoToDate: (time: string) => string;
|
|
29
|
+
export declare const isoToStandard: (time: string) => string;
|
|
29
30
|
export declare const dataToRange: (data: any[] | undefined) => [string, string];
|
|
30
31
|
export declare const subIsoDate: (du: string) => string;
|
|
31
|
-
export declare const isExpire: (time: any) =>
|
|
32
|
+
export declare const isExpire: (time: any) => boolean;
|
|
32
33
|
export declare const remainToExpire: (timestamp: any, time: string) => string[];
|
|
33
34
|
export declare const timeToDurationShort: (timeString?: string) => string;
|
|
34
35
|
export declare const timeToMinutes: (timeString?: string) => number;
|
|
35
36
|
export declare const minutesToTime: (m?: number) => string;
|
|
36
37
|
export declare const useSocketIo: () => import("socket.io-client").Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>;
|
|
37
38
|
export declare const watchSocket: (socket: any, joinObject: SocketJoinObject, dataHandler: any, loading?: import("vue").Ref<boolean, boolean>, initHandler?: () => Promise<void>) => void;
|
|
38
|
-
export declare const lastAct: (time: string) =>
|
|
39
|
+
export declare const lastAct: (time: string) => string;
|
|
39
40
|
export declare const setMeta: (data: MetaData) => void;
|
|
40
41
|
export declare const encrypt: (text: any, passphrase: any) => any;
|
|
41
42
|
export declare const decrypt: (ciphertext: any, passphrase: any) => any;
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
usePut,
|
|
18
18
|
useState
|
|
19
19
|
} from "#imports";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
20
|
+
import Moment from "jalali-moment";
|
|
21
|
+
import Ajv from "ajv";
|
|
22
22
|
import { io } from "socket.io-client";
|
|
23
23
|
import { digitsFaToEn, digitsArToEn } from "@persian-tools/persian-tools";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
24
|
+
import Big from "big.js";
|
|
25
|
+
import Handlebars from "handlebars";
|
|
26
26
|
import { useToken, useUserId } from "./reuseable.js";
|
|
27
27
|
export const NESHAN_API_KEY = "service.23c2db7869bd44b986353729776b338c";
|
|
28
28
|
export const NESHAN_WEB_KEY = "web.698da9dc73764b18a38a4c5cc4f92320";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unsource/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "nuxt ui kit for unsource env",
|
|
6
6
|
"repository": "https://github.com/alisa2142/unsource-ui",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@neshan-maps-platform/vue3-openlayers": "^2.0.1",
|
|
40
40
|
"@nuxt/kit": "^3.19.3",
|
|
41
|
+
"@nuxtjs/device": "^3.2.4",
|
|
41
42
|
"@nuxtjs/i18n": "^8.5.6",
|
|
42
43
|
"@persian-tools/persian-tools": "^4.0.4",
|
|
43
44
|
"@types/big.js": "^6.2.2",
|
|
@@ -51,10 +52,12 @@
|
|
|
51
52
|
"numeral": "^2.0.6",
|
|
52
53
|
"nuxt-lodash": "^2.5.3",
|
|
53
54
|
"nuxt-swiper": "^1.2.2",
|
|
55
|
+
"ol": "^8.2.0",
|
|
54
56
|
"persian-number": "^1.6.0",
|
|
55
57
|
"socket.io-client": "^4.8.1",
|
|
56
58
|
"swiper": "^11.2.10",
|
|
57
59
|
"unocss-preset-scrollbar": "^3.2.0",
|
|
60
|
+
"vue3-persian-datetime-picker": "^1.2.2",
|
|
58
61
|
"vue3-toastify": "^0.2.8"
|
|
59
62
|
},
|
|
60
63
|
"peerDependencies": {
|