@finema/finework-layer 0.1.10 → 0.1.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/.husky/pre-commit +1 -1
- package/.playground/app/pages/layout-admin.vue +100 -100
- package/.playground/app/pages/submenu1/layout-admin.vue +128 -0
- package/CHANGELOG.md +87 -85
- package/app/app.config.ts +1 -1
- package/app/app.vue +10 -10
- package/app/components/Button/ActionIcon.vue +29 -29
- package/app/components/Button/Back.vue +22 -22
- package/app/components/InfoItemList.vue +202 -202
- package/app/components/Layout/Admin/Sidebar.vue +293 -289
- package/app/components/Layout/Admin/index.vue +207 -207
- package/app/components/Layout/Apps.vue +45 -45
- package/app/components/Layout/User/index.vue +99 -99
- package/app/components/StatusBox.vue +56 -56
- package/app/composables/useAuth.ts +189 -189
- package/app/composables/useRequestOptions.ts +50 -50
- package/app/error.vue +218 -218
- package/bun.lock +2729 -2729
- package/index.d.ts +16 -16
- package/package.json +37 -37
- package/app.config.ts +0 -307
package/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { IStatus } from '#core/types/lib'
|
|
2
|
-
import { ArrayHelper } from '#core/utils/ArrayHelper'
|
|
3
|
-
import { NumberHelper } from '#core/utils/NumberHelper'
|
|
4
|
-
import { StringHelper } from '#core/utils/StringHelper'
|
|
5
|
-
|
|
6
|
-
export {}
|
|
7
|
-
|
|
8
|
-
declare global {
|
|
9
|
-
export type { IStatus }
|
|
10
|
-
|
|
11
|
-
export { NumberHelper }
|
|
12
|
-
|
|
13
|
-
export { StringHelper }
|
|
14
|
-
|
|
15
|
-
export { ArrayHelper }
|
|
16
|
-
}
|
|
1
|
+
import type { IStatus } from '#core/types/lib'
|
|
2
|
+
import { ArrayHelper } from '#core/utils/ArrayHelper'
|
|
3
|
+
import { NumberHelper } from '#core/utils/NumberHelper'
|
|
4
|
+
import { StringHelper } from '#core/utils/StringHelper'
|
|
5
|
+
|
|
6
|
+
export {}
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
export type { IStatus }
|
|
10
|
+
|
|
11
|
+
export { NumberHelper }
|
|
12
|
+
|
|
13
|
+
export { StringHelper }
|
|
14
|
+
|
|
15
|
+
export { ArrayHelper }
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@finema/finework-layer",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"main": "./nuxt.config.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "nuxi dev .playground -o",
|
|
8
|
-
"dev:prepare": "nuxt prepare .playground",
|
|
9
|
-
"build": "nuxt build .playground",
|
|
10
|
-
"generate": "nuxt generate .playground",
|
|
11
|
-
"preview": "nuxt preview .playground",
|
|
12
|
-
"lint": "eslint . --quiet --cache",
|
|
13
|
-
"lint:fix": "eslint --fix . --quiet --cache",
|
|
14
|
-
"release": "release-it --ci",
|
|
15
|
-
"prepare": "husky",
|
|
16
|
-
"postinstall": "nuxt prepare .playground"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@finema/eslint-config": "^2.0.3",
|
|
20
|
-
"@nuxt/eslint": "latest",
|
|
21
|
-
"@nuxt/test-utils": "^3.19.2",
|
|
22
|
-
"@release-it/conventional-changelog": "^10.0.1",
|
|
23
|
-
"@types/node": "^24.7.0",
|
|
24
|
-
"husky": "^9.1.7",
|
|
25
|
-
"lint-staged": "^16.1.2",
|
|
26
|
-
"nuxt": "^4.1.3",
|
|
27
|
-
"release-it": "^19.0.5",
|
|
28
|
-
"typescript": "^5.9.3",
|
|
29
|
-
"vue": "latest"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@finema/core": "^2.43.2"
|
|
33
|
-
},
|
|
34
|
-
"lint-staged": {
|
|
35
|
-
"*": "eslint --fix . --quiet --cache"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@finema/finework-layer",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.11",
|
|
5
|
+
"main": "./nuxt.config.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "nuxi dev .playground -o",
|
|
8
|
+
"dev:prepare": "nuxt prepare .playground",
|
|
9
|
+
"build": "nuxt build .playground",
|
|
10
|
+
"generate": "nuxt generate .playground",
|
|
11
|
+
"preview": "nuxt preview .playground",
|
|
12
|
+
"lint": "eslint . --quiet --cache",
|
|
13
|
+
"lint:fix": "eslint --fix . --quiet --cache",
|
|
14
|
+
"release": "release-it --ci",
|
|
15
|
+
"prepare": "husky",
|
|
16
|
+
"postinstall": "nuxt prepare .playground"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@finema/eslint-config": "^2.0.3",
|
|
20
|
+
"@nuxt/eslint": "latest",
|
|
21
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
22
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
23
|
+
"@types/node": "^24.7.0",
|
|
24
|
+
"husky": "^9.1.7",
|
|
25
|
+
"lint-staged": "^16.1.2",
|
|
26
|
+
"nuxt": "^4.1.3",
|
|
27
|
+
"release-it": "^19.0.5",
|
|
28
|
+
"typescript": "^5.9.3",
|
|
29
|
+
"vue": "latest"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@finema/core": "^2.43.2"
|
|
33
|
+
},
|
|
34
|
+
"lint-staged": {
|
|
35
|
+
"*": "eslint --fix . --quiet --cache"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/app.config.ts
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
export default defineAppConfig({
|
|
2
|
-
core: {
|
|
3
|
-
is_thai_year: false,
|
|
4
|
-
is_thai_month: false,
|
|
5
|
-
date_format: 'dd MMM yyyy',
|
|
6
|
-
month_format: 'MMM yyyy',
|
|
7
|
-
date_time_format: 'dd/MM/yyyy HH:mm น.',
|
|
8
|
-
color: '#335AFF',
|
|
9
|
-
limit_per_page: 15,
|
|
10
|
-
locale: 'en',
|
|
11
|
-
},
|
|
12
|
-
ui: {
|
|
13
|
-
colors: {
|
|
14
|
-
white: 'white',
|
|
15
|
-
},
|
|
16
|
-
dialog: {
|
|
17
|
-
icons: {
|
|
18
|
-
iconInfo: 'material-symbols:info-outline',
|
|
19
|
-
iconConfirm: 'material-symbols:info-outline',
|
|
20
|
-
},
|
|
21
|
-
slots: {
|
|
22
|
-
iconWrapper: 'rounded-full size-[48px] flex justify-center items-center',
|
|
23
|
-
icon: 'size-6',
|
|
24
|
-
base: [
|
|
25
|
-
'rounded-xl flex-col justify-start items-start space-x-0 bg-[url(/dialog-bg.png)] bg-no-repeat bg-top-left bg-size-[220px]',
|
|
26
|
-
'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:right-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:w-full max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-xl',
|
|
27
|
-
],
|
|
28
|
-
overlay: 'bg-black/50 backdrop-blur',
|
|
29
|
-
description: 'whitespace-pre-line',
|
|
30
|
-
wrapper: 'justify-start items-start',
|
|
31
|
-
title: 'mt-4',
|
|
32
|
-
buttonGroup: 'justify-center w-full mt-6',
|
|
33
|
-
cancelButton: 'w-full justify-center',
|
|
34
|
-
confirmButton: 'w-full justify-center',
|
|
35
|
-
},
|
|
36
|
-
variants: {
|
|
37
|
-
color: {
|
|
38
|
-
success: {
|
|
39
|
-
icon: 'text-success',
|
|
40
|
-
iconWrapper: 'bg-success/10',
|
|
41
|
-
},
|
|
42
|
-
info: {
|
|
43
|
-
icon: 'text-info',
|
|
44
|
-
iconWrapper: 'bg-info/10',
|
|
45
|
-
},
|
|
46
|
-
warning: {
|
|
47
|
-
icon: 'text-warning',
|
|
48
|
-
iconWrapper: 'bg-warning/10',
|
|
49
|
-
},
|
|
50
|
-
error: {
|
|
51
|
-
icon: 'text-error',
|
|
52
|
-
iconWrapper: 'bg-error/10',
|
|
53
|
-
},
|
|
54
|
-
loading: {
|
|
55
|
-
icon: 'text-primary size-10',
|
|
56
|
-
base: 'max-w-[400px] bg-none',
|
|
57
|
-
wrapper: 'justify-center',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
confirm: {
|
|
61
|
-
true: {},
|
|
62
|
-
false: {},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
slideover: {
|
|
67
|
-
slots: {
|
|
68
|
-
overlay: 'bg-black/50 backdrop-blur',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
toast: {
|
|
72
|
-
slots: {
|
|
73
|
-
root: 'rounded-xl',
|
|
74
|
-
icon: 'size-8',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
card: {
|
|
78
|
-
slots: {
|
|
79
|
-
root: '!bg-white',
|
|
80
|
-
header: 'text-lg font-bold',
|
|
81
|
-
},
|
|
82
|
-
variants: {
|
|
83
|
-
variant: {
|
|
84
|
-
soft: {
|
|
85
|
-
root: 'bg-elevated/50 divide-y divide-default shadow-[0px_2px_14px_0px_rgba(0,0,0,0.06)]',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
switch: {
|
|
91
|
-
slots: {
|
|
92
|
-
base: 'cursor-pointer',
|
|
93
|
-
label: 'cursor-pointer',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
breadcrumb: {
|
|
97
|
-
variants: {
|
|
98
|
-
active: {
|
|
99
|
-
true: {
|
|
100
|
-
link: 'text-black font-semibold',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
tabs: {
|
|
106
|
-
slots: {
|
|
107
|
-
label: 'whitespace-nowrap',
|
|
108
|
-
list: 'relative flex p-1 group overflow-x-auto overflow-y-hidden scrollbar-hide',
|
|
109
|
-
trigger: 'data-[state=active]:font-bold cursor-pointer whitespace-nowrap shrink-0',
|
|
110
|
-
},
|
|
111
|
-
defaultVariants: {
|
|
112
|
-
size: 'xl',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
modal: {
|
|
116
|
-
slots: {
|
|
117
|
-
overlay: 'bg-black/50 backdrop-blur',
|
|
118
|
-
title: 'text-xl font-bold',
|
|
119
|
-
content: [
|
|
120
|
-
'divide-none overflow-visible flex flex-col',
|
|
121
|
-
'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:right-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:w-full max-sm:max-w-full max-sm:h-auto max-sm:max-h-[90dvh] max-sm:rounded-b-none max-sm:rounded-t-lg',
|
|
122
|
-
],
|
|
123
|
-
body: '!pt-0 overflow-y-auto flex-1 overflow-x-visible',
|
|
124
|
-
footer: 'w-full',
|
|
125
|
-
},
|
|
126
|
-
variants: {
|
|
127
|
-
fullscreen: {
|
|
128
|
-
false: {
|
|
129
|
-
content: 'overflow-visible',
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
pagination: {
|
|
135
|
-
slots: {
|
|
136
|
-
first: 'disabled:hidden',
|
|
137
|
-
prev: 'disabled:hidden',
|
|
138
|
-
next: 'disabled:hidden',
|
|
139
|
-
last: 'disabled:hidden',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
table: {
|
|
143
|
-
slots: {
|
|
144
|
-
root: 'rounded-t-md rounded-b-md bg-white',
|
|
145
|
-
captionContainer: 'hidden',
|
|
146
|
-
paginationInfo: 'text-gray-600',
|
|
147
|
-
paginationContainer: 'items-center flex-col lg:flex-row gap-4',
|
|
148
|
-
thead: 'bg-primary',
|
|
149
|
-
th: 'text-[#222222] bg-white whitespace-nowrap',
|
|
150
|
-
td: 'text-[#222222]',
|
|
151
|
-
},
|
|
152
|
-
variants: {
|
|
153
|
-
pinned: {
|
|
154
|
-
true: {
|
|
155
|
-
th: 'sticky bg-gray-100 data-[pinned=left]:left-0 data-[pinned=right]:right-0 z-[100] ',
|
|
156
|
-
td: 'sticky bg-gray-50 data-[pinned=left]:left-0 data-[pinned=right]:right-0 ',
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
sticky: {
|
|
160
|
-
true: {
|
|
161
|
-
thead: 'sticky top-0 inset-x-0 bg-primary z-[1] backdrop-blur',
|
|
162
|
-
tfoot: 'sticky bottom-0 inset-x-0 bg-white z-[1] backdrop-blur',
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
formField: {
|
|
168
|
-
slots: {
|
|
169
|
-
label: 'font-bold',
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
input: {
|
|
173
|
-
variants: {
|
|
174
|
-
size: {
|
|
175
|
-
xl: {
|
|
176
|
-
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
defaultVariants: {
|
|
181
|
-
size: 'xl',
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
inputNumber: {
|
|
185
|
-
variants: {
|
|
186
|
-
size: {
|
|
187
|
-
xl: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
defaultVariants: {
|
|
191
|
-
size: 'xl',
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
inputTags: {
|
|
195
|
-
variants: {
|
|
196
|
-
size: {
|
|
197
|
-
xl: {
|
|
198
|
-
base: 'py-2.5 min-h-[100px] items-start disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed w-full',
|
|
199
|
-
item: 'bg-white',
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
defaultVariants: {
|
|
204
|
-
size: 'xl',
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
dateTime: {
|
|
208
|
-
slots: {
|
|
209
|
-
clearIcon: 'size-6 mr-3',
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
selectMenu: {
|
|
213
|
-
slots: {
|
|
214
|
-
base: 'cursor-pointer w-full',
|
|
215
|
-
item: 'cursor-pointer max-sm:h-14',
|
|
216
|
-
clearIcon: 'size-6',
|
|
217
|
-
},
|
|
218
|
-
variants: {
|
|
219
|
-
size: {
|
|
220
|
-
xl: {
|
|
221
|
-
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
defaultVariants: {
|
|
226
|
-
size: 'xl',
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
textarea: {
|
|
230
|
-
variants: {
|
|
231
|
-
size: {
|
|
232
|
-
xl: {
|
|
233
|
-
base: 'py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
defaultVariants: {
|
|
238
|
-
size: 'xl',
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
button: {
|
|
242
|
-
slots: {
|
|
243
|
-
base: ['rounded-lg cursor-pointer'],
|
|
244
|
-
},
|
|
245
|
-
variants: {
|
|
246
|
-
size: {
|
|
247
|
-
xl: {
|
|
248
|
-
base: 'py-2.5 font-semibold',
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
compoundVariants: [
|
|
253
|
-
{
|
|
254
|
-
color: 'white',
|
|
255
|
-
variant: 'solid',
|
|
256
|
-
class: 'text-black',
|
|
257
|
-
},
|
|
258
|
-
],
|
|
259
|
-
defaultVariants: {
|
|
260
|
-
size: 'xl',
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
stepper: {
|
|
264
|
-
variants: {
|
|
265
|
-
size: {
|
|
266
|
-
xs: {
|
|
267
|
-
trigger: 'size-8',
|
|
268
|
-
icon: 'size-6',
|
|
269
|
-
title: 'text-base font-bold',
|
|
270
|
-
description: 'text-sm',
|
|
271
|
-
wrapper: 'mt-1.5',
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
defaultVariants: {
|
|
276
|
-
size: 'xs',
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
dropdownMenu: {
|
|
280
|
-
slots: {
|
|
281
|
-
content: 'cursor-pointer w-full',
|
|
282
|
-
item: 'cursor-pointer max-sm:h-14',
|
|
283
|
-
clearIcon: 'size-6',
|
|
284
|
-
},
|
|
285
|
-
variants: {
|
|
286
|
-
size: {
|
|
287
|
-
lg: {
|
|
288
|
-
content: 'text-sm py-2.5 disabled:bg-[#F5F5F5] disabled:text-[#737373] disabled:cursor-not-allowed',
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
defaultVariants: {
|
|
293
|
-
size: 'lg',
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
-
})
|
|
299
|
-
|
|
300
|
-
declare module '@nuxt/schema' {
|
|
301
|
-
interface AppConfigInput {
|
|
302
|
-
myLayer?: {
|
|
303
|
-
/** Project name */
|
|
304
|
-
name?: string
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|