@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,164 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { DasiV2FormSchema, FormSchema, FormSchemaItem } from "@/types/form.types";
|
|
3
|
+
import DetailContentItem from "./DetailContentItem.vue";
|
|
4
|
+
import { nextTick, onMounted, ref, watch } from "vue";
|
|
5
|
+
import type { ColumnRef } from "@/vueform/config/types";
|
|
6
|
+
|
|
7
|
+
interface DetailItemProps {
|
|
8
|
+
columns?: ColumnRef[];
|
|
9
|
+
schema?: DasiV2FormSchema;
|
|
10
|
+
data: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const props = defineProps<DetailItemProps>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Like form schema item
|
|
17
|
+
* but saved as array
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
const detailItems = ref<FormSchemaItem[]>([]);
|
|
21
|
+
|
|
22
|
+
function schemaMaping(formSchema: DasiV2FormSchema, items: any) {
|
|
23
|
+
console.log("Schema mapping:", formSchema);
|
|
24
|
+
|
|
25
|
+
// Handle both old and new schema formats
|
|
26
|
+
let schemaItems: any = {};
|
|
27
|
+
|
|
28
|
+
if (formSchema && typeof formSchema === "object") {
|
|
29
|
+
// New FormSchema format
|
|
30
|
+
if (formSchema.schema && typeof formSchema.schema === "object") {
|
|
31
|
+
schemaItems = formSchema.schema;
|
|
32
|
+
}
|
|
33
|
+
// Old DasiV2FormSchema format (direct object)
|
|
34
|
+
else if (!formSchema.schema) {
|
|
35
|
+
schemaItems = formSchema;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Safety check
|
|
40
|
+
if (!schemaItems || typeof schemaItems !== "object") {
|
|
41
|
+
console.warn("Invalid schema format:", formSchema);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
for (let [key, item] of Object.entries(schemaItems)) {
|
|
46
|
+
if (!item || typeof item !== "object") continue;
|
|
47
|
+
|
|
48
|
+
// Type assertion for better TypeScript support
|
|
49
|
+
const schemaItem = item as any;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Skip field not displayed in detail
|
|
53
|
+
* Check for schema conditions
|
|
54
|
+
*/
|
|
55
|
+
if (schemaItem.showInDetail === false) continue;
|
|
56
|
+
if (["button", "static"].includes(schemaItem.type ?? "")) continue;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check for nested items
|
|
60
|
+
* or flatten the schema before calling this
|
|
61
|
+
*/
|
|
62
|
+
if (schemaItem.schema) {
|
|
63
|
+
if (schemaItem.label || schemaItem.cellHeader) {
|
|
64
|
+
detailItems.value.push({
|
|
65
|
+
type: "static",
|
|
66
|
+
cellType: "divider",
|
|
67
|
+
content: `<div class="vueform-divider mt-3"><span>${schemaItem.label ?? schemaItem.cellHeader}</span></div>`
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// Recursively handle nested schema
|
|
71
|
+
schemaMaping({ schema: schemaItem.schema }, items);
|
|
72
|
+
detailItems.value.push({
|
|
73
|
+
type: "static",
|
|
74
|
+
cellType: "divider",
|
|
75
|
+
content: `<div class="vueform-divider !py-2"></div>`
|
|
76
|
+
});
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Normalize key for data mapping
|
|
81
|
+
let normalizedKey = key;
|
|
82
|
+
if (key.endsWith("Id")) normalizedKey = key.substring(0, key.length - 2);
|
|
83
|
+
if (key.endsWith("Ids")) normalizedKey = key.substring(0, key.length - 3);
|
|
84
|
+
if (key.endsWith("Code") && key !== "unitCode") normalizedKey = key.substring(0, key.length - 4);
|
|
85
|
+
|
|
86
|
+
// Map data to item
|
|
87
|
+
if (items && typeof items === "object") {
|
|
88
|
+
for (const [k2, value] of Object.entries(items)) {
|
|
89
|
+
if (normalizedKey === k2) {
|
|
90
|
+
schemaItem.default = value;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Add to detail items to display
|
|
98
|
+
*/
|
|
99
|
+
if (schemaItem.cellDataSource && typeof schemaItem.cellDataSource === "function") {
|
|
100
|
+
try {
|
|
101
|
+
schemaItem.default = schemaItem.cellDataSource(0, items);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.warn("Error in cellDataSource for", key, error);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
schemaItem.key = key;
|
|
108
|
+
detailItems.value?.push(schemaItem);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function initDetail() {
|
|
113
|
+
if (props.schema) schemaMaping(props.schema, props.data);
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Also display data from columns
|
|
117
|
+
*/
|
|
118
|
+
for (const item of props.columns ?? []) {
|
|
119
|
+
if (item.showInDetail === false || ["id"].includes(item.key) || ["action"].includes(item.type ?? "")) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const itemValue = item.dataSource ? item.dataSource(0, props.data) : props.data[item.key ?? "_"];
|
|
124
|
+
detailItems.value.push({
|
|
125
|
+
key: item.key,
|
|
126
|
+
type: item.cellType ?? "text",
|
|
127
|
+
label: item.header,
|
|
128
|
+
cellRender: item.cellRender as any,
|
|
129
|
+
cellDataSource: item.dataSource as any,
|
|
130
|
+
cellDescripton: item.description,
|
|
131
|
+
objectKey: item.objectKey,
|
|
132
|
+
default: itemValue,
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Used by dialog form selector
|
|
136
|
+
*/
|
|
137
|
+
nameField: item.nameField,
|
|
138
|
+
nameFieldFunc: item.nameFieldFunc,
|
|
139
|
+
descriptionField: item.descriptionField,
|
|
140
|
+
descriptionFieldFunc: item.descriptionFieldFunc
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
watch(
|
|
146
|
+
() => props.schema,
|
|
147
|
+
() => {
|
|
148
|
+
initDetail();
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
onMounted(async () => {
|
|
153
|
+
initDetail();
|
|
154
|
+
});
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<template>
|
|
158
|
+
<section class="detail-items space-y-2.5 px-6 py-4">
|
|
159
|
+
<template v-for="(item, i) in detailItems" :key="i">
|
|
160
|
+
<!-- <div class="text-xs">{{ item.key }}</div> -->
|
|
161
|
+
<DetailContentItem :item="item" :data="data" />
|
|
162
|
+
</template>
|
|
163
|
+
</section>
|
|
164
|
+
</template>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { LucideCalendarClock, LucideCircleUserRound, LucideDatabase } from "lucide-vue-next";
|
|
4
|
+
import moment from "moment";
|
|
5
|
+
import DetailContentTablet from "./DetailContentTablet.vue";
|
|
6
|
+
import DataStatusTag from "../tables/DataStatusTag.vue";
|
|
7
|
+
import type { PageConfig } from "@/vueform/config/types";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
data: any;
|
|
11
|
+
endpoint: string;
|
|
12
|
+
pageConfig?: PageConfig;
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
// Get display name from config or fallback to default
|
|
16
|
+
const displayName = computed(() => {
|
|
17
|
+
if (props.pageConfig?.dataName && typeof props.pageConfig.dataName === "function") {
|
|
18
|
+
return props.pageConfig.dataName(props.data);
|
|
19
|
+
}
|
|
20
|
+
return props.data?.name || props.data?.nama || "data";
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<section class="border-b px-6 pb-4 dark:border-dark_border3" v-if="data">
|
|
26
|
+
<section class="pb-3">
|
|
27
|
+
<DataStatusTag :status="data.status" class="mb-3 ml-1 scale-110" />
|
|
28
|
+
<div class="mb-1 text-xl font-medium leading-tight">
|
|
29
|
+
{{ displayName }}
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
<div class="flex flex-wrap gap-x-6 gap-y-3">
|
|
33
|
+
<section>
|
|
34
|
+
<div class="mb-0.5 text-[12px] font-medium uppercase opacity-65">Dibuat</div>
|
|
35
|
+
<div class="flex items-center gap-3 text-sm">
|
|
36
|
+
<div class="flex items-center">
|
|
37
|
+
<LucideCalendarClock :size="18" class="-mt-px mr-2" />
|
|
38
|
+
{{ moment(data.createdAt).utc().format("DD/MM/YYYY HH:mm") }}
|
|
39
|
+
</div>
|
|
40
|
+
<DetailContentTablet v-if="data.creatorName">
|
|
41
|
+
<LucideCircleUserRound :size="19" />
|
|
42
|
+
{{ data.creatorName }}
|
|
43
|
+
</DetailContentTablet>
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
46
|
+
<section v-if="data.updatedAt && data.updatedAt !== data.createdAt">
|
|
47
|
+
<div class="mb-0.5 text-[12px] font-medium uppercase opacity-65">Terakhir diperbarui</div>
|
|
48
|
+
<div class="flex items-center gap-3 text-sm">
|
|
49
|
+
<div class="flex items-center">
|
|
50
|
+
<LucideCalendarClock :size="18" class="-mt-px mr-2" />
|
|
51
|
+
{{ moment(data.updatedAt).utc().format("DD/MM/YYYY HH:mm") }}
|
|
52
|
+
</div>
|
|
53
|
+
<DetailContentTablet v-if="data.updaterName">
|
|
54
|
+
<LucideCircleUserRound :size="19" />
|
|
55
|
+
{{ data.updaterName }}
|
|
56
|
+
</DetailContentTablet>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
<section v-if="endpoint == '/kurs-tengah'">
|
|
60
|
+
<div class="mb-0.5 text-[12px] font-medium uppercase opacity-65">Sumber Data</div>
|
|
61
|
+
<div class="flex items-center gap-3 text-sm">
|
|
62
|
+
<div class="flex items-center">
|
|
63
|
+
<LucideDatabase :size="18" class="-mt-px mr-2" />
|
|
64
|
+
Diambil dari Bank Indonesia
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
<section class="text-red-500" v-if="data.deletedAt">
|
|
69
|
+
<div class="mb-0.5 text-[12px] font-medium uppercase">Data dihapus</div>
|
|
70
|
+
<div class="flex items-center gap-3 text-sm">
|
|
71
|
+
<div class="flex items-center">
|
|
72
|
+
<LucideCalendarClock :size="18" class="-mt-px mr-2" />
|
|
73
|
+
{{ moment(data.deletedAt).format("DD/MM/YYYY HH:mm") }}
|
|
74
|
+
</div>
|
|
75
|
+
<DetailContentTablet class="bg-red-50">
|
|
76
|
+
<LucideCircleUserRound :size="19" />
|
|
77
|
+
{{ data.deleterName }}
|
|
78
|
+
</DetailContentTablet>
|
|
79
|
+
</div>
|
|
80
|
+
</section>
|
|
81
|
+
</div>
|
|
82
|
+
</section>
|
|
83
|
+
</template>
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { LucideBuilding, LucideCheck, LucideFile } from "lucide-vue-next";
|
|
3
|
+
import moment from "moment";
|
|
4
|
+
import DetailContentTablet from "./DetailContentTablet.vue";
|
|
5
|
+
import { formatNumberIntl, getNestedValue, numberToMonth, displayNumberFormatedIntl } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const props = defineProps(["item", "data"]);
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div v-if="item.type === 'static'" v-html="item.content"></div>
|
|
12
|
+
<div class="flex text-sm" v-else>
|
|
13
|
+
<div class="w-56 flex-none text-gray-500 dark:text-gray-400" v-html="item.cellHeader ?? item.label ?? item.text"></div>
|
|
14
|
+
<div class="flex-none pr-2">:</div>
|
|
15
|
+
<div class="flex w-full font-medium">
|
|
16
|
+
<!-- {{ item.type }} - {{ item.default }} -->
|
|
17
|
+
<div v-if="item.cellRender" v-html="item.cellRender(0, data)"></div>
|
|
18
|
+
|
|
19
|
+
<template v-else-if="item.default || ['checkbox', 'toggle'].includes(item.type)">
|
|
20
|
+
<!-- Organization display (now handled by unified selector) -->
|
|
21
|
+
<DetailContentTablet
|
|
22
|
+
class="items-start bg-transparent p-0 pl-[5px] font-medium"
|
|
23
|
+
v-if="item.type === 'selector' && item.showAvatar && !item.multiple"
|
|
24
|
+
:class="{ 'rounded-md': item.default?.accessLevel }">
|
|
25
|
+
<div class="-mt-0.5 flex size-[24px] flex-none items-center justify-center rounded-full bg-blue-100 text-[13px] font-medium text-blue-700" :class="{ 'mb-auto': item.default?.accessLevel }">
|
|
26
|
+
{{ (item.default?.name || "").substring(0, 1) || "?" }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="leading-snug">
|
|
29
|
+
{{ item.default?.name ?? "-" }}
|
|
30
|
+
<div class="flex items-center pt-px text-xs opacity-75" v-if="item.default?.accessLevel">
|
|
31
|
+
<LucideBuilding class="-mt-px mr-1 size-3.5" />
|
|
32
|
+
{{ item.default.accessLevel.name }}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</DetailContentTablet>
|
|
36
|
+
|
|
37
|
+
<!-- Unified Selector Element (single selection) -->
|
|
38
|
+
<template v-else-if="item.type === 'selector' && !item.multiple">
|
|
39
|
+
<template v-if="item.nameFieldFunc && item.default">
|
|
40
|
+
<div v-html="item.nameFieldFunc(item.default)"></div>
|
|
41
|
+
</template>
|
|
42
|
+
<template v-else-if="item.nameField && item.default">
|
|
43
|
+
{{
|
|
44
|
+
(() => {
|
|
45
|
+
// Handle nested properties like 'masterEpiKapal.nama'
|
|
46
|
+
if (item.nameField.includes(".")) {
|
|
47
|
+
const value = getNestedValue(item.default, item.nameField);
|
|
48
|
+
return value ?? "";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return item.default?.[item.nameField] || "";
|
|
52
|
+
})()
|
|
53
|
+
}}
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else-if="item.default && typeof item.default === 'object'">
|
|
56
|
+
{{ item.default?.name ?? item.default?.nama ?? item.default?.label ?? JSON.stringify(item.default) }}
|
|
57
|
+
</template>
|
|
58
|
+
<template v-else>
|
|
59
|
+
{{ item.default ?? "-" }}
|
|
60
|
+
</template>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<!-- Unified Selector Element (multiple selection) -->
|
|
64
|
+
<div v-else-if="item.type === 'selector' && item.multiple">
|
|
65
|
+
<template v-if="!item.default || !Array.isArray(item.default) || item.default.length === 0"> - </template>
|
|
66
|
+
<template v-else>
|
|
67
|
+
<div class="w-full space-y-1">
|
|
68
|
+
<div class="flex w-full items-center gap-2.5 rounded-sm border p-1.5 leading-[1.125] dark:border-none dark:bg-dark_bg4" v-for="sub in item.default" :key="sub.id">
|
|
69
|
+
<div class="flex size-8 items-center justify-center rounded-md border dark:bg-dark_bg3">
|
|
70
|
+
<LucideCheck :size="20" class="opacity-60" />
|
|
71
|
+
</div>
|
|
72
|
+
<div class="leading-snug">
|
|
73
|
+
<div>
|
|
74
|
+
{{
|
|
75
|
+
(() => {
|
|
76
|
+
// Try to get name from uraian relation
|
|
77
|
+
if (sub?.uraian?.name) {
|
|
78
|
+
return sub.uraian.name;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return (sub[item.field || "_"] || sub)[item.nameField || "_"] || "-";
|
|
82
|
+
})()
|
|
83
|
+
}}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<!-- Config Data Selector Element -->
|
|
92
|
+
<template v-else-if="item.type === 'config_data_selector'">
|
|
93
|
+
{{ item.default?.name || "" }}
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<!-- Date Selector Element -->
|
|
97
|
+
<template v-else-if="item.type === 'date_selector'">
|
|
98
|
+
<template v-if="item.range && Array.isArray(item.default)">
|
|
99
|
+
<template v-if="item.default.length === 2 && item.default[0] && item.default[1]">
|
|
100
|
+
{{ moment(item.default[0]).format("DD/MM/YYYY") }} - {{ moment(item.default[1]).format("DD/MM/YYYY") }}
|
|
101
|
+
</template>
|
|
102
|
+
<template v-else>-</template>
|
|
103
|
+
</template>
|
|
104
|
+
<template v-else-if="item.default">
|
|
105
|
+
{{ moment(item.default).format("DD/MM/YYYY") }}
|
|
106
|
+
</template>
|
|
107
|
+
<template v-else>-</template>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<!-- Standard text elements -->
|
|
111
|
+
<template v-else-if="['text', 'textarea', 'email', 'password', 'number', 'tel', 'url'].includes(item.type)">
|
|
112
|
+
<div class="flex items-center gap-1">
|
|
113
|
+
<div v-if="item.cellRender" v-html="item.cellRender(0, data)"></div>
|
|
114
|
+
<div v-else class="detail-item-with-add-ons flex items-center gap-1">
|
|
115
|
+
<span v-if="item?.addons?.before" v-html="item?.addons?.before"></span>
|
|
116
|
+
<span>
|
|
117
|
+
{{
|
|
118
|
+
item?.mask?.thousandsSeparator === ","
|
|
119
|
+
? item.default != null && item.default !== ""
|
|
120
|
+
? formatNumberIntl(item.default)
|
|
121
|
+
: "-"
|
|
122
|
+
: item.default != null && item.default !== ""
|
|
123
|
+
? item.default
|
|
124
|
+
: "-"
|
|
125
|
+
}}
|
|
126
|
+
</span>
|
|
127
|
+
<span v-if="item?.addons?.after" v-html="item?.addons?.after"></span>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
<!-- Standard form elements -->
|
|
133
|
+
<template v-else-if="['radiogroup', 'select', 'checkboxgroup'].includes(item.type)">
|
|
134
|
+
<template v-if="Array.isArray(item.items)">
|
|
135
|
+
{{ item.items.find((opt: any) => opt.value === item.default)?.label || item.default || "-" }}
|
|
136
|
+
</template>
|
|
137
|
+
<template v-else>
|
|
138
|
+
{{ item.default || "-" }}
|
|
139
|
+
</template>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<!-- Toggle and checkbox elements -->
|
|
143
|
+
<template v-else-if="['toggle', 'checkbox'].includes(item.type)">
|
|
144
|
+
<span class="text-green-500" v-if="item.default">Ya</span>
|
|
145
|
+
<span class="text-red-500" v-else>Tidak</span>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<!-- File element -->
|
|
149
|
+
<a v-else-if="item.type === 'file'" :href="item.default?.url" target="_blank" class="flex w-full items-center gap-3 rounded-md border px-1 py-1 pr-3.5 dark:border-gray-600 dark:bg-gray-700">
|
|
150
|
+
<div class="flex size-10 items-center justify-center rounded-sm bg-blue-100 text-blue-500">
|
|
151
|
+
<LucideFile :size="24" :stroke-width="1.5" />
|
|
152
|
+
</div>
|
|
153
|
+
<div class="pt-0.5s leading-[1.2]">
|
|
154
|
+
<h4>{{ item.default?.filename || "File" }}</h4>
|
|
155
|
+
<p class="text-xs font-normal opacity-65" v-if="item.default?.creatorAt">Diunggah pada {{ moment(item.default.creatorAt).utc().format("DD/MM/YYYY HH:mm") }}</p>
|
|
156
|
+
</div>
|
|
157
|
+
</a>
|
|
158
|
+
|
|
159
|
+
<!-- Hidden fields -->
|
|
160
|
+
<div v-else-if="item.type === 'hidden' && item.label">{{ item.default ?? "-" }}</div>
|
|
161
|
+
|
|
162
|
+
<!-- Group elements -->
|
|
163
|
+
<div v-else-if="item.type === 'group'">
|
|
164
|
+
<template v-if="item.default && typeof item.default === 'object'">
|
|
165
|
+
<div class="space-y-1">
|
|
166
|
+
<div v-for="(value, key) in item.default" :key="key" class="flex items-center gap-2">
|
|
167
|
+
<span class="text-sm text-gray-400">{{ key }}:</span>
|
|
168
|
+
<span class="font-medium">{{ value }}</span>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
<template v-else>
|
|
173
|
+
{{ item.default ?? "-" }}
|
|
174
|
+
</template>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<!-- Fallback for unknown types -->
|
|
178
|
+
<template v-else>
|
|
179
|
+
{{ item.default ?? "-" }}
|
|
180
|
+
</template>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<template v-else>-</template>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</template>
|