@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,259 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
|
4
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
5
|
+
import LoadingIndicator from "@/components/loadings/LoadingIndicator.vue";
|
|
6
|
+
import { LucideDatabase, LucideOctagonAlert, LucideSquare } from "lucide-vue-next";
|
|
7
|
+
import BtnPrimary from "@/components/button/BtnPrimary.vue";
|
|
8
|
+
import BaseDropdownTable from "@/components/tables/dropdown/BaseDropdownTable.vue";
|
|
9
|
+
import { DropdownMenuItem, DropdownMenuSeparator } from "@/components/ui/dropdown-menu";
|
|
10
|
+
import LucideIcon from "@/components/LucideIcon.vue";
|
|
11
|
+
import DetailSheet from "@/components/detail/DetailSheet.vue";
|
|
12
|
+
import DataTableCell from "./DataTableCell.vue";
|
|
13
|
+
import PinInputer from "@/components/PinInputer.vue";
|
|
14
|
+
import Accordion from "@/components/ui/accordion/Accordion.vue";
|
|
15
|
+
import AccordionItem from "@/components/ui/accordion/AccordionItem.vue";
|
|
16
|
+
import AccordionTrigger from "@/components/ui/accordion/AccordionTrigger.vue";
|
|
17
|
+
import AccordionContent from "@/components/ui/accordion/AccordionContent.vue";
|
|
18
|
+
import { ChevronDown } from "lucide-vue-next";
|
|
19
|
+
|
|
20
|
+
export interface ColumnAction {
|
|
21
|
+
label?: string;
|
|
22
|
+
icon?: string;
|
|
23
|
+
iconSize?: number;
|
|
24
|
+
action: (index: number, row: any) => void;
|
|
25
|
+
negative?: boolean;
|
|
26
|
+
type?: "separator" | "item";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ColumnRef {
|
|
30
|
+
key: string;
|
|
31
|
+
header?: string;
|
|
32
|
+
size?: number;
|
|
33
|
+
bold?: boolean;
|
|
34
|
+
descriptonKey?: string;
|
|
35
|
+
descriptonKeys?: string[];
|
|
36
|
+
codeKeys?: string[];
|
|
37
|
+
type?: "cell" | "action" | "notifIcon";
|
|
38
|
+
showFavorite?: boolean;
|
|
39
|
+
showCustomButton?: boolean;
|
|
40
|
+
customButtonLabel?: string;
|
|
41
|
+
customButtonIcon?: string;
|
|
42
|
+
customButtonIconSize?: number;
|
|
43
|
+
customButtonIconFill?: boolean;
|
|
44
|
+
customButtonIconClass?: string;
|
|
45
|
+
showAction?: boolean;
|
|
46
|
+
cellRender?: (index: number, row: any) => void;
|
|
47
|
+
onFavoritChanged?: (index: number, row: any) => void;
|
|
48
|
+
onCustomButtonClicked?: (index: number, row: any) => void;
|
|
49
|
+
actions?: (index: number, row: any) => ColumnAction[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface Props {
|
|
53
|
+
data: any;
|
|
54
|
+
columns: ColumnRef[];
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
loadingType?: "skeleton" | "loader";
|
|
57
|
+
error?: string | null;
|
|
58
|
+
formSchema?: any;
|
|
59
|
+
endpoint?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
63
|
+
loading: false,
|
|
64
|
+
loadingType: "loader",
|
|
65
|
+
error: null,
|
|
66
|
+
data: []
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const emits = defineEmits(["getData"]);
|
|
70
|
+
const detailSheet: any = ref(null);
|
|
71
|
+
const menuOpen = ref("1");
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* PIN
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
const pinInputer: any = ref(null);
|
|
78
|
+
|
|
79
|
+
function openDetail(item: any) {
|
|
80
|
+
pinInputer.value.open((b: boolean) => {
|
|
81
|
+
if (!b) return;
|
|
82
|
+
|
|
83
|
+
detailSheet.value.open({
|
|
84
|
+
item,
|
|
85
|
+
endpoint: props.endpoint,
|
|
86
|
+
schema: props.formSchema
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<div>
|
|
94
|
+
<Table class="border-y bg-white dark:border-y-slate-700 dark:bg-slate-800">
|
|
95
|
+
<TableBody v-if="error">
|
|
96
|
+
<TableRow>
|
|
97
|
+
<TableCell colspan="999" class="bg-red-50">
|
|
98
|
+
<div class="flex min-h-[calc(100vh-440px)] items-center">
|
|
99
|
+
<div class="w-full text-center text-red-500">
|
|
100
|
+
<LucideOctagonAlert :size="40" :stroke-width="1.5" class="mx-auto mb-3" />
|
|
101
|
+
<div class="text-lg font-bold">Loading Data Error</div>
|
|
102
|
+
<div class="mb-4 text-sm">{{ error }}</div>
|
|
103
|
+
<BtnPrimary class="h-9 rounded-full py-0" v-on:click="emits('getData')">Coba Lagi</BtnPrimary>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</TableCell>
|
|
107
|
+
</TableRow>
|
|
108
|
+
</TableBody>
|
|
109
|
+
<TableBody v-else-if="props.loading">
|
|
110
|
+
<template v-if="props.loadingType === 'skeleton'">
|
|
111
|
+
<TableRow v-for="i in 25" :key="i" class="border-slate-100 dark:border-slate-700">
|
|
112
|
+
<TableCell colspan="10" class="bg-white px-8 py-3 dark:bg-slate-800">
|
|
113
|
+
<div class="flex gap-2">
|
|
114
|
+
<Skeleton class="h-6 w-6 rounded-s"></Skeleton>
|
|
115
|
+
<Skeleton class="h-6 w-full rounded-s"></Skeleton>
|
|
116
|
+
</div>
|
|
117
|
+
</TableCell>
|
|
118
|
+
</TableRow>
|
|
119
|
+
</template>
|
|
120
|
+
<TableRow v-else>
|
|
121
|
+
<TableCell colspan="999" class="bg-slate-50 dark:bg-slate-900">
|
|
122
|
+
<div class="flex h-[calc(100vh-420px)] items-center justify-center">
|
|
123
|
+
<LoadingIndicator></LoadingIndicator>
|
|
124
|
+
</div>
|
|
125
|
+
</TableCell>
|
|
126
|
+
</TableRow>
|
|
127
|
+
</TableBody>
|
|
128
|
+
<TableBody v-else-if="data.length">
|
|
129
|
+
<TableRow>
|
|
130
|
+
<TableCell colspan="999" class="p-0">
|
|
131
|
+
<div class="flex">
|
|
132
|
+
<div class="w-full text-left">
|
|
133
|
+
<Accordion collapsible type="single" :default-value="menuOpen">
|
|
134
|
+
<AccordionItem v-for="(item, i) in data" :key="i" :value="item.id" class="relative border-none font-medium text-gray-500" :class="menuOpen === item.id ? 'bg-blue-50' : 'bg-white'">
|
|
135
|
+
<AccordionTrigger @click="menuOpen = item.id" class="relative w-full justify-start gap-10 border-b-2 pl-10 text-start hover:no-underline">
|
|
136
|
+
<template v-slot:icon>
|
|
137
|
+
<div class="flex items-center gap-2">
|
|
138
|
+
<ChevronDown class="mr-5 h-4 w-4 text-gray-400"></ChevronDown>
|
|
139
|
+
<div :class="menuOpen === item.id ? 'font-bold text-blue-500' : 'text-black'">
|
|
140
|
+
{{ item.status }}
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<span class="text-slate-400">({{ item.data.length }} Pengiriman)</span>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
</AccordionTrigger>
|
|
147
|
+
<AccordionContent>
|
|
148
|
+
<TableHeader>
|
|
149
|
+
<TableRow class="dark:border-slate-700">
|
|
150
|
+
<TableHead
|
|
151
|
+
class="bg-white pl-8 pr-3.5 font-bold dark:bg-slate-900"
|
|
152
|
+
v-for="cell in props.columns"
|
|
153
|
+
:key="cell.key"
|
|
154
|
+
:style="{
|
|
155
|
+
width: cell.size ? `${cell.size}px` : 'auto'
|
|
156
|
+
}">
|
|
157
|
+
{{ cell.header }}
|
|
158
|
+
</TableHead>
|
|
159
|
+
</TableRow>
|
|
160
|
+
</TableHeader>
|
|
161
|
+
<TableBody v-if="data.length">
|
|
162
|
+
<TableRow v-for="(row, i) in item.data" :key="i" class="border-gray-100 dark:border-slate-700">
|
|
163
|
+
<!-- Table Content -->
|
|
164
|
+
|
|
165
|
+
<TableCell
|
|
166
|
+
class="pl-8 pr-3.5 align-top"
|
|
167
|
+
v-for="(cell, i2) in columns"
|
|
168
|
+
:key="cell.key"
|
|
169
|
+
:style="{
|
|
170
|
+
width: cell.size ? `${cell.size}px` : 'auto'
|
|
171
|
+
}">
|
|
172
|
+
<div v-if="cell.type === 'notifIcon'">
|
|
173
|
+
<div class="flex items-center">
|
|
174
|
+
<div
|
|
175
|
+
class="mr-3 flex size-9 items-center justify-center rounded-full bg-blue-100 text-blue-500"
|
|
176
|
+
:style="{
|
|
177
|
+
'background-color': row.iconBgColor,
|
|
178
|
+
color: row.iconColor
|
|
179
|
+
}">
|
|
180
|
+
<img :src="row.customIcon.url" v-if="row.useCustomIcon && row.customIcon && row.customIcon.url" class="h-5" />
|
|
181
|
+
<LucideIcon
|
|
182
|
+
v-else-if="row.iconName"
|
|
183
|
+
:name="row.iconName.replace(/^[a-z]|-([a-z])/g, (g: string) => (g.length === 1 ? g.toUpperCase() : g[1].toUpperCase()))"
|
|
184
|
+
:size="20"
|
|
185
|
+
:stroke-width="2" />
|
|
186
|
+
</div>
|
|
187
|
+
<div>
|
|
188
|
+
<b>{{ row.name }}</b
|
|
189
|
+
><br />{{ row.code }}
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
<DataTableCell :i="i" :row="row" :cell="cell" />
|
|
194
|
+
<div v-if="cell.type === 'action'">
|
|
195
|
+
<BaseDropdownTable
|
|
196
|
+
:row="cell"
|
|
197
|
+
:show-favorite="cell.showFavorite"
|
|
198
|
+
@on-favorit-changed="cell.onFavoritChanged ? cell.onFavoritChanged(i, row) : () => {}"
|
|
199
|
+
:show-action="cell.showAction"
|
|
200
|
+
:show-custom-button="cell.showCustomButton"
|
|
201
|
+
:custom-button-label="cell.customButtonLabel"
|
|
202
|
+
:custom-button-icon="cell.customButtonIcon"
|
|
203
|
+
:custom-button-icon-size="cell.customButtonIconSize"
|
|
204
|
+
:custom-button-icon-fill="cell.customButtonIconFill"
|
|
205
|
+
:custom-button-icon-class="cell.customButtonIconClass"
|
|
206
|
+
@custom-button-clicked="cell.onCustomButtonClicked ? cell.onCustomButtonClicked(i, row) : () => {}"
|
|
207
|
+
:show-view-detail="props.formSchema !== undefined"
|
|
208
|
+
v-on:view-detail="openDetail(row)">
|
|
209
|
+
<template v-if="cell.actions">
|
|
210
|
+
<div v-for="(action, i2) in cell.actions(i, row)" :key="i2">
|
|
211
|
+
<DropdownMenuSeparator v-if="action.type === 'separator'"></DropdownMenuSeparator>
|
|
212
|
+
<DropdownMenuItem
|
|
213
|
+
@click="action.action(i, row)"
|
|
214
|
+
v-else-if="action.action"
|
|
215
|
+
class="cursor-pointer items-start"
|
|
216
|
+
:class="{
|
|
217
|
+
'!text-red-500': action.negative
|
|
218
|
+
}"
|
|
219
|
+
:data-test="action.label">
|
|
220
|
+
<LucideIcon :name="action.icon" :size="action.iconSize || 18" :strokeWidth="1" v-if="action.icon" class="mr-2 mt-px" />
|
|
221
|
+
<LucideSquare :size="18" :stroke-width="1" class="mr-2 mt-px text-transparent" v-else />
|
|
222
|
+
<span>{{ action.label }}</span>
|
|
223
|
+
</DropdownMenuItem>
|
|
224
|
+
</div>
|
|
225
|
+
</template>
|
|
226
|
+
</BaseDropdownTable>
|
|
227
|
+
</div>
|
|
228
|
+
</TableCell>
|
|
229
|
+
|
|
230
|
+
<!-- End Table COntent -->
|
|
231
|
+
</TableRow>
|
|
232
|
+
</TableBody>
|
|
233
|
+
</AccordionContent>
|
|
234
|
+
</AccordionItem>
|
|
235
|
+
</Accordion>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</TableCell>
|
|
239
|
+
</TableRow>
|
|
240
|
+
</TableBody>
|
|
241
|
+
|
|
242
|
+
<TableBody v-else>
|
|
243
|
+
<TableRow>
|
|
244
|
+
<TableCell colspan="999" class="bg-slate-50">
|
|
245
|
+
<div class="flex min-h-[calc(100vh-440px)] items-center">
|
|
246
|
+
<div class="w-full text-center">
|
|
247
|
+
<LucideDatabase :size="40" :stroke-width="1.5" class="mx-auto mb-3 text-gray-500" />
|
|
248
|
+
<div class="text-lg font-semibold">Tidak Ada Data</div>
|
|
249
|
+
<div class="text-sm text-gray-500">Maaf! Data Anda belum tersedia</div>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</TableCell>
|
|
253
|
+
</TableRow>
|
|
254
|
+
</TableBody>
|
|
255
|
+
</Table>
|
|
256
|
+
</div>
|
|
257
|
+
<DetailSheet ref="detailSheet" />
|
|
258
|
+
<PinInputer ref="pinInputer" />
|
|
259
|
+
</template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
Table,
|
|
5
|
+
TableBody,
|
|
6
|
+
TableCell,
|
|
7
|
+
TableHead,
|
|
8
|
+
TableHeader,
|
|
9
|
+
TableRow
|
|
10
|
+
} from '@/components/ui/table'
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
DropdownMenu,
|
|
14
|
+
DropdownMenuContent,
|
|
15
|
+
DropdownMenuItem,
|
|
16
|
+
DropdownMenuSeparator,
|
|
17
|
+
DropdownMenuTrigger
|
|
18
|
+
} from '@/components/ui/dropdown-menu'
|
|
19
|
+
|
|
20
|
+
import { EllipsisVertical } from 'lucide-vue-next'
|
|
21
|
+
|
|
22
|
+
defineProps(['pages', 'pageColumns'])
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<Table class="bg-white">
|
|
27
|
+
<!-- <TableCaption>A list of your recent invoices.</TableCaption> -->
|
|
28
|
+
<TableHeader>
|
|
29
|
+
<TableRow>
|
|
30
|
+
<TableHead
|
|
31
|
+
v-for="column in pageColumns"
|
|
32
|
+
:key="column.id"
|
|
33
|
+
class="font-bold"
|
|
34
|
+
:class="column.class"
|
|
35
|
+
>{{ column.title }}</TableHead
|
|
36
|
+
>
|
|
37
|
+
</TableRow>
|
|
38
|
+
</TableHeader>
|
|
39
|
+
<TableBody v-if="pages.length > 0">
|
|
40
|
+
<TableRow v-for="page in pages" :key="page.id">
|
|
41
|
+
<TableCell>
|
|
42
|
+
{{ page.id }}
|
|
43
|
+
</TableCell>
|
|
44
|
+
<TableCell>
|
|
45
|
+
<p v-for="(nama, index) in page.nama_page" :key="index">{{ nama }}</p>
|
|
46
|
+
</TableCell>
|
|
47
|
+
<TableCell>
|
|
48
|
+
<p class="flex">{{ page.page }}</p>
|
|
49
|
+
</TableCell>
|
|
50
|
+
<TableCell>
|
|
51
|
+
<div class="flex justify-between items-center h-full">
|
|
52
|
+
<span>{{ page.akses }}</span>
|
|
53
|
+
<DropdownMenu>
|
|
54
|
+
<DropdownMenuTrigger as-child>
|
|
55
|
+
<EllipsisVertical class="cursor-pointer" />
|
|
56
|
+
</DropdownMenuTrigger>
|
|
57
|
+
<DropdownMenuContent class="w-56" align="end">
|
|
58
|
+
<DropdownMenuItem class="cursor-pointer">Edit aktifitas</DropdownMenuItem>
|
|
59
|
+
<DropdownMenuItem class="cursor-pointer">Sesuaikan akses</DropdownMenuItem>
|
|
60
|
+
<DropdownMenuSeparator />
|
|
61
|
+
<DropdownMenuItem class="cursor-pointer">Hapus aktifitas</DropdownMenuItem>
|
|
62
|
+
</DropdownMenuContent>
|
|
63
|
+
</DropdownMenu>
|
|
64
|
+
</div>
|
|
65
|
+
</TableCell>
|
|
66
|
+
</TableRow>
|
|
67
|
+
</TableBody>
|
|
68
|
+
|
|
69
|
+
<TableBody v-else>
|
|
70
|
+
<TableRow class="grid h-24 text-center place-content-center">No results.</TableRow>
|
|
71
|
+
</TableBody>
|
|
72
|
+
</Table>
|
|
73
|
+
</template>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Pagination, PaginationEllipsis, PaginationList, PaginationListItem, PaginationNext, PaginationPrev } from "@/components/ui/pagination";
|
|
3
|
+
import { Button } from "@/components/ui/button";
|
|
4
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
import { ChevronLeft, ChevronRight } from "lucide-vue-next";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
totalData: number;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const currentPage = defineModel("currentPage", { default: 25 });
|
|
14
|
+
const itemsPerPage = defineModel("itemsPerPage", { default: 0 });
|
|
15
|
+
const emits = defineEmits(["getData"]);
|
|
16
|
+
const props = withDefaults(defineProps<Props>(), { totalData: 0, loading: false });
|
|
17
|
+
const maxPage = computed(() => {
|
|
18
|
+
return Math.ceil(props.totalData / itemsPerPage.value);
|
|
19
|
+
});
|
|
20
|
+
const itemsPerPage10 = computed(() => {
|
|
21
|
+
return itemsPerPage.value === 10;
|
|
22
|
+
});
|
|
23
|
+
const itemsPerPage25 = computed(() => {
|
|
24
|
+
return itemsPerPage.value === 25;
|
|
25
|
+
});
|
|
26
|
+
const itemsPerPage50 = computed(() => {
|
|
27
|
+
return itemsPerPage.value === 50;
|
|
28
|
+
});
|
|
29
|
+
const itemsPerPage100 = computed(() => {
|
|
30
|
+
return itemsPerPage.value === 100;
|
|
31
|
+
});
|
|
32
|
+
const itemsPerPage150 = computed(() => {
|
|
33
|
+
return itemsPerPage.value === 150;
|
|
34
|
+
});
|
|
35
|
+
const itemsPerPage250 = computed(() => {
|
|
36
|
+
return itemsPerPage.value === 250;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
function selectItemsPerPage(_i: number) {
|
|
40
|
+
itemsPerPage.value = _i;
|
|
41
|
+
emits("getData");
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<section class="flex w-full items-center px-5">
|
|
47
|
+
<div class="mr-auto text-sm text-gray-500">
|
|
48
|
+
Menampilkan
|
|
49
|
+
<span v-if="loading">...</span>
|
|
50
|
+
<template v-else>
|
|
51
|
+
<DropdownMenu>
|
|
52
|
+
<DropdownMenuTrigger as-child>
|
|
53
|
+
<Button variant="outline" class="hover:bg-primary_main_hover hover:border-primary_main_hover mx-2 h-8 rounded-sm border border-gray-300 px-2 transition hover:shadow-md">
|
|
54
|
+
{{ itemsPerPage }}
|
|
55
|
+
</Button>
|
|
56
|
+
</DropdownMenuTrigger>
|
|
57
|
+
<DropdownMenuContent class="w-56">
|
|
58
|
+
<DropdownMenuLabel>Item per halaman</DropdownMenuLabel>
|
|
59
|
+
<DropdownMenuSeparator />
|
|
60
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage10" v-on:select="selectItemsPerPage(10)"> 10 item </DropdownMenuCheckboxItem>
|
|
61
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage25" v-on:select="selectItemsPerPage(25)"> 25 item </DropdownMenuCheckboxItem>
|
|
62
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage50" v-on:select="selectItemsPerPage(50)"> 50 item </DropdownMenuCheckboxItem>
|
|
63
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage100" v-on:select="selectItemsPerPage(100)"> 100 item </DropdownMenuCheckboxItem>
|
|
64
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage150" v-on:select="selectItemsPerPage(150)"> 150 item </DropdownMenuCheckboxItem>
|
|
65
|
+
<DropdownMenuCheckboxItem v-model:checked="itemsPerPage250" v-on:select="selectItemsPerPage(250)"> 250 item </DropdownMenuCheckboxItem>
|
|
66
|
+
</DropdownMenuContent>
|
|
67
|
+
</DropdownMenu>
|
|
68
|
+
dari {{ props.totalData.toLocaleString("id") }}
|
|
69
|
+
</template>
|
|
70
|
+
</div>
|
|
71
|
+
<Pagination v-model:page="currentPage" v-model:items-per-page="itemsPerPage" :total="props.totalData" :sibling-count="1" show-edges :default-page="1" v-on:update:page="emits('getData')">
|
|
72
|
+
<PaginationList v-slot="{ items }" class="flex items-center gap-1">
|
|
73
|
+
<PaginationPrev class="h-8 w-9 rounded-lg" v-if="currentPage > 1">
|
|
74
|
+
<ChevronLeft :stroke-width="1.5" :size="24" />
|
|
75
|
+
</PaginationPrev>
|
|
76
|
+
<PaginationPrev class="h-8 w-9 rounded-lg !bg-transparent opacity-30" v-else>
|
|
77
|
+
<ChevronLeft :stroke-width="1.5" :size="24" />
|
|
78
|
+
</PaginationPrev>
|
|
79
|
+
|
|
80
|
+
<template v-for="(item, index) in items">
|
|
81
|
+
<PaginationListItem v-if="item.type === 'page'" :key="index" :value="item.value" as-child>
|
|
82
|
+
<Button class="h-8 w-9 rounded-lg p-0" :variant="item.value === currentPage ? 'default' : 'ghost'">
|
|
83
|
+
{{ item.value }}
|
|
84
|
+
</Button>
|
|
85
|
+
</PaginationListItem>
|
|
86
|
+
<PaginationEllipsis v-else :key="item.type" :index="index" />
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<PaginationNext class="h-8 w-9 rounded-lg" v-if="currentPage < maxPage">
|
|
90
|
+
<ChevronRight :stroke-width="1.5" :size="24" />
|
|
91
|
+
</PaginationNext>
|
|
92
|
+
<PaginationNext class="h-8 w-9 rounded-lg !bg-transparent opacity-30" v-else>
|
|
93
|
+
<ChevronRight :stroke-width="1.5" :size="24" />
|
|
94
|
+
</PaginationNext>
|
|
95
|
+
</PaginationList>
|
|
96
|
+
</Pagination>
|
|
97
|
+
</section>
|
|
98
|
+
</template>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
|
|
3
|
+
import BtnCircle from "@/components/button/BtnCircle.vue";
|
|
4
|
+
import { EllipsisVertical, Star, LucideChevronRight, LucideLoaderCircle, LucideSend, LucideUserRoundCheck, LucideUserCheck2, LucideUserCheck, LucideChevronLeft, LucideArrowLeftFromLine, LucidePencilLine } from "lucide-vue-next";
|
|
5
|
+
import LucideIcon from "@/components/helper/LucideIcon.vue";
|
|
6
|
+
import { cn, isValidValue } from "@/lib/utils";
|
|
7
|
+
import { onMounted, ref } from "vue";
|
|
8
|
+
import api from "@/api/api";
|
|
9
|
+
import { string } from "@vueform/vueform";
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
i: Number,
|
|
13
|
+
row: Object as any,
|
|
14
|
+
cell: Object as any,
|
|
15
|
+
showAction: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
showViewDetail: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
itemLoading: {
|
|
24
|
+
type: Object as any,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
rowActions: {
|
|
28
|
+
type: Object as any,
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
customBtnConfig: {
|
|
32
|
+
type: Object as any,
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
endpoint: string,
|
|
37
|
+
pageConfig: Object as any
|
|
38
|
+
});
|
|
39
|
+
const emits = defineEmits(["onFavoritChanged", "viewDetail", 'openApproval', "customBtnClick", 'edit']);
|
|
40
|
+
const loading = ref(false);
|
|
41
|
+
const myApproval = ref<any>();
|
|
42
|
+
|
|
43
|
+
function customBtnClicked(btnId?: string) {
|
|
44
|
+
if (props.customBtnConfig && props.customBtnConfig.onClick) {
|
|
45
|
+
props.customBtnConfig.onClick(props.i ?? 0, props.row, btnId);
|
|
46
|
+
}
|
|
47
|
+
emits("customBtnClick", props.i ?? 0, props.row, btnId);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function hasActionBtn(row: any): boolean {
|
|
51
|
+
return (props.customBtnConfig && props.customBtnConfig.show)
|
|
52
|
+
|| (['APPROVAL_REQUIRED', 'WAITING_APPROVAL', 'APPROVED_PARTIALY'].includes(row.status) && !props.pageConfig?.forceDisplayActionRow)
|
|
53
|
+
|| (props.rowActions && props.rowActions.length > 0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
if (['WAITING_APPROVAL', 'APPROVED_PARTIALY'].includes(props.row.status)) {
|
|
58
|
+
loading.value = true;
|
|
59
|
+
api.get(`${props.pageConfig?.viewDocsEndpoint ?? props.endpoint}/${props.row.id}/my-approval`).then((r) => {
|
|
60
|
+
myApproval.value = r.data.data;
|
|
61
|
+
}).finally(() => {
|
|
62
|
+
loading.value = false;
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<div class="flex items-center justify-end gap-2 pr-1">
|
|
70
|
+
<div class="flex items-center pr-1" v-if="itemLoading || loading">
|
|
71
|
+
<LucideLoaderCircle class="animate-spin opacity-50" :size="24" />
|
|
72
|
+
<span class="ml-1.5 text-xs opacity-65" v-if="typeof itemLoading === 'string'">
|
|
73
|
+
{{ itemLoading }}
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
<template v-else>
|
|
77
|
+
<template v-if="rowActions && rowActions.length > 0">
|
|
78
|
+
<BtnCircle
|
|
79
|
+
v-for="(rowAction, i2) in rowActions"
|
|
80
|
+
:key="i2"
|
|
81
|
+
:class="cn({ '!w-auto whitespace-nowrap border border-slate-300 pl-2 pr-3': rowAction.label }, rowAction.class)"
|
|
82
|
+
v-on:click="rowAction.onClick(i, row)">
|
|
83
|
+
<LucideIcon
|
|
84
|
+
:name="rowAction.icon"
|
|
85
|
+
:size="rowAction.iconSize"
|
|
86
|
+
:class="[{ 'mr-1': rowAction.label }, rowAction.iconClass]"
|
|
87
|
+
:fill="rowAction.iconFill ? 'currentColor' : 'none'"
|
|
88
|
+
:stroke-width="rowAction.iconStrokeWidth" />
|
|
89
|
+
{{ rowAction.label }}
|
|
90
|
+
</BtnCircle>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<!-- <BtnCircle v-if="isDibutuhkanPerbaikan(row[pageConfig.nextDataField]?.[0])"
|
|
94
|
+
class="!w-auto whitespace-nowrap border transition pl-2 pr-3 bg-white border-blue-500 text-blue-600"
|
|
95
|
+
v-on:click="emits('edit', i, row)">
|
|
96
|
+
<LucidePencilLine class="mr-2" :size="17" :stroke-width="1.6"/>
|
|
97
|
+
Perbaiki Data
|
|
98
|
+
</BtnCircle> -->
|
|
99
|
+
|
|
100
|
+
<BtnCircle
|
|
101
|
+
v-else-if="props.customBtnConfig && props.customBtnConfig.show"
|
|
102
|
+
:class="cn({ '!w-auto whitespace-nowrap border border-slate-300 bg-white pl-2 pr-3': props.customBtnConfig.label }, props.customBtnConfig.class)"
|
|
103
|
+
v-on:click="customBtnClicked(props.customBtnConfig.id)">
|
|
104
|
+
<LucideIcon
|
|
105
|
+
:name="props.customBtnConfig.icon"
|
|
106
|
+
:size="props.customBtnConfig.iconSize ?? 20"
|
|
107
|
+
:class="[{ 'mr-1': props.customBtnConfig.label }, props.customBtnConfig.iconClass]"
|
|
108
|
+
:fill="props.customBtnConfig.iconFill ? 'currentColor' : 'none'"
|
|
109
|
+
:stroke-width="props.customBtnConfig.iconStrokeWidth ?? 1.6" />
|
|
110
|
+
{{ props.customBtnConfig.label }}
|
|
111
|
+
</BtnCircle>
|
|
112
|
+
<BtnCircle
|
|
113
|
+
class="whitespace-nowrap border border-slate-300 bg-white dark:bg-dark_bg4 dark:border-none dark:text-dark_text dark:hover:bg-dark_bg6"
|
|
114
|
+
:class="{'!w-auto pl-2 pr-3': !hasActionBtn(row)}"
|
|
115
|
+
v-on:click="$emit('viewDetail')"
|
|
116
|
+
v-if="showViewDetail">
|
|
117
|
+
<LucideArrowLeftFromLine :size="18" :stroke-width="1.4"
|
|
118
|
+
:class="{ 'ml-1 mr-1.5': !hasActionBtn(row)}"/>
|
|
119
|
+
<template v-if="!hasActionBtn(row)">
|
|
120
|
+
Lihat Detil
|
|
121
|
+
</template>
|
|
122
|
+
</BtnCircle>
|
|
123
|
+
</template>
|
|
124
|
+
<BtnCircle v-if="1 > 2" v-on:click="$emit('onFavoritChanged')" class="hover:text-orange-400" :class="{ 'text-orange-400': cell.favorited }">
|
|
125
|
+
<Star :stroke-width="1.6" :size="20" fill="currentColor" v-if="cell.favorited" class="transition" />
|
|
126
|
+
<Star :stroke-width="1.6" :size="20" v-else class="transition" />
|
|
127
|
+
</BtnCircle>
|
|
128
|
+
<DropdownMenu v-if="showAction !== false && !['WAITING_APPROVAL', 'APPROVED_PARTIALY'].includes(row.status)
|
|
129
|
+
&& (!pageConfig?.nextDataField || isValidValue(row[pageConfig?.nextDataField]))">
|
|
130
|
+
<DropdownMenuTrigger as-child>
|
|
131
|
+
<BtnCircle data-test="action-menu">
|
|
132
|
+
<EllipsisVertical :size="22" />
|
|
133
|
+
</BtnCircle>
|
|
134
|
+
</DropdownMenuTrigger>
|
|
135
|
+
<DropdownMenuContent class="w-[320px]" align="end">
|
|
136
|
+
<slot></slot>
|
|
137
|
+
</DropdownMenuContent>
|
|
138
|
+
</DropdownMenu>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuItem,
|
|
6
|
+
DropdownMenuSeparator,
|
|
7
|
+
DropdownMenuTrigger
|
|
8
|
+
} from '@/components/ui/dropdown-menu'
|
|
9
|
+
|
|
10
|
+
import { EllipsisVertical } from 'lucide-vue-next'
|
|
11
|
+
|
|
12
|
+
defineProps(['openSheet', 'openSheet2'])
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div>
|
|
17
|
+
<DropdownMenu>
|
|
18
|
+
<DropdownMenuTrigger as-child>
|
|
19
|
+
<EllipsisVertical class="cursor-pointer" />
|
|
20
|
+
</DropdownMenuTrigger>
|
|
21
|
+
<DropdownMenuContent class="w-56" align="end">
|
|
22
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet('Edit Aktifitas')"
|
|
23
|
+
>Edit aktifitas</DropdownMenuItem
|
|
24
|
+
>
|
|
25
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet2('Sesuaikan Aktifitas')"
|
|
26
|
+
>Sesuaikan aktifitas</DropdownMenuItem
|
|
27
|
+
>
|
|
28
|
+
<DropdownMenuSeparator />
|
|
29
|
+
<DropdownMenuItem class="cursor-pointer">Hapus grup</DropdownMenuItem>
|
|
30
|
+
</DropdownMenuContent>
|
|
31
|
+
</DropdownMenu>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuItem,
|
|
6
|
+
DropdownMenuSeparator,
|
|
7
|
+
DropdownMenuTrigger
|
|
8
|
+
} from '@/components/ui/dropdown-menu'
|
|
9
|
+
|
|
10
|
+
import { EllipsisVertical } from 'lucide-vue-next'
|
|
11
|
+
|
|
12
|
+
defineProps(['openSheet', 'openSheet2'])
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div>
|
|
17
|
+
<DropdownMenu>
|
|
18
|
+
<DropdownMenuTrigger as-child>
|
|
19
|
+
<EllipsisVertical class="cursor-pointer" />
|
|
20
|
+
</DropdownMenuTrigger>
|
|
21
|
+
<DropdownMenuContent class="w-56" align="end">
|
|
22
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet('Edit Asset')">Edit asset</DropdownMenuItem>
|
|
23
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet2('Sesuaikan Asset')">Sesuaikan asset
|
|
24
|
+
</DropdownMenuItem>
|
|
25
|
+
<DropdownMenuSeparator />
|
|
26
|
+
<DropdownMenuItem class="cursor-pointer">Hapus asset</DropdownMenuItem>
|
|
27
|
+
</DropdownMenuContent>
|
|
28
|
+
</DropdownMenu>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuItem,
|
|
6
|
+
DropdownMenuSeparator,
|
|
7
|
+
DropdownMenuTrigger
|
|
8
|
+
} from '@/components/ui/dropdown-menu'
|
|
9
|
+
|
|
10
|
+
import { EllipsisVertical } from 'lucide-vue-next'
|
|
11
|
+
|
|
12
|
+
defineProps(['openSheet', 'openSheet2'])
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div>
|
|
17
|
+
<DropdownMenu>
|
|
18
|
+
<DropdownMenuTrigger as-child>
|
|
19
|
+
<EllipsisVertical class="cursor-pointer" />
|
|
20
|
+
</DropdownMenuTrigger>
|
|
21
|
+
<DropdownMenuContent class="w-56" align="end">
|
|
22
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet('Edit Konfig')">Edit Konfig</DropdownMenuItem>
|
|
23
|
+
<DropdownMenuItem class="cursor-pointer" @click="openSheet2('Tambah Subconfig')">Tambah Subconfig
|
|
24
|
+
</DropdownMenuItem>
|
|
25
|
+
<DropdownMenuSeparator />
|
|
26
|
+
<DropdownMenuItem class="cursor-pointer">Hapus Konfig</DropdownMenuItem>
|
|
27
|
+
</DropdownMenuContent>
|
|
28
|
+
</DropdownMenu>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|