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.
- package/README.md +36 -36
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/ikoncomponents/action-menu/index.d.ts +5 -0
- package/dist/ikoncomponents/action-menu/index.js +42 -0
- package/dist/ikoncomponents/action-menu/type.d.ts +14 -0
- package/dist/ikoncomponents/action-menu/type.js +1 -0
- package/dist/ikoncomponents/activity-sheet/index.d.ts +11 -0
- package/dist/ikoncomponents/activity-sheet/index.js +23 -0
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
- package/dist/ikoncomponents/alert-dialog/index.d.ts +14 -0
- package/dist/ikoncomponents/alert-dialog/index.js +20 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +18 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +43 -0
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
- package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
- package/dist/ikoncomponents/big-calendar/index.d.ts +3 -0
- package/dist/ikoncomponents/big-calendar/index.js +35 -0
- package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
- package/dist/ikoncomponents/big-calendar/type.js +1 -0
- package/dist/ikoncomponents/buttons/index.d.ts +18 -0
- package/dist/ikoncomponents/buttons/index.js +38 -0
- package/dist/ikoncomponents/combobox-input/index.d.ts +2 -0
- package/dist/ikoncomponents/combobox-input/index.js +18 -0
- package/dist/ikoncomponents/combobox-input/type.d.ts +13 -0
- package/dist/ikoncomponents/combobox-input/type.js +1 -0
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +22 -0
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +35 -0
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +38 -0
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +13 -0
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +18 -0
- package/dist/ikoncomponents/data-table/function.d.ts +1 -0
- package/dist/ikoncomponents/data-table/function.js +6 -0
- package/dist/ikoncomponents/data-table/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/index.js +223 -0
- package/dist/ikoncomponents/data-table/type.d.ts +60 -0
- package/dist/ikoncomponents/data-table/type.js +1 -0
- package/dist/ikoncomponents/e-chart/index.d.ts +15 -0
- package/dist/ikoncomponents/e-chart/index.js +115 -0
- package/dist/ikoncomponents/file-input/index.d.ts +1 -0
- package/dist/ikoncomponents/file-input/index.js +21 -0
- package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
- package/dist/ikoncomponents/fileUpload/index.js +69 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +26 -0
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
- package/{templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx → dist/ikoncomponents/form-fields/multi-combobox-input/index.js} +381 -574
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
- package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
- package/dist/ikoncomponents/form-fields/types/index.js +1 -0
- package/dist/ikoncomponents/glowing-effect/index.d.ts +14 -0
- package/dist/ikoncomponents/glowing-effect/index.js +84 -0
- package/dist/ikoncomponents/icon/index.d.ts +8 -0
- package/dist/ikoncomponents/icon/index.js +23 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
- package/{templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx → dist/ikoncomponents/image-cropper-upload/components/newCropper.js} +85 -117
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
- package/{templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx → dist/ikoncomponents/image-cropper-upload/image-cropper/index.js} +87 -119
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
- package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
- package/dist/ikoncomponents/loading-spinner/index.d.ts +9 -0
- package/dist/ikoncomponents/loading-spinner/index.js +19 -0
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +10 -0
- package/dist/ikoncomponents/main-layout/RefreshContext.js +17 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +33 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +52 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.js +24 -0
- package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
- package/dist/ikoncomponents/main-layout/footer.js +5 -0
- package/dist/ikoncomponents/main-layout/header.d.ts +3 -0
- package/dist/ikoncomponents/main-layout/header.js +15 -0
- package/dist/ikoncomponents/main-layout/index.d.ts +6 -0
- package/dist/ikoncomponents/main-layout/index.js +11 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +60 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.js +119 -0
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +11 -0
- package/dist/ikoncomponents/main-layout/nav-main.js +33 -0
- package/dist/ikoncomponents/multi-combobox/index.d.ts +13 -0
- package/dist/ikoncomponents/multi-combobox/index.js +202 -0
- package/dist/ikoncomponents/no-data/index.d.ts +3 -0
- package/dist/ikoncomponents/no-data/index.js +5 -0
- package/dist/ikoncomponents/page-wrapper/index.d.ts +9 -0
- package/dist/ikoncomponents/page-wrapper/index.js +7 -0
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +3 -0
- package/dist/ikoncomponents/password-strength-meter/index.js +40 -0
- package/dist/ikoncomponents/phone-input/index.d.ts +1 -0
- package/dist/ikoncomponents/phone-input/index.js +41 -0
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +6 -0
- package/dist/ikoncomponents/provider-wrapper/index.js +11 -0
- package/dist/ikoncomponents/search-input/index.d.ts +1 -0
- package/dist/ikoncomponents/search-input/index.js +19 -0
- package/dist/ikoncomponents/sheet/index.d.ts +10 -0
- package/dist/ikoncomponents/sheet/index.js +6 -0
- package/dist/ikoncomponents/simple-widget/index.d.ts +14 -0
- package/dist/ikoncomponents/simple-widget/index.js +14 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
- package/dist/ikoncomponents/tabs/index.d.ts +2 -0
- package/dist/ikoncomponents/tabs/index.js +50 -0
- package/{templates/default/ikoncomponents/tabs/type.ts → dist/ikoncomponents/tabs/type.d.ts} +19 -20
- package/dist/ikoncomponents/tabs/type.js +2 -0
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -0
- package/{templates/default/ikoncomponents/theme-toggle-btn/index.tsx → dist/ikoncomponents/theme-toggle-btn/index.js} +118 -189
- package/dist/ikoncomponents/title-progress/index.d.ts +12 -0
- package/dist/ikoncomponents/title-progress/index.js +10 -0
- package/dist/ikoncomponents/tooltip/index.d.ts +5 -0
- package/dist/ikoncomponents/tooltip/index.js +5 -0
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +31 -0
- package/dist/ikoncomponents/twolevel-dropdown/index.js +143 -0
- package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
- package/dist/ikoncomponents/upload-tab/index.js +92 -0
- package/dist/ikoncomponents/widgets/index.d.ts +2 -0
- package/dist/ikoncomponents/widgets/index.js +14 -0
- package/dist/ikoncomponents/widgets/type.d.ts +10 -0
- package/dist/ikoncomponents/widgets/type.js +2 -0
- package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
- package/dist/ikoncomponents/work-in-progress/index.js +4 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +116 -14
- package/dist/shadcn/accordion.d.ts +7 -0
- package/dist/shadcn/accordion.js +33 -0
- package/dist/shadcn/alert-dialog.d.ts +20 -0
- package/dist/shadcn/alert-dialog.js +83 -0
- package/dist/shadcn/alert.d.ts +9 -0
- package/dist/shadcn/alert.js +38 -0
- package/dist/shadcn/aspect-ratio.d.ts +3 -0
- package/dist/shadcn/aspect-ratio.js +19 -0
- package/dist/shadcn/avatar.d.ts +6 -0
- package/dist/shadcn/avatar.js +28 -0
- package/dist/shadcn/badge.d.ts +9 -0
- package/dist/shadcn/badge.js +35 -0
- package/dist/shadcn/breadcrumb.d.ts +11 -0
- package/dist/shadcn/breadcrumb.js +45 -0
- package/dist/shadcn/button.d.ts +10 -0
- package/dist/shadcn/button.js +47 -0
- package/dist/shadcn/calendar.d.ts +8 -0
- package/dist/shadcn/calendar.js +61 -0
- package/dist/shadcn/card.d.ts +9 -0
- package/dist/shadcn/card.js +42 -0
- package/dist/shadcn/checkbox.d.ts +4 -0
- package/dist/shadcn/checkbox.js +21 -0
- package/dist/shadcn/collapsible.d.ts +5 -0
- package/dist/shadcn/collapsible.js +27 -0
- package/dist/shadcn/command.d.ts +18 -0
- package/dist/shadcn/command.js +54 -0
- package/dist/shadcn/date-input.d.ts +7 -0
- package/dist/shadcn/date-input.js +179 -0
- package/dist/shadcn/date-range-picker.d.ts +24 -0
- package/dist/shadcn/date-range-picker.js +45 -0
- package/dist/shadcn/dialog.d.ts +15 -0
- package/dist/shadcn/dialog.js +57 -0
- package/dist/shadcn/drawer.d.ts +13 -0
- package/dist/shadcn/drawer.js +56 -0
- package/dist/shadcn/dropdown-menu.d.ts +25 -0
- package/dist/shadcn/dropdown-menu.js +77 -0
- package/dist/shadcn/form.d.ts +24 -0
- package/dist/shadcn/form.js +70 -0
- package/dist/shadcn/hover-card.d.ts +6 -0
- package/dist/shadcn/hover-card.js +28 -0
- package/dist/shadcn/input-otp.d.ts +34 -0
- package/dist/shadcn/input-otp.js +40 -0
- package/dist/shadcn/input.d.ts +3 -0
- package/dist/shadcn/input.js +18 -0
- package/dist/shadcn/label.d.ts +4 -0
- package/dist/shadcn/label.js +20 -0
- package/dist/shadcn/navigation-menu.d.ts +16 -0
- package/dist/shadcn/navigation-menu.js +74 -0
- package/dist/shadcn/popover.d.ts +7 -0
- package/dist/shadcn/popover.js +32 -0
- package/dist/shadcn/progress.d.ts +8 -0
- package/dist/shadcn/progress.js +23 -0
- package/dist/shadcn/radio-group.d.ts +5 -0
- package/dist/shadcn/radio-group.js +25 -0
- package/dist/shadcn/scroll-area.d.ts +5 -0
- package/dist/shadcn/scroll-area.js +26 -0
- package/dist/shadcn/select.d.ts +15 -0
- package/dist/shadcn/select.js +59 -0
- package/dist/shadcn/separator.d.ts +4 -0
- package/dist/shadcn/separator.js +20 -0
- package/dist/shadcn/sheet.d.ts +13 -0
- package/dist/shadcn/sheet.js +61 -0
- package/dist/shadcn/sidebar.d.ts +69 -0
- package/dist/shadcn/sidebar.js +242 -0
- package/dist/shadcn/skeleton.d.ts +3 -0
- package/dist/shadcn/skeleton.js +18 -0
- package/dist/shadcn/slider.d.ts +4 -0
- package/dist/shadcn/slider.js +26 -0
- package/dist/shadcn/sonner.d.ts +3 -0
- package/dist/shadcn/sonner.js +25 -0
- package/dist/shadcn/switch.d.ts +4 -0
- package/dist/shadcn/switch.js +20 -0
- package/dist/shadcn/table.d.ts +10 -0
- package/dist/shadcn/table.js +47 -0
- package/dist/shadcn/tabs.d.ts +7 -0
- package/dist/shadcn/tabs.js +32 -0
- package/dist/shadcn/textarea.d.ts +3 -0
- package/dist/shadcn/textarea.js +18 -0
- package/dist/shadcn/toggle-group.d.ts +9 -0
- package/dist/shadcn/toggle-group.js +35 -0
- package/dist/shadcn/toggle.d.ts +9 -0
- package/dist/shadcn/toggle.js +38 -0
- package/dist/shadcn/tooltip.d.ts +7 -0
- package/dist/shadcn/tooltip.js +32 -0
- package/dist/shadcn/workflow.d.ts +20 -0
- package/dist/shadcn/workflow.js +20 -0
- package/dist/styles.css +6163 -0
- package/dist/utils/actions/account/index.d.ts +5 -0
- package/dist/utils/actions/account/index.js +28 -0
- package/dist/utils/actions/account/type.d.ts +4 -0
- package/dist/utils/actions/account/type.js +1 -0
- package/dist/utils/actions/auth/index.d.ts +7 -0
- package/{templates/default/utils/actions/auth/index.ts → dist/utils/actions/auth/index.js} +58 -69
- package/dist/utils/actions/common/utils.d.ts +5 -0
- package/{templates/default/utils/actions/common/utils.ts → dist/utils/actions/common/utils.js} +25 -28
- package/dist/utils/actions/software/index.d.ts +11 -0
- package/dist/utils/actions/software/index.js +75 -0
- package/dist/utils/api/accountService/index.d.ts +23 -0
- package/dist/utils/api/accountService/index.js +64 -0
- package/dist/utils/api/accountService/type.d.ts +4 -0
- package/dist/utils/api/accountService/type.js +1 -0
- package/dist/utils/api/file-upload/index.d.ts +5 -0
- package/dist/utils/api/file-upload/index.js +80 -0
- package/dist/utils/api/file-upload/type.d.ts +6 -0
- package/dist/utils/api/file-upload/type.js +1 -0
- package/dist/utils/api/ikonBaseApi.d.ts +12 -0
- package/{templates/default/utils/api/ikonBaseApi.ts → dist/utils/api/ikonBaseApi.js} +104 -132
- package/dist/utils/api/loginService/index.d.ts +12 -0
- package/dist/utils/api/loginService/index.js +72 -0
- package/{templates/default/utils/api/loginService/type.ts → dist/utils/api/loginService/type.d.ts} +31 -35
- package/dist/utils/api/loginService/type.js +1 -0
- package/dist/utils/api/softwareService/index.d.ts +64 -0
- package/dist/utils/api/softwareService/index.js +212 -0
- package/dist/utils/api/softwareService/type.d.ts +54 -0
- package/dist/utils/api/softwareService/type.js +1 -0
- package/dist/utils/border-radius-provider.d.ts +11 -0
- package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js} +35 -59
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +5 -0
- package/dist/utils/font-provider.d.ts +11 -0
- package/{templates/default/utils/font-provider.tsx → dist/utils/font-provider.js} +37 -61
- package/dist/utils/session/cookieSession.d.ts +8 -0
- package/dist/utils/session/cookieSession.js +33 -0
- package/dist/utils/theme-provider/index.d.ts +3 -0
- package/dist/utils/theme-provider/index.js +18 -0
- package/dist/utils/token-management/index.d.ts +10 -0
- package/dist/utils/token-management/index.js +69 -0
- package/dist/utils/token-management/types.d.ts +6 -0
- package/dist/utils/token-management/types.js +1 -0
- package/package.json +91 -17
- package/bin.js +0 -2
- package/dist/commands/init.js +0 -63
- package/dist/utlis/copyDir.js +0 -7
- package/templates/default/hooks/use-mobile.ts +0 -19
- package/templates/default/ikonS/accordion.tsx +0 -66
- package/templates/default/ikonS/alert-dialog.tsx +0 -179
- package/templates/default/ikonS/alert.tsx +0 -66
- package/templates/default/ikonS/aspect-ratio.tsx +0 -11
- package/templates/default/ikonS/avatar.tsx +0 -53
- package/templates/default/ikonS/badge.tsx +0 -49
- package/templates/default/ikonS/breadcrumb.tsx +0 -109
- package/templates/default/ikonS/button.tsx +0 -64
- package/templates/default/ikonS/calendar.tsx +0 -227
- package/templates/default/ikonS/card.tsx +0 -92
- package/templates/default/ikonS/checkbox.tsx +0 -33
- package/templates/default/ikonS/collapsible.tsx +0 -33
- package/templates/default/ikonS/command.tsx +0 -184
- package/templates/default/ikonS/date-input.tsx +0 -259
- package/templates/default/ikonS/date-range-picker.tsx +0 -103
- package/templates/default/ikonS/dialog.tsx +0 -143
- package/templates/default/ikonS/drawer.tsx +0 -134
- package/templates/default/ikonS/dropdown-menu.tsx +0 -259
- package/templates/default/ikonS/form.tsx +0 -166
- package/templates/default/ikonS/hover-card.tsx +0 -44
- package/templates/default/ikonS/input-otp.tsx +0 -71
- package/templates/default/ikonS/input.tsx +0 -22
- package/templates/default/ikonS/label.tsx +0 -24
- package/templates/default/ikonS/navigation-menu.tsx +0 -195
- package/templates/default/ikonS/popover.tsx +0 -48
- package/templates/default/ikonS/progress.tsx +0 -40
- package/templates/default/ikonS/radio-group.tsx +0 -45
- package/templates/default/ikonS/scroll-area.tsx +0 -58
- package/templates/default/ikonS/select.tsx +0 -184
- package/templates/default/ikonS/separator.tsx +0 -28
- package/templates/default/ikonS/sheet.tsx +0 -139
- package/templates/default/ikonS/sidebar.tsx +0 -726
- package/templates/default/ikonS/skeleton.tsx +0 -15
- package/templates/default/ikonS/slider.tsx +0 -64
- package/templates/default/ikonS/sonner.tsx +0 -25
- package/templates/default/ikonS/switch.tsx +0 -31
- package/templates/default/ikonS/table.tsx +0 -116
- package/templates/default/ikonS/tabs.tsx +0 -67
- package/templates/default/ikonS/textarea.tsx +0 -18
- package/templates/default/ikonS/toggle-group.tsx +0 -83
- package/templates/default/ikonS/toggle.tsx +0 -47
- package/templates/default/ikonS/tooltip.tsx +0 -65
- package/templates/default/ikonS/workflow.tsx +0 -119
- package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
- package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
- package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
- package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
- package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
- package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
- package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
- package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
- package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
- package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
- package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
- package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
- package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
- package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
- package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
- package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
- package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
- package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
- package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
- package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
- package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
- package/templates/default/ikoncomponents/data-table/function.ts +0 -7
- package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
- package/templates/default/ikoncomponents/data-table/type.ts +0 -75
- package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
- package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
- package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
- package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
- package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
- package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
- package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
- package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
- package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
- package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
- package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
- package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
- package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
- package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
- package/templates/default/ikoncomponents/icon/index.tsx +0 -22
- package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
- package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
- package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
- package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
- package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
- package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
- package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
- package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
- package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
- package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
- package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
- package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
- package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
- package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
- package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
- package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
- package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
- package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
- package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
- package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
- package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
- package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
- package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
- package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
- package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
- package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
- package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
- package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
- package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
- package/templates/default/ikoncomponents/widgets/type.ts +0 -11
- package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
- package/templates/default/styles.css +0 -1159
- package/templates/default/utils/actions/account/index.ts +0 -33
- package/templates/default/utils/actions/account/type.ts +0 -4
- package/templates/default/utils/actions/common/revalidate.ts +0 -18
- package/templates/default/utils/actions/common/type.ts +0 -4
- package/templates/default/utils/actions/software/index.ts +0 -106
- package/templates/default/utils/api/accountService/index.ts +0 -103
- package/templates/default/utils/api/accountService/type.ts +0 -4
- package/templates/default/utils/api/file-upload/index.ts +0 -103
- package/templates/default/utils/api/file-upload/type.ts +0 -8
- package/templates/default/utils/api/loginService/index.ts +0 -106
- package/templates/default/utils/api/softwareService/index.ts +0 -356
- package/templates/default/utils/api/softwareService/type.ts +0 -62
- package/templates/default/utils/cn.ts +0 -6
- package/templates/default/utils/session/cookieSession.ts +0 -49
- package/templates/default/utils/theme-provider/index.tsx +0 -11
- package/templates/default/utils/token-management/index.ts +0 -115
- package/templates/default/utils/token-management/types.ts +0 -6
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
import ikonBaseApi from "../ikonBaseApi";
|
|
2
|
-
import {
|
|
3
|
-
CreateSoftwareProps,
|
|
4
|
-
EditSoftwareProps,
|
|
5
|
-
getAccessibleSoftwareForUserProps,
|
|
6
|
-
getAllSubscribedSoftwaresForClientProps,
|
|
7
|
-
getAvailableSoftwaresForAccountProps,
|
|
8
|
-
getMySoftwaresProps,
|
|
9
|
-
getMySoftwaresV2Props,
|
|
10
|
-
mapSoftwareNameProps,
|
|
11
|
-
} from "./type";
|
|
12
|
-
|
|
13
|
-
export const mapSoftwareName = async ({
|
|
14
|
-
softwareName,
|
|
15
|
-
version,
|
|
16
|
-
}: mapSoftwareNameProps): Promise<string> => {
|
|
17
|
-
const result = await ikonBaseApi({
|
|
18
|
-
service: "softwareService",
|
|
19
|
-
operation: "mapSoftwareName",
|
|
20
|
-
arguments_: [softwareName, version],
|
|
21
|
-
});
|
|
22
|
-
return result.data;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const createSoftware = async ({
|
|
26
|
-
softwareName,
|
|
27
|
-
softwareDescription,
|
|
28
|
-
softwareVersion,
|
|
29
|
-
softwareOwnerAccount,
|
|
30
|
-
softwareDeveloperAccount,
|
|
31
|
-
softwareManagerAccount,
|
|
32
|
-
softwareAccessibility,
|
|
33
|
-
softwareStatus,
|
|
34
|
-
}: CreateSoftwareProps): Promise<string> => {
|
|
35
|
-
const result = await ikonBaseApi({
|
|
36
|
-
service: "softwareService",
|
|
37
|
-
operation: "createSoftware",
|
|
38
|
-
arguments_: [
|
|
39
|
-
softwareName,
|
|
40
|
-
softwareDescription,
|
|
41
|
-
softwareVersion,
|
|
42
|
-
softwareOwnerAccount,
|
|
43
|
-
softwareDeveloperAccount,
|
|
44
|
-
softwareManagerAccount,
|
|
45
|
-
softwareAccessibility,
|
|
46
|
-
softwareStatus,
|
|
47
|
-
],
|
|
48
|
-
});
|
|
49
|
-
return result.data;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const editSoftware = async ({
|
|
53
|
-
softwareId,
|
|
54
|
-
softwareName,
|
|
55
|
-
softwareDescription,
|
|
56
|
-
softwareVersion,
|
|
57
|
-
softwareDeveloperAccount,
|
|
58
|
-
softwareManagerAccount,
|
|
59
|
-
softwareAccessibility,
|
|
60
|
-
softwareStatus,
|
|
61
|
-
}: EditSoftwareProps): Promise<string> => {
|
|
62
|
-
const result = await ikonBaseApi({
|
|
63
|
-
service: "softwareService",
|
|
64
|
-
operation: "editSoftware",
|
|
65
|
-
arguments_: [
|
|
66
|
-
softwareId,
|
|
67
|
-
softwareName,
|
|
68
|
-
softwareDescription,
|
|
69
|
-
softwareVersion,
|
|
70
|
-
softwareDeveloperAccount,
|
|
71
|
-
softwareManagerAccount,
|
|
72
|
-
softwareAccessibility,
|
|
73
|
-
softwareStatus,
|
|
74
|
-
],
|
|
75
|
-
});
|
|
76
|
-
return result.data;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const getAccessibleSoftwareForUser = async ({
|
|
80
|
-
accountId,
|
|
81
|
-
userId,
|
|
82
|
-
}: getAccessibleSoftwareForUserProps) => {
|
|
83
|
-
const result = await ikonBaseApi({
|
|
84
|
-
service: "softwareService",
|
|
85
|
-
operation: "getAccessibleSoftwareForUser",
|
|
86
|
-
arguments_: [userId, accountId],
|
|
87
|
-
});
|
|
88
|
-
return result.data;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export const getAllSubscribedSoftwaresForClient = async (
|
|
92
|
-
{ accountId }: getAllSubscribedSoftwaresForClientProps,
|
|
93
|
-
isServerApi?: boolean
|
|
94
|
-
) => {
|
|
95
|
-
const result = await ikonBaseApi({
|
|
96
|
-
service: "softwareSubscriptionService",
|
|
97
|
-
operation: "getAllSubscribedSoftwaresForClient",
|
|
98
|
-
arguments_: [accountId],
|
|
99
|
-
isServerApi: isServerApi,
|
|
100
|
-
});
|
|
101
|
-
return result.data;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export const inviteAccountForSoftware = async ({
|
|
105
|
-
accountId,
|
|
106
|
-
softwareId,
|
|
107
|
-
expirationTime,
|
|
108
|
-
}: {
|
|
109
|
-
accountId: string;
|
|
110
|
-
softwareId: string;
|
|
111
|
-
expirationTime?: number | string;
|
|
112
|
-
}) => {
|
|
113
|
-
const result = await ikonBaseApi({
|
|
114
|
-
service: "accountInvitationService",
|
|
115
|
-
operation: "inviteAccountForSoftware",
|
|
116
|
-
arguments_: [accountId, softwareId, expirationTime],
|
|
117
|
-
});
|
|
118
|
-
return result.data;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const getAllSentSoftwareInviteRequests = async ({
|
|
122
|
-
accountId,
|
|
123
|
-
}: {
|
|
124
|
-
accountId: string;
|
|
125
|
-
}) => {
|
|
126
|
-
const result = await ikonBaseApi({
|
|
127
|
-
service: "accountInvitationService",
|
|
128
|
-
operation: "getAllSentSoftwareInviteRequests",
|
|
129
|
-
arguments_: [accountId],
|
|
130
|
-
});
|
|
131
|
-
return result.data;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export const getAllReceivedSoftwareInviteRequests = async ({
|
|
135
|
-
accountId,
|
|
136
|
-
}: {
|
|
137
|
-
accountId: string;
|
|
138
|
-
}) => {
|
|
139
|
-
const result = await ikonBaseApi({
|
|
140
|
-
service: "accountInvitationService",
|
|
141
|
-
operation: "getAllReceivedSoftwareInviteRequests",
|
|
142
|
-
arguments_: [accountId],
|
|
143
|
-
});
|
|
144
|
-
return result.data;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export const getAllSoftwareInvitesV2 = async ({
|
|
148
|
-
accountId,
|
|
149
|
-
}: {
|
|
150
|
-
accountId: string;
|
|
151
|
-
}) => {
|
|
152
|
-
const result = await ikonBaseApi({
|
|
153
|
-
service: "accountInvitationService",
|
|
154
|
-
operation: "getAllSoftwareInvitesV2",
|
|
155
|
-
arguments_: [accountId],
|
|
156
|
-
});
|
|
157
|
-
return result.data;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const acceptInvitationRequestForSoftware = async ({
|
|
161
|
-
requestId,
|
|
162
|
-
shareKey,
|
|
163
|
-
}: {
|
|
164
|
-
requestId: string;
|
|
165
|
-
shareKey: string;
|
|
166
|
-
}) => {
|
|
167
|
-
const result = await ikonBaseApi({
|
|
168
|
-
service: "accountInvitationService",
|
|
169
|
-
operation: "acceptInvitationRequestForSoftware",
|
|
170
|
-
arguments_: [requestId, shareKey],
|
|
171
|
-
});
|
|
172
|
-
return result.data;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
export const cancelInvitationRequestForSoftware = async ({
|
|
176
|
-
requestId,
|
|
177
|
-
}: {
|
|
178
|
-
requestId: string;
|
|
179
|
-
}) => {
|
|
180
|
-
const result = await ikonBaseApi({
|
|
181
|
-
service: "accountInvitationService",
|
|
182
|
-
operation: "cancelInvitationRequestForSoftware",
|
|
183
|
-
arguments_: [requestId],
|
|
184
|
-
});
|
|
185
|
-
return result.data;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export const rejectInvitationRequestForSoftware = async ({
|
|
189
|
-
requestId,
|
|
190
|
-
}: {
|
|
191
|
-
requestId: string;
|
|
192
|
-
}) => {
|
|
193
|
-
const result = await ikonBaseApi({
|
|
194
|
-
service: "accountInvitationService",
|
|
195
|
-
operation: "rejectInvitationRequestForSoftware",
|
|
196
|
-
arguments_: [requestId],
|
|
197
|
-
});
|
|
198
|
-
return result.data;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export const activateSoftwareInviteForAccount = async ({
|
|
202
|
-
invitationId,
|
|
203
|
-
}: {
|
|
204
|
-
invitationId: string;
|
|
205
|
-
}) => {
|
|
206
|
-
const result = await ikonBaseApi({
|
|
207
|
-
service: "accountInvitationService",
|
|
208
|
-
operation: "activateSoftwareInviteForAccount",
|
|
209
|
-
arguments_: [invitationId],
|
|
210
|
-
});
|
|
211
|
-
return result.data;
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export const deactivateSoftwareInviteForAccount = async ({
|
|
215
|
-
invitationId,
|
|
216
|
-
}: {
|
|
217
|
-
invitationId: string;
|
|
218
|
-
}) => {
|
|
219
|
-
const result = await ikonBaseApi({
|
|
220
|
-
service: "accountInvitationService",
|
|
221
|
-
operation: "deactivateSoftwareInviteForAccount",
|
|
222
|
-
arguments_: [invitationId],
|
|
223
|
-
});
|
|
224
|
-
return result.data;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export const getAllPendingInvitationRequestsForUser = async ({
|
|
228
|
-
userId,
|
|
229
|
-
}: {
|
|
230
|
-
userId: string;
|
|
231
|
-
}) => {
|
|
232
|
-
const result = await ikonBaseApi({
|
|
233
|
-
service: "userInvitationService",
|
|
234
|
-
operation: "getAllPendingInvitationRequestsForUser",
|
|
235
|
-
arguments_: [userId],
|
|
236
|
-
});
|
|
237
|
-
return result.data;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
export const getAllInvitationRequestsSentByAccount = async ({
|
|
241
|
-
accountId,
|
|
242
|
-
}: {
|
|
243
|
-
accountId: string;
|
|
244
|
-
}) => {
|
|
245
|
-
const result = await ikonBaseApi({
|
|
246
|
-
service: "userInvitationService",
|
|
247
|
-
operation: "getAllInvitationRequestsSentByAccount",
|
|
248
|
-
arguments_: [accountId],
|
|
249
|
-
});
|
|
250
|
-
return result.data;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export const inviteUserToMyAccount = async ({
|
|
254
|
-
accountId,
|
|
255
|
-
userLogin,
|
|
256
|
-
}: {
|
|
257
|
-
accountId: string;
|
|
258
|
-
userLogin: string;
|
|
259
|
-
}) => {
|
|
260
|
-
const result = await ikonBaseApi({
|
|
261
|
-
service: "userInvitationService",
|
|
262
|
-
operation: "inviteUserToMyAccount",
|
|
263
|
-
arguments_: [accountId, userLogin],
|
|
264
|
-
});
|
|
265
|
-
return result.data;
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
export const getMySoftwares = async ({ accountId }: getMySoftwaresProps) => {
|
|
269
|
-
const result = await ikonBaseApi({
|
|
270
|
-
service: "softwareService",
|
|
271
|
-
operation: "getMySoftwares",
|
|
272
|
-
arguments_: [accountId],
|
|
273
|
-
});
|
|
274
|
-
return result.data;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
export const getMySoftwaresV2 = async ({
|
|
278
|
-
accountId,
|
|
279
|
-
onlyActive = false,
|
|
280
|
-
}: getMySoftwaresV2Props) => {
|
|
281
|
-
const result = await ikonBaseApi({
|
|
282
|
-
service: "softwareService",
|
|
283
|
-
operation: "getMySoftwaresV2",
|
|
284
|
-
arguments_: [accountId, onlyActive],
|
|
285
|
-
});
|
|
286
|
-
return result.data;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export const getAvailableSoftwaresForAccount = async ({
|
|
290
|
-
accountId,
|
|
291
|
-
}: getAvailableSoftwaresForAccountProps) => {
|
|
292
|
-
const result = await ikonBaseApi({
|
|
293
|
-
service: "softwareService",
|
|
294
|
-
operation: "getAvailableSoftwaresForAccount",
|
|
295
|
-
arguments_: [accountId],
|
|
296
|
-
});
|
|
297
|
-
return result.data;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export const getSoftwareById = async ({
|
|
301
|
-
softwareId,
|
|
302
|
-
}: {
|
|
303
|
-
softwareId: string;
|
|
304
|
-
}) => {
|
|
305
|
-
const result = await ikonBaseApi({
|
|
306
|
-
service: "softwareService",
|
|
307
|
-
operation: "getSoftwareById",
|
|
308
|
-
arguments_: [softwareId],
|
|
309
|
-
});
|
|
310
|
-
return result.data;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export const activateSoftware = async ({
|
|
314
|
-
softwareId,
|
|
315
|
-
}: {
|
|
316
|
-
softwareId: string;
|
|
317
|
-
}) => {
|
|
318
|
-
const result = await ikonBaseApi({
|
|
319
|
-
service: "softwareService",
|
|
320
|
-
operation: "activateSoftware",
|
|
321
|
-
arguments_: [softwareId],
|
|
322
|
-
});
|
|
323
|
-
return result.data;
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
export const deactivateSoftware = async ({
|
|
327
|
-
softwareId,
|
|
328
|
-
}: {
|
|
329
|
-
softwareId: string;
|
|
330
|
-
}) => {
|
|
331
|
-
const result = await ikonBaseApi({
|
|
332
|
-
service: "softwareService",
|
|
333
|
-
operation: "deactivateSoftware",
|
|
334
|
-
arguments_: [softwareId],
|
|
335
|
-
});
|
|
336
|
-
return result.data;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
export const requestForFinalSubscription = async ({
|
|
340
|
-
accountId,
|
|
341
|
-
userId,
|
|
342
|
-
softwareId,
|
|
343
|
-
suggestedDate = null,
|
|
344
|
-
}: {
|
|
345
|
-
accountId: string;
|
|
346
|
-
userId: string;
|
|
347
|
-
softwareId: string;
|
|
348
|
-
suggestedDate?: string | null;
|
|
349
|
-
}) => {
|
|
350
|
-
const result = await ikonBaseApi({
|
|
351
|
-
service: "requestService",
|
|
352
|
-
operation: "requestForFinalSubscription",
|
|
353
|
-
arguments_: [accountId, userId, softwareId, suggestedDate],
|
|
354
|
-
});
|
|
355
|
-
return result.data;
|
|
356
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export interface mapSoftwareNameProps {
|
|
2
|
-
softwareName: string;
|
|
3
|
-
version: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface CreateSoftwareProps {
|
|
7
|
-
softwareName: string;
|
|
8
|
-
softwareDescription: string;
|
|
9
|
-
softwareVersion: number;
|
|
10
|
-
softwareOwnerAccount: string;
|
|
11
|
-
softwareDeveloperAccount: string;
|
|
12
|
-
softwareManagerAccount: string | null;
|
|
13
|
-
softwareAccessibility: string;
|
|
14
|
-
softwareStatus: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface EditSoftwareProps {
|
|
18
|
-
softwareId: string;
|
|
19
|
-
softwareName: string;
|
|
20
|
-
softwareDescription: string;
|
|
21
|
-
softwareVersion: number;
|
|
22
|
-
softwareDeveloperAccount: string;
|
|
23
|
-
softwareManagerAccount: string | null;
|
|
24
|
-
softwareAccessibility: string;
|
|
25
|
-
softwareStatus: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface getAllSubscribedSoftwaresForClientProps {
|
|
29
|
-
accountId?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface getAccessibleSoftwareForUserProps {
|
|
33
|
-
accountId?: string;
|
|
34
|
-
userId: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface getMySoftwaresProps {
|
|
38
|
-
accountId?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface getMySoftwaresV2Props {
|
|
42
|
-
accountId?: string;
|
|
43
|
-
onlyActive?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface getAvailableSoftwaresForAccountProps {
|
|
47
|
-
accountId?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface SubscribeSoftwareProps {
|
|
51
|
-
ACCOUNT_ID: string;
|
|
52
|
-
SOFTWARE_ID: string;
|
|
53
|
-
SOFTWARE_NAME: string;
|
|
54
|
-
SOFTWARE_VERSION: number;
|
|
55
|
-
SOFTWARE_DESCRIPTION: string;
|
|
56
|
-
SOFTWARE_OWNER_ID: string;
|
|
57
|
-
SOFTWARE_OWNER_NAME: string;
|
|
58
|
-
SOFTWARE_ACCESSIBILITY: "PUBLIC" | "PRIVATE"; // assuming only these two possible values
|
|
59
|
-
ACTIVE: boolean;
|
|
60
|
-
PURCHASE_DATE: string; // ISO date string
|
|
61
|
-
EXPIRES_ON: string | null; // ISO date string or null
|
|
62
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { cookies } from "next/headers";
|
|
3
|
-
|
|
4
|
-
const cookiePrefix = "ikoncloud_next_";
|
|
5
|
-
|
|
6
|
-
export interface CookieSessionOptionsProps {
|
|
7
|
-
maxAge?: number;
|
|
8
|
-
expires?: Date;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export async function setCookieSession(
|
|
12
|
-
sessionName: string,
|
|
13
|
-
data: string,
|
|
14
|
-
options?: CookieSessionOptionsProps
|
|
15
|
-
) {
|
|
16
|
-
const cookieStore = await cookies();
|
|
17
|
-
|
|
18
|
-
cookieStore.set(cookiePrefix + sessionName, data, {
|
|
19
|
-
httpOnly: true,
|
|
20
|
-
sameSite: "lax",
|
|
21
|
-
secure: process.env.NODE_ENV === "production",
|
|
22
|
-
path: "/",
|
|
23
|
-
domain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN,
|
|
24
|
-
expires: options?.expires,
|
|
25
|
-
maxAge: options?.maxAge,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export async function getCookieSession(
|
|
30
|
-
sessionName: string
|
|
31
|
-
): Promise<string | undefined> {
|
|
32
|
-
const cookieStore = await cookies();
|
|
33
|
-
const cookie = cookieStore.get(cookiePrefix + sessionName)?.value;
|
|
34
|
-
return cookie;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function clearCookieSession(sessionName: string) {
|
|
38
|
-
const cookieStore = await cookies();
|
|
39
|
-
cookieStore.delete(cookiePrefix + sessionName);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function clearAllCookieSession() {
|
|
43
|
-
const cookieStore = await cookies();
|
|
44
|
-
cookieStore.getAll().forEach((cookie) => {
|
|
45
|
-
if (cookie.name.startsWith(cookiePrefix)) {
|
|
46
|
-
cookieStore.delete(cookie.name);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { ThemeProvider as NextThemesProvider } from "next-themes"
|
|
5
|
-
|
|
6
|
-
export function ThemeProvider({
|
|
7
|
-
children,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof NextThemesProvider>) {
|
|
10
|
-
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
|
|
11
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { redirect } from "next/navigation";
|
|
3
|
-
import {
|
|
4
|
-
clearAllCookieSession,
|
|
5
|
-
getCookieSession,
|
|
6
|
-
setCookieSession,
|
|
7
|
-
} from "../session/cookieSession";
|
|
8
|
-
import { TokenResponse } from "./types";
|
|
9
|
-
import { jwtDecode } from "jwt-decode";
|
|
10
|
-
|
|
11
|
-
interface AccessTokenOptionsProps {
|
|
12
|
-
isNotLogOutWhenExpire?: boolean;
|
|
13
|
-
platformUrl?: string;
|
|
14
|
-
isSetToken?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Prevent multiple refresh calls at once
|
|
18
|
-
let refreshPromise: Promise<string | null> | null = null;
|
|
19
|
-
|
|
20
|
-
export async function getValidAccessToken(
|
|
21
|
-
baseUrl: string,
|
|
22
|
-
options?: AccessTokenOptionsProps
|
|
23
|
-
): Promise<string | null> {
|
|
24
|
-
const accessToken = await getCookieSession("accessToken");
|
|
25
|
-
|
|
26
|
-
console.log("Access Token....:");
|
|
27
|
-
const refreshToken = await getCookieSession("refreshToken");
|
|
28
|
-
|
|
29
|
-
console.log("Refresh Token...");
|
|
30
|
-
|
|
31
|
-
console.log(
|
|
32
|
-
"Before Return Access Token:..............................................."
|
|
33
|
-
);
|
|
34
|
-
if (accessToken) return accessToken;
|
|
35
|
-
|
|
36
|
-
console.log(
|
|
37
|
-
"After Return Access Token:..............................................."
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
if (refreshToken) {
|
|
41
|
-
console.log("Refreshing access token using refresh token...", refreshToken);
|
|
42
|
-
if (!refreshPromise) {
|
|
43
|
-
refreshPromise = refreshAccessToken(refreshToken, baseUrl, options?.isSetToken);
|
|
44
|
-
refreshPromise.finally(() => (refreshPromise = null));
|
|
45
|
-
}
|
|
46
|
-
return await refreshPromise;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (!options?.isNotLogOutWhenExpire && options?.platformUrl) {
|
|
50
|
-
await logOut(options?.platformUrl);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export async function refreshAccessToken(
|
|
57
|
-
refreshToken: string,
|
|
58
|
-
baseUrl: string,
|
|
59
|
-
isSetToken?: boolean
|
|
60
|
-
): Promise<string | null> {
|
|
61
|
-
try {
|
|
62
|
-
console.log("Refreshing access token...");
|
|
63
|
-
|
|
64
|
-
const response = await fetch(
|
|
65
|
-
`${baseUrl}/platform/auth/refresh-token`,
|
|
66
|
-
{
|
|
67
|
-
method: "POST",
|
|
68
|
-
credentials: "include",
|
|
69
|
-
headers: { "Content-Type": "application/json" },
|
|
70
|
-
body: JSON.stringify({ refreshToken }),
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
console.log("Refresh Token API Response:", response.status);
|
|
75
|
-
|
|
76
|
-
if (!response.ok) return null;
|
|
77
|
-
|
|
78
|
-
const {
|
|
79
|
-
accessToken,
|
|
80
|
-
refreshToken: newRefreshToken,
|
|
81
|
-
expiresIn,
|
|
82
|
-
refreshExpiresIn,
|
|
83
|
-
}: TokenResponse = await response.json();
|
|
84
|
-
|
|
85
|
-
// Always set new access token
|
|
86
|
-
await setCookieSession("accessToken", accessToken, {
|
|
87
|
-
maxAge: expiresIn,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// IMPORTANT: Save the rotated refresh token
|
|
91
|
-
if (newRefreshToken) {
|
|
92
|
-
await setCookieSession("refreshToken", newRefreshToken, {
|
|
93
|
-
maxAge: refreshExpiresIn,
|
|
94
|
-
});
|
|
95
|
-
console.log("Refresh token rotated & updated.");
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
console.log(" Access token refreshed successfully.");
|
|
99
|
-
return accessToken;
|
|
100
|
-
} catch (error) {
|
|
101
|
-
console.error("Failed to refresh access token:", error);
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export async function decodeAccessToken(baseUrl: string,) {
|
|
107
|
-
const accessToken = await getValidAccessToken(baseUrl);
|
|
108
|
-
return accessToken ? jwtDecode(accessToken) : null;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export async function logOut(platformUrl: string,) {
|
|
112
|
-
await clearAllCookieSession();
|
|
113
|
-
console.log("Logging out...");
|
|
114
|
-
redirect(`${platformUrl}/login.html`)
|
|
115
|
-
}
|