ikoncomponents 1.5.5 → 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/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/shadcn/accordion.tsx +0 -66
- package/templates/default/shadcn/alert-dialog.tsx +0 -179
- package/templates/default/shadcn/alert.tsx +0 -66
- package/templates/default/shadcn/aspect-ratio.tsx +0 -11
- package/templates/default/shadcn/avatar.tsx +0 -53
- package/templates/default/shadcn/badge.tsx +0 -49
- package/templates/default/shadcn/breadcrumb.tsx +0 -109
- package/templates/default/shadcn/button.tsx +0 -64
- package/templates/default/shadcn/calendar.tsx +0 -227
- package/templates/default/shadcn/card.tsx +0 -92
- package/templates/default/shadcn/checkbox.tsx +0 -33
- package/templates/default/shadcn/collapsible.tsx +0 -33
- package/templates/default/shadcn/command.tsx +0 -184
- package/templates/default/shadcn/date-input.tsx +0 -259
- package/templates/default/shadcn/date-range-picker.tsx +0 -103
- package/templates/default/shadcn/dialog.tsx +0 -143
- package/templates/default/shadcn/drawer.tsx +0 -134
- package/templates/default/shadcn/dropdown-menu.tsx +0 -259
- package/templates/default/shadcn/form.tsx +0 -166
- package/templates/default/shadcn/hover-card.tsx +0 -44
- package/templates/default/shadcn/input-otp.tsx +0 -71
- package/templates/default/shadcn/input.tsx +0 -22
- package/templates/default/shadcn/label.tsx +0 -24
- package/templates/default/shadcn/navigation-menu.tsx +0 -195
- package/templates/default/shadcn/popover.tsx +0 -48
- package/templates/default/shadcn/progress.tsx +0 -40
- package/templates/default/shadcn/radio-group.tsx +0 -45
- package/templates/default/shadcn/scroll-area.tsx +0 -58
- package/templates/default/shadcn/select.tsx +0 -184
- package/templates/default/shadcn/separator.tsx +0 -28
- package/templates/default/shadcn/sheet.tsx +0 -139
- package/templates/default/shadcn/sidebar.tsx +0 -726
- package/templates/default/shadcn/skeleton.tsx +0 -15
- package/templates/default/shadcn/slider.tsx +0 -64
- package/templates/default/shadcn/sonner.tsx +0 -25
- package/templates/default/shadcn/switch.tsx +0 -31
- package/templates/default/shadcn/table.tsx +0 -116
- package/templates/default/shadcn/tabs.tsx +0 -67
- package/templates/default/shadcn/textarea.tsx +0 -18
- package/templates/default/shadcn/toggle-group.tsx +0 -83
- package/templates/default/shadcn/toggle.tsx +0 -47
- package/templates/default/shadcn/tooltip.tsx +0 -65
- package/templates/default/shadcn/workflow.tsx +0 -119
- 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
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import ikonBaseApi from "../ikonBaseApi";
|
|
2
|
+
export const mapSoftwareName = async ({ softwareName, version, }) => {
|
|
3
|
+
const result = await ikonBaseApi({
|
|
4
|
+
service: "softwareService",
|
|
5
|
+
operation: "mapSoftwareName",
|
|
6
|
+
arguments_: [softwareName, version],
|
|
7
|
+
});
|
|
8
|
+
return result.data;
|
|
9
|
+
};
|
|
10
|
+
export const createSoftware = async ({ softwareName, softwareDescription, softwareVersion, softwareOwnerAccount, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }) => {
|
|
11
|
+
const result = await ikonBaseApi({
|
|
12
|
+
service: "softwareService",
|
|
13
|
+
operation: "createSoftware",
|
|
14
|
+
arguments_: [
|
|
15
|
+
softwareName,
|
|
16
|
+
softwareDescription,
|
|
17
|
+
softwareVersion,
|
|
18
|
+
softwareOwnerAccount,
|
|
19
|
+
softwareDeveloperAccount,
|
|
20
|
+
softwareManagerAccount,
|
|
21
|
+
softwareAccessibility,
|
|
22
|
+
softwareStatus,
|
|
23
|
+
],
|
|
24
|
+
});
|
|
25
|
+
return result.data;
|
|
26
|
+
};
|
|
27
|
+
export const editSoftware = async ({ softwareId, softwareName, softwareDescription, softwareVersion, softwareDeveloperAccount, softwareManagerAccount, softwareAccessibility, softwareStatus, }) => {
|
|
28
|
+
const result = await ikonBaseApi({
|
|
29
|
+
service: "softwareService",
|
|
30
|
+
operation: "editSoftware",
|
|
31
|
+
arguments_: [
|
|
32
|
+
softwareId,
|
|
33
|
+
softwareName,
|
|
34
|
+
softwareDescription,
|
|
35
|
+
softwareVersion,
|
|
36
|
+
softwareDeveloperAccount,
|
|
37
|
+
softwareManagerAccount,
|
|
38
|
+
softwareAccessibility,
|
|
39
|
+
softwareStatus,
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
return result.data;
|
|
43
|
+
};
|
|
44
|
+
export const getAccessibleSoftwareForUser = async ({ accountId, userId, }) => {
|
|
45
|
+
const result = await ikonBaseApi({
|
|
46
|
+
service: "softwareService",
|
|
47
|
+
operation: "getAccessibleSoftwareForUser",
|
|
48
|
+
arguments_: [userId, accountId],
|
|
49
|
+
});
|
|
50
|
+
return result.data;
|
|
51
|
+
};
|
|
52
|
+
export const getAllSubscribedSoftwaresForClient = async ({ accountId }, isServerApi) => {
|
|
53
|
+
const result = await ikonBaseApi({
|
|
54
|
+
service: "softwareSubscriptionService",
|
|
55
|
+
operation: "getAllSubscribedSoftwaresForClient",
|
|
56
|
+
arguments_: [accountId],
|
|
57
|
+
isServerApi: isServerApi,
|
|
58
|
+
});
|
|
59
|
+
return result.data;
|
|
60
|
+
};
|
|
61
|
+
export const inviteAccountForSoftware = async ({ accountId, softwareId, expirationTime, }) => {
|
|
62
|
+
const result = await ikonBaseApi({
|
|
63
|
+
service: "accountInvitationService",
|
|
64
|
+
operation: "inviteAccountForSoftware",
|
|
65
|
+
arguments_: [accountId, softwareId, expirationTime],
|
|
66
|
+
});
|
|
67
|
+
return result.data;
|
|
68
|
+
};
|
|
69
|
+
export const getAllSentSoftwareInviteRequests = async ({ accountId, }) => {
|
|
70
|
+
const result = await ikonBaseApi({
|
|
71
|
+
service: "accountInvitationService",
|
|
72
|
+
operation: "getAllSentSoftwareInviteRequests",
|
|
73
|
+
arguments_: [accountId],
|
|
74
|
+
});
|
|
75
|
+
return result.data;
|
|
76
|
+
};
|
|
77
|
+
export const getAllReceivedSoftwareInviteRequests = async ({ accountId, }) => {
|
|
78
|
+
const result = await ikonBaseApi({
|
|
79
|
+
service: "accountInvitationService",
|
|
80
|
+
operation: "getAllReceivedSoftwareInviteRequests",
|
|
81
|
+
arguments_: [accountId],
|
|
82
|
+
});
|
|
83
|
+
return result.data;
|
|
84
|
+
};
|
|
85
|
+
export const getAllSoftwareInvitesV2 = async ({ accountId, }) => {
|
|
86
|
+
const result = await ikonBaseApi({
|
|
87
|
+
service: "accountInvitationService",
|
|
88
|
+
operation: "getAllSoftwareInvitesV2",
|
|
89
|
+
arguments_: [accountId],
|
|
90
|
+
});
|
|
91
|
+
return result.data;
|
|
92
|
+
};
|
|
93
|
+
export const acceptInvitationRequestForSoftware = async ({ requestId, shareKey, }) => {
|
|
94
|
+
const result = await ikonBaseApi({
|
|
95
|
+
service: "accountInvitationService",
|
|
96
|
+
operation: "acceptInvitationRequestForSoftware",
|
|
97
|
+
arguments_: [requestId, shareKey],
|
|
98
|
+
});
|
|
99
|
+
return result.data;
|
|
100
|
+
};
|
|
101
|
+
export const cancelInvitationRequestForSoftware = async ({ requestId, }) => {
|
|
102
|
+
const result = await ikonBaseApi({
|
|
103
|
+
service: "accountInvitationService",
|
|
104
|
+
operation: "cancelInvitationRequestForSoftware",
|
|
105
|
+
arguments_: [requestId],
|
|
106
|
+
});
|
|
107
|
+
return result.data;
|
|
108
|
+
};
|
|
109
|
+
export const rejectInvitationRequestForSoftware = async ({ requestId, }) => {
|
|
110
|
+
const result = await ikonBaseApi({
|
|
111
|
+
service: "accountInvitationService",
|
|
112
|
+
operation: "rejectInvitationRequestForSoftware",
|
|
113
|
+
arguments_: [requestId],
|
|
114
|
+
});
|
|
115
|
+
return result.data;
|
|
116
|
+
};
|
|
117
|
+
export const activateSoftwareInviteForAccount = async ({ invitationId, }) => {
|
|
118
|
+
const result = await ikonBaseApi({
|
|
119
|
+
service: "accountInvitationService",
|
|
120
|
+
operation: "activateSoftwareInviteForAccount",
|
|
121
|
+
arguments_: [invitationId],
|
|
122
|
+
});
|
|
123
|
+
return result.data;
|
|
124
|
+
};
|
|
125
|
+
export const deactivateSoftwareInviteForAccount = async ({ invitationId, }) => {
|
|
126
|
+
const result = await ikonBaseApi({
|
|
127
|
+
service: "accountInvitationService",
|
|
128
|
+
operation: "deactivateSoftwareInviteForAccount",
|
|
129
|
+
arguments_: [invitationId],
|
|
130
|
+
});
|
|
131
|
+
return result.data;
|
|
132
|
+
};
|
|
133
|
+
export const getAllPendingInvitationRequestsForUser = async ({ userId, }) => {
|
|
134
|
+
const result = await ikonBaseApi({
|
|
135
|
+
service: "userInvitationService",
|
|
136
|
+
operation: "getAllPendingInvitationRequestsForUser",
|
|
137
|
+
arguments_: [userId],
|
|
138
|
+
});
|
|
139
|
+
return result.data;
|
|
140
|
+
};
|
|
141
|
+
export const getAllInvitationRequestsSentByAccount = async ({ accountId, }) => {
|
|
142
|
+
const result = await ikonBaseApi({
|
|
143
|
+
service: "userInvitationService",
|
|
144
|
+
operation: "getAllInvitationRequestsSentByAccount",
|
|
145
|
+
arguments_: [accountId],
|
|
146
|
+
});
|
|
147
|
+
return result.data;
|
|
148
|
+
};
|
|
149
|
+
export const inviteUserToMyAccount = async ({ accountId, userLogin, }) => {
|
|
150
|
+
const result = await ikonBaseApi({
|
|
151
|
+
service: "userInvitationService",
|
|
152
|
+
operation: "inviteUserToMyAccount",
|
|
153
|
+
arguments_: [accountId, userLogin],
|
|
154
|
+
});
|
|
155
|
+
return result.data;
|
|
156
|
+
};
|
|
157
|
+
export const getMySoftwares = async ({ accountId }) => {
|
|
158
|
+
const result = await ikonBaseApi({
|
|
159
|
+
service: "softwareService",
|
|
160
|
+
operation: "getMySoftwares",
|
|
161
|
+
arguments_: [accountId],
|
|
162
|
+
});
|
|
163
|
+
return result.data;
|
|
164
|
+
};
|
|
165
|
+
export const getMySoftwaresV2 = async ({ accountId, onlyActive = false, }) => {
|
|
166
|
+
const result = await ikonBaseApi({
|
|
167
|
+
service: "softwareService",
|
|
168
|
+
operation: "getMySoftwaresV2",
|
|
169
|
+
arguments_: [accountId, onlyActive],
|
|
170
|
+
});
|
|
171
|
+
return result.data;
|
|
172
|
+
};
|
|
173
|
+
export const getAvailableSoftwaresForAccount = async ({ accountId, }) => {
|
|
174
|
+
const result = await ikonBaseApi({
|
|
175
|
+
service: "softwareService",
|
|
176
|
+
operation: "getAvailableSoftwaresForAccount",
|
|
177
|
+
arguments_: [accountId],
|
|
178
|
+
});
|
|
179
|
+
return result.data;
|
|
180
|
+
};
|
|
181
|
+
export const getSoftwareById = async ({ softwareId, }) => {
|
|
182
|
+
const result = await ikonBaseApi({
|
|
183
|
+
service: "softwareService",
|
|
184
|
+
operation: "getSoftwareById",
|
|
185
|
+
arguments_: [softwareId],
|
|
186
|
+
});
|
|
187
|
+
return result.data;
|
|
188
|
+
};
|
|
189
|
+
export const activateSoftware = async ({ softwareId, }) => {
|
|
190
|
+
const result = await ikonBaseApi({
|
|
191
|
+
service: "softwareService",
|
|
192
|
+
operation: "activateSoftware",
|
|
193
|
+
arguments_: [softwareId],
|
|
194
|
+
});
|
|
195
|
+
return result.data;
|
|
196
|
+
};
|
|
197
|
+
export const deactivateSoftware = async ({ softwareId, }) => {
|
|
198
|
+
const result = await ikonBaseApi({
|
|
199
|
+
service: "softwareService",
|
|
200
|
+
operation: "deactivateSoftware",
|
|
201
|
+
arguments_: [softwareId],
|
|
202
|
+
});
|
|
203
|
+
return result.data;
|
|
204
|
+
};
|
|
205
|
+
export const requestForFinalSubscription = async ({ accountId, userId, softwareId, suggestedDate = null, }) => {
|
|
206
|
+
const result = await ikonBaseApi({
|
|
207
|
+
service: "requestService",
|
|
208
|
+
operation: "requestForFinalSubscription",
|
|
209
|
+
arguments_: [accountId, userId, softwareId, suggestedDate],
|
|
210
|
+
});
|
|
211
|
+
return result.data;
|
|
212
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface mapSoftwareNameProps {
|
|
2
|
+
softwareName: string;
|
|
3
|
+
version: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateSoftwareProps {
|
|
6
|
+
softwareName: string;
|
|
7
|
+
softwareDescription: string;
|
|
8
|
+
softwareVersion: number;
|
|
9
|
+
softwareOwnerAccount: string;
|
|
10
|
+
softwareDeveloperAccount: string;
|
|
11
|
+
softwareManagerAccount: string | null;
|
|
12
|
+
softwareAccessibility: string;
|
|
13
|
+
softwareStatus: string;
|
|
14
|
+
}
|
|
15
|
+
export interface EditSoftwareProps {
|
|
16
|
+
softwareId: string;
|
|
17
|
+
softwareName: string;
|
|
18
|
+
softwareDescription: string;
|
|
19
|
+
softwareVersion: number;
|
|
20
|
+
softwareDeveloperAccount: string;
|
|
21
|
+
softwareManagerAccount: string | null;
|
|
22
|
+
softwareAccessibility: string;
|
|
23
|
+
softwareStatus: string;
|
|
24
|
+
}
|
|
25
|
+
export interface getAllSubscribedSoftwaresForClientProps {
|
|
26
|
+
accountId?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface getAccessibleSoftwareForUserProps {
|
|
29
|
+
accountId?: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface getMySoftwaresProps {
|
|
33
|
+
accountId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface getMySoftwaresV2Props {
|
|
36
|
+
accountId?: string;
|
|
37
|
+
onlyActive?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface getAvailableSoftwaresForAccountProps {
|
|
40
|
+
accountId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface SubscribeSoftwareProps {
|
|
43
|
+
ACCOUNT_ID: string;
|
|
44
|
+
SOFTWARE_ID: string;
|
|
45
|
+
SOFTWARE_NAME: string;
|
|
46
|
+
SOFTWARE_VERSION: number;
|
|
47
|
+
SOFTWARE_DESCRIPTION: string;
|
|
48
|
+
SOFTWARE_OWNER_ID: string;
|
|
49
|
+
SOFTWARE_OWNER_NAME: string;
|
|
50
|
+
SOFTWARE_ACCESSIBILITY: "PUBLIC" | "PRIVATE";
|
|
51
|
+
ACTIVE: boolean;
|
|
52
|
+
PURCHASE_DATE: string;
|
|
53
|
+
EXPIRES_ON: string | null;
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type RadiusValue = 0 | 0.25 | 0.5 | 0.75 | 1;
|
|
3
|
+
interface RadiusContextType {
|
|
4
|
+
radius: RadiusValue;
|
|
5
|
+
setRadius: (radius: RadiusValue) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function RadiusProvider({ children }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const useRadius: () => RadiusContextType;
|
|
11
|
+
export {};
|
package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js}
RENAMED
|
@@ -1,59 +1,35 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
useState
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!mounted) return;
|
|
37
|
-
|
|
38
|
-
const radiusInRem = radius === 0 ? '0rem' : `${radius}rem`;
|
|
39
|
-
document.documentElement.style.setProperty('--radius', radiusInRem);
|
|
40
|
-
localStorage.setItem('app-radius', radius.toString());
|
|
41
|
-
console.log('Radius changed to:', radius, radiusInRem);
|
|
42
|
-
}, [radius, mounted]);
|
|
43
|
-
|
|
44
|
-
const value = useMemo(() => ({ radius, setRadius }), [radius]);
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<RadiusContext.Provider value={value}>
|
|
48
|
-
{children}
|
|
49
|
-
</RadiusContext.Provider>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const useRadius = () => {
|
|
54
|
-
const context = useContext(RadiusContext);
|
|
55
|
-
if (context === undefined) {
|
|
56
|
-
throw new Error('useRadius must be used within a RadiusProvider');
|
|
57
|
-
}
|
|
58
|
-
return context;
|
|
59
|
-
};
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useState, useEffect, useMemo } from 'react';
|
|
4
|
+
const RadiusContext = createContext(undefined);
|
|
5
|
+
export function RadiusProvider({ children }) {
|
|
6
|
+
const [radius, setRadius] = useState(0.5);
|
|
7
|
+
const [mounted, setMounted] = useState(false);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setMounted(true);
|
|
10
|
+
const storedRadius = localStorage.getItem('app-radius');
|
|
11
|
+
if (storedRadius) {
|
|
12
|
+
const parsed = parseFloat(storedRadius);
|
|
13
|
+
if ([0, 0.25, 0.5, 0.75, 1].includes(parsed)) {
|
|
14
|
+
setRadius(parsed);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}, []);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!mounted)
|
|
20
|
+
return;
|
|
21
|
+
const radiusInRem = radius === 0 ? '0rem' : `${radius}rem`;
|
|
22
|
+
document.documentElement.style.setProperty('--radius', radiusInRem);
|
|
23
|
+
localStorage.setItem('app-radius', radius.toString());
|
|
24
|
+
console.log('Radius changed to:', radius, radiusInRem);
|
|
25
|
+
}, [radius, mounted]);
|
|
26
|
+
const value = useMemo(() => ({ radius, setRadius }), [radius]);
|
|
27
|
+
return (_jsx(RadiusContext.Provider, { value: value, children: children }));
|
|
28
|
+
}
|
|
29
|
+
export const useRadius = () => {
|
|
30
|
+
const context = useContext(RadiusContext);
|
|
31
|
+
if (context === undefined) {
|
|
32
|
+
throw new Error('useRadius must be used within a RadiusProvider');
|
|
33
|
+
}
|
|
34
|
+
return context;
|
|
35
|
+
};
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FontName = 'Poppins' | 'Oswald' | 'Outfit';
|
|
3
|
+
interface FontContextType {
|
|
4
|
+
font: FontName;
|
|
5
|
+
setFont: (font: FontName) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function FontProvider({ children }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const useFont: () => FontContextType;
|
|
11
|
+
export {};
|
|
@@ -1,61 +1,37 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
useState
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Outfit: 'var(--font-outfit)',
|
|
39
|
-
};
|
|
40
|
-
document.body.style.fontFamily = fontVariables[font];
|
|
41
|
-
document.documentElement.style.fontFamily = fontVariables[font];
|
|
42
|
-
localStorage.setItem('app-font', font);
|
|
43
|
-
console.log('Font changed to:', font, fontVariables[font]);
|
|
44
|
-
}, [font, mounted]);
|
|
45
|
-
|
|
46
|
-
const value = useMemo(() => ({ font, setFont }), [font]);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<FontContext.Provider value={value}>
|
|
50
|
-
{children}
|
|
51
|
-
</FontContext.Provider>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export const useFont = () => {
|
|
56
|
-
const context = useContext(FontContext);
|
|
57
|
-
if (context === undefined) {
|
|
58
|
-
throw new Error('useFont must be used within a FontProvider');
|
|
59
|
-
}
|
|
60
|
-
return context;
|
|
61
|
-
};
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useState, useEffect, useMemo } from 'react';
|
|
4
|
+
const FontContext = createContext(undefined);
|
|
5
|
+
export function FontProvider({ children }) {
|
|
6
|
+
const [font, setFont] = useState('Poppins');
|
|
7
|
+
const [mounted, setMounted] = useState(false);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setMounted(true);
|
|
10
|
+
const storedFont = localStorage.getItem('app-font');
|
|
11
|
+
if (storedFont && ['Poppins', 'Oswald', 'Outfit'].includes(storedFont)) {
|
|
12
|
+
setFont(storedFont);
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!mounted)
|
|
17
|
+
return;
|
|
18
|
+
const fontVariables = {
|
|
19
|
+
Poppins: 'var(--font-poppins)',
|
|
20
|
+
Oswald: 'var(--font-oswald)',
|
|
21
|
+
Outfit: 'var(--font-outfit)',
|
|
22
|
+
};
|
|
23
|
+
document.body.style.fontFamily = fontVariables[font];
|
|
24
|
+
document.documentElement.style.fontFamily = fontVariables[font];
|
|
25
|
+
localStorage.setItem('app-font', font);
|
|
26
|
+
console.log('Font changed to:', font, fontVariables[font]);
|
|
27
|
+
}, [font, mounted]);
|
|
28
|
+
const value = useMemo(() => ({ font, setFont }), [font]);
|
|
29
|
+
return (_jsx(FontContext.Provider, { value: value, children: children }));
|
|
30
|
+
}
|
|
31
|
+
export const useFont = () => {
|
|
32
|
+
const context = useContext(FontContext);
|
|
33
|
+
if (context === undefined) {
|
|
34
|
+
throw new Error('useFont must be used within a FontProvider');
|
|
35
|
+
}
|
|
36
|
+
return context;
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CookieSessionOptionsProps {
|
|
2
|
+
maxAge?: number;
|
|
3
|
+
expires?: Date;
|
|
4
|
+
}
|
|
5
|
+
export declare function setCookieSession(sessionName: string, data: string, options?: CookieSessionOptionsProps): Promise<void>;
|
|
6
|
+
export declare function getCookieSession(sessionName: string): Promise<string | undefined>;
|
|
7
|
+
export declare function clearCookieSession(sessionName: string): Promise<void>;
|
|
8
|
+
export declare function clearAllCookieSession(): Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { cookies } from "next/headers";
|
|
3
|
+
const cookiePrefix = "ikoncloud_next_";
|
|
4
|
+
export async function setCookieSession(sessionName, data, options) {
|
|
5
|
+
const cookieStore = await cookies();
|
|
6
|
+
cookieStore.set(cookiePrefix + sessionName, data, {
|
|
7
|
+
httpOnly: true,
|
|
8
|
+
sameSite: "lax",
|
|
9
|
+
secure: process.env.NODE_ENV === "production",
|
|
10
|
+
path: "/",
|
|
11
|
+
domain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN,
|
|
12
|
+
expires: options === null || options === void 0 ? void 0 : options.expires,
|
|
13
|
+
maxAge: options === null || options === void 0 ? void 0 : options.maxAge,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export async function getCookieSession(sessionName) {
|
|
17
|
+
var _a;
|
|
18
|
+
const cookieStore = await cookies();
|
|
19
|
+
const cookie = (_a = cookieStore.get(cookiePrefix + sessionName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
20
|
+
return cookie;
|
|
21
|
+
}
|
|
22
|
+
export async function clearCookieSession(sessionName) {
|
|
23
|
+
const cookieStore = await cookies();
|
|
24
|
+
cookieStore.delete(cookiePrefix + sessionName);
|
|
25
|
+
}
|
|
26
|
+
export async function clearAllCookieSession() {
|
|
27
|
+
const cookieStore = await cookies();
|
|
28
|
+
cookieStore.getAll().forEach((cookie) => {
|
|
29
|
+
if (cookie.name.startsWith(cookiePrefix)) {
|
|
30
|
+
cookieStore.delete(cookie.name);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
15
|
+
export function ThemeProvider(_a) {
|
|
16
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
17
|
+
return _jsx(NextThemesProvider, Object.assign({}, props, { children: children }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface AccessTokenOptionsProps {
|
|
2
|
+
isNotLogOutWhenExpire?: boolean;
|
|
3
|
+
platformUrl?: string;
|
|
4
|
+
isSetToken?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function getValidAccessToken(baseUrl: string, options?: AccessTokenOptionsProps): Promise<string | null>;
|
|
7
|
+
export declare function refreshAccessToken(refreshToken: string, baseUrl: string, isSetToken?: boolean): Promise<string | null>;
|
|
8
|
+
export declare function decodeAccessToken(baseUrl: string): Promise<import("jwt-decode").JwtPayload | null>;
|
|
9
|
+
export declare function logOut(platformUrl: string): Promise<void>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
import { redirect } from "next/navigation";
|
|
3
|
+
import { clearAllCookieSession, getCookieSession, setCookieSession, } from "../session/cookieSession";
|
|
4
|
+
import { jwtDecode } from "jwt-decode";
|
|
5
|
+
// Prevent multiple refresh calls at once
|
|
6
|
+
let refreshPromise = null;
|
|
7
|
+
export async function getValidAccessToken(baseUrl, options) {
|
|
8
|
+
const accessToken = await getCookieSession("accessToken");
|
|
9
|
+
console.log("Access Token....:");
|
|
10
|
+
const refreshToken = await getCookieSession("refreshToken");
|
|
11
|
+
console.log("Refresh Token...");
|
|
12
|
+
console.log("Before Return Access Token:...............................................");
|
|
13
|
+
if (accessToken)
|
|
14
|
+
return accessToken;
|
|
15
|
+
console.log("After Return Access Token:...............................................");
|
|
16
|
+
if (refreshToken) {
|
|
17
|
+
console.log("Refreshing access token using refresh token...", refreshToken);
|
|
18
|
+
if (!refreshPromise) {
|
|
19
|
+
refreshPromise = refreshAccessToken(refreshToken, baseUrl, options === null || options === void 0 ? void 0 : options.isSetToken);
|
|
20
|
+
refreshPromise.finally(() => (refreshPromise = null));
|
|
21
|
+
}
|
|
22
|
+
return await refreshPromise;
|
|
23
|
+
}
|
|
24
|
+
if (!(options === null || options === void 0 ? void 0 : options.isNotLogOutWhenExpire) && (options === null || options === void 0 ? void 0 : options.platformUrl)) {
|
|
25
|
+
await logOut(options === null || options === void 0 ? void 0 : options.platformUrl);
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
export async function refreshAccessToken(refreshToken, baseUrl, isSetToken) {
|
|
30
|
+
try {
|
|
31
|
+
console.log("Refreshing access token...");
|
|
32
|
+
const response = await fetch(`${baseUrl}/platform/auth/refresh-token`, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
credentials: "include",
|
|
35
|
+
headers: { "Content-Type": "application/json" },
|
|
36
|
+
body: JSON.stringify({ refreshToken }),
|
|
37
|
+
});
|
|
38
|
+
console.log("Refresh Token API Response:", response.status);
|
|
39
|
+
if (!response.ok)
|
|
40
|
+
return null;
|
|
41
|
+
const { accessToken, refreshToken: newRefreshToken, expiresIn, refreshExpiresIn, } = await response.json();
|
|
42
|
+
// Always set new access token
|
|
43
|
+
await setCookieSession("accessToken", accessToken, {
|
|
44
|
+
maxAge: expiresIn,
|
|
45
|
+
});
|
|
46
|
+
// IMPORTANT: Save the rotated refresh token
|
|
47
|
+
if (newRefreshToken) {
|
|
48
|
+
await setCookieSession("refreshToken", newRefreshToken, {
|
|
49
|
+
maxAge: refreshExpiresIn,
|
|
50
|
+
});
|
|
51
|
+
console.log("Refresh token rotated & updated.");
|
|
52
|
+
}
|
|
53
|
+
console.log(" Access token refreshed successfully.");
|
|
54
|
+
return accessToken;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error("Failed to refresh access token:", error);
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export async function decodeAccessToken(baseUrl) {
|
|
62
|
+
const accessToken = await getValidAccessToken(baseUrl);
|
|
63
|
+
return accessToken ? jwtDecode(accessToken) : null;
|
|
64
|
+
}
|
|
65
|
+
export async function logOut(platformUrl) {
|
|
66
|
+
await clearAllCookieSession();
|
|
67
|
+
console.log("Logging out...");
|
|
68
|
+
redirect(`${platformUrl}/login.html`);
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|