@finema/core 1.4.220 → 2.1.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.
Files changed (307) hide show
  1. package/README.md +79 -60
  2. package/dist/module.d.mts +4 -24
  3. package/dist/module.json +4 -3
  4. package/dist/module.mjs +75 -213
  5. package/dist/runtime/components/App.vue +27 -0
  6. package/dist/runtime/components/App.vue.d.ts +12 -0
  7. package/dist/runtime/components/DevToolsWindow/index.vue +312 -0
  8. package/dist/runtime/components/DevToolsWindow/index.vue.d.ts +2 -0
  9. package/dist/runtime/components/Dialog/index.vue +77 -110
  10. package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
  11. package/dist/runtime/components/Empty.vue +33 -18
  12. package/dist/runtime/components/Empty.vue.d.ts +12 -0
  13. package/dist/runtime/components/FlexDeck/Base.vue +154 -159
  14. package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
  15. package/dist/runtime/components/FlexDeck/index.vue +67 -68
  16. package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
  17. package/dist/runtime/components/Form/FieldWrapper.vue +35 -23
  18. package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
  19. package/dist/runtime/components/Form/Fields.vue +92 -230
  20. package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
  21. package/dist/runtime/components/Form/InputCheckbox/index.vue +53 -28
  22. package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +3 -0
  23. package/dist/runtime/components/Form/InputCheckbox/types.d.ts +5 -1
  24. package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -1
  25. package/dist/runtime/components/Form/InputDateTime/index.vue +97 -68
  26. package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
  27. package/dist/runtime/components/Form/InputNumber/index.vue +61 -27
  28. package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +5 -0
  29. package/dist/runtime/components/Form/InputNumber/types.d.ts +10 -5
  30. package/dist/runtime/components/Form/InputSelect/index.vue +95 -55
  31. package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +5 -0
  32. package/dist/runtime/components/Form/InputSelect/types.d.ts +14 -8
  33. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +108 -54
  34. package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +3 -0
  35. package/dist/runtime/components/Form/InputSelectMultiple/types.d.ts +9 -8
  36. package/dist/runtime/components/Form/InputText/index.vue +135 -68
  37. package/dist/runtime/components/Form/InputText/index.vue.d.ts +5 -0
  38. package/dist/runtime/components/Form/InputText/types.d.ts +4 -3
  39. package/dist/runtime/components/Form/InputTextarea/index.vue +57 -25
  40. package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +3 -0
  41. package/dist/runtime/components/Form/InputTextarea/types.d.ts +7 -2
  42. package/dist/runtime/components/Form/InputToggle/index.vue +51 -27
  43. package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +3 -0
  44. package/dist/runtime/components/Form/InputToggle/types.d.ts +5 -1
  45. package/dist/runtime/components/Form/index.vue +5 -6
  46. package/dist/runtime/components/Form/index.vue.d.ts +12 -0
  47. package/dist/runtime/components/Form/types.d.ts +13 -27
  48. package/dist/runtime/components/Image.vue +51 -36
  49. package/dist/runtime/components/Image.vue.d.ts +13 -0
  50. package/dist/runtime/components/Loader.vue +29 -27
  51. package/dist/runtime/components/Loader.vue.d.ts +22 -0
  52. package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +44 -41
  53. package/dist/runtime/components/Log/LogItem.vue.d.ts +6 -0
  54. package/dist/runtime/components/Log/index.vue +28 -0
  55. package/dist/runtime/components/Log/index.vue.d.ts +7 -0
  56. package/dist/runtime/components/Table/Base.vue +166 -161
  57. package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
  58. package/dist/runtime/components/Table/ColumnDate.vue +14 -16
  59. package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
  60. package/dist/runtime/components/Table/ColumnDateTime.vue +16 -18
  61. package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
  62. package/dist/runtime/components/Table/ColumnImage.vue +16 -15
  63. package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
  64. package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
  65. package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
  66. package/dist/runtime/components/Table/ColumnText.vue +24 -29
  67. package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
  68. package/dist/runtime/components/Table/Simple.vue +69 -70
  69. package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
  70. package/dist/runtime/components/Table/index.vue +178 -65
  71. package/dist/runtime/components/Table/index.vue.d.ts +25 -0
  72. package/dist/runtime/components/Table/types.d.ts +14 -18
  73. package/dist/runtime/components/Table/{types.mjs → types.js} +1 -0
  74. package/dist/runtime/components/TeleportSafe.vue +42 -40
  75. package/dist/runtime/components/TeleportSafe.vue.d.ts +16 -0
  76. package/dist/runtime/composables/loaderList.d.ts +2 -2
  77. package/dist/runtime/composables/loaderList.js +51 -0
  78. package/dist/runtime/composables/loaderObject.d.ts +1 -1
  79. package/dist/runtime/composables/loaderObject.js +50 -0
  80. package/dist/runtime/composables/loaderPage.d.ts +10 -11
  81. package/dist/runtime/composables/loaderPage.js +243 -0
  82. package/dist/runtime/composables/useApp.d.ts +4 -9
  83. package/dist/runtime/composables/{useApp.mjs → useApp.js} +0 -12
  84. package/dist/runtime/composables/useConfig.d.ts +3 -3
  85. package/dist/runtime/composables/useConfig.js +12 -0
  86. package/dist/runtime/composables/useDialog.d.ts +1 -7
  87. package/dist/runtime/composables/useDialog.js +53 -0
  88. package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
  89. package/dist/runtime/composables/{useFlexDeck.mjs → useFlexDeck.js} +5 -5
  90. package/dist/runtime/composables/useForm.d.ts +5 -2
  91. package/dist/runtime/composables/useForm.js +37 -0
  92. package/dist/runtime/composables/useNotification.d.ts +6 -22
  93. package/dist/runtime/composables/{useNotification.mjs → useNotification.js} +5 -21
  94. package/dist/runtime/composables/useTable.d.ts +12 -11
  95. package/dist/runtime/composables/{useTable.mjs → useTable.js} +3 -8
  96. package/dist/runtime/composables/useUpload.d.ts +2 -2
  97. package/dist/runtime/composables/{useUpload.mjs → useUpload.js} +1 -1
  98. package/dist/runtime/helpers/apiBaseHelper.d.ts +29 -0
  99. package/dist/runtime/helpers/apiBaseHelper.js +63 -0
  100. package/dist/runtime/helpers/apiListHelper.d.ts +4 -6
  101. package/dist/runtime/helpers/apiListHelper.js +50 -0
  102. package/dist/runtime/helpers/apiObjectHelper.d.ts +19 -20
  103. package/dist/runtime/helpers/apiObjectHelper.js +51 -0
  104. package/dist/runtime/helpers/apiPageHelper.d.ts +44 -44
  105. package/dist/runtime/helpers/apiPageHelper.js +287 -0
  106. package/dist/runtime/helpers/componentHelper.d.ts +11 -12
  107. package/dist/runtime/helpers/{componentHelper.mjs → componentHelper.js} +2 -7
  108. package/dist/runtime/i18n/valibot.d.ts +69 -0
  109. package/dist/runtime/i18n/valibot.js +72 -0
  110. package/dist/runtime/plugin.d.ts +1 -1
  111. package/dist/runtime/plugin.js +12 -0
  112. package/dist/runtime/server/tsconfig.json +3 -0
  113. package/dist/runtime/theme/button.d.ts +5 -0
  114. package/dist/runtime/theme/button.js +1 -0
  115. package/dist/runtime/theme/dialog.d.ts +31 -0
  116. package/dist/runtime/theme/dialog.js +21 -0
  117. package/dist/runtime/theme/empty.d.ts +7 -0
  118. package/dist/runtime/theme/empty.js +7 -0
  119. package/dist/runtime/theme/form.d.ts +18 -0
  120. package/dist/runtime/theme/form.js +16 -0
  121. package/dist/runtime/theme/index.d.ts +10 -0
  122. package/dist/runtime/theme/index.js +10 -0
  123. package/dist/runtime/theme/input.d.ts +8 -0
  124. package/dist/runtime/theme/input.js +4 -0
  125. package/dist/runtime/theme/inputNumber.d.ts +8 -0
  126. package/dist/runtime/theme/inputNumber.js +4 -0
  127. package/dist/runtime/theme/loader.d.ts +28 -0
  128. package/dist/runtime/theme/loader.js +18 -0
  129. package/dist/runtime/theme/selectMenu.d.ts +17 -0
  130. package/dist/runtime/theme/selectMenu.js +18 -0
  131. package/dist/runtime/theme/table.d.ts +10 -0
  132. package/dist/runtime/theme/table.js +10 -0
  133. package/dist/runtime/theme/textarea.d.ts +5 -0
  134. package/dist/runtime/theme/textarea.js +1 -0
  135. package/dist/runtime/types/lib.d.ts +1 -1
  136. package/dist/runtime/utils/ArrayHelper.d.ts +1 -1
  137. package/dist/runtime/utils/{ArrayHelper.mjs → ArrayHelper.js} +1 -1
  138. package/dist/runtime/utils/ObjectHelper.d.ts +3 -3
  139. package/dist/runtime/utils/{ObjectHelper.mjs → ObjectHelper.js} +3 -3
  140. package/dist/runtime/utils/ParamHelper.d.ts +1 -1
  141. package/dist/runtime/utils/{ParamHelper.mjs → ParamHelper.js} +1 -1
  142. package/dist/types.d.mts +2 -15
  143. package/package.json +91 -100
  144. package/dist/module.cjs +0 -5
  145. package/dist/module.d.ts +0 -50
  146. package/dist/runtime/components/Alert.vue +0 -48
  147. package/dist/runtime/components/Avatar.vue +0 -27
  148. package/dist/runtime/components/Badge.vue +0 -11
  149. package/dist/runtime/components/Breadcrumb.vue +0 -44
  150. package/dist/runtime/components/Button/Group.vue +0 -37
  151. package/dist/runtime/components/Button/index.vue +0 -75
  152. package/dist/runtime/components/Card.vue +0 -38
  153. package/dist/runtime/components/Core.vue +0 -45
  154. package/dist/runtime/components/Dropdown/index.vue +0 -70
  155. package/dist/runtime/components/Dropdown/types.d.ts +0 -2
  156. package/dist/runtime/components/Dropdown/types.mjs +0 -17
  157. package/dist/runtime/components/Form/InputDateTimeRange/date_range_time_field.types.d.ts +0 -17
  158. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +0 -91
  159. package/dist/runtime/components/Form/InputRadio/index.vue +0 -27
  160. package/dist/runtime/components/Form/InputRadio/types.d.ts +0 -8
  161. package/dist/runtime/components/Form/InputStatic/index.vue +0 -16
  162. package/dist/runtime/components/Form/InputStatic/types.d.ts +0 -4
  163. package/dist/runtime/components/Form/InputTags/index.vue +0 -141
  164. package/dist/runtime/components/Form/InputTags/types.d.ts +0 -11
  165. package/dist/runtime/components/Form/InputTextarea/types.mjs +0 -0
  166. package/dist/runtime/components/Form/InputToggle/types.mjs +0 -0
  167. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +0 -206
  168. package/dist/runtime/components/Form/InputUploadDropzone/types.d.ts +0 -11
  169. package/dist/runtime/components/Form/InputUploadDropzone/types.mjs +0 -0
  170. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +0 -362
  171. package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.d.ts +0 -23
  172. package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.mjs +0 -0
  173. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +0 -241
  174. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +0 -110
  175. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +0 -171
  176. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.d.ts +0 -23
  177. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.mjs +0 -0
  178. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +0 -161
  179. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +0 -64
  180. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +0 -178
  181. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.d.ts +0 -21
  182. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.mjs +0 -0
  183. package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +0 -95
  184. package/dist/runtime/components/Form/InputUploadFileClassic/types.d.ts +0 -13
  185. package/dist/runtime/components/Form/InputUploadFileClassic/types.mjs +0 -0
  186. package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +0 -151
  187. package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.d.ts +0 -18
  188. package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.mjs +0 -0
  189. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +0 -219
  190. package/dist/runtime/components/Form/InputUploadImageAuto/types.d.ts +0 -20
  191. package/dist/runtime/components/Form/InputUploadImageAuto/types.mjs +0 -0
  192. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -55
  193. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +0 -230
  194. package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +0 -19
  195. package/dist/runtime/components/Form/InputWYSIWYG/types.mjs +0 -0
  196. package/dist/runtime/components/Icon.vue +0 -23
  197. package/dist/runtime/components/Log.vue +0 -22
  198. package/dist/runtime/components/Modal/index.vue +0 -146
  199. package/dist/runtime/components/OTPInput.vue +0 -127
  200. package/dist/runtime/components/QRCode.vue +0 -22
  201. package/dist/runtime/components/SimplePagination.vue +0 -96
  202. package/dist/runtime/components/Slideover/index.vue +0 -110
  203. package/dist/runtime/components/Tabs/index.vue +0 -64
  204. package/dist/runtime/composables/loaderList.mjs +0 -52
  205. package/dist/runtime/composables/loaderObject.mjs +0 -52
  206. package/dist/runtime/composables/loaderPage.mjs +0 -229
  207. package/dist/runtime/composables/useConfig.mjs +0 -9
  208. package/dist/runtime/composables/useDialog.mjs +0 -81
  209. package/dist/runtime/composables/useForm.mjs +0 -18
  210. package/dist/runtime/core.config.d.ts +0 -14
  211. package/dist/runtime/core.config.mjs +0 -14
  212. package/dist/runtime/helpers/apiListHelper.mjs +0 -44
  213. package/dist/runtime/helpers/apiObjectHelper.mjs +0 -46
  214. package/dist/runtime/helpers/apiPageHelper.mjs +0 -270
  215. package/dist/runtime/plugin.mjs +0 -149
  216. package/dist/runtime/types/common.mjs +0 -0
  217. package/dist/runtime/types/config.d.ts +0 -1
  218. package/dist/runtime/types/config.mjs +0 -0
  219. package/dist/runtime/types/lib.mjs +0 -0
  220. package/dist/runtime/ui.config/alert.d.ts +0 -3
  221. package/dist/runtime/ui.config/alert.mjs +0 -6
  222. package/dist/runtime/ui.config/badge.d.ts +0 -3
  223. package/dist/runtime/ui.config/badge.mjs +0 -1
  224. package/dist/runtime/ui.config/breadcrumb.d.ts +0 -1
  225. package/dist/runtime/ui.config/breadcrumb.mjs +0 -7
  226. package/dist/runtime/ui.config/button.d.ts +0 -3
  227. package/dist/runtime/ui.config/button.mjs +0 -8
  228. package/dist/runtime/ui.config/buttonGroup.d.ts +0 -3
  229. package/dist/runtime/ui.config/buttonGroup.mjs +0 -1
  230. package/dist/runtime/ui.config/card.d.ts +0 -1
  231. package/dist/runtime/ui.config/card.mjs +0 -2
  232. package/dist/runtime/ui.config/checkbox.d.ts +0 -3
  233. package/dist/runtime/ui.config/checkbox.mjs +0 -1
  234. package/dist/runtime/ui.config/formGroup.d.ts +0 -3
  235. package/dist/runtime/ui.config/formGroup.mjs +0 -5
  236. package/dist/runtime/ui.config/icon.d.ts +0 -3
  237. package/dist/runtime/ui.config/icon.mjs +0 -3
  238. package/dist/runtime/ui.config/index.d.ts +0 -16
  239. package/dist/runtime/ui.config/index.mjs +0 -16
  240. package/dist/runtime/ui.config/input.d.ts +0 -3
  241. package/dist/runtime/ui.config/input.mjs +0 -5
  242. package/dist/runtime/ui.config/modal.d.ts +0 -1
  243. package/dist/runtime/ui.config/modal.mjs +0 -34
  244. package/dist/runtime/ui.config/notification.d.ts +0 -11
  245. package/dist/runtime/ui.config/notification.mjs +0 -13
  246. package/dist/runtime/ui.config/notifications.d.ts +0 -3
  247. package/dist/runtime/ui.config/notifications.mjs +0 -3
  248. package/dist/runtime/ui.config/pagination.d.ts +0 -3
  249. package/dist/runtime/ui.config/pagination.mjs +0 -37
  250. package/dist/runtime/ui.config/select.d.ts +0 -3
  251. package/dist/runtime/ui.config/select.mjs +0 -5
  252. package/dist/runtime/ui.config/selectMenu.d.ts +0 -3
  253. package/dist/runtime/ui.config/selectMenu.mjs +0 -5
  254. package/dist/runtime/ui.config/slideover.d.ts +0 -1
  255. package/dist/runtime/ui.config/slideover.mjs +0 -16
  256. package/dist/runtime/ui.config/table.d.ts +0 -3
  257. package/dist/runtime/ui.config/table.mjs +0 -47
  258. package/dist/runtime/ui.config/tabs.d.ts +0 -3
  259. package/dist/runtime/ui.config/tabs.mjs +0 -4
  260. package/dist/runtime/ui.config/tags.d.ts +0 -25
  261. package/dist/runtime/ui.config/tags.mjs +0 -25
  262. package/dist/runtime/ui.config/textarea.d.ts +0 -3
  263. package/dist/runtime/ui.config/textarea.mjs +0 -5
  264. package/dist/runtime/ui.config/toggle.d.ts +0 -3
  265. package/dist/runtime/ui.config/toggle.mjs +0 -5
  266. package/dist/runtime/ui.config/uploadDropzoneImage.d.ts +0 -83
  267. package/dist/runtime/ui.config/uploadDropzoneImage.mjs +0 -26
  268. package/dist/runtime/ui.config/uploadFileDropzone.d.ts +0 -61
  269. package/dist/runtime/ui.config/uploadFileDropzone.mjs +0 -61
  270. package/dist/runtime/ui.config/uploadFileInputClassicAuto.d.ts +0 -8
  271. package/dist/runtime/ui.config/uploadFileInputClassicAuto.mjs +0 -8
  272. package/dist/runtime/ui.config/uploadImage.d.ts +0 -34
  273. package/dist/runtime/ui.config/uploadImage.mjs +0 -36
  274. package/dist/runtime/ui.css +0 -1
  275. package/dist/runtime/utils/ArrayHelper.spec.d.ts +0 -1
  276. package/dist/runtime/utils/ArrayHelper.spec.mjs +0 -112
  277. package/dist/runtime/utils/FileHelper.spec.d.ts +0 -1
  278. package/dist/runtime/utils/FileHelper.spec.mjs +0 -14
  279. package/dist/runtime/utils/ObjectHelper.spec.d.ts +0 -1
  280. package/dist/runtime/utils/ObjectHelper.spec.mjs +0 -52
  281. package/dist/runtime/utils/ParamHelper.spec.d.ts +0 -1
  282. package/dist/runtime/utils/ParamHelper.spec.mjs +0 -78
  283. package/dist/runtime/utils/StringHelper.spec.d.ts +0 -1
  284. package/dist/runtime/utils/StringHelper.spec.mjs +0 -76
  285. package/dist/runtime/utils/TimeHelper.spec.d.ts +0 -1
  286. package/dist/runtime/utils/TimeHelper.spec.mjs +0 -79
  287. package/dist/runtime/utils/TimeHelper.thai.spec.d.ts +0 -1
  288. package/dist/runtime/utils/TimeHelper.thai.spec.mjs +0 -31
  289. package/dist/types.d.ts +0 -16
  290. package/dist/runtime/components/FlexDeck/{types.mjs → types.js} +0 -0
  291. package/dist/runtime/components/Form/InputCheckbox/{types.mjs → types.js} +0 -0
  292. package/dist/runtime/components/Form/InputDateTime/{date_time_field.types.mjs → date_time_field.types.js} +0 -0
  293. package/dist/runtime/components/Form/{InputDateTimeRange/date_range_time_field.types.mjs → InputNumber/types.js} +0 -0
  294. package/dist/runtime/components/Form/{InputNumber/types.mjs → InputSelect/types.js} +0 -0
  295. package/dist/runtime/components/Form/{InputRadio/types.mjs → InputSelectMultiple/types.js} +0 -0
  296. package/dist/runtime/components/Form/{InputSelect/types.mjs → InputText/types.js} +0 -0
  297. package/dist/runtime/components/Form/{InputSelectMultiple/types.mjs → InputTextarea/types.js} +0 -0
  298. package/dist/runtime/components/Form/{InputStatic/types.mjs → InputToggle/types.js} +0 -0
  299. package/dist/runtime/components/Form/{types.mjs → types.js} +0 -0
  300. package/dist/runtime/composables/{useWatch.mjs → useWatch.js} +0 -0
  301. package/dist/runtime/lib/{Requester.mjs → Requester.js} +0 -0
  302. package/dist/runtime/{components/Form/InputTags/types.mjs → types/common.js} +0 -0
  303. package/dist/runtime/{components/Form/InputText/types.mjs → types/lib.js} +0 -0
  304. package/dist/runtime/utils/{FileHelper.mjs → FileHelper.js} +0 -0
  305. package/dist/runtime/utils/{StringHelper.mjs → StringHelper.js} +0 -0
  306. package/dist/runtime/utils/{TimeHelper.mjs → TimeHelper.js} +1 -1
  307. /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
