tsv2-library 0.2.64 → 0.2.65
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/src/build-entry.d.ts +6 -3
- package/dist/src/services/assetBrand.service.d.ts +18 -0
- package/dist/src/services/assetName.service.d.ts +15 -0
- package/dist/style.css +1 -1
- package/dist/tsv2-library.es.js +4142 -4121
- package/package.json +1 -1
- package/src/presets/button/index.js +12 -4
- package/src/presets/calendar/index.js +2 -2
- package/src/services/assetBrand.service.ts +46 -0
- package/src/services/assetName.service.ts +23 -0
package/package.json
CHANGED
|
@@ -56,11 +56,13 @@ export default {
|
|
|
56
56
|
|
|
57
57
|
// Primary Button
|
|
58
58
|
{
|
|
59
|
-
'text-white dark
|
|
59
|
+
'text-white dark:!text-primary-800':
|
|
60
60
|
!props.link &&
|
|
61
61
|
props.severity === null &&
|
|
62
62
|
!props.text &&
|
|
63
63
|
!props.outlined &&
|
|
64
|
+
!props.disabled &&
|
|
65
|
+
!context.disabled &&
|
|
64
66
|
!props.plain,
|
|
65
67
|
'bg-primary dark:bg-primary-300':
|
|
66
68
|
!props.link &&
|
|
@@ -117,10 +119,12 @@ export default {
|
|
|
117
119
|
|
|
118
120
|
// Success Button
|
|
119
121
|
{
|
|
120
|
-
'text-white dark
|
|
122
|
+
'text-white dark:!text-success-900':
|
|
121
123
|
props.severity === 'success' &&
|
|
122
124
|
!props.text &&
|
|
123
125
|
!props.outlined &&
|
|
126
|
+
!props.disabled &&
|
|
127
|
+
!context.disabled &&
|
|
124
128
|
!props.plain,
|
|
125
129
|
'bg-success dark:bg-success-300':
|
|
126
130
|
props.severity === 'success' &&
|
|
@@ -204,10 +208,12 @@ export default {
|
|
|
204
208
|
|
|
205
209
|
// Dark Button
|
|
206
210
|
{
|
|
207
|
-
'text-white dark
|
|
211
|
+
'text-white dark:!text-general-900':
|
|
208
212
|
props.severity === 'dark' &&
|
|
209
213
|
!props.text &&
|
|
210
214
|
!props.outlined &&
|
|
215
|
+
!props.disabled &&
|
|
216
|
+
!context.disabled &&
|
|
211
217
|
!props.plain,
|
|
212
218
|
'bg-general-900 dark:bg-general-50':
|
|
213
219
|
props.severity === 'dark' &&
|
|
@@ -233,10 +239,12 @@ export default {
|
|
|
233
239
|
|
|
234
240
|
// Danger Button
|
|
235
241
|
{
|
|
236
|
-
'text-white dark
|
|
242
|
+
'text-white dark:!text-danger-800':
|
|
237
243
|
props.severity === 'danger' &&
|
|
238
244
|
!props.text &&
|
|
239
245
|
!props.outlined &&
|
|
246
|
+
!props.disabled &&
|
|
247
|
+
!context.disabled &&
|
|
240
248
|
!props.plain,
|
|
241
249
|
'bg-danger dark:bg-danger-200':
|
|
242
250
|
props.severity === 'danger' &&
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
'min-h-[26.8px]',
|
|
122
122
|
|
|
123
123
|
{
|
|
124
|
-
'hidden': props.dateFormat?.toString().toLowerCase()
|
|
124
|
+
'hidden': !props.dateFormat?.toString().toLowerCase().includes('y') && state.currentView === 'month',
|
|
125
125
|
},
|
|
126
126
|
|
|
127
127
|
//Font
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
yearTitle: ({ props }) => ({
|
|
210
210
|
class: [
|
|
211
211
|
{
|
|
212
|
-
'hidden': props.dateFormat?.toString().toLowerCase()
|
|
212
|
+
'hidden': !props.dateFormat?.toString().toLowerCase().includes('y'),
|
|
213
213
|
},
|
|
214
214
|
|
|
215
215
|
//Font
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import axios, { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
|
|
3
|
+
export interface ServiceOptions {
|
|
4
|
+
headers?: Record<string, unknown>;
|
|
5
|
+
params?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AssetBrandDropdownOption {
|
|
9
|
+
_id: string;
|
|
10
|
+
key: number;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface GetAssetBrandDropdownResponse {
|
|
15
|
+
data: AssetBrandDropdownOption[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const API = ({
|
|
19
|
+
headers = {},
|
|
20
|
+
params = {},
|
|
21
|
+
}: ServiceOptions = {}): AxiosInstance => {
|
|
22
|
+
const user = JSON.parse(localStorage.getItem('user') ?? '{}');
|
|
23
|
+
const BASE_URL = import.meta.env.VITE_APP_ATTRIBUTES_API;
|
|
24
|
+
|
|
25
|
+
const instance = axios.create({
|
|
26
|
+
baseURL: `${BASE_URL}/v2/brands`,
|
|
27
|
+
headers: {
|
|
28
|
+
'Content-type': 'application/json',
|
|
29
|
+
'Authorization': `Bearer ${user.token}`,
|
|
30
|
+
...headers,
|
|
31
|
+
},
|
|
32
|
+
params,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return instance;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const AssetBrandService = {
|
|
39
|
+
getAssetBrandDropdown: (): Promise<
|
|
40
|
+
AxiosResponse<GetAssetBrandDropdownResponse>
|
|
41
|
+
> => {
|
|
42
|
+
return API().get('/dropdown');
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default AssetBrandService;
|
|
@@ -16,6 +16,22 @@ export type GetAssetNameListQueryParams = {
|
|
|
16
16
|
tagType?: string;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
export interface AssetNameDropdownOption {
|
|
20
|
+
_id: string;
|
|
21
|
+
key: number;
|
|
22
|
+
name: string;
|
|
23
|
+
category: {
|
|
24
|
+
_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
key: number;
|
|
27
|
+
};
|
|
28
|
+
tagType: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface GetAssetNameDropdownResponse {
|
|
32
|
+
data: AssetNameDropdownOption[];
|
|
33
|
+
}
|
|
34
|
+
|
|
19
35
|
export const API = ({
|
|
20
36
|
headers = {},
|
|
21
37
|
params = {},
|
|
@@ -65,10 +81,17 @@ const getOptions = (
|
|
|
65
81
|
return API({ params }).get('/options');
|
|
66
82
|
};
|
|
67
83
|
|
|
84
|
+
const getAssetNameDropdown = (): Promise<
|
|
85
|
+
AxiosResponse<GetAssetNameDropdownResponse>
|
|
86
|
+
> => {
|
|
87
|
+
return API().get('/dropdown');
|
|
88
|
+
};
|
|
89
|
+
|
|
68
90
|
export default {
|
|
69
91
|
getAssetNameDetail,
|
|
70
92
|
getAssetNameList,
|
|
71
93
|
getAssetsByAssetName,
|
|
72
94
|
getUnpairedAssetName,
|
|
95
|
+
getAssetNameDropdown,
|
|
73
96
|
getOptions,
|
|
74
97
|
};
|