@amirjalili1374/ui-kit 1.2.2 → 1.3.0
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/README.md +134 -1
- package/dist/components/layout/AppHeader.vue.d.ts +71 -0
- package/dist/components/layout/AppHeader.vue.d.ts.map +1 -0
- package/dist/components/layout/AppSidebar.vue.d.ts +41 -0
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -0
- package/dist/components/shared/CustomDataTable.vue.d.ts.map +1 -1
- package/dist/composables/useDataTable.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/services/apiService.d.ts +1 -1
- package/dist/services/apiService.d.ts.map +1 -1
- package/dist/services/axiosInstance.d.ts +13 -6
- package/dist/services/axiosInstance.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/componentTypes/DataTableTypes.d.ts +2 -0
- package/dist/types/componentTypes/DataTableTypes.d.ts.map +1 -1
- package/dist/ui-kit.cjs.js +7 -1
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +2898 -175
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,7 +63,14 @@ You can import components individually for better tree-shaking:
|
|
|
63
63
|
|
|
64
64
|
```vue
|
|
65
65
|
<script setup lang="ts">
|
|
66
|
-
import {
|
|
66
|
+
import {
|
|
67
|
+
CustomDataTable,
|
|
68
|
+
BaseIcon,
|
|
69
|
+
ShamsiDatePicker,
|
|
70
|
+
AppSidebar,
|
|
71
|
+
AppHeader
|
|
72
|
+
} from '@amirjalili1374/ui-kit';
|
|
73
|
+
import type { MenuItem, HeaderAction } from '@amirjalili1374/ui-kit';
|
|
67
74
|
</script>
|
|
68
75
|
|
|
69
76
|
<template>
|
|
@@ -72,6 +79,77 @@ import { CustomDataTable, BaseIcon, ShamsiDatePicker } from '@amirjalili1374/ui-
|
|
|
72
79
|
</template>
|
|
73
80
|
```
|
|
74
81
|
|
|
82
|
+
### Use Layout Components (Sidebar & Header)
|
|
83
|
+
|
|
84
|
+
```vue
|
|
85
|
+
<script setup lang="ts">
|
|
86
|
+
import { AppSidebar, AppHeader, useCustomizerStore } from '@amirjalili1374/ui-kit';
|
|
87
|
+
import type { MenuItem, HeaderAction } from '@amirjalili1374/ui-kit';
|
|
88
|
+
|
|
89
|
+
const customizer = useCustomizerStore();
|
|
90
|
+
|
|
91
|
+
// Define menu items
|
|
92
|
+
const menuItems: MenuItem[] = [
|
|
93
|
+
{
|
|
94
|
+
title: 'داشبورد',
|
|
95
|
+
icon: 'mdi-home',
|
|
96
|
+
to: '/dashboard'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'کاربران',
|
|
100
|
+
icon: 'mdi-account-group',
|
|
101
|
+
items: [
|
|
102
|
+
{ title: 'لیست کاربران', icon: 'mdi-account-multiple', to: '/users' },
|
|
103
|
+
{ title: 'افزودن کاربر', icon: 'mdi-account-plus', to: '/users/create' }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: 'تنظیمات',
|
|
108
|
+
icon: 'mdi-cog',
|
|
109
|
+
to: '/settings',
|
|
110
|
+
chip: { content: '3', color: 'error' }
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
// Define header actions
|
|
115
|
+
const headerActions: HeaderAction[] = [
|
|
116
|
+
{
|
|
117
|
+
icon: 'mdi-plus',
|
|
118
|
+
label: 'ایجاد',
|
|
119
|
+
color: 'primary',
|
|
120
|
+
onClick: () => console.log('Create clicked')
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<template>
|
|
126
|
+
<v-app>
|
|
127
|
+
<AppHeader
|
|
128
|
+
title="پنل مدیریت"
|
|
129
|
+
subtitle="خوش آمدید"
|
|
130
|
+
:menu-items="menuItems"
|
|
131
|
+
:actions="headerActions"
|
|
132
|
+
show-search
|
|
133
|
+
show-profile
|
|
134
|
+
profile-name="کاربر"
|
|
135
|
+
:profile-avatar="/avatar.jpg"
|
|
136
|
+
/>
|
|
137
|
+
|
|
138
|
+
<AppSidebar
|
|
139
|
+
:menu-items="menuItems"
|
|
140
|
+
logo="/logo.svg"
|
|
141
|
+
logo-light="/logo-light.svg"
|
|
142
|
+
logo-text="UI Kit"
|
|
143
|
+
:mini-sidebar="customizer.mini_sidebar"
|
|
144
|
+
/>
|
|
145
|
+
|
|
146
|
+
<v-main>
|
|
147
|
+
<router-view />
|
|
148
|
+
</v-main>
|
|
149
|
+
</v-app>
|
|
150
|
+
</template>
|
|
151
|
+
```
|
|
152
|
+
|
|
75
153
|
### Use Composables
|
|
76
154
|
|
|
77
155
|
```typescript
|
|
@@ -107,6 +185,57 @@ Directives are automatically registered when you install the plugin:
|
|
|
107
185
|
</template>
|
|
108
186
|
```
|
|
109
187
|
|
|
188
|
+
### Configure Axios Instance
|
|
189
|
+
|
|
190
|
+
Before using components that make API calls (like `CustomDataTable`), configure your axios instance:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { configureAxiosInstance } from '@amirjalili1374/ui-kit';
|
|
194
|
+
import axios from 'axios';
|
|
195
|
+
|
|
196
|
+
// Create your configured axios instance
|
|
197
|
+
const axiosInstance = axios.create({
|
|
198
|
+
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://your-api-url.com',
|
|
199
|
+
headers: {
|
|
200
|
+
'Content-Type': 'application/json'
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// Add auth token interceptor
|
|
205
|
+
axiosInstance.interceptors.request.use((config) => {
|
|
206
|
+
const token = localStorage.getItem('token');
|
|
207
|
+
if (token) {
|
|
208
|
+
config.headers.Authorization = `Bearer ${token}`;
|
|
209
|
+
}
|
|
210
|
+
return config;
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// Configure the library to use your axios instance
|
|
214
|
+
configureAxiosInstance(axiosInstance);
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Or pass axios instance directly to CustomDataTable:**
|
|
218
|
+
|
|
219
|
+
```vue
|
|
220
|
+
<script setup>
|
|
221
|
+
import { CustomDataTable } from '@amirjalili1374/ui-kit';
|
|
222
|
+
import axios from 'axios';
|
|
223
|
+
|
|
224
|
+
const myAxiosInstance = axios.create({
|
|
225
|
+
baseURL: 'http://your-api-url.com'
|
|
226
|
+
});
|
|
227
|
+
</script>
|
|
228
|
+
|
|
229
|
+
<template>
|
|
230
|
+
<CustomDataTable
|
|
231
|
+
:apiResource="/api/job-details"
|
|
232
|
+
:axiosInstance="myAxiosInstance"
|
|
233
|
+
:headers="headers"
|
|
234
|
+
:height="600"
|
|
235
|
+
/>
|
|
236
|
+
</template>
|
|
237
|
+
```
|
|
238
|
+
|
|
110
239
|
### Use Utilities
|
|
111
240
|
|
|
112
241
|
```typescript
|
|
@@ -140,6 +269,10 @@ const formatted = formatNumberWithCommas(1234567); // "1,234,567"
|
|
|
140
269
|
- `AppStepper` - Step-by-step wizard component
|
|
141
270
|
- `Loading` - Loading overlay component
|
|
142
271
|
|
|
272
|
+
### Layout Components
|
|
273
|
+
- `AppSidebar` - Navigation sidebar with menu items, logo, and mini sidebar support
|
|
274
|
+
- `AppHeader` - Top header bar with search, notifications, profile menu, and custom actions
|
|
275
|
+
|
|
143
276
|
## Available Composables
|
|
144
277
|
|
|
145
278
|
- `useDataTable` - Server-side data table with pagination and filtering
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header action button type
|
|
3
|
+
*/
|
|
4
|
+
export interface HeaderAction {
|
|
5
|
+
icon?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
variant?: string;
|
|
9
|
+
size?: string;
|
|
10
|
+
badge?: string | number;
|
|
11
|
+
badgeColor?: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
title?: string;
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
showSidebarToggle?: boolean;
|
|
20
|
+
showSearch?: boolean;
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
searchValue?: string;
|
|
23
|
+
showNotifications?: boolean;
|
|
24
|
+
notificationCount?: number;
|
|
25
|
+
showProfile?: boolean;
|
|
26
|
+
profileAvatar?: string;
|
|
27
|
+
profileName?: string;
|
|
28
|
+
profileMenu?: Array<{
|
|
29
|
+
title: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
to?: string;
|
|
32
|
+
href?: string;
|
|
33
|
+
divider?: boolean;
|
|
34
|
+
action?: () => void;
|
|
35
|
+
}>;
|
|
36
|
+
actions?: HeaderAction[];
|
|
37
|
+
color?: string;
|
|
38
|
+
elevation?: number;
|
|
39
|
+
height?: number | string;
|
|
40
|
+
class?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
43
|
+
search: (value: string) => any;
|
|
44
|
+
"update:searchValue": (value: string) => any;
|
|
45
|
+
"toggle-sidebar": () => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
47
|
+
onSearch?: (value: string) => any;
|
|
48
|
+
"onUpdate:searchValue"?: (value: string) => any;
|
|
49
|
+
"onToggle-sidebar"?: () => any;
|
|
50
|
+
}>, {
|
|
51
|
+
color: string;
|
|
52
|
+
height: string | number;
|
|
53
|
+
elevation: number;
|
|
54
|
+
actions: HeaderAction[];
|
|
55
|
+
showSidebarToggle: boolean;
|
|
56
|
+
showSearch: boolean;
|
|
57
|
+
searchPlaceholder: string;
|
|
58
|
+
showNotifications: boolean;
|
|
59
|
+
notificationCount: number;
|
|
60
|
+
showProfile: boolean;
|
|
61
|
+
profileMenu: {
|
|
62
|
+
title: string;
|
|
63
|
+
icon?: string;
|
|
64
|
+
to?: string;
|
|
65
|
+
href?: string;
|
|
66
|
+
divider?: boolean;
|
|
67
|
+
action?: () => void;
|
|
68
|
+
}[];
|
|
69
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
70
|
+
export default _default;
|
|
71
|
+
//# sourceMappingURL=AppHeader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/AppHeader.vue"],"names":[],"mappings":"AAoRA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAonBD,wBAQG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu item type definition
|
|
3
|
+
*/
|
|
4
|
+
export interface MenuItem {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
items?: MenuItem[];
|
|
10
|
+
chip?: {
|
|
11
|
+
content: string | number;
|
|
12
|
+
color?: string;
|
|
13
|
+
};
|
|
14
|
+
divider?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface Props {
|
|
18
|
+
menuItems?: MenuItem[];
|
|
19
|
+
logo?: string;
|
|
20
|
+
logoLight?: string;
|
|
21
|
+
logoText?: string;
|
|
22
|
+
miniSidebar?: boolean;
|
|
23
|
+
permanent?: boolean;
|
|
24
|
+
temporary?: boolean;
|
|
25
|
+
rail?: boolean;
|
|
26
|
+
location?: 'left' | 'right';
|
|
27
|
+
width?: number | string;
|
|
28
|
+
railWidth?: number | string;
|
|
29
|
+
}
|
|
30
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
31
|
+
width: string | number;
|
|
32
|
+
location: "left" | "right";
|
|
33
|
+
menuItems: MenuItem[];
|
|
34
|
+
miniSidebar: boolean;
|
|
35
|
+
permanent: boolean;
|
|
36
|
+
temporary: boolean;
|
|
37
|
+
rail: boolean;
|
|
38
|
+
railWidth: string | number;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
export default _default;
|
|
41
|
+
//# sourceMappingURL=AppSidebar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/AppSidebar.vue"],"names":[],"mappings":"AAyOA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,KAAK;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;;;;;;;;;;;AAoaD,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/shared/CustomDataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomDataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/shared/CustomDataTable.vue"],"names":[],"mappings":"AAk2DA,OAAO,KAAK,EAAa,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,KAAK,EAGV,cAAc,EAEd,SAAS,EACV,MAAM,uCAAuC,CAAC;AAe/C;;GAEG;AACH,UAAU,KAAM,SAAQ,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6+GD,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataTable.d.ts","sourceRoot":"","sources":["../../src/composables/useDataTable.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;yBAc5B,OAAO,MAAM,EAAE,GAAG,CAAC;;
|
|
1
|
+
{"version":3,"file":"useDataTable.d.ts","sourceRoot":"","sources":["../../src/composables/useDataTable.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;yBAc5B,OAAO,MAAM,EAAE,GAAG,CAAC;;oBAgF7B,MAAM;4BAME,MAAM;EAkCtC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export { default as UiParentCard } from './components/shared/UiParentCard.vue';
|
|
|
20
20
|
export { default as VPriceTextField } from './components/shared/VPriceTextField.vue';
|
|
21
21
|
export { default as AppStepper } from './components/common/AppStepper.vue';
|
|
22
22
|
export { default as Loading } from './components/Loading.vue';
|
|
23
|
+
export { default as AppSidebar } from './components/layout/AppSidebar.vue';
|
|
24
|
+
export { default as AppHeader } from './components/layout/AppHeader.vue';
|
|
25
|
+
export type { MenuItem } from './components/layout/AppSidebar.vue';
|
|
26
|
+
export type { HeaderAction } from './components/layout/AppHeader.vue';
|
|
23
27
|
export { useDataTable } from './composables/useDataTable';
|
|
24
28
|
export type { DataTableOptions, PaginationState } from './composables/useDataTable';
|
|
25
29
|
export { useTableActions } from './composables/useTableActions';
|
|
@@ -35,6 +39,8 @@ export * from './utils/NationalCodeValidator';
|
|
|
35
39
|
export * from './utils/helpers/fetch-wrapper';
|
|
36
40
|
export { configureAuth } from './utils/helpers/fetch-wrapper';
|
|
37
41
|
export type { AuthConfig } from './utils/helpers/fetch-wrapper';
|
|
42
|
+
export { configureAxiosInstance } from './services/axiosInstance';
|
|
43
|
+
export { default as getAxiosInstance } from './services/axiosInstance';
|
|
38
44
|
export * from './validators/nationalCodeRule';
|
|
39
45
|
export { useCustomizerStore } from './stores/customizer';
|
|
40
46
|
export * from './types/componentTypes/DataTableType';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,mBAAmB,CAAC;AAO3B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAA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,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAMvE,cAAc,+BAA+B,CAAC;AAM9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAUzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AAGtD,cAAc,+BAA+B,CAAC;AAK9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,QAI/B;;;;AAGD,wBAEE"}
|
|
@@ -14,7 +14,7 @@ export interface ApiService {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Creates an API service instance for a given resource
|
|
17
|
-
* @param axiosInst - Axios instance to use (defaults to library's
|
|
17
|
+
* @param axiosInst - Axios instance to use (defaults to library's configured instance)
|
|
18
18
|
* @param resource - API resource path (e.g., '/api/users')
|
|
19
19
|
*/
|
|
20
20
|
export default function apiService(axiosInst: AxiosInstance, resource: string): ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiService.d.ts","sourceRoot":"","sources":["../../src/services/apiService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"apiService.d.ts","sourceRoot":"","sources":["../../src/services/apiService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,MAAM,GACf,UAAU,CAgCZ"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Axios instance for the UI Kit library
|
|
3
3
|
*
|
|
4
|
-
* This
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
* This allows consuming apps to provide their own configured axios instance.
|
|
5
|
+
* If not configured, it falls back to the default axios instance.
|
|
6
|
+
*/
|
|
7
|
+
import { type AxiosInstance } from 'axios';
|
|
8
|
+
/**
|
|
9
|
+
* Configure the default axios instance for the UI Kit library
|
|
10
|
+
* @param instance - Your configured axios instance
|
|
11
|
+
*/
|
|
12
|
+
export declare function configureAxiosInstance(instance: AxiosInstance): void;
|
|
13
|
+
/**
|
|
14
|
+
* Get the axios instance to use (configured instance or default)
|
|
8
15
|
*/
|
|
9
|
-
|
|
10
|
-
export
|
|
16
|
+
export default function getAxiosInstance(): AxiosInstance;
|
|
17
|
+
export declare const defaultAxios: import("axios").AxiosStatic;
|
|
11
18
|
//# sourceMappingURL=axiosInstance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axiosInstance.d.ts","sourceRoot":"","sources":["../../src/services/axiosInstance.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"axiosInstance.d.ts","sourceRoot":"","sources":["../../src/services/axiosInstance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAIlD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,aAAa,QAE7D;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,IAAI,aAAa,CAExD;AAID,eAAO,MAAM,YAAY,6BAAQ,CAAC"}
|