@@ -1,48 +0,0 @@
1
- <template>
2
- <UAlert v-bind="$props">
3
- <template #title><slot name="title" :title="title" /></template>
4
- <template #description><slot name="description" :description="description" /></template>
5
- </UAlert>
6
- </template>
7
- <script lang="ts" setup>
8
- import { type PropType } from 'vue'
9
- import { type alert } from '#ui/ui.config'
10
- import type { AlertColor, AlertVariant, Avatar, Button, Strategy } from '#ui/types'
11
-
12
- defineProps({
13
- title: {
14
- type: String,
15
- required: true,
16
- },
17
- description: {
18
- type: String,
19
- default: null,
20
- },
21
- icon: {
22
- type: String,
23
- },
24
- avatar: {
25
- type: Object as PropType<Avatar>,
26
- default: null,
27
- },
28
- closeButton: {
29
- type: Object as PropType<Button>,
30
- },
31
- actions: {
32
- // eslint-disable-next-line @typescript-eslint/ban-types
33
- type: Array as PropType<Array<Button & { click?: Function }>>,
34
- },
35
- color: {
36
- type: String as PropType<AlertColor>,
37
- },
38
- variant: {
39
- type: String as PropType<AlertVariant>,
40
- },
41
- class: {
42
- type: [String, Object, Array] as PropType<any>,
43
- },
44
- ui: {
45
- type: Object as PropType<Partial<typeof alert> & { strategy?: Strategy }>,
46
- },
47
- })
48
- </script>
@@ -1,27 +0,0 @@
1
- <template>
2
- <UAvatar v-bind="$attrs" :src="src" :alt="alt" :size="size" />
3
- </template>
4
-
5
- <script lang="ts" setup>
6
- import type { AvatarSize } from '#ui/types'
7
- import type { PropType } from 'vue'
8
-
9
- defineOptions({
10
- inheritAttrs: true,
11
- })
12
-
13
- defineProps({
14
- src: {
15
- type: String,
16
- required: true,
17
- },
18
- alt: {
19
- type: String,
20
- required: true,
21
- },
22
- size: {
23
- type: String as PropType<AvatarSize>,
24
- default: 'sm',
25
- },
26
- })
27
- </script>
@@ -1,11 +0,0 @@
1
- <template>
2
- <UBadge v-bind="$props">
3
- <slot />
4
- </UBadge>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import type { Badge } from '#ui/types/badge'
9
-
10
- defineProps<Badge>()
11
- </script>
@@ -1,44 +0,0 @@
1
- <template>
2
- <UBreadcrumb v-bind="attrs" :class="$props.class" :links="links" :divider="divider" :ui="ui">
3
- <template #default="{ link, isActive, index }">
4
- <slot name="default" :link="link" :is-active="isActive" :index="index" />
5
- </template>
6
-
7
- <template #icon="{ link, index, isActive }">
8
- <slot name="icon" :link="link" :is-active="isActive" :index="index" />
9
- </template>
10
-
11
- <template #divider>
12
- <slot name="divider" />
13
- </template>
14
- </UBreadcrumb>
15
- </template>
16
-
17
- <script setup lang="ts">
18
- import { useUiConfig, type PropType, useUI, toRef } from '#imports'
19
- import { breadcrumb } from '#core/ui.config'
20
- import type { BreadcrumbLink, Strategy } from '#ui/types'
21
-
22
- const config = useUiConfig<typeof breadcrumb>(breadcrumb, 'breadcrumb')
23
-
24
- const props = defineProps({
25
- links: {
26
- type: Array as PropType<BreadcrumbLink[]>,
27
- default: () => [],
28
- },
29
- divider: {
30
- type: String,
31
- default: () => breadcrumb.default.divider,
32
- },
33
- class: {
34
- type: [String, Object, Array] as PropType<any>,
35
- default: () => '',
36
- },
37
- ui: {
38
- type: Object as PropType<Partial<typeof config> & { strategy?: Strategy }>,
39
- default: () => ({}),
40
- },
41
- })
42
-
43
- const { ui, attrs } = useUI('breadcrumb', toRef(props, 'ui'), config, toRef(props, 'class'))
44
- </script>
@@ -1,37 +0,0 @@
1
- <template>
2
- <UButtonGroup v-bind="$props">
3
- <slot />
4
- </UButtonGroup>
5
- </template>
6
-
7
- <script lang="ts" setup>
8
- import type { PropType } from 'vue'
9
- import type { ButtonSize } from '#ui/types/button'
10
- import { button, type buttonGroup } from '#ui/ui.config'
11
- import type { Strategy } from '#ui/types'
12
-
13
- defineProps({
14
- size: {
15
- type: String as PropType<ButtonSize>,
16
- default: () => button.default.size,
17
- validator(value: string) {
18
- return Object.keys(button.size).includes(value)
19
- },
20
- },
21
- orientation: {
22
- type: String as PropType<'horizontal' | 'vertical'>,
23
- default: 'horizontal',
24
- validator(value: string) {
25
- return ['horizontal', 'vertical'].includes(value)
26
- },
27
- },
28
- class: {
29
- type: [String, Object, Array] as PropType<any>,
30
- default: undefined,
31
- },
32
- ui: {
33
- type: Object as PropType<Partial<typeof buttonGroup> & { strategy?: Strategy }>,
34
- default: undefined,
35
- },
36
- })
37
- </script>
@@ -1,75 +0,0 @@
1
- <template>
2
- <UButton v-bind="$props">
3
- <template #leading><slot name="leading" :disabled="disabled" :loading="loading" /></template>
4
- <slot />
5
- <template #trailing><slot name="trailing" :disabled="disabled" :loading="loading" /></template>
6
- </UButton>
7
- </template>
8
-
9
- <script lang="ts" setup>
10
- import { type button } from '#ui/ui.config'
11
- import { UButton } from '#components'
12
- import type { ButtonColor, ButtonSize, ButtonVariant } from '#ui/types/button'
13
- import type { PropType } from 'vue'
14
-
15
- defineProps({
16
- label: {
17
- type: String,
18
- },
19
- type: {
20
- type: String as PropType<'button' | 'submit' | 'reset'>,
21
- },
22
- block: {
23
- type: Boolean,
24
- },
25
- loading: {
26
- type: Boolean,
27
- },
28
- disabled: {
29
- type: Boolean,
30
- },
31
- padded: {
32
- type: Boolean,
33
- default: true,
34
- },
35
- size: {
36
- type: String as PropType<ButtonSize>,
37
- },
38
- color: {
39
- type: String as PropType<ButtonColor>,
40
- },
41
- variant: {
42
- type: String as PropType<ButtonVariant>,
43
- },
44
- loadingIcon: {
45
- type: String,
46
- },
47
- icon: {
48
- type: String,
49
- },
50
- leadingIcon: {
51
- type: String,
52
- },
53
- trailingIcon: {
54
- type: String,
55
- },
56
- trailing: {
57
- type: Boolean,
58
- },
59
- leading: {
60
- type: Boolean,
61
- },
62
- square: {
63
- type: Boolean,
64
- },
65
- truncate: {
66
- type: Boolean,
67
- },
68
- class: {
69
- type: [String, Array, Object] as PropType<any>,
70
- },
71
- ui: {
72
- type: Object as PropType<Partial<typeof button & { strategy?: Strategy }>>,
73
- },
74
- })
75
- </script>
@@ -1,38 +0,0 @@
1
- <template>
2
- <UCard v-bind="attrs" :class="$props.class" :as="as" :ui="ui">
3
- <template #header>
4
- <slot name="header" />
5
- </template>
6
-
7
- <slot />
8
-
9
- <template #footer>
10
- <slot name="footer" />
11
- </template>
12
- </UCard>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- import { useUiConfig, type PropType, useUI, toRef } from '#imports'
17
- import { card } from '#core/ui.config'
18
- import type { Strategy } from '#ui/types'
19
-
20
- const config = useUiConfig<typeof card>(card, 'card')
21
-
22
- const props = defineProps({
23
- as: {
24
- type: String,
25
- default: 'div',
26
- },
27
- class: {
28
- type: [String, Object, Array] as PropType<any>,
29
- default: () => '',
30
- },
31
- ui: {
32
- type: Object as PropType<Partial<typeof config> & { strategy?: Strategy }>,
33
- default: () => ({}),
34
- },
35
- })
36
-
37
- const { ui, attrs } = useUI('card', toRef(props, 'ui'), config, toRef(props, 'class'))
38
- </script>
@@ -1,45 +0,0 @@
1
- <template>
2
- <NuxtLoadingIndicator :color="color" />
3
- <Dialog />
4
- <UNotifications>
5
- <template #title="{ title }">
6
- <span v-html="title" />
7
- </template>
8
-
9
- <template #description="{ description }">
10
- <span v-html="description" />
11
- </template>
12
- </UNotifications>
13
- <div v-if="isDevEnv" class="fixed bottom-4 right-4 z-50">
14
- <div class="flex flex-col items-end justify-end">
15
- <div
16
- v-show="isShowDevTools"
17
- class="max-w-screen mb-4 h-[750px] max-h-screen w-[600px] overflow-auto rounded-lg border bg-white opacity-80 shadow-2xl"
18
- >
19
- <p class="p-3 text-lg font-semibold">Debug Tools</p>
20
- <hr />
21
- <div id="dev-logs" class="flex flex-col space-y-3 p-3" />
22
- </div>
23
- <Button
24
- :icon="isShowDevTools ? 'heroicons:x-mark' : 'heroicons:information-circle'"
25
- color="info"
26
- square
27
- :ui="{ rounded: 'rounded-full' }"
28
- @click="isShowDevTools = !isShowDevTools"
29
- />
30
- </div>
31
- </div>
32
- </template>
33
- <script lang="ts" setup>
34
- import { ref } from 'vue'
35
-
36
- defineProps({
37
- color: {
38
- type: String,
39
- default: '#3675FB',
40
- },
41
- })
42
-
43
- const isShowDevTools = ref(false)
44
- const isDevEnv = process.env.NODE_ENV === 'development'
45
- </script>
@@ -1,70 +0,0 @@
1
- <template>
2
- <UDropdown
3
- v-bind="attrs"
4
- :class="$props.class"
5
- :items="items"
6
- :mode="mode"
7
- :open-delay="openDelay"
8
- :close-delay="closeDelay"
9
- :popper="{ placement: placement, arrow: arrow, offsetDistance: offset }"
10
- :ui="ui"
11
- >
12
- <slot />
13
-
14
- <template v-for="(_, slot) of $slots" #[slot]="slotProps">
15
- <slot :name="slot" v-bind="slotProps || {}" />
16
- </template>
17
- </UDropdown>
18
- </template>
19
-
20
- <script lang="ts" setup>
21
- import { type PropType, useUiConfig, useUI, toRef } from '#imports'
22
- import { dropdown } from '#ui/ui.config'
23
- import { DropdownPlacementArray, type DropdownPlacement } from './types'
24
- import type { DropdownItem, Strategy } from '#ui/types'
25
-
26
- const config = useUiConfig<typeof dropdown>(dropdown, 'dropdown')
27
-
28
- const props = defineProps({
29
- items: {
30
- type: Array as PropType<DropdownItem[][]>,
31
- default: () => [],
32
- },
33
- mode: {
34
- type: String as PropType<'click' | 'hover'>,
35
- default: 'click',
36
- validator: (value: string) => ['click', 'hover'].includes(value),
37
- },
38
- arrow: {
39
- type: Boolean,
40
- default: false,
41
- },
42
- offset: {
43
- type: Number,
44
- default: 10,
45
- },
46
- openDelay: {
47
- type: Number,
48
- default: 0,
49
- },
50
- closeDelay: {
51
- type: Number,
52
- default: 0,
53
- },
54
- placement: {
55
- type: String as PropType<DropdownPlacement>,
56
- default: 'bottom-start',
57
- validator: (value: DropdownPlacement) => DropdownPlacementArray.includes(value),
58
- },
59
- class: {
60
- type: [String, Array, Object] as PropType<any>,
61
- default: () => '',
62
- },
63
- ui: {
64
- type: Object as PropType<Partial<typeof config & { strategy?: Strategy }>>,
65
- default: () => ({}),
66
- },
67
- })
68
-
69
- const { ui, attrs } = useUI('dropdown', toRef(props, 'ui'), config, toRef(props, 'class'))
70
- </script>
@@ -1,2 +0,0 @@
1
- export type DropdownPlacement = 'auto' | 'auto-end' | 'auto-start' | 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start';
2
- export declare const DropdownPlacementArray: DropdownPlacement[];
@@ -1,17 +0,0 @@
1
- export const DropdownPlacementArray = [
2
- "auto",
3
- "auto-end",
4
- "auto-start",
5
- "bottom",
6
- "bottom-end",
7
- "bottom-start",
8
- "left",
9
- "left-end",
10
- "left-start",
11
- "right",
12
- "right-end",
13
- "right-start",
14
- "top",
15
- "top-end",
16
- "top-start"
17
- ];
@@ -1,17 +0,0 @@
1
- import { type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
2
- import type { IDateTimeFieldProps } from '../InputDateTime/date_time_field.types';
3
- export interface ITimeOption {
4
- hours?: number | string;
5
- minutes?: number | string;
6
- seconds?: number | string;
7
- }
8
- export interface IDateTimeRangeResponse {
9
- start: Date | string;
10
- end: Date | string;
11
- }
12
- export interface IDateTimeRangeFieldProps extends IDateTimeFieldProps {
13
- isDisabledMultiCalendar?: boolean;
14
- }
15
- export type IDateTimeRangeField = IFormFieldBase<INPUT_TYPES.DATE_RANGE | INPUT_TYPES.DATE_TIME_RANGE, IDateTimeRangeFieldProps, {
16
- change: (value: IDateTimeRangeResponse) => void;
17
- }>;
@@ -1,91 +0,0 @@
1
- <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Datepicker
4
- ref="datepicker"
5
- v-model="innerValueRef"
6
- :disabled="wrapperProps.isDisabled"
7
- cancel-text="ยกเลิก"
8
- select-text="เลือก"
9
- locale="th"
10
- :format="format"
11
- :enable-time-picker="!disabledTime"
12
- :placeholder="wrapperProps.placeholder"
13
- :min-date="minDate"
14
- :max-date="maxDate"
15
- :min-time="minTime"
16
- :max-time="maxTime"
17
- :start-time="startTime"
18
- :multi-calendars="!isDisabledMultiCalendar"
19
- :required="isRequired"
20
- time-picker-inline
21
- range
22
- @update:model-value="onInput"
23
- >
24
- <template v-if="appConfig.core?.is_thai_year" #year="{ value }">
25
- {{ value + 543 }}
26
- </template>
27
- <template v-if="appConfig.core?.is_thai_year" #year-overlay-value="{ value }">
28
- {{ value + 543 }}
29
- </template>
30
- <template #dp-input="{ value: innerValue }">
31
- <UInput
32
- :trailing-icon="innerValue ? undefined : 'i-heroicons-calendar-days'"
33
- type="text"
34
- :model-value="innerValue"
35
- :placeholder="wrapperProps.placeholder"
36
- :readonly="true"
37
- input-class="cursor-pointer select-none"
38
- />
39
- </template>
40
- </Datepicker>
41
- </FieldWrapper>
42
- </template>
43
- <script lang="ts" setup>
44
- import Datepicker from '@vuepic/vue-datepicker'
45
- import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
46
- import { TimeHelper, ref, useFieldHOC, useAppConfig } from '#imports'
47
- import '@vuepic/vue-datepicker/dist/main.css'
48
- import type {
49
- IDateTimeRangeFieldProps,
50
- IDateTimeRangeResponse,
51
- } from './date_range_time_field.types'
52
-
53
- const props = withDefaults(defineProps<IDateTimeRangeFieldProps>(), {})
54
-
55
- const appConfig = useAppConfig()
56
- const { value, wrapperProps } = useFieldHOC<IDateTimeRangeResponse | null>(props)
57
-
58
- const innerValueRef = ref<Date[]>([])
59
-
60
- const format = (date: Date[]) => {
61
- if (props.disabledTime) {
62
- return date.length > 0
63
- ? TimeHelper.displayDate(date[0]) + ' - ' + TimeHelper.displayDate(date[1] ?? date[0])
64
- : ''
65
- }
66
-
67
- return date.length > 0
68
- ? TimeHelper.displayDateTime(date[0]) + ' - ' + TimeHelper.displayDateTime(date[1] ?? date[0])
69
- : ''
70
- }
71
-
72
- const onInput = (_value: Date[]) => {
73
- if (_value === null) {
74
- value.value = null
75
-
76
- return
77
- }
78
-
79
- if (props.disabledTime && !props.isReturnISO) {
80
- value.value = <IDateTimeRangeResponse>{
81
- start: TimeHelper.getDateFormTime(_value[0]),
82
- end: TimeHelper.getDateFormTime(_value[1] || _value[0]),
83
- }
84
- } else {
85
- value.value = <IDateTimeRangeResponse>{
86
- start: _value[0],
87
- end: _value[1] || _value[0],
88
- }
89
- }
90
- }
91
- </script>
@@ -1,27 +0,0 @@
1
- <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <URadioGroup
4
- v-model="value"
5
- :options="options"
6
- :disabled="wrapperProps.isDisabled"
7
- :required="isRequired"
8
- value-attribute="value"
9
- option-attribute="label"
10
- :icon="icon"
11
- :color="color"
12
- :size="size"
13
- :ui="ui"
14
- :ui-menu="uiMenu"
15
- />
16
- </FieldWrapper>
17
- </template>
18
-
19
- <script lang="ts" setup>
20
- import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
21
- import { useFieldHOC } from '#core/composables/useForm'
22
- import { type ISelectFieldProps } from '#core/components/Form/InputSelect/types'
23
-
24
- const props = withDefaults(defineProps<ISelectFieldProps>(), {})
25
-
26
- const { value, wrapperProps } = useFieldHOC<any>(props)
27
- </script>
@@ -1,8 +0,0 @@
1
- import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
2
- import { type IOption } from '#core/types/common';
3
- export interface IRadioFieldProps extends IFieldProps {
4
- icon?: string;
5
- size?: string;
6
- options: IOption[];
7
- }
8
- export type IRadioField = IFormFieldBase<INPUT_TYPES.RADIO, IRadioFieldProps, never>;
@@ -1,16 +0,0 @@
1
- <template>
2
- <FieldWrapper v-bind="wrapperProps" :is-required="false">
3
- <p class="form-control-static">
4
- {{ !value || value.length === 0 ? '-' : value }}
5
- </p>
6
- </FieldWrapper>
7
- </template>
8
- <script lang="ts" setup>
9
- import { type IStaticFieldProps } from '#core/components/Form/InputStatic/types'
10
- import { useFieldHOC } from '#core/composables/useForm'
11
- import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
12
-
13
- const props = withDefaults(defineProps<IStaticFieldProps>(), {})
14
-
15
- const { value, wrapperProps } = useFieldHOC<string>(props)
16
- </script>
@@ -1,4 +0,0 @@
1
- import { type IFieldProps, type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
2
- export interface IStaticFieldProps extends IFieldProps {
3
- }
4
- export type IStaticField = IFormFieldBase<INPUT_TYPES.STATIC, IStaticFieldProps, never>;