@unsource/ui 2.8.22 → 2.8.24

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unsource-ui",
3
3
  "configKey": "unsourceUi",
4
- "version": "2.8.22",
4
+ "version": "2.8.24",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,6 +1,10 @@
1
1
  import type { CardItem } from './UnCard.vue.js';
2
2
  import type { RadioCustomClass } from './UnRadioItem.vue.js';
3
3
  import type { CheckboxCustomClass } from './UnCheckboxItem.vue.js';
4
+ export type SelectCustomClass = Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
5
+ radioItem?: RadioCustomClass;
6
+ checkboxItem?: CheckboxCustomClass;
7
+ };
4
8
  type __VLS_Props = {
5
9
  placeholder?: string;
6
10
  icon?: string;
@@ -13,10 +17,7 @@ type __VLS_Props = {
13
17
  valueKey?: string;
14
18
  readonly?: boolean;
15
19
  inline?: boolean;
16
- customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
17
- radioItem?: RadioCustomClass;
18
- checkboxItem?: CheckboxCustomClass;
19
- };
20
+ customClass?: SelectCustomClass;
20
21
  };
21
22
  type __VLS_ModelProps = {
22
23
  modelValue?: any;
@@ -1,6 +1,10 @@
1
1
  import type { CardItem } from './UnCard.vue.js';
2
2
  import type { RadioCustomClass } from './UnRadioItem.vue.js';
3
3
  import type { CheckboxCustomClass } from './UnCheckboxItem.vue.js';
4
+ export type SelectCustomClass = Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
5
+ radioItem?: RadioCustomClass;
6
+ checkboxItem?: CheckboxCustomClass;
7
+ };
4
8
  type __VLS_Props = {
5
9
  placeholder?: string;
6
10
  icon?: string;
@@ -13,10 +17,7 @@ type __VLS_Props = {
13
17
  valueKey?: string;
14
18
  readonly?: boolean;
15
19
  inline?: boolean;
16
- customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
17
- radioItem?: RadioCustomClass;
18
- checkboxItem?: CheckboxCustomClass;
19
- };
20
+ customClass?: SelectCustomClass;
20
21
  };
