ikoncomponents 1.4.7 → 1.4.9
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/commands/init.js +57 -0
- package/dist/index.js +3 -116
- package/dist/utlis/copyDir.js +7 -0
- package/package.json +12 -90
- package/templates/default/hooks/use-mobile.ts +19 -0
- package/templates/default/ikonShade/accordion.tsx +66 -0
- package/templates/default/ikonShade/alert-dialog.tsx +179 -0
- package/templates/default/ikonShade/alert.tsx +66 -0
- package/templates/default/ikonShade/aspect-ratio.tsx +11 -0
- package/templates/default/ikonShade/avatar.tsx +53 -0
- package/templates/default/ikonShade/badge.tsx +49 -0
- package/templates/default/ikonShade/breadcrumb.tsx +109 -0
- package/templates/default/ikonShade/button.tsx +64 -0
- package/templates/default/ikonShade/calendar.tsx +227 -0
- package/templates/default/ikonShade/card.tsx +92 -0
- package/templates/default/ikonShade/checkbox.tsx +33 -0
- package/templates/default/ikonShade/collapsible.tsx +33 -0
- package/templates/default/ikonShade/command.tsx +184 -0
- package/templates/default/ikonShade/date-input.tsx +259 -0
- package/templates/default/ikonShade/date-range-picker.tsx +103 -0
- package/templates/default/ikonShade/dialog.tsx +143 -0
- package/templates/default/ikonShade/drawer.tsx +134 -0
- package/templates/default/ikonShade/dropdown-menu.tsx +259 -0
- package/templates/default/ikonShade/form.tsx +166 -0
- package/templates/default/ikonShade/hover-card.tsx +44 -0
- package/templates/default/ikonShade/input-otp.tsx +71 -0
- package/templates/default/ikonShade/input.tsx +22 -0
- package/templates/default/ikonShade/label.tsx +24 -0
- package/templates/default/ikonShade/navigation-menu.tsx +195 -0
- package/templates/default/ikonShade/popover.tsx +48 -0
- package/templates/default/ikonShade/progress.tsx +40 -0
- package/templates/default/ikonShade/radio-group.tsx +45 -0
- package/templates/default/ikonShade/scroll-area.tsx +58 -0
- package/templates/default/ikonShade/select.tsx +184 -0
- package/templates/default/ikonShade/separator.tsx +28 -0
- package/templates/default/ikonShade/sheet.tsx +139 -0
- package/templates/default/ikonShade/sidebar.tsx +726 -0
- package/templates/default/ikonShade/skeleton.tsx +15 -0
- package/templates/default/ikonShade/slider.tsx +64 -0
- package/templates/default/ikonShade/sonner.tsx +25 -0
- package/templates/default/ikonShade/switch.tsx +31 -0
- package/templates/default/ikonShade/table.tsx +116 -0
- package/templates/default/ikonShade/tabs.tsx +67 -0
- package/templates/default/ikonShade/textarea.tsx +18 -0
- package/templates/default/ikonShade/toggle-group.tsx +83 -0
- package/templates/default/ikonShade/toggle.tsx +47 -0
- package/templates/default/ikonShade/tooltip.tsx +65 -0
- package/templates/default/ikonShade/workflow.tsx +119 -0
- package/templates/default/ikoncomponents/action-menu/index.tsx +108 -0
- package/templates/default/ikoncomponents/action-menu/type.ts +18 -0
- package/templates/default/ikoncomponents/activity-sheet/index.tsx +63 -0
- package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +65 -0
- package/templates/default/ikoncomponents/alert-dialog/index.tsx +80 -0
- package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +68 -0
- package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +222 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +38 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +81 -0
- package/templates/default/ikoncomponents/big-calendar/index.css +879 -0
- package/templates/default/ikoncomponents/big-calendar/index.tsx +59 -0
- package/templates/default/ikoncomponents/big-calendar/type.ts +37 -0
- package/templates/default/ikoncomponents/buttons/index.tsx +127 -0
- package/templates/default/ikoncomponents/combobox-input/index.tsx +75 -0
- package/templates/default/ikoncomponents/combobox-input/type.ts +14 -0
- package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +242 -0
- package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +80 -0
- package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +149 -0
- package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +98 -0
- package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +119 -0
- package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +45 -0
- package/templates/default/ikoncomponents/data-table/function.ts +7 -0
- package/templates/default/ikoncomponents/data-table/index.tsx +549 -0
- package/templates/default/ikoncomponents/data-table/type.ts +75 -0
- package/templates/default/ikoncomponents/e-chart/index.tsx +183 -0
- package/templates/default/ikoncomponents/file-input/index.tsx +27 -0
- package/templates/default/ikoncomponents/fileUpload/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +111 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +80 -0
- package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +9 -0
- package/templates/default/ikoncomponents/form-fields/input/index.tsx +27 -0
- package/{dist/ikoncomponents/form-fields/multi-combobox-input/index.js → templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx} +574 -381
- package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +39 -0
- package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +52 -0
- package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +7 -0
- package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +28 -0
- package/templates/default/ikoncomponents/form-fields/types/index.ts +46 -0
- package/templates/default/ikoncomponents/glowing-effect/index.tsx +171 -0
- package/templates/default/ikoncomponents/icon/index.tsx +22 -0
- package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +19 -0
- package/{dist/ikoncomponents/image-cropper-upload/components/newCropper.js → templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx} +117 -85
- package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +352 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +250 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +32 -0
- package/{dist/ikoncomponents/image-cropper-upload/image-cropper/index.js → templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx} +119 -87
- package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +95 -0
- package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +117 -0
- package/templates/default/ikoncomponents/loading-spinner/index.tsx +43 -0
- package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +30 -0
- package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +103 -0
- package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +36 -0
- package/templates/default/ikoncomponents/main-layout/footer.tsx +21 -0
- package/templates/default/ikoncomponents/main-layout/header.tsx +53 -0
- package/templates/default/ikoncomponents/main-layout/index.tsx +43 -0
- package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +389 -0
- package/templates/default/ikoncomponents/main-layout/nav-main.tsx +103 -0
- package/templates/default/ikoncomponents/multi-combobox/index.tsx +345 -0
- package/templates/default/ikoncomponents/no-data/index.tsx +11 -0
- package/templates/default/ikoncomponents/page-wrapper/index.tsx +30 -0
- package/templates/default/ikoncomponents/password-strength-meter/index.tsx +49 -0
- package/templates/default/ikoncomponents/phone-input/index.tsx +72 -0
- package/templates/default/ikoncomponents/provider-wrapper/index.tsx +32 -0
- package/templates/default/ikoncomponents/search-input/index.tsx +18 -0
- package/templates/default/ikoncomponents/sheet/index.tsx +34 -0
- package/templates/default/ikoncomponents/simple-widget/index.tsx +54 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +34 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +13 -0
- package/templates/default/ikoncomponents/tabs/index.tsx +139 -0
- package/{dist/ikoncomponents/tabs/type.d.ts → templates/default/ikoncomponents/tabs/type.ts} +20 -20
- package/{dist/ikoncomponents/theme-toggle-btn/index.js → templates/default/ikoncomponents/theme-toggle-btn/index.tsx} +189 -118
- package/templates/default/ikoncomponents/title-progress/index.tsx +41 -0
- package/templates/default/ikoncomponents/tooltip/index.tsx +17 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +33 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +279 -0
- package/templates/default/ikoncomponents/upload-tab/index.tsx +237 -0
- package/templates/default/ikoncomponents/widgets/index.tsx +81 -0
- package/templates/default/ikoncomponents/widgets/type.ts +11 -0
- package/templates/default/ikoncomponents/work-in-progress/index.tsx +16 -0
- package/{dist/index.d.ts → templates/default/index.ts} +234 -139
- package/templates/default/styles.css +1159 -0
- package/templates/default/utils/actions/account/index.ts +33 -0
- package/templates/default/utils/actions/account/type.ts +4 -0
- package/{dist/utils/actions/auth/index.js → templates/default/utils/actions/auth/index.ts} +69 -58
- package/templates/default/utils/actions/common/revalidate.ts +18 -0
- package/templates/default/utils/actions/common/type.ts +4 -0
- package/{dist/utils/actions/common/utils.js → templates/default/utils/actions/common/utils.ts} +28 -25
- package/templates/default/utils/actions/software/index.ts +106 -0
- package/templates/default/utils/api/accountService/index.ts +103 -0
- package/templates/default/utils/api/accountService/type.ts +4 -0
- package/templates/default/utils/api/file-upload/index.ts +103 -0
- package/templates/default/utils/api/file-upload/type.ts +8 -0
- package/{dist/utils/api/ikonBaseApi.js → templates/default/utils/api/ikonBaseApi.ts} +132 -104
- package/templates/default/utils/api/loginService/index.ts +108 -0
- package/{dist/utils/api/loginService/type.d.ts → templates/default/utils/api/loginService/type.ts} +35 -32
- package/templates/default/utils/api/softwareService/index.ts +356 -0
- package/templates/default/utils/api/softwareService/type.ts +62 -0
- package/{dist/utils/border-radius-provider.js → templates/default/utils/border-radius-provider.tsx} +59 -35
- package/templates/default/utils/cn.ts +6 -0
- package/{dist/utils/font-provider.js → templates/default/utils/font-provider.tsx} +61 -37
- package/templates/default/utils/session/cookieSession.ts +49 -0
- package/templates/default/utils/theme-provider/index.tsx +11 -0
- package/templates/default/utils/token-management/index.ts +115 -0
- package/templates/default/utils/token-management/types.ts +6 -0
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js +0 -15
- package/dist/ikoncomponents/action-menu/index.d.ts +0 -6
- package/dist/ikoncomponents/action-menu/index.d.ts.map +0 -1
- package/dist/ikoncomponents/action-menu/index.js +0 -42
- package/dist/ikoncomponents/action-menu/type.d.ts +0 -15
- package/dist/ikoncomponents/action-menu/type.d.ts.map +0 -1
- package/dist/ikoncomponents/action-menu/type.js +0 -1
- package/dist/ikoncomponents/activity-sheet/index.d.ts +0 -12
- package/dist/ikoncomponents/activity-sheet/index.d.ts.map +0 -1
- package/dist/ikoncomponents/activity-sheet/index.js +0 -23
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +0 -22
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts.map +0 -1
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +0 -30
- package/dist/ikoncomponents/alert-dialog/index.d.ts +0 -15
- package/dist/ikoncomponents/alert-dialog/index.d.ts.map +0 -1
- package/dist/ikoncomponents/alert-dialog/index.js +0 -20
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +0 -19
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts.map +0 -1
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +0 -43
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +0 -6
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts.map +0 -1
- package/dist/ikoncomponents/app-breadcrumb/index.js +0 -57
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +0 -6
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +0 -16
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +0 -3
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +0 -39
- package/dist/ikoncomponents/big-calendar/index.d.ts +0 -4
- package/dist/ikoncomponents/big-calendar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/index.js +0 -35
- package/dist/ikoncomponents/big-calendar/type.d.ts +0 -32
- package/dist/ikoncomponents/big-calendar/type.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/type.js +0 -1
- package/dist/ikoncomponents/buttons/index.d.ts +0 -19
- package/dist/ikoncomponents/buttons/index.d.ts.map +0 -1
- package/dist/ikoncomponents/buttons/index.js +0 -38
- package/dist/ikoncomponents/combobox-input/index.d.ts +0 -3
- package/dist/ikoncomponents/combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/combobox-input/index.js +0 -18
- package/dist/ikoncomponents/combobox-input/type.d.ts +0 -14
- package/dist/ikoncomponents/combobox-input/type.d.ts.map +0 -1
- package/dist/ikoncomponents/combobox-input/type.js +0 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +0 -22
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts.map +0 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +0 -85
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +0 -22
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +0 -35
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +0 -38
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +0 -13
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +0 -18
- package/dist/ikoncomponents/data-table/function.d.ts +0 -2
- package/dist/ikoncomponents/data-table/function.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/function.js +0 -6
- package/dist/ikoncomponents/data-table/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/index.js +0 -223
- package/dist/ikoncomponents/data-table/type.d.ts +0 -61
- package/dist/ikoncomponents/data-table/type.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/type.js +0 -1
- package/dist/ikoncomponents/e-chart/index.d.ts +0 -16
- package/dist/ikoncomponents/e-chart/index.d.ts.map +0 -1
- package/dist/ikoncomponents/e-chart/index.js +0 -115
- package/dist/ikoncomponents/file-input/index.d.ts +0 -2
- package/dist/ikoncomponents/file-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/file-input/index.js +0 -21
- package/dist/ikoncomponents/fileUpload/index.d.ts +0 -16
- package/dist/ikoncomponents/fileUpload/index.d.ts.map +0 -1
- package/dist/ikoncomponents/fileUpload/index.js +0 -69
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +0 -21
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +0 -19
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +0 -26
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/date-input/index.js +0 -15
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/file-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +0 -7
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/otp-input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/password-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/password-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/password-input/index.js +0 -23
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/phone-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/textarea/index.js +0 -18
- package/dist/ikoncomponents/form-fields/types/index.d.ts +0 -37
- package/dist/ikoncomponents/form-fields/types/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/types/index.js +0 -1
- package/dist/ikoncomponents/glowing-effect/index.d.ts +0 -15
- package/dist/ikoncomponents/glowing-effect/index.d.ts.map +0 -1
- package/dist/ikoncomponents/glowing-effect/index.js +0 -84
- package/dist/ikoncomponents/icon/index.d.ts +0 -9
- package/dist/ikoncomponents/icon/index.d.ts.map +0 -1
- package/dist/ikoncomponents/icon/index.js +0 -23
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +0 -16
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +0 -8
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +0 -145
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +0 -7
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +0 -92
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +0 -7
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +0 -14
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +0 -15
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +0 -28
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/index.js +0 -49
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +0 -17
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +0 -73
- package/dist/ikoncomponents/loading-spinner/index.d.ts +0 -10
- package/dist/ikoncomponents/loading-spinner/index.d.ts.map +0 -1
- package/dist/ikoncomponents/loading-spinner/index.js +0 -19
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +0 -11
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/RefreshContext.js +0 -17
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +0 -34
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +0 -52
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +0 -4
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/app-sidebar.js +0 -24
- package/dist/ikoncomponents/main-layout/footer.d.ts +0 -2
- package/dist/ikoncomponents/main-layout/footer.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/footer.js +0 -5
- package/dist/ikoncomponents/main-layout/header.d.ts +0 -4
- package/dist/ikoncomponents/main-layout/header.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/header.js +0 -15
- package/dist/ikoncomponents/main-layout/index.d.ts +0 -7
- package/dist/ikoncomponents/main-layout/index.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/index.js +0 -12
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +0 -61
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/main-sidebar.js +0 -119
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +0 -12
- package/dist/ikoncomponents/main-layout/nav-main.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/nav-main.js +0 -33
- package/dist/ikoncomponents/multi-combobox/index.d.ts +0 -14
- package/dist/ikoncomponents/multi-combobox/index.d.ts.map +0 -1
- package/dist/ikoncomponents/multi-combobox/index.js +0 -202
- package/dist/ikoncomponents/no-data/index.d.ts +0 -4
- package/dist/ikoncomponents/no-data/index.d.ts.map +0 -1
- package/dist/ikoncomponents/no-data/index.js +0 -5
- package/dist/ikoncomponents/page-wrapper/index.d.ts +0 -10
- package/dist/ikoncomponents/page-wrapper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/page-wrapper/index.js +0 -7
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +0 -4
- package/dist/ikoncomponents/password-strength-meter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/password-strength-meter/index.js +0 -40
- package/dist/ikoncomponents/phone-input/index.d.ts +0 -2
- package/dist/ikoncomponents/phone-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/phone-input/index.js +0 -41
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +0 -7
- package/dist/ikoncomponents/provider-wrapper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/provider-wrapper/index.js +0 -10
- package/dist/ikoncomponents/search-input/index.d.ts +0 -2
- package/dist/ikoncomponents/search-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/search-input/index.js +0 -19
- package/dist/ikoncomponents/sheet/index.d.ts +0 -11
- package/dist/ikoncomponents/sheet/index.d.ts.map +0 -1
- package/dist/ikoncomponents/sheet/index.js +0 -6
- package/dist/ikoncomponents/simple-widget/index.d.ts +0 -15
- package/dist/ikoncomponents/simple-widget/index.d.ts.map +0 -1
- package/dist/ikoncomponents/simple-widget/index.js +0 -14
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +0 -6
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts.map +0 -1
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +0 -6
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +0 -4
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts.map +0 -1
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +0 -5
- package/dist/ikoncomponents/tabs/index.d.ts +0 -3
- package/dist/ikoncomponents/tabs/index.d.ts.map +0 -1
- package/dist/ikoncomponents/tabs/index.js +0 -50
- package/dist/ikoncomponents/tabs/type.d.ts.map +0 -1
- package/dist/ikoncomponents/tabs/type.js +0 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +0 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts.map +0 -1
- package/dist/ikoncomponents/title-progress/index.d.ts +0 -13
- package/dist/ikoncomponents/title-progress/index.d.ts.map +0 -1
- package/dist/ikoncomponents/title-progress/index.js +0 -10
- package/dist/ikoncomponents/tooltip/index.d.ts +0 -6
- package/dist/ikoncomponents/tooltip/index.d.ts.map +0 -1
- package/dist/ikoncomponents/tooltip/index.js +0 -5
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.d.ts +0 -10
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.d.ts.map +0 -1
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.js +0 -24
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +0 -32
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts.map +0 -1
- package/dist/ikoncomponents/twolevel-dropdown/index.js +0 -143
- package/dist/ikoncomponents/upload-tab/index.d.ts +0 -2
- package/dist/ikoncomponents/upload-tab/index.d.ts.map +0 -1
- package/dist/ikoncomponents/upload-tab/index.js +0 -92
- package/dist/ikoncomponents/widgets/index.d.ts +0 -3
- package/dist/ikoncomponents/widgets/index.d.ts.map +0 -1
- package/dist/ikoncomponents/widgets/index.js +0 -14
- package/dist/ikoncomponents/widgets/type.d.ts +0 -11
- package/dist/ikoncomponents/widgets/type.d.ts.map +0 -1
- package/dist/ikoncomponents/widgets/type.js +0 -2
- package/dist/ikoncomponents/work-in-progress/index.d.ts +0 -2
- package/dist/ikoncomponents/work-in-progress/index.d.ts.map +0 -1
- package/dist/ikoncomponents/work-in-progress/index.js +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/shadcn/accordion.d.ts +0 -8
- package/dist/shadcn/accordion.d.ts.map +0 -1
- package/dist/shadcn/accordion.js +0 -33
- package/dist/shadcn/alert-dialog.d.ts +0 -21
- package/dist/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/shadcn/alert-dialog.js +0 -83
- package/dist/shadcn/alert.d.ts +0 -10
- package/dist/shadcn/alert.d.ts.map +0 -1
- package/dist/shadcn/alert.js +0 -38
- package/dist/shadcn/aspect-ratio.d.ts +0 -4
- package/dist/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/shadcn/aspect-ratio.js +0 -19
- package/dist/shadcn/avatar.d.ts +0 -7
- package/dist/shadcn/avatar.d.ts.map +0 -1
- package/dist/shadcn/avatar.js +0 -28
- package/dist/shadcn/badge.d.ts +0 -10
- package/dist/shadcn/badge.d.ts.map +0 -1
- package/dist/shadcn/badge.js +0 -35
- package/dist/shadcn/breadcrumb.d.ts +0 -12
- package/dist/shadcn/breadcrumb.d.ts.map +0 -1
- package/dist/shadcn/breadcrumb.js +0 -45
- package/dist/shadcn/button.d.ts +0 -11
- package/dist/shadcn/button.d.ts.map +0 -1
- package/dist/shadcn/button.js +0 -47
- package/dist/shadcn/calendar.d.ts +0 -9
- package/dist/shadcn/calendar.d.ts.map +0 -1
- package/dist/shadcn/calendar.js +0 -61
- package/dist/shadcn/card.d.ts +0 -10
- package/dist/shadcn/card.d.ts.map +0 -1
- package/dist/shadcn/card.js +0 -42
- package/dist/shadcn/checkbox.d.ts +0 -5
- package/dist/shadcn/checkbox.d.ts.map +0 -1
- package/dist/shadcn/checkbox.js +0 -21
- package/dist/shadcn/collapsible.d.ts +0 -6
- package/dist/shadcn/collapsible.d.ts.map +0 -1
- package/dist/shadcn/collapsible.js +0 -27
- package/dist/shadcn/command.d.ts +0 -19
- package/dist/shadcn/command.d.ts.map +0 -1
- package/dist/shadcn/command.js +0 -54
- package/dist/shadcn/date-input.d.ts +0 -8
- package/dist/shadcn/date-input.d.ts.map +0 -1
- package/dist/shadcn/date-input.js +0 -179
- package/dist/shadcn/date-range-picker.d.ts +0 -25
- package/dist/shadcn/date-range-picker.d.ts.map +0 -1
- package/dist/shadcn/date-range-picker.js +0 -45
- package/dist/shadcn/dialog.d.ts +0 -16
- package/dist/shadcn/dialog.d.ts.map +0 -1
- package/dist/shadcn/dialog.js +0 -57
- package/dist/shadcn/drawer.d.ts +0 -14
- package/dist/shadcn/drawer.d.ts.map +0 -1
- package/dist/shadcn/drawer.js +0 -56
- package/dist/shadcn/dropdown-menu.d.ts +0 -26
- package/dist/shadcn/dropdown-menu.d.ts.map +0 -1
- package/dist/shadcn/dropdown-menu.js +0 -77
- package/dist/shadcn/form.d.ts +0 -25
- package/dist/shadcn/form.d.ts.map +0 -1
- package/dist/shadcn/form.js +0 -70
- package/dist/shadcn/hover-card.d.ts +0 -7
- package/dist/shadcn/hover-card.d.ts.map +0 -1
- package/dist/shadcn/hover-card.js +0 -28
- package/dist/shadcn/input-otp.d.ts +0 -35
- package/dist/shadcn/input-otp.d.ts.map +0 -1
- package/dist/shadcn/input-otp.js +0 -40
- package/dist/shadcn/input.d.ts +0 -4
- package/dist/shadcn/input.d.ts.map +0 -1
- package/dist/shadcn/input.js +0 -18
- package/dist/shadcn/label.d.ts +0 -5
- package/dist/shadcn/label.d.ts.map +0 -1
- package/dist/shadcn/label.js +0 -20
- package/dist/shadcn/navigation-menu.d.ts +0 -17
- package/dist/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/shadcn/navigation-menu.js +0 -74
- package/dist/shadcn/popover.d.ts +0 -8
- package/dist/shadcn/popover.d.ts.map +0 -1
- package/dist/shadcn/popover.js +0 -32
- package/dist/shadcn/progress.d.ts +0 -9
- package/dist/shadcn/progress.d.ts.map +0 -1
- package/dist/shadcn/progress.js +0 -23
- package/dist/shadcn/radio-group.d.ts +0 -6
- package/dist/shadcn/radio-group.d.ts.map +0 -1
- package/dist/shadcn/radio-group.js +0 -25
- package/dist/shadcn/scroll-area.d.ts +0 -6
- package/dist/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/shadcn/scroll-area.js +0 -26
- package/dist/shadcn/select.d.ts +0 -16
- package/dist/shadcn/select.d.ts.map +0 -1
- package/dist/shadcn/select.js +0 -59
- package/dist/shadcn/separator.d.ts +0 -5
- package/dist/shadcn/separator.d.ts.map +0 -1
- package/dist/shadcn/separator.js +0 -20
- package/dist/shadcn/sheet.d.ts +0 -14
- package/dist/shadcn/sheet.d.ts.map +0 -1
- package/dist/shadcn/sheet.js +0 -61
- package/dist/shadcn/sidebar.d.ts +0 -70
- package/dist/shadcn/sidebar.d.ts.map +0 -1
- package/dist/shadcn/sidebar.js +0 -242
- package/dist/shadcn/skeleton.d.ts +0 -4
- package/dist/shadcn/skeleton.d.ts.map +0 -1
- package/dist/shadcn/skeleton.js +0 -18
- package/dist/shadcn/slider.d.ts +0 -5
- package/dist/shadcn/slider.d.ts.map +0 -1
- package/dist/shadcn/slider.js +0 -26
- package/dist/shadcn/sonner.d.ts +0 -4
- package/dist/shadcn/sonner.d.ts.map +0 -1
- package/dist/shadcn/sonner.js +0 -25
- package/dist/shadcn/switch.d.ts +0 -5
- package/dist/shadcn/switch.d.ts.map +0 -1
- package/dist/shadcn/switch.js +0 -20
- package/dist/shadcn/table.d.ts +0 -11
- package/dist/shadcn/table.d.ts.map +0 -1
- package/dist/shadcn/table.js +0 -47
- package/dist/shadcn/tabs.d.ts +0 -8
- package/dist/shadcn/tabs.d.ts.map +0 -1
- package/dist/shadcn/tabs.js +0 -32
- package/dist/shadcn/textarea.d.ts +0 -4
- package/dist/shadcn/textarea.d.ts.map +0 -1
- package/dist/shadcn/textarea.js +0 -18
- package/dist/shadcn/toggle-group.d.ts +0 -10
- package/dist/shadcn/toggle-group.d.ts.map +0 -1
- package/dist/shadcn/toggle-group.js +0 -35
- package/dist/shadcn/toggle.d.ts +0 -10
- package/dist/shadcn/toggle.d.ts.map +0 -1
- package/dist/shadcn/toggle.js +0 -38
- package/dist/shadcn/tooltip.d.ts +0 -8
- package/dist/shadcn/tooltip.d.ts.map +0 -1
- package/dist/shadcn/tooltip.js +0 -32
- package/dist/shadcn/workflow.d.ts +0 -21
- package/dist/shadcn/workflow.d.ts.map +0 -1
- package/dist/shadcn/workflow.js +0 -20
- package/dist/styles.css +0 -1302
- package/dist/utils/actions/account/index.d.ts +0 -6
- package/dist/utils/actions/account/index.d.ts.map +0 -1
- package/dist/utils/actions/account/index.js +0 -28
- package/dist/utils/actions/account/type.d.ts +0 -5
- package/dist/utils/actions/account/type.d.ts.map +0 -1
- package/dist/utils/actions/account/type.js +0 -1
- package/dist/utils/actions/auth/index.d.ts +0 -8
- package/dist/utils/actions/auth/index.d.ts.map +0 -1
- package/dist/utils/actions/common/revalidate.d.ts +0 -3
- package/dist/utils/actions/common/revalidate.d.ts.map +0 -1
- package/dist/utils/actions/common/revalidate.js +0 -14
- package/dist/utils/actions/common/type.d.ts +0 -5
- package/dist/utils/actions/common/type.d.ts.map +0 -1
- package/dist/utils/actions/common/type.js +0 -1
- package/dist/utils/actions/common/utils.d.ts +0 -6
- package/dist/utils/actions/common/utils.d.ts.map +0 -1
- package/dist/utils/actions/software/index.d.ts +0 -12
- package/dist/utils/actions/software/index.d.ts.map +0 -1
- package/dist/utils/actions/software/index.js +0 -75
- package/dist/utils/api/accountService/index.d.ts +0 -24
- package/dist/utils/api/accountService/index.d.ts.map +0 -1
- package/dist/utils/api/accountService/index.js +0 -64
- package/dist/utils/api/accountService/type.d.ts +0 -5
- package/dist/utils/api/accountService/type.d.ts.map +0 -1
- package/dist/utils/api/accountService/type.js +0 -1
- package/dist/utils/api/file-upload/index.d.ts +0 -6
- package/dist/utils/api/file-upload/index.d.ts.map +0 -1
- package/dist/utils/api/file-upload/index.js +0 -80
- package/dist/utils/api/file-upload/type.d.ts +0 -7
- package/dist/utils/api/file-upload/type.d.ts.map +0 -1
- package/dist/utils/api/file-upload/type.js +0 -1
- package/dist/utils/api/ikonBaseApi.d.ts +0 -13
- package/dist/utils/api/ikonBaseApi.d.ts.map +0 -1
- package/dist/utils/api/loginService/index.d.ts +0 -13
- package/dist/utils/api/loginService/index.d.ts.map +0 -1
- package/dist/utils/api/loginService/index.js +0 -72
- package/dist/utils/api/loginService/type.d.ts.map +0 -1
- package/dist/utils/api/loginService/type.js +0 -1
- package/dist/utils/api/softwareService/index.d.ts +0 -65
- package/dist/utils/api/softwareService/index.d.ts.map +0 -1
- package/dist/utils/api/softwareService/index.js +0 -212
- package/dist/utils/api/softwareService/type.d.ts +0 -55
- package/dist/utils/api/softwareService/type.d.ts.map +0 -1
- package/dist/utils/api/softwareService/type.js +0 -1
- package/dist/utils/border-radius-provider.d.ts +0 -12
- package/dist/utils/border-radius-provider.d.ts.map +0 -1
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -5
- package/dist/utils/font-provider.d.ts +0 -12
- package/dist/utils/font-provider.d.ts.map +0 -1
- package/dist/utils/session/cookieSession.d.ts +0 -9
- package/dist/utils/session/cookieSession.d.ts.map +0 -1
- package/dist/utils/session/cookieSession.js +0 -33
- package/dist/utils/theme-provider/index.d.ts +0 -4
- package/dist/utils/theme-provider/index.d.ts.map +0 -1
- package/dist/utils/theme-provider/index.js +0 -18
- package/dist/utils/token-management/index.d.ts +0 -11
- package/dist/utils/token-management/index.d.ts.map +0 -1
- package/dist/utils/token-management/index.js +0 -69
- package/dist/utils/token-management/types.d.ts +0 -7
- package/dist/utils/token-management/types.d.ts.map +0 -1
- package/dist/utils/token-management/types.js +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "../../ikonShade/button";
|
|
4
|
+
import {
|
|
5
|
+
DropdownMenu,
|
|
6
|
+
DropdownMenuContent,
|
|
7
|
+
DropdownMenuGroup,
|
|
8
|
+
DropdownMenuItem,
|
|
9
|
+
DropdownMenuLabel,
|
|
10
|
+
DropdownMenuPortal,
|
|
11
|
+
DropdownMenuSeparator,
|
|
12
|
+
DropdownMenuShortcut,
|
|
13
|
+
DropdownMenuSub,
|
|
14
|
+
DropdownMenuSubContent,
|
|
15
|
+
DropdownMenuSubTrigger,
|
|
16
|
+
DropdownMenuTrigger,
|
|
17
|
+
} from "../../ikonShade/dropdown-menu";
|
|
18
|
+
import { MoreHorizontal } from "lucide-react";
|
|
19
|
+
import type { ActionMenuProps, ExtraActionParams } from "./type";
|
|
20
|
+
import { IconButtonWithTooltip } from "../buttons";
|
|
21
|
+
|
|
22
|
+
export function ActionMenu({
|
|
23
|
+
actionMenus,
|
|
24
|
+
extraActionParams,
|
|
25
|
+
}: {
|
|
26
|
+
actionMenus: ActionMenuProps[];
|
|
27
|
+
extraActionParams?: ExtraActionParams;
|
|
28
|
+
}) {
|
|
29
|
+
const renderMenuItems = (items: ActionMenuProps[]) => {
|
|
30
|
+
items = items.filter((item) => {
|
|
31
|
+
// biome-ignore lint/complexity/useOptionalChain: <explanation>
|
|
32
|
+
return (item?.visibility === undefined || item.visibility === true || (item.visibility && item.visibility(...(extraActionParams?.arguments || []))))
|
|
33
|
+
})
|
|
34
|
+
if (items.length === 0) {
|
|
35
|
+
return <DropdownMenuItem className="text-center">No action available.</DropdownMenuItem>
|
|
36
|
+
}
|
|
37
|
+
return items.map((item, index) => {
|
|
38
|
+
if (item.type === "label") {
|
|
39
|
+
return <DropdownMenuLabel key={index}>{String(item.label)}</DropdownMenuLabel>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (item.type === "separator") {
|
|
43
|
+
return <DropdownMenuSeparator key={index} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (item.type === "group" && item.items) {
|
|
47
|
+
return (
|
|
48
|
+
<DropdownMenuGroup key={index}>
|
|
49
|
+
{renderMenuItems(item.items)}
|
|
50
|
+
</DropdownMenuGroup>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (item.items) {
|
|
55
|
+
return (
|
|
56
|
+
<DropdownMenuSub key={index}>
|
|
57
|
+
<DropdownMenuSubTrigger>{String(item.label)}</DropdownMenuSubTrigger>
|
|
58
|
+
<DropdownMenuPortal>
|
|
59
|
+
<DropdownMenuSubContent>
|
|
60
|
+
{renderMenuItems(item.items)}
|
|
61
|
+
</DropdownMenuSubContent>
|
|
62
|
+
</DropdownMenuPortal>
|
|
63
|
+
</DropdownMenuSub>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let labelContent = "";
|
|
68
|
+
if (typeof item.label === "function") {
|
|
69
|
+
labelContent = item.label(...(extraActionParams?.arguments || []));
|
|
70
|
+
} else {
|
|
71
|
+
labelContent = item.label;
|
|
72
|
+
}
|
|
73
|
+
return (
|
|
74
|
+
|
|
75
|
+
<DropdownMenuItem
|
|
76
|
+
key={index}
|
|
77
|
+
disabled={item.disabled}
|
|
78
|
+
onClick={() =>
|
|
79
|
+
// biome-ignore lint/complexity/useOptionalChain: <explanation>
|
|
80
|
+
item.onClick &&
|
|
81
|
+
item.onClick(...(extraActionParams?.arguments || []))
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
{item.icon && <item.icon />}
|
|
85
|
+
{labelContent}
|
|
86
|
+
{/* {item.shortcut && <DropdownMenuShortcut>{item.shortcut}</DropdownMenuShortcut>} */}
|
|
87
|
+
</DropdownMenuItem>
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<DropdownMenu>
|
|
94
|
+
<DropdownMenuTrigger asChild>
|
|
95
|
+
<IconButtonWithTooltip
|
|
96
|
+
variant="ghost"
|
|
97
|
+
tooltipContent="Actions"
|
|
98
|
+
className="h-8 w-8 p-0 border-0 bg-transparent text-foreground keross:text-white elevation-0 shadow-none hover:bg-transparent"
|
|
99
|
+
>
|
|
100
|
+
<MoreHorizontal />
|
|
101
|
+
</IconButtonWithTooltip>
|
|
102
|
+
</DropdownMenuTrigger>
|
|
103
|
+
<DropdownMenuContent className="w-56" align="end">
|
|
104
|
+
{renderMenuItems(actionMenus)}
|
|
105
|
+
</DropdownMenuContent>
|
|
106
|
+
</DropdownMenu>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LucideProps } from "lucide-react";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
export interface ActionMenuProps {
|
|
5
|
+
items?: ActionMenuProps[];
|
|
6
|
+
type?: "sub" | "group" | "separator" | "label" | null;
|
|
7
|
+
label: ((...args: any) => string) | string;
|
|
8
|
+
icon?: ForwardRefExoticComponent<
|
|
9
|
+
Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>
|
|
10
|
+
>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
visibility?: ((...args: any) => boolean) | boolean;
|
|
13
|
+
onClick?: (...args: any) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ExtraActionParams {
|
|
17
|
+
arguments?: any[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AlignJustify } from "lucide-react";
|
|
4
|
+
import { TabArray } from "../tabs/type";
|
|
5
|
+
import {CustomTabs} from "../tabs";
|
|
6
|
+
import {NoDataComponent} from "../no-data";
|
|
7
|
+
import {UploadTab} from "../upload-tab";
|
|
8
|
+
import { SheetComponent } from "../sheet";
|
|
9
|
+
|
|
10
|
+
export type ActivityLogProps = {
|
|
11
|
+
id: string;
|
|
12
|
+
activity: string;
|
|
13
|
+
updatedBy: string;
|
|
14
|
+
updatedOn: string;
|
|
15
|
+
source: string;
|
|
16
|
+
parentId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function ActivitySheet({ activityLogs = [] }: { activityLogs?: ActivityLogProps[] }) {
|
|
20
|
+
|
|
21
|
+
const tabArray: TabArray[] = [
|
|
22
|
+
{
|
|
23
|
+
tabName: "Activity",
|
|
24
|
+
tabId: "tab-activity",
|
|
25
|
+
default: true,
|
|
26
|
+
tabContent: <div className="overflow-auto flex flex-col gap-2 h-full">
|
|
27
|
+
{activityLogs.length > 0 ? (
|
|
28
|
+
activityLogs.map((log: any) => (
|
|
29
|
+
<div key={log.id} className="border-b text-sm pb-2">
|
|
30
|
+
<p className="font-medium pb-1">{log.activity}</p>
|
|
31
|
+
<p className="text-gray-500 pb-1">
|
|
32
|
+
Updated On:{" "}
|
|
33
|
+
<span className="text-gray-700">
|
|
34
|
+
{new Date(log.updatedOn).toLocaleString()}
|
|
35
|
+
</span>
|
|
36
|
+
</p>
|
|
37
|
+
<p className="text-gray-500 pb-1">
|
|
38
|
+
{/* Updated By: <span className="text-gray-700">{userMap[log.updatedBy]?.userName || "n/a"}</span> */}
|
|
39
|
+
Updated By: <span className="text-gray-700">{log.updatedBy}</span>
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
))
|
|
43
|
+
) : (
|
|
44
|
+
<NoDataComponent text="No Activity Logs Available" />
|
|
45
|
+
)}
|
|
46
|
+
</div>
|
|
47
|
+
}, {
|
|
48
|
+
tabName: "File Upload",
|
|
49
|
+
tabId: "tab-upload",
|
|
50
|
+
default: false,
|
|
51
|
+
tabContent: <UploadTab />
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
return (
|
|
55
|
+
<SheetComponent
|
|
56
|
+
buttonText=""
|
|
57
|
+
buttonIcon={<AlignJustify />}
|
|
58
|
+
sheetTitle=""
|
|
59
|
+
sheetContent={<CustomTabs tabArray={tabArray} tabListClass='' />}
|
|
60
|
+
closeButton={true}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createContext, useContext, useState, ReactNode } from "react"
|
|
3
|
+
import { CustomAlertDialog } from ".";
|
|
4
|
+
|
|
5
|
+
interface DialogContextProps {
|
|
6
|
+
openDialog: (options: DialogOptions) => void;
|
|
7
|
+
closeDialog: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface DialogOptions {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
onConfirm?: () => void;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
onThird?: () => void;
|
|
16
|
+
confirmText?: string;
|
|
17
|
+
cancelText?: string;
|
|
18
|
+
thirdOptionText?: string;
|
|
19
|
+
fontSize?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const DialogContext = createContext<DialogContextProps | undefined>(undefined);
|
|
23
|
+
|
|
24
|
+
export const useDialog = () => {
|
|
25
|
+
const context = useContext(DialogContext);
|
|
26
|
+
if (!context) {
|
|
27
|
+
throw new Error("useDialog must be used within a DialogProvider");
|
|
28
|
+
}
|
|
29
|
+
return context;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const DialogProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
|
|
33
|
+
const [dialogOptions, setDialogOptions] = useState<DialogOptions | null>(null);
|
|
34
|
+
|
|
35
|
+
const openDialog = (options: DialogOptions) => setDialogOptions(options);
|
|
36
|
+
const closeDialog = () => setDialogOptions(null);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<DialogContext.Provider value={{ openDialog, closeDialog }}>
|
|
40
|
+
{children}
|
|
41
|
+
{dialogOptions && (
|
|
42
|
+
<CustomAlertDialog
|
|
43
|
+
title={dialogOptions.title}
|
|
44
|
+
description={dialogOptions.description}
|
|
45
|
+
fontSize={dialogOptions.fontSize || "text-base"}
|
|
46
|
+
cancelText={dialogOptions.cancelText || ""}
|
|
47
|
+
confirmText={dialogOptions.confirmText || ""}
|
|
48
|
+
thirdOptionText={dialogOptions.thirdOptionText || ""}
|
|
49
|
+
onConfirm={() => {
|
|
50
|
+
if (dialogOptions.onConfirm) dialogOptions.onConfirm();
|
|
51
|
+
closeDialog();
|
|
52
|
+
}}
|
|
53
|
+
onCancel={() => {
|
|
54
|
+
if (dialogOptions.onCancel) dialogOptions.onCancel();
|
|
55
|
+
closeDialog();
|
|
56
|
+
}}
|
|
57
|
+
onThird={() => {
|
|
58
|
+
if (dialogOptions.onThird) dialogOptions.onThird();
|
|
59
|
+
closeDialog();
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
)}
|
|
63
|
+
</DialogContext.Provider>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
AlertDialog,
|
|
4
|
+
AlertDialogAction,
|
|
5
|
+
AlertDialogCancel,
|
|
6
|
+
AlertDialogContent,
|
|
7
|
+
AlertDialogDescription,
|
|
8
|
+
AlertDialogFooter,
|
|
9
|
+
AlertDialogHeader,
|
|
10
|
+
AlertDialogTitle,
|
|
11
|
+
} from "../../ikonShade/alert-dialog";
|
|
12
|
+
|
|
13
|
+
interface CustomAlertDialogProps {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
fontSize?: string; // Tailwind font size class, e.g., "text-sm", "text-lg"
|
|
17
|
+
cancelText?: string; // Custom text for the cancel button
|
|
18
|
+
confirmText?: string; // Custom text for the confirm button
|
|
19
|
+
thirdOptionText?: string; // Custom text for the third button
|
|
20
|
+
onCancel?: () => void; // Callback function for cancel action
|
|
21
|
+
onConfirm?: () => void; // Callback function for confirm action
|
|
22
|
+
onThird?: () => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const CustomAlertDialog: React.FC<CustomAlertDialogProps> = ({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
fontSize = "text-base",
|
|
29
|
+
cancelText = "", // Default cancel button text
|
|
30
|
+
confirmText = "", // Default confirm button text
|
|
31
|
+
thirdOptionText = "", // Default third button text
|
|
32
|
+
onCancel, // Optional callback for cancel action
|
|
33
|
+
onConfirm, // Optional callback for confirm action
|
|
34
|
+
onThird, // Optional callback for third action
|
|
35
|
+
}) => {
|
|
36
|
+
return (
|
|
37
|
+
<AlertDialog open={true}>
|
|
38
|
+
<AlertDialogContent>
|
|
39
|
+
<AlertDialogHeader>
|
|
40
|
+
<AlertDialogTitle className={fontSize}>{title}</AlertDialogTitle>
|
|
41
|
+
<AlertDialogDescription className={fontSize}>
|
|
42
|
+
{description}
|
|
43
|
+
</AlertDialogDescription>
|
|
44
|
+
</AlertDialogHeader>
|
|
45
|
+
<AlertDialogFooter>
|
|
46
|
+
{cancelText != "" && (
|
|
47
|
+
<AlertDialogCancel
|
|
48
|
+
onClick={() => {
|
|
49
|
+
if (onCancel) onCancel(); // Execute cancel callback if provided
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
{cancelText}
|
|
53
|
+
</AlertDialogCancel>
|
|
54
|
+
)}
|
|
55
|
+
{thirdOptionText != "" && (
|
|
56
|
+
<AlertDialogAction
|
|
57
|
+
className="bg-blue-500"
|
|
58
|
+
color="black"
|
|
59
|
+
onClick={() => {
|
|
60
|
+
if (onThird) onThird(); // Execute confirm callback if provided
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
{thirdOptionText}
|
|
64
|
+
</AlertDialogAction>
|
|
65
|
+
)}
|
|
66
|
+
{confirmText != "" && (
|
|
67
|
+
<AlertDialogAction
|
|
68
|
+
onClick={() => {
|
|
69
|
+
if (onConfirm) onConfirm(); // Execute confirm callback if provided
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
{confirmText}
|
|
73
|
+
</AlertDialogAction>
|
|
74
|
+
)}
|
|
75
|
+
</AlertDialogFooter>
|
|
76
|
+
</AlertDialogContent>
|
|
77
|
+
</AlertDialog>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { createContext, useContext, useState, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
// Define the type for a breadcrumb item
|
|
5
|
+
export interface BreadcrumbItemProps {
|
|
6
|
+
title: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
level: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Define the type for the context state
|
|
12
|
+
interface BreadcrumbContextType {
|
|
13
|
+
breadcrumbItems: BreadcrumbItemProps[];
|
|
14
|
+
addBreadcrumb: (item: BreadcrumbItemProps) => void;
|
|
15
|
+
backBreadcrumb: (item: BreadcrumbItemProps) => void;
|
|
16
|
+
addBreadcrumbItems: (items: BreadcrumbItemProps[], isReplace?: boolean) => void;
|
|
17
|
+
clearBreadcrumb: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Create the context with a default value
|
|
21
|
+
const BreadcrumbContext = createContext<BreadcrumbContextType | undefined>(undefined);
|
|
22
|
+
|
|
23
|
+
// Create a provider component
|
|
24
|
+
export function BreadcrumbProvider({ children }: { children: ReactNode }) {
|
|
25
|
+
const [breadcrumbItems, setBreadcrumbItems] = useState<BreadcrumbItemProps[]>([]);
|
|
26
|
+
// Function to add a breadcrumb item
|
|
27
|
+
const addBreadcrumb = (item: BreadcrumbItemProps) => {
|
|
28
|
+
setBreadcrumbItems((prevItems) => {
|
|
29
|
+
const filterState = prevItems.filter((e) => e.level < item.level);
|
|
30
|
+
return [...filterState, item];
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const addBreadcrumbItems = (items: BreadcrumbItemProps[], isReplace?: boolean) => {
|
|
35
|
+
if (isReplace) {
|
|
36
|
+
setBreadcrumbItems(items);
|
|
37
|
+
} else {
|
|
38
|
+
setBreadcrumbItems((prevItems) => [...prevItems, ...items]);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Function to go back in the breadcrumb
|
|
43
|
+
const backBreadcrumb = (item: BreadcrumbItemProps) => {
|
|
44
|
+
setBreadcrumbItems((prevItems) => {
|
|
45
|
+
const filterState = prevItems.filter((e) => e.level <= item.level);
|
|
46
|
+
return [...filterState];
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const clearBreadcrumb = () => {
|
|
51
|
+
setBreadcrumbItems([]);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<BreadcrumbContext.Provider value={{ breadcrumbItems, addBreadcrumb, backBreadcrumb, addBreadcrumbItems, clearBreadcrumb }}>
|
|
56
|
+
{children}
|
|
57
|
+
</BreadcrumbContext.Provider>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Custom hook to use the BreadcrumbContext
|
|
62
|
+
export function useBreadcrumb() {
|
|
63
|
+
const context = useContext(BreadcrumbContext);
|
|
64
|
+
if (!context) {
|
|
65
|
+
throw new Error('useBreadcrumb must be used within a BreadcrumbProvider');
|
|
66
|
+
}
|
|
67
|
+
return context;
|
|
68
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
|
|
5
|
+
import { Fragment, useEffect, useMemo, useState } from "react";
|
|
6
|
+
import { redirect } from "next/navigation";
|
|
7
|
+
import { BreadcrumbItemProps, useBreadcrumb } from "./BreadcrumbProvider";
|
|
8
|
+
import {
|
|
9
|
+
Breadcrumb,
|
|
10
|
+
BreadcrumbEllipsis,
|
|
11
|
+
BreadcrumbItem,
|
|
12
|
+
BreadcrumbLink,
|
|
13
|
+
BreadcrumbList,
|
|
14
|
+
BreadcrumbPage,
|
|
15
|
+
BreadcrumbSeparator,
|
|
16
|
+
} from "../../ikonShade/breadcrumb";
|
|
17
|
+
import {
|
|
18
|
+
Drawer,
|
|
19
|
+
DrawerClose,
|
|
20
|
+
DrawerContent,
|
|
21
|
+
DrawerDescription,
|
|
22
|
+
DrawerFooter,
|
|
23
|
+
DrawerHeader,
|
|
24
|
+
DrawerTitle,
|
|
25
|
+
DrawerTrigger,
|
|
26
|
+
} from "../../ikonShade/drawer";
|
|
27
|
+
import { Button } from "../../ikonShade/button";
|
|
28
|
+
import {
|
|
29
|
+
DropdownMenu,
|
|
30
|
+
DropdownMenuContent,
|
|
31
|
+
DropdownMenuItem,
|
|
32
|
+
DropdownMenuTrigger,
|
|
33
|
+
} from "../../ikonShade/dropdown-menu";
|
|
34
|
+
import { useIsMobile } from "../../hooks/use-mobile";
|
|
35
|
+
|
|
36
|
+
export function AppBreadcrumb() {
|
|
37
|
+
const { breadcrumbItems, backBreadcrumb } = useBreadcrumb();
|
|
38
|
+
const [open, setOpen] = useState(false);
|
|
39
|
+
const [itemToDisplay, setItemToDisplay] = useState<number>(2);
|
|
40
|
+
const isMobile = useIsMobile();
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (isMobile) {
|
|
43
|
+
setItemToDisplay(2);
|
|
44
|
+
} else {
|
|
45
|
+
setItemToDisplay(4);
|
|
46
|
+
}
|
|
47
|
+
}, [isMobile]);
|
|
48
|
+
|
|
49
|
+
const breadcrumbObj = useMemo(() => {
|
|
50
|
+
return {
|
|
51
|
+
firstVisibleBreadcrumbList: breadcrumbItems.slice(0, 2),
|
|
52
|
+
hiddenBreadcrumbList: isMobile
|
|
53
|
+
? breadcrumbItems.slice(2)
|
|
54
|
+
: breadcrumbItems.slice(2, itemToDisplay),
|
|
55
|
+
lastVisibleBreadcrumbList:
|
|
56
|
+
breadcrumbItems.length > 2
|
|
57
|
+
? breadcrumbItems.slice(
|
|
58
|
+
2 -
|
|
59
|
+
(breadcrumbItems.length < itemToDisplay
|
|
60
|
+
? breadcrumbItems.length
|
|
61
|
+
: itemToDisplay)
|
|
62
|
+
)
|
|
63
|
+
: [],
|
|
64
|
+
};
|
|
65
|
+
}, [breadcrumbItems, itemToDisplay, isMobile]);
|
|
66
|
+
|
|
67
|
+
if (!breadcrumbObj || isMobile == undefined || itemToDisplay == null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return (
|
|
71
|
+
<Breadcrumb key={"Breadcrumb1"}>
|
|
72
|
+
<BreadcrumbList key={"BreadcrumbList1"}>
|
|
73
|
+
{breadcrumbObj.firstVisibleBreadcrumbList.map(
|
|
74
|
+
(item: any, index: number) =>
|
|
75
|
+
index < breadcrumbItems.length - 1 ? (
|
|
76
|
+
<Fragment key={"first" + index}>
|
|
77
|
+
<BreadcrumbItem>
|
|
78
|
+
{!item.href ? (
|
|
79
|
+
<BreadcrumbPage className="max-w-20 truncate md:max-w-none">
|
|
80
|
+
{item.title}
|
|
81
|
+
</BreadcrumbPage>
|
|
82
|
+
) : (
|
|
83
|
+
<BreadcrumbLink
|
|
84
|
+
className="max-w-20 truncate md:max-w-none cursor-pointer"
|
|
85
|
+
onClick={() => {
|
|
86
|
+
backBreadcrumb(item);
|
|
87
|
+
redirect(item.href);
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{item.title}
|
|
91
|
+
</BreadcrumbLink>
|
|
92
|
+
)}
|
|
93
|
+
</BreadcrumbItem>
|
|
94
|
+
<BreadcrumbSeparator key={"firstsep" + index} />
|
|
95
|
+
</Fragment>
|
|
96
|
+
) : (
|
|
97
|
+
<BreadcrumbItem key={"first" + index}>
|
|
98
|
+
<BreadcrumbPage className="max-w-20 truncate md:max-w-none">
|
|
99
|
+
{item.title}
|
|
100
|
+
</BreadcrumbPage>
|
|
101
|
+
</BreadcrumbItem>
|
|
102
|
+
)
|
|
103
|
+
)}
|
|
104
|
+
|
|
105
|
+
{breadcrumbItems.length > itemToDisplay ? (
|
|
106
|
+
<>
|
|
107
|
+
<BreadcrumbItem>
|
|
108
|
+
{!isMobile ? (
|
|
109
|
+
<DropdownMenu open={open} onOpenChange={setOpen}>
|
|
110
|
+
<DropdownMenuTrigger
|
|
111
|
+
className="flex items-center gap-1"
|
|
112
|
+
aria-label="Toggle menu"
|
|
113
|
+
>
|
|
114
|
+
<BreadcrumbEllipsis className="h-4 w-4" />
|
|
115
|
+
</DropdownMenuTrigger>
|
|
116
|
+
<DropdownMenuContent align="start">
|
|
117
|
+
{breadcrumbObj.hiddenBreadcrumbList.map(
|
|
118
|
+
(item: any, index: number) => (
|
|
119
|
+
<DropdownMenuItem key={index}>
|
|
120
|
+
{!item.href ? (
|
|
121
|
+
<span>{item.title}</span>
|
|
122
|
+
) : (
|
|
123
|
+
<Link href={item.href ? item.href : "#"}>
|
|
124
|
+
{item.title}
|
|
125
|
+
</Link>
|
|
126
|
+
)}
|
|
127
|
+
</DropdownMenuItem>
|
|
128
|
+
)
|
|
129
|
+
)}
|
|
130
|
+
</DropdownMenuContent>
|
|
131
|
+
</DropdownMenu>
|
|
132
|
+
) : (
|
|
133
|
+
<Drawer open={open} onOpenChange={setOpen}>
|
|
134
|
+
<DrawerTrigger aria-label="Toggle Menu">
|
|
135
|
+
<BreadcrumbEllipsis className="h-4 w-4" />
|
|
136
|
+
</DrawerTrigger>
|
|
137
|
+
<DrawerContent>
|
|
138
|
+
<DrawerHeader className="text-left">
|
|
139
|
+
<DrawerTitle>Navigate to</DrawerTitle>
|
|
140
|
+
<DrawerDescription>
|
|
141
|
+
Select a page to navigate to.
|
|
142
|
+
</DrawerDescription>
|
|
143
|
+
</DrawerHeader>
|
|
144
|
+
<div className="grid gap-1 px-2 lg:px-4">
|
|
145
|
+
{breadcrumbObj.hiddenBreadcrumbList.map(
|
|
146
|
+
(item: any, index: number) => (
|
|
147
|
+
<div key={index}>
|
|
148
|
+
{item.clickable == false ? (
|
|
149
|
+
<span className="py-1 text-sm">{item.title}</span>
|
|
150
|
+
) : (
|
|
151
|
+
<Link
|
|
152
|
+
href={item.href ? item.href : "#"}
|
|
153
|
+
className="py-1 text-sm"
|
|
154
|
+
>
|
|
155
|
+
{item.title}
|
|
156
|
+
</Link>
|
|
157
|
+
)}
|
|
158
|
+
</div>
|
|
159
|
+
)
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
<DrawerFooter className="pt-4">
|
|
163
|
+
<DrawerClose asChild>
|
|
164
|
+
<Button variant="outline">Close</Button>
|
|
165
|
+
</DrawerClose>
|
|
166
|
+
</DrawerFooter>
|
|
167
|
+
</DrawerContent>
|
|
168
|
+
</Drawer>
|
|
169
|
+
)}
|
|
170
|
+
</BreadcrumbItem>
|
|
171
|
+
{!isMobile && <BreadcrumbSeparator />}
|
|
172
|
+
</>
|
|
173
|
+
) : null}
|
|
174
|
+
{!isMobile &&
|
|
175
|
+
breadcrumbObj.lastVisibleBreadcrumbList.map(
|
|
176
|
+
(item: any, index: number) =>
|
|
177
|
+
index == breadcrumbObj.lastVisibleBreadcrumbList.length - 1 ? (
|
|
178
|
+
<BreadcrumbItem key={"last" + index}>
|
|
179
|
+
<BreadcrumbPage className="max-w-20 truncate md:max-w-none cursor-pointer">
|
|
180
|
+
{item.title}
|
|
181
|
+
</BreadcrumbPage>
|
|
182
|
+
</BreadcrumbItem>
|
|
183
|
+
) : (
|
|
184
|
+
<Fragment key={"last" + index}>
|
|
185
|
+
<BreadcrumbItem>
|
|
186
|
+
{!item.href ? (
|
|
187
|
+
<BreadcrumbPage className="max-w-20 truncate md:max-w-none">
|
|
188
|
+
{item.title}
|
|
189
|
+
</BreadcrumbPage>
|
|
190
|
+
) : (
|
|
191
|
+
<BreadcrumbLink
|
|
192
|
+
className="max-w-20 truncate md:max-w-none cursor-pointer"
|
|
193
|
+
onClick={() => {
|
|
194
|
+
backBreadcrumb(item);
|
|
195
|
+
redirect(item.href);
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
{item.title}
|
|
199
|
+
</BreadcrumbLink>
|
|
200
|
+
)}
|
|
201
|
+
</BreadcrumbItem>
|
|
202
|
+
<BreadcrumbSeparator key={"lastsep" + index} />
|
|
203
|
+
</Fragment>
|
|
204
|
+
)
|
|
205
|
+
)}
|
|
206
|
+
</BreadcrumbList>
|
|
207
|
+
</Breadcrumb>
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function RenderAppBreadcrumb({
|
|
212
|
+
breadcrumb,
|
|
213
|
+
}: {
|
|
214
|
+
breadcrumb: BreadcrumbItemProps;
|
|
215
|
+
}) {
|
|
216
|
+
const { addBreadcrumb } = useBreadcrumb();
|
|
217
|
+
|
|
218
|
+
useEffect(() => {
|
|
219
|
+
addBreadcrumb(breadcrumb);
|
|
220
|
+
}, [breadcrumb]);
|
|
221
|
+
return <></>;
|
|
222
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Eye, SquarePen } from "lucide-react";
|
|
2
|
+
import { BigCalendarEventProps, ExtraParamsEvent } from "../type";
|
|
3
|
+
import { TooltipComponent as Tooltip } from "../../tooltip";
|
|
4
|
+
|
|
5
|
+
// Custom event component
|
|
6
|
+
export default function BigCalenderEvent({ event, extraParamsEvent }: { event: BigCalendarEventProps, extraParamsEvent?: ExtraParamsEvent }) {
|
|
7
|
+
return (
|
|
8
|
+
<div className="custom-event flex flex-row justify-between">
|
|
9
|
+
<span className="truncate w-auto">{event.title}</span>
|
|
10
|
+
<span className="flex flex-row gap-1">
|
|
11
|
+
{(extraParamsEvent?.isEditableAll || event.isEditable) &&
|
|
12
|
+
<Tooltip tooltipContent="Edit">
|
|
13
|
+
<button
|
|
14
|
+
className="event-edit-button w-fit px-1"
|
|
15
|
+
onClick={(e) => {
|
|
16
|
+
e.stopPropagation(); // Prevent triggering other event handlers
|
|
17
|
+
extraParamsEvent?.onEditEventClick?.(event);
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
<SquarePen size={16} />
|
|
21
|
+
</button>
|
|
22
|
+
</Tooltip>
|
|
23
|
+
}
|
|
24
|
+
<Tooltip tooltipContent="View">
|
|
25
|
+
<button
|
|
26
|
+
className="event-view-button w-fit px-1"
|
|
27
|
+
onClick={(e) => {
|
|
28
|
+
e.stopPropagation(); // Prevent triggering other event handlers
|
|
29
|
+
extraParamsEvent?.onViewEventClick?.(event);
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<Eye size={16} />
|
|
33
|
+
</button>
|
|
34
|
+
</Tooltip>
|
|
35
|
+
</span>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|