efficient-shell 12.28.0 → 12.32.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 +81 -1
- package/dist/{Browser-PC45PVTN.js → Browser-36SDGA64.js} +16 -16
- package/dist/Calculator-GDHNFSB6.js +29 -0
- package/dist/{CurrencyConverter-BB4QWNER.js → CurrencyConverter-PXCCCUS2.js} +9 -9
- package/dist/Files-NVUIAUO5.js +141 -0
- package/dist/{Notepad-BLUA2254.js → Notepad-QA2CD6GC.js} +8 -8
- package/dist/PdfViewer-627HEAIL.js +1 -0
- package/dist/{PomodoroTimer-KIJKDHVO.js → PomodoroTimer-HD2ZNOUV.js} +68 -68
- package/dist/{Preview-JVL2N5GN.js → Preview-FW2KT6FQ.js} +29 -29
- package/dist/Sidebar-QNJNEBT2.js +44 -0
- package/dist/{Stock-JQEJMIMG.js → Stock-EDZSOJAQ.js} +3 -3
- package/dist/{Weather-FAQX55XL.js → Weather-OTVZZEE7.js} +18 -18
- package/dist/{WorldClock-YSZNGEL2.js → WorldClock-PDKFE5S7.js} +6 -6
- package/dist/ai/index.js +111 -111
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-TKIYZE7V.js → chunk-246K337V.js} +1 -1
- package/dist/{chunk-TGLUENXE.js → chunk-25M4CAB3.js} +1 -1
- package/dist/{chunk-VBLCYL4L.js → chunk-26Y66IXU.js} +2 -2
- package/dist/chunk-2PNG5UR6.js +22 -0
- package/dist/chunk-3ECUHYHI.js +28 -0
- package/dist/{chunk-ZGWXSHVM.js → chunk-3MAGUYG2.js} +1 -1
- package/dist/{chunk-4PIQG2ZK.js → chunk-3TR6C5V4.js} +1 -1
- package/dist/{chunk-NOGSS432.js → chunk-3UMS74TZ.js} +1 -1
- package/dist/{chunk-GC4N4UQM.js → chunk-4U2OUX65.js} +5 -5
- package/dist/{chunk-MKNDDB6U.js → chunk-4XN6ACGV.js} +1 -1
- package/dist/{chunk-232YPI2L.js → chunk-555KW6TM.js} +4 -4
- package/dist/{chunk-6KOMF6WL.js → chunk-5OJFYNEZ.js} +1 -1
- package/dist/{chunk-SE6IQZYW.js → chunk-5R3NDBCD.js} +9 -9
- package/dist/{chunk-RBS3AWE7.js → chunk-5XHJ3H6Y.js} +4 -4
- package/dist/{chunk-XHSMDUEW.js → chunk-5XOF3O4B.js} +3 -3
- package/dist/{chunk-N2445WHJ.js → chunk-6AAGZ34A.js} +9 -9
- package/dist/{chunk-CON5NRCO.js → chunk-6MA7VXZR.js} +2 -2
- package/dist/{chunk-VLBIM33E.js → chunk-6ZTVZIPI.js} +6 -6
- package/dist/chunk-7CHEHWGL.js +9 -0
- package/dist/{chunk-XAEI36TW.js → chunk-7IRO4JAA.js} +1 -1
- package/dist/{chunk-JFGJJNT2.js → chunk-7JR2O3IX.js} +6 -6
- package/dist/{chunk-7TNZ3DTT.js → chunk-A6YUCAGF.js} +2 -2
- package/dist/{chunk-HSUTZCRT.js → chunk-A7JAHN75.js} +1 -1
- package/dist/chunk-ADNUV6OV.js +8 -0
- package/dist/chunk-AFLG5E4O.js +7 -0
- package/dist/{chunk-7K3FYCRZ.js → chunk-AFVI75RH.js} +9 -9
- package/dist/{chunk-WN3JHPJI.js → chunk-AGNHOSES.js} +6 -6
- package/dist/{chunk-63IGYBCQ.js → chunk-AJ2EEWZT.js} +2 -2
- package/dist/chunk-AWY2ZOXT.js +14 -0
- package/dist/{chunk-Y7KDCC6E.js → chunk-B7UT3W4C.js} +1 -1
- package/dist/chunk-BEN2LJWQ.js +5 -0
- package/dist/{chunk-QADNVFV5.js → chunk-BIBQAEHV.js} +1 -1
- package/dist/{chunk-AMIMNRYU.js → chunk-BLC6HAU3.js} +1 -1
- package/dist/{chunk-ZBJ7FTA5.js → chunk-BXPEEPYH.js} +1 -1
- package/dist/{chunk-CBVKGAZH.js → chunk-CAIUI3DC.js} +1 -1
- package/dist/{chunk-XSVQ5V7L.js → chunk-CHRK5R3Y.js} +9 -9
- package/dist/{chunk-7GJIIBJD.js → chunk-COF2CF5R.js} +1 -1
- package/dist/{chunk-ZGCCV4WE.js → chunk-CYTK7DCA.js} +6 -6
- package/dist/{chunk-HNEI2RKX.js → chunk-DGFC5BX4.js} +1 -1
- package/dist/{chunk-NUPK6CUV.js → chunk-DHLXSL3Y.js} +1 -1
- package/dist/{chunk-GEVNBBM7.js → chunk-DRIO2Y4R.js} +4 -4
- package/dist/{chunk-EEB5XPWP.js → chunk-DWGMTMDU.js} +1 -1
- package/dist/{chunk-XKNKRKHH.js → chunk-E6GGE7E5.js} +15 -15
- package/dist/{chunk-LAO6GLBY.js → chunk-FE6J5S5X.js} +6 -6
- package/dist/chunk-FKJPBQ6I.js +7 -0
- package/dist/{chunk-V3XS6BTJ.js → chunk-FXS2P23Q.js} +12 -12
- package/dist/chunk-G3NE4SGZ.js +11 -0
- package/dist/{chunk-WNOXHJVT.js → chunk-GX4CDXPK.js} +7 -7
- package/dist/chunk-H74VN7OI.js +2 -0
- package/dist/chunk-H7WMOY62.js +1 -0
- package/dist/{chunk-WPG3ZHYT.js → chunk-HGGDOMBV.js} +1 -1
- package/dist/{chunk-DIHHV6T6.js → chunk-HWV6UDFC.js} +1 -1
- package/dist/{chunk-HVYXJLAV.js → chunk-IBLRSK7V.js} +1 -1
- package/dist/{chunk-TDXRG43I.js → chunk-IE5XWHDU.js} +1 -1
- package/dist/chunk-IESNUXYH.js +1 -0
- package/dist/chunk-IYM5N7FH.js +4 -0
- package/dist/{chunk-KAKJ7ENS.js → chunk-J44SUUOG.js} +2 -2
- package/dist/chunk-JI55MXP4.js +12 -0
- package/dist/{chunk-X5MUSNKH.js → chunk-JIBU7YY4.js} +2 -2
- package/dist/{chunk-CMJD5URC.js → chunk-JLQ7N54N.js} +20 -20
- package/dist/chunk-JROPOGQP.js +2 -0
- package/dist/{chunk-N5RV73CI.js → chunk-JTJDXCJU.js} +4 -4
- package/dist/{chunk-SS3CROPR.js → chunk-JYVHFRKK.js} +5 -5
- package/dist/{chunk-56XCGOX5.js → chunk-JZ4V3RHK.js} +4 -4
- package/dist/{chunk-YO26RV3H.js → chunk-K4BM6PPZ.js} +1 -1
- package/dist/{chunk-DGHSCKOE.js → chunk-K4RY57UX.js} +4 -4
- package/dist/{chunk-FJVZ2W55.js → chunk-K73KBA5C.js} +4 -4
- package/dist/{chunk-V4XR4MOS.js → chunk-KDG7NWYX.js} +1 -1
- package/dist/{chunk-3YBXA72C.js → chunk-KFNQVNND.js} +1 -1
- package/dist/{chunk-24Y5JHIR.js → chunk-KTKFCR6T.js} +1 -1
- package/dist/chunk-L6XEON5Q.js +1 -0
- package/dist/{chunk-BT2YPDQL.js → chunk-LNXYVWEF.js} +3 -3
- package/dist/{chunk-574SLTKO.js → chunk-LOJAJARD.js} +8 -8
- package/dist/{chunk-JLRF6FN7.js → chunk-LOMNX5VH.js} +1 -1
- package/dist/{chunk-RZ2DWX4N.js → chunk-LQC5U5YT.js} +4 -4
- package/dist/chunk-LUAA4LKY.js +19 -0
- package/dist/{chunk-LL4KF43W.js → chunk-M2TQQKJO.js} +1 -1
- package/dist/chunk-M3D5FW5R.js +6 -0
- package/dist/{chunk-OXRQIWRT.js → chunk-M3FBPZ4G.js} +1 -1
- package/dist/{chunk-RVVQDBV7.js → chunk-MMSQZKJY.js} +5 -5
- package/dist/{chunk-4LOHQ4QB.js → chunk-NDGPJKE3.js} +5 -5
- package/dist/chunk-NMWV6BOL.js +8 -0
- package/dist/{chunk-O4YKOS74.js → chunk-NQ43KRRX.js} +9 -9
- package/dist/{chunk-SR4W2SYQ.js → chunk-NQA267J3.js} +8 -8
- package/dist/{chunk-75H4BWNC.js → chunk-NZ74N2IQ.js} +1 -1
- package/dist/{chunk-YYGJJ6EI.js → chunk-OA55OBDP.js} +1 -1
- package/dist/{chunk-47UH3D4B.js → chunk-OL2XKAX2.js} +1 -1
- package/dist/{chunk-WX2Q76WC.js → chunk-OQGCQQ7H.js} +6 -6
- package/dist/{chunk-OMFYTCBI.js → chunk-OU3J5TOO.js} +1 -1
- package/dist/{chunk-VFHKD7TQ.js → chunk-OWFJRER6.js} +1 -1
- package/dist/{chunk-MTYEY7HT.js → chunk-PK5KDLIG.js} +13 -13
- package/dist/chunk-PPVZMIBL.js +4 -0
- package/dist/{chunk-UEFIUTOU.js → chunk-PR5CON2G.js} +1 -1
- package/dist/chunk-PTEKHRNX.js +26 -0
- package/dist/{chunk-Z66QBDNU.js → chunk-PUXSFLWR.js} +1 -1
- package/dist/{chunk-VEQ45GAH.js → chunk-Q2LKH6RN.js} +1 -1
- package/dist/{chunk-NN32QUCE.js → chunk-Q2T5DRIK.js} +1 -1
- package/dist/{chunk-2DYVVHZA.js → chunk-QB4LAGMN.js} +1 -1
- package/dist/{chunk-GUHCKMC7.js → chunk-QBQMMOP6.js} +2 -2
- package/dist/{chunk-LIWBCIRZ.js → chunk-QJ6HVBAA.js} +5 -5
- package/dist/{chunk-W2663E4S.js → chunk-QPSKEDR7.js} +3 -3
- package/dist/{chunk-BKYRHQK2.js → chunk-QTWHMCCX.js} +11 -11
- package/dist/{chunk-MWTCGJAI.js → chunk-QUN3RSMN.js} +1 -1
- package/dist/{chunk-3FBXJO77.js → chunk-QXLYU5FR.js} +1 -1
- package/dist/{chunk-HLE4LTRU.js → chunk-QXTCEUFC.js} +1 -1
- package/dist/{chunk-7ZJRBFHA.js → chunk-QYKWVZ3R.js} +1 -1
- package/dist/{chunk-ATZ262BR.js → chunk-R3W6LZBG.js} +1 -1
- package/dist/{chunk-AFWLCXQD.js → chunk-R3ZEDJDZ.js} +7 -7
- package/dist/{chunk-DG2TGWXI.js → chunk-RIULA2CH.js} +11 -11
- package/dist/{chunk-2OUAPOLK.js → chunk-RLFZRIO4.js} +1 -1
- package/dist/{chunk-TU2L7NW3.js → chunk-RPSNYIDY.js} +5 -5
- package/dist/{chunk-WXZZGHET.js → chunk-RSRTE7RG.js} +1 -1
- package/dist/{chunk-EATV7FMU.js → chunk-S54Z2JAZ.js} +8 -8
- package/dist/{chunk-H2CPT6K3.js → chunk-T5UMQZ5X.js} +12 -12
- package/dist/{chunk-IB3LLQZC.js → chunk-TBXFRW3E.js} +1 -1
- package/dist/{chunk-JZBLOIL7.js → chunk-UJ23EKXU.js} +1 -1
- package/dist/{chunk-VLKJN6HX.js → chunk-V2OE6OTK.js} +13 -13
- package/dist/{chunk-EWVE5XG6.js → chunk-V7BHDLP2.js} +1 -1
- package/dist/{chunk-6Q7L32LL.js → chunk-VERSP62V.js} +1 -1
- package/dist/{chunk-QB2GJNGB.js → chunk-VI54L75G.js} +8 -8
- package/dist/{chunk-TYQ2JL4J.js → chunk-VTDW5GLS.js} +1 -1
- package/dist/chunk-VVI4Y6XA.js +23 -0
- package/dist/{chunk-BC4FE77W.js → chunk-VW3ZUWW2.js} +62 -62
- package/dist/{chunk-74JMBOQH.js → chunk-WJTZE3PL.js} +27 -27
- package/dist/chunk-WW5AXVBX.js +2 -0
- package/dist/{chunk-RF3ZFTAU.js → chunk-X4IFSC57.js} +1 -1
- package/dist/{chunk-OOWPLQD5.js → chunk-X6AMAYXV.js} +2 -2
- package/dist/{chunk-XAF5ZI7H.js → chunk-XBC7CBVJ.js} +1 -1
- package/dist/{chunk-T7D73HT7.js → chunk-XFC7AWPW.js} +10 -10
- package/dist/{chunk-4BKJ6A5H.js → chunk-XKBCF6SK.js} +10 -10
- package/dist/chunk-XOQH6VSU.js +14 -0
- package/dist/{chunk-4IHYWLWE.js → chunk-XOXTMWV3.js} +2 -2
- package/dist/{chunk-OM6VWUAZ.js → chunk-XR7SPONC.js} +1 -1
- package/dist/{chunk-UH5ZGWSA.js → chunk-Y7XX6Z3M.js} +7 -7
- package/dist/chunk-YELYAGCX.js +13 -0
- package/dist/{chunk-DJXXY23A.js → chunk-YG6ONZIB.js} +2 -2
- package/dist/{chunk-CEIIQRK5.js → chunk-ZFQI3EVU.js} +5 -5
- package/dist/{chunk-VP2GI3UP.js → chunk-ZGY2OK7Q.js} +8 -8
- package/dist/{chunk-YWNHK6Z5.js → chunk-ZHVWK5NL.js} +17 -17
- package/dist/{chunk-34L5SRM7.js → chunk-ZP3UAWJL.js} +18 -18
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.d.ts +107 -0
- package/dist/data/Gantt.js +2 -0
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.d.ts +14 -2
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.d.ts +13 -2
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +4 -4
- package/dist/model-viewer/index.d.ts +123 -0
- package/dist/model-viewer/index.js +7 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +32 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +35 -0
- package/dist/version.js +1 -1
- package/package.json +12 -1
- package/dist/Calculator-5TRNFPY4.js +0 -29
- package/dist/Files-BKEREVQK.js +0 -141
- package/dist/PdfViewer-4YLDY4JY.js +0 -1
- package/dist/Sidebar-SAGLPIOC.js +0 -44
- package/dist/chunk-2SGOKMUU.js +0 -13
- package/dist/chunk-4Y33Y4OX.js +0 -8
- package/dist/chunk-64J7TYJ3.js +0 -4
- package/dist/chunk-A4PFVMQ2.js +0 -7
- package/dist/chunk-BFRGDRFK.js +0 -23
- package/dist/chunk-BHHFVIAD.js +0 -2
- package/dist/chunk-DRMIQ3YE.js +0 -1
- package/dist/chunk-ENFXDIIZ.js +0 -8
- package/dist/chunk-FFUTSMF5.js +0 -28
- package/dist/chunk-FI6IJTAJ.js +0 -14
- package/dist/chunk-FVKXDF2Q.js +0 -12
- package/dist/chunk-GCTJIZTJ.js +0 -2
- package/dist/chunk-IATKDC52.js +0 -9
- package/dist/chunk-JJ2OXUK7.js +0 -14
- package/dist/chunk-JSHMIMAJ.js +0 -1
- package/dist/chunk-K5PDLRYH.js +0 -11
- package/dist/chunk-S6AN76R3.js +0 -4
- package/dist/chunk-UFM4YBZ7.js +0 -1
- package/dist/chunk-VDYF3WPJ.js +0 -2
- package/dist/chunk-WKYNPGFB.js +0 -7
- package/dist/chunk-XMY2HKVD.js +0 -19
- package/dist/chunk-XQWHKXLS.js +0 -22
- package/dist/chunk-Y4FWTYZS.js +0 -6
- package/dist/chunk-YX2OOGV7.js +0 -4
- /package/dist/{chunk-GMHMWDXU.js → chunk-KH3253OM.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-
|
|
2
|
-
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:
|
|
3
|
-
/* @__PURE__ */h("button",{type:"button",onClick:
|
|
4
|
-
/* @__PURE__ */b("span",{children:
|
|
5
|
-
/* @__PURE__ */b("b",{className:"font-medium",children:N(
|
|
6
|
-
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-JLQ7N54N.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-L6XEON5Q.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const S=t.map(e=>a(e.date)).filter(e=>null!=e),x=l(Date.now,null)??Math.max(0,...S,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),P=S.length?Math.min(...S):x,C=S.length?Math.max(...S):x,D=a(r??null)??P,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),L=(()=>{const e=[R,C,q,D+i];return O||e.push(x),Math.max(...e)})(),T=Math.max(1,Math.round((L-D)/i)),I=a(p??null)??C??D,A=Math.min(Math.max(y??I,D),L),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=A})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>A){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(D).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),J=j??F,Q=j?a(j.date):F?D:null,z=$?a($.date):null,E=!!(J&&$&&null!=Q&&null!=z&&A>Q&&A<z);let B,G;if(E&&null!=Q&&null!=z){const e=(A-Q)/Math.max(z-Q,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of J?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(J?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):J?.est_completion_date||$?.est_completion_date||null,B={id:`interp-${A}`,progress_number:_.estimated,date:new Date(A).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},G=J}else if(B=J??t[t.length-1]??null,B){const e=t.findIndex(e=>e.id===B.id);G=e>=0&&e<t.length-1?t[e+1]:null}else G=null;const H={};for(const e of G?.items??[])H[e.part_number]=e;const K=!(!d||B?.id===d),V=d?Math.min(a(p??null)??L,L):L,X=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:D,endMs:L,totalLeadDays:T,scrubMs:A,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:K,beforeAnchor:J,nextAfter:$,displayed:B,prevReport:G,prevByPN:H,isInterpolated:E,playing:v,startPlay:()=>{if(v)return void N();if(V<=D)return void f(V);M(!0),f(D);let e=performance.now(),t=D;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:X,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),S=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),x=new Map(N.map(({report:e,ms:t})=>[e.id,t])),P=N.map(({ms:e})=>e),C=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
|
|
2
|
+
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:S,markers:C,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=x.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:P,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:S,variant:x="card",onPlayStart:P}){const{reports:C,markers:D,poNumber:R,startMs:O,endMs:q,totalLeadDays:L,scrubMs:T,setScrubMs:I,displayed:A,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:J,estCompletionMs:Q}=n,z=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(C.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,P),E=c().production,B=d(),G=_??E.heading,H=e=>o(e,B);if(0===C.length&&0===D.length)return null;const K=D.filter(e=>"shipment"===e.kind),V=D.filter(e=>"inspection"===e.kind),X=D.filter(e=>"invoice"===e.kind),Z=(A?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),U=A?v(A):0,W=C.find(e=>e.id===F),Y=W?N(W):J,ee=
|
|
3
|
+
/* @__PURE__ */h("button",{type:"button",onClick:z.toggle,"aria-pressed":z.playing,title:z.playing?E.pause:E.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[z.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */b("span",{children:z.playing?E.pause:E.play})]}),te=j&&(S??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{z.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??E.backTo(String(Y))}):null,[re,ne]=p(E.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:A?/* @__PURE__ */h(y,{children:[e&&re,
|
|
5
|
+
/* @__PURE__ */b("b",{className:"font-medium",children:N(A)}),e&&ne,
|
|
6
|
+
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",H(new Date(A.date).getTime())," · ",E.overall(Math.round(U))," · ",E.inStock(Z)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:E.noReport})});if("rail"===x){const e=null!=Q&&Q>=q&&q>O,t=e?{key:"__estimate__",label:E.estimatedCompletion,dateText:H(Q)}:null;/* @__PURE__ */
|
|
7
7
|
return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
|
|
8
|
-
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:
|
|
8
|
+
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:C,markers:D,valueMs:T,activeId:A?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??E.start,end:M?.end??(e?E.estDone:void 0)},onDragStart:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}}),
|
|
9
9
|
/* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
|
|
10
|
-
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:G,subject:R,meta:[`${
|
|
11
|
-
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[
|
|
12
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),
|
|
13
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),
|
|
14
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),
|
|
15
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),
|
|
10
|
+
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:G,subject:R,meta:[`${H(O)} → ${H(q)}`,E.leadTime(L)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
|
|
11
|
+
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[C.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
12
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),E.report]}),K.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
13
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),E.shipment]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
14
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),E.inspection]}),X.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
15
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),E.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:C,markers:D,valueMs:T,activeId:A?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:z.stop,playback:{playing:z.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:z.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,usePopupLevel as t,usePopupLevelBindings as a,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,popupLayerStyle as s}from"./chunk-RIG5FEVS.js";import{useDiscardGuard as d}from"./chunk-25M4CAB3.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-7QSDPSXP.js";import{useFocusTrap as u,useScrollLock as p}from"./chunk-DWGYC7OD.js";import{Icon as f}from"./chunk-ISVODSRP.js";import{useHydrated as h}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-L6XEON5Q.js";import{useRef as b,useId as y,useState as g,useEffect as k}from"react";import{createPortal as w}from"react-dom";import{jsxs as N,Fragment as j,jsx as $}from"react/jsx-runtime";var C="bg-black/30 backdrop-blur-sm",D={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function S({open:S,onClose:W,title:V,description:E,role:G="dialog",children:I,footer:O,blocking:P=!1,size:Q="md",aside:T=!1,dirty:U=!1,initialFocus:A,"aria-label":B,"aria-labelledby":F,"aria-describedby":L,className:R=""}){const X=b(null),Y=y(),z=y(),H=!P,J=y(),M=x().dialog,Z=e(h()),[q,K]=g(null),_=d({open:S,dirty:U,onClose:W,title:V,layer:q}),ee=b(null),re=r(S&&null!==Z,ee),ie=i(re,X),te=t(S&&null!==Z,ee),ae=a(te,q),oe=o(te),le=null!==te.host;if(m(S),u(X,S&&null!==Z,A,ae),p(S),k(()=>{if(S)return v(()=>!ae.current?.(document.activeElement)&&(P||_(),!0),()=>X.current)},[S,P,_,ae]),!S||!Z)return null;/* @__PURE__ */
|
|
2
|
+
return N(j,{children:[/* @__PURE__ */$("span",{ref:ee,hidden:!0,"data-popup-anchor":""}),w(
|
|
3
|
+
/* @__PURE__ */$(l,{value:q,children:/* @__PURE__ */N("div",{ref:K,className:"fixed inset-0"+(T?" pointer-events-none opacity-0":le?" pointer-events-none":""),style:s(te),role:"presentation","data-overlay-layer":"","data-aside":T?"":void 0,children:[!le&&/* @__PURE__ */$("div",{className:`fixed inset-0 ${C}`,"aria-hidden":"true","data-popup-scrim":"system"}),oe&&/* @__PURE__ */$("div",{className:`fixed ${C}${T?"":" pointer-events-auto"}${n(te)?" rounded-(--radius-window)":""}`,style:oe,onClick:P?void 0:_,"aria-hidden":"true","data-popup-scrim":"window"}),
|
|
4
|
+
/* @__PURE__ */$("div",{className:re?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:P||le?void 0:e=>{e.target===e.currentTarget&&_()},children:/* @__PURE__ */N("div",{ref:X,"data-popup-panel":"",style:re?{left:ie?.left??0,top:ie?.top??0,visibility:ie?void 0:"hidden"}:void 0,...c({role:G,modal:!0,titleId:V?J:void 0,labelledBy:F,label:B}),"aria-describedby":L??(E?z:I?Y:void 0),className:`${re?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${D[Q]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl${le&&!T?" pointer-events-auto":""} ${R}`.trim(),children:[V&&/* @__PURE__ */$("h2",{id:J,className:(H?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:V}),E&&/* @__PURE__ */$("p",{id:z,className:((V?"mt-1":H?"pr-8":"")+" text-sm text-gray-500").trim(),children:E}),I&&/* @__PURE__ */$("div",{id:Y,className:"mt-2 text-sm text-gray-600",children:I}),O&&/* @__PURE__ */$("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:O}),H&&/* @__PURE__ */$("button",{type:"button",onClick:_,"aria-label":M.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */$(f,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),Z)]})}export{S as Dialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-AGNHOSES.js";import{Avatar as t}from"./chunk-KTKFCR6T.js";import{ItemCount as r}from"./chunk-QUN3RSMN.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{Segmented as e}from"./chunk-HNIIDDLJ.js";import{toDateKey as t,fromDateKey as n}from"./chunk-2HMNOLKX.js";import{calendarNames as r,formatDate as o}from"./chunk-Y3JW2GW5.js";import{LoadingSpinner as a}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as l}from"./chunk-L6XEON5Q.js";import{useState as d,useRef as c,useId as u,useMemo as h}from"react";import{jsx as m,Fragment as f,jsxs as b}from"react/jsx-runtime";var g=864e5,p={day:32,week:16,month:4},y=44;function w(e){const t="string"==typeof e?n(e.slice(0,10)):null;return t?Math.round(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())/g):null}function x(e){return new Date(e*g).toISOString().slice(0,10)}function k(e){return new Date(e*g)}function v(e){return((e+3)%7+7)%7}function D(e){return e-v(e)}function N(e){const t=k(e);return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)/g)}function M(e){const t=k(e);return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,1)/g)}function C(e){return Math.round(Date.UTC(k(e).getUTCFullYear(),0,1)/g)}function $(e){return Math.round(Date.UTC(k(e).getUTCFullYear()+1,0,1)/g)}var T={day:3,week:7,month:14},j={day:28,week:84,month:182};function U(e,t,n){return(e-t.startDay)*p[n]}function X(e,t,n){return U(e,t,n)+p[n]/2}function P(e,t,n,r){const o=[];let a=e.startDay;if(n(a)!==a){const n=Math.min(r(a),e.endDay);o.push({startDay:a,endDay:n,x:U(a,e,t),width:(n-a)*p[t]}),a=n}for(;a<e.endDay;){const n=Math.min(r(a),e.endDay);o.push({startDay:a,endDay:n,x:U(a,e,t),width:(n-a)*p[t]}),a=n}return o}function S(e,t,n,r){if(null===e&&null===t)return{kind:"none"};if(null===e)return{kind:"milestone",day:t,cx:U(t,n,r)+p[r]/2};const o=null===t?e:Math.min(e,t),a=null===t?e:Math.max(e,t);return{kind:"bar",startDay:o,endDay:a,x:U(o,n,r),width:(a-o+1)*p[r]}}function I(e){return"bar"===e.kind?{inX:e.x,outX:e.x+e.width}:"milestone"===e.kind?{inX:e.cx-9,outX:e.cx+9}:null}function z(e,t,n,r,o=44,a=10){let i;if(n-e>=2*a){const o=e+a;i=[[e,t],[o,t],[o,r],[n,r]]}else{const s=t+(r>=t?1:-1)*o/2,l=e+a,d=n-a;i=[[e,t],[l,t],[l,s],[d,s],[d,r],[n,r]]}return i.filter((e,t)=>0===t||e[0]!==i[t-1][0]||e[1]!==i[t-1][1])}function R(e){return e.map(([e,t],n)=>`${0===n?"M":"L"}${e} ${t}`).join(" ")}function Y(e,t,n=5){return`${e},${t} ${e-n},${t-n} ${e-n},${t+n}`}function L(e,t,n,r){if("move"===e)return{start:null===t?null:t+r,end:null===n?null:n+r};if("start"===e){if(null===t)return{start:t,end:n};const e=t+r;return{start:null===n?e:Math.min(e,n),end:n}}if(null===n)return{start:t,end:n};const o=n+r;return{start:t,end:null===t?o:Math.max(o,t)}}function F({rows:n,groups:g=[],dependencies:U=[],scale:F,onScaleChange:H,onRowClick:W,onRowChange:A,readOnly:K=!1,today:Q,isLoading:E=!1,emptyState:O,labelHeader:J,labelWidth:G=240,className:V=""}){const Z=s().gantt,q=l(),B=r(q),_=!!A&&!K,[ee,te]=d(null),ne=c(!1),re=c(null),oe=u(),ae=w(Q)??w(t(/* @__PURE__ */new Date)),ie=h(()=>{const e=/* @__PURE__ */new Map;for(const t of n){const n=w(t.start),r=w(t.end);e.set(t.id,ee&&ee.id===t.id?L(ee.mode,ee.start,ee.end,ee.delta):{start:n,end:r})}return e},[n,ee]),se=h(()=>{const e=[ae];for(const t of n){const n=w(t.start),r=w(t.end);null!==n&&e.push(n),null!==r&&e.push(r)}return function(e,t){const n=e.filter(e=>Number.isFinite(e)),r=n.length?Math.min(...n):0,o=n.length?Math.max(...n):0;let a=r-T[t],i=o+1+T[t];const s=j[t]-(i-a);return s>0&&(a-=Math.floor(s/2),i+=Math.ceil(s/2)),"week"===t?(a=D(a),i=D(i-1)+7):"month"===t&&(a=N(a),i=M(i-1)),{startDay:a,endDay:i}}(e,F)},[n,F,ae]),le=h(()=>function(e,t){return"day"===t?{major:P(e,t,N,M),minor:P(e,t,e=>e,e=>e+1)}:"week"===t?{major:P(e,t,N,M),minor:P(e,t,D,e=>D(e)+7)}:{major:P(e,t,C,$),minor:P(e,t,N,M)}}(se,F),[se,F]),de=function(e,t){return(e.endDay-e.startDay)*p[t]}(se,F),ce=h(()=>function(e,t){const n=new Set(t.map(e=>e.id)),r=/* @__PURE__ */new Map,o=[];for(const t of e)if(null!=t.groupId&&n.has(t.groupId)){const e=r.get(t.groupId)??[];e.push(t),r.set(t.groupId,e)}else o.push(t);const a=o.map(e=>({kind:"row",row:e}));for(const e of t){a.push({kind:"group",group:e});for(const t of r.get(e.id)??[])a.push({kind:"row",row:t})}return a}(n,g),[n,g]),ue=h(()=>{const e=/* @__PURE__ */new Map;return ce.forEach((t,n)=>{if("row"!==t.kind)return;const r=ie.get(t.row.id);e.set(t.row.id,{shape:S(r.start,r.end,se,F),line:n})}),e},[ce,ie,se,F]),he=h(()=>{const e=[];for(const t of U){const n=ue.get(t.from),r=ue.get(t.to);if(!n||!r)continue;const o=I(n.shape),a=I(r.shape);if(!o||!a)continue;const i=n.line*y+22,s=r.line*y+22,l=z(o.outX,i,a.inX,s);e.push({key:`${t.from}>${t.to}`,d:R(l),head:Y(a.inX,s)})}return e},[U,ue]);i(()=>{const e=re.current;if(!e)return;const t=e.clientWidth-G;e.scrollLeft=Math.max(0,X(ae,se,F)-t/4)},[F]);if(E)/* @__PURE__ */return m(a,{size:"sm",padding:"p-4",label:Z.loading});if(0===n.length&&0===g.length)/* @__PURE__ */
|
|
2
|
+
return m(f,{children:O??/* @__PURE__ */m("div",{className:"text-sm text-ink-faint p-4",children:Z.empty})});const me=(e,t,n)=>{A?.(e.id,{start:null===t?null:x(t),end:null===n?null:x(n)})},fe=(e,t,n)=>{if(ne.current=!1,_&&0===e.button){e.stopPropagation();try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}te({id:t.id,mode:n,originX:e.clientX,start:w(t.start),end:w(t.end),delta:0})}},be=e=>{if(!ee)return;const t=function(e,t){const n=Math.round(e/p[t]);return 0===n?0:n}(e.clientX-ee.originX,F);t!==ee.delta&&te({...ee,delta:t})},ge=e=>{if(ee){if(0!==ee.delta){const t=L(ee.mode,ee.start,ee.end,ee.delta);ne.current=!0,me(e,t.start,t.end)}te(null)}},pe=(e,t)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void W?.(t);if(!_||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;e.preventDefault();const n="ArrowRight"===e.key?1:-1,r=L(e.shiftKey?"end":"move",w(t.start),w(t.end),n);me(t,r.start,r.end)},ye=e=>{ne.current?ne.current=!1:W?.(e)},we=e=>o(x(e),{locale:q}),xe=(e,t)=>{const n=k(e.startDay),r=n.getUTCFullYear(),o=n.getUTCMonth();return"major"===t?"month"===F?String(r):"week"===F?B.shortMonthYear(r,o):B.monthYear(r,o):"month"===F?B.monthsShort[o]:String(n.getUTCDate())},ke=ce.length*y,ve=X(ae,se,F),De=ve>=0&&ve<=de;/* @__PURE__ */
|
|
3
|
+
return b("div",{className:`flex min-h-0 flex-col ${V}`,children:[
|
|
4
|
+
/* @__PURE__ */b("div",{className:"flex items-center justify-end gap-2 pb-2",children:[
|
|
5
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>{const e=re.current;if(!e)return;const t=e.clientWidth-G;e.scrollTo?.({left:Math.max(0,X(ae,se,F)-t/4),behavior:"smooth"})},className:"min-h-8 rounded-(--radius-control) border border-line bg-surface px-3 text-xs font-medium text-ink hover:bg-row-hover",children:Z.today}),H&&/* @__PURE__ */m(e,{size:"sm",label:Z.scale,value:F,onChange:H,options:[{value:"day",label:Z.day},{value:"week",label:Z.week},{value:"month",label:Z.month}]})]}),
|
|
6
|
+
/* @__PURE__ */m("div",{ref:re,"data-gantt-scroller":"",className:"relative min-h-0 flex-1 overflow-auto grid-scroll rounded-(--radius-card) border border-line bg-surface",children:/* @__PURE__ */b("div",{className:"relative",style:{width:G+de,minHeight:48+ke},children:[
|
|
7
|
+
/* @__PURE__ */b("div",{className:"sticky top-0 z-20 flex border-b border-line bg-surface",style:{height:48},children:[
|
|
8
|
+
/* @__PURE__ */m("div",{className:"sticky left-0 z-10 flex shrink-0 items-end border-r border-line bg-surface px-3 pb-1 text-xs font-medium text-ink-muted",style:{width:G},children:J??Z.task}),
|
|
9
|
+
/* @__PURE__ */b("div",{className:"relative shrink-0",style:{width:de},"aria-hidden":!0,children:[le.major.map(e=>/* @__PURE__ */m("div",{className:"absolute top-0 border-l border-line-subtle text-xs font-medium leading-6 text-ink",style:{left:e.x,width:e.width,height:24},children:/* @__PURE__ */m("span",{className:"sticky inline-block whitespace-nowrap px-2",style:{left:G},children:xe(e,"major")})},`M${e.startDay}`)),le.minor.map(e=>/* @__PURE__ */m("div",{className:`absolute truncate border-l border-line-subtle text-2xs leading-6 text-ink-faint ${"day"===F?"text-center":"px-1"} ${e.startDay===ae&&"day"===F?"font-semibold text-danger":""}`,style:{left:e.x,width:e.width,top:24,height:24},children:xe(e,"minor")},`m${e.startDay}`)),De&&"day"!==F&&/* @__PURE__ */m("span",{className:"absolute bottom-1 -translate-x-1/2 rounded-(--radius-control) bg-danger px-1 text-2xs font-medium leading-4 text-on-accent",style:{left:ve},children:Z.today})]})]}),
|
|
10
|
+
/* @__PURE__ */b("div",{className:"pointer-events-none absolute",style:{left:G,top:48,width:de,height:ke},"aria-hidden":!0,children:["day"===F&&le.minor.filter(e=>v(e.startDay)>=5).map(e=>/* @__PURE__ */m("div",{className:"absolute inset-y-0 bg-surface-sunken",style:{left:e.x,width:e.width}},`w${e.startDay}`)),le.minor.map(e=>/* @__PURE__ */m("div",{className:"absolute inset-y-0 w-px bg-line-subtle",style:{left:e.x}},`g${e.startDay}`))]}),
|
|
11
|
+
/* @__PURE__ */m("div",{role:"list",children:ce.map(e=>{if("group"===e.kind)/* @__PURE__ */
|
|
12
|
+
return b("div",{role:"listitem",className:"flex",style:{height:y},children:[
|
|
13
|
+
/* @__PURE__ */m("div",{className:"sticky left-0 z-10 flex shrink-0 items-center border-r border-b border-line bg-surface-sunken px-3 text-sm font-semibold text-ink",style:{width:G},children:/* @__PURE__ */m("span",{className:"truncate",children:e.group.label})}),
|
|
14
|
+
/* @__PURE__ */m("div",{className:"shrink-0 border-b border-line-subtle",style:{width:de}})]},`g:${e.group.id}`);const t=e.row,n=ue.get(t.id).shape,r=function(e){return e.done?{className:"border text-ink-muted",style:{background:"var(--status-neutral-soft)",borderColor:"var(--status-neutral-line)"}}:e.tone?{className:"text-on-accent",style:{background:`var(--status-${e.tone}-solid)`}}:{className:"bg-accent-fill text-on-accent"}}(t),o=ee?.id===t.id,a=t.done?`, ${Z.done}`:"";/* @__PURE__ */
|
|
15
|
+
return b("div",{role:"listitem",className:"flex",style:{height:y},"data-gantt-row":t.id,children:[
|
|
16
|
+
/* @__PURE__ */m("div",{className:"sticky left-0 z-10 flex shrink-0 border-r border-b border-line-subtle bg-surface",style:{width:G},children:/* @__PURE__ */m("button",{type:"button",tabIndex:"none"===n.kind&&W?0:-1,onClick:()=>W?.(t),className:`flex w-full min-w-0 items-center px-3 text-left text-sm hover:bg-row-hover ${t.done?"text-ink-faint line-through":"text-ink"} ${W?"cursor-pointer":"cursor-default"}`,children:/* @__PURE__ */m("span",{className:"truncate",children:t.label})})}),
|
|
17
|
+
/* @__PURE__ */b("div",{className:"relative shrink-0 border-b border-line-subtle",style:{width:de},children:["bar"===n.kind&&/* @__PURE__ */b(f,{children:[
|
|
18
|
+
/* @__PURE__ */m("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"aria-label":Z.barName(t.label,we(n.startDay),we(n.endDay))+a,"aria-describedby":_?oe:void 0,onKeyDown:e=>pe(e,t),onClick:()=>ye(t),onPointerDown:e=>fe(e,t,"move"),onPointerMove:be,onPointerUp:()=>ge(t),onPointerCancel:()=>te(null),className:`group/bar absolute rounded-(--radius-control) shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${_?o?"cursor-grabbing":"cursor-grab":W?"cursor-pointer":""} ${o?"opacity-80":""}`,style:{...r.style,left:n.x,width:n.width,top:10,height:24,touchAction:_?"none":void 0},children:_&&/* @__PURE__ */b(f,{children:[
|
|
19
|
+
/* @__PURE__ */m("span",{"aria-hidden":!0,"data-gantt-handle":"start",className:"absolute inset-y-0 left-0 w-2 cursor-ew-resize rounded-l-(--radius-control) group-hover/bar:bg-scrim-soft",onPointerDown:e=>fe(e,t,"start")}),
|
|
20
|
+
/* @__PURE__ */m("span",{"aria-hidden":!0,"data-gantt-handle":"end",className:"absolute inset-y-0 right-0 w-2 cursor-ew-resize rounded-r-(--radius-control) group-hover/bar:bg-scrim-soft",onPointerDown:e=>fe(e,t,"end")})]})}),
|
|
21
|
+
/* @__PURE__ */m("span",{"aria-hidden":!0,className:"pointer-events-none absolute whitespace-nowrap text-xs leading-none text-ink-muted",style:{left:n.x+n.width+16,top:16},children:t.label})]}),"milestone"===n.kind&&/* @__PURE__ */b(f,{children:[
|
|
22
|
+
/* @__PURE__ */m("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"data-gantt-milestone":"","aria-label":Z.milestoneName(t.label,we(n.day))+a,"aria-describedby":_?oe:void 0,onKeyDown:e=>pe(e,t),onClick:()=>ye(t),onPointerDown:e=>fe(e,t,"move"),onPointerMove:be,onPointerUp:()=>ge(t),onPointerCancel:()=>te(null),className:`absolute rotate-45 rounded-sm shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${_?o?"cursor-grabbing":"cursor-grab":W?"cursor-pointer":""}`,style:{...r.style,left:n.cx-9/Math.SQRT2,top:22-9/Math.SQRT2,width:18/Math.SQRT2,height:18/Math.SQRT2,touchAction:_?"none":void 0}}),
|
|
23
|
+
/* @__PURE__ */m("span",{"aria-hidden":!0,className:"pointer-events-none absolute whitespace-nowrap text-xs leading-none text-ink-muted",style:{left:n.cx+9+16,top:16},children:t.label})]})]})]},t.id)})}),
|
|
24
|
+
/* @__PURE__ */m("svg",{className:"pointer-events-none absolute overflow-visible text-ink-faint",style:{left:G,top:48,width:de,height:ke},width:de,height:ke,"aria-hidden":!0,children:he.map(e=>/* @__PURE__ */b("g",{"data-gantt-arrow":e.key,children:[
|
|
25
|
+
/* @__PURE__ */m("path",{d:e.d,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round"}),
|
|
26
|
+
/* @__PURE__ */m("polygon",{points:e.head,fill:"currentColor"})]},e.key))}),De&&/* @__PURE__ */m("div",{"data-gantt-today":"",className:"pointer-events-none absolute z-0 w-0.5 -translate-x-1/2 bg-danger",style:{left:G+ve,top:48,height:ke},"aria-hidden":!0}),_&&/* @__PURE__ */m("span",{id:oe,hidden:!0,children:Z.moveHint})]})})]})}export{F as Gantt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-L6XEON5Q.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:f,children:[n&&/* @__PURE__ */r("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:n}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:`mt-1 flex items-baseline gap-1 ${m[u]}`,children:[d&&/* @__PURE__ */r("span",{className:"text-sm",children:d}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:`font-semibold tabular-nums ${l[o]}`,children:g}),x&&/* @__PURE__ */r("span",{className:"text-sm",children:x})]})]})}export{n as Statistic};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-
|
|
1
|
+
import{fromDateKey as t,toDateKey as e}from"./chunk-2HMNOLKX.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{pad2 as r}from"./chunk-LF27WIN2.js";import{useShellLocale as i}from"./chunk-L6XEON5Q.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var m=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/;function s(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${e(n=t)}T${r(n.getHours())}:${r(n.getMinutes())}`:m.test(t)?t:"";var n}var u=a(function({value:e,onChange:r,min:a,max:u,invalid:l,size:c,className:d="",...f},p){const v=i();/* @__PURE__ */
|
|
2
2
|
return o("input",{ref:p,type:"datetime-local",lang:v,"aria-invalid":l||void 0,value:s(e),min:s(a)||void 0,max:s(u)||void 0,onChange:e=>r?.(function(e){if(!m.test(e))return null;const[n,r]=e.split("T"),i=t(n),[a,o,s=0]=r.split(":").map(Number);return!i||a>23||o>59||s>59?null:(i.setHours(a,o,s),i)}(e.target.value)),className:n({invalid:l,size:c,className:d}),...f})});export{u as DateTimePicker_default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-L6XEON5Q.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-L6XEON5Q.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:"mt-1 text-xs","data-chart-zoom":"true",children:[
|
|
3
3
|
/* @__PURE__ */r("div",{className:"flex items-baseline gap-2",children:[
|
|
4
4
|
/* @__PURE__ */a("span",{className:"font-semibold",style:{color:l.label},children:u.zoomRange(n,t,o)}),void 0!==s&&/* @__PURE__ */a("span",{className:"tabular-nums",style:{color:l.label},children:s}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{CartesianPlot as e}from"./chunk-
|
|
2
|
-
return c(e,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-
|
|
1
|
+
import{CartesianPlot as e}from"./chunk-ADNUV6OV.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-L6XEON5Q.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),L=Math.max(...v),N=.08*(L-j)||1;/* @__PURE__ */
|
|
2
|
+
return c(e,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-N,max:L+N,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:e=>{const t=h[e],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
3
|
return c(l,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:u?.45:1,children:[
|
|
5
5
|
/* @__PURE__ */c("line",{x1:p,y1:l(a.high),x2:p,y2:l(a.low),stroke:h,strokeWidth:1.5}),"candle"===m?/* @__PURE__ */c("rect",{x:p-d/2,y:b,width:d,height:y,rx:1,fill:r?h:"transparent",fillOpacity:r?.85:1,stroke:h,strokeWidth:1.5}):/* @__PURE__ */n(s,{children:[
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-
|
|
1
|
+
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-L6XEON5Q.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),N=h??(e=>i(100*e,1,g)),p=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
|
|
2
2
|
return n("div",{className:x,children:[d&&/* @__PURE__ */r("p",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
3
|
-
/* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:
|
|
3
|
+
/* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:p})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${N(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(N(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
|
|
4
4
|
return n("div",{className:x,children:[
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
|
|
6
6
|
/* @__PURE__ */r("span",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
7
|
-
/* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:
|
|
8
|
-
/* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":
|
|
9
|
-
/* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:
|
|
7
|
+
/* @__PURE__ */r("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:N(o)})]}),
|
|
8
|
+
/* @__PURE__ */n("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*j).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":N(o),"aria-label":d,children:[
|
|
9
|
+
/* @__PURE__ */r("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */r("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*j).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */r("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),$&&/* @__PURE__ */r("p",{className:"mt-2 text-xs text-ink-faint",children:$})]})}export{o as Meter};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{useShellStrings as e,useShellLocale as a}from"./chunk-
|
|
2
|
-
return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=
|
|
1
|
+
import{useShellStrings as e,useShellLocale as a}from"./chunk-L6XEON5Q.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),j=`h${N}`,k=p??x;/* @__PURE__ */
|
|
2
|
+
return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=k.includes(e.id),i=e.headId??`${I}-${l(e.id)}-head`,d=e.headId?`${e.headId}-body`:`${I}-${l(e.id)}-panel`,t=a||b;/* @__PURE__ */
|
|
3
3
|
return c("div",{className:e.className?`es-group ${e.className}`:"es-group",children:[
|
|
4
|
-
/* @__PURE__ */r(
|
|
4
|
+
/* @__PURE__ */r(j,{className:"es-group-title",children:/* @__PURE__ */c("button",{type:"button",id:i,disabled:e.disabled,"aria-expanded":a,"aria-controls":t?d:void 0,onClick:()=>(e=>{const a=k.includes(e)?k.filter(a=>a!==e):h?[...k,e]:[e];void 0===p&&y(a),m?.(a)})(e.id),className:o[g],children:[null!=e.icon&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:e.icon}),e.title,"number"==typeof e.count&&e.count>0&&
|
|
5
5
|
/* @__PURE__ */c(s,{children:[
|
|
6
6
|
/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-count",children:n(e.count,f)}),
|
|
7
7
|
/* @__PURE__ */r("span",{className:"sr-only",children:v.accordion.changed(n(e.count,f))})]}),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserValue as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-
|
|
2
|
-
return m("div",{className:
|
|
1
|
+
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserValue as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-L6XEON5Q.js";import{useMemo as g,useState as u,useRef as d,useEffect as h}from"react";import{jsxs as m,jsx as f,Fragment as b}from"react/jsx-runtime";var y="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";var v=()=>r(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:w,endValue:D,mode:M="single",onSelect:N,min:Y,max:k,month:F,defaultMonth:j,onMonthChange:A,weekStartsOn:C,quickJump:S=!0,markedDates:O,readOnly:P=!1,"aria-label":q,className:K=""}){const W=g(()=>new Set(O??[]),[O]),E=e(w),H=i(v,null),J=e(H),L=s().calendar,$=c(),I=n($),R=i(()=>o($),0),U=C??R,V=()=>{if(!J)return null;const e=t(J);return Y&&e<Y.slice(0,7)?Y.slice(0,7):k&&e>k.slice(0,7)?k.slice(0,7):e},[X,B]=u(()=>j||(E?t(E):V())),G=F??X??V(),Q=null===G?null:function(e,t){return a(e)??t}(G,J),[T,z]=u(()=>w??H),Z=d(null),_=d(!1),[ee,te]=u("days"),re=g(()=>Q?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(Q,U):[],[G,U]),ae=e=>!!Y&&e<Y||!!k&&e>k,ne=T??H,oe=re.some(e=>r(e)===ne),le=Q?re.find(e=>e.getMonth()===Q.getMonth())??re[0]:null,ie=oe&&ne?ne:le?r(le):"";if(h(()=>{_.current&&(_.current=!1,Z.current?.querySelector('[data-active="true"]')?.focus())},[ie,G]),!Q)/* @__PURE__ */
|
|
2
|
+
return m("div",{className:K,"aria-hidden":"true","data-calendar-pending":"",children:[
|
|
3
3
|
/* @__PURE__ */f("div",{className:"mb-2 h-6"}),
|
|
4
|
-
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(
|
|
5
|
-
return m("div",{className:
|
|
4
|
+
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(Q.getFullYear()+12*e,Q.getMonth(),1):"months"===ee?new Date(Q.getFullYear()+e,Q.getMonth(),1):x(Q,e),ce=e=>{const r=t(e);void 0===F&&B(r),A?.(r)},ge=q??I.monthYear(Q.getFullYear(),Q.getMonth());/* @__PURE__ */
|
|
5
|
+
return m("div",{className:K,children:[
|
|
6
6
|
/* @__PURE__ */m("div",{className:"mb-2 flex items-center justify-between px-1",children:[
|
|
7
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee
|
|
8
|
-
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:
|
|
9
|
-
/* @__PURE__ */f("button",{type:"button","aria-label"
|
|
10
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee
|
|
11
|
-
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":P||void 0,onKeyDown:a=>{const n=e(ie)??
|
|
7
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?L.previousYears:"months"===ee?L.previousYear:L.previousMonth,onClick:()=>ce(se(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
|
|
8
|
+
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:S?/* @__PURE__ */m(b,{children:["years"!==ee&&/* @__PURE__ */f("button",{type:"button","aria-label":L.chooseMonth(I.months[Q.getMonth()]),onClick:()=>te(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:I.months[Q.getMonth()]}),
|
|
9
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":L.chooseYear(Q.getFullYear()),onClick:()=>te(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:Q.getFullYear()})]}):/* @__PURE__ */f("span",{children:I.monthYear(Q.getFullYear(),Q.getMonth())})}),
|
|
10
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?L.nextYears:"months"===ee?L.nextYear:L.nextMonth,onClick:()=>ce(se(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":L.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:I.monthsShort.map((e,t)=>/* @__PURE__ */f("button",{type:"button","aria-pressed":t===Q.getMonth(),onClick:()=>{ce(new Date(Q.getFullYear(),t,1)),te("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===Q.getMonth()?"bg-blue-600 font-semibold text-white":J&&t===J.getMonth()&&Q.getFullYear()===J.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":L.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=Q.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */f("button",{type:"button","aria-pressed":e===Q.getFullYear(),onClick:()=>{ce(new Date(e,Q.getMonth(),1)),te("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===Q.getFullYear()?"bg-blue-600 font-semibold text-white":e===J?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
|
|
11
|
+
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":P||void 0,onKeyDown:a=>{const n=e(ie)??J??Q,o={ArrowLeft:()=>p(n,-1),ArrowRight:()=>p(n,1),ArrowUp:()=>p(n,-7),ArrowDown:()=>p(n,7),Home:()=>p(n,-(n.getDay()-U+7)%7),End:()=>p(n,6-(n.getDay()-U+7)%7),PageUp:()=>x(n,a.shiftKey?-12:-1),PageDown:()=>x(n,a.shiftKey?12:1)};if(o[a.key])return a.preventDefault(),l=o[a.key](),_.current=!0,z(r(l)),void(t(l)!==G&&ce(l));var l;"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),P||ae(ie)||N(ie))},hidden:"days"!==ee,children:[
|
|
12
12
|
/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+U)%7).map(e=>
|
|
13
|
-
/* @__PURE__ */f("div",{role:"columnheader","aria-label":
|
|
14
|
-
return f("div",{role:"gridcell","aria-selected":n,"aria-label":P?i:void 0,children:P?/* @__PURE__ */m("span",{"aria-hidden":"true",className:`grid place-items-center ${s(!1)}`,children:[e.getDate(),c]}):/* @__PURE__ */m("button",{type:"button","data-active":t===ie,tabIndex:t===ie?0:-1,disabled:l,"aria-label":i,"aria-current":t===
|
|
13
|
+
/* @__PURE__ */f("div",{role:"columnheader","aria-label":I.weekdays[e],className:"py-1",children:/* @__PURE__ */f("abbr",{title:I.weekdays[e],className:"no-underline",children:I.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-sm`,children:re.slice(7*t,7*t+7).map(e=>{const t=r(e),a=e.getMonth()!==Q.getMonth(),n=t===w||"range"===M&&t===D,o=(e=>!("range"!==M||!w||!D)&&e>w&&e<D)(t),l=ae(t),i=I.longDate(e.getFullYear(),e.getMonth(),e.getDate()),s=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",l?"cursor-not-allowed text-gray-300":n?"bg-accent-fill font-semibold text-on-accent":o?"bg-accent-tint-strong text-blue-800":a?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==H||n?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),c=W.has(t)&&/* @__PURE__ */f("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(n?"bg-surface":a?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
|
|
14
|
+
return f("div",{role:"gridcell","aria-selected":n,"aria-label":P?i:void 0,children:P?/* @__PURE__ */m("span",{"aria-hidden":"true",className:`grid place-items-center ${s(!1)}`,children:[e.getDate(),c]}):/* @__PURE__ */m("button",{type:"button","data-active":t===ie,tabIndex:t===ie?0:-1,disabled:l,"aria-label":i,"aria-current":t===H?"date":void 0,onClick:()=>{z(t),N(t)},className:s(!0),children:[e.getDate(),c]})},t)})},t))]})]})}export{w as Calendar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-L6XEON5Q.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
|
|
2
2
|
return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
|
|
3
3
|
/* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
|
|
4
4
|
/* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-VW3ZUWW2.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-R3W6LZBG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as n}from"./chunk-L6XEON5Q.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-L6XEON5Q.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-L6XEON5Q.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{copyToClipboard as e,selectionAt as t}from"./chunk-
|
|
2
|
-
return x(l,{title
|
|
3
|
-
/* @__PURE__ */x("div",{ref:_}),V&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=
|
|
1
|
+
import{copyToClipboard as e,selectionAt as t}from"./chunk-B7UT3W4C.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-5XOF3O4B.js";import{ListLoadError as l}from"./chunk-7IRO4JAA.js";import{ResizableTable as i}from"./chunk-FXS2P23Q.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-UJ23EKXU.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-GOAFMGUI.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-KFNQVNND.js";import{useShellStrings as y}from"./chunk-L6XEON5Q.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:N,isLoading:R,emptyState:A,totalCount:L,isError:$,onRetry:T,errorTitle:E,errorMessage:F,tableId:K,columns:M,renderCell:U,getRowId:O=e=>e.id,sort:P,onSort:I,selected:D,setSelected:B,onRowClick:J,onRowHover:Q,getRowClassName:W,footerLabel:X,footerExtra:G,footerExtraAfter:H,sentinelRef:_,isFetchingNextPage:V,saveDefaultPerms:Z,exportEndpoint:z,exportFilename:q="export.csv",contextActions:Y}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{B(t=>{const n=new Set(t),r=O(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{B(e=>{const t=N.map(O),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(N,J,le,ie,(e,t)=>{B(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(O(N[n]));return r})},ne),ce=N.filter(e=>D.has(O(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=N[Number(e.dataset.rowIdx)];return void 0!==t&&D.has(O(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(M.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(O);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(M.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${K}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return M.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=q,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(R)/* @__PURE__ */return x(c,{});if($&&0===N.length)/* @__PURE__ */
|
|
2
|
+
return x(l,{title:E,message:F,onRetry:T});if(0===N.length)/* @__PURE__ */return x(w,{children:A});const me=N.length>0&&ce.length===N.length,ue=ce.length>0&&!me,pe=D.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...M],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:N.length,totalCount:L,label:X,isFetchingMore:V,extra:G,extraAfter:H}),ye=_?/* @__PURE__ */C(w,{children:[
|
|
3
|
+
/* @__PURE__ */x("div",{ref:_}),V&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=Y?Y(ce):[],a=ce.length,c=()=>te(null),u=void 0!==L&&L>N.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
|
|
4
4
|
/* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
|
|
5
|
-
/* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),
|
|
5
|
+
/* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),J(r)},children:oe.open}),
|
|
6
6
|
/* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
|
|
7
7
|
/* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
|
|
8
8
|
/* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
|
|
9
|
-
/* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),B(e=>/* @__PURE__ */new Set([...e,...
|
|
9
|
+
/* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),B(e=>/* @__PURE__ */new Set([...e,...N.map(O)]))},children:u?oe.selectAllLoaded(N.length):oe.selectAll}),
|
|
10
10
|
/* @__PURE__ */x(h,{onClick:()=>{c(),B(/* @__PURE__ */new Set)},children:oe.clearSelection}),T&&/* @__PURE__ */x(h,{onClick:()=>{c(),T()},children:oe.refresh})]})}/* @__PURE__ */
|
|
11
11
|
return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
|
|
12
|
-
/* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:
|
|
13
|
-
return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":
|
|
12
|
+
/* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:K,columns:fe,sort:P,onSort:I,footer:ge,afterBody:ye,saveDefaultPerms:Z,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:N.map((n,r)=>{const o=O(n);/* @__PURE__ */
|
|
13
|
+
return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":D.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>J(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=O(n);D.has(r)||B(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?M.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:Q?()=>Q(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:D.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):U(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-
|
|
2
|
-
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-L6XEON5Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const W=m().charts,F=c(),w=N??(e=>h(e,F)),L=C??W.nothingToCompare,R=p(),[A,E]=u(null),{highlighted:Q}=a(),Y=x;if(k.length<3||0===Y.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:L});const z=y/2,B=y/2,H=y/2-46,O=o(k.length),T=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...Y.map(e=>e.values[t]??0).filter(Number.isFinite))),U=(e,t)=>{const r=Math.max(0,Math.min(1,t/T[e])),l=O.center(e)-O.step/2;return[z+H*r*Math.cos(l),B+H*r*Math.sin(l)]},V=(e,t)=>null!==A?A!==e:null!==Q&&Q!==t,S=null!==A?Y[A]:void 0;/* @__PURE__ */
|
|
3
3
|
return f("div",{className:`relative ${$??""}`,children:[
|
|
4
|
-
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":R,onMouseLeave:()=>
|
|
5
|
-
/* @__PURE__ */d("title",{id:R,children:W.acrossMeasures(
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":R,onMouseLeave:()=>E(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:R,children:W.acrossMeasures(Y.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=H*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:z,cy:B,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(z,B,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=U(t,T[t]);/* @__PURE__ */
|
|
6
6
|
return f("g",{children:[
|
|
7
|
-
/* @__PURE__ */d("line",{x1:
|
|
8
|
-
/* @__PURE__ */d("text",{x:
|
|
9
|
-
/* @__PURE__ */d(r,{id:R,reveal:!!j&&"center-out"}),
|
|
10
|
-
return f("g",{opacity:
|
|
11
|
-
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),
|
|
12
|
-
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
7
|
+
/* @__PURE__ */d("line",{x1:z,y1:B,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:z+(H+18)*Math.cos(O.center(t)-O.step/2),y:B+(H+18)*Math.sin(O.center(t)-O.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:R,reveal:!!j&&"center-out"}),Y.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>U(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:V(t,e.key)?.3:1,onMouseEnter:()=>E(t),mask:j?`url(#${l(R)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:S.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(A,3,S.color,S.tone),value:w(S.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Y.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
13
|
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
14
|
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
-
/* @__PURE__ */d(e,{caption:W.acrossMeasures(
|
|
15
|
+
/* @__PURE__ */d(e,{caption:W.acrossMeasures(Y.map(e=>e.label),k.length),head:[W.tableSeries,...k.map(e=>e.label)],rows:Y.map(e=>[e.label,...k.map((t,r)=>w(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-WBAWJIVM.js";import{setPdfPreview as n}from"./chunk-ESL5TDNA.js";import{toast_default as i}from"./chunk-
|
|
1
|
+
import{getFilesStore as e,setSpreadsheetPreview as t}from"./chunk-WBAWJIVM.js";import{setPdfPreview as n}from"./chunk-ESL5TDNA.js";import{toast_default as i}from"./chunk-KFNQVNND.js";var o="react-os-shell:preview-opened";async function a(a){const{filePath:r,filename:l,kind:c,onStaged:s,load:d}=a;try{const a=d?d():e().readShortcut?.(r)??null;let f;if(a)f=await a;else{const e=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(r)}`,{credentials:"include"});if(!e.ok)return i.error(`Download failed (${e.status})`),!1;f=await e.blob()}if("csv"===c){const e=await f.text();t({csv:e,filename:l}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(f);n({url:e,filename:l,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{filePath:r,filename:l,kind:c}})),!0}catch(e){return i.error(e?.message||"Open failed"),!1}}export{o as PREVIEW_OPENED_EVENT,a as openPreviewFile};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n("rect",{x:
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-L6XEON5Q.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},L=o(null),N=t=>e=>{L.current=t,e.currentTarget.setPointerCapture(e.pointerId)},P=t=>e=>{L.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},A=t=>()=>{L.current===t&&(L.current=null)},E=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:N(t),onPointerMove:P(t),onPointerUp:A(t),onPointerCancel:A(t)},t)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
4
|
/* @__PURE__ */n("path",{d:F,fill:e.grid}),
|
|
5
|
-
/* @__PURE__ */n("rect",{x:0,y:0,width:
|
|
6
|
-
/* @__PURE__ */n("rect",{x:
|
|
7
|
-
/* @__PURE__ */n("rect",{x:
|
|
5
|
+
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
6
|
+
/* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
|
|
7
|
+
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),E("from"),E("to")]})})}export{a as ChartBrush};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-L6XEON5Q.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
|
|
2
2
|
return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
|
|
3
3
|
/* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
|
|
4
4
|
/* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
|