@unsource/ui 2.9.46 → 2.9.47
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 -3
- package/README.md +84 -84
- package/dist/module.json +1 -1
- package/dist/runtime/components/UnCollapsible.vue +24 -24
- package/dist/runtime/components/UnList.vue +26 -26
- package/dist/runtime/components/UnProfile.vue +45 -45
- package/dist/runtime/components/UnRadioItem.vue +24 -24
- package/dist/runtime/components/UnTableRow.vue +74 -74
- package/dist/runtime/components/UnWalletActions.vue +25 -25
- package/dist/runtime/composables/global.js +3 -1
- package/dist/runtime/server/tsconfig.json +3 -3
- package/package.json +1 -1
package/.vscode/settings.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eslint.experimental.useFlatConfig": true
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"eslint.experimental.useFlatConfig": true
|
|
3
|
+
}
|
package/README.md
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Get your module up and running quickly.
|
|
3
|
-
|
|
4
|
-
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
-
- Name: My Module
|
|
6
|
-
- Package name: my-module
|
|
7
|
-
- Description: My new Nuxt module
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
|
-
# My Module
|
|
11
|
-
|
|
12
|
-
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
-
[![License][license-src]][license-href]
|
|
15
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
-
|
|
17
|
-
My new Nuxt module for doing amazing things.
|
|
18
|
-
|
|
19
|
-
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
-
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
-
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
<!-- Highlight some of the features your module provide here -->
|
|
26
|
-
- ⛰ Foo
|
|
27
|
-
- 🚠 Bar
|
|
28
|
-
- 🌲 Baz
|
|
29
|
-
|
|
30
|
-
## Quick Setup
|
|
31
|
-
|
|
32
|
-
Install the module to your Nuxt application with one command:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx nuxi module add my-module
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Contribution
|
|
42
|
-
|
|
43
|
-
<details>
|
|
44
|
-
<summary>Local development</summary>
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Install dependencies
|
|
48
|
-
npm install
|
|
49
|
-
|
|
50
|
-
# Generate type stubs
|
|
51
|
-
npm run dev:prepare
|
|
52
|
-
|
|
53
|
-
# Develop with the playground
|
|
54
|
-
npm run dev
|
|
55
|
-
|
|
56
|
-
# Build the playground
|
|
57
|
-
npm run dev:build
|
|
58
|
-
|
|
59
|
-
# Run ESLint
|
|
60
|
-
npm run lint
|
|
61
|
-
|
|
62
|
-
# Run Vitest
|
|
63
|
-
npm run test
|
|
64
|
-
npm run test:watch
|
|
65
|
-
|
|
66
|
-
# Release new version
|
|
67
|
-
npm run release
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
</details>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<!-- Badges -->
|
|
74
|
-
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
-
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
-
|
|
77
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
-
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
-
|
|
80
|
-
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
-
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
-
|
|
83
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
|
-
[nuxt-href]: https://nuxt.com
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: My Module
|
|
6
|
+
- Package name: my-module
|
|
7
|
+
- Description: My new Nuxt module
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# My Module
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
My new Nuxt module for doing amazing things.
|
|
18
|
+
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your module provide here -->
|
|
26
|
+
- ⛰ Foo
|
|
27
|
+
- 🚠 Bar
|
|
28
|
+
- 🌲 Baz
|
|
29
|
+
|
|
30
|
+
## Quick Setup
|
|
31
|
+
|
|
32
|
+
Install the module to your Nuxt application with one command:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx nuxi module add my-module
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Contribution
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Local development</summary>
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Install dependencies
|
|
48
|
+
npm install
|
|
49
|
+
|
|
50
|
+
# Generate type stubs
|
|
51
|
+
npm run dev:prepare
|
|
52
|
+
|
|
53
|
+
# Develop with the playground
|
|
54
|
+
npm run dev
|
|
55
|
+
|
|
56
|
+
# Build the playground
|
|
57
|
+
npm run dev:build
|
|
58
|
+
|
|
59
|
+
# Run ESLint
|
|
60
|
+
npm run lint
|
|
61
|
+
|
|
62
|
+
# Run Vitest
|
|
63
|
+
npm run test
|
|
64
|
+
npm run test:watch
|
|
65
|
+
|
|
66
|
+
# Release new version
|
|
67
|
+
npm run release
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<!-- Badges -->
|
|
74
|
+
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
+
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
+
|
|
77
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
+
|
|
80
|
+
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
+
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
+
|
|
83
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
4
|
-
>
|
|
5
|
-
<div
|
|
6
|
-
:class="customClass?.header"
|
|
7
|
-
class="cursor-pointer flex items-center justify-between"
|
|
8
|
-
@click="show = !show"
|
|
9
|
-
>
|
|
10
|
-
<UnCard
|
|
11
|
-
:item="{ avatar: icon, title, tags, description }"
|
|
12
|
-
:class="customClass.card"
|
|
13
|
-
:custom-class="customClass.cardInside"
|
|
14
|
-
/>
|
|
15
|
-
<UnNuxtIcon
|
|
16
|
-
:class="customClass?.collapsibleIcon"
|
|
17
|
-
:name="collapsibleIcon || 'solar:alt-arrow-down-bold-duotone'"
|
|
18
|
-
class="transition-all duration-300"
|
|
19
|
-
:style="{ rotate: show && !noRotate ? '180deg' : '0deg' }"
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
<template v-if="show">
|
|
23
|
-
<slot />
|
|
24
|
-
</template>
|
|
25
|
-
</div>
|
|
2
|
+
<div
|
|
3
|
+
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
:class="customClass?.header"
|
|
7
|
+
class="cursor-pointer flex items-center justify-between"
|
|
8
|
+
@click="show = !show"
|
|
9
|
+
>
|
|
10
|
+
<UnCard
|
|
11
|
+
:item="{ avatar: icon, title, tags, description }"
|
|
12
|
+
:class="customClass.card"
|
|
13
|
+
:custom-class="customClass.cardInside"
|
|
14
|
+
/>
|
|
15
|
+
<UnNuxtIcon
|
|
16
|
+
:class="customClass?.collapsibleIcon"
|
|
17
|
+
:name="collapsibleIcon || 'solar:alt-arrow-down-bold-duotone'"
|
|
18
|
+
class="transition-all duration-300"
|
|
19
|
+
:style="{ rotate: show && !noRotate ? '180deg' : '0deg' }"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<template v-if="show">
|
|
23
|
+
<slot />
|
|
24
|
+
</template>
|
|
25
|
+
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script setup>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
4
|
-
>
|
|
5
|
-
<div
|
|
6
|
-
v-if="title || $slots.default"
|
|
7
|
-
:class="customClass?.header"
|
|
8
|
-
class="flex items-center justify-between"
|
|
9
|
-
>
|
|
10
|
-
<h3
|
|
11
|
-
v-if="title"
|
|
12
|
-
:class="customClass?.title"
|
|
13
|
-
class="text-(lg gray-600) font-semibold"
|
|
14
|
-
>
|
|
15
|
-
{{ title }}
|
|
16
|
-
</h3>
|
|
17
|
-
<slot />
|
|
18
|
-
</div>
|
|
19
|
-
<UnCard
|
|
20
|
-
v-for="(item, index) in items"
|
|
21
|
-
:key="index"
|
|
22
|
-
:class="customClass.items"
|
|
23
|
-
:custom-class="customClass.item"
|
|
24
|
-
:item="item"
|
|
25
|
-
:to="to?.(item)"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
2
|
+
<div
|
|
3
|
+
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
v-if="title || $slots.default"
|
|
7
|
+
:class="customClass?.header"
|
|
8
|
+
class="flex items-center justify-between"
|
|
9
|
+
>
|
|
10
|
+
<h3
|
|
11
|
+
v-if="title"
|
|
12
|
+
:class="customClass?.title"
|
|
13
|
+
class="text-(lg gray-600) font-semibold"
|
|
14
|
+
>
|
|
15
|
+
{{ title }}
|
|
16
|
+
</h3>
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
<UnCard
|
|
20
|
+
v-for="(item, index) in items"
|
|
21
|
+
:key="index"
|
|
22
|
+
:class="customClass.items"
|
|
23
|
+
:custom-class="customClass.item"
|
|
24
|
+
:item="item"
|
|
25
|
+
:to="to?.(item)"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup>
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="grow flex flex-col gap-3">
|
|
3
|
-
<div class="flex flex-col items-stretch gap-3 grow-1 p-4">
|
|
4
|
-
<UnCard
|
|
5
|
-
v-for="(item, index) in items.filter((e) => !e.disable)"
|
|
6
|
-
:key="index"
|
|
2
|
+
<div class="grow flex flex-col gap-3">
|
|
3
|
+
<div class="flex flex-col items-stretch gap-3 grow-1 p-4">
|
|
4
|
+
<UnCard
|
|
5
|
+
v-for="(item, index) in items.filter((e) => !e.disable)"
|
|
6
|
+
:key="index"
|
|
7
7
|
:custom-class="_mergeWith(customClass.item, {
|
|
8
8
|
logo: '!w-8 !h-8 !border-none !rounded-0',
|
|
9
9
|
body: '!items-center'
|
|
10
|
-
}, merge)"
|
|
11
|
-
:class="customClass.items"
|
|
12
|
-
:to="item.to"
|
|
13
|
-
:item="item"
|
|
14
|
-
@click="item.handler?.()"
|
|
15
|
-
>
|
|
16
|
-
<template #header>
|
|
17
|
-
<UnNuxtIcon
|
|
18
|
-
:class="customClass.appendIcon"
|
|
19
|
-
:name="item.appendIcon || 'solar:alt-arrow-left-line-duotone'"
|
|
20
|
-
class="text-sm"
|
|
21
|
-
/>
|
|
22
|
-
</template>
|
|
23
|
-
</UnCard>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="grow" />
|
|
26
|
-
<div class="flex flex-col gap-2 text-sm text-center self-stretch">
|
|
27
|
-
<slot>
|
|
28
|
-
<NuxtLink
|
|
29
|
-
v-if="developer"
|
|
30
|
-
:to="developerLink || '#'"
|
|
31
|
-
target="_blank"
|
|
32
|
-
class="flex justify-center gap-1 self-center"
|
|
33
|
-
>طراحی و توسعه توسط <span class="text-blue-6 font-bold">{{ developer }}</span>
|
|
34
|
-
<UnNuxtIcon
|
|
35
|
-
v-if="developerIcon"
|
|
36
|
-
:name="developerIcon"
|
|
37
|
-
class="!text-xl"
|
|
38
|
-
/>
|
|
39
|
-
</NuxtLink>
|
|
40
|
-
<p v-if="owner">
|
|
41
|
-
کلیه حقوق مادی و معنوی این نرمافزار متعلق به شرکت <span class="text-primary-500 font-bold">{{ owner }}</span>
|
|
42
|
-
میباشد.
|
|
43
|
-
</p>
|
|
44
|
-
<p v-if="version">
|
|
45
|
-
V{{ version }}
|
|
46
|
-
</p>
|
|
47
|
-
</slot>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
10
|
+
}, merge)"
|
|
11
|
+
:class="customClass.items"
|
|
12
|
+
:to="item.to"
|
|
13
|
+
:item="item"
|
|
14
|
+
@click="item.handler?.()"
|
|
15
|
+
>
|
|
16
|
+
<template #header>
|
|
17
|
+
<UnNuxtIcon
|
|
18
|
+
:class="customClass.appendIcon"
|
|
19
|
+
:name="item.appendIcon || 'solar:alt-arrow-left-line-duotone'"
|
|
20
|
+
class="text-sm"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
</UnCard>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="grow" />
|
|
26
|
+
<div class="flex flex-col gap-2 text-sm text-center self-stretch">
|
|
27
|
+
<slot>
|
|
28
|
+
<NuxtLink
|
|
29
|
+
v-if="developer"
|
|
30
|
+
:to="developerLink || '#'"
|
|
31
|
+
target="_blank"
|
|
32
|
+
class="flex justify-center gap-1 self-center"
|
|
33
|
+
>طراحی و توسعه توسط <span class="text-blue-6 font-bold">{{ developer }}</span>
|
|
34
|
+
<UnNuxtIcon
|
|
35
|
+
v-if="developerIcon"
|
|
36
|
+
:name="developerIcon"
|
|
37
|
+
class="!text-xl"
|
|
38
|
+
/>
|
|
39
|
+
</NuxtLink>
|
|
40
|
+
<p v-if="owner">
|
|
41
|
+
کلیه حقوق مادی و معنوی این نرمافزار متعلق به شرکت <span class="text-primary-500 font-bold">{{ owner }}</span>
|
|
42
|
+
میباشد.
|
|
43
|
+
</p>
|
|
44
|
+
<p v-if="version">
|
|
45
|
+
V{{ version }}
|
|
46
|
+
</p>
|
|
47
|
+
</slot>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="relative 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 }"
|
|
5
|
-
@click.prevent.stop="toggle"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
name="radio"
|
|
9
|
-
:class="customClass.radio"
|
|
10
|
-
class="group-[.disable]:border-secondary border-(1 solid primary) rounded-1/2 w-4 h-4 flex justify-center items-center"
|
|
11
|
-
>
|
|
12
|
-
<div
|
|
13
|
-
name="radioInside"
|
|
14
|
-
class="bg-primary-500 rounded-1/2 h-10px w-10px transition-opacity duration-200"
|
|
15
|
-
:class="[customClass.radioInside, selected ? 'opacity-full' : 'opacity-0']"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
<UnCard
|
|
19
|
-
:item="item"
|
|
20
|
-
class="!bg-transparent grow-1"
|
|
21
|
-
:class="customClass.card"
|
|
22
|
-
:custom-class="customClass.item"
|
|
23
|
-
:info-icon="infoIcon"
|
|
24
|
-
/>
|
|
25
|
-
</div>
|
|
2
|
+
<div
|
|
3
|
+
class="relative 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 }"
|
|
5
|
+
@click.prevent.stop="toggle"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
name="radio"
|
|
9
|
+
:class="customClass.radio"
|
|
10
|
+
class="group-[.disable]:border-secondary border-(1 solid primary) rounded-1/2 w-4 h-4 flex justify-center items-center"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
name="radioInside"
|
|
14
|
+
class="bg-primary-500 rounded-1/2 h-10px w-10px transition-opacity duration-200"
|
|
15
|
+
:class="[customClass.radioInside, selected ? 'opacity-full' : 'opacity-0']"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
<UnCard
|
|
19
|
+
:item="item"
|
|
20
|
+
class="!bg-transparent grow-1"
|
|
21
|
+
:class="customClass.card"
|
|
22
|
+
:custom-class="customClass.item"
|
|
23
|
+
:info-icon="infoIcon"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script setup>
|
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tr
|
|
3
|
-
class="children:p-3 <md:children:p-1 text-center border-b-(2 solid border) hover:bg-primary-500/10"
|
|
4
|
-
:class="[trClass?.(item, items), { '!bg-primary-500/20': selected?.[idKey] === item[idKey] }]"
|
|
2
|
+
<tr
|
|
3
|
+
class="children:p-3 <md:children:p-1 text-center border-b-(2 solid border) hover:bg-primary-500/10"
|
|
4
|
+
:class="[trClass?.(item, items), { '!bg-primary-500/20': selected?.[idKey] === item[idKey] }]"
|
|
5
5
|
@click="$emit('click:row', item);
|
|
6
|
-
selected = item"
|
|
7
|
-
@dbclick="$emit('dbclick:row', item)"
|
|
8
|
-
>
|
|
9
|
-
<td
|
|
10
|
-
v-if="parentKey"
|
|
11
|
-
class="!max-w-1 !w-1"
|
|
12
|
-
:style="{ paddingInlineStart: level * 10 + 5 + 'px' }"
|
|
13
|
-
>
|
|
14
|
-
<UnNuxtIcon
|
|
15
|
-
v-if="subItems?.length"
|
|
16
|
-
class="cursor-pointer w-5 h-5"
|
|
17
|
-
:name="open ? 'solar:folder-open-broken' : 'solar:add-folder-broken'"
|
|
18
|
-
@click="open = !open"
|
|
19
|
-
/>
|
|
20
|
-
</td>
|
|
21
|
-
<td
|
|
22
|
-
v-for="col in cols.filter((e) => !e.disabled)"
|
|
23
|
-
:key="col.name + '-td'"
|
|
24
|
-
class="text-gray-400 text-sm text-center first:rounded-l-lg last:rounded-r-lg"
|
|
25
|
-
:style="{ paddingInlineStart: parentKey ? level * 10 + 5 + 'px' : 'unset' }"
|
|
26
|
-
:class="[col.classHandler?.(item, col, items, cols), col.class, { '<md:hidden': col.isDesktop, 'hidden <md:table-cell': col.isMobile }, tdClass]"
|
|
27
|
-
:dir="col.dir"
|
|
28
|
-
>
|
|
29
|
-
<slot
|
|
30
|
-
:name="col.name"
|
|
31
|
-
:col="col"
|
|
32
|
-
:item="item"
|
|
33
|
-
:items="_at(item, col.key)"
|
|
34
|
-
:index="col.name + '-slot'"
|
|
35
|
-
>
|
|
36
|
-
<div class="flex flex-col gap-0.5">
|
|
37
|
-
<p :class="textClass">
|
|
38
|
-
{{ col.handler ? col.handler(_at(item, col.key), item, col, items, cols) : _at(item, col.key).join(" ") }}
|
|
39
|
-
</p>
|
|
40
|
-
<small
|
|
41
|
-
v-if="col.subKey?.length"
|
|
42
|
-
class="font-500 text-gray-600 text-xs"
|
|
43
|
-
>{{ _at(item, col.subKey).join(" ") }}</small>
|
|
44
|
-
</div>
|
|
45
|
-
</slot>
|
|
46
|
-
</td>
|
|
47
|
-
<td
|
|
48
|
-
v-if="parentKey"
|
|
49
|
-
class="!max-w-1 !w-1 !p-1"
|
|
50
|
-
>
|
|
51
|
-
<UnNuxtIcon
|
|
52
|
-
class="cursor-pointer w-5 h-5"
|
|
53
|
-
name="solar:add-circle-broken"
|
|
54
|
-
@click="$emit('add:row', item)"
|
|
55
|
-
/>
|
|
56
|
-
</td>
|
|
57
|
-
</tr>
|
|
58
|
-
<template v-if="parentKey && subItems?.length && open">
|
|
59
|
-
<UnTableRow
|
|
60
|
-
v-for="(i, index) in subItems"
|
|
61
|
-
:key="index"
|
|
62
|
-
v-model="selected"
|
|
63
|
-
:item="i"
|
|
64
|
-
:items
|
|
65
|
-
:cols
|
|
66
|
-
:parent-key
|
|
67
|
-
:level="level + 1"
|
|
68
|
-
:id-key
|
|
69
|
-
:text-class
|
|
70
|
-
:td-class
|
|
71
|
-
:tr-class
|
|
72
|
-
@click:row="$emit('click:row', i)"
|
|
73
|
-
@dbclick:row="$emit('dbclick:row', i)"
|
|
74
|
-
@add:row="$emit('add:row', i)"
|
|
75
|
-
/>
|
|
76
|
-
</template>
|
|
6
|
+
selected = item"
|
|
7
|
+
@dbclick="$emit('dbclick:row', item)"
|
|
8
|
+
>
|
|
9
|
+
<td
|
|
10
|
+
v-if="parentKey"
|
|
11
|
+
class="!max-w-1 !w-1"
|
|
12
|
+
:style="{ paddingInlineStart: level * 10 + 5 + 'px' }"
|
|
13
|
+
>
|
|
14
|
+
<UnNuxtIcon
|
|
15
|
+
v-if="subItems?.length"
|
|
16
|
+
class="cursor-pointer w-5 h-5"
|
|
17
|
+
:name="open ? 'solar:folder-open-broken' : 'solar:add-folder-broken'"
|
|
18
|
+
@click="open = !open"
|
|
19
|
+
/>
|
|
20
|
+
</td>
|
|
21
|
+
<td
|
|
22
|
+
v-for="col in cols.filter((e) => !e.disabled)"
|
|
23
|
+
:key="col.name + '-td'"
|
|
24
|
+
class="text-gray-400 text-sm text-center first:rounded-l-lg last:rounded-r-lg"
|
|
25
|
+
:style="{ paddingInlineStart: parentKey ? level * 10 + 5 + 'px' : 'unset' }"
|
|
26
|
+
:class="[col.classHandler?.(item, col, items, cols), col.class, { '<md:hidden': col.isDesktop, 'hidden <md:table-cell': col.isMobile }, tdClass]"
|
|
27
|
+
:dir="col.dir"
|
|
28
|
+
>
|
|
29
|
+
<slot
|
|
30
|
+
:name="col.name"
|
|
31
|
+
:col="col"
|
|
32
|
+
:item="item"
|
|
33
|
+
:items="_at(item, col.key)"
|
|
34
|
+
:index="col.name + '-slot'"
|
|
35
|
+
>
|
|
36
|
+
<div class="flex flex-col gap-0.5">
|
|
37
|
+
<p :class="textClass">
|
|
38
|
+
{{ col.handler ? col.handler(_at(item, col.key), item, col, items, cols) : _at(item, col.key).join(" ") }}
|
|
39
|
+
</p>
|
|
40
|
+
<small
|
|
41
|
+
v-if="col.subKey?.length"
|
|
42
|
+
class="font-500 text-gray-600 text-xs"
|
|
43
|
+
>{{ _at(item, col.subKey).join(" ") }}</small>
|
|
44
|
+
</div>
|
|
45
|
+
</slot>
|
|
46
|
+
</td>
|
|
47
|
+
<td
|
|
48
|
+
v-if="parentKey"
|
|
49
|
+
class="!max-w-1 !w-1 !p-1"
|
|
50
|
+
>
|
|
51
|
+
<UnNuxtIcon
|
|
52
|
+
class="cursor-pointer w-5 h-5"
|
|
53
|
+
name="solar:add-circle-broken"
|
|
54
|
+
@click="$emit('add:row', item)"
|
|
55
|
+
/>
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<template v-if="parentKey && subItems?.length && open">
|
|
59
|
+
<UnTableRow
|
|
60
|
+
v-for="(i, index) in subItems"
|
|
61
|
+
:key="index"
|
|
62
|
+
v-model="selected"
|
|
63
|
+
:item="i"
|
|
64
|
+
:items
|
|
65
|
+
:cols
|
|
66
|
+
:parent-key
|
|
67
|
+
:level="level + 1"
|
|
68
|
+
:id-key
|
|
69
|
+
:text-class
|
|
70
|
+
:td-class
|
|
71
|
+
:tr-class
|
|
72
|
+
@click:row="$emit('click:row', i)"
|
|
73
|
+
@dbclick:row="$emit('dbclick:row', i)"
|
|
74
|
+
@add:row="$emit('add:row', i)"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
79
|
<script setup>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="border-t-(1 solid border) flex flex-wrap children:grow-1 sticky bottom-0 mt-auto z-2 bg-white rounded-t-xl -mx-4 <md:-mx-3 px-4 py-3 gap-3">
|
|
3
|
-
<UnCard
|
|
4
|
-
:item="selectedWallet"
|
|
5
|
-
class="basis-full"
|
|
6
|
-
/>
|
|
7
|
-
<UnButton
|
|
8
|
-
v-if="selectedWallet?.coin?.withdrawable && !noWithdraw"
|
|
9
|
-
variant="primary-fill"
|
|
10
|
-
class="basis-full"
|
|
11
|
-
label="برداشت"
|
|
12
|
-
@click="$emit('withdraw')"
|
|
13
|
-
/>
|
|
14
|
-
<UnButton
|
|
15
|
-
v-if="selectedWallet?.coin?.transferable && !noTransfer"
|
|
16
|
-
variant="primary-fill"
|
|
17
|
-
label="انتقال"
|
|
18
|
-
@click="$emit('transfer')"
|
|
19
|
-
/>
|
|
20
|
-
<UnButton
|
|
21
|
-
v-if="selectedWallet?.coin?.depositable && !noDeposit"
|
|
22
|
-
variant="primary-fill"
|
|
23
|
-
label="افزایش اعتبار"
|
|
24
|
-
@click="$emit('deposit')"
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
2
|
+
<div class="border-t-(1 solid border) flex flex-wrap children:grow-1 sticky bottom-0 mt-auto z-2 bg-white rounded-t-xl -mx-4 <md:-mx-3 px-4 py-3 gap-3">
|
|
3
|
+
<UnCard
|
|
4
|
+
:item="selectedWallet"
|
|
5
|
+
class="basis-full"
|
|
6
|
+
/>
|
|
7
|
+
<UnButton
|
|
8
|
+
v-if="selectedWallet?.coin?.withdrawable && !noWithdraw"
|
|
9
|
+
variant="primary-fill"
|
|
10
|
+
class="basis-full"
|
|
11
|
+
label="برداشت"
|
|
12
|
+
@click="$emit('withdraw')"
|
|
13
|
+
/>
|
|
14
|
+
<UnButton
|
|
15
|
+
v-if="selectedWallet?.coin?.transferable && !noTransfer"
|
|
16
|
+
variant="primary-fill"
|
|
17
|
+
label="انتقال"
|
|
18
|
+
@click="$emit('transfer')"
|
|
19
|
+
/>
|
|
20
|
+
<UnButton
|
|
21
|
+
v-if="selectedWallet?.coin?.depositable && !noDeposit"
|
|
22
|
+
variant="primary-fill"
|
|
23
|
+
label="افزایش اعتبار"
|
|
24
|
+
@click="$emit('deposit')"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script setup>
|
|
@@ -145,7 +145,9 @@ export const minutesToTime = (m = 0) => {
|
|
|
145
145
|
};
|
|
146
146
|
export const useSocketIo = () => {
|
|
147
147
|
const moduleConfig = useModuleConfig();
|
|
148
|
-
|
|
148
|
+
let api = window.BASE_URL || moduleConfig?.BASE_URL;
|
|
149
|
+
api = api?.endsWith("/api") ? api.replace("/api", "") : api;
|
|
150
|
+
const socket = io(api, {
|
|
149
151
|
extraHeaders: {
|
|
150
152
|
authorization: useToken().value || ""
|
|
151
153
|
// 'app-code': APP_CODE
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../.nuxt/tsconfig.server.json",
|
|
3
|
+
}
|