efficient-shell 12.30.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 +43 -1
- package/dist/{Browser-FQHXHI3R.js → Browser-36SDGA64.js} +17 -17
- package/dist/Calculator-GDHNFSB6.js +29 -0
- package/dist/{CurrencyConverter-EHIQIFJK.js → CurrencyConverter-PXCCCUS2.js} +6 -6
- package/dist/{Files-LTUUGPAM.js → Files-NVUIAUO5.js} +141 -141
- package/dist/{Notepad-JPAXNEFR.js → Notepad-QA2CD6GC.js} +9 -9
- package/dist/PdfViewer-627HEAIL.js +1 -0
- package/dist/{PomodoroTimer-IVDZBBUN.js → PomodoroTimer-HD2ZNOUV.js} +69 -69
- package/dist/{Preview-KRK4XT2B.js → Preview-FW2KT6FQ.js} +27 -27
- package/dist/Sidebar-QNJNEBT2.js +44 -0
- package/dist/{Stock-OBS2LPX4.js → Stock-EDZSOJAQ.js} +7 -7
- package/dist/{Weather-I4TJBIEN.js → Weather-OTVZZEE7.js} +17 -17
- package/dist/{WorldClock-YU2ZPVSA.js → WorldClock-PDKFE5S7.js} +4 -4
- package/dist/ai/index.js +88 -88
- 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-LQD54ZL5.js → chunk-246K337V.js} +1 -1
- package/dist/{chunk-CIOPLPZW.js → chunk-25M4CAB3.js} +1 -1
- package/dist/{chunk-JA5WM66L.js → chunk-26Y66IXU.js} +2 -2
- package/dist/chunk-2PNG5UR6.js +22 -0
- package/dist/chunk-3ECUHYHI.js +28 -0
- package/dist/{chunk-77BK2IAJ.js → chunk-3MAGUYG2.js} +1 -1
- package/dist/{chunk-6EXWWPAW.js → chunk-3TR6C5V4.js} +1 -1
- package/dist/{chunk-YNE5YC6E.js → chunk-3UMS74TZ.js} +1 -1
- package/dist/{chunk-XXRUDMD5.js → chunk-4U2OUX65.js} +5 -5
- package/dist/{chunk-FYGPJPU7.js → chunk-4XN6ACGV.js} +1 -1
- package/dist/{chunk-3R2TMLKH.js → chunk-555KW6TM.js} +5 -5
- package/dist/{chunk-5ZS3VOJH.js → chunk-5OJFYNEZ.js} +1 -1
- package/dist/{chunk-V64XY7L4.js → chunk-5R3NDBCD.js} +7 -7
- package/dist/{chunk-XK3VYRLR.js → chunk-5XHJ3H6Y.js} +4 -4
- package/dist/{chunk-LBLWN3SH.js → chunk-5XOF3O4B.js} +1 -1
- package/dist/{chunk-NJ6WZHXC.js → chunk-6AAGZ34A.js} +10 -10
- package/dist/{chunk-3ZC53F4T.js → chunk-6MA7VXZR.js} +3 -3
- package/dist/{chunk-KHFPF534.js → chunk-6ZTVZIPI.js} +6 -6
- package/dist/chunk-7CHEHWGL.js +9 -0
- package/dist/{chunk-AIGLJYQ5.js → chunk-7IRO4JAA.js} +1 -1
- package/dist/{chunk-N2BWOHNM.js → chunk-7JR2O3IX.js} +5 -5
- package/dist/{chunk-I6V4DMNR.js → chunk-A6YUCAGF.js} +1 -1
- package/dist/{chunk-NSNM4QIV.js → chunk-A7JAHN75.js} +5 -5
- package/dist/chunk-ADNUV6OV.js +8 -0
- package/dist/chunk-AFLG5E4O.js +7 -0
- package/dist/{chunk-KNNFNOX7.js → chunk-AFVI75RH.js} +7 -7
- package/dist/{chunk-KKYNDLOC.js → chunk-AGNHOSES.js} +6 -6
- package/dist/{chunk-RMUOUMV2.js → chunk-AJ2EEWZT.js} +2 -2
- package/dist/chunk-AWY2ZOXT.js +14 -0
- package/dist/{chunk-WM37FXRK.js → chunk-B7UT3W4C.js} +1 -1
- package/dist/{chunk-HJECGV6W.js → chunk-BEN2LJWQ.js} +1 -1
- package/dist/{chunk-U45APXV3.js → chunk-BIBQAEHV.js} +1 -1
- package/dist/{chunk-Y6H5C6A4.js → chunk-BLC6HAU3.js} +1 -1
- package/dist/{chunk-X5RFTIHV.js → chunk-BXPEEPYH.js} +1 -1
- package/dist/{chunk-JOANOIVK.js → chunk-CAIUI3DC.js} +1 -1
- package/dist/{chunk-5O5QMMMG.js → chunk-CHRK5R3Y.js} +8 -8
- package/dist/{chunk-B27XRZ47.js → chunk-COF2CF5R.js} +1 -1
- package/dist/{chunk-42GNFUAP.js → chunk-CYTK7DCA.js} +11 -11
- package/dist/{chunk-DOKA65JI.js → chunk-DGFC5BX4.js} +1 -1
- package/dist/{chunk-IQTURGC4.js → chunk-DHLXSL3Y.js} +1 -1
- package/dist/{chunk-4WW3SNL6.js → chunk-DRIO2Y4R.js} +4 -4
- package/dist/{chunk-IBPULOGJ.js → chunk-DWGMTMDU.js} +2 -2
- package/dist/{chunk-E7RMS776.js → chunk-E6GGE7E5.js} +14 -14
- package/dist/{chunk-FM34DWV7.js → chunk-FE6J5S5X.js} +5 -5
- package/dist/chunk-FKJPBQ6I.js +7 -0
- package/dist/{chunk-MYJ3HQYG.js → chunk-FXS2P23Q.js} +10 -10
- package/dist/chunk-G3NE4SGZ.js +11 -0
- package/dist/chunk-GX4CDXPK.js +9 -0
- package/dist/chunk-H74VN7OI.js +2 -0
- package/dist/chunk-H7WMOY62.js +1 -0
- package/dist/{chunk-HU24RSAE.js → chunk-HGGDOMBV.js} +1 -1
- package/dist/{chunk-CBBU74QT.js → chunk-HWV6UDFC.js} +1 -1
- package/dist/{chunk-OMSIXLK4.js → chunk-IBLRSK7V.js} +1 -1
- package/dist/{chunk-2N6WWL7Y.js → chunk-IE5XWHDU.js} +1 -1
- package/dist/chunk-IESNUXYH.js +1 -0
- package/dist/chunk-IYM5N7FH.js +4 -0
- package/dist/{chunk-IOIY54KO.js → chunk-J44SUUOG.js} +1 -1
- package/dist/{chunk-4SEPQN2N.js → chunk-JI55MXP4.js} +8 -8
- package/dist/{chunk-PAVOVX3D.js → chunk-JIBU7YY4.js} +2 -2
- package/dist/{chunk-WCJR2GNH.js → chunk-JLQ7N54N.js} +17 -17
- package/dist/chunk-JROPOGQP.js +2 -0
- package/dist/{chunk-GBPGZFBS.js → chunk-JTJDXCJU.js} +4 -4
- package/dist/{chunk-CVEVPB3O.js → chunk-JYVHFRKK.js} +5 -5
- package/dist/{chunk-MFZ4YMXE.js → chunk-JZ4V3RHK.js} +6 -6
- package/dist/{chunk-QF4FYOVE.js → chunk-K4BM6PPZ.js} +1 -1
- package/dist/{chunk-GN3AHAVY.js → chunk-K4RY57UX.js} +1 -1
- package/dist/{chunk-XMAOLCQV.js → chunk-K73KBA5C.js} +4 -4
- package/dist/{chunk-VREZFFRE.js → chunk-KDG7NWYX.js} +1 -1
- package/dist/{chunk-5X3Z45SL.js → chunk-KFNQVNND.js} +1 -1
- package/dist/{chunk-JTRQ7HAS.js → chunk-KTKFCR6T.js} +1 -1
- package/dist/chunk-L6XEON5Q.js +1 -0
- package/dist/{chunk-3N4XJS43.js → chunk-LNXYVWEF.js} +1 -1
- package/dist/chunk-LOJAJARD.js +8 -0
- package/dist/{chunk-GL4NELAT.js → chunk-LOMNX5VH.js} +1 -1
- package/dist/{chunk-ILSE5F5F.js → chunk-LQC5U5YT.js} +3 -3
- package/dist/chunk-LUAA4LKY.js +19 -0
- package/dist/{chunk-MRVW6F5E.js → chunk-M2TQQKJO.js} +1 -1
- package/dist/chunk-M3D5FW5R.js +6 -0
- package/dist/{chunk-NLQLVXMJ.js → chunk-M3FBPZ4G.js} +1 -1
- package/dist/{chunk-3B3QIHF7.js → chunk-MMSQZKJY.js} +5 -5
- package/dist/{chunk-X27K2NCU.js → chunk-NDGPJKE3.js} +5 -5
- package/dist/chunk-NMWV6BOL.js +8 -0
- package/dist/{chunk-36MM4YRK.js → chunk-NQ43KRRX.js} +7 -7
- package/dist/{chunk-FIXZT5TZ.js → chunk-NQA267J3.js} +7 -7
- package/dist/{chunk-VEF3STCH.js → chunk-NZ74N2IQ.js} +1 -1
- package/dist/{chunk-YGKQMENL.js → chunk-OA55OBDP.js} +1 -1
- package/dist/{chunk-2DCATU5B.js → chunk-OL2XKAX2.js} +1 -1
- package/dist/chunk-OQGCQQ7H.js +6 -0
- package/dist/{chunk-4FUQK2LK.js → chunk-OU3J5TOO.js} +1 -1
- package/dist/{chunk-MHVWUYEN.js → chunk-OWFJRER6.js} +1 -1
- package/dist/{chunk-M2GF44WC.js → chunk-PK5KDLIG.js} +12 -12
- package/dist/chunk-PPVZMIBL.js +4 -0
- package/dist/{chunk-5XYRFK7D.js → chunk-PR5CON2G.js} +1 -1
- package/dist/chunk-PTEKHRNX.js +26 -0
- package/dist/{chunk-UOHHIEH4.js → chunk-PUXSFLWR.js} +1 -1
- package/dist/{chunk-MVBDE4AX.js → chunk-Q2LKH6RN.js} +1 -1
- package/dist/{chunk-SAAXAAAH.js → chunk-Q2T5DRIK.js} +1 -1
- package/dist/{chunk-U22563X2.js → chunk-QB4LAGMN.js} +1 -1
- package/dist/{chunk-HE2I6KWY.js → chunk-QBQMMOP6.js} +2 -2
- package/dist/{chunk-PBZ3UQMS.js → chunk-QJ6HVBAA.js} +4 -4
- package/dist/{chunk-23CZSU3H.js → chunk-QPSKEDR7.js} +1 -1
- package/dist/{chunk-3HLV6BEC.js → chunk-QTWHMCCX.js} +10 -10
- package/dist/{chunk-Q4BJW37U.js → chunk-QUN3RSMN.js} +1 -1
- package/dist/{chunk-RPXRMTOU.js → chunk-QXLYU5FR.js} +1 -1
- package/dist/{chunk-37EYKPR6.js → chunk-QXTCEUFC.js} +1 -1
- package/dist/{chunk-HC3BZPWX.js → chunk-QYKWVZ3R.js} +1 -1
- package/dist/{chunk-6UB6YY3H.js → chunk-R3W6LZBG.js} +1 -1
- package/dist/{chunk-GANZLRMW.js → chunk-R3ZEDJDZ.js} +8 -8
- package/dist/chunk-RIULA2CH.js +15 -0
- package/dist/{chunk-ANGNTN36.js → chunk-RLFZRIO4.js} +1 -1
- package/dist/{chunk-TIYRBJSB.js → chunk-RPSNYIDY.js} +4 -4
- package/dist/{chunk-QT34GMZR.js → chunk-RSRTE7RG.js} +1 -1
- package/dist/{chunk-5RLJAXDR.js → chunk-S54Z2JAZ.js} +5 -5
- package/dist/{chunk-UQNKFMJR.js → chunk-T5UMQZ5X.js} +12 -12
- package/dist/{chunk-ZSVBEJ4G.js → chunk-TBXFRW3E.js} +1 -1
- package/dist/{chunk-KPPKPGQI.js → chunk-UJ23EKXU.js} +1 -1
- package/dist/{chunk-FSORYU5C.js → chunk-V2OE6OTK.js} +8 -8
- package/dist/{chunk-BEB3AGSY.js → chunk-V7BHDLP2.js} +1 -1
- package/dist/{chunk-DHRCI7KE.js → chunk-VERSP62V.js} +1 -1
- package/dist/{chunk-O3SCB4QZ.js → chunk-VI54L75G.js} +8 -8
- package/dist/{chunk-HOXXEF52.js → chunk-VTDW5GLS.js} +1 -1
- package/dist/chunk-VVI4Y6XA.js +23 -0
- package/dist/{chunk-AYCWVVJ3.js → chunk-VW3ZUWW2.js} +56 -56
- package/dist/{chunk-P4NWDRHS.js → chunk-WJTZE3PL.js} +11 -11
- package/dist/chunk-WW5AXVBX.js +2 -0
- package/dist/{chunk-2IEKMFVL.js → chunk-X4IFSC57.js} +1 -1
- package/dist/{chunk-UEADX2GV.js → chunk-X6AMAYXV.js} +2 -2
- package/dist/{chunk-JGZEZHMP.js → chunk-XBC7CBVJ.js} +1 -1
- package/dist/chunk-XFC7AWPW.js +11 -0
- package/dist/{chunk-TJ5ZX5HP.js → chunk-XKBCF6SK.js} +7 -7
- package/dist/chunk-XOQH6VSU.js +14 -0
- package/dist/chunk-XOXTMWV3.js +6 -0
- package/dist/{chunk-6EETON2U.js → chunk-XR7SPONC.js} +1 -1
- package/dist/{chunk-QV5A7NFQ.js → chunk-Y7XX6Z3M.js} +8 -8
- package/dist/chunk-YELYAGCX.js +13 -0
- package/dist/{chunk-QHWD3G7T.js → chunk-YG6ONZIB.js} +2 -2
- package/dist/{chunk-K6LO6QI5.js → chunk-ZFQI3EVU.js} +6 -6
- package/dist/chunk-ZGY2OK7Q.js +13 -0
- package/dist/{chunk-64ZDYUE7.js → chunk-ZHVWK5NL.js} +17 -17
- package/dist/{chunk-HRNT4UDG.js → chunk-ZP3UAWJL.js} +13 -13
- 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.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/hooks/useTheme.d.ts +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 +5 -4
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- package/dist/model-viewer/index.js +3 -3
- 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 +22 -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.d.ts +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 +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +35 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-XCRU5K4O.js +0 -29
- package/dist/PdfViewer-J55QKFNS.js +0 -1
- package/dist/Sidebar-FCXIPW5K.js +0 -44
- package/dist/chunk-4MCI7UHQ.js +0 -7
- package/dist/chunk-4YCWO2GZ.js +0 -14
- package/dist/chunk-67JLD6AU.js +0 -6
- package/dist/chunk-7DTWIWFO.js +0 -6
- package/dist/chunk-7IGWU6DK.js +0 -8
- package/dist/chunk-AJVL6LXI.js +0 -22
- package/dist/chunk-CHV7U5UV.js +0 -9
- package/dist/chunk-CXXMSYA6.js +0 -1
- package/dist/chunk-EWSOX4WP.js +0 -28
- package/dist/chunk-FEWWCWKV.js +0 -11
- package/dist/chunk-FPYOZOUY.js +0 -13
- package/dist/chunk-GCTJIZTJ.js +0 -2
- package/dist/chunk-GKX3C3JE.js +0 -13
- package/dist/chunk-HCDG7EUR.js +0 -1
- package/dist/chunk-KLG6RYYC.js +0 -6
- package/dist/chunk-KPFP2I2S.js +0 -8
- package/dist/chunk-LHATGPIE.js +0 -19
- package/dist/chunk-MKPZIEQP.js +0 -23
- package/dist/chunk-MUSNAMWH.js +0 -1
- package/dist/chunk-PRWA4AAC.js +0 -11
- package/dist/chunk-QB7TIWHT.js +0 -9
- package/dist/chunk-RJG67VRP.js +0 -15
- package/dist/chunk-RVD6HJUJ.js +0 -4
- package/dist/chunk-TN3W72FC.js +0 -8
- package/dist/chunk-UK2D2CSB.js +0 -14
- package/dist/chunk-VLI2ED22.js +0 -7
- package/dist/chunk-VY5NO4TS.js +0 -2
- package/dist/chunk-XJTZU7UH.js +0 -4
- package/dist/chunk-YS3CF7GL.js +0 -2
- /package/dist/{chunk-GMHMWDXU.js → chunk-KH3253OM.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-L6XEON5Q.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,L=p??w.noBudget,j=s(o),B=s(d),O=null!=B&&B>0?B:null,Q=s(c)??0,R="over"===i(o,d),z=null!=O?O+Q:null,C=null!=O&&null!=z?r(O/z*100):null,D=R&&Q>0,E=null==z||null==j?0:R?D?C??0:0:r(j/z*100),F=D?C??0:0,H=R?D&&null!=z&&null!=j?r(j/z*100):100:0,S=Math.max(0,H-F),V=s(b),X=null!=V&&null!=z?r(V/z*100):null,q=null!=j&&null!=O?j/O*100:null,A=null!=q?n(Math.round(q),0,M):null!=j?$(j):"—",G=f??(null==j?k:null==O?L:`${$(j)} / ${$(O)}`),I="md"===v?"h-2":"h-1.5",J=R?"text-red-600":null!=j?"text-gray-900":"text-gray-400",K=null!=j&&null!=O&&null!=z?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":z,"aria-valuenow":Math.min(z,j),"aria-valuetext":w.ofBudget(A),className:`relative mt-2 ${I} overflow-hidden rounded-full bg-gray-200`,children:[(!R||D)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${E}%`}}),S>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${F}%`,width:`${S}%`}}),Q>0&&null!=C&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${C}%`}}),null!=X&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${X}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:A}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:G})]}),K]}:{className:y,children:[
|
|
6
6
|
/* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:A}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:G})]}),K]})}export{m as BudgetBar,i as budgetState};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-L6XEON5Q.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:D=[4,22],className:L,emptyLabel:S}){const U=m().charts,W=h(),E=z??(e=>f(e,W)),O=N??(e=>f(e,W)),P=S??U.noObservations,Q=u(null),V=e(Q),C=v??V,F=p(),[I,X]=d(null);x(()=>{if(null!==I)return c(e=>"Escape"===e.key&&(X(null),!0))},[I]);const B=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),Z=$||j?T.map(e=>({...e,points:e.points.filter(e=>B(e.x,$)&&B(e.y,j))})).filter(e=>e.points.length>0):T,H=T.reduce((e,t)=>e+t.points.length,0)-Z.reduce((e,t)=>e+t.points.length,0);if(0===Z.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:L,ref:Q,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:P})});const J=Z.flatMap(e=>e.points),K=J.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(J.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(O),_),le=Math.max(ie+1,C-q),re=ee(J.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...J.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=I?Z[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=Z.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${L??""}`,ref:Q,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${C} ${k}`,role:"img","aria-label":U.scatter(Z.map(e=>e.label),A??U.yAxis,M??U.xAxis)+(H>0?`. ${U.outsideRange(H)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>X(null),onBlur:()=>X(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=I?se.findIndex(e=>e.s===I.s&&e.i===I.i):0;X(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:F,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:Y-D[1],width:le-ie+2*D[1],height:k-G-Y+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:O(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${F})`,children:Z.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):D[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>X({s:t,i:r})},`${e.key}-${r}`))})})]}),I&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??U.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:E(ae.x)},{key:"y",label:A??U.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:O(ae.y)},...null!=ae.size?[{key:"size",label:U.size,color:a.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
2
|
-
return o(e,{label:g,htmlFor:
|
|
3
|
-
/* @__PURE__ */o("button",{ref:
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-COF2CF5R.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-KDG7NWYX.js";import{useShellStrings as l}from"./chunk-L6XEON5Q.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const F=m(),O=l().files,$=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),z=j?`${F}-error`:N?`${F}-hint`:void 0;/* @__PURE__ */
|
|
2
|
+
return o(e,{label:g,htmlFor:F,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
+
/* @__PURE__ */o("button",{ref:C,type:"button",id:F,disabled:y,onClick:$.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":z,...$.zoneProps,className:t($.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
|
-
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?
|
|
5
|
+
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?O.chooseMany:O.chooseOne}),
|
|
6
|
+
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?O.dragMany:O.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
7
|
/* @__PURE__ */d("input",{...$.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
|
-
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":
|
|
9
|
+
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,O)}),
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":O.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
11
|
/* @__PURE__ */d(s,{rejections:$.rejections})]})});export{p as FilePicker_default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-L6XEON5Q.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:i,getInstructionVolume:r,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:h=e=>e.actual_qty,isFilled:o,isNew:g=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,N=o?s.filter(o):s,y=e=>n(u(e)),b=e=>n(h(e)),w=N.some(e=>null!=h(e)&&b(e)>0),v=e=>w?y(e):"actual"===m?h(e)??u(e)??0:u(e)??0,M=N.reduce((e,t)=>e+n(v(t)),0),$=N.filter(e=>g(e)).length,k=N.filter(e=>g(e)).reduce((e,t)=>e+n(v(t)),0),j=N.reduce((e,t)=>e+y(t),0),I=N.reduce((e,t)=>e+b(t),0),V=e=>i?.(e)??0,q=r??(e=>V(e)*y(e)),A=c??(e=>V(e)*b(e)),Q=N.reduce((e,t)=>e+q(t),0),F=N.reduce((e,t)=>e+A(t),0),_=w?Math.max(Q,F):"actual"===m&&F||Q,B=_<=34.65?"20ft":"40ft",E="20ft"===B?33:67,L=_>0?Math.max(1,Math.ceil(_/E)):0,O=L*E,S=_>0&&_>=.95*O&&_<=1.1*O;if(0===N.length)return null;const X=(e,t)=>E>0?Math.max(0,Math.min((e-t*E)/E*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(N.length)} · ${p.pieces(M)}`,w&&j!==I&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,I)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:L}).map((e,l)=>{const n=X(Q,l),s=X(F,l),i=w,r=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=i?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=i?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:B}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${r}%`}}),i&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(F-l*E,E),E):p.fill(Math.min(Q-l*E,E),E)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(
|
|
14
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(Q)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(_)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(S?"text-green-600":"text-gray-500"),children:[S&&"✓ ",L," × ",B]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as t}from"./chunk-L6XEON5Q.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";var o={403:t=>({title:t.forbidden,body:t.forbiddenBody}),404:t=>({title:t.notFound,body:t.notFoundBody}),500:t=>({title:t.serverError,body:t.serverErrorBody})};function i({code:i=404,actions:n}){const d=o[i](t().errors);/* @__PURE__ */
|
|
2
2
|
return e("div",{className:"flex h-full flex-col items-center justify-center bg-gray-50 p-6 text-center",children:[
|
|
3
3
|
/* @__PURE__ */r("div",{className:"text-7xl font-bold tracking-tight text-gray-400",children:i}),
|
|
4
4
|
/* @__PURE__ */r("h1",{className:"mt-2 text-xl font-semibold text-gray-900",children:d.title}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isSafeLinkHref as e}from"./chunk-Z5TE3MEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{isSafeLinkHref as e}from"./chunk-Z5TE3MEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-L6XEON5Q.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
|
|
2
2
|
return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
|
|
3
3
|
/* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
|
|
4
4
|
/* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
|
|
@@ -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}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-AJ2EEWZT.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-L6XEON5Q.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const R=l().widths,z=a(),A=m(Math.round(x)||1,1,n),E=e($,A),O=E??[...t[A]??[]],S=[...O,100-p(O)],T=P||M,B=s(null),D=s({onChange:k,shown:O,locked:T,n:A,stored:E});D.current={onChange:k,shown:O,locked:T,n:A,stored:E};const K=t=>{const{onChange:r,shown:n,locked:o,n:i}=D.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},I=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],K(i.slice(0,-1))&&(ne.current=null)},L=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=S[e]+S[e+1],i="ArrowRight"===t.key?S[e]+n:"ArrowLeft"===t.key?S[e]-n:"PageUp"===t.key?S[e]+10:"PageDown"===t.key?S[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),I(S,e,i))},W=s(null),[H,X]=c(null),F=()=>{W.current=null,X(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>F,[]);const G=e=>t=>{if(0!==t.button||T)return;t.preventDefault();const r=B.current?.getBoundingClientRect().width??0;r<=0||(W.current={i:e,x:t.clientX,width:r,from:S,moved:!1,pointer:t.pointerId},X(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},J=e=>{const t=W.current;if(!t)return;if(0===e.buttons)return void F();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}I(t.from,t.i,t.from[t.i]+r/t.width*100)},U=e=>{const t=W.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),F())},Z=(e,t)=>{const{shown:n}=D.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return K(o.slice(0,-1))?o:null},[q,Q]=c(0);u(()=>{const e=B.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Q(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const V=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=D.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=S.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(V.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=R.hint(A,r),ae=S.slice(0,-1).map((e,t)=>p(S.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
+
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":A>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */h("div",{ref:V,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
+
/* @__PURE__ */f("div",{ref:B,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:S.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===A&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
+
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),A>1&&S.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(S.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>q>0&&q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(A-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{D.current.locked||null===t||oe(e,t)||Z(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:D.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<A-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":R.divider(t+1,t+2),"aria-valuenow":S[t],"aria-valuemin":r,"aria-valuemax":S[t]+S[t+1]-r,"aria-valuetext":R.dividerValue(t+1,S[t],t+2,S[t+1]),"aria-disabled":T||void 0,onKeyDown:T?void 0:L(t),onPointerDown:G(t),onPointerMove:J,onPointerUp:U,onPointerCancel:U,onLostPointerCapture:()=>{W.current&&F()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(T?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(T?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${H===t?"w-1":y}`)})})})})]},t))]}),A>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{mediaMoveSubmenu as e}from"./chunk-
|
|
1
|
+
import{mediaMoveSubmenu as e}from"./chunk-3UMS74TZ.js";import{optionNoteClass as n}from"./chunk-URHGHXDN.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{jsxs as d,jsx as l}from"react/jsx-runtime";var a={folder:/* @__PURE__ */l(r,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),"folder-plus":/* @__PURE__ */l(r,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */l(r,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */l(r,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */l(r,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */l(r,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */l(r,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */l(r,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},o=e=>a[e];function i(e,r){return r?/* @__PURE__ */d("span",{className:"flex min-w-0 flex-col",children:[
|
|
2
2
|
/* @__PURE__ */l("span",{children:e}),
|
|
3
3
|
/* @__PURE__ */l("span",{className:n(),children:r})]}):e}function t(n,r){const{words:d,denied:l}=r,a=[],t=(e,n,r,d={})=>{if(!r)return;const o=d.deny?l[d.deny]:void 0;a.push({key:e,label:i(n,o),icon:d.icon,danger:d.danger,disabled:!!o||!!d.off,onSelect:r})},c=(n,d,i,t)=>{const c=r.move;c&&a.push(e({count:d,kind:i,head:t,icon:o("folder"),disabled:!!l.move,targets:r.moveTargets(n),onPick:e=>c(n,e.key===s?null:e.key)},r.media))},h=e=>{a.length&&a.push({type:"divider",key:e})};switch(n.kind){case"folder":{const e={kind:"folder",id:n.id};if(t("new",d.newSubfolder,r.newSubfolder&&(()=>r.newSubfolder(n.id)),{icon:o("folder-plus"),deny:"newFolder"}),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"folder",id:n.id})),{icon:o("edit"),deny:"rename"}),c(e,1,"file",!1),r.deleteFolder){h("d-delete");const e=!l.deleteFolder&&!!r.folderNotEmpty?.(n.id);a.push({key:"delete-folder",label:i(d.deleteFolder,l.deleteFolder??(e?d.folderNotEmpty:void 0)),icon:o("trash"),danger:!0,disabled:!!l.deleteFolder||e,onSelect:()=>r.deleteFolder(n.id)})}return a}case"files":{const{ids:e}=n,l=1===e.length,i={kind:"files",ids:e};l||a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),c(i,e.length,r.kindOf(e),!0),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"file",id:e[0]})),{icon:o("edit"),deny:"rename",off:!l}),t("replace",d.replace,r.replace&&(()=>r.replace(e[0])),{icon:o("swap"),deny:"replace",off:!l}),t("copy",d.copyUrl,()=>r.copyUrl(e[0]),{icon:o("copy"),off:!l});const s=l?r.urlOf(e[0]):void 0;return s&&a.push({type:"link",key:"open",label:d.openOriginal,href:s,icon:o("external")}),r.trash&&(h("d-trash"),t("trash",l?d.moveToTrash:d.moveFilesToTrash(e.length),()=>r.trash(i),{icon:o("trash"),danger:!0,deny:"trash"})),a}case"trashed":{const{ids:e}=n;return e.length>1&&a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),t("restore",d.restore,r.restore&&(()=>r.restore(e)),{icon:o("undo"),deny:"restore"}),r.deleteForever&&(h("d-delete"),t("delete",d.deleteForever,()=>r.deleteForever(e),{icon:o("trash"),danger:!0,deny:"deleteForever"})),a}case"product-node":case"render":return a.push({type:"label",key:"read-only",label:d.readOnlyMenu}),t("design",d.openInDesign,r.openInDesign&&(()=>r.openInDesign({kind:n.kind,id:n.id})),{icon:o("external")}),"render"===n.kind&&t("copy",d.copyUrl,()=>r.copyUrl(n.id),{icon:o("copy")}),a;default:return a}}var s="__all-files__";export{s as ROOT_KEY,t as mediaLibraryMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-NZ74N2IQ.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-L6XEON5Q.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -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:
|
|
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
5
|
/* @__PURE__ */b("b",{className:"font-medium",children:N(A)}),e&&ne,
|
|
6
|
-
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",
|
|
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:
|
|
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:w},children:
|
|
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":
|
|
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
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,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as e,useShellLocale as a}from"./chunk-
|
|
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
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
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&&
|
|
@@ -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-
|
|
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
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(
|
|
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
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:S?/* @__PURE__ */m(b,{children:["years"!==ee&&/* @__PURE__ */f("button",{type:"button","aria-label":
|
|
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":
|
|
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+
|
|
13
|
-
/* @__PURE__ */f("div",{role:"columnheader","aria-label"
|
|
14
|
-
return f("div",{role:"gridcell","aria-selected":n,"aria-label":
|
|
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
|
+
/* @__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":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};
|