@nubisco/ui 5.52.2 → 5.54.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/dist/{ActionGroup-McCtSDV8.cjs → ActionGroup-0rG92kFk.cjs} +1 -1
- package/dist/{ActionGroup-CkwZEnUN.js → ActionGroup-Cn22xj1t.js} +2 -2
- package/dist/{AiLabel-oV9j_9bX.cjs → AiLabel-AGSSBanb.cjs} +1 -1
- package/dist/{AiLabel-DKhHwWNt.js → AiLabel-D32aNf1F.js} +1 -1
- package/dist/{AiProvider-GiId484Q.cjs → AiProvider-CLtCD_UR.cjs} +1 -1
- package/dist/{AiProvider-D1Sn67yz.js → AiProvider-gprbR5ts.js} +14 -14
- package/dist/{AiUsage-C2t5uXV-.cjs → AiUsage-XOKmuxyo.cjs} +1 -1
- package/dist/{AiUsage-eY9pNKxE.js → AiUsage-v8EdG3EN.js} +2 -2
- package/dist/{BackToTop-DumUwoJ1.js → BackToTop-BDFb1y3c.js} +1 -1
- package/dist/{BackToTop-DQ6vCoQu.cjs → BackToTop-R6yiw3lt.cjs} +1 -1
- package/dist/{Banner-FWDVwwVx.js → Banner-BjnbX4C3.js} +5 -5
- package/dist/{Banner-DTIRkPRb.cjs → Banner-C-mikJ5n.cjs} +1 -1
- package/dist/{BarChart-DKpSrGm3.cjs → BarChart-CVoLmSKs.cjs} +1 -1
- package/dist/{BarChart-hs_OZZD4.js → BarChart-GO-rGcKL.js} +5 -5
- package/dist/{BatchActions-DmMLy_y-.cjs → BatchActions-6IO5GRFm.cjs} +1 -1
- package/dist/{BatchActions-B5hv7U0E.js → BatchActions-Ckx8kyZt.js} +2 -2
- package/dist/Blueprint-BDPb5y1N.cjs +1 -0
- package/dist/Blueprint-DEboZ8ul.js +1538 -0
- package/dist/{BlueprintCard-Ce48mEtN.js → BlueprintCard-BO2pjY2S.js} +206 -162
- package/dist/BlueprintCard-CDxodt3T.cjs +1 -0
- package/dist/{BlueprintControls-DQE_gDOe.js → BlueprintControls-Bt4KoDp5.js} +5 -5
- package/dist/{BlueprintControls-C0V9FX8S.cjs → BlueprintControls-zX5yxOB1.cjs} +1 -1
- package/dist/{Board-DyAO3ko2.js → Board-BdqGOVNF.js} +1 -1
- package/dist/{Board-Htlm-mra.cjs → Board-DtOWyvKh.cjs} +1 -1
- package/dist/{BottomPanel-Dad7czGY.cjs → BottomPanel-C_u39INJ.cjs} +1 -1
- package/dist/{BottomPanel-BsfMrQaS.js → BottomPanel-CkEc9gvb.js} +1 -1
- package/dist/{Breadcrumbs-DrXxTJB4.js → Breadcrumbs-Bc-acmPE.js} +2 -2
- package/dist/{Breadcrumbs-Ck445rx6.cjs → Breadcrumbs-BzyDVvEk.cjs} +1 -1
- package/dist/{Briefing-nJ0LjXnp.js → Briefing-BiEICh1u.js} +3 -3
- package/dist/{Briefing-UMUWCsHh.cjs → Briefing-DwKWCOGm.cjs} +1 -1
- package/dist/{BriefingDestination-BMsPXWd6.js → BriefingDestination-BjNteNgh.js} +1 -1
- package/dist/{BriefingDestination-B2_e90ZN.cjs → BriefingDestination-Cs1y3z_5.cjs} +1 -1
- package/dist/Button-CGIbF1e-.cjs +1 -0
- package/dist/{Button-CxJMKPpw.js → Button-DmJ_J3UO.js} +55 -53
- package/dist/{ButtonSet-2vJioRDT.js → ButtonSet-Cg1ixzOK.js} +1 -1
- package/dist/{ButtonSet-CbR2EwbT.cjs → ButtonSet-SziuuT6_.cjs} +1 -1
- package/dist/{Calendar-C_UWF6F5.js → Calendar-fVDg_EgD.js} +1 -1
- package/dist/{Calendar-BKJoim3w.cjs → Calendar-fsZN4OIr.cjs} +1 -1
- package/dist/ChatMessage-1L_xCXZF.cjs +1 -0
- package/dist/ChatMessage-C2Ecm175.js +66 -0
- package/dist/ChatThread-B_F3xTdE.cjs +1 -0
- package/dist/ChatThread-COdOb1rH.js +154 -0
- package/dist/{Checkbox-B6qnpOXg.cjs → Checkbox-B2O4tB6x.cjs} +1 -1
- package/dist/{Checkbox-Bf3XzGbG.js → Checkbox-U1tS47Qx.js} +1 -1
- package/dist/{CheckboxGroup-C3ng8k3R.js → CheckboxGroup-DRQxWsVv.js} +2 -2
- package/dist/{CheckboxGroup-BG1efn5_.cjs → CheckboxGroup-md4kjLSp.cjs} +1 -1
- package/dist/{CloseButton-D0Aj3uQK.cjs → CloseButton-Bdk7rJ8E.cjs} +1 -1
- package/dist/{CloseButton-BeaS7MQc.js → CloseButton-CAPfd6yf.js} +1 -1
- package/dist/{ColorStrip-BaLKZV51.js → ColorStrip-CZcIHOg3.js} +14 -14
- package/dist/{ColorStrip-D6p71EPQ.cjs → ColorStrip-EDliYkMo.cjs} +1 -1
- package/dist/{CommandPalette-CI31tVG0.cjs → CommandPalette-CC_Aj4Uh.cjs} +1 -1
- package/dist/{CommandPalette-Co6sxIQz.js → CommandPalette-zqTMjpm8.js} +1 -1
- package/dist/{Confirm-jHGXPMJE.cjs → Confirm-Baz2WG7b.cjs} +1 -1
- package/dist/{Confirm-CJQsUNOq.js → Confirm-CvMuXK9Q.js} +4 -4
- package/dist/{ContentSwitcher-B96jZqzZ.cjs → ContentSwitcher-DYxJZdcm.cjs} +1 -1
- package/dist/{ContentSwitcher-DCB9W7wd.js → ContentSwitcher-NpFxiGbz.js} +1 -1
- package/dist/{CopyButton-DMuuBwJc.cjs → CopyButton-D-cnpfOJ.cjs} +1 -1
- package/dist/{CopyButton-CfEOWedU.js → CopyButton-MOJj3pS0.js} +1 -1
- package/dist/{DataTable-CA_p6GdD.js → DataTable-B8THDBLS.js} +12 -12
- package/dist/{DataTable-DNAUGxuj.cjs → DataTable-DeFzOlcP.cjs} +1 -1
- package/dist/{DatePicker-l-HrmC9V.cjs → DatePicker-B5YRb64p.cjs} +1 -1
- package/dist/{DatePicker-DKNte5ZT.js → DatePicker-BrUXcNUj.js} +18 -18
- package/dist/{FileUploader-CYa_FX-W.js → FileUploader-CcGdRBxp.js} +1 -1
- package/dist/{FileUploader-DCTMJY5p.cjs → FileUploader-CcieVEGZ.cjs} +1 -1
- package/dist/{Form-Co-23Ktg.js → Form-BztycGqC.js} +1 -1
- package/dist/{Form-Bc4QF6Lk.cjs → Form-DlzhKRWM.cjs} +1 -1
- package/dist/{GanttChart-D24__YLV.cjs → GanttChart-BiDTXqR1.cjs} +1 -1
- package/dist/{GanttChart-C70BwZZo.js → GanttChart-CFGdp4xL.js} +3 -3
- package/dist/{ImageCropper-3omi5zWi.cjs → ImageCropper-CgmDT83u.cjs} +1 -1
- package/dist/{ImageCropper-lLgzrsWr.js → ImageCropper-D61PEzb2.js} +2 -2
- package/dist/{ImagePicker-DOnGfEc6.js → ImagePicker-LhpR7jjR.js} +2 -2
- package/dist/{ImagePicker-4LRkWaLL.cjs → ImagePicker-vhg7b-UL.cjs} +1 -1
- package/dist/{InlineLoading-BovtIkg7.cjs → InlineLoading-CA0_IT29.cjs} +1 -1
- package/dist/{InlineLoading-CNetV7ih.js → InlineLoading-Cknqq0vv.js} +4 -4
- package/dist/{InputGroup-BHOJSSQ_.cjs → InputGroup-CjcEkzFL.cjs} +1 -1
- package/dist/{InputGroup-OytJ8AMk.js → InputGroup-Dgv9hKmM.js} +5 -5
- package/dist/{InterpolationChart-DnHzBcLG.cjs → InterpolationChart-BWFOnJWn.cjs} +1 -1
- package/dist/{InterpolationChart-Cohmbfep.js → InterpolationChart-CiY-hBgJ.js} +3 -3
- package/dist/{LineChart-BNhJBKO6.cjs → LineChart-BdVIHw3u.cjs} +1 -1
- package/dist/{LineChart-lMX9rTr7.js → LineChart-D0h0rBVq.js} +5 -5
- package/dist/LogView-BLa9W5S7.js +136 -0
- package/dist/LogView-BNztzJri.cjs +2 -0
- package/dist/{Message-BJO4MjiQ.cjs → Message-B1CQ0Bcf.cjs} +1 -1
- package/dist/{Message-DCeg8qsC.js → Message-Bi70NgGd.js} +6 -6
- package/dist/{Modal-BywbXivu.js → Modal-CESCi2dE.js} +10 -10
- package/dist/{Modal-GsDlHF-E.cjs → Modal-C_EWDvmH.cjs} +1 -1
- package/dist/{NotificationCenter-4MBTSGRl.js → NotificationCenter-DkGc0ETD.js} +209 -209
- package/dist/{NotificationCenter-BuVz7oP1.cjs → NotificationCenter-DxZgHQyt.cjs} +1 -1
- package/dist/{NotificationCenterItem-zIL89umA.cjs → NotificationCenterItem--0XKF1Bf.cjs} +1 -1
- package/dist/{NotificationCenterItem-DdH7jvvg.js → NotificationCenterItem-Hf0S6Jls.js} +6 -6
- package/dist/{NumberInput-DmKNMQLk.js → NumberInput-B91ahziS.js} +5 -5
- package/dist/{NumberInput-04v9eS0u.cjs → NumberInput-DLPSNgsr.cjs} +1 -1
- package/dist/{OverflowMenu-DXJ8waZo.js → OverflowMenu-BWZ7c8oI.js} +1 -1
- package/dist/{OverflowMenu-CWgdicDN.cjs → OverflowMenu-C8q28FrD.cjs} +1 -1
- package/dist/{PageHeader-8n0wHC1J.cjs → PageHeader-DElq_kdh.cjs} +1 -1
- package/dist/{PageHeader-ChUje7zF.js → PageHeader-DOYN9sto.js} +1 -1
- package/dist/{Pagination-CvvzkY1W.cjs → Pagination-9mPN8ych.cjs} +1 -1
- package/dist/{Pagination-DccRxFxs.js → Pagination-CxBHFwy0.js} +2 -2
- package/dist/{PieChart-Be8RVmz0.js → PieChart-BgDtTMZg.js} +4 -4
- package/dist/{PieChart-0_n0Ihir.cjs → PieChart-WU4Cxtrp.cjs} +1 -1
- package/dist/{ProgressBar-C-mDH8u0.js → ProgressBar-B2ZMiY12.js} +4 -4
- package/dist/{ProgressBar-BSPcsJ13.cjs → ProgressBar-BSqwVfaP.cjs} +1 -1
- package/dist/{Radio-LlTK1Sug.cjs → Radio-BJ4SLyFW.cjs} +1 -1
- package/dist/{Radio-q_unHymB.js → Radio-CfJTD69M.js} +1 -1
- package/dist/{Search-CI787J6m.js → Search-Bwdxxe29.js} +2 -2
- package/dist/{Search-BxYPouus.cjs → Search-DIZ1Ea45.cjs} +1 -1
- package/dist/Select-7gJ3_fWh.js +615 -0
- package/dist/Select-Dg4HSHOu.cjs +1 -0
- package/dist/{Shell-Btxqmkh-.cjs → Shell-BZslT2aj.cjs} +1 -1
- package/dist/{Shell-nNxGdcuI.js → Shell-CRmhoU2H.js} +2 -2
- package/dist/{ShellPanel-D1-l6JRg.js → ShellPanel-C4vQJmRI.js} +1 -1
- package/dist/{ShellPanel-BeTojwfU.cjs → ShellPanel-DUBq5BL6.cjs} +1 -1
- package/dist/SidebarBrand-BPInsf52.cjs +1 -0
- package/dist/SidebarBrand-Dp9YZCqy.js +54 -0
- package/dist/{SidebarCollapseToggle-DobruD4n.cjs → SidebarCollapseToggle-CABmF-PC.cjs} +1 -1
- package/dist/{SidebarCollapseToggle-BLY8EEaD.js → SidebarCollapseToggle-DraqbhwM.js} +2 -2
- package/dist/{SidebarHeaderToggle-TwULd9e3.cjs → SidebarHeaderToggle-DB2Q6u5x.cjs} +1 -1
- package/dist/{SidebarHeaderToggle-BVfhMhvD.js → SidebarHeaderToggle-DbUS4eEa.js} +1 -1
- package/dist/SidebarMenuItem-DQRQtqrp.js +300 -0
- package/dist/SidebarMenuItem-Dwk7vKN5.cjs +1 -0
- package/dist/{Skeleton-CUUa44lM.cjs → Skeleton-D46kzIzB.cjs} +1 -1
- package/dist/{Skeleton-DI7l_96J.js → Skeleton-DFi5DNiP.js} +1 -1
- package/dist/{Slider-D7BgYMeu.js → Slider-B6QXQMqb.js} +8 -8
- package/dist/{Slider-CtN6andn.cjs → Slider-B7m_luyq.cjs} +1 -1
- package/dist/{Sparkline-0CmemDu3.js → Sparkline-B9547TtT.js} +1 -1
- package/dist/{Sparkline-ByPgkuSC.cjs → Sparkline-DfiriQYp.cjs} +1 -1
- package/dist/{Spinner-D_6qJT6u.js → Spinner-DYFhiTB1.js} +1 -1
- package/dist/{Spinner-BDwIIS4H.cjs → Spinner-j13gRoUF.cjs} +1 -1
- package/dist/{Stat-BiuBoOoE.cjs → Stat-BCvXYr-z.cjs} +1 -1
- package/dist/{Stat-C_Z2D-TS.js → Stat-No3RhGB3.js} +1 -1
- package/dist/{Stepper-CARQL6xx.cjs → Stepper-CoLXwmrJ.cjs} +1 -1
- package/dist/{Stepper-BG9PfjPD.js → Stepper-pk0QfMn_.js} +1 -1
- package/dist/{StepperStep-C7F_8ErM.js → StepperStep-BGUqRHwQ.js} +1 -1
- package/dist/{StepperStep-DHsfAMv0.cjs → StepperStep-Bo8aYLjJ.cjs} +1 -1
- package/dist/{SuggestionList-BT-xOJBx.cjs → SuggestionList-Cxy4jjjd.cjs} +1 -1
- package/dist/{SuggestionList-Cm0pD7_C.js → SuggestionList-Dv4yQAi-.js} +15 -15
- package/dist/{Switch-CqLfdT_m.js → Switch-Bvt-JPWp.js} +4 -4
- package/dist/{Switch-CQj6AsQh.cjs → Switch-PBdutuj_.cjs} +1 -1
- package/dist/{TableOfContents-B7Qmz4t9.js → TableOfContents-CeZX4dH0.js} +1 -1
- package/dist/{TableOfContents-IQordoiY.cjs → TableOfContents-D9FCu6gN.cjs} +1 -1
- package/dist/{Tabs-W2hUdYvl.cjs → Tabs-C9bZ5cp1.cjs} +1 -1
- package/dist/{Tabs-D_LFyWTX.js → Tabs-CCVuHp4s.js} +1 -1
- package/dist/{TextInput-DG8aUZeu.js → TextInput-BeqDf1R7.js} +12 -12
- package/dist/{TextInput-r8ap24-5.cjs → TextInput-SJ34hD2Y.cjs} +2 -2
- package/dist/{Toast-yB4u936W.cjs → Toast-CN5Jzkr5.cjs} +1 -1
- package/dist/{Toast-CpdX-63Q.js → Toast-DIf2XRCa.js} +8 -8
- package/dist/{Toaster-XMqkamDu.js → Toaster-ByObLDkk.js} +1 -1
- package/dist/{Toaster-BqCi69_x.cjs → Toaster-CJAbZ9pv.cjs} +1 -1
- package/dist/{Tree-hitkY9yg.cjs → Tree-BhR3gNlT.cjs} +1 -1
- package/dist/{Tree-Nn3HGP-T.js → Tree-CW-735rp.js} +1 -1
- package/dist/{TreeNode-giUfunjf.js → TreeNode-BGVvJ76v.js} +1 -1
- package/dist/{TreeNode-DHSYezap.cjs → TreeNode-Dx8SKr1Z.cjs} +1 -1
- package/dist/UserMenu-BjSO_Uml.cjs +1 -0
- package/dist/{UserMenu-C52WN7-m.js → UserMenu-CjmhyTwN.js} +56 -48
- package/dist/{Video-B0FTFBYF.js → Video-Agby8uRA.js} +1 -1
- package/dist/{Video-DxTpvMsS.cjs → Video-B93sRbBU.cjs} +1 -1
- package/dist/{Walkthrough-BRtkSFsq.js → Walkthrough-DYYqtpwJ.js} +2 -2
- package/dist/{Walkthrough-DO75HV1w.cjs → Walkthrough-DxAIdo3M.cjs} +1 -1
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +282 -276
- package/dist/blueprint-connect-DyenBFX3.cjs +1 -0
- package/dist/blueprint-connect-dcuHxtzp.js +6 -0
- package/dist/component-styles.json +23 -0
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/AiUsage.cjs +1 -1
- package/dist/components/AiUsage.mjs +1 -1
- package/dist/components/AiUsage.vue.d.ts +1 -1
- package/dist/components/BackToTop.cjs +1 -1
- package/dist/components/BackToTop.mjs +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.mjs +1 -1
- package/dist/components/Badge.vue.d.ts +1 -1
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Banner.mjs +1 -1
- package/dist/components/BatchActions.cjs +1 -1
- package/dist/components/BatchActions.mjs +1 -1
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/Blueprint.types.d.ts +58 -1
- package/dist/components/Blueprint.types.d.ts.map +1 -1
- package/dist/components/Blueprint.vue.d.ts +1 -0
- package/dist/components/Blueprint.vue.d.ts.map +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintCard.types.d.ts +35 -5
- package/dist/components/BlueprintCard.types.d.ts.map +1 -1
- package/dist/components/BlueprintCard.vue.d.ts +1 -0
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintControls.vue.d.ts.map +1 -1
- package/dist/components/BlueprintMinimap.cjs +1 -1
- package/dist/components/BlueprintMinimap.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- package/dist/components/BottomPanel.cjs +1 -1
- package/dist/components/BottomPanel.mjs +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Briefing.cjs +1 -1
- package/dist/components/Briefing.mjs +1 -1
- package/dist/components/BriefingDestination.cjs +1 -1
- package/dist/components/BriefingDestination.mjs +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.context.d.ts +21 -0
- package/dist/components/Button.context.d.ts.map +1 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Button.vue.d.ts +1 -0
- package/dist/components/Button.vue.d.ts.map +1 -1
- package/dist/components/ButtonSet.cjs +1 -1
- package/dist/components/ButtonSet.mjs +1 -1
- package/dist/components/Calendar.cjs +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Charts/BarChart.cjs +1 -1
- package/dist/components/Charts/BarChart.mjs +1 -1
- package/dist/components/Charts/GanttChart.cjs +1 -1
- package/dist/components/Charts/GanttChart.mjs +1 -1
- package/dist/components/Charts/InterpolationChart.cjs +1 -1
- package/dist/components/Charts/InterpolationChart.mjs +1 -1
- package/dist/components/Charts/LineChart.cjs +1 -1
- package/dist/components/Charts/LineChart.mjs +1 -1
- package/dist/components/Charts/PieChart.cjs +1 -1
- package/dist/components/Charts/PieChart.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/ChatMessage.cjs +1 -0
- package/dist/components/ChatMessage.d.ts +49 -0
- package/dist/components/ChatMessage.mjs +2 -0
- package/dist/components/ChatMessage.vue.d.ts +32 -0
- package/dist/components/ChatMessage.vue.d.ts.map +1 -0
- package/dist/components/ChatThread.cjs +1 -0
- package/dist/components/ChatThread.d.ts +62 -0
- package/dist/components/ChatThread.mjs +2 -0
- package/dist/components/ChatThread.vue.d.ts +49 -0
- package/dist/components/ChatThread.vue.d.ts.map +1 -0
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Checkbox.mjs +1 -1
- package/dist/components/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup.mjs +1 -1
- package/dist/components/ChipGroup.cjs +1 -1
- package/dist/components/ChipGroup.mjs +1 -1
- package/dist/components/CloseButton.cjs +1 -1
- package/dist/components/CloseButton.mjs +1 -1
- package/dist/components/ColorStrip.cjs +1 -1
- package/dist/components/ColorStrip.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/Confirm.vue.d.ts +1 -1
- package/dist/components/ContainedList.cjs +1 -1
- package/dist/components/ContainedList.mjs +1 -1
- package/dist/components/ContainedListItem.cjs +1 -1
- package/dist/components/ContainedListItem.mjs +1 -1
- package/dist/components/ContentSwitcher.cjs +1 -1
- package/dist/components/ContentSwitcher.mjs +1 -1
- package/dist/components/CopyButton.cjs +1 -1
- package/dist/components/CopyButton.mjs +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DefinitionList.cjs +1 -1
- package/dist/components/DefinitionList.mjs +1 -1
- package/dist/components/DefinitionListItem.cjs +1 -1
- package/dist/components/DefinitionListItem.mjs +1 -1
- package/dist/components/DragHandle.cjs +1 -1
- package/dist/components/DragHandle.mjs +1 -1
- package/dist/components/EmptyState.cjs +1 -1
- package/dist/components/EmptyState.mjs +1 -1
- package/dist/components/Field.cjs +1 -1
- package/dist/components/Field.mjs +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Flag.cjs +1 -1
- package/dist/components/Flag.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/Grid.cjs +1 -1
- package/dist/components/Grid.mjs +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.mjs +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/InlineLoading.vue.d.ts +1 -1
- package/dist/components/InputGroup.cjs +1 -1
- package/dist/components/InputGroup.mjs +1 -1
- package/dist/components/JsonTree.cjs +1 -1
- package/dist/components/JsonTree.mjs +1 -1
- package/dist/components/Layer.cjs +1 -1
- package/dist/components/Layer.mjs +1 -1
- package/dist/components/LogView.cjs +1 -0
- package/dist/components/LogView.d.ts +75 -0
- package/dist/components/LogView.mjs +2 -0
- package/dist/components/LogView.vue.d.ts +27 -0
- package/dist/components/LogView.vue.d.ts.map +1 -0
- package/dist/components/MenuBar.cjs +1 -1
- package/dist/components/MenuBar.mjs +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/MenuDivider.cjs +1 -1
- package/dist/components/MenuDivider.mjs +1 -1
- package/dist/components/Message.cjs +1 -1
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NotificationCenterItem.vue.d.ts +1 -1
- package/dist/components/NubiscoMark.cjs +1 -1
- package/dist/components/NubiscoMark.mjs +1 -1
- package/dist/components/NubiscoPlatformMark.cjs +1 -1
- package/dist/components/NubiscoPlatformMark.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/OverflowMenu.cjs +1 -1
- package/dist/components/OverflowMenu.mjs +1 -1
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/PageLayout.cjs +1 -1
- package/dist/components/PageLayout.mjs +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Panel.cjs +1 -1
- package/dist/components/Panel.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/ReorderList.cjs +1 -1
- package/dist/components/ReorderList.mjs +1 -1
- package/dist/components/Search.cjs +1 -1
- package/dist/components/Search.mjs +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts +2 -2
- package/dist/components/Shell.cjs +1 -1
- package/dist/components/Shell.mjs +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/SidebarBrand.cjs +1 -1
- package/dist/components/SidebarBrand.d.ts +11 -0
- package/dist/components/SidebarBrand.mjs +1 -1
- package/dist/components/SidebarBrand.vue.d.ts +1 -0
- package/dist/components/SidebarBrand.vue.d.ts.map +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarHeaderToggle.cjs +1 -1
- package/dist/components/SidebarHeaderToggle.mjs +1 -1
- package/dist/components/SidebarLink.cjs +1 -1
- package/dist/components/SidebarLink.mjs +1 -1
- package/dist/components/SidebarMenu.cjs +1 -1
- package/dist/components/SidebarMenu.mjs +1 -1
- package/dist/components/SidebarMenuGroup.cjs +1 -1
- package/dist/components/SidebarMenuGroup.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.d.ts +16 -0
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts +2 -0
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/SidebarStatus.cjs +1 -1
- package/dist/components/SidebarStatus.mjs +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Skeleton.vue.d.ts +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Slider.vue.d.ts +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Spinner.vue.d.ts +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.mjs +1 -1
- package/dist/components/Stepper.cjs +1 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/Stepper.vue.d.ts +1 -1
- package/dist/components/StepperStep.cjs +1 -1
- package/dist/components/StepperStep.mjs +1 -1
- package/dist/components/StructuredList.cjs +1 -1
- package/dist/components/StructuredList.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/TableOfContents.vue.d.ts +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +1 -1
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/Toolbar.mjs +1 -1
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/Video.cjs +1 -1
- package/dist/components/Video.mjs +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Wireframe.cjs +1 -1
- package/dist/components/Wireframe.mjs +1 -1
- package/dist/components/blueprint-connect.d.ts +16 -0
- package/dist/components/blueprint-connect.d.ts.map +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +3 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +3 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +3 -3
- package/dist/composables/useFollowNewest.composable.cjs +1 -0
- package/dist/composables/useFollowNewest.composable.d.ts +21 -0
- package/dist/composables/useFollowNewest.composable.d.ts.map +1 -0
- package/dist/composables/useFollowNewest.composable.mjs +47 -0
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/composables/useNbStrings.composable.cjs +1 -1
- package/dist/composables/useNbStrings.composable.d.ts +26 -0
- package/dist/composables/useNbStrings.composable.d.ts.map +1 -1
- package/dist/composables/useNbStrings.composable.mjs +19 -0
- package/dist/global.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +155 -152
- package/dist/{main-Dr-OZ97R.cjs → main-Cs0FFBfV.cjs} +2 -2
- package/dist/{main-hHSQ2Z9E.js → main-D6qY7QeE.js} +76 -76
- package/dist/main.d.ts +17 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/Blueprint.css +1 -1
- package/dist/styles/BlueprintCard.css +1 -1
- package/dist/styles/BlueprintControls.css +1 -1
- package/dist/styles/Button.css +1 -1
- package/dist/styles/ChatMessage.css +1 -0
- package/dist/styles/ChatThread.css +1 -0
- package/dist/styles/LogView.css +1 -0
- package/dist/styles/SidebarBrand.css +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/ui.css +11 -8
- package/package.json +1 -1
- package/src/styles/_theme.scss +5 -0
- package/dist/Blueprint-ePiyl5dw.js +0 -1501
- package/dist/Blueprint-kNZLEHJz.cjs +0 -1
- package/dist/BlueprintCard-L5FqZKvJ.cjs +0 -1
- package/dist/Button-5ClGtoaz.cjs +0 -1
- package/dist/Select-C3AHxgi1.cjs +0 -1
- package/dist/Select-e-sgQurr.js +0 -615
- package/dist/SidebarBrand-DmWBakJG.cjs +0 -1
- package/dist/SidebarBrand-Dz8O0JHj.js +0 -31
- package/dist/SidebarMenuItem-D7rkGP2L.js +0 -268
- package/dist/SidebarMenuItem-DYREDfqx.cjs +0 -1
- package/dist/UserMenu-DFxqVHMM.cjs +0 -1
- /package/dist/{Badge-BYfdJcdD.cjs → Badge-Bf0l95o1.cjs} +0 -0
- /package/dist/{Badge-scjsdx_V.js → Badge-TXLmvfLG.js} +0 -0
- /package/dist/{Blueprint.context-KUd38ozw.cjs → Blueprint.context-CKxT98w8.cjs} +0 -0
- /package/dist/{Blueprint.context-CWzHXNtU.js → Blueprint.context-Cr8R0YY2.js} +0 -0
- /package/dist/{BlueprintBackground-CfII_po9.cjs → BlueprintBackground-BSrAsA2t.cjs} +0 -0
- /package/dist/{BlueprintBackground-CBU9iwAA.js → BlueprintBackground-XyU-rJ20.js} +0 -0
- /package/dist/{BlueprintMinimap-5mdeNCgk.cjs → BlueprintMinimap-DIjmvRAm.cjs} +0 -0
- /package/dist/{BlueprintMinimap-CP2-gY4i.js → BlueprintMinimap-DWx_bkp3.js} +0 -0
- /package/dist/{ChartLegend-LDNukufA.js → ChartLegend-CQQwcGvz.js} +0 -0
- /package/dist/{ChartLegend-COJeG-2B.cjs → ChartLegend-DMxlEhT6.cjs} +0 -0
- /package/dist/{CheckboxGroup.context-B21mAPv4.js → CheckboxGroup.context-B2xhGoXC.js} +0 -0
- /package/dist/{CheckboxGroup.context-DRWqTj9S.cjs → CheckboxGroup.context-RLOznZPB.cjs} +0 -0
- /package/dist/{ChipGroup-BplLSI81.cjs → ChipGroup-C8ar8YCb.cjs} +0 -0
- /package/dist/{ChipGroup-BNp7OB2t.js → ChipGroup-E8l7aJxx.js} +0 -0
- /package/dist/{ContainedList-PUA2OJ08.js → ContainedList-DPGBeeeX.js} +0 -0
- /package/dist/{ContainedList-CBWwEmoK.cjs → ContainedList-Dky4V9Ob.cjs} +0 -0
- /package/dist/{ContainedListItem-BKvHedZO.cjs → ContainedListItem-3p-iC-eG.cjs} +0 -0
- /package/dist/{ContainedListItem-8z2bmoRG.js → ContainedListItem-BLn6xfWd.js} +0 -0
- /package/dist/{DefinitionList-BOVcW-V7.js → DefinitionList--Q2HEB_R.js} +0 -0
- /package/dist/{DefinitionList-CndoLDLs.cjs → DefinitionList-CGIDl914.cjs} +0 -0
- /package/dist/{DefinitionListItem-C3VrLhWY.js → DefinitionListItem-B4iWsaSC.js} +0 -0
- /package/dist/{DefinitionListItem-CLztc8mQ.cjs → DefinitionListItem-CR5vx_kx.cjs} +0 -0
- /package/dist/{DragHandle-IJoaUK75.cjs → DragHandle-BiYccTJN.cjs} +0 -0
- /package/dist/{DragHandle-CuEBPvz8.js → DragHandle-qTw3v4uw.js} +0 -0
- /package/dist/{EmptyState-Db0Zrrk2.cjs → EmptyState-1ZLgFpJO.cjs} +0 -0
- /package/dist/{EmptyState-DhlJV0C6.js → EmptyState-DE1pPuw-.js} +0 -0
- /package/dist/{Field-COMPegVv.cjs → Field-AXSzk3l3.cjs} +0 -0
- /package/dist/{Field-D12Dja-u.js → Field-B8wNroAI.js} +0 -0
- /package/dist/{Flag-CKhucUhD.js → Flag-DxtJyiq7.js} +0 -0
- /package/dist/{Flag-D5hPnq37.cjs → Flag-sm9H7OLB.cjs} +0 -0
- /package/dist/{FloatingToolbar-Clz7tlQQ.js → FloatingToolbar-BikX_AsP.js} +0 -0
- /package/dist/{FloatingToolbar-By_-ubVi.cjs → FloatingToolbar-DWVY8Fxo.cjs} +0 -0
- /package/dist/{Grid-B7d8x0tA.js → Grid-BVIhOyQ1.js} +0 -0
- /package/dist/{Grid-BOtE_jXr.cjs → Grid-tn5_R2fP.cjs} +0 -0
- /package/dist/{InlineEdit-hVNTw3FL.cjs → InlineEdit-DNYN-OKH.cjs} +0 -0
- /package/dist/{InlineEdit-Ccm5eW9r.js → InlineEdit-vsfyBgw7.js} +0 -0
- /package/dist/{JsonTree-E9Z-ELBN.js → JsonTree-6CdJ-Gzr.js} +0 -0
- /package/dist/{JsonTree-D2auUavc.cjs → JsonTree-Da24d7DW.cjs} +0 -0
- /package/dist/{Layer--aoEMtI2.js → Layer-CSuwMbCG.js} +0 -0
- /package/dist/{Layer-C8RYJ-6a.cjs → Layer-DgvW9hHn.cjs} +0 -0
- /package/dist/{MenuBar-3tuFXaKq.cjs → MenuBar-C9DS_hIo.cjs} +0 -0
- /package/dist/{MenuBar-T-R82ARB.js → MenuBar-DVv2g_rC.js} +0 -0
- /package/dist/{MenuBarItem-GgXvNoo-.cjs → MenuBarItem-DlnIAhRw.cjs} +0 -0
- /package/dist/{MenuBarItem-DWx9J8-L.js → MenuBarItem-yr5aizl3.js} +0 -0
- /package/dist/{MenuDivider-9wQ-fCik.cjs → MenuDivider-CN0P3E6g.cjs} +0 -0
- /package/dist/{MenuDivider-ksA6NvMu.js → MenuDivider-DdwhPon9.js} +0 -0
- /package/dist/{NubiscoMark-BmzCQO-3.js → NubiscoMark-0ZIaMys6.js} +0 -0
- /package/dist/{NubiscoMark-xthZ972G.cjs → NubiscoMark-BM7WFUNi.cjs} +0 -0
- /package/dist/{NubiscoPlatformMark-DCr77bqN.js → NubiscoPlatformMark-D09gaMWr.js} +0 -0
- /package/dist/{NubiscoPlatformMark-DA2jJFJN.cjs → NubiscoPlatformMark-DoU7dFxt.cjs} +0 -0
- /package/dist/{PageLayout-DHi1w1PD.cjs → PageLayout-BkkrJvOm.cjs} +0 -0
- /package/dist/{PageLayout-BMcT2mzU.js → PageLayout-Czzxu6ua.js} +0 -0
- /package/dist/{Panel-7LIVYu68.js → Panel-4itscCsS.js} +0 -0
- /package/dist/{Panel-BRPE3B-O.cjs → Panel-BKASZF-B.cjs} +0 -0
- /package/dist/{ReorderList-qScXc3-v.cjs → ReorderList-DJSXspkB.cjs} +0 -0
- /package/dist/{ReorderList-DmjW30Mw.js → ReorderList-DRFcrUfl.js} +0 -0
- /package/dist/{SidebarLink-D1rsmzP_.cjs → SidebarLink-C-tnZtCU.cjs} +0 -0
- /package/dist/{SidebarLink-qbDy2Jip.js → SidebarLink-D9w9PHz_.js} +0 -0
- /package/dist/{SidebarMenu-CEff0kWr.cjs → SidebarMenu-BVqk_jY1.cjs} +0 -0
- /package/dist/{SidebarMenu-Cz7k20qd.js → SidebarMenu-CxFS4i9J.js} +0 -0
- /package/dist/{SidebarMenuGroup-BvrYrQQi.js → SidebarMenuGroup-BxMynLi3.js} +0 -0
- /package/dist/{SidebarMenuGroup-vc3SM277.cjs → SidebarMenuGroup-CPhxz_bV.cjs} +0 -0
- /package/dist/{SidebarStatus-COgGJjkA.js → SidebarStatus-Bw8CU-vJ.js} +0 -0
- /package/dist/{SidebarStatus-Coh-cSGj.cjs → SidebarStatus-Cv95lDM4.cjs} +0 -0
- /package/dist/{Stepper.context-CIIC0ucN.cjs → Stepper.context--rpq0sA4.cjs} +0 -0
- /package/dist/{Stepper.context-BBwBAwSJ.js → Stepper.context-BI40m7my.js} +0 -0
- /package/dist/{StructuredList-BexC0c1Z.cjs → StructuredList-C7A2hCt7.cjs} +0 -0
- /package/dist/{StructuredList-DuBBP01p.js → StructuredList-DuHjSiZQ.js} +0 -0
- /package/dist/{Submenu-M1q8mdSB.js → Submenu-BDs-yAqv.js} +0 -0
- /package/dist/{Submenu-DK6C5mjc.cjs → Submenu-BLjx2kWl.cjs} +0 -0
- /package/dist/{TextInput.context-B-mipPOo.js → TextInput.context-CIHw4T0Y.js} +0 -0
- /package/dist/{TextInput.context-ChkcqMNM.cjs → TextInput.context-pJ99Jqwr.cjs} +0 -0
- /package/dist/{Toolbar-DN0gMuyj.cjs → Toolbar-0yonvSaQ.cjs} +0 -0
- /package/dist/{Toolbar-Cc_31FMW.js → Toolbar-DX2l8FUL.js} +0 -0
- /package/dist/{TreeContext-JbeO4_mW.cjs → TreeContext-CA4uqhBq.cjs} +0 -0
- /package/dist/{TreeContext-BSNQGIEd.js → TreeContext-CwTEdedz.js} +0 -0
- /package/dist/{Wireframe-B-Dnmefu.js → Wireframe-DJRZl5rd.js} +0 -0
- /package/dist/{Wireframe-DBqyeEzE.cjs → Wireframe-Dhxj8wYJ.cjs} +0 -0
- /package/dist/{palette-BPqd521m.js → palette-4rzDlIAy.js} +0 -0
- /package/dist/{palette-MlQ_k4iu.cjs → palette-DxWvvteq.cjs} +0 -0
- /package/dist/{pixi-scene-RJljCo62.cjs → pixi-scene-ZtVQmHpg.cjs} +0 -0
- /package/dist/{pixi-scene-CdHSFEve.js → pixi-scene-hlXJlAf5.js} +0 -0
- /package/dist/{scales-BRSHTjbp.cjs → scales-Dbh3TYrl.cjs} +0 -0
- /package/dist/{scales-BGzTviac.js → scales-TfA6Pl4e.js} +0 -0
- /package/dist/{useChartEntrance-D8vJ7eWq.cjs → useChartEntrance-BSMpWsax.cjs} +0 -0
- /package/dist/{useChartEntrance-heEx5_ZG.js → useChartEntrance-BqG_st9U.js} +0 -0
- /package/dist/{useChartSize-05CLdiR0.js → useChartSize-B-Rv6Q7a.js} +0 -0
- /package/dist/{useChartSize-CUZ7BuGD.cjs → useChartSize-c75YO_2m.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-CZT2zf7e.js → useLoadingAnnouncer.composable-Cihu0ZHU.js} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-BXyCMUDe.cjs → useLoadingAnnouncer.composable-vqmtAsfY.cjs} +0 -0
- /package/dist/{vue-i18n-D8JKgg8C.cjs → vue-i18n-BaeznwnA.cjs} +0 -0
- /package/dist/{vue-i18n-B8N89VAx.js → vue-i18n-DgCNp5tk.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as e } from "./Button-
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { useSurfaceLayer as t } from "./composables/useSurfaceLayer.composable.mjs";
|
|
3
3
|
import { usePhoneLayout as n } from "./composables/usePhoneLayout.composable.mjs";
|
|
4
4
|
import { useNbStrings as r } from "./composables/useNbStrings.composable.mjs";
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import { t as a } from "./
|
|
7
|
-
import { t as o } from "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { t as i } from "./Grid-BVIhOyQ1.js";
|
|
6
|
+
import { t as a } from "./Label-xwHw_UbN.js";
|
|
7
|
+
import { t as o } from "./Message-Bi70NgGd.js";
|
|
8
|
+
import { n as s } from "./InputGroup.context-Dd4e6fGT.js";
|
|
9
|
+
import { joinDescribedBy as c } from "./composables/useFieldMessage.composable.mjs";
|
|
10
10
|
import { useMenuSurface as l } from "./composables/useMenuSurface.composable.mjs";
|
|
11
11
|
import { useVisualViewportVar as ee } from "./composables/useVisualViewportVar.composable.mjs";
|
|
12
12
|
import { Fragment as u, Teleport as te, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeProps as ne, nextTick as y, normalizeClass as b, onBeforeUnmount as re, openBlock as x, ref as S, renderList as ie, renderSlot as ae, toDisplayString as C, unref as w, useAttrs as oe, useId as se, watch as ce, withCtx as T, withModifiers as le } from "vue";
|
|
@@ -126,7 +126,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
126
126
|
"change"
|
|
127
127
|
],
|
|
128
128
|
setup(v, { expose: Le, emit: Re }) {
|
|
129
|
-
let E = r(), D = v, { layerProps: ze } = t({ overlay: !0 }), O = Re, k =
|
|
129
|
+
let E = r(), D = v, { layerProps: ze } = t({ overlay: !0 }), O = Re, k = s(D, `nb-date-picker-${se()}`), A = k.grouped, j = k.id, Be = k.size, M = k.disabled, Ve = d(() => `${j.value}-end`), He = d(() => `${j.value}-helper`), Ue = d(() => `${j.value}-message`), We = d(() => `${j.value}-end-message`), Ge = d(() => `${j.value}-cal-title`), N = S(null), Ke = d(() => N.value !== null), P = S(!1), F = S(Q(/* @__PURE__ */ new Date())), qe = S(null), I = S(null), L = S(null), R = S(null);
|
|
130
130
|
l(R);
|
|
131
131
|
let { phone: Je } = n(), Ye = S(null);
|
|
132
132
|
ee(() => P.value);
|
|
@@ -168,7 +168,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
168
168
|
function nt(e, t) {
|
|
169
169
|
if (!(D.variant !== "default" || A)) return e ? t : D.helper ? He.value : void 0;
|
|
170
170
|
}
|
|
171
|
-
let rt = oe(), it = d(() =>
|
|
171
|
+
let rt = oe(), it = d(() => c(rt["aria-describedby"], nt(H.value, Ue.value), k.describedBy.value)), at = d(() => c(nt(U.value, We.value), k.describedBy.value)), ot = d(() => k.status.value === "error"), st = d(() => k.status.value === "warning"), W = d(() => !!D.error || ot.value), ct = d(() => !W.value && (!!D.warning || st.value)), G = d(() => !!D.endError || ot.value), lt = d(() => !G.value && (!!D.endWarning || st.value)), ut = d(() => W.value ? !0 : void 0), dt = d(() => G.value ? !0 : void 0), ft = d(() => D.type === "range" && !!D.endLabel), pt = d(() => D.endLabel || D.endPlaceholder), mt = d(() => A ? D.endLabel || D.endPlaceholder || E.value.datePickerEndDate : void 0);
|
|
172
172
|
function ht(e) {
|
|
173
173
|
return D.min != null && e < D.min || D.max != null && e > D.max ? !0 : D.disabledDates ? typeof D.disabledDates == "function" ? D.disabledDates(e) : D.disabledDates.includes(e) : !1;
|
|
174
174
|
}
|
|
@@ -432,7 +432,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
432
432
|
ref: qe,
|
|
433
433
|
class: b(Wt.value)
|
|
434
434
|
}, [v.variant === "default" ? (x(), m(u, { key: 0 }, [
|
|
435
|
-
t.$slots.label && !w(A) ? ae(t.$slots, "label", { key: 0 }) : v.label && !ft.value && !w(A) ? (x(), f(
|
|
435
|
+
t.$slots.label && !w(A) ? ae(t.$slots, "label", { key: 0 }) : v.label && !ft.value && !w(A) ? (x(), f(a, {
|
|
436
436
|
key: 1,
|
|
437
437
|
for: w(j),
|
|
438
438
|
required: v.required,
|
|
@@ -445,12 +445,12 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
445
445
|
"required",
|
|
446
446
|
"disabled"
|
|
447
447
|
])) : p("", !0),
|
|
448
|
-
_(
|
|
448
|
+
_(i, {
|
|
449
449
|
dir: "row",
|
|
450
450
|
gap: v.type === "range" ? "sm" : void 0,
|
|
451
451
|
class: "nb-date-picker__fields"
|
|
452
452
|
}, {
|
|
453
|
-
default: T(() => [h("div", he, [ft.value && v.label && !w(A) ? (x(), f(
|
|
453
|
+
default: T(() => [h("div", he, [ft.value && v.label && !w(A) ? (x(), f(a, {
|
|
454
454
|
key: 0,
|
|
455
455
|
for: w(j),
|
|
456
456
|
required: v.required,
|
|
@@ -496,7 +496,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
496
496
|
"size",
|
|
497
497
|
"disabled",
|
|
498
498
|
"label"
|
|
499
|
-
]))], 2)]), v.type === "range" ? (x(), m("div", _e, [ft.value && !w(A) ? (x(), f(
|
|
499
|
+
]))], 2)]), v.type === "range" ? (x(), m("div", _e, [ft.value && !w(A) ? (x(), f(a, {
|
|
500
500
|
key: 0,
|
|
501
501
|
for: Ve.value,
|
|
502
502
|
required: v.required,
|
|
@@ -543,7 +543,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
543
543
|
])], 2)])) : p("", !0)]),
|
|
544
544
|
_: 1
|
|
545
545
|
}, 8, ["gap"]),
|
|
546
|
-
H.value && !w(A) ? (x(), f(
|
|
546
|
+
H.value && !w(A) ? (x(), f(o, {
|
|
547
547
|
key: 2,
|
|
548
548
|
id: Ue.value,
|
|
549
549
|
variant: H.value.variant,
|
|
@@ -552,7 +552,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
552
552
|
default: T(() => [g(C(H.value.text), 1)]),
|
|
553
553
|
_: 1
|
|
554
554
|
}, 8, ["id", "variant"])) : p("", !0),
|
|
555
|
-
U.value && !w(A) ? (x(), f(
|
|
555
|
+
U.value && !w(A) ? (x(), f(o, {
|
|
556
556
|
key: 3,
|
|
557
557
|
id: We.value,
|
|
558
558
|
variant: U.value.variant,
|
|
@@ -561,7 +561,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
561
561
|
default: T(() => [g(C(U.value.text), 1)]),
|
|
562
562
|
_: 1
|
|
563
563
|
}, 8, ["id", "variant"])) : p("", !0),
|
|
564
|
-
!H.value && !U.value && v.helper && !w(A) ? (x(), f(
|
|
564
|
+
!H.value && !U.value && v.helper && !w(A) ? (x(), f(o, {
|
|
565
565
|
key: 4,
|
|
566
566
|
id: He.value,
|
|
567
567
|
variant: "helper",
|
|
@@ -570,7 +570,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
570
570
|
default: T(() => [g(C(v.helper), 1)]),
|
|
571
571
|
_: 1
|
|
572
572
|
}, 8, ["id"])) : p("", !0)
|
|
573
|
-
], 64)) : v.variant === "fluid" ? (x(), f(
|
|
573
|
+
], 64)) : v.variant === "fluid" ? (x(), f(i, {
|
|
574
574
|
key: 1,
|
|
575
575
|
dir: "row",
|
|
576
576
|
gap: v.type === "range" ? "sm" : void 0,
|
|
@@ -580,7 +580,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
580
580
|
key: 1,
|
|
581
581
|
for: w(j),
|
|
582
582
|
class: "nb-date-picker__inner-label"
|
|
583
|
-
}, [g(C(v.label) + " ", 1), v.required ? (x(), m("span", xe, "*")) : p("", !0)], 8, be)), tt.value ? (x(), f(
|
|
583
|
+
}, [g(C(v.label) + " ", 1), v.required ? (x(), m("span", xe, "*")) : p("", !0)], 8, be)), tt.value ? (x(), f(o, {
|
|
584
584
|
key: 2,
|
|
585
585
|
variant: tt.value.variant,
|
|
586
586
|
"icon-only": "",
|
|
@@ -628,7 +628,7 @@ var he = { class: "nb-date-picker__col" }, ge = [
|
|
|
628
628
|
}, [(pt.value || U.value) && !w(A) ? (x(), m("div", we, [h("label", {
|
|
629
629
|
for: Ve.value,
|
|
630
630
|
class: "nb-date-picker__inner-label"
|
|
631
|
-
}, [g(C(pt.value) + " ", 1), v.required ? (x(), m("span", Ee, "*")) : p("", !0)], 8, Te), U.value ? (x(), f(
|
|
631
|
+
}, [g(C(pt.value) + " ", 1), v.required ? (x(), m("span", Ee, "*")) : p("", !0)], 8, Te), U.value ? (x(), f(o, {
|
|
632
632
|
key: 0,
|
|
633
633
|
variant: U.value.variant,
|
|
634
634
|
"icon-only": "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Button-
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
3
3
|
import { t as n } from "./Icon-B2tiGiqZ.js";
|
|
4
4
|
import { useStableId as r } from "./composables/useStableId.composable.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Button-CGIbF1e-.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./composables/useSurfaceLayer.composable.cjs`),a=require(`./composables/useNbStrings.composable.cjs`);let o=require(`vue`),s=require(`@nubisco/ui/icons/x`),c=require(`@nubisco/ui/icons/circle-notch`);var l=function(e){return e.Primary=`primary`,e.Secondary=`secondary`,e.Ghost=`ghost`,e.Danger=`danger`,e.Success=`success`,e.Warning=`warning`,e}(l||{}),u=function(e){return e.Idle=`idle`,e.Loading=`loading`,e.Success=`success`,e}(u||{}),d={key:0,class:`nb-file-uploader__heading`},f={key:1,class:`nb-file-uploader__description`},p={class:`nb-file-uploader__drop-label`},m=[`accept`,`multiple`,`disabled`],h={key:4,class:`nb-file-uploader__list`},g={class:`nb-file-uploader__name`},_={class:`nb-file-uploader__status`},v=[`id`],y=(0,o.defineComponent)({__name:`FileUploader`,props:{heading:{},description:{},buttonLabel:{default:`Add file`},variant:{default:l.Primary},accept:{},multiple:{type:Boolean,default:!1},maxSize:{},disabled:{type:Boolean,default:!1},id:{}},emits:[`change`,`remove`],setup(t,{expose:l,emit:y}){let b=t,{layerProps:x}=i.useSurfaceLayer(),S=r.useStableId({}),C=a.useNbStrings(),w=y,T=(0,o.ref)(null),E=(0,o.ref)([]),D=(0,o.ref)(!1),O=0;(0,o.watch)(()=>b.disabled,e=>{e&&(O=0,D.value=!1)});function k(){b.disabled||T.value?.click()}function A(e){if(b.maxSize&&e.size>b.maxSize)return`File exceeds size limit.`;if(b.accept){let t=b.accept.split(`,`).map(e=>e.trim().toLowerCase()),n=e.name.toLowerCase();if(!t.some(t=>t.startsWith(`.`)?n.endsWith(t):t.includes(`/`)?e.type===t||e.type.startsWith(t.replaceAll(`*`,``)):!1))return`File type not accepted.`}}function j(e){let t=Array.from(e);b.multiple||(E.value=[]);for(let e of t){let t=A(e);E.value.push({file:e,status:u.Idle,error:t})}w(`change`,E.value.filter(e=>!e.error).map(e=>e.file))}function M(e){let t=e.target;if(b.disabled){t.value=``;return}t.files?.length&&(j(t.files),t.value=``)}function N(){b.disabled||(O++,D.value=!0)}function P(){O--,O<=0&&(O=0,D.value=!1)}function F(e){b.disabled&&e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}function I(e){if(O=0,D.value=!1,b.disabled)return;let t=e.dataTransfer?.files;t?.length&&j(t)}function L(e){if(b.disabled)return;let t=E.value[e];E.value.splice(e,1),w(`remove`,t.file),w(`change`,E.value.filter(e=>!e.error).map(e=>e.file))}function R(e,t,n){E.value[e]&&(E.value[e].status=t,E.value[e].error=n)}return l({files:E,setFileStatus:R}),(r,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,(0,o.mergeProps)({class:[`nb-file-uploader`,{"nb-file-uploader--disabled":t.disabled}]},(0,o.unref)(x),{onDragenter:(0,o.withModifiers)(N,[`prevent`]),onDragover:(0,o.withModifiers)(F,[`prevent`]),onDragleave:(0,o.withModifiers)(P,[`prevent`]),onDrop:(0,o.withModifiers)(I,[`prevent`])}),[t.heading?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,d,(0,o.toDisplayString)(t.heading),1)):(0,o.createCommentVNode)(``,!0),t.description?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,f,(0,o.toDisplayString)(t.description),1)):(0,o.createCommentVNode)(``,!0),D.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:2,class:(0,o.normalizeClass)([`nb-file-uploader__dropzone`,`nb-file-uploader__dropzone--${t.variant}`])},[(0,o.createElementVNode)(`span`,p,(0,o.toDisplayString)((0,o.unref)(C).fileUploaderDropHint),1)],2)):((0,o.openBlock)(),(0,o.createBlock)(e.t,{key:3,class:`nb-file-uploader__btn`,variant:t.variant,disabled:t.disabled,onClick:(0,o.withModifiers)(k,[`stop`])},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.buttonLabel),1)]),_:1},8,[`variant`,`disabled`])),(0,o.createElementVNode)(`input`,{ref_key:`inputRef`,ref:T,type:`file`,class:`nb-file-uploader__input`,hidden:``,accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:M},null,40,m),E.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`ul`,h,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(E.value,(r,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`li`,{key:i,class:(0,o.normalizeClass)([`nb-file-uploader__item`,{"nb-file-uploader__item--error":r.error,"nb-file-uploader__item--success":r.status===`success`}])},[(0,o.createElementVNode)(`span`,g,(0,o.toDisplayString)(r.file.name),1),(0,o.createElementVNode)(`span`,_,[r.status===`loading`?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,name:(0,o.unref)(c.regular),class:`nb-file-uploader__spinner`},null,8,[`name`])):r.status===`success`?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:1,name:`check-circle-fill`,class:`nb-file-uploader__check`})):(0,o.createCommentVNode)(``,!0),r.error?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:2,name:`warning-circle-fill`,class:`nb-file-uploader__warn`})):(0,o.createCommentVNode)(``,!0),r.status===`loading`?(0,o.createCommentVNode)(``,!0):((0,o.openBlock)(),(0,o.createBlock)(e.t,{key:3,variant:`ghost`,icon:(0,o.unref)(s.regular),size:`xs`,class:`nb-file-uploader__remove`,label:(0,o.unref)(C).fileUploaderRemove,"aria-label":(0,o.unref)(C).fileUploaderRemoveFile(r.file.name),"aria-describedby":r.error?`${(0,o.unref)(S)}-error-${i}`:void 0,disabled:t.disabled,onClick:e=>L(i)},null,8,[`icon`,`label`,`aria-label`,`aria-describedby`,`disabled`,`onClick`]))]),r.error?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,id:`${(0,o.unref)(S)}-error-${i}`,class:`nb-file-uploader__error`,role:`alert`},(0,o.toDisplayString)(r.error),9,v)):(0,o.createCommentVNode)(``,!0)],2))),128))])):(0,o.createCommentVNode)(``,!0)],16))}}),b=t.t(y,[[`__scopeId`,`data-v-7e0b7153`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Grid-
|
|
1
|
+
import { t as e } from "./Grid-BVIhOyQ1.js";
|
|
2
2
|
import { createBlock as t, createCommentVNode as n, createTextVNode as r, defineComponent as i, openBlock as a, renderSlot as o, toDisplayString as s, withCtx as c } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/components/Form.vue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Grid-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Grid-tn5_R2fP.cjs`);let t=require(`vue`);var n=(0,t.defineComponent)({__name:`Form`,props:{title:{default:void 0}},setup(n){return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(e.t,{is:`form`,dir:`col`,gap:`md`,class:`nb-form`},{default:(0,t.withCtx)(()=>[n.title?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:0,is:`h4`,class:`nb-form--header`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.title),1)]),_:1})):(0,t.createCommentVNode)(``,!0),r.$slots.message?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:1,is:`p`,class:`nb-form--message`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`message`)]),_:3})):(0,t.createCommentVNode)(``,!0),r.$slots.default?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:2,is:`div`,dir:`col`,gap:`sm`,class:`nb-form--body`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`default`)]),_:3})):(0,t.createCommentVNode)(``,!0),r.$slots.footer?((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:3,is:`footer`,class:`nb-form--footer`,justify:`end`},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`footer`)]),_:3})):(0,t.createCommentVNode)(``,!0)]),_:3}))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-MlQ_k4iu.cjs`),r=require(`./ChartLegend-COJeG-2B.cjs`),i=require(`./scales-BRSHTjbp.cjs`);let a=require(`vue`);var o={class:`nb-gantt__list-body`},s=[`onClick`],c={class:`nb-gantt__list-group-label`},l=[`onMouseenter`],u=[`title`],d=[`width`],f={class:`nb-gantt__time-header`},p=[`x`,`y`],m=[`x1`,`x2`],h=[`width`,`height`,`aria-label`],g={key:0},_=[`x1`,`x2`,`y2`],v=[`y`,`width`,`height`],y=[`x1`,`x2`,`y2`],b=[`x`,`y`,`width`,`height`],x=[`points`],ee=[`points`],te=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMousemove`],ne=[`x`,`y`,`width`,`height`,`fill`],re=[`points`,`fill`,`onMouseenter`,`onMousemove`],ie=[`d`],ae=[`points`],oe=[`y`,`width`,`height`,`onMouseenter`],S=40,C=(0,a.defineComponent)({__name:`GanttChart`,props:{tasks:{default:()=>[]},dependencies:{default:()=>[]},groups:{default:()=>[]},timeScale:{default:`week`},locale:{default:void 0},rowHeight:{default:36},listWidth:{default:200},showTodayMarker:{type:Boolean,default:!0},today:{default:void 0},showProgress:{type:Boolean,default:!0},statusColors:{default:void 0},title:{default:void 0},subtitle:{default:void 0},height:{default:400},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>n.n}},setup(e){let C=t.useNbStrings(),w=e,T=(0,a.computed)(()=>w.locale||(typeof navigator<`u`?navigator.language:``)||`en`),E={default:n.r(1),"on-track":n.r(3),"at-risk":n.r(4),behind:n.r(5),complete:n.r(2)},D=(0,a.computed)(()=>({...E,...w.statusColors})),O=(0,a.computed)(()=>Math.round(w.rowHeight*.22)),k=(0,a.computed)(()=>w.rowHeight-O.value*2),A=(0,a.computed)(()=>Math.round(w.rowHeight*.28)),j=(0,a.ref)(new Set((w.groups??[]).filter(e=>e.collapsed).map(e=>e.id))),se=e=>{let t=new Set(j.value);t.has(e)?t.delete(e):t.add(e),j.value=t},ce=(0,a.computed)(()=>(w.groups?.length??0)>0),M=(0,a.computed)(()=>{let e=w.tasks??[],t=w.groups??[];if(!t.length)return e.map(e=>({id:e.id,label:e.label,type:`task`,milestone:e.milestone}));let n=[],r=new Map(t.map(e=>[e.id,e])),i=new Map,a=[];for(let t of e)if(t.group&&r.has(t.group)){let e=i.get(t.group)??[];e.push(t),i.set(t.group,e)}else a.push(t);for(let e of t)if(n.push({id:e.id,label:e.label,type:`group`}),!j.value.has(e.id))for(let t of i.get(e.id)??[])n.push({id:t.id,label:t.label,type:`task`,milestone:t.milestone,indent:!0});for(let e of a)n.push({id:e.id,label:e.label,type:`task`,milestone:e.milestone});return n}),le=(0,a.computed)(()=>M.value.filter(e=>e.type===`task`)),N=(0,a.computed)(()=>{let e=new Map;return M.value.forEach((t,n)=>e.set(t.id,n)),e}),P=e=>typeof e==`string`?new Date(e).getTime():e.getTime(),F=(0,a.computed)(()=>{let e=w.tasks??[];if(!e.length){let e=Date.now();return[e,e+7*864e5]}let t=1/0,n=-1/0;for(let r of e){let e=P(r.start),i=r.end?P(r.end):e;e<t&&(t=e),i>n&&(n=i)}let r=I(w.timeScale);return[t-r,n+r]}),I=e=>{let t=864e5;return e===`day`?t:e===`week`?7*t:e===`month`?30*t:e===`quarter`?91*t:365*t},L=(0,a.computed)(()=>{let e=w.timeScale;return e===`day`?40:e===`week`?120:e===`month`?180:e===`quarter`?240:360}),R=(0,a.computed)(()=>L.value/I(w.timeScale)),z=(0,a.computed)(()=>F.value[0]),B=(0,a.computed)(()=>Math.max(200,Math.ceil((F.value[1]-F.value[0])*R.value))),V=(0,a.computed)(()=>M.value.length*w.rowHeight),H=(0,a.computed)(()=>i.a(new Date(F.value[0]),new Date(F.value[1]),w.timeScale,R.value,z.value)),U=(0,a.computed)(()=>{if(!w.showTodayMarker)return null;let e=i.n(w.today?new Date(w.today):new Date,z.value,R.value);return e<0||e>B.value?null:e}),W=(e,t)=>e.color?e.color:e.status&&e.status!==`default`?D.value[e.status]:n.i(t,w.colors),G=e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(T.value,{month:`short`,day:`numeric`,year:`numeric`}),ue=(0,a.computed)(()=>(w.tasks??[]).filter(e=>!e.milestone&&e.end).map((e,t)=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=i.n(e.start,z.value,R.value),a=i.n(e.end,z.value,R.value);return{id:e.id,x:r,y:n*w.rowHeight,width:Math.max(a-r,4),color:W(e,t),status:e.status??`default`,progress:e.progress??0,label:e.label,start:G(e.start),end:G(e.end)}}).filter(Boolean)),de=(0,a.computed)(()=>(w.tasks??[]).filter(e=>e.milestone).map((e,t)=>{let n=N.value.get(e.id);return n===void 0?null:{id:e.id,x:i.n(e.start,z.value,R.value),y:n*w.rowHeight,color:W(e,t),label:e.label,date:G(e.start)}}).filter(Boolean)),fe=(0,a.computed)(()=>{let e=w.groups??[],t=w.tasks??[];return e.length?e.map(e=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=t.filter(t=>t.group===e.id);if(!r.length)return null;let a=1/0,o=-1/0;for(let e of r){let t=P(e.start),n=e.end?P(e.end):t;t<a&&(a=t),n>o&&(o=n)}let s=i.n(new Date(a),z.value,R.value),c=i.n(new Date(o),z.value,R.value);return{id:e.id,x:s,y:n*w.rowHeight,width:Math.max(c-s,4)}}).filter(Boolean):[]}),K=(e,t)=>`${e},${t} ${e-5},${t+5} ${e+5},${t+5}`,q=(e,t,n)=>`${e},${t-n} ${e+n},${t} ${e},${t+n} ${e-n},${t}`,J=(0,a.computed)(()=>{let e=w.dependencies??[];if(!e.length)return[];let t=new Map((w.tasks??[]).map(e=>[e.id,e]));return e.map(e=>{let n=t.get(e.from),r=t.get(e.to);if(!n||!r)return null;let a=N.value.get(e.from),o=N.value.get(e.to);if(a===void 0||o===void 0)return null;let s=e.type??`finish-to-start`,c=w.rowHeight,l,u,d,f;s===`finish-to-start`?(l=n.milestone?i.n(n.start,z.value,R.value)+A.value:i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=r.milestone?i.n(r.start,z.value,R.value)-A.value:i.n(r.start,z.value,R.value),f=o*c+c/2):s===`start-to-start`?(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.start,z.value,R.value),f=o*c+c/2):s===`finish-to-finish`?(l=i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2):(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2);let p=l+(d-l)*.5,m=d>l+12?`M${l},${u} H${p} V${f} H${d}`:`M${l},${u} H${l+12} V${(u+f)/2} H${d-12} V${f} H${d}`,h=d,g=f;return{path:m,arrowhead:`${h},${g} ${h-6},${g-4} ${h-6},${g+4}`}}).filter(Boolean)}),Y=(0,a.ref)(null),X=(0,a.ref)(null),Z=(0,a.reactive)({x:0,y:0}),Q=(0,a.ref)(null),pe=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Start`,value:t.start,color:t.color},{label:`End`,value:t.end,color:t.color},...t.progress>0?[{label:`Progress`,value:`${t.progress}%`,color:t.color}]:[]]}},me=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Date`,value:t.date,color:t.color}]}},$=(0,a.computed)(()=>{let e=new Set;for(let t of w.tasks??[])e.add(t.status??`default`);let t={default:`Default`,"on-track":`On track`,"at-risk":`At risk`,behind:`Behind`,complete:`Complete`};return Array.from(e).map(e=>({label:t[e],color:D.value[e]}))});return(t,i)=>((0,a.openBlock)(),(0,a.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&$.value.length>1},{legend:(0,a.withCtx)(()=>[(0,a.createVNode)(r.t,{items:$.value},null,8,[`items`])]),default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{class:(0,a.normalizeClass)([`nb-gantt`,{"nb-gantt--has-groups":ce.value}])},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list`,style:(0,a.normalizeStyle)({width:`${e.listWidth}px`})},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list-header`,style:(0,a.normalizeStyle)({height:`${S}px`})},` Tasks `,4),(0,a.createElementVNode)(`div`,o,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:t.id},[t.type===`group`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:`nb-gantt__list-group`,style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`}),onClick:e=>se(t.id)},[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-gantt__list-caret`,{"is-collapsed":j.value.has(t.id)}])},`▸`,2),(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)(t.label),1)],12,s)):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:(0,a.normalizeClass)([`nb-gantt__list-row`,{"is-hovered":X.value===t.id,"is-milestone":t.milestone}]),style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`,paddingLeft:t.indent?`20px`:void 0}),onMouseenter:e=>X.value=t.id,onMouseleave:i[0]||=e=>X.value=null},[(0,a.createElementVNode)(`span`,{class:`nb-gantt__list-label`,title:t.label},(0,a.toDisplayString)(t.label),9,u)],46,l))],64))),128))])],4),(0,a.createElementVNode)(`div`,{ref_key:`timelineEl`,ref:Y,class:`nb-gantt__timeline`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__header-svg`,width:B.value,height:S},[(0,a.createElementVNode)(`g`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`th-${t}`,x:e.x+4,y:S-6,class:`nb-gantt__time-label`},(0,a.toDisplayString)(e.label),9,p))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`tl-${t}`,x1:e.x,x2:e.x,y1:0,y2:S,class:`nb-gantt__header-gridline`},null,8,m))),128))])],8,d)),((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__svg`,width:B.value,height:V.value,role:`img`,"aria-label":e.title||(0,a.unref)(C).chartGantt,onMouseleave:i[4]||=e=>X.value=null},[e.showGrid?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,g,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${t}`,class:`nb-gantt__gridline`,x1:e.x,x2:e.x,y1:0,y2:V.value},null,8,_))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`stripe-${t.id}`,class:(0,a.normalizeClass)([`nb-gantt__row-stripe`,{"is-even":n%2==0,"is-group":t.type===`group`}]),x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight},null,10,v))),128))]),e.showTodayMarker&&U.value!==null?((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:1,class:`nb-gantt__today-line`,x1:U.value,x2:U.value,y1:0,y2:V.value},null,8,y)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(fe.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`summary-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:`nb-gantt__summary-bar`,x:t.x,y:t.y+e.rowHeight*.35,width:Math.max(t.width,2),height:e.rowHeight*.3,rx:`2`},null,8,b),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x,t.y+e.rowHeight*.65)},null,8,x),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x+t.width,t.y+e.rowHeight*.65)},null,8,ee)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(ue.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`bar-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:(0,a.normalizeClass)([`nb-gantt__bar`,[`nb-gantt__bar--${t.status}`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]]),x:t.x,y:t.y+O.value,width:Math.max(t.width,4),height:k.value,rx:`3`,fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[1]||=e=>X.value=null,onMousemove:e=>pe(e,t)},null,42,te),e.showProgress&&t.progress>0?((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:0,class:`nb-gantt__bar-progress`,x:t.x,y:t.y+O.value,width:Math.max(t.width*(t.progress/100),2),height:k.value,rx:`3`,fill:t.color,"pointer-events":`none`},null,8,ne)):(0,a.createCommentVNode)(``,!0)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(de.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`ms-${t.id}`},[(0,a.createElementVNode)(`polygon`,{class:(0,a.normalizeClass)([`nb-gantt__milestone`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]),points:q(t.x,t.y+e.rowHeight/2,A.value),fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[2]||=e=>X.value=null,onMousemove:e=>me(e,t)},null,42,re)]))),128)),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:`dep-${t}`,class:`nb-gantt__dependency`,d:e.path,fill:`none`},null,8,ie))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`polygon`,{key:`dep-arrow-${t}`,class:`nb-gantt__dependency-arrow`,points:e.arrowhead},null,8,ae))),128))]),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(le.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`hover-${t.id}`,x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight,fill:`transparent`,onMouseenter:e=>X.value=t.id,onMouseleave:i[3]||=e=>X.value=null},null,40,oe))),128))])],40,h)),(0,a.createVNode)(n.l,{visible:e.showTooltip&&X.value!==null&&Q.value!==null,x:Z.x,y:Z.y,title:Q.value?.title??``,rows:Q.value?.rows??[]},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)],2)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),w=e.t(C,[[`__scopeId`,`data-v-b4a32e39`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-DxWvvteq.cjs`),r=require(`./ChartLegend-DMxlEhT6.cjs`),i=require(`./scales-Dbh3TYrl.cjs`);let a=require(`vue`);var o={class:`nb-gantt__list-body`},s=[`onClick`],c={class:`nb-gantt__list-group-label`},l=[`onMouseenter`],u=[`title`],d=[`width`],f={class:`nb-gantt__time-header`},p=[`x`,`y`],m=[`x1`,`x2`],h=[`width`,`height`,`aria-label`],g={key:0},_=[`x1`,`x2`,`y2`],v=[`y`,`width`,`height`],y=[`x1`,`x2`,`y2`],b=[`x`,`y`,`width`,`height`],x=[`points`],ee=[`points`],te=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMousemove`],ne=[`x`,`y`,`width`,`height`,`fill`],re=[`points`,`fill`,`onMouseenter`,`onMousemove`],ie=[`d`],ae=[`points`],oe=[`y`,`width`,`height`,`onMouseenter`],S=40,C=(0,a.defineComponent)({__name:`GanttChart`,props:{tasks:{default:()=>[]},dependencies:{default:()=>[]},groups:{default:()=>[]},timeScale:{default:`week`},locale:{default:void 0},rowHeight:{default:36},listWidth:{default:200},showTodayMarker:{type:Boolean,default:!0},today:{default:void 0},showProgress:{type:Boolean,default:!0},statusColors:{default:void 0},title:{default:void 0},subtitle:{default:void 0},height:{default:400},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>n.n}},setup(e){let C=t.useNbStrings(),w=e,T=(0,a.computed)(()=>w.locale||(typeof navigator<`u`?navigator.language:``)||`en`),E={default:n.r(1),"on-track":n.r(3),"at-risk":n.r(4),behind:n.r(5),complete:n.r(2)},D=(0,a.computed)(()=>({...E,...w.statusColors})),O=(0,a.computed)(()=>Math.round(w.rowHeight*.22)),k=(0,a.computed)(()=>w.rowHeight-O.value*2),A=(0,a.computed)(()=>Math.round(w.rowHeight*.28)),j=(0,a.ref)(new Set((w.groups??[]).filter(e=>e.collapsed).map(e=>e.id))),se=e=>{let t=new Set(j.value);t.has(e)?t.delete(e):t.add(e),j.value=t},ce=(0,a.computed)(()=>(w.groups?.length??0)>0),M=(0,a.computed)(()=>{let e=w.tasks??[],t=w.groups??[];if(!t.length)return e.map(e=>({id:e.id,label:e.label,type:`task`,milestone:e.milestone}));let n=[],r=new Map(t.map(e=>[e.id,e])),i=new Map,a=[];for(let t of e)if(t.group&&r.has(t.group)){let e=i.get(t.group)??[];e.push(t),i.set(t.group,e)}else a.push(t);for(let e of t)if(n.push({id:e.id,label:e.label,type:`group`}),!j.value.has(e.id))for(let t of i.get(e.id)??[])n.push({id:t.id,label:t.label,type:`task`,milestone:t.milestone,indent:!0});for(let e of a)n.push({id:e.id,label:e.label,type:`task`,milestone:e.milestone});return n}),le=(0,a.computed)(()=>M.value.filter(e=>e.type===`task`)),N=(0,a.computed)(()=>{let e=new Map;return M.value.forEach((t,n)=>e.set(t.id,n)),e}),P=e=>typeof e==`string`?new Date(e).getTime():e.getTime(),F=(0,a.computed)(()=>{let e=w.tasks??[];if(!e.length){let e=Date.now();return[e,e+7*864e5]}let t=1/0,n=-1/0;for(let r of e){let e=P(r.start),i=r.end?P(r.end):e;e<t&&(t=e),i>n&&(n=i)}let r=I(w.timeScale);return[t-r,n+r]}),I=e=>{let t=864e5;return e===`day`?t:e===`week`?7*t:e===`month`?30*t:e===`quarter`?91*t:365*t},L=(0,a.computed)(()=>{let e=w.timeScale;return e===`day`?40:e===`week`?120:e===`month`?180:e===`quarter`?240:360}),R=(0,a.computed)(()=>L.value/I(w.timeScale)),z=(0,a.computed)(()=>F.value[0]),B=(0,a.computed)(()=>Math.max(200,Math.ceil((F.value[1]-F.value[0])*R.value))),V=(0,a.computed)(()=>M.value.length*w.rowHeight),H=(0,a.computed)(()=>i.a(new Date(F.value[0]),new Date(F.value[1]),w.timeScale,R.value,z.value)),U=(0,a.computed)(()=>{if(!w.showTodayMarker)return null;let e=i.n(w.today?new Date(w.today):new Date,z.value,R.value);return e<0||e>B.value?null:e}),W=(e,t)=>e.color?e.color:e.status&&e.status!==`default`?D.value[e.status]:n.i(t,w.colors),G=e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(T.value,{month:`short`,day:`numeric`,year:`numeric`}),ue=(0,a.computed)(()=>(w.tasks??[]).filter(e=>!e.milestone&&e.end).map((e,t)=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=i.n(e.start,z.value,R.value),a=i.n(e.end,z.value,R.value);return{id:e.id,x:r,y:n*w.rowHeight,width:Math.max(a-r,4),color:W(e,t),status:e.status??`default`,progress:e.progress??0,label:e.label,start:G(e.start),end:G(e.end)}}).filter(Boolean)),de=(0,a.computed)(()=>(w.tasks??[]).filter(e=>e.milestone).map((e,t)=>{let n=N.value.get(e.id);return n===void 0?null:{id:e.id,x:i.n(e.start,z.value,R.value),y:n*w.rowHeight,color:W(e,t),label:e.label,date:G(e.start)}}).filter(Boolean)),fe=(0,a.computed)(()=>{let e=w.groups??[],t=w.tasks??[];return e.length?e.map(e=>{let n=N.value.get(e.id);if(n===void 0)return null;let r=t.filter(t=>t.group===e.id);if(!r.length)return null;let a=1/0,o=-1/0;for(let e of r){let t=P(e.start),n=e.end?P(e.end):t;t<a&&(a=t),n>o&&(o=n)}let s=i.n(new Date(a),z.value,R.value),c=i.n(new Date(o),z.value,R.value);return{id:e.id,x:s,y:n*w.rowHeight,width:Math.max(c-s,4)}}).filter(Boolean):[]}),K=(e,t)=>`${e},${t} ${e-5},${t+5} ${e+5},${t+5}`,q=(e,t,n)=>`${e},${t-n} ${e+n},${t} ${e},${t+n} ${e-n},${t}`,J=(0,a.computed)(()=>{let e=w.dependencies??[];if(!e.length)return[];let t=new Map((w.tasks??[]).map(e=>[e.id,e]));return e.map(e=>{let n=t.get(e.from),r=t.get(e.to);if(!n||!r)return null;let a=N.value.get(e.from),o=N.value.get(e.to);if(a===void 0||o===void 0)return null;let s=e.type??`finish-to-start`,c=w.rowHeight,l,u,d,f;s===`finish-to-start`?(l=n.milestone?i.n(n.start,z.value,R.value)+A.value:i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=r.milestone?i.n(r.start,z.value,R.value)-A.value:i.n(r.start,z.value,R.value),f=o*c+c/2):s===`start-to-start`?(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.start,z.value,R.value),f=o*c+c/2):s===`finish-to-finish`?(l=i.n(n.end??n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2):(l=i.n(n.start,z.value,R.value),u=a*c+c/2,d=i.n(r.end??r.start,z.value,R.value),f=o*c+c/2);let p=l+(d-l)*.5,m=d>l+12?`M${l},${u} H${p} V${f} H${d}`:`M${l},${u} H${l+12} V${(u+f)/2} H${d-12} V${f} H${d}`,h=d,g=f;return{path:m,arrowhead:`${h},${g} ${h-6},${g-4} ${h-6},${g+4}`}}).filter(Boolean)}),Y=(0,a.ref)(null),X=(0,a.ref)(null),Z=(0,a.reactive)({x:0,y:0}),Q=(0,a.ref)(null),pe=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Start`,value:t.start,color:t.color},{label:`End`,value:t.end,color:t.color},...t.progress>0?[{label:`Progress`,value:`${t.progress}%`,color:t.color}]:[]]}},me=(e,t)=>{if(!Y.value)return;let n=Y.value.getBoundingClientRect();Z.x=e.clientX-n.left+12,Z.y=e.clientY-n.top+12,X.value=t.id,Q.value={title:t.label,rows:[{label:`Date`,value:t.date,color:t.color}]}},$=(0,a.computed)(()=>{let e=new Set;for(let t of w.tasks??[])e.add(t.status??`default`);let t={default:`Default`,"on-track":`On track`,"at-risk":`At risk`,behind:`Behind`,complete:`Complete`};return Array.from(e).map(e=>({label:t[e],color:D.value[e]}))});return(t,i)=>((0,a.openBlock)(),(0,a.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&$.value.length>1},{legend:(0,a.withCtx)(()=>[(0,a.createVNode)(r.t,{items:$.value},null,8,[`items`])]),default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{class:(0,a.normalizeClass)([`nb-gantt`,{"nb-gantt--has-groups":ce.value}])},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list`,style:(0,a.normalizeStyle)({width:`${e.listWidth}px`})},[(0,a.createElementVNode)(`div`,{class:`nb-gantt__list-header`,style:(0,a.normalizeStyle)({height:`${S}px`})},` Tasks `,4),(0,a.createElementVNode)(`div`,o,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:t.id},[t.type===`group`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:`nb-gantt__list-group`,style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`}),onClick:e=>se(t.id)},[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)([`nb-gantt__list-caret`,{"is-collapsed":j.value.has(t.id)}])},`▸`,2),(0,a.createElementVNode)(`span`,c,(0,a.toDisplayString)(t.label),1)],12,s)):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:(0,a.normalizeClass)([`nb-gantt__list-row`,{"is-hovered":X.value===t.id,"is-milestone":t.milestone}]),style:(0,a.normalizeStyle)({height:`${e.rowHeight}px`,paddingLeft:t.indent?`20px`:void 0}),onMouseenter:e=>X.value=t.id,onMouseleave:i[0]||=e=>X.value=null},[(0,a.createElementVNode)(`span`,{class:`nb-gantt__list-label`,title:t.label},(0,a.toDisplayString)(t.label),9,u)],46,l))],64))),128))])],4),(0,a.createElementVNode)(`div`,{ref_key:`timelineEl`,ref:Y,class:`nb-gantt__timeline`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__header-svg`,width:B.value,height:S},[(0,a.createElementVNode)(`g`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`th-${t}`,x:e.x+4,y:S-6,class:`nb-gantt__time-label`},(0,a.toDisplayString)(e.label),9,p))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`tl-${t}`,x1:e.x,x2:e.x,y1:0,y2:S,class:`nb-gantt__header-gridline`},null,8,m))),128))])],8,d)),((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{class:`nb-gantt__svg`,width:B.value,height:V.value,role:`img`,"aria-label":e.title||(0,a.unref)(C).chartGantt,onMouseleave:i[4]||=e=>X.value=null},[e.showGrid?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,g,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(H.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${t}`,class:`nb-gantt__gridline`,x1:e.x,x2:e.x,y1:0,y2:V.value},null,8,_))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(M.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`stripe-${t.id}`,class:(0,a.normalizeClass)([`nb-gantt__row-stripe`,{"is-even":n%2==0,"is-group":t.type===`group`}]),x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight},null,10,v))),128))]),e.showTodayMarker&&U.value!==null?((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:1,class:`nb-gantt__today-line`,x1:U.value,x2:U.value,y1:0,y2:V.value},null,8,y)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(fe.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`summary-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:`nb-gantt__summary-bar`,x:t.x,y:t.y+e.rowHeight*.35,width:Math.max(t.width,2),height:e.rowHeight*.3,rx:`2`},null,8,b),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x,t.y+e.rowHeight*.65)},null,8,x),(0,a.createElementVNode)(`polygon`,{class:`nb-gantt__summary-caret`,points:K(t.x+t.width,t.y+e.rowHeight*.65)},null,8,ee)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(ue.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`bar-${t.id}`},[(0,a.createElementVNode)(`rect`,{class:(0,a.normalizeClass)([`nb-gantt__bar`,[`nb-gantt__bar--${t.status}`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]]),x:t.x,y:t.y+O.value,width:Math.max(t.width,4),height:k.value,rx:`3`,fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[1]||=e=>X.value=null,onMousemove:e=>pe(e,t)},null,42,te),e.showProgress&&t.progress>0?((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:0,class:`nb-gantt__bar-progress`,x:t.x,y:t.y+O.value,width:Math.max(t.width*(t.progress/100),2),height:k.value,rx:`3`,fill:t.color,"pointer-events":`none`},null,8,ne)):(0,a.createCommentVNode)(``,!0)]))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(de.value,t=>((0,a.openBlock)(),(0,a.createElementBlock)(`g`,{key:`ms-${t.id}`},[(0,a.createElementVNode)(`polygon`,{class:(0,a.normalizeClass)([`nb-gantt__milestone`,{"is-hovered":X.value===t.id,"is-dim":X.value!==null&&X.value!==t.id}]),points:q(t.x,t.y+e.rowHeight/2,A.value),fill:t.color,onMouseenter:e=>X.value=t.id,onMouseleave:i[2]||=e=>X.value=null,onMousemove:e=>me(e,t)},null,42,re)]))),128)),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:`dep-${t}`,class:`nb-gantt__dependency`,d:e.path,fill:`none`},null,8,ie))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(J.value,(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`polygon`,{key:`dep-arrow-${t}`,class:`nb-gantt__dependency-arrow`,points:e.arrowhead},null,8,ae))),128))]),(0,a.createElementVNode)(`g`,null,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(le.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`rect`,{key:`hover-${t.id}`,x:0,y:n*e.rowHeight,width:B.value,height:e.rowHeight,fill:`transparent`,onMouseenter:e=>X.value=t.id,onMouseleave:i[3]||=e=>X.value=null},null,40,oe))),128))])],40,h)),(0,a.createVNode)(n.l,{visible:e.showTooltip&&X.value!==null&&Q.value!==null,x:Z.x,y:Z.y,title:Q.value?.title??``,rows:Q.value?.rows??[]},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)],2)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),w=e.t(C,[[`__scopeId`,`data-v-b4a32e39`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return w}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { useNbStrings as t } from "./composables/useNbStrings.composable.mjs";
|
|
3
|
-
import { i as n, l as r, n as i, r as a, u as o } from "./palette-
|
|
4
|
-
import { t as s } from "./ChartLegend-
|
|
5
|
-
import { a as c, n as l } from "./scales-
|
|
3
|
+
import { i as n, l as r, n as i, r as a, u as o } from "./palette-4rzDlIAy.js";
|
|
4
|
+
import { t as s } from "./ChartLegend-CQQwcGvz.js";
|
|
5
|
+
import { a as c, n as l } from "./scales-TfA6Pl4e.js";
|
|
6
6
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, openBlock as b, reactive as ee, ref as x, renderList as S, toDisplayString as C, unref as te, withCtx as w } from "vue";
|
|
7
7
|
//#region src/components/Charts/GanttChart.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var T = { class: "nb-gantt__list-body" }, ne = ["onClick"], re = { class: "nb-gantt__list-group-label" }, ie = ["onMouseenter"], ae = ["title"], oe = ["width"], E = { class: "nb-gantt__time-header" }, se = ["x", "y"], ce = ["x1", "x2"], le = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./Grid-BOtE_jXr.cjs`),n=require(`./vue-i18n-D8JKgg8C.cjs`);let r=require(`vue`);var i=function(e){return e.TopLeft=`top-left`,e.Top=`top`,e.TopRight=`top-right`,e.Right=`right`,e.BottomRight=`bottom-right`,e.Bottom=`bottom`,e.BottomLeft=`bottom-left`,e.Left=`left`,e}(i||{}),a={class:`nb-image-cropper`},o=[`onMousedown`,`onTouchstart`],s=[`src`,`alt`],c=700,l=400,u=(0,r.defineComponent)({__name:`ImageCropper`,props:{image:{},cropAsCircle:{type:Boolean,default:!1},outputAsCircle:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!1}},emits:[`crop`],setup(e,{emit:u}){let d={en:{X:`X`,Y:`Y`,WIDTH:`Width`,HEIGHT:`Height`,IMAGE_THUMBNAIL:`Cropped preview`},pt:{X:`X`,Y:`Y`,WIDTH:`Largura`,HEIGHT:`Altura`,IMAGE_THUMBNAIL:`Pré-visualização recortada`}},{t:f,te:p,locale:m}=n.t({useScope:`global`});function h(e){if(p(e))return f(e);let t=e.slice(7);return d[String(m.value).toLowerCase().split(`-`)[0]]?.[t]??d.en[t]??e}let g=e,_=u,v=(0,r.ref)(null),y=null,b=new Image,x=null,S={x:1,y:1},C=(0,r.ref)({x:50,y:50,width:200,height:200}),w=(0,r.ref)(null),T=(0,r.ref)(null),E=!1,D=!1,O={x:0,y:0},k=!1,A={x:0,y:0},j={x:0,y:0,width:0,height:0},M=null,N=!1,P=[{name:i.TopLeft},{name:i.Top},{name:i.TopRight},{name:i.Right},{name:i.BottomRight},{name:i.Bottom},{name:i.BottomLeft},{name:i.Left}],F=()=>{if(!g.image){console.error(`No image file provided`);return}x&&=(URL.revokeObjectURL(x),null),b.onload=()=>{let{drawWidth:e,drawHeight:t}=I();if(v.value){v.value.width=e,v.value.height=t;let n=(v.value.width-b.width*S.x)/2,r=(v.value.height-b.height*S.y)/2;if(g.cropAsCircle||g.lockAspectRatio){let e=Math.min(b.width*S.x,b.height*S.y)*.5;C.value={x:n+(b.width*S.x-e)/2,y:r+(b.height*S.y-e)/2,width:e,height:e}}else C.value={x:n+(b.width*S.x*.5-b.width*S.x*.25),y:r+(b.height*S.y*.5-b.height*S.y*.25),width:b.width*S.x*.5,height:b.height*S.y*.5};L(),Q()}},b.onerror=()=>{console.error(`Failed to load image`)},x=URL.createObjectURL(g.image),b.src=x};(0,r.onMounted)(()=>{v.value&&(y=v.value.getContext(`2d`),y&&(y.imageSmoothingEnabled=!0,y.imageSmoothingQuality=`high`),g.image&&F())}),(0,r.onBeforeUnmount)(()=>{x&&=(URL.revokeObjectURL(x),null);let e=w.value;e&&(URL.revokeObjectURL(e),w.value=null)}),(0,r.watch)(()=>g.image,e=>{e&&F()}),(0,r.watch)(()=>[g.cropAsCircle,g.outputAsCircle,g.lockAspectRatio],()=>{v.value&&y&&L()});let I=()=>{let e=b.width/b.height,t=c,n=l;return e>c/l?n=c/e:t=l*e,S.x=t/b.width,S.y=n/b.height,{drawWidth:t,drawHeight:n}},L=()=>{if(y&&v.value){y.clearRect(0,0,v.value.width,v.value.height);let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2;y.drawImage(b,0,0,b.width,b.height,e,t,b.width*S.x,b.height*S.y),R()}},R=()=>{y&&v.value&&(y.save(),y.beginPath(),g.cropAsCircle?y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2):y.rect(C.value.x,C.value.y,C.value.width,C.value.height),y.rect(0,0,v.value.width,v.value.height),y.clip(`evenodd`),y.fillStyle=`rgba(0, 0, 0, 0.5)`,y.fillRect(0,0,v.value.width,v.value.height),y.restore(),y.save(),y.strokeStyle=`rgba(255, 255, 255, 0.8)`,y.lineWidth=1,y.setLineDash([5,5]),y.imageSmoothingEnabled=!1,g.cropAsCircle?(y.beginPath(),y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2),y.stroke()):y.strokeRect(C.value.x,C.value.y,C.value.width,C.value.height),y.restore())},z=(0,r.computed)(()=>{if(g.cropAsCircle){let e=C.value.x+C.value.width/2,t=C.value.y+C.value.height/2,n=C.value.width/2;return{"top-left":{left:`${e-n-5}px`,top:`${t-n-5}px`},top:{left:`${e-5}px`,top:`${t-n-5}px`},"top-right":{left:`${e+n-5}px`,top:`${t-n-5}px`},right:{left:`${e+n-5}px`,top:`${t-5}px`},"bottom-right":{left:`${e+n-5}px`,top:`${t+n-5}px`},bottom:{left:`${e-5}px`,top:`${t+n-5}px`},"bottom-left":{left:`${e-n-5}px`,top:`${t+n-5}px`},left:{left:`${e-n-5}px`,top:`${t-5}px`}}}else return{"top-left":{left:`${C.value.x-5}px`,top:`${C.value.y-5}px`},top:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y-5}px`},"top-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y-5}px`},right:{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height/2-5}px`},"bottom-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height-5}px`},bottom:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y+C.value.height-5}px`},"bottom-left":{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height-5}px`},left:{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height/2-5}px`}}}),B=e=>{if(`touches`in e&&e.touches.length>0){let t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}else if(`clientX`in e&&`clientY`in e)return{clientX:e.clientX,clientY:e.clientY};return{clientX:0,clientY:0}},V=e=>{let t=v.value;if(!t)return null;let{clientX:n,clientY:r}=B(e),{left:i,top:a}=t.getBoundingClientRect();return{x:n-i,y:r-a}},H=e=>{e.preventDefault();let t=V(e);if(!t)return;let{x:n,y:r}=t;X(n,r)&&(D=!0,E=!0,O={x:n-C.value.x,y:r-C.value.y})},U=e=>{D?G(e):k&&J(e)},W=()=>{D&&(K(),D=!1,Q()),k&&(Y(),Q()),E=!1,D=!1},G=e=>{if(E){let t=V(e);if(!t)return;let{x:n,y:r}=t;C.value.x=Math.floor(n-O.x),C.value.y=Math.floor(r-O.y),L()}},K=()=>{E&&=(Z(),L(),!1)},q=(e,t)=>{e.preventDefault();let n=V(e);n&&(k=!0,M=t,A={x:n.x,y:n.y},j={...C.value},N=e instanceof MouseEvent&&e.shiftKey)},J=e=>{if(!k)return;if(g.lockAspectRatio&&v.value){let t=V(e);if(!t)return;let{x:n,y:r}=t,i=j.x+j.width/2,a=j.y+j.height/2;if(g.cropAsCircle){let e=Math.max(Math.abs(n-i),Math.abs(r-a)),t=e*2;C.value={x:i-e,y:a-e,width:t,height:t}}else{let e=j.width/j.height,t=Math.abs(n-i),r=Math.max(t*2,50),o=r/e;C.value={x:i-r/2,y:a-o/2,width:r,height:o}}L();return}let t=V(e);if(!t)return;let{x:n,y:r}=t,i=n-A.x,a=r-A.y;N=e instanceof MouseEvent&&e.shiftKey;let o={...j};switch(M){case`top-left`:o.x+=i,o.y+=a,o.width-=i,o.height-=a;break;case`top`:o.y+=a,o.height-=a;break;case`top-right`:o.y+=a,o.width+=i,o.height-=a;break;case`right`:o.width+=i;break;case`bottom-right`:o.width+=i,o.height+=a;break;case`bottom`:o.height+=a;break;case`bottom-left`:o.x+=i,o.width-=i,o.height+=a;break;case`left`:o.x+=i,o.width-=i;break}if(o.width<50&&(o.width=50),o.height<50&&(o.height=50),N&&M){let e=j.width/j.height;[`left`,`right`].includes(M)?(o.height=o.width/e,M===`left`&&(o.y=j.y-(o.height-j.height)/2)):[`top`,`bottom`].includes(M)&&(o.width=o.height*e,M===`top`&&(o.x=j.x-(o.width-j.width)/2))}C.value=o,L()},Y=()=>{k&&(Z(),L(),k=!1,M=null)},X=(e,t)=>{if(g.cropAsCircle){let n=C.value.x+C.value.width/2,r=C.value.y+C.value.height/2,i=C.value.width/2,a=e-n,o=t-r;return a*a+o*o<=i*i}else return e>=C.value.x-2&&e<=C.value.x+C.value.width+2&&t>=C.value.y-2&&t<=C.value.y+C.value.height+2},Z=()=>{let e=v.value.width,t=v.value.height;if(C.value.width<50&&(C.value.width=50),C.value.height<50&&(C.value.height=50),g.lockAspectRatio)if(g.cropAsCircle)C.value.height=C.value.width;else{let e=j.width/j.height;C.value.height=C.value.width/e}else if(N){let e=j.width/j.height;C.value.height=C.value.width/e}if(g.cropAsCircle||g.lockAspectRatio){let n=C.value.width/C.value.height;(C.value.width>e||C.value.height>t)&&(C.value.width>C.value.height?(C.value.width=e,C.value.height=e/n):(C.value.height=t,C.value.width=t*n)),C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)}else C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.width>e&&(C.value.width=e,C.value.x=0),C.value.height>t&&(C.value.height=t,C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)},Q=()=>{if(v.value&&y){let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2,n=(C.value.x-e)/S.x,r=(C.value.y-t)/S.y,i=C.value.width/S.x,a=C.value.height/S.y,o={x:Math.round(n),y:Math.round(r),width:Math.round(i),height:Math.round(a)},s=Math.max(0,Math.min(o.x,b.width)),c=Math.max(0,Math.min(o.y,b.height)),l=Math.min(o.width,b.width-s),u=Math.min(o.height,b.height-c),d=document.createElement(`canvas`);d.width=l,d.height=u;let f=d.getContext(`2d`);f&&(f.drawImage(b,s,c,l,u,0,0,l,u),g.cropAsCircle&&g.outputAsCircle&&(f.globalCompositeOperation=`destination-in`,f.beginPath(),f.arc(l/2,u/2,l/2,0,Math.PI*2),f.closePath(),f.fill(),f.globalCompositeOperation=`source-over`),d.toBlob(e=>{if(e){let t=w.value;t&&URL.revokeObjectURL(t),w.value=URL.createObjectURL(e),T.value=o,_(`crop`,{blob:e,geometry:o})}},`image/jpeg`,.8))}};return(0,r.watch)(()=>g,()=>{Q()},{deep:!0}),(n,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`div`,{class:`canvas-container`,onMousedown:H,onMousemove:U,onMouseup:W,onMouseleave:W,onTouchstart:H,onTouchmove:U,onTouchend:W},[(0,r.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:v},null,512),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(P,e=>(0,r.createElementVNode)(`div`,{key:e.name,class:(0,r.normalizeClass)([`resize-handle`,e.name]),style:(0,r.normalizeStyle)(z.value[e.name]),onMousedown:(0,r.withModifiers)(t=>q(t,e.name),[`stop`]),onTouchstart:(0,r.withModifiers)(t=>q(t,e.name),[`stop`])},null,46,o)),64))],32),e.showPreview&&w.value&&T.value?((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:0,class:`cropped-image-preview`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(t.t,{is:`ul`,dir:`col`,justify:`center`,gap:`sm`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.X`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.x.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.Y`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.y.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.WIDTH`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.width.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.HEIGHT`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.height.toFixed(0)),1)])]),_:1}),(0,r.createElementVNode)(`img`,{src:w.value,alt:h(`common.IMAGE_THUMBNAIL`)},null,8,s)]),_:1})):(0,r.createCommentVNode)(``,!0)]))}}),d=e.t(u,[[`__scopeId`,`data-v-057c9675`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./Grid-tn5_R2fP.cjs`),n=require(`./vue-i18n-BaeznwnA.cjs`);let r=require(`vue`);var i=function(e){return e.TopLeft=`top-left`,e.Top=`top`,e.TopRight=`top-right`,e.Right=`right`,e.BottomRight=`bottom-right`,e.Bottom=`bottom`,e.BottomLeft=`bottom-left`,e.Left=`left`,e}(i||{}),a={class:`nb-image-cropper`},o=[`onMousedown`,`onTouchstart`],s=[`src`,`alt`],c=700,l=400,u=(0,r.defineComponent)({__name:`ImageCropper`,props:{image:{},cropAsCircle:{type:Boolean,default:!1},outputAsCircle:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!1}},emits:[`crop`],setup(e,{emit:u}){let d={en:{X:`X`,Y:`Y`,WIDTH:`Width`,HEIGHT:`Height`,IMAGE_THUMBNAIL:`Cropped preview`},pt:{X:`X`,Y:`Y`,WIDTH:`Largura`,HEIGHT:`Altura`,IMAGE_THUMBNAIL:`Pré-visualização recortada`}},{t:f,te:p,locale:m}=n.t({useScope:`global`});function h(e){if(p(e))return f(e);let t=e.slice(7);return d[String(m.value).toLowerCase().split(`-`)[0]]?.[t]??d.en[t]??e}let g=e,_=u,v=(0,r.ref)(null),y=null,b=new Image,x=null,S={x:1,y:1},C=(0,r.ref)({x:50,y:50,width:200,height:200}),w=(0,r.ref)(null),T=(0,r.ref)(null),E=!1,D=!1,O={x:0,y:0},k=!1,A={x:0,y:0},j={x:0,y:0,width:0,height:0},M=null,N=!1,P=[{name:i.TopLeft},{name:i.Top},{name:i.TopRight},{name:i.Right},{name:i.BottomRight},{name:i.Bottom},{name:i.BottomLeft},{name:i.Left}],F=()=>{if(!g.image){console.error(`No image file provided`);return}x&&=(URL.revokeObjectURL(x),null),b.onload=()=>{let{drawWidth:e,drawHeight:t}=I();if(v.value){v.value.width=e,v.value.height=t;let n=(v.value.width-b.width*S.x)/2,r=(v.value.height-b.height*S.y)/2;if(g.cropAsCircle||g.lockAspectRatio){let e=Math.min(b.width*S.x,b.height*S.y)*.5;C.value={x:n+(b.width*S.x-e)/2,y:r+(b.height*S.y-e)/2,width:e,height:e}}else C.value={x:n+(b.width*S.x*.5-b.width*S.x*.25),y:r+(b.height*S.y*.5-b.height*S.y*.25),width:b.width*S.x*.5,height:b.height*S.y*.5};L(),Q()}},b.onerror=()=>{console.error(`Failed to load image`)},x=URL.createObjectURL(g.image),b.src=x};(0,r.onMounted)(()=>{v.value&&(y=v.value.getContext(`2d`),y&&(y.imageSmoothingEnabled=!0,y.imageSmoothingQuality=`high`),g.image&&F())}),(0,r.onBeforeUnmount)(()=>{x&&=(URL.revokeObjectURL(x),null);let e=w.value;e&&(URL.revokeObjectURL(e),w.value=null)}),(0,r.watch)(()=>g.image,e=>{e&&F()}),(0,r.watch)(()=>[g.cropAsCircle,g.outputAsCircle,g.lockAspectRatio],()=>{v.value&&y&&L()});let I=()=>{let e=b.width/b.height,t=c,n=l;return e>c/l?n=c/e:t=l*e,S.x=t/b.width,S.y=n/b.height,{drawWidth:t,drawHeight:n}},L=()=>{if(y&&v.value){y.clearRect(0,0,v.value.width,v.value.height);let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2;y.drawImage(b,0,0,b.width,b.height,e,t,b.width*S.x,b.height*S.y),R()}},R=()=>{y&&v.value&&(y.save(),y.beginPath(),g.cropAsCircle?y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2):y.rect(C.value.x,C.value.y,C.value.width,C.value.height),y.rect(0,0,v.value.width,v.value.height),y.clip(`evenodd`),y.fillStyle=`rgba(0, 0, 0, 0.5)`,y.fillRect(0,0,v.value.width,v.value.height),y.restore(),y.save(),y.strokeStyle=`rgba(255, 255, 255, 0.8)`,y.lineWidth=1,y.setLineDash([5,5]),y.imageSmoothingEnabled=!1,g.cropAsCircle?(y.beginPath(),y.arc(C.value.x+C.value.width/2,C.value.y+C.value.height/2,C.value.width/2,0,Math.PI*2),y.stroke()):y.strokeRect(C.value.x,C.value.y,C.value.width,C.value.height),y.restore())},z=(0,r.computed)(()=>{if(g.cropAsCircle){let e=C.value.x+C.value.width/2,t=C.value.y+C.value.height/2,n=C.value.width/2;return{"top-left":{left:`${e-n-5}px`,top:`${t-n-5}px`},top:{left:`${e-5}px`,top:`${t-n-5}px`},"top-right":{left:`${e+n-5}px`,top:`${t-n-5}px`},right:{left:`${e+n-5}px`,top:`${t-5}px`},"bottom-right":{left:`${e+n-5}px`,top:`${t+n-5}px`},bottom:{left:`${e-5}px`,top:`${t+n-5}px`},"bottom-left":{left:`${e-n-5}px`,top:`${t+n-5}px`},left:{left:`${e-n-5}px`,top:`${t-5}px`}}}else return{"top-left":{left:`${C.value.x-5}px`,top:`${C.value.y-5}px`},top:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y-5}px`},"top-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y-5}px`},right:{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height/2-5}px`},"bottom-right":{left:`${C.value.x+C.value.width-5}px`,top:`${C.value.y+C.value.height-5}px`},bottom:{left:`${C.value.x+C.value.width/2-5}px`,top:`${C.value.y+C.value.height-5}px`},"bottom-left":{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height-5}px`},left:{left:`${C.value.x-5}px`,top:`${C.value.y+C.value.height/2-5}px`}}}),B=e=>{if(`touches`in e&&e.touches.length>0){let t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}else if(`clientX`in e&&`clientY`in e)return{clientX:e.clientX,clientY:e.clientY};return{clientX:0,clientY:0}},V=e=>{let t=v.value;if(!t)return null;let{clientX:n,clientY:r}=B(e),{left:i,top:a}=t.getBoundingClientRect();return{x:n-i,y:r-a}},H=e=>{e.preventDefault();let t=V(e);if(!t)return;let{x:n,y:r}=t;X(n,r)&&(D=!0,E=!0,O={x:n-C.value.x,y:r-C.value.y})},U=e=>{D?G(e):k&&J(e)},W=()=>{D&&(K(),D=!1,Q()),k&&(Y(),Q()),E=!1,D=!1},G=e=>{if(E){let t=V(e);if(!t)return;let{x:n,y:r}=t;C.value.x=Math.floor(n-O.x),C.value.y=Math.floor(r-O.y),L()}},K=()=>{E&&=(Z(),L(),!1)},q=(e,t)=>{e.preventDefault();let n=V(e);n&&(k=!0,M=t,A={x:n.x,y:n.y},j={...C.value},N=e instanceof MouseEvent&&e.shiftKey)},J=e=>{if(!k)return;if(g.lockAspectRatio&&v.value){let t=V(e);if(!t)return;let{x:n,y:r}=t,i=j.x+j.width/2,a=j.y+j.height/2;if(g.cropAsCircle){let e=Math.max(Math.abs(n-i),Math.abs(r-a)),t=e*2;C.value={x:i-e,y:a-e,width:t,height:t}}else{let e=j.width/j.height,t=Math.abs(n-i),r=Math.max(t*2,50),o=r/e;C.value={x:i-r/2,y:a-o/2,width:r,height:o}}L();return}let t=V(e);if(!t)return;let{x:n,y:r}=t,i=n-A.x,a=r-A.y;N=e instanceof MouseEvent&&e.shiftKey;let o={...j};switch(M){case`top-left`:o.x+=i,o.y+=a,o.width-=i,o.height-=a;break;case`top`:o.y+=a,o.height-=a;break;case`top-right`:o.y+=a,o.width+=i,o.height-=a;break;case`right`:o.width+=i;break;case`bottom-right`:o.width+=i,o.height+=a;break;case`bottom`:o.height+=a;break;case`bottom-left`:o.x+=i,o.width-=i,o.height+=a;break;case`left`:o.x+=i,o.width-=i;break}if(o.width<50&&(o.width=50),o.height<50&&(o.height=50),N&&M){let e=j.width/j.height;[`left`,`right`].includes(M)?(o.height=o.width/e,M===`left`&&(o.y=j.y-(o.height-j.height)/2)):[`top`,`bottom`].includes(M)&&(o.width=o.height*e,M===`top`&&(o.x=j.x-(o.width-j.width)/2))}C.value=o,L()},Y=()=>{k&&(Z(),L(),k=!1,M=null)},X=(e,t)=>{if(g.cropAsCircle){let n=C.value.x+C.value.width/2,r=C.value.y+C.value.height/2,i=C.value.width/2,a=e-n,o=t-r;return a*a+o*o<=i*i}else return e>=C.value.x-2&&e<=C.value.x+C.value.width+2&&t>=C.value.y-2&&t<=C.value.y+C.value.height+2},Z=()=>{let e=v.value.width,t=v.value.height;if(C.value.width<50&&(C.value.width=50),C.value.height<50&&(C.value.height=50),g.lockAspectRatio)if(g.cropAsCircle)C.value.height=C.value.width;else{let e=j.width/j.height;C.value.height=C.value.width/e}else if(N){let e=j.width/j.height;C.value.height=C.value.width/e}if(g.cropAsCircle||g.lockAspectRatio){let n=C.value.width/C.value.height;(C.value.width>e||C.value.height>t)&&(C.value.width>C.value.height?(C.value.width=e,C.value.height=e/n):(C.value.height=t,C.value.width=t*n)),C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)}else C.value.x<0&&(C.value.x=0),C.value.y<0&&(C.value.y=0),C.value.width>e&&(C.value.width=e,C.value.x=0),C.value.height>t&&(C.value.height=t,C.value.y=0),C.value.x+C.value.width>e&&(C.value.x=e-C.value.width),C.value.y+C.value.height>t&&(C.value.y=t-C.value.height)},Q=()=>{if(v.value&&y){let e=(v.value.width-b.width*S.x)/2,t=(v.value.height-b.height*S.y)/2,n=(C.value.x-e)/S.x,r=(C.value.y-t)/S.y,i=C.value.width/S.x,a=C.value.height/S.y,o={x:Math.round(n),y:Math.round(r),width:Math.round(i),height:Math.round(a)},s=Math.max(0,Math.min(o.x,b.width)),c=Math.max(0,Math.min(o.y,b.height)),l=Math.min(o.width,b.width-s),u=Math.min(o.height,b.height-c),d=document.createElement(`canvas`);d.width=l,d.height=u;let f=d.getContext(`2d`);f&&(f.drawImage(b,s,c,l,u,0,0,l,u),g.cropAsCircle&&g.outputAsCircle&&(f.globalCompositeOperation=`destination-in`,f.beginPath(),f.arc(l/2,u/2,l/2,0,Math.PI*2),f.closePath(),f.fill(),f.globalCompositeOperation=`source-over`),d.toBlob(e=>{if(e){let t=w.value;t&&URL.revokeObjectURL(t),w.value=URL.createObjectURL(e),T.value=o,_(`crop`,{blob:e,geometry:o})}},`image/jpeg`,.8))}};return(0,r.watch)(()=>g,()=>{Q()},{deep:!0}),(n,i)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,a,[(0,r.createElementVNode)(`div`,{class:`canvas-container`,onMousedown:H,onMousemove:U,onMouseup:W,onMouseleave:W,onTouchstart:H,onTouchmove:U,onTouchend:W},[(0,r.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:v},null,512),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(P,e=>(0,r.createElementVNode)(`div`,{key:e.name,class:(0,r.normalizeClass)([`resize-handle`,e.name]),style:(0,r.normalizeStyle)(z.value[e.name]),onMousedown:(0,r.withModifiers)(t=>q(t,e.name),[`stop`]),onTouchstart:(0,r.withModifiers)(t=>q(t,e.name),[`stop`])},null,46,o)),64))],32),e.showPreview&&w.value&&T.value?((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:0,class:`cropped-image-preview`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(t.t,{is:`ul`,dir:`col`,justify:`center`,gap:`sm`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.X`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.x.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.Y`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.y.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.WIDTH`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.width.toFixed(0)),1)]),(0,r.createElementVNode)(`li`,null,[(0,r.createElementVNode)(`strong`,null,(0,r.toDisplayString)(h(`common.HEIGHT`)),1),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(T.value.height.toFixed(0)),1)])]),_:1}),(0,r.createElementVNode)(`img`,{src:w.value,alt:h(`common.IMAGE_THUMBNAIL`)},null,8,s)]),_:1})):(0,r.createCommentVNode)(``,!0)]))}}),d=e.t(u,[[`__scopeId`,`data-v-057c9675`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
|
-
import { t } from "./Grid-
|
|
3
|
-
import { t as n } from "./vue-i18n-
|
|
2
|
+
import { t } from "./Grid-BVIhOyQ1.js";
|
|
3
|
+
import { t as n } from "./vue-i18n-DgCNp5tk.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as ee, onMounted as te, openBlock as m, ref as h, renderList as ne, toDisplayString as g, watch as _, withCtx as v, withModifiers as y } from "vue";
|
|
5
5
|
//#region src/components/ImageCropper.d.ts
|
|
6
6
|
var b = /* @__PURE__ */ function(e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./Button-
|
|
1
|
+
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
2
|
import { t } from "./Icon-B2tiGiqZ.js";
|
|
3
3
|
import { useNbStrings as n } from "./composables/useNbStrings.composable.mjs";
|
|
4
|
-
import { t as r } from "./Spinner-
|
|
4
|
+
import { t as r } from "./Spinner-DYFhiTB1.js";
|
|
5
5
|
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, toDisplayString as h, watch as g, withModifiers as _ } from "vue";
|
|
6
6
|
import * as v from "@nubisco/ui/icons/plus";
|
|
7
7
|
import * as y from "@nubisco/ui/icons/trash";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./Button-CGIbF1e-.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useNbStrings.composable.cjs`),i=require(`./Spinner-j13gRoUF.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/plus`);o=e.n(o);let s=require(`@nubisco/ui/icons/trash`);s=e.n(s);var c=[`aria-label`,`aria-busy`,`disabled`],l=[`src`,`alt`],u={key:1,class:`nb-image-picker__empty`},d={class:`nb-image-picker__label`},f={key:2,class:`nb-image-picker__drop`},p={key:0,class:`nb-image-picker__loading`},m=[`accept`,`disabled`],h=(0,a.defineComponent)({__name:`ImagePicker`,props:{src:{default:``},alt:{default:``},label:{default:void 0},dropLabel:{default:void 0},replaceLabel:{default:void 0},removeLabel:{default:void 0},accept:{default:`image/*`},maxSize:{default:void 0},removable:{type:Boolean,default:!0},removeDisabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:`10rem`},ratio:{default:`1 / 1`},fit:{default:`contain`},id:{}},emits:[`pick`,`remove`,`reject`],setup(e,{expose:h,emit:g}){let _=e,v=r.useNbStrings(),y=(0,a.computed)(()=>({add:_.label??v.value.imagePickerAdd,drop:_.dropLabel??v.value.imagePickerDrop,replace:_.replaceLabel??v.value.imagePickerReplace,remove:_.removeLabel??v.value.imagePickerRemove})),b=g,x=(0,a.ref)(null),S=(0,a.ref)(!1),C=0,w=(0,a.computed)(()=>!!_.src),T=(0,a.computed)(()=>_.disabled||_.loading),E=(0,a.computed)(()=>({"--nb-image-picker-size":typeof _.size==`number`?`${_.size}px`:_.size,"--nb-image-picker-ratio":_.ratio,"--nb-image-picker-fit":_.fit}));(0,a.watch)(T,e=>{e&&(C=0,S.value=!1)});function D(){T.value||x.value?.click()}function O(e){let t=_.accept.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>e.startsWith(`.`)?n.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r===e)}function k(e){if(!O(e))return b(`reject`,{file:e,reason:`type`});if(_.maxSize&&e.size>_.maxSize)return b(`reject`,{file:e,reason:`size`});b(`pick`,e)}function A(e){let t=e.target,n=t.files?.[0];t.value=``,n&&!T.value&&k(n)}function j(){T.value||(C++,S.value=!0)}function M(){C--,C<=0&&(C=0,S.value=!1)}function N(e){T.value&&e.dataTransfer&&(e.dataTransfer.dropEffect=`none`)}function P(e){if(C=0,S.value=!1,T.value)return;let t=e.dataTransfer?.files?.[0];t&&k(t)}return h({open:D}),(r,h)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`nb-image-picker`,{"nb-image-picker--filled":w.value,"nb-image-picker--dragging":S.value,"nb-image-picker--loading":e.loading,"nb-image-picker--disabled":e.disabled}]),style:(0,a.normalizeStyle)(E.value),onDragenter:(0,a.withModifiers)(j,[`prevent`]),onDragover:(0,a.withModifiers)(N,[`prevent`]),onDragleave:(0,a.withModifiers)(M,[`prevent`]),onDrop:(0,a.withModifiers)(P,[`prevent`])},[(0,a.createElementVNode)(`button`,{type:`button`,class:`nb-image-picker__surface`,"aria-label":w.value?y.value.replace:y.value.add,"aria-busy":e.loading||void 0,disabled:e.disabled||e.loading,onClick:D},[w.value?((0,a.openBlock)(),(0,a.createElementBlock)(`img`,{key:0,class:`nb-image-picker__image`,src:e.src,alt:e.alt},null,8,l)):((0,a.openBlock)(),(0,a.createElementBlock)(`span`,u,[(0,a.createVNode)(n.t,{name:o,size:20,"aria-hidden":`true`}),(0,a.createElementVNode)(`span`,d,(0,a.toDisplayString)(y.value.add),1)])),S.value?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,f,(0,a.toDisplayString)(y.value.drop),1)):(0,a.createCommentVNode)(``,!0)],8,c),e.loading?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,p,[(0,a.createVNode)(i.t,{size:`md`,decorative:``})])):(0,a.createCommentVNode)(``,!0),w.value&&e.removable?((0,a.openBlock)(),(0,a.createBlock)(t.t,{key:1,class:`nb-image-picker__remove`,variant:`ghost`,size:`xs`,icon:s,label:y.value.remove,"tooltip-position":`left`,disabled:e.removeDisabled||e.disabled||e.loading,onClick:h[0]||=(0,a.withModifiers)(e=>b(`remove`),[`stop`])},null,8,[`label`,`disabled`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`input`,{ref_key:`inputRef`,ref:x,type:`file`,class:`nb-image-picker__input`,tabindex:`-1`,"aria-hidden":`true`,accept:e.accept,disabled:e.disabled||e.loading,onChange:A},null,40,m)],38))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./Spinner-
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),n=require(`./Icon-CssV4E2-.cjs`),r=require(`./composables/useStableId.composable.cjs`),i=require(`./Spinner-j13gRoUF.cjs`);let a=require(`vue`),o=require(`@nubisco/ui/icons/check-circle`);o=e.n(o);let s=require(`@nubisco/ui/icons/warning-circle`);s=e.n(s);var c=function(e){return e.Inactive=`inactive`,e.Active=`active`,e.Finished=`finished`,e.Error=`error`,e}(c||{}),l=[`id`,`aria-live`],u={class:`nb-inline-loading__text`},d=(0,a.defineComponent)({__name:`InlineLoading`,props:{status:{default:c.Inactive},label:{default:`Saving`},finishedLabel:{default:`Saved`},errorLabel:{default:`Could not save`},dwell:{default:1600},reserveSpace:{type:Boolean,default:!0},id:{default:void 0}},emits:[`success`],setup(e,{emit:t}){let d=e,f=t,p=r.useStableId(d),m;function h(){m&&=(clearTimeout(m),void 0)}(0,a.watch)(()=>d.status,e=>{h(),e===c.Finished&&(m=setTimeout(()=>{m=void 0,f(`success`)},d.dwell))},{immediate:!0}),(0,a.onBeforeUnmount)(h);let g=(0,a.computed)(()=>{switch(d.status){case c.Active:return d.label;case c.Finished:return d.finishedLabel;case c.Error:return d.errorLabel;default:return``}}),_=(0,a.computed)(()=>d.status===c.Finished?o:d.status===c.Error?s:null),v=(0,a.computed)(()=>d.status===c.Inactive?`off`:d.status===c.Error?`assertive`:`polite`),y=(0,a.computed)(()=>[`nb-inline-loading`,`nb-inline-loading--${d.status}`]),b=(0,a.computed)(()=>{if(!d.reserveSpace)return;let e=Math.max(d.label.length,d.finishedLabel.length,d.errorLabel.length);return{"--nb-inline-loading-reserve":`${e+1}ch`}});return(t,r)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{id:(0,a.unref)(p),class:(0,a.normalizeClass)(y.value),style:(0,a.normalizeStyle)(b.value),role:`status`,"aria-live":v.value},[e.status===`active`?((0,a.openBlock)(),(0,a.createBlock)(i.t,{key:0,class:`nb-inline-loading__spinner`,size:`sm`,tone:`inherit`,decorative:``})):_.value?((0,a.openBlock)(),(0,a.createBlock)(n.t,{key:1,class:`nb-inline-loading__icon`,name:_.value,size:16,"aria-hidden":`true`},null,8,[`name`])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`span`,u,[(0,a.renderSlot)(t.$slots,`default`,{status:e.status,text:g.value},()=>[(0,a.createTextVNode)((0,a.toDisplayString)(g.value),1)],!0)])],14,l))}}),f=t.t(d,[[`__scopeId`,`data-v-6f38f00f`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { t } from "./Icon-B2tiGiqZ.js";
|
|
3
3
|
import { useStableId as n } from "./composables/useStableId.composable.mjs";
|
|
4
|
-
import { t as r } from "./Spinner-
|
|
4
|
+
import { t as r } from "./Spinner-DYFhiTB1.js";
|
|
5
5
|
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, watch as v } from "vue";
|
|
6
|
-
import * as y from "@nubisco/ui/icons/
|
|
7
|
-
import * as b from "@nubisco/ui/icons/
|
|
6
|
+
import * as y from "@nubisco/ui/icons/check-circle";
|
|
7
|
+
import * as b from "@nubisco/ui/icons/warning-circle";
|
|
8
8
|
//#region src/components/InlineLoading.d.ts
|
|
9
9
|
var x = /* @__PURE__ */ function(e) {
|
|
10
10
|
return e.Inactive = "inactive", e.Active = "active", e.Finished = "finished", e.Error = "error", e;
|
|
@@ -40,7 +40,7 @@ var x = /* @__PURE__ */ function(e) {
|
|
|
40
40
|
case x.Error: return w.errorLabel;
|
|
41
41
|
default: return "";
|
|
42
42
|
}
|
|
43
|
-
}), A = i(() => w.status === x.Finished ?
|
|
43
|
+
}), A = i(() => w.status === x.Finished ? y : w.status === x.Error ? b : null), j = i(() => w.status === x.Inactive ? "off" : w.status === x.Error ? "assertive" : "polite"), M = i(() => ["nb-inline-loading", `nb-inline-loading--${w.status}`]), N = i(() => {
|
|
44
44
|
if (!w.reserveSpace) return;
|
|
45
45
|
let e = Math.max(w.label.length, w.finishedLabel.length, w.errorLabel.length);
|
|
46
46
|
return { "--nb-inline-loading-reserve": `${e + 1}ch` };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useStableId.composable.cjs`),n=require(`./Label-CjxnZgNy.cjs`),r=require(`./Message-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useStableId.composable.cjs`),n=require(`./Label-CjxnZgNy.cjs`),r=require(`./Message-B1CQ0Bcf.cjs`),i=require(`./InputGroup.context-BHj-IvcT.cjs`),a=require(`./composables/useFieldMessage.composable.cjs`);let o=require(`vue`);var s=[`aria-labelledby`],c=(0,o.defineComponent)({__name:`InputGroup`,props:{label:{default:``},helper:{default:``},error:{default:``},warning:{default:``},size:{default:`md`},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0}},setup(e){let c=e,l=t.useStableId({}),u=(0,o.computed)(()=>c.id??l),d=(0,o.computed)(()=>`${u.value}-label`),{variant:f,text:p,messageId:m,live:h,key:g}=a.useFieldMessage(c,u),_=(0,o.computed)(()=>f.value??`helper`),v=!1;return(0,o.provide)(i.t,{size:(0,o.computed)(()=>c.size),disabled:(0,o.computed)(()=>c.disabled),status:(0,o.computed)(()=>{if(c.error)return`error`;if(c.warning)return`warning`}),describedBy:m,claimControlId:()=>{if(!v)return v=!0,u.value}}),(t,i)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)([`nb-input-group`,`nb-input-group--${e.size}`,{"nb-input-group--disabled":e.disabled}])},[e.label?((0,o.openBlock)(),(0,o.createBlock)(n.t,{key:0,id:d.value,for:u.value,required:e.required,disabled:e.disabled},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.label),1)]),_:1},8,[`id`,`for`,`required`,`disabled`])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:`nb-input-group__row`,role:`group`,"aria-labelledby":e.label?d.value:void 0},[(0,o.renderSlot)(t.$slots,`default`,{size:e.size,disabled:e.disabled},void 0,!0)],8,s),(0,o.unref)(p)?((0,o.openBlock)(),(0,o.createBlock)(r.t,{id:(0,o.unref)(m),key:(0,o.unref)(g),variant:_.value,live:(0,o.unref)(h),class:`nb-input-group__message`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(p)),1)]),_:1},8,[`id`,`variant`,`live`])):(0,o.createCommentVNode)(``,!0)],2))}}),l=e.t(c,[[`__scopeId`,`data-v-ab65cfc9`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { useStableId as t } from "./composables/useStableId.composable.mjs";
|
|
3
3
|
import { t as n } from "./Label-xwHw_UbN.js";
|
|
4
|
-
import { t as r } from "./Message-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { t as r } from "./Message-Bi70NgGd.js";
|
|
5
|
+
import { t as i } from "./InputGroup.context-Dd4e6fGT.js";
|
|
6
|
+
import { useFieldMessage as a } from "./composables/useFieldMessage.composable.mjs";
|
|
7
7
|
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, provide as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
8
8
|
//#region src/components/InputGroup.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var b = ["aria-labelledby"], x = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
@@ -25,8 +25,8 @@ var b = ["aria-labelledby"], x = /* @__PURE__ */ e(/* @__PURE__ */ f({
|
|
|
25
25
|
id: { default: void 0 }
|
|
26
26
|
},
|
|
27
27
|
setup(e) {
|
|
28
|
-
let f = e, x = t({}), S = o(() => f.id ?? x), C = o(() => `${S.value}-label`), { variant: w, text: T, messageId: E, live: D, key: O } =
|
|
29
|
-
return h(
|
|
28
|
+
let f = e, x = t({}), S = o(() => f.id ?? x), C = o(() => `${S.value}-label`), { variant: w, text: T, messageId: E, live: D, key: O } = a(f, S), k = o(() => w.value ?? "helper"), A = !1;
|
|
29
|
+
return h(i, {
|
|
30
30
|
size: o(() => f.size),
|
|
31
31
|
disabled: o(() => f.disabled),
|
|
32
32
|
status: o(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-DxWvvteq.cjs`),r=require(`./scales-Dbh3TYrl.cjs`),i=require(`./useChartSize-c75YO_2m.cjs`);let a=require(`vue`);var o=[`width`,`height`,`aria-label`],s={key:0},c=[`x1`,`x2`,`y1`,`y2`],l={class:`nb-chart__axis`},ee=[`x`,`y`],te={class:`nb-chart__axis`},u=[`x`,`y`],d=[`x1`,`x2`,`y1`,`y2`],f=[`y`,`transform`],p=[`x`,`y`],m=[`d`,`fill`],h=[`d`,`stroke`],g=[`cx`,`cy`,`r`,`fill`,`onMousedown`,`onContextmenu`],_={key:5},v=[`x1`,`x2`,`y1`,`y2`],y=[`x1`,`x2`,`y1`,`y2`],b=`var(--nb-c-surface)`,x=(0,a.defineComponent)({__name:`InterpolationChart`,props:{modelValue:{default:()=>[]},inputLabel:{default:void 0},outputLabel:{default:void 0},inputMin:{default:0},inputMax:{default:100},outputMin:{default:0},outputMax:{default:100},editable:{type:Boolean,default:!0},minPoints:{default:2},inputStep:{default:0},outputStep:{default:0},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>[]}},emits:[`update:modelValue`],setup(e,{emit:x}){let S=t.useNbStrings(),C=e,w=x,T=(0,a.computed)(()=>n.i(0,C.colors)),E={top:16,right:16,bottom:32,left:48},D=(0,a.ref)(null),O=i.t(D,{width:480,height:240}),k=(0,a.computed)(()=>Math.max(0,O.value.width-E.left-E.right)),A=(0,a.computed)(()=>Math.max(0,O.value.height-E.top-E.bottom)),j=(0,a.computed)(()=>[...C.modelValue].sort((e,t)=>e.input-t.input)),M=(0,a.computed)(()=>[C.inputMin,C.inputMax]),N=(0,a.computed)(()=>{let e=j.value.map(e=>e.output);return r.i(Math.min(C.outputMin,...e),Math.max(C.outputMax,...e),.05)}),P=(0,a.computed)(()=>r.r(M.value,[E.left,O.value.width-E.right])),F=(0,a.computed)(()=>r.r(N.value,[O.value.height-E.bottom,E.top])),I=(0,a.computed)(()=>P.value.ticks(6)),L=(0,a.computed)(()=>F.value.ticks(5)),R=e=>{let[t,n]=M.value,[r,i]=P.value.range;return t+(e-r)/(i-r)*(n-t)},z=e=>{let[t,n]=N.value,[r,i]=F.value.range;return t+(e-r)/(i-r)*(n-t)},B=(e,t)=>!t||t<=0?e:Math.round(e/t)*t,V=(e,t,n)=>Math.max(t,Math.min(n,e)),H=(e,t=1)=>Math.round(e*10**t)/10**t,U=(0,a.computed)(()=>{let e=j.value;return e.length<2?``:e.map((e,t)=>`${t===0?`M`:`L`}${P.value(e.input)},${F.value(e.output)}`).join(` `)}),W=(0,a.computed)(()=>{let e=j.value;if(e.length<2)return``;let t=O.value.height-E.bottom;return`${e.map((e,t)=>`${t===0?`M`:`L`}${P.value(e.input)},${F.value(e.output)}`).join(` `)} L${P.value(e[e.length-1].input)},${t} L${P.value(e[0].input)},${t} Z`}),G=(0,a.ref)(null),K=(0,a.ref)(null);function q(e){w(`update:modelValue`,[...e].sort((e,t)=>e.input-t.input))}function J(e,t){C.editable&&(G.value=e,window.addEventListener(`mousemove`,X),window.addEventListener(`mouseup`,Z))}function Y(e){let t=D.value?.querySelector(`svg`);if(!t)return null;let n=t.getBoundingClientRect();return{px:e.clientX-n.left,py:e.clientY-n.top}}function X(e){if(G.value===null)return;let t=Y(e);if(!t)return;let n=R(t.px),r=z(t.py),i=[...j.value],a=G.value,o=C.inputStep>0?C.inputStep:.1;i[a]={input:H(B(V(n,a>0?i[a-1].input+o:C.inputMin,a<i.length-1?i[a+1].input-o:C.inputMax),C.inputStep)),output:H(B(V(r,C.outputMin,C.outputMax),C.outputStep))},q(i)}function Z(){G.value=null,window.removeEventListener(`mousemove`,X),window.removeEventListener(`mouseup`,Z)}function ne(e){if(G.value!==null)return;let t=Y(e);if(!t)return;let n=-1,r=1/0;for(let e=0;e<j.value.length;e++){let i=j.value[e],a=P.value(i.input)-t.px,o=F.value(i.output)-t.py,s=Math.sqrt(a*a+o*o);s<r&&(r=s,n=e)}K.value=r<20?n:null,Q.value={x:t.px+12,y:t.py-12}}function re(){G.value===null&&(K.value=null)}function ie(){G.value!==null&&(G.value=null,window.removeEventListener(`mousemove`,X),window.removeEventListener(`mouseup`,Z))}function ae(e){if(!C.editable)return;let t=Y(e);if(!t)return;let n=R(t.px),r=z(t.py);if(n<C.inputMin||n>C.inputMax||r<C.outputMin||r>C.outputMax)return;let i=H(B(V(n,C.inputMin,C.inputMax),C.inputStep)),a=H(B(V(r,C.outputMin,C.outputMax),C.outputStep));q([...j.value,{input:i,output:a}])}function oe(e){C.editable&&(j.value.length<=C.minPoints||q(j.value.filter((t,n)=>n!==e)))}(0,a.onBeforeUnmount)(()=>{window.removeEventListener(`mousemove`,X),window.removeEventListener(`mouseup`,Z)});let Q=(0,a.ref)({x:0,y:0}),se=(0,a.computed)(()=>K.value!==null||G.value!==null),ce=(0,a.computed)(()=>{let e=G.value??K.value;return e===null?``:`Point ${e+1}`}),le=(0,a.computed)(()=>{let e=G.value??K.value;if(e===null||e>=j.value.length)return[];let t=j.value[e];return[{label:C.inputLabel||S.value.chartInput,value:$(t.input),color:T.value},{label:C.outputLabel||S.value.chartOutput,value:$(t.output),color:T.value}]}),$=e=>Number.isInteger(e)?String(e):e.toFixed(1);return(t,r)=>((0,a.openBlock)(),(0,a.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":!1},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,{ref_key:`root`,ref:D,class:`nb-interpolation-chart`},[((0,a.openBlock)(),(0,a.createElementBlock)(`svg`,{width:(0,a.unref)(O).width,height:(0,a.unref)(O).height,class:`nb-chart__svg`,role:`img`,"aria-label":e.title||(0,a.unref)(S).chartInterpolation,onMousemove:ne,onMouseleave:re,onMouseup:ie,onDblclick:ae,onContextmenu:r[0]||=(0,a.withModifiers)(()=>{},[`prevent`])},[e.showGrid&&(0,a.unref)(O).width>0?((0,a.openBlock)(),(0,a.createElementBlock)(`g`,s,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(L.value,e=>((0,a.openBlock)(),(0,a.createElementBlock)(`line`,{key:`grid-${e}`,class:`nb-chart__gridline`,x1:E.left,x2:(0,a.unref)(O).width-E.right,y1:F.value(e),y2:F.value(e)},null,8,c))),128))])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`g`,l,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(L.value,e=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`yt-${e}`,x:E.left-6,y:F.value(e),"text-anchor":`end`,"dominant-baseline":`middle`},(0,a.toDisplayString)($(e)),9,ee))),128))]),(0,a.createElementVNode)(`g`,te,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(I.value,e=>((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:`xt-${e}`,x:P.value(e),y:(0,a.unref)(O).height-E.bottom+14,"text-anchor":`middle`},(0,a.toDisplayString)($(e)),9,u))),128))]),(0,a.createElementVNode)(`line`,{class:`nb-chart__axis-line`,x1:E.left,x2:(0,a.unref)(O).width-E.right,y1:(0,a.unref)(O).height-E.bottom,y2:(0,a.unref)(O).height-E.bottom},null,8,d),e.outputLabel?((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:1,class:`nb-chart__axis-label`,x:12,y:E.top+A.value/2,"text-anchor":`middle`,transform:`rotate(-90, 12, ${E.top+A.value/2})`},(0,a.toDisplayString)(e.outputLabel),9,f)):(0,a.createCommentVNode)(``,!0),e.inputLabel?((0,a.openBlock)(),(0,a.createElementBlock)(`text`,{key:2,class:`nb-chart__axis-label`,x:E.left+k.value/2,y:(0,a.unref)(O).height-2,"text-anchor":`middle`},(0,a.toDisplayString)(e.inputLabel),9,p)):(0,a.createCommentVNode)(``,!0),j.value.length>=2?((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:3,class:`nb-interpolation-chart__area`,d:W.value,fill:T.value,opacity:`0.12`},null,8,m)):(0,a.createCommentVNode)(``,!0),j.value.length>=2?((0,a.openBlock)(),(0,a.createElementBlock)(`path`,{key:4,class:`nb-interpolation-chart__line`,d:U.value,stroke:T.value,fill:`none`,"stroke-width":`2`,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,h)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(j.value,(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`circle`,{key:`pt-${n}`,class:(0,a.normalizeClass)([`nb-interpolation-chart__point`,{"nb-interpolation-chart__point--editable":e.editable,"nb-interpolation-chart__point--dragging":G.value===n,"nb-interpolation-chart__point--hover":K.value===n&&G.value===null}]),cx:P.value(t.input),cy:F.value(t.output),r:G.value===n?7:K.value===n?6:5,fill:T.value,stroke:b,"stroke-width":`2`,onMousedown:(0,a.withModifiers)(e=>J(n,e),[`prevent`]),onContextmenu:(0,a.withModifiers)(e=>oe(n),[`prevent`])},null,42,g))),128)),G.value===null?(0,a.createCommentVNode)(``,!0):((0,a.openBlock)(),(0,a.createElementBlock)(`g`,_,[(0,a.createElementVNode)(`line`,{class:`nb-interpolation-chart__crosshair`,x1:P.value(j.value[G.value].input),x2:P.value(j.value[G.value].input),y1:E.top,y2:(0,a.unref)(O).height-E.bottom},null,8,v),(0,a.createElementVNode)(`line`,{class:`nb-interpolation-chart__crosshair`,x1:E.left,x2:(0,a.unref)(O).width-E.right,y1:F.value(j.value[G.value].output),y2:F.value(j.value[G.value].output)},null,8,y)]))],40,o)),(0,a.createVNode)(n.l,{visible:e.showTooltip&&se.value,x:Q.value.x,y:Q.value.y,title:ce.value,rows:le.value},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)]),_:1},8,[`title`,`subtitle`,`height`]))}}),S=e.t(x,[[`__scopeId`,`data-v-83de4dce`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return S}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { useNbStrings as t } from "./composables/useNbStrings.composable.mjs";
|
|
3
|
-
import { i as n, l as r, u as i } from "./palette-
|
|
4
|
-
import { i as a, r as o } from "./scales-
|
|
5
|
-
import { t as s } from "./useChartSize-
|
|
3
|
+
import { i as n, l as r, u as i } from "./palette-4rzDlIAy.js";
|
|
4
|
+
import { i as a, r as o } from "./scales-TfA6Pl4e.js";
|
|
5
|
+
import { t as s } from "./useChartSize-B-Rv6Q7a.js";
|
|
6
6
|
import { Fragment as c, computed as l, createBlock as ee, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as te, defineComponent as p, normalizeClass as m, onBeforeUnmount as ne, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, withCtx as b, withModifiers as x } from "vue";
|
|
7
7
|
//#region src/components/Charts/InterpolationChart.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var re = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-D0Q0f7-M.cjs`),t=require(`./composables/useNbStrings.composable.cjs`),n=require(`./palette-DxWvvteq.cjs`),r=require(`./ChartLegend-DMxlEhT6.cjs`),i=require(`./scales-Dbh3TYrl.cjs`),a=require(`./useChartSize-c75YO_2m.cjs`),o=require(`./useChartEntrance-BSMpWsax.cjs`);let s=require(`vue`);var c=6,l=8,u=(e,t=c)=>{let n=[];if(e<=0)return n;let r=Math.max(1,Math.ceil(e/t));for(let t=0;t<e;t+=r)n.push(t);return n[n.length-1]!==e-1&&n.push(e-1),n},d=(e,t,n)=>{for(let r=1;r<e.length;r++){let i=e[r-1],a=e[r],o=i.x+t(i.index)/2;if(a.x-t(a.index)/2-o<n)return!1}return!0},f=(e,t,n)=>{if(n===void 0||t>=n)return e;let r=t/2;return Math.min(Math.max(e,r),n-r)},p=(e,t,n,r,i)=>{let a=e=>e.x===n(e.index)?r:i,o=e,s=o[o.length-1];return o.length>2&&!d(o.slice(-2),t,a(s))&&(o=[...o.slice(0,-2),s]),o.length>2&&!d(o.slice(0,2),t,a(o[0]))&&(o=[o[0],...o.slice(2)]),o},m=({count:e,positionOf:t,widthOf:n,width:r,gap:i=l})=>{let a=u(e);if(!n)return a.map(e=>({index:e,x:t(e)}));let o=e=>({index:e,x:f(t(e),n(e),r)}),s=p(a.map(o),n,t,-1/0,i);if(d(s,n,0))return s;let m=e-1,h=Math.max(1,Math.ceil(e/c))+1;for(let e=h;e<=m;e++){let r=[];for(let t=0;t<m;t+=e)r.push(t);let a=p([...r,m].map(o),n,t,i,i);if(d(a,n,i))return a}return[o(0)]},h=[`width`,`height`,`aria-label`],g={key:0},_=[`x1`,`x2`,`y1`,`y2`],v={class:`nb-chart__axis`},y=[`x`,`y`],b=[`x`,`y`],x=[`x1`,`x2`,`y1`,`y2`],S=[`d`,`fill`],C=[`pathLength`,`d`,`stroke`],w=[`cx`,`cy`,`r`,`fill`],T=[`x1`,`x2`,`y1`,`y2`],E=(0,s.defineComponent)({__name:`LineChart`,props:{series:{default:()=>[]},area:{type:Boolean,default:!1},points:{type:Boolean,default:!1},curve:{default:`smooth`},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>n.n},animate:{type:Boolean,default:!1}},setup(e){let c=t.useNbStrings(),l=e,{runKey:u}=o.t(()=>l.animate,()=>l.series),d={top:12,right:16,bottom:28,left:44},f=(0,s.ref)(null),p=a.t(f,{width:480,height:240}),E=(0,s.computed)(()=>l.series.map((e,t)=>({name:e.name,data:e.data,color:e.color??n.i(t,l.colors)}))),D=(0,s.computed)(()=>(l.series[0]?.data??[]).map(e=>e.x)),O=(0,s.computed)(()=>{let e=l.series.flatMap(e=>e.data.map(e=>e.y));return e.length?i.i(Math.min(0,...e),Math.max(...e),.1):[0,1]}),k=(0,s.computed)(()=>i.r(O.value,[Math.max(d.top,p.value.height-d.bottom),d.top])),A=(0,s.computed)(()=>k.value.ticks(5)),j=(0,s.ref)(7),M=e=>Math.max(k.value(e),j.value),N=(0,s.computed)(()=>Math.max(0,p.value.width-d.left-d.right)),P=e=>{let t=D.value.length;return t<=1?d.left+N.value/2:d.left+e/(t-1)*N.value},F=(0,s.ref)(null),I=(0,s.ref)(null),L=()=>{let e=F.value;if(!e||typeof document>`u`)return;let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);if(typeof t.getComputedTextLength!=`function`)return;t.setAttribute(`visibility`,`hidden`),t.setAttribute(`aria-hidden`,`true`),e.appendChild(t);let n=new Map;for(let e of D.value){let r=(0,s.toDisplayString)(e);n.has(r)||(t.textContent=r,n.set(r,t.getComputedTextLength()))}if(typeof t.getBBox==`function`){t.setAttribute(`dominant-baseline`,`middle`),t.setAttribute(`y`,`0`),t.textContent=`0`;let e=-t.getBBox().y;e>0&&(j.value=e)}e.removeChild(t),I.value=n};(0,s.watch)(D,L,{flush:`post`});let R=typeof document>`u`?void 0:document.fonts;(0,s.onMounted)(()=>{L(),R?.addEventListener?.(`loadingdone`,L)}),(0,s.onBeforeUnmount)(()=>{R?.removeEventListener?.(`loadingdone`,L)});let z=(0,s.computed)(()=>{let e=D.value,t=I.value;return m({count:e.length,positionOf:P,widthOf:t?n=>t.get((0,s.toDisplayString)(e[n]))??0:void 0,width:p.value.width}).map(t=>({...t,value:e[t.index]}))}),B=e=>e.length?H(e.map((e,t)=>[P(t),k.value(e.y)]),l.curve):``,V=e=>{if(!e.length)return``;let t=e.map((e,t)=>[P(t),k.value(e.y)]),n=p.value.height-d.bottom;return`${H(t,l.curve)} L${t[t.length-1][0]},${n} L${t[0][0]},${n} Z`},H=(e,t)=>{if(!e.length)return``;if(e.length===1)return`M${e[0][0]},${e[0][1]}`;if(t===`linear`)return e.map((e,t)=>`${t===0?`M`:`L`}${e[0]},${e[1]}`).join(` `);if(t===`step`){let t=`M${e[0][0]},${e[0][1]}`;for(let n=1;n<e.length;n++){let[r,i]=e[n-1],[a,o]=e[n],s=(r+a)/2;t+=` L${s},${i} L${s},${o} L${a},${o}`}return t}let n=.2,r=`M${e[0][0]},${e[0][1]}`;for(let t=0;t<e.length-1;t++){let i=e[t-1]??e[t],a=e[t],o=e[t+1],s=e[t+2]??o,c=a[0]+(o[0]-i[0])*n,l=a[1]+(o[1]-i[1])*n,u=o[0]-(s[0]-a[0])*n,d=o[1]-(s[1]-a[1])*n;r+=` C${c},${l} ${u},${d} ${o[0]},${o[1]}`}return r},U=e=>Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}k`:Number.isInteger(e)?String(e):e.toFixed(1),W=e=>l.valueFormatter?l.valueFormatter(e):U(e),G=(0,s.ref)(null),K=(0,s.ref)({x:0,y:0}),q=e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=D.value.length;if(!r)return;let i=(n-d.left)/Math.max(1,N.value);G.value=Math.round(Math.min(1,Math.max(0,i))*(r-1)),K.value={x:e.clientX-t.left+12,y:e.clientY-t.top+12}},J=(0,s.computed)(()=>G.value===null?[]:E.value.map(e=>{let t=e.data[G.value];return{label:e.name,value:t?.label??W(t?.y??0),color:e.color}}));return(t,i)=>((0,s.openBlock)(),(0,s.createBlock)(n.u,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&E.value.length>0},{legend:(0,s.withCtx)(()=>[(0,s.createVNode)(r.t,{items:E.value.map(e=>({label:e.name,color:e.color}))},null,8,[`items`])]),default:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`div`,{ref_key:`root`,ref:f,class:`nb-line-chart`},[((0,s.openBlock)(),(0,s.createElementBlock)(`svg`,{width:(0,s.unref)(p).width,height:(0,s.unref)(p).height,class:(0,s.normalizeClass)([`nb-chart__svg`,{"nb-chart__svg--animate":e.animate}]),role:`img`,"aria-label":e.title||(0,s.unref)(c).chartLine,onMouseleave:i[0]||=e=>G.value=null,onMousemove:q},[e.showGrid&&(0,s.unref)(p).width>0?((0,s.openBlock)(),(0,s.createElementBlock)(`g`,g,[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(A.value,e=>((0,s.openBlock)(),(0,s.createElementBlock)(`line`,{key:`grid-${e}`,class:`nb-chart__gridline`,x1:d.left,x2:(0,s.unref)(p).width-d.right,y1:k.value(e),y2:k.value(e)},null,8,_))),128))])):(0,s.createCommentVNode)(``,!0),(0,s.createElementVNode)(`g`,v,[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(A.value,e=>((0,s.openBlock)(),(0,s.createElementBlock)(`text`,{key:`yt-${e}`,x:d.left-6,y:M(e),"text-anchor":`end`,"dominant-baseline":`middle`},(0,s.toDisplayString)(W(e)),9,y))),128))]),(0,s.createElementVNode)(`g`,{ref_key:`xAxis`,ref:F,class:`nb-chart__axis`},[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(z.value,(e,t)=>((0,s.openBlock)(),(0,s.createElementBlock)(`text`,{key:`xt-${t}`,x:e.x,y:(0,s.unref)(p).height-d.bottom+14,"text-anchor":`middle`},(0,s.toDisplayString)(e.value),9,b))),128))],512),(0,s.createElementVNode)(`line`,{class:`nb-chart__axis-line`,x1:d.left,x2:(0,s.unref)(p).width-d.right,y1:(0,s.unref)(p).height-d.bottom,y2:(0,s.unref)(p).height-d.bottom},null,8,x),((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(E.value,(t,n)=>((0,s.openBlock)(),(0,s.createElementBlock)(`g`,{key:`s-${(0,s.unref)(u)}-${n}`},[e.area?((0,s.openBlock)(),(0,s.createElementBlock)(`path`,{key:0,class:(0,s.normalizeClass)([`nb-chart__area`,{"nb-chart__area--enter":e.animate}]),d:V(t.data),fill:t.color,opacity:`0.18`},null,10,S)):(0,s.createCommentVNode)(``,!0),(0,s.createElementVNode)(`path`,{class:(0,s.normalizeClass)([`nb-chart__line`,{"nb-chart__line--draw":e.animate}]),pathLength:e.animate?1:void 0,d:B(t.data),stroke:t.color,fill:`none`,"stroke-width":`2`,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,10,C),e.points?((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,{key:1},(0,s.renderList)(t.data,(r,i)=>((0,s.openBlock)(),(0,s.createElementBlock)(`circle`,{key:`p-${n}-${i}`,cx:P(i),cy:k.value(r.y),r:G.value===i?4:3,fill:t.color,class:(0,s.normalizeClass)([`nb-chart__point`,{"nb-chart__point--enter":e.animate}])},null,10,w))),128)):(0,s.createCommentVNode)(``,!0)]))),128)),G.value===null?(0,s.createCommentVNode)(``,!0):((0,s.openBlock)(),(0,s.createElementBlock)(`line`,{key:1,class:`nb-chart__hover-line`,x1:P(G.value),x2:P(G.value),y1:d.top,y2:(0,s.unref)(p).height-d.bottom},null,8,T))],42,h)),(0,s.createVNode)(n.l,{visible:e.showTooltip&&G.value!==null,x:K.value.x,y:K.value.y,title:G.value===null?``:String(D.value[G.value]),rows:J.value},null,8,[`visible`,`x`,`y`,`title`,`rows`])],512)]),_:1},8,[`title`,`subtitle`,`height`,`show-legend`]))}}),D=e.t(E,[[`__scopeId`,`data-v-17f044cd`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return D}});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
2
2
|
import { useNbStrings as t } from "./composables/useNbStrings.composable.mjs";
|
|
3
|
-
import { i as n, l as r, n as i, u as a } from "./palette-
|
|
4
|
-
import { t as o } from "./ChartLegend-
|
|
5
|
-
import { i as s, r as c } from "./scales-
|
|
6
|
-
import { t as l } from "./useChartSize-
|
|
7
|
-
import { t as u } from "./useChartEntrance-
|
|
3
|
+
import { i as n, l as r, n as i, u as a } from "./palette-4rzDlIAy.js";
|
|
4
|
+
import { t as o } from "./ChartLegend-CQQwcGvz.js";
|
|
5
|
+
import { i as s, r as c } from "./scales-TfA6Pl4e.js";
|
|
6
|
+
import { t as l } from "./useChartSize-B-Rv6Q7a.js";
|
|
7
|
+
import { t as u } from "./useChartEntrance-BqG_st9U.js";
|
|
8
8
|
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, onBeforeUnmount as ee, onMounted as te, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as ne, withCtx as T } from "vue";
|
|
9
9
|
//#region src/components/Charts/shared/xLabels.ts
|
|
10
10
|
var E = 6, D = 8, O = (e, t = E) => {
|