ikoncomponents 1.5.6 → 1.5.7

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 (424) hide show
  1. package/README.md +36 -36
  2. package/dist/hooks/use-mobile.d.ts +1 -0
  3. package/dist/hooks/use-mobile.js +15 -0
  4. package/dist/ikoncomponents/action-menu/index.d.ts +5 -0
  5. package/dist/ikoncomponents/action-menu/index.js +42 -0
  6. package/dist/ikoncomponents/action-menu/type.d.ts +14 -0
  7. package/dist/ikoncomponents/action-menu/type.js +1 -0
  8. package/dist/ikoncomponents/activity-sheet/index.d.ts +11 -0
  9. package/dist/ikoncomponents/activity-sheet/index.js +23 -0
  10. package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
  11. package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
  12. package/dist/ikoncomponents/alert-dialog/index.d.ts +14 -0
  13. package/dist/ikoncomponents/alert-dialog/index.js +20 -0
  14. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +18 -0
  15. package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +43 -0
  16. package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
  17. package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
  18. package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
  19. package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
  20. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
  21. package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
  22. package/dist/ikoncomponents/big-calendar/index.d.ts +3 -0
  23. package/dist/ikoncomponents/big-calendar/index.js +35 -0
  24. package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
  25. package/dist/ikoncomponents/big-calendar/type.js +1 -0
  26. package/dist/ikoncomponents/buttons/index.d.ts +18 -0
  27. package/dist/ikoncomponents/buttons/index.js +38 -0
  28. package/dist/ikoncomponents/combobox-input/index.d.ts +2 -0
  29. package/dist/ikoncomponents/combobox-input/index.js +18 -0
  30. package/dist/ikoncomponents/combobox-input/type.d.ts +13 -0
  31. package/dist/ikoncomponents/combobox-input/type.js +1 -0
  32. package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
  33. package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
  34. package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -0
  35. package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +22 -0
  36. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -0
  37. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +35 -0
  38. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -0
  39. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +38 -0
  40. package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -0
  41. package/dist/ikoncomponents/data-table/datatable-pagination/index.js +13 -0
  42. package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -0
  43. package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +18 -0
  44. package/dist/ikoncomponents/data-table/function.d.ts +1 -0
  45. package/dist/ikoncomponents/data-table/function.js +6 -0
  46. package/dist/ikoncomponents/data-table/index.d.ts +2 -0
  47. package/dist/ikoncomponents/data-table/index.js +223 -0
  48. package/dist/ikoncomponents/data-table/type.d.ts +60 -0
  49. package/dist/ikoncomponents/data-table/type.js +1 -0
  50. package/dist/ikoncomponents/e-chart/index.d.ts +15 -0
  51. package/dist/ikoncomponents/e-chart/index.js +115 -0
  52. package/dist/ikoncomponents/file-input/index.d.ts +1 -0
  53. package/dist/ikoncomponents/file-input/index.js +21 -0
  54. package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
  55. package/dist/ikoncomponents/fileUpload/index.js +69 -0
  56. package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
  57. package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
  58. package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
  59. package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +26 -0
  60. package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
  61. package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
  62. package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
  63. package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
  64. package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
  65. package/dist/ikoncomponents/form-fields/input/index.js +18 -0
  66. package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
  67. package/{templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx → dist/ikoncomponents/form-fields/multi-combobox-input/index.js} +381 -574
  68. package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
  69. package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
  70. package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
  71. package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
  72. package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
  73. package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
  74. package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
  75. package/dist/ikoncomponents/form-fields/types/index.js +1 -0
  76. package/dist/ikoncomponents/glowing-effect/index.d.ts +14 -0
  77. package/dist/ikoncomponents/glowing-effect/index.js +84 -0
  78. package/dist/ikoncomponents/icon/index.d.ts +8 -0
  79. package/dist/ikoncomponents/icon/index.js +23 -0
  80. package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
  81. package/{templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx → dist/ikoncomponents/image-cropper-upload/components/newCropper.js} +85 -117
  82. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
  83. package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
  84. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
  85. package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
  86. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
  87. package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
  88. package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
  89. package/{templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx → dist/ikoncomponents/image-cropper-upload/image-cropper/index.js} +87 -119
  90. package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
  91. package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
  92. package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
  93. package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
  94. package/dist/ikoncomponents/loading-spinner/index.d.ts +9 -0
  95. package/dist/ikoncomponents/loading-spinner/index.js +19 -0
  96. package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +10 -0
  97. package/dist/ikoncomponents/main-layout/RefreshContext.js +17 -0
  98. package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +33 -0
  99. package/dist/ikoncomponents/main-layout/SidebarNavContext.js +52 -0
  100. package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
  101. package/dist/ikoncomponents/main-layout/app-sidebar.js +24 -0
  102. package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
  103. package/dist/ikoncomponents/main-layout/footer.js +5 -0
  104. package/dist/ikoncomponents/main-layout/header.d.ts +3 -0
  105. package/dist/ikoncomponents/main-layout/header.js +15 -0
  106. package/dist/ikoncomponents/main-layout/index.d.ts +6 -0
  107. package/dist/ikoncomponents/main-layout/index.js +11 -0
  108. package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +60 -0
  109. package/dist/ikoncomponents/main-layout/main-sidebar.js +119 -0
  110. package/dist/ikoncomponents/main-layout/nav-main.d.ts +11 -0
  111. package/dist/ikoncomponents/main-layout/nav-main.js +33 -0
  112. package/dist/ikoncomponents/multi-combobox/index.d.ts +13 -0
  113. package/dist/ikoncomponents/multi-combobox/index.js +202 -0
  114. package/dist/ikoncomponents/no-data/index.d.ts +3 -0
  115. package/dist/ikoncomponents/no-data/index.js +5 -0
  116. package/dist/ikoncomponents/page-wrapper/index.d.ts +9 -0
  117. package/dist/ikoncomponents/page-wrapper/index.js +7 -0
  118. package/dist/ikoncomponents/password-strength-meter/index.d.ts +3 -0
  119. package/dist/ikoncomponents/password-strength-meter/index.js +40 -0
  120. package/dist/ikoncomponents/phone-input/index.d.ts +1 -0
  121. package/dist/ikoncomponents/phone-input/index.js +41 -0
  122. package/dist/ikoncomponents/provider-wrapper/index.d.ts +6 -0
  123. package/dist/ikoncomponents/provider-wrapper/index.js +11 -0
  124. package/dist/ikoncomponents/search-input/index.d.ts +1 -0
  125. package/dist/ikoncomponents/search-input/index.js +19 -0
  126. package/dist/ikoncomponents/sheet/index.d.ts +10 -0
  127. package/dist/ikoncomponents/sheet/index.js +6 -0
  128. package/dist/ikoncomponents/simple-widget/index.d.ts +14 -0
  129. package/dist/ikoncomponents/simple-widget/index.js +14 -0
  130. package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
  131. package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
  132. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
  133. package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
  134. package/dist/ikoncomponents/tabs/index.d.ts +2 -0
  135. package/dist/ikoncomponents/tabs/index.js +50 -0
  136. package/{templates/default/ikoncomponents/tabs/type.ts → dist/ikoncomponents/tabs/type.d.ts} +19 -20
  137. package/dist/ikoncomponents/tabs/type.js +2 -0
  138. package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -0
  139. package/{templates/default/ikoncomponents/theme-toggle-btn/index.tsx → dist/ikoncomponents/theme-toggle-btn/index.js} +118 -189
  140. package/dist/ikoncomponents/title-progress/index.d.ts +12 -0
  141. package/dist/ikoncomponents/title-progress/index.js +10 -0
  142. package/dist/ikoncomponents/tooltip/index.d.ts +5 -0
  143. package/dist/ikoncomponents/tooltip/index.js +5 -0
  144. package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +31 -0
  145. package/dist/ikoncomponents/twolevel-dropdown/index.js +143 -0
  146. package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
  147. package/dist/ikoncomponents/upload-tab/index.js +92 -0
  148. package/dist/ikoncomponents/widgets/index.d.ts +2 -0
  149. package/dist/ikoncomponents/widgets/index.js +14 -0
  150. package/dist/ikoncomponents/widgets/type.d.ts +10 -0
  151. package/dist/ikoncomponents/widgets/type.js +2 -0
  152. package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
  153. package/dist/ikoncomponents/work-in-progress/index.js +4 -0
  154. package/dist/index.d.ts +138 -0
  155. package/dist/index.js +116 -14
  156. package/dist/shadcn/accordion.d.ts +7 -0
  157. package/dist/shadcn/accordion.js +33 -0
  158. package/dist/shadcn/alert-dialog.d.ts +20 -0
  159. package/dist/shadcn/alert-dialog.js +83 -0
  160. package/dist/shadcn/alert.d.ts +9 -0
  161. package/dist/shadcn/alert.js +38 -0
  162. package/dist/shadcn/aspect-ratio.d.ts +3 -0
  163. package/dist/shadcn/aspect-ratio.js +19 -0
  164. package/dist/shadcn/avatar.d.ts +6 -0
  165. package/dist/shadcn/avatar.js +28 -0
  166. package/dist/shadcn/badge.d.ts +9 -0
  167. package/dist/shadcn/badge.js +35 -0
  168. package/dist/shadcn/breadcrumb.d.ts +11 -0
  169. package/dist/shadcn/breadcrumb.js +45 -0
  170. package/dist/shadcn/button.d.ts +10 -0
  171. package/dist/shadcn/button.js +47 -0
  172. package/dist/shadcn/calendar.d.ts +8 -0
  173. package/dist/shadcn/calendar.js +61 -0
  174. package/dist/shadcn/card.d.ts +9 -0
  175. package/dist/shadcn/card.js +42 -0
  176. package/dist/shadcn/checkbox.d.ts +4 -0
  177. package/dist/shadcn/checkbox.js +21 -0
  178. package/dist/shadcn/collapsible.d.ts +5 -0
  179. package/dist/shadcn/collapsible.js +27 -0
  180. package/dist/shadcn/command.d.ts +18 -0
  181. package/dist/shadcn/command.js +54 -0
  182. package/dist/shadcn/date-input.d.ts +7 -0
  183. package/dist/shadcn/date-input.js +179 -0
  184. package/dist/shadcn/date-range-picker.d.ts +24 -0
  185. package/dist/shadcn/date-range-picker.js +45 -0
  186. package/dist/shadcn/dialog.d.ts +15 -0
  187. package/dist/shadcn/dialog.js +57 -0
  188. package/dist/shadcn/drawer.d.ts +13 -0
  189. package/dist/shadcn/drawer.js +56 -0
  190. package/dist/shadcn/dropdown-menu.d.ts +25 -0
  191. package/dist/shadcn/dropdown-menu.js +77 -0
  192. package/dist/shadcn/form.d.ts +24 -0
  193. package/dist/shadcn/form.js +70 -0
  194. package/dist/shadcn/hover-card.d.ts +6 -0
  195. package/dist/shadcn/hover-card.js +28 -0
  196. package/dist/shadcn/input-otp.d.ts +34 -0
  197. package/dist/shadcn/input-otp.js +40 -0
  198. package/dist/shadcn/input.d.ts +3 -0
  199. package/dist/shadcn/input.js +18 -0
  200. package/dist/shadcn/label.d.ts +4 -0
  201. package/dist/shadcn/label.js +20 -0
  202. package/dist/shadcn/navigation-menu.d.ts +16 -0
  203. package/dist/shadcn/navigation-menu.js +74 -0
  204. package/dist/shadcn/popover.d.ts +7 -0
  205. package/dist/shadcn/popover.js +32 -0
  206. package/dist/shadcn/progress.d.ts +8 -0
  207. package/dist/shadcn/progress.js +23 -0
  208. package/dist/shadcn/radio-group.d.ts +5 -0
  209. package/dist/shadcn/radio-group.js +25 -0
  210. package/dist/shadcn/scroll-area.d.ts +5 -0
  211. package/dist/shadcn/scroll-area.js +26 -0
  212. package/dist/shadcn/select.d.ts +15 -0
  213. package/dist/shadcn/select.js +59 -0
  214. package/dist/shadcn/separator.d.ts +4 -0
  215. package/dist/shadcn/separator.js +20 -0
  216. package/dist/shadcn/sheet.d.ts +13 -0
  217. package/dist/shadcn/sheet.js +61 -0
  218. package/dist/shadcn/sidebar.d.ts +69 -0
  219. package/dist/shadcn/sidebar.js +242 -0
  220. package/dist/shadcn/skeleton.d.ts +3 -0
  221. package/dist/shadcn/skeleton.js +18 -0
  222. package/dist/shadcn/slider.d.ts +4 -0
  223. package/dist/shadcn/slider.js +26 -0
  224. package/dist/shadcn/sonner.d.ts +3 -0
  225. package/dist/shadcn/sonner.js +25 -0
  226. package/dist/shadcn/switch.d.ts +4 -0
  227. package/dist/shadcn/switch.js +20 -0
  228. package/dist/shadcn/table.d.ts +10 -0
  229. package/dist/shadcn/table.js +47 -0
  230. package/dist/shadcn/tabs.d.ts +7 -0
  231. package/dist/shadcn/tabs.js +32 -0
  232. package/dist/shadcn/textarea.d.ts +3 -0
  233. package/dist/shadcn/textarea.js +18 -0
  234. package/dist/shadcn/toggle-group.d.ts +9 -0
  235. package/dist/shadcn/toggle-group.js +35 -0
  236. package/dist/shadcn/toggle.d.ts +9 -0
  237. package/dist/shadcn/toggle.js +38 -0
  238. package/dist/shadcn/tooltip.d.ts +7 -0
  239. package/dist/shadcn/tooltip.js +32 -0
  240. package/dist/shadcn/workflow.d.ts +20 -0
  241. package/dist/shadcn/workflow.js +20 -0
  242. package/dist/styles.css +6163 -0
  243. package/dist/utils/actions/account/index.d.ts +5 -0
  244. package/dist/utils/actions/account/index.js +28 -0
  245. package/dist/utils/actions/account/type.d.ts +4 -0
  246. package/dist/utils/actions/account/type.js +1 -0
  247. package/dist/utils/actions/auth/index.d.ts +7 -0
  248. package/{templates/default/utils/actions/auth/index.ts → dist/utils/actions/auth/index.js} +58 -69
  249. package/dist/utils/actions/common/utils.d.ts +5 -0
  250. package/{templates/default/utils/actions/common/utils.ts → dist/utils/actions/common/utils.js} +25 -28
  251. package/dist/utils/actions/software/index.d.ts +11 -0
  252. package/dist/utils/actions/software/index.js +75 -0
  253. package/dist/utils/api/accountService/index.d.ts +23 -0
  254. package/dist/utils/api/accountService/index.js +64 -0
  255. package/dist/utils/api/accountService/type.d.ts +4 -0
  256. package/dist/utils/api/accountService/type.js +1 -0
  257. package/dist/utils/api/file-upload/index.d.ts +5 -0
  258. package/dist/utils/api/file-upload/index.js +80 -0
  259. package/dist/utils/api/file-upload/type.d.ts +6 -0
  260. package/dist/utils/api/file-upload/type.js +1 -0
  261. package/dist/utils/api/ikonBaseApi.d.ts +12 -0
  262. package/{templates/default/utils/api/ikonBaseApi.ts → dist/utils/api/ikonBaseApi.js} +104 -132
  263. package/dist/utils/api/loginService/index.d.ts +12 -0
  264. package/dist/utils/api/loginService/index.js +72 -0
  265. package/{templates/default/utils/api/loginService/type.ts → dist/utils/api/loginService/type.d.ts} +31 -35
  266. package/dist/utils/api/loginService/type.js +1 -0
  267. package/dist/utils/api/softwareService/index.d.ts +64 -0
  268. package/dist/utils/api/softwareService/index.js +212 -0
  269. package/dist/utils/api/softwareService/type.d.ts +54 -0
  270. package/dist/utils/api/softwareService/type.js +1 -0
  271. package/dist/utils/border-radius-provider.d.ts +11 -0
  272. package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js} +35 -59
  273. package/dist/utils/cn.d.ts +2 -0
  274. package/dist/utils/cn.js +5 -0
  275. package/dist/utils/font-provider.d.ts +11 -0
  276. package/{templates/default/utils/font-provider.tsx → dist/utils/font-provider.js} +37 -61
  277. package/dist/utils/session/cookieSession.d.ts +8 -0
  278. package/dist/utils/session/cookieSession.js +33 -0
  279. package/dist/utils/theme-provider/index.d.ts +3 -0
  280. package/dist/utils/theme-provider/index.js +18 -0
  281. package/dist/utils/token-management/index.d.ts +10 -0
  282. package/dist/utils/token-management/index.js +69 -0
  283. package/dist/utils/token-management/types.d.ts +6 -0
  284. package/dist/utils/token-management/types.js +1 -0
  285. package/package.json +91 -17
  286. package/bin.js +0 -2
  287. package/dist/commands/init.js +0 -63
  288. package/dist/utlis/copyDir.js +0 -7
  289. package/templates/default/hooks/use-mobile.ts +0 -19
  290. package/templates/default/ikonS/accordion.tsx +0 -66
  291. package/templates/default/ikonS/alert-dialog.tsx +0 -179
  292. package/templates/default/ikonS/alert.tsx +0 -66
  293. package/templates/default/ikonS/aspect-ratio.tsx +0 -11
  294. package/templates/default/ikonS/avatar.tsx +0 -53
  295. package/templates/default/ikonS/badge.tsx +0 -49
  296. package/templates/default/ikonS/breadcrumb.tsx +0 -109
  297. package/templates/default/ikonS/button.tsx +0 -64
  298. package/templates/default/ikonS/calendar.tsx +0 -227
  299. package/templates/default/ikonS/card.tsx +0 -92
  300. package/templates/default/ikonS/checkbox.tsx +0 -33
  301. package/templates/default/ikonS/collapsible.tsx +0 -33
  302. package/templates/default/ikonS/command.tsx +0 -184
  303. package/templates/default/ikonS/date-input.tsx +0 -259
  304. package/templates/default/ikonS/date-range-picker.tsx +0 -103
  305. package/templates/default/ikonS/dialog.tsx +0 -143
  306. package/templates/default/ikonS/drawer.tsx +0 -134
  307. package/templates/default/ikonS/dropdown-menu.tsx +0 -259
  308. package/templates/default/ikonS/form.tsx +0 -166
  309. package/templates/default/ikonS/hover-card.tsx +0 -44
  310. package/templates/default/ikonS/input-otp.tsx +0 -71
  311. package/templates/default/ikonS/input.tsx +0 -22
  312. package/templates/default/ikonS/label.tsx +0 -24
  313. package/templates/default/ikonS/navigation-menu.tsx +0 -195
  314. package/templates/default/ikonS/popover.tsx +0 -48
  315. package/templates/default/ikonS/progress.tsx +0 -40
  316. package/templates/default/ikonS/radio-group.tsx +0 -45
  317. package/templates/default/ikonS/scroll-area.tsx +0 -58
  318. package/templates/default/ikonS/select.tsx +0 -184
  319. package/templates/default/ikonS/separator.tsx +0 -28
  320. package/templates/default/ikonS/sheet.tsx +0 -139
  321. package/templates/default/ikonS/sidebar.tsx +0 -726
  322. package/templates/default/ikonS/skeleton.tsx +0 -15
  323. package/templates/default/ikonS/slider.tsx +0 -64
  324. package/templates/default/ikonS/sonner.tsx +0 -25
  325. package/templates/default/ikonS/switch.tsx +0 -31
  326. package/templates/default/ikonS/table.tsx +0 -116
  327. package/templates/default/ikonS/tabs.tsx +0 -67
  328. package/templates/default/ikonS/textarea.tsx +0 -18
  329. package/templates/default/ikonS/toggle-group.tsx +0 -83
  330. package/templates/default/ikonS/toggle.tsx +0 -47
  331. package/templates/default/ikonS/tooltip.tsx +0 -65
  332. package/templates/default/ikonS/workflow.tsx +0 -119
  333. package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
  334. package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
  335. package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
  336. package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
  337. package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
  338. package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
  339. package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
  340. package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
  341. package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
  342. package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
  343. package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
  344. package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
  345. package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
  346. package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
  347. package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
  348. package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
  349. package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
  350. package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
  351. package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
  352. package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
  353. package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
  354. package/templates/default/ikoncomponents/data-table/function.ts +0 -7
  355. package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
  356. package/templates/default/ikoncomponents/data-table/type.ts +0 -75
  357. package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
  358. package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
  359. package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
  360. package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
  361. package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
  362. package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
  363. package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
  364. package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
  365. package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
  366. package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
  367. package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
  368. package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
  369. package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
  370. package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
  371. package/templates/default/ikoncomponents/icon/index.tsx +0 -22
  372. package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
  373. package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
  374. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
  375. package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
  376. package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
  377. package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
  378. package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
  379. package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
  380. package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
  381. package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
  382. package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
  383. package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
  384. package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
  385. package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
  386. package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
  387. package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
  388. package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
  389. package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
  390. package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
  391. package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
  392. package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
  393. package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
  394. package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
  395. package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
  396. package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
  397. package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
  398. package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
  399. package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
  400. package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
  401. package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
  402. package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
  403. package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
  404. package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
  405. package/templates/default/ikoncomponents/widgets/type.ts +0 -11
  406. package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
  407. package/templates/default/styles.css +0 -1159
  408. package/templates/default/utils/actions/account/index.ts +0 -33
  409. package/templates/default/utils/actions/account/type.ts +0 -4
  410. package/templates/default/utils/actions/common/revalidate.ts +0 -18
  411. package/templates/default/utils/actions/common/type.ts +0 -4
  412. package/templates/default/utils/actions/software/index.ts +0 -106
  413. package/templates/default/utils/api/accountService/index.ts +0 -103
  414. package/templates/default/utils/api/accountService/type.ts +0 -4
  415. package/templates/default/utils/api/file-upload/index.ts +0 -103
  416. package/templates/default/utils/api/file-upload/type.ts +0 -8
  417. package/templates/default/utils/api/loginService/index.ts +0 -106
  418. package/templates/default/utils/api/softwareService/index.ts +0 -356
  419. package/templates/default/utils/api/softwareService/type.ts +0 -62
  420. package/templates/default/utils/cn.ts +0 -6
  421. package/templates/default/utils/session/cookieSession.ts +0 -49
  422. package/templates/default/utils/theme-provider/index.tsx +0 -11
  423. package/templates/default/utils/token-management/index.ts +0 -115
  424. package/templates/default/utils/token-management/types.ts +0 -6
