@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,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { ref } from 'vue';
|
|
4
|
+
import { watch } from 'vue';
|
|
5
|
+
|
|
6
|
+
const props = defineProps(['class', 'password']);
|
|
7
|
+
const pwdStrength = ref('Very Weak');
|
|
8
|
+
const model = defineModel({ default: 0 });
|
|
9
|
+
const score = ref(0)
|
|
10
|
+
|
|
11
|
+
watch(() => props.password, (pwd) => {
|
|
12
|
+
score.value = 0;
|
|
13
|
+
// Check the length of the password
|
|
14
|
+
if (pwd.length >= 8) {
|
|
15
|
+
score.value += 1;
|
|
16
|
+
if (pwd.length >= 12) score.value += 1;
|
|
17
|
+
// Check for lowercase letters
|
|
18
|
+
if (/[a-z]/.test(pwd)) score.value += 1;
|
|
19
|
+
// Check for uppercase letters
|
|
20
|
+
if (/[A-Z]/.test(pwd)) score.value += 1;
|
|
21
|
+
// Check for numbers
|
|
22
|
+
if (/\d/.test(pwd)) score.value += 1;
|
|
23
|
+
// Check for special characters
|
|
24
|
+
if (/[\W_]/.test(pwd)) score.value += 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Determine password strength
|
|
28
|
+
switch (score.value) {
|
|
29
|
+
case 0:
|
|
30
|
+
case 1:
|
|
31
|
+
pwdStrength.value = 'Very Weak';
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
pwdStrength.value = 'Weak';
|
|
35
|
+
break;
|
|
36
|
+
case 3:
|
|
37
|
+
case 4:
|
|
38
|
+
pwdStrength.value = 'Moderate';
|
|
39
|
+
break;
|
|
40
|
+
case 5:
|
|
41
|
+
pwdStrength.value = 'Strong';
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
pwdStrength.value = 'Very Strong';
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
model.value = score.value;
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<main :class="cn('bg-gray-300 rounded-full overflow-hidden', props.class)">
|
|
53
|
+
<div class="h-1 bg-gray-400 transition-all rounded-full"
|
|
54
|
+
:class="{'bg-green-500': score > 4,
|
|
55
|
+
'bg-orange-400': score === 3 || score === 4,
|
|
56
|
+
'bg-red-500': score < 3}"
|
|
57
|
+
:style="{width: `${Math.ceil(score / 6 * 100) || 5}%`}"></div>
|
|
58
|
+
</main>
|
|
59
|
+
<div class="flex text-[12px] mt-1 leading-tight">
|
|
60
|
+
<div class="text-gray-500">
|
|
61
|
+
Password minimal 8 karakter
|
|
62
|
+
</div>
|
|
63
|
+
<div class="font-semibold text-gray-500 ml-auto text-[11px]"
|
|
64
|
+
:class="{'text-green-500': score > 4,
|
|
65
|
+
'text-orange-400': score === 3 || score === 4,
|
|
66
|
+
'text-red-500': score < 3}">{{ pwdStrength }}</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Dialog, DialogContent } from "@/components/ui/dialog";
|
|
3
|
+
import { LucideLoader2, LucideSend } from "lucide-vue-next";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
import { ref } from "vue";
|
|
6
|
+
import api from "@/api/api";
|
|
7
|
+
|
|
8
|
+
const props = defineProps(["class", "secondaryBtnClass", "primaryBtnClass"]);
|
|
9
|
+
const dialogOpen = ref<boolean>(false);
|
|
10
|
+
const loading = ref<boolean>(false);
|
|
11
|
+
const error = ref<string | null>(null);
|
|
12
|
+
const next: any = ref(null);
|
|
13
|
+
const item: any = ref(null);
|
|
14
|
+
const headerStr = ref("");
|
|
15
|
+
const bodyStr = ref("");
|
|
16
|
+
const sendBtnEL: any = ref(null);
|
|
17
|
+
const response: any = ref(null);
|
|
18
|
+
const method = ref("get");
|
|
19
|
+
const respStatus = ref(200);
|
|
20
|
+
|
|
21
|
+
function open(d: any, n: any) {
|
|
22
|
+
dialogOpen.value = true;
|
|
23
|
+
next.value = n;
|
|
24
|
+
loading.value = false;
|
|
25
|
+
response.value = null;
|
|
26
|
+
respStatus.value = 200;
|
|
27
|
+
error.value = null;
|
|
28
|
+
item.value = d;
|
|
29
|
+
method.value = d.method;
|
|
30
|
+
headerStr.value = d.headers && Object.keys(d.headers).length > 0 ? JSON.stringify(d.headers, null, 2) : "";
|
|
31
|
+
bodyStr.value = d.requestBodyExample && Object.keys(d.requestBodyExample).length > 0 ? JSON.stringify(d.requestBodyExample, null, 2) : "";
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
if (sendBtnEL.value) sendBtnEL.value.focus();
|
|
34
|
+
});
|
|
35
|
+
console.log(d);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function sendRequest() {
|
|
39
|
+
let apiReq = null;
|
|
40
|
+
switch (method.value) {
|
|
41
|
+
case "get":
|
|
42
|
+
apiReq = api.get(`${import.meta.env.VITE_API_URL}${item.value.endpointExample}`, { headers: headerStr.value ? JSON.parse(headerStr.value) : {} });
|
|
43
|
+
break;
|
|
44
|
+
case "post":
|
|
45
|
+
apiReq = api.post(`${import.meta.env.VITE_API_URL}${item.value.endpointExample}`, bodyStr.value ? JSON.parse(bodyStr.value) : null, {
|
|
46
|
+
headers: headerStr.value ? JSON.parse(headerStr.value) : {}
|
|
47
|
+
});
|
|
48
|
+
break;
|
|
49
|
+
case "put":
|
|
50
|
+
apiReq = api.put(`${import.meta.env.VITE_API_URL}${item.value.endpointExample}`, bodyStr.value ? JSON.parse(bodyStr.value) : null, {
|
|
51
|
+
headers: headerStr.value ? JSON.parse(headerStr.value) : {}
|
|
52
|
+
});
|
|
53
|
+
break;
|
|
54
|
+
case "patch":
|
|
55
|
+
apiReq = api.patch(`${import.meta.env.VITE_API_URL}${item.value.endpointExample}`, bodyStr.value ? JSON.parse(bodyStr.value) : null, {
|
|
56
|
+
headers: headerStr.value ? JSON.parse(headerStr.value) : {}
|
|
57
|
+
});
|
|
58
|
+
break;
|
|
59
|
+
case "delete":
|
|
60
|
+
apiReq = api.delete(`${import.meta.env.VITE_API_URL}${item.value.endpointExample}`, bodyStr.value ? JSON.parse(bodyStr.value) : null);
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
if (!apiReq) return;
|
|
66
|
+
loading.value = true;
|
|
67
|
+
apiReq
|
|
68
|
+
.then(r => {
|
|
69
|
+
respStatus.value = 200;
|
|
70
|
+
response.value = r.data;
|
|
71
|
+
error.value = null;
|
|
72
|
+
})
|
|
73
|
+
.catch(err => {
|
|
74
|
+
respStatus.value = err.response && err.response.status ? err.response.status : 500;
|
|
75
|
+
response.value = err.response && err.response.data ? err.response.data : null;
|
|
76
|
+
error.value = err.message;
|
|
77
|
+
})
|
|
78
|
+
.finally(() => {
|
|
79
|
+
loading.value = false;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function close(b: boolean) {
|
|
84
|
+
dialogOpen.value = false;
|
|
85
|
+
if (next.value) next.value(b);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
defineExpose({ open });
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<template>
|
|
92
|
+
<Dialog v-model:open="dialogOpen">
|
|
93
|
+
<DialogContent :class="cn('max-w-[640px]', props.class)">
|
|
94
|
+
<div class="-mx-6 px-6 pb-1.5">
|
|
95
|
+
<h4 class="m-0 font-semibold">
|
|
96
|
+
Try API Endpoint
|
|
97
|
+
<span class="mx-1.5">•</span>
|
|
98
|
+
{{ item.summary }}
|
|
99
|
+
{{ item.endpoint.split("/")[1].replace(/-/g, " ") }}
|
|
100
|
+
</h4>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="-mt-3 flex">
|
|
103
|
+
<select class="flex-none rounded-l-sm border-r-0 border-gray-300" v-model="method">
|
|
104
|
+
<option value="get">GET</option>
|
|
105
|
+
<option value="post">POST</option>
|
|
106
|
+
<option value="put">PUT</option>
|
|
107
|
+
<option value="patch">PATCH</option>
|
|
108
|
+
<option value="delete">DELETE</option>
|
|
109
|
+
</select>
|
|
110
|
+
<div class="w-full">
|
|
111
|
+
<input type="text" class="w-full border-gray-300" placeholder="https://..." v-model="item.endpointExample" />
|
|
112
|
+
</div>
|
|
113
|
+
<div class="flex-none">
|
|
114
|
+
<button
|
|
115
|
+
class="flex h-full items-center rounded-r-sm bg-primary_main px-4 font-medium text-white"
|
|
116
|
+
:class="{ '!bg-gray-300 !text-gray-400': loading }"
|
|
117
|
+
v-on:click="sendRequest"
|
|
118
|
+
ref="sendBtnEL">
|
|
119
|
+
<LucideLoader2 :size="22" class="-ml-1 mr-2 animate-spin" v-if="loading" />
|
|
120
|
+
<LucideSend :size="18" class="mr-2" v-else />
|
|
121
|
+
Send
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="-mx-6 -mb-4 max-h-[60vh] overflow-auto border-b border-t px-6 pb-5 pt-3">
|
|
126
|
+
<div class="mb-3">
|
|
127
|
+
<label class="mb-1 block text-sm font-medium text-gray-500">Header</label>
|
|
128
|
+
<textarea class="w-full rounded-sm border-slate-600 bg-slate-600 px-2 py-1.5 text-sm text-white" rows="4" placeholder="Header in JSON format..." v-model="headerStr"></textarea>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="mb-3" v-if="method !== 'get' && method !== 'delete'">
|
|
132
|
+
<label class="mb-1 block text-sm font-medium text-gray-500">Request Body</label>
|
|
133
|
+
<textarea class="w-full rounded-sm border-slate-600 bg-slate-600 px-2 py-1.5 text-sm text-white" rows="8" placeholder="Request body in JSON format..." v-model="bodyStr"></textarea>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div class="" v-if="response || error">
|
|
137
|
+
<div class="mb-1 flex items-center">
|
|
138
|
+
<span class="text-sm font-medium text-gray-500">Response</span>
|
|
139
|
+
<div class="ml-auto flex-none text-sm font-medium">
|
|
140
|
+
<span class="text-green-500" v-if="respStatus === 200">200 - OK</span>
|
|
141
|
+
<span class="text-red-500" v-else>
|
|
142
|
+
{{ respStatus }}
|
|
143
|
+
-
|
|
144
|
+
{{ error?.substring(0, 26) }}{{ String(error).length > 26 ? "..." : "" }}
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<pre class="w-full overflow-auto rounded-sm border-slate-600 bg-slate-600 px-2 py-1.5 text-sm text-white" :class="{ '!bg-red-700': error }">{{ response }}</pre>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</DialogContent>
|
|
152
|
+
</Dialog>
|
|
153
|
+
</template>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import FormInputerDialog from "@/components/dialog/FormInputerDialog.vue";
|
|
3
|
+
import DialogTrigger from "@/components/ui/dialog/DialogTrigger.vue";
|
|
4
|
+
import PinInputer from "@/components/helper/PinInputer.vue";
|
|
5
|
+
import { Eye, EyeOff } from "lucide-vue-next";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { ref, computed } from "vue";
|
|
8
|
+
import api from "@/api/api";
|
|
9
|
+
import { toast } from "vue-sonner";
|
|
10
|
+
import PwdScore from "@/components/forms/auth/PwdScore.vue";
|
|
11
|
+
|
|
12
|
+
// Use correct dialog imports (assume alias is @/components/ui/dialog)
|
|
13
|
+
import { DialogTitle, DialogDescription } from "@/components/ui/dialog";
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{ class?: string }>();
|
|
16
|
+
const emits = defineEmits(["finish"]);
|
|
17
|
+
|
|
18
|
+
const formError = ref<null | string>(null);
|
|
19
|
+
const formLoading = ref(false);
|
|
20
|
+
const dialogOpen = ref(false);
|
|
21
|
+
|
|
22
|
+
// State for password visibility toggles
|
|
23
|
+
const showPwd = ref(false);
|
|
24
|
+
const showPwd1 = ref(false);
|
|
25
|
+
const showPwd2 = ref(false);
|
|
26
|
+
|
|
27
|
+
// State for password fields and score
|
|
28
|
+
const pwdStr = ref("");
|
|
29
|
+
const pwd1Str = ref("");
|
|
30
|
+
const pwdScore = ref(0);
|
|
31
|
+
const changePwdErr = ref<string | null>(null);
|
|
32
|
+
|
|
33
|
+
// For loading spinner on submit
|
|
34
|
+
const isLoadingChangePwd = computed(() => formLoading.value);
|
|
35
|
+
|
|
36
|
+
// Handler for password input
|
|
37
|
+
const pwd1Inputed = (e: Event) => {
|
|
38
|
+
const target = e.target as HTMLInputElement;
|
|
39
|
+
pwd1Str.value = target.value;
|
|
40
|
+
changePwdErr.value = null;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const pwdInputed = (e: Event) => {
|
|
44
|
+
const target = e.target as HTMLInputElement;
|
|
45
|
+
pwdStr.value = target.value;
|
|
46
|
+
changePwdErr.value = null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
function changePwd(_: FormData, form$: any) {
|
|
50
|
+
console.log(form$.data)
|
|
51
|
+
if (form$.data.password !== form$.data.password2) {
|
|
52
|
+
formError.value = "Ulangi password tidak sama";
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (pwdScore.value < 4) {
|
|
56
|
+
formError.value = "Mohon gunakan password yang lebih sulit untuk ditebak";
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
formError.value = null;
|
|
60
|
+
formLoading.value = true;
|
|
61
|
+
api
|
|
62
|
+
.post("/auth/changepassword", {
|
|
63
|
+
currentPassword: form$.data.currentPassword,
|
|
64
|
+
password: form$.data.password
|
|
65
|
+
})
|
|
66
|
+
.then(() => {
|
|
67
|
+
dialogOpen.value = false;
|
|
68
|
+
toast("Password sukses diubah");
|
|
69
|
+
emits("finish");
|
|
70
|
+
})
|
|
71
|
+
.catch((err: { message: string }) => {
|
|
72
|
+
formError.value = err.message;
|
|
73
|
+
})
|
|
74
|
+
.finally(() => {
|
|
75
|
+
formLoading.value = false;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<FormInputerDialog @submit="changePwd" v-model:error="formError" v-model:saving="formLoading" v-model:show="dialogOpen">
|
|
82
|
+
<template #trigger>
|
|
83
|
+
<DialogTrigger :class="cn('', props.class)">
|
|
84
|
+
<slot></slot>
|
|
85
|
+
</DialogTrigger>
|
|
86
|
+
</template>
|
|
87
|
+
<template #body>
|
|
88
|
+
<Vueform :endpoint="changePwd">
|
|
89
|
+
<TextElement
|
|
90
|
+
name="currentPassword"
|
|
91
|
+
:input-type="showPwd ? 'text' : 'password'"
|
|
92
|
+
label="Kata Sandi saat ini"
|
|
93
|
+
placeholder="Masukkan kata sandi..."
|
|
94
|
+
:floating="false"
|
|
95
|
+
:rules="['required']"
|
|
96
|
+
@input="pwdInputed"
|
|
97
|
+
onpaste="return false;">
|
|
98
|
+
<template #addon-after>
|
|
99
|
+
<EyeOff :size="22" v-if="showPwd" class="cursor-pointer text-slate-400" @click="showPwd = false" />
|
|
100
|
+
<Eye :size="22" v-else class="cursor-pointer text-slate-400" @click="showPwd = true" />
|
|
101
|
+
</template>
|
|
102
|
+
</TextElement>
|
|
103
|
+
<TextElement
|
|
104
|
+
name="password"
|
|
105
|
+
:input-type="showPwd1 ? 'text' : 'password'"
|
|
106
|
+
label="Kata Sandi Baru"
|
|
107
|
+
placeholder="Masukkan kata sandi..."
|
|
108
|
+
:floating="false"
|
|
109
|
+
:rules="['required']"
|
|
110
|
+
@input="pwd1Inputed"
|
|
111
|
+
onpaste="return false;">
|
|
112
|
+
<template #addon-after>
|
|
113
|
+
<EyeOff :size="22" v-if="showPwd1" class="cursor-pointer text-slate-400" @click="showPwd1 = false" />
|
|
114
|
+
<Eye :size="22" v-else class="cursor-pointer text-slate-400" @click="showPwd1 = true" />
|
|
115
|
+
</template>
|
|
116
|
+
</TextElement>
|
|
117
|
+
<div class="col-span-12 -mt-2.5 mb-4 px-1">
|
|
118
|
+
<PwdScore v-model="pwdScore" :password="pwd1Str" />
|
|
119
|
+
</div>
|
|
120
|
+
<TextElement
|
|
121
|
+
name="password2"
|
|
122
|
+
:input-type="showPwd2 ? 'text' : 'password'"
|
|
123
|
+
label="Ulangi Kata Sandi"
|
|
124
|
+
placeholder="Masukkan kata sandi..."
|
|
125
|
+
:floating="false"
|
|
126
|
+
:rules="['required']"
|
|
127
|
+
@input="changePwdErr = null"
|
|
128
|
+
onpaste="return false;">
|
|
129
|
+
<template #addon-after>
|
|
130
|
+
<EyeOff :size="22" v-if="showPwd2" class="cursor-pointer text-slate-400" @click="showPwd2 = false" />
|
|
131
|
+
<Eye :size="22" v-else class="cursor-pointer text-slate-400" @click="showPwd2 = true" />
|
|
132
|
+
</template>
|
|
133
|
+
</TextElement>
|
|
134
|
+
<div class="relative col-span-12 mt-1 h-12 cursor-default overflow-hidden rounded-md !border-gray-300 !bg-gray-300 px-6 !text-gray-300 transition" v-if="isLoadingChangePwd">
|
|
135
|
+
<div class="bottom-0 left-0 right-0 top-0 bg-gray-300">
|
|
136
|
+
<svg class="absolute bottom-0 left-0 right-0 top-0 m-auto h-7 w-7 animate-spin text-black" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
137
|
+
<circle class="opacity-15" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="2" />
|
|
138
|
+
<path class="opacity-15" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
|
|
139
|
+
</svg>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<ButtonElement size="lg" name="submit" button-class="mt-1 font-medium h-12 text-md" button-label="Tetapkan Kata Sandi" :submits="true" :full="true" v-else />
|
|
143
|
+
</Vueform>
|
|
144
|
+
</template>
|
|
145
|
+
<template #header>
|
|
146
|
+
<DialogTitle>Ganti Password</DialogTitle>
|
|
147
|
+
<DialogDescription class="text-sm">Masukkan password lama dan password baru Anda di bawah ini</DialogDescription>
|
|
148
|
+
</template>
|
|
149
|
+
</FormInputerDialog>
|
|
150
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { LucideCheck, LucideMinus } from 'lucide-vue-next';
|
|
4
|
+
import { onMounted, watch } from 'vue';
|
|
5
|
+
|
|
6
|
+
const model = defineModel();
|
|
7
|
+
const emits = defineEmits(['change']);
|
|
8
|
+
const props = defineProps(['checked', 'disabled', 'class', 'ignoreModel', 'indeterminate']);
|
|
9
|
+
|
|
10
|
+
function toggleCheckbox() {
|
|
11
|
+
if (props.disabled) return;
|
|
12
|
+
if (!props.ignoreModel) model.value = !model.value;
|
|
13
|
+
emits('change', model.value);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
watch(() => props.checked, (checked) => {
|
|
17
|
+
if (props.ignoreModel) return;
|
|
18
|
+
model.value = checked;
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
if (props.checked && !props.ignoreModel) model.value = props.checked;
|
|
23
|
+
})
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="size-8 hover:bg-blue-100 rounded-full flex items-center justify-center cursor-pointer -my-[5px] -mx-1.5 group"
|
|
28
|
+
:class="{'!cursor-default hover:bg-transparent': props.disabled}"
|
|
29
|
+
v-on:click="toggleCheckbox">
|
|
30
|
+
<div :class="[
|
|
31
|
+
cn('size-[18px] border-2 border-gray-400 rounded-sm flex items-center justify-center text-transparent group-hover:border-blue-500 transition', props.class),
|
|
32
|
+
{
|
|
33
|
+
'!border-blue-500 bg-blue-500 !text-white': (model || props.checked || props.indeterminate) && !props.disabled,
|
|
34
|
+
'bg-gray-100 !border-gray-100': props.disabled,
|
|
35
|
+
'!text-gray-300': (model || props.checked) && props.disabled,
|
|
36
|
+
'!text-transparent': !model && !props.checked && props.disabled,
|
|
37
|
+
},
|
|
38
|
+
]">
|
|
39
|
+
<LucideCheck :stroke-width="3" v-if="model || props.checked"/>
|
|
40
|
+
<LucideMinus :stroke-width="3" v-else-if="props.indeterminate"/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="isConfigLoaded" class="fixed bottom-4 right-4 z-50">
|
|
3
|
+
<div class="rounded-lg border bg-white p-4 shadow-lg dark:bg-gray-800">
|
|
4
|
+
<h3 class="mb-2 text-sm font-semibold">Configuration Test</h3>
|
|
5
|
+
<div class="space-y-2 text-xs">
|
|
6
|
+
<div><strong>App:</strong> {{ appName }}</div>
|
|
7
|
+
<div><strong>Company:</strong> {{ companyName }}</div>
|
|
8
|
+
<div>
|
|
9
|
+
<strong>Color:</strong>
|
|
10
|
+
<span class="inline-block h-4 w-4 rounded" :style="{ backgroundColor: primaryColor }"></span>
|
|
11
|
+
{{ primaryColor }}
|
|
12
|
+
</div>
|
|
13
|
+
<div><strong>API:</strong> {{ apiBaseUrl }}</div>
|
|
14
|
+
<div><strong>Token Key:</strong> {{ tokenKey }}</div>
|
|
15
|
+
<div><strong>Org Levels:</strong> {{ organizationLevels.join(", ") }}</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="mt-3 space-x-2">
|
|
18
|
+
<button @click="switchToConfig('myApp')" class="rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600">My App</button>
|
|
19
|
+
<button @click="switchToConfig('generic')" class="rounded bg-purple-500 px-2 py-1 text-xs text-white hover:bg-purple-600">Generic</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { useAppConfig } from "@/composables/useAppConfig";
|
|
27
|
+
import { myAppConfig } from "@/config/my-app.config";
|
|
28
|
+
import { genericConfig } from "@/config/examples/generic.config";
|
|
29
|
+
|
|
30
|
+
const { appName, companyName, primaryColor, apiBaseUrl, tokenKey, organizationLevels, isConfigLoaded, initializeConfig } = useAppConfig();
|
|
31
|
+
|
|
32
|
+
const switchToConfig = async (configName: string) => {
|
|
33
|
+
console.log(`🔄 Switching to ${configName} configuration...`);
|
|
34
|
+
|
|
35
|
+
let config;
|
|
36
|
+
switch (configName) {
|
|
37
|
+
case "myApp":
|
|
38
|
+
config = myAppConfig;
|
|
39
|
+
break;
|
|
40
|
+
case "generic":
|
|
41
|
+
config = genericConfig;
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
await initializeConfig(config);
|
|
49
|
+
console.log(`✅ Switched to ${configName} configuration`);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.error(`❌ Failed to switch to ${configName} configuration:`, error);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useAppConfig } from '@/composables/useAppConfig'
|
|
3
|
+
|
|
4
|
+
const { companyName, appVersion } = useAppConfig()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
© Copyright {{ new Date().getFullYear() }} {{ companyName }}
|
|
9
|
+
• Version {{ appVersion }}
|
|
10
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
errorMessage: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
defineProps<Props>();
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits<{
|
|
9
|
+
retry: [];
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
function handleRetry() {
|
|
13
|
+
emit('retry');
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div class="fixed inset-0 z-50 bg-white dark:bg-dark_bg flex items-center justify-center">
|
|
19
|
+
<div class="text-center max-w-md mx-auto px-6">
|
|
20
|
+
<div class="mb-8">
|
|
21
|
+
<div class="w-16 h-16 mx-auto mb-4 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center">
|
|
22
|
+
<svg class="w-8 h-8 text-red-600 dark:text-red-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
23
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" />
|
|
24
|
+
</svg>
|
|
25
|
+
</div>
|
|
26
|
+
<h2 class="text-2xl font-semibold text-gray-800 dark:text-white mb-2">Koneksi Gagal</h2>
|
|
27
|
+
<p class="text-gray-600 dark:text-gray-300 mb-6">{{ errorMessage }}</p>
|
|
28
|
+
<button
|
|
29
|
+
@click="handleRetry"
|
|
30
|
+
class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-offset-gray-900 transition-colors duration-200"
|
|
31
|
+
>
|
|
32
|
+
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
33
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
|
34
|
+
</svg>
|
|
35
|
+
Muat Ulang
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import * as icons from "lucide-vue-next";
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
size: Number,
|
|
11
|
+
color: String,
|
|
12
|
+
strokeWidth: Number,
|
|
13
|
+
defaultClass: String,
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const icon = computed(() => icons[props.name]);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<component
|
|
21
|
+
:is="icon"
|
|
22
|
+
:size="size"
|
|
23
|
+
:color="color"
|
|
24
|
+
:stroke-width="strokeWidth"
|
|
25
|
+
:default-class="defaultClass"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, ref, watch } from 'vue';
|
|
3
|
+
import * as pdfjsLib from 'pdfjs-dist';
|
|
4
|
+
import { nanoid } from 'nanoid';
|
|
5
|
+
|
|
6
|
+
const props = defineProps(['url', 'index', 'scale', 'zoomType']);
|
|
7
|
+
const pages = ref<any[]>([]);
|
|
8
|
+
let pdfDoc: any;
|
|
9
|
+
let canvas: any;
|
|
10
|
+
|
|
11
|
+
async function renderPages() {
|
|
12
|
+
if (!pdfDoc) return;
|
|
13
|
+
console.log('render page with zoom', props.zoomType);
|
|
14
|
+
for (let i = 1; i <= pdfDoc.numPages; i++) {
|
|
15
|
+
pdfDoc.getPage(i).then(function(page: any) {
|
|
16
|
+
let scale = 1;
|
|
17
|
+
switch (props.zoomType) {
|
|
18
|
+
case 'page-width':
|
|
19
|
+
scale = getPageWidthScale();
|
|
20
|
+
break;
|
|
21
|
+
case 'page-fit':
|
|
22
|
+
scale = getPageFitScale();
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
scale = props.scale ? Number(props.scale) : 1;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const viewport = page.getViewport({ scale });
|
|
30
|
+
const canvasElement = document.getElementById(`page-${props.index}-${i}`) as HTMLCanvasElement;
|
|
31
|
+
const context = canvasElement.getContext('2d');
|
|
32
|
+
|
|
33
|
+
// Set canvas dimensions based on the viewport and device pixel ratio
|
|
34
|
+
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
35
|
+
canvasElement.width = viewport.width * devicePixelRatio;
|
|
36
|
+
canvasElement.height = viewport.height * devicePixelRatio;
|
|
37
|
+
canvasElement.style.width = `${viewport.width}px`;
|
|
38
|
+
canvasElement.style.height = `${viewport.height}px`;
|
|
39
|
+
|
|
40
|
+
// Scale the context to ensure correct drawing
|
|
41
|
+
context?.scale(devicePixelRatio, devicePixelRatio);
|
|
42
|
+
|
|
43
|
+
// Render PDF page into canvas context
|
|
44
|
+
var renderContext = {
|
|
45
|
+
canvasContext: context,
|
|
46
|
+
viewport: viewport
|
|
47
|
+
};
|
|
48
|
+
var renderTask = page.render(renderContext);
|
|
49
|
+
renderTask.promise.then(function () {
|
|
50
|
+
console.log('Page rendered');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Function to calculate scale for page width
|
|
57
|
+
function getPageWidthScale() {
|
|
58
|
+
let containerWidth = document.getElementById('pdf-viewer-container')?.clientWidth;
|
|
59
|
+
return containerWidth || 0 / canvas?.width || 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Function to calculate scale for page fit
|
|
63
|
+
function getPageFitScale() {
|
|
64
|
+
let containerWidth = document.getElementById('pdf-viewer-container')?.clientWidth;
|
|
65
|
+
let containerHeight = document.getElementById('pdf-viewer-container')?.clientHeight;
|
|
66
|
+
return Math.min(containerWidth || 0 / canvas.width, containerHeight || 0 / canvas.height);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
watch(() => props.scale, () => {
|
|
70
|
+
renderPages();
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
watch(() => props.zoomType, () => {
|
|
74
|
+
renderPages();
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
onMounted(async () => {
|
|
79
|
+
// Set the worker path
|
|
80
|
+
pdfjsLib.GlobalWorkerOptions.workerSrc = '/scripts/pdf.worker.min.js';
|
|
81
|
+
|
|
82
|
+
// Load the PDF document
|
|
83
|
+
pdfjsLib.getDocument({
|
|
84
|
+
// url: `${props.url}?v=${nanoid()}`,
|
|
85
|
+
url: props.url,
|
|
86
|
+
withCredentials: true,
|
|
87
|
+
}).promise.then((pdf) => {
|
|
88
|
+
for (let i = 1; i <= pdf.numPages; i++) {
|
|
89
|
+
pages.value.push(i);
|
|
90
|
+
}
|
|
91
|
+
pdfDoc = pdf;
|
|
92
|
+
renderPages();
|
|
93
|
+
});
|
|
94
|
+
})
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<template>
|
|
98
|
+
<div class="space-y-4" :id="`pdf-${index}-container`">
|
|
99
|
+
<div class="rounded-md shadow-sm overflow-hidden" v-for="page in pages">
|
|
100
|
+
<canvas :key="page" :id="`page-${index}-${page}`"></canvas>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|