efficient-shell 12.2.0 → 12.4.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 +40 -1
- package/dist/{Browser-UK645CZ3.js → Browser-Z4Q2NDFT.js} +15 -15
- package/dist/Calculator-AHBFZ4EN.js +29 -0
- package/dist/{CurrencyConverter-XNWE5MQW.js → CurrencyConverter-PZYRBADV.js} +6 -6
- package/dist/Files-EX6JA4CJ.js +121 -0
- package/dist/{Notepad-JP52QKUC.js → Notepad-U4OSPCX3.js} +12 -12
- package/dist/PdfViewer-GUXUWGMG.js +1 -0
- package/dist/{PomodoroTimer-SBV43YX6.js → PomodoroTimer-WGN2KNSB.js} +68 -68
- package/dist/{Preview-TKEDKVNI.js → Preview-JGRBT3EM.js} +56 -56
- package/dist/Sidebar-F7HHC5GY.js +44 -0
- package/dist/{Stock-GODZPUR3.js → Stock-5GEEDQVT.js} +3 -3
- package/dist/{Weather-2IIV4CFT.js → Weather-WMQQXWHH.js} +17 -17
- package/dist/{WorldClock-JW4MLMCB.js → WorldClock-IK3WTHVW.js} +7 -7
- package/dist/ai/index.d.ts +9 -1
- package/dist/ai/index.js +79 -79
- package/dist/apps/ImageAnnotator.d.ts +21 -0
- package/dist/apps/ImageAnnotator.js +2 -0
- 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/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FlowChart.d.ts +25 -0
- package/dist/charts/FlowChart.js +2 -0
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.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/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.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/charts/flowSpec.d.ts +94 -0
- package/dist/charts/flowSpec.js +1 -0
- package/dist/{chunk-NZYI4XV5.js → chunk-2BMGV6DE.js} +5 -5
- package/dist/chunk-2YRLRMZH.js +23 -0
- package/dist/{chunk-VFBBGLRA.js → chunk-3LTZ4N46.js} +13 -13
- package/dist/{chunk-BXZSLRNO.js → chunk-3PWI5IH7.js} +14 -14
- package/dist/{chunk-AJ5NU7UH.js → chunk-3UHTHQGK.js} +8 -8
- package/dist/{chunk-FOTDGSY5.js → chunk-45IVWLKF.js} +1 -1
- package/dist/{chunk-ZUBTNUVE.js → chunk-4ZUV6WQT.js} +1 -1
- package/dist/{chunk-SX5CSXZO.js → chunk-525O4AUQ.js} +2 -2
- package/dist/{chunk-CC42UKIT.js → chunk-54K2ADBT.js} +1 -1
- package/dist/chunk-56GGBTAD.js +3 -0
- package/dist/{chunk-DKUF7BD5.js → chunk-57YY4J6T.js} +1 -1
- package/dist/{chunk-L75RBQFH.js → chunk-5JUG74UR.js} +1 -1
- package/dist/{chunk-I7H3OIYX.js → chunk-5MO5JBBK.js} +1 -1
- package/dist/{chunk-7EK7JNR4.js → chunk-62275PI2.js} +1 -1
- package/dist/{chunk-LUSIZ2BK.js → chunk-6BATVJBA.js} +14 -14
- package/dist/{chunk-YRZP7JN4.js → chunk-6C4T3HRB.js} +18 -18
- package/dist/{chunk-VZLYB5LX.js → chunk-6DZGOGB2.js} +1 -1
- package/dist/{chunk-JCUG572K.js → chunk-6JDR6T4U.js} +1 -1
- package/dist/{chunk-QN56R4V4.js → chunk-6U25ELYF.js} +1 -1
- package/dist/{chunk-GRB4LKZC.js → chunk-75MSXRFY.js} +5 -5
- package/dist/{chunk-GFBQ53WN.js → chunk-7HIHQR3X.js} +1 -1
- package/dist/{chunk-UDL2A2GT.js → chunk-7RRJPNYN.js} +3 -3
- package/dist/{chunk-IRZ6XM5A.js → chunk-A4KQKN32.js} +1 -1
- package/dist/chunk-A6WZF65N.js +22 -0
- package/dist/{chunk-ACNDPAAT.js → chunk-AAIUJJDQ.js} +1 -1
- package/dist/chunk-BG2OL3MO.js +7 -0
- package/dist/{chunk-7ZYEDXZX.js → chunk-BGJMDP6J.js} +1 -1
- package/dist/{chunk-6XC3XX7F.js → chunk-BKKKIHHV.js} +5 -5
- package/dist/{chunk-MKP2HSWX.js → chunk-BQ5CRQYR.js} +3 -3
- package/dist/chunk-BTFBXZS2.js +1 -0
- package/dist/chunk-BUGTNNZQ.js +15 -0
- package/dist/chunk-C57PNNAW.js +13 -0
- package/dist/{chunk-ZACNIKIQ.js → chunk-C5LBNLFJ.js} +1 -1
- package/dist/chunk-CAXOKGMB.js +27 -0
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/chunk-CURXYF2R.js +9 -0
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-DU5IBIZQ.js → chunk-DFYXIW4O.js} +1 -1
- package/dist/{chunk-GZJ5F7SB.js → chunk-DJ2XDBAO.js} +5 -5
- package/dist/{chunk-UDJLRTQB.js → chunk-DNLRUZGS.js} +1 -1
- package/dist/{chunk-J5ISQYVM.js → chunk-DPUM3H5N.js} +1 -1
- package/dist/{chunk-5THF6BJS.js → chunk-DW45EZHA.js} +2 -2
- package/dist/{chunk-LLBH6PHE.js → chunk-EB2UE6ZR.js} +1 -1
- package/dist/{chunk-XBDHRMQI.js → chunk-EEVLRCMA.js} +8 -8
- package/dist/{chunk-Z43XVU2P.js → chunk-EIY6YGEZ.js} +1 -1
- package/dist/{chunk-5F6KJAF3.js → chunk-EUUCNDIS.js} +16 -16
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/chunk-FAERBT6Y.js +1 -0
- package/dist/{chunk-YKHAI5IZ.js → chunk-FLTPVFKA.js} +1 -1
- package/dist/chunk-FPYABAOX.js +69 -0
- package/dist/chunk-FVZXRGVM.js +8 -0
- package/dist/{chunk-GJJKWGBX.js → chunk-G7I255HN.js} +10 -10
- package/dist/{chunk-2YBJQUYQ.js → chunk-GEXETMGL.js} +1 -1
- package/dist/chunk-GUIJCTFJ.js +8 -0
- package/dist/chunk-GZQD6IBV.js +5 -0
- package/dist/{chunk-VW7W6LCV.js → chunk-H6PFTU3L.js} +1 -1
- package/dist/chunk-H7HRYFRQ.js +14 -0
- package/dist/{chunk-SCCAMJB4.js → chunk-HE767CVB.js} +1 -1
- package/dist/{chunk-EEVKJJ5S.js → chunk-I5BS6AP6.js} +4 -4
- package/dist/chunk-I5CSYOOZ.js +28 -0
- package/dist/{chunk-HB2XXIQG.js → chunk-I64TVNHS.js} +6 -6
- package/dist/{chunk-BFA5U5JF.js → chunk-IFQXTIMY.js} +12 -12
- package/dist/chunk-IHPAYSTJ.js +8 -0
- package/dist/{chunk-QTMRW6DK.js → chunk-IXBKWVEP.js} +1 -1
- package/dist/{chunk-TTSZSLQL.js → chunk-J53LQWWY.js} +1 -1
- package/dist/chunk-JM2IQC4J.js +11 -0
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-CRU2BNEM.js → chunk-KDTL6VEC.js} +3 -3
- package/dist/{chunk-CKURTHGW.js → chunk-KQDSAN75.js} +1 -1
- package/dist/{chunk-2XQOK3CT.js → chunk-KUEYOJBN.js} +2 -2
- package/dist/{chunk-ORLQUGIN.js → chunk-LCC3NXQX.js} +6 -6
- package/dist/{chunk-7JGR7WPD.js → chunk-LFYZ7NQ4.js} +3 -3
- package/dist/{chunk-ONYPN3JY.js → chunk-LGK47SEN.js} +11 -11
- package/dist/chunk-M54OL3YR.js +2 -0
- package/dist/chunk-MGW7SX53.js +11 -0
- package/dist/{chunk-VGWYAYHB.js → chunk-MOMOZVOW.js} +3 -3
- package/dist/{chunk-2DOMIOYR.js → chunk-N442GPRJ.js} +1 -1
- package/dist/{chunk-BXZNMSTZ.js → chunk-N6Q7HNAH.js} +1 -1
- package/dist/{chunk-RXHTIJ64.js → chunk-N7JX27JE.js} +1 -1
- package/dist/{chunk-ZYFBV4C7.js → chunk-N7YHXL2F.js} +2 -2
- package/dist/{chunk-27XV4TAU.js → chunk-ND5IZ37V.js} +5 -5
- package/dist/{chunk-2OMM2AG3.js → chunk-NEAT7BIP.js} +1 -1
- package/dist/{chunk-ESDWHHQY.js → chunk-NEYHBQLG.js} +3 -3
- package/dist/{chunk-CRB5GM4W.js → chunk-NIBE57KV.js} +1 -1
- package/dist/{chunk-NHBDLW52.js → chunk-NS37Y5CN.js} +3 -3
- package/dist/chunk-OLVKHYHV.js +9 -0
- package/dist/{chunk-FWUXYNWF.js → chunk-OY3JH66O.js} +4 -4
- package/dist/{chunk-DSHEOC2O.js → chunk-PIWC3CAC.js} +1 -1
- package/dist/chunk-PMJMYH5O.js +5 -0
- package/dist/{chunk-PXIP246B.js → chunk-PT77FC5X.js} +1 -1
- package/dist/chunk-PVXX77MY.js +6 -0
- package/dist/{chunk-HS4EWT6L.js → chunk-QIUIP6YZ.js} +2 -2
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-FAIHSCOG.js → chunk-RBMZSZOH.js} +1 -1
- package/dist/{chunk-5V6SA77P.js → chunk-RFKCSRJX.js} +5 -5
- package/dist/chunk-RJ3J4BLH.js +1 -0
- package/dist/{chunk-63QLZYMN.js → chunk-RNQBWWYR.js} +3 -3
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-B5OYS65L.js → chunk-RVQUSPXC.js} +1 -1
- package/dist/chunk-SBZCJNNP.js +11 -0
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/chunk-TQWLJ5VM.js +7 -0
- package/dist/{chunk-RM74EAMV.js → chunk-TS36J7RW.js} +2 -2
- package/dist/{chunk-ANSQT5ZS.js → chunk-TTQ7K4AJ.js} +1 -1
- package/dist/{chunk-AQULCKKZ.js → chunk-UDHJTQBA.js} +11 -11
- package/dist/chunk-UDVQORQM.js +19 -0
- package/dist/chunk-UGOJLNYR.js +1 -0
- package/dist/{chunk-MRFNJZRR.js → chunk-UIWGVOFH.js} +8 -4
- package/dist/chunk-UJJXWLHE.js +2 -0
- package/dist/{chunk-CF4YOJUQ.js → chunk-UPTKROT7.js} +9 -9
- package/dist/{chunk-7F4U43YN.js → chunk-UVBX5LEU.js} +4 -4
- package/dist/{chunk-M7DFM2N7.js → chunk-UWF45S5L.js} +61 -61
- package/dist/chunk-VIOILTE4.js +13 -0
- package/dist/{chunk-HTDZ3XAJ.js → chunk-VWQNCYGQ.js} +8 -8
- package/dist/{chunk-CTW2OKYS.js → chunk-VYMM2BPX.js} +2 -2
- package/dist/{chunk-HNQKXOFU.js → chunk-WCPAQHHA.js} +1 -1
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/{chunk-CENTHUBD.js → chunk-WUGQAZMC.js} +6 -6
- package/dist/{chunk-XQUXL75F.js → chunk-X32TVINY.js} +1 -1
- package/dist/{chunk-QBD7V4TK.js → chunk-XK4SMAVR.js} +1 -1
- package/dist/{chunk-ZG3RF2VE.js → chunk-XK4U5MAS.js} +3 -3
- package/dist/{chunk-JCTOQOVO.js → chunk-XMH2JOZ2.js} +1 -1
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-LOEOCZCN.js → chunk-Y4RERPFN.js} +1 -1
- package/dist/chunk-YMAU4EIK.js +9 -0
- package/dist/{chunk-XARBHOEZ.js → chunk-YRJJKF5H.js} +1 -1
- package/dist/{chunk-VQPZDZ3R.js → chunk-YU6KOO6O.js} +4 -4
- package/dist/chunk-YZR4T5FZ.js +7 -0
- package/dist/{chunk-NC36LJCA.js → chunk-ZB2H2JJ2.js} +4 -4
- package/dist/{chunk-FLYOI6EW.js → chunk-ZOZEQZUA.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.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.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Segmented.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/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/index.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 +4 -19
- package/dist/index.js +666 -666
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.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/PageHeader.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.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/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.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/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/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +10 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6XGTP5OQ.js +0 -29
- package/dist/Files-LVZNO6EQ.js +0 -121
- package/dist/PdfViewer-ZI3QOG4G.js +0 -1
- package/dist/Sidebar-XVVZJ7PR.js +0 -44
- package/dist/chunk-2T7MZ77B.js +0 -3
- package/dist/chunk-4RTDZSGH.js +0 -27
- package/dist/chunk-56ESGDIC.js +0 -5
- package/dist/chunk-5N6AC3LN.js +0 -15
- package/dist/chunk-A2ZEGD2S.js +0 -11
- package/dist/chunk-AJO55X66.js +0 -6
- package/dist/chunk-BD4OHYQB.js +0 -13
- package/dist/chunk-BPECY7I7.js +0 -13
- package/dist/chunk-CQCMJHDM.js +0 -9
- package/dist/chunk-CWTY4GTU.js +0 -5
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-FEJFGFPF.js +0 -8
- package/dist/chunk-FUUJJ7OH.js +0 -7
- package/dist/chunk-GGSPY3Q4.js +0 -23
- package/dist/chunk-GIUX7WUS.js +0 -7
- package/dist/chunk-GMLGR4R6.js +0 -8
- package/dist/chunk-HFDSKCPL.js +0 -1
- package/dist/chunk-HGZZXA2N.js +0 -9
- package/dist/chunk-HICNRXYB.js +0 -11
- package/dist/chunk-HY3JYAUH.js +0 -19
- package/dist/chunk-KHVECW4M.js +0 -7
- package/dist/chunk-LE5LWALR.js +0 -1
- package/dist/chunk-LJJSFJA2.js +0 -69
- package/dist/chunk-NPQBJJLP.js +0 -9
- package/dist/chunk-PKNHSZWK.js +0 -8
- package/dist/chunk-UE54EN4C.js +0 -2
- package/dist/chunk-UVEHJRPE.js +0 -1
- package/dist/chunk-VPYD7UJM.js +0 -22
- package/dist/chunk-WD3I7AEZ.js +0 -14
- package/dist/chunk-YAD7TML2.js +0 -28
- /package/dist/{chunk-C4XV42QP.js → chunk-2762IAB7.js} +0 -0
- /package/dist/{chunk-MXK7A6ZM.js → chunk-T75VCE6K.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BoxPlotChart as default}from"../chunk-
|
|
1
|
+
export{BoxPlotChart as default}from"../chunk-XK4U5MAS.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CandlestickChart as default}from"../chunk-
|
|
1
|
+
export{CandlestickChart as default}from"../chunk-NEYHBQLG.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CartesianPlot as default}from"../chunk-
|
|
2
|
+
export{CartesianPlot as default}from"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ChartTooltip as default}from"../chunk-
|
|
1
|
+
export{ChartTooltip as default}from"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChordChart as default,foldChord}from"../chunk-
|
|
2
|
+
export{ChordChart as default,foldChord}from"../chunk-FVZXRGVM.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColumnChart as default}from"../chunk-
|
|
2
|
+
export{ColumnChart as default}from"../chunk-75MSXRFY.js";import"../chunk-465RRWBY.js";import"../chunk-DZBGJ6X4.js";import"../chunk-CNYAHYE6.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { FlowSpec } from './flowSpec.js';
|
|
3
|
+
|
|
4
|
+
interface FlowChartLabels {
|
|
5
|
+
downloadPng: string;
|
|
6
|
+
downloadSvg: string;
|
|
7
|
+
toPdf: string;
|
|
8
|
+
}
|
|
9
|
+
declare const DEFAULT_FLOW_CHART_LABELS: FlowChartLabels;
|
|
10
|
+
interface FlowChartProps {
|
|
11
|
+
spec: FlowSpec;
|
|
12
|
+
labels?: Partial<FlowChartLabels>;
|
|
13
|
+
/** Asks for the same flow in a PDF; without it there is no such button. */
|
|
14
|
+
onToPdf?: () => void;
|
|
15
|
+
/** Without the buttons, for a print or a preview. */
|
|
16
|
+
bare?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/** A file name from the title: "Placing a sales order" → "placing-a-sales-order". */
|
|
20
|
+
declare function flowFileName(spec: FlowSpec, ext: 'png' | 'svg'): string;
|
|
21
|
+
/** The steps in order, said in words: the drawing's text equivalent. */
|
|
22
|
+
declare function flowDescription(spec: FlowSpec): string;
|
|
23
|
+
declare function FlowChart({ spec, labels, onToPdf, bare, className }: FlowChartProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { DEFAULT_FLOW_CHART_LABELS, type FlowChartLabels, type FlowChartProps, FlowChart as default, flowDescription, flowFileName };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export{DEFAULT_FLOW_CHART_LABELS,FlowChart as default,flowDescription,flowFileName}from"../chunk-JM2IQC4J.js";import"../chunk-FAERBT6Y.js";import"../chunk-UJJXWLHE.js";import"../chunk-XWFLIGDQ.js";import"../chunk-UIWGVOFH.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{FunnelChart as default}from"../chunk-
|
|
2
|
+
export{FunnelChart as default}from"../chunk-H7HRYFRQ.js";import"../chunk-CNYAHYE6.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{HeatmapChart as default}from"../chunk-
|
|
2
|
+
export{HeatmapChart as default}from"../chunk-SBZCJNNP.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HistogramChart as default}from"../chunk-
|
|
1
|
+
export{HistogramChart as default}from"../chunk-M54OL3YR.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/PieChart.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{PieChart as default}from"../chunk-
|
|
2
|
+
export{PieChart as default}from"../chunk-3UHTHQGK.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-
|
|
2
|
+
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-BUGTNNZQ.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RadialBarChart as default}from"../chunk-
|
|
2
|
+
export{RadialBarChart as default}from"../chunk-DJ2XDBAO.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RangeChart as default}from"../chunk-
|
|
1
|
+
export{RangeChart as default}from"../chunk-DW45EZHA.js";import"../chunk-VFC6QUEN.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SankeyChart as default}from"../chunk-
|
|
2
|
+
export{SankeyChart as default}from"../chunk-OLVKHYHV.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-
|
|
2
|
+
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-IHPAYSTJ.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/SpecChart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SpecChart as default}from"../chunk-
|
|
1
|
+
export{SpecChart as default}from"../chunk-62275PI2.js";import"../chunk-GEYM4WN3.js";import"../chunk-Y3JW2GW5.js";import"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";import"../chunk-A6WZF65N.js";import"../chunk-WMLBMR4E.js";import"../chunk-CK2YOGUS.js";import"../chunk-7H7U3HC6.js";import"../chunk-VFC6QUEN.js";import"../chunk-75MSXRFY.js";import"../chunk-465RRWBY.js";import"../chunk-DZBGJ6X4.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SunburstChart as default}from"../chunk-
|
|
2
|
+
export{SunburstChart as default}from"../chunk-7RRJPNYN.js";import"../chunk-EYPKBJYG.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TimeSeriesChart as default}from"../chunk-
|
|
2
|
+
export{TimeSeriesChart as default}from"../chunk-A6WZF65N.js";import"../chunk-WMLBMR4E.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-DZBGJ6X4.js";import"../chunk-CNYAHYE6.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TreemapChart as default}from"../chunk-
|
|
2
|
+
export{TreemapChart as default}from"../chunk-TQWLJ5VM.js";import"../chunk-46BYGPGD.js";import"../chunk-EYPKBJYG.js";import"../chunk-CNYAHYE6.js";import"../chunk-CJH2BGXY.js";import"../chunk-QQ2LDC6C.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MAFUXCPZ.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{WaterfallChart as default}from"../chunk-
|
|
1
|
+
export{WaterfallChart as default}from"../chunk-NS37Y5CN.js";import"../chunk-525O4AUQ.js";import"../chunk-BFO72WQB.js";import"../chunk-MAFUXCPZ.js";import"../chunk-2JWPNR2U.js";import"../chunk-WDQI3FV6.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-43MCNASD.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A flowchart described as data — what the assistant writes inside a
|
|
3
|
+
* ` ```flow ` fence when it is asked to draw a workflow, a process or the
|
|
4
|
+
* steps of something (Victor Mau, 2026-11-04: asked for "the svg for the
|
|
5
|
+
* workflow of how to place a sales order", JARVIS said the drawing was above
|
|
6
|
+
* and there was nothing there, because the thread drew charts only).
|
|
7
|
+
*
|
|
8
|
+
* ```flow
|
|
9
|
+
* {"title": "Placing a sales order",
|
|
10
|
+
* "nodes": [{"id": "a", "label": "Draft order", "note": "status: draft"},
|
|
11
|
+
* {"id": "b", "label": "Approval needed?", "kind": "decision"},
|
|
12
|
+
* {"id": "c", "label": "Confirm order"}],
|
|
13
|
+
* "edges": [{"from": "a", "to": "b"}, {"from": "b", "to": "c", "label": "no"}]}
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Strict and total like `chartSpec.ts`: anything it cannot read in full is
|
|
17
|
+
* `null`, and the caller shows the fence as the code block it was written as.
|
|
18
|
+
* An edge to a node that is not there, two nodes with one id, a label too long
|
|
19
|
+
* to draw: each is a malformed spec, never a guess.
|
|
20
|
+
*
|
|
21
|
+
* `layoutFlow` places it, deterministically and without measuring text, so a
|
|
22
|
+
* server can draw the same picture into a PDF from the same spec: steps go
|
|
23
|
+
* along rows of `FLOW_LAYOUT.columns`, left to right and then back, the way
|
|
24
|
+
* the eye follows a process on a page; nodes of the same step stack in one
|
|
25
|
+
* cell; an edge to the next step runs straight, and any other edge (one that
|
|
26
|
+
* skips a step, or goes back to an earlier one) runs in the gap under a row or
|
|
27
|
+
* round the left margin, so no line crosses a box.
|
|
28
|
+
*/
|
|
29
|
+
declare const FLOW_SPEC_LIMITS: {
|
|
30
|
+
readonly nodes: 16;
|
|
31
|
+
readonly edges: 30;
|
|
32
|
+
readonly label: 40;
|
|
33
|
+
readonly note: 30;
|
|
34
|
+
readonly edgeLabel: 16;
|
|
35
|
+
readonly title: 80;
|
|
36
|
+
};
|
|
37
|
+
type FlowNodeKind = 'step' | 'decision' | 'start' | 'end';
|
|
38
|
+
interface FlowNode {
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
note?: string;
|
|
42
|
+
kind: FlowNodeKind;
|
|
43
|
+
}
|
|
44
|
+
interface FlowEdge {
|
|
45
|
+
from: string;
|
|
46
|
+
to: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
}
|
|
49
|
+
interface FlowSpec {
|
|
50
|
+
title?: string;
|
|
51
|
+
nodes: FlowNode[];
|
|
52
|
+
edges: FlowEdge[];
|
|
53
|
+
}
|
|
54
|
+
/** The spec in a ` ```flow ` fence, or `null` when it is not one in full. */
|
|
55
|
+
declare function parseFlowSpec(source: string): FlowSpec | null;
|
|
56
|
+
/** The fixed geometry: the chat column is ~640px, four steps to a row. */
|
|
57
|
+
declare const FLOW_LAYOUT: {
|
|
58
|
+
readonly columns: 4;
|
|
59
|
+
readonly boxWidth: 136;
|
|
60
|
+
readonly boxHeight: 52;
|
|
61
|
+
readonly decisionHeight: 72;
|
|
62
|
+
readonly columnGap: 28;
|
|
63
|
+
readonly rowGap: 56;
|
|
64
|
+
readonly stackGap: 16;
|
|
65
|
+
readonly margin: 24;
|
|
66
|
+
readonly lineChars: 20;
|
|
67
|
+
};
|
|
68
|
+
interface PlacedNode extends FlowNode {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
/** The label in at most two lines. */
|
|
74
|
+
lines: string[];
|
|
75
|
+
rank: number;
|
|
76
|
+
}
|
|
77
|
+
interface PlacedEdge extends FlowEdge {
|
|
78
|
+
/** Polyline through these points, ending at the target's border. */
|
|
79
|
+
points: [number, number][];
|
|
80
|
+
/** Where its label sits, when it has one. */
|
|
81
|
+
labelAt?: [number, number];
|
|
82
|
+
}
|
|
83
|
+
interface FlowLayout {
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
nodes: PlacedNode[];
|
|
87
|
+
edges: PlacedEdge[];
|
|
88
|
+
}
|
|
89
|
+
/** A label in at most two lines of about `lineChars`, split at a space. */
|
|
90
|
+
declare function wrapLabel(label: string, lineChars?: number): string[];
|
|
91
|
+
/** Where every node and edge of `spec` is drawn. */
|
|
92
|
+
declare function layoutFlow(spec: FlowSpec): FlowLayout;
|
|
93
|
+
|
|
94
|
+
export { FLOW_LAYOUT, FLOW_SPEC_LIMITS, type FlowEdge, type FlowLayout, type FlowNode, type FlowNodeKind, type FlowSpec, type PlacedEdge, type PlacedNode, layoutFlow, parseFlowSpec, wrapLabel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec,wrapLabel}from"../chunk-FAERBT6Y.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{IconButton_default as e}from"./chunk-UGOJLNYR.js";import{CloseGlyph as t}from"./chunk-XK4SMAVR.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-7KIDOIPY.js";import{Button_default as s}from"./chunk-UJJXWLHE.js";import{Icon as i}from"./chunk-UIWGVOFH.js";import{useShellStrings as c}from"./chunk-43MCNASD.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
5
|
-
/* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function f({files:
|
|
5
|
+
/* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function f({files:e,onRemove:r,disabled:a=!1,className:s=""}){const i=c().files,m=l(/* @__PURE__ */new Map);o(()=>{const t=new Set(e);for(const[e,n]of m.current)t.has(e)||(URL.revokeObjectURL(n),m.current.delete(e))},[e]),o(()=>()=>{for(const e of m.current.values())URL.revokeObjectURL(e);m.current.clear()},[]);const h=e=>{if(!e.type.startsWith("image/")||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return null;let t=m.current.get(e);return t||(t=URL.createObjectURL(e),m.current.set(e,t)),t};return 0===e.length?null:/* @__PURE__ */d("ul",{className:`flex flex-wrap gap-2 ${s}`,children:e.map((e,s)=>{const c=h(e);/* @__PURE__ */
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-line bg-surface-sunken py-1 pl-2 pr-1 text-xs text-ink",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
|
-
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:
|
|
8
|
-
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(
|
|
9
|
-
/* @__PURE__ */d(
|
|
7
|
+
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e.name,children:e.name}),
|
|
8
|
+
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(e.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(e.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(t,{className:"h-3.5 w-3.5"})})]},`${e.name}-${e.size}-${s}`)})})}function b({onClick:t,count:n=0,variant:r="button",label:a,disabled:i=!1}){const l=c().files,o=a??l.attach,p=n>0?`${o} (${n})`:o;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
+
/* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
|
|
10
10
|
/* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
12
|
/* @__PURE__ */d(b,{onClick:L.open,count:e.length,variant:g,label:x,disabled:m}),k]}),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{Calendar as e}from"./chunk-LGK47SEN.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-GZQD6IBV.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{Icon as u}from"./chunk-UIWGVOFH.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{buttonClasses as b}from"./chunk-UQYNPYF4.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-43MCNASD.js";import{useState as w,useRef as N,useId as k,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as D,Fragment as W,jsx as j}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],Y=t;function F(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function S(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function O(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var H=/* @__PURE__ */new Map;function L({from:t,to:n,onChange:m,formatDisplay:Y,clearable:L,required:G=!1,name:B,id:E,"aria-labelledby":I,"aria-label":T,weekStartsOn:U,placeholder:A,fullWidth:J=!1,min:R,max:q,disabled:V=!1,allowOpenEnd:Z=!1}){const K=v().dateRange,P=y(),Q=Y??(P?function(e){let t=H.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),H.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(P):O),z=A??K.placeholder,X=L??!G,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=N(null),de=N(null),me=N(null),ue=k(),he=k(),pe=k(),[fe,ge]=w(!1),be=f(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=N(null),ve=N(null),[ye,we]=w(!0);g(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const Ne=N(null);g(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==Ne.current&&Ne.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;Ne.current=e,e>r+.5&&ge(!0)}});const[ke,Ce]=w(!1);g(()=>{const e=!!E&&(de.current?.labels?.length??0)>0;e!==ke&&Ce(e)});const Me=!!T||!!I||ke,De=/* @__PURE__ */new Date,[We,je]=w(()=>t?t.slice(0,7):S(De,R,q)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(F(e,De),R,q)),Ye=e=>e?Q(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=h(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{V&&ee(!1)},[V]);const Fe=()=>{m("",""),ee(!1)},Se=X&&!V&&Boolean(t||n),Oe=t&&n?`${Ye(t)} — ${Ye(n)}`:t?K.fromOnly(Ye(t)):n?K.toOnly(Ye(n)):"",He=d(P),Le=e=>{const t=r(e);return t?He.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Ge=t&&n?K.range(Le(t),Le(n)):t?K.fromOnly(Le(t)):n?K.toOnly(Le(n)):z,Be=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Ee=/* @__PURE__ */D(W,{children:[$e.map(e=>/* @__PURE__ */j("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=F(e,De);re(t.from),ae(t.to),le(e),je(t.from.slice(0,7))})(e),className:Be(e),"aria-label":fe?K[e]:void 0,children:fe?ye?K[e]:K[`${e}Short`]:K[e]},e)),
|
|
2
|
+
/* @__PURE__ */j("button",{type:"button",onClick:()=>le("Custom"),className:Be("Custom"),children:K.custom})]}),Ie=(e,t)=>Z?/* @__PURE__ */j("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */j("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Te=e=>Z&&ie===e?" ring-1 ring-blue-400":"",Ue=
|
|
3
|
+
/* @__PURE__ */j(e,{mode:"range",min:R,max:q,value:te||null,endValue:ne||null,month:We,onMonthChange:je,onSelect:e=>{le("Custom"),Z?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:U,"aria-label":K.dialog});/* @__PURE__ */
|
|
4
|
+
return D("div",{className:"relative"+(J?" w-full":""),ref:ce,children:[
|
|
5
|
+
/* @__PURE__ */D("div",{className:`relative ${J?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Se?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${V?" cursor-not-allowed opacity-60":""}`,children:[
|
|
6
|
+
/* @__PURE__ */D("button",{ref:de,type:"button",onClick:()=>{V||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),je(t?t.slice(0,7):S(De,R,q)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:E,disabled:V||void 0,"aria-label":T,"aria-labelledby":I,"aria-describedby":[Me?he:void 0,G?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(J?" min-w-0 flex-1 justify-start":""),children:[
|
|
7
|
+
/* @__PURE__ */j(u,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
|
|
8
|
+
/* @__PURE__ */j("span",{className:"truncate",children:Oe||z})]}),Se&&/* @__PURE__ */j(o,{children:/* @__PURE__ */j(l,{action:{label:K.clearRange,icon:/* @__PURE__ */j(u,{name:"close"}),onClick:Fe}})})]}),Me&&/* @__PURE__ */j("span",{id:he,className:"sr-only",children:Ge}),G&&/* @__PURE__ */j("span",{id:pe,className:"sr-only",children:K.required}),B&&/* @__PURE__ */D(W,{children:[
|
|
9
|
+
/* @__PURE__ */j("input",{type:"hidden",name:B.from,value:t,disabled:V||void 0}),
|
|
10
|
+
/* @__PURE__ */j("input",{type:"hidden",name:B.to,value:n,disabled:V||void 0})]}),_&&M(
|
|
11
|
+
/* @__PURE__ */D("div",{ref:me,id:ue,role:"dialog","aria-label":K.dialog,"data-layout":fe?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:p.popup,left:be?.left,right:be?.right,top:be?.top,bottom:be?.bottom,width:fe&&be?be.maxWidth:"max-content",maxWidth:be?.maxWidth,maxHeight:be?.maxHeight,overflowY:"auto",visibility:be?void 0:"hidden",...x()},children:[
|
|
12
|
+
/* @__PURE__ */D("div",{className:fe?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Ie("from",/* @__PURE__ */D(W,{children:[
|
|
13
|
+
/* @__PURE__ */j("span",{className:"text-xs font-medium text-gray-500",children:K.from}),
|
|
14
|
+
/* @__PURE__ */j("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Te("from")}`,children:te?Ye(te):K.start})]})),!fe&&/* @__PURE__ */j("span",{className:"text-gray-300",children:"—"}),Ie("to",/* @__PURE__ */D(W,{children:[
|
|
15
|
+
/* @__PURE__ */j("span",{className:"text-xs font-medium text-gray-500",children:K.to}),
|
|
16
|
+
/* @__PURE__ */j("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Te("to")}`,children:ne?Ye(ne):K.end})]}))]}),fe?/* @__PURE__ */D(W,{children:[$e.length>0&&/* @__PURE__ */D("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */j("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:K.lastHeading}),
|
|
17
|
+
/* @__PURE__ */D("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ee,$e.map(e=>/* @__PURE__ */j("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:K[e]},e))]})]}),
|
|
18
|
+
/* @__PURE__ */j("div",{className:"w-full",children:Ue})]}):
|
|
19
|
+
/* @__PURE__ */D("div",{ref:xe,className:"flex w-max gap-4",children:[
|
|
20
|
+
/* @__PURE__ */j("div",{className:"w-64",children:Ue}),$e.length>0&&/* @__PURE__ */j("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ee})]}),
|
|
21
|
+
/* @__PURE__ */D("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */j("button",{type:"button",onClick:Fe,className:b({variant:"ghost"}),children:K.clear}),
|
|
22
|
+
/* @__PURE__ */j("button",{type:"button",onClick:()=>ee(!1),className:b({variant:"secondary"}),children:K.cancel}),
|
|
23
|
+
/* @__PURE__ */j("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:Z?!te&&!ne:!te||!ne,className:b({variant:"primary"}),children:K.apply})]})]}),document.body)]})}export{L as DateRangePicker,F as presetRange,Y as toISODate};
|
|
@@ -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-4UGFNTZ3.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-
|
|
2
|
-
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:
|
|
3
|
-
/* @__PURE__ */h("button",{type:"button",onClick:
|
|
4
|
-
/* @__PURE__ */b("span",{children:
|
|
5
|
-
/* @__PURE__ */b("b",{className:"font-medium",children:N(
|
|
6
|
-
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-4UGFNTZ3.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-UIWGVOFH.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-43MCNASD.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 x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),C=x.length?Math.min(...x):S,D=x.length?Math.max(...x):S,P=a(r??null)??C,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,D,q,P+i];return O||e.push(S),Math.max(...e)})(),A=Math.max(1,Math.round((T-P)/i)),I=a(p??null)??D??P,L=Math.min(Math.max(y??I,P),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){$=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(P).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),G=j??F,z=j?a(j.date):F?P:null,H=$?a($.date):null,J=!!(G&&$&&null!=z&&null!=H&&L>z&&L<H);let U,Z;if(J&&null!=z&&null!=H){const e=(L-z)/Math.max(H-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of G?.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(G?.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):G?.est_completion_date||$?.est_completion_date||null,U={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Z=G}else if(U=G??t[t.length-1]??null,U){const e=t.findIndex(e=>e.id===U.id);Z=e>=0&&e<t.length-1?t[e+1]:null}else Z=null;const B={};for(const e of Z?.items??[])B[e.part_number]=e;const E=!(!d||U?.id===d),K=d?Math.min(a(p??null)??T,T):T,Q=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:P,endMs:T,totalLeadDays:A,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:E,beforeAnchor:G,nextAfter:$,displayed:U,prevReport:Z,prevByPN:B,isInterpolated:J,playing:v,startPlay:()=>{if(v)return void N();if(K<=P)return void f(K);M(!0),f(P);let e=performance.now(),t=P;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:Q,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),x=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})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),C=N.map(({ms:e})=>e),D=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:x,markers:D,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:C,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:x,variant:S="card",onPlayStart:C}){const{reports:D,markers:P,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:A,setScrubMs:I,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:G,estCompletionMs:z}=n,H=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)}}}(D.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),I,C),J=c().production,U=d(),Z=_??J.heading,B=e=>o(e,U);if(0===D.length&&0===P.length)return null;const E=P.filter(e=>"shipment"===e.kind),K=P.filter(e=>"inspection"===e.kind),Q=P.filter(e=>"invoice"===e.kind),V=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),W=L?v(L):0,X=D.find(e=>e.id===F),Y=X?N(X):G,ee=
|
|
3
|
+
/* @__PURE__ */h("button",{type:"button",onClick:H.toggle,"aria-pressed":H.playing,title:H.playing?J.pause:J.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[H.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */b("span",{children:H.playing?J.pause:J.play})]}),te=j&&(x??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{H.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??J.backTo(String(Y))}):null,[re,ne]=p(J.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
|
|
5
|
+
/* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
|
|
6
|
+
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",B(new Date(L.date).getTime())," · ",J.overall(Math.round(W))," · ",J.inStock(V)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:J.noReport})});if("rail"===S){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:J.estimatedCompletion,dateText:B(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:D,markers:P,valueMs:A,activeId:L?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??J.start,end:M?.end??(e?J.estDone:void 0)},onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:H.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:Z,subject:R,meta:[`${B(O)} → ${B(q)}`,J.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:[D.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"}),J.report]}),E.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"})}),J.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"})}),J.inspection]}),Q.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"})}),J.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:D,markers:P,valueMs:A,activeId:L?.id??"",onChange:I,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:H.stop,playback:{playing:H.playing,onArrive:(e,t)=>I(t),onProgress:f,onStop:H.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-
|
|
1
|
+
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-UIWGVOFH.js";import{TH_ONE_LINE as n}from"./chunk-CJH2BGXY.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-43MCNASD.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),C=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:S,allColumns:_,onResizeStart:z,onDragStart:$,onDragOver:I,onDrop:A,onDragEnd:B,toggleColumn:G,resetColumns:L,draggedIdx:P,dropGap:R}=t(f,C),{hasAnyPerm:T}=r(),U=i().columns,[W,Y]=c(!1),[E,F]=c(!1),[H,J]=c(!1),K=m(null),O=k.length>0&&T(k);e(K,h(()=>{W&&Y(!1)},[W]));const X=S.reduce((e,t)=>e+t.width,0),M=S.map(e=>`${e.width}px`),Q={tableLayout:"fixed",width:X,minWidth:"100%"},V=m(null),Z=h(e=>{const t=V.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
|
|
2
2
|
return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
|
|
3
|
-
/* @__PURE__ */p("div",{ref:
|
|
4
|
-
/* @__PURE__ */p("colgroup",{children:
|
|
5
|
-
/* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:
|
|
6
|
-
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${
|
|
7
|
-
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:
|
|
9
|
-
/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:
|
|
10
|
-
/* @__PURE__ */p("colgroup",{children:
|
|
3
|
+
/* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
|
|
4
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),
|
|
5
|
+
/* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:S.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
|
|
6
|
+
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${P===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>$(t),onDragOver:a?void 0:e=>I(t,e),onDrop:a?void 0:e=>A(t,e),onDragEnd:a?void 0:B,style:a?void 0:{cursor:"grab"},children:[
|
|
7
|
+
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),R===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===S.length-1&&R===S.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
|
|
8
|
+
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:Z,children:[
|
|
9
|
+
/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
|
|
10
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),N(S)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
|
|
11
11
|
/* @__PURE__ */p("span",{children:b}),
|
|
12
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:
|
|
13
|
-
/* @__PURE__ */p("button",{onClick:
|
|
14
|
-
/* @__PURE__ */p("button",{onClick:()=>
|
|
15
|
-
/* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:
|
|
16
|
-
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>
|
|
12
|
+
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:K,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?U.hideSelection:U.showSelection,children:D?U.selectDone:U.select}),
|
|
13
|
+
/* @__PURE__ */p("button",{onClick:L,className:"text-2xs text-ink-faintest hover:text-gray-600",children:U.reset}),
|
|
14
|
+
/* @__PURE__ */p("button",{onClick:()=>Y(!W),className:"text-gray-400 hover:text-gray-600",title:U.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),W&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
|
|
15
|
+
/* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:U.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
|
|
16
|
+
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>G(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),O&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{F(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),J(!0),setTimeout(()=>J(!1),2e3)}catch{}F(!1)},disabled:E,className:"text-2xs w-full text-center py-1 rounded "+(H?"text-green-600":"text-ink-faint hover:text-blue-600"),children:E?"...":H?U.savedDefault:U.saveDefault})})]})]})]})]})}export{f as ResizableTable};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{
|
|
2
|
-
return g("div",{className:`relative ${
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-43MCNASD.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:F=!0,labels:S="none",labelMinShare:w=.04,className:A,emptyLabel:C}){const P=h().charts,W=c(),R=$??(e=>u(e,W)),z=I??P.other,E=C??P.nothingToBreakDown,T=d(),[V,_]=f(null),{highlighted:L}=a(),U=y(null),Y=r(U,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${A??""}`,children:E});const D=[...B].sort((e,t)=>t.value-e.value),O=D.slice(0,N),Q=D.slice(N),H=Q.length>0?[...O,{key:"__other__",label:z,value:Q.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:O,Z=e=>i(e.slot,e.color,e.tone),q=H.reduce((e,t)=>e+t.value,0),J=Math.ceil(.62*Math.max(...H.map(e=>String(e.label).length),4)*11)+24,X="outside"===S&&Y>=120+2*J,G=X?J:0,K=X?Math.max(120,Math.min(k,Y-2*G)):k,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(H.length,b),oe=Math.max(...H.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!X)return[];let e=-Math.PI/2;const t=H.map((t,l)=>{const a="rose"===v?n(H.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(H.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=w),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==V?V!==e:null!==L&&L!==t,me=null!==V?H[V]:void 0;/* @__PURE__ */
|
|
2
|
+
return g("div",{className:`relative ${A??""}`,ref:U,children:[
|
|
3
3
|
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":T,onMouseLeave:()=>_(null),children:[
|
|
4
|
-
/* @__PURE__ */p("title",{id:T,children:P.breakdown(
|
|
5
|
-
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:
|
|
4
|
+
/* @__PURE__ */p("title",{id:T,children:P.breakdown(R(q),H.length)}),H.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
+
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?t.sweep:void 0,style:F?l(r,55):void 0,onMouseEnter:()=>_(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
6
|
return g("g",{children:[
|
|
7
7
|
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
8
|
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
-
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,
|
|
10
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
11
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:
|
|
9
|
+
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,W)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==V&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(o,{title:me.label,rows:[{key:"value",label:P.value,color:Z(me),value:R(me.value)},{key:"share",label:P.share,color:s.muted,value:m(me.value/q*100,1,W)}]})}),
|
|
10
|
+
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:H.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
|
+
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Z(e)}}),
|
|
12
12
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/
|
|
13
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/q*100,1,W)})]},e.key))})]})}export{x as PieChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Breadcrumbs as e}from"./chunk-
|
|
1
|
+
import{Breadcrumbs as e}from"./chunk-PT77FC5X.js";import{jsxs as t,jsx as s}from"react/jsx-runtime";function i({title:i,description:r,subtitle:c,actions:a,children:n,icon:l,breadcrumbs:m}){const d=r??c,h=a??n;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:"mb-6",children:[m&&m.length>0&&/* @__PURE__ */s(e,{items:m,className:"mb-3"}),
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */t("div",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLanguage as e}from"./chunk-I3QFYBOP.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-
|
|
1
|
+
import{useShellLanguage as e}from"./chunk-I3QFYBOP.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-UDVQORQM.js";import{Icon as t}from"./chunk-UIWGVOFH.js";import{useShellStrings as l}from"./chunk-43MCNASD.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */i(t,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
|
|
3
3
|
/* @__PURE__ */i("span",{className:"block",style:{width:`${r(c.map(e=>e.name))}em`},children:/* @__PURE__ */i(n,{size:a,touchSize:a,"aria-label":u.title,value:o,onChange:e=>{g(e)},options:c.map(({tag:e,name:a})=>({value:e,label:a,lang:e}))})})]})}function o({description:n,className:t=""}){const{language:r,languages:m,setLanguage:o}=e(),c=l().language;return m.length<2?null:/* @__PURE__ */s("div",{className:`space-y-4 ${t}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */s("div",{children:[
|