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,60 @@
|
|
|
1
|
+
import { Column, ColumnDef, PaginationState, Table } from "@tanstack/react-table";
|
|
2
|
+
import { ActionMenuProps } from "../action-menu/type";
|
|
3
|
+
export interface DataTableProps<TData, TValue> {
|
|
4
|
+
data: TData[];
|
|
5
|
+
columns: DTColumnsProps<TData, TValue>[];
|
|
6
|
+
extraParams?: DTExtraParamsProps;
|
|
7
|
+
onTableReady?: (table: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export type DTColumnsProps<TData, TValue = unknown> = ColumnDef<TData, TValue> & {
|
|
10
|
+
title?: string;
|
|
11
|
+
headerClassName?: string;
|
|
12
|
+
};
|
|
13
|
+
export interface DTExtraParamsProps {
|
|
14
|
+
defaultGroups?: string[];
|
|
15
|
+
grouping?: boolean;
|
|
16
|
+
header?: boolean;
|
|
17
|
+
footer?: boolean;
|
|
18
|
+
defaultTools?: ("columnFilter" | "search" | "filter")[] | boolean;
|
|
19
|
+
extraTools?: any;
|
|
20
|
+
sorting?: boolean;
|
|
21
|
+
paginationBar?: boolean;
|
|
22
|
+
rowsPerPage?: boolean;
|
|
23
|
+
pagination?: boolean;
|
|
24
|
+
numberOfRows?: boolean;
|
|
25
|
+
checkBoxColumn?: boolean;
|
|
26
|
+
checkBoxColumnCallback?: (selectedRows: any[]) => void;
|
|
27
|
+
actionMenu?: DTActionMenuProps;
|
|
28
|
+
groupActionMenu?: DTActionMenuProps;
|
|
29
|
+
pageSize?: number;
|
|
30
|
+
pageIndex?: number;
|
|
31
|
+
pageSizeArray?: number[];
|
|
32
|
+
rowSelection?: boolean;
|
|
33
|
+
onPaginationChange?: (state: PaginationState) => void;
|
|
34
|
+
defaultRowSelection?: (row: any) => boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface DTActionMenuProps {
|
|
37
|
+
items: ActionMenuProps[];
|
|
38
|
+
extraArguments?: any[];
|
|
39
|
+
}
|
|
40
|
+
export interface DataTableViewOptionsProps<TData> {
|
|
41
|
+
table: Table<TData>;
|
|
42
|
+
}
|
|
43
|
+
export interface DTToolBarProps<TData> {
|
|
44
|
+
table: Table<TData>;
|
|
45
|
+
extraParams?: DTExtraParamsProps;
|
|
46
|
+
}
|
|
47
|
+
export interface DataTableFilterProps<TData> {
|
|
48
|
+
table: Table<TData>;
|
|
49
|
+
}
|
|
50
|
+
export interface DataTableFacetedFilterProps<TData, TValue> {
|
|
51
|
+
column: Column<TData, TValue>;
|
|
52
|
+
}
|
|
53
|
+
export interface DataTablePaginationProps<TData> {
|
|
54
|
+
table: Table<TData>;
|
|
55
|
+
extraParams?: DTExtraParamsProps;
|
|
56
|
+
}
|
|
57
|
+
export interface DragDropHeaderProp {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
parentDivProps?: any;
|
|
4
|
+
option?: Record<string | number, any>;
|
|
5
|
+
style?: Record<string, string>;
|
|
6
|
+
settings?: Record<string, any>;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
theme?: string | object | null;
|
|
9
|
+
isConfigurable?: boolean;
|
|
10
|
+
resizeKey?: null | boolean | number | string;
|
|
11
|
+
onClick?: (...args: any) => void;
|
|
12
|
+
onConfigure?: (...args: any) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const EChart: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
|
|
4
|
+
import { getInstanceByDom, init } from 'echarts';
|
|
5
|
+
function validateOption(option) {
|
|
6
|
+
if (option === undefined || option === null || typeof option !== 'object') {
|
|
7
|
+
option = {};
|
|
8
|
+
}
|
|
9
|
+
const validatedOption = Object.assign({}, option);
|
|
10
|
+
if (validatedOption.toolbox === undefined ||
|
|
11
|
+
validatedOption.toolbox === null ||
|
|
12
|
+
typeof validatedOption.toolbox !== 'object') {
|
|
13
|
+
validatedOption.toolbox = {};
|
|
14
|
+
}
|
|
15
|
+
if (validatedOption.toolbox.feature === undefined ||
|
|
16
|
+
validatedOption.toolbox.feature === null ||
|
|
17
|
+
typeof validatedOption.toolbox.feature !== 'object') {
|
|
18
|
+
validatedOption.toolbox.feature = {};
|
|
19
|
+
}
|
|
20
|
+
return validatedOption;
|
|
21
|
+
}
|
|
22
|
+
export const EChart = forwardRef(({ parentDivProps = {}, option = {}, style = {}, settings = {}, loading = true, theme, isConfigurable = false, resizeKey, onClick = () => { }, onConfigure = () => { } }, ref) => {
|
|
23
|
+
const chartRef = useRef(null);
|
|
24
|
+
const chartInstanceRef = useRef(null);
|
|
25
|
+
const validatedOption = validateOption(option);
|
|
26
|
+
if (isConfigurable) {
|
|
27
|
+
validatedOption.toolbox.feature = Object.assign(Object.assign({}, validatedOption.toolbox.feature), { myConfigureChartTool: {
|
|
28
|
+
show: true,
|
|
29
|
+
title: 'Configure Chart',
|
|
30
|
+
icon: 'image://data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXNldHRpbmdzLTIiPjxwYXRoIGQ9Ik0yMCA3aC05Ii8+PHBhdGggZD0iTTE0IDE3SDUiLz48Y2lyY2xlIGN4PSIxNyIgY3k9IjE3IiByPSIzIi8+PGNpcmNsZSBjeD0iNyIgY3k9IjciIHI9IjMiLz48L3N2Zz4=',
|
|
31
|
+
onclick: () => onConfigure === null || onConfigure === void 0 ? void 0 : onConfigure()
|
|
32
|
+
} });
|
|
33
|
+
}
|
|
34
|
+
useImperativeHandle(ref, () => {
|
|
35
|
+
return {
|
|
36
|
+
getChartObject: () => {
|
|
37
|
+
return chartRef.current ? getInstanceByDom(chartRef.current) : null;
|
|
38
|
+
},
|
|
39
|
+
setOption: (validatedOption, settings) => {
|
|
40
|
+
if (!chartRef.current) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
44
|
+
chart === null || chart === void 0 ? void 0 : chart.setOption(validatedOption, settings);
|
|
45
|
+
},
|
|
46
|
+
resize: (secondResizeDelay = 0) => {
|
|
47
|
+
if (!chartRef.current) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
51
|
+
chart === null || chart === void 0 ? void 0 : chart.resize();
|
|
52
|
+
if (secondResizeDelay) {
|
|
53
|
+
setTimeout(() => chart === null || chart === void 0 ? void 0 : chart.resize(), secondResizeDelay);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
loadingVisible: (visibility) => {
|
|
57
|
+
if (!chartRef.current) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
61
|
+
visibility ? chart === null || chart === void 0 ? void 0 : chart.showLoading() : chart === null || chart === void 0 ? void 0 : chart.hideLoading();
|
|
62
|
+
},
|
|
63
|
+
dispose: () => {
|
|
64
|
+
if (!chartRef.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
68
|
+
chart === null || chart === void 0 ? void 0 : chart.dispose();
|
|
69
|
+
},
|
|
70
|
+
on: (eventName, callback) => {
|
|
71
|
+
if (!chartRef.current) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const chart = getInstanceByDom(chartRef.current);
|
|
75
|
+
chart === null || chart === void 0 ? void 0 : chart.on(eventName, callback);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (chartRef.current) {
|
|
81
|
+
chartInstanceRef.current = init(chartRef.current, theme);
|
|
82
|
+
}
|
|
83
|
+
const resizeCallback = () => { var _a, _b; return (_b = (_a = chartInstanceRef.current) === null || _a === void 0 ? void 0 : _a.resize) === null || _b === void 0 ? void 0 : _b.call(_a); };
|
|
84
|
+
window.addEventListener('resize', resizeCallback);
|
|
85
|
+
return () => {
|
|
86
|
+
if (chartInstanceRef.current) {
|
|
87
|
+
chartInstanceRef.current.dispose();
|
|
88
|
+
chartInstanceRef.current = null;
|
|
89
|
+
}
|
|
90
|
+
window.removeEventListener('resize', resizeCallback);
|
|
91
|
+
};
|
|
92
|
+
}, [theme]);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (chartInstanceRef.current) {
|
|
95
|
+
chartInstanceRef.current.setOption(validatedOption, settings);
|
|
96
|
+
}
|
|
97
|
+
if (chartInstanceRef.current) {
|
|
98
|
+
chartInstanceRef.current.on('click', onClick);
|
|
99
|
+
}
|
|
100
|
+
}, [option, settings, theme]);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (chartInstanceRef.current) {
|
|
103
|
+
chartInstanceRef.current.resize();
|
|
104
|
+
}
|
|
105
|
+
}, [resizeKey]);
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (chartInstanceRef.current) {
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
var _a;
|
|
110
|
+
(_a = chartInstanceRef.current) === null || _a === void 0 ? void 0 : _a.resize();
|
|
111
|
+
}, 500);
|
|
112
|
+
}
|
|
113
|
+
}, []);
|
|
114
|
+
return (_jsx("div", Object.assign({ ref: chartRef }, parentDivProps, { style: Object.assign({ width: '100%', height: '100%' }, style) })));
|
|
115
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FileInput({ tooltipContent, fileNamePlaceholder, fileName, onFileNameChange, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { useRef } from 'react';
|
|
14
|
+
import { Upload } from 'lucide-react';
|
|
15
|
+
import { Input } from '../../shadcn/input';
|
|
16
|
+
import { IconButtonWithTooltip } from '../buttons';
|
|
17
|
+
export function FileInput(_a) {
|
|
18
|
+
var { tooltipContent, fileNamePlaceholder, fileName, onFileNameChange } = _a, props = __rest(_a, ["tooltipContent", "fileNamePlaceholder", "fileName", "onFileNameChange"]);
|
|
19
|
+
const inputRef = useRef(null);
|
|
20
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: 'flex', children: [_jsx(Input, Object.assign({ ref: inputRef, type: "file", className: "hidden" }, props)), _jsx("div", { className: 'mx-1' }), _jsx(Input, { className: 'rounded-e-none', placeholder: fileNamePlaceholder, onChange: (...args) => onFileNameChange === null || onFileNameChange === void 0 ? void 0 : onFileNameChange(...args), value: fileName }), _jsx(IconButtonWithTooltip, { tooltipContent: tooltipContent || "Browse File", onClick: () => { var _a; return (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, className: 'border-s-0 rounded-s-none', children: _jsx(Upload, {}) })] }) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface FileUploaderProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
isDrag?: boolean;
|
|
4
|
+
onFileSelect: (fileObj: any) => Promise<any> | void;
|
|
5
|
+
}
|
|
6
|
+
export declare const convertFileToObject: (file: File) => Promise<{
|
|
7
|
+
message: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
size: number;
|
|
10
|
+
type: string;
|
|
11
|
+
lastModified: number;
|
|
12
|
+
base64: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function FileUploader({ label, isDrag, onFileSelect, }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function getImageFromObject(obj: any): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { UploadCloud, FileUp } from "lucide-react";
|
|
5
|
+
// --- Helper: Convert File to Object with Base64 ---
|
|
6
|
+
export const convertFileToObject = async (file) => {
|
|
7
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
8
|
+
const base64 = btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)));
|
|
9
|
+
return {
|
|
10
|
+
message: "File processed successfully",
|
|
11
|
+
fileName: file.name,
|
|
12
|
+
size: file.size,
|
|
13
|
+
type: file.type,
|
|
14
|
+
lastModified: file.lastModified,
|
|
15
|
+
base64: base64,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export function FileUploader({ label = "Upload File", isDrag = false, onFileSelect, }) {
|
|
19
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
20
|
+
const handleFile = async (file) => {
|
|
21
|
+
if (!file)
|
|
22
|
+
return;
|
|
23
|
+
const fileObj = await convertFileToObject(file); // convert to object
|
|
24
|
+
await onFileSelect(fileObj); // pass object to parent
|
|
25
|
+
};
|
|
26
|
+
// ---- DRAG HANDLERS ----
|
|
27
|
+
const handleDrop = (e) => {
|
|
28
|
+
var _a;
|
|
29
|
+
if (!isDrag)
|
|
30
|
+
return;
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
setIsDragging(false);
|
|
33
|
+
const file = (_a = e.dataTransfer.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
34
|
+
if (file)
|
|
35
|
+
handleFile(file);
|
|
36
|
+
};
|
|
37
|
+
const handleDragOver = (e) => {
|
|
38
|
+
if (!isDrag)
|
|
39
|
+
return;
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
setIsDragging(true);
|
|
42
|
+
};
|
|
43
|
+
const handleDragLeave = () => {
|
|
44
|
+
if (!isDrag)
|
|
45
|
+
return;
|
|
46
|
+
setIsDragging(false);
|
|
47
|
+
};
|
|
48
|
+
const handleInputChange = (e) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
51
|
+
if (file)
|
|
52
|
+
handleFile(file);
|
|
53
|
+
};
|
|
54
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [_jsx("label", { className: "text-sm font-medium", children: label }), _jsx("input", { type: "file", id: "fileInput", className: "hidden", onChange: handleInputChange }), isDrag ? (_jsx("div", { className: `border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition
|
|
55
|
+
${isDragging ? "border-blue-600 bg-blue-50" : "border-gray-300"}
|
|
56
|
+
`, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: () => { var _a; return (_a = document.getElementById("fileInput")) === null || _a === void 0 ? void 0 : _a.click(); }, children: _jsxs("div", { className: "flex flex-col items-center gap-3", children: [_jsx(UploadCloud, { className: "w-10 h-10 text-blue-600" }), _jsxs("p", { className: "text-gray-600", children: ["Drag & drop your file here or", " ", _jsx("span", { className: "text-blue-600 underline", children: "browse" })] })] }) })) : (
|
|
57
|
+
// ----- SIMPLE UPLOAD BOX -----
|
|
58
|
+
_jsxs("div", { className: "border rounded-lg p-4 flex flex-col items-center gap-2 cursor-pointer text-center", onClick: () => { var _a; return (_a = document.getElementById("fileInput")) === null || _a === void 0 ? void 0 : _a.click(); }, children: [_jsx(FileUp, { className: "w-8 h-8 text-blue-600" }), _jsx("span", { className: "text-blue-600 underline", children: "Browse File" })] }))] }));
|
|
59
|
+
}
|
|
60
|
+
// --- Helper Function: Recreate Image from File Object ---
|
|
61
|
+
export function getImageFromObject(obj) {
|
|
62
|
+
const byteCharacters = atob(obj.base64);
|
|
63
|
+
const byteNumbers = new Array(byteCharacters.length)
|
|
64
|
+
.fill(0)
|
|
65
|
+
.map((_, i) => byteCharacters.charCodeAt(i));
|
|
66
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
67
|
+
const blob = new Blob([byteArray], { type: obj.type });
|
|
68
|
+
return URL.createObjectURL(blob); // usable in <img src="..." />
|
|
69
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "../../../shadcn/form";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../shadcn/popover";
|
|
4
|
+
import { Button } from "../../../shadcn/button";
|
|
5
|
+
import { cn } from "../../../utils/cn";
|
|
6
|
+
import { Check, ChevronsUpDown } from "lucide-react";
|
|
7
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../../../shadcn/command";
|
|
8
|
+
export function FormComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, }) {
|
|
9
|
+
return (_jsx(_Fragment, { children: _jsx(FormField, { control: formControl, name: name, render: ({ field }) => {
|
|
10
|
+
var _a;
|
|
11
|
+
return (_jsxs(FormItem, { className: "", children: [label && (_jsx(_Fragment, { children: _jsx(FormLabel, { children: label }) })), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, className: "w-full", children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", role: "combobox", className: cn("justify-between", !field.value && "text-muted-foreground"), disabled: disabled == true ||
|
|
12
|
+
(disabled && disabled(...arguments)), children: [field.value
|
|
13
|
+
? ((_a = items.find((item) => item.value === field.value)) === null || _a === void 0 ? void 0 : _a.label) || field.value
|
|
14
|
+
: placeholder, _jsx(ChevronsUpDown, { className: "opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "p-0", align: "start", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: "Search..." }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No items found." }), _jsx(CommandGroup, { children: items.map((item) => (_jsxs(CommandItem, { value: item.value, disabled: (item.disabled == true || (item.disabled && item.disabled(item))), onSelect: (value) => {
|
|
15
|
+
field.onChange(value);
|
|
16
|
+
onSelect && onSelect(value);
|
|
17
|
+
}, children: [(item === null || item === void 0 ? void 0 : item.label) || item.value, _jsx(Check, { className: cn("ml-auto", item.value === field.value
|
|
18
|
+
? "opacity-100"
|
|
19
|
+
: "opacity-0") })] }, item.value))) })] })] }) })] }), formDescription && (_jsx(FormDescription, { children: formDescription })), _jsx(FormMessage, {})] }));
|
|
20
|
+
} }) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Control } from "react-hook-form";
|
|
2
|
+
export interface FormComboboxInputProps {
|
|
3
|
+
formControl: Control<any>;
|
|
4
|
+
name: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
formDescription?: string;
|
|
8
|
+
items: {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
disabled?: boolean | ((item: any) => boolean);
|
|
12
|
+
}[];
|
|
13
|
+
disabled?: boolean | ((...args: any[]) => boolean);
|
|
14
|
+
onSelect?: (value: any) => void;
|
|
15
|
+
value?: string;
|
|
16
|
+
onChange?: (value: any) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function FormComboboxInputWithValue(props: FormComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useController } from "react-hook-form";
|
|
4
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "../../../shadcn/form";
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../shadcn/popover";
|
|
6
|
+
import { Button } from "../../../shadcn/button";
|
|
7
|
+
import { cn } from "../../../utils/cn";
|
|
8
|
+
import { Check, ChevronsUpDown } from "lucide-react";
|
|
9
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../../../shadcn/command";
|
|
10
|
+
export function FormComboboxInputWithValue(props) {
|
|
11
|
+
const { field } = useController({ name: props.name, control: props.formControl });
|
|
12
|
+
// Use the external value if provided, otherwise use the field's value.
|
|
13
|
+
const currentValue = props.value !== undefined ? props.value : field.value;
|
|
14
|
+
return (_jsx(FormField, { control: props.formControl, name: props.name, render: ({ field }) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (_jsxs(FormItem, { className: "", children: [props.label && (_jsxs(_Fragment, { children: [_jsx(FormLabel, { children: props.label }), _jsx("br", {})] })), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, className: "w-full", children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", role: "combobox", className: cn("justify-between", !currentValue && "text-muted-foreground"), disabled: typeof props.disabled === "function" ? props.disabled() : props.disabled, children: [currentValue
|
|
17
|
+
? ((_a = props.items.find((item) => item.value === currentValue)) === null || _a === void 0 ? void 0 : _a.label) || currentValue
|
|
18
|
+
: props.placeholder, _jsx(ChevronsUpDown, { className: "opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "p-0", align: "start", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: "Search..." }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No items found." }), _jsx(CommandGroup, { children: props.items.map((item) => (_jsxs(CommandItem, { value: item.value, disabled: typeof item.disabled === "function"
|
|
19
|
+
? item.disabled(item)
|
|
20
|
+
: item.disabled, onSelect: (value) => {
|
|
21
|
+
field.onChange(value);
|
|
22
|
+
props.onSelect && props.onSelect(value);
|
|
23
|
+
props.onChange && props.onChange(value);
|
|
24
|
+
}, children: [(item === null || item === void 0 ? void 0 : item.label) || item.value, _jsx(Check, { className: cn("ml-auto", item.value === currentValue ? "opacity-100" : "opacity-0") })] }, item.value))) })] })] }) })] }), props.formDescription && (_jsx(FormDescription, { children: props.formDescription })), _jsx(FormMessage, {})] }));
|
|
25
|
+
} }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "../../../shadcn/form";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../shadcn/popover";
|
|
4
|
+
import { Button } from "../../../shadcn/button";
|
|
5
|
+
import { cn } from "../../../utils/cn";
|
|
6
|
+
import { format } from "date-fns";
|
|
7
|
+
import { CalendarIcon } from "lucide-react";
|
|
8
|
+
import { Calendar } from "../../../shadcn/calendar";
|
|
9
|
+
export function FormDateInput({ formControl, name, label, placeholder, dateFormat, calendarDateDisabled, formDescription, disabled, }) {
|
|
10
|
+
return (_jsx(_Fragment, { children: _jsx(FormField, { control: formControl, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [label && (_jsx(_Fragment, { children: _jsx(FormLabel, { children: label }) })), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, className: "w-full", children: _jsx(FormControl, { children: _jsxs(Button, { variant: "outline", className: cn(!field.value && "text-foreground/50"), disabled: disabled, children: [field.value ? (format(field.value, dateFormat || "PPP")) : (_jsx("span", { children: placeholder || "Pick a date" })), _jsx(CalendarIcon, { className: "ml-auto h-4 w-4 opacity-50" })] }) }) }), _jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", selected: field.value, onSelect: field.onChange, disabled: calendarDateDisabled, captionLayout: "dropdown",
|
|
11
|
+
// disabled={(date) =>
|
|
12
|
+
// date > new Date() || date < new Date("1900-01-01")
|
|
13
|
+
// }
|
|
14
|
+
autoFocus: true }) })] }), formDescription && (_jsx(FormDescription, { children: formDescription })), _jsx(FormMessage, {})] })) }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FormFileInput(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '../../../shadcn/form';
|
|
14
|
+
import { Input } from '../../../shadcn/input';
|
|
15
|
+
export function FormInput(_a) {
|
|
16
|
+
var { formControl, label, formDescription, extraFormComponent, name } = _a, inputProps = __rest(_a, ["formControl", "label", "formDescription", "extraFormComponent", "name"]);
|
|
17
|
+
return (_jsx(_Fragment, { children: _jsx(FormField, { control: formControl, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [label && _jsx(FormLabel, { children: label }), _jsx(FormControl, { children: _jsx(Input, Object.assign({}, field, inputProps)) }), extraFormComponent && extraFormComponent(field.value), formDescription && _jsx(FormDescription, { children: formDescription }), _jsx(FormMessage, {})] })) }) }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormComboboxInputProps as BaseFormComboboxInputProps } from "../../form-fields/types";
|
|
2
|
+
interface FormComboboxInputProps extends BaseFormComboboxInputProps {
|
|
3
|
+
defaultOptions?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function FormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, defaultValue, defaultOptions, }: FormComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|