@dasidev/dasi-ui 1.0.10 → 1.0.13
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/bin/dasi-cli old2.cjs +225 -0
- package/bin/dasi-cli.cjs +180 -74
- package/package.json +29 -136
- package/template/package.json.template +100 -0
- /package/{index.html → template/index.html} +0 -0
- /package/{postcss.config.js → template/postcss.config.js} +0 -0
- /package/{public → template/public}/favicon.ico +0 -0
- /package/{public → template/public}/img/brand/ic_pln.svg +0 -0
- /package/{public → template/public}/img/brand/mapp_power_logo.svg +0 -0
- /package/{public → template/public}/img/common/pltu_ulumbu_flores_ntt.jpeg +0 -0
- /package/{public → template/public}/scripts/pdf.worker.min.js +0 -0
- /package/{public → template/public}/scripts/pdf.worker.min.mjs +0 -0
- /package/{public → template/public}/scripts/pdf.worker.mjs +0 -0
- /package/{public → template/public}/scripts/pdf.worker.mjs.map +0 -0
- /package/{src → template/src}/App.vue +0 -0
- /package/{src → template/src}/__tests__/index.test.ts +0 -0
- /package/{src → template/src}/api/api.ts +0 -0
- /package/{src → template/src}/assets/app-selector.svg +0 -0
- /package/{src → template/src}/assets/dasi.png +0 -0
- /package/{src → template/src}/assets/foto_ss.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-blue.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-gray.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-green.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-orange.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-purple.svg +0 -0
- /package/{src → template/src}/assets/icons/circle-red.svg +0 -0
- /package/{src → template/src}/assets/icons/harbor.svg +0 -0
- /package/{src → template/src}/assets/icons/ic-box-red.svg +0 -0
- /package/{src → template/src}/assets/icons/ic-chevron-right.svg +0 -0
- /package/{src → template/src}/assets/icons/ic-loading.svg +0 -0
- /package/{src → template/src}/assets/icons/ic-reset.svg +0 -0
- /package/{src → template/src}/assets/icons/ic-sailing.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-app-selector.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-browser-check.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-calendar.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-chart-bar.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-chart-doc.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-chart-line.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-chart-mix.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-chart-pie.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-continue.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-dashboard-2.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-dashboard.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-data-kelistrikan.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-data-sentral.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-database.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-desktop.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-download.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-energi-primer.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-faba-apk2.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-faba.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-factory.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-globe-doc.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-ikk.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-kbb.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-kos.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-kpi-bod.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-kss.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-map.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-monitoring-harian.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-notification.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-overview.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-pltu.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-sebaran-sentral.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-data-kelistrikan.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-data-sentral.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-energi-primer.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-faba-apk2.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-ikk.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-kbb.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-kos.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-kpi-bod.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-kss.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-monitoring-harian.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-overview.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-select-sebaran-sentral.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-sentral-white.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-shipping.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-sort.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-tree-box.svg +0 -0
- /package/{src → template/src}/assets/icons/icon-warehouse.svg +0 -0
- /package/{src → template/src}/assets/icons/pin-green.svg +0 -0
- /package/{src → template/src}/assets/icons/pin-orange.svg +0 -0
- /package/{src → template/src}/assets/icons/pin-purple.svg +0 -0
- /package/{src → template/src}/assets/icons/ship.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-antri.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-bongkar.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-invoice.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-loading.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-pembayaran.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-pengiriman.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-sailing.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-shipment-completed.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-shipment-in-progress.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-shipment-over-sla.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-spt.svg +0 -0
- /package/{src → template/src}/assets/icons/shipment/icon-total-shipment.svg +0 -0
- /package/{src → template/src}/assets/icons/upload_doc_icon.svg +0 -0
- /package/{src → template/src}/assets/icons/upload_icon_blue.svg +0 -0
- /package/{src → template/src}/assets/login-bg-day-min.jpg +0 -0
- /package/{src → template/src}/assets/login-bg-night-min.jpg +0 -0
- /package/{src → template/src}/assets/login-bg.jpg +0 -0
- /package/{src → template/src}/assets/login-day.png +0 -0
- /package/{src → template/src}/assets/login-night.png +0 -0
- /package/{src → template/src}/assets/lucide-circle-plus-blue.svg +0 -0
- /package/{src → template/src}/assets/pdf-logo.svg +0 -0
- /package/{src → template/src}/assets/pemasok-card-bg.svg +0 -0
- /package/{src → template/src}/assets/success_animation.gif +0 -0
- /package/{src → template/src}/assets/success_animation.mp4 +0 -0
- /package/{src → template/src}/assets/success_animation.webm +0 -0
- /package/{src → template/src}/components/button/BtnAddOutline.vue +0 -0
- /package/{src → template/src}/components/button/BtnCircle.vue +0 -0
- /package/{src → template/src}/components/button/BtnOutline.vue +0 -0
- /package/{src → template/src}/components/button/BtnPrimary.vue +0 -0
- /package/{src → template/src}/components/button/BtnSecondary.vue +0 -0
- /package/{src → template/src}/components/detail/AccountDetailTimeline.vue +0 -0
- /package/{src → template/src}/components/detail/ApprovalInfo.vue +0 -0
- /package/{src → template/src}/components/detail/DCI2.vue +0 -0
- /package/{src → template/src}/components/detail/DetailContentHeader.vue +0 -0
- /package/{src → template/src}/components/detail/DetailContentItem.vue +0 -0
- /package/{src → template/src}/components/detail/DetailContentItems.vue +0 -0
- /package/{src → template/src}/components/detail/DetailContentLoading.vue +0 -0
- /package/{src → template/src}/components/detail/DetailContentTablet.vue +0 -0
- /package/{src → template/src}/components/detail/DetailSheet.vue +0 -0
- /package/{src → template/src}/components/detail/DetailTimeline.vue +0 -0
- /package/{src → template/src}/components/detail/DocApprovalDialog.vue +0 -0
- /package/{src → template/src}/components/detail/DocViewerContent.vue +0 -0
- /package/{src → template/src}/components/dialog/ConfirmDialog.vue +0 -0
- /package/{src → template/src}/components/dialog/DialogBase.vue +0 -0
- /package/{src → template/src}/components/dialog/DialogSelect.vue +0 -0
- /package/{src → template/src}/components/dialog/ErrorDialog.vue +0 -0
- /package/{src → template/src}/components/dialog/FormDialog.vue +0 -0
- /package/{src → template/src}/components/dialog/FormInputerDialog.vue +0 -0
- /package/{src → template/src}/components/dialog/InfoDialog.vue +0 -0
- /package/{src → template/src}/components/dialog/SuccessDialog.vue +0 -0
- /package/{src → template/src}/components/examples/TestSchemaExample.vue +0 -0
- /package/{src → template/src}/components/forms/auth/LoginForm.vue +0 -0
- /package/{src → template/src}/components/forms/auth/PwdScore.vue +0 -0
- /package/{src → template/src}/components/helper/ApiTester.vue +0 -0
- /package/{src → template/src}/components/helper/ChangePwd.vue +0 -0
- /package/{src → template/src}/components/helper/CheckboxElement.vue +0 -0
- /package/{src → template/src}/components/helper/ConfigSwitcher.vue +0 -0
- /package/{src → template/src}/components/helper/Copyright.vue +0 -0
- /package/{src → template/src}/components/helper/ErrorScreen.vue +0 -0
- /package/{src → template/src}/components/helper/LucideIcon.vue +0 -0
- /package/{src → template/src}/components/helper/PdfViewer.vue +0 -0
- /package/{src → template/src}/components/helper/PinInputer.vue +0 -0
- /package/{src → template/src}/components/helper/PrivacyPolicy.vue +0 -0
- /package/{src → template/src}/components/layout/PageActivityHeader.vue +0 -0
- /package/{src → template/src}/components/layout/PageHeader.vue +0 -0
- /package/{src → template/src}/components/loadings/LoadingDialog.vue +0 -0
- /package/{src → template/src}/components/loadings/LoadingDialogSpin.vue +0 -0
- /package/{src → template/src}/components/loadings/LoadingIndicator.vue +0 -0
- /package/{src → template/src}/components/loadings/LoadingScreen.vue +0 -0
- /package/{src → template/src}/components/notif/Notif.vue +0 -0
- /package/{src → template/src}/components/notif/NotifItem.vue +0 -0
- /package/{src → template/src}/components/pages/Header.vue +0 -0
- /package/{src → template/src}/components/pages/Leftbar.vue +0 -0
- /package/{src → template/src}/components/pages/PageActivity.vue +0 -0
- /package/{src → template/src}/components/pages/PageActivityContent.vue +0 -0
- /package/{src → template/src}/components/pages/PageContentTable.vue +0 -0
- /package/{src → template/src}/components/pages/PageTab.vue +0 -0
- /package/{src → template/src}/components/selector/BaseSelector.vue +0 -0
- /package/{src → template/src}/components/selector/ConfigDataSelector.vue +0 -0
- /package/{src → template/src}/components/settings/SettingsItem.vue +0 -0
- /package/{src → template/src}/components/tab/TabView.vue +0 -0
- /package/{src → template/src}/components/tab/TabViewItem.vue +0 -0
- /package/{src → template/src}/components/tab/TabViewItemBar.vue +0 -0
- /package/{src → template/src}/components/tables/CellHover.vue +0 -0
- /package/{src → template/src}/components/tables/DashboardDataTable.vue +0 -0
- /package/{src → template/src}/components/tables/DataStatusTag.vue +0 -0
- /package/{src → template/src}/components/tables/DataTable.vue +0 -0
- /package/{src → template/src}/components/tables/DataTableAccordion.vue +0 -0
- /package/{src → template/src}/components/tables/DataTableActionRow.vue +0 -0
- /package/{src → template/src}/components/tables/DataTableCell.vue +0 -0
- /package/{src → template/src}/components/tables/DataTableHeader.vue +0 -0
- /package/{src → template/src}/components/tables/DataTableRow.vue +0 -0
- /package/{src → template/src}/components/tables/ExpandedTable.vue +0 -0
- /package/{src → template/src}/components/tables/PageTable.vue +0 -0
- /package/{src → template/src}/components/tables/Pagination.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/BaseDropdownTable.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableActivity.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableAsset.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableConfig.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableDataKonektor.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableDataLabel.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableDataSchema.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableFabaPemanfaat.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableGroup.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableHalaman.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableLevel.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableOrganization.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTablePengelola.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableQueryLayer.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableSentral.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/DropdownTableWarehouse.vue +0 -0
- /package/{src → template/src}/components/tables/dropdown/TableDropdown.vue +0 -0
- /package/{src → template/src}/components/ui/accordion/Accordion.vue +0 -0
- /package/{src → template/src}/components/ui/accordion/AccordionContent.vue +0 -0
- /package/{src → template/src}/components/ui/accordion/AccordionItem.vue +0 -0
- /package/{src → template/src}/components/ui/accordion/AccordionTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/accordion/index.ts +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialog.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogAction.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogCancel.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogContent.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogDescription.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogFooter.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogHeader.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogTitle.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/AlertDialogTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/alert-dialog/index.ts +0 -0
- /package/{src → template/src}/components/ui/avatar/Avatar.vue +0 -0
- /package/{src → template/src}/components/ui/avatar/AvatarFallback.vue +0 -0
- /package/{src → template/src}/components/ui/avatar/AvatarImage.vue +0 -0
- /package/{src → template/src}/components/ui/avatar/UsersAvatar.vue +0 -0
- /package/{src → template/src}/components/ui/avatar/index.ts +0 -0
- /package/{src → template/src}/components/ui/button/Button.vue +0 -0
- /package/{src → template/src}/components/ui/button/index.ts +0 -0
- /package/{src → template/src}/components/ui/calendar/Calendar.vue +0 -0
- /package/{src → template/src}/components/ui/calendar/index.ts +0 -0
- /package/{src → template/src}/components/ui/checkbox/Checkbox.vue +0 -0
- /package/{src → template/src}/components/ui/checkbox/index.ts +0 -0
- /package/{src → template/src}/components/ui/command/Command.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandDialog.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandEmpty.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandGroup.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandInput.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandItem.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandList.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandSeparator.vue +0 -0
- /package/{src → template/src}/components/ui/command/CommandShortcut.vue +0 -0
- /package/{src → template/src}/components/ui/command/index.ts +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenu.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuCheckboxItem.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuContent.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuGroup.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuItem.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuLabel.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuPortal.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuRadioGroup.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuRadioItem.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuSeparator.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuShortcut.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuSub.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuSubContent.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuSubTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/ContextMenuTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/context-menu/index.ts +0 -0
- /package/{src → template/src}/components/ui/datetime/DatetimeRangeComponent.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/Dialog.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogClose.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogContent.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogDescription.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogFooter.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogHeader.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogScrollContent.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogTitle.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/DialogTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/dialog/index.ts +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenu.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuContent.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuGroup.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuItem.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuLabel.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuSeparator.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuShortcut.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuSub.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuSubContent.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/DropdownMenuTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/dropdown-menu/index.ts +0 -0
- /package/{src → template/src}/components/ui/form/FormControl.vue +0 -0
- /package/{src → template/src}/components/ui/form/FormDescription.vue +0 -0
- /package/{src → template/src}/components/ui/form/FormItem.vue +0 -0
- /package/{src → template/src}/components/ui/form/FormLabel.vue +0 -0
- /package/{src → template/src}/components/ui/form/FormMessage.vue +0 -0
- /package/{src → template/src}/components/ui/form/index.ts +0 -0
- /package/{src → template/src}/components/ui/form/useFormField.ts +0 -0
- /package/{src → template/src}/components/ui/hover-card/HoverCard.vue +0 -0
- /package/{src → template/src}/components/ui/hover-card/HoverCardContent.vue +0 -0
- /package/{src → template/src}/components/ui/hover-card/HoverCardTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/hover-card/index.ts +0 -0
- /package/{src → template/src}/components/ui/input/Input.vue +0 -0
- /package/{src → template/src}/components/ui/input/index.ts +0 -0
- /package/{src → template/src}/components/ui/label/Label.vue +0 -0
- /package/{src → template/src}/components/ui/label/index.ts +0 -0
- /package/{src → template/src}/components/ui/pagination/PaginationEllipsis.vue +0 -0
- /package/{src → template/src}/components/ui/pagination/PaginationFirst.vue +0 -0
- /package/{src → template/src}/components/ui/pagination/PaginationLast.vue +0 -0
- /package/{src → template/src}/components/ui/pagination/PaginationNext.vue +0 -0
- /package/{src → template/src}/components/ui/pagination/PaginationPrev.vue +0 -0
- /package/{src → template/src}/components/ui/pagination/index.ts +0 -0
- /package/{src → template/src}/components/ui/pin-input/PinInput.vue +0 -0
- /package/{src → template/src}/components/ui/pin-input/PinInputGroup.vue +0 -0
- /package/{src → template/src}/components/ui/pin-input/PinInputInput.vue +0 -0
- /package/{src → template/src}/components/ui/pin-input/PinInputSeparator.vue +0 -0
- /package/{src → template/src}/components/ui/pin-input/index.ts +0 -0
- /package/{src → template/src}/components/ui/popover/Popover.vue +0 -0
- /package/{src → template/src}/components/ui/popover/PopoverContent.vue +0 -0
- /package/{src → template/src}/components/ui/popover/PopoverTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/popover/index.ts +0 -0
- /package/{src → template/src}/components/ui/preview/PreviewPdf.vue +0 -0
- /package/{src → template/src}/components/ui/progress/ProgressCircle.vue +0 -0
- /package/{src → template/src}/components/ui/progress/SemiCircularProgressBar.vue +0 -0
- /package/{src → template/src}/components/ui/progress/TotalCalories.vue +0 -0
- /package/{src → template/src}/components/ui/radio-group/RadioGroup.vue +0 -0
- /package/{src → template/src}/components/ui/radio-group/RadioGroupItem.vue +0 -0
- /package/{src → template/src}/components/ui/radio-group/index.ts +0 -0
- /package/{src → template/src}/components/ui/scroll-area/ScrollArea.vue +0 -0
- /package/{src → template/src}/components/ui/scroll-area/ScrollBar.vue +0 -0
- /package/{src → template/src}/components/ui/scroll-area/index.ts +0 -0
- /package/{src → template/src}/components/ui/select/Select.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectContent.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectGroup.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectInline.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectItem.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectItemText.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectLabel.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectScrollDownButton.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectScrollUpButton.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectSeparator.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectTriggerCustom.vue +0 -0
- /package/{src → template/src}/components/ui/select/SelectValue.vue +0 -0
- /package/{src → template/src}/components/ui/select/index.ts +0 -0
- /package/{src → template/src}/components/ui/separator/Separator.vue +0 -0
- /package/{src → template/src}/components/ui/separator/index.ts +0 -0
- /package/{src → template/src}/components/ui/sheet/Sheet.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetClose.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetContent.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetDescription.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetFooter.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetHeader.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetTitle.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/SheetTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/sheet/index.ts +0 -0
- /package/{src → template/src}/components/ui/skeleton/Skeleton.vue +0 -0
- /package/{src → template/src}/components/ui/skeleton/index.ts +0 -0
- /package/{src → template/src}/components/ui/sonner/Sonner.vue +0 -0
- /package/{src → template/src}/components/ui/sonner/index.ts +0 -0
- /package/{src → template/src}/components/ui/star/StarRating.vue +0 -0
- /package/{src → template/src}/components/ui/switch/Switch.vue +0 -0
- /package/{src → template/src}/components/ui/switch/index.ts +0 -0
- /package/{src → template/src}/components/ui/table/Table.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableBody.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableCaption.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableCell.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableEmpty.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableFooter.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableHead.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableHeader.vue +0 -0
- /package/{src → template/src}/components/ui/table/TableRow.vue +0 -0
- /package/{src → template/src}/components/ui/table/index.ts +0 -0
- /package/{src → template/src}/components/ui/tabs/Tabs.vue +0 -0
- /package/{src → template/src}/components/ui/tabs/TabsContent.vue +0 -0
- /package/{src → template/src}/components/ui/tabs/TabsList.vue +0 -0
- /package/{src → template/src}/components/ui/tabs/TabsTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/tabs/index.ts +0 -0
- /package/{src → template/src}/components/ui/tags-input/TagsInput.vue +0 -0
- /package/{src → template/src}/components/ui/tags-input/TagsInputInput.vue +0 -0
- /package/{src → template/src}/components/ui/tags-input/TagsInputItem.vue +0 -0
- /package/{src → template/src}/components/ui/tags-input/TagsInputItemDelete.vue +0 -0
- /package/{src → template/src}/components/ui/tags-input/TagsInputItemText.vue +0 -0
- /package/{src → template/src}/components/ui/tags-input/index.ts +0 -0
- /package/{src → template/src}/components/ui/textarea/Textarea.vue +0 -0
- /package/{src → template/src}/components/ui/textarea/index.ts +0 -0
- /package/{src → template/src}/components/ui/tooltip/Tooltip.vue +0 -0
- /package/{src → template/src}/components/ui/tooltip/TooltipContent.vue +0 -0
- /package/{src → template/src}/components/ui/tooltip/TooltipProvider.vue +0 -0
- /package/{src → template/src}/components/ui/tooltip/TooltipTrigger.vue +0 -0
- /package/{src → template/src}/components/ui/tooltip/index.ts +0 -0
- /package/{src → template/src}/composables/useAppConfig.ts +0 -0
- /package/{src → template/src}/composables/useDarkMode.ts +0 -0
- /package/{src → template/src}/config/app.config.ts +0 -0
- /package/{src → template/src}/config/examples/ecommerce.config.ts +0 -0
- /package/{src → template/src}/config/examples/generic.config.ts +0 -0
- /package/{src → template/src}/config/menu.config.ts +0 -0
- /package/{src → template/src}/config/my-app.config.ts +0 -0
- /package/{src → template/src}/config/test-config.ts +0 -0
- /package/{src → template/src}/config/theme.config.ts +0 -0
- /package/{src → template/src}/docs/index.ts +0 -0
- /package/{src → template/src}/docs.scss +0 -0
- /package/{src → template/src}/index.d.ts +0 -0
- /package/{src → template/src}/index.ts +0 -0
- /package/{src → template/src}/layouts/AuthLayout.vue +0 -0
- /package/{src → template/src}/layouts/DefaultLayout.vue +0 -0
- /package/{src → template/src}/layouts/DocsLayout.vue +0 -0
- /package/{src → template/src}/layouts/FormGlobal.vue +0 -0
- /package/{src → template/src}/layouts/GlobalDialog.vue +0 -0
- /package/{src → template/src}/layouts/RakorConfirmDialog.vue +0 -0
- /package/{src → template/src}/layouts/SettingsLayout.vue +0 -0
- /package/{src → template/src}/lib/constants.ts +0 -0
- /package/{src → template/src}/lib/detail.utils.ts +0 -0
- /package/{src → template/src}/lib/form.utils.ts +0 -0
- /package/{src → template/src}/lib/page.flow.utils.ts +0 -0
- /package/{src → template/src}/lib/page.utils.ts +0 -0
- /package/{src → template/src}/lib/performance.utils.ts +0 -0
- /package/{src → template/src}/lib/tablerow.utils.ts +0 -0
- /package/{src → template/src}/lib/utils.ts +0 -0
- /package/{src → template/src}/main.scss +0 -0
- /package/{src → template/src}/main.ts +0 -0
- /package/{src → template/src}/menu.ts +0 -0
- /package/{src → template/src}/nestedlist_color.scss +0 -0
- /package/{src → template/src}/router/index.ts +0 -0
- /package/{src → template/src}/stores/auth.ts +0 -0
- /package/{src → template/src}/stores/counter.ts +0 -0
- /package/{src → template/src}/stores/dialog.ts +0 -0
- /package/{src → template/src}/stores/form.ts +0 -0
- /package/{src → template/src}/stores/tabs.ts +0 -0
- /package/{src → template/src}/tw.scss +0 -0
- /package/{src → template/src}/types/form.types.ts +0 -0
- /package/{src → template/src}/types/types.ts +0 -0
- /package/{src → template/src}/utils/config.utils.ts +0 -0
- /package/{src → template/src}/views/NotFound.vue +0 -0
- /package/{src → template/src}/views/PageActivity.vue +0 -0
- /package/{src → template/src}/views/auth/LoginView.vue +0 -0
- /package/{src → template/src}/views/auth/OauthCallback.vue +0 -0
- /package/{src → template/src}/views/dashboard/index.vue +0 -0
- /package/{src → template/src}/views/settings/AccountSettingsView.vue +0 -0
- /package/{src → template/src}/views/settings/AuditLogsSettingsView.vue +0 -0
- /package/{src → template/src}/views/settings/DeviceSettingsView.vue +0 -0
- /package/{src → template/src}/views/settings/MainSettingsView.vue +0 -0
- /package/{src → template/src}/views/settings/ProfileSettingsView.vue +0 -0
- /package/{src → template/src}/vueform/config/informasi-gudang.ts +0 -0
- /package/{src → template/src}/vueform/config/test-schema.ts +0 -0
- /package/{src → template/src}/vueform/config/types.ts +0 -0
- /package/{src → template/src}/vueform/customization/classes.js +0 -0
- /package/{src → template/src}/vueform/customization/tailwind.classes.js +0 -0
- /package/{src → template/src}/vueform/elements/ConfigDataSelectorElement.vue +0 -0
- /package/{src → template/src}/vueform/elements/DateSelectorElement.vue +0 -0
- /package/{src → template/src}/vueform/elements/SelectorElement.vue +0 -0
- /package/{src → template/src}/vueform/schemas/date-selector-test.ts +0 -0
- /package/{src → template/src}/vueform/schemas/informasi-gudang.ts +0 -0
- /package/{src → template/src}/vueform/schemas/test-schema.ts +0 -0
- /package/{src → template/src}/vueform.config.js +0 -0
- /package/{src → template/src}/vueform.validator.ts +0 -0
- /package/{tailwind.config.js → template/tailwind.config.js} +0 -0
- /package/{tsconfig.json → template/tsconfig.json} +0 -0
- /package/{vite.config.ts → template/vite.config.ts} +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { program } = require('commander');
|
|
3
|
+
const inquirer = require('inquirer');
|
|
4
|
+
const fs = require('fs-extra');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const chalk = require('chalk');
|
|
7
|
+
const ora = require('ora');
|
|
8
|
+
|
|
9
|
+
program
|
|
10
|
+
.name('dasi-ui')
|
|
11
|
+
.description('DASI UI - Complete Admin Template Setup')
|
|
12
|
+
.version('1.0.10');
|
|
13
|
+
|
|
14
|
+
program
|
|
15
|
+
.command('create [project-name]')
|
|
16
|
+
.description('Initialize DASI UI admin template')
|
|
17
|
+
.action(async (projectName) => {
|
|
18
|
+
console.log(chalk.blue.bold('🚀 Welcome to DASI UI Admin Template Setup'));
|
|
19
|
+
console.log(chalk.gray('This will set up a complete admin dashboard in your current directory\n'));
|
|
20
|
+
|
|
21
|
+
console.log(chalk.blue.bold(`
|
|
22
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
23
|
+
║ ║
|
|
24
|
+
║ 🚀 DASI UI - Complete Admin Template Generator ║
|
|
25
|
+
║ ║
|
|
26
|
+
║ Creating: ${chalk.cyan(projectName.padEnd(35))} ║
|
|
27
|
+
║ ║
|
|
28
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
29
|
+
`));
|
|
30
|
+
|
|
31
|
+
const questions = [
|
|
32
|
+
{
|
|
33
|
+
type: 'input',
|
|
34
|
+
name: 'projectName',
|
|
35
|
+
message: '📦 Project name:',
|
|
36
|
+
default: projectName,
|
|
37
|
+
validate: (input) => input.length > 0 || 'Project name is required'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'input',
|
|
41
|
+
name: 'appTitle',
|
|
42
|
+
message: '📱 App title:',
|
|
43
|
+
default: 'DASI Admin Dashboard'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'input',
|
|
47
|
+
name: 'appDescription',
|
|
48
|
+
message: '📝 App description:',
|
|
49
|
+
default: 'Complete admin dashboard built with DASI UI'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: 'input',
|
|
53
|
+
name: 'author',
|
|
54
|
+
message: '👤 Author name:',
|
|
55
|
+
default: 'DASI Developer'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: 'list',
|
|
59
|
+
name: 'packageManager',
|
|
60
|
+
message: '📦 Choose package manager:',
|
|
61
|
+
choices: ['npm', 'yarn', 'pnpm'],
|
|
62
|
+
default: 'npm'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'input',
|
|
66
|
+
name: 'apiUrl',
|
|
67
|
+
message: '🔗 API base URL:',
|
|
68
|
+
default: 'http://localhost:8080/api'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'confirm',
|
|
72
|
+
name: 'darkMode',
|
|
73
|
+
message: '🌙 Enable dark mode?',
|
|
74
|
+
default: true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'confirm',
|
|
78
|
+
name: 'gitInit',
|
|
79
|
+
message: '📚 Initialize git repository?',
|
|
80
|
+
default: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: 'confirm',
|
|
84
|
+
name: 'installDeps',
|
|
85
|
+
message: '📥 Install dependencies now?',
|
|
86
|
+
default: true
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
const answers = await inquirer.prompt(questions);
|
|
91
|
+
const spinner = ora('Setting up DASI UI Admin Template...').start();
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
const projectPath = path.join(process.cwd(), projectName);
|
|
95
|
+
const templatePath = path.join(__dirname, '../');
|
|
96
|
+
|
|
97
|
+
if (fs.existsSync(projectPath)) {
|
|
98
|
+
spinner.fail('Project directory already exists');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
spinner.text = '📁 Creating project directory...';
|
|
103
|
+
fs.mkdirSync(projectPath, { recursive: true });
|
|
104
|
+
console.log(chalk.green(`✅ Directory created: ${projectPath}`));
|
|
105
|
+
|
|
106
|
+
spinner.text = '📋 Copying template files...';
|
|
107
|
+
|
|
108
|
+
const templatePackageJson = path.join(templatePath, 'package.json');
|
|
109
|
+
console.log(chalk.white(` Template package.json exists: ${fs.existsSync(templatePackageJson)}`));
|
|
110
|
+
|
|
111
|
+
await fs.copy(templatePath, projectPath, {
|
|
112
|
+
filter: (src) => {
|
|
113
|
+
const relativePath = path.relative(templatePath, src);
|
|
114
|
+
|
|
115
|
+
const excludePatterns = [
|
|
116
|
+
'node_modules',
|
|
117
|
+
'dist',
|
|
118
|
+
'.git',
|
|
119
|
+
'package-lock.json',
|
|
120
|
+
'yarn.lock',
|
|
121
|
+
'.DS_Store'
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
const shouldExclude = excludePatterns.some(pattern =>
|
|
125
|
+
relativePath.includes(pattern) || src.includes(pattern)
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
if (!shouldExclude) {
|
|
129
|
+
console.log(chalk.gray(` Copying: ${relativePath}`));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return !shouldExclude;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const copiedPackageJson = path.join(projectPath, 'package.json');
|
|
137
|
+
console.log(chalk.white(` Copied package.json exists: ${fs.existsSync(copiedPackageJson)}`));
|
|
138
|
+
|
|
139
|
+
if (!fs.existsSync(copiedPackageJson)) {
|
|
140
|
+
throw new Error('Template copy failed - package.json not found');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
spinner.text = '⚙️ Updating configuration...';
|
|
144
|
+
const packageJsonPath = path.join(projectPath, 'package.json');
|
|
145
|
+
let packageJson = await fs.readJson(packageJsonPath);
|
|
146
|
+
|
|
147
|
+
packageJson.name = answers.projectName;
|
|
148
|
+
packageJson.description = answers.appDescription;
|
|
149
|
+
packageJson.author = answers.author;
|
|
150
|
+
packageJson.version = '0.1.0';
|
|
151
|
+
|
|
152
|
+
const envContent = `VITE_APP_TITLE=${answers.appTitle}
|
|
153
|
+
VITE_APP_DESCRIPTION=${answers.appDescription}
|
|
154
|
+
VITE_APP_AUTHOR=${answers.author}
|
|
155
|
+
VITE_API_URL=${answers.apiUrl}
|
|
156
|
+
VITE_DARK_MODE=${answers.darkMode}
|
|
157
|
+
VITE_INCLUDE_AUTH=${answers.includeAuth}
|
|
158
|
+
VITE_INCLUDE_CHARTS=${answers.includeCharts}
|
|
159
|
+
VITE_INCLUDE_MAPS=${answers.includeMaps}`;
|
|
160
|
+
|
|
161
|
+
await fs.writeFile(path.join(projectPath, '.env.example'), envContent);
|
|
162
|
+
await fs.copyFile(path.join(projectPath, '.env.example'), path.join(projectPath, '.env'));
|
|
163
|
+
|
|
164
|
+
await fs.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
|
165
|
+
|
|
166
|
+
if (answers.gitInit) {
|
|
167
|
+
spinner.text = '📚 Initializing git repository...';
|
|
168
|
+
try {
|
|
169
|
+
const { execSync } = require('child_process');
|
|
170
|
+
execSync('git init', { stdio: 'ignore' });
|
|
171
|
+
execSync('git add .', { stdio: 'ignore' });
|
|
172
|
+
execSync('git commit -m "Initial commit: DASI UI Admin Template"', { stdio: 'ignore' });
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.log(chalk.yellow('⚠️ Git initialization failed, continuing...'));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (answers.installDeps) {
|
|
179
|
+
spinner.text = '📦 Installing dependencies...';
|
|
180
|
+
try {
|
|
181
|
+
const { execSync } = require('child_process');
|
|
182
|
+
execSync(`${answers.packageManager} install`, { stdio: 'pipe' });
|
|
183
|
+
} catch (error) {
|
|
184
|
+
spinner.warn('⚠️ Dependencies installation failed');
|
|
185
|
+
console.log(chalk.yellow(`Please run manually: ${answers.packageManager} install`));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
console.log(chalk.green(`
|
|
190
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
191
|
+
║ ║
|
|
192
|
+
║ 🎉 Success! Your admin dashboard is ready! ║
|
|
193
|
+
║ ║
|
|
194
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
195
|
+
`));
|
|
196
|
+
|
|
197
|
+
console.log(chalk.green('\n🎉 Setup Complete! Your admin dashboard is ready.'));
|
|
198
|
+
console.log(chalk.green('\n📋 What you get:'));
|
|
199
|
+
console.log(chalk.white(' • Complete admin dashboard'));
|
|
200
|
+
console.log(chalk.white(' • Authentication system' + (answers.includeAuth ? ' ✅' : ' ❌')));
|
|
201
|
+
console.log(chalk.white(' • Chart components' + (answers.includeCharts ? ' ✅' : ' ❌')));
|
|
202
|
+
console.log(chalk.white(' • Map components' + (answers.includeMaps ? ' ✅' : ' ❌')));
|
|
203
|
+
console.log(chalk.white(' • Dark mode' + (answers.darkMode ? ' ✅' : ' ❌')));
|
|
204
|
+
console.log(chalk.white(' • TypeScript support'));
|
|
205
|
+
console.log(chalk.white(' • Tailwind CSS styling'));
|
|
206
|
+
console.log(chalk.white(' • Vue 3 + Pinia + Vue Router'));
|
|
207
|
+
|
|
208
|
+
console.log(chalk.green('\n🚀 Next steps:'));
|
|
209
|
+
console.log(chalk.white(` ${answers.packageManager} run dev`));
|
|
210
|
+
console.log(chalk.gray(' Open http://localhost:3000 to view your admin dashboard'));
|
|
211
|
+
|
|
212
|
+
console.log(chalk.green('\n📚 Documentation:'));
|
|
213
|
+
console.log(chalk.white(' • README.md for detailed setup'));
|
|
214
|
+
console.log(chalk.white(' • src/ folder for all components'));
|
|
215
|
+
console.log(chalk.white(' • .env file for configuration'));
|
|
216
|
+
|
|
217
|
+
} catch (error) {
|
|
218
|
+
spinner.fail('❌ Setup failed!');
|
|
219
|
+
console.error(chalk.red('Error Details:'));
|
|
220
|
+
console.error(chalk.red(error.message));
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
program.parse();
|
package/bin/dasi-cli.cjs
CHANGED
|
@@ -5,27 +5,28 @@ const fs = require('fs-extra');
|
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const chalk = require('chalk');
|
|
7
7
|
const ora = require('ora');
|
|
8
|
+
const { execSync } = require('child_process');
|
|
8
9
|
|
|
9
10
|
program
|
|
10
11
|
.name('dasi-ui')
|
|
11
|
-
.description('DASI UI -
|
|
12
|
-
.version('1.0.
|
|
12
|
+
.description('🚀 DASI UI - Admin Dashboard Template')
|
|
13
|
+
.version('1.0.13');
|
|
13
14
|
|
|
14
15
|
program
|
|
15
16
|
.command('create [project-name]')
|
|
16
|
-
.description('
|
|
17
|
+
.description('Create a new DASI UI admin dashboard')
|
|
17
18
|
.action(async (projectName) => {
|
|
18
19
|
console.log(chalk.blue.bold('🚀 Welcome to DASI UI Admin Template Setup'));
|
|
19
|
-
console.log(chalk.gray('This will set up a
|
|
20
|
+
console.log(chalk.gray('This will set up a admin dashboard in your current directory\n'));
|
|
20
21
|
|
|
21
22
|
console.log(chalk.blue.bold(`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
24
|
+
║ ║
|
|
25
|
+
║ 🚀 DASI UI - Complete Admin Template Generator ║
|
|
26
|
+
║ ║
|
|
27
|
+
║ Creating: ${chalk.cyan(projectName.padEnd(35))} ║
|
|
28
|
+
║ ║
|
|
29
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
29
30
|
`));
|
|
30
31
|
|
|
31
32
|
const questions = [
|
|
@@ -40,7 +41,7 @@ program
|
|
|
40
41
|
type: 'input',
|
|
41
42
|
name: 'appTitle',
|
|
42
43
|
message: '📱 App title:',
|
|
43
|
-
default: 'DASI Admin Dashboard'
|
|
44
|
+
default: projectName ? projectName.charAt(0).toUpperCase() + projectName.slice(1).replace(/-/g, ' ') : 'DASI Admin Dashboard'
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
type: 'input',
|
|
@@ -88,129 +89,234 @@ program
|
|
|
88
89
|
];
|
|
89
90
|
|
|
90
91
|
const answers = await inquirer.prompt(questions);
|
|
91
|
-
|
|
92
|
+
|
|
93
|
+
// 🎯 Enhanced spinner configuration
|
|
94
|
+
const spinner = ora({
|
|
95
|
+
text: '🏗️ Building your admin dashboard...',
|
|
96
|
+
spinner: 'dots',
|
|
97
|
+
color: 'cyan',
|
|
98
|
+
hideCursor: true,
|
|
99
|
+
interval: 100 // Faster animation
|
|
100
|
+
}).start();
|
|
92
101
|
|
|
93
102
|
try {
|
|
94
|
-
const projectPath = path.join(process.cwd(), projectName);
|
|
95
|
-
const templatePath = path.join(__dirname, '../');
|
|
103
|
+
const projectPath = path.join(process.cwd(), answers.projectName);
|
|
96
104
|
|
|
97
105
|
if (fs.existsSync(projectPath)) {
|
|
98
|
-
spinner.fail('Project directory already exists');
|
|
106
|
+
spinner.fail('❌ Project directory already exists');
|
|
99
107
|
return;
|
|
100
108
|
}
|
|
101
109
|
|
|
110
|
+
// 🎯 Step 1: Create directory with animated spinner
|
|
102
111
|
spinner.text = '📁 Creating project directory...';
|
|
112
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
103
113
|
fs.mkdirSync(projectPath, { recursive: true });
|
|
104
|
-
console.log(chalk.green(
|
|
114
|
+
console.log(chalk.green(`\n✅ Directory created: ${projectPath}`));
|
|
115
|
+
spinner.start(); // Restart spinner
|
|
105
116
|
|
|
117
|
+
// 🎯 Step 2: Copy template with progress and continuous animation
|
|
106
118
|
spinner.text = '📋 Copying template files...';
|
|
119
|
+
let copiedFiles = 0;
|
|
120
|
+
const templatePath = path.join(__dirname, '../template');
|
|
121
|
+
|
|
122
|
+
if (!fs.existsSync(templatePath)) {
|
|
123
|
+
throw new Error('Template folder not found. Please ensure this package is installed correctly.');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Count files for progress
|
|
127
|
+
const totalFiles = await countFiles(templatePath);
|
|
107
128
|
|
|
108
|
-
|
|
109
|
-
|
|
129
|
+
// 🎯 Keep spinner active during copy
|
|
130
|
+
const copyInterval = setInterval(() => {
|
|
131
|
+
spinner.render();
|
|
132
|
+
}, 100);
|
|
110
133
|
|
|
111
134
|
await fs.copy(templatePath, projectPath, {
|
|
112
135
|
filter: (src) => {
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
136
|
+
const relativePath = path.relative(templatePath, src);
|
|
137
|
+
|
|
138
|
+
// Exclude unnecessary files
|
|
139
|
+
const excludePatterns = [
|
|
140
|
+
'node_modules',
|
|
141
|
+
'dist',
|
|
142
|
+
'.git',
|
|
143
|
+
'package-lock.json',
|
|
144
|
+
'yarn.lock',
|
|
145
|
+
'.DS_Store'
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
const shouldExclude = excludePatterns.some(pattern =>
|
|
149
|
+
relativePath.includes(pattern)
|
|
150
|
+
);
|
|
119
151
|
|
|
120
152
|
if (!shouldExclude) {
|
|
121
|
-
|
|
153
|
+
copiedFiles++;
|
|
154
|
+
const progress = Math.round((copiedFiles / totalFiles) * 100);
|
|
155
|
+
spinner.text = `📋 Copying template files... ${progress}% (${copiedFiles}/${totalFiles})`;
|
|
122
156
|
}
|
|
157
|
+
|
|
123
158
|
return !shouldExclude;
|
|
124
159
|
}
|
|
125
160
|
});
|
|
126
161
|
|
|
127
|
-
|
|
128
|
-
console.log(chalk.white(` Copied package.json exists: ${fs.existsSync(copiedPackageJson)}`));
|
|
129
|
-
|
|
130
|
-
if (!fs.existsSync(copiedPackageJson)) {
|
|
131
|
-
throw new Error('Template copy failed - package.json not found');
|
|
132
|
-
}
|
|
162
|
+
clearInterval(copyInterval);
|
|
133
163
|
|
|
164
|
+
// 🎯 Step 3: Configuration updates with smooth transitions
|
|
134
165
|
spinner.text = '⚙️ Updating configuration...';
|
|
166
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
167
|
+
|
|
168
|
+
const templatePackageJsonPath = path.join(projectPath, 'package.json.template');
|
|
135
169
|
const packageJsonPath = path.join(projectPath, 'package.json');
|
|
170
|
+
|
|
171
|
+
if (fs.existsSync(templatePackageJsonPath)) {
|
|
172
|
+
spinner.text = '📝 Setting up package.json...';
|
|
173
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
174
|
+
await fs.move(templatePackageJsonPath, packageJsonPath);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Update package.json
|
|
178
|
+
spinner.text = '🔧 Configuring project settings...';
|
|
179
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
136
180
|
let packageJson = await fs.readJson(packageJsonPath);
|
|
137
181
|
|
|
138
182
|
packageJson.name = answers.projectName;
|
|
139
183
|
packageJson.description = answers.appDescription;
|
|
140
184
|
packageJson.author = answers.author;
|
|
141
|
-
packageJson.version = '0.1.0';
|
|
185
|
+
packageJson.version = '0.1.0';
|
|
186
|
+
|
|
187
|
+
await fs.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
|
142
188
|
|
|
189
|
+
// Create environment file
|
|
190
|
+
spinner.text = '🌍 Setting up environment variables...';
|
|
191
|
+
await new Promise(resolve => setTimeout(resolve, 300));
|
|
143
192
|
const envContent = `VITE_APP_TITLE=${answers.appTitle}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
VITE_INCLUDE_AUTH=${answers.includeAuth}
|
|
149
|
-
VITE_INCLUDE_CHARTS=${answers.includeCharts}
|
|
150
|
-
VITE_INCLUDE_MAPS=${answers.includeMaps}`;
|
|
193
|
+
VITE_APP_DESCRIPTION=${answers.appDescription}
|
|
194
|
+
VITE_APP_AUTHOR=${answers.author}
|
|
195
|
+
VITE_API_URL=${answers.apiUrl}
|
|
196
|
+
VITE_DARK_MODE=${answers.darkMode}`;
|
|
151
197
|
|
|
152
198
|
await fs.writeFile(path.join(projectPath, '.env.example'), envContent);
|
|
153
199
|
await fs.copyFile(path.join(projectPath, '.env.example'), path.join(projectPath, '.env'));
|
|
154
200
|
|
|
155
|
-
|
|
156
|
-
|
|
201
|
+
// 🎯 Step 4: Git initialization with continuous animation
|
|
157
202
|
if (answers.gitInit) {
|
|
158
203
|
spinner.text = '📚 Initializing git repository...';
|
|
204
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
159
205
|
try {
|
|
160
|
-
|
|
161
|
-
execSync('git
|
|
162
|
-
execSync('git
|
|
163
|
-
|
|
206
|
+
// Set git config untuk menghindari prompt
|
|
207
|
+
execSync('git config user.name "DASI Developer"', { cwd: projectPath, stdio: 'ignore' });
|
|
208
|
+
execSync('git config user.email "dev@dasi.id"', { cwd: projectPath, stdio: 'ignore' });
|
|
209
|
+
|
|
210
|
+
execSync('git init', { cwd: projectPath, stdio: 'ignore' });
|
|
211
|
+
|
|
212
|
+
spinner.text = '📝 Adding files to git...';
|
|
213
|
+
await new Promise(resolve => setTimeout(resolve, 400));
|
|
214
|
+
execSync('git add .', { cwd: projectPath, stdio: 'ignore' });
|
|
215
|
+
|
|
216
|
+
spinner.text = '💾 Creating initial commit...';
|
|
217
|
+
await new Promise(resolve => setTimeout(resolve, 400));
|
|
218
|
+
|
|
219
|
+
// 🎯 Keep spinner active during git commit
|
|
220
|
+
const gitInterval = setInterval(() => {
|
|
221
|
+
spinner.render();
|
|
222
|
+
}, 100);
|
|
223
|
+
|
|
224
|
+
try {
|
|
225
|
+
execSync('git commit -m "🚀 Initial commit: DASI UI Admin Template"', {
|
|
226
|
+
cwd: projectPath,
|
|
227
|
+
stdio: 'ignore',
|
|
228
|
+
timeout: 10000
|
|
229
|
+
});
|
|
230
|
+
} catch (commitError) {
|
|
231
|
+
console.log(chalk.yellow('\n⚠️ Git commit skipped, continuing...'));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
clearInterval(gitInterval);
|
|
235
|
+
|
|
164
236
|
} catch (error) {
|
|
165
|
-
console.log(chalk.yellow('⚠️ Git initialization failed, continuing...'));
|
|
237
|
+
console.log(chalk.yellow('\n⚠️ Git initialization failed, continuing...'));
|
|
238
|
+
spinner.start();
|
|
166
239
|
}
|
|
167
240
|
}
|
|
168
241
|
|
|
242
|
+
// 🎯 Step 5: Install dependencies with continuous spinner
|
|
169
243
|
if (answers.installDeps) {
|
|
170
244
|
spinner.text = '📦 Installing dependencies...';
|
|
245
|
+
spinner.color = 'yellow';
|
|
246
|
+
|
|
247
|
+
// 🎯 Keep spinner active during npm install
|
|
248
|
+
const installInterval = setInterval(() => {
|
|
249
|
+
spinner.render();
|
|
250
|
+
}, 100);
|
|
251
|
+
|
|
171
252
|
try {
|
|
172
|
-
|
|
173
|
-
|
|
253
|
+
execSync(`${answers.packageManager} install`, {
|
|
254
|
+
cwd: projectPath,
|
|
255
|
+
stdio: 'pipe'
|
|
256
|
+
});
|
|
257
|
+
spinner.color = 'green';
|
|
174
258
|
} catch (error) {
|
|
259
|
+
spinner.color = 'red';
|
|
175
260
|
spinner.warn('⚠️ Dependencies installation failed');
|
|
176
|
-
console.log(chalk.yellow(`Please run manually: ${answers.packageManager} install`));
|
|
261
|
+
console.log(chalk.yellow(`Please run manually: cd ${answers.projectName} && ${answers.packageManager} install`));
|
|
177
262
|
}
|
|
263
|
+
|
|
264
|
+
clearInterval(installInterval);
|
|
178
265
|
}
|
|
179
266
|
|
|
267
|
+
// 🎯 Success with celebration
|
|
268
|
+
spinner.succeed('✅ Admin dashboard created successfully!');
|
|
269
|
+
|
|
180
270
|
console.log(chalk.green(`
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
271
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
272
|
+
║ ║
|
|
273
|
+
║ 🎉 Success! Your admin dashboard is ready! ║
|
|
274
|
+
║ ║
|
|
275
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
186
276
|
`));
|
|
187
277
|
|
|
188
|
-
console.log(chalk.
|
|
189
|
-
console.log(chalk.
|
|
190
|
-
console.log(chalk.white(
|
|
191
|
-
console.log(chalk.white(
|
|
192
|
-
console.log(chalk.white(
|
|
193
|
-
|
|
194
|
-
console.log(chalk.
|
|
195
|
-
console.log(chalk.white(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
console.log(chalk.green('\n📚 Documentation:'));
|
|
204
|
-
console.log(chalk.white(' • README.md for detailed setup'));
|
|
205
|
-
console.log(chalk.white(' • src/ folder for all components'));
|
|
206
|
-
console.log(chalk.white(' • .env file for configuration'));
|
|
278
|
+
console.log(chalk.cyan('\n📋 Project Summary:'));
|
|
279
|
+
console.log(chalk.white(` 📁 Location: ${projectPath}`));
|
|
280
|
+
console.log(chalk.white(` 📱 Title: ${answers.appTitle}`));
|
|
281
|
+
console.log(chalk.white(` 📦 Package Manager: ${answers.packageManager}`));
|
|
282
|
+
console.log(chalk.white(` 🌙 Dark Mode: ${answers.darkMode ? '✅' : '❌'}`));
|
|
283
|
+
|
|
284
|
+
console.log(chalk.green('\n🚀 Next Steps:'));
|
|
285
|
+
console.log(chalk.white(` 1️⃣ cd ${answers.projectName}`));
|
|
286
|
+
if (!answers.installDeps) {
|
|
287
|
+
console.log(chalk.white(` 2️⃣ ${answers.packageManager} install`));
|
|
288
|
+
console.log(chalk.white(` 3️⃣ ${answers.packageManager} run dev`));
|
|
289
|
+
} else {
|
|
290
|
+
console.log(chalk.white(` 2️⃣ ${answers.packageManager} run dev`));
|
|
291
|
+
}
|
|
292
|
+
console.log(chalk.gray(` 🌐 Open http://localhost:3000`));
|
|
207
293
|
|
|
208
294
|
} catch (error) {
|
|
209
295
|
spinner.fail('❌ Setup failed!');
|
|
210
296
|
console.error(chalk.red('Error Details:'));
|
|
211
297
|
console.error(chalk.red(error.message));
|
|
298
|
+
console.error(chalk.red(error.stack));
|
|
212
299
|
process.exit(1);
|
|
213
300
|
}
|
|
214
301
|
});
|
|
215
302
|
|
|
303
|
+
// Helper function to count files
|
|
304
|
+
async function countFiles(dir) {
|
|
305
|
+
let count = 0;
|
|
306
|
+
const items = await fs.readdir(dir);
|
|
307
|
+
|
|
308
|
+
for (const item of items) {
|
|
309
|
+
const fullPath = path.join(dir, item);
|
|
310
|
+
const stat = await fs.stat(fullPath);
|
|
311
|
+
|
|
312
|
+
if (stat.isDirectory()) {
|
|
313
|
+
count += await countFiles(fullPath);
|
|
314
|
+
} else {
|
|
315
|
+
count++;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return count;
|
|
320
|
+
}
|
|
321
|
+
|
|
216
322
|
program.parse();
|