@dasidev/dasi-ui 1.0.0
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 +346 -0
- package/bin/dasi-cli.cjs +184 -0
- package/dist/date-selector-test-BlukYeWl.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/html2canvas.esm-CKxSAI8P.js +4886 -0
- package/dist/img/brand/ic_pln.svg +12 -0
- package/dist/img/brand/mapp_power_logo.svg +21 -0
- package/dist/img/common/pltu_ulumbu_flores_ntt.jpeg +0 -0
- package/dist/index-BQSA2aPs.js +126556 -0
- package/dist/index.es-DQWt-PZn.js +5769 -0
- package/dist/index.es.js +11 -0
- package/dist/index.umd.js +8564 -0
- package/dist/informasi-gudang-BmoEy2RL.js +164 -0
- package/dist/informasi-gudang-DXfS46Nh.js +50 -0
- package/dist/purify.es-C-9oolON.js +546 -0
- package/dist/scripts/pdf.worker.min.js +29 -0
- package/dist/scripts/pdf.worker.min.mjs +29 -0
- package/dist/scripts/pdf.worker.mjs +57722 -0
- package/dist/scripts/pdf.worker.mjs.map +1 -0
- package/dist/style.css +1 -0
- package/dist/test-schema-JFghGc0_.js +8 -0
- package/dist/test-schema-uusFsJe4.js +438 -0
- package/dist/types-l0sNRNKZ.js +1 -0
- package/package.json +178 -0
- package/src/App.vue +18 -0
- package/src/__tests__/index.test.ts +9 -0
- package/src/api/api.ts +117 -0
- package/src/assets/app-selector.svg +3 -0
- package/src/assets/dasi.png +0 -0
- package/src/assets/foto_ss.svg +21 -0
- package/src/assets/icons/circle-blue.svg +4 -0
- package/src/assets/icons/circle-gray.svg +15 -0
- package/src/assets/icons/circle-green.svg +4 -0
- package/src/assets/icons/circle-orange.svg +4 -0
- package/src/assets/icons/circle-purple.svg +4 -0
- package/src/assets/icons/circle-red.svg +15 -0
- package/src/assets/icons/harbor.svg +12 -0
- package/src/assets/icons/ic-box-red.svg +8 -0
- package/src/assets/icons/ic-chevron-right.svg +1 -0
- package/src/assets/icons/ic-loading.svg +9 -0
- package/src/assets/icons/ic-reset.svg +16 -0
- package/src/assets/icons/ic-sailing.svg +5 -0
- package/src/assets/icons/icon-app-selector.svg +3 -0
- package/src/assets/icons/icon-browser-check.svg +4 -0
- package/src/assets/icons/icon-calendar.svg +3 -0
- package/src/assets/icons/icon-chart-bar.svg +3 -0
- package/src/assets/icons/icon-chart-doc.svg +16 -0
- package/src/assets/icons/icon-chart-line.svg +10 -0
- package/src/assets/icons/icon-chart-mix.svg +15 -0
- package/src/assets/icons/icon-chart-pie.svg +11 -0
- package/src/assets/icons/icon-continue.svg +12 -0
- package/src/assets/icons/icon-dashboard-2.svg +17 -0
- package/src/assets/icons/icon-dashboard.svg +3 -0
- package/src/assets/icons/icon-data-kelistrikan.svg +19 -0
- package/src/assets/icons/icon-data-sentral.svg +11 -0
- package/src/assets/icons/icon-database.svg +5 -0
- package/src/assets/icons/icon-desktop.svg +3 -0
- package/src/assets/icons/icon-download.svg +13 -0
- package/src/assets/icons/icon-energi-primer.svg +12 -0
- package/src/assets/icons/icon-faba-apk2.svg +11 -0
- package/src/assets/icons/icon-faba.svg +11 -0
- package/src/assets/icons/icon-factory.svg +14 -0
- package/src/assets/icons/icon-globe-doc.svg +19 -0
- package/src/assets/icons/icon-ikk.svg +10 -0
- package/src/assets/icons/icon-kbb.svg +13 -0
- package/src/assets/icons/icon-kos.svg +16 -0
- package/src/assets/icons/icon-kpi-bod.svg +15 -0
- package/src/assets/icons/icon-kss.svg +14 -0
- package/src/assets/icons/icon-map.svg +12 -0
- package/src/assets/icons/icon-monitoring-harian.svg +13 -0
- package/src/assets/icons/icon-notification.svg +4 -0
- package/src/assets/icons/icon-overview.svg +17 -0
- package/src/assets/icons/icon-pltu.svg +13 -0
- package/src/assets/icons/icon-sebaran-sentral.svg +12 -0
- package/src/assets/icons/icon-select-data-kelistrikan.svg +19 -0
- package/src/assets/icons/icon-select-data-sentral.svg +11 -0
- package/src/assets/icons/icon-select-energi-primer.svg +12 -0
- package/src/assets/icons/icon-select-faba-apk2.svg +11 -0
- package/src/assets/icons/icon-select-ikk.svg +10 -0
- package/src/assets/icons/icon-select-kbb.svg +13 -0
- package/src/assets/icons/icon-select-kos.svg +16 -0
- package/src/assets/icons/icon-select-kpi-bod.svg +15 -0
- package/src/assets/icons/icon-select-kss.svg +14 -0
- package/src/assets/icons/icon-select-monitoring-harian.svg +13 -0
- package/src/assets/icons/icon-select-overview.svg +17 -0
- package/src/assets/icons/icon-select-sebaran-sentral.svg +12 -0
- package/src/assets/icons/icon-sentral-white.svg +13 -0
- package/src/assets/icons/icon-shipping.svg +5 -0
- package/src/assets/icons/icon-sort.svg +5 -0
- package/src/assets/icons/icon-tree-box.svg +14 -0
- package/src/assets/icons/icon-warehouse.svg +12 -0
- package/src/assets/icons/pin-green.svg +3 -0
- package/src/assets/icons/pin-orange.svg +3 -0
- package/src/assets/icons/pin-purple.svg +3 -0
- package/src/assets/icons/ship.svg +3 -0
- package/src/assets/icons/shipment/icon-antri.svg +15 -0
- package/src/assets/icons/shipment/icon-bongkar.svg +4 -0
- package/src/assets/icons/shipment/icon-invoice.svg +6 -0
- package/src/assets/icons/shipment/icon-loading.svg +8 -0
- package/src/assets/icons/shipment/icon-pembayaran.svg +13 -0
- package/src/assets/icons/shipment/icon-pengiriman.svg +4 -0
- package/src/assets/icons/shipment/icon-sailing.svg +4 -0
- package/src/assets/icons/shipment/icon-shipment-completed.svg +6 -0
- package/src/assets/icons/shipment/icon-shipment-in-progress.svg +6 -0
- package/src/assets/icons/shipment/icon-shipment-over-sla.svg +6 -0
- package/src/assets/icons/shipment/icon-spt.svg +4 -0
- package/src/assets/icons/shipment/icon-total-shipment.svg +4 -0
- package/src/assets/icons/upload_doc_icon.svg +42 -0
- package/src/assets/icons/upload_icon_blue.svg +14 -0
- package/src/assets/login-bg-day-min.jpg +0 -0
- package/src/assets/login-bg-night-min.jpg +0 -0
- package/src/assets/login-bg.jpg +0 -0
- package/src/assets/login-day.png +0 -0
- package/src/assets/login-night.png +0 -0
- package/src/assets/lucide-circle-plus-blue.svg +1 -0
- package/src/assets/pdf-logo.svg +11 -0
- package/src/assets/pemasok-card-bg.svg +6 -0
- package/src/assets/success_animation.gif +0 -0
- package/src/assets/success_animation.mp4 +0 -0
- package/src/assets/success_animation.webm +0 -0
- package/src/components/button/BtnAddOutline.vue +14 -0
- package/src/components/button/BtnCircle.vue +10 -0
- package/src/components/button/BtnOutline.vue +15 -0
- package/src/components/button/BtnPrimary.vue +25 -0
- package/src/components/button/BtnSecondary.vue +26 -0
- package/src/components/detail/AccountDetailTimeline.vue +144 -0
- package/src/components/detail/ApprovalInfo.vue +288 -0
- package/src/components/detail/DCI2.vue +164 -0
- package/src/components/detail/DetailContentHeader.vue +83 -0
- package/src/components/detail/DetailContentItem.vue +186 -0
- package/src/components/detail/DetailContentItems.vue +388 -0
- package/src/components/detail/DetailContentLoading.vue +12 -0
- package/src/components/detail/DetailContentTablet.vue +10 -0
- package/src/components/detail/DetailSheet.vue +294 -0
- package/src/components/detail/DetailTimeline.vue +191 -0
- package/src/components/detail/DocApprovalDialog.vue +29 -0
- package/src/components/detail/DocViewerContent.vue +991 -0
- package/src/components/dialog/ConfirmDialog.vue +96 -0
- package/src/components/dialog/DialogBase.vue +53 -0
- package/src/components/dialog/DialogSelect.vue +212 -0
- package/src/components/dialog/ErrorDialog.vue +63 -0
- package/src/components/dialog/FormDialog.vue +141 -0
- package/src/components/dialog/FormInputerDialog.vue +91 -0
- package/src/components/dialog/InfoDialog.vue +74 -0
- package/src/components/dialog/SuccessDialog.vue +51 -0
- package/src/components/examples/TestSchemaExample.vue +288 -0
- package/src/components/forms/auth/LoginForm.vue +806 -0
- package/src/components/forms/auth/PwdScore.vue +68 -0
- package/src/components/helper/ApiTester.vue +153 -0
- package/src/components/helper/ChangePwd.vue +150 -0
- package/src/components/helper/CheckboxElement.vue +43 -0
- package/src/components/helper/ConfigSwitcher.vue +54 -0
- package/src/components/helper/Copyright.vue +10 -0
- package/src/components/helper/ErrorScreen.vue +40 -0
- package/src/components/helper/LucideIcon.vue +27 -0
- package/src/components/helper/PdfViewer.vue +103 -0
- package/src/components/helper/PinInputer.vue +205 -0
- package/src/components/helper/PrivacyPolicy.vue +122 -0
- package/src/components/layout/PageActivityHeader.vue +48 -0
- package/src/components/layout/PageHeader.vue +70 -0
- package/src/components/loadings/LoadingDialog.vue +29 -0
- package/src/components/loadings/LoadingDialogSpin.vue +25 -0
- package/src/components/loadings/LoadingIndicator.vue +38 -0
- package/src/components/loadings/LoadingScreen.vue +23 -0
- package/src/components/notif/Notif.vue +103 -0
- package/src/components/notif/NotifItem.vue +41 -0
- package/src/components/pages/Header.vue +431 -0
- package/src/components/pages/Leftbar.vue +417 -0
- package/src/components/pages/PageActivity.vue +108 -0
- package/src/components/pages/PageActivityContent.vue +597 -0
- package/src/components/pages/PageContentTable.vue +589 -0
- package/src/components/pages/PageTab.vue +84 -0
- package/src/components/selector/BaseSelector.vue +1136 -0
- package/src/components/selector/ConfigDataSelector.vue +136 -0
- package/src/components/settings/SettingsItem.vue +38 -0
- package/src/components/tab/TabView.vue +11 -0
- package/src/components/tab/TabViewItem.vue +18 -0
- package/src/components/tab/TabViewItemBar.vue +9 -0
- package/src/components/tables/CellHover.vue +65 -0
- package/src/components/tables/DashboardDataTable.vue +707 -0
- package/src/components/tables/DataStatusTag.vue +52 -0
- package/src/components/tables/DataTable.vue +156 -0
- package/src/components/tables/DataTableAccordion.vue +249 -0
- package/src/components/tables/DataTableActionRow.vue +64 -0
- package/src/components/tables/DataTableCell.vue +272 -0
- package/src/components/tables/DataTableHeader.vue +60 -0
- package/src/components/tables/DataTableRow.vue +213 -0
- package/src/components/tables/ExpandedTable.vue +259 -0
- package/src/components/tables/PageTable.vue +73 -0
- package/src/components/tables/Pagination.vue +98 -0
- package/src/components/tables/dropdown/BaseDropdownTable.vue +140 -0
- package/src/components/tables/dropdown/DropdownTableActivity.vue +33 -0
- package/src/components/tables/dropdown/DropdownTableAsset.vue +30 -0
- package/src/components/tables/dropdown/DropdownTableConfig.vue +30 -0
- package/src/components/tables/dropdown/DropdownTableDataKonektor.vue +31 -0
- package/src/components/tables/dropdown/DropdownTableDataLabel.vue +30 -0
- package/src/components/tables/dropdown/DropdownTableDataSchema.vue +31 -0
- package/src/components/tables/dropdown/DropdownTableFabaPemanfaat.vue +30 -0
- package/src/components/tables/dropdown/DropdownTableGroup.vue +36 -0
- package/src/components/tables/dropdown/DropdownTableHalaman.vue +33 -0
- package/src/components/tables/dropdown/DropdownTableLevel.vue +66 -0
- package/src/components/tables/dropdown/DropdownTableOrganization.vue +47 -0
- package/src/components/tables/dropdown/DropdownTablePengelola.vue +28 -0
- package/src/components/tables/dropdown/DropdownTableQueryLayer.vue +29 -0
- package/src/components/tables/dropdown/DropdownTableSentral.vue +33 -0
- package/src/components/tables/dropdown/DropdownTableWarehouse.vue +30 -0
- package/src/components/tables/dropdown/TableDropdown.vue +52 -0
- package/src/components/ui/accordion/Accordion.vue +19 -0
- package/src/components/ui/accordion/AccordionContent.vue +24 -0
- package/src/components/ui/accordion/AccordionItem.vue +24 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +42 -0
- package/src/components/ui/accordion/index.ts +4 -0
- package/src/components/ui/alert-dialog/AlertDialog.vue +14 -0
- package/src/components/ui/alert-dialog/AlertDialogAction.vue +20 -0
- package/src/components/ui/alert-dialog/AlertDialogCancel.vue +20 -0
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +42 -0
- package/src/components/ui/alert-dialog/AlertDialogDescription.vue +25 -0
- package/src/components/ui/alert-dialog/AlertDialogFooter.vue +21 -0
- package/src/components/ui/alert-dialog/AlertDialogHeader.vue +16 -0
- package/src/components/ui/alert-dialog/AlertDialogTitle.vue +22 -0
- package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
- package/src/components/ui/alert-dialog/index.ts +9 -0
- package/src/components/ui/avatar/Avatar.vue +24 -0
- package/src/components/ui/avatar/AvatarFallback.vue +11 -0
- package/src/components/ui/avatar/AvatarImage.vue +9 -0
- package/src/components/ui/avatar/UsersAvatar.vue +28 -0
- package/src/components/ui/avatar/index.ts +24 -0
- package/src/components/ui/button/Button.vue +27 -0
- package/src/components/ui/button/index.ts +34 -0
- package/src/components/ui/calendar/Calendar.vue +325 -0
- package/src/components/ui/calendar/index.ts +22 -0
- package/src/components/ui/checkbox/Checkbox.vue +33 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/command/Command.vue +30 -0
- package/src/components/ui/command/CommandDialog.vue +21 -0
- package/src/components/ui/command/CommandEmpty.vue +20 -0
- package/src/components/ui/command/CommandGroup.vue +29 -0
- package/src/components/ui/command/CommandInput.vue +33 -0
- package/src/components/ui/command/CommandItem.vue +26 -0
- package/src/components/ui/command/CommandList.vue +27 -0
- package/src/components/ui/command/CommandSeparator.vue +23 -0
- package/src/components/ui/command/CommandShortcut.vue +14 -0
- package/src/components/ui/command/index.ts +9 -0
- package/src/components/ui/context-menu/ContextMenu.vue +15 -0
- package/src/components/ui/context-menu/ContextMenuCheckboxItem.vue +40 -0
- package/src/components/ui/context-menu/ContextMenuContent.vue +36 -0
- package/src/components/ui/context-menu/ContextMenuGroup.vue +11 -0
- package/src/components/ui/context-menu/ContextMenuItem.vue +34 -0
- package/src/components/ui/context-menu/ContextMenuLabel.vue +25 -0
- package/src/components/ui/context-menu/ContextMenuPortal.vue +11 -0
- package/src/components/ui/context-menu/ContextMenuRadioGroup.vue +19 -0
- package/src/components/ui/context-menu/ContextMenuRadioItem.vue +40 -0
- package/src/components/ui/context-menu/ContextMenuSeparator.vue +20 -0
- package/src/components/ui/context-menu/ContextMenuShortcut.vue +14 -0
- package/src/components/ui/context-menu/ContextMenuSub.vue +19 -0
- package/src/components/ui/context-menu/ContextMenuSubContent.vue +35 -0
- package/src/components/ui/context-menu/ContextMenuSubTrigger.vue +34 -0
- package/src/components/ui/context-menu/ContextMenuTrigger.vue +13 -0
- package/src/components/ui/context-menu/index.ts +14 -0
- package/src/components/ui/datetime/DatetimeRangeComponent.vue +52 -0
- package/src/components/ui/dialog/Dialog.vue +14 -0
- package/src/components/ui/dialog/DialogClose.vue +11 -0
- package/src/components/ui/dialog/DialogContent.vue +53 -0
- package/src/components/ui/dialog/DialogDescription.vue +24 -0
- package/src/components/ui/dialog/DialogFooter.vue +19 -0
- package/src/components/ui/dialog/DialogHeader.vue +16 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/src/components/ui/dialog/DialogTitle.vue +29 -0
- package/src/components/ui/dialog/DialogTrigger.vue +11 -0
- package/src/components/ui/dialog/index.ts +9 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +14 -0
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +38 -0
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +41 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +22 -0
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +30 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -0
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
- package/src/components/ui/dropdown-menu/index.ts +16 -0
- package/src/components/ui/form/FormControl.vue +16 -0
- package/src/components/ui/form/FormDescription.vue +20 -0
- package/src/components/ui/form/FormItem.vue +25 -0
- package/src/components/ui/form/FormLabel.vue +23 -0
- package/src/components/ui/form/FormMessage.vue +16 -0
- package/src/components/ui/form/index.ts +6 -0
- package/src/components/ui/form/useFormField.ts +30 -0
- package/src/components/ui/hover-card/HoverCard.vue +14 -0
- package/src/components/ui/hover-card/HoverCardContent.vue +41 -0
- package/src/components/ui/hover-card/HoverCardTrigger.vue +11 -0
- package/src/components/ui/hover-card/index.ts +3 -0
- package/src/components/ui/input/Input.vue +24 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/label/Label.vue +27 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/pagination/PaginationEllipsis.vue +22 -0
- package/src/components/ui/pagination/PaginationFirst.vue +29 -0
- package/src/components/ui/pagination/PaginationLast.vue +29 -0
- package/src/components/ui/pagination/PaginationNext.vue +29 -0
- package/src/components/ui/pagination/PaginationPrev.vue +29 -0
- package/src/components/ui/pagination/index.ts +10 -0
- package/src/components/ui/pin-input/PinInput.vue +23 -0
- package/src/components/ui/pin-input/PinInputGroup.vue +18 -0
- package/src/components/ui/pin-input/PinInputInput.vue +18 -0
- package/src/components/ui/pin-input/PinInputSeparator.vue +15 -0
- package/src/components/ui/pin-input/index.ts +4 -0
- package/src/components/ui/popover/Popover.vue +15 -0
- package/src/components/ui/popover/PopoverContent.vue +48 -0
- package/src/components/ui/popover/PopoverTrigger.vue +11 -0
- package/src/components/ui/popover/index.ts +4 -0
- package/src/components/ui/preview/PreviewPdf.vue +118 -0
- package/src/components/ui/progress/ProgressCircle.vue +27 -0
- package/src/components/ui/progress/SemiCircularProgressBar.vue +83 -0
- package/src/components/ui/progress/TotalCalories.vue +31 -0
- package/src/components/ui/radio-group/RadioGroup.vue +25 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +37 -0
- package/src/components/ui/radio-group/index.ts +2 -0
- package/src/components/ui/scroll-area/ScrollArea.vue +29 -0
- package/src/components/ui/scroll-area/ScrollBar.vue +30 -0
- package/src/components/ui/scroll-area/index.ts +2 -0
- package/src/components/ui/select/Select.vue +15 -0
- package/src/components/ui/select/SelectContent.vue +52 -0
- package/src/components/ui/select/SelectGroup.vue +19 -0
- package/src/components/ui/select/SelectInline.vue +84 -0
- package/src/components/ui/select/SelectItem.vue +44 -0
- package/src/components/ui/select/SelectItemText.vue +11 -0
- package/src/components/ui/select/SelectLabel.vue +13 -0
- package/src/components/ui/select/SelectScrollDownButton.vue +24 -0
- package/src/components/ui/select/SelectScrollUpButton.vue +24 -0
- package/src/components/ui/select/SelectSeparator.vue +17 -0
- package/src/components/ui/select/SelectTrigger.vue +31 -0
- package/src/components/ui/select/SelectTriggerCustom.vue +23 -0
- package/src/components/ui/select/SelectValue.vue +11 -0
- package/src/components/ui/select/index.ts +12 -0
- package/src/components/ui/separator/Separator.vue +20 -0
- package/src/components/ui/separator/index.ts +1 -0
- package/src/components/ui/sheet/Sheet.vue +14 -0
- package/src/components/ui/sheet/SheetClose.vue +11 -0
- package/src/components/ui/sheet/SheetContent.vue +48 -0
- package/src/components/ui/sheet/SheetDescription.vue +22 -0
- package/src/components/ui/sheet/SheetFooter.vue +19 -0
- package/src/components/ui/sheet/SheetHeader.vue +16 -0
- package/src/components/ui/sheet/SheetTitle.vue +22 -0
- package/src/components/ui/sheet/SheetTrigger.vue +11 -0
- package/src/components/ui/sheet/index.ts +31 -0
- package/src/components/ui/skeleton/Skeleton.vue +28 -0
- package/src/components/ui/skeleton/index.ts +1 -0
- package/src/components/ui/sonner/Sonner.vue +22 -0
- package/src/components/ui/sonner/index.ts +1 -0
- package/src/components/ui/star/StarRating.vue +19 -0
- package/src/components/ui/switch/Switch.vue +37 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/table/Table.vue +16 -0
- package/src/components/ui/table/TableBody.vue +14 -0
- package/src/components/ui/table/TableCaption.vue +14 -0
- package/src/components/ui/table/TableCell.vue +21 -0
- package/src/components/ui/table/TableEmpty.vue +37 -0
- package/src/components/ui/table/TableFooter.vue +14 -0
- package/src/components/ui/table/TableHead.vue +14 -0
- package/src/components/ui/table/TableHeader.vue +14 -0
- package/src/components/ui/table/TableRow.vue +14 -0
- package/src/components/ui/table/index.ts +8 -0
- package/src/components/ui/tabs/Tabs.vue +15 -0
- package/src/components/ui/tabs/TabsContent.vue +22 -0
- package/src/components/ui/tabs/TabsList.vue +25 -0
- package/src/components/ui/tabs/TabsTrigger.vue +27 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/tags-input/TagsInput.vue +22 -0
- package/src/components/ui/tags-input/TagsInputInput.vue +19 -0
- package/src/components/ui/tags-input/TagsInputItem.vue +22 -0
- package/src/components/ui/tags-input/TagsInputItemDelete.vue +24 -0
- package/src/components/ui/tags-input/TagsInputItemText.vue +19 -0
- package/src/components/ui/tags-input/index.ts +5 -0
- package/src/components/ui/textarea/Textarea.vue +24 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/tooltip/Tooltip.vue +14 -0
- package/src/components/ui/tooltip/TooltipContent.vue +31 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +11 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +11 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/composables/useAppConfig.ts +332 -0
- package/src/composables/useDarkMode.ts +71 -0
- package/src/config/app.config.ts +318 -0
- package/src/config/examples/ecommerce.config.ts +132 -0
- package/src/config/examples/generic.config.ts +132 -0
- package/src/config/menu.config.ts +149 -0
- package/src/config/my-app.config.ts +134 -0
- package/src/config/test-config.ts +32 -0
- package/src/config/theme.config.ts +250 -0
- package/src/docs/index.ts +21 -0
- package/src/docs.scss +403 -0
- package/src/index.d.ts +5 -0
- package/src/index.ts +20 -0
- package/src/layouts/AuthLayout.vue +68 -0
- package/src/layouts/DefaultLayout.vue +119 -0
- package/src/layouts/DocsLayout.vue +681 -0
- package/src/layouts/FormGlobal.vue +50 -0
- package/src/layouts/GlobalDialog.vue +122 -0
- package/src/layouts/RakorConfirmDialog.vue +95 -0
- package/src/layouts/SettingsLayout.vue +115 -0
- package/src/lib/constants.ts +2 -0
- package/src/lib/detail.utils.ts +213 -0
- package/src/lib/form.utils.ts +1009 -0
- package/src/lib/page.flow.utils.ts +81 -0
- package/src/lib/page.utils.ts +865 -0
- package/src/lib/performance.utils.ts +302 -0
- package/src/lib/tablerow.utils.ts +51 -0
- package/src/lib/utils.ts +643 -0
- package/src/main.scss +717 -0
- package/src/main.ts +74 -0
- package/src/menu.ts +78 -0
- package/src/nestedlist_color.scss +161 -0
- package/src/router/index.ts +92 -0
- package/src/stores/auth.ts +117 -0
- package/src/stores/counter.ts +12 -0
- package/src/stores/dialog.ts +168 -0
- package/src/stores/form.ts +103 -0
- package/src/stores/tabs.ts +52 -0
- package/src/tw.scss +419 -0
- package/src/types/form.types.ts +348 -0
- package/src/types/types.ts +7 -0
- package/src/utils/config.utils.ts +149 -0
- package/src/views/NotFound.vue +30 -0
- package/src/views/PageActivity.vue +15 -0
- package/src/views/auth/LoginView.vue +7 -0
- package/src/views/auth/OauthCallback.vue +101 -0
- package/src/views/dashboard/index.vue +16 -0
- package/src/views/settings/AccountSettingsView.vue +70 -0
- package/src/views/settings/AuditLogsSettingsView.vue +116 -0
- package/src/views/settings/DeviceSettingsView.vue +70 -0
- package/src/views/settings/MainSettingsView.vue +12 -0
- package/src/views/settings/ProfileSettingsView.vue +104 -0
- package/src/vueform/config/informasi-gudang.ts +47 -0
- package/src/vueform/config/test-schema.ts +8 -0
- package/src/vueform/config/types.ts +768 -0
- package/src/vueform/customization/classes.js +46 -0
- package/src/vueform/customization/tailwind.classes.js +2117 -0
- package/src/vueform/elements/ConfigDataSelectorElement.vue +50 -0
- package/src/vueform/elements/DateSelectorElement.vue +323 -0
- package/src/vueform/elements/SelectorElement.vue +153 -0
- package/src/vueform/schemas/date-selector-test.ts +103 -0
- package/src/vueform/schemas/informasi-gudang.ts +160 -0
- package/src/vueform/schemas/test-schema.ts +483 -0
- package/src/vueform.config.js +77 -0
- package/src/vueform.validator.ts +77 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, ref, onBeforeMount, computed } from "vue";
|
|
3
|
+
import { useRoute, useRouter } from "vue-router";
|
|
4
|
+
import ScrollArea from "@/components/ui/scroll-area/ScrollArea.vue";
|
|
5
|
+
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion";
|
|
6
|
+
import { ChevronDown, LucideSearch, Search } from "lucide-vue-next";
|
|
7
|
+
import LucideIcon from "@/components/helper/LucideIcon.vue";
|
|
8
|
+
import menuSchema from "@/menu";
|
|
9
|
+
import type { Menu, OrgLevel, Submenu } from "@/menu";
|
|
10
|
+
import { Dialog, DialogContent } from "@/components/ui/dialog";
|
|
11
|
+
import { useAppConfig } from "@/composables/useAppConfig";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Init variable
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
const router = useRouter();
|
|
18
|
+
const route = useRoute();
|
|
19
|
+
|
|
20
|
+
const { companyName, logo, organizationLevels, isConfigLoaded } = useAppConfig();
|
|
21
|
+
|
|
22
|
+
const open = ref(false);
|
|
23
|
+
const commandOpen = ref(false);
|
|
24
|
+
const selectedMenuUri = ref("");
|
|
25
|
+
const menuOpen = ref("");
|
|
26
|
+
const menu = ref<Menu[]>([]);
|
|
27
|
+
const menuFiltered = ref<Menu[]>([]);
|
|
28
|
+
const menuHistory = ref<Submenu[]>([]);
|
|
29
|
+
const q = ref("");
|
|
30
|
+
const orgLevel = ref<OrgLevel | null>(null);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Keys shortcut to open global search
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
function initKeyShortcuts() {
|
|
37
|
+
window.addEventListener("keydown", event => {
|
|
38
|
+
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "k") {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
openSearch();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Go to menu from global search
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
function openMenuItem(item: Menu, submenu: Submenu) {
|
|
50
|
+
menuOpen.value = item.id;
|
|
51
|
+
commandOpen.value = false;
|
|
52
|
+
if (!submenu.url) return;
|
|
53
|
+
|
|
54
|
+
const history = {
|
|
55
|
+
...submenu,
|
|
56
|
+
icon: item.icon,
|
|
57
|
+
iconSize: item.iconSize,
|
|
58
|
+
iconType: item.iconType
|
|
59
|
+
};
|
|
60
|
+
const historyIdx = menuHistory.value.findIndex((r: any) => r.url === submenu.url);
|
|
61
|
+
if (historyIdx >= 0) menuHistory.value.splice(historyIdx, 1);
|
|
62
|
+
menuHistory.value.unshift(history);
|
|
63
|
+
if (menuHistory.value.length > 5) {
|
|
64
|
+
menuHistory.value.pop();
|
|
65
|
+
}
|
|
66
|
+
const historyStr = JSON.stringify(menuHistory.value);
|
|
67
|
+
localStorage.setItem("app.menu_history", historyStr);
|
|
68
|
+
|
|
69
|
+
router.push(submenu.url);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function openSubmenu(item: Menu, submenu: Submenu) {
|
|
73
|
+
menuOpen.value = item.id;
|
|
74
|
+
if (!submenu.url) return;
|
|
75
|
+
router.push(submenu.url);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function getSelectedMenu() {
|
|
79
|
+
if (menuFiltered.value.length > 0) {
|
|
80
|
+
for (const item of menuFiltered.value) {
|
|
81
|
+
if (item.submenu && item.submenu.length > 0) {
|
|
82
|
+
selectedMenuUri.value = item.submenu[0].url || "";
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function openSearch() {
|
|
90
|
+
commandOpen.value = !commandOpen.value;
|
|
91
|
+
getSelectedMenu();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function openSelectedMenu() {
|
|
95
|
+
for (const item of menuFiltered.value) {
|
|
96
|
+
for (const submenu of item.submenu) {
|
|
97
|
+
if (submenu.url === selectedMenuUri.value) {
|
|
98
|
+
openMenuItem(item, submenu);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function selectPreviousMenuItem() {
|
|
105
|
+
let i1 = 0;
|
|
106
|
+
for (const item of menuFiltered.value) {
|
|
107
|
+
let i2 = 0;
|
|
108
|
+
for (const submenu of item.submenu) {
|
|
109
|
+
if (submenu.url === selectedMenuUri.value) {
|
|
110
|
+
if (menuFiltered.value[i1].submenu[i2 - 1]) {
|
|
111
|
+
selectedMenuUri.value = menuFiltered.value[i1].submenu[i2 - 1].url ?? "";
|
|
112
|
+
} else if (menuFiltered.value[i1 - 1]?.submenu[menuFiltered.value[i1 - 1].submenu.length - 1]) {
|
|
113
|
+
selectedMenuUri.value = menuFiltered.value[i1 - 1].submenu[menuFiltered.value[i1 - 1].submenu.length - 1].url ?? "";
|
|
114
|
+
}
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
i2 += 1;
|
|
118
|
+
}
|
|
119
|
+
i1 += 1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function selectNextMenuItem() {
|
|
123
|
+
let i1 = 0;
|
|
124
|
+
for (const item of menuFiltered.value) {
|
|
125
|
+
let i2 = 0;
|
|
126
|
+
for (const submenu of item.submenu) {
|
|
127
|
+
if (submenu.url === selectedMenuUri.value) {
|
|
128
|
+
if (menuFiltered.value[i1].submenu[i2 + 1]) {
|
|
129
|
+
selectedMenuUri.value = menuFiltered.value[i1].submenu[i2 + 1].url ?? "";
|
|
130
|
+
} else if (menuFiltered.value[i1 + 1]?.submenu[0]) {
|
|
131
|
+
selectedMenuUri.value = menuFiltered.value[i1 + 1]?.submenu[0].url ?? "";
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
i2 += 1;
|
|
136
|
+
}
|
|
137
|
+
i1 += 1;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function searchMenu() {
|
|
142
|
+
menuFiltered.value = [];
|
|
143
|
+
const qlower = q.value.toLowerCase();
|
|
144
|
+
for (const item of menu.value) {
|
|
145
|
+
const headerFound = item.name.toLowerCase().includes(qlower) || (item.keyword || "").toLowerCase().includes(qlower);
|
|
146
|
+
if (headerFound) {
|
|
147
|
+
menuFiltered.value.push(item);
|
|
148
|
+
}
|
|
149
|
+
if (!headerFound) {
|
|
150
|
+
const submenu: Submenu[] = [];
|
|
151
|
+
for (const sub of item.submenu) {
|
|
152
|
+
if (sub.name.toLowerCase().includes(qlower) || (sub.keyword || "").toLowerCase().includes(qlower)) {
|
|
153
|
+
submenu.push(sub);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (submenu.length > 0) {
|
|
157
|
+
menuFiltered.value.push({ ...item, submenu });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
getSelectedMenu();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
onBeforeMount(() => {
|
|
165
|
+
searhMenu: for (const item of menuSchema) {
|
|
166
|
+
for (const sub of item.submenu) {
|
|
167
|
+
if (sub.url === route.path) {
|
|
168
|
+
menuOpen.value = item.id;
|
|
169
|
+
break searhMenu;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
onMounted(() => {
|
|
176
|
+
initKeyShortcuts();
|
|
177
|
+
|
|
178
|
+
// Use configurable key for organization level
|
|
179
|
+
orgLevel.value = localStorage.getItem("app.user.organization.level") as any;
|
|
180
|
+
|
|
181
|
+
// For development/testing - provide a fallback if no orgLevel is set
|
|
182
|
+
if (!orgLevel.value) {
|
|
183
|
+
console.warn('No organization level found in localStorage. Using fallback "superadmin" for development.');
|
|
184
|
+
orgLevel.value = "superadmin";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
console.log("Current orgLevel:", orgLevel.value);
|
|
188
|
+
|
|
189
|
+
const historyStr = localStorage.getItem("app.menu_history");
|
|
190
|
+
if (historyStr) {
|
|
191
|
+
try {
|
|
192
|
+
const history = JSON.parse(historyStr);
|
|
193
|
+
if (Array.isArray(history)) menuHistory.value = history;
|
|
194
|
+
} catch (_) {}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// api.get('/auth/directory').then((r) => {
|
|
198
|
+
// for (const item of menuSchema) {
|
|
199
|
+
// for (const sub of item.submenu) {
|
|
200
|
+
// if (sub.url === route.path) menuOpen.value = item.id;
|
|
201
|
+
// sub.visible = r.data.data.findIndex((row: any) => row.url === sub.url) >= 0;
|
|
202
|
+
// }
|
|
203
|
+
// item.submenu = item.submenu.filter(sub => sub.visible);
|
|
204
|
+
// if (item.submenu.length > 0) menu.value.push(item);
|
|
205
|
+
// }
|
|
206
|
+
// })
|
|
207
|
+
|
|
208
|
+
for (const item of menuSchema) {
|
|
209
|
+
for (const sub of item.submenu) {
|
|
210
|
+
if (sub.url === route.path) menuOpen.value = item.id;
|
|
211
|
+
// More lenient visibility check - show if orgLevel matches or if superadmin or if no orgLevels restriction
|
|
212
|
+
sub.visible = (orgLevel.value && sub.orgLevels.includes(orgLevel.value)) || orgLevel.value === "superadmin" || !sub.orgLevels || sub.orgLevels.length === 0;
|
|
213
|
+
|
|
214
|
+
console.log(`Menu item "${sub.name}": orgLevel=${orgLevel.value}, required=${sub.orgLevels}, visible=${sub.visible}`);
|
|
215
|
+
}
|
|
216
|
+
item.submenu = item.submenu.filter(sub => sub.visible);
|
|
217
|
+
if (item.submenu.length > 0) {
|
|
218
|
+
menu.value.push(item);
|
|
219
|
+
console.log(`Added menu group "${item.name}" with ${item.submenu.length} items`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
console.log("Final menu structure:", menu.value);
|
|
224
|
+
// menu.value = menuSchema;
|
|
225
|
+
|
|
226
|
+
// api.get('/auth/page-activity').then((r) => {
|
|
227
|
+
// menu.value = r.data.data;
|
|
228
|
+
// })
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
defineExpose({ openSearch });
|
|
232
|
+
</script>
|
|
233
|
+
|
|
234
|
+
<template>
|
|
235
|
+
<div
|
|
236
|
+
class="leftbar fixed bottom-0 left-0 top-0 z-50 w-20 border-r bg-white transition-all hover:w-[380px] hover:shadow-lg dark:border-dark_border2 dark:bg-dark_bg"
|
|
237
|
+
:class="[{ open: open }]"
|
|
238
|
+
v-on:mouseenter="() => (open = true)"
|
|
239
|
+
v-on:mouseleave="() => (open = false)">
|
|
240
|
+
<ScrollArea class="h-full">
|
|
241
|
+
<!-- Sticky header with logo and search -->
|
|
242
|
+
<div class="sticky-header sticky top-0 z-50 bg-white dark:bg-dark_bg">
|
|
243
|
+
<div class="overflow-hidden pt-6">
|
|
244
|
+
<div class="w-[380px] pl-3">
|
|
245
|
+
<RouterLink to="/" class="relative flex items-center">
|
|
246
|
+
<div class="app-logo mr-3 h-14 w-14 bg-no-repeat transition-all" :style="{ backgroundImage: `url(${logo})` }"></div>
|
|
247
|
+
<div class="text-4xl font-bold text-primary_main">
|
|
248
|
+
{{ companyName }}
|
|
249
|
+
</div>
|
|
250
|
+
<!-- <div v-if="isConfigLoaded" class="ml-2 text-xs text-green-600 dark:text-green-400">✓ Config Loaded</div>
|
|
251
|
+
<div v-else class="ml-2 text-xs text-red-600 dark:text-red-400">⚠ Config Loading...</div> -->
|
|
252
|
+
</RouterLink>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="w-[380px] px-5 pt-6">
|
|
256
|
+
<div
|
|
257
|
+
class="relative flex h-10 cursor-pointer items-center rounded-md text-gray-500 transition dark:hover:border-dark_bg3"
|
|
258
|
+
:class="[{ border: open, 'bg-gray-100 dark:bg-dark_bg2': open }]"
|
|
259
|
+
v-on:click="commandOpen = true">
|
|
260
|
+
<div class="mr-4 flex h-10 w-10 items-center justify-center rounded-md">
|
|
261
|
+
<Search class="scale-90 2xl:scale-100" />
|
|
262
|
+
</div>
|
|
263
|
+
<span class="text-sm opacity-0 transition" :class="[{ 'opacity-100': open }]">Search...</span>
|
|
264
|
+
<span class="absolute right-3 top-1/2 -translate-y-1/2 text-sm text-gray-400 opacity-0 transition" :class="[{ 'opacity-100': open }]">⌘K</span>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="mb-3 mt-3 h-px w-10 bg-gray-200" :class="[{ 'opacity-0': open }]"></div>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<!-- Scrollable content -->
|
|
271
|
+
<div class="overflow-hidden pb-14">
|
|
272
|
+
<div class="w-[380px] px-5">
|
|
273
|
+
<Accordion collapsible type="single" :default-value="menuOpen">
|
|
274
|
+
<AccordionItem v-for="(item, i) in menu" :key="i" :value="item.id" class="relative mb-2 border-none p-0 font-medium text-gray-500 dark:text-dark_text">
|
|
275
|
+
<AccordionTrigger class="relative block p-0 hover:no-underline">
|
|
276
|
+
<RouterLink to="#" class="flex items-center rounded-md transition hover:bg-hover_main hover:text-primary_main dark:hover:bg-dark_bg3 dark:hover:text-dark_text">
|
|
277
|
+
<div
|
|
278
|
+
class="relative mr-4 flex h-10 w-10 items-center justify-center overflow-hidden rounded-md text-gray-800 dark:text-dark_text"
|
|
279
|
+
:class="{
|
|
280
|
+
'bg-active_main dark:bg-blue-500 dark:text-white': menuOpen === item.id
|
|
281
|
+
}">
|
|
282
|
+
<div class="relative z-3">
|
|
283
|
+
<div v-html="item.icon" v-if="item.iconType === 'svg'"></div>
|
|
284
|
+
<LucideIcon :name="item.icon" :size="item.iconSize || 24" :strokeWidth="1.4" class="scale-[.85] 2xl:scale-100" />
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
<div class="text-[13px] opacity-0 transition 2xl:text-[13px]" :class="[{ 'opacity-100': open }]">
|
|
288
|
+
{{ item.name }}
|
|
289
|
+
</div>
|
|
290
|
+
</RouterLink>
|
|
291
|
+
<template v-slot:icon>
|
|
292
|
+
<ChevronDown class="absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400 dark:text-active_main"></ChevronDown>
|
|
293
|
+
</template>
|
|
294
|
+
</AccordionTrigger>
|
|
295
|
+
<AccordionContent v-if="item.submenu && item.submenu.length > 0">
|
|
296
|
+
<div class="group relative py-0.5 pl-10" v-for="(sub, i) in item.submenu" :key="i">
|
|
297
|
+
<div
|
|
298
|
+
class="absolute bottom-0 left-5 top-0 -ml-px w-0.5 bg-gray-200 group-hover:bg-primary_main dark:bg-dark_bg2/60 dark:group-hover:bg-dark_bg4"
|
|
299
|
+
:class="{ '!bg-blue-500': sub.url === route.path }"></div>
|
|
300
|
+
<div class="px-4 pb-px pt-3 text-xs uppercase tracking-wider text-gray-400" v-if="sub.type === 'header'">
|
|
301
|
+
{{ sub.name }}
|
|
302
|
+
</div>
|
|
303
|
+
<div
|
|
304
|
+
class="relative block cursor-pointer rounded-md px-4 py-2 text-xs transition hover:bg-hover_main hover:text-primary_main dark:hover:bg-dark_bg3 dark:hover:text-dark_text 2xl:text-[13px]"
|
|
305
|
+
:class="{
|
|
306
|
+
'bg-active_main text-primary_main dark:!bg-blue-500 dark:!text-white': sub.url === route.path,
|
|
307
|
+
'!text-transparent dark:!text-transparent': !open
|
|
308
|
+
}"
|
|
309
|
+
v-on:click="openSubmenu(item, sub)"
|
|
310
|
+
v-else>
|
|
311
|
+
{{ sub.name }}
|
|
312
|
+
<div
|
|
313
|
+
class="absolute -left-4 top-3 h-2 w-2 rounded-full bg-orange-300 dark:bg-orange-700"
|
|
314
|
+
v-if="sub.url && !sub.ok"
|
|
315
|
+
:class="{
|
|
316
|
+
'!bg-orange-300': sub.connectApi,
|
|
317
|
+
'!bg-green-500': sub.finished
|
|
318
|
+
}"></div>
|
|
319
|
+
</div>
|
|
320
|
+
<template v-if="sub.submenu && sub.submenu.length > 0">
|
|
321
|
+
<div class="pl-4" v-for="(sub2, i2) in sub.submenu" :key="i2">
|
|
322
|
+
<RouterLink :to="sub2.url || '#'" class="block rounded-md px-4 py-2 text-sm hover:bg-hover_main hover:text-primary_main">
|
|
323
|
+
{{ sub2.name }}
|
|
324
|
+
</RouterLink>
|
|
325
|
+
</div>
|
|
326
|
+
</template>
|
|
327
|
+
</div>
|
|
328
|
+
</AccordionContent>
|
|
329
|
+
</AccordionItem>
|
|
330
|
+
</Accordion>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</ScrollArea>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<Dialog v-model:open="commandOpen">
|
|
337
|
+
<DialogContent class="block w-[calc(100%-40px)] max-w-[680px] overflow-hidden p-0 dark:bg-dark_bg2">
|
|
338
|
+
<div class="relative border-b">
|
|
339
|
+
<input
|
|
340
|
+
type="text"
|
|
341
|
+
class="w-full px-12 py-3 dark:bg-dark_bg2"
|
|
342
|
+
placeholder="Cari halaman..."
|
|
343
|
+
v-model="q"
|
|
344
|
+
v-on:input.prevent="searchMenu"
|
|
345
|
+
v-on:keydown.enter.prevent="openSelectedMenu"
|
|
346
|
+
v-on:keydown.up.prevent="selectPreviousMenuItem"
|
|
347
|
+
v-on:keydown.down.prevent="selectNextMenuItem" />
|
|
348
|
+
<LucideSearch class="absolute left-3 top-3 opacity-60" :size="20" />
|
|
349
|
+
</div>
|
|
350
|
+
<div class="h-[400px]">
|
|
351
|
+
<ScrollArea class="h-full">
|
|
352
|
+
<section class="py-3" v-if="!q">
|
|
353
|
+
<div class="px-5 pt-3 text-center" v-if="menuHistory.length > 0">
|
|
354
|
+
<div class="mb-6 px-5 text-sm opacity-60">Ketik untuk mulai pencarian halaman</div>
|
|
355
|
+
<h4 class="mb-4 font-medium">Riwayat Halaman</h4>
|
|
356
|
+
<div class="flex flex-wrap items-start justify-center gap-0">
|
|
357
|
+
<button class="w-24 text-center leading-none" v-for="(item, i) in menuHistory" :key="i" v-on:click="openMenuItem(item as any, item)">
|
|
358
|
+
<div class="mx-auto mb-2 flex size-20 items-center justify-center rounded-lg border text-slate-500 hover:border-slate-500 hover:bg-slate-100 hover:text-blue-600 hover:shadow-md">
|
|
359
|
+
<LucideIcon :name="item.icon" :size="item.iconSize ? item.iconSize + 20 : 44" :strokeWidth="1.4" class="mx-auto flex-none" />
|
|
360
|
+
</div>
|
|
361
|
+
<span class="text-xs font-medium leading-none">
|
|
362
|
+
{{ item.name }}
|
|
363
|
+
</span>
|
|
364
|
+
</button>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
<div class="px-5 text-sm opacity-60" v-else>Ketik untuk mulai pencarian halaman</div>
|
|
368
|
+
</section>
|
|
369
|
+
<section class="px-5 py-3 text-sm opacity-60" v-else-if="menuFiltered.length < 1">
|
|
370
|
+
<i>Halaman tidak ditemukan!</i>
|
|
371
|
+
</section>
|
|
372
|
+
<section class="py-3" v-else>
|
|
373
|
+
<div v-for="(item, i1) in menuFiltered" :key="item.id" class="px-2 pb-3">
|
|
374
|
+
<h4 class="mb-1 px-3 text-[13px] font-medium opacity-85">
|
|
375
|
+
{{ item.name }}
|
|
376
|
+
</h4>
|
|
377
|
+
<div v-for="(submenu, i2) in item.submenu" :key="submenu.url">
|
|
378
|
+
<button
|
|
379
|
+
v-on:click="openMenuItem(item, submenu)"
|
|
380
|
+
v-if="submenu.type !== 'header'"
|
|
381
|
+
class="flex w-full cursor-pointer items-center rounded-sm px-3 py-1.5 text-sm hover:!bg-blue-500 hover:!text-white dark:hover:!bg-blue-600"
|
|
382
|
+
:class="{
|
|
383
|
+
'bg-blue-50 text-white dark:bg-dark_bg5': submenu.url === route.path,
|
|
384
|
+
'!bg-blue-200 dark:!bg-dark_bg5': submenu.url === selectedMenuUri
|
|
385
|
+
}">
|
|
386
|
+
<LucideIcon :name="item.icon" :size="item.iconSize ? item.iconSize - 8 : 16" :strokeWidth="1.4" class="mr-3 flex-none" />
|
|
387
|
+
{{ submenu.name }}
|
|
388
|
+
</button>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</section>
|
|
392
|
+
</ScrollArea>
|
|
393
|
+
</div>
|
|
394
|
+
</DialogContent>
|
|
395
|
+
</Dialog>
|
|
396
|
+
</template>
|
|
397
|
+
|
|
398
|
+
<style lang="scss">
|
|
399
|
+
.leftbar {
|
|
400
|
+
.app-logo {
|
|
401
|
+
background-position: top center;
|
|
402
|
+
background-size: 2.6rem auto;
|
|
403
|
+
background-repeat: no-repeat;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
&.open {
|
|
407
|
+
.app-logo {
|
|
408
|
+
background-size: 3.5rem auto;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.sticky-header {
|
|
413
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
414
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import PageActivityContent from "@/components/pages/PageActivityContent.vue";
|
|
3
|
+
import type { CustomTab } from "@/components/pages/PageTab.vue";
|
|
4
|
+
import type { DasiV2FormSchema, FormSchema, FormSchemaHooks } from "@/types/form.types";
|
|
5
|
+
import type { ColumnRef } from "@/vueform/config/types";
|
|
6
|
+
import { nextTick, onMounted, ref, watch } from "vue";
|
|
7
|
+
import { useRoute } from "vue-router";
|
|
8
|
+
|
|
9
|
+
const route = useRoute();
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* As default page initialization
|
|
13
|
+
* will do automatic get from routes
|
|
14
|
+
*
|
|
15
|
+
* If manualInit is set to true, you have to hit
|
|
16
|
+
* initPage manualy after setting pageCode and endpoint
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
const props = defineProps(['manualInit']);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Base
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
const pageCode = defineModel<string>('pageCode', { default: '' });
|
|
26
|
+
const endpoint = defineModel<string>('endpoint', { default: '' });
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Form by Vueform
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
const formSchema = ref<DasiV2FormSchema>();
|
|
33
|
+
const formHooks = ref<FormSchemaHooks>();
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Model binding
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
const data = ref<any[]>();
|
|
40
|
+
const customTabs = ref<CustomTab[]>();
|
|
41
|
+
const columns = ref<ColumnRef[]>();
|
|
42
|
+
const tab = ref<string>();
|
|
43
|
+
const loading = ref<boolean>();
|
|
44
|
+
const dataError = ref<string | null>();
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* El
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
const pac = ref<InstanceType<typeof PageActivityContent>>();
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Init page with timeout or nextTick
|
|
54
|
+
* to make sure the model already set
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
async function initPage() {
|
|
58
|
+
await nextTick();
|
|
59
|
+
pac.value?.initPage();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Re-init page
|
|
64
|
+
* if route params changed
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
watch(
|
|
68
|
+
() => route.params,
|
|
69
|
+
(newParams) => {
|
|
70
|
+
if (props.manualInit) return;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Only reinitialize if the page or activity params have changed
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
if (pageCode.value !== String(newParams.page) || endpoint.value !== String(newParams.activity)) {
|
|
77
|
+
pageCode.value = String(newParams.page);
|
|
78
|
+
endpoint.value = String(newParams.activity);
|
|
79
|
+
initPage();
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{ deep: true },
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
if (props.manualInit) return;
|
|
87
|
+
pageCode.value = String(route.params.page);
|
|
88
|
+
endpoint.value = String(route.params.activity);
|
|
89
|
+
initPage();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
defineExpose({ initPage });
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<template>
|
|
96
|
+
<PageActivityContent ref="pac"
|
|
97
|
+
:page-code="pageCode"
|
|
98
|
+
:endpoint="endpoint"
|
|
99
|
+
v-model:schema="formSchema"
|
|
100
|
+
v-model:hooks="formHooks"
|
|
101
|
+
v-model:data="data"
|
|
102
|
+
v-model:custom-tabs="customTabs"
|
|
103
|
+
v-model:columns="columns"
|
|
104
|
+
v-model:tab="tab"
|
|
105
|
+
v-model:loading="loading"
|
|
106
|
+
v-model:data-error="dataError"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|