@nubisco/ui 5.53.0 → 5.55.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/{AccordionItem--XeLRz2P.js → AccordionItem-BY-p8UkV.js} +1 -1
- package/dist/{AccordionItem-BYSH6dZK.cjs → AccordionItem-p0mYXIj8.cjs} +1 -1
- package/dist/{ActionGroup-CkwZEnUN.js → ActionGroup-CjRSKyOa.js} +2 -2
- package/dist/{ActionGroup-McCtSDV8.cjs → ActionGroup-DIMZhC7N.cjs} +1 -1
- package/dist/AiLabel-BDccQ2iQ.js +242 -0
- package/dist/AiLabel-jRrBTu6c.cjs +1 -0
- package/dist/{AiProvider-DN3DecBN.cjs → AiProvider-CGB9EiSf.cjs} +1 -1
- package/dist/{AiProvider-lGUifyvk.js → AiProvider-CMbPWtU-.js} +4 -4
- package/dist/{BackToTop-BWj2PURK.js → BackToTop-BDFb1y3c.js} +1 -1
- package/dist/{BackToTop-CbGWaDiv.cjs → BackToTop-R6yiw3lt.cjs} +1 -1
- package/dist/{Banner-DksCkGVd.js → Banner-BjnbX4C3.js} +1 -1
- package/dist/{Banner-DsiuPzPh.cjs → Banner-C-mikJ5n.cjs} +1 -1
- package/dist/{BatchActions-iHu14Sfz.js → BatchActions-Kr2S6CJI.js} +2 -2
- package/dist/{BatchActions-xnTXMU6B.cjs → BatchActions-jfvfpZeT.cjs} +1 -1
- package/dist/{BlueprintControls-COcm1KWW.js → BlueprintControls-Bt4KoDp5.js} +1 -1
- package/dist/{BlueprintControls-3Lc3BcAk.cjs → BlueprintControls-zX5yxOB1.cjs} +1 -1
- package/dist/{Board-B2v-oPUr.js → Board-C3_cXRl6.js} +177 -176
- package/dist/Board-D6A-irdx.cjs +1 -0
- package/dist/{BottomPanel-cNzWs1-8.cjs → BottomPanel-C_u39INJ.cjs} +1 -1
- package/dist/{BottomPanel-C6r_9aLy.js → BottomPanel-CkEc9gvb.js} +1 -1
- package/dist/{Breadcrumbs-D1pYElI6.cjs → Breadcrumbs-0rRFiO31.cjs} +1 -1
- package/dist/{Breadcrumbs-B2SMDfCA.js → Breadcrumbs-DqagVknq.js} +2 -2
- package/dist/{Briefing-Cqw3zBQO.cjs → Briefing-B-O-9bhN.cjs} +1 -1
- package/dist/{Briefing-W7gtZwdT.js → Briefing-DNH-707q.js} +1 -1
- package/dist/{BriefingDestination-CeClIu61.js → BriefingDestination-BjNteNgh.js} +1 -1
- package/dist/{BriefingDestination-CtsWFs9U.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-D7ieqb8C.js → ButtonSet-Cg1ixzOK.js} +1 -1
- package/dist/{ButtonSet-C2Z5sYSv.cjs → ButtonSet-SziuuT6_.cjs} +1 -1
- package/dist/{Calendar-BmC3wBlS.js → Calendar-fVDg_EgD.js} +1 -1
- package/dist/{Calendar-EO2vU4ls.cjs → Calendar-fsZN4OIr.cjs} +1 -1
- package/dist/{ChatMessage-DYv7Vniv.cjs → ChatMessage-B45Xhl8x.cjs} +1 -1
- package/dist/{ChatMessage-DSeGKAOq.js → ChatMessage-BDOdvI4h.js} +1 -1
- package/dist/{ChatThread-CCtckadF.cjs → ChatThread-B7F1r4t4.cjs} +1 -1
- package/dist/{ChatThread-D70zpB0f.js → ChatThread-DqvsnVOr.js} +3 -3
- package/dist/{CloseButton-F7W1E8oX.cjs → CloseButton-Bdk7rJ8E.cjs} +1 -1
- package/dist/{CloseButton-BMJBwHvG.js → CloseButton-CAPfd6yf.js} +1 -1
- package/dist/CommandPalette-BaRqoURY.cjs +1 -0
- package/dist/CommandPalette-DWv1UV8r.js +294 -0
- package/dist/{Confirm-Sl4LWoSK.cjs → Confirm-B5vMzPbN.cjs} +1 -1
- package/dist/{Confirm-BLXSK-OZ.js → Confirm-C4lT-6HD.js} +3 -3
- package/dist/{ContentSwitcher-CQvxg6RC.cjs → ContentSwitcher-DYxJZdcm.cjs} +1 -1
- package/dist/{ContentSwitcher-DuHRX4Y6.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-7GkgyPz9.js → DataTable-CcwD0PSJ.js} +3 -3
- package/dist/{DataTable-D8y7LUof.cjs → DataTable-xEw-NvHM.cjs} +1 -1
- package/dist/{DatePicker-BkHd2fJW.js → DatePicker-3pCNky8d.js} +235 -231
- package/dist/DatePicker-BrMicYUx.cjs +1 -0
- package/dist/{FileUploader-VBJtI2xh.js → FileUploader-CcGdRBxp.js} +1 -1
- package/dist/{FileUploader-CPTj5s_M.cjs → FileUploader-CcieVEGZ.cjs} +1 -1
- package/dist/FloatingToolbar-BV-iGNxe.js +120 -0
- package/dist/FloatingToolbar-C8xB4BzH.cjs +1 -0
- package/dist/{ImagePicker-D8qyyjVv.cjs → ImagePicker-5qPI77Jo.cjs} +1 -1
- package/dist/{ImagePicker-BkZVENEg.js → ImagePicker-BnHg403Q.js} +2 -2
- package/dist/InfoHint-CdluaJqE.cjs +1 -0
- package/dist/InfoHint-zMuSw_99.js +182 -0
- package/dist/{InlineLoading-CA0_IT29.cjs → InlineLoading-CqGrNWHf.cjs} +1 -1
- package/dist/{InlineLoading-Cknqq0vv.js → InlineLoading-_j2KKhNQ.js} +1 -1
- package/dist/{LogView-u_QhvV__.js → LogView-BLa9W5S7.js} +2 -2
- package/dist/{LogView-JjJVH_NA.cjs → LogView-BNztzJri.cjs} +1 -1
- package/dist/Menu-CWxBEMC4.js +193 -0
- package/dist/Menu-D0TerdRm.cjs +1 -0
- package/dist/{MenuBarItem-yr5aizl3.js → MenuBarItem-BYh4YWR4.js} +1 -1
- package/dist/{MenuBarItem-DlnIAhRw.cjs → MenuBarItem-DTOqacvg.cjs} +1 -1
- package/dist/Modal-CmGFLEo4.cjs +1 -0
- package/dist/{Modal-DaXgWyZN.js → Modal-DwL90AoV.js} +74 -70
- package/dist/NotificationCenter-EMlV-oPh.cjs +1 -0
- package/dist/NotificationCenter-YZnPMH7c.js +591 -0
- package/dist/{NumberInput-B7_EP2yg.js → NumberInput-B91ahziS.js} +1 -1
- package/dist/{NumberInput-CHWFFpDv.cjs → NumberInput-DLPSNgsr.cjs} +1 -1
- package/dist/{OverflowMenu-DXJ8waZo.js → OverflowMenu-DliuDrTK.js} +2 -2
- package/dist/{OverflowMenu-CWgdicDN.cjs → OverflowMenu-DuRgj1DU.cjs} +1 -1
- package/dist/{PageHeader-KKxiyfqh.cjs → PageHeader-BoEdR_T5.cjs} +1 -1
- package/dist/{PageHeader-Bypc30sW.js → PageHeader-c6117xYf.js} +1 -1
- package/dist/{Pagination-DTsfPCOs.cjs → Pagination-B3lmxggo.cjs} +1 -1
- package/dist/{Pagination-CjOtISav.js → Pagination-DwAc-4d9.js} +2 -2
- package/dist/{Search-xsC4Tm0d.js → Search-Bwdxxe29.js} +2 -2
- package/dist/{Search-CKXtAyrU.cjs → Search-DIZ1Ea45.cjs} +1 -1
- package/dist/Select-CDs-7QtW.js +619 -0
- package/dist/Select-CJqwMI69.cjs +1 -0
- package/dist/{Shell-BWLjIdD0.cjs → Shell-BZslT2aj.cjs} +1 -1
- package/dist/{Shell-DZfaTUo3.js → Shell-CRmhoU2H.js} +2 -2
- package/dist/{ShellPanel-K4vyQYQM.js → ShellPanel-C4vQJmRI.js} +1 -1
- package/dist/{ShellPanel-ColJQNUK.cjs → ShellPanel-DUBq5BL6.cjs} +1 -1
- package/dist/{SidebarCollapseToggle-DraqbhwM.js → SidebarCollapseToggle-C38R19gG.js} +1 -1
- package/dist/{SidebarCollapseToggle-CABmF-PC.cjs → SidebarCollapseToggle-DOck3Txy.cjs} +1 -1
- package/dist/SidebarMenuItem-DzJ_R2__.cjs +1 -0
- package/dist/SidebarMenuItem-E410HTei.js +302 -0
- package/dist/{Slider-BLkYlDHi.js → Slider-B6QXQMqb.js} +1 -1
- package/dist/{Slider-DGTE-3wW.cjs → Slider-B7m_luyq.cjs} +1 -1
- package/dist/Spinner-BlzVODzE.js +161 -0
- package/dist/Spinner-Bpfgl-mN.cjs +1 -0
- package/dist/{Stat-BCvXYr-z.cjs → Stat-BByeMKkT.cjs} +1 -1
- package/dist/{Stat-No3RhGB3.js → Stat-DWliDbWE.js} +1 -1
- package/dist/Submenu-BkHGYo7X.js +168 -0
- package/dist/Submenu-CCQnBpln.cjs +1 -0
- package/dist/{SuggestionList-Cxy4jjjd.cjs → SuggestionList-C61Dj6en.cjs} +1 -1
- package/dist/{SuggestionList-Dv4yQAi-.js → SuggestionList-D48Ojcf3.js} +1 -1
- package/dist/{TableOfContents-WDCjtpK6.js → TableOfContents-CeZX4dH0.js} +1 -1
- package/dist/{TableOfContents-BzG-BsKk.cjs → TableOfContents-D9FCu6gN.cjs} +1 -1
- package/dist/{TextInput-HEjIGR6p.js → TextInput-BeqDf1R7.js} +1 -1
- package/dist/{TextInput-CKSRFb0q.cjs → TextInput-SJ34hD2Y.cjs} +1 -1
- package/dist/{Toast-DHjc9WQU.cjs → Toast-CN5Jzkr5.cjs} +1 -1
- package/dist/{Toast-DxZ2xjeq.js → Toast-DIf2XRCa.js} +2 -2
- package/dist/Toaster-Dwjm0bsR.js +285 -0
- package/dist/Toaster-aJJvxlEr.cjs +1 -0
- package/dist/{UserMenu-C54sf0xb.js → UserMenu-BTihjCKC.js} +95 -91
- package/dist/UserMenu-CHkbByFS.cjs +1 -0
- package/dist/{Video-BFik9HZq.js → Video-Agby8uRA.js} +1 -1
- package/dist/{Video-Cnqsjo4n.cjs → Video-B93sRbBU.cjs} +1 -1
- package/dist/{Walkthrough-JqWDEe00.js → Walkthrough-BqGB1yaX.js} +64 -60
- package/dist/Walkthrough-sGAypY5d.cjs +1 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +212 -211
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- 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/AiLabel.vue.d.ts.map +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/BackToTop.cjs +1 -1
- package/dist/components/BackToTop.mjs +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/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- package/dist/components/Board.vue.d.ts.map +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/ChatMessage.cjs +1 -1
- package/dist/components/ChatMessage.mjs +1 -1
- package/dist/components/ChatThread.cjs +1 -1
- package/dist/components/ChatThread.mjs +1 -1
- package/dist/components/CloseButton.cjs +1 -1
- package/dist/components/CloseButton.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.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.map +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.mjs +1 -1
- package/dist/components/InfoHint.cjs +1 -1
- package/dist/components/InfoHint.mjs +1 -1
- package/dist/components/InfoHint.vue.d.ts.map +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/LogView.cjs +1 -1
- package/dist/components/LogView.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +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/Pagination.cjs +1 -1
- package/dist/components/Pagination.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.map +1 -1
- 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/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Spinner.vue.d.ts.map +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/Submenu.vue.d.ts.map +1 -1
- package/dist/components/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/TextInput.cjs +1 -1
- package/dist/components/TextInput.mjs +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/Toaster.vue.d.ts.map +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/Walkthrough.vue.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +2 -2
- package/dist/composables/useTeleportReady.composable.cjs +1 -0
- package/dist/composables/useTeleportReady.composable.d.ts +30 -0
- package/dist/composables/useTeleportReady.composable.d.ts.map +1 -0
- package/dist/composables/useTeleportReady.composable.mjs +11 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +156 -155
- package/dist/main-BMIeIxGV.cjs +4 -0
- package/dist/{main-hHSQ2Z9E.js → main-BXz7vG2i.js} +203 -193
- package/dist/main.d.ts +19 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AiLabel.css +1 -1
- package/dist/styles/Button.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/styles/Spinner.css +1 -1
- package/dist/styles/Toaster.css +1 -1
- package/dist/styles/Walkthrough.css +1 -1
- package/dist/ui.css +9 -9
- package/package.json +1 -1
- package/dist/AiLabel-BwGuSf92.cjs +0 -1
- package/dist/AiLabel-CT7tpXv4.js +0 -240
- package/dist/Board-C43JjSsH.cjs +0 -1
- package/dist/Button-5ClGtoaz.cjs +0 -1
- package/dist/CommandPalette-DSE40a5L.cjs +0 -1
- package/dist/CommandPalette-DjkNy4l7.js +0 -290
- package/dist/DatePicker-CeDO01NZ.cjs +0 -1
- package/dist/FloatingToolbar-BikX_AsP.js +0 -116
- package/dist/FloatingToolbar-DWVY8Fxo.cjs +0 -1
- package/dist/InfoHint-BEzkNQTM.cjs +0 -1
- package/dist/InfoHint-BlHxrTw6.js +0 -178
- package/dist/Menu-7EgnchVu.js +0 -189
- package/dist/Menu-Bs2Co1sl.cjs +0 -1
- package/dist/Modal-CRbvPpfy.cjs +0 -1
- package/dist/NotificationCenter-D0PKt3fk.js +0 -587
- package/dist/NotificationCenter-fmSEnZDX.cjs +0 -1
- package/dist/Select-CPztC5IV.cjs +0 -1
- package/dist/Select-CqLa55kO.js +0 -615
- package/dist/SidebarMenuItem-DQRQtqrp.js +0 -300
- package/dist/SidebarMenuItem-Dwk7vKN5.cjs +0 -1
- package/dist/Spinner-DYFhiTB1.js +0 -160
- package/dist/Spinner-j13gRoUF.cjs +0 -1
- package/dist/Submenu-BDs-yAqv.js +0 -164
- package/dist/Submenu-BLjx2kWl.cjs +0 -1
- package/dist/Toaster-C227oHXu.js +0 -284
- package/dist/Toaster-IS3DUaZt.cjs +0 -1
- package/dist/UserMenu-BnGiKwDE.cjs +0 -1
- package/dist/Walkthrough-DHgb972k.cjs +0 -1
- package/dist/main-Dr-OZ97R.cjs +0 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TOUR_STEP_ATTRIBUTE as
|
|
3
|
-
import { NB_COMMAND_PALETTE_KEY as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i as e, l as t, r as n, u as r } from "./Button-DmJ_J3UO.js";
|
|
2
|
+
import { TOUR_STEP_ATTRIBUTE as i } from "./utils/tourTarget.helper.mjs";
|
|
3
|
+
import { NB_COMMAND_PALETTE_KEY as a, createCommandPaletteState as o } from "./composables/useCommandPalette.composable.mjs";
|
|
4
|
+
import { NB_HYDRATION as s } from "./composables/useTeleportReady.composable.mjs";
|
|
5
|
+
import { t as c } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
6
|
+
import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, defineComponent as m, nextTick as ee, normalizeClass as h, normalizeStyle as g, onMounted as te, openBlock as _, ref as v, renderList as y, renderSlot as ne, toDisplayString as b, useTemplateRef as x, vModelText as re, withDirectives as ie, withModifiers as S } from "vue";
|
|
6
7
|
//#region src/directives/ContextMenu.directive.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
8
|
+
var C = /* @__PURE__ */ r({ default: () => w });
|
|
9
|
+
function w(e) {
|
|
9
10
|
e.directive("nb-context-menu", {
|
|
10
11
|
mounted(e, t) {
|
|
11
12
|
let n = (e) => {
|
|
@@ -33,52 +34,52 @@ function C(e) {
|
|
|
33
34
|
}
|
|
34
35
|
//#endregion
|
|
35
36
|
//#region src/directives/TourStep.directive.ts
|
|
36
|
-
var
|
|
37
|
-
function
|
|
37
|
+
var T = /* @__PURE__ */ r({ default: () => D });
|
|
38
|
+
function E(e, t) {
|
|
38
39
|
let n = t.value;
|
|
39
40
|
if (n == null || n === "") {
|
|
40
|
-
e.removeAttribute(
|
|
41
|
+
e.removeAttribute(i);
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
e.setAttribute(
|
|
44
|
+
e.setAttribute(i, String(n));
|
|
44
45
|
}
|
|
45
|
-
var
|
|
46
|
+
var D = (e) => {
|
|
46
47
|
e.directive("nb-tour-step", {
|
|
47
|
-
mounted:
|
|
48
|
-
updated:
|
|
48
|
+
mounted: E,
|
|
49
|
+
updated: E,
|
|
49
50
|
unmounted(e) {
|
|
50
|
-
e.removeAttribute(
|
|
51
|
+
e.removeAttribute(i);
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
|
-
},
|
|
54
|
-
"./ContextMenu.directive.ts":
|
|
55
|
-
"./ToolTip.content.ts":
|
|
56
|
-
"./ToolTip.directive.ts":
|
|
57
|
-
"./TourStep.directive.ts":
|
|
58
|
-
}),
|
|
59
|
-
Object.values(
|
|
54
|
+
}, O = /* @__PURE__ */ Object.assign({
|
|
55
|
+
"./ContextMenu.directive.ts": C,
|
|
56
|
+
"./ToolTip.content.ts": t,
|
|
57
|
+
"./ToolTip.directive.ts": e,
|
|
58
|
+
"./TourStep.directive.ts": T
|
|
59
|
+
}), k = { install(e) {
|
|
60
|
+
Object.values(O).forEach((t) => {
|
|
60
61
|
typeof t.default == "function" && t.default(e);
|
|
61
62
|
});
|
|
62
|
-
} },
|
|
63
|
-
let t =
|
|
64
|
-
e.provide(
|
|
65
|
-
} },
|
|
63
|
+
} }, A = { install(e) {
|
|
64
|
+
let t = o();
|
|
65
|
+
e.provide(a, t);
|
|
66
|
+
} }, j = /* @__PURE__ */ function(e) {
|
|
66
67
|
return e.Object = "object", e.Array = "array", e.Primitive = "primitive", e;
|
|
67
|
-
}(
|
|
68
|
+
}(j || {}), ae = {
|
|
68
69
|
key: 0,
|
|
69
70
|
class: "nb-spreadsheet__toolbar"
|
|
70
|
-
},
|
|
71
|
+
}, oe = {
|
|
71
72
|
key: 0,
|
|
72
73
|
class: "nb-spreadsheet__corner",
|
|
73
74
|
style: {
|
|
74
75
|
gridRow: 1,
|
|
75
76
|
gridColumn: 1
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, se = ["onClick"], ce = { class: "nb-spreadsheet__header-label" }, le = {
|
|
78
79
|
key: 0,
|
|
79
80
|
class: "nb-spreadsheet__sort",
|
|
80
81
|
"aria-hidden": "true"
|
|
81
|
-
},
|
|
82
|
+
}, ue = ["onMousedown"], de = [
|
|
82
83
|
"title",
|
|
83
84
|
"data-cell",
|
|
84
85
|
"data-row",
|
|
@@ -86,7 +87,7 @@ var E = (e) => {
|
|
|
86
87
|
"onMousedown",
|
|
87
88
|
"onMouseenter",
|
|
88
89
|
"onDblclick"
|
|
89
|
-
],
|
|
90
|
+
], fe = ["inputmode"], pe = 36, M = 32, N = /* @__PURE__ */ m({
|
|
90
91
|
__name: "Spreadsheet",
|
|
91
92
|
props: {
|
|
92
93
|
columns: {},
|
|
@@ -117,7 +118,7 @@ var E = (e) => {
|
|
|
117
118
|
"row-reorder"
|
|
118
119
|
],
|
|
119
120
|
setup(e, { expose: t, emit: n }) {
|
|
120
|
-
let r = e, i = n, a =
|
|
121
|
+
let r = e, i = n, a = x("scrollerRef"), o = x("editorRef"), s = v({}), c = v(null), m = v(null), C = v(null), w = v(!1), T = v(null), E = v(0), D = v(0), O = "", k = v([]), A = v([]), j = u(() => {
|
|
121
122
|
let e = r.columns.filter((e) => e.pinned === "left"), t = r.columns.filter((e) => e.pinned === "right"), n = r.columns.filter((e) => !e.pinned);
|
|
122
123
|
return [
|
|
123
124
|
...e,
|
|
@@ -125,27 +126,27 @@ var E = (e) => {
|
|
|
125
126
|
...t
|
|
126
127
|
];
|
|
127
128
|
});
|
|
128
|
-
function
|
|
129
|
-
return
|
|
129
|
+
function N(e) {
|
|
130
|
+
return s.value[e.id] ?? e.width ?? 120;
|
|
130
131
|
}
|
|
131
|
-
let
|
|
132
|
+
let P = u(() => ({ gridTemplateColumns: (r.showGutter ? `${r.gutterWidth}px ` : "") + j.value.map((e) => `${N(e)}px`).join(" ") })), F = u(() => {
|
|
132
133
|
let e = r.rows.filter((e) => !e.pinned);
|
|
133
|
-
if (!
|
|
134
|
-
let t = r.columns.find((e) => e.id ===
|
|
134
|
+
if (!c.value) return e;
|
|
135
|
+
let t = r.columns.find((e) => e.id === c.value.columnId);
|
|
135
136
|
if (!t) return e;
|
|
136
|
-
let n =
|
|
137
|
+
let n = c.value.direction === "asc" ? 1 : -1, i = (e, t) => e == null && t == null ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? (e - t) * n : String(e).localeCompare(String(t)) * n;
|
|
137
138
|
return [...e].sort((e, n) => i(e.values[t.id], n.values[t.id]));
|
|
138
|
-
}),
|
|
139
|
-
let e = Math.max(1, Math.ceil((a.value?.clientHeight ?? 600) /
|
|
139
|
+
}), I = u(() => r.rows.filter((e) => e.pinned === "top")), L = u(() => r.rows.filter((e) => e.pinned === "bottom")), R = u(() => {
|
|
140
|
+
let e = Math.max(1, Math.ceil((a.value?.clientHeight ?? 600) / M)), t = Math.max(10, Math.floor(r.windowRows / 4)), n = Math.floor(E.value / M) - I.value.length - t, i = Math.max(0, n), o = Math.min(F.value.length, i + e + t * 2), s = I.value.map((e, t) => ({
|
|
140
141
|
...e,
|
|
141
142
|
__virtualIndex: t,
|
|
142
143
|
gutterLabel: ""
|
|
143
|
-
})), c =
|
|
144
|
+
})), c = F.value.slice(i, o).map((e, t) => ({
|
|
144
145
|
...e,
|
|
145
|
-
__virtualIndex: i + t +
|
|
146
|
-
})), l =
|
|
146
|
+
__virtualIndex: i + t + I.value.length
|
|
147
|
+
})), l = L.value.map((e, t) => ({
|
|
147
148
|
...e,
|
|
148
|
-
__virtualIndex:
|
|
149
|
+
__virtualIndex: I.value.length + F.value.length + t,
|
|
149
150
|
gutterLabel: ""
|
|
150
151
|
}));
|
|
151
152
|
return [
|
|
@@ -154,7 +155,7 @@ var E = (e) => {
|
|
|
154
155
|
...l
|
|
155
156
|
];
|
|
156
157
|
});
|
|
157
|
-
function
|
|
158
|
+
function me(e, t) {
|
|
158
159
|
if (t == null || t === "") return "";
|
|
159
160
|
if (e.type === "number") {
|
|
160
161
|
let e = typeof t == "number" ? t : Number(t);
|
|
@@ -166,7 +167,7 @@ var E = (e) => {
|
|
|
166
167
|
}
|
|
167
168
|
return String(t);
|
|
168
169
|
}
|
|
169
|
-
function
|
|
170
|
+
function z(e, t) {
|
|
170
171
|
if (t === "") return null;
|
|
171
172
|
if (e.type === "number") {
|
|
172
173
|
let e = t.replace(/\s/g, "").replace(",", "."), n = Number(e);
|
|
@@ -180,29 +181,29 @@ var E = (e) => {
|
|
|
180
181
|
}
|
|
181
182
|
return t;
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function B(e, t) {
|
|
184
185
|
let n = r.rows.find((t) => t.id === e);
|
|
185
186
|
if (!n) return;
|
|
186
187
|
let i = n.values[t];
|
|
187
188
|
if (i !== void 0) return i;
|
|
188
|
-
if (r.computed) return r.computed(e, t,
|
|
189
|
+
if (r.computed) return r.computed(e, t, B);
|
|
189
190
|
}
|
|
190
|
-
function
|
|
191
|
+
function V(e, t) {
|
|
191
192
|
return r.cellAttrs ? r.cellAttrs(e.id, t.id, e, t) ?? {} : {};
|
|
192
193
|
}
|
|
193
|
-
function
|
|
194
|
-
let n =
|
|
194
|
+
function he(e, t) {
|
|
195
|
+
let n = V(e, t);
|
|
195
196
|
if (n.display !== void 0) return n.display;
|
|
196
|
-
let r =
|
|
197
|
-
return t.format ? t.format(r, e) :
|
|
197
|
+
let r = B(e.id, t.id);
|
|
198
|
+
return t.format ? t.format(r, e) : me(t, r);
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
-
let n =
|
|
200
|
+
function ge(e, t) {
|
|
201
|
+
let n = V(e, t), r = m.value?.rowId === e.id && m.value?.columnId === t.id, i = Ce(e.id, t.id);
|
|
201
202
|
return {
|
|
202
203
|
[`nb-spreadsheet__cell--${t.align ?? (t.type === "number" || t.type === "date" ? "right" : "left")}`]: !0,
|
|
203
204
|
"nb-spreadsheet__cell--focused": r,
|
|
204
205
|
"nb-spreadsheet__cell--selected": i,
|
|
205
|
-
"nb-spreadsheet__cell--readonly":
|
|
206
|
+
"nb-spreadsheet__cell--readonly": H(e, t),
|
|
206
207
|
"nb-spreadsheet__cell--computed": !!n.computed || !!e.computed,
|
|
207
208
|
"nb-spreadsheet__cell--pinned-top": e.pinned === "top",
|
|
208
209
|
"nb-spreadsheet__cell--pinned-bottom": e.pinned === "bottom",
|
|
@@ -210,68 +211,68 @@ var E = (e) => {
|
|
|
210
211
|
[e.className ?? ""]: !!e.className
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function H(e, t) {
|
|
214
215
|
if (e.computed || t.readOnly) return !0;
|
|
215
|
-
let n =
|
|
216
|
+
let n = V(e, t);
|
|
216
217
|
return !!n.readOnly || !!n.computed;
|
|
217
218
|
}
|
|
218
|
-
function
|
|
219
|
-
return
|
|
219
|
+
function _e(e, t) {
|
|
220
|
+
return V(e, t).tooltip ?? "";
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
+
function ve(e) {
|
|
222
223
|
return {
|
|
223
224
|
"nb-spreadsheet__header--sortable": !!e.sortable,
|
|
224
225
|
"nb-spreadsheet__header--pinned-left": e.pinned === "left",
|
|
225
226
|
"nb-spreadsheet__header--pinned-right": e.pinned === "right"
|
|
226
227
|
};
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
+
function U(e) {
|
|
229
230
|
if (e.pinned !== "left") return 0;
|
|
230
231
|
let t = r.showGutter ? r.gutterWidth : 0;
|
|
231
|
-
for (let n of
|
|
232
|
+
for (let n of j.value) {
|
|
232
233
|
if (n.id === e.id) break;
|
|
233
|
-
n.pinned === "left" && (t +=
|
|
234
|
+
n.pinned === "left" && (t += N(n));
|
|
234
235
|
}
|
|
235
236
|
return t;
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function W(e) {
|
|
238
239
|
if (e.pinned !== "right") return 0;
|
|
239
|
-
let t = 0, n = [...
|
|
240
|
+
let t = 0, n = [...j.value].reverse();
|
|
240
241
|
for (let r of n) {
|
|
241
242
|
if (r.id === e.id) break;
|
|
242
|
-
r.pinned === "right" && (t +=
|
|
243
|
+
r.pinned === "right" && (t += N(r));
|
|
243
244
|
}
|
|
244
245
|
return t;
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
+
function ye(e, t) {
|
|
247
248
|
let n = (r.showGutter ? 2 : 1) + t, i = {};
|
|
248
|
-
return e.pinned === "left" ? (i.position = "sticky", i.left = `${
|
|
249
|
+
return e.pinned === "left" ? (i.position = "sticky", i.left = `${U(e)}px`, i.zIndex = "3") : e.pinned === "right" && (i.position = "sticky", i.right = `${W(e)}px`, i.zIndex = "3"), {
|
|
249
250
|
gridRow: 1,
|
|
250
251
|
gridColumn: n,
|
|
251
252
|
...i
|
|
252
253
|
};
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function be(e, t, n) {
|
|
255
256
|
let i = (r.showGutter ? 2 : 1) + n, a = e.__virtualIndex + 2, o = {};
|
|
256
|
-
return t.pinned === "left" ? (o.position = "sticky", o.left = `${
|
|
257
|
+
return t.pinned === "left" ? (o.position = "sticky", o.left = `${U(t)}px`, o.zIndex = "2") : t.pinned === "right" && (o.position = "sticky", o.right = `${W(t)}px`, o.zIndex = "2"), (e.pinned === "top" || e.pinned === "bottom") && (o.position = "sticky", o.zIndex = String(Math.max(Number(o.zIndex ?? 0), 2)), Object.assign(o, G(e))), {
|
|
257
258
|
gridRow: a,
|
|
258
259
|
gridColumn: i,
|
|
259
260
|
...o
|
|
260
261
|
};
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
+
function G(e) {
|
|
263
264
|
if (e.pinned === "top") {
|
|
264
|
-
let t =
|
|
265
|
+
let t = I.value.findIndex((t) => t.id === e.id);
|
|
265
266
|
return { top: `calc(var(--nbss-header-height) + var(--nbss-row-height) * ${Math.max(0, t)})` };
|
|
266
267
|
}
|
|
267
268
|
if (e.pinned === "bottom") {
|
|
268
|
-
let t =
|
|
269
|
+
let t = L.value, n = t.findIndex((t) => t.id === e.id);
|
|
269
270
|
return { bottom: `calc(var(--nbss-row-height) * ${Math.max(0, t.length - 1 - n)})` };
|
|
270
271
|
}
|
|
271
272
|
return {};
|
|
272
273
|
}
|
|
273
274
|
function xe(e) {
|
|
274
|
-
return e.label === void 0 ? e.gutterLabel === void 0 ? String(e.__virtualIndex -
|
|
275
|
+
return e.label === void 0 ? e.gutterLabel === void 0 ? String(e.__virtualIndex - I.value.length + 1) : e.gutterLabel : e.label;
|
|
275
276
|
}
|
|
276
277
|
function Se(e) {
|
|
277
278
|
let t = {
|
|
@@ -279,75 +280,75 @@ var E = (e) => {
|
|
|
279
280
|
left: "0",
|
|
280
281
|
zIndex: "2"
|
|
281
282
|
};
|
|
282
|
-
return e.pinned && (Object.assign(t,
|
|
283
|
+
return e.pinned && (Object.assign(t, G(e)), t.zIndex = "4"), {
|
|
283
284
|
gridRow: e.__virtualIndex + 2,
|
|
284
285
|
gridColumn: 1,
|
|
285
286
|
...t
|
|
286
287
|
};
|
|
287
288
|
}
|
|
288
289
|
function Ce(e, t) {
|
|
289
|
-
if (!
|
|
290
|
+
if (!C.value) return !1;
|
|
290
291
|
let n = [
|
|
291
|
-
...L.value,
|
|
292
292
|
...I.value,
|
|
293
|
-
...
|
|
294
|
-
|
|
293
|
+
...F.value,
|
|
294
|
+
...L.value
|
|
295
|
+
].map((e) => e.id), r = j.value.map((e) => e.id), i = n.indexOf(C.value.startRowId), a = n.indexOf(C.value.endRowId), o = r.indexOf(C.value.startColumnId), s = r.indexOf(C.value.endColumnId), c = n.indexOf(e), l = r.indexOf(t);
|
|
295
296
|
return c >= Math.min(i, a) && c <= Math.max(i, a) && l >= Math.min(o, s) && l <= Math.max(o, s);
|
|
296
297
|
}
|
|
297
298
|
function K(e, t, n = !1) {
|
|
298
|
-
|
|
299
|
+
m.value = {
|
|
299
300
|
rowId: e,
|
|
300
301
|
columnId: t
|
|
301
|
-
}, n &&
|
|
302
|
-
...
|
|
302
|
+
}, n && C.value ? C.value = {
|
|
303
|
+
...C.value,
|
|
303
304
|
endRowId: e,
|
|
304
305
|
endColumnId: t
|
|
305
|
-
} :
|
|
306
|
+
} : C.value = {
|
|
306
307
|
startRowId: e,
|
|
307
308
|
startColumnId: t,
|
|
308
309
|
endRowId: e,
|
|
309
310
|
endColumnId: t
|
|
310
|
-
}, i("focus",
|
|
311
|
+
}, i("focus", m.value), i("selection", C.value);
|
|
311
312
|
}
|
|
312
313
|
function we(e) {
|
|
313
|
-
|
|
314
|
+
O = e.pointerType;
|
|
314
315
|
}
|
|
315
316
|
function Te(e, t, n) {
|
|
316
|
-
let r =
|
|
317
|
-
if (
|
|
318
|
-
let e =
|
|
317
|
+
let r = O === "touch" && !e.shiftKey && m.value?.rowId === t.id && m.value?.columnId === n.id;
|
|
318
|
+
if (O = "", T.value && Z(), w.value = !0, K(t.id, n.id, e.shiftKey), q(), e.preventDefault(), document.addEventListener("mouseup", De, { once: !0 }), r && !H(t, n)) {
|
|
319
|
+
let e = B(t.id, n.id);
|
|
319
320
|
X(t, n, e == null ? "" : String(e), "edit");
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
function Ee(e, t) {
|
|
323
|
-
!
|
|
324
|
-
...
|
|
324
|
+
!w.value || !C.value || (C.value = {
|
|
325
|
+
...C.value,
|
|
325
326
|
endRowId: e.id,
|
|
326
327
|
endColumnId: t.id
|
|
327
|
-
}, i("selection",
|
|
328
|
+
}, i("selection", C.value));
|
|
328
329
|
}
|
|
329
330
|
function De() {
|
|
330
|
-
|
|
331
|
+
w.value = !1;
|
|
331
332
|
}
|
|
332
333
|
function Oe(e, t) {
|
|
333
|
-
if (
|
|
334
|
-
let n =
|
|
334
|
+
if (H(e, t)) return;
|
|
335
|
+
let n = B(e.id, t.id);
|
|
335
336
|
X(e, t, n == null ? "" : String(n), "edit");
|
|
336
337
|
}
|
|
337
338
|
function q() {
|
|
338
339
|
a.value?.focus({ preventScroll: !0 });
|
|
339
340
|
}
|
|
340
341
|
function J(e, t, n = !1) {
|
|
341
|
-
if (!
|
|
342
|
-
let e =
|
|
342
|
+
if (!m.value) {
|
|
343
|
+
let e = j.value[0], t = R.value[0];
|
|
343
344
|
e && t && K(t.id, e.id);
|
|
344
345
|
return;
|
|
345
346
|
}
|
|
346
347
|
let r = [
|
|
347
|
-
...L.value,
|
|
348
348
|
...I.value,
|
|
349
|
-
...
|
|
350
|
-
|
|
349
|
+
...F.value,
|
|
350
|
+
...L.value
|
|
351
|
+
], i = r.findIndex((e) => e.id === m.value.rowId), a = j.value.findIndex((e) => e.id === m.value.columnId), o = Math.max(0, Math.min(r.length - 1, i + e)), s = Math.max(0, Math.min(j.value.length - 1, a + t)), c = r[o].id, l = j.value[s].id;
|
|
351
352
|
K(c, l, n), Me(c, l);
|
|
352
353
|
}
|
|
353
354
|
function ke(e) {
|
|
@@ -364,35 +365,35 @@ var E = (e) => {
|
|
|
364
365
|
}
|
|
365
366
|
function je(e) {
|
|
366
367
|
let t = e === "left" && r.showGutter ? r.gutterWidth : 0;
|
|
367
|
-
for (let n of
|
|
368
|
+
for (let n of j.value) n.pinned === e && (t += N(n));
|
|
368
369
|
return t;
|
|
369
370
|
}
|
|
370
371
|
function Me(e, t) {
|
|
371
372
|
let n = a.value;
|
|
372
373
|
if (!n) return;
|
|
373
|
-
let i =
|
|
374
|
+
let i = F.value.findIndex((t) => t.id === e);
|
|
374
375
|
if (i >= 0) {
|
|
375
|
-
let e = Y(".nb-spreadsheet__header") ||
|
|
376
|
+
let e = Y(".nb-spreadsheet__header") || pe, t = Y(".nb-spreadsheet__cell") || M, r = e + (I.value.length + i) * t, a = e + Ae(I.value), o = Ae(L.value);
|
|
376
377
|
r - a < n.scrollTop ? n.scrollTop = r - a : r + t > n.scrollTop + n.clientHeight - o && (n.scrollTop = r + t - n.clientHeight + o);
|
|
377
378
|
}
|
|
378
|
-
let o = t ?
|
|
379
|
+
let o = t ? j.value.find((e) => e.id === t) : void 0;
|
|
379
380
|
if (o && !o.pinned) {
|
|
380
381
|
let e = r.showGutter ? r.gutterWidth : 0;
|
|
381
|
-
for (let t of
|
|
382
|
+
for (let t of j.value) {
|
|
382
383
|
if (t.id === o.id) break;
|
|
383
|
-
e +=
|
|
384
|
+
e += N(t);
|
|
384
385
|
}
|
|
385
|
-
let t =
|
|
386
|
+
let t = N(o), i = je("left"), a = je("right");
|
|
386
387
|
e - i < n.scrollLeft ? n.scrollLeft = e - i : e + t > n.scrollLeft + n.clientWidth - a && (n.scrollLeft = e + t - n.clientWidth + a);
|
|
387
388
|
}
|
|
388
389
|
Ne();
|
|
389
390
|
}
|
|
390
391
|
function Ne() {
|
|
391
|
-
|
|
392
|
+
E.value = a.value?.scrollTop ?? 0, D.value = a.value?.scrollLeft ?? 0;
|
|
392
393
|
}
|
|
393
394
|
function Pe() {
|
|
394
|
-
if (!
|
|
395
|
-
let e = r.rows.find((e) => e.id ===
|
|
395
|
+
if (!m.value) return null;
|
|
396
|
+
let e = r.rows.find((e) => e.id === m.value.rowId), t = r.columns.find((e) => e.id === m.value.columnId);
|
|
396
397
|
return e && t ? {
|
|
397
398
|
r: e,
|
|
398
399
|
c: t
|
|
@@ -402,8 +403,8 @@ var E = (e) => {
|
|
|
402
403
|
return !e.metaKey && !e.ctrlKey && !e.altKey && e.key.length === 1;
|
|
403
404
|
}
|
|
404
405
|
function Ie(e) {
|
|
405
|
-
if (
|
|
406
|
-
e.target !== o.value && (Fe(e) ? (e.preventDefault(),
|
|
406
|
+
if (T.value) {
|
|
407
|
+
e.target !== o.value && (Fe(e) ? (e.preventDefault(), T.value.draft += e.key) : ze(e));
|
|
407
408
|
return;
|
|
408
409
|
}
|
|
409
410
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "z") {
|
|
@@ -430,7 +431,7 @@ var E = (e) => {
|
|
|
430
431
|
e.preventDefault(), J(e.shiftKey ? -1 : 1, 0);
|
|
431
432
|
break;
|
|
432
433
|
case "Escape":
|
|
433
|
-
|
|
434
|
+
C.value = null, i("selection", null);
|
|
434
435
|
break;
|
|
435
436
|
case "Delete":
|
|
436
437
|
case "Backspace":
|
|
@@ -439,8 +440,8 @@ var E = (e) => {
|
|
|
439
440
|
case "F2": {
|
|
440
441
|
e.preventDefault();
|
|
441
442
|
let t = Pe();
|
|
442
|
-
if (t && !
|
|
443
|
-
let e =
|
|
443
|
+
if (t && !H(t.r, t.c)) {
|
|
444
|
+
let e = B(t.r.id, t.c.id);
|
|
444
445
|
X(t.r, t.c, e == null ? "" : String(e), "edit");
|
|
445
446
|
}
|
|
446
447
|
break;
|
|
@@ -448,17 +449,17 @@ var E = (e) => {
|
|
|
448
449
|
default: {
|
|
449
450
|
if (!Fe(e)) break;
|
|
450
451
|
let t = Pe();
|
|
451
|
-
t && !
|
|
452
|
+
t && !H(t.r, t.c) && (e.preventDefault(), X(t.r, t.c, e.key, "enter"));
|
|
452
453
|
}
|
|
453
454
|
}
|
|
454
455
|
}
|
|
455
456
|
function X(e, t, n, r) {
|
|
456
|
-
Me(e.id, t.id),
|
|
457
|
+
Me(e.id, t.id), T.value = {
|
|
457
458
|
rowId: e.id,
|
|
458
459
|
columnId: t.id,
|
|
459
460
|
draft: n,
|
|
460
461
|
mode: r
|
|
461
|
-
},
|
|
462
|
+
}, ee(() => {
|
|
462
463
|
let e = o.value;
|
|
463
464
|
if (e) if (e.focus({ preventScroll: !0 }), r === "enter") {
|
|
464
465
|
let t = e.value.length;
|
|
@@ -466,22 +467,22 @@ var E = (e) => {
|
|
|
466
467
|
} else e.select();
|
|
467
468
|
});
|
|
468
469
|
}
|
|
469
|
-
let Le =
|
|
470
|
-
if (
|
|
471
|
-
}), Re =
|
|
472
|
-
if (!
|
|
473
|
-
let e = a.value, t = e?.querySelector(`[data-cell="${ke(`${
|
|
470
|
+
let Le = u(() => {
|
|
471
|
+
if (T.value) return r.columns.find((e) => e.id === T.value.columnId)?.type === "number" ? "decimal" : "text";
|
|
472
|
+
}), Re = u(() => {
|
|
473
|
+
if (!T.value) return { display: "none" };
|
|
474
|
+
let e = a.value, t = e?.querySelector(`[data-cell="${ke(`${T.value.rowId}::${T.value.columnId}`)}"]`);
|
|
474
475
|
if (!e || !t) return { display: "none" };
|
|
475
476
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
476
477
|
return {
|
|
477
|
-
top: `${n.top - r.top - e.clientTop +
|
|
478
|
-
left: `${n.left - r.left - e.clientLeft +
|
|
478
|
+
top: `${n.top - r.top - e.clientTop + E.value}px`,
|
|
479
|
+
left: `${n.left - r.left - e.clientLeft + D.value}px`,
|
|
479
480
|
width: `${n.width}px`,
|
|
480
481
|
height: `${n.height}px`
|
|
481
482
|
};
|
|
482
483
|
});
|
|
483
484
|
function ze(e) {
|
|
484
|
-
let t =
|
|
485
|
+
let t = T.value?.mode, n = null;
|
|
485
486
|
switch (e.key) {
|
|
486
487
|
case "Enter":
|
|
487
488
|
n = [e.shiftKey ? -1 : 1, 0];
|
|
@@ -502,25 +503,25 @@ var E = (e) => {
|
|
|
502
503
|
t === "enter" && (n = [0, 1]);
|
|
503
504
|
break;
|
|
504
505
|
case "Escape":
|
|
505
|
-
e.preventDefault(),
|
|
506
|
+
e.preventDefault(), T.value = null, q();
|
|
506
507
|
return;
|
|
507
508
|
}
|
|
508
509
|
n && (e.preventDefault(), Z(), J(n[0], n[1]));
|
|
509
510
|
}
|
|
510
511
|
function Z(e = !0) {
|
|
511
|
-
if (!
|
|
512
|
-
let { rowId: t, columnId: n, draft: a } =
|
|
513
|
-
|
|
512
|
+
if (!T.value) return;
|
|
513
|
+
let { rowId: t, columnId: n, draft: a } = T.value;
|
|
514
|
+
T.value = null;
|
|
514
515
|
let o = r.columns.find((e) => e.id === n);
|
|
515
516
|
if (!o) return;
|
|
516
517
|
let s;
|
|
517
518
|
try {
|
|
518
|
-
s = o.parse ? o.parse(a) :
|
|
519
|
+
s = o.parse ? o.parse(a) : z(o, a);
|
|
519
520
|
} catch {
|
|
520
521
|
e && q();
|
|
521
522
|
return;
|
|
522
523
|
}
|
|
523
|
-
let c =
|
|
524
|
+
let c = B(t, n);
|
|
524
525
|
if (c !== s) {
|
|
525
526
|
let e = {
|
|
526
527
|
rowId: t,
|
|
@@ -533,12 +534,12 @@ var E = (e) => {
|
|
|
533
534
|
e && q();
|
|
534
535
|
}
|
|
535
536
|
function Be() {
|
|
536
|
-
if (!
|
|
537
|
+
if (!C.value) return [];
|
|
537
538
|
let e = [
|
|
538
|
-
...L.value,
|
|
539
539
|
...I.value,
|
|
540
|
-
...
|
|
541
|
-
|
|
540
|
+
...F.value,
|
|
541
|
+
...L.value
|
|
542
|
+
].map((e) => e.id), t = j.value.map((e) => e.id), n = e.indexOf(C.value.startRowId), r = e.indexOf(C.value.endRowId), i = t.indexOf(C.value.startColumnId), a = t.indexOf(C.value.endColumnId), o = [];
|
|
542
543
|
for (let s = Math.min(n, r); s <= Math.max(n, r); s++) for (let n = Math.min(i, a); n <= Math.max(i, a); n++) o.push({
|
|
543
544
|
rowId: e[s],
|
|
544
545
|
columnId: t[n]
|
|
@@ -549,8 +550,8 @@ var E = (e) => {
|
|
|
549
550
|
let e = Be(), t = [];
|
|
550
551
|
for (let { rowId: n, columnId: i } of e) {
|
|
551
552
|
let e = r.rows.find((e) => e.id === n), a = r.columns.find((e) => e.id === i);
|
|
552
|
-
if (!e || !a ||
|
|
553
|
-
let o =
|
|
553
|
+
if (!e || !a || H(e, a)) continue;
|
|
554
|
+
let o = B(n, i);
|
|
554
555
|
o == null || o === "" || t.push({
|
|
555
556
|
rowId: n,
|
|
556
557
|
columnId: i,
|
|
@@ -567,14 +568,14 @@ var E = (e) => {
|
|
|
567
568
|
function He(e) {
|
|
568
569
|
if (Be().length === 0) return;
|
|
569
570
|
let t = [
|
|
570
|
-
...L.value,
|
|
571
571
|
...I.value,
|
|
572
|
-
...
|
|
573
|
-
|
|
572
|
+
...F.value,
|
|
573
|
+
...L.value
|
|
574
|
+
].map((e) => e.id), n = j.value.map((e) => e.id), r = Math.min(t.indexOf(C.value.startRowId), t.indexOf(C.value.endRowId)), i = Math.max(t.indexOf(C.value.startRowId), t.indexOf(C.value.endRowId)), a = Math.min(n.indexOf(C.value.startColumnId), n.indexOf(C.value.endColumnId)), o = Math.max(n.indexOf(C.value.startColumnId), n.indexOf(C.value.endColumnId)), s = [];
|
|
574
575
|
for (let e = r; e <= i; e++) {
|
|
575
576
|
let r = [];
|
|
576
577
|
for (let i = a; i <= o; i++) {
|
|
577
|
-
let a =
|
|
578
|
+
let a = B(t[e], n[i]);
|
|
578
579
|
r.push(a == null ? "" : String(a));
|
|
579
580
|
}
|
|
580
581
|
s.push(r.join(" "));
|
|
@@ -585,28 +586,28 @@ var E = (e) => {
|
|
|
585
586
|
He(e), Ve();
|
|
586
587
|
}
|
|
587
588
|
function We(e) {
|
|
588
|
-
if (!
|
|
589
|
+
if (!m.value) return;
|
|
589
590
|
let t = e.clipboardData?.getData("text/plain") ?? "";
|
|
590
591
|
if (!t) return;
|
|
591
592
|
e.preventDefault();
|
|
592
593
|
let n = t.replace(/\r\n?/g, "\n").split("\n").map((e) => e.split(" ")), a = [
|
|
593
|
-
...L.value,
|
|
594
594
|
...I.value,
|
|
595
|
-
...
|
|
596
|
-
|
|
595
|
+
...F.value,
|
|
596
|
+
...L.value
|
|
597
|
+
].map((e) => e.id), o = j.value.map((e) => e.id), s = a.indexOf(m.value.rowId), c = o.indexOf(m.value.columnId), l = [];
|
|
597
598
|
if (n.forEach((e, t) => {
|
|
598
599
|
e.forEach((e, n) => {
|
|
599
600
|
let i = a[s + t], u = o[c + n];
|
|
600
601
|
if (!i || !u) return;
|
|
601
602
|
let d = r.rows.find((e) => e.id === i), f = r.columns.find((e) => e.id === u);
|
|
602
|
-
if (!d || !f ||
|
|
603
|
+
if (!d || !f || H(d, f)) return;
|
|
603
604
|
let p;
|
|
604
605
|
try {
|
|
605
|
-
p = f.parse ? f.parse(e) :
|
|
606
|
+
p = f.parse ? f.parse(e) : z(f, e);
|
|
606
607
|
} catch {
|
|
607
608
|
return;
|
|
608
609
|
}
|
|
609
|
-
let m =
|
|
610
|
+
let m = B(i, u);
|
|
610
611
|
m !== p && l.push({
|
|
611
612
|
rowId: i,
|
|
612
613
|
columnId: u,
|
|
@@ -621,10 +622,10 @@ var E = (e) => {
|
|
|
621
622
|
}
|
|
622
623
|
}
|
|
623
624
|
function Ge(e, t) {
|
|
624
|
-
let n = e.clientX, r =
|
|
625
|
+
let n = e.clientX, r = N(t), i = t.minWidth ?? 60, a = (e) => {
|
|
625
626
|
let a = Math.max(i, r + (e.clientX - n));
|
|
626
|
-
|
|
627
|
-
...
|
|
627
|
+
s.value = {
|
|
628
|
+
...s.value,
|
|
628
629
|
[t.id]: a
|
|
629
630
|
};
|
|
630
631
|
}, o = () => {
|
|
@@ -633,19 +634,19 @@ var E = (e) => {
|
|
|
633
634
|
window.addEventListener("mousemove", a), window.addEventListener("mouseup", o);
|
|
634
635
|
}
|
|
635
636
|
function Ke(e) {
|
|
636
|
-
e.sortable && (
|
|
637
|
+
e.sortable && (c.value?.columnId === e.id ? c.value = c.value.direction === "asc" ? {
|
|
637
638
|
columnId: e.id,
|
|
638
639
|
direction: "desc"
|
|
639
|
-
} : null :
|
|
640
|
+
} : null : c.value = {
|
|
640
641
|
columnId: e.id,
|
|
641
642
|
direction: "asc"
|
|
642
643
|
});
|
|
643
644
|
}
|
|
644
645
|
function Q(e) {
|
|
645
|
-
|
|
646
|
+
k.value.push(e), A.value = [];
|
|
646
647
|
}
|
|
647
648
|
function qe() {
|
|
648
|
-
let e =
|
|
649
|
+
let e = k.value.pop();
|
|
649
650
|
if (!e) return;
|
|
650
651
|
let t = e.map((e) => ({
|
|
651
652
|
...e,
|
|
@@ -653,23 +654,23 @@ var E = (e) => {
|
|
|
653
654
|
after: e.before
|
|
654
655
|
}));
|
|
655
656
|
for (let e of t) i("commit", e);
|
|
656
|
-
i("change", t),
|
|
657
|
+
i("change", t), A.value.push(e);
|
|
657
658
|
}
|
|
658
659
|
function $() {
|
|
659
|
-
let e =
|
|
660
|
+
let e = A.value.pop();
|
|
660
661
|
if (e) {
|
|
661
662
|
for (let t of e) i("commit", t);
|
|
662
|
-
i("change", e),
|
|
663
|
+
i("change", e), k.value.push(e);
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
|
-
return
|
|
666
|
+
return te(() => {
|
|
666
667
|
q();
|
|
667
668
|
}), t({
|
|
668
669
|
focus: (e, t) => K(e, t),
|
|
669
670
|
undo: qe,
|
|
670
671
|
redo: $,
|
|
671
|
-
getSelection: () =>
|
|
672
|
-
}), (t, n) => (
|
|
672
|
+
getSelection: () => C.value
|
|
673
|
+
}), (t, n) => (_(), f("div", { class: h(["nb-spreadsheet", { "nb-spreadsheet--editing": !!T.value }]) }, [t.$slots.toolbar ? (_(), f("div", ae, [ne(t.$slots, "toolbar", {}, void 0, !0)])) : d("", !0), p("div", {
|
|
673
674
|
ref_key: "scrollerRef",
|
|
674
675
|
ref: a,
|
|
675
676
|
class: "nb-spreadsheet__scroller",
|
|
@@ -679,37 +680,37 @@ var E = (e) => {
|
|
|
679
680
|
onCut: Ue,
|
|
680
681
|
onPaste: We,
|
|
681
682
|
onScroll: Ne
|
|
682
|
-
}, [
|
|
683
|
+
}, [p("div", {
|
|
683
684
|
class: "nb-spreadsheet__grid",
|
|
684
|
-
style:
|
|
685
|
+
style: g(P.value)
|
|
685
686
|
}, [
|
|
686
|
-
e.showGutter ? (
|
|
687
|
-
(
|
|
687
|
+
e.showGutter ? (_(), f("div", oe)) : d("", !0),
|
|
688
|
+
(_(!0), f(l, null, y(j.value, (t, n) => (_(), f("div", {
|
|
688
689
|
key: `h-${t.id}`,
|
|
689
|
-
class:
|
|
690
|
-
style:
|
|
690
|
+
class: h(["nb-spreadsheet__header", ve(t)]),
|
|
691
|
+
style: g(ye(t, n)),
|
|
691
692
|
onClick: (e) => Ke(t)
|
|
692
693
|
}, [
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
e.resizable ? (
|
|
694
|
+
p("span", ce, b(t.label), 1),
|
|
695
|
+
c.value && c.value.columnId === t.id ? (_(), f("span", le, b(c.value.direction === "asc" ? "▲" : "▼"), 1)) : d("", !0),
|
|
696
|
+
e.resizable ? (_(), f("span", {
|
|
696
697
|
key: 1,
|
|
697
698
|
class: "nb-spreadsheet__resize-handle",
|
|
698
|
-
onMousedown:
|
|
699
|
-
}, null, 40,
|
|
700
|
-
], 14,
|
|
701
|
-
(
|
|
699
|
+
onMousedown: S((e) => Ge(e, t), ["stop"])
|
|
700
|
+
}, null, 40, ue)) : d("", !0)
|
|
701
|
+
], 14, se))), 128)),
|
|
702
|
+
(_(!0), f(l, null, y(R.value, (t) => (_(), f(l, { key: `r-${t.id}` }, [e.showGutter ? (_(), f("div", {
|
|
702
703
|
key: 0,
|
|
703
|
-
class:
|
|
704
|
+
class: h(["nb-spreadsheet__gutter", {
|
|
704
705
|
"nb-spreadsheet__gutter--pinned-top": t.pinned === "top",
|
|
705
706
|
"nb-spreadsheet__gutter--pinned-bottom": t.pinned === "bottom"
|
|
706
707
|
}]),
|
|
707
|
-
style:
|
|
708
|
-
},
|
|
708
|
+
style: g(Se(t))
|
|
709
|
+
}, b(xe(t)), 7)) : d("", !0), (_(!0), f(l, null, y(j.value, (e, r) => (_(), f("div", {
|
|
709
710
|
key: `c-${t.id}-${e.id}`,
|
|
710
|
-
class:
|
|
711
|
-
style:
|
|
712
|
-
title:
|
|
711
|
+
class: h(["nb-spreadsheet__cell", ge(t, e)]),
|
|
712
|
+
style: g(be(t, e, r)),
|
|
713
|
+
title: _e(t, e),
|
|
713
714
|
"data-cell": `${t.id}::${e.id}`,
|
|
714
715
|
"data-row": t.id,
|
|
715
716
|
"data-col": e.id,
|
|
@@ -717,28 +718,37 @@ var E = (e) => {
|
|
|
717
718
|
onMousedown: (n) => Te(n, t, e),
|
|
718
719
|
onMouseenter: (n) => Ee(t, e),
|
|
719
720
|
onDblclick: (n) => Oe(t, e)
|
|
720
|
-
}, [
|
|
721
|
-
], 4),
|
|
721
|
+
}, [p("span", null, b(he(t, e)), 1)], 46, de))), 128))], 64))), 128))
|
|
722
|
+
], 4), T.value ? ie((_(), f("input", {
|
|
722
723
|
key: 0,
|
|
723
724
|
ref_key: "editorRef",
|
|
724
725
|
ref: o,
|
|
725
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
726
|
+
"onUpdate:modelValue": n[1] ||= (e) => T.value.draft = e,
|
|
726
727
|
class: "nb-spreadsheet__editor",
|
|
727
|
-
style:
|
|
728
|
+
style: g(Re.value),
|
|
728
729
|
inputmode: Le.value,
|
|
729
730
|
enterkeyhint: "next",
|
|
730
731
|
onBlur: n[2] ||= (e) => Z(!1),
|
|
731
|
-
onKeydown:
|
|
732
|
-
}, null, 44,
|
|
732
|
+
onKeydown: S(ze, ["stop"])
|
|
733
|
+
}, null, 44, fe)), [[re, T.value.draft]]) : d("", !0)], 544)], 2));
|
|
733
734
|
}
|
|
734
|
-
}),
|
|
735
|
-
Object.keys(
|
|
736
|
-
let n = `Nb${t.replace(/(.+\/)(\w+)(\.vue)$/, "$2")}`, r =
|
|
735
|
+
}), P = /* @__PURE__ */ r({ default: () => F }), F = /* @__PURE__ */ c(N, [["__scopeId", "data-v-a10ecfbb"]]), I = /* @__PURE__ */ Object.assign({ "./components/labs/Spreadsheet.vue": P }), L = { install(e) {
|
|
736
|
+
Object.keys(I).forEach((t) => {
|
|
737
|
+
let n = `Nb${t.replace(/(.+\/)(\w+)(\.vue)$/, "$2")}`, r = I[t];
|
|
737
738
|
e.component(n, r.default);
|
|
738
739
|
});
|
|
739
|
-
} },
|
|
740
|
+
} }, R = { install(e, t = {}) {
|
|
740
741
|
if (t.components) for (let [n, r] of Object.entries(t.components)) e.component(n, r);
|
|
741
|
-
e.
|
|
742
|
+
if (e.provide(n, { ...t.button }), t.ssr) {
|
|
743
|
+
let t = v(!0);
|
|
744
|
+
e.provide(s, { pending: t });
|
|
745
|
+
let n = e.mount.bind(e);
|
|
746
|
+
e.mount = ((...e) => {
|
|
747
|
+
let r = n(...e);
|
|
748
|
+
return t.value = !1, r;
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
e.use(k), e.use(A);
|
|
742
752
|
} };
|
|
743
753
|
//#endregion
|
|
744
|
-
export {
|
|
754
|
+
export { A as a, j as i, L as n, D as o, F as r, R as t };
|