@@ -0,0 +1,5 @@
1
+ import { AccountTreeProps } from "./type";
2
+ export declare const getAccount: () => Promise<AccountTreeProps>;
3
+ export declare const getActiveAccountId: () => Promise<string>;
4
+ export declare const getOrSetActiveAccountId: () => Promise<string>;
5
+ export declare const setActiveAccountId: (accountId: string) => Promise<void>;
@@ -0,0 +1,28 @@
1
+ "use server";
2
+ import { cache } from "react";
3
+ import { getAccountTree } from "../../api/accountService";
4
+ import { getCookieSession, setCookieSession } from "../../session/cookieSession";
5
+ export const getAccount = cache(async () => {
6
+ return await getAccountTree();
7
+ });
8
+ export const getActiveAccountId = async () => {
9
+ const activeAccountId = await getCookieSession("activeAccountId");
10
+ return activeAccountId || "";
11
+ };
12
+ export const getOrSetActiveAccountId = async () => {
13
+ let activeAccountId = await getCookieSession("activeAccountId");
14
+ if (!activeAccountId) {
15
+ try {
16
+ const account = await getAccount();
17
+ activeAccountId = account.ACCOUNT_ID;
18
+ await setActiveAccountId(activeAccountId);
19
+ }
20
+ catch (error) {
21
+ console.error(error);
22
+ }
23
+ }
24
+ return activeAccountId || "";
25
+ };
26
+ export const setActiveAccountId = async (accountId) => {
27
+ await setCookieSession("activeAccountId", accountId);
28
+ };
@@ -0,0 +1,4 @@
1
+ export interface AccountTreeProps {
2
+ ACCOUNT_ID: string;
3
+ ACCOUNT_NAME: string;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { GetLoggedInUserProfileDetailsReturnProps, GetLoggedInUserProfileReturnProps } from "../../api/loginService/type";
2
+ export declare const setTicket: (ticket: string) => Promise<void>;
3
+ export declare const getTicket: () => Promise<string | undefined>;
4
+ export declare const getProfileData: () => Promise<GetLoggedInUserProfileReturnProps & GetLoggedInUserProfileDetailsReturnProps>;
5
+ export declare function signOut(): Promise<void>;
6
+ export declare const getCurrentUserId: () => Promise<string>;
7
+ export declare const setCurrentUserId: (userId: string) => Promise<void>;
@@ -1,69 +1,58 @@
1
- "use server"
2
- import { redirect } from "next/navigation";
3
- import { GetLoggedInUserProfileDetailsReturnProps, GetLoggedInUserProfileReturnProps } from "../../api/loginService/type";
4
- import { logout } from "../../api/loginService";
5
- import { clearAllCookieSession, getCookieSession, setCookieSession } from "../../session/cookieSession";
6
- import { cookies } from "next/headers";
7
-
8
- export const setTicket = async (ticket: string) => {
9
- await setCookieSession("ticket", ticket)
10
- };
11
- export const getTicket = async (): Promise<string | undefined> => {
12
- return await getCookieSession("ticket")
13
- };
14
-
15
- export const getProfileData = async (): Promise<GetLoggedInUserProfileReturnProps & GetLoggedInUserProfileDetailsReturnProps> => {
16
-
17
-
18
- const cookieStore = await cookies();
19
- const cookieHeader = cookieStore.getAll()
20
- .map(({ name, value }) => `${name}=${value}`)
21
- .join("; "); // Convert to a valid Cookie header string
22
-
23
- // Fetch API with cookies
24
- const resp = await fetch(`${process.env.NEXT_BASE_PATH_URL}/api/profile`, {
25
- method: "GET",
26
- headers: {
27
- "Content-Type": "application/json",
28
- "Accept": "application/json",
29
- "Cookie": cookieHeader, // Send all cookies
30
- },
31
- cache: "force-cache",
32
- });
33
-
34
- return resp.json();
35
-
36
- // let data1: GetLoggedInUserProfileReturnProps = {} as GetLoggedInUserProfileReturnProps;
37
- // try {
38
- // data1 = await getLoggedInUserProfile();
39
- // } catch (error) {
40
- // console.error(error)
41
- // }
42
- // let data2: GetLoggedInUserProfileDetailsReturnProps = {} as GetLoggedInUserProfileDetailsReturnProps;
43
- // try {
44
- // data2 = await getLoggedInUserProfileDetails();
45
- // } catch (error) {
46
- // console.error(error)
47
- // }
48
- // return { ...data1, ...data2 };
49
-
50
- }
51
-
52
- export async function signOut() {
53
- try {
54
- await logout();
55
- } catch (error) {
56
- console.error(error)
57
- }
58
- await clearAllCookieSession()
59
- redirect("/login")
60
- }
61
-
62
- export const getCurrentUserId = async (): Promise<string> => {
63
- const currentUserId = await getCookieSession("currentUserId")
64
- return currentUserId || "";
65
- };
66
-
67
- export const setCurrentUserId = async (userId: string) => {
68
- await setCookieSession("currentUserId", userId)
69
- };
1
+ "use server";
2
+ import { redirect } from "next/navigation";
3
+ import { logout } from "../../api/loginService";
4
+ import { clearAllCookieSession, getCookieSession, setCookieSession } from "../../session/cookieSession";
5
+ import { cookies } from "next/headers";
6
+ export const setTicket = async (ticket) => {
7
+ await setCookieSession("ticket", ticket);
8
+ };
9
+ export const getTicket = async () => {
10
+ return await getCookieSession("ticket");
11
+ };
12
+ export const getProfileData = async () => {
13
+ const cookieStore = await cookies();
14
+ const cookieHeader = cookieStore.getAll()
15
+ .map(({ name, value }) => `${name}=${value}`)
16
+ .join("; "); // Convert to a valid Cookie header string
17
+ // Fetch API with cookies
18
+ const resp = await fetch(`${process.env.NEXT_BASE_PATH_URL}/api/profile`, {
19
+ method: "GET",
20
+ headers: {
21
+ "Content-Type": "application/json",
22
+ "Accept": "application/json",
23
+ "Cookie": cookieHeader, // Send all cookies
24
+ },
25
+ cache: "force-cache",
26
+ });
27
+ return resp.json();
28
+ // let data1: GetLoggedInUserProfileReturnProps = {} as GetLoggedInUserProfileReturnProps;
29
+ // try {
30
+ // data1 = await getLoggedInUserProfile();
31
+ // } catch (error) {
32
+ // console.error(error)
33
+ // }
34
+ // let data2: GetLoggedInUserProfileDetailsReturnProps = {} as GetLoggedInUserProfileDetailsReturnProps;
35
+ // try {
36
+ // data2 = await getLoggedInUserProfileDetails();
37
+ // } catch (error) {
38
+ // console.error(error)
39
+ // }
40
+ // return { ...data1, ...data2 };
41
+ };
42
+ export async function signOut() {
43
+ try {
44
+ await logout();
45
+ }
46
+ catch (error) {
47
+ console.error(error);
48
+ }
49
+ await clearAllCookieSession();
50
+ redirect("/login");
51
+ }
52
+ export const getCurrentUserId = async () => {
53
+ const currentUserId = await getCookieSession("currentUserId");
54
+ return currentUserId || "";
55
+ };
56
+ export const setCurrentUserId = async (userId) => {
57
+ await setCookieSession("currentUserId", userId);
58
+ };
@@ -0,0 +1,5 @@
1
+ import { FileinfoProps } from "../../api/file-upload/type";
2
+ export declare function getSrcFromBase64String(imgString?: string | null, type?: string): string;
3
+ export declare function getResourceUrl(fileInfo: FileinfoProps): Promise<string>;
4
+ export declare function downloadResource(fileInfo: FileinfoProps): Promise<void>;
5
+ export declare function openFileInNewTab(url: string): Promise<void>;
@@ -1,28 +1,25 @@
1
- import { FileinfoProps } from "../../api/file-upload/type";
2
- import { getTicket } from "../auth";
3
-
4
- export function getSrcFromBase64String(imgString?: string | null, type?: string) {
5
- return imgString ? `data:${type || "image/webp"};base64,${imgString}` : "";
6
- }
7
-
8
- export async function getResourceUrl(fileInfo: FileinfoProps): Promise<string> {
9
- const globalTicket = await getTicket();
10
- return "https://ikoncloud-dev.keross.com/ikon-api/download" + "?ticket=" + globalTicket + "&resourceId=" + fileInfo.resourceId + "&resourceName=" + fileInfo.resourceName + "&resourceType=" + fileInfo.resourceType
11
- }
12
-
13
- export async function downloadResource(fileInfo: FileinfoProps) {
14
- const resourceUrl = await getResourceUrl(fileInfo)
15
- window.open(encodeURI(resourceUrl))
16
- }
17
-
18
- export async function openFileInNewTab(url: string) {
19
- const encodedLink = encodeURI(url);
20
- try {
21
- const response = await fetch(encodedLink);
22
- const blob = await response.blob();
23
- const blobUrl = URL.createObjectURL(blob);
24
- window.open(blobUrl, '_blank');
25
- } catch (err) {
26
- console.error('Failed to open file in new tab:', err);
27
- }
28
- };
1
+ import { getTicket } from "../auth";
2
+ export function getSrcFromBase64String(imgString, type) {
3
+ return imgString ? `data:${type || "image/webp"};base64,${imgString}` : "";
4
+ }
5
+ export async function getResourceUrl(fileInfo) {
6
+ const globalTicket = await getTicket();
7
+ return "https://ikoncloud-dev.keross.com/ikon-api/download" + "?ticket=" + globalTicket + "&resourceId=" + fileInfo.resourceId + "&resourceName=" + fileInfo.resourceName + "&resourceType=" + fileInfo.resourceType;
8
+ }
9
+ export async function downloadResource(fileInfo) {
10
+ const resourceUrl = await getResourceUrl(fileInfo);
11
+ window.open(encodeURI(resourceUrl));
12
+ }
13
+ export async function openFileInNewTab(url) {
14
+ const encodedLink = encodeURI(url);
15
+ try {
16
+ const response = await fetch(encodedLink);
17
+ const blob = await response.blob();
18
+ const blobUrl = URL.createObjectURL(blob);
19
+ window.open(blobUrl, '_blank');
20
+ }
21
+ catch (err) {
22
+ console.error('Failed to open file in new tab:', err);
23
+ }
24
+ }
25
+ ;
@@ -0,0 +1,11 @@
1
+ import { SubscribeSoftwareProps } from "../../api/softwareService/type";
2
+ export declare const getBaseSoftwareId: () => Promise<string | undefined>;
3
+ export declare const getOrSetBaseSoftwareId: () => Promise<string | undefined>;
4
+ export declare const setBaseSoftwareId: (softwareId: string) => Promise<void>;
5
+ export declare const getCurrentSoftwareId: () => Promise<string>;
6
+ export declare const getCurrentAppName: () => Promise<string>;
7
+ export declare const setCurrentSoftwareId: (softwareId: string) => Promise<void>;
8
+ export declare const getSoftwareIdByNameVersion: (softwareName: string, version: string) => Promise<string>;
9
+ export declare const setCurrentSoftwareIdByNameVersion: (softwareName: string, version: string) => Promise<void>;
10
+ export declare const getAccessibleSoftware: (accountId: string, userId: string) => Promise<any>;
11
+ export declare const getAllSubscribedSoftwares: (accountId?: string) => Promise<SubscribeSoftwareProps[]>;
@@ -0,0 +1,75 @@
1
+ "use server";
2
+ import { cache } from "react";
3
+ import { getAccessibleSoftwareForUser, mapSoftwareName, } from "../../api/softwareService";
4
+ import { getCookieSession, setCookieSession, } from "../../session/cookieSession";
5
+ import { cookies } from "next/headers";
6
+ export const getBaseSoftwareId = async () => {
7
+ return await getCookieSession("baseSoftwareId");
8
+ };
9
+ export const getOrSetBaseSoftwareId = async () => {
10
+ let baseSoftwareId = await getCookieSession("baseSoftwareId");
11
+ if (!baseSoftwareId) {
12
+ try {
13
+ baseSoftwareId = await getSoftwareIdByNameVersion("Base App", "1");
14
+ await setBaseSoftwareId(baseSoftwareId);
15
+ }
16
+ catch (error) {
17
+ console.error(error);
18
+ }
19
+ }
20
+ return baseSoftwareId;
21
+ };
22
+ export const setBaseSoftwareId = async (softwareId) => {
23
+ await setCookieSession("baseSoftwareId", softwareId);
24
+ };
25
+ export const getCurrentSoftwareId = async () => {
26
+ return (await getCookieSession("currentSoftwareId")) || "";
27
+ };
28
+ export const getCurrentAppName = async () => {
29
+ return (await getCookieSession("currentAppName")) || "";
30
+ };
31
+ export const setCurrentSoftwareId = async (softwareId) => {
32
+ await setCookieSession("currentSoftwareId", softwareId);
33
+ };
34
+ export const getSoftwareIdByNameVersion = cache(async (softwareName, version) => {
35
+ return await mapSoftwareName({ softwareName, version });
36
+ });
37
+ export const setCurrentSoftwareIdByNameVersion = async (softwareName, version) => {
38
+ const softwareId = await getSoftwareIdByNameVersion(softwareName, version);
39
+ await setCurrentSoftwareId(softwareId);
40
+ };
41
+ export const getAccessibleSoftware = cache(async (accountId, userId) => {
42
+ return await getAccessibleSoftwareForUser({ accountId, userId });
43
+ });
44
+ // export const getAllSubscribedSoftwares = cache(async (accountId: string) => {
45
+ // return await getAllSubscribedSoftwaresForClient({ accountId });
46
+ // });
47
+ export const getAllSubscribedSoftwares = async (accountId) => {
48
+ try {
49
+ const cookieStore = await cookies();
50
+ const cookieHeader = cookieStore
51
+ .getAll()
52
+ .map(({ name, value }) => `${name}=${value}`)
53
+ .join("; "); // Convert to a valid Cookie header string
54
+ // Fetch API with cookies
55
+ const resp = await fetch(`${process.env.NEXT_BASE_PATH_URL}/api/software/subscribe`, {
56
+ method: "GET",
57
+ headers: {
58
+ "Content-Type": "application/json",
59
+ Accept: "application/json",
60
+ Cookie: cookieHeader, // ✅ Send all cookies
61
+ body: JSON.stringify({
62
+ accountId,
63
+ }),
64
+ },
65
+ cache: "force-cache",
66
+ });
67
+ if (!resp.ok)
68
+ throw new Error("Failed to fetch subscribe softwares");
69
+ return resp.json();
70
+ }
71
+ catch (error) {
72
+ console.error(error);
73
+ return [];
74
+ }
75
+ };
@@ -0,0 +1,23 @@
1
+ import { GetAccountTreeProps } from "./type";
2
+ export declare const getAccountTree: () => Promise<GetAccountTreeProps>;
3
+ export declare const checkExistingAccount: ({ accountName, }: {
4
+ accountName: string;
5
+ }) => Promise<boolean>;
6
+ export declare const getFullAccountTree: () => Promise<any>;
7
+ export declare const getAllInvitedAccountsForUser: (userId: string) => Promise<any>;
8
+ export declare const acceptAccountInvitationRequest: ({ userId, requestId, }: {
9
+ userId: string;
10
+ requestId: string;
11
+ }) => Promise<any>;
12
+ export declare const rejectAccountInvitationRequest: ({ userId, requestId, }: {
13
+ userId: string;
14
+ requestId: string;
15
+ }) => Promise<any>;
16
+ export declare const cancelAccountInvitationRequest: ({ userId, requestId, }: {
17
+ userId: string;
18
+ requestId: string;
19
+ }) => Promise<any>;
20
+ export declare const deactivateInvitedUserFromAccount: ({ userId, invitationId, }: {
21
+ userId: string;
22
+ invitationId: string;
23
+ }) => Promise<any>;
@@ -0,0 +1,64 @@
1
+ "use server";
2
+ import ikonBaseApi from "../ikonBaseApi";
3
+ export const getAccountTree = async () => {
4
+ const result = await ikonBaseApi({
5
+ service: "accountService",
6
+ operation: "getAccountTree",
7
+ });
8
+ return result.data;
9
+ };
10
+ export const checkExistingAccount = async ({ accountName, }) => {
11
+ const result = await ikonBaseApi({
12
+ service: "accountService",
13
+ operation: "checkExistingAccount",
14
+ arguments_: [accountName],
15
+ });
16
+ return result.data;
17
+ };
18
+ export const getFullAccountTree = async () => {
19
+ const result = await ikonBaseApi({
20
+ service: "accountService",
21
+ operation: "getFullAccountTree",
22
+ });
23
+ return result.data;
24
+ };
25
+ export const getAllInvitedAccountsForUser = async (userId) => {
26
+ const result = await ikonBaseApi({
27
+ service: "userInvitationService",
28
+ operation: "getAllInvitedAccountsForUser",
29
+ arguments_: [userId],
30
+ });
31
+ return result.data;
32
+ };
33
+ export const acceptAccountInvitationRequest = async ({ userId, requestId, }) => {
34
+ const result = await ikonBaseApi({
35
+ service: "userInvitationService",
36
+ operation: "acceptAccountInvitationRequest",
37
+ arguments_: [userId, requestId],
38
+ });
39
+ return result.data;
40
+ };
41
+ export const rejectAccountInvitationRequest = async ({ userId, requestId, }) => {
42
+ const result = await ikonBaseApi({
43
+ service: "userInvitationService",
44
+ operation: "rejectAccountInvitationRequest",
45
+ arguments_: [userId, requestId],
46
+ });
47
+ return result.data;
48
+ };
49
+ export const cancelAccountInvitationRequest = async ({ userId, requestId, }) => {
50
+ const result = await ikonBaseApi({
51
+ service: "userInvitationService",
52
+ operation: "cancelAccountInvitationRequest",
53
+ arguments_: [userId, requestId],
54
+ });
55
+ return result.data;
56
+ };
57
+ export const deactivateInvitedUserFromAccount = async ({ userId, invitationId, }) => {
58
+ const result = await ikonBaseApi({
59
+ service: "userInvitationService",
60
+ operation: "deactivateInvitedUserFromAccount",
61
+ arguments_: [userId, invitationId],
62
+ });
63
+ return result.data;
64
+ };
@@ -0,0 +1,4 @@
1
+ export interface GetAccountTreeProps {
2
+ ACCOUNT_ID: string;
3
+ ACCOUNT_NAME: string;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FileinfoProps } from "./type";
2
+ export declare function singleFileUpload(file: File, resourceId?: string): Promise<FileinfoProps>;
3
+ export declare function multipleFileUpload(files: File[], resourceId?: string): Promise<FileinfoProps[]>;
4
+ export declare function base64FileUpload(base64File: string, resourceName: string, resourceType: string, resourceId?: string): Promise<FileinfoProps>;
5
+ export declare function singleUAResourceUpload(file: File, folder: string): Promise<any>;
@@ -0,0 +1,80 @@
1
+ "use server";
2
+ import { axiosInstance } from "../ikonBaseApi";
3
+ import { v4 } from "uuid";
4
+ import { getTicket } from "../../actions/auth";
5
+ export async function singleFileUpload(file, resourceId) {
6
+ const formData = new FormData();
7
+ formData.append("file", file);
8
+ const fileInfo = {};
9
+ fileInfo["resourceId"] = resourceId || v4();
10
+ fileInfo["resourceName"] = file.name;
11
+ fileInfo["resourceSize"] = file.size;
12
+ fileInfo["resourceType"] = file.type;
13
+ const globalTicket = (await getTicket()) || "";
14
+ const queryParams = new URLSearchParams({
15
+ ticket: globalTicket,
16
+ resourceId: fileInfo["resourceId"],
17
+ });
18
+ try {
19
+ const result = await axiosInstance({
20
+ method: "POST",
21
+ url: `https://ikoncloud-dev.keross.com/ikon-api/upload?${queryParams.toString()}`,
22
+ data: formData,
23
+ responseType: "json",
24
+ headers: { "Content-Type": "multipart/form-data" },
25
+ });
26
+ console.log("File upload result:", result);
27
+ }
28
+ catch (error) {
29
+ throw error;
30
+ }
31
+ return fileInfo;
32
+ }
33
+ export async function multipleFileUpload(files, resourceId) {
34
+ const fileInfos = [];
35
+ for (const file of files) {
36
+ const fileInfo = await singleFileUpload(file, resourceId);
37
+ fileInfos.push(fileInfo);
38
+ }
39
+ return fileInfos;
40
+ }
41
+ export async function base64FileUpload(base64File, resourceName, resourceType, resourceId) {
42
+ const base64 = base64File.split(",")[1];
43
+ const byteCharacters = atob(base64);
44
+ const byteNumbers = new Array(byteCharacters.length);
45
+ for (let i = 0; i < byteCharacters.length; i++) {
46
+ byteNumbers[i] = byteCharacters.charCodeAt(i);
47
+ }
48
+ const byteArray = new Uint8Array(byteNumbers);
49
+ const blob = new Blob([byteArray], { type: resourceType });
50
+ const file = new File([blob], resourceName, { type: resourceType });
51
+ return await singleFileUpload(file, resourceId);
52
+ }
53
+ export async function singleUAResourceUpload(file, folder) {
54
+ const formData = new FormData();
55
+ formData.append("file", file);
56
+ const fileInfo = {};
57
+ fileInfo["folder"] = folder || "ikon";
58
+ fileInfo["resourceName"] = file.name;
59
+ fileInfo["resourceSize"] = file.size;
60
+ fileInfo["resourceType"] = file.type;
61
+ const globalTicket = (await getTicket()) || "";
62
+ const queryParams = new URLSearchParams({
63
+ ticket: globalTicket,
64
+ folder: fileInfo["folder"],
65
+ });
66
+ try {
67
+ const result = await axiosInstance({
68
+ method: "POST",
69
+ url: `https://ikoncloud-dev.keross.com/ikon-api//uaresourceupload?${queryParams.toString()}`,
70
+ data: formData,
71
+ responseType: "json",
72
+ headers: { "Content-Type": "multipart/form-data" },
73
+ });
74
+ console.log("File upload result:", result);
75
+ }
76
+ catch (error) {
77
+ throw error;
78
+ }
79
+ return fileInfo;
80
+ }
@@ -0,0 +1,6 @@
1
+ export interface FileinfoProps {
2
+ resourceId: string;
3
+ resourceName?: string;
4
+ resourceSize?: number;
5
+ resourceType?: string;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ interface IkonBaseApiProps {
2
+ service: string;
3
+ operation: string;
4
+ arguments_?: any | null;
5
+ accountId?: string | null;
6
+ softwareId?: string | null;
7
+ isTicketRequried?: boolean;
8
+ isServerApi?: boolean;
9
+ }
10
+ export declare const axiosInstance: import("axios").AxiosInstance;
11
+ declare function ikonBaseApi({ service, operation, arguments_, accountId, softwareId, isTicketRequried, isServerApi }: IkonBaseApiProps): Promise<any>;
12
+ export default ikonBaseApi;