21
22
  type __VLS_ModelProps = {
22
23
  modelValue?: any;
@@ -21,7 +21,7 @@
21
21
  {{ ["REJECTED", "FAILED"].includes(transaction.status) ? "(\u0646\u0627\u0645\u0648\u0641\u0642)" : "" }}
22
22
  </p>
23
23
  <p class="font-bold">
24
- {{ transaction.amount?.toLocaleString("en") }} {{ $t("\u062A\u0648\u0645\u0627\u0646") }}
24
+ {{ transaction.amount?.toLocaleString("en") }} {{ $t(transaction.wallet?.coin?.unit || transaction.toWallet?.coin?.unit || "\u062A\u0648\u0645\u0627\u0646") }}
25
25
  </p>
26
26
  </template>
27
27
  <template #bodyEnd>
@@ -1,3 +1,5 @@
1
+ import type { SelectCustomClass } from '~/src/runtime/components/UnSelect.vue';
2
+ export type WalletCustomClass = Partial<Record<'transactionSelect', string>>;
1
3
  type __VLS_Props = {
2
4
  multi?: boolean;
3
5
  noWithdraw?: boolean;
@@ -5,6 +7,9 @@ type __VLS_Props = {
5
7
  noTransfer?: boolean;
6
8
  trxQuery?: Record<string, string | number | boolean>;
7
9
  trxTitleKey?: string;
10
+ customClass?: WalletCustomClass & {
11
+ transactionSelectItem?: SelectCustomClass;
12
+ };
8
13
  };
9
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
15
  declare const _default: typeof __VLS_export;
@@ -20,13 +20,14 @@
20
20
  </p>
21
21
  <p>
22
22
  {{ _round(selectedWallet?.balance || 0, selectedWallet?.coin?.precision || 0)?.toLocaleString("en") }}
23
- {{ $t("\u062A\u0648\u0645\u0627\u0646") }}
23
+ {{ $t(selectedWallet?.coin?.unit) }}
24
24
  </p>
25
25
  </div>
26
26
  <UnSelect
27
27
  v-if="tab === 'wallet' && multi"
28
28
  v-model="selectedWallet"
29
- :custom-class="{ innerWrapper: '<md:(!max-h-unset bg-white !pb-0 !border-(1 solid transparent)' }"
29
+ :class="customClass.transactionSelect"
30
+ :custom-class="_merge(customClass.transactionSelectItem, { innerWrapper: '<md:(!max-h-unset bg-white !pb-0 !border-(1 solid transparent)' })"
30
31
  inline
31
32
  light
32
33
  :items="mappedWallet"
@@ -37,6 +38,7 @@
37
38
  <UnSelect
38
39
  v-model="filterWallet"
39
40
  light
41
+ placeholder="همه تراکنش ها"
40
42
  :custom-class="{ header: '!h-unset !px-2', radio: '!p-1 !px-3', radioItem: { card: 'grow-1', item: { body: '!p-1' } } }"
41
43
  :items="[{ title: '\u0647\u0645\u0647 \u062A\u0631\u0627\u06A9\u0646\u0634 \u0647\u0627', id: null }, ...mappedWallet]"
42
44
  value-key="id"
@@ -96,15 +98,16 @@
96
98
  </template>
97
99
 
98
100
  <script setup>
99
- import { _ceil, _round, computed, ref, useAsyncData, useNuxtApp, useUser, useWallets } from "#imports";
101
+ import { _ceil, _merge, _round, computed, ref, useAsyncData, useNuxtApp, useUser, useWallets } from "#imports";
100
102
  import { getMyTransactions } from "../composables/services";
101
- const { multi = true, trxQuery = {} } = defineProps({
103
+ const { multi = true, trxQuery = {}, customClass = {} } = defineProps({
102
104
  multi: { type: Boolean, required: false },
103
105
  noWithdraw: { type: Boolean, required: false },
104
106
  noDeposit: { type: Boolean, required: false },
105
107
  noTransfer: { type: Boolean, required: false },
106
108
  trxQuery: { type: Object, required: false },
107
- trxTitleKey: { type: String, required: false }
109
+ trxTitleKey: { type: String, required: false },
110
+ customClass: { type: Object, required: false }
108
111
  });
109
112
  const tabs = [
110
113
  {
@@ -1,3 +1,5 @@
1
+ import type { SelectCustomClass } from '~/src/runtime/components/UnSelect.vue';
2
+ export type WalletCustomClass = Partial<Record<'transactionSelect', string>>;
1
3
  type __VLS_Props = {
2
4
  multi?: boolean;
3
5
  noWithdraw?: boolean;
@@ -5,6 +7,9 @@ type __VLS_Props = {
5
7
  noTransfer?: boolean;
6
8
  trxQuery?: Record<string, string | number | boolean>;
7
9
  trxTitleKey?: string;
10
+ customClass?: WalletCustomClass & {
11
+ transactionSelectItem?: SelectCustomClass;
12
+ };
8
13
  };
9
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
15
  declare const _default: typeof __VLS_export;
@@ -65,7 +65,8 @@ export const getSections = async () => {
65
65
  export const getCategorySection = async (data) => {
66
66
  const { result } = await useGet(`/InputOption${data.query}`, {
67
67
  headers: {
68
- qt: "v1"
68
+ "qt": "v1",
69
+ "app-code": data.appCode
69
70
  },
70
71
  params: {
71
72
  "with-input": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsource/ui",
3
- "version": "2.8.22",
3
+ "version": "2.8.24",
4
4
  "private": false,
5
5
  "description": "nuxt ui kit for unsource env",
6
6
  "repository": "https://github.com/alisa2142/unsource-ui",