efficient-shell 12.32.0 → 12.33.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 +34 -2
- package/dist/{Browser-36SDGA64.js → Browser-TYVPZ2NT.js} +16 -16
- package/dist/{Calculator-GDHNFSB6.js → Calculator-2N7WJ6NR.js} +23 -23
- package/dist/{CurrencyConverter-PXCCCUS2.js → CurrencyConverter-LJ73P5P7.js} +7 -7
- package/dist/{Files-NVUIAUO5.js → Files-VUZWJMCE.js} +103 -103
- package/dist/{Notepad-QA2CD6GC.js → Notepad-LXLUGQUN.js} +8 -8
- package/dist/PdfViewer-OLQBTKOC.js +1 -0
- package/dist/{PomodoroTimer-HD2ZNOUV.js → PomodoroTimer-T34U5BLE.js} +20 -20
- package/dist/Preview-VRYWLVJY.js +177 -0
- package/dist/Sidebar-I5QQHJSA.js +44 -0
- package/dist/{Stock-EDZSOJAQ.js → Stock-BV36WRZA.js} +3 -3
- package/dist/{Weather-OTVZZEE7.js → Weather-YQQT5XYX.js} +20 -20
- package/dist/{WorldClock-PDKFE5S7.js → WorldClock-WN2X3YIV.js} +7 -7
- package/dist/ai/index.js +49 -49
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.d.ts +51 -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-2FQBY4ED.js +6 -0
- package/dist/{chunk-MMSQZKJY.js → chunk-2LRSUDGN.js} +6 -6
- package/dist/{chunk-QB4LAGMN.js → chunk-2UBR4YUF.js} +1 -1
- package/dist/{chunk-NDGPJKE3.js → chunk-3DV5YLAI.js} +5 -5
- package/dist/chunk-3RX5KCUH.js +9 -0
- package/dist/{chunk-246K337V.js → chunk-3TCGXYUC.js} +1 -1
- package/dist/{chunk-3MAGUYG2.js → chunk-3U4IIEEY.js} +1 -1
- package/dist/{chunk-OU3J5TOO.js → chunk-3YCU6V3U.js} +1 -1
- package/dist/{chunk-V2OE6OTK.js → chunk-44ZHEIJZ.js} +13 -13
- package/dist/{chunk-DGFC5BX4.js → chunk-4HJNHI4A.js} +1 -1
- package/dist/{chunk-A6YUCAGF.js → chunk-4HJX2M4W.js} +1 -1
- package/dist/{chunk-QXTCEUFC.js → chunk-4RSBPRCQ.js} +1 -1
- package/dist/{chunk-BEN2LJWQ.js → chunk-4YWQE67T.js} +1 -1
- package/dist/{chunk-UJ23EKXU.js → chunk-5LHEPE4B.js} +1 -1
- package/dist/{chunk-ZP3UAWJL.js → chunk-5PSFENSW.js} +15 -15
- package/dist/{chunk-FXS2P23Q.js → chunk-5UPLN44S.js} +9 -9
- package/dist/{chunk-HWV6UDFC.js → chunk-65JCQLM4.js} +1 -1
- package/dist/{chunk-AGNHOSES.js → chunk-6D6Q3ZCG.js} +6 -6
- package/dist/{chunk-PUXSFLWR.js → chunk-6SOS6OBB.js} +1 -1
- package/dist/{chunk-5R3NDBCD.js → chunk-6XPS3H5Z.js} +9 -9
- package/dist/{chunk-DRIO2Y4R.js → chunk-75TPMXA7.js} +4 -4
- package/dist/{chunk-S54Z2JAZ.js → chunk-7VIRSTRC.js} +7 -7
- package/dist/{chunk-BXPEEPYH.js → chunk-7WMFHPKS.js} +1 -1
- package/dist/chunk-A6KFGANR.js +23 -0
- package/dist/{chunk-NZ74N2IQ.js → chunk-AEMTJGD4.js} +1 -1
- package/dist/{chunk-AFVI75RH.js → chunk-AJ5GLMGD.js} +7 -7
- package/dist/{chunk-VERSP62V.js → chunk-AKKDFFUO.js} +1 -1
- package/dist/{chunk-DWGMTMDU.js → chunk-APGIPXR7.js} +1 -1
- package/dist/{chunk-LQC5U5YT.js → chunk-ARBS2EZ6.js} +1 -1
- package/dist/{chunk-FKJPBQ6I.js → chunk-B3KQELHS.js} +6 -6
- package/dist/chunk-B447IHIL.js +4 -0
- package/dist/{chunk-LOJAJARD.js → chunk-BLXEDMZM.js} +6 -6
- package/dist/{chunk-TBXFRW3E.js → chunk-BLXHT72M.js} +1 -1
- package/dist/{chunk-VI54L75G.js → chunk-BNPJHOAC.js} +9 -9
- package/dist/{chunk-3TR6C5V4.js → chunk-BRFUQAVC.js} +1 -1
- package/dist/{chunk-M3FBPZ4G.js → chunk-BSEQJM7X.js} +1 -1
- package/dist/{chunk-BIBQAEHV.js → chunk-BXZLSY2S.js} +1 -1
- package/dist/{chunk-6MA7VXZR.js → chunk-CBXEMPZL.js} +3 -3
- package/dist/{chunk-COF2CF5R.js → chunk-CCPUNN4F.js} +1 -1
- package/dist/{chunk-YG6ONZIB.js → chunk-COHFFGFE.js} +2 -2
- package/dist/{chunk-ZFQI3EVU.js → chunk-CVXJKHPD.js} +6 -6
- package/dist/chunk-D53FU245.js +8 -0
- package/dist/{chunk-OL2XKAX2.js → chunk-DASRJ26L.js} +1 -1
- package/dist/{chunk-L6XEON5Q.js → chunk-DEJIH3ZQ.js} +1 -1
- package/dist/{chunk-A7JAHN75.js → chunk-DFOKJAIS.js} +1 -1
- package/dist/{chunk-RIULA2CH.js → chunk-DGFFDZCY.js} +11 -11
- package/dist/{chunk-K4BM6PPZ.js → chunk-DU7TJVX5.js} +1 -1
- package/dist/{chunk-ZGY2OK7Q.js → chunk-DYOFTZOC.js} +9 -9
- package/dist/{chunk-OA55OBDP.js → chunk-E44RNULN.js} +1 -1
- package/dist/{chunk-XKBCF6SK.js → chunk-E6PDAYBR.js} +10 -10
- package/dist/chunk-EEFUXXYJ.js +22 -0
- package/dist/{chunk-WJTZE3PL.js → chunk-EQFWFQOZ.js} +10 -10
- package/dist/{chunk-XR7SPONC.js → chunk-F3MO56N4.js} +1 -1
- package/dist/chunk-FBMYLCCE.js +11 -0
- package/dist/{chunk-VW3ZUWW2.js → chunk-FCILLVVT.js} +61 -61
- package/dist/{chunk-CYTK7DCA.js → chunk-FCWBO7I3.js} +12 -12
- package/dist/{chunk-RPSNYIDY.js → chunk-FEQQMRHJ.js} +3 -3
- package/dist/chunk-FOE2QHDE.js +13 -0
- package/dist/{chunk-LNXYVWEF.js → chunk-FUNGLFQE.js} +3 -3
- package/dist/{chunk-26Y66IXU.js → chunk-FVORTWUY.js} +2 -2
- package/dist/{chunk-X4IFSC57.js → chunk-FXG7TOZN.js} +1 -1
- package/dist/{chunk-XOXTMWV3.js → chunk-G5U7IRH4.js} +2 -2
- package/dist/{chunk-J44SUUOG.js → chunk-GAGCE2ML.js} +1 -1
- package/dist/{chunk-IBLRSK7V.js → chunk-GHLXZDLU.js} +1 -1
- package/dist/{chunk-OWFJRER6.js → chunk-H4GOJ26X.js} +1 -1
- package/dist/chunk-HTHD7STJ.js +9 -0
- package/dist/{chunk-B7UT3W4C.js → chunk-HTHNDX32.js} +1 -1
- package/dist/{chunk-Y7XX6Z3M.js → chunk-HWJQLLJA.js} +8 -8
- package/dist/chunk-I4RJAMLJ.js +1 -0
- package/dist/{chunk-R3W6LZBG.js → chunk-ID35S5Y6.js} +1 -1
- package/dist/{chunk-QJ6HVBAA.js → chunk-IEW5JTIR.js} +4 -4
- package/dist/{chunk-XBC7CBVJ.js → chunk-IFLIE3EQ.js} +1 -1
- package/dist/{chunk-5XOF3O4B.js → chunk-IODIQ77P.js} +1 -1
- package/dist/{chunk-CHRK5R3Y.js → chunk-IRCASURW.js} +8 -8
- package/dist/{chunk-KDG7NWYX.js → chunk-ITEOA45V.js} +1 -1
- package/dist/{chunk-7IRO4JAA.js → chunk-IYTOOV7Q.js} +1 -1
- package/dist/{chunk-NQ43KRRX.js → chunk-JOYGSKWG.js} +9 -9
- package/dist/chunk-JTMR3EH3.js +28 -0
- package/dist/{chunk-3UMS74TZ.js → chunk-JWUNK2PW.js} +1 -1
- package/dist/{chunk-LUAA4LKY.js → chunk-KITSIQCV.js} +16 -16
- package/dist/{chunk-PK5KDLIG.js → chunk-KRCWLZV7.js} +12 -12
- package/dist/{chunk-ZHVWK5NL.js → chunk-KV6XCHAG.js} +18 -18
- package/dist/{chunk-JI55MXP4.js → chunk-KZQRUVII.js} +7 -7
- package/dist/{chunk-DHLXSL3Y.js → chunk-LPAOHDUE.js} +1 -1
- package/dist/chunk-LSONG4QV.js +1 -0
- package/dist/{chunk-HGGDOMBV.js → chunk-MZCYB2MW.js} +1 -1
- package/dist/{chunk-25M4CAB3.js → chunk-NDWX5Z4D.js} +1 -1
- package/dist/{chunk-Q2LKH6RN.js → chunk-NGG6DYNN.js} +1 -1
- package/dist/{chunk-RSRTE7RG.js → chunk-NLHGFQ54.js} +1 -1
- package/dist/{chunk-QYKWVZ3R.js → chunk-NUDL6UO3.js} +1 -1
- package/dist/{chunk-YELYAGCX.js → chunk-P62QGXRW.js} +12 -12
- package/dist/{chunk-4U2OUX65.js → chunk-PA3OU3Y7.js} +5 -5
- package/dist/{chunk-X6AMAYXV.js → chunk-PC3MYH2K.js} +2 -2
- package/dist/{chunk-V7BHDLP2.js → chunk-PGATHOTX.js} +1 -1
- package/dist/{chunk-QUN3RSMN.js → chunk-PR6FNBKR.js} +1 -1
- package/dist/{chunk-6AAGZ34A.js → chunk-PZNF2TEB.js} +9 -9
- package/dist/{chunk-CAIUI3DC.js → chunk-Q6GECV4J.js} +1 -1
- package/dist/{chunk-BLC6HAU3.js → chunk-QDEQHT2T.js} +1 -1
- package/dist/{chunk-QXLYU5FR.js → chunk-QDIPNQ6M.js} +1 -1
- package/dist/{chunk-JZ4V3RHK.js → chunk-QO7UHTUE.js} +4 -4
- package/dist/chunk-QXXMRV4E.js +2 -0
- package/dist/{chunk-JTJDXCJU.js → chunk-R5SVNFUG.js} +4 -4
- package/dist/{chunk-FE6J5S5X.js → chunk-R5TSUJTK.js} +6 -6
- package/dist/{chunk-7JR2O3IX.js → chunk-RJ24VXBZ.js} +6 -6
- package/dist/chunk-RMEYKJEH.js +8 -0
- package/dist/{chunk-K73KBA5C.js → chunk-ROKUEMAK.js} +4 -4
- package/dist/{chunk-IE5XWHDU.js → chunk-ROPVIMIR.js} +1 -1
- package/dist/chunk-RTGGGZ2R.js +2 -0
- package/dist/{chunk-JLQ7N54N.js → chunk-S26FG4RF.js} +15 -15
- package/dist/{chunk-RLFZRIO4.js → chunk-SQ4ZFG2B.js} +1 -1
- package/dist/{chunk-VTDW5GLS.js → chunk-TAEO2JC6.js} +1 -1
- package/dist/{chunk-QPSKEDR7.js → chunk-TDG5WGLR.js} +1 -1
- package/dist/{chunk-KFNQVNND.js → chunk-TMSSR5UH.js} +1 -1
- package/dist/{chunk-G3NE4SGZ.js → chunk-UHQBHSWL.js} +8 -8
- package/dist/{chunk-6ZTVZIPI.js → chunk-V3KQIY6T.js} +6 -6
- package/dist/{chunk-AFLG5E4O.js → chunk-V5VAKDLS.js} +6 -6
- package/dist/chunk-VMKTA5HL.js +6 -0
- package/dist/{chunk-JYVHFRKK.js → chunk-VUM6BYAX.js} +5 -5
- package/dist/{chunk-IYM5N7FH.js → chunk-VVXBBU6R.js} +3 -3
- package/dist/{chunk-5XHJ3H6Y.js → chunk-VWYICGVA.js} +1 -1
- package/dist/{chunk-QTWHMCCX.js → chunk-W5HT23P7.js} +11 -11
- package/dist/{chunk-XOQH6VSU.js → chunk-WEZ2RO72.js} +11 -11
- package/dist/{chunk-JIBU7YY4.js → chunk-WKWZILZA.js} +2 -2
- package/dist/chunk-WUEH6DLJ.js +14 -0
- package/dist/{chunk-NQA267J3.js → chunk-X22SFR5F.js} +5 -5
- package/dist/{chunk-PTEKHRNX.js → chunk-XBX3N3VG.js} +15 -15
- package/dist/{chunk-5OJFYNEZ.js → chunk-XCY7A5UM.js} +1 -1
- package/dist/{chunk-QBQMMOP6.js → chunk-XPSWZQR4.js} +2 -2
- package/dist/{chunk-M2TQQKJO.js → chunk-XYMEC63O.js} +1 -1
- package/dist/{chunk-T5UMQZ5X.js → chunk-Y43S6YS5.js} +11 -11
- package/dist/{chunk-KTKFCR6T.js → chunk-YAM3L5N4.js} +1 -1
- package/dist/{chunk-K4RY57UX.js → chunk-YEEMRWBS.js} +1 -1
- package/dist/{chunk-LOMNX5VH.js → chunk-YM7AWNMY.js} +1 -1
- package/dist/{chunk-555KW6TM.js → chunk-YMUHIJDJ.js} +4 -4
- package/dist/{chunk-PR5CON2G.js → chunk-YW6BODBX.js} +1 -1
- package/dist/{chunk-AJ2EEWZT.js → chunk-ZDCCYRFF.js} +2 -2
- package/dist/{chunk-4XN6ACGV.js → chunk-ZDDMFFQK.js} +1 -1
- package/dist/{chunk-Q2T5DRIK.js → chunk-ZGIAMYTI.js} +1 -1
- package/dist/{chunk-E6GGE7E5.js → chunk-ZHR2HNT2.js} +14 -14
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- 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/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/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 +8 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/PdfViewer-627HEAIL.js +0 -1
- package/dist/Preview-FW2KT6FQ.js +0 -177
- package/dist/Sidebar-QNJNEBT2.js +0 -44
- package/dist/chunk-2PNG5UR6.js +0 -22
- package/dist/chunk-3ECUHYHI.js +0 -28
- package/dist/chunk-7CHEHWGL.js +0 -9
- package/dist/chunk-ADNUV6OV.js +0 -8
- package/dist/chunk-AWY2ZOXT.js +0 -14
- package/dist/chunk-ESL5TDNA.js +0 -1
- package/dist/chunk-GX4CDXPK.js +0 -9
- package/dist/chunk-H74VN7OI.js +0 -2
- package/dist/chunk-H7WMOY62.js +0 -1
- package/dist/chunk-JROPOGQP.js +0 -2
- package/dist/chunk-M3D5FW5R.js +0 -6
- package/dist/chunk-NMWV6BOL.js +0 -8
- package/dist/chunk-OQGCQQ7H.js +0 -6
- package/dist/chunk-PPVZMIBL.js +0 -4
- package/dist/chunk-R3ZEDJDZ.js +0 -13
- package/dist/chunk-VVI4Y6XA.js +0 -23
- package/dist/chunk-XFC7AWPW.js +0 -11
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as k}from"./chunk-
|
|
2
|
-
/* @__PURE__ */
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
return
|
|
5
|
-
return E("div",{id
|
|
6
|
-
/* @__PURE__ */
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as k}from"./chunk-DEJIH3ZQ.js";import{forwardRef as N,useId as w,useState as D,useRef as $,useMemo as j,useCallback as S,useEffect as H}from"react";import{createPortal as T}from"react-dom";import{jsxs as E,jsx as I,Fragment as C}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,D=k(),$=d(),j=f??$,S=w(),H=/* @__PURE__ */E("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */I(A,{items:r})]});return j?/* @__PURE__ */E(C,{children:[H,
|
|
3
|
+
/* @__PURE__ */I("span",{id:S,hidden:!0,children:D.settingView.auto})]}):H});function A({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return I(C,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var K=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:K,className:P="",id:R,disabled:U,size:V,touchSize:B,title:Y,multiple:M,renderOption:W,renderValue:F,valueText:J,readOnly:L=!1,footer:G,changed:q=!1,auto:Q,"aria-describedby":X,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=D(!1),[ne,ae]=D(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!G?.length,me="sm"===V,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=D(null),ge=k(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=R??`${ke}-trigger`,De=e=>`${ke}-opt-${e}`,$e=`${ke}-changed`,je=d(),Se=Q??je,He=`${ke}-auto`,Te=[X,q?$e:void 0,Se?He:void 0].filter(Boolean).join(" ")||void 0,Ee=j(()=>n(N),[N]),Ie=M?l:[],Ce=u,Oe=f(oe,re,{matchTriggerWidth:!0,...G?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Oe?.top}|${Oe?.bottom}|${Oe?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Ae=M?Ee.findIndex(e=>Ie.includes(e.value)):Ee.findIndex(e=>e.value===l),Ke=M?Ee.filter(e=>Ie.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ee[Ae].label:void 0,Pe=!M&&Ae>=0?Ee[Ae].lang:void 0,Re=M?Ee.filter(e=>Ie.includes(e.value)):Ae>=0?[Ee[Ae]]:[],Ue=F&&Re.length?F(Re):void 0,Ve=void 0!==Ue&&J?J(Re):void 0,Be=S((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Ye=S(()=>{U||L||(ae(Ae>=0?Ae:e(Ee)),ie(!0))},[U,L,Ee,Ae]),Me=S(e=>{const t=Ee[e];if(t&&!t.disabled){if(M){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),Be()}},[Ee,M,l,Ce,Be]);H(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Be(),!0),ue)},[re,Be]),H(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Be(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Be(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Be]),H(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape(De(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const We=S(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Ae,n=t(Ee,r.buffer,i);n<0||(re?ae(n):M?(ae(n),ie(!0)):Me(n))},[re,ne,Ae,Ee,Me,M]),Fe=re?a(N,(e,t)=>{const r=(i=e.value,M?Ie.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return E("div",{id:De(t),role:"option",lang:e.description||e.labelStyle||W?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Me(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${M?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[M&&/* @__PURE__ */I(o,{selected:r}),W?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:n})}):M?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
7
|
/* @__PURE__ */E(C,{children:[
|
|
8
|
-
/* @__PURE__ */
|
|
8
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Je=void 0!==Ue?
|
|
9
9
|
/* @__PURE__ */E("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
10
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
|
|
11
|
+
/* @__PURE__ */I("span",{lang:void 0===Ve?Pe:void 0,className:"sr-only",children:Ve??Ke})]}):/* @__PURE__ */I("span",{lang:Pe,className:`block truncate ${void 0===Ke?c:""}`,children:Ke??z??" "}),Le={zIndex:h.popup,left:Oe?.left,top:Oe?.top,bottom:Oe?.bottom,width:Oe?.width,maxHeight:Oe?.maxHeight??b,visibility:Oe?void 0:"hidden",...x()},Ge=/* @__PURE__ */I("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":M||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Le,maxHeight:fe}:Le,children:Fe}),qe=pe?/* @__PURE__ */E("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Le,children:[Ge,
|
|
12
|
+
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */E("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Be(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(G?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Be());case"Escape":return e.preventDefault(),e.stopPropagation(),void Be()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Ge;/* @__PURE__ */
|
|
14
14
|
return E("div",{ref:le,className:"relative",children:[
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */E("select",{ref:te,value:l,multiple:
|
|
19
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */I("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?De(ne):void 0,"aria-invalid":K||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:Y,disabled:U,"aria-readonly":L||void 0,onClick:()=>re?Be():Ye(),onKeyDown:t=>{if(!U&&!L)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ee,e,1)):Ye());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ee,e,-1)):Ye());case"Home":return void(re&&(t.preventDefault(),ae(e(Ee))));case"End":return void(re&&(t.preventDefault(),ae(r(Ee))));case"Enter":return void(re&&(t.preventDefault(),Me(ne)));case" ":return t.preventDefault(),void(re?Me(ne):Ye());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Be()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Be(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),We(t.key))}},className:s({invalid:K,size:V,readOnly:L,auto:Se,className:`${L?"":"pr-8 "}text-left ${P}`.trim()}),children:q?
|
|
16
|
+
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[Je,
|
|
17
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Je}),q&&/* @__PURE__ */I("span",{id:$e,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */I("span",{id:He,hidden:!0,children:ge.settingView.auto}),!L&&/* @__PURE__ */I(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */E("select",{ref:te,value:l,multiple:M||void 0,onChange:e=>Ce(M?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:U,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!M&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */I(A,{items:N})]}),re&&T(qe,document.body)]})}),P=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */I(z,{ref:r,...t,size:n}):/* @__PURE__ */I(K,{ref:r,...t}):/* @__PURE__ */I(K,{ref:r,...t,size:n})});export{z as NativeSelect,P as Select_default};
|
|
@@ -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-S26FG4RF.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-DEJIH3ZQ.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),D=S.length?Math.min(...S):x,P=S.length?Math.max(...S):x,C=a(r??null)??D,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),T=(()=>{const e=[R,P,q,C+i];return O||e.push(x),Math.max(...e)})(),I=Math.max(1,Math.round((T-C)/i)),L=a(p??null)??P??C,A=Math.min(Math.max(y??L,C),T),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(C).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),J=j??F,z=j?a(j.date):F?C:null,E=$?a($.date):null,G=!!(J&&$&&null!=z&&null!=E&&A>z&&A<E);let H,Q;if(G&&null!=z&&null!=E){const e=(A-z)/Math.max(E-z,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,H={id:`interp-${A}`,progress_number:_.estimated,date:new Date(A).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Q=J}else if(H=J??t[t.length-1]??null,H){const e=t.findIndex(e=>e.id===H.id);Q=e>=0&&e<t.length-1?t[e+1]:null}else Q=null;const Z={};for(const e of Q?.items??[])Z[e.part_number]=e;const B=!(!d||H?.id===d),K=d?Math.min(a(p??null)??T,T):T,V=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:C,endMs:T,totalLeadDays:I,scrubMs:A,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:B,beforeAnchor:J,nextAfter:$,displayed:H,prevReport:Q,prevByPN:Z,isInterpolated:G,playing:v,startPlay:()=>{if(v)return void N();if(K<=C)return void f(K);M(!0),f(C);let e=performance.now(),t=C;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=K)return f(K),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:V,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])),D=N.map(({ms:e})=>e),P=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:P,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:D,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:D}){const{reports:P,markers:C,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:I,setScrubMs:L,displayed:A,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:J,estCompletionMs:z}=n,E=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)}}}(P.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),L,D),G=c().production,H=d(),Q=_??G.heading,Z=e=>o(e,H);if(0===P.length&&0===C.length)return null;const B=C.filter(e=>"shipment"===e.kind),K=C.filter(e=>"inspection"===e.kind),V=C.filter(e=>"invoice"===e.kind),U=(A?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),W=A?v(A):0,X=P.find(e=>e.id===F),Y=X?N(X):J,ee=
|
|
3
|
+
/* @__PURE__ */h("button",{type:"button",onClick:E.toggle,"aria-pressed":E.playing,title:E.playing?G.pause:G.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[E.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */b("span",{children:E.playing?G.pause:G.play})]}),te=j&&(S??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{E.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:S??G.backTo(String(Y))}):null,[re,ne]=p(G.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:[" · ",Z(new Date(A.date).getTime())," · ",G.overall(Math.round(W))," · ",G.inStock(U)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:G.noReport})});if("rail"===x){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:G.estimatedCompletion,dateText:Z(z)}: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:P,markers:C,valueMs:I,activeId:A?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??G.start,end:M?.end??(e?G.estDone:void 0)},onDragStart:E.stop,playback:{playing:E.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:E.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:Q,subject:R,meta:[`${Z(O)} → ${Z(q)}`,G.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
|
|
11
|
+
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[P.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"}),G.report]}),B.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"})}),G.shipment]}),K.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"})}),G.inspection]}),V.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"})}),G.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:P,markers:C,valueMs:I,activeId:A?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:E.stop,playback:{playing:E.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:E.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-
|
|
1
|
+
import{Dialog as e}from"./chunk-B447IHIL.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{buttonClasses as r}from"./chunk-UQYNPYF4.js";import{useShellStrings as n,splitAround as o}from"./chunk-DEJIH3ZQ.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:r({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:r({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:r({variant:"primary"})}},w=r({variant:"secondary"}),C=r({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
2
|
return m(t,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
|
|
3
|
-
return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function E({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),E=a(null),F=a(0),
|
|
3
|
+
return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function E({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),E=a(null),F=a(0),D=a([]),I=a(null),T=a(null),$=c(e=>{E.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),W=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++F.current,options:t,resolve:e};null===E.current?$(r):D.current.push(r)})},[$]),[H,K]=s(!1),[Q,S]=s({message:""}),[V,Y]=s(""),B=a(),J=c(e=>(S(e),Y(""),K(!0),new Promise(e=>{B.current=e})),[]),[O,R]=s(!1),[U,Z]=s({}),[q,z]=s(""),A=a(),G=c(e=>{const t="string"==typeof e?{message:e}:e;return Z(t),z(t.defaultValue??""),R(!0),new Promise(e=>{A.current=e})},[]);u(()=>{g=W,v=J,x=G},[W,J,G]);const M=(e,t)=>{if(E.current!==e)return;const r=N.current,n=D.current.shift();n?$(n):(E.current=null,N.current=void 0,l(!1)),r?.(t)},X=e=>{K(!1),Y(""),B.current?.(e)},_=e=>{if(e){const e=q.trim();if(!e&&!U.allowEmpty)return R(!1),void A.current?.(null);R(!1),A.current?.(e)}else R(!1),A.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===Q.variant?"warning":"danger"],ne=Q.confirmWord,oe=null==ne||V===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
4
|
return d(f.Provider,{value:W,children:[t,
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>
|
|
6
|
-
/* @__PURE__ */m("button",{ref
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
8
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(
|
|
5
|
+
/* @__PURE__ */m(e,{open:r,onClose:()=>M(p,!1),initialFocus:I,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
+
/* @__PURE__ */m("button",{ref:I,type:"button",onClick:()=>M(p,!1),className:w,children:i.cancelLabel||le.cancel}),
|
|
7
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>M(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
|
+
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
10
|
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:
|
|
13
|
-
/* @__PURE__ */m("button",{ref:
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
12
|
+
/* @__PURE__ */d(e,{open:H,onClose:()=>X(!1),initialFocus:null!=ne?void 0:T,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
+
/* @__PURE__ */m("button",{ref:T,type:"button",onClick:()=>X(!1),className:w,children:Q.cancelLabel||le.destructiveCancel}),
|
|
14
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>X(!0),disabled:!oe,className:re.button,children:ne??Q.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>X(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
|
|
16
16
|
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(
|
|
17
|
+
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
18
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:
|
|
19
|
+
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:Q.title||le.destructiveTitle}),
|
|
20
|
+
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:Q.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
21
|
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
22
22
|
/* @__PURE__ */m("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),se]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
24
|
-
/* @__PURE__ */d(e,{open:
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:q,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:
|
|
23
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:V,onChange:e=>Y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&V===ne&&X(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
+
/* @__PURE__ */d(e,{open:O,onClose:()=>_(!1),title:U.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:U.cancelLabel||le.cancel}),
|
|
26
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!U.allowEmpty&&!q.trim(),className:C,children:U.confirmLabel||le.ok})]}),children:[U.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:U.message}),
|
|
27
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:q,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:U.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{E as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),E=y??(e=>m(e,w)),R=b??C.nothingToPlot,I=h(),[P,Q]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const $=v/2,F=v/2,H=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(H-.16*v)/g.length):0,W=Math.max(1,Math.floor((H-.16*v)/V||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,V-2)),A=r(Y.length,.03),B=null!==P?Y[P]:void 0;/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":
|
|
4
|
-
/* @__PURE__ */p("title",{id:
|
|
5
|
-
return d("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
6
|
-
/* @__PURE__ */p("path",{d:e(F,
|
|
7
|
-
/* @__PURE__ */p("path",{d:e(F,
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":I,onMouseLeave:()=>Q(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:I,children:"track"===k?C.radialTrack(Y.length):C.radialCycle(Y.length)}),Y.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/U)),c=((e,t)=>null!==P?P!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=H-r*V,m=o-V+z,h=-Math.PI/2;/* @__PURE__ */
|
|
5
|
+
return d("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
|
+
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f),fill:i.grid}),
|
|
7
|
+
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
+
return p("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),children:/* @__PURE__ */p("path",{d:e($,F,m,m+(H-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),B&&null!==P&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:B.label,rows:[{key:"value",label:C.value,color:o(P,B.color,B.tone),value:E(B.value)}]})}),
|
|
9
9
|
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
10
|
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
11
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-CVXJKHPD.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-DYOFTZOC.js";import{Avatar as s}from"./chunk-YAM3L5N4.js";import{ColumnChart as l}from"./chunk-PA3OU3Y7.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="12.33.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as t,useShellLocale as e}from"./chunk-DEJIH3ZQ.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
|
|
3
3
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
|
|
4
4
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useRef as e,useEffect as r,useCallback as n}from"react";function i({open:i,dirty:o,onClose:c,title:s,layer:u}){const a=t().dialog,d=e(!1),l=e(!1),m=e({dirty:o,onClose:c,title:s,strings:a});return r(()=>{m.current={dirty:o,onClose:c,title:s,strings:a}}),r(()=>{i||(d.current=!1)},[i]),r(()=>{if(!i||"auto"!==o||!u)return;const t=t=>{u.contains(t.target)&&(d.current=!0)};return document.addEventListener("input",t,!0),document.addEventListener("change",t,!0),()=>{document.removeEventListener("input",t,!0),document.removeEventListener("change",t,!0)}},[i,o,u]),n(()=>{const{dirty:t,onClose:e,title:r,strings:n}=m.current;if(l.current)return;("auto"===t?d.current:t)?(l.current=!0,import("./shell/ConfirmDialog.js").then(({confirm:t})=>t({title:n.discardTitle,message:n.discardMessage("string"==typeof r?r:void 0),confirmLabel:n.discardConfirm,cancelLabel:n.keepEditing,variant:"warning"})).then(t=>{l.current=!1,t&&(d.current=!1,m.current.onClose())})):e()},[])}export{i as useDiscardGuard};
|
|
@@ -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-DEJIH3ZQ.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,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
|
|
2
2
|
return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
|
|
3
3
|
/* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
|
|
4
4
|
/* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-DEJIH3ZQ.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-PT4GMPUB.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-
|
|
2
|
-
return E("div",{ref:
|
|
3
|
-
/* @__PURE__ */R("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */R("span",{ref:
|
|
4
|
-
/* @__PURE__ */E(s,{children:[
|
|
5
|
-
/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */R(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */R(p,{name:"close"}),onClick:()=>{ie([]),Ee(!1)}}})}),X&&/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */R(c,{action:X})})]}),
|
|
6
|
-
/* @__PURE__ */E("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:
|
|
7
|
-
/* @__PURE__ */R("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),
|
|
8
|
-
/* @__PURE__ */R(m,{size:"sm",padding:"py-2",label:ke.search.searching}):
|
|
9
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1",children:
|
|
10
|
-
/* @__PURE__ */E("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-PT4GMPUB.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-DEJIH3ZQ.js";import{useState as D,useId as N,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as M}from"react-dom";import{jsxs as E,jsx as R}from"react/jsx-runtime";function T(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var F=["right-2","right-8","right-16"],z=[8,32,64];function L(L){const{options:O,placeholder:A,emptyOptionLabel:I,className:U="",disabled:Y,id:H,filter:B=!1,allowFreeText:J=!1,freeTextOption:P,onSearchChange:V,loading:Z=!1,error:G,onRetry:K,rightAdornment:Q,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=L,re=!0===L.multiple,le=L.multiple?L.value:L.value?[L.value]:[],oe=L.multiple?"":L.value,ie=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},ae=le.length>0,se=B&&ae&&!Y,ce=re||B,ue=null!=P,de=J||ue,[he,pe]=D(!1),[me,fe]=D(-1),be=N(),ge=H??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=D(""),ke=$(),je=I??ke.select.none,$e=e=>{xe(e),fe(-1),V?.(e)},De=C(null),Ne=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Me=C(!1),Ee=e=>{We.current&&(We.current=!1,e&&J&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Re=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Ee(!1)}},[Te,Fe]=D(null);y(()=>{if(!Q||he)return void Fe(null);const e=Se.current?.offsetWidth??0;Fe(e?e+z[Ye]+6:null)});const ze=v(Ne,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),Le=S(()=>t(O),[O]),Oe=le.join("\0"),Ae=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Le)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[Le,Oe,de]),Ie=Ae.join(", "),Ue=_&&ae&&!Y,Ye=(Ue?1:0)+(X?1:0),[He,Be]=D(null),Je=C(null),Pe=C(""),Ve=C(()=>{});Ve.current=()=>{const e=Ne.current,t=Je.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Ae.join("\0")}`;if(o===Pe.current)return;Pe.current=o;let i=null;r>0&&Ae.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=T(Ae,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Be(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),W(()=>{const e=Ne.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Ze=Ae.length,Ge=!re||!He||He.shown>=Ze?Ie:0===He.shown?ke.select.selectedCount(Ze):`${Ae.slice(0,He.shown).join(", ")} +${Ze-He.shown}`,Ke=re&&null!==He&&(He.shown<Ze||He.cut),Qe=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;De.current?.contains(t)||Ce.current?.contains(t)||Ee(!0)};document.addEventListener("mousedown",e);const t=b(()=>Ee(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,J,ye,Oe,L.onChange]),W(()=>{if(he)return x(e=>!("Escape"!==e.key||!We.current)&&(Ee(!1),Ne.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(O,t=>!e.has(t.value)&&(e.add(t.value),!0))},[O]),qe=S(()=>{if(V)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?Le.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,Le,Oe]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return E("div",{ref:De,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(De.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==Ne.current&&Ee(!0)},children:[(rt=/* @__PURE__ */R("input",{id:ge,ref:Ne,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ge,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{Y||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(Y)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Re(nt[me],me):1!==_e.length||_e[0].disabled?J&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Ee(!1),Ne.current?.blur())):Re(_e[0],0)):"Escape"===t.key?(Ee(!1),Ne.current?.blur()):"Tab"===t.key&&Ee(!0)},placeholder:Qe?Ge:A||je,className:`${se?u:d} ${U} ${a[Ye]}${Y?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Qe?" rosh-field-shows-choice":""}`,style:Te?{paddingRight:Te}:void 0,disabled:Y}),re?/* @__PURE__ */R(f,{content:!he&&Ke?Ie:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */R("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */R("span",{ref:Je,className:"whitespace-pre"})}),Ye>0&&
|
|
4
|
+
/* @__PURE__ */E(s,{children:[Ue&&
|
|
5
|
+
/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */R(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */R(p,{name:"close"}),onClick:()=>{ie([]),Ee(!1)}}})}),X&&/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */R(c,{action:X})})]}),Q&&!he&&/* @__PURE__ */R("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${F[Ye]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),he&&M(
|
|
6
|
+
/* @__PURE__ */E("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:ze?.left,right:ze?.right,top:ze?.top,bottom:ze?.bottom,minWidth:ze?.minWidth,width:ze?.width,...ce&&{maxWidth:ze?.maxWidth},visibility:ze?void 0:"hidden",...j()},children:[re&&ae&&_&&!Y&&
|
|
7
|
+
/* @__PURE__ */R("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),Z?
|
|
8
|
+
/* @__PURE__ */R(m,{size:"sm",padding:"py-2",label:ke.search.searching}):G?/* @__PURE__ */E("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */R("span",{className:"min-w-0 flex-1",children:G}),K&&/* @__PURE__ */R(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */E("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:ze?.maxHeight??w},children:[0===nt.length?Z||G?null:/* @__PURE__ */R("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
11
|
return E("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Re(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */R(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */R("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */R(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&
|
|
13
|
-
/* @__PURE__ */R("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Re(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:
|
|
12
|
+
/* @__PURE__ */R("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */R(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&P&&
|
|
13
|
+
/* @__PURE__ */R("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Re(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:P(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{L as SearchableSelect,T as fitChoice};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-
|
|
1
|
+
import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-NLHGFQ54.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{CartesianPlot as s}from"./chunk-D53FU245.js";import{useDragZoom as m,ChartZoomSummary as u}from"./chunk-2UBR4YUF.js";import{ChartTooltip as c}from"./chunk-WDQI3FV6.js";import{CHART_INK as d,resolveSeriesColor as h,STATUS_VARS as f}from"./chunk-TZFACUMR.js";import{useShellStrings as p,useShellLocale as b}from"./chunk-DEJIH3ZQ.js";import{formatPercent as x,formatPlain as y}from"./chunk-C3QOHMR6.js";import{useId as v}from"react";import{jsx as M,jsxs as g,Fragment as k}from"react/jsx-runtime";function w({stacked:w=!1,stackMode:N="value",height:$=220,width:F,max:j,formatValue:C,yAxisLabel:L,className:A,emptyLabel:z,radius:T=3,loading:V=!1,animate:R=!0,glow:S=!1,emphasise:E=!1,activeKey:H,highlight:Q="none",valueLabels:U=!1,onSelect:Y,min:B,formatTooltipValue:D,tooltipLabels:O,barGap:W=4,seriesLabels:G=!1,zoomable:I=!0,series:Z,labels:J}){const K=v(),q=m(J.length,I),P=q.view?.[0]??0,X=q.slice(J),_=O?q.slice(O):void 0,tt=Z.map(t=>({...t,data:q.slice(t.data),pointTones:t.pointTones?q.slice(t.pointTones):void 0,pointColors:t.pointColors?q.slice(t.pointColors):void 0})),{highlighted:et}=o(),at=p().charts,it=b(),nt=C??(t=>y(t,it)),ot=D??nt;if(V)/* @__PURE__ */return M(n,{height:$,width:F,variant:"bars",className:A});const lt=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const i=t.pointTones?.[e];return i?f[i]:h(t.slot,t.color,t.tone)},rt=tt.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),st=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},mt=X.map((t,e)=>rt.reduce((t,a)=>t+st(a,e),0)),ut=X.map((t,e)=>rt.reduce((t,a)=>t+Math.max(0,st(a,e)),0)),ct=X.map((t,e)=>rt.reduce((t,a)=>t+Math.min(0,st(a,e)),0)),dt=w&&"percent"===N,ht=(t,e)=>mt[e]>0?t/mt[e]:null,ft=dt?[1]:w?[...ut,...ct]:rt.flatMap(t=>t.data.filter(Number.isFinite)),pt=(t,e)=>{const a=t.bandwidth/Math.max(1,rt.length),i=rt.length>1?Math.min(W,.25*a):0;return{offset:e*a+i/2,width:Math.max(1,a-i)}},bt=G&&!w?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return X.map((i,n)=>rt.map((i,o)=>{const l=i.data[n];if(!Number.isFinite(l))return null;const r=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:s,width:m}=pt(t,o),u=t(n)+s+m/2,c=Math.min(e(r),e(a)),h=Math.max(e(r),e(a));if(m<13)return null;const f=Math.floor((h-c-12)/6.6),p=f>=Math.min(4,i.label.length),b=p&&i.label.length>f?`${i.label.slice(0,f-1).trimEnd()}…`:i.label,x=p?h-6:c-4;/* @__PURE__ */
|
|
2
2
|
return M("text",{"data-series-label":"true",x:u,y:x,transform:`rotate(-90 ${u} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?d.surface:d.label,children:b},`n${i.key}-${n}`)}))}:null;/* @__PURE__ */
|
|
3
3
|
return g(k,{children:[
|
|
4
|
-
/* @__PURE__ */M(s,{labels:
|
|
4
|
+
/* @__PURE__ */M(s,{labels:X,values:ft,height:$,width:F,max:dt?1:j,min:dt?void 0:B,formatValue:dt?t=>x(Math.round(100*t),0,it):nt,yAxisLabel:L,className:A,emptyLabel:z,onSelect:Y?t=>Y(P+t):void 0,zoom:I?q:void 0,ariaLabel:at.acrossCategories(rt.map(t=>t.label),X.length),tooltip:t=>/* @__PURE__ */M(c,{title:_?.[t]??X[t],rows:rt.map(e=>({key:e.key,label:e.label,color:lt(e,t),value:Number.isFinite(e.data[t])?dt?`${x(100*(ht(e.data[t],t)??0),1,it)} · ${ot(e.data[t])}`:ot(e.data[t]):void 0})),footnote:dt?at.inCategory(ot(mt[t])):void 0}),overlay:U&&!dt||bt?({x:t,y:e})=>/* @__PURE__ */g("g",{pointerEvents:"none",children:[bt?.({x:t,y:e}),U&&!dt&&X.map((a,i)=>{if(w){if(!rt.some(t=>Number.isFinite(t.data[i])))return null;const a=rt.reduce((t,e)=>t+st(e,i),0),n=a>=0?ut[i]:ct[i];/* @__PURE__ */
|
|
5
5
|
return M("text",{"data-value-label":"true",x:t.center(i),y:a>=0?e(n)-4:e(n)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(a)},`v${i}`)}return rt.map((a,n)=>{const o=a.data[i];if(!Number.isFinite(o))return null;const l=o,{offset:r,width:s}=pt(t,n);/* @__PURE__ */
|
|
6
|
-
return M("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=
|
|
6
|
+
return M("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=H?X.indexOf(H):-1,c=l(w?mt:rt[0]?.data??[],Q),h=m??(u>=0?u:c);/* @__PURE__ */
|
|
7
7
|
return g("g",{children:[
|
|
8
|
-
/* @__PURE__ */M(t,{id:
|
|
9
|
-
return M("rect",{x:y,y:g,width:v,height:$,rx:
|
|
8
|
+
/* @__PURE__ */M(t,{id:K,glow:S}),X.map((t,l)=>{let s=0,m=0;const u=o(Math.min(o.domain[1],Math.max(o.domain[0],0)));return rt.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const p=dt?ht(f,l):f;if(null===p)return null;const b=lt(t,l),x=pt(n,c),y=w?n(l):n(l)+x.offset,v=w?Math.max(1,n.bandwidth):x.width;let g,k,N=!0;if(w){const t=p>=0?s:m,e=t+p;p>=0?s=e:m=e,g=o(Math.max(t,e)),k=o(Math.min(t,e)),N=0===t}else g=Math.min(o(p),u),k=Math.max(o(p),u);const $=Math.max(0,k-g-(w&&!N?2:0)),F=null===h||h===l,j=F?b:E?d.muted:b,C=r(t.key,et);/* @__PURE__ */
|
|
9
|
+
return M("rect",{x:y,y:g,width:v,height:$,rx:T,fill:j,fillOpacity:C??(F?1:E?.32:.45),filter:S&&h===l?`url(#${i(K)})`:void 0,className:"rosh-viz-mark"+(R?` ${e.rise}`:""),style:R?a(l*(w?1:rt.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==m&&!E&&/* @__PURE__ */M("line",{x1:n.center(m),y1:o(o.domain[1]),x2:n.center(m),y2:s,stroke:d.axis,strokeWidth:1})]})}}),q.view&&/* @__PURE__ */M(u,{from:_?.[0]??X[0],to:_?.at(-1)??X[X.length-1],count:X.length,total:w?ot(mt.reduce((t,e)=>t+e,0)):void 0,rows:rt.map(t=>({s:t,sum:t.data.reduce((e,a,i)=>e+st(t,i),0)})).sort((t,e)=>e.sum-t.sum).map(({s:t,sum:e})=>({key:t.key,label:t.label,color:h(t.slot,t.color,t.tone),value:ot(e)})),onClear:q.clear})]})}export{w as ColumnChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-
|
|
2
|
-
return s(e,{content:z??
|
|
1
|
+
import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const I=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>I,[I]);const C=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),I())},M="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${M} z-10 flex h-2`:`absolute inset-y-0 ${M} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void I();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{N.current&&I()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${M} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${M} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-CVXJKHPD.js";import{Select_default as l}from"./chunk-KITSIQCV.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-ID35S5Y6.js";import{Input_default as c}from"./chunk-PT4GMPUB.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -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-DEJIH3ZQ.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};
|