ikoncomponents 1.5.8 → 1.5.10
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/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 +18 -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,95 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import React, { createContext, ReactNode, useContext, useEffect, useState } from 'react'
|
|
4
|
-
import { CropperFormWithModal } from './cropper-form-with-modal'
|
|
5
|
-
import { CropperUploadImagesInfoProps, uploadedImagesToCropperImgObj } from './utils';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface ImageCropperContextProps {
|
|
9
|
-
originalImage: OriginalImageProps;
|
|
10
|
-
setOriginalImage: (originalImage: OriginalImageProps) => void;
|
|
11
|
-
aspectRatioWiseImages: AspectRatioWiseImagesProps;
|
|
12
|
-
setAspectRatioWiseImages: (aspectRatioWiseImages: AspectRatioWiseImagesProps) => void;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface AspectRatioWiseImagesProps {
|
|
17
|
-
landscape: string | null;
|
|
18
|
-
potrait: string | null;
|
|
19
|
-
icon: string | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface OriginalImageProps {
|
|
23
|
-
image: string | File | null;
|
|
24
|
-
name?: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ImageCropperProps {
|
|
29
|
-
children: ReactNode,
|
|
30
|
-
uploadedImages: CropperUploadImagesInfoProps | null,
|
|
31
|
-
onCropperChange: (originalImage: OriginalImageProps, aspectRatioWiseImages: AspectRatioWiseImagesProps) => void;
|
|
32
|
-
modalOpen?: boolean;
|
|
33
|
-
onModalOpenChange?: (open: boolean) => void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const ImageCropperContext = createContext<ImageCropperContextProps | undefined>(undefined)
|
|
37
|
-
|
|
38
|
-
export function ImageCropperProvider({ children, uploadedImages, onCropperChange, modalOpen, onModalOpenChange }: ImageCropperProps) {
|
|
39
|
-
|
|
40
|
-
const [aspectRatioWiseImages, setAspectRatioWiseImages] = useState<AspectRatioWiseImagesProps>({
|
|
41
|
-
landscape: null,
|
|
42
|
-
potrait: null,
|
|
43
|
-
icon: null
|
|
44
|
-
});
|
|
45
|
-
const [originalImage, setOriginalImage] = useState<OriginalImageProps>({
|
|
46
|
-
image: null,
|
|
47
|
-
name: "",
|
|
48
|
-
description: "",
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
async function updateCropperImages() {
|
|
53
|
-
if (!uploadedImages) return; // Prevent unnecessary processing
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
const res = await uploadedImagesToCropperImgObj(uploadedImages);
|
|
57
|
-
if (res) {
|
|
58
|
-
// Check if state is different before updating
|
|
59
|
-
setOriginalImage((prev) =>
|
|
60
|
-
JSON.stringify(prev) === JSON.stringify(res.originalImage) ? prev : res.originalImage
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
setAspectRatioWiseImages((prev) =>
|
|
64
|
-
JSON.stringify(prev) === JSON.stringify(res.aspectRatioWiseImages) ? prev : res.aspectRatioWiseImages
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
} catch (error) {
|
|
68
|
-
console.error("Error processing uploaded images:", error);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
updateCropperImages();
|
|
73
|
-
}, [uploadedImages]); // Runs only when `uploadedImages` changes
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<ImageCropperContext.Provider value={{
|
|
78
|
-
originalImage,
|
|
79
|
-
setOriginalImage,
|
|
80
|
-
aspectRatioWiseImages,
|
|
81
|
-
setAspectRatioWiseImages
|
|
82
|
-
}}>
|
|
83
|
-
{children}
|
|
84
|
-
{modalOpen && onModalOpenChange && <CropperFormWithModal open={modalOpen} onOpenChange={onModalOpenChange} onCropperChange={onCropperChange} />}
|
|
85
|
-
</ImageCropperContext.Provider>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export const useImageCropper = (): ImageCropperContextProps => {
|
|
90
|
-
const context = useContext(ImageCropperContext);
|
|
91
|
-
if (!context) {
|
|
92
|
-
throw new Error("useImageCropper must be used within a ImageCropperProvider");
|
|
93
|
-
}
|
|
94
|
-
return context;
|
|
95
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
base64FileUpload,
|
|
3
|
-
singleFileUpload,
|
|
4
|
-
} from "../../../utils/api/file-upload";
|
|
5
|
-
import { AspectRatioWiseImagesProps, OriginalImageProps } from "..";
|
|
6
|
-
import { FileinfoProps } from "../../../utils/api/file-upload/type";
|
|
7
|
-
import { getResourceUrl } from "../../../utils/actions/common/utils";
|
|
8
|
-
|
|
9
|
-
export interface CropperUploadImagesInfoProps {
|
|
10
|
-
originalImageInfo?: FileinfoProps | null;
|
|
11
|
-
imageName?: string;
|
|
12
|
-
imageDescription?: string;
|
|
13
|
-
landscapeImageInfo?: FileinfoProps | null;
|
|
14
|
-
portaitImageInfo?: FileinfoProps | null;
|
|
15
|
-
iconImageInfo?: FileinfoProps | null;
|
|
16
|
-
}
|
|
17
|
-
export interface UploadedImagesToCropperImgObjProps {
|
|
18
|
-
originalImage: OriginalImageProps;
|
|
19
|
-
aspectRatioWiseImages: AspectRatioWiseImagesProps;
|
|
20
|
-
}
|
|
21
|
-
export async function imageCropperFilesUpload(
|
|
22
|
-
originalImage: OriginalImageProps,
|
|
23
|
-
aspectRatioWiseImages?: AspectRatioWiseImagesProps,
|
|
24
|
-
resourceId?: string
|
|
25
|
-
): Promise<CropperUploadImagesInfoProps | null> {
|
|
26
|
-
if (!originalImage.image) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const originalImageInfo = await singleFileUpload(
|
|
31
|
-
originalImage.image as File,
|
|
32
|
-
resourceId
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const cropperUploadImagesInfo: CropperUploadImagesInfoProps = {
|
|
36
|
-
originalImageInfo: originalImageInfo,
|
|
37
|
-
imageName: originalImage.name,
|
|
38
|
-
imageDescription: originalImage.description,
|
|
39
|
-
landscapeImageInfo: null,
|
|
40
|
-
portaitImageInfo: null,
|
|
41
|
-
iconImageInfo: null,
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
if (aspectRatioWiseImages) {
|
|
45
|
-
if (aspectRatioWiseImages.landscape) {
|
|
46
|
-
try {
|
|
47
|
-
cropperUploadImagesInfo["landscapeImageInfo"] = await base64FileUpload(
|
|
48
|
-
aspectRatioWiseImages.landscape,
|
|
49
|
-
originalImage.name + "_L.webp",
|
|
50
|
-
"image/webp"
|
|
51
|
-
);
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error(error);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (aspectRatioWiseImages.potrait) {
|
|
57
|
-
try {
|
|
58
|
-
cropperUploadImagesInfo["portaitImageInfo"] = await base64FileUpload(
|
|
59
|
-
aspectRatioWiseImages.potrait,
|
|
60
|
-
originalImage.name + "_P.webp",
|
|
61
|
-
"image/webp"
|
|
62
|
-
);
|
|
63
|
-
} catch (error) {
|
|
64
|
-
console.error(error);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (aspectRatioWiseImages.icon) {
|
|
68
|
-
try {
|
|
69
|
-
cropperUploadImagesInfo["iconImageInfo"] = await base64FileUpload(
|
|
70
|
-
aspectRatioWiseImages.icon,
|
|
71
|
-
originalImage.name + "_I.webp",
|
|
72
|
-
"image/webp"
|
|
73
|
-
);
|
|
74
|
-
} catch (error) {
|
|
75
|
-
console.error(error);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return cropperUploadImagesInfo;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export async function uploadedImagesToCropperImgObj(
|
|
84
|
-
uploadedImages: CropperUploadImagesInfoProps | null
|
|
85
|
-
): Promise<UploadedImagesToCropperImgObjProps | null> {
|
|
86
|
-
if (!uploadedImages) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const originalImageUrl = uploadedImages.originalImageInfo
|
|
91
|
-
? await getResourceUrl(uploadedImages.originalImageInfo)
|
|
92
|
-
: null;
|
|
93
|
-
const landscapeImageUrl = uploadedImages.landscapeImageInfo
|
|
94
|
-
? await getResourceUrl(uploadedImages.landscapeImageInfo)
|
|
95
|
-
: null;
|
|
96
|
-
const portaitImageUrl = uploadedImages.portaitImageInfo
|
|
97
|
-
? await getResourceUrl(uploadedImages.portaitImageInfo)
|
|
98
|
-
: null;
|
|
99
|
-
const iconImageUrl = uploadedImages.iconImageInfo
|
|
100
|
-
? await getResourceUrl(uploadedImages.iconImageInfo)
|
|
101
|
-
: null;
|
|
102
|
-
|
|
103
|
-
const obj: UploadedImagesToCropperImgObjProps = {
|
|
104
|
-
originalImage: {
|
|
105
|
-
image: originalImageUrl,
|
|
106
|
-
name: uploadedImages.imageName,
|
|
107
|
-
description: uploadedImages.imageDescription,
|
|
108
|
-
},
|
|
109
|
-
aspectRatioWiseImages: {
|
|
110
|
-
landscape: landscapeImageUrl,
|
|
111
|
-
potrait: portaitImageUrl,
|
|
112
|
-
icon: iconImageUrl,
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
return obj;
|
|
117
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cn } from "../../utils/cn";
|
|
4
|
-
|
|
5
|
-
export interface ISVGProps extends React.SVGProps<SVGSVGElement> {
|
|
6
|
-
size?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface LoadingSpinnerProps extends ISVGProps {
|
|
11
|
-
visible?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const LoadingSpinner = ({
|
|
15
|
-
size = 48,
|
|
16
|
-
className,
|
|
17
|
-
visible = true,
|
|
18
|
-
...props
|
|
19
|
-
}: LoadingSpinnerProps) => {
|
|
20
|
-
if (!visible) return null;
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div className="h-full w-full">
|
|
24
|
-
<div className="absolute inset-0 flex justify-center items-center z-50">
|
|
25
|
-
<svg
|
|
26
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
width={size}
|
|
28
|
-
height={size}
|
|
29
|
-
{...props}
|
|
30
|
-
viewBox="0 0 24 24"
|
|
31
|
-
fill="none"
|
|
32
|
-
stroke="currentColor"
|
|
33
|
-
strokeWidth="2"
|
|
34
|
-
strokeLinecap="round"
|
|
35
|
-
strokeLinejoin="round"
|
|
36
|
-
className={cn("animate-spin", className)}
|
|
37
|
-
>
|
|
38
|
-
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
39
|
-
</svg>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext, useState, useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
interface RefreshContextType {
|
|
4
|
-
refresh: () => void;
|
|
5
|
-
refreshCounter: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const RefreshContext = createContext<RefreshContextType | undefined>(undefined);
|
|
9
|
-
|
|
10
|
-
export function RefreshProvider({ children }: { children: React.ReactNode }) {
|
|
11
|
-
const [refreshCounter, setRefreshCounter] = useState(0);
|
|
12
|
-
|
|
13
|
-
const refresh = useCallback(() => {
|
|
14
|
-
setRefreshCounter((prev) => prev + 1);
|
|
15
|
-
}, []);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<RefreshContext.Provider value={{ refresh, refreshCounter }}>
|
|
19
|
-
{children}
|
|
20
|
-
</RefreshContext.Provider>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function useRefresh() {
|
|
25
|
-
const context = useContext(RefreshContext);
|
|
26
|
-
if (context === undefined) {
|
|
27
|
-
throw new Error('useRefresh must be used within a RefreshProvider');
|
|
28
|
-
}
|
|
29
|
-
return context;
|
|
30
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import { createContext, useContext, useState, ReactNode } from 'react';
|
|
3
|
-
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
export interface SidebarNavSubItem {
|
|
6
|
-
title: string;
|
|
7
|
-
url: string;
|
|
8
|
-
isActive?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SidebarNavItem {
|
|
12
|
-
title: string;
|
|
13
|
-
url: string;
|
|
14
|
-
icon?: LucideIcon;
|
|
15
|
-
isActive?: boolean;
|
|
16
|
-
default?: boolean;
|
|
17
|
-
items?: SidebarNavSubItem[];
|
|
18
|
-
header?: ReactNode;
|
|
19
|
-
footer?: ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface SidebarNavContextType {
|
|
23
|
-
navItems: SidebarNavItem[];
|
|
24
|
-
header: ReactNode | null;
|
|
25
|
-
footer: ReactNode | null;
|
|
26
|
-
setNavItems: (items: SidebarNavItem[]) => void;
|
|
27
|
-
addNavItem: (item: SidebarNavItem) => void;
|
|
28
|
-
removeNavItem: (title: string) => void;
|
|
29
|
-
updateNavItem: (title: string, updates: Partial<SidebarNavItem>) => void;
|
|
30
|
-
clearNavItems: () => void;
|
|
31
|
-
setSidebarHeader: (header: ReactNode) => void;
|
|
32
|
-
setSidebarFooter: (footer: ReactNode) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const SidebarNavContext = createContext<SidebarNavContextType | undefined>(undefined);
|
|
36
|
-
|
|
37
|
-
export function SidebarNavProvider({ children }: { children: ReactNode }) {
|
|
38
|
-
const [navItems, setNavItems] = useState<SidebarNavItem[]>([]);
|
|
39
|
-
const [header, setHeader] = useState<ReactNode | null>(null);
|
|
40
|
-
const [footer, setFooter] = useState<ReactNode | null>(null);
|
|
41
|
-
|
|
42
|
-
const addNavItem = (item: SidebarNavItem) => {
|
|
43
|
-
setNavItems((prevItems) => {
|
|
44
|
-
const exists = prevItems.some((navItem) => navItem.title === item.title);
|
|
45
|
-
if (exists) {
|
|
46
|
-
return prevItems.map((navItem) =>
|
|
47
|
-
navItem.title === item.title ? { ...navItem, ...item } : navItem
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
return [...prevItems, item];
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const removeNavItem = (title: string) => {
|
|
55
|
-
setNavItems((prevItems) => prevItems.filter((item) => item.title !== title));
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const updateNavItem = (title: string, updates: Partial<SidebarNavItem>) => {
|
|
59
|
-
setNavItems((prevItems) =>
|
|
60
|
-
prevItems.map((item) =>
|
|
61
|
-
item.title === title ? { ...item, ...updates } : item
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const setSidebarHeader = (header: ReactNode) => {
|
|
67
|
-
setHeader(header);
|
|
68
|
-
};
|
|
69
|
-
const setSidebarFooter = (footer: ReactNode) => {
|
|
70
|
-
setFooter(footer);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const clearNavItems = () => {
|
|
74
|
-
setNavItems([]);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<SidebarNavContext.Provider
|
|
79
|
-
value={{
|
|
80
|
-
navItems,
|
|
81
|
-
header,
|
|
82
|
-
footer,
|
|
83
|
-
setNavItems,
|
|
84
|
-
addNavItem,
|
|
85
|
-
removeNavItem,
|
|
86
|
-
updateNavItem,
|
|
87
|
-
clearNavItems,
|
|
88
|
-
setSidebarHeader,
|
|
89
|
-
setSidebarFooter,
|
|
90
|
-
}}
|
|
91
|
-
>
|
|
92
|
-
{children}
|
|
93
|
-
</SidebarNavContext.Provider>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function useSidebarNav() {
|
|
98
|
-
const context = useContext(SidebarNavContext);
|
|
99
|
-
if (!context) {
|
|
100
|
-
throw new Error('useSidebarNav must be used within a SidebarNavProvider');
|
|
101
|
-
}
|
|
102
|
-
return context;
|
|
103
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
Sidebar,
|
|
6
|
-
SidebarContent,
|
|
7
|
-
SidebarFooter,
|
|
8
|
-
SidebarHeader,
|
|
9
|
-
SidebarRail,
|
|
10
|
-
} from "../../shadcn/sidebar";
|
|
11
|
-
import { NavMain } from "./nav-main";
|
|
12
|
-
import { useSidebarNav } from "./SidebarNavContext";
|
|
13
|
-
|
|
14
|
-
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
15
|
-
|
|
16
|
-
const { navItems, header, footer } = useSidebarNav();
|
|
17
|
-
if (!navItems || navItems.length === 0) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Sidebar className="ml-12" collapsible={"offcanvas"} {...props}>
|
|
24
|
-
{header && <SidebarHeader>
|
|
25
|
-
{header}
|
|
26
|
-
</SidebarHeader>}
|
|
27
|
-
<SidebarContent>
|
|
28
|
-
<NavMain />
|
|
29
|
-
</SidebarContent>
|
|
30
|
-
{footer && <SidebarFooter>
|
|
31
|
-
{footer}
|
|
32
|
-
</SidebarFooter>}
|
|
33
|
-
<SidebarRail />
|
|
34
|
-
</Sidebar>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Copyright } from "lucide-react"
|
|
2
|
-
import * as React from "react"
|
|
3
|
-
|
|
4
|
-
export function Footer() {
|
|
5
|
-
return (
|
|
6
|
-
<footer className="ml-12 flex border-t px-4 py-2 justify-center lg:justify-start">
|
|
7
|
-
<div className="flex gap-2 items-center">
|
|
8
|
-
<Copyright className="size-4" />
|
|
9
|
-
<span>Powered By</span>
|
|
10
|
-
<a href="https://keross.com" target="_blank">
|
|
11
|
-
Keross
|
|
12
|
-
</a>
|
|
13
|
-
<span className="">|</span>
|
|
14
|
-
<span id="txtCopyrightYear" className="">
|
|
15
|
-
{new Date().getFullYear()}
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
</footer>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { AppBreadcrumb } from "../app-breadcrumb";
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
import { ThemeToggleBtn } from "../theme-toggle-btn";
|
|
6
|
-
import { Separator } from "../../shadcn/separator";
|
|
7
|
-
import { SidebarTrigger } from "../../shadcn/sidebar";
|
|
8
|
-
import { Bell, LayoutGrid, Play } from "lucide-react";
|
|
9
|
-
import { IconButton, IconButtonWithTooltip, IconTextButton } from "../buttons";
|
|
10
|
-
import { useSidebarNav } from "./SidebarNavContext";
|
|
11
|
-
import Link from "next/link";
|
|
12
|
-
|
|
13
|
-
export function Header({ platformUrl }: { platformUrl: string }) {
|
|
14
|
-
|
|
15
|
-
const { navItems } = useSidebarNav();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<header className="ml-12 flex h-12 border-b shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
|
|
20
|
-
<div className="flex items-center justify-between gap-2 px-4 w-full">
|
|
21
|
-
<div className="flex items-center gap-2">
|
|
22
|
-
{(!navItems || navItems.length === 0) ? <div></div> : <SidebarTrigger className="-ml-1" />}
|
|
23
|
-
{(!navItems || navItems.length === 0) ?
|
|
24
|
-
<div></div> :
|
|
25
|
-
<Separator
|
|
26
|
-
orientation="vertical"
|
|
27
|
-
className="mr-2 data-[orientation=vertical]:h-4"
|
|
28
|
-
/>
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
<AppBreadcrumb />
|
|
32
|
-
</div>
|
|
33
|
-
<div className="ml-auto flex gap-4">
|
|
34
|
-
<IconButtonWithTooltip className="px-2!" tooltipContent={"Notifications"}>
|
|
35
|
-
<Bell />
|
|
36
|
-
</IconButtonWithTooltip>
|
|
37
|
-
<ThemeToggleBtn />
|
|
38
|
-
<Link href={`${platformUrl}/app-store`}>
|
|
39
|
-
<IconTextButton
|
|
40
|
-
variant={"default"}
|
|
41
|
-
>
|
|
42
|
-
<Play />
|
|
43
|
-
App Store
|
|
44
|
-
</IconTextButton>
|
|
45
|
-
</Link>
|
|
46
|
-
{/* <IconButton>
|
|
47
|
-
<LayoutGrid />
|
|
48
|
-
</IconButton> */}
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</header>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react'
|
|
2
|
-
import { MainSidebar } from './main-sidebar'
|
|
3
|
-
import { SidebarInset, SidebarProvider } from '../../shadcn/sidebar'
|
|
4
|
-
import { DialogProvider } from '../alert-dialog/dialog-context'
|
|
5
|
-
import { AppSidebar } from './app-sidebar'
|
|
6
|
-
import { Header } from './header'
|
|
7
|
-
import { Footer } from './footer'
|
|
8
|
-
import { SidebarNavProvider } from './SidebarNavContext'
|
|
9
|
-
|
|
10
|
-
export function MainLayout({
|
|
11
|
-
children,
|
|
12
|
-
baseUrl,
|
|
13
|
-
platformUrl
|
|
14
|
-
}: {
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
baseUrl: string;
|
|
17
|
-
platformUrl: string;
|
|
18
|
-
}) {
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<MainSidebar baseUrl={baseUrl} platformUrl={platformUrl} />
|
|
22
|
-
<SidebarProvider>
|
|
23
|
-
<DialogProvider>
|
|
24
|
-
<SidebarNavProvider>
|
|
25
|
-
<AppSidebar />
|
|
26
|
-
<SidebarInset className="flex flex-col h-screen">
|
|
27
|
-
<Header platformUrl={platformUrl} />
|
|
28
|
-
<div className="flex flex-col gap-4 p-4 pt-0 ml-12 grow overflow-auto scrollbar-hidden">
|
|
29
|
-
{children}
|
|
30
|
-
</div>
|
|
31
|
-
<Footer />
|
|
32
|
-
</SidebarInset>
|
|
33
|
-
</SidebarNavProvider>
|
|
34
|
-
</DialogProvider>
|
|
35
|
-
</SidebarProvider>
|
|
36
|
-
</>
|
|
37
|
-
)
|
|
38
|
-
